Exemple #1
0
        private void getView()
        {
            hashtable = new Hashtable();
            hashtable.Add("type", "");
            hashtable.Add("size", new Size(1000, 100));
            hashtable.Add("point", new Point(0, 0));
            hashtable.Add("color", Color.Silver);
            hashtable.Add("name", "head");
            head = comm.getPanel(hashtable, parentForm);

            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");
            contents = comm.getPanel(hashtable, parentForm);

            hashtable = new Hashtable();
            hashtable.Add("size", new Size(200, 80));
            hashtable.Add("point", new Point(100, 10));
            hashtable.Add("color", Color.White);
            hashtable.Add("name", "btn1");
            hashtable.Add("text", "Member");
            hashtable.Add("click", (EventHandler)btn1_click);
            btn1 = comm.getButton(hashtable, head);

            hashtable = new Hashtable();
            hashtable.Add("size", new Size(200, 80));
            hashtable.Add("point", new Point(400, 10));
            hashtable.Add("color", Color.White);
            hashtable.Add("name", "btn2");
            hashtable.Add("text", "Rule");
            hashtable.Add("click", (EventHandler)btn2_click);
            btn2 = comm.getButton(hashtable, head);

            hashtable = new Hashtable();
            hashtable.Add("size", new Size(200, 80));
            hashtable.Add("point", new Point(700, 10));
            hashtable.Add("color", Color.White);
            hashtable.Add("name", "btn3");
            hashtable.Add("text", "Mapping");
            hashtable.Add("click", (EventHandler)btn3_click);
            btn3 = comm.getButton(hashtable, head);
        }
Exemple #2
0
        private void getView()
        {
            hashtable = new Hashtable();
            hashtable.Add("size", new Size(500, 45));
            hashtable.Add("point", new Point(0, 0));
            hashtable.Add("color", Color.Red);
            hashtable.Add("name", "member");
            member = comm.getPanel(hashtable, parentForm);

            hashtable = new Hashtable();
            hashtable.Add("size", new Size(500, 45));
            hashtable.Add("point", new Point(500, 0));
            hashtable.Add("color", Color.Yellow);
            hashtable.Add("name", "rule");
            rule = comm.getPanel(hashtable, parentForm);

            hashtable = new Hashtable();
            hashtable.Add("size", new Size(1000, 655));
            hashtable.Add("point", new Point(0, 45));
            hashtable.Add("color", Color.White);
            hashtable.Add("name", "mapping");
            mapping = comm.getPanel(hashtable, parentForm);

            hashtable = new Hashtable();
            hashtable.Add("size", new Size(500, 20));
            hashtable.Add("point", new Point(0, 5));
            hashtable.Add("color", Color.Red);
            hashtable.Add("name", "label1");
            hashtable.Add("text", "Member");
            label1 = comm.getLabel(hashtable, member);

            hashtable = new Hashtable();
            hashtable.Add("size", new Size(400, 20));
            hashtable.Add("point", new Point(0, 5));
            hashtable.Add("color", Color.Yellow);
            hashtable.Add("name", "label2");
            hashtable.Add("text", "Rule");
            label2 = comm.getLabel(hashtable, rule);

            hashtable = new Hashtable();
            hashtable.Add("width", 500);
            hashtable.Add("point", new Point(0, 25));
            hashtable.Add("color", Color.White);
            hashtable.Add("name", "comboBox1");
            hashtable.Add("click", (EventHandler)Member_click);
            comboBox1 = comm.getComboBox(hashtable, member);

            hashtable = new Hashtable();
            hashtable.Add("width", 485);
            hashtable.Add("point", new Point(0, 25));
            hashtable.Add("color", Color.White);
            hashtable.Add("name", "comboBox2");
            hashtable.Add("click", (EventHandler)Rule_click);
            comboBox2 = comm.getComboBox(hashtable, rule);

            hashtable = new Hashtable();
            hashtable.Add("color", Color.White);
            hashtable.Add("name", "listView");
            //hashtable.Add("click", (MouseEventHandler)listView_click);
            listView = comm.getListView(hashtable, mapping);

            hashtable = new Hashtable();
            hashtable.Add("size", new Size(50, 20));
            hashtable.Add("point", new Point(400, 5));
            hashtable.Add("color", Color.Yellow);
            hashtable.Add("name", "추가");
            hashtable.Add("text", "추가");
            hashtable.Add("click", (EventHandler)Btn1_Click);
            btn1 = comm.getButton(hashtable, rule);

            GetSelect();
        }
