private void ComboBox_SelectionChanged(object sender, SelectionChangedEventArgs e) { var choice = ComboBox.SelectedItem; int firstRows = rows / 2; int firstCols = cols / 2; Random random = new Random(); if (Equals(choice, Square)) { _createShapes.CreateTwoSquares(firstRows, firstCols, _currentCell); } else if (Equals(choice, BigRectangle)) { _createShapes.CreateTwoBigRectangles(firstRows, firstCols, _currentCell); } else if (Equals(choice, RandomCells)) { _createShapes.CreateRandomizedGrid(rows, cols, random, _currentCell); } }
public void CreateTwoSquares(int rows, int cols, Rectangle[,] currentCell) { _createShapes.CreateTwoSquares(rows, cols, currentCell); }