diff options
| author | Roy Ben-Shabat <Roy.mail.net@gmail.com> | 2023-05-10 14:47:51 +0300 |
|---|---|---|
| committer | Roy Ben-Shabat <Roy.mail.net@gmail.com> | 2023-05-10 14:47:51 +0300 |
| commit | 5c378ccb814defda8e73dae4296b82117869cec4 (patch) | |
| tree | af424439df7ca9320751808f1385f16b37851114 /Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels | |
| parent | 067fffda79f588672990d1e7b0e08766b5f0a172 (diff) | |
| parent | 0bb3af54358fd768c21e2c835b7fd82d1868f71d (diff) | |
| download | Tango-5c378ccb814defda8e73dae4296b82117869cec4.tar.gz Tango-5c378ccb814defda8e73dae4296b82117869cec4.zip | |
Merge branch 'eureka' of https://twinetfs.visualstudio.com/Tango/_git/Tango into eureka
Diffstat (limited to 'Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels')
| -rw-r--r-- | Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/LoginViewVM.cs | 9 | ||||
| -rw-r--r-- | Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MachineStatusViewVM.cs | 17 |
2 files changed, 24 insertions, 2 deletions
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/LoginViewVM.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/LoginViewVM.cs index ec316989f..07b58e55f 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/LoginViewVM.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/LoginViewVM.cs @@ -13,6 +13,7 @@ using Tango.PPC.Common.Authentication; using Tango.BL.Entities; using Tango.BL.Enumerations; using Tango.Logging; +using Tango.PPC.UI.Views; namespace Tango.PPC.UI.ViewModels { @@ -95,6 +96,14 @@ namespace Tango.PPC.UI.ViewModels if (!AuthenticationProvider.AuthenticationRequired) { LogManager.Log("Application is ready! Navigating to home module..."); + + if (BuildProvider.IsEureka) + { + var secondsPassed = (DateTime.Now - LoadingView.VideoStartTime).TotalSeconds; + var secondsToHold = Math.Max(10 - secondsPassed, 0); + await Task.Delay(TimeSpan.FromSeconds(secondsToHold)); + } + await NavigationManager.NavigateTo(NavigationView.HomeModule); IsLoading = false; } diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MachineStatusViewVM.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MachineStatusViewVM.cs index 2a851e007..fba49ced3 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MachineStatusViewVM.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MachineStatusViewVM.cs @@ -6,8 +6,10 @@ using System.Threading.Tasks; using Tango.BL.Entities; using Tango.BL.Enumerations; using Tango.Core.Commands; +using Tango.Core.DI; using Tango.Integration.Operation; using Tango.PPC.Common; +using Tango.PPC.Common.Diagnostics; using Tango.PPC.Jobs; using Tango.PPC.Jobs.NavigationObjects; using Tango.PPC.Jobs.Views; @@ -19,7 +21,11 @@ namespace Tango.PPC.UI.ViewModels { #region Properties - private JobHandler _handler; + [TangoInject] + public IDiagnosticsFrameProvider DefaultDiagnosticsFrameProvider { get; set; } + + + private JobHandler _handler; private Job _job; /// <summary> @@ -230,8 +236,15 @@ namespace Tango.PPC.UI.ViewModels { MachineProvider.MachineOperator.PrintingStarted += MachineOperator_PrintingStarted; MachineProvider.MachineOperator.PrintingEnded += MachineOperator_PrintingEnded; + + //DefaultDiagnosticsFrameProvider.FrameReceived += DefaultDiagnosticsFrameProvider_FrameReceived; } - + + private void DefaultDiagnosticsFrameProvider_FrameReceived(object sender, PMR.Diagnostics.StartDiagnosticsResponse e) + { + var frame = e; + } + private void MachineOperator_PrintingStarted(object sender, PrintingEventArgs e) { _handler = e.JobHandler; |
