摘要: (转载)C#---WINCE 电池状态(2011-08-18 14:26:20)转载▼标签: wince电池电量状态c类杂谈 分类: 计算机程序设计 using System;using System.Collections.Generic;using System.Runtime.InteropServices;using System.Drawing;namespace BatteryControl{ /// /// Author /// Date /// Addr /// Func Battery Show /// public... 阅读全文
posted @ 2014-03-27 20:48 哈哈好玩 阅读(158) 评论(0) 推荐(0)
摘要: WINCE 电池状态(C#)分类: 电量 2013-04-18 12:08 397人阅读 评论(1) 收藏 举报Wince电量根据网上搜集资料,最后整理 分享下[csharp] view plaincopyprint?usingSystem;usingSystem.Linq;usingSystem.Collections.Generic;usingSystem.Text;usingSystem.Runtime.InteropServices;usingSystem.Drawing;namespacePDAeffect{publicclassBatteryControl{//////外边框//. 阅读全文
posted @ 2014-03-27 20:46 哈哈好玩 阅读(434) 评论(0) 推荐(0)
摘要: wmi的Win32_Battery类实现其中EstimatedChargeRemaining属性返回剩余电量的百分比,EstimatedRunTime属性返回剩余时间(分钟)其他属性参考http://msdn2.microsoft.com/en-us/library/aa394074.aspx我写了一个示范代码返回剩余电量的百分比首先在引用里添加System.Management核心代码如下:using System.Management;....ObjectQuery oq = new ObjectQuery("select * from Win32_Battery"); 阅读全文
posted @ 2014-03-27 20:40 哈哈好玩 阅读(769) 评论(0) 推荐(0)