示例#1
0
        private void Form1_Load(object sender, EventArgs e)
        {
            arr        = new ArrayList();
            Text       = "DISCORD";
            ClientSize = new Size(200, 489);
            Class1 c1 = new Class1(this);

            BackColor = Color.DimGray;
            Controls.Add(Ls());
            Controls.Add(lb());
            Controls.Add(pn());

            arr.Add(new BtnBean2(this, "button1", "뉴스", 100, 30, 100, 0));
            arr.Add(new BtnBean2(this, "button1", "라이브러리", 100, 30, 100, 40));
            arr.Add(new BtnBean2(this, "button1", "스토어", 100, 30, 100, 80));
            arr.Add(new BtnBean2(this, "button1", "검색", 50, 30, 5, 420));
            arr.Add(new BtnBean(this, "button2", "+", 50, 50, 5, 50, btn_click3));

            for (int i = 0; i < arr.Count; i++)
            {
                if (typeof(BtnBean) == arr[i].GetType())
                {
                    BtnBean bt2 = (BtnBean)arr[i];
                    c1.btn((BtnBean)arr[i]);
                }

                else if (typeof(BtnBean2) == arr[i].GetType())
                {
                    c1.btn((BtnBean2)arr[i]);
                }
            }
        }
示例#2
0
        private void Form8_Load(object sender, EventArgs e)
        {
            this.ShowIcon    = false;
            this.Text        = "";
            this.MaximizeBox = false;
            this.MinimizeBox = false;
            this.ForeColor   = Color.Red;
            this.Font        = new Font(this.Font, FontStyle.Bold);

            this.IsMdiContainer = true;
            this.Size           = new Size(1000, 800);

            // 영역 설정
            panel          = new Panel();
            panel.Width    = 900;
            panel.Location = new Point(100, 0);
            panel.Dock     = DockStyle.Right;
            Controls.Add(panel);

            Class1 c1 = new Class1();

            c1.btn(new btnobject(this, "btn1", "Black", 83, 50, 0, 0, btn_Click));
            c1.btn(new btnobject(this, "btn2", "Red", 83, 50, 0, 60, btn_Click));
            c1.btn(new btnobject(this, "btn3", "Blue", 83, 50, 0, 120, btn_Click));
        }
示例#3
0
文件: Form3.cs 项目: nolru7/gdgd
        private void func()
        {
            arr  = new ArrayList();
            Text = "DISCORD";
            Class1 c1 = new Class1(this);

            BackColor = Color.DimGray;
            Controls.Add(btn_mic());
            Controls.Add(btn_head());
            Controls.Add(btn_setting());
            arr.Add(new BtnBean2(this, "button3", "전송", 40, 22, 210, 420));


            for (int i = 0; i < arr.Count; i++)
            {
                if (typeof(BtnBean) == arr[i].GetType())
                {
                    BtnBean bt2 = (BtnBean)arr[i];
                    c1.btn((BtnBean)arr[i]);
                }
                else if (typeof(BtnBean2) == arr[i].GetType())
                {
                    c1.btn((BtnBean2)arr[i]);
                }
                //  else if(typeof(LbBean)==arr[i].GetType())
                // {
                //     c1.lb((LbBean)arr[i]);
                // }
                // else if (typeof(PnBean) == arr[i].GetType())
                // {
                //     c1.pn((PnBean)arr[i]);
                //  }
            }
            //Controls.Add(panel_view());

            Controls.Add(list_view());
            Controls.Add(userlist_status());
            Controls.Add(chatbox_create());

            for (int j = 0; j < 10; j++)
            {
                for (int i = 0; i < 5; i++)
                {
                    Controls.Add(user_item(i, j));
                    if (i == 0 && j == 2)
                    {
                        btn.Text = "홍마태";
                    }
                    else if (i == 0 && j == 1)
                    {
                        btn.Text = "이석훈";
                    }
                    else if (i == 0 && j == 0)
                    {
                        btn.Text = "김상록";
                    }
                }
            }
        }
示例#4
0
        private void Form4_Load(object sender, EventArgs e)
        {
            ClientSize = new Size(350, 200);
            BackColor  = Color.DimGray;
            Class1 c1 = new Class1(this);

            c1.btn(new BtnBean(this, "NOR", "normal", 150, 100, 20, 50, click_event));
            c1.btn(new BtnBean(this, "RAID", "mmorpg", 150, 100, 190, 50, click_event));
            Controls.Add(tb());
            Controls.Add(lb());
        }
示例#5
0
        private void Form4_Load(object sender, EventArgs args)
        {
            //Button btn = c1.btn();
            //Controls.Add(btn);

            //Class1 c1 = new Class1(this);
            //c1.btn();

            Class1 c1 = new Class1();
            //c1.btn(this, "btn_1", "버튼1", 100, 50, 30, 30);
            //c1.btn(this, "btn_1", "버튼1", 100, 50, 30, (30 + 30 + 50));
            ArrayList arr = new ArrayList();

            arr.Add(new btnobject(this, "btn_1", "버튼1", 100, 50, 30, 30, btn1_Click));
            arr.Add(new btnobject(this, "btn_1", "버튼1", 100, 50, 30, (30 + 30 + 50), btn2_Click));
            arr.Add(new lbobject(this, "lb", "라벨1", 100, 50, (30 + 30 + 100), 30));

            for (int i = 0; i < arr.Count; i++)
            {
                //제어문 사용하여 type비교
                if (typeof(btnobject) == arr[i].GetType())  //arr[i] 객체가 btn의 객체이면 (type을 비교)
                {
                    c1.btn((btnobject)arr[i]);
                }
                else if (typeof(lbobject) == arr[i].GetType()) //arr[i] 객체가 lb (type 비교)
                {
                    c1.lb((lbobject)arr[i]);
                }
            }
        }
示例#6
0
        private void Form5_Load(object o, EventArgs args)
        {
            IsMdiContainer = true;
            Size           = new Size(1000, 800);

            panel           = new Panel();
            panel.Location  = new Point(0, 80);
            panel.Size      = new Size(1000, 400);
            panel.BackColor = Color.Aqua;

            Class1 c1 = new Class1();

            c1.btn(new btnobject(this, "btn", "버튼1", 100, 50, 30, 30, btn_Click));
        }