private void cancelButton_Click(object sender, EventArgs e) { if (goButton.Enabled) { Close(); } else { workQueue.Abort(); } }
protected void ReportError(string message) { var button = MessageBox.Show(message, "Error", MessageBoxButtons.OKCancel, MessageBoxIcon.Error); if (button == DialogResult.Cancel) { workQueue.Abort(); } }
protected void ReportError(string message) { var result = messageDispatcher.Dispatch(MessageType.Error, message, MessageChoice.OkCancel); if (result == MessageHandleResult.Cancel) { workQueue.Abort(); } }
private void cancelButton_Click(object sender, EventArgs e) { workQueue.Abort(); }