From e111c33bc87acf40202f9e5423e21b087a366f07 Mon Sep 17 00:00:00 2001 From: Roy Ben-Shabat Date: Mon, 7 Jan 2019 16:06:38 +0200 Subject: Added new events !!! --- .../Tango.MachineStudio.DB/ViewModelLocator.cs | 28 ---------------------- 1 file changed, 28 deletions(-) (limited to 'Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModelLocator.cs') diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModelLocator.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModelLocator.cs index 409b66e12..736682e07 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModelLocator.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModelLocator.cs @@ -37,8 +37,6 @@ namespace Tango.MachineStudio.DB TangoIOC.Default.Register(); TangoIOC.Default.Register(); - TangoIOC.Default.Register(); - TangoIOC.Default.Register(); TangoIOC.Default.Register(); @@ -62,8 +60,6 @@ namespace Tango.MachineStudio.DB TangoIOC.Default.Register(); TangoIOC.Default.Register(); - TangoIOC.Default.Register(); - TangoIOC.Default.Register(); } @@ -211,22 +207,6 @@ namespace Tango.MachineStudio.DB } } - public static EventTypesViewVM EventTypesViewVM - { - get - { - return TangoIOC.Default.GetInstance(); - } - } - - public static ActionTypesViewVM ActionTypesViewVM - { - get - { - return TangoIOC.Default.GetInstance(); - } - } - public static ContactsViewVM ContactsViewVM { get @@ -379,14 +359,6 @@ namespace Tango.MachineStudio.DB } } - public static EventTypesGroupsViewVM EventTypesGroupsViewVM - { - get - { - return TangoIOC.Default.GetInstance(); - } - } - public static SpoolTypesViewVM SpoolTypesViewVM { get -- cgit v1.3.1 From e2bf9f578c3ed53d869744f94b020048ca806c6e Mon Sep 17 00:00:00 2001 From: Roy Ben-Shabat Date: Tue, 8 Jan 2019 14:27:21 +0200 Subject: Refactored catalogs to per RML. Dropped MEDIA_COLOR. Added RML White Point LAB. Added additional dispenser parameters in MS module. Attempt to optimize PPC color catalog view performance. Removed "Color Catalog Code" from brush stop. Implemented PPC color catalog selection per RML. --- Software/DB/PPC/Tango.mdf | Bin 75497472 -> 75497472 bytes Software/DB/PPC/Tango_log.ldf | Bin 53673984 -> 53673984 bytes Software/DB/Tango.mdf | Bin 75497472 -> 75497472 bytes Software/DB/Tango_log.ldf | Bin 22675456 -> 22675456 bytes .../Views/DispenserView.xaml | 14 +- .../Views/DispensersView.xaml | 4 + .../Tango.MachineStudio.DB.csproj | 17 +- .../Tango.MachineStudio.DB/ViewModelLocator.cs | 9 - .../ViewModels/MediaColorsViewVM.cs | 17 -- .../Views/DBViews/MediaColorView.xaml | 38 ---- .../Views/DBViews/MediaColorView.xaml.cs | 28 --- .../Views/DBViews/MediaColorsView.xaml | 42 ---- .../Views/DBViews/MediaColorsView.xaml.cs | 32 --- .../ViewModels/MainViewVM.cs | 9 - .../Tango.MachineStudio.RML/Views/RmlView.xaml | 20 +- .../Modules/Tango.PPC.Jobs/Tango.PPC.Jobs.csproj | 2 +- .../Modules/Tango.PPC.Jobs/ViewModels/JobViewVM.cs | 27 ++- .../ViewModels/TwineCatalogViewVM.cs | 2 +- .../Controls/TwineCatalogControl.xaml | 2 +- .../Controls/TwineCatalogControl.xaml.cs | 56 ++--- .../Visual_Studio/Tango.BL/Builders/RmlBuilder.cs | 1 - .../Tango.BL/Builders/RmlsCollectionBuilder.cs | 1 - .../Tango.BL/Catalogs/CatalogLoader.cs | 6 +- .../Tango.BL/Entities/BrushStopBase.cs | 38 ---- .../Tango.BL/Entities/ColorCatalogBase.cs | 63 ++++++ .../Visual_Studio/Tango.BL/Entities/MediaColor.cs | 45 ---- .../Tango.BL/Entities/MediaColorBase.cs | 226 --------------------- Software/Visual_Studio/Tango.BL/Entities/Rml.cs | 35 ++++ .../Visual_Studio/Tango.BL/Entities/RmlBase.cs | 197 +++++++++++++----- .../Visual_Studio/Tango.BL/ObservablesContext.cs | 8 - .../Tango.BL/ObservablesEntitiesAdapter.cs | 2 - .../ObservablesEntitiesAdapterExtension.cs | 38 ---- .../ObservablesStaticCollectionsExtension.cs | 38 ---- Software/Visual_Studio/Tango.BL/Tango.BL.csproj | 4 +- .../Tango.DAL.Remote/DB/BRUSH_STOPS.cs | 1 - .../Tango.DAL.Remote/DB/COLOR_CATALOGS.cs | 2 + .../Tango.DAL.Remote/DB/MEDIA_COLORS.cs | 34 ---- Software/Visual_Studio/Tango.DAL.Remote/DB/RML.cs | 8 +- .../Tango.DAL.Remote/DB/RemoteADO.Context.cs | 1 - .../Tango.DAL.Remote/DB/RemoteADO.edmx | 129 +++++------- .../Tango.DAL.Remote/DB/RemoteADO.edmx.diagram | 143 +++++++------ .../Tango.DAL.Remote/Tango.DAL.Remote.csproj | 5 +- 42 files changed, 455 insertions(+), 889 deletions(-) delete mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/MediaColorsViewVM.cs delete mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/MediaColorView.xaml delete mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/MediaColorView.xaml.cs delete mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/MediaColorsView.xaml delete mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/MediaColorsView.xaml.cs delete mode 100644 Software/Visual_Studio/Tango.BL/Entities/MediaColor.cs delete mode 100644 Software/Visual_Studio/Tango.BL/Entities/MediaColorBase.cs delete mode 100644 Software/Visual_Studio/Tango.DAL.Remote/DB/MEDIA_COLORS.cs (limited to 'Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModelLocator.cs') diff --git a/Software/DB/PPC/Tango.mdf b/Software/DB/PPC/Tango.mdf index b12efe5cb..32108bc4a 100644 Binary files a/Software/DB/PPC/Tango.mdf and b/Software/DB/PPC/Tango.mdf differ diff --git a/Software/DB/PPC/Tango_log.ldf b/Software/DB/PPC/Tango_log.ldf index 20177ab88..1059a5b6c 100644 Binary files a/Software/DB/PPC/Tango_log.ldf and b/Software/DB/PPC/Tango_log.ldf differ diff --git a/Software/DB/Tango.mdf b/Software/DB/Tango.mdf index 71429596e..2468d8559 100644 Binary files a/Software/DB/Tango.mdf and b/Software/DB/Tango.mdf differ diff --git a/Software/DB/Tango_log.ldf b/Software/DB/Tango_log.ldf index 72cdafc9f..de658cfa8 100644 Binary files a/Software/DB/Tango_log.ldf and b/Software/DB/Tango_log.ldf differ diff --git a/Software/Visual_Studio/MachineStudio/Modules/MachineStudio.Dispensers/Views/DispenserView.xaml b/Software/Visual_Studio/MachineStudio/Modules/MachineStudio.Dispensers/Views/DispenserView.xaml index d4b3b0655..0b295b620 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/MachineStudio.Dispensers/Views/DispenserView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/MachineStudio.Dispensers/Views/DispenserView.xaml @@ -54,7 +54,19 @@ Nanoliter / Pulse: - + + + Part Number: + + + PCB Serial: + + + PCB Version: + + + Production Date: + Installed On Machine: diff --git a/Software/Visual_Studio/MachineStudio/Modules/MachineStudio.Dispensers/Views/DispensersView.xaml b/Software/Visual_Studio/MachineStudio/Modules/MachineStudio.Dispensers/Views/DispensersView.xaml index a7a57d801..a1d080380 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/MachineStudio.Dispensers/Views/DispensersView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/MachineStudio.Dispensers/Views/DispensersView.xaml @@ -66,6 +66,10 @@ + + + + diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Tango.MachineStudio.DB.csproj b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Tango.MachineStudio.DB.csproj index da427f4d8..b0749e196 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Tango.MachineStudio.DB.csproj +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Tango.MachineStudio.DB.csproj @@ -109,7 +109,6 @@ - @@ -230,18 +229,12 @@ MediaMaterialsView.xaml - - MediaColorView.xaml - MediaPurposView.xaml MediaMaterialView.xaml - - MediaColorsView.xaml - IdsPacksView.xaml @@ -501,10 +494,6 @@ MSBuild:Compile Designer - - MSBuild:Compile - Designer - MSBuild:Compile Designer @@ -513,10 +502,6 @@ MSBuild:Compile Designer - - MSBuild:Compile - Designer - MSBuild:Compile Designer @@ -734,7 +719,7 @@ - + \ No newline at end of file diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModelLocator.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModelLocator.cs index 736682e07..05c3ba0c7 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModelLocator.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModelLocator.cs @@ -41,7 +41,6 @@ namespace Tango.MachineStudio.DB TangoIOC.Default.Register(); TangoIOC.Default.Register(); - TangoIOC.Default.Register(); TangoIOC.Default.Register(); TangoIOC.Default.Register(); TangoIOC.Default.Register(); @@ -223,14 +222,6 @@ namespace Tango.MachineStudio.DB } } - public static MediaColorsViewVM MediaColorsViewVM - { - get - { - return TangoIOC.Default.GetInstance(); - } - } - public static MediaPurposesViewVM MediaPurposesViewVM { get diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/MediaColorsViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/MediaColorsViewVM.cs deleted file mode 100644 index fd815e5df..000000000 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/ViewModels/MediaColorsViewVM.cs +++ /dev/null @@ -1,17 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using Tango.BL.Entities; -using Tango.MachineStudio.Common.Notifications; - -namespace Tango.MachineStudio.DB.ViewModels -{ - public class MediaColorsViewVM : DbTableViewModel - { - public MediaColorsViewVM(INotificationProvider notification) : base(notification) - { - } - } -} diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/MediaColorView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/MediaColorView.xaml deleted file mode 100644 index 9fcfc5a89..000000000 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/MediaColorView.xaml +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/MediaColorView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/MediaColorView.xaml.cs deleted file mode 100644 index de09b9aaf..000000000 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/MediaColorView.xaml.cs +++ /dev/null @@ -1,28 +0,0 @@ -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.DB.Views.DBViews -{ - /// - /// Interaction logic for MachineView.xaml - /// - public partial class MediaColorView : UserControl - { - public MediaColorView() - { - InitializeComponent(); - } - } -} diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/MediaColorsView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/MediaColorsView.xaml deleted file mode 100644 index 57adda44d..000000000 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/MediaColorsView.xaml +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/MediaColorsView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/MediaColorsView.xaml.cs deleted file mode 100644 index ceae18ec8..000000000 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.DB/Views/DBViews/MediaColorsView.xaml.cs +++ /dev/null @@ -1,32 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Windows; -using System.Windows.Controls; -using System.Windows.Data; -using System.Windows.Documents; -using System.Windows.Input; -using System.Windows.Media; -using System.Windows.Media.Imaging; -using System.Windows.Navigation; -using System.Windows.Shapes; -using Tango.MachineStudio.DB.CustomAttributes; -using Tango.MachineStudio.DB.Managers; -using Tango.SharedUI.Controls; - -namespace Tango.MachineStudio.DB.Views.DBViews -{ - /// - /// Interaction logic for MachinesView.xaml - /// - [DBView] - public partial class MediaColorsView : UserControl - { - public MediaColorsView() : base() - { - InitializeComponent(); - } - } -} diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/ViewModels/MainViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/ViewModels/MainViewVM.cs index f8966b729..57c1aa724 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/ViewModels/MainViewVM.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/ViewModels/MainViewVM.cs @@ -42,13 +42,6 @@ namespace Tango.MachineStudio.RML.ViewModels set { _materials = value; RaisePropertyChangedAuto(); } } - private ObservableCollection _colors; - public ObservableCollection Colors - { - get { return _colors; } - set { _colors = value; RaisePropertyChangedAuto(); } - } - private ObservableCollection _purposes; public ObservableCollection Purposes { @@ -265,7 +258,6 @@ namespace Tango.MachineStudio.RML.ViewModels private void LoadRmlProperties() { Materials = _active_context.MediaMaterials.ToObservableCollection(); - Colors = _active_context.MediaColors.ToObservableCollection(); Purposes = _active_context.MediaPurposes.ToObservableCollection(); Conditions = _active_context.MediaConditions.ToObservableCollection(); LinearMassDensityUnits = _active_context.LinearMassDensityUnits.ToObservableCollection(); @@ -303,7 +295,6 @@ namespace Tango.MachineStudio.RML.ViewModels rml.Manufacturer = "Twine"; rml.Code = Rmls.Max(x => x.Code) + 1; rml.MediaMaterial = Materials.FirstOrDefault(); - rml.MediaColor = Colors.FirstOrDefault(); rml.MediaPurpose = Purposes.FirstOrDefault(); rml.MediaCondition = Conditions.FirstOrDefault(); rml.LinearMassDensityUnit = LinearMassDensityUnits.FirstOrDefault(); diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/RmlView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/RmlView.xaml index d72b6c7d3..8f2c5d187 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/RmlView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/Views/RmlView.xaml @@ -65,20 +65,12 @@ - - - - - - - - - - - - - - + + + + + + diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Tango.PPC.Jobs.csproj b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Tango.PPC.Jobs.csproj index 6830f2ec5..b4b635b8f 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Tango.PPC.Jobs.csproj +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Tango.PPC.Jobs.csproj @@ -394,7 +394,7 @@ - + \ No newline at end of file diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/JobViewVM.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/JobViewVM.cs index 6a05eee12..08600c928 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/JobViewVM.cs +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/JobViewVM.cs @@ -333,7 +333,7 @@ namespace Tango.PPC.Jobs.ViewModels TwineCatalogAutoCompleteProvider = new AutoCompleteProvider((color, filter) => { - return !String.IsNullOrWhiteSpace(filter) && color.Name.ToLower().StartsWith(filter.ToLower()); + return !String.IsNullOrWhiteSpace(filter) && color.RmlGuid == Job.Rml.Guid && color.Name.ToLower().StartsWith(filter.ToLower()); }); //Initialize Commands @@ -410,6 +410,9 @@ namespace Tango.PPC.Jobs.ViewModels .WithBrushStops() .BuildAsync(); + Job.RmlChanged -= OnRmlChanged; + Job.RmlChanged += OnRmlChanged; + Job.ValidateOnPropertyChanged = true; LogManager.Log("Loading RMLS..."); @@ -420,7 +423,7 @@ namespace Tango.PPC.Jobs.ViewModels SpoolTypes = await _db.SpoolTypes.ToListAsync(); LogManager.Log("Loading Customers..."); Customers = await _db.Customers.Where(x => x.OrganizationGuid == MachineProvider.Machine.OrganizationGuid).ToListAsync(); - TwineCatalogItems = await _db.ColorCatalogs.Where(x => x.ColorSpace.Code == (int)BL.Enumerations.ColorSpaces.Twine).OrderBy(x => x.Name).ToListAsync(); + TwineCatalogItems = await _db.ColorCatalogs.Where(x => x.RmlGuid == Job.Rml.Guid && x.ColorSpace.Code == (int)BL.Enumerations.ColorSpaces.Twine).OrderBy(x => x.Name).ToListAsync(); if (!_check_gamut_thread.IsAlive) { @@ -470,6 +473,8 @@ namespace Tango.PPC.Jobs.ViewModels } } + + /// /// Saves the job. /// @@ -551,6 +556,22 @@ namespace Tango.PPC.Jobs.ViewModels #endregion + #region RML Changed + + protected virtual async void OnRmlChanged(object sender, Rml rml) + { + TwineCatalogItems = await _db.ColorCatalogs.Where(x => x.RmlGuid == rml.Guid && x.ColorSpace.Code == (int)BL.Enumerations.ColorSpaces.Twine).OrderBy(x => x.Name).ToListAsync(); + + //Replace all brush stops color catalogs. + foreach (var stop in Job.Segments.SelectMany(x => x.BrushStops).Where(x => x.ColorCatalog != null && x.BrushColorSpace == BL.Enumerations.ColorSpaces.Twine).ToList()) + { + var replacement = TwineCatalogItems.SingleOrDefault(x => x.Name == stop.ColorCatalog.Name); + stop.ColorCatalog = replacement; + } + } + + #endregion + #region Segments Management /// @@ -741,7 +762,7 @@ namespace Tango.PPC.Jobs.ViewModels if (catalogItem != null) { - stop.ColorCatalog = TwineCatalogItems.SingleOrDefault(x => x.Guid == catalogItem.Entity.Guid); + stop.ColorCatalog = TwineCatalogItems.SingleOrDefault(x => x.Name == catalogItem.Entity.Name); } } diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/TwineCatalogViewVM.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/TwineCatalogViewVM.cs index 6ed4afcd8..1fd5c8474 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/TwineCatalogViewVM.cs +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/TwineCatalogViewVM.cs @@ -94,7 +94,7 @@ namespace Tango.PPC.Jobs.ViewModels /// private void Confirm() { - SettingsManager.Default.GetOrCreate().RecentTwineCatalogColors.Add(SelectedItem.Entity.Guid); + SettingsManager.Default.GetOrCreate().RecentTwineCatalogColors.Add(SelectedItem.Entity.Name); SettingsManager.Default.Save(); Recent = CatalogLoader.GetRecent(Catalog, SettingsManager.Default.GetOrCreate().RecentTwineCatalogColors); diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/Controls/TwineCatalogControl.xaml b/Software/Visual_Studio/PPC/Tango.PPC.Common/Controls/TwineCatalogControl.xaml index c1a7b29a2..fe483420a 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.Common/Controls/TwineCatalogControl.xaml +++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/Controls/TwineCatalogControl.xaml @@ -13,7 +13,7 @@ - + diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/Controls/TwineCatalogControl.xaml.cs b/Software/Visual_Studio/PPC/Tango.PPC.Common/Controls/TwineCatalogControl.xaml.cs index f786009f0..d4b924f17 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.Common/Controls/TwineCatalogControl.xaml.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/Controls/TwineCatalogControl.xaml.cs @@ -70,22 +70,22 @@ namespace Tango.PPC.Common.Controls /// The instance containing the event data. private void ScrollViewer_Scrolling(object sender, Touch.Controls.DoubleValueChangedEventArgs e) { - if (!_preventChange) - { - if (e.Value > _lastScrollPosition + 60 || e.Value < _lastScrollPosition - 60) - { - var group = list.ScrollViewer.GetMostVisibleElementDataContext(); + //if (!_preventChange) + //{ + // if (e.Value > _lastScrollPosition + 60 || e.Value < _lastScrollPosition - 60) + // { + // var group = list.ScrollViewer.GetMostVisibleElementDataContext(); - if (group != null) - { - _preventChange = true; - slider.Value = slider.Maximum - _catalog.Groups.IndexOf(group); - _preventChange = false; - } + // if (group != null) + // { + // _preventChange = true; + // slider.Value = slider.Maximum - _catalog.Groups.IndexOf(group); + // _preventChange = false; + // } - _lastScrollPosition = e.Value; - } - } + // _lastScrollPosition = e.Value; + // } + //} } /// @@ -113,22 +113,22 @@ namespace Tango.PPC.Common.Controls /// The instance containing the event data. private void TouchSlider_ValueChanged(object sender, RoutedPropertyChangedEventArgs e) { - if (_catalog == null || _catalog.Groups.Count == 0) return; + //if (_catalog == null || _catalog.Groups.Count == 0) return; - if (!_preventChange) - { - if (_catalog != null) - { - _preventChange = true; - list.ScrollToItem(_catalog.Groups.ElementAt(_catalog.Groups.Count - 1 - (int)e.NewValue)); - _preventChange = false; - } - } + //if (!_preventChange) + //{ + // if (_catalog != null) + // { + // _preventChange = true; + // list.ScrollToItem(_catalog.Groups.ElementAt(_catalog.Groups.Count - 1 - (int)e.NewValue)); + // _preventChange = false; + // } + //} - if (_catalog != null && _catalog.Groups.Count > _catalog.Groups.Count - 1 - (int)e.NewValue && _catalog.Groups.Count - 1 - (int)e.NewValue > -1) - { - slider.Foreground = new SolidColorBrush(_catalog.Groups.ElementAt(_catalog.Groups.Count - 1 - (int)e.NewValue).Color); - } + //if (_catalog != null && _catalog.Groups.Count > _catalog.Groups.Count - 1 - (int)e.NewValue && _catalog.Groups.Count - 1 - (int)e.NewValue > -1) + //{ + // slider.Foreground = new SolidColorBrush(_catalog.Groups.ElementAt(_catalog.Groups.Count - 1 - (int)e.NewValue).Color); + //} } /// diff --git a/Software/Visual_Studio/Tango.BL/Builders/RmlBuilder.cs b/Software/Visual_Studio/Tango.BL/Builders/RmlBuilder.cs index 7b5d9b7ff..dd40ceedc 100644 --- a/Software/Visual_Studio/Tango.BL/Builders/RmlBuilder.cs +++ b/Software/Visual_Studio/Tango.BL/Builders/RmlBuilder.cs @@ -20,7 +20,6 @@ namespace Tango.BL.Builders { return query. Include(x => x.MediaMaterial). - Include(x => x.MediaColor). Include(x => x.MediaPurpose). Include(x => x.MediaCondition). Include(x => x.LinearMassDensityUnit). diff --git a/Software/Visual_Studio/Tango.BL/Builders/RmlsCollectionBuilder.cs b/Software/Visual_Studio/Tango.BL/Builders/RmlsCollectionBuilder.cs index d6eabbae4..fa0056259 100644 --- a/Software/Visual_Studio/Tango.BL/Builders/RmlsCollectionBuilder.cs +++ b/Software/Visual_Studio/Tango.BL/Builders/RmlsCollectionBuilder.cs @@ -79,7 +79,6 @@ namespace Tango.BL.Builders return AddStep(6, () => { Context.MediaMaterials.ToList(); - Context.MediaColors.ToList(); Context.MediaPurposes.ToList(); Context.MediaConditions.ToList(); Context.LinearMassDensityUnits.ToList(); diff --git a/Software/Visual_Studio/Tango.BL/Catalogs/CatalogLoader.cs b/Software/Visual_Studio/Tango.BL/Catalogs/CatalogLoader.cs index ac2a00ab4..1522d0900 100644 --- a/Software/Visual_Studio/Tango.BL/Catalogs/CatalogLoader.cs +++ b/Software/Visual_Studio/Tango.BL/Catalogs/CatalogLoader.cs @@ -13,6 +13,8 @@ namespace Tango.BL.Catalogs { var all_items = context.ColorCatalogs.Where(x => x.ColorSpace.Code == (int)colorSpace).ToList(); + all_items = all_items.DistinctBy(x => x.Name).ToList(); + var first = all_items.First(); Catalog catalog = new Catalog(); @@ -35,9 +37,9 @@ namespace Tango.BL.Catalogs return catalog; } - public static Catalog GetRecent(Catalog source, List guids) + public static Catalog GetRecent(Catalog source, List names) { - var filtersItems = source.Groups.SelectMany(x => x.Items).Select(x => x.Entity).Where(x => guids.Contains(x.Guid)).ToList(); + var filtersItems = source.Groups.SelectMany(x => x.Items).Select(x => x.Entity).Where(x => names.Contains(x.Name)).ToList(); var first = filtersItems.FirstOrDefault(); diff --git a/Software/Visual_Studio/Tango.BL/Entities/BrushStopBase.cs b/Software/Visual_Studio/Tango.BL/Entities/BrushStopBase.cs index 53eee50e0..69658bab6 100644 --- a/Software/Visual_Studio/Tango.BL/Entities/BrushStopBase.cs +++ b/Software/Visual_Studio/Tango.BL/Entities/BrushStopBase.cs @@ -83,8 +83,6 @@ namespace Tango.BL.Entities public event EventHandler CorrectedChanged; - public event EventHandler ColorCatalogCodeChanged; - public event EventHandler ColorCatalogChanged; public event EventHandler ColorSpaceChanged; @@ -949,33 +947,6 @@ namespace Tango.BL.Entities } } - protected Int32 _colorcatalogcode; - - /// - /// Gets or sets the brushstopbase color catalog code. - /// - - [Column("COLOR_CATALOG_CODE")] - - public Int32 ColorCatalogCode - { - get - { - return _colorcatalogcode; - } - - set - { - if (_colorcatalogcode != value) - { - _colorcatalogcode = value; - - OnColorCatalogCodeChanged(value); - - } - } - } - protected ColorCatalog _colorcatalog; /// @@ -1318,15 +1289,6 @@ namespace Tango.BL.Entities RaisePropertyChanged(nameof(Corrected)); } - /// - /// Called when the ColorCatalogCode has changed. - /// - protected virtual void OnColorCatalogCodeChanged(Int32 colorcatalogcode) - { - ColorCatalogCodeChanged?.Invoke(this, colorcatalogcode); - RaisePropertyChanged(nameof(ColorCatalogCode)); - } - /// /// Called when the ColorCatalog has changed. /// diff --git a/Software/Visual_Studio/Tango.BL/Entities/ColorCatalogBase.cs b/Software/Visual_Studio/Tango.BL/Entities/ColorCatalogBase.cs index 49e519455..6438c6332 100644 --- a/Software/Visual_Studio/Tango.BL/Entities/ColorCatalogBase.cs +++ b/Software/Visual_Studio/Tango.BL/Entities/ColorCatalogBase.cs @@ -57,6 +57,33 @@ namespace Tango.BL.Entities public event EventHandler ColorSpaceChanged; + public event EventHandler RmlChanged; + + protected String _rmlguid; + + /// + /// Gets or sets the colorcatalogbase rml guid. + /// + + [Column("RML_GUID")] + [ForeignKey("Rml")] + + public String RmlGuid + { + get + { + return _rmlguid; + } + + set + { + if (_rmlguid != value) + { + _rmlguid = value; + } + } + } + protected String _colorspaceguid; /// @@ -512,6 +539,33 @@ namespace Tango.BL.Entities } } + protected Rml _rml; + + /// + /// Gets or sets the colorcatalogbase rml. + /// + + [XmlIgnore] + [JsonIgnore] + public virtual Rml Rml + { + get + { + return _rml; + } + + set + { + if (_rml != value) + { + _rml = value; + + OnRmlChanged(value); + + } + } + } + /// /// Called when the ColorCode has changed. /// @@ -656,6 +710,15 @@ namespace Tango.BL.Entities RaisePropertyChanged(nameof(ColorSpace)); } + /// + /// Called when the Rml has changed. + /// + protected virtual void OnRmlChanged(Rml rml) + { + RmlChanged?.Invoke(this, rml); + RaisePropertyChanged(nameof(Rml)); + } + /// /// Initializes a new instance of the class. /// diff --git a/Software/Visual_Studio/Tango.BL/Entities/MediaColor.cs b/Software/Visual_Studio/Tango.BL/Entities/MediaColor.cs deleted file mode 100644 index b9020406b..000000000 --- a/Software/Visual_Studio/Tango.BL/Entities/MediaColor.cs +++ /dev/null @@ -1,45 +0,0 @@ -using ColorMine.ColorSpaces; -using Newtonsoft.Json; -using System; -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations.Schema; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Windows.Media; - -namespace Tango.BL.Entities -{ - public partial class MediaColor : MediaColorBase - { - [NotMapped] - [JsonIgnore] - public Color Color - { - get - { - Lab lab = new Lab(L, A, B); - var rgb = lab.To(); - return Color.FromRgb((byte)rgb.R, (byte)rgb.G, (byte)rgb.B); - } - } - - protected override void RaisePropertyChanged(string propName) - { - base.RaisePropertyChanged(propName); - - if (propName == nameof(L) || propName == nameof(A) || propName == nameof(B)) - { - RaisePropertyChanged(nameof(Color)); - } - } - - /// - /// Initializes a new instance of the class. - /// - public MediaColor() : base() - { - - } - } -} diff --git a/Software/Visual_Studio/Tango.BL/Entities/MediaColorBase.cs b/Software/Visual_Studio/Tango.BL/Entities/MediaColorBase.cs deleted file mode 100644 index 529441857..000000000 --- a/Software/Visual_Studio/Tango.BL/Entities/MediaColorBase.cs +++ /dev/null @@ -1,226 +0,0 @@ -//------------------------------------------------------------------------------ -// -// 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! -// -//------------------------------------------------------------------------------ - -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; - -namespace Tango.BL.Entities -{ - [Table("MEDIA_COLORS")] - public abstract class MediaColorBase : ObservableEntity - { - - public event EventHandler NameChanged; - - public event EventHandler LChanged; - - public event EventHandler AChanged; - - public event EventHandler BChanged; - - public event EventHandler> RmlsChanged; - - protected String _name; - - /// - /// Gets or sets the mediacolorbase name. - /// - - [Column("NAME")] - - public String Name - { - get - { - return _name; - } - - set - { - if (_name != value) - { - _name = value; - - OnNameChanged(value); - - } - } - } - - protected Double _l; - - /// - /// Gets or sets the mediacolorbase l. - /// - - [Column("L")] - - public Double L - { - get - { - return _l; - } - - set - { - if (_l != value) - { - _l = value; - - OnLChanged(value); - - } - } - } - - protected Double _a; - - /// - /// Gets or sets the mediacolorbase a. - /// - - [Column("A")] - - public Double A - { - get - { - return _a; - } - - set - { - if (_a != value) - { - _a = value; - - OnAChanged(value); - - } - } - } - - protected Double _b; - - /// - /// Gets or sets the mediacolorbase b. - /// - - [Column("B")] - - public Double B - { - get - { - return _b; - } - - set - { - if (_b != value) - { - _b = value; - - OnBChanged(value); - - } - } - } - - protected SynchronizedObservableCollection _rmls; - - /// - /// Gets or sets the mediacolorbase rmls. - /// - - public virtual SynchronizedObservableCollection Rmls - { - get - { - return _rmls; - } - - set - { - if (_rmls != value) - { - _rmls = value; - - OnRmlsChanged(value); - - } - } - } - - /// - /// Called when the Name has changed. - /// - protected virtual void OnNameChanged(String name) - { - NameChanged?.Invoke(this, name); - RaisePropertyChanged(nameof(Name)); - } - - /// - /// Called when the L has changed. - /// - protected virtual void OnLChanged(Double l) - { - LChanged?.Invoke(this, l); - RaisePropertyChanged(nameof(L)); - } - - /// - /// Called when the A has changed. - /// - protected virtual void OnAChanged(Double a) - { - AChanged?.Invoke(this, a); - RaisePropertyChanged(nameof(A)); - } - - /// - /// Called when the B has changed. - /// - protected virtual void OnBChanged(Double b) - { - BChanged?.Invoke(this, b); - RaisePropertyChanged(nameof(B)); - } - - /// - /// Called when the Rmls has changed. - /// - protected virtual void OnRmlsChanged(SynchronizedObservableCollection rmls) - { - RmlsChanged?.Invoke(this, rmls); - RaisePropertyChanged(nameof(Rmls)); - } - - /// - /// Initializes a new instance of the class. - /// - public MediaColorBase() : base() - { - - Rmls = new SynchronizedObservableCollection(); - - } - } -} diff --git a/Software/Visual_Studio/Tango.BL/Entities/Rml.cs b/Software/Visual_Studio/Tango.BL/Entities/Rml.cs index c75c5bf99..f79fb6c5b 100644 --- a/Software/Visual_Studio/Tango.BL/Entities/Rml.cs +++ b/Software/Visual_Studio/Tango.BL/Entities/Rml.cs @@ -1,8 +1,10 @@ +using ColorMine.ColorSpaces; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; +using System.Windows.Media; namespace Tango.BL.Entities { @@ -15,5 +17,38 @@ namespace Tango.BL.Entities { } + + protected override void OnWhitePointLChanged(double whitepointl) + { + base.OnWhitePointLChanged(whitepointl); + UpdateColor(); + } + + protected override void OnWhitePointAChanged(double whitepointa) + { + base.OnWhitePointAChanged(whitepointa); + UpdateColor(); + } + + protected override void OnWhitePointBChanged(double whitepointb) + { + base.OnWhitePointBChanged(whitepointb); + UpdateColor(); + } + + private void UpdateColor() + { + RaisePropertyChanged(nameof(Color)); + } + + public Color Color + { + get + { + Lab lab = new Lab(WhitePointA, WhitePointA, WhitePointB); + Rgb rgb = lab.To(); + return Color.FromRgb((byte)rgb.R, (byte)rgb.G, (byte)rgb.B); + } + } } } diff --git a/Software/Visual_Studio/Tango.BL/Entities/RmlBase.cs b/Software/Visual_Studio/Tango.BL/Entities/RmlBase.cs index 2b85ca767..97fee9558 100644 --- a/Software/Visual_Studio/Tango.BL/Entities/RmlBase.cs +++ b/Software/Visual_Studio/Tango.BL/Entities/RmlBase.cs @@ -31,6 +31,12 @@ namespace Tango.BL.Entities public event EventHandler CodeChanged; + public event EventHandler WhitePointLChanged; + + public event EventHandler WhitePointAChanged; + + public event EventHandler WhitePointBChanged; + public event EventHandler FiberSizeChanged; public event EventHandler NumberOfFibersChanged; @@ -59,6 +65,8 @@ namespace Tango.BL.Entities public event EventHandler> CctsChanged; + public event EventHandler> ColorCatalogsChanged; + public event EventHandler FiberShapeChanged; public event EventHandler FiberSynthChanged; @@ -71,8 +79,6 @@ namespace Tango.BL.Entities public event EventHandler> MachinesChanged; - public event EventHandler MediaColorChanged; - public event EventHandler MediaConditionChanged; public event EventHandler MediaMaterialChanged; @@ -162,52 +168,108 @@ namespace Tango.BL.Entities } } - protected String _mediamaterialguid; + protected Double _whitepointl; /// - /// Gets or sets the rmlbase media material guid. + /// Gets or sets the rmlbase white point l. /// - [Column("MEDIA_MATERIAL_GUID")] - [ForeignKey("MediaMaterial")] + [Column("WHITE_POINT_L")] - public String MediaMaterialGuid + public Double WhitePointL { get { - return _mediamaterialguid; + return _whitepointl; } set { - if (_mediamaterialguid != value) + if (_whitepointl != value) { - _mediamaterialguid = value; + _whitepointl = value; + + OnWhitePointLChanged(value); + } } } - protected String _mediacolorguid; + protected Double _whitepointa; /// - /// Gets or sets the rmlbase media color guid. + /// Gets or sets the rmlbase white point a. /// - [Column("MEDIA_COLOR_GUID")] - [ForeignKey("MediaColor")] + [Column("WHITE_POINT_A")] - public String MediaColorGuid + public Double WhitePointA { get { - return _mediacolorguid; + return _whitepointa; } set { - if (_mediacolorguid != value) + if (_whitepointa != value) { - _mediacolorguid = value; + _whitepointa = value; + + OnWhitePointAChanged(value); + + } + } + } + + protected Double _whitepointb; + + /// + /// Gets or sets the rmlbase white point b. + /// + + [Column("WHITE_POINT_B")] + + public Double WhitePointB + { + get + { + return _whitepointb; + } + + set + { + if (_whitepointb != value) + { + _whitepointb = value; + + OnWhitePointBChanged(value); + + } + } + } + + protected String _mediamaterialguid; + + /// + /// Gets or sets the rmlbase media material guid. + /// + + [Column("MEDIA_MATERIAL_GUID")] + [ForeignKey("MediaMaterial")] + + public String MediaMaterialGuid + { + get + { + return _mediamaterialguid; + } + + set + { + if (_mediamaterialguid != value) + { + _mediamaterialguid = value; } } } @@ -711,6 +773,31 @@ namespace Tango.BL.Entities } } + protected SynchronizedObservableCollection _colorcatalogs; + + /// + /// Gets or sets the rmlbase color catalogs. + /// + + public virtual SynchronizedObservableCollection ColorCatalogs + { + get + { + return _colorcatalogs; + } + + set + { + if (_colorcatalogs != value) + { + _colorcatalogs = value; + + OnColorCatalogsChanged(value); + + } + } + } + protected FiberShape _fibershape; /// @@ -867,33 +954,6 @@ namespace Tango.BL.Entities } } - protected MediaColor _mediacolor; - - /// - /// Gets or sets the rmlbase media colors. - /// - - [XmlIgnore] - [JsonIgnore] - public virtual MediaColor MediaColor - { - get - { - return _mediacolor; - } - - set - { - if (_mediacolor != value) - { - _mediacolor = value; - - OnMediaColorChanged(value); - - } - } - } - protected MediaCondition _mediacondition; /// @@ -1027,6 +1087,33 @@ namespace Tango.BL.Entities RaisePropertyChanged(nameof(Code)); } + /// + /// Called when the WhitePointL has changed. + /// + protected virtual void OnWhitePointLChanged(Double whitepointl) + { + WhitePointLChanged?.Invoke(this, whitepointl); + RaisePropertyChanged(nameof(WhitePointL)); + } + + /// + /// Called when the WhitePointA has changed. + /// + protected virtual void OnWhitePointAChanged(Double whitepointa) + { + WhitePointAChanged?.Invoke(this, whitepointa); + RaisePropertyChanged(nameof(WhitePointA)); + } + + /// + /// Called when the WhitePointB has changed. + /// + protected virtual void OnWhitePointBChanged(Double whitepointb) + { + WhitePointBChanged?.Invoke(this, whitepointb); + RaisePropertyChanged(nameof(WhitePointB)); + } + /// /// Called when the FiberSize has changed. /// @@ -1153,6 +1240,15 @@ namespace Tango.BL.Entities RaisePropertyChanged(nameof(Ccts)); } + /// + /// Called when the ColorCatalogs has changed. + /// + protected virtual void OnColorCatalogsChanged(SynchronizedObservableCollection colorcatalogs) + { + ColorCatalogsChanged?.Invoke(this, colorcatalogs); + RaisePropertyChanged(nameof(ColorCatalogs)); + } + /// /// Called when the FiberShape has changed. /// @@ -1207,15 +1303,6 @@ namespace Tango.BL.Entities RaisePropertyChanged(nameof(Machines)); } - /// - /// Called when the MediaColor has changed. - /// - protected virtual void OnMediaColorChanged(MediaColor mediacolor) - { - MediaColorChanged?.Invoke(this, mediacolor); - RaisePropertyChanged(nameof(MediaColor)); - } - /// /// Called when the MediaCondition has changed. /// @@ -1262,6 +1349,8 @@ namespace Tango.BL.Entities Ccts = new SynchronizedObservableCollection(); + ColorCatalogs = new SynchronizedObservableCollection(); + Jobs = new SynchronizedObservableCollection(); LiquidTypesRmls = new SynchronizedObservableCollection(); diff --git a/Software/Visual_Studio/Tango.BL/ObservablesContext.cs b/Software/Visual_Studio/Tango.BL/ObservablesContext.cs index 27e4ee6a7..0ca9e8b34 100644 --- a/Software/Visual_Studio/Tango.BL/ObservablesContext.cs +++ b/Software/Visual_Studio/Tango.BL/ObservablesContext.cs @@ -390,14 +390,6 @@ namespace Tango.BL get; set; } - /// - /// Gets or sets the MediaColors. - /// - public DbSet MediaColors - { - get; set; - } - /// /// Gets or sets the MediaConditions. /// diff --git a/Software/Visual_Studio/Tango.BL/ObservablesEntitiesAdapter.cs b/Software/Visual_Studio/Tango.BL/ObservablesEntitiesAdapter.cs index 947d27565..1cbd91835 100644 --- a/Software/Visual_Studio/Tango.BL/ObservablesEntitiesAdapter.cs +++ b/Software/Visual_Studio/Tango.BL/ObservablesEntitiesAdapter.cs @@ -178,8 +178,6 @@ namespace Tango.BL MediaMaterials = Context.MediaMaterials.ToObservableCollection(); - MediaColors = Context.MediaColors.ToObservableCollection(); - MediaPurposes = Context.MediaPurposes.ToObservableCollection(); MediaConditions = Context.MediaConditions.ToObservableCollection(); diff --git a/Software/Visual_Studio/Tango.BL/ObservablesEntitiesAdapterExtension.cs b/Software/Visual_Studio/Tango.BL/ObservablesEntitiesAdapterExtension.cs index 57f01105e..5d087b245 100644 --- a/Software/Visual_Studio/Tango.BL/ObservablesEntitiesAdapterExtension.cs +++ b/Software/Visual_Studio/Tango.BL/ObservablesEntitiesAdapterExtension.cs @@ -1673,42 +1673,6 @@ namespace Tango.BL } - private ObservableCollection _mediacolors; - /// - /// Gets or sets the MediaColors. - /// - public ObservableCollection MediaColors - { - get - { - return _mediacolors; - } - - set - { - _mediacolors = value; RaisePropertyChanged(nameof(MediaColors)); - } - - } - - private ICollectionView _mediacolorsViewSource; - /// - /// Gets or sets the MediaColors View Source. - /// - public ICollectionView MediaColorsViewSource - { - get - { - return _mediacolorsViewSource; - } - - set - { - _mediacolorsViewSource = value; RaisePropertyChanged(nameof(MediaColorsViewSource)); - } - - } - private ObservableCollection _mediaconditions; /// /// Gets or sets the MediaConditions. @@ -2707,8 +2671,6 @@ namespace Tango.BL MachinesEventsViewSource = CreateCollectionView(MachinesEvents); - MediaColorsViewSource = CreateCollectionView(MediaColors); - MediaConditionsViewSource = CreateCollectionView(MediaConditions); MediaMaterialsViewSource = CreateCollectionView(MediaMaterials); diff --git a/Software/Visual_Studio/Tango.BL/ObservablesStaticCollectionsExtension.cs b/Software/Visual_Studio/Tango.BL/ObservablesStaticCollectionsExtension.cs index 096cd2687..d97e9d075 100644 --- a/Software/Visual_Studio/Tango.BL/ObservablesStaticCollectionsExtension.cs +++ b/Software/Visual_Studio/Tango.BL/ObservablesStaticCollectionsExtension.cs @@ -1673,42 +1673,6 @@ namespace Tango.BL } - private ObservableCollection _mediacolors; - /// - /// Gets or sets the MediaColors. - /// - public ObservableCollection MediaColors - { - get - { - return _mediacolors; - } - - set - { - _mediacolors = value; RaisePropertyChanged(nameof(MediaColors)); - } - - } - - private ICollectionView _mediacolorsViewSource; - /// - /// Gets or sets the MediaColors View Source. - /// - public ICollectionView MediaColorsViewSource - { - get - { - return _mediacolorsViewSource; - } - - set - { - _mediacolorsViewSource = value; RaisePropertyChanged(nameof(MediaColorsViewSource)); - } - - } - private ObservableCollection _mediaconditions; /// /// Gets or sets the MediaConditions. @@ -2707,8 +2671,6 @@ namespace Tango.BL MachinesEventsViewSource = CreateCollectionView(MachinesEvents); - MediaColorsViewSource = CreateCollectionView(MediaColors); - MediaConditionsViewSource = CreateCollectionView(MediaConditions); MediaMaterialsViewSource = CreateCollectionView(MediaMaterials); diff --git a/Software/Visual_Studio/Tango.BL/Tango.BL.csproj b/Software/Visual_Studio/Tango.BL/Tango.BL.csproj index dd5122ec2..08e005ff0 100644 --- a/Software/Visual_Studio/Tango.BL/Tango.BL.csproj +++ b/Software/Visual_Studio/Tango.BL/Tango.BL.csproj @@ -163,7 +163,6 @@ - @@ -275,7 +274,6 @@ - @@ -404,7 +402,7 @@ - + \ No newline at end of file diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/BRUSH_STOPS.cs b/Software/Visual_Studio/Tango.DAL.Remote/DB/BRUSH_STOPS.cs index 6c1ff459c..d06c0f5ad 100644 --- a/Software/Visual_Studio/Tango.DAL.Remote/DB/BRUSH_STOPS.cs +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/BRUSH_STOPS.cs @@ -49,7 +49,6 @@ namespace Tango.DAL.Remote.DB public int V7_DIV { get; set; } public bool CORRECTED { get; set; } public string COLOR_CATALOG_GUID { get; set; } - public int COLOR_CATALOG_CODE { get; set; } public virtual COLOR_CATALOGS COLOR_CATALOGS { get; set; } public virtual COLOR_SPACES COLOR_SPACES { get; set; } diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/COLOR_CATALOGS.cs b/Software/Visual_Studio/Tango.DAL.Remote/DB/COLOR_CATALOGS.cs index 8526e3d8d..1a416d792 100644 --- a/Software/Visual_Studio/Tango.DAL.Remote/DB/COLOR_CATALOGS.cs +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/COLOR_CATALOGS.cs @@ -23,6 +23,7 @@ namespace Tango.DAL.Remote.DB public int ID { get; set; } public string GUID { get; set; } public System.DateTime LAST_UPDATED { get; set; } + public string RML_GUID { get; set; } public string COLOR_SPACE_GUID { get; set; } public int COLOR_CODE { get; set; } public string NAME { get; set; } @@ -42,5 +43,6 @@ namespace Tango.DAL.Remote.DB [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] public virtual ICollection BRUSH_STOPS { get; set; } public virtual COLOR_SPACES COLOR_SPACES { get; set; } + public virtual RML RML { get; set; } } } diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/MEDIA_COLORS.cs b/Software/Visual_Studio/Tango.DAL.Remote/DB/MEDIA_COLORS.cs deleted file mode 100644 index 4e7672b2e..000000000 --- a/Software/Visual_Studio/Tango.DAL.Remote/DB/MEDIA_COLORS.cs +++ /dev/null @@ -1,34 +0,0 @@ -//------------------------------------------------------------------------------ -// -// 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. -// -//------------------------------------------------------------------------------ - -namespace Tango.DAL.Remote.DB -{ - using System; - using System.Collections.Generic; - - public partial class MEDIA_COLORS - { - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")] - public MEDIA_COLORS() - { - this.RMLS = new HashSet(); - } - - public int ID { get; set; } - public string GUID { get; set; } - public System.DateTime LAST_UPDATED { get; set; } - public string NAME { get; set; } - public double L { get; set; } - public double A { get; set; } - public double B { get; set; } - - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] - public virtual ICollection RMLS { get; set; } - } -} diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/RML.cs b/Software/Visual_Studio/Tango.DAL.Remote/DB/RML.cs index 5b4ca71ff..539978519 100644 --- a/Software/Visual_Studio/Tango.DAL.Remote/DB/RML.cs +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/RML.cs @@ -19,6 +19,7 @@ namespace Tango.DAL.Remote.DB { this.CATS = new HashSet(); this.CCTS = new HashSet(); + this.COLOR_CATALOGS = new HashSet(); this.JOBS = new HashSet(); this.LIQUID_TYPES_RMLS = new HashSet(); this.MACHINES = new HashSet(); @@ -31,8 +32,10 @@ namespace Tango.DAL.Remote.DB public string NAME { get; set; } public string MANUFACTURER { get; set; } public int CODE { get; set; } + public double WHITE_POINT_L { get; set; } + public double WHITE_POINT_A { get; set; } + public double WHITE_POINT_B { get; set; } public string MEDIA_MATERIAL_GUID { get; set; } - public string MEDIA_COLOR_GUID { get; set; } public string MEDIA_PURPOSE_GUID { get; set; } public string MEDIA_CONDITION_GUID { get; set; } public string LINEAR_MASS_DENSITY_UNIT_GUID { get; set; } @@ -55,6 +58,8 @@ namespace Tango.DAL.Remote.DB public virtual ICollection CATS { get; set; } [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] public virtual ICollection CCTS { get; set; } + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] + public virtual ICollection COLOR_CATALOGS { get; set; } public virtual FIBER_SHAPES FIBER_SHAPES { get; set; } public virtual FIBER_SYNTHS FIBER_SYNTHS { get; set; } [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] @@ -64,7 +69,6 @@ namespace Tango.DAL.Remote.DB public virtual ICollection LIQUID_TYPES_RMLS { get; set; } [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] public virtual ICollection MACHINES { get; set; } - public virtual MEDIA_COLORS MEDIA_COLORS { get; set; } public virtual MEDIA_CONDITIONS MEDIA_CONDITIONS { get; set; } public virtual MEDIA_MATERIALS MEDIA_MATERIALS { get; set; } public virtual MEDIA_PURPOSES MEDIA_PURPOSES { 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 c103a6bba..98c4a65ae 100644 --- a/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.Context.cs +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.Context.cs @@ -71,7 +71,6 @@ namespace Tango.DAL.Remote.DB public virtual DbSet MACHINE_VERSIONS { get; set; } public virtual DbSet MACHINES { get; set; } public virtual DbSet MACHINES_EVENTS { get; set; } - public virtual DbSet MEDIA_COLORS { get; set; } public virtual DbSet MEDIA_CONDITIONS { get; set; } public virtual DbSet MEDIA_MATERIALS { get; set; } public virtual DbSet MEDIA_PURPOSES { 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 2ac5ff6b7..028494b1e 100644 --- a/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx @@ -90,7 +90,6 @@ - @@ -138,6 +137,7 @@ + @@ -692,18 +692,6 @@ - - - - - - - - - - - - @@ -819,8 +807,10 @@ + + + - @@ -1160,6 +1150,20 @@ + + + + + + + + + + + + + + @@ -1856,18 +1860,6 @@ - - - - - - - - - - - - @@ -2110,7 +2102,6 @@ - @@ -2169,6 +2160,10 @@ + + + + @@ -2385,10 +2380,6 @@ - - - - @@ -2501,7 +2492,6 @@ - @@ -2583,6 +2573,10 @@ + + + + @@ -2787,10 +2781,6 @@ - - - - @@ -2938,7 +2928,6 @@ - @@ -2994,6 +2983,7 @@ + @@ -3011,6 +3001,7 @@ + @@ -3640,19 +3631,6 @@ - - - - - - - - - - - - - @@ -3781,8 +3759,10 @@ + + + - @@ -3802,13 +3782,13 @@ + - @@ -4227,6 +4207,20 @@ + + + + + + + + + + + + + + @@ -4887,18 +4881,6 @@ - - - - - - - - - - - - @@ -5123,7 +5105,6 @@ - @@ -5222,6 +5203,7 @@ + @@ -5802,19 +5784,6 @@ - - - - - - - - - - - - - @@ -5948,8 +5917,10 @@ - + + + diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx.diagram b/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx.diagram index 7c45c1dda..4a1ed5d8d 100644 --- a/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx.diagram +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx.diagram @@ -5,77 +5,76 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -90,6 +89,7 @@ + @@ -141,7 +141,6 @@ - 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 6938b6eca..508d9793e 100644 --- a/Software/Visual_Studio/Tango.DAL.Remote/Tango.DAL.Remote.csproj +++ b/Software/Visual_Studio/Tango.DAL.Remote/Tango.DAL.Remote.csproj @@ -201,9 +201,6 @@ RemoteADO.tt - - RemoteADO.tt - RemoteADO.tt @@ -347,7 +344,7 @@ - + \ No newline at end of file -- cgit v1.3.1