HDL Home App 第二版本 旧平台金堂用 正在使用
黄学彪
2019-12-02 4c40f503acf2bcf90d294cc439ef46ba259b9c60
ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/BindTargetsPage.cs
@@ -601,7 +601,7 @@
                {
                    CommonPage.Loading.Start("");
                    var bindResult = await currentKey.ClearBindInfoAsync();
                    if (bindResult.clearBindInfoResponseData != null)
                    if (bindResult != null && bindResult.clearBindInfoResponseData != null)
                    {
                        if (bindResult.clearBindInfoResponseData.Result != 0)
                        {
@@ -629,6 +629,10 @@
                                isDelSuccess = true;
                            }
                        }
                    }
                    else
                    {
                        new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.GwResponseOvertime), Direction = AMPopTipDirection.Up, CloseTime = 2 }.Show(btnDel);
                    }
                }
                catch { }
@@ -1068,6 +1072,46 @@
                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)
@@ -1135,7 +1179,7 @@
                                    CommonPage.Loading.Hide();
                                }
                                break;
                            case 4:
                            case 2:
                                if (delResult.removeBindResultResponseData != null)
                                {
                                    if (delResult.removeBindResultResponseData.Result == 0)