예제 #1
0
 private void LabelClosing_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
 {
     IsSuspend            = !IsSuspend;
     LabelClosing.Content = $"Suspend {IsSuspend}";
     if (IsSuspend)
     {
         LabelClosing.Foreground = Brushes.Green;
         timerTick.Start();
     }
     else
     {
         LabelClosing.Foreground = Brushes.White;
         timerTick.Stop();
     }
 }
예제 #2
0
        public void TimerSet(bool b)
        {
            switch (b)
            {
            case true:
                timerTick.Start();
                timerTick2.Start();
                Grid1.Visibility = Visibility.Visible;
                Grid2.Visibility = Visibility.Hidden;
                break;

            case false:

                timerTick.Stop();
                timerTick2.Stop();
                Grid1.Visibility = Visibility.Hidden;
                Grid2.Visibility = Visibility.Visible;
                break;

            default:
                break;
            }
        }