| | |
| | | btnProgressView.Text = "0%";
|
| | | frameProgress.AddChidren(btnProgressView);
|
| | |
|
| | | new System.Threading.Thread(() =>
|
| | | HdlThreadLogic.Current.RunThread(() =>
|
| | | {
|
| | | //蓝才刚说有时候网关会收不到入网的命令,所以发三次
|
| | | for (int i = 0; i < 3; i++)
|
| | |
| | | GatewayResourse.NowSelectGateway.AddNewDeviceToGateway(255);
|
| | | System.Threading.Thread.Sleep(1000);
|
| | | }
|
| | | })
|
| | | { IsBackground = true }.Start();
|
| | | });
|
| | |
|
| | | //添加监视设备新上报的事件
|
| | | GatewayResourse.NowSelectGateway.GwResDataAction += this.AdjustGatewayResultData; |
| | |
| | | }
|
| | | this.isDeviceThreadStart = true;
|
| | |
|
| | | new System.Threading.Thread(() =>
|
| | | HdlThreadLogic.Current.RunThread(() =>
|
| | | {
|
| | | while (this.waitDeviceTimeOut >= 0)
|
| | | {
|
| | |
| | | break;
|
| | | }
|
| | | });
|
| | | })
|
| | | { IsBackground = true }.Start();
|
| | | });
|
| | | }
|
| | |
|
| | | /// <summary>
|
| | |
| | | btnRound.Y = Application.GetMinRealAverage(475);
|
| | | bodyFrameLayout.AddChidren(btnRound);
|
| | |
|
| | | new System.Threading.Thread(() =>
|
| | | HdlThreadLogic.Current.RunThread(() =>
|
| | | {
|
| | | int index = 1;
|
| | | while (this.Parent != null)
|
| | |
| | | }
|
| | | });
|
| | | }
|
| | | })
|
| | | { IsBackground = true }.Start();
|
| | | });
|
| | | }
|
| | |
|
| | | #endregion
|
| | |
| | | return;
|
| | | }
|
| | | this.isTopicTimeOutThreadStart = true;
|
| | | new System.Threading.Thread(() =>
|
| | | HdlThreadLogic.Current.RunThread(() =>
|
| | | {
|
| | | while (this.Parent != null && this.topTimeOut >= 0)
|
| | | {
|
| | |
| | | this.CloseForm();
|
| | | });
|
| | | }
|
| | | })
|
| | | { IsBackground = true }.Start();
|
| | | });
|
| | | }
|
| | |
|
| | | #endregion
|
| | |
| | | //停止接收
|
| | | GatewayResourse.NowSelectGateway.GwResDataAction -= this.AdjustGatewayResultData;
|
| | |
|
| | | new System.Threading.Thread(() =>
|
| | | HdlThreadLogic.Current.RunThread(() =>
|
| | | {
|
| | | System.Threading.Thread.Sleep(1200);
|
| | | //关闭入网模式
|
| | | GatewayResourse.NowSelectGateway.AddNewDeviceToGateway(0);
|
| | | })
|
| | | { IsBackground = true }.Start(); |
| | | });
|
| | | }
|
| | |
|
| | | #endregion
|