private DocumentForm OpenFile(string filePath) { DocumentForm doc = new DocumentForm(); doc.LoadFile(filePath); doc.Show(dockPanel); Core_StateChanged(core, null); return(doc); }