private static void AssertExpression(AlgebraicExpressions expression, string expected) { var visitor = new ToTextVisitor(); expression.Accpet(visitor); string actual = visitor.GetResult(); Assert.AreEqual(expected, actual); }
private static void AssertExpression(AlgebraicExpressions expression, int expected) { var visitor = new ToValueVisitor(); expression.Accpet(visitor); int actual = visitor.GetResult(); Assert.AreEqual(expected, actual); }
protected override void Invoke(object parameter) { switch (((parameter as System.Windows.RoutedEventArgs).Source as System.Windows.Controls.Button).Name) { case "button6": AlgebraicExpressions alg = new AlgebraicExpressions(); alg.Show(); this.Target.Hide(); break; case "button4": AngleForm ang = new AngleForm(); ang.Show(); this.Target.Hide(); break; case "button5": AutoAngleForm autoang = new AutoAngleForm(); autoang.Show(); this.Target.Hide(); break; case "button2": AutoCalcForm autocalc = new AutoCalcForm(); autocalc.Show(); this.Target.Hide(); break; case "button1": ManualCalcForm manual = new ManualCalcForm(); manual.Show(); this.Target.Hide(); break; case "button3": MoreComplexForm more = new MoreComplexForm(); more.Show(); this.Target.Hide(); break; } }
public Negation(AlgebraicExpressions operand) : base(operand) { }
protected BinaryOperator(AlgebraicExpressions leftOperand, AlgebraicExpressions rightOperand) { LeftOperand = leftOperand; RightOperand = rightOperand; }
public Division(AlgebraicExpressions leftOperand, AlgebraicExpressions rightOperand) : base(leftOperand, rightOperand) { }
public Multiplication(AlgebraicExpressions leftOperand, AlgebraicExpressions rightOperand) : base(leftOperand, rightOperand) { }
protected UnaryOperator(AlgebraicExpressions operand) { Operand = operand; }
public Substraction(AlgebraicExpressions leftOperand, AlgebraicExpressions rightOperand) : base(leftOperand, rightOperand) { }