From 0de3ac9b3e2afea565dd9d028a89986a2e0a377d Mon Sep 17 00:00:00 2001
From: wxr <464027401@qq.com>
Date: 星期四, 18 十一月 2021 10:07:18 +0800
Subject: [PATCH] 增加siri扩展
---
HDL_ON/UI/UI0-Stan/Controls/BottomControls/BottomDialogCommon.cs | 30 +++++++++++++++++++++++-------
1 files changed, 23 insertions(+), 7 deletions(-)
diff --git a/HDL_ON/UI/UI0-Stan/Controls/BottomControls/BottomDialogCommon.cs b/HDL_ON/UI/UI0-Stan/Controls/BottomControls/BottomDialogCommon.cs
index e1c2277..cebb462 100644
--- a/HDL_ON/UI/UI0-Stan/Controls/BottomControls/BottomDialogCommon.cs
+++ b/HDL_ON/UI/UI0-Stan/Controls/BottomControls/BottomDialogCommon.cs
@@ -38,6 +38,10 @@
/// </summary>
public bool ClickBackClose = true;
/// <summary>
+ /// 鐐瑰嚮纭鏃跺叧闂晫闈�(鏈変簺鐣岄潰鐗规畩,涓嶅叧闂�)
+ /// </summary>
+ public bool ClickConfirmClose = true;
+ /// <summary>
/// 鏁翠釜寮圭獥瀵硅薄
/// </summary>
private Dialog FrameDialog = null;
@@ -49,7 +53,10 @@
/// <summary>
/// 鍒濆鍖栧簳灞傛帶浠�(杩斿洖鐨勬槸鍥涘懆鏈夊渾瑙掔殑鐧借壊鍖哄煙鎺т欢),姝ゆ柟娉曠敱灏佽鎺т欢搴曞眰璋冪敤,璇峰嬁闅忎究璋冪敤
/// </summary>
- public NormalFrameLayout InitBaseControl()
+ /// <param name="i_whiteWidth">鐧借壊鍖哄煙鐨勫搴�,鏈�濂戒笉瑕佹敼杩欎釜涓滆タ</param>
+ /// <param name="real">鏄惁璁$畻鐪熷疄鍊�</param>
+ /// <returns></returns>
+ public NormalFrameLayout InitBaseControl(int i_whiteWidth = 343, bool real = true)
{
//鏁翠釜鐏拌壊鐣岄潰
this.FrameDialog?.Close();
@@ -57,7 +64,6 @@
var dialogBody = new NormalFrameLayout();
FrameDialog.AddChidren(dialogBody);
- FrameDialog.Show();
dialogBody.ButtonClickEvent += (sender, e) =>
{
if (ClickBackClose == true && this.btnCancel != null)
@@ -66,13 +72,17 @@
}
};
- //鐧借壊鑳屾櫙
+ //鏍囬楂樺害
+ int titleHeight = Application.GetRealHeight(50);
+
+ //鐧借壊鑳屾櫙(鏍峰瓙鎮诞浜庣晫闈�,鍥涗釜瑙掗兘鏄渾瑙�)
var frameWhiteBack = new NormalFrameLayout();
- frameWhiteBack.Width = Application.GetRealWidth(343);
- frameWhiteBack.Height = RowHeight * (RowCount + 1);
+ frameWhiteBack.Width = real == true ? Application.GetRealWidth(i_whiteWidth) : i_whiteWidth;
+ frameWhiteBack.Height = RowHeight * RowCount + titleHeight;
frameWhiteBack.Radius = (uint)Application.GetRealWidth(12);
frameWhiteBack.Gravity = Gravity.CenterHorizontal;
- frameWhiteBack.Y = dialogBody.Height - RowHeight * (RowCount + 1) - Application.GetRealHeight(20);
+ //瀹冪殑搴曢儴鏈変釜20鐨勯棿璺�
+ frameWhiteBack.Y = dialogBody.Height - RowHeight * RowCount - titleHeight - Application.GetRealHeight(20);
frameWhiteBack.BackgroundColor = CSS_Color.MainBackgroundColor;
dialogBody.AddChidren(frameWhiteBack);
@@ -82,6 +92,8 @@
btnCancel.Y = Application.GetRealHeight(2);
btnCancel.TextColor = CSS_Color.PromptingColor1;
btnCancel.TextID = StringId.Cancel;
+ btnCancel.TextSize = CSS_FontSize.TextFontSize;
+ btnCancel.Width = btnCancel.GetRealWidthByText();
frameWhiteBack.AddChidren(btnCancel);
//鏍囬
@@ -97,12 +109,16 @@
//纭
this.btnConfirm = new NormalViewControl(90, 48, true);
- btnConfirm.X = frameWhiteBack.Width - Application.GetRealWidth(90) - btnCancel.X;
btnConfirm.Y = btnCancel.Y;
btnConfirm.TextAlignment = TextAlignment.CenterRight;
btnConfirm.TextColor = CSS_Color.MainColor;
btnConfirm.TextID = StringId.Confirm;
+ btnConfirm.TextSize = CSS_FontSize.TextFontSize;
+ btnConfirm.Width = btnConfirm.GetRealWidthByText();
frameWhiteBack.AddChidren(btnConfirm);
+ btnConfirm.X = frameWhiteBack.Width - btnConfirm.Width - btnCancel.X;
+
+ FrameDialog.Show();
return frameWhiteBack;
}
--
Gitblit v1.8.0