public UserManagementViewModel(IEventAggregator aggregator, IRegionManager regionManager,
            IConnectionManager connectionManager, IInteractionService interactionService, ILoggerFacade loggerFacade) :
                base(aggregator, regionManager, connectionManager, interactionService, loggerFacade)
        {
            aggregator.GetEvent<BootstrappingCompleteUiEvent>().Subscribe(BootstrappCompletedHandler);

            ShutdownCmd = new RelayCommand(ShutdownExecute, ShutdownCanExecute);
            LogInCmd = new RelayCommand(LogInExecute, LogInCanExecute);
            Application.Current.Exit += CurrentOnExit;

            UpdateCredentialsOnLogin = true;
        }
示例#2
0
        /// <summary>
        ///     Initializes a new instance of the <see cref="VMBase" /> class.
        /// </summary>
        /// <param name="aggregator">The aggregator.</param>
        /// <param name="regionManager">The region manager.</param>
        /// <param name="conManager">The DB connection manager</param>
        /// <param name="interactionService">The interaction service for displaying popus</param>
        /// <param name="loggerFacade">Prism logging facade</param>
        /// <exception cref="System.ArgumentNullException">
        ///     Any parameter
        /// </exception>
        public VMBase(
            IEventAggregator aggregator,
            IRegionManager regionManager,
            IConnectionManager conManager,
            IInteractionService interactionService,
            ILoggerFacade loggerFacade)

        {
            if (regionManager == null)
            {
                throw new ArgumentNullException("regionManager");
            }

            if (aggregator == null)
            {
                throw new ArgumentNullException("aggregator");
            }

            if (conManager == null)
            {
                throw new ArgumentNullException("conManager");
            }

            if (interactionService == null)
            {
                throw new ArgumentNullException("interactionService");
            }

            if (loggerFacade == null)
            {
                throw new ArgumentNullException("loggerFacade");
            }

            RegionManager = regionManager;
            EventAggregator = aggregator;
            ConManager = conManager;
            Logger = loggerFacade;
            InteractionService = interactionService;

            NavigateCommand = new RelayCommand(NavigateCommandExecute, NavigateCommandCanExecute);
        }