JLChen
2020-05-28 04bd96cbf5d12a4e4b116d2b05fd0d05ea81ee23
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
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;
 
        }
        /// <summary>
        /// 当前状态
        /// </summary>
        //public ONorOFF Status = ONorOFF.OFF;
        public byte CurrentBrightness = 0;
 
        /// <summary>
        /// 延时时间高位
        /// </summary>
        public byte DelayTimeHeight = 0;
 
        /// <summary>
        /// 延时时间低位
        /// </summary>
        public byte DelayTimeLow = 0;
 
        /// <summary>
        /// 是否是插座
        /// </summary>
        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 ();
            }
        }
    }
 
}