aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/PPC/Tango.PPC.UI/Printing
diff options
context:
space:
mode:
authorRoy Ben-Shabat <Roy@Twine-s.com>2019-11-06 18:06:45 +0200
committerRoy Ben-Shabat <Roy@Twine-s.com>2019-11-06 18:06:45 +0200
commitc698425b1ab832fe351aff257815709c01950fc3 (patch)
tree53e1c6439d54d4b4164b7e5f478066c1b00c6a25 /Software/Visual_Studio/PPC/Tango.PPC.UI/Printing
parent202c532e87e8114151e9b38982dcc171347a78ce (diff)
downloadTango-c698425b1ab832fe351aff257815709c01950fc3.tar.gz
Tango-c698425b1ab832fe351aff257815709c01950fc3.zip
Implemented liquid quantity validation on PPC and MS.
Improved PPC full control view.
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, 7 insertions, 11 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 56ec2fa7e..21c68d3e6 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Printing/DefaultPrintingManager.cs
+++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Printing/DefaultPrintingManager.cs
@@ -56,16 +56,8 @@ namespace Tango.PPC.UI.Printing
#if STUBPRINT
handler = await _machineProvider.MachineOperator.PrintStub(job);
#else
- try
- {
- handler = await _machineProvider.MachineOperator.Print(job);
- }
- catch (InsufficientLiquidQuantityException ex)
- {
- LogManager.Log(ex);
- await _notificationProvider.ShowDialog(new InsufficientLiquidQuantityViewVM(ex));
- throw ex;
- }
+
+ handler = await _machineProvider.MachineOperator.Print(job);
#endif
handler.Completed += async (x, e) =>
@@ -113,9 +105,13 @@ namespace Tango.PPC.UI.Printing
};
handler.Failed += async (x, e) =>
{
- try
+ if (e is InsufficientLiquidQuantityException)
{
+ return;
+ }
+ try
+ {
job.JobStatus = JobStatuses.Disrupted;
if (!context.IsDisposed)