public void OnMouseDown(object sender, MouseEventArgs e) { _currentModification = new DrawLineModification(e.Location); _startPoint = e.Location; _baseBitmap = (Bitmap)PictureBox.Image.Clone(); _pen = new Pen(GlobalProperties.ContainsKey("Color") ? ColorTranslator.FromHtml(GlobalProperties["Color"]) : Color.Black); }
public void OnMouseUp(object sender, MouseEventArgs e) { if (_currentModification != null && !_currentModification.IsEmpty()) { Modifications.Add(_currentModification); _currentModification = null; } }
public void OnMouseDown(object sender, MouseEventArgs e) { _previousPoint = e.Location; _currentModification = new DrawLineModification(e.Location); }
public void OnMouseUp(object sender, MouseEventArgs e) { _currentModification.AddPoint(e.Location, _pen); Modifications.Add(_currentModification); _currentModification = null; }