| | |
| | | { |
| | | CommonPage.Loading.Start(""); |
| | | var bindResult = await currentKey.ClearBindInfoAsync(); |
| | | if (bindResult.clearBindInfoResponseData != null) |
| | | if (bindResult != null && bindResult.clearBindInfoResponseData != null) |
| | | { |
| | | if (bindResult.clearBindInfoResponseData.Result != 0) |
| | | { |
| | |
| | | isDelSuccess = true; |
| | | } |
| | | } |
| | | } |
| | | else |
| | | { |
| | | new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.GwResponseOvertime), Direction = AMPopTipDirection.Up, CloseTime = 2 }.Show(btnDel); |
| | | } |
| | | } |
| | | catch { } |
| | |
| | | CommonPage.Loading.Start(""); |
| | | var delResult = new DelDeviceBindResponseAllData(); |
| | | delResult = await currentKey.DelDeviceBindAsync(delDevice); |
| | | //if (delResult != null) |
| | | //{ |
| | | // if (delResult.removeBindResultResponseData != null) |
| | | // { |
| | | // if (delResult.removeBindResultResponseData.Result == 0) |
| | | // { |
| | | // currentKey.bindList.Remove(bindDevice); |
| | | // RefreshList(); |
| | | // return 0; |
| | | // } |
| | | // else |
| | | // { |
| | | // new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.RemoveFailed), Direction = AMPopTipDirection.None, CloseTime = 2 }.Show(CommonPage.Instance); |
| | | // } |
| | | // } |
| | | // else if (delResult.delDeviceBindResponseData != null) |
| | | // { |
| | | // foreach (var remTarget in delResult.delDeviceBindResponseData.RemoveBindList) |
| | | // { |
| | | // if (remTarget.Result == 0) |
| | | // { |
| | | // currentKey.bindList.Remove(bindDevice); |
| | | // RefreshList(); |
| | | // //如果是场景,用户删除清空当前到房间列表 |
| | | // currentKey.RoomId = ""; |
| | | // currentKey.ReSave(); |
| | | // return 0; |
| | | // } |
| | | // else |
| | | // { |
| | | // new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.RemoveFailed), Direction = AMPopTipDirection.None, CloseTime = 2 }.Show(CommonPage.Instance); |
| | | // } |
| | | // } |
| | | // } |
| | | //} |
| | | //else |
| | | //{ |
| | | // new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.GwResponseOvertime), Direction = AMPopTipDirection.None, CloseTime = 2 }.Show(CommonPage.Instance); |
| | | //} |
| | | |
| | | if (delResult.delDeviceBindResponseData?.RemoveBindList != null) |
| | | { |
| | | foreach (var re in delResult.delDeviceBindResponseData.RemoveBindList) |
| | |
| | | CommonPage.Loading.Hide(); |
| | | } |
| | | break; |
| | | case 4: |
| | | case 2: |
| | | if (delResult.removeBindResultResponseData != null) |
| | | { |
| | | if (delResult.removeBindResultResponseData.Result == 0) |