简体   繁体   English

即使设备/模拟器关闭后如何使IsolatedStorageSettings仍然存在?

[英]How to make IsolatedStorageSettings persist even after the device/emulator is turned off?

I have read that data stored in Isolated Storage in wp8 is permanent.But I am a little confused about the term 'permanent'. 我已经读过在wp8中存储在Isolated Storage中的数据是永久性的。但我对“永久”一词感到有点困惑。 I don't have wp8 device so I can't check this on a real device. 我没有wp8设备所以我无法在真实设备上查看。 I tried the emulator and everything is working fine until I close my emulator. 我尝试了模拟器,一切正常,直到我关闭我的模拟器。 I want to know if the same problem exists on the real device when the application is closed or the device is switched off. 我想知道当应用程序关闭或设备关闭时,真实设备上是否存在同样的问题。

My Code for saving email and password.. 我的代码用于保存电子邮件和密码..

private IsolatedStorageSettings appSettings = IsolatedStorageSettings.ApplicationSettings;
try
{
   appSettings.Add("email", this.txt_email.Text);
   appSettings.Add("password", this.txt_password.Text);
   appSettings.Save();                        
}
catch (ArgumentException ex)
{
   MessageBox.Show("ERROR"+ex.Message);
}
return register;

Can anybody help me do this??? 任何人都可以帮我这样做吗???

Yes, what you read is correct. 是的,你读的是正确的。 "The data stored in Isolated Storage in WP8 device is permanent". “存储在WP8设备中的隔离存储中的数据是永久性的”。 And the "Permanent" is as long as your app is in the device. 只要您的应用程序在设备中,“永久”就可以了。 And the data will be deleted, only if the app is uninstalled from the device by the user. 只有当用户从设备上卸载应用程序时,数据才会被删除。 Data persists even if the app is closed or even if the phone is rebooted. 即使应用程序已关闭或即使手机重新启动,数据仍会存在。

Its different with Emulator. 它与仿真器不同。 Once the emulator is closed, all the data is lost. 模拟器关闭后,所有数据都将丢失。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 即使设备关闭后如何使IsolatedStorageSettings仍然存在? - How to make IsolatedStorageSettings persist even after the device is turned off? LARGEADDRESSAWARE在安装后关闭了吗? - LARGEADDRESSAWARE turned off after installation? 为什么即使我在每个可能的点关闭它之后我的代码都在进行延迟加载? - Why is my code doing lazy loading even after I turned it off at every possible point? Silverlight:IsolatedStorageSettings 在页面刷新之间持久化数据 - Silverlight: IsolatedStorageSettings to persist data between page refresh 如何在空闲计时器关闭后使用.NET重新打开显示器? - How to use .NET to Turn the Monitor back on after the Idle Timer has Turned it Off? 即使关闭了智能感知,Visual Studio仍保持自动填充 - Visual Studio keeps auto filling even with intellisense turned off 即使级联删除已关闭,也会获得“外键约束” - Getting “Foreign Key constraint” even though cascade delete is turned off UAC关闭时如何提升应用程序? - How to elevate application when UAC is turned Off? 一段时间后,WPF动画中的缓动功能会自动关闭 - Ease function is automatically turned off in wpf animation after some time 提交后如何使所选值的下拉列表保持不变 - How can I make dropdownlistfor selected value persist after submit
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM