From a9f88790c31c8b61d9b90241c4df258a980f1c00 Mon Sep 17 00:00:00 2001 From: BruceLee <BruceLee@nigel-3.local> Date: 星期二, 24 九月 2019 17:50:13 +0800 Subject: [PATCH] 新版本,需要vs2019,不然不要同步,不然估计会编译通不过 --- ZigbeeApp/Shared/Phone/UserCenter/Safety/GarrisonAreaListMenuForm.cs | 68 +++++++++++++++++++++++----------- 1 files changed, 46 insertions(+), 22 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Safety/GarrisonAreaListMenuForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Safety/GarrisonAreaListMenuForm.cs index 9caf2d2..c2a25bc 100755 --- a/ZigbeeApp/Shared/Phone/UserCenter/Safety/GarrisonAreaListMenuForm.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/Safety/GarrisonAreaListMenuForm.cs @@ -7,8 +7,14 @@ /// <summary> /// 闃插尯鍒楄〃鐨勮彍鍗曟帶浠� /// </summary> - public class GarrisonAreaListMenuForm : UserCenterCommonForm + public class GarrisonAreaListMenuForm : EditorCommonForm { + #region 鈻� 鍙橀噺澹版槑___________________________ + + #endregion + + #region 鈻� 鍒濆鍖朹____________________________ + /// <summary> /// 鐢婚潰鏄剧ず(搴曞眰浼氬浐瀹氳皟鐢ㄦ鏂规硶锛屽�熶互瀹屾垚鐢婚潰鍒涘缓) /// </summary> @@ -26,55 +32,73 @@ /// </summary> private void InitMiddleFrame() { + //娓呯┖bodyFrame + this.ClearBodyFrame(); + + var listView = new VerticalListControl(29); + listView.Y = Application.GetRealHeight(-6); + listView.Height = Application.GetRealHeight(792); + listView.BackgroundColor = UserCenterColor.Current.White; + bodyFrameLayout.AddChidren(listView); + //24灏忔椂闃插尯 string txtValue = Language.StringByID(R.MyInternationalizationString.u24HourSectors); - this.AddGarrisonAreaRow(bodyFrameLayout,txtValue, 1); + this.AddGarrisonAreaRow(listView, txtValue, 1); //闈欓煶闃插尯 txtValue = Language.StringByID(R.MyInternationalizationString.uMuteSectors); - this.AddGarrisonAreaRow(bodyFrameLayout, txtValue, 2); + this.AddGarrisonAreaRow(listView, txtValue, 2); //鍐呴儴闃插尯 txtValue = Language.StringByID(R.MyInternationalizationString.uInteriorSectors); - this.AddGarrisonAreaRow(bodyFrameLayout, txtValue, 4); + this.AddGarrisonAreaRow(listView, txtValue, 4); //鍛ㄧ晫闃插尯 txtValue = Language.StringByID(R.MyInternationalizationString.uPerimeterSectors); - this.AddGarrisonAreaRow(bodyFrameLayout, txtValue, 5); + this.AddGarrisonAreaRow(listView, txtValue, 5); //鍑哄叆闃插尯 txtValue = Language.StringByID(R.MyInternationalizationString.uInAndOutSectors); - this.AddGarrisonAreaRow(bodyFrameLayout, txtValue, 3); + this.AddGarrisonAreaRow(listView, txtValue, 3); } - + + #endregion + + #region 鈻� 娣诲姞闃插尯琛宊________________________ + + /// <summary> /// 娣诲姞闃插尯鍒楄〃鐨勮 /// </summary> - /// <param name="frameLayout">瀹瑰櫒鎺т欢</param> + /// <param name="listview">瀹瑰櫒鎺т欢</param> /// <param name="txtValue">鏄剧ず鐨勬枃鏈�</param> /// <param name="zoonId">闃插尯ID</param> - private StatuRowLayout AddGarrisonAreaRow(FrameLayout frameLayout, string txtValue, int zoonId) + private void AddGarrisonAreaRow(VerticalListControl listview, string txtValue, int zoonId) { - var statuRowLayout = new StatuRowLayout(); - statuRowLayout.Y = frameLayout.ChildrenCount * ControlCommonResourse.ListViewRowHeight; - frameLayout.AddChidren(statuRowLayout); - + var row = new FrameRowControl(listview.rowSpace / 2); + listview.AddChidren(row); + //鐐瑰彿鍥炬爣 + var btnIcon = row.AddLeftIcon(); + btnIcon.UnSelectedImagePath = "Item/Point.png"; //鏄剧ず鏂囨湰 - var txtView = new RowCenterView(false); - txtView.Text = txtValue; - statuRowLayout.AddChidren(txtView); - + var btnText = row.AddLeftCaption(txtValue, 400); + btnText.TextSize = 15; //鍚戝彸鍥炬爣 - statuRowLayout.AddRightIconControl(); + row.AddRightIconControl(); + if (zoonId != 3) + { + //搴曠嚎 + row.AddBottomLine(); + } //鍗曞嚮浜嬩欢 - statuRowLayout.MouseUpEvent += (sender, e) => + row.ButtonClickEvent += (sender, e) => { var form = new SectorsSettionMenuForm(); - this.AddForm(form, txtValue, zoonId); + form.AddForm(txtValue, zoonId); }; - - return statuRowLayout; } + + #endregion } } -- Gitblit v1.8.0