?? stat_of_protrace.cs
字號:
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
namespace PSMS
{
/// <summary>
/// Summary description for stat_of_protrace.
/// </summary>
public class stat_of_protrace : System.Windows.Forms.Form
{
public System.Windows.Forms.TextBox starttime;
public System.Windows.Forms.TextBox endtime;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label label2;
public System.Windows.Forms.Button submit;
private System.Windows.Forms.Button cancel;
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.Container components = null;
public stat_of_protrace()
{
//
// 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()
{
System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(stat_of_protrace));
this.starttime = new System.Windows.Forms.TextBox();
this.endtime = new System.Windows.Forms.TextBox();
this.submit = new System.Windows.Forms.Button();
this.cancel = new System.Windows.Forms.Button();
this.label1 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.SuspendLayout();
//
// starttime
//
this.starttime.Location = new System.Drawing.Point(128, 24);
this.starttime.Name = "starttime";
this.starttime.Size = new System.Drawing.Size(128, 21);
this.starttime.TabIndex = 0;
this.starttime.Text = "";
//
// endtime
//
this.endtime.Location = new System.Drawing.Point(128, 64);
this.endtime.Name = "endtime";
this.endtime.Size = new System.Drawing.Size(128, 21);
this.endtime.TabIndex = 1;
this.endtime.Text = "";
//
// submit
//
this.submit.Location = new System.Drawing.Point(48, 112);
this.submit.Name = "submit";
this.submit.TabIndex = 2;
this.submit.Text = "確定";
this.submit.Click += new System.EventHandler(this.submit_Click);
//
// cancel
//
this.cancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.cancel.Location = new System.Drawing.Point(160, 112);
this.cancel.Name = "cancel";
this.cancel.TabIndex = 3;
this.cancel.Text = "取消";
//
// label1
//
this.label1.Location = new System.Drawing.Point(16, 24);
this.label1.Name = "label1";
this.label1.TabIndex = 4;
this.label1.Text = "統計開始日期:";
//
// label2
//
this.label2.Location = new System.Drawing.Point(16, 64);
this.label2.Name = "label2";
this.label2.TabIndex = 5;
this.label2.Text = "統計結束日期:";
//
// stat_of_protrace
//
this.AutoScaleBaseSize = new System.Drawing.Size(6, 14);
this.BackColor = System.Drawing.Color.AliceBlue;
this.CancelButton = this.cancel;
this.ClientSize = new System.Drawing.Size(280, 150);
this.Controls.Add(this.label2);
this.Controls.Add(this.label1);
this.Controls.Add(this.cancel);
this.Controls.Add(this.submit);
this.Controls.Add(this.endtime);
this.Controls.Add(this.starttime);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.MaximizeBox = false;
this.MaximumSize = new System.Drawing.Size(288, 184);
this.MinimumSize = new System.Drawing.Size(288, 184);
this.Name = "stat_of_protrace";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "stat_of_protrace";
this.ResumeLayout(false);
}
#endregion
private void submit_Click(object sender, System.EventArgs e)
{
if(starttime.Text == "" || endtime.Text == "")
MessageBox.Show("Please Input Starttime and Endtime!");
else
{
try
{
DateTime.Parse(starttime.Text);
DateTime.Parse(endtime.Text);
}
catch(System.Exception ie)
{
MessageBox.Show(""+ie.Message);
return;
}
submit.BackColor = Color.GreenYellow;
Close();
}
}
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -