Exemplo n.º 1
0
        public TextBox txtbox(TXTBOXclass txtbox_obj)
        {
            TextBox txtbox = new TextBox();

            txtbox.Name          = txtbox_obj.Name;
            txtbox.Text          = txtbox_obj.Text;
            txtbox.AcceptsReturn = true;
            txtbox.AcceptsTab    = true;
            txtbox.Size          = new Size(txtbox_obj.SX, txtbox_obj.SY);
            txtbox.Location      = new Point(txtbox_obj.PX, txtbox_obj.PY);
            txtbox.Cursor        = Cursors.Hand;
            txtbox.Click        += txtbox_obj.eh_txtbox;
            //txtbox.ReadOnly = true;  // TextBox 비활성화

            return(txtbox);
        }
Exemplo n.º 2
0
        private void USER_INFO_FORM_Load(object sender, EventArgs e)
        {
            this.Paint += new PaintEventHandler(this.Form_Paint);


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

            this.BackColor = Color.FromArgb(201, 253, 223);

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

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

            COMMON_Create_Ctl create_ctl = new COMMON_Create_Ctl();

            create_ctl.delay_rental_check();

            // 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");

            // 회원정보패널
            PANELclass 회원정보패널값 = new PANELclass(this, "회원정보패널", "회원정보패널", 700, 300, 20, 20);
            Panel      회원정보패널  = comm.panel(회원정보패널값);

            회원정보패널.Region    = Region.FromHrgn(COMMON_Create_Ctl.CreateRoundRectRgn(2, 2, 회원정보패널.Width, 회원정보패널.Height, 15, 15));
            회원정보패널.BackColor = Color.FromArgb(218, 234, 244);  // rgb(218,234,244)
            Controls.Add(회원정보패널);


            // 회원정보패널 고정라벨
            ArrayList arry = new ArrayList();

            arry.Add(new LBclass(this, "회원번호", "회원번호", 17, 110, 30, 20, 30, label_Click));
            arry.Add(new LBclass(this, "연락처", "연락처", 17, 110, 30, 20, 80, label_Click));
            arry.Add(new LBclass(this, "이름", "이름", 17, 110, 30, 20, 130, label_Click));
            arry.Add(new LBclass(this, "ID", "ID", 17, 110, 30, 20, 180, label_Click));
            arry.Add(new LBclass(this, "블랙리스트여부", "블랙리스트 여부", 17, 190, 40, 20, 230, label_Click));
            arry.Add(new LBclass(this, "", ":", 12, 30, 40, 210, 30, label_Click));
            arry.Add(new LBclass(this, "", ":", 12, 30, 40, 210, 80, label_Click));
            arry.Add(new LBclass(this, "", ":", 12, 30, 40, 210, 130, label_Click));
            arry.Add(new LBclass(this, "", ":", 12, 30, 40, 210, 180, label_Click));
            arry.Add(new LBclass(this, "", ":", 12, 30, 40, 210, 230, label_Click));

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

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


                회원정보패널.Controls.Add(label);
            }

            // 회원정보TextBox 변동값
            ArrayList userinfoArry = new ArrayList();

            userinfoArry.Add(new TXTBOXclass(this, "회원번호값", "회원번호값", 430, 40, 240, 30, txtbox_Click));
            userinfoArry.Add(new TXTBOXclass(this, "연락처값", "연락처값", 430, 40, 240, 80, txtbox_Click));
            userinfoArry.Add(new TXTBOXclass(this, "이름값", "이름값", 430, 40, 240, 130, txtbox_Click));
            userinfoArry.Add(new TXTBOXclass(this, "ID값", "ID값", 430, 40, 240, 180, txtbox_Click));
            userinfoArry.Add(new TXTBOXclass(this, "블랙리스트값", "블랙리스트값", 430, 40, 240, 230, 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, 12, FontStyle.Bold);

                if (textBox.Name == "회원번호값")
                {
                    회원번호값 = textBox;
                }
                else if (textBox.Name == "연락처값")
                {
                    연락처값 = textBox;
                }
                else if (textBox.Name == "이름값")
                {
                    이름값 = textBox;
                }
                else if (textBox.Name == "ID값")
                {
                    ID값 = textBox;
                }
                else if (textBox.Name == "블랙리스트값")
                {
                    블랙리스트값 = textBox;
                }

                회원정보패널.Controls.Add(textBox);
            }



            /// 버튼 - 회원정보 변경버튼
            BTNclass 버튼등급수정값 = new BTNclass(this, "버튼등급수정", "회원 등급 수정", 150, 40, 570, 340, btn_Click);
            Button   버튼등급수정  = comm.btn(버튼등급수정값);

            버튼등급수정.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(버튼등급수정);

            /// 라벨 - 대여목록
            LBclass 대여목록라벨값 = new LBclass(this, "대여목록", "대여 목록", 20, 200, 30, 20, 365, label_Click);
            Label   대여목록라벨  = comm.lb(대여목록라벨값);

            대여목록라벨.Font = new Font(대여목록라벨.Font.Name, 20, FontStyle.Bold);
            Controls.Add(대여목록라벨);


            // 리스트뷰 - 대여목록
            LISTVIEWclass 대여목록_리스트뷰값 = new LISTVIEWclass(this, "대여목록_ListVIew", 700, 350, 20, 407, listView_MouseClick, listview_mousedoubleclick, 6, "", 0, "책번호", 70, "책 이름", 260, "저자", 120, "출판사", 120, "대여현황", 125);

            대여목록_리스트뷰      = comm.listView(대여목록_리스트뷰값);
            대여목록_리스트뷰.Font = new Font("Arial", 14, FontStyle.Bold);

            //mysql = new MySql();
            //string sql = string.Format("select * from book_info;");
            //ArrayList bookinfoSearch_arry2 = mysql.Select(sql);
            //foreach (Hashtable ht in bookinfoSearch_arry2)
            //{
            //    ListViewItem item = new ListViewItem("");
            //    item.SubItems.Add(ht["book_number"].ToString());
            //    item.SubItems.Add(ht["title"].ToString());
            //    item.SubItems.Add(ht["author"].ToString());
            //    item.SubItems.Add(ht["publisher"].ToString());
            //    item.Font = new Font("Arial", 14, FontStyle.Italic);
            //    대여목록_리스트뷰.Items.Add(item);
            //}

            Controls.Add(대여목록_리스트뷰);

            //  회원정보검색 - 라벨
            LBclass 회원정보검색값 = new LBclass(this, "회원정보검색", "회원정보검색 :", 20, 200, 40, 790, 95, label_Click);
            Label   회원정보검색  = comm.lb(회원정보검색값);

            회원정보검색.Font = new Font(회원정보검색.Font.Name, 20, FontStyle.Bold);
            Controls.Add(회원정보검색);

            // 회원정보검색 - 콤보박스
            COMBOBOXclass 검색카테고리값    = new COMBOBOXclass(this, "ComboBox1", 90, 120, 990, 90, ComboBox_SelectedIndexChanged, 2, "이름", "ID");
            ComboBox      콤보박스검색카테고리 = comm.comboBox(검색카테고리값);

            콤보박스검색카테고리.Font          = new Font(콤보박스검색카테고리.Font.Name, 22, FontStyle.Regular);
            콤보박스검색카테고리.DropDownStyle = ComboBoxStyle.DropDownList;
            콤보박스검색카테고리.SelectedIndex = 0;
            Controls.Add(콤보박스검색카테고리);


            // 회원정보검색 검색박스상자 - TextBOX
            TXTBOXclass 회원정보검색상자값 = new TXTBOXclass(this, "회원정보검색상자", "", 250, 150, 1080, 90, txtbox_Click);

            회원정보검색상자      = comm.txtbox(회원정보검색상자값);
            회원정보검색상자.Font = new Font(회원정보검색상자.Font.Name, 20, FontStyle.Bold);
            Controls.Add(회원정보검색상자); // 수정중

            // 회원정보검색 - 버튼
            BTNclass 검색버튼값 = new BTNclass(this, "검색버튼", "검색", 100, 40, 1330, 89, btn_Click);
            Button   버튼검색  = comm.btn(검색버튼값);

            버튼검색.BackColor = Color.FromArgb(50, 178, 223);
            버튼검색.Font      = new Font(버튼검색.Font.Name, 17, FontStyle.Bold);
            버튼검색.FlatStyle = FlatStyle.Flat;
            버튼검색.ForeColor = Color.White;
            //버튼검색.Region = Region.FromHrgn(COMMON_Create_Ctl.CreateRoundRectRgn(2, 2, 버튼검색.Width, 버튼검색.Height, 18, 18));
            Controls.Add(버튼검색);


            // 리스트뷰 - 회원정보검색
            LISTVIEWclass 회원정보검색_리스트뷰값 = new LISTVIEWclass(this, "회원정보검색_ListVIew", 645, 575, 800, 182, listView_MouseClick, listview_mousedoubleclick, 5, "", 0, "회원번호", 120, "회원이름", 120, "주민번호 앞자리", 200, "ID", 200);

            회원정보검색_리스트뷰      = comm.listView(회원정보검색_리스트뷰값);
            회원정보검색_리스트뷰.Font = new Font("Arial", 14, FontStyle.Bold);

            mysql = new MySql();
            sql   = string.Format("select * from signup;");
            ArrayList signupinfoSearch_arry = mysql.Select(sql);

            foreach (Hashtable ht in signupinfoSearch_arry)
            {
                ListViewItem item = new ListViewItem("");
                item.SubItems.Add(ht["user_number"].ToString());
                item.SubItems.Add(ht["name"].ToString());
                item.SubItems.Add(ht["birthday"].ToString().Substring(0, 10));
                item.SubItems.Add(ht["id"].ToString());
                item.Font = new Font("Arial", 14, FontStyle.Italic);
                회원정보검색_리스트뷰.Items.Add(item);
            }
            Controls.Add(회원정보검색_리스트뷰);
        }
