HDL Home App 第二版本 旧平台金堂用 正在使用
黄学彪
2019-10-10 2ed75b8b337048e5d75e6d9ec8307633134f02fd
ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceListMainForm.cs
@@ -95,12 +95,11 @@
            //初始化搜索控件
            this.InitSearchControl();
            new System.Threading.Thread(() =>
            HdlThreadLogic.Current.RunThread(() =>
            {
                //初始化设备列表控件
                this.InitDeviceListControl();
            })
            { IsBackground = true }.Start();
            });
        }
        #endregion
@@ -416,7 +415,7 @@
            }
            string selectGwId = HdlGatewayLogic.Current.GetGatewayId(GatewayResourse.NowSelectGateway);
            new System.Threading.Thread(() =>
            HdlThreadLogic.Current.RunThread(() =>
            {
                ZbGateway zbGateway = HdlGatewayLogic.Current.GetLocalGateway(selectGwId);
                if (zbGateway == null)
@@ -436,8 +435,7 @@
                        this.StartDeviceListControlThread(online);
                    }
                });
            })
            { IsBackground = true }.Start();
            });
        }
        /// <summary>
@@ -519,13 +517,12 @@
                return;
            }
            string gwId = HdlGatewayLogic.Current.GetGatewayId(GatewayResourse.NowSelectGateway);
            new System.Threading.Thread(async () =>
            HdlThreadLogic.Current.RunThread(async () =>
            {
                //这里主要只是获取在线状态
                var zbway = HdlGatewayLogic.Current.GetLocalGateway(gwId);
                var result = await Common.LocalDevice.Current.GetDeviceListFromGateway(zbway, this.ReceiveDeviceStatuPush);
            })
            { IsBackground = true }.Start();
            });
        }
        /// <summary>
@@ -604,7 +601,7 @@
        /// <param name="list">ota设备</param>
        private void CheckDeviceNewVersion(List<OTADevice> list)
        {
            new System.Threading.Thread(async () =>
            HdlThreadLogic.Current.RunThread(async () =>
            {
                await System.Threading.Tasks.Task.Delay(2000);
                foreach (var ota in list)
@@ -644,8 +641,7 @@
                        }
                    });
                }
            })
            { IsBackground = true }.Start();
            });
        }
        #endregion
@@ -762,11 +758,11 @@
        /// <summary>
        /// 自身的上层界面关闭后,它自身处于最上层时,触发的事件
        /// </summary>
        public override void FormActionAgainEvent()
        public override int FormActionAgainEvent()
        {
            if (this.nowActionDeviceMac == null)
            {
                return;
                return 1;
            }
            var rowInfo = this.dicRowInfo[nowActionDeviceMac];
            //检测这个设备是否被删除
@@ -795,6 +791,8 @@
            this.nowActionDeviceMac = null;
            //网关控件刷新
            this.gatewayViewRow.RefreshControl();
            return 1;
        }
        #endregion