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/BaseControl/ButtonCtrBase.cs | 72 ++++++++++++++++++++++------------- 1 files changed, 45 insertions(+), 27 deletions(-) diff --git a/HDL_ON/UI/UI0-Stan/Controls/BaseControl/ButtonCtrBase.cs b/HDL_ON/UI/UI0-Stan/Controls/BaseControl/ButtonCtrBase.cs index fe412fb..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,7 @@ 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"); } } @@ -122,6 +122,38 @@ } } + /// <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; + } + } + } + #endregion #region 鈻� 鍒濆鍖朹____________________________ @@ -163,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; } @@ -352,9 +370,19 @@ /// <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> + /// <param name="i_size"></param> + /// <returns></returns> + public int GetPictrueRealSize(int i_size) + { + return Application.GetRealWidth(i_size); } /// <summary> @@ -376,16 +404,6 @@ row++; } return row; - } - - /// <summary> - /// 璁$畻鍥剧墖鐨勭湡瀹為珮瀹藉害 - /// </summary> - /// <param name="i_size"></param> - /// <returns></returns> - public int GetPictrueRealSize(int i_size) - { - return Application.GetRealWidth(i_size); } #endregion -- Gitblit v1.8.0