1
Fork 0
This commit is contained in:
Jake Howard 2014-11-06 11:22:17 +00:00
commit 6035a82142
3 changed files with 12 additions and 5 deletions

View file

@ -151,6 +151,8 @@ namespace Saviour_Backup_System
switch (e.CloseReason) switch (e.CloseReason)
{ {
case(CloseReason.ApplicationExitCall): case(CloseReason.ApplicationExitCall):
formatDriveCapacityTimer.Stop();
driveRefreshTimer.Stop();
this.Close(); this.Close();
break; break;
case(CloseReason.UserClosing): case(CloseReason.UserClosing):

View file

@ -14,20 +14,21 @@ namespace Saviour_Backup_System
internal notificationIcon() internal notificationIcon()
{ {
notifyIcon.Text = "Saviour Backup System"; notifyIcon.Text = "Saviour Backup System";
notifyIcon.Icon = Properties.Resources.redCDIconICO; notifyIcon.Icon = Properties.Resources.redCDIconICO;
populateList(); populateList();
notifyIcon.ContextMenu = contextMenu; notifyIcon.ContextMenu = contextMenu;
notifyIcon.Visible = true; //finally displays the tray icon notifyIcon.Visible = true; //finally displays the tray icon
} }
private void populateList() private void populateList()
{ {
contextMenu.MenuItems.Add("Show Interface", displayWindow); 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() { internal void displayStillRunning() {
notifyIcon.BalloonTipText = "Saviour backup system is still running in the background"; notifyIcon.BalloonTipText = "Saviour backup system is still running in the background";
notifyIcon.BalloonTipTitle = "Still running..."; notifyIcon.BalloonTipTitle = "Still running...";

View file

@ -66,9 +66,13 @@ namespace Saviour_Backup_System
internal static void closeProgram() internal static void closeProgram()
{
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(); Application.Exit();
}
} }
} }
} }