ScreenToGif.Windows.Options.CheckSizeBoard C# (CSharp) Method

CheckSizeBoard() private method

private CheckSizeBoard ( bool sizePicked = true ) : void
sizePicked bool
return void
        private void CheckSizeBoard(bool sizePicked = true)
        {
            if (sizePicked)
            {
                #region If ComboBox Selected

                switch (GridSize2ComboBox.SelectedIndex)
                {
                    case 0:
                        Settings.Default.BoardGridSize = new Rect(new Point(0, 0), new Point(10, 10));
                        break;
                    case 1:
                        Settings.Default.BoardGridSize = new Rect(new Point(0, 0), new Point(15, 15));
                        break;
                    case 2:
                        Settings.Default.BoardGridSize = new Rect(new Point(0, 0), new Point(20, 20));
                        break;
                    case 3:
                        Settings.Default.BoardGridSize = new Rect(new Point(0, 0), new Point(25, 25));
                        break;
                    case 4:
                        Settings.Default.BoardGridSize = new Rect(new Point(0, 0), new Point(30, 30));
                        break;
                    case 5:
                        Settings.Default.BoardGridSize = new Rect(new Point(0, 0), new Point(50, 50));
                        break;
                    case 6:
                        Settings.Default.BoardGridSize = new Rect(new Point(0, 0), new Point(100, 100));
                        break;
                }

                return;

                #endregion
            }

            #region If Settings Loaded

            double sizeW = Settings.Default.BoardGridSize.Width;
            double sizeH = Settings.Default.BoardGridSize.Height;

            if (sizeW != sizeH)
            {
                GridSize2ComboBox.SelectedIndex = 8;
                return;
            }

            if (sizeW == 10)
            {
                GridSize2ComboBox.SelectedIndex = 0;
            }
            else if (sizeW == 15)
            {
                GridSize2ComboBox.SelectedIndex = 1;
            }
            else if (sizeW == 20)
            {
                GridSize2ComboBox.SelectedIndex = 2;
            }
            else if (sizeW == 25)
            {
                GridSize2ComboBox.SelectedIndex = 3;
            }
            else if (sizeW == 30)
            {
                GridSize2ComboBox.SelectedIndex = 4;
            }
            else if (sizeW == 50)
            {
                GridSize2ComboBox.SelectedIndex = 5;
            }
            else if (sizeW == 100)
            {
                GridSize2ComboBox.SelectedIndex = 6;
            }
            else
            {
                GridSize2ComboBox.SelectedIndex = 8;
            }

            #endregion
        }