public ActivitiesViewModel(IGALogger logger, IUserInfoService userInfoService, IHUDProvider hudProvider, IIndicatorRepository indicatoryRepository, ISiteIndicatorRepository siteIndicatoryRepository, IActivityRepository activityRepository, IObservationRepository observationRepository, IObservationEntryRepository observationEntryRepository, IIndicatorAgeRepository indicatorAgeRepository) { _userInfoService = userInfoService; _hudProvider = hudProvider; SiteNameLabel = AppResources.SiteNameLabel; PageTitle = AppResources.IndicatorsPageTitle; _indicatorRepository = indicatoryRepository; _siteIndicatoryRepository = siteIndicatoryRepository; _activitiesRepository = activityRepository; _observationRepository = observationRepository; _observationEntryRepository = observationEntryRepository; _indicatorAgeRespository = indicatorAgeRepository; }
public LandingViewModel(IGALogger logger, IUserInfoService userInfoService, IHUDProvider hudProvider, IObservationService observationService, ISiteRepository siteRepository, IActivityRepository activityRepository, IIndicatorRepository indicatoryRepository, ISiteIndicatorRepository siteIndicatoryRepository, IObservationRepository observationRepository, IObservationEntryRepository observationEntryRepository, IObservationChangeRepository observationChangeRepository, IObservationCommentRepository observationCommentRepository, IObservationAttachmentRepository observationAttachmentRepository, IIndicatorAgeRepository indicatoryAgeRepository, IDeviceSettings deviceSettings) { _userInfoService = userInfoService; _hudProvider = hudProvider; _observationService = observationService; _siteRepository = siteRepository; _activityRepository = activityRepository; _indicatorRepository = indicatoryRepository; _siteIndicatorRepository = siteIndicatoryRepository; _observationRepository = observationRepository; _observationEntryRepository = observationEntryRepository; _observationChangeRepository = observationChangeRepository; _observationCommentRepository = observationCommentRepository; _observationAttachmentRepository = observationAttachmentRepository; _indicatorAgeRepository = indicatoryAgeRepository; _deviceSettings = deviceSettings; DownloadText = AppResources.DownloadText; LastInformationText = AppResources.LastInformationText; DownloadButtonText = AppResources.DownloadButtonText; var culture = DependencyService.Get <ILocale>().GetCurrentCultureInfo(); if (culture.TwoLetterISOLanguageName == "fr") { LanguageId = 2; } else if (culture.TwoLetterISOLanguageName == "es") { LanguageId = 3; } else { LanguageId = 1; } //GetUserInfo var userInfo = _userInfoService.GetSavedInfo(); if (!string.IsNullOrEmpty(userInfo.LastDownload)) { try { var last = DateTime.Parse(userInfo.LastDownload); var ci = DependencyService.Get <ILocale>().GetCurrentCultureInfo(); LastInformationTextDate = userInfo.LastDownload; //string.Format(ci, "{0}", last); } catch { LastInformationText = AppResources.NoDownloadText; } } else { LastInformationText = AppResources.NoDownloadText; } }