aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/PPC/Tango.PPC.UI
diff options
context:
space:
mode:
authorRoy Ben Shabat <Roy.mail.net@gmail.com>2024-04-17 18:12:04 +0300
committerRoy Ben Shabat <Roy.mail.net@gmail.com>2024-04-17 18:12:04 +0300
commit5ebb5e6092a74190654bf6d9e5d7d46f9db775a6 (patch)
tree9c3739be6137072d78bfdf7def7fa59592e7921d /Software/Visual_Studio/PPC/Tango.PPC.UI
parentf39760e8b3e70a041d123a59202dfa1fd6ab25d8 (diff)
downloadTango-5ebb5e6092a74190654bf6d9e5d7d46f9db775a6.tar.gz
Tango-5ebb5e6092a74190654bf6d9e5d7d46f9db775a6.zip
Spool Replace on Resume X4
Diffstat (limited to 'Software/Visual_Studio/PPC/Tango.PPC.UI')
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/Printing/DefaultPrintingManager.cs17
1 files changed, 15 insertions, 2 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 575d19efa..990e5e416 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Printing/DefaultPrintingManager.cs
+++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Printing/DefaultPrintingManager.cs
@@ -12,6 +12,7 @@ using Tango.Core.DI;
using Tango.Integration.Operation;
using Tango.PMR.MachineStatus;
using Tango.PPC.Common;
+using Tango.PPC.Common.Build;
using Tango.PPC.Common.Connection;
using Tango.PPC.Common.Messages;
using Tango.PPC.Common.Models;
@@ -34,6 +35,7 @@ namespace Tango.PPC.UI.Printing
private IMachineProvider _machineProvider;
private INotificationProvider _notificationProvider;
private PPCSettings _settings;
+ private IBuildProvider _buildProvider;
public bool PreventPrintingByRemoteDesktop { get; set; }
@@ -41,11 +43,12 @@ namespace Tango.PPC.UI.Printing
/// Initializes a new instance of the <see cref="DefaultPrintingManager"/> class.
/// </summary>
/// <param name="machineProvider">The machine provider.</param>
- public DefaultPrintingManager(IMachineProvider machineProvider, INotificationProvider notificationProvider)
+ public DefaultPrintingManager(IMachineProvider machineProvider, INotificationProvider notificationProvider, IBuildProvider buildProvider)
{
_machineProvider = machineProvider;
_notificationProvider = notificationProvider;
_settings = SettingsManager.Default.GetOrCreate<PPCSettings>();
+ _buildProvider = buildProvider;
}
/// <summary>
@@ -72,7 +75,17 @@ namespace Tango.PPC.UI.Printing
throw new OperationCanceledException();
}
- if (job.Designation == JobDesignations.Default && _settings.EnableSpoolReplacementDialog && !_machineProvider.MachineOperator.IsSpoolReplaced)
+ //Spool Replace For TS 1800
+ if (!_buildProvider.IsEureka && job.Designation == JobDesignations.Default && _settings.EnableSpoolReplacementDialog && !_machineProvider.MachineOperator.IsSpoolReplaced)
+ {
+ if (!(await _notificationProvider.ShowDialog(new SpoolReplaceViewVM())).DialogResult)
+ {
+ throw new OperationCanceledException();
+ }
+ }
+
+ //Spool Replace For Eureka
+ if (_buildProvider.IsEureka && job.Designation == JobDesignations.Default && _settings.EnableSpoolReplacementDialog && printConfig != null && printConfig.GlobalStartPosition > 0)
{
if (!(await _notificationProvider.ShowDialog(new SpoolReplaceViewVM())).DialogResult)
{