예제 #1
0
 protected override void InitializeCalculators()
 {
     Calculators.Add(new fsDensityConcentrationCalculator());
     Calculators.Add(new fsPorosityCalculator());
     Calculators.Add(new fsPermeabilityCalculator());
     Calculators.Add(new fsRm0Hce0Calculator());
     AddCakeFormationCalculator();
 }
예제 #2
0
 private Thermo1CalculatorMgr()
 {
     Calculators.Add(new A117VcCalculator().Create());
     Calculators.Add(new A117FullModuleCalculator().Create());
     Calculators.Add(new A147VcCalculator().Create());
     Calculators.Add(new A147FullModuleCalculator().Create());
     Calculators.Add(new X1311Calculator().Create());
 }
예제 #3
0
 protected override void AddCakeFormationCalculator()
 {
     Calculators.Add(new fsBeltFiltersWithReversibleTraysCalculator());
 }
예제 #4
0
 protected override void InitializeCalculators()
 {
     Calculators.Add(m_calculator);
 }
예제 #5
0
 protected override void InitializeCalculators()
 {
     Calculators.Add(new fsPermeabilityCalculator());
 }
예제 #6
0
 protected override void InitializeCalculators()
 {
     Calculators.Add(new fsDensityConcentrationCalculator());
 }
예제 #7
0
 protected override void InitializeCalculators()
 {
     Calculators.Add(new fsDensityConcentrationCalculator());
     Calculators.Add(new fsPorosityCalculator());
     Calculators.Add(new fsLaboratoryFiltrationCalculator());
 }
예제 #8
0
 protected override void AddCakeFormationCalculator()
 {
     Calculators.Add(new fsContinuousNonModularBeltFilterCalculator());
 }
예제 #9
0
        public void CorrectAdditionResult(int a, int b, int expected)
        {
            var result = Calculators.Add(a, b);

            Assert.AreEqual(expected, result);
        }
예제 #10
0
 protected override void InitializeCalculators()
 {
     Calculators.Add(new fsRfFromCakeSaturationCalculator());
 }
예제 #11
0
        //Print Button
        private void BEqual_Click(object sender, RoutedEventArgs e)
        {
            if (printed == true)
            {
            }                        // if has been printed dont print again

            else if (operation == "+")
            {
                result         = (Calculators.Add(number1, number2));
                Resultbox.Text = result.ToString();
                FullText.Text += $" {number2} = {result}";
            }
            else if (operation == "-")
            {
                result         = (Calculators.Subtract(number1, number2));
                Resultbox.Text = result.ToString();
                FullText.Text += $" {number2} = {result}";
            }
            else if (operation == "*")
            {
                result         = (Calculators.Multiply(number1, number2));
                Resultbox.Text = result.ToString();
                FullText.Text += $" {number2} = {result}";
            }
            else if (operation == "/")
            {
                if (number2 == 0)
                {
                    Resultbox.Text = "Cannot divide by 0"; //this way you are ready to add the second number
                }
                else
                {
                    result         = (Calculators.Divide(number1, number2));
                    Resultbox.Text = result.ToString();
                    FullText.Text += $" {number2} = {result}";
                }
            }
            else if (operation == "%")
            {
                result         = (Calculators.Modulus(number1, number2));
                Resultbox.Text = result.ToString();
                FullText.Text += $" {number2} = {result}";
            }
            else if (operation == "^")
            {
                result         = (Calculators.PowerOf(number1, number2));
                Resultbox.Text = result.ToString();
                FullText.Text += $" {number2} = {result}";
            }
            else if (operation == "^ 2")
            {
                result         = Calculators.PowerOfTwo(number1);
                Resultbox.Text = result.ToString();
                FullText.Text += $" = {result}";
            }
            else if (operation == "sqrt(0)")
            {
                result         = Calculators.Root(number2);
                Resultbox.Text = $"sqrt({number2}) = {result}";
                FullText.Text  = $"sqrt({number2}) = {result}";
            }

            printed = true;
        }
예제 #12
0
 protected override void InitializeCalculators()
 {
     Calculators.Add(new fsCakeWashingCalculator());
 }