当前位置: 首页>>代码示例>>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;未经允许,请勿转载。