aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Tango.Integration
diff options
context:
space:
mode:
authorRoy Ben-Shabat <Roy@Twine-s.com>2018-07-16 13:47:20 +0300
committerRoy Ben-Shabat <Roy@Twine-s.com>2018-07-16 13:47:20 +0300
commitfdfa740288568dba27877a5ef5c817be323cfbb0 (patch)
tree933ee1cb2769d43c982596f50ff8b7ec791f3be7 /Software/Visual_Studio/Tango.Integration
parentd376387fa28a2091a21e2fc7193812d1f8a40ef2 (diff)
downloadTango-fdfa740288568dba27877a5ef5c817be323cfbb0.tar.gz
Tango-fdfa740288568dba27877a5ef5c817be323cfbb0.zip
Working on PPC.
Diffstat (limited to 'Software/Visual_Studio/Tango.Integration')
-rw-r--r--Software/Visual_Studio/Tango.Integration/Operation/JobHandler.cs12
-rw-r--r--Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs9
-rw-r--r--Software/Visual_Studio/Tango.Integration/Operation/RunningJobStatus.cs5
3 files changed, 20 insertions, 6 deletions
diff --git a/Software/Visual_Studio/Tango.Integration/Operation/JobHandler.cs b/Software/Visual_Studio/Tango.Integration/Operation/JobHandler.cs
index bdbfacca5..b9198d2e9 100644
--- a/Software/Visual_Studio/Tango.Integration/Operation/JobHandler.cs
+++ b/Software/Visual_Studio/Tango.Integration/Operation/JobHandler.cs
@@ -154,6 +154,9 @@ namespace Tango.Integration.Operation
/// <param name="ex">The ex.</param>
internal void RaiseFailed(Exception ex)
{
+ Status.IsFailed = true;
+ StatusChanged?.Invoke(this, Status);
+ RaisePropertyChanged(nameof(Status));
Failed?.Invoke(this, ex);
Stopped?.Invoke(this, new EventArgs());
}
@@ -163,6 +166,9 @@ namespace Tango.Integration.Operation
/// </summary>
internal void RaiseCompleted()
{
+ Status.IsCompleted = true;
+ StatusChanged?.Invoke(this, Status);
+ RaisePropertyChanged(nameof(Status));
Completed?.Invoke(this, new EventArgs());
Stopped?.Invoke(this, new EventArgs());
}
@@ -172,10 +178,13 @@ namespace Tango.Integration.Operation
/// </summary>
internal void RaiseCanceled()
{
+ Status.IsCanceled = true;
+ StatusChanged?.Invoke(this, Status);
+ RaisePropertyChanged(nameof(Status));
Canceled?.Invoke(this, new EventArgs());
Stopped?.Invoke(this, new EventArgs());
}
-
+
#endregion
#region Private Methods
@@ -279,7 +288,6 @@ namespace Tango.Integration.Operation
/// </summary>
public void Cancel()
{
- Status.Progress = 0;
_cancelAction();
}
diff --git a/Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs b/Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs
index fd37ca8c0..d7851544c 100644
--- a/Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs
+++ b/Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs
@@ -65,7 +65,7 @@ namespace Tango.Integration.Operation
{
DeviceInformation = new DeviceInformation();
MachineEventsStateProvider = new DefaultMachineEventsStateProvider();
- EnableEmbeddedDebugging = true;
+ EnableEmbeddedDebugging = false;
LogEmbeddedDebuggingToFile = true;
}
@@ -155,6 +155,7 @@ namespace Tango.Integration.Operation
OnMachineStatusChanged(value);
RaisePropertyChanged(nameof(IsPrinting));
RaisePropertyChanged(nameof(CanPrint));
+ LogManager.Log("Machine operator status changed: " + _status);
}
}
@@ -343,7 +344,7 @@ namespace Tango.Integration.Operation
LogRequestSent(request);
}
- else
+ else if (_diagnosticsSent)
{
_diagnosticsSent = false;
@@ -407,7 +408,7 @@ namespace Tango.Integration.Operation
LogRequestSent(request);
}
- else
+ else if (_debugSent)
{
_debugSent = false;
@@ -793,7 +794,7 @@ namespace Tango.Integration.Operation
{
if (!handler.IsCanceled)
{
- Status = MachineStatuses.Error;
+ Status = MachineStatuses.ReadyToDye;
PrintingFailed?.Invoke(this, new PrintingFailedEventArgs(handler, originalJob, ex));
handler.RaiseFailed(ex);
LogRequestFailed(request, ex);
diff --git a/Software/Visual_Studio/Tango.Integration/Operation/RunningJobStatus.cs b/Software/Visual_Studio/Tango.Integration/Operation/RunningJobStatus.cs
index f9ce1d4ae..c690f27ea 100644
--- a/Software/Visual_Studio/Tango.Integration/Operation/RunningJobStatus.cs
+++ b/Software/Visual_Studio/Tango.Integration/Operation/RunningJobStatus.cs
@@ -67,6 +67,11 @@ namespace Tango.Integration.Operation
public bool IsCompleted { get; set; }
/// <summary>
+ /// Gets or sets a value indicating whether this instance is failed.
+ /// </summary>
+ public bool IsFailed { get; set; }
+
+ /// <summary>
/// Gets or sets the message.
/// </summary>
public String Message { get; set; }