zoukankan      html  css  js  c++  java
  • Isolated storage 独立存储 GIS

    一个程序不能操作其他程序的独立存储 和不能操作文件系统,独立存储是虚拟的文件系统。

    System.IO.IsolatedStorage.

    IsolatedStorageSettings +++IsolatedStorageFile 两个主要类

    IsolatedStorageSettings 使用 key +value 键值对的形式存储数据 常用方法  Add, Remove, and Contains.

    IsolatedStorageFile 使用文件和目录 存数据  常用方法FileExists, CreateFile,OpenFile, and DeleteFile., DirectoryExists, CreateDirectory, DeleteDirectory

    vs 中可以使用命令行 启动ISETool 来查看 ,独立存储的数据 ,调用方式

    C:\Program Files (x86)\Microsoft SDKs\Windows Phone\v7.1\Tools\IsolatedStorageExplorerTool\ISETool.exe

    image

      public partial class MainPage : PhoneApplicationPage
        {
            // Constructor
            IsolatedStorageSettings mySettings;
            public MainPage()
            {
                InitializeComponent();
                mySettings = IsolatedStorageSettings.ApplicationSettings;
            }

    private void btnSaveSettings_Click(object sender,RoutedEventArgs e)
    {
      if (!String.IsNullOrEmpty(tbNameContent.Text))
    {

    if (mySettings.Contains("setName"))
    {
    mySettings["setName"] = tbNameContent.Text;
    }
    else
    mySettings.Add("setName", tbNameContent.Text);
    mySettings.Save();
    }
    }

    }

  • 相关阅读:
    TimusOJ Bald Spot Revisited(质因数分解)
    hdu 6170 Two strings(dp)
    线性筛资料
    BZOJ3437 小P的牧场(斜率优化dp)
    First Blog
    【BZOJ】3930: [CQOI2015]选数
    【Ctsc2011】幸福路径
    【BZOJ】4012: [HNOI2015]开店
    【BZOJ】 3238: [Ahoi2013]差异
    【NOI2014】动物园
  • 原文地址:https://www.cnblogs.com/gisbeginner/p/2528645.html
Copyright © 2011-2022 走看看