From 454ac814944cf956ff02b84b70ba2ec68e5e5ea1 Mon Sep 17 00:00:00 2001 From: JLChen <551775569@qq.com> Date: 星期三, 15 一月 2020 19:38:47 +0800 Subject: [PATCH] 2020-01-15 1.优化MQTT连接。 2.增加本地通信加密。 --- Crabtree/SmartHome/UI/SimpleControl/MainPage.cs | 32 ++++++++++++++++++++++++++++---- 1 files changed, 28 insertions(+), 4 deletions(-) diff --git a/Crabtree/SmartHome/UI/SimpleControl/MainPage.cs b/Crabtree/SmartHome/UI/SimpleControl/MainPage.cs index 4b2a41d..39af71c 100644 --- a/Crabtree/SmartHome/UI/SimpleControl/MainPage.cs +++ b/Crabtree/SmartHome/UI/SimpleControl/MainPage.cs @@ -39,7 +39,7 @@ //public static Button LogoButton = new Button (); - public static string RequestVersion = "20200110"; + public static string RequestVersion = "20200115"; public static UserInfo LoginUser; /// <summary> /// 鏄惁鏄鐞嗗憳鏉冮檺(鍙樻洿浜�,鎴愬憳鐨勬椂鍊�,杩欎釜涔熶负ture銆備负浠�涔堜細澹版槑杩欐牱鍙橀噺,鍥犱负鏈変簺鎺ュ彛蹇呴』浣跨敤鍘熸潵鐨凾oken) @@ -53,6 +53,17 @@ } } } + + ///// <summary> + ///// 鏄惁璐﹀彿鍦ㄥ叾瀹冭澶囩櫥褰曚簡 + ///// </summary> + //public static bool IsOtherDevicesLogin = false; + +//#if __IOS__ +// public static readonly string PhoneType = "iOS"; +//#else +// public static readonly string PhoneType = "Android"; +//#endif public static string SoftPadTitle = "Crabtree"; public static string SoftTitle = "Crabtree"; @@ -308,11 +319,24 @@ /// </summary> public static void FailureToServer () { + //Application.RunOnMainThread (() => { + // new Alert ("", Language.StringByID (R.MyInternationalizationString.FailureToServer), + // Language.StringByID (R.MyInternationalizationString.Close)).Show (); + //}); + ShowAlertOnMainThread (Language.StringByID (R.MyInternationalizationString.FailureToServer)); + } + + /// <summary> + /// 2020-01-11 寮圭獥鎻愮ず + /// </summary> + /// <param name="mes"></param> + public static void ShowAlertOnMainThread (string mes) + { Application.RunOnMainThread (() => { - new Alert ("", Language.StringByID (R.MyInternationalizationString.FailureToServer), - Language.StringByID (R.MyInternationalizationString.Close)).Show (); + new Alert ("", mes, Language.StringByID (R.MyInternationalizationString.Close)).Show (); }); } + /// <summary> /// 璁惧涓嶅湪绾匡紝鏃犲搷搴� @@ -339,4 +363,4 @@ }); } } -} \ No newline at end of file +} -- Gitblit v1.8.0