public void LoadScheme(string schemeName) { frmOverview form = new frmOverview(this); childforms.Add(form); form.MdiParent = this; form.Width = this.Width; form.Height = this.Height; form.LoadScheme(schemeName); form.Show(); }
private void loadRootScheme() { string Caption = currentSchemeCaption; if (!FindAndShow(Caption)) { frmOverview form = new frmOverview(this); childforms.Add(form); form.MdiParent = this; form.Width = this.Width; form.Height = this.Height; if (form.LoadScheme(currentSchemeName)) { form.Show(); } else { childforms.Remove(form); form.Close(); } } else if (currentSchemeName != rootSchemeName) { foreach (Form frm in this.MdiChildren) { if (frm is frmOverview) { frmOverview form = (frmOverview)frm; if (form.LoadScheme(rootSchemeName)) { form.Show(); } else { childforms.Remove(form); form.Close(); } break; } } } }