diff options
| author | Roy Ben-Shabat <Roy@Twine-s.com> | 2019-03-05 14:53:49 +0200 |
|---|---|---|
| committer | Roy Ben-Shabat <Roy@Twine-s.com> | 2019-03-05 14:53:49 +0200 |
| commit | 499f4facfe296d984a44e9ce0b6e1eb23ba8d644 (patch) | |
| tree | bf554330362404128c36321a4fce3fd927caea82 /Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/JobSummeryViewVM.cs | |
| parent | b292fb7ff234a973670ebf9e54b9e111a90f3639 (diff) | |
| download | Tango-499f4facfe296d984a44e9ce0b6e1eb23ba8d644.tar.gz Tango-499f4facfe296d984a44e9ce0b6e1eb23ba8d644.zip | |
Improvements and bug fixes on PPC.
Diffstat (limited to 'Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/JobSummeryViewVM.cs')
| -rw-r--r-- | Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/JobSummeryViewVM.cs | 34 |
1 files changed, 24 insertions, 10 deletions
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/JobSummeryViewVM.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/JobSummeryViewVM.cs index 46c6d7ffd..01d83d0d0 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/JobSummeryViewVM.cs +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/JobSummeryViewVM.cs @@ -32,6 +32,18 @@ namespace Tango.PPC.Jobs.ViewModels set { _job = value; RaisePropertyChangedAuto(); } } + private TimeSpan _estimatedDuration; + /// <summary> + /// Gets or sets the duration of the estimated. + /// </summary> + + public TimeSpan EstimatedDuration + { + get { return _estimatedDuration; } + set { _estimatedDuration = value; RaisePropertyChangedAuto(); } + } + + /// <summary> /// Gets or sets the dye command. /// </summary> @@ -57,10 +69,20 @@ namespace Tango.PPC.Jobs.ViewModels /// Handles the job selected message. /// </summary> /// <param name="message">The message.</param> - private void HandleJobSelectedMessage(JobSelectedMessage message) + private async void HandleJobSelectedMessage(JobSelectedMessage message) { _context = message.Context; Job = message.Job; + + Job = await new JobBuilder(_context).Set(Job.Guid) + .WithConfiguration() + .WithRML() + .WithUser() + .WithSegments() + .WithBrushStops() + .BuildAsync(); + + EstimatedDuration = await Job.GetEstimatedDuration(); } /// <summary> @@ -81,16 +103,8 @@ namespace Tango.PPC.Jobs.ViewModels { LogManager.Log("Start job command pressed. Starting job and navigating to job progress view..."); - Job = await new JobBuilder(_context).Set(Job.Guid) - .WithConfiguration() - .WithRML() - .WithUser() - .WithSegments() - .WithBrushStops() - .BuildAsync(); - PrintingManager.Print(Job, _context); - await NavigationManager.NavigateTo<JobsModule>(nameof(JobProgressView)); + await NavigationManager.NavigateTo<JobsModule>(false, nameof(JobProgressView)); } catch (Exception ex) { |
