Exemplo n.º 1
0
        public LoginViewModel(IRegionManager _regionManager, IUnityContainer _container, IEventAggregator _eventAggregator, ILoginService _loginService, ICurrentPeriodService _currentPeriodService)
        {
            container       = _container;
            regionManager   = _regionManager;
            eventAggregator = _eventAggregator;

            loginService         = _loginService;
            currentPeriodService = _currentPeriodService;

            PopUp         = new ChangePasswordView();
            PopUp.Closed += new EventHandler(PopUpView_Closed);

            eventAggregator.GetEvent <LogOutEvent>().Subscribe(OnLogOutLinkClicked, ThreadOption.UIThread);
            LoginButtonCommand = new DelegateCommand(OnLoginButtonCommandClick, IsEnabled);
        }
Exemplo n.º 2
0
        public CurrentPeriodViewModel(IEventAggregator _eventAggregator)
        {
            service = new PeriodService();
            currentPeriodService    = new CurrentPeriodService();
            SetCurrentPeriodCommand = new DelegateCommand(OnSetCurrentPeriodCommand, CanSetCurrentPeriod);

            IsCurrentPeriodSettable = false;
            dispatcher      = Deployment.Current.Dispatcher;
            eventAggregator = _eventAggregator;

            //LoadAllPeriodCompleted();
            //service.LoadAll();

            //LoadCurrentPeriodCompleted();
            //currentPeriodService.GetCurrentPeriod();

            //eventAggregator = _eventAggregator;
            //_eventAggregator.GetEvent<SetupEvent>().Subscribe(OnInitialise);

            OnInitialise("");
        }