using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;

namespace Calculator
{
    static class Program
    {
        /// <summary>
        /// 应用程序的主入口点。
        /// </summary>
        [STAThread]
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new Form1());
        }
    }
}

namespace Calculator
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
            textBox1.Text = 0 + "";
        }


        private void count()
        {
            string strings = textBox1.Text;
            if (strings.EndsWith("."))
            {
                strings = strings.Remove(strings.Length-1);
                textBox1.Text = strings;
            }
            int indexs = strings.IndexOf('=');
            if (strings.Contains("="))
            {
                strings = strings.Substring(indexs + 1, strings.Length - indexs - 1);
            }
            char[] ch = { '+', '-', '×', '÷' };
            double result = 0;
            int index = 0;
            if (strings.Length > 1)
            {
                index = strings.IndexOfAny(ch, 1);
            }
            if (index > 0&&!strings.EndsWith(strings[index].ToString()))
            {
                try
                {
                    string string1 = strings.Substring(0, index);
                    string string2 = strings.Substring(index + 1, strings.Length - index - 1);
                    double num1 = Convert.ToDouble(string1);
                    double num2 = Convert.ToDouble(string2);
                    switch (strings[index])
                    {
                        case '+':
                            result = num1 + num2;
                            break;
                        case '-':
                            result = num1 - num2;
                            break;
                        case '×':
                            result = num1 * num2;
                            break;
                        case '÷':
                            result = num1 / num2;
                            break;
                    }
                    textBox1.AppendText("=" + result);
                }
                catch (System.Exception ex)
                {
                    Console.WriteLine(ex);
                    textBox1.ResetText();
                    textBox1.Text = "数学错误,检查再试!";
                }
            }
        }

        private void button1_Click(object sender, EventArgs e)
        {
            string strings = this.textBox1.Text;
            if (strings.Contains("="))
            {
                textBox1.ResetText();
            }
            if (strings != "")
            {
                textBox1.Text = strings.Substring(0, strings.Length - 1);
            }
            if (strings.Length==1)
            {
                textBox1.Text = 0 + "";
            }
        }

        private void button2_Click(object sender, EventArgs e)
        {
            textBox1.Text = 0 + "";
        }

        private void button3_Click(object sender, EventArgs e)
        {
            textBox1.Text = 0 + "";
        }

        private void button4_Click(object sender, EventArgs e)
        {
            MessageBox.Show("注意:\n此计算器仅能进行简单的一元或二元运算\nBack键数字回退一位,CE或者C清除数字");
        }

        private void button8_Click(object sender, EventArgs e)
        {
            string stringsTextBox = this.textBox1.Text;
            if (stringsTextBox.Contains("=") || stringsTextBox == "0")
            {
                textBox1.ResetText();
            }
            string strings = ((Button)sender).Text;
            this.textBox1.Text += strings;
        }

        private void button5_Click(object sender, EventArgs e)
        {
            string stringsTextBox = this.textBox1.Text;
            if (stringsTextBox.Contains("=") || stringsTextBox == "0")
            {
                textBox1.ResetText();
            }
            string strings = ((Button)sender).Text;
            this.textBox1.Text += strings;
        }

        private void button6_Click(object sender, EventArgs e)
        {
            string stringsTextBox = this.textBox1.Text;
            if (stringsTextBox.Contains("=") || stringsTextBox == "0")
            {
                textBox1.ResetText();
            }
            string strings = ((Button)sender).Text;
            this.textBox1.Text += strings;
        }

        private void button7_Click(object sender, EventArgs e)
        {
            this.count();
            string stringsTextBox = this.textBox1.Text;
            int index = stringsTextBox.IndexOf('=');
            if (stringsTextBox.Contains("="))
            {
                textBox1.Text = stringsTextBox.Substring(index + 1, stringsTextBox.Length - index - 1);
            }
            string strings = ((Button)sender).Text;
            try
            {
                Convert.ToDouble(textBox1.Text[textBox1.Text.Length-1]+"");
                textBox1.Text += strings;
            }
            catch (System.Exception ex)
            {
                Console.WriteLine(ex);
                textBox1.Text = textBox1.Text.Substring(0, textBox1.Text.Length-1);
                textBox1.Text += strings;
            }
        }

        private void button9_Click(object sender, EventArgs e)
        {
            this.count();
            string strings = textBox1.Text;
            if (strings.Contains("="))
            {
                int index = strings.IndexOf('=');
                strings = strings.Substring(index + 1, strings.Length - index - 1);
            }
            double value = 0;
            if (strings != "")
            {
                try
                {
                    value=Convert.ToDouble(strings);
                    if (value >= 0)
                    {
                        textBox1.ResetText();
                        textBox1.Text = (Math.Sqrt(value)).ToString();
                    }
                    else
                    {
                        textBox1.Text = "结果非实数!";
                    }
                }
                catch (System.Exception ex)
                {
                    Console.WriteLine(ex);
                    textBox1.ResetText();
                    textBox1.Text = "数学错误,检查再试!";
                }
            }
        }

        private void button14_Click(object sender, EventArgs e)
        {
            string stringsTextBox = this.textBox1.Text;
            if (stringsTextBox.Contains("=") || stringsTextBox == "0")
            {
                textBox1.ResetText();
            }
            string strings = ((Button)sender).Text;
            this.textBox1.Text += strings;
        }

        private void button13_Click(object sender, EventArgs e)
        {
            string stringsTextBox = this.textBox1.Text;
            if (stringsTextBox.Contains("=") || stringsTextBox == "0")
            {
                textBox1.ResetText();
            }
            string strings = ((Button)sender).Text;
            this.textBox1.Text += strings;
        }

        private void button12_Click(object sender, EventArgs e)
        {
            string stringsTextBox = this.textBox1.Text;
            if (stringsTextBox.Contains("=") || stringsTextBox == "0")
            {
                textBox1.ResetText();
            }
            string strings = ((Button)sender).Text;
            this.textBox1.Text += strings;
        }

        private void button11_Click(object sender, EventArgs e)
        {
            this.count();
            string stringsTextBox = this.textBox1.Text;
            int index = stringsTextBox.IndexOf('=');
            if (stringsTextBox.Contains("="))
            {
                textBox1.Text = stringsTextBox.Substring(index + 1, stringsTextBox.Length - index - 1);
            }
            string strings = ((Button)sender).Text;
            try
            {
                Convert.ToDouble(textBox1.Text[textBox1.Text.Length - 1] + "");
                textBox1.Text += strings;
            }
            catch (System.Exception ex)
            {
                Console.WriteLine(ex);
                textBox1.Text = textBox1.Text.Substring(0, textBox1.Text.Length - 1);
                textBox1.Text += strings;
            }
        }

        private void button10_Click(object sender, EventArgs e)
        {
            this.count();
            string strings = textBox1.Text;
            if (strings.Contains("="))
            {
                int index = strings.IndexOf('=');
                strings = strings.Substring(index + 1, strings.Length - index - 1);
            }
            double value = 0;
            if (strings != "")
            {
                try
                {
                    value = Convert.ToDouble(strings);
                    textBox1.ResetText();
                    textBox1.Text = (value/100).ToString();
                }
                catch (System.Exception ex)
                {
                    Console.WriteLine(ex);
                    textBox1.ResetText();
                    textBox1.Text = "数学错误,检查再试!";
                }
            }
        }

        private void button19_Click(object sender, EventArgs e)
        {
            string stringsTextBox = this.textBox1.Text;
            if (stringsTextBox.Contains("=") || stringsTextBox == "0")
            {
                textBox1.ResetText();
            }
            string strings = ((Button)sender).Text;
            this.textBox1.Text += strings;
        }

        private void button18_Click(object sender, EventArgs e)
        {
            string stringsTextBox = this.textBox1.Text;
            if (stringsTextBox.Contains("=") || stringsTextBox == "0")
            {
                textBox1.ResetText();
            }
            string strings = ((Button)sender).Text;
            this.textBox1.Text += strings;
        }

        private void button17_Click(object sender, EventArgs e)
        {
            string stringsTextBox = this.textBox1.Text;
            if (stringsTextBox.Contains("=") || stringsTextBox == "0")
            {
                textBox1.ResetText();
            }
            string strings = ((Button)sender).Text;
            this.textBox1.Text += strings;
        }

        private void button16_Click(object sender, EventArgs e)
        {
            this.count();
            string stringsTextBox = this.textBox1.Text;
            int index = stringsTextBox.IndexOf('=');
            if (stringsTextBox.Contains("="))
            {
                textBox1.Text = stringsTextBox.Substring(index + 1, stringsTextBox.Length - index - 1);
            }
            string strings = ((Button)sender).Text;
            try
            {
                Convert.ToDouble(textBox1.Text[textBox1.Text.Length - 1] + "");
                textBox1.Text += strings;
            }
            catch (System.Exception ex)
            {
                Console.WriteLine(ex);
                textBox1.Text = textBox1.Text.Substring(0, textBox1.Text.Length - 1);
                textBox1.Text += strings;
            }
        }

        private void button15_Click(object sender, EventArgs e)
        {
            this.count();
            string strings = textBox1.Text;
            if (strings.Contains("="))
            {
                int index = strings.IndexOf('=');
                strings = strings.Substring(index + 1, strings.Length - index - 1);
            }
            double value = 0;
            if (strings != "")
            {
                try
                {
                    value = Convert.ToDouble(strings);
                    textBox1.ResetText();
                    textBox1.Text = (1/value).ToString();
                }
                catch (System.Exception ex)
                {
                    Console.WriteLine(ex);
                    textBox1.ResetText();
                    textBox1.Text = "数学错误,检查再试!";
                }
            }
        }

        private void button24_Click(object sender, EventArgs e)
        {
            string stringsTextBox = this.textBox1.Text;
            if (stringsTextBox.Contains("="))
            {
                textBox1.Text = 0 + "";
            }
            string strings = ((Button)sender).Text;
            if (!stringsTextBox.Equals("0"))
            {
                this.textBox1.Text += strings;
            }
        }

        private void button23_Click(object sender, EventArgs e)
        {
            this.count();
            string strings = textBox1.Text;
            if (strings.Contains("="))
            {
                int index = strings.IndexOf('=');
                strings = strings.Substring(index + 1, strings.Length - index - 1);
            }
            double value = 0;
            if (strings != "")
            {
                try
                {
                    value = Convert.ToDouble(strings);
                    textBox1.ResetText();
                    textBox1.Text = ((-1)*value).ToString();
                }
                catch (System.Exception ex)
                {
                    Console.WriteLine(ex);
                    textBox1.ResetText();
                    textBox1.Text = "数学错误,检查再试!";
                }
            }
        }

        private void button22_Click(object sender, EventArgs e)
        {
            string stringsTextBox = this.textBox1.Text;
            if (stringsTextBox.Contains("="))
            {
                textBox1.ResetText();
            }
            string strings = ((Button)sender).Text;
            char[] ch = { '+', '-', '×', '÷' };
            int index = stringsTextBox.IndexOfAny(ch);
            string substring1="";
            string substring2 = "";
            if (index > 1)
            {
                substring1 = stringsTextBox.Substring(0, index);
                substring2 = stringsTextBox.Substring(index + 1, stringsTextBox.Length - index - 1);
            }
            if (substring2.Length*substring1.Length>0)
            {
                if ((!substring1.Contains(".") || !substring2.Contains(".")))
                {
                    this.textBox1.Text += strings;
                }
            }
            else if (!stringsTextBox.Contains("."))
            {
                this.textBox1.Text += strings;
            }
        }

        private void button21_Click(object sender, EventArgs e)
        {
            this.count();
            string stringsTextBox = this.textBox1.Text;
            int index = stringsTextBox.IndexOf('=');
            if (stringsTextBox.Contains("="))
            {
                textBox1.Text = stringsTextBox.Substring(index + 1, stringsTextBox.Length - index - 1);
            }
            string strings = ((Button)sender).Text;
            try
            {
                Convert.ToDouble(textBox1.Text[textBox1.Text.Length - 1] + "");
                textBox1.Text += strings;
            }
            catch (System.Exception ex)
            {
                Console.WriteLine(ex);
                textBox1.Text = textBox1.Text.Substring(0, textBox1.Text.Length - 1);
                textBox1.Text += strings;
            }
        }

        private void button20_Click(object sender, EventArgs e)
        {
            count();
        }
    }
}

