示例#1
0
        private void StopCharge(object sender, EventArgs e)
        {
            IPoverUnit poverUnit = sender as IPoverUnit;

            if (poverUnit != null)
            {
                poverUnit.OnCharged -= StopCharge;
                poverUnit.StopCharging();
            }
        }
示例#2
0
 public void Charge(IPoverUnit poverUnit)
 {
     poverUnit.OnCharged += StopCharge;
     poverUnit.StartCharging();
 }