public RouteListAnalysisViewModel( IEntityUoWBuilder uowBuilder, IUnitOfWorkFactory unitOfWorkFactory, ICommonServices commonServices, IOrderSelectorFactory orderSelectorFactory, IEmployeeJournalFactory employeeJournalFactory, ICounterpartyJournalFactory counterpartyJournalFactory, IDeliveryPointJournalFactory deliveryPointJournalFactory, ISubdivisionJournalFactory subdivisionJournalFactory, IGtkTabsOpener gtkDialogsOpener, IUndeliveredOrdersJournalOpener undeliveredOrdersJournalOpener, IDeliveryShiftRepository deliveryShiftRepository, IEmployeeSettings employeeSettings, IUndeliveredOrdersRepository undeliveredOrdersRepository) : base(uowBuilder, unitOfWorkFactory, commonServices) { _orderSelectorFactory = orderSelectorFactory ?? throw new ArgumentNullException(nameof(orderSelectorFactory)); _employeeJournalFactory = employeeJournalFactory ?? throw new ArgumentNullException(nameof(employeeJournalFactory)); _counterpartyJournalFactory = counterpartyJournalFactory ?? throw new ArgumentNullException(nameof(counterpartyJournalFactory)); _deliveryPointJournalFactory = deliveryPointJournalFactory ?? throw new ArgumentNullException(nameof(deliveryPointJournalFactory)); _subdivisionJournalFactory = subdivisionJournalFactory ?? throw new ArgumentNullException(nameof(subdivisionJournalFactory)); _gtkDialogsOpener = gtkDialogsOpener ?? throw new ArgumentNullException(nameof(gtkDialogsOpener)); _undeliveredOrdersJournalOpener = undeliveredOrdersJournalOpener ?? throw new ArgumentNullException(nameof(undeliveredOrdersJournalOpener)); _employeeSettings = employeeSettings ?? throw new ArgumentNullException(nameof(employeeSettings)); UndeliveredOrdersRepository = undeliveredOrdersRepository ?? throw new ArgumentNullException(nameof(undeliveredOrdersRepository)); _commonServices = commonServices ?? throw new ArgumentNullException(nameof(commonServices)); if (deliveryShiftRepository == null) { throw new ArgumentNullException(nameof(deliveryShiftRepository)); } DeliveryShifts = deliveryShiftRepository.ActiveShifts(UoW); Entity.ObservableAddresses.PropertyOfElementChanged += ObservableAddressesOnPropertyOfElementChanged; undeliveryViewOpener = new UndeliveredOrdersJournalOpener(); employeeService = VodovozGtkServicesConfig.EmployeeService; CurrentEmployee = employeeService.GetEmployeeForUser(UoW, CurrentUser.Id); if (CurrentEmployee == null) { AbortOpening("Ваш пользователь не привязан к действующему сотруднику, вы не можете открыть " + "диалог разбора МЛ, так как некого указывать в качестве логиста.", "Невозможно открыть разбор МЛ"); } LogisticanSelectorFactory = _employeeJournalFactory.CreateWorkingOfficeEmployeeAutocompleteSelectorFactory(); DriverSelectorFactory = _employeeJournalFactory.CreateWorkingDriverEmployeeAutocompleteSelectorFactory(); ForwarderSelectorFactory = _employeeJournalFactory.CreateWorkingForwarderEmployeeAutocompleteSelectorFactory(); TabName = $"Диалог разбора {Entity.Title}"; }