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();
    }
    }

    }

  • 相关阅读:
    vue参考---自建vue插件
    vue参考---vue指令
    vue参考---vue基本实例
    Install Package and Software
    解决Gradle DSL method not found: ‘android()’
    再见理想
    HttpClientUtil
    AtomicLong
    Fastjson反序列化泛型类型时候的一个问题
    Java获取泛型的Class对象
  • 原文地址:https://www.cnblogs.com/gisbeginner/p/2528645.html
Copyright © 2011-2022 走看看