private void shapeOptionsToolStripMenuItem_Click(object sender, EventArgs e) { ShapeOptionsDialog pForm = new ShapeOptionsDialog(this.document); // pForm.Show(this); if (pForm.ShowDialog(this) == DialogResult.OK) { //if settings changed it will redraw the form this.Refresh(); } }
private void drawingPanel_MouseDown(object sender, MouseEventArgs e) { if (e.Button == MouseButtons.Right) { ShapeOptionsDialog pForm = new ShapeOptionsDialog(this.document); if (pForm.ShowDialog(this) == DialogResult.OK) { //if settings changed it will redraw the form this.Refresh(); } } if (e.Button == MouseButtons.Left) { drawingShape = template.Clone() as Shape; document.AddShape(drawingShape); mouseDown = e.Location; } else { return; } }