📄 ppclib.cs
字号:
using System;
using System.Runtime.InteropServices;
namespace NiceTracker
{
/// <summary>
/// Summary description for PPCLib.
/// </summary>
public class PPCLib
{
[DllImport("coredll.dll")]
private static extern bool SipShowIM(int dwFlag);
public enum PowerState
{
PwrDeviceUnspecified = -1,
FullOn = 0, // Full on
LowOn = 1, // Low on
Standby = 2, // Standby
Sleep = 3, // Sleep
Off = 4, // Off
PwrDeviceMaximum = 5
};
[DllImport("coredll.dll")]
private static extern int DevicePowerNotify( string device, PowerState deviceState, int deviceFlags );
public PPCLib()
{
}
public static bool ShowSip
{
set
{
if ( value )
SipShowIM( 1 );
else
SipShowIM( 0 );
}
}
public static void SetBacklight( PowerState pwr )
{
DevicePowerNotify( "BKL1:", pwr, 1 );
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -