Example #1
0
        private void get_button()
        {
            comm = new Commons();
            Button btn = new Button();
            btnSet bs1 = new btnSet(this, "ok", "검색", 50, 22, 450, 39, ok_Click);

            btn = ct.btn(bs1);
            Controls.Add(btn);
        }
Example #2
0
        public void View()
        {
            pnSet pn1 = new pnSet(this, 1200, 900, 0, 0);

            head = ct.panel(pn1);
            Controls.Add(head);

            lbSet lb1 = new lbSet(this, "top", "폐가전제품 방문수거 배출예약 조회", 450, 40, 50, 10, 14);

            top      = ct.label(lb1);
            top.Font = new Font("Verdana", 20.5f, FontStyle.Bold);
            head.Controls.Add(top);

            label_list = new ArrayList();

            label_list.Add(new lbSet(this, "second", "전화번호", 100, 50, 50, 200, 15));

            for (int i = 0; i < label_list.Count; i++)
            {
                Label label = ct.label((lbSet)label_list[i]);

                label.Font      = new Font("Verdana", 15.5f, FontStyle.Bold);
                label.TextAlign = ContentAlignment.MiddleCenter;
                head.Controls.Add(label);
            }

            tbSet tb2 = new tbSet(this, "phone", 200, 30, 210, 210);


            phone      = ct.txtbox(tb2);
            phone.Font = new Font("Verdana", 15.5f, FontStyle.Bold);
            head.Controls.Add(phone);

            btnSet bt1 = new btnSet(this, "add", "조회", 70, 30, 440, 210, Add_Click);
            Button bt  = ct.btn(bt1);

            head.Controls.Add(bt);

            lvSet lv1 = new lvSet(this, "listview", 800, 400, 50, 400, null);

            lv = ct.listview(lv1);
            lv.FullRowSelect = true;
            lv.Columns.Add("번호", 50, HorizontalAlignment.Center);
            lv.Columns.Add("성명", 250, HorizontalAlignment.Center);
            lv.Columns.Add("제품명", 300, HorizontalAlignment.Center);
            lv.Columns.Add("수량", 50, HorizontalAlignment.Center);
            lv.Columns.Add("요청일", 150, HorizontalAlignment.Center);
            lv.Font = new Font("Verdana", 11.5f, FontStyle.Bold);
            head.Controls.Add(lv);

            Get_Data();
        }
Example #3
0
        private void loadBtnInit()
        {
            List <Btn> btnlist = new List <Btn>();

            btnlist = configset.Definebtns.BtnList;
            foreach (Btn btn in btnlist)
            {
                btnSet bs = new btnSet();
                bs.ConfigName = configName;
                bs.btn        = btn;
                bs.setValue();
                BtnInitControlAdd(bs);
            }
        }
Example #4
0
        //공지사항 -> 탭페이지 안에 리스트뷰를 넣는 방법
        private void pn05list()
        {
            pnSet pn5  = new pnSet(this, 360, 230, 860, 320);
            Panel pn05 = ct.panel(pn5);

            pn05.BackColor   = Color.White;
            pn05.BorderStyle = BorderStyle.None;
            Controls.Add(pn05);

            TabControl tc1 = new TabControl();
            TabPage    tp1 = new TabPage();
            TabPage    tp2 = new TabPage();

            tc1.Controls.Add(tp1);
            tc1.Controls.Add(tp2);
            tc1.Location = new Point(10, 40);
            tc1.Size     = new Size(340, 180);
            tc1.TabIndex = 0;
            tc1.Name     = "공지사항";

            tp1.Size = new Size(340, 180);
            tp1.Text = "전사공지";
            tp1.UseVisualStyleBackColor = true;
            //tp1.Control.Add(this, "안녕");

            tp2.Size = new Size(340, 180);
            tp2.Text = "점포공지";
            tp2.UseVisualStyleBackColor = true;

            lbSet lb  = new lbSet(this, "공지사항", "공지사항", 100, 15, 10, 20, 10);
            Label lb1 = ct.lable(lb);


            btnSet btn  = new btnSet(this, "전체보기", "전체보기>", 90, 25, 250, 15, pn05전체보기_click);
            Button btn1 = ct.btn((btnSet)btn);

            btn1.FlatStyle = FlatStyle.Flat;
            btn1.FlatAppearance.BorderSize = 0;
            pn05.Controls.Add(lb1);
            pn05.Controls.Add(tc1);
            pn05.Controls.Add(btn1);
        }
