private void Button_Click_1(object sender, RoutedEventArgs e)
{
IsolatedStorageFile isf = IsolatedStorageFile.GetUserStoreForApplication();
using (Stream stream=isf.CreateFile("Weather.txt"))
{
using (StreamWriter writer=new StreamWriter(stream))
{
writer.WriteLine(time.Text);
writer.WriteLine(time1.Text);
writer.WriteLine(time2.Text);
writer.WriteLine(time3.Text);
}
}
}

  private void Button_Click_2(object sender, RoutedEventArgs e)
{
IsolatedStorageFile isf = IsolatedStorageFile.GetUserStoreForApplication();
if (isf.FileExists("Weather.txt"))
{
using (Stream stream = isf.OpenFile("Weather.txt", FileMode.Open))
{
using (StreamReader reader = new StreamReader(stream))
{
string line = reader.ReadToEnd(); }
}
}
}

IsolatedStorageFile isf = IsolatedStorageFile.GetUserStoreForApplication();
isf.DeleteFile("Weather.txt");

Silverlight独立存储的更多相关文章

  1. Silverlight 独立存储(IsolatedStorageFile)

    1.在Web中添加天气服务引用地址 http://www.webxml.com.cn/WebServices/WeatherWebService.asmx?wsdl 2.在Web中添加Wcf服务接口I ...

  2. Silverlight-管理独立存储(Isolated Storage)

    Silverlight中的独立存储是其内部的可信任的可访问文件空间,在这里你可以使用Silverlight 随意的创建.读取.写入.删除目录和文件,它有一些类似于Cookie,但是它可以在客户端保存大 ...

  3. WP8 独立存储 总结3(应用设置)

    •可在独立存储中使用ApplicationSettings对象•在独立存储中存储键/值对的Dictionary方式存储 •存储的对象将永久保存 在应用设置中保存数据 void saveString(s ...

  4. WP_从独立存储区读取缓存的图片

      ///<summary> /// 独立存储缓存的图片源 /// 用法:item.img = new StorageCachedImage(newUri(http://www.baidu ...

  5. Windows phone 之独立存储

    独立存储命名空间的说明:

  6. win10的独立存储

    win10的独立存储和win8的大致相同 Windows.Storage.ApplicationDataContainer roamingSettings = Windows.Storage.Appl ...

  7. 与众不同 windows phone (6) - Isolated Storage(独立存储)

    原文:与众不同 windows phone (6) - Isolated Storage(独立存储) [索引页][源码下载] 与众不同 windows phone (6) - Isolated Sto ...

  8. Windows Phone 独立存储资源管理器工具

    如何使用独立存储资源管理器工具 http://msdn.microsoft.com/zh-CN/library/hh286408(v=vs.92)C:\Program Files (x86)\Micr ...

  9. Windows Phone 独立存储查看器

    1.为了查看我们存放在独立存储的数据,我们需要借助独立存储查看器. 2.简单介绍下,IsoStoreSpy 下载地址:http://download.csdn.net/download/lhb1097 ...

随机推荐

  1. LeetCode9 Palindrome Number

    题意: Determine whether an integer is a palindrome. Do this without extra space.  (Easy) 分析: 自己考虑的方法是利 ...

  2. LeetCode6 ZigZag Conversion

    题意: The string "PAYPALISHIRING" is written in a zigzag pattern on a given number of rows l ...

  3. 短小实用 渗透用的Python小脚本

    渗透的很多时候,找到的工具并不适用,自己码代码才是王道,下面三个程序都是渗透时在网络上找不到合适工具,自己辛苦开发的,短小实用. 一.记录root密码小工具 root.py #!/usr/bin/py ...

  4. asp.net等项目编译失败的原因之不能写入

    本人遇到过一次生成mvc4项目失败,说是不能写入,后发现是权限问题,特此记录. 解决方案: 对C盘下的temp文件夹设置当前用户的写入权限即可.

  5. iOS 下拉刷新 上拉加载实现原理

    1.下拉刷新 实现原理 if (scrollView.contentOffset.y < -100) { [UIView animateWithDuration:1.0 animations:^ ...

  6. PHP使用外部命令导出数据库,备份到服务器并下载到本地

    <?php // $dumpFileName目录要有可写权限 $DbHost = 'localhost'; $DbUser = 'root'; $DbPwd = '123456'; $DbNam ...

  7. SQL Server表的数据量大小查询

    今天想在服务器上还原一个DB,发现磁盘空间不够,查看发现,其中一个DB竟然有56G了.因此想收缩一下这个DB,发现大小没多大变化.然后在网上找了找SQL脚本,看能不能查看下哪个表的数据量那么大. 网上 ...

  8. codeforces 613B B. Skills(枚举+二分+贪心)

    题目链接: B. Skills time limit per test 2 seconds memory limit per test 256 megabytes input standard inp ...

  9. struts2框架的第一个程序

    helloworld.jsp在base目录下 <a href="${pageContext.request.contextPath }/base/HelloWorldAction.ac ...

  10. 更改Activity亮度

    有些需求需进入到页面后更改Activity的亮度,退出页面后恢复到之前的亮度.通过更改WindowManager.LayoutParams的screenBrightness可以达到这个效果.scree ...