From 9f326f4000847e6167d8166fa2f6a66f53cb3734 Mon Sep 17 00:00:00 2001 From: 黄学彪 <hxb@hdlchina.com.cn> Date: 星期四, 17 十二月 2020 09:07:13 +0800 Subject: [PATCH] 新云端Ver1.3 --- ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/AddScenePage.cs | 127 +++++++++++++++++++++--------------------- 1 files changed, 64 insertions(+), 63 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/AddScenePage.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/AddScenePage.cs index 5f6a110..950f06d 100755 --- a/ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/AddScenePage.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/AddScenePage.cs @@ -1,14 +1,15 @@ 锘縰sing System; using System.Collections.Generic; -using Microsoft.AppCenter.Crashes; using Shared.Common; -using Shared.Phone.UserCenter.Device; using ZigBee.Device; using static ZigBee.Device.BindObj; using static ZigBee.Device.Panel; namespace Shared.Phone.UserCenter.DeviceBind { + /// <summary> + /// 鏅�氶潰鏉跨殑缁戝畾鍦烘櫙鐣岄潰銆愬彧鍙粦瀹�1涓満鏅�� + /// </summary> public class AddScenePage : BindCommonLayout { /// 鏋勯�犲嚱鏁� @@ -51,7 +52,7 @@ /// <summary> /// 淇濆瓨瀹屾垚鎸夐挳 /// </summary> - Button btnFinifh; + Button btnFinish; /// <summary> /// 妤煎眰鏂囨湰 /// </summary> @@ -165,7 +166,7 @@ }; this.midFrameLayout.AddChidren(bottomFrameLayout); - btnFinifh = new Button() + btnFinish = new Button() { Width = Application.GetRealWidth(907), Gravity = Gravity.CenterHorizontal, @@ -176,10 +177,10 @@ IsBold = true, TextSize = 16, }; - bottomFrameLayout.AddChidren(btnFinifh); + bottomFrameLayout.AddChidren(btnFinish); #endregion - #region 鏁版嵁澶勭悊 + #region 鏁版嵁澶勭悊 //鑾峰彇妤煎眰 dicFloor = HdlRoomLogic.Current.GetFloorSortList(); currentKey.currentSelectFloorId = BindInfo.GetCurrentSelectFloorId(); @@ -236,25 +237,25 @@ if (curRoom.ListSceneId.Count == 0) { - btnFinifh.Enable = false; - btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMUnSelect; + btnFinish.Enable = false; + btnFinish.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMUnSelect; } else { - btnFinifh.Enable = true; - btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack; + btnFinish.Enable = true; + btnFinish.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack; } if (targetListDevice.Count == 0 && targetListScene.Count == 0) { - btnFinifh.Enable = false; - btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMUnSelect; + btnFinish.Enable = false; + btnFinish.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMUnSelect; } else { - btnFinifh.Enable = true; - btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack; + btnFinish.Enable = true; + btnFinish.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack; } - btnFinifh.MouseUpEventHandler += (sender, e) => + btnFinish.MouseUpEventHandler += (sender, e) => { bool isFinish = false; System.Threading.Tasks.Task.Run(() => @@ -284,9 +285,9 @@ { Application.RunOnMainThread(() => { - btnFinifh.Enable = true; - btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack; - new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.BindFailed), Direction = AMPopTipDirection.Up, CloseTime = 1 }.Show(btnFinifh); + btnFinish.Enable = true; + btnFinish.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack; + new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.BindFailed), Direction = AMPopTipDirection.Up, CloseTime = 1 }.Show(btnFinish); CommonPage.Loading.Hide(); }); return; @@ -300,13 +301,13 @@ { Application.RunOnMainThread(() => { - btnFinifh.Enable = true; - btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack; + btnFinish.Enable = true; + btnFinish.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack; CommonPage.Loading.Hide(); var myTip = new Tip(); myTip.Direction = AMPopTipDirection.None; myTip.CloseTime = 2; - myTip.Text = Language.StringByID(R.MyInternationalizationString.GwResponseOvertime); + myTip.Text = Language.StringByID(R.MyInternationalizationString.GwResponseOvertime) + "(" + "5006" + ")"; myTip.Show(Common.CommonPage.Instance); }); return; @@ -318,13 +319,13 @@ { Application.RunOnMainThread(() => { - btnFinifh.Enable = true; - btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack; + btnFinish.Enable = true; + btnFinish.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack; CommonPage.Loading.Hide(); var myTip = new Tip(); myTip.Direction = AMPopTipDirection.None; myTip.CloseTime = 2; - myTip.Text = Language.StringByID(R.MyInternationalizationString.GwResponseOvertime); + myTip.Text = Language.StringByID(R.MyInternationalizationString.GwResponseOvertime) + "(" + "120_ 6533" + ")"; myTip.Show(Common.CommonPage.Instance); }); return; @@ -333,8 +334,8 @@ { Application.RunOnMainThread(() => { - btnFinifh.Enable = true; - btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack; + btnFinish.Enable = true; + btnFinish.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack; var myTip = new Tip(); myTip.Direction = AMPopTipDirection.None; myTip.CloseTime = 2; @@ -396,16 +397,16 @@ this.RemoveFromParent(); } CommonPage.Loading.Hide(); - btnFinifh.Enable = true; - btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack; + btnFinish.Enable = true; + btnFinish.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack; }); } else if (dev.addedDeviceBindResponseData.Result == 1) { Application.RunOnMainThread(() => { - btnFinifh.Enable = true; - btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack; + btnFinish.Enable = true; + btnFinish.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack; CommonPage.Loading.Hide(); new Tip() { @@ -413,7 +414,7 @@ Text = Language.StringByID(R.MyInternationalizationString.BindFailed), Direction = AMPopTipDirection.Up, CloseTime = 1 - }.Show(btnFinifh); + }.Show(btnFinish); }); return; } @@ -421,8 +422,8 @@ { Application.RunOnMainThread(() => { - btnFinifh.Enable = true; - btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack; + btnFinish.Enable = true; + btnFinish.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack; CommonPage.Loading.Hide(); new Tip() { @@ -430,7 +431,7 @@ Text = Language.StringByID(R.MyInternationalizationString.BindUnknownError), Direction = AMPopTipDirection.Up, CloseTime = 1 - }.Show(btnFinifh); + }.Show(btnFinish); }); return; @@ -440,10 +441,10 @@ { Application.RunOnMainThread(() => { - btnFinifh.Enable = true; - btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack; + btnFinish.Enable = true; + btnFinish.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack; CommonPage.Loading.Hide(); - new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.GwResponseOvertime), Direction = AMPopTipDirection.Up, CloseTime = 1 }.Show(btnFinifh); + new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.GwResponseOvertime) + "(" + "5001" + ")", Direction = AMPopTipDirection.Up, CloseTime = 1 }.Show(btnFinish); }); return; @@ -510,7 +511,7 @@ var btnRoom = new Button { Height = Application.GetRealHeight(58), - Width = Application.GetRealWidth(127), + Width = Application.GetRealWidth(255), Y = Application.GetRealHeight(58), X = Application.GetRealWidth(14), Text = room.Name, @@ -529,7 +530,7 @@ curentOldRoomFrameLayout = btnRoomFrameLayout; } - if (index == roomTempList.Count - 1 && index > 3) + if (index == roomTempList.Count - 1 && index > 2) { var btnRoomFrameLayoutEmpty = new FrameLayout { @@ -568,23 +569,23 @@ curRoom = room; if (curRoom.ListSceneId.Count == 0) { - btnFinifh.Enable = false; - btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMUnSelect; + btnFinish.Enable = false; + btnFinish.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMUnSelect; } else { - btnFinifh.Enable = true; - btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack; + btnFinish.Enable = true; + btnFinish.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack; } if (targetListDevice.Count == 0 && targetListScene.Count == 0) { - btnFinifh.Enable = false; - btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMUnSelect; + btnFinish.Enable = false; + btnFinish.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMUnSelect; } else { - btnFinifh.Enable = true; - btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack; + btnFinish.Enable = true; + btnFinish.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack; } RefreshSceneList(curRoom); @@ -593,7 +594,7 @@ btnRoomFrameLayout.MouseUpEventHandler += eHandlerRoom; index++; } - BindInfo.FinishDisplay(roomTempList, btnFinifh); + BindInfo.FinishDisplay(roomTempList, btnFinish); RefreshSceneList(curRoom); } @@ -613,8 +614,8 @@ var currentSceneUIList = GetMatchSceneUIList(curRoom); if (currentSceneUIList.Count == 0) { - btnFinifh.Enable = false; - btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMUnSelect; + btnFinish.Enable = false; + btnFinish.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMUnSelect; return; } foreach (var scene in currentSceneUIList) @@ -736,13 +737,13 @@ } if (targetListDevice.Count == 0 && targetListScene.Count == 0) { - btnFinifh.Enable = false; - btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMUnSelect; + btnFinish.Enable = false; + btnFinish.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMUnSelect; } else { - btnFinifh.Enable = true; - btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack; + btnFinish.Enable = true; + btnFinish.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack; } }; rowLayout.MouseUpEventHandler += hander; @@ -753,13 +754,13 @@ } if (targetListDevice.Count == 0 && targetListScene.Count == 0) { - btnFinifh.Enable = false; - btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMUnSelect; + btnFinish.Enable = false; + btnFinish.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMUnSelect; } else { - btnFinifh.Enable = true; - btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack; + btnFinish.Enable = true; + btnFinish.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack; } } @@ -906,13 +907,13 @@ RefreshSceneList(roomList[0]); if (targetListDevice.Count == 0 && targetListScene.Count == 0) { - btnFinifh.Enable = false; - btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMUnSelect; + btnFinish.Enable = false; + btnFinish.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMUnSelect; } else { - btnFinifh.Enable = true; - btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack; + btnFinish.Enable = true; + btnFinish.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack; } dialog.Close(); }; @@ -942,7 +943,7 @@ List<SceneUI> GetALlDispalyRoomSceneList() { currentKeyAllRoomSceneList.Clear(); - // 鑾峰彇鎵�鏈夋埧闂� + // 鑾峰彇鎵�鏈夋埧闂� var listAllRoom = HdlRoomLogic.Current.GetAllListRooms(); foreach (var room in listAllRoom) { -- Gitblit v1.8.0