| | |
| | | /// <summary>
|
| | | /// 未分配界面的设备选择控件
|
| | | /// </summary>
|
| | | /// <param name="i_ChidrenYaxis">子控件Y轴偏移量(真实值,有些界面需要这种特殊操作)</param>
|
| | | /// <param name="i_ChidrenYaxis">子控件Y轴偏移量(【列表控件的rowSpace/2】即可,不懂默认为0即可)</param>
|
| | | public DeviceSelectUnallocatedControl(int i_ChidrenYaxis = 0) : base(i_ChidrenYaxis)
|
| | | {
|
| | | this.SetCornerWithSameRadius(Application.GetRealHeight(58), HDLUtils.RectCornerTopLeft);
|
| | |
| | | this.device = i_device;
|
| | | //设备图标背景控件
|
| | | this.frameIconBackGroud = new FrameLayout();
|
| | | frameIconBackGroud.Height = Application.GetMinRealAverage(112);
|
| | | frameIconBackGroud.Width = Application.GetMinRealAverage(112);
|
| | | frameIconBackGroud.Height = this.GetPictrueRealSize(112);
|
| | | frameIconBackGroud.Width = this.GetPictrueRealSize(112);
|
| | | frameIconBackGroud.Gravity = Gravity.CenterVertical;
|
| | | frameIconBackGroud.X = Application.GetRealWidth(46);
|
| | | frameIconBackGroud.Radius = (uint)Application.GetMinRealAverage(112 / 2);
|
| | | frameIconBackGroud.Radius = (uint)this.GetPictrueRealSize(112 / 2);
|
| | | frameIconBackGroud.BackgroundColor = Common.ZigbeeColor.Current.GXCGrayBackgroundColor;
|
| | | this.AddChidren(frameIconBackGroud, ChidrenBindMode.NotBind);
|
| | | if (chidrenYaxis != 0)
|
| | |
| | | Common.LocalDevice.Current.SetDeviceIconToControl(btnDeviceIcon, i_device);
|
| | | frameIconBackGroud.AddChidren(btnDeviceIcon);
|
| | | //重新绑定事件
|
| | | this.ChangedChidrenBindMode(frameIconBackGroud, ChidrenBindMode.BindEventOnly);
|
| | | this.ChangedChidrenBindMode(frameIconBackGroud, ChidrenBindMode.BindEvent);
|
| | |
|
| | | //设备名字
|
| | | this.btnDeviceName = new NormalViewControl(Application.GetRealWidth(600), this.Height, false);
|
| | |
| | | btnDeviceName.Text = Common.LocalDevice.Current.GetDeviceEpointName(i_device);
|
| | | btnDeviceName.SelectedTextColor = Common.ZigbeeColor.Current.GXCTextSelectedColor;
|
| | | btnDeviceName.Gravity = Gravity.CenterVertical;
|
| | | this.AddChidren(btnDeviceName, ChidrenBindMode.BindEventOnly);
|
| | | this.AddChidren(btnDeviceName, ChidrenBindMode.BindEvent);
|
| | | if (chidrenYaxis != 0)
|
| | | {
|
| | | btnDeviceName.Y += chidrenYaxis;
|
| | |
| | | this.AddChidren(btnSelect, ChidrenBindMode.NotBind);
|
| | | btnSelect.InitControl();
|
| | | //复合控件需要特殊处理
|
| | | this.ChangedChidrenBindMode(btnSelect, ChidrenBindMode.BindEventOnly);
|
| | | this.ChangedChidrenBindMode(btnSelect, ChidrenBindMode.BindEvent);
|
| | | if (chidrenYaxis != 0)
|
| | | {
|
| | | btnSelect.btnIcon.Y += chidrenYaxis;
|