aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/PPC/Tango.PPC.UI/Printing
diff options
context:
space:
mode:
authorVictoria Plitt <Victoria.Plitt@twine-s.com>2019-11-13 11:59:51 +0200
committerVictoria Plitt <Victoria.Plitt@twine-s.com>2019-11-13 11:59:51 +0200
commitb294fd44000766de11ce6c0e2d82d2fae81c82b9 (patch)
treea49292df75c5ab265ff3f7f3254e9504db1f9420 /Software/Visual_Studio/PPC/Tango.PPC.UI/Printing
parent81ad4efdc9ec8593a75bf68fb3b39b97aa35aaa6 (diff)
downloadTango-b294fd44000766de11ce6c0e2d82d2fae81c82b9.tar.gz
Tango-b294fd44000766de11ce6c0e2d82d2fae81c82b9.zip
Restored job liquid quantity validation to start of procedure.
Diffstat (limited to 'Software/Visual_Studio/PPC/Tango.PPC.UI/Printing')
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/Printing/DefaultPrintingManager.cs18
1 files changed, 11 insertions, 7 deletions
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Printing/DefaultPrintingManager.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/Printing/DefaultPrintingManager.cs
index 21c68d3e6..56ec2fa7e 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Printing/DefaultPrintingManager.cs
+++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Printing/DefaultPrintingManager.cs
@@ -56,8 +56,16 @@ namespace Tango.PPC.UI.Printing
#if STUBPRINT
handler = await _machineProvider.MachineOperator.PrintStub(job);
#else
-
- handler = await _machineProvider.MachineOperator.Print(job);
+ try
+ {
+ handler = await _machineProvider.MachineOperator.Print(job);
+ }
+ catch (InsufficientLiquidQuantityException ex)
+ {
+ LogManager.Log(ex);
+ await _notificationProvider.ShowDialog(new InsufficientLiquidQuantityViewVM(ex));
+ throw ex;
+ }
#endif
handler.Completed += async (x, e) =>
@@ -105,13 +113,9 @@ namespace Tango.PPC.UI.Printing
};
handler.Failed += async (x, e) =>
{
- if (e is InsufficientLiquidQuantityException)
- {
- return;
- }
-
try
{
+
job.JobStatus = JobStatuses.Disrupted;
if (!context.IsDisposed)