⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 trace.cs

📁 软件工程的课程作业
💻 CS
字号:
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;

namespace PSMS
{
	/// <summary>
	/// trace 的摘要说明。
	/// </summary>
	public class trace : System.Windows.Forms.Form
	{
		private System.Windows.Forms.Label label1;
		private System.Windows.Forms.Label label2;
		private System.Windows.Forms.Label label3;
		private System.Windows.Forms.Label label4;
		private System.Windows.Forms.Label label5;
		private System.Windows.Forms.Label label6;
		private System.Windows.Forms.Label label7;
		private System.Windows.Forms.Label label8;
		public System.Windows.Forms.TextBox TraceID;
		public System.Windows.Forms.TextBox ProjectID;
		public System.Windows.Forms.ComboBox ProjectStatus;
		public System.Windows.Forms.TextBox TTime;
		public System.Windows.Forms.TextBox LinkmanID;
		public System.Windows.Forms.ComboBox TraceMethod;
		public System.Windows.Forms.TextBox MainContent;
		public System.Windows.Forms.TextBox TNote;
		public System.Windows.Forms.Button tsubmit;
		public System.Windows.Forms.Button treset;
		private System.Windows.Forms.Label label9;
		private System.Windows.Forms.Label label10;
		private System.Windows.Forms.Label label12;
		/// <summary>
		/// 必需的设计器变量。
		/// </summary>
		private System.ComponentModel.Container components = null;

