wei
2021-02-26 87e614af0fa31d7fd632136d95c0c7e584c28477
HDL_ON/UI/UI2/FuntionControlView/ArmSensor/SensorDoorWinwsPage.cs
@@ -40,6 +40,12 @@
            this.RefreshNowDeviceStatuMemory(this.device);
            //刷新界面状态
            this.RefreshFormStatu();
            //读取状态
            new System.Threading.Thread(() =>
            {
                DriverLayer.Control.Ins.SendReadCommand(device);
            })
            { IsBackground = true }.Start();
        }
        /// <summary>
@@ -111,7 +117,7 @@
                var temp = device.status.Find((sta) => sta.key == FunctionAttributeKey.Status);
                if (temp != null)
                {
                    if (temp.value == "true")
                    if (temp.value == "open")
                    {
                        btnIcon.IsSelected = true;
                        btnSuctionView.TextID = StringId.Open;
@@ -136,11 +142,27 @@
        /// </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.key == FunctionAttributeKey.Status)
            //    {
            //        Application.RunOnMainThread(() =>
            //        {
            //            if (data.value.ToLower() == "open")
            //            {
            //                this.btnIcon.IsSelected = true;
            //                this.btnSuctionView.IsSelected = true;
            //                this.btnSuctionView.TextID = StringId.Open;
            //            }
            //            else
            //            {
            //                this.btnIcon.IsSelected = false;
            //                this.btnSuctionView.IsSelected = false;
            //                this.btnSuctionView.TextID = StringId.Close;
            //            }
            //        });
            //    }
            //}
        }
        #endregion