| | |
| | | /// <summary>
|
| | | /// 画面显示(底层会固定调用此方法,借以完成画面创建)
|
| | | /// </summary>
|
| | | /// <param name="i_GatewayDiv">网关区分,1:本地网关 2:广播搜到的网关</param>
|
| | | /// <param name="i_GatewayDiv">网关区分,1:本地网关 2:缓存中的网关 3:广播搜到的网关</param>
|
| | | public void ShowForm(int i_GatewayDiv)
|
| | | {
|
| | | if (i_GatewayDiv == 1)
|
| | | {
|
| | | //设置标题信息
|
| | | base.SetTitleText("本地网关");
|
| | | }
|
| | | else if (i_GatewayDiv == 2)
|
| | | {
|
| | | //设置标题信息
|
| | | base.SetTitleText("缓存中的网关");
|
| | | }
|
| | | else
|
| | | {
|
| | |
| | | //获取本地全部网关对象
|
| | | listway = HdlGatewayLogic.Current.GetAllLocalGateway();
|
| | | }
|
| | | else
|
| | | else if (i_GatewayDiv == 2)
|
| | | {
|
| | | listway = ZbGateway.GateWayList;
|
| | | }
|
| | | else
|
| | | {
|
| | | listway = new List<ZbGateway>();
|
| | | foreach (var way in HdlGatewayResourse.DicReceiveGatewayTest.Values)
|
| | | {
|
| | | listway.Add(way);
|
| | | }
|
| | | }
|
| | | for (int i = 0; i < listway.Count; i++)
|
| | | {
|
| | |
| | | gatewayRow.frameTable.AddBottomLine();
|
| | | }
|
| | |
|
| | | var btnLink = new NormalViewControl(Application.GetRealWidth(700), gatewayRow.btnIp.Height, false);
|
| | | btnLink.TextSize = 12;
|
| | | btnLink.X = gatewayRow.btnIp.Right;
|
| | | btnLink.Y = gatewayRow.btnIp.Y;
|
| | | btnLink.Text = "本地连接:" + i_gateway.LocalIsConnected.ToString();
|
| | | gatewayRow.frameTable.AddChidren(btnLink);
|
| | |
|
| | | //定位
|
| | | var btnPosition = new NormalViewControl(Application.GetRealWidth(184), gatewayRow.Height, false);
|
| | | btnPosition.BackgroundColor = 0xff4a4a4a;
|
| | | btnPosition.TextAlignment = TextAlignment.Center;
|
| | | btnPosition.TextColor = UserCenterColor.Current.White;
|
| | | btnPosition.TextSize = 12;
|
| | | var btnPosition = gatewayRow.AddEditorControl(false);
|
| | | btnPosition.TextID = R.MyInternationalizationString.uFixedPosition;
|
| | | gatewayRow.AddRightView(btnPosition);
|
| | | btnPosition.ButtonClickEvent += (sender, e) =>
|
| | | {
|
| | | //发送定位命令
|
| | |
| | | };
|
| | | gatewayRow.frameTable.ButtonClickEvent += (sender, e) =>
|
| | | {
|
| | | var form = new GatewayManage.GatewayInfoEditorForm();
|
| | | var form = new HideOptionGatewayInfoMenuForm();
|
| | | form.AddForm(i_gateway);
|
| | | };
|
| | | }
|