From 43b0d5870d528f23ecd6aeceb6cfd4325188b46f Mon Sep 17 00:00:00 2001
From: wxr <464027401@qq.com>
Date: 星期四, 01 七月 2021 15:50:43 +0800
Subject: [PATCH] Revert "1"

---
 HDL_ON/UI/UI0-Stan/Form/Base/EditorCommonForm.cs |   76 +++++++++++++++++++++++++++++++++----
 1 files changed, 67 insertions(+), 9 deletions(-)

diff --git a/HDL_ON/UI/UI0-Stan/Form/Base/EditorCommonForm.cs b/HDL_ON/UI/UI0-Stan/Form/Base/EditorCommonForm.cs
index 31bdbe3..85164ed 100644
--- a/HDL_ON/UI/UI0-Stan/Form/Base/EditorCommonForm.cs
+++ b/HDL_ON/UI/UI0-Stan/Form/Base/EditorCommonForm.cs
@@ -124,7 +124,35 @@
             btnTilte.TextSize = UI.CSS.CSS_FontSize.HeadlineFontSize;
             btnTilte.TextColor = UI.CSS.CSS_Color.FirstLevelTitleColor;
             topFrameLayout.AddChidren(btnTilte);
-            topFrameLayout.AddTag("txtTitle", btnTilte);
+            topFrameLayout.AddTag("txtTitle", btnTilte);
+#if DEBUG
+            btnTilte.MouseLongEventHandler += (sender, e) =>
+            {
+
+                var form = new BottomMenuSelectControl(3);
+                form.AddMenu("鍒囨崲涓轰腑鏂�", () =>
+                {
+                    Language.CurrentLanguage = "Chinese";
+                    //娓呴櫎鍏ㄩ儴鎺т欢
+                    this.ClearBodyFrame();
+                    //鎵цShowForm()鏂规硶瀹炵幇閲嶆柊鍔犺浇
+                    this.LoadShowFormMethod(this.m_parameter);
+                });
+                form.AddMenu("鍒囨崲涓鸿嫳鏂�", () =>
+                {
+                    Language.CurrentLanguage = "English";
+                    //娓呴櫎鍏ㄩ儴鎺т欢
+                    this.ClearBodyFrame();
+                    //鎵цShowForm()鏂规硶瀹炵幇閲嶆柊鍔犺浇
+                    this.LoadShowFormMethod(this.m_parameter);
+                });
+                form.AddMenu("鏌ョ湅鏈湴鏂囦欢", () =>
+                {
+                    var form2 = new HideOptionDirectoryListForm();
+                    form2.AddForm();
+                });
+            };
+#endif
         }
 
         #endregion
@@ -290,7 +318,7 @@
         #region 鈻� 娣诲姞鍒楄〃娑堟伅鏄剧ず鎺т欢_______________
 
         /// <summary>
-        /// 娣诲姞鍒楄〃娑堟伅鏄剧ず鎺т欢,杩斿洖鐨勬槸鏈�鍚庝竴涓帶浠剁殑搴曢儴鍧愭爣
+        /// 娣诲姞鍒楄〃娑堟伅鏄剧ず鎺т欢,杩斿洖鐢熸垚鐨勬帶浠�(娌$湅鎳傝繖涓嚱鏁板墠,璇峰嬁浣跨敤,瀹冧笉浼氬府璁$畻鎹㈣)
         /// </summary>
         /// <param name="frameTable">妗屽竷瀹瑰櫒鎺т欢</param>
         /// <param name="i_msg">鏄剧ず鐨勬秷鎭�(鎹㈣璇蜂娇鐢ㄣ�恵0}銆戣繘琛屽垎鍓�)</param>
@@ -303,12 +331,37 @@
         /// <para>娉細闄や簡鏂板缓杩欎釜鍑芥暟鐨勫紑鍙戣�呬互澶栵紝閮戒笉寤鸿鎶婅繖涓�间笉璁剧疆涓簍rue</para>
         /// <para>璇存槑锛氫互鏈�闀跨殑鎺т欢鐨刋杞翠负鍩哄噯,鎵�鏈夋帶浠剁殑X杞撮兘鍙樻垚涓�鑷�</para>
         /// </param>
