From 43b0d5870d528f23ecd6aeceb6cfd4325188b46f Mon Sep 17 00:00:00 2001 From: wxr <464027401@qq.com> Date: 星期四, 01 七月 2021 15:50:43 +0800 Subject: [PATCH] Revert "1" --- HDL_ON/UI/UI2/4-PersonalCenter/SearchDevice/SearchDevicePage.cs | 70 +++++++++++++++++----------------- 1 files changed, 35 insertions(+), 35 deletions(-) diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/SearchDevice/SearchDevicePage.cs b/HDL_ON/UI/UI2/4-PersonalCenter/SearchDevice/SearchDevicePage.cs index d4dab74..614d47d 100644 --- 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 { @@ -30,43 +30,43 @@ }; bodyView.AddChidren(contentView); + + contentView.BeginHeaderRefreshingAction += () => { 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}"); + // } + // } + // } + // }; + new Control_Udp().SearchLocalGateway(); contentView.EndHeaderRefreshing(); }; @@ -102,7 +102,7 @@ switch (device.gateway_type) { - case 4: + case "4": btnIcon.UnSelectedImagePath = "FunctionIcon/DeviceIcon/VoicePanelIcon.png"; break; default: -- Gitblit v1.8.0