當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。