Windows Phone 7翻译材料.docx_第1页
Windows Phone 7翻译材料.docx_第2页
Windows Phone 7翻译材料.docx_第3页
Windows Phone 7翻译材料.docx_第4页
Windows Phone 7翻译材料.docx_第5页
已阅读5页,还剩3页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

原文sometimes it becomes apparent that previous approaches to a problem havent quite worked the way you anticipated. perhaps you just need to clear away the smoky residue of the past, take a deep breath, and try again with a new attitude and fresh ideas. in golf, its known as a “mulligan”; in schoolyard sports, its called a “do-over”; and in the computer industry, we say its a “reboot.”a reboot is what microsoft has initiated with its new approach to the mobile phone market. with its clean look, striking fonts, and new organizational paradigms, microsoft windows phone 7 not only represents a break with the windows mobile past but also differentiates itself from other smartphones currently in the market. windows phone 7 devices will be made by several manufacturers and available with a variety of cell providers.for programmers, windows phone 7 is also exciting, for it supports two popular and modern programming platforms: silverlight and xna.silverlighta spinoff of the client-based windows presentation foundation (wpf)has already given web programmers unprecedented power to develop sophisticated user interfaces with a mix of traditional controls, high-quality text, vector graphics, media, animation, and data binding that run on multiple platforms and browsers. windows phone 7 extends silverlight to mobile devices.xnathe three letters stand for something like “xna is not an acronym”is microsofts game platform supporting both 2d sprite-based and 3d graphics with a traditional game-loop architecture. although xna is mostly associated with writing games for the xbox 360 console, developers can also use xna to target the pc itself, as well as microsofts classy audio player, the zune hd.either silverlight or xna would make good sense as the sole application platform for the windows phone 7, but programmers have a choice. and this we call “an embarrassment of riches.”targeting windows phone 7all programs for windows phone 7 are written in .net managed code. although the sample programs in this book are written in the c# programming language, it is also possible to write windows phone 7 applications in visual basic .net. the free downloadable microsoft visual studio 2010 express for windows phone includes xna game studio 4.0 and an on-screen phone emulator, and also integrates with visual studio 2010. you can develop visuals and animations for silverlight applications using microsoft expression blend.2the silverlight and xna platforms for windows phone 7 share some libraries, and you can use some xna libraries in a silverlight program and vice versa. but you cant create a program that mixes visuals from both platforms. maybe that will be possible in the future, but not now. before you create a visual studio project, you must decide whether your million-dollar idea is a silverlight program or an xna program.generally youll choose silverlight for writing programs you might classify as applications or utilities. these programs are built from a combination of markup and code. the markup is the extensible application markup language, or xaml and pronounced “zammel.” the xaml mostly defines a layout of user-interface controls and panels. code-behind files can also perform some initialization and logic, but are generally relegated to handling events from the controls. silverlight is great for bringing to the windows phone the style of rich internet applications (ria), including media and the web. silverlight for windows phone is a version of silverlight 3 excluding some features not appropriate for the phone, but compensating with some enhancements.xna is primarily for writing high-performance games. for 2d games, you define sprites and backgrounds based around bitmaps; for 3d games you define models in 3d space. the action of the game, which includes moving graphical objects around the screen and polling for user input, is synchronized by the built-in xna game loop.the differentiation between silverlight-based applications and xna-based games is convenient but not restrictive. you can certainly use silverlight for writing games and you can even write traditional applications using xna, although doing so might sometimes be challenging.in particular, silverlight might be ideal for games that are less graphically oriented, or use vector graphics rather than bitmap graphics, or are paced by user-time rather than clock-time. a tetris-type program might work quite well in silverlight. youll probably find xna to be a bit harder to stretch into silverlight territory, however. implementing a list box in xna might be considered “fun” by some programmers but a torture by many others.the first several chapters in this book describe silverlight and xna together, and then the book splits into different parts for the two platforms. i suspect that some developers will stick with either silverlight or xna exclusively and wont even bother learning the other environment. i hope thats not a common attitude. the good news is that silverlight and xna are so dissimilar that you can probably bounce back and forth between them without confusion!microsoft has been positioning silverlight as the front end or “face” of the cloud, so cloud services and windows azure form an important part of windows phone 7 development. the windows phone is “cloud-ready.” programs are location-aware and have access to maps and other data through bing and windows live. one of the available cloud services is xbox live,3which allows xna-based programs to participate in online multiplayer games, and can also be accessed by silverlight applications.programs you write for the windows phone 7 will be sold and deployed through the windows phone marketplace, which provides registration services and certifies that programs meet minimum standards of reliability, efficiency, and good behavior.ive characterized windows phone 7 as representing a severe break with the past. if you compare it with past versions of windows mobile, that is certainly true. but the support of silverlight, xna, and c# are not breaks with the past, but a balance of continuity and innovation. as young as they are, silverlight and xna have already proven themselves as powerful and popular platforms. many skilled programmers are already working with either one framework or the otherprobably not so many with both just yetand they have expressed their enthusiasm with a wealth of online information and communities. c# has become the favorite language of many programmers (myself included), and developers can use c# to share libraries between their silverlight and xna programs as well as programs for other .net environments.the hardware chassisdevelopers with experience targeting windows mobile devices of the past will find significant changes in microsofts strategy for the windows phone 7. microsoft has been extremely proactive in defining the hardware specification, often referred to as a “chassis.”initial releases of windows phone 7 devices will have one consistent screen size. (a second screen size is expected in the future.) many other hardware features are guaranteed to exist on each device.the front of the phone consists of a multi-touch display and three hardware buttons generally positioned in a row below the display. from left to right, these buttons are called back, start, and search:back programs can use this button for their own navigation needs, much like the back button on a web browser. from the home page of a program, the button causes the program to terminate.start this button takes the user to the start screen of the phone; it is otherwise inaccessible to programs running on the phone.4search the operating system uses this button to initiate a search feature.the initial releases of windows phone 7 devices have a display size of 480 800 pixels. in the future, screens of 320 480 pixels are also expected. there are no other screen options for windows phone 7, so obviously these two screen sizes play a very important role in phone development.in theory, its usually considered best to write programs that adapt themselves to any screen size, but thats not always possible, particularly with game development. you will probably find yourself specifically targeting these two screen sizes, even to the extent of having conditional code paths and different xaml files for layout that is size-dependent.i will generally refer to these two sizes as the “large” screen and the “small“ screen. the greatest common denominator of the horizontal and vertical dimensions of both screens is 160, so you can visualize the two screens as multiples of 160-pixel squares:480 320 480800im showing these screens in portrait mode because thats usually the way smartphones are designed. the screen of the original zune is 240 320 pixels; the zune hd is 272 480.of course, phones can be rotated to put the screen into landscape mode. some programs might require the phone to be held in a certain orientation; others might be more adaptable.you have complete control over the extent to which you support orientation. by default, silverlight applications appear in portrait mode, but youll probably want to write your silverlight applications so they adjust themselves to orientation changes. new events are available specifically for the purpose of detecting orientation change, and some orientation shifts are handled automatically. in contrast, game programmers can usually impose a particular orientation on the user. xna programs use landscape mode by default, but its easy to override that.5in portrait mode, the small screen is half of an old vga screen (that is, 640 480). in landscape mode, the large screen has a dimension sometimes called wvga (“wide vga”). in landscape mode, the small screen has an aspect ratio of 3:2 or 1.5; the large screen has an aspect ratio of 5:3 or 1.66. neither of these matches the aspect ratio of television, which for standard definition is 4:3 or 1.33 and for high-definition is 16:9 or 1.77. the zune hd screen has an aspect ratio of 16:9.like many recent phones and the zune hd, the windows phone 7 displays will likely use oled (“organic light emitting diode”) technology, although this isnt a hardware requirement. oleds are different from flat displays of the past in that power consumption is proportional to the light emitted from the display. for example, an oled display consumes less than half the power of an lcd display of the same size, but only when the screen is mostly black. for an all-white screen, an oled consumes more than three times the power of an lcd.because battery life is extremely important on mobile devices, this characteristic of oled displays implies an aesthetic of mostly black backgrounds with sparse graphics and light-stroked fonts. regardless, windows phone 7 users can choose between two major color themes: light text on a dark background, or dark text on a light background.most user input to a windows phone 7 program will come through multi-touch. the screens incorporate capacitance-touch technology, which means that they respond to a human fingertip but not to a stylus or other forms of pressure. windows phone 7 screens are required to respond to at least four simultaneous touch-points.a hardware keyboard is optional. keep in mind that phones can be designed in different ways, so when the keyboard is in use, the screen might be in either portrait mode or landscape mode. a silverlight program that uses keyboard input must respond to orientation changes so that the user can both view the screen and use the keyboard without wondering what idiot designed the program sideways. an on-screen keyboard is also provided, known in windows circles as the soft input panel or sip. xna programs also have access to the hardware keyboard and sip.译文有时候以前的方法显然无法达到预期效果,这时也许需要告别迷雾茫茫的过去。做一次深呼吸,用一种全新的态度和方法重新再来一次。高尔夫球选手都知道这叫“重新发一球“;在校园体育运动中,这可以被称作“再来一次”;而在计算机行业中,我们称其为“重启”。微软针对移动手机市场采取了新的举措,此举正可谓重启。microsoft window phone 7以其简洁的外观、显著的字体和全新的组织规范,不仅实现了对原有windows mobile的突破,而且还与当前市场中流行的其他智能手机有许多不同之处。windows phone7的硬件将由多家厂商制造并由各个手机服务商发售。windows phone 7无疑令开发人员激动不已,原因是它支持两种非常流行且时尚的编程平台:silverlight和xna。silverlight是一种基于客户端的wpf的衍生产品,已经为 web程序员开发精美的用户界面注入了空前的力量,它集传统控件、高品质文本、矢量图、媒体、动画效果以及数据绑定于一身,可运行于多种平台和浏览器上。window phone 7将silverlight的适用范围扩展到移动设备上。xna这3个字母可能是“xna is not an aeronym”的首字母缩写词,它是微软的游戏平台,适用于传统的游戏循环架构,同时支持zd精灵和3d图形。尽管xna以住主要用于编写xbox360主机游戏,但也可以使用它为pc和微软优秀的音频播放器zunohd开发应用。虽然silverlight和xna都可作为windowsphonc7的唯一应用程序平台,但开发者可以在两者之间任选其一。这种情况我们称之为“幸福的烦恼”。windows phone 7目标平台所有windowsphone7的程序都是用.net托管代码编写的。虽然本书的所有示例都是用c语言编写的,但同样也可以使用visual basic.net编写windows phone 7应用程序。可以免费下载的microsoft visuals studio 2010 express for windows phone。中含有nxa game studio 4.0和一个手机模拟器,这些工具也能够与visual studio 2010结合使用。你也可以使用microsoft expression blend来开发silverlight应用的视觉和动画效果。windowsphone7的silverlight和xna平台共享了一些库文件,你可以在silverlight程序中使用xna的库,反之亦然。但是下能创建一个程序将两个平台上的视觉呈现部分混淆在一起。也许将来可以实现,但现在不可以。创建visual studio。项目之前,你必须要决定你的金点子是通过silverlight程序还是通过xna程序来实现。应用程序和工具通常选择silverlight构架开发。创建silverlight应用需要组合标记和代码。标记使用的是展应用程序标记语言xaml发音为“zammel”。xaml主要用来定义用户界面控件和面板的布局。代码隐藏文件虽然也能执行某些初始化和逻辑处理,但更多是用来处理控件事件。silverlight把富因特网应用程序(ria)的开发风格带到windows phone应用开发中,包括多煤体和web应用。silverlight for window phone是silverlight 3的一个版本,删除了不适用于手机的特性,又补充了一些手机独有的功能。xna主要用来编写高性能游戏。对于2d游戏,可以基于位图来定义精灵和背景。对3d游戏,可以在3d空间中定义模型。屏幕上图形对象的移动以及轮询用户的输入等游戏的动作都是由内建的xna游戏循环同步处理的。使用silverlight来开发应用程序和使用xna来开发游戏,这种区分取决于开发者使用哪个框架更容易实现软件的需求,而并没有严格的限制。当然可以使用silverlight来开发游戏,也可以使用xna来编写传统应用程序,尽管这样做有时具有一定的挑战性。silverlight可能特别适用于图形比较少的游戏,或者是使用矢量图而不是位图的游戏,或者是以用户时间推动而不是时钟时间推动的游戏。俄罗斯方块这类游戏可能会在silverlight下运行得很好。但你很可能会发现xna比较难进入silverlight的领域。使用xna实现一个列表框对于一部分程序员来说可能会非常有趣,但对于其他大多数程序员来说却是一种折磨。本书的前几章会同时介绍silverlight和xna,之后,本书就会分开讲述这两个平台。我想有些开发者会只使用silverlight或xna,并且他们也不想去学习另一个平台。希望这不是普遍现象。silverlight和xna十分不同,这是好消息,你能够交替使用它们而不会产生混淆。微软已经把silverlight定位为云计算的前端,因此,云服务和windows azure也是windowsphone7开发的一个重要组成部分。windows phone使云计算触手可及。windows phone应用程序具备方位感应功能,并可以通过bing和windows live来访问地图和其他数据。另外一个云服务叫做xboxlive,通过该服务,基于xna的程序可以实现多人在线游戏,当然silverlight应用程序也可以访问xboxlive。为windowsphone7编写的程序可以通过windows phone market place出售和部署。market place提供注册服务,同时认证程序能满足可靠性、高效性和有益性的最低要求。windows phone 7突破了传统。与先前版本的windows mobile相比,你会更容易体会到这一点。但是对silverlight、xna和c的支持则不会终结传统,而是平衡了沿续性和创新性。作为新产品,silverlight和xna已经证明了自己是强大且流行的平台。很多有经验的程序员正在使用其中一个框架,而且大量的在线信息与社区也透露出他们所抱有的极大热情。c已成为众多程序员(包括我自己)所喜爱的开发语言,开发者能够使用c在silverlight程序和xna程序以及其他运行在.net环境下的程序间实现库的共享。硬件规格具有windows mobile设备开发经验的开发者会发现,微软对windowsphone7已做出战略调整。微软已经预先定义好严格的硬件规格,即通常所说的“底盘”。最初发布的windows phone 7设备将具有统一的屏幕尺寸(将来还会推出第二种屏幕尺寸),同时也保证每台设备的其他硬件特性相同。手机正面有一个多点触控屏幕和三

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论