예제 #1
0
        public override void End()
        {
            isDraw = false;
            isDrag = false;

            firstPoint = null;
            grabPoint  = null;

            pointController.Clear();
            penCustom.ClearBack();

            if (path != null)
            {
                path.Dispose();
                path = null;
            }


            if (toolBox != null)
            {
                toolBox.Close();
                toolBox = null;
            }

            host.Invalidate();

            base.End();
        }
예제 #2
0
        void Start(int _X, int _Y)
        {
            isDraw     = true;
            firstPoint = new Vector2(_X, _Y);
            pointController.AddPoint(firstPoint);

            isDrag    = true;
            grabPoint = new Vector2(_X, _Y);
            pointController.AddPoint(grabPoint);

            penCustom.penMain       = new Pen(penCustom.brushFront);
            penCustom.penMain.Width = penCustom.sizeBrush;

            path = new GraphicsPath(FillMode.Winding);

            toolBox                  = new ToolBoxOK();
            toolBox.btnOK.Click     += BtnOK_Click;
            toolBox.btnCancel.Click += BtnCancel_Click;
            toolBox.Show();

            penCustom.CreateBack(_X, _Y, _X + 15, _Y + 15);
        }