public void ShowEffectDoc(XmlNode effectNode, string projectLocation) { string effectPath = effectNode.InnerText; if (!File.Exists(effectPath) && File.Exists(projectLocation + @"\" + effectPath)) { effectPath = projectLocation + @"\" + effectPath; } string fileName = Path.GetFileName(effectPath); DocumentView content = FindDocument(effectPath) as DocumentView; if (content != null) { this.dockPanelEdit.ActiveDocumentPane.ActiveContent = content; } else { DocumentView docView = new DocumentView(); docView.TabText = fileName; docView.ToolTipText = effectPath; docView.Tag = effectNode; docView.Show(this.dockPanelEdit); } }
private DocumentView CreateNewDocument(string text) { DocumentView dummyDoc = new DocumentView(); dummyDoc.Text = text; return(dummyDoc); }
public EditorView() { InitializeComponent(); panelTop.BackColor = dockPanelEdit.Theme.Skin.ColorPalette.MainWindowActive.Background; panelBottom.BackColor = dockPanelEdit.Theme.Skin.ColorPalette.MainWindowActive.Background; DocumentView doc1 = CreateNewDocument("Document1"); DocumentView doc2 = CreateNewDocument("Document2"); doc1.Show(this.dockPanelEdit, DockState.Document); doc2.Show(doc1.Pane, null); }
public XmlNode GetSelectedDocument() { if (this.dockPanelEdit.ActiveDocumentPane != null) { DocumentView content = this.dockPanelEdit.ActiveDocumentPane.ActiveContent as DocumentView; if (content != null) { content.SaveFile(); return(content.Tag as XmlNode); } } return(null); }
private DocumentView CreateNewDocument() { DocumentView dummyDoc = new DocumentView(); int count = 1; string text = $"Document{count}"; while (FindDocument(text) != null) { count++; text = $"Document{count}"; } dummyDoc.Text = text; return(dummyDoc); }