private void AddMarker(MouseEventArgs e) { PictureEditViewInfo viewInfo = control.GetViewInfo() as PictureEditViewInfo; if (!viewInfo.PictureScreenBounds.Contains(e.Location)) { return; } rectangleMarkers.Add(new RectangleMarker(control, new Rectangle(e.X - 50, e.Y - 50, 100, 100))); }
private void AddMarker(MouseEventArgs e) { PictureEditViewInfo viewInfo = pEdit.GetViewInfo() as PictureEditViewInfo; if (!viewInfo.PictureScreenBounds.Contains(e.Location)) { return; } var marker = new RectangleMarker(pEdit, new Rectangle(e.X - 50, e.Y, 100, 100)); rectangleMarkers.Add(marker); }