ZForge.Controls.XPTable.Editors.DropDownCellEditor.OnKeyPress C# (CSharp) Méthode

OnKeyPress() protected méthode

Handler for the editors TextBox.KeyPress event
protected OnKeyPress ( object sender, KeyPressEventArgs e ) : void
sender object The object that raised the event
e System.Windows.Forms.KeyPressEventArgs A KeyPressEventArgs that contains the event data
Résultat void
        protected virtual void OnKeyPress(object sender, KeyPressEventArgs e)
        {
            if (e.KeyChar == AsciiChars.CarriageReturn /*Enter*/)
            {
                if (this.EditingTable != null)
                {
                    this.EditingTable.StopEditing();
                }
            }
            else if (e.KeyChar == AsciiChars.Escape)
            {
                if (this.EditingTable != null)
                {
                    this.EditingTable.CancelEditing();
                }
            }
        }