Multiple Shells with SCSF

Topics: CAB & Smart Client Software Factory
Oct 18, 2007 at 8:48 PM
I have a business requirement to create a WPF Application for the Manufacturing Shopfloor to utilize touch screens and to also create another version of regular style windows for the office personel. I have created the shell with a window workspace for the shopfloor applications. Can I create another shell and depending on their Roles Shopfloor vs Office Worker with in the same solution?

Does anyone have a sample or can explain it to me?

Thanks,
Wade
Oct 19, 2007 at 10:03 PM
Hi

The option Create a separate module to define the layout for the shell of the Create new SmartClient solution recipe will prepare the necessary structure to resolve your issue. Also, you should create a WPF-enabled solution so it can contain WPF views.
To create another layout style, you must add another project to the solution under the Infrastructure solution folder that define the other layout in a Winform style. In Addition you must create two versions of your modules in your application, one containing the WPF views and the other containing the Winforms views.
Also you will need to add the new layout project to the ProfileCatalog.xml and specify a user role. The following configuration extract explains how to do that:

<SolutionProfile xmlns="http://schemas.microsoft.com/pag/cab-profile/2.0">
    <Section Name="Layout.WPF">
        <Modules>
            <ModuleInfo AssemblyFile="Infrastructure.Layout.WPF.dll" Name="Infrastructure.Layout.WPF">
                <Roles>
                    <Role Allow="RoleWPF" />
                </Roles>
            </ModuleInfo>
        </Modules>
    </Section>
    <Section Name="Layout.Winform">
        <Modules>
            <ModuleInfo AssemblyFile="Infrastructure.Layout.Winform.dll" Name="Infrastructure.Layout.Winform">
                <Roles>
                    <Role Allow="RoleWinform" />
                </Roles>
            </ModuleInfo>
        </Modules>
    </Section>
    <Section Name="Apps">
        <Modules>
            <ModuleInfo AssemblyFile="Module.WPF.dll" >
                <Dependencies>
                    <Dependency Name="Infrastructure.Layout.WPF"/>
                </Dependencies>
                <Roles>
                    <Role Allow="RoleWPF"/>
               </Roles>
            </ModuleInfo>
            <ModuleInfo AssemblyFile="Module.Winform.dll">
                <Dependencies>
                    <Dependency Name="Infrastructure.Layout.Winform"/>
                </Dependencies>
                <Roles>
                    <Role Allow="RoleWinform"/>
                </Roles>
            </ModuleInfo>
        </Modules>
    </Section>
</SolutionProfile>
Please let me know if this helps.

Mariano Converti
[url: http://staff.southworks.net/blogs/mconverti