private void UpdateIcon()
        {
            var multipleIcon = IconFactory.CreateLoopCharacteristic(LoopCharacteristic.Parallel, IconColor);

            multipleInstanceIcon = new PlacedIcon(multipleIcon, BpmnConstants.PoolNodeMarkerPlacement,
                                                  BpmnConstants.MarkerSize);
        }
 private void UpdateMultiInstanceIcon()
 {
     multiInstanceIcon = IconFactory.CreatePlacedIcon(
         IconFactory.CreateLoopCharacteristic(LoopCharacteristic.Parallel, IconColor),
         BpmnConstants.ChoreographyMarkerPlacement,
         BpmnConstants.MarkerSize);
 }
 private void UpdateResponseMessageIcon()
 {
     responseMessageIcon = IconFactory.CreateMessage(messagePen, ResponseColor);
     UpdateMessageLineIcon();
     UpdateTopResponseMessageIcon();
     UpdateBottomResponseMessageIcon();
 }
 private void UpdateInitiatingMessageIcon()
 {
     initiatingMessageIcon = IconFactory.CreateMessage(messagePen, InitiatingColor);
     UpdateMessageLineIcon();
     UpdateTopInitiatingMessageIcon();
     UpdateBottomInitiatingMessageIcon();
 }
 private void UpdateTopInitiatingMessageIcon()
 {
     topInitiatingMessageIcon = IconFactory.CreateCombinedIcon(new[] {
         IconFactory.CreatePlacedIcon(messageLineIcon, ExteriorLabelModel.North, new SizeD(MessageDistance, MessageDistance)),
         IconFactory.CreatePlacedIcon(initiatingMessageIcon, BpmnConstants.ChoreographyTopMessagePlacement,
                                      BpmnConstants.MessageSize)
     });
 }
Пример #6
0
 private void UpdateTypeIcon()
 {
     typeIcon = IconFactory.CreateDataObjectType(Type, IconColor);
     if (typeIcon != null)
     {
         typeIcon = IconFactory.CreatePlacedIcon(typeIcon, BpmnConstants.DataObjectTypePlacement, BpmnConstants.DataObjectTypeSize);
     }
 }
 private void UpdateOutlineIcon()
 {
     outlineIcon = IconFactory.CreateChoreography(type, Outline);
     if (type == ChoreographyType.Call)
     {
         outlineIcon = new PlacedIcon(outlineIcon, BpmnConstants.ThickLinePlacement, SizeD.Empty);
     }
 }
Пример #8
0
 private void UpdateTypeIcon()
 {
     typeIcon = IconFactory.CreateGatewayType(type, IconColor);
     if (typeIcon != null)
     {
         typeIcon = IconFactory.CreatePlacedIcon(typeIcon, BpmnConstants.GatewayTypePlacement, SizeD.Empty);
     }
 }
Пример #9
0
 private void CreateTypeIcon()
 {
     typeIcon = IconFactory.CreateEventType(type, fillTypeIcon, IconColor, Background);
     if (typeIcon != null)
     {
         typeIcon = IconFactory.CreatePlacedIcon(typeIcon, BpmnConstants.EventTypePlacement, SizeD.Empty);
     }
 }
 private void UpdateBottomResponseMessageIcon()
 {
     bottomResponseMessageIcon = IconFactory.CreateCombinedIcon(new[] {
         IconFactory.CreatePlacedIcon(messageLineIcon, ExteriorLabelModel.South,
                                      new SizeD(MessageDistance, MessageDistance)),
         IconFactory.CreatePlacedIcon(responseMessageIcon, BpmnConstants.ChoreographyBottomMessagePlacement,
                                      BpmnConstants.MessageSize)
     });
 }
