📄 eventflashbacklight.cs
字号:
using System;
using System.Threading;
using System.Windows.Forms;
using NiceTracker.Libraries;
namespace NiceTracker.Events
{
/// <summary>
/// Summary description for EventFlashBacklight.
/// </summary>
public class EventFlashBacklight : EventBase
{
public EventFlashBacklight()
{
}
public int Duration = 5;
public override void Action()
{
int count = Duration;
while ( count > 0 )
{
PPCLib.SetBacklight( PPCLib.PowerState.Off );
Thread.Sleep( 500 );
PPCLib.SetBacklight( PPCLib.PowerState.FullOn );
Thread.Sleep( 500 );
Application.DoEvents();
count--;
}
}
public override void LoadParameters( EventParameters eventParameters )
{
Duration = Convert.ToInt32( eventParameters.Get( "Duration" ) );
}
public override void SaveParameters( EventParameters eventParameters )
{
eventParameters.Set( "Duration", Duration.ToString() );
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -