示例#1
0
        public MainWindow()
        {
            InitializeComponent();
            updater.CheckNewVersion();

            //check if task already exists
            if (taskShedHandler.CheckExistingClass() != null)
            {
                autoRadio.IsChecked = true;
                darkStartBox.Text   = Convert.ToString(taskShedHandler.GetRunTime("dark"));
                lightStartBox.Text  = Convert.ToString(taskShedHandler.GetRunTime("light"));
                UiHandler();
            }
            else
            {
                //check which value the registry key has
                if (RegEditHandler.AppsUseLightTheme() == true)
                {
                    lightRadio.IsChecked = true;
                }
                else if (RegEditHandler.AppsUseLightTheme() == false)
                {
                    darkRadio.IsChecked = true;
                }
                UiHandler();
            }
        }
示例#2
0
 private void DoesTaskExists()
 {
     if (taskShedHandler.CheckExistingClass().Equals(1))
     {
         autoCheckBox.IsChecked = true;
         int[] darkStart  = taskShedHandler.GetRunTime("dark");
         int[] lightStart = taskShedHandler.GetRunTime("light");
         darkStartBox.Text         = Convert.ToString(darkStart[0]);
         DarkStartMinutesBox.Text  = Convert.ToString(darkStart[1]);
         lightStartBox.Text        = Convert.ToString(lightStart[0]);
         LightStartMinutesBox.Text = Convert.ToString(lightStart[1]);
     }
     else if (taskShedHandler.CheckExistingClass().Equals(2))
     {
         autoCheckBox.IsChecked     = true;
         locationCheckBox.IsChecked = true;
     }
     else
     {
         AutoCheckBox_Unchecked(this, null);
     }
 }