Click here to Skip to main content
15,886,666 members
Articles / Programming Languages / XML

Create Data Classes

Rate me:
Please Sign up or sign in to vote.
4.88/5 (31 votes)
4 Mar 2011CPOL10 min read 135.5K   2.5K   167  
An application that creates a C# class to read/write data to/from an Access, SQLite, or XML database.
namespace JGCreateDataClasses
{
	partial class FormReadAccessDB
	{
		/// <summary>
		/// Required designer variable.
		/// </summary>
		private System.ComponentModel.IContainer components = null;

		/// <summary>
		/// Clean up any resources being used.
		/// </summary>
		/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
		protected override void Dispose(bool disposing)
		{
			if (disposing && (components != null))
			{
				components.Dispose();
			}
			base.Dispose(disposing);
		}

		#region Windows Form Designer generated code

		/// <summary>
		/// Required method for Designer support - do not modify
		/// the contents of this method with the code editor.
		/// </summary>
		private void InitializeComponent()
		{
			this.statusStrip1 = new System.Windows.Forms.StatusStrip();
			this.tslblMessage = new System.Windows.Forms.ToolStripStatusLabel();
			this.label12 = new System.Windows.Forms.Label();
			this.label11 = new System.Windows.Forms.Label();
			this.btnReadAccessFields = new System.Windows.Forms.Button();
			this.groupBox3 = new System.Windows.Forms.GroupBox();
			this.rbAccessPrevious = new System.Windows.Forms.RadioButton();
			this.rbAccess12 = new System.Windows.Forms.RadioButton();
			this.lstAccessTables = new System.Windows.Forms.ListBox();
			this.btnClose = new System.Windows.Forms.Button();
			this.groupBox1 = new System.Windows.Forms.GroupBox();
			this.rbAppendData = new System.Windows.Forms.RadioButton();
			this.rbReplaceData = new System.Windows.Forms.RadioButton();
			this.jFileFolderPicker1 = new JGFileFolderPicker.JFileFolderPicker();
			this.statusStrip1.SuspendLayout();
			this.groupBox3.SuspendLayout();
			this.groupBox1.SuspendLayout();
			this.SuspendLayout();
			// 
			// statusStrip1
			// 
			this.statusStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
            this.tslblMessage});
			this.statusStrip1.Location = new System.Drawing.Point(0, 350);
			this.statusStrip1.Name = "statusStrip1";
			this.statusStrip1.Size = new System.Drawing.Size(399, 22);
			this.statusStrip1.SizingGrip = false;
			this.statusStrip1.TabIndex = 0;
			this.statusStrip1.Text = "statusStrip1";
			// 
			// tslblMessage
			// 
			this.tslblMessage.Name = "tslblMessage";
			this.tslblMessage.Size = new System.Drawing.Size(384, 17);
			this.tslblMessage.Spring = true;
			this.tslblMessage.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
			// 
			// label12
			// 
			this.label12.AutoSize = true;
			this.label12.Location = new System.Drawing.Point(12, 121);
			this.label12.Name = "label12";
			this.label12.Size = new System.Drawing.Size(185, 13);
			this.label12.TabIndex = 47;
			this.label12.Text = "Tables Found In Selected Access DB";
			// 
			// label11
			// 
			this.label11.AutoSize = true;
			this.label11.Location = new System.Drawing.Point(12, 78);
			this.label11.Name = "label11";
			this.label11.Size = new System.Drawing.Size(164, 13);
			this.label11.TabIndex = 46;
			this.label11.Text = "Enter/Pick Access Database File";
			// 
			// btnReadAccessFields
			// 
			this.btnReadAccessFields.Enabled = false;
			this.btnReadAccessFields.Location = new System.Drawing.Point(24, 321);
			this.btnReadAccessFields.Name = "btnReadAccessFields";
			this.btnReadAccessFields.Size = new System.Drawing.Size(90, 23);
			this.btnReadAccessFields.TabIndex = 44;
			this.btnReadAccessFields.Text = "Read Fields";
			this.btnReadAccessFields.UseVisualStyleBackColor = true;
			this.btnReadAccessFields.Click += new System.EventHandler(this.btnReadAccessFields_Click);
			// 
			// groupBox3
			// 
			this.groupBox3.Controls.Add(this.rbAccessPrevious);
			this.groupBox3.Controls.Add(this.rbAccess12);
			this.groupBox3.Location = new System.Drawing.Point(12, 12);
			this.groupBox3.Name = "groupBox3";
			this.groupBox3.Size = new System.Drawing.Size(363, 55);
			this.groupBox3.TabIndex = 43;
			this.groupBox3.TabStop = false;
			this.groupBox3.Text = "Select Access Version";
			// 
			// rbAccessPrevious
			// 
			this.rbAccessPrevious.AutoSize = true;
			this.rbAccessPrevious.CheckAlign = System.Drawing.ContentAlignment.MiddleRight;
			this.rbAccessPrevious.Location = new System.Drawing.Point(149, 25);
			this.rbAccessPrevious.Name = "rbAccessPrevious";
			this.rbAccessPrevious.Size = new System.Drawing.Size(178, 17);
			this.rbAccessPrevious.TabIndex = 1;
			this.rbAccessPrevious.Text = "Previous Access Version (*.mdb)";
			this.rbAccessPrevious.UseVisualStyleBackColor = true;
			this.rbAccessPrevious.CheckedChanged += new System.EventHandler(this.rbAccessPrevious_CheckedChanged);
			// 
			// rbAccess12
			// 
			this.rbAccess12.AutoSize = true;
			this.rbAccess12.CheckAlign = System.Drawing.ContentAlignment.MiddleRight;
			this.rbAccess12.Checked = true;
			this.rbAccess12.Location = new System.Drawing.Point(23, 25);
			this.rbAccess12.Name = "rbAccess12";
			this.rbAccess12.Size = new System.Drawing.Size(121, 17);
			this.rbAccess12.TabIndex = 0;
			this.rbAccess12.TabStop = true;
			this.rbAccess12.Text = "Access 12 (*.accdb)";
			this.rbAccess12.UseVisualStyleBackColor = true;
			this.rbAccess12.CheckedChanged += new System.EventHandler(this.rbAccess12_CheckedChanged);
			// 
			// lstAccessTables
			// 
			this.lstAccessTables.FormattingEnabled = true;
			this.lstAccessTables.Location = new System.Drawing.Point(24, 142);
			this.lstAccessTables.Name = "lstAccessTables";
			this.lstAccessTables.Size = new System.Drawing.Size(351, 108);
			this.lstAccessTables.TabIndex = 41;
			this.lstAccessTables.SelectedIndexChanged += new System.EventHandler(this.lstAccessTables_SelectedIndexChanged);
			// 
			// btnClose
			// 
			this.btnClose.DialogResult = System.Windows.Forms.DialogResult.Cancel;
			this.btnClose.Location = new System.Drawing.Point(297, 321);
			this.btnClose.Name = "btnClose";
			this.btnClose.Size = new System.Drawing.Size(90, 23);
			this.btnClose.TabIndex = 48;
			this.btnClose.Text = "Close";
			this.btnClose.UseVisualStyleBackColor = true;
			this.btnClose.Click += new System.EventHandler(this.btnClose_Click);
			// 
			// groupBox1
			// 
			this.groupBox1.Controls.Add(this.rbAppendData);
			this.groupBox1.Controls.Add(this.rbReplaceData);
			this.groupBox1.Location = new System.Drawing.Point(15, 256);
			this.groupBox1.Name = "groupBox1";
			this.groupBox1.Size = new System.Drawing.Size(372, 47);
			this.groupBox1.TabIndex = 49;
			this.groupBox1.TabStop = false;
			this.groupBox1.Text = "Add/Append Data";
			// 
			// rbAppendData
			// 
			this.rbAppendData.CheckAlign = System.Drawing.ContentAlignment.MiddleRight;
			this.rbAppendData.Location = new System.Drawing.Point(203, 21);
			this.rbAppendData.Name = "rbAppendData";
			this.rbAppendData.Size = new System.Drawing.Size(147, 17);
			this.rbAppendData.TabIndex = 1;
			this.rbAppendData.Text = "Append To Existing Data";
			this.rbAppendData.UseVisualStyleBackColor = true;
			// 
			// rbReplaceData
			// 
			this.rbReplaceData.CheckAlign = System.Drawing.ContentAlignment.MiddleRight;
			this.rbReplaceData.Checked = true;
			this.rbReplaceData.Location = new System.Drawing.Point(25, 21);
			this.rbReplaceData.Name = "rbReplaceData";
			this.rbReplaceData.Size = new System.Drawing.Size(147, 17);
			this.rbReplaceData.TabIndex = 0;
			this.rbReplaceData.TabStop = true;
			this.rbReplaceData.Text = "Replace Existing Data";
			this.rbReplaceData.UseVisualStyleBackColor = true;
			// 
			// jFileFolderPicker1
			// 
			this.jFileFolderPicker1.BackColor = System.Drawing.SystemColors.Window;
			this.jFileFolderPicker1.BorderColour = System.Drawing.Color.SteelBlue;
			this.jFileFolderPicker1.FileFilter = "All Files (*.*)|*.*";
			this.jFileFolderPicker1.ForeColor = System.Drawing.SystemColors.WindowText;
			this.jFileFolderPicker1.InitialDirectory = "D:\\Data\\Database";
			this.jFileFolderPicker1.Location = new System.Drawing.Point(24, 94);
			this.jFileFolderPicker1.Name = "jFileFolderPicker1";
			this.jFileFolderPicker1.PickMode = JGFileFolderPicker.JFileFolderPicker.PickModes.File;
			this.jFileFolderPicker1.Size = new System.Drawing.Size(351, 21);
			this.jFileFolderPicker1.TabIndex = 1;
			this.jFileFolderPicker1.TextBackColor = System.Drawing.SystemColors.Window;
			this.jFileFolderPicker1.TextFont = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
			this.jFileFolderPicker1.TextForeColor = System.Drawing.SystemColors.WindowText;
			this.jFileFolderPicker1.ToolTipText = "";
			this.jFileFolderPicker1.PathSelected += new System.EventHandler<JGFileFolderPicker.PathArgs>(this.jFileFolderPicker1_OnPathSelectedHandler);
			// 
			// FormReadAccessDB
			// 
			this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
			this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
			this.ClientSize = new System.Drawing.Size(399, 372);
			this.ControlBox = false;
			this.Controls.Add(this.jFileFolderPicker1);
			this.Controls.Add(this.groupBox1);
			this.Controls.Add(this.btnClose);
			this.Controls.Add(this.label12);
			this.Controls.Add(this.label11);
			this.Controls.Add(this.btnReadAccessFields);
			this.Controls.Add(this.groupBox3);
			this.Controls.Add(this.lstAccessTables);
			this.Controls.Add(this.statusStrip1);
			this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
			this.Name = "FormReadAccessDB";
			this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
			this.Text = "Read Existing Access DB Into Variables List";
			this.Load += new System.EventHandler(this.FormReadAccessDB_Load);
			this.statusStrip1.ResumeLayout(false);
			this.statusStrip1.PerformLayout();
			this.groupBox3.ResumeLayout(false);
			this.groupBox3.PerformLayout();
			this.groupBox1.ResumeLayout(false);
			this.ResumeLayout(false);
			this.PerformLayout();

		}

		#endregion

		private System.Windows.Forms.StatusStrip statusStrip1;
		private System.Windows.Forms.ToolStripStatusLabel tslblMessage;
		private System.Windows.Forms.Label label12;
		private System.Windows.Forms.Label label11;
		private System.Windows.Forms.Button btnReadAccessFields;
		private System.Windows.Forms.GroupBox groupBox3;
		private System.Windows.Forms.RadioButton rbAccessPrevious;
		private System.Windows.Forms.RadioButton rbAccess12;
		private System.Windows.Forms.ListBox lstAccessTables;
		private System.Windows.Forms.Button btnClose;
		private System.Windows.Forms.GroupBox groupBox1;
		private System.Windows.Forms.RadioButton rbAppendData;
		private System.Windows.Forms.RadioButton rbReplaceData;
		private JGFileFolderPicker.JFileFolderPicker jFileFolderPicker1;
	}
}

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
Retired
United Kingdom United Kingdom
I have been a keen hobbyist programmer since getting my first computer - a Vic 20 (you had to be able to write programs then since few programs were available and all were expensive).
Retired and now living in Pewsey, Wiltshire, where I spend (far too much of) my time writing computer programs to keep my mind active.

Comments and Discussions