Example #1
0
 public KexBinding(string group, Key key, ModifierKeys modifier, string commandName, IKexiCommand action, object[] commandArguments = null)
 {
     Key              = key;
     Modifier         = modifier;
     Command          = action;
     CommandName      = commandName;
     CommandArguments = commandArguments;
     Group            = group;
 }
Example #2
0
 public void Execute(IKexiCommand command, object arg = null)
 {
     if (command.CanExecute(arg))
     {
         command.Execute(arg);
         var commandName = command.GetType().Name;
         if (commandName != nameof(RepeatLastCommandCommand))
         {
             LastCommand = command;
         }
         if (command is IUndoable undoable)
         {
             LastUndoable = undoable;
         }
     }
 }
Example #3
0
 public KexDoubleBinding(string group, Key key, ModifierKeys modifier, Key secondKey, ModifierKeys secondModifier,
                         string action, IKexiCommand command) : base(group, key, modifier, action, command)
 {
     SecondKey      = secondKey;
     SecondModifier = secondModifier;
 }