gxc
2019-10-17 1f65fe366062b3f2cda6b03e1849afce6d2646f8
ZigbeeApp/Shared/Phone/UserCenter/Safety/SafetyManagementMainForm.cs
@@ -326,7 +326,7 @@
            listView.Height = frameLayoutDraw.Height;
            frameLayoutDraw.AddChidren(listView);
            new System.Threading.Thread(() =>
            HdlThreadLogic.Current.RunThread(() =>
            {
                //获取安防的全部传感器设备的信息
                var dicDevice = HdlSafeguardLogic.Current.GetAllSensorDeviceInfo();
@@ -363,8 +363,7 @@
                        }
                    });
                }
            })
            { IsBackground = true }.Start();
            });
        }
        /// <summary>
@@ -454,7 +453,7 @@
            oldGetOnlineTime = DateTime.Now;
            //从设备列表中获取在线状态
            new System.Threading.Thread(async () =>
            HdlThreadLogic.Current.RunThread(async () =>
            {
                //首先获取这些传感器所在的网关
                var listWay = new List<ZbGateway>();
@@ -475,19 +474,18 @@
                        //界面关闭
                        return;
                    }
                    await Common.LocalDevice.Current.GetDeviceListFromGateway(zbway, this.ReceiveDeviceStatuPush, ShowErrorMode.NO);
                    await Common.LocalDevice.Current.GetDeviceListFromGateway(zbway, false, this.ReceiveDeviceStatuPush, ShowErrorMode.NO);
                }
            })
            { IsBackground = true }.Start();
            });
        }
        /// <summary>
        /// 接受设备在线推送(不要忘记最后它会推送一个Null的东西过来)
        /// 接受设备在线推送
        /// </summary>
        /// <param name="device"></param>
        private void ReceiveDeviceStatuPush(CommonDevice device)
        {
            if (this.Parent == null || device == null)
            if (this.Parent == null)
            {
                //界面关闭
                return;
@@ -557,7 +555,7 @@
            listView.Height = frameLayoutDraw.Height;
            frameLayoutDraw.AddChidren(listView);
            new System.Threading.Thread(() =>
            HdlThreadLogic.Current.RunThread(() =>
            {
                var dicAlarm = HdlAlarmsLogic.Current.GetSafeguardAlarmInfo();
                var dicInfo = new Dictionary<string, Dictionary<int, List<SafeguardAlarmInfo>>>();
@@ -630,8 +628,7 @@
                    //开启传感器报警监视
                    this.StartCheckDeviceAlarm();
                });
            })
            { IsBackground = true }.Start();
            });
        }
        /// <summary>
@@ -711,7 +708,7 @@
        /// <summary>
        /// 自身的上层界面关闭后,它自身处于最上层时,触发的事件
        /// </summary>
        public override void FormActionAgainEvent()
        public override int FormActionAgainEvent()
        {
            //设置布防按钮的可视状态
            garrisonControl?.SetButtonVisible();
@@ -726,6 +723,7 @@
                //设置传感器数据到画面
                this.SetSensorDataToForm();
            }
            return 1;
        }
        #endregion