Exemplo n.º 1
0
        private void pbCanvas_Click(object sender, EventArgs e)
        {
            Point mousePos = pbCanvas.PointToClient(MousePosition);

            if (checkBoxPolygon.Checked)
            {
                if (((MouseEventArgs)e).Button == MouseButtons.Left)
                {
                    ManagerDraw.InputPolygon(mousePos, ModifierKeys == Keys.Shift);
                }
                else if (((MouseEventArgs)e).Button == MouseButtons.Right)
                {
                    ManagerDraw.ClosePolygon();
                }
            }
            else
            {
                if (((MouseEventArgs)e).Button == MouseButtons.Left)
                {
                    ManagerDraw.InputCutter(mousePos, ModifierKeys == Keys.Shift);
                }
                else if (((MouseEventArgs)e).Button == MouseButtons.Right)
                {
                    ManagerDraw.CloseCutter();
                }
            }
        }
Exemplo n.º 2
0
        private void pbCanvas_Click(object sender, EventArgs e)
        {
            Point mousePos = pbCanvas.PointToClient(MousePosition);

            if (((MouseEventArgs)e).Button == MouseButtons.Left)
            {
                ManagerDraw.InputLine(mousePos, ModifierKeys == Keys.Shift);
            }

            else if (((MouseEventArgs)e).Button == MouseButtons.Right)
            {
                ManagerDraw.InputCutter(mousePos);
            }
        }