예제 #1
0
        private void MouseDown(object sender, MouseEventArgs e)
        {
            if (e.Button != MouseButtons.Left)
            {
                return;
            }
            mouseDownPoint = e.Location;
            PictureEdit edit = sender as PictureEdit;

            edit.Refresh();
            // startPaint = true;

            //  SolidBrush sb = new SolidBrush(Color.Red);
            //Pen pen = new Pen(Color.Red, 3);
            //graphics.DrawEllipse(pen, e.X - 50, e.Y - 50, 100, 100);

            //IObjectSpace objectSpace = View.ObjectSpace;
            //var opis = objectSpace.CreateObject<OpisZdjecia>();
            //opis.Opis = $"Opis {DateTime.Now}";
            //opis.XPos = e.X;
            //opis.YPos = e.Y;
            //opis.Osoba = objectSpace.GetObject(currentRec);
            ////  currentRec.OpisZdjeciaCollection.Add(opis);
            //objectSpace.CommitChanges();
            //objectSpace.Refresh();
        }
예제 #2
0
        void pictureEdit1_MouseDown(object sender, MouseEventArgs e)
        {
            if (e.Button != MouseButtons.Left)
            {
                return;
            }
            mouseDownPoint = e.Location;
            ResetLasso();
            PictureEdit edit = sender as PictureEdit;

            edit.Refresh();
        }
예제 #3
0
        void pictureEdit1_MouseMove(object sender, MouseEventArgs e)
        {
            if (mouseDownPoint.IsEmpty)
            {
                return;
            }
            if (e.Button != MouseButtons.Left)
            {
                return;
            }
            Point mouseMovePoint = e.Location;

            if (CheckBounds(mouseMovePoint.X, mouseMovePoint.Y))
            {
                lasso = new Rectangle(mouseDownPoint.X, mouseDownPoint.Y, mouseMovePoint.X - mouseDownPoint.X, mouseMovePoint.Y - mouseDownPoint.Y);
                PictureEdit edit = sender as PictureEdit;
                edit.Refresh();
            }
        }
예제 #4
0
 private void mPictureEdit_MouseUp(object sender, MouseEventArgs e)
 {
     isMouseClicked = false;
     mouseMove      = false;
     mainPictureEdit.Refresh();
 }