Beispiel #1
0
        private void Avtor_KeyDown(object sender, KeyEventArgs e)
        {
            bool
                bAS = xMF.xPars.bArrowsWithShift,
                ret = true;

            bSkipKey = ServClass.HandleSpecMode(e, true, xMF.xBCScanner, bAS);
            if (bSkipKey)
            {
                return;
            }

            switch (e.KeyValue)
            {
            case W32.VK_UP:
                aEd.TryNext(AppC.CC_PREV);
                break;

            case W32.VK_DOWN:
                aEd.TryNext(AppC.CC_NEXT);
                break;

            case W32.VK_ENTER:
                if (aEd.TryNext(AppC.CC_NEXTOVER) == AppC.RC_CANCELB)
                {
                    EndEditAvt(true);
                }
                break;

            case W32.VK_ESC:
                EndEditAvt(false);
                break;

            case W32.VK_LEFT:
            case W32.VK_RIGHT:
                if (cbReg.Focused)
                {
                    cbReg.SelectedIndex = (cbReg.SelectedIndex == cbReg.Items.Count - 1) ? 0 : cbReg.SelectedIndex + 1;
                }
                break;

            case W32.VK_TAB:
                if (e.Shift == true)
                {
                    aEd.TryNext(AppC.CC_PREV);
                }
                else
                {
                    aEd.TryNext(AppC.CC_NEXT);
                }
                break;

            default:
                ret = false;
                break;
            }

            e.Handled = ret;
            bSkipKey  = ret;
        }
Beispiel #2
0
        private void Avtor_KeyDown(object sender, KeyEventArgs e)
        {
            bool ret = true;

            bSkipKey = ServClass.HandleSpecMode(e, true, xMF.xBCScanner);
            if (bSkipKey)
            {
                return;
            }

            switch (e.KeyValue)
            {
            case W32.VK_UP:
                aEd.TryNext(AppC.CC_PREV);
                break;

            case W32.VK_DOWN:
                aEd.TryNext(AppC.CC_NEXT);
                break;

            case W32.VK_ENTER:
                if (aEd.TryNext(AppC.CC_NEXTOVER) == AppC.RC_CANCELB)
                {
                    EndEditAvt(true);
                }
                break;

            case W32.VK_ESC:
                EndEditAvt(false);
                break;

            case W32.VK_LEFT:
            case W32.VK_RIGHT:
                if (cbReg.Focused)
                {
                    bool b = (e.KeyValue == W32.VK_RIGHT);
                    cbReg.SelectedIndex = WhatNextMode(ref b, 2);
                }
                break;

            case W32.VK_TAB:
                if (e.Shift == true)
                {
                    aEd.TryNext(AppC.CC_PREV);
                }
                else
                {
                    aEd.TryNext(AppC.CC_NEXT);
                }
                break;

            default:
                ret = false;
                break;
            }

            e.Handled = ret;
            bSkipKey  = ret;
        }