| | |
| | | UserHomePage.FrameLayoutMain.AddChidren (UserMiddle.guidePageView); |
| | | var guide = new GuideAddResidence (); |
| | | UserMiddle.guidePageView.AddChidren (guide); |
| | | guide.ShowHomeList (); |
| | | guide.ShowHomeView (); |
| | | UserMiddle.guidePageView.PageIndex = 0; |
| | | //重置为加密模式 |
| | | UserConfig.Instance.IsLocalEncrypt = true; |
| | |
| | | /// </summary> |
| | | /// <param name="backBytes"></param> |
| | | /// <returns></returns> |
| | | static bool CheckIsSuccessfulWithBytes (byte [] backBytes) |
| | | static bool CheckIsSuccessfulWithBytes (byte [] backBytes, string errorStr = "Modify gateway configuration failed,please try again!") |
| | | { |
| | | if (backBytes == null) { |
| | | Application.RunOnMainThread (() => { |
| | | new Alert ("", Language.StringByID (R.MyInternationalizationString.TipEquipmentNotOnline), |
| | | new Alert ("", ErrorCode.GatewayNoResponse, |
| | | Language.StringByID (R.MyInternationalizationString.Close)).Show (); |
| | | }); |
| | | return false; |
| | |
| | | return true; |
| | | } else { |
| | | Application.RunOnMainThread (() => { |
| | | new Alert ("", Language.StringByID (R.MyInternationalizationString.OperationFailed), |
| | | new Alert ("", errorStr, |
| | | Language.StringByID (R.MyInternationalizationString.Close)).Show (); |
| | | }); |
| | | return false; |
| | |
| | | //如果没加密,走修改加密方法 |
| | | var result = SetGateWayLocalEncryption (common); |
| | | if (!result) { |
| | | MainPage.LoadingHide (); |
| | | Application.RunOnMainThread (() => { |
| | | MainPage.Loading.Hide (); |
| | | new Alert ("", "Encryption gateway failed, please try again.", Language.StringByID (R.MyInternationalizationString.Close)).Show (); |
| | | |
| | | }); |
| | | |
| | | return result;//修改失败 返回goNext false |
| | | } |
| | | //修改成功,设置本地为加密方式 |
| | | UserConfig.Instance.IsLocalEncrypt = true; |
| | | System.Console.WriteLine ($"============>LocalEncryptKey 加密成功Key为:{UserConfig.Instance.LocalEncryptKey}"); |
| | | //System.Console.WriteLine ($"============>LocalEncryptKey 加密成功Key为:{UserConfig.Instance.LocalEncryptKey}"); |
| | | } |
| | | goNext = true; |
| | | |