From b34d8641f72e7b92958ea17d10ff15c29d37c464 Mon Sep 17 00:00:00 2001 From: Victoria Plitt Date: Mon, 16 Sep 2019 11:40:14 +0300 Subject: Dropping Machine Studio ColorLab Module. Move to RML module. Related Work Items: #1168 --- .../Views/CalibrationDataView.xaml | 72 ++ .../Views/CalibrationDataView.xaml.cs | 28 + .../Views/ColorConversionView.xaml | 772 +++++++++++++++++++++ .../Views/ColorConversionView.xaml.cs | 28 + .../Views/ProcessParametersView.xaml | 155 +++++ .../Views/ProcessParametersView.xaml.cs | 59 ++ .../Tango.MachineStudio.RML/Views/RmlView.xaml | 272 ++------ .../Tango.MachineStudio.RML/Views/RmlView.xaml.cs | 22 +- 8 files changed, 1193 insertions(+), 215 deletions(-) create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/CalibrationDataView.xaml create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/CalibrationDataView.xaml.cs create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/ColorConversionView.xaml create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/ColorConversionView.xaml.cs create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/ProcessParametersView.xaml create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/ProcessParametersView.xaml.cs (limited to 'Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views') diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/CalibrationDataView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/CalibrationDataView.xaml new file mode 100644 index 000000000..54e96017c --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/CalibrationDataView.xaml @@ -0,0 +1,72 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/CalibrationDataView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/CalibrationDataView.xaml.cs new file mode 100644 index 000000000..e23e343a4 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/CalibrationDataView.xaml.cs @@ -0,0 +1,28 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Data; +using System.Windows.Documents; +using System.Windows.Input; +using System.Windows.Media; +using System.Windows.Media.Imaging; +using System.Windows.Navigation; +using System.Windows.Shapes; + +namespace Tango.MachineStudio.RML.Views +{ + /// + /// Interaction logic for CalibrationDataView.xaml + /// + public partial class CalibrationDataView : UserControl + { + public CalibrationDataView() + { + InitializeComponent(); + } + } +} diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/ColorConversionView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/ColorConversionView.xaml new file mode 100644 index 000000000..ed27c1760 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/ColorConversionView.xaml @@ -0,0 +1,772 @@ + + + + + + + + + + + + + + + + + + + COLOR CONVERSION + + + + + + + + + + + + + + + + + + + + + + + + RGB + LAB + + + + + + + Color is out of gamut + + + + + + + + + + + + + + + + + SOURCE / INVERSE + SUGGESTIONS + LIQUID VOLUMES + + + + + + + + + + + + , + + + + + + + + + + + + + + + + + + + R + + + + + + + + + + + + G + + + + + + + + + + + B + + + + + + + + + + + + + L + + + + + + + + A + + + + + + + + B + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + GAMUT REGION: + + + + + + + + + + Liquid volumes exceeds the maximum range + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + COMPOSITE + + + + + + + + + + + + + + R + + + + + + + + + + + + G + + + + + + + + + + + B + + + + + + + + + + + + + L + + + + + + + + A + + + + + + + + B + + + + + + + + + + + + + + + + diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/ColorConversionView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/ColorConversionView.xaml.cs new file mode 100644 index 000000000..8b6955269 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/ColorConversionView.xaml.cs @@ -0,0 +1,28 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Data; +using System.Windows.Documents; +using System.Windows.Input; +using System.Windows.Media; +using System.Windows.Media.Imaging; +using System.Windows.Navigation; +using System.Windows.Shapes; + +namespace Tango.MachineStudio.RML.Views +{ + /// + /// Interaction logic for ColorConversionView.xaml + /// + public partial class ColorConversionView : UserControl + { + public ColorConversionView() + { + InitializeComponent(); + } + } +} diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/ProcessParametersView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/ProcessParametersView.xaml new file mode 100644 index 000000000..b85fd2c12 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/ProcessParametersView.xaml @@ -0,0 +1,155 @@ + + + + + + + + + + + + + + + + + + ACTIVE PROCESS GROUP + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LIQUID FACTORS + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 new file mode 100644 index 000000000..a6d03ca0e --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/ProcessParametersView.xaml.cs @@ -0,0 +1,59 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Data; +using System.Windows.Documents; +using System.Windows.Input; +using System.Windows.Media; +using System.Windows.Media.Imaging; +using System.Windows.Navigation; +using System.Windows.Shapes; +using Tango.MachineStudio.RML.ViewModels; +using Tango.BL.Entities; +using Tango.DragAndDrop; + +namespace Tango.MachineStudio.RML.Views +{ + /// + /// Interaction logic for ProcessParametersView.xaml + /// + public partial class ProcessParametersView : UserControl + { + private MainViewVM _vm; + public DraggingSurface DraggingSurface + { + get { return (DraggingSurface)GetValue(DraggingSurfaceProperty); } + set { SetValue(DraggingSurfaceProperty, value); } + } + public static readonly DependencyProperty DraggingSurfaceProperty = + DependencyProperty.Register("DraggingSurface", typeof(DraggingSurface), typeof(ProcessParametersView), new PropertyMetadata(null)); + + public double WidthLilquidFactors + { + get { return (double )GetValue(WidthLilquidFactorsProperty); } + set { SetValue(WidthLilquidFactorsProperty, value); } + } + + // Using a DependencyProperty as the backing store for WidthLilquidFactors. This enables animation, styling, binding, etc... + public static readonly DependencyProperty WidthLilquidFactorsProperty = + DependencyProperty.Register("WidthLilquidFactors", typeof(double ), typeof(ProcessParametersView), new PropertyMetadata(null)); + + + public ProcessParametersView() + { + InitializeComponent(); + DraggingSurface = draggingSurface; + Loaded += (_, __) => { _vm = DataContext as MainViewVM; }; + } + private void OnProcessTableDropped(object sender, DropEventArgs e) + { + ProcessParametersTable dragged = e.Draggable.DataContext as ProcessParametersTable; + ProcessParametersTable dropped = e.Droppable.DataContext as ProcessParametersTable; + _vm.OnProcessParametersTableDropped(dragged, dropped); + } + } +} 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 fa51a6bf5..628b9e402 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 @@ -9,7 +9,6 @@ xmlns:controls="clr-namespace:Tango.SharedUI.Controls;assembly=Tango.SharedUI" xmlns:editors="clr-namespace:Tango.SharedUI.Editors;assembly=Tango.SharedUI" xmlns:mahapps="http://metro.mahapps.com/winfx/xaml/controls" - xmlns:colorLabViews="clr-namespace:Tango.MachineStudio.ColorLab.Views;assembly=Tango.MachineStudio.ColorLab" xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes" xmlns:converters="clr-namespace:Tango.SharedUI.Converters;assembly=Tango.SharedUI" xmlns:dragAndDrop="clr-namespace:Tango.DragAndDrop;assembly=Tango.DragAndDrop" @@ -126,215 +125,94 @@ - - + + - - - - - - - - - - - - - - - ACTIVE PROCESS GROUP - - - + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + CCT + + + + + + + + + + + + + + + + + + + + - - - + + + + + + + - COLOR CONVERSION TABLE (CCT) + CALIBRATION DATA + - - - - - - - - - - - - - - - - - + + + - - - - - - - - - - - - - - - - - - - - - LIQUID FACTORS - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - CALIBRATION DATA - - - - - - - - - - - diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/RmlView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/RmlView.xaml.cs index 2a5d317c6..aa4803bd0 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/RmlView.xaml.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/RmlView.xaml.cs @@ -25,32 +25,18 @@ namespace Tango.MachineStudio.RML.Views { private MainViewVM _vm; - public DraggingSurface DraggingSurface - { - get { return (DraggingSurface)GetValue(DraggingSurfaceProperty); } - set { SetValue(DraggingSurfaceProperty, value); } - } - public static readonly DependencyProperty DraggingSurfaceProperty = - DependencyProperty.Register("DraggingSurface", typeof(DraggingSurface), typeof(RmlView), new PropertyMetadata(null)); - - public RmlView() { InitializeComponent(); - DraggingSurface = draggingSurface; Loaded += (_, __) => { _vm = DataContext as MainViewVM; }; } - private void OnProcessTableDropped(object sender, DropEventArgs e) - { - ProcessParametersTable dragged = e.Draggable.DataContext as ProcessParametersTable; - ProcessParametersTable dropped = e.Droppable.DataContext as ProcessParametersTable; - _vm.OnProcessParametersTableDropped(dragged, dropped); - } - private void calibrationDataScrollViewer_ScrollChanged(object sender, ScrollChangedEventArgs e) { - liquidsFactorsScrollViewer.ScrollToHorizontalOffset(e.HorizontalOffset); + if(processParametersView.IsVisible) + { + processParametersView.liquidsFactorsScrollViewer.ScrollToHorizontalOffset(e.HorizontalOffset); + } } } } -- cgit v1.3.1