Example #1
0
        public override void Select()
        {
            ARun    recentARun = ProjectInfo.CurrentARun;
            RunWord recentWord = ProjectInfo.CurrentRunWord;

            ProjectInfo.CurrentRunWord = this;
            UpdateBackground();

            if (recentARun != null && recentARun.IsImage && recentARun != ProjectInfo.CurrentARun)
            {
                recentARun.UpdateBackground();
            }

            if (recentWord == null)
            {
                return;
            }
            recentWord.UpdateBackground();

            if (ProjectInfo.CurrentState == State.Play && !recentWord.IsSentenceSelected)
            {
                foreach (RunWord prev in recentWord.PreviousWordsInSentence)
                {
                    prev.UpdateBackground();
                }
            }
            Word.Content.Changed = true;
        }
Example #2
0
 public override ARun LogicalNext()
 {
     if (IsSelected)
     {
         ARun next = ProjectInfo.CurrentRunWord.LogicalNext();
         if (next != null)
         {
             return(next);
         }
     }
     if (NextParagraph != null)
     {
         return(NextParagraph.Inlines.FirstInline as ARun);
     }
     return(null);
 }
Example #3
0
 public override ARun LogicalPrevious()
 {
     if (IsSelected)
     {
         ARun prev = ProjectInfo.CurrentRunWord.LogicalPrevious();
         if (prev != null)
         {
             return(prev);
         }
     }
     if (PreviousParagraph != null)
     {
         return(PreviousParagraph.Inlines.LastInline as ARun);
     }
     return(null);
 }