コード例 #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);
     }
 }
コード例 #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;
 }
コード例 #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);
 }
コード例 #4
0
 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;
 }
コード例 #5
0
 public LayoutSelectionGlyph(StateDesigner.Layout layout)
 {
     if (layout == null)
     {
         throw new ArgumentNullException("layout");
     }
     this._layout = layout;
 }
コード例 #6
0
 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);
 }
コード例 #7
0
 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);
         }
     }
 }