1
wxr
2023-03-31 7e42cc13a14b7de31c9f5d5c61cdf24f3246335d
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
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
 
namespace Shared
{
[System.Serializable]
    public class LightSwitch : Common
    {
        public LightSwitch ()
        {
            if (UserConfig.Instance.SocketList.Contains (CommonLoopID)) {
                Type = DeviceType.LightSwitchSocket;
                DeviceTextID = SimpleControl.R.MyInternationalizationString.ElectricalControl;
            } else {
                this.Type = DeviceType.LightSwitch;
                DeviceTextID = SimpleControl.R.MyInternationalizationString.Lights;
            }
        }
 
        /// <summary>
        /// µ±Ç°×´Ì¬
        /// </summary>
        //public ONorOFF Status = ONorOFF.OFF;
        public byte CurrentBrightness = 0;
 
        /// <summary>
        /// ÑÓʱʱ¼ä¸ßλ
        /// </summary>
        public byte DelayTimeHeight = 0;
 
        /// <summary>
        /// ÑÓʱʱ¼äµÍλ
        /// </summary>
        public byte DelayTimeLow = 0;
 
        /// <summary>
        /// ÊÇ·ñÊDzå×ù
        /// </summary>
        public bool IsSocket {
            get {
                bool issocket = UserConfig.Instance.SocketList.Contains (CommonLoopID);
                //if (issocket)
                //    Type = DeviceType.LightSwithcSocket;
                return issocket;
            }
        }
    }
}