private void ActCompileExecute(object sender, EventArgs e) { IDockContent content = dockPanel1.ActiveDocument; DocumentPanel doc = (DocumentPanel)content; Compiler.Compile(new [] { doc.FileName }); }
private void OpenDocument(string fileName) { IDockContent opened = FindDocument(fileName); if (opened != null) { opened.DockHandler.Show(); Logger.InfoFormat(CultureInfo.InvariantCulture, "The document: {0} has already opened!", fileName); return; } DocumentPanel doc = new DocumentPanel(fileName); doc.Show(DockPanel, DockState.Document); }