diff options
| author | Roy Ben Shabat <Roy.mail.net@gmail.com> | 2020-05-20 06:27:49 +0300 |
|---|---|---|
| committer | Roy Ben Shabat <Roy.mail.net@gmail.com> | 2020-05-20 06:27:49 +0300 |
| commit | 402099d85ff0582bb48484d47fb2c4b6deb2e020 (patch) | |
| tree | 0b51f78366655f08fe9539be5135f8bf41af7637 /Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/JobsViewVM.cs | |
| parent | ed0c073eae5358b509c68e3051c489bd25be30c9 (diff) | |
| download | Tango-402099d85ff0582bb48484d47fb2c4b6deb2e020.tar.gz Tango-402099d85ff0582bb48484d47fb2c4b6deb2e020.zip | |
Prevent multiple job synchronization notifications.
Diffstat (limited to 'Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/JobsViewVM.cs')
| -rw-r--r-- | Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/JobsViewVM.cs | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/JobsViewVM.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/JobsViewVM.cs index af576ac93..f9029ed8c 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/JobsViewVM.cs +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/JobsViewVM.cs @@ -51,6 +51,7 @@ namespace Tango.PPC.Jobs.ViewModels private ObservableCollection<ColorCatalog> _catalogs; //Holds the available color catalogs for the site. private ObservableCollection<Rml> _rmls; //Holds the available RML for the site. private List<ColorSpace> _colorSpaces; //Holds the available color spaces. + private bool _isJobsSynchronizationNotificationActive; public enum JobsCategory { @@ -893,16 +894,23 @@ namespace Tango.PPC.Jobs.ViewModels private void MachineDataSynchronizer_SynchronizationEnded(object sender, SynchronizationEndedEventArgs e) { - if (e.NewChangedJobs > 0) + if (e.NewChangedJobs > 0 && !_isJobsSynchronizationNotificationActive) { + _isJobsSynchronizationNotificationActive = true; + var item = NotificationProvider.PushNotification<NewSynchronizardJobsNotificationItem>(); item.Pressed += (_, __) => { + _isJobsSynchronizationNotificationActive = false; LoadJobs(() => { NotificationProvider.ShowSuccess("Your job list is now synchronized."); }); }; + item.Closed += (_, __) => + { + _isJobsSynchronizationNotificationActive = false; + }; } } |
