0
如何让特定事件触发时我的WPF
应用程序闲置?应用程序空闲
void SystemEvents_SessionSwitch(object sender, Microsoft.Win32.SessionSwitchEventArgs e)
{
if (e.Reason == SessionSwitchReason.SessionLock) {
//make application idle
}
else if (e.Reason == SessionSwitchReason.SessionUnlock) {
//run the app again
}
}
我有我的代码是这样的,当用户锁定Windows时,如果条件被触发,当他解锁它,否则会被解雇。
有人可以建议我让应用程序闲置并再次运行它的代码?
你是什么意思“让应用程序空闲”?只要没有做任何事,你的应用程序*就会闲置。 –