using Shared; using System; using System.Collections.Generic; using System.Text; namespace HDL_ON.Stan { /// /// 做成放在画面右边的的图标控件(注意,它不能用来做【向右】的图标) /// public class MostRightIconControl : FrameLayoutStatuControl { /// /// 图标控件(迫不得己,这个东西开放出去) /// public ButtonCtrBase btnIcon = null; /// /// UnSelectedImagePath /// public string UnSelectedImagePath { get { return btnIcon.UnSelectedImagePath; } set { btnIcon.UnSelectedImagePath = value; } } /// /// SelectedImagePath /// public string SelectedImagePath { get { return btnIcon.SelectedImagePath; } set { btnIcon.SelectedImagePath = value; } } /// /// IsSelected /// public bool IsSelected { get { return btnIcon.IsSelected; } set { btnIcon.IsSelected = value; } } /// /// X轴的真实偏移量(请确保已经调用InitControl初始化函数,用法:蓝湖上的X轴,减掉这个值即可) /// public int XOffset { get { return (this.Width - btnIcon.Width) / 2; } } /// /// 做成放在画面右边的的图标控件(注意,它不能用来做【向右】的图标) /// /// 控件空度 /// 控件高度 public MostRightIconControl(int i_width, int i_height) { this.Width = this.GetPictrueRealSize(38); this.Height = HdlControlResourse.ListViewRowHeight; this.Gravity = Gravity.CenterVertical; int XX = Application.CurrentWidth - this.GetPictrueRealSize(i_width) - HdlControlResourse.XXLeft; this.X = XX - this.GetPictrueRealSize((38 - i_width) / 2); this.btnIcon = new ButtonCtrBase(); btnIcon.Width = this.GetPictrueRealSize(i_width); btnIcon.Height = this.GetPictrueRealSize(i_height); btnIcon.Gravity = Gravity.Center; } /// /// 初始化 /// public void InitControl() { this.AddChidren(btnIcon, ChidrenBindMode.BindEvent); } } }