Exemplo n.º 3
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(버튼);
            }
        }
Exemplo n.º 4
0
        private void USER_INFO_FORM_Load(object sender, EventArgs e)
        {
            webapiUrl = comm.WebapiUrl;

            this.Paint += new PaintEventHandler(this.Form_Paint);


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

            this.BackColor = Color.FromArgb(201, 253, 223);

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

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

            COMMON_Create_Ctl create_ctl = new COMMON_Create_Ctl();

            create_ctl.delay_rental_check();

            // 회원정보패널
            PANELclass 회원정보패널값 = new PANELclass(this, "회원정보패널", "회원정보패널", 700, 320, 20, 20);
            Panel      회원정보패널  = comm.panel(회원정보패널값);

            회원정보패널.Region    = Region.FromHrgn(COMMON_Create_Ctl.CreateRoundRectRgn(2, 2, 회원정보패널.Width, 회원정보패널.Height, 15, 15));
            회원정보패널.BackColor = Color.FromArgb(218, 234, 244);  // rgb(218,234,244)
            Controls.Add(회원정보패널);


            // 회원정보패널 고정라벨
            ArrayList arry = new ArrayList();

            arry.Add(new LBclass(this, "회원번호", "회원번호", 17, 110, 30, 20, 30, label_Click));
            arry.Add(new LBclass(this, "연락처", "연락처", 17, 110, 30, 20, 80, label_Click));
            arry.Add(new LBclass(this, "이름", "이름", 17, 110, 30, 20, 130, label_Click));
            arry.Add(new LBclass(this, "ID", "ID", 17, 110, 30, 20, 180, label_Click));
            arry.Add(new LBclass(this, "블랙리스트여부", "블랙리스트 여부", 17, 190, 40, 20, 230, label_Click));
            arry.Add(new LBclass(this, "", ":", 12, 30, 40, 210, 30, label_Click));
            arry.Add(new LBclass(this, "", ":", 12, 30, 40, 210, 80, label_Click));
            arry.Add(new LBclass(this, "", ":", 12, 30, 40, 210, 130, label_Click));
            arry.Add(new LBclass(this, "", ":", 12, 30, 40, 210, 180, label_Click));
            arry.Add(new LBclass(this, "", ":", 12, 30, 40, 210, 230, label_Click));

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

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


                회원정보패널.Controls.Add(label);
            }

            // 회원정보TextBox 변동값
            ArrayList userinfoArry = new ArrayList();

            userinfoArry.Add(new TXTBOXclass(this, "회원번호값", "회원번호값", 430, 40, 240, 30, txtbox_Click));
            userinfoArry.Add(new TXTBOXclass(this, "연락처값", "연락처값", 430, 40, 240, 80, txtbox_Click));
            userinfoArry.Add(new TXTBOXclass(this, "이름값", "이름값", 430, 40, 240, 130, txtbox_Click));
            userinfoArry.Add(new TXTBOXclass(this, "ID값", "ID값", 430, 40, 240, 180, txtbox_Click));
            userinfoArry.Add(new TXTBOXclass(this, "블랙리스트값", "블랙리스트값", 430, 40, 240, 230, 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, 12, FontStyle.Bold);

                if (textBox.Name == "회원번호값")
                {
                    회원번호값 = textBox;
                }
                else if (textBox.Name == "연락처값")
                {
                    연락처값 = textBox;
                }
                else if (textBox.Name == "이름값")
                {
                    이름값 = textBox;
                }
                else if (textBox.Name == "ID값")
                {
                    ID값 = textBox;
                }
                else if (textBox.Name == "블랙리스트값")
                {
                    블랙리스트값 = textBox;
                }

                회원정보패널.Controls.Add(textBox);
            }


            //700, 300, 20, 20

            /// 버튼 - 회원정보 변경버튼
            BTNclass 버튼등급수정값 = new BTNclass(this, "버튼등급수정", "회원 등급 수정", 460, 35, 120, 270, btn_Click);
            Button   버튼등급수정  = comm.btn(버튼등급수정값);

            버튼등급수정.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(버튼등급수정);

            /// 버튼 - 회원정보 변경버튼
            BTNclass 도서반납버튼값 = new BTNclass(this, "도서반납버튼", "도서 반납", 130, 40, 590, 360, btn_Click);
            Button   도서반납버튼  = comm.btn(도서반납버튼값);

            도서반납버튼.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(도서반납버튼);


            /// 라벨 - 대여목록
            LBclass 대여목록라벨값 = new LBclass(this, "대여목록", "대여 목록", 20, 200, 30, 20, 365, label_Click);
            Label   대여목록라벨  = comm.lb(대여목록라벨값);

            대여목록라벨.Font = new Font(대여목록라벨.Font.Name, 20, FontStyle.Bold);
            Controls.Add(대여목록라벨);


            // 리스트뷰 - 대여목록
            LISTVIEWclass 대여목록_리스트뷰값 = new LISTVIEWclass(this, "대여목록_ListVIew", 700, 350, 20, 407, listView_MouseClick, listview_mousedoubleclick, 6, "", 0, "대여No", 70, "책 이름", 260, "저자", 120, "출판사", 120, "대여현황", 125);

            대여목록_리스트뷰      = comm.listView(대여목록_리스트뷰값);
            대여목록_리스트뷰.Font = new Font("Arial", 14, FontStyle.Bold);
            // 처음은 내용 없음으로 빈칸 출력.
            Controls.Add(대여목록_리스트뷰);

            //  회원정보검색 - 라벨
            LBclass 회원정보검색값 = new LBclass(this, "회원정보검색", "회원정보검색 :", 20, 200, 40, 790, 95, label_Click);
            Label   회원정보검색  = comm.lb(회원정보검색값);

            회원정보검색.Font = new Font(회원정보검색.Font.Name, 20, FontStyle.Bold);
            Controls.Add(회원정보검색);

            // 회원정보검색 - 콤보박스
            COMBOBOXclass 검색카테고리값    = new COMBOBOXclass(this, "ComboBox1", 90, 120, 990, 90, ComboBox_SelectedIndexChanged, 2, "이름", "ID");
            ComboBox      콤보박스검색카테고리 = comm.comboBox(검색카테고리값);

            콤보박스검색카테고리.Font          = new Font(콤보박스검색카테고리.Font.Name, 22, FontStyle.Regular);
            콤보박스검색카테고리.DropDownStyle = ComboBoxStyle.DropDownList;
            콤보박스검색카테고리.SelectedIndex = 0;
            Controls.Add(콤보박스검색카테고리);


            // 회원정보검색 검색박스상자 - TextBOX
            TXTBOXclass 회원정보검색상자값 = new TXTBOXclass(this, "회원정보검색상자", "", 250, 150, 1080, 90, txtbox_Click);

            회원정보검색상자      = comm.txtbox(회원정보검색상자값);
            회원정보검색상자.Font = new Font(회원정보검색상자.Font.Name, 20, FontStyle.Bold);
            Controls.Add(회원정보검색상자); // 수정중

            // 회원정보검색 - 버튼
            BTNclass 검색버튼값 = new BTNclass(this, "검색버튼", "검색", 100, 40, 1330, 89, btn_Click);
            Button   버튼검색  = comm.btn(검색버튼값);

            버튼검색.BackColor = Color.FromArgb(50, 178, 223);
            버튼검색.Font      = new Font(버튼검색.Font.Name, 17, FontStyle.Bold);
            버튼검색.FlatStyle = FlatStyle.Flat;
            버튼검색.ForeColor = Color.White;
            //버튼검색.Region = Region.FromHrgn(COMMON_Create_Ctl.CreateRoundRectRgn(2, 2, 버튼검색.Width, 버튼검색.Height, 18, 18));
            Controls.Add(버튼검색);


            // 리스트뷰 - 회원정보검색
            LISTVIEWclass 회원정보검색_리스트뷰값 = new LISTVIEWclass(this, "회원정보검색_ListVIew", 645, 575, 800, 182, listView_MouseClick, listview_mousedoubleclick, 5, "", 0, "회원번호", 120, "회원이름", 120, "주민번호 앞자리", 200, "ID", 200);

            회원정보검색_리스트뷰      = comm.listView(회원정보검색_리스트뷰값);
            회원정보검색_리스트뷰.Font = new Font("Arial", 14, FontStyle.Bold);

            ArrayList signupinfoSearch_arry = Select_signup_info_Webapi();

            foreach (Hashtable ht in signupinfoSearch_arry)
            {
                ListViewItem item = new ListViewItem("");
                item.SubItems.Add(ht["user_number"].ToString());
                item.SubItems.Add(ht["name"].ToString());
                item.SubItems.Add(ht["birthday"].ToString().Substring(0, 10));
                item.SubItems.Add(ht["id"].ToString());
                item.Font = new Font("Arial", 14, FontStyle.Italic);
                회원정보검색_리스트뷰.Items.Add(item);
            }
            Controls.Add(회원정보검색_리스트뷰);
        }
