using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Shared
{
[System.Serializable]
public class YiPanelLightSwitch : YiPanelCommon
{
public YiPanelLightSwitch ()
{
Type = DeviceType.LightSwitch;
DeviceTextID = SimpleControl.R.MyInternationalizationString.ElectricalControl;
}
///
/// 当前状态
///
//public ONorOFF Status = ONorOFF.OFF;
public byte CurrentBrightness = 0;
///
/// 延时时间高位
///
public byte DelayTimeHeight = 0;
///
/// 延时时间低位
///
public byte DelayTimeLow = 0;
///
/// 是否是插座
///
public bool IsSocket {
get {
bool issocket = UserConfig.Instance.SocketList.Contains (CommonLoopID);
//if (issocket)
// Type = DeviceType.LightSwithcSocket;
return issocket;
}
}
public string CommonLoopID {
get {
return this.SubnetID.ToString () + "_" + this.DeviceID.ToString () + "_" + LoopID.ToString ();
}
}
}
}