LayoutFarm.Text.InternalTextLayerController.AddTextRunsToCurrentLine C# (CSharp) Méthode

AddTextRunsToCurrentLine() public méthode

public AddTextRunsToCurrentLine ( IEnumerable textRuns ) : void
textRuns IEnumerable
Résultat void
        public void AddTextRunsToCurrentLine(IEnumerable<EditableRun> textRuns)
        {
            RemoveSelectedText();
            int startLineNum = textLineWriter.LineNumber;
            int startCharIndex = textLineWriter.CharIndex;
            bool isRecordingHx = EnableUndoHistoryRecording;
            EnableUndoHistoryRecording = false;
            foreach (EditableRun t in textRuns)
            {
                if (t.IsLineBreak)
                {
                    textLineWriter.SplitToNewLine();
                    CurrentLineNumber++;
                }
                else
                {
                    textLineWriter.AddTextSpan(t);
                }
            }
            EnableUndoHistoryRecording = isRecordingHx;
            commandHistory.AddDocAction(
                new DocActionInsertRuns(textRuns, startLineNum, startCharIndex,
                    textLineWriter.LineNumber, textLineWriter.CharIndex));
            updateJustCurrentLine = false;
            TextEditRenderBox.NotifyTextContentSizeChanged(visualTextSurface);
        }
        public void AddTextRunToCurrentLine(EditableRun t)

Usage Example

 public override void InvokeRedo(InternalTextLayerController textdom)
 {
     textdom.CurrentLineNumber = startLineNumber;
     textdom.CharIndex         = startCharIndex;
     if (singleInsertTextRun != null)
     {
         textdom.AddTextRunToCurrentLine(singleInsertTextRun);
     }
     else
     {
         textdom.AddTextRunsToCurrentLine(insertingTextRuns);
     }
 }
All Usage Examples Of LayoutFarm.Text.InternalTextLayerController::AddTextRunsToCurrentLine