コード例 #1
0
        /// <summary>
        /// Move to the first bundle
        /// </summary>
        /// <param name="arg"></param>
        /// <returns></returns>
        public bool OnFirstBundle(object arg)
        {
            var navigator = new SegmentServices.StTextAnnotationNavigator(SelectedOccurrence);
            IEnumerable <AnalysisOccurrence> options = navigator.GetWordformOccurrencesBackwardsIncludingStartingOccurrence();

            InterlinDoc.TriggerAnalysisSelected(options.Last(), true, true);
            return(true);
        }
コード例 #2
0
        /// <summary>
        /// Move to the next bundle in the direction indicated by fForward. If fSaveGuess is true, save guesses in the current position,
        /// using Undo  text from the command. If skipFullyAnalyzedWords is true, move to the next item needing analysis, otherwise, the immediate next.
        /// If fMakeDefaultSelection is true, make the default selection within the moved focus box.
        /// </summary>
        public void OnNextBundle(ICommandUndoRedoText undoRedoText, bool fSaveGuess, bool skipFullyAnalyzedWords,
                                 bool fMakeDefaultSelection, bool fForward)
        {
            int currentLineIndex = -1;

            if (InterlinWordControl != null)
            {
                currentLineIndex = InterlinWordControl.GetLineOfCurrentSelection();
            }
            var nextOccurrence = GetNextOccurrenceToAnalyze(fForward, skipFullyAnalyzedWords);

            InterlinDoc.TriggerAnalysisSelected(nextOccurrence, fSaveGuess, fMakeDefaultSelection);
            if (!fMakeDefaultSelection && currentLineIndex >= 0 && InterlinWordControl != null)
            {
                InterlinWordControl.SelectOnOrBeyondLine(currentLineIndex, 1);
            }
        }