Click here to Skip to main content
11,708,312 members (67,807 online)
Click here to Skip to main content
Add your own
alternative version

DataStorage: Store settings type-safe

, 8 Aug 2012 GPL3 10.6K 179 6
Shows how to use the DataStorage classes to generate type-safe settings classes.
DataStorage.zip
DataStorage
Aga.Controls
Aga.Controls.csproj.user
key.snk
Properties
Resources
check.bmp
DVSplit.cur
Folder.bmp
FolderClosed.bmp
Leaf.bmp
loading_icon
minus.bmp
plus.bmp
Thumbs.db
uncheck.bmp
unknown.bmp
Threading
Tree
ClassDiagram.cd
Input
NodeControls
ClassDiagram.cd
CommandLineGenerator
Properties
DataStorage
Properties
DataStorageGenerator
DataGeneration
Images
Add.png
AddClass.png
AddProperty.pdn
AddProperty.png
Class.png
Delete.png
FileOpen.png
FileSave.png
FileSaveAs.png
GenerateAll.png
Property.png
PropertyBool.png
PropertyColor.png
PropertyDateTime.png
PropertyDouble.png
PropertyEnum.png
PropertyFloat.png
PropertyInt.png
PropertyLong.png
PropertyString.png
PropertyVersion.png
Properties
Settings.settings
StorageTester
Properties
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
  <PropertyGroup>
    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
    <ProductVersion>8.0.50727</ProductVersion>
    <SchemaVersion>2.0</SchemaVersion>
    <ProjectGuid>{55FF16BB-C5E9-4AB8-A723-EF0852ABFE0F}</ProjectGuid>
    <OutputType>WinExe</OutputType>
    <AppDesignerFolder>Properties</AppDesignerFolder>
    <RootNamespace>pdfforge.DataStorageGenerator</RootNamespace>
    <AssemblyName>DataStorageGenerator</AssemblyName>
    <FileUpgradeFlags>
    </FileUpgradeFlags>
    <UpgradeBackupLocation>
    </UpgradeBackupLocation>
    <OldToolsVersion>3.5</OldToolsVersion>
    <TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
  </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="DataStorage, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
      <SpecificVersion>False</SpecificVersion>
      <HintPath>bin\Release\DataStorage.dll</HintPath>
    </Reference>
    <Reference Include="System" />
    <Reference Include="System.Data" />
    <Reference Include="System.Deployment" />
    <Reference Include="System.Drawing" />
    <Reference Include="System.Windows.Forms" />
    <Reference Include="System.Xml" />
  </ItemGroup>
  <ItemGroup>
    <Compile Include="AboutBox.cs">
      <SubType>Form</SubType>
    </Compile>
    <Compile Include="AboutBox.Designer.cs">
      <DependentUpon>AboutBox.cs</DependentUpon>
    </Compile>
    <Compile Include="ClassGenerator.cs" />
    <Compile Include="ClassStringBuilder.cs" />
    <Compile Include="DataGeneration\ClassContainer.cs" />
    <Compile Include="DataGeneration\DataClass.cs" />
    <Compile Include="DataGeneration\IDataElement.cs" />
    <Compile Include="DataGeneration\DataValue.cs" />
    <Compile Include="DataGeneration\SimpleValue.cs" />
    <Compile Include="frmGeneratorOptions.cs">
      <SubType>Form</SubType>
    </Compile>
    <Compile Include="frmGeneratorOptions.Designer.cs">
      <DependentUpon>frmGeneratorOptions.cs</DependentUpon>
    </Compile>
    <Compile Include="frmMainGenerator.cs">
      <SubType>Form</SubType>
    </Compile>
    <Compile Include="frmMainGenerator.Designer.cs">
      <DependentUpon>frmMainGenerator.cs</DependentUpon>
    </Compile>
    <Compile Include="InputBox.cs">
      <SubType>Form</SubType>
    </Compile>
    <Compile Include="Program.cs" />
    <Compile Include="Properties\AssemblyInfo.cs" />
    <EmbeddedResource Include="AboutBox.resx">
      <SubType>Designer</SubType>
      <DependentUpon>AboutBox.cs</DependentUpon>
    </EmbeddedResource>
    <EmbeddedResource Include="frmGeneratorOptions.resx">
      <SubType>Designer</SubType>
      <DependentUpon>frmGeneratorOptions.cs</DependentUpon>
    </EmbeddedResource>
    <EmbeddedResource Include="frmMainGenerator.resx">
      <SubType>Designer</SubType>
      <DependentUpon>frmMainGenerator.cs</DependentUpon>
    </EmbeddedResource>
    <EmbeddedResource Include="InputBox.resx">
      <DependentUpon>InputBox.cs</DependentUpon>
      <SubType>Designer</SubType>
    </EmbeddedResource>
    <EmbeddedResource Include="Properties\Resources.resx">
      <Generator>ResXFileCodeGenerator</Generator>
      <LastGenOutput>Resources.Designer.cs</LastGenOutput>
      <SubType>Designer</SubType>
    </EmbeddedResource>
    <Compile Include="Properties\Resources.Designer.cs">
      <AutoGen>True</AutoGen>
      <DependentUpon>Resources.resx</DependentUpon>
      <DesignTime>True</DesignTime>
    </Compile>
    <None Include="app.config" />
    <None Include="Properties\Settings.settings">
      <Generator>SettingsSingleFileGenerator</Generator>
      <LastGenOutput>Settings.Designer.cs</LastGenOutput>
    </None>
    <Compile Include="Properties\Settings.Designer.cs">
      <AutoGen>True</AutoGen>
      <DependentUpon>Settings.settings</DependentUpon>
      <DesignTimeSharedInput>True</DesignTimeSharedInput>
    </Compile>
    <Compile Include="XmlHelper.cs" />
  </ItemGroup>
  <ItemGroup>
    <ProjectReference Include="..\Aga.Controls\Aga.Controls.csproj">
      <Project>{E73BB233-D88B-44A7-A98F-D71EE158381D}</Project>
      <Name>Aga.Controls</Name>
    </ProjectReference>
  </ItemGroup>
  <ItemGroup>
    <None Include="Images\FileSaveAs.png" />
  </ItemGroup>
  <ItemGroup>
    <None Include="Images\FileSave.png" />
  </ItemGroup>
  <ItemGroup>
    <None Include="Images\FileOpen.png" />
  </ItemGroup>
  <ItemGroup>
    <None Include="Images\GenerateAll.png" />
  </ItemGroup>
  <ItemGroup>
    <None Include="Images\AddClass.png" />
  </ItemGroup>
  <ItemGroup>
    <None Include="Images\AddProperty.png" />
  </ItemGroup>
  <ItemGroup>
    <None Include="Images\Delete.png" />
  </ItemGroup>
  <ItemGroup>
    <None Include="Images\Class.png" />
  </ItemGroup>
  <ItemGroup>
    <None Include="Images\Property.png" />
  </ItemGroup>
  <ItemGroup>
    <None Include="Images\PropertyBool.png" />
  </ItemGroup>
  <ItemGroup>
    <None Include="Images\PropertyDouble.png" />
  </ItemGroup>
  <ItemGroup>
    <None Include="Images\PropertyEnum.png" />
  </ItemGroup>
  <ItemGroup>
    <None Include="Images\PropertyFloat.png" />
  </ItemGroup>
  <ItemGroup>
    <None Include="Images\PropertyInt.png" />
  </ItemGroup>
  <ItemGroup>
    <None Include="Images\PropertyLong.png" />
  </ItemGroup>
  <ItemGroup>
    <None Include="Images\PropertyString.png" />
  </ItemGroup>
  <ItemGroup>
    <None Include="Images\PropertyDateTime.png" />
  </ItemGroup>
  <ItemGroup>
    <None Include="Images\PropertyVersion.png" />
  </ItemGroup>
  <ItemGroup>
    <None Include="Images\PropertyColor.png" />
  </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 GNU General Public License (GPLv3)

Share

About the Author

pchinery
pdfforge GbR
Germany Germany
Philip is a Software Architect with severaly years of experience. He studied business IT in the University of Wedel, Germany, and has reached his Masters degree in 2010. Back in 2002, he started his so far best-known software PDFCreator. The second developer joined two years later and since then, both constantly improve this piece of open source software.

You may also be interested in...

| Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.150819.1 | Last Updated 8 Aug 2012
Article Copyright 2012 by pchinery
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid