| | |
| | | public MostRightIconControl AddMostRightEmptyIcon(int i_width, int i_height)
|
| | | {
|
| | | var btnContr = new MostRightIconControl(i_width, i_height);
|
| | | btnContr.UseClickStatu = false;
|
| | | this.AddChidren(btnContr, ChidrenBindMode.NotBind);
|
| | | btnContr.InitControl();
|
| | | //复合控件需要特殊处理
|
| | |
| | | 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
|
| | |
| | | {
|
| | | i_width = Application.GetRealWidth(i_width);
|
| | | }
|
| | | var btnContr = new NormalViewControl(i_width, false);
|
| | | btnContr.X = this.Width - ControlCommonResourse.XXLeft - i_width - rightIconSize + RightOffset;
|
| | | btnContr.Height = this.Height;
|
| | | btnContr.TextAlignment = TextAlignment.CenterRight;
|
| | | btnContr.TextColor = UserCenterColor.Current.TextGrayColor1;
|
| | | btnContr.Text = i_text;
|
| | | var btnContr = AddMostRightView(i_text, i_width, ControlCommonResourse.NormalControlHeight, false);
|
| | | this.AddChidren(btnContr, ChidrenBindMode.BindEventOnly);
|
| | | if (chidrenYaxis != 0)
|
| | | {
|
| | |
| | | return btnContr;
|
| | | }
|
| | |
|
| | | /// <summary>
|
| | | /// 添加最右的显示文本,此方法不会主动添加到父控件中(如果右边有图标的话,先添加图标后,再添加这个文本)
|
| | | /// </summary>
|
| | | /// <param name="i_caption">内容</param>
|
| | | /// <param name="i_width">宽度</param>
|
| | | /// <param name="i_height">高度</param>
|
| | | /// <param name="real">是否计算真实值</param>
|
| | | /// <returns></returns>
|
| | | public NormalViewControl AddMostRightView(string i_text, int i_width, int i_height, bool real = true)
|
| | | {
|
| | | if (real == true)
|
| | | {
|
| | | i_width = Application.GetRealWidth(i_width);
|
| | | i_height = Application.GetRealHeight(i_height);
|
| | | }
|
| | | var btnContr = new NormalViewControl(i_width, i_height, false);
|
| | | btnContr.X = this.Width - ControlCommonResourse.XXLeft - i_width - rightIconSize + RightOffset;
|
| | | btnContr.Height = this.Height;
|
| | | btnContr.TextAlignment = TextAlignment.CenterRight;
|
| | | btnContr.TextColor = UserCenterColor.Current.TextGrayColor1;
|
| | | btnContr.Text = i_text;
|
| | |
|
| | | return btnContr;
|
| | | }
|
| | |
|
| | | #endregion |
| | | } |
| | | } |