aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Tango.Integration/Operation/JobHandler.cs
diff options
context:
space:
mode:
authorRoy Ben-Shabat <Roy@Twine-s.com>2020-01-22 18:26:17 +0200
committerRoy Ben-Shabat <Roy@Twine-s.com>2020-01-22 18:26:17 +0200
commit511a59999aca7f19e824a23ee0777756db16e6cd (patch)
treed682d219364936c9794daa48951e487877eb1705 /Software/Visual_Studio/Tango.Integration/Operation/JobHandler.cs
parentbf432bf7b7faa7c51e74462e19eb3e50c28b4aa8 (diff)
downloadTango-511a59999aca7f19e824a23ee0777756db16e6cd.tar.gz
Tango-511a59999aca7f19e824a23ee0777756db16e6cd.zip
DB CHANGE from previous commit.
Implemented multiple job stops until success. Related Work Items: #2412
Diffstat (limited to 'Software/Visual_Studio/Tango.Integration/Operation/JobHandler.cs')
-rw-r--r--Software/Visual_Studio/Tango.Integration/Operation/JobHandler.cs19
1 files changed, 17 insertions, 2 deletions
diff --git a/Software/Visual_Studio/Tango.Integration/Operation/JobHandler.cs b/Software/Visual_Studio/Tango.Integration/Operation/JobHandler.cs
index d4a16a7e3..84ea39ed4 100644
--- a/Software/Visual_Studio/Tango.Integration/Operation/JobHandler.cs
+++ b/Software/Visual_Studio/Tango.Integration/Operation/JobHandler.cs
@@ -79,6 +79,11 @@ namespace Tango.Integration.Operation
/// </summary>
public event EventHandler<SpoolChangeRequiredEventArgs> SpoolChangeRequired;
+ /// <summary>
+ /// Occurs when <see cref="CanCancel"/> has changed.
+ /// </summary>
+ public event EventHandler CanCancelChanged;
+
#endregion
#region Properties
@@ -88,6 +93,16 @@ namespace Tango.Integration.Operation
/// </summary>
public bool IsCanceled { get; internal set; }
+ private bool _canCancel;
+ /// <summary>
+ /// Gets a value indicating whether the job can be canceled.
+ /// </summary>
+ public bool CanCancel
+ {
+ get { return _canCancel; }
+ internal set { _canCancel = value; RaisePropertyChangedAuto(); CanCancelChanged?.Invoke(this, new EventArgs()); }
+ }
+
/// <summary>
/// Gets the process parameters.
/// </summary>
@@ -122,7 +137,7 @@ namespace Tango.Integration.Operation
/// </summary>
public JobHandler()
{
-
+ CanCancel = true;
}
/// <summary>
@@ -146,7 +161,7 @@ namespace Tango.Integration.Operation
_effectiveSegments = Job.EffectiveSegments.ToList();
- _cancelAction = () => { IsCanceled = true; cancelAction(); };
+ _cancelAction = () => { cancelAction(); };
Status = new RunningJobStatus();