Beispiel #1
0
        public void LoadData(Budget budget)
        {
            BudgetCalculatorEvaluator.Budget = budget;
            LoadValueTypes();
            LoadOperatorTypes();
            Budget = budget;
            if (Database.Count <BudgetCalculatorEquation>() > 0)
            {
                LastEquationPosition = Database.ExecuteScalar <int>("SELECT MAX(Position) FROM [BudgetCalculatorEquation]");
            }
            var equations = CachedService.GetAllEquations();

            equations.ForEach(x =>
            {
                BudgetCalculatorEvaluator.Refresh(x);
            });

            Equations.IsNotifying = false;
            Equations.Clear();
            Equations.AddRange(equations);
            Equations.IsNotifying = true;
            Equations.Refresh();
        }
Beispiel #2
0
 /// <summary>
 ///     Initializes a new instance of the <see cref="LinearEquationSystem" /> class.
 /// </summary>
 /// <param name="equations">
 ///     The <see cref="LinearEquation" />s that this <see cref="LinearEquationSystem" /> should
 ///     contain.
 /// </param>
 public LinearEquationSystem(params LinearEquation[] equations)
 {
     Equations.AddRange(equations);
 }
Beispiel #3
0
 /// <summary>
 ///     Initializes a new instance of the <see cref="LinearEquationSystem" /> class.
 /// </summary>
 /// <param name="equations">
 ///     The <see cref="LinearEquation" />s that this <see cref="LinearEquationSystem" /> should
 ///     contain.
 /// </param>
 public LinearEquationSystem(IEnumerable <LinearEquation> equations)
 {
     Equations.AddRange(equations);
 }