public ContextMenus(IStatusService statusChangerService, Action <bool> changeIconCallback = null) { _statusChangerService = statusChangerService; _changeIconCallback = changeIconCallback; _toolMenuItemFactory = new ToolMenuItemFactory(this); _statusChangerService.Enable(); }
private ContextMenuStrip CreateMenu() { var menu = new ContextMenuStrip(); var item = _toolMenuItemFactory.CreateEnableItem(); menu.Items.Add(item); item = _toolMenuItemFactory.CreateDisableItem(item); menu.Items.Add(item); var sep = new ToolStripSeparator(); menu.Items.Add(sep); item = ToolMenuItemFactory.CreateExitButton(item); menu.Items.Add(item); return(menu); }