Exemplo n.º 1
0
 protected override void Dispose(bool disposing)
 {
     try
     {
         if (disposing)
         {
             //Both of these objects are disposed in design surface dispose.
             this.containedRootDesigner = null;
             this.containedLoader       = null;
             if (this.containedDesignSurface != null)
             {
                 this.containedDesignSurface.Dispose();
                 this.containedDesignSurface = null;
             }
             if (this.lastInvokedWorkflowState != null)
             {
                 this.lastInvokedWorkflowState.Close();
                 this.lastInvokedWorkflowState = null;
             }
         }
     }
     finally
     {
         base.Dispose(disposing);
     }
 }
 protected override void Dispose(bool disposing)
 {
     try
     {
         if (disposing)
         {
             this.containedRootDesigner = null;
             this.containedLoader = null;
             if (this.containedDesignSurface != null)
             {
                 this.containedDesignSurface.Dispose();
                 this.containedDesignSurface = null;
             }
             if (this.lastInvokedWorkflowState != null)
             {
                 this.lastInvokedWorkflowState.Close();
                 this.lastInvokedWorkflowState = null;
             }
         }
     }
     finally
     {
         base.Dispose(disposing);
     }
 }
 private IWorkflowRootDesigner LoadHostedWorkflow()
 {
     if (this.RootActivity == null)
     {
         return null;
     }
     this.containedLoader = new ContainedDesignerLoader(this.RootActivity);
     this.containedDesignSurface = new ContainedDesignSurface(base.Activity.Site, this);
     if (!this.containedDesignSurface.IsLoaded)
     {
         this.containedDesignSurface.BeginLoad(this.containedLoader);
     }
     return ActivityDesigner.GetSafeRootDesigner(this.containedDesignSurface.GetService(typeof(IDesignerHost)) as IServiceProvider);
 }
 private IWorkflowRootDesigner LoadHostedWorkflow()
 {
     if (this.RootActivity == null)
     {
         return(null);
     }
     this.containedLoader        = new ContainedDesignerLoader(this.RootActivity);
     this.containedDesignSurface = new ContainedDesignSurface(base.Activity.Site, this);
     if (!this.containedDesignSurface.IsLoaded)
     {
         this.containedDesignSurface.BeginLoad(this.containedLoader);
     }
     return(ActivityDesigner.GetSafeRootDesigner(this.containedDesignSurface.GetService(typeof(IDesignerHost)) as IServiceProvider));
 }
Exemplo n.º 5
0
 private IWorkflowRootDesigner LoadHostedWorkflow()
 {
     if (RootActivity != null)
     {
         this.containedLoader        = new ContainedDesignerLoader(RootActivity as Activity);
         this.containedDesignSurface = new ContainedDesignSurface(Activity.Site, this);
         if (this.containedDesignSurface.IsLoaded == false)
         {
             this.containedDesignSurface.BeginLoad(this.containedLoader);
         }
         return(ActivityDesigner.GetSafeRootDesigner(this.containedDesignSurface.GetService(typeof(IDesignerHost)) as IServiceProvider) as IWorkflowRootDesigner);
     }
     else
     {
         return(null);
     }
 }
 private IWorkflowRootDesigner LoadHostedWorkflow()
 {
     if (RootActivity != null)
     {
         this.containedLoader = new ContainedDesignerLoader(RootActivity as Activity);
         this.containedDesignSurface = new ContainedDesignSurface(Activity.Site, this);
         if (this.containedDesignSurface.IsLoaded == false)
             this.containedDesignSurface.BeginLoad(this.containedLoader);
         return ActivityDesigner.GetSafeRootDesigner(this.containedDesignSurface.GetService(typeof(IDesignerHost)) as IServiceProvider) as IWorkflowRootDesigner;
     }
     else
     {
         return null;
     }
 }