G
Guest
hi, im getting the powerstate of the battery
usingSystemInformation.PowerState like so:
PowerStatus power = SystemInformation.PowerStatus;
if (power.BatteryChargeStatus == BatteryChargeStatus.Charging)
//code here
but the problem is, the enum is BatteryChargeState shows this during debug
power.BatteryChargeStatus High | Charging
how can i write an if statement for that? ive tried
if (power.BatteryChargeStatus == BatteryChargeStatus.High |
BatteryChargeStatus.Charging)
but that didnt work....any help would be great! thanks
usingSystemInformation.PowerState like so:
PowerStatus power = SystemInformation.PowerStatus;
if (power.BatteryChargeStatus == BatteryChargeStatus.Charging)
//code here
but the problem is, the enum is BatteryChargeState shows this during debug
power.BatteryChargeStatus High | Charging
how can i write an if statement for that? ive tried
if (power.BatteryChargeStatus == BatteryChargeStatus.High |
BatteryChargeStatus.Charging)
but that didnt work....any help would be great! thanks
