GUI/SystemTray.cs
changeset 156 3e2ab626531c
parent 133 9ad699538c89
child 165 813d8bc3192f
     1.1 --- a/GUI/SystemTray.cs	Sat Jul 17 13:25:42 2010 +0000
     1.2 +++ b/GUI/SystemTray.cs	Sun Jul 18 12:38:01 2010 +0000
     1.3 @@ -57,19 +57,19 @@
     1.4  
     1.5        this.mainIcon = new NotifyIcon();
     1.6  
     1.7 -      ContextMenuStrip contextMenuStrip = new ContextMenuStrip();
     1.8 -      ToolStripMenuItem hideShowItem = new ToolStripMenuItem("Hide/Show");
     1.9 +      ContextMenu contextMenu = new ContextMenu();
    1.10 +      MenuItem hideShowItem = new MenuItem("Hide/Show");
    1.11        hideShowItem.Click += delegate(object obj, EventArgs args) {
    1.12          SendHideShowCommand();
    1.13        };
    1.14 -      contextMenuStrip.Items.Add(hideShowItem);
    1.15 -      contextMenuStrip.Items.Add(new ToolStripSeparator());      
    1.16 -      ToolStripMenuItem exitItem = new ToolStripMenuItem("Exit");
    1.17 +      contextMenu.MenuItems.Add(hideShowItem);
    1.18 +      contextMenu.MenuItems.Add(new MenuItem("-"));      
    1.19 +      MenuItem exitItem = new MenuItem("Exit");
    1.20        exitItem.Click += delegate(object obj, EventArgs args) {
    1.21          SendExitCommand();
    1.22        };
    1.23 -      contextMenuStrip.Items.Add(exitItem);
    1.24 -      this.mainIcon.ContextMenuStrip = contextMenuStrip;
    1.25 +      contextMenu.MenuItems.Add(exitItem);
    1.26 +      this.mainIcon.ContextMenu = contextMenu;
    1.27        this.mainIcon.DoubleClick += delegate(object obj, EventArgs args) {
    1.28          SendHideShowCommand();
    1.29        };