Exemple #3
0
        private void getView()
        {
            /*
             * string sql = "select * from ViewControl;";
             * MySqlDataReader sdr = db.Reader(sql);
             *
             * string[] arr = new string[sdr.FieldCount];
             * while (sdr.Read())
             * {
             *  string svName = sdr["svName"].ToString();
             *  int RGB = Convert.ToInt32(sdr["color"]);
             *  int btnevent = Convert.ToInt32(sdr["event"]);
             *
             *  for (int i = 0; i < sdr.FieldCount; i++)
             *  {
             *      arr[i] = sdr.GetValue(i).ToString();
             *      //MessageBox.Show(arr[i].ToString());
             *  }
             * }
             */
            hashtable = new Hashtable();
            hashtable.Add("type", "");
            hashtable.Add("size", new Size(1000, 500));
            hashtable.Add("point", new Point(0, 0));
            hashtable.Add("color", Color.White);
            hashtable.Add("name", "head");
            head = comm.getPanel(hashtable, parentForm);

            hashtable = new Hashtable();
            hashtable.Add("size", new Size(1000, 200));
            hashtable.Add("point", new Point(0, 500));
            hashtable.Add("color", Color.Yellow);
            hashtable.Add("name", "contents");
            contents = comm.getPanel(hashtable, parentForm);

            hashtable = new Hashtable();
            hashtable.Add("width", 45);
            hashtable.Add("point", new Point(0, 0));
            hashtable.Add("color", Color.Silver);
            hashtable.Add("name", "textBox1");
            hashtable.Add("enabled", false);
            textBox1 = comm.getTextBox(hashtable, contents);

            hashtable = new Hashtable();
            hashtable.Add("width", 100);
            hashtable.Add("point", new Point(45, 0));
            hashtable.Add("color", Color.White);
            hashtable.Add("name", "textBox2");
            hashtable.Add("enabled", true);
            textBox2 = comm.getTextBox(hashtable, contents);

            hashtable = new Hashtable();
            hashtable.Add("width", 100);
            hashtable.Add("point", new Point(145, 0));
            hashtable.Add("color", Color.White);
            hashtable.Add("name", "textBox3");
            hashtable.Add("enabled", true);
            textBox3 = comm.getTextBox(hashtable, contents);

            hashtable = new Hashtable();
            hashtable.Add("width", 100);
            hashtable.Add("point", new Point(245, 0));
            hashtable.Add("color", Color.White);
            hashtable.Add("name", "textBox4");
            hashtable.Add("enabled", true);
            textBox4 = comm.getTextBox(hashtable, contents);

            hashtable = new Hashtable();
            hashtable.Add("width", 50);
            hashtable.Add("point", new Point(345, 0));
            hashtable.Add("color", Color.Silver);
            hashtable.Add("name", "textBox5");
            hashtable.Add("enabled", false);
            textBox5 = comm.getTextBox(hashtable, contents);

            hashtable = new Hashtable();
            hashtable.Add("width", 300);
            hashtable.Add("point", new Point(395, 0));
            hashtable.Add("color", Color.Silver);
            hashtable.Add("name", "textBox6");
            hashtable.Add("enabled", false);
            textBox6 = comm.getTextBox(hashtable, contents);

            hashtable = new Hashtable();
            hashtable.Add("width", 300);
            hashtable.Add("point", new Point(695, 0));
            hashtable.Add("color", Color.Silver);
            hashtable.Add("name", "textBox7");
            hashtable.Add("enabled", false);
            textBox7 = comm.getTextBox(hashtable, contents);

            hashtable = new Hashtable();
            hashtable.Add("size", new Size(100, 80));
            hashtable.Add("point", new Point(100, 50));
            hashtable.Add("color", Color.White);
            hashtable.Add("name", "btn1");
            hashtable.Add("text", "저장");
            hashtable.Add("click", (EventHandler)btn_click);
            btn1 = comm.getButton(hashtable, contents);

            hashtable = new Hashtable();
            hashtable.Add("size", new Size(100, 80));
            hashtable.Add("point", new Point(300, 50));
            hashtable.Add("color", Color.White);
            hashtable.Add("name", "btn2");
            hashtable.Add("text", "수정");
            hashtable.Add("click", (EventHandler)btn_click);
            btn2 = comm.getButton(hashtable, contents);

            hashtable = new Hashtable();
            hashtable.Add("size", new Size(100, 80));
            hashtable.Add("point", new Point(600, 50));
            hashtable.Add("color", Color.White);
            hashtable.Add("name", "btn3");
            hashtable.Add("text", "삭제");
            hashtable.Add("click", (EventHandler)btn_click);
            btn3 = comm.getButton(hashtable, contents);

            hashtable = new Hashtable();
            hashtable.Add("size", new Size(100, 80));
            hashtable.Add("point", new Point(800, 50));
            hashtable.Add("color", Color.White);
            hashtable.Add("name", "btn4");
            hashtable.Add("text", "초기화");
            hashtable.Add("click", (EventHandler)btn_click);
            btn4 = comm.getButton(hashtable, contents);

            hashtable = new Hashtable();
            hashtable.Add("color", Color.White);
            hashtable.Add("name", "listView");
            hashtable.Add("click", (MouseEventHandler)listView_click);
            listView = comm.getListView(hashtable, head);

            SelectData();
        }
