Replaced all menus with the native implementations MainMenu and ContextMenu. Fixed a bug with the sensor renaming context menu.

This commit is contained in:
Michael Möller
2010-07-18 12:38:01 +00:00
parent 9c7e97672b
commit 660c4baac1
8 changed files with 378 additions and 357 deletions
+7 -7
View File
@@ -57,19 +57,19 @@ namespace OpenHardwareMonitor.GUI {
this.mainIcon = new NotifyIcon();
ContextMenuStrip contextMenuStrip = new ContextMenuStrip();
ToolStripMenuItem hideShowItem = new ToolStripMenuItem("Hide/Show");
ContextMenu contextMenu = new ContextMenu();
MenuItem hideShowItem = new MenuItem("Hide/Show");
hideShowItem.Click += delegate(object obj, EventArgs args) {
SendHideShowCommand();
};
contextMenuStrip.Items.Add(hideShowItem);
contextMenuStrip.Items.Add(new ToolStripSeparator());
ToolStripMenuItem exitItem = new ToolStripMenuItem("Exit");
contextMenu.MenuItems.Add(hideShowItem);
contextMenu.MenuItems.Add(new MenuItem("-"));
MenuItem exitItem = new MenuItem("Exit");
exitItem.Click += delegate(object obj, EventArgs args) {
SendExitCommand();
};
contextMenuStrip.Items.Add(exitItem);
this.mainIcon.ContextMenuStrip = contextMenuStrip;
contextMenu.MenuItems.Add(exitItem);
this.mainIcon.ContextMenu = contextMenu;
this.mainIcon.DoubleClick += delegate(object obj, EventArgs args) {
SendHideShowCommand();
};