File tree Expand file tree Collapse file tree 1 file changed +10
-12
lines changed Expand file tree Collapse file tree 1 file changed +10
-12
lines changed Original file line number Diff line number Diff line change @@ -57,23 +57,21 @@ Different flowchart symbols have different meanings that are used to represent d
5757 for (int i = 0 ; i < Diagram .Connectors .Count ; i ++ )
5858 {
5959 var connector = Diagram .Connectors [i ];
60+ var node = Diagram .GetObject (connector .TargetID ) as Node ;
61+ var srcNode = Diagram .GetObject (connector .SourceID ) as Node ;
62+ if (node .Data != null && node .Data is ItemInfo itemInfo )
6063 {
61- var node = Diagram .GetObject (connector .TargetID ) as Node ;
62- var srcNode = Diagram .GetObject (connector .SourceID ) as Node ;
63- if (node .Data != null && node .Data is ItemInfo itemInfo )
64+ if (itemInfo .Label != null && itemInfo .Label .Count > 0 )
6465 {
65- if (itemInfo .Label != null && itemInfo . Label . Count > 0 )
66+ if (itemInfo .ParentId . IndexOf (( srcNode . Data as ItemInfo ). Id ) != - 1 )
6667 {
67- if (itemInfo .ParentId .IndexOf ((srcNode .Data as ItemInfo ).Id ) != - 1 )
68+ var parentIndex = itemInfo .ParentId .IndexOf ((srcNode .Data as ItemInfo ).Id );
69+ if (itemInfo .Label .Count > parentIndex )
6870 {
69- var parentIndex = itemInfo .ParentId .IndexOf ((srcNode .Data as ItemInfo ).Id );
70- if (itemInfo .Label .Count > parentIndex )
71+ connector .Annotations = new DiagramObjectCollection <PathAnnotation >()
7172 {
72- connector .Annotations = new DiagramObjectCollection <PathAnnotation >()
73- {
74- new PathAnnotation () { Content = itemInfo .Label [parentIndex ], Style = new TextStyle (){ Bold = true } }
75- };
76- }
73+ new PathAnnotation () { Content = itemInfo .Label [parentIndex ], Style = new TextStyle (){ Bold = true } }
74+ };
7775 }
7876 }
7977 }
You can’t perform that action at this time.
0 commit comments