Click here to Skip to main content
15,897,518 members
Articles / Desktop Programming / Windows Forms

WinForms controls to develop with the Pfz.Databasing framework

Rate me:
Please Sign up or sign in to vote.
4.25/5 (6 votes)
7 Oct 2009CPOL6 min read 25.5K   633   10  
Really easy to use framework capable of generating the right controls dynamically for each data type.
<?xml version="1.0" encoding="utf-8"?>
<root>
  <!-- 
    Microsoft ResX Schema 
    
    Version 2.0
    
    The primary goals of this format is to allow a simple XML format 
    that is mostly human readable. The generation and parsing of the 
    various data types are done through the TypeConverter classes 
    associated with the data types.
    
    Example:
    
    ... ado.net/XML headers & schema ...
    <resheader name="resmimetype">text/microsoft-resx</resheader>
    <resheader name="version">2.0</resheader>
    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
        <value>[base64 mime encoded serialized .NET Framework object]</value>
    </data>
    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
        <comment>This is a comment</comment>
    </data>
                
    There are any number of "resheader" rows that contain simple 
    name/value pairs.
    
    Each data row contains a name, and value. The row also contains a 
    type or mimetype. Type corresponds to a .NET class that support 
    text/value conversion through the TypeConverter architecture. 
    Classes that don't support this are serialized and stored with the 
    mimetype set.
    
    The mimetype is used for serialized objects, and tells the 
    ResXResourceReader how to depersist the object. This is currently not 
    extensible. For a given mimetype the value must be set accordingly:
    
    Note - application/x-microsoft.net.object.binary.base64 is the format 
    that the ResXResourceWriter will generate, however the reader can 
    read any of the formats listed below.
    
    mimetype: application/x-microsoft.net.object.binary.base64
    value   : The object must be serialized with 
            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
            : and then encoded with base64 encoding.
    
    mimetype: application/x-microsoft.net.object.soap.base64
    value   : The object must be serialized with 
            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
            : and then encoded with base64 encoding.

    mimetype: application/x-microsoft.net.object.bytearray.base64
    value   : The object must be serialized into a byte array 
            : using a System.ComponentModel.TypeConverter
            : and then encoded with base64 encoding.
    -->
  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
    <xsd:element name="root" msdata:IsDataSet="true">
      <xsd:complexType>
        <xsd:choice maxOccurs="unbounded">
          <xsd:element name="metadata">
            <xsd:complexType>
              <xsd:sequence>
                <xsd:element name="value" type="xsd:string" minOccurs="0" />
              </xsd:sequence>
              <xsd:attribute name="name" use="required" type="xsd:string" />
              <xsd:attribute name="type" type="xsd:string" />
              <xsd:attribute name="mimetype" type="xsd:string" />
              <xsd:attribute ref="xml:space" />
            </xsd:complexType>
          </xsd:element>
          <xsd:element name="assembly">
            <xsd:complexType>
              <xsd:attribute name="alias" type="xsd:string" />
              <xsd:attribute name="name" type="xsd:string" />
            </xsd:complexType>
          </xsd:element>
          <xsd:element name="data">
            <xsd:complexType>
              <xsd:sequence>
                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
              </xsd:sequence>
              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
              <xsd:attribute ref="xml:space" />
            </xsd:complexType>
          </xsd:element>
          <xsd:element name="resheader">
            <xsd:complexType>
              <xsd:sequence>
                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
              </xsd:sequence>
              <xsd:attribute name="name" type="xsd:string" use="required" />
            </xsd:complexType>
          </xsd:element>
        </xsd:choice>
      </xsd:complexType>
    </xsd:element>
  </xsd:schema>
  <resheader name="resmimetype">
    <value>text/microsoft-resx</value>
  </resheader>
  <resheader name="version">
    <value>2.0</value>
  </resheader>
  <resheader name="reader">
    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
  </resheader>
  <resheader name="writer">
    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
  </resheader>
  <data name="grid.Columns" mimetype="application/x-microsoft.net.object.binary.base64">
    <value>
        AAEAAAD/////AQAAAAAAAAAEAQAAAL4BU3lzdGVtLkNvbGxlY3Rpb25zLk9iamVjdE1vZGVsLlJlYWRP
        bmx5Q29sbGVjdGlvbmAxW1tQZnouRGF0YWJhc2luZy5Db250cm9scy5Qcm9wZXJ0eUJvdW5kQ29sdW1u
        LCBQZnouRGF0YWJhc2luZy5Db250cm9scywgVmVyc2lvbj0xLjAuMC4wLCBDdWx0dXJlPW5ldXRyYWws
        IFB1YmxpY0tleVRva2VuPTU2M2U2ODlkM2QzNGEzZGFdXQEAAAAEbGlzdAOsAVN5c3RlbS5Db2xsZWN0
        aW9ucy5HZW5lcmljLkxpc3RgMVtbUGZ6LkRhdGFiYXNpbmcuQ29udHJvbHMuUHJvcGVydHlCb3VuZENv
        bHVtbiwgUGZ6LkRhdGFiYXNpbmcuQ29udHJvbHMsIFZlcnNpb249MS4wLjAuMCwgQ3VsdHVyZT1uZXV0
        cmFsLCBQdWJsaWNLZXlUb2tlbj01NjNlNjg5ZDNkMzRhM2RhXV0JAgAAAAwDAAAAWlBmei5EYXRhYmFz
        aW5nLkNvbnRyb2xzLCBWZXJzaW9uPTEuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9r
        ZW49NTYzZTY4OWQzZDM0YTNkYQQCAAAArAFTeXN0ZW0uQ29sbGVjdGlvbnMuR2VuZXJpYy5MaXN0YDFb
        W1Bmei5EYXRhYmFzaW5nLkNvbnRyb2xzLlByb3BlcnR5Qm91bmRDb2x1bW4sIFBmei5EYXRhYmFzaW5n
        LkNvbnRyb2xzLCBWZXJzaW9uPTEuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49
        NTYzZTY4OWQzZDM0YTNkYV1dAwAAAAZfaXRlbXMFX3NpemUIX3ZlcnNpb24EAAAtUGZ6LkRhdGFiYXNp
        bmcuQ29udHJvbHMuUHJvcGVydHlCb3VuZENvbHVtbltdAwAAAAgICQQAAAABAAAAAQAAAAcEAAAAAAEA
        AAAEAAAABCtQZnouRGF0YWJhc2luZy5Db250cm9scy5Qcm9wZXJ0eUJvdW5kQ29sdW1uAwAAAAkFAAAA
        DQMMBgAAAFFQZnouRGF0YWJhc2luZywgVmVyc2lvbj0xLjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1
        YmxpY0tleVRva2VuPTVmZmMyZTNhMTdkNjQ4ZGIFBQAAACtQZnouRGF0YWJhc2luZy5Db250cm9scy5Q
        cm9wZXJ0eUJvdW5kQ29sdW1uBgAAAB08UHJvcGVydHlOYW1lPmtfX0JhY2tpbmdGaWVsZBw8RGlzcGxh
        eU5hbWU+a19fQmFja2luZ0ZpZWxkFjxXaWR0aD5rX19CYWNraW5nRmllbGQdUmVjb3JkQmFzZStmTXVz
        dERlbGV0ZU9uQXBwbHkWUmVjb3JkQmFzZStmUmVjb3JkTW9kZRVSZWNvcmRCYXNlK2ZPbGRSZWNvcmQE
        AQAABAREUGZ6LkRhdGFiYXNpbmcuQ29udHJvbHMuUHJvcGVydHlFZGl0b3JzLkFjdHVhbFJlY29yZFR5
        cGVQcm9wZXJ0eU5hbWUDAAAACAEZUGZ6LkRhdGFiYXNpbmcuUmVjb3JkTW9kZQYAAAAWUGZ6LkRhdGFi
        YXNpbmcuSVJlY29yZAYAAAADAAAABfn///9EUGZ6LkRhdGFiYXNpbmcuQ29udHJvbHMuUHJvcGVydHlF
        ZGl0b3JzLkFjdHVhbFJlY29yZFR5cGVQcm9wZXJ0eU5hbWUBAAAADWZQcm9wZXJ0eU5hbWUBAwAAAAYI
        AAAABE5hbWUKTgIAAAAF9////xlQZnouRGF0YWJhc2luZy5SZWNvcmRNb2RlAQAAAAd2YWx1ZV9fAAgG
        AAAAAAAAAAoL
</value>
  </data>
</root>

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) Microsoft
United States United States
I started to program computers when I was 11 years old, as a hobbyist, programming in AMOS Basic and Blitz Basic for Amiga.
At 12 I had my first try with assembler, but it was too difficult at the time. Then, in the same year, I learned C and, after learning C, I was finally able to learn assembler (for Motorola 680x0).
Not sure, but probably between 12 and 13, I started to learn C++. I always programmed "in an object oriented way", but using function pointers instead of virtual methods.

At 15 I started to learn Pascal at school and to use Delphi. At 16 I started my first internship (using Delphi). At 18 I started to work professionally using C++ and since then I've developed my programming skills as a professional developer in C++ and C#, generally creating libraries that help other developers do their work easier, faster and with less errors.

Want more info or simply want to contact me?
Take a look at: http://paulozemek.azurewebsites.net/
Or e-mail me at: paulozemek@outlook.com

Codeproject MVP 2012, 2015 & 2016
Microsoft MVP 2013-2014 (in October 2014 I started working at Microsoft, so I can't be a Microsoft MVP anymore).

Comments and Discussions