aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/PPC/Tango.PPC.UI/Connectivity
diff options
context:
space:
mode:
authorRoy Ben-Shabat <Roy@Twine-s.com>2018-12-12 18:23:24 +0200
committerRoy Ben-Shabat <Roy@Twine-s.com>2018-12-12 18:23:24 +0200
commitd9a89773f2f283fbf5596799dd4d50d231817203 (patch)
treed213bc8024342356dc54654235b77decbdbd26b8 /Software/Visual_Studio/PPC/Tango.PPC.UI/Connectivity
parentde0b06ac48e9765914f4e07c0e03497033066296 (diff)
downloadTango-d9a89773f2f283fbf5596799dd4d50d231817203.tar.gz
Tango-d9a89773f2f283fbf5596799dd4d50d231817203.zip
IHotSpot Provider & IRemoteAssistance Provider.
Diffstat (limited to 'Software/Visual_Studio/PPC/Tango.PPC.UI/Connectivity')
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/Connectivity/DefaultConnectivityProvider.cs57
1 files changed, 0 insertions, 57 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 fbc619e12..a05e66f10 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Connectivity/DefaultConnectivityProvider.cs
+++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Connectivity/DefaultConnectivityProvider.cs
@@ -138,18 +138,6 @@ namespace Tango.PPC.UI.Connectivity
{
await Connect(auto_connect_network);
}
-
- if (settings.EnableHotSpot)
- {
- try
- {
- await EnableHotSpot(settings.HotSpotPassword);
- }
- catch (Exception ex)
- {
- LogManager.Log(ex, "Error starting on application startup.");
- }
- }
});
}
@@ -289,50 +277,5 @@ namespace Tango.PPC.UI.Connectivity
IsConnected = connected;
ConnectionStateChanged?.Invoke(this, new ConnectionStateEventArgs() { IsConnected = connected });
}
-
- /// <summary>
- /// Enables the hot spot.
- /// </summary>
- /// <param name="password">The password.</param>
- /// <returns></returns>
- public async Task EnableHotSpot(string password)
- {
- if (!IsHotspotActive)
- {
- try
- {
- CmdCommand command = new CmdCommand("netsh", $"wlan set hostednetwork mode=allow ssid='{"Tango_" + _machineProvider.Machine.SerialNumber}' key='{password}'");
- await command.Run();
- IsHotspotActive = true;
- }
- catch (Exception ex)
- {
- LogManager.Log(ex, "Error activating hot spot.");
- throw;
- }
- }
- }
-
- /// <summary>
- /// Disables the hot spot.
- /// </summary>
- /// <returns></returns>
- public async Task DisableHotSpot()
- {
- if (IsHotspotActive)
- {
- try
- {
- CmdCommand command = new CmdCommand("netsh", "wlan stop hosted network");
- await command.Run();
- IsHotspotActive = false;
- }
- catch (Exception ex)
- {
- LogManager.Log(ex, "Error deactivating hot spot.");
- throw;
- }
- }
- }
}
}