From f500e14c0a994487070380c50c85e0929cbc8e63 Mon Sep 17 00:00:00 2001 From: JLChen <551775569@qq.com> Date: 星期二, 05 一月 2021 10:48:04 +0800 Subject: [PATCH] 2021-01-05 1.更新 --- Crabtree/SmartHome/UI/SimpleControl/Phone/Guide/GuideAddResidence.cs | 33 ++++++++++++++++++++++++++++----- 1 files changed, 28 insertions(+), 5 deletions(-) diff --git a/Crabtree/SmartHome/UI/SimpleControl/Phone/Guide/GuideAddResidence.cs b/Crabtree/SmartHome/UI/SimpleControl/Phone/Guide/GuideAddResidence.cs index 2bda578..a7c8412 100644 --- a/Crabtree/SmartHome/UI/SimpleControl/Phone/Guide/GuideAddResidence.cs +++ b/Crabtree/SmartHome/UI/SimpleControl/Phone/Guide/GuideAddResidence.cs @@ -289,7 +289,7 @@ var btnPoint = new Button () { Width = Application.GetRealWidth (10), - Height = Application.GetRealHeight (10), + Height = Application.GetRealWidth (10), X = Application.GetRealWidth (50), Gravity = Gravity.CenterVertical, UnSelectedImagePath = "Item/Point.png", @@ -313,7 +313,7 @@ Button FromSharingButton = new Button () { X = Application.GetRealWidth (480), Width = Application.GetRealWidth (30), - Height = Application.GetRealHeight (30), + Height = Application.GetRealWidth (30), Gravity = Gravity.CenterVertical, UnSelectedImagePath = "CrabtreeAdd/FromSharing.png", SelectedImagePath = "CrabtreeAdd/FromSharing.png", @@ -538,6 +538,26 @@ } /// <summary> + /// 鍚姩鏈湴妯″紡 + /// </summary> + void EnableLocalMode () { + MainPage.AddTip ("Enable local mode."); + Utlis.ShowAppLinkStatus (AppLinkStatus.WiFiOffline); + CommonPage.IsRemote = false; + SmartHome.MqttCommon.DisConnectRemoteMqttClient ("EnableLocalMode"); + } + + /// <summary> + /// 鍚姩杩滅▼妯″紡 + /// </summary> + void EnableRemoteMode () + { + MainPage.AddTip ("Restore remote mode."); + Utlis.ShowAppLinkStatus (AppLinkStatus.CloudUnlink); + CommonPage.IsRemote = true; + } + + /// <summary> /// 璺宠浆缃戝叧鎼滅储椤甸潰 /// </summary> /// <param name="home"></param> @@ -545,9 +565,12 @@ try { //杩滅▼杩炴帴鐨勬椂鍊欑姝� 鎼滅储缃戝叧鍜屾坊鍔犺澶� if (CommonPage.IsRemote) { - //褰撳墠澶勪簬杩滅▼杩炴帴妯″紡锛屾棤娉曡繘鍏ユ悳绱㈢綉鍏抽〉闈€�傝鍏堝垏鎹㈠洖鏈湴杩炴帴妯″紡銆� - new Alert ("", "Currently in remote connection mode, unable to enter the search gateway page. Please switch back to local connection mode first.", Language.StringByID (R.MyInternationalizationString.Close)).Show (); - return; + ////褰撳墠澶勪簬杩滅▼杩炴帴妯″紡锛屾棤娉曡繘鍏ユ悳绱㈢綉鍏抽〉闈€�傝鍏堝垏鎹㈠洖鏈湴杩炴帴妯″紡銆� + //new Alert ("", "Currently in remote connection mode, unable to enter the search gateway page. Please switch back to local connection mode first.", Language.StringByID (R.MyInternationalizationString.Close)).Show (); + //return; + + //2020-06-29 鍚姩鏈湴閫氫俊妯″紡 + EnableLocalMode (); } -- Gitblit v1.8.0