Пример #1
0
        /// <summary>
        /// 重构虚拟键盘
        /// </summary>
        /// <returns></returns>
        private Keyboard CreateNumericKeyboard()
        {
            Keyboard keyboard = new Keyboard();

            LinearKeyboardLayout kl = new LinearKeyboardLayout();

            kl.AddKey("7");
            kl.AddKey("8");
            kl.AddKey("9");
            kl.AddKey("退格", "{BACKSPACE}");
            kl.AddLine();

            kl.AddKey("4");
            kl.AddKey("5");
            kl.AddKey("6");
            //   kl.AddKey("-", "{SUBTRACT}");
            kl.AddKey("-", "{Subtract}", height: 32);
            kl.AddLine();

            kl.AddKey("1");
            kl.AddKey("2");
            kl.AddKey("3");

            kl.AddLine();

            kl.AddKey("0", width: 21);
            kl.AddKey(".");

            keyboard.Layouts.Add(kl);
            return(keyboard);
        }
        private Keyboard CreateNumericKeyboard()
        {
            Keyboard keyboard = new Keyboard();

            LinearKeyboardLayout NumPadLayout = new LinearKeyboardLayout();

            NumPadLayout.AddKey("1");
            NumPadLayout.AddKey("2");
            NumPadLayout.AddKey("3");
            NumPadLayout.AddLine();

            NumPadLayout.AddKey("4");
            NumPadLayout.AddKey("5");
            NumPadLayout.AddKey("6");
            NumPadLayout.AddLine();

            NumPadLayout.AddKey("7");
            NumPadLayout.AddKey("8");
            NumPadLayout.AddKey("9");
            NumPadLayout.AddLine();

            NumPadLayout.AddKey("0");
            NumPadLayout.AddKey("CLR", "{BACKSPACE}", width: 21);

            keyboard.Layouts.Add(NumPadLayout);

            return keyboard;
        }
Пример #3
0
        public static Keyboard CreateNumericKeyboard()
        {
            Keyboard keyboard = new Keyboard();

            LinearKeyboardLayout keyboardlayout = new LinearKeyboardLayout();

            keyboardlayout.AddKey("7");
            keyboardlayout.AddKey("8");
            keyboardlayout.AddKey("9");
            keyboardlayout.AddLine();

            keyboardlayout.AddKey("4");
            keyboardlayout.AddKey("5");
            keyboardlayout.AddKey("6");
            keyboardlayout.AddLine();

            keyboardlayout.AddKey("1");
            keyboardlayout.AddKey("2");
            keyboardlayout.AddKey("3");
            keyboardlayout.AddLine();

            keyboardlayout.AddKey("0");
            keyboardlayout.AddKey("←退格", "{BACKSPACE}", width: 21);

            keyboard.Layouts.Add(keyboardlayout);

            return(keyboard);
        }
Пример #4
0
        private Keyboard CreateNumericKeyboard()
        {
            Keyboard keyboard = new Keyboard();

            LinearKeyboardLayout keyboardlayout = new LinearKeyboardLayout();

            keyboardlayout.AddKey("7");
            keyboardlayout.AddKey("8");
            keyboardlayout.AddKey("9");
            keyboardlayout.AddLine();

            keyboardlayout.AddKey("4");
            keyboardlayout.AddKey("5");
            keyboardlayout.AddKey("6");
            keyboardlayout.AddLine();

            keyboardlayout.AddKey("1");
            keyboardlayout.AddKey("2");
            keyboardlayout.AddKey("3");
            keyboardlayout.AddLine();

            keyboardlayout.AddKey("0");
            keyboardlayout.AddKey("退格", "{BACKSPACE}");
            keyboardlayout.AddKey("清除", "^{a}{BACKSPACE}");

            keyboard.Layouts.Add(keyboardlayout);

            return(keyboard);
        }
