private DocumentForm NewDocument() { DocumentForm doc = new DocumentForm(); doc.Text = string.Format(CultureInfo.CurrentCulture, "{0}{1}", newDocumentName, ++newDocumentCount); doc.Show(dockPanel); Core_StateChanged(Core, null); return doc; }
private DocumentForm OpenFile(string filePath) { DocumentForm doc = new DocumentForm(); doc.LoadFile(filePath); doc.Show(dockPanel); Core_StateChanged(Core, null); return doc; }
private void dockPanel_ActiveContentChanged(object sender, EventArgs e) { Text = "MAIDE"; DocumentForm doc = dockPanel.ActiveContent as DocumentForm; if (doc != null) ActiveDocument = doc; else if (ActiveDocument != null && !ActiveDocument.Created) ActiveDocument = null; if (ActiveDocument != null) Text += " - " + ActiveDocument.Text; Core_StateChanged(Core, null); }