| | |
| | | { |
| | | try |
| | | { |
| | | //全开全关 |
| | | //if (DB_ResidenceData.Instance.GatewayType == 0 && !Control.Ins.IsRemote) |
| | | //休眠时间(ms) |
| | | int sleepTime = 100; |
| | | if(DB_ResidenceData.Instance.GatewayType == 0) |
| | | { |
| | | sleepTime = 200; |
| | | } |
| | | if (Control.Ins.GatewayOnline_Local) |
| | | { |
| | | switch (functionCategory) |
| | |
| | | Dictionary<string, string> d = new Dictionary<string, string>(); |
| | | d.Add(FunctionAttributeKey.OnOff, f.trait_on_off.curValue.ToString()); |
| | | Control.Ins.SendWriteCommand(f, d); |
| | | System.Threading.Thread.Sleep(100); |
| | | System.Threading.Thread.Sleep(sleepTime); |
| | | } |
| | | break; |
| | | case ShowFunction.FloorHeating: |
| | |
| | | Dictionary<string, string> d = new Dictionary<string, string>(); |
| | | d.Add(FunctionAttributeKey.OnOff, f.trait_on_off.curValue.ToString()); |
| | | Control.Ins.SendWriteCommand(f, d); |
| | | System.Threading.Thread.Sleep(100); |
| | | System.Threading.Thread.Sleep(sleepTime); |
| | | } |
| | | break; |
| | | case ShowFunction.Light: |
| | |
| | | Dictionary<string, string> d = new Dictionary<string, string>(); |
| | | d.Add(FunctionAttributeKey.OnOff, f.trait_on_off.curValue.ToString()); |
| | | Control.Ins.SendWriteCommand(f, d); |
| | | System.Threading.Thread.Sleep(100); |
| | | System.Threading.Thread.Sleep(sleepTime); |
| | | } |
| | | break; |
| | | case ShowFunction.Electric: |
| | |
| | | Dictionary<string, string> d = new Dictionary<string, string>(); |
| | | d.Add(FunctionAttributeKey.OnOff, f.trait_on_off.curValue.ToString()); |
| | | Control.Ins.SendWriteCommand(f, d); |
| | | System.Threading.Thread.Sleep(100); |
| | | System.Threading.Thread.Sleep(sleepTime); |
| | | } |
| | | break; |
| | | case ShowFunction.FreshAir: |
| | |
| | | Dictionary<string, string> d = new Dictionary<string, string>(); |
| | | d.Add(FunctionAttributeKey.OnOff, f.trait_on_off.curValue.ToString()); |
| | | Control.Ins.SendWriteCommand(f, d); |
| | | System.Threading.Thread.Sleep(100); |
| | | System.Threading.Thread.Sleep(sleepTime); |
| | | } |
| | | break; |
| | | } |