陈嘉乐
2020-07-10 48ba446936b51fffafa7c3600c0dadc6ac0e8c20
ZigbeeApp/Shared/Phone/Category/Controls/DeviceRow/Base/DeviceRowCommon.cs
@@ -100,16 +100,21 @@
            Common.LocalDevice.Current.SetDeviceIconToControl(btnDeviceIcon, i_device);
            frameIconBackGroud.AddChidren(btnDeviceIcon);
            //重新绑定事件
            this.frameTable.ChangedChidrenBindMode(frameIconBackGroud, ChidrenBindMode.BindEventOnly);
            this.frameTable.ChangedChidrenBindMode(frameIconBackGroud, ChidrenBindMode.BindEvent);
            //设备名字
            this.btnDeviceName = new NormalViewControl(600, 60, true);
            if (this.device.Type == DeviceType.WindowCoveringDevice)
            {
                //窗帘因为右边有三个按钮,所以需要所有名字的宽度
                this.btnDeviceName.Width = Application.GetRealWidth(360);
            }
            btnDeviceName.X = Application.GetRealWidth(181);
            //当指定实际坐标时,这里需要的偏移量为2倍
            btnDeviceName.Y = Application.GetRealHeight(16) + this.chidrenYaxis * 2;
            btnDeviceName.Text = Common.LocalDevice.Current.GetDeviceEpointName(i_device);
            btnDeviceName.SelectedTextColor = Common.ZigbeeColor.Current.GXCTextSelectedColor;
            this.frameTable.AddChidren(btnDeviceName, ChidrenBindMode.BindEventOnly);
            this.frameTable.AddChidren(btnDeviceName, ChidrenBindMode.BindEvent);
            
            if (this.hadStatuFunction == false)
            {
@@ -127,7 +132,7 @@
                btnStatu.Y = Application.GetRealHeight(70) + this.chidrenYaxis * 2;
                btnStatu.TextSize = 10;
                btnStatu.TextColor = UserCenterColor.Current.TextGrayColor1;
                this.frameTable.AddChidren(btnStatu, ChidrenBindMode.BindEventOnly);
                this.frameTable.AddChidren(btnStatu, ChidrenBindMode.BindEvent);
            }
            //底线
@@ -394,7 +399,7 @@
            this.ResponeResult = 0;
            HdlThreadLogic.Current.RunThread(() =>
            {
                int waitime = 30;
                int waitime = 40;
                while (waitime > 0)
                {
                    System.Threading.Thread.Sleep(100);
@@ -404,8 +409,15 @@
                        break;
                    }
                    waitime--;
                    //2秒的时候,还是接受不到的话,强制再次刷新设备状态
                    if (waitime == 20)
                    {
                        //从新发送获取设备的状态(强制)
                        this.device.HadReadDeviceStatu = false;
                        this.SendStatuComand();
                    }
                }
                if (waitime <= 0)
                if (waitime <= 0 && this.Parent != null)
                {
                    //没有获取得到结果
                    HdlThreadLogic.Current.RunMain(() =>