From a5b3c4bae726ef6770d4bfcbf2f4b50a37ed4a15 Mon Sep 17 00:00:00 2001
From: 黄学彪 <hxb@hdlchina.com.cn>
Date: 星期五, 06 三月 2020 15:31:36 +0800
Subject: [PATCH] 删除了郭雪城的 DeviceUi 这个类
---
ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Form/Base/EditorCommonForm.cs | 161 +++++++++++++++++++++++++++++++++++++++++++++++------
1 files changed, 143 insertions(+), 18 deletions(-)
diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Form/Base/EditorCommonForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Form/Base/EditorCommonForm.cs
index a912f8b..d152b43 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Form/Base/EditorCommonForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Form/Base/EditorCommonForm.cs
@@ -26,6 +26,25 @@
/// </summary>
public FrameLayout bodyFrameLayout = null;
/// <summary>
+ /// 宸︽粦浣胯兘
+ /// </summary>
+ private bool m_ScrollEnabled = true;
+ /// <summary>
+ /// 宸︽粦浣胯兘
+ /// </summary>
+ public bool ScrollEnabled
+ {
+ get { return m_ScrollEnabled; }
+ set
+ {
+ if (UserView.HomePage.Instance.ScrollEnabled != value)
+ {
+ UserView.HomePage.Instance.ScrollEnabled = value;
+ this.m_ScrollEnabled = value;
+ }
+ }
+ }
+ /// <summary>
/// 缂撳瓨鍚姩鍙傛暟
/// </summary>
private object[] m_parameter = null;
@@ -46,6 +65,9 @@
//鍒濆鍖栦腑閮ㄦ帶浠�
this.InitBodyFrameLayout();
+
+ //鍒濆宸︽粦浣胯兘鍙�
+ this.ScrollEnabled = true;
}
/// <summary>
@@ -89,6 +111,12 @@
topFrameLayout.Name = "topFrameLayout";
this.AddChidren(topFrameLayout);
+ //绾�
+ var btnLine = new NormalViewControl(topFrameLayout.Width, 1, false);
+ btnLine.BackgroundColor = 0x40000000;
+ btnLine.Y = topFrameLayout.Height - 1;
+ topFrameLayout.AddChidren(btnLine);
+
//杩斿洖閿�
var btnBack = new BackViewControl();
topFrameLayout.AddChidren(btnBack);
@@ -101,8 +129,18 @@
topFrameLayout.AddTag("btnBack", btnBack);
//鏍囬
- var txttitle = new TopLayoutTitleControl();
+ var txttitle = new Button();
+ txttitle.Name = "txtTitle";
+ txttitle.TextSize = 17;
+ txttitle.X = Application.GetRealWidth(161);
+ txttitle.Height = Application.GetRealHeight(69);
+ txttitle.Width = Application.GetRealWidth(850);
+ txttitle.Gravity = Gravity.CenterVertical;
+ txttitle.TextColor = UserCenterColor.Current.TopLayoutTitleText;
+ txttitle.TextAlignment = TextAlignment.CenterLeft;
+ txttitle.IsBold = true;
topFrameLayout.AddChidren(txttitle);
+
topFrameLayout.AddTag("txtTitle", txttitle);
}
@@ -139,6 +177,8 @@
/// <param name="parameter">鍚姩鍙傛暟锛氬弬鏁扮敱鎸囧畾鐢婚潰鐨凷howForm鍑芥暟鎵�鎸囧畾</param>
public override void AddForm(params object[] parameter)
{
+ base.AddForm(parameter);
+
//妫�娴嬭兘鍚﹁拷鍔犵敾闈�
if (UserCenterLogic.CheckCanAddForm(this) == false)
{
@@ -149,18 +189,10 @@
UserView.HomePage.Instance.PageIndex += 1;
//鍒濆鍖栫晫闈㈡鏋�
- this.InitForm();
-
- //寮哄埗鏄剧ず鐣岄潰,鍒濆鍖栧畬妗嗘灦鍚�,灏辩洿鎺ユ樉绀虹晫闈�
- new System.Threading.Thread(() =>
- {
- Application.RunOnMainThread(() =>
- {
- //鎵цShowForm()鏂规硶
- this.LoadShowFormMethod(parameter);
- });
- })
- { IsBackground = true }.Start();
+ this.InitForm();
+
+ //鎵цShowForm()鏂规硶
+ this.LoadShowFormMethod(parameter);
}
#endregion
@@ -170,13 +202,16 @@
/// <summary>
/// 鐢婚潰鍏抽棴
/// </summary>
- public override void CloseForm()
+ public override void CloseFormBefore()
{
+ base.CloseFormBefore();
+
+ //宸︽粦浣胯兘
+ this.ScrollEnabled = true;
+
this.m_parameter = null;
//娓呯┖bodyFrame
- this.ClearBodyFrame();
-
- base.CloseForm();
+ this.ClearBodyFrame();
}
#endregion
@@ -242,9 +277,99 @@
}
#endregion
+
+ #region 鈻� 娣诲姞甯姪鎺т欢_______________________
+ /// <summary>
+ /// 娣诲姞鏌ョ湅甯姪鎺т欢
+ /// </summary>
+ /// <returns></returns>
+ public NormalViewControl AddHelpControl()
+ {
+ //鏌ョ湅甯姪
+ var btnHelp = new NormalViewControl(bodyFrameLayout.Width, Application.GetRealHeight(50), false);
+ btnHelp.Y = Application.GetRealHeight(1388);
+ btnHelp.TextSize = 12;
+ btnHelp.TextAlignment = TextAlignment.Center;
+ btnHelp.TextColor = UserCenterColor.Current.TextOrangeColor;
+ btnHelp.Text = Language.StringByID(R.MyInternationalizationString.uSearchHelp);
+ bodyFrameLayout.AddChidren(btnHelp);
+ //搴曠嚎
+ int lineWidth = btnHelp.GetRealWidthByText();
+ var btnLine = new NormalViewControl(lineWidth, ControlCommonResourse.BottomLineHeight, false);
+ btnLine.BackgroundColor = UserCenterColor.Current.TextOrangeColor;
+ btnLine.Gravity = Gravity.CenterHorizontal;
+ btnLine.Y = btnHelp.Bottom - Application.GetRealHeight(8);
+ bodyFrameLayout.AddChidren(btnLine);
+
+ return btnHelp;
+ }
+
+ #endregion
+
+ #region 鈻� 鏄剧ず娌℃湁鏁版嵁鐨勫浘鍍忔樉绀虹壒鏁坃________
+
+ /// <summary>
+ /// 鏄剧ず娌℃湁鏁版嵁鐨勫浘鍍忔樉绀虹壒鏁�
+ /// </summary>
+ /// <param name="frameTable">瀹瑰櫒</param>
+ /// <param name="i_Text">鏄剧ず鏂囧瓧</param>
+ /// <param name="Imagepath">鍥惧儚鍦板潃</param>
+ /// <param name="imageWith">鍥惧儚瀹藉害(闈炵湡瀹炲��)</param>
+ /// <param name="imageHeight">鍥惧儚楂樺害(闈炵湡瀹炲��)</param>
+ public void ShowNotDataImage(FrameLayout frameTable, string i_Text, string Imagepath = "Item/NoFunction.png", int imageWith = 683, int imageHeight = 392)
+ {
+ this.ShowNotDataImage(frameTable, new string[] { i_Text }, Imagepath, imageWith, imageHeight);
+ }
+
+ /// <summary>
+ /// 鏄剧ず娌℃湁鏁版嵁鐨勫浘鍍忔樉绀虹壒鏁�
+ /// </summary>
+ /// <param name="frameTable">瀹瑰櫒</param>
+ /// <param name="listText">鏄剧ず鏂囧瓧</param>
+ /// <param name="Imagepath">鍥惧儚鍦板潃</param>
+ /// <param name="imageWith">鍥惧儚瀹藉害(闈炵湡瀹炲��)</param>
+ /// <param name="imageHeight">鍥惧儚楂樺害(闈炵湡瀹炲��)</param>
+ public void ShowNotDataImage(FrameLayout frameTable, string[] listText, string Imagepath = "Item/NoFunction.png", int imageWith = 683, int imageHeight = 392)
+ {
+ var btnPic = new PicViewControl(imageWith, imageHeight);
+ btnPic.UnSelectedImagePath = Imagepath;
+ btnPic.Y = (int)(frameTable.Height * 0.382) - Application.GetRealHeight(imageHeight / 2);
+ btnPic.Gravity = Gravity.CenterHorizontal;
+ frameTable.AddChidren(btnPic);
+
+ int yy = btnPic.Bottom + Application.GetRealHeight(32);
+ for (int i = 0; i < listText.Length; i++)
+ {
+ var btnView = new NormalViewControl(frameTable.Width, Application.GetRealHeight(50), false);
+ btnView.Y = yy;
+ btnView.Text = listText[i];
+ btnView.TextAlignment = TextAlignment.Center;
+ btnView.TextSize = 12;
+ btnView.TextColor = UserCenterColor.Current.TextGrayColor1;
+ frameTable.AddChidren(btnView);
+
+ yy = btnView.Bottom;
+ }
+ }
+
+ #endregion
+
+ #region 鈻� 鐣岄潰閲嶆柊婵�娲讳簨浠禵__________________
+
+ /// <summary>
+ /// <para>鑷韩鐨勪笂灞傜晫闈㈠叧闂悗,瀹冭嚜韬浜庢渶涓婂眰鏃�,瑙﹀彂鐨勪簨浠�</para>
+ /// <para>閲嶅啓鐨勬椂鍊欒繑鍥炲�艰杩斿洖1(杩斿洖鍊兼槸缁欏簳灞備娇鐢ㄧ殑)</para>
+ /// </summary>
+ public virtual int FormActionAgainEvent()
+ {
+ return -1;
+ }
+
+ #endregion
+
#region 鈻� 娓呯┖BodyFrame______________________
-
+
/// <summary>
/// 娓呯┖BodyFrame
/// </summary>
--
Gitblit v1.8.0