黄学彪
2020-07-20 2029e64ec0491f7e511dc15bffaf821bfbabe2de
ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/DeviceControls/GatewayRowControl.cs
@@ -116,28 +116,31 @@
                    wayName += "(" + Language.StringByID(R.MyInternationalizationString.uChidrenGateway) + ")";
                }
            }
            this.btnName = frameTable.AddTopView(wayName, 700);
            this.btnName = frameTable.AddLeftCaption(wayName, 700, 60);
            btnName.TextSize = 15;
            //这个坐标有点特殊
            btnName.Y = Application.GetRealHeight(12) + this.chidrenYaxis;
            frameTable.AddChidren(btnName, ChidrenBindMode.BindEvent);
            //房间
            string strIp = string.Empty;
            if (tempWay != null)
            {
                strIp = tempWay.GwIP;
            }
            this.btnIp = frameTable.AddLeftCaption(strIp, 600, 50, true);
            //这个坐标有点特殊
            btnIp.Y = Application.GetRealHeight(72) + this.chidrenYaxis;
            btnIp.TextSize = 12;
            btnIp.TextColor = UserCenterColor.Current.TextGrayColor1;
            frameTable.AddChidren(btnIp, ChidrenBindMode.BindEvent);
            //IP
            this.btnIp = frameTable.AddBottomView(tempWay != null ? tempWay.GwIP : string.Empty, 600);
            //初始值在线
            this.IsOnline = true;
            if (tempWay != null)
            {
                //刷新网关信息
                HdlThreadLogic.Current.RunThread(() =>
                {
                    var result = HdlGatewayLogic.Current.GetGatewayInfo(tempWay, false, ShowErrorMode.NO);
                    if (result != null)
                    {
                        HdlThreadLogic.Current.RunMain(() =>
                        {
                            //刷新控件
                            tempWay.GatewayOnlineFlage = true;
                            this.RefreshControl(tempWay);
                        });
                    }
                });
            }
        }
        #endregion