Click here to Skip to main content
15,886,032 members
Articles / Mobile Apps

Compact Framework Project Manager

Rate me:
Please Sign up or sign in to vote.
3.77/5 (18 votes)
2 Jun 2004CPOL5 min read 61.4K   156   31  
A real world example of storing and retrieving XML files and sending them across IR ports.
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;

namespace CF_Proj_Mgr
{
	/// <summary>
	/// Summary description for ToDoDlg.
	/// </summary>
	public class ToDoDlg : System.Windows.Forms.Form
	{
		private System.Windows.Forms.Label label1;
		public System.Windows.Forms.TextBox Name;
		public System.Windows.Forms.CheckBox Done;
		private System.Windows.Forms.Label label2;
		private System.Windows.Forms.TextBox ToDoDate;
		private System.Windows.Forms.MainMenu mainMenu1;
		todo currentToDo;
	
		public ToDoDlg( todo t )
		{
			//
			// Required for Windows Form Designer support
			//
			InitializeComponent();

			currentToDo = t;
		}

		/// <summary>
		/// Clean up any resources being used.
		/// </summary>
		protected override void Dispose( bool disposing )
		{
			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.mainMenu1 = new System.Windows.Forms.MainMenu();
			this.label1 = new System.Windows.Forms.Label();
			this.Name = new System.Windows.Forms.TextBox();
			this.Done = new System.Windows.Forms.CheckBox();
			this.label2 = new System.Windows.Forms.Label();
			this.ToDoDate = new System.Windows.Forms.TextBox();
			// 
			// label1
			// 
			this.label1.Location = new System.Drawing.Point(8, 16);
			this.label1.Size = new System.Drawing.Size(56, 24);
			this.label1.Text = "To Do:";
			// 
			// Name
			// 
			this.Name.Location = new System.Drawing.Point(72, 16);
			this.Name.Size = new System.Drawing.Size(136, 22);
			this.Name.Text = "";
			// 
			// Done
			// 
			this.Done.Location = new System.Drawing.Point(72, 56);
			this.Done.Size = new System.Drawing.Size(72, 16);
			this.Done.Text = "Done";
			// 
			// label2
			// 
			this.label2.Location = new System.Drawing.Point(16, 88);
			this.label2.Size = new System.Drawing.Size(72, 16);
			this.label2.Text = "Target Date";
			// 
			// ToDoDate
			// 
			this.ToDoDate.Location = new System.Drawing.Point(104, 88);
			this.ToDoDate.Size = new System.Drawing.Size(112, 22);
			this.ToDoDate.Text = "";
			// 
			// ToDoDlg
			// 
			this.Controls.Add(this.ToDoDate);
			this.Controls.Add(this.label2);
			this.Controls.Add(this.Done);
			this.Controls.Add(this.Name);
			this.Controls.Add(this.label1);
			this.Menu = this.mainMenu1;
			this.Text = "ToDoDlg";
			this.Closing += new System.ComponentModel.CancelEventHandler(this.ToDoDlg_Closing);
			this.Load += new System.EventHandler(this.ToDoDlg_FormLoad);

		}
		#endregion

		private void ToDoDlg_FormLoad(object sender, System.EventArgs e)
		{
			Name.Text = currentToDo.Name;
			Done.Checked = currentToDo.Done;
			ToDoDate.Text = currentToDo.DueDate.ToString();
			Name.Focus();
			
		}

		private void ToDoDlg_Closing(object sender, System.ComponentModel.CancelEventArgs e)
		{
			currentToDo.Name = Name.Text;
			currentToDo.Done = Done.Checked;
			currentToDo.DueDate = DateTime.Parse(ToDoDate.Text);
		}
	}
}

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
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