aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs
diff options
context:
space:
mode:
authorRoy Ben Shabat <Roy.mail.net@gmail.com>2021-06-06 20:04:56 +0300
committerRoy Ben Shabat <Roy.mail.net@gmail.com>2021-06-06 20:04:56 +0300
commit42522dedb1e2d7ddf117d2a1d073c6e8885b1126 (patch)
tree04ecd021ff0b9a396381282eb312aa57697bc1e6 /Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs
parent9a236ba183a03341c458d4da13349f217b26e904 (diff)
downloadTango-42522dedb1e2d7ddf117d2a1d073c6e8885b1126.tar.gz
Tango-42522dedb1e2d7ddf117d2a1d073c6e8885b1126.zip
Use PrintingEnded event instead of JobHandler.Stopped event for STOP button Pop().
Related Work Items: #5289
Diffstat (limited to 'Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs')
-rw-r--r--Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/JobProgressViewVM.cs11
1 files changed, 6 insertions, 5 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 8d5bd284d..efe6b8e74 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
@@ -132,6 +132,7 @@ namespace Tango.PPC.Jobs.ViewModels
public override void OnApplicationStarted()
{
MachineProvider.MachineOperator.PrintingStarted += MachineOperator_PrintingStarted;
+ MachineProvider.MachineOperator.PrintingEnded += MachineOperator_PrintingEnded;
}
/// <summary>
@@ -179,6 +180,11 @@ namespace Tango.PPC.Jobs.ViewModels
_stop_job_btn.IsEnabled = true;
}
+ private void MachineOperator_PrintingEnded(object sender, PrintingEventArgs e)
+ {
+ _stop_job_btn?.Pop();
+ }
+
/// <summary>
/// Handles the SpoolChangeRequired event of the JobHandler.
/// </summary>
@@ -206,11 +212,6 @@ namespace Tango.PPC.Jobs.ViewModels
/// <param name="e">The <see cref="EventArgs"/> instance containing the event data.</param>
private void JobHandler_Stopped(object sender, EventArgs e)
{
- if (_stop_job_btn != null)
- {
- _stop_job_btn.Pop();
- }
-
if (_handler != null)
{
_handler.StatusChanged -= JobHandler_StatusChanged;