public bool FindDocument(string path, out Document document) { document = null; foreach (var doc in documents.Values.Where(doc => doc.Path == path)) { document = doc; return true; } return false; }
public void OnDocumentSelect(Document doc) { }
public void OnImportsSatisfied() { editorWindow.DocumentTab.DocumentSelected += delegate(int id) { Document doc = null; if (documents.TryGetValue(id, out doc)) Current = doc; }; //DocumentSelected += d => editorWindow.DocumentTab.SelectTab(d.Id); }
private void Add(int id, Document document, bool select = true) { documents.Add(id, document); if(select) Current = document; if (DocumentAdded != null) DocumentAdded.Invoke(document); }