/// <summary> /// Action to be taken when the cancel button is pressed /// </summary> private void Cancel(bool close = false) { OnCancel.SafeInvoke(this); if (close) { Close(); } }