From 33aadeb6fbe475233798cba954c79636c96f15ab Mon Sep 17 00:00:00 2001 From: Jake Howard Date: Thu, 6 Nov 2014 10:20:59 +0000 Subject: [PATCH 1/3] added tier stops when form closes. Won't make much difference performance wise, but it's a start --- Saviour Backup System/mainWindow.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Saviour Backup System/mainWindow.cs b/Saviour Backup System/mainWindow.cs index 2ec5051..4c4d668 100644 --- a/Saviour Backup System/mainWindow.cs +++ b/Saviour Backup System/mainWindow.cs @@ -151,6 +151,8 @@ namespace Saviour_Backup_System switch (e.CloseReason) { case(CloseReason.ApplicationExitCall): + formatDriveCapacityTimer.Stop(); + driveRefreshTimer.Stop(); this.Close(); break; case(CloseReason.UserClosing): From 6123e2d1a787e1589bda612e673423bebdb14a93 Mon Sep 17 00:00:00 2001 From: Jake Howard Date: Thu, 6 Nov 2014 10:22:13 +0000 Subject: [PATCH 2/3] Removed blank lines, and added another menu item --- Saviour Backup System/notificationIcon.cs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Saviour Backup System/notificationIcon.cs b/Saviour Backup System/notificationIcon.cs index 23e4dab..671c505 100644 --- a/Saviour Backup System/notificationIcon.cs +++ b/Saviour Backup System/notificationIcon.cs @@ -14,20 +14,21 @@ namespace Saviour_Backup_System internal notificationIcon() { - notifyIcon.Text = "Saviour Backup System"; notifyIcon.Icon = Properties.Resources.redCDIconICO; populateList(); notifyIcon.ContextMenu = contextMenu; notifyIcon.Visible = true; //finally displays the tray icon } + private void populateList() { contextMenu.MenuItems.Add("Show Interface", displayWindow); - + contextMenu.MenuItems.Add("Copy Progress", showProgress); } - private void displayWindow(object sender, EventArgs e) { setup.MW.showDisplay(); } + private void displayWindow(object sender, EventArgs e) { setup.MW.showDisplay(); } + private void showProgress(object sender, EventArgs e) { return; } internal void displayStillRunning() { notifyIcon.BalloonTipText = "Saviour backup system is still running in the background"; notifyIcon.BalloonTipTitle = "Still running..."; From 61202f5bcf3138b937cf96619f1463ee3618333a Mon Sep 17 00:00:00 2001 From: Jake Howard Date: Thu, 6 Nov 2014 10:22:28 +0000 Subject: [PATCH 3/3] 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(); + } } } }