using Shared; using System; using System.Collections.Generic; using System.Text; namespace HDL_ON.Stan { /// /// 做成一个加大点击区域的图标控件 /// public class IconBigViewControl : 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; } } /// /// Y轴的真实偏移量(请确保已经调用InitControl初始化函数,用法:蓝湖上的Y轴,减掉这个值即可) /// public int YOffset { get { return (this.Height - btnIcon.Height) / 2; } } /// /// 做成一个加大点击区域的图标控件 /// /// 控件空度 /// 控件高度 public IconBigViewControl(int i_width, int i_height) { this.Width = this.GetPictrueRealSize(38); this.Height = this.GetPictrueRealSize(38); 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); } } }