aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/JobProgressViewVM.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/JobProgressViewVM.cs')
-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;