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(); }
void pictureEdit1_MouseDown(object sender, MouseEventArgs e) { if (e.Button != MouseButtons.Left) { return; } mouseDownPoint = e.Location; ResetLasso(); PictureEdit edit = sender as PictureEdit; edit.Refresh(); }
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(); } }
private void mPictureEdit_MouseUp(object sender, MouseEventArgs e) { isMouseClicked = false; mouseMove = false; mainPictureEdit.Refresh(); }