Silverlight隔离存储(续)
来源:互联网 发布:伪装地理位置软件哪个 编辑:程序博客网 时间:2024/06/07 20:25
我之前的一篇日记说到了隔离存储的问题,简单而言,它就是提供给Silverlight应用程序可以在用户机器上做一些文件存取的机制 。
事实上,除了我们自己写文件之外,还可以直接利用IsolatedStorageSettings这个类保存一些应用程序的设置信息。看起来的确很方便
下面是一个简单的例子
1 using System.IO.IsolatedStorage;23 namespace SearchMonitor.Model4 {5 public class Helper6 {7 internal static string GetLatestTweetId(string searchTerm)8 {9 if (IsolatedStorageSettings.ApplicationSettings.Contains(searchTerm))10 {11 return IsolatedStorageSettings.ApplicationSettings[searchTerm].ToString();12 }13 else 14 {15 return "0";16 }17 }1819 internal static void SaveLatestTweetId(string searchTerm, string latestId)20 {21 if (IsolatedStorageSettings.ApplicationSettings.Contains(searchTerm))22 {23 IsolatedStorageSettings.ApplicationSettings[searchTerm] = latestId;24 }25 else26 {27 IsolatedStorageSettings.ApplicationSettings.Add(searchTerm, latestId);28 }29 }30 }31 }.csharpcode, .csharpcode pre{font-size: small;color: black;font-family: consolas, "Courier New", courier, monospace;background-color: #ffffff;/*white-space: pre;*/}.csharpcode pre { margin: 0em; }.csharpcode .rem { color: #008000; }.csharpcode .kwrd { color: #0000ff; }.csharpcode .str { color: #006080; }.csharpcode .op { color: #0000c0; }.csharpcode .preproc { color: #cc6633; }.csharpcode .asp { background-color: #ffff00; }.csharpcode .html { color: #800000; }.csharpcode .attr { color: #ff0000; }.csharpcode .alt {background-color: #f4f4f4;width: 100%;margin: 0em;}.csharpcode .lnum { color: #606060; }
- Silverlight隔离存储(续)
- silverlight隔离存储
- Silverlight应用程序 的隔离存储
- 在silverlight中使用IsolateStore隔离存储(下)
- 在silverlight中使用IsolateStore隔离存储(上)
- Silverlight之独立存储(10)
- Windows Phone开发(27):隔离存储A
- Windows Phone开发(28):隔离存储B
- Windows Phone开发(29):隔离存储C
- Windows Phone开发(27):隔离存储A .
- Windows Phone开发(28):隔离存储B .
- Windows Phone开发(29):隔离存储C .
- InnoDB存储引擎_数据库隔离级别(一)
- InnoDB存储引擎_数据库隔离级别(二)
- silverlight 独立存储
- silverlight浏览器外运行的安装、卸载、更新、网络连接判断、隔离存储、浏览器外调试、与COM互操作、通知窗口
- Silverlight Isolated Storage 独立存储
- Silverlight Isolated Storage 独立存储
- What's New in the Visual Studio Debugger
- Silverlight3 加载其他xap
- Silverlight应用程序 的隔离存储
- IE 8 中选项卡通过颜色分组
- 在Silverlight中读取ADO.NET数据服务的两种方式
- Silverlight隔离存储(续)
- hello,mono!
- RIA 亮剑行动
- Silverlight中的多语言支持中几个特殊之处
- Silverlight中使用自定义服务
- 你需要知道的隐式转换操作符
- Silverlight的跨站策略和跨站策略文件
- 根据方法名执行方法的例子
- 关于Thread.IsAlive属性