aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels
diff options
context:
space:
mode:
authorAvi Levkovich <avi@twine-s.com>2019-11-19 13:33:51 +0200
committerAvi Levkovich <avi@twine-s.com>2019-11-19 13:33:51 +0200
commitb5ea623d1ea2cef2e117c12eaf4cd66351c42cce (patch)
treeff15a121e57afc6cf4f017bcc2d4d6a7cc7dd78d /Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels
parentd87f59593916413b747ebe15f409ec09007747a3 (diff)
parentd50797ddb8c3d886d38a56a09dfe34540512e331 (diff)
downloadTango-b5ea623d1ea2cef2e117c12eaf4cd66351c42cce.tar.gz
Tango-b5ea623d1ea2cef2e117c12eaf4cd66351c42cce.zip
Merge branch 'master' of https://twinetfs.visualstudio.com/_git/Tango
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels')
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels/MainViewVM.cs50
1 files changed, 18 insertions, 32 deletions
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels/MainViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels/MainViewVM.cs
index 93baf3b9d..63cfa10b8 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels/MainViewVM.cs
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels/MainViewVM.cs
@@ -873,7 +873,7 @@ namespace Tango.MachineStudio.Developer.ViewModels
foreach (var stop in stops)
{
- if (stop.ColorSpace.Code == BL.Enumerations.ColorSpaces.Volume.ToInt32() && !stop.IsLiquidVolumesOutOfRange)
+ if (stop.ColorSpace.Code == BL.Enumerations.ColorSpaces.Volume.ToInt32())
{
try
{
@@ -1479,39 +1479,15 @@ namespace Tango.MachineStudio.Developer.ViewModels
JobHandler.Failed += (x, ex) =>
{
- if (ex is InsufficientLiquidQuantityException)
- {
- InvokeUI(() =>
- {
- _notification.ShowModalDialog<InsufficientLiquidQuantityViewVM, InsufficientLiquidQuantityView>(new InsufficientLiquidQuantityViewVM(ex as InsufficientLiquidQuantityException), (_) =>
- {
-
- MachineOperator.EnableJobLiquidQuantityValidation = false;
- StartJob();
-
- }, () =>
- {
- SetJobFailed();
+ LogManager.Log(ex, String.Format("Job {0} has failed.", RunningJob.Name));
+ _eventLogger.Log(ex, String.Format("Job {0} has failed.", RunningJob.Name));
+ SetJobFailed();
- InvokeUI(() =>
- {
- StopRecordingIfInProgress();
- });
- });
- });
- }
- else
+ InvokeUI(() =>
{
- LogManager.Log(ex, String.Format("Job {0} has failed.", RunningJob.Name));
- _eventLogger.Log(ex, String.Format("Job {0} has failed.", RunningJob.Name));
- SetJobFailed();
-
- InvokeUI(() =>
- {
- _notification.ShowError("Job failed. " + ex.FlattenMessage());
- StopRecordingIfInProgress();
- });
- }
+ _notification.ShowError("Job failed. " + ex.FlattenMessage());
+ StopRecordingIfInProgress();
+ });
};
JobHandler.Finalizing += (_, __) =>
@@ -1543,6 +1519,16 @@ namespace Tango.MachineStudio.Developer.ViewModels
//Finally Canceled..
};
}
+ catch (InsufficientLiquidQuantityException ex)
+ {
+ _notification.ShowModalDialog<InsufficientLiquidQuantityViewVM, InsufficientLiquidQuantityView>(new InsufficientLiquidQuantityViewVM(ex), (x) =>
+ {
+
+ MachineOperator.EnableJobLiquidQuantityValidation = false;
+ StartJob();
+
+ }, () => { });
+ }
catch (Exception ex)
{
LogManager.Log(ex);