Exemplo n.º 5
0
        private void BOOK_INFO_FORM_Load(object sender, EventArgs e)
        {
            comm.delay_rental_check();
            login_frm = new LOGIN_FORM(form);

            if (login_frm.Member_rank == 1)
            {
                user  = true;
                admin = false;
            }
            else if (login_frm.Member_rank == 0)
            {
                user  = false;
                admin = true;
            }
            //else if (MAIN_FORM.member_rank == 4)
            //{
            //    user = true;
            //    admin = false;
            //}



            FormBorderStyle = FormBorderStyle.None; //폼 상단 표시줄 제거
            //this.BackColor = Color.Aquamarine;
            this.BackColor = Color.FromArgb(201, 253, 223);

            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");

            if (user)
            {
                // 책정보패널
                PANELclass 책정보패널값 = new PANELclass(this, "책정보패널", "책정보패널", 550, 600, 10, 10);
                책정보패널 = comm.panel(책정보패널값);
            }
            else
            {
                // 책정보패널
                PANELclass 책정보패널값 = new PANELclass(this, "책정보패널", "책정보패널", 550, 750, 10, 10);
                책정보패널 = comm.panel(책정보패널값);
            }

            //(좌측상단여백, 우측상단여백, 컨트롤 넓이, 컨트롤 높이, 가로 모서리 원기울기, 세로 모서리 원기울기)
            책정보패널.Region    = Region.FromHrgn(COMMON_Create_Ctl.CreateRoundRectRgn(2, 2, 책정보패널.Width, 책정보패널.Height, 15, 15));
            책정보패널.BackColor = Color.FromArgb(218, 234, 244);  // rgb(218,234,244)
            Controls.Add(책정보패널);

            // 도서사진 픽쳐박스
            PICTUREBOXclass picturboxValue = new PICTUREBOXclass(this, "picturebox1", "picturebox_txt1", 220, 260, 10, 20, "default_book_image.png", picturbox_Click);

            책이미지 = comm.load_PictureBox(picturboxValue);
            책정보패널.Controls.Add(책이미지);

            // 간략소개상자 - TextBOX
            TXTBOXclass 간략소개상자값 = new TXTBOXclass(this, "간략소개상자", "", 500, 150, 26, 324, txtbox_Click);

            간략소개상자            = comm.txtbox(간략소개상자값);
            간략소개상자.Font       = new Font("Arial", 24, FontStyle.Bold);
            간략소개상자.ReadOnly   = true;
            간략소개상자.Multiline  = true;
            간략소개상자.Region     = Region.FromHrgn(COMMON_Create_Ctl.CreateRoundRectRgn(2, 2, 간략소개상자.Width, 간략소개상자.Height, 18, 18));
            간략소개상자.ScrollBars = ScrollBars.Vertical;
            책정보패널.Controls.Add(간략소개상자);

            // 책정보 검색박스상자 - TextBOX
            TXTBOXclass 책정보검색상자값 = new TXTBOXclass(this, "책정보_검색박스", "", 430, 150, 920, 89, txtbox_Click);

            책정보검색상자      = comm.txtbox(책정보검색상자값);
            책정보검색상자.Font = new Font(책정보검색상자.Font.Name, 24, FontStyle.Bold);
            Controls.Add(책정보검색상자); // 수정중


            // 책정보패널 고정라벨
            ArrayList arry = new ArrayList();

            arry.Add(new LBclass(this, "번호", "번호    :", 17, 110, 40, 235, 40, label_Click));
            arry.Add(new LBclass(this, "제목", "제목    :", 17, 110, 40, 235, 90, label_Click));
            arry.Add(new LBclass(this, "저자", "저자    :", 17, 110, 40, 235, 140, label_Click));
            arry.Add(new LBclass(this, "출판사", "출판사 :", 17, 110, 40, 235, 190, label_Click));
            arry.Add(new LBclass(this, "장르", "장르    :", 17, 110, 40, 235, 240, label_Click));
            arry.Add(new LBclass(this, "간략소개", "간략소개 :", 17, 110, 40, 26, 293, label_Click));
            if (user)
            {
                arry.Add(new LBclass(this, "대여가능여부", "대여가능여부    :", 17, 200, 40, 22, 496, label_Click));
                arry.Add(new LBclass(this, "도서위치", "    도서위치    :", 17, 180, 40, 38, 540, label_Click));
            }
            else
            {
                arry.Add(new LBclass(this, "대여가능여부", "대여가능여부   :", 17, 220, 40, 22, 530, label_Click));
                arry.Add(new LBclass(this, "대여자", "대여자  :", 17, 130, 40, 115, 600, label_Click));
                arry.Add(new LBclass(this, "도서위치", "도서위치   :", 17, 170, 40, 75, 670, label_Click));
            }


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

                if (label.Name == "간략소개")
                {
                    label.Font = new Font(label.Font.Name, 14, FontStyle.Bold | FontStyle.Underline);
                }
                else if (admin && label.Name == "대여가능여부")
                {
                    label.Font = new Font(label.Font.Name, 20, FontStyle.Bold);
                }
                else if (admin && label.Name == "대여자")
                {
                    label.Font = new Font(label.Font.Name, 20, FontStyle.Bold);
                }
                else if (admin && label.Name == "도서위치")
                {
                    label.Font = new Font(label.Font.Name, 20, FontStyle.Bold);
                }
                else
                {
                    label.Font = new Font(label.Font.Name, 17, FontStyle.Bold);
                }

                책정보패널.Controls.Add(label);
            }

            // 책정보패널 선택한 리스트 라벨값
            ArrayList arryValue = new ArrayList();

            arryValue.Add(new LBclass(this, "번호값", "번호값", 17, 200, 40, 349, 40, label_Click));
            arryValue.Add(new LBclass(this, "제목값", "제목값", 17, 200, 40, 349, 90, label_Click));
            arryValue.Add(new LBclass(this, "저자값", "저자값", 17, 200, 40, 349, 140, label_Click));
            arryValue.Add(new LBclass(this, "출판사값", "출판사값", 17, 200, 40, 349, 190, label_Click));
            arryValue.Add(new LBclass(this, "장르값", "장르값", 17, 200, 40, 349, 240, label_Click));

            if (user)
            {
                arryValue.Add(new LBclass(this, "대여가능여부값", "가능", 17, 110, 40, 236, 497, label_Click));
                arryValue.Add(new LBclass(this, "도서위치값", "A열 2 - 1", 17, 110, 40, 238, 540, label_Click));
            }

            else
            {
                arryValue.Add(new LBclass(this, "대여가능여부값", "가능", 17, 1000, 40, 246, 530, label_Click));
                arryValue.Add(new LBclass(this, "대여자여부값", "없음", 17, 100, 40, 245, 600, label_Click));
                arryValue.Add(new LBclass(this, "도서위치값", "A열 2 - 1", 17, 100, 40, 248, 670, label_Click));
            }

            for (int i = 0; i < arryValue.Count; i++)
            {
                Label label = comm.lb((LBclass)arryValue[i]);
                label.Font = new Font(label.Font.Name, 17, FontStyle.Bold);
                책정보패널.Controls.Add(label);

                if (label.Name == "번호값")
                {
                    번호값 = label;
                }
                else if (label.Name == "제목값")
                {
                    제목값 = label;
                }
                else if (label.Name == "저자값")
                {
                    저자값 = label;
                }
                else if (label.Name == "출판사값")
                {
                    출판사값 = label;
                }
                else if (label.Name == "장르값")
                {
                    장르값 = label;
                }
                else if (label.Name == "대여가능여부값")
                {
                    대여가능여부값 = label;
                }
                else if (label.Name == "도서위치값")
                {
                    도서위치값 = label;
                }

                if (admin && label.Name == "대여가능여부값")
                {
                    label.Font = new Font(label.Font.Name, 20, FontStyle.Bold);
                }
                else if (admin && label.Name == "대여자여부값")
                {
                    대여자여부값     = label;
                    label.Font = new Font(label.Font.Name, 20, FontStyle.Bold);
                }
                else if (admin && label.Name == "도서위치값")
                {
                    label.Font = new Font(label.Font.Name, 20, FontStyle.Bold);
                }
            }


            /*
             *  제목값.Hide();
             *  저자값.Hide();
             *  출판사값.Hide();
             *  장르값.Hide();
             *  도서위치값.Hide();
             *
             */



            if (user)
            {
                // 입고요청패널
                PANELclass 입고요청패널값 = new PANELclass(this, "입고요청패널", "입고요청패널", 550, 160, 10, 610);
                Panel      입고요청패널  = comm.panel(입고요청패널값);

                //(좌측상단여백, 우측상단여백, 컨트롤 넓이, 컨트롤 높이, 가로 모서리 원기울기, 세로 모서리 원기울기)
                입고요청패널.Region    = Region.FromHrgn(COMMON_Create_Ctl.CreateRoundRectRgn(2, 2, 입고요청패널.Width, 입고요청패널.Height, 15, 15));
                입고요청패널.BackColor = Color.FromArgb(114, 241, 168);  // rgb(218,234,244)
                Controls.Add(입고요청패널);

                // 입고요청 고정라벨
                LBclass 입고요청라벨값 = new LBclass(this, "입고요청", "※ 찾으시는 도서가 없으신가요?\n    그럼 입고요청을 해주세요.", 17, 360, 50, 17, 17, label_Click);
                Label   입고요청라벨  = comm.lb(입고요청라벨값);
                입고요청패널.Controls.Add(입고요청라벨);

                // 대여 버튼
                BTNclass 버튼대여버튼값 = new BTNclass(this, "대여버튼", "대여", 130, 60, 410, 530, btn_Click);
                Button   대여버튼    = comm.btn(버튼대여버튼값);
                대여버튼.BackColor = Color.FromArgb(50, 178, 223);
                대여버튼.Font      = new Font(대여버튼.Font.Name, 17, FontStyle.Bold);
                대여버튼.FlatStyle = FlatStyle.Flat;
                대여버튼.ForeColor = Color.White;
                대여버튼.Region    = Region.FromHrgn(COMMON_Create_Ctl.CreateRoundRectRgn(2, 2, 대여버튼.Width, 대여버튼.Height, 18, 18));
                책정보패널.Controls.Add(대여버튼);

                // 입고 버튼
                BTNclass 버튼입고요청값 = new BTNclass(this, "입고버튼", "입고요청", 130, 60, 410, 30, btn_Click);
                Button   버튼입고요청  = comm.btn(버튼입고요청값);
                버튼입고요청.BackColor = Color.FromArgb(50, 178, 223);
                버튼입고요청.Font      = new Font(버튼입고요청.Font.Name, 17, FontStyle.Bold);
                버튼입고요청.FlatStyle = FlatStyle.Flat;
                버튼입고요청.ForeColor = Color.White;
                버튼입고요청.Region    = Region.FromHrgn(COMMON_Create_Ctl.CreateRoundRectRgn(2, 2, 버튼입고요청.Width, 버튼입고요청.Height, 18, 18));
                입고요청패널.Controls.Add(버튼입고요청);
            }
            else
            {
                // 정보수정 && 수정 취소 버튼
                ArrayList btnArray = new ArrayList();
                btnArray.Add(new BTNclass(this, "정보수정버튼", "정보 수정", 140, 60, 385, 640, btn_Click));
                btnArray.Add(new BTNclass(this, "수정취소버튼", "수정 취소", 140, 60, 385, 640, btn_Click));
                btnArray.Add(new BTNclass(this, "수정완료버튼", "수정 완료", 140, 60, 385, 570, btn_Click));

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

                    버튼.BackColor = Color.FromArgb(50, 178, 223);
                    버튼.Font      = new Font(버튼.Font.Name, 17, FontStyle.Bold);
                    버튼.FlatStyle = FlatStyle.Flat;
                    버튼.ForeColor = Color.White;
                    버튼.Region    = Region.FromHrgn(COMMON_Create_Ctl.CreateRoundRectRgn(2, 2, 버튼.Width, 버튼.Height, 18, 18));
                    책정보패널.Controls.Add(버튼);

                    if (버튼.Name == "정보수정버튼")
                    {
                        정보수정 = 버튼;
                    }
                    else if (버튼.Name == "수정취소버튼")
                    {
                        수정취소 = 버튼;
                    }
                    else if (버튼.Name == "수정완료버튼")
                    {
                        수정완료 = 버튼;
                    }
                }
                수정취소.Hide();
                수정완료.Hide();

                // 책정보패널 - 책정보 수정을 위한 텍스트박스 값
                ArrayList TextBox_arryValue = new ArrayList();
                TextBox_arryValue.Add(new TXTBOXclass(this, "텍스트박스_제목값", "텍스트박스_제목값", 180, 40, 349, 80, txtbox_Click)); //  200, 40, 349, 90,
                TextBox_arryValue.Add(new TXTBOXclass(this, "텍스트박스_저자값", "텍스트박스_저자값", 180, 40, 349, 130, txtbox_Click));
                TextBox_arryValue.Add(new TXTBOXclass(this, "텍스트박스_출판사값", "텍스트박스_출판사값", 180, 40, 349, 180, txtbox_Click));
                TextBox_arryValue.Add(new TXTBOXclass(this, "텍스트박스_장르값", "텍스트박스_장르값", 180, 40, 349, 230, txtbox_Click));
                TextBox_arryValue.Add(new TXTBOXclass(this, "텍스트박스_도서위치값", "A열 2 - 1", 100, 40, 248, 660, txtbox_Click));

                for (int i = 0; i < TextBox_arryValue.Count; i++)
                {
                    TextBox textbox = comm.txtbox((TXTBOXclass)TextBox_arryValue[i]);
                    textbox.Font = new Font(textbox.Font.Name, 20, FontStyle.Bold);
                    책정보패널.Controls.Add(textbox);

                    if (textbox.Name == "텍스트박스_제목값")
                    {
                        텍스트박스_제목값 = textbox;
                    }
                    else if (textbox.Name == "텍스트박스_저자값")
                    {
                        텍스트박스_저자값 = textbox;
                    }
                    else if (textbox.Name == "텍스트박스_출판사값")
                    {
                        텍스트박스_출판사값 = textbox;
                    }
                    else if (textbox.Name == "텍스트박스_장르값")
                    {
                        텍스트박스_장르값 = textbox;
                    }
                    else if (textbox.Name == "텍스트박스_도서위치값")
                    {
                        텍스트박스_도서위치값 = textbox;
                    }
                }
                텍스트박스_제목값.Hide();
                텍스트박스_저자값.Hide();
                텍스트박스_출판사값.Hide();
                텍스트박스_장르값.Hide();
                텍스트박스_도서위치값.Hide();
            }


            BTNclass 검색버튼값 = new BTNclass(this, "검색버튼", "검색버튼", 130, 48, 1350, 87, btn_Click);
            Button   버튼검색  = comm.btn(검색버튼값);

            버튼검색.BackColor = Color.FromArgb(50, 178, 223);
            버튼검색.Font      = new Font(버튼검색.Font.Name, 17, FontStyle.Bold);
            버튼검색.FlatStyle = FlatStyle.Flat;
            버튼검색.ForeColor = Color.White;
            //버튼검색.Region = Region.FromHrgn(COMMON_Create_Ctl.CreateRoundRectRgn(2, 2, 버튼검색.Width, 버튼검색.Height, 18, 18));
            Controls.Add(버튼검색);


            LBclass 라벨책정보검색값 = new LBclass(this, "책정보", "도서 검색 :", 26, 200, 40, 590, 95, label_Click);
            Label   라벨책정보검색  = comm.lb(라벨책정보검색값);

            Controls.Add(라벨책정보검색);


            LISTVIEWclass 책정보검색_리스트뷰값 = new LISTVIEWclass(this, "ListView1", 900, 580, 589, 190, listView_MouseClick, listview_mousedoubleclick, 6, "", 0, "책번호", 100, "대여", 120, "도서명", 460, "저자", 100, "출판사", 115);

            책정보검색_리스트뷰 = comm.listView(책정보검색_리스트뷰값);


            책정보검색_리스트뷰.Font = new Font("Arial", 24, FontStyle.Bold);

            MySql mysql = new MySql();

            ArrayList bookinfoSearch_arry = mysql.GetSelect();

            foreach (Hashtable ht in bookinfoSearch_arry)
            {
                ListViewItem item = new ListViewItem("");
                item.SubItems.Add(ht["book_number"].ToString());
                item.SubItems.Add(ht["availability"].ToString());
                item.SubItems.Add(ht["title"].ToString());
                item.SubItems.Add(ht["author"].ToString());
                item.SubItems.Add(ht["publisher"].ToString());
                item.Font = new Font("Arial", 18, FontStyle.Italic);


                책정보검색_리스트뷰.Items.Add(item);
            }

            Controls.Add(책정보검색_리스트뷰);



            COMBOBOXclass 검색카테고리값 = new COMBOBOXclass(this, "ComboBox1", 130, 120, 790, 89, ComboBox_SelectedIndexChanged, 3, "도서명", "저자", "출판사");

            콤보박스검색카테고리               = comm.comboBox(검색카테고리값);
            콤보박스검색카테고리.Font          = new Font(콤보박스검색카테고리.Font.Name, 27, FontStyle.Regular);
            콤보박스검색카테고리.DropDownStyle = ComboBoxStyle.DropDownList;
            콤보박스검색카테고리.SelectedIndex = 0;
            Controls.Add(콤보박스검색카테고리);
        }
