diff options
| author | Roy Ben Shabat <Roy.mail.net@gmail.com> | 2022-03-20 18:07:42 +0200 |
|---|---|---|
| committer | Roy Ben Shabat <Roy.mail.net@gmail.com> | 2022-03-20 18:07:42 +0200 |
| commit | 74c9b53220accf04d9b48eea5ebc5f4d7dc65e23 (patch) | |
| tree | 59b98486a1bfd3a3538c87f155b4acd05f8d9c6a /Software/Visual_Studio | |
| parent | ed26561515291b660b03dadf484d5ef615bc3774 (diff) | |
| parent | 4439a039bdaf8e59e0f450e2e4fbbd52b50261fd (diff) | |
| download | Tango-74c9b53220accf04d9b48eea5ebc5f4d7dc65e23.tar.gz Tango-74c9b53220accf04d9b48eea5ebc5f4d7dc65e23.zip | |
Merged Yana_Thread_Extensions_3
Diffstat (limited to 'Software/Visual_Studio')
85 files changed, 7899 insertions, 84 deletions
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Models/CalibrationPlotModel.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Models/CalibrationPlotModel.cs new file mode 100644 index 000000000..49ca76d14 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Models/CalibrationPlotModel.cs @@ -0,0 +1,205 @@ +using OxyPlot; +using OxyPlot.Wpf; +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.Linq; +using Tango.BL.Entities; +using Tango.BL.Enumerations; +using Tango.Core; + +namespace Tango.MachineStudio.ThreadExtensions.Models +{ + + public class CalibrationPlotModel : ExtendedObject + { + #region Properties + + public Plot DataPlotControl { get; set; } + public Plot LinearizationPlotControl { get; set; } + + private string _title; + + public string Title + { + get { return _title; } + set { _title = value; RaisePropertyChangedAuto(); } + } + + private FactorColors _color; + + private IList<DataPoint> _LPoints; + + public IList<DataPoint> LPoints + { + get { return _LPoints; } + set { _LPoints = value; } + } + + private IList<DataPoint> _APoints; + + public IList<DataPoint> APoints + { + get { return _APoints; } + set { _APoints = value; } + } + + private IList<DataPoint> _BPoints; + + public IList<DataPoint> BPoints + { + get { return _BPoints; } + set { _BPoints = value; } + } + + private IList<DataPoint> _points; + /// <summary> + /// Binding to ItemsSource of line chart. + /// </summary> + public IList<DataPoint> LinearizationPoints + { + get { return _points; } + set + { + _points = value; + RaisePropertyChangedAuto(); + } + } + + private int _step; + public int XStep + { + get { return _step; } + set { _step = value; RaisePropertyChangedAuto(); } + } + + private double _minY; + /// <summary> + /// From use to binding to left axis min value + /// </summary> + public double MinY + { + get { return _minY; } + set + { + _minY = value; RaisePropertyChangedAuto(); + } + } + + private double _maxY; + /// <summary> + /// To use to binding to left axis max value + /// </summary> + public double MaxY + { + get { return _maxY; } + set + { + _maxY = value; RaisePropertyChangedAuto(); + } + } + private int _maxX; + /// <summary> + /// Gets or sets the maximum lab plot X values for LinearizationGraph left part + /// </summary> + public int MaxX + { + get { return _maxX; } + set + { + _maxX = value; + RaisePropertyChangedAuto(); + } + } + + private double _linearizationMaxX; + + public double LinearizationMaxX + { + get { return _linearizationMaxX; } + set + { + _linearizationMaxX = value; + RaisePropertyChangedAuto(); + } + } + + private double _linearizationMaxY; + + public double LinearizationMaxY + { + get { return _linearizationMaxY; } + set + { + _linearizationMaxY = value; + RaisePropertyChangedAuto(); + } + } + #endregion + + public CalibrationPlotModel(FactorColors color, string title) + { + LinearizationPoints = new List<DataPoint>(); + LPoints = new List<DataPoint>(); + APoints = new List<DataPoint>(); + BPoints = new List<DataPoint>(); + _color = color; + _title = title; + + } + public void ClearResults() + { + LPoints.Clear(); + APoints.Clear(); + BPoints.Clear(); + LinearizationPoints.Clear(); + } + + public void InitDataGraph(List<ColorLinearizationModel.LinearizationDataItem> items) + { + if (items == null || items.Count == 0) + return; + + ClearResults(); + if (DataPlotControl != null) + DataPlotControl.InvalidatePlot(true); + if (LinearizationPlotControl != null) + LinearizationPlotControl.InvalidatePlot(true); + + foreach (var labItem in items) + { + LPoints.Add(new DataPoint(labItem.InkPercentage, labItem.L)); + APoints.Add(new DataPoint(labItem.InkPercentage, labItem.A)); + BPoints.Add(new DataPoint(labItem.InkPercentage, labItem.B)); + } + int maxValue = (int)(items.Max(x => x.InkPercentage)); + MaxX = Math.Max(100, maxValue); + + MinY = Math.Min(0, items.Min(x => Math.Min(x.L, Math.Min(x.A, x.B)))); + MaxY = Math.Max( 100, items.Max(x => Math.Max(x.L, Math.Max(x.A, x.B)))); + + if (DataPlotControl != null) + DataPlotControl.InvalidatePlot(true); + } + + public void InitLinearizationGraph(List<ColorLinearizationModel.LinearizationDataItem> items, List<double> outputPoints) + { + if (outputPoints == null) + return; + + LinearizationPoints.Clear(); + foreach (var nw in items.Zip(outputPoints, Tuple.Create)) + { + LinearizationPoints.Add(new DataPoint(nw.Item1.InkPercentage, nw.Item2)); + } + + LinearizationMaxX = Math.Max(100, LinearizationPoints.Count > 0? LinearizationPoints.Max(x => x.X) : 0); + LinearizationMaxY = Math.Max(100, LinearizationPoints.Count > 0 ? LinearizationPoints.Max(x => x.Y) : 0); + + if (LinearizationPlotControl != null) + { + LinearizationPlotControl.InvalidatePlot(true); + } + } + } +} diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Models/ColorLinearizationModel.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Models/ColorLinearizationModel.cs new file mode 100644 index 000000000..148f0f416 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Models/ColorLinearizationModel.cs @@ -0,0 +1,42 @@ +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Tango.Documents; + +namespace Tango.MachineStudio.ThreadExtensions.Models +{ + public class ColorLinearizationModel + { + public class LinearizationDataItem + { + public double InkPercentage { get; set; } + public double L { get; set; } + public double A { get; set; } + public double B { get; set; } + } + + public ColorLinearizationModel() + { + + } + + public void GetDataFromFile(string fileName, out List<LinearizationDataItem> items, ref string errors) + { + items = null; + try + { + using (ExcelReader reader = new ExcelReader(fileName)) + { + items = reader.GetDataByIndex<LinearizationDataItem>("Sheet1", 2); + } + } + catch (Exception ex) + { + errors = ex.Message; + } + } + } +} diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Models/ColorShadesModel.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Models/ColorShadesModel.cs new file mode 100644 index 000000000..98d4afe07 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Models/ColorShadesModel.cs @@ -0,0 +1,46 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Tango.Documents; + +namespace Tango.MachineStudio.ThreadExtensions.Models +{ + public class ColorShadesModel + { + public class ColorShadesDataItem + { + public int ColorNumber { get; set; } + public double L { get; set; } + public double A { get; set; } + public double B { get; set; } + public double C { get; set; } + public double M { get; set; } + public double Y { get; set; } + public double K { get; set; } + public double TI { get; set; } + public double L2 { get; set; } + public double A2 { get; set; } + public double B2 { get; set; } + public double DelteE { get; set; } + + } + + public void GetDataFromFile(string fileName, out List<ColorShadesDataItem> items, ref string errors) + { + items = null; + try + { + using (ExcelReader reader = new ExcelReader(fileName)) + { + items = reader.GetDataByIndex<ColorShadesDataItem>("Sheet1", 2); + } + } + catch (Exception ex) + { + errors = ex.Message; + } + } + } +} diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Models/MachineModel.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Models/MachineModel.cs index e41a6a220..c2b00fe92 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Models/MachineModel.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Models/MachineModel.cs @@ -3,6 +3,7 @@ using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; +using Tango.BL.Entities; using Tango.Core; namespace Tango.MachineStudio.ThreadExtensions.Models @@ -10,14 +11,14 @@ namespace Tango.MachineStudio.ThreadExtensions.Models public class MachineModel : ExtendedObject { public String Guid { get; set; } - + public string Name { get; set; } protected String _serialnumber; - + public String SerialNumber { - get{ return _serialnumber; } + get { return _serialnumber; } set { _serialnumber = value; @@ -35,6 +36,16 @@ namespace Tango.MachineStudio.ThreadExtensions.Models } } + protected IEnumerable<IdsPack> _idspacks; + public IEnumerable<IdsPack> IdsPacks + { + get { return _idspacks; } + set + { + _idspacks = value; + } + } + public MachineModel() { HasRMLTest = false; diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Tango.MachineStudio.ThreadExtensions.csproj b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Tango.MachineStudio.ThreadExtensions.csproj index 9ea43ad0b..ae05ca02c 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Tango.MachineStudio.ThreadExtensions.csproj +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Tango.MachineStudio.ThreadExtensions.csproj @@ -53,6 +53,15 @@ <Reference Include="MaterialDesignThemes.Wpf, Version=2.3.1.953, Culture=neutral, processorArchitecture=MSIL"> <HintPath>..\..\..\packages\MaterialDesignThemes.2.3.1.953\lib\net45\MaterialDesignThemes.Wpf.dll</HintPath> </Reference> + <Reference Include="Microsoft.WindowsAPICodePack, Version=1.1.0.0, Culture=neutral, processorArchitecture=MSIL"> + <HintPath>..\..\..\packages\Microsoft.WindowsAPICodePack-Core.1.1.0.0\lib\Microsoft.WindowsAPICodePack.dll</HintPath> + </Reference> + <Reference Include="Microsoft.WindowsAPICodePack.Shell, Version=1.1.0.0, Culture=neutral, processorArchitecture=MSIL"> + <HintPath>..\..\..\packages\Microsoft.WindowsAPICodePack-Shell.1.1.0.0\lib\Microsoft.WindowsAPICodePack.Shell.dll</HintPath> + </Reference> + <Reference Include="Microsoft.WindowsAPICodePack.ShellExtensions, Version=1.1.0.0, Culture=neutral, processorArchitecture=MSIL"> + <HintPath>..\..\..\packages\Microsoft.WindowsAPICodePack-Shell.1.1.0.0\lib\Microsoft.WindowsAPICodePack.ShellExtensions.dll</HintPath> + </Reference> <Reference Include="Newtonsoft.Json, Version=9.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL"> <HintPath>..\..\..\packages\Newtonsoft.Json.9.0.1\lib\net45\Newtonsoft.Json.dll</HintPath> </Reference> @@ -97,6 +106,9 @@ <Compile Include="Converters\NumericFieldConverter.cs" /> <Compile Include="Excel\ColorDataExcelModel.cs" /> <Compile Include="Excel\ColorParametrsExcelModel.cs" /> + <Compile Include="Models\CalibrationPlotModel.cs" /> + <Compile Include="Models\ColorLinearizationModel.cs" /> + <Compile Include="Models\ColorShadesModel.cs" /> <Compile Include="Models\FactorTarget.cs" /> <Compile Include="Models\MachineModel.cs" /> <Compile Include="Models\PlotProperties.cs" /> @@ -105,16 +117,27 @@ <Compile Include="Excel\ThreadCharacteristicsExelModel.cs" /> <Compile Include="ViewModelLocator.cs" /> <Compile Include="ViewModels\AddItemDialogVM.cs" /> + <Compile Include="ViewModels\CalibrationDataVM.cs" /> + <Compile Include="ViewModels\ColorCalibrationTabVM.cs" /> + <Compile Include="ViewModels\ColorCalibrationViewVM.cs" /> <Compile Include="ViewModels\ColorParametersVewVM.cs" /> + <Compile Include="ViewModels\ColorShadeTabVM.cs" /> <Compile Include="ViewModels\MainViewVM.cs" /> <Compile Include="ViewModels\TestResultsViewVM.cs" /> <Compile Include="ViewModels\TestResultViewVM.cs" /> <Compile Include="Views\AddItemDialog.xaml.cs"> <DependentUpon>AddItemDialog.xaml</DependentUpon> </Compile> + <Compile Include="Views\ColorCalibrationView.xaml.cs"> + <DependentUpon>ColorCalibrationView.xaml</DependentUpon> + </Compile> <Compile Include="Views\ColorParametersView.xaml.cs"> <DependentUpon>ColorParametersView.xaml</DependentUpon> </Compile> + <Compile Include="Views\ColorShadeView.xaml.cs"> + <DependentUpon>ColorShadeView.xaml</DependentUpon> + </Compile> + <Compile Include="ViewModels\ColorShadeViewVM.cs" /> <Compile Include="Views\ComboboxEditable.xaml.cs"> <DependentUpon>ComboboxEditable.xaml</DependentUpon> </Compile> @@ -145,10 +168,18 @@ <SubType>Designer</SubType> <Generator>MSBuild:Compile</Generator> </Page> + <Page Include="Views\ColorCalibrationView.xaml"> + <SubType>Designer</SubType> + <Generator>MSBuild:Compile</Generator> + </Page> <Page Include="Views\ColorParametersView.xaml"> <SubType>Designer</SubType> <Generator>MSBuild:Compile</Generator> </Page> + <Page Include="Views\ColorShadeView.xaml"> + <SubType>Designer</SubType> + <Generator>MSBuild:Compile</Generator> + </Page> <Page Include="Views\ComboboxEditable.xaml"> <SubType>Designer</SubType> <Generator>MSBuild:Compile</Generator> @@ -208,6 +239,10 @@ <Resource Include="Images\threads.png" /> </ItemGroup> <ItemGroup> + <ProjectReference Include="..\..\..\SideChains\ColorMine\ColorMine.csproj"> + <Project>{37E4CEAB-B54B-451F-B535-04CF7DA9C459}</Project> + <Name>ColorMine</Name> + </ProjectReference> <ProjectReference Include="..\..\..\SideChains\Tango.AutoComplete\Tango.AutoComplete.csproj"> <Project>{bb2abb74-ba58-4812-83aa-ec8171f42df4}</Project> <Name>Tango.AutoComplete</Name> @@ -216,6 +251,10 @@ <Project>{f441feee-322a-4943-b566-110e12fd3b72}</Project> <Name>Tango.BL</Name> </ProjectReference> + <ProjectReference Include="..\..\..\Tango.ColorCalibration\Tango.ColorCalibration.csproj"> + <Project>{b60c695c-61e8-4091-b506-4c45349c04aa}</Project> + <Name>Tango.ColorCalibration</Name> + </ProjectReference> <ProjectReference Include="..\..\..\Tango.Core\Tango.Core.csproj"> <Project>{a34ee0f0-649d-41c8-8489-b6f1cc6924ee}</Project> <Name>Tango.Core</Name> @@ -228,6 +267,10 @@ <Project>{bc932dbd-7cdb-488c-99e4-f02cf441f55e}</Project> <Name>Tango.Logging</Name> </ProjectReference> + <ProjectReference Include="..\..\..\Tango.PMR\Tango.PMR.csproj"> + <Project>{e4927038-348d-4295-aaf4-861c58cb3943}</Project> + <Name>Tango.PMR</Name> + </ProjectReference> <ProjectReference Include="..\..\..\Tango.Settings\Tango.Settings.csproj"> <Project>{d8f1ad85-526a-4f50-b6dc-d437af63d8d8}</Project> <Name>Tango.Settings</Name> diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/ViewModels/CalibrationDataVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/ViewModels/CalibrationDataVM.cs new file mode 100644 index 000000000..b8fab210c --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/ViewModels/CalibrationDataVM.cs @@ -0,0 +1,138 @@ +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Tango.BL.Entities; +using Tango.Core; +using Tango.PMR.ColorLab; + +namespace Tango.MachineStudio.ThreadExtensions.ViewModels +{ + public class CalibrationDataPointVM : ExtendedObject + { + 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; + } + + public CalibrationDataPointVM(CalibrationPoint calibrationPoint) : this(calibrationPoint.X, calibrationPoint.Y) + { + + } + + public CalibrationPoint ToPMR() + { + return new CalibrationPoint() + { + X = X, + Y = Y, + }; + } + } + + public class CalibrationDataVM : ExtendedObject + { + private BL.Entities.LiquidType _liquidType; + + public BL.Entities.LiquidType LiquidType + { + get { return _liquidType; } + set { _liquidType = value; RaisePropertyChangedAuto(); } + } + + private IdsPack _idsPack; + + public IdsPack IdsPack + { + get { return _idsPack; } + set { _idsPack = value; RaisePropertyChangedAuto(); } + } + + private ObservableCollection<CalibrationDataPointVM> _calibrationPoints; + + public ObservableCollection<CalibrationDataPointVM> 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++; + } + } + } + + private CalibrationDataVM() + { + CalibrationPoints = new ObservableCollection<CalibrationDataPointVM>(); + } + + public CalibrationDataVM(IdsPack pack) : this() + { + IdsPack = pack; + LiquidType = pack.LiquidType; + } + + public CalibrationDataVM(BL.Entities.LiquidType liquidType) : this() + { + LiquidType = liquidType; + CalibrationPoints = new ObservableCollection<CalibrationDataPointVM>(); + //CalibrationPoints.Add(new CalibrationDataPointVM() { Index = 1, X = 2, Y = 22 }); + } + } +}
\ No newline at end of file diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/ViewModels/ColorCalibrationTabVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/ViewModels/ColorCalibrationTabVM.cs new file mode 100644 index 000000000..a2a119e29 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/ViewModels/ColorCalibrationTabVM.cs @@ -0,0 +1,424 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Tango.SharedUI; +using Tango.MachineStudio.ThreadExtensions.Models; +using Tango.BL.Enumerations; +using Tango.Core.Commands; +using Microsoft.Win32; +using Tango.MachineStudio.Common.Notifications; +using Tango.PMR.ColorLab; +using Tango.ColorCalibration; +using Tango.BL.ActionLogs; +using Tango.BL.Entities; +using Tango.Core; + +namespace Tango.MachineStudio.ThreadExtensions.ViewModels +{ + public class ColorCalibrationTabVM : ViewModel + { + private INotificationProvider _notification; + private IActionLogManager _actionLogManager; + private ILinearizationMeasurements _linearizationMeasurementscalibrator; + private List<BL.Entities.LiquidType> _liquids; + + #region Properties + + private string _name; + /// <summary> + /// Gets or sets the name of the thread. Using in print + /// </summary> + public string Name + { + get { return _name; } + set + { + _name = value; + if(RmlExtensionColorCalibrationsTest != null) + RmlExtensionColorCalibrationsTest.Name = _name; + RaisePropertyChangedAuto(); + } + } + + private int _tabIndex; + + public int TabIndex + { + get { return _tabIndex; } + set { _tabIndex = value; + RaisePropertyChangedAuto(); + } + } + + + private bool _isSelected; + /// <summary> + /// Gets or sets a value indicating whether this instance is selected. + /// </summary> + public bool IsSelected + { + get { return _isSelected; } + set { _isSelected = value; RaisePropertyChangedAuto(); } + } + + public CalibrationPlotModel CyanPlot { get; set; } + + public CalibrationPlotModel MagentaPlot { get; set; } + + public CalibrationPlotModel YellowPlot { get; set; } + + public CalibrationPlotModel BlackPlot { get; set; } + + public CalibrationDataVM CyanCalibrationData { get; set; } + + public CalibrationDataVM MagentaCalibrationData { get; set; } + + public CalibrationDataVM YellowCalibrationData { get; set; } + + public CalibrationDataVM BlackCalibrationData { get; set; } + + private RmlExtensionColorCalibrationsTest _rmlExtensionColorCalibrationsTest; + + public RmlExtensionColorCalibrationsTest RmlExtensionColorCalibrationsTest + { + get { return _rmlExtensionColorCalibrationsTest; } + set { _rmlExtensionColorCalibrationsTest = value; + OnRmlExtensionColorCalibrationsTestChanged(); + } + } + + /// <summary> + /// Gets or sets last points before save. Used in Save to remove points before save new. + /// </summary> + /// <value> + /// The removed points. + /// </value> + public Dictionary<LiquidTypes, List<RmlExtensionColorCalibrationsTestsLiquidDataPoint>> RemovedPoints { get; set; } + + public bool IsTabLoaded { get; set; } + + + #endregion + + #region Commands + + public RelayCommand ImportCyanDataCommand { get; set; } + public RelayCommand ImportMagentaDataCommand { get; set; } + public RelayCommand ImportYellowDataCommand { get; set; } + public RelayCommand ImportBlackDataCommand { get; set; } + + #endregion + + public ColorCalibrationTabVM(INotificationProvider notification, IActionLogManager actionLogManager, List<BL.Entities.LiquidType> liquids) + { + _notification = notification; + _actionLogManager = actionLogManager; + _linearizationMeasurementscalibrator = new DefaultColorCalibrator(); + _liquids = liquids; + RemovedPoints = new Dictionary<LiquidTypes, List<RmlExtensionColorCalibrationsTestsLiquidDataPoint>>(); + IsTabLoaded = false; + + CyanPlot = new CalibrationPlotModel(FactorColors.CYAN, "Cyan"); + YellowPlot = new CalibrationPlotModel(FactorColors.YELLOW, "Yellow"); + MagentaPlot = new CalibrationPlotModel(FactorColors.MAGENTA, "Magenta"); + BlackPlot = new CalibrationPlotModel(FactorColors.BLACK, "Black"); + + CyanCalibrationData = new CalibrationDataVM(new Tango.BL.Entities.LiquidType() { Code = (int)LiquidTypes.Cyan }); + MagentaCalibrationData = new CalibrationDataVM(new Tango.BL.Entities.LiquidType() { Code = (int)LiquidTypes.Magenta }); + YellowCalibrationData = new CalibrationDataVM(new Tango.BL.Entities.LiquidType() { Code = (int)LiquidTypes.Yellow }); + BlackCalibrationData = new CalibrationDataVM(new Tango.BL.Entities.LiquidType() { Code = (int)LiquidTypes.Black }); + + ImportCyanDataCommand = new RelayCommand(ImportCyanData); + ImportMagentaDataCommand = new RelayCommand(ImportMagentaData); + ImportYellowDataCommand = new RelayCommand(ImportYellowData); + ImportBlackDataCommand = new RelayCommand(ImportBlackData); + + } + + #region Methods + private async void ImportCyanData(object obj) + { + List<ColorLinearizationModel.LinearizationDataItem> items; + if (ImportDataFromFile(out items) && items.Count > 0) + { + List<double> calibrationPoints = new List<double>(); + await Task.Factory.StartNew(() => + { + calibrationPoints = GetLinearizationMeasurements(items, PMR.ColorLab.LiquidType.Cyan); + }); + UpdatePlots(CyanPlot, items, calibrationPoints); + + CyanCalibrationData.CalibrationPoints.Clear(); + var index = 1; + foreach (var nw in items.Zip(calibrationPoints, Tuple.Create)) + { + CyanCalibrationData.CalibrationPoints.Add(new CalibrationDataPointVM() { Index = index++, X = nw.Item1.InkPercentage, Y = nw.Item2 }); + } + + SynchronizedObservableCollection<RmlExtensionColorCalibrationsTestsLiquidData> data = RmlExtensionColorCalibrationsTest.RmlExtensionColorCalibrationsTestsLiquidData; + var liquidtype = _liquids.Where(l => l.Type == LiquidTypes.Cyan).FirstOrDefault(); + var cyanliquidData = RmlExtensionColorCalibrationsTest.RmlExtensionColorCalibrationsTestsLiquidData.Where(x => x.LiquidTypeGuid == liquidtype.Guid).FirstOrDefault(); + if (cyanliquidData != null) + { + if (!RemovedPoints.ContainsKey(LiquidTypes.Cyan)) + { + RemovedPoints[LiquidTypes.Cyan] = new List<RmlExtensionColorCalibrationsTestsLiquidDataPoint>(cyanliquidData.RmlExtensionColorCalibrationsTestsLiquidDataPoints.ToList()); + } + cyanliquidData.RmlExtensionColorCalibrationsTestsLiquidDataPoints.Clear(); + items.ForEach(x => cyanliquidData.RmlExtensionColorCalibrationsTestsLiquidDataPoints.Add(new RmlExtensionColorCalibrationsTestsLiquidDataPoint() { Ink = x.InkPercentage, L = x.L, A = x.A, B = x.B, CalculatedPoint = CyanCalibrationData.CalibrationPoints.Where(y => y.X == x.InkPercentage).Select(z => z.Y).FirstOrDefault() })); + } + } + + } + + private async void ImportMagentaData(object obj) + { + List<ColorLinearizationModel.LinearizationDataItem> items; + if (ImportDataFromFile(out items) && items.Count > 0) + { + List<double> calibrationPoints = new List<double>(); + await Task.Factory.StartNew(() => + { + calibrationPoints = GetLinearizationMeasurements(items, PMR.ColorLab.LiquidType.Magenta); + }); + UpdatePlots(MagentaPlot, items, calibrationPoints); + + MagentaCalibrationData.CalibrationPoints.Clear(); + var index = 1; + foreach (var nw in items.Zip(calibrationPoints, Tuple.Create)) + { + MagentaCalibrationData.CalibrationPoints.Add(new CalibrationDataPointVM() { Index = index++, X = nw.Item1.InkPercentage, Y = nw.Item2 }); + } + + SynchronizedObservableCollection<RmlExtensionColorCalibrationsTestsLiquidData> data = RmlExtensionColorCalibrationsTest.RmlExtensionColorCalibrationsTestsLiquidData; + var liquidtype = _liquids.Where(l => l.Type == LiquidTypes.Magenta).FirstOrDefault(); + var magentaliquidData = RmlExtensionColorCalibrationsTest.RmlExtensionColorCalibrationsTestsLiquidData.Where(x => x.LiquidTypeGuid == liquidtype.Guid).FirstOrDefault(); + if (magentaliquidData != null) + { + if (!RemovedPoints.ContainsKey(LiquidTypes.Magenta)) + { + RemovedPoints[LiquidTypes.Magenta] = new List<RmlExtensionColorCalibrationsTestsLiquidDataPoint>(magentaliquidData.RmlExtensionColorCalibrationsTestsLiquidDataPoints.ToList()); + } + magentaliquidData.RmlExtensionColorCalibrationsTestsLiquidDataPoints.Clear(); + items.ForEach(x => magentaliquidData.RmlExtensionColorCalibrationsTestsLiquidDataPoints.Add(new RmlExtensionColorCalibrationsTestsLiquidDataPoint() { Ink = x.InkPercentage, L = x.L, A = x.A, B = x.B, CalculatedPoint = MagentaCalibrationData.CalibrationPoints.Where(y => y.X == x.InkPercentage).Select(z => z.Y).FirstOrDefault() })); + } + } + } + + private async void ImportYellowData(object obj) + { + List<ColorLinearizationModel.LinearizationDataItem> items; + if (ImportDataFromFile(out items) && items.Count > 0) + { + List<double> calibrationPoints = new List<double>(); + await Task.Factory.StartNew(() => + { + calibrationPoints = GetLinearizationMeasurements(items, PMR.ColorLab.LiquidType.Yellow); + }); + UpdatePlots(YellowPlot, items, calibrationPoints); + + YellowCalibrationData.CalibrationPoints.Clear(); + var index = 1; + foreach (var nw in items.Zip(calibrationPoints, Tuple.Create)) + { + YellowCalibrationData.CalibrationPoints.Add(new CalibrationDataPointVM() { Index = index++, X = nw.Item1.InkPercentage, Y = nw.Item2 }); + } + + SynchronizedObservableCollection<RmlExtensionColorCalibrationsTestsLiquidData> data = RmlExtensionColorCalibrationsTest.RmlExtensionColorCalibrationsTestsLiquidData; + var liquidtype = _liquids.Where(l => l.Type == LiquidTypes.Yellow).FirstOrDefault(); + var yellowliquidData = RmlExtensionColorCalibrationsTest.RmlExtensionColorCalibrationsTestsLiquidData.Where(x => x.LiquidTypeGuid == liquidtype.Guid).FirstOrDefault(); + if (yellowliquidData != null) + { + if (!RemovedPoints.ContainsKey(LiquidTypes.Yellow)) + { + RemovedPoints[LiquidTypes.Yellow] = new List<RmlExtensionColorCalibrationsTestsLiquidDataPoint>(yellowliquidData.RmlExtensionColorCalibrationsTestsLiquidDataPoints.ToList()); + } + yellowliquidData.RmlExtensionColorCalibrationsTestsLiquidDataPoints.Clear(); + items.ForEach(x => yellowliquidData.RmlExtensionColorCalibrationsTestsLiquidDataPoints.Add(new RmlExtensionColorCalibrationsTestsLiquidDataPoint() { Ink = x.InkPercentage, L = x.L, A = x.A, B = x.B, CalculatedPoint = YellowCalibrationData.CalibrationPoints.Where(y => y.X == x.InkPercentage).Select(z => z.Y).FirstOrDefault() })); + } + } + } + + private async void ImportBlackData(object obj) + { + List<ColorLinearizationModel.LinearizationDataItem> items; + if (ImportDataFromFile(out items) && items.Count > 0) + { + List<double> calibrationPoints = new List<double>(); + await Task.Factory.StartNew(() => + { + calibrationPoints = GetLinearizationMeasurements(items, PMR.ColorLab.LiquidType.Black); + }); + UpdatePlots(BlackPlot, items, calibrationPoints); + + BlackCalibrationData.CalibrationPoints.Clear(); + var index = 1; + foreach (var nw in items.Zip(calibrationPoints, Tuple.Create)) + { + BlackCalibrationData.CalibrationPoints.Add(new CalibrationDataPointVM() { Index = index++, X = nw.Item1.InkPercentage, Y = nw.Item2 }); + } + + SynchronizedObservableCollection<RmlExtensionColorCalibrationsTestsLiquidData> data = RmlExtensionColorCalibrationsTest.RmlExtensionColorCalibrationsTestsLiquidData; + var liquidtype = _liquids.Where(l => l.Type == LiquidTypes.Black).FirstOrDefault(); + var blackliquidData = RmlExtensionColorCalibrationsTest.RmlExtensionColorCalibrationsTestsLiquidData.Where(x => x.LiquidTypeGuid == liquidtype.Guid).FirstOrDefault(); + if (blackliquidData != null) + { + if (!RemovedPoints.ContainsKey(LiquidTypes.Black)) + { + RemovedPoints[LiquidTypes.Black] = new List<RmlExtensionColorCalibrationsTestsLiquidDataPoint>(blackliquidData.RmlExtensionColorCalibrationsTestsLiquidDataPoints.ToList()); + } + blackliquidData.RmlExtensionColorCalibrationsTestsLiquidDataPoints.Clear(); + items.ForEach(x => blackliquidData.RmlExtensionColorCalibrationsTestsLiquidDataPoints.Add(new RmlExtensionColorCalibrationsTestsLiquidDataPoint() { Ink = x.InkPercentage, L = x.L, A = x.A, B = x.B, CalculatedPoint = BlackCalibrationData.CalibrationPoints.Where(y => y.X == x.InkPercentage).Select(z => z.Y).FirstOrDefault() })); + } + } + + } + + /// <summary> + /// Open file dialog and get name of file + /// </summary> + /// <returns></returns> + private bool ImportDataFromFile(out List<ColorLinearizationModel.LinearizationDataItem> items) + { + OpenFileDialog dlg = new OpenFileDialog(); + dlg.Title = "Select data file"; + dlg.Filter = "Excel |*.xlsx"; + items = null; + if (dlg.ShowDialogCenter() && dlg.FileName.IsNotNullOrEmpty()) + { + ColorLinearizationModel model = new ColorLinearizationModel(); + string errors = ""; + model.GetDataFromFile(dlg.FileName, out items, ref errors); + if (false == String.IsNullOrEmpty(errors) || items == null || items.Count == 0) + { + _notification.ShowError("An error occurred while trying to import data form the selected excel file. Please check the file format if valid and is available to read."); + return false; + } + return true; + } + + return false; + } + + public void InitData() + { + if(RmlExtensionColorCalibrationsTest != null) + { + SynchronizedObservableCollection<RmlExtensionColorCalibrationsTestsLiquidData> data = RmlExtensionColorCalibrationsTest.RmlExtensionColorCalibrationsTestsLiquidData; + foreach( var liquidData in data) + { + var liquidGUID = liquidData.LiquidTypeGuid; + var liquidType = _liquids.Where(l => l.Guid == liquidGUID).FirstOrDefault(); + + var points = liquidData.RmlExtensionColorCalibrationsTestsLiquidDataPoints.OrderBy(y => y.Ink).ToList(); + LoadDataPlots(points, GetPlot(liquidType), GetCalibrationDataVM(liquidType)); + } + } + } + + private CalibrationPlotModel GetPlot(BL.Entities.LiquidType liquidType) + { + switch(liquidType.Type) + { + case LiquidTypes.Cyan: + return CyanPlot; + case LiquidTypes.Magenta: + return MagentaPlot; + case LiquidTypes.Yellow: + return YellowPlot; + case LiquidTypes.Black: + return BlackPlot; + default: + return null; + } + } + private CalibrationDataVM GetCalibrationDataVM(BL.Entities.LiquidType liquidType) + { + switch (liquidType.Type) + { + case LiquidTypes.Cyan: + return CyanCalibrationData; + case LiquidTypes.Magenta: + return MagentaCalibrationData; + case LiquidTypes.Yellow: + return YellowCalibrationData; + case LiquidTypes.Black: + return BlackCalibrationData; + default: + return null; + } + } + private PMR.ColorLab.LiquidType ConvertLiquidTypeToPMR(BL.Entities.LiquidType liquidType) + { + if (liquidType.Type == LiquidTypes.Cyan) + return PMR.ColorLab.LiquidType.Cyan; + if (liquidType.Type == LiquidTypes.Yellow) + return PMR.ColorLab.LiquidType.Yellow; + if (liquidType.Type == LiquidTypes.Magenta) + return PMR.ColorLab.LiquidType.Magenta; + return PMR.ColorLab.LiquidType.Black; + } + + private void UpdatePlots( CalibrationPlotModel plot, List<ColorLinearizationModel.LinearizationDataItem> items, List<double> calibrationPoints) + { + plot.InitDataGraph(items); + plot.InitLinearizationGraph(items, calibrationPoints); + } + + private void LoadDataPlots( List<RmlExtensionColorCalibrationsTestsLiquidDataPoint> points, CalibrationPlotModel plot, CalibrationDataVM calibrationTable) + { + List<ColorLinearizationModel.LinearizationDataItem> items = new List<ColorLinearizationModel.LinearizationDataItem>(); + points.ForEach(x => items.Add(new ColorLinearizationModel.LinearizationDataItem() { InkPercentage = x.Ink, L = x.L, A = x.A, B = x.B })); + + List<double> calibrationPoints = new List<double>(); + + calibrationTable.CalibrationPoints.Clear(); + var index = 1; + points.ForEach(x => { + calibrationTable.CalibrationPoints.Add(new CalibrationDataPointVM() { Index = index++, X = x.Ink, Y = x.CalculatedPoint }); + calibrationPoints.Add(x.CalculatedPoint); + }); + UpdatePlots(plot, items, calibrationPoints); + } + + private void OnRmlExtensionColorCalibrationsTestChanged() + { + + } + #endregion + + #region CreateLinearizationGraph + + private List<double> GetLinearizationMeasurements(List<ColorLinearizationModel.LinearizationDataItem> items, PMR.ColorLab.LiquidType liquidType) + { + try + { + LinearizationInput linearizationInput = new LinearizationInput(); + items.ForEach(x => linearizationInput.Measurements.Add(new LinearizationMeasurement { L = x.L, A = x.A, B = x.B, InkPercentage = x.InkPercentage })); + linearizationInput.LiquidType = liquidType; + + LinearizationOutput result = _linearizationMeasurementscalibrator.GetLinearizationMeasurements(linearizationInput); + + if (!String.IsNullOrEmpty(result.ErrorMessage)) + { + LogManager.Log(result.ErrorMessage, "GetLinearizationMeasurements returns error." + result.ErrorMessage); + InvokeUI(() => + { + _notification.ShowError("Linearizion process failed. " + result.ErrorMessage); + }); + } + + return result.InkPercentage.ToList(); + } + catch (Exception ex) + { + LogManager.Log(ex, "Error occurred while trying to call GetLinearizationMeasurements."); + } + return null; + } + + #endregion + } +} diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/ViewModels/ColorCalibrationViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/ViewModels/ColorCalibrationViewVM.cs new file mode 100644 index 000000000..3f4d8a415 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/ViewModels/ColorCalibrationViewVM.cs @@ -0,0 +1,530 @@ + +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Collections.Specialized; +using System.ComponentModel; +using System.Linq; +using System.Threading.Tasks; +using Tango.BL; +using Tango.BL.ActionLogs; +using Tango.BL.Builders; +using Tango.BL.Entities; +using Tango.Core; +using Tango.MachineStudio.Common.Notifications; +using Tango.SharedUI; +using Tango.AutoComplete.Editors; +using Tango.MachineStudio.ThreadExtensions.Models; +using Tango.Core.Commands; +using Microsoft.Win32; +using Tango.Logging; +using Tango.BL.Enumerations; +using Tango.PMR.ColorLab; +using Tango.BL.Calibration; + + +namespace Tango.MachineStudio.ThreadExtensions.ViewModels +{ + public class ColorCalibrationViewVM : ViewModel + { + private INotificationProvider _notification; + private IActionLogManager _actionLogManager; + + private ObservablesContext _active_context; + private List<BL.Entities.LiquidType> _liquids; + + public event EventHandler SaveColorCalibration; + + + #region Properties + + private ObservableCollection<ColorCalibrationTabVM> _calibrationTabs; + + public ObservableCollection<ColorCalibrationTabVM> CalibrationTabs + { + get { return _calibrationTabs; } + set { _calibrationTabs = value; } + } + + private ColorCalibrationTabVM _selectedTab; + + public ColorCalibrationTabVM SelectedTab + { + get { return _selectedTab; } + set + { + _selectedTab = value; + RaisePropertyChangedAuto(); + + foreach (var tab in _calibrationTabs.Where(x => x != _selectedTab)) + { + tab.IsSelected = false; + } + + if (_selectedTab != null) + { + _selectedTab.IsSelected = true; + } + } + } + + private string _RMLExtentionGUID; + + public string RMLExtentionGUID + { + get { return _RMLExtentionGUID; } + set + { + _RMLExtentionGUID = value; + OnRMLExtensionGUIDChanged(); + } + } + + private string _RMLGUID; + + public string RMLGUID + { + get { return _RMLGUID; } + set + { + _RMLGUID = value; + OnRMLExtensionGUIDChanged(); + } + } + + private Rml _activeRML; + public Rml ActiveRML + { + get { return _activeRML; } + set + { + _activeRML = value; + RaisePropertyChangedAuto(); + } + } + + private MachineModel _machine; + public MachineModel Machine + { + get { return _machine; } + set { _machine = value; + SelectedMachineChanged(); + RaisePropertyChangedAuto(); + InvalidateRelayCommands(); + } + } + + + private bool _isViewLoaded; + /// <summary> + /// Gets or sets a value indicating whether this instance is view loaded. Used to update charts. + /// </summary> + public bool IsViewLoaded + { + get { return _isViewLoaded; } + set + { + if (_isViewLoaded != value) + { + _isViewLoaded = value; + } + } + } + + private RmlExtensionColorCalibration _rmlExtensionColorCalibration; + + public RmlExtensionColorCalibration RmlExtensionColorCalibration + { + get { return _rmlExtensionColorCalibration; } + set { _rmlExtensionColorCalibration = value; } + } + + //private ObservableCollection<RmlExtensionColorCalibrationsTest> _rmlExtensionColorCalibrationsTests; + + //public ObservableCollection<RmlExtensionColorCalibrationsTest> RmlExtensionColorCalibrationsTests + //{ + // get { return _rmlExtensionColorCalibrationsTests; } + // set { _rmlExtensionColorCalibrationsTests = value; } + //} + + + #endregion + + #region commands + public RelayCommand CreateColorDataImportExcelTemplateCommand { get; set; } + public RelayCommand ApplyToRMLCommand { get; set; } + public RelayCommand ApplyToMachineCalibrationCommand { get; set; } + + public RelayCommand SaveCommand { get; set; } + + public RelayCommand AddTabCommand { get; set; } + + public RelayCommand<ColorCalibrationTabVM> RemoveTabCommand { get; set; } + + public RelayCommand RenameTabCommand { get; set; } + + #endregion + + public ColorCalibrationViewVM(INotificationProvider notification, IActionLogManager actionLogManager) + { + _notification = notification; + _actionLogManager = actionLogManager; + CalibrationTabs = new ObservableCollection<ColorCalibrationTabVM>(); + + ApplyToRMLCommand = new RelayCommand(ApplyToRML); + ApplyToMachineCalibrationCommand = new RelayCommand(ApplyToMachineCalibration); + SaveCommand = new RelayCommand(Save, () => IsFree); + + AddTabCommand = new RelayCommand(() => AddNewTab()); + RemoveTabCommand = new RelayCommand<ColorCalibrationTabVM>(RemoveTab); + RenameTabCommand = new RelayCommand(RenameTab); + + CreateColorDataImportExcelTemplateCommand = new RelayCommand(CreateColorDataImportExcelTemplate); + } + + #region Methods + + private void OnRMLExtensionGUIDChanged() + { + } + + private void SelectedMachineChanged() + { + SelectedTab = null; + LoadColorCalibrations(); + } + + private void CreateColorDataImportExcelTemplate() + { + SaveFileDialog dlg = new SaveFileDialog(); + try + { + dlg.Title = $"Create excel template file"; + dlg.Filter = "Excel Files|*.xlsx"; + dlg.DefaultExt = ".xlsx"; + dlg.FileName = "Color Data File Template"; + if (dlg.ShowDialog().Value) + { + CalibrationHelper.CreateColorDataInputExcelTemplate(dlg.FileName); + } + } + catch (Exception ex) + { + LogManager.Log(ex, "Error generating excel calibration template file " + dlg.FileName); + _notification.ShowError("An error occurred while trying to generate the calibration file."); + } + } + /// <summary> + /// Applies calibration points to RML. + /// </summary> + private void ApplyToRML(object obj) + { + if(SelectedTab != null && ActiveRML != null) + { + var liquidTypesRmls = ActiveRML.LiquidTypesRmls; + var calibrationDataVM = SelectedTab.CyanCalibrationData; + ApplayCalibrationDataToliquidTypesRml(liquidTypesRmls, LiquidTypes.Cyan, SelectedTab.CyanCalibrationData); + ApplayCalibrationDataToliquidTypesRml(liquidTypesRmls, LiquidTypes.Magenta, SelectedTab.MagentaCalibrationData); + ApplayCalibrationDataToliquidTypesRml(liquidTypesRmls, LiquidTypes.Yellow, SelectedTab.YellowCalibrationData); + ApplayCalibrationDataToliquidTypesRml(liquidTypesRmls, LiquidTypes.Black, SelectedTab.BlackCalibrationData); + Save(); + } + } + + private void ApplayCalibrationDataToliquidTypesRml(SynchronizedObservableCollection<LiquidTypesRml> liquidTypesRmls, LiquidTypes type, CalibrationDataVM calibrationDataVM) + { + if (calibrationDataVM.CalibrationPoints.Count == 0) + return; + + var liquidTypeRml = liquidTypesRmls.SingleOrDefault(x => x.LiquidType.Type == type); + CalibrationData calData = new CalibrationData(); + calData.LiquidType = (PMR.ColorLab.LiquidType)liquidTypeRml.LiquidType.Code; + calData.CalibrationPoints.Clear(); + calData.CalibrationPoints.AddRange(calibrationDataVM.CalibrationPoints.Select(x => new CalibrationPoint() { X = x.X, Y = x.Y })); + liquidTypeRml.PutCalibrationData(calData); + } + /// <summary> + /// Applies calibration points to machine calibration. + /// </summary> + private void ApplyToMachineCalibration(object obj) + { + if (SelectedTab != null) + { + var idsPack = Machine.IdsPacks. + Where(x => ActiveRML.LiquidTypesRmls.ToList().Exists(y => x.LiquidType != null && y.LiquidType.Guid == x.LiquidType.Guid)) + .OrderBy(x => x.PackIndex).ToList(); + + ApplayCalibrationDataToToMachineRml(idsPack, LiquidTypes.Cyan, SelectedTab.CyanCalibrationData); + ApplayCalibrationDataToToMachineRml(idsPack, LiquidTypes.Magenta, SelectedTab.MagentaCalibrationData); + ApplayCalibrationDataToToMachineRml(idsPack, LiquidTypes.Yellow, SelectedTab.YellowCalibrationData); + ApplayCalibrationDataToToMachineRml(idsPack, LiquidTypes.Black, SelectedTab.BlackCalibrationData); + Save(); + } + } + + private void ApplayCalibrationDataToToMachineRml(List<IdsPack> idsPacks, LiquidTypes type, CalibrationDataVM calibrationDataVM) + { + if (calibrationDataVM.CalibrationPoints.Count == 0) + return; + + var idsPack = idsPacks.FirstOrDefault(x => x.LiquidType.Type == type); + + if (idsPack != null) + { + var cat = idsPack.LiquidType.Cats.FirstOrDefault(x => x.MachineGuid == Machine.Guid && x.RmlGuid == ActiveRML.Guid); ; + + if (cat == null) + { + cat = new Cat(); + cat.Name = "untitled"; + _active_context.Cats.Add(cat); + } + + cat.RmlGuid = ActiveRML.Guid; + cat.MachineGuid = Machine.Guid; + cat.LiquidType = idsPack.LiquidType; + + CalibrationData calData = new CalibrationData(); + calData.LiquidType = (PMR.ColorLab.LiquidType)idsPack.LiquidType.Code; + calData.CalibrationPoints.AddRange(calibrationDataVM.CalibrationPoints.Select(x => new CalibrationPoint() { X = x.X, Y = x.Y })); + + cat.PutCalibrationData(calData); + } + } + + #endregion + + #region Loading + + public async void LoadColorCalibrations() + { + if (Machine == null) + { + _notification.ShowWarning(LogManager.Log($"Please, select machine.", LogCategory.Warning)); + IsFree = false; + return; + } + if (ActiveRML == null) + { + IsFree = false; + return; + } + try + { + IsFree = false; + if (_active_context != null) + { + _active_context.Dispose(); + } + + _active_context = ObservablesContext.CreateDefault(); + if (_liquids == null) + { + _liquids = _active_context.LiquidTypes.ToList(); + } + CalibrationTabs.Clear(); + LogManager.Log("Loading color calibration tests ..."); + + using (_notification.PushTaskItem("Loading Color Calibrations Tests ...")) + { + var testResults = await new RMLExtensionColorCalibrationBuilder(_active_context).SetAll().ForRMLExtension(RMLExtentionGUID).ForMachine(Machine.Guid).WithTests().BuildAsync(); + RmlExtensionColorCalibration = testResults.OrderBy(x => x.ID).ToList().FirstOrDefault(); + if (RmlExtensionColorCalibration == null) + { + RmlExtensionColorCalibration = new RmlExtensionColorCalibration() { RmlsExtensionsGuid = RMLExtentionGUID, MachineGuid = Machine.Guid }; + _active_context.RmlExtensionColorCalibrations.Add(RmlExtensionColorCalibration); + _active_context.SaveChanges(); + } + + foreach (var test in RmlExtensionColorCalibration.RmlExtensionColorCalibrationsTests) + { + CalibrationTabs.Add(new ColorCalibrationTabVM(_notification, _actionLogManager, _liquids) { RmlExtensionColorCalibrationsTest = test, Name = test.Name }); + if (CalibrationTabs.Count == 1) + SelectedTab = CalibrationTabs[0]; + } + if (CalibrationTabs.Count == 0) + { + SelectedTab = CreateNewColorCalibrationTabVM("Untitled", 1); + CalibrationTabs.Add(SelectedTab); + _active_context.SaveChanges(); + } + if (IsViewLoaded) + { + CalibrationTabs.ToList().ForEach(x => x.InitData()); + } + } + } + catch (Exception ex) + { + LogManager.Log(ex, $"Error loading Color Calibration tests.\n{ex.FlattenMessage()}"); + } + finally + { + IsFree = true; + } + } + + private ColorCalibrationTabVM CreateNewColorCalibrationTabVM(string name, int index) + { + ColorCalibrationTabVM newtab = new ColorCalibrationTabVM(_notification, _actionLogManager, _liquids) { Name = name, TabIndex = index }; + + newtab.RmlExtensionColorCalibrationsTest = new RmlExtensionColorCalibrationsTest() + { + RmlExtensionColorCalibrationGuid = RmlExtensionColorCalibration.Guid, + Name = name + }; + var liquidDataCollection = new SynchronizedObservableCollection<RmlExtensionColorCalibrationsTestsLiquidData>(); + var liquidtype = _liquids.Where(l => l.Type == LiquidTypes.Cyan).FirstOrDefault(); + var l_guid = liquidtype.Guid; + liquidDataCollection.Add(new RmlExtensionColorCalibrationsTestsLiquidData() { RmlExtensionColorCalibrationsTestGuid = newtab.RmlExtensionColorCalibrationsTest.Guid, LiquidTypeGuid = l_guid }); + liquidtype = _liquids.Where(l => l.Type == LiquidTypes.Magenta).FirstOrDefault(); + l_guid = liquidtype.Guid; + liquidDataCollection.Add(new RmlExtensionColorCalibrationsTestsLiquidData() { RmlExtensionColorCalibrationsTestGuid = newtab.RmlExtensionColorCalibrationsTest.Guid, LiquidTypeGuid = l_guid}); + liquidtype = _liquids.Where(l => l.Type == LiquidTypes.Yellow).FirstOrDefault(); + l_guid = liquidtype.Guid; + liquidDataCollection.Add(new RmlExtensionColorCalibrationsTestsLiquidData() { RmlExtensionColorCalibrationsTestGuid = newtab.RmlExtensionColorCalibrationsTest.Guid, LiquidTypeGuid = l_guid }); + liquidtype = _liquids.Where(l => l.Type == LiquidTypes.Black).FirstOrDefault(); + l_guid = liquidtype.Guid; + liquidDataCollection.Add(new RmlExtensionColorCalibrationsTestsLiquidData() { RmlExtensionColorCalibrationsTestGuid = newtab.RmlExtensionColorCalibrationsTest.Guid, LiquidTypeGuid = l_guid }); + newtab.RmlExtensionColorCalibrationsTest.RmlExtensionColorCalibrationsTestsLiquidData = liquidDataCollection; + if(RmlExtensionColorCalibration != null) + { + RmlExtensionColorCalibration.RmlExtensionColorCalibrationsTests.Add(newtab.RmlExtensionColorCalibrationsTest); + // _active_context.RmlExtensionColorCalibrations.Add(RmlExtensionColorCalibration); + } + + return newtab; + } + + #endregion + + #region Tabs modification + + /// <summary> + /// Removes the specified tab. + /// </summary> + /// <param name="tab">The tab.</param> + private void RemoveTab(ColorCalibrationTabVM tab) + { + if (CalibrationTabs.Count == 1) + return; + if (_notification.ShowQuestion("Are you sure you want to delete the selected tab?")) + { + foreach( var liquidData in tab.RmlExtensionColorCalibrationsTest.RmlExtensionColorCalibrationsTestsLiquidData) + { + + _active_context.RmlExtensionColorCalibrationsTestsLiquidDataPoints.RemoveRange(liquidData.RmlExtensionColorCalibrationsTestsLiquidDataPoints); + } + _active_context.RmlExtensionColorCalibrationsTestsLiquidData.RemoveRange(tab.RmlExtensionColorCalibrationsTest.RmlExtensionColorCalibrationsTestsLiquidData); + tab.RmlExtensionColorCalibrationsTest.RmlExtensionColorCalibrationsTestsLiquidData = null; + + RmlExtensionColorCalibration.RmlExtensionColorCalibrationsTests.Remove(tab.RmlExtensionColorCalibrationsTest); + _active_context.RmlExtensionColorCalibrationsTests.Remove(tab.RmlExtensionColorCalibrationsTest); + + CalibrationTabs.Remove(tab); + SelectedTab = CalibrationTabs.LastOrDefault(); + _active_context.SaveChanges(); + } + } + + /// <summary> + /// Adds a new tab. + /// </summary> + private bool AddNewTab(String name = null) + { + if (CalibrationTabs.Count > 7) + { + //_notification.ShowError("Cannot exceed the maximum number of 8 tabs. You can remove a tab, or create a new project."); + return false; + } + + if (name == null) + { + name = _notification.ShowTextInput("Enter tab name", "Tab Name", "Test"); + } + + if (!String.IsNullOrWhiteSpace(name)) + { + var tab = CreateNewColorCalibrationTabVM(name, (CalibrationTabs.Count + 1)); + _active_context.SaveChanges(); + CalibrationTabs.Add(tab); + SelectedTab = tab; + return true; + } + else + { + return false; + } + } + + /// <summary> + /// Renames the tab. + /// </summary> + /// <param name="tab">The tab.</param> + private void RenameTab() + { + if (SelectedTab != null) + { + var name = _notification.ShowTextInput("Enter tab name", "Tab Name", SelectedTab.Name); + + if (!String.IsNullOrWhiteSpace(name)) + { + SelectedTab.Name = name; + } + } + } + + #endregion + + #region Save + + public async void Save() + { + if (Machine == null) + { + _notification.ShowWarning(LogManager.Log($"Could not save Color Calibrations. Please, select machine before save.", LogCategory.Warning)); + return; + } + + try + { + IsFree = false; + DateTime lastUpdated = DateTime.UtcNow; + RmlExtensionColorCalibration.LastUpdated = lastUpdated; + + foreach (var tab in CalibrationTabs) + { + tab.RmlExtensionColorCalibrationsTest.LastUpdated = lastUpdated; + var removedPoints = tab.RemovedPoints; + foreach (var liquidData in tab.RmlExtensionColorCalibrationsTest.RmlExtensionColorCalibrationsTestsLiquidData) + { + var liquidtype = _liquids.Where(l => l.Guid == liquidData.LiquidTypeGuid).FirstOrDefault(); + if (liquidtype != null && removedPoints.ContainsKey(liquidtype.Type)) + { + _active_context.RmlExtensionColorCalibrationsTestsLiquidDataPoints.RemoveRange(removedPoints[liquidtype.Type]); + } + liquidData.LastUpdated = lastUpdated; + } + tab.RemovedPoints.Clear(); + } + await _active_context.SaveChangesAsync(); + + // LoadColorParameters(); + } + catch (Exception ex) + { + LogManager.Log(ex, "Could not update color calibrations."); + _notification.ShowError($"An error occurred while trying to save color calibrations.\n{ex.Message}"); + } + finally + { + IsFree = true; + EventHandler handler = SaveColorCalibration; + handler?.Invoke(this, new EventArgs()); + } + } + + #endregion + + } +} diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/ViewModels/ColorShadeTabVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/ViewModels/ColorShadeTabVM.cs new file mode 100644 index 000000000..eaaf7dc96 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/ViewModels/ColorShadeTabVM.cs @@ -0,0 +1,129 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Tango.SharedUI; +using Tango.MachineStudio.ThreadExtensions.Models; +using Tango.BL.Enumerations; +using Tango.Core.Commands; +using Microsoft.Win32; +using Tango.MachineStudio.Common.Notifications; +using Tango.BL.ActionLogs; +using Tango.BL.Entities; +using Tango.Core; + +namespace Tango.MachineStudio.ThreadExtensions.ViewModels +{ + public class ColorShadeTabVM : ViewModel + { + private INotificationProvider _notification; + private IActionLogManager _actionLogManager; + + #region Properties + + private string _name; + /// <summary> + /// Gets or sets the name of the thread. Using in print + /// </summary> + public string Name + { + get { return _name; } + set + { + _name = value; + if (RmlExtensionColorShadesTest != null) + RmlExtensionColorShadesTest.Name = _name; + RaisePropertyChangedAuto(); + } + } + + private int _tabIndex; + + public int TabIndex + { + get { return _tabIndex; } + set + { + _tabIndex = value; + RaisePropertyChangedAuto(); + } + } + + + private bool _isSelected; + /// <summary> + /// Gets or sets a value indicating whether this instance is selected. + /// </summary> + public bool IsSelected + { + get { return _isSelected; } + set { _isSelected = value; RaisePropertyChangedAuto(); } + } + + private RmlExtensionColorShadesTest _rmlExtensionColorShadesTest; + + public RmlExtensionColorShadesTest RmlExtensionColorShadesTest + { + get { return _rmlExtensionColorShadesTest; } + set + { + _rmlExtensionColorShadesTest = value; + RaisePropertyChangedAuto(); + } + } + + /// <summary> + /// Gets or sets last points before save. Used in Save to remove points before save new. + /// </summary> + /// <value> + /// The removed points. + /// </value> + public List<RmlExtensionColorShadesTestsData> RemovedDataList { get; set; } + + #endregion + + public RelayCommand ImportColorsCommand { get; set; } + + public ColorShadeTabVM(INotificationProvider notification, IActionLogManager actionLogManager) + { + _notification = notification; + _actionLogManager = actionLogManager; + ImportColorsCommand = new RelayCommand(ImportColors); + RemovedDataList = new List<RmlExtensionColorShadesTestsData>(); + } + + private void ImportColors(object obj) + { + List<ColorShadesModel.ColorShadesDataItem> items; + + OpenFileDialog dlg = new OpenFileDialog(); + dlg.Title = "Select data file"; + dlg.Filter = "Excel |*.xlsx"; + items = null; + if (dlg.ShowDialogCenter() && dlg.FileName.IsNotNullOrEmpty()) + { + ColorShadesModel model = new ColorShadesModel(); + string errors = ""; + model.GetDataFromFile(dlg.FileName, out items, ref errors); + if (false == String.IsNullOrEmpty(errors) || items == null || items.Count == 0) + { + _notification.ShowError("An error occurred while trying to import data form the selected excel file. Please check the file format if valid and is available to read."); + + } + else + { + if (RemovedDataList.Count == 0 && RmlExtensionColorShadesTest.RmlExtensionColorShadesTestsData.Count > 0) + { + RemovedDataList = new List<RmlExtensionColorShadesTestsData>(RmlExtensionColorShadesTest.RmlExtensionColorShadesTestsData.ToList()); + } + RmlExtensionColorShadesTest.RmlExtensionColorShadesTestsData.Clear(); + items.ForEach(x => RmlExtensionColorShadesTest.RmlExtensionColorShadesTestsData.Add(new RmlExtensionColorShadesTestsData() { + ColorNum = x.ColorNumber, L = x.L, A = x.A, B = x.B, C = x.C, M = x.M, Y = x.Y, K = x.K, Ti = x.TI, LRes = x.L2, ARes = x.A2, BRes = x.B2, DeltaE = x.DelteE })); + + } + + } + } + } +} diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/ViewModels/ColorShadeViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/ViewModels/ColorShadeViewVM.cs new file mode 100644 index 000000000..f305d5139 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/ViewModels/ColorShadeViewVM.cs @@ -0,0 +1,400 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Tango.BL; +using Tango.BL.ActionLogs; +using Tango.BL.Builders; +using Tango.BL.Entities; +using Tango.Core; +using Tango.MachineStudio.Common.Notifications; +using Tango.SharedUI; +using Tango.AutoComplete.Editors; +using Tango.MachineStudio.ThreadExtensions.Models; +using Tango.Core.Commands; +using Microsoft.Win32; +using Tango.Logging; +using Tango.MachineStudio.ThreadExtensions.ViewModels; +using System.Collections.ObjectModel; +using Tango.BL.Calibration; + +namespace Tango.MachineStudio.ThreadExtensions.ViewModels +{ + public class ColorShadeViewVM : ViewModel + { + private INotificationProvider _notification; + private IActionLogManager _actionLogManager; + + private ObservablesContext _active_context; + public event EventHandler SaveColorShadesEvent; + + #region Properties + + + private RmlExtensionColorShade _colorShade; + + public RmlExtensionColorShade RmlExtensionColorShade + { + get { return _colorShade; } + set { _colorShade = value; + RaisePropertyChangedAuto(); + } + } + + private ObservableCollection<ColorShadeTabVM> _colorShadeTabs; + + public ObservableCollection<ColorShadeTabVM> ColorShadeTabs + { + get { return _colorShadeTabs; } + set { _colorShadeTabs = value; } + } + + private ColorShadeTabVM _selectedTab; + + public ColorShadeTabVM SelectedTab + { + get { return _selectedTab; } + set + { + _selectedTab = value; + RaisePropertyChangedAuto(); + + foreach (var tab in _colorShadeTabs.Where(x => x != _selectedTab)) + { + tab.IsSelected = false; + } + + if (_selectedTab != null) + { + _selectedTab.IsSelected = true; + } + } + } + + private string _RMLExtentionGUID; + + public string RMLExtentionGUID + { + get { return _RMLExtentionGUID; } + set + { + _RMLExtentionGUID = value; + } + } + + private string _RMLGUID; + + public string RMLGUID + { + get { return _RMLGUID; } + set + { + _RMLGUID = value; + } + } + + protected string _selectedMachineGuid; + /// <summary> + /// Gets or sets the selected machine. + /// </summary> + public String SelectedMachineGUID + { + get { return _selectedMachineGuid; } + set + { + if (value != null && _selectedMachineGuid != value) + { + _selectedMachineGuid = value; + SelectedMachineChanged(); + RaisePropertyChangedAuto(); + InvalidateRelayCommands(); + } + } + } + + + private bool _isViewLoaded; + /// <summary> + /// Gets or sets a value indicating whether this instance is view loaded. Used to update charts. + /// </summary> + public bool IsViewLoaded + { + get { return _isViewLoaded; } + set + { + if (_isViewLoaded != value) + { + _isViewLoaded = value; + } + } + } + + #endregion + + #region commands + public RelayCommand CreateColorDataImportExcelTemplateCommand { get; set; } + + public RelayCommand SaveCommand { get; set; } + + public RelayCommand AddTabCommand { get; set; } + + public RelayCommand<ColorShadeTabVM> RemoveTabCommand { get; set; } + + public RelayCommand RenameTabCommand { get; set; } + + #endregion + + public ColorShadeViewVM(INotificationProvider notification, IActionLogManager actionLogManager) + { + _notification = notification; + _actionLogManager = actionLogManager; + ColorShadeTabs = new ObservableCollection<ColorShadeTabVM>(); + + SaveCommand = new RelayCommand(Save, () => IsFree); + + AddTabCommand = new RelayCommand(() => AddNewTab()); + RemoveTabCommand = new RelayCommand<ColorShadeTabVM>(RemoveTab); + RenameTabCommand = new RelayCommand(RenameTab); + + CreateColorDataImportExcelTemplateCommand = new RelayCommand(CreateColorDataImportExcelTemplate); + } + + #region Loading + public async void LoadColorShades() + { + if (SelectedMachineGUID == null) + { + _notification.ShowWarning(LogManager.Log($"Please, select machine.", LogCategory.Warning)); + IsFree = false; + return; + } + if (RMLGUID == null) + { + IsFree = false; + return; + } + try + { + IsFree = false; + if (_active_context != null) + { + _active_context.Dispose(); + } + + _active_context = ObservablesContext.CreateDefault(); + + ColorShadeTabs.Clear(); + LogManager.Log("Loading color shade view ..."); + using (_notification.PushTaskItem("Loading Color Shade View ...")) + { + var testResults = await new RMLExtensionColorShadeBuilder(_active_context).SetAll().ForRMLExtension(RMLExtentionGUID).ForMachine(SelectedMachineGUID).WithTests().BuildAsync(); + RmlExtensionColorShade = testResults.OrderBy(x => x.ID).ToList().FirstOrDefault(); + if (RmlExtensionColorShade == null) + { + RmlExtensionColorShade = new RmlExtensionColorShade() { RmlsExtensionsGuid = RMLExtentionGUID, MachineGuid = SelectedMachineGUID }; + _active_context.RmlExtensionColorShades.Add(RmlExtensionColorShade); + _active_context.SaveChanges(); + } + + foreach (var test in RmlExtensionColorShade.RmlExtensionColorShadesTests) + { + ColorShadeTabs.Add(new ColorShadeTabVM(_notification, _actionLogManager) { RmlExtensionColorShadesTest = test, Name = test.Name }); + if (ColorShadeTabs.Count == 1) + SelectedTab = ColorShadeTabs[0]; + } + if (ColorShadeTabs.Count == 0) + { + SelectedTab = CreateNewColorShadeTabVM("Untitled", 1); + ColorShadeTabs.Add(SelectedTab); + _active_context.SaveChanges(); + } + if (IsViewLoaded) + { + // ColorShadeTabs.ToList().ForEach(x => x.InitData()); + } + } + } + catch (Exception ex) + { + LogManager.Log(ex, $"Error loading Color Calibration tests.\n{ex.FlattenMessage()}"); + } + finally + { + IsFree = true; + } + } + + private ColorShadeTabVM CreateNewColorShadeTabVM(string name, int index) + { + ColorShadeTabVM newtab = new ColorShadeTabVM(_notification, _actionLogManager) { Name = name, TabIndex = index }; + + newtab.RmlExtensionColorShadesTest = new RmlExtensionColorShadesTest() + { + RmlExtensionColorShadesGuid = RmlExtensionColorShade.Guid, + Name = name + }; + if (RmlExtensionColorShade != null) + { + RmlExtensionColorShade.RmlExtensionColorShadesTests.Add(newtab.RmlExtensionColorShadesTest); + } + + return newtab; + } + #endregion + + #region Methods + + private void OnRMLExtensionGUIDChanged() + { + } + + private void SelectedMachineChanged() + { + SelectedTab = null; + LoadColorShades(); + } + + private void CreateColorDataImportExcelTemplate() + { + SaveFileDialog dlg = new SaveFileDialog(); + try + { + dlg.Title = $"Create excel template file"; + dlg.Filter = "Excel Files|*.xlsx"; + dlg.DefaultExt = ".xlsx"; + dlg.FileName = "Color Shades File Template"; + if (dlg.ShowDialog().Value) + { + CalibrationHelper.CreateColorShadesInputExcelTemplate(dlg.FileName); + } + } + catch (Exception ex) + { + LogManager.Log(ex, "Error generating excel color shades template file " + dlg.FileName); + _notification.ShowError("An error occurred while trying to generate the color shades file."); + } + } + + #endregion + + #region Tabs modification + + /// <summary> + /// Removes the specified tab. + /// </summary> + /// <param name="tab">The tab.</param> + private void RemoveTab(ColorShadeTabVM tab) + { + if (ColorShadeTabs.Count == 1) + return; + if (_notification.ShowQuestion("Are you sure you want to delete the selected tab?")) + { + _active_context.RmlExtensionColorShadesTestsData.RemoveRange(tab.RmlExtensionColorShadesTest.RmlExtensionColorShadesTestsData.ToList()); + + //_active_context.RmlExtensionColorCalibrationsTestsLiquidData.RemoveRange(tab.RmlExtensionColorCalibrationsTest.RmlExtensionColorCalibrationsTestsLiquidData); + tab.RmlExtensionColorShadesTest.RmlExtensionColorShadesTestsData = null; + + RmlExtensionColorShade.RmlExtensionColorShadesTests.Remove(tab.RmlExtensionColorShadesTest); + _active_context.RmlExtensionColorShadesTests.Remove(tab.RmlExtensionColorShadesTest); + + ColorShadeTabs.Remove(tab); + SelectedTab = ColorShadeTabs.LastOrDefault(); + _active_context.SaveChanges(); + } + } + + /// <summary> + /// Adds a new tab. + /// </summary> + private bool AddNewTab(String name = null) + { + if (ColorShadeTabs.Count > 7) + { + //_notification.ShowError("Cannot exceed the maximum number of 8 tabs. You can remove a tab, or create a new project."); + return false; + } + + if (name == null) + { + name = _notification.ShowTextInput("Enter tab name", "Tab Name", "Test"); + } + + if (!String.IsNullOrWhiteSpace(name)) + { + var tab = CreateNewColorShadeTabVM(name, (ColorShadeTabs.Count + 1)); + _active_context.SaveChanges(); + ColorShadeTabs.Add(tab); + SelectedTab = tab; + return true; + } + else + { + return false; + } + } + + /// <summary> + /// Renames the tab. + /// </summary> + /// <param name="tab">The tab.</param> + private void RenameTab() + { + if (SelectedTab != null) + { + var name = _notification.ShowTextInput("Enter tab name", "Tab Name", SelectedTab.Name); + + if (!String.IsNullOrWhiteSpace(name)) + { + SelectedTab.Name = name; + } + } + } + + #endregion + + #region Save + + public async void Save() + { + if (SelectedMachineGUID == null) + { + _notification.ShowWarning(LogManager.Log($"Could not save Color Shades. Please, select machine before save.", LogCategory.Warning)); + return; + } + + try + { + IsFree = false; + DateTime lastUpdated = DateTime.UtcNow; + RmlExtensionColorShade.LastUpdated = lastUpdated; + + foreach (var tab in ColorShadeTabs) + { + tab.RmlExtensionColorShadesTest.LastUpdated = lastUpdated; + var removedPoints = tab.RemovedDataList; + if (removedPoints.Count > 0) + { + _active_context.RmlExtensionColorShadesTestsData.RemoveRange(removedPoints); + } + tab.RemovedDataList.Clear(); + } + await _active_context.SaveChangesAsync(); + + } + catch (Exception ex) + { + LogManager.Log(ex, "Could not update color shades."); + _notification.ShowError($"An error occurred while trying to save color shades.\n{ex.Message}"); + } + finally + { + IsFree = true; + EventHandler handler = SaveColorShadesEvent; + handler?.Invoke(this, new EventArgs()); + } + } + + #endregion + } +} diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/ViewModels/MainViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/ViewModels/MainViewVM.cs index 4802e0af1..47965deb4 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/ViewModels/MainViewVM.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/ViewModels/MainViewVM.cs @@ -257,6 +257,21 @@ namespace Tango.MachineStudio.ThreadExtensions.ViewModels set { _testResultsViewVM = value; RaisePropertyChangedAuto(); } } + private ColorCalibrationViewVM _colorCalibrationViewVM; + public ColorCalibrationViewVM ColorCalibrationViewVM + { + get { return _colorCalibrationViewVM; } + set { _colorCalibrationViewVM = value; RaisePropertyChangedAuto(); } + } + + private ColorShadeViewVM _solorShadeViewVM; + public ColorShadeViewVM ColorShadeViewVM + { + get { return _solorShadeViewVM; } + set { _solorShadeViewVM = value; RaisePropertyChangedAuto(); } + } + + protected MachineModel _selectedMachine; /// <summary> /// Gets or sets the selected machine. @@ -294,20 +309,20 @@ namespace Tango.MachineStudio.ThreadExtensions.ViewModels } - private MachineTestResultsTabs PreviosSelectedTab { get; set; } + //private MachineTestResultsTabs PreviosSelectedTab { get; set; } - private MachineTestResultsTabs _selectedTab; + //private MachineTestResultsTabs _selectedTab; - public MachineTestResultsTabs SelectedTab - { - get { return _selectedTab; } - set { - PreviosSelectedTab = _selectedTab; - _selectedTab = value; - OnSelectedMachineTestResultsTabChanged(); - RaisePropertyChangedAuto(); - } - } + //public MachineTestResultsTabs SelectedTab + //{ + // get { return _selectedTab; } + // set { + // PreviosSelectedTab = _selectedTab; + // _selectedTab = value; + // OnSelectedMachineTestResultsTabChanged(); + // RaisePropertyChangedAuto(); + // } + //} #endregion @@ -922,7 +937,8 @@ namespace Tango.MachineStudio.ThreadExtensions.ViewModels { Guid = x.Guid, Name = x.Name, - SerialNumber = x.SerialNumber + SerialNumber = x.SerialNumber, + IdsPacks = x.Configuration.IdsPacks.Where(z => !z.IsEmpty) }).ToObservableCollection(); } @@ -994,9 +1010,7 @@ namespace Tango.MachineStudio.ThreadExtensions.ViewModels .WithUser() .BuildAsync(); - ActiveRML = new RmlBuilder(_active_context) - .Set(SelectedRMLExtension.RMLGuid) - .Build(); + ActiveRML = new RmlBuilder(_active_context).Set(SelectedRMLExtension.RMLGuid).WithLiquidFactors().Build(); if (!String.IsNullOrEmpty(ActiveRML.Manufacturer) && false == Manufacturers.Any(x => x == ActiveRML.Manufacturer)) { @@ -1040,12 +1054,27 @@ namespace Tango.MachineStudio.ThreadExtensions.ViewModels TestResultsViewVM.SelectedMachineGUID = SelectedMachine != null ? SelectedMachine.Guid : null; TestResultsViewVM.ThreadName = ActiveRML.Manufacturer; + ColorCalibrationViewVM = new ColorCalibrationViewVM(_notification, _actionLogManager); + ColorCalibrationViewVM.RMLExtentionGUID = guid; + ColorCalibrationViewVM.ActiveRML = ActiveRML; + ColorCalibrationViewVM.RMLGUID = ActiveRML.Guid; + ColorCalibrationViewVM.Machine = SelectedMachine; + + ColorShadeViewVM = new ColorShadeViewVM(_notification, _actionLogManager); + ColorShadeViewVM.RMLExtentionGUID = guid; + ColorShadeViewVM.RMLGUID = ActiveRML.Guid; + ColorShadeViewVM.SelectedMachineGUID = SelectedMachine != null ? SelectedMachine.Guid : null; ; + if (ActiveRMLExtension.RMLStatus == RMLExtensionStatus.New) { ColorParametersVewVM.SaveColorParameters -= UpdateStatus; ColorParametersVewVM.SaveColorParameters += UpdateStatus; TestResultsViewVM.SaveTestResults -= UpdateStatus; TestResultsViewVM.SaveTestResults += UpdateStatus; + ColorCalibrationViewVM.SaveColorCalibration -= UpdateStatus; + ColorCalibrationViewVM.SaveColorCalibration += UpdateStatus; + ColorShadeViewVM.SaveColorShadesEvent -= UpdateStatus; + ColorShadeViewVM.SaveColorShadesEvent += UpdateStatus; } View.NavigateTo(RMLExtensionNavigationView.RMLExtentionView); @@ -1108,6 +1137,8 @@ namespace Tango.MachineStudio.ThreadExtensions.ViewModels { ColorParametersVewVM.SaveColorParameters -= UpdateStatus; TestResultsViewVM.SaveTestResults -= UpdateStatus; + ColorCalibrationViewVM.SaveColorCalibration -= UpdateStatus; + ColorShadeViewVM.SaveColorShadesEvent -= UpdateStatus; ActiveRMLExtension.RMLStatus = RMLExtensionStatus.InProgress; ActiveRMLExtension.LastUpdated = DateTime.UtcNow; @@ -1134,6 +1165,14 @@ namespace Tango.MachineStudio.ThreadExtensions.ViewModels { TestResultsViewVM.SelectedMachineGUID = SelectedMachine.Guid; } + if(ColorCalibrationViewVM != null) + { + ColorCalibrationViewVM.Machine = SelectedMachine; + } + if(ColorShadeViewVM != null) + { + ColorShadeViewVM.SelectedMachineGUID = SelectedMachine.Guid; + } } #endregion @@ -1183,10 +1222,10 @@ namespace Tango.MachineStudio.ThreadExtensions.ViewModels #region selections - private void OnSelectedMachineTestResultsTabChanged() - { - if(SelectedTab == MachineTestResultsTabs.ColorParameters) - { + //private void OnSelectedMachineTestResultsTabChanged() + // { + //if(SelectedTab == MachineTestResultsTabs.ColorParameters) + // { //if(PreviosSelectedTab == MachineTestResultsTabs.TestResults && TestResultsViewVM != null) //{ // TestResultsViewVM.Save(); @@ -1194,15 +1233,15 @@ namespace Tango.MachineStudio.ThreadExtensions.ViewModels //save //if (_notification.ShowQuestion("Are you sure you want to exit this page without saving changes?")) - } - else if(SelectedTab == MachineTestResultsTabs.TestResults) - { + // } + // else if(SelectedTab == MachineTestResultsTabs.TestResults) + // { //if (PreviosSelectedTab == MachineTestResultsTabs.ColorParameters && ColorParametersVewVM != null) //{ // ColorParametersVewVM.Save(); //} - } - } + //} + // } #endregion @@ -1304,6 +1343,7 @@ namespace Tango.MachineStudio.ThreadExtensions.ViewModels colorParametrsExcelList.Add(colorParametrsExcelModel); TestResultsViewVM.LoadTestResultsExcel(testResultsExcelModelList, machine.Guid, machine.SerialNumber); + //ColorCalibrationViewVM.WritetoExcel } } diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/ViewModels/TestResultViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/ViewModels/TestResultViewVM.cs index 41be789ed..68a886f99 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/ViewModels/TestResultViewVM.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/ViewModels/TestResultViewVM.cs @@ -1,8 +1,11 @@ using Microsoft.Win32; +using Microsoft.WindowsAPICodePack.Dialogs; using System; using System.Collections.Generic; using System.IO; using System.Linq; +using System.Data.Entity; +using System.Diagnostics; using System.Text; using System.Threading.Tasks; using Tango.BL; @@ -10,6 +13,7 @@ using Tango.BL.ActionLogs; using Tango.BL.DTO; using Tango.BL.Entities; using Tango.BL.Enumerations; +using Tango.BL.ValueObjects; using Tango.Core.Commands; using Tango.MachineStudio.Common.Notifications; using Tango.MachineStudio.ThreadExtensions.Models; @@ -21,9 +25,9 @@ namespace Tango.MachineStudio.ThreadExtensions.ViewModels { private INotificationProvider _notification; private IActionLogManager _actionLogManager; - + #region Properties - + private string _threadName; /// <summary> /// Gets or sets the name of the thread. Using in print @@ -51,7 +55,7 @@ namespace Tango.MachineStudio.ThreadExtensions.ViewModels get { return _isSelected; } set { _isSelected = value; RaisePropertyChangedAuto(); } } - + private RmlExtensionTestResult _testResult; public RmlExtensionTestResult TestResult @@ -59,19 +63,124 @@ namespace Tango.MachineStudio.ThreadExtensions.ViewModels get { return _testResult; } set { _testResult = value; RaisePropertyChangedAuto(); + RaisePropertyChanged(nameof(TestResultsFiles)); } } - - #endregion + public List<RmlExtensionTestResultsFile> TestResultsFiles + { + get + { + return TestResult.RmlExtensionTestResultsFiles.ToList(); + } + } + public RelayCommand<RmlExtensionTestResultsFile> DeleteCommand { get; set; } + public RelayCommand<RmlExtensionTestResultsFile> DownLoadFileCommand { get; set; } + public RelayCommand UploadCommand { get; set; } + public RelayCommand DownLoadAllCommand { get; set; } + #endregion + public TestResultViewVM(INotificationProvider notification, IActionLogManager actionLogManager) { _notification = notification; _actionLogManager = actionLogManager; + + UploadCommand = new RelayCommand(UploadFiles); + DownLoadFileCommand = new RelayCommand<RmlExtensionTestResultsFile>(DownLoadFile); + DeleteCommand = new RelayCommand<RmlExtensionTestResultsFile>(DeleteFile); + DownLoadAllCommand = new RelayCommand(DownLoadAllFiles); } + + #region TestResultsFiles + private async void UploadFiles(object obj) + { + OpenFileDialog dlg = new OpenFileDialog(); + dlg.Title = "Select data file"; + dlg.Filter = "CSV Files|*.csv"; + dlg.Multiselect = true; + if (dlg.ShowDialog().Value) + { + try + { + var files = dlg.FileNames.ToList(); + + using (ObservablesContext db = ObservablesContext.CreateDefault()) + { + var testResult = await db.RmlExtensionTestResults.Where(x => x.Guid == TestResult.Guid).Include(t1 => t1.RmlExtensionTestResultsFiles).FirstOrDefaultAsync(); + foreach (var strpath in files) + { + var testResultfile = new RmlExtensionTestResultsFile(); + testResultfile.FileName = Path.GetFileName(strpath); + //temporary!!! + testResultfile.FilePath = strpath; + + // TestResult.RmlExtensionTestResultsFiles.Add(testResultfile); + testResult.RmlExtensionTestResultsFiles.Add(testResultfile); + } + if (testResult != null) + { + await db.SaveChangesAsync(); + } + TestResult.RmlExtensionTestResultsFiles = testResult.RmlExtensionTestResultsFiles;///????? + RaisePropertyChanged(nameof(TestResultsFiles)); + } + _notification.ShowInfo("File successfully loaded."); + } + catch (Exception ex) + { + _notification.ShowError($"An error occurred while trying to import the file.\n{ex.FlattenMessage()}"); + } + } + + } + + private void DownLoadFile(RmlExtensionTestResultsFile file) + { + SaveFileDialog dlg = new SaveFileDialog(); + dlg.Title = "Save the csv file"; + dlg.Filter = "CSV Files|*.csv"; + dlg.DefaultExt = ".csv"; + dlg.FileName = file.FileName; + if (dlg.ShowDialog().Value) + { + /// + } + } + + private void DownLoadAllFiles() + { + CommonOpenFileDialog dlg = new CommonOpenFileDialog(); + dlg.Title = "Select folder."; + dlg.IsFolderPicker = true; + if (dlg.ShowDialog() == CommonFileDialogResult.Ok) + { + var filesPath = TestResult.RmlExtensionTestResultsFiles.Select( x=>x.FilePath).ToList(); + ///// + } + } + + private async void DeleteFile(RmlExtensionTestResultsFile file) + { + if (_notification.ShowQuestion("Are you sure you want to delete the selected file?")) + { + using (ObservablesContext db = ObservablesContext.CreateDefault()) + { + var deletefile = db.RmlExtensionTestResultsFiles.FirstOrDefault(x => x.Guid == file.Guid); + if(deletefile != null) + { + db.RmlExtensionTestResultsFiles.Remove(deletefile); + await db.SaveChangesAsync(); + } + } + TestResult.RmlExtensionTestResultsFiles.Remove(file); + RaisePropertyChanged(nameof(TestResultsFiles)); + } + } + #endregion + } } diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/ViewModels/TestResultsViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/ViewModels/TestResultsViewVM.cs index c1fb4497f..f639eb6e7 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/ViewModels/TestResultsViewVM.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/ViewModels/TestResultsViewVM.cs @@ -1,6 +1,8 @@ -using System; +using Microsoft.Win32; +using System; using System.Collections.Generic; using System.Collections.ObjectModel; +using System.IO; using System.Linq; using System.Text; using System.Threading.Tasks; @@ -271,7 +273,7 @@ namespace Tango.MachineStudio.ThreadExtensions.ViewModels using (_notification.PushTaskItem("Loading Test Results Parameters ...")) { - var testResults = await new RMLExtensionTestResultsCollectionBuilder(_active_context).SetAll().ForRMLExtension(RMLExtemtionGUID).ForMachine(SelectedMachineGUID).WithRubbingAndTensileResults().BuildAsync(); + var testResults = await new RMLExtensionTestResultsCollectionBuilder(_active_context).SetAll().ForRMLExtension(RMLExtemtionGUID).ForMachine(SelectedMachineGUID).WithRubbingAndTensileResults().WithTestResultsFiles().BuildAsync(); SelectedTestResults = testResults.OrderBy(x => x.ResultIndex).ToSynchronizedObservableCollection(); foreach (var result in SelectedTestResults) { @@ -403,6 +405,8 @@ namespace Tango.MachineStudio.ThreadExtensions.ViewModels #endregion + #region Excel + public async void LoadTestResultsExcel(List<TestResultsExcelModel> testResultsExcelModelList, string machineGUID, string machineSerialNumber) { try @@ -556,5 +560,8 @@ namespace Tango.MachineStudio.ThreadExtensions.ViewModels IsFree = true; } } + + #endregion + } } diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/ColorCalibrationView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/ColorCalibrationView.xaml new file mode 100644 index 000000000..407ad2e9f --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/ColorCalibrationView.xaml @@ -0,0 +1,349 @@ +<UserControl x:Class="Tango.MachineStudio.ThreadExtensions.Views.ColorCalibrationView" + xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" + 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:local="clr-namespace:Tango.MachineStudio.ThreadExtensions.Views" + xmlns:converters="clr-namespace:Tango.SharedUI.Converters;assembly=Tango.SharedUI" + xmlns:enumerators="clr-namespace:Tango.BL.Enumerations;assembly=Tango.BL" + xmlns:global="clr-namespace:Tango.MachineStudio.ThreadExtensions" + xmlns:mahapps="http://metro.mahapps.com/winfx/xaml/controls" + xmlns:autoCompleteMachine="clr-namespace:Tango.MachineStudio.Common.AutoComplete;assembly=Tango.MachineStudio.Common" + xmlns:autoComplete="clr-namespace:Tango.AutoComplete.Editors;assembly=Tango.AutoComplete" + xmlns:oxy="http://oxyplot.org/wpf" + xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes" + xmlns:vm="clr-namespace:Tango.MachineStudio.ThreadExtensions.ViewModels" + xmlns:fa="http://schemas.fontawesome.io/icons/" + + mc:Ignorable="d" + d:DesignHeight="450" d:DesignWidth="800" d:DataContext="{d:DesignInstance Type=vm:ColorCalibrationViewVM, IsDesignTimeCreatable=False}" FontSize="16"> + <UserControl.Resources> + <autoCompleteMachine:MachinesProvider x:Key="MachinesProvider" /> + <converters:EnumToDescriptionConverter x:Key="EnumToDescriptionConverter" /> + <Style x:Key="CellNumericUpDown" TargetType="{x:Type mahapps:NumericUpDown}" BasedOn="{StaticResource {x:Type mahapps:NumericUpDown}}"> + <Setter Property="FrameworkElement.HorizontalAlignment" Value="Stretch"/> + <Setter Property="HorizontalContentAlignment" Value="Left"/> + <Setter Property="Background" Value="Transparent"/> + <Setter Property="BorderThickness" Value="0"/> + <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Disabled"/> + <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Disabled"/> + <Setter Property="Focusable" Value="false"/> + <Setter Property="IsHitTestVisible" Value="false"/> + <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Disabled"/> + <Setter Property="FrameworkElement.VerticalAlignment" Value="Top"/> + <Setter Property="VerticalContentAlignment" Value="Center"/> + <Setter Property="FrameworkElement.MinHeight" Value="0"/> + <Setter Property="HideUpDownButtons" Value="true"/> + <Setter Property="FontSize" Value="14"/> + </Style> + + <Style x:Key="EditableCellNumericUpDown" TargetType="{x:Type mahapps:NumericUpDown}" BasedOn="{StaticResource {x:Type mahapps:NumericUpDown}}"> + <Setter Property="FrameworkElement.HorizontalAlignment" Value="Stretch"/> + <Setter Property="HorizontalContentAlignment" Value="Left"/> + <Setter Property="BorderThickness" Value="0"/> + <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Disabled"/> + <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Disabled"/> + <Setter Property="FrameworkElement.VerticalAlignment" Value="Center"/> + <Setter Property="VerticalContentAlignment" Value="Center"/> + <Setter Property="FrameworkElement.MinHeight" Value="0"/> + <Setter Property="FontSize" Value="14"/> + </Style> + + <Style TargetType="DataGridCell" BasedOn="{StaticResource {x:Type DataGridCell}}"> + <Setter Property="BorderThickness" Value="0"/> + <Setter Property="FocusVisualStyle" Value="{x:Null}"/> + <Setter Property="VerticalContentAlignment" Value="Center"></Setter> + </Style> + + <DataTemplate x:Key="chartsPanel"> + <Grid Margin="10 20 0 10"> + <Grid.ColumnDefinitions> + <ColumnDefinition Width="1*"/> + <ColumnDefinition Width="1*"/> + </Grid.ColumnDefinitions> + + <Border Grid.Column="0" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" BorderThickness="0" BorderBrush="{StaticResource DarkGrayBrush}" CornerRadius="5"> + <oxy:Plot TitleFontSize="14" x:Name="LABDataPlot" Margin="0 0 10 0" Background="Transparent" LegendPlacement="Inside" LegendPosition="TopRight" LegendOrientation="Vertical" LegendFontSize="9" LegendItemAlignment="Left" LegendLineSpacing="3" Foreground="{StaticResource Dialog.Foreground}"> + <oxy:Plot.Series > + <oxy:LineSeries ItemsSource="{Binding LPoints}" Color="LawnGreen" Title="L" StrokeThickness="1.5" MarkerType="Circle" MarkerFill="LawnGreen"/> + <oxy:LineSeries ItemsSource="{Binding APoints}" Color="#E14141" Title="A" StrokeThickness="1.5" MarkerType="Circle" MarkerFill="#E14141"/> + <oxy:LineSeries ItemsSource="{Binding BPoints}" Color="#73B6EC" Title="B" StrokeThickness="1.5" MarkerType="Circle" MarkerFill="#73B6EC"/> + </oxy:Plot.Series> + <oxy:Plot.Axes> + <oxy:LinearAxis Position="Bottom" Title = "Ink%" MajorGridlineStyle="Solid" MinorGridlineStyle="Dot" IsZoomEnabled="True" AxisTitleDistance ="12" Minimum="0" Maximum="{Binding MaxX}" /> + <oxy:LinearAxis Position="Left" Title = "LAB" MajorGridlineStyle="Solid" MinorGridlineStyle="Dot" IsZoomEnabled="True" Minimum="{Binding MinY}" Maximum="{Binding MaxY}" MinorStep="10" /> + </oxy:Plot.Axes> + </oxy:Plot> + </Border> + + <Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Grid.Column="1" Grid.Row="0" Margin="10 0 0 0"> + <Border HorizontalAlignment="Stretch" VerticalAlignment="Stretch" BorderThickness="0" BorderBrush="{StaticResource DarkGrayBrush}" CornerRadius="5"> + <oxy:Plot TitleFontSize="14" x:Name="LinearizationPlot" Margin="0 0 0 0" Background="Transparent" LegendPlacement="Inside" LegendPosition="RightTop" LegendOrientation="Vertical" > + <oxy:Plot.Series > + <oxy:LineSeries ItemsSource="{Binding LinearizationPoints}" Color="#73B6EC" MarkerFill="SteelBlue" MarkerType="Circle"/> + </oxy:Plot.Series> + <oxy:Plot.Axes> + <oxy:LinearAxis Position="Bottom" Title = "In Ink" MajorGridlineStyle="Solid" MinorGridlineStyle="Dot" IsZoomEnabled="True" Minimum="0" Maximum="{Binding LinearizationMaxX}"/> + <oxy:LinearAxis Position="Left" Title = "Out Ink" MajorGridlineStyle="Solid" MinorGridlineStyle="Dot" IsZoomEnabled="True" Minimum="0" Maximum="{Binding LinearizationMaxY}"/> + </oxy:Plot.Axes> + </oxy:Plot> + </Border> + </Grid> + </Grid> + </DataTemplate> + + <DataTemplate x:Key="calibrationDataGrid"> + <DockPanel Width="240" Margin="20 28 0 60"> + <Grid > + <DataGrid Background="{StaticResource TransparentBackgroundBrush400}" AlternatingRowBackground="{StaticResource Transparent200}" BorderThickness="1" BorderBrush="{StaticResource DarkGrayBrush}" Margin="0 0" ItemsSource="{Binding CalibrationPoints}" CanUserResizeColumns="False" CanUserReorderColumns="False" AutoGenerateColumns="False" CanUserAddRows="False" CanUserDeleteRows="True" CanUserSortColumns="False"> + <DataGrid.CellStyle> + <Style TargetType="DataGridCell" BasedOn="{StaticResource {x:Type DataGridCell}}"> + <Setter Property="BorderThickness" Value="0"/> + <Setter Property="HorizontalContentAlignment" Value="Left"></Setter> + <Setter Property="HorizontalAlignment" Value="Stretch"></Setter> + <Setter Property="Foreground" Value="{StaticResource BlackForegroundBrush}"></Setter> + </Style> + </DataGrid.CellStyle> + <DataGrid.Resources> + <Style x:Key="CellNumericUpDown" TargetType="{x:Type mahapps:NumericUpDown}" BasedOn="{StaticResource {x:Type mahapps:NumericUpDown}}"> + <Setter Property="FrameworkElement.HorizontalAlignment" Value="Stretch"/> + <Setter Property="HorizontalContentAlignment" Value="Left"/> + <Setter Property="Background" Value="Transparent"/> + <Setter Property="BorderThickness" Value="0"/> + <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Disabled"/> + <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Disabled"/> + <Setter Property="Focusable" Value="false"/> + <Setter Property="IsHitTestVisible" Value="false"/> + <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Disabled"/> + <Setter Property="FrameworkElement.VerticalAlignment" Value="Top"/> + <Setter Property="VerticalContentAlignment" Value="Center"/> + <Setter Property="FrameworkElement.MinHeight" Value="0"/> + <Setter Property="HideUpDownButtons" Value="true"/> + </Style> + <Style x:Key="EditableCellNumericUpDown" TargetType="{x:Type mahapps:NumericUpDown}" BasedOn="{StaticResource {x:Type mahapps:NumericUpDown}}"> + <Setter Property="FrameworkElement.HorizontalAlignment" Value="Stretch"/> + <Setter Property="HorizontalContentAlignment" Value="Left"/> + <Setter Property="BorderThickness" Value="0"/> + <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Disabled"/> + <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Disabled"/> + <Setter Property="FrameworkElement.VerticalAlignment" Value="Top"/> + <Setter Property="VerticalContentAlignment" Value="Center"/> + <Setter Property="FrameworkElement.MinHeight" Value="0"/> + </Style> + </DataGrid.Resources> + <DataGrid.Columns> + <DataGridTextColumn Header="#" Binding="{Binding Index}" Width="Auto" IsReadOnly="True" Foreground="{StaticResource DimGrayBrush}" FontSize="11" /> + <mahapps:DataGridNumericUpDownColumn Header="X" Binding="{Binding X}" Minimum="0" Maximum="10000" HideUpDownButtons="True" Width="1*" ElementStyle="{StaticResource CellNumericUpDown}" EditingElementStyle="{StaticResource EditableCellNumericUpDown}"/> + <mahapps:DataGridNumericUpDownColumn Header="Y" Binding="{Binding Y}" StringFormat="0.00" Minimum="0" Maximum="10000" HideUpDownButtons="True" Width="1*" ElementStyle="{StaticResource CellNumericUpDown}" EditingElementStyle="{StaticResource EditableCellNumericUpDown}"/> + </DataGrid.Columns> + </DataGrid> + </Grid> + </DockPanel> + + </DataTemplate> + </UserControl.Resources> + + <Grid x:Name="contentGrid" DataContext="{Binding ColorCalibrationViewVM}" > + <Grid.RowDefinitions> + <RowDefinition Height="Auto"/> + <RowDefinition Height="1*"/> + </Grid.RowDefinitions> + + <DockPanel Grid.Row="0"> + <Button DockPanel.Dock="Right" HorizontalAlignment="Right" Width="170" Height="36" Margin="0 0 26 0" VerticalAlignment="Center" Command="{Binding SaveCommand}"> + <StackPanel Orientation="Horizontal"> + <materialDesign:PackIcon Kind="ContentSaveAll" Width="24" Height="24" /> + <TextBlock VerticalAlignment="Center" Margin="10 0 0 0">SAVE</TextBlock> + </StackPanel> + </Button> + <Button DockPanel.Dock="Right" HorizontalAlignment="Right" Width="170" Height="36" Margin="0 0 26 0" VerticalAlignment="Center" Command="{Binding ApplyToRMLCommand}"> + <StackPanel Orientation="Horizontal"> + <materialDesign:PackIcon Kind="ContentSaveAll" Width="24" Height="24" /> + <TextBlock VerticalAlignment="Center" Margin="10 0 0 0">Apply to RML</TextBlock> + </StackPanel> + </Button> + <Button DockPanel.Dock="Right" HorizontalAlignment="Right" Width="180" Height="36" Margin="0 0 26 0" VerticalAlignment="Center" Command="{Binding ApplyToMachineCalibrationCommand}" ToolTip="Apply to machine color calibration"> + <StackPanel Orientation="Horizontal"> + <materialDesign:PackIcon Kind="ContentSaveAll" Width="24" Height="24" /> + <TextBlock VerticalAlignment="Center" Margin="10 0 0 0" Text="Apply to Machine"></TextBlock> + </StackPanel> + </Button> + </DockPanel> + <Grid Grid.Row="1" > + <Grid.RowDefinitions> + <RowDefinition Height="30"/> + <RowDefinition Height="1*"/> + </Grid.RowDefinitions> + <StackPanel Orientation="Horizontal" Margin="35 0 0 0"> + <ListBox Style="{x:Null}" HorizontalAlignment="Left" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch" ItemContainerStyle="{StaticResource basicListBoxItem}" ScrollViewer.HorizontalScrollBarVisibility="Disabled" ScrollViewer.VerticalScrollBarVisibility="Disabled" Background="Transparent" BorderThickness="0" ItemsSource="{Binding CalibrationTabs}" SelectedItem="{Binding SelectedTab}" SelectionChanged="ListBox_SelectionChanged"> + <ListBox.ItemsPanel> + <ItemsPanelTemplate> + <StackPanel HorizontalAlignment="Left" Orientation="Horizontal"></StackPanel> + </ItemsPanelTemplate> + </ListBox.ItemsPanel> + + <ListBox.ItemTemplate> + <DataTemplate> + <Border Padding="5 5" Width="160" CornerRadius="10 10 0 0" Margin="1 0" Tag="{Binding RelativeSource={RelativeSource AncestorType=ListBox},Path=DataContext}"> + <Border.ContextMenu> + <ContextMenu DataContext="{Binding Path=PlacementTarget.Tag, RelativeSource={RelativeSource Self}}" Style="{x:Null}" > + <MenuItem Header="Rename" Command="{Binding RenameTabCommand}" MinWidth="210" MaxHeight="40" > + <MenuItem.Icon> + <fa:ImageAwesome Icon="Pencil" Width="16" /> + </MenuItem.Icon> + </MenuItem> + </ContextMenu> + </Border.ContextMenu> + <Border.Style> + <Style TargetType="Border"> + <Setter Property="Background" Value="{StaticResource LightGrayBrush150}"></Setter> + <Setter Property="TextElement.Foreground" Value="{StaticResource DarkGrayBrush}"></Setter> + <Style.Triggers> + <DataTrigger Binding="{Binding IsSelected}" Value="True"> + <Setter Property="Background" Value="{StaticResource AccentColorBrush}"></Setter> + <Setter Property="TextElement.Foreground" Value="{StaticResource WhiteTextBrush}"></Setter> + </DataTrigger> + <Trigger Property="IsMouseOver" Value="True"> + <Setter Property="Opacity" Value="0.8"></Setter> + </Trigger> + </Style.Triggers> + </Style> + </Border.Style> + <DockPanel VerticalAlignment="Center"> + <Button Cursor="Hand" Command="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=ListBox}, Path=DataContext.RemoveTabCommand}" CommandParameter="{Binding }" DockPanel.Dock="Right" Margin="5 0 0 0" Style="{StaticResource MaterialDesignFlatButton}" Padding="2" Height="Auto"> + <materialDesign:PackIcon Kind="Close"> + <materialDesign:PackIcon.Style> + <Style TargetType="materialDesign:PackIcon"> + <Setter Property="Foreground" Value="{StaticResource DarkGrayBrush}"></Setter> + <Style.Triggers> + <DataTrigger Binding="{Binding IsSelected}" Value="True"> + <Setter Property="Foreground" Value="{StaticResource WhiteTextBrush}"></Setter> + </DataTrigger> + </Style.Triggers> + </Style> + </materialDesign:PackIcon.Style> + </materialDesign:PackIcon> + </Button> + <TextBlock Text="{Binding Name}" VerticalAlignment="Center" TextAlignment="Center" TextTrimming="CharacterEllipsis" FontSize="11"></TextBlock> + </DockPanel> + </Border> + </DataTemplate> + </ListBox.ItemTemplate> + </ListBox> + <Button Margin="10 0 0 0" Style="{StaticResource MaterialDesignFlatButton}" Padding="2" Height="24" Cursor="Hand" Command="{Binding AddTabCommand}" ToolTip="New tab"> + <materialDesign:PackIcon Width="20" Height="20" Kind="Plus" Foreground="{StaticResource AccentColorBrush}" /> + </Button> + </StackPanel> + + <DockPanel Grid.Row="1" Margin="5 0 5 5"> + <UniformGrid Columns="2" FirstColumn="0" Name="uniformGrid1" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Loaded="ContentGrid_Loaded"> + <DockPanel Grid.Column="0" Grid.Row="0" x:Name="CyanPanel"> + <Border DockPanel.Dock="Top" Background="LightCyan" Margin="20 0 0 0 " Padding="5" CornerRadius="5" Height="40" VerticalAlignment="Top"> + <Border.Effect> + <DropShadowEffect Opacity="0.4" /> + </Border.Effect> + <Grid> + <DockPanel> + <Button Height="Auto" DockPanel.Dock="Right" Style="{StaticResource MaterialDesignFlatButton}" Padding="0" FontSize="11" Foreground="{StaticResource DarkGrayBrush200}" HorizontalAlignment="Right" Command="{Binding CreateColorDataImportExcelTemplateCommand}" ToolTip="Create excel file template" Margin="0 0 5 0"> + <materialDesign:PackIcon Kind="FileExcel" Foreground="{StaticResource DimGrayBrush}" Width="16" Height="26" /> + </Button> + <Button DockPanel.Dock="Right" HorizontalAlignment="Left" Padding="2" Height="26" Width="140" Background="Transparent" Command="{Binding SelectedTab.ImportCyanDataCommand}" ToolTip="Import Cyan data " Margin="0 0 10 0" BorderBrush="{StaticResource TransparentBackgroundBrush200}" BorderThickness="1 1 0.8 2"> + <TextBlock FontSize="14" Foreground="{StaticResource MainWindow.Foreground}">IMPORT DATA</TextBlock> + </Button> + <TextBlock VerticalAlignment="Center" HorizontalAlignment="Left" Margin="20 4 0 0" FontSize="16" Padding="0">LIQUID TYPE CYAN</TextBlock> + </DockPanel> + </Grid> + </Border> + <Grid Grid.Row="1"> + <Grid.ColumnDefinitions> + <ColumnDefinition Width="1*"/> + <ColumnDefinition Width="Auto"/> + </Grid.ColumnDefinitions> + <ContentControl Name="cyanChartsContent" Grid.Row="1" ContentTemplate="{StaticResource chartsPanel}" Content="{Binding SelectedTab.CyanPlot}"/> + <ContentControl ContentTemplate="{StaticResource calibrationDataGrid}" Content="{Binding SelectedTab.CyanCalibrationData}" Grid.Column="1"/> + </Grid> + </DockPanel> + <DockPanel Grid.Column="1"> + <Border DockPanel.Dock="Top" Background="#FC63FC" Margin="20 0 0 0 " Padding="5" CornerRadius="5" Height="40" VerticalAlignment="Top"> + <Border.Effect> + <DropShadowEffect Opacity="0.4" /> + </Border.Effect> + <Grid> + <DockPanel> + <Button Height="Auto" DockPanel.Dock="Right" Style="{StaticResource MaterialDesignFlatButton}" Padding="0" FontSize="11" Foreground="{StaticResource DarkGrayBrush200}" HorizontalAlignment="Right" Command="{Binding CreateColorDataImportExcelTemplateCommand}" ToolTip="Create excel file template" Margin="0 0 5 0"> + <materialDesign:PackIcon Kind="FileExcel" Foreground="{StaticResource DimGrayBrush}" Width="16" Height="26" /> + </Button> + <Button DockPanel.Dock="Right" HorizontalAlignment="Left" Height="26" Padding="2" Width="140" Background="Transparent" Command="{Binding SelectedTab.ImportMagentaDataCommand}" ToolTip="Import Magenta data " Margin="0 0 10 0" BorderBrush="{StaticResource TransparentBackgroundBrush200}" BorderThickness="1 1 0.8 2"> + <TextBlock FontSize="14" Foreground="{StaticResource MainWindow.Foreground}">IMPORT DATA</TextBlock> + </Button> + <TextBlock VerticalAlignment="Center" HorizontalAlignment="Left" Margin="20 4 0 0" FontSize="16" Padding="0">LIQUID TYPE MAGENTA</TextBlock> + </DockPanel> + </Grid> + </Border> + <Grid Grid.Row="1"> + <Grid.ColumnDefinitions> + <ColumnDefinition Width="1*"/> + <ColumnDefinition Width="Auto"/> + </Grid.ColumnDefinitions> + <ContentControl Name="magentaChartsContent" ContentTemplate="{StaticResource chartsPanel}" Content="{Binding SelectedTab.MagentaPlot}"/> + <ContentControl ContentTemplate="{StaticResource calibrationDataGrid}" Content="{Binding SelectedTab.MagentaCalibrationData}" Grid.Column="1"/> + </Grid> + </DockPanel > + <DockPanel Grid.Column="0" Grid.Row="1" x:Name="YellowPanel"> + <Border DockPanel.Dock="Top" Background="LightYellow" Margin="20 0 0 0 " Padding="5" CornerRadius="5" Height="40" VerticalAlignment="Top"> + <Border.Effect> + <DropShadowEffect Opacity="0.4" /> + </Border.Effect> + <Grid> + <DockPanel> + <Button Height="Auto" DockPanel.Dock="Right" Style="{StaticResource MaterialDesignFlatButton}" Padding="0" FontSize="11" Foreground="{StaticResource DarkGrayBrush200}" HorizontalAlignment="Right" Command="{Binding CreateColorDataImportExcelTemplateCommand}" ToolTip="Create excel file template" Margin="0 0 5 0"> + <materialDesign:PackIcon Kind="FileExcel" Foreground="{StaticResource DimGrayBrush}" Width="16" Height="26" /> + </Button> + <Button DockPanel.Dock="Right" HorizontalAlignment="Left" Height="26" Padding="2" Width="140" Background="Transparent" Command="{Binding SelectedTab.ImportYellowDataCommand}" ToolTip="Import Yellow data " Margin="0 0 10 0" BorderBrush="{StaticResource TransparentBackgroundBrush200}" BorderThickness="1 1 0.8 2"> + <TextBlock FontSize="14" Foreground="{StaticResource MainWindow.Foreground}">IMPORT DATA</TextBlock> + </Button> + <TextBlock VerticalAlignment="Center" HorizontalAlignment="Left" Margin="20 4 0 0" FontSize="16" Padding="0">LIQUID TYPE YELLOW</TextBlock> + </DockPanel> + </Grid> + </Border> + <Grid Grid.Row="1"> + <Grid.ColumnDefinitions> + <ColumnDefinition Width="1*"/> + <ColumnDefinition Width="Auto"/> + </Grid.ColumnDefinitions> + <ContentControl Name="yellowChartsContent" ContentTemplate="{StaticResource chartsPanel}" Content="{Binding SelectedTab.YellowPlot}"/> + <ContentControl ContentTemplate="{StaticResource calibrationDataGrid}" Content="{Binding SelectedTab.YellowCalibrationData}" Grid.Column="1"/> + </Grid> + </DockPanel> + <DockPanel Grid.Column="1" Grid.Row="1"> + <Border DockPanel.Dock="Top" Background="DarkGray" Margin="20 0 0 0 " Padding="5" CornerRadius="5" Height="40" VerticalAlignment="Top"> + <Border.Effect> + <DropShadowEffect Opacity="0.4" /> + </Border.Effect> + <Grid> + <DockPanel> + <Button Height="Auto" DockPanel.Dock="Right" Style="{StaticResource MaterialDesignFlatButton}" Padding="0" FontSize="11" Foreground="{StaticResource DarkGrayBrush200}" HorizontalAlignment="Right" Command="{Binding CreateColorDataImportExcelTemplateCommand}" ToolTip="Create excel file template" Margin="0 0 5 0"> + <materialDesign:PackIcon Kind="FileExcel" Foreground="{StaticResource DimGrayBrush}" Width="16" Height="26" /> + </Button> + <Button DockPanel.Dock="Right" HorizontalAlignment="Left" Height="26" Padding="2" Width="140" Background="Transparent" Command="{Binding SelectedTab.ImportBlackDataCommand}" ToolTip="Import Black data " Margin="0 0 10 0" BorderBrush="{StaticResource TransparentBackgroundBrush200}" BorderThickness="1 1 0.8 2" > + <TextBlock FontSize="14" Foreground="{StaticResource MainWindow.Foreground}">IMPORT DATA</TextBlock> + </Button> + <TextBlock VerticalAlignment="Center" HorizontalAlignment="Left" Margin="20 4 0 0" FontSize="16" Padding="0">LIQUID TYPE BLACK</TextBlock> + </DockPanel> + </Grid> + + </Border> + <Grid Grid.Row="1"> + <Grid.ColumnDefinitions> + <ColumnDefinition Width="1*"/> + <ColumnDefinition Width="Auto"/> + </Grid.ColumnDefinitions> + <ContentControl Name="blackChartsContent" ContentTemplate="{StaticResource chartsPanel}" Content="{Binding SelectedTab.BlackPlot}"/> + <ContentControl ContentTemplate="{StaticResource calibrationDataGrid}" Content="{Binding SelectedTab.BlackCalibrationData}" Grid.Column="1"/> + </Grid> + </DockPanel> + </UniformGrid> + </DockPanel> + </Grid> + </Grid> +</UserControl> diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/ColorCalibrationView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/ColorCalibrationView.xaml.cs new file mode 100644 index 000000000..84219c093 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/ColorCalibrationView.xaml.cs @@ -0,0 +1,77 @@ +using OxyPlot.Wpf; +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.Controls.Primitives; +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.ThreadExtensions.ViewModels; + +namespace Tango.MachineStudio.ThreadExtensions.Views +{ + /// <summary> + /// Interaction logic for ColorCalibrationView.xaml + /// </summary> + public partial class ColorCalibrationView : UserControl + { + public ColorCalibrationView() + { + InitializeComponent(); + } + + private void ContentGrid_Loaded(object sender, RoutedEventArgs e) + { + var grid = (UIElement)sender; + if (grid != null && ((UniformGrid)grid).DataContext is ColorCalibrationViewVM) + { + ColorCalibrationViewVM vm = (ColorCalibrationViewVM)((UniformGrid)grid).DataContext; + ColorCalibrationTabVM selectedTab = vm.SelectedTab; + if (selectedTab != null && !selectedTab.IsTabLoaded) + { + InitPlots(selectedTab); + vm.IsViewLoaded = true; + } + } + } + + private void ListBox_SelectionChanged(object sender, SelectionChangedEventArgs e) + { + var listBox = (UIElement)sender; + if (listBox != null && ((ListBox)listBox).DataContext is ColorCalibrationViewVM) + { + ColorCalibrationViewVM vm = (ColorCalibrationViewVM)((ListBox)listBox).DataContext; + ColorCalibrationTabVM selectedTab = vm.SelectedTab; + InitPlots(selectedTab); + } + } + + private void InitPlots(ColorCalibrationTabVM selectedTab) + { + if (selectedTab != null && !selectedTab.IsTabLoaded) + { + if (null == (cyanChartsContent as FrameworkElement).FindChild<Plot>("LABDataPlot")) + return; + selectedTab.CyanPlot.DataPlotControl = (cyanChartsContent as FrameworkElement).FindChild<Plot>("LABDataPlot"); + selectedTab.CyanPlot.LinearizationPlotControl = (cyanChartsContent as FrameworkElement).FindChild<Plot>("LinearizationPlot"); + selectedTab.MagentaPlot.DataPlotControl = (magentaChartsContent as FrameworkElement).FindChild<Plot>("LABDataPlot"); + selectedTab.MagentaPlot.LinearizationPlotControl = (magentaChartsContent as FrameworkElement).FindChild<Plot>("LinearizationPlot"); + selectedTab.YellowPlot.DataPlotControl = (yellowChartsContent as FrameworkElement).FindChild<Plot>("LABDataPlot"); + selectedTab.YellowPlot.LinearizationPlotControl = (yellowChartsContent as FrameworkElement).FindChild<Plot>("LinearizationPlot"); + selectedTab.BlackPlot.DataPlotControl = (blackChartsContent as FrameworkElement).FindChild<Plot>("LABDataPlot"); + selectedTab.BlackPlot.LinearizationPlotControl = (blackChartsContent as FrameworkElement).FindChild<Plot>("LinearizationPlot"); + + selectedTab.InitData(); + selectedTab.IsTabLoaded = true; + } + } + } +} diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/ColorShadeView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/ColorShadeView.xaml new file mode 100644 index 000000000..b9341d0de --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/ColorShadeView.xaml @@ -0,0 +1,197 @@ +<UserControl x:Class="Tango.MachineStudio.ThreadExtensions.Views.ColorShadeView" + xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" + 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:converters="clr-namespace:Tango.SharedUI.Converters;assembly=Tango.SharedUI" + xmlns:mahapps="http://metro.mahapps.com/winfx/xaml/controls" + xmlns:autoCompleteMachine="clr-namespace:Tango.MachineStudio.Common.AutoComplete;assembly=Tango.MachineStudio.Common" + xmlns:local="clr-namespace:Tango.MachineStudio.ThreadExtensions.Views" + xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes" + xmlns:vm="clr-namespace:Tango.MachineStudio.ThreadExtensions.ViewModels" + xmlns:fa="http://schemas.fontawesome.io/icons/" + mc:Ignorable="d" + d:DesignHeight="450" d:DesignWidth="800" Background="Transparent" d:DataContext="{d:DesignInstance Type=vm:ColorShadeViewVM, IsDesignTimeCreatable=False}" FontSize="16"> + + <UserControl.Resources> + <autoCompleteMachine:MachinesProvider x:Key="MachinesProvider" /> + <converters:EnumToDescriptionConverter x:Key="EnumToDescriptionConverter" /> + + + <Style TargetType="DataGridCell" BasedOn="{StaticResource {x:Type DataGridCell}}"> + <Setter Property="BorderThickness" Value="0"/> + <Setter Property="FocusVisualStyle" Value="{x:Null}"/> + <Setter Property="VerticalContentAlignment" Value="Center"></Setter> + </Style> + + </UserControl.Resources> + + <Grid x:Name="contentGrid" DataContext="{Binding ColorShadeViewVM}" > + <Grid.RowDefinitions> + <RowDefinition Height="Auto"/> + <RowDefinition Height="1*"/> + </Grid.RowDefinitions> + + <DockPanel Grid.Row="0"> + <Button DockPanel.Dock="Right" HorizontalAlignment="Right" Width="170" Height="36" Margin="0 0 26 0" VerticalAlignment="Center" Command="{Binding SaveCommand}"> + <StackPanel Orientation="Horizontal"> + <materialDesign:PackIcon Kind="ContentSaveAll" Width="24" Height="24" /> + <TextBlock VerticalAlignment="Center" Margin="10 0 0 0">SAVE</TextBlock> + </StackPanel> + </Button> + </DockPanel> + <Grid Grid.Row="1" > + <Grid.RowDefinitions> + <RowDefinition Height="30"/> + <RowDefinition Height="1*"/> + </Grid.RowDefinitions> + <StackPanel Orientation="Horizontal" Margin="35 0 0 0"> + <ListBox Style="{x:Null}" HorizontalAlignment="Left" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch" ItemContainerStyle="{StaticResource basicListBoxItem}" ScrollViewer.HorizontalScrollBarVisibility="Disabled" ScrollViewer.VerticalScrollBarVisibility="Disabled" Background="Transparent" BorderThickness="0" ItemsSource="{Binding ColorShadeTabs}" SelectedItem="{Binding SelectedTab}"> + <ListBox.ItemsPanel> + <ItemsPanelTemplate> + <StackPanel HorizontalAlignment="Left" Orientation="Horizontal"></StackPanel> + </ItemsPanelTemplate> + </ListBox.ItemsPanel> + + <ListBox.ItemTemplate> + <DataTemplate> + <Border Padding="5 5" Width="160" CornerRadius="10 10 0 0" Margin="1 0" Tag="{Binding RelativeSource={RelativeSource AncestorType=ListBox},Path=DataContext}"> + <Border.ContextMenu> + <ContextMenu DataContext="{Binding Path=PlacementTarget.Tag, RelativeSource={RelativeSource Self}}" Style="{x:Null}" > + <MenuItem Header="Rename" Command="{Binding RenameTabCommand}" MinWidth="210" MaxHeight="40" > + <MenuItem.Icon> + <fa:ImageAwesome Icon="Pencil" Width="16" /> + </MenuItem.Icon> + </MenuItem> + </ContextMenu> + </Border.ContextMenu> + <Border.Style> + <Style TargetType="Border"> + <Setter Property="Background" Value="{StaticResource LightGrayBrush150}"></Setter> + <Setter Property="TextElement.Foreground" Value="{StaticResource DarkGrayBrush}"></Setter> + <Style.Triggers> + <DataTrigger Binding="{Binding IsSelected}" Value="True"> + <Setter Property="Background" Value="{StaticResource AccentColorBrush}"></Setter> + <Setter Property="TextElement.Foreground" Value="{StaticResource WhiteTextBrush}"></Setter> + </DataTrigger> + <Trigger Property="IsMouseOver" Value="True"> + <Setter Property="Opacity" Value="0.8"></Setter> + </Trigger> + </Style.Triggers> + </Style> + </Border.Style> + <DockPanel VerticalAlignment="Center"> + <Button Cursor="Hand" Command="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=ListBox}, Path=DataContext.RemoveTabCommand}" CommandParameter="{Binding }" DockPanel.Dock="Right" Margin="5 0 0 0" Style="{StaticResource MaterialDesignFlatButton}" Padding="2" Height="Auto"> + <materialDesign:PackIcon Kind="Close"> + <materialDesign:PackIcon.Style> + <Style TargetType="materialDesign:PackIcon"> + <Setter Property="Foreground" Value="{StaticResource DarkGrayBrush}"></Setter> + <Style.Triggers> + <DataTrigger Binding="{Binding IsSelected}" Value="True"> + <Setter Property="Foreground" Value="{StaticResource WhiteTextBrush}"></Setter> + </DataTrigger> + </Style.Triggers> + </Style> + </materialDesign:PackIcon.Style> + </materialDesign:PackIcon> + </Button> + <TextBlock Text="{Binding Name}" VerticalAlignment="Center" TextAlignment="Center" TextTrimming="CharacterEllipsis" FontSize="11"></TextBlock> + </DockPanel> + </Border> + </DataTemplate> + </ListBox.ItemTemplate> + </ListBox> + <Button Margin="10 0 0 0" Style="{StaticResource MaterialDesignFlatButton}" Padding="2" Height="24" Cursor="Hand" Command="{Binding AddTabCommand}" ToolTip="New tab"> + <materialDesign:PackIcon Width="20" Height="20" Kind="Plus" Foreground="{StaticResource AccentColorBrush}" /> + </Button> + </StackPanel> + + <Border Margin="5 0 5 5" Grid.Row="1" Background="Transparent" Padding="4" CornerRadius="5" VerticalAlignment="Top" BorderThickness="2" BorderBrush="{StaticResource borderBrush}"> + <DockPanel > + <DockPanel DockPanel.Dock="Top" Height="30"> + <Button Height="Auto" DockPanel.Dock="Right" Style="{StaticResource MaterialDesignFlatButton}" FontSize="11" Foreground="{StaticResource DarkGrayBrush200}" HorizontalAlignment="Right" Command="{Binding CreateColorDataImportExcelTemplateCommand}" ToolTip="Create excel file template" Margin="0 0 10 0"> + <materialDesign:PackIcon Kind="FileExcel" Foreground="{StaticResource DimGrayBrush}" Width="26" Height="24" /> + </Button> + <Button DockPanel.Dock="Right" HorizontalAlignment="Right" Height="Auto" Width="180" Command="{Binding SelectedTab.ImportColorsCommand}" ToolTip="Import Cyan data " Margin="0 0 10 0" > + <TextBlock FontSize="14" VerticalAlignment="Center" >IMPORT COLORS</TextBlock> + </Button> + </DockPanel> + <Grid DockPanel.Dock="Bottom" Margin="0 0 0 0"> + <DataGrid Margin="10" BorderBrush="Silver" BorderThickness="1" RowHeight="30" Background="{StaticResource TransparentBackgroundBrush}" AlternatingRowBackground="{StaticResource Transparent200}" AutoGenerateColumns="False" CanUserAddRows="True" CanUserDeleteRows="True" ItemsSource="{Binding SelectedTab.RmlExtensionColorShadesTest.RmlExtensionColorShadesTestsData}" IsReadOnly="False" + ScrollViewer.CanContentScroll="True" ScrollViewer.VerticalScrollBarVisibility="Auto" MinHeight="700"> + <DataGrid.ColumnHeaderStyle > + <Style TargetType="{x:Type DataGridColumnHeader}" BasedOn="{StaticResource {x:Type DataGridColumnHeader}}"> + <Setter Property="FontSize" Value="16"/> + <Setter Property="HorizontalAlignment" Value="Center"/> + <Setter Property="VerticalAlignment" Value="Center"/> + <Setter Property="Margin" Value="2 0 0 0"/> + <Setter Property="Padding" Value="0 5"/> + <Setter Property="FrameworkElement.HorizontalAlignment" Value="Stretch"/> + <Setter Property="HorizontalContentAlignment" Value="Center"/> + </Style> + </DataGrid.ColumnHeaderStyle> + <DataGrid.CellStyle> + <Style TargetType="DataGridCell" BasedOn="{StaticResource {x:Type DataGridCell}}"> + <Setter Property="BorderThickness" Value="0"/> + <Setter Property="FocusVisualStyle" Value="{x:Null}"/> + <Setter Property="VerticalContentAlignment" Value="Center"></Setter> + <Setter Property="Padding" Value="4"></Setter> + <Setter Property="Margin" Value="0 0 0 0"></Setter> + </Style> + </DataGrid.CellStyle> + <DataGrid.Columns> + <DataGridTextColumn Header="Number" Binding="{Binding ColorNum}" Width="80" /> + <DataGridTemplateColumn Header="Shade" Width="200"> + <DataGridTemplateColumn.CellTemplate> + <DataTemplate> + <Rectangle Fill="{Binding ColorBrush, Mode=OneWay}"/> + </DataTemplate> + </DataGridTemplateColumn.CellTemplate> + </DataGridTemplateColumn> + + <DataGridTextColumn Header="L" Binding="{Binding L, UpdateSourceTrigger=PropertyChanged}" Width="1*" /> + <DataGridTextColumn Header="A" Binding="{Binding A, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Width="1*"/> + <DataGridTextColumn Header="B" Binding="{Binding B, UpdateSourceTrigger=PropertyChanged}" Width="1*"/> + <DataGridTextColumn Header="C" Binding="{Binding C, UpdateSourceTrigger=PropertyChanged}" Width="1*" /> + <DataGridTextColumn Header="M" Binding="{Binding M, UpdateSourceTrigger=PropertyChanged}" Width="1*"/> + <DataGridTextColumn Header="Y" Binding="{Binding Y, UpdateSourceTrigger=PropertyChanged}" Width="1*"/> + <DataGridTextColumn Header="K" Binding="{Binding K, UpdateSourceTrigger=PropertyChanged}" Width="1*" /> + <DataGridTextColumn Header="TI" Binding="{Binding TI, UpdateSourceTrigger=PropertyChanged}" Width="1*"/> + <DataGridTextColumn Header="L" Binding="{Binding LRes, UpdateSourceTrigger=PropertyChanged}" Width="1*"> + <DataGridTextColumn.CellStyle> + <Style TargetType="DataGridCell" BasedOn="{StaticResource {x:Type DataGridCell}}"> + <Setter Property="Background" Value="LightCyan" /> + </Style> + </DataGridTextColumn.CellStyle> + </DataGridTextColumn> + <DataGridTextColumn Header="A" Binding="{Binding ARes}" Width="1*" > + <DataGridTextColumn.CellStyle> + <Style TargetType="DataGridCell" BasedOn="{StaticResource {x:Type DataGridCell}}"> + <Setter Property="Background" Value="LightCyan" /> + </Style> + </DataGridTextColumn.CellStyle> + </DataGridTextColumn> + <DataGridTextColumn Header="B" Binding="{Binding BRes}" Width="1*"> + <DataGridTextColumn.CellStyle> + <Style TargetType="DataGridCell" BasedOn="{StaticResource {x:Type DataGridCell}}"> + <Setter Property="Background" Value="LightCyan" /> + </Style> + </DataGridTextColumn.CellStyle> + </DataGridTextColumn> + <DataGridTextColumn Header="Delta E" Binding="{Binding DeltaE}" Width="1*"> + <DataGridTextColumn.CellStyle> + <Style TargetType="DataGridCell" BasedOn="{StaticResource {x:Type DataGridCell}}"> + <Setter Property="Background" Value="LightCyan" /> + <Setter Property="Foreground" Value="red" /> + <Setter Property="VerticalContentAlignment" Value="Center"></Setter> + </Style> + </DataGridTextColumn.CellStyle> + </DataGridTextColumn> + </DataGrid.Columns> + </DataGrid> + </Grid> + </DockPanel> + </Border> + </Grid> + </Grid> +</UserControl> diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/ColorShadeView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/ColorShadeView.xaml.cs new file mode 100644 index 000000000..2a8079cfe --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/ColorShadeView.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.ThreadExtensions.Views +{ + /// <summary> + /// Interaction logic for ColorShadeView.xaml + /// </summary> + public partial class ColorShadeView : UserControl + { + public ColorShadeView() + { + InitializeComponent(); + } + } +} diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/MachineTestResultsView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/MachineTestResultsView.xaml index bfb8a58d0..820c68715 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/MachineTestResultsView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/MachineTestResultsView.xaml @@ -58,6 +58,12 @@ <TabItem Header="TEST RESULTS" Margin="20 0 0 0" mahapps:ControlsHelper.HeaderFontSize="20" > <local:TestResultsView /> </TabItem> + <TabItem Header="COLOR CALIBRATION" Margin="20 0 0 0" mahapps:ControlsHelper.HeaderFontSize="20"> + <local:ColorCalibrationView/> + </TabItem> + <TabItem Header="COLOR SHADE" Margin="20 0 0 0" mahapps:ControlsHelper.HeaderFontSize="20"> + <local:ColorShadeView/> + </TabItem> </TabControl> </Grid> </DockPanel> diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/TestResultsView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/TestResultsView.xaml index 50a2537e1..f6262b52d 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/TestResultsView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/TestResultsView.xaml @@ -158,33 +158,12 @@ </UserControl.Resources> <Grid DataContext="{Binding TestResultsViewVM}"> - <Grid.RowDefinitions> + <!--<Grid.RowDefinitions> <RowDefinition Height="Auto"/> <RowDefinition Height="1*"/> - </Grid.RowDefinitions> - <DockPanel Grid.Row="0"> - <Button DockPanel.Dock="Top" HorizontalAlignment="Right" Width="170" Height="36" Margin="0 0 26 0" VerticalAlignment="Center" Command="{Binding SaveCommand}"> - <StackPanel Orientation="Horizontal"> - <materialDesign:PackIcon Kind="ContentSaveAll" Width="24" Height="24" /> - <TextBlock VerticalAlignment="Center" Margin="10 0 0 0">SAVE</TextBlock> - </StackPanel> - </Button> - <!--<StackPanel Orientation="Horizontal" DockPanel.Dock="Top"> - <TextBlock Margin="40 20" FontSize="30" FontWeight="SemiBold" FontStyle="Italic">TARGET MACHINE</TextBlock> - - <autoComplete:AutoCompleteTextBox Provider="{StaticResource MachinesProvider}" LoadingContent="Loading..." FontSize="20" SelectedItem="{Binding SelectedMachine,Mode=TwoWay}" materialDesign:HintAssist.Hint="Serial Number" DisplayMember="SerialNumber" Width="280"> - <autoComplete:AutoCompleteTextBox.ItemTemplate> - <DataTemplate> - <StackPanel> - <TextBlock Text="{Binding SerialNumber}" FontWeight="Bold" FontStyle="Italic"></TextBlock> - <TextBlock FontSize="11" Text="{Binding Name}" Foreground="Gray"></TextBlock> - </StackPanel> - </DataTemplate> - </autoComplete:AutoCompleteTextBox.ItemTemplate> - </autoComplete:AutoCompleteTextBox> - </StackPanel>--> - </DockPanel> - <Grid Grid.Row="1" > + </Grid.RowDefinitions>--> + + <Grid Grid.Row="1" Margin="0 8 0 0" > <Grid.RowDefinitions> <RowDefinition Height="30"/> <RowDefinition Height="1*"/> @@ -265,22 +244,17 @@ </ItemsControl> <Grid Grid.Column="0" MinWidth="600" HorizontalAlignment="Left" > - <DockPanel > - - <Grid DockPanel.Dock="Bottom" Margin="20 10 20 40"> - <TextBlock FontSize="21">Conclusion:</TextBlock> - <TextBox Margin="120 0 10 0" HorizontalAlignment="Stretch" Height="46" Text="{Binding SelectedTab.TestResult.Conclusions}" Style="{StaticResource Rounded_Corners_TextBox_Multiline}"></TextBox> - </Grid> - - <Grid DockPanel.Dock="Bottom" Margin="20 10 20 0"> - <TextBlock FontSize="21">Comments:</TextBlock> - <TextBox Margin="120 0 10 0" Style="{StaticResource Rounded_Corners_TextBox_Multiline}" HorizontalAlignment="Stretch" Height="46" Text="{Binding SelectedTab.TestResult.Comment}"></TextBox> + <Grid.RowDefinitions> + <RowDefinition Height="3*"/> + <RowDefinition Height="1*"/> + </Grid.RowDefinitions> + <Grid.ColumnDefinitions> + <ColumnDefinition Width="1*"/> + <ColumnDefinition Width="1*"/> + </Grid.ColumnDefinitions> - </Grid> - - <Border Padding="10 10 20 10" DockPanel.Dock="Top" BorderBrush="Transparent" BorderThickness="1" > - - <ScrollViewer VerticalScrollBarVisibility="Auto" > + <Border Padding="10 10 20 10" Grid.ColumnSpan="2" Grid.Row="0" BorderBrush="Transparent" BorderThickness="1" > + <ScrollViewer VerticalScrollBarVisibility="Auto" > <Grid HorizontalAlignment="Left"> <Grid.ColumnDefinitions> <ColumnDefinition Width="1*"></ColumnDefinition> @@ -293,8 +267,8 @@ </Grid.RowDefinitions> <Border> <StackPanel x:Name="DryerTempPanel" HorizontalAlignment="Stretch" Grid.Column="0" Grid.Row="0" > - <DockPanel Margin="0 0 0 0"> - <Button DockPanel.Dock="Right" Margin="0 0 40 0" HorizontalAlignment="Left" Padding="0" Height="Auto" Width="200" Command="{Binding ApplyToProcessParametersCommand}" ToolTip="Apply to Process Parameters" VerticalContentAlignment="Center"> + <DockPanel Margin="0 10 0 0"> + <Button DockPanel.Dock="Right" Margin="0 0 40 0" HorizontalAlignment="Left" Padding="0" Width="200" Command="{Binding ApplyToProcessParametersCommand}" ToolTip="Apply to Process Parameters" VerticalContentAlignment="Center"> <TextBlock FontSize="14" Background="Transparent" VerticalAlignment="Center" Margin="0 2 0 0">Apply to Process Parameters</TextBlock> </Button> <TextBlock HorizontalAlignment="Center" FontSize="21" Margin="180 10 0 0"> Process Parameters</TextBlock> @@ -390,7 +364,7 @@ </DataGrid> </StackPanel> - <StackPanel x:Name="TensionresultsPanel" Grid.Column="1" Grid.Row="0" Margin="0 10 0 0" > + <StackPanel x:Name="TensionresultsPanel" Grid.Column="1" Grid.Row="0" Margin="0 20 0 0" > <TextBlock HorizontalAlignment="Center" FontSize="21"> Tension through the thread path</TextBlock> <Border BorderThickness="1" BorderBrush="{StaticResource GrayBrush200}" Margin="0 10 20 10" > <UniformGrid Columns="4" Background="{StaticResource TransparentBackgroundBrush}" HorizontalAlignment="Left" MinWidth="{ Binding ElementName=MechanicalPropertiesGrid, Path= ActualWidth }" > @@ -631,10 +605,93 @@ </ScrollViewer> </Border> + <Grid Grid.Row="1" Grid.Column="1" Margin="0 0 20 20"> + <Grid.ColumnDefinitions> + <ColumnDefinition Width="120"/> + <ColumnDefinition Width="1*"/> + </Grid.ColumnDefinitions> + <Grid.RowDefinitions> + <RowDefinition Height="1*"/> + <RowDefinition Height="1*" /> + </Grid.RowDefinitions> + + <TextBlock FontSize="21" HorizontalAlignment="Left" VerticalAlignment="Center">Conclusion:</TextBlock> + <TextBox Grid.Column="1" Margin="20 0 20 0" HorizontalAlignment="Stretch" Height="46" Text="{Binding SelectedTab.TestResult.Conclusions}" Style="{StaticResource Rounded_Corners_TextBox_Multiline}"></TextBox> + + <TextBlock Grid.Row="1" FontSize="21" HorizontalAlignment="Left" VerticalAlignment="Center">Comments:</TextBlock> + <TextBox Grid.Column="1" Grid.Row="1" Margin="20 0 20 0" Style="{StaticResource Rounded_Corners_TextBox_Multiline}" HorizontalAlignment="Stretch" Height="46" Text="{Binding SelectedTab.TestResult.Comment}" VerticalAlignment="Center"></TextBox> + + </Grid> + <DockPanel Grid.Row="1" Grid.Column="0" Margin="20 0 20 20" x:Name="ImportExcelFile"> + <DockPanel DockPanel.Dock="Top" Margin="0 0 20 0"> + <Button Margin="10 0 0 0" Padding="2" Height="24" Cursor="Hand" Width="100" Command="{Binding SelectedTab.UploadCommand}" ToolTip="Upload selected files">Upload</Button> + <Button DockPanel.Dock="Right" Margin="0 0 10 0" HorizontalAlignment="Right" Padding="2" Height="24" Cursor="Hand" Width="100" Command="{Binding SelectedTab.DownLoadAllCommand}" ToolTip="Upload selected files">Download All</Button> + </DockPanel> + + <Grid DockPanel.Dock="Bottom" Margin="0 0 20 0"> + <DataGrid Margin="10" RowHeight="30" Padding="0" SelectionUnit="FullRow" BorderBrush="{StaticResource DarkGrayBrush }" BorderThickness="1" Background="{StaticResource TransparentBackgroundBrush}" AlternatingRowBackground="{StaticResource Transparent200}" AutoGenerateColumns="False" CanUserAddRows="False" CanUserDeleteRows="False" ItemsSource="{Binding SelectedTab.TestResultsFiles}" IsReadOnly="True" + ScrollViewer.CanContentScroll="True" ScrollViewer.VerticalScrollBarVisibility="Auto" MinHeight="100"> + <DataGrid.ColumnHeaderStyle > + <Style TargetType="{x:Type DataGridColumnHeader}" BasedOn="{StaticResource {x:Type DataGridColumnHeader}}"> + <Setter Property="FontSize" Value="16"/> + <Setter Property="HorizontalAlignment" Value="Left"/> + <Setter Property="Margin" Value="2 0 0 0"/> + <Setter Property="Padding" Value="0 5"/> + <Setter Property="FrameworkElement.HorizontalAlignment" Value="Stretch"/> + <Setter Property="HorizontalContentAlignment" Value="Left"/> + </Style> + </DataGrid.ColumnHeaderStyle> + <DataGrid.CellStyle> + <Style TargetType="DataGridCell" BasedOn="{StaticResource {x:Type DataGridCell}}"> + <Setter Property="BorderThickness" Value="0"/> + <Setter Property="FocusVisualStyle" Value="{x:Null}"/> + <Setter Property="VerticalContentAlignment" Value="Center"></Setter> + <Setter Property="Padding" Value="0"></Setter> + <Setter Property="Margin" Value="0 0 0 0"></Setter> + </Style> + </DataGrid.CellStyle> + <DataGrid.Columns> + <DataGridTextColumn Header="File Name" Binding="{Binding FileName}" Width="1*" FontSize="16"/> + <DataGridTextColumn Header="Progress" Width="1*" /> + <DataGridTemplateColumn Header="DownLoad" Width="140"> + <DataGridTemplateColumn.CellTemplate> + <DataTemplate> + <Button Style="{StaticResource emptyButton}" Cursor="Hand" Command="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type Grid},AncestorLevel=2},Path=DataContext.SelectedTab.DownLoadFileCommand}" CommandParameter="{Binding}"> + <StackPanel Orientation="Horizontal"> + <TextBlock FontSize="16" Text="Download" VerticalAlignment="Center"></TextBlock> + <materialDesign:PackIcon VerticalAlignment="Center" Margin="5 0 0 0" Kind="Download" Width="18" /> + </StackPanel> + </Button> + </DataTemplate> + </DataGridTemplateColumn.CellTemplate> + </DataGridTemplateColumn> + <DataGridTemplateColumn Header="Delete" Width="140"> + <DataGridTemplateColumn.CellTemplate> + <DataTemplate> + <Button Style="{StaticResource emptyButton}" Cursor="Hand" Command="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type Grid},AncestorLevel=2},Path=DataContext.SelectedTab.DeleteCommand}" CommandParameter="{Binding}"> + <StackPanel Orientation="Horizontal"> + <TextBlock FontSize="16" Text="Delete" VerticalAlignment="Center"></TextBlock> + <materialDesign:PackIcon VerticalAlignment="Center" Margin="5 0 0 0" Kind="Delete" Width="18" /> + </StackPanel> + </Button> + </DataTemplate> + </DataGridTemplateColumn.CellTemplate> + </DataGridTemplateColumn> + </DataGrid.Columns> + </DataGrid> + </Grid> </DockPanel> </Grid> </Grid> </Grid> - + <DockPanel VerticalAlignment="Top"> + <Button DockPanel.Dock="Top" HorizontalAlignment="Right" Width="170" Height="36" Margin="0 0 26 0" VerticalAlignment="Center" Command="{Binding SaveCommand}"> + <StackPanel Orientation="Horizontal"> + <materialDesign:PackIcon Kind="ContentSaveAll" Width="24" Height="24" /> + <TextBlock VerticalAlignment="Center" Margin="10 0 0 0">SAVE</TextBlock> + </StackPanel> + </Button> + + </DockPanel> </Grid> </UserControl> diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/packages.config b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/packages.config index da5ed8abc..f9bce0fbf 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/packages.config +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/packages.config @@ -6,6 +6,8 @@ <package id="MahApps.Metro" version="1.5.0" targetFramework="net461" /> <package id="MaterialDesignColors" version="1.1.2" targetFramework="net461" /> <package id="MaterialDesignThemes" version="2.3.1.953" targetFramework="net461" /> + <package id="Microsoft.WindowsAPICodePack-Core" version="1.1.0.0" targetFramework="net461" /> + <package id="Microsoft.WindowsAPICodePack-Shell" version="1.1.0.0" targetFramework="net461" /> <package id="Newtonsoft.Json" version="9.0.1" targetFramework="net461" /> <package id="OxyPlot.Core" version="2.0.0" targetFramework="net461" /> <package id="OxyPlot.Wpf" version="2.0.0" targetFramework="net461" /> diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/app.manifest b/Software/Visual_Studio/PPC/Tango.PPC.UI/app.manifest index d72e75011..efc5f8179 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/app.manifest +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/app.manifest @@ -16,7 +16,7 @@ Remove this element if your application requires this virtualization for backwards compatibility. --> - <requestedExecutionLevel level="requireAdministrator" uiAccess="false" /> + <!--<requestedExecutionLevel level="requireAdministrator" uiAccess="false" />--> </requestedPrivileges> </security> </trustInfo> diff --git a/Software/Visual_Studio/Resources/ColorDataInputTemplate.xlsx b/Software/Visual_Studio/Resources/ColorDataInputTemplate.xlsx Binary files differnew file mode 100644 index 000000000..4485524b3 --- /dev/null +++ b/Software/Visual_Studio/Resources/ColorDataInputTemplate.xlsx diff --git a/Software/Visual_Studio/Resources/ColorShadesTemplate.xlsx b/Software/Visual_Studio/Resources/ColorShadesTemplate.xlsx Binary files differnew file mode 100644 index 000000000..cf98c2b1b --- /dev/null +++ b/Software/Visual_Studio/Resources/ColorShadesTemplate.xlsx diff --git a/Software/Visual_Studio/Tango.BL/Builders/RMLExtensionColorCalibrationBuilder.cs b/Software/Visual_Studio/Tango.BL/Builders/RMLExtensionColorCalibrationBuilder.cs new file mode 100644 index 000000000..041f3c824 --- /dev/null +++ b/Software/Visual_Studio/Tango.BL/Builders/RMLExtensionColorCalibrationBuilder.cs @@ -0,0 +1,60 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Tango.BL.Entities; +using System.Data.Entity; + +namespace Tango.BL.Builders +{ + public class RMLExtensionColorCalibrationBuilder : EntityCollectionBuilderBase<RmlExtensionColorCalibration, RMLExtensionColorCalibrationBuilder> + { + public RMLExtensionColorCalibrationBuilder(ObservablesContext context) : base(context) + { + } + + public virtual RMLExtensionColorCalibrationBuilder ForRMLExtension(String rmlExtensionGUID) + { + return AddQueryStep(0, (query) => + { + if (rmlExtensionGUID != null) + { + return query.Where(x => x.RmlsExtensionsGuid == rmlExtensionGUID); + } + else + { + return query; + } + }); + } + public virtual RMLExtensionColorCalibrationBuilder ForMachine(String machineGUID) + { + return AddQueryStep(1, (query) => + { + if (machineGUID != null) + { + return query.Where(x => x.MachineGuid == machineGUID); + } + else + { + return query; + } + }); + } + public virtual RMLExtensionColorCalibrationBuilder WithTests() + { + return AddStep(2, () => + { + foreach (var result in Entities.ToList()) + { + var testsList = Context.RmlExtensionColorCalibrationsTests.Where(x => x.RmlExtensionColorCalibrationGuid == result.Guid).OrderBy(x => x.ID).ToList(); + foreach (var test in testsList) + { + var b = Context.RmlExtensionColorCalibrationsTestsLiquidData.Where(x => x.RmlExtensionColorCalibrationsTestGuid == test.Guid).Include(z=>z.LiquidType).Include(y => y.RmlExtensionColorCalibrationsTestsLiquidDataPoints).ToList(); + } + } + }); + } + } +} diff --git a/Software/Visual_Studio/Tango.BL/Builders/RMLExtensionColorShadeBuilder.cs b/Software/Visual_Studio/Tango.BL/Builders/RMLExtensionColorShadeBuilder.cs new file mode 100644 index 000000000..0f1894b4a --- /dev/null +++ b/Software/Visual_Studio/Tango.BL/Builders/RMLExtensionColorShadeBuilder.cs @@ -0,0 +1,61 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Tango.BL.Entities; +using System.Data.Entity; + +namespace Tango.BL.Builders +{ + public class RMLExtensionColorShadeBuilder : EntityCollectionBuilderBase<RmlExtensionColorShade, RMLExtensionColorShadeBuilder> + { + public RMLExtensionColorShadeBuilder(ObservablesContext context) : base(context) + { + } + + public virtual RMLExtensionColorShadeBuilder ForRMLExtension(String rmlExtensionGUID) + { + return AddQueryStep(0, (query) => + { + if (rmlExtensionGUID != null) + { + return query.Where(x => x.RmlsExtensionsGuid == rmlExtensionGUID); + } + else + { + return query; + } + }); + } + public virtual RMLExtensionColorShadeBuilder ForMachine(String machineGUID) + { + return AddQueryStep(1, (query) => + { + if (machineGUID != null) + { + return query.Where(x => x.MachineGuid == machineGUID); + } + else + { + return query; + } + }); + } + public virtual RMLExtensionColorShadeBuilder WithTests() + { + return AddStep(2, () => + { + foreach (var result in Entities.ToList()) + { + var testsList = Context.RmlExtensionColorShadesTests.Where(x => x.RmlExtensionColorShadesGuid == result.Guid).Include(y => y.RmlExtensionColorShadesTestsData).OrderBy(z => z.ID).ToList(); + + //foreach (var test in testsList) + //{ + // var b = Context.RmlExtensionColorShadesTestsData.Where(x => x.RmlExtensionColorShadesTestsGuid == test.Guid).ToList(); + //} + } + }); + } + } +} diff --git a/Software/Visual_Studio/Tango.BL/Builders/RMLExtensionTestResultsCollectionBuilder.cs b/Software/Visual_Studio/Tango.BL/Builders/RMLExtensionTestResultsCollectionBuilder.cs index 574439852..2b962d56b 100644 --- a/Software/Visual_Studio/Tango.BL/Builders/RMLExtensionTestResultsCollectionBuilder.cs +++ b/Software/Visual_Studio/Tango.BL/Builders/RMLExtensionTestResultsCollectionBuilder.cs @@ -26,6 +26,16 @@ namespace Tango.BL.Builders } }); } + public virtual RMLExtensionTestResultsCollectionBuilder WithTestResultsFiles() + { + return AddStep(3, () => + { + foreach (var result in Entities.ToList()) + { + Context.RmlExtensionTestResultsFiles.Where(x => x.RmlExtensionTestResultsGuid == result.Guid).OrderBy(x => x.FileName).ToList(); + } + }); + } public virtual RMLExtensionTestResultsCollectionBuilder ForRMLExtension(String rmlExtensionGUID) { return AddQueryStep(0, (query) => diff --git a/Software/Visual_Studio/Tango.BL/Calibration/CalibrationHelper.cs b/Software/Visual_Studio/Tango.BL/Calibration/CalibrationHelper.cs index 64658ebee..ced98dbff 100644 --- a/Software/Visual_Studio/Tango.BL/Calibration/CalibrationHelper.cs +++ b/Software/Visual_Studio/Tango.BL/Calibration/CalibrationHelper.cs @@ -57,5 +57,31 @@ namespace Tango.BL.Calibration stream.CopyTo(fs); } } + + /// <summary> + /// Creates the calibration data excel template. + /// </summary> + /// <param name="fileName">Name of the file.</param> + public static void CreateColorDataInputExcelTemplate(String fileName) + { + var stream = EmbeddedResourceHelper.GetEmbeddedResourceStream("Tango.BL.Calibration.ColorDataInputTemplate.xlsx"); + + using (FileStream fs = new FileStream(fileName, FileMode.Create)) + { + stream.Seek(0, SeekOrigin.Begin); + stream.CopyTo(fs); + } + } + + public static void CreateColorShadesInputExcelTemplate(String fileName) + { + var stream = EmbeddedResourceHelper.GetEmbeddedResourceStream("Tango.BL.Calibration.ColorShadesTemplate.xlsx"); + + using (FileStream fs = new FileStream(fileName, FileMode.Create)) + { + stream.Seek(0, SeekOrigin.Begin); + stream.CopyTo(fs); + } + } } } diff --git a/Software/Visual_Studio/Tango.BL/Calibration/ColorDataInputTemplate.xlsx b/Software/Visual_Studio/Tango.BL/Calibration/ColorDataInputTemplate.xlsx Binary files differnew file mode 100644 index 000000000..4485524b3 --- /dev/null +++ b/Software/Visual_Studio/Tango.BL/Calibration/ColorDataInputTemplate.xlsx diff --git a/Software/Visual_Studio/Tango.BL/Calibration/ColorShadesTemplate.xlsx b/Software/Visual_Studio/Tango.BL/Calibration/ColorShadesTemplate.xlsx Binary files differnew file mode 100644 index 000000000..cf98c2b1b --- /dev/null +++ b/Software/Visual_Studio/Tango.BL/Calibration/ColorShadesTemplate.xlsx diff --git a/Software/Visual_Studio/Tango.BL/DTO/RmlExtensionColorCalibrationDTO.cs b/Software/Visual_Studio/Tango.BL/DTO/RmlExtensionColorCalibrationDTO.cs new file mode 100644 index 000000000..08cedb31a --- /dev/null +++ b/Software/Visual_Studio/Tango.BL/DTO/RmlExtensionColorCalibrationDTO.cs @@ -0,0 +1,14 @@ + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Tango.BL.DTO +{ + public class RmlExtensionColorCalibrationDTO : RmlExtensionColorCalibrationDTOBase + { + + } +} diff --git a/Software/Visual_Studio/Tango.BL/DTO/RmlExtensionColorCalibrationDTOBase.cs b/Software/Visual_Studio/Tango.BL/DTO/RmlExtensionColorCalibrationDTOBase.cs new file mode 100644 index 000000000..f2ad42854 --- /dev/null +++ b/Software/Visual_Studio/Tango.BL/DTO/RmlExtensionColorCalibrationDTOBase.cs @@ -0,0 +1,41 @@ + +//------------------------------------------------------------------------------ +// <auto-generated> +// This code was generated by a tool. +// Tango Observables Generator +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. Do not modify! +// </auto-generated> +//------------------------------------------------------------------------------ + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Tango.BL.Entities; + +namespace Tango.BL.DTO +{ + public abstract class RmlExtensionColorCalibrationDTOBase : ObservableEntityDTO<RmlExtensionColorCalibrationDTO, RmlExtensionColorCalibration> + { + + /// <summary> + /// rmls extensions guid + /// </summary> + public String RmlsExtensionsGuid + { + get; set; + } + + /// <summary> + /// machine guid + /// </summary> + public String MachineGuid + { + get; set; + } + + } +} diff --git a/Software/Visual_Studio/Tango.BL/DTO/RmlExtensionColorCalibrationsTestDTO.cs b/Software/Visual_Studio/Tango.BL/DTO/RmlExtensionColorCalibrationsTestDTO.cs new file mode 100644 index 000000000..43472dd24 --- /dev/null +++ b/Software/Visual_Studio/Tango.BL/DTO/RmlExtensionColorCalibrationsTestDTO.cs @@ -0,0 +1,14 @@ + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Tango.BL.DTO +{ + public class RmlExtensionColorCalibrationsTestDTO : RmlExtensionColorCalibrationsTestDTOBase + { + + } +} diff --git a/Software/Visual_Studio/Tango.BL/DTO/RmlExtensionColorCalibrationsTestDTOBase.cs b/Software/Visual_Studio/Tango.BL/DTO/RmlExtensionColorCalibrationsTestDTOBase.cs new file mode 100644 index 000000000..878b4d40f --- /dev/null +++ b/Software/Visual_Studio/Tango.BL/DTO/RmlExtensionColorCalibrationsTestDTOBase.cs @@ -0,0 +1,41 @@ + +//------------------------------------------------------------------------------ +// <auto-generated> +// This code was generated by a tool. +// Tango Observables Generator +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. Do not modify! +// </auto-generated> +//------------------------------------------------------------------------------ + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Tango.BL.Entities; + +namespace Tango.BL.DTO +{ + public abstract class RmlExtensionColorCalibrationsTestDTOBase : ObservableEntityDTO<RmlExtensionColorCalibrationsTestDTO, RmlExtensionColorCalibrationsTest> + { + + /// <summary> + /// name + /// </summary> + public String Name + { + get; set; + } + + /// <summary> + /// rml extension color calibration guid + /// </summary> + public String RmlExtensionColorCalibrationGuid + { + get; set; + } + + } +} diff --git a/Software/Visual_Studio/Tango.BL/DTO/RmlExtensionColorCalibrationsTestsLiquidDataDTO.cs b/Software/Visual_Studio/Tango.BL/DTO/RmlExtensionColorCalibrationsTestsLiquidDataDTO.cs new file mode 100644 index 000000000..171898b33 --- /dev/null +++ b/Software/Visual_Studio/Tango.BL/DTO/RmlExtensionColorCalibrationsTestsLiquidDataDTO.cs @@ -0,0 +1,14 @@ + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Tango.BL.DTO +{ + public class RmlExtensionColorCalibrationsTestsLiquidDataDTO : RmlExtensionColorCalibrationsTestsLiquidDataDTOBase + { + + } +} diff --git a/Software/Visual_Studio/Tango.BL/DTO/RmlExtensionColorCalibrationsTestsLiquidDataDTOBase.cs b/Software/Visual_Studio/Tango.BL/DTO/RmlExtensionColorCalibrationsTestsLiquidDataDTOBase.cs new file mode 100644 index 000000000..eb0cb5d7e --- /dev/null +++ b/Software/Visual_Studio/Tango.BL/DTO/RmlExtensionColorCalibrationsTestsLiquidDataDTOBase.cs @@ -0,0 +1,41 @@ + +//------------------------------------------------------------------------------ +// <auto-generated> +// This code was generated by a tool. +// Tango Observables Generator +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. Do not modify! +// </auto-generated> +//------------------------------------------------------------------------------ + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Tango.BL.Entities; + +namespace Tango.BL.DTO +{ + public abstract class RmlExtensionColorCalibrationsTestsLiquidDataDTOBase : ObservableEntityDTO<RmlExtensionColorCalibrationsTestsLiquidDataDTO, RmlExtensionColorCalibrationsTestsLiquidData> + { + + /// <summary> + /// rml extension color calibrations test guid + /// </summary> + public String RmlExtensionColorCalibrationsTestGuid + { + get; set; + } + + /// <summary> + /// liquid type guid + /// </summary> + public String LiquidTypeGuid + { + get; set; + } + + } +} diff --git a/Software/Visual_Studio/Tango.BL/DTO/RmlExtensionColorCalibrationsTestsLiquidDataPointDTO.cs b/Software/Visual_Studio/Tango.BL/DTO/RmlExtensionColorCalibrationsTestsLiquidDataPointDTO.cs new file mode 100644 index 000000000..42e85ef1e --- /dev/null +++ b/Software/Visual_Studio/Tango.BL/DTO/RmlExtensionColorCalibrationsTestsLiquidDataPointDTO.cs @@ -0,0 +1,14 @@ + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Tango.BL.DTO +{ + public class RmlExtensionColorCalibrationsTestsLiquidDataPointDTO : RmlExtensionColorCalibrationsTestsLiquidDataPointDTOBase + { + + } +} diff --git a/Software/Visual_Studio/Tango.BL/DTO/RmlExtensionColorCalibrationsTestsLiquidDataPointDTOBase.cs b/Software/Visual_Studio/Tango.BL/DTO/RmlExtensionColorCalibrationsTestsLiquidDataPointDTOBase.cs new file mode 100644 index 000000000..4ad7fa865 --- /dev/null +++ b/Software/Visual_Studio/Tango.BL/DTO/RmlExtensionColorCalibrationsTestsLiquidDataPointDTOBase.cs @@ -0,0 +1,73 @@ + +//------------------------------------------------------------------------------ +// <auto-generated> +// This code was generated by a tool. +// Tango Observables Generator +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. Do not modify! +// </auto-generated> +//------------------------------------------------------------------------------ + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Tango.BL.Entities; + +namespace Tango.BL.DTO +{ + public abstract class RmlExtensionColorCalibrationsTestsLiquidDataPointDTOBase : ObservableEntityDTO<RmlExtensionColorCalibrationsTestsLiquidDataPointDTO, RmlExtensionColorCalibrationsTestsLiquidDataPoint> + { + + /// <summary> + /// rml extension color calibrations tests liquid data guid + /// </summary> + public String RmlExtensionColorCalibrationsTestsLiquidDataGuid + { + get; set; + } + + /// <summary> + /// ink + /// </summary> + public Double Ink + { + get; set; + } + + /// <summary> + /// l + /// </summary> + public Double L + { + get; set; + } + + /// <summary> + /// a + /// </summary> + public Double A + { + get; set; + } + + /// <summary> + /// b + /// </summary> + public Double B + { + get; set; + } + + /// <summary> + /// calculated point + /// </summary> + public Double CalculatedPoint + { + get; set; + } + + } +} diff --git a/Software/Visual_Studio/Tango.BL/DTO/RmlExtensionColorShadeDTO.cs b/Software/Visual_Studio/Tango.BL/DTO/RmlExtensionColorShadeDTO.cs new file mode 100644 index 000000000..3c80db6c8 --- /dev/null +++ b/Software/Visual_Studio/Tango.BL/DTO/RmlExtensionColorShadeDTO.cs @@ -0,0 +1,14 @@ + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Tango.BL.DTO +{ + public class RmlExtensionColorShadeDTO : RmlExtensionColorShadeDTOBase + { + + } +} diff --git a/Software/Visual_Studio/Tango.BL/DTO/RmlExtensionColorShadeDTOBase.cs b/Software/Visual_Studio/Tango.BL/DTO/RmlExtensionColorShadeDTOBase.cs new file mode 100644 index 000000000..50edfca30 --- /dev/null +++ b/Software/Visual_Studio/Tango.BL/DTO/RmlExtensionColorShadeDTOBase.cs @@ -0,0 +1,41 @@ + +//------------------------------------------------------------------------------ +// <auto-generated> +// This code was generated by a tool. +// Tango Observables Generator +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. Do not modify! +// </auto-generated> +//------------------------------------------------------------------------------ + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Tango.BL.Entities; + +namespace Tango.BL.DTO +{ + public abstract class RmlExtensionColorShadeDTOBase : ObservableEntityDTO<RmlExtensionColorShadeDTO, RmlExtensionColorShade> + { + + /// <summary> + /// rmls extensions guid + /// </summary> + public String RmlsExtensionsGuid + { + get; set; + } + + /// <summary> + /// machine guid + /// </summary> + public String MachineGuid + { + get; set; + } + + } +} diff --git a/Software/Visual_Studio/Tango.BL/DTO/RmlExtensionColorShadesTestDTO.cs b/Software/Visual_Studio/Tango.BL/DTO/RmlExtensionColorShadesTestDTO.cs new file mode 100644 index 000000000..68dcb4646 --- /dev/null +++ b/Software/Visual_Studio/Tango.BL/DTO/RmlExtensionColorShadesTestDTO.cs @@ -0,0 +1,14 @@ + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Tango.BL.DTO +{ + public class RmlExtensionColorShadesTestDTO : RmlExtensionColorShadesTestDTOBase + { + + } +} diff --git a/Software/Visual_Studio/Tango.BL/DTO/RmlExtensionColorShadesTestDTOBase.cs b/Software/Visual_Studio/Tango.BL/DTO/RmlExtensionColorShadesTestDTOBase.cs new file mode 100644 index 000000000..9937a3788 --- /dev/null +++ b/Software/Visual_Studio/Tango.BL/DTO/RmlExtensionColorShadesTestDTOBase.cs @@ -0,0 +1,41 @@ + +//------------------------------------------------------------------------------ +// <auto-generated> +// This code was generated by a tool. +// Tango Observables Generator +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. Do not modify! +// </auto-generated> +//------------------------------------------------------------------------------ + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Tango.BL.Entities; + +namespace Tango.BL.DTO +{ + public abstract class RmlExtensionColorShadesTestDTOBase : ObservableEntityDTO<RmlExtensionColorShadesTestDTO, RmlExtensionColorShadesTest> + { + + /// <summary> + /// rml extension color shades guid + /// </summary> + public String RmlExtensionColorShadesGuid + { + get; set; + } + + /// <summary> + /// name + /// </summary> + public String Name + { + get; set; + } + + } +} diff --git a/Software/Visual_Studio/Tango.BL/DTO/RmlExtensionColorShadesTestsDataDTO.cs b/Software/Visual_Studio/Tango.BL/DTO/RmlExtensionColorShadesTestsDataDTO.cs new file mode 100644 index 000000000..d8d558804 --- /dev/null +++ b/Software/Visual_Studio/Tango.BL/DTO/RmlExtensionColorShadesTestsDataDTO.cs @@ -0,0 +1,14 @@ + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Tango.BL.DTO +{ + public class RmlExtensionColorShadesTestsDataDTO : RmlExtensionColorShadesTestsDataDTOBase + { + + } +} diff --git a/Software/Visual_Studio/Tango.BL/DTO/RmlExtensionColorShadesTestsDataDTOBase.cs b/Software/Visual_Studio/Tango.BL/DTO/RmlExtensionColorShadesTestsDataDTOBase.cs new file mode 100644 index 000000000..d9d263c92 --- /dev/null +++ b/Software/Visual_Studio/Tango.BL/DTO/RmlExtensionColorShadesTestsDataDTOBase.cs @@ -0,0 +1,137 @@ + +//------------------------------------------------------------------------------ +// <auto-generated> +// This code was generated by a tool. +// Tango Observables Generator +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. Do not modify! +// </auto-generated> +//------------------------------------------------------------------------------ + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Tango.BL.Entities; + +namespace Tango.BL.DTO +{ + public abstract class RmlExtensionColorShadesTestsDataDTOBase : ObservableEntityDTO<RmlExtensionColorShadesTestsDataDTO, RmlExtensionColorShadesTestsData> + { + + /// <summary> + /// rml extension color shades tests guid + /// </summary> + public String RmlExtensionColorShadesTestsGuid + { + get; set; + } + + /// <summary> + /// color num + /// </summary> + public Int32 ColorNum + { + get; set; + } + + /// <summary> + /// l + /// </summary> + public Double L + { + get; set; + } + + /// <summary> + /// a + /// </summary> + public Double A + { + get; set; + } + + /// <summary> + /// b + /// </summary> + public Double B + { + get; set; + } + + /// <summary> + /// c + /// </summary> + public Nullable<Double> C + { + get; set; + } + + /// <summary> + /// m + /// </summary> + public Nullable<Double> M + { + get; set; + } + + /// <summary> + /// y + /// </summary> + public Nullable<Double> Y + { + get; set; + } + + /// <summary> + /// k + /// </summary> + public Nullable<Double> K + { + get; set; + } + + /// <summary> + /// ti + /// </summary> + public Nullable<Double> Ti + { + get; set; + } + + /// <summary> + /// l res + /// </summary> + public Double LRes + { + get; set; + } + + /// <summary> + /// a res + /// </summary> + public Double ARes + { + get; set; + } + + /// <summary> + /// b res + /// </summary> + public Double BRes + { + get; set; + } + + /// <summary> + /// delta e + /// </summary> + public Double DeltaE + { + get; set; + } + + } +} diff --git a/Software/Visual_Studio/Tango.BL/DTO/RmlExtensionTestResultsFileDTO.cs b/Software/Visual_Studio/Tango.BL/DTO/RmlExtensionTestResultsFileDTO.cs new file mode 100644 index 000000000..0e06e750e --- /dev/null +++ b/Software/Visual_Studio/Tango.BL/DTO/RmlExtensionTestResultsFileDTO.cs @@ -0,0 +1,14 @@ + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Tango.BL.DTO +{ + public class RmlExtensionTestResultsFileDTO : RmlExtensionTestResultsFileDTOBase + { + + } +} diff --git a/Software/Visual_Studio/Tango.BL/DTO/RmlExtensionTestResultsFileDTOBase.cs b/Software/Visual_Studio/Tango.BL/DTO/RmlExtensionTestResultsFileDTOBase.cs new file mode 100644 index 000000000..f06cdb159 --- /dev/null +++ b/Software/Visual_Studio/Tango.BL/DTO/RmlExtensionTestResultsFileDTOBase.cs @@ -0,0 +1,49 @@ + +//------------------------------------------------------------------------------ +// <auto-generated> +// This code was generated by a tool. +// Tango Observables Generator +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. Do not modify! +// </auto-generated> +//------------------------------------------------------------------------------ + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Tango.BL.Entities; + +namespace Tango.BL.DTO +{ + public abstract class RmlExtensionTestResultsFileDTOBase : ObservableEntityDTO<RmlExtensionTestResultsFileDTO, RmlExtensionTestResultsFile> + { + + /// <summary> + /// rml extension test results guid + /// </summary> + public String RmlExtensionTestResultsGuid + { + get; set; + } + + /// <summary> + /// file name + /// </summary> + public String FileName + { + get; set; + } + + /// <summary> + /// file path + /// </summary> + public String FilePath + { + get; set; + } + + } +} diff --git a/Software/Visual_Studio/Tango.BL/Entities/LiquidTypeBase.cs b/Software/Visual_Studio/Tango.BL/Entities/LiquidTypeBase.cs index 1a75d4516..ea4d18f9b 100644 --- a/Software/Visual_Studio/Tango.BL/Entities/LiquidTypeBase.cs +++ b/Software/Visual_Studio/Tango.BL/Entities/LiquidTypeBase.cs @@ -49,6 +49,8 @@ namespace Tango.BL.Entities public event EventHandler<SynchronizedObservableCollection<LiquidTypesRml>> LiquidTypesRmlsChanged; + public event EventHandler<SynchronizedObservableCollection<RmlExtensionColorCalibrationsTestsLiquidData>> RmlExtensionColorCalibrationsTestsLiquidDataChanged; + protected Int32 _code; /// <summary> @@ -340,6 +342,31 @@ namespace Tango.BL.Entities } } + protected SynchronizedObservableCollection<RmlExtensionColorCalibrationsTestsLiquidData> _rmlextensioncolorcalibrationstestsliquiddata; + + /// <summary> + /// Gets or sets the liquidtypebase rml extension color calibrations tests liquid data. + /// </summary> + + public virtual SynchronizedObservableCollection<RmlExtensionColorCalibrationsTestsLiquidData> RmlExtensionColorCalibrationsTestsLiquidData + { + get + { + return _rmlextensioncolorcalibrationstestsliquiddata; + } + + set + { + if (_rmlextensioncolorcalibrationstestsliquiddata != value) + { + _rmlextensioncolorcalibrationstestsliquiddata = value; + + OnRmlExtensionColorCalibrationsTestsLiquidDataChanged(value); + + } + } + } + /// <summary> /// Called when the Code has changed. /// </summary> @@ -440,6 +467,15 @@ namespace Tango.BL.Entities } /// <summary> + /// Called when the RmlExtensionColorCalibrationsTestsLiquidData has changed. + /// </summary> + protected virtual void OnRmlExtensionColorCalibrationsTestsLiquidDataChanged(SynchronizedObservableCollection<RmlExtensionColorCalibrationsTestsLiquidData> rmlextensioncolorcalibrationstestsliquiddata) + { + RmlExtensionColorCalibrationsTestsLiquidDataChanged?.Invoke(this, rmlextensioncolorcalibrationstestsliquiddata); + RaisePropertyChanged(nameof(RmlExtensionColorCalibrationsTestsLiquidData)); + } + + /// <summary> /// Initializes a new instance of the <see cref="LiquidTypeBase" /> class. /// </summary> public LiquidTypeBase() : base() @@ -451,6 +487,8 @@ namespace Tango.BL.Entities LiquidTypesRmls = new SynchronizedObservableCollection<LiquidTypesRml>(); + RmlExtensionColorCalibrationsTestsLiquidData = new SynchronizedObservableCollection<RmlExtensionColorCalibrationsTestsLiquidData>(); + } } } diff --git a/Software/Visual_Studio/Tango.BL/Entities/MachineBase.cs b/Software/Visual_Studio/Tango.BL/Entities/MachineBase.cs index f17f39c18..ad32b8fdf 100644 --- a/Software/Visual_Studio/Tango.BL/Entities/MachineBase.cs +++ b/Software/Visual_Studio/Tango.BL/Entities/MachineBase.cs @@ -95,6 +95,10 @@ namespace Tango.BL.Entities public event EventHandler<Organization> OrganizationChanged; + public event EventHandler<SynchronizedObservableCollection<RmlExtensionColorCalibration>> RmlExtensionColorCalibrationsChanged; + + public event EventHandler<SynchronizedObservableCollection<RmlExtensionColorShade>> RmlExtensionColorShadesChanged; + public event EventHandler<SynchronizedObservableCollection<RmlExtensionTestResult>> RmlExtensionTestResultsChanged; public event EventHandler<SynchronizedObservableCollection<Spool>> SpoolsChanged; @@ -1225,6 +1229,56 @@ namespace Tango.BL.Entities } } + protected SynchronizedObservableCollection<RmlExtensionColorCalibration> _rmlextensioncolorcalibrations; + + /// <summary> + /// Gets or sets the machinebase rml extension color calibrations. + /// </summary> + + public virtual SynchronizedObservableCollection<RmlExtensionColorCalibration> RmlExtensionColorCalibrations + { + get + { + return _rmlextensioncolorcalibrations; + } + + set + { + if (_rmlextensioncolorcalibrations != value) + { + _rmlextensioncolorcalibrations = value; + + OnRmlExtensionColorCalibrationsChanged(value); + + } + } + } + + protected SynchronizedObservableCollection<RmlExtensionColorShade> _rmlextensioncolorshades; + + /// <summary> + /// Gets or sets the machinebase rml extension color shades. + /// </summary> + + public virtual SynchronizedObservableCollection<RmlExtensionColorShade> RmlExtensionColorShades + { + get + { + return _rmlextensioncolorshades; + } + + set + { + if (_rmlextensioncolorshades != value) + { + _rmlextensioncolorshades = value; + + OnRmlExtensionColorShadesChanged(value); + + } + } + } + protected SynchronizedObservableCollection<RmlExtensionTestResult> _rmlextensiontestresults; /// <summary> @@ -1582,6 +1636,24 @@ namespace Tango.BL.Entities } /// <summary> + /// Called when the RmlExtensionColorCalibrations has changed. + /// </summary> + protected virtual void OnRmlExtensionColorCalibrationsChanged(SynchronizedObservableCollection<RmlExtensionColorCalibration> rmlextensioncolorcalibrations) + { + RmlExtensionColorCalibrationsChanged?.Invoke(this, rmlextensioncolorcalibrations); + RaisePropertyChanged(nameof(RmlExtensionColorCalibrations)); + } + + /// <summary> + /// Called when the RmlExtensionColorShades has changed. + /// </summary> + protected virtual void OnRmlExtensionColorShadesChanged(SynchronizedObservableCollection<RmlExtensionColorShade> rmlextensioncolorshades) + { + RmlExtensionColorShadesChanged?.Invoke(this, rmlextensioncolorshades); + RaisePropertyChanged(nameof(RmlExtensionColorShades)); + } + + /// <summary> /// Called when the RmlExtensionTestResults has changed. /// </summary> protected virtual void OnRmlExtensionTestResultsChanged(SynchronizedObservableCollection<RmlExtensionTestResult> rmlextensiontestresults) @@ -1615,6 +1687,10 @@ namespace Tango.BL.Entities MachinesEvents = new SynchronizedObservableCollection<MachinesEvent>(); + RmlExtensionColorCalibrations = new SynchronizedObservableCollection<RmlExtensionColorCalibration>(); + + RmlExtensionColorShades = new SynchronizedObservableCollection<RmlExtensionColorShade>(); + RmlExtensionTestResults = new SynchronizedObservableCollection<RmlExtensionTestResult>(); Spools = new SynchronizedObservableCollection<Spool>(); diff --git a/Software/Visual_Studio/Tango.BL/Entities/RmlExtensionColorCalibration.cs b/Software/Visual_Studio/Tango.BL/Entities/RmlExtensionColorCalibration.cs new file mode 100644 index 000000000..470f4ce33 --- /dev/null +++ b/Software/Visual_Studio/Tango.BL/Entities/RmlExtensionColorCalibration.cs @@ -0,0 +1,16 @@ +//------------------------------------------------------------------------------ +// <auto-generated> +// This code was generated by a tool. +// Tango Observables Generator +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. Do not modify! +// </auto-generated> +//------------------------------------------------------------------------------ + +namespace Tango.BL.Entities +{ + public class RmlExtensionColorCalibration: RmlExtensionColorCalibrationBase + { + } +}
\ No newline at end of file diff --git a/Software/Visual_Studio/Tango.BL/Entities/RmlExtensionColorCalibrationBase.cs b/Software/Visual_Studio/Tango.BL/Entities/RmlExtensionColorCalibrationBase.cs new file mode 100644 index 000000000..b858163d2 --- /dev/null +++ b/Software/Visual_Studio/Tango.BL/Entities/RmlExtensionColorCalibrationBase.cs @@ -0,0 +1,214 @@ +//------------------------------------------------------------------------------ +// <auto-generated> +// This code was generated by a tool. +// Tango Observables Generator +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. Do not modify! +// </auto-generated> +//------------------------------------------------------------------------------ + +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using System.Xml.Serialization; +using Newtonsoft.Json; +using System.Linq; +using Tango.DAL.Remote.DB; +using Tango.Core; +using System.ComponentModel; +using Tango.Core.CustomAttributes; + +namespace Tango.BL.Entities +{ + [Table("RML_EXTENSION_COLOR_CALIBRATIONS")] + public abstract class RmlExtensionColorCalibrationBase : ObservableEntity<RmlExtensionColorCalibration> + { + + public event EventHandler<Machine> MachineChanged; + + public event EventHandler<RmlsExtension> RmlsExtensionsChanged; + + public event EventHandler<SynchronizedObservableCollection<RmlExtensionColorCalibrationsTest>> RmlExtensionColorCalibrationsTestsChanged; + + protected String _rmlsextensionsguid; + + /// <summary> + /// Gets or sets the rmlextensioncolorcalibrationbase rmls extensions guid. + /// </summary> + + [Column("RMLS_EXTENSIONS_GUID")] + [ForeignKey("RmlsExtensions")] + + public String RmlsExtensionsGuid + { + get + { + return _rmlsextensionsguid; + } + + set + { + if (_rmlsextensionsguid != value) + { + _rmlsextensionsguid = value; + + } + } + } + + protected String _machineguid; + + /// <summary> + /// Gets or sets the rmlextensioncolorcalibrationbase machine guid. + /// </summary> + + [Column("MACHINE_GUID")] + [ForeignKey("Machine")] + + public String MachineGuid + { + get + { + return _machineguid; + } + + set + { + if (_machineguid != value) + { + _machineguid = value; + + } + } + } + + protected Machine _machine; + + /// <summary> + /// Gets or sets the rmlextensioncolorcalibrationbase machine. + /// </summary> + + [XmlIgnore] + [JsonIgnore] + public virtual Machine Machine + { + get + { + return _machine; + } + + set + { + if (_machine != value) + { + _machine = value; + + if (Machine != null) + { + MachineGuid = Machine.Guid; + } + + OnMachineChanged(value); + + } + } + } + + protected RmlsExtension _rmlsextensions; + + /// <summary> + /// Gets or sets the rmlextensioncolorcalibrationbase rmls extensions. + /// </summary> + + [XmlIgnore] + [JsonIgnore] + public virtual RmlsExtension RmlsExtensions + { + get + { + return _rmlsextensions; + } + + set + { + if (_rmlsextensions != value) + { + _rmlsextensions = value; + + if (RmlsExtensions != null) + { + RmlsExtensionsGuid = RmlsExtensions.Guid; + } + + OnRmlsExtensionsChanged(value); + + } + } + } + + protected SynchronizedObservableCollection<RmlExtensionColorCalibrationsTest> _rmlextensioncolorcalibrationstests; + + /// <summary> + /// Gets or sets the rmlextensioncolorcalibrationbase rml extension color calibrations tests. + /// </summary> + + public virtual SynchronizedObservableCollection<RmlExtensionColorCalibrationsTest> RmlExtensionColorCalibrationsTests + { + get + { + return _rmlextensioncolorcalibrationstests; + } + + set + { + if (_rmlextensioncolorcalibrationstests != value) + { + _rmlextensioncolorcalibrationstests = value; + + OnRmlExtensionColorCalibrationsTestsChanged(value); + + } + } + } + + /// <summary> + /// Called when the Machine has changed. + /// </summary> + protected virtual void OnMachineChanged(Machine machine) + { + MachineChanged?.Invoke(this, machine); + RaisePropertyChanged(nameof(Machine)); + } + + /// <summary> + /// Called when the RmlsExtensions has changed. + /// </summary> + protected virtual void OnRmlsExtensionsChanged(RmlsExtension rmlsextensions) + { + RmlsExtensionsChanged?.Invoke(this, rmlsextensions); + RaisePropertyChanged(nameof(RmlsExtensions)); + } + + /// <summary> + /// Called when the RmlExtensionColorCalibrationsTests has changed. + /// </summary> + protected virtual void OnRmlExtensionColorCalibrationsTestsChanged(SynchronizedObservableCollection<RmlExtensionColorCalibrationsTest> rmlextensioncolorcalibrationstests) + { + RmlExtensionColorCalibrationsTestsChanged?.Invoke(this, rmlextensioncolorcalibrationstests); + RaisePropertyChanged(nameof(RmlExtensionColorCalibrationsTests)); + } + + /// <summary> + /// Initializes a new instance of the <see cref="RmlExtensionColorCalibrationBase" /> class. + /// </summary> + public RmlExtensionColorCalibrationBase() : base() + { + + RmlExtensionColorCalibrationsTests = new SynchronizedObservableCollection<RmlExtensionColorCalibrationsTest>(); + + } + } +} diff --git a/Software/Visual_Studio/Tango.BL/Entities/RmlExtensionColorCalibrationsTest.cs b/Software/Visual_Studio/Tango.BL/Entities/RmlExtensionColorCalibrationsTest.cs new file mode 100644 index 000000000..5634c0034 --- /dev/null +++ b/Software/Visual_Studio/Tango.BL/Entities/RmlExtensionColorCalibrationsTest.cs @@ -0,0 +1,16 @@ +//------------------------------------------------------------------------------ +// <auto-generated> +// This code was generated by a tool. +// Tango Observables Generator +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. Do not modify! +// </auto-generated> +//------------------------------------------------------------------------------ + +namespace Tango.BL.Entities +{ + public class RmlExtensionColorCalibrationsTest: RmlExtensionColorCalibrationsTestBase + { + } +}
\ No newline at end of file diff --git a/Software/Visual_Studio/Tango.BL/Entities/RmlExtensionColorCalibrationsTestBase.cs b/Software/Visual_Studio/Tango.BL/Entities/RmlExtensionColorCalibrationsTestBase.cs new file mode 100644 index 000000000..5f3907bba --- /dev/null +++ b/Software/Visual_Studio/Tango.BL/Entities/RmlExtensionColorCalibrationsTestBase.cs @@ -0,0 +1,183 @@ +//------------------------------------------------------------------------------ +// <auto-generated> +// This code was generated by a tool. +// Tango Observables Generator +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. Do not modify! +// </auto-generated> +//------------------------------------------------------------------------------ + +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using System.Xml.Serialization; +using Newtonsoft.Json; +using System.Linq; +using Tango.DAL.Remote.DB; +using Tango.Core; +using System.ComponentModel; +using Tango.Core.CustomAttributes; + +namespace Tango.BL.Entities +{ + [Table("RML_EXTENSION_COLOR_CALIBRATIONS_TESTS")] + public abstract class RmlExtensionColorCalibrationsTestBase : ObservableEntity<RmlExtensionColorCalibrationsTest> + { + + public event EventHandler<String> NameChanged; + + public event EventHandler<RmlExtensionColorCalibration> RmlExtensionColorCalibrationChanged; + + public event EventHandler<SynchronizedObservableCollection<RmlExtensionColorCalibrationsTestsLiquidData>> RmlExtensionColorCalibrationsTestsLiquidDataChanged; + + protected String _name; + + /// <summary> + /// Gets or sets the rmlextensioncolorcalibrationstestbase name. + /// </summary> + + [Column("NAME")] + + public String Name + { + get + { + return _name; + } + + set + { + if (_name != value) + { + _name = value; + + OnNameChanged(value); + + } + } + } + + protected String _rmlextensioncolorcalibrationguid; + + /// <summary> + /// Gets or sets the rmlextensioncolorcalibrationstestbase rml extension color calibration guid. + /// </summary> + + [Column("RML_EXTENSION_COLOR_CALIBRATION_GUID")] + [ForeignKey("RmlExtensionColorCalibration")] + + public String RmlExtensionColorCalibrationGuid + { + get + { + return _rmlextensioncolorcalibrationguid; + } + + set + { + if (_rmlextensioncolorcalibrationguid != value) + { + _rmlextensioncolorcalibrationguid = value; + + } + } + } + + protected RmlExtensionColorCalibration _rmlextensioncolorcalibration; + + /// <summary> + /// Gets or sets the rmlextensioncolorcalibrationstestbase rml extension color calibrations. + /// </summary> + + [XmlIgnore] + [JsonIgnore] + public virtual RmlExtensionColorCalibration RmlExtensionColorCalibration + { + get + { + return _rmlextensioncolorcalibration; + } + + set + { + if (_rmlextensioncolorcalibration != value) + { + _rmlextensioncolorcalibration = value; + + if (RmlExtensionColorCalibration != null) + { + RmlExtensionColorCalibrationGuid = RmlExtensionColorCalibration.Guid; + } + + OnRmlExtensionColorCalibrationChanged(value); + + } + } + } + + protected SynchronizedObservableCollection<RmlExtensionColorCalibrationsTestsLiquidData> _rmlextensioncolorcalibrationstestsliquiddata; + + /// <summary> + /// Gets or sets the rmlextensioncolorcalibrationstestbase rml extension color calibrations tests liquid data. + /// </summary> + + public virtual SynchronizedObservableCollection<RmlExtensionColorCalibrationsTestsLiquidData> RmlExtensionColorCalibrationsTestsLiquidData + { + get + { + return _rmlextensioncolorcalibrationstestsliquiddata; + } + + set + { + if (_rmlextensioncolorcalibrationstestsliquiddata != value) + { + _rmlextensioncolorcalibrationstestsliquiddata = value; + + OnRmlExtensionColorCalibrationsTestsLiquidDataChanged(value); + + } + } + } + + /// <summary> + /// Called when the Name has changed. + /// </summary> + protected virtual void OnNameChanged(String name) + { + NameChanged?.Invoke(this, name); + RaisePropertyChanged(nameof(Name)); + } + + /// <summary> + /// Called when the RmlExtensionColorCalibration has changed. + /// </summary> + protected virtual void OnRmlExtensionColorCalibrationChanged(RmlExtensionColorCalibration rmlextensioncolorcalibration) + { + RmlExtensionColorCalibrationChanged?.Invoke(this, rmlextensioncolorcalibration); + RaisePropertyChanged(nameof(RmlExtensionColorCalibration)); + } + + /// <summary> + /// Called when the RmlExtensionColorCalibrationsTestsLiquidData has changed. + /// </summary> + protected virtual void OnRmlExtensionColorCalibrationsTestsLiquidDataChanged(SynchronizedObservableCollection<RmlExtensionColorCalibrationsTestsLiquidData> rmlextensioncolorcalibrationstestsliquiddata) + { + RmlExtensionColorCalibrationsTestsLiquidDataChanged?.Invoke(this, rmlextensioncolorcalibrationstestsliquiddata); + RaisePropertyChanged(nameof(RmlExtensionColorCalibrationsTestsLiquidData)); + } + + /// <summary> + /// Initializes a new instance of the <see cref="RmlExtensionColorCalibrationsTestBase" /> class. + /// </summary> + public RmlExtensionColorCalibrationsTestBase() : base() + { + + RmlExtensionColorCalibrationsTestsLiquidData = new SynchronizedObservableCollection<RmlExtensionColorCalibrationsTestsLiquidData>(); + + } + } +} diff --git a/Software/Visual_Studio/Tango.BL/Entities/RmlExtensionColorCalibrationsTestsLiquidData.cs b/Software/Visual_Studio/Tango.BL/Entities/RmlExtensionColorCalibrationsTestsLiquidData.cs new file mode 100644 index 000000000..782a27963 --- /dev/null +++ b/Software/Visual_Studio/Tango.BL/Entities/RmlExtensionColorCalibrationsTestsLiquidData.cs @@ -0,0 +1,21 @@ +//------------------------------------------------------------------------------ +// <auto-generated> +// This code was generated by a tool. +// Tango Observables Generator +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. Do not modify! +// </auto-generated> +//------------------------------------------------------------------------------ + +using Newtonsoft.Json; +using System.ComponentModel.DataAnnotations.Schema; +using Tango.BL.Enumerations; + +namespace Tango.BL.Entities +{ + public class RmlExtensionColorCalibrationsTestsLiquidData: RmlExtensionColorCalibrationsTestsLiquidDataBase + { + + } +}
\ No newline at end of file diff --git a/Software/Visual_Studio/Tango.BL/Entities/RmlExtensionColorCalibrationsTestsLiquidDataBase.cs b/Software/Visual_Studio/Tango.BL/Entities/RmlExtensionColorCalibrationsTestsLiquidDataBase.cs new file mode 100644 index 000000000..d55773809 --- /dev/null +++ b/Software/Visual_Studio/Tango.BL/Entities/RmlExtensionColorCalibrationsTestsLiquidDataBase.cs @@ -0,0 +1,214 @@ +//------------------------------------------------------------------------------ +// <auto-generated> +// This code was generated by a tool. +// Tango Observables Generator +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. Do not modify! +// </auto-generated> +//------------------------------------------------------------------------------ + +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using System.Xml.Serialization; +using Newtonsoft.Json; +using System.Linq; +using Tango.DAL.Remote.DB; +using Tango.Core; +using System.ComponentModel; +using Tango.Core.CustomAttributes; + +namespace Tango.BL.Entities +{ + [Table("RML_EXTENSION_COLOR_CALIBRATIONS_TESTS_LIQUID_DATA")] + public abstract class RmlExtensionColorCalibrationsTestsLiquidDataBase : ObservableEntity<RmlExtensionColorCalibrationsTestsLiquidData> + { + + public event EventHandler<LiquidType> LiquidTypeChanged; + + public event EventHandler<RmlExtensionColorCalibrationsTest> RmlExtensionColorCalibrationsTestChanged; + + public event EventHandler<SynchronizedObservableCollection<RmlExtensionColorCalibrationsTestsLiquidDataPoint>> RmlExtensionColorCalibrationsTestsLiquidDataPointsChanged; + + protected String _rmlextensioncolorcalibrationstestguid; + + /// <summary> + /// Gets or sets the rmlextensioncolorcalibrationstestsliquiddatabase rml extension color calibrations test guid. + /// </summary> + + [Column("RML_EXTENSION_COLOR_CALIBRATIONS_TEST_GUID")] + [ForeignKey("RmlExtensionColorCalibrationsTest")] + + public String RmlExtensionColorCalibrationsTestGuid + { + get + { + return _rmlextensioncolorcalibrationstestguid; + } + + set + { + if (_rmlextensioncolorcalibrationstestguid != value) + { + _rmlextensioncolorcalibrationstestguid = value; + + } + } + } + + protected String _liquidtypeguid; + + /// <summary> + /// Gets or sets the rmlextensioncolorcalibrationstestsliquiddatabase liquid type guid. + /// </summary> + + [Column("LIQUID_TYPE_GUID")] + [ForeignKey("LiquidType")] + + public String LiquidTypeGuid + { + get + { + return _liquidtypeguid; + } + + set + { + if (_liquidtypeguid != value) + { + _liquidtypeguid = value; + + } + } + } + + protected LiquidType _liquidtype; + + /// <summary> + /// Gets or sets the rmlextensioncolorcalibrationstestsliquiddatabase liquid types. + /// </summary> + + [XmlIgnore] + [JsonIgnore] + public virtual LiquidType LiquidType + { + get + { + return _liquidtype; + } + + set + { + if (_liquidtype != value) + { + _liquidtype = value; + + if (LiquidType != null) + { + LiquidTypeGuid = LiquidType.Guid; + } + + OnLiquidTypeChanged(value); + + } + } + } + + protected RmlExtensionColorCalibrationsTest _rmlextensioncolorcalibrationstest; + + /// <summary> + /// Gets or sets the rmlextensioncolorcalibrationstestsliquiddatabase rml extension color calibrations tests. + /// </summary> + + [XmlIgnore] + [JsonIgnore] + public virtual RmlExtensionColorCalibrationsTest RmlExtensionColorCalibrationsTest + { + get + { + return _rmlextensioncolorcalibrationstest; + } + + set + { + if (_rmlextensioncolorcalibrationstest != value) + { + _rmlextensioncolorcalibrationstest = value; + + if (RmlExtensionColorCalibrationsTest != null) + { + RmlExtensionColorCalibrationsTestGuid = RmlExtensionColorCalibrationsTest.Guid; + } + + OnRmlExtensionColorCalibrationsTestChanged(value); + + } + } + } + + protected SynchronizedObservableCollection<RmlExtensionColorCalibrationsTestsLiquidDataPoint> _rmlextensioncolorcalibrationstestsliquiddatapoints; + + /// <summary> + /// Gets or sets the rmlextensioncolorcalibrationstestsliquiddatabase rml extension color calibrations tests liquid data points. + /// </summary> + + public virtual SynchronizedObservableCollection<RmlExtensionColorCalibrationsTestsLiquidDataPoint> RmlExtensionColorCalibrationsTestsLiquidDataPoints + { + get + { + return _rmlextensioncolorcalibrationstestsliquiddatapoints; + } + + set + { + if (_rmlextensioncolorcalibrationstestsliquiddatapoints != value) + { + _rmlextensioncolorcalibrationstestsliquiddatapoints = value; + + OnRmlExtensionColorCalibrationsTestsLiquidDataPointsChanged(value); + + } + } + } + + /// <summary> + /// Called when the LiquidType has changed. + /// </summary> + protected virtual void OnLiquidTypeChanged(LiquidType liquidtype) + { + LiquidTypeChanged?.Invoke(this, liquidtype); + RaisePropertyChanged(nameof(LiquidType)); + } + + /// <summary> + /// Called when the RmlExtensionColorCalibrationsTest has changed. + /// </summary> + protected virtual void OnRmlExtensionColorCalibrationsTestChanged(RmlExtensionColorCalibrationsTest rmlextensioncolorcalibrationstest) + { + RmlExtensionColorCalibrationsTestChanged?.Invoke(this, rmlextensioncolorcalibrationstest); + RaisePropertyChanged(nameof(RmlExtensionColorCalibrationsTest)); + } + + /// <summary> + /// Called when the RmlExtensionColorCalibrationsTestsLiquidDataPoints has changed. + /// </summary> + protected virtual void OnRmlExtensionColorCalibrationsTestsLiquidDataPointsChanged(SynchronizedObservableCollection<RmlExtensionColorCalibrationsTestsLiquidDataPoint> rmlextensioncolorcalibrationstestsliquiddatapoints) + { + RmlExtensionColorCalibrationsTestsLiquidDataPointsChanged?.Invoke(this, rmlextensioncolorcalibrationstestsliquiddatapoints); + RaisePropertyChanged(nameof(RmlExtensionColorCalibrationsTestsLiquidDataPoints)); + } + + /// <summary> + /// Initializes a new instance of the <see cref="RmlExtensionColorCalibrationsTestsLiquidDataBase" /> class. + /// </summary> + public RmlExtensionColorCalibrationsTestsLiquidDataBase() : base() + { + + RmlExtensionColorCalibrationsTestsLiquidDataPoints = new SynchronizedObservableCollection<RmlExtensionColorCalibrationsTestsLiquidDataPoint>(); + + } + } +} diff --git a/Software/Visual_Studio/Tango.BL/Entities/RmlExtensionColorCalibrationsTestsLiquidDataPoint.cs b/Software/Visual_Studio/Tango.BL/Entities/RmlExtensionColorCalibrationsTestsLiquidDataPoint.cs new file mode 100644 index 000000000..06ad5ea7a --- /dev/null +++ b/Software/Visual_Studio/Tango.BL/Entities/RmlExtensionColorCalibrationsTestsLiquidDataPoint.cs @@ -0,0 +1,16 @@ +//------------------------------------------------------------------------------ +// <auto-generated> +// This code was generated by a tool. +// Tango Observables Generator +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. Do not modify! +// </auto-generated> +//------------------------------------------------------------------------------ + +namespace Tango.BL.Entities +{ + public class RmlExtensionColorCalibrationsTestsLiquidDataPoint : RmlExtensionColorCalibrationsTestsLiquidDataPointBase + { + } +}
\ No newline at end of file diff --git a/Software/Visual_Studio/Tango.BL/Entities/RmlExtensionColorCalibrationsTestsLiquidDataPointBase.cs b/Software/Visual_Studio/Tango.BL/Entities/RmlExtensionColorCalibrationsTestsLiquidDataPointBase.cs new file mode 100644 index 000000000..e1e25e821 --- /dev/null +++ b/Software/Visual_Studio/Tango.BL/Entities/RmlExtensionColorCalibrationsTestsLiquidDataPointBase.cs @@ -0,0 +1,296 @@ +//------------------------------------------------------------------------------ +// <auto-generated> +// This code was generated by a tool. +// Tango Observables Generator +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. Do not modify! +// </auto-generated> +//------------------------------------------------------------------------------ + +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using System.Xml.Serialization; +using Newtonsoft.Json; +using System.Linq; +using Tango.DAL.Remote.DB; +using Tango.Core; +using System.ComponentModel; +using Tango.Core.CustomAttributes; + +namespace Tango.BL.Entities +{ + [Table("RML_EXTENSION_COLOR_CALIBRATIONS_TESTS_LIQUID_DATA_POINTS")] + public abstract class RmlExtensionColorCalibrationsTestsLiquidDataPointBase : ObservableEntity<RmlExtensionColorCalibrationsTestsLiquidDataPoint> + { + + public event EventHandler<Double> InkChanged; + + public event EventHandler<Double> LChanged; + + public event EventHandler<Double> AChanged; + + public event EventHandler<Double> BChanged; + + public event EventHandler<Double> CalculatedPointChanged; + + public event EventHandler<RmlExtensionColorCalibrationsTestsLiquidData> RmlExtensionColorCalibrationsTestsLiquidDataChanged; + + protected String _rmlextensioncolorcalibrationstestsliquiddataguid; + + /// <summary> + /// Gets or sets the rmlextensioncolorcalibrationstestsliquiddatapointbase rml extension color calibrations tests liquid data guid. + /// </summary> + + [Column("RML_EXTENSION_COLOR_CALIBRATIONS_TESTS_LIQUID_DATA_GUID")] + [ForeignKey("RmlExtensionColorCalibrationsTestsLiquidData")] + + public String RmlExtensionColorCalibrationsTestsLiquidDataGuid + { + get + { + return _rmlextensioncolorcalibrationstestsliquiddataguid; + } + + set + { + if (_rmlextensioncolorcalibrationstestsliquiddataguid != value) + { + _rmlextensioncolorcalibrationstestsliquiddataguid = value; + + } + } + } + + protected Double _ink; + + /// <summary> + /// Gets or sets the rmlextensioncolorcalibrationstestsliquiddatapointbase ink. + /// </summary> + + [Column("INK")] + + public Double Ink + { + get + { + return _ink; + } + + set + { + if (_ink != value) + { + _ink = value; + + OnInkChanged(value); + + } + } + } + + protected Double _l; + + /// <summary> + /// Gets or sets the rmlextensioncolorcalibrationstestsliquiddatapointbase l. + /// </summary> + + [Column("L")] + + public Double L + { + get + { + return _l; + } + + set + { + if (_l != value) + { + _l = value; + + OnLChanged(value); + + } + } + } + + protected Double _a; + + /// <summary> + /// Gets or sets the rmlextensioncolorcalibrationstestsliquiddatapointbase a. + /// </summary> + + [Column("A")] + + public Double A + { + get + { + return _a; + } + + set + { + if (_a != value) + { + _a = value; + + OnAChanged(value); + + } + } + } + + protected Double _b; + + /// <summary> + /// Gets or sets the rmlextensioncolorcalibrationstestsliquiddatapointbase b. + /// </summary> + + [Column("B")] + + public Double B + { + get + { + return _b; + } + + set + { + if (_b != value) + { + _b = value; + + OnBChanged(value); + + } + } + } + + protected Double _calculatedpoint; + + /// <summary> + /// Gets or sets the rmlextensioncolorcalibrationstestsliquiddatapointbase calculated point. + /// </summary> + + [Column("CALCULATED_POINT")] + + public Double CalculatedPoint + { + get + { + return _calculatedpoint; + } + + set + { + if (_calculatedpoint != value) + { + _calculatedpoint = value; + + OnCalculatedPointChanged(value); + + } + } + } + + protected RmlExtensionColorCalibrationsTestsLiquidData _rmlextensioncolorcalibrationstestsliquiddata; + + /// <summary> + /// Gets or sets the rmlextensioncolorcalibrationstestsliquiddatapointbase rml extension color calibrations tests liquid data. + /// </summary> + + [XmlIgnore] + [JsonIgnore] + public virtual RmlExtensionColorCalibrationsTestsLiquidData RmlExtensionColorCalibrationsTestsLiquidData + { + get + { + return _rmlextensioncolorcalibrationstestsliquiddata; + } + + set + { + if (_rmlextensioncolorcalibrationstestsliquiddata != value) + { + _rmlextensioncolorcalibrationstestsliquiddata = value; + + if (RmlExtensionColorCalibrationsTestsLiquidData != null) + { + RmlExtensionColorCalibrationsTestsLiquidDataGuid = RmlExtensionColorCalibrationsTestsLiquidData.Guid; + } + + OnRmlExtensionColorCalibrationsTestsLiquidDataChanged(value); + + } + } + } + + /// <summary> + /// Called when the Ink has changed. + /// </summary> + protected virtual void OnInkChanged(Double ink) + { + InkChanged?.Invoke(this, ink); + RaisePropertyChanged(nameof(Ink)); + } + + /// <summary> + /// Called when the L has changed. + /// </summary> + protected virtual void OnLChanged(Double l) + { + LChanged?.Invoke(this, l); + RaisePropertyChanged(nameof(L)); + } + + /// <summary> + /// Called when the A has changed. + /// </summary> + protected virtual void OnAChanged(Double a) + { + AChanged?.Invoke(this, a); + RaisePropertyChanged(nameof(A)); + } + + /// <summary> + /// Called when the B has changed. + /// </summary> + protected virtual void OnBChanged(Double b) + { + BChanged?.Invoke(this, b); + RaisePropertyChanged(nameof(B)); + } + + /// <summary> + /// Called when the CalculatedPoint has changed. + /// </summary> + protected virtual void OnCalculatedPointChanged(Double calculatedpoint) + { + CalculatedPointChanged?.Invoke(this, calculatedpoint); + RaisePropertyChanged(nameof(CalculatedPoint)); + } + + /// <summary> + /// Called when the RmlExtensionColorCalibrationsTestsLiquidData has changed. + /// </summary> + protected virtual void OnRmlExtensionColorCalibrationsTestsLiquidDataChanged(RmlExtensionColorCalibrationsTestsLiquidData rmlextensioncolorcalibrationstestsliquiddata) + { + RmlExtensionColorCalibrationsTestsLiquidDataChanged?.Invoke(this, rmlextensioncolorcalibrationstestsliquiddata); + RaisePropertyChanged(nameof(RmlExtensionColorCalibrationsTestsLiquidData)); + } + + /// <summary> + /// Initializes a new instance of the <see cref="RmlExtensionColorCalibrationsTestsLiquidDataPointBase" /> class. + /// </summary> + public RmlExtensionColorCalibrationsTestsLiquidDataPointBase() : base() + { + } + } +} diff --git a/Software/Visual_Studio/Tango.BL/Entities/RmlExtensionColorShade.cs b/Software/Visual_Studio/Tango.BL/Entities/RmlExtensionColorShade.cs new file mode 100644 index 000000000..d18cfd750 --- /dev/null +++ b/Software/Visual_Studio/Tango.BL/Entities/RmlExtensionColorShade.cs @@ -0,0 +1,16 @@ +//------------------------------------------------------------------------------ +// <auto-generated> +// This code was generated by a tool. +// Tango Observables Generator +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. Do not modify! +// </auto-generated> +//------------------------------------------------------------------------------ + +namespace Tango.BL.Entities +{ + public class RmlExtensionColorShade : RmlExtensionColorShadeBase + { + } +}
\ No newline at end of file diff --git a/Software/Visual_Studio/Tango.BL/Entities/RmlExtensionColorShadeBase.cs b/Software/Visual_Studio/Tango.BL/Entities/RmlExtensionColorShadeBase.cs new file mode 100644 index 000000000..b0386f13b --- /dev/null +++ b/Software/Visual_Studio/Tango.BL/Entities/RmlExtensionColorShadeBase.cs @@ -0,0 +1,214 @@ +//------------------------------------------------------------------------------ +// <auto-generated> +// This code was generated by a tool. +// Tango Observables Generator +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. Do not modify! +// </auto-generated> +//------------------------------------------------------------------------------ + +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using System.Xml.Serialization; +using Newtonsoft.Json; +using System.Linq; +using Tango.DAL.Remote.DB; +using Tango.Core; +using System.ComponentModel; +using Tango.Core.CustomAttributes; + +namespace Tango.BL.Entities +{ + [Table("RML_EXTENSION_COLOR_SHADES")] + public abstract class RmlExtensionColorShadeBase : ObservableEntity<RmlExtensionColorShade> + { + + public event EventHandler<Machine> MachineChanged; + + public event EventHandler<RmlsExtension> RmlsExtensionsChanged; + + public event EventHandler<SynchronizedObservableCollection<RmlExtensionColorShadesTest>> RmlExtensionColorShadesTestsChanged; + + protected String _rmlsextensionsguid; + + /// <summary> + /// Gets or sets the rmlextensioncolorshadebase rmls extensions guid. + /// </summary> + + [Column("RMLS_EXTENSIONS_GUID")] + [ForeignKey("RmlsExtensions")] + + public String RmlsExtensionsGuid + { + get + { + return _rmlsextensionsguid; + } + + set + { + if (_rmlsextensionsguid != value) + { + _rmlsextensionsguid = value; + + } + } + } + + protected String _machineguid; + + /// <summary> + /// Gets or sets the rmlextensioncolorshadebase machine guid. + /// </summary> + + [Column("MACHINE_GUID")] + [ForeignKey("Machine")] + + public String MachineGuid + { + get + { + return _machineguid; + } + + set + { + if (_machineguid != value) + { + _machineguid = value; + + } + } + } + + protected Machine _machine; + + /// <summary> + /// Gets or sets the rmlextensioncolorshadebase machine. + /// </summary> + + [XmlIgnore] + [JsonIgnore] + public virtual Machine Machine + { + get + { + return _machine; + } + + set + { + if (_machine != value) + { + _machine = value; + + if (Machine != null) + { + MachineGuid = Machine.Guid; + } + + OnMachineChanged(value); + + } + } + } + + protected RmlsExtension _rmlsextensions; + + /// <summary> + /// Gets or sets the rmlextensioncolorshadebase rmls extensions. + /// </summary> + + [XmlIgnore] + [JsonIgnore] + public virtual RmlsExtension RmlsExtensions + { + get + { + return _rmlsextensions; + } + + set + { + if (_rmlsextensions != value) + { + _rmlsextensions = value; + + if (RmlsExtensions != null) + { + RmlsExtensionsGuid = RmlsExtensions.Guid; + } + + OnRmlsExtensionsChanged(value); + + } + } + } + + protected SynchronizedObservableCollection<RmlExtensionColorShadesTest> _rmlextensioncolorshadestests; + + /// <summary> + /// Gets or sets the rmlextensioncolorshadebase rml extension color shades tests. + /// </summary> + + public virtual SynchronizedObservableCollection<RmlExtensionColorShadesTest> RmlExtensionColorShadesTests + { + get + { + return _rmlextensioncolorshadestests; + } + + set + { + if (_rmlextensioncolorshadestests != value) + { + _rmlextensioncolorshadestests = value; + + OnRmlExtensionColorShadesTestsChanged(value); + + } + } + } + + /// <summary> + /// Called when the Machine has changed. + /// </summary> + protected virtual void OnMachineChanged(Machine machine) + { + MachineChanged?.Invoke(this, machine); + RaisePropertyChanged(nameof(Machine)); + } + + /// <summary> + /// Called when the RmlsExtensions has changed. + /// </summary> + protected virtual void OnRmlsExtensionsChanged(RmlsExtension rmlsextensions) + { + RmlsExtensionsChanged?.Invoke(this, rmlsextensions); + RaisePropertyChanged(nameof(RmlsExtensions)); + } + + /// <summary> + /// Called when the RmlExtensionColorShadesTests has changed. + /// </summary> + protected virtual void OnRmlExtensionColorShadesTestsChanged(SynchronizedObservableCollection<RmlExtensionColorShadesTest> rmlextensioncolorshadestests) + { + RmlExtensionColorShadesTestsChanged?.Invoke(this, rmlextensioncolorshadestests); + RaisePropertyChanged(nameof(RmlExtensionColorShadesTests)); + } + + /// <summary> + /// Initializes a new instance of the <see cref="RmlExtensionColorShadeBase" /> class. + /// </summary> + public RmlExtensionColorShadeBase() : base() + { + + RmlExtensionColorShadesTests = new SynchronizedObservableCollection<RmlExtensionColorShadesTest>(); + + } + } +} diff --git a/Software/Visual_Studio/Tango.BL/Entities/RmlExtensionColorShadesTest.cs b/Software/Visual_Studio/Tango.BL/Entities/RmlExtensionColorShadesTest.cs new file mode 100644 index 000000000..88db0049c --- /dev/null +++ b/Software/Visual_Studio/Tango.BL/Entities/RmlExtensionColorShadesTest.cs @@ -0,0 +1,16 @@ +//------------------------------------------------------------------------------ +// <auto-generated> +// This code was generated by a tool. +// Tango Observables Generator +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. Do not modify! +// </auto-generated> +//------------------------------------------------------------------------------ + +namespace Tango.BL.Entities +{ + public class RmlExtensionColorShadesTest : RmlExtensionColorShadesTestBase + { + } +}
\ No newline at end of file diff --git a/Software/Visual_Studio/Tango.BL/Entities/RmlExtensionColorShadesTestBase.cs b/Software/Visual_Studio/Tango.BL/Entities/RmlExtensionColorShadesTestBase.cs new file mode 100644 index 000000000..5bcce38e5 --- /dev/null +++ b/Software/Visual_Studio/Tango.BL/Entities/RmlExtensionColorShadesTestBase.cs @@ -0,0 +1,183 @@ +//------------------------------------------------------------------------------ +// <auto-generated> +// This code was generated by a tool. +// Tango Observables Generator +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. Do not modify! +// </auto-generated> +//------------------------------------------------------------------------------ + +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using System.Xml.Serialization; +using Newtonsoft.Json; +using System.Linq; +using Tango.DAL.Remote.DB; +using Tango.Core; +using System.ComponentModel; +using Tango.Core.CustomAttributes; + +namespace Tango.BL.Entities +{ + [Table("RML_EXTENSION_COLOR_SHADES_TESTS")] + public abstract class RmlExtensionColorShadesTestBase : ObservableEntity<RmlExtensionColorShadesTest> + { + + public event EventHandler<String> NameChanged; + + public event EventHandler<RmlExtensionColorShade> RmlExtensionColorShadesChanged; + + public event EventHandler<SynchronizedObservableCollection<RmlExtensionColorShadesTestsData>> RmlExtensionColorShadesTestsDataChanged; + + protected String _rmlextensioncolorshadesguid; + + /// <summary> + /// Gets or sets the rmlextensioncolorshadestestbase rml extension color shades guid. + /// </summary> + + [Column("RML_EXTENSION_COLOR_SHADES_GUID")] + [ForeignKey("RmlExtensionColorShades")] + + public String RmlExtensionColorShadesGuid + { + get + { + return _rmlextensioncolorshadesguid; + } + + set + { + if (_rmlextensioncolorshadesguid != value) + { + _rmlextensioncolorshadesguid = value; + + } + } + } + + protected String _name; + + /// <summary> + /// Gets or sets the rmlextensioncolorshadestestbase name. + /// </summary> + + [Column("NAME")] + + public String Name + { + get + { + return _name; + } + + set + { + if (_name != value) + { + _name = value; + + OnNameChanged(value); + + } + } + } + + protected RmlExtensionColorShade _rmlextensioncolorshades; + + /// <summary> + /// Gets or sets the rmlextensioncolorshadestestbase rml extension color shades. + /// </summary> + + [XmlIgnore] + [JsonIgnore] + public virtual RmlExtensionColorShade RmlExtensionColorShades + { + get + { + return _rmlextensioncolorshades; + } + + set + { + if (_rmlextensioncolorshades != value) + { + _rmlextensioncolorshades = value; + + if (RmlExtensionColorShades != null) + { + RmlExtensionColorShadesGuid = RmlExtensionColorShades.Guid; + } + + OnRmlExtensionColorShadesChanged(value); + + } + } + } + + protected SynchronizedObservableCollection<RmlExtensionColorShadesTestsData> _rmlextensioncolorshadestestsdata; + + /// <summary> + /// Gets or sets the rmlextensioncolorshadestestbase rml extension color shades tests data. + /// </summary> + + public virtual SynchronizedObservableCollection<RmlExtensionColorShadesTestsData> RmlExtensionColorShadesTestsData + { + get + { + return _rmlextensioncolorshadestestsdata; + } + + set + { + if (_rmlextensioncolorshadestestsdata != value) + { + _rmlextensioncolorshadestestsdata = value; + + OnRmlExtensionColorShadesTestsDataChanged(value); + + } + } + } + + /// <summary> + /// Called when the Name has changed. + /// </summary> + protected virtual void OnNameChanged(String name) + { + NameChanged?.Invoke(this, name); + RaisePropertyChanged(nameof(Name)); + } + + /// <summary> + /// Called when the RmlExtensionColorShades has changed. + /// </summary> + protected virtual void OnRmlExtensionColorShadesChanged(RmlExtensionColorShade rmlextensioncolorshades) + { + RmlExtensionColorShadesChanged?.Invoke(this, rmlextensioncolorshades); + RaisePropertyChanged(nameof(RmlExtensionColorShades)); + } + + /// <summary> + /// Called when the RmlExtensionColorShadesTestsData has changed. + /// </summary> + protected virtual void OnRmlExtensionColorShadesTestsDataChanged(SynchronizedObservableCollection<RmlExtensionColorShadesTestsData> rmlextensioncolorshadestestsdata) + { + RmlExtensionColorShadesTestsDataChanged?.Invoke(this, rmlextensioncolorshadestestsdata); + RaisePropertyChanged(nameof(RmlExtensionColorShadesTestsData)); + } + + /// <summary> + /// Initializes a new instance of the <see cref="RmlExtensionColorShadesTestBase" /> class. + /// </summary> + public RmlExtensionColorShadesTestBase() : base() + { + + RmlExtensionColorShadesTestsData = new SynchronizedObservableCollection<RmlExtensionColorShadesTestsData>(); + + } + } +} diff --git a/Software/Visual_Studio/Tango.BL/Entities/RmlExtensionColorShadesTestsData.cs b/Software/Visual_Studio/Tango.BL/Entities/RmlExtensionColorShadesTestsData.cs new file mode 100644 index 000000000..19dce1a0e --- /dev/null +++ b/Software/Visual_Studio/Tango.BL/Entities/RmlExtensionColorShadesTestsData.cs @@ -0,0 +1,60 @@ +//------------------------------------------------------------------------------ +// <auto-generated> +// This code was generated by a tool. +// Tango Observables Generator +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. Do not modify! +// </auto-generated> +//------------------------------------------------------------------------------ +using ColorMine.ColorSpaces; +using Newtonsoft.Json; +using System.Windows.Media; +using System.ComponentModel.DataAnnotations.Schema; +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; + +namespace Tango.BL.Entities +{ + public class RmlExtensionColorShadesTestsData : RmlExtensionColorShadesTestsDataBase + { + public RmlExtensionColorShadesTestsData() : base() + { + } + + protected override void OnLChanged(double L) + { + base.OnLChanged(L); + UpdateColorBrush(); + } + + protected override void OnAChanged(double L) + { + base.OnAChanged(L); + UpdateColorBrush(); + } + + protected override void OnBChanged(double L) + { + base.OnBChanged(L); + UpdateColorBrush(); + } + + private void UpdateColorBrush() + { + RaisePropertyChanged(nameof(ColorBrush)); + } + + [NotMapped] + [JsonIgnore] + public SolidColorBrush ColorBrush + { + get { + Lab lab = new Lab(L, A, B); + Rgb rgb = (Rgb)lab.ToRgb(); + return new SolidColorBrush(Color.FromRgb((byte)rgb.R, (byte)rgb.G, (byte)rgb.B)); + } + } + } +}
\ No newline at end of file diff --git a/Software/Visual_Studio/Tango.BL/Entities/RmlExtensionColorShadesTestsDataBase.cs b/Software/Visual_Studio/Tango.BL/Entities/RmlExtensionColorShadesTestsDataBase.cs new file mode 100644 index 000000000..c441da0b2 --- /dev/null +++ b/Software/Visual_Studio/Tango.BL/Entities/RmlExtensionColorShadesTestsDataBase.cs @@ -0,0 +1,600 @@ +//------------------------------------------------------------------------------ +// <auto-generated> +// This code was generated by a tool. +// Tango Observables Generator +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. Do not modify! +// </auto-generated> +//------------------------------------------------------------------------------ + +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using System.Xml.Serialization; +using Newtonsoft.Json; +using System.Linq; +using Tango.DAL.Remote.DB; +using Tango.Core; +using System.ComponentModel; +using Tango.Core.CustomAttributes; + +namespace Tango.BL.Entities +{ + [Table("RML_EXTENSION_COLOR_SHADES_TESTS_DATA")] + public abstract class RmlExtensionColorShadesTestsDataBase : ObservableEntity<RmlExtensionColorShadesTestsData> + { + + public event EventHandler<Int32> ColorNumChanged; + + public event EventHandler<Double> LChanged; + + public event EventHandler<Double> AChanged; + + public event EventHandler<Double> BChanged; + + public event EventHandler<Nullable<Double>> CChanged; + + public event EventHandler<Nullable<Double>> MChanged; + + public event EventHandler<Nullable<Double>> YChanged; + + public event EventHandler<Nullable<Double>> KChanged; + + public event EventHandler<Nullable<Double>> TiChanged; + + public event EventHandler<Double> LResChanged; + + public event EventHandler<Double> AResChanged; + + public event EventHandler<Double> BResChanged; + + public event EventHandler<Double> DeltaEChanged; + + public event EventHandler<RmlExtensionColorShadesTest> RmlExtensionColorShadesTestsChanged; + + protected String _rmlextensioncolorshadestestsguid; + + /// <summary> + /// Gets or sets the rmlextensioncolorshadestestsdatabase rml extension color shades tests guid. + /// </summary> + + [Column("RML_EXTENSION_COLOR_SHADES_TESTS_GUID")] + [ForeignKey("RmlExtensionColorShadesTests")] + + public String RmlExtensionColorShadesTestsGuid + { + get + { + return _rmlextensioncolorshadestestsguid; + } + + set + { + if (_rmlextensioncolorshadestestsguid != value) + { + _rmlextensioncolorshadestestsguid = value; + + } + } + } + + protected Int32 _colornum; + + /// <summary> + /// Gets or sets the rmlextensioncolorshadestestsdatabase color num. + /// </summary> + + [Column("COLOR_NUM")] + + public Int32 ColorNum + { + get + { + return _colornum; + } + + set + { + if (_colornum != value) + { + _colornum = value; + + OnColorNumChanged(value); + + } + } + } + + protected Double _l; + + /// <summary> + /// Gets or sets the rmlextensioncolorshadestestsdatabase l. + /// </summary> + + [Column("L")] + + public Double L + { + get + { + return _l; + } + + set + { + if (_l != value) + { + _l = value; + + OnLChanged(value); + + } + } + } + + protected Double _a; + + /// <summary> + /// Gets or sets the rmlextensioncolorshadestestsdatabase a. + /// </summary> + + [Column("A")] + + public Double A + { + get + { + return _a; + } + + set + { + if (_a != value) + { + _a = value; + + OnAChanged(value); + + } + } + } + + protected Double _b; + + /// <summary> + /// Gets or sets the rmlextensioncolorshadestestsdatabase b. + /// </summary> + + [Column("B")] + + public Double B + { + get + { + return _b; + } + + set + { + if (_b != value) + { + _b = value; + + OnBChanged(value); + + } + } + } + + protected Nullable<Double> _c; + + /// <summary> + /// Gets or sets the rmlextensioncolorshadestestsdatabase c. + /// </summary> + + [Column("C")] + + public Nullable<Double> C + { + get + { + return _c; + } + + set + { + if (_c != value) + { + _c = value; + + OnCChanged(value); + + } + } + } + + protected Nullable<Double> _m; + + /// <summary> + /// Gets or sets the rmlextensioncolorshadestestsdatabase m. + /// </summary> + + [Column("M")] + + public Nullable<Double> M + { + get + { + return _m; + } + + set + { + if (_m != value) + { + _m = value; + + OnMChanged(value); + + } + } + } + + protected Nullable<Double> _y; + + /// <summary> + /// Gets or sets the rmlextensioncolorshadestestsdatabase y. + /// </summary> + + [Column("Y")] + + public Nullable<Double> Y + { + get + { + return _y; + } + + set + { + if (_y != value) + { + _y = value; + + OnYChanged(value); + + } + } + } + + protected Nullable<Double> _k; + + /// <summary> + /// Gets or sets the rmlextensioncolorshadestestsdatabase k. + /// </summary> + + [Column("K")] + + public Nullable<Double> K + { + get + { + return _k; + } + + set + { + if (_k != value) + { + _k = value; + + OnKChanged(value); + + } + } + } + + protected Nullable<Double> _ti; + + /// <summary> + /// Gets or sets the rmlextensioncolorshadestestsdatabase ti. + /// </summary> + + [Column("TI")] + + public Nullable<Double> Ti + { + get + { + return _ti; + } + + set + { + if (_ti != value) + { + _ti = value; + + OnTiChanged(value); + + } + } + } + + protected Double _lres; + + /// <summary> + /// Gets or sets the rmlextensioncolorshadestestsdatabase l res. + /// </summary> + + [Column("L_RES")] + + public Double LRes + { + get + { + return _lres; + } + + set + { + if (_lres != value) + { + _lres = value; + + OnLResChanged(value); + + } + } + } + + protected Double _ares; + + /// <summary> + /// Gets or sets the rmlextensioncolorshadestestsdatabase a res. + /// </summary> + + [Column("A_RES")] + + public Double ARes + { + get + { + return _ares; + } + + set + { + if (_ares != value) + { + _ares = value; + + OnAResChanged(value); + + } + } + } + + protected Double _bres; + + /// <summary> + /// Gets or sets the rmlextensioncolorshadestestsdatabase b res. + /// </summary> + + [Column("B_RES")] + + public Double BRes + { + get + { + return _bres; + } + + set + { + if (_bres != value) + { + _bres = value; + + OnBResChanged(value); + + } + } + } + + protected Double _deltae; + + /// <summary> + /// Gets or sets the rmlextensioncolorshadestestsdatabase delta e. + /// </summary> + + [Column("DELTA_E")] + + public Double DeltaE + { + get + { + return _deltae; + } + + set + { + if (_deltae != value) + { + _deltae = value; + + OnDeltaEChanged(value); + + } + } + } + + protected RmlExtensionColorShadesTest _rmlextensioncolorshadestests; + + /// <summary> + /// Gets or sets the rmlextensioncolorshadestestsdatabase rml extension color shades tests. + /// </summary> + + [XmlIgnore] + [JsonIgnore] + public virtual RmlExtensionColorShadesTest RmlExtensionColorShadesTests + { + get + { + return _rmlextensioncolorshadestests; + } + + set + { + if (_rmlextensioncolorshadestests != value) + { + _rmlextensioncolorshadestests = value; + + if (RmlExtensionColorShadesTests != null) + { + RmlExtensionColorShadesTestsGuid = RmlExtensionColorShadesTests.Guid; + } + + OnRmlExtensionColorShadesTestsChanged(value); + + } + } + } + + /// <summary> + /// Called when the ColorNum has changed. + /// </summary> + protected virtual void OnColorNumChanged(Int32 colornum) + { + ColorNumChanged?.Invoke(this, colornum); + RaisePropertyChanged(nameof(ColorNum)); + } + + /// <summary> + /// Called when the L has changed. + /// </summary> + protected virtual void OnLChanged(Double l) + { + LChanged?.Invoke(this, l); + RaisePropertyChanged(nameof(L)); + } + + /// <summary> + /// Called when the A has changed. + /// </summary> + protected virtual void OnAChanged(Double a) + { + AChanged?.Invoke(this, a); + RaisePropertyChanged(nameof(A)); + } + + /// <summary> + /// Called when the B has changed. + /// </summary> + protected virtual void OnBChanged(Double b) + { + BChanged?.Invoke(this, b); + RaisePropertyChanged(nameof(B)); + } + + /// <summary> + /// Called when the C has changed. + /// </summary> + protected virtual void OnCChanged(Nullable<Double> c) + { + CChanged?.Invoke(this, c); + RaisePropertyChanged(nameof(C)); + } + + /// <summary> + /// Called when the M has changed. + /// </summary> + protected virtual void OnMChanged(Nullable<Double> m) + { + MChanged?.Invoke(this, m); + RaisePropertyChanged(nameof(M)); + } + + /// <summary> + /// Called when the Y has changed. + /// </summary> + protected virtual void OnYChanged(Nullable<Double> y) + { + YChanged?.Invoke(this, y); + RaisePropertyChanged(nameof(Y)); + } + + /// <summary> + /// Called when the K has changed. + /// </summary> + protected virtual void OnKChanged(Nullable<Double> k) + { + KChanged?.Invoke(this, k); + RaisePropertyChanged(nameof(K)); + } + + /// <summary> + /// Called when the Ti has changed. + /// </summary> + protected virtual void OnTiChanged(Nullable<Double> ti) + { + TiChanged?.Invoke(this, ti); + RaisePropertyChanged(nameof(Ti)); + } + + /// <summary> + /// Called when the LRes has changed. + /// </summary> + protected virtual void OnLResChanged(Double lres) + { + LResChanged?.Invoke(this, lres); + RaisePropertyChanged(nameof(LRes)); + } + + /// <summary> + /// Called when the ARes has changed. + /// </summary> + protected virtual void OnAResChanged(Double ares) + { + AResChanged?.Invoke(this, ares); + RaisePropertyChanged(nameof(ARes)); + } + + /// <summary> + /// Called when the BRes has changed. + /// </summary> + protected virtual void OnBResChanged(Double bres) + { + BResChanged?.Invoke(this, bres); + RaisePropertyChanged(nameof(BRes)); + } + + /// <summary> + /// Called when the DeltaE has changed. + /// </summary> + protected virtual void OnDeltaEChanged(Double deltae) + { + DeltaEChanged?.Invoke(this, deltae); + RaisePropertyChanged(nameof(DeltaE)); + } + + /// <summary> + /// Called when the RmlExtensionColorShadesTests has changed. + /// </summary> + protected virtual void OnRmlExtensionColorShadesTestsChanged(RmlExtensionColorShadesTest rmlextensioncolorshadestests) + { + RmlExtensionColorShadesTestsChanged?.Invoke(this, rmlextensioncolorshadestests); + RaisePropertyChanged(nameof(RmlExtensionColorShadesTests)); + } + + /// <summary> + /// Initializes a new instance of the <see cref="RmlExtensionColorShadesTestsDataBase" /> class. + /// </summary> + public RmlExtensionColorShadesTestsDataBase() : base() + { + } + } +} diff --git a/Software/Visual_Studio/Tango.BL/Entities/RmlExtensionTestResultBase.cs b/Software/Visual_Studio/Tango.BL/Entities/RmlExtensionTestResultBase.cs index 561b311d7..7f6804039 100644 --- a/Software/Visual_Studio/Tango.BL/Entities/RmlExtensionTestResultBase.cs +++ b/Software/Visual_Studio/Tango.BL/Entities/RmlExtensionTestResultBase.cs @@ -93,6 +93,8 @@ namespace Tango.BL.Entities public event EventHandler<Machine> MachineChanged; + public event EventHandler<SynchronizedObservableCollection<RmlExtensionTestResultsFile>> RmlExtensionTestResultsFilesChanged; + public event EventHandler<SynchronizedObservableCollection<RubbingResult>> RubbingResultsChanged; protected String _rmlsextensionsguid; @@ -1046,6 +1048,31 @@ namespace Tango.BL.Entities } } + protected SynchronizedObservableCollection<RmlExtensionTestResultsFile> _rmlextensiontestresultsfiles; + + /// <summary> + /// Gets or sets the rmlextensiontestresultbase rml extension test results files. + /// </summary> + + public virtual SynchronizedObservableCollection<RmlExtensionTestResultsFile> RmlExtensionTestResultsFiles + { + get + { + return _rmlextensiontestresultsfiles; + } + + set + { + if (_rmlextensiontestresultsfiles != value) + { + _rmlextensiontestresultsfiles = value; + + OnRmlExtensionTestResultsFilesChanged(value); + + } + } + } + protected SynchronizedObservableCollection<RubbingResult> _rubbingresults; /// <summary> @@ -1369,6 +1396,15 @@ namespace Tango.BL.Entities } /// <summary> + /// Called when the RmlExtensionTestResultsFiles has changed. + /// </summary> + protected virtual void OnRmlExtensionTestResultsFilesChanged(SynchronizedObservableCollection<RmlExtensionTestResultsFile> rmlextensiontestresultsfiles) + { + RmlExtensionTestResultsFilesChanged?.Invoke(this, rmlextensiontestresultsfiles); + RaisePropertyChanged(nameof(RmlExtensionTestResultsFiles)); + } + + /// <summary> /// Called when the RubbingResults has changed. /// </summary> protected virtual void OnRubbingResultsChanged(SynchronizedObservableCollection<RubbingResult> rubbingresults) @@ -1385,6 +1421,8 @@ namespace Tango.BL.Entities TensileResults = new SynchronizedObservableCollection<TensileResult>(); + RmlExtensionTestResultsFiles = new SynchronizedObservableCollection<RmlExtensionTestResultsFile>(); + RubbingResults = new SynchronizedObservableCollection<RubbingResult>(); } diff --git a/Software/Visual_Studio/Tango.BL/Entities/RmlExtensionTestResultsFile.cs b/Software/Visual_Studio/Tango.BL/Entities/RmlExtensionTestResultsFile.cs new file mode 100644 index 000000000..5ae38f7f5 --- /dev/null +++ b/Software/Visual_Studio/Tango.BL/Entities/RmlExtensionTestResultsFile.cs @@ -0,0 +1,16 @@ +//------------------------------------------------------------------------------ +// <auto-generated> +// This code was generated by a tool. +// Tango Observables Generator +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. Do not modify! +// </auto-generated> +//------------------------------------------------------------------------------ + +namespace Tango.BL.Entities +{ + public class RmlExtensionTestResultsFile : RmlExtensionTestResultsFileBase + { + } +}
\ No newline at end of file diff --git a/Software/Visual_Studio/Tango.BL/Entities/RmlExtensionTestResultsFileBase.cs b/Software/Visual_Studio/Tango.BL/Entities/RmlExtensionTestResultsFileBase.cs new file mode 100644 index 000000000..37cc8fd4a --- /dev/null +++ b/Software/Visual_Studio/Tango.BL/Entities/RmlExtensionTestResultsFileBase.cs @@ -0,0 +1,182 @@ +//------------------------------------------------------------------------------ +// <auto-generated> +// This code was generated by a tool. +// Tango Observables Generator +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. Do not modify! +// </auto-generated> +//------------------------------------------------------------------------------ + +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using System.Xml.Serialization; +using Newtonsoft.Json; +using System.Linq; +using Tango.DAL.Remote.DB; +using Tango.Core; +using System.ComponentModel; +using Tango.Core.CustomAttributes; + +namespace Tango.BL.Entities +{ + [Table("RML_EXTENSION_TEST_RESULTS_FILES")] + public abstract class RmlExtensionTestResultsFileBase : ObservableEntity<RmlExtensionTestResultsFile> + { + + public event EventHandler<String> FileNameChanged; + + public event EventHandler<String> FilePathChanged; + + public event EventHandler<RmlExtensionTestResult> RmlExtensionTestResultsChanged; + + protected String _rmlextensiontestresultsguid; + + /// <summary> + /// Gets or sets the rmlextensiontestresultsfilebase rml extension test results guid. + /// </summary> + + [Column("RML_EXTENSION_TEST_RESULTS_GUID")] + [ForeignKey("RmlExtensionTestResults")] + + public String RmlExtensionTestResultsGuid + { + get + { + return _rmlextensiontestresultsguid; + } + + set + { + if (_rmlextensiontestresultsguid != value) + { + _rmlextensiontestresultsguid = value; + + } + } + } + + protected String _filename; + + /// <summary> + /// Gets or sets the rmlextensiontestresultsfilebase file name. + /// </summary> + + [Column("FILE_NAME")] + + public String FileName + { + get + { + return _filename; + } + + set + { + if (_filename != value) + { + _filename = value; + + OnFileNameChanged(value); + + } + } + } + + protected String _filepath; + + /// <summary> + /// Gets or sets the rmlextensiontestresultsfilebase file path. + /// </summary> + + [Column("FILE_PATH")] + + public String FilePath + { + get + { + return _filepath; + } + + set + { + if (_filepath != value) + { + _filepath = value; + + OnFilePathChanged(value); + + } + } + } + + protected RmlExtensionTestResult _rmlextensiontestresults; + + /// <summary> + /// Gets or sets the rmlextensiontestresultsfilebase rml extension test results. + /// </summary> + + [XmlIgnore] + [JsonIgnore] + public virtual RmlExtensionTestResult RmlExtensionTestResults + { + get + { + return _rmlextensiontestresults; + } + + set + { + if (_rmlextensiontestresults != value) + { + _rmlextensiontestresults = value; + + if (RmlExtensionTestResults != null) + { + RmlExtensionTestResultsGuid = RmlExtensionTestResults.Guid; + } + + OnRmlExtensionTestResultsChanged(value); + + } + } + } + + /// <summary> + /// Called when the FileName has changed. + /// </summary> + protected virtual void OnFileNameChanged(String filename) + { + FileNameChanged?.Invoke(this, filename); + RaisePropertyChanged(nameof(FileName)); + } + + /// <summary> + /// Called when the FilePath has changed. + /// </summary> + protected virtual void OnFilePathChanged(String filepath) + { + FilePathChanged?.Invoke(this, filepath); + RaisePropertyChanged(nameof(FilePath)); + } + + /// <summary> + /// Called when the RmlExtensionTestResults has changed. + /// </summary> + protected virtual void OnRmlExtensionTestResultsChanged(RmlExtensionTestResult rmlextensiontestresults) + { + RmlExtensionTestResultsChanged?.Invoke(this, rmlextensiontestresults); + RaisePropertyChanged(nameof(RmlExtensionTestResults)); + } + + /// <summary> + /// Initializes a new instance of the <see cref="RmlExtensionTestResultsFileBase" /> class. + /// </summary> + public RmlExtensionTestResultsFileBase() : base() + { + } + } +} diff --git a/Software/Visual_Studio/Tango.BL/Entities/RmlsExtensionBase.cs b/Software/Visual_Studio/Tango.BL/Entities/RmlsExtensionBase.cs index a5ef66b9d..09652ea08 100644 --- a/Software/Visual_Studio/Tango.BL/Entities/RmlsExtensionBase.cs +++ b/Software/Visual_Studio/Tango.BL/Entities/RmlsExtensionBase.cs @@ -83,6 +83,10 @@ namespace Tango.BL.Entities public event EventHandler<YarnWhiteShade> YarnWhiteShadeChanged; + public event EventHandler<SynchronizedObservableCollection<RmlExtensionColorCalibration>> RmlExtensionColorCalibrationsChanged; + + public event EventHandler<SynchronizedObservableCollection<RmlExtensionColorShade>> RmlExtensionColorShadesChanged; + public event EventHandler<Rml> RmlsChanged; protected String _rmlsguid; @@ -1198,6 +1202,56 @@ namespace Tango.BL.Entities } } + protected SynchronizedObservableCollection<RmlExtensionColorCalibration> _rmlextensioncolorcalibrations; + + /// <summary> + /// Gets or sets the rmlsextensionbase rml extension color calibrations. + /// </summary> + + public virtual SynchronizedObservableCollection<RmlExtensionColorCalibration> RmlExtensionColorCalibrations + { + get + { + return _rmlextensioncolorcalibrations; + } + + set + { + if (_rmlextensioncolorcalibrations != value) + { + _rmlextensioncolorcalibrations = value; + + OnRmlExtensionColorCalibrationsChanged(value); + + } + } + } + + protected SynchronizedObservableCollection<RmlExtensionColorShade> _rmlextensioncolorshades; + + /// <summary> + /// Gets or sets the rmlsextensionbase rml extension color shades. + /// </summary> + + public virtual SynchronizedObservableCollection<RmlExtensionColorShade> RmlExtensionColorShades + { + get + { + return _rmlextensioncolorshades; + } + + set + { + if (_rmlextensioncolorshades != value) + { + _rmlextensioncolorshades = value; + + OnRmlExtensionColorShadesChanged(value); + + } + } + } + protected Rml _rmls; /// <summary> @@ -1483,6 +1537,24 @@ namespace Tango.BL.Entities } /// <summary> + /// Called when the RmlExtensionColorCalibrations has changed. + /// </summary> + protected virtual void OnRmlExtensionColorCalibrationsChanged(SynchronizedObservableCollection<RmlExtensionColorCalibration> rmlextensioncolorcalibrations) + { + RmlExtensionColorCalibrationsChanged?.Invoke(this, rmlextensioncolorcalibrations); + RaisePropertyChanged(nameof(RmlExtensionColorCalibrations)); + } + + /// <summary> + /// Called when the RmlExtensionColorShades has changed. + /// </summary> + protected virtual void OnRmlExtensionColorShadesChanged(SynchronizedObservableCollection<RmlExtensionColorShade> rmlextensioncolorshades) + { + RmlExtensionColorShadesChanged?.Invoke(this, rmlextensioncolorshades); + RaisePropertyChanged(nameof(RmlExtensionColorShades)); + } + + /// <summary> /// Called when the Rmls has changed. /// </summary> protected virtual void OnRmlsChanged(Rml rmls) @@ -1501,6 +1573,10 @@ namespace Tango.BL.Entities RmlExtensionTestResults = new SynchronizedObservableCollection<RmlExtensionTestResult>(); + RmlExtensionColorCalibrations = new SynchronizedObservableCollection<RmlExtensionColorCalibration>(); + + RmlExtensionColorShades = new SynchronizedObservableCollection<RmlExtensionColorShade>(); + } } } diff --git a/Software/Visual_Studio/Tango.BL/Enumerations/ColorSpaces.cs b/Software/Visual_Studio/Tango.BL/Enumerations/ColorSpaces.cs index 00fb75b42..63970e879 100644 --- a/Software/Visual_Studio/Tango.BL/Enumerations/ColorSpaces.cs +++ b/Software/Visual_Studio/Tango.BL/Enumerations/ColorSpaces.cs @@ -50,7 +50,7 @@ namespace Tango.BL.Enumerations Catalog = 4, /// <summary> - /// (Catalog) + /// (HSB) /// </summary> [Description("HSB")] HSB = 5, diff --git a/Software/Visual_Studio/Tango.BL/ObservablesContext.cs b/Software/Visual_Studio/Tango.BL/ObservablesContext.cs index 7cd312f16..f62ae38bd 100644 --- a/Software/Visual_Studio/Tango.BL/ObservablesContext.cs +++ b/Software/Visual_Studio/Tango.BL/ObservablesContext.cs @@ -703,6 +703,70 @@ namespace Tango.BL } /// <summary> + /// Gets or sets the RmlExtensionColorCalibrations. + /// </summary> + public DbSet<RmlExtensionColorCalibration> RmlExtensionColorCalibrations + { + get; set; + } + + /// <summary> + /// Gets or sets the RmlExtensionColorCalibrationsTests. + /// </summary> + public DbSet<RmlExtensionColorCalibrationsTest> RmlExtensionColorCalibrationsTests + { + get; set; + } + + /// <summary> + /// Gets or sets the RmlExtensionColorCalibrationsTestsLiquidData. + /// </summary> + public DbSet<RmlExtensionColorCalibrationsTestsLiquidData> RmlExtensionColorCalibrationsTestsLiquidData + { + get; set; + } + + /// <summary> + /// Gets or sets the RmlExtensionColorCalibrationsTestsLiquidDataPoints. + /// </summary> + public DbSet<RmlExtensionColorCalibrationsTestsLiquidDataPoint> RmlExtensionColorCalibrationsTestsLiquidDataPoints + { + get; set; + } + + /// <summary> + /// Gets or sets the RmlExtensionColorShades. + /// </summary> + public DbSet<RmlExtensionColorShade> RmlExtensionColorShades + { + get; set; + } + + /// <summary> + /// Gets or sets the RmlExtensionColorShadesTests. + /// </summary> + public DbSet<RmlExtensionColorShadesTest> RmlExtensionColorShadesTests + { + get; set; + } + + /// <summary> + /// Gets or sets the RmlExtensionColorShadesTestsData. + /// </summary> + public DbSet<RmlExtensionColorShadesTestsData> RmlExtensionColorShadesTestsData + { + get; set; + } + + /// <summary> + /// Gets or sets the RmlExtensionTestResultsFiles. + /// </summary> + public DbSet<RmlExtensionTestResultsFile> RmlExtensionTestResultsFiles + { + get; set; + } + + /// <summary> /// Gets or sets the Rmls. /// </summary> public DbSet<Rml> Rmls diff --git a/Software/Visual_Studio/Tango.BL/ObservablesEntitiesAdapterExtension.cs b/Software/Visual_Studio/Tango.BL/ObservablesEntitiesAdapterExtension.cs index f3e7a2a2b..a9d32e87d 100644 --- a/Software/Visual_Studio/Tango.BL/ObservablesEntitiesAdapterExtension.cs +++ b/Software/Visual_Studio/Tango.BL/ObservablesEntitiesAdapterExtension.cs @@ -3077,6 +3077,294 @@ namespace Tango.BL } + private ObservableCollection<RmlExtensionColorCalibration> _rmlextensioncolorcalibrations; + /// <summary> + /// Gets or sets the RmlExtensionColorCalibrations. + /// </summary> + public ObservableCollection<RmlExtensionColorCalibration> RmlExtensionColorCalibrations + { + get + { + return _rmlextensioncolorcalibrations; + } + + set + { + _rmlextensioncolorcalibrations = value; RaisePropertyChanged(nameof(RmlExtensionColorCalibrations)); + } + + } + + private ICollectionView _rmlextensioncolorcalibrationsViewSource; + /// <summary> + /// Gets or sets the RmlExtensionColorCalibrations View Source. + ///</summary> + public ICollectionView RmlExtensionColorCalibrationsViewSource + { + get + { + return _rmlextensioncolorcalibrationsViewSource; + } + + set + { + _rmlextensioncolorcalibrationsViewSource = value; RaisePropertyChanged(nameof(RmlExtensionColorCalibrationsViewSource)); + } + + } + + private ObservableCollection<RmlExtensionColorCalibrationsTest> _rmlextensioncolorcalibrationstests; + /// <summary> + /// Gets or sets the RmlExtensionColorCalibrationsTests. + /// </summary> + public ObservableCollection<RmlExtensionColorCalibrationsTest> RmlExtensionColorCalibrationsTests + { + get + { + return _rmlextensioncolorcalibrationstests; + } + + set + { + _rmlextensioncolorcalibrationstests = value; RaisePropertyChanged(nameof(RmlExtensionColorCalibrationsTests)); + } + + } + + private ICollectionView _rmlextensioncolorcalibrationstestsViewSource; + /// <summary> + /// Gets or sets the RmlExtensionColorCalibrationsTests View Source. + ///</summary> + public ICollectionView RmlExtensionColorCalibrationsTestsViewSource + { + get + { + return _rmlextensioncolorcalibrationstestsViewSource; + } + + set + { + _rmlextensioncolorcalibrationstestsViewSource = value; RaisePropertyChanged(nameof(RmlExtensionColorCalibrationsTestsViewSource)); + } + + } + + private ObservableCollection<RmlExtensionColorCalibrationsTestsLiquidData> _rmlextensioncolorcalibrationstestsliquiddata; + /// <summary> + /// Gets or sets the RmlExtensionColorCalibrationsTestsLiquidData. + /// </summary> + public ObservableCollection<RmlExtensionColorCalibrationsTestsLiquidData> RmlExtensionColorCalibrationsTestsLiquidData + { + get + { + return _rmlextensioncolorcalibrationstestsliquiddata; + } + + set + { + _rmlextensioncolorcalibrationstestsliquiddata = value; RaisePropertyChanged(nameof(RmlExtensionColorCalibrationsTestsLiquidData)); + } + + } + + private ICollectionView _rmlextensioncolorcalibrationstestsliquiddataViewSource; + /// <summary> + /// Gets or sets the RmlExtensionColorCalibrationsTestsLiquidData View Source. + ///</summary> + public ICollectionView RmlExtensionColorCalibrationsTestsLiquidDataViewSource + { + get + { + return _rmlextensioncolorcalibrationstestsliquiddataViewSource; + } + + set + { + _rmlextensioncolorcalibrationstestsliquiddataViewSource = value; RaisePropertyChanged(nameof(RmlExtensionColorCalibrationsTestsLiquidDataViewSource)); + } + + } + + private ObservableCollection<RmlExtensionColorCalibrationsTestsLiquidDataPoint> _rmlextensioncolorcalibrationstestsliquiddatapoints; + /// <summary> + /// Gets or sets the RmlExtensionColorCalibrationsTestsLiquidDataPoints. + /// </summary> + public ObservableCollection<RmlExtensionColorCalibrationsTestsLiquidDataPoint> RmlExtensionColorCalibrationsTestsLiquidDataPoints + { + get + { + return _rmlextensioncolorcalibrationstestsliquiddatapoints; + } + + set + { + _rmlextensioncolorcalibrationstestsliquiddatapoints = value; RaisePropertyChanged(nameof(RmlExtensionColorCalibrationsTestsLiquidDataPoints)); + } + + } + + private ICollectionView _rmlextensioncolorcalibrationstestsliquiddatapointsViewSource; + /// <summary> + /// Gets or sets the RmlExtensionColorCalibrationsTestsLiquidDataPoints View Source. + ///</summary> + public ICollectionView RmlExtensionColorCalibrationsTestsLiquidDataPointsViewSource + { + get + { + return _rmlextensioncolorcalibrationstestsliquiddatapointsViewSource; + } + + set + { + _rmlextensioncolorcalibrationstestsliquiddatapointsViewSource = value; RaisePropertyChanged(nameof(RmlExtensionColorCalibrationsTestsLiquidDataPointsViewSource)); + } + + } + + private ObservableCollection<RmlExtensionColorShade> _rmlextensioncolorshades; + /// <summary> + /// Gets or sets the RmlExtensionColorShades. + /// </summary> + public ObservableCollection<RmlExtensionColorShade> RmlExtensionColorShades + { + get + { + return _rmlextensioncolorshades; + } + + set + { + _rmlextensioncolorshades = value; RaisePropertyChanged(nameof(RmlExtensionColorShades)); + } + + } + + private ICollectionView _rmlextensioncolorshadesViewSource; + /// <summary> + /// Gets or sets the RmlExtensionColorShades View Source. + ///</summary> + public ICollectionView RmlExtensionColorShadesViewSource + { + get + { + return _rmlextensioncolorshadesViewSource; + } + + set + { + _rmlextensioncolorshadesViewSource = value; RaisePropertyChanged(nameof(RmlExtensionColorShadesViewSource)); + } + + } + + private ObservableCollection<RmlExtensionColorShadesTest> _rmlextensioncolorshadestests; + /// <summary> + /// Gets or sets the RmlExtensionColorShadesTests. + /// </summary> + public ObservableCollection<RmlExtensionColorShadesTest> RmlExtensionColorShadesTests + { + get + { + return _rmlextensioncolorshadestests; + } + + set + { + _rmlextensioncolorshadestests = value; RaisePropertyChanged(nameof(RmlExtensionColorShadesTests)); + } + + } + + private ICollectionView _rmlextensioncolorshadestestsViewSource; + /// <summary> + /// Gets or sets the RmlExtensionColorShadesTests View Source. + ///</summary> + public ICollectionView RmlExtensionColorShadesTestsViewSource + { + get + { + return _rmlextensioncolorshadestestsViewSource; + } + + set + { + _rmlextensioncolorshadestestsViewSource = value; RaisePropertyChanged(nameof(RmlExtensionColorShadesTestsViewSource)); + } + + } + + private ObservableCollection<RmlExtensionColorShadesTestsData> _rmlextensioncolorshadestestsdata; + /// <summary> + /// Gets or sets the RmlExtensionColorShadesTestsData. + /// </summary> + public ObservableCollection<RmlExtensionColorShadesTestsData> RmlExtensionColorShadesTestsData + { + get + { + return _rmlextensioncolorshadestestsdata; + } + + set + { + _rmlextensioncolorshadestestsdata = value; RaisePropertyChanged(nameof(RmlExtensionColorShadesTestsData)); + } + + } + + private ICollectionView _rmlextensioncolorshadestestsdataViewSource; + /// <summary> + /// Gets or sets the RmlExtensionColorShadesTestsData View Source. + ///</summary> + public ICollectionView RmlExtensionColorShadesTestsDataViewSource + { + get + { + return _rmlextensioncolorshadestestsdataViewSource; + } + + set + { + _rmlextensioncolorshadestestsdataViewSource = value; RaisePropertyChanged(nameof(RmlExtensionColorShadesTestsDataViewSource)); + } + + } + + private ObservableCollection<RmlExtensionTestResultsFile> _rmlextensiontestresultsfiles; + /// <summary> + /// Gets or sets the RmlExtensionTestResultsFiles. + /// </summary> + public ObservableCollection<RmlExtensionTestResultsFile> RmlExtensionTestResultsFiles + { + get + { + return _rmlextensiontestresultsfiles; + } + + set + { + _rmlextensiontestresultsfiles = value; RaisePropertyChanged(nameof(RmlExtensionTestResultsFiles)); + } + + } + + private ICollectionView _rmlextensiontestresultsfilesViewSource; + /// <summary> + /// Gets or sets the RmlExtensionTestResultsFiles View Source. + ///</summary> + public ICollectionView RmlExtensionTestResultsFilesViewSource + { + get + { + return _rmlextensiontestresultsfilesViewSource; + } + + set + { + _rmlextensiontestresultsfilesViewSource = value; RaisePropertyChanged(nameof(RmlExtensionTestResultsFilesViewSource)); + } + + } + private ObservableCollection<Rml> _rmls; /// <summary> /// Gets or sets the Rmls. @@ -4153,6 +4441,22 @@ namespace Tango.BL PublishedProcedureProjectsVersionsViewSource = CreateCollectionView(PublishedProcedureProjectsVersions); + RmlExtensionColorCalibrationsViewSource = CreateCollectionView(RmlExtensionColorCalibrations); + + RmlExtensionColorCalibrationsTestsViewSource = CreateCollectionView(RmlExtensionColorCalibrationsTests); + + RmlExtensionColorCalibrationsTestsLiquidDataViewSource = CreateCollectionView(RmlExtensionColorCalibrationsTestsLiquidData); + + RmlExtensionColorCalibrationsTestsLiquidDataPointsViewSource = CreateCollectionView(RmlExtensionColorCalibrationsTestsLiquidDataPoints); + + RmlExtensionColorShadesViewSource = CreateCollectionView(RmlExtensionColorShades); + + RmlExtensionColorShadesTestsViewSource = CreateCollectionView(RmlExtensionColorShadesTests); + + RmlExtensionColorShadesTestsDataViewSource = CreateCollectionView(RmlExtensionColorShadesTestsData); + + RmlExtensionTestResultsFilesViewSource = CreateCollectionView(RmlExtensionTestResultsFiles); + RmlsViewSource = CreateCollectionView(Rmls); RmlsSpoolsViewSource = CreateCollectionView(RmlsSpools); diff --git a/Software/Visual_Studio/Tango.BL/ObservablesStaticCollectionsExtension.cs b/Software/Visual_Studio/Tango.BL/ObservablesStaticCollectionsExtension.cs index dc43b9b2b..e3b7a68ea 100644 --- a/Software/Visual_Studio/Tango.BL/ObservablesStaticCollectionsExtension.cs +++ b/Software/Visual_Studio/Tango.BL/ObservablesStaticCollectionsExtension.cs @@ -3077,6 +3077,294 @@ namespace Tango.BL } + private ObservableCollection<RmlExtensionColorCalibration> _rmlextensioncolorcalibrations; + /// <summary> + /// Gets or sets the RmlExtensionColorCalibrations. + /// </summary> + public ObservableCollection<RmlExtensionColorCalibration> RmlExtensionColorCalibrations + { + get + { + return _rmlextensioncolorcalibrations; + } + + set + { + _rmlextensioncolorcalibrations = value; RaisePropertyChanged(nameof(RmlExtensionColorCalibrations)); + } + + } + + private ICollectionView _rmlextensioncolorcalibrationsViewSource; + /// <summary> + /// Gets or sets the RmlExtensionColorCalibrations View Source. + ///</summary> + public ICollectionView RmlExtensionColorCalibrationsViewSource + { + get + { + return _rmlextensioncolorcalibrationsViewSource; + } + + set + { + _rmlextensioncolorcalibrationsViewSource = value; RaisePropertyChanged(nameof(RmlExtensionColorCalibrationsViewSource)); + } + + } + + private ObservableCollection<RmlExtensionColorCalibrationsTest> _rmlextensioncolorcalibrationstests; + /// <summary> + /// Gets or sets the RmlExtensionColorCalibrationsTests. + /// </summary> + public ObservableCollection<RmlExtensionColorCalibrationsTest> RmlExtensionColorCalibrationsTests + { + get + { + return _rmlextensioncolorcalibrationstests; + } + + set + { + _rmlextensioncolorcalibrationstests = value; RaisePropertyChanged(nameof(RmlExtensionColorCalibrationsTests)); + } + + } + + private ICollectionView _rmlextensioncolorcalibrationstestsViewSource; + /// <summary> + /// Gets or sets the RmlExtensionColorCalibrationsTests View Source. + ///</summary> + public ICollectionView RmlExtensionColorCalibrationsTestsViewSource + { + get + { + return _rmlextensioncolorcalibrationstestsViewSource; + } + + set + { + _rmlextensioncolorcalibrationstestsViewSource = value; RaisePropertyChanged(nameof(RmlExtensionColorCalibrationsTestsViewSource)); + } + + } + + private ObservableCollection<RmlExtensionColorCalibrationsTestsLiquidData> _rmlextensioncolorcalibrationstestsliquiddata; + /// <summary> + /// Gets or sets the RmlExtensionColorCalibrationsTestsLiquidData. + /// </summary> + public ObservableCollection<RmlExtensionColorCalibrationsTestsLiquidData> RmlExtensionColorCalibrationsTestsLiquidData + { + get + { + return _rmlextensioncolorcalibrationstestsliquiddata; + } + + set + { + _rmlextensioncolorcalibrationstestsliquiddata = value; RaisePropertyChanged(nameof(RmlExtensionColorCalibrationsTestsLiquidData)); + } + + } + + private ICollectionView _rmlextensioncolorcalibrationstestsliquiddataViewSource; + /// <summary> + /// Gets or sets the RmlExtensionColorCalibrationsTestsLiquidData View Source. + ///</summary> + public ICollectionView RmlExtensionColorCalibrationsTestsLiquidDataViewSource + { + get + { + return _rmlextensioncolorcalibrationstestsliquiddataViewSource; + } + + set + { + _rmlextensioncolorcalibrationstestsliquiddataViewSource = value; RaisePropertyChanged(nameof(RmlExtensionColorCalibrationsTestsLiquidDataViewSource)); + } + + } + + private ObservableCollection<RmlExtensionColorCalibrationsTestsLiquidDataPoint> _rmlextensioncolorcalibrationstestsliquiddatapoints; + /// <summary> + /// Gets or sets the RmlExtensionColorCalibrationsTestsLiquidDataPoints. + /// </summary> + public ObservableCollection<RmlExtensionColorCalibrationsTestsLiquidDataPoint> RmlExtensionColorCalibrationsTestsLiquidDataPoints + { + get + { + return _rmlextensioncolorcalibrationstestsliquiddatapoints; + } + + set + { + _rmlextensioncolorcalibrationstestsliquiddatapoints = value; RaisePropertyChanged(nameof(RmlExtensionColorCalibrationsTestsLiquidDataPoints)); + } + + } + + private ICollectionView _rmlextensioncolorcalibrationstestsliquiddatapointsViewSource; + /// <summary> + /// Gets or sets the RmlExtensionColorCalibrationsTestsLiquidDataPoints View Source. + ///</summary> + public ICollectionView RmlExtensionColorCalibrationsTestsLiquidDataPointsViewSource + { + get + { + return _rmlextensioncolorcalibrationstestsliquiddatapointsViewSource; + } + + set + { + _rmlextensioncolorcalibrationstestsliquiddatapointsViewSource = value; RaisePropertyChanged(nameof(RmlExtensionColorCalibrationsTestsLiquidDataPointsViewSource)); + } + + } + + private ObservableCollection<RmlExtensionColorShade> _rmlextensioncolorshades; + /// <summary> + /// Gets or sets the RmlExtensionColorShades. + /// </summary> + public ObservableCollection<RmlExtensionColorShade> RmlExtensionColorShades + { + get + { + return _rmlextensioncolorshades; + } + + set + { + _rmlextensioncolorshades = value; RaisePropertyChanged(nameof(RmlExtensionColorShades)); + } + + } + + private ICollectionView _rmlextensioncolorshadesViewSource; + /// <summary> + /// Gets or sets the RmlExtensionColorShades View Source. + ///</summary> + public ICollectionView RmlExtensionColorShadesViewSource + { + get + { + return _rmlextensioncolorshadesViewSource; + } + + set + { + _rmlextensioncolorshadesViewSource = value; RaisePropertyChanged(nameof(RmlExtensionColorShadesViewSource)); + } + + } + + private ObservableCollection<RmlExtensionColorShadesTest> _rmlextensioncolorshadestests; + /// <summary> + /// Gets or sets the RmlExtensionColorShadesTests. + /// </summary> + public ObservableCollection<RmlExtensionColorShadesTest> RmlExtensionColorShadesTests + { + get + { + return _rmlextensioncolorshadestests; + } + + set + { + _rmlextensioncolorshadestests = value; RaisePropertyChanged(nameof(RmlExtensionColorShadesTests)); + } + + } + + private ICollectionView _rmlextensioncolorshadestestsViewSource; + /// <summary> + /// Gets or sets the RmlExtensionColorShadesTests View Source. + ///</summary> + public ICollectionView RmlExtensionColorShadesTestsViewSource + { + get + { + return _rmlextensioncolorshadestestsViewSource; + } + + set + { + _rmlextensioncolorshadestestsViewSource = value; RaisePropertyChanged(nameof(RmlExtensionColorShadesTestsViewSource)); + } + + } + + private ObservableCollection<RmlExtensionColorShadesTestsData> _rmlextensioncolorshadestestsdata; + /// <summary> + /// Gets or sets the RmlExtensionColorShadesTestsData. + /// </summary> + public ObservableCollection<RmlExtensionColorShadesTestsData> RmlExtensionColorShadesTestsData + { + get + { + return _rmlextensioncolorshadestestsdata; + } + + set + { + _rmlextensioncolorshadestestsdata = value; RaisePropertyChanged(nameof(RmlExtensionColorShadesTestsData)); + } + + } + + private ICollectionView _rmlextensioncolorshadestestsdataViewSource; + /// <summary> + /// Gets or sets the RmlExtensionColorShadesTestsData View Source. + ///</summary> + public ICollectionView RmlExtensionColorShadesTestsDataViewSource + { + get + { + return _rmlextensioncolorshadestestsdataViewSource; + } + + set + { + _rmlextensioncolorshadestestsdataViewSource = value; RaisePropertyChanged(nameof(RmlExtensionColorShadesTestsDataViewSource)); + } + + } + + private ObservableCollection<RmlExtensionTestResultsFile> _rmlextensiontestresultsfiles; + /// <summary> + /// Gets or sets the RmlExtensionTestResultsFiles. + /// </summary> + public ObservableCollection<RmlExtensionTestResultsFile> RmlExtensionTestResultsFiles + { + get + { + return _rmlextensiontestresultsfiles; + } + + set + { + _rmlextensiontestresultsfiles = value; RaisePropertyChanged(nameof(RmlExtensionTestResultsFiles)); + } + + } + + private ICollectionView _rmlextensiontestresultsfilesViewSource; + /// <summary> + /// Gets or sets the RmlExtensionTestResultsFiles View Source. + ///</summary> + public ICollectionView RmlExtensionTestResultsFilesViewSource + { + get + { + return _rmlextensiontestresultsfilesViewSource; + } + + set + { + _rmlextensiontestresultsfilesViewSource = value; RaisePropertyChanged(nameof(RmlExtensionTestResultsFilesViewSource)); + } + + } + private ObservableCollection<Rml> _rmls; /// <summary> /// Gets or sets the Rmls. @@ -4153,6 +4441,22 @@ namespace Tango.BL PublishedProcedureProjectsVersionsViewSource = CreateCollectionView(PublishedProcedureProjectsVersions); + RmlExtensionColorCalibrationsViewSource = CreateCollectionView(RmlExtensionColorCalibrations); + + RmlExtensionColorCalibrationsTestsViewSource = CreateCollectionView(RmlExtensionColorCalibrationsTests); + + RmlExtensionColorCalibrationsTestsLiquidDataViewSource = CreateCollectionView(RmlExtensionColorCalibrationsTestsLiquidData); + + RmlExtensionColorCalibrationsTestsLiquidDataPointsViewSource = CreateCollectionView(RmlExtensionColorCalibrationsTestsLiquidDataPoints); + + RmlExtensionColorShadesViewSource = CreateCollectionView(RmlExtensionColorShades); + + RmlExtensionColorShadesTestsViewSource = CreateCollectionView(RmlExtensionColorShadesTests); + + RmlExtensionColorShadesTestsDataViewSource = CreateCollectionView(RmlExtensionColorShadesTestsData); + + RmlExtensionTestResultsFilesViewSource = CreateCollectionView(RmlExtensionTestResultsFiles); + RmlsViewSource = CreateCollectionView(Rmls); RmlsSpoolsViewSource = CreateCollectionView(RmlsSpools); diff --git a/Software/Visual_Studio/Tango.BL/Tango.BL.csproj b/Software/Visual_Studio/Tango.BL/Tango.BL.csproj index 3d6dd34b9..8bdb3b3f5 100644 --- a/Software/Visual_Studio/Tango.BL/Tango.BL.csproj +++ b/Software/Visual_Studio/Tango.BL/Tango.BL.csproj @@ -116,6 +116,8 @@ <Compile Include="Builders\JobBuilder.cs" /> <Compile Include="Builders\JobRunsCollectionBuilder.cs" /> <Compile Include="Builders\CatalogsCollectionBuilder.cs" /> + <Compile Include="Builders\RMLExtensionColorCalibrationBuilder.cs" /> + <Compile Include="Builders\RMLExtensionColorShadeBuilder.cs" /> <Compile Include="Builders\RmlExtensionsBuilder.cs" /> <Compile Include="Builders\RMLExtensionTestResultsCollectionBuilder.cs" /> <Compile Include="Builders\RMLExtentionsCollectionBuilder.cs" /> @@ -287,8 +289,24 @@ <Compile Include="DTO\PublishedProcedureProjectsVersionDTOBase.cs" /> <Compile Include="DTO\RmlDTO.cs" /> <Compile Include="DTO\RmlDTOBase.cs" /> + <Compile Include="DTO\RmlExtensionColorCalibrationDTO.cs" /> + <Compile Include="DTO\RmlExtensionColorCalibrationDTOBase.cs" /> + <Compile Include="DTO\RmlExtensionColorCalibrationsTestDTO.cs" /> + <Compile Include="DTO\RmlExtensionColorCalibrationsTestDTOBase.cs" /> + <Compile Include="DTO\RmlExtensionColorCalibrationsTestsLiquidDataDTO.cs" /> + <Compile Include="DTO\RmlExtensionColorCalibrationsTestsLiquidDataDTOBase.cs" /> + <Compile Include="DTO\RmlExtensionColorCalibrationsTestsLiquidDataPointDTO.cs" /> + <Compile Include="DTO\RmlExtensionColorCalibrationsTestsLiquidDataPointDTOBase.cs" /> + <Compile Include="DTO\RmlExtensionColorShadeDTO.cs" /> + <Compile Include="DTO\RmlExtensionColorShadeDTOBase.cs" /> + <Compile Include="DTO\RmlExtensionColorShadesTestDTO.cs" /> + <Compile Include="DTO\RmlExtensionColorShadesTestDTOBase.cs" /> + <Compile Include="DTO\RmlExtensionColorShadesTestsDataDTO.cs" /> + <Compile Include="DTO\RmlExtensionColorShadesTestsDataDTOBase.cs" /> <Compile Include="DTO\RmlExtensionTestResultDTO.cs" /> <Compile Include="DTO\RmlExtensionTestResultDTOBase.cs" /> + <Compile Include="DTO\RmlExtensionTestResultsFileDTO.cs" /> + <Compile Include="DTO\RmlExtensionTestResultsFileDTOBase.cs" /> <Compile Include="DTO\RmlsExtensionDTO.cs" /> <Compile Include="DTO\RmlsExtensionDTOBase.cs" /> <Compile Include="DTO\RmlsSpoolDTO.cs" /> @@ -459,8 +477,24 @@ <Compile Include="Entities\PublishedProcedureProjectsVersionBase.cs" /> <Compile Include="Entities\PublishedProcedureProjectsVersion.cs" /> <Compile Include="Entities\RmlBase.cs" /> + <Compile Include="Entities\RmlExtensionColorCalibration.cs" /> + <Compile Include="Entities\RmlExtensionColorCalibrationBase.cs" /> + <Compile Include="Entities\RmlExtensionColorCalibrationsTest.cs" /> + <Compile Include="Entities\RmlExtensionColorCalibrationsTestBase.cs" /> + <Compile Include="Entities\RmlExtensionColorCalibrationsTestsLiquidData.cs" /> + <Compile Include="Entities\RmlExtensionColorCalibrationsTestsLiquidDataBase.cs" /> + <Compile Include="Entities\RmlExtensionColorCalibrationsTestsLiquidDataPoint.cs" /> + <Compile Include="Entities\RmlExtensionColorCalibrationsTestsLiquidDataPointBase.cs" /> + <Compile Include="Entities\RmlExtensionColorShade.cs" /> + <Compile Include="Entities\RmlExtensionColorShadeBase.cs" /> + <Compile Include="Entities\RmlExtensionColorShadesTest.cs" /> + <Compile Include="Entities\RmlExtensionColorShadesTestBase.cs" /> + <Compile Include="Entities\RmlExtensionColorShadesTestsData.cs" /> + <Compile Include="Entities\RmlExtensionColorShadesTestsDataBase.cs" /> <Compile Include="Entities\RmlExtensionTestResult.cs" /> <Compile Include="Entities\RmlExtensionTestResultBase.cs" /> + <Compile Include="Entities\RmlExtensionTestResultsFile.cs" /> + <Compile Include="Entities\RmlExtensionTestResultsFileBase.cs" /> <Compile Include="Entities\RmlsExtension.cs" /> <Compile Include="Entities\RmlsExtensionBase.cs" /> <Compile Include="Entities\RmlsSpoolBase.cs" /> @@ -711,6 +745,8 @@ <None Include="app.config"> <SubType>Designer</SubType> </None> + <EmbeddedResource Include="Calibration\ColorDataInputTemplate.xlsx" /> + <EmbeddedResource Include="Calibration\ColorShadesTemplate.xlsx" /> <None Include="packages.config"> <SubType>Designer</SubType> </None> @@ -776,7 +812,7 @@ </Target> <ProjectExtensions> <VisualStudio> - <UserProperties BuildVersion_AssemblyInfoFilename="Properties\AssemblyInfo.cs" BuildVersion_UpdateAssemblyVersion="True" BuildVersion_BuildVersioningStyle="None.None.Increment.TimeStamp" BuildVersion_UseGlobalSettings="False" BuildVersion_StartDate="2000/1/1" /> + <UserProperties BuildVersion_StartDate="2000/1/1" BuildVersion_UseGlobalSettings="False" BuildVersion_BuildVersioningStyle="None.None.Increment.TimeStamp" BuildVersion_UpdateAssemblyVersion="True" BuildVersion_AssemblyInfoFilename="Properties\AssemblyInfo.cs" /> </VisualStudio> </ProjectExtensions> </Project>
\ No newline at end of file diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/LIQUID_TYPES.cs b/Software/Visual_Studio/Tango.DAL.Remote/DB/LIQUID_TYPES.cs index 7d7114f7e..c07b67e50 100644 --- a/Software/Visual_Studio/Tango.DAL.Remote/DB/LIQUID_TYPES.cs +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/LIQUID_TYPES.cs @@ -20,6 +20,7 @@ namespace Tango.DAL.Remote.DB this.CATS = new HashSet<CAT>(); this.IDS_PACKS = new HashSet<IDS_PACKS>(); this.LIQUID_TYPES_RMLS = new HashSet<LIQUID_TYPES_RMLS>(); + this.RML_EXTENSION_COLOR_CALIBRATIONS_TESTS_LIQUID_DATA = new HashSet<RML_EXTENSION_COLOR_CALIBRATIONS_TESTS_LIQUID_DATA>(); } public int ID { get; set; } @@ -40,5 +41,7 @@ namespace Tango.DAL.Remote.DB public virtual ICollection<IDS_PACKS> IDS_PACKS { get; set; } [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] public virtual ICollection<LIQUID_TYPES_RMLS> LIQUID_TYPES_RMLS { get; set; } + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] + public virtual ICollection<RML_EXTENSION_COLOR_CALIBRATIONS_TESTS_LIQUID_DATA> RML_EXTENSION_COLOR_CALIBRATIONS_TESTS_LIQUID_DATA { get; set; } } } diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/MACHINE.cs b/Software/Visual_Studio/Tango.DAL.Remote/DB/MACHINE.cs index 78b1e0f63..cf4ab958c 100644 --- a/Software/Visual_Studio/Tango.DAL.Remote/DB/MACHINE.cs +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/MACHINE.cs @@ -22,6 +22,8 @@ namespace Tango.DAL.Remote.DB this.DATA_STORE_ITEMS = new HashSet<DATA_STORE_ITEMS>(); this.JOBS = new HashSet<JOB>(); this.MACHINES_EVENTS = new HashSet<MACHINES_EVENTS>(); + this.RML_EXTENSION_COLOR_CALIBRATIONS = new HashSet<RML_EXTENSION_COLOR_CALIBRATIONS>(); + this.RML_EXTENSION_COLOR_SHADES = new HashSet<RML_EXTENSION_COLOR_SHADES>(); this.RML_EXTENSION_TEST_RESULTS = new HashSet<RML_EXTENSION_TEST_RESULTS>(); this.SPOOLS = new HashSet<SPOOL>(); } @@ -78,6 +80,10 @@ namespace Tango.DAL.Remote.DB public virtual ICollection<MACHINES_EVENTS> MACHINES_EVENTS { get; set; } public virtual ORGANIZATION ORGANIZATION { get; set; } [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] + public virtual ICollection<RML_EXTENSION_COLOR_CALIBRATIONS> RML_EXTENSION_COLOR_CALIBRATIONS { get; set; } + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] + public virtual ICollection<RML_EXTENSION_COLOR_SHADES> RML_EXTENSION_COLOR_SHADES { get; set; } + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] public virtual ICollection<RML_EXTENSION_TEST_RESULTS> RML_EXTENSION_TEST_RESULTS { get; set; } [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] public virtual ICollection<SPOOL> SPOOLS { get; set; } diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/RMLS_EXTENSIONS.cs b/Software/Visual_Studio/Tango.DAL.Remote/DB/RMLS_EXTENSIONS.cs index c19b0a06a..067b4894b 100644 --- a/Software/Visual_Studio/Tango.DAL.Remote/DB/RMLS_EXTENSIONS.cs +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/RMLS_EXTENSIONS.cs @@ -19,6 +19,8 @@ namespace Tango.DAL.Remote.DB { this.COLOR_PROCESS_PARAMETERS = new HashSet<COLOR_PROCESS_PARAMETERS>(); this.RML_EXTENSION_TEST_RESULTS = new HashSet<RML_EXTENSION_TEST_RESULTS>(); + this.RML_EXTENSION_COLOR_CALIBRATIONS = new HashSet<RML_EXTENSION_COLOR_CALIBRATIONS>(); + this.RML_EXTENSION_COLOR_SHADES = new HashSet<RML_EXTENSION_COLOR_SHADES>(); } public int ID { get; set; } @@ -67,6 +69,10 @@ namespace Tango.DAL.Remote.DB public virtual YARN_TEXTURINGS YARN_TEXTURINGS { get; set; } public virtual YARN_TYPES YARN_TYPES { get; set; } public virtual YARN_WHITE_SHADES YARN_WHITE_SHADES { get; set; } + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] + public virtual ICollection<RML_EXTENSION_COLOR_CALIBRATIONS> RML_EXTENSION_COLOR_CALIBRATIONS { get; set; } + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] + public virtual ICollection<RML_EXTENSION_COLOR_SHADES> RML_EXTENSION_COLOR_SHADES { get; set; } public virtual RML RML { get; set; } } } diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/RML_EXTENSION_COLOR_CALIBRATIONS.cs b/Software/Visual_Studio/Tango.DAL.Remote/DB/RML_EXTENSION_COLOR_CALIBRATIONS.cs new file mode 100644 index 000000000..7f25d41a2 --- /dev/null +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/RML_EXTENSION_COLOR_CALIBRATIONS.cs @@ -0,0 +1,34 @@ +//------------------------------------------------------------------------------ +// <auto-generated> +// This code was generated from a template. +// +// Manual changes to this file may cause unexpected behavior in your application. +// Manual changes to this file will be overwritten if the code is regenerated. +// </auto-generated> +//------------------------------------------------------------------------------ + +namespace Tango.DAL.Remote.DB +{ + using System; + using System.Collections.Generic; + + public partial class RML_EXTENSION_COLOR_CALIBRATIONS + { + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")] + public RML_EXTENSION_COLOR_CALIBRATIONS() + { + this.RML_EXTENSION_COLOR_CALIBRATIONS_TESTS = new HashSet<RML_EXTENSION_COLOR_CALIBRATIONS_TESTS>(); + } + + public int ID { get; set; } + public string GUID { get; set; } + public System.DateTime LAST_UPDATED { get; set; } + public string RMLS_EXTENSIONS_GUID { get; set; } + public string MACHINE_GUID { get; set; } + + public virtual MACHINE MACHINE { get; set; } + public virtual RMLS_EXTENSIONS RMLS_EXTENSIONS { get; set; } + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] + public virtual ICollection<RML_EXTENSION_COLOR_CALIBRATIONS_TESTS> RML_EXTENSION_COLOR_CALIBRATIONS_TESTS { get; set; } + } +} diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/RML_EXTENSION_COLOR_CALIBRATIONS_TESTS.cs b/Software/Visual_Studio/Tango.DAL.Remote/DB/RML_EXTENSION_COLOR_CALIBRATIONS_TESTS.cs new file mode 100644 index 000000000..d9dd25a7d --- /dev/null +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/RML_EXTENSION_COLOR_CALIBRATIONS_TESTS.cs @@ -0,0 +1,33 @@ +//------------------------------------------------------------------------------ +// <auto-generated> +// This code was generated from a template. +// +// Manual changes to this file may cause unexpected behavior in your application. +// Manual changes to this file will be overwritten if the code is regenerated. +// </auto-generated> +//------------------------------------------------------------------------------ + +namespace Tango.DAL.Remote.DB +{ + using System; + using System.Collections.Generic; + + public partial class RML_EXTENSION_COLOR_CALIBRATIONS_TESTS + { + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")] + public RML_EXTENSION_COLOR_CALIBRATIONS_TESTS() + { + this.RML_EXTENSION_COLOR_CALIBRATIONS_TESTS_LIQUID_DATA = new HashSet<RML_EXTENSION_COLOR_CALIBRATIONS_TESTS_LIQUID_DATA>(); + } + + public int ID { get; set; } + public string GUID { get; set; } + public System.DateTime LAST_UPDATED { get; set; } + public string NAME { get; set; } + public string RML_EXTENSION_COLOR_CALIBRATION_GUID { get; set; } + + public virtual RML_EXTENSION_COLOR_CALIBRATIONS RML_EXTENSION_COLOR_CALIBRATIONS { get; set; } + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] + public virtual ICollection<RML_EXTENSION_COLOR_CALIBRATIONS_TESTS_LIQUID_DATA> RML_EXTENSION_COLOR_CALIBRATIONS_TESTS_LIQUID_DATA { get; set; } + } +} diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/RML_EXTENSION_COLOR_CALIBRATIONS_TESTS_LIQUID_DATA.cs b/Software/Visual_Studio/Tango.DAL.Remote/DB/RML_EXTENSION_COLOR_CALIBRATIONS_TESTS_LIQUID_DATA.cs new file mode 100644 index 000000000..5a4c082be --- /dev/null +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/RML_EXTENSION_COLOR_CALIBRATIONS_TESTS_LIQUID_DATA.cs @@ -0,0 +1,34 @@ +//------------------------------------------------------------------------------ +// <auto-generated> +// This code was generated from a template. +// +// Manual changes to this file may cause unexpected behavior in your application. +// Manual changes to this file will be overwritten if the code is regenerated. +// </auto-generated> +//------------------------------------------------------------------------------ + +namespace Tango.DAL.Remote.DB +{ + using System; + using System.Collections.Generic; + + public partial class RML_EXTENSION_COLOR_CALIBRATIONS_TESTS_LIQUID_DATA + { + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")] + public RML_EXTENSION_COLOR_CALIBRATIONS_TESTS_LIQUID_DATA() + { + this.RML_EXTENSION_COLOR_CALIBRATIONS_TESTS_LIQUID_DATA_POINTS = new HashSet<RML_EXTENSION_COLOR_CALIBRATIONS_TESTS_LIQUID_DATA_POINTS>(); + } + + public int ID { get; set; } + public string GUID { get; set; } + public System.DateTime LAST_UPDATED { get; set; } + public string RML_EXTENSION_COLOR_CALIBRATIONS_TEST_GUID { get; set; } + public string LIQUID_TYPE_GUID { get; set; } + + public virtual LIQUID_TYPES LIQUID_TYPES { get; set; } + public virtual RML_EXTENSION_COLOR_CALIBRATIONS_TESTS RML_EXTENSION_COLOR_CALIBRATIONS_TESTS { get; set; } + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] + public virtual ICollection<RML_EXTENSION_COLOR_CALIBRATIONS_TESTS_LIQUID_DATA_POINTS> RML_EXTENSION_COLOR_CALIBRATIONS_TESTS_LIQUID_DATA_POINTS { get; set; } + } +} diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/RML_EXTENSION_COLOR_CALIBRATIONS_TESTS_LIQUID_DATA_POINTS.cs b/Software/Visual_Studio/Tango.DAL.Remote/DB/RML_EXTENSION_COLOR_CALIBRATIONS_TESTS_LIQUID_DATA_POINTS.cs new file mode 100644 index 000000000..96d70f954 --- /dev/null +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/RML_EXTENSION_COLOR_CALIBRATIONS_TESTS_LIQUID_DATA_POINTS.cs @@ -0,0 +1,29 @@ +//------------------------------------------------------------------------------ +// <auto-generated> +// This code was generated from a template. +// +// Manual changes to this file may cause unexpected behavior in your application. +// Manual changes to this file will be overwritten if the code is regenerated. +// </auto-generated> +//------------------------------------------------------------------------------ + +namespace Tango.DAL.Remote.DB +{ + using System; + using System.Collections.Generic; + + public partial class RML_EXTENSION_COLOR_CALIBRATIONS_TESTS_LIQUID_DATA_POINTS + { + public int ID { get; set; } + public string GUID { get; set; } + public System.DateTime LAST_UPDATED { get; set; } + public string RML_EXTENSION_COLOR_CALIBRATIONS_TESTS_LIQUID_DATA_GUID { get; set; } + public double INK { get; set; } + public double L { get; set; } + public double A { get; set; } + public double B { get; set; } + public double CALCULATED_POINT { get; set; } + + public virtual RML_EXTENSION_COLOR_CALIBRATIONS_TESTS_LIQUID_DATA RML_EXTENSION_COLOR_CALIBRATIONS_TESTS_LIQUID_DATA { get; set; } + } +} diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/RML_EXTENSION_COLOR_SHADES.cs b/Software/Visual_Studio/Tango.DAL.Remote/DB/RML_EXTENSION_COLOR_SHADES.cs new file mode 100644 index 000000000..55614d7a4 --- /dev/null +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/RML_EXTENSION_COLOR_SHADES.cs @@ -0,0 +1,34 @@ +//------------------------------------------------------------------------------ +// <auto-generated> +// This code was generated from a template. +// +// Manual changes to this file may cause unexpected behavior in your application. +// Manual changes to this file will be overwritten if the code is regenerated. +// </auto-generated> +//------------------------------------------------------------------------------ + +namespace Tango.DAL.Remote.DB +{ + using System; + using System.Collections.Generic; + + public partial class RML_EXTENSION_COLOR_SHADES + { + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")] + public RML_EXTENSION_COLOR_SHADES() + { + this.RML_EXTENSION_COLOR_SHADES_TESTS = new HashSet<RML_EXTENSION_COLOR_SHADES_TESTS>(); + } + + public int ID { get; set; } + public string GUID { get; set; } + public System.DateTime LAST_UPDATED { get; set; } + public string RMLS_EXTENSIONS_GUID { get; set; } + public string MACHINE_GUID { get; set; } + + public virtual MACHINE MACHINE { get; set; } + public virtual RMLS_EXTENSIONS RMLS_EXTENSIONS { get; set; } + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] + public virtual ICollection<RML_EXTENSION_COLOR_SHADES_TESTS> RML_EXTENSION_COLOR_SHADES_TESTS { get; set; } + } +} diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/RML_EXTENSION_COLOR_SHADES_TESTS.cs b/Software/Visual_Studio/Tango.DAL.Remote/DB/RML_EXTENSION_COLOR_SHADES_TESTS.cs new file mode 100644 index 000000000..b917f088b --- /dev/null +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/RML_EXTENSION_COLOR_SHADES_TESTS.cs @@ -0,0 +1,33 @@ +//------------------------------------------------------------------------------ +// <auto-generated> +// This code was generated from a template. +// +// Manual changes to this file may cause unexpected behavior in your application. +// Manual changes to this file will be overwritten if the code is regenerated. +// </auto-generated> +//------------------------------------------------------------------------------ + +namespace Tango.DAL.Remote.DB +{ + using System; + using System.Collections.Generic; + + public partial class RML_EXTENSION_COLOR_SHADES_TESTS + { + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")] + public RML_EXTENSION_COLOR_SHADES_TESTS() + { + this.RML_EXTENSION_COLOR_SHADES_TESTS_DATA = new HashSet<RML_EXTENSION_COLOR_SHADES_TESTS_DATA>(); + } + + public int ID { get; set; } + public string GUID { get; set; } + public System.DateTime LAST_UPDATED { get; set; } + public string RML_EXTENSION_COLOR_SHADES_GUID { get; set; } + public string NAME { get; set; } + + public virtual RML_EXTENSION_COLOR_SHADES RML_EXTENSION_COLOR_SHADES { get; set; } + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] + public virtual ICollection<RML_EXTENSION_COLOR_SHADES_TESTS_DATA> RML_EXTENSION_COLOR_SHADES_TESTS_DATA { get; set; } + } +} diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/RML_EXTENSION_COLOR_SHADES_TESTS_DATA.cs b/Software/Visual_Studio/Tango.DAL.Remote/DB/RML_EXTENSION_COLOR_SHADES_TESTS_DATA.cs new file mode 100644 index 000000000..c97ddfac3 --- /dev/null +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/RML_EXTENSION_COLOR_SHADES_TESTS_DATA.cs @@ -0,0 +1,37 @@ +//------------------------------------------------------------------------------ +// <auto-generated> +// This code was generated from a template. +// +// Manual changes to this file may cause unexpected behavior in your application. +// Manual changes to this file will be overwritten if the code is regenerated. +// </auto-generated> +//------------------------------------------------------------------------------ + +namespace Tango.DAL.Remote.DB +{ + using System; + using System.Collections.Generic; + + public partial class RML_EXTENSION_COLOR_SHADES_TESTS_DATA + { + public int ID { get; set; } + public string GUID { get; set; } + public System.DateTime LAST_UPDATED { get; set; } + public string RML_EXTENSION_COLOR_SHADES_TESTS_GUID { get; set; } + public int COLOR_NUM { get; set; } + public double L { get; set; } + public double A { get; set; } + public double B { get; set; } + public Nullable<double> C { get; set; } + public Nullable<double> M { get; set; } + public Nullable<double> Y { get; set; } + public Nullable<double> K { get; set; } + public Nullable<double> TI { get; set; } + public double L_RES { get; set; } + public double A_RES { get; set; } + public double B_RES { get; set; } + public double DELTA_E { get; set; } + + public virtual RML_EXTENSION_COLOR_SHADES_TESTS RML_EXTENSION_COLOR_SHADES_TESTS { get; set; } + } +} diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/RML_EXTENSION_TEST_RESULTS.cs b/Software/Visual_Studio/Tango.DAL.Remote/DB/RML_EXTENSION_TEST_RESULTS.cs index b1a5ae94f..c530978d8 100644 --- a/Software/Visual_Studio/Tango.DAL.Remote/DB/RML_EXTENSION_TEST_RESULTS.cs +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/RML_EXTENSION_TEST_RESULTS.cs @@ -18,6 +18,7 @@ namespace Tango.DAL.Remote.DB public RML_EXTENSION_TEST_RESULTS() { this.TENSILE_RESULTS = new HashSet<TENSILE_RESULTS>(); + this.RML_EXTENSION_TEST_RESULTS_FILES = new HashSet<RML_EXTENSION_TEST_RESULTS_FILES>(); this.RUBBING_RESULTS = new HashSet<RUBBING_RESULTS>(); } @@ -62,6 +63,8 @@ namespace Tango.DAL.Remote.DB public virtual ICollection<TENSILE_RESULTS> TENSILE_RESULTS { get; set; } public virtual MACHINE MACHINE { get; set; } [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] + public virtual ICollection<RML_EXTENSION_TEST_RESULTS_FILES> RML_EXTENSION_TEST_RESULTS_FILES { get; set; } + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] public virtual ICollection<RUBBING_RESULTS> RUBBING_RESULTS { get; set; } } } diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/RML_EXTENSION_TEST_RESULTS_FILES.cs b/Software/Visual_Studio/Tango.DAL.Remote/DB/RML_EXTENSION_TEST_RESULTS_FILES.cs new file mode 100644 index 000000000..5d51a4c8a --- /dev/null +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/RML_EXTENSION_TEST_RESULTS_FILES.cs @@ -0,0 +1,26 @@ +//------------------------------------------------------------------------------ +// <auto-generated> +// This code was generated from a template. +// +// Manual changes to this file may cause unexpected behavior in your application. +// Manual changes to this file will be overwritten if the code is regenerated. +// </auto-generated> +//------------------------------------------------------------------------------ + +namespace Tango.DAL.Remote.DB +{ + using System; + using System.Collections.Generic; + + public partial class RML_EXTENSION_TEST_RESULTS_FILES + { + public int ID { get; set; } + public string GUID { get; set; } + public System.DateTime LAST_UPDATED { get; set; } + public string RML_EXTENSION_TEST_RESULTS_GUID { get; set; } + public string FILE_NAME { get; set; } + public string FILE_PATH { get; set; } + + public virtual RML_EXTENSION_TEST_RESULTS RML_EXTENSION_TEST_RESULTS { get; set; } + } +} diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.Context.cs b/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.Context.cs index 181893358..504edd34b 100644 --- a/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.Context.cs +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.Context.cs @@ -110,6 +110,14 @@ namespace Tango.DAL.Remote.DB public virtual DbSet<PROCESS_PARAMETERS_TABLES_GROUPS> PROCESS_PARAMETERS_TABLES_GROUPS { get; set; } public virtual DbSet<PUBLISHED_PROCEDURE_PROJECTS> PUBLISHED_PROCEDURE_PROJECTS { get; set; } public virtual DbSet<PUBLISHED_PROCEDURE_PROJECTS_VERSIONS> PUBLISHED_PROCEDURE_PROJECTS_VERSIONS { get; set; } + public virtual DbSet<RML_EXTENSION_COLOR_CALIBRATIONS> RML_EXTENSION_COLOR_CALIBRATIONS { get; set; } + public virtual DbSet<RML_EXTENSION_COLOR_CALIBRATIONS_TESTS> RML_EXTENSION_COLOR_CALIBRATIONS_TESTS { get; set; } + public virtual DbSet<RML_EXTENSION_COLOR_CALIBRATIONS_TESTS_LIQUID_DATA> RML_EXTENSION_COLOR_CALIBRATIONS_TESTS_LIQUID_DATA { get; set; } + public virtual DbSet<RML_EXTENSION_COLOR_CALIBRATIONS_TESTS_LIQUID_DATA_POINTS> RML_EXTENSION_COLOR_CALIBRATIONS_TESTS_LIQUID_DATA_POINTS { get; set; } + public virtual DbSet<RML_EXTENSION_COLOR_SHADES> RML_EXTENSION_COLOR_SHADES { get; set; } + public virtual DbSet<RML_EXTENSION_COLOR_SHADES_TESTS> RML_EXTENSION_COLOR_SHADES_TESTS { get; set; } + public virtual DbSet<RML_EXTENSION_COLOR_SHADES_TESTS_DATA> RML_EXTENSION_COLOR_SHADES_TESTS_DATA { get; set; } + public virtual DbSet<RML_EXTENSION_TEST_RESULTS_FILES> RML_EXTENSION_TEST_RESULTS_FILES { get; set; } public virtual DbSet<RML> RMLS { get; set; } public virtual DbSet<RMLS_SPOOLS> RMLS_SPOOLS { get; set; } public virtual DbSet<ROLE> ROLES { get; set; } diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx b/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx index 4df682614..ed6e629ac 100644 --- a/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx @@ -1093,6 +1093,92 @@ <Property Name="AUTHOR" Type="nvarchar" MaxLength="200" Nullable="false" /> <Property Name="PROJECT_JSON_STRING" Type="nvarchar(max)" Nullable="false" /> </EntityType> + <EntityType Name="RML_EXTENSION_COLOR_CALIBRATIONS"> + <Key> + <PropertyRef Name="GUID" /> + </Key> + <Property Name="ID" Type="int" StoreGeneratedPattern="Identity" Nullable="false" /> + <Property Name="GUID" Type="varchar" MaxLength="36" Nullable="false" /> + <Property Name="LAST_UPDATED" Type="datetime2" Precision="3" Nullable="false" /> + <Property Name="RMLS_EXTENSIONS_GUID" Type="varchar" MaxLength="36" Nullable="false" /> + <Property Name="MACHINE_GUID" Type="varchar" MaxLength="36" Nullable="false" /> + </EntityType> + <EntityType Name="RML_EXTENSION_COLOR_CALIBRATIONS_TESTS"> + <Key> + <PropertyRef Name="GUID" /> + </Key> + <Property Name="ID" Type="int" StoreGeneratedPattern="Identity" Nullable="false" /> + <Property Name="GUID" Type="varchar" MaxLength="36" Nullable="false" /> + <Property Name="LAST_UPDATED" Type="datetime2" Precision="3" Nullable="false" /> + <Property Name="NAME" Type="nvarchar" MaxLength="50" Nullable="false" /> + <Property Name="RML_EXTENSION_COLOR_CALIBRATION_GUID" Type="varchar" MaxLength="36" Nullable="false" /> + </EntityType> + <EntityType Name="RML_EXTENSION_COLOR_CALIBRATIONS_TESTS_LIQUID_DATA"> + <Key> + <PropertyRef Name="GUID" /> + </Key> + <Property Name="ID" Type="int" StoreGeneratedPattern="Identity" Nullable="false" /> + <Property Name="GUID" Type="varchar" MaxLength="36" Nullable="false" /> + <Property Name="LAST_UPDATED" Type="datetime2" Precision="3" Nullable="false" /> + <Property Name="RML_EXTENSION_COLOR_CALIBRATIONS_TEST_GUID" Type="varchar" MaxLength="36" Nullable="false" /> + <Property Name="LIQUID_TYPE_GUID" Type="varchar" MaxLength="36" Nullable="false" /> + </EntityType> + <EntityType Name="RML_EXTENSION_COLOR_CALIBRATIONS_TESTS_LIQUID_DATA_POINTS"> + <Key> + <PropertyRef Name="GUID" /> + </Key> + <Property Name="ID" Type="int" StoreGeneratedPattern="Identity" Nullable="false" /> + <Property Name="GUID" Type="varchar" MaxLength="36" Nullable="false" /> + <Property Name="LAST_UPDATED" Type="datetime2" Precision="3" Nullable="false" /> + <Property Name="RML_EXTENSION_COLOR_CALIBRATIONS_TESTS_LIQUID_DATA_GUID" Type="varchar" MaxLength="36" Nullable="false" /> + <Property Name="INK" Type="float" Nullable="false" /> + <Property Name="L" Type="float" Nullable="false" /> + <Property Name="A" Type="float" Nullable="false" /> + <Property Name="B" Type="float" Nullable="false" /> + <Property Name="CALCULATED_POINT" Type="float" Nullable="false" /> + </EntityType> + <EntityType Name="RML_EXTENSION_COLOR_SHADES"> + <Key> + <PropertyRef Name="GUID" /> + </Key> + <Property Name="ID" Type="int" StoreGeneratedPattern="Identity" Nullable="false" /> + <Property Name="GUID" Type="varchar" MaxLength="36" Nullable="false" /> + <Property Name="LAST_UPDATED" Type="datetime2" Precision="3" Nullable="false" /> + <Property Name="RMLS_EXTENSIONS_GUID" Type="varchar" MaxLength="36" Nullable="false" /> + <Property Name="MACHINE_GUID" Type="varchar" MaxLength="36" Nullable="false" /> + </EntityType> + <EntityType Name="RML_EXTENSION_COLOR_SHADES_TESTS"> + <Key> + <PropertyRef Name="GUID" /> + </Key> + <Property Name="ID" Type="int" StoreGeneratedPattern="Identity" Nullable="false" /> + <Property Name="GUID" Type="varchar" MaxLength="36" Nullable="false" /> + <Property Name="LAST_UPDATED" Type="datetime2" Precision="3" Nullable="false" /> + <Property Name="RML_EXTENSION_COLOR_SHADES_GUID" Type="varchar" MaxLength="36" Nullable="false" /> + <Property Name="NAME" Type="varchar" MaxLength="50" Nullable="false" /> + </EntityType> + <EntityType Name="RML_EXTENSION_COLOR_SHADES_TESTS_DATA"> + <Key> + <PropertyRef Name="GUID" /> + </Key> + <Property Name="ID" Type="int" StoreGeneratedPattern="Identity" Nullable="false" /> + <Property Name="GUID" Type="varchar" MaxLength="36" Nullable="false" /> + <Property Name="LAST_UPDATED" Type="datetime2" Precision="3" Nullable="false" /> + <Property Name="RML_EXTENSION_COLOR_SHADES_TESTS_GUID" Type="varchar" MaxLength="36" Nullable="false" /> + <Property Name="COLOR_NUM" Type="int" Nullable="false" /> + <Property Name="L" Type="float" Nullable="false" /> + <Property Name="A" Type="float" Nullable="false" /> + <Property Name="B" Type="float" Nullable="false" /> + <Property Name="C" Type="float" /> + <Property Name="M" Type="float" /> + <Property Name="Y" Type="float" /> + <Property Name="K" Type="float" /> + <Property Name="TI" Type="float" /> + <Property Name="L_RES" Type="float" Nullable="false" /> + <Property Name="A_RES" Type="float" Nullable="false" /> + <Property Name="B_RES" Type="float" Nullable="false" /> + <Property Name="DELTA_E" Type="float" Nullable="false" /> + </EntityType> <EntityType Name="RML_EXTENSION_TEST_RESULTS"> <Key> <PropertyRef Name="GUID" /> @@ -1133,6 +1219,17 @@ <Property Name="THREAD_COF" Type="float" /> <Property Name="THREAD_LUB" Type="float" /> </EntityType> + <EntityType Name="RML_EXTENSION_TEST_RESULTS_FILES"> + <Key> + <PropertyRef Name="GUID" /> + </Key> + <Property Name="ID" Type="int" StoreGeneratedPattern="Identity" Nullable="false" /> + <Property Name="GUID" Type="varchar" MaxLength="36" Nullable="false" /> + <Property Name="LAST_UPDATED" Type="datetime2" Precision="3" Nullable="false" /> + <Property Name="RML_EXTENSION_TEST_RESULTS_GUID" Type="varchar" MaxLength="36" Nullable="false" /> + <Property Name="FILE_NAME" Type="nvarchar" MaxLength="100" Nullable="false" /> + <Property Name="FILE_PATH" Type="nvarchar(max)" Nullable="false" /> + </EntityType> <EntityType Name="RMLS"> <Key> <PropertyRef Name="GUID" /> @@ -2562,6 +2659,160 @@ </Dependent> </ReferentialConstraint> </Association> + <Association Name="FK_RML_EXTENSION_COLOR_CALIBRATIONS_MACHINES"> + <End Role="MACHINES" Type="Self.MACHINES" Multiplicity="1"> + <OnDelete Action="Cascade" /> + </End> + <End Role="RML_EXTENSION_COLOR_CALIBRATIONS" Type="Self.RML_EXTENSION_COLOR_CALIBRATIONS" Multiplicity="*" /> + <ReferentialConstraint> + <Principal Role="MACHINES"> + <PropertyRef Name="GUID" /> + </Principal> + <Dependent Role="RML_EXTENSION_COLOR_CALIBRATIONS"> + <PropertyRef Name="MACHINE_GUID" /> + </Dependent> + </ReferentialConstraint> + </Association> + <Association Name="FK_RML_EXTENSION_COLOR_CALIBRATIONS_RMLS_EXTENSIONS"> + <End Role="RMLS_EXTENSIONS" Type="Self.RMLS_EXTENSIONS" Multiplicity="1"> + <OnDelete Action="Cascade" /> + </End> + <End Role="RML_EXTENSION_COLOR_CALIBRATIONS" Type="Self.RML_EXTENSION_COLOR_CALIBRATIONS" Multiplicity="*" /> + <ReferentialConstraint> + <Principal Role="RMLS_EXTENSIONS"> + <PropertyRef Name="GUID" /> + </Principal> + <Dependent Role="RML_EXTENSION_COLOR_CALIBRATIONS"> + <PropertyRef Name="RMLS_EXTENSIONS_GUID" /> + </Dependent> + </ReferentialConstraint> + </Association> + <Association Name="FK_RML_EXTENSION_COLOR_CALIBRATIONS_TESTS_LIQUID_DATA_LIQUID_TYPES"> + <End Role="LIQUID_TYPES" Type="Self.LIQUID_TYPES" Multiplicity="1"> + <OnDelete Action="Cascade" /> + </End> + <End Role="RML_EXTENSION_COLOR_CALIBRATIONS_TESTS_LIQUID_DATA" Type="Self.RML_EXTENSION_COLOR_CALIBRATIONS_TESTS_LIQUID_DATA" Multiplicity="*" /> + <ReferentialConstraint> + <Principal Role="LIQUID_TYPES"> + <PropertyRef Name="GUID" /> + </Principal> + <Dependent Role="RML_EXTENSION_COLOR_CALIBRATIONS_TESTS_LIQUID_DATA"> + <PropertyRef Name="LIQUID_TYPE_GUID" /> + </Dependent> + </ReferentialConstraint> + </Association> + <Association Name="FK_RML_EXTENSION_COLOR_CALIBRATIONS_TESTS_LIQUID_DATA_POINTS_RML_EXTENSION_COLOR_CALIBRATIONS_TESTS_LIQUID_DATA"> + <End Role="RML_EXTENSION_COLOR_CALIBRATIONS_TESTS_LIQUID_DATA" Type="Self.RML_EXTENSION_COLOR_CALIBRATIONS_TESTS_LIQUID_DATA" Multiplicity="1"> + <OnDelete Action="Cascade" /> + </End> + <End Role="RML_EXTENSION_COLOR_CALIBRATIONS_TESTS_LIQUID_DATA_POINTS" Type="Self.RML_EXTENSION_COLOR_CALIBRATIONS_TESTS_LIQUID_DATA_POINTS" Multiplicity="*" /> + <ReferentialConstraint> + <Principal Role="RML_EXTENSION_COLOR_CALIBRATIONS_TESTS_LIQUID_DATA"> + <PropertyRef Name="GUID" /> + </Principal> + <Dependent Role="RML_EXTENSION_COLOR_CALIBRATIONS_TESTS_LIQUID_DATA_POINTS"> + <PropertyRef Name="RML_EXTENSION_COLOR_CALIBRATIONS_TESTS_LIQUID_DATA_GUID" /> + </Dependent> + </ReferentialConstraint> + </Association> + <Association Name="FK_RML_EXTENSION_COLOR_CALIBRATIONS_TESTS_LIQUID_DATA_RML_EXTENSION_COLOR_CALIBRATIONS_TESTS"> + <End Role="RML_EXTENSION_COLOR_CALIBRATIONS_TESTS" Type="Self.RML_EXTENSION_COLOR_CALIBRATIONS_TESTS" Multiplicity="1"> + <OnDelete Action="Cascade" /> + </End> + <End Role="RML_EXTENSION_COLOR_CALIBRATIONS_TESTS_LIQUID_DATA" Type="Self.RML_EXTENSION_COLOR_CALIBRATIONS_TESTS_LIQUID_DATA" Multiplicity="*" /> + <ReferentialConstraint> + <Principal Role="RML_EXTENSION_COLOR_CALIBRATIONS_TESTS"> + <PropertyRef Name="GUID" /> + </Principal> + <Dependent Role="RML_EXTENSION_COLOR_CALIBRATIONS_TESTS_LIQUID_DATA"> + <PropertyRef Name="RML_EXTENSION_COLOR_CALIBRATIONS_TEST_GUID" /> + </Dependent> + </ReferentialConstraint> + </Association> + <Association Name="FK_RML_EXTENSION_COLOR_CALIBRATIONS_TESTS_RML_EXTENSION_COLOR_CALIBRATIONS"> + <End Role="RML_EXTENSION_COLOR_CALIBRATIONS" Type="Self.RML_EXTENSION_COLOR_CALIBRATIONS" Multiplicity="1"> + <OnDelete Action="Cascade" /> + </End> + <End Role="RML_EXTENSION_COLOR_CALIBRATIONS_TESTS" Type="Self.RML_EXTENSION_COLOR_CALIBRATIONS_TESTS" Multiplicity="*" /> + <ReferentialConstraint> + <Principal Role="RML_EXTENSION_COLOR_CALIBRATIONS"> + <PropertyRef Name="GUID" /> + </Principal> + <Dependent Role="RML_EXTENSION_COLOR_CALIBRATIONS_TESTS"> + <PropertyRef Name="RML_EXTENSION_COLOR_CALIBRATION_GUID" /> + </Dependent> + </ReferentialConstraint> + </Association> + <Association Name="FK_RML_EXTENSION_COLOR_SHADES_MACHINES"> + <End Role="MACHINES" Type="Self.MACHINES" Multiplicity="1"> + <OnDelete Action="Cascade" /> + </End> + <End Role="RML_EXTENSION_COLOR_SHADES" Type="Self.RML_EXTENSION_COLOR_SHADES" Multiplicity="*" /> + <ReferentialConstraint> + <Principal Role="MACHINES"> + <PropertyRef Name="GUID" /> + </Principal> + <Dependent Role="RML_EXTENSION_COLOR_SHADES"> + <PropertyRef Name="MACHINE_GUID" /> + </Dependent> + </ReferentialConstraint> + </Association> + <Association Name="FK_RML_EXTENSION_COLOR_SHADES_RMLS_EXTENSIONS1"> + <End Role="RMLS_EXTENSIONS" Type="Self.RMLS_EXTENSIONS" Multiplicity="1"> + <OnDelete Action="Cascade" /> + </End> + <End Role="RML_EXTENSION_COLOR_SHADES" Type="Self.RML_EXTENSION_COLOR_SHADES" Multiplicity="*" /> + <ReferentialConstraint> + <Principal Role="RMLS_EXTENSIONS"> + <PropertyRef Name="GUID" /> + </Principal> + <Dependent Role="RML_EXTENSION_COLOR_SHADES"> + <PropertyRef Name="RMLS_EXTENSIONS_GUID" /> + </Dependent> + </ReferentialConstraint> + </Association> + <Association Name="FK_RML_EXTENSION_COLOR_SHADES_TESTS_DATA_RML_EXTENSION_COLOR_SHADES_TESTS"> + <End Role="RML_EXTENSION_COLOR_SHADES_TESTS" Type="Self.RML_EXTENSION_COLOR_SHADES_TESTS" Multiplicity="1"> + <OnDelete Action="Cascade" /> + </End> + <End Role="RML_EXTENSION_COLOR_SHADES_TESTS_DATA" Type="Self.RML_EXTENSION_COLOR_SHADES_TESTS_DATA" Multiplicity="*" /> + <ReferentialConstraint> + <Principal Role="RML_EXTENSION_COLOR_SHADES_TESTS"> + <PropertyRef Name="GUID" /> + </Principal> + <Dependent Role="RML_EXTENSION_COLOR_SHADES_TESTS_DATA"> + <PropertyRef Name="RML_EXTENSION_COLOR_SHADES_TESTS_GUID" /> + </Dependent> + </ReferentialConstraint> + </Association> + <Association Name="FK_RML_EXTENSION_COLOR_SHADES_TESTS_RML_EXTENSION_COLOR_SHADES"> + <End Role="RML_EXTENSION_COLOR_SHADES" Type="Self.RML_EXTENSION_COLOR_SHADES" Multiplicity="1"> + <OnDelete Action="Cascade" /> + </End> + <End Role="RML_EXTENSION_COLOR_SHADES_TESTS" Type="Self.RML_EXTENSION_COLOR_SHADES_TESTS" Multiplicity="*" /> + <ReferentialConstraint> + <Principal Role="RML_EXTENSION_COLOR_SHADES"> + <PropertyRef Name="GUID" /> + </Principal> + <Dependent Role="RML_EXTENSION_COLOR_SHADES_TESTS"> + <PropertyRef Name="RML_EXTENSION_COLOR_SHADES_GUID" /> + </Dependent> + </ReferentialConstraint> + </Association> + <Association Name="FK_RML_EXTENSION_TEST_RESULTS_FILES_RML_EXTENSION_TEST_RESULTS"> + <End Role="RML_EXTENSION_TEST_RESULTS" Type="Self.RML_EXTENSION_TEST_RESULTS" Multiplicity="1"> + <OnDelete Action="Cascade" /> + </End> + <End Role="RML_EXTENSION_TEST_RESULTS_FILES" Type="Self.RML_EXTENSION_TEST_RESULTS_FILES" Multiplicity="*" /> + <ReferentialConstraint> + <Principal Role="RML_EXTENSION_TEST_RESULTS"> + <PropertyRef Name="GUID" /> + </Principal> + <Dependent Role="RML_EXTENSION_TEST_RESULTS_FILES"> + <PropertyRef Name="RML_EXTENSION_TEST_RESULTS_GUID" /> + </Dependent> + </ReferentialConstraint> + </Association> <Association Name="FK_RML_EXTENSION_TEST_RESULTS_MACHINES"> <End Role="MACHINES" Type="Self.MACHINES" Multiplicity="1"> <OnDelete Action="Cascade" /> @@ -3239,7 +3490,15 @@ <EntitySet Name="PROCESS_PARAMETERS_TABLES_GROUPS" EntityType="Self.PROCESS_PARAMETERS_TABLES_GROUPS" Schema="dbo" store:Type="Tables" /> <EntitySet Name="PUBLISHED_PROCEDURE_PROJECTS" EntityType="Self.PUBLISHED_PROCEDURE_PROJECTS" Schema="dbo" store:Type="Tables" /> <EntitySet Name="PUBLISHED_PROCEDURE_PROJECTS_VERSIONS" EntityType="Self.PUBLISHED_PROCEDURE_PROJECTS_VERSIONS" Schema="dbo" store:Type="Tables" /> + <EntitySet Name="RML_EXTENSION_COLOR_CALIBRATIONS" EntityType="Self.RML_EXTENSION_COLOR_CALIBRATIONS" Schema="dbo" store:Type="Tables" /> + <EntitySet Name="RML_EXTENSION_COLOR_CALIBRATIONS_TESTS" EntityType="Self.RML_EXTENSION_COLOR_CALIBRATIONS_TESTS" Schema="dbo" store:Type="Tables" /> + <EntitySet Name="RML_EXTENSION_COLOR_CALIBRATIONS_TESTS_LIQUID_DATA" EntityType="Self.RML_EXTENSION_COLOR_CALIBRATIONS_TESTS_LIQUID_DATA" Schema="dbo" store:Type="Tables" /> + <EntitySet Name="RML_EXTENSION_COLOR_CALIBRATIONS_TESTS_LIQUID_DATA_POINTS" EntityType="Self.RML_EXTENSION_COLOR_CALIBRATIONS_TESTS_LIQUID_DATA_POINTS" Schema="dbo" store:Type="Tables" /> + <EntitySet Name="RML_EXTENSION_COLOR_SHADES" EntityType="Self.RML_EXTENSION_COLOR_SHADES" Schema="dbo" store:Type="Tables" /> + <EntitySet Name="RML_EXTENSION_COLOR_SHADES_TESTS" EntityType="Self.RML_EXTENSION_COLOR_SHADES_TESTS" Schema="dbo" store:Type="Tables" /> + <EntitySet Name="RML_EXTENSION_COLOR_SHADES_TESTS_DATA" EntityType="Self.RML_EXTENSION_COLOR_SHADES_TESTS_DATA" Schema="dbo" store:Type="Tables" /> <EntitySet Name="RML_EXTENSION_TEST_RESULTS" EntityType="Self.RML_EXTENSION_TEST_RESULTS" Schema="dbo" store:Type="Tables" /> + <EntitySet Name="RML_EXTENSION_TEST_RESULTS_FILES" EntityType="Self.RML_EXTENSION_TEST_RESULTS_FILES" Schema="dbo" store:Type="Tables" /> <EntitySet Name="RMLS" EntityType="Self.RMLS" Schema="dbo" store:Type="Tables" /> <EntitySet Name="RMLS_EXTENSIONS" EntityType="Self.RMLS_EXTENSIONS" Schema="dbo" store:Type="Tables" /> <EntitySet Name="RMLS_SPOOLS" EntityType="Self.RMLS_SPOOLS" Schema="dbo" store:Type="Tables" /> @@ -3551,6 +3810,50 @@ <End Role="PUBLISHED_PROCEDURE_PROJECTS" EntitySet="PUBLISHED_PROCEDURE_PROJECTS" /> <End Role="PUBLISHED_PROCEDURE_PROJECTS_VERSIONS" EntitySet="PUBLISHED_PROCEDURE_PROJECTS_VERSIONS" /> </AssociationSet> + <AssociationSet Name="FK_RML_EXTENSION_COLOR_CALIBRATIONS_MACHINES" Association="Self.FK_RML_EXTENSION_COLOR_CALIBRATIONS_MACHINES"> + <End Role="MACHINES" EntitySet="MACHINES" /> + <End Role="RML_EXTENSION_COLOR_CALIBRATIONS" EntitySet="RML_EXTENSION_COLOR_CALIBRATIONS" /> + </AssociationSet> + <AssociationSet Name="FK_RML_EXTENSION_COLOR_CALIBRATIONS_RMLS_EXTENSIONS" Association="Self.FK_RML_EXTENSION_COLOR_CALIBRATIONS_RMLS_EXTENSIONS"> + <End Role="RMLS_EXTENSIONS" EntitySet="RMLS_EXTENSIONS" /> + <End Role="RML_EXTENSION_COLOR_CALIBRATIONS" EntitySet="RML_EXTENSION_COLOR_CALIBRATIONS" /> + </AssociationSet> + <AssociationSet Name="FK_RML_EXTENSION_COLOR_CALIBRATIONS_TESTS_LIQUID_DATA_LIQUID_TYPES" Association="Self.FK_RML_EXTENSION_COLOR_CALIBRATIONS_TESTS_LIQUID_DATA_LIQUID_TYPES"> + <End Role="LIQUID_TYPES" EntitySet="LIQUID_TYPES" /> + <End Role="RML_EXTENSION_COLOR_CALIBRATIONS_TESTS_LIQUID_DATA" EntitySet="RML_EXTENSION_COLOR_CALIBRATIONS_TESTS_LIQUID_DATA" /> + </AssociationSet> + <AssociationSet Name="FK_RML_EXTENSION_COLOR_CALIBRATIONS_TESTS_LIQUID_DATA_POINTS_RML_EXTENSION_COLOR_CALIBRATIONS_TESTS_LIQUID_DATA" Association="Self.FK_RML_EXTENSION_COLOR_CALIBRATIONS_TESTS_LIQUID_DATA_POINTS_RML_EXTENSION_COLOR_CALIBRATIONS_TESTS_LIQUID_DATA"> + <End Role="RML_EXTENSION_COLOR_CALIBRATIONS_TESTS_LIQUID_DATA" EntitySet="RML_EXTENSION_COLOR_CALIBRATIONS_TESTS_LIQUID_DATA" /> + <End Role="RML_EXTENSION_COLOR_CALIBRATIONS_TESTS_LIQUID_DATA_POINTS" EntitySet="RML_EXTENSION_COLOR_CALIBRATIONS_TESTS_LIQUID_DATA_POINTS" /> + </AssociationSet> + <AssociationSet Name="FK_RML_EXTENSION_COLOR_CALIBRATIONS_TESTS_LIQUID_DATA_RML_EXTENSION_COLOR_CALIBRATIONS_TESTS" Association="Self.FK_RML_EXTENSION_COLOR_CALIBRATIONS_TESTS_LIQUID_DATA_RML_EXTENSION_COLOR_CALIBRATIONS_TESTS"> + <End Role="RML_EXTENSION_COLOR_CALIBRATIONS_TESTS" EntitySet="RML_EXTENSION_COLOR_CALIBRATIONS_TESTS" /> + <End Role="RML_EXTENSION_COLOR_CALIBRATIONS_TESTS_LIQUID_DATA" EntitySet="RML_EXTENSION_COLOR_CALIBRATIONS_TESTS_LIQUID_DATA" /> + </AssociationSet> + <AssociationSet Name="FK_RML_EXTENSION_COLOR_CALIBRATIONS_TESTS_RML_EXTENSION_COLOR_CALIBRATIONS" Association="Self.FK_RML_EXTENSION_COLOR_CALIBRATIONS_TESTS_RML_EXTENSION_COLOR_CALIBRATIONS"> + <End Role="RML_EXTENSION_COLOR_CALIBRATIONS" EntitySet="RML_EXTENSION_COLOR_CALIBRATIONS" /> + <End Role="RML_EXTENSION_COLOR_CALIBRATIONS_TESTS" EntitySet="RML_EXTENSION_COLOR_CALIBRATIONS_TESTS" /> + </AssociationSet> + <AssociationSet Name="FK_RML_EXTENSION_COLOR_SHADES_MACHINES" Association="Self.FK_RML_EXTENSION_COLOR_SHADES_MACHINES"> + <End Role="MACHINES" EntitySet="MACHINES" /> + <End Role="RML_EXTENSION_COLOR_SHADES" EntitySet="RML_EXTENSION_COLOR_SHADES" /> + </AssociationSet> + <AssociationSet Name="FK_RML_EXTENSION_COLOR_SHADES_RMLS_EXTENSIONS1" Association="Self.FK_RML_EXTENSION_COLOR_SHADES_RMLS_EXTENSIONS1"> + <End Role="RMLS_EXTENSIONS" EntitySet="RMLS_EXTENSIONS" /> + <End Role="RML_EXTENSION_COLOR_SHADES" EntitySet="RML_EXTENSION_COLOR_SHADES" /> + </AssociationSet> + <AssociationSet Name="FK_RML_EXTENSION_COLOR_SHADES_TESTS_DATA_RML_EXTENSION_COLOR_SHADES_TESTS" Association="Self.FK_RML_EXTENSION_COLOR_SHADES_TESTS_DATA_RML_EXTENSION_COLOR_SHADES_TESTS"> + <End Role="RML_EXTENSION_COLOR_SHADES_TESTS" EntitySet="RML_EXTENSION_COLOR_SHADES_TESTS" /> + <End Role="RML_EXTENSION_COLOR_SHADES_TESTS_DATA" EntitySet="RML_EXTENSION_COLOR_SHADES_TESTS_DATA" /> + </AssociationSet> + <AssociationSet Name="FK_RML_EXTENSION_COLOR_SHADES_TESTS_RML_EXTENSION_COLOR_SHADES" Association="Self.FK_RML_EXTENSION_COLOR_SHADES_TESTS_RML_EXTENSION_COLOR_SHADES"> + <End Role="RML_EXTENSION_COLOR_SHADES" EntitySet="RML_EXTENSION_COLOR_SHADES" /> + <End Role="RML_EXTENSION_COLOR_SHADES_TESTS" EntitySet="RML_EXTENSION_COLOR_SHADES_TESTS" /> + </AssociationSet> + <AssociationSet Name="FK_RML_EXTENSION_TEST_RESULTS_FILES_RML_EXTENSION_TEST_RESULTS" Association="Self.FK_RML_EXTENSION_TEST_RESULTS_FILES_RML_EXTENSION_TEST_RESULTS"> + <End Role="RML_EXTENSION_TEST_RESULTS" EntitySet="RML_EXTENSION_TEST_RESULTS" /> + <End Role="RML_EXTENSION_TEST_RESULTS_FILES" EntitySet="RML_EXTENSION_TEST_RESULTS_FILES" /> + </AssociationSet> <AssociationSet Name="FK_RML_EXTENSION_TEST_RESULTS_MACHINES" Association="Self.FK_RML_EXTENSION_TEST_RESULTS_MACHINES"> <End Role="MACHINES" EntitySet="MACHINES" /> <End Role="RML_EXTENSION_TEST_RESULTS" EntitySet="RML_EXTENSION_TEST_RESULTS" /> @@ -3890,6 +4193,14 @@ <EntitySet Name="PROCESS_PARAMETERS_TABLES_GROUPS" EntityType="RemoteModel.PROCESS_PARAMETERS_TABLES_GROUPS" /> <EntitySet Name="PUBLISHED_PROCEDURE_PROJECTS" EntityType="RemoteModel.PUBLISHED_PROCEDURE_PROJECTS" /> <EntitySet Name="PUBLISHED_PROCEDURE_PROJECTS_VERSIONS" EntityType="RemoteModel.PUBLISHED_PROCEDURE_PROJECTS_VERSIONS" /> + <EntitySet Name="RML_EXTENSION_COLOR_CALIBRATIONS" EntityType="RemoteModel.RML_EXTENSION_COLOR_CALIBRATIONS" /> + <EntitySet Name="RML_EXTENSION_COLOR_CALIBRATIONS_TESTS" EntityType="RemoteModel.RML_EXTENSION_COLOR_CALIBRATIONS_TESTS" /> + <EntitySet Name="RML_EXTENSION_COLOR_CALIBRATIONS_TESTS_LIQUID_DATA" EntityType="RemoteModel.RML_EXTENSION_COLOR_CALIBRATIONS_TESTS_LIQUID_DATA" /> + <EntitySet Name="RML_EXTENSION_COLOR_CALIBRATIONS_TESTS_LIQUID_DATA_POINTS" EntityType="RemoteModel.RML_EXTENSION_COLOR_CALIBRATIONS_TESTS_LIQUID_DATA_POINTS" /> + <EntitySet Name="RML_EXTENSION_COLOR_SHADES" EntityType="RemoteModel.RML_EXTENSION_COLOR_SHADES" /> + <EntitySet Name="RML_EXTENSION_COLOR_SHADES_TESTS" EntityType="RemoteModel.RML_EXTENSION_COLOR_SHADES_TESTS" /> + <EntitySet Name="RML_EXTENSION_COLOR_SHADES_TESTS_DATA" EntityType="RemoteModel.RML_EXTENSION_COLOR_SHADES_TESTS_DATA" /> + <EntitySet Name="RML_EXTENSION_TEST_RESULTS_FILES" EntityType="RemoteModel.RML_EXTENSION_TEST_RESULTS_FILES" /> <EntitySet Name="RMLS" EntityType="RemoteModel.RML" /> <EntitySet Name="RMLS_SPOOLS" EntityType="RemoteModel.RMLS_SPOOLS" /> <EntitySet Name="ROLES" EntityType="RemoteModel.ROLE" /> @@ -4183,6 +4494,10 @@ <End Role="LIQUID_TYPES" EntitySet="LIQUID_TYPES" /> <End Role="LIQUID_TYPES_RMLS" EntitySet="LIQUID_TYPES_RMLS" /> </AssociationSet> + <AssociationSet Name="FK_RML_EXTENSION_COLOR_CALIBRATIONS_TESTS_LIQUID_DATA_LIQUID_TYPES" Association="RemoteModel.FK_RML_EXTENSION_COLOR_CALIBRATIONS_TESTS_LIQUID_DATA_LIQUID_TYPES"> + <End Role="LIQUID_TYPES" EntitySet="LIQUID_TYPES" /> + <End Role="RML_EXTENSION_COLOR_CALIBRATIONS_TESTS_LIQUID_DATA" EntitySet="RML_EXTENSION_COLOR_CALIBRATIONS_TESTS_LIQUID_DATA" /> + </AssociationSet> <AssociationSet Name="FK_LIQUID_TYPES_RMLS_RMLS" Association="RemoteModel.FK_LIQUID_TYPES_RMLS_RMLS"> <End Role="RML" EntitySet="RMLS" /> <End Role="LIQUID_TYPES_RMLS" EntitySet="LIQUID_TYPES_RMLS" /> @@ -4207,6 +4522,14 @@ <End Role="ORGANIZATION" EntitySet="ORGANIZATIONS" /> <End Role="MACHINE" EntitySet="MACHINES" /> </AssociationSet> + <AssociationSet Name="FK_RML_EXTENSION_COLOR_CALIBRATIONS_MACHINES" Association="RemoteModel.FK_RML_EXTENSION_COLOR_CALIBRATIONS_MACHINES"> + <End Role="MACHINE" EntitySet="MACHINES" /> + <End Role="RML_EXTENSION_COLOR_CALIBRATIONS" EntitySet="RML_EXTENSION_COLOR_CALIBRATIONS" /> + </AssociationSet> + <AssociationSet Name="FK_RML_EXTENSION_COLOR_SHADES_MACHINES" Association="RemoteModel.FK_RML_EXTENSION_COLOR_SHADES_MACHINES"> + <End Role="MACHINE" EntitySet="MACHINES" /> + <End Role="RML_EXTENSION_COLOR_SHADES" EntitySet="RML_EXTENSION_COLOR_SHADES" /> + </AssociationSet> <AssociationSet Name="FK_RML_EXTENSION_TEST_RESULTS_MACHINES" Association="RemoteModel.FK_RML_EXTENSION_TEST_RESULTS_MACHINES"> <End Role="MACHINE" EntitySet="MACHINES" /> <End Role="RML_EXTENSION_TEST_RESULTS" EntitySet="RML_EXTENSION_TEST_RESULTS" /> @@ -4255,6 +4578,38 @@ <End Role="PUBLISHED_PROCEDURE_PROJECTS" EntitySet="PUBLISHED_PROCEDURE_PROJECTS" /> <End Role="PUBLISHED_PROCEDURE_PROJECTS_VERSIONS" EntitySet="PUBLISHED_PROCEDURE_PROJECTS_VERSIONS" /> </AssociationSet> + <AssociationSet Name="FK_RML_EXTENSION_COLOR_CALIBRATIONS_RMLS_EXTENSIONS" Association="RemoteModel.FK_RML_EXTENSION_COLOR_CALIBRATIONS_RMLS_EXTENSIONS"> + <End Role="RMLS_EXTENSIONS" EntitySet="RMLS_EXTENSIONS" /> + <End Role="RML_EXTENSION_COLOR_CALIBRATIONS" EntitySet="RML_EXTENSION_COLOR_CALIBRATIONS" /> + </AssociationSet> + <AssociationSet Name="FK_RML_EXTENSION_COLOR_CALIBRATIONS_TESTS_RML_EXTENSION_COLOR_CALIBRATIONS" Association="RemoteModel.FK_RML_EXTENSION_COLOR_CALIBRATIONS_TESTS_RML_EXTENSION_COLOR_CALIBRATIONS"> + <End Role="RML_EXTENSION_COLOR_CALIBRATIONS" EntitySet="RML_EXTENSION_COLOR_CALIBRATIONS" /> + <End Role="RML_EXTENSION_COLOR_CALIBRATIONS_TESTS" EntitySet="RML_EXTENSION_COLOR_CALIBRATIONS_TESTS" /> + </AssociationSet> + <AssociationSet Name="FK_RML_EXTENSION_COLOR_CALIBRATIONS_TESTS_LIQUID_DATA_RML_EXTENSION_COLOR_CALIBRATIONS_TESTS" Association="RemoteModel.FK_RML_EXTENSION_COLOR_CALIBRATIONS_TESTS_LIQUID_DATA_RML_EXTENSION_COLOR_CALIBRATIONS_TESTS"> + <End Role="RML_EXTENSION_COLOR_CALIBRATIONS_TESTS" EntitySet="RML_EXTENSION_COLOR_CALIBRATIONS_TESTS" /> + <End Role="RML_EXTENSION_COLOR_CALIBRATIONS_TESTS_LIQUID_DATA" EntitySet="RML_EXTENSION_COLOR_CALIBRATIONS_TESTS_LIQUID_DATA" /> + </AssociationSet> + <AssociationSet Name="FK_RML_EXTENSION_COLOR_CALIBRATIONS_TESTS_LIQUID_DATA_POINTS_RML_EXTENSION_COLOR_CALIBRATIONS_TESTS_LIQUID_DATA" Association="RemoteModel.FK_RML_EXTENSION_COLOR_CALIBRATIONS_TESTS_LIQUID_DATA_POINTS_RML_EXTENSION_COLOR_CALIBRATIONS_TESTS_LIQUID_DATA"> + <End Role="RML_EXTENSION_COLOR_CALIBRATIONS_TESTS_LIQUID_DATA" EntitySet="RML_EXTENSION_COLOR_CALIBRATIONS_TESTS_LIQUID_DATA" /> + <End Role="RML_EXTENSION_COLOR_CALIBRATIONS_TESTS_LIQUID_DATA_POINTS" EntitySet="RML_EXTENSION_COLOR_CALIBRATIONS_TESTS_LIQUID_DATA_POINTS" /> + </AssociationSet> + <AssociationSet Name="FK_RML_EXTENSION_COLOR_SHADES_RMLS_EXTENSIONS1" Association="RemoteModel.FK_RML_EXTENSION_COLOR_SHADES_RMLS_EXTENSIONS1"> + <End Role="RMLS_EXTENSIONS" EntitySet="RMLS_EXTENSIONS" /> + <End Role="RML_EXTENSION_COLOR_SHADES" EntitySet="RML_EXTENSION_COLOR_SHADES" /> + </AssociationSet> + <AssociationSet Name="FK_RML_EXTENSION_COLOR_SHADES_TESTS_RML_EXTENSION_COLOR_SHADES" Association="RemoteModel.FK_RML_EXTENSION_COLOR_SHADES_TESTS_RML_EXTENSION_COLOR_SHADES"> + <End Role="RML_EXTENSION_COLOR_SHADES" EntitySet="RML_EXTENSION_COLOR_SHADES" /> + <End Role="RML_EXTENSION_COLOR_SHADES_TESTS" EntitySet="RML_EXTENSION_COLOR_SHADES_TESTS" /> + </AssociationSet> + <AssociationSet Name="FK_RML_EXTENSION_COLOR_SHADES_TESTS_DATA_RML_EXTENSION_COLOR_SHADES_TESTS" Association="RemoteModel.FK_RML_EXTENSION_COLOR_SHADES_TESTS_DATA_RML_EXTENSION_COLOR_SHADES_TESTS"> + <End Role="RML_EXTENSION_COLOR_SHADES_TESTS" EntitySet="RML_EXTENSION_COLOR_SHADES_TESTS" /> + <End Role="RML_EXTENSION_COLOR_SHADES_TESTS_DATA" EntitySet="RML_EXTENSION_COLOR_SHADES_TESTS_DATA" /> + </AssociationSet> + <AssociationSet Name="FK_RML_EXTENSION_TEST_RESULTS_FILES_RML_EXTENSION_TEST_RESULTS" Association="RemoteModel.FK_RML_EXTENSION_TEST_RESULTS_FILES_RML_EXTENSION_TEST_RESULTS"> + <End Role="RML_EXTENSION_TEST_RESULTS" EntitySet="RML_EXTENSION_TEST_RESULTS" /> + <End Role="RML_EXTENSION_TEST_RESULTS_FILES" EntitySet="RML_EXTENSION_TEST_RESULTS_FILES" /> + </AssociationSet> <AssociationSet Name="FK_RUBBING_RESULTS_RML_EXTENSION_TEST_RESULTS" Association="RemoteModel.FK_RUBBING_RESULTS_RML_EXTENSION_TEST_RESULTS"> <End Role="RML_EXTENSION_TEST_RESULTS" EntitySet="RML_EXTENSION_TEST_RESULTS" /> <End Role="RUBBING_RESULTS" EntitySet="RUBBING_RESULTS" /> @@ -4372,7 +4727,7 @@ <NavigationProperty Name="RMLS_EXTENSIONS" Relationship="RemoteModel.FK_COLOR_PROCESS_PARAMETERS_RMLS_EXTENSIONS" FromRole="COLOR_PROCESS_PARAMETERS" ToRole="RMLS_EXTENSIONS" /> <NavigationProperty Name="COLOR_PROCESS_INK_UPTAKE" Relationship="RemoteModel.FK_COLOR_PROCESS_INK_UPTAKE_COLOR_PROCESS_PARAMETERS" FromRole="COLOR_PROCESS_PARAMETERS" ToRole="COLOR_PROCESS_INK_UPTAKE" /> <NavigationProperty Name="MACHINE" Relationship="RemoteModel.FK_COLOR_PROCESS_PARAMETERS_MACHINES" FromRole="COLOR_PROCESS_PARAMETERS" ToRole="MACHINE" /> - </EntityType> + </EntityType> <EntityType Name="RML_EXTENSION_TEST_RESULTS"> <Key> <PropertyRef Name="GUID" /> @@ -4415,6 +4770,7 @@ <NavigationProperty Name="RMLS_EXTENSIONS" Relationship="RemoteModel.FK_RML_EXTENSION_TEST_RESULTS_RMLS_EXTENSIONS" FromRole="RML_EXTENSION_TEST_RESULTS" ToRole="RMLS_EXTENSIONS" /> <NavigationProperty Name="TENSILE_RESULTS" Relationship="RemoteModel.FK_TENSILE_RESULTS_RML_EXTENSION_TEST_RESULTS" FromRole="RML_EXTENSION_TEST_RESULTS" ToRole="TENSILE_RESULTS" /> <NavigationProperty Name="MACHINE" Relationship="RemoteModel.FK_RML_EXTENSION_TEST_RESULTS_MACHINES" FromRole="RML_EXTENSION_TEST_RESULTS" ToRole="MACHINE" /> + <NavigationProperty Name="RML_EXTENSION_TEST_RESULTS_FILES" Relationship="RemoteModel.FK_RML_EXTENSION_TEST_RESULTS_FILES_RML_EXTENSION_TEST_RESULTS" FromRole="RML_EXTENSION_TEST_RESULTS" ToRole="RML_EXTENSION_TEST_RESULTS_FILES" /> <NavigationProperty Name="RUBBING_RESULTS" Relationship="RemoteModel.FK_RUBBING_RESULTS_RML_EXTENSION_TEST_RESULTS" FromRole="RML_EXTENSION_TEST_RESULTS" ToRole="RUBBING_RESULTS" /> </EntityType> <EntityType Name="RMLS_EXTENSIONS"> @@ -4464,8 +4820,10 @@ <NavigationProperty Name="YARN_TYPES" Relationship="RemoteModel.FK_RMLS_EXTENSIONS_YARN_TYPES" FromRole="RMLS_EXTENSIONS" ToRole="YARN_TYPES" /> <NavigationProperty Name="YARN_WHITE_SHADES" Relationship="RemoteModel.FK_RMLS_EXTENSIONS_YARN_WHITE_SHADES" FromRole="RMLS_EXTENSIONS" ToRole="YARN_WHITE_SHADES" /> <Property Name="RML_LEVEL" Type="Int32" Nullable="false" /> + <NavigationProperty Name="RML_EXTENSION_COLOR_CALIBRATIONS" Relationship="RemoteModel.FK_RML_EXTENSION_COLOR_CALIBRATIONS_RMLS_EXTENSIONS" FromRole="RMLS_EXTENSIONS" ToRole="RML_EXTENSION_COLOR_CALIBRATIONS" /> + <NavigationProperty Name="RML_EXTENSION_COLOR_SHADES" Relationship="RemoteModel.FK_RML_EXTENSION_COLOR_SHADES_RMLS_EXTENSIONS1" FromRole="RMLS_EXTENSIONS" ToRole="RML_EXTENSION_COLOR_SHADES" /> <NavigationProperty Name="RML" Relationship="RemoteModel.FK_RMLS_EXTENSIONS_RMLS" FromRole="RMLS_EXTENSIONS" ToRole="RML" /> - </EntityType> + </EntityType> <EntityType Name="TENSILE_RESULTS"> <Key> <PropertyRef Name="GUID" /> @@ -5678,6 +6036,7 @@ <NavigationProperty Name="CATS" Relationship="RemoteModel.FK_CATS_LIQUID_TYPES1" FromRole="LIQUID_TYPES" ToRole="CAT" /> <NavigationProperty Name="IDS_PACKS" Relationship="RemoteModel.FK_CONFIGURATIONS_DISPENSERS_LIQUIDS" FromRole="LIQUID_TYPES" ToRole="IDS_PACKS" /> <NavigationProperty Name="LIQUID_TYPES_RMLS" Relationship="RemoteModel.FK_LIQUID_TYPES_RMLS_LIQUID_TYPES" FromRole="LIQUID_TYPES" ToRole="LIQUID_TYPES_RMLS" /> + <NavigationProperty Name="RML_EXTENSION_COLOR_CALIBRATIONS_TESTS_LIQUID_DATA" Relationship="RemoteModel.FK_RML_EXTENSION_COLOR_CALIBRATIONS_TESTS_LIQUID_DATA_LIQUID_TYPES" FromRole="LIQUID_TYPES" ToRole="RML_EXTENSION_COLOR_CALIBRATIONS_TESTS_LIQUID_DATA" /> </EntityType> <EntityType Name="LIQUID_TYPES_RMLS"> <Key> @@ -5780,6 +6139,8 @@ <NavigationProperty Name="MACHINE_VERSIONS" Relationship="RemoteModel.FK_MACHINES_MACHINE_VERSIONS" FromRole="MACHINE" ToRole="MACHINE_VERSIONS" /> <NavigationProperty Name="MACHINES_EVENTS" Relationship="RemoteModel.FK_MACHINES_EVENTS_MACHINES" FromRole="MACHINE" ToRole="MACHINES_EVENTS" /> <NavigationProperty Name="ORGANIZATION" Relationship="RemoteModel.FK_MACHINES_ORGANIZATIONS" FromRole="MACHINE" ToRole="ORGANIZATION" /> + <NavigationProperty Name="RML_EXTENSION_COLOR_CALIBRATIONS" Relationship="RemoteModel.FK_RML_EXTENSION_COLOR_CALIBRATIONS_MACHINES" FromRole="MACHINE" ToRole="RML_EXTENSION_COLOR_CALIBRATIONS" /> + <NavigationProperty Name="RML_EXTENSION_COLOR_SHADES" Relationship="RemoteModel.FK_RML_EXTENSION_COLOR_SHADES_MACHINES" FromRole="MACHINE" ToRole="RML_EXTENSION_COLOR_SHADES" /> <NavigationProperty Name="RML_EXTENSION_TEST_RESULTS" Relationship="RemoteModel.FK_RML_EXTENSION_TEST_RESULTS_MACHINES" FromRole="MACHINE" ToRole="RML_EXTENSION_TEST_RESULTS" /> <NavigationProperty Name="SPOOLS" Relationship="RemoteModel.FK_SPOOLS_MACHINES" FromRole="MACHINE" ToRole="SPOOL" /> </EntityType> @@ -5964,6 +6325,119 @@ <Property Name="PROJECT_JSON_STRING" Type="String" Nullable="false" MaxLength="Max" FixedLength="false" Unicode="true" /> <NavigationProperty Name="PUBLISHED_PROCEDURE_PROJECTS" Relationship="RemoteModel.FK_PUBLISHED_TEST_PROJECTS_VERSIONS_PUBLISHED_TEST_PROJECTS" FromRole="PUBLISHED_PROCEDURE_PROJECTS_VERSIONS" ToRole="PUBLISHED_PROCEDURE_PROJECTS" /> </EntityType> + <EntityType Name="RML_EXTENSION_COLOR_CALIBRATIONS"> + <Key> + <PropertyRef Name="GUID" /> + </Key> + <Property Name="ID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" /> + <Property Name="GUID" Type="String" Nullable="false" MaxLength="36" FixedLength="false" Unicode="false" /> + <Property Name="LAST_UPDATED" Type="DateTime" Nullable="false" Precision="3" /> + <Property Name="RMLS_EXTENSIONS_GUID" Type="String" Nullable="false" MaxLength="36" FixedLength="false" Unicode="false" /> + <Property Name="MACHINE_GUID" Type="String" Nullable="false" MaxLength="36" FixedLength="false" Unicode="false" /> + <NavigationProperty Name="MACHINE" Relationship="RemoteModel.FK_RML_EXTENSION_COLOR_CALIBRATIONS_MACHINES" FromRole="RML_EXTENSION_COLOR_CALIBRATIONS" ToRole="MACHINE" /> + <NavigationProperty Name="RMLS_EXTENSIONS" Relationship="RemoteModel.FK_RML_EXTENSION_COLOR_CALIBRATIONS_RMLS_EXTENSIONS" FromRole="RML_EXTENSION_COLOR_CALIBRATIONS" ToRole="RMLS_EXTENSIONS" /> + <NavigationProperty Name="RML_EXTENSION_COLOR_CALIBRATIONS_TESTS" Relationship="RemoteModel.FK_RML_EXTENSION_COLOR_CALIBRATIONS_TESTS_RML_EXTENSION_COLOR_CALIBRATIONS" FromRole="RML_EXTENSION_COLOR_CALIBRATIONS" ToRole="RML_EXTENSION_COLOR_CALIBRATIONS_TESTS" /> + </EntityType> + <EntityType Name="RML_EXTENSION_COLOR_CALIBRATIONS_TESTS"> + <Key> + <PropertyRef Name="GUID" /> + </Key> + <Property Name="ID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" /> + <Property Name="GUID" Type="String" Nullable="false" MaxLength="36" FixedLength="false" Unicode="false" /> + <Property Name="LAST_UPDATED" Type="DateTime" Nullable="false" Precision="3" /> + <Property Name="NAME" Type="String" Nullable="false" MaxLength="50" FixedLength="false" Unicode="true" /> + <Property Name="RML_EXTENSION_COLOR_CALIBRATION_GUID" Type="String" Nullable="false" MaxLength="36" FixedLength="false" Unicode="false" /> + <NavigationProperty Name="RML_EXTENSION_COLOR_CALIBRATIONS" Relationship="RemoteModel.FK_RML_EXTENSION_COLOR_CALIBRATIONS_TESTS_RML_EXTENSION_COLOR_CALIBRATIONS" FromRole="RML_EXTENSION_COLOR_CALIBRATIONS_TESTS" ToRole="RML_EXTENSION_COLOR_CALIBRATIONS" /> + <NavigationProperty Name="RML_EXTENSION_COLOR_CALIBRATIONS_TESTS_LIQUID_DATA" Relationship="RemoteModel.FK_RML_EXTENSION_COLOR_CALIBRATIONS_TESTS_LIQUID_DATA_RML_EXTENSION_COLOR_CALIBRATIONS_TESTS" FromRole="RML_EXTENSION_COLOR_CALIBRATIONS_TESTS" ToRole="RML_EXTENSION_COLOR_CALIBRATIONS_TESTS_LIQUID_DATA" /> + </EntityType> + <EntityType Name="RML_EXTENSION_COLOR_CALIBRATIONS_TESTS_LIQUID_DATA"> + <Key> + <PropertyRef Name="GUID" /> + </Key> + <Property Name="ID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" /> + <Property Name="GUID" Type="String" Nullable="false" MaxLength="36" FixedLength="false" Unicode="false" /> + <Property Name="LAST_UPDATED" Type="DateTime" Nullable="false" Precision="3" /> + <Property Name="RML_EXTENSION_COLOR_CALIBRATIONS_TEST_GUID" Type="String" Nullable="false" MaxLength="36" FixedLength="false" Unicode="false" /> + <Property Name="LIQUID_TYPE_GUID" Type="String" Nullable="false" MaxLength="36" FixedLength="false" Unicode="false" /> + <NavigationProperty Name="LIQUID_TYPES" Relationship="RemoteModel.FK_RML_EXTENSION_COLOR_CALIBRATIONS_TESTS_LIQUID_DATA_LIQUID_TYPES" FromRole="RML_EXTENSION_COLOR_CALIBRATIONS_TESTS_LIQUID_DATA" ToRole="LIQUID_TYPES" /> + <NavigationProperty Name="RML_EXTENSION_COLOR_CALIBRATIONS_TESTS" Relationship="RemoteModel.FK_RML_EXTENSION_COLOR_CALIBRATIONS_TESTS_LIQUID_DATA_RML_EXTENSION_COLOR_CALIBRATIONS_TESTS" FromRole="RML_EXTENSION_COLOR_CALIBRATIONS_TESTS_LIQUID_DATA" ToRole="RML_EXTENSION_COLOR_CALIBRATIONS_TESTS" /> + <NavigationProperty Name="RML_EXTENSION_COLOR_CALIBRATIONS_TESTS_LIQUID_DATA_POINTS" Relationship="RemoteModel.FK_RML_EXTENSION_COLOR_CALIBRATIONS_TESTS_LIQUID_DATA_POINTS_RML_EXTENSION_COLOR_CALIBRATIONS_TESTS_LIQUID_DATA" FromRole="RML_EXTENSION_COLOR_CALIBRATIONS_TESTS_LIQUID_DATA" ToRole="RML_EXTENSION_COLOR_CALIBRATIONS_TESTS_LIQUID_DATA_POINTS" /> + </EntityType> + <EntityType Name="RML_EXTENSION_COLOR_CALIBRATIONS_TESTS_LIQUID_DATA_POINTS"> + <Key> + <PropertyRef Name="GUID" /> + </Key> + <Property Name="ID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" /> + <Property Name="GUID" Type="String" Nullable="false" MaxLength="36" FixedLength="false" Unicode="false" /> + <Property Name="LAST_UPDATED" Type="DateTime" Nullable="false" Precision="3" /> + <Property Name="RML_EXTENSION_COLOR_CALIBRATIONS_TESTS_LIQUID_DATA_GUID" Type="String" Nullable="false" MaxLength="36" FixedLength="false" Unicode="false" /> + <Property Name="INK" Type="Double" Nullable="false" /> + <Property Name="L" Type="Double" Nullable="false" /> + <Property Name="A" Type="Double" Nullable="false" /> + <Property Name="B" Type="Double" Nullable="false" /> + <Property Name="CALCULATED_POINT" Type="Double" Nullable="false" /> + <NavigationProperty Name="RML_EXTENSION_COLOR_CALIBRATIONS_TESTS_LIQUID_DATA" Relationship="RemoteModel.FK_RML_EXTENSION_COLOR_CALIBRATIONS_TESTS_LIQUID_DATA_POINTS_RML_EXTENSION_COLOR_CALIBRATIONS_TESTS_LIQUID_DATA" FromRole="RML_EXTENSION_COLOR_CALIBRATIONS_TESTS_LIQUID_DATA_POINTS" ToRole="RML_EXTENSION_COLOR_CALIBRATIONS_TESTS_LIQUID_DATA" /> + </EntityType> + <EntityType Name="RML_EXTENSION_COLOR_SHADES"> + <Key> + <PropertyRef Name="GUID" /> + </Key> + <Property Name="ID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" /> + <Property Name="GUID" Type="String" Nullable="false" MaxLength="36" FixedLength="false" Unicode="false" /> + <Property Name="LAST_UPDATED" Type="DateTime" Nullable="false" Precision="3" /> + <Property Name="RMLS_EXTENSIONS_GUID" Type="String" Nullable="false" MaxLength="36" FixedLength="false" Unicode="false" /> + <Property Name="MACHINE_GUID" Type="String" Nullable="false" MaxLength="36" FixedLength="false" Unicode="false" /> + <NavigationProperty Name="MACHINE" Relationship="RemoteModel.FK_RML_EXTENSION_COLOR_SHADES_MACHINES" FromRole="RML_EXTENSION_COLOR_SHADES" ToRole="MACHINE" /> + <NavigationProperty Name="RMLS_EXTENSIONS" Relationship="RemoteModel.FK_RML_EXTENSION_COLOR_SHADES_RMLS_EXTENSIONS1" FromRole="RML_EXTENSION_COLOR_SHADES" ToRole="RMLS_EXTENSIONS" /> + <NavigationProperty Name="RML_EXTENSION_COLOR_SHADES_TESTS" Relationship="RemoteModel.FK_RML_EXTENSION_COLOR_SHADES_TESTS_RML_EXTENSION_COLOR_SHADES" FromRole="RML_EXTENSION_COLOR_SHADES" ToRole="RML_EXTENSION_COLOR_SHADES_TESTS" /> + </EntityType> + <EntityType Name="RML_EXTENSION_COLOR_SHADES_TESTS"> + <Key> + <PropertyRef Name="GUID" /> + </Key> + <Property Name="ID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" /> + <Property Name="GUID" Type="String" Nullable="false" MaxLength="36" FixedLength="false" Unicode="false" /> + <Property Name="LAST_UPDATED" Type="DateTime" Nullable="false" Precision="3" /> + <Property Name="RML_EXTENSION_COLOR_SHADES_GUID" Type="String" Nullable="false" MaxLength="36" FixedLength="false" Unicode="false" /> + <Property Name="NAME" Type="String" Nullable="false" MaxLength="50" FixedLength="false" Unicode="false" /> + <NavigationProperty Name="RML_EXTENSION_COLOR_SHADES" Relationship="RemoteModel.FK_RML_EXTENSION_COLOR_SHADES_TESTS_RML_EXTENSION_COLOR_SHADES" FromRole="RML_EXTENSION_COLOR_SHADES_TESTS" ToRole="RML_EXTENSION_COLOR_SHADES" /> + <NavigationProperty Name="RML_EXTENSION_COLOR_SHADES_TESTS_DATA" Relationship="RemoteModel.FK_RML_EXTENSION_COLOR_SHADES_TESTS_DATA_RML_EXTENSION_COLOR_SHADES_TESTS" FromRole="RML_EXTENSION_COLOR_SHADES_TESTS" ToRole="RML_EXTENSION_COLOR_SHADES_TESTS_DATA" /> + </EntityType> + <EntityType Name="RML_EXTENSION_COLOR_SHADES_TESTS_DATA"> + <Key> + <PropertyRef Name="GUID" /> + </Key> + <Property Name="ID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" /> + <Property Name="GUID" Type="String" Nullable="false" MaxLength="36" FixedLength="false" Unicode="false" /> + <Property Name="LAST_UPDATED" Type="DateTime" Nullable="false" Precision="3" /> + <Property Name="RML_EXTENSION_COLOR_SHADES_TESTS_GUID" Type="String" Nullable="false" MaxLength="36" FixedLength="false" Unicode="false" /> + <Property Name="COLOR_NUM" Type="Int32" Nullable="false" /> + <Property Name="L" Type="Double" Nullable="false" /> + <Property Name="A" Type="Double" Nullable="false" /> + <Property Name="B" Type="Double" Nullable="false" /> + <Property Name="C" Type="Double" /> + <Property Name="M" Type="Double" /> + <Property Name="Y" Type="Double" /> + <Property Name="K" Type="Double" /> + <Property Name="TI" Type="Double" /> + <Property Name="L_RES" Type="Double" Nullable="false" /> + <Property Name="A_RES" Type="Double" Nullable="false" /> + <Property Name="B_RES" Type="Double" Nullable="false" /> + <Property Name="DELTA_E" Type="Double" Nullable="false" /> + <NavigationProperty Name="RML_EXTENSION_COLOR_SHADES_TESTS" Relationship="RemoteModel.FK_RML_EXTENSION_COLOR_SHADES_TESTS_DATA_RML_EXTENSION_COLOR_SHADES_TESTS" FromRole="RML_EXTENSION_COLOR_SHADES_TESTS_DATA" ToRole="RML_EXTENSION_COLOR_SHADES_TESTS" /> + </EntityType> + <EntityType Name="RML_EXTENSION_TEST_RESULTS_FILES"> + <Key> + <PropertyRef Name="GUID" /> + </Key> + <Property Name="ID" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" /> + <Property Name="GUID" Type="String" Nullable="false" MaxLength="36" FixedLength="false" Unicode="false" /> + <Property Name="LAST_UPDATED" Type="DateTime" Nullable="false" Precision="3" /> + <Property Name="RML_EXTENSION_TEST_RESULTS_GUID" Type="String" Nullable="false" MaxLength="36" FixedLength="false" Unicode="false" /> + <Property Name="FILE_NAME" Type="String" Nullable="false" MaxLength="100" FixedLength="false" Unicode="true" /> + <Property Name="FILE_PATH" Type="String" Nullable="false" MaxLength="Max" FixedLength="false" Unicode="true" /> + <NavigationProperty Name="RML_EXTENSION_TEST_RESULTS" Relationship="RemoteModel.FK_RML_EXTENSION_TEST_RESULTS_FILES_RML_EXTENSION_TEST_RESULTS" FromRole="RML_EXTENSION_TEST_RESULTS_FILES" ToRole="RML_EXTENSION_TEST_RESULTS" /> + </EntityType> <EntityType Name="RML"> <Key> <PropertyRef Name="GUID" /> @@ -7269,6 +7743,20 @@ </Dependent> </ReferentialConstraint> </Association> + <Association Name="FK_RML_EXTENSION_COLOR_CALIBRATIONS_TESTS_LIQUID_DATA_LIQUID_TYPES"> + <End Type="RemoteModel.LIQUID_TYPES" Role="LIQUID_TYPES" Multiplicity="1"> + <OnDelete Action="Cascade" /> + </End> + <End Type="RemoteModel.RML_EXTENSION_COLOR_CALIBRATIONS_TESTS_LIQUID_DATA" Role="RML_EXTENSION_COLOR_CALIBRATIONS_TESTS_LIQUID_DATA" Multiplicity="*" /> + <ReferentialConstraint> + <Principal Role="LIQUID_TYPES"> + <PropertyRef Name="GUID" /> + </Principal> + <Dependent Role="RML_EXTENSION_COLOR_CALIBRATIONS_TESTS_LIQUID_DATA"> + <PropertyRef Name="LIQUID_TYPE_GUID" /> + </Dependent> + </ReferentialConstraint> + </Association> <Association Name="FK_LIQUID_TYPES_RMLS_RMLS"> <End Type="RemoteModel.RML" Role="RML" Multiplicity="1"> <OnDelete Action="Cascade" /> @@ -7347,6 +7835,34 @@ </Dependent> </ReferentialConstraint> </Association> + <Association Name="FK_RML_EXTENSION_COLOR_CALIBRATIONS_MACHINES"> + <End Type="RemoteModel.MACHINE" Role="MACHINE" Multiplicity="1"> + <OnDelete Action="Cascade" /> + </End> + <End Type="RemoteModel.RML_EXTENSION_COLOR_CALIBRATIONS" Role="RML_EXTENSION_COLOR_CALIBRATIONS" Multiplicity="*" /> + <ReferentialConstraint> + <Principal Role="MACHINE"> + <PropertyRef Name="GUID" /> + </Principal> + <Dependent Role="RML_EXTENSION_COLOR_CALIBRATIONS"> + <PropertyRef Name="MACHINE_GUID" /> + </Dependent> + </ReferentialConstraint> + </Association> + <Association Name="FK_RML_EXTENSION_COLOR_SHADES_MACHINES"> + <End Type="RemoteModel.MACHINE" Role="MACHINE" Multiplicity="1"> + <OnDelete Action="Cascade" /> + </End> + <End Type="RemoteModel.RML_EXTENSION_COLOR_SHADES" Role="RML_EXTENSION_COLOR_SHADES" Multiplicity="*" /> + <ReferentialConstraint> + <Principal Role="MACHINE"> + <PropertyRef Name="GUID" /> + </Principal> + <Dependent Role="RML_EXTENSION_COLOR_SHADES"> + <PropertyRef Name="MACHINE_GUID" /> + </Dependent> + </ReferentialConstraint> + </Association> <Association Name="FK_RML_EXTENSION_TEST_RESULTS_MACHINES"> <End Type="RemoteModel.MACHINE" Role="MACHINE" Multiplicity="1"> <OnDelete Action="Cascade" /> @@ -7503,6 +8019,118 @@ </Dependent> </ReferentialConstraint> </Association> + <Association Name="FK_RML_EXTENSION_COLOR_CALIBRATIONS_RMLS_EXTENSIONS"> + <End Type="RemoteModel.RMLS_EXTENSIONS" Role="RMLS_EXTENSIONS" Multiplicity="1"> + <OnDelete Action="Cascade" /> + </End> + <End Type="RemoteModel.RML_EXTENSION_COLOR_CALIBRATIONS" Role="RML_EXTENSION_COLOR_CALIBRATIONS" Multiplicity="*" /> + <ReferentialConstraint> + <Principal Role="RMLS_EXTENSIONS"> + <PropertyRef Name="GUID" /> + </Principal> + <Dependent Role="RML_EXTENSION_COLOR_CALIBRATIONS"> + <PropertyRef Name="RMLS_EXTENSIONS_GUID" /> + </Dependent> + </ReferentialConstraint> + </Association> + <Association Name="FK_RML_EXTENSION_COLOR_CALIBRATIONS_TESTS_RML_EXTENSION_COLOR_CALIBRATIONS"> + <End Type="RemoteModel.RML_EXTENSION_COLOR_CALIBRATIONS" Role="RML_EXTENSION_COLOR_CALIBRATIONS" Multiplicity="1"> + <OnDelete Action="Cascade" /> + </End> + <End Type="RemoteModel.RML_EXTENSION_COLOR_CALIBRATIONS_TESTS" Role="RML_EXTENSION_COLOR_CALIBRATIONS_TESTS" Multiplicity="*" /> + <ReferentialConstraint> + <Principal Role="RML_EXTENSION_COLOR_CALIBRATIONS"> + <PropertyRef Name="GUID" /> + </Principal> + <Dependent Role="RML_EXTENSION_COLOR_CALIBRATIONS_TESTS"> + <PropertyRef Name="RML_EXTENSION_COLOR_CALIBRATION_GUID" /> + </Dependent> + </ReferentialConstraint> + </Association> + <Association Name="FK_RML_EXTENSION_COLOR_CALIBRATIONS_TESTS_LIQUID_DATA_RML_EXTENSION_COLOR_CALIBRATIONS_TESTS"> + <End Type="RemoteModel.RML_EXTENSION_COLOR_CALIBRATIONS_TESTS" Role="RML_EXTENSION_COLOR_CALIBRATIONS_TESTS" Multiplicity="1"> + <OnDelete Action="Cascade" /> + </End> + <End Type="RemoteModel.RML_EXTENSION_COLOR_CALIBRATIONS_TESTS_LIQUID_DATA" Role="RML_EXTENSION_COLOR_CALIBRATIONS_TESTS_LIQUID_DATA" Multiplicity="*" /> + <ReferentialConstraint> + <Principal Role="RML_EXTENSION_COLOR_CALIBRATIONS_TESTS"> + <PropertyRef Name="GUID" /> + </Principal> + <Dependent Role="RML_EXTENSION_COLOR_CALIBRATIONS_TESTS_LIQUID_DATA"> + <PropertyRef Name="RML_EXTENSION_COLOR_CALIBRATIONS_TEST_GUID" /> + </Dependent> + </ReferentialConstraint> + </Association> + <Association Name="FK_RML_EXTENSION_COLOR_CALIBRATIONS_TESTS_LIQUID_DATA_POINTS_RML_EXTENSION_COLOR_CALIBRATIONS_TESTS_LIQUID_DATA"> + <End Type="RemoteModel.RML_EXTENSION_COLOR_CALIBRATIONS_TESTS_LIQUID_DATA" Role="RML_EXTENSION_COLOR_CALIBRATIONS_TESTS_LIQUID_DATA" Multiplicity="1"> + <OnDelete Action="Cascade" /> + </End> + <End Type="RemoteModel.RML_EXTENSION_COLOR_CALIBRATIONS_TESTS_LIQUID_DATA_POINTS" Role="RML_EXTENSION_COLOR_CALIBRATIONS_TESTS_LIQUID_DATA_POINTS" Multiplicity="*" /> + <ReferentialConstraint> + <Principal Role="RML_EXTENSION_COLOR_CALIBRATIONS_TESTS_LIQUID_DATA"> + <PropertyRef Name="GUID" /> + </Principal> + <Dependent Role="RML_EXTENSION_COLOR_CALIBRATIONS_TESTS_LIQUID_DATA_POINTS"> + <PropertyRef Name="RML_EXTENSION_COLOR_CALIBRATIONS_TESTS_LIQUID_DATA_GUID" /> + </Dependent> + </ReferentialConstraint> + </Association> + <Association Name="FK_RML_EXTENSION_COLOR_SHADES_RMLS_EXTENSIONS1"> + <End Type="RemoteModel.RMLS_EXTENSIONS" Role="RMLS_EXTENSIONS" Multiplicity="1"> + <OnDelete Action="Cascade" /> + </End> + <End Type="RemoteModel.RML_EXTENSION_COLOR_SHADES" Role="RML_EXTENSION_COLOR_SHADES" Multiplicity="*" /> + <ReferentialConstraint> + <Principal Role="RMLS_EXTENSIONS"> + <PropertyRef Name="GUID" /> + </Principal> + <Dependent Role="RML_EXTENSION_COLOR_SHADES"> + <PropertyRef Name="RMLS_EXTENSIONS_GUID" /> + </Dependent> + </ReferentialConstraint> + </Association> + <Association Name="FK_RML_EXTENSION_COLOR_SHADES_TESTS_RML_EXTENSION_COLOR_SHADES"> + <End Type="RemoteModel.RML_EXTENSION_COLOR_SHADES" Role="RML_EXTENSION_COLOR_SHADES" Multiplicity="1"> + <OnDelete Action="Cascade" /> + </End> + <End Type="RemoteModel.RML_EXTENSION_COLOR_SHADES_TESTS" Role="RML_EXTENSION_COLOR_SHADES_TESTS" Multiplicity="*" /> + <ReferentialConstraint> + <Principal Role="RML_EXTENSION_COLOR_SHADES"> + <PropertyRef Name="GUID" /> + </Principal> + <Dependent Role="RML_EXTENSION_COLOR_SHADES_TESTS"> + <PropertyRef Name="RML_EXTENSION_COLOR_SHADES_GUID" /> + </Dependent> + </ReferentialConstraint> + </Association> + <Association Name="FK_RML_EXTENSION_COLOR_SHADES_TESTS_DATA_RML_EXTENSION_COLOR_SHADES_TESTS"> + <End Type="RemoteModel.RML_EXTENSION_COLOR_SHADES_TESTS" Role="RML_EXTENSION_COLOR_SHADES_TESTS" Multiplicity="1"> + <OnDelete Action="Cascade" /> + </End> + <End Type="RemoteModel.RML_EXTENSION_COLOR_SHADES_TESTS_DATA" Role="RML_EXTENSION_COLOR_SHADES_TESTS_DATA" Multiplicity="*" /> + <ReferentialConstraint> + <Principal Role="RML_EXTENSION_COLOR_SHADES_TESTS"> + <PropertyRef Name="GUID" /> + </Principal> + <Dependent Role="RML_EXTENSION_COLOR_SHADES_TESTS_DATA"> + <PropertyRef Name="RML_EXTENSION_COLOR_SHADES_TESTS_GUID" /> + </Dependent> + </ReferentialConstraint> + </Association> + <Association Name="FK_RML_EXTENSION_TEST_RESULTS_FILES_RML_EXTENSION_TEST_RESULTS"> + <End Type="RemoteModel.RML_EXTENSION_TEST_RESULTS" Role="RML_EXTENSION_TEST_RESULTS" Multiplicity="1"> + <OnDelete Action="Cascade" /> + </End> + <End Type="RemoteModel.RML_EXTENSION_TEST_RESULTS_FILES" Role="RML_EXTENSION_TEST_RESULTS_FILES" Multiplicity="*" /> + <ReferentialConstraint> + <Principal Role="RML_EXTENSION_TEST_RESULTS"> + <PropertyRef Name="GUID" /> + </Principal> + <Dependent Role="RML_EXTENSION_TEST_RESULTS_FILES"> + <PropertyRef Name="RML_EXTENSION_TEST_RESULTS_GUID" /> + </Dependent> + </ReferentialConstraint> + </Association> <Association Name="FK_RUBBING_RESULTS_RML_EXTENSION_TEST_RESULTS"> <End Type="RemoteModel.RML_EXTENSION_TEST_RESULTS" Role="RML_EXTENSION_TEST_RESULTS" Multiplicity="1"> <OnDelete Action="Cascade" /> @@ -9088,6 +9716,111 @@ </MappingFragment> </EntityTypeMapping> </EntitySetMapping> + <EntitySetMapping Name="RML_EXTENSION_COLOR_CALIBRATIONS"> + <EntityTypeMapping TypeName="RemoteModel.RML_EXTENSION_COLOR_CALIBRATIONS"> + <MappingFragment StoreEntitySet="RML_EXTENSION_COLOR_CALIBRATIONS"> + <ScalarProperty Name="MACHINE_GUID" ColumnName="MACHINE_GUID" /> + <ScalarProperty Name="RMLS_EXTENSIONS_GUID" ColumnName="RMLS_EXTENSIONS_GUID" /> + <ScalarProperty Name="LAST_UPDATED" ColumnName="LAST_UPDATED" /> + <ScalarProperty Name="GUID" ColumnName="GUID" /> + <ScalarProperty Name="ID" ColumnName="ID" /> + </MappingFragment> + </EntityTypeMapping> + </EntitySetMapping> + <EntitySetMapping Name="RML_EXTENSION_COLOR_CALIBRATIONS_TESTS"> + <EntityTypeMapping TypeName="RemoteModel.RML_EXTENSION_COLOR_CALIBRATIONS_TESTS"> + <MappingFragment StoreEntitySet="RML_EXTENSION_COLOR_CALIBRATIONS_TESTS"> + <ScalarProperty Name="RML_EXTENSION_COLOR_CALIBRATION_GUID" ColumnName="RML_EXTENSION_COLOR_CALIBRATION_GUID" /> + <ScalarProperty Name="NAME" ColumnName="NAME" /> + <ScalarProperty Name="LAST_UPDATED" ColumnName="LAST_UPDATED" /> + <ScalarProperty Name="GUID" ColumnName="GUID" /> + <ScalarProperty Name="ID" ColumnName="ID" /> + </MappingFragment> + </EntityTypeMapping> + </EntitySetMapping> + <EntitySetMapping Name="RML_EXTENSION_COLOR_CALIBRATIONS_TESTS_LIQUID_DATA"> + <EntityTypeMapping TypeName="RemoteModel.RML_EXTENSION_COLOR_CALIBRATIONS_TESTS_LIQUID_DATA"> + <MappingFragment StoreEntitySet="RML_EXTENSION_COLOR_CALIBRATIONS_TESTS_LIQUID_DATA"> + <ScalarProperty Name="LIQUID_TYPE_GUID" ColumnName="LIQUID_TYPE_GUID" /> + <ScalarProperty Name="RML_EXTENSION_COLOR_CALIBRATIONS_TEST_GUID" ColumnName="RML_EXTENSION_COLOR_CALIBRATIONS_TEST_GUID" /> + <ScalarProperty Name="LAST_UPDATED" ColumnName="LAST_UPDATED" /> + <ScalarProperty Name="GUID" ColumnName="GUID" /> + <ScalarProperty Name="ID" ColumnName="ID" /> + </MappingFragment> + </EntityTypeMapping> + </EntitySetMapping> + <EntitySetMapping Name="RML_EXTENSION_COLOR_CALIBRATIONS_TESTS_LIQUID_DATA_POINTS"> + <EntityTypeMapping TypeName="RemoteModel.RML_EXTENSION_COLOR_CALIBRATIONS_TESTS_LIQUID_DATA_POINTS"> + <MappingFragment StoreEntitySet="RML_EXTENSION_COLOR_CALIBRATIONS_TESTS_LIQUID_DATA_POINTS"> + <ScalarProperty Name="CALCULATED_POINT" ColumnName="CALCULATED_POINT" /> + <ScalarProperty Name="B" ColumnName="B" /> + <ScalarProperty Name="A" ColumnName="A" /> + <ScalarProperty Name="L" ColumnName="L" /> + <ScalarProperty Name="INK" ColumnName="INK" /> + <ScalarProperty Name="RML_EXTENSION_COLOR_CALIBRATIONS_TESTS_LIQUID_DATA_GUID" ColumnName="RML_EXTENSION_COLOR_CALIBRATIONS_TESTS_LIQUID_DATA_GUID" /> + <ScalarProperty Name="LAST_UPDATED" ColumnName="LAST_UPDATED" /> + <ScalarProperty Name="GUID" ColumnName="GUID" /> + <ScalarProperty Name="ID" ColumnName="ID" /> + </MappingFragment> + </EntityTypeMapping> + </EntitySetMapping> + <EntitySetMapping Name="RML_EXTENSION_COLOR_SHADES"> + <EntityTypeMapping TypeName="RemoteModel.RML_EXTENSION_COLOR_SHADES"> + <MappingFragment StoreEntitySet="RML_EXTENSION_COLOR_SHADES"> + <ScalarProperty Name="MACHINE_GUID" ColumnName="MACHINE_GUID" /> + <ScalarProperty Name="RMLS_EXTENSIONS_GUID" ColumnName="RMLS_EXTENSIONS_GUID" /> + <ScalarProperty Name="LAST_UPDATED" ColumnName="LAST_UPDATED" /> + <ScalarProperty Name="GUID" ColumnName="GUID" /> + <ScalarProperty Name="ID" ColumnName="ID" /> + </MappingFragment> + </EntityTypeMapping> + </EntitySetMapping> + <EntitySetMapping Name="RML_EXTENSION_COLOR_SHADES_TESTS"> + <EntityTypeMapping TypeName="RemoteModel.RML_EXTENSION_COLOR_SHADES_TESTS"> + <MappingFragment StoreEntitySet="RML_EXTENSION_COLOR_SHADES_TESTS"> + <ScalarProperty Name="NAME" ColumnName="NAME" /> + <ScalarProperty Name="RML_EXTENSION_COLOR_SHADES_GUID" ColumnName="RML_EXTENSION_COLOR_SHADES_GUID" /> + <ScalarProperty Name="LAST_UPDATED" ColumnName="LAST_UPDATED" /> + <ScalarProperty Name="GUID" ColumnName="GUID" /> + <ScalarProperty Name="ID" ColumnName="ID" /> + </MappingFragment> + </EntityTypeMapping> + </EntitySetMapping> + <EntitySetMapping Name="RML_EXTENSION_COLOR_SHADES_TESTS_DATA"> + <EntityTypeMapping TypeName="RemoteModel.RML_EXTENSION_COLOR_SHADES_TESTS_DATA"> + <MappingFragment StoreEntitySet="RML_EXTENSION_COLOR_SHADES_TESTS_DATA"> + <ScalarProperty Name="DELTA_E" ColumnName="DELTA_E" /> + <ScalarProperty Name="B_RES" ColumnName="B_RES" /> + <ScalarProperty Name="A_RES" ColumnName="A_RES" /> + <ScalarProperty Name="L_RES" ColumnName="L_RES" /> + <ScalarProperty Name="TI" ColumnName="TI" /> + <ScalarProperty Name="K" ColumnName="K" /> + <ScalarProperty Name="Y" ColumnName="Y" /> + <ScalarProperty Name="M" ColumnName="M" /> + <ScalarProperty Name="C" ColumnName="C" /> + <ScalarProperty Name="B" ColumnName="B" /> + <ScalarProperty Name="A" ColumnName="A" /> + <ScalarProperty Name="L" ColumnName="L" /> + <ScalarProperty Name="COLOR_NUM" ColumnName="COLOR_NUM" /> + <ScalarProperty Name="RML_EXTENSION_COLOR_SHADES_TESTS_GUID" ColumnName="RML_EXTENSION_COLOR_SHADES_TESTS_GUID" /> + <ScalarProperty Name="LAST_UPDATED" ColumnName="LAST_UPDATED" /> + <ScalarProperty Name="GUID" ColumnName="GUID" /> + <ScalarProperty Name="ID" ColumnName="ID" /> + </MappingFragment> + </EntityTypeMapping> + </EntitySetMapping> + <EntitySetMapping Name="RML_EXTENSION_TEST_RESULTS_FILES"> + <EntityTypeMapping TypeName="RemoteModel.RML_EXTENSION_TEST_RESULTS_FILES"> + <MappingFragment StoreEntitySet="RML_EXTENSION_TEST_RESULTS_FILES"> + <ScalarProperty Name="FILE_PATH" ColumnName="FILE_PATH" /> + <ScalarProperty Name="FILE_NAME" ColumnName="FILE_NAME" /> + <ScalarProperty Name="RML_EXTENSION_TEST_RESULTS_GUID" ColumnName="RML_EXTENSION_TEST_RESULTS_GUID" /> + <ScalarProperty Name="LAST_UPDATED" ColumnName="LAST_UPDATED" /> + <ScalarProperty Name="GUID" ColumnName="GUID" /> + <ScalarProperty Name="ID" ColumnName="ID" /> + </MappingFragment> + </EntityTypeMapping> + </EntitySetMapping> <EntitySetMapping Name="RMLS"> <EntityTypeMapping TypeName="RemoteModel.RML"> <MappingFragment StoreEntitySet="RMLS"> diff --git a/Software/Visual_Studio/Tango.DAL.Remote/Tango.DAL.Remote.csproj b/Software/Visual_Studio/Tango.DAL.Remote/Tango.DAL.Remote.csproj index 1a15767d6..e58f7fd5b 100644 --- a/Software/Visual_Studio/Tango.DAL.Remote/Tango.DAL.Remote.csproj +++ b/Software/Visual_Studio/Tango.DAL.Remote/Tango.DAL.Remote.csproj @@ -300,9 +300,33 @@ <Compile Include="DB\RMLS_SPOOLS.cs"> <DependentUpon>RemoteADO.tt</DependentUpon> </Compile> + <Compile Include="DB\RML_EXTENSION_COLOR_CALIBRATIONS.cs"> + <DependentUpon>RemoteADO.tt</DependentUpon> + </Compile> + <Compile Include="DB\RML_EXTENSION_COLOR_CALIBRATIONS_TESTS.cs"> + <DependentUpon>RemoteADO.tt</DependentUpon> + </Compile> + <Compile Include="DB\RML_EXTENSION_COLOR_CALIBRATIONS_TESTS_LIQUID_DATA.cs"> + <DependentUpon>RemoteADO.tt</DependentUpon> + </Compile> + <Compile Include="DB\RML_EXTENSION_COLOR_CALIBRATIONS_TESTS_LIQUID_DATA_POINTS.cs"> + <DependentUpon>RemoteADO.tt</DependentUpon> + </Compile> + <Compile Include="DB\RML_EXTENSION_COLOR_SHADES.cs"> + <DependentUpon>RemoteADO.tt</DependentUpon> + </Compile> + <Compile Include="DB\RML_EXTENSION_COLOR_SHADES_TESTS.cs"> + <DependentUpon>RemoteADO.tt</DependentUpon> + </Compile> + <Compile Include="DB\RML_EXTENSION_COLOR_SHADES_TESTS_DATA.cs"> + <DependentUpon>RemoteADO.tt</DependentUpon> + </Compile> <Compile Include="DB\RML_EXTENSION_TEST_RESULTS.cs"> <DependentUpon>RemoteADO.tt</DependentUpon> </Compile> + <Compile Include="DB\RML_EXTENSION_TEST_RESULTS_FILES.cs"> + <DependentUpon>RemoteADO.tt</DependentUpon> + </Compile> <Compile Include="DB\ROLE.cs"> <DependentUpon>RemoteADO.tt</DependentUpon> </Compile> |
