Beispiel #1
0
        private void equals_button_Click(object sender, RoutedEventArgs e)
        {
            //trim imput, send into parser
            //get answer from parser, display on screen
            double ans = parser.Parse(Screen.Text.Trim(), isRadians);

            //add input and answer to history
            TextBlock.AppendText(Screen.Text.Trim() + " = " + ans.ToString() + "\n");
            TextBlock.ScrollToEnd();

            //clear screen
            Screen.Text = ButtonControl.ClearButtonPress(Screen.Text);
        }
Beispiel #2
0
 //misc buttons
 private void clear_button_Click(object sender, RoutedEventArgs e)
 {
     Screen.Text = ButtonControl.ClearButtonPress(Screen.Text);
     //TextBlock.Text = ButtonControl.ClearButtonPress(TextBlock.Text);
 }