From 4147c287ad90a05eae551d4ccfdccc707bebd86f Mon Sep 17 00:00:00 2001 From: Roy Ben-Shabat Date: Mon, 9 Jul 2018 15:27:55 +0300 Subject: Refactored job progress handling !!! --- .../MachineStudio/Tango.MachineStudio.UI/Resources/BuildDate.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI') diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Resources/BuildDate.txt b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Resources/BuildDate.txt index e53f275f3..4ab3e3519 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Resources/BuildDate.txt +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Resources/BuildDate.txt @@ -1 +1 @@ -Sun 07/08/2018 16:34:22.22 +Mon 07/09/2018 15:24:42.63 -- cgit v1.3.1 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. --- Software/DB/Tango.mdf | Bin 75497472 -> 75497472 bytes Software/DB/Tango_log.ldf | Bin 1572864 -> 1572864 bytes .../Controls/DbTableView.xaml | 2 +- .../ViewModels/MainViewVM.cs | 13 ++++++++----- .../Controls/MdiContainerControl.xaml | 3 --- .../Tango.MachineStudio.UI/Resources/BuildDate.txt | 2 +- .../Tango.BL/Enumerations/EventTypes.cs | 6 ++++++ .../Tango.Emulations/Emulators/MachineEmulator.cs | 15 +++++++++++---- .../Tango.Integration/Operation/JobHandler.cs | 14 +++++++++++++- 9 files changed, 40 insertions(+), 15 deletions(-) (limited to 'Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI') diff --git a/Software/DB/Tango.mdf b/Software/DB/Tango.mdf index 68ceada4f..4eb52310c 100644 Binary files a/Software/DB/Tango.mdf and b/Software/DB/Tango.mdf differ diff --git a/Software/DB/Tango_log.ldf b/Software/DB/Tango_log.ldf index 9c6151842..2db2bb930 100644 Binary files a/Software/DB/Tango_log.ldf and b/Software/DB/Tango_log.ldf differ diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Controls/DbTableView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Controls/DbTableView.xaml index d0f6b045a..6602d8973 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Controls/DbTableView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Controls/DbTableView.xaml @@ -5,7 +5,7 @@ xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes" mc:Ignorable="d" - d:DesignHeight="720" d:DesignWidth="1300"> + d:DesignHeight="720" d:DesignWidth="1300" BorderThickness="1" BorderBrush="{StaticResource AccentColorBrush}"> 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) { diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Controls/MdiContainerControl.xaml b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Controls/MdiContainerControl.xaml index b248a4aec..50c2aaf46 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Controls/MdiContainerControl.xaml +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Controls/MdiContainerControl.xaml @@ -31,9 +31,6 @@ - - - diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Resources/BuildDate.txt b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Resources/BuildDate.txt index 4ab3e3519..3a3a449ca 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Resources/BuildDate.txt +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Resources/BuildDate.txt @@ -1 +1 @@ -Mon 07/09/2018 15:24:42.63 +Mon 07/09/2018 16:10:08.89 diff --git a/Software/Visual_Studio/Tango.BL/Enumerations/EventTypes.cs b/Software/Visual_Studio/Tango.BL/Enumerations/EventTypes.cs index dfa4d7ce2..07d37ead7 100644 --- a/Software/Visual_Studio/Tango.BL/Enumerations/EventTypes.cs +++ b/Software/Visual_Studio/Tango.BL/Enumerations/EventTypes.cs @@ -247,5 +247,11 @@ namespace Tango.BL.Enumerations [Description("Occures when a diagnostics recording has been stopped")] RecordingStopped = 37, + /// + /// (Occures when a job status message has been received from the embedded device) + /// + [Description("Occures when a job status message has been received from the embedded device")] + JobStatus = 38, + } } diff --git a/Software/Visual_Studio/Tango.Emulations/Emulators/MachineEmulator.cs b/Software/Visual_Studio/Tango.Emulations/Emulators/MachineEmulator.cs index 6dc406a09..ebf658250 100644 --- a/Software/Visual_Studio/Tango.Emulations/Emulators/MachineEmulator.cs +++ b/Software/Visual_Studio/Tango.Emulations/Emulators/MachineEmulator.cs @@ -385,17 +385,24 @@ namespace Tango.Emulations.Emulators double progress = 0; _cancelJob = false; + bool message_sent = false; Task.Factory.StartNew(() => { while (progress < job.Length && !_cancelJob) { + var status = new PMR.Printing.JobStatus(); + status.Progress = progress; + + if (!message_sent) + { + message_sent = true; + status.Message = "Demo Message From Emulator..."; + } + Transporter.SendResponse(new JobResponse() { - Status = new PMR.Printing.JobStatus() - { - Progress = progress - } + Status = status, }, request.Container.Token); diff --git a/Software/Visual_Studio/Tango.Integration/Operation/JobHandler.cs b/Software/Visual_Studio/Tango.Integration/Operation/JobHandler.cs index 0fcd070b3..db2220f54 100644 --- a/Software/Visual_Studio/Tango.Integration/Operation/JobHandler.cs +++ b/Software/Visual_Studio/Tango.Integration/Operation/JobHandler.cs @@ -17,6 +17,7 @@ namespace Tango.Integration.Operation { private Action _cancelAction; private List _effectiveSegments; + private String _lastStatusMessage; #region Events @@ -176,7 +177,18 @@ namespace Tango.Integration.Operation Status.Progress = s.Progress; Status.RemainingTime = Status.TotalTime - Job.TranslateProgressToTime(Status.Progress, ProcessParameters); Status.RemainingProgress = Status.TotalProgress - Status.Progress; - Status.Message = s.Message; + + if (s.Message != _lastStatusMessage && s.Message != String.Empty) + { + Status.Message = s.Message; + } + else + { + Status.Message = null; + } + + _lastStatusMessage = s.Message; + StatusChanged?.Invoke(this, Status); //Segments Completion -- cgit v1.3.1 From 0a4c7077f5bf8697ee84bcf9c9662cdeb121f2f6 Mon Sep 17 00:00:00 2001 From: Roy Ben-Shabat Date: Mon, 9 Jul 2018 16:29:48 +0300 Subject: Machine Studio v1.0.0.11 Core v1.0.0.5 --- Software/DB/Tango.mdf | Bin 75497472 -> 75497472 bytes Software/DB/Tango_log.ldf | Bin 1572864 -> 1572864 bytes .../Tango.MachineStudio.UI/Resources/BuildDate.txt | 2 +- Software/Visual_Studio/Versioning/Core.cs | 4 ++-- Software/Visual_Studio/Versioning/MachineStudio.cs | 4 ++-- 5 files changed, 5 insertions(+), 5 deletions(-) (limited to 'Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI') diff --git a/Software/DB/Tango.mdf b/Software/DB/Tango.mdf index 4eb52310c..a578320ff 100644 Binary files a/Software/DB/Tango.mdf and b/Software/DB/Tango.mdf differ diff --git a/Software/DB/Tango_log.ldf b/Software/DB/Tango_log.ldf index 2db2bb930..01e6563d7 100644 Binary files a/Software/DB/Tango_log.ldf and b/Software/DB/Tango_log.ldf differ diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Resources/BuildDate.txt b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Resources/BuildDate.txt index 3a3a449ca..f49ef650e 100644 --- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Resources/BuildDate.txt +++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.UI/Resources/BuildDate.txt @@ -1 +1 @@ -Mon 07/09/2018 16:10:08.89 +Mon 07/09/2018 16:27:01.58 diff --git a/Software/Visual_Studio/Versioning/Core.cs b/Software/Visual_Studio/Versioning/Core.cs index d6d7957e9..20faee219 100644 --- a/Software/Visual_Studio/Versioning/Core.cs +++ b/Software/Visual_Studio/Versioning/Core.cs @@ -9,5 +9,5 @@ using System.Runtime.InteropServices; [assembly: AssemblyCopyright("Copyright © Twine LTD 2017")] [assembly: AssemblyTrademark("Twine LTD")] -[assembly: AssemblyVersion("1.0.0.4")] -[assembly: AssemblyFileVersion("1.0.0.4")] +[assembly: AssemblyVersion("1.0.0.5")] +[assembly: AssemblyFileVersion("1.0.0.5")] diff --git a/Software/Visual_Studio/Versioning/MachineStudio.cs b/Software/Visual_Studio/Versioning/MachineStudio.cs index 277ab3d56..6046b1b47 100644 --- a/Software/Visual_Studio/Versioning/MachineStudio.cs +++ b/Software/Visual_Studio/Versioning/MachineStudio.cs @@ -9,5 +9,5 @@ using System.Runtime.InteropServices; [assembly: AssemblyCopyright("Copyright © Twine LTD 2017")] [assembly: AssemblyTrademark("Twine LTD")] -[assembly: AssemblyVersion("1.0.0.10")] -[assembly: AssemblyFileVersion("1.0.0.10")] +[assembly: AssemblyVersion("1.0.0.11")] +[assembly: AssemblyFileVersion("1.0.0.11")] -- cgit v1.3.1