Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/.net/25.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 如何获取Powerstatus?_C#_.net_Mono - Fatal编程技术网

C# 如何获取Powerstatus?

C# 如何获取Powerstatus?,c#,.net,mono,C#,.net,Mono,我怎样才能得到Powerstatus? 在Windows中很容易: SystemInformation.PowerStatus.BatteryChargeStatus.ToString(); 我如何在MonoDevelop中做到这一点?您在mono中试过吗?是的,我试过。我得到一个错误:当前kontextSystemInformation中不存在名称“SystemInformation”,SystemInformation是在System.Windows.Forms程序集中定义的,我怀疑它在m

我怎样才能得到Powerstatus? 在Windows中很容易:

SystemInformation.PowerStatus.BatteryChargeStatus.ToString();

我如何在MonoDevelop中做到这一点?

您在mono中试过吗?是的,我试过。我得到一个错误:当前kontextSystemInformation中不存在名称“SystemInformation”,SystemInformation是在System.Windows.Forms程序集中定义的,我怀疑它在mono中是否有实现。检查他们关于电池状态信息的文档,我已经看过了,但是没有关于这个主题的内容。