Example #1
0
 private void Delete(object sender, RoutedEventArgs e)
 {
     if (QuestionListBox.SelectedIndex >= 0)
     {
         MessageBoxResult result = MessageBox.Show("Czy na pewno chcesz usunąć to pytanie?", "Uwaga", MessageBoxButton.OKCancel);
         if (result == MessageBoxResult.OK)
         {
             QuestionData.DeleteQuestion(QuestionList[QuestionListBox.SelectedIndex]);
             QuestionList.RemoveAt(QuestionListBox.SelectedIndex);
         }
     }
 }