protected override void Dispose(bool disposing) { Microsoft.Win32.SystemEvents.DisplaySettingsChanged -= SystemEvents_DisplaySettingsChanged; PluginManager.Instance.Dispose(); TasktrayIcon.HideNotifyIcon(); System.Threading.Thread.Sleep(500); base.Dispose(disposing); }
public void OnLanguageChanged() { Settings.Culture = Language.Id; DefaultLocalizer.SwitchLanguage(Language); LocalizeKeybindsText(); UIAssistantAPI.Instance.PluginManager.Localize(); TasktrayIcon.HideNotifyIcon(); TasktrayIcon.ShowNotifyIcon(); }
private void HandleUnhandledException(Exception ex) { try { PluginManager.Instance.Dispose(); TasktrayIcon.HideNotifyIcon(); } catch { } try { ShowMessage(ex); Log.Fatal(ex); } catch { } Environment.Exit(1); }