Exemplo n.º 1
0
 private void SendSpecialKeyEvent(Keys keyCode)
 {
     if (null != this.SpecialKeyEvent)
     {
         SpecialKeyEventArgs e = new SpecialKeyEventArgs();
         e.FieldId = this.FieldId;
         e.KeyCode = keyCode;
         this.SpecialKeyEvent(this, e);
     }
 }
Exemplo n.º 2
0
        private void OnSpecialKey(object sender, SpecialKeyEventArgs e)
        {
            switch (e.KeyCode)
            {
            case Keys.End:
                this._fieldControls[3].TakeFocus(Direction.Reverse, Selection.None);
                break;

            case Keys.Home:
                this._fieldControls[0].TakeFocus(Direction.Forward, Selection.None);
                break;

            case Keys.Back:
                if (e.FieldId > 0)
                {
                    this._fieldControls[e.FieldId - 1].HandleSpecialKey(Keys.Back);
                }
                break;
            }
        }