Ejemplo n.º 1
0
        private void USER_LEVEL_UPDATE_FORM_Load(object sender, EventArgs e)
        {
            this.Paint += new PaintEventHandler(this.Form_Paint);

            //FormBorderStyle = FormBorderStyle.None; 폼 상단 표시줄 제거

            ClientSize = new Size(sX, sY);  // 폼 사이즈 지정.

            /// 좌표 체크시 추가 ///
            //Point_Print();

            COMMON_Create_Ctl create_ctl = new COMMON_Create_Ctl();

            // BTNclass bt1 = new BTNclass(this, "버튼Name", "버튼Text", 가로사이즈, 세로사이즈, 가로포인트, 세로포인트, 버튼클릭이벤트);
            BTNclass bt1 = new BTNclass(this, "Home", "button1", 100, 100, 10, 10, btn_Click);
            // LBclass lb1 = new LBclass(this, "라벨Name", "라벨Text", 라벨Font사이즈, 가로사이즈, 세로사이즈, 가로포인트, 세로포인트, 라벨클릭이벤트);
            LBclass lb1 = new LBclass(this, "label1", "label_name~", 24, 100, 100, 10, 10, label_Click);
            // PANELclass pn1 = new PANELclass(this, "패널Name", "패널Text", 가로사이즈, 세로사이즈, 가로포인트, 세로포인트, 패널마우스이동이벤트);
            PANELclass pn1 = new PANELclass(this, "panel1", "panel_txt~", 200, 200, 100, 100);
            // TABCTLclass tabctl = new TABCTLclass(this, "탭컨트롤Name", "탭컨트롤Text", 가로사이즈, 세로사이즈, 가로포인트, 세로포인트, 탭높이, 탭컨트롤마우스이동이벤트);
            TABCTLclass tabctl = new TABCTLclass(this, "tabctl1", "tabctl1~", 450, 160, 7, 313, 30, tabctl_MouseMove);
            // TABPAGEclass tabpg1 = new TABPAGEclass(this, "탭페이지Name", "탭페이지Text", 가로사이즈, 세로사이즈, 가로포인트, 세로포인트, 탭페이지마우스이동이벤트);
            TABPAGEclass tabpg1 = new TABPAGEclass(this, "tabpage1", "tapage1~", 100, 100, 0, 0, tabpage_MouseMove);
            // CHKBOXclass bhkbox1 = new CHKBOXclass(this, "체크박스Name", 체크박스Text", 가로사이즈, 세로사이즈, 가로포인트, 세로포인트, 체크박스클릭이벤트);
            CHKBOXclass chkbox1 = new CHKBOXclass(this, "chkbox1", "chkbox1~", 100, 100, 20, 20, chkbox_Click);
            // LISTVIEWclass listview1 = new LISTVIEWclass(this, "리스트뷰Name", 가로사이즈, 세로사이즈, 가로포인트, 세로포인트, 리스트뷰더블클릭이벤트, 컬럼갯수, "컬럼1번Name", 컬럼1간격, "컬럼2번Name", 컬럼2간격, "컬럼3번Name", 컬럼3간격, ~ 동일방식 10개 컬럼까지 가능);
            LISTVIEWclass listview1 = new LISTVIEWclass(this, "ListView1", 500, 500, 10, 10, listview_mousedoubleclick, listview_mousedoubleclick, 3, "col1", 100, "col2", 100, "col3", 100);
            // COMBOBOXclass combobox1 = new COMBOBOXclass(this, "콤보박스Name", 가로사이즈, 세로사이즈, 가로포인트, 세로포인트, 콤보박스클릭이벤트, 리스트추가갯수, "test1", "test2", "test3", "test4", "test5");
            COMBOBOXclass combobox1 = new COMBOBOXclass(this, "ComboBox1", 100, 100, 721, 12, ComboBox_SelectedIndexChanged, 5, "test1", "test2", "test3", "test4", "test5");



            // 회원등급 수정 고정라벨
            ArrayList arry = new ArrayList();

            arry.Add(new LBclass(this, "회원등급제목", "회원 등급 수정", 17, 200, 30, 30, 30, label_Click));
            arry.Add(new LBclass(this, "회원등급", "회원 등급", 17, 140, 30, 30, 115, label_Click));
            arry.Add(new LBclass(this, "회원ID", "회원 ID", 17, 140, 30, 30, 175, label_Click));
            arry.Add(new LBclass(this, "회원이름", "회원 이름", 17, 140, 30, 30, 235, label_Click));
            arry.Add(new LBclass(this, "회원번호", "회원 번호", 17, 140, 30, 30, 295, label_Click));
            arry.Add(new LBclass(this, "연락처", "연락처", 17, 140, 40, 30, 355, label_Click));
            arry.Add(new LBclass(this, "", ":", 12, 30, 40, 210, 115, label_Click));
            arry.Add(new LBclass(this, "", ":", 12, 30, 40, 210, 175, label_Click));
            arry.Add(new LBclass(this, "", ":", 12, 30, 40, 210, 235, label_Click));
            arry.Add(new LBclass(this, "", ":", 12, 30, 40, 210, 295, label_Click));
            arry.Add(new LBclass(this, "", ":", 12, 30, 40, 210, 355, label_Click));

            for (int i = 0; i < arry.Count; i++)
            {
                Label label = comm.lb((LBclass)arry[i]);

                label.Font = new Font(label.Font.Name, 20, FontStyle.Bold);


                Controls.Add(label);
            }


            MySql     mysql = new MySql();
            ArrayList userinfoSearch_arry = mysql.Select(string.Format("select * from signup where user_number = {0}", user_number));

            foreach (Hashtable ht in userinfoSearch_arry)
            {
                회원등급Temp값 = ht["member_rank"].ToString();
                회원IDTemp값 = ht["id"].ToString();
                회원이름Temp값 = ht["name"].ToString();
                회원번호Temp값 = ht["user_number"].ToString();
                연락처Temp값  = ht["phone_number"].ToString();
            }


            // 회원등급 TextBox 변동값
            ArrayList userinfoArry = new ArrayList();

            userinfoArry.Add(new TXTBOXclass(this, "회원등급값", "회원등급값", 250, 40, 250, 110, txtbox_Click));
            userinfoArry.Add(new TXTBOXclass(this, "회원ID값", "회원ID값", 250, 40, 250, 170, txtbox_Click));
            userinfoArry.Add(new TXTBOXclass(this, "회원이름값", "회원이름값", 250, 40, 250, 230, txtbox_Click));
            userinfoArry.Add(new TXTBOXclass(this, "회원번호값", "회원번호값", 250, 40, 250, 290, txtbox_Click));
            userinfoArry.Add(new TXTBOXclass(this, "연락처값", "연락처값", 250, 40, 250, 350, txtbox_Click));

            for (int i = 0; i < userinfoArry.Count; i++)
            {
                TextBox textBox = comm.txtbox((TXTBOXclass)userinfoArry[i]);
                textBox.ReadOnly = true;
                textBox.Font     = new Font(textBox.Font.Name, 18, FontStyle.Bold);

                if (textBox.Name == "회원등급값")
                {
                    if (회원등급Temp값 == "0")
                    {
                        textBox.Text = "관리자";
                    }
                    else if (회원등급Temp값 == "1")
                    {
                        textBox.Text = "일반회원";
                    }
                    else
                    {
                        textBox.Text = "비회원";
                    }
                }
                else if (textBox.Name == "회원ID값")
                {
                    textBox.Text = 회원IDTemp값;
                }
                else if (textBox.Name == "회원이름값")
                {
                    textBox.Text = 회원이름Temp값;
                }
                else if (textBox.Name == "회원번호값")
                {
                    textBox.Text = 회원번호Temp값;
                }
                else if (textBox.Name == "연락처값")
                {
                    textBox.Text = 연락처Temp값;
                }

                Controls.Add(textBox);
            }


            // 권한 선택 - 라디오 버튼
            ArrayList radio_arry = new ArrayList();

            radio_arry.Add(new RADIOclass(this, "관리자권한", "관리자 권한", 250, 40, 570, 160, radio_btn_Click));
            radio_arry.Add(new RADIOclass(this, "회원권한", "회원 권한", 250, 40, 570, 255, radio_btn_Click));

            for (int i = 0; i < radio_arry.Count; i++)
            {
                RadioButton 권한선택라디오 = comm.radio_btn((RADIOclass)radio_arry[i]);

                권한선택라디오.Font = new Font(권한선택라디오.Font.Name, 20, FontStyle.Bold);
                Controls.Add(권한선택라디오);

                if (권한선택라디오.Name == "관리자권한")
                {
                    관리자라디오버튼 = 권한선택라디오;
                }
                else if (권한선택라디오.Name == "회원권한")
                {
                    회원라디오버튼 = 권한선택라디오;
                }
            }


            // 권한 선택 - 설정 버튼
            ArrayList btn_arry = new ArrayList();

            btn_arry.Add(new BTNclass(this, "설정완료", "설정 완료", 100, 40, 570, 345, btn_Click));
            btn_arry.Add(new BTNclass(this, "취소", "취 소", 100, 40, 680, 345, btn_Click));

            for (int i = 0; i < btn_arry.Count; i++)
            {
                Button 권한설정버튼 = comm.btn((BTNclass)btn_arry[i]);

                권한설정버튼.BackColor = Color.FromArgb(50, 178, 223);
                권한설정버튼.Font      = new Font(권한설정버튼.Font.Name, 12, FontStyle.Bold);
                권한설정버튼.FlatStyle = FlatStyle.Flat;
                권한설정버튼.ForeColor = Color.White;
                권한설정버튼.Region    = Region.FromHrgn(COMMON_Create_Ctl.CreateRoundRectRgn(2, 2, 권한설정버튼.Width, 권한설정버튼.Height, 10, 10));
                Controls.Add(권한설정버튼);
            }
        }