Пример #5
0
        public static Keyboard CreateNormalKeyboard()
        {
            Keyboard keyboard = new Keyboard();

            LinearKeyboardLayout keyboardlayout = new LinearKeyboardLayout();

            keyboardlayout.AddKey("1");
            keyboardlayout.AddKey("2");
            keyboardlayout.AddKey("3");
            keyboardlayout.AddKey("4");
            keyboardlayout.AddKey("5");
            keyboardlayout.AddKey("6");
            keyboardlayout.AddKey("7");
            keyboardlayout.AddKey("8");
            keyboardlayout.AddKey("9");
            keyboardlayout.AddKey("0");
            keyboardlayout.AddLine();

            keyboardlayout.AddKey("q");
            keyboardlayout.AddKey("w");
            keyboardlayout.AddKey("e");
            keyboardlayout.AddKey("r");
            keyboardlayout.AddKey("t");
            keyboardlayout.AddKey("y");
            keyboardlayout.AddKey("u");
            keyboardlayout.AddKey("i");
            keyboardlayout.AddKey("o");
            keyboardlayout.AddKey("p");
            keyboardlayout.AddLine();

            keyboardlayout.AddKey("a");
            keyboardlayout.AddKey("s");
            keyboardlayout.AddKey("d");
            keyboardlayout.AddKey("f");
            keyboardlayout.AddKey("g");
            keyboardlayout.AddKey("h");
            keyboardlayout.AddKey("j");
            keyboardlayout.AddKey("k");
            keyboardlayout.AddKey("l");
            keyboardlayout.AddLine();

            keyboardlayout.AddKey("z");
            keyboardlayout.AddKey("x");
            keyboardlayout.AddKey("c");
            keyboardlayout.AddKey("v");
            keyboardlayout.AddKey("b");
            keyboardlayout.AddKey("n");
            keyboardlayout.AddKey("m");
            keyboardlayout.AddKey("←退格", "{BACKSPACE}", width: 32);

            keyboard.Layouts.Add(keyboardlayout);

            return(keyboard);
        }
