예제 #1
0
 private void MidButton_Click(object sender, RoutedEventArgs e)
 {
     if (MidTimer != null)
     {
         MidTimer.Stop();
     }
     MidTimer = new DispatcherTimer
     {
         Interval = TimeSpan.FromMilliseconds(100)
     };
     MidStartTime       = Environment.TickCount;
     MidTimer.Tick     += Midtimer_Tick;
     MidTimer.IsEnabled = true;
 }
예제 #2
0
        private void Midtimer_Tick(object sender, EventArgs e)
        {
            bool isReady = true;

            Mid.Content = TimerUtil.ChangeTimeContent(MidStartTime, GameStartTime, (bool)MidBoot.IsChecked, (bool)MidStar.IsChecked, out isReady);
            if (isReady)
            {
                if ((bool)chkVoice.IsChecked)
                {
                    voice.SpeakAsync("中路闪现好了");
                }
                MidTimer.Stop();
            }
            flowWindow.MidTime.Content = Mid.Content;
        }
예제 #3
0
 private void Window_Closed(object sender, EventArgs e)
 {
     try
     {
         flowWindow.Close();
         if (TopTimer != null)
         {
             TopTimer.Stop();
         }
         if (JugTimer != null)
         {
             JugTimer.Stop();
         }
         if (MidTimer != null)
         {
             MidTimer.Stop();
         }
         if (BotTimer != null)
         {
             BotTimer.Stop();
         }
         if (SupTimer != null)
         {
             SupTimer.Stop();
         }
         if (GameTimer != null)
         {
             GameTimer.Stop();
         }
         this.hook_Main.UnInstallHook();
     }
     catch (Exception e2)
     {
         MessageBox.Show(e2.Message, "error code:2");
     }
 }