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