예제 #1
0
        private void ButtonListItemRemove_Click(object sender, RoutedEventArgs e)
        {
            CatItemStat item = (sender as Button).DataContext as CatItemStat;


            if (viewModel.RemoveCat(item.Value))
            {
                AddLog($"removed item = {item.Value} ({item.Count})");
            }
        }
예제 #2
0
        private void ButtonListItemRemoveRelatedPosts_Click(object sender, RoutedEventArgs _e)
        {
            CatItemStat item = (sender as Button).DataContext as CatItemStat;

            DataStore e = DependencyService.GetInstance <DataStore>();

            if (e.RemoveRelatedPosts(item.Value))
            {
                AddLog($"removed related Posts = {item.Value} ({item.Count})");
                viewModel.Cats = GetCatItems().ToObservableCollection();
            }
        }