From 6f9ecad11d3b73f67baedaef00e4df80cb0d644c Mon Sep 17 00:00:00 2001 From: Roy Ben Shabat Date: Wed, 26 Mar 2025 15:45:11 +0200 Subject: Removed Wifi from Eureka. --- .../Tango.PPC.MachineSettings/Views/MainView.xaml | 2 +- .../Connectivity/DefaultConnectivityProvider.cs | 29 ++++++++++++++++------ .../Visual_Studio/PPC/Tango.PPC.UI/app.manifest | 2 +- 3 files changed, 24 insertions(+), 9 deletions(-) (limited to 'Software/Visual_Studio') diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.MachineSettings/Views/MainView.xaml b/Software/Visual_Studio/PPC/Modules/Tango.PPC.MachineSettings/Views/MainView.xaml index 3728ecf82..d13d6c124 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.MachineSettings/Views/MainView.xaml +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.MachineSettings/Views/MainView.xaml @@ -63,7 +63,7 @@ - + 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 a2275a72d..a55506be6 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Connectivity/DefaultConnectivityProvider.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Connectivity/DefaultConnectivityProvider.cs @@ -16,6 +16,7 @@ using Tango.Core.Commands; using Tango.Core.Cryptography; using Tango.PPC.Common; using Tango.PPC.Common.Application; +using Tango.PPC.Common.Build; using Tango.PPC.Common.Connection; using Tango.PPC.Common.Connectivity; using Tango.PPC.Common.Notifications; @@ -34,6 +35,7 @@ namespace Tango.PPC.UI.Connectivity private System.Timers.Timer _lanUpdateTimer; private WiFiNetwork _connectedNetwork; private PPCSettings _settings; + private IBuildProvider _buildProvider; /// /// Occurs when the connectivity provider state has changed (e.g network connected/disconnected). @@ -46,7 +48,10 @@ namespace Tango.PPC.UI.Connectivity /// public bool IsConnected { - get { return _isConnected; } + get + { + return _buildProvider.IsEureka ? true : _isConnected; + } private set { _isConnected = value; RaisePropertyChangedAuto(); } } @@ -56,7 +61,10 @@ namespace Tango.PPC.UI.Connectivity /// public bool IsLanConnected { - get { return _isLanConnected; } + get + { + return _buildProvider.IsEureka ? true : _isLanConnected; + } private set { _isLanConnected = value; RaisePropertyChangedAuto(); } } @@ -98,10 +106,11 @@ namespace Tango.PPC.UI.Connectivity /// /// Initializes a new instance of the class. /// - public DefaultConnectivityProvider(IPPCApplicationManager applicationManager, INotificationProvider notificationProvider, IMachineProvider machineProvider) + public DefaultConnectivityProvider(IPPCApplicationManager applicationManager, INotificationProvider notificationProvider, IMachineProvider machineProvider, IBuildProvider buildProvider) { _cryptographer = new Rfc2898Cryptographer(); + _buildProvider = buildProvider; _notification = notificationProvider; _machineProvider = machineProvider; @@ -112,9 +121,11 @@ namespace Tango.PPC.UI.Connectivity AvailableWiFiNetworksViewSource.SortDescriptions.Add(new SortDescription(nameof(WiFiNetwork.IsConnected), ListSortDirection.Descending)); AvailableWiFiNetworksViewSource.SortDescriptions.Add(new SortDescription(nameof(WiFiNetwork.SignalStrength), ListSortDirection.Descending)); - _wifi = new Wifi(); - - applicationManager.ApplicationReady += ApplicationManager_Ready; + if (!_buildProvider.IsEureka) + { + _wifi = new Wifi(); + applicationManager.ApplicationReady += ApplicationManager_Ready; + } ConnectToWiFiCommand = new RelayCommand(async (x) => { @@ -251,7 +262,11 @@ namespace Tango.PPC.UI.Connectivity return Task.Factory.StartNew(() => { AvailableWiFiNetworks.Clear(); - GetAvailableWiFiNetworks().Wait(); + + if (!_buildProvider.IsEureka) + { + GetAvailableWiFiNetworks().Wait(); + } }); } diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/app.manifest b/Software/Visual_Studio/PPC/Tango.PPC.UI/app.manifest index d72e75011..efc5f8179 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/app.manifest +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/app.manifest @@ -16,7 +16,7 @@ Remove this element if your application requires this virtualization for backwards compatibility. --> - + -- cgit v1.3.1