示例#1
0
        private async void Seen_Click(object sender, EventArgs e)
        {
            if (!LoadingActive)
            {
                App.TrackEvent("ViewEpisode", "Seen");

                LoadingActive = true;
                progressBarLoading.Visibility = System.Windows.Visibility.Visible;

                if (await episodeController.markEpisodeAsSeen(this.show.tvdb_id, this.show.imdb_id, this.show.Title, this.show.year, this.episode.Season, this.episode.Number))
                {
                    ToastNotification.ShowToast("Episode", "Episode marked as watched.");
                    App.EpisodeViewModel.Watched = true;
                    await updateOtherViews();

                    InitAppBar();
                }
                else
                {
                    ErrorManager.ShowConnectionErrorPopup();
                }
                progressBarLoading.Visibility = System.Windows.Visibility.Collapsed;
                LoadingActive = false;
            }
        }
示例#2
0
        private async void SeenEpisode_Click(object sender, RoutedEventArgs e)
        {
            this.indicator = App.ShowLoading(this);
            lastModel      = (ListItemViewModel)((MenuItem)sender).DataContext;

            if (await episodeController.markEpisodeAsSeen(lastModel.Tvdb, lastModel.Imdb, lastModel.Name, lastModel.Year, lastModel.Season, lastModel.Episode))
            {
                lastModel.Watched = true;
                ToastNotification.ShowToast("Show", "Episode marked as watched.");
            }
            else
            {
                ErrorManager.ShowConnectionErrorPopup();
            }
            lastModel = null;
            this.indicator.IsVisible = false;
        }
示例#3
0
        private async void SeenEpisode_Click(object sender, RoutedEventArgs e)
        {
            this.progressBarLoading.Visibility = System.Windows.Visibility.Visible;
            App.TrackEvent("ViewShow", "Seen context");

            lastModel = (ListItemViewModel)((MenuItem)sender).DataContext;

            if (await episodeController.markEpisodeAsSeen(lastModel.Tvdb, App.ShowViewModel.Imdb, App.ShowViewModel.Name, Int16.Parse(App.ShowViewModel.Year), lastModel.Season, lastModel.Episode))
            {
                lastModel.Watched = true;
                ToastNotification.ShowToast("Show", "Episode marked as watched.");
            }
            else
            {
                ErrorManager.ShowConnectionErrorPopup();
            }
            lastModel = null;
            this.progressBarLoading.Visibility = System.Windows.Visibility.Collapsed;
        }