/// <summary> /// Called on Npp shutdown /// </summary> internal static void DoNppShutDown() { try { if (OnShutDown != null) { OnShutDown(); } // clean up timers ReccurentAction.CleanAll(); DelayedAction.CleanAll(); // export modified conf FileTag.Export(); // save config (should be done but just in case) CodeExplorer.UpdateMenuItemChecked(); FileExplorer.UpdateMenuItemChecked(); Config.Save(); // remember the most used keywords Keywords.SaveRanking(); // close every form AutoComplete.ForceClose(); InfoToolTip.ForceClose(); Appli.ForceClose(); FileExplorer.ForceClose(); CodeExplorer.ForceClose(); UserCommunication.ForceClose(); AppliMenu.ForceCloseMenu(); } catch (Exception e) { ErrorHandler.ShowErrors(e, "Stop"); } }
/// <summary> /// ASYNC - Call this method to start checking for updates every 2 hours, also check once immediatly /// </summary> public static void StartCheckingForUpdate() { // check for updates every now and then (2h) _checkEveryHourAction = new ReccurentAction(() => { // Check for new updates if (!Config.Instance.GlobalDontCheckUpdates) { CheckForUpdate(false); } }, 1000 * 60 * 120); }