Example #5
0
        //버튼
        public Button btn(btnSet bS)
        {
            Button btn = new Button();

            btn.DialogResult = DialogResult.OK;
            btn.Name         = bS.Name;
            btn.Text         = bS.Text;
            btn.Size         = new Size(bS.SX, bS.SY);
            btn.Location     = new Point(bS.PX, bS.PY);
            btn.BackColor    = Color.White;
            btn.Cursor       = Cursors.Hand;
            btn.Click       += bS.eh_btn;
            if (bS.Form == null)
            {
                bS.Control.Controls.Add(btn);
            }
            else
            {
                bS.Form.Controls.Add(btn);
            }
            return(btn);
        }
Example #6
0
        private void btnSaveConfig_Click(object sender, EventArgs e)
        {
            if (allControl.Count > 0)
            {
                #region  序
                Control    mfctl = allControl.Find((Control ctl) => (ctl is mainFolder));
                Apps       apps  = new Apps();
                mainFolder mf    = mfctl as mainFolder;
                apps.Name  = mf.Name;
                apps.Label = mf.Label;
                apps.Path  = mf.FolderPath;


                //-- 服务
                List <ServiceApp> serviceapps = new List <ServiceApp>();
                List <Control>    servicesctl = allControl.FindAll((Control ctl) => (ctl is serviceSet));
                if (servicesctl != null && servicesctl.Count > 0)
                {
                    foreach (Control ctl in servicesctl)
                    {
                        serviceSet serviceset = ctl as serviceSet;
                        ServiceApp serviceapp = new ServiceApp();
                        serviceapp.Name         = serviceset.Name;
                        serviceapp.Label        = serviceset.Label;
                        serviceapp.Path         = serviceset.FolderPath;
                        serviceapp.ConfigFolder = serviceset.ConfigFolder;
                        serviceapp.Ip           = serviceset.Ip;
                        serviceapp.Port         = serviceset.Port;

                        ServiceApp oldServiceapp = configset.Apps.ServiceAppList.Find((ServiceApp sa) => sa.Name == serviceset.Name);
                        serviceapp.Relativepath = oldServiceapp.Relativepath;
                        serviceapp.Servicename  = oldServiceapp.Servicename;
                        serviceapp.Installbat   = oldServiceapp.Installbat;
                        serviceapp.Removebat    = oldServiceapp.Removebat;
                        serviceapps.Add(serviceapp);
                    }
                }
                apps.ServiceAppList = serviceapps;
                //-- 网站
                List <WebApp>  webapps    = new List <WebApp>();
                List <Control> webappsctl = allControl.FindAll((Control ctl) => (ctl is webSiteSet));
                if (webappsctl != null && webappsctl.Count > 0)
                {
                    foreach (Control ctl in webappsctl)
                    {
                        webSiteSet websiteset = ctl as webSiteSet;
                        WebApp     webapp     = new WebApp();
                        webapp.Name         = websiteset.Name;
                        webapp.Label        = websiteset.Label;
                        webapp.Path         = websiteset.FolderPath;
                        webapp.ConfigFolder = websiteset.ConfigFolder;
                        webapp.SiteName     = websiteset.SiteName;
                        webapp.Ip           = websiteset.Ip;
                        webapp.Port         = websiteset.Port;
                        webapp.X86bit       = websiteset.X86bit;

                        WebApp oldWebapp = configset.Apps.WebAppList.Find((WebApp sa) => sa.Name == websiteset.Name);
                        webapp.Relativepath = oldWebapp.Relativepath;

                        webapp.VirtualDirList = websiteset.VirtualDirList;

                        webapps.Add(webapp);
                    }
                }
                apps.WebAppList = webapps;

                //--程序
                List <App>     appList = new List <App>();
                List <Control> appsctl = allControl.FindAll((Control ctl) => (ctl is appFolder));
                if (appsctl != null && appsctl.Count > 0)
                {
                    foreach (Control ctl in appsctl)
                    {
                        appFolder appfolder = ctl as appFolder;
                        App       app       = new App();
                        app.Name         = appfolder.Name;
                        app.Label        = appfolder.Label;
                        app.Path         = appfolder.FolderPath;
                        app.ConfigFolder = appfolder.ConfigFolder;

                        App oldApp = configset.Apps.AppList.Find((App sa) => sa.Name == appfolder.Name);
                        app.Relativepath = oldApp.Relativepath;

                        appList.Add(app);
                    }
                }
                apps.AppList = appList;

                //--ftp站点
                List <Ftp>     ftpList = new List <Ftp>();
                List <Control> ftpsctl = allControl.FindAll((Control ctl) => (ctl is ftpSiteSet));
                if (ftpsctl != null && ftpsctl.Count > 0)
                {
                    foreach (Control ctl in ftpsctl)
                    {
                        ftpSiteSet ftpsiteset = ctl as ftpSiteSet;
                        Ftp        ftp        = new Ftp();
                        ftp.Name     = ftpsiteset.Name;
                        ftp.Label    = ftpsiteset.Label;
                        ftp.Path     = ftpsiteset.FolderPath;
                        ftp.Ip       = ftpsiteset.Ip;
                        ftp.User     = ftpsiteset.User;
                        ftp.Password = ftpsiteset.Password;

                        Ftp oldFtp = configset.Apps.FtpList.Find((Ftp sa) => sa.Name == ftpsiteset.Name);
                        ftp.Relativepath = oldFtp.Relativepath;

                        ftpList.Add(ftp);
                    }
                }
                apps.FtpList = ftpList;

                //--共享目录
                List <Gxml>    gxmlList = new List <Gxml>();
                List <Control> gxmlsctl = allControl.FindAll((Control ctl) => (ctl is gxmlSet));
                if (gxmlsctl != null && gxmlsctl.Count > 0)
                {
                    foreach (Control ctl in gxmlsctl)
                    {
                        gxmlSet gxmlset = ctl as gxmlSet;
                        Gxml    gxml    = new Gxml();
                        gxml.Name     = gxmlset.Name;
                        gxml.Label    = gxmlset.Label;
                        gxml.Path     = gxmlset.FolderPath;
                        gxml.Ip       = gxmlset.Ip;
                        gxml.User     = gxmlset.User;
                        gxml.Password = gxmlset.Password;

                        Gxml oldGxml = configset.Apps.GxmlList.Find((Gxml sa) => sa.Name == gxmlset.Name);
                        gxml.Relativepath = oldGxml.Relativepath;

                        gxmlList.Add(gxml);
                    }
                }
                apps.GxmlList = gxmlList;
                #endregion


                #region 数据
                Control       datasourcectl = allControl.Find((Control ctl) => (ctl is dbSet));
                Control       dataimpctl    = allControl.Find((Control ctl) => (ctl is impdataFolder));
                dbSet         dbset         = datasourcectl as dbSet;
                impdataFolder impdatafolder = dataimpctl as impdataFolder;
                Db            db            = new Db();
                db.Name            = dbset.Name;
                db.Label           = impdatafolder.Label;
                db.Ip              = dbset.Ip;
                db.Datasource      = dbset.Datasource;
                db.Datafolder_type = dbset.DataFolder_type;
                db.Datafolder      = dbset.DataFolder;
                db.Relativepath    = configset.Db.Relativepath;

                Control scs = allControl.Find((Control ctl) => (ctl is sdeCoordinateSystemSet));
                if (scs != null)
                {
                    db.CS_TYPE = ((sdeCoordinateSystemSet)scs).CS_TYPE;
                    db.WKID    = ((sdeCoordinateSystemSet)scs).WKID;
                    db.Prjpath = ((sdeCoordinateSystemSet)scs).Prjpath;
                }
                else
                {
                    db.CS_TYPE = "";
                    db.WKID    = "";
                    db.Prjpath = "";
                }

                db.Impfolder = impdatafolder.FolderPath;

                //-- system用户
                Control         systemuserctl   = allControl.Find((Control ctl) => (ctl is dbSystemuserSet));
                dbSystemuserSet dbsystemuserset = systemuserctl as dbSystemuserSet;
                DbSystemUser    dbsystemuser    = new DbSystemUser();
                dbsystemuser.Name     = dbsystemuserset.Name;
                dbsystemuser.Label    = dbsystemuserset.Label;
                dbsystemuser.User     = dbsystemuserset.User;
                dbsystemuser.Password = dbsystemuserset.Password;

                db.DbSystemUser = dbsystemuser;
                //-- 普通用户
                List <DbUser>  dbuserList = new List <DbUser>();
                List <Control> dbusersctl = allControl.FindAll((Control ctl) => (ctl is dbUserSet));
                if (dbusersctl != null && dbusersctl.Count > 0)
                {
                    foreach (Control ctl in dbusersctl)
                    {
                        dbUserSet dbuserset = ctl as dbUserSet;
                        DbUser    dbuser    = new DbUser();
                        dbuser.Name       = dbuserset.Name;
                        dbuser.Label      = dbuserset.Label;
                        dbuser.Tablespace = dbuserset.Tablespace;
                        dbuser.User       = dbuserset.User;
                        dbuser.Password   = dbuserset.Password;

                        Control   dmpchoosectl = allControl.Find((Control cc) => (cc is dmpChoose) && ((cc as dmpChoose).Name == dbuserset.Name));
                        dmpChoose dmpchoose    = dmpchoosectl as dmpChoose;
                        dbuser.Dmpfile = dmpchoose.FilePath;

                        DbUser oldDbuser = configset.Db.DbUserList.Find((DbUser sa) => sa.Name == dbuserset.Name);
                        dbuser.Relativepath = oldDbuser.Relativepath;

                        dbuserList.Add(dbuser);
                    }
                }
                db.DbUserList = dbuserList;
                //-- sde 用户
                List <DbSdeUser> dbsdeuserList = new List <DbSdeUser>();
                List <Control>   dbsdeusersctl = allControl.FindAll((Control ctl) => (ctl is dbSdeUserSet));
                if (dbsdeusersctl != null && dbsdeusersctl.Count > 0)
                {
                    foreach (Control ctl in dbsdeusersctl)
                    {
                        dbSdeUserSet dbsdeuserset = ctl as dbSdeUserSet;
                        DbSdeUser    dbsdeuser    = new DbSdeUser();
                        dbsdeuser.Name       = dbsdeuserset.Name;
                        dbsdeuser.Label      = dbsdeuserset.Label;
                        dbsdeuser.Tablespace = dbsdeuserset.Tablespace;
                        dbsdeuser.User       = dbsdeuserset.User;
                        dbsdeuser.Password   = dbsdeuserset.Password;
                        Control   gdbchoosectl = allControl.Find((Control cc) => (cc is gdbChoose) && ((cc as gdbChoose).Name == dbsdeuserset.Name));
                        gdbChoose gdbchoose    = gdbchoosectl as gdbChoose;
                        dbsdeuser.Gdbfile = gdbchoose.FolderPath;

                        DbSdeUser oldDbsdeuser = configset.Db.DbSdeUserList.Find((DbSdeUser sa) => sa.Name == dbsdeuserset.Name);
                        dbsdeuser.Relativepath = oldDbsdeuser.Relativepath;

                        dbsdeuserList.Add(dbsdeuser);
                    }
                }
                db.DbSdeUserList = dbsdeuserList;
                #endregion
                #region 参数
                Pars           pars    = new Pars();
                List <Par>     parList = new List <Par>();
                List <Control> parsctl = allControl.FindAll((Control ctl) => (ctl is parSet));
                if (parsctl != null && parsctl.Count > 0)
                {
                    foreach (Control ctl in parsctl)
                    {
                        parSet parset = ctl as parSet;
                        Par    par    = new Par();
                        par.Key   = parset.Key;
                        par.Label = parset.Label;
                        par.Value = parset.Value;

                        parList.Add(par);
                    }
                }
                pars.ParList = parList;
                #endregion

                #region 工具
                Definebtns definebtns = new Definebtns();


                List <Btn>     btnList = new List <Btn>();
                List <Control> btnsctl = allControl.FindAll((Control ctl) => (ctl is btnSet));
                if (btnsctl != null && btnsctl.Count > 0)
                {
                    foreach (Control ctl in btnsctl)
                    {
                        btnSet btnset = ctl as btnSet;
                        Btn    btn    = new Btn();
                        btn = btnset.btn;
                        btnList.Add(btn);
                    }
                }

                definebtns.BtnList = btnList;



                #endregion


                #region 备份
                Backup           backup              = new Backup();
                Control          backupfolderctl     = allControl.Find((Control ctl) => (ctl is backupFolder));
                backupFolder     backupfolder        = backupfolderctl as backupFolder;
                Control          backupcontentsetctl = allControl.Find((Control ctl) => (ctl is backupContentSet));
                backupContentSet backupcontentset    = backupcontentsetctl as backupContentSet;
                Control          backupsetctl        = allControl.Find((Control ctl) => (ctl is backupSet));
                backupSet        backupset           = backupsetctl as backupSet;

                backup.Name           = backupfolder.Name;
                backup.Label          = backupfolder.Label;
                backup.Content        = backupcontentset.BackupContent;
                backup.Path           = backupfolder.BackupFolderPath;
                backup.Type           = backupset.Type;
                backup.Type_daytime   = backupset.Type_daytime;
                backup.Type_week      = backupset.Type_week;
                backup.Type_weektime  = backupset.Type_weektime;
                backup.Type_month     = backupset.Type_month;
                backup.Type_monthtime = backupset.Type_monthtime;


                #endregion


                //保存成Set
                configset.Apps       = apps;
                configset.Db         = db;
                configset.Pars       = pars;
                configset.Definebtns = definebtns;
                configset.Backup     = backup;
                saveConfig();

                setMessage.MessageShow("", "保存成功!", this.btnSaveConfig);
            }
        }
