1. private void Button_Click_1(object sender, RoutedEventArgs e)
  2. {
  3. IsolatedStorageFile isf = IsolatedStorageFile.GetUserStoreForApplication();
  4. using (Stream stream=isf.CreateFile("Weather.txt"))
  5. {
  6. using (StreamWriter writer=new StreamWriter(stream))
  7. {
  8. writer.WriteLine(time.Text);
  9. writer.WriteLine(time1.Text);
  10. writer.WriteLine(time2.Text);
  11. writer.WriteLine(time3.Text);
  12. }
  13. }
  14. }

  1. private void Button_Click_2(object sender, RoutedEventArgs e)
  2. {
  3. IsolatedStorageFile isf = IsolatedStorageFile.GetUserStoreForApplication();
  4. if (isf.FileExists("Weather.txt"))
  5. {
  6. using (Stream stream = isf.OpenFile("Weather.txt", FileMode.Open))
  7. {
  8. using (StreamReader reader = new StreamReader(stream))
  9. {
  10. string line = reader.ReadToEnd();
  11.  
  12. }
  13. }
  14. }
  15. }

  1. IsolatedStorageFile isf = IsolatedStorageFile.GetUserStoreForApplication();
  2. 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. IIS错误日志:Failed to execute request because the App-Domain

    装上IIS和.net2.0框架后,打开ASP.NET站点,出现Server Application Error,出先此问题,一般先看系统的“事件管理器”,于是查看服务器的“事件管理器”中的“应用程序” ...

  2. structs 2 学习总结(一)

      转发请注明出处 1.页面传值. 传值 前台 <s:form action="login1">//action 名字 需要在structs配置 用户<s:tex ...

  3. python--面向对象编程介绍

    暂不考虑开发场地等复杂的东西,我们先从人物角色下手, 角色很简单,就俩个,恐怖份子.警察,他们除了角色不同,其它基本都 一样,每个人都有生命值.武器等. 咱们先用非OOP的方式写出游戏的基本角色 引子 ...

  4. iOS-UISearchBar和UISearchController(参考网友来练习一下)

    #import "ViewController.h" #import "TestCell.h" @interface ViewController ()< ...

  5. 自定义 404 与 500 错误页面,URL 地址不会重定向(一)

    对于 404 与 500 错误发生时,我们希望自己定义一个更加人性化的页面. 例子 当访问下面这个地址时: http://localhost/aaaa/bbb/ccc/ddd/eee/fff/ggg ...

  6. 【Shell脚本学习14】Shell echo命令

    echo是Shell的一个内部指令,用于在屏幕上打印出指定的字符串.命令格式: echo arg 您可以使用echo实现更复杂的输出格式控制. 显示转义字符 echo "\"It ...

  7. 《算法导论》习题解答 Chapter 22.1-3(转置图)

    一.邻接表实现 思路:一边遍历,一边倒置边,并添加到新的图中 邻接表实现伪代码: for each u 属于 Vertex for v 属于 Adj[u] Adj1[v].insert(u); 复杂度 ...

  8. [课程相关]homework-06

    一.c++11 lambda /* * File: main.cpp * Author: liangjie * * Created on 2013年11月23日, 下午12:02 */ #includ ...

  9. Spring Data Jpa 详解 (配置篇)

    前言: JPA全称Java Persistence API,即Java持久化API,它为Java开发人员提供了一种对象/关系映射工具来管理Java应用中的关系数据,结合其他ORM的使用,能达到简化开发 ...

  10. Shodan!

    Shodan! 简介 首先先介绍一下Shodan CNNMoney的一篇文章写道,虽然目前人们都认为谷歌是最强劲的搜索引擎,但Shodan才是互联网上最可怕的搜索引擎. 与谷歌不同的是,Shodan不 ...