Exemple #1
0
        private void equal_Click(object sender, EventArgs e)  //点击等于
        {
            if (isEqual == true)
            {
                textBox1.Text = "0";
                return;
            }
            isEqual = true;
            str     = textBox1.Text;
            String str1 = new Calculate().calculating(str);

            if (m_ && str1 != null && !str.Equals("错误"))     //读入计算后的存储数据
            {
                memory = new string(str1.ToCharArray());
                m_     = false;
            }
            if (str.Equals("错误"))
            {
                error.Visible = true;
                str           = "";
            }
            else
            {
                str = str1;
            }
            textBox1.Text = str;
        }