src/Misc/EFTools/EntityDesign/UI/Views/Dialogs/NewFunctionImportDialog.cs
// <summary>
//     If we don't override the Up and Down arrow behavior then by default they navigate to the next Tab Stop
//     (which is the corresponding combo-box) and after that arrow keys only select the next/previous combo-box entry.
//     We are overriding this behavior so that the user can use the arrow keys to navigate to the next/previous
//     radio button instead. This addresses Accessibility bug 807144.
// </summary>
If we don't override the Up and Down arrow behavior then by default they navigate to the next Tab Stop
(which is the corresponding combo-box) and after that arrow keys only select the next/previous combo-box entry.
We are overriding this behavior so that the user can use the arrow keys to navigate to the next/previous
radio button instead. This addresses Accessibility bug 807144.
If we don ' t override the Up and Down arrow behavior then by default they navigate to the next Tab Stop ( which is the corresponding combo - box ) and after that arrow keys only select the next / previous combo - box entry . We are overriding this behavior so that the user can use the arrow keys to navigate to the next / previous radio button instead . This addresses Accessibility bug 807144 .
private void returnTypeButton_ArrowPressed(object sender, Keys key)
        {
            if (emptyReturnTypeButton == sender)
            {
                switch (key)
                {
                    case Keys.Up:
                        storedProcComboBox.Focus(); 
                        return;
                    case Keys.Down:
                        scalarTypeReturnButton.Checked = true;
                        scalarTypeReturnButton.Focus();
                        return;
                    default:
                        return;
                }
            }
            if (scalarTypeReturnButton == sender)
            {
                switch (key)
                {
                    case Keys.Up:
                        emptyReturnTypeButton.Checked = true;
                        emptyReturnTypeButton.Focus();
                        return;
                    case Keys.Down:
                        complexTypeReturnButton.Checked = true;
                        complexTypeReturnButton.Focus();
                        return;
                    default:
                        return;
                }
            }
            if (complexTypeReturnButton == sender)
            {
                switch (key)
                {
                    case Keys.Up:
                        scalarTypeReturnButton.Checked = true;
                        scalarTypeReturnButton.Focus();
                        return;
                    case Keys.Down:
                        entityTypeReturnButton.Checked = true;
                        entityTypeReturnButton.Focus();
                        return;
                    default:
                        return;
                }
            }
            if (entityTypeReturnButton == sender)
            {
                switch (key)
                {
                    case Keys.Up:
                        complexTypeReturnButton.Checked = true;
                        complexTypeReturnButton.Focus();
                        return;
                    case Keys.Down:
                        getColumnInformationButton.Focus();
                        return;
                    default:
                        return;
                }
            }
        }
private void returnTypeButton_ArrowPressed ( object sender , Keys key ) { if ( emptyReturnTypeButton == sender ) { switch ( key ) { case Keys . Up : storedProcComboBox . Focus ( ) ; return ; case Keys . Down : scalarTypeReturnButton . Checked = true ; scalarTypeReturnButton . Focus ( ) ; return ; default : return ; } } if ( scalarTypeReturnButton == sender ) { switch ( key ) { case Keys . Up : emptyReturnTypeButton . Checked = true ; emptyReturnTypeButton . Focus ( ) ; return ; case Keys . Down : complexTypeReturnButton . Checked = true ; complexTypeReturnButton . Focus ( ) ; return ; default : return ; } } if ( complexTypeReturnButton == sender ) { switch ( key ) { case Keys . Up : scalarTypeReturnButton . Checked = true ; scalarTypeReturnButton . Focus ( ) ; return ; case Keys . Down : entityTypeReturnButton . Checked = true ; entityTypeReturnButton . Focus ( ) ; return ; default : return ; } } if ( entityTypeReturnButton == sender ) { switch ( key ) { case Keys . Up : complexTypeReturnButton . Checked = true ; complexTypeReturnButton . Focus ( ) ; return ; case Keys . Down : getColumnInformationButton . Focus ( ) ; return ; default : return ; } } }
If we don't override the Up and Down arrow behavior then by default they navigate to the next Tab Stop
(which is the corresponding combo-box) and after that arrow keys only select the next/previous combo-box entry.
If we don ' t override the Up and Down arrow behavior then by default they navigate to the next Tab Stop ( which is the corresponding combo - box ) and after that arrow keys only select the next / previous combo - box entry .
// navigates to previous logical control above the Empty Return Type radio button // navigates to next logical control below the Entity Type Return Type radio button
sender
object
key
Keys