private void button20_Click(object sender, EventArgs e) { textBox1.AppendText("="); //textBox2.Text = textBox1.Text; textBox1.Text = DataOp.DataMain(); textBox2.Text = textBox1.Text; string temp = DataOp.DataMain(); inputStr.Clear(); for (int i = 0; i < temp.Length; i++) { inputStr.Add(temp[i]); } }
private string countKuo(string s) { foreach (char c in inputStr) { inputStr2.Add(c); } while (inputStr2.Count != getLeft(s)) { Console.WriteLine(getLeft(s)); inputStr2.RemoveAt(inputStr2.Count - 1); } inputStr.Clear(); string s1 = textBox1.Text; for (int i = getLeft(s1) + 1; i < s1.Length - 1; i++) { inputStr.Add(textBox1.Text[i]); } string temp = DataOp.DataMain(); if (temp[0] == '-') { temp = "(" + temp + ")"; } for (int i = 0; i < temp.Length; i++) { inputStr2.Add(temp[i]); } inputStr.Clear(); textBox1.Text = ""; foreach (char c in inputStr2) { inputStr.Add(c); textBox1.AppendText(c + ""); } return(temp); }