| | |
| | | { |
| | | if (bodyView == null) |
| | | return; |
| | | bodyView.btnSwitch.IsSelected = bodyView.btnSwitchIcon.IsSelected = updataTemp.trait_on_off.curValue.ToString() == "on"; |
| | | if (updataTemp.spk == bodyView.function.spk && updataTemp.sid == bodyView.function.sid) |
| | | { |
| | | bodyView.btnSwitch.IsSelected = bodyView.btnSwitchIcon.IsSelected = updataTemp.trait_on_off.curValue.ToString() == "on"; |
| | | } |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | |
| | | System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>(); |
| | | d.Add("on_off", function.trait_on_off.curValue.ToString()); |
| | | DriverLayer.Control.Ins.SendWriteCommand(function, d); |
| | | //Control.Send(CommandType_A.write, function); |
| | | }) |
| | | { IsBackground = true }.Start(); |
| | | |
| | | //new System.Threading.Thread(() => |
| | | //{ |
| | | // bool fff = false; |
| | | // while (true) |
| | | // { |
| | | // System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>(); |
| | | // if (fff) |
| | | // { |
| | | // d.Add("on_off", "off"); |
| | | // } |
| | | // else |
| | | // { |
| | | // d.Add("on_off", "on"); |
| | | // } |
| | | // fff = !fff; |
| | | // DriverLayer.Control.Ins.SendWriteCommand(function, d); |
| | | // //System.Threading.Thread.Sleep(100); |
| | | // } |
| | | //}) |
| | | //{ IsBackground = true }.Start(); |
| | | }; |
| | | |
| | | } |