예제 #1
0
        public static CommandProxy CreateCommand(object cmdEnum, string label, string shortCut = null, string macShortCut = null, bool isLocal = false, ActionType cmdType = ActionType.Normal)
        {
            CommandProxy actionCommand = CommandCreater.CreateActionCommand(cmdEnum, cmdType, label, shortCut, macShortCut, false) as CommandProxy;

            if (isLocal)
            {
                actionCommand.Execute += new EventHandler <CommandRunArgs>(CommandCreater.EmptyRootCmd_Execute);
                actionCommand.Update  += new EventHandler <CommandUpdateArgs>(CommandCreater.DisableAndBypass_CanExecute);
            }
            return(actionCommand);
        }
예제 #2
0
 public static CommandArrayProxy CreateCommandArray(object cmdEnum, ActionType cmdType = ActionType.Normal)
 {
     return(CommandCreater.CreateActionCommand(cmdEnum, cmdType, cmdEnum.ToString() + "队列", (string)null, (string)null, true) as CommandArrayProxy);
 }