private void Form_Load(object sender, EventArgs e) { //생성자로 생성 db = new MSsql(); comm = new Commons(); this.IsMdiContainer = true; this.Size = new Size(1000, 800); this.FormBorderStyle = FormBorderStyle.FixedSingle; this.MaximizeBox = false; this.MinimizeBox = false; this.Text = "회원정보"; Hashtable hashtable = new Hashtable(); hashtable.Add("size", new Size(1000, 100)); hashtable.Add("point", new Point(0, 0)); hashtable.Add("color", Color.Silver); hashtable.Add("name", "head"); Panel panel1 = comm.getPanel(hashtable); Controls.Add(panel1); hashtable = new Hashtable(); hashtable.Add("size", new Size(1000, 700)); hashtable.Add("point", new Point(0, 100)); hashtable.Add("color", Color.Yellow); hashtable.Add("name", "contents"); Panel panel2 = comm.getPanel(hashtable); Controls.Add(panel2); hashtable = new Hashtable(); hashtable.Add("size", new Size(200, 90)); hashtable.Add("point", new Point(100, 0)); hashtable.Add("color", Color.Gainsboro); hashtable.Add("name", "button1"); hashtable.Add("text", "사용자form"); hashtable.Add("click", (EventHandler)Btn_Click); Button button1 = comm.getButton(hashtable); panel1.Controls.Add(button1); hashtable = new Hashtable(); hashtable.Add("size", new Size(200, 90)); hashtable.Add("point", new Point(300, 0)); hashtable.Add("color", Color.Gainsboro); hashtable.Add("name", "button2"); hashtable.Add("text", "ruelform "); hashtable.Add("click", (EventHandler)Btn1_Click); Button button2 = comm.getButton(hashtable); panel1.Controls.Add(button2); hashtable = new Hashtable(); hashtable.Add("size", new Size(200, 90)); hashtable.Add("point", new Point(500, 0)); hashtable.Add("color", Color.Gainsboro); hashtable.Add("name", "button3"); hashtable.Add("text", "Mapping "); hashtable.Add("click", (EventHandler)Btn3_Click); Button button3 = comm.getButton(hashtable); panel1.Controls.Add(button3); hashtable = new Hashtable(); hashtable.Add("size", new Size(200, 90)); hashtable.Add("point", new Point(500, 0)); hashtable.Add("color", Color.Gainsboro); hashtable.Add("name", "button3"); hashtable.Add("text", "Mapping "); hashtable.Add("click", (EventHandler)Btn3_Click); Button button4 = comm.getButton(hashtable); panel2.Controls.Add(button4); //버튼 이벤트 활성화 //uf.Show(); //패널에다가 넣기 위해 Name이 필요 /* * foreach (Control ctr in Controls) * { * if(ctr.Name == "contents") * { * ctr.Controls.Add(uf); * uf.Show(); * } * } */ }