| | |
| | | btnCurtainStop.IsSelected = false; |
| | | btnCurtainOpen.IsSelected = false; |
| | | curtain.on_off = "off"; |
| | | Control.Send(CommandType_A.write,curtain); |
| | | //Control.Send(CommandType_A.write,curtain); |
| | | System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>(); |
| | | d.Add("on_off", curtain.on_off.ToString()); |
| | | Control.SendWriteCommand(curtain, d); |
| | | }; |
| | | |
| | | btnCurtainStop.MouseDownEventHandler = (sender, e) => |
| | |
| | | btnCurtainClose.IsSelected = false; |
| | | btnCurtainStop.IsSelected = false; |
| | | curtain.on_off = "stop"; |
| | | Control.Send(CommandType_A.write, curtain); |
| | | //Control.Send(CommandType_A.write, curtain); |
| | | System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>(); |
| | | d.Add("on_off", curtain.on_off.ToString()); |
| | | Control.SendWriteCommand(curtain, d); |
| | | }; |
| | | btnCurtainOpen.MouseUpEventHandler = (sender, e) => |
| | | { |
| | |
| | | btnCurtainClose.IsSelected = false; |
| | | btnCurtainStop.IsSelected = false; |
| | | curtain.on_off = "on"; |
| | | Control.Send(CommandType_A.write, curtain); |
| | | //Control.Send(CommandType_A.write, curtain); |
| | | System.Collections.Generic.Dictionary<string, string> d = new System.Collections.Generic.Dictionary<string, string>(); |
| | | d.Add("on_off", curtain.on_off.ToString()); |
| | | Control.SendWriteCommand(curtain, d); |
| | | }; |
| | | |
| | | } |