diff options
| author | Avi Levkovich <avi@twine-s.com> | 2020-05-26 17:03:25 +0300 |
|---|---|---|
| committer | Avi Levkovich <avi@twine-s.com> | 2020-05-26 17:03:25 +0300 |
| commit | fd326204404ee0932ea465efcdd41e21fd7f2b49 (patch) | |
| tree | ffb38ac74dc86490a8581539cba7094452cb6ed6 /Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/JobProgressViewVM.cs | |
| parent | f0fc1abe6628c903d2e58dcd1b1a88ef43d45057 (diff) | |
| parent | 7102ed21905bc52c6aee506e919992ce1f98f641 (diff) | |
| download | Tango-fd326204404ee0932ea465efcdd41e21fd7f2b49.tar.gz Tango-fd326204404ee0932ea465efcdd41e21fd7f2b49.zip | |
Merge branch 'master' of https://twinetfs.visualstudio.com/_git/Tango
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) { |