Exemple #4
0
        private void getView()
        {
            string          sql = "select * from ViewControl where vNo = 1;";
            MySqlDataReader sdr = db.Reader(sql);

            //MessageBox.Show("테스트 : " + sdr.ToString());
            while (sdr.Read())
            {
                Color        color;
                EventHandler eventhandler;

                //MessageBox.Show(" 패널 정보 : " + sdr["vcType"].ToString());

                // color
                if (Convert.ToInt32(sdr["color"]) == 0)
                {
                    color = Color.Silver;
                    //MessageBox.Show("Color.Silver");
                }
                else if (Convert.ToInt32(sdr["color"]) == 1)
                {
                    color = Color.Yellow;
                    //MessageBox.Show("Color.Yellow");
                }
                else if (Convert.ToInt32(sdr["color"]) == 2)
                {
                    color = Color.White;
                    //MessageBox.Show("Color.White");
                }
                else
                {
                    color = Color.Silver;
                }

                // event
                if (sdr["event"].ToString() == "0")
                {
                    eventhandler = (EventHandler)btn1_click;
                }
                else if (sdr["event"].ToString() == "1")
                {
                    eventhandler = (EventHandler)btn2_click;
                }
                else if (sdr["event"].ToString() == "2")
                {
                    eventhandler = (EventHandler)btn3_click;
                }
                else
                {
                    eventhandler = null;
                }

                //MessageBox.Show("type : " + sdr["vcType"] + ", sdr[vcName] : " + sdr["vcName"] + ", sdr[vcText] : " + sdr["vcText"] + ", sdr[sizeX] : " + sdr["sizeX"] + ", sdr[sizeY] : " + sdr["sizeY"] + ", sdr[pointX] : " + sdr["pointX"] + ", sdr[pointY] : " + sdr["pointY"] + ", sdr[color] : " + sdr["color"] + ", sdr[event] : " + sdr ["event"]);

                Hashtable ht = new Hashtable();
                ht.Add("type", sdr["vcType"]);
                ht.Add("name", sdr["vcName"]);
                ht.Add("text", sdr["vcText"]);
                ht.Add("sX", sdr["sizeX"]);
                ht.Add("sY", sdr["sizeY"]);
                ht.Add("pX", sdr["pointX"]);
                ht.Add("pY", sdr["pointY"]);
                ht.Add("color", color);
                ht.Add("event", eventhandler);

                if (sdr["vcType"].ToString() == "panel")
                {
                    comm.getPanel(ht, parentForm);
                    //MessageBox.Show(" 패널 정보 : " + sdr["vcType"].ToString() );
                }
                else if (sdr["vcType"].ToString() == "button")
                {
                    //head_panel.Controls.Add(comm.getButton(ht, parentForm));
                    //MessageBox.Show(" 버튼 정보 : " + sdr["vcType"].ToString());
                }
            }
            db.ReaderClose(sdr);

            //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");
            //head = comm.getPanel(hashtable, parentForm);

            //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");
            //contents = comm.getPanel(hashtable, parentForm);

            //hashtable = new Hashtable();
            //hashtable.Add("size", new Size(200, 80));
            //hashtable.Add("point", new Point(100, 10));
            //hashtable.Add("color", Color.White);
            //hashtable.Add("name", "btn1");
            //hashtable.Add("text", "Member");
            //hashtable.Add("click", (EventHandler)btn1_click);
            //btn1 = comm.getButton(hashtable, head);

            //hashtable = new Hashtable();
            //hashtable.Add("size", new Size(200, 80));
            //hashtable.Add("point", new Point(400, 10));
            //hashtable.Add("color", Color.White);
            //hashtable.Add("name", "btn2");
            //hashtable.Add("text", "Rule");
            //hashtable.Add("click", (EventHandler)btn2_click);
            //btn2 = comm.getButton(hashtable, head);

            //hashtable = new Hashtable();
            //hashtable.Add("size", new Size(200, 80));
            //hashtable.Add("point", new Point(700, 10));
            //hashtable.Add("color", Color.White);
            //hashtable.Add("name", "btn3");
            //hashtable.Add("text", "Mapping");
            //hashtable.Add("click", (EventHandler)btn3_click);
            //btn3 = comm.getButton(hashtable, head);
        }
