Esempio n. 1
0
        void Consume(Consume c)
        {
            Extra extra = new Extra();

            extra = extra1;

            extra1.calculate1.textBox1.Text = c.InstantNoodle.ToString();
            extra1.calculate2.textBox1.Text = c.CoCaCola.ToString();
            extra1.calculate3.textBox1.Text = c.Lavie.ToString();
            extra1.calculate4.textBox1.Text = c.ExtraBed.ToString();
            extra1.calculate5.textBox1.Text = c.Snack.ToString();
        }
        private void button4_Click(object sender, EventArgs e)
        {
            Extra extra = null;

            foreach (Control c in this.Parent.Controls)
            {
                extra = c as Extra;
                if (extra != null)
                {
                    break;
                }
            }

            if (extra != null)
            {
                extra.Visible = true;
            }
        }