Exemple #1
0
 /// <summary>
 /// CalculateButtonClick Method occurs when the calculate button is pressed
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void CalculateButtonClick(object sender, RoutedEventArgs e)
 {
     try
     {
         if (TextBoxes[0].TextBox.Text != "")
         {
             Equation = new LinearEquations(TextBoxes[0].TextBox.Text);
             TextBlocks[0].TextBlock.Text = Equation.SolutionString;
         }
     }
     catch (Exception exception) { MessageBox.Show(exception.Message); }
 }
Exemple #2
0
 /// <summary>
 /// ClearButtonClick Method occurs when the clear button is pressed
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void ClearButtonClick(object sender, RoutedEventArgs e)
 {
     TextBoxes[0].TextBox.Text    = string.Empty;
     TextBlocks[0].TextBlock.Text = string.Empty;
     Equation = null;
 }