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/CommonForm/EditorCommonForm.cs | 586 +++++++++++++++++++++++++++++++---------------------------
1 files changed, 312 insertions(+), 274 deletions(-)
diff --git a/ZigbeeApp/Shared/Phone/CommonForm/EditorCommonForm.cs b/ZigbeeApp/Shared/Phone/CommonForm/EditorCommonForm.cs
old mode 100755
new mode 100644
index 0cbedac..c8aaf72
--- a/ZigbeeApp/Shared/Phone/CommonForm/EditorCommonForm.cs
+++ b/ZigbeeApp/Shared/Phone/CommonForm/EditorCommonForm.cs
@@ -1,8 +1,8 @@
-锘縰sing Shared.Phone.UserCenter;
+锘縰sing Shared.Phone.UserCenter;
using System;
-using System.Collections.Generic;
-using System.Threading.Tasks;
-
+using System.Collections.Generic;
+using System.Threading.Tasks;
+
namespace Shared.Phone
{
/// <summary>
@@ -15,10 +15,10 @@
#region 鈻� 鍙橀噺澹版槑___________________________
/// <summary>
- /// 杩斿洖鎸夐敭鐨勭偣鍑讳簨浠�(濡傛灉瀹炵幇姝や簨浠�,鍒欏簳灞傜殑浜嬩欢灏嗕笉浼氬啀瑙﹀彂)
- /// </summary>
- public Action<BackViewControl> BackButtonClickEvent = null;
- /// <summary>
+ /// 杩斿洖鎸夐敭鐨勭偣鍑讳簨浠�(濡傛灉瀹炵幇姝や簨浠�,鍒欏簳灞傜殑浜嬩欢灏嗕笉浼氬啀瑙﹀彂)
+ /// </summary>
+ public Action<BackViewControl> BackButtonClickEvent = null;
+ /// <summary>
/// TopMenuFrameLayout
/// </summary>
public NormalFrameLayout topMenuFrameLayout = null;
@@ -30,34 +30,34 @@
/// bodyFrameLayout
/// </summary>
public NormalFrameLayout bodyFrameLayout = null;
- /// <summary>
- /// 宸︽粦浣胯兘
+ /// <summary>
+ /// 宸︽粦浣胯兘
/// </summary>
private bool m_ScrollEnabled = true;
- /// <summary>
- /// 宸︽粦浣胯兘(鐣岄潰鍏抽棴鏃�,搴曞眰浼氳繕鍘�,鏃犻渶鍐嶅鐞�)
+ /// <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;
- }
- }
+ 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>
+ /// 缂撳瓨鍚姩鍙傛暟
/// </summary>
- private object[] m_parameter = null;
-
+ private object[] m_parameter = null;
+
#endregion
-
+
#region 鈻� 鍒濆鍖朹____________________________
-
+
/// <summary>
/// 鍒濆鍖栫晫闈㈡鏋�
/// </summary>
@@ -80,17 +80,17 @@
/// </summary>
/// <param name="parameter">鍚姩鍙傛暟</param>
public override void LoadShowFormMethod(params object[] parameter)
- {
- this.m_parameter = parameter;
+ {
+ this.m_parameter = parameter;
base.LoadShowFormMethod(parameter);
}
-
- #endregion
-
+
+ #endregion
+
#region 鈻� 鍒濆鍖栫晫闈________________________
-
+
#region 鈻� Top________________________________
-
+
/// <summary>
/// 鍒濆鍖栧ご閮ㄦ帶浠�
/// </summary>
@@ -106,7 +106,7 @@
topMenuFrameLayout.Height = ControlCommonResourse.TopMenuFrameHeight;
topMenuFrameLayout.BackgroundColor = UserCenterColor.Current.TopFrameLayout;
topMenuFrameLayout.Name = "topMenuFrameLayout";
- this.AddChidren(topMenuFrameLayout);
+ this.AddChidren(topMenuFrameLayout);
//TopFrameLayout鍋氭垚
topFrameLayout = new NormalFrameLayout();
@@ -121,278 +121,316 @@
btnLine.BackgroundColor = 0x40000000;
btnLine.Y = topFrameLayout.Height - 1;
topFrameLayout.AddChidren(btnLine);
- topFrameLayout.AddTag("btnLine", btnLine);
+ topFrameLayout.AddTag("btnLine", btnLine);
//杩斿洖閿�
var btnBack = new BackViewControl();
topFrameLayout.AddChidren(btnBack);
btnBack.InitControl();
- btnBack.ButtonClickEvent += (sender, e) =>
- {
- if (this.BackButtonClickEvent != null)
- {
- //濡傛灉瀹炵幇姝や簨浠�,鍒欏簳灞傜殑浜嬩欢灏嗕笉浼氬啀瑙﹀彂
- BackButtonClickEvent(btnBack);
- return;
- }
- //鐢婚潰鍏抽棴
- this.CloseForm();
- };
+ btnBack.ButtonClickEvent += (sender, e) =>
+ {
+ if (this.BackButtonClickEvent != null)
+ {
+ //濡傛灉瀹炵幇姝や簨浠�,鍒欏簳灞傜殑浜嬩欢灏嗕笉浼氬啀瑙﹀彂
+ BackButtonClickEvent(btnBack);
+ return;
+ }
+ //鐢婚潰鍏抽棴
+ this.CloseForm();
+ };
topFrameLayout.AddTag("btnBack", btnBack);
//鏍囬
- var txttitle = new Button();
+ var txttitle = new Button();
txttitle.Name = "txtTitle";
txttitle.TextSize = 17;
txttitle.X = Application.GetRealWidth(161);
txttitle.Height = Application.GetRealHeight(75);
txttitle.Width = Application.GetRealWidth(850);
txttitle.Gravity = Gravity.CenterVertical;
- txttitle.TextColor = UserCenterColor.Current.TopLayoutTitleText;
- txttitle.TextAlignment = TextAlignment.CenterLeft;
+ txttitle.TextColor = UserCenterColor.Current.TopLayoutTitleText;
+ txttitle.TextAlignment = TextAlignment.CenterLeft;
txttitle.IsBold = true;
topFrameLayout.AddChidren(txttitle);
topFrameLayout.AddTag("txtTitle", txttitle);
}
-
+
#endregion
-
+
#region 鈻� Middle_____________________________
-
+
/// <summary>
/// 鍒濆鍖栦腑閮ㄦ帶浠�
/// </summary>
public void InitBodyFrameLayout()
- {
+ {
if (bodyFrameLayout != null)
{
bodyFrameLayout.RemoveAll();
- }
+ }
bodyFrameLayout = new NormalFrameLayout();
bodyFrameLayout.Height = ControlCommonResourse.BodyFrameHeight;
bodyFrameLayout.Y = topFrameLayout.Bottom;
bodyFrameLayout.BackgroundColor = UserCenterColor.Current.BodyFrameLayout;
bodyFrameLayout.Name = "bodyFrameLayout";
this.AddChidren(bodyFrameLayout);
- }
-
+ }
+
#endregion
-
+
#endregion
-
- #region 鈻� 娣诲姞鐣岄潰___________________________
-
- /// <summary>
- /// 娣诲姞鐢婚潰,鍚姩鍙傛暟鐢辨寚瀹氱敾闈㈢殑ShowForm鍑芥暟鎵�鎸囧畾
- /// </summary>
- /// <param name="parameter">鍚姩鍙傛暟锛氬弬鏁扮敱鎸囧畾鐢婚潰鐨凷howForm鍑芥暟鎵�鎸囧畾</param>
- public override void AddForm(params object[] parameter)
- {
- //鐣岄潰鍔犺浇涓�
- ControlCommonResourse.IsFormAdding = true;
-
- base.AddForm(parameter);
-
+
+ #region 鈻� 娣诲姞鐣岄潰___________________________
+
+ /// <summary>
+ /// 娣诲姞鐢婚潰,鍚姩鍙傛暟鐢辨寚瀹氱敾闈㈢殑ShowForm鍑芥暟鎵�鎸囧畾
+ /// </summary>
+ /// <param name="parameter">鍚姩鍙傛暟锛氬弬鏁扮敱鎸囧畾鐢婚潰鐨凷howForm鍑芥暟鎵�鎸囧畾</param>
+ public override void AddForm(params object[] parameter)
+ {
+ //鐣岄潰鍔犺浇涓�
+ ControlCommonResourse.IsFormAdding = true;
+
+ base.AddForm(parameter);
+
//妫�娴嬭兘鍚﹁拷鍔犵敾闈� 2020.05.14鑸嶅純
//if (UserCenterLogic.CheckCanAddForm(this) == false)
//{
// return;
//}
- UserView.HomePage.Instance.AddChidren(this);
- UserView.HomePage.Instance.PageIndex += 1;
-
- //鍒濆鍖栫晫闈㈡鏋�
- this.InitForm();
-
- //鎵цShowForm()鏂规硶
- this.LoadShowFormMethod(parameter);
-
- //鐣岄潰鍔犺浇缁撴潫
- ControlCommonResourse.IsFormAdding = false;
- }
-
- #endregion
-
- #region 鈻� 鍏抽棴鐣岄潰___________________________
-
- /// <summary>
- /// 鐢婚潰鍏抽棴
- /// </summary>
- public override void CloseFormBefore()
- {
- base.CloseFormBefore();
-
- //宸︽粦浣胯兘
- this.ScrollEnabled = true;
-
- this.BackButtonClickEvent = null;
-
- this.m_parameter = null;
- //娓呯┖bodyFrame
- this.ClearBodyFrame();
- }
-
- #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 鈻� 鏄剧ず閲嶆柊鍔犺浇_______________________
+ UserView.HomePage.Instance.AddChidren(this);
+ UserView.HomePage.Instance.PageIndex += 1;
- /// <summary>
- /// 鏄剧ず閲嶆柊鍔犺浇鐨勭晫闈�(涓昏鏄敤鍦ㄧ晫闈㈠姞杞介敊璇椂锛屽啀娆″姞杞�)
- /// </summary>
- public override void ShowReLoadView()
- {
- HdlThreadLogic.Current.RunMain(() =>
- {
- if (bodyFrameLayout == null || bodyFrameLayout.Parent == null)
- {
- return;
- }
- //鍒囨崲涓洪噸鏂板姞杞芥ā寮忔椂鐨勪簨浠�
- this.ReLoadModelEventMethod();
-
- var frame = new FrameLayout();
- frame.BackgroundColor = UserCenterColor.Current.White;
- bodyFrameLayout.AddChidren(frame);
-
- //閲嶆柊鍔犺浇
- var btnReLoad = new BottomClickButton();
- btnReLoad.Gravity = Gravity.Center;
- btnReLoad.TextID = R.MyInternationalizationString.uDoReload;
- frame.AddChidren(btnReLoad);
- btnReLoad.ButtonClickEvent += (sender, e) =>
- {
- //鐐瑰嚮閲嶆柊鍔犺浇鏃�,鍏佽鍐嶆鑱旂綉
- HdlWifiLogic.Current.CanAccessHttp = true;
-
- //娓呴櫎鍏ㄩ儴鎺т欢
- this.ClearBodyFrame();
-
- //鎵цShowForm()鏂规硶瀹炵幇閲嶆柊鍔犺浇
- this.LoadShowFormMethod(this.m_parameter);
- };
-
- //娓呴櫎topFrameLayout鐨勯潪榛樿鐨勬帶浠�
- var list = new List<View>();
- for (int i = 0; i < topFrameLayout.ChildrenCount; i++)
- {
- var view = topFrameLayout.GetChildren(i);
- if (view.Name == "btnBack" || view.Name == "txtTitle")
- {
- //杩欓噷鏄粯璁ょ殑搴曞眰鎺т欢
- continue;
- }
- list.Add(view);
- }
- foreach (var view in list)
- {
- view?.RemoveFromParent();
- }
- });
- }
-
- /// <summary>
- /// 鍒囨崲涓恒�愰噸鏂板姞杞芥ā寮忋�戞椂鐨勪簨浠跺嚱鏁�,鏃ㄥ湪鍏抽棴鎵�鏈夌嚎绋嬩俊鎭�
- /// </summary>
- public virtual void ReLoadModelEventMethod()
- {
- }
-
- #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;
+ //鍒濆鍖栫晫闈㈡鏋�
+ this.InitForm();
+
+ //鎵цShowForm()鏂规硶
+ this.LoadShowFormMethod(parameter);
+
+ //鐣岄潰鍔犺浇缁撴潫
+ ControlCommonResourse.IsFormAdding = false;
}
- #endregion
-
+ #endregion
+
+ #region 鈻� 鍏抽棴鐣岄潰___________________________
+
+ /// <summary>
+ /// 鐢婚潰鍏抽棴
+ /// </summary>
+ public override void CloseFormBefore()
+ {
+ base.CloseFormBefore();
+
+ //宸︽粦浣胯兘
+ this.ScrollEnabled = true;
+
+ this.BackButtonClickEvent = null;
+
+ this.m_parameter = null;
+ //娓呯┖bodyFrame
+ this.ClearBodyFrame();
+ }
+
+ #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>
+ public override void ShowReLoadView()
+ {
+ HdlThreadLogic.Current.RunMain(() =>
+ {
+ if (bodyFrameLayout == null || bodyFrameLayout.Parent == null)
+ {
+ return;
+ }
+ //鍒囨崲涓洪噸鏂板姞杞芥ā寮忔椂鐨勪簨浠�
+ this.ReLoadModelEventMethod();
+
+ var frame = new FrameLayout();
+ frame.BackgroundColor = UserCenterColor.Current.White;
+ bodyFrameLayout.AddChidren(frame);
+
+ //閲嶆柊鍔犺浇
+ var btnReLoad = new BottomClickButton();
+ btnReLoad.Gravity = Gravity.Center;
+ btnReLoad.TextID = R.MyInternationalizationString.uDoReload;
+ frame.AddChidren(btnReLoad);
+ btnReLoad.ButtonClickEvent += (sender, e) =>
+ {
+ //鐐瑰嚮閲嶆柊鍔犺浇鏃�,鍏佽鍐嶆鑱旂綉
+ HdlWifiLogic.Current.CanAccessHttp = true;
+
+ //娓呴櫎鍏ㄩ儴鎺т欢
+ this.ClearBodyFrame();
+
+ //鎵цShowForm()鏂规硶瀹炵幇閲嶆柊鍔犺浇
+ this.LoadShowFormMethod(this.m_parameter);
+ };
+
+ //娓呴櫎topFrameLayout鐨勯潪榛樿鐨勬帶浠�
+ var list = new List<View>();
+ for (int i = 0; i < topFrameLayout.ChildrenCount; i++)
+ {
+ var view = topFrameLayout.GetChildren(i);
+ if (view.Name == "btnBack" || view.Name == "txtTitle")
+ {
+ //杩欓噷鏄粯璁ょ殑搴曞眰鎺т欢
+ continue;
+ }
+ list.Add(view);
+ }
+ foreach (var view in list)
+ {
+ view?.RemoveFromParent();
+ }
+ });
+ }
+
+ /// <summary>
+ /// 鍒囨崲涓恒�愰噸鏂板姞杞芥ā寮忋�戞椂鐨勪簨浠跺嚱鏁�,鏃ㄥ湪鍏抽棴鎵�鏈夌嚎绋嬩俊鎭�
+ /// </summary>
+ public virtual void ReLoadModelEventMethod()
+ {
+ }
+
+ #endregion
+
+ #region 鈻� 鏄剧ず寮圭獥杈撳叆鐣岄潰___________________
+
+ /// <summary>
+ /// <para>鏄剧ず涓�涓狣ialog鐨勫脊绐楄緭鍏ョ晫闈�,瀹冧笉浼氳嚜鍔ㄥ叧闂�,闇�瑕佹墜鍔ㄥ叧闂�</para>
+ /// <para>.CloseDialog()涓哄叧闂脊绐�</para>
+ /// <para>濡傛灉杈撳叆妗嗙殑鍐呭涓虹┖,骞朵笖璁剧疆鏈夈�恑_TipText銆�,鍒欎笉浼氳皟鐢ㄥ洖璋冨嚱鏁�,骞朵笖鎻愮ず銆恑_TipText銆戠殑鍐呭</para>
+ /// </summary>
+ /// <param name="i_TitleText">寮圭獥鐨勬爣棰樹俊鎭�</param>
+ /// <param name="i_InputText">杈撳叆妗嗗垵濮嬪寲鍊�(蹇界暐璇疯缃负null)</param>
+ /// <param name="i_TipText">杈撳叆妗嗙伆鑹插瓧浣撹鏄�(蹇界暐璇疯缃负null)</param>
+ /// <param name="i_ComfirmClickEvent">纭鎸夐挳浜嬩欢</param>
+ /// <returns></returns>
+ public void ShowDialogInputForm(string i_TitleText, string i_InputText, string i_TipText, Action<DialogInputControl, string> i_ComfirmClickEvent)
+ {
+ //鐢熸垚涓�涓脊绐楃敾闈�
+ var dialogForm = new DialogInputControl();
+ //鏍囬
+ dialogForm.SetTitleText(i_TitleText);
+ //杈撳叆妗嗙伆鑹插瓧浣撹鏄�
+ if (i_TipText != null)
+ {
+ dialogForm.SetTipText(i_TipText);
+ }
+ //杈撳叆妗嗗垵濮嬪��
+ if (i_InputText != null)
+ {
+ dialogForm.Text = i_InputText;
+ }
+
+ //鎸変笅纭鎸夐挳
+ dialogForm.ComfirmClickEvent += ((textValue) =>
+ {
+ i_ComfirmClickEvent?.Invoke(dialogForm, textValue);
+ });
+ }
+
+ #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>
@@ -402,17 +440,17 @@
{
return;
}
- if (bodyFrameLayout == null || bodyFrameLayout.Parent == null)
- {
- return;
+ if (bodyFrameLayout == null || bodyFrameLayout.Parent == null)
+ {
+ return;
}
bodyFrameLayout.RemoveAll();
- }
-
+ }
+
#endregion
-
+
#region 鈻� 涓�鑸殑鏂规硶_________________________
-
+
/// <summary>
/// 璁剧疆鏍囬淇℃伅
/// </summary>
@@ -432,8 +470,8 @@
//绉婚櫎杩斿洖閿�
var back = (BackViewControl)topFrameLayout.GetTagByKey("btnBack");
back?.RemoveFromParent();
- }
-
+ }
+
/// <summary>
/// 鑾峰彇杩斿洖閿�
/// </summary>
@@ -442,8 +480,8 @@
//绉婚櫎杩斿洖閿�
var back = (BackViewControl)topFrameLayout.GetTagByKey("btnBack");
return back;
- }
-
+ }
+
#endregion
}
}
--
Gitblit v1.8.0