public void onExiting(object sender, EventArgs args)
        {
            //Close world
            if (IsGameWorldloaded)
            {
                World.End();
            }

            ThreadManager.KillAllThreads();

            //Save the snooping data
            Snooper.Save();

            //Save the settings
            GameSettings.Save(Path.Combine(gameDirectory, "options.txt"));
#if DEBUG
            GameSettings.SaveDebug(Path.Combine(gameDirectory, "options.debug"));
#endif

            //Dispose of the discord hooks properly
            DiscordManager.ShutDown();

            //Save the logger
            Logger.Save();
        }
示例#2
0
 private void discordRPCBtn_OnChange(object sender, EventArgs e)
 {
     if (discordRPCBtn.Checked)
     {
         DiscordHandler.ShutDown();
     }
     else
     {
         DiscordHandler.SettingsStart();
     }
 }
示例#3
0
 private void exitBtn_Click(object sender, EventArgs e)
 {
     Hide();
     DiscordHandler.ShutDown();
     Close();
 }