예제 #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
파일: 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 = "김상록";
                    }
                }
            }
        }
예제 #3
0
파일: Class1.cs 프로젝트: nolru7/gdgd
        public void btn(BtnBean bb)
        {
            Button btn = new Button();

            btn.DialogResult = DialogResult.OK;
            btn.Name         = bb.Name;
            btn.Text         = bb.Txt;
            btn.Size         = new Size(bb.SizeX, bb.SizeY);
            btn.Location     = new Point(bb.PX, bb.PY);
            btn.Cursor       = Cursors.Hand;
            btn.Click       += bb.eh;
            form.Controls.Add(btn);
        }