예제 #1
0
 public static CommandRegistry GetInst()
 {
     if (inst_ == null)
     {
         inst_ = new CommandRegistry();
     }
     return(inst_);
 }
예제 #2
0
        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));
        }
예제 #3
0
        /// <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);
            }
        }