private void butOK_Click(object sender, EventArgs e) { if (labelCount.Text == "0") { MsgBox.Show(this, "There are no duplicates to clear."); return; } if (!MsgBox.Show(this, MsgBoxButtons.OKCancel, "Clear all duplicates?")) { return; } Cursor = Cursors.WaitCursor; Schedules.ClearDuplicates(); Cursor = Cursors.Default; MsgBox.Show(this, "Done."); FillLabels(); }