private void InputAreaTextChangedEventHandler(object sender, TextChangedEventArgs e)
 {
     txtOutput.Clear();
     try
     {
         string[] str = ((TextBox)sender).Text.Split(new string[] { "\n" }, StringSplitOptions.RemoveEmptyEntries);
         foreach (string eachStr in str)
         {
             txtOutput.Text += Calculate.Eval(eachStr);
             txtOutput.Text += System.Environment.NewLine;
         }
         txtOutput.Text = txtOutput.Text.Replace("System.__ComObject", "");
     }
     catch { }
 }
Ejemplo n.º 2
0
 private double F(double txtQuadraticResultX)
 {
     return(double.Parse(Calculate.Eval(expression, txtVariable.Text, txtQuadraticResultX.ToString())));
 }