1、计算器c#程序设计namespace MyCalculator partial class Calculator / / 必?需的?设计?器变?量?。 / private System.ComponentModel.IContainer components = null; / / 清?理所有D正y在使1用?的?资源。 / / 如?果?应|释放?托D管资源,?为a true;?否?则为a false。 protected override void Dispose(bool disposing) if (disposing & (components != null) components.D
2、ispose(); base.Dispose(disposing); #region Windows 窗体?设计?器生成的?代码? / / 设计?器支持?所需的?方?法 - 不?要a / 使1用?代码?编辑-器修T改?此?方?法的?内容Y。 / private void InitializeComponent() this.num7 = new System.Windows.Forms.Button(); this.num8 = new System.Windows.Forms.Button(); this.num9 = new System.Windows.Forms.Button(); t
3、his.button4 = new System.Windows.Forms.Button(); this.button5 = new System.Windows.Forms.Button(); this.num4 = new System.Windows.Forms.Button(); this.num5 = new System.Windows.Forms.Button(); this.num6 = new System.Windows.Forms.Button(); this.button9 = new System.Windows.Forms.Button(); this.num1
4、= new System.Windows.Forms.Button(); this.button11 = new System.Windows.Forms.Button(); this.num2 = new System.Windows.Forms.Button(); this.num3 = new System.Windows.Forms.Button(); this.button14 = new System.Windows.Forms.Button(); this.button15 = new System.Windows.Forms.Button(); this.num0 = new
5、System.Windows.Forms.Button(); this.button17 = new System.Windows.Forms.Button(); this.button18 = new System.Windows.Forms.Button(); this.button19 = new System.Windows.Forms.Button(); this.button20 = new System.Windows.Forms.Button(); this.button21 = new System.Windows.Forms.Button(); this.button22
6、= new System.Windows.Forms.Button(); this.button23 = new System.Windows.Forms.Button(); this.textBox1 = new System.Windows.Forms.TextBox(); this.SuspendLayout(); / / num7 / this.num7.ForeColor = System.Drawing.Color.Blue; this.num7.Location = new System.Drawing.Point(12, 63); this.num7.Name = num7;
7、this.num7.Size = new System.Drawing.Size(37, 29); this.num7.TabIndex = 0; this.num7.Text = 7; this.num7.UseVisualStyleBackColor = true; / / num8 / this.num8.ForeColor = System.Drawing.Color.Blue; this.num8.Location = new System.Drawing.Point(51, 63); this.num8.Name = num8; this.num8.Size = new Syste
8、m.Drawing.Size(37, 29); this.num8.TabIndex = 1; this.num8.Text = 8; this.num8.UseVisualStyleBackColor = true; / / num9 / this.num9.ForeColor = System.Drawing.Color.Blue; this.num9.Location = new System.Drawing.Point(90, 63); this.num9.Name = num9; this.num9.Size = new System.Drawing.Size(37, 29); th
9、is.num9.TabIndex = 2; this.num9.Text = 9; this.num9.UseVisualStyleBackColor = true; / / button4 / this.button4.ForeColor = System.Drawing.Color.Red; this.button4.Location = new System.Drawing.Point(129, 63); this.button4.Name = button4; this.button4.Size = new System.Drawing.Size(37, 29); this.butto
10、n4.TabIndex = 3; this.button4.Text = /; this.button4.UseVisualStyleBackColor = true; this.button4.Click += new System.EventHandler(this.operatorClick); / / button5 / this.button5.ForeColor = System.Drawing.Color.Blue; this.button5.Location = new System.Drawing.Point(168, 63); this.button5.Name = but
11、ton5; this.button5.Size = new System.Drawing.Size(37, 29); this.button5.TabIndex = 4; this.button5.Text = sqrt; this.button5.UseVisualStyleBackColor = true; this.button5.Click += new System.EventHandler(this.button5_Click); / / num4 / this.num4.ForeColor = System.Drawing.Color.Blue; this.num4.Locati
12、on = new System.Drawing.Point(12, 95); this.num4.Name = num4; this.num4.Size = new System.Drawing.Size(37, 29); this.num4.TabIndex = 5; this.num4.Text = 4; this.num4.UseVisualStyleBackColor = true; / / num5 / this.num5.ForeColor = System.Drawing.Color.Blue; this.num5.Location = new System.Drawing.Po
13、int(51, 95); this.num5.Name = num5; this.num5.Size = new System.Drawing.Size(37, 29); this.num5.TabIndex = 6; this.num5.Text = 5; this.num5.UseVisualStyleBackColor = true; / / num6 / this.num6.ForeColor = System.Drawing.Color.Blue; this.num6.Location = new System.Drawing.Point(90, 95); this.num6.Nam
14、e = num6; this.num6.Size = new System.Drawing.Size(37, 29); this.num6.TabIndex = 7; this.num6.Text = 6; this.num6.UseVisualStyleBackColor = true; / / button9 / this.button9.ForeColor = System.Drawing.Color.Red; this.button9.Location = new System.Drawing.Point(129, 95); this.button9.Name = button9; t
15、his.button9.Size = new System.Drawing.Size(37, 29); this.button9.TabIndex = 8; this.button9.Text = *; this.button9.UseVisualStyleBackColor = true; this.button9.Click += new System.EventHandler(this.operatorClick); / / num1 / this.num1.ForeColor = System.Drawing.Color.Blue; this.num1.Location = new S
16、ystem.Drawing.Point(12, 127); this.num1.Name = num1; this.num1.Size = new System.Drawing.Size(37, 29); this.num1.TabIndex = 9; this.num1.Text = 1; this.num1.UseVisualStyleBackColor = true; / / button11 / this.button11.ForeColor = System.Drawing.Color.Blue; this.button11.Location = new System.Drawing
17、.Point(168, 95); this.button11.Name = button11; this.button11.Size = new System.Drawing.Size(37, 29); this.button11.TabIndex = 10; this.button11.Text = %; this.button11.UseVisualStyleBackColor = true; / / num2 / this.num2.ForeColor = System.Drawing.Color.Blue; this.num2.Location = new System.Drawing
18、.Point(51, 127); this.num2.Name = num2; this.num2.Size = new System.Drawing.Size(37, 29); this.num2.TabIndex = 11; this.num2.Text = 2; this.num2.UseVisualStyleBackColor = true; / / num3 / this.num3.ForeColor = System.Drawing.Color.Blue; this.num3.Location = new System.Drawing.Point(90, 127); this.nu
19、m3.Name = num3; this.num3.Size = new System.Drawing.Size(37, 29); this.num3.TabIndex = 12; this.num3.Text = 3; this.num3.UseVisualStyleBackColor = true; / / button14 / this.button14.ForeColor = System.Drawing.Color.Blue; this.button14.Location = new System.Drawing.Point(168, 127); this.button14.Name
20、 = button14; this.button14.Size = new System.Drawing.Size(37, 29); this.button14.TabIndex = 13; this.button14.Text = 1/x; this.button14.UseVisualStyleBackColor = true; this.button14.Click += new System.EventHandler(this.button14_Click); / / button15 / this.button15.ForeColor = System.Drawing.Color.R
21、ed; this.button15.Location = new System.Drawing.Point(129, 127); this.button15.Name = button15; this.button15.Size = new System.Drawing.Size(37, 29); this.button15.TabIndex = 14; this.button15.Text = -; this.button15.UseVisualStyleBackColor = true; this.button15.Click += new System.EventHandler(this
22、.operatorClick); / / num0 / this.num0.ForeColor = System.Drawing.Color.Blue; this.num0.Location = new System.Drawing.Point(12, 159); this.num0.Name = num0; this.num0.Size = new System.Drawing.Size(37, 29); this.num0.TabIndex = 15; this.num0.Text = 0; this.num0.UseVisualStyleBackColor = true; / / but
23、ton17 / this.button17.ForeColor = System.Drawing.Color.Blue; this.button17.Location = new System.Drawing.Point(51, 159); this.button17.Name = button17; this.button17.Size = new System.Drawing.Size(37, 29); this.button17.TabIndex = 16; this.button17.Text = +/-; this.button17.UseVisualStyleBackColor =
24、 true; this.button17.Click += new System.EventHandler(this.button17_Click); / / button18 / this.button18.ForeColor = System.Drawing.Color.Blue; this.button18.Location = new System.Drawing.Point(90, 159); this.button18.Name = button18; this.button18.Size = new System.Drawing.Size(37, 29); this.button
25、18.TabIndex = 17; this.button18.Text = .; this.button18.UseVisualStyleBackColor = true; this.button18.Click += new System.EventHandler(this.pointClick); / / button19 / this.button19.ForeColor = System.Drawing.Color.Red; this.button19.Location = new System.Drawing.Point(129, 159); this.button19.Name
26、= button19; this.button19.Size = new System.Drawing.Size(37, 29); this.button19.TabIndex = 18; this.button19.Text = +; this.button19.UseVisualStyleBackColor = true; this.button19.Click += new System.EventHandler(this.operatorClick); / / button20 / this.button20.ForeColor = System.Drawing.Color.Red;
27、this.button20.Location = new System.Drawing.Point(168, 159); this.button20.Name = button20; this.button20.Size = new System.Drawing.Size(37, 29); this.button20.TabIndex = 19; this.button20.Text = =; this.button20.UseVisualStyleBackColor = true; this.button20.Click += new System.EventHandler(this.but
28、ton20_Click); / / button21 / this.button21.ForeColor = System.Drawing.Color.Red; this.button21.Location = new System.Drawing.Point(12, 29); this.button21.Name = button21; this.button21.Size = new System.Drawing.Size(59, 26); this.button21.TabIndex = 20; this.button21.Text = 退?格?; this.button21.UseVi
29、sualStyleBackColor = true; this.button21.Click += new System.EventHandler(this.button21_Click); / / button22 / this.button22.ForeColor = System.Drawing.Color.Red; this.button22.Location = new System.Drawing.Point(79, 29); this.button22.Name = button22; this.button22.Size = new System.Drawing.Size(59, 26); this.button22.TabIndex = 21; this.button22.Text = CE; this.button22.UseVisualStyleBackColor = true; this.button22.Click += new System.EventHandler(this.button22_Click); / / button23 / this.button23.ForeColor = System.Drawing.Color.Red; this.button23.Location = new System
copyright@ 2008-2022 冰豆网网站版权所有
经营许可证编号:鄂ICP备2022015515号-1