tzy
2021-05-25 65bcedda4d8e3ff6500dbf59a4e607d96e469375
HDL_ON/UI/UI2/FuntionControlView/ArmSensor/SensorPirPage.cs
@@ -36,9 +36,6 @@
            this.InitFrameWhiteContent1();
            //初始化第二个索引页的内容
            this.InitFrameWhiteContent2();
            //刷新当前设备的状态缓存
            this.RefreshNowDeviceStatuMemory(this.device);
            //刷新界面状态
            this.RefreshFormStatu();
            //读取状态
@@ -81,17 +78,8 @@
        /// </summary>
        private void InitFrameWhiteContent2()
        {
            Button btnLog = new Button()
            {
                X = Application.GetRealWidth(16),
                Y = Application.GetRealHeight(16),
                Width = Application.GetRealWidth(250),
                Height = Application.GetRealHeight(33),
                TextAlignment = TextAlignment.CenterLeft,
                IsBold = true,
                TextID = StringId.Log,
            };
            FrameWhiteCentet2.AddChidren(btnLog);
            var paging = new ArmSensorHistroyPaging(device);
            paging.InitFrame(FrameWhiteCentet2);
        }
        #endregion
@@ -107,8 +95,6 @@
            //不是同一个东西
            if (this.device.sid != i_LocalDevice.sid) { return; }
            //刷新当前设备的状态缓存
            this.RefreshNowDeviceStatuMemory(i_LocalDevice);
            //刷新界面状态
            this.RefreshFormStatu();
        }
@@ -127,10 +113,10 @@
        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;
@@ -149,18 +135,6 @@
        #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
    }