Exemple #5
0
        private void getView()
        {
            hashtable = new Hashtable();
            hashtable.Add("type", "");
            hashtable.Add("size", new Size(1000, 500));
            hashtable.Add("point", new Point(0, 0));
            hashtable.Add("color", Color.White);
            hashtable.Add("name", "head");
            head = comm.getPanel(hashtable, parentForm);

            hashtable = new Hashtable();
            hashtable.Add("size", new Size(1000, 200));
            hashtable.Add("point", new Point(0, 500));
            hashtable.Add("color", Color.Yellow);
            hashtable.Add("name", "contents");
            contents = comm.getPanel(hashtable, parentForm);

            hashtable = new Hashtable();
            hashtable.Add("width", 45);
            hashtable.Add("point", new Point(0, 0));
            hashtable.Add("color", Color.Silver);
            hashtable.Add("name", "textBox1");
            hashtable.Add("enabled", false);
            textBox1 = comm.getTextBox(hashtable, contents);

            hashtable = new Hashtable();
            hashtable.Add("width", 100);
            hashtable.Add("point", new Point(45, 0));
            hashtable.Add("color", Color.White);
            hashtable.Add("name", "textBox2");
            hashtable.Add("enabled", true);
            textBox2 = comm.getTextBox(hashtable, contents);

            hashtable = new Hashtable();
            hashtable.Add("width", 200);
            hashtable.Add("point", new Point(145, 0));
            hashtable.Add("color", Color.White);
            hashtable.Add("name", "textBox3");
            hashtable.Add("enabled", true);
            textBox3 = comm.getTextBox(hashtable, contents);

            hashtable = new Hashtable();
            hashtable.Add("width", 50);
            hashtable.Add("point", new Point(345, 0));
            hashtable.Add("color", Color.Silver);
            hashtable.Add("name", "textBox4");
            hashtable.Add("enabled", false);
            textBox4 = comm.getTextBox(hashtable, contents);

            hashtable = new Hashtable();
            hashtable.Add("width", 300);
            hashtable.Add("point", new Point(395, 0));
            hashtable.Add("color", Color.Silver);
            hashtable.Add("name", "textBox5");
            hashtable.Add("enabled", false);
            textBox5 = comm.getTextBox(hashtable, contents);

            hashtable = new Hashtable();
            hashtable.Add("width", 300);
            hashtable.Add("point", new Point(695, 0));
            hashtable.Add("color", Color.Silver);
            hashtable.Add("name", "textBox6");
            hashtable.Add("enabled", false);
            textBox6 = comm.getTextBox(hashtable, contents);

            hashtable = new Hashtable();
            hashtable.Add("size", new Size(100, 80));
            hashtable.Add("point", new Point(100, 50));
            hashtable.Add("color", Color.White);
            hashtable.Add("name", "btn1");
            hashtable.Add("text", "저장");
            hashtable.Add("click", (EventHandler)btn_click);
            btn1 = comm.getButton(hashtable, contents);

            hashtable = new Hashtable();
            hashtable.Add("size", new Size(100, 80));
            hashtable.Add("point", new Point(300, 50));
            hashtable.Add("color", Color.White);
            hashtable.Add("name", "btn2");
            hashtable.Add("text", "수정");
            hashtable.Add("click", (EventHandler)btn_click);
            btn2 = comm.getButton(hashtable, contents);

            hashtable = new Hashtable();
            hashtable.Add("size", new Size(100, 80));
            hashtable.Add("point", new Point(600, 50));
            hashtable.Add("color", Color.White);
            hashtable.Add("name", "btn3");
            hashtable.Add("text", "삭제");
            hashtable.Add("click", (EventHandler)btn_click);
            btn3 = comm.getButton(hashtable, contents);

            hashtable = new Hashtable();
            hashtable.Add("size", new Size(100, 80));
            hashtable.Add("point", new Point(800, 50));
            hashtable.Add("color", Color.White);
            hashtable.Add("name", "btn4");
            hashtable.Add("text", "초기화");
            hashtable.Add("click", (EventHandler)btn_click);
            btn4 = comm.getButton(hashtable, contents);

            hashtable = new Hashtable();
            hashtable.Add("color", Color.White);
            hashtable.Add("name", "listView");
            hashtable.Add("click", (MouseEventHandler)listView_click);
            listView = comm.getListView(hashtable, head);

            SelectData();
        }
