From d9a89773f2f283fbf5596799dd4d50d231817203 Mon Sep 17 00:00:00 2001 From: Roy Ben-Shabat Date: Wed, 12 Dec 2018 18:23:24 +0200 Subject: IHotSpot Provider & IRemoteAssistance Provider. --- .../Connectivity/DefaultConnectivityProvider.cs | 57 ---------------- .../PPC/Tango.PPC.UI/Properties/AssemblyInfo.cs | 2 +- .../PPC/Tango.PPC.UI/Tango.PPC.UI.csproj | 6 +- .../PPC/Tango.PPC.UI/ViewModelLocator.cs | 6 ++ .../Visual_Studio/PPC/Tango.PPC.UI/app.manifest | 76 ++++++++++++++++++++++ 5 files changed, 88 insertions(+), 59 deletions(-) create mode 100644 Software/Visual_Studio/PPC/Tango.PPC.UI/app.manifest (limited to 'Software/Visual_Studio/PPC/Tango.PPC.UI') 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 }); } - - /// - /// Enables the hot spot. - /// - /// The password. - /// - 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; - } - } - } - - /// - /// Disables the hot spot. - /// - /// - 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; - } - } - } } } diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Properties/AssemblyInfo.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/Properties/AssemblyInfo.cs index c21f513ae..740b0d203 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Properties/AssemblyInfo.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Properties/AssemblyInfo.cs @@ -8,4 +8,4 @@ using System.Windows; // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle("Tango PPC Application")] -[assembly: AssemblyVersion("2.0.13.1608")] +[assembly: AssemblyVersion("2.0.15.1608")] diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Tango.PPC.UI.csproj b/Software/Visual_Studio/PPC/Tango.PPC.UI/Tango.PPC.UI.csproj index 786eca0c9..406568f71 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Tango.PPC.UI.csproj +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Tango.PPC.UI.csproj @@ -50,6 +50,9 @@ prompt 4 + + app.manifest + ..\..\packages\ControlzEx.3.0.2.4\lib\net45\ControlzEx.dll @@ -253,6 +256,7 @@ ResXFileCodeGenerator Resources.Designer.cs + SettingsSingleFileGenerator @@ -468,7 +472,7 @@ del "$(TargetDir)firmware_package.tfp" - + \ No newline at end of file diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModelLocator.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModelLocator.cs index 11751d822..645456216 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModelLocator.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModelLocator.cs @@ -10,12 +10,14 @@ using Tango.PPC.Common.Connectivity; using Tango.PPC.Common.Diagnostics; using Tango.PPC.Common.EventLogging; using Tango.PPC.Common.ExternalBridge; +using Tango.PPC.Common.HotSpot; using Tango.PPC.Common.MachineSetup; using Tango.PPC.Common.MachineUpdate; using Tango.PPC.Common.Modules; using Tango.PPC.Common.Navigation; using Tango.PPC.Common.Notifications; using Tango.PPC.Common.Printing; +using Tango.PPC.Common.RemoteAssistance; using Tango.PPC.Common.Storage; using Tango.PPC.Common.Threading; using Tango.PPC.UI.Authentication; @@ -60,6 +62,8 @@ namespace Tango.PPC.UI TangoIOC.Default.Unregister(); TangoIOC.Default.Unregister(); TangoIOC.Default.Unregister(); + TangoIOC.Default.Unregister(); + TangoIOC.Default.Unregister(); TangoIOC.Default.Unregister(); TangoIOC.Default.Register(new DefaultDispatcherProvider(Application.Current.Dispatcher)); @@ -77,6 +81,8 @@ namespace Tango.PPC.UI TangoIOC.Default.Register(); TangoIOC.Default.Register(); TangoIOC.Default.Register(); + TangoIOC.Default.Register(); + TangoIOC.Default.Register(); TangoIOC.Default.Register(); //TangoIOC.Default.Register(new TeamFoundationServiceExtendedClient("https://twinetfs.visualstudio.com", String.Empty, "szzfokrceo4rhd4eqi5qpmxn3pa5iwl3q7tlqd36l2m7smz2ynoa")); diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/app.manifest b/Software/Visual_Studio/PPC/Tango.PPC.UI/app.manifest new file mode 100644 index 000000000..d72e75011 --- /dev/null +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/app.manifest @@ -0,0 +1,76 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -- cgit v1.3.1