예제 #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();
 }