コード例 #1
0
        private void btnHMexa_Click(object sender, EventArgs e)
        {
            var foodservice = new iFood[]
            {
                new Hamburmexa(),
            };


            var organizador = new FoodOrganizador();
            var contador    = new FoodContador();

            foreach (var food in foodservice)
            {
                food.Aceptar(organizador);
                food.Aceptar(contador);
            }

            lblTotal3.Text = contador.total.ToString();

            BILL frm = new BILL(lblTotal3.Text);

            int count3 = int.Parse(lblDisplay3.Text);

            count3++;
            lblDisplay3.Text = count3.ToString();
        }
コード例 #2
0
        private void labelCloseR_Click(object sender, EventArgs e)
        {
            BILL frm = (BILL)this.Owner;

            frm.total2.Text = lblPersonalizado2.Text;
            this.Close();
        }
コード例 #3
0
        private void btnTot_Click(object sender, EventArgs e)
        {
            this.Hide();
            BILL frm = new BILL();

            frm.total1.Text = lblTotal.Text;
            frm.total2.Text = lblTotal2.Text;
            frm.total3.Text = lblTotal3.Text;
            frm.total4.Text = lblTotal4.Text;

            frm.cant1.Text = lblDisplay.Text;
            frm.cant2.Text = lblDisplay2.Text;
            frm.cant3.Text = lblDisplay3.Text;
            frm.cant4.Text = lblDisplay4.Text;

            if (lblTotal.Text != string.Empty)
            {
                frm.preciou1.Text = precio1.Text;
            }


            if (lblTotal2.Text != String.Empty)
            {
                frm.preciou2.Text = precio2.Text;
            }

            if (lblTotal3.Text != String.Empty)
            {
                frm.preciou3.Text = precio3.Text;
            }

            if (lblTotal4.Text != String.Empty)
            {
                frm.preciou4.Text = precio4.Text;
            }



            frm.Show();
        }