}                                                            // окно выдачи средств

        /// <summary>
        /// Конструктор модели представления для меню выдачи средств
        /// </summary>
        /// <param name="MessageService">сервис сообщений</param>
        /// <param name="WithdrawCashService">сервис выдачи средств</param>
        /// <param name="CashMachine">банкомат</param>
        public WithDrawCashViewModel(IMessageService MessageService, IWithdrawCashService WithdrawCashService, ICashMachine CashMachine)
        {
            this.messageService      = MessageService;
            this.withdrawCashService = WithdrawCashService;

            this.cashMachine = CashMachine;

            SelectedDenomination = "default";
        }
Example #2
0
        private readonly WithDrawCashViewModel withdrawCashViewModel; // модель представление для меню выдачи средств

        /// <summary>
        /// Конструктор модели представления для главного окна
        /// </summary>
        /// <param name="mainWindow">главное окно</param>
        /// <param name="MessageService">сервис сообщений</param>
        /// <param name="InfoFileService">сервис открытия файла информации</param>
        /// <param name="DepositCashService">сервис внесения средств</param>
        /// <param name="WithdrawCashService">сервис выдачи средств</param>
        public MainViewModel(MainWindow mainWindow,
                             IMessageService MessageService, IInfoFileService InfoFileService, IDepositCashService DepositCashService, IWithdrawCashService WithdrawCashService)
        {
            this.mainWindow      = mainWindow;
            this.infoFileService = InfoFileService;
            this.messageService  = MessageService;

            cashMachine = new CashMachine();

            depositCashViewModel  = new DepositCashViewModel(MessageService, DepositCashService, cashMachine);
            withdrawCashViewModel = new WithDrawCashViewModel(MessageService, WithdrawCashService, cashMachine);
        }