From 98b4de2ceaecb091e12145921dcb7989f839cf10 Mon Sep 17 00:00:00 2001 From: Victoria Plitt Date: Thu, 27 Apr 2023 13:35:53 +0300 Subject: MachineStudio. RML - add DencityCount and plies GUI objects. --- .../Tango.MachineStudio.RML/Views/RmlView.xaml | 70 +++++++++++++++------- 1 file changed, 49 insertions(+), 21 deletions(-) (limited to 'Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML') diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/RmlView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/RmlView.xaml index 08af47ef4..99e06ccdc 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/RmlView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/RmlView.xaml @@ -5,6 +5,7 @@ xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:global="clr-namespace:Tango.MachineStudio.RML" xmlns:enumerations="clr-namespace:Tango.BL.Enumerations;assembly=Tango.BL" + xmlns:sys="clr-namespace:System;assembly=mscorlib" xmlns:observables="clr-namespace:Tango.BL.Entities;assembly=Tango.BL" xmlns:shapes="clr-namespace:Tango.SharedUI.Shapes;assembly=Tango.SharedUI" xmlns:controls="clr-namespace:Tango.SharedUI.Controls;assembly=Tango.SharedUI" @@ -21,6 +22,14 @@ + + + + + + + + @@ -94,45 +103,64 @@ - + --> - + + + + - - + + + + + + + + - - + + - - + + - - + + - - + + + + + + + - - + + - + - - + - + - + -- cgit v1.3.1 From c462aab74f45aeac7a25a20aa1bf36ee5ea841bd Mon Sep 17 00:00:00 2001 From: Victoria Plitt Date: Sun, 30 Apr 2023 15:15:10 +0300 Subject: MachineStudio. Added space in RMLs properties GUI. --- .../MachineStudio/Modules/Tango.MachineStudio.RML/Views/RmlView.xaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML') diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/RmlView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/RmlView.xaml index 99e06ccdc..eb6f50bbe 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/RmlView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/RmlView.xaml @@ -105,8 +105,9 @@ --> - - + + + -- cgit v1.3.1 From 956950cc0fd27415cbf32523c1bf8a86c011b86c Mon Sep 17 00:00:00 2001 From: Victoria Plitt Date: Sun, 7 May 2023 19:09:19 +0300 Subject: Machine Studio. Missing critical field from thread weight settings in RML. Related Work Items: #8379 --- .../Modules/Tango.MachineStudio.RML/Views/RmlView.xaml | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML') diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/RmlView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/RmlView.xaml index eb6f50bbe..8730355cc 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/RmlView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/RmlView.xaml @@ -106,8 +106,8 @@ --> - - + + @@ -121,15 +121,10 @@ - - - - - - + -- cgit v1.3.1 From a906e7316bc179888f475f6bcff5ddc20a501346 Mon Sep 17 00:00:00 2001 From: Victoria Plitt Date: Sun, 9 Jul 2023 14:00:24 +0300 Subject: MS RML list Related Work Items: #8383 --- .../Tango.MachineStudio.RML/Models/RmlModel.cs | 23 +++++++- .../ViewModels/MainViewVM.cs | 65 ++++++++++++++++++++-- .../Tango.MachineStudio.RML/Views/RmlsView.xaml | 26 +++++---- 3 files changed, 96 insertions(+), 18 deletions(-) (limited to 'Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML') diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Models/RmlModel.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Models/RmlModel.cs index b1be35a38..dce3432e2 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Models/RmlModel.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Models/RmlModel.cs @@ -11,10 +11,16 @@ namespace Tango.MachineStudio.RML.Models { public class RmlModel : ExtendedObject { + public class LiquidTypeColorValue + { + public int Color { get; set; } + + public double LiquidTypeValue { get; set; } + } public String Guid { get; set; } public String Name { get; set; } - + public String DisplayName { get; set; } public String CCT { get; set; } @@ -27,8 +33,23 @@ namespace Tango.MachineStudio.RML.Models public String Btsr { get; set; } + public String DyeingSpeed { get; set; } + + public String Zone1InkUptake { get; set; } + + public String Zone2InkUptake { get; set; } + public DateTime LastUpdated { get; set; } public List LiquidTypes { get; set; } + + public List LiquidTypesR { get; set; } + + public RmlModel() + { + DyeingSpeed = "-"; + Zone1InkUptake = "-"; + Zone2InkUptake = "-"; + } } } diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/ViewModels/MainViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/ViewModels/MainViewVM.cs index fd276ea65..7eb6e9058 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/ViewModels/MainViewVM.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/ViewModels/MainViewVM.cs @@ -28,6 +28,7 @@ using Tango.BL.Enumerations; using Google.Protobuf; using Tango.ColorConversion; using Tango.CSV; +using Tango.Core; namespace Tango.MachineStudio.RML.ViewModels { @@ -345,18 +346,21 @@ namespace Tango.MachineStudio.RML.ViewModels private async Task LoadRmls() { var filter = RMLFilter.ToStringOrEmpty().ToLower(); - + using (ObservablesContext db = ObservablesContext.CreateDefault()) { + var rmls = await db.Rmls.Where(x => x.Name.ToLower().Contains(filter) || x.DisplayName.ToLower().Contains(filter)) .Include(x => x.Cct.FileName) + .Include(x => x.LiquidTypesRmls) .Include(x => x.LiquidTypesRmls.Select(y => y.LiquidType)) .Include(x => x.BtsrApplicationType.Name) .Include(x => x.BtsrYarnType.Name) + .Include(x => x.ProcessParametersTablesGroups) .Select(x => new { - x.Guid, x.Name, + x.Guid, x.DisplayName, x.Cct.FileName, x.ColorConversionVersion, @@ -366,13 +370,44 @@ namespace Tango.MachineStudio.RML.ViewModels x.LastUpdated, BtsrApplicationType = x.BtsrApplicationType != null ? x.BtsrApplicationType.Name : String.Empty, BtsrYarnType = x.BtsrYarnType != null ? x.BtsrYarnType.Name : String.Empty, - LiquidTypes = x.LiquidTypesRmls.Select(y => y.LiquidType) + LiquidTypesRmls = x.LiquidTypesRmls, + LiquidTypes = x.LiquidTypesRmls.Select(y => y.LiquidType), + ProcessParametersTables = x.ProcessParametersTablesGroups }).ToListAsync(); + List models = new List(); + //var tables = ActiveRML.GetActiveProcessGroup().ProcessParametersTables; + foreach (var rml in rmls.OrderBy(x => x.Name).ToList()) { + ProcessParametersTable tableZone1 = null; + ProcessParametersTable tableZone2 = null; + if (rml.ProcessParametersTables != null) + { + var activeTablesGroup = rml.ProcessParametersTables.Where(x=>x.Active).FirstOrDefault(); + if ( activeTablesGroup != null) + { + try + { + var tables = await db.ProcessParametersTables.Where(x => x.ProcessParametersTablesGroupGuid == activeTablesGroup.Guid).OrderBy(x => x.TableIndex).ToListAsync(); + if (tables.Count > 0) + { + tableZone1 = tables[0]; + } + if (tables.Count > 1) + { + tableZone2 = tables[1]; + } + } + catch (Exception ex) + { + LogManager.Log($"Error loading ProcessParametersTables {ex.Message}"); + } + }; + } + RmlModel model = new RmlModel(); model.Guid = rml.Guid; model.Name = rml.Name; @@ -383,8 +418,21 @@ namespace Tango.MachineStudio.RML.ViewModels model.UseLightInks = rml.UseLightInks; model.HeadType = (HeadTypes)rml.HeadType; model.Btsr = (String.IsNullOrEmpty(rml.BtsrApplicationType) ? "N/A" : rml.BtsrApplicationType) + ", " + (String.IsNullOrEmpty(rml.BtsrYarnType) ? "N/A" : rml.BtsrYarnType); - model.LiquidTypes = rml.LiquidTypes.OrderBy(x => x.Code).Select(x => x.Color).ToList(); + + if( tableZone1 != null) + { + model.Zone1InkUptake = String.Format($"{tableZone1.MinInkUptake}-{tableZone1.MaxInkUptake}"); + model.DyeingSpeed = tableZone1.DyeingSpeed.ToString(); + } + if(tableZone2 != null) + { + model.DyeingSpeed += String.Format($"-{tableZone2.DyeingSpeed}"); + model.Zone2InkUptake = tableZone2 == null ? "-" : String.Format($"{tableZone2.MinInkUptake}-{tableZone2.MaxInkUptake}"); + } + model.LiquidTypes = rml.LiquidTypes.OrderBy(x => x.Code).Select(x => x.Color).ToList(); + model.LiquidTypesR = rml.LiquidTypesRmls.OrderBy(x => x.LiquidType.Code).ToList().Select((n) => new RmlModel.LiquidTypeColorValue(){ Color = n.LiquidType.Color, LiquidTypeValue = n.MaxNlPerCm }).ToList(); + models.Add(model); } @@ -482,6 +530,11 @@ namespace Tango.MachineStudio.RML.ViewModels } ActiveProcessParametersGroup = ActiveRML.ProcessParametersTablesGroups.ToList().FirstOrDefault(); + + var tables= ActiveRML.ProcessParametersTablesGroups.ToList(); + var zone1 = tables[0].ProcessParametersTables; + /* + * */ ActiveProcessParametersTableView = CollectionViewSource.GetDefaultView(ActiveProcessParametersGroup.ProcessParametersTables); ActiveProcessParametersTableView.SortDescriptions.Add(new SortDescription(nameof(ProcessParametersTable.TableIndex), ListSortDirection.Ascending)); @@ -1075,10 +1128,10 @@ namespace Tango.MachineStudio.RML.ViewModels } } - private void BackToRmls() + private async void BackToRmls() { View.NavigateTo(RmlNavigationView.RmlsView); - LoadRmls(); + await LoadRmls(); } #region Batch Conversion diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/RmlsView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/RmlsView.xaml index d5f4165c9..9c684c052 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/RmlsView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/RmlsView.xaml @@ -81,7 +81,7 @@ - + - + - - + + () - - + + + + + - - + + - + - + @@ -123,11 +126,12 @@ - + + -- cgit v1.3.1