public RDMPSingleControlTabMenu(IActivateItems activator, RDMPSingleControlTab tab, WindowManager windowManager) { _tab = tab; Items.Add("Close Tab", null, (s, e) => tab.Close()); Items.Add("Close All Tabs", null, (s, e) => windowManager.CloseAllWindows(tab)); Items.Add("Close All But This", null, (s, e) => windowManager.CloseAllButThis(tab)); Items.Add("Show", null, (s, e) => tab.HandleUserRequestingEmphasis(activator)); if (tab is PersistableSingleDatabaseObjectDockContent single) { var uiFactory = new AtomicCommandUIFactory(activator); var builder = new GoToCommandFactory(activator); var gotoMenu = new ToolStripMenuItem(AtomicCommandFactory.GoTo) { Enabled = false }; Items.Add(gotoMenu); foreach (var cmd in builder.GetCommands(single.DatabaseObject)) { gotoMenu.DropDownItems.Add(uiFactory.CreateMenuItem(cmd)); gotoMenu.Enabled = true; } RDMPContextMenuStrip.RegisterFetchGoToObjecstCallback(gotoMenu); } Items.Add("Refresh", FamFamFamIcons.arrow_refresh, (s, e) => _tab.HandleUserRequestingTabRefresh(activator)); var help = new ToolStripMenuItem("Help", FamFamFamIcons.help, (s, e) => _tab.ShowHelp(activator)); help.ShortcutKeys = Keys.F1; Items.Add(help); }
public RDMPSingleControlTabMenu(IActivateItems activator, RDMPSingleControlTab tab, WindowManager windowManager) { _tab = tab; Items.Add("Close Tab", null, (s, e) => tab.Close()); Items.Add("Close All Tabs", null, (s, e) => windowManager.CloseAllWindows(tab)); Items.Add("Close All But This", null, (s, e) => windowManager.CloseAllButThis(tab)); Items.Add("Show", null, (s, e) => tab.HandleUserRequestingEmphasis(activator)); Items.Add("Refresh", FamFamFamIcons.arrow_refresh, (s, e) => _tab.HandleUserRequestingTabRefresh(activator)); var help = new ToolStripMenuItem("Help", FamFamFamIcons.help, (s, e) => _tab.ShowHelp(activator)); help.ShortcutKeys = Keys.F1; Items.Add(help); }
public RDMPSingleControlTabMenu(IActivateItems activator, RDMPSingleControlTab tab, WindowManager windowManager) { _tab = tab; Items.Add("Close Tab", null, (s, e) => tab.Close()); Items.Add("Close All Tabs", null, (s, e) => windowManager.CloseAllWindows(tab)); Items.Add("Close All But This", null, (s, e) => windowManager.CloseAllButThis(tab)); Items.Add("Show", null, (s, e) => tab.HandleUserRequestingEmphasis(activator)); if (tab is PersistableSingleDatabaseObjectDockContent single) { var builder = new GoToMenuBuilder(activator); Items.Add(builder.GetMenu(single.DatabaseObject)); } Items.Add("Refresh", FamFamFamIcons.arrow_refresh, (s, e) => _tab.HandleUserRequestingTabRefresh(activator)); var help = new ToolStripMenuItem("Help", FamFamFamIcons.help, (s, e) => _tab.ShowHelp(activator)); help.ShortcutKeys = Keys.F1; Items.Add(help); }