private void ShowQuestionOnNativeThread(object sender, UserQuestionEventArgs e) { var result = MessageBox.Show(e.UserQuestion.Message, e.UserQuestion.Label, e.UserQuestion.Buttons, e.UserQuestion.Icon); if (result == DialogResult.OK) { e.UserQuestion.OkResponse.Invoke(); } else { e.UserQuestion.CancelResponse.Invoke(); } }
private void InteractionServiceUserQuestionReceived(object sender, UserQuestionEventArgs e) { Invoke(new NativeThreadFunctinUserQuestion(ShowQuestionOnNativeThread), this, e); }