| | |
| | | return;
|
| | | }
|
| | | //让网关允许入网
|
| | | this.realGateway.AddNewDeviceToGateway(255);
|
| | | this.realGateway.AddNewDeviceToGateway(180);
|
| | | System.Threading.Thread.Sleep(1000);
|
| | | }
|
| | | });
|
| | |
|
| | | //添加监视设备新上报的事件
|
| | | this.realGateway.GwResDataAction += this.AdjustGatewayResultData; |
| | | //开启连接的假想动画效果线程
|
| | | this.StartConcetionAnimeteThread();
|
| | | }
|
| | |
|
| | | #endregion
|
| | |
| | | HdlThreadLogic.Current.RunThread(() =>
|
| | | {
|
| | | int index = 1;
|
| | | int timeCount = 0;
|
| | | while (this.Parent != null)
|
| | | {
|
| | | System.Threading.Thread.Sleep(500);
|
| | | timeCount++;
|
| | | if (timeCount >= 240)
|
| | | {
|
| | | //120秒后,再次发送网关设备入网命令
|
| | | this.realGateway.AddNewDeviceToGateway(180);
|
| | | timeCount = 0;
|
| | | }
|
| | | Application.RunOnMainThread(() =>
|
| | | {
|
| | | if (btnRound != null)
|
| | |
| | | /// <summary>
|
| | | /// 画面关闭
|
| | | /// </summary> |
| | | public override void CloseForm() |
| | | public override void CloseFormBefore()
|
| | | { |
| | | base.CloseForm();
|
| | | //停止接收
|
| | | this.realGateway.GwResDataAction -= this.AdjustGatewayResultData;
|
| | |
|
| | |
| | | //关闭入网模式
|
| | | this.realGateway.AddNewDeviceToGateway(0);
|
| | | });
|
| | | base.CloseFormBefore();
|
| | | }
|
| | |
|
| | | #endregion
|