/*上单模板 结束*/ private void JugButton_Click(object sender, RoutedEventArgs e) { if (JugTimer != null) { JugTimer.Stop(); } JugTimer = new DispatcherTimer { Interval = TimeSpan.FromMilliseconds(100) }; JugTimer.Tick += Jugtimer_Tick; JugTimer.IsEnabled = true; JugStartTime = Environment.TickCount; }
private void Jugtimer_Tick(object sender, EventArgs e) { bool isReady = true; Jug.Content = TimerUtil.ChangeTimeContent(JugStartTime, GameStartTime, (bool)JugBoot.IsChecked, (bool)JugStar.IsChecked, out isReady); if (isReady) { if ((bool)chkVoice.IsChecked) { voice.SpeakAsync("打野闪现好了"); } JugTimer.Stop(); } flowWindow.JugTime.Content = Jug.Content; }
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"); } }