Click here to Skip to main content
15,884,838 members
Articles / Desktop Programming / Windows Forms

Microsoft patterns & practices Composite UI Application Block (CAB) based Module Composite Mapper Service: An XML Configurable Builder for Workspaces, UIElements, Commands, and Event Publications/Subscriptions

Rate me:
Please Sign up or sign in to vote.
4.51/5 (17 votes)
30 Mar 2006CPOL16 min read 114.8K   1.1K   101  
A Microsoft patterns & practices Composite UI Application Block (CAB) based module composite mapper service is provided including C# source code that builds Workspaces, UIElements, Commands and Event Publications/Subscriptions using an XML configuration file specified with a module.
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <PropertyGroup>
    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
    <ProductVersion>8.0.50727</ProductVersion>
    <SchemaVersion>2.0</SchemaVersion>
    <ProjectGuid>{0EC62A9B-74AB-4060-8FA7-01771DCA38EA}</ProjectGuid>
    <OutputType>Library</OutputType>
    <AppDesignerFolder>Properties</AppDesignerFolder>
    <RootNamespace>XtensibleSolutions.MyTemplateModule</RootNamespace>
    <AssemblyName>XtensibleSolutions.MyTemplateModule</AssemblyName>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
    <DebugSymbols>true</DebugSymbols>
    <DebugType>full</DebugType>
    <Optimize>false</Optimize>
    <OutputPath>bin\Debug\</OutputPath>
    <DefineConstants>DEBUG;TRACE</DefineConstants>
    <ErrorReport>prompt</ErrorReport>
    <WarningLevel>4</WarningLevel>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
    <DebugType>pdbonly</DebugType>
    <Optimize>true</Optimize>
    <OutputPath>bin\Release\</OutputPath>
    <DefineConstants>TRACE</DefineConstants>
    <ErrorReport>prompt</ErrorReport>
    <WarningLevel>4</WarningLevel>
  </PropertyGroup>
  <ItemGroup>
    <Reference Include="Microsoft.Practices.CompositeUI, Version=1.0.51205.0, Culture=neutral, processorArchitecture=MSIL">
      <SpecificVersion>False</SpecificVersion>
      <HintPath>..\CAB\Microsoft.Practices.CompositeUI.dll</HintPath>
    </Reference>
    <Reference Include="Microsoft.Practices.CompositeUI.WinForms, Version=1.0.51205.0, Culture=neutral, processorArchitecture=MSIL">
      <SpecificVersion>False</SpecificVersion>
      <HintPath>..\CAB\Microsoft.Practices.CompositeUI.WinForms.dll</HintPath>
    </Reference>
    <Reference Include="Microsoft.Practices.ObjectBuilder, Version=1.0.51205.0, Culture=neutral, processorArchitecture=MSIL">
      <SpecificVersion>False</SpecificVersion>
      <HintPath>..\CAB\Microsoft.Practices.ObjectBuilder.dll</HintPath>
    </Reference>
    <Reference Include="System" />
    <Reference Include="System.Data" />
    <Reference Include="System.Drawing" />
    <Reference Include="System.Windows.Forms" />
    <Reference Include="System.Xml" />
    <Reference Include="XtensibleSolutions.CompositeUI.Extensions, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
      <SpecificVersion>False</SpecificVersion>
      <HintPath>..\CompositeUI.Extensions\bin\Release\XtensibleSolutions.CompositeUI.Extensions.dll</HintPath>
    </Reference>
  </ItemGroup>
  <ItemGroup>
    <Compile Include="MyTemplateModuleInit.cs" />
    <Compile Include="SmartParts\MyTemplatePresenter.cs" />
    <Compile Include="Properties\AssemblyInfo.cs" />
    <Compile Include="MyTemplateWorkItem.cs" />
    <Compile Include="SmartParts\MyTemplateView.cs">
      <SubType>UserControl</SubType>
    </Compile>
    <Compile Include="SmartParts\MyTemplateView.Designer.cs">
      <DependentUpon>MyTemplateView.cs</DependentUpon>
    </Compile>
  </ItemGroup>
  <ItemGroup>
    <EmbeddedResource Include="Services\XSModuleCompMppr\XSModuleCompMppr.xml" />
    <EmbeddedResource Include="SmartParts\MyTemplateView.resx">
      <SubType>Designer</SubType>
      <DependentUpon>MyTemplateView.cs</DependentUpon>
    </EmbeddedResource>
  </ItemGroup>
  <ItemGroup>
    <None Include="ClassDiagrams\MyTemplateModule.cd" />
    <None Include="ClassDiagrams\MyTemplateModule.SmartParts.cd" />
  </ItemGroup>
  <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
       Other similar extension points exist, see Microsoft.Common.targets.
  <Target Name="BeforeBuild">
  </Target>
  <Target Name="AfterBuild">
  </Target>
  -->
</Project>

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer (Senior)
United States United States
Tom Polanski, Senior Analyst
Homeland Security Team, Toyon Research Corporation

Toyon Research Corporation provides innovative solutions to national challenges with technical analyses, research and development.

Comments and Discussions