private void EditorDocumentClosing(object sender, CancelEventArgs e) { var textEditor = ((LayoutDocument) sender).Content as TextEditorControl; if (textEditor != null) { if (Equals(_lastActiveDocument, textEditor)) { _lastActiveDocument = null; lpOutlineControl.ClearWindow(); parserErrorControl.ClearLogs(); } } }
private void DockManagerActiveContentChanged(object sender, EventArgs e) { var d = dockManager.ActiveContent as TextEditorControl; if (d != null) _lastActiveDocument = d; }