Exemple #6
0
        private void getView()
        {
            hashtable = new Hashtable();
            hashtable.Add("type", "");
            hashtable.Add("size", new Size(500, 45));
            hashtable.Add("point", new Point(0, 0));
            hashtable.Add("color", Color.Red);
            hashtable.Add("name", "member");
            member = comm.getPanel(hashtable, parentForm);

            hashtable = new Hashtable();
            hashtable.Add("size", new Size(500, 45));
            hashtable.Add("point", new Point(500, 0));
            hashtable.Add("color", Color.Yellow);
            hashtable.Add("name", "rule");
            rule = comm.getPanel(hashtable, parentForm);

            hashtable = new Hashtable();
            hashtable.Add("size", new Size(1000, 655));
            hashtable.Add("point", new Point(0, 45));
            hashtable.Add("color", Color.Blue);
            hashtable.Add("name", "mapping");
            mapping = comm.getPanel(hashtable, parentForm);

            hashtable = new Hashtable();
            hashtable.Add("size", new Size(500, 20));
            hashtable.Add("point", new Point(0, 5));
            hashtable.Add("color", Color.Red);
            hashtable.Add("name", "label1");
            hashtable.Add("text", "Member");
            label1 = comm.getLabel(hashtable, member);

            hashtable = new Hashtable();
            hashtable.Add("size", new Size(500, 20));
            hashtable.Add("point", new Point(0, 5));
            hashtable.Add("color", Color.Yellow);
            hashtable.Add("name", "label2");
            hashtable.Add("text", "Rule");
            label2 = comm.getLabel(hashtable, rule);

            hashtable = new Hashtable();
            hashtable.Add("width", 500);
            hashtable.Add("point", new Point(0, 25));
            hashtable.Add("color", Color.White);
            hashtable.Add("name", "comboBox1");
            hashtable.Add("click", (EventHandler)Member_click);
            comboBox1 = comm.getComboBox(hashtable, member);

            hashtable = new Hashtable();
            hashtable.Add("width", 485);
            hashtable.Add("point", new Point(0, 25));
            hashtable.Add("color", Color.White);
            hashtable.Add("name", "comboBox2");
            hashtable.Add("click", (EventHandler)Rule_click);
            comboBox2 = comm.getComboBox(hashtable, rule);

            hashtable = new Hashtable();
            hashtable.Add("size", new Size(1000, 555));
            hashtable.Add("point", new Point(0, 0));
            hashtable.Add("color", Color.Red);
            hashtable.Add("name", "list");
            list = comm.getPanel(hashtable, mapping);

            hashtable = new Hashtable();
            hashtable.Add("color", Color.White);
            hashtable.Add("name", "listView");
            hashtable.Add("click", (MouseEventHandler)listView_click);
            listView = comm.getListView(hashtable, list);

            hashtable = new Hashtable();
            hashtable.Add("size", new Size(1000, 100));
            hashtable.Add("point", new Point(0, 555));
            hashtable.Add("color", Color.Yellow);
            hashtable.Add("name", "controll");
            controll = comm.getPanel(hashtable, mapping);

            hashtable = new Hashtable();
            hashtable.Add("width", 100);
            hashtable.Add("point", new Point(0, 0));
            hashtable.Add("color", Color.Silver);
            hashtable.Add("name", "textBox1");
            hashtable.Add("enabled", false);
            textBox1 = comm.getTextBox(hashtable, controll);

            hashtable = new Hashtable();
            hashtable.Add("width", 100);
            hashtable.Add("point", new Point(100, 0));
            hashtable.Add("color", Color.Silver);
            hashtable.Add("name", "textBox2");
            hashtable.Add("enabled", false);
            textBox2 = comm.getTextBox(hashtable, controll);

            hashtable = new Hashtable();
            hashtable.Add("size", new Size(100, 50));
            hashtable.Add("point", new Point(200, 0));
            hashtable.Add("color", Color.White);
            hashtable.Add("name", "btn1");
            hashtable.Add("text", "추가");
            hashtable.Add("click", (EventHandler)btn1_click);
            btn1 = comm.getButton(hashtable, controll);

            hashtable = new Hashtable();
            hashtable.Add("size", new Size(100, 50));
            hashtable.Add("point", new Point(300, 0));
            hashtable.Add("color", Color.White);
            hashtable.Add("name", "btn2");
            hashtable.Add("text", "삭제");
            hashtable.Add("click", (EventHandler)btn2_click);
            btn2 = comm.getButton(hashtable, controll);

            hashtable = new Hashtable();
            hashtable.Add("size", new Size(100, 50));
            hashtable.Add("point", new Point(400, 0));
            hashtable.Add("color", Color.White);
            hashtable.Add("name", "btn3");
            hashtable.Add("text", "초기화");
            hashtable.Add("click", (EventHandler)btn3_click);
            btn3 = comm.getButton(hashtable, controll);

            GetSelect();
        }
