From cda2410f9c29f2fadc16e9de38ccae95b75a89dd Mon Sep 17 00:00:00 2001 From: wei <kaede@kaededeMacBook-Air.local> Date: 星期三, 09 六月 2021 10:51:13 +0800 Subject: [PATCH] 1 --- HDL_ON/UI/UI0-Stan/Controls/BaseControl/ButtonCtrBase.cs | 59 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++--- 1 files changed, 56 insertions(+), 3 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..fe412fb 100644 --- a/HDL_ON/UI/UI0-Stan/Controls/BaseControl/ButtonCtrBase.cs +++ b/HDL_ON/UI/UI0-Stan/Controls/BaseControl/ButtonCtrBase.cs @@ -74,6 +74,54 @@ } } + /// <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; + } + } + } + #endregion #region 鈻� 鍒濆鍖朹____________________________ @@ -312,13 +360,18 @@ /// <summary> /// 鏍规嵁鏂囨湰,璁$畻瀹冮渶瑕佺殑鎬昏鏁� /// </summary> + /// <param name="i_width">褰撳�间负-1鏃�,闇�瑕佺埗鎺т欢,鐪熷疄鍊�</param> /// <returns></returns> - public int GetRealRowCountByText() + public int GetRealRowCountByText(int i_width = -1) { + if (i_width == -1) + { + i_width = this.Width; + } //鍏堣幏鍙栧畠鐨勭湡瀹炲搴� int realWidth = this.GetRealWidthByText(); - int row = realWidth / this.Width; - if (realWidth % this.Width > 0) + int row = realWidth / i_width; + if (realWidth % i_width > 0) { row++; } -- Gitblit v1.8.0