Exemplo n.º 1
0
 // Update gui when loaded hex is verified
 void hex_Verified(object sender, BoolEventArgs e)
 {
     if (InvokeRequired)
     {
         Invoke(new EventHandler <BoolEventArgs>(hex_Verified), new object[] { sender, e });
     }
     else
     {
         if (e.Status()) // Hex was valid
         {
             fileLoaded = true;
             if (deviceConnected)
             {
                 // Enable buttons if device is also connected
                 updateButton.Enabled = true;
                 verifyButton.Enabled = true;
             }
             validFileLabel.Text      = "Valid";
             validFileLabel.ForeColor = Color.Green;
         }
         else // Hex was not valid
         {
             fileLoaded               = false;
             updateButton.Enabled     = false;
             verifyButton.Enabled     = false;
             validFileLabel.Text      = "Invalid";
             validFileLabel.ForeColor = Color.Red;
         }
     }
 }
Exemplo n.º 2
0
 void usbDongle_UpdateComplete(object sender, BoolEventArgs e)
 {
     if (InvokeRequired)
     {
         Invoke(new EventHandler <BoolEventArgs>(usbDongle_UpdateComplete), new object[] { sender, e });
     }
     else
     {
         inProgress       = false;
         closeButton.Text = "Close";
         if (e.Status() == true)
         {
             percentLabel.Text = "Update Complete";
         }
         else
         {
             progressBar1.Value = 0;
             percentLabel.Text  = "Update failed";
         }
     }
 }
Exemplo n.º 3
0
 void usbDongle_FlashVerified(object sender, BoolEventArgs e)
 {
     if (InvokeRequired)
     {
         Invoke(new EventHandler <BoolEventArgs>(usbDongle_FlashVerified), new object[] { sender, e });
     }
     else
     {
         inProgress       = false;
         closeButton.Text = "Close";
         if (e.Status() == true)
         {
             percentLabel.Text = "Verification Done";
         }
         else
         {
             progressBar1.Value = 0;
             percentLabel.Text  = "Verification failed!";
         }
     }
 }
Exemplo n.º 4
0
 // Update gui when loaded hex is verified
 void hex_Verified(object sender, BoolEventArgs e)
 {
     if (InvokeRequired)
     {
         Invoke(new EventHandler<BoolEventArgs>(hex_Verified), new object[] { sender, e });
     }
     else
     {
         if (e.Status()) // Hex was valid
         {
             fileLoaded = true;
             if (deviceConnected)
             {
                 // Enable buttons if device is also connected
                 updateButton.Enabled = true;
                 verifyButton.Enabled = true;
             }
             validFileLabel.Text = "Valid";
             validFileLabel.ForeColor = Color.Green;
         }
         else // Hex was not valid
         {
             fileLoaded = false;
             updateButton.Enabled = false;
             verifyButton.Enabled = false;
             validFileLabel.Text = "Invalid";
             validFileLabel.ForeColor = Color.Red;
         }
     }
 }
Exemplo n.º 5
0
 void usbDongle_FlashVerified(object sender, BoolEventArgs e)
 {
     if (InvokeRequired)
     {
         Invoke(new EventHandler<BoolEventArgs>(usbDongle_FlashVerified), new object[] { sender, e });
     }
     else
     {
         inProgress = false;
         closeButton.Text = "Close";
         if (e.Status() == true)
         {
             percentLabel.Text = "Verification Done";
         }
         else
         {
             progressBar1.Value = 0;
             percentLabel.Text = "Verification failed!";
         }
     }
 }
Exemplo n.º 6
0
        void usbDongle_UpdateComplete(object sender, BoolEventArgs e)
        {
            if (InvokeRequired)
            {
                Invoke(new EventHandler<BoolEventArgs>(usbDongle_UpdateComplete), new object[] { sender, e });
            }
            else
            {

                inProgress = false;
                closeButton.Text = "Close";
                if (e.Status() == true)
                {
                    percentLabel.Text = "Update Complete";
                }
                else
                {
                    progressBar1.Value = 0;
                    percentLabel.Text = "Update failed";
                }
            }
        }