黄学彪
2020-12-17 9f326f4000847e6167d8166fa2f6a66f53cb3734
ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceListMainForm.cs
@@ -103,8 +103,8 @@
                };
            }
            //初始化网关行控件
            GatewayResourse.NowSelectGatewayId = GatewayResourse.AppOldSelectGatewayId;
            var nowGateway = HdlGatewayLogic.Current.GetLocalGateway(GatewayResourse.AppOldSelectGatewayId);
            HdlGatewayResourse.NowSelectGatewayId = HdlGatewayResourse.AppOldSelectGatewayId;
            var nowGateway = HdlGatewayLogic.Current.GetLocalGateway(HdlGatewayResourse.AppOldSelectGatewayId);
            this.gatewayViewRow = new MyGatewayControl(nowGateway);
            bodyFrameLayout.AddChidren(gatewayViewRow);
            gatewayViewRow.InitControl();
@@ -171,8 +171,8 @@
        private void InitDeviceListControl()
        {
            //获取设备列表
            var listDevice = Common.LocalDevice.Current.GetDeviceByGatewayID(GatewayResourse.NowSelectGatewayId);
            var listSpecialOta = Common.LocalDevice.Current.GetSpecialOtaDevice(GatewayResourse.NowSelectGatewayId);
            var listDevice = HdlDeviceCommonLogic.Current.GetDeviceByGatewayID(HdlGatewayResourse.NowSelectGatewayId);
            var listSpecialOta = HdlDeviceCommonLogic.Current.GetSpecialOtaDevice(HdlGatewayResourse.NowSelectGatewayId);
            listDevice.AddRange(listSpecialOta);
            this.dicRowInfo.Clear();
@@ -196,7 +196,7 @@
                foreach (var macAddress in this.dicRowInfo.Keys)
                {
                    //获取ota设备
                    var ota = Common.LocalDevice.Current.GetOTADevice(macAddress);
                    var ota = HdlDeviceCommonLogic.Current.GetOTADevice(macAddress);
                    if (ota != null)
                    {
                        listOta.Add(ota);
@@ -229,7 +229,7 @@
            //创建一个可以展开和收缩的FrameLayout,相当于菜单栏
            var frameTable = new FrameListControl(29);
            frameTable.Height = ControlCommonResourse.ListViewRowHeight + frameTable.rowSpace;
            frameTable.Height = HdlControlResourse.ListViewRowHeight + frameTable.rowSpace;
            listView.AddChidren(frameTable);
            rowInfo.frameTable = frameTable;
@@ -252,8 +252,8 @@
            rowMenu.AddTag("btnNew", btnNew);
            //检测设备是否拥有定位的功能
            var listdevice = Common.LocalDevice.Current.GetDevicesByMac(deviceMac);
            if (listdevice.Count > 0 && Common.LocalDevice.Current.DeviceIsCanFixedPosition(listdevice[0]) == true)
            var listdevice = HdlDeviceCommonLogic.Current.GetDevicesByMac(deviceMac);
            if (listdevice.Count > 0 && HdlDeviceCommonLogic.Current.DeviceIsCanFixedPosition(listdevice[0]) == true)
            {
                //定位
                var btnPosition = rowMenu.AddEditorControl(false);
@@ -261,7 +261,7 @@
                btnPosition.ButtonClickEvent += (sender, e) =>
                {
                    //定位
                    Common.LocalDevice.Current.SetFixedPositionCommand(listdevice[0]);
                    HdlDeviceCommonLogic.Current.SetFixedPositionCommand(listdevice[0], true);
                };
            }
@@ -269,7 +269,8 @@
            btnRight.ButtonClickEvent += (sender, e) =>
            {
                //回路数大于1才展开
                if (Common.LocalDevice.Current.GetDevicesCountByMac(deviceMac) > 1)
                var listMacDevice = HdlDeviceCommonLogic.Current.GetDevicesByMac(deviceMac, false);
                if (listMacDevice.Count > 1)
                {
                    btnRight.IsSelected = !btnRight.IsSelected;
                    //展开或者折叠明细列表
@@ -277,9 +278,20 @@
                }
                else
                {
                    if (HdlDeviceCommonLogic.Current.IsMiniLight(listMacDevice[0]) == true)
                    {
                        //mini夜灯的功能设置界面
                        var room = HdlRoomLogic.Current.GetRoomByDevice(listMacDevice[0]);
                        var form = new MainPage.DeviceDetailInfoForm();
                        form.AddForm(listMacDevice[0], room);
                    }
                    else
                    {
                        //设备信息界面
                        var form = new DeviceMacInfoEditorForm();
                        form.AddForm(deviceMac);
                    }
                    btnNew.Visible = false;
                    var form = new DeviceMacInfoEditorForm();
                    form.AddForm(deviceMac);
                    //界面跳转,记录当前的正在操作的设备的Mac地址
                    this.nowActionDeviceMac = deviceMac;
                }
@@ -290,15 +302,28 @@
                //隐藏菜单
                rowMenu.HideMenu();
                //强制跳转真实设备界面
                if (UserCenterResourse.HideOption.GotoRealDeviceForm == 1)
                if (HdlUserCenterResourse.HideOption.GotoRealDeviceForm == 1)
                {
                    var form2 = new DeviceAddSuccessForm();
                    form2.AddForm(deviceMac);
                    return;
                }
                var listMacDevice = HdlDeviceCommonLogic.Current.GetDevicesByMac(deviceMac, false);
                if (listMacDevice.Count > 0 && HdlDeviceCommonLogic.Current.IsMiniLight(listMacDevice[0]) == true)
                {
                    //mini夜灯的功能设置界面
                    var room = HdlRoomLogic.Current.GetRoomByDevice(listMacDevice[0]);
                    var form = new MainPage.DeviceDetailInfoForm();
                    form.AddForm(listMacDevice[0], room);
                }
                else
                {
                    //设备信息界面
                    var form = new DeviceMacInfoEditorForm();
                    form.AddForm(deviceMac);
                }
                btnNew.Visible = false;
                var form = new DeviceMacInfoEditorForm();
                form.AddForm(deviceMac);
                //界面跳转,记录当前的正在操作的设备的Mac地址
                this.nowActionDeviceMac = deviceMac;
            };
@@ -329,18 +354,18 @@
            //它原来的高度
            int oldHeight = rowInfo.frameTable.Height;
            //变更的高度,默认为列表隐藏
            int heightValue = ControlCommonResourse.ListViewRowHeight + rowInfo.frameTable.rowSpace;
            var listDevice = Common.LocalDevice.Current.GetDevicesByMac(deviceMac);
            int heightValue = HdlControlResourse.ListViewRowHeight + rowInfo.frameTable.rowSpace;
            var listDevice = HdlDeviceCommonLogic.Current.GetDevicesByMac(deviceMac);
            if (isShow == true)
            {
                //备注:面板中只显示真实的设备,其他属于绑定的回路不显示
                //获取这一堆设备时属于什么类型的
                var deviceEnumInfo = Common.LocalDevice.Current.GetMyDeviceEnumInfo(listDevice);
                var deviceEnumInfo = HdlDeviceCommonLogic.Current.GetMyDeviceEnumInfo(listDevice);
                if (deviceEnumInfo.ConcreteType == DeviceConcreteType.ButtonPanel_SimpleMultifunction)
                {
                    var listTemp = Common.LocalDevice.Current.GetMutilfunctionPanelByMac(listDevice);
                    var listTemp = HdlDeviceCommonLogic.Current.GetMutilfunctionPanelByMac(listDevice);
                    //展开模式时,扩大依据为:它有几个子控件
                    heightValue = (listTemp.Count + 1) * (ControlCommonResourse.ListViewRowHeight + rowInfo.frameTable.rowSpace);
                    heightValue = (listTemp.Count + 1) * (HdlControlResourse.ListViewRowHeight + rowInfo.frameTable.rowSpace);
                    //标题自己就是一个子控件
                    if (rowInfo.frameTable.ChildrenCount == 1)
                    {
@@ -352,11 +377,12 @@
                    }
                }
                else if (deviceEnumInfo.ConcreteType == DeviceConcreteType.ButtonPanel_FangyueFreshAir
                       || deviceEnumInfo.ConcreteType == DeviceConcreteType.ButtonPanel_SimpleEnvironment)
                       || deviceEnumInfo.ConcreteType == DeviceConcreteType.ButtonPanel_SimpleEnvironment
                       || deviceEnumInfo.ConcreteType == DeviceConcreteType.ButtonPanel_FangyueEnvironment)
                {
                    var listTemp = Common.LocalDevice.Current.GetPanelMatchEpointByMac(listDevice);
                    var listTemp = HdlDeviceCommonLogic.Current.GetPanelMatchEpointByMac(listDevice);
                    //展开模式时,扩大依据为:它有几个子控件
                    heightValue = (listTemp.Count + 1) * (ControlCommonResourse.ListViewRowHeight + rowInfo.frameTable.rowSpace);
                    heightValue = (listTemp.Count + 1) * (HdlControlResourse.ListViewRowHeight + rowInfo.frameTable.rowSpace);
                    //标题自己就是一个子控件
                    if (rowInfo.frameTable.ChildrenCount == 1)
                    {
@@ -370,7 +396,7 @@
                else
                {
                    //展开模式时,扩大依据为:它有几个子控件
                    heightValue = (listDevice.Count + 1) * (ControlCommonResourse.ListViewRowHeight + rowInfo.frameTable.rowSpace);
                    heightValue = (listDevice.Count + 1) * (HdlControlResourse.ListViewRowHeight + rowInfo.frameTable.rowSpace);
                    //标题自己就是一个子控件
                    if (rowInfo.frameTable.ChildrenCount == 1)
                    {
@@ -402,9 +428,9 @@
            //行控件
            var rowDevice = new DeviceRoomControl(device, frame.rowSpace / 2);
            rowDevice.MainKeys = LocalDevice.Current.GetDeviceMainKeys(device);
            rowDevice.MainKeys = HdlDeviceCommonLogic.Current.GetDeviceMainKeys(device);
            frame.AddChidren(rowDevice);
            rowDevice.frameTable.LeftOffset = Application.GetRealWidth(173) - ControlCommonResourse.XXLeft;
            rowDevice.frameTable.LeftOffset = Application.GetRealWidth(173) - HdlControlResourse.XXLeft;
            rowDevice.InitControl();
            //底线
            rowDevice.frameTable.AddBottomLine();
@@ -413,11 +439,11 @@
            //在线状态
            rowDevice.IsOnline = rowInfo.MenuRow.IsOnline;
            //保存控件
            string maikey = Common.LocalDevice.Current.GetDeviceMainKeys(device);
            string maikey = HdlDeviceCommonLogic.Current.GetDeviceMainKeys(device);
            rowInfo.dicDetailRow[maikey] = rowDevice;
            //检测设备是否拥有定位的功能
            if (Common.LocalDevice.Current.DeviceIsCanFixedPosition(device) == true)
            if (HdlDeviceCommonLogic.Current.DeviceIsCanFixedPosition(device) == true)
            {
                //定位
                var btnPosition = rowDevice.AddEditorControl(false);
@@ -425,7 +451,7 @@
                btnPosition.ButtonClickEvent += (sender, e) =>
                {
                    //定位
                    Common.LocalDevice.Current.SetFixedPositionCommand(device);
                    HdlDeviceCommonLogic.Current.SetFixedPositionCommand(device);
                };
            }
@@ -493,12 +519,6 @@
                var form = new DeviceAirConditioner.IndoorUnitSettionForm();
                form.AddForm((AC)device);
            }
            //环境面板
            else if (deviceEnumInfo.ConcreteType == DeviceConcreteType.ButtonPanel_FangyueEnvironment)
            {
                var form = new DeviceFunctionSettionForm();
                form.AddForm(device, true);
            }
            //新风面板
            else if (deviceEnumInfo.ConcreteType == DeviceConcreteType.ButtonPanel_FangyueFreshAir)
            {
@@ -506,7 +526,7 @@
                //干接点
                if (device.Type == DeviceType.FreshAir)
                {
                    var form = new DevicePanel.PanelFangyueFreshAirButtonSettionForm();
                    var form = new DevicePanel.PanelSettionWithSourceForm();
                    form.AddForm(device);
                }
                else
@@ -521,7 +541,7 @@
                if (device.Type == DeviceType.FreshAir || device.Type == DeviceType.Thermostat)
                {
                    var form = new DevicePanel.PanelSimpleEnvironmentButtonSettionForm();
                    var form = new DevicePanel.PanelSettionWithSourceForm();
                    form.AddForm(device);
                }
                else
@@ -530,7 +550,7 @@
                    form.AddForm(device, true);
                }
            }
            //简约环境面板的按键配置
            //简约多功能面板的按键配置
            else if (deviceEnumInfo.ConcreteType == DeviceConcreteType.ButtonPanel_SimpleMultifunction)
            {
                var form = new DeviceFunctionSettionForm();
@@ -625,7 +645,7 @@
        {
            lock (dicRowInfo)
            {
                Application.RunOnMainThread(() =>
                HdlThreadLogic.Current.RunMain(() =>
                {
                    if (this.listView == null)
                    {
@@ -674,7 +694,7 @@
        /// <summary>
        /// 滑动控件下拉刷新
        /// </summary>
        private async void ListViewBeginHeaderRefreshing()
        private void ListViewBeginHeaderRefreshing()
        {
            //如果当前住宅是虚拟的
            if (Common.Config.Instance.Home.IsVirtually == true)
@@ -689,8 +709,8 @@
                return;
            }
            //如果是在线的
            var nowGateway = HdlGatewayLogic.Current.GetLocalGateway(GatewayResourse.NowSelectGatewayId);
            if (HdlGatewayLogic.Current.CheckGatewayOnlineByFlag(nowGateway) == true)
            var nowGateway = HdlGatewayLogic.Current.GetLocalGateway(HdlGatewayResourse.NowSelectGatewayId);
            if (HdlGatewayLogic.Current.CheckGatewayOnlineByMemory(nowGateway) == true)
            {
                //检测广播到的这个网关是否拥有住宅ID
                ZbGateway realWay = null;
@@ -701,11 +721,16 @@
                    {
                        //显示进度条
                        ProgressBar.Show();
                        int result2 = await HdlGatewayLogic.Current.ReBindNewGateway(realWay);
                        int result2 = HdlGatewayLogic.Current.ReBindNewGateway(realWay);
                        //关闭进度条
                        ProgressBar.Close();
                        if (result2 == -1)
                        {
                            HdlThreadLogic.Current.RunMain(() =>
                            {
                                //隐藏下拉刷新特效
                                listView.EndHeaderRefreshing();
                            });
                            return;
                        }
                    }
@@ -717,7 +742,7 @@
            }
            //获取全部设备
            int result = LocalDevice.Current.SetDeviceToMemmoryByGateway(nowGateway);
            int result = HdlDeviceCommonLogic.Current.SetDeviceToMemmoryByGateway(nowGateway.GwId, false);
            if (this.Parent == null)
            {
                return;
@@ -743,7 +768,7 @@
        /// </summary>
        private void StartGatewayOnlieCheckThread()
        {
            string selectGwId = GatewayResourse.NowSelectGatewayId;
            string selectGwId = HdlGatewayResourse.NowSelectGatewayId;
            HdlThreadLogic.Current.RunThread(() =>
            {
                ZbGateway zbGateway = HdlGatewayLogic.Current.GetLocalGateway(selectGwId);
@@ -754,11 +779,11 @@
                //刷新网关在线状态
                HdlGatewayLogic.Current.RefreshGatewayOnlineStatu(new List<ZbGateway>() { zbGateway });
                Application.RunOnMainThread(() =>
                HdlThreadLogic.Current.RunMain(() =>
                {
                    if (this.gatewayViewRow != null && this.gatewayViewRow.zbGatewayId == selectGwId)
                    {
                        bool online = HdlGatewayLogic.Current.CheckGatewayOnlineByFlag(zbGateway);
                        bool online = HdlGatewayLogic.Current.CheckGatewayOnlineByMemory(zbGateway);
                        //刷新控件在线状态
                        this.gatewayViewRow?.RefreshOnlineStatu();
                        //根据网关在线状态刷新设备在线状态
@@ -782,7 +807,7 @@
            }
            if (gateWay.GwId == this.gatewayViewRow.zbGatewayId)
            {
                Application.RunOnMainThread(() =>
                HdlThreadLogic.Current.RunMain(() =>
                {
                    //相同的状态,不需要再次刷新
                    if (this.gatewayViewRow.isOnline != online)
@@ -823,12 +848,12 @@
        /// </summary>
        private void RefreshDeviceOnlineStatu()
        {
            string gwId = GatewayResourse.NowSelectGatewayId;
            string gwId = HdlGatewayResourse.NowSelectGatewayId;
            HdlThreadLogic.Current.RunThread(() =>
            {
                if (this.Parent == null) { return; }
                //获取设备列表
                var listDevice = Common.LocalDevice.Current.GetDeviceByGatewayID(gwId);
                var listDevice = HdlDeviceCommonLogic.Current.GetDeviceByGatewayID(gwId);
                var listCheck = new List<string>();
                foreach (var device in listDevice)
                {
@@ -837,7 +862,7 @@
                    {
                        //只要一个回路即可
                        listCheck.Add(device.DeviceAddr);
                        var deviceInfo = Common.LocalDevice.Current.ReadDeviceEpointDeviceInfo(device);
                        var deviceInfo = HdlDeviceCommonLogic.Current.ReadDeviceEpointDeviceInfo(device);
                        if (deviceInfo != null)
                        {
                            //变更在线状态
@@ -848,7 +873,7 @@
                                this.ReceiveDeviceStatu(device);
                            }, ShowErrorMode.NO);
                        }
                        System.Threading.Thread.Sleep(30);
                        System.Threading.Thread.Sleep(50);
                    }
                }
            });
@@ -870,15 +895,15 @@
                return;
            }
            //刷新设备的在线状态
            string mainkeys = Common.LocalDevice.Current.GetDeviceMainKeys(device);
            var localDevice = Common.LocalDevice.Current.GetDevice(mainkeys);
            string mainkeys = HdlDeviceCommonLogic.Current.GetDeviceMainKeys(device);
            var localDevice = HdlDeviceCommonLogic.Current.GetDevice(mainkeys);
            if (localDevice != null)
            {
                //保存状态
                localDevice.IsOnline = device.IsOnline;
            }
            rowInfo.MenuRow.IsOnline = Common.LocalDevice.Current.CheckDeviceIsOnline(device);
            rowInfo.MenuRow.IsOnline = HdlDeviceCommonLogic.Current.CheckDeviceIsOnline(device);
            if (rowInfo.dicDetailRow != null)
            {
                foreach (var detailRow in rowInfo.dicDetailRow.Values)
@@ -954,10 +979,10 @@
                        return;
                    }
                    //添加升级固件信息(成不成功都无所谓)
                    var result = HdlFirmwareUpdateLogic.AddFirmwareVersionInfo(FirmwareLevelType.ZigbeeDevice, ota.HwVersion.ToString(), ota.ImgTypeId.ToString());
                    var result = HdlFirmwareUpdateLogic.Current.AddFirmwareVersionInfo(FirmwareLevelType.A设备, ota.HwVersion.ToString(), ota.ImgTypeId.ToString());
                    //获取设备最新版本
                    var deviceFirmware = HdlFirmwareUpdateLogic.GetFirmwareMostVersionInfo(FirmwareLevelType.ZigbeeDevice,
                    var deviceFirmware = HdlFirmwareUpdateLogic.Current.GetFirmwareMostVersionInfo(FirmwareLevelType.A设备,
                        ota.HwVersion.ToString(),
                        ota.ImgTypeId.ToString(),
                        ota.ImgVersion);
@@ -1000,11 +1025,11 @@
            //新建一个对象
            if (this.dicRowInfo.ContainsKey(deviceAddr) == false)
            {
                var localDevice = Common.LocalDevice.Current.GetDevicesByMac(deviceAddr);
                var localDevice = HdlDeviceCommonLogic.Current.GetDevicesByMac(deviceAddr);
                if (localDevice.Count == 0)
                {
                    //针对单纯只有一个200端点的设备
                    var ota = Common.LocalDevice.Current.GetOTADevice(deviceAddr);
                    var ota = HdlDeviceCommonLogic.Current.GetOTADevice(deviceAddr);
                    if (ota == null)
                    {
                        //入网之后,又把它删了
@@ -1014,8 +1039,8 @@
                }
                var rowNewInfo = new DeviceObjRowInfo();
                rowNewInfo.DeviceMac = deviceAddr;
                rowNewInfo.MacName = Common.LocalDevice.Current.GetDeviceMacName(localDevice[0]);
                rowNewInfo.DeviveTypeName = Common.LocalDevice.Current.GetDeviceObjectText(localDevice);
                rowNewInfo.MacName = HdlDeviceCommonLogic.Current.GetDeviceMacName(localDevice[0]);
                rowNewInfo.DeviveTypeName = HdlDeviceCommonLogic.Current.GetDeviceObjectText(localDevice);
                this.dicRowInfo[deviceAddr] = rowNewInfo;
                //创建新的行
@@ -1034,14 +1059,27 @@
        {
            if (this.dicRowInfo.ContainsKey(deviceAddr) == true)
            {
                var row = this.dicRowInfo[deviceAddr];
                row.MenuRow?.RefreshControlInfo(true);
                //明细
                if (row.dicDetailRow != null)
                var rowInfo = this.dicRowInfo[deviceAddr];
                //检测这个设备是否被删除 2020.01.13变更:追加Ota设备的判断
                if (HdlDeviceCommonLogic.Current.GetDevicesByMac(deviceAddr).Count == 0
                    && HdlDeviceCommonLogic.Current.GetOTADevice(deviceAddr) == null)
                {
                    foreach (var detailRow in row.dicDetailRow.Values)
                    //移除控件
                    rowInfo.dicDetailRow = null;
                    rowInfo.frameTable.RemoveFromParent();
                    this.dicRowInfo.Remove(deviceAddr);
                }
                else
                {
                    //刷新设备信息
                    rowInfo.MenuRow?.RefreshControlInfo(true);
                    if (rowInfo.dicDetailRow != null)
                    {
                        detailRow.RefreshControlInfo();
                        foreach (var contr in rowInfo.dicDetailRow.Values)
                        {
                            contr?.RefreshControlInfo();
                        }
                    }
                }
            }
@@ -1067,8 +1105,8 @@
                }
                //获取设备类型的
                var deviceEnumInfo = Common.LocalDevice.Current.GetMyDeviceEnumInfo(new List<CommonDevice>() { device });
                if (deviceEnumInfo.ConcreteType == Common.DeviceConcreteType.ButtonPanel_SimpleEnvironment)
                var deviceEnumInfo = HdlDeviceCommonLogic.Current.GetMyDeviceEnumInfo(new List<CommonDevice>() { device });
                if (deviceEnumInfo.ConcreteType == DeviceConcreteType.ButtonPanel_SimpleEnvironment)
                {
                    foreach (var outClu in device.OutClusterList)
                    {
@@ -1090,8 +1128,8 @@
            {
                var info = new DeviceObjRowInfo();
                info.DeviceMac = mac;
                info.MacName = Common.LocalDevice.Current.GetDeviceMacName(dic[mac][0]);
                info.DeviveTypeName = Common.LocalDevice.Current.GetDeviceObjectText(dic[mac]);
                info.MacName = HdlDeviceCommonLogic.Current.GetDeviceMacName(dic[mac][0]);
                info.DeviveTypeName = HdlDeviceCommonLogic.Current.GetDeviceObjectText(dic[mac]);
                this.dicRowInfo[mac] = info;
            }
        }
@@ -1105,32 +1143,22 @@
        /// </summary>
        public override int FormActionAgainEvent()
        {
            if (HdlGatewayResourse.AppOldSelectGatewayId != this.gatewayViewRow.zbGatewayId)
            {
                //这个网关被整掉了,需要重新初始化界面
                this.nowActionDeviceMac = null;
                this.oldShowRightMuneRow = null;
                //重新选择网关
                HdlGatewayLogic.Current.RefreshAppOldSelectGatewayId();
                //初始化界面
                this.InitMiddleFrame();
                return 1;
            }
            if (this.nowActionDeviceMac != null)
            {
                var rowInfo = this.dicRowInfo[nowActionDeviceMac];
                //检测这个设备是否被删除 2020.01.13变更:追加Ota设备的判断
                if (Common.LocalDevice.Current.GetDevicesByMac(nowActionDeviceMac).Count == 0
                    && Common.LocalDevice.Current.GetOTADevice(nowActionDeviceMac) == null)
                {
                    //移除控件
                    rowInfo.dicDetailRow = null;
                    rowInfo.frameTable.RemoveFromParent();
                    this.dicRowInfo.Remove(nowActionDeviceMac);
                    rowInfo = null;
                }
                else
                {
                    //刷新设备信息
                    rowInfo.MenuRow?.RefreshControlInfo(true);
                    if (rowInfo.dicDetailRow != null)
                    {
                        foreach (var contr in rowInfo.dicDetailRow.Values)
                        {
                            contr?.RefreshControlInfo();
                        }
                    }
                }
                //刷新指定设备行的信息
                this.RefreshDeviceRow(this.nowActionDeviceMac);
            }
            //清空记录
            this.nowActionDeviceMac = null;
@@ -1208,9 +1236,9 @@
            /// </summary>
            private NormalViewControl btnName = null;
            /// <summary>
            /// 在线状态
            /// 在线状态(初始状态为在线)
            /// </summary>
            public bool isOnline = false;
            public bool isOnline = true;
            /// <summary>
            /// 自定义网关控件
@@ -1255,11 +1283,11 @@
                {
                    btnName.Text = HdlGatewayLogic.Current.GetGatewayName(zbway);
                    //在线状态
                    this.isOnline = HdlGatewayLogic.Current.CheckGatewayOnlineByFlag(zbway);
                    if (this.isOnline == false)
                    {
                        btnName.TextColor = UserCenterColor.Current.TextGrayColor1;
                    }
                    //this.isOnline = HdlGatewayLogic.Current.CheckGatewayOnlineByMemory(zbway);
                    //if (this.isOnline == false)
                    //{
                    //    btnName.TextColor = UserCenterColor.Current.TextGrayColor1;
                    //}
                }
                else
                {
@@ -1324,7 +1352,7 @@
                    return;
                }
                //在线状态
                bool statu = HdlGatewayLogic.Current.CheckGatewayOnlineByFlag(zbway);
                bool statu = HdlGatewayLogic.Current.CheckGatewayOnlineByMemory(zbway);
                if (this.isOnline != statu)
                {
                    this.isOnline = statu;
@@ -1381,7 +1409,7 @@
                btnName.Height = Application.GetRealHeight(60);
                btnName.TextSize = 15;
                btnName.Y = Application.GetRealHeight(57);
                btnName.Text = "小度小度";
                btnName.Text = "智能音箱";
                this.AddRightArrow();
                this.AddMostRightView("", 300, false).Name = "smartSoundLayout";