| | |
| | | // }.Show(MainPage.BaseView); |
| | | // return; |
| | | //} |
| | | this.btnPictrue.CanClick = false; |
| | | this.btnSwitch.CanClick = false; |
| | | |
| | | string statu = this.btnSwitch.IsSelected == true ? "off" : "on"; |
| | | HdlThreadLogic.Current.RunThread(() => |
| | | string tipMsg = "确定打开?"; |
| | | if (this.btnSwitch.IsSelected) |
| | | { |
| | | var dic = new Dictionary<string, string>(); |
| | | dic.Add(FunctionAttributeKey.OnOff, statu); |
| | | Control.Ins.SendWriteCommand(this.device, dic, true); |
| | | HdlThreadLogic.Current.RunMain(() => |
| | | tipMsg = "确定关闭?"; |
| | | } |
| | | Action action = () => { |
| | | |
| | | this.btnPictrue.CanClick = false; |
| | | this.btnSwitch.CanClick = false; |
| | | |
| | | HdlThreadLogic.Current.RunThread(() => |
| | | { |
| | | this.btnPictrue.CanClick = true; |
| | | this.btnSwitch.CanClick = true; |
| | | var dic = new Dictionary<string, string>(); |
| | | dic.Add(FunctionAttributeKey.OnOff, statu); |
| | | Control.Ins.SendWriteCommand(this.device, dic, true); |
| | | HdlThreadLogic.Current.RunMain(() => |
| | | { |
| | | this.btnPictrue.CanClick = true; |
| | | this.btnSwitch.CanClick = true; |
| | | }); |
| | | }); |
| | | }); |
| | | }; |
| | | new PublicAssmebly().TipOptionMsg(StringId.EmptyString, tipMsg, action); |
| | | |
| | | } |
| | | |
| | | #endregion |