예제 #1
0
        public void ChangePath(LinkTo Path, SnapDiagramData linkTo)
        {
            if (Id % 12 == 0)
            {
                LinkTo = LinkTo.No;
                return;
            }

            First = linkTo;

            if (Path == LinkTo.No)
            {
                RowIdFirst = null;
            }

            if (Path == LinkTo.Previous)
            {
                RowIdFirst = null;
                if (Id % 12 == 2)
                {
                    RowIdSecond = null;
                }
                else
                {
                    RowIdFirst = Id % 12 - 1;
                }
            }
            if (Path == LinkTo.PreviousWithDelay)
            {
                RowIdFirst  = (Id % 12 == 2) ? 1 : (int?)null;
                RowIdSecond = 0;
            }

            LinkTo = Path;
        }
예제 #2
0
 public LineViewModel(SnapDiagramData first, SnapDiagramData second, int?rowFirst = null, int?rowSecond = null)
 {
     _first       = first;
     _second      = second;
     _rowFirst    = rowFirst;
     _rowIdSecond = rowSecond;
     Initiate();
 }
예제 #3
0
        public LinkLineVm(SnapDiagramData first, SnapDiagramData second, SnapDiagramData InitialLink, int flowId, int?rowFirst = null, int?rowSecond = null)
            : base(first, second, rowFirst, rowSecond)
        {
            Id       = flowId;
            LineType = LineType.LinkLine;


            ChangePath(LinkTo.No, InitialLink);

            SetGeometry();
        }
예제 #4
0
 private void AddPositionChangeHandlers(SnapDiagramData data)
 {
     data.Location.OnValueChanged += DetermineAttachedSnap;
     data.OnRemoveChildren        += EndPointRemoved;
 }