From 6fa9d69da922c8049f5acfcbb9ce9fd26811024c Mon Sep 17 00:00:00 2001 From: xm <1271024303@qq.com> Date: 星期四, 16 四月 2020 17:10:57 +0800 Subject: [PATCH] 请合并代码 --- ZigbeeApp/Shared/Phone/UserCenter/Safety/SafetyManagementMainForm.cs | 34 +++++++++++++++++++++++++--------- 1 files changed, 25 insertions(+), 9 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Safety/SafetyManagementMainForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Safety/SafetyManagementMainForm.cs index 37253bc..76d6357 100755 --- a/ZigbeeApp/Shared/Phone/UserCenter/Safety/SafetyManagementMainForm.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/Safety/SafetyManagementMainForm.cs @@ -69,7 +69,7 @@ frameBack.Height = Application.GetRealHeight(1300); frameBack.Y = Application.GetRealHeight(444); frameBack.BackgroundColor = 0xa1ffffff; - frameBack.SetCornerWithSameRadius(20, HDLUtils.RectCornerTopLeft | HDLUtils.RectCornerTopRight); + frameBack.SetCornerWithSameRadius(Application.GetRealHeight(58), HDLUtils.RectCornerTopLeft | HDLUtils.RectCornerTopRight); bodyFrameLayout.AddChidren(frameBack); //妗屽竷鎺т欢 @@ -117,6 +117,7 @@ btnSensor.TextSize = 16; btnSensor.TextAlignment = TextAlignment.Center; btnSensor.TextColor = UserCenterColor.Current.TextColor2; + btnSensor.IsBold = true; frameSensor.AddChidren(btnSensor, ChidrenBindMode.BindEventOnly); //搴曠嚎 var btnSensorLine = new NormalViewControl(40, 10, true); @@ -132,8 +133,10 @@ //瀛椾綋澶у皬鍜岄鑹插彉鏇� btnSensor.TextColor = UserCenterColor.Current.TextGrayColor3; btnSensor.TextSize = 14; + btnSensor.IsBold = false; btnLog.TextColor = UserCenterColor.Current.TextColor2; btnLog.TextSize = 16; + btnLog.IsBold = true; btnLogLine.Visible = true; btnSensorLine.Visible = false; @@ -150,8 +153,10 @@ //瀛椾綋澶у皬鍜岄鑹插彉鏇� btnSensor.TextColor = UserCenterColor.Current.TextColor2; btnSensor.TextSize = 16; + btnSensor.IsBold = true; btnLog.TextColor = UserCenterColor.Current.TextGrayColor3; btnLog.TextSize = 14; + btnLog.IsBold = false; btnLogLine.Visible = false; btnSensorLine.Visible = true; @@ -185,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", () => @@ -233,7 +238,7 @@ topFrameLayout.AddChidren(btnShortCut); btnShortCut.InitControl(); - if (UserCenterResourse.Option.SafetyShortcut == true) + if (UserCenterResourse.ResidenceOption.SafetyShortcut == true) { //浣跨敤蹇嵎鏂瑰紡 btnShortCut.IsSelected = true; @@ -245,8 +250,8 @@ //纭畾鍙栨秷涓婚〉鐨勩�屽畨闃层�嶆嵎寰勶紵 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; }); } @@ -255,8 +260,8 @@ //纭畾鍒涘缓銆屽畨闃层�嶆嵎寰勫埌涓婚〉锛� 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; }); } @@ -423,6 +428,8 @@ } } } + //璋冩暣鍒楄〃鎺т欢楂樺害 + listView.AdjustChidrenFrameHeight(listView.frameTable, Application.GetRealHeight(46)); //寮�鍚紶鎰熷櫒鎶ヨ鐩戣 this.StartCheckDeviceAlarm(); //寮�鍚澶囧湪绾跨洃娴� @@ -483,7 +490,7 @@ var control = this.dicSensorStatuView[mainkey]; //鑾峰彇浼犳劅鍣ㄦ姤璀︿俊鎭殑缈昏瘧鏂囨湰 var msgInfo = HdlAlarmsLogic.Current.GetSensorAlarmInfo(device); - Application.RunOnMainThread(() => + HdlThreadLogic.Current.RunMain(() => { control?.SetSensoReportInfo(msgInfo); }); @@ -542,7 +549,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]); + } + } } }); } -- Gitblit v1.8.0