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