public override void Draw(MurphyPA.H2D.Interfaces.IGraphicsContext GC) { if (_WhichEnd == TransitionContactEnd.To) { // want to draw an arrow here... pointer.Draw(GC, _OtherEnd.Centre, this.Centre, _Radius, _Radius); } else { base.Draw(GC); } if (_WhichEnd == TransitionContactEnd.To) { ITransitionGlyph trans = Owner as ITransitionGlyph; if (trans != null && trans.TransitionType == TransitionType.DeepHistory) { using (Brush brush = new System.Drawing.SolidBrush(GC.Color)) { GC.DrawString("H*", brush, 12, _Centre, false); } } } }
public override void Draw(MurphyPA.H2D.Interfaces.IGraphicsContext GC) { if (_WhichEnd == TransitionContactEnd.To) { int height = this.Bounds.Width; pointer.Draw(GC, Centre(_OtherEnd.Bounds), Centre(this.Bounds), height, height); } else { base.Draw(GC); } IPortLinkGlyph portLink = Owner as IPortLinkGlyph; if (portLink != null) { string portName = "?NoName"; switch (_WhichEnd) { case TransitionContactEnd.From: { portName = portLink.FromPortName; if (IsNotEmptyString(portLink.SendIndex)) { portName = portName + "-" + portLink.SendIndex; } } break; case TransitionContactEnd.To: { portName = portLink.ToPortName; } break; } using (Brush brush = new System.Drawing.SolidBrush(GC.Color)) { Rectangle bounds = Bounds; GC.DrawString(portName, brush, 12, new Point(bounds.Right, bounds.Bottom), false); } } }