示例#1
0
 private void Menu_FormClosing(object sender, FormClosingEventArgs e)
 {
     // Close old control with respect
     if (splitContainer1.Panel2.Controls.Count > 0)
     {
         EditTableControl old = (EditTableControl)splitContainer1.Panel2.Controls["EditTableControl"];
         old.EasyClose();
     }
 }
示例#2
0
        private void CloseEdit()
        {
            if (splitContainer1.Panel2.Controls.Count > 0)
            {
                EditTableControl old = (EditTableControl)splitContainer1.Panel2.Controls["EditTableControl"];
                old.EasyClose();
            }

            splitContainer1.Panel2.Controls.Clear();
        }
示例#3
0
        private void treeView1_DoubleClick(object sender, EventArgs e)
        {
            if (treeView1.SelectedNode != null)
            {
                TreeNode node = treeView1.SelectedNode;
                int      id   = Convert.ToInt32(node.Tag);

                UserControl control = new EditTableControl(id);
                control.Dock = DockStyle.Fill;

                // Close old control with respect
                if (splitContainer1.Panel2.Controls.Count > 0)
                {
                    EditTableControl old = (EditTableControl)splitContainer1.Panel2.Controls["EditTableControl"];
                    old.EasyClose();
                }

                splitContainer1.Panel2.Controls.Clear();

                splitContainer1.Panel2.Controls.Add(control);
            }
        }