From 9c858b7b51be2eb5b2f515912d436224d7e6483c Mon Sep 17 00:00:00 2001 From: Roy Ben Shabat Date: Mon, 29 Sep 2025 05:46:38 +0300 Subject: Process Parameters Visual Representation. Filter RML by machine type on Research module. --- .../ViewModels/MainViewVM.cs | 3 +- .../Views/JobView.xaml | 49 ++++++++++++-- .../ViewModels/AddLiquidFactorViewVM.cs | 2 +- .../ViewModels/MainViewVM.cs | 18 +++++ .../Views/ProcessParametersView.xaml | 77 +++++++++++++++++----- .../Views/ProcessParametersView.xaml.cs | 21 ++++++ .../Tango.MachineStudio.RML/Views/RmlsView.xaml | 9 +-- 7 files changed, 150 insertions(+), 29 deletions(-) (limited to 'Software/Visual_Studio/MachineStudio/Modules') 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 d262e154e..ab74433a6 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 @@ -1902,7 +1902,8 @@ namespace Tango.MachineStudio.Developer.ViewModels //var processParams = _activeJobDbContext.ProcessParametersTables.ToList(); ColorSpaces = _activeJobDbContext.ColorSpaces.ToObservableCollection(); - Rmls = _activeJobDbContext.Rmls.OrderBy(i => i.Name).ToObservableCollection(); + + Rmls = _activeJobDbContext.Rmls.Where(x => x.MachineType == SelectedMachine.MachineType || x.MachineType == null).ToList().OrderBy(i => i.FinalName).ToObservableCollection(); WindingMethods = _activeJobDbContext.WindingMethods.ToObservableCollection(); SpoolTypes = _activeJobDbContext.SpoolTypes.ToObservableCollection(); diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/JobView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/JobView.xaml index a1cda2249..45c2d54cb 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/JobView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/JobView.xaml @@ -78,6 +78,7 @@ + @@ -757,7 +758,7 @@ MEDIA - + @@ -838,7 +839,7 @@ Use Preferred Index - + + + + + + + + + + @@ -59,22 +80,44 @@ - - - - - - - - + + + - - - - + + + + + + + + + + + + + + + + + + + + + + + - - + + + diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/ProcessParametersView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/ProcessParametersView.xaml.cs index a6d03ca0e..29da7b293 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/ProcessParametersView.xaml.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/ProcessParametersView.xaml.cs @@ -23,6 +23,8 @@ namespace Tango.MachineStudio.RML.Views /// public partial class ProcessParametersView : UserControl { + private HashSet _processTablesViewers; + private MainViewVM _vm; public DraggingSurface DraggingSurface { @@ -46,6 +48,7 @@ namespace Tango.MachineStudio.RML.Views public ProcessParametersView() { InitializeComponent(); + _processTablesViewers = new HashSet(); DraggingSurface = draggingSurface; Loaded += (_, __) => { _vm = DataContext as MainViewVM; }; } @@ -55,5 +58,23 @@ namespace Tango.MachineStudio.RML.Views ProcessParametersTable dropped = e.Droppable.DataContext as ProcessParametersTable; _vm.OnProcessParametersTableDropped(dragged, dropped); } + + private void ScrollViewer_Loaded(object sender, RoutedEventArgs e) + { + var viewer = sender as ScrollViewer; + if (!_processTablesViewers.Contains(viewer)) + { + viewer.ScrollChanged += Viewer_ScrollChanged; + _processTablesViewers.Add(viewer); + } + } + + private void Viewer_ScrollChanged(object sender, ScrollChangedEventArgs e) + { + foreach (var viewer in _processTablesViewers.Where(x => x.IsLoaded && x.IsVisible && x != sender).ToList()) + { + viewer.ScrollToVerticalOffset(e.VerticalOffset); + } + } } } 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 eee16a2df..ff341f5ed 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 @@ -6,6 +6,7 @@ xmlns:global="clr-namespace:Tango.MachineStudio.RML" xmlns:observables="clr-namespace:Tango.BL.Entities;assembly=Tango.BL" xmlns:vm="clr-namespace:Tango.MachineStudio.RML.ViewModels" + xmlns:controls="clr-namespace:Tango.SharedUI.Controls;assembly=Tango.SharedUI" xmlns:shapes="clr-namespace:Tango.SharedUI.Shapes;assembly=Tango.SharedUI" xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes" xmlns:converters="clr-namespace:Tango.SharedUI.Converters;assembly=Tango.SharedUI" @@ -102,14 +103,14 @@ - - + + - + @@ -162,7 +163,7 @@ --> - + -- cgit v1.3.1