Exemplo n.º 1
0
 /* Dodaje znak do dzialania */
 public void AddSignToEquation(char Operator)
 {
     if (true == CurrentEquationState[CurrentEquationState.Length - 1].IsMathematicalOperator())
     {
         CurrentEquationState = CurrentEquationState.Remove(CurrentEquationState.Length - 1, 1);
     }
     CurrentEquationState += Operator;
     ChangeWordButton(this, new MyEventArgs("false"));
     UpdateDisplay(this, eUpdateArgs);
 }
Exemplo n.º 2
0
 /* Usuwa ostatni wprowadzony znak */
 public void DeleteLastSignInEquation()
 {
     if (CurrentEquationState != "0" && CurrentEquationState.Length > 1)
     {
         CurrentEquationState = CurrentEquationState.Remove(CurrentEquationState.Length - 1);
     }
     else if (CurrentEquationState != "0" && CurrentEquationState.Length == 1)
     {
         CurrentEquationState = "0";
     }
     if (false == CurrentEquationState.IsThereAnyMathematicalOperatorInString())
     {
         ChangeWordButton(this, new MyEventArgs("true"));
     }
     UpdateDisplay(this, eUpdateArgs);
 }