当前位置: 首页>>代码示例>>C#>>正文


C# IsolatedStorageSettings.Add方法代码示例

本文整理汇总了C#中System.IO.IsolatedStorage.IsolatedStorageSettings.Add方法的典型用法代码示例。如果您正苦于以下问题:C# IsolatedStorageSettings.Add方法的具体用法?C# IsolatedStorageSettings.Add怎么用?C# IsolatedStorageSettings.Add使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在System.IO.IsolatedStorage.IsolatedStorageSettings的用法示例。


在下文中一共展示了IsolatedStorageSettings.Add方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: AddDefaultSettings

 private static void AddDefaultSettings(IsolatedStorageSettings settings)
 {
     settings.Add("MidThreshold", 8000);
     settings.Add("LowThreshold", 9000);
     settings.Add("MidRate", 1024);
     settings.Add("LowRate", 256);
     settings.Add("PctDiscount", 75);
 }
开发者ID:alexmullans,项目名称:RHITBandwidth,代码行数:8,代码来源:App.xaml.cs

示例2: Password

 public Password()
 {
     InitializeComponent();
     appSettings = IsolatedStorageSettings.ApplicationSettings;
     if (!appSettings.Contains("pass")) {
         appSettings.Add("pass", "blue");
     }
     if (!appSettings.Contains("fake")) {
         appSettings.Add("fake", "red");
     }
     pass = (string)appSettings["pass"];
     fakePass = (string)appSettings["fake"];
 }
开发者ID:jaydeep17,项目名称:LetsPlay,代码行数:13,代码来源:Password.xaml.cs

示例3: StorageHandler

        public StorageHandler()
        {
            settings = IsolatedStorageSettings.ApplicationSettings;

            if (!settings.Contains(levelsKey))
            {
                settings.Add(levelsKey, new LevelsInfo());
            }

            if (!settings.Contains(challengesKey))
            {
                settings.Add(challengesKey, new ChallengesInfo());
            }
        }
开发者ID:JohanGl,项目名称:Moon,代码行数:14,代码来源:StorageHandler.cs

示例4: MainPage

 // Constructor
 public MainPage()
 {
     InitializeComponent();
     settings = IsolatedStorageSettings.ApplicationSettings;
     if (! settings.Contains("data")) {
         settings.Add("data", "");
     }
 }
开发者ID:wagnergsantos,项目名称:WritingPortableMobileApps,代码行数:9,代码来源:MainPage.xaml.cs

示例5: StorageSetting

 //constructor gets settings
 public StorageSetting()
 {
     settings = IsolatedStorageSettings.ApplicationSettings;
     if (!settings.Contains(RouteMode))
     {
         settings.Add(RouteMode, RouteModeDefault);
         settings.Save();
     }
 }
开发者ID:TabitaPL,项目名称:MobicaNavigationApplication,代码行数:10,代码来源:StorageSetting.cs

示例6: MainPage

        // Constructor
        public MainPage()
        {
            settings = IsolatedStorageSettings.ApplicationSettings;
           
            if (!settings.Contains("index"))
            {
                settings.Add("index", 0);
                settings.Add("primero", 0);
            }
            else
            {

               valorInicial = Convert.ToInt32(settings["index"]);
                
            }
            InitializeComponent();
            this.Loaded += MainPage_Loaded;
        }
开发者ID:jacevedo,项目名称:Windows-Phone,代码行数:19,代码来源:MainPage.xaml.cs

示例7: FotoTomada_Loaded

 void FotoTomada_Loaded(object sender, RoutedEventArgs e)
 {
     ReadFromIsolatedStorage("FotoSacada");
     settings = IsolatedStorageSettings.ApplicationSettings;
     if (!settings.Contains("mostrarPopUp"))
     {
         settings.Add("mostrarPopUp","True");
     }
  
 }
开发者ID:jacevedo,项目名称:Windows-Phone,代码行数:10,代码来源:FotoTomada.xaml.cs

示例8: MainPage

 // Constructor
 public MainPage()
 {
     InitializeComponent();
     settings = IsolatedStorageSettings.ApplicationSettings;
     if (! settings.Contains("memory")) {
         settings.Add("memory", "");
     }
     if (!settings.Contains("haptic")) {
         settings.Add("haptic", is_haptic);
     }
     is_haptic = settings["haptic"].ToString();
     b_haptic = (ApplicationBarIconButton)ApplicationBar.Buttons[0];
     b_nohaptic = (ApplicationBarIconButton)ApplicationBar.Buttons[1];
     b_point = (ApplicationBarIconButton)ApplicationBar.Buttons[2];
     b_comma = (ApplicationBarIconButton)ApplicationBar.Buttons[3];
     b_haptic.IsEnabled = is_haptic == "0";
     b_nohaptic.IsEnabled = is_haptic != "0";
     // decimal point or comma is hidden during a callback in do_load()
 }
开发者ID:eliobotogoske,项目名称:Touch12iWin,代码行数:20,代码来源:MainPage.xaml.cs

示例9: LoadSettings

        private void LoadSettings()
        {
            _isolatedStorageSettings = IsolatedStorageSettings.ApplicationSettings;

            if (_isolatedStorageSettings.Contains(_merchantServerUrlKey))
            {
                MerchantServerUrl.Text = (string)_isolatedStorageSettings[_merchantServerUrlKey];
            }
            else _isolatedStorageSettings.Add(_merchantServerUrlKey, "");
        }
