From 0fa1534827bd21d763216550d11006fc1441c6cb Mon Sep 17 00:00:00 2001
From: tzy <hxb@hdlchina.com.cn>
Date: 星期五, 14 五月 2021 17:08:45 +0800
Subject: [PATCH] 门锁初始上传

---
 HDL_ON/UI/UI0-Stan/Controls/BottomControls/BottomDialogCommon.cs |   25 +++++++++++++++++++------
 1 files changed, 19 insertions(+), 6 deletions(-)

diff --git a/HDL_ON/UI/UI0-Stan/Controls/BottomControls/BottomDialogCommon.cs b/HDL_ON/UI/UI0-Stan/Controls/BottomControls/BottomDialogCommon.cs
index 02c68a4..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();
@@ -65,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 +93,7 @@
             btnCancel.TextColor = CSS_Color.PromptingColor1;
             btnCancel.TextID = StringId.Cancel;
             btnCancel.TextSize = CSS_FontSize.TextFontSize;
+            btnCancel.Width = btnCancel.GetRealWidthByText();
             frameWhiteBack.AddChidren(btnCancel);
 
             //鏍囬
@@ -97,13 +109,14 @@
 
             //纭
             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();
 

--
Gitblit v1.8.0