コード例 #1
0
 private void UpdateAnswer_Click(object sender, RoutedEventArgs e)
 {
     Answer selectedAnswer = AnswerListBox.SelectedItem as Answer;
     if (selectedAnswer != null)
     {
         UpdateAnswer window = new UpdateAnswer(selectedAnswer,mainWindow);
         window.Show();
         window.Closing +=updateAnswer;
     }
     else
     {
         mainWindow.ShowError("Du skal vælge et svar for at kunne ændre", true);
     }         
 }
コード例 #2
0
 private void AnswerListBox_MouseDoubleClick(object sender, System.Windows.Input.MouseButtonEventArgs e)
 {
         Answer selectedAnswer = AnswerListBox.SelectedItem as Answer;
         UpdateAnswer window = new UpdateAnswer(selectedAnswer,mainWindow);
         window.Show();
         window.Closing +=updateAnswer;
 }