Exemplo n.º 1
0
 private void SetActiveDesignerHelper(StateDesigner stateDesigner, ActivityDesigner activeDesigner)
 {
     WorkflowDesignerLoader workflowDesignerLoader = GetService(typeof(WorkflowDesignerLoader)) as WorkflowDesignerLoader;
     if (workflowDesignerLoader != null && workflowDesignerLoader.InDebugMode)
     {
         stateDesigner.ActiveDesigner = activeDesigner;
     }
     else
     {
         PropertyDescriptor activeDesignerProperty = GetPropertyDescriptor(stateDesigner.Activity, ActiveDesignerNamePropertyName);
         if (activeDesigner == null)
             activeDesignerProperty.SetValue(stateDesigner.Activity, null);
         else
             activeDesignerProperty.SetValue(stateDesigner.Activity, activeDesigner.Activity.QualifiedName);
     }
 }
Exemplo n.º 2
0
 internal static Image GetCompletedStateDesignerImage(StateDesigner stateDesigner)
 {
     StateMachineTheme stateDesignerTheme = stateDesigner.DesignerTheme as StateMachineTheme;
     if (stateDesignerTheme != null && stateDesignerTheme.CompletedStateDesignerImage != null)
         return stateDesignerTheme.CompletedStateDesignerImage;
     else
         return StateDesigner.CompletedState;
 }
Exemplo n.º 3
0
 private void SetLeafActiveDesigner(StateDesigner parentDesigner, ActivityDesigner activityDesigner)
 {
     StateDesigner stateDesigner = parentDesigner;
     while (true)
     {
         StateDesigner childStateDesigner = stateDesigner.ActiveDesigner as StateDesigner;
         if (childStateDesigner == null)
             break;
         stateDesigner = childStateDesigner;
     }
     SetActiveDesignerHelper(stateDesigner, activityDesigner);
 }
 internal static System.Drawing.Image GetInitialStateDesignerImage(StateDesigner stateDesigner)
 {
     StateMachineTheme designerTheme = stateDesigner.DesignerTheme as StateMachineTheme;
     if ((designerTheme != null) && (designerTheme.InitialStateDesignerImage != null))
     {
         return designerTheme.InitialStateDesignerImage;
     }
     return InitialState;
 }
 public LayoutSelectionGlyph(StateDesigner.Layout layout)
 {
     if (layout == null)
     {
         throw new ArgumentNullException("layout");
     }
     this._layout = layout;
 }
 private void SetLeafActiveDesigner(StateDesigner parentDesigner, ActivityDesigner activityDesigner)
 {
     StateDesigner stateDesigner = parentDesigner;
     while (true)
     {
         StateDesigner activeDesigner = stateDesigner.ActiveDesigner as StateDesigner;
         if (activeDesigner == null)
         {
             break;
         }
         stateDesigner = activeDesigner;
     }
     this.SetActiveDesignerHelper(stateDesigner, activityDesigner);
 }
 private void SetActiveDesignerHelper(StateDesigner stateDesigner, ActivityDesigner activeDesigner)
 {
     WorkflowDesignerLoader service = base.GetService(typeof(WorkflowDesignerLoader)) as WorkflowDesignerLoader;
     if ((service != null) && service.InDebugMode)
     {
         stateDesigner.ActiveDesigner = activeDesigner;
     }
     else
     {
         PropertyDescriptor propertyDescriptor = GetPropertyDescriptor(stateDesigner.Activity, "ActiveDesignerName");
         if (activeDesigner == null)
         {
             propertyDescriptor.SetValue(stateDesigner.Activity, null);
         }
         else
         {
             propertyDescriptor.SetValue(stateDesigner.Activity, activeDesigner.Activity.QualifiedName);
         }
     }
 }