| | |
| | | /// </summary>
|
| | | public NormalViewControl btnName = null;
|
| | | /// <summary>
|
| | | /// 图标控件
|
| | | /// </summary>
|
| | | public IconViewControl btnIcon = null;
|
| | | /// <summary>
|
| | | /// 显示IP控件
|
| | | /// </summary>
|
| | | private NormalViewControl btnIp = null;
|
| | | public NormalViewControl btnIp = null;
|
| | |
|
| | | /// <summary>
|
| | | /// 在线状态
|
| | |
| | | /// 做成一个显示网关信息的RowLayout,添加此控件到容器后,调用【InitControl()】完成初始化
|
| | | /// </summary>
|
| | | /// <param name="i_zbGateway">网关对象</param>
|
| | | /// <param name="ChidrenYaxis">子控件Y轴偏移量(有些界面需要这种特殊操作)</param>
|
| | | /// <param name="ChidrenYaxis">子控件Y轴偏移量(【列表控件的rowSpace/2】即可,不懂默认为0即可)</param>
|
| | | public GatewayRowControl(ZbGateway i_zbGateway, int i_ChidrenYaxis = 0) : base(i_ChidrenYaxis)
|
| | | {
|
| | | this.zbGatewayId = HdlGatewayLogic.Current.GetGatewayId(i_zbGateway);
|
| | |
| | | var tempWay = this.zbGateway;
|
| | |
|
| | | //图标
|
| | | var btnIcon = frameTable.AddLeftIcon(iconSize);
|
| | | this.btnIcon = frameTable.AddLeftIcon(iconSize);
|
| | | if (tempWay != null)
|
| | | {
|
| | | HdlGatewayLogic.Current.SetGatewayIcon(btnIcon, tempWay);
|
| | |
| | | frameTable.AddChidren(btnName, ChidrenBindMode.BindEventOnly);
|
| | |
|
| | | //房间
|
| | | string strIp = HdlGatewayLogic.Current.GetGatewayBaseInfoAttribute(tempWay, "IpAddress").ToString();
|
| | | string strIp = string.Empty;
|
| | | if (tempWay != null)
|
| | | {
|
| | | strIp = tempWay.getGatewayBaseInfo.IpAddress;
|
| | | }
|
| | | this.btnIp = frameTable.AddLeftCaption(strIp, 600, 50, true);
|
| | | //这个坐标有点特殊
|
| | | btnIp.Y = Application.GetRealHeight(72) + this.chidrenYaxis;
|
| | | btnIp.TextSize = 12;
|
| | | btnIp.TextColor = UserCenterColor.Current.TextGrayColor1;
|
| | | frameTable.AddChidren(btnIp, ChidrenBindMode.BindEventOnly);
|
| | |
|
| | | //初始值在线
|
| | | this.IsOnline = true;
|
| | | }
|
| | |
|
| | | #endregion
|