![]() Schedules the Finished callback method to be executed in the UI thread ![]() Delegate the actual test execution to the user Private void RunTest(object sender, EventArgs e) / Executes the TestCallback event handler in a background thread. Public DispatcherOperationCallback Finished ![]() Public TestRunner(Dispatcher aDispatcher) Private void Page_KeyDown(object sender, KeyEventArgs e) TestResultBlock.Text = "Test successfully completed" Private object HandleTestFinished(object arg) Do some work, and set done to true when finished Private void MyTestMethod(object sender, EventArgs e) / Perform the test here, and remember to check for Runner.Cancelled = true with regular TestResultBlock.Text = "Waiting for test to finish." TestBtn.Content = "Press to cancel test" Private void Button_Click(object sender, RoutedEventArgs e)
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |