| | |
| | | public override void InitFrameWhiteContent() |
| | | { |
| | | base.ShowColltionButton = false; |
| | | base.SetTitleText(device.name); |
| | | base.SetTitleText(Language.StringByID(StringId.Sensor)); |
| | | |
| | | //添加第二索引页 |
| | | this.AddSecondPage(); |
| | |
| | | this.InitFrameWhiteContent1(); |
| | | //初始化第二个索引页的内容 |
| | | this.InitFrameWhiteContent2(); |
| | | |
| | | //刷新当前设备的状态缓存 |
| | | this.RefreshNowDeviceStatuMemory(this.device); |
| | | //刷新界面状态 |
| | | this.RefreshFormStatu(); |
| | | //读取状态 |
| | |
| | | //不是同一个东西 |
| | | if (this.device.sid != i_LocalDevice.sid) { return; } |
| | | |
| | | //刷新当前设备的状态缓存 |
| | | this.RefreshNowDeviceStatuMemory(i_LocalDevice); |
| | | //刷新界面状态 |
| | | this.RefreshFormStatu(); |
| | | } |
| | |
| | | private void RefreshFormStatu() |
| | | { |
| | | Application.RunOnMainThread(()=>{ |
| | | var temp = device.status.Find((sta) => sta.key == FunctionAttributeKey.Status); |
| | | var temp = device.attributes.Find((sta) => sta.key == FunctionAttributeKey.Status); |
| | | if (temp != null) |
| | | { |
| | | if (temp.value == "true") |
| | | if (temp.state == "true") |
| | | { |
| | | btnIcon.IsSelected = true; |
| | | btnSuctionView.TextID = StringId.Someone; |
| | |
| | | #endregion |
| | | |
| | | #region ■ 一般方法___________________________ |
| | | |
| | | /// <summary> |
| | | /// 刷新当前设备的状态缓存 |
| | | /// </summary> |
| | | private void RefreshNowDeviceStatuMemory(Function i_LocalDevice) |
| | | { |
| | | foreach (var data in i_LocalDevice.status) |
| | | { |
| | | //开关 |
| | | //if (data.key == "on_off") { this.weepRobotData.Cleaning = data.value.ToLower() == "on"; } |
| | | } |
| | | } |
| | | |
| | | #endregion |
| | | } |