如何欺骗系统电源(AC/DC)通知获取虚假电源? [英] How to cheat the System Power Source (AC/DC) Notifications get the unreal power source?

查看:126
本文介绍了如何欺骗系统电源(AC/DC)通知获取虚假电源?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我正在使用工具,需要模拟触发器AC \ DC开关.
有什么方法可以欺骗系统电源(AC/DC)通知例如,当我的笔记本电脑处于AC模式时,但我需要应用程序注意系统处于DC模式时.


谢谢
Eric

Hi,

I'm woking on a tool and need to simulate trigger AC\DC switch.
Is there any way to cheat the System Power Source (AC/DC) Notifications ?
For example, when my laptop in in AC mode, but I need app regard system is in DC mode.


Thanks
Eric

推荐答案

然后为什么不创建单元测试并模拟"呢? AC/DC输入,而不是愚弄Windows(我认为这对于测试来说不是一个好主意).
Then why don't you create a unit test and "mock" the AC/DC input instead of fooling Windows (which I don't think is a good idea just for a test).


这篇关于如何欺骗系统电源(AC/DC)通知获取虚假电源?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