From 48ba446936b51fffafa7c3600c0dadc6ac0e8c20 Mon Sep 17 00:00:00 2001 From: 陈嘉乐 <cjl@hdlchina.com.cn> Date: 星期五, 10 七月 2020 10:52:13 +0800 Subject: [PATCH] 2020-07-10-01 --- ZigbeeApp/Shared/Phone/UserCenter/Safety/SafetyManagementMainForm.cs | 25 +++++++++++++++---------- 1 files changed, 15 insertions(+), 10 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Safety/SafetyManagementMainForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Safety/SafetyManagementMainForm.cs index 76d6357..777464d 100755 --- a/ZigbeeApp/Shared/Phone/UserCenter/Safety/SafetyManagementMainForm.cs +++ b/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); @@ -92,18 +92,18 @@ btnLog.TextAlignment = TextAlignment.Center; btnLog.TextID = R.MyInternationalizationString.uSecurityLog; btnLog.TextColor = UserCenterColor.Current.TextGrayColor3; - frameLog.AddChidren(btnLog, ChidrenBindMode.BindEventOnly); + frameLog.AddChidren(btnLog, ChidrenBindMode.BindEvent); //搴曠嚎 var btnLogLine = new NormalViewControl(40, 10, true); btnLogLine.Y = Application.GetRealHeight(86); btnLogLine.X = btnLog.X + btnLog.Width / 2 - Application.GetRealWidth(40) / 2; btnLogLine.Radius = (uint)Application.GetRealHeight(10) / 2; btnLogLine.BackgroundColor = UserCenterColor.Current.TextOrangeColor; - frameLog.AddChidren(btnLogLine, ChidrenBindMode.BindEventOnly); + frameLog.AddChidren(btnLogLine, ChidrenBindMode.BindEvent); btnLogLine.Visible = false; //浼犳劅鍣ㄧ姸鎬�(鐐瑰嚮鑼冨洿鏈夌偣灏忥紝闇�瑕佹墿澶у畠鐨勭偣鍑昏寖鍥�) - var frameSensor = new FrameLayoutControl(); + var frameSensor = new FrameLayoutStatuControl(); frameSensor.UseClickStatu = false; frameSensor.Height = frameLog.Height; frameSensor.Width = frameLog.Width; @@ -118,14 +118,14 @@ btnSensor.TextAlignment = TextAlignment.Center; btnSensor.TextColor = UserCenterColor.Current.TextColor2; btnSensor.IsBold = true; - frameSensor.AddChidren(btnSensor, ChidrenBindMode.BindEventOnly); + frameSensor.AddChidren(btnSensor, ChidrenBindMode.BindEvent); //搴曠嚎 var btnSensorLine = new NormalViewControl(40, 10, true); btnSensorLine.BackgroundColor = UserCenterColor.Current.TextOrangeColor; btnSensorLine.Y = btnLogLine.Y; btnSensorLine.X = btnSensor.X + btnSensor.Width / 2 - Application.GetRealWidth(40) / 2; btnSensorLine.Radius = (uint)Application.GetRealHeight(10) / 2; - frameSensor.AddChidren(btnSensorLine, ChidrenBindMode.BindEventOnly); + frameSensor.AddChidren(btnSensorLine, ChidrenBindMode.BindEvent); //瀹夐槻璁板綍Tab frameLog.ButtonClickEvent += (sender, e) => @@ -253,6 +253,8 @@ UserCenterResourse.ResidenceOption.SafetyShortcut = false; UserCenterResourse.ResidenceOption.Save(); btnShortCut.IsSelected = false; + //鍙栨秷涓婚〉鐨勩�屽畨闃层�嶆嵎寰勭殑璇�,涓婚〉闇�瑕侀噸鏂板埛鏂� + UserView.UserPage.Instance.RefreshForm = true; }); } else @@ -263,6 +265,8 @@ UserCenterResourse.ResidenceOption.SafetyShortcut = true; UserCenterResourse.ResidenceOption.Save(); btnShortCut.IsSelected = true; + //鍒涘缓涓婚〉鐨勩�屽畨闃层�嶆嵎寰勭殑璇�,涓婚〉闇�瑕侀噸鏂板埛鏂� + UserView.UserPage.Instance.RefreshForm = true; }); } }; @@ -454,7 +458,7 @@ //鑷畾涔変紶鎰熷櫒鐘舵�佹帶浠� var frameDevice = new SafetySensorStatuControl(); - listView.AddChidrenFrame(frameDevice); + listView.AddChidren(frameDevice); frameDevice.InitControl(device); //娣诲姞闃村奖鐗规晥 frameDevice.SetViewShadow(true); @@ -599,7 +603,8 @@ Application.RunOnMainThread(() => { //璁剧疆鎺т欢鐨勫湪绾跨姸鎬佹枃鏈晥鏋� - control?.SetOnlineStatu(device.IsOnline == 1); + bool bolOnline = Common.LocalDevice.Current.CheckDeviceIsOnline(device); + control?.SetOnlineStatu(bolOnline); }); } } @@ -685,7 +690,7 @@ //鎵ц鍒濆鍖� TodaySafeguardFrame = new SafeguardLogControl(); TodaySafeguardFrame.Y = Application.GetRealHeight(10); - listView.AddChidrenFrame(TodaySafeguardFrame); + listView.AddChidren(TodaySafeguardFrame); TodaySafeguardFrame.InitControl(nowDayKey, nowDayData); //鍒濆鍖栧叾浠栨棩鏈熺殑瀹夐槻璁板綍鎺т欢 @@ -693,7 +698,7 @@ { otherDaySafeguardFrame = new FrameLayout(); otherDaySafeguardFrame.Height = Application.GetRealHeight(10); - listView.AddChidrenFrame(otherDaySafeguardFrame); + listView.AddChidren(otherDaySafeguardFrame); foreach (var dayText in dicInfo.Keys) { //鎵ц鍒濆鍖� -- Gitblit v1.8.0