Пример #11
0
        private void CreateEventIcon()
        {
            eventIcon = IconFactory.CreateEvent(Characteristic, Background, Outline);
            eventIcon = IconFactory.CreatePlacedIcon(eventIcon, BpmnConstants.EventPlacement, MinimumSize);
            bool isFilled = Characteristic == EventCharacteristic.Throwing || Characteristic == EventCharacteristic.End;

            if (isFilled != fillTypeIcon)
            {
                fillTypeIcon = isFilled;
                CreateTypeIcon();
            }
        }
        private IIcon CreateTaskBandIcon(INode node)
        {
            if (taskBandBackgroundIcon == null)
            {
                UpdateTaskBandIcon();
            }
            IIcon subStateIcon = null;

            if (SubState != SubState.None)
            {
                subStateIcon = SubState == SubState.Dynamic ? IconFactory.CreateDynamicSubState(node, IconColor) : IconFactory.CreateStaticSubState(SubState, IconColor);
            }

            IIcon markerIcon = null;

            if (loopIcon != null && subStateIcon != null)
            {
                markerIcon = IconFactory.CreateLineUpIcon(new List <IIcon>(new [] { loopIcon, subStateIcon }),
                                                          BpmnConstants.MarkerSize, 5);
            }
            else if (loopIcon != null)
            {
                markerIcon = loopIcon;
            }
            else if (subStateIcon != null)
            {
                markerIcon = subStateIcon;
            }
            if (markerIcon != null)
            {
                var placedMarkers = IconFactory.CreatePlacedIcon(markerIcon, BpmnConstants.ChoreographyMarkerPlacement,
                                                                 BpmnConstants.MarkerSize);
                return(IconFactory.CreateCombinedIcon(new List <IIcon>(new[] { taskBandBackgroundIcon, placedMarkers })));
            }
            else
            {
                return(taskBandBackgroundIcon);
            }
        }
 private void UpdateTaskIcon()
 {
     if (TaskType == TaskType.EventTriggered)
     {
         var eventNodeStyle = new EventNodeStyle {
             Characteristic = TriggerEventCharacteristic,
             Type           = TriggerEventType,
             Background     = Background,
             Outline        = EventOutline,
             IconColor      = IconColor
         };
         eventNodeStyle.UpdateIcon(null);
         taskIcon = eventNodeStyle.Icon;
     }
     else
     {
         taskIcon = IconFactory.CreateActivityTaskType(taskType, IconColor, Background);
     }
     if (taskIcon != null)
     {
         taskIcon = IconFactory.CreatePlacedIcon(taskIcon, BpmnConstants.TaskTypePlacement, BpmnConstants.TaskTypeSize);
     }
 }
Пример #14
0
 private void UpdateDataIcon()
 {
     dataIcon = IconFactory.CreateDataObject(Background, Outline);
 }
 private void UpdateTaskBandIcon()
 {
     taskBandBackgroundIcon = IconFactory.CreateChoreographyTaskBand(Background);
 }
Пример #16
0
 private void UpdateCollectionIcon()
 {
     collectionIcon = IconFactory.CreatePlacedIcon(
         IconFactory.CreateLoopCharacteristic(LoopCharacteristic.Parallel, IconColor),
         BpmnConstants.DataObjectMarkerPlacement, BpmnConstants.MarkerSize);
 }
        internal IIcon CreateIcon(INode node)
        {
            var minimumWidth = 10.0;

            var icons = new List <IIcon>();

            if (activityIcon != null)
            {
                icons.Add(activityIcon);
            }
            if (taskIcon != null)
            {
                icons.Add(taskIcon);
            }

            var lineUpIcons = new List <IIcon>();

            if (loopIcon != null)
            {
                minimumWidth += BpmnConstants.MarkerSize.Width + 5;
                lineUpIcons.Add(loopIcon);
            }
            if (AdHoc)
            {
                minimumWidth += BpmnConstants.MarkerSize.Width + 5;
                lineUpIcons.Add(adHocIcon);
            }
            if (Compensation)
            {
                minimumWidth += BpmnConstants.MarkerSize.Width + 5;
                lineUpIcons.Add(compensationIcon);
            }
            if (SubState != SubState.None)
            {
                minimumWidth += BpmnConstants.MarkerSize.Width + 5;
                if (SubState == SubState.Dynamic)
                {
                    lineUpIcons.Add(IconFactory.CreateDynamicSubState(node, IconColor));
                }
                else
                {
                    lineUpIcons.Add(IconFactory.CreateStaticSubState(SubState, IconColor));
                }
            }
            if (lineUpIcons.Count > 0)
            {
                IIcon lineUpIcon = IconFactory.CreateLineUpIcon(lineUpIcons, BpmnConstants.MarkerSize, 5);
                icons.Add(IconFactory.CreatePlacedIcon(lineUpIcon, BpmnConstants.TaskMarkerPlacement, BpmnConstants.MarkerSize));
            }

            MinimumSize = new SizeD(Math.Max(minimumWidth, 40), 40);
            if (icons.Count > 1)
            {
                return(IconFactory.CreateCombinedIcon(icons));
            }
            else if (icons.Count == 1)
            {
                return(icons[0]);
            }
            else
            {
                return(null);
            }
        }
 private void UpdateLoopIcon()
 {
     loopIcon = IconFactory.CreateLoopCharacteristic(LoopCharacteristic, IconColor);
 }
 private void UpdateCompensationIcon()
 {
     compensationIcon = Compensation ? IconFactory.CreateCompensation(false, IconColor) : null;
 }
 private void UpdateAdHocIcon()
 {
     adHocIcon = AdHoc ? IconFactory.CreateAdHoc(IconColor) : null;
 }
 private void UpdateActivityIcon()
 {
     activityIcon = IconFactory.CreateActivity(activityType, Background, Outline);
 }
 private void UpdateMessageLineIcon()
 {
     messageLineIcon = IconFactory.CreateLine(messageLinePen, 0.5, 0, 0.5, 1);
 }
Пример #23
0
 private void UpdateGatewayIcon()
 {
     gatewayIcon = IconFactory.CreatePlacedIcon(IconFactory.CreateGateway(Background, Outline), BpmnConstants.GatewayPlacement, SizeD.Empty);
 }