Skip to content

Instantly share code, notes, and snippets.

@pcamp96
Created August 26, 2013 02:20
Show Gist options
  • Select an option

  • Save pcamp96/6337608 to your computer and use it in GitHub Desktop.

Select an option

Save pcamp96/6337608 to your computer and use it in GitHub Desktop.
IsolatedStorageSettings settings = IsolatedStorageSettings.ApplicationSettings;
public About()
{
InitializeComponent();
InitializeSettings();
}
private void InitializeSettings()
{
if (settings.Contains("dynamicOn"))
{
DynamicCheck.IsChecked = (bool)settings["dynamicOn"];
}
else settings.Add("dynamicOn", true);
settings.Save();
}
private void DynamicCheck_Unchecked(object sender, RoutedEventArgs e)
{
settings["dynamicOn"] = false;
settings.Save();
}
private void DynamicCheck_Checked_1(object sender, RoutedEventHandler e)
{
settings["dynamicOn"] = true;
MessageBox.Show("The background agent has now started. Your wallpaper should update every 2 minutes or so.");
settings.Save();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment