本文整理汇总了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();
}
示例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;
}
}
}
示例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;
}
示例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();
}
示例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"];
}
示例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());
}
}
示例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);
}
示例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);
}
}
示例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));
}
}
示例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);
}
示例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();
}
}
示例12: MainPage
// Constructor
public MainPage()
{
InitializeComponent();
settings = IsolatedStorageSettings.ApplicationSettings;
if (! settings.Contains("data")) {
settings.Add("data", "");
}
}
示例13: LoadSettings
private void LoadSettings()
{
_isolatedStorageSettings = IsolatedStorageSettings.ApplicationSettings;
if (_isolatedStorageSettings.Contains(_merchantServerUrlKey))
{
_merchantServerUrl = (string)_isolatedStorageSettings[_merchantServerUrlKey];
}
}
示例14: FavoriteData
private FavoriteData()
{
storage = IsolatedStorageSettings.ApplicationSettings;
if (storage.Contains("favorites"))
data = (List<string>)storage["favorites"];
else
data = new List<string>();
}
示例15: MainPage
public MainPage()
{
InitializeComponent();
_isNew = true;
_isolatedStorageSettings = IsolatedStorageSettings.ApplicationSettings;
if (_isolatedStorageSettings.Contains(EMAIL_ADDRESS_KEY)) Address.Text = _isolatedStorageSettings[EMAIL_ADDRESS_KEY].ToString();
}