[英]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.