當前位置: 首頁>>代碼示例>>C#>>正文


C# IsolatedStorageSettings.Contains方法代碼示例

本文整理匯總了C#中System.IO.IsolatedStorage.IsolatedStorageSettings.Contains方法的典型用法代碼示例。如果您正苦於以下問題:C# IsolatedStorageSettings.Contains方法的具體用法?C# IsolatedStorageSettings.Contains怎麽用?C# IsolatedStorageSettings.Contains使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在System.IO.IsolatedStorage.IsolatedStorageSettings的用法示例。


在下文中一共展示了IsolatedStorageSettings.Contains方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: Login

        public Login()
        {

            InitializeComponent();

            this.Loaded += new RoutedEventHandler(Login_Loaded);
            //加載所有公司、部門、崗位信息
            // organClient.GetCompanyActivedAsync("");
            //登錄控件禁用  在加載完組織架構後 再激活
            this.OK.IsEnabled = false;
            this.OK.Content = "加載中....";
            settings = IsolatedStorageSettings.ApplicationSettings;

            if (settings.Contains("SYS_PostInfo") && settings["SYS_PostInfo"] != null)
            {
                App.Current.Resources.Add("SYS_PostInfo", settings["SYS_PostInfo"]);
                App.Current.Resources.Add("SYS_CompanyInfo", settings["SYS_CompanyInfo"]);
                App.Current.Resources.Add("SYS_DepartmentInfo", settings["SYS_DepartmentInfo"]);
            }
            isDict = true;
            isHR = true;

            if (settings.Contains("UserName"))
            {
                UserName.Text = Convert.ToString(settings["UserName"]);
                paw.Password = Convert.ToString(settings["UserPWD"]);               
            }            
            RefreshBtn();
            
        }
開發者ID:JuRogn,項目名稱:OA,代碼行數:30,代碼來源:Login.xaml.cs

示例2: MainPage

        // Constructor
        public MainPage()
        {
            InitializeComponent();

            savedSettings = IsolatedStorageSettings.ApplicationSettings;

            if (savedSettings.Contains("callsign"))
            {
                callsign = (string)savedSettings["callsign"];
            }

            tbCallsign.Text = callsign + "_chase";

            if (savedSettings.Contains("interval"))
            {
                interval = Convert.ToUInt32(savedSettings["interval"]);
            }

            if (savedSettings.Contains("consent"))
            {
                consent = (bool)savedSettings["consent"];
            }

            if (!consent)
            {
                MessageBoxResult result = MessageBox.Show("This app accesses your phone's location. Is this okay?", "Location", MessageBoxButton.OKCancel);
                if (result == MessageBoxResult.OK)
                {
                    updateSetting("consent", true);
                    consent = true;
                }

            }
        }
開發者ID:danielsaul,項目名稱:habhub-chase-car-tracker-wp,代碼行數:35,代碼來源:MainPage.xaml.cs

示例3: MainPage

        public MainPage()
        {
            InitializeComponent();

            isoSettings = IsolatedStorageSettings.ApplicationSettings;

            basicJsonObjectConverter = new JsonConverter<BasicJsonObject>();
            // TODO Remove
            App.Settings.APP_ID = "cylinder-manager-e30";
            App.Settings.API_KEY = "d6c6b4b7aa0f4162a04f23ebd34c6d2e";
            App.Settings.ADMIN_KEY = "e4b4709e31924777a4521df5fbf57692";

            data = new BasicJsonObject();
            // use two-way binding to set BasicjsonObject's key/value pairs
            JsonObjectGrid.DataContext = data;

            if (isoSettings.Contains(SETTINGS_BUCKET_NAME))
                BucketName_Box.Text = isoSettings[SETTINGS_BUCKET_NAME] as string;
            if (isoSettings.Contains(SETTINGS_OBJECT_ID))
                ObjectId_Box.Text = isoSettings[SETTINGS_OBJECT_ID] as string;
            if (isoSettings.Contains(SETTINGS_CCID))
                CCID_Box.Text = isoSettings[SETTINGS_CCID] as string;
            if (isoSettings.Contains(SETTINGS_CLIENT_ID))
                ClientId_Box.Text = isoSettings[SETTINGS_CLIENT_ID] as string;
        }
