コード例 #1
0
 private void banComment(object sender, RoutedEventArgs e)
 {
     if (CommentList.SelectedItem == null)
     {
         MessageBox.Show("Please select a comment to decline");
         return;
     }
     ClientRequests.BanComment(comments.ElementAt(CommentList.SelectedIndex));
     comments = ClientRequests.getComments();
     CommentList.ItemsSource = comments;
 }