コード例 #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();
 }