		public trace()
		{
			//
			// 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()
		{
			System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(trace));
			this.label1 = new System.Windows.Forms.Label();
			this.TraceID = new System.Windows.Forms.TextBox();
			this.label2 = new System.Windows.Forms.Label();
			this.ProjectID = new System.Windows.Forms.TextBox();
			this.label3 = new System.Windows.Forms.Label();
			this.ProjectStatus = new System.Windows.Forms.ComboBox();
			this.label4 = new System.Windows.Forms.Label();
			this.TTime = new System.Windows.Forms.TextBox();
			this.label5 = new System.Windows.Forms.Label();
			this.LinkmanID = new System.Windows.Forms.TextBox();
			this.label6 = new System.Windows.Forms.Label();
			this.TraceMethod = new System.Windows.Forms.ComboBox();
			this.label7 = new System.Windows.Forms.Label();
			this.MainContent = new System.Windows.Forms.TextBox();
			this.label8 = new System.Windows.Forms.Label();
			this.TNote = new System.Windows.Forms.TextBox();
			this.tsubmit = new System.Windows.Forms.Button();
			this.treset = new System.Windows.Forms.Button();
			this.label9 = new System.Windows.Forms.Label();
			this.label10 = new System.Windows.Forms.Label();
			this.label12 = new System.Windows.Forms.Label();
			this.SuspendLayout();
			// 
			// label1
			// 
			this.label1.Location = new System.Drawing.Point(8, 16);
			this.label1.Name = "label1";
			this.label1.Size = new System.Drawing.Size(56, 16);
			this.label1.TabIndex = 0;
			this.label1.Text = "ID:";
			// 
			// TraceID
			// 
			this.TraceID.Location = new System.Drawing.Point(48, 16);
			this.TraceID.Name = "TraceID";
			this.TraceID.Size = new System.Drawing.Size(48, 21);
			this.TraceID.TabIndex = 1;
			this.TraceID.Text = "";
			// 
			// label2
			// 
			this.label2.Location = new System.Drawing.Point(144, 16);
			this.label2.Name = "label2";
			this.label2.Size = new System.Drawing.Size(64, 16);
			this.label2.TabIndex = 2;
			this.label2.Text = "项目ID:";
			// 
			// ProjectID
			// 
			this.ProjectID.Location = new System.Drawing.Point(200, 16);
			this.ProjectID.Name = "ProjectID";
			this.ProjectID.Size = new System.Drawing.Size(80, 21);
			this.ProjectID.TabIndex = 3;
			this.ProjectID.Text = "";
			// 
			// label3
			// 
			this.label3.Location = new System.Drawing.Point(8, 56);
			this.label3.Name = "label3";
			this.label3.Size = new System.Drawing.Size(72, 16);
			this.label3.TabIndex = 4;
			this.label3.Text = "项目状态:";
			// 
			// ProjectStatus
			// 
			this.ProjectStatus.Items.AddRange(new object[] {
															   "",
															   "跟踪",
															   "方案",
															   "竟标",
															   "谈判",
															   "签约",
															   "中止"});
			this.ProjectStatus.Location = new System.Drawing.Point(80, 56);
			this.ProjectStatus.Name = "ProjectStatus";
			this.ProjectStatus.Size = new System.Drawing.Size(72, 20);
			this.ProjectStatus.TabIndex = 5;
			// 
			// label4
			// 
			this.label4.Location = new System.Drawing.Point(160, 56);
			this.label4.Name = "label4";
			this.label4.Size = new System.Drawing.Size(56, 16);
			this.label4.TabIndex = 6;
			this.label4.Text = "日期:";
			// 
			// TTime
			// 
			this.TTime.Location = new System.Drawing.Point(200, 56);
			this.TTime.Name = "TTime";
			this.TTime.Size = new System.Drawing.Size(88, 21);
			this.TTime.TabIndex = 7;
			this.TTime.Text = "";
			// 
			// label5
			// 
			this.label5.Location = new System.Drawing.Point(8, 96);
			this.label5.Name = "label5";
			this.label5.Size = new System.Drawing.Size(80, 16);
			this.label5.TabIndex = 8;
			this.label5.Text = "联系人ID:";
			// 
			// LinkmanID
			// 
			this.LinkmanID.Location = new System.Drawing.Point(80, 96);
			this.LinkmanID.Name = "LinkmanID";
			this.LinkmanID.Size = new System.Drawing.Size(56, 21);
			this.LinkmanID.TabIndex = 9;
			this.LinkmanID.Text = "";
			// 
			// label6
			// 
			this.label6.Location = new System.Drawing.Point(160, 96);
			this.label6.Name = "label6";
			this.label6.Size = new System.Drawing.Size(72, 16);
			this.label6.TabIndex = 10;
			this.label6.Text = "跟踪方式:";
			// 
			// TraceMethod
			// 
			this.TraceMethod.Items.AddRange(new object[] {
															 "",
															 "电话",
															 "邮件",
															 "面谈",
															 "信函"});
			this.TraceMethod.Location = new System.Drawing.Point(224, 96);
			this.TraceMethod.Name = "TraceMethod";
			this.TraceMethod.Size = new System.Drawing.Size(64, 20);
			this.TraceMethod.TabIndex = 11;
			// 
			// label7
			// 
			this.label7.Location = new System.Drawing.Point(8, 144);
			this.label7.Name = "label7";
			this.label7.Size = new System.Drawing.Size(64, 16);
			this.label7.TabIndex = 12;
			this.label7.Text = "主要内容:";
			// 
			// MainContent
			// 
			this.MainContent.Location = new System.Drawing.Point(72, 144);
			this.MainContent.Multiline = true;
			this.MainContent.Name = "MainContent";
			this.MainContent.Size = new System.Drawing.Size(216, 48);
			this.MainContent.TabIndex = 13;
			this.MainContent.Text = "";
			// 
			// label8
			// 
			this.label8.Location = new System.Drawing.Point(8, 208);
			this.label8.Name = "label8";
			this.label8.Size = new System.Drawing.Size(64, 16);
			this.label8.TabIndex = 14;
			this.label8.Text = "备注:";
			// 
			// TNote
			// 
			this.TNote.Location = new System.Drawing.Point(72, 216);
			this.TNote.Multiline = true;
			this.TNote.Name = "TNote";
			this.TNote.Size = new System.Drawing.Size(216, 32);
			this.TNote.TabIndex = 15;
			this.TNote.Text = "";
			// 
			// tsubmit
			// 
			this.tsubmit.Location = new System.Drawing.Point(56, 264);
			this.tsubmit.Name = "tsubmit";
			this.tsubmit.TabIndex = 16;
			this.tsubmit.Text = "确定";
			this.tsubmit.Click += new System.EventHandler(this.tsubmit_Click);
			// 
			// treset
			// 
			this.treset.Location = new System.Drawing.Point(176, 264);
			this.treset.Name = "treset";
			this.treset.TabIndex = 17;
			this.treset.Text = "重置";
			this.treset.Click += new System.EventHandler(this.treset_Click);
			// 
			// label9
			// 
			this.label9.ForeColor = System.Drawing.Color.Red;
			this.label9.Location = new System.Drawing.Point(96, 16);
			this.label9.Name = "label9";
			this.label9.Size = new System.Drawing.Size(16, 16);
			this.label9.TabIndex = 25;
			this.label9.Text = "*";
			// 
			// label10
			// 
			this.label10.ForeColor = System.Drawing.Color.Red;
			this.label10.Location = new System.Drawing.Point(280, 16);
			this.label10.Name = "label10";
			this.label10.Size = new System.Drawing.Size(16, 16);
			this.label10.TabIndex = 25;
			this.label10.Text = "*";
			// 
			// label12
			// 
			this.label12.ForeColor = System.Drawing.Color.Red;
			this.label12.Location = new System.Drawing.Point(136, 96);
			this.label12.Name = "label12";
			this.label12.Size = new System.Drawing.Size(16, 16);
			this.label12.TabIndex = 25;
			this.label12.Text = "*";
			// 
			// trace
			// 
			this.AutoScaleBaseSize = new System.Drawing.Size(6, 14);
			this.BackColor = System.Drawing.Color.AliceBlue;
			this.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("$this.BackgroundImage")));
			this.ClientSize = new System.Drawing.Size(304, 302);
			this.Controls.Add(this.treset);
			this.Controls.Add(this.tsubmit);
			this.Controls.Add(this.TNote);
			this.Controls.Add(this.MainContent);
			this.Controls.Add(this.LinkmanID);
			this.Controls.Add(this.TTime);
			this.Controls.Add(this.ProjectID);
			this.Controls.Add(this.TraceID);
			this.Controls.Add(this.label8);
			this.Controls.Add(this.label7);
			this.Controls.Add(this.TraceMethod);
			this.Controls.Add(this.label6);
			this.Controls.Add(this.label5);
			this.Controls.Add(this.label4);
			this.Controls.Add(this.ProjectStatus);
			this.Controls.Add(this.label3);
			this.Controls.Add(this.label2);
			this.Controls.Add(this.label1);
			this.Controls.Add(this.label9);
			this.Controls.Add(this.label10);
			this.Controls.Add(this.label12);
			this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
			this.MaximizeBox = false;
			this.MaximumSize = new System.Drawing.Size(312, 336);
			this.MinimumSize = new System.Drawing.Size(312, 336);
			this.Name = "trace";
			this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
			this.Text = "trace 带*号栏为必填栏";
			this.ResumeLayout(false);

		}
		#endregion

		private void tsubmit_Click(object sender, System.EventArgs e)
		{
			if(TNote.Enabled == true && TraceID.Text == "")
				MessageBox.Show("Please Input TraceID!");
			else 
			{
				tsubmit.BackColor = Color.GreenYellow;
				Close();
			}
		}

		private void treset_Click(object sender, System.EventArgs e)
		{
			TraceID.Clear();
			TraceMethod.SelectedIndex = -1;
			MainContent.Clear();
			TNote.Clear();
			ProjectID.Clear();
			ProjectStatus.SelectedIndex = -1;
			LinkmanID.Clear();
			TTime.Clear();
		}
	}
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -