From ed3bfb7462d44747230437717e8673a5192f833f Mon Sep 17 00:00:00 2001
From: 陈嘉乐 <cjl@hdlchina.com.cn>
Date: 星期一, 30 十一月 2020 20:34:51 +0800
Subject: [PATCH] 2020-11-30-2
---
HDL_ON/UI/UI2/4-PersonalCenter/SearchDevice/SearchDevicePage.cs | 64 ++++++++++++++++---------------
1 files changed, 33 insertions(+), 31 deletions(-)
diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/SearchDevice/SearchDevicePage.cs b/HDL_ON/UI/UI2/4-PersonalCenter/SearchDevice/SearchDevicePage.cs
index 2077630..2807957 100644
--- a/HDL_ON/UI/UI2/4-PersonalCenter/SearchDevice/SearchDevicePage.cs
+++ b/HDL_ON/UI/UI2/4-PersonalCenter/SearchDevice/SearchDevicePage.cs
@@ -34,37 +34,39 @@
{
deviceIpList.Clear();
contentView.RemoveAll();
- //DriverLayer.Control.ins.ChangeCommunicationMode(DriverLayer.CommunicationMode.local_BusUdp);
-// UdpSocket._BusSocket.SearchNetDeviceAction = (jto) =>
-// {
-// var device = JsonConvert.DeserializeObject<DeviceModule>(jto.ToString());
-// if (device != null)
-// {
-// lock (deviceIpList)
-// {
-// if (!deviceIpList.Contains(device.ip_address))
-// {
-// deviceIpList.Add(device.ip_address);
-// MainPage.Log($"鎼滅储鍒扮綉缁滆澶囷細{device.ip_address}");
-// Application.RunOnMainThread(() =>
-// {
-//#if DEBUG
-//#else
-// if(device.gateway_type== 4)
-//#endif
-// {
-// LoadRow(device);
-// }
-// });
-// }
-// else
-// {
-// MainPage.Log($"宸插姞杞借IP璁惧:{device.ip_address}");
-// }
-// }
-// }
-// };
- DriverLayer.Control.Ins.myUdp.SearchLocalGateway();
+ DriverLayer.Control.ins.ChangeCommunicationMode(DriverLayer.CommunicationMode.local_BusUdp);
+ UdpSocket._BusSocket.SearchNetDeviceAction = (jto) =>
+ {
+ var device = JsonConvert.DeserializeObject<DeviceModule>(jto.ToString());
+ if (device != null)
+ {
+ lock (deviceIpList)
+ {
+ if (!deviceIpList.Contains(device.ip_address))
+ {
+ deviceIpList.Add(device.ip_address);
+
+ MainPage.Log($"鎼滅储鍒扮綉缁滆澶囷細{device.ip_address}");
+
+ Application.RunOnMainThread(() =>
+ {
+#if DEBUG
+#else
+ if(device.gateway_type== 4)
+#endif
+ {
+ LoadRow(device);
+ }
+ });
+ }
+ else
+ {
+ MainPage.Log($"宸插姞杞借IP璁惧:{device.ip_address}");
+ }
+ }
+ }
+ };
+ DriverLayer.Control.ins.myUdp.ReadGatewayIP();
contentView.EndHeaderRefreshing();
};
--
Gitblit v1.8.0