public static void addConnectionText(DDTRelation rel, Netron.NetronLight.DDTConnection connection, Netron.NetronLight.Win.DiagramControl diagramControl) { string from = rel.text.from; string mid = rel.text.middle; string to = rel.text.to; connection.setText(from, mid, to); //add 3 text blocks if (connection.Tfrom != null || connection.Tfrom.Length>0) { ConnectionText ctfrom = new ConnectionText(connection, TextPosition.From); diagramControl.controller.Model.AddShape(ctfrom); } if (connection.Tmid != null || connection.Tmid.Length > 0) { ConnectionText ctmid = new ConnectionText(connection, TextPosition.Mid); diagramControl.controller.Model.AddShape(ctmid); } if (connection.Tto != null || connection.Tto.Length > 0) { ConnectionText ctto = new ConnectionText(connection, TextPosition.To); diagramControl.controller.Model.AddShape(ctto); } }
public void addConnectionText() { if (this.Tfrom != null && !this.Tfrom.Equals("")) { ConnectionText ct = new ConnectionText(this, TextPosition.From); this.Model.AddShape(ct); } if (this.Tto != null && !this.Tto.Equals("")) { ConnectionText ct1 = new ConnectionText(this, TextPosition.To); this.Model.AddShape(ct1); } if (this.Tmid != null && !this.Tmid.Equals("")) { ConnectionText ct2 = new ConnectionText(this, TextPosition.Mid); this.Model.AddShape(ct2); } }