| | |
| | | new System.Threading.Thread(() => |
| | | { |
| | | fan.on_off = btnSwitch.IsSelected ? "on" : "off"; |
| | | Control.Send(CommandType_A.write, this.fan); |
| | | //Control.Send(CommandType_A.write, this.fan); |
| | | System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>(); |
| | | d.Add("on_off", fan.on_off.ToString()); |
| | | Control.SendWriteCommand(fan, d); |
| | | }) |
| | | { IsBackground = true }.Start(); |
| | | }; |
| | |
| | | new System.Threading.Thread(() => |
| | | { |
| | | fan.on_off = btnSwitch.IsSelected ? "on" : "off"; |
| | | Control.Send(CommandType_A.write, this.fan); |
| | | //Control.Send(CommandType_A.write, this.fan); |
| | | System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>(); |
| | | d.Add("on_off", fan.on_off.ToString()); |
| | | Control.SendWriteCommand(fan, d); |
| | | }) |
| | | { IsBackground = true }.Start(); |
| | | }; |
| | |
| | | new System.Threading.Thread(() => |
| | | { |
| | | fan.on_off = btnSwitch.IsSelected ? "on" : "off"; |
| | | Control.Send(CommandType_A.write, this.fan); |
| | | //Control.Send(CommandType_A.write, this.fan); |
| | | System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>(); |
| | | d.Add("on_off", fan.on_off.ToString()); |
| | | Control.SendWriteCommand(fan, d); |
| | | }) |
| | | { IsBackground = true }.Start(); |
| | | }; |