本文整理汇总了C#中System.IO.IsolatedStorage.IsolatedStorageSettings类的典型用法代码示例。如果您正苦于以下问题:C# IsolatedStorageSettings类的具体用法?C# IsolatedStorageSettings怎么用?C# IsolatedStorageSettings使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IsolatedStorageSettings类属于System.IO.IsolatedStorage命名空间,在下文中一共展示了IsolatedStorageSettings类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: MainPage
// Constructor
public MainPage()
{
InitializeComponent();
Loaded += MainPage_Loaded;
appSettings = IsolatedStorageSettings.ApplicationSettings;
}
示例2: 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;
}
示例3: 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();
}
示例4: PhotoProcess
// Constructor
public PhotoProcess()
{
InitializeComponent();
appSettings = IsolatedStorageSettings.ApplicationSettings;
Loaded += new System.Windows.RoutedEventHandler(MainPage_Loaded);
OrientationChanged += new EventHandler<OrientationChangedEventArgs>(MainPage_OrientationChanged);
}
示例5: Cache
static Cache()
{
_lckStandards = new object();
_appSettings = IsolatedStorageSettings
.ApplicationSettings;
_standards = new Dictionary<int, ImageSource>();
}
示例6: Test
public Test()
{
InitializeComponent();
m_storageSettings = IsolatedStorageSettings.ApplicationSettings;
LoadScheduleDetails();
this.BackKeyPress += new EventHandler<System.ComponentModel.CancelEventArgs>(Test_BackKeyPress);
}
示例7: App
/// <summary>
/// Constructor for the Application object.
/// </summary>
public App()
{
// Global handler for uncaught exceptions.
UnhandledException += Application_UnhandledException;
// Standard Silverlight initialization
InitializeComponent();
// Phone-specific initialization
InitializePhoneApplication();
appSettings = IsolatedStorageSettings.ApplicationSettings;
// Show graphics profiling information while debugging.
if (System.Diagnostics.Debugger.IsAttached)
{
// Display the current frame rate counters.
Application.Current.Host.Settings.EnableFrameRateCounter = true;
// Show the areas of the app that are being redrawn in each frame.
//Application.Current.Host.Settings.EnableRedrawRegions = true;
// Enable non-production analysis visualization mode,
// which shows areas of a page that are handed off to GPU with a colored overlay.
//Application.Current.Host.Settings.EnableCacheVisualization = true;
// Disable the application idle detection by setting the UserIdleDetectionMode property of the
// application's PhoneApplicationService object to Disabled.
// Caution:- Use this under debug mode only. Application that disables user idle detection will continue to run
// and consume battery power when the user is not using the phone.
PhoneApplicationService.Current.UserIdleDetectionMode = IdleDetectionMode.Disabled;
}
}
示例8: 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);
}
示例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: NotificationHub
/// <summary>
/// Initializes a new instance of the NotificationHub class.
/// </summary>
/// <param name="notificationHubPath"></param>
/// <param name="connectionString"></param>
public NotificationHub(string notificationHubPath, string connectionString)
{
setNotificationHubPath(notificationHubPath);
setConnectionString(connectionString);
isolatedStorageSettings = IsolatedStorageSettings.ApplicationSettings;
}
示例11: CheckICollectionKeyPairValue
void CheckICollectionKeyPairValue (IsolatedStorageSettings settings)
{
ICollection<KeyValuePair<string, object>> c = (settings as ICollection<KeyValuePair<string, object>>);
Assert.AreEqual (0, c.Count, "Count");
Assert.IsFalse (c.IsReadOnly, "IsReadOnly");
Assert.IsNotNull (c.GetEnumerator (), "GetEnumerator");
KeyValuePair<string,object> kvp = new KeyValuePair<string,object> ("key", "value");
c.Add (kvp);
Assert.AreEqual (1, c.Count, "Add/Count");
Assert.Throws (delegate { c.Add (new KeyValuePair<string, object> (null, "value")); }, typeof (ArgumentNullException), "Add(KVP(null))");
Assert.Throws (delegate { c.Add (new KeyValuePair<string, object> ("key", "value")); }, typeof (ArgumentException), "Add(twice)");
Assert.IsTrue (c.Contains (kvp), "Contains(kvp)");
Assert.IsTrue (c.Contains (new KeyValuePair<string, object> ("key", "value")), "Contains(new)");
Assert.IsFalse (c.Contains (new KeyValuePair<string, object> ("value", "key")), "Contains(bad)");
c.Remove (kvp);
Assert.IsFalse (c.Contains (kvp), "Remove/Contains(kvp)");
Assert.AreEqual (0, c.Count, "Remove/Count");
c.Add (kvp);
c.Clear ();
Assert.AreEqual (0, c.Count, "Clear/Count");
}
示例12: 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();
}
示例13: 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;
}
}
}
示例14: 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();
}
}
示例15: FacebookWrite
public FacebookWrite()
{
settings = IsolatedStorageSettings.ApplicationSettings;
emptystr = "What's on your mind?";
imgstream = null;
Loaded += new RoutedEventHandler(MainPage_Loaded);
InitializeComponent();
}