From a8efe6694164ff1808be8f5e19501a7396608755 Mon Sep 17 00:00:00 2001 From: Victoria Plitt Date: Wed, 24 May 2023 14:35:03 +0300 Subject: PPC. Jobs List - added Thread column, changed Length with spools for Eureka. --- .../Converters/LengthWithSpoolsConverter.cs | 37 ++++++++++++++++++ .../Tango.PPC.JobsV2/Tango.PPC.JobsV2.csproj | 3 +- .../Tango.PPC.JobsV2/ViewModels/JobsViewVM.cs | 2 +- .../Modules/Tango.PPC.JobsV2/Views/JobsView.xaml | 44 +++++++++++++++++++--- 4 files changed, 78 insertions(+), 8 deletions(-) create mode 100644 Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Converters/LengthWithSpoolsConverter.cs (limited to 'Software/Visual_Studio/PPC/Modules') diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Converters/LengthWithSpoolsConverter.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Converters/LengthWithSpoolsConverter.cs new file mode 100644 index 000000000..60f94b8aa --- /dev/null +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Converters/LengthWithSpoolsConverter.cs @@ -0,0 +1,37 @@ +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows; +using System.Windows.Data; + +namespace Tango.PPC.Jobs.Converters +{ + public class LengthWithSpoolsConverter : IMultiValueConverter + { + public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture) + { + try + { + double length = System.Convert.ToDouble(values[0]); + bool isEureka = System.Convert.ToBoolean(values[1]); + double spools = System.Convert.ToDouble(values[2]); + + if (isEureka) + return length * spools; + else return length; + } + catch + { + return 0d; + } + } + + public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture) + { + throw new NotImplementedException(); + } + } +} diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Tango.PPC.JobsV2.csproj b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Tango.PPC.JobsV2.csproj index c0e24ac8c..3aefa29a1 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Tango.PPC.JobsV2.csproj +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Tango.PPC.JobsV2.csproj @@ -240,6 +240,7 @@ + @@ -753,7 +754,7 @@ - + \ No newline at end of file diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/ViewModels/JobsViewVM.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/ViewModels/JobsViewVM.cs index 0e4ec8fa4..df3ae4596 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/ViewModels/JobsViewVM.cs +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/ViewModels/JobsViewVM.cs @@ -371,7 +371,7 @@ namespace Tango.PPC.Jobs.ViewModels _colorSpaces = _db.ColorSpaces.ToList(); - var jobs = new JobsCollectionBuilder(_db).Set(x => x.MachineGuid == MachineProvider.Machine.Guid).WithSegments().WithBrushStops().WithCustomer().WithColorSpace().WithSegmentsGroups().Build(); + var jobs = new JobsCollectionBuilder(_db).Set(x => x.MachineGuid == MachineProvider.Machine.Guid).WithSegments().WithBrushStops().WithCustomer().WithColorSpace().WithSegmentsGroups().WithRmls().Build(); InvokeUI(() => { diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Views/JobsView.xaml b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Views/JobsView.xaml index d143268c7..0a5124078 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Views/JobsView.xaml +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Views/JobsView.xaml @@ -29,6 +29,7 @@ + @@ -256,17 +257,33 @@ - + + + + + + + + - + - + + + + + + + + + + @@ -363,14 +380,29 @@ - + + + + + + + + - + - + + + + + + + + + -- cgit v1.3.1 From c1d16392f2414775a2e3a1b1b948021a022e9359 Mon Sep 17 00:00:00 2001 From: Victoria Plitt Date: Mon, 29 May 2023 13:49:47 +0300 Subject: PPC. Jobs add thread column. Related Work Items: #8458 --- .../Modules/Tango.PPC.JobsV2/Views/JobsView.xaml | 16 +++++------ .../Tango.PPC.UI/Models/MachineOverviewModel.cs | 32 ++++++++++++++++++++-- 2 files changed, 37 insertions(+), 11 deletions(-) (limited to 'Software/Visual_Studio/PPC/Modules') diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Views/JobsView.xaml b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Views/JobsView.xaml index 0a5124078..2743101a1 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Views/JobsView.xaml +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Views/JobsView.xaml @@ -257,14 +257,14 @@ - + - + - + @@ -287,7 +287,7 @@ - + @@ -380,14 +380,14 @@ - + - + - + @@ -409,7 +409,7 @@ - + diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Models/MachineOverviewModel.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/Models/MachineOverviewModel.cs index bd34122c6..579aa57f4 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Models/MachineOverviewModel.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Models/MachineOverviewModel.cs @@ -56,7 +56,7 @@ namespace Tango.PPC.UI.Models public void Update(StartDiagnosticsResponse diagnostics, Rml rml, ProcessParametersTable processParameters) { //Dryer Zone 3 - var dryerZone3State = diagnostics.HeatersStates.FirstOrDefault(x => x.HeaterType == HeaterType.HeaterZone3); + var dryerZone3State = diagnostics.HeatersStates.FirstOrDefault(x => x.HeaterType == HeaterType.EDryerHeater3); UpdateHeaterItem(DryerZone3, dryerZone3State); //Dryer Air @@ -72,7 +72,26 @@ namespace Tango.PPC.UI.Models //Pumps Pressure if (diagnostics.Monitors.EuInkLinesPressure.Count > 0 && diagnostics.Monitors.EuInkLinesPressure.Any(x => x.Data.Count > 0)) { - var pumpsPressuerValue = diagnostics.Monitors.EuInkLinesPressure.SelectMany(x => x.Data).Max(); + //EuDispenser1Pressure + List EuDispensersPressure = new List(); + var EuDispenser1PressureValue = diagnostics.Monitors.EuDispenser1Pressure.FirstOrDefault(); + EuDispensersPressure.Add(EuDispenser1PressureValue); + var EuDispenser2PressureValue = diagnostics.Monitors.EuDispenser2Pressure.FirstOrDefault(); + EuDispensersPressure.Add(EuDispenser2PressureValue); + var EuDispenser3PressureValue = diagnostics.Monitors.EuDispenser3Pressure.FirstOrDefault(); + EuDispensersPressure.Add(EuDispenser3PressureValue); + var EuDispenser4PressureValue = diagnostics.Monitors.EuDispenser4Pressure.FirstOrDefault(); + EuDispensersPressure.Add(EuDispenser4PressureValue); + var EuDispenser5PressureValue = diagnostics.Monitors.EuDispenser5Pressure.FirstOrDefault(); + EuDispensersPressure.Add(EuDispenser5PressureValue); + var EuDispenser6PressureValue = diagnostics.Monitors.EuDispenser6Pressure.FirstOrDefault(); + EuDispensersPressure.Add(EuDispenser6PressureValue); + var EuDispenser7PressureValue = diagnostics.Monitors.EuDispenser7Pressure.FirstOrDefault(); + EuDispensersPressure.Add(EuDispenser7PressureValue); + var EuDispenser8PressureValue = diagnostics.Monitors.EuDispenser8Pressure.FirstOrDefault(); + EuDispensersPressure.Add(EuDispenser8PressureValue); + + var pumpsPressuerValue = EuDispensersPressure.Max();// diagnostics.Monitors.EuInkLinesPressure.SelectMany(x => x.Data).Max(); UpdatePumpsPressureItem(pumpsPressuerValue); } @@ -101,7 +120,14 @@ namespace Tango.PPC.UI.Models item.Status = "Operational"; item.Color = Colors.Green; item.DisplayValue = $" {state.SetPoint}"; - item.MaxValue = state.SetPoint; + if(state.SetPoint == 0 && state.CurrentValue == 0) + { + item.MaxValue = 10; + } + else + { + item.MaxValue = state.SetPoint; + } item.Value = state.CurrentValue; } else if (!state.IsRampingUp && (state.CurrentValue < (state.SetPoint - 10) || state.CurrentValue > (state.SetPoint + 10))) -- cgit v1.3.1 From bfd64387ce0d2584bfcf2f5b31980395625634fe Mon Sep 17 00:00:00 2001 From: Victoria Plitt Date: Mon, 29 May 2023 14:30:02 +0300 Subject: PPC. Summary display time of job with spec. format. Related Work Items: #8478 --- .../PPC/Modules/Tango.PPC.JobsV2/Views/JobEurekaView.xaml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'Software/Visual_Studio/PPC/Modules') diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Views/JobEurekaView.xaml b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Views/JobEurekaView.xaml index efa080561..d9235a360 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Views/JobEurekaView.xaml +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Views/JobEurekaView.xaml @@ -30,9 +30,10 @@ + + - @@ -1231,9 +1232,9 @@ - - - + + + -- cgit v1.3.1 From 8706890d8821dac3f4e760ab206e384b99f81ca1 Mon Sep 17 00:00:00 2001 From: Victoria Plitt Date: Tue, 30 May 2023 15:06:33 +0300 Subject: Job Summary. Text Size. Related Work Items: #8493 --- .../Tango.PPC.JobsV2/Views/JobEurekaView.xaml | 80 +++++++++++----------- .../Modules/Tango.PPC.JobsV2/Views/JobsView.xaml | 2 +- .../PPC/Tango.PPC.UI/Views/MachineStatusView.xaml | 4 +- 3 files changed, 43 insertions(+), 43 deletions(-) (limited to 'Software/Visual_Studio/PPC/Modules') diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Views/JobEurekaView.xaml b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Views/JobEurekaView.xaml index d9235a360..a92c950ed 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Views/JobEurekaView.xaml +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Views/JobEurekaView.xaml @@ -1189,18 +1189,18 @@ - - + + - - + + - + - + @@ -1212,14 +1212,14 @@ - + - - + + - + - + @@ -1227,11 +1227,11 @@ - + - - + + @@ -1243,7 +1243,7 @@ - + @@ -1255,15 +1255,15 @@ - - + + - - + + - + - + @@ -1273,18 +1273,18 @@ - + - + - + - - + + - + - + @@ -1292,27 +1292,27 @@ - + - - + + - + - + - + - + - - + + - + - + @@ -1320,7 +1320,7 @@ - + diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Views/JobsView.xaml b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Views/JobsView.xaml index 2743101a1..628478cde 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Views/JobsView.xaml +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Views/JobsView.xaml @@ -168,7 +168,7 @@ - + diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MachineStatusView.xaml b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MachineStatusView.xaml index b6a66cef4..a244b6897 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MachineStatusView.xaml +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MachineStatusView.xaml @@ -712,7 +712,7 @@ Time Left - + @@ -1119,7 +1119,7 @@ - + -- cgit v1.3.1 From 8fab5fe2eb47f6fe643e564c84509ae29a624f64 Mon Sep 17 00:00:00 2001 From: Victoria Plitt Date: Tue, 30 May 2023 18:21:37 +0300 Subject: Bug: the job Circle is cut off when thread name is too long Related Work Items: #8496 --- .../PPC/Modules/Tango.PPC.JobsV2/Views/JobsView.xaml | 12 ++++++------ .../PPC/Tango.PPC.UI/Views/MachineStatusView.xaml | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) (limited to 'Software/Visual_Studio/PPC/Modules') diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Views/JobsView.xaml b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Views/JobsView.xaml index 628478cde..8b4603188 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Views/JobsView.xaml +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Views/JobsView.xaml @@ -257,14 +257,14 @@ - + - + - + @@ -380,14 +380,14 @@ - + - + - + diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MachineStatusView.xaml b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MachineStatusView.xaml index a244b6897..a12cf9e4a 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MachineStatusView.xaml +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MachineStatusView.xaml @@ -380,12 +380,12 @@ - + Thread Type - + -- cgit v1.3.1 From a0640910b61e0f38ede0c70e92997bc6d2717282 Mon Sep 17 00:00:00 2001 From: Victoria Plitt Date: Wed, 31 May 2023 17:55:35 +0300 Subject: PPC. Show the prepare status inside the Running Job Status Circle Related Work Items: #8504 --- .../PPC/Modules/Tango.PPC.JobsV2/Views/JobsView.xaml | 8 ++++---- .../PPC/Tango.PPC.UI/Views/MachineStatusView.xaml | 15 ++++++++------- .../Tango.Integration/Operation/JobHandler.cs | 4 ++-- 3 files changed, 14 insertions(+), 13 deletions(-) (limited to 'Software/Visual_Studio/PPC/Modules') diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Views/JobsView.xaml b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Views/JobsView.xaml index 8b4603188..5a64922af 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Views/JobsView.xaml +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Views/JobsView.xaml @@ -257,14 +257,14 @@ - + - + @@ -380,14 +380,14 @@ - + - + diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MachineStatusView.xaml b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MachineStatusView.xaml index a12cf9e4a..7cb0cc181 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MachineStatusView.xaml +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MachineStatusView.xaml @@ -268,7 +268,7 @@ - + @@ -380,12 +380,12 @@ - + Thread Type - + @@ -579,14 +579,15 @@ - - + + Getting Ready... - + + - + diff --git a/Software/Visual_Studio/Tango.Integration/Operation/JobHandler.cs b/Software/Visual_Studio/Tango.Integration/Operation/JobHandler.cs index 7aa491369..2ceeb8164 100644 --- a/Software/Visual_Studio/Tango.Integration/Operation/JobHandler.cs +++ b/Software/Visual_Studio/Tango.Integration/Operation/JobHandler.cs @@ -446,9 +446,9 @@ namespace Tango.Integration.Operation } else { - Status.Message = null; + Status.Message = String.Empty; } - + _lastStatusMessage = s.Message; -- cgit v1.3.1 From 218794a0207ccb6e89a9a3c7175180001ae03740 Mon Sep 17 00:00:00 2001 From: Victoria Plitt Date: Thu, 1 Jun 2023 15:48:54 +0300 Subject: PPC. GUI bugs,. Related Work Items: #8497, #8509, #8512 --- .../Tango.PPC.JobsV2/ViewModels/JobsViewVM.cs | 52 ++++++++++++++++++++++ .../Tango.PPC.JobsV2/Views/JobEurekaView.xaml | 22 ++++----- .../Modules/Tango.PPC.JobsV2/Views/JobsView.xaml | 23 +++------- .../Tango.PPC.MachineSettings/Views/MainView.xaml | 2 +- .../Tango.PPC.UI/Models/MachineOverviewModel.cs | 13 ++++-- .../PPC/Tango.PPC.UI/Views/MachineStatusView.xaml | 8 ++-- .../Tango.Emulations/Emulators/MachineEmulator.cs | 3 ++ .../Tango.Integration/Operation/JobHandler.cs | 6 +-- 8 files changed, 88 insertions(+), 41 deletions(-) (limited to 'Software/Visual_Studio/PPC/Modules') diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/ViewModels/JobsViewVM.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/ViewModels/JobsViewVM.cs index df3ae4596..e5e41b382 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/ViewModels/JobsViewVM.cs +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/ViewModels/JobsViewVM.cs @@ -225,6 +225,11 @@ namespace Tango.PPC.Jobs.ViewModels /// public RelayCommand ExportJobCommand { get; set; } + /// + /// Gets or sets the move to list ( History or Draft) jobs command. + /// + public RelayCommand MoveToListJobsCommand { get; set; } + #endregion #region Constructors @@ -251,6 +256,7 @@ namespace Tango.PPC.Jobs.ViewModels DeleteJobsCommand = new RelayCommand(() => DeleteJobs(SelectedJobs)); CloneJobsCommand = new RelayCommand(() => CloneJobs(SelectedJobs)); ExportJobCommand = new RelayCommand(ExportJob); + MoveToListJobsCommand = new RelayCommand(() => MoveToListJobs(SelectedJobs)); RegisterForMessage(HandleJobRemovedMessage); RegisterForMessage(HandleJobSavedMessage); @@ -643,6 +649,52 @@ namespace Tango.PPC.Jobs.ViewModels } } + /// + /// Moves to list (Draft/History) jobs. + /// + /// The jobs. + private async void MoveToListJobs(ObservableCollection jobs) + { + bool isHistory = SelectedCategory == JobsCategory.History; + string list = isHistory ? "Draft" : "History"; + try + { + + LogManager.Log($"Move To {list} selected jobs:\n{jobs.Select(x => x.Name).ToList().ToJsonString()}"); + + foreach (var job in SelectedJobs) + { + if(isHistory) + { + if(job.JobStatus != JobStatuses.Draft) + { + job.JobStatus = JobStatuses.Draft; + job.LastUpdated = DateTime.UtcNow; + } + } + if(!isHistory)//draft + { + if(job.JobStatus == JobStatuses.Draft) + { + job.JobStatus = JobStatuses.Completed; + job.LastUpdated = DateTime.UtcNow; + } + } + } + + await _db.SaveChangesAsync(); + + HistoryJobsCollectionView.Refresh(); + DraftJobsCollectionView.Refresh(); + ClearSelection(); + } + catch (Exception ex) + { + LogManager.Log(ex, $"Error Move To {list} selected jobs."); + await NotificationProvider.ShowError($"An error occurred while trying to Move To {list} the selected jobs."); + } + } + /// /// Called when the search filter has been changed /// diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Views/JobEurekaView.xaml b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Views/JobEurekaView.xaml index a92c950ed..613200c02 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Views/JobEurekaView.xaml +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Views/JobEurekaView.xaml @@ -259,7 +259,7 @@ @@ -268,7 +268,7 @@ @@ -887,14 +887,14 @@ - + - + @@ -1030,7 +1030,7 @@ @@ -1040,7 +1040,7 @@ @@ -1193,7 +1193,7 @@ - + @@ -1212,12 +1212,12 @@ - + - + @@ -1230,7 +1230,7 @@ - + @@ -1238,7 +1238,7 @@ - Job Summary + Summary diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Views/JobsView.xaml b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Views/JobsView.xaml index 5a64922af..d396b5860 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Views/JobsView.xaml +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Views/JobsView.xaml @@ -91,26 +91,17 @@ - + + + + diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.MachineSettings/Views/MainView.xaml b/Software/Visual_Studio/PPC/Modules/Tango.PPC.MachineSettings/Views/MainView.xaml index 6475869dd..764f044d0 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.MachineSettings/Views/MainView.xaml +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.MachineSettings/Views/MainView.xaml @@ -461,7 +461,7 @@ - Show advanced options (Multi-segments & Gradients) in the Job Editor + Show advanced options (Segments & Gradients) in the Job Editor diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Models/MachineOverviewModel.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/Models/MachineOverviewModel.cs index 579aa57f4..0030d71aa 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Models/MachineOverviewModel.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Models/MachineOverviewModel.cs @@ -198,11 +198,16 @@ namespace Tango.PPC.UI.Models Lubricant.Status = "Active"; Lubricant.DisplayValue = lubricantValue.ToString(); Lubricant.Color = Colors.Green; + return; } - - Lubricant.Status = "NotActive"; - Lubricant.DisplayValue = "None"; - Lubricant.Color = Colors.Gray; + else + { + Lubricant.Status = "NotActive"; + Lubricant.DisplayValue = "None"; + Lubricant.Color = Colors.Gray; + } + + } } } diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MachineStatusView.xaml b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MachineStatusView.xaml index 7cb0cc181..adf25eddb 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MachineStatusView.xaml +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MachineStatusView.xaml @@ -392,7 +392,7 @@ - Job Length + Job Length (m) - Back + Back @@ -85,7 +85,7 @@ - + + + + + + + + + + + + + + + + + + 30 + 88 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -236,11 +315,11 @@ - - - - - + + + + + @@ -904,7 +983,7 @@ - + @@ -1089,7 +1168,7 @@ Waste - + @@ -1107,9 +1186,10 @@ - - + + + + @@ -1120,8 +1200,8 @@ - - + + -- cgit v1.3.1 From 2b1c20945dc03d5136fba48ee9d165b412620e66 Mon Sep 17 00:00:00 2001 From: Victoria Plitt Date: Thu, 8 Jun 2023 09:37:17 +0300 Subject: PPC. Resize the font and change color for Sensors display values. Related Work Items: #8551 --- .../Tango.PPC.JobsV2/Views/JobEurekaView.xaml | 2 +- .../PPC/Tango.PPC.UI/Models/MachineOverviewItem.cs | 8 ++++ .../Tango.PPC.UI/Models/MachineOverviewModel.cs | 12 +++--- .../PPC/Tango.PPC.UI/Views/MachineStatusView.xaml | 48 ++++++++++++---------- .../Tango.Emulations/Emulators/MachineEmulator.cs | 15 +++++++ 5 files changed, 58 insertions(+), 27 deletions(-) (limited to 'Software/Visual_Studio/PPC/Modules') diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Views/JobEurekaView.xaml b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Views/JobEurekaView.xaml index c31c8036d..165f251c3 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Views/JobEurekaView.xaml +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Views/JobEurekaView.xaml @@ -1192,7 +1192,7 @@ - + diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Models/MachineOverviewItem.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/Models/MachineOverviewItem.cs index ded7e33e8..42f6bd180 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Models/MachineOverviewItem.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Models/MachineOverviewItem.cs @@ -17,6 +17,13 @@ namespace Tango.PPC.UI.Models set { _displayValue = value; RaisePropertyChangedAuto(); } } + private String _displayMaxValue; + public String DisplayMaxValue + { + get { return _displayMaxValue; } + set { _displayMaxValue = value; RaisePropertyChangedAuto(); } + } + private String _status; public String Status { @@ -53,6 +60,7 @@ namespace Tango.PPC.UI.Models DisplayValue = "--"; Value = 0; MaxValue = 100; + DisplayMaxValue = ""; } } diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Models/MachineOverviewModel.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/Models/MachineOverviewModel.cs index faddc5c54..beba47246 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Models/MachineOverviewModel.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Models/MachineOverviewModel.cs @@ -110,15 +110,17 @@ namespace Tango.PPC.UI.Models { item.Status = "Heating Up"; item.Color = Colors.Orange; - item.DisplayValue = $"{state.CurrentValue.ToString("N1")} / {state.SetPoint}"; + item.DisplayValue = $"{state.CurrentValue.ToString("N1")}"; + item.DisplayMaxValue = $"/{state.SetPoint}"; item.MaxValue = state.SetPoint; item.Value = state.CurrentValue; } - else if (state.SetPoint == 0 || (state.CurrentValue >= (state.SetPoint - 10) || state.CurrentValue <= (state.SetPoint + 10))) + else if (state.SetPoint == 0 || (state.CurrentValue >= (state.SetPoint - 10) && state.CurrentValue <= (state.SetPoint + 10))) { item.Status = "Operational"; item.Color = Colors.Green; item.DisplayValue = $" {state.SetPoint}"; + item.DisplayMaxValue = ""; if(state.SetPoint == 0 && state.CurrentValue == 0) { item.MaxValue = 10; @@ -133,7 +135,8 @@ namespace Tango.PPC.UI.Models { item.Status = "Over-temperature"; item.Color = Colors.Red; - item.DisplayValue = $"{state.CurrentValue.ToString("N1")} / {state.SetPoint}"; + item.DisplayValue = $"{state.CurrentValue.ToString("N1")}"; + item.DisplayMaxValue = $"/{state.SetPoint}"; item.MaxValue = state.SetPoint; item.Value = state.CurrentValue > state.SetPoint? state.SetPoint : state.CurrentValue; } @@ -142,6 +145,7 @@ namespace Tango.PPC.UI.Models item.Color = Colors.Gray; item.MaxValue = 100; item.Value = 0; + item.DisplayMaxValue = ""; } } } @@ -205,8 +209,6 @@ namespace Tango.PPC.UI.Models Lubricant.DisplayValue = "None"; Lubricant.Color = Colors.Gray; } - - } } } diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MachineStatusView.xaml b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MachineStatusView.xaml index 536682bf9..1445337ad 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MachineStatusView.xaml +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Views/MachineStatusView.xaml @@ -1021,12 +1021,15 @@ - - - - + + + + + + + - ºC + ºC Dryer Zone 3 @@ -1039,12 +1042,12 @@ - + - + Dryer Air @@ -1056,12 +1059,15 @@ - - - - + + + + + + + - + Tunnel @@ -1073,12 +1079,12 @@ - + - + Pumps pressure @@ -1090,12 +1096,12 @@ - + - + Lubricant @@ -1200,8 +1206,8 @@ - - + + @@ -1244,7 +1250,7 @@ - + @@ -1283,8 +1289,8 @@ - - + + diff --git a/Software/Visual_Studio/Tango.Emulations/Emulators/MachineEmulator.cs b/Software/Visual_Studio/Tango.Emulations/Emulators/MachineEmulator.cs index 5b17ac49d..41884a24c 100644 --- a/Software/Visual_Studio/Tango.Emulations/Emulators/MachineEmulator.cs +++ b/Software/Visual_Studio/Tango.Emulations/Emulators/MachineEmulator.cs @@ -227,6 +227,21 @@ namespace Tango.Emulations.Emulators HeaterType = (HeaterType)item.Code, }); } + var tunnel = _heater_states.FirstOrDefault(x => x.HeaterType == HeaterType.ETunnelHeater); + if(tunnel != null) + { + tunnel.IsRampingUp = true; + tunnel.CurrentValue = 108.5; + tunnel.SetPoint = 170; + } + var dryerZone3 = _heater_states.FirstOrDefault(x => x.HeaterType == HeaterType.EDryerHeater3); + if (dryerZone3 != null) + { + dryerZone3.IsRampingUp = false; + dryerZone3.CurrentValue = 200.8; + dryerZone3.SetPoint = 170; + } + //DryerZone3 foreach (var item in adapter.HardwareBlowerTypes) { -- cgit v1.3.1 From a495866908071d2204c8eab85dc0163308c5e53e Mon Sep 17 00:00:00 2001 From: Victoria Plitt Date: Sun, 11 Jun 2023 15:19:58 +0300 Subject: VFT. Add warning on the “correction” preview. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Related Work Items: #8553 --- .../Dialogs/VectorFineTuningDialog.xaml | 16 +++++++++++++-- .../Dialogs/VectorFineTuningDialogVM.cs | 17 +++++++++++++++ .../Tango.PPC.JobsV2/Models/BrushStopModel.cs | 19 +++++++++++++++++ .../Tango.PPC.JobsV2/Models/VisualOffsetModel.cs | 24 ++++++++++++++++++++-- 4 files changed, 72 insertions(+), 4 deletions(-) (limited to 'Software/Visual_Studio/PPC/Modules') diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Dialogs/VectorFineTuningDialog.xaml b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Dialogs/VectorFineTuningDialog.xaml index 0e72c6aa0..99b78d7ec 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Dialogs/VectorFineTuningDialog.xaml +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Dialogs/VectorFineTuningDialog.xaml @@ -548,7 +548,18 @@ Correction - + + + + + + + + + + @@ -562,7 +573,8 @@ - + + Target diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Dialogs/VectorFineTuningDialogVM.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Dialogs/VectorFineTuningDialogVM.cs index e473fa420..b9149b81f 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Dialogs/VectorFineTuningDialogVM.cs +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Dialogs/VectorFineTuningDialogVM.cs @@ -1319,6 +1319,7 @@ namespace Tango.PPC.Jobs.Dialogs ActiveLogModel.VectorCorrectionL = VisualCorrectionModel.L; ActiveLogModel.VectorCorrectionA = VisualCorrectionModel.A; ActiveLogModel.VectorCorrectionB = VisualCorrectionModel.B; + VisualCorrectionModel.IsOutOfGamut = IsOutOfGammot(); TestCommand.RaiseCanExecuteChanged(); ByPassTestCommand.RaiseCanExecuteChanged(); @@ -1333,6 +1334,7 @@ namespace Tango.PPC.Jobs.Dialogs ActiveLogModel.VectorCorrectionL = VisualCorrectionModel.L; ActiveLogModel.VectorCorrectionA = VisualCorrectionModel.A; ActiveLogModel.VectorCorrectionB = VisualCorrectionModel.B; + VisualCorrectionModel.IsOutOfGamut = IsOutOfGammot(); TestCommand.RaiseCanExecuteChanged(); ByPassTestCommand.RaiseCanExecuteChanged(); } @@ -1347,10 +1349,25 @@ namespace Tango.PPC.Jobs.Dialogs ActiveLogModel.VectorCorrectionL = VisualCorrectionModel.L; ActiveLogModel.VectorCorrectionA = VisualCorrectionModel.A; ActiveLogModel.VectorCorrectionB = VisualCorrectionModel.B; + VisualCorrectionModel.IsOutOfGamut = IsOutOfGammot(); TestCommand.RaiseCanExecuteChanged(); ByPassTestCommand.RaiseCanExecuteChanged(); } + private bool IsOutOfGammot() + { + BrushStopModel.ColorSpace = ColorSpaces.LAB; + BrushStopModel.PreventPropertyUpdate = true; + BrushStopModel.L = ActiveLogModel.VectorCorrectionL; + BrushStopModel.A = ActiveLogModel.VectorCorrectionA; + BrushStopModel.B = ActiveLogModel.VectorCorrectionB; + BrushStopModel.PreventPropertyUpdate = false; + BrushStopModel.IsOutputOfGamut(ColorSpaces.LAB); + + return BrushStopModel.IsOutOfGamut; + + } + #endregion #region Job 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 d415dbb79..5464aa5ed 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 @@ -1796,6 +1796,25 @@ namespace Tango.PPC.Jobs.Models } } + public void IsOutputOfGamut(ColorSpaces colorSpace) + { + try + { + BrushStop stop = CreateBrushStop(colorSpace); + Configuration configuration = SegmentModel.Job.Machine.Configuration; + Rml rml = SegmentModel.Job.Rml; + IsOutOfGamut = _converter.IsOutOfGamut(stop, configuration, rml); + } + catch (Exception ex) + { + LogManager.Log(ex, "An error occurred while trying to test IsOutputOfGammut from conversion engine." + ex); + BestMatchColor = Color.FromRgb((byte)Red, (byte)Green, (byte)Blue); + } + finally + { + IsBusy = false; + } + } #endregion } } diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Models/VisualOffsetModel.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Models/VisualOffsetModel.cs index a0b6156a3..74651992e 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Models/VisualOffsetModel.cs +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Models/VisualOffsetModel.cs @@ -237,7 +237,24 @@ namespace Tango.PPC.Jobs.Models return new SolidColorBrush() { Color = Color.FromRgb((byte)rgb.R, (byte)rgb.G, (byte)rgb.B) }; } } - + + private bool _isOutOfGamut; + /// + /// Gets or sets a value indicating whether this instance is out of gamut. + /// + public bool IsOutOfGamut + { + get { return _isOutOfGamut; } + set + { + if (_isOutOfGamut != value) + { + _isOutOfGamut = value; + RaisePropertyChangedAuto(); + } + } + } + #endregion public VisualOffsetModel() @@ -248,7 +265,9 @@ namespace Tango.PPC.Jobs.Models MaxChroma = new VisualLCHOffset(TypeColorCorrection.Chroma, 1); MinHue = new VisualLCHOffset(TypeColorCorrection.Hue, -1); MaxHue = new VisualLCHOffset(TypeColorCorrection.Hue, 1); - + IsOutOfGamut = false; + + } public void InitLAB(double l, double a, double b, double c, double h) @@ -292,6 +311,7 @@ namespace Tango.PPC.Jobs.Models B = b; C = last_LCH.C; H = last_LCH.h; + IsOutOfGamut = false; } -- cgit v1.3.1