| | |
| | | rowSerial.UseClickStatu = false;
|
| | | listView.AddChidren(rowSerial);
|
| | | rowSerial.AddLeftCaption(Language.StringByID(R.MyInternationalizationString.uSerialNumber), 300);
|
| | | rowSerial.AddMostRightView("", 600);
|
| | | rowSerial.AddMostRightView(string.IsNullOrEmpty(i_gateway.getGwInfo.GWSN) == false ? i_gateway.getGwInfo.GWSN : "000000000000", 600);
|
| | | rowSerial.AddBottomLine();
|
| | |
|
| | | //网关ID
|
| | |
| | | rowMac.UseClickStatu = false;
|
| | | listView.AddChidren(rowMac);
|
| | | rowMac.AddLeftCaption(Language.StringByID(R.MyInternationalizationString.uCoordinatorMac), 300);
|
| | | rowMac.AddMostRightView("", 600);
|
| | | var btnMac = rowMac.AddMostRightView("", 600);
|
| | | rowMac.AddBottomLine();
|
| | |
|
| | | //协议器信道
|
| | |
| | | rowChannel.UseClickStatu = false;
|
| | | listView.AddChidren(rowChannel);
|
| | | rowChannel.AddLeftCaption(Language.StringByID(R.MyInternationalizationString.uCoordinatorChannel), 300);
|
| | | rowChannel.AddMostRightView("", 600);
|
| | | var btnChannel = rowChannel.AddMostRightView("", 600);
|
| | | rowChannel.AddBottomLine();
|
| | |
|
| | | //协议器PanID
|
| | |
| | | rowPanid.UseClickStatu = false;
|
| | | listView.AddChidren(rowPanid);
|
| | | rowPanid.AddLeftCaption(Language.StringByID(R.MyInternationalizationString.uCoordinatorPanid), 300);
|
| | | rowPanid.AddMostRightView("", 600);
|
| | | var btnPanId = rowPanid.AddMostRightView("", 600);
|
| | | rowPanid.AddBottomLine();
|
| | |
|
| | | //制造商
|
| | |
| | | rowProtuct.AddMostRightView("HDL", 600);
|
| | |
|
| | | listView.AdjustRealHeight(Application.GetRealHeight(23));
|
| | |
|
| | | HdlThreadLogic.Current.RunThread(() =>
|
| | | {
|
| | | //获取网关数据
|
| | | this.GetGatewayData(i_gateway, btnMac, btnChannel, btnPanId);
|
| | | });
|
| | | }
|
| | |
|
| | | #endregion
|
| | |
|
| | | #region ■ 获取数据___________________________
|
| | |
|
| | | /// <summary>
|
| | | /// 获取网关数据
|
| | | /// </summary>
|
| | | /// <param name="gateway">网关对象</param>
|
| | | /// <param name="btnMac">协调器MAC</param>
|
| | | /// <param name="btnChannel">协调器信道</param>
|
| | | /// <param name="btnPanid">协调器PanId</param>
|
| | | private void GetGatewayData(ZbGateway gateway, NormalViewControl btnMac, NormalViewControl btnChannel, NormalViewControl btnPanid)
|
| | | {
|
| | | //打开进度条
|
| | | this.ShowProgressBar();
|
| | |
|
| | | //协调器MAC
|
| | | string strMac = HdlGatewayLogic.Current.GetGatewayCoordinatorMac(gateway);
|
| | | if (strMac == null)
|
| | | {
|
| | | //关闭进度条
|
| | | this.CloseProgressBar(ShowReLoadMode.YES);
|
| | | return;
|
| | | }
|
| | | //协调器信道
|
| | | int intChannel = HdlGatewayLogic.Current.GetGatewayChannelId(gateway);
|
| | | if (intChannel == -1)
|
| | | {
|
| | | //关闭进度条
|
| | | this.CloseProgressBar(ShowReLoadMode.YES);
|
| | | return;
|
| | | }
|
| | | //协调器PanId
|
| | | int intPanId = HdlGatewayLogic.Current.GetGatewayPanId(gateway);
|
| | | if (intPanId == -1)
|
| | | {
|
| | | //关闭进度条
|
| | | this.CloseProgressBar(ShowReLoadMode.YES);
|
| | | return;
|
| | | }
|
| | | //关闭进度条
|
| | | this.CloseProgressBar();
|
| | | HdlThreadLogic.Current.RunMain(() =>
|
| | | {
|
| | | btnMac.Text = strMac;
|
| | | btnChannel.Text = intChannel.ToString();
|
| | | btnPanid.Text = intPanId.ToString();
|
| | | });
|
| | | }
|
| | |
|
| | | #endregion
|