Ejemplo n.º 1
0
        private async void ShowDelete(object sender, RoutedEventArgs e)
        {
            var res = await this.ShowMessageAsync("Remove Show?", "Do you really want to remove this show from your favorites?",
                                                  MessageDialogStyle.AffirmativeAndNegative, new MetroDialogSettings { AffirmativeButtonText = "Yes", NegativeButtonText = "No", AnimateShow = false, AnimateHide = false });

            if (res == MessageDialogResult.Affirmative)
            {
                FavShowData show = ((ShowViewModel)ShowGrid.DataContext).Show;
                _setti.TvShows.Remove(show);

                show.RemoveFromDatabase(Database.DatabaseWriter.db);

                SwitchPage(0);
            }
        }