Exemple #7
0
        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();
             *  }
             * }
             */
        }
Exemple #8
0
        private void getView()
        {
            string          sql = "select * from ViewControl where vNo=1;";
            MySqlDataReader sdr = db.Reader(sql);

            while (sdr.Read())
            {
                string[] arr = new string[sdr.FieldCount];
                for (int i = 0; i < sdr.FieldCount; i++)
                {
                    arr[i] = sdr.GetValue(i).ToString();
                }

                hashtable = new Hashtable();
                if (arr[2] == "head")
                {
                    hashtable.Add("size", new Size(Convert.ToInt32(arr[6]), Convert.ToInt32(arr[7])));
                    hashtable.Add("point", new Point(Convert.ToInt32(arr[8]), Convert.ToInt32(arr[9])));
                    hashtable.Add("color", color_set(Convert.ToInt32(arr[10])));
                    hashtable.Add("name", arr[2]);
                    head = comm.getPanel(hashtable, parentForm);
                }

                else if (arr[2] == "contents")
                {
                    hashtable.Add("size", new Size(Convert.ToInt32(arr[6]), Convert.ToInt32(arr[7])));
                    hashtable.Add("point", new Point(Convert.ToInt32(arr[8]), Convert.ToInt32(arr[9])));
                    hashtable.Add("color", color_set(Convert.ToInt32(arr[10])));
                    hashtable.Add("name", arr[2]);
                    contents = comm.getPanel(hashtable, parentForm);
                }

                else if (arr[2] == "btn1")
                {
                    hashtable.Add("size", new Size(Convert.ToInt32(arr[6]), Convert.ToInt32(arr[7])));
                    hashtable.Add("point", new Point(Convert.ToInt32(arr[8]), Convert.ToInt32(arr[9])));
                    hashtable.Add("color", color_set(Convert.ToInt32(arr[10])));
                    hashtable.Add("name", arr[2]);
                    hashtable.Add("text", arr[3]);
                    hashtable.Add("click", click_fc(Convert.ToInt32(arr[10])));
                    btn1 = comm.getButton(hashtable, head);
                }

                else if (arr[2] == "btn2")
                {
                    hashtable.Add("size", new Size(Convert.ToInt32(arr[6]), Convert.ToInt32(arr[7])));
                    hashtable.Add("point", new Point(Convert.ToInt32(arr[8]), Convert.ToInt32(arr[9])));
                    hashtable.Add("color", color_set(Convert.ToInt32(arr[10])));
                    hashtable.Add("name", arr[2]);
                    hashtable.Add("text", arr[3]);
                    hashtable.Add("click", click_fc(Convert.ToInt32(arr[10])));
                    btn2 = comm.getButton(hashtable, head);
                }

                else if (arr[2] == "btn3")
                {
                    hashtable.Add("size", new Size(Convert.ToInt32(arr[6]), Convert.ToInt32(arr[7])));
                    hashtable.Add("point", new Point(Convert.ToInt32(arr[8]), Convert.ToInt32(arr[9])));
                    hashtable.Add("color", color_set(Convert.ToInt32(arr[10])));
                    hashtable.Add("name", arr[2]);
                    hashtable.Add("text", arr[3]);
                    hashtable.Add("click", click_fc(Convert.ToInt32(arr[10])));
                    btn3 = comm.getButton(hashtable, head);
                }
            }
            db.ReaderClose(sdr);
        }
