Beispiel #1
0
 public void Charging(object sender, CurrentEventArgs e)
 {
     if (usb.Connected)
     {
         if (e.Current != 0)
         {
             if (e.Current > 0 && e.Current <= 5)
             {
                 display.FullyCharged();
             }
             else if (e.Current > 5 && e.Current <= 500)
             {
                 display.OngoingCharge(e.Current);
             }
             else if (e.Current > 500)
             {
                 display.ChargingFail();
             }
         }
     }
 }