Re: Detect Battery Life Left
hey there
http://www.opennetcf.org (Open source Compact Framework Community) has an sdk that includes controls for battery monitor & battery life
you can download it here (http://www.opennetcf.org/PermaLink.a...a-4c1dbe1cfef9)
Re: Detect Battery Life Left
Time to bring this thread back to life:
I am using both the Battery Monitor and Battery Life.
My problem is that the Battery Life (The visible control) doesn't update it's graphic scale. It simply keeps the value of when the program is first started.
Anyone have any experience with the Battery Life control?
Thanks
Re: Detect Battery Life Left
Hi,
set the interval on the monitor, and set the PrimaryBatteryLifeTrigger at the %age left you want to be alerted. The PrimaryBatteryLifeNotification event will fire when that happens, and you can take action.
Pete
Re: Detect Battery Life Left
That's corrrect for the Battery MONITOR.
However, it's the Battery LIFE control that I'm having the problem with. My BatteryLife control is enabled and set correctly. I've even programmed the BatteryLife click event to display a MessageBox that shows all some data provided by various properties of the BatteryLife control. So I know the Life control is working. However it just sits their and doesn't update it's "text" value.
I did find a better work around anyway.
1. Just make the BatteryLife control not visible;
2 query the Life control for it's values;
3 assign values to a progress bar. The graphic looks much better that way because of the gradients available in the progress bar.
But if anyone has had the same problem with BatteryLife control (remember it's not the BatteryMonitor) please let me know.
Re: Detect Battery Life Left
i use a timer and in the timer it updates the batterylife value
Re: Detect Battery Life Left
Hi,
in that situation, so do I :)
Pete
Re: Detect Battery Life Left
Ah, well in that case...
If there's no way to get the control to self update...
You might want to try my method it looks much better than the BatteryLife control. Just use the timer like I did to get the %remaining, "CInt" it and update the ProgressBar. The graphics look much better. Keep the (default I think) gradient (bottom-to-top) for the progress (on the ProgressBar) make it's background red and it's progress green with white bold text. I then added a nub to the end of the progress bar to make it look more like a battery. The "nub" is a label of appropriate size with a black background.
It looks really nice.
Thanks for the input, I just wanted to know that the BatteryLife doesn't update on it's own.
Thanks