Exemplo n.º 1
0
 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);
 }
Exemplo n.º 2
0
 public void OnMouseUp(object sender, MouseEventArgs e)
 {
     if (_currentModification != null && !_currentModification.IsEmpty())
     {
         Modifications.Add(_currentModification);
         _currentModification = null;
     }
 }
Exemplo n.º 3
0
 public void OnMouseDown(object sender, MouseEventArgs e)
 {
     _previousPoint       = e.Location;
     _currentModification = new DrawLineModification(e.Location);
 }
Exemplo n.º 4
0
 public void OnMouseUp(object sender, MouseEventArgs e)
 {
     _currentModification.AddPoint(e.Location, _pen);
     Modifications.Add(_currentModification);
     _currentModification = null;
 }