我怎样才能在 wp7 中做到这一点?
关于如何创建这个应用程序有什么想法吗?
1)我有一个页面,其中包含 3 个任务,因此有一个文本框、一个包含图像名称的标签和另一个显示我当前位置的标签。第一个是在文本框中输入一些文本,第二个是拍张照片并返回此页面并显示图片网址,第三步是确定并显示我的位置。
2)我需要收集这 3 位信息中的每一个,并通过 WCF 或 Odata 将其上传到远程数据库。
3)我知道,例如,用相机拍照或浏览图片中心中的图片将使我离开任务页面。
我怎样才能拍照并将信息带回我的任务页面而不丢失状态?
Any ideas on how i can create this app?
1) i have a page which contains 3 tasks and thus has a textbox, a label to contain an image name and another label which is to display my current location..the first is to enter some text into a textbox, the second is to take a picture and come back to this page and display the picture url and the 3rd is to determine and display my location.
2) i need to gather each of these 3 bits of information and upload it to a remote database via WCF or Odata.
3) I know that for example, to either take a picture with my camera or browse to a pix in the pictures hub will take me away from my task page.
how can i take the picture and carry the information back to my task page without losing state?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
要从相机获取图片,您需要使用 CameraCaptureTask。
要从手机中选择现有图片,您应该使用 照片选择器任务。
要获取设备的当前位置,请使用 GeoCooperativeWatcher。
当您捕获此信息时,应该不会出现丢失状态的问题,但如果您可以将其存储在 页面状态对象。
笔记。所有链接都是“如何”文章。
To get a picture from the camera you need to use a CameraCaptureTask.
To choose an existing picture from the phone you shoudl use a PhotoChooserTask.
To get the devices currentl location use the GeoCoordinateWatcher.
There should be no issues with loosing state while you capture this information but isf there is you can just store it in the Page State object.
Note. All links are "How To" articles.
当您拍照时,您的应用程序将被逻辑删除。请参阅以下文章,详细了解此过程的工作原理以及您需要执行的操作:
http://windowsteamblog.com/windows_phone/b/wpdev/archive/2010/07/20 /understanding-the-windows-phone-application-execution-model-tombstoneing-launcher-and-more-part-3.aspx
When you take a picture, your application will be tombstoned. See the following article for details of how this process works and what you need to do:
http://windowsteamblog.com/windows_phone/b/wpdev/archive/2010/07/20/understanding-the-windows-phone-application-execution-model-tombstoning-launcher-and-more-part-3.aspx