Example #7
0
        public void FORM_03_Load(object sender, EventArgs e)
        {
            this.FormBorderStyle = FormBorderStyle.FixedSingle;
            ClientSize           = new Size(750, 430);
            ct                 = new _Create();
            BackColor          = Color.FromArgb(191, 191, 191);
            this.StartPosition = FormStartPosition.Manual;

            //날짜라벨
            lbSet pn1_lb5 = new lbSet(this, "pn1_lb5", "//날짜", 250, 30, 5, 240, 15);

            날짜           = ct.lable(pn1_lb5);
            날짜.TextAlign = ContentAlignment.MiddleCenter;
            날짜.Font      = new Font("Tahoma", 15, FontStyle.Bold);
            날짜.ForeColor = Color.White;
            Controls.Add(날짜);

            //시간라벨
            lbSet pn1_lb6 = new lbSet(this, "pn1_lb6", "//시간", 170, 30, 45, 270, 15);

            시간           = ct.lable(pn1_lb6);
            시간.TextAlign = ContentAlignment.MiddleCenter;
            시간.Font      = new Font("Tahoma", 15, FontStyle.Bold);
            시간.ForeColor = Color.White;
            Controls.Add(시간);

            PictureBox mojave = new PictureBox();

            mojave.Image     = (Bitmap)PosSystem.Properties.Resources.ResourceManager.GetObject("모자브포스3");
            mojave.SizeMode  = PictureBoxSizeMode.StretchImage;
            mojave.Size      = new Size(250, 110);
            mojave.BackColor = Color.FromArgb(19, 38, 78);
            mojave.Location  = new Point(0, 0);
            Controls.Add(mojave);

            //패널
            pnSet pn1 = new pnSet(this, 250, 350, 0, 0);
            Panel 패널1 = ct.panel(pn1);

            패널1.BackColor = Color.FromArgb(19, 38, 78);
            Controls.Add(패널1);   //패널 화면 출력
            패널1.Controls.Add(날짜);
            패널1.Controls.Add(시간);
            패널1.Controls.Add(mojave);
            //그림넣기
            //분기매출액 표현하기

            ArrayList arr = new ArrayList();

            arr.Add(new lbSet(this, "label1", "오늘매출액", 100, 25, 70, 140, 10));
            arr.Add(new lbSet(this, "label1_1", " ", 100, 25, 60, 170, 10));
            arr.Add(new lbSet(this, "label1_2", "원", 20, 25, 160, 170, 10));
            // arr.Add(new lbSet(this, "pn1_lb2", "분기 매출액", 110, 25, 70, 140, 10));
            // arr.Add(new lbSet(this, "pn1_lb2_0", "2", 20, 25, 58, 140, 10));
            // arr.Add(new lbSet(this, "pn1_lb2_1", "10,000,000", 100, 25, 60, 170, 10));
            // arr.Add(new lbSet(this, "pn1_lb2_2", "원", 20, 25, 160, 170, 10));

            for (int i = 0; i < arr.Count; i++)
            {
                if (typeof(lbSet) == arr[i].GetType())
                {
                    Label label = ct.lable((lbSet)arr[i]);

                    if (i == 1)
                    {
                        api = new Module();
                        string total_money = api.getIdPass("http://192.168.3.28:5000/F3_total_day");

                        if (total_money == null)
                        {
                            label.Text = "0";
                        }
                        else
                        {
                            label.Text = total_money;
                        }
                    }
                    label.TextAlign = ContentAlignment.MiddleCenter;
                    label.ForeColor = Color.White;
                    label.Font      = new Font("Tahoma", 10, FontStyle.Bold);
                    패널1.Controls.Add(label);
                }
            }
            //영업시작 파트
            //영업시작 버튼
            btnSet pn2_btn_1 = new btnSet(this, "pn2_btn_1", " ", 80, 80, 50, 30, btn_Click);
            Button 영업시작버튼    = ct.btn(pn2_btn_1);

            영업시작버튼.Font = new Font("Tahoma", 10, FontStyle.Bold);
            //영업시작버튼.BackgroundImage = PosSystem.Properties.Resources.자물쇠잠김;
            영업시작버튼.BackColor = Color.FromArgb(232, 227, 227);
            영업시작버튼.FlatStyle = FlatStyle.Flat;
            영업시작버튼.FlatAppearance.BorderSize = 0;
            Controls.Add(영업시작버튼);

            //영업시작 라벨
            lbSet pn2_lb1 = new lbSet(this, "pn2_lb1", lbText3, 130, 30, 30, 120, 20);

            영업시작           = ct.lable(pn2_lb1);
            영업시작.TextAlign = ContentAlignment.MiddleCenter;
            영업시작.Font      = new Font("Tahoma", 20, FontStyle.Bold);

            Controls.Add(영업시작);


            //영업시작 패널
            pnSet pn2 = new pnSet(this, 180, 220, 300, 70);
            Panel 패널2 = ct.panel(pn2);

            패널2.BackColor = Color.FromArgb(232, 227, 227);
            Controls.Add(패널2);   //패널 화면 출력
            패널2.Controls.Add(영업시작버튼);
            패널2.Controls.Add(영업시작);

            //관리자 시작 파트
            //관리자 버튼
            btnSet pn3_btn_1 = new btnSet(this, "pn3_btn_1", " ", 80, 80, 50, 30, btn1_Click);
            Button 관리자버튼     = ct.btn(pn3_btn_1);

            관리자버튼.Font      = new Font("Tahoma", 10, FontStyle.Bold);
            관리자버튼.BackColor = Color.FromArgb(232, 227, 227);
            관리자버튼.FlatStyle = FlatStyle.Flat;
            관리자버튼.FlatAppearance.BorderSize = 0;
            //관리자버튼.BackgroundImage = PosSystem.Properties.Resources.가방수정;


            Controls.Add(관리자버튼);

            //관리자 라벨
            lbSet pn3_lb1 = new lbSet(this, "pn3_lb1", "관리자", 100, 35, 45, 120, 20);
            Label 관리자     = ct.lable(pn3_lb1);

            관리자.Font       = new Font("Tahoma", 20, FontStyle.Bold);
            영업시작.TextAlign = ContentAlignment.MiddleCenter;
            Controls.Add(관리자);

            //관리자 패널
            pnSet pn3 = new pnSet(this, 180, 220, 520, 70);
            Panel 패널3 = ct.panel(pn3);

            패널3.BackColor = Color.FromArgb(232, 227, 227);
            Controls.Add(패널3);   //패널 화면 출력
            패널3.Controls.Add(관리자버튼);
            패널3.Controls.Add(관리자);

            a = pn4_lb;
            //경고문 라벨
            pn4_lb        = new lbSet(this, "label2", lbText1, 750, 30, 0, 12, 15);
            경고문           = ct.lable(pn4_lb);
            경고문.Font      = new Font("Tahoma", 15, FontStyle.Bold);
            경고문.TextAlign = ContentAlignment.MiddleCenter;
            Controls.Add(경고문);

            //하단부 패널
            pnSet pn4 = new pnSet(this, 750, 50, 0, 380);
            Panel 패널4 = ct.panel(pn4);

            패널4.BackColor = Color.FromArgb(232, 227, 227);
            패널4.Font      = new Font("Tahoma", 20, FontStyle.Bold);
            Controls.Add(패널4);
            패널4.Controls.Add(경고문);

            Control_Init();
        }