Exemplo n.º 6
0
        private void BOOK_MGT_FORM_Load(object sender, EventArgs e)
        {
            this.Paint += new PaintEventHandler(this.Form_Paint);

            FormBorderStyle = FormBorderStyle.None; //폼 상단 표시줄 제거
            //this.BackColor = Color.Aquamarine;
            this.BackColor = Color.FromArgb(201, 253, 223);

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

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

            COMMON_Create_Ctl create_ctl = new COMMON_Create_Ctl();


            // 책정보패널
            PANELclass 책정보패널값 = new PANELclass(this, "책정보패널", "책정보패널", 720, 750, 10, 10);
            Panel      책정보패널  = comm.panel(책정보패널값);


            //(좌측상단여백, 우측상단여백, 컨트롤 넓이, 컨트롤 높이, 가로 모서리 원기울기, 세로 모서리 원기울기)
            책정보패널.Region    = Region.FromHrgn(COMMON_Create_Ctl.CreateRoundRectRgn(2, 2, 책정보패널.Width, 책정보패널.Height, 15, 15));
            책정보패널.BackColor = Color.FromArgb(218, 234, 244);  // rgb(218,234,244)
            Controls.Add(책정보패널);


            // 도서사진 픽쳐박스
            PICTUREBOXclass picturboxValue = new PICTUREBOXclass(this, "picturebox1", "picturebox_txt1", 220, 260, 10, 20, "default_book_image.png", picturbox_Click);

            책이미지 = comm.load_PictureBox(picturboxValue);
            책정보패널.Controls.Add(책이미지);

            // 간략소개상자 - TextBOX
            TXTBOXclass 간략소개상자값 = new TXTBOXclass(this, "간략소개상자", "", 665, 280, 26, 380, txtbox_Click);

            간략소개상자            = comm.txtbox(간략소개상자값);
            간략소개상자.Font       = new Font("Arial", 24, FontStyle.Bold);
            간략소개상자.Multiline  = true;
            간략소개상자.Region     = Region.FromHrgn(COMMON_Create_Ctl.CreateRoundRectRgn(2, 2, 간략소개상자.Width, 간략소개상자.Height, 18, 18));
            간략소개상자.ScrollBars = ScrollBars.Vertical;
            책정보패널.Controls.Add(간략소개상자);

            // 책정보패널 고정라벨
            ArrayList arry = new ArrayList();

            arry.Add(new LBclass(this, "제목", "제목    :", 17, 110, 40, 235, 40, label_Click));
            arry.Add(new LBclass(this, "저자", "저자    :", 17, 110, 40, 235, 90, label_Click));
            arry.Add(new LBclass(this, "출판사", "출판사 :", 17, 110, 40, 235, 140, label_Click));
            arry.Add(new LBclass(this, "장르", "장르    :", 17, 110, 40, 235, 190, label_Click));
            arry.Add(new LBclass(this, "도서위치", "위치    :", 17, 110, 40, 235, 240, label_Click));
            arry.Add(new LBclass(this, "간략소개", "간략소개 :", 17, 130, 40, 26, 340, label_Click));


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

                if (label.Name == "간략소개")
                {
                    label.Font = new Font(label.Font.Name, 20, FontStyle.Bold | FontStyle.Underline);
                }
                else
                {
                    label.Font = new Font(label.Font.Name, 17, FontStyle.Bold);
                }

                책정보패널.Controls.Add(label);
            }


            // 책정보패널 선택한 리스트 텍스트박스 값
            ArrayList arryValue = new ArrayList();

            arryValue.Add(new TXTBOXclass(this, "제목값", "제목값", 340, 40, 349, 35, txtbox_Click));
            arryValue.Add(new TXTBOXclass(this, "저자값", "저자값", 340, 40, 349, 85, txtbox_Click));
            arryValue.Add(new TXTBOXclass(this, "출판사값", "출판사값", 340, 40, 349, 135, txtbox_Click));
            arryValue.Add(new TXTBOXclass(this, "장르값", "장르값", 340, 40, 349, 185, txtbox_Click));
            arryValue.Add(new TXTBOXclass(this, "도서위치값", "A열 2 - 1", 340, 40, 349, 235, txtbox_Click));

            for (int i = 0; i < arryValue.Count; i++)
            {
                TextBox textbox = comm.txtbox((TXTBOXclass)arryValue[i]);
                textbox.Font = new Font(textbox.Font.Name, 17, FontStyle.Bold);
                책정보패널.Controls.Add(textbox);

                if (textbox.Name == "제목값")
                {
                    제목값 = textbox;
                }
                else if (textbox.Name == "저자값")
                {
                    저자값 = textbox;
                }
                else if (textbox.Name == "출판사값")
                {
                    출판사값 = textbox;
                }
                else if (textbox.Name == "장르값")
                {
                    장르값 = textbox;
                }
                else if (textbox.Name == "도서위치값")
                {
                    도서위치값 = textbox;
                }
            }



            ArrayList btnarry = new ArrayList();

            btnarry.Add(new BTNclass(this, "등록버튼", "등 록", 120, 50, 575, 670, btn_Click));
            btnarry.Add(new BTNclass(this, "이미지추가버튼", "도서 이미지 추가", 180, 30, 32, 285, btn_Click));
            btnarry.Add(new BTNclass(this, "요청리스트삭제", "요청 리스트 삭제", 180, 30, 1239, 60, btn_Click));

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

                if (버튼.Name == "등록버튼")
                {
                    버튼.Font = new Font(버튼.Font.Name, 20, FontStyle.Bold);
                }
                else if (버튼.Name == "이미지추가버튼")
                {
                    버튼.Font = new Font(버튼.Font.Name, 13, FontStyle.Bold);
                }
                버튼.BackColor = Color.FromArgb(50, 178, 223);
                버튼.FlatStyle = FlatStyle.Flat;
                버튼.ForeColor = Color.White;
                버튼.Region    = Region.FromHrgn(COMMON_Create_Ctl.CreateRoundRectRgn(2, 2, 버튼.Width, 버튼.Height, 18, 18));

                if (버튼.Name == "요청리스트삭제")
                {
                    Controls.Add(버튼);
                }
                else
                {
                    책정보패널.Controls.Add(버튼);
                }
            }



            LBclass 요청입고목록값 = new LBclass(this, "요청입고목록", "입고 요청한 도서 목록", 24, 400, 40, 770, 40, label_Click);
            Label   요청입고목록  = comm.lb(요청입고목록값);

            요청입고목록.Font = new Font(요청입고목록.Font.Name, 24, FontStyle.Bold);
            Controls.Add(요청입고목록);


            LISTVIEWclass 요청입고_리스트뷰값 = new LISTVIEWclass(this, "요청입고리스트뷰", 700, 650, 775, 105, listView_MouseClick, listview_mousedoubleclick, 6, "", 0, "회원번호", 100, "요청자", 100, "도서명", 300, "저자", 100, "출판사", 100);

            요청입고_리스트뷰      = comm.listView(요청입고_리스트뷰값);
            요청입고_리스트뷰.Font = new Font("Arial", 15, FontStyle.Bold);

            MySql mysql = new MySql();

            ArrayList Receiving_equest_arry = mysql.Select(string.Format("select R.request_number, S.user_number, S.name, R.title, R.author, R.publisher, R.genre from signup S inner join Receiving_equest R on (S.user_number = R.user_number);"));

            foreach (Hashtable ht in Receiving_equest_arry)
            {
                ListViewItem item = new ListViewItem(ht["request_number"].ToString());
                item.SubItems.Add(ht["user_number"].ToString());
                item.SubItems.Add(ht["name"].ToString());
                item.SubItems.Add(ht["title"].ToString());
                item.SubItems.Add(ht["author"].ToString());
                item.SubItems.Add(ht["publisher"].ToString());
                item.Font = new Font("Arial", 15, FontStyle.Italic);

                요청입고_리스트뷰.Items.Add(item);
            }

            Controls.Add(요청입고_리스트뷰);
        }