ExtendedCAB Workspaces and Services#

File Attachment: ExtendedCAB.zip (22 KB)

In a couple of my previous posts I had put up modified code for workspaces to add a “SmartPartClosed” event and I also posted about a ControlDisposedService.  I have put all this code into its own assembly and it is available for download above.

Some things to note is the ExtendedWindowWorkspace contains most of, but slightly modified source from the CAB distribution.  This is because there was some bugs that I fixed and some things I added that were not possible to add if I derived from the WindowWorkspace.  There was an issue with setting the location of a window and I also added StartPosition.  The workspaces have very little modification, the main addition was the SmartPartClosed event which was needed for notification when a SmartPart was closed.

The control disposed service does just what is sounds like.  When a control is disposed it is removed from the WorkItem by the ControlDisposedService.  For the ControlDisposedService to work the ControlDisposedStrategy must be hooked up in the Application class like so.

  protected override void AddServices()
  {
        this.RootWorkItem.Services.AddNew<ControlDisposedService, IControlDisposedService>();

        base.AddServices();
  }

   protected override void AddBuilderStrategies(Builder builder)
   {
        builder.Strategies.Add(new ControlDisposedStrategy(), BuilderStage.Initialization);

        base.AddBuilderStrategies(builder);
   }

I’m slowing pulling out the lessons learned from the implementation of a CAB smartclient that was developed over this past year.  This is the first pass and as time goes on there will be more additions.

Wednesday, January 10, 2007 12:49:33 AM (GMT Standard Time, UTC+00:00) #    Comments [0]  | 

 

Name
E-mail
Home page

Comment (HTML not allowed)  

Enter the code shown (prevents robots):

Live Comment Preview
All content © 2009, John Luif