From 34b65350abbb8b740b9c3bc0b43254cbbe23fcb5 Mon Sep 17 00:00:00 2001 From: xm <1271024303@qq.com> Date: 星期二, 19 五月 2020 09:31:44 +0800 Subject: [PATCH] 合并代码,更改面板目标信息 --- ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/BindTargetsPage.cs | 46 ++++++++++++++++++++++++++++++++++++---------- 1 files changed, 36 insertions(+), 10 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/BindTargetsPage.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/BindTargetsPage.cs old mode 100755 new mode 100644 index 586f04d..e4d680a --- a/ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/BindTargetsPage.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/BindTargetsPage.cs @@ -246,7 +246,7 @@ var btnAddFrameLayout = new FrameLayout() { - X = Application.GetRealWidth(888), + X = Application.GetRealWidth(772 - 58), Width = Application.GetRealWidth(192), }; this.titleFrameLayout.AddChidren(btnAddFrameLayout); @@ -352,6 +352,7 @@ InitListInfo(); } + /// <summary> /// 涓儴甯冨眬 /// </summary> @@ -359,6 +360,7 @@ { midVerticalRefreshLayout = new VerticalFrameRefreshControl(29) { + Height = this.midFrameLayout.Height + 1, }; this.midFrameLayout.AddChidren(midVerticalRefreshLayout); midVerticalRefreshLayout.BeginHeaderRefreshingAction += () => @@ -489,6 +491,10 @@ { btnFloorRoomNameText = myName; } + else + { + btnFloorRoomNameText = Language.StringByID(R.MyInternationalizationString.Undistributed); + } } } else @@ -511,11 +517,25 @@ var tempDevFloorName = Common.Config.Instance.Home.GetFloorNameById(tempDevFloorId); if (string.IsNullOrEmpty(tempDevFloorName)) { - btnFloorRoomNameText = tempDevRoomName; + if (string.IsNullOrEmpty(tempDevRoomName)) + { + btnFloorRoomNameText = Language.StringByID(R.MyInternationalizationString.Undistributed); + } + else + { + btnFloorRoomNameText = tempDevRoomName; + } } else { - btnFloorRoomNameText = tempDevFloorName + "," + tempDevRoomName; + if (string.IsNullOrEmpty(tempDevRoomName)) + { + btnFloorRoomNameText = Language.StringByID(R.MyInternationalizationString.Undistributed); + } + else + { + btnFloorRoomNameText = tempDevFloorName + "," + tempDevRoomName; + } } } @@ -639,10 +659,10 @@ else { var temp = await currentKey.ConfigureHdlKeyValueAsync(Panel.KeyMode.Default); - if (temp.setWritableValueResponData?.Status != 0) + if (temp != null && temp.setWritableValueResponData?.Status != 0) { var temp1 = await currentKey.ConfigureHdlKeyValueAsync(Panel.KeyMode.Default); - if (temp1.setWritableValueResponData?.Status != 0) + if (temp1 != null && temp1.setWritableValueResponData?.Status != 0) { new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.ChangeBindMode), Direction = AMPopTipDirection.Up, CloseTime = 2 }.Show(btnDel); } @@ -671,7 +691,6 @@ currentKey.bindList.Clear(); RefreshList(); //濡傛灉鏄満鏅紝鐢ㄦ埛鍒犻櫎娓呯┖褰撳墠鍒版埧闂村垪琛� - currentKey.RoomId = ""; currentKey.ReSave(); } CommonPage.Loading.Hide(); @@ -720,26 +739,34 @@ if (typeModeList == null) { //鍐嶆鍔ㄦ�佽幏鍙栨寜閿敮鎸佺殑澶х被 - CommonPage.Loading.Start(); + Application.RunOnMainThread(() => + { + CommonPage.Loading.Start(); + }); typeModeList = await GetTypeMode(); if (typeModeList == null) { Application.RunOnMainThread(() => { new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.GwResponseOvertime), Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(Common.CommonPage.Instance); + CommonPage.Loading.Hide(); }); - CommonPage.Loading.Hide(); dialog.Close(); return; } else { - CommonPage.Loading.Hide(); + Application.RunOnMainThread(() => + { + CommonPage.Loading.Hide(); + }); } } + int count = 0; foreach (var value in typeModeList) { + count++; #region rowView var rowView = new FrameLayout() { @@ -1174,7 +1201,6 @@ { currentKey.panelMode = 65535; } - currentKey.RoomId = ""; currentKey.ReSave(); return 0; break; -- Gitblit v1.8.0