Exemplo n.º 1
0
        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);
            }
        }
Exemplo n.º 2
0
 public void CreateTwoBigRectangles(int rows, int cols, Rectangle[,] currentCell)
 {
     _createShapes.CreateTwoBigRectangles(rows, cols, currentCell);
 }