public Command GetCommand(CommandDefinitionBase commandDefinition) { Command command; if (!_commands.TryGetValue(commandDefinition, out command)) command = _commands[commandDefinition] = new Command(commandDefinition); return command; }
public CommandMenuItem(Command command, ICommand cmd, StandardMenuItem parent) { Command = cmd; _command = command; _keyGesture = IoC.Get<ICommandKeyGestureService>().GetPrimaryKeyGesture(_command.CommandDefinition); _parent = parent; _listItems = new List<StandardMenuItem>(); }
public CommandToolBarItem(ToolBarItemDefinition toolBarItem, Command command, ICommand actualCommand, IToolBar parent) { _toolBarItem = toolBarItem; _command = command; Command = actualCommand; _keyGesture = IoC.Get<ICommandKeyGestureService>().GetPrimaryKeyGesture(_command.CommandDefinition); _parent = parent; command.PropertyChanged += OnCommandPropertyChanged; }
public Task Run(Command command) { return (Task) _runMethod.Invoke(_commandHandler, new object[] {command}); }
public void Populate(Command command, List<Command> commands) { if (_populateMethod == null) throw new InvalidOperationException("Populate can only be called for list-type commands."); _populateMethod.Invoke(_commandHandler, new object[] {command, commands}); }
public void Update(Command command) { if (_updateMethod != null) _updateMethod.Invoke(_commandHandler, new object[] {command}); }