public EditorContent CurFileEdit(string fname) { EditorContent edit = null; foreach (var editorContent in AllFileEditor) { if (editorContent.FileName.Equals(fname)) { edit = editorContent; break; } } return(edit); }
public LayoutDocument CreateAnDocumentEditor(string text, string fileName, string filePath, out EditorContent editor) { var view = new TextEditorTemplate(); var doc = new LayoutDocument(); doc.Content = view; doc.Title = fileName; Editor.Text = text; editor = null; if (!AllFileEditor.Exists(p => p.FileName == fileName)) { editor = new EditorContent(fileName, filePath, Editor); AllFileEditor.Add(editor); } return(doc); }