From 7e42cc13a14b7de31c9f5d5c61cdf24f3246335d Mon Sep 17 00:00:00 2001 From: wxr <464027401@qq.com> Date: 星期五, 31 三月 2023 11:36:45 +0800 Subject: [PATCH] 1 --- Crabtree/SmartHome/UI/SimpleControl/Phone/System/SystemRemote.cs | 24 ++++++++++++------------ 1 files changed, 12 insertions(+), 12 deletions(-) diff --git a/Crabtree/SmartHome/UI/SimpleControl/Phone/System/SystemRemote.cs b/Crabtree/SmartHome/UI/SimpleControl/Phone/System/SystemRemote.cs index bafa812..e547fd3 100644 --- a/Crabtree/SmartHome/UI/SimpleControl/Phone/System/SystemRemote.cs +++ b/Crabtree/SmartHome/UI/SimpleControl/Phone/System/SystemRemote.cs @@ -159,18 +159,18 @@ public static bool checeInternet () { - byte [] bytes = null; - var dateTime = DateTime.Now; - System.Threading.Tasks.Task.Run (() => { - bytes = new System.Net.WebClient { Proxy = null }.DownloadData ("http://www.baidu.com"); - }); - while ((DateTime.Now - dateTime).TotalMilliseconds < 8000) { - System.Threading.Thread.Sleep (100); - if (bytes != null) { - return true; - } - } - return false; + //byte [] bytes = null; + //var dateTime = DateTime.Now; + //System.Threading.Tasks.Task.Run (() => { + // bytes = new System.Net.WebClient { Proxy = null }.DownloadData ("http://www.baidu.com"); + //}); + //while ((DateTime.Now - dateTime).TotalMilliseconds < 8000) { + // System.Threading.Thread.Sleep (100); + // if (bytes != null) { + // return true; + // } + //} + return true; } static bool ShowTip = true; -- Gitblit v1.8.0