private static AEditor.Command KeyCodeToEditorCommand(Keys ch) { AEditor.Command command = AEditor.Command.cNone; switch (ch) { case Keys.Back: command = AEditor.Command.cBS; break; case Keys.Delete: case Keys.Escape: command = AEditor.Command.CE; break; } return(command); }
private static AEditor.Command CharToEditorCommand(char ch) { AEditor.Command command = AEditor.Command.cNone; switch (ch) { case '0': command = AEditor.Command.cZero; break; case '1': command = AEditor.Command.cOne; break; case '2': command = AEditor.Command.cTwo; break; case '3': command = AEditor.Command.cThree; break; case '4': command = AEditor.Command.cFour; break; case '5': command = AEditor.Command.cFive; break; case '6': command = AEditor.Command.cSix; break; case '7': command = AEditor.Command.cSeven; break; case '8': command = AEditor.Command.cEight; break; case '9': command = AEditor.Command.cNine; break; case 'A': command = AEditor.Command.cA; break; case 'B': command = AEditor.Command.cB; break; case 'C': command = AEditor.Command.cC; break; case 'D': command = AEditor.Command.cD; break; case 'E': command = AEditor.Command.cE; break; case 'F': command = AEditor.Command.cF; break; case '.': command = AEditor.Command.cSeparator; break; case '-': command = AEditor.Command.cSign; break; } return(command); }