/// <summary> /// GetLeagueList button event handler /// </summary> private void Button_Run_Click(object sender, RoutedEventArgs e) { if (Button_Run.Content.ToString() == "Run") { Button_Run.Content = "Pause"; _config.FlagRun = true; Log("Service started"); MouseHook.Start(); } else { Button_Run.Content = "Run"; _config.FlagRun = false; Log("Service paused"); } }
//----------------------------------------------------------------------------------------------------------- // WPF Event handlers //----------------------------------------------------------------------------------------------------------- /// <summary> /// Unhooks hooks on program exit /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void Window_Closing(object sender, System.ComponentModel.CancelEventArgs e) { MouseHook.Stop(); Application.Current.Shutdown(); }