public override void Close() { try { _closing = true; if (_tabItem != null) { _tabItem.Close(); _tabItem = null; } if (_textEditor != null) { _textEditor.Dispose(); _textEditor = null; } } finally { _closing = false; } }
public override IProjectFile Open() { if (_textEditor == null) { _textEditor = new TextEditorContainer(FileSystemPath); if (_tabItem != null) { _tabItem.Close(); } _tabItem = TabStripItemFactory.CreateTabStripItem(_textEditor, this); _tabItem.Closed += TabItemClosed; } return this; }