From 25429f085093d89d543a0b90e30d0d62d1b7dac9 Mon Sep 17 00:00:00 2001 From: hxb <hxb@hdlchina.com.cn> Date: 星期二, 30 八月 2022 09:37:38 +0800 Subject: [PATCH] 合并了IOS的代码 --- ZigbeeApp/Shared/Phone/UserCenter/Safety/GarrisonAreaSettionMenuForm.cs | 23 ++++++++++++++--------- 1 files changed, 14 insertions(+), 9 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Safety/GarrisonAreaSettionMenuForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Safety/GarrisonAreaSettionMenuForm.cs index 8e7bd5d..40a444d 100755 --- a/ZigbeeApp/Shared/Phone/UserCenter/Safety/GarrisonAreaSettionMenuForm.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/Safety/GarrisonAreaSettionMenuForm.cs @@ -97,6 +97,7 @@ //鍒濆鍖栥�愪俊鎭�氱煡銆戠殑琛� var row4 = new FrameRowControl(listView.rowSpace / 2); + row4.UseClickStatu = false; listView.AddChidren(row4); row4.AddLeftCaption(Language.StringByID(R.MyInternationalizationString.uInformationPush), 500); //寮�鍏冲浘鏍� @@ -122,8 +123,8 @@ /// <param name="btnswich"></param> private async void SetInformationPush(MostRightIconControl btnswich) { - //鑾峰彇鐘舵�� - int statu = HdlSafeguardLogic.Current.GetGarrisonInformationPushStatu(this.zoonID) == 0 ? 1 : 0; + //鑾峰彇鐘舵��(鍙栧弽) + int statu = btnswich.IsSelected == true ? 1 : 0; //鎵ц淇敼 var result = await HdlSafeguardLogic.Current.SetGarrisonInformationPushStatu(this.zoonID, statu); @@ -154,51 +155,55 @@ { //24灏忔椂闃插尯涓嶅彈甯冮槻銆佹挙闃插奖鍝峽0}闃插尯琚Е鍙戠珛鍗虫姤璀0}涓�鑸缃儫闆俱�佺噧姘斻�佹按娴哥瓑浼犳劅鍣� msg = Language.StringByID(R.MyInternationalizationString.u24HourSectorsTipMsg); - btnIcon.X = Application.GetRealWidth(223); } //闈欓煶闃插尯 else if (zoonID == 2) { //闈欓煶闃插尯涓嶅彈甯冮槻銆佹挙闃插奖鍝嶏紝闃插尯琚珄0}瑙﹀彂绔嬪嵆鎶ヨ锛岄�氬父涓嶄骇鐢熷0闊虫垨{0}鍏朵粬鎻愮ず锛屽彧鍙戦�佷俊鎭埌鐗瑰畾鐨勬帴鏀惰�� msg = Language.StringByID(R.MyInternationalizationString.uMuteSectorsTipMsg); - btnIcon.X = Application.GetRealWidth(182); } //鍐呴儴闃插尯 else if (zoonID == 4) { //鍦ㄧ瀹跺竷闃叉ā寮忎笅锛屽唴閮ㄩ槻鍖轰紶鎰熷櫒瑙﹀彂{0}绔嬪嵆鎶ヨ銆傚湪鍦ㄥ甯冮槻妯″紡涓媨0}鍐呴儴闃插尯鎵�鏈変紶鎰熷櫒涓嶅弬涓庢姤璀� msg = Language.StringByID(R.MyInternationalizationString.uInteriorSectorsTipMsg); - btnIcon.X = Application.GetRealWidth(159); } //鍛ㄧ晫闃插尯 else if (zoonID == 5) { //绂诲甯冮槻妯″紡鎴栧湪瀹跺竷闃叉ā寮忎笅{0}鍛ㄧ晫闃插尯浼犳劅鍣ㄨЕ鍙戠珛鍗虫姤璀� msg = Language.StringByID(R.MyInternationalizationString.uPerimeterSectorsTipMsg); - btnIcon.X = Application.GetRealWidth(229); } //鍑哄叆闃插尯 else { //鍦ㄥ竷闃插悗绯荤粺鎻愪緵涓�瀹氱殑寤惰繜鏃堕棿銆傚嚭闂ㄦ椂{0}澶栧嚭寤舵椂缁撴潫鍚庯紝绯荤粺瑙﹀彂鐩爣鎶ヨ{0}鍥炲鏃讹紝杩涘叆寤舵椂缁撴潫鍚庯紝绯荤粺瑙﹀彂鐩爣鎶ヨ msg = Language.StringByID(R.MyInternationalizationString.uInAndOutSectorsTipMsg); - btnIcon.X = Application.GetRealWidth(141); } var ArryMsg = msg.Split(new string[] { "{0}" }, StringSplitOptions.RemoveEmptyEntries); int yy = Application.GetRealHeight(1428); + int firstXX = 0; for (int i = 0; i < ArryMsg.Length; i++) { - var btnTip = new NormalViewControl(bodyFrameLayout.Width, Application.GetRealHeight(50), false); + var btnTip = new NormalViewControl(100, 50, true); + btnTip.Y = yy; btnTip.TextAlignment = TextAlignment.Center; btnTip.TextColor = UserCenterColor.Current.TextGrayColor1; btnTip.TextSize = 12; - btnTip.Y = yy; btnTip.Text = ArryMsg[i]; + btnTip.Width = btnTip.GetRealWidthByText(); + btnTip.Gravity = Gravity.CenterHorizontal; bodyFrameLayout.AddChidren(btnTip); yy = btnTip.Bottom; + if (i == 0) + { + //璁板綍绗竴鏉sg鐨刋杞� + firstXX = btnTip.X; + } } + btnIcon.X = firstXX - Application.GetRealWidth(23) - btnIcon.Width; } #endregion -- Gitblit v1.8.0