Exemplo n.º 1
0
        public ShellViewModel(IEventAggregator eventAggregator, IRegionManager regionManager, IUnityContainer container, EsterBootstrapper bootstrapper)
        {
            _eventAggregator = eventAggregator;
            _regionManager = regionManager;
            _bootstrapper = bootstrapper;
            _container = container;
            _regionManager.AddToRegion(RegionNames.MainRegion, container.Resolve<StartView>());

            AppCloseCommand = new DelegateCommand(ApplicationClose);
        }
Exemplo n.º 2
0
        public LoginViewModel(IEventAggregator eventAggregator, IDataTransport dataTransport, IServerInfo serverInfo, EsterBootstrapper esterBootstrapper)
        {
            _esterBootstrapper = esterBootstrapper;
            _esterBootstrapper.BootProgressChangedEvent += OnBootProgressChanged;
            _eventAggregator = eventAggregator;
            _dataTransport = dataTransport;
            _serverInfo = serverInfo;

            LoginCommand = new DelegateCommand<object>(Login);
            LoginAdUserCommand = new DelegateCommand<object>(LoginAdUser);

            Language = InputLanguageManager.Current.CurrentInputLanguage.TwoLetterISOLanguageName.ToUpper();
            InputLanguageManager.Current.InputLanguageChanged += InputLanguageChanged;

            _eventAggregator.GetEvent<ApplicationLoadedEvent>().Subscribe(OnApplicationLoaded, ThreadOption.UIThread);

            ////todo: убрать на продакшн
            UserName = "******";
        }