Esempio n. 1
0
        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();
            }
        }
Esempio n. 2
0
        private void LanguageComboBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            string tag = (LanguageComboBox.SelectedItem as ComboBoxItem).Tag.ToString();

            SettingOperation.SetLanguage(tag);
            SettingOperation.SaveLanguage();
            MainWindow.ReloadMainWindow();
        }
Esempio n. 3
0
 private void AutoStartCheckBox_Unchecked(object sender, RoutedEventArgs e)
 {
     if (SettingOperation.SetAutoStart(false))
     {
         SettingOperation.SaveAutoStart();
     }
     else
     {
         AutoStartCheckBox.IsChecked = true;
     }
 }
Esempio n. 4
0
        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();
        }
Esempio n. 5
0
 private void DarkCheckBox_Clicked(object sender, RoutedEventArgs e)
 {
     SettingOperation.isDark = (bool)DarkCheckBox.IsChecked;
     SettingOperation.SetDark();
     SettingOperation.SaveDark();
 }
Esempio n. 6
0
 private void AlarmVolumeSlider_DragCompleted(object sender, System.Windows.Controls.Primitives.DragCompletedEventArgs e)
 => SettingOperation.SaveVolume();
Esempio n. 7
0
 private void SecondaryColorBtn_Click(object sender, RoutedEventArgs e)
 {
     SettingOperation.sc = ((SolidColorBrush)(sender as Button).Background).Color.ToString();
     SettingOperation.SetSecondaryColor();
     SettingOperation.SaveSecondaryColor();
 }