private void ReadDocumentFile(BasicScintillaControl sci, FileInfo fileInfo) { if (fileInfo != null) { var src = App.GetService <IOutputInputService>().ReadFileAsString(fileInfo); sci.SetText(src); sci.ClearDirtyFlag(); sci.EmptyUndoBuffer(); } else { sci.Text = String.Empty; } }
void ITextEditor.SetContent(Document doc, string text) { if (doc == App.Document()) { sci.SetText(text); } else { using (var sciTemp = new BasicScintillaControl()) { sciTemp.AttachDocument(((TextDocument)doc).GetSciDocument()); sciTemp.SetText(text); } } }