Beispiel #1
0
        private void MyFc_Load(object sender, EventArgs e)
        {
            myFc = this;

            CentralUserControl centralUserControl = new CentralUserControl();

            centralUserControl.Dock = DockStyle.Fill;
            panelContainer.Controls.Add(centralUserControl);
        }
Beispiel #2
0
        private void Centralbutton_Click(object sender, EventArgs e)
        {
            Sidepanel.Height = Centralbutton.Height;
            Sidepanel.Top    = Centralbutton.Top;

            if (!MyFc.Instance.PanelContainer.Controls.ContainsKey("CentralUserControl"))
            {
                CentralUserControl centralUserControl = new CentralUserControl();
                centralUserControl.Dock = DockStyle.Fill;
                MyFc.Instance.panelContainer.Controls.Add(centralUserControl);
            }
            MyFc.Instance.PanelContainer.Controls["CentralUserControl"].BringToFront();
        }