Example #8
0
        private void MenuForm_Load(object sender, EventArgs e)
        {
            ClientSize = new Size(1200, 800);

            lvSet lv1 = new lvSet(this, "lv1", 300, 265, 170, 230, lv_mouseClick);

            listview      = ct.listview(lv1);
            listview.Font = new Font("Tahoma", 20, FontStyle.Bold);
            listview.Items.Clear();
            listview.HeaderStyle = System.Windows.Forms.ColumnHeaderStyle.None;
            listview.Columns.Add(" ", 0, HorizontalAlignment.Center);
            listview.Columns.Add(" ", 296, HorizontalAlignment.Center);
            Controls.Add(listview);
            api = new Module();
            api.selectListView("http://192.168.3.15:5000/mc_select", listview);


            lvSet lv2 = new lvSet(this, "lv2", 350, 500, 625, 230, lv2_mouseClick);

            listview2      = ct.listview(lv2);
            listview2.Font = new Font("Tahoma", 15, FontStyle.Bold);
            listview2.Columns.Add("", 0, HorizontalAlignment.Center);
            listview2.Columns.Add("메뉴명", 200, HorizontalAlignment.Center);
            listview2.Columns.Add("가격", 150, HorizontalAlignment.Center);

            //listview2.Columns.Add("변경/삭제", 100, HorizontalAlignment.Center);

            btnSet btn1_1 = new btnSet(this, "btn_1_1", "--", 30, 30, 370, 170, btn3_Click);

            수정버튼 = ct.btn(btn1_1);
            Controls.Add(수정버튼);

            btnSet btn2_1 = new btnSet(this, "btn_2_1", "--", 30, 30, 840, 170, btn4_Click);

            수정버튼2 = ct.btn(btn2_1);
            Controls.Add(수정버튼2);

            pnSet pn3 = new pnSet(this, 950, 2, 100, 218);

            line = ct.panel(pn3);
            Controls.Add(line);

            pnSet pn2 = new pnSet(this, 1200, 800, 0, 0);

            bottom = ct.panel(pn2); // 패널이름 : bottom
            Controls.Add(bottom);
            bottom.Controls.Add(listview);
            bottom.Controls.Add(listview2);
            bottom.Controls.Add(수정버튼);
            bottom.Controls.Add(수정버튼2);

            ArrayList arr = new ArrayList();

            arr.Add(new lbSet(this, "lb1", "Category", 250, 60, 200, 100, 35));
            arr.Add(new btnSet(this, "btn_1", "", 30, 30, 330, 170, btn_Click));

            arr.Add(new pictureBoxSet(this, 40, 40, 280, 165, " "));
            arr.Add(new lbSet(this, "lb2", "Menu", 200, 50, 710, 100, 35));
            arr.Add(new btnSet(this, "btn_2", "", 30, 30, 800, 170, btn2_Click));
            arr.Add(new pictureBoxSet(this, 40, 40, 750, 165, " "));

            for (int i = 0; i < arr.Count; i++)
            {
                if (typeof(lbSet) == arr[i].GetType())
                {
                    Label label = ct.lable((lbSet)arr[i]);
                    label.Font      = new Font("Tahoma", 35, FontStyle.Bold);
                    label.BackColor = System.Drawing.Color.Transparent;
                    bottom.Controls.Add(label);
                }
                else if (typeof(btnSet) == arr[i].GetType())
                {
                    button      = ct.btn((btnSet)arr[i]);
                    button.Font = new Font("Tahoma", 10, FontStyle.Bold);
                    //button.BackgroundImage = PosSystem.Properties.Resources.버튼;
                    bottom.Controls.Add(button);
                }
                //else if (typeof(pictureBoxSet) == arr[i].GetType())
                //{
                //    PictureBox picuturebox = ct.picture((pictureBoxSet)arr[i]);
                //    //picuturebox.BackgroundImage = PosSystem.Properties.Resources.coo1;
                //    bottom.Controls.Add(picuturebox);
                //}
            }

            //bottom.BackColor = Color.BurlyWood;
            bottom.BackgroundImage = (Bitmap)PosSystem.Properties.Resources.ResourceManager.GetObject("배경화면1");
        }