From c84e2381e3278ba355a329af0fd578cf9dfcaae9 Mon Sep 17 00:00:00 2001 From: Jake Howard Date: Tue, 4 Nov 2014 17:26:59 +0000 Subject: [PATCH] moved context menu code and made setup function, also added 'still running' balloontip --- Saviour Backup System/notificationIcon.cs | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/Saviour Backup System/notificationIcon.cs b/Saviour Backup System/notificationIcon.cs index 2196084..23e4dab 100644 --- a/Saviour Backup System/notificationIcon.cs +++ b/Saviour Backup System/notificationIcon.cs @@ -10,19 +10,29 @@ namespace Saviour_Backup_System class notificationIcon { internal NotifyIcon notifyIcon = new NotifyIcon() ; - internal static ContextMenu contextMenu = new ContextMenu(); + internal ContextMenu contextMenu = new ContextMenu(); internal notificationIcon() { - contextMenu.MenuItems.Add("Show Interface", displayWindow); - + 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); - private static void displayWindow(object sender, EventArgs e) { setup.MW.Show(); } + } + private void displayWindow(object sender, EventArgs e) { setup.MW.showDisplay(); } + + internal void displayStillRunning() { + notifyIcon.BalloonTipText = "Saviour backup system is still running in the background"; + notifyIcon.BalloonTipTitle = "Still running..."; + notifyIcon.ShowBalloonTip(2000); + + } } }