Ejemplo n.º 2
0
        private void Sample_Form2_Load(object sender, EventArgs e)
        {
            //FormBorderStyle = FormBorderStyle.None; 폼 상단 표시줄 제거

            ClientSize = new Size(sX, sY);  // 폼 사이즈 지정.

            /// 좌표 체크시 추가 ///
            Point_Print();

            COMMON_Create_Ctl create_ctl = new COMMON_Create_Ctl();

            // BTNclass bt1 = new BTNclass(this, "버튼Name", "버튼Text", 가로사이즈, 세로사이즈, 가로포인트, 세로포인트, 버튼클릭이벤트);
            BTNclass bt1 = new BTNclass(this, "Home", "button1", 100, 100, 10, 10, btn_Click);
            // LBclass lb1 = new LBclass(this, "라벨Name", "라벨Text", 라벨Font사이즈, 가로사이즈, 세로사이즈, 가로포인트, 세로포인트, 라벨클릭이벤트);
            LBclass lb1 = new LBclass(this, "label1", "label_name~", 24, 100, 100, 10, 10, label_Click);
            // PANELclass pn1 = new PANELclass(this, "패널Name", "패널Text", 가로사이즈, 세로사이즈, 가로포인트, 세로포인트, 패널마우스이동이벤트);
            PANELclass pn1 = new PANELclass(this, "panel1", "panel_txt~", 200, 200, 100, 100, panel_MouseMove);
            // TABCTLclass tabctl = new TABCTLclass(this, "탭컨트롤Name", "탭컨트롤Text", 가로사이즈, 세로사이즈, 가로포인트, 세로포인트, 탭높이, 탭컨트롤마우스이동이벤트);
            TABCTLclass tabctl = new TABCTLclass(this, "tabctl1", "tabctl1~", 450, 160, 7, 313, 30, tabctl_MouseMove);
            // TABPAGEclass tabpg1 = new TABPAGEclass(this, "탭페이지Name", "탭페이지Text", 가로사이즈, 세로사이즈, 가로포인트, 세로포인트, 탭페이지마우스이동이벤트);
            TABPAGEclass tabpg1 = new TABPAGEclass(this, "tabpage1", "tapage1~", 100, 100, 0, 0, tabpage_MouseMove);
            // CHKBOXclass bhkbox1 = new CHKBOXclass(this, "체크박스Name", 체크박스Text", 가로사이즈, 세로사이즈, 가로포인트, 세로포인트, 체크박스클릭이벤트);
            CHKBOXclass chkbox1 = new CHKBOXclass(this, "chkbox1", "chkbox1~", 100, 100, 20, 20, chkbox_Click);
            // LISTVIEWclass listview1 = new LISTVIEWclass(this, "리스트뷰Name", 가로사이즈, 세로사이즈, 가로포인트, 세로포인트, 리스트뷰더블클릭이벤트, 컬럼갯수, "컬럼1번Name", 컬럼1간격, "컬럼2번Name", 컬럼2간격, "컬럼3번Name", 컬럼3간격, ~ 동일방식 10개 컬럼까지 가능);
            LISTVIEWclass listview1 = new LISTVIEWclass(this, "ListView1", 500, 500, 10, 10, listview_mousedoubleclick, listview_mousedoubleclick, 3, "col1", 100, "col2", 100, "col3", 100);
            // COMBOBOXclass combobox1 = new COMBOBOXclass(this, "콤보박스Name", 가로사이즈, 세로사이즈, 가로포인트, 세로포인트, 콤보박스클릭이벤트, 리스트추가갯수, "test1", "test2", "test3", "test4", "test5");
            COMBOBOXclass combobox1 = new COMBOBOXclass(this, "ComboBox1", 100, 100, 721, 12, ComboBox_SelectedIndexChanged, 5, "test1", "test2", "test3", "test4", "test5");


            PICTUREBOXclass picturboxValue = new PICTUREBOXclass(this, "picturebox1", "picturebox_txt1", 150, 160, 20, 20, "default_book_image.png", picturbox_Click);

            책이미지 = comm.load_PictureBox(picturboxValue);
            Controls.Add(책이미지);


            TXTBOXclass textboxValue = new TXTBOXclass(this, "파일이름확인", "이미지를 올려주세요", 150, 40, 20, 180, txtbox_Click);

            텍스트박스          = comm.txtbox(textboxValue);
            텍스트박스.ReadOnly = true;
            Controls.Add(텍스트박스);


            ArrayList btnArray = new ArrayList();

            btnArray.Add(new BTNclass(this, "업로드버튼", "", 30, 30, 173, 173, btn_Click));
            btnArray.Add(new BTNclass(this, "등록버튼", "등록", 60, 25, 243, 176, btn_Click));

            for (int i = 0; i < btnArray.Count; i++)
            {
                Button 버튼 = comm.btn((BTNclass)btnArray[i]);

                if (버튼.Name == "업로드버튼")
                {
                    버튼.Font = new Font("견명조", 13F, FontStyle.Bold, GraphicsUnit.Point, ((byte)(129)));  // FontStyle.Regular
                    Image imageLoad = (Image)Properties.Resources.upload;
                    imageLoad     = comm.ResizeImage(imageLoad, 30, 30);
                    버튼.Image      = imageLoad;
                    버튼.ImageAlign = ContentAlignment.MiddleCenter;
                    버튼.TabStop    = false;
                    //버튼.FlatStyle = FlatStyle.Flat;  // 버튼 평면으로 표시
                    버튼.FlatAppearance.BorderSize = 0;
                }
                else if (버튼.Name == "등록버튼")
                {
                    버튼.Font      = new Font("견명조", 9F, FontStyle.Bold, GraphicsUnit.Point, ((byte)(129))); // FontStyle.Regular
                    버튼.FlatStyle = FlatStyle.Flat;
                    버튼.ForeColor = Color.LawnGreen;
                    버튼.BackColor = Color.ForestGreen;
                }
                Controls.Add(버튼);
            }
        }
