Example #1
0
        private void ChangeSizeButton_Click(object sender, EventArgs e)
        {
            switch (SizesBox.SelectedIndex)
            {
            case 0:
            {
                CalculateForm.SizeOxOy = Convert.ToByte(NumericSize.Value);
                break;
            }

            case 1:
            {
                CalculateForm.SizePoint = Convert.ToByte(NumericSize.Value);
                break;
            }

            case 2:
            {
                CalculateForm.SizeEdge = Convert.ToByte(NumericSize.Value);
                break;
            }

            case 3:
            {
                CalculateForm.SizeText = Convert.ToByte(NumericSize.Value);
                break;
            }

            default:
            {
                break;
            }
            }
            CalculateForm.GetDrawPanel().Refresh();
        }
Example #2
0
        private void ColorBut1_Click(object sender, EventArgs e)
        {
            if (colorDialog1.ShowDialog() == DialogResult.OK)
            {
                ColorPanel.BackColor = colorDialog1.Color;
                switch (ColorBox.SelectedIndex)
                {
                case 0:
                {
                    CalculateForm.ColorOx = colorDialog1.Color;
                    break;
                }

                case 1:
                {
                    CalculateForm.ColorOy = colorDialog1.Color;
                    break;
                }

                case 2:
                {
                    CalculateForm.ColorPoint = colorDialog1.Color;
                    break;
                }

                case 3:
                {
                    CalculateForm.ColorEdge = colorDialog1.Color;
                    break;
                }

                case 4:
                {
                    CalculateForm.ColorText = colorDialog1.Color;
                    break;
                }

                default:
                {
                    break;
                }
                }
                CalculateForm.GetDrawPanel().Refresh();
            }
        }