From bac00b1bc932d3a85f90986466757b24d9407d61 Mon Sep 17 00:00:00 2001
From: wei <kaede@kaededeMacBook-Air.local>
Date: 星期二, 22 十二月 2020 14:02:13 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/WJC' into NewFilePath
---
HDL_ON/UI/UI2/4-PersonalCenter/SearchDevice/SearchDevicePage.cs | 66 ++++++++++++++++-----------------
1 files changed, 32 insertions(+), 34 deletions(-)
diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/SearchDevice/SearchDevicePage.cs b/HDL_ON/UI/UI2/4-PersonalCenter/SearchDevice/SearchDevicePage.cs
old mode 100644
new mode 100755
index 2807957..22ece99
--- a/HDL_ON/UI/UI2/4-PersonalCenter/SearchDevice/SearchDevicePage.cs
+++ b/HDL_ON/UI/UI2/4-PersonalCenter/SearchDevice/SearchDevicePage.cs
@@ -4,7 +4,7 @@
using Newtonsoft.Json;
using HDL_ON.Entity;
using System.Collections.Generic;
-
+using HDL_ON.DriverLayer;
namespace HDL_ON.UI
{
@@ -34,39 +34,37 @@
{
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.ReadGatewayIP();
+ //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}");
+ // }
+ // }
+ // }
+ // };
+ new Control_Udp().SearchLocalGateway();
contentView.EndHeaderRefreshing();
};
--
Gitblit v1.8.0