From a93db4940a37fd73a37dd9b237c16e744e36f9ea Mon Sep 17 00:00:00 2001
From: wxr <464027401@qq.com>
Date: 星期二, 30 八月 2022 10:24:45 +0800
Subject: [PATCH] 迁移升级网关之后修改网关子网号
---
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