From df7dff9855ae205ce0a02d8fd460cd3399c5e362 Mon Sep 17 00:00:00 2001 From: Roy Ben-Shabat Date: Mon, 9 Jul 2018 16:19:47 +0300 Subject: Fixed an issue with MS DB Module table scrolling lagging. Added new event type for embedded job status message. --- .../Tango.MachineStudio.Developer/ViewModels/MainViewVM.cs | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer') 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 9c6fa6239..35221c460 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 @@ -635,7 +635,7 @@ namespace Tango.MachineStudio.Developer.ViewModels LogManager.Log("Initializing relay commands..."); - TangoIOC.Default.GetInstanceWhenAvailable((vm) => + TangoIOC.Default.GetInstanceWhenAvailable((vm) => { _dataCaptureVM = vm; _dataCaptureVM.RelayCommandsInvalidated += (_, __) => StartJobAndRecordCommand.RaiseCanExecuteChanged(); @@ -998,8 +998,6 @@ namespace Tango.MachineStudio.Developer.ViewModels } JobEvents.Clear(); - //RunningJobRemainingTime = TimeSpan.Zero; - //RunningJobProgress = 0; IsJobFailed = false; IsJobCanceled = false; IsJobCompleted = false; @@ -1020,15 +1018,20 @@ namespace Tango.MachineStudio.Developer.ViewModels _eventLogger.Log(String.Format("Job '{0}' started...", ActiveJob.Name)); - _jobHandler.StatusChanged += (x, status) => + _jobHandler.StatusChanged += (x, status) => { if (IsJobRunning) { RunningJobStatus = status; + + if (status.Message != null) + { + _eventLogger.Log(BL.Enumerations.EventTypes.JobStatus, status.Message); + } } }; - _jobHandler.SegmentStarted += (x, segment) => + _jobHandler.SegmentStarted += (x, segment) => { if (!segment.IsInterSegment) { -- cgit v1.3.1