diff options
| author | Roy Ben Shabat <Roy.mail.net@gmail.com> | 2025-03-26 15:45:11 +0200 |
|---|---|---|
| committer | Roy Ben Shabat <Roy.mail.net@gmail.com> | 2025-03-26 15:45:11 +0200 |
| commit | 6f9ecad11d3b73f67baedaef00e4df80cb0d644c (patch) | |
| tree | ab34140f3b0e8abd52298fff97906787a890377c | |
| parent | 3a6dea9cf60040d6c0a267cbb1cdc9396a074f0c (diff) | |
| download | Tango-6f9ecad11d3b73f67baedaef00e4df80cb0d644c.tar.gz Tango-6f9ecad11d3b73f67baedaef00e4df80cb0d644c.zip | |
Removed Wifi from Eureka.
3 files changed, 24 insertions, 9 deletions
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 @@ <touch:LightTouchScrollViewer> <StackPanel Margin="50"> <!--WIFI--> - <touch:TouchExpander Header="Connectivity" IsExpanded="True" FontSize="{StaticResource TangoExpanderHeaderFontSize}"> + <touch:TouchExpander Header="Connectivity" IsExpanded="True" FontSize="{StaticResource TangoExpanderHeaderFontSize}" Visibility="{Binding BuildProvider.IsEureka,Converter={StaticResource BooleanToVisibilityInverseConverter}}"> <StackPanel Margin="10 30 10 10"> <connectivity:AvailableWiFiConnectionsControl DataContext="{Binding ConnectivityProvider}" /> 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; /// <summary> /// Occurs when the connectivity provider state has changed (e.g network connected/disconnected). @@ -46,7 +48,10 @@ namespace Tango.PPC.UI.Connectivity /// </summary> 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 /// </summary> 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 /// <summary> /// Initializes a new instance of the <see cref="DefaultConnectivityProvider"/> class. /// </summary> - 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<WiFiNetwork>(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. --> - <requestedExecutionLevel level="requireAdministrator" uiAccess="false" /> + <!--<requestedExecutionLevel level="requireAdministrator" uiAccess="false" />--> </requestedPrivileges> </security> </trustInfo> |
