Пример #1
0
        private void button2_Click(object sender, EventArgs e)
        {
            Label        lbl = (Label)sender;
            participants f   = new participants(lbl.Text);

            Program.panel1.Controls.Clear();
            Program.panel1.Controls.Add(f);
        }
Пример #2
0
        private void treeView1_AfterSelect(object sender, TreeViewEventArgs e)
        {
            UserControl f = new UserControl();

            if (e.Node.Text == "исполнители")
            {
                f = new parts();
                panel1.Controls.Clear();
                panel1.Controls.Add(f);
            }
            if (e.Node.Text == "главная")
            {
                f = new mainCntrl(panel1);
                panel1.Controls.Clear();
                panel1.Controls.Add(f);
            }
            if (e.Node.Text == "площадки")
            {
                f = new plashadka();
                panel1.Controls.Clear();
                panel1.Controls.Add(f);
            }
            if (e.Node.Level == 1 && e.Node.Parent.Text == "мерч")//а че а куда
            {
                f = new merchh(e.Node.Text);
                panel1.Controls.Clear();
                panel1.Controls.Add(f);
            }
            if (e.Node.Level == 1 && e.Node.Parent.Text == "исполнители")
            {
                f = new participants(e.Node.Text);
                panel1.Controls.Clear();
                panel1.Controls.Add(f);
            }
            if (e.Node.Level == 1 && e.Node.Parent.Text == "площадки")
            {
                f = new ploshka(e.Node.Text);
                panel1.Controls.Clear();
                panel1.Controls.Add(f);
            }
        }