From 61202f5bcf3138b937cf96619f1463ee3618333a Mon Sep 17 00:00:00 2001 From: Jake Howard Date: Thu, 6 Nov 2014 10:22:28 +0000 Subject: [PATCH] added dialog for program closing --- Saviour Backup System/setup.cs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Saviour Backup System/setup.cs b/Saviour Backup System/setup.cs index 9a5cd9a..f2fe770 100644 --- a/Saviour Backup System/setup.cs +++ b/Saviour Backup System/setup.cs @@ -67,8 +67,12 @@ namespace Saviour_Backup_System internal static void closeProgram() { - Application.Exit(); - + string exitMessage = "Are you sure you want to close Saviour Backup System? \n All copying backups and backup scanning will cease."; + DialogResult result = MessageBox.Show(exitMessage, "Saviour Backup System Exiting...", MessageBoxButtons.YesNo, MessageBoxIcon.Warning); + if ( result == System.Windows.Forms.DialogResult.Yes) + { + Application.Exit(); + } } } }