Beispiel #1
0
        // ---------------------------------------------------------------------
        // Constructor for Order Form
        // Sets several variables that allow the menu to generate for most
        // screen resolutions.
        // ---------------------------------------------------------------------
        public OrderForm()
        {
            InitializeComponent();
            Rectangle screen = Screen.PrimaryScreen.WorkingArea;
            int       w      = screen.Width;
            int       h      = screen.Height;

            this.Location = new Point((screen.Width - w) / HALF, (screen.Height - h) / HALF);
            this.Size     = new Size(w, h);
            centerY       = this.Height / HALF;
            centerX       = this.Width / HALF;
            buttonX       = (int)(this.Width * FIFTEEN_PERCENT);
            buttonY       = (int)(this.Height * FIFTEEN_PERCENT);
            smallX        = (int)(this.Width * TEN_PERCENT);
            smallY        = (int)(this.Height * TEN_PERCENT);
            spacingY      = (int)(this.Height * FIVE_PERCENT);
            spacingX      = (int)(this.Width * FIVE_PERCENT);
            scaling();
            itemList        = new List <string>();
            orderController = new OrderController();
            itemList        = orderController.getMenuItemNames();
            orderController.createNewOrder();
            load_views();
            load_categories();
            load_items();
            load_options();
            lstVw_cartSummary.Items.Clear();
            txtbox_description.Location = new Point(categoryGrpBxList[0].Right - txtbox_description.Width, pnl_summary.Top - txtbox_description.Height);
            updateSubTotal(0.0f);
        }
Beispiel #2
0
 public OrderForm()
 {
     InitializeComponent();
     itemList        = new List <string>();
     orderController = new OrderController();
     itemList        = orderController.getMenuItemNames();
     orderController.createNewOrder();
     load_views();
     load_categories();
     load_items();
     lstVw_cartSummary.Items.Clear();
     txtbox_description.Location = new Point(categoryList[0].Right, pnl_summary.Bottom);
     updateSubTotal(0.0f);
 }
 public OrderForm()
 {
     InitializeComponent();
     centerY = this.Height / 2;
     centerX = this.Width / 2;
     buttonX = (int)(this.Width * .20);
     buttonY = (int)(this.Height * .15);
     smallX  = (int)(this.Width * .10);
     smallY  = (int)(this.Height * .10);
     scaling();
     itemList        = new List <string>();
     orderController = new OrderController();
     itemList        = orderController.getMenuItemNames();
     orderController.createNewOrder();
     load_views();
     load_categories();
     load_items();
     load_options();
     lstVw_cartSummary.Items.Clear();
     txtbox_Item.Location        = new Point(categoryGrpBxList[0].Left, pnl_summary.Top - txtbox_Item.Height);
     txtbox_description.Location = new Point(categoryGrpBxList[0].Right - txtbox_description.Width, pnl_summary.Top - txtbox_description.Height);
     updateSubTotal(0.0f);
     // categoryBtnBox.FlatStyle = FlatStyle.Popup;
 }