private void ResultBtn_Click(object sender, EventArgs e) { try { if (FindResult()) { if (HistoryTxtBox.Text.LastOrDefault() == ')') { HistoryTxtBox.Text += "="; } else { HistoryTxtBox.Text += ResultTxtBox.Text + "="; } ResultTxtBox.Text = Result.ToString(); HistoryListBox.Items.Add(HistoryTxtBox.Text + ResultTxtBox.Text); } } catch (Exception ex) { MessageBox.Show(ex.Message); ResultTxtBox.Clear(); } }
private void CBtn_Click(object sender, EventArgs e) { ResultTxtBox.Clear(); HistoryTxtBox.Clear(); Result = 0; }
private void CEBtn_Click(object sender, EventArgs e) { ResultTxtBox.Clear(); }