} // окно меню внесения средств /// <summary> /// Конструктор модели представления /// </summary> /// <param name="MessageService">сервис сообщений</param> /// <param name="DepositCashService">сервис внесения средств</param> /// <param name="CashMachine">банкомат</param> public DepositCashViewModel(IMessageService MessageService, IDepositCashService DepositCashService, ICashMachine CashMachine) { this.messageService = MessageService; this.depositCashService = DepositCashService; this.cashMachine = CashMachine; }
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); }