| | |
| | | /// </summary> |
| | | public override void InitFrameWhiteContent() |
| | | { |
| | | base.SetTitleText(Language.StringByID(StringId.AirCleaner)); |
| | | base.SetTitleText(Language.StringByID(StringId.WaterValve)); |
| | | |
| | | //初始化第一个索引页的内容 |
| | | this.InitFrameWhiteContent1(); |
| | | //刷新界面状态 |
| | | this.RefreshFormStatu(); |
| | | //读取状态 |
| | | new System.Threading.Thread(() => |
| | | { |
| | | Control.Ins.ReadFunctionsInfo(new List<string>() { device.deviceId}); |
| | | }) |
| | | { IsBackground = true }.Start(); |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | { |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | var onoffStatu = device.status.Find((obj) => obj.key == FunctionAttributeKey.OnOff); |
| | | var timeStatu = device.status.Find((obj) => obj.key == FunctionAttributeKey.TuyaWaterTime); |
| | | var onoffStatu = device.attributes.Find((obj) => obj.key == FunctionAttributeKey.OnOff); |
| | | var timeStatu = device.attributes.Find((obj) => obj.key == FunctionAttributeKey.TuyaWaterTime); |
| | | |
| | | if (onoffStatu != null) |
| | | { |
| | | if (onoffStatu.value.ToString() == "on") |
| | | if (onoffStatu.state == "on") |
| | | { |
| | | btnControlTip.TextID = StringId.ControllerOn; |
| | | } |
| | |
| | | { |
| | | btnControlTip.TextID = StringId.ControllerNotOn; |
| | | } |
| | | this.btnSwitch.IsSelected = this.btnPictrue.IsSelected = onoffStatu.value.ToString() == "on"; |
| | | this.btnSwitch.IsSelected = this.btnPictrue.IsSelected = onoffStatu.state.ToString() == "on"; |
| | | } |
| | | if (timeStatu != null) |
| | | { |
| | | int.TryParse(timeStatu.value, out waterRunningTime); |
| | | int.TryParse(timeStatu.state, out waterRunningTime); |
| | | } |
| | | RefreshTimeButton(); |
| | | }); |
| | |
| | | private void SetControlTime() |
| | | { |
| | | var timeControl = new BottomTimeSelectControl(); |
| | | timeControl.RowCount = 5; |
| | | timeControl.InitControl(0,0); |
| | | timeControl.FinishEvent = (type,hours,min) => { |
| | | if (type == 1)//0:取消;1:确定 |