如何在 Wp7 中进行隔离存储? [英] How to do isolated storage in Wp7?

查看:23
本文介绍了如何在 Wp7 中进行隔离存储?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想将数据存储在下拉列表和 2 个单选按钮之间 我必须使用 Window phone 7 a 中的隔离存储存储一个值Wp7如何做隔离存储?

I want to store data in dropdown list and between 2 radio button I have to store one value using isolated storage in Window phone 7 a How to do isolated storage in Wp7?

推荐答案

最简单的方法是使用 IsolatedStorageSettings.ApplicationSettings 类/属性 - 它是您所有小型临时数据的绝佳垃圾箱无论发生什么都必须生存.通常,该对象会自动从 ISO 存储中保存/恢复,但要小心相信 - 如果您的应用程序正常关闭,它会起作用.例如,如果您想防止应用程序崩溃/等 - 您仍然应该定期手动调用此对象上的 SAVE .

The easiest way to do it, is to use the IsolatedStorageSettings.ApplicationSettings class/property - it is a great dumpbin for all your small temporary data that must survive whatever happens. Generally, that object is automatically saved/restored from the ISO store, but be careful in believing that - it works if your app is closed gracefully. If you want to guard that against for example, an application crash/etc - you still should periodically manually call SAVE on this object.

一些链接/tuts:MSDN:很好的解释一个例子:http://msdn.microsoft.com/en-us/library/cc221360(v=vs.95).aspx首先来自 google http://dotnet.dzone.com/articles/using-application-settings

Some links/tuts: MSDN: quite nice explanation an example: http://msdn.microsoft.com/en-us/library/cc221360(v=vs.95).aspx first-whetever from google http://dotnet.dzone.com/articles/using-application-settings

这篇关于如何在 Wp7 中进行隔离存储?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