[ PIZZA HUT ]
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace test_4
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void label7_MouseMove(object sender, MouseEventArgs e)
{
label7.ForeColor = System.Drawing.Color.Black;
label9.ForeColor = System.Drawing.Color.White;
WINGS.ForeColor = System.Drawing.Color.White;
BREAD.ForeColor = System.Drawing.Color.White;
}
private void label11_MouseMove(object sender, MouseEventArgs e)
{
label7.ForeColor = System.Drawing.Color.White;
label9.ForeColor = System.Drawing.Color.White;
WINGS.ForeColor = System.Drawing.Color.White;
BREAD.ForeColor = System.Drawing.Color.Black;
}
private void label10_MouseMove(object sender, MouseEventArgs e)
{
label7.ForeColor = System.Drawing.Color.White;
label9.ForeColor = System.Drawing.Color.White;
WINGS.ForeColor = System.Drawing.Color.Black;
BREAD.ForeColor = System.Drawing.Color.White;
}
private void label9_MouseMove(object sender, MouseEventArgs e)
{
label7.ForeColor = System.Drawing.Color.White;
label9.ForeColor = System.Drawing.Color.Black;
WINGS.ForeColor = System.Drawing.Color.White;
BREAD.ForeColor = System.Drawing.Color.White;
}
private void Form3_MouseMove(object sender, MouseEventArgs e)
{
label7.ForeColor = System.Drawing.Color.White;
label9.ForeColor = System.Drawing.Color.White;
WINGS.ForeColor = System.Drawing.Color.White;
BREAD.ForeColor = System.Drawing.Color.White;
}
private void textBox1_TextChanged(object sender, EventArgs e)
{try{
float tea = 25, totaltea=0, vat = 0.04f, pam=0, a=0, afvat=0, cofee = 35, b=0, totalcost=0, totalcofee=0, coldcofee=55;
if (textBox1.Text == "")
{
teaprice.Text = "0.0";
total_cost.Text = "0.0";
checkBox1.Enabled = false;
checkBox1.Checked = false;
if (textBox2.Text != "" && checkBox2.Checked == true)
{
b = int.Parse(textBox2.Text);
totalcofee = b * coldcofee;
afvat = totalcofee * vat;
pam = totalcofee + afvat;
vatt.Text = afvat.ToString();
payableamount.Text = pam.ToString();
teaprice.Text = "0.0";
total_cost.Text = "0.0";
checkBox1.Enabled = false;
checkBox1.Checked = false;
}
if (textBox2.Text == "" && checkBox2.Checked == false)
{
teaprice.Text = "0.0";
cofeeprice.Text = "0.0";
total_cost.Text = "0.0";
vatt.Text = "0.0";
payableamount.Text = "0.0";
mop.Enabled = false;
print.Enabled = false;
refresh.Enabled = false;
}
if (textBox2.Text != "" && checkBox2.Checked == false)
{
b = int.Parse(textBox2.Text);
totalcofee = b * cofee;
afvat = totalcofee * vat;
pam = totalcofee + afvat;
vatt.Text = afvat.ToString();
payableamount.Text = pam.ToString();
teaprice.Text = "0.0";
total_cost.Text = "0.0";
checkBox1.Enabled = false;
checkBox1.Checked = false;
}
}
else
{
int order = int.Parse(textBox1.Text);
if (order > 20)
{
int Result = 0;
Result = (int)MessageBox.Show("You Have Reached The Maximum Value Of Order. Reorder ?", "20 Cup At A time!", MessageBoxButtons.YesNo, MessageBoxIcon.Information);
if (Result == (int)DialogResult.Yes)
{
textBox1.Text = "";
}
else
{
MessageBox.Show("Taking The Maximum Order", "Order 20 Cup");
textBox1.Text = "20";
}
}
else
{
if (checkBox1.Checked == false && textBox1.Text != "" && textBox2.Text != "" && checkBox2.Checked == true)
{
a = float.Parse(textBox1.Text);
b = float.Parse(textBox2.Text);
totaltea = tea * a;
afvat = totaltea * vat;
pam = totaltea + afvat;
totalcofee = b * coldcofee;
totalcost = totaltea + totalcofee;
afvat = totalcost * vat;
pam = afvat + totalcost;
teaprice.Text = totaltea.ToString();
cofeeprice.Text = totalcofee.ToString();
total_cost.Text = totalcost.ToString();
vatt.Text = afvat.ToString();
payableamount.Text = pam.ToString();
}
if (textBox1.Text == "" && textBox2.Text == "" && checkBox1.Checked == false && checkBox2.Checked == false)
{
teaprice.Text = "0.0";
cofeeprice.Text = "0.0";
total_cost.Text = "0.0";
vatt.Text = "0.0";
payableamount.Text = "0.0";
}
if (textBox1.Text != "" && textBox2.Text == "" && checkBox1.Checked == false && checkBox2.Checked == false)
{
a = float.Parse(textBox1.Text);
totaltea = tea * a;
afvat = totaltea * vat;
pam = totaltea + afvat;
teaprice.Text = totaltea.ToString();
vatt.Text = afvat.ToString();
payableamount.Text = pam.ToString();
// timer1.Enabled = true;
}
if (textBox1.Text != "" && textBox2.Text != "" && checkBox1.Checked == false && checkBox2.Checked == false)
{
a = float.Parse(textBox1.Text);
b = float.Parse(textBox2.Text);
totaltea = tea * a;
afvat = totaltea * vat;
pam = totaltea + afvat;
totalcofee = b * cofee;
totalcost = totaltea + totalcofee;
afvat = totalcost * vat;
pam = afvat + totalcost;
teaprice.Text = totaltea.ToString();
cofeeprice.Text = totalcofee.ToString();
total_cost.Text = totalcost.ToString();
vatt.Text = afvat.ToString();
payableamount.Text = pam.ToString();
}
if (textBox1.Text == "" && textBox2.Text != "" && checkBox1.Checked == false && checkBox2.Checked == false)
{
b = float.Parse(textBox2.Text);
totalcofee = b * cofee;
afvat = totalcofee * vat;
pam = totalcofee + afvat;
cofeeprice.Text = totalcofee.ToString();
vatt.Text = afvat.ToString();
payableamount.Text = pam.ToString();
teaprice.Text = "0.0";
total_cost.Text = "0.0";
}
if (textBox1.Text != "")
{
checkBox1.Enabled = true;
mop.Enabled = true;
refresh.Enabled = true;
print.Enabled = true;
}
else
{
checkBox1.Checked = false;
checkBox1.Enabled = false;
mop.Enabled = false;
refresh.Enabled = false;
print.Enabled = false;
}
}
}
}
catch
{MessageBox.Show("Please check number Entered");
}
}
private void textBox2_TextChanged(object sender, EventArgs e)
{try{
float tea = 25, totaltea=0, vat = 0.04f, pam=0, a, afvat=0, cofee = 35, b, totalcost=0, totalcofee=0,wtea=40;
if (textBox2.Text == "")
{
cofeeprice.Text = "0.0";
total_cost.Text = "0.0";
checkBox2.Enabled = false;
checkBox2.Checked = false;
if (textBox1.Text != "" && checkBox1.Checked == true)
{
a = int.Parse(textBox1.Text);
totaltea = a * wtea;
afvat = totaltea * vat;
pam = totaltea + afvat;
vatt.Text = afvat.ToString();
payableamount.Text = pam.ToString();
}
if (textBox1.Text == "" && checkBox1.Checked == false)
{
teaprice.Text = "0.0";
cofeeprice.Text = "0.0";
total_cost.Text = "0.0";
vatt.Text = "0.0";
payableamount.Text = "0.0";
mop.Enabled = false;
print.Enabled = false;
refresh.Enabled = false;
}
if (textBox1.Text != "" && checkBox1.Checked == false)
{
a = int.Parse(textBox1.Text);
totaltea = a * tea;
afvat = totaltea * vat;
pam = totaltea + afvat;
vatt.Text = afvat.ToString();
payableamount.Text = pam.ToString();
}
}
else
{
int order = int.Parse(textBox2.Text);
if (order > 20)
{
int Result = 0;
Result=(int) MessageBox.Show("You Have Reached The Maximum Value Of Order. Reorder ?", "20 Cup At A time!", MessageBoxButtons.YesNo, MessageBoxIcon.Information);
if (Result == (int)DialogResult.Yes)
{
textBox2.Text = "";
}
else
{
MessageBox.Show("Taking The Maximum Order", "Order 20 Cup");
textBox2.Text = "20";
}
}
else
{
if (textBox1.Text == "" && textBox2.Text == "" && checkBox1.Checked == false && checkBox2.Checked == false)
{
teaprice.Text = "0.0";
cofeeprice.Text = "0.0";
total_cost.Text = "0.0";
vatt.Text = "0.0";
payableamount.Text = "0.0";
// timer1.Enabled = true;
}
if (textBox2.Text != "" && textBox1.Text == "" && checkBox1.Checked == false && checkBox2.Checked == false)
{
a = float.Parse(textBox2.Text);
totaltea = cofee * a;
afvat = totaltea * vat;
pam = totaltea + afvat;
cofeeprice.Text = totaltea.ToString();
vatt.Text = afvat.ToString();
payableamount.Text = pam.ToString();
// timer1.Enabled = true;
}
if (textBox2.Text != "" && textBox1.Text != "" && checkBox1.Checked == false && checkBox2.Checked == false)
{
a = float.Parse(textBox1.Text);
b = float.Parse(textBox2.Text);
totaltea = tea * a;
afvat = totaltea * vat;
pam = totaltea + afvat;
totalcofee = b * cofee;
totalcost = totaltea + totalcofee;
afvat = totalcost * vat;
pam = afvat + totalcost;
teaprice.Text = totaltea.ToString();
cofeeprice.Text = totalcofee.ToString();
total_cost.Text = totalcost.ToString();
vatt.Text = afvat.ToString();
payableamount.Text = pam.ToString();
// timer1.Enabled = true;
}
if (textBox2.Text == "" && textBox1.Text != "" && checkBox1.Checked == false && checkBox2.Checked == false)
{
a = float.Parse(textBox1.Text);
totaltea = a * tea;
afvat = totaltea * vat;
pam = totaltea + afvat;
teaprice.Text = totaltea.ToString();
vatt.Text = afvat.ToString();
payableamount.Text = pam.ToString();
cofeeprice.Text = "0.0";
total_cost.Text = "0.0";
// timer1.Enabled = true;
}
if (textBox1.Text != "" && textBox2.Text != "" && checkBox1.Checked == true && checkBox2.Checked == false)
{
a = float.Parse(textBox1.Text);
b = float.Parse(textBox2.Text);
totaltea = wtea * a;
afvat = totaltea * vat;
pam = totaltea + afvat;
totalcofee = b * cofee;
totalcost = totaltea + totalcofee;
afvat = totalcost * vat;
pam = afvat + totalcost;
teaprice.Text = totaltea.ToString();
cofeeprice.Text = totalcofee.ToString();
total_cost.Text = totalcost.ToString();
vatt.Text = afvat.ToString();
payableamount.Text = pam.ToString();
// timer1.Enabled = true;
}
if (textBox1.Text != "" && textBox2.Text == "" && checkBox1.Checked == true && checkBox2.Checked == true)
{
a = float.Parse(textBox1.Text);
totaltea = tea * a;
afvat = totaltea * vat;
pam = totaltea + afvat;
teaprice.Text = totaltea.ToString();
vatt.Text = afvat.ToString();
payableamount.Text = pam.ToString();
cofeeprice.Text = "0.0";
total_cost.Text = "0.0";
// timer1.Enabled = true;
}
if (textBox2.Text == "" && textBox1.Text != "" && checkBox1.Checked == true && checkBox2.Checked == false)
{
a = float.Parse(textBox1.Text);
totaltea = a * tea;
afvat = totaltea * vat;
pam = totaltea + afvat;
teaprice.Text = totaltea.ToString();
vatt.Text = afvat.ToString();
payableamount.Text = pam.ToString();
cofeeprice.Text = "0.0";
total_cost.Text = "0.0";
// timer1.Enabled = true;
}
if (textBox2.Text != "")
{
checkBox2.Enabled = true;
refresh.Enabled = true;
mop.Enabled = true;
print.Enabled = true;
}
else
{
checkBox2.Checked = false;
checkBox2.Enabled = false;
refresh.Enabled = false;
mop.Enabled = false;
print.Enabled = false;
}
}
}
}
catch{MessageBox.Show("Please check number Entered");
}
}
private void checkBox1_CheckedChanged(object sender, EventArgs e)
{
float tea = 25, totaltea, vat = 0.04f, pam, a, afvat, cofee = 35, b, totalcost, totalcofee,wtea=40;
float coldcofee = 55;
if (textBox1.Text == "" && textBox2.Text == "" && checkBox1.Checked == false && checkBox2.Checked == false)
{
teaprice.Text = "0.0";
cofeeprice.Text = "0.0";
total_cost.Text = "0.0";
vatt.Text = "0.0";
payableamount.Text = "0.0";
// timer1.Enabled = true;
}
if (textBox1.Text != "" && textBox2.Text == "" && checkBox1.Checked == false && checkBox2.Checked == false)
{
a = float.Parse(textBox1.Text);
totaltea = tea * a;
afvat = totaltea * vat;
pam = totaltea + afvat;
teaprice.Text = totaltea.ToString();
vatt.Text = afvat.ToString();
payableamount.Text = pam.ToString();
// timer1.Enabled = true;
}
if (textBox1.Text != "" && textBox2.Text != "" && checkBox1.Checked == false && checkBox2.Checked == false)
{
a = float.Parse(textBox1.Text);
b = float.Parse(textBox2.Text);
totaltea = tea * a;
afvat = totaltea * vat;
pam = totaltea + afvat;
totalcofee = b * cofee;
totalcost = totaltea + totalcofee;
afvat = totalcost * vat;
pam = afvat + totalcost;
teaprice.Text = totaltea.ToString();
cofeeprice.Text = totalcofee.ToString();
total_cost.Text = totalcost.ToString();
vatt.Text = afvat.ToString();
payableamount.Text = pam.ToString();
// timer1.Enabled = true;
}
if (textBox1.Text != "" && textBox2.Text != "" && checkBox1.Checked == false && checkBox2.Checked == true)
{
a = float.Parse(textBox1.Text);
b = float.Parse(textBox2.Text);
totaltea = tea * a;
afvat = totaltea * vat;
pam = totaltea + afvat;
totalcofee = b * coldcofee;
totalcost = totaltea + totalcofee;
afvat = totalcost * vat;
pam = afvat + totalcost;
teaprice.Text = totaltea.ToString();
cofeeprice.Text = totalcofee.ToString();
total_cost.Text = totalcost.ToString();
vatt.Text = afvat.ToString();
payableamount.Text = pam.ToString();
// timer1.Enabled = true;
}
if (textBox1.Text == "" && textBox2.Text != "" && checkBox1.Checked == false && checkBox2.Checked == false)
{
b = float.Parse(textBox2.Text);
totalcofee = b * cofee;
afvat = totalcofee * vat;
pam = totalcofee + afvat;
cofeeprice.Text = totalcofee.ToString();
vatt.Text = afvat.ToString();
payableamount.Text = pam.ToString();
teaprice.Text = "0.0";
total_cost.Text = "0.0";
// timer1.Enabled = true;
}
if (textBox1.Text == "" && textBox2.Text == "" && checkBox1.Checked == true && checkBox2.Checked == false)
{
teaprice.Text = "0.0";
cofeeprice.Text = "0.0";
total_cost.Text = "0.0";
vatt.Text = "0.0";
payableamount.Text = "0.0";
// timer1.Enabled = true;
}
if (checkBox1.Checked == true && textBox1.Text != "" && textBox2.Text == "" && checkBox2.Checked == false)
{
a = float.Parse(textBox1.Text);
totaltea = wtea * a;
afvat = totaltea * vat;
pam = totaltea + afvat;
teaprice.Text = totaltea.ToString();
vatt.Text = afvat.ToString();
payableamount.Text = pam.ToString();
// timer1.Enabled = true;
}
if (checkBox1.Checked == true && textBox1.Text != "" && textBox2.Text != "" && checkBox2.Checked == false)
{
a = float.Parse(textBox1.Text);
b = float.Parse(textBox2.Text);
totaltea = wtea * a;
afvat = totaltea * vat;
pam = totaltea + afvat;
totalcofee = b * cofee;
totalcost = totaltea + totalcofee;
afvat = totalcost * vat;
pam = afvat + totalcost;
teaprice.Text = totaltea.ToString();
cofeeprice.Text = totalcofee.ToString();
total_cost.Text = totalcost.ToString();
vatt.Text = afvat.ToString();
payableamount.Text = pam.ToString();
// timer1.Enabled = true;
}
if (textBox1.Text == "" && textBox2.Text != "" && checkBox1.Checked == true && checkBox2.Checked == false)
{
b = float.Parse(textBox2.Text);
totalcofee = b * cofee;
afvat = totalcofee * vat;
pam = totalcofee + afvat;
cofeeprice.Text = totalcofee.ToString();
vatt.Text = afvat.ToString();
payableamount.Text = pam.ToString();
teaprice.Text = "0.0";
total_cost.Text = "0.0";
// timer1.Enabled = true;
}
if (checkBox1.Checked == true && textBox1.Text != "" && textBox2.Text != "" && checkBox2.Checked == true)
{
a = float.Parse(textBox1.Text);
b = float.Parse(textBox2.Text);
totaltea = wtea * a;
afvat = totaltea * vat;
pam = totaltea + afvat;
totalcofee = b * coldcofee;
totalcost = totaltea + totalcofee;
afvat = totalcost * vat;
pam = afvat + totalcost;
teaprice.Text = totaltea.ToString();
cofeeprice.Text = totalcofee.ToString();
total_cost.Text = totalcost.ToString();
vatt.Text = afvat.ToString();
payableamount.Text = pam.ToString();
// timer1.Enabled = true;
}
}
private void checkBox2_CheckedChanged(object sender, EventArgs e)
{
float tea = 25, totaltea, vat = 0.04f, pam, a, afvat, cofee = 35, b, totalcost, totalcofee, wtea = 40;
float coldcofee=55;
if (textBox1.Text == "" && textBox2.Text == "" && checkBox1.Checked == false && checkBox2.Checked == false)
{
teaprice.Text = "0.0";
cofeeprice.Text = "0.0";
total_cost.Text = "0.0";
vatt.Text = "0.0";
payableamount.Text = "0.0";
// timer1.Enabled = true;
}
if (textBox1.Text != "" && textBox2.Text == "" && checkBox1.Checked == false && checkBox2.Checked == false)
{
a = float.Parse(textBox1.Text);
totaltea = tea * a;
afvat = totaltea * vat;
pam = totaltea + afvat;
teaprice.Text = totaltea.ToString();
vatt.Text = afvat.ToString();
payableamount.Text = pam.ToString();
// timer1.Enabled = true;
}
if (textBox1.Text != "" && textBox2.Text != "" && checkBox1.Checked == false && checkBox2.Checked == false)
{
a = float.Parse(textBox1.Text);
b = float.Parse(textBox2.Text);
totaltea = tea * a;
afvat = totaltea * vat;
pam = totaltea + afvat;
totalcofee = b * cofee;
totalcost = totaltea + totalcofee;
afvat = totalcost * vat;
pam = afvat + totalcost;
teaprice.Text = totaltea.ToString();
cofeeprice.Text = totalcofee.ToString();
total_cost.Text = totalcost.ToString();
vatt.Text = afvat.ToString();
payableamount.Text = pam.ToString();
// timer1.Enabled = true;
}
if (textBox1.Text != "" && textBox2.Text != "" && checkBox1.Checked == true && checkBox2.Checked == false)
{
a = float.Parse(textBox1.Text);
b = float.Parse(textBox2.Text);
totaltea = wtea * a;
afvat = totaltea * vat;
pam = totaltea + afvat;
totalcofee = b * cofee;
totalcost = totaltea + totalcofee;
afvat = totalcost * vat;
pam = afvat + totalcost;
teaprice.Text = totaltea.ToString();
cofeeprice.Text = totalcofee.ToString();
total_cost.Text = totalcost.ToString();
vatt.Text = afvat.ToString();
payableamount.Text = pam.ToString();
// timer1.Enabled = true;
}
if (textBox1.Text == "" && textBox2.Text != "" && checkBox1.Checked == false && checkBox2.Checked == false)
{
b = float.Parse(textBox2.Text);
totalcofee = b * cofee;
afvat = totalcofee * vat;
pam = totalcofee + afvat;
cofeeprice.Text = totalcofee.ToString();
vatt.Text = afvat.ToString();
payableamount.Text = pam.ToString();
teaprice.Text = "0.0";
total_cost.Text = "0.0";
// timer1.Enabled = true;
}
if (textBox1.Text == "" && textBox2.Text == "" && checkBox1.Checked == true && checkBox2.Checked == true)
{
teaprice.Text = "0.0";
cofeeprice.Text = "0.0";
total_cost.Text = "0.0";
vatt.Text = "0.0";
payableamount.Text = "0.0";
// timer1.Enabled = true;
}
if (checkBox1.Checked == true && textBox1.Text != "" && textBox2.Text == "" && checkBox2.Checked == true)
{
a = float.Parse(textBox1.Text);
totaltea = wtea * a;
afvat = totaltea * vat;
pam = totaltea + afvat;
teaprice.Text = totaltea.ToString();
vatt.Text = afvat.ToString();
payableamount.Text = pam.ToString();
// timer1.Enabled = true;
}
if (checkBox1.Checked == true && textBox1.Text != "" && textBox2.Text != "" && checkBox2.Checked == true)
{
a = float.Parse(textBox1.Text);
b = float.Parse(textBox2.Text);
totaltea = wtea * a;
afvat = totaltea * vat;
pam = totaltea + afvat;
totalcofee = b * coldcofee;
totalcost = totaltea + totalcofee;
afvat = totalcost * vat;
pam = afvat + totalcost;
teaprice.Text = totaltea.ToString();
cofeeprice.Text = totalcofee.ToString();
total_cost.Text = totalcost.ToString();
vatt.Text = afvat.ToString();
payableamount.Text = pam.ToString();
// timer1.Enabled = true;
}
if (checkBox1.Checked == false && textBox1.Text != "" && textBox2.Text != "" && checkBox2.Checked == true)
{
a = float.Parse(textBox1.Text);
b = float.Parse(textBox2.Text);
totaltea = tea * a;
afvat = totaltea * vat;
pam = totaltea + afvat;
totalcofee = b * coldcofee;
totalcost = totaltea + totalcofee;
afvat = totalcost * vat;
pam = afvat + totalcost;
teaprice.Text = totaltea.ToString();
cofeeprice.Text = totalcofee.ToString();
total_cost.Text = totalcost.ToString();
vatt.Text = afvat.ToString();
payableamount.Text = pam.ToString();
// timer1.Enabled = true;
}
if (textBox1.Text == "" && textBox2.Text != "" && checkBox1.Checked == false && checkBox2.Checked == true)
{
b = float.Parse(textBox2.Text);
totalcofee = b * coldcofee;
afvat = totalcofee * vat;
pam = totalcofee + afvat;
cofeeprice.Text = totalcofee.ToString();
vatt.Text = afvat.ToString();
payableamount.Text = pam.ToString();
teaprice.Text = "0.0";
total_cost.Text = "0.0";
}
}
private void label8_Click(object sender, EventArgs e)
{
MessageBox.Show("Sorry This Facility Temporarly Is Not Available.", "OOOPS !");
}
private void label8_MouseMove(object sender, MouseEventArgs e)
{
PIZZA.ForeColor = System.Drawing.Color.Black;
DRINKS.ForeColor = System.Drawing.Color.White;
BREAD.ForeColor = System.Drawing.Color.White;
WINGS.ForeColor = System.Drawing.Color.White;
}
private void label12_MouseMove(object sender, MouseEventArgs e)
{
PIZZA.ForeColor = System.Drawing.Color.White;
DRINKS.ForeColor = System.Drawing.Color.Black;
BREAD.ForeColor = System.Drawing.Color.White;
WINGS.ForeColor = System.Drawing.Color.White;
}
private void timer2_Tick(object sender, EventArgs e)
{
}
private void label10_Click(object sender, EventArgs e)
{
MessageBox.Show("Sorry This Facility Temporarly Is Not Available.", "OOOPS !");
}
private void DRINKS_Click(object sender, EventArgs e)
{
groupBox1.Visible = true;
label3.Visible = true;
label4.Visible = true;
label5.Visible = true;
label6.Visible = true;
teaprice.Visible = true;
cofeeprice.Visible = true;
label7.Visible = true;
vatt.Visible = true;
total_cost.Visible = true;
payableamount.Visible = true;
DRINKS.Enabled = false;
neworder.Enabled = true;
submit.Enabled = true;
showcurrentorder.Enabled = true;
cofeeprice.Text = "0.0";
vatt.Text = "0.0";
total_cost.Text = "0.0";
teaprice.Text = "0.0";
payableamount.Text = "0.0";
mop.Enabled = true;
print.Enabled = true;
refresh.Enabled = true;
}
private void BREAD_MouseMove(object sender, MouseEventArgs e)
{
PIZZA.ForeColor = System.Drawing.Color.White;
DRINKS.ForeColor = System.Drawing.Color.White;
BREAD.ForeColor = System.Drawing.Color.Black;
WINGS.ForeColor = System.Drawing.Color.White;
}
private void WINGS_MouseMove(object sender, MouseEventArgs e)
{
PIZZA.ForeColor = System.Drawing.Color.White;
DRINKS.ForeColor = System.Drawing.Color.White;
BREAD.ForeColor = System.Drawing.Color.White;
WINGS.ForeColor = System.Drawing.Color.Black;
}
private void Form1_MouseMove(object sender, MouseEventArgs e)
{
if (groupBox1.Visible == false)
{
DRINKS.Visible = true;
PIZZA.ForeColor = System.Drawing.Color.White;
DRINKS.ForeColor = System.Drawing.Color.White;
BREAD.ForeColor = System.Drawing.Color.White;
WINGS.ForeColor = System.Drawing.Color.White;
}
BREAD.ForeColor = System.Drawing.Color.White;
WINGS.ForeColor = System.Drawing.Color.White;
PIZZA.ForeColor = System.Drawing.Color.White;
}
private void EXIT_Click(object sender, EventArgs e)
{
this.Close();
}
private void mop_Click(object sender, EventArgs e)
{
card.Visible = true;
cash.Checked = false;
cash.Visible = true;
groupBox2.Visible = true;
card.Checked = false;
}
private void go_Click(object sender, EventArgs e)
{
string str = cardno.Text;
int len = str.Length;
if (len < 10)
{
MessageBox.Show("Enter Your 10 Digit Card No.");
cardno.Clear();
}
else
{
MessageBox.Show("Payment Process Successfully completed.", "Payment Process");
groupBox2.Visible = false;
mop.Enabled = false;
print.Enabled = false;
refresh.Enabled = false;
textBox1.Clear();
checkBox1.Checked = false;
textBox2.Clear();
checkBox2.Checked = false;
groupBox1.Visible = false;
cash.Enabled = true;
label3.Visible = false;
label4.Visible = false;
label5.Visible = false;
label6.Visible = false;
teaprice.Visible = false;
cofeeprice.Visible = false;
label7.Visible = false;
vatt.Visible = false;
total_cost.Visible = false;
payableamount.Visible = false;
DRINKS.Enabled = true;
payableamount.Visible = false;
}
}
private void refresh_Click(object sender, EventArgs e)
{
groupBox2.Visible = false;
mop.Enabled = false;
print.Enabled = false;
refresh.Enabled = false;
textBox1.Clear();
checkBox1.Checked = false;
textBox2.Clear();
checkBox2.Checked = false;
}
private void card_CheckedChanged(object sender, EventArgs e)
{
if (card.Checked == true)
{
lcard.Visible = true;
cardno.Visible = true;
cash.Visible = false;
go.Visible = true;
MessageBox.Show("Thank You For Paying Using Card", "Card Payment");
}
}
private void BREAD_Click(object sender, EventArgs e)
{
MessageBox.Show("Sorry This Facility Temporarly Is Not Available.", "OOOPS !");
}
private void cash_CheckedChanged(object sender, EventArgs e)
{
if (cash.Checked == true)
{
DRINKS.Enabled = true;
go.Visible = false;
lcard.Visible = false;
cardno.Visible = false;
card.Visible = false;
cash.Enabled = true;
cash.Visible = false;
groupBox2.Visible = false;
mop.Enabled = false;
print.Enabled = false;
refresh.Enabled = false;
textBox1.Clear();
checkBox1.Checked = false;
textBox2.Clear();
checkBox2.Checked = false;
groupBox1.Visible = false;
cash.Checked = false;
label3.Visible = false;
label4.Visible = false;
label5.Visible = false;
label6.Visible = false;
teaprice.Visible = false;
cofeeprice.Visible = false;
label7.Visible = false;
vatt.Visible = false;
total_cost.Visible = false;
payableamount.Visible = false;
MessageBox.Show("Thank You For paying In Cash.", "Cash Payment");
}
}
private void timer3_Tick(object sender, EventArgs e)
{
if (label8.Left == 994)
{
label8.Left = 530;
}
else
label8.Left += 1;
if (label8.Left == 994)
{
timer3.Enabled = false;
timer1.Enabled = true;
}
}
private void Form1_Load(object sender, EventArgs e)
{
neworder.Enabled = false;
showcurrentorder.Enabled = false;
submit.Enabled = false;
timer1.Enabled = true;
}
private void timer1_Tick(object sender, EventArgs e)
{
if (label8.Left == 530)
{
label8.Left = 994;
}
else
label8.Left -= 1;
if (label8.Left == 530)
{
timer1.Enabled = false;
timer3.Enabled = true;
}
}
private void button2_Click(object sender, EventArgs e)
{
DRINKS.Enabled = true;
go.Visible = false;
lcard.Visible = false;
cardno.Visible = false;
card.Visible = false;
cash.Enabled = true;
cash.Visible = false;
groupBox2.Visible = false;
mop.Enabled = false;
print.Enabled = false;
refresh.Enabled = false;
textBox1.Clear();
checkBox1.Checked = false;
textBox2.Clear();
checkBox2.Checked = false;
groupBox1.Visible = false;
cash.Checked = false;
label3.Visible = false;
label4.Visible = false;
label5.Visible = false;
label6.Visible = false;
teaprice.Visible = false;
cofeeprice.Visible = false;
label7.Visible = false;
vatt.Visible = false;
total_cost.Visible = false;
payableamount.Visible = false;
neworder.Enabled = false;
submit.Enabled = false;
}
private void vatt_Click(object sender, EventArgs e)
{
}
private void submit_Click(object sender, EventArgs e)
{
if (payableamount.Text == "0.0")
{
MessageBox.Show("OrderBook Is Empty. Please Order Something.", "Current Order !");
}
if (textBox1.Text == "")
{
if (textBox2.Text != "")
{
if (checkBox2.Checked == true)
{
MessageBox.Show("Thank You For Orderig " + textBox2.Text.ToString() + " Cup of Cold Cofee.");
}
else
MessageBox.Show("Thank You For Orderig " + textBox2.Text.ToString() + " Cup of Cofee.");
}
}
else
{
if (checkBox1.Checked == true)
{
if (textBox2.Text == "")
{
MessageBox.Show("Thank You For Orderig " + textBox1.Text.ToString() + " Cup of Tea Without Sugar.","Current Order !");
}
if (textBox2.Text != "" && checkBox2.Checked == true)
{
MessageBox.Show("Thank You For Orderig " + textBox1.Text.ToString() + " Cup of Tea Without Sugar & " + textBox2.Text.ToString() + " Cup Of Coldcofee.", "Current Order !");
}
if (textBox2.Text != "" && checkBox2.Checked == false)
{
MessageBox.Show("Thank You For Orderig " + textBox1.Text.ToString() + " Cup of Tea Without Sugar & " + textBox2.Text.ToString() + " Cup Of Cofee.", "Current Order !");
}
}
else
{
if (textBox2.Text == "")
{
MessageBox.Show("Thank You For Orderig " + textBox1.Text.ToString() + " Cup of Tea.", "Current Order !");
}
if (textBox2.Text != "" && checkBox2.Checked == true)
{
MessageBox.Show("Thank You For Orderig " + textBox1.Text.ToString() + " Cup of Tea & " + textBox2.Text.ToString() + " Cup Of Coldcofee.", "Current Order !");
}
if (textBox2.Text != "" && checkBox2.Checked == false)
{
MessageBox.Show("Thank You For Orderig " + textBox1.Text.ToString() + " Cup of Tea & " + textBox2.Text.ToString() + " Cup Of Cofee.", "Current Order !");
}
}
}
}
private void showcurrentorder_Click(object sender, EventArgs e)
{
if (payableamount.Text == "0.0")
{
MessageBox.Show("Your Don't Have Any Order Yet.Please Order Something.", "No Order Yet !");
}
}
private void my_Click(object sender, EventArgs e)
{
}
}
}
u r grat boiss.
ReplyDelete