Exemple #1
0
 private void button1_Click(object sender, EventArgs e)
 {
     ErrorLbl.Hide();
     Cap       = TB1.Text;
     TotalFuel = TB2.Text;
     if (Cap != "" && TotalFuel != "")
     {
         try
         {
             TotalF = Convert.ToInt32(TotalFuel);
             SetUp(TotalF);
         }
         catch
         {
             ErrorLbl.Text = "Enter a correct Fuel Value";
             ShowHide();
         }
     }
     else
     {
         ErrorLbl.Text = "Fill All Textboxes";
         ShowHide();
     }
 }
Exemple #2
0
 private void Form1_Load(object sender, EventArgs e)
 {
     ErrorLbl.Hide();
 }