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 CreateRandomizedGrid(int rows, int cols, Random random, Rectangle[,] currentCell) { _createShapes.CreateRandomizedGrid(rows, cols, random, currentCell); }