/// <summary> /// Executes a command. /// </summary> /// <param name="commandId">Command Id.</param> /// <returns>Execution status.</returns> public override bool Execute(int commandId) { switch (commandId) { case CommandIDs.BOOKMARK_SET_1: case CommandIDs.BOOKMARK_SET_2: case CommandIDs.BOOKMARK_SET_3: case CommandIDs.BOOKMARK_SET_4: case CommandIDs.BOOKMARK_SET_5: case CommandIDs.BOOKMARK_SET_6: case CommandIDs.BOOKMARK_SET_7: case CommandIDs.BOOKMARK_SET_8: case CommandIDs.BOOKMARK_SET_9: case CommandIDs.BOOKMARK_SET_0: var number = commandId - CommandIDs.BOOKMARK_SET_1 + 1; return(_bookmarksService.SetBookmark(number)); case CommandIDs.BOOKMARK_GET_1: case CommandIDs.BOOKMARK_GET_2: case CommandIDs.BOOKMARK_GET_3: case CommandIDs.BOOKMARK_GET_4: case CommandIDs.BOOKMARK_GET_5: case CommandIDs.BOOKMARK_GET_6: case CommandIDs.BOOKMARK_GET_7: case CommandIDs.BOOKMARK_GET_8: case CommandIDs.BOOKMARK_GET_9: case CommandIDs.BOOKMARK_GET_0: number = commandId - CommandIDs.BOOKMARK_GET_1 + 1; return(_bookmarksService.GoToBookmark(number)); case CommandIDs.BOOKMARK_SET_GLB_1: case CommandIDs.BOOKMARK_SET_GLB_2: case CommandIDs.BOOKMARK_SET_GLB_3: case CommandIDs.BOOKMARK_SET_GLB_4: case CommandIDs.BOOKMARK_SET_GLB_5: case CommandIDs.BOOKMARK_SET_GLB_6: case CommandIDs.BOOKMARK_SET_GLB_7: case CommandIDs.BOOKMARK_SET_GLB_8: case CommandIDs.BOOKMARK_SET_GLB_9: case CommandIDs.BOOKMARK_SET_GLB_0: number = commandId - CommandIDs.BOOKMARK_SET_GLB_1 + 1; return(_bookmarksService.SetGlobalBookmark(number)); case CommandIDs.BOOKMARK_GET_GLB_1: case CommandIDs.BOOKMARK_GET_GLB_2: case CommandIDs.BOOKMARK_GET_GLB_3: case CommandIDs.BOOKMARK_GET_GLB_4: case CommandIDs.BOOKMARK_GET_GLB_5: case CommandIDs.BOOKMARK_GET_GLB_6: case CommandIDs.BOOKMARK_GET_GLB_7: case CommandIDs.BOOKMARK_GET_GLB_8: case CommandIDs.BOOKMARK_GET_GLB_9: case CommandIDs.BOOKMARK_GET_GLB_0: number = commandId - CommandIDs.BOOKMARK_GET_GLB_1 + 1; return(_bookmarksService.GoToGlobalBookmark(number)); case CommandIDs.BOOKMARK_CLEAR_F: return(_bookmarksService.ClearFileBookmarks()); case CommandIDs.BOOKMARK_CLEAR_S: return(_bookmarksService.ClearAllBookmarks()); default: return(false); } }