private void CreatePouringCommand(PouringCellCommandModel source) { var pouringCommand = new PouringCellCommand(_grid, _robot, source.CellColor) { Id = source.Id, NextNumberCommand = source.NextCommandId }; }
private BaseRobotCommand CreatePouringCommand(CommandModel source) { if ((CommandName)source.CurrentName != CommandName.Pouring) { throw new ArgumentException(GetMessage("заливки")); } var pouringCommand = new PouringCellCommand(grid, robot, (ColorCell)source.CurrentOneParameter) { Id = source.CommandId, NextNumberCommand = source.CurrentTwoParameter }; return(pouringCommand); }