aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/PPC/Tango.PPC.UI/Connectivity
diff options
context:
space:
mode:
authorRoy Ben Shabat <Roy.mail.net@gmail.com>2021-03-10 15:16:39 +0200
committerRoy Ben Shabat <Roy.mail.net@gmail.com>2021-03-10 15:16:39 +0200
commit59d8d9f374dd6b2dc5ef938a5fb1ddece1d47c43 (patch)
tree68d83b9c6dabc426e8f204e8849ddbfc5e1d45aa /Software/Visual_Studio/PPC/Tango.PPC.UI/Connectivity
parent3dfab420fe594d83c5382107b4f80bdeab9ddc44 (diff)
downloadTango-59d8d9f374dd6b2dc5ef938a5fb1ddece1d47c43.tar.gz
Tango-59d8d9f374dd6b2dc5ef938a5fb1ddece1d47c43.zip
Changed PPC internet connection check based on windows report.
Diffstat (limited to 'Software/Visual_Studio/PPC/Tango.PPC.UI/Connectivity')
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/Connectivity/DefaultConnectivityProvider.cs11
1 files changed, 4 insertions, 7 deletions
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Connectivity/DefaultConnectivityProvider.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/Connectivity/DefaultConnectivityProvider.cs
index 5218d9f70..a2275a72d 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Connectivity/DefaultConnectivityProvider.cs
+++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Connectivity/DefaultConnectivityProvider.cs
@@ -1,4 +1,5 @@
-using System;
+using Microsoft.WindowsAPICodePack.Net;
+using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
@@ -269,15 +270,11 @@ namespace Tango.PPC.UI.Connectivity
{
try
{
- using (var client = new WebClient())
- using (client.OpenRead("http://clients3.google.com/generate_204"))
- {
- return true;
- }
+ return NetworkListManager.GetNetworks(NetworkConnectivityLevels.Connected).Any(x => x.IsConnectedToInternet);
}
catch
{
- return false;
+ return true;
}
});
}