| | |
| | | } |
| | | |
| | | //修改云端备注 |
| | | new System.Threading.Thread (() => { |
| | | var http = new HttpServerRequest (); |
| | | http.EditDeviceName (commonDevice.DeviceID.ToString (), UserConfig.Instance.CurrentRegion.Id, remakeStr); |
| | | }) { IsBackground = true }.Start (); |
| | | |
| | | var cloudDataLoop = CommonConfig.Current.FunctionList.Find ((obj) => obj.bus.SubnetID == commonDevice.SubnetID |
| | | && obj.bus.DeviceID == commonDevice.DeviceID && obj.bus.LoopId == commonDevice.LoopID); |
| | | if (cloudDataLoop == null) { |
| | | new Alert (Language.StringByID (R.MyInternationalizationString.Tip), "Data is not synchronized to the cloud.", Language.StringByID (R.MyInternationalizationString.Close)).Show (); |
| | | } else { |
| | | new System.Threading.Thread (() => { |
| | | var http = new HttpServerRequest (); |
| | | var pack = http.EditDeviceName (cloudDataLoop.deviceId, UserConfig.Instance.CurrentRegion.Id, remakeStr); |
| | | if (pack.Code != "0") { |
| | | new Alert (Language.StringByID (R.MyInternationalizationString.Tip), $"Cloud data modification failed({pack.Code}).", Language.StringByID (R.MyInternationalizationString.Close)).Show (); |
| | | } |
| | | }) { IsBackground = true }.Start (); |
| | | } |
| | | |
| | | MainPage.Loading.Start (); |
| | | //byte [] remakeBytes = CommonPage.MyEncodingGB2312.GetBytes (etDeviceName.Text.Trim ()); |