| | |
| | | new System.Threading.Thread(() => |
| | | { |
| | | var light = this.light as Light; |
| | | light.state = btnSwitch.IsSelected ? 1 : 0; |
| | | Control.Send("write", this.light, 3); |
| | | light.on_off = btnSwitch.IsSelected ? 1 : 0; |
| | | Control.Send("write", this.light); |
| | | }) |
| | | { IsBackground = true }.Start(); |
| | | }; |
| | |
| | | new System.Threading.Thread(() => |
| | | { |
| | | var light = this.light as Light; |
| | | light.state = btnSwitch.IsSelected ? 1 : 0; |
| | | Control.Send("write", this.light, 3); |
| | | light.on_off = btnSwitch.IsSelected ? 1 : 0; |
| | | Control.Send("write", this.light); |
| | | }) |
| | | { IsBackground = true }.Start(); |
| | | }; |