|
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using Microsoft.WindowsCE.Forms;
namespace CF_Proj_Mgr
{
/// <summary>
/// Summary description for StatusDlg.
/// </summary>
public class NoteDlg : System.Windows.Forms.Form
{
private Microsoft.WindowsCE.Forms.InputPanel inputPanel1;
private System.Windows.Forms.MainMenu mainMenu1;
private System.Windows.Forms.TextBox noteText;
private System.Windows.Forms.Label noteDate;
private note currentNote;
public NoteDlg()
{
//
// Required for Windows Form Designer support
//
InitializeComponent();
//
// TODO: Add any constructor code after InitializeComponent call
//
currentNote = new note();
}
public NoteDlg( note n )
{
//
// Required for Windows Form Designer support
//
InitializeComponent();
//
// TODO: Add any constructor code after InitializeComponent call
//
currentNote = n;
}
/// <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.noteDate = new System.Windows.Forms.Label();
this.noteText = new System.Windows.Forms.TextBox();
//
// noteDate
//
this.noteDate.Location = new System.Drawing.Point(0, 8);
this.noteDate.Size = new System.Drawing.Size(192, 16);
//
// noteText
//
this.noteText.Location = new System.Drawing.Point(0, 32);
this.noteText.Multiline = true;
this.noteText.Size = new System.Drawing.Size(240, 120);
this.noteText.Text = "";
//
// NoteDlg
//
this.Controls.Add(this.noteDate);
this.Controls.Add(this.noteText);
this.Menu = this.mainMenu1;
this.Text = "NoteDlg";
this.Closing += new System.ComponentModel.CancelEventHandler(this.FormClosing);
this.Load += new System.EventHandler(this.FormLoad);
}
#endregion
private void FormClosing(object sender, System.ComponentModel.CancelEventArgs e)
{
currentNote.Date = DateTime.Now;
currentNote.Text = noteText.Text;
}
private void FormLoad(object sender, System.EventArgs e)
{
inputPanel1 = new InputPanel();
noteDate.Text = currentNote.Date.ToString();
noteText.Text = currentNote.Text;
noteText.Focus();
}
}
}
|
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.
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.