private void MetroWindow_Loaded(object sender, RoutedEventArgs e) { // Stopwatch Timing timer.Start(); timer.Interval = 250; timer.Elapsed += TimerTick; // Loads Start Web Page and Version + Activation Status Browser.Source = new Uri(Settings.Default.AllRPM); Version.Content = "V" + Settings.Default.CurrentVersion; if (Settings.Default.Activated == false) { ActivatedTag.Content = "Not Activated"; ActivatedTag.Foreground = new SolidColorBrush(Red); Filter.IsEnabled = false; Browser.IsEnabled = false; Browser.Visibility = 0; SettingsButton.Content = "Activate"; SettingsButton.Click += new RoutedEventHandler(SettingsButton_NotActivated); // Show Dialog on Launch ProductActivation frm = new ProductActivation(); frm.ShowDialog(); } else if (Settings.Default.Activated == true) { ActivatedTag.Content = "Activated"; ActivatedTag.Foreground = new SolidColorBrush(Green); Filter.IsEnabled = true; Browser.IsEnabled = true; SettingsButton.Content = "Settings"; SettingsButton.Click += new RoutedEventHandler(SettingsButton_Activated); /*if (Settings.Default.FontInstalled != true) * { * MessageBoxResult msgresult = MessageBox.Show(Properties.Resources.MSG_FontInstall_Body, Properties.Resources.MSG_FontInstall_Caption, MessageBoxButton.YesNo, MessageBoxImage.Exclamation); * * if (msgresult == MessageBoxResult.Yes) * { * InstallFont(); * Settings.Default.FontInstalled = true; * Settings.Default.Save(); * } * else if (msgresult == MessageBoxResult.No) * { * // Do Nothing But Will Ask on Next Launch * } * } * else * { * // Do Nothing * }*/ } // Loads Key Amount Keys = String.Format("{0:00}", KeyAmount); KeysObtained.Content = "Keys: " + Keys; KeysObtained.Foreground = new SolidColorBrush(Green); // Loads Themes & Filters Theme.ItemsSource = new List <string> { "Red", "Green", "Blue", "Purple", "Orange", "Lime", "Emerald", "Teal", "Cyan", "Cobalt", "Indigo", "Violet", "Pink", "Magenta", "Crimson", "Amber", "Yellow", "Brown", "Olive", "Steel", "Mauve", "Taupe", "Sienna" }; Filter.ItemsSource = new List <string> { "LowRPM", "MediumRPM", "HighRPM", "AllRPM" }; //=============THEME & FILTER STARTUP & DEFAULTS CONFIGURATION=============\\ Theme.SelectedValue = Settings.Default.DefaultTheme; Filter.SelectedValue = Settings.Default.DefaultFilter; ThemeManager.ChangeAppStyle(Application.Current, ThemeManager.GetAccent(Settings.Default.DefaultTheme), ThemeManager.GetAppTheme(Settings.Default.Scheme)); }
private void SettingsButton_NotActivated(object sender, RoutedEventArgs e) { ProductActivation frm = new ProductActivation(); frm.ShowDialog(); }