using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;

namespace JXC_MIS.UserTier.ToolForm
{
	/// <summary>
	/// frmNote 的摘要说明。
	/// </summary>
	public class frmTempNote : System.Windows.Forms.Form
	{
		private System.Windows.Forms.TextBox txt_Note;
		/// <summary>
		/// 必需的设计器变量。
		/// </summary>
		private System.ComponentModel.Container components = null;
		private System.Windows.Forms.ToolBar tbr_Tool;
		private System.Windows.Forms.ToolBarButton t_Ok;
		private System.Windows.Forms.ToolBarButton t_Exit;
		private System.Windows.Forms.ToolBarButton t_cancel;
        private string m_NoteText;

		public string NoteText
		{
			get {return m_NoteText;} 
			set { m_NoteText=value;} 
		
		}
	    
		public frmTempNote()
		{
			//
			// Windows 窗体设计器支持所必需的
			//
			InitializeComponent();

			//
			// TODO: 在 InitializeComponent 调用后添加任何构造函数代码
			//
		}

		/// <summary>
		/// 清理所有正在使用的资源。
		/// </summary>
		protected override void Dispose( bool disposing )
		{
			if( disposing )
			{
				if(components != null)
				{
					components.Dispose();
				}
			}
			base.Dispose( disposing );
		}

		#region Windows 窗体设计器生成的代码
		/// <summary>
		/// 设计器支持所需的方法 - 不要使用代码编辑器修改
		/// 此方法的内容。
		/// </summary>
		private void InitializeComponent()
		{
			this.txt_Note = new System.Windows.Forms.TextBox();
			this.tbr_Tool = new System.Windows.Forms.ToolBar();
			this.t_Ok = new System.Windows.Forms.ToolBarButton();
			this.t_cancel = new System.Windows.Forms.ToolBarButton();
			this.t_Exit = new System.Windows.Forms.ToolBarButton();
			this.SuspendLayout();
			// 
			// txt_Note
			// 
			this.txt_Note.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 
				| System.Windows.Forms.AnchorStyles.Left) 
				| System.Windows.Forms.AnchorStyles.Right)));
			this.txt_Note.Location = new System.Drawing.Point(2, 42);
			this.txt_Note.Multiline = true;
			this.txt_Note.Name = "txt_Note";
			this.txt_Note.ScrollBars = System.Windows.Forms.ScrollBars.Vertical;
			this.txt_Note.Size = new System.Drawing.Size(608, 424);
			this.txt_Note.TabIndex = 0;
			this.txt_Note.Text = "";
			// 
			// tbr_Tool
			// 
			this.tbr_Tool.Appearance = System.Windows.Forms.ToolBarAppearance.Flat;
			this.tbr_Tool.Buttons.AddRange(new System.Windows.Forms.ToolBarButton[] {
																						this.t_Ok,
																						this.t_cancel,
																						this.t_Exit});
			this.tbr_Tool.DropDownArrows = true;
			this.tbr_Tool.Location = new System.Drawing.Point(0, 0);
			this.tbr_Tool.Name = "tbr_Tool";
			this.tbr_Tool.ShowToolTips = true;
			this.tbr_Tool.Size = new System.Drawing.Size(610, 41);
			this.tbr_Tool.TabIndex = 1;
			this.tbr_Tool.ButtonClick += new System.Windows.Forms.ToolBarButtonClickEventHandler(this.tbr_Tool_ButtonClick);
			// 
			// t_Ok
			// 
			this.t_Ok.Text = "确定";
			// 
			// t_cancel
			// 
			this.t_cancel.Text = "取消";
			// 
			// t_Exit
			// 
			this.t_Exit.Text = "退出";
			// 
			// frmTempNote
			// 
			this.AutoScaleBaseSize = new System.Drawing.Size(6, 14);
			this.ClientSize = new System.Drawing.Size(610, 467);
			this.Controls.Add(this.txt_Note);
			this.Controls.Add(this.tbr_Tool);
			this.Name = "frmTempNote";
			this.Text = "临时写字板";
			this.Load += new System.EventHandler(this.frmTempNote_Load);
			this.ResumeLayout(false);

		}
		#endregion

		private void frmTempNote_Load(object sender, System.EventArgs e)
		{
			txt_Note.Text =m_NoteText;
			}

		private void tbr_Tool_ButtonClick(object sender, System.Windows.Forms.ToolBarButtonClickEventArgs e)
		{
			switch (e.Button.Text)
			{
				
				case "确定":

					m_NoteText=txt_Note.Text;
					this.Close();

					break;
				case "取消":
					this.Close();
					break;

				case "退出":
					this.Close();
					break;

				default:
 
					break;
			}
		}
	}
}