Exemple #9
0
        private void getView()  //화면구성
        {
            string          sql = "select * from ViewControl;";
            MySqlDataReader sdr = db.Reader(sql);

            string[] arr = new string[sdr.FieldCount];
            while (sdr.Read())
            {
                string svName   = sdr["svName"].ToString();
                int    RGB      = Convert.ToInt32(sdr["color"]);
                int    btnevent = Convert.ToInt32(sdr["event"]);

                for (int i = 0; i < sdr.FieldCount; i++)
                {
                    arr[i] = sdr.GetValue(i).ToString();
                    //MessageBox.Show(arr[i].ToString());
                }

                if (svName == "head")
                {
                    hashtable = new Hashtable();
                    hashtable.Add("size", new Size(Convert.ToInt32(sdr["sizeX"]), Convert.ToInt32(sdr["sizeY"])));
                    hashtable.Add("point", new Point(Convert.ToInt32(sdr["pointX"]), Convert.ToInt32(sdr["pointY"])));
                    hashtable.Add("name", sdr["svName"].ToString());
                    hashtable.Add("color", GetColor(RGB));
                    head = comm.getPanel(hashtable, parentForm);
                }

                else if (svName == "contents")
                {
                    hashtable = new Hashtable();
                    hashtable.Add("size", new Size(Convert.ToInt32(sdr["sizeX"]), Convert.ToInt32(sdr["sizeY"])));
                    hashtable.Add("point", new Point(Convert.ToInt32(sdr["pointX"]), Convert.ToInt32(sdr["pointY"])));
                    hashtable.Add("name", sdr["svName"].ToString());
                    hashtable.Add("color", GetColor(RGB));
                    contents = comm.getPanel(hashtable, parentForm);
                }

                if (svName == "btn1")
                {
                    hashtable = new Hashtable();
                    hashtable.Add("size", new Size(Convert.ToInt32(sdr["sizeX"]), Convert.ToInt32(sdr["sizeY"])));
                    hashtable.Add("point", new Point(Convert.ToInt32(sdr["pointX"]), Convert.ToInt32(sdr["pointY"])));
                    hashtable.Add("name", sdr["svName"].ToString());
                    hashtable.Add("text", sdr["svText"].ToString());
                    hashtable.Add("color", GetColor(RGB));
                    hashtable.Add("click", (EventHandler)Eventget(btnevent));
                    btn1 = comm.getButton(hashtable, head);
                }

                if (svName == "btn2")
                {
                    hashtable = new Hashtable();
                    hashtable.Add("size", new Size(Convert.ToInt32(sdr["sizeX"]), Convert.ToInt32(sdr["sizeY"])));
                    hashtable.Add("point", new Point(Convert.ToInt32(sdr["pointX"]), Convert.ToInt32(sdr["pointY"])));
                    hashtable.Add("name", sdr["svName"].ToString());
                    hashtable.Add("text", sdr["svText"].ToString());
                    hashtable.Add("color", GetColor(RGB));
                    hashtable.Add("click", (EventHandler)Eventget(btnevent));
                    btn2 = comm.getButton(hashtable, head);
                }

                if (svName == "btn3")
                {
                    hashtable = new Hashtable();
                    hashtable.Add("size", new Size(Convert.ToInt32(sdr["sizeX"]), Convert.ToInt32(sdr["sizeY"])));
                    hashtable.Add("point", new Point(Convert.ToInt32(sdr["pointX"]), Convert.ToInt32(sdr["pointY"])));
                    hashtable.Add("name", sdr["svName"].ToString());
                    hashtable.Add("text", sdr["svText"].ToString());
                    hashtable.Add("color", GetColor(RGB));
                    hashtable.Add("click", (EventHandler)Eventget(btnevent));

                    btn3 = comm.getButton(hashtable, head);
                }
            }
            db.ReaderClose(sdr);
        }
