From 404cdc88627f942df7944af04ee05b9d527752d6 Mon Sep 17 00:00:00 2001
From: 黄学彪 <hxb@hdlchina.com.cn>
Date: 星期一, 30 九月 2019 13:22:40 +0800
Subject: [PATCH] 合并了徐梅的按键面板绑定
---
ZigbeeApp/Shared/Phone/UserCenter/Safety/GarrisonAreaListMenuForm.cs | 98 ++++++++++++++++++++++++++++++------------------
1 files changed, 61 insertions(+), 37 deletions(-)
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Safety/GarrisonAreaListMenuForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Safety/GarrisonAreaListMenuForm.cs
index 9caf2d2..d488975 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Safety/GarrisonAreaListMenuForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Safety/GarrisonAreaListMenuForm.cs
@@ -7,74 +7,98 @@
/// <summary>
/// 闃插尯鍒楄〃鐨勮彍鍗曟帶浠�
/// </summary>
- public class GarrisonAreaListMenuForm : UserCenterCommonForm
+ public class GarrisonAreaListMenuForm : EditorCommonForm
{
+ #region 鈻� 鍙橀噺澹版槑___________________________
+
+ #endregion
+
+ #region 鈻� 鍒濆鍖朹____________________________
+
/// <summary>
/// 鐢婚潰鏄剧ず(搴曞眰浼氬浐瀹氳皟鐢ㄦ鏂规硶锛屽�熶互瀹屾垚鐢婚潰鍒涘缓)
/// </summary>
- public void ShowForm()
- {
- //璁剧疆澶撮儴淇℃伅
- base.SetTitleText(Language.StringByID(R.MyInternationalizationString.uGarrisonAreaList));
-
- //鍒濆鍖栦腑閮ㄤ俊鎭�
- this.InitMiddleFrame();
- }
-
- /// <summary>
- /// 鍒濆鍖栦腑閮ㄤ俊鎭�
- /// </summary>
- private void InitMiddleFrame()
- {
+ public void ShowForm()
+ {
+ //璁剧疆澶撮儴淇℃伅
+ base.SetTitleText(Language.StringByID(R.MyInternationalizationString.uGarrisonAreaList));
+
+ //鍒濆鍖栦腑閮ㄤ俊鎭�
+ this.InitMiddleFrame();
+ }
+
+ /// <summary>
+ /// 鍒濆鍖栦腑閮ㄤ俊鎭�
+ /// </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)
+ /// <param name="zoonId">闃插尯ID</param>
+ 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.AddRightArrow();
+ 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