| | |
| | | /// </summary> |
| | | /// <param name="backBytes"></param> |
| | | /// <returns></returns> |
| | | static bool CheckIsSuccessfulWithBytes (byte [] backBytes) |
| | | static bool CheckIsSuccessfulWithBytes (byte [] backBytes, string errorStr = "Modify gateway configuration failed!") |
| | | { |
| | | if (backBytes == null) { |
| | | Application.RunOnMainThread (() => { |
| | |
| | | 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 ("", ErrorCode.OperationFailed, 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; |
| | | |