static IntellisenseKeyboardCommand?TryGetIntellisenseKeyboardCommand(TextEditorIds cmdId)
            {
                switch (cmdId)
                {
                case TextEditorIds.UP:                          return(IntellisenseKeyboardCommand.Up);

                case TextEditorIds.DOWN:                        return(IntellisenseKeyboardCommand.Down);

                case TextEditorIds.PAGEUP:                      return(IntellisenseKeyboardCommand.PageUp);

                case TextEditorIds.PAGEDN:                      return(IntellisenseKeyboardCommand.PageDown);

                case TextEditorIds.BOL:                         return(IntellisenseKeyboardCommand.Home);

                case TextEditorIds.EOL:                         return(IntellisenseKeyboardCommand.End);

                case TextEditorIds.TOPLINE:                     return(IntellisenseKeyboardCommand.TopLine);

                case TextEditorIds.BOTTOMLINE:          return(IntellisenseKeyboardCommand.BottomLine);

                case TextEditorIds.CANCEL:                      return(IntellisenseKeyboardCommand.Escape);

                case TextEditorIds.RETURN:                      return(IntellisenseKeyboardCommand.Enter);

                case TextEditorIds.DECREASEFILTER:      return(IntellisenseKeyboardCommand.DecreaseFilterLevel);

                case TextEditorIds.INCREASEFILTER:      return(IntellisenseKeyboardCommand.IncreaseFilterLevel);

                default: return(null);
                }
            }
			static IntellisenseKeyboardCommand? TryGetIntellisenseKeyboardCommand(TextEditorIds cmdId) {
				switch (cmdId) {
				case TextEditorIds.UP:				return IntellisenseKeyboardCommand.Up;
				case TextEditorIds.DOWN:			return IntellisenseKeyboardCommand.Down;
				case TextEditorIds.PAGEUP:			return IntellisenseKeyboardCommand.PageUp;
				case TextEditorIds.PAGEDN:			return IntellisenseKeyboardCommand.PageDown;
				case TextEditorIds.BOL:				return IntellisenseKeyboardCommand.Home;
				case TextEditorIds.EOL:				return IntellisenseKeyboardCommand.End;
				case TextEditorIds.TOPLINE:			return IntellisenseKeyboardCommand.TopLine;
				case TextEditorIds.BOTTOMLINE:		return IntellisenseKeyboardCommand.BottomLine;
				case TextEditorIds.CANCEL:			return IntellisenseKeyboardCommand.Escape;
				case TextEditorIds.RETURN:			return IntellisenseKeyboardCommand.Enter;
				case TextEditorIds.DECREASEFILTER:	return IntellisenseKeyboardCommand.DecreaseFilterLevel;
				case TextEditorIds.INCREASEFILTER:	return IntellisenseKeyboardCommand.IncreaseFilterLevel;
				default: return null;
				}
			}
Exemplo n.º 3
0
 protected ReplEditorCtxMenuCommandTargetCommand(TextEditorIds cmdId)
     : base(CommandConstants.TextEditorGroup, (int)cmdId)
 {
 }
Exemplo n.º 4
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="commandTarget">Command target</param>
 /// <param name="cmdId">Command ID</param>
 public CommandTargetCommand(ICommandTarget commandTarget, TextEditorIds cmdId)
     : this(commandTarget, CommandConstants.TextEditorGroup, (int)cmdId)
 {
 }
Exemplo n.º 5
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="cmdId">Command id</param>
 protected CommandTargetMenuItemBase(TextEditorIds cmdId)
     : this(CommandConstants.TextEditorGroup, (int)cmdId)
 {
 }
Exemplo n.º 6
0
 /// <summary>
 /// Converts <paramref name="id"/> to a <see cref="CommandInfo"/>
 /// </summary>
 /// <param name="id">ID</param>
 /// <param name="arguments">Arguments or null</param>
 /// <returns></returns>
 public static CommandInfo ToCommandInfo(this TextEditorIds id, object arguments) => new CommandInfo(CommandConstants.TextEditorGroup, (int)id, arguments);
Exemplo n.º 7
0
 /// <summary>
 /// Converts <paramref name="id"/> to a <see cref="CommandInfo"/>
 /// </summary>
 /// <param name="id">ID</param>
 /// <returns></returns>
 public static CommandInfo ToCommandInfo(this TextEditorIds id) => new CommandInfo(CommandConstants.TextEditorGroup, (int)id);
Exemplo n.º 8
0
		/// <summary>
		/// Constructor
		/// </summary>
		/// <param name="commandTarget">Command target</param>
		/// <param name="cmdId">Command ID</param>
		public CommandTargetCommand(ICommandTarget commandTarget, TextEditorIds cmdId)
			: this(commandTarget, CommandConstants.TextEditorGroup, (int)cmdId) {
		}