Ejemplo n.º 1
0
        private void pictureBox_shape_MouseClick(object sender, MouseEventArgs e)
        {
            lock (mDrawLockObj)
            {
                Point point = new Point(e.X, e.Y);

                IShape shape = mShapeManager.ActiveShape;
                if (shape != null)
                {
                    if (shape.State == ShapeState.Draw)
                    {
                        shape.AppendPoint(point);
                        if (shape.State == ShapeState.FinishDraw)
                        {
                            shape.Selected();
                        }
                        return;
                    }
                }

                mShapeManager.SelectShape(point);
            }
        }