Beispiel #1
0
        public void LoadFood()
        {
            take_out_foodForm form = new take_out_foodForm();
            Button            btn  = (Button)form.Controls.Find("btn_order");

            btn.Text    = "去结算";
            btn.Enabled = true;
        }
Beispiel #2
0
 //减少
 private void button1_Press(object sender, EventArgs e)
 {
     if (textBox1.Text.Equals("") || textBox1.Text.Equals("1"))
     {
         btndes.Enabled = false;
     }
     else
     {
         btndes.Enabled = true;
         textBox1.Text  = (int.Parse(textBox1.Text) - 1).ToString();
         take_out_foodForm form = new take_out_foodForm();
         form.Controls.Find("btn_order");
     }
 }
Beispiel #3
0
 //添加
 private void button2_Press(object sender, EventArgs e)
 {
     if (textBox1.Text == "")
     {
         textBox1.Text = "1";
     }
     else
     {
         btndes.Enabled = true;
         textBox1.Text  = (int.Parse(textBox1.Text) + 1).ToString();
         take_out_foodForm form = new take_out_foodForm();
         Button            btn  = (Button)form.Controls.Find("btn_order");
         btn.Text       = "去支付";
         form.FoodType += LoadFood;
     }
 }
Beispiel #4
0
        private void imageButton1_Press(object sender, EventArgs e)
        {
            take_out_foodForm from = new take_out_foodForm();

            Show(from);
        }