JLChen
2021-01-05 f500e14c0a994487070380c50c85e0929cbc8e63
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 ();
                }