public void OkayButton() { if (string.IsNullOrEmpty(_pathToIndex) || !Directory.Exists(_pathToIndex)) { _messageBox.ShowOkay("You must select a valid index directory.", "Invalid Path"); return; } var e = Okay; if (e != null) { e(this, EventArgs.Empty); } }