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 |  173 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 171 insertions(+), 2 deletions(-)

diff --git a/HDL_ON/UI/UI0-Stan/Form/Base/EditorCommonForm.cs b/HDL_ON/UI/UI0-Stan/Form/Base/EditorCommonForm.cs
old mode 100755
new mode 100644
index 0f0e916..85164ed
--- 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
@@ -287,6 +315,147 @@
 
         #endregion
 
+        #region 鈻� 娣诲姞鍒楄〃娑堟伅鏄剧ず鎺т欢_______________
+
+        /// <summary>
+        /// 娣诲姞鍒楄〃娑堟伅鏄剧ず鎺т欢,杩斿洖鐢熸垚鐨勬帶浠�(娌$湅鎳傝繖涓嚱鏁板墠,璇峰嬁浣跨敤,瀹冧笉浼氬府璁$畻鎹㈣)
+        /// </summary>
+        /// <param name="frameTable">妗屽竷瀹瑰櫒鎺т欢</param>
+        /// <param name="i_msg">鏄剧ず鐨勬秷鎭�(鎹㈣璇蜂娇鐢ㄣ�恵0}銆戣繘琛屽垎鍓�)</param>
+        /// <param name="i_fontSize">瀛椾綋澶у皬</param>
+        /// <param name="i_fontColor">瀛椾綋棰滆壊</param>
+        /// <param name="i_height">鎺т欢楂樺害(鐪熷疄鍊�)</param>
+        /// <param name="i_yy">Y杞村垵濮嬪潗鏍�(鐪熷疄鍊�)</param>
+        /// <param name="alignment">鏂囧瓧瀵归綈鏂瑰紡</param>
+        /// <param name="special">
+        /// <para>娉細闄や簡鏂板缓杩欎釜鍑芥暟鐨勫紑鍙戣�呬互澶栵紝閮戒笉寤鸿鎶婅繖涓�间笉璁剧疆涓簍rue</para>
+        /// <para>璇存槑锛氫互鏈�闀跨殑鎺т欢鐨刋杞翠负鍩哄噯,鎵�鏈夋帶浠剁殑X杞撮兘鍙樻垚涓�鑷�</para>
+        /// </param>
+        /// <param name="i_width">鏂囨湰瀹藉害,鐪熷疄鍊�,褰撲负-1鏃�,鍐呴儴鑷姩璁$畻</param>
+        /// <returns></returns>
+        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 = 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杞�
+            foreach (var strMsg in listMsg)
+            {
+                //娑堟伅鏄剧ず鎺т欢
+                var btnMsg = new NormalViewControl(defultWidth, i_height, false);
+                btnMsg.Y = i_yy;
+                btnMsg.Gravity = Gravity.CenterHorizontal;
+                btnMsg.TextAlignment = alignment;
+                btnMsg.TextColor = i_fontColor;
+                btnMsg.TextSize = i_fontSize;
+                btnMsg.Text = strMsg;
+                if (isMoreLine == true)
+                {
+                    //鍙互鎹㈣
+                    btnMsg.IsMoreLines = isMoreLine;
+                }
+
+                //鐗规畩澶勭悊
+                if (special == true)
+                {
+                    //璁剧疆瀹冪殑鐪熷疄瀹藉害(瀵箂pecial鍙橀噺鏈夌敤)
+                    int realWidth = btnMsg.GetRealWidthByText();
+                    btnMsg.Width = realWidth > defultWidth ? defultWidth : realWidth;
+                }
+                frameTable.AddChidren(btnMsg);
+
+                //鏀堕泦鎺т欢
+                listContr.Add(btnMsg);
+
+                //璁板綍鎺т欢闆嗗悎X杞存渶灏忕殑鍊�
+                if (btnMsg.X < minXX) { minXX = btnMsg.X; }
+
+                //涓よ涔嬮棿鐨勯棿璺濅负4
+                i_yy = btnMsg.Bottom + Application.GetRealHeight(4);
+            }
+            //鐗规畩澶勭悊
+            if (special == true)
+            {
+                foreach (var contr in listContr)
+                {
+                    //浠ユ渶闀跨殑鎺т欢鐨刋杞翠负鍩哄噯,鎵�鏈夋帶浠剁殑X杞撮兘鍙樻垚涓�鑷�
+                    contr.X = minXX;
+                }
+            }
+
+            return listContr;
+        }
+
+        #endregion
+
+        #region 鈻� 娣诲姞搴曢儴鐐瑰嚮鎸夐挳鎺т欢_______________
+
+        /// <summary>
+        /// 娣诲姞搴曢儴鐐瑰嚮鎸夐挳鎺т欢
+        /// </summary>
+        /// <param name="i_text">鏄剧ず鐨勬枃鏈�</param>
+        /// <returns></returns>
+        public BottomClickButton AddBottomClickButton(string i_text)
+        {
+            //瀹瑰櫒鎺т欢
+            var frameBack = new FrameLayout();
+            frameBack.Height = Application.GetRealHeight(76);
+            frameBack.Gravity = Gravity.BottomCenter;
+            bodyFrameLayout.AddChidren(frameBack);
+            //鐒跺悗鍦ㄩ《閮ㄦ坊鍔犱竴涓湁杈规鐨勪笢瑗�
+            var frameLine = new FrameLayout();
+            frameLine.Height = Application.GetRealHeight(50);
+            frameLine.BorderWidth = 1;
+            frameLine.BackgroundColor = UI.CSS.CSS_Color.MainBackgroundColor;
+            frameLine.BorderColor = UI.CSS.CSS_Color.DividingLineColor;
+            frameLine.SetCornerWithSameRadius(Application.GetRealHeight(24), HDLUtils.RectCornerTopLeft | HDLUtils.RectCornerTopRight);
+            frameBack.AddChidren(frameLine);
+            //鏈�鍚庡啀鏁翠釜鐧借壊鐨勪笢瑗块伄浣忓畠鐨勪笅閮�
+            var frameWite = new FrameLayout();
+            frameWite.Height = frameBack.Height - Application.GetRealHeight(24 - 10);//闇�瑕佽秴杩囧畠
+            frameWite.Width = frameBack.Width + Application.GetRealWidth(6);
+            frameWite.X = -Application.GetRealWidth(3);
+            frameWite.Y = Application.GetRealHeight(24);
+            frameWite.BackgroundColor = UI.CSS.CSS_Color.MainBackgroundColor;
+            frameBack.AddChidren(frameWite);
+
+            //鎸夐挳
+            var btnOk = new BottomClickButton(220);
+            btnOk.Gravity = Gravity.Center;
+            btnOk.Text = i_text;
+            frameBack.AddChidren(btnOk);
+
+            return btnOk;
+        }
+
+        #endregion
+
         #region 鈻� 涓�鑸殑鏂规硶_________________________
 
         /// <summary>
@@ -306,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