using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace TeamAAS_VP.Core.Lights
{
///
/// 提供有关单个灯光通道状态更改的事件数据。
///
///
/// 此类型封装了触发灯光通道相关事件时需要传递的基本信息,
/// 包括通道实例、通道是否开启以及当前亮度值。
///
public class LightChannelEventArgs : EventArgs
{
///
/// 获取触发事件的灯光通道实例。
///
///
public ILightChannel Channel { get; }
///
/// 获取通道当前的开/关状态;若为 true 则表示已开启。
///
public bool IsOn { get; }
///
/// 获取通道当前的亮度值(具体取值范围由实现决定)。
///
public int Brightness { get; }
///
/// 使用指定的通道、开关状态和亮度初始化 的新实例。
///
/// 触发事件的灯光通道实例。
/// 通道的开/关状态;为 true 表示已开启。
/// 通道的亮度值(实现决定其有效范围)。
public LightChannelEventArgs(ILightChannel channel, bool isOn, int brightness)
{
Channel = channel;
IsOn = isOn;
Brightness = brightness;
}
}
}