Ejemplo n.º 3
0
        private void Form1_Load(object sender, EventArgs e)
        {
            this.FormBorderStyle = FormBorderStyle.FixedSingle;

            //=======================================================================================================
            user1     = new BOOK_INFO_FORM(this);
            login_frm = new LOGIN_FORM(this);
            Login     = new LOGIN_FORM(this);
            Signup    = new SIGNUP_FORM(this);
            //=======================================================================================================

            ClientSize          = new Size(sX, sY); // 폼 사이즈 지정.
            this.IsMdiContainer = true;             // MDI 설정.

            //좌표 체크시 추가
            //Point_Print();

            // 컨트롤 객체생성.
            COMMON_Create_Ctl comm_create_ctl = new COMMON_Create_Ctl();

            // 생성할 패널 정보 객체 생성.
            PANELclass pn1 = new PANELclass(this, "panel1", "panel_main", 1500, 780, 0, 145);

            panel1 = comm_create_ctl.panel(pn1); // ex) 판넬만들기 :  create_ctl.CTL명(CTL값);
            Controls.Add(panel1);                // 원하는 컨트롤에 추가함.

            BTNclass bt1 = new BTNclass(this, "유저1", "도서정보", 285, 145, 0, 0, btn1_Click);
            BTNclass bt2 = new BTNclass(this, "유저2", "대여목록", 285, 145, 285, 0, btn2_Click);
            BTNclass bt3 = new BTNclass(this, "유저3", "나의정보", 285, 145, 570, 0, btn3_Click);
            BTNclass bt4 = new BTNclass(this, "유저4", "위치정보", 285, 145, 855, 0, btn4_Click);

            BTNclass bt6 = new BTNclass(this, "관리2", "회원정보", 285, 145, 285, 0, btn6_Click);
            BTNclass bt7 = new BTNclass(this, "관리3", "도서관리", 285, 145, 570, 0, btn7_Click);
            BTNclass bt8 = new BTNclass(this, "관리4", "연체관리", 285, 145, 855, 0, btn8_Click);

            btn = comm_create_ctl.btn(bt1);
            ButtonConfig(btn, "book_info");
            btn1 = comm_create_ctl.btn(bt2);
            ButtonConfig(btn1, "rental_list");
            btn2 = comm_create_ctl.btn(bt3);
            ButtonConfig(btn2, "my_information");
            btn3 = comm_create_ctl.btn(bt4);
            ButtonConfig(btn3, "book_location");

            btn5 = comm_create_ctl.btn(bt6);
            ButtonConfig(btn5, "user_management");
            btn6 = comm_create_ctl.btn(bt7);
            ButtonConfig(btn6, "book_management");
            btn7 = comm_create_ctl.btn(bt8);
            ButtonConfig(btn7, "overdue_management");


            Controls.Add(btn);

            Controls.Add(btn1);
            Controls.Add(btn2);
            Controls.Add(btn3);


            Controls.Add(btn5);
            Controls.Add(btn6);
            Controls.Add(btn7);

            //MessageBox.Show("login_frm.Member_rank : " + login_frm.Member_rank);

            if (login_frm.Member_rank == 4) // 비회원
            {
                user1.Show();
                btn1.Hide();
                btn2.Hide();
                btn3.Hide();

                btn5.Hide();
                btn6.Hide();
                btn7.Hide();
            }

            //else if (member_rank == 0) //관리자
            //{

            //    btn.Hide();
            //    btn1.Hide();
            //    btn2.Hide();
            //    btn3.Hide();
            //}
            //else if(member_rank == 1) //유저
            //{
            //    user1.Show();
            //    btn4.Hide();
            //    btn5.Hide();
            //    btn6.Hide();
            //    btn7.Hide();
            //}



            //라벨 ==============================================================================================================================================
            ArrayList lbarray = new ArrayList();

            lbarray.Add(new LBclass(this, "Login", "Login   /", 15, 90, 30, 1500 - 190, 10, label_Click));
            lbarray.Add(new LBclass(this, "Signup", "Signup", 15, 90, 30, 1500 - 100, 10, label2_Click));
            lbarray.Add(new LBclass(this, "Logout", "Logout", 15, 90, 30, 1500 - 100, 10, label3_Click));


            for (int i = 0; i < lbarray.Count; i++)
            {
                Label lb = comm_create_ctl.lb((LBclass)lbarray[i]);
                lb.Visible   = true;
                lb.Cursor    = Cursors.Hand;
                lb.Parent    = pictureBox;
                lb.BackColor = Color.FromArgb(201, 253, 223);
                lb.BringToFront();
                lb.ForeColor = Color.FromArgb(39, 174, 97);

                if (lb.Name == "Login")
                {
                    lb.Font = new Font("견명조", 15F, FontStyle.Bold, GraphicsUnit.Point, ((byte)(129)));

                    lb_Login = lb;
                }
                else if (lb.Name == "Signup")
                {
                    lb.Font   = new Font("견명조", 15F, FontStyle.Bold, GraphicsUnit.Point, ((byte)(129)));
                    lb_Signup = lb;
                }
                else if (lb.Name == "Logout")
                {
                    lb.Font   = new Font("견명조", 15F, FontStyle.Bold, GraphicsUnit.Point, ((byte)(129)));
                    lb_Logout = lb;
                }
                Controls.Add(lb);
            }
            lb_Logout.Hide();

            //=====================================================================================================================================================

            Logo_Load();//로고 이미지

            // Set the Parent Form of the Child window.
            //Child1.TopLevel = false;
            //Child1.TopMost = true;
            //Child1.MdiParent = this;
            //Child1.Dock = DockStyle.Fill; //판넬크기에 맞게 사이즈 늘림.
            //panel1.Controls.Add(Child1);

            //Child2.Show();
            //Child1.Show();
            //Child1.Dispose();

            //Set the Parent Form of the Child window.

            user1.TopLevel  = false;
            user1.TopMost   = true;
            user1.MdiParent = this;
            user1.Dock      = DockStyle.Fill; //판넬크기에 맞게 사이즈 늘림.
            panel1.Controls.Add(user1);

            user2.TopLevel  = false;
            user2.TopMost   = true;
            user2.MdiParent = this;
            user2.Dock      = DockStyle.Fill; //판넬크기에 맞게 사이즈 늘림.
            panel1.Controls.Add(user2);

            user3.TopLevel  = false;
            user3.TopMost   = true;
            user3.MdiParent = this;
            user3.Dock      = DockStyle.Fill; //판넬크기에 맞게 사이즈 늘림.
            panel1.Controls.Add(user3);

            user4.TopLevel  = false;
            user4.TopMost   = true;
            user4.MdiParent = this;
            user4.Dock      = DockStyle.Fill; //판넬크기에 맞게 사이즈 늘림.
            panel1.Controls.Add(user4);

            Login.TopLevel  = false;
            Login.TopMost   = true;
            Login.MdiParent = this;
            Login.Dock      = DockStyle.Fill; //판넬크기에 맞게 사이즈 늘림.
            panel1.Controls.Add(Login);

            Signup.TopLevel  = false;
            Signup.TopMost   = true;
            Signup.MdiParent = this;
            Signup.Dock      = DockStyle.Fill; //판넬크기에 맞게 사이즈 늘림.
            panel1.Controls.Add(Signup);


            root2.TopLevel  = false;
            root2.TopMost   = true;
            root2.MdiParent = this;
            root2.Dock      = DockStyle.Fill; //판넬크기에 맞게 사이즈 늘림.
            panel1.Controls.Add(root2);

            root3.TopLevel  = false;
            root3.TopMost   = true;
            root3.MdiParent = this;
            root3.Dock      = DockStyle.Fill; //판넬크기에 맞게 사이즈 늘림.
            panel1.Controls.Add(root3);

            root4.TopLevel  = false;
            root4.TopMost   = true;
            root4.MdiParent = this;
            root4.Dock      = DockStyle.Fill; //판넬크기에 맞게 사이즈 늘림.
            panel1.Controls.Add(root4);
        }