public void MouseDown(Point e) { if (!IsTapped) { StartPoint = new Point(e.X, e.Y); IsTapped = true; _newArrow = (AbstractArrow)FigureFactory.GetFigure(CoreUML.DefaultColor, CoreUML.DefaultWidth); _newArrow.GetPoints(e, e); _newArrow.HookStartPointToFigure(e); } }
private void PictureBox1_MouseMove(object sender, MouseEventArgs e) { if (_isTapped && (_act == Act.Aggregation || _act == Act.Composition || _act == Act.Inheritance)) { _bitmapTmp = (Bitmap)_bitmap.Clone(); _graphics = Graphics.FromImage(_bitmapTmp); _currentArrow.StartDirectionAxis = _startAxis; _currentArrow.EndDirectionAxis = _endAxis; _currentArrow.GetPoints(_point, e.Location); _currentArrow.Draw(_graphics); pictureBox1.Image = _bitmapTmp; } }