示例#1
0
        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();
            }
        }
示例#2
0
        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;
            }
        }