Esempio n. 1
0
        static void Main(string[] args)
        {
            var computations = new List <IComputation>
            {
                new Computation <SimpleModel, DoubleModel>("Арифметические расчёты", typeof(SimpleCalculator), typeof(SimpleView)),
                new Computation <DoubleModel, DoubleModel>("Расчёт квадратного корня", typeof(SquareRootCalculator), typeof(SquareRootView)),
                new Computation <ListModel, ListStatisticModel>("Статистика списка чисел", typeof(ListStatisticCalculator), typeof(ListStatisticView)),
            };

            var  calcController = new CalcController(new CommonView(), computations);
            bool again;

            do
            {
                again = calcController.Run();
            } while (again);
        }
Esempio n. 2
0
 public void Run()
 {
     _calcController.Run();
 }