private void Application_Startup(object sender, StartupEventArgs e) { path = AppDomain.CurrentDomain.BaseDirectory; _ = new DatabaseOperation(); _ = new DdlOperation(); _ = new SettingOperation(); _ = new FlowWindowOperation(); RemoveIcon(); AddIcon(); this.DispatcherUnhandledException += new DispatcherUnhandledExceptionEventHandler(AppDispatcherUnhandledException); dt.Interval = new TimeSpan(0, 0, 1); dt.Start(); FlowWindowOperation.ShowAllFlowWindowEvent(sender, e); if (SettingOperation.firstTime) { OpenInfoPage(); } else { OpenDdlPage(); } }
private void LanguageComboBox_SelectionChanged(object sender, SelectionChangedEventArgs e) { string tag = (LanguageComboBox.SelectedItem as ComboBoxItem).Tag.ToString(); SettingOperation.SetLanguage(tag); SettingOperation.SaveLanguage(); MainWindow.ReloadMainWindow(); }
private void AutoStartCheckBox_Unchecked(object sender, RoutedEventArgs e) { if (SettingOperation.SetAutoStart(false)) { SettingOperation.SaveAutoStart(); } else { AutoStartCheckBox.IsChecked = true; } }
private void AlarmPathLocateBtn_Click(object sender, RoutedEventArgs e) { string file = ""; swf.OpenFileDialog ofd = new swf.OpenFileDialog(); if (ofd.ShowDialog() == swf.DialogResult.OK) { file = ofd.FileName; } if (file == "") { return; } AlarmPathTextBox.Text = file; SettingOperation.alarmPath = file; SettingOperation.SaveAlarmPath(); }
private void DarkCheckBox_Clicked(object sender, RoutedEventArgs e) { SettingOperation.isDark = (bool)DarkCheckBox.IsChecked; SettingOperation.SetDark(); SettingOperation.SaveDark(); }
private void AlarmVolumeSlider_DragCompleted(object sender, System.Windows.Controls.Primitives.DragCompletedEventArgs e) => SettingOperation.SaveVolume();
private void SecondaryColorBtn_Click(object sender, RoutedEventArgs e) { SettingOperation.sc = ((SolidColorBrush)(sender as Button).Background).Color.ToString(); SettingOperation.SetSecondaryColor(); SettingOperation.SaveSecondaryColor(); }