Seb*_*ray 5 xna isolatedstorage windows-phone-7
我一直在尝试在Silverlight和XNA之间移植一些Windows Phone 7代码,这依赖于IsolatedStorageSettings,但我无法让Visual Studio解决它.当我查看Intellisense在System.IO.IsolatedStorage下解析的内容时,它列出了IsolatedStorageFile,IsolatedStorageException和IsolatedStorageStream.
文档说支持的版本是针对Silverlight的,但我不明白为什么我会看到因项目类型而产生的差异.
谢谢
在 XNA 项目中,我可以完成以下工作,无需额外的项目参考:
using (var store = IsolatedStorageFile.GetUserStoreForApplication())
{
store.CreateFile("folder/file.ext");
}
Run Code Online (Sandbox Code Playgroud)
添加对的引用后,System.Windows.dll
我可以执行以下操作:
var settings = IsolatedStorageSettings.ApplicationSettings;
settings.Add("something", "myValue");
settings.Save();
Run Code Online (Sandbox Code Playgroud)
如果您无法使上述工作正常,您可以发布您正在尝试的示例吗?
归档时间: |
|
查看次数: |
1953 次 |
最近记录: |