Exemple #1
0
        private void getView()
        {
            api             = new WebAPI();
            Program.maxoNum = api.MaxoNum(Program.serverUrl + "orderlist/selectMaxoNum");
            //=====panel 선언부분========head,menus,bottom
            hashtable = new Hashtable();
            hashtable.Add("type", "");
            hashtable.Add("size", new Size(900, 100));
            hashtable.Add("point", new Point(0, 0));
            hashtable.Add("color", Color.LightYellow);
            hashtable.Add("name", "head");
            head = draw.getPanel(hashtable, parentForm);

            hashtable = new Hashtable();
            hashtable.Add("size", new Size(785, 500));
            hashtable.Add("point", new Point(0, 100));
            hashtable.Add("color", Color.White);
            hashtable.Add("name", "menus");
            menu = draw.getPanel(hashtable, parentForm);

            hashtable = new Hashtable();
            hashtable.Add("size", new Size(900, 300));
            hashtable.Add("point", new Point(0, 600));
            hashtable.Add("color", Color.LightYellow);
            hashtable.Add("name", "bottom");
            bottom = draw.getPanel(hashtable, parentForm);

            //=========head패널에 버튼부분==============
            hashtable = new Hashtable();
            hashtable.Add("size", new Size(160, 100));
            hashtable.Add("color", Color.LightGray);
            hashtable.Add("click", (EventHandler)btn_click);
            hashtable.Add("font", new Font("맑은 고딕", 15, FontStyle.Regular));
            api = new WebAPI();
            ArrayList buttonlist = api.CategoryButton(Program.serverUrl + "category/select", hashtable);

            for (int i = 0; i < buttonlist.Count; i++)
            {
                Hashtable ht = (Hashtable)buttonlist[i];
                switch (i)
                {
                case 0:

                    btn1 = draw.getButton1(ht, head);
                    break;

                case 1:
                    btn2 = draw.getButton1(ht, head);
                    break;

                case 2:
                    btn3 = draw.getButton1(ht, head);
                    break;

                case 3:
                    btn4 = draw.getButton1(ht, head);
                    break;

                default: break;
                }
            }
            //============== bottom패널에 리스트뷰와 버튼================
            hashtable = new Hashtable();
            hashtable.Add("color", Color.White);
            hashtable.Add("name", "listView");
            hashtable.Add("point", new Point(5, 5));
            hashtable.Add("size", new Size(600, 220));
            hashtable.Add("click", (MouseEventHandler)listView_click);
            lv = draw.getListView1(hashtable, bottom);
            lv.Columns.Add("", 0, HorizontalAlignment.Center);
            lv.Columns.Add("메뉴이름", 160, HorizontalAlignment.Center);
            lv.Columns.Add("샷추가", 70, HorizontalAlignment.Center);
            lv.Columns.Add("휘핑", 90, HorizontalAlignment.Center);
            lv.Columns.Add("단가", 80, HorizontalAlignment.Center);
            lv.Columns.Add("수량", 70, HorizontalAlignment.Center);
            lv.Columns.Add("금액", 125, HorizontalAlignment.Center);
            lv.Columns.Add("주문번호", 0, HorizontalAlignment.Center);
            lv.HeaderStyle          = ColumnHeaderStyle.Nonclickable;
            lv.ColumnWidthChanging += ListView_ColumnWidthChanging;
            api = new WebAPI();
            api.ListView(Program.serverUrl + "orderlist/select", lv);

            hashtable = new Hashtable();
            hashtable.Add("text", "");
            hashtable.Add("width", 610);
            hashtable.Add("point", new Point(0, 220));
            //hashtable.Add("point", new Point(410, 222));
            hashtable.Add("name", "totalprice");
            hashtable.Add("font", new Font("맑은 고딕", 17, FontStyle.Bold));
            label        = draw.getLabel1(hashtable, bottom);
            label.Height = 30;

            hashtable = new Hashtable();
            hashtable.Add("size", new Size(150, 60));
            hashtable.Add("point", new Point(620, 20));
            hashtable.Add("color", Color.LightGray);
            hashtable.Add("name", "btn11");
            hashtable.Add("text", "선택삭제");
            hashtable.Add("click", (EventHandler)btn11_click);
            hashtable.Add("font", new Font("맑은고딕", 15, FontStyle.Regular));
            btn11 = draw.getButton1(hashtable, bottom);

            hashtable = new Hashtable();
            hashtable.Add("size", new Size(150, 60));
            hashtable.Add("point", new Point(620, 100));
            hashtable.Add("color", Color.LightGray);
            hashtable.Add("name", "btn12");
            hashtable.Add("text", "전체삭제");
            hashtable.Add("click", (EventHandler)btn12_click);
            hashtable.Add("font", new Font("맑은고딕", 15, FontStyle.Regular));
            btn12 = draw.getButton1(hashtable, bottom);

            hashtable = new Hashtable();
            hashtable.Add("size", new Size(150, 60));
            hashtable.Add("point", new Point(620, 180));
            hashtable.Add("color", Color.LightGray);
            hashtable.Add("name", "btn13");
            hashtable.Add("text", "주문결제");
            hashtable.Add("click", (EventHandler)btn13_click);
            hashtable.Add("font", new Font("맑은고딕", 15, FontStyle.Regular));
            btn13 = draw.getButton1(hashtable, bottom);

            btn1.BackColor = Color.White;
            // form 초기화
            if (tagetForm != null)
            {
                tagetForm.Dispose();
            }
            // form 호출
            tagetForm = draw.getMdiForm(parentForm, new MenuForm(parentForm, menuclick, this), menu);
            tagetForm.Show();
            OrderlistLoad();
        }