コード例 #1
0
 public void approveComment(object sender, RoutedEventArgs args)
 {
     if (CommentList.SelectedItem == null)
     {
         MessageBox.Show("Please select a comment to approve");
         return;
     }
     ClientRequests.ApproveComment(comments.ElementAt(CommentList.SelectedIndex));
     comments = ClientRequests.getComments();
     CommentList.ItemsSource = comments;
 }