黄学彪
2020-05-21 98ceb6bd2021f9ff136cda27eef28676dd7b5d92
ZigbeeApp/Shared/Phone/UserCenter/Safety/SafetyManagementMainForm.cs
@@ -79,7 +79,7 @@
            frameBack.AddChidren(frameLayoutDraw);
            //安防记录(点击范围有点小,需要扩大它的点击范围)
            var frameLog = new FrameLayoutControl();
            var frameLog = new FrameLayoutStatuControl();
            frameLog.UseClickStatu = false;
            frameLog.Height = Application.GetRealHeight(123);
            frameLog.Width = Application.GetRealWidth(273);
@@ -103,7 +103,7 @@
            btnLogLine.Visible = false;
            //传感器状态(点击范围有点小,需要扩大它的点击范围)
            var frameSensor = new FrameLayoutControl();
            var frameSensor = new FrameLayoutStatuControl();
            frameSensor.UseClickStatu = false;
            frameSensor.Height = frameLog.Height;
            frameSensor.Width = frameLog.Width;
@@ -190,7 +190,7 @@
                btnIcon.ButtonClickEvent += (sender, e) =>
                {
                    //菜单控件
                    var frameMenu = new TopRightMenuControl(2);
                    var frameMenu = new TopRightMenuControl(2, 2);
                    //防区列表
                    string menu1 = Language.StringByID(R.MyInternationalizationString.uGarrisonAreaList);
                    frameMenu.AddRowMenu(menu1, "Item/GarrisonList.png", "Item/GarrisonListSelected.png", () =>
@@ -238,7 +238,7 @@
            topFrameLayout.AddChidren(btnShortCut);
            btnShortCut.InitControl();
            if (UserCenterResourse.Option.SafetyShortcut == true)
            if (UserCenterResourse.ResidenceOption.SafetyShortcut == true)
            {
                //使用快捷方式
                btnShortCut.IsSelected = true;
@@ -250,9 +250,11 @@
                    //确定取消主页的「安防」捷径?
                    this.ShowMassage(ShowMsgType.Confirm, Language.StringByID(R.MyInternationalizationString.uCancelSafetyShortcutMsg), () =>
                    {
                        UserCenterResourse.Option.SafetyShortcut = false;
                        UserCenterResourse.Option.Save();
                        UserCenterResourse.ResidenceOption.SafetyShortcut = false;
                        UserCenterResourse.ResidenceOption.Save();
                        btnShortCut.IsSelected = false;
                        //取消主页的「安防」捷径的话,主页需要重新刷新
                        UserView.UserPage.Instance.RefreshForm = true;
                    });
                }
                else
@@ -260,9 +262,11 @@
                    //确定创建「安防」捷径到主页?
                    this.ShowMassage(ShowMsgType.Confirm, Language.StringByID(R.MyInternationalizationString.uCreatSafetyShortcutMsg), () =>
                    {
                        UserCenterResourse.Option.SafetyShortcut = true;
                        UserCenterResourse.Option.Save();
                        UserCenterResourse.ResidenceOption.SafetyShortcut = true;
                        UserCenterResourse.ResidenceOption.Save();
                        btnShortCut.IsSelected = true;
                        //创建主页的「安防」捷径的话,主页需要重新刷新
                        UserView.UserPage.Instance.RefreshForm = true;
                    });
                }
            };
@@ -490,7 +494,7 @@
                var control = this.dicSensorStatuView[mainkey];
                //获取传感器报警信息的翻译文本
                var msgInfo = HdlAlarmsLogic.Current.GetSensorAlarmInfo(device);
                Application.RunOnMainThread(() =>
                HdlThreadLogic.Current.RunMain(() =>
                {
                    control?.SetSensoReportInfo(msgInfo);
                });
@@ -549,7 +553,16 @@
                        //界面关闭
                        return;
                    }
                    Common.LocalDevice.Current.GetDeviceListFromGateway(zbway, false, this.ReceiveDeviceStatuPush, ShowErrorMode.NO);
                    int statu = 0;
                    var list = Common.LocalDevice.Current.GetDeviceListFromGateway(zbway, ref statu, false, ShowErrorMode.NO);
                    if (statu != -1)
                    {
                        for (int i = 0; i < list.Count; i++)
                        {
                            //设置设备在线状态
                            this.ReceiveDeviceStatuPush(list[i]);
                        }
                    }
                }
            });
        }
@@ -590,7 +603,8 @@
                    Application.RunOnMainThread(() =>
                    {
                        //设置控件的在线状态文本效果
                        control?.SetOnlineStatu(device.IsOnline == 1);
                        bool bolOnline = Common.LocalDevice.Current.CheckDeviceIsOnline(device);
                        control?.SetOnlineStatu(bolOnline);
                    });
                }
            }