static void tdDownload_Closing(object sender, TaskDialogClosingEventArgs e) { if (e.TaskDialogResult == TaskDialogResult.Cancel && client.IsBusy) { client.CancelAsync(); } }
private void OnDialogClosing(object sender, TaskDialogClosingEventArgs e) { // Any button clicks are considered a "commit" by the dialog, unless // closing is explicitly cancelled if (e.CustomButton == "increaseButton" || e.CustomButton == "decreaseButton") { e.Cancel = true; } }
void dialog_Closing(object sender, TaskDialogClosingEventArgs e) { Console.WriteLine(e.TaskDialogResult); }
private void OnDialogClosing(object sender, TaskDialogClosingEventArgs e) { // Can check e.CustomButton and e.StandardButton properties // to determine whether or not to cancel this Close event. }
//Event fires when taskDialog closes. void taskDialogMain_Closing(object sender, TaskDialogClosingEventArgs e) { this.Close(); }