Exemple #10
0
        private void ViewData()
        {
            string          sql = "select vNo,vcName,vcText,sizeX,sizeY,pointX,pointY,color,EVENT from ViewControl where vNo = 1;";
            MySqlDataReader sdr = db.Reader(sql);

            while (sdr.Read())
            {
                string[] arr = new string[sdr.FieldCount];

                for (int i = 0; i < sdr.FieldCount; i++)
                {
                    arr[i] = sdr.GetValue(i).ToString();
                    if (arr[i] == "head")
                    {
                        hashtable = new Hashtable();
                        hashtable.Add("size", new Size((int)sdr["sizeX"], (int)sdr["sizeY"]));
                        hashtable.Add("point", new Point((int)sdr["pointX"], (int)sdr["pointX"]));
                        hashtable.Add("color", Color.Blue);
                        hashtable.Add("name", sdr["vcName"]);
                        head = comm.getPanel(hashtable, parentForm);
                    }
                    else if (arr[i] == "contents")
                    {
                        hashtable = new Hashtable();
                        hashtable.Add("size", new Size((int)sdr["sizeX"], (int)sdr["sizeY"]));
                        hashtable.Add("point", new Point((int)sdr["pointX"], (int)sdr["pointX"]));
                        hashtable.Add("color", Color.Silver);
                        hashtable.Add("name", sdr["vcName"]);
                        contents = comm.getPanel(hashtable, parentForm);
                    }
                    else if (arr[i] == "btn1")
                    {
                        hashtable = new Hashtable();
                        hashtable.Add("size", new Size((int)sdr["sizeX"], (int)sdr["sizeY"]));
                        hashtable.Add("point", new Point((int)sdr["pointX"], (int)sdr["pointX"]));
                        hashtable.Add("color", Color.Silver);
                        hashtable.Add("name", sdr["vcName"]);
                        hashtable.Add("text", sdr["vcText"]);
                        //hashtable.Add("click", (int)sdr["EVENT"]);
                        btn1 = comm.getButton(hashtable, head);
                    }
                    else if (arr[i] == "btn2")
                    {
                        hashtable = new Hashtable();
                        hashtable.Add("size", new Size((int)sdr["sizeX"], (int)sdr["sizeY"]));
                        hashtable.Add("point", new Point((int)sdr["pointX"], (int)sdr["pointX"]));
                        hashtable.Add("color", Color.Silver);
                        hashtable.Add("name", sdr["vcName"]);
                        hashtable.Add("text", sdr["vcText"]);
                        //hashtable.Add("click", (int)sdr["EVENT"]);
                        btn2 = comm.getButton(hashtable, head);
                    }
                    else if (arr[i] == "btn3")
                    {
                        hashtable = new Hashtable();
                        hashtable.Add("size", new Size((int)sdr["sizeX"], (int)sdr["sizeY"]));
                        hashtable.Add("point", new Point((int)sdr["pointX"], (int)sdr["pointX"]));
                        hashtable.Add("color", Color.Silver);
                        hashtable.Add("name", sdr["vcName"]);
                        hashtable.Add("text", sdr["vcText"]);
                        //hashtable.Add("click", (int)sdr["EVENT"]);
                        btn3 = comm.getButton(hashtable, head);
                    }
                }
            }
            db.ReaderClose(sdr);
        }