From 3ee2d0d1a8ebe8f53fb3a1e31cc547e39645c335 Mon Sep 17 00:00:00 2001 From: JLChen <551775569@qq.com> Date: 星期四, 23 七月 2020 16:23:43 +0800 Subject: [PATCH] 2020-07-23 1.移动网络也支持检测。 2.设置菜单页面,增加滑动效果,解决不显示Help按钮问题。 --- Crabtree/SmartHome/UI/SimpleControl/Phone/User/UserSettingView.cs | 47 +++++++++++++++++++++++++++++------------------ 1 files changed, 29 insertions(+), 18 deletions(-) diff --git a/Crabtree/SmartHome/UI/SimpleControl/Phone/User/UserSettingView.cs b/Crabtree/SmartHome/UI/SimpleControl/Phone/User/UserSettingView.cs index 2f3909b..2101637 100644 --- a/Crabtree/SmartHome/UI/SimpleControl/Phone/User/UserSettingView.cs +++ b/Crabtree/SmartHome/UI/SimpleControl/Phone/User/UserSettingView.cs @@ -399,8 +399,9 @@ #endregion - #region ---鏁版嵁鎺ユ敹--- - if (UserConfig.Instance.internetStatus == 2) { + #region ---娴嬭瘯鎸夐挳--- + //if (UserConfig.Instance.internetStatus == 2) { + if (true) { var ConmmunicationTestView = new FrameLayout () { Width = Application.GetRealWidth (640), Height = Application.GetRealHeight (100), @@ -619,19 +620,24 @@ MainPage.Loading.Start (); }); - CommonPage.IsRemote = false; - CommonPage.FindGateway = true; - var result = Control.ControlBytesSendHasReturn (Command.ReadDeviceMac, common.SubnetID, common.DeviceID, new byte [] { }, false); - CommonPage.FindGateway = false; - if (result != null) { - Application.RunOnMainThread (() => { - btnLocalTest.Text = "Local UDP communication : succeeded."; - }); - } else { - Application.RunOnMainThread (() => { - btnLocalTest.Text = "Local UDP communication : failed."; - }); + //2020-07-23 杩炴帴WiFi鎵嶆娴嬫湰鍦� + if (UserConfig.Instance.internetStatus == 2) { + CommonPage.IsRemote = false; + CommonPage.FindGateway = true; + var result = Control.ControlBytesSendHasReturn (Command.ReadDeviceMac, common.SubnetID, common.DeviceID, new byte [] { }, false); + CommonPage.FindGateway = false; + if (result != null) { + Application.RunOnMainThread (() => { + btnLocalTest.Text = "Local UDP communication : succeeded."; + }); + } else { + Application.RunOnMainThread (() => { + btnLocalTest.Text = "Local UDP communication : failed."; + }); + } + } + //UDP communication to Sever : succeeded. var gateWay = Newtonsoft.Json.JsonConvert.DeserializeObject<GatewayBase> (gateWayString); @@ -668,12 +674,17 @@ btnSeverTest.Text = "Gateway UDP communication to Sever : failed."; return; }); + } else { + Application.RunOnMainThread (() => { + btnSeverTest.Text = "UDP communication to Sever : succeeded."; + return; + }); } } - Application.RunOnMainThread (() => { - btnSeverTest.Text = "UDP communication to Sever : succeeded."; - return; - }); + //Application.RunOnMainThread (() => { + // btnSeverTest.Text = "UDP communication to Sever : succeeded."; + // return; + //}); } } catch (Exception ex) { Console.WriteLine (ex.Message); -- Gitblit v1.8.0