public void MouseMove(Point e) { if (IsTapped) { CoreUML.SwitchToDrawInTmp(); _newArrow.HookEndPointToFigure(e); _newArrow.Draw(CoreUML.Graphics); if (!(_newArrow.DataCommon[0].LastBox is null)) { AbstractBox box = (AbstractBox)_newArrow.DataCommon[0].LastBox; AbstractBox.DrawConnectionPoint(CoreUML.Graphics, box.GetCordinatsOfConnectionPoint(_newArrow.DataCommon[0].LastPoint)); } CoreUML.PictureBox.Image = CoreUML.BitmapTmp; } else if (_newArrow is null) { foreach (IFigure figure in CoreUML.Figures) { if (figure is AbstractBox box && figure.CheckSelection(e, e, 7)) { CoreUML.DrawSelectionOfFigures(); AbstractBox.DrawConnectionPoint(CoreUML.Graphics, box.GetCordinatsOfConnectionPoint(box.GetConnectionPoint(e, e))); break; } } CoreUML.DrawSelectionOfFigures(); CoreUML.PictureBox.Image = CoreUML.BitmapTmp; } }
public void MouseMove(Point e) { if (IsTapped) { CoreUML.SwitchToDrawInTmp(); foreach (IFigure figure in CoreUML.SelectedFigures) { figure.Transform(e); figure.Draw(CoreUML.Graphics); if (figure is AbstractArrow arrow) { if (arrow.SelectedZone.ZoneType == ZoneType.FirstPoint && !(arrow.DataCommon[0].FirstBox is null)) { AbstractBox.DrawConnectionPoint(CoreUML.Graphics, arrow.Points[0]); } else if (arrow.SelectedZone.ZoneType == ZoneType.LastPoint && !(arrow.DataCommon[0].LastBox is null)) { AbstractBox.DrawConnectionPoint(CoreUML.Graphics, arrow.Points[arrow.Points.Count - 1]); } } CoreUML.PictureBox.Image = CoreUML.BitmapTmp; } } }