aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/PPC/Tango.PPC.UI/Connectivity
diff options
context:
space:
mode:
Diffstat (limited to 'Software/Visual_Studio/PPC/Tango.PPC.UI/Connectivity')
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/Connectivity/DefaultConnectivityProvider.cs44
1 files changed, 1 insertions, 43 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..53e143def 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Connectivity/DefaultConnectivityProvider.cs
+++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Connectivity/DefaultConnectivityProvider.cs
@@ -4,7 +4,6 @@ using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Linq;
using System.Net;
-using System.Net.NetworkInformation;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
@@ -30,9 +29,7 @@ namespace Tango.PPC.UI.Connectivity
private IMachineProvider _machineProvider;
private Rfc2898Cryptographer _cryptographer;
private System.Timers.Timer _updateTimer;
- private System.Timers.Timer _lanUpdateTimer;
private WiFiNetwork _connectedNetwork;
- private PPCSettings _settings;
/// <summary>
/// Occurs when the connectivity provider state has changed (e.g network connected/disconnected).
@@ -46,17 +43,7 @@ namespace Tango.PPC.UI.Connectivity
public bool IsConnected
{
get { return _isConnected; }
- private set { _isConnected = value; RaisePropertyChangedAuto(); }
- }
-
- private bool _isLanConnected;
- /// <summary>
- /// Gets a value indicating whether there is LAN connection.
- /// </summary>
- public bool IsLanConnected
- {
- get { return _isLanConnected; }
- private set { _isLanConnected = value; RaisePropertyChangedAuto(); }
+ set { _isConnected = value; RaisePropertyChangedAuto(); }
}
private bool _isHotspoActive;
@@ -129,8 +116,6 @@ namespace Tango.PPC.UI.Connectivity
{
await RefreshAvailableWiFiNetworks();
});
-
- _settings = SettingsManager.Default.GetOrCreate<PPCSettings>();
}
/// <summary>
@@ -168,28 +153,6 @@ namespace Tango.PPC.UI.Connectivity
_updateTimer = new System.Timers.Timer(TimeSpan.FromSeconds(30).TotalMilliseconds);
_updateTimer.Elapsed += _updateTimer_Elapsed;
_updateTimer.Start();
-
- _lanUpdateTimer = new System.Timers.Timer(TimeSpan.FromSeconds(10).TotalMilliseconds);
- _lanUpdateTimer.Elapsed += _lanUpdateTimer_Elapsed;
- _lanUpdateTimer.Start();
- }
-
- private void _lanUpdateTimer_Elapsed(object sender, System.Timers.ElapsedEventArgs e)
- {
- foreach (NetworkInterface net in NetworkInterface.GetAllNetworkInterfaces())
- {
- if ((net.NetworkInterfaceType == NetworkInterfaceType.Ethernet
- || net.NetworkInterfaceType == NetworkInterfaceType.Ethernet3Megabit
- || net.NetworkInterfaceType == NetworkInterfaceType.FastEthernetFx
- || net.NetworkInterfaceType == NetworkInterfaceType.FastEthernetT
- || net.NetworkInterfaceType == NetworkInterfaceType.GigabitEthernet) && net.Name.ToStringOrEmpty().StartsWith("Ethernet") && net.OperationalStatus == OperationalStatus.Up)
- {
- IsLanConnected = true;
- return;
- }
- }
-
- IsLanConnected = false;
}
/// <summary>
@@ -260,11 +223,6 @@ namespace Tango.PPC.UI.Connectivity
/// <returns></returns>
public Task<bool> CheckInternetConnection()
{
- if (_settings.BypassInternetConnectivityCheck)
- {
- return Task.FromResult(true);
- }
-
return Task.Factory.StartNew<bool>(() =>
{
try