+        /// <param name="i_width">鏂囨湰瀹藉害,鐪熷疄鍊�,褰撲负-1鏃�,鍐呴儴鑷姩璁$畻</param>
         /// <returns></returns>
-        public int AddListMsgControls(FrameLayout frameTable, string i_msg, int i_fontSize, uint i_fontColor, int i_height,
-            int i_yy, TextAlignment alignment = TextAlignment.Center, bool special = false)
+        public List<NormalViewControl> AddListMsgControls(FrameLayout frameTable, string i_msg, int i_fontSize, uint i_fontColor, int i_height,
+            int i_yy, TextAlignment alignment = TextAlignment.Center, bool special = false, int i_width = -1)
         {
             var listMsg = i_msg.Split(new string[] { "{0}" }, StringSplitOptions.RemoveEmptyEntries);
-            int defultWidth = this.bodyFrameLayout.Width - HdlControlResourse.XXLeft * 2;
+            int defultWidth = 0;
+            if (this.bodyFrameLayout != null)
+            {
+                defultWidth = i_width == -1 ? this.bodyFrameLayout.Width - HdlControlResourse.XXLeft * 2 : i_width;
+            }
+            else
+            {
+                defultWidth = i_width == -1 ? frameTable.Width - HdlControlResourse.XXLeft * 2 : i_width;
+            }
+
+            //濡傛灉鍙槸涓�琛岀殑鏃跺��
+            bool isMoreLine = false;
+            if (listMsg.Length == 1)
+            {
+                var btnTemp = new ButtonCtrBase();
+                btnTemp.TextSize = i_fontSize;
+                btnTemp.Text = i_msg;
+                int rowCount = btnTemp.GetRealRowCountByText(defultWidth);
+                //瀹冪殑楂樺害鐢辫鏁板喅瀹�(鐞嗚涓婂簲璇ラ兘鏄�1琛�,杩欓噷鍋氱壒娈婂鐞嗚�屽凡)
+                if (rowCount > 1)
+                {
+                    i_height = i_height * rowCount;
+                    isMoreLine = true;
+                }
+            }
 
             var listContr = new List<NormalViewControl>();
             int minXX = 10086;//鎺т欢闆嗗悎鏈�灏忕殑X杞�
@@ -322,9 +375,14 @@
                 btnMsg.TextColor = i_fontColor;
                 btnMsg.TextSize = i_fontSize;
                 btnMsg.Text = strMsg;
+                if (isMoreLine == true)
+                {
+                    //鍙互鎹㈣
+                    btnMsg.IsMoreLines = isMoreLine;
+                }
 
                 //鐗规畩澶勭悊
-                if (special == true && alignment == TextAlignment.Center)
+                if (special == true)
                 {
                     //璁剧疆瀹冪殑鐪熷疄瀹藉害(瀵箂pecial鍙橀噺鏈夌敤)
                     int realWidth = btnMsg.GetRealWidthByText();
@@ -342,7 +400,7 @@
                 i_yy = btnMsg.Bottom + Application.GetRealHeight(4);
             }
             //鐗规畩澶勭悊
-            if (special == true && alignment == TextAlignment.Center)
+            if (special == true)
             {
                 foreach (var contr in listContr)
                 {
@@ -351,7 +409,7 @@
                 }
             }
 
-            return i_yy - Application.GetRealHeight(4);
+            return listContr;
         }
 
         #endregion
@@ -417,7 +475,7 @@
         public void RemoveBackButton()
         {
             //绉婚櫎杩斿洖閿�
-            var back = (NormalViewControl)topFrameLayout.GetTagByKey("btnBack");
+            var back = (PicViewControl)topFrameLayout.GetTagByKey("btnBack");
             topFrameLayout.RemoveTag("btnBack");
             back?.RemoveFromParent();
 

--
Gitblit v1.8.0