Example #1
0
        private static void FinalizeShutdown()
        {
            HistoryManager.FlushBuffer();
            Conf.IsFirstRun = false;

            if (Conf.DiscardPlayerName == true)
            {
                Conf.LobbyPlayerName = "";
            }
            if (Conf.DiscardPassword == true)
            {
                Conf.LobbyPlayerPassword = "";
            }

            SaveConfig();
            try
            {
                if (!Debugger.IsAttached)
                {
                    mutex.ReleaseMutex();
                }
            }
            catch { }
            try
            {
                if (ToolTip != null)
                {
                    ToolTip.Dispose();
                }
                if (Downloader != null)
                {
                    Downloader.Dispose();
                }
                if (SpringScanner != null)
                {
                    SpringScanner.Dispose();
                }
                if (SteamHandler != null)
                {
                    SteamHandler.Dispose();
                }
            }
            catch { }
        }