| | |
| | | /// 获取得到了新网关
|
| | | /// </summary>
|
| | | private bool newGatewayGetting = false;
|
| | | /// <summary>
|
| | | /// 网关检测中
|
| | | /// </summary>
|
| | | private string isGatewayChecking = "0";
|
| | |
|
| | | #endregion
|
| | |
|
| | |
| | | btnMsg1.Y = picGwImage.Bottom + Application.GetRealHeight(112);
|
| | | btnMsg1.TextID = R.MyInternationalizationString.uSearchGatewayFailMsg1;
|
| | | bodyFrameLayout.AddChidren(btnMsg1);
|
| | | //1.长按ZB/RST键20秒,网关恢复出厂设置,指示灯全部熄{0}灭后,重新入网。
|
| | | //1.长按ZB/RST键20秒,网关恢复出厂设置,指示灯全部熄灭后,重新入网。
|
| | | var btnMsg2 = new NormalViewControl(930, 100, true);
|
| | | btnMsg2.X = Application.GetRealWidth(75);
|
| | | btnMsg2.Y = btnMsg1.Bottom + Application.GetRealHeight(35);
|
| | |
| | | btnMsg2.TextColor = UserCenterColor.Current.TextGrayColor1;
|
| | | btnMsg2.IsMoreLines = true;
|
| | | bodyFrameLayout.AddChidren(btnMsg2);
|
| | | //2.点按HID/WCFG键,进入网关换绑模式,系统指示灯快闪{0}5秒。
|
| | | //2.点按HID/WCFG键,进入网关换绑模式,系统指示灯快闪5秒。
|
| | | var btnMsg3 = new NormalViewControl(930, 100, true);
|
| | | btnMsg3.X = Application.GetRealWidth(75);
|
| | | btnMsg3.Y = btnMsg2.Bottom + Application.GetRealHeight(12);
|
| | |
| | | picGwImage.AddChidren(btnRound);
|
| | |
|
| | | string strMsg = btnMsg.Text;
|
| | | HdlThreadLogic.Current.RunThread(async () =>
|
| | | HdlThreadLogic.Current.RunThread(() =>
|
| | | {
|
| | | //清空全部列表
|
| | | HdlGatewayLogic.Current.ClearAllRealGateway();
|
| | |
| | | maxCount--;
|
| | | if (maxCount % 4 == 0)
|
| | | {
|
| | | //每2秒检测搜索到的网关
|
| | | await this.CheckZbGatewayAndSetRow();
|
| | | lock(isGatewayChecking)
|
| | | {
|
| | | if (isGatewayChecking != "1")
|
| | | {
|
| | | isGatewayChecking = "1";
|
| | | HdlThreadLogic.Current.RunThread(async () =>
|
| | | {
|
| | | //每2秒检测搜索到的网关
|
| | | await this.CheckZbGatewayAndSetRow();
|
| | | lock (isGatewayChecking)
|
| | | {
|
| | | isGatewayChecking = "0";
|
| | | }
|
| | | });
|
| | | }
|
| | | }
|
| | | }
|
| | | if (this.newGatewayGetting == true)
|
| | | {
|
| | |
| | | this.InitFailMiddleFrame();
|
| | | });
|
| | | }
|
| | | else
|
| | | else if (newGatewayGetting == true)
|
| | | {
|
| | | HdlThreadLogic.Current.RunMain(() =>
|
| | | {
|
| | | var form = new WiredGatewayListForm();
|
| | | this.AddFromAndRemoveNowForm(form, listZbGateway, dicZbGatewayDiv);
|
| | | if (this.Parent != null)
|
| | | {
|
| | | var form = new WiredGatewayListForm();
|
| | | this.AddFromAndRemoveNowForm(form, listZbGateway, dicZbGatewayDiv);
|
| | | }
|
| | | });
|
| | | }
|
| | | });
|