From 25429f085093d89d543a0b90e30d0d62d1b7dac9 Mon Sep 17 00:00:00 2001 From: hxb <hxb@hdlchina.com.cn> Date: 星期二, 30 八月 2022 09:37:38 +0800 Subject: [PATCH] 合并了IOS的代码 --- ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/FrameLayoutControls/FrameCaptionViewControl.cs | 75 +++++++++++++++++++++++++++++++++++++ 1 files changed, 75 insertions(+), 0 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/FrameLayoutControls/FrameCaptionViewControl.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/FrameLayoutControls/FrameCaptionViewControl.cs new file mode 100644 index 0000000..1adb7c3 --- /dev/null +++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/FrameLayoutControls/FrameCaptionViewControl.cs @@ -0,0 +1,75 @@ +锘縰sing System; +using System.Collections.Generic; +using System.Text; + +namespace Shared.Phone.UserCenter +{ + /// <summary> + /// 鍋氭垚涓�涓乏杈规湁鏍囬鐨勬ā鎷烺owlayout鏄剧ず鐨凢rameLayout鎺т欢 + /// </summary> + public class FrameCaptionViewControl : FrameRowControl + { + #region 鈻� 鍙橀噺澹版槑___________________________ + + /// <summary> + /// 杈撳叆妗嗙殑鍊� + /// </summary> + public string Text + { + get { return txtView.Text; } + set { txtView.Text = value; } + } + /// <summary> + /// 鏄剧ず妗嗘帶浠�(鍙栧�兼垨鑰呰幏鍙栧�煎彲浠ヤ娇鐢ㄣ�怲ext銆戝睘鎬�,铏界劧杩欎釜涔熷彲浠ュ彇) + /// </summary> + public NormalViewControl txtView = null; + /// <summary> + /// 鏍囬鎺т欢 + /// </summary> + public NormalViewControl btnCaption = null; + + #endregion + + #region 鈻� 鍒濆鍖朹____________________________ + + /// <summary> + /// 鍋氭垚涓�涓ā鎷烺owLayout,杩涜杈撳叆鐨凢rameLayout鎺т欢(宸﹁竟鏈夋爣棰�) + /// </summary> + /// <param name="i_caption">鏍囬鏂囨湰</param> + /// <param name="i_text">鏄剧ず鏂囨湰鐨勫��</param> + /// <param name="i_ChidrenYaxis">瀛愭帶浠禮杞村亸绉婚噺(銆愬垪琛ㄦ帶浠剁殑rowSpace/2銆戝嵆鍙�,涓嶆噦榛樿涓�0鍗冲彲)</param> + public FrameCaptionViewControl(string i_caption, string i_text, int i_ChidrenYaxis = 0) : base(i_ChidrenYaxis) + { + btnCaption = new NormalViewControl(270, 58, true); + btnCaption.X = ControlCommonResourse.XXLeft; + btnCaption.Gravity = Gravity.CenterVertical; + btnCaption.Text = i_caption + "锛�"; + + //鏄剧ず妗� + txtView = new NormalViewControl(700, true); + txtView.X = Application.GetRealWidth(294); + txtView.Gravity = Gravity.CenterVertical; + txtView.TextColor = UserCenterColor.Current.TextGrayColor1; + txtView.Text = i_text; + } + + /// <summary> + /// 鍒濆鍖栨帶浠� + /// </summary> + /// <param name="caption">鏍囬</param> + /// <param name="text">鏂囨湰妗嗙殑鍊�</param> + public virtual void InitControl() + { + this.AddChidren(btnCaption, ChidrenBindMode.BindEvent); + + this.AddChidren(txtView, ChidrenBindMode.BindEvent); + if (chidrenYaxis != 0) + { + btnCaption.Y += chidrenYaxis; + txtView.Y += chidrenYaxis; + } + } + + #endregion + } +} -- Gitblit v1.8.0