/// <summary> /// Execute geting command and item. /// </summary> /// <param name="command"> Received a command from the client. </param> /// <param name="item"> The element over which the command must be executed. </param> public void ExecuteCommand(ICommand command, MenuItem item) { command.Execute(menuItems, item); }
public void OnButtonPressed() { _command?.Execute(); }
public void TaKeOrder() => _command.Execute();
public void StoreAndExecute(ICommand command) { _commands.Add(command); command.Execute(); }
public void Click() { command.Execute(); }
public void PressButton() { command.Execute(); }
private void button2_Click(object sender, EventArgs e) { cmdSetLightForCinema.Execute(); LastCommand = cmdSetLightForCinema; }
private void button1_Click(object sender, EventArgs e) { cmdTurnLightOnInHall.Execute(); LastCommand = cmdTurnLightOnInHall; }
public void Submit(ICommand command) { command.Execute(); }