private void UpdateInitiatingMessageIcon() { initiatingMessageIcon = IconFactory.CreateMessage(messagePen, InitiatingColor); UpdateMessageLineIcon(); UpdateTopInitiatingMessageIcon(); UpdateBottomInitiatingMessageIcon(); }
private void UpdateResponseMessageIcon() { responseMessageIcon = IconFactory.CreateMessage(messagePen, ResponseColor); UpdateMessageLineIcon(); UpdateTopResponseMessageIcon(); UpdateBottomResponseMessageIcon(); }
private void UpdateIcon() { var adapter = renderer.adapter; var nodeStyle = (BpmnNodeStyle)adapter.NodeStyle; nodeStyle.Icon = IconFactory.CreateMessage(messagePen, IsInitiating ? InitiatingColor : ResponseColor); nodeStyle.ModCount++; }
private ILabelStyle GetCurrentStyle(ILabel item, ILabelStyle style) { var labelStyle = style as ChoreographyMessageLabelStyle; if (labelStyle == null) { return(VoidLabelStyle.Instance); } north = true; messageColor = BpmnConstants.DefaultInitiatingMessageColor; messageOutline = null; var node = item.Owner as INode; if (node != null) { north = item.GetLayout().GetCenter().Y < node.Layout.GetCenter().Y; var nodeStyle = node.Style as ChoreographyNodeStyle; if (nodeStyle != null) { var responseMessage = nodeStyle.InitiatingAtTop ^ north; messageColor = responseMessage ? nodeStyle.ResponseColor : nodeStyle.InitiatingColor; messageOutline = nodeStyle.messagePen; } } messageOutline = messageOutline ?? new Pen(BpmnConstants.DefaultMessageOutline, 1); var delegateStyle = labelStyle.delegateStyle; delegateStyle.IconStyle = labelStyle.messageStyle; labelStyle.messageStyle.Icon = IconFactory.CreateMessage(messageOutline, messageColor); delegateStyle.LabelConnectorLocation = north ? FreeNodePortLocationModel.NodeBottomAnchored : FreeNodePortLocationModel.NodeTopAnchored; delegateStyle.NodeConnectorLocation = north ? FreeNodePortLocationModel.NodeTopAnchored : FreeNodePortLocationModel.NodeBottomAnchored; return(delegateStyle); }