namespace Calculator
{
    partial class Form1
    {
        /// <summary>
        /// 必需的设计器变量。
        /// </summary>
        private System.ComponentModel.IContainer components = null;

        /// <summary>
        /// 清理所有正在使用的资源。
        /// </summary>
        /// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
        protected override void Dispose(bool disposing)
        {
            if (disposing && (components != null))
            {
                components.Dispose();
            }
            base.Dispose(disposing);
        }

        #region Windows 窗体设计器生成的代码

        /// <summary>
        /// 设计器支持所需的方法 - 不要
        /// 使用代码编辑器修改此方法的内容。
        /// </summary>
        private void InitializeComponent()
        {
            this.button1 = new System.Windows.Forms.Button();
            this.button8 = new System.Windows.Forms.Button();
            this.button5 = new System.Windows.Forms.Button();
            this.button6 = new System.Windows.Forms.Button();
            this.button7 = new System.Windows.Forms.Button();
            this.button9 = new System.Windows.Forms.Button();
            this.button10 = new System.Windows.Forms.Button();
            this.button11 = new System.Windows.Forms.Button();
            this.button12 = new System.Windows.Forms.Button();
            this.button13 = new System.Windows.Forms.Button();
            this.button14 = new System.Windows.Forms.Button();
            this.button15 = new System.Windows.Forms.Button();
            this.button16 = new 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 = new System.Windows.Forms.Button();
            this.button23 = new System.Windows.Forms.Button();
            this.button24 = new System.Windows.Forms.Button();
            this.button2 = new System.Windows.Forms.Button();
            this.button3 = new System.Windows.Forms.Button();
            this.button4 = new System.Windows.Forms.Button();
            this.textBox1 = new System.Windows.Forms.TextBox();
            this.SuspendLayout();
            // 
            // button1
            // 
            this.button1.BackColor = System.Drawing.Color.AliceBlue;
            this.button1.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
            this.button1.ForeColor = System.Drawing.Color.Blue;
            this.button1.Location = new System.Drawing.Point(11, 36);
            this.button1.Name = "button1";
            this.button1.RightToLeft = System.Windows.Forms.RightToLeft.No;
            this.button1.Size = new System.Drawing.Size(64, 23);
            this.button1.TabIndex = 0;
            this.button1.Text = "Back";
            this.button1.UseVisualStyleBackColor = false;
            this.button1.Click += new System.EventHandler(this.button1_Click);
            // 
            // button8
            // 
            this.button8.BackColor = System.Drawing.Color.AliceBlue;
            this.button8.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
            this.button8.ForeColor = System.Drawing.Color.Blue;
            this.button8.Location = new System.Drawing.Point(11, 64);
            this.button8.Name = "button8";
            this.button8.RightToLeft = System.Windows.Forms.RightToLeft.No;
            this.button8.Size = new System.Drawing.Size(48, 23);
            this.button8.TabIndex = 5;
            this.button8.Text = "9";
            this.button8.UseVisualStyleBackColor = false;
            this.button8.Click += new System.EventHandler(this.button8_Click);
            // 
            // button5
            // 
            this.button5.BackColor = System.Drawing.Color.AliceBlue;
            this.button5.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
            this.button5.ForeColor = System.Drawing.Color.Blue;
            this.button5.Location = new System.Drawing.Point(65, 64);
            this.button5.Name = "button5";
            this.button5.RightToLeft = System.Windows.Forms.RightToLeft.No;
            this.button5.Size = new System.Drawing.Size(48, 23);
            this.button5.TabIndex = 6;
            this.button5.Text = "8";
            this.button5.UseVisualStyleBackColor = false;
            this.button5.Click += new System.EventHandler(this.button5_Click);
            // 
            // button6
            // 
            this.button6.BackColor = System.Drawing.Color.AliceBlue;
            this.button6.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
            this.button6.ForeColor = System.Drawing.Color.Blue;
            this.button6.Location = new System.Drawing.Point(119, 64);
            this.button6.Name = "button6";
            this.button6.RightToLeft = System.Windows.Forms.RightToLeft.No;
            this.button6.Size = new System.Drawing.Size(48, 23);
            this.button6.TabIndex = 7;
            this.button6.Text = "7";
            this.button6.UseVisualStyleBackColor = false;
            this.button6.Click += new System.EventHandler(this.button6_Click);
            // 
            // button7
            // 
            this.button7.BackColor = System.Drawing.Color.AliceBlue;
            this.button7.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
            this.button7.ForeColor = System.Drawing.Color.Blue;
            this.button7.Location = new System.Drawing.Point(173, 64);
            this.button7.Name = "button7";
            this.button7.RightToLeft = System.Windows.Forms.RightToLeft.No;
            this.button7.Size = new System.Drawing.Size(48, 23);
            this.button7.TabIndex = 8;
            this.button7.Text = "÷";
            this.button7.UseVisualStyleBackColor = false;
            this.button7.Click += new System.EventHandler(this.button7_Click);
            // 
            // button9
            // 
            this.button9.BackColor = System.Drawing.Color.AliceBlue;
            this.button9.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
            this.button9.ForeColor = System.Drawing.Color.Blue;
            this.button9.Location = new System.Drawing.Point(227, 64);
            this.button9.Name = "button9";
            this.button9.RightToLeft = System.Windows.Forms.RightToLeft.No;
            this.button9.Size = new System.Drawing.Size(48, 23);
            this.button9.TabIndex = 9;
            this.button9.Text = "√";
            this.button9.UseVisualStyleBackColor = false;
            this.button9.Click += new System.EventHandler(this.button9_Click);
            // 
            // button10
            // 
            this.button10.BackColor = System.Drawing.Color.AliceBlue;
            this.button10.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
            this.button10.ForeColor = System.Drawing.Color.Blue;
            this.button10.Location = new System.Drawing.Point(227, 93);
            this.button10.Name = "button10";
            this.button10.RightToLeft = System.Windows.Forms.RightToLeft.No;
            this.button10.Size = new System.Drawing.Size(48, 23);
            this.button10.TabIndex = 14;
            this.button10.Text = "%";
            this.button10.UseVisualStyleBackColor = false;
            this.button10.Click += new System.EventHandler(this.button10_Click);
            // 
            // button11
            // 
            this.button11.BackColor = System.Drawing.Color.AliceBlue;
            this.button11.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
            this.button11.ForeColor = System.Drawing.Color.Blue;
            this.button11.Location = new System.Drawing.Point(173, 93);
            this.button11.Name = "button11";
            this.button11.RightToLeft = System.Windows.Forms.RightToLeft.No;
            this.button11.Size = new System.Drawing.Size(48, 23);
            this.button11.TabIndex = 13;
            this.button11.Text = "×";
            this.button11.UseVisualStyleBackColor = false;
            this.button11.Click += new System.EventHandler(this.button11_Click);
            // 
            // button12
            // 
            this.button12.BackColor = System.Drawing.Color.AliceBlue;
            this.button12.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
            this.button12.ForeColor = System.Drawing.Color.Blue;
            this.button12.Location = new System.Drawing.Point(119, 93);
            this.button12.Name = "button12";
            this.button12.RightToLeft = System.Windows.Forms.RightToLeft.No;
            this.button12.Size = new System.Drawing.Size(48, 23);
            this.button12.TabIndex = 12;
            this.button12.Text = "4";
            this.button12.UseVisualStyleBackColor = false;
            this.button12.Click += new System.EventHandler(this.button12_Click);
            // 
            // button13
            // 
            this.button13.BackColor = System.Drawing.Color.AliceBlue;
            this.button13.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
            this.button13.ForeColor = System.Drawing.Color.Blue;
            this.button13.Location = new System.Drawing.Point(65, 93);
            this.button13.Name = "button13";
            this.button13.RightToLeft = System.Windows.Forms.RightToLeft.No;
            this.button13.Size = new System.Drawing.Size(48, 23);
            this.button13.TabIndex = 11;
            this.button13.Text = "5";
            this.button13.UseVisualStyleBackColor = false;
            this.button13.Click += new System.EventHandler(this.button13_Click);
            // 
            // button14
            // 
            this.button14.BackColor = System.Drawing.Color.AliceBlue;
            this.button14.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
            this.button14.ForeColor = System.Drawing.Color.Blue;
            this.button14.Location = new System.Drawing.Point(11, 93);
            this.button14.Name = "button14";
            this.button14.RightToLeft = System.Windows.Forms.RightToLeft.No;
            this.button14.Size = new System.Drawing.Size(48, 23);
            this.button14.TabIndex = 10;
            this.button14.Text = "6";
            this.button14.UseVisualStyleBackColor = false;
            this.button14.Click += new System.EventHandler(this.button14_Click);
            // 
            // button15
            // 
            this.button15.BackColor = System.Drawing.Color.AliceBlue;
            this.button15.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
            this.button15.ForeColor = System.Drawing.Color.Blue;
            this.button15.Location = new System.Drawing.Point(227, 124);
            this.button15.Name = "button15";
            this.button15.RightToLeft = System.Windows.Forms.RightToLeft.No;
            this.button15.Size = new System.Drawing.Size(48, 23);
            this.button15.TabIndex = 19;
            this.button15.Text = "1/x";
            this.button15.UseVisualStyleBackColor = false;
            this.button15.Click += new System.EventHandler(this.button15_Click);
            // 
            // button16
            // 
            this.button16.BackColor = System.Drawing.Color.AliceBlue;
            this.button16.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
            this.button16.ForeColor = System.Drawing.Color.Blue;
            this.button16.Location = new System.Drawing.Point(173, 124);
            this.button16.Name = "button16";
            this.button16.RightToLeft = System.Windows.Forms.RightToLeft.No;
            this.button16.Size = new System.Drawing.Size(48, 23);
            this.button16.TabIndex = 18;
            this.button16.Text = "-";
            this.button16.UseVisualStyleBackColor = false;
            this.button16.Click += new System.EventHandler(this.button16_Click);
            // 
            // button17
            // 
            this.button17.BackColor = System.Drawing.Color.AliceBlue;
            this.button17.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
            this.button17.ForeColor = System.Drawing.Color.Blue;
            this.button17.Location = new System.Drawing.Point(119, 124);
            this.button17.Name = "button17";
            this.button17.RightToLeft = System.Windows.Forms.RightToLeft.No;
            this.button17.Size = new System.Drawing.Size(48, 23);
            this.button17.TabIndex = 17;
            this.button17.Text = "1";
            this.button17.UseVisualStyleBackColor = false;
            this.button17.Click += new System.EventHandler(this.button17_Click);
            // 
            // button18
            // 
            this.button18.BackColor = System.Drawing.Color.AliceBlue;
            this.button18.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
            this.button18.ForeColor = System.Drawing.Color.Blue;
            this.button18.Location = new System.Drawing.Point(65, 124);
            this.button18.Name = "button18";
            this.button18.RightToLeft = System.Windows.Forms.RightToLeft.No;
            this.button18.Size = new System.Drawing.Size(48, 23);
            this.button18.TabIndex = 16;
            this.button18.Text = "2";
            this.button18.UseVisualStyleBackColor = false;
            this.button18.Click += new System.EventHandler(this.button18_Click);
            // 
            // button19
            // 
            this.button19.BackColor = System.Drawing.Color.AliceBlue;
            this.button19.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
            this.button19.ForeColor = System.Drawing.Color.Blue;
            this.button19.Location = new System.Drawing.Point(11, 124);
            this.button19.Name = "button19";
            this.button19.RightToLeft = System.Windows.Forms.RightToLeft.No;
            this.button19.Size = new System.Drawing.Size(48, 23);
            this.button19.TabIndex = 15;
            this.button19.Text = "3";
            this.button19.UseVisualStyleBackColor = false;
            this.button19.Click += new System.EventHandler(this.button19_Click);
            // 
            // button20
            // 
            this.button20.BackColor = System.Drawing.Color.AliceBlue;
            this.button20.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
            this.button20.ForeColor = System.Drawing.Color.Blue;
            this.button20.Location = new System.Drawing.Point(227, 155);
            this.button20.Name = "button20";
            this.button20.RightToLeft = System.Windows.Forms.RightToLeft.No;
            this.button20.Size = new System.Drawing.Size(48, 23);
            this.button20.TabIndex = 24;
            this.button20.Text = "=";
            this.button20.UseVisualStyleBackColor = false;
            this.button20.Click += new System.EventHandler(this.button20_Click);
            // 
            // button21
            // 
            this.button21.BackColor = System.Drawing.Color.AliceBlue;
            this.button21.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
            this.button21.ForeColor = System.Drawing.Color.Blue;
            this.button21.Location = new System.Drawing.Point(173, 155);
            this.button21.Name = "button21";
            this.button21.RightToLeft = System.Windows.Forms.RightToLeft.No;
            this.button21.Size = new System.Drawing.Size(48, 23);
            this.button21.TabIndex = 23;
            this.button21.Text = "+";
            this.button21.UseVisualStyleBackColor = false;
            this.button21.Click += new System.EventHandler(this.button21_Click);
            // 
            // button22
            // 
            this.button22.BackColor = System.Drawing.Color.AliceBlue;
            this.button22.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
            this.button22.ForeColor = System.Drawing.Color.Blue;
            this.button22.Location = new System.Drawing.Point(119, 155);
            this.button22.Name = "button22";
            this.button22.RightToLeft = System.Windows.Forms.RightToLeft.No;
            this.button22.Size = new System.Drawing.Size(48, 23);
            this.button22.TabIndex = 22;
            this.button22.Text = ".";
            this.button22.UseVisualStyleBackColor = false;
            this.button22.Click += new System.EventHandler(this.button22_Click);
            // 
            // button23
            // 
            this.button23.BackColor = System.Drawing.Color.AliceBlue;
            this.button23.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
            this.button23.ForeColor = System.Drawing.Color.Blue;
            this.button23.Location = new System.Drawing.Point(65, 155);
            this.button23.Name = "button23";
            this.button23.RightToLeft = System.Windows.Forms.RightToLeft.No;
            this.button23.Size = new System.Drawing.Size(48, 23);
            this.button23.TabIndex = 21;
            this.button23.Text = "±";
            this.button23.UseVisualStyleBackColor = false;
            this.button23.Click += new System.EventHandler(this.button23_Click);
            // 
            // button24
            // 
            this.button24.BackColor = System.Drawing.Color.AliceBlue;
            this.button24.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
            this.button24.ForeColor = System.Drawing.Color.Blue;
            this.button24.Location = new System.Drawing.Point(11, 155);
            this.button24.Name = "button24";
            this.button24.RightToLeft = System.Windows.Forms.RightToLeft.No;
            this.button24.Size = new System.Drawing.Size(48, 23);
            this.button24.TabIndex = 20;
            this.button24.Text = "0";
            this.button24.UseVisualStyleBackColor = false;
            this.button24.Click += new System.EventHandler(this.button24_Click);
            // 
            // button2
            // 
            this.button2.BackColor = System.Drawing.Color.AliceBlue;
            this.button2.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
            this.button2.ForeColor = System.Drawing.Color.Blue;
            this.button2.Location = new System.Drawing.Point(78, 36);
            this.button2.Name = "button2";
            this.button2.RightToLeft = System.Windows.Forms.RightToLeft.No;
            this.button2.Size = new System.Drawing.Size(64, 23);
            this.button2.TabIndex = 25;
            this.button2.Text = "CE";
            this.button2.UseVisualStyleBackColor = false;
            this.button2.Click += new System.EventHandler(this.button2_Click);
            // 
            // button3
            // 
            this.button3.BackColor = System.Drawing.Color.AliceBlue;
            this.button3.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
            this.button3.ForeColor = System.Drawing.Color.Blue;
            this.button3.Location = new System.Drawing.Point(144, 36);
            this.button3.Name = "button3";
            this.button3.RightToLeft = System.Windows.Forms.RightToLeft.No;
            this.button3.Size = new System.Drawing.Size(64, 23);
            this.button3.TabIndex = 26;
            this.button3.Text = "C";
            this.button3.UseVisualStyleBackColor = false;
            this.button3.Click += new System.EventHandler(this.button3_Click);
            // 
            // button4
            // 
            this.button4.BackColor = System.Drawing.Color.AliceBlue;
            this.button4.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
            this.button4.ForeColor = System.Drawing.Color.Blue;
            this.button4.Location = new System.Drawing.Point(211, 36);
            this.button4.Name = "button4";
            this.button4.RightToLeft = System.Windows.Forms.RightToLeft.No;
            this.button4.Size = new System.Drawing.Size(64, 23);
            this.button4.TabIndex = 27;
            this.button4.Text = "About";
            this.button4.UseVisualStyleBackColor = false;
            this.button4.Click += new System.EventHandler(this.button4_Click);
            // 
            // textBox1
            // 
            this.textBox1.BackColor = System.Drawing.Color.AliceBlue;
            this.textBox1.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
            this.textBox1.ForeColor = System.Drawing.Color.Blue;
            this.textBox1.Location = new System.Drawing.Point(11, 8);
            this.textBox1.Name = "textBox1";
            this.textBox1.Size = new System.Drawing.Size(264, 23);
            this.textBox1.TabIndex = 3;
            this.textBox1.TextAlign = System.Windows.Forms.HorizontalAlignment.Right;
            // 
            // Form1
            // 
            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
            this.BackColor = System.Drawing.Color.AliceBlue;
            this.ClientSize = new System.Drawing.Size(284, 187);
            this.Controls.Add(this.button4);
            this.Controls.Add(this.button3);
            this.Controls.Add(this.button2);
            this.Controls.Add(this.button20);
            this.Controls.Add(this.button21);
            this.Controls.Add(this.button22);
            this.Controls.Add(this.button23);
            this.Controls.Add(this.button24);
            this.Controls.Add(this.button15);
            this.Controls.Add(this.button16);
            this.Controls.Add(this.button17);
            this.Controls.Add(this.button18);
            this.Controls.Add(this.button19);
            this.Controls.Add(this.button10);
            this.Controls.Add(this.button11);
            this.Controls.Add(this.button12);
            this.Controls.Add(this.button13);
            this.Controls.Add(this.button14);
            this.Controls.Add(this.button9);
            this.Controls.Add(this.button7);
            this.Controls.Add(this.button6);
            this.Controls.Add(this.button5);
            this.Controls.Add(this.button8);
            this.Controls.Add(this.textBox1);
            this.Controls.Add(this.button1);
            this.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
            this.ForeColor = System.Drawing.SystemColors.ControlText;
            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.Fixed3D;
            this.MaximizeBox = false;
            this.Name = "Form1";
            this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
            this.Text = "简易计算器—海涛开发";
            this.ResumeLayout(false);
            this.PerformLayout();

        }

        #endregion

        private System.Windows.Forms.Button button1;
        private System.Windows.Forms.Button button8;
        private System.Windows.Forms.Button button5;
        private System.Windows.Forms.Button button6;
        private System.Windows.Forms.Button button7;
        private System.Windows.Forms.Button button9;
        private System.Windows.Forms.Button button10;
        private System.Windows.Forms.Button button11;
        private System.Windows.Forms.Button button12;
        private System.Windows.Forms.Button button13;
        private System.Windows.Forms.Button button14;
        private System.Windows.Forms.Button button15;
        private System.Windows.Forms.Button button16;
        private System.Windows.Forms.Button button17;
        private System.Windows.Forms.Button button18;
        private System.Windows.Forms.Button button19;
        private System.Windows.Forms.Button button20;
        private System.Windows.Forms.Button button21;
        private System.Windows.Forms.Button button22;
        private System.Windows.Forms.Button button23;
        private System.Windows.Forms.Button button24;
        private System.Windows.Forms.Button button2;
        private System.Windows.Forms.Button button3;
        private System.Windows.Forms.Button button4;
        private System.Windows.Forms.TextBox textBox1;
    }
}