Пример #6
0
        private Keyboard CreateNumericKeyboard()
        {
            Keyboard keyboard = new Keyboard();

            LinearKeyboardLayout klNumLockOn = new LinearKeyboardLayout();

            klNumLockOn.AddKey("NumLock", info: null, style: KeyStyle.Pressed, layout: 1);
            klNumLockOn.AddKey("/", "{DIVIDE}");
            klNumLockOn.AddKey("*", "{MULTIPLY}");
            klNumLockOn.AddKey("-", "{SUBTRACT}");
            klNumLockOn.AddLine();

            klNumLockOn.AddKey("7");
            klNumLockOn.AddKey("8");
            klNumLockOn.AddKey("9");
            klNumLockOn.AddKey("+", "{ADD}", height: 21);
            klNumLockOn.AddLine();

            klNumLockOn.AddKey("4");
            klNumLockOn.AddKey("5");
            klNumLockOn.AddKey("6");
            klNumLockOn.AddLine();

            klNumLockOn.AddKey("1");
            klNumLockOn.AddKey("2");
            klNumLockOn.AddKey("3");
            klNumLockOn.AddKey("Enter", "{ENTER}", height: 21);
            klNumLockOn.AddLine();

            klNumLockOn.AddKey("0", width: 21);
            klNumLockOn.AddKey(".");


            LinearKeyboardLayout klNumLockOff = new LinearKeyboardLayout();

            klNumLockOff.AddKey("NumLock", style: KeyStyle.Normal, layout: 0);
            klNumLockOff.AddKey("/", "{DIVIDE}");
            klNumLockOff.AddKey("*", "{MULTIPLY}");
            klNumLockOff.AddKey("-", "{SUBTRACT}");
            klNumLockOff.AddLine();

            klNumLockOff.AddKey("Home", "{HOME}");
            klNumLockOff.AddKey("Up", "{UP}");
            klNumLockOff.AddKey("PgUp", "{PGUP}");
            klNumLockOff.AddKey("+", "{ADD}", height: 21);
            klNumLockOff.AddLine();

            klNumLockOff.AddKey("Left", "{LEFT}");
            klNumLockOff.AddKey("");
            klNumLockOff.AddKey("Right", "{RIGHT}");
            klNumLockOff.AddLine();

            klNumLockOff.AddKey("End", "{END}");
            klNumLockOff.AddKey("Down", "{DOWN}");
            klNumLockOff.AddKey("PgDn", "{PGDN}");
            klNumLockOff.AddKey("Enter", "{ENTER}", height: 21);
            klNumLockOff.AddLine();

            klNumLockOff.AddKey("Ins", "{INSERT}", width: 21);
            klNumLockOff.AddKey(".");


            keyboard.Layouts.Add(klNumLockOn);
            keyboard.Layouts.Add(klNumLockOff);

            return(keyboard);
        }
        private Keyboard CreateNumericKeyboard()
        {
            Keyboard keyboard = new Keyboard();

            LinearKeyboardLayout CapsOff = new LinearKeyboardLayout();

            CapsOff.AddKey("TAB", "{TAB}", width: 18);
            CapsOff.AddKey("q");
            CapsOff.AddKey("w");
            CapsOff.AddKey("e");
            CapsOff.AddKey("r");
            CapsOff.AddKey("t");
            CapsOff.AddKey("y");
            CapsOff.AddKey("u");
            CapsOff.AddKey("i");
            CapsOff.AddKey("o");
            CapsOff.AddKey("p");
            CapsOff.AddKey("<", "{BACKSPACE}", width: 19);
            CapsOff.AddSpace(3);
            CapsOff.AddKey("3");
            CapsOff.AddKey("2");
            CapsOff.AddKey("1");
            CapsOff.AddLine();

            CapsOff.AddKey("CAPS", "", width: 24, style: KeyStyle.Normal, layout: 1);
            CapsOff.AddKey("a");
            CapsOff.AddKey("s");
            CapsOff.AddKey("d");
            CapsOff.AddKey("f");
            CapsOff.AddKey("g");
            CapsOff.AddKey("h");
            CapsOff.AddKey("j");
            CapsOff.AddKey("k");
            CapsOff.AddKey("l");
            CapsOff.AddKey("CAPS", "", width: 24, style: KeyStyle.Normal, layout: 1);
            CapsOff.AddSpace(3);
            CapsOff.AddKey("4");
            CapsOff.AddKey("5");
            CapsOff.AddKey("6");
            CapsOff.AddLine();

            CapsOff.AddKey("Shift", "", width: 35, style: KeyStyle.Normal, layout: 2);
            CapsOff.AddKey("z");
            CapsOff.AddKey("x");
            CapsOff.AddKey("c");
            CapsOff.AddKey("v");
            CapsOff.AddKey("b");
            CapsOff.AddKey("n");
            CapsOff.AddKey("m");
            CapsOff.AddKey("Shift", "", width: 35, style: KeyStyle.Normal, layout: 2);
            CapsOff.AddSpace(3);
            CapsOff.AddKey("7");
            CapsOff.AddKey("8");
            CapsOff.AddKey("9");
            CapsOff.AddLine();

            CapsOff.AddSpace(14);
            CapsOff.AddKey(".");
            CapsOff.AddKey("_");
            CapsOff.AddKey("SPACE", " ", width: 76);
            CapsOff.AddKey("-");
            CapsOff.AddKey("@");
            CapsOff.AddSpace(7);
            CapsOff.AddSpace(21);
            CapsOff.AddKey("0");

            LinearKeyboardLayout CapsOn = new LinearKeyboardLayout();

            CapsOn.AddKey("TAB", "{TAB}", width: 18);
            CapsOn.AddKey("Q");
            CapsOn.AddKey("W");
            CapsOn.AddKey("E");
            CapsOn.AddKey("R");
            CapsOn.AddKey("T");
            CapsOn.AddKey("Y");
            CapsOn.AddKey("U");
            CapsOn.AddKey("I");
            CapsOn.AddKey("O");
            CapsOn.AddKey("P");
            CapsOn.AddKey("<", "{BACKSPACE}", width: 19);
            CapsOn.AddSpace(3);
            CapsOn.AddKey("3");
            CapsOn.AddKey("2");
            CapsOn.AddKey("1");
            CapsOn.AddLine();

            CapsOn.AddKey("CAPS", "", width: 24, style: KeyStyle.Pressed, layout: 0);
            CapsOn.AddKey("A");
            CapsOn.AddKey("S");
            CapsOn.AddKey("D");
            CapsOn.AddKey("F");
            CapsOn.AddKey("G");
            CapsOn.AddKey("H");
            CapsOn.AddKey("I");
            CapsOn.AddKey("J");
            CapsOn.AddKey("K");
            CapsOn.AddKey("CAPS", "", width: 24, style: KeyStyle.Pressed, layout: 0);
            CapsOn.AddSpace(3);
            CapsOn.AddKey("4");
            CapsOn.AddKey("5");
            CapsOn.AddKey("6");
            CapsOn.AddLine();

            CapsOn.AddKey("Shift", "", width: 35, style: KeyStyle.Normal, layout: 2);
            CapsOn.AddKey("Z");
            CapsOn.AddKey("X");
            CapsOn.AddKey("C");
            CapsOn.AddKey("V");
            CapsOn.AddKey("B");
            CapsOn.AddKey("N");
            CapsOn.AddKey("M");
            CapsOn.AddKey("Shift", "", width: 35, style: KeyStyle.Normal, layout: 2);
            CapsOn.AddSpace(3);
            CapsOn.AddKey("7");
            CapsOn.AddKey("8");
            CapsOn.AddKey("9");
            CapsOn.AddLine();

            CapsOn.AddSpace(14);
            CapsOn.AddKey(".");
            CapsOn.AddKey("_");
            CapsOn.AddKey("SPACE", " ", width: 76);
            CapsOn.AddKey("-");
            CapsOn.AddKey("@");
            CapsOn.AddSpace(7);
            CapsOn.AddSpace(21);
            CapsOn.AddKey("0");

            LinearKeyboardLayout ShiftOn = new LinearKeyboardLayout();

            ShiftOn.AddKey("TAB", "{TAB}", width: 18, style: KeyStyle.Normal, layout: 0);
            ShiftOn.AddKey("Q", style: KeyStyle.Normal, layout: 0);
            ShiftOn.AddKey("W", style: KeyStyle.Normal, layout: 0);
            ShiftOn.AddKey("E", style: KeyStyle.Normal, layout: 0);
            ShiftOn.AddKey("R", style: KeyStyle.Normal, layout: 0);
            ShiftOn.AddKey("T", style: KeyStyle.Normal, layout: 0);
            ShiftOn.AddKey("Y", style: KeyStyle.Normal, layout: 0);
            ShiftOn.AddKey("U", style: KeyStyle.Normal, layout: 0);
            ShiftOn.AddKey("I", style: KeyStyle.Normal, layout: 0);
            ShiftOn.AddKey("O", style: KeyStyle.Normal, layout: 0);
            ShiftOn.AddKey("P", style: KeyStyle.Normal, layout: 0);
            ShiftOn.AddKey("<", "{BACKSPACE}", width: 19, style: KeyStyle.Normal, layout: 0);
            ShiftOn.AddSpace(3);
            ShiftOn.AddKey("3", style: KeyStyle.Normal, layout: 0);
            ShiftOn.AddKey("2", style: KeyStyle.Normal, layout: 0);
            ShiftOn.AddKey("1", style: KeyStyle.Normal, layout: 0);
            ShiftOn.AddLine();

            ShiftOn.AddKey("CAPS", "", width: 24, style: KeyStyle.Normal, layout: 0);
            ShiftOn.AddKey("A", style: KeyStyle.Normal, layout: 0);
            ShiftOn.AddKey("S", style: KeyStyle.Normal, layout: 0);
            ShiftOn.AddKey("D", style: KeyStyle.Normal, layout: 0);
            ShiftOn.AddKey("F", style: KeyStyle.Normal, layout: 0);
            ShiftOn.AddKey("G", style: KeyStyle.Normal, layout: 0);
            ShiftOn.AddKey("H", style: KeyStyle.Normal, layout: 0);
            ShiftOn.AddKey("I", style: KeyStyle.Normal, layout: 0);
            ShiftOn.AddKey("J", style: KeyStyle.Normal, layout: 0);
            ShiftOn.AddKey("K", style: KeyStyle.Normal, layout: 0);
            ShiftOn.AddKey("CAPS", "", width: 24, style: KeyStyle.Normal, layout: 0);
            ShiftOn.AddSpace(3);
            ShiftOn.AddKey("4", style: KeyStyle.Normal, layout: 0);
            ShiftOn.AddKey("5", style: KeyStyle.Normal, layout: 0);
            ShiftOn.AddKey("6", style: KeyStyle.Normal, layout: 0);
            ShiftOn.AddLine();

            ShiftOn.AddKey("Shift", "", width: 35, style: KeyStyle.Pressed, layout: 0);
            ShiftOn.AddKey("Z", style: KeyStyle.Normal, layout: 0);
            ShiftOn.AddKey("X", style: KeyStyle.Normal, layout: 0);
            ShiftOn.AddKey("C", style: KeyStyle.Normal, layout: 0);
            ShiftOn.AddKey("V", style: KeyStyle.Normal, layout: 0);
            ShiftOn.AddKey("B", style: KeyStyle.Normal, layout: 0);
            ShiftOn.AddKey("N", style: KeyStyle.Normal, layout: 0);
            ShiftOn.AddKey("M", style: KeyStyle.Normal, layout: 0);
            ShiftOn.AddKey("Shift", "", width: 35, style: KeyStyle.Pressed, layout: 0);
            ShiftOn.AddSpace(3);
            ShiftOn.AddKey("7", style: KeyStyle.Normal, layout: 0);
            ShiftOn.AddKey("8", style: KeyStyle.Normal, layout: 0);
            ShiftOn.AddKey("9", style: KeyStyle.Normal, layout: 0);
            ShiftOn.AddLine();

            ShiftOn.AddSpace(14);
            ShiftOn.AddKey(".", style: KeyStyle.Normal, layout: 0);
            ShiftOn.AddKey("_", style: KeyStyle.Normal, layout: 0);
            ShiftOn.AddKey("SPACE", " ", width: 76, style: KeyStyle.Normal, layout: 0);
            ShiftOn.AddKey("-", style: KeyStyle.Normal, layout: 0);
            ShiftOn.AddKey("@", style: KeyStyle.Normal, layout: 0);
            ShiftOn.AddSpace(7);
            ShiftOn.AddSpace(21);
            ShiftOn.AddKey("0", style: KeyStyle.Normal, layout: 0);

            keyboard.Layouts.Add(CapsOff);
            keyboard.Layouts.Add(CapsOn);
            keyboard.Layouts.Add(ShiftOn);

            return keyboard;
        }