| | |
| | | #region ■ 添加底线___________________________
|
| | |
|
| | | /// <summary>
|
| | | /// 添加底线(如果左边有图标,则先添加图标,再添加底线)
|
| | | /// <para>添加底线(如果左边有图标,则先添加图标,再添加底线)</para>
|
| | | /// <para>它的长度为:当前控件宽度-左右固定间距-左边图片宽度(如果有)-右边的偏移量</para>
|
| | | /// </summary> |
| | | public NormalViewControl AddBottomLine()
|
| | | {
|
| | |
| | | {
|
| | | XX += this.leftIconSize + Application.GetRealWidth(35);
|
| | | }
|
| | | var btnCaption = new NormalViewControl(i_width, real);
|
| | | var btnCaption = new NormalViewControl(i_width, i_height, real);
|
| | | btnCaption.X = XX;
|
| | |
|
| | | btnCaption.Height = i_height;
|
| | | btnCaption.Text = i_caption;
|
| | |
|
| | | return btnCaption;
|
| | | }
|
| | |
|
| | | #endregion
|
| | |
|
| | | #region ■ 添加左边输入框_____________________
|
| | |
|
| | | /// <summary>
|
| | | /// 添加左边输入框(如果有图标,则先添加图标,再添加输入框)
|
| | | /// </summary>
|
| | | /// <param name="i_txtValue">初始内容</param>
|
| | | /// <param name="i_width">宽度</param>
|
| | | /// <param name="real">是否计算真实值</param>
|
| | | /// <returns></returns> |
| | | public TextInputControl AddLeftInput(string i_txtValue, int i_width, bool real = true)
|
| | | {
|
| | | if (real == true)
|
| | | {
|
| | | i_width = Application.GetRealWidth(i_width);
|
| | | }
|
| | | int XX = ControlCommonResourse.XXLeft + LeftOffset;
|
| | | if (this.leftIconSize > 0)
|
| | | {
|
| | | XX += this.leftIconSize + Application.GetRealWidth(35);
|
| | | }
|
| | | var contr = new TextInputControl(i_width, this.Height, false);
|
| | | contr.Text = i_txtValue;
|
| | | contr.X = XX;
|
| | |
|
| | | this.AddChidren(contr, ChidrenBindMode.NotBind);
|
| | | if (chidrenYaxis != 0)
|
| | | {
|
| | | contr.Y += chidrenYaxis;
|
| | | }
|
| | |
|
| | | return contr;
|
| | | }
|
| | |
|
| | | #endregion
|
| | |
| | | /// <summary>
|
| | | /// 添加向右的图标
|
| | | /// </summary>
|
| | | public IconViewControl AddRightIconControl()
|
| | | public IconViewControl AddRightArrow()
|
| | | {
|
| | | var btnRight = new IconViewControl(58);
|
| | | btnRight.Gravity = Gravity.CenterVertical;
|
| | |
| | | this.rightIconSize = Application.GetMinRealAverage(i_width);
|
| | | if (chidrenYaxis != 0)
|
| | | {
|
| | | btnContr.Y += chidrenYaxis;
|
| | | btnContr.btnIcon.Y += chidrenYaxis;
|
| | | }
|
| | |
|
| | | return btnContr;
|
| | |
| | |
|
| | | #endregion
|
| | |
|
| | | #region ■ 添加右边的开关图标_________________
|
| | |
|
| | | /// <summary>
|
| | | /// 添加右边的开关图标
|
| | | /// </summary>
|
| | | /// <returns></returns>
|
| | | public MostRightIconControl AddMostRightSwitchIcon()
|
| | | {
|
| | | var btnSwitch = this.AddMostRightEmptyIcon(104, 63);
|
| | | this.ChangedChidrenBindMode(btnSwitch, ChidrenBindMode.NotBind);
|
| | | btnSwitch.UnSelectedImagePath = "Item/Switch2.png";
|
| | | btnSwitch.SelectedImagePath = "Item/Switch2Selected.png";
|
| | |
|
| | | return btnSwitch;
|
| | | }
|
| | |
|
| | | #endregion
|
| | |
|
| | | #region ■ 添加最右的显示文本_________________
|
| | |
|
| | | /// <summary>
|