Example #1
0
        public ShutdownTimerPicker(PersistentSettings.Settings settings)
        {
            ShutdownTimerSeconds = settings.ShutdownTimerSeconds;
            Action = settings.ShutdownTimerAction;
            InitializeComponent();
            Enabled.IsChecked               = ShutdownTimerSeconds.HasValue;
            SecondsToShutdownText.Text      = ShutdownTimerSeconds.HasValue ? ShutdownTimerSeconds.Value.ToString() : "";
            SecondsToShutdownText.IsEnabled = ShutdownTimerSeconds.HasValue;
            switch (Action)
            {
            case ShutdownTimerAction.Quit:
                TimerQuit.IsChecked = true;
                break;

            case ShutdownTimerAction.LaunchAndQuit:
                TimerLaunch.IsChecked = true;
                break;

            default:
                break;
            }
        }
Example #2
0
 private void TimerLaunch_Checked(object sender, RoutedEventArgs e)
 {
     Action = ShutdownTimerAction.LaunchAndQuit;
 }
Example #3
0
 private void TimerQuit_Checked(object sender, RoutedEventArgs e)
 {
     Action = ShutdownTimerAction.Quit;
 }