Ejemplo n.º 1
0
        private async void OnUserLoggedIn()
        {
            var patients = LocalCache.Instance.PatientsRepository.Patients;

            new Task(() => LocalCache.Instance.PatientsRepository.SetPatient(patients)).Start();
            new Task(() => ListViewModel.PopulatePatientsList(LocalCache.Instance.PatientsRepository.Patients)).Start();
            PopulateSettingsItems();
            eventAggregator.GetEvent <DataLoadedEvent>().Publish(null);
            InterventionsGeneralDetailsViewModel.InitNames();
        }
Ejemplo n.º 2
0
 public ClientShellViewModel(IEventAggregator eventAggregator, IUnityContainer unityContainer, IRegionManager regionManager)
 {
     this.eventAggregator    = eventAggregator;
     ListViewModel           = new LeftListViewModel(this);
     HorizontalTabsViewModel = new HorizontalTabsViewModel();
     RegionHandlers          = new RegionHandlers(eventAggregator, unityContainer, regionManager);
     RegionHandlers.Parent   = this;
     eventAggregator.GetEvent <UserLoginEvent>().Subscribe(ConnectToServerAndLogin);
     ChangeCredentialsButton = new ActionButtonViewModel("", new DelegateCommand(OnChangeCredentials), DSA.Common.Infrastructure.ImagePath.DentistProfile);
     this.eventAggregator.GetEvent <TotalsModifiedEvent>().Subscribe(OnChangeTotalInfo);
     InterventionsGeneralDetailsViewModel = new InterventionsGeneralDetailsViewModel();
     DownLoadDatabaseFromFtp();
 }