private void textBoxSessionName_Validating(object sender, CancelEventArgs e)
{
if (this.SessionNameValidator != null)
{
string error;
if (!this.SessionNameValidator(this.textBoxSessionName.Text, out error))
{
e.Cancel = true;
this.SetError(this.textBoxSessionName, error ?? "Invalid Session Name");
}
}
}