| | |
| | | /// <summary>
|
| | | /// 主题间的超时时间 -100:中断线程(单位:秒)
|
| | | /// </summary>
|
| | | private int topTimeOut = 60;
|
| | | private int topTimeOut = 120;
|
| | | /// <summary>
|
| | | /// 超时最大时间
|
| | | /// </summary>
|
| | | private int topMaxTime = 120;
|
| | | /// <summary>
|
| | | /// 画面ID,标记它由哪个界面调用并打开的
|
| | | /// </summary>
|
| | |
| | | {
|
| | | if (topic == gatewayId + "/Device/DeviceAnnounce_Respon")
|
| | | {
|
| | | this.topTimeOut = 60;
|
| | | this.topTimeOut = topMaxTime;
|
| | | //网关告知客户端有设备声明
|
| | | this.SetDeviceProgressValue(1);
|
| | | return 2;
|
| | |
| | | if (info.Result != 0)
|
| | | {
|
| | | //出现未知错误,请重新入网
|
| | | this.ShowMassage(ShowMsgType.Tip, Language.StringByID(R.MyInternationalizationString.uUnKnowErrorAndReAccessNetwork));
|
| | | return -1;
|
| | | //this.ShowMassage(ShowMsgType.Tip, Language.StringByID(R.MyInternationalizationString.uUnKnowErrorAndReAccessNetwork));
|
| | | HdlLogLogic.Current.WriteLog(-1, resultData);
|
| | | return 2;
|
| | | }
|
| | | this.topTimeOut = 60;
|
| | | this.topTimeOut = topMaxTime;
|
| | | //设置进度值
|
| | | this.SetDeviceProgressValue(2);
|
| | | return 2;
|
| | |
| | | if (info.Result != 0)
|
| | | {
|
| | | //出现未知错误,请重新入网
|
| | | this.ShowMassage(ShowMsgType.Tip, Language.StringByID(R.MyInternationalizationString.uUnKnowErrorAndReAccessNetwork));
|
| | | return -1;
|
| | | //this.ShowMassage(ShowMsgType.Tip, Language.StringByID(R.MyInternationalizationString.uUnKnowErrorAndReAccessNetwork));
|
| | | HdlLogLogic.Current.WriteLog(-1, resultData);
|
| | | return 2;
|
| | | }
|
| | | this.topTimeOut = 60;
|
| | | this.topTimeOut = topMaxTime;
|
| | | //设置进度值
|
| | | this.SetDeviceProgressValue(3);
|
| | | return 2;
|
| | |
| | | {
|
| | | //出现未知错误,请重新入网
|
| | | this.ShowMassage(ShowMsgType.Tip, Language.StringByID(R.MyInternationalizationString.uUnKnowErrorAndReAccessNetwork));
|
| | | return -1;
|
| | | //HdlLogLogic.Current.WriteLog(-1, resultData);
|
| | | return 2;
|
| | | }
|
| | | this.topTimeOut = 60;
|
| | | this.topTimeOut = topMaxTime;
|
| | | //设置进度值
|
| | | this.SetDeviceProgressValue(4);
|
| | | return 2;
|
| | |
| | | if (info.Result != 0)
|
| | | {
|
| | | //出现未知错误,请重新入网
|
| | | this.ShowMassage(ShowMsgType.Tip, Language.StringByID(R.MyInternationalizationString.uUnKnowErrorAndReAccessNetwork));
|
| | | return -1;
|
| | | //this.ShowMassage(ShowMsgType.Tip, Language.StringByID(R.MyInternationalizationString.uUnKnowErrorAndReAccessNetwork));
|
| | | HdlLogLogic.Current.WriteLog(-1, resultData);
|
| | | return 2;
|
| | | }
|
| | | this.topTimeOut = 60;
|
| | | this.topTimeOut = topMaxTime;
|
| | | //设置进度值
|
| | | this.SetDeviceProgressValue(5);
|
| | | return 2;
|
| | |
| | | //进度条
|
| | | decimal result = value / 6;
|
| | | int width = (int)(result * Application.GetRealWidth(559));
|
| | | if (btnProgressBar.Width >= width)
|
| | | {
|
| | | //有些设备会上报两次,这里不能让它的进度条往回走
|
| | | return;
|
| | | }
|
| | | btnProgressBar.Width = width;
|
| | |
|
| | | //文本显示
|