FAQ | This is a LIVE service | Changelog

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

Disable "Actions" menu when a command is sent (and re-enable when we get a reply back)

parent 425053b3
No related branches found
No related tags found
No related merge requests found
......@@ -87,11 +87,13 @@ namespace WpkgNotifier
void RequestSync(object sender, EventArgs e)
{
notifyIcon.ContextMenu.MenuItems[0].Enabled = false;
messageChannel.HandleMessage(WpkgMessageRequestType.DO_SYNC);
}
void RequestQuery(object sender, EventArgs e)
{
notifyIcon.ContextMenu.MenuItems[0].Enabled = false;
messageChannel.HandleMessage(WpkgMessageRequestType.RUN_QUERY);
}
......@@ -119,16 +121,20 @@ namespace WpkgNotifier
switch (status)
{
case WpkgMessageState.IDLE:
notifyIcon.ContextMenu.MenuItems[0].Enabled = true;
notifyIcon.Icon = WpkgNotifier.Properties.Resources.wpkgIcon;
break;
case WpkgMessageState.SUCCESS:
notifyIcon.ContextMenu.MenuItems[0].Enabled = true;
notifyIcon.Icon = WpkgNotifier.Properties.Resources.green;
break;
case WpkgMessageState.ERROR:
notifyIcon.ContextMenu.MenuItems[0].Enabled = true;
notifyIcon.Icon = WpkgNotifier.Properties.Resources.red;
break;
case WpkgMessageState.SYNCING:
case WpkgMessageState.QUERYING:
notifyIcon.ContextMenu.MenuItems[0].Enabled = true;
notifyIcon.Icon = WpkgNotifier.Properties.Resources.blue;
break;
}
......
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