public Form1() { InitializeComponent(); bmp = new Bitmap(pictureBox1.Width, pictureBox1.Height); g = Graphics.FromImage(bmp); pictureBox1.Image = bmp; TransformationButton.Enabled = false; DefinitionButton.Enabled = false; ResultLabel.Hide(); comboBox1.Hide(); textBox1.Hide(); textBox2.Hide(); label1.Hide(); label2.Hide(); OkButton.Hide(); }
private void DrawButton_Click(object sender, EventArgs e) { bmp = new Bitmap(pictureBox1.Width, pictureBox1.Height); g = Graphics.FromImage(bmp); pictureBox1.Image = bmp; Points.Clear(); mode = "draw"; TransformationButton.Enabled = false; DefinitionButton.Enabled = false; ResultLabel.Hide(); comboBox1.Hide(); textBox1.Hide(); textBox2.Hide(); label1.Hide(); label2.Hide(); OkButton.Hide(); GetPrimitive form = new GetPrimitive(); form.Owner = this; form.ShowDialog(); }