added dialog for program closing
This commit is contained in:
parent
6123e2d1a7
commit
61202f5bcf
1 changed files with 6 additions and 2 deletions
|
@ -67,8 +67,12 @@ namespace Saviour_Backup_System
|
||||||
|
|
||||||
internal static void closeProgram()
|
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();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Reference in a new issue