private void btnViewResult_Click(object sender, EventArgs e) { MdiChildren.ForEach((a) => { a.Close(); }); ViewResult addResult = new ViewResult(UserId) { MdiParent = this, }; addResult.Show(); if (ActiveMdiChild != null) { ActiveMdiChild.WindowState = FormWindowState.Maximized; } }
private void ShowDashboard() { MdiChildren.ForEach((a) => { a.Close(); }); Dashboard dashboard = new Dashboard(UserId) { MdiParent = this }; dashboard.Show(); if (ActiveMdiChild != null) { ActiveMdiChild.WindowState = FormWindowState.Maximized; } }