Esempio n. 1
0
        public PictureBox load_PictureBox(PICTUREBOXclass picturbox_obj)
        {
            PictureBox picturebox = new PictureBox();

            picturebox.Name     = picturbox_obj.Name;
            picturebox.Text     = picturbox_obj.Text;
            picturebox.SizeMode = PictureBoxSizeMode.StretchImage;
            picturebox.Location = new Point(picturbox_obj.PX, picturbox_obj.PY);
            //Image picturebox_myImage = (Image)Properties.Resources.ResourceManager.GetObject(picturbox_obj.Image_Name); // global::WindowsFormsHiWeather.Properties.Resources.config_image;
            //picturebox.ClientSize = new Size(picturbox_obj.SX, picturbox_obj.SY);
            picturebox.Size          = new Size(picturbox_obj.SX, picturbox_obj.SY);
            picturebox.ImageLocation = "http://192.168.3.25:5000/" + picturbox_obj.Image_Name; // FTP에서불러올파일이름;
            picturebox.Click        += picturbox_obj.eh_picturbox;
            //radio1.Checked = true;  // RadioButton 체크로 설정.

            return(picturebox);
        }
Esempio n. 2
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(콤보박스검색카테고리);
        }
Esempio 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(버튼);
            }
        }
Esempio n. 4
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(요청입고_리스트뷰);
        }