Beispiel #1
0
        public async Task Selected(object sender, SelectionChangedEventArgs e)
        {
            Views.Busy.SetBusy(true, _loader.GetString("HttpLoading"));
            var session = (StudySessionItemVM)((ListView)sender).SelectedItem;

            var set = await _setFetcher.GetSet(session.SetId);


            Views.Busy.SetBusy(false, null);
            NavigationService.Navigate(typeof(Views.SetDetailPage), set);
        }
Beispiel #2
0
        public async void SelectedSet(object sender, SelectionChangedEventArgs e)
        {
            var setVm = (SetViewModel)((ListView)sender).SelectedItem;

            try
            {
                var set = await _setFetcher.GetSet(setVm.Id);

                NavigationService.Navigate(typeof(Views.SetDetailPage), set);
            }
            catch (SetIsPrivateException)
            {
                // handle password protected case.
                NavigationService.Navigate(typeof(Views.PrivateSetPage), setVm);
            }
            catch (Exception k)
            {
                var dialog = new MessageDialog($"Error: {k.Message}");
                await dialog.ShowAsync();

                return;
            }
        }