SuperPutty.dlgEditSession.textBoxSessionName_Validating C# (CSharp) Méthode

textBoxSessionName_Validating() private méthode

private textBoxSessionName_Validating ( object sender, CancelEventArgs e ) : void
sender object
e CancelEventArgs
Résultat void
        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");
                }
            }
        }