?? form4.cs
字號:
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
namespace WindowsApplication1
{
/// <summary>
/// Form4 的摘要說明。
/// </summary>
public class Form4 : System.Windows.Forms.Form
{
private System.Windows.Forms.Button button3;
private System.Windows.Forms.Button button4;
private System.Windows.Forms.Button button5;
private System.Windows.Forms.TextBox textBox1;
private System.Windows.Forms.TextBox textBox2;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label3;
/// <summary>
/// 必需的設計器變量。
/// </summary>
private System.ComponentModel.Container components = null;
public Form4()
{
//
// 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(Form4));
this.button3 = new System.Windows.Forms.Button();
this.button4 = new System.Windows.Forms.Button();
this.button5 = new System.Windows.Forms.Button();
this.textBox1 = new System.Windows.Forms.TextBox();
this.textBox2 = new System.Windows.Forms.TextBox();
this.label1 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label();
this.SuspendLayout();
//
// button3
//
this.button3.BackColor = System.Drawing.Color.FromArgb(((System.Byte)(255)), ((System.Byte)(128)), ((System.Byte)(255)));
this.button3.Font = new System.Drawing.Font("宋體", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
this.button3.Location = new System.Drawing.Point(32, 200);
this.button3.Name = "button3";
this.button3.Size = new System.Drawing.Size(56, 32);
this.button3.TabIndex = 2;
this.button3.Text = "計算";
this.button3.Click += new System.EventHandler(this.button3_Click);
//
// button4
//
this.button4.BackColor = System.Drawing.Color.FromArgb(((System.Byte)(255)), ((System.Byte)(128)), ((System.Byte)(255)));
this.button4.Font = new System.Drawing.Font("宋體", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
this.button4.Location = new System.Drawing.Point(128, 200);
this.button4.Name = "button4";
this.button4.Size = new System.Drawing.Size(56, 32);
this.button4.TabIndex = 3;
this.button4.Text = "清除";
this.button4.Click += new System.EventHandler(this.button4_Click);
//
// button5
//
this.button5.BackColor = System.Drawing.Color.FromArgb(((System.Byte)(255)), ((System.Byte)(128)), ((System.Byte)(255)));
this.button5.Font = new System.Drawing.Font("宋體", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
this.button5.Location = new System.Drawing.Point(216, 200);
this.button5.Name = "button5";
this.button5.Size = new System.Drawing.Size(56, 32);
this.button5.TabIndex = 4;
this.button5.Text = "退出";
this.button5.Click += new System.EventHandler(this.button5_Click);
//
// textBox1
//
this.textBox1.Location = new System.Drawing.Point(152, 72);
this.textBox1.Name = "textBox1";
this.textBox1.Size = new System.Drawing.Size(88, 21);
this.textBox1.TabIndex = 5;
this.textBox1.Text = "";
//
// textBox2
//
this.textBox2.Location = new System.Drawing.Point(152, 120);
this.textBox2.Name = "textBox2";
this.textBox2.Size = new System.Drawing.Size(88, 21);
this.textBox2.TabIndex = 6;
this.textBox2.Text = "";
this.textBox2.TextChanged += new System.EventHandler(this.textBox2_TextChanged);
//
// label1
//
this.label1.BackColor = System.Drawing.Color.FromArgb(((System.Byte)(128)), ((System.Byte)(255)), ((System.Byte)(128)));
this.label1.Font = new System.Drawing.Font("宋體", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
this.label1.Location = new System.Drawing.Point(32, 72);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(96, 32);
this.label1.TabIndex = 7;
this.label1.Text = "員工基本工資";
//
// label2
//
this.label2.BackColor = System.Drawing.Color.FromArgb(((System.Byte)(128)), ((System.Byte)(255)), ((System.Byte)(128)));
this.label2.Font = new System.Drawing.Font("宋體", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
this.label2.Location = new System.Drawing.Point(32, 120);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(96, 32);
this.label2.TabIndex = 8;
this.label2.Text = "增加后的工資";
//
// label3
//
this.label3.BackColor = System.Drawing.Color.Aqua;
this.label3.Font = new System.Drawing.Font("楷體_GB2312", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
this.label3.ForeColor = System.Drawing.Color.Red;
this.label3.Location = new System.Drawing.Point(8, 16);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(296, 40);
this.label3.TabIndex = 9;
this.label3.Text = "征途網絡科技公司員工加工資";
//
// Form4
//
this.AutoScaleBaseSize = new System.Drawing.Size(6, 14);
this.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("$this.BackgroundImage")));
this.ClientSize = new System.Drawing.Size(344, 290);
this.Controls.Add(this.label3);
this.Controls.Add(this.label2);
this.Controls.Add(this.label1);
this.Controls.Add(this.textBox2);
this.Controls.Add(this.textBox1);
this.Controls.Add(this.button5);
this.Controls.Add(this.button4);
this.Controls.Add(this.button3);
this.Name = "Form4";
this.Load += new System.EventHandler(this.Form4_Load);
this.ResumeLayout(false);
}
#endregion
private void textBox2_TextChanged(object sender, System.EventArgs e)
{
}
private void button4_Click(object sender, System.EventArgs e)
{
textBox1.Text="";
textBox2.Text="";
}
private void button5_Click(object sender, System.EventArgs e)
{
this.Close();
}
private void button3_Click(object sender, System.EventArgs e)
{
double a,b;
a=double.Parse(textBox1.Text);
if (a>=600)
{
b=1.2*a;
textBox2.Text=b.ToString();
}
if (a>=400&&a<600)
{
b=1.15*a;
textBox2.Text=b.ToString();
}
if (a<=400)
{
b=1.1*a;
textBox2.Text=b.ToString();
}
}
private void Form4_Load(object sender, System.EventArgs e)
{
}
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -