Example #1
0
        public Ov()
        {
            InitializeComponent();
            Oven ov = new Oven();

            listBoxOven.Items.Add(ov.pop() + "  Cup popcorn kernels");
            listBoxOven.Items.Add(ov.salt() + "  Teaspoon kosher salt");
            listBoxOven.Items.Add(ov.butter() + "  Tablespoons unsalted butter");
            listBoxOven.Items.Add(ov.cheesef() + "  Tablespoons cheese flavour");
            listBoxOven.Items.Add(ov.degree() + "  Degrees Fahrenheit");
        }
Example #2
0
        public void oven()
        {
            int num;

            if (int.TryParse(numPeople.Text, out num))
            {
                double popcorn = num * 0.25;
                double butter  = num * 2;
                double salt    = num * 0.75;
                double chessef = num * 1;
                int    degree  = 450;

                Oven mic = new Oven(popcorn, butter, salt, chessef, degree);

                this.Hide();
                Ov f4 = new Ov();
                f4.ShowDialog();
            }
            else
            {
                MessageBox.Show("Must be a number", "Error",
                                MessageBoxButtons.OK, MessageBoxIcon.Hand);
            }
        }