開發者ID:ledlie,項目名稱:simperium-windows-phone-lib-driver,代碼行數:25,代碼來源:MainPage.xaml.cs

示例4: classicgamelevel

        public classicgamelevel()
        {
            InitializeComponent();
          

            var prog = new ProgressIndicator { Text = "Lord of The Math", IsVisible = true, IsIndeterminate = false, Value = 0 };
            SystemTray.SetProgressIndicator(this, prog);

           

            stroge = IsolatedStorageSettings.ApplicationSettings;

            if (!stroge.Contains("levelclassic"))
            {
                IsolatedStorageSettings.ApplicationSettings["levelclassic"] = "1";
                IsolatedStorageSettings.ApplicationSettings.Save();

            }
            //gameoverden gelince limitsizi açması için
            if (stroge.Contains("hangigrid"))
            {
                if (IsolatedStorageSettings.ApplicationSettings["hangigrid"] == "1")
                {
                    kırmızı.Visibility = Visibility.Visible;
                    yesil.Visibility = Visibility.Collapsed;
                    imgkırmızı.Opacity = 100;
                    imgyesil.Opacity = 0;
                }

            }
            levelresimleri();


        }
開發者ID:ugrkbt,項目名稱:GamesOfMath,代碼行數:34,代碼來源:classicgamelevel.xaml.cs

示例5: 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

示例6: 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

示例7: MainPage

        public MainPage()
        {
            InitializeComponent();
            map1.ZoomLevel = 18;
            settings = IsolatedStorageSettings.ApplicationSettings;
            if (settings.Contains("map"))
            {
                if ((int)settings["map"] == 0)
                {
                    map1.Mode = new AerialMode();
                }
            }
            else
            {
                map1.Mode = new RoadMode();
            }
            pin1.Location = map1.Center;
            map1.Children.Add(pin1);

            if (settings.Contains("name"))
            {
                if ((string)settings["name"] != "")
                    MessageBox.Show("Welcome back " + (string)settings["name"] + ". Get Ready.");
            }
            else
                MessageBox.Show("Welcome to Workout Assistant. U may consider to create/update your profile in settings->profile");

            if (settings.Contains("EnableLocation"))
            {
                if ((bool)settings["EnableLocation"] == false)
                {
                    MessageBoxResult m = MessageBox.Show("This App cannot work without Location service, Enable Location service?", "Problem Spotted!!", MessageBoxButton.OKCancel);
                    if (m == MessageBoxResult.OK)
                        settings["EnableLocation"] = true;
                    else
                    {
                        if (NavigationService.CanGoBack)
                        {
                            NavigationService.GoBack();
                        }
                    }

                }
            }
            else
                settings["EnableLocation"] = true;

            StartLocationService(GeoPositionAccuracy.High, true);
        }
開發者ID:pragyansen,項目名稱:workout-assistant,代碼行數:49,代碼來源:MainPage.xaml.cs

示例8: Login

        // Constructor
        public Login()
        {
            InitializeComponent();
            CreateAppbar();

            settings = IsolatedStorageSettings.ApplicationSettings;

            if (settings.Contains("username")) {
                Username.Text = settings["username"] as string;
            }

            if (settings.Contains("password")) {
                var passBytes = ProtectedData.Unprotect(settings["password"] as byte[], null);
                Password.Password = Encoding.UTF8.GetString(passBytes, 0, passBytes.Length);
            }
        }
開發者ID:allanfreitas,項目名稱:gtalkchat,代碼行數:17,代碼來源:Login.xaml.cs

