diff options
Diffstat (limited to 'Software/Visual_Studio/PPC/Tango.PPC.UI')
7 files changed, 29 insertions, 10 deletions
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Build/DefaultBuildProvider.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/Build/DefaultBuildProvider.cs index 36bb64103..599447c95 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Build/DefaultBuildProvider.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Build/DefaultBuildProvider.cs @@ -17,7 +17,7 @@ namespace Tango.PPC.UI.Build get { return BuildType == BuildType.Eureka; } } - public string BuildName => BuildType == BuildType.Eureka ? "Eureka" : "Tango - PPC"; + public string BuildName => BuildType == BuildType.Eureka ? "Twine X4" : "PPC"; public DefaultBuildProvider() { diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/MainWindow.xaml.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/MainWindow.xaml.cs index db154f464..92c527134 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/MainWindow.xaml.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/MainWindow.xaml.cs @@ -18,10 +18,12 @@ using System.Windows.Media.Imaging; using System.Windows.Navigation; using System.Windows.Shapes; using Tango.Core.DI; +using Tango.PPC.Common; using Tango.PPC.Common.Application; using Tango.PPC.Common.Build; using Tango.PPC.UI.Build; using Tango.PPC.UI.Helpers; +using Tango.Settings; using Tango.Touch.Helpers; namespace Tango.PPC.UI @@ -61,7 +63,9 @@ namespace Tango.PPC.UI private void InitEureka() { - Title = "Eureka"; + Title = "Twine X4"; + + var settings = SettingsManager.Default.GetOrCreate<PPCSettings>(); Viewbox viewBox = new Viewbox(); viewBox.Stretch = Stretch.Uniform; @@ -72,7 +76,7 @@ namespace Tango.PPC.UI var touch_screen = screens.Last(); - bool hasTouch = TouchHelper.IsTouchEnabled(); + bool hasTouch = TouchHelper.IsTouchEnabled() || settings.ForceTouchMode; if (!hasTouch) { diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Manifests/eureka.xml b/Software/Visual_Studio/PPC/Tango.PPC.UI/Manifests/eureka.xml index efc5f8179..d72e75011 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Manifests/eureka.xml +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Manifests/eureka.xml @@ -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> diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/PPCApplication/DefaultPPCApplicationManager.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/PPCApplication/DefaultPPCApplicationManager.cs index 00fd8c0e0..0f65f833e 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/PPCApplication/DefaultPPCApplicationManager.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/PPCApplication/DefaultPPCApplicationManager.cs @@ -38,6 +38,7 @@ using Tango.Insights; using System.Threading; using System.Reflection; using Tango.PPC.UI.ViewsContracts; +using Tango.PPC.Common.Build; namespace Tango.PPC.UI.PPCApplication { @@ -56,6 +57,7 @@ namespace Tango.PPC.UI.PPCApplication private IPPCModuleLoader _moduleLoader; private INotificationProvider _notificationProvider; private IMachineDataSynchronizer _machineDataSynchronizer; + private IBuildProvider _buildProvider; private WatchDogServer _watchdogServer; private ObservablesContext _machineContext; private ActionTimer _screenLockTimer; @@ -202,7 +204,7 @@ namespace Tango.PPC.UI.PPCApplication /// <summary> /// Initializes a new instance of the <see cref="DefaultPPCApplicationManager"/> class. /// </summary> - public DefaultPPCApplicationManager(IMachineProvider machineProvider, IDispatcherProvider dispatcherProvider, IEventLogger eventLogger, IPPCModuleLoader moduleLoader, INotificationProvider notificationProvider, IMachineDataSynchronizer machineDataSynchronizer) + public DefaultPPCApplicationManager(IMachineProvider machineProvider, IDispatcherProvider dispatcherProvider, IEventLogger eventLogger, IPPCModuleLoader moduleLoader, INotificationProvider notificationProvider, IMachineDataSynchronizer machineDataSynchronizer, IBuildProvider buildProvider) { StartPath = AssemblyHelper.GetCurrentAssemblyFolder(); @@ -212,6 +214,7 @@ namespace Tango.PPC.UI.PPCApplication _eventLogger = eventLogger; _moduleLoader = moduleLoader; _machineDataSynchronizer = machineDataSynchronizer; + _buildProvider = buildProvider; if (!DesignMode) { @@ -290,7 +293,7 @@ namespace Tango.PPC.UI.PPCApplication settings.ApplicationState = ApplicationStates.Ready; settings.Save(); - if (isAfterSetup) + if (isAfterSetup && !_buildProvider.IsEureka) { SystemRestartRequired?.Invoke(this, new EventArgs()); return; diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MachineSetupViewVM.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MachineSetupViewVM.cs index cce7d277b..6d99c1ff8 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MachineSetupViewVM.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MachineSetupViewVM.cs @@ -306,7 +306,14 @@ namespace Tango.PPC.UI.ViewModels if (connected) { - await NavigateTo(MachineSetupView.TimeZoneView); + if (BuildProvider.IsEureka) + { + await NavigateTo(MachineSetupView.EnvironmentView); + } + else + { + await NavigateTo(MachineSetupView.TimeZoneView); + } } else { @@ -346,7 +353,12 @@ namespace Tango.PPC.UI.ViewModels { _ppcWebClient.Environment = DeploymentSlot; } - await _operationSystemManager.ChangeTimeZone(SelectedTimeZone); + + if (!BuildProvider.IsEureka) + { + await _operationSystemManager.ChangeTimeZone(SelectedTimeZone); + } + _setup_result = await MachineSetupManager.Setup(SerialNumber); State = MachineSetupStates.Completed; LogManager.Log("Machine setup completed."); diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MainViewVM.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MainViewVM.cs index 50f4ed054..9b47cf390 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MainViewVM.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MainViewVM.cs @@ -328,7 +328,7 @@ namespace Tango.PPC.UI.ViewModels { _screenSaverTimer.Interval = TimeSpan.FromMinutes(Settings.ScreenSaverStartDuration).TotalMilliseconds; - if (Settings.EnableScreenSaver && !MachineProvider.IsConnected) + if (Settings.EnableScreenSaver && !MachineProvider.IsConnected && !BuildProvider.IsEureka) { IsScreenSaverOn = true; } diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/app.manifest b/Software/Visual_Studio/PPC/Tango.PPC.UI/app.manifest index efc5f8179..d72e75011 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> |
