aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/JobProgressViewVM.cs
diff options
context:
space:
mode:
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.cs22
1 files changed, 22 insertions, 0 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 387b3e6a0..16ffdd906 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
@@ -8,6 +8,7 @@ using Tango.Integration.Operation;
using Tango.PPC.Common;
using Tango.PPC.Common.Navigation;
using Tango.PPC.Jobs.AppBarItems;
+using Tango.PPC.Jobs.Dialogs;
using Tango.PPC.Jobs.Views;
namespace Tango.PPC.Jobs.ViewModels
@@ -95,10 +96,31 @@ namespace Tango.PPC.Jobs.ViewModels
{
Job = e.Job;
e.JobHandler.StatusChanged += JobHandler_StatusChanged;
+ e.JobHandler.SpoolChangeRequired += JobHandler_SpoolChangeRequired;
e.JobHandler.Stopped += JobHandler_Stopped;
}
/// <summary>
+ /// Handles the SpoolChangeRequired event of the JobHandler.
+ /// </summary>
+ /// <param name="sender">The source of the event.</param>
+ /// <param name="e">The <see cref="SpoolChangeRequiredEventArgs"/> instance containing the event data.</param>
+ private void JobHandler_SpoolChangeRequired(object sender, SpoolChangeRequiredEventArgs e)
+ {
+ InvokeUI(async () =>
+ {
+ if ((await NotificationProvider.ShowDialog(new SpoolChangeViewVM(e))).DialogResult)
+ {
+ e.Confirm();
+ }
+ else
+ {
+ e.Abort();
+ }
+ });
+ }
+
+ /// <summary>
/// Handles the Stopped event of the JobHandler.
/// </summary>
/// <param name="sender">The source of the event.</param>