private void buttonCancel_Click(object sender, EventArgs e)
 {
     Pk2.VddOff();
     if (unitIDChanged)
     {
         // reset PICkit 2 so it re-enumerates with new ID.
         Pk2.ResetPICkit2();
         Thread.Sleep(1000);
         MessageBox.Show("Resetting PICkit 2.\n\nPlease wait for USB enumeration\nto complete before clicking OK...", "Reset PICkit 2");
         Thread.Sleep(1000);
     }
     this.Close();
 }