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/Controls/BaseControl/ButtonCtrBase.cs |  137 ++++++++++++++++++++++++++++++++++-----------
 1 files changed, 104 insertions(+), 33 deletions(-)

diff --git a/HDL_ON/UI/UI0-Stan/Controls/BaseControl/ButtonCtrBase.cs b/HDL_ON/UI/UI0-Stan/Controls/BaseControl/ButtonCtrBase.cs
index 5386392..0b0c63a 100644
--- a/HDL_ON/UI/UI0-Stan/Controls/BaseControl/ButtonCtrBase.cs
+++ b/HDL_ON/UI/UI0-Stan/Controls/BaseControl/ButtonCtrBase.cs
@@ -62,7 +62,7 @@
         #region 鈻� 閲嶅啓褰摜鐨勫睘鎬____________________
 
         /// <summary>
-        /// 閲嶅啓Text灞炴��
+        /// 閲嶅啓Text灞炴��(鏂囨湰涓湁{0}鐨勮瘽,浼氳嚜鍔ㄥ叏閮ㄦ浛鎹负鎹㈣绗�)
         /// </summary>
         public new string Text
         {
@@ -70,7 +70,87 @@
             get { return base.Text == null ? string.Empty : base.Text; }
             set
             {
-                base.Text = value == null ? string.Empty : value;
+                base.Text = value == null ? string.Empty : value.Replace("{0}", "\r\n");
+            }
+        }
+
+        /// <summary>
+        /// 閫変腑鐘舵��(閲嶅啓搴曞眰灞炴��)
+        /// </summary>
+        public new bool IsSelected
+        {
+            get { return base.IsSelected; }
+            set
+            {
+                //鍙湁鐘舵�佷笉涓�鏍�,鎵嶅彉鏇�
+                if (base.IsSelected != value)
+                {
+                    base.IsSelected = value;
+                }
+            }
+        }
+
+        /// <summary>
+        /// 闈為�変腑鐘舵�佺殑鑳屾櫙鍥捐矾寰�(閲嶅啓搴曞眰灞炴��)
+        /// </summary>
+        public new string UnSelectedImagePath
+        {
+            get { return base.UnSelectedImagePath; }
+            set
+            {
+                //鍙湁鍥剧墖涓嶄竴鏍�,鎵嶅彉鏇�
+                if (base.UnSelectedImagePath != value)
+                {
+                    base.UnSelectedImagePath = value;
+                }
+            }
+        }
+
+        /// <summary>
+        /// 閫変腑鐘舵�佺殑鑳屾櫙鍥捐矾寰�(閲嶅啓搴曞眰灞炴��)
+        /// </summary>
+        public new string SelectedImagePath
+        {
+            get { return base.SelectedImagePath; }
+            set
+            {
+                //鍙湁鍥剧墖涓嶄竴鏍�,鎵嶅彉鏇�
+                if (base.SelectedImagePath != value)
+                {
+                    base.SelectedImagePath = value;
+                }
+            }
+        }
+
+        /// <summary>
+        /// 鑳屾櫙鑹�(閲嶅啓搴曞眰灞炴��)
+        /// </summary>
+        public new uint BackgroundColor
+        {
+            get { return base.BackgroundColor; }
+            set
+            {
+                //鍙湁涓嶄竴鏍�,鎵嶅彉鏇�
+                if (base.BackgroundColor != value)
+                {
+                    base.BackgroundColor = value;
+                }
+            }
+        }
+
+        /// <summary>
+        /// 瀛椾綋棰滆壊(閲嶅啓搴曞眰灞炴��)
+        /// </summary>
+        public new uint TextColor
+        {
+            get { return base.TextColor; }
+            set
+            {
+                //鍙湁涓嶄竴鏍�,鎵嶅彉鏇�
+                if (base.TextColor != value)
+                {
+                    base.TextColor = value;
+                }
             }
         }
 
@@ -115,20 +195,6 @@
                 i_Height = Application.GetRealHeight(i_Height);
             }
             this.Height = i_Height;
-            this.Width = i_Width;
-        }
-
-        /// <summary>
-        /// 鍒濆鍖栨帶浠跺ぇ灏�(涓嶄互骞冲潎鍊艰繘琛岀湡瀹炴暟鍊艰绠�)
-        /// </summary>
-        /// <param name="i_Width">瀹藉害</param>
-        /// <param name="real">鏄惁璁$畻鐪熷疄鍊�</param>
-        public void InitSize(int i_Width, bool real = false)
-        {
-            if (real == true)
-            {
-                i_Width = Application.GetRealWidth(i_Width);
-            }
             this.Width = i_Width;
         }
 
@@ -304,25 +370,9 @@
         /// <returns></returns>
         public int GetRealWidthByText()
         {
-            if (string.IsNullOrEmpty(this.Text) == true) { return Application.GetRealWidth(25); }
+            if (string.IsNullOrEmpty(this.Text) == true) { return Application.GetRealWidth(4); }
 
             return base.GetTextWidth();
-        }
-
-        /// <summary>
-        /// 鏍规嵁鏂囨湰,璁$畻瀹冮渶瑕佺殑鎬昏鏁�
-        /// </summary>
-        /// <returns></returns>
-        public int GetRealRowCountByText()
-        {
-            //鍏堣幏鍙栧畠鐨勭湡瀹炲搴�
-            int realWidth = this.GetRealWidthByText();
-            int row = realWidth / this.Width;
-            if (realWidth % this.Width > 0)
-            {
-                row++;
-            }
-            return row;
         }
 
         /// <summary>
@@ -335,6 +385,27 @@
             return Application.GetRealWidth(i_size);
         }
 
+        /// <summary>
+        /// 鏍规嵁鏂囨湰,璁$畻瀹冮渶瑕佺殑鎬昏鏁�
+        /// </summary>
+        /// <param name="i_width">褰撳�间负-1鏃�,闇�瑕佺埗鎺т欢,鐪熷疄鍊�</param>
+        /// <returns></returns>
+        public int GetRealRowCountByText(int i_width = -1)
+        {
+            if (i_width == -1)
+            {
+                i_width = this.Width;
+            }
+            //鍏堣幏鍙栧畠鐨勭湡瀹炲搴�
+            int realWidth = this.GetRealWidthByText();
+            int row = realWidth / i_width;
+            if (realWidth % i_width > 0)
+            {
+                row++;
+            }
+            return row;
+        }
+
         #endregion
     }
 }

--
Gitblit v1.8.0