protected override void OnCreate(Bundle savedInstanceState)
 {
     base.OnCreate(savedInstanceState);
     this.Title = QuestionnaireViewModel.REGISTER_QUESTIONAIRE_ACCESSIBILITY_LOADING_PAGE_TITLE;
     SetContentView(Resource.Layout.loading_page);
     _viewModel = new DailyNumbersViewModel();
     FindViewById <ProgressBar>(Resource.Id.progress_bar).Visibility = ViewStates.Visible;
 }
        public async void FetchDataForDiseaseRateViewModel()
        {
            _diseaseRateOfTodayData = new DailyNumbersViewModel();

            try
            {
                bool isSuccess = await DailyNumbersViewModel.UpdateFHIDataAsync();

                if (!isSuccess && LocalPreferencesHelper.HasNeverSuccessfullyFetchedFHIData)
                {
                    OnError(new NullReferenceException("No FHI data"));
                    return;
                }
                LogUtils.LogMessage(LogSeverity.INFO, "Data for the disease rate of the day is loaded");

                OnSuccess();
            }
            catch (Exception e)
            {
                OnError(e);
            }
        }
        async void LoadDataAndStartDiseaseRateActivity()
        {
            try
            {
                var isSuccess = await DailyNumbersViewModel.UpdateFHIDataAsync();

                if (!isSuccess && LocalPreferencesHelper.HasNeverSuccessfullyFetchedFHIData)
                {
                    OnError(new NullReferenceException("No FHI data"));
                    return;
                }
                LogUtils.LogMessage(LogSeverity.INFO, "Data for the disease rate of the day is loaded");
                OnActivityFinished();
            }
            catch (Exception e)
            {
                if (!IsFinishing)
                {
                    OnError(e);
                }
            }
        }
Ejemplo n.º 4
0
 static DailyNumbersActivity()
 {
     ViewModel = new DailyNumbersViewModel();
 }
Ejemplo n.º 5
0
 public DailyNumbersViewController(IntPtr handle) : base(handle)
 {
     _viewModel = new DailyNumbersViewModel();
 }