protected void RaiseCloseDialog(DialogCloseState closeState) { if (CloseDialog != null) { CloseDialog(this, closeState); } }
void OnCloseDialog(object sender, DialogCloseState e) { switch (e) { case DialogCloseState.Ok: DialogResult = true; Close(); break; case DialogCloseState.Cancel: DialogResult = false; Close(); break; default: throw new ArgumentOutOfRangeException("e"); } }