FAQ | This is a LIVE service | Changelog

Skip to content
Snippets Groups Projects
Commit 9e9e8a52 authored by Dr Adam Thorn's avatar Dr Adam Thorn
Browse files

Add menu item to manage software

parent 188d8ec8
No related branches found
No related tags found
No related merge requests found
......@@ -40,13 +40,14 @@ namespace WpkgNotifier
actionsMenu.MenuItems.Add(syncMenuItem);
actionsMenu.MenuItems.Add(queryMenuItem);
MenuItem manageSoftwarePage = new MenuItem("Manage software", new EventHandler(ManageSoftware));
MenuItem exitMenuItem = new MenuItem("Exit", new EventHandler(Exit));
notifyIcon = new NotifyIcon();
notifyIcon.Text = "WPKG notifier";
notifyIcon.Icon = WpkgNotifier.Properties.Resources.wpkgIcon;
notifyIcon.ContextMenu = new ContextMenu(new MenuItem[]
{ actionsMenu, exitMenuItem });
{ actionsMenu, manageSoftwarePage, exitMenuItem });
notifyIcon.Visible = true;
// reflectively call our ShowContextMenu method upon left-click
......@@ -97,6 +98,11 @@ namespace WpkgNotifier
messageChannel.HandleMessage(WpkgMessageRequestType.RUN_QUERY);
}
void ManageSoftware(object sender, EventArgs e)
{
System.Diagnostics.Process.Start("https://apps.ch.cam.ac.uk/wpkg");
}
void Exit(object sender, EventArgs e)
{
// We must manually tidy up and remove the icon before we exit.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment