private void SendCedeFocusEvent(Action action) { if (CedeFocusEvent != null) { CedeFocusEventArgs args = new CedeFocusEventArgs(); args.Action = action; args.FieldIndex = FieldIndex; CedeFocusEvent(this, args); } }
private void SendCedeFocusEvent(Direction direction, Selection selection) { if (CedeFocusEvent != null) { CedeFocusEventArgs args = new CedeFocusEventArgs(); args.Action = Action.None; args.Direction = direction; args.FieldIndex = FieldIndex; args.Selection = selection; CedeFocusEvent(this, args); } }
private void OnFocusCeded(object sender, CedeFocusEventArgs e) { switch (e.Action) { case Action.Home: _fieldControls[0].TakeFocus(Action.Home); return; case Action.End: _fieldControls[FieldCount - 1].TakeFocus(Action.End); return; case Action.Trim: if (e.FieldIndex == 0) { return; } _fieldControls[e.FieldIndex - 1].TakeFocus(Action.Trim); return; } if ((e.Direction == Direction.Reverse && e.FieldIndex == 0) || (e.Direction == Direction.Forward && e.FieldIndex == (FieldCount - 1))) { return; } int fieldIndex = e.FieldIndex; if (e.Direction == Direction.Forward) { ++fieldIndex; } else { --fieldIndex; } _fieldControls[fieldIndex].TakeFocus(e.Direction, e.Selection); }
private void OnFocusCeded( object sender, CedeFocusEventArgs e ) { switch ( e.Action ) { case Action.Home: _fieldControls[ 0 ].TakeFocus( Action.Home ); return; case Action.End: _fieldControls[ FieldCount - 1 ].TakeFocus( Action.End ); return; case Action.Trim: if ( e.FieldIndex == 0 ) { return; } _fieldControls[ e.FieldIndex - 1 ].TakeFocus( Action.Trim ); return; } if ( ( e.Direction == Direction.Reverse && e.FieldIndex == 0 ) || ( e.Direction == Direction.Forward && e.FieldIndex == ( FieldCount - 1 ) ) ) { return; } int fieldIndex = e.FieldIndex; if ( e.Direction == Direction.Forward ) { ++fieldIndex; } else { --fieldIndex; } _fieldControls[ fieldIndex ].TakeFocus( e.Direction, e.Selection ); }
private void SendCedeFocusEvent( Direction direction, Selection selection ) { if ( CedeFocusEvent != null ) { CedeFocusEventArgs args = new CedeFocusEventArgs(); args.Action = Action.None; args.Direction = direction; args.FieldIndex = FieldIndex; args.Selection = selection; CedeFocusEvent( this, args ); } }
private void SendCedeFocusEvent( Action action ) { if ( CedeFocusEvent != null ) { CedeFocusEventArgs args = new CedeFocusEventArgs(); args.Action = action; args.FieldIndex = FieldIndex; CedeFocusEvent( this, args ); } }