Beispiel #1
0
        //Next button
        private void button1_Click(object sender, EventArgs e)
        {
            double fee = 0;

            ResultPanel.Visible = false;

            if (checkBox1.Checked)
            {
                MoesPanel.Visible       = true;
                this.MoesTitle.Location = new System.Drawing.Point(230, 10);
                MoesTitle.Text          = "MOE'S";
                fee = 3.0;
            }
            else if (checkBox2.Checked)
            {
                MoesPanel.Visible       = true;
                this.MoesTitle.Location = new System.Drawing.Point(210, 10);
                MoesTitle.Text          = "CHINESE";
                fee = 3.0;
            }
            else if (checkBox3.Checked)
            {
                MoesPanel.Visible       = true;
                this.MoesTitle.Location = new System.Drawing.Point(200, 10);
                MoesTitle.Text          = "SONNY && TONY'S";
                fee = 2.5;
            }
            else if (checkBox4.Checked)
            {
                MoesPanel.Visible       = true;
                this.MoesTitle.Location = new System.Drawing.Point(190, 10);
                MoesTitle.Text          = "CHICKEN && RIB CRIB";
                fee = 2.0;
            }
            else if (checkBox5.Checked)
            {
                MoesPanel.Visible = true;
                MoesTitle.Text    = " ";
            }
            else
            {
                showError("Check a box!");
                return;
            }

            tipBox.Text = "20";
            delBox.Text = Convert.ToString(fee);

            //Always empty the boxes when clicking next
            Name1.Clear();  price1.Clear();
            Name2.Clear();  price2.Clear();
            Name3.Clear();  price3.Clear();
            Name4.Clear();  price4.Clear();
            Name5.Clear();  price5.Clear();
            Name6.Clear();  price6.Clear();
            Name7.Clear();  price7.Clear();
            Name8.Clear();  price8.Clear();
            Name9.Clear();  price9.Clear();
            Name10.Clear(); price10.Clear();
        }
Beispiel #2
0
 private void Name1_Enter(object sender, EventArgs e)
 {
     Name1.Clear();
     Name1.ForeColor = Color.Black;
 }