开发者ID:braintree,项目名称:braintree_windows_phone_encryption_examples,代码行数:10,代码来源:Settings.xaml.cs

示例10: MainPage

 // Constructor
 public MainPage()
 {
     InitializeComponent();
     //Thread.Sleep(2000);
     settings = IsolatedStorageSettings.ApplicationSettings;
     colocarAudiosSiNoExisten();
     if (!settings.Contains("mostrarMensajeMusica"))
     {
         //MessageBox.Show("hola");
         settings.Add("mostrarMensajeMusica", "false");
     }
    
 }
开发者ID:jacevedo,项目名称:Windows-Phone,代码行数:14,代码来源:MainPage.xaml.cs

示例11: Write

 public bool Write(string key, string val)
 {
     try
     {
         settings = IsolatedStorageSettings.ApplicationSettings;
         settings.Add(key, val);
         return true;
     }
     catch(ArgumentException ex)
     {
         return false;
     }
 }
开发者ID:NatuLearn,项目名称:NumbersGame,代码行数:13,代码来源:SettingsService.cs

示例12: SaveCity

        private void SaveCity(string city)
        {
            m_appSettings = IsolatedStorageSettings.ApplicationSettings;
            if (m_appSettings.Contains("city"))
            {
                m_appSettings["city"] = city;
            }
            else
            {
                m_appSettings.Add("city", city);
            }
            m_appSettings.Save();

            WebService.City = city;
        }
开发者ID:zongjingyao,项目名称:WP8-OnlineBus,代码行数:15,代码来源:CitysPage.xaml.cs

示例13: MainPage

        // Constructor
        public MainPage()
        {
            InitializeComponent();
            settings = IsolatedStorageSettings.ApplicationSettings;
            ready = false;

            DateTime now = DateTime.Now;

            Debugger.Log(0, "Debug", "NextCirc Version " + NextCirc.Images.About.appVersion.ToString("N1") + "\nCurrent Time: " + now.ToShortDateString() + " " + now.ToShortTimeString() + "\n\n");

            // Load saved stop
            if (settings.Contains(curStopKey))
            {
                currentStop = Convert.ToInt32(settings[curStopKey]);
                Debugger.Log(0, "Debug", "found setting = " + currentStop + "\n");
            }
            else
            {
                settings.Add(curStopKey, currentStop);
                Debugger.Log(0, "Debug", "no setting\n");
            }

            // Build list of stops
            stopList = new List<CircStop>();
            // TODO: stopList.Add(new CircStop("NextCirc", new GeoCoordinate(0, 0), 0));
            stopList.Add(new CircStop("south forty", new GeoCoordinate(38.645327, -90.312952), 0));
            stopList.Add(new CircStop("mallinckrodt (to skinker)", new GeoCoordinate(38.647021, -90.309522), 3));
            stopList.Add(new CircStop("skinker", new GeoCoordinate(38.647654, -90.30133), 6));
            stopList.Add(new CircStop("millbrook", new GeoCoordinate(38.650172, -90.311331), 10));
            stopList.Add(new CircStop("brookings", new GeoCoordinate(38.647923, -90.304025), 14));
            stopList.Add(new CircStop("mallinckrodt (to south forty)", new GeoCoordinate(38.647021, -90.309522), 17));
            this.stopPicker.ItemsSource = stopList;

            this.stopPicker.SelectedIndex = currentStop;
            ready = true;
            Debugger.Log(0, "Debug", "initialized.\n");

            chooseStop(currentStop);

            // Register timer to keep View up to date
            DispatcherTimer timer = new DispatcherTimer();
            timer.Tick += timer_Tick;
            timer.Interval = new TimeSpan(0, 0, 1);
            timer.Start();

            // Sample code to localize the ApplicationBar
            //BuildLocalizedApplicationBar();
        }
开发者ID:jeffstephens,项目名称:nextcirc,代码行数:49,代码来源:MainPage.xaml.cs

示例14: TrySetIndividualSetting

 private void TrySetIndividualSetting(IsolatedStorageSettings settings, Setting settingNameEnum, string settingValue)
 {
     var settingName = settingNameEnum.ToString();
     if (settings.Contains(settingName))
     {
         settings[settingName] = settingValue;
     }
     else
     {
         settings.Add(settingName, settingValue);
     }
 }
开发者ID:BrianLima,项目名称:Blogger,代码行数:12,代码来源:Communicator.cs

示例15: loadSettings

        private void loadSettings()
        {

            settings = IsolatedStorageSettings.ApplicationSettings;
            if (!settings.Contains("cm"))
            {

                cm = true;
                settings.Add("cm", "1");
                settings.Save();

            }
            else
            {


                string cmSetting = IsolatedStorageSettings.ApplicationSettings["cm"] as string;
              
                if (cmSetting.Contains("1"))
                {
                    cm = true;
                }
                else
                {
                    cm = false;

                }

            }

            if (settings.Contains("login"))
            {
                btnLogout.IsEnabled = true;
            }

        }
开发者ID:nicholasvdb,项目名称:Bivolino_WP8,代码行数:36,代码来源:MainPage.xaml.cs


注:本文中的System.IO.IsolatedStorage.IsolatedStorageSettings.Add方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。