/// <summary> /// Инициализация следующего блока /// </summary> private void InitializeNextBlock() { this[1, 10] = new PictureBox { BackColor = GameToDrawingColorConvert.ToDrawingColor(GameCellColor.None) }; this[1, 11] = new PictureBox { BackColor = GameToDrawingColorConvert.ToDrawingColor(GameCellColor.None) }; }
private void InitializeGrid(IGameField gameField) { for (var row = 0; row < gameField.Height; row++) { for (var col = 0; col < gameField.Width; col++) { this[row, col] = new PictureBox { BackColor = GameToDrawingColorConvert.ToDrawingColor(GameCellColor.None) } } } ; }
public static void SetColor(this Control control, GameCellColor color) { control.BackColor = GameToDrawingColorConvert.ToDrawingColor(color); }