/// <summary> /// /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void mTile_Database_Click(object sender, EventArgs e) { Form_Main.Instance.MetroLink.Visible = true; if (!Form_Main.Instance.MetroPanel.Controls.ContainsKey("ucDatabase")) { ucDatabase uc = new ucDatabase(); uc.Dock = DockStyle.Fill; Form_Main.Instance.MetroPanel.Controls.Add(uc); } Form_Main.Instance.MetroPanel.Controls["ucDatabase"].BringToFront(); }
/// <summary> /// /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void ucDashboard_Load(object sender, EventArgs e) { ucDatabase ucDatabase = new ucDatabase(); ucDatabase.Dock = DockStyle.Fill; Form_Main.Instance.MetroPanel.Controls.Add(ucDatabase); ucOverview ucOverview = new ucOverview(); ucOverview.Dock = DockStyle.Fill; Form_Main.Instance.MetroPanel.Controls.Add(ucOverview); ucSearch ucSearch = new ucSearch(); ucOverview.Dock = DockStyle.Fill; Form_Main.Instance.MetroPanel.Controls.Add(ucSearch); ///this user Control has to be the last because of user settings. ucSetting ucSetting = new ucSetting(); ucSetting.Dock = DockStyle.Fill; Form_Main.Instance.MetroPanel.Controls.Add(ucSetting); }