Lab 6: Extending the Composite User Interface Appl

Topics: CAB & Smart Client Software Factory
Jan 7, 2006 at 1:50 PM
originally posted by: JayUrbanowicz

Lab 6: Extending the Composite User Interface Application Block - Exercise 1

For the first user that has access to both the CRM and Loans module. If you:
1. Add a CRM
2. Add a Loan module
3. Close the Loan module
The CRM contentSmartPantClosing gets called after loans contentSmartPartClosing method. This allows you to add another CRM module when it shouldn’t. Is this a bug in the sample app design or in the CAB?


void content_SmartPartClosing(object sender, WorkspaceCancelEventArgs e)
{
List<CRMView> crmViews =(List<CRMView>)this.Items.FindByType<CRMView>();
if (crmViews.Count > 0)
{
this.Items.Remove(crmViews0); // < removes the CRM from the Items list when it wasn't closed
}
}