コード例 #1
0
ファイル: Program.cs プロジェクト: kazuyabr/SMAPI
 static void StardewForm_Closing(object sender, CancelEventArgs e)
 {
     e.Cancel = true;
     gamePtr.Exit();
     gamePtr.Dispose();
     StardewForm.Hide();
     ready = false;
 }
コード例 #2
0
ファイル: Program.cs プロジェクト: yeungchenhe/SMAPI
        private static void StardewForm_Closing(object sender, CancelEventArgs e)
        {
            e.Cancel = true;

            if (true || MessageBox.Show("Are you sure you would like to quit Stardew Valley?\nUnsaved progress will be lost!", "Confirm Exit", MessageBoxButtons.YesNo, MessageBoxIcon.Exclamation) == DialogResult.Yes)
            {
                gamePtr.Exit();
                gamePtr.Dispose();
                StardewForm.Hide();
                ready = false;
            }
        }