diff options
| author | Roy Ben Shabat <Roy.mail.net@gmail.com> | 2020-05-25 17:27:24 +0300 |
|---|---|---|
| committer | Roy Ben Shabat <Roy.mail.net@gmail.com> | 2020-05-25 17:27:24 +0300 |
| commit | 7689f77fe2f356d17a5ad59dbeb4a0fed3ca4a0d (patch) | |
| tree | de4a7897e4cd322435bab966769d98aeea324687 /Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/JobProgressViewVM.cs | |
| parent | 9e6f2a37d528a1bf50629dc7132f1e4496114aee (diff) | |
| download | Tango-7689f77fe2f356d17a5ad59dbeb4a0fed3ca4a0d.tar.gz Tango-7689f77fe2f356d17a5ad59dbeb4a0fed3ca4a0d.zip | |
Added PPC power up sequence support !
Refactored AppBarItems implementation.
Diffstat (limited to 'Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/JobProgressViewVM.cs')
| -rw-r--r-- | Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/JobProgressViewVM.cs | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/JobProgressViewVM.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/JobProgressViewVM.cs index 03cd5bfff..b4a30cb39 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/JobProgressViewVM.cs +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/JobProgressViewVM.cs @@ -9,6 +9,7 @@ using Tango.Integration.Operation; using Tango.PMR.Printing; using Tango.PPC.Common; using Tango.PPC.Common.Navigation; +using Tango.PPC.Common.Notifications; using Tango.PPC.Jobs.AppBarItems; using Tango.PPC.Jobs.AppButtons; using Tango.PPC.Jobs.Dialogs; @@ -25,6 +26,7 @@ namespace Tango.PPC.Jobs.ViewModels { private StopPrintingButton _stop_job_btn; private JobHandler _handler; + private JobProgressAppBarItem _appBarItem; #region Properties @@ -142,9 +144,10 @@ namespace Tango.PPC.Jobs.ViewModels if (MachineProvider.MachineOperator.IsPrinting && _handler != null && !_handler.IsCanceled) { - NotificationProvider.PushAppBarItem<JobProgressAppBarItem>().Pressed += (_, __) => + _appBarItem = NotificationProvider.PushAppBarItem<JobProgressAppBarItem>(); + _appBarItem.Pressed += (_, __) => { - NotificationProvider.CurrentAppBarItem.Close(); + _appBarItem?.Close(); NavigationManager.NavigateTo<JobsModule>(nameof(JobProgressView)); }; } @@ -159,10 +162,7 @@ namespace Tango.PPC.Jobs.ViewModels IsDisplayJobOutline = false; - if (NotificationProvider.HasAppBarItem && NotificationProvider.CurrentAppBarItem is JobProgressAppBarItem) - { - NotificationProvider.CurrentAppBarItem.Close(); - } + _appBarItem?.Close(); if (_handler != null && !_handler.Status.IsFailed) { @@ -232,10 +232,7 @@ namespace Tango.PPC.Jobs.ViewModels _stop_job_btn.Pop(); } - if (NotificationProvider.HasAppBarItem && NotificationProvider.CurrentAppBarItem is JobProgressAppBarItem) - { - NotificationProvider.CurrentAppBarItem.Close(); - } + _appBarItem?.Close(); if (_handler != null) { |
