diff options
6 files changed, 20 insertions, 34 deletions
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Models/BrushStopModel.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Models/BrushStopModel.cs index 0ad143685..4fa45744b 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Models/BrushStopModel.cs +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Models/BrushStopModel.cs @@ -962,6 +962,7 @@ namespace Tango.PPC.Jobs.Models Configuration configuration = SegmentModel.Job.Machine.Configuration; Rml rml = SegmentModel.Job.Rml; + s.Segment = BrushStop.Segment; s.SetLiquidVolumes(configuration, rml, rml.GetActiveProcessGroup().ProcessParametersTables.FirstOrDefault()); s.OffsetPercent = OffsetPercent; diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/SMS/DefaultSMSNotificationProvider.cs b/Software/Visual_Studio/PPC/Tango.PPC.Common/SMS/DefaultSMSNotificationProvider.cs index 7d562108f..e020ef096 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.Common/SMS/DefaultSMSNotificationProvider.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/SMS/DefaultSMSNotificationProvider.cs @@ -39,7 +39,7 @@ namespace Tango.PPC.Common.SMS { try { - await SendMessage($"Twin {_machineProvider.Machine.Type.ToDescription()} [{_machineProvider.Machine.SerialNumber}].\nJob '{e.Job.Name}' failed at position {Math.Round(e.JobHandler.Status.ProgressMinusSettingUp, 1)}\n{e.Exception.Message}."); + await SendMessage($"{_machineProvider.Machine.Type.ToDescription()} [{_machineProvider.Machine.SerialNumber}].\nJob '{e.Job.Name}' failed at position {Math.Round(e.JobHandler.Status.ProgressMinusSettingUp, 1)}\n{e.Exception.Message}."); } catch { } } @@ -57,7 +57,7 @@ namespace Tango.PPC.Common.SMS { try { - await SendMessage($"Twin {_machineProvider.Machine.Type.ToDescription()} [{_machineProvider.Machine.SerialNumber}].\nJob '{e.Job.Name}' has completed successfully."); + await SendMessage($"{_machineProvider.Machine.Type.ToDescription()} [{_machineProvider.Machine.SerialNumber}].\nJob '{e.Job.Name}' has completed successfully."); } catch { } } diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MachineStatusViewVM.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MachineStatusViewVM.cs index 1966d88f6..07c5f77ed 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MachineStatusViewVM.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MachineStatusViewVM.cs @@ -177,7 +177,7 @@ namespace Tango.PPC.UI.ViewModels get { return _currentBrushStop; } set { - // if (_currentBrushStop != value) + if (_currentBrushStop != value) { _currentBrushStop = value; @@ -691,14 +691,7 @@ namespace Tango.PPC.UI.ViewModels { if (_runningJobStatus.CurrentSegment.IsInterSegment) { - var brush = _runningJobStatus.CurrentSegment.BrushStops.FirstOrDefault(); - if (brush != null) - { - brush = brush.CloneBrush(); - } - - CurrentBrushStop = brush; - + CurrentBrushStop = _runningJobStatus.CurrentSegment.BrushStops.FirstOrDefault(); JobBrushStop = null; } else @@ -726,7 +719,7 @@ namespace Tango.PPC.UI.ViewModels JobBrushStop = _handler.JobTicket.Segments[Job.OrderedSegments.IndexOf(segment)].BrushStops.First(); } } - CurrentBrushStop = RunningJobStatus.CurrentSegment.FirstBrushStop.CloneBrush(); + CurrentBrushStop = RunningJobStatus.CurrentSegment.FirstBrushStop; } } } diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/app.manifest b/Software/Visual_Studio/PPC/Tango.PPC.UI/app.manifest index d72e75011..efc5f8179 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/app.manifest +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/app.manifest @@ -16,7 +16,7 @@ Remove this element if your application requires this virtualization for backwards compatibility. --> - <requestedExecutionLevel level="requireAdministrator" uiAccess="false" /> + <!--<requestedExecutionLevel level="requireAdministrator" uiAccess="false" />--> </requestedPrivileges> </security> </trustInfo> diff --git a/Software/Visual_Studio/Tango.BL/Entities/BrushStop.cs b/Software/Visual_Studio/Tango.BL/Entities/BrushStop.cs index 41ebbee7c..a8d94ff8c 100644 --- a/Software/Visual_Studio/Tango.BL/Entities/BrushStop.cs +++ b/Software/Visual_Studio/Tango.BL/Entities/BrushStop.cs @@ -506,11 +506,15 @@ namespace Tango.BL.Entities { LiquidVolumes = new ObservableCollection<LiquidVolume>(); - foreach (var idsPack in configuration.GetSupportedIdsPacks(rml)) + + lock (LiquidVolumes) { - var liquidVolume = new LiquidVolume(configuration, idsPack, rml, processParametersTable, this); - liquidVolume.VolumeChanged += LiquidVolume_VolumeChanged; - LiquidVolumes.Add(liquidVolume); + foreach (var idsPack in configuration.GetSupportedIdsPacks(rml)) + { + var liquidVolume = new LiquidVolume(configuration, idsPack, rml, processParametersTable, this); + liquidVolume.VolumeChanged += LiquidVolume_VolumeChanged; + LiquidVolumes.Add(liquidVolume); + } } foreach (var volume in LiquidVolumes.ToList()) diff --git a/Software/Visual_Studio/Tango.BL/LiquidVolume.cs b/Software/Visual_Studio/Tango.BL/LiquidVolume.cs index 014ca040a..5b4cec488 100644 --- a/Software/Visual_Studio/Tango.BL/LiquidVolume.cs +++ b/Software/Visual_Studio/Tango.BL/LiquidVolume.cs @@ -14,7 +14,6 @@ namespace Tango.BL public class LiquidVolume : ExtendedObject { public event Action VolumeChanged; - private static object _lock = new object(); private BrushStop _brushStop; [JsonIgnore] @@ -83,25 +82,14 @@ namespace Tango.BL public void Invalidate() { - lock (_lock) + if (BrushStop.LiquidVolumes != null) { - try - { - if (BrushStop.LiquidVolumes != null) - { - InvalidateSolo(); + InvalidateSolo(); - foreach (var liquidVolume in BrushStop.LiquidVolumes.ToList().Where(x => x != this)) - { - liquidVolume.InvalidateSolo(); - } - } - } - catch (Exception ex) + foreach (var liquidVolume in BrushStop.LiquidVolumes.ToList().Where(x => x != this)) { - - throw; - } + liquidVolume.InvalidateSolo(); + } } } |
