예제 #1
0
파일: FrmMain.cs 프로젝트: Xiaoxuemei3/demo
        private void tablePanel1_DragDrop(object sender, DragEventArgs e)
        {
            if (e.Data.GetDataPresent(typeof(TreeNode)))
            {
                TreeNode tn = e.Data.GetData(typeof(TreeNode)) as TreeNode;

                if (tn != null && tn.Tag is TableData)
                {
                    FrmTable frm = new FrmTable(tn.Tag as TableData);
                    frm.MdiParent = this;
                    frm.Location  = tablePanel1.PointToClient(new Point(e.X, e.Y));
                    this.tablePanel1.Controls.Add(frm);
                    frm.Show();
                }
            }
        }
예제 #2
0
파일: FrmMain.cs 프로젝트: kiss96803/demo
        private void tablePanel1_DragDrop(object sender, DragEventArgs e)
        {
            if (e.Data.GetDataPresent(typeof(TreeNode)))
            {
                TreeNode tn = e.Data.GetData(typeof(TreeNode)) as TreeNode;

                if (tn != null && tn.Tag is TableData)
                {
                    FrmTable frm = new FrmTable(tn.Tag as TableData);
                    frm.MdiParent = this;
                    frm.Location = tablePanel1.PointToClient(new Point(e.X, e.Y));
                    this.tablePanel1.Controls.Add(frm);
                    frm.Show();
                }
            }
        }