Inheritance: System.EventArgs
Esempio n. 1
0
        private void SendCedeFocusEvent(Action action)
        {
            if (CedeFocusEvent != null)
            {
                CedeFocusEventArgs args = new CedeFocusEventArgs();

                args.Action     = action;
                args.FieldIndex = FieldIndex;

                CedeFocusEvent(this, args);
            }
        }
Esempio n. 2
0
        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);
            }
        }
Esempio n. 3
0
        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);
        }
Esempio n. 4
0
        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 );
        }
Esempio n. 5
0
        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 );
             }
        }
Esempio n. 6
0
        private void SendCedeFocusEvent( Action action )
        {
            if ( CedeFocusEvent != null )
             {
            CedeFocusEventArgs args = new CedeFocusEventArgs();

            args.Action = action;
            args.FieldIndex = FieldIndex;

            CedeFocusEvent( this, args );
             }
        }