| | |
| | | continue; |
| | | } |
| | | f.on_off = "off"; |
| | | Control.Send(CommandType_A.write, f); |
| | | //Control.Send(CommandType_A.write, f); |
| | | System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>(); |
| | | d.Add("on_off", f.on_off.ToString()); |
| | | Control.SendWriteCommand(f, d); |
| | | } |
| | | btn.Visible = false; |
| | | }; |
| | |
| | | foreach(var f in DB_ResidenceData.residenceData.functionList.aCs) |
| | | { |
| | | f.on_off = btn.IsSelected ? "on" : "off"; |
| | | Control.Send(CommandType_A.write, f); |
| | | //Control.Send(CommandType_A.write, f); |
| | | System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>(); |
| | | d.Add("on_off", f.on_off.ToString()); |
| | | Control.SendWriteCommand(f, d); |
| | | } |
| | | break; |
| | | case ShowFunction.Curtain: |
| | |
| | | foreach (var f in DB_ResidenceData.residenceData.functionList.lights) |
| | | { |
| | | f.on_off = btn.IsSelected ? "on" : "off"; |
| | | Control.Send(CommandType_A.write, f); |
| | | //Control.Send(CommandType_A.write, f); |
| | | System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>(); |
| | | d.Add("on_off", f.on_off.ToString()); |
| | | Control.SendWriteCommand(f, d); |
| | | } |
| | | break; |
| | | } |
| | |
| | | foreach (var f in DB_ResidenceData.residenceData.functionList.curtains) |
| | | { |
| | | f.on_off = "on"; |
| | | Control.Send(CommandType_A.write, f); |
| | | //Control.Send(CommandType_A.write, f); |
| | | System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>(); |
| | | d.Add("on_off", f.on_off.ToString()); |
| | | Control.SendWriteCommand(f, d); |
| | | } |
| | | }; |
| | | |
| | |
| | | foreach (var f in DB_ResidenceData.residenceData.functionList.curtains) |
| | | { |
| | | f.on_off = "off"; |
| | | Control.Send(CommandType_A.write, f); |
| | | //Control.Send(CommandType_A.write, f); |
| | | System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>(); |
| | | d.Add("on_off", f.on_off.ToString()); |
| | | Control.SendWriteCommand(f, d); |
| | | } |
| | | }; |
| | | |