Ejemplo n.º 1
0
 private void toolStripMenuItemCrash_Click(object sender, EventArgs e)
 {
     try
     {
         FileSaveResult result = App.MarkLastLogAs("crash");
         ShowNotification(result.Message);
         AppendActivityText(result.Message);
     }
     catch (FileNotFoundException ex)
     {
         MessageBox.Show(ex.Message, "Alert", MessageBoxButtons.OK, MessageBoxIcon.Warning);
     }
 }
Ejemplo n.º 2
0
        private void Process_Exited(object sender, EventArgs e)
        {
            isRunning = false;
            Debug.WriteLine("GameState.Process_Exited()");
            theForm.AppendActivityText("Game has exited.");
            theForm.UpdateGameStateLabel(isRunning);
            FileSaveResult result = App.AutosaveLog();

            if (result.Success)
            {
                theForm.AppendActivityText(string.Format("Autosaved \"{0}\"", result.Filename));
                if (Config.GetBool("notify_autosave"))
                {
                    theForm.ShowNotification(string.Format("Autosaved log as '{0}'", result.Filename));
                }
            }
            timer.Enabled = true;
        }