private void OnCedeFocus(Object sender, CedeFocusEventArgs e)
        {
            if ((e.Direction == Direction.Reverse && e.FieldId == 0) ||
                (e.Direction == Direction.Forward && e.FieldId == (NumberOfFields - 1)))
            {
                return;
            }

            int fieldId = e.FieldId;

            if (e.Direction == Direction.Forward)
            {
                ++fieldId;
            }
            else
            {
                --fieldId;
            }

            _fieldControls[fieldId].TakeFocus(e.Direction, e.Selection);
        }
      private void OnCedeFocus( Object sender, CedeFocusEventArgs e )
      {
         if ( ( e.Direction == Direction.Reverse && e.FieldId == 0 ) ||
              ( e.Direction == Direction.Forward && e.FieldId == ( NumberOfFields - 1 ) ) )
         {
            return;
         }

         int fieldId = e.FieldId;

         if ( e.Direction == Direction.Forward )
         {
            ++fieldId;
         }
         else
         {
            --fieldId;
         }

         _fieldControls[fieldId].TakeFocus( e.Direction, e.Selection );
      }
Exemple #3
0
 private void SendCedeFocusEvent( Direction direction, Selection selection )
 {
    if ( null != CedeFocusEvent )
    {
       CedeFocusEventArgs args = new CedeFocusEventArgs();
       args.FieldId = FieldId;
       args.Direction = direction;
       args.Selection = selection;
       CedeFocusEvent( this, args );
    }
 }