From 7e6c673cc8b04086fa3c78cd1bf5e31085fd8cc8 Mon Sep 17 00:00:00 2001 From: Roy Ben-Shabat Date: Mon, 5 Mar 2018 20:33:02 +0200 Subject: Working on color lab module ! --- Software/DB/Tango.mdf | Bin 75497472 -> 75497472 bytes Software/DB/Tango_log.ldf | Bin 1048576 -> 1048576 bytes Software/Graphics/arrow-long-down.png | Bin 0 -> 2865 bytes Software/Graphics/arrow-long-left.png | Bin 0 -> 2413 bytes Software/Graphics/arrow-long-right.png | Bin 0 -> 2169 bytes Software/Graphics/arrow_right.png | Bin 1094 -> 0 bytes Software/Graphics/data-table.png | Bin 0 -> 1238 bytes Software/Graphics/transparent.jpg | Bin 0 -> 15939 bytes .../Images/arrow-long-down.png | Bin 0 -> 2865 bytes .../Images/arrow-long-left.png | Bin 0 -> 2413 bytes .../Images/arrow-long-right.png | Bin 0 -> 2169 bytes .../Images/data-table.png | Bin 0 -> 1238 bytes .../Images/transparent.jpg | Bin 0 -> 15939 bytes .../Tango.MachineStudio.ColorLab.csproj | 56 ++++ .../ViewModelLocator.cs | 33 ++ .../ViewModels/CalibrationDataPointVM.cs | 48 +++ .../ViewModels/CalibrationDataVM.cs | 70 ++++ .../ViewModels/LiquidVolumeVM.cs | 36 ++ .../ViewModels/MainViewVM.cs | 158 +++++++++ .../Views/MainView.xaml | 373 ++++++++++++++++++++- .../Tango.MachineStudio.ColorLab/app.config | 21 ++ .../Tango.MachineStudio.ColorLab/packages.config | 10 + Software/Visual_Studio/Tango.BL/Entities/Cat.cs | 56 +++- .../Visual_Studio/Tango.BL/Entities/Machine.cs | 21 ++ .../Visual_Studio/Tango.BL/ObservablesContext.cs | 1 + .../Implementation/BrushPicker.cs | 17 +- .../Tango.BrushPicker/Themes/Generic.xaml | 140 ++++---- .../Tango.Core/Helpers/ColorHelper.cs | 10 + Software/Visual_Studio/Tango.DAL.Remote/DB/CAT.cs | 4 +- .../Visual_Studio/Tango.DAL.Remote/DB/MACHINE.cs | 3 + .../Tango.DAL.Remote/DB/RemoteADO.edmx | 71 +++- .../Tango.DAL.Remote/DB/RemoteADO.edmx.diagram | 133 ++++---- .../Tango.SharedUI/Controls/HiveControl.xaml.cs | 2 +- .../Converters/ColorComponentToOpacityConverter.cs | 29 ++ .../Converters/ColorToComponentsConverter.cs | 30 ++ .../Tango.SharedUI/Tango.SharedUI.csproj | 2 + 36 files changed, 1165 insertions(+), 159 deletions(-) create mode 100644 Software/Graphics/arrow-long-down.png create mode 100644 Software/Graphics/arrow-long-left.png create mode 100644 Software/Graphics/arrow-long-right.png delete mode 100644 Software/Graphics/arrow_right.png create mode 100644 Software/Graphics/data-table.png create mode 100644 Software/Graphics/transparent.jpg create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorLab/Images/arrow-long-down.png create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorLab/Images/arrow-long-left.png create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorLab/Images/arrow-long-right.png create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorLab/Images/data-table.png create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorLab/Images/transparent.jpg create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorLab/ViewModelLocator.cs create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorLab/ViewModels/CalibrationDataPointVM.cs create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorLab/ViewModels/CalibrationDataVM.cs create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorLab/ViewModels/LiquidVolumeVM.cs create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorLab/ViewModels/MainViewVM.cs create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorLab/app.config create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorLab/packages.config create mode 100644 Software/Visual_Studio/Tango.SharedUI/Converters/ColorComponentToOpacityConverter.cs create mode 100644 Software/Visual_Studio/Tango.SharedUI/Converters/ColorToComponentsConverter.cs (limited to 'Software') diff --git a/Software/DB/Tango.mdf b/Software/DB/Tango.mdf index eb37646b5..0b5f81486 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 cb71621e6..c1c265fec 100644 Binary files a/Software/DB/Tango_log.ldf and b/Software/DB/Tango_log.ldf differ diff --git a/Software/Graphics/arrow-long-down.png b/Software/Graphics/arrow-long-down.png new file mode 100644 index 000000000..e3a862399 Binary files /dev/null and b/Software/Graphics/arrow-long-down.png differ diff --git a/Software/Graphics/arrow-long-left.png b/Software/Graphics/arrow-long-left.png new file mode 100644 index 000000000..5845204d2 Binary files /dev/null and b/Software/Graphics/arrow-long-left.png differ diff --git a/Software/Graphics/arrow-long-right.png b/Software/Graphics/arrow-long-right.png new file mode 100644 index 000000000..6c089d44e Binary files /dev/null and b/Software/Graphics/arrow-long-right.png differ diff --git a/Software/Graphics/arrow_right.png b/Software/Graphics/arrow_right.png deleted file mode 100644 index 5b7f0736b..000000000 Binary files a/Software/Graphics/arrow_right.png and /dev/null differ diff --git a/Software/Graphics/data-table.png b/Software/Graphics/data-table.png new file mode 100644 index 000000000..0d5e5eaa6 Binary files /dev/null and b/Software/Graphics/data-table.png differ diff --git a/Software/Graphics/transparent.jpg b/Software/Graphics/transparent.jpg new file mode 100644 index 000000000..9ac68a6f5 Binary files /dev/null and b/Software/Graphics/transparent.jpg differ diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorLab/Images/arrow-long-down.png b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorLab/Images/arrow-long-down.png new file mode 100644 index 000000000..e3a862399 Binary files /dev/null and b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorLab/Images/arrow-long-down.png differ diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorLab/Images/arrow-long-left.png b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorLab/Images/arrow-long-left.png new file mode 100644 index 000000000..5845204d2 Binary files /dev/null and b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorLab/Images/arrow-long-left.png differ diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorLab/Images/arrow-long-right.png b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorLab/Images/arrow-long-right.png new file mode 100644 index 000000000..6c089d44e Binary files /dev/null and b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorLab/Images/arrow-long-right.png differ diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorLab/Images/data-table.png b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorLab/Images/data-table.png new file mode 100644 index 000000000..0d5e5eaa6 Binary files /dev/null and b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorLab/Images/data-table.png differ diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorLab/Images/transparent.jpg b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorLab/Images/transparent.jpg new file mode 100644 index 000000000..9ac68a6f5 Binary files /dev/null and b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorLab/Images/transparent.jpg differ diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorLab/Tango.MachineStudio.ColorLab.csproj b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorLab/Tango.MachineStudio.ColorLab.csproj index 11a522b51..91bc51933 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorLab/Tango.MachineStudio.ColorLab.csproj +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorLab/Tango.MachineStudio.ColorLab.csproj @@ -31,8 +31,42 @@ 4 + + ..\..\..\packages\EntityFramework.6.0.0\lib\net45\EntityFramework.dll + + + ..\..\..\packages\EntityFramework.6.0.0\lib\net45\EntityFramework.SqlServer.dll + + + ..\..\..\packages\MvvmLightLibs.5.3.0.0\lib\net45\GalaSoft.MvvmLight.dll + + + ..\..\..\packages\MvvmLightLibs.5.3.0.0\lib\net45\GalaSoft.MvvmLight.Extras.dll + + + ..\..\..\packages\MvvmLightLibs.5.3.0.0\lib\net45\GalaSoft.MvvmLight.Platform.dll + + + ..\..\..\packages\Google.Protobuf.3.4.1\lib\net45\Google.Protobuf.dll + + + ..\..\..\packages\MahApps.Metro.1.5.0\lib\net45\MahApps.Metro.dll + + + ..\..\..\packages\MaterialDesignColors.1.1.2\lib\net45\MaterialDesignColors.dll + + + ..\..\..\packages\MaterialDesignThemes.2.3.1.953\lib\net45\MaterialDesignThemes.Wpf.dll + + + ..\..\..\packages\CommonServiceLocator.1.3\lib\portable-net4+sl5+netcore45+wpa81+wp8\Microsoft.Practices.ServiceLocation.dll + + + + ..\..\..\packages\MahApps.Metro.1.5.0\lib\net45\System.Windows.Interactivity.dll + @@ -50,6 +84,11 @@ GlobalVersionInfo.cs + + + + + MainView.xaml @@ -73,6 +112,8 @@ ResXFileCodeGenerator Resources.Designer.cs + + SettingsSingleFileGenerator Settings.Designer.cs @@ -115,6 +156,10 @@ {cb0b0aa2-bb24-4bca-a720-45e397684e12} Tango.MachineStudio.Common + + {d0ce8122-077d-42a2-9490-028ae4769b52} + Tango.MachineStudio.MachineDesigner + @@ -125,5 +170,16 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorLab/ViewModelLocator.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorLab/ViewModelLocator.cs new file mode 100644 index 000000000..2ea8d17a3 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorLab/ViewModelLocator.cs @@ -0,0 +1,33 @@ +using GalaSoft.MvvmLight; +using GalaSoft.MvvmLight.Ioc; +using Microsoft.Practices.ServiceLocation; +using Tango.MachineStudio.ColorLab.ViewModels; +using Tango.MachineStudio.ColorLab.Views; + +namespace Tango.MachineStudio.ColorLab +{ + /// + /// This class contains static references to all the view models in the + /// application and provides an entry point for the bindings. + /// + public static class ViewModelLocator + { + /// + /// Initializes a new instance of the ViewModelLocator class. + /// + static ViewModelLocator() + { + ServiceLocator.SetLocatorProvider(() => SimpleIoc.Default); + + SimpleIoc.Default.Register(); + } + + public static MainViewVM MainViewVM + { + get + { + return ServiceLocator.Current.GetInstance(); + } + } + } +} \ No newline at end of file diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorLab/ViewModels/CalibrationDataPointVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorLab/ViewModels/CalibrationDataPointVM.cs new file mode 100644 index 000000000..74f892a81 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorLab/ViewModels/CalibrationDataPointVM.cs @@ -0,0 +1,48 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Tango.SharedUI; + +namespace Tango.MachineStudio.ColorLab.ViewModels +{ + public class CalibrationDataPointVM : ViewModel + { + private double _x; + + public double X + { + get { return _x; } + set { _x = value; RaisePropertyChangedAuto(); } + } + + private double _y; + + public double Y + { + get { return _y; } + set { _y = value; RaisePropertyChangedAuto(); } + } + + private int _index; + + public int Index + { + get { return _index; } + set { _index = value; RaisePropertyChangedAuto(); } + } + + + public CalibrationDataPointVM() + { + + } + + public CalibrationDataPointVM(double x, double y) + { + X = x; + Y = y; + } + } +} diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorLab/ViewModels/CalibrationDataVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorLab/ViewModels/CalibrationDataVM.cs new file mode 100644 index 000000000..1bcb29835 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorLab/ViewModels/CalibrationDataVM.cs @@ -0,0 +1,70 @@ +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Tango.SharedUI; + +namespace Tango.MachineStudio.ColorLab.ViewModels +{ + public class CalibrationDataVM : ViewModel + { + private String _name; + + public String Name + { + get { return _name; } + set { _name = value; RaisePropertyChangedAuto(); } + } + + private int _color; + + public int Color + { + get { return _color; } + set { _color = value; RaisePropertyChangedAuto(); } + } + + private ObservableCollection _calibrationPoints; + + public ObservableCollection CalibrationPoints + { + get { return _calibrationPoints; } + set { _calibrationPoints = value; RaisePropertyChangedAuto(); OnCalibrationPointsChanged(); } + } + + private void OnCalibrationPointsChanged() + { + if (CalibrationPoints != null) + { + CalibrationPoints.CollectionChanged -= CalibrationPoints_CollectionChanged; + CalibrationPoints.CollectionChanged += CalibrationPoints_CollectionChanged; + + SetIndices(); + } + } + + private void CalibrationPoints_CollectionChanged(object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e) + { + SetIndices(); + } + + private void SetIndices() + { + if (CalibrationPoints != null) + { + int index = 1; + foreach (var p in CalibrationPoints) + { + p.Index = index++; + } + } + } + + public CalibrationDataVM() + { + CalibrationPoints = new ObservableCollection(); + } + } +} diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorLab/ViewModels/LiquidVolumeVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorLab/ViewModels/LiquidVolumeVM.cs new file mode 100644 index 000000000..a804d628b --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorLab/ViewModels/LiquidVolumeVM.cs @@ -0,0 +1,36 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Tango.SharedUI; + +namespace Tango.MachineStudio.ColorLab.ViewModels +{ + public class LiquidVolumeVM : ViewModel + { + private String _name; + + public String Name + { + get { return _name; } + set { _name = value; RaisePropertyChangedAuto(); } + } + + private double _volume; + + public double Volume + { + get { return _volume; } + set { _volume = value; RaisePropertyChangedAuto(); } + } + + private int _color; + + public int Color + { + get { return _color; } + set { _color = value; RaisePropertyChangedAuto(); } + } + } +} diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorLab/ViewModels/MainViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorLab/ViewModels/MainViewVM.cs new file mode 100644 index 000000000..8260f000a --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorLab/ViewModels/MainViewVM.cs @@ -0,0 +1,158 @@ +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.Runtime.CompilerServices; +using System.Text; +using System.Threading.Tasks; +using Tango.BL; +using Tango.BL.Entities; +using Tango.SharedUI; + +namespace Tango.MachineStudio.ColorLab.ViewModels +{ + public class MainViewVM : ViewModel + { + private ObservablesContext _dbContext; + + #region Properties + + private ObservableCollection _machines; + /// + /// Gets or sets the machines. + /// + public ObservableCollection Machines + { + get { return _machines; } + set { _machines = value; RaisePropertyChangedAuto(); } + } + + private ObservableCollection _colorSpaces; + /// + /// Gets or sets the color spaces. + /// + public ObservableCollection ColorSpaces + { + get { return _colorSpaces; } + set { _colorSpaces = value; RaisePropertyChangedAuto(); } + } + + private ObservableCollection _rmls; + /// + /// Gets or sets the RMLS. + /// + public ObservableCollection Rmls + { + get { return _rmls; } + set { _rmls = value; RaisePropertyChangedAuto(); } + } + + protected Machine _selectedMachine; + /// + /// Gets or sets the selected machine. + /// + public Machine SelectedMachine + { + get { return _selectedMachine; } + set + { + _selectedMachine = value; RaisePropertyChangedAuto(); + } + } + + private Rml _selectedRML; + /// + /// Gets or sets the selected RML. + /// + public Rml SelectedRML + { + get { return _selectedRML; } + set + { + _selectedRML = value; + InvalidateLiquidFactorsAndProcessTables(); + RaisePropertyChangedAuto(); + } + } + + private List _liquidTypesRmls; + /// + /// Gets or sets the liquid types RMLS. + /// + public List LiquidTypesRmls + { + get { return _liquidTypesRmls; } + set { _liquidTypesRmls = value; RaisePropertyChangedAuto(); } + } + + private ObservableCollection _liquidVolumes; + + public ObservableCollection LiquidVolumes + { + get { return _liquidVolumes; } + set { _liquidVolumes = value; RaisePropertyChangedAuto(); } + } + + private ObservableCollection _liquidsCalibrationData; + + public ObservableCollection LiquidsCalibrationData + { + get { return _liquidsCalibrationData; } + set { _liquidsCalibrationData = value; RaisePropertyChangedAuto(); } + } + + #endregion + + public MainViewVM() : base() + { + _dbContext = ObservablesContext.CreateDefault(); + + Machines = _dbContext.Machines.ToObservableCollection(); + ColorSpaces = _dbContext.ColorSpaces.ToObservableCollection(); + Rmls = _dbContext.Rmls.ToObservableCollection(); + } + + #region RML + + private void InvalidateLiquidFactorsAndProcessTables() + { + if (SelectedRML != null && SelectedMachine != null) + { + LiquidTypesRmls = SelectedMachine.Configuration.IdsPacks.OrderBy(x => x.PackIndex).Select(x => x.LiquidType).SelectMany(x => x.LiquidTypesRmls).Where(x => x.Rml.Guid == SelectedRML.Guid).ToList(); + //RmlProcessParametersTableGroup = SelectedRML.ProcessParametersTablesGroups.ToList().SingleOrDefault(x => x.Active); + LiquidVolumes = SelectedMachine.Configuration.IdsPacks.OrderBy(x => x.PackIndex).Select(x => new LiquidVolumeVM() { Color = x.LiquidType.Color, Name = x.LiquidType.Name }).ToObservableCollection(); + + LiquidsCalibrationData = new ObservableCollection(); + + foreach (var liquidType in SelectedMachine.Configuration.IdsPacks.OrderBy(x => x.PackIndex).Select(x => x.LiquidType)) + { + CalibrationDataVM vm = new CalibrationDataVM(); + vm.Name = liquidType.Name; + vm.Color = liquidType.Color; + + var cat = liquidType.Cats.FirstOrDefault(x => x.Machine == SelectedMachine); + + if (cat != null) + { + var calData = cat.GetCalibrationData(); + vm.CalibrationPoints = calData.CalibrationPoints.Select(x => new CalibrationDataPointVM(x.X, x.Y)).ToObservableCollection(); + } + + LiquidsCalibrationData.Add(vm); + } + } + } + + #endregion + + #region Override Methods + + protected override void RaisePropertyChangedAuto([CallerMemberName] string caller = null) + { + base.RaisePropertyChangedAuto(caller); + InvalidateRelayCommands(); + } + + #endregion + } +} diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorLab/Views/MainView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorLab/Views/MainView.xaml index a2bb7f1f2..92ef15231 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorLab/Views/MainView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorLab/Views/MainView.xaml @@ -3,10 +3,379 @@ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" + xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes" + xmlns:shapes="clr-namespace:Tango.SharedUI.Shapes;assembly=Tango.SharedUI" + xmlns:observables="clr-namespace:Tango.BL.Entities;assembly=Tango.BL" + xmlns:mahapps="http://metro.mahapps.com/winfx/xaml/controls" + xmlns:controls="clr-namespace:Tango.SharedUI.Controls;assembly=Tango.SharedUI" + xmlns:converters="clr-namespace:Tango.SharedUI.Converters;assembly=Tango.SharedUI" + xmlns:vm="clr-namespace:Tango.MachineStudio.ColorLab.ViewModels" + xmlns:brushPicker="clr-namespace:Tango.BrushPicker;assembly=Tango.BrushPicker" + xmlns:designer="clr-namespace:Tango.MachineStudio.MachineDesigner.Views;assembly=Tango.MachineStudio.MachineDesigner" + xmlns:global="clr-namespace:Tango.MachineStudio.ColorLab" xmlns:local="clr-namespace:Tango.MachineStudio.ColorLab.Views" mc:Ignorable="d" - d:DesignHeight="300" d:DesignWidth="300"> + d:DesignHeight="1080" d:DesignWidth="1920" Background="Transparent" d:DataContext="{d:DesignInstance Type=vm:MainViewVM, IsDesignTimeCreatable=False}" DataContext="{x:Static global:ViewModelLocator.MainViewVM}"> + + + + + + + - + + + + + + + + TARGET MACHINE + + + + + + + + + + + + + MEDIA + + + + + + + + + + + + + LIQUID FACTORS + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + COLOR ADJUSTMENT DATA + + + + + + + + Inverse Data + + + + + + + + + + + + Forward Data + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + SOURCE / INVERSE RGB + SUGGESTIONS + LIQUID VOLUMES + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + COMPOSITE + + + + + + + + + + R + + + + + + + + + + + + G + + + + + + + + + + + B + + + + + + + + + + + + + + + + + + + + CALIBRATION DATA + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorLab/app.config b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorLab/app.config new file mode 100644 index 000000000..4a6cb0526 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorLab/app.config @@ -0,0 +1,21 @@ + + + + +
+ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorLab/packages.config b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorLab/packages.config new file mode 100644 index 000000000..8cd12859b --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ColorLab/packages.config @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/Software/Visual_Studio/Tango.BL/Entities/Cat.cs b/Software/Visual_Studio/Tango.BL/Entities/Cat.cs index 69b1cab18..8af866549 100644 --- a/Software/Visual_Studio/Tango.BL/Entities/Cat.cs +++ b/Software/Visual_Studio/Tango.BL/Entities/Cat.cs @@ -34,23 +34,23 @@ namespace Tango.BL.Entities } - protected String _liquidtypeguid; + protected String _machineguid; /// - /// Gets or sets the cat liquid type guid. + /// Gets or sets the cat machine guid. /// - [Column("LIQUID_TYPE_GUID")] - [ForeignKey("LiquidType")] + [Column("MACHINE_GUID")] + [ForeignKey("Machine")] - public String LiquidTypeGuid + public String MachineGuid { get { - return _liquidtypeguid; + return _machineguid; } set { - _liquidtypeguid = value; RaisePropertyChanged(nameof(LiquidTypeGuid)); + _machineguid = value; RaisePropertyChanged(nameof(MachineGuid)); } } @@ -76,6 +76,27 @@ namespace Tango.BL.Entities } + protected String _liquidtypeguid; + /// + /// Gets or sets the cat liquid type guid. + /// + [Column("LIQUID_TYPE_GUID")] + [ForeignKey("LiquidType")] + + public String LiquidTypeGuid + { + get + { + return _liquidtypeguid; + } + + set + { + _liquidtypeguid = value; RaisePropertyChanged(nameof(LiquidTypeGuid)); + } + + } + protected Byte[] _data; /// /// Gets or sets the cat data. @@ -117,6 +138,27 @@ namespace Tango.BL.Entities } + protected Machine _machine; + /// + /// Gets or sets the cat machine. + /// + + [XmlIgnore] + [JsonIgnore] + public virtual Machine Machine + { + get + { + return _machine; + } + + set + { + _machine = value; RaisePropertyChanged(nameof(Machine)); + } + + } + protected Rml _rml; /// /// Gets or sets the cat rml. diff --git a/Software/Visual_Studio/Tango.BL/Entities/Machine.cs b/Software/Visual_Studio/Tango.BL/Entities/Machine.cs index a704f47f0..f92d7bcdd 100644 --- a/Software/Visual_Studio/Tango.BL/Entities/Machine.cs +++ b/Software/Visual_Studio/Tango.BL/Entities/Machine.cs @@ -137,6 +137,25 @@ namespace Tango.BL.Entities } + protected ObservableCollection _cats; + /// + /// Gets or sets the machine cats. + /// + + public virtual ObservableCollection Cats + { + get + { + return _cats; + } + + set + { + _cats = value; RaisePropertyChanged(nameof(Cats)); + } + + } + protected Configuration _configuration; /// /// Gets or sets the machine configuration. @@ -263,6 +282,8 @@ namespace Tango.BL.Entities public Machine() : base() { + Cats = new ObservableCollection(); + Jobs = new ObservableCollection(); MachinesConfigurations = new ObservableCollection(); diff --git a/Software/Visual_Studio/Tango.BL/ObservablesContext.cs b/Software/Visual_Studio/Tango.BL/ObservablesContext.cs index f265657ec..aa64cebcb 100644 --- a/Software/Visual_Studio/Tango.BL/ObservablesContext.cs +++ b/Software/Visual_Studio/Tango.BL/ObservablesContext.cs @@ -11,6 +11,7 @@ namespace Tango.BL { public partial class ObservablesContext : DbContext { + /// /// Gets or sets the ActionTypes. /// diff --git a/Software/Visual_Studio/Tango.BrushPicker/Implementation/BrushPicker.cs b/Software/Visual_Studio/Tango.BrushPicker/Implementation/BrushPicker.cs index b94db6298..5c834dcdf 100644 --- a/Software/Visual_Studio/Tango.BrushPicker/Implementation/BrushPicker.cs +++ b/Software/Visual_Studio/Tango.BrushPicker/Implementation/BrushPicker.cs @@ -63,7 +63,7 @@ namespace Tango.BrushPicker this.CommandBindings.Add(new CommandBinding(BrushPicker.RemoveGradientStop, RemoveGradientStop_Executed)); this.CommandBindings.Add(new CommandBinding(BrushPicker.ReverseGradientStop, ReverseGradientStop_Executed)); - BrushType = BrushTypes.Linear; + BrushType = BrushTypes.Solid; } void CurrentColorTextBox_PreviewKeyDown(object sender, KeyEventArgs e) @@ -395,11 +395,24 @@ namespace Tango.BrushPicker c.SetBrush(); } } - + #endregion #region Public Properties + + + public Visibility BrushTypeVisibility + { + get { return (Visibility)GetValue(BrushTypeVisibilityProperty); } + set { SetValue(BrushTypeVisibilityProperty, value); } + } + public static readonly DependencyProperty BrushTypeVisibilityProperty = + DependencyProperty.Register("BrushTypeVisibility", typeof(Visibility), typeof(BrushPicker), new PropertyMetadata(Visibility.Visible)); + + + + public IEnumerable SpreadMethodTypes { get diff --git a/Software/Visual_Studio/Tango.BrushPicker/Themes/Generic.xaml b/Software/Visual_Studio/Tango.BrushPicker/Themes/Generic.xaml index 5a5d7e843..5b1bcbbc3 100644 --- a/Software/Visual_Studio/Tango.BrushPicker/Themes/Generic.xaml +++ b/Software/Visual_Studio/Tango.BrushPicker/Themes/Generic.xaml @@ -8,7 +8,7 @@ License (Ms-PL) as published at http://colorbox.codeplex.com/license *********************************************************************************** --> - + @@ -40,7 +40,7 @@ - + - + + - + - + - - - - + + @@ -263,62 +270,54 @@ - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + - - - - - - - - + + + + + + + + + - - + - - - - - - - - - - - - - + - - - - - + + + @@ -356,7 +354,7 @@ - @@ -378,8 +376,8 @@ - - + +