// This region cleanly handles the shutdown of the application (Disposing notifyicon for example) static bool ConsoleEventCallback(int eventType) { if (eventType == 2) { leagueEnhancer.Shutdown(); } return(false); }
protected override void OnExit(ExitEventArgs e) { base.OnExit(e); LeagueEnhancer.Shutdown(); }