| | |
| | | /// <param name="addLine"></param>
|
| | | private void AddGatewayRow(VerticalListControl listView, ZbGateway gateway, bool addLine)
|
| | | {
|
| | | string gwid = HdlGatewayLogic.Current.GetGatewayId(gateway);
|
| | | string gwid = gateway.GwId;
|
| | | if (this.dicZbGatewayDiv[gwid] != 2)
|
| | | {
|
| | | //如果本地没有,那么应该是在之后的编辑界面删除了
|
| | |
| | | //底线
|
| | | frameRow.frameTable.AddBottomLine();
|
| | | }
|
| | | frameRow.frameTable.ButtonClickEvent += (sender, e) =>
|
| | | {
|
| | | var form = new GatewayProductInfoForm();
|
| | | form.AddForm(gateway);
|
| | | };
|
| | |
|
| | | if (dicZbGatewayDiv[gwid] == 2)
|
| | | {
|
| | | //换绑
|
| | | var btnBind = new NormalViewControl(Application.GetRealWidth(184), frameRow.Height, false);
|
| | | btnBind.BackgroundColor = 0xfffb744a;
|
| | | btnBind.TextAlignment = TextAlignment.Center;
|
| | | btnBind.TextColor = UserCenterColor.Current.White;
|
| | | btnBind.TextSize = 12;
|
| | | btnBind.TextID = R.MyInternationalizationString.uReBindAgain;
|
| | | frameRow.AddRightView(btnBind);
|
| | | btnBind.ButtonClickEvent += (sender, e) =>
|
| | | //需重新绑定
|
| | | frameRow.frameTable.AddMostRightView(Language.StringByID(R.MyInternationalizationString.uNeedToRebind), 300);
|
| | | }
|
| | |
|
| | | frameRow.frameTable.ButtonClickEvent += (sender, e) =>
|
| | | {
|
| | | if (dicZbGatewayDiv[gwid] == 2)
|
| | | {
|
| | | //确认绑定旧网关?
|
| | | string msg = Language.StringByID(R.MyInternationalizationString.uRebindGatewayMsg);
|
| | |
| | | var form = new GatewayRebindForm();
|
| | | form.AddForm(gateway, dicZbGatewayDiv);
|
| | | });
|
| | | };
|
| | | }
|
| | | }
|
| | | else
|
| | | {
|
| | | var form = new GatewayProductInfoForm();
|
| | | form.AddForm(gateway);
|
| | | }
|
| | | };
|
| | |
|
| | | //定位
|
| | | var btnPosition = new NormalViewControl(Application.GetRealWidth(184), frameRow.Height, false);
|
| | | btnPosition.BackgroundColor = 0xff4a4a4a;
|
| | | btnPosition.TextAlignment = TextAlignment.Center;
|
| | | btnPosition.TextColor = UserCenterColor.Current.White;
|
| | | btnPosition.TextSize = 12;
|
| | | var btnPosition = frameRow.AddEditorControl(false);
|
| | | btnPosition.TextID = R.MyInternationalizationString.uFixedPosition;
|
| | | frameRow.AddRightView(btnPosition);
|
| | | btnPosition.ButtonClickEvent += (sender, e) =>
|
| | | {
|
| | | //发送定位命令
|
| | |
| | | }
|
| | |
|
| | | #endregion
|
| | |
|
| | | #region ■ 界面关闭___________________________
|
| | |
|
| | | /// <summary>
|
| | | /// 界面关闭
|
| | | /// </summary>
|
| | | public override void CloseFormBefore()
|
| | | {
|
| | | //刷新主页
|
| | | UserView.UserPage.Instance.ReFreshControl();
|
| | |
|
| | | base.CloseFormBefore();
|
| | | }
|
| | |
|
| | | #endregion
|
| | | }
|
| | | }
|