Combine Parts or Duplicate parts?

Topics: CAB & Smart Client Software Factory
Feb 12, 2007 at 8:15 PM
I am having trouble and hopefully i can find a answer.

I have a ton of common functionality between 4 different smart parts, so I started to break them up. Now i have almost 8 smart parts and I am having trouble combining them. I have one smart part that could potentially be shared between 3 of them (a header section).

Each smart part has their own presenter (using MVP). I use the CreateNew() attribute to create the presenters.

I have a HeaderSmartpart that the other smartparts can be placed on (it has company name, ID, date, ect..) and I use this to be shown in my DocumentWorkspace. Now I show between 3 to 5 different smart parts on this HeaderSmartPart depending on what type of object I am showing.

I am having trouble with the building of the presenters if I place the smartparts on the HeaderSmartPart in design time.

My question: How do I combine the smartparts together and show in my DocumentWorkspace(main workspace)?

Jordon
Feb 21, 2007 at 4:31 PM
I figured it out, and it is working. I am using smartpart placeholders for the differnet sections and for the layout section it inherits a base class that has the common functionality.

Now my problem is that the base class has a presenter of its own and in the baseclass it uses the CreateNew() attirbute to create the presenter. This works fine for 4 out of my 5 views that inherit it. I dont' have any idea why.

Anyone else do anything like this?