Click here to Skip to main content
15,893,814 members
Articles / Web Development / HTML

XML Data Files, XML Serialization, and .NET

Rate me:
Please Sign up or sign in to vote.
4.82/5 (28 votes)
27 Aug 200317 min read 340.4K   6.4K   130  
Describes a means to build XML data files using XML Schema and xsd.exe to facilitate easy XML Serialization
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;

namespace CardfileSerializationDemo
{
	/// <summary>
	/// Summary description for frmNote.
	/// </summary>
	public class frmNote : frmCardEdit
	{
		private System.Windows.Forms.TextBox tbNoteText;
		private System.Windows.Forms.Label label3;
		/// <summary>
		/// Required designer variable.
		/// </summary>
		private System.ComponentModel.Container components = null;

		public frmNote()
		{
			//
			// Required for Windows Form Designer support
			//
			InitializeComponent();

			//
			// TODO: Add any constructor code after InitializeComponent call
			//
		}

		/// <summary>
		/// Clean up any resources being used.
		/// </summary>
		protected override void Dispose( bool disposing )
		{
			if( disposing )
			{
				if(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.tbNoteText = new System.Windows.Forms.TextBox();
			this.label3 = new System.Windows.Forms.Label();
			this.SuspendLayout();
			// 
			// tbNoteText
			// 
			this.tbNoteText.Anchor = (((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
				| System.Windows.Forms.AnchorStyles.Left) 
				| System.Windows.Forms.AnchorStyles.Right);
			this.tbNoteText.Location = new System.Drawing.Point(8, 56);
			this.tbNoteText.Multiline = true;
			this.tbNoteText.Name = "tbNoteText";
			this.tbNoteText.ScrollBars = System.Windows.Forms.ScrollBars.Vertical;
			this.tbNoteText.Size = new System.Drawing.Size(440, 168);
			this.tbNoteText.TabIndex = 11;
			this.tbNoteText.Text = "";
			// 
			// label3
			// 
			this.label3.Location = new System.Drawing.Point(8, 32);
			this.label3.Name = "label3";
			this.label3.TabIndex = 10;
			this.label3.Text = "&Text:";
			this.label3.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
			// 
			// frmNote
			// 
			this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
			this.ClientSize = new System.Drawing.Size(456, 261);
			this.Controls.AddRange(new System.Windows.Forms.Control[] {
																		  this.tbNoteText,
																		  this.label3});
			this.Name = "frmNote";
			this.ShowInTaskbar = false;
			this.Text = "New Note";
			this.ResumeLayout(false);

		}
		#endregion

		public string NoteText
		{
			get { return tbNoteText.Text; }
			set { tbNoteText.Text = value; }
		}
	}
}

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.


Written By
United States United States
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions