void sclView_FormClosed(object sender, FormClosedEventArgs e) { SCLView sclView = (sender as SCLView); sclView.FormClosed -= new FormClosedEventHandler(sclView_FormClosed); sclView.StopServers(); documentViews.Remove(sclView); }
public void AddSCLView(string filename) { foreach (DockContent dc in documentViews) { if (dc is SCLView) { if ((dc as SCLView).Filename == filename) { dc.Show(); return; } } } DockContent sclView = new SCLView(filename); sclView.FormClosed += new FormClosedEventHandler(sclView_FormClosed); documentViews.Add(sclView); sclView.Show(dockPanel); }