Пример #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;
 }