Пример #1
0
        private async void UnSeenEpisode_Click(object sender, RoutedEventArgs e)
        {
            this.indicator = App.ShowLoading(this);
            lastModel      = (ListItemViewModel)((MenuItem)sender).DataContext;

            if (await episodeController.unMarkEpisodeAsSeen(lastModel.Tvdb, lastModel.Imdb, lastModel.Name, lastModel.Year, lastModel.Season, lastModel.Episode))
            {
                lastModel.Watched = false;
                ToastNotification.ShowToast("Show", "Episode unmarked as watched.");
            }
            else
            {
                ErrorManager.ShowConnectionErrorPopup();
            }

            lastModel = null;
            this.indicator.IsVisible = false;
        }
Пример #2
0
        private async void UnSeenEpisode_Click(object sender, RoutedEventArgs e)
        {
            App.TrackEvent("ViewShow", "Unseen context");
            this.progressBarLoading.Visibility = System.Windows.Visibility.Visible;
            lastModel = (ListItemViewModel)((MenuItem)sender).DataContext;

            if (await episodeController.unMarkEpisodeAsSeen(lastModel.Tvdb, App.ShowViewModel.Imdb, App.ShowViewModel.Name, Int16.Parse(App.ShowViewModel.Year), lastModel.Season, lastModel.Episode))
            {
                lastModel.Watched = false;
                ToastNotification.ShowToast("Show", "Episode unmarked as watched.");
            }
            else
            {
                ErrorManager.ShowConnectionErrorPopup();
            }

            lastModel = null;
            this.progressBarLoading.Visibility = System.Windows.Visibility.Collapsed;
        }
Пример #3
0
        private async void unseeButton_Click(object sender, EventArgs e)
        {
            if (!LoadingActive)
            {
                App.TrackEvent("ViewEpisode", "Unseen");
                LoadingActive = true;
                progressBarLoading.Visibility = System.Windows.Visibility.Visible;
                if (await episodeController.unMarkEpisodeAsSeen(this.show.tvdb_id, this.show.imdb_id, this.show.Title, this.show.year, this.episode.Season, this.episode.Number))
                {
                    App.EpisodeViewModel.Watched = false;
                    await updateOtherViews();

                    ToastNotification.ShowToast("Episode", "Episode unmarked as watched.");

                    InitAppBar();
                }
                else
                {
                    ErrorManager.ShowConnectionErrorPopup();
                }
                progressBarLoading.Visibility = System.Windows.Visibility.Collapsed;
                LoadingActive = false;
            }
        }