protected override void LoadViewState(BinaryReader reader)
 {
     base.LoadViewState(reader);
     if (reader.ReadBoolean())
     {
         if (this.containedDesignSurface == null)
         {
             this.containedRootDesigner = this.LoadHostedWorkflow();
         }
         if (this.containedDesignSurface != null)
         {
             IDesignerHost service = this.containedDesignSurface.GetService(typeof(IDesignerHost)) as IDesignerHost;
             if (service == null)
             {
                 throw new Exception(SR.GetString("General_MissingService", new object[] { typeof(IDesignerHost).FullName }));
             }
             DesignerHelpers.DeserializeDesignerStates(service, reader);
         }
     }
 }
Exemple #2
0
        protected override void LoadViewState(BinaryReader reader)
        {
            base.LoadViewState(reader);

            if (reader.ReadBoolean())
            {
                //verify the hosted surface and designer are loaded
                if (this.containedDesignSurface == null)
                {
                    this.containedRootDesigner = LoadHostedWorkflow();
                }

                if (this.containedDesignSurface != null)
                {
                    IDesignerHost designerHost = this.containedDesignSurface.GetService(typeof(IDesignerHost)) as IDesignerHost;
                    if (designerHost == null)
                    {
                        throw new Exception(SR.GetString(SR.General_MissingService, typeof(IDesignerHost).FullName));
                    }
                    DesignerHelpers.DeserializeDesignerStates(designerHost, reader);
                }
            }
        }