| | |
| | | /// </summary> |
| | | public override void InitFrameWhiteContent() |
| | | { |
| | | base.SetTitleText(device.name); |
| | | base.SetTitleText(Language.StringByID(StringId.Sensor)); |
| | | |
| | | //添加第二索引页 |
| | | this.AddSecondPage(); |
| | |
| | | this.RefreshNowDeviceStatuMemory(this.device); |
| | | //刷新界面状态 |
| | | this.RefreshFormStatu(); |
| | | //读取状态 |
| | | new System.Threading.Thread(() => |
| | | { |
| | | DriverLayer.Control.Ins.SendReadCommand(device); |
| | | }) |
| | | { IsBackground = true }.Start(); |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | /// </summary> |
| | | private void InitFrameWhiteContent2() |
| | | { |
| | | var paging = new ArmSensorHistroyPaging(device); |
| | | paging.InitFrame(FrameWhiteCentet2); |
| | | } |
| | | |
| | | #endregion |
| | |
| | | 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 == "alarm") |
| | | { |
| | | btnIcon.IsSelected = true; |
| | | btnSuctionView.TextID = StringId.WaterLeakage; |
| | |
| | | /// </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"; } |
| | | } |
| | | //foreach (var data in i_LocalDevice.status) |
| | | //{ |
| | | // if (data.value.ToLower() == "alarm") |
| | | // { |
| | | // this.btnIcon.IsSelected = true; |
| | | // this.btnSuctionView.IsSelected = true; |
| | | // this.btnSuctionView.TextID = StringId.WaterLeakage; |
| | | // } |
| | | // else |
| | | // { |
| | | // this.btnIcon.IsSelected = false; |
| | | // this.btnSuctionView.IsSelected = false; |
| | | // this.btnSuctionView.TextID = StringId.SensorNormalState; |
| | | // } |
| | | //} |
| | | } |
| | | |
| | | #endregion |