Click here to Skip to main content
15,895,256 members
Articles / Programming Languages / C#

Design Patterns Implementation in a Storage Explorer Application

Rate me:
Please Sign up or sign in to vote.
4.92/5 (178 votes)
25 Apr 200410 min read 314.5K   2.3K   393  
A design patterns approach for designing and explaining a Storage Explorer application. The application is used to explore file composition in a computer storage.
<?xml version="1.0" encoding="utf-8"?>
<root>
  <!-- 
            Microsoft ResX Schema 
        
            Version 1.3
                
            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">1.3</resheader>
                <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
                <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
                <data name="Name1">this is my long string</data>
                <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
                <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
                    [base64 mime encoded serialized .NET Framework object]
                </data>
                <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
                    [base64 mime encoded string representing a byte array form of the .NET Framework object]
                </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.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:element name="root" msdata:IsDataSet="true">
      <xsd:complexType>
        <xsd:choice maxOccurs="unbounded">
          <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" msdata:Ordinal="1" />
              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
            </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>1.3</value>
  </resheader>
  <resheader name="reader">
    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
  </resheader>
  <resheader name="writer">
    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
  </resheader>
  <data name="imageList1.Location" type="System.Drawing.Point, System.Drawing, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
    <value>17, 17</value>
  </data>
  <data name="imageList1.ImageStream" mimetype="application/x-microsoft.net.object.binary.base64">
    <value>
        AAEAAAD/////AQAAAAAAAAAMAgAAAFpTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj0xLjAuMzMw
        MC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZT
        eXN0ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMA
        AABcEwAAAk1TRnQBSQFMAgEBBwEAAQkBAAEEAQABEAEAARABAAT/ASEBEAj/AUIBTQE2BwABNgMAASgD
        AAFAAwABMAMAAQEBAAEgBgABMP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wD/AP8A/wCrAANmAf8D
        TQH/A00B/wNNAf8DTQH/A00B/wNNAf8DTQH/A00B/wNNAf8DTQH/A00B/wNmAf9TAAH/AwAB/wMAAf8D
        AAH/AwAB/wMAAf8DAAH/AwAB/wMAAf8DAAH/AwAB/wMAAf8DAAH/RAABMwGZAcwB/wEzAZkBzAH/ATMB
        mQHMAf8BAAFmAZkB/wEAAWYBmQH/AQABZgGZAf8BAAFmAZkB/wEAAWYBmQH/AQABZgGZAf8BAAFmAZkB
        /wEAAWYBmQH/AQABZgGZAf8BAAFmAZkB/wNNAf8DZgH/SAADhgH/A4YB/wOGAf8DhgH/A4YB/wOGAf8D
        hgH/A4YB/wOGAf8DhgH/A4YB/wOGAf8DAAH/AwAB/0AAATMBmQHMAf8BZgHMAv8BMwGZAcwB/wGZA/8B
        ZgHMAv8BZgHMAv8BZgHMAv8BZgHMAv8BZgHMAv8BZgHMAv8BZgHMAv8BZgHMAv8BMwGZAcwB/wGZA/8B
        AAFmAZkB/wNNAf9IAAOGBf8BAAP/A8AB/wEAA/8DwAH/AQAD/wPAAf8BAAP/A8AB/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f8DhgH/A4YB/wOGAf8DhgH/A4YB/xwAA4YD
        /wEAA/8BAAH/AQAD/wEAA/8DwAH/A8AB/wPAAf8DAAH/BAADhgH/A8AB/wEAA/8DwAH/AQAD/wPAAf8B
        AAP/A8AB/wOGAf8DhgH/A4YB/wOGAf8DhgH/A4YB/xwAA4YB/wPAAf8DwAH/A8AB/wPAAf8DwAH/A8AB
        /wPAAf8DhgH/AwAB/2AAA4YB/wOGAf8BAAP/AQAD/wPAAf8DhgH/A4YB/wwAA4YB/wPAAf8BAAP/A8AB
        /wEAA/8DwAH/A4YB/zgAA4YB/wOGAf8DhgH/A4YB/wOGAf8DhgH/A4YB/wOGAf9sAAOGAf8DhgH/A4YB
        /xgAA4YB/wOGAf8DhgH/A4YB/wOGAf//ACUAAUIBTQE+BwABPgMAASgDAAFAAwABMAMAAQEBAAEBBQAB
        gAEBFgAD/4EABv8CAAT/AcABAQIAAeABAAL/AYADAAHAAQAC/wQAAcABAAGAAQEEAAGAAQABgAEBBAAB
        gAEAAYABAQYAAcABAwYAAcEBgwYAAcABAwEAAQECAAGAAQAB4AEHAQABAwIAAYABAAHgAQcBAAEHAgAB
        gAEBAeABBwGBAf8CAAHAAX8C/wHDAf8CAAHgBf8CAAb/AgAI/wGAAQcC/wGAAQMC/wGAAQMC/wEAAQEB
        gAEBAcABAQL/AQABAQEAAQEB4AEAAYABAwEAAQEBAAEBAeACAAEBAQABAQEAAQEB8AQAAQEBAAEBAfAD
        AAGAAgABAQHwAQECAAH4AgABAQHwAQECAAH4AgABAQHwAQECAAH4AgABAQHwAQEBgAEAAfwBAQEAAQEB
        8AEBAcABAQH8AQEBAAEDAfgBAQL/Af4BAwGAAf8B/AEDA/8BjwHBCf8WAAs=
</value>
  </data>
  <data name="mainMenu1.Location" type="System.Drawing.Point, System.Drawing, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
    <value>125, 19</value>
  </data>
  <data name="$this.Name">
    <value>StorageExplorerForm</value>
  </data>
  <data name="$this.TrayHeight" type="System.Int32, mscorlib, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    <value>60</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 has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


Written By
Web Developer
Indonesia Indonesia
Breman Sinaga has 10 years experience in software design and programming.

BS Electrical Engineering, Master of IT, MCSD.

Comments and Discussions