Exemplo n.º 1
0
 public CustomerSide(FormData formData, SetUpForm setUpForm)
 {
     InitializeComponent();
     _setUpForm = setUpForm;
     _customerForm.ReadFile(_formData);
     this._formData = formData;
     #region Meal Button init
     #region Create Button List
     for (int i = 0; i < _customerForm.ReadFile(_formData).Count; i++)
     {
         _mealButtonList.Add(new Button());
         _mealGroupBox.Controls.Add(_mealButtonList[i]);
         _mealButtonList[i].Text      = _customerForm.SetMealButtonText(i, _formData);
         _mealButtonList[i].Size      = new Size(Constant.BUTTON_SIZE, Constant.BUTTON_SIZE);
         _mealButtonList[i].Name      = i.ToString();
         _mealButtonList[i].Click    += new EventHandler(this.MealButtonClick);
         _mealButtonList[i].Image     = System.Drawing.Image.FromFile(@"..\..\..\img\MealButtonImg\" + i + Constant.GET_PICTURE);
         _mealButtonList[i].TextAlign = ContentAlignment.BottomLeft;
         _mealButtonList[i].ForeColor = Color.White;
     }
     MealButtonOption mealButtonOption = new MealButtonOption();
     SetMealButtonLocation(_customerForm.ReadFile(_formData));
     #endregion
     SetMealButtonOption();
     SetPageButtonEnable();
     SetPageButtonEnable();
     #endregion
     _pageLabel.Text  = _customerForm.SetPageLabelText(_formData.nowPage, _formData.totalPage);
     _totalLabel.Text = _customerForm.SetTotalPriceLabel(_formData);
     //this.FormClosing();
 }
Exemplo n.º 2
0
        private void SetUpButton_Click(object sender, EventArgs e)
        {
            //create setup form
            SetUpForm form = new SetUpForm();

            //show the form
            form.Show();
        }