示例#1
0
        public void inputMouseDown(object sender, MouseEventArgs e)
        {
            PictureBox input = sender as PictureBox;
            DrawTable  form  = this.Parent as DrawTable;
            Point      p     = new Point();

            p.X = this.Location.X + ((Point)input.Tag).X;
            p.Y = this.Location.Y + ((Point)input.Tag).Y + 5;
            form.endDrawing(p, (object)this, input);
        }
示例#2
0
        public void outputMouseDown(object sender, MouseEventArgs e)
        {
            PictureBox output = sender as PictureBox;
            DrawTable  form   = this.Parent as DrawTable;
            Point      p      = new Point();

            p.X = this.Location.X + ((Point)output.Tag).X + 10;
            p.Y = this.Location.Y + ((Point)output.Tag).Y + 5;
            form.initDrawPen(p, (object)this, output);
        }
示例#3
0
        public void baseMouseMove(object sender, MouseEventArgs e)
        {
            DrawTable form = this.Parent as DrawTable;

            if (MoveFlag)
            {
                Point p = new Point(e.X - MovePoint.X, e.Y - MovePoint.Y);
                form.onPicturboxMove(p, (object)this);
                this.Left += Convert.ToInt16(p.X);
                this.Top  += Convert.ToInt16(p.Y);
            }
            Point newLoc = new Point(e.Location.X + this.Location.X, e.Location.Y + this.Location.Y);

            form.uponPicturBoxMove(newLoc);
        }