Example #1
0
 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;
     }
 }
Example #2
0
 public void UpdArrow()
 {
     if (DataCommon.Count != 0)
     {
         Point startPoint = Points[0];
         Point endPoint   = Points[Points.Count - 1];
         if (!(DataCommon[0].LastBox is null))
         {
             AbstractBox box = (AbstractBox)DataCommon[0].LastBox;
             endPoint = box.GetCordinatsOfConnectionPoint(DataCommon[0].LastPoint);
         }
         if (!(DataCommon[0].FirstBox is null))
         {
             AbstractBox box = (AbstractBox)DataCommon[0].FirstBox;
             startPoint = box.GetCordinatsOfConnectionPoint(DataCommon[0].FirstPoint);
         }
         GetPoints(startPoint, endPoint);
     }
 }