aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/PPC/Tango.PPC.UI/Printing/DefaultPrintingManager.cs
diff options
context:
space:
mode:
authorRoy Ben Shabat <Roy.mail.net@gmail.com>2021-02-16 17:15:16 +0200
committerRoy Ben Shabat <Roy.mail.net@gmail.com>2021-02-16 17:15:16 +0200
commitf73b3b8043e4f9183a5450afdbb99bcde1b63ff1 (patch)
tree97a83df9ae9f248388769b00e63ec495d3bd2123 /Software/Visual_Studio/PPC/Tango.PPC.UI/Printing/DefaultPrintingManager.cs
parent8a4a7818428d7b203cb28082c720c74831b2165f (diff)
downloadTango-f73b3b8043e4f9183a5450afdbb99bcde1b63ff1.tar.gz
Tango-f73b3b8043e4f9183a5450afdbb99bcde1b63ff1.zip
Short cycle mode done.
Diffstat (limited to 'Software/Visual_Studio/PPC/Tango.PPC.UI/Printing/DefaultPrintingManager.cs')
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/Printing/DefaultPrintingManager.cs26
1 files changed, 25 insertions, 1 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 9e84275d6..ed1a0253d 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Printing/DefaultPrintingManager.cs
+++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Printing/DefaultPrintingManager.cs
@@ -9,6 +9,7 @@ using Tango.BL.Enumerations;
using Tango.Core;
using Tango.Core.DI;
using Tango.Integration.Operation;
+using Tango.PMR.MachineStatus;
using Tango.PPC.Common;
using Tango.PPC.Common.Connection;
using Tango.PPC.Common.Messages;
@@ -82,7 +83,30 @@ namespace Tango.PPC.UI.Printing
{
_notificationProvider.ReleaseGlobalBusyMessage();
LogManager.Log(ex);
- await _notificationProvider.ShowDialog(new InsufficientLiquidQuantityViewVM(ex));
+
+ var vm = await _notificationProvider.ShowDialog(new InsufficientLiquidQuantityViewVM(ex, _machineProvider.MachineOperator.MachineStatus.AutoInkFillingDisabled));
+
+ if (vm.EnableAutoInkFillingOnExit)
+ {
+ try
+ {
+ _notificationProvider.SetGlobalBusyMessage("Enabling auto ink filling...");
+ await _machineProvider.MachineOperator.SendRequest<SetInkAutoFillingModeRequest, SetInkAutoFillingModeResponse>(new SetInkAutoFillingModeRequest()
+ {
+ Disabled = false
+ });
+ }
+ catch (Exception exx)
+ {
+ LogManager.Log(exx, "Error enabling ink filling.");
+ await _notificationProvider.ShowError($"Error enabling auto ink filling.\n{ex.Message}");
+ }
+ finally
+ {
+ _notificationProvider.ReleaseGlobalBusyMessage();
+ }
+ }
+
throw ex;
}
catch (Exception ex)