示例9: About

        public About()
        {
            InitializeComponent();

            settings = IsolatedStorageSettings.ApplicationSettings;

            // Load initial settings
            if (settings.Contains("UseLocation"))
            {
                locationtoggle.IsChecked = settings["UseLocation"].ToString() == "true";
            }
            else
            {
                settings["UseLocation"] = "false";
                locationtoggle.IsChecked = false;
            }

            textBlock1.Text = "WHEWCIRC\nVersion "+ appversion +"\n\nCoded lovingly by\nJeff Stephens in St. Louis\[email protected]";
            textBlock1.Text += "\n\nFor support, please contact\[email protected]";
            textBlock1.Text += "\n\nThanks to Colin E. for his great article on\nanimation!";

            // Change logo if light theme
            Visibility isLight = (Visibility)Resources["PhoneLightThemeVisibility"]; // for light theme

            if (isLight == System.Windows.Visibility.Visible)
            {
                image1.Source = new BitmapImage(new Uri("/WhewCirc;component/icons/Marketplace_Device_173x173.png", UriKind.Relative));
            }
        }
開發者ID:jeffstephens,項目名稱:wp7_whewcirc,代碼行數:29,代碼來源:About.xaml.cs

示例10: AccountViewModel

 public AccountViewModel(Simperium.Settings _settings)
 {
     isoSettings = IsolatedStorageSettings.ApplicationSettings;
     settings = _settings;
     if (isoSettings.Contains(SETTINGS_APP_ID))
         settings.APP_ID = (isoSettings[SETTINGS_APP_ID] as string);
 }
開發者ID:ledlie,項目名稱:simperium-windows-phone-lib-driver,代碼行數:7,代碼來源:AccountViewModel.cs

示例11: DeleteSetting

 /// <summary>
 /// Private helper method for performing deletes on a setting
 /// </summary>
 /// <param name="store">The IsolatedStorageSettings store to use (either "site" or "application")</param>
 /// <param name="key">The key of the object to delete</param>
 private static void DeleteSetting(IsolatedStorageSettings store, string key)
 {
     if(store.Contains(key))
     {
         store.Remove(key);
         store.Save();
     }
 }
開發者ID:Aaronontheweb,項目名稱:isolatedstorage-extensions,代碼行數:13,代碼來源:IsolatedStorageHelper.Settings.cs

示例12: MainPage

 // Constructor
 public MainPage()
 {
     InitializeComponent();
     settings = IsolatedStorageSettings.ApplicationSettings;
     if (! settings.Contains("data")) {
         settings.Add("data", "");
     }
 }
開發者ID:wagnergsantos,項目名稱:WritingPortableMobileApps,代碼行數:9,代碼來源:MainPage.xaml.cs

示例13: LoadSettings

 private void LoadSettings()
 {
     _isolatedStorageSettings = IsolatedStorageSettings.ApplicationSettings;
     if (_isolatedStorageSettings.Contains(_merchantServerUrlKey))
     {
         _merchantServerUrl = (string)_isolatedStorageSettings[_merchantServerUrlKey];
     }
 }
開發者ID:braintree,項目名稱:braintree_windows_phone_encryption_examples,代碼行數:8,代碼來源:MainPage.xaml.cs

示例14: FavoriteData

        private FavoriteData()
        {
            storage = IsolatedStorageSettings.ApplicationSettings;

            if (storage.Contains("favorites"))
                data = (List<string>)storage["favorites"];
            else
                data = new List<string>();
        }
開發者ID:abcfantasy,項目名稱:Hack4Europe2012,代碼行數:9,代碼來源:FavoriteData.cs

示例15: MainPage

        public MainPage()
        {
            InitializeComponent();

            _isNew = true;
            _isolatedStorageSettings = IsolatedStorageSettings.ApplicationSettings;

            if (_isolatedStorageSettings.Contains(EMAIL_ADDRESS_KEY)) Address.Text = _isolatedStorageSettings[EMAIL_ADDRESS_KEY].ToString();
        }
開發者ID:bendetat,項目名稱:WP7_NoteToMe,代碼行數:9,代碼來源:MainPage.xaml.cs


注:本文中的System.IO.IsolatedStorage.IsolatedStorageSettings.Contains方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。