public static CommandRegistry GetInst() { if (inst_ == null) { inst_ = new CommandRegistry(); } return(inst_); }
protected override bool ProcessCmdKey(ref Message msg, Keys keyData) { if (keyData == (Keys.Control | Keys.Space)) { Dialogs.QuickAction quick = new Dialogs.QuickAction(); quick.ShowDialog(); return(true); } CommandInfo ci = CommandRegistry.GetInst().GetCommand(keyData); if (ci == null) { return(base.ProcessCmdKey(ref msg, keyData)); } if (SendCommand(ci)) { return(true); } return(base.ProcessCmdKey(ref msg, keyData)); }
/// <summary> /// Override as needed for your program /// </summary> protected virtual void BuildToolbars() { // Fill with autogenerated toolbars Toolbars = new List <ToolStrip>(); List <ToolStrip> toolbars = EditorCore.Toolbars.ToolbarBuilder.BuildToolbars(CommandRegistry.GetInst()); foreach (ToolStrip st in toolbars) { Toolbars.Add(st); toolStripContainer.TopToolStripPanel.Controls.Add(st); } }