From e335441bad3e19029caf3cf627b768848b801889 Mon Sep 17 00:00:00 2001 From: Victoria Plitt Date: Mon, 12 Apr 2021 18:23:44 +0300 Subject: New Thread Extensions Module --- .../Images/Fabric.jpg | Bin 0 -> 41395 bytes .../Properties/AssemblyInfo.cs | 19 +++ .../Properties/Resources.Designer.cs | 71 ++++++++++ .../Properties/Resources.resx | 117 +++++++++++++++++ .../Properties/Settings.Designer.cs | 30 +++++ .../Properties/Settings.settings | 7 + .../Tango.MachineStudio.ThreadExtensions.csproj | 143 +++++++++++++++++++++ .../ThreadExtensionsModule.cs | 62 +++++++++ .../ViewModelLocator.cs | 29 +++++ .../ViewModels/MainViewVM.cs | 18 +++ .../Views/MainView.xaml | 15 +++ .../Views/MainView.xaml.cs | 28 ++++ .../app.config | 75 +++++++++++ .../packages.config | 8 ++ 14 files changed, 622 insertions(+) create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Images/Fabric.jpg create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Properties/AssemblyInfo.cs create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Properties/Resources.Designer.cs create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Properties/Resources.resx create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Properties/Settings.Designer.cs create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Properties/Settings.settings create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Tango.MachineStudio.ThreadExtensions.csproj create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/ThreadExtensionsModule.cs create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/ViewModelLocator.cs create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/ViewModels/MainViewVM.cs create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/MainView.xaml create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/MainView.xaml.cs create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/app.config create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/packages.config (limited to 'Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions') diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Images/Fabric.jpg b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Images/Fabric.jpg new file mode 100644 index 000000000..e9e88434e Binary files /dev/null and b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Images/Fabric.jpg differ diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Properties/AssemblyInfo.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Properties/AssemblyInfo.cs new file mode 100644 index 000000000..9a4711726 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Properties/AssemblyInfo.cs @@ -0,0 +1,19 @@ +using System.Reflection; +using System.Resources; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using System.Windows; + +[assembly: AssemblyTitle("Tango - Machine Studio Thread Extensions Module")] +[assembly: AssemblyVersion("1.0.0.0")] + +[assembly: ComVisible(false)] + +[assembly: ThemeInfo( + ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located + //(used if a resource is not found in the page, + // or application resource dictionaries) + ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located + //(used if a resource is not found in the page, + // app, or any theme specific resource dictionaries) +)] diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Properties/Resources.Designer.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Properties/Resources.Designer.cs new file mode 100644 index 000000000..bf79c2402 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Properties/Resources.Designer.cs @@ -0,0 +1,71 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace Tango.MachineStudio.ThreadExtensions.Properties +{ + + + /// + /// A strongly-typed resource class, for looking up localized strings, etc. + /// + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class Resources + { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Resources() + { + } + + /// + /// Returns the cached ResourceManager instance used by this class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager + { + get + { + if ((resourceMan == null)) + { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Tango.MachineStudio.ThreadExtensions.Properties.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture + { + get + { + return resourceCulture; + } + set + { + resourceCulture = value; + } + } + } +} diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Properties/Resources.resx b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Properties/Resources.resx new file mode 100644 index 000000000..af7dbebba --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Properties/Resources.resx @@ -0,0 +1,117 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Properties/Settings.Designer.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Properties/Settings.Designer.cs new file mode 100644 index 000000000..24bb4eb1e --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Properties/Settings.Designer.cs @@ -0,0 +1,30 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace Tango.MachineStudio.ThreadExtensions.Properties +{ + + + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")] + internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase + { + + private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); + + public static Settings Default + { + get + { + return defaultInstance; + } + } + } +} diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Properties/Settings.settings b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Properties/Settings.settings new file mode 100644 index 000000000..033d7a5e9 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Properties/Settings.settings @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file 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 new file mode 100644 index 000000000..ca27b9a48 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Tango.MachineStudio.ThreadExtensions.csproj @@ -0,0 +1,143 @@ + + + + + Debug + AnyCPU + {859A766B-78AD-484E-9BF2-2CE0FE288894} + library + Tango.MachineStudio.ThreadExtensions + Tango.MachineStudio.ThreadExtensions + v4.6.1 + 512 + {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + 4 + true + + + true + full + false + ..\..\..\Build\Machine Studio\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + ..\..\..\Build\Machine Studio\Release\ + TRACE + prompt + 4 + + + + ..\..\..\packages\Google.Protobuf.3.4.1\lib\net45\Google.Protobuf.dll + + + ..\..\..\packages\MahApps.Metro.1.5.0\lib\net45\MahApps.Metro.dll + + + ..\..\..\packages\MaterialDesignColors.1.1.2\lib\net45\MaterialDesignColors.dll + + + ..\..\..\packages\MaterialDesignThemes.2.3.1.953\lib\net45\MaterialDesignThemes.Wpf.dll + + + ..\..\..\packages\Newtonsoft.Json.9.0.1\lib\net45\Newtonsoft.Json.dll + + + + + ..\..\..\packages\MahApps.Metro.1.5.0\lib\net45\System.Windows.Interactivity.dll + + + + + + + + + 4.0 + + + + + + + + GlobalVersionInfo.cs + + + + + MainView.xaml + + + + Designer + MSBuild:Compile + + + + + Code + + + True + True + Resources.resx + + + True + Settings.settings + True + + + ResXFileCodeGenerator + Resources.Designer.cs + + + + + SettingsSingleFileGenerator + Settings.Designer.cs + + + + + + {f441feee-322a-4943-b566-110e12fd3b72} + Tango.BL + + + {a34ee0f0-649d-41c8-8489-b6f1cc6924ee} + Tango.Core + + + {bc932dbd-7cdb-488c-99e4-f02cf441f55e} + Tango.Logging + + + {d8f1ad85-526a-4f50-b6dc-d437af63d8d8} + Tango.Settings + + + {8491D07B-C1F6-4B62-A412-41B9FD2D6538} + Tango.SharedUI + + + {74e700b0-1156-4126-be40-ee450d3c3026} + Tango.Transport + + + {cb0b0aa2-bb24-4bca-a720-45e397684e12} + Tango.MachineStudio.Common + + + + + + + \ No newline at end of file diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/ThreadExtensionsModule.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/ThreadExtensionsModule.cs new file mode 100644 index 000000000..4f949821d --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/ThreadExtensionsModule.cs @@ -0,0 +1,62 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Media.Imaging; +using Tango.BL.Enumerations; +using Tango.MachineStudio.Common; +using Tango.MachineStudio.ThreadExtensions.Views; +using Tango.SharedUI.Helpers; + +namespace Tango.MachineStudio.ThreadExtensions +{ + [StudioModule(25)] + public class ThreadExtensionsModule : StudioModuleBase + { + public override string Name + { + get + { + return "RML Extensions"; + } + } + + public override string Description + { + get + { + return "RML extensions and data collection."; + } + } + + public override BitmapSource Image + { + get + { + return ResourceHelper.GetImageFromResources("Images/Fabric.jpg"); + } + } + + public override Type MainViewType + { + get + { + return typeof(MainView); + } + } + + public override Permissions Permission + { + get + { + return Permissions.RunMachineStudio; + } + } + + public override void Dispose() + { + + } + } +} diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/ViewModelLocator.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/ViewModelLocator.cs new file mode 100644 index 000000000..bd1b1dcb2 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/ViewModelLocator.cs @@ -0,0 +1,29 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Tango.Core.DI; +using Tango.MachineStudio.ThreadExtensions.ViewModels; + +namespace Tango.MachineStudio.ThreadExtensions +{ + public static class ViewModelLocator + { + /// + /// Initializes a new instance of the ViewModelLocator class. + /// + static ViewModelLocator() + { + TangoIOC.Default.Register(); + } + + public static MainViewVM MainViewVM + { + get + { + return TangoIOC.Default.GetInstance(); + } + } + } +} 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 new file mode 100644 index 000000000..607670461 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/ViewModels/MainViewVM.cs @@ -0,0 +1,18 @@ + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Tango.MachineStudio.Common; + +namespace Tango.MachineStudio.ThreadExtensions.ViewModels +{ + public class MainViewVM : StudioViewModel + { + public override void OnApplicationReady() + { + + } + } +} diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/MainView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/MainView.xaml new file mode 100644 index 000000000..b446c7cc7 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/MainView.xaml @@ -0,0 +1,15 @@ + + + Thread Extensions + + diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/MainView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/MainView.xaml.cs new file mode 100644 index 000000000..863a96398 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/MainView.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 +{ + /// + /// Interaction logic for MainView.xaml + /// + public partial class MainView : UserControl + { + public MainView() + { + InitializeComponent(); + } + } +} diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/app.config b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/app.config new file mode 100644 index 000000000..97a204217 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/app.config @@ -0,0 +1,75 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/packages.config b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/packages.config new file mode 100644 index 000000000..fd88f4804 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/packages.config @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file -- cgit v1.3.1 From b29f337cff7513e0fe0e4b98e6bc7970da89e837 Mon Sep 17 00:00:00 2001 From: Victoria Plitt Date: Mon, 24 May 2021 17:07:45 +0300 Subject: Created a new project Tango.MachineStudio.ThreadExtentions. Changes in Database. --- .../Tango.MachineStudio.ThreadExtensions/App.xaml | 12 + .../Contracts/IMainView.cs | 20 + .../Converters/ColorNameToBrushConverter.cs | 42 + .../Images/threads.png | Bin 0 -> 315399 bytes .../Models/ColorDataExcelModel.cs | 39 + .../Models/FactorTarget.cs | 38 + .../Models/PlotProperties.cs | 169 ++ .../Tango.MachineStudio.ThreadExtensions.csproj | 66 +- .../ViewModels/ColorParametersVewVM.cs | 788 +++++++++ .../ViewModels/MainViewVM.cs | 528 +++++- .../Views/ColorParametersView.xaml | 474 +++++ .../Views/ColorParametersView.xaml.cs | 44 + .../Views/MainView.xaml | 6 +- .../Views/MainView.xaml.cs | 10 +- .../Views/ThreadCharacteristicsView.xaml | 195 +++ .../Views/ThreadCharacteristicsView.xaml.cs | 28 + .../Views/ThreadExtensionView.xaml | 61 + .../Views/ThreadExtensionView.xaml.cs | 27 + .../Views/ThreadExtensionsView.xaml | 103 ++ .../Views/ThreadExtensionsView.xaml.cs | 27 + .../app.config | 10 + .../packages.config | 3 + .../Builders/ColorProcessParametersBuilder.cs | 41 + .../Builders/RMLExtentionsCollectionBuilder.cs | 65 + .../Tango.BL/Builders/RmlExtensionsBuilder.cs | 44 + .../Tango.BL/DTO/ColorProcessDataDTO.cs | 14 + .../Tango.BL/DTO/ColorProcessDataDTOBase.cs | 73 + .../Tango.BL/DTO/ColorProcessFactorDTO.cs | 14 + .../Tango.BL/DTO/ColorProcessFactorDTOBase.cs | 81 + .../Tango.BL/DTO/ColorProcessParameterDTO.cs | 14 + .../Tango.BL/DTO/ColorProcessParameterDTOBase.cs | 57 + .../Tango.BL/DTO/RmlsExtensionDTOBase.cs | 272 ++- .../Tango.BL/DTO/YarnApplicationDTO.cs | 14 + .../Tango.BL/DTO/YarnApplicationDTOBase.cs | 33 + .../Visual_Studio/Tango.BL/DTO/YarnBrandDTO.cs | 14 + .../Visual_Studio/Tango.BL/DTO/YarnBrandDTOBase.cs | 33 + .../Visual_Studio/Tango.BL/DTO/YarnColorDTO.cs | 14 + .../Visual_Studio/Tango.BL/DTO/YarnColorDTOBase.cs | 33 + .../Visual_Studio/Tango.BL/DTO/YarnEndUseDTO.cs | 14 + .../Tango.BL/DTO/YarnEndUseDTOBase.cs | 33 + .../Visual_Studio/Tango.BL/DTO/YarnFamilyDTO.cs | 14 + .../Tango.BL/DTO/YarnFamilyDTOBase.cs | 33 + .../Visual_Studio/Tango.BL/DTO/YarnGeometryDTO.cs | 14 + .../Tango.BL/DTO/YarnGeometryDTOBase.cs | 33 + .../Tango.BL/DTO/YarnGlossLevelDTO.cs | 14 + .../Tango.BL/DTO/YarnGlossLevelDTOBase.cs | 33 + .../Visual_Studio/Tango.BL/DTO/YarnGroupDTO.cs | 14 + .../Visual_Studio/Tango.BL/DTO/YarnGroupDTOBase.cs | 33 + .../Tango.BL/DTO/YarnIndustrysectorDTO.cs | 14 + .../Tango.BL/DTO/YarnIndustrysectorDTOBase.cs | 33 + .../Tango.BL/DTO/YarnManufacturerDTO.cs | 14 + .../Tango.BL/DTO/YarnManufacturerDTOBase.cs | 33 + .../Visual_Studio/Tango.BL/DTO/YarnMaterialDTO.cs | 14 + .../Tango.BL/DTO/YarnMaterialDTOBase.cs | 33 + .../Visual_Studio/Tango.BL/DTO/YarnSubFamilyDTO.cs | 14 + .../Tango.BL/DTO/YarnSubFamilyDTOBase.cs | 33 + .../Visual_Studio/Tango.BL/DTO/YarnTexturingDTO.cs | 14 + .../Tango.BL/DTO/YarnTexturingDTOBase.cs | 33 + Software/Visual_Studio/Tango.BL/DTO/YarnTypeDTO.cs | 14 + .../Visual_Studio/Tango.BL/DTO/YarnTypeDTOBase.cs | 33 + .../Tango.BL/Entities/ColorProcessData.cs | 24 + .../Tango.BL/Entities/ColorProcessDataBase.cs | 296 ++++ .../Tango.BL/Entities/ColorProcessFactor.cs | 18 + .../Tango.BL/Entities/ColorProcessFactorBase.cs | 334 ++++ .../Tango.BL/Entities/ColorProcessParameter.cs | 32 + .../Tango.BL/Entities/ColorProcessParameterBase.cs | 297 ++++ .../Visual_Studio/Tango.BL/Entities/RmlBase.cs | 38 + .../Tango.BL/Entities/RmlsExtension.cs | 143 +- .../Tango.BL/Entities/RmlsExtensionBase.cs | 1841 +++++++++++++++++++- .../Visual_Studio/Tango.BL/Entities/UserBase.cs | 38 + .../Tango.BL/Entities/YarnApplication.cs | 16 + .../Tango.BL/Entities/YarnApplicationBase.cs | 114 ++ .../Visual_Studio/Tango.BL/Entities/YarnBrand.cs | 16 + .../Tango.BL/Entities/YarnBrandBase.cs | 114 ++ .../Visual_Studio/Tango.BL/Entities/YarnColor.cs | 16 + .../Tango.BL/Entities/YarnColorBase.cs | 114 ++ .../Visual_Studio/Tango.BL/Entities/YarnEndUse.cs | 16 + .../Tango.BL/Entities/YarnEndUseBase.cs | 114 ++ .../Visual_Studio/Tango.BL/Entities/YarnFamily.cs | 16 + .../Tango.BL/Entities/YarnFamilyBase.cs | 114 ++ .../Tango.BL/Entities/YarnGeometry.cs | 16 + .../Tango.BL/Entities/YarnGeometryBase.cs | 114 ++ .../Tango.BL/Entities/YarnGlossLevel.cs | 16 + .../Tango.BL/Entities/YarnGlossLevelBase.cs | 114 ++ .../Visual_Studio/Tango.BL/Entities/YarnGroup.cs | 16 + .../Tango.BL/Entities/YarnGroupBase.cs | 114 ++ .../Tango.BL/Entities/YarnIndustrysector.cs | 12 + .../Tango.BL/Entities/YarnIndustrysectorBase.cs | 114 ++ .../Tango.BL/Entities/YarnManufacturer.cs | 16 + .../Tango.BL/Entities/YarnManufacturerBase.cs | 114 ++ .../Tango.BL/Entities/YarnMaterial.cs | 16 + .../Tango.BL/Entities/YarnMaterialBase.cs | 114 ++ .../Tango.BL/Entities/YarnSubFamily.cs | 16 + .../Tango.BL/Entities/YarnSubFamilyBase.cs | 114 ++ .../Tango.BL/Entities/YarnTexturing.cs | 16 + .../Tango.BL/Entities/YarnTexturingBase.cs | 114 ++ .../Visual_Studio/Tango.BL/Entities/YarnType.cs | 16 + .../Tango.BL/Entities/YarnTypeBase.cs | 114 ++ .../Visual_Studio/Tango.BL/Enumerations/Plies.cs | 25 + .../Tango.BL/Enumerations/TwistDirections.cs | 15 + .../Tango.BL/Enumerations/YarnUnits.cs | 21 + .../Visual_Studio/Tango.BL/ObservablesContext.cs | 136 ++ .../ObservablesEntitiesAdapterExtension.cs | 646 +++++++ .../ObservablesStaticCollectionsExtension.cs | 646 +++++++ Software/Visual_Studio/Tango.BL/Tango.BL.csproj | 76 +- .../Tango.DAL.Remote/DB/COLOR_PROCESS_DATA.cs | 29 + .../Tango.DAL.Remote/DB/COLOR_PROCESS_FACTOR.cs | 30 + .../DB/COLOR_PROCESS_PARAMETERS.cs | 38 + Software/Visual_Studio/Tango.DAL.Remote/DB/RML.cs | 3 + .../Tango.DAL.Remote/DB/RMLS_EXTENSIONS.cs | 62 +- .../Tango.DAL.Remote/DB/RemoteADO.Context.cs | 17 + .../Tango.DAL.Remote/DB/RemoteADO.edmx | 1361 ++++++++++++++- .../Tango.DAL.Remote/DB/RemoteADO.edmx.diagram | 214 ++- Software/Visual_Studio/Tango.DAL.Remote/DB/USER.cs | 3 + .../Tango.DAL.Remote/DB/YARN_APPLICATIONS.cs | 31 + .../Tango.DAL.Remote/DB/YARN_BRAND.cs | 31 + .../Tango.DAL.Remote/DB/YARN_COLOR.cs | 31 + .../Tango.DAL.Remote/DB/YARN_END_USE.cs | 31 + .../Tango.DAL.Remote/DB/YARN_FAMILY.cs | 31 + .../Tango.DAL.Remote/DB/YARN_GEOMETRY.cs | 31 + .../Tango.DAL.Remote/DB/YARN_GLOSS_LEVEL.cs | 31 + .../Tango.DAL.Remote/DB/YARN_GROUP.cs | 31 + .../Tango.DAL.Remote/DB/YARN_INDUSTRYSECTOR.cs | 31 + .../Tango.DAL.Remote/DB/YARN_MANUFACTURER.cs | 31 + .../Tango.DAL.Remote/DB/YARN_MATERIALS.cs | 31 + .../Tango.DAL.Remote/DB/YARN_SUB_FAMILY.cs | 31 + .../Tango.DAL.Remote/DB/YARN_TEXTURING.cs | 31 + .../Visual_Studio/Tango.DAL.Remote/DB/YARN_TYPE.cs | 31 + .../Tango.DAL.Remote/Tango.DAL.Remote.csproj | 53 +- 129 files changed, 12556 insertions(+), 153 deletions(-) create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/App.xaml create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Contracts/IMainView.cs create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Converters/ColorNameToBrushConverter.cs create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Images/threads.png create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Models/ColorDataExcelModel.cs create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Models/FactorTarget.cs create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Models/PlotProperties.cs create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/ViewModels/ColorParametersVewVM.cs create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/ColorParametersView.xaml create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/ColorParametersView.xaml.cs create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/ThreadCharacteristicsView.xaml create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/ThreadCharacteristicsView.xaml.cs create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/ThreadExtensionView.xaml create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/ThreadExtensionView.xaml.cs create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/ThreadExtensionsView.xaml create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/ThreadExtensionsView.xaml.cs create mode 100644 Software/Visual_Studio/Tango.BL/Builders/ColorProcessParametersBuilder.cs create mode 100644 Software/Visual_Studio/Tango.BL/Builders/RMLExtentionsCollectionBuilder.cs create mode 100644 Software/Visual_Studio/Tango.BL/Builders/RmlExtensionsBuilder.cs create mode 100644 Software/Visual_Studio/Tango.BL/DTO/ColorProcessDataDTO.cs create mode 100644 Software/Visual_Studio/Tango.BL/DTO/ColorProcessDataDTOBase.cs create mode 100644 Software/Visual_Studio/Tango.BL/DTO/ColorProcessFactorDTO.cs create mode 100644 Software/Visual_Studio/Tango.BL/DTO/ColorProcessFactorDTOBase.cs create mode 100644 Software/Visual_Studio/Tango.BL/DTO/ColorProcessParameterDTO.cs create mode 100644 Software/Visual_Studio/Tango.BL/DTO/ColorProcessParameterDTOBase.cs create mode 100644 Software/Visual_Studio/Tango.BL/DTO/YarnApplicationDTO.cs create mode 100644 Software/Visual_Studio/Tango.BL/DTO/YarnApplicationDTOBase.cs create mode 100644 Software/Visual_Studio/Tango.BL/DTO/YarnBrandDTO.cs create mode 100644 Software/Visual_Studio/Tango.BL/DTO/YarnBrandDTOBase.cs create mode 100644 Software/Visual_Studio/Tango.BL/DTO/YarnColorDTO.cs create mode 100644 Software/Visual_Studio/Tango.BL/DTO/YarnColorDTOBase.cs create mode 100644 Software/Visual_Studio/Tango.BL/DTO/YarnEndUseDTO.cs create mode 100644 Software/Visual_Studio/Tango.BL/DTO/YarnEndUseDTOBase.cs create mode 100644 Software/Visual_Studio/Tango.BL/DTO/YarnFamilyDTO.cs create mode 100644 Software/Visual_Studio/Tango.BL/DTO/YarnFamilyDTOBase.cs create mode 100644 Software/Visual_Studio/Tango.BL/DTO/YarnGeometryDTO.cs create mode 100644 Software/Visual_Studio/Tango.BL/DTO/YarnGeometryDTOBase.cs create mode 100644 Software/Visual_Studio/Tango.BL/DTO/YarnGlossLevelDTO.cs create mode 100644 Software/Visual_Studio/Tango.BL/DTO/YarnGlossLevelDTOBase.cs create mode 100644 Software/Visual_Studio/Tango.BL/DTO/YarnGroupDTO.cs create mode 100644 Software/Visual_Studio/Tango.BL/DTO/YarnGroupDTOBase.cs create mode 100644 Software/Visual_Studio/Tango.BL/DTO/YarnIndustrysectorDTO.cs create mode 100644 Software/Visual_Studio/Tango.BL/DTO/YarnIndustrysectorDTOBase.cs create mode 100644 Software/Visual_Studio/Tango.BL/DTO/YarnManufacturerDTO.cs create mode 100644 Software/Visual_Studio/Tango.BL/DTO/YarnManufacturerDTOBase.cs create mode 100644 Software/Visual_Studio/Tango.BL/DTO/YarnMaterialDTO.cs create mode 100644 Software/Visual_Studio/Tango.BL/DTO/YarnMaterialDTOBase.cs create mode 100644 Software/Visual_Studio/Tango.BL/DTO/YarnSubFamilyDTO.cs create mode 100644 Software/Visual_Studio/Tango.BL/DTO/YarnSubFamilyDTOBase.cs create mode 100644 Software/Visual_Studio/Tango.BL/DTO/YarnTexturingDTO.cs create mode 100644 Software/Visual_Studio/Tango.BL/DTO/YarnTexturingDTOBase.cs create mode 100644 Software/Visual_Studio/Tango.BL/DTO/YarnTypeDTO.cs create mode 100644 Software/Visual_Studio/Tango.BL/DTO/YarnTypeDTOBase.cs create mode 100644 Software/Visual_Studio/Tango.BL/Entities/ColorProcessData.cs create mode 100644 Software/Visual_Studio/Tango.BL/Entities/ColorProcessDataBase.cs create mode 100644 Software/Visual_Studio/Tango.BL/Entities/ColorProcessFactor.cs create mode 100644 Software/Visual_Studio/Tango.BL/Entities/ColorProcessFactorBase.cs create mode 100644 Software/Visual_Studio/Tango.BL/Entities/ColorProcessParameter.cs create mode 100644 Software/Visual_Studio/Tango.BL/Entities/ColorProcessParameterBase.cs create mode 100644 Software/Visual_Studio/Tango.BL/Entities/YarnApplication.cs create mode 100644 Software/Visual_Studio/Tango.BL/Entities/YarnApplicationBase.cs create mode 100644 Software/Visual_Studio/Tango.BL/Entities/YarnBrand.cs create mode 100644 Software/Visual_Studio/Tango.BL/Entities/YarnBrandBase.cs create mode 100644 Software/Visual_Studio/Tango.BL/Entities/YarnColor.cs create mode 100644 Software/Visual_Studio/Tango.BL/Entities/YarnColorBase.cs create mode 100644 Software/Visual_Studio/Tango.BL/Entities/YarnEndUse.cs create mode 100644 Software/Visual_Studio/Tango.BL/Entities/YarnEndUseBase.cs create mode 100644 Software/Visual_Studio/Tango.BL/Entities/YarnFamily.cs create mode 100644 Software/Visual_Studio/Tango.BL/Entities/YarnFamilyBase.cs create mode 100644 Software/Visual_Studio/Tango.BL/Entities/YarnGeometry.cs create mode 100644 Software/Visual_Studio/Tango.BL/Entities/YarnGeometryBase.cs create mode 100644 Software/Visual_Studio/Tango.BL/Entities/YarnGlossLevel.cs create mode 100644 Software/Visual_Studio/Tango.BL/Entities/YarnGlossLevelBase.cs create mode 100644 Software/Visual_Studio/Tango.BL/Entities/YarnGroup.cs create mode 100644 Software/Visual_Studio/Tango.BL/Entities/YarnGroupBase.cs create mode 100644 Software/Visual_Studio/Tango.BL/Entities/YarnIndustrysector.cs create mode 100644 Software/Visual_Studio/Tango.BL/Entities/YarnIndustrysectorBase.cs create mode 100644 Software/Visual_Studio/Tango.BL/Entities/YarnManufacturer.cs create mode 100644 Software/Visual_Studio/Tango.BL/Entities/YarnManufacturerBase.cs create mode 100644 Software/Visual_Studio/Tango.BL/Entities/YarnMaterial.cs create mode 100644 Software/Visual_Studio/Tango.BL/Entities/YarnMaterialBase.cs create mode 100644 Software/Visual_Studio/Tango.BL/Entities/YarnSubFamily.cs create mode 100644 Software/Visual_Studio/Tango.BL/Entities/YarnSubFamilyBase.cs create mode 100644 Software/Visual_Studio/Tango.BL/Entities/YarnTexturing.cs create mode 100644 Software/Visual_Studio/Tango.BL/Entities/YarnTexturingBase.cs create mode 100644 Software/Visual_Studio/Tango.BL/Entities/YarnType.cs create mode 100644 Software/Visual_Studio/Tango.BL/Entities/YarnTypeBase.cs create mode 100644 Software/Visual_Studio/Tango.BL/Enumerations/Plies.cs create mode 100644 Software/Visual_Studio/Tango.BL/Enumerations/TwistDirections.cs create mode 100644 Software/Visual_Studio/Tango.BL/Enumerations/YarnUnits.cs create mode 100644 Software/Visual_Studio/Tango.DAL.Remote/DB/COLOR_PROCESS_DATA.cs create mode 100644 Software/Visual_Studio/Tango.DAL.Remote/DB/COLOR_PROCESS_FACTOR.cs create mode 100644 Software/Visual_Studio/Tango.DAL.Remote/DB/COLOR_PROCESS_PARAMETERS.cs create mode 100644 Software/Visual_Studio/Tango.DAL.Remote/DB/YARN_APPLICATIONS.cs create mode 100644 Software/Visual_Studio/Tango.DAL.Remote/DB/YARN_BRAND.cs create mode 100644 Software/Visual_Studio/Tango.DAL.Remote/DB/YARN_COLOR.cs create mode 100644 Software/Visual_Studio/Tango.DAL.Remote/DB/YARN_END_USE.cs create mode 100644 Software/Visual_Studio/Tango.DAL.Remote/DB/YARN_FAMILY.cs create mode 100644 Software/Visual_Studio/Tango.DAL.Remote/DB/YARN_GEOMETRY.cs create mode 100644 Software/Visual_Studio/Tango.DAL.Remote/DB/YARN_GLOSS_LEVEL.cs create mode 100644 Software/Visual_Studio/Tango.DAL.Remote/DB/YARN_GROUP.cs create mode 100644 Software/Visual_Studio/Tango.DAL.Remote/DB/YARN_INDUSTRYSECTOR.cs create mode 100644 Software/Visual_Studio/Tango.DAL.Remote/DB/YARN_MANUFACTURER.cs create mode 100644 Software/Visual_Studio/Tango.DAL.Remote/DB/YARN_MATERIALS.cs create mode 100644 Software/Visual_Studio/Tango.DAL.Remote/DB/YARN_SUB_FAMILY.cs create mode 100644 Software/Visual_Studio/Tango.DAL.Remote/DB/YARN_TEXTURING.cs create mode 100644 Software/Visual_Studio/Tango.DAL.Remote/DB/YARN_TYPE.cs (limited to 'Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions') diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/App.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/App.xaml new file mode 100644 index 000000000..6925f5a1b --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/App.xaml @@ -0,0 +1,12 @@ + + + + + + + + + + diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Contracts/IMainView.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Contracts/IMainView.cs new file mode 100644 index 000000000..0f432eefb --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Contracts/IMainView.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Tango.SharedUI; + +namespace Tango.MachineStudio.ThreadExtensions.Contracts +{ + public enum ThreadExtensionNavigationView + { + ThreadExtentionView, + ThreadExtensionsView, + } + + public interface IMainView : IView + { + void NavigateTo(ThreadExtensionNavigationView view); + } +} diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Converters/ColorNameToBrushConverter.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Converters/ColorNameToBrushConverter.cs new file mode 100644 index 000000000..c9e246bb8 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Converters/ColorNameToBrushConverter.cs @@ -0,0 +1,42 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Globalization; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Data; +using System.Windows.Media; + +namespace Tango.MachineStudio.ThreadExtensions.Converters +{ + public class ColorNameToBrushConverter : IValueConverter + { + public object Convert(object value, Type targetType, object parameter, CultureInfo culture) + { + try + { + string colorName = value as string; + if(String.IsNullOrEmpty(colorName)) + return new SolidColorBrush(Colors.Transparent); + + Color color = (Color)TypeDescriptor.GetConverter(typeof(Color)).ConvertFromString(colorName); + + SolidColorBrush brush = new SolidColorBrush(color); + brush.Opacity = 0.5; + + return brush; + } + catch + { + return new SolidColorBrush(Colors.Transparent); + } + } + + public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) + { + throw new NotImplementedException(); + } + + } +} diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Images/threads.png b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Images/threads.png new file mode 100644 index 000000000..86eb0b335 Binary files /dev/null and b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Images/threads.png differ diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Models/ColorDataExcelModel.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Models/ColorDataExcelModel.cs new file mode 100644 index 000000000..da7471e16 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Models/ColorDataExcelModel.cs @@ -0,0 +1,39 @@ +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 ColorDataExcelModel + { + public int NlCm { get; set; } + public double L { get; set; } + public double A { get; set; } + public double B { get; set; } + + public ColorDataExcelModel() + { + NlCm = 0; + L = A = B = 0.0; + } + + public static void GetDataFromFile(string fileName, out List items, ref string errors) + { + items = null; + try + { + using (ExcelReader reader = new ExcelReader(fileName)) + { + items = reader.GetDataByIndex("Sheet1", 1); + } + } + catch (Exception ex) + { + errors = ex.Message; + } + } + } +} diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Models/FactorTarget.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Models/FactorTarget.cs new file mode 100644 index 000000000..32f568f5f --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Models/FactorTarget.cs @@ -0,0 +1,38 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Tango.MachineStudio.ThreadExtensions.Models +{ + public static class FactorTarget + { + public static Dictionary FACTOR100 = new Dictionary() { + { "CYAN", 51.95}, {"MAGENTA", 47.47}, { "YELLOW", 94.05}, {"BLACK", 26.58}}; + + public static Dictionary FACTOR200 = new Dictionary() { + { "CYAN", 46.3}, {"MAGENTA", 41.04}, { "YELLOW", 97.78}, {"BLACK", 21.01}}; + + public static double GetFactor100(string color) + { + double result; + + if (FACTOR100.TryGetValue(color, out result)) + { + return result; + } + return 0.0; + } + public static double GetFactor200(string color) + { + double result; + + if (FACTOR200.TryGetValue(color, out result)) + { + return result; + } + return 0.0; + } + } +} diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Models/PlotProperties.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Models/PlotProperties.cs new file mode 100644 index 000000000..47632d3aa --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Models/PlotProperties.cs @@ -0,0 +1,169 @@ +using OxyPlot; +using OxyPlot.Wpf; +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.Linq; +using Tango.BL.Entities; +using Tango.Core; +using Tango.MachineStudio.ThreadExtensions.ViewModels; + +namespace Tango.MachineStudio.ThreadExtensions.Models +{ + public class PlotProperties : ExtendedObject + { + public Plot PlotControl { get; set; } + private IList _points; + + private string _colorName; + + public string ColorName + { + get { return _colorName; } + set { _colorName = value; } + } + + /// + /// Binding to ItemsSource of line chart. + /// + public IList Points + { + get { return _points; } + set + { + _points = value; + RaisePropertyChangedAuto(); + } + } + private IList _target100Points; + /// + /// Binding to ItemsSource of line chart. + /// + public IList Target100Points + { + get { return _target100Points; } + set + { + _target100Points = value; + RaisePropertyChangedAuto(); + } + } + private IList _target200Points; + /// + /// Binding to ItemsSource of line chart. + /// + public IList Target200Points + { + get { return _target200Points; } + set + { + _target200Points = value; + RaisePropertyChangedAuto(); + } + } + private int _step; + public int XStep + { + get { return _step; } + set { _step = value; RaisePropertyChangedAuto(); } + } + + private double _from; + /// + /// From use to binding to bottom axis min value + /// + public double From + { + get { return _from; } + set + { + _from = value; RaisePropertyChangedAuto(); + } + } + + private double _to; + /// + /// To use to binding to bottom axis max value + /// + public double To + { + get { return _to; } + set + { + _to = value; RaisePropertyChangedAuto(); + } + } + + public PlotProperties(string colorName) + { + this.Points = new List(); + Target100Points = new List(); + Target200Points = new List(); + ColorName = colorName; + + } + + public void ClearResults() + { + Points.Clear(); + Target100Points.Clear(); + Target200Points.Clear(); + } + + public void CreateGraph(List points, bool isLtype) + { + if (PlotControl == null) + { + Debug.WriteLine("ERROR!!! CreateGraph. Plot Control is NULL."); + return; + } + + ClearResults(); + PlotControl.InvalidatePlot(true); + + double target100Y = FactorTarget.GetFactor100(ColorName); + double target200Y = FactorTarget.GetFactor200(ColorName); + + _to = target100Y > target200Y? target100Y + 10: target200Y + 10; + _from = target100Y < target200Y ? target100Y - 10 : target200Y - 10; + + foreach ( var x in points) + { + var point = new DataPoint(x.InkNlCm, isLtype ? x.L : x.B); + Points.Add(point); + + _to = _to > point.Y ? _to : point.Y; + _from = ( _from == 0 || _from > point.Y ) ? point.Y : _from; + + } + if (points.Count > 1) + { + var minInkNlCm = points.Min(n => n.InkNlCm); + var maxInkNlCm = points.Max(n => n.InkNlCm); + if(! Target100Points.Any(x => x.X == minInkNlCm)) + { + Target100Points.Add(new DataPoint(minInkNlCm, target100Y)); + Target200Points.Add(new DataPoint(minInkNlCm, target200Y)); + } + if (!Target100Points.Any(x => x.X == maxInkNlCm)) + { + Target100Points.Add(new DataPoint(maxInkNlCm, target100Y)); + Target200Points.Add(new DataPoint(maxInkNlCm, target200Y)); + } + } + Debug.WriteLine($"CreateGraph. Count Points {points.Count}"); + + if (_to == 0) + _to = isLtype ? 100 : 128; + if (_from == 0) + _from = isLtype ? 0 : -127; + + RaisePropertyChanged("To"); + RaisePropertyChanged("From"); + XStep = (int)(Points.Count / 6); + + PlotControl.InvalidatePlot(true); + + } + } +} 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 ca27b9a48..6b7204aac 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 @@ -32,6 +32,12 @@ 4 + + ..\..\..\packages\EntityFramework.6.2.0\lib\net45\EntityFramework.dll + + + ..\..\..\packages\EntityFramework.6.2.0\lib\net45\EntityFramework.SqlServer.dll + ..\..\..\packages\Google.Protobuf.3.4.1\lib\net45\Google.Protobuf.dll @@ -47,8 +53,17 @@ ..\..\..\packages\Newtonsoft.Json.9.0.1\lib\net45\Newtonsoft.Json.dll + + ..\..\..\packages\OxyPlot.Core.2.0.0\lib\net45\OxyPlot.dll + + + ..\..\..\packages\OxyPlot.Wpf.2.0.0\lib\net45\OxyPlot.Wpf.dll + + + + ..\..\..\packages\MahApps.Metro.1.5.0\lib\net45\System.Windows.Interactivity.dll @@ -69,16 +84,54 @@ GlobalVersionInfo.cs + + + + + + + + ColorParametersView.xaml + MainView.xaml + + ThreadCharacteristicsView.xaml + + + ThreadExtensionView.xaml + + + ThreadExtensionsView.xaml + + + MSBuild:Compile + Designer + + + Designer + MSBuild:Compile + Designer MSBuild:Compile + + Designer + MSBuild:Compile + + + Designer + MSBuild:Compile + + + MSBuild:Compile + Designer + @@ -105,8 +158,14 @@ Settings.Designer.cs - + + + + + {bb2abb74-ba58-4812-83aa-ec8171f42df4} + Tango.AutoComplete + {f441feee-322a-4943-b566-110e12fd3b72} Tango.BL @@ -115,6 +174,10 @@ {a34ee0f0-649d-41c8-8489-b6f1cc6924ee} Tango.Core + + {ca87a608-7b17-4c98-88f2-42abee10f4c1} + Tango.Documents + {bc932dbd-7cdb-488c-99e4-f02cf441f55e} Tango.Logging @@ -139,5 +202,6 @@ + \ No newline at end of file diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/ViewModels/ColorParametersVewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/ViewModels/ColorParametersVewVM.cs new file mode 100644 index 000000000..b2e677339 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/ViewModels/ColorParametersVewVM.cs @@ -0,0 +1,788 @@ +using OxyPlot; +using OxyPlot.Wpf; +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Collections.Specialized; +using System.ComponentModel; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Tango.BL; +using Tango.BL.ActionLogs; +using Tango.BL.Builders; +using Tango.BL.DTO; +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 System.Diagnostics; + +namespace Tango.MachineStudio.ThreadExtensions.ViewModels +{ + public class ColorParametersVewVM : ViewModel + { + private INotificationProvider _notification; + private IActionLogManager _actionLogManager; + + private ObservablesContext _active_context; + private ObservablesContext _machineDbContext; + // private ColorProcessParameterDTO _hwBeforeSave; + + #region Properties + + private ColorProcessParameter _selectedColorProcessparameter; + /// + /// Gets or sets the selected RML. + /// + public ColorProcessParameter SelectedColorProcessParameter + { + get { return _selectedColorProcessparameter; } + set + { + _selectedColorProcessparameter = value; + RaisePropertyChangedAuto(); + } + } + + private ObservableCollection _magentaProcessData; + public ObservableCollection MagentaProcessData + { + get + { + return _magentaProcessData; + } + set + { + _magentaProcessData = value; + RaisePropertyChangedAuto(); + } + } + + private ObservableCollection _cyanProcessData; + public ObservableCollection CyanProcessData + { + get + { + return _cyanProcessData; + } + set + { + _cyanProcessData = value; + RaisePropertyChangedAuto(); + } + } + + private ObservableCollection _yellowProcessData; + public ObservableCollection YellowProcessData + { + get + { + return _yellowProcessData; + } + set + { + _yellowProcessData = value; + RaisePropertyChangedAuto(); + } + } + + private ObservableCollection _blackProcessData; + public ObservableCollection BlackProcessData + { + get + { + return _blackProcessData; + } + set + { + _blackProcessData = value; + RaisePropertyChangedAuto(); + } + } + + private ObservableCollection _factor100ProcessData; + public ObservableCollection Factor100ProcessData + { + get + { + return _factor100ProcessData; + } + set + { + _factor100ProcessData = value; + RaisePropertyChangedAuto(); + } + } + + private ObservableCollection _factor200ProcessData; + public ObservableCollection Factor200ProcessData + { + get + { + return _factor200ProcessData; + } + set + { + _factor200ProcessData = value; + RaisePropertyChangedAuto(); + } + } + + private ObservableCollection _minInkUptake; + public ObservableCollection MinInkUptake + { + get + { + return _minInkUptake; + } + set + { + _minInkUptake = value; + RaisePropertyChangedAuto(); + } + } + + private ObservableCollection _maxInkUptake; + public ObservableCollection MaxInkUptake + { + get + { + return _maxInkUptake; + } + set + { + _maxInkUptake = value; + RaisePropertyChangedAuto(); + } + } + + + private PlotProperties _cyanPlot; + + public PlotProperties CyanPlot + { + get { return _cyanPlot; } + set { + _cyanPlot = value; + RaisePropertyChangedAuto(); + } + } + + private PlotProperties _magentaPlot; + + public PlotProperties MagentaPlot + { + get { return _magentaPlot; } + set { _magentaPlot = value; } + } + + private PlotProperties _yellowPlot; + + public PlotProperties YellowPlot + { + get { return _yellowPlot; } + set { _yellowPlot = value; } + } + + private PlotProperties _blackPlot; + + public PlotProperties BlackPlot + { + get { return _blackPlot; } + set { _blackPlot = value; } + } + /// + /// Gets or sets the machines providers. + /// + public ISuggestionProvider MachinesProvider { get; set; } + + protected Machine _selectedMachine; + /// + /// Gets or sets the selected machine. + /// + public Machine SelectedMachine + { + get { return _selectedMachine; } + set + { + if (value != null && _selectedMachine != value) + { + _selectedMachine = value; + RaisePropertyChangedAuto(); + InvalidateRelayCommands(); + } + } + } + + private bool _isViewLoaded; + /// + /// Gets or sets a value indicating whether this instance is view loaded. Used to update charts. + /// + /// + /// true if this instance is view loaded; otherwise, false. + /// + public bool IsViewLoaded + { + get { return _isViewLoaded; } + set { + if(_isViewLoaded != value) + { + _isViewLoaded = value; + } + } + } + + private Dictionary _removedColorProcessDataBeforeSave; + + public Dictionary RemovedColorProcessDataBeforeSave + { + get { return _removedColorProcessDataBeforeSave; } + set { _removedColorProcessDataBeforeSave = value; } + } + + #endregion + #region commands + + public RelayCommand ImportCyanDataCommand { get; set; } + public RelayCommand ImportMagentaDataCommand { get; set; } + public RelayCommand ImportYellowDataCommand { get; set; } + public RelayCommand ImportBlackDataCommand { get; set; } + + private void ImportMagentaData(object obj) + { + List items; + if (LoadColorDataFromExcel(out items) && items != null) + { + MagentaProcessData.Clear(); + items.ForEach(x => MagentaProcessData.Add(new ColorProcessData() { InkNlCm = x.NlCm, L = x.L, A = x.A, B = x.B, ColorProcessParametersGuid = SelectedColorProcessParameter.Guid})); + MagentaPlot.CreateGraph(MagentaProcessData.ToList(), true); + UpdateFactorsOnChangeProcessData("MAGENTA"); + } + } + + private void ImportYellowData(object obj) + { + List items; + if (LoadColorDataFromExcel(out items) && items != null) + { + YellowProcessData.Clear(); + items.ForEach(x => YellowProcessData.Add(new ColorProcessData() { InkNlCm = x.NlCm, L = x.L, A = x.A, B = x.B, ColorProcessParametersGuid = SelectedColorProcessParameter.Guid})); + YellowPlot.CreateGraph(YellowProcessData.ToList(), false); + UpdateFactorsOnChangeProcessData("YELLOW"); + } + } + + private void ImportCyanData(object obj) + { + List items; + if (LoadColorDataFromExcel(out items) && items != null) + { + CyanProcessData.Clear(); + items.ForEach(x => CyanProcessData.Add(new ColorProcessData() { InkNlCm = x.NlCm, L = x.L, A = x.A, B = x.B, ColorProcessParametersGuid = SelectedColorProcessParameter.Guid })); + CyanPlot.CreateGraph(CyanProcessData.ToList(), true); + UpdateFactorsOnChangeProcessData("CYAN"); + } + } + + private void ImportBlackData(object obj) + { + List items; + if (LoadColorDataFromExcel(out items) && items != null) + { + BlackProcessData.Clear(); + items.ForEach(x => BlackProcessData.Add(new ColorProcessData() { InkNlCm = x.NlCm, L = x.L, A = x.A, B = x.B, ColorProcessParametersGuid = SelectedColorProcessParameter.Guid })); + BlackPlot.CreateGraph(BlackProcessData.ToList(), true); + UpdateFactorsOnChangeProcessData("BLACK"); + } + } + + private bool LoadColorDataFromExcel(out List items) + { + OpenFileDialog dlg = new OpenFileDialog(); + items = null; + try + { + dlg.Title = $"Import excel file with data"; + dlg.Filter = "Excel Files|*.xlsx"; + if (dlg.ShowDialog().Value) + { + string error = ""; + ColorDataExcelModel.GetDataFromFile(dlg.FileName, out items, ref error); + if (false == String.IsNullOrEmpty(error) || 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; + } + } + catch (Exception ex) + { + LogManager.Log(ex, "Error importing excel file " + dlg.FileName); + _notification.ShowError("An error occurred while trying to import the selected excel file. Please check the file format if valid and is available to read."); + } + return false; + } + + #endregion + + public ColorParametersVewVM(INotificationProvider notification, IActionLogManager actionLogManager) + { + _notification = notification; + _actionLogManager = actionLogManager; + _isViewLoaded = false; + RemovedColorProcessDataBeforeSave = new Dictionary(); + + MachinesProvider = new SuggestionProvider((filter) => + { + try + { + return _machineDbContext.Machines.Where(x => x.SerialNumber.StartsWith(filter)).ToList(); + } + catch + { + return null; + } + }); + + CyanProcessData = new ObservableCollection(); + CyanProcessData.CollectionChanged += OnCyanCollectionChanged; + + MagentaProcessData = new ObservableCollection(); + MagentaProcessData.CollectionChanged += OnMagentaCollectionChanged; + + YellowProcessData = new ObservableCollection(); + YellowProcessData.CollectionChanged += OnYellowCollectionChanged; + + BlackProcessData = new ObservableCollection(); + BlackProcessData.CollectionChanged += OnBlackCollectionChanged; + + CyanPlot = new PlotProperties("CYAN"); + YellowPlot = new PlotProperties("YELLOW"); + MagentaPlot = new PlotProperties("MAGENTA"); + BlackPlot = new PlotProperties("BLACK"); + + ImportCyanDataCommand = new RelayCommand(ImportCyanData); + ImportMagentaDataCommand = new RelayCommand(ImportMagentaData); + ImportYellowDataCommand = new RelayCommand(ImportYellowData); + ImportBlackDataCommand = new RelayCommand(ImportBlackData); + } + + #region Loading + + public async void LoadColorParameters(string RMLExtemtionGUID) + { + IsFree = false; + if (_active_context != null) + { + _active_context.Dispose(); + } + if (_machineDbContext != null) + { + _machineDbContext.Dispose(); + } + + + LogManager.Log("Initializing machine Db context..."); + + _machineDbContext = ObservablesContext.CreateDefault(); + + + _active_context = ObservablesContext.CreateDefault(); + + await Task.Factory.StartNew(() => + { + using (_notification.PushTaskItem("Loading Color Process Parameters ...")) + { + + var currentcolorProcessParameter = _active_context.ColorProcessParameters.Where(x => x.RmlsExtensionsGuid == RMLExtemtionGUID).FirstOrDefault(); + if(currentcolorProcessParameter != null) + { + SelectedColorProcessParameter = new ColorProcessParametersBuilder(_active_context).Set(currentcolorProcessParameter.Guid).WithColorProcessData().WithColorProcessFactor(). Build(); + } + + if (SelectedColorProcessParameter == null) + { + SelectedColorProcessParameter = new ColorProcessParameter() { RmlsExtensionsGuid = RMLExtemtionGUID }; + SelectedColorProcessParameter.WhitePointL = 0.0; + SelectedColorProcessParameter.WhitePointA = 0.0; + SelectedColorProcessParameter.WhitePointB = 0.0; + SelectedColorProcessParameter.ColorProcessFactor.Add(new ColorProcessFactor() { ColorName = "CYAN", FactorPercent = 100, ColorProcessParametersGuid = SelectedColorProcessParameter.Guid }); + SelectedColorProcessParameter.ColorProcessFactor.Add(new ColorProcessFactor() { ColorName = "MAGENTA", FactorPercent = 100, ColorProcessParametersGuid = SelectedColorProcessParameter.Guid }); + SelectedColorProcessParameter.ColorProcessFactor.Add(new ColorProcessFactor() { ColorName = "YELLOW", FactorPercent = 100, ColorProcessParametersGuid = SelectedColorProcessParameter.Guid }); + SelectedColorProcessParameter.ColorProcessFactor.Add(new ColorProcessFactor() { ColorName = "BLACK", FactorPercent = 100, ColorProcessParametersGuid = SelectedColorProcessParameter.Guid }); + SelectedColorProcessParameter.ColorProcessFactor.Add(new ColorProcessFactor() { ColorName = "CYAN", FactorPercent = 200, ColorProcessParametersGuid = SelectedColorProcessParameter.Guid }); + SelectedColorProcessParameter.ColorProcessFactor.Add(new ColorProcessFactor() { ColorName = "MAGENTA", FactorPercent = 200, ColorProcessParametersGuid = SelectedColorProcessParameter.Guid }); + SelectedColorProcessParameter.ColorProcessFactor.Add(new ColorProcessFactor() { ColorName = "YELLOW", FactorPercent = 200, ColorProcessParametersGuid = SelectedColorProcessParameter.Guid }); + SelectedColorProcessParameter.ColorProcessFactor.Add(new ColorProcessFactor() { ColorName = "BLACK", FactorPercent = 200, ColorProcessParametersGuid = SelectedColorProcessParameter.Guid }); + SelectedColorProcessParameter.ColorProcessFactor.Add(new ColorProcessFactor() { ColorName = "CYAN", FactorPercent = 1, ColorProcessParametersGuid = SelectedColorProcessParameter.Guid }); + SelectedColorProcessParameter.ColorProcessFactor.Add(new ColorProcessFactor() { ColorName = "MAGENTA", FactorPercent = 1, ColorProcessParametersGuid = SelectedColorProcessParameter.Guid }); + SelectedColorProcessParameter.ColorProcessFactor.Add(new ColorProcessFactor() { ColorName = "YELLOW", FactorPercent = 1, ColorProcessParametersGuid = SelectedColorProcessParameter.Guid }); + SelectedColorProcessParameter.ColorProcessFactor.Add(new ColorProcessFactor() { ColorName = "BLACK", FactorPercent = 1, ColorProcessParametersGuid = SelectedColorProcessParameter.Guid }); + SelectedColorProcessParameter.ColorProcessFactor.Add(new ColorProcessFactor() { ColorName = "CYAN", FactorPercent = 1111, ColorProcessParametersGuid = SelectedColorProcessParameter.Guid }); + SelectedColorProcessParameter.ColorProcessFactor.Add(new ColorProcessFactor() { ColorName = "MAGENTA", FactorPercent = 1111, ColorProcessParametersGuid = SelectedColorProcessParameter.Guid }); + SelectedColorProcessParameter.ColorProcessFactor.Add(new ColorProcessFactor() { ColorName = "YELLOW", FactorPercent = 1111, ColorProcessParametersGuid = SelectedColorProcessParameter.Guid }); + SelectedColorProcessParameter.ColorProcessFactor.Add(new ColorProcessFactor() { ColorName = "BLACK", FactorPercent = 1111, ColorProcessParametersGuid = SelectedColorProcessParameter.Guid }); + _active_context.ColorProcessParameters.Add(SelectedColorProcessParameter); + _active_context.SaveChangesAsync(); + } + + } + }); + + LoadParameters(); + IsFree = true; + } + + private void LoadParameters() + { + Factor100ProcessData = SelectedColorProcessParameter.ColorProcessFactor.Where(x => x.FactorPercent == 100).ToObservableCollection(); + + Factor200ProcessData = SelectedColorProcessParameter.ColorProcessFactor.Where(x => x.FactorPercent == 200).ToObservableCollection(); + + MinInkUptake = SelectedColorProcessParameter.ColorProcessFactor.Where(x => x.FactorPercent == 1).ToObservableCollection(); + + MaxInkUptake = SelectedColorProcessParameter.ColorProcessFactor.Where(x => x.FactorPercent == 1111).ToObservableCollection(); + + RemovedColorProcessDataBeforeSave.Clear(); + + var cyanDataList = SelectedColorProcessParameter.ColorProcessData.Where(x => x.ColorName == "CYAN").ToList().OrderBy(x => x.InkNlCm ).ToList(); + CyanProcessData.Clear(); + cyanDataList.ForEach( y => CyanProcessData.Add(y)); + + var magentaDatalist = SelectedColorProcessParameter.ColorProcessData.Where(x => x.ColorName == "MAGENTA").ToList().OrderBy(x => x.InkNlCm).ToList(); ; + MagentaProcessData.Clear(); + magentaDatalist.ForEach(y => MagentaProcessData.Add(y)); + + var yellowDatalist = SelectedColorProcessParameter.ColorProcessData.Where(x => x.ColorName == "YELLOW").ToList().OrderBy(x => x.InkNlCm).ToList(); ; + YellowProcessData.Clear(); + yellowDatalist.ForEach(y => YellowProcessData.Add(y)); + + var blackDatalist = SelectedColorProcessParameter.ColorProcessData.Where(x => x.ColorName == "BLACK").ToList().OrderBy(x => x.InkNlCm).ToList(); ; + BlackProcessData.Clear(); + blackDatalist.ForEach(y => BlackProcessData.Add(y)); + + UpdatePlots(); + SelectedColorProcessParameter.ColorProcessFactor.ToList().ForEach(x => UpdateFactorsOnChangeProcessData(x.ColorName)); + } + + #endregion + + #region Update Plot + + public void UpdatePlots() + { + if (IsViewLoaded) + { + CyanPlot.CreateGraph(CyanProcessData.ToList(), true); + MagentaPlot.CreateGraph(MagentaProcessData.ToList(), true); + YellowPlot.CreateGraph(YellowProcessData.ToList(), false); + BlackPlot.CreateGraph(BlackProcessData.ToList(), true); + } + } + + private void OnCyanCollectionChanged(object sender, NotifyCollectionChangedEventArgs e) + { + if (e.Action == NotifyCollectionChangedAction.Reset) + { + var cyanProcessData = SelectedColorProcessParameter.ColorProcessData.Where(x => x.ColorName == "CYAN").ToObservableCollection(); + foreach (ColorProcessData item in cyanProcessData) + { + SelectedColorProcessParameter.ColorProcessData.Remove(item); + RemovedColorProcessDataBeforeSave[item.Guid] = item; + item.PropertyChanged -= CyanMeasurementModelPropertyChanged; + } + // UpdateFactorsOnChangeProcessData("Cyan"); + } + else if (e.Action == NotifyCollectionChangedAction.Remove) + { + foreach (ColorProcessData item in e.OldItems) + { + SelectedColorProcessParameter.ColorProcessData.Remove(item); + RemovedColorProcessDataBeforeSave[item.Guid] = item; + item.PropertyChanged -= CyanMeasurementModelPropertyChanged; + } + UpdateFactorsOnChangeProcessData("CYAN"); + } + else if (e.Action == NotifyCollectionChangedAction.Add) + { + foreach (ColorProcessData item in e.NewItems) + { + item.ColorName = "CYAN"; + item.ColorProcessParametersGuid = SelectedColorProcessParameter.Guid; + SelectedColorProcessParameter.ColorProcessData.Add(item); + RemovedColorProcessDataBeforeSave.Remove(item.Guid); + item.PropertyChanged += CyanMeasurementModelPropertyChanged; + } + } + } + + private void CyanMeasurementModelPropertyChanged(object sender, PropertyChangedEventArgs e) + { + if(IsFree) + { + CyanPlot.CreateGraph(CyanProcessData.ToList(), true); + UpdateFactorsOnChangeProcessData("CYAN"); + } + } + + private void OnMagentaCollectionChanged(object sender, NotifyCollectionChangedEventArgs e) + { + if (e.Action == NotifyCollectionChangedAction.Reset) + { + var magentaProcessData = SelectedColorProcessParameter.ColorProcessData.Where(x => x.ColorName == "MAGENTA").ToObservableCollection(); + foreach (ColorProcessData item in magentaProcessData) + { + item.PropertyChanged -= MagentaMeasurementModelPropertyChanged; + SelectedColorProcessParameter.ColorProcessData.Remove(item); + RemovedColorProcessDataBeforeSave[item.Guid] = item; + } + // UpdateFactorsOnChangeProcessData("Magenta"); + } + else if (e.Action == NotifyCollectionChangedAction.Remove) + { + foreach (ColorProcessData item in e.OldItems) + { + SelectedColorProcessParameter.ColorProcessData.Remove(item); + RemovedColorProcessDataBeforeSave[item.Guid] = item; + item.PropertyChanged -= MagentaMeasurementModelPropertyChanged; + } + UpdateFactorsOnChangeProcessData("MAGENTA"); + } + else if (e.Action == NotifyCollectionChangedAction.Add) + { + foreach (ColorProcessData item in e.NewItems) + { + item.ColorName = "MAGENTA"; + item.ColorProcessParametersGuid = SelectedColorProcessParameter.Guid; + SelectedColorProcessParameter.ColorProcessData.Add(item); + RemovedColorProcessDataBeforeSave.Remove(item.Guid); + item.PropertyChanged += MagentaMeasurementModelPropertyChanged; + } + } + } + + private void MagentaMeasurementModelPropertyChanged(object sender, PropertyChangedEventArgs e) + { + if (IsFree) + { + MagentaPlot.CreateGraph(MagentaProcessData.ToList(), true); + UpdateFactorsOnChangeProcessData("MAGENTA"); + } + } + + private void OnYellowCollectionChanged(object sender, NotifyCollectionChangedEventArgs e) + { + if (e.Action == NotifyCollectionChangedAction.Reset) + { + var yellowProcessData = SelectedColorProcessParameter.ColorProcessData.Where(x => x.ColorName == "YELLOW").ToObservableCollection(); + foreach (ColorProcessData item in yellowProcessData) + { + item.PropertyChanged -= YellowMeasurementModelPropertyChanged; + SelectedColorProcessParameter.ColorProcessData.Remove(item); + RemovedColorProcessDataBeforeSave[item.Guid] = item; + } + //UpdateFactorsOnChangeProcessData("Yellow"); + } + else if (e.Action == NotifyCollectionChangedAction.Remove) + { + foreach (ColorProcessData item in e.OldItems) + { + SelectedColorProcessParameter.ColorProcessData.Remove(item); + RemovedColorProcessDataBeforeSave[item.Guid] = item; + item.PropertyChanged -= YellowMeasurementModelPropertyChanged; + } + UpdateFactorsOnChangeProcessData("YELLOW"); + } + else if (e.Action == NotifyCollectionChangedAction.Add) + { + foreach (ColorProcessData item in e.NewItems) + { + item.ColorName = "YELLOW"; + item.ColorProcessParametersGuid = SelectedColorProcessParameter.Guid; + SelectedColorProcessParameter.ColorProcessData.Add(item); + RemovedColorProcessDataBeforeSave.Remove(item.Guid); + item.PropertyChanged += YellowMeasurementModelPropertyChanged; + } + } + } + + private void YellowMeasurementModelPropertyChanged(object sender, PropertyChangedEventArgs e) + { + if (IsFree) + { + YellowPlot.CreateGraph(YellowProcessData.ToList(), false); + UpdateFactorsOnChangeProcessData("YELLOW"); + } + } + + private void OnBlackCollectionChanged(object sender, NotifyCollectionChangedEventArgs e) + { + if(e.Action == NotifyCollectionChangedAction.Reset) + { + var blackProcessData = SelectedColorProcessParameter.ColorProcessData.Where(x => x.ColorName == "BLACK").ToObservableCollection(); + foreach (ColorProcessData item in blackProcessData) + { + item.PropertyChanged -= BlackMeasurementModelPropertyChanged; + SelectedColorProcessParameter.ColorProcessData.Remove(item); + RemovedColorProcessDataBeforeSave[item.Guid] = item; + } + //UpdateFactorsOnChangeProcessData("Black"); + } + else if (e.Action == NotifyCollectionChangedAction.Remove) + { + foreach (ColorProcessData item in e.OldItems) + { + SelectedColorProcessParameter.ColorProcessData.Remove(item); + RemovedColorProcessDataBeforeSave[item.Guid] = item; + item.PropertyChanged -= BlackMeasurementModelPropertyChanged; + } + UpdateFactorsOnChangeProcessData("BLACK"); + } + else if (e.Action == NotifyCollectionChangedAction.Add) + { + foreach (ColorProcessData item in e.NewItems) + { + item.ColorName = "BLACK"; + item.ColorProcessParametersGuid = SelectedColorProcessParameter.Guid; + SelectedColorProcessParameter.ColorProcessData.Add(item); + RemovedColorProcessDataBeforeSave.Remove(item.Guid); + item.PropertyChanged += BlackMeasurementModelPropertyChanged; + } + + } + } + + private void BlackMeasurementModelPropertyChanged(object sender, PropertyChangedEventArgs e) + { + if (IsFree) + { + BlackPlot.CreateGraph(BlackProcessData.ToList(), true); + UpdateFactorsOnChangeProcessData("BLACK"); + } + } + + #endregion + + #region update factors + + /// + /// Updates the ColorProcessFactor from ColorProcessData item. + /// + /// The factor. + /// The item. + private void UpdateFactor(ColorProcessFactor factor, ColorProcessData item) + { + if (factor == null) + return; + if (item == null) + { + factor.InkNlCm = 0; + factor.L = factor.A = factor.B = 0.0; + return; + } + factor.InkNlCm = item.InkNlCm; + factor.L = item.L; + factor.A = item.A; + factor.B = item.B; + } + + /// + /// Calculate and Update the factors on change process data. + /// + /// The color. + private void UpdateFactorsOnChangeProcessData(string color) + { + bool isLtype = color.ToLower() == "yellow" ? false : true; + var processData = SelectedColorProcessParameter.ColorProcessData.Where(x => x.ColorName.ToLower() == color.ToLower()).ToObservableCollection(); + double target100 = FactorTarget.GetFactor100(color); + double target200 = FactorTarget.GetFactor200(color); + ColorProcessData closest100 = null; + ColorProcessData closest200 = null; + ColorProcessData minInk = null; + ColorProcessData maxInk = null; + + var minDifference100 = double.MaxValue; + var minDifference200 = double.MaxValue; + + if (processData.Count == 0) + return; + + foreach (var item in processData) + { + var colorvalue = isLtype ? item.L : item.B; + var difference100 = Math.Abs(colorvalue - target100); + if (minDifference100 > difference100) + { + minDifference100 = (int)difference100; + closest100 = item; + } + var difference200 = Math.Abs(colorvalue - target200); + if (minDifference200 > difference200) + { + minDifference200 = (int)difference200; + closest200 = item; + } + if (minInk == null || minInk.InkNlCm > item.InkNlCm) + { + minInk = item; + } + if (maxInk == null || maxInk.InkNlCm < item.InkNlCm) + { + maxInk = item; + } + } + UpdateFactor(Factor100ProcessData.FirstOrDefault(x => x.ColorName == color), closest100); + UpdateFactor(Factor200ProcessData.FirstOrDefault(x => x.ColorName == color), closest200); + UpdateFactor(MinInkUptake.FirstOrDefault(x => x.ColorName == color), minInk); + UpdateFactor(MaxInkUptake.FirstOrDefault(x => x.ColorName == color), maxInk); + } + + #endregion + + #region save + + public async void Save() + { + try + { + IsFree = false; + await Task.Factory.StartNew(() => + { + SelectedColorProcessParameter.LastUpdated = DateTime.UtcNow; + + var colorProcessParameterAfterChange = ColorProcessParameterDTO.FromObservable(SelectedColorProcessParameter); + + foreach (KeyValuePair item in RemovedColorProcessDataBeforeSave) + { + var existingColorProcessData = _active_context.ColorProcessData.FirstOrDefault(y => y.Guid == item.Value.Guid); + if (existingColorProcessData != null) + { + _active_context.ColorProcessData.Remove(existingColorProcessData); + } + } + _active_context.SaveChanges(); + + }); + LoadColorParameters(SelectedColorProcessParameter.RmlsExtensionsGuid); + } + catch (Exception ex) + { + LogManager.Log(ex, "Could not update color parameters."); + _notification.ShowError($"An error occurred while trying to save color parameters.\n{ex.Message}"); + } + finally + { + IsFree = true; + } + } + + #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 607670461..3fde7abbe 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 @@ -1,18 +1,542 @@ - +using Microsoft.Win32; using System; using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.ComponentModel; +using System.IO; using System.Linq; using System.Text; using System.Threading.Tasks; +using System.Windows.Data; +using Tango.BL; +using Tango.BL.Builders; +using Tango.BL.Calibration; +using Tango.BL.Entities; +using Tango.Core.Commands; using Tango.MachineStudio.Common; +using Tango.MachineStudio.Common.Notifications; + + +using System.Data.Entity; +using Tango.Core.ExtensionMethods; +using Tango.MachineStudio.Common.Authentication; +using Tango.BL.ActionLogs; +using Tango.BL.DTO; +using Tango.BL.Enumerations; +using Tango.MachineStudio.ThreadExtensions.Contracts; +using Tango.MachineStudio.ThreadExtensions.Views; namespace Tango.MachineStudio.ThreadExtensions.ViewModels { - public class MainViewVM : StudioViewModel + public class MainViewVM : StudioViewModel { + private INotificationProvider _notification; + private IAuthenticationProvider _authentication; + private IActionLogManager _actionLogManager; + private RmlsExtensionDTO _rmlExtensionBeforeSave; + + private ObservablesContext _rmlExtentions_context; + private ObservablesContext _active_context; + + #region properties + private ObservableCollection _rmlsExtension; + public ObservableCollection RmlsExtensions + { + get { return _rmlsExtension; } + set { _rmlsExtension = value; + RaisePropertyChangedAuto(); } + } + + + private RmlsExtension _activeRMLExtention; + public RmlsExtension ActiveRMLExtention + { + get { return _activeRMLExtention; } + set { _activeRMLExtention = value; + RaisePropertyChangedAuto(); } + } + + private RmlsExtension _selectedRMLExtension; + public RmlsExtension SelectedRMLExtension + { + get { return _selectedRMLExtension; } + set { _selectedRMLExtension = value; RaisePropertyChangedAuto(); InvalidateRelayCommands(); } + } + + private ICollectionView _rmlExtCollectionView; + /// + /// Gets or sets the RML collection view. + /// + public ICollectionView RmlExtCollectionView + { + get { return _rmlExtCollectionView; } + set + { + _rmlExtCollectionView = value; + RaisePropertyChangedAuto(); + } + } + + private ObservableCollection _applications; + public ObservableCollection Applications + { + get { return _applications; } + set { _applications = value; RaisePropertyChangedAuto(); } + } + + private ObservableCollection _brands; + public ObservableCollection Brands + { + get { return _brands; } + set { _brands = value; RaisePropertyChangedAuto(); } + } + + private ObservableCollection _yarnColor; + public ObservableCollection YarnColor + { + get { return _yarnColor; } + set { _yarnColor = value; RaisePropertyChangedAuto(); } + } + + private ObservableCollection _enduse; + public ObservableCollection EndUse + { + get { return _enduse; } + set { _enduse = value; RaisePropertyChangedAuto(); } + } + + private ObservableCollection _family; + public ObservableCollection Family + { + get { return _family; } + set { _family = value; RaisePropertyChangedAuto(); } + } + + private ObservableCollection _geometry; + public ObservableCollection Geometry + { + get { return _geometry; } + set { _geometry = value; RaisePropertyChangedAuto(); } + } + + private ObservableCollection _glosslevel; + public ObservableCollection GlossLevel + { + get { return _glosslevel; } + set { _glosslevel = value; RaisePropertyChangedAuto(); } + } + + private ObservableCollection _group; + public ObservableCollection Group + { + get { return _group; } + set { _group = value; RaisePropertyChangedAuto(); } + } + + private ObservableCollection _manufacturer; + public ObservableCollection Manufacturer + { + get { return _manufacturer; } + set { _manufacturer = value; RaisePropertyChangedAuto(); } + } + + private ObservableCollection _materials; + public ObservableCollection Materials + { + get { return _materials; } + set { _materials = value; RaisePropertyChangedAuto(); } + } + + private ObservableCollection _subFamilies; + public ObservableCollection SubFamilies + { + get { return _subFamilies; } + set { _subFamilies = value; RaisePropertyChangedAuto(); } + } + + private ObservableCollection _texturing; + public ObservableCollection Texturing + { + get { return _texturing; } + set { _texturing = value; RaisePropertyChangedAuto(); } + } + + private ObservableCollection _yarnTypes; + public ObservableCollection YarnTypes + { + get { return _yarnTypes; } + set { _yarnTypes = value; RaisePropertyChangedAuto(); } + } + + private ObservableCollection _industrySector; + public ObservableCollection IndustrySector + { + get { return _industrySector; } + set { _industrySector = value; RaisePropertyChangedAuto(); } + } + + private String _Filter; + /// + /// Gets or sets the search filter. + /// + public String Filter + { + get { return _Filter; } + set { _Filter = value; RaisePropertyChangedAuto(); OnFilterChanged(); } + } + + private void OnFilterChanged() + { + RmlExtCollectionView.Refresh(); + } + + private ColorParametersVewVM _colorParametersVewVM; + public ColorParametersVewVM ColorParametersVewVM + { + get { return _colorParametersVewVM; } + set { _colorParametersVewVM = value; RaisePropertyChangedAuto(); } + } + #endregion + + #region commands + + public RelayCommand SaveCommand { get; set; } + + public RelayCommand ManageRmlExtensionCommand { get; set; } + + public RelayCommand AddRmlExtCommand { get; set; } + + public RelayCommand RemoveRmlExtensionCommand { get; set; } + + public RelayCommand CloneRmlExtensionCommand { get; set; } + + public RelayCommand BackToThreadExtensionViewsCommand { get; set; } + + + private void BackToThreadExtensionViews(object obj) + { + View.NavigateTo(ThreadExtensionNavigationView.ThreadExtensionsView); + LoadRmlExtentions(); + } + + private async void CloneSelectedRmlExtension(object obj) + { + using (_notification.PushTaskItem("Cloning thread...")) + { + try + { + IsFree = false; + + using (var context = ObservablesContext.CreateDefault()) + { + RmlsExtension rml_extention = await new RmlExtensionsBuilder(_rmlExtentions_context).Set(SelectedRMLExtension.Guid).WithUser().BuildAsync(); + + RmlsExtension cloned = new RmlsExtension(); + rml_extention.MapPropertiesTo(cloned, MappingFlags.NoReferenceTypes); + + cloned.Guid = Guid.NewGuid().ToString(); + cloned.ID = 0; + + + context.RmlsExtensions.Add(cloned); + await context.SaveChangesAsync(); + + //_actionLogManager.InsertLog(BL.Enumerations.ActionLogType.RmlCreated, _authentication.CurrentUser, cloned.Name, cloned, "RML cloned from Machine Studio."); + } + + LoadRmlExtentions(); + } + catch (Exception ex) + { + LogManager.Log(ex, "Error cloning thread."); + _notification.ShowError($"An error occurred while trying to clone the selected thread\n{ex.Message}"); + } + finally + { + IsFree = true; + } + } + } + + private async void RemoveRmlExtension(object obj) + { + if (_notification.ShowQuestion(" Are you sure you want to delete the selected RML Extension?")) + { + using (_notification.PushTaskItem("Removing RML Extension...")) + { + try + { + IsFree = false; + + await SelectedRMLExtension.DeleteCascadeAsync(_rmlExtentions_context); + //_actionLogManager.InsertLog(BL.Enumerations.ActionLogType.RmlDeleted, _authentication.CurrentUser, SelectedRML.Name, SelectedRML, "RML deleted from Machine Studio."); + + LoadRmlExtentions(); + } + catch (Exception ex) + { + LogManager.Log(ex, $"Error removing selected RML {SelectedRMLExtension?.Name}."); + _notification.ShowError($"An error occurred while trying to remove the selected RML Extension.\n{ex.FlattenMessage()}"); + LoadRmlExtentions(); + } + finally + { + IsFree = true; + } + } + } + } + #endregion + + public MainViewVM(INotificationProvider notificationProvider, IAuthenticationProvider authentication, IActionLogManager actionLogManager) + { + _notification = notificationProvider; + _authentication = authentication; + _actionLogManager = actionLogManager; + + BackToThreadExtensionViewsCommand = new RelayCommand(BackToThreadExtensionViews, () => IsFree); + SaveCommand = new RelayCommand(Save, () => IsFree); + ManageRmlExtensionCommand = new RelayCommand(() => LoadActiveRMLExtention(SelectedRMLExtension.Guid), () => SelectedRMLExtension != null); + RemoveRmlExtensionCommand = new RelayCommand(RemoveRmlExtension, () => SelectedRMLExtension != null); + CloneRmlExtensionCommand = new RelayCommand(CloneSelectedRmlExtension, () => SelectedRMLExtension != null); + AddRmlExtCommand = new RelayCommand(AddNewRmlExtention); + } + public override void OnApplicationReady() { + LoadRmlExtentions(); + } + + #region Loading + + private async void LoadRmlExtentions() + { + try + { + IsFree = false; + + using (_notification.PushTaskItem("Loading RmlExtentions...")) + { + if (_rmlExtentions_context != null) _rmlExtentions_context.Dispose(); + + _rmlExtentions_context = ObservablesContext.CreateDefault(); + RmlsExtensions = await new RMLExtentionsCollectionBuilder(_rmlExtentions_context).SetAll().WithUser().WithYarnProperties().BuildAsync(); + + + RmlExtCollectionView = CollectionViewSource.GetDefaultView(RmlsExtensions); + RmlExtCollectionView.SortDescriptions.Add(new SortDescription(nameof(Rml.LastUpdated), ListSortDirection.Descending)); + + RmlExtCollectionView.Filter = (rml) => + { + RmlsExtension r = rml as RmlsExtension; + return String.IsNullOrWhiteSpace(Filter) + || r.Name.ToLower().Contains(Filter.ToLower()); + }; + + } + } + catch (Exception ex) + { + LogManager.Log(ex, $"Error loading RMLExtensions.\n{ex.FlattenMessage()}"); + } + finally + { + IsFree = true; + } + } + + private void LoadRmlProperties() + { + Applications = _active_context.YarnApplications.ToObservableCollection(); + Brands = _active_context.YarnBrand.ToObservableCollection(); + YarnColor = _active_context.YarnColor.ToObservableCollection(); + EndUse = _active_context.YarnEndUse.ToObservableCollection(); + Family = _active_context.YarnFamily.ToObservableCollection(); + Geometry = _active_context.YarnGeometry.ToObservableCollection(); + GlossLevel = _active_context.YarnGlossLevel.ToObservableCollection(); + Group = _active_context.YarnGroup.ToObservableCollection(); + Manufacturer = _active_context.YarnManufacturer.ToObservableCollection(); + + Materials = _active_context.YarnMaterials.ToObservableCollection(); + SubFamilies = _active_context.YarnSubFamily.ToObservableCollection(); + Texturing = _active_context.YarnTexturing.ToObservableCollection(); + YarnTypes = _active_context.YarnType.ToObservableCollection(); + IndustrySector = _active_context.YarnIndustrysector.ToObservableCollection(); + } + + private async void AddNewRmlExtention(object obj) + { + using (_notification.PushTaskItem("Creating new RML Extension...")) + { + IsFree = false; + + if (_active_context != null) + { + _active_context.Dispose(); + } + + _active_context = ObservablesContext.CreateDefault(); + + LoadRmlProperties(); + + RmlsExtension rml_extention = new RmlsExtension(); + rml_extention.Created = DateTime.UtcNow; + rml_extention.UserGuid = _authentication.CurrentUser.Guid; + rml_extention.YarnManufacturer = Manufacturer.FirstOrDefault(); + rml_extention.YarnBrand = Brands.FirstOrDefault(); + rml_extention.Country = null; + rml_extention.YarnEndUse = EndUse.FirstOrDefault(); + rml_extention.YarnApplications = Applications.FirstOrDefault(); + rml_extention.YarnIndustrysector = IndustrySector.FirstOrDefault(); + + rml_extention.YarnMaterial = Materials.FirstOrDefault(); + rml_extention.YarnType = YarnTypes.FirstOrDefault(); + rml_extention.YarnSubFamily = SubFamilies.FirstOrDefault(); + rml_extention.YarnFamily = Family.FirstOrDefault(); + rml_extention.YarnGroup = Group.FirstOrDefault(); + rml_extention.YarnTexturing = Texturing.FirstOrDefault(); + rml_extention.YarnGeometry = Geometry.FirstOrDefault(); + rml_extention.YarnColor = YarnColor.FirstOrDefault(); + rml_extention.YarnGlossLevel = GlossLevel.FirstOrDefault(); + rml_extention.LinearDensity = 0; + rml_extention.YarnUnit = YarnUnits.DTEX; + rml_extention.YarnPlies = Plies.P1; + rml_extention.FilamentCount = 0; + rml_extention.TwistTpm = 0; + rml_extention.YarnTwistDirections = TwistDirections.S; + rml_extention.MinElongation = 0.0; + rml_extention.MaxElongation = 100.0; + rml_extention.MinMaxForceN = 0.0; + rml_extention.MaxMaxForceN = 100.0; + rml_extention.MinElasticity = 0.0; + rml_extention.MaxElasticity = 100.0; + rml_extention.MinTenacity = 0.0; + rml_extention.MaxTenacity = 100.0; + rml_extention.Finishing = "Lubrication"; + + _active_context.RmlsExtensions.Add(rml_extention); + await _active_context.SaveChangesAsync(); + + //_actionLogManager.InsertLog(BL.Enumerations.ActionLogType.RmlCreated, _authentication.CurrentUser, rml.Name, rml, "Rml created using Machine Studio."); + ColorParametersVewVM = new ColorParametersVewVM(_notification, _actionLogManager); + LoadActiveRMLExtention(rml_extention.Guid); + + IsFree = true; + } + } + + private async void LoadActiveRMLExtention(String guid) + { + using (_notification.PushTaskItem("Loading RML Extension...")) + { + try + { + IsFree = false; + + if (_active_context != null) + { + _active_context.Dispose(); + } + + _active_context = ObservablesContext.CreateDefault(); + + LoadRmlProperties(); + + ActiveRMLExtention = await new RmlExtensionsBuilder(_active_context) + .Set(guid) + .WithUser() + .BuildAsync(); + + ColorParametersVewVM = new ColorParametersVewVM(_notification, _actionLogManager); + ColorParametersVewVM.LoadColorParameters(guid); + View.NavigateTo(ThreadExtensionNavigationView.ThreadExtentionView); + + InvalidateRelayCommands(); + + IsFree = true; + } + catch (Exception ex) + { + //LogManager.Log($"Error loading RML '{ActiveRML.Name}'..."); + _notification.ShowError($"Error loading the selected thread.\n{ex.FlattenMessage()}"); + } + finally + { + IsFree = true; + } + } + } + + private async void RefreshView(String guid) + { + try + { + IsFree = false; + + //if (_active_context != null) + //{ + // _active_context.Dispose(); + //} + + //_active_context = ObservablesContext.CreateDefault(); + + LoadRmlProperties(); + ActiveRMLExtention = await new RmlExtensionsBuilder(_active_context) + .Set(guid) + .WithUser() + .BuildAsync(); + + InvalidateRelayCommands(); + + IsFree = true; + } + catch (Exception ex) + { + //LogManager.Log($"Error loading RML '{ActiveRML.Name}'..."); + _notification.ShowError($"Error refresh the selected thread.\n{ex.FlattenMessage()}"); + } + finally + { + IsFree = true; + } + } + + #endregion + + private async void Save() + { + IsFree = false; + + try + { + using (_notification.PushTaskItem("Saving RML Extension...")) + { + + ActiveRMLExtention.LastUpdated = DateTime.UtcNow; + + ColorParametersVewVM.Save(); + + var rmlExtensionAfter = RmlsExtensionDTO.FromObservable(ActiveRMLExtention); + + await _active_context.SaveChangesAsync(); + + //ColorParametersVewVM.LoadColorParameters(ActiveRMLExtention.Guid); + // _actionLogManager.InsertLog(BL.Enumerations.ActionLogType.RmlSaved, _authentication.CurrentUser, _rmlBeforeSave.Name, _rmlBeforeSave, rmlAfter, "RML saved using Machine Studio."); + + _rmlExtensionBeforeSave = rmlExtensionAfter; + RefreshView(SelectedRMLExtension.Guid); + } + } + catch (Exception ex) + { + LogManager.Log(ex, $"Error saving RML Extension {ActiveRMLExtention.Name}"); + _notification.ShowError($"An error occurred while trying to save the current RML Extension.\n{ex.FlattenMessage()}"); + } + finally + { + IsFree = true; + } } } } diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/ColorParametersView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/ColorParametersView.xaml new file mode 100644 index 000000000..1526a49cb --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/ColorParametersView.xaml @@ -0,0 +1,474 @@ + + + + + + + + + + + + + + + + + + + + + + + + + TARGET MACHINE + + + + + + + + + + + + + + + + + + + + + + + LIQUID TYPE CYAN + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LIQUID TYPE MAGENTA + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LIQUID TYPE YELLOW + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LIQUID TYPE BLACK + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + L + + + A + + + B + + + White point + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/ColorParametersView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/ColorParametersView.xaml.cs new file mode 100644 index 000000000..4e6a8c048 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/ColorParametersView.xaml.cs @@ -0,0 +1,44 @@ +using System; +using System.Collections.Generic; +using System.Diagnostics; +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.ThreadExtensions.ViewModels; + +namespace Tango.MachineStudio.ThreadExtensions.Views +{ + /// + /// Interaction logic for ColorParametersView.xaml + /// + public partial class ColorParametersView : UserControl + { + public ColorParametersView() + { + InitializeComponent(); + this.Loaded += ColorParametersView_Loaded; + } + + private void ColorParametersView_Loaded(object sender, RoutedEventArgs e) + { + if (contentGrid != null && contentGrid.DataContext is ColorParametersVewVM) + { + ColorParametersVewVM vm = (ColorParametersVewVM)contentGrid.DataContext; + vm.CyanPlot.PlotControl = CyanPlotControl; + vm.MagentaPlot.PlotControl = MagentaPlotControl; + vm.YellowPlot.PlotControl = YellowPlotControl; + vm.BlackPlot.PlotControl = BlackPlotControl; + vm.IsViewLoaded = true; + } + } + } +} diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/MainView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/MainView.xaml index b446c7cc7..0ef5850c6 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/MainView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/MainView.xaml @@ -4,12 +4,16 @@ 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:controls="clr-namespace:Tango.SharedUI.Controls;assembly=Tango.SharedUI" xmlns:vm="clr-namespace:Tango.MachineStudio.ThreadExtensions.ViewModels" xmlns:global="clr-namespace:Tango.MachineStudio.ThreadExtensions" xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes" mc:Ignorable="d" d:DesignHeight="1080" d:DesignWidth="1920" Background="Transparent" d:DataContext="{d:DesignInstance Type=vm:MainViewVM, IsDesignTimeCreatable=False}" DataContext="{x:Static global:ViewModelLocator.MainViewVM}"> - Thread Extensions + + + + diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/MainView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/MainView.xaml.cs index 863a96398..251099c8a 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/MainView.xaml.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/MainView.xaml.cs @@ -12,17 +12,25 @@ using System.Windows.Media; using System.Windows.Media.Imaging; using System.Windows.Navigation; using System.Windows.Shapes; +using Tango.Core.DI; +using Tango.MachineStudio.ThreadExtensions.Contracts; namespace Tango.MachineStudio.ThreadExtensions.Views { /// /// Interaction logic for MainView.xaml /// - public partial class MainView : UserControl + public partial class MainView : UserControl, IMainView { public MainView() { InitializeComponent(); + TangoIOC.Default.Register(this); + } + + public void NavigateTo(ThreadExtensionNavigationView view) + { + navigationControl.NavigateTo(view.ToString()); } } } diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/ThreadCharacteristicsView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/ThreadCharacteristicsView.xaml new file mode 100644 index 000000000..fac8e6af4 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/ThreadCharacteristicsView.xaml @@ -0,0 +1,195 @@ + + + + + + + + + + + + + + + + Yarn Source + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Yarn Source + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Yarn Data + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Yarn Properties from datasheet + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/ThreadCharacteristicsView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/ThreadCharacteristicsView.xaml.cs new file mode 100644 index 000000000..944cf07f4 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/ThreadCharacteristicsView.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 +{ + /// + /// Interaction logic for ThreadCharacteristicsView.xaml + /// + public partial class ThreadCharacteristicsView : UserControl + { + public ThreadCharacteristicsView() + { + InitializeComponent(); + } + } +} diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/ThreadExtensionView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/ThreadExtensionView.xaml new file mode 100644 index 000000000..f9d8a2dc3 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/ThreadExtensionView.xaml @@ -0,0 +1,61 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/ThreadExtensionView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/ThreadExtensionView.xaml.cs new file mode 100644 index 000000000..2cce29e57 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/ThreadExtensionView.xaml.cs @@ -0,0 +1,27 @@ +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.Shapes; + +namespace Tango.MachineStudio.ThreadExtensions.Views +{ + /// + /// Interaction logic for ThreadExtView.xaml + /// + public partial class ThreadExtentionView : UserControl + { + public ThreadExtentionView() + { + InitializeComponent(); + } + } +} diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/ThreadExtensionsView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/ThreadExtensionsView.xaml new file mode 100644 index 000000000..b85222b12 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/ThreadExtensionsView.xaml @@ -0,0 +1,103 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/ThreadExtensionsView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/ThreadExtensionsView.xaml.cs new file mode 100644 index 000000000..9afb7a5c8 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/ThreadExtensionsView.xaml.cs @@ -0,0 +1,27 @@ +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.Shapes; + +namespace Tango.MachineStudio.ThreadExtensions.Views +{ + /// + /// Interaction logic for ThreadExtViews.xaml + /// + public partial class ThreadExtensionsView : UserControl + { + public ThreadExtensionsView() + { + InitializeComponent(); + } + } +} diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/app.config b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/app.config index 97a204217..7b82e5f7c 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/app.config +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/app.config @@ -1,5 +1,9 @@  + + +
+ @@ -72,4 +76,10 @@ + + + + + + \ No newline at end of file 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 fd88f4804..5a03cfb57 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/packages.config +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/packages.config @@ -1,8 +1,11 @@  + + + \ No newline at end of file diff --git a/Software/Visual_Studio/Tango.BL/Builders/ColorProcessParametersBuilder.cs b/Software/Visual_Studio/Tango.BL/Builders/ColorProcessParametersBuilder.cs new file mode 100644 index 000000000..005ca8a53 --- /dev/null +++ b/Software/Visual_Studio/Tango.BL/Builders/ColorProcessParametersBuilder.cs @@ -0,0 +1,41 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Tango.BL.Entities; +using System.Data.Entity; +using System.Linq.Expressions; + +namespace Tango.BL.Builders +{ + public class ColorProcessParametersBuilder : EntityBuilderBase + { + public ColorProcessParametersBuilder(ObservablesContext context) : base(context) + { + + } + + //protected override IQueryable OnSetQuery(IQueryable query) + //{ + // return query. + // Include(x => x.ColorProcessData). + // Include(x => x.ColorProcessFactor); + //} + public virtual ColorProcessParametersBuilder WithColorProcessData() + { + return AddQueryStep(1, (query) => + { + return query.Include(x => x.ColorProcessData); + }); + } + + public virtual ColorProcessParametersBuilder WithColorProcessFactor() + { + return AddQueryStep(2, (query) => + { + return query.Include(x => x.ColorProcessFactor); + }); + } + } +} diff --git a/Software/Visual_Studio/Tango.BL/Builders/RMLExtentionsCollectionBuilder.cs b/Software/Visual_Studio/Tango.BL/Builders/RMLExtentionsCollectionBuilder.cs new file mode 100644 index 000000000..370c4273c --- /dev/null +++ b/Software/Visual_Studio/Tango.BL/Builders/RMLExtentionsCollectionBuilder.cs @@ -0,0 +1,65 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Tango.BL.Entities; +using System.Data.Entity; +using Tango.BL.Enumerations; + +namespace Tango.BL.Builders +{ + public class RMLExtentionsCollectionBuilder : EntityCollectionBuilderBase + { + public RMLExtentionsCollectionBuilder(ObservablesContext context) : base(context) + { + } + public virtual RMLExtentionsCollectionBuilder WithUser() + { + //return AddStep(0, () => + //{ + // foreach (var rmlExtentions in Entities.ToList()) + // { + // new UserBuilder(Context).Set(rmlExtentions.UserGuid).Build(); + // } + //}); + + return AddQueryStep(0, (query) => + { + return query.Include(x => x.User).Include(x => x.User.Contact); + }); + } + + public virtual RMLExtentionsCollectionBuilder WithUsers() + { + return AddStep(2, () => + { + foreach (var rmlExtention in Entities) + { + new UsersCollectionBuilder(Context).Set(x => x.Guid == rmlExtention.UserGuid).WithAddress().WithContacts().Build(); + } + }); + } + + public virtual RMLExtentionsCollectionBuilder WithYarnProperties() + { + return AddStep(1, () => + { + Context.YarnApplications.ToList(); + Context.YarnBrand.ToList(); + Context.YarnColor.ToList(); + Context.YarnEndUse.ToList(); + Context.YarnGeometry.ToList(); + Context.YarnFamily.ToList(); + Context.YarnGlossLevel.ToList(); + Context.YarnGroup.ToList(); + Context.YarnIndustrysector.ToList(); + Context.YarnManufacturer.ToList(); + Context.YarnMaterials.ToList(); + Context.YarnSubFamily.ToList(); + Context.YarnTexturing.ToList(); + Context.YarnType.ToList(); + }); + } + } +} diff --git a/Software/Visual_Studio/Tango.BL/Builders/RmlExtensionsBuilder.cs b/Software/Visual_Studio/Tango.BL/Builders/RmlExtensionsBuilder.cs new file mode 100644 index 000000000..00c251a4e --- /dev/null +++ b/Software/Visual_Studio/Tango.BL/Builders/RmlExtensionsBuilder.cs @@ -0,0 +1,44 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Tango.BL.Entities; +using System.Data.Entity; +using System.Linq.Expressions; + +namespace Tango.BL.Builders +{ + public class RmlExtensionsBuilder : EntityBuilderBase + { + public RmlExtensionsBuilder(ObservablesContext context) : base(context) + { + + } + protected override IQueryable OnSetQuery(IQueryable query) + { + return query. + Include(x => x.Rml). + Include(x => x.YarnApplications). + Include(x => x.YarnBrand). + Include(x => x.YarnColor). + Include(x => x.YarnEndUse). + Include(x => x.YarnFamily). + Include(x => x.YarnGeometry). + Include(x => x.YarnGlossLevel). + Include(x => x.YarnGroup). + Include(x => x.YarnManufacturer). + Include(x => x.YarnMaterial). + Include(x => x.YarnSubFamily). + Include(x => x.YarnTexturing). + Include(x => x.YarnType); + } + public virtual RmlExtensionsBuilder WithUser() + { + return AddStep(0, () => + { + new UserBuilder(Context).Set(Entity.UserGuid).WithRolesAndPermissions().Build(); + }); + } + } +} diff --git a/Software/Visual_Studio/Tango.BL/DTO/ColorProcessDataDTO.cs b/Software/Visual_Studio/Tango.BL/DTO/ColorProcessDataDTO.cs new file mode 100644 index 000000000..b55a7ad27 --- /dev/null +++ b/Software/Visual_Studio/Tango.BL/DTO/ColorProcessDataDTO.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 ColorProcessDataDTO : ColorProcessDataDTOBase + { + + } +} diff --git a/Software/Visual_Studio/Tango.BL/DTO/ColorProcessDataDTOBase.cs b/Software/Visual_Studio/Tango.BL/DTO/ColorProcessDataDTOBase.cs new file mode 100644 index 000000000..bb0dadfa6 --- /dev/null +++ b/Software/Visual_Studio/Tango.BL/DTO/ColorProcessDataDTOBase.cs @@ -0,0 +1,73 @@ + +//------------------------------------------------------------------------------ +// +// 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.Linq; +using System.Text; +using System.Threading.Tasks; +using Tango.BL.Entities; + +namespace Tango.BL.DTO +{ + public abstract class ColorProcessDataDTOBase : ObservableEntityDTO + { + + /// + /// color process parameters guid + /// + public String ColorProcessParametersGuid + { + get; set; + } + + /// + /// color name + /// + public String ColorName + { + get; set; + } + + /// + /// ink nl cm + /// + public Int32 InkNlCm + { + get; set; + } + + /// + /// l + /// + public Double L + { + get; set; + } + + /// + /// a + /// + public Double A + { + get; set; + } + + /// + /// b + /// + public Double B + { + get; set; + } + + } +} diff --git a/Software/Visual_Studio/Tango.BL/DTO/ColorProcessFactorDTO.cs b/Software/Visual_Studio/Tango.BL/DTO/ColorProcessFactorDTO.cs new file mode 100644 index 000000000..780fb4d0f --- /dev/null +++ b/Software/Visual_Studio/Tango.BL/DTO/ColorProcessFactorDTO.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 ColorProcessFactorDTO : ColorProcessFactorDTOBase + { + + } +} diff --git a/Software/Visual_Studio/Tango.BL/DTO/ColorProcessFactorDTOBase.cs b/Software/Visual_Studio/Tango.BL/DTO/ColorProcessFactorDTOBase.cs new file mode 100644 index 000000000..a6e2a83b2 --- /dev/null +++ b/Software/Visual_Studio/Tango.BL/DTO/ColorProcessFactorDTOBase.cs @@ -0,0 +1,81 @@ + +//------------------------------------------------------------------------------ +// +// 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.Linq; +using System.Text; +using System.Threading.Tasks; +using Tango.BL.Entities; + +namespace Tango.BL.DTO +{ + public abstract class ColorProcessFactorDTOBase : ObservableEntityDTO + { + + /// + /// color process parameters guid + /// + public String ColorProcessParametersGuid + { + get; set; + } + + /// + /// color name + /// + public String ColorName + { + get; set; + } + + /// + /// ink nl cm + /// + public Int32 InkNlCm + { + get; set; + } + + /// + /// l + /// + public Double L + { + get; set; + } + + /// + /// a + /// + public Double A + { + get; set; + } + + /// + /// b + /// + public Double B + { + get; set; + } + + /// + /// factor percent + /// + public Int32 FactorPercent + { + get; set; + } + + } +} diff --git a/Software/Visual_Studio/Tango.BL/DTO/ColorProcessParameterDTO.cs b/Software/Visual_Studio/Tango.BL/DTO/ColorProcessParameterDTO.cs new file mode 100644 index 000000000..2c7fd48aa --- /dev/null +++ b/Software/Visual_Studio/Tango.BL/DTO/ColorProcessParameterDTO.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 ColorProcessParameterDTO : ColorProcessParameterDTOBase + { + + } +} diff --git a/Software/Visual_Studio/Tango.BL/DTO/ColorProcessParameterDTOBase.cs b/Software/Visual_Studio/Tango.BL/DTO/ColorProcessParameterDTOBase.cs new file mode 100644 index 000000000..606c23ca6 --- /dev/null +++ b/Software/Visual_Studio/Tango.BL/DTO/ColorProcessParameterDTOBase.cs @@ -0,0 +1,57 @@ + +//------------------------------------------------------------------------------ +// +// 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.Linq; +using System.Text; +using System.Threading.Tasks; +using Tango.BL.Entities; + +namespace Tango.BL.DTO +{ + public abstract class ColorProcessParameterDTOBase : ObservableEntityDTO + { + + /// + /// rmls extensions guid + /// + public String RmlsExtensionsGuid + { + get; set; + } + + /// + /// white point l + /// + public Double WhitePointL + { + get; set; + } + + /// + /// white point a + /// + public Double WhitePointA + { + get; set; + } + + /// + /// white point b + /// + public Double WhitePointB + { + get; set; + } + + } +} diff --git a/Software/Visual_Studio/Tango.BL/DTO/RmlsExtensionDTOBase.cs b/Software/Visual_Studio/Tango.BL/DTO/RmlsExtensionDTOBase.cs index 76f927048..a80e63c75 100644 --- a/Software/Visual_Studio/Tango.BL/DTO/RmlsExtensionDTOBase.cs +++ b/Software/Visual_Studio/Tango.BL/DTO/RmlsExtensionDTOBase.cs @@ -22,17 +22,281 @@ namespace Tango.BL.DTO { /// - /// name + /// rml guid /// - public String Name + public String RmlGuid { get; set; } /// - /// description + /// user guid /// - public String Description + public String UserGuid + { + get; set; + } + + /// + /// created + /// + public DateTime Created + { + get; set; + } + + /// + /// yarn manufacturer guid + /// + public String YarnManufacturerGuid + { + get; set; + } + + /// + /// yarn brand guid + /// + public String YarnBrandGuid + { + get; set; + } + + /// + /// country + /// + public String Country + { + get; set; + } + + /// + /// yarn end use guid + /// + public String YarnEndUseGuid + { + get; set; + } + + /// + /// yarn applications guid + /// + public String YarnApplicationsGuid + { + get; set; + } + + /// + /// yarn industrysector guid + /// + public String YarnIndustrysectorGuid + { + get; set; + } + + /// + /// yarn material guid + /// + public String YarnMaterialGuid + { + get; set; + } + + /// + /// yarn type guid + /// + public String YarnTypeGuid + { + get; set; + } + + /// + /// yarn family guid + /// + public String YarnFamilyGuid + { + get; set; + } + + /// + /// yarn sub family guid + /// + public String YarnSubFamilyGuid + { + get; set; + } + + /// + /// yarn group guid + /// + public String YarnGroupGuid + { + get; set; + } + + /// + /// yarn texturing guid + /// + public String YarnTexturingGuid + { + get; set; + } + + /// + /// yarn geometry guid + /// + public String YarnGeometryGuid + { + get; set; + } + + /// + /// yarn color guid + /// + public String YarnColorGuid + { + get; set; + } + + /// + /// yarn gloss level guid + /// + public String YarnGlossLevelGuid + { + get; set; + } + + /// + /// linear density + /// + public Int32 LinearDensity + { + get; set; + } + + /// + /// unit + /// + public Int32 Unit + { + get; set; + } + + /// + /// plies + /// + public Int32 Plies + { + get; set; + } + + /// + /// filament count + /// + public Int32 FilamentCount + { + get; set; + } + + /// + /// twist tpm + /// + public Int32 TwistTpm + { + get; set; + } + + /// + /// twist direction + /// + public Nullable TwistDirection + { + get; set; + } + + /// + /// min elongation + /// + public Nullable MinElongation + { + get; set; + } + + /// + /// max elongation + /// + public Nullable MaxElongation + { + get; set; + } + + /// + /// min max force n + /// + public Nullable MinMaxForceN + { + get; set; + } + + /// + /// max max force n + /// + public Nullable MaxMaxForceN + { + get; set; + } + + /// + /// min elasticity + /// + public Nullable MinElasticity + { + get; set; + } + + /// + /// max elasticity + /// + public Nullable MaxElasticity + { + get; set; + } + + /// + /// min tenacity + /// + public Nullable MinTenacity + { + get; set; + } + + /// + /// max tenacity + /// + public Nullable MaxTenacity + { + get; set; + } + + /// + /// finishing + /// + public String Finishing + { + get; set; + } + + /// + /// file name + /// + public String FileName + { + get; set; + } + + /// + /// data + /// + public Byte[] Data { get; set; } diff --git a/Software/Visual_Studio/Tango.BL/DTO/YarnApplicationDTO.cs b/Software/Visual_Studio/Tango.BL/DTO/YarnApplicationDTO.cs new file mode 100644 index 000000000..37be2426f --- /dev/null +++ b/Software/Visual_Studio/Tango.BL/DTO/YarnApplicationDTO.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 YarnApplicationDTO : YarnApplicationDTOBase + { + + } +} diff --git a/Software/Visual_Studio/Tango.BL/DTO/YarnApplicationDTOBase.cs b/Software/Visual_Studio/Tango.BL/DTO/YarnApplicationDTOBase.cs new file mode 100644 index 000000000..e37e97e67 --- /dev/null +++ b/Software/Visual_Studio/Tango.BL/DTO/YarnApplicationDTOBase.cs @@ -0,0 +1,33 @@ + +//------------------------------------------------------------------------------ +// +// 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.Linq; +using System.Text; +using System.Threading.Tasks; +using Tango.BL.Entities; + +namespace Tango.BL.DTO +{ + public abstract class YarnApplicationDTOBase : ObservableEntityDTO + { + + /// + /// name + /// + public String Name + { + get; set; + } + + } +} diff --git a/Software/Visual_Studio/Tango.BL/DTO/YarnBrandDTO.cs b/Software/Visual_Studio/Tango.BL/DTO/YarnBrandDTO.cs new file mode 100644 index 000000000..27c6947b3 --- /dev/null +++ b/Software/Visual_Studio/Tango.BL/DTO/YarnBrandDTO.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 YarnBrandDTO : YarnBrandDTOBase + { + + } +} diff --git a/Software/Visual_Studio/Tango.BL/DTO/YarnBrandDTOBase.cs b/Software/Visual_Studio/Tango.BL/DTO/YarnBrandDTOBase.cs new file mode 100644 index 000000000..08c0c1b08 --- /dev/null +++ b/Software/Visual_Studio/Tango.BL/DTO/YarnBrandDTOBase.cs @@ -0,0 +1,33 @@ + +//------------------------------------------------------------------------------ +// +// 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.Linq; +using System.Text; +using System.Threading.Tasks; +using Tango.BL.Entities; + +namespace Tango.BL.DTO +{ + public abstract class YarnBrandDTOBase : ObservableEntityDTO + { + + /// + /// name + /// + public String Name + { + get; set; + } + + } +} diff --git a/Software/Visual_Studio/Tango.BL/DTO/YarnColorDTO.cs b/Software/Visual_Studio/Tango.BL/DTO/YarnColorDTO.cs new file mode 100644 index 000000000..cebf7e442 --- /dev/null +++ b/Software/Visual_Studio/Tango.BL/DTO/YarnColorDTO.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 YarnColorDTO : YarnColorDTOBase + { + + } +} diff --git a/Software/Visual_Studio/Tango.BL/DTO/YarnColorDTOBase.cs b/Software/Visual_Studio/Tango.BL/DTO/YarnColorDTOBase.cs new file mode 100644 index 000000000..7ca5264bb --- /dev/null +++ b/Software/Visual_Studio/Tango.BL/DTO/YarnColorDTOBase.cs @@ -0,0 +1,33 @@ + +//------------------------------------------------------------------------------ +// +// 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.Linq; +using System.Text; +using System.Threading.Tasks; +using Tango.BL.Entities; + +namespace Tango.BL.DTO +{ + public abstract class YarnColorDTOBase : ObservableEntityDTO + { + + /// + /// name + /// + public String Name + { + get; set; + } + + } +} diff --git a/Software/Visual_Studio/Tango.BL/DTO/YarnEndUseDTO.cs b/Software/Visual_Studio/Tango.BL/DTO/YarnEndUseDTO.cs new file mode 100644 index 000000000..a7e1c5593 --- /dev/null +++ b/Software/Visual_Studio/Tango.BL/DTO/YarnEndUseDTO.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 YarnEndUseDTO : YarnEndUseDTOBase + { + + } +} diff --git a/Software/Visual_Studio/Tango.BL/DTO/YarnEndUseDTOBase.cs b/Software/Visual_Studio/Tango.BL/DTO/YarnEndUseDTOBase.cs new file mode 100644 index 000000000..c28452a65 --- /dev/null +++ b/Software/Visual_Studio/Tango.BL/DTO/YarnEndUseDTOBase.cs @@ -0,0 +1,33 @@ + +//------------------------------------------------------------------------------ +// +// 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.Linq; +using System.Text; +using System.Threading.Tasks; +using Tango.BL.Entities; + +namespace Tango.BL.DTO +{ + public abstract class YarnEndUseDTOBase : ObservableEntityDTO + { + + /// + /// name + /// + public String Name + { + get; set; + } + + } +} diff --git a/Software/Visual_Studio/Tango.BL/DTO/YarnFamilyDTO.cs b/Software/Visual_Studio/Tango.BL/DTO/YarnFamilyDTO.cs new file mode 100644 index 000000000..43e492ec3 --- /dev/null +++ b/Software/Visual_Studio/Tango.BL/DTO/YarnFamilyDTO.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 YarnFamilyDTO : YarnFamilyDTOBase + { + + } +} diff --git a/Software/Visual_Studio/Tango.BL/DTO/YarnFamilyDTOBase.cs b/Software/Visual_Studio/Tango.BL/DTO/YarnFamilyDTOBase.cs new file mode 100644 index 000000000..1e2712bba --- /dev/null +++ b/Software/Visual_Studio/Tango.BL/DTO/YarnFamilyDTOBase.cs @@ -0,0 +1,33 @@ + +//------------------------------------------------------------------------------ +// +// 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.Linq; +using System.Text; +using System.Threading.Tasks; +using Tango.BL.Entities; + +namespace Tango.BL.DTO +{ + public abstract class YarnFamilyDTOBase : ObservableEntityDTO + { + + /// + /// name + /// + public String Name + { + get; set; + } + + } +} diff --git a/Software/Visual_Studio/Tango.BL/DTO/YarnGeometryDTO.cs b/Software/Visual_Studio/Tango.BL/DTO/YarnGeometryDTO.cs new file mode 100644 index 000000000..1d051e713 --- /dev/null +++ b/Software/Visual_Studio/Tango.BL/DTO/YarnGeometryDTO.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 YarnGeometryDTO : YarnGeometryDTOBase + { + + } +} diff --git a/Software/Visual_Studio/Tango.BL/DTO/YarnGeometryDTOBase.cs b/Software/Visual_Studio/Tango.BL/DTO/YarnGeometryDTOBase.cs new file mode 100644 index 000000000..a19e5ec37 --- /dev/null +++ b/Software/Visual_Studio/Tango.BL/DTO/YarnGeometryDTOBase.cs @@ -0,0 +1,33 @@ + +//------------------------------------------------------------------------------ +// +// 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.Linq; +using System.Text; +using System.Threading.Tasks; +using Tango.BL.Entities; + +namespace Tango.BL.DTO +{ + public abstract class YarnGeometryDTOBase : ObservableEntityDTO + { + + /// + /// name + /// + public String Name + { + get; set; + } + + } +} diff --git a/Software/Visual_Studio/Tango.BL/DTO/YarnGlossLevelDTO.cs b/Software/Visual_Studio/Tango.BL/DTO/YarnGlossLevelDTO.cs new file mode 100644 index 000000000..0d904cd6f --- /dev/null +++ b/Software/Visual_Studio/Tango.BL/DTO/YarnGlossLevelDTO.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 YarnGlossLevelDTO : YarnGlossLevelDTOBase + { + + } +} diff --git a/Software/Visual_Studio/Tango.BL/DTO/YarnGlossLevelDTOBase.cs b/Software/Visual_Studio/Tango.BL/DTO/YarnGlossLevelDTOBase.cs new file mode 100644 index 000000000..f8f3bf634 --- /dev/null +++ b/Software/Visual_Studio/Tango.BL/DTO/YarnGlossLevelDTOBase.cs @@ -0,0 +1,33 @@ + +//------------------------------------------------------------------------------ +// +// 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.Linq; +using System.Text; +using System.Threading.Tasks; +using Tango.BL.Entities; + +namespace Tango.BL.DTO +{ + public abstract class YarnGlossLevelDTOBase : ObservableEntityDTO + { + + /// + /// name + /// + public String Name + { + get; set; + } + + } +} diff --git a/Software/Visual_Studio/Tango.BL/DTO/YarnGroupDTO.cs b/Software/Visual_Studio/Tango.BL/DTO/YarnGroupDTO.cs new file mode 100644 index 000000000..0634a6c47 --- /dev/null +++ b/Software/Visual_Studio/Tango.BL/DTO/YarnGroupDTO.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 YarnGroupDTO : YarnGroupDTOBase + { + + } +} diff --git a/Software/Visual_Studio/Tango.BL/DTO/YarnGroupDTOBase.cs b/Software/Visual_Studio/Tango.BL/DTO/YarnGroupDTOBase.cs new file mode 100644 index 000000000..fc2dd604e --- /dev/null +++ b/Software/Visual_Studio/Tango.BL/DTO/YarnGroupDTOBase.cs @@ -0,0 +1,33 @@ + +//------------------------------------------------------------------------------ +// +// 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.Linq; +using System.Text; +using System.Threading.Tasks; +using Tango.BL.Entities; + +namespace Tango.BL.DTO +{ + public abstract class YarnGroupDTOBase : ObservableEntityDTO + { + + /// + /// name + /// + public String Name + { + get; set; + } + + } +} diff --git a/Software/Visual_Studio/Tango.BL/DTO/YarnIndustrysectorDTO.cs b/Software/Visual_Studio/Tango.BL/DTO/YarnIndustrysectorDTO.cs new file mode 100644 index 000000000..8ffa1bde0 --- /dev/null +++ b/Software/Visual_Studio/Tango.BL/DTO/YarnIndustrysectorDTO.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 YarnIndustrysectorDTO : YarnIndustrysectorDTOBase + { + + } +} diff --git a/Software/Visual_Studio/Tango.BL/DTO/YarnIndustrysectorDTOBase.cs b/Software/Visual_Studio/Tango.BL/DTO/YarnIndustrysectorDTOBase.cs new file mode 100644 index 000000000..e48393fc3 --- /dev/null +++ b/Software/Visual_Studio/Tango.BL/DTO/YarnIndustrysectorDTOBase.cs @@ -0,0 +1,33 @@ + +//------------------------------------------------------------------------------ +// +// 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.Linq; +using System.Text; +using System.Threading.Tasks; +using Tango.BL.Entities; + +namespace Tango.BL.DTO +{ + public abstract class YarnIndustrysectorDTOBase : ObservableEntityDTO + { + + /// + /// name + /// + public String Name + { + get; set; + } + + } +} diff --git a/Software/Visual_Studio/Tango.BL/DTO/YarnManufacturerDTO.cs b/Software/Visual_Studio/Tango.BL/DTO/YarnManufacturerDTO.cs new file mode 100644 index 000000000..57a2a1b09 --- /dev/null +++ b/Software/Visual_Studio/Tango.BL/DTO/YarnManufacturerDTO.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 YarnManufacturerDTO : YarnManufacturerDTOBase + { + + } +} diff --git a/Software/Visual_Studio/Tango.BL/DTO/YarnManufacturerDTOBase.cs b/Software/Visual_Studio/Tango.BL/DTO/YarnManufacturerDTOBase.cs new file mode 100644 index 000000000..5076d754e --- /dev/null +++ b/Software/Visual_Studio/Tango.BL/DTO/YarnManufacturerDTOBase.cs @@ -0,0 +1,33 @@ + +//------------------------------------------------------------------------------ +// +// 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.Linq; +using System.Text; +using System.Threading.Tasks; +using Tango.BL.Entities; + +namespace Tango.BL.DTO +{ + public abstract class YarnManufacturerDTOBase : ObservableEntityDTO + { + + /// + /// name + /// + public String Name + { + get; set; + } + + } +} diff --git a/Software/Visual_Studio/Tango.BL/DTO/YarnMaterialDTO.cs b/Software/Visual_Studio/Tango.BL/DTO/YarnMaterialDTO.cs new file mode 100644 index 000000000..5b884c13d --- /dev/null +++ b/Software/Visual_Studio/Tango.BL/DTO/YarnMaterialDTO.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 YarnMaterialDTO : YarnMaterialDTOBase + { + + } +} diff --git a/Software/Visual_Studio/Tango.BL/DTO/YarnMaterialDTOBase.cs b/Software/Visual_Studio/Tango.BL/DTO/YarnMaterialDTOBase.cs new file mode 100644 index 000000000..77f9f0aca --- /dev/null +++ b/Software/Visual_Studio/Tango.BL/DTO/YarnMaterialDTOBase.cs @@ -0,0 +1,33 @@ + +//------------------------------------------------------------------------------ +// +// 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.Linq; +using System.Text; +using System.Threading.Tasks; +using Tango.BL.Entities; + +namespace Tango.BL.DTO +{ + public abstract class YarnMaterialDTOBase : ObservableEntityDTO + { + + /// + /// name + /// + public String Name + { + get; set; + } + + } +} diff --git a/Software/Visual_Studio/Tango.BL/DTO/YarnSubFamilyDTO.cs b/Software/Visual_Studio/Tango.BL/DTO/YarnSubFamilyDTO.cs new file mode 100644 index 000000000..7c6b78ef9 --- /dev/null +++ b/Software/Visual_Studio/Tango.BL/DTO/YarnSubFamilyDTO.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 YarnSubFamilyDTO : YarnSubFamilyDTOBase + { + + } +} diff --git a/Software/Visual_Studio/Tango.BL/DTO/YarnSubFamilyDTOBase.cs b/Software/Visual_Studio/Tango.BL/DTO/YarnSubFamilyDTOBase.cs new file mode 100644 index 000000000..5b2149495 --- /dev/null +++ b/Software/Visual_Studio/Tango.BL/DTO/YarnSubFamilyDTOBase.cs @@ -0,0 +1,33 @@ + +//------------------------------------------------------------------------------ +// +// 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.Linq; +using System.Text; +using System.Threading.Tasks; +using Tango.BL.Entities; + +namespace Tango.BL.DTO +{ + public abstract class YarnSubFamilyDTOBase : ObservableEntityDTO + { + + /// + /// name + /// + public String Name + { + get; set; + } + + } +} diff --git a/Software/Visual_Studio/Tango.BL/DTO/YarnTexturingDTO.cs b/Software/Visual_Studio/Tango.BL/DTO/YarnTexturingDTO.cs new file mode 100644 index 000000000..c78a3f6fe --- /dev/null +++ b/Software/Visual_Studio/Tango.BL/DTO/YarnTexturingDTO.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 YarnTexturingDTO : YarnTexturingDTOBase + { + + } +} diff --git a/Software/Visual_Studio/Tango.BL/DTO/YarnTexturingDTOBase.cs b/Software/Visual_Studio/Tango.BL/DTO/YarnTexturingDTOBase.cs new file mode 100644 index 000000000..8c3a0cb97 --- /dev/null +++ b/Software/Visual_Studio/Tango.BL/DTO/YarnTexturingDTOBase.cs @@ -0,0 +1,33 @@ + +//------------------------------------------------------------------------------ +// +// 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.Linq; +using System.Text; +using System.Threading.Tasks; +using Tango.BL.Entities; + +namespace Tango.BL.DTO +{ + public abstract class YarnTexturingDTOBase : ObservableEntityDTO + { + + /// + /// name + /// + public String Name + { + get; set; + } + + } +} diff --git a/Software/Visual_Studio/Tango.BL/DTO/YarnTypeDTO.cs b/Software/Visual_Studio/Tango.BL/DTO/YarnTypeDTO.cs new file mode 100644 index 000000000..2648a9993 --- /dev/null +++ b/Software/Visual_Studio/Tango.BL/DTO/YarnTypeDTO.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 YarnTypeDTO : YarnTypeDTOBase + { + + } +} diff --git a/Software/Visual_Studio/Tango.BL/DTO/YarnTypeDTOBase.cs b/Software/Visual_Studio/Tango.BL/DTO/YarnTypeDTOBase.cs new file mode 100644 index 000000000..401519044 --- /dev/null +++ b/Software/Visual_Studio/Tango.BL/DTO/YarnTypeDTOBase.cs @@ -0,0 +1,33 @@ + +//------------------------------------------------------------------------------ +// +// 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.Linq; +using System.Text; +using System.Threading.Tasks; +using Tango.BL.Entities; + +namespace Tango.BL.DTO +{ + public abstract class YarnTypeDTOBase : ObservableEntityDTO + { + + /// + /// name + /// + public String Name + { + get; set; + } + + } +} diff --git a/Software/Visual_Studio/Tango.BL/Entities/ColorProcessData.cs b/Software/Visual_Studio/Tango.BL/Entities/ColorProcessData.cs new file mode 100644 index 000000000..cd6781446 --- /dev/null +++ b/Software/Visual_Studio/Tango.BL/Entities/ColorProcessData.cs @@ -0,0 +1,24 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Tango.BL.Entities +{ + public class ColorProcessData : ColorProcessDataBase + { + public ColorProcessData() : base() + { + L = 0; + A = 0; + B = 0; + } + public override void Delete(ObservablesContext context) + { + base.Delete(context); + + context.ColorProcessData.Remove(this); + } + } +} diff --git a/Software/Visual_Studio/Tango.BL/Entities/ColorProcessDataBase.cs b/Software/Visual_Studio/Tango.BL/Entities/ColorProcessDataBase.cs new file mode 100644 index 000000000..e49883712 --- /dev/null +++ b/Software/Visual_Studio/Tango.BL/Entities/ColorProcessDataBase.cs @@ -0,0 +1,296 @@ +//------------------------------------------------------------------------------ +// +// 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; +using System.ComponentModel; +using Tango.Core.CustomAttributes; + +namespace Tango.BL.Entities +{ + [Table("COLOR_PROCESS_DATA")] + public abstract class ColorProcessDataBase : ObservableEntity + { + + public event EventHandler ColorNameChanged; + + public event EventHandler InkNlCmChanged; + + public event EventHandler LChanged; + + public event EventHandler AChanged; + + public event EventHandler BChanged; + + public event EventHandler ColorProcessParametersChanged; + + protected String _colorprocessparametersguid; + + /// + /// Gets or sets the colorprocessdatabase color process parameters guid. + /// + + [Column("COLOR_PROCESS_PARAMETERS_GUID")] + [ForeignKey("ColorProcessParameters")] + + public String ColorProcessParametersGuid + { + get + { + return _colorprocessparametersguid; + } + + set + { + if (_colorprocessparametersguid != value) + { + _colorprocessparametersguid = value; + + } + } + } + + protected String _colorname; + + /// + /// Gets or sets the colorprocessdatabase color name. + /// + + [Column("COLOR_NAME")] + + public String ColorName + { + get + { + return _colorname; + } + + set + { + if (_colorname != value) + { + _colorname = value; + + OnColorNameChanged(value); + + } + } + } + + protected Int32 _inknlcm; + + /// + /// Gets or sets the colorprocessdatabase ink nl cm. + /// + + [Column("INK_NL_CM")] + + public Int32 InkNlCm + { + get + { + return _inknlcm; + } + + set + { + if (_inknlcm != value) + { + _inknlcm = value; + + OnInkNlCmChanged(value); + + } + } + } + + protected Double _l; + + /// + /// Gets or sets the colorprocessdatabase l. + /// + + [Column("L")] + + public Double L + { + get + { + return _l; + } + + set + { + if (_l != value) + { + _l = value; + + OnLChanged(value); + + } + } + } + + protected Double _a; + + /// + /// Gets or sets the colorprocessdatabase a. + /// + + [Column("A")] + + public Double A + { + get + { + return _a; + } + + set + { + if (_a != value) + { + _a = value; + + OnAChanged(value); + + } + } + } + + protected Double _b; + + /// + /// Gets or sets the colorprocessdatabase b. + /// + + [Column("B")] + + public Double B + { + get + { + return _b; + } + + set + { + if (_b != value) + { + _b = value; + + OnBChanged(value); + + } + } + } + + protected ColorProcessParameter _colorprocessparameters; + + /// + /// Gets or sets the colorprocessdatabase color process parameters. + /// + + [XmlIgnore] + [JsonIgnore] + public virtual ColorProcessParameter ColorProcessParameters + { + get + { + return _colorprocessparameters; + } + + set + { + if (_colorprocessparameters != value) + { + _colorprocessparameters = value; + + if (ColorProcessParameters != null) + { + ColorProcessParametersGuid = ColorProcessParameters.Guid; + } + + OnColorProcessParametersChanged(value); + + } + } + } + + /// + /// Called when the ColorName has changed. + /// + protected virtual void OnColorNameChanged(String colorname) + { + ColorNameChanged?.Invoke(this, colorname); + RaisePropertyChanged(nameof(ColorName)); + } + + /// + /// Called when the InkNlCm has changed. + /// + protected virtual void OnInkNlCmChanged(Int32 inknlcm) + { + InkNlCmChanged?.Invoke(this, inknlcm); + RaisePropertyChanged(nameof(InkNlCm)); + } + + /// + /// 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 ColorProcessParameters has changed. + /// + protected virtual void OnColorProcessParametersChanged(ColorProcessParameter colorprocessparameters) + { + ColorProcessParametersChanged?.Invoke(this, colorprocessparameters); + RaisePropertyChanged(nameof(ColorProcessParameters)); + } + + /// + /// Initializes a new instance of the class. + /// + public ColorProcessDataBase() : base() + { + } + } +} diff --git a/Software/Visual_Studio/Tango.BL/Entities/ColorProcessFactor.cs b/Software/Visual_Studio/Tango.BL/Entities/ColorProcessFactor.cs new file mode 100644 index 000000000..e20ca528a --- /dev/null +++ b/Software/Visual_Studio/Tango.BL/Entities/ColorProcessFactor.cs @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Tango.BL.Entities +{ + public class ColorProcessFactor : ColorProcessFactorBase + { + public override void Delete(ObservablesContext context) + { + base.Delete(context); + + context.ColorProcessFactor.Remove(this); + } + } +} diff --git a/Software/Visual_Studio/Tango.BL/Entities/ColorProcessFactorBase.cs b/Software/Visual_Studio/Tango.BL/Entities/ColorProcessFactorBase.cs new file mode 100644 index 000000000..5749784a5 --- /dev/null +++ b/Software/Visual_Studio/Tango.BL/Entities/ColorProcessFactorBase.cs @@ -0,0 +1,334 @@ +//------------------------------------------------------------------------------ +// +// 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; +using System.ComponentModel; +using Tango.Core.CustomAttributes; + +namespace Tango.BL.Entities +{ + [Table("COLOR_PROCESS_FACTOR")] + public abstract class ColorProcessFactorBase : ObservableEntity + { + + public event EventHandler ColorNameChanged; + + public event EventHandler InkNlCmChanged; + + public event EventHandler LChanged; + + public event EventHandler AChanged; + + public event EventHandler BChanged; + + public event EventHandler FactorPercentChanged; + + public event EventHandler ColorProcessParametersChanged; + + protected String _colorprocessparametersguid; + + /// + /// Gets or sets the colorprocessfactorbase color process parameters guid. + /// + + [Column("COLOR_PROCESS_PARAMETERS_GUID")] + [ForeignKey("ColorProcessParameters")] + + public String ColorProcessParametersGuid + { + get + { + return _colorprocessparametersguid; + } + + set + { + if (_colorprocessparametersguid != value) + { + _colorprocessparametersguid = value; + + } + } + } + + protected String _colorname; + + /// + /// Gets or sets the colorprocessfactorbase color name. + /// + + [Column("COLOR_NAME")] + + public String ColorName + { + get + { + return _colorname; + } + + set + { + if (_colorname != value) + { + _colorname = value; + + OnColorNameChanged(value); + + } + } + } + + protected Int32 _inknlcm; + + /// + /// Gets or sets the colorprocessfactorbase ink nl cm. + /// + + [Column("INK_NL_CM")] + + public Int32 InkNlCm + { + get + { + return _inknlcm; + } + + set + { + if (_inknlcm != value) + { + _inknlcm = value; + + OnInkNlCmChanged(value); + + } + } + } + + protected Double _l; + + /// + /// Gets or sets the colorprocessfactorbase l. + /// + + [Column("L")] + + public Double L + { + get + { + return _l; + } + + set + { + if (_l != value) + { + _l = value; + + OnLChanged(value); + + } + } + } + + protected Double _a; + + /// + /// Gets or sets the colorprocessfactorbase a. + /// + + [Column("A")] + + public Double A + { + get + { + return _a; + } + + set + { + if (_a != value) + { + _a = value; + + OnAChanged(value); + + } + } + } + + protected Double _b; + + /// + /// Gets or sets the colorprocessfactorbase b. + /// + + [Column("B")] + + public Double B + { + get + { + return _b; + } + + set + { + if (_b != value) + { + _b = value; + + OnBChanged(value); + + } + } + } + + protected Int32 _factorpercent; + + /// + /// Gets or sets the colorprocessfactorbase factor percent. + /// + + [Column("FACTOR_PERCENT")] + + public Int32 FactorPercent + { + get + { + return _factorpercent; + } + + set + { + if (_factorpercent != value) + { + _factorpercent = value; + + OnFactorPercentChanged(value); + + } + } + } + + protected ColorProcessParameter _colorprocessparameters; + + /// + /// Gets or sets the colorprocessfactorbase color process parameters. + /// + + [XmlIgnore] + [JsonIgnore] + public virtual ColorProcessParameter ColorProcessParameters + { + get + { + return _colorprocessparameters; + } + + set + { + if (_colorprocessparameters != value) + { + _colorprocessparameters = value; + + if (ColorProcessParameters != null) + { + ColorProcessParametersGuid = ColorProcessParameters.Guid; + } + + OnColorProcessParametersChanged(value); + + } + } + } + + /// + /// Called when the ColorName has changed. + /// + protected virtual void OnColorNameChanged(String colorname) + { + ColorNameChanged?.Invoke(this, colorname); + RaisePropertyChanged(nameof(ColorName)); + } + + /// + /// Called when the InkNlCm has changed. + /// + protected virtual void OnInkNlCmChanged(Int32 inknlcm) + { + InkNlCmChanged?.Invoke(this, inknlcm); + RaisePropertyChanged(nameof(InkNlCm)); + } + + /// + /// 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 FactorPercent has changed. + /// + protected virtual void OnFactorPercentChanged(Int32 factorpercent) + { + FactorPercentChanged?.Invoke(this, factorpercent); + RaisePropertyChanged(nameof(FactorPercent)); + } + + /// + /// Called when the ColorProcessParameters has changed. + /// + protected virtual void OnColorProcessParametersChanged(ColorProcessParameter colorprocessparameters) + { + ColorProcessParametersChanged?.Invoke(this, colorprocessparameters); + RaisePropertyChanged(nameof(ColorProcessParameters)); + } + + /// + /// Initializes a new instance of the class. + /// + public ColorProcessFactorBase() : base() + { + } + } +} diff --git a/Software/Visual_Studio/Tango.BL/Entities/ColorProcessParameter.cs b/Software/Visual_Studio/Tango.BL/Entities/ColorProcessParameter.cs new file mode 100644 index 000000000..2a679227e --- /dev/null +++ b/Software/Visual_Studio/Tango.BL/Entities/ColorProcessParameter.cs @@ -0,0 +1,32 @@ +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; +using Tango.BL.Enumerations; + +namespace Tango.BL.Entities +{ + public class ColorProcessParameter: ColorProcessParameterBase + { + public ColorProcessParameter() : base() + { + WhitePointL = 92.1815; + WhitePointA = 2.2555; + WhitePointB = -10.9325; + } + public override void Delete(ObservablesContext context) + { + base.Delete(context); + + context.ColorProcessParameters.Remove(this); + } + } +} diff --git a/Software/Visual_Studio/Tango.BL/Entities/ColorProcessParameterBase.cs b/Software/Visual_Studio/Tango.BL/Entities/ColorProcessParameterBase.cs new file mode 100644 index 000000000..a5271b7da --- /dev/null +++ b/Software/Visual_Studio/Tango.BL/Entities/ColorProcessParameterBase.cs @@ -0,0 +1,297 @@ +//------------------------------------------------------------------------------ +// +// 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; +using System.ComponentModel; +using Tango.Core.CustomAttributes; + +namespace Tango.BL.Entities +{ + [Table("COLOR_PROCESS_PARAMETERS")] + public abstract class ColorProcessParameterBase : ObservableEntity + { + + public event EventHandler WhitePointLChanged; + + public event EventHandler WhitePointAChanged; + + public event EventHandler WhitePointBChanged; + + public event EventHandler> ColorProcessDataChanged; + + public event EventHandler> ColorProcessFactorChanged; + + public event EventHandler RmlsExtensionsChanged; + + protected String _rmlsextensionsguid; + + /// + /// Gets or sets the colorprocessparameterbase rmls extensions guid. + /// + + [Column("RMLS_EXTENSIONS_GUID")] + [ForeignKey("RmlsExtensions")] + + public String RmlsExtensionsGuid + { + get + { + return _rmlsextensionsguid; + } + + set + { + if (_rmlsextensionsguid != value) + { + _rmlsextensionsguid = value; + + } + } + } + + protected Double _whitepointl; + + /// + /// Gets or sets the colorprocessparameterbase white point l. + /// + + [Column("WHITE_POINT_L")] + + public Double WhitePointL + { + get + { + return _whitepointl; + } + + set + { + if (_whitepointl != value) + { + _whitepointl = value; + + OnWhitePointLChanged(value); + + } + } + } + + protected Double _whitepointa; + + /// + /// Gets or sets the colorprocessparameterbase white point a. + /// + + [Column("WHITE_POINT_A")] + + public Double WhitePointA + { + get + { + return _whitepointa; + } + + set + { + if (_whitepointa != value) + { + _whitepointa = value; + + OnWhitePointAChanged(value); + + } + } + } + + protected Double _whitepointb; + + /// + /// Gets or sets the colorprocessparameterbase white point b. + /// + + [Column("WHITE_POINT_B")] + + public Double WhitePointB + { + get + { + return _whitepointb; + } + + set + { + if (_whitepointb != value) + { + _whitepointb = value; + + OnWhitePointBChanged(value); + + } + } + } + + protected SynchronizedObservableCollection _colorprocessdata; + + /// + /// Gets or sets the colorprocessparameterbase color process data. + /// + + public virtual SynchronizedObservableCollection ColorProcessData + { + get + { + return _colorprocessdata; + } + + set + { + if (_colorprocessdata != value) + { + _colorprocessdata = value; + + OnColorProcessDataChanged(value); + + } + } + } + + protected SynchronizedObservableCollection _colorprocessfactor; + + /// + /// Gets or sets the colorprocessparameterbase color process factor. + /// + + public virtual SynchronizedObservableCollection ColorProcessFactor + { + get + { + return _colorprocessfactor; + } + + set + { + if (_colorprocessfactor != value) + { + _colorprocessfactor = value; + + OnColorProcessFactorChanged(value); + + } + } + } + + protected RmlsExtension _rmlsextensions; + + /// + /// Gets or sets the colorprocessparameterbase rmls extensions. + /// + + [XmlIgnore] + [JsonIgnore] + public virtual RmlsExtension RmlsExtensions + { + get + { + return _rmlsextensions; + } + + set + { + if (_rmlsextensions != value) + { + _rmlsextensions = value; + + if (RmlsExtensions != null) + { + RmlsExtensionsGuid = RmlsExtensions.Guid; + } + + OnRmlsExtensionsChanged(value); + + } + } + } + + /// + /// 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 ColorProcessData has changed. + /// + protected virtual void OnColorProcessDataChanged(SynchronizedObservableCollection colorprocessdata) + { + ColorProcessDataChanged?.Invoke(this, colorprocessdata); + RaisePropertyChanged(nameof(ColorProcessData)); + } + + /// + /// Called when the ColorProcessFactor has changed. + /// + protected virtual void OnColorProcessFactorChanged(SynchronizedObservableCollection colorprocessfactor) + { + ColorProcessFactorChanged?.Invoke(this, colorprocessfactor); + RaisePropertyChanged(nameof(ColorProcessFactor)); + } + + /// + /// Called when the RmlsExtensions has changed. + /// + protected virtual void OnRmlsExtensionsChanged(RmlsExtension rmlsextensions) + { + RmlsExtensionsChanged?.Invoke(this, rmlsextensions); + RaisePropertyChanged(nameof(RmlsExtensions)); + } + + /// + /// Initializes a new instance of the class. + /// + public ColorProcessParameterBase() : base() + { + + ColorProcessData = new SynchronizedObservableCollection(); + + ColorProcessFactor = new SynchronizedObservableCollection(); + + } + } +} diff --git a/Software/Visual_Studio/Tango.BL/Entities/RmlBase.cs b/Software/Visual_Studio/Tango.BL/Entities/RmlBase.cs index 8e07bcd8c..c922c5d1e 100644 --- a/Software/Visual_Studio/Tango.BL/Entities/RmlBase.cs +++ b/Software/Visual_Studio/Tango.BL/Entities/RmlBase.cs @@ -135,6 +135,8 @@ namespace Tango.BL.Entities public event EventHandler> ProcessParametersTablesGroupsChanged; + public event EventHandler> RmlsExtensionsChanged; + public event EventHandler> RmlsSpoolsChanged; public event EventHandler> SitesRmlsChanged; @@ -1866,6 +1868,31 @@ namespace Tango.BL.Entities } } + protected SynchronizedObservableCollection _rmlsextensions; + + /// + /// Gets or sets the rmlbase rmls extensions. + /// + + public virtual SynchronizedObservableCollection RmlsExtensions + { + get + { + return _rmlsextensions; + } + + set + { + if (_rmlsextensions != value) + { + _rmlsextensions = value; + + OnRmlsExtensionsChanged(value); + + } + } + } + protected SynchronizedObservableCollection _rmlsspools; /// @@ -2402,6 +2429,15 @@ namespace Tango.BL.Entities RaisePropertyChanged(nameof(ProcessParametersTablesGroups)); } + /// + /// Called when the RmlsExtensions has changed. + /// + protected virtual void OnRmlsExtensionsChanged(SynchronizedObservableCollection rmlsextensions) + { + RmlsExtensionsChanged?.Invoke(this, rmlsextensions); + RaisePropertyChanged(nameof(RmlsExtensions)); + } + /// /// Called when the RmlsSpools has changed. /// @@ -2436,6 +2472,8 @@ namespace Tango.BL.Entities ProcessParametersTablesGroups = new SynchronizedObservableCollection(); + RmlsExtensions = new SynchronizedObservableCollection(); + RmlsSpools = new SynchronizedObservableCollection(); SitesRmls = new SynchronizedObservableCollection(); diff --git a/Software/Visual_Studio/Tango.BL/Entities/RmlsExtension.cs b/Software/Visual_Studio/Tango.BL/Entities/RmlsExtension.cs index bf326ad3a..9436ab48e 100644 --- a/Software/Visual_Studio/Tango.BL/Entities/RmlsExtension.cs +++ b/Software/Visual_Studio/Tango.BL/Entities/RmlsExtension.cs @@ -1,13 +1,154 @@ -using System; +using Newtonsoft.Json; +using System; using System.Collections.Generic; +using System.ComponentModel.DataAnnotations.Schema; +using System.Data.Entity; using System.Linq; using System.Text; using System.Threading.Tasks; +using System.Windows.Media; +using Tango.BL.Builders; +using Tango.BL.Enumerations; +using Tango.BL.Serialization; namespace Tango.BL.Entities { public class RmlsExtension : RmlsExtensionBase { + #region Name + protected override void OnYarnMaterialChanged(YarnMaterial yarnmaterial) + { + base.OnYarnMaterialChanged(yarnmaterial); + RaisePropertyChanged(nameof(Name)); + } + + protected override void OnYarnBrandChanged(YarnBrand yarnbrand) + { + base.OnYarnBrandChanged(yarnbrand); + RaisePropertyChanged(nameof(Name)); + } + + + [NotMapped] + [JsonIgnore] + public string Name + { + get + { + if (YarnManufacturer == null) + return ""; + StringBuilder sb = new StringBuilder(YarnManufacturer.Name); + if (YarnBrand != null && !String.IsNullOrEmpty(YarnBrand.Name)) + sb.Append("-" + YarnBrand.Name); + sb.Append("-" + LinearDensity.ToString()); + return sb.ToString(); + } + + } + #endregion + + #region Density count and Fiber count + protected override void OnUnitChanged(int unit) + { + base.OnUnitChanged(unit); + UpdateDencityCount(); + UpdateFiberCount(); + } + + protected override void OnLinearDensityChanged(int lineardensity) + { + base.OnLinearDensityChanged(lineardensity); + UpdateDencityCount(); + UpdateFiberCount(); + RaisePropertyChanged(nameof(Name)); + } + + protected override void OnFilamentCountChanged(int filamentcount) + { + base.OnFilamentCountChanged(filamentcount); + UpdateFiberCount(); + } + + private void UpdateDencityCount() + { + RaisePropertyChanged(nameof(DencityCount)); + } + + private void UpdateFiberCount() + { + RaisePropertyChanged(nameof(FiberCount)); + } + + [NotMapped] + [JsonIgnore] + public int DencityCount + { + get + { + if (YarnUnit.ToDescription() == "Tex") + return Convert.ToInt32(LinearDensity) * 9; + if (YarnUnit.ToDescription() == "DTEX") + return (int)(Convert.ToInt32(LinearDensity) * 0.9); + if (YarnUnit.ToDescription() == "Ne") + return (int) (5315 / Convert.ToInt32(LinearDensity)); + if (YarnUnit.ToDescription() == "Nm") + return (int)(9000 / Convert.ToInt32(LinearDensity)); + return 0; + } + } + + [NotMapped] + [JsonIgnore] + public string FiberCount + { + get + { + if (DencityCount == 0) + return ""; + + var number = FilamentCount / DencityCount; + if (number < 1.0 && number >= 0.3) + return "Micro"; + if (number < 2.4 && number >= 1.0) + return "Fine"; + if (number <= 7.0 && number >= 2.4) + return "Medium"; + if ( number > 7.0) + return "Coarse"; + return ""; + } + } + #endregion + + #region value to enum conversion + + [NotMapped] + [JsonIgnore] + public YarnUnits YarnUnit + { + get { return (YarnUnits)Unit; } + set { Unit = (int)value; + RaisePropertyChangedAuto(); } + } + + [NotMapped] + [JsonIgnore] + public TwistDirections YarnTwistDirections + { + get { return (TwistDirections)TwistDirection; } + set { base.TwistDirection = (int?)value; + RaisePropertyChangedAuto(); } + } + + [NotMapped] + [JsonIgnore] + public Plies YarnPlies + { + get { return (Plies)Plies; } + set { base.Plies = (int)value; + RaisePropertyChangedAuto(); } + } + #endregion } } diff --git a/Software/Visual_Studio/Tango.BL/Entities/RmlsExtensionBase.cs b/Software/Visual_Studio/Tango.BL/Entities/RmlsExtensionBase.cs index a87812638..54157c644 100644 --- a/Software/Visual_Studio/Tango.BL/Entities/RmlsExtensionBase.cs +++ b/Software/Visual_Studio/Tango.BL/Entities/RmlsExtensionBase.cs @@ -27,80 +27,1866 @@ namespace Tango.BL.Entities public abstract class RmlsExtensionBase : ObservableEntity { - public event EventHandler NameChanged; + public event EventHandler CreatedChanged; - public event EventHandler DescriptionChanged; + public event EventHandler CountryChanged; - protected String _name; + public event EventHandler LinearDensityChanged; + + public event EventHandler UnitChanged; + + public event EventHandler PliesChanged; + + public event EventHandler FilamentCountChanged; + + public event EventHandler TwistTpmChanged; + + public event EventHandler> TwistDirectionChanged; + + public event EventHandler> MinElongationChanged; + + public event EventHandler> MaxElongationChanged; + + public event EventHandler> MinMaxForceNChanged; + + public event EventHandler> MaxMaxForceNChanged; + + public event EventHandler> MinElasticityChanged; + + public event EventHandler> MaxElasticityChanged; + + public event EventHandler> MinTenacityChanged; + + public event EventHandler> MaxTenacityChanged; + + public event EventHandler FinishingChanged; + + public event EventHandler FileNameChanged; + + public event EventHandler DataChanged; + + public event EventHandler> ColorProcessParametersChanged; + + public event EventHandler RmlChanged; + + public event EventHandler UserChanged; + + public event EventHandler YarnApplicationsChanged; + + public event EventHandler YarnBrandChanged; + + public event EventHandler YarnColorChanged; + + public event EventHandler YarnEndUseChanged; + + public event EventHandler YarnFamilyChanged; + + public event EventHandler YarnGeometryChanged; + + public event EventHandler YarnGlossLevelChanged; + + public event EventHandler YarnGroupChanged; + + public event EventHandler YarnIndustrysectorChanged; + + public event EventHandler YarnManufacturerChanged; + + public event EventHandler YarnMaterialChanged; + + public event EventHandler YarnSubFamilyChanged; + + public event EventHandler YarnTexturingChanged; + + public event EventHandler YarnTypeChanged; + + protected String _rmlguid; + + /// + /// Gets or sets the rmlsextensionbase rml guid. + /// + + [Column("RML_GUID")] + [ForeignKey("Rml")] + + public String RmlGuid + { + get + { + return _rmlguid; + } + + set + { + if (_rmlguid != value) + { + _rmlguid = value; + + } + } + } + + protected String _userguid; + + /// + /// Gets or sets the rmlsextensionbase user guid. + /// + + [Column("USER_GUID")] + [ForeignKey("User")] + + public String UserGuid + { + get + { + return _userguid; + } + + set + { + if (_userguid != value) + { + _userguid = value; + + } + } + } + + protected DateTime _created; + + /// + /// Gets or sets the rmlsextensionbase created. + /// + + [Column("CREATED")] + + public DateTime Created + { + get + { + return _created; + } + + set + { + if (_created != value) + { + _created = value; + + OnCreatedChanged(value); + + } + } + } + + protected String _yarnmanufacturerguid; + + /// + /// Gets or sets the rmlsextensionbase yarn manufacturer guid. + /// + + [Column("YARN_MANUFACTURER_GUID")] + [ForeignKey("YarnManufacturer")] + + public String YarnManufacturerGuid + { + get + { + return _yarnmanufacturerguid; + } + + set + { + if (_yarnmanufacturerguid != value) + { + _yarnmanufacturerguid = value; + + } + } + } + + protected String _yarnbrandguid; + + /// + /// Gets or sets the rmlsextensionbase yarn brand guid. + /// + + [Column("YARN_BRAND_GUID")] + [ForeignKey("YarnBrand")] + + public String YarnBrandGuid + { + get + { + return _yarnbrandguid; + } + + set + { + if (_yarnbrandguid != value) + { + _yarnbrandguid = value; + + } + } + } + + protected String _country; + + /// + /// Gets or sets the rmlsextensionbase country. + /// + + [Column("COUNTRY")] + + public String Country + { + get + { + return _country; + } + + set + { + if (_country != value) + { + _country = value; + + OnCountryChanged(value); + + } + } + } + + protected String _yarnenduseguid; + + /// + /// Gets or sets the rmlsextensionbase yarn end use guid. + /// + + [Column("YARN_END_USE_GUID")] + [ForeignKey("YarnEndUse")] + + public String YarnEndUseGuid + { + get + { + return _yarnenduseguid; + } + + set + { + if (_yarnenduseguid != value) + { + _yarnenduseguid = value; + + } + } + } + + protected String _yarnapplicationsguid; + + /// + /// Gets or sets the rmlsextensionbase yarn applications guid. + /// + + [Column("YARN_APPLICATIONS_GUID")] + [ForeignKey("YarnApplications")] + + public String YarnApplicationsGuid + { + get + { + return _yarnapplicationsguid; + } + + set + { + if (_yarnapplicationsguid != value) + { + _yarnapplicationsguid = value; + + } + } + } + + protected String _yarnindustrysectorguid; + + /// + /// Gets or sets the rmlsextensionbase yarn industrysector guid. + /// + + [Column("YARN_INDUSTRYSECTOR_GUID")] + [ForeignKey("YarnIndustrysector")] + + public String YarnIndustrysectorGuid + { + get + { + return _yarnindustrysectorguid; + } + + set + { + if (_yarnindustrysectorguid != value) + { + _yarnindustrysectorguid = value; + + } + } + } + + protected String _yarnmaterialguid; + + /// + /// Gets or sets the rmlsextensionbase yarn material guid. + /// + + [Column("YARN_MATERIAL_GUID")] + [ForeignKey("YarnMaterial")] + + public String YarnMaterialGuid + { + get + { + return _yarnmaterialguid; + } + + set + { + if (_yarnmaterialguid != value) + { + _yarnmaterialguid = value; + + } + } + } + + protected String _yarntypeguid; + + /// + /// Gets or sets the rmlsextensionbase yarn type guid. + /// + + [Column("YARN_TYPE_GUID")] + [ForeignKey("YarnType")] + + public String YarnTypeGuid + { + get + { + return _yarntypeguid; + } + + set + { + if (_yarntypeguid != value) + { + _yarntypeguid = value; + + } + } + } + + protected String _yarnfamilyguid; + + /// + /// Gets or sets the rmlsextensionbase yarn family guid. + /// + + [Column("YARN_FAMILY_GUID")] + [ForeignKey("YarnFamily")] + + public String YarnFamilyGuid + { + get + { + return _yarnfamilyguid; + } + + set + { + if (_yarnfamilyguid != value) + { + _yarnfamilyguid = value; + + } + } + } + + protected String _yarnsubfamilyguid; + + /// + /// Gets or sets the rmlsextensionbase yarn sub family guid. + /// + + [Column("YARN_SUB_FAMILY_GUID")] + [ForeignKey("YarnSubFamily")] + + public String YarnSubFamilyGuid + { + get + { + return _yarnsubfamilyguid; + } + + set + { + if (_yarnsubfamilyguid != value) + { + _yarnsubfamilyguid = value; + + } + } + } + + protected String _yarngroupguid; + + /// + /// Gets or sets the rmlsextensionbase yarn group guid. + /// + + [Column("YARN_GROUP_GUID")] + [ForeignKey("YarnGroup")] + + public String YarnGroupGuid + { + get + { + return _yarngroupguid; + } + + set + { + if (_yarngroupguid != value) + { + _yarngroupguid = value; + + } + } + } + + protected String _yarntexturingguid; + + /// + /// Gets or sets the rmlsextensionbase yarn texturing guid. + /// + + [Column("YARN_TEXTURING_GUID")] + [ForeignKey("YarnTexturing")] + + public String YarnTexturingGuid + { + get + { + return _yarntexturingguid; + } + + set + { + if (_yarntexturingguid != value) + { + _yarntexturingguid = value; + + } + } + } + + protected String _yarngeometryguid; + + /// + /// Gets or sets the rmlsextensionbase yarn geometry guid. + /// + + [Column("YARN_GEOMETRY_GUID")] + [ForeignKey("YarnGeometry")] + + public String YarnGeometryGuid + { + get + { + return _yarngeometryguid; + } + + set + { + if (_yarngeometryguid != value) + { + _yarngeometryguid = value; + + } + } + } + + protected String _yarncolorguid; + + /// + /// Gets or sets the rmlsextensionbase yarn color guid. + /// + + [Column("YARN_COLOR_GUID")] + [ForeignKey("YarnColor")] + + public String YarnColorGuid + { + get + { + return _yarncolorguid; + } + + set + { + if (_yarncolorguid != value) + { + _yarncolorguid = value; + + } + } + } + + protected String _yarnglosslevelguid; + + /// + /// Gets or sets the rmlsextensionbase yarn gloss level guid. + /// + + [Column("YARN_GLOSS_LEVEL_GUID")] + [ForeignKey("YarnGlossLevel")] + + public String YarnGlossLevelGuid + { + get + { + return _yarnglosslevelguid; + } + + set + { + if (_yarnglosslevelguid != value) + { + _yarnglosslevelguid = value; + + } + } + } + + protected Int32 _lineardensity; + + /// + /// Gets or sets the rmlsextensionbase linear density. + /// + + [Column("LINEAR_DENSITY")] + + public Int32 LinearDensity + { + get + { + return _lineardensity; + } + + set + { + if (_lineardensity != value) + { + _lineardensity = value; + + OnLinearDensityChanged(value); + + } + } + } + + protected Int32 _unit; + + /// + /// Gets or sets the rmlsextensionbase unit. + /// + + [Column("UNIT")] + + public Int32 Unit + { + get + { + return _unit; + } + + set + { + if (_unit != value) + { + _unit = value; + + OnUnitChanged(value); + + } + } + } + + protected Int32 _plies; + + /// + /// Gets or sets the rmlsextensionbase plies. + /// + + [Column("PLIES")] + + public Int32 Plies + { + get + { + return _plies; + } + + set + { + if (_plies != value) + { + _plies = value; + + OnPliesChanged(value); + + } + } + } + + protected Int32 _filamentcount; + + /// + /// Gets or sets the rmlsextensionbase filament count. + /// + + [Column("FILAMENT_COUNT")] + + public Int32 FilamentCount + { + get + { + return _filamentcount; + } + + set + { + if (_filamentcount != value) + { + _filamentcount = value; + + OnFilamentCountChanged(value); + + } + } + } + + protected Int32 _twisttpm; + + /// + /// Gets or sets the rmlsextensionbase twist tpm. + /// + + [Column("TWIST_TPM")] + + public Int32 TwistTpm + { + get + { + return _twisttpm; + } + + set + { + if (_twisttpm != value) + { + _twisttpm = value; + + OnTwistTpmChanged(value); + + } + } + } + + protected Nullable _twistdirection; + + /// + /// Gets or sets the rmlsextensionbase twist direction. + /// + + [Column("TWIST_DIRECTION")] + + public Nullable TwistDirection + { + get + { + return _twistdirection; + } + + set + { + if (_twistdirection != value) + { + _twistdirection = value; + + OnTwistDirectionChanged(value); + + } + } + } + + protected Nullable _minelongation; + + /// + /// Gets or sets the rmlsextensionbase min elongation. + /// + + [Column("MIN_ELONGATION")] + + public Nullable MinElongation + { + get + { + return _minelongation; + } + + set + { + if (_minelongation != value) + { + _minelongation = value; + + OnMinElongationChanged(value); + + } + } + } + + protected Nullable _maxelongation; + + /// + /// Gets or sets the rmlsextensionbase max elongation. + /// + + [Column("MAX_ELONGATION")] + + public Nullable MaxElongation + { + get + { + return _maxelongation; + } + + set + { + if (_maxelongation != value) + { + _maxelongation = value; + + OnMaxElongationChanged(value); + + } + } + } + + protected Nullable _minmaxforcen; + + /// + /// Gets or sets the rmlsextensionbase min max force n. + /// + + [Column("MIN_MAX_FORCE_N")] + + public Nullable MinMaxForceN + { + get + { + return _minmaxforcen; + } + + set + { + if (_minmaxforcen != value) + { + _minmaxforcen = value; + + OnMinMaxForceNChanged(value); + + } + } + } + + protected Nullable _maxmaxforcen; + + /// + /// Gets or sets the rmlsextensionbase max max force n. + /// + + [Column("MAX_MAX_FORCE_N")] + + public Nullable MaxMaxForceN + { + get + { + return _maxmaxforcen; + } + + set + { + if (_maxmaxforcen != value) + { + _maxmaxforcen = value; + + OnMaxMaxForceNChanged(value); + + } + } + } + + protected Nullable _minelasticity; + + /// + /// Gets or sets the rmlsextensionbase min elasticity. + /// + + [Column("MIN_ELASTICITY")] + + public Nullable MinElasticity + { + get + { + return _minelasticity; + } + + set + { + if (_minelasticity != value) + { + _minelasticity = value; + + OnMinElasticityChanged(value); + + } + } + } + + protected Nullable _maxelasticity; + + /// + /// Gets or sets the rmlsextensionbase max elasticity. + /// + + [Column("MAX_ELASTICITY")] + + public Nullable MaxElasticity + { + get + { + return _maxelasticity; + } + + set + { + if (_maxelasticity != value) + { + _maxelasticity = value; + + OnMaxElasticityChanged(value); + + } + } + } + + protected Nullable _mintenacity; + + /// + /// Gets or sets the rmlsextensionbase min tenacity. + /// + + [Column("MIN_TENACITY")] + + public Nullable MinTenacity + { + get + { + return _mintenacity; + } + + set + { + if (_mintenacity != value) + { + _mintenacity = value; + + OnMinTenacityChanged(value); + + } + } + } + + protected Nullable _maxtenacity; + + /// + /// Gets or sets the rmlsextensionbase max tenacity. + /// + + [Column("MAX_TENACITY")] + + public Nullable MaxTenacity + { + get + { + return _maxtenacity; + } + + set + { + if (_maxtenacity != value) + { + _maxtenacity = value; + + OnMaxTenacityChanged(value); + + } + } + } + + protected String _finishing; + + /// + /// Gets or sets the rmlsextensionbase finishing. + /// + + [Column("FINISHING")] + + public String Finishing + { + get + { + return _finishing; + } + + set + { + if (_finishing != value) + { + _finishing = value; + + OnFinishingChanged(value); + + } + } + } + + protected String _filename; + + /// + /// Gets or sets the rmlsextensionbase file name. + /// + + [Column("FILE_NAME")] + + public String FileName + { + get + { + return _filename; + } + + set + { + if (_filename != value) + { + _filename = value; + + OnFileNameChanged(value); + + } + } + } + + protected Byte[] _data; + + /// + /// Gets or sets the rmlsextensionbase data. + /// + + [Column("DATA")] + + public Byte[] Data + { + get + { + return _data; + } + + set + { + if (_data != value) + { + _data = value; + + OnDataChanged(value); + + } + } + } + + protected SynchronizedObservableCollection _colorprocessparameters; + + /// + /// Gets or sets the rmlsextensionbase color process parameters. + /// + + public virtual SynchronizedObservableCollection ColorProcessParameters + { + get + { + return _colorprocessparameters; + } + + set + { + if (_colorprocessparameters != value) + { + _colorprocessparameters = value; + + OnColorProcessParametersChanged(value); + + } + } + } + + protected Rml _rml; + + /// + /// Gets or sets the rmlsextensionbase rml. + /// + + [XmlIgnore] + [JsonIgnore] + public virtual Rml Rml + { + get + { + return _rml; + } + + set + { + if (_rml != value) + { + _rml = value; + + if (Rml != null) + { + RmlGuid = Rml.Guid; + } + + OnRmlChanged(value); + + } + } + } + + protected User _user; + + /// + /// Gets or sets the rmlsextensionbase user. + /// + + [XmlIgnore] + [JsonIgnore] + public virtual User User + { + get + { + return _user; + } + + set + { + if (_user != value) + { + _user = value; + + if (User != null) + { + UserGuid = User.Guid; + } + + OnUserChanged(value); + + } + } + } + + protected YarnApplication _yarnapplications; + + /// + /// Gets or sets the rmlsextensionbase yarn applications. + /// + + [XmlIgnore] + [JsonIgnore] + public virtual YarnApplication YarnApplications + { + get + { + return _yarnapplications; + } + + set + { + if (_yarnapplications != value) + { + _yarnapplications = value; + + if (YarnApplications != null) + { + YarnApplicationsGuid = YarnApplications.Guid; + } + + OnYarnApplicationsChanged(value); + + } + } + } + + protected YarnBrand _yarnbrand; + + /// + /// Gets or sets the rmlsextensionbase yarn brand. + /// + + [XmlIgnore] + [JsonIgnore] + public virtual YarnBrand YarnBrand + { + get + { + return _yarnbrand; + } + + set + { + if (_yarnbrand != value) + { + _yarnbrand = value; + + if (YarnBrand != null) + { + YarnBrandGuid = YarnBrand.Guid; + } + + OnYarnBrandChanged(value); + + } + } + } + + protected YarnColor _yarncolor; + + /// + /// Gets or sets the rmlsextensionbase yarn color. + /// + + [XmlIgnore] + [JsonIgnore] + public virtual YarnColor YarnColor + { + get + { + return _yarncolor; + } + + set + { + if (_yarncolor != value) + { + _yarncolor = value; + + if (YarnColor != null) + { + YarnColorGuid = YarnColor.Guid; + } + + OnYarnColorChanged(value); + + } + } + } + + protected YarnEndUse _yarnenduse; + + /// + /// Gets or sets the rmlsextensionbase yarn end use. + /// + + [XmlIgnore] + [JsonIgnore] + public virtual YarnEndUse YarnEndUse + { + get + { + return _yarnenduse; + } + + set + { + if (_yarnenduse != value) + { + _yarnenduse = value; + + if (YarnEndUse != null) + { + YarnEndUseGuid = YarnEndUse.Guid; + } + + OnYarnEndUseChanged(value); + + } + } + } + + protected YarnFamily _yarnfamily; + + /// + /// Gets or sets the rmlsextensionbase yarn family. + /// + + [XmlIgnore] + [JsonIgnore] + public virtual YarnFamily YarnFamily + { + get + { + return _yarnfamily; + } + + set + { + if (_yarnfamily != value) + { + _yarnfamily = value; + + if (YarnFamily != null) + { + YarnFamilyGuid = YarnFamily.Guid; + } + + OnYarnFamilyChanged(value); + + } + } + } + + protected YarnGeometry _yarngeometry; + + /// + /// Gets or sets the rmlsextensionbase yarn geometry. + /// + + [XmlIgnore] + [JsonIgnore] + public virtual YarnGeometry YarnGeometry + { + get + { + return _yarngeometry; + } + + set + { + if (_yarngeometry != value) + { + _yarngeometry = value; + + if (YarnGeometry != null) + { + YarnGeometryGuid = YarnGeometry.Guid; + } + + OnYarnGeometryChanged(value); + + } + } + } + + protected YarnGlossLevel _yarnglosslevel; + + /// + /// Gets or sets the rmlsextensionbase yarn gloss level. + /// + + [XmlIgnore] + [JsonIgnore] + public virtual YarnGlossLevel YarnGlossLevel + { + get + { + return _yarnglosslevel; + } + + set + { + if (_yarnglosslevel != value) + { + _yarnglosslevel = value; + + if (YarnGlossLevel != null) + { + YarnGlossLevelGuid = YarnGlossLevel.Guid; + } + + OnYarnGlossLevelChanged(value); + + } + } + } + + protected YarnGroup _yarngroup; + + /// + /// Gets or sets the rmlsextensionbase yarn group. + /// + + [XmlIgnore] + [JsonIgnore] + public virtual YarnGroup YarnGroup + { + get + { + return _yarngroup; + } + + set + { + if (_yarngroup != value) + { + _yarngroup = value; + + if (YarnGroup != null) + { + YarnGroupGuid = YarnGroup.Guid; + } + + OnYarnGroupChanged(value); + + } + } + } + + protected YarnIndustrysector _yarnindustrysector; + + /// + /// Gets or sets the rmlsextensionbase yarn industrysector. + /// + + [XmlIgnore] + [JsonIgnore] + public virtual YarnIndustrysector YarnIndustrysector + { + get + { + return _yarnindustrysector; + } + + set + { + if (_yarnindustrysector != value) + { + _yarnindustrysector = value; + + if (YarnIndustrysector != null) + { + YarnIndustrysectorGuid = YarnIndustrysector.Guid; + } + + OnYarnIndustrysectorChanged(value); + + } + } + } + + protected YarnManufacturer _yarnmanufacturer; + + /// + /// Gets or sets the rmlsextensionbase yarn manufacturer. + /// + + [XmlIgnore] + [JsonIgnore] + public virtual YarnManufacturer YarnManufacturer + { + get + { + return _yarnmanufacturer; + } + + set + { + if (_yarnmanufacturer != value) + { + _yarnmanufacturer = value; + + if (YarnManufacturer != null) + { + YarnManufacturerGuid = YarnManufacturer.Guid; + } + + OnYarnManufacturerChanged(value); + + } + } + } + + protected YarnMaterial _yarnmaterial; /// - /// Gets or sets the rmlsextensionbase name. + /// Gets or sets the rmlsextensionbase yarn materials. /// - [Column("NAME")] + [XmlIgnore] + [JsonIgnore] + public virtual YarnMaterial YarnMaterial + { + get + { + return _yarnmaterial; + } + + set + { + if (_yarnmaterial != value) + { + _yarnmaterial = value; + + if (YarnMaterial != null) + { + YarnMaterialGuid = YarnMaterial.Guid; + } + + OnYarnMaterialChanged(value); + + } + } + } + + protected YarnSubFamily _yarnsubfamily; + + /// + /// Gets or sets the rmlsextensionbase yarn sub family. + /// - public String Name + [XmlIgnore] + [JsonIgnore] + public virtual YarnSubFamily YarnSubFamily { get { - return _name; + return _yarnsubfamily; } set { - if (_name != value) + if (_yarnsubfamily != value) { - _name = value; + _yarnsubfamily = value; - OnNameChanged(value); + if (YarnSubFamily != null) + { + YarnSubFamilyGuid = YarnSubFamily.Guid; + } + + OnYarnSubFamilyChanged(value); } } } - protected String _description; + protected YarnTexturing _yarntexturing; /// - /// Gets or sets the rmlsextensionbase description. + /// Gets or sets the rmlsextensionbase yarn texturing. /// - [Column("DESCRIPTION")] + [XmlIgnore] + [JsonIgnore] + public virtual YarnTexturing YarnTexturing + { + get + { + return _yarntexturing; + } + + set + { + if (_yarntexturing != value) + { + _yarntexturing = value; + + if (YarnTexturing != null) + { + YarnTexturingGuid = YarnTexturing.Guid; + } + + OnYarnTexturingChanged(value); + + } + } + } + + protected YarnType _yarntype; - public String Description + /// + /// Gets or sets the rmlsextensionbase yarn type. + /// + + [XmlIgnore] + [JsonIgnore] + public virtual YarnType YarnType { get { - return _description; + return _yarntype; } set { - if (_description != value) + if (_yarntype != value) { - _description = value; + _yarntype = value; + + if (YarnType != null) + { + YarnTypeGuid = YarnType.Guid; + } - OnDescriptionChanged(value); + OnYarnTypeChanged(value); } } } /// - /// Called when the Name has changed. + /// Called when the Created has changed. + /// + protected virtual void OnCreatedChanged(DateTime created) + { + CreatedChanged?.Invoke(this, created); + RaisePropertyChanged(nameof(Created)); + } + + /// + /// Called when the Country has changed. + /// + protected virtual void OnCountryChanged(String country) + { + CountryChanged?.Invoke(this, country); + RaisePropertyChanged(nameof(Country)); + } + + /// + /// Called when the LinearDensity has changed. + /// + protected virtual void OnLinearDensityChanged(Int32 lineardensity) + { + LinearDensityChanged?.Invoke(this, lineardensity); + RaisePropertyChanged(nameof(LinearDensity)); + } + + /// + /// Called when the Unit has changed. + /// + protected virtual void OnUnitChanged(Int32 unit) + { + UnitChanged?.Invoke(this, unit); + RaisePropertyChanged(nameof(Unit)); + } + + /// + /// Called when the Plies has changed. + /// + protected virtual void OnPliesChanged(Int32 plies) + { + PliesChanged?.Invoke(this, plies); + RaisePropertyChanged(nameof(Plies)); + } + + /// + /// Called when the FilamentCount has changed. + /// + protected virtual void OnFilamentCountChanged(Int32 filamentcount) + { + FilamentCountChanged?.Invoke(this, filamentcount); + RaisePropertyChanged(nameof(FilamentCount)); + } + + /// + /// Called when the TwistTpm has changed. + /// + protected virtual void OnTwistTpmChanged(Int32 twisttpm) + { + TwistTpmChanged?.Invoke(this, twisttpm); + RaisePropertyChanged(nameof(TwistTpm)); + } + + /// + /// Called when the TwistDirection has changed. + /// + protected virtual void OnTwistDirectionChanged(Nullable twistdirection) + { + TwistDirectionChanged?.Invoke(this, twistdirection); + RaisePropertyChanged(nameof(TwistDirection)); + } + + /// + /// Called when the MinElongation has changed. + /// + protected virtual void OnMinElongationChanged(Nullable minelongation) + { + MinElongationChanged?.Invoke(this, minelongation); + RaisePropertyChanged(nameof(MinElongation)); + } + + /// + /// Called when the MaxElongation has changed. + /// + protected virtual void OnMaxElongationChanged(Nullable maxelongation) + { + MaxElongationChanged?.Invoke(this, maxelongation); + RaisePropertyChanged(nameof(MaxElongation)); + } + + /// + /// Called when the MinMaxForceN has changed. + /// + protected virtual void OnMinMaxForceNChanged(Nullable minmaxforcen) + { + MinMaxForceNChanged?.Invoke(this, minmaxforcen); + RaisePropertyChanged(nameof(MinMaxForceN)); + } + + /// + /// Called when the MaxMaxForceN has changed. + /// + protected virtual void OnMaxMaxForceNChanged(Nullable maxmaxforcen) + { + MaxMaxForceNChanged?.Invoke(this, maxmaxforcen); + RaisePropertyChanged(nameof(MaxMaxForceN)); + } + + /// + /// Called when the MinElasticity has changed. + /// + protected virtual void OnMinElasticityChanged(Nullable minelasticity) + { + MinElasticityChanged?.Invoke(this, minelasticity); + RaisePropertyChanged(nameof(MinElasticity)); + } + + /// + /// Called when the MaxElasticity has changed. + /// + protected virtual void OnMaxElasticityChanged(Nullable maxelasticity) + { + MaxElasticityChanged?.Invoke(this, maxelasticity); + RaisePropertyChanged(nameof(MaxElasticity)); + } + + /// + /// Called when the MinTenacity has changed. + /// + protected virtual void OnMinTenacityChanged(Nullable mintenacity) + { + MinTenacityChanged?.Invoke(this, mintenacity); + RaisePropertyChanged(nameof(MinTenacity)); + } + + /// + /// Called when the MaxTenacity has changed. + /// + protected virtual void OnMaxTenacityChanged(Nullable maxtenacity) + { + MaxTenacityChanged?.Invoke(this, maxtenacity); + RaisePropertyChanged(nameof(MaxTenacity)); + } + + /// + /// Called when the Finishing has changed. + /// + protected virtual void OnFinishingChanged(String finishing) + { + FinishingChanged?.Invoke(this, finishing); + RaisePropertyChanged(nameof(Finishing)); + } + + /// + /// Called when the FileName has changed. + /// + protected virtual void OnFileNameChanged(String filename) + { + FileNameChanged?.Invoke(this, filename); + RaisePropertyChanged(nameof(FileName)); + } + + /// + /// Called when the Data has changed. + /// + protected virtual void OnDataChanged(Byte[] data) + { + DataChanged?.Invoke(this, data); + RaisePropertyChanged(nameof(Data)); + } + + /// + /// Called when the ColorProcessParameters has changed. + /// + protected virtual void OnColorProcessParametersChanged(SynchronizedObservableCollection colorprocessparameters) + { + ColorProcessParametersChanged?.Invoke(this, colorprocessparameters); + RaisePropertyChanged(nameof(ColorProcessParameters)); + } + + /// + /// Called when the Rml has changed. + /// + protected virtual void OnRmlChanged(Rml rml) + { + RmlChanged?.Invoke(this, rml); + RaisePropertyChanged(nameof(Rml)); + } + + /// + /// Called when the User has changed. + /// + protected virtual void OnUserChanged(User user) + { + UserChanged?.Invoke(this, user); + RaisePropertyChanged(nameof(User)); + } + + /// + /// Called when the YarnApplications has changed. + /// + protected virtual void OnYarnApplicationsChanged(YarnApplication yarnapplications) + { + YarnApplicationsChanged?.Invoke(this, yarnapplications); + RaisePropertyChanged(nameof(YarnApplications)); + } + + /// + /// Called when the YarnBrand has changed. + /// + protected virtual void OnYarnBrandChanged(YarnBrand yarnbrand) + { + YarnBrandChanged?.Invoke(this, yarnbrand); + RaisePropertyChanged(nameof(YarnBrand)); + } + + /// + /// Called when the YarnColor has changed. + /// + protected virtual void OnYarnColorChanged(YarnColor yarncolor) + { + YarnColorChanged?.Invoke(this, yarncolor); + RaisePropertyChanged(nameof(YarnColor)); + } + + /// + /// Called when the YarnEndUse has changed. + /// + protected virtual void OnYarnEndUseChanged(YarnEndUse yarnenduse) + { + YarnEndUseChanged?.Invoke(this, yarnenduse); + RaisePropertyChanged(nameof(YarnEndUse)); + } + + /// + /// Called when the YarnFamily has changed. + /// + protected virtual void OnYarnFamilyChanged(YarnFamily yarnfamily) + { + YarnFamilyChanged?.Invoke(this, yarnfamily); + RaisePropertyChanged(nameof(YarnFamily)); + } + + /// + /// Called when the YarnGeometry has changed. + /// + protected virtual void OnYarnGeometryChanged(YarnGeometry yarngeometry) + { + YarnGeometryChanged?.Invoke(this, yarngeometry); + RaisePropertyChanged(nameof(YarnGeometry)); + } + + /// + /// Called when the YarnGlossLevel has changed. /// - protected virtual void OnNameChanged(String name) + protected virtual void OnYarnGlossLevelChanged(YarnGlossLevel yarnglosslevel) { - NameChanged?.Invoke(this, name); - RaisePropertyChanged(nameof(Name)); + YarnGlossLevelChanged?.Invoke(this, yarnglosslevel); + RaisePropertyChanged(nameof(YarnGlossLevel)); } /// - /// Called when the Description has changed. + /// Called when the YarnGroup has changed. /// - protected virtual void OnDescriptionChanged(String description) + protected virtual void OnYarnGroupChanged(YarnGroup yarngroup) { - DescriptionChanged?.Invoke(this, description); - RaisePropertyChanged(nameof(Description)); + YarnGroupChanged?.Invoke(this, yarngroup); + RaisePropertyChanged(nameof(YarnGroup)); + } + + /// + /// Called when the YarnIndustrysector has changed. + /// + protected virtual void OnYarnIndustrysectorChanged(YarnIndustrysector yarnindustrysector) + { + YarnIndustrysectorChanged?.Invoke(this, yarnindustrysector); + RaisePropertyChanged(nameof(YarnIndustrysector)); + } + + /// + /// Called when the YarnManufacturer has changed. + /// + protected virtual void OnYarnManufacturerChanged(YarnManufacturer yarnmanufacturer) + { + YarnManufacturerChanged?.Invoke(this, yarnmanufacturer); + RaisePropertyChanged(nameof(YarnManufacturer)); + } + + /// + /// Called when the YarnMaterial has changed. + /// + protected virtual void OnYarnMaterialChanged(YarnMaterial yarnmaterial) + { + YarnMaterialChanged?.Invoke(this, yarnmaterial); + RaisePropertyChanged(nameof(YarnMaterial)); + } + + /// + /// Called when the YarnSubFamily has changed. + /// + protected virtual void OnYarnSubFamilyChanged(YarnSubFamily yarnsubfamily) + { + YarnSubFamilyChanged?.Invoke(this, yarnsubfamily); + RaisePropertyChanged(nameof(YarnSubFamily)); + } + + /// + /// Called when the YarnTexturing has changed. + /// + protected virtual void OnYarnTexturingChanged(YarnTexturing yarntexturing) + { + YarnTexturingChanged?.Invoke(this, yarntexturing); + RaisePropertyChanged(nameof(YarnTexturing)); + } + + /// + /// Called when the YarnType has changed. + /// + protected virtual void OnYarnTypeChanged(YarnType yarntype) + { + YarnTypeChanged?.Invoke(this, yarntype); + RaisePropertyChanged(nameof(YarnType)); } /// @@ -108,6 +1894,9 @@ namespace Tango.BL.Entities /// public RmlsExtensionBase() : base() { + + ColorProcessParameters = new SynchronizedObservableCollection(); + } } } diff --git a/Software/Visual_Studio/Tango.BL/Entities/UserBase.cs b/Software/Visual_Studio/Tango.BL/Entities/UserBase.cs index eb6eae4f7..29981fd75 100644 --- a/Software/Visual_Studio/Tango.BL/Entities/UserBase.cs +++ b/Software/Visual_Studio/Tango.BL/Entities/UserBase.cs @@ -53,6 +53,8 @@ namespace Tango.BL.Entities public event EventHandler OrganizationChanged; + public event EventHandler> RmlsExtensionsChanged; + public event EventHandler> TangoVersionsChanged; public event EventHandler> UsersRolesChanged; @@ -491,6 +493,31 @@ namespace Tango.BL.Entities } } + protected SynchronizedObservableCollection _rmlsextensions; + + /// + /// Gets or sets the userbase rmls extensions. + /// + + public virtual SynchronizedObservableCollection RmlsExtensions + { + get + { + return _rmlsextensions; + } + + set + { + if (_rmlsextensions != value) + { + _rmlsextensions = value; + + OnRmlsExtensionsChanged(value); + + } + } + } + protected SynchronizedObservableCollection _tangoversions; /// @@ -658,6 +685,15 @@ namespace Tango.BL.Entities RaisePropertyChanged(nameof(Organization)); } + /// + /// Called when the RmlsExtensions has changed. + /// + protected virtual void OnRmlsExtensionsChanged(SynchronizedObservableCollection rmlsextensions) + { + RmlsExtensionsChanged?.Invoke(this, rmlsextensions); + RaisePropertyChanged(nameof(RmlsExtensions)); + } + /// /// Called when the TangoVersions has changed. /// @@ -692,6 +728,8 @@ namespace Tango.BL.Entities MachinesEvents = new SynchronizedObservableCollection(); + RmlsExtensions = new SynchronizedObservableCollection(); + TangoVersions = new SynchronizedObservableCollection(); UsersRoles = new SynchronizedObservableCollection(); diff --git a/Software/Visual_Studio/Tango.BL/Entities/YarnApplication.cs b/Software/Visual_Studio/Tango.BL/Entities/YarnApplication.cs new file mode 100644 index 000000000..86bc38932 --- /dev/null +++ b/Software/Visual_Studio/Tango.BL/Entities/YarnApplication.cs @@ -0,0 +1,16 @@ +//------------------------------------------------------------------------------ +// +// 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! +// +//------------------------------------------------------------------------------ + +namespace Tango.BL.Entities +{ + public class YarnApplication: YarnApplicationBase + { + } +} \ No newline at end of file diff --git a/Software/Visual_Studio/Tango.BL/Entities/YarnApplicationBase.cs b/Software/Visual_Studio/Tango.BL/Entities/YarnApplicationBase.cs new file mode 100644 index 000000000..ec74bfbbb --- /dev/null +++ b/Software/Visual_Studio/Tango.BL/Entities/YarnApplicationBase.cs @@ -0,0 +1,114 @@ +//------------------------------------------------------------------------------ +// +// 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; +using System.ComponentModel; +using Tango.Core.CustomAttributes; + +namespace Tango.BL.Entities +{ + [Table("YARN_APPLICATIONS")] + public abstract class YarnApplicationBase : ObservableEntity + { + + public event EventHandler NameChanged; + + public event EventHandler> RmlsExtensionsChanged; + + protected String _name; + + /// + /// Gets or sets the yarnapplicationbase name. + /// + + [Column("NAME")] + + public String Name + { + get + { + return _name; + } + + set + { + if (_name != value) + { + _name = value; + + OnNameChanged(value); + + } + } + } + + protected SynchronizedObservableCollection _rmlsextensions; + + /// + /// Gets or sets the yarnapplicationbase rmls extensions. + /// + + public virtual SynchronizedObservableCollection RmlsExtensions + { + get + { + return _rmlsextensions; + } + + set + { + if (_rmlsextensions != value) + { + _rmlsextensions = value; + + OnRmlsExtensionsChanged(value); + + } + } + } + + /// + /// Called when the Name has changed. + /// + protected virtual void OnNameChanged(String name) + { + NameChanged?.Invoke(this, name); + RaisePropertyChanged(nameof(Name)); + } + + /// + /// Called when the RmlsExtensions has changed. + /// + protected virtual void OnRmlsExtensionsChanged(SynchronizedObservableCollection rmlsextensions) + { + RmlsExtensionsChanged?.Invoke(this, rmlsextensions); + RaisePropertyChanged(nameof(RmlsExtensions)); + } + + /// + /// Initializes a new instance of the class. + /// + public YarnApplicationBase() : base() + { + + RmlsExtensions = new SynchronizedObservableCollection(); + + } + } +} diff --git a/Software/Visual_Studio/Tango.BL/Entities/YarnBrand.cs b/Software/Visual_Studio/Tango.BL/Entities/YarnBrand.cs new file mode 100644 index 000000000..dbf5b5e95 --- /dev/null +++ b/Software/Visual_Studio/Tango.BL/Entities/YarnBrand.cs @@ -0,0 +1,16 @@ +//------------------------------------------------------------------------------ +// +// 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! +// +//------------------------------------------------------------------------------ + +namespace Tango.BL.Entities +{ + public class YarnBrand: YarnBrandBase + { + } +} \ No newline at end of file diff --git a/Software/Visual_Studio/Tango.BL/Entities/YarnBrandBase.cs b/Software/Visual_Studio/Tango.BL/Entities/YarnBrandBase.cs new file mode 100644 index 000000000..5f743da43 --- /dev/null +++ b/Software/Visual_Studio/Tango.BL/Entities/YarnBrandBase.cs @@ -0,0 +1,114 @@ +//------------------------------------------------------------------------------ +// +// 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; +using System.ComponentModel; +using Tango.Core.CustomAttributes; + +namespace Tango.BL.Entities +{ + [Table("YARN_BRAND")] + public abstract class YarnBrandBase : ObservableEntity + { + + public event EventHandler NameChanged; + + public event EventHandler> RmlsExtensionsChanged; + + protected String _name; + + /// + /// Gets or sets the yarnbrandbase name. + /// + + [Column("NAME")] + + public String Name + { + get + { + return _name; + } + + set + { + if (_name != value) + { + _name = value; + + OnNameChanged(value); + + } + } + } + + protected SynchronizedObservableCollection _rmlsextensions; + + /// + /// Gets or sets the yarnbrandbase rmls extensions. + /// + + public virtual SynchronizedObservableCollection RmlsExtensions + { + get + { + return _rmlsextensions; + } + + set + { + if (_rmlsextensions != value) + { + _rmlsextensions = value; + + OnRmlsExtensionsChanged(value); + + } + } + } + + /// + /// Called when the Name has changed. + /// + protected virtual void OnNameChanged(String name) + { + NameChanged?.Invoke(this, name); + RaisePropertyChanged(nameof(Name)); + } + + /// + /// Called when the RmlsExtensions has changed. + /// + protected virtual void OnRmlsExtensionsChanged(SynchronizedObservableCollection rmlsextensions) + { + RmlsExtensionsChanged?.Invoke(this, rmlsextensions); + RaisePropertyChanged(nameof(RmlsExtensions)); + } + + /// + /// Initializes a new instance of the class. + /// + public YarnBrandBase() : base() + { + + RmlsExtensions = new SynchronizedObservableCollection(); + + } + } +} diff --git a/Software/Visual_Studio/Tango.BL/Entities/YarnColor.cs b/Software/Visual_Studio/Tango.BL/Entities/YarnColor.cs new file mode 100644 index 000000000..eb35a37fc --- /dev/null +++ b/Software/Visual_Studio/Tango.BL/Entities/YarnColor.cs @@ -0,0 +1,16 @@ +//------------------------------------------------------------------------------ +// +// 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! +// +//------------------------------------------------------------------------------ + +namespace Tango.BL.Entities +{ + public class YarnColor : YarnColorBase + { + } +} \ No newline at end of file diff --git a/Software/Visual_Studio/Tango.BL/Entities/YarnColorBase.cs b/Software/Visual_Studio/Tango.BL/Entities/YarnColorBase.cs new file mode 100644 index 000000000..e92628012 --- /dev/null +++ b/Software/Visual_Studio/Tango.BL/Entities/YarnColorBase.cs @@ -0,0 +1,114 @@ +//------------------------------------------------------------------------------ +// +// 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; +using System.ComponentModel; +using Tango.Core.CustomAttributes; + +namespace Tango.BL.Entities +{ + [Table("YARN_COLOR")] + public abstract class YarnColorBase : ObservableEntity + { + + public event EventHandler NameChanged; + + public event EventHandler> RmlsExtensionsChanged; + + protected String _name; + + /// + /// Gets or sets the yarncolorbase name. + /// + + [Column("NAME")] + + public String Name + { + get + { + return _name; + } + + set + { + if (_name != value) + { + _name = value; + + OnNameChanged(value); + + } + } + } + + protected SynchronizedObservableCollection _rmlsextensions; + + /// + /// Gets or sets the yarncolorbase rmls extensions. + /// + + public virtual SynchronizedObservableCollection RmlsExtensions + { + get + { + return _rmlsextensions; + } + + set + { + if (_rmlsextensions != value) + { + _rmlsextensions = value; + + OnRmlsExtensionsChanged(value); + + } + } + } + + /// + /// Called when the Name has changed. + /// + protected virtual void OnNameChanged(String name) + { + NameChanged?.Invoke(this, name); + RaisePropertyChanged(nameof(Name)); + } + + /// + /// Called when the RmlsExtensions has changed. + /// + protected virtual void OnRmlsExtensionsChanged(SynchronizedObservableCollection rmlsextensions) + { + RmlsExtensionsChanged?.Invoke(this, rmlsextensions); + RaisePropertyChanged(nameof(RmlsExtensions)); + } + + /// + /// Initializes a new instance of the class. + /// + public YarnColorBase() : base() + { + + RmlsExtensions = new SynchronizedObservableCollection(); + + } + } +} diff --git a/Software/Visual_Studio/Tango.BL/Entities/YarnEndUse.cs b/Software/Visual_Studio/Tango.BL/Entities/YarnEndUse.cs new file mode 100644 index 000000000..a01f95fd5 --- /dev/null +++ b/Software/Visual_Studio/Tango.BL/Entities/YarnEndUse.cs @@ -0,0 +1,16 @@ +//------------------------------------------------------------------------------ +// +// 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! +// +//------------------------------------------------------------------------------ + +namespace Tango.BL.Entities +{ + public class YarnEndUse : YarnEndUseBase + { + } +} \ No newline at end of file diff --git a/Software/Visual_Studio/Tango.BL/Entities/YarnEndUseBase.cs b/Software/Visual_Studio/Tango.BL/Entities/YarnEndUseBase.cs new file mode 100644 index 000000000..25c51eacd --- /dev/null +++ b/Software/Visual_Studio/Tango.BL/Entities/YarnEndUseBase.cs @@ -0,0 +1,114 @@ +//------------------------------------------------------------------------------ +// +// 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; +using System.ComponentModel; +using Tango.Core.CustomAttributes; + +namespace Tango.BL.Entities +{ + [Table("YARN_END_USE")] + public abstract class YarnEndUseBase : ObservableEntity + { + + public event EventHandler NameChanged; + + public event EventHandler> RmlsExtensionsChanged; + + protected String _name; + + /// + /// Gets or sets the yarnendusebase name. + /// + + [Column("NAME")] + + public String Name + { + get + { + return _name; + } + + set + { + if (_name != value) + { + _name = value; + + OnNameChanged(value); + + } + } + } + + protected SynchronizedObservableCollection _rmlsextensions; + + /// + /// Gets or sets the yarnendusebase rmls extensions. + /// + + public virtual SynchronizedObservableCollection RmlsExtensions + { + get + { + return _rmlsextensions; + } + + set + { + if (_rmlsextensions != value) + { + _rmlsextensions = value; + + OnRmlsExtensionsChanged(value); + + } + } + } + + /// + /// Called when the Name has changed. + /// + protected virtual void OnNameChanged(String name) + { + NameChanged?.Invoke(this, name); + RaisePropertyChanged(nameof(Name)); + } + + /// + /// Called when the RmlsExtensions has changed. + /// + protected virtual void OnRmlsExtensionsChanged(SynchronizedObservableCollection rmlsextensions) + { + RmlsExtensionsChanged?.Invoke(this, rmlsextensions); + RaisePropertyChanged(nameof(RmlsExtensions)); + } + + /// + /// Initializes a new instance of the class. + /// + public YarnEndUseBase() : base() + { + + RmlsExtensions = new SynchronizedObservableCollection(); + + } + } +} diff --git a/Software/Visual_Studio/Tango.BL/Entities/YarnFamily.cs b/Software/Visual_Studio/Tango.BL/Entities/YarnFamily.cs new file mode 100644 index 000000000..f3b9383fd --- /dev/null +++ b/Software/Visual_Studio/Tango.BL/Entities/YarnFamily.cs @@ -0,0 +1,16 @@ +//------------------------------------------------------------------------------ +// +// 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! +// +//------------------------------------------------------------------------------ + +namespace Tango.BL.Entities +{ + public class YarnFamily : YarnFamilyBase + { + } +} \ No newline at end of file diff --git a/Software/Visual_Studio/Tango.BL/Entities/YarnFamilyBase.cs b/Software/Visual_Studio/Tango.BL/Entities/YarnFamilyBase.cs new file mode 100644 index 000000000..7dd46677e --- /dev/null +++ b/Software/Visual_Studio/Tango.BL/Entities/YarnFamilyBase.cs @@ -0,0 +1,114 @@ +//------------------------------------------------------------------------------ +// +// 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; +using System.ComponentModel; +using Tango.Core.CustomAttributes; + +namespace Tango.BL.Entities +{ + [Table("YARN_FAMILY")] + public abstract class YarnFamilyBase : ObservableEntity + { + + public event EventHandler NameChanged; + + public event EventHandler> RmlsExtensionsChanged; + + protected String _name; + + /// + /// Gets or sets the yarnfamilybase name. + /// + + [Column("NAME")] + + public String Name + { + get + { + return _name; + } + + set + { + if (_name != value) + { + _name = value; + + OnNameChanged(value); + + } + } + } + + protected SynchronizedObservableCollection _rmlsextensions; + + /// + /// Gets or sets the yarnfamilybase rmls extensions. + /// + + public virtual SynchronizedObservableCollection RmlsExtensions + { + get + { + return _rmlsextensions; + } + + set + { + if (_rmlsextensions != value) + { + _rmlsextensions = value; + + OnRmlsExtensionsChanged(value); + + } + } + } + + /// + /// Called when the Name has changed. + /// + protected virtual void OnNameChanged(String name) + { + NameChanged?.Invoke(this, name); + RaisePropertyChanged(nameof(Name)); + } + + /// + /// Called when the RmlsExtensions has changed. + /// + protected virtual void OnRmlsExtensionsChanged(SynchronizedObservableCollection rmlsextensions) + { + RmlsExtensionsChanged?.Invoke(this, rmlsextensions); + RaisePropertyChanged(nameof(RmlsExtensions)); + } + + /// + /// Initializes a new instance of the class. + /// + public YarnFamilyBase() : base() + { + + RmlsExtensions = new SynchronizedObservableCollection(); + + } + } +} diff --git a/Software/Visual_Studio/Tango.BL/Entities/YarnGeometry.cs b/Software/Visual_Studio/Tango.BL/Entities/YarnGeometry.cs new file mode 100644 index 000000000..3028558a6 --- /dev/null +++ b/Software/Visual_Studio/Tango.BL/Entities/YarnGeometry.cs @@ -0,0 +1,16 @@ +//------------------------------------------------------------------------------ +// +// 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! +// +//------------------------------------------------------------------------------ + +namespace Tango.BL.Entities +{ + public class YarnGeometry : YarnGeometryBase + { + } +} \ No newline at end of file diff --git a/Software/Visual_Studio/Tango.BL/Entities/YarnGeometryBase.cs b/Software/Visual_Studio/Tango.BL/Entities/YarnGeometryBase.cs new file mode 100644 index 000000000..7ee00b957 --- /dev/null +++ b/Software/Visual_Studio/Tango.BL/Entities/YarnGeometryBase.cs @@ -0,0 +1,114 @@ +//------------------------------------------------------------------------------ +// +// 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; +using System.ComponentModel; +using Tango.Core.CustomAttributes; + +namespace Tango.BL.Entities +{ + [Table("YARN_GEOMETRY")] + public abstract class YarnGeometryBase : ObservableEntity + { + + public event EventHandler NameChanged; + + public event EventHandler> RmlsExtensionsChanged; + + protected String _name; + + /// + /// Gets or sets the yarngeometrybase name. + /// + + [Column("NAME")] + + public String Name + { + get + { + return _name; + } + + set + { + if (_name != value) + { + _name = value; + + OnNameChanged(value); + + } + } + } + + protected SynchronizedObservableCollection _rmlsextensions; + + /// + /// Gets or sets the yarngeometrybase rmls extensions. + /// + + public virtual SynchronizedObservableCollection RmlsExtensions + { + get + { + return _rmlsextensions; + } + + set + { + if (_rmlsextensions != value) + { + _rmlsextensions = value; + + OnRmlsExtensionsChanged(value); + + } + } + } + + /// + /// Called when the Name has changed. + /// + protected virtual void OnNameChanged(String name) + { + NameChanged?.Invoke(this, name); + RaisePropertyChanged(nameof(Name)); + } + + /// + /// Called when the RmlsExtensions has changed. + /// + protected virtual void OnRmlsExtensionsChanged(SynchronizedObservableCollection rmlsextensions) + { + RmlsExtensionsChanged?.Invoke(this, rmlsextensions); + RaisePropertyChanged(nameof(RmlsExtensions)); + } + + /// + /// Initializes a new instance of the class. + /// + public YarnGeometryBase() : base() + { + + RmlsExtensions = new SynchronizedObservableCollection(); + + } + } +} diff --git a/Software/Visual_Studio/Tango.BL/Entities/YarnGlossLevel.cs b/Software/Visual_Studio/Tango.BL/Entities/YarnGlossLevel.cs new file mode 100644 index 000000000..9d368c2e4 --- /dev/null +++ b/Software/Visual_Studio/Tango.BL/Entities/YarnGlossLevel.cs @@ -0,0 +1,16 @@ +//------------------------------------------------------------------------------ +// +// 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! +// +//------------------------------------------------------------------------------ + +namespace Tango.BL.Entities +{ + public class YarnGlossLevel : YarnGlossLevelBase + { + } +} \ No newline at end of file diff --git a/Software/Visual_Studio/Tango.BL/Entities/YarnGlossLevelBase.cs b/Software/Visual_Studio/Tango.BL/Entities/YarnGlossLevelBase.cs new file mode 100644 index 000000000..ed87750e7 --- /dev/null +++ b/Software/Visual_Studio/Tango.BL/Entities/YarnGlossLevelBase.cs @@ -0,0 +1,114 @@ +//------------------------------------------------------------------------------ +// +// 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; +using System.ComponentModel; +using Tango.Core.CustomAttributes; + +namespace Tango.BL.Entities +{ + [Table("YARN_GLOSS_LEVEL")] + public abstract class YarnGlossLevelBase : ObservableEntity + { + + public event EventHandler NameChanged; + + public event EventHandler> RmlsExtensionsChanged; + + protected String _name; + + /// + /// Gets or sets the yarnglosslevelbase name. + /// + + [Column("NAME")] + + public String Name + { + get + { + return _name; + } + + set + { + if (_name != value) + { + _name = value; + + OnNameChanged(value); + + } + } + } + + protected SynchronizedObservableCollection _rmlsextensions; + + /// + /// Gets or sets the yarnglosslevelbase rmls extensions. + /// + + public virtual SynchronizedObservableCollection RmlsExtensions + { + get + { + return _rmlsextensions; + } + + set + { + if (_rmlsextensions != value) + { + _rmlsextensions = value; + + OnRmlsExtensionsChanged(value); + + } + } + } + + /// + /// Called when the Name has changed. + /// + protected virtual void OnNameChanged(String name) + { + NameChanged?.Invoke(this, name); + RaisePropertyChanged(nameof(Name)); + } + + /// + /// Called when the RmlsExtensions has changed. + /// + protected virtual void OnRmlsExtensionsChanged(SynchronizedObservableCollection rmlsextensions) + { + RmlsExtensionsChanged?.Invoke(this, rmlsextensions); + RaisePropertyChanged(nameof(RmlsExtensions)); + } + + /// + /// Initializes a new instance of the class. + /// + public YarnGlossLevelBase() : base() + { + + RmlsExtensions = new SynchronizedObservableCollection(); + + } + } +} diff --git a/Software/Visual_Studio/Tango.BL/Entities/YarnGroup.cs b/Software/Visual_Studio/Tango.BL/Entities/YarnGroup.cs new file mode 100644 index 000000000..bd021a09b --- /dev/null +++ b/Software/Visual_Studio/Tango.BL/Entities/YarnGroup.cs @@ -0,0 +1,16 @@ +//------------------------------------------------------------------------------ +// +// 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! +// +//------------------------------------------------------------------------------ + +namespace Tango.BL.Entities +{ + public class YarnGroup : YarnGroupBase + { + } +} \ No newline at end of file diff --git a/Software/Visual_Studio/Tango.BL/Entities/YarnGroupBase.cs b/Software/Visual_Studio/Tango.BL/Entities/YarnGroupBase.cs new file mode 100644 index 000000000..bc07ba6b2 --- /dev/null +++ b/Software/Visual_Studio/Tango.BL/Entities/YarnGroupBase.cs @@ -0,0 +1,114 @@ +//------------------------------------------------------------------------------ +// +// 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; +using System.ComponentModel; +using Tango.Core.CustomAttributes; + +namespace Tango.BL.Entities +{ + [Table("YARN_GROUP")] + public abstract class YarnGroupBase : ObservableEntity + { + + public event EventHandler NameChanged; + + public event EventHandler> RmlsExtensionsChanged; + + protected String _name; + + /// + /// Gets or sets the yarngroupbase name. + /// + + [Column("NAME")] + + public String Name + { + get + { + return _name; + } + + set + { + if (_name != value) + { + _name = value; + + OnNameChanged(value); + + } + } + } + + protected SynchronizedObservableCollection _rmlsextensions; + + /// + /// Gets or sets the yarngroupbase rmls extensions. + /// + + public virtual SynchronizedObservableCollection RmlsExtensions + { + get + { + return _rmlsextensions; + } + + set + { + if (_rmlsextensions != value) + { + _rmlsextensions = value; + + OnRmlsExtensionsChanged(value); + + } + } + } + + /// + /// Called when the Name has changed. + /// + protected virtual void OnNameChanged(String name) + { + NameChanged?.Invoke(this, name); + RaisePropertyChanged(nameof(Name)); + } + + /// + /// Called when the RmlsExtensions has changed. + /// + protected virtual void OnRmlsExtensionsChanged(SynchronizedObservableCollection rmlsextensions) + { + RmlsExtensionsChanged?.Invoke(this, rmlsextensions); + RaisePropertyChanged(nameof(RmlsExtensions)); + } + + /// + /// Initializes a new instance of the class. + /// + public YarnGroupBase() : base() + { + + RmlsExtensions = new SynchronizedObservableCollection(); + + } + } +} diff --git a/Software/Visual_Studio/Tango.BL/Entities/YarnIndustrysector.cs b/Software/Visual_Studio/Tango.BL/Entities/YarnIndustrysector.cs new file mode 100644 index 000000000..00e9e6401 --- /dev/null +++ b/Software/Visual_Studio/Tango.BL/Entities/YarnIndustrysector.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Tango.BL.Entities +{ + public class YarnIndustrysector : YarnIndustrysectorBase + { + } +} diff --git a/Software/Visual_Studio/Tango.BL/Entities/YarnIndustrysectorBase.cs b/Software/Visual_Studio/Tango.BL/Entities/YarnIndustrysectorBase.cs new file mode 100644 index 000000000..f807ae88e --- /dev/null +++ b/Software/Visual_Studio/Tango.BL/Entities/YarnIndustrysectorBase.cs @@ -0,0 +1,114 @@ +//------------------------------------------------------------------------------ +// +// 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; +using System.ComponentModel; +using Tango.Core.CustomAttributes; + +namespace Tango.BL.Entities +{ + [Table("YARN_INDUSTRYSECTOR")] + public abstract class YarnIndustrysectorBase : ObservableEntity + { + + public event EventHandler NameChanged; + + public event EventHandler> RmlsExtensionsChanged; + + protected String _name; + + /// + /// Gets or sets the yarnindustrysectorbase name. + /// + + [Column("NAME")] + + public String Name + { + get + { + return _name; + } + + set + { + if (_name != value) + { + _name = value; + + OnNameChanged(value); + + } + } + } + + protected SynchronizedObservableCollection _rmlsextensions; + + /// + /// Gets or sets the yarnindustrysectorbase rmls extensions. + /// + + public virtual SynchronizedObservableCollection RmlsExtensions + { + get + { + return _rmlsextensions; + } + + set + { + if (_rmlsextensions != value) + { + _rmlsextensions = value; + + OnRmlsExtensionsChanged(value); + + } + } + } + + /// + /// Called when the Name has changed. + /// + protected virtual void OnNameChanged(String name) + { + NameChanged?.Invoke(this, name); + RaisePropertyChanged(nameof(Name)); + } + + /// + /// Called when the RmlsExtensions has changed. + /// + protected virtual void OnRmlsExtensionsChanged(SynchronizedObservableCollection rmlsextensions) + { + RmlsExtensionsChanged?.Invoke(this, rmlsextensions); + RaisePropertyChanged(nameof(RmlsExtensions)); + } + + /// + /// Initializes a new instance of the class. + /// + public YarnIndustrysectorBase() : base() + { + + RmlsExtensions = new SynchronizedObservableCollection(); + + } + } +} diff --git a/Software/Visual_Studio/Tango.BL/Entities/YarnManufacturer.cs b/Software/Visual_Studio/Tango.BL/Entities/YarnManufacturer.cs new file mode 100644 index 000000000..3c0b4384e --- /dev/null +++ b/Software/Visual_Studio/Tango.BL/Entities/YarnManufacturer.cs @@ -0,0 +1,16 @@ +//------------------------------------------------------------------------------ +// +// 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! +// +//------------------------------------------------------------------------------ + +namespace Tango.BL.Entities +{ + public class YarnManufacturer : YarnManufacturerBase + { + } +} \ No newline at end of file diff --git a/Software/Visual_Studio/Tango.BL/Entities/YarnManufacturerBase.cs b/Software/Visual_Studio/Tango.BL/Entities/YarnManufacturerBase.cs new file mode 100644 index 000000000..d119e54b2 --- /dev/null +++ b/Software/Visual_Studio/Tango.BL/Entities/YarnManufacturerBase.cs @@ -0,0 +1,114 @@ +//------------------------------------------------------------------------------ +// +// 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; +using System.ComponentModel; +using Tango.Core.CustomAttributes; + +namespace Tango.BL.Entities +{ + [Table("YARN_MANUFACTURER")] + public abstract class YarnManufacturerBase : ObservableEntity + { + + public event EventHandler NameChanged; + + public event EventHandler> RmlsExtensionsChanged; + + protected String _name; + + /// + /// Gets or sets the yarnmanufacturerbase name. + /// + + [Column("NAME")] + + public String Name + { + get + { + return _name; + } + + set + { + if (_name != value) + { + _name = value; + + OnNameChanged(value); + + } + } + } + + protected SynchronizedObservableCollection _rmlsextensions; + + /// + /// Gets or sets the yarnmanufacturerbase rmls extensions. + /// + + public virtual SynchronizedObservableCollection RmlsExtensions + { + get + { + return _rmlsextensions; + } + + set + { + if (_rmlsextensions != value) + { + _rmlsextensions = value; + + OnRmlsExtensionsChanged(value); + + } + } + } + + /// + /// Called when the Name has changed. + /// + protected virtual void OnNameChanged(String name) + { + NameChanged?.Invoke(this, name); + RaisePropertyChanged(nameof(Name)); + } + + /// + /// Called when the RmlsExtensions has changed. + /// + protected virtual void OnRmlsExtensionsChanged(SynchronizedObservableCollection rmlsextensions) + { + RmlsExtensionsChanged?.Invoke(this, rmlsextensions); + RaisePropertyChanged(nameof(RmlsExtensions)); + } + + /// + /// Initializes a new instance of the class. + /// + public YarnManufacturerBase() : base() + { + + RmlsExtensions = new SynchronizedObservableCollection(); + + } + } +} diff --git a/Software/Visual_Studio/Tango.BL/Entities/YarnMaterial.cs b/Software/Visual_Studio/Tango.BL/Entities/YarnMaterial.cs new file mode 100644 index 000000000..508dda1f2 --- /dev/null +++ b/Software/Visual_Studio/Tango.BL/Entities/YarnMaterial.cs @@ -0,0 +1,16 @@ +//------------------------------------------------------------------------------ +// +// 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! +// +//------------------------------------------------------------------------------ + +namespace Tango.BL.Entities +{ + public class YarnMaterial : YarnMaterialBase + { + } +} \ No newline at end of file diff --git a/Software/Visual_Studio/Tango.BL/Entities/YarnMaterialBase.cs b/Software/Visual_Studio/Tango.BL/Entities/YarnMaterialBase.cs new file mode 100644 index 000000000..8c4de2cca --- /dev/null +++ b/Software/Visual_Studio/Tango.BL/Entities/YarnMaterialBase.cs @@ -0,0 +1,114 @@ +//------------------------------------------------------------------------------ +// +// 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; +using System.ComponentModel; +using Tango.Core.CustomAttributes; + +namespace Tango.BL.Entities +{ + [Table("YARN_MATERIALS")] + public abstract class YarnMaterialBase : ObservableEntity + { + + public event EventHandler NameChanged; + + public event EventHandler> RmlsExtensionsChanged; + + protected String _name; + + /// + /// Gets or sets the yarnmaterialbase name. + /// + + [Column("NAME")] + + public String Name + { + get + { + return _name; + } + + set + { + if (_name != value) + { + _name = value; + + OnNameChanged(value); + + } + } + } + + protected SynchronizedObservableCollection _rmlsextensions; + + /// + /// Gets or sets the yarnmaterialbase rmls extensions. + /// + + public virtual SynchronizedObservableCollection RmlsExtensions + { + get + { + return _rmlsextensions; + } + + set + { + if (_rmlsextensions != value) + { + _rmlsextensions = value; + + OnRmlsExtensionsChanged(value); + + } + } + } + + /// + /// Called when the Name has changed. + /// + protected virtual void OnNameChanged(String name) + { + NameChanged?.Invoke(this, name); + RaisePropertyChanged(nameof(Name)); + } + + /// + /// Called when the RmlsExtensions has changed. + /// + protected virtual void OnRmlsExtensionsChanged(SynchronizedObservableCollection rmlsextensions) + { + RmlsExtensionsChanged?.Invoke(this, rmlsextensions); + RaisePropertyChanged(nameof(RmlsExtensions)); + } + + /// + /// Initializes a new instance of the class. + /// + public YarnMaterialBase() : base() + { + + RmlsExtensions = new SynchronizedObservableCollection(); + + } + } +} diff --git a/Software/Visual_Studio/Tango.BL/Entities/YarnSubFamily.cs b/Software/Visual_Studio/Tango.BL/Entities/YarnSubFamily.cs new file mode 100644 index 000000000..e19b3008c --- /dev/null +++ b/Software/Visual_Studio/Tango.BL/Entities/YarnSubFamily.cs @@ -0,0 +1,16 @@ +//------------------------------------------------------------------------------ +// +// 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! +// +//------------------------------------------------------------------------------ + +namespace Tango.BL.Entities +{ + public class YarnSubFamily : YarnSubFamilyBase + { + } +} \ No newline at end of file diff --git a/Software/Visual_Studio/Tango.BL/Entities/YarnSubFamilyBase.cs b/Software/Visual_Studio/Tango.BL/Entities/YarnSubFamilyBase.cs new file mode 100644 index 000000000..baf467257 --- /dev/null +++ b/Software/Visual_Studio/Tango.BL/Entities/YarnSubFamilyBase.cs @@ -0,0 +1,114 @@ +//------------------------------------------------------------------------------ +// +// 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; +using System.ComponentModel; +using Tango.Core.CustomAttributes; + +namespace Tango.BL.Entities +{ + [Table("YARN_SUB_FAMILY")] + public abstract class YarnSubFamilyBase : ObservableEntity + { + + public event EventHandler NameChanged; + + public event EventHandler> RmlsExtensionsChanged; + + protected String _name; + + /// + /// Gets or sets the yarnsubfamilybase name. + /// + + [Column("NAME")] + + public String Name + { + get + { + return _name; + } + + set + { + if (_name != value) + { + _name = value; + + OnNameChanged(value); + + } + } + } + + protected SynchronizedObservableCollection _rmlsextensions; + + /// + /// Gets or sets the yarnsubfamilybase rmls extensions. + /// + + public virtual SynchronizedObservableCollection RmlsExtensions + { + get + { + return _rmlsextensions; + } + + set + { + if (_rmlsextensions != value) + { + _rmlsextensions = value; + + OnRmlsExtensionsChanged(value); + + } + } + } + + /// + /// Called when the Name has changed. + /// + protected virtual void OnNameChanged(String name) + { + NameChanged?.Invoke(this, name); + RaisePropertyChanged(nameof(Name)); + } + + /// + /// Called when the RmlsExtensions has changed. + /// + protected virtual void OnRmlsExtensionsChanged(SynchronizedObservableCollection rmlsextensions) + { + RmlsExtensionsChanged?.Invoke(this, rmlsextensions); + RaisePropertyChanged(nameof(RmlsExtensions)); + } + + /// + /// Initializes a new instance of the class. + /// + public YarnSubFamilyBase() : base() + { + + RmlsExtensions = new SynchronizedObservableCollection(); + + } + } +} diff --git a/Software/Visual_Studio/Tango.BL/Entities/YarnTexturing.cs b/Software/Visual_Studio/Tango.BL/Entities/YarnTexturing.cs new file mode 100644 index 000000000..f61b40f67 --- /dev/null +++ b/Software/Visual_Studio/Tango.BL/Entities/YarnTexturing.cs @@ -0,0 +1,16 @@ +//------------------------------------------------------------------------------ +// +// 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! +// +//------------------------------------------------------------------------------ + +namespace Tango.BL.Entities +{ + public class YarnTexturing : YarnTexturingBase + { + } +} \ No newline at end of file diff --git a/Software/Visual_Studio/Tango.BL/Entities/YarnTexturingBase.cs b/Software/Visual_Studio/Tango.BL/Entities/YarnTexturingBase.cs new file mode 100644 index 000000000..0d736df59 --- /dev/null +++ b/Software/Visual_Studio/Tango.BL/Entities/YarnTexturingBase.cs @@ -0,0 +1,114 @@ +//------------------------------------------------------------------------------ +// +// 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; +using System.ComponentModel; +using Tango.Core.CustomAttributes; + +namespace Tango.BL.Entities +{ + [Table("YARN_TEXTURING")] + public abstract class YarnTexturingBase : ObservableEntity + { + + public event EventHandler NameChanged; + + public event EventHandler> RmlsExtensionsChanged; + + protected String _name; + + /// + /// Gets or sets the yarntexturingbase name. + /// + + [Column("NAME")] + + public String Name + { + get + { + return _name; + } + + set + { + if (_name != value) + { + _name = value; + + OnNameChanged(value); + + } + } + } + + protected SynchronizedObservableCollection _rmlsextensions; + + /// + /// Gets or sets the yarntexturingbase rmls extensions. + /// + + public virtual SynchronizedObservableCollection RmlsExtensions + { + get + { + return _rmlsextensions; + } + + set + { + if (_rmlsextensions != value) + { + _rmlsextensions = value; + + OnRmlsExtensionsChanged(value); + + } + } + } + + /// + /// Called when the Name has changed. + /// + protected virtual void OnNameChanged(String name) + { + NameChanged?.Invoke(this, name); + RaisePropertyChanged(nameof(Name)); + } + + /// + /// Called when the RmlsExtensions has changed. + /// + protected virtual void OnRmlsExtensionsChanged(SynchronizedObservableCollection rmlsextensions) + { + RmlsExtensionsChanged?.Invoke(this, rmlsextensions); + RaisePropertyChanged(nameof(RmlsExtensions)); + } + + /// + /// Initializes a new instance of the class. + /// + public YarnTexturingBase() : base() + { + + RmlsExtensions = new SynchronizedObservableCollection(); + + } + } +} diff --git a/Software/Visual_Studio/Tango.BL/Entities/YarnType.cs b/Software/Visual_Studio/Tango.BL/Entities/YarnType.cs new file mode 100644 index 000000000..97ddd1ffc --- /dev/null +++ b/Software/Visual_Studio/Tango.BL/Entities/YarnType.cs @@ -0,0 +1,16 @@ +//------------------------------------------------------------------------------ +// +// 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! +// +//------------------------------------------------------------------------------ + +namespace Tango.BL.Entities +{ + public class YarnType : YarnTypeBase + { + } +} \ No newline at end of file diff --git a/Software/Visual_Studio/Tango.BL/Entities/YarnTypeBase.cs b/Software/Visual_Studio/Tango.BL/Entities/YarnTypeBase.cs new file mode 100644 index 000000000..b3ae3ba20 --- /dev/null +++ b/Software/Visual_Studio/Tango.BL/Entities/YarnTypeBase.cs @@ -0,0 +1,114 @@ +//------------------------------------------------------------------------------ +// +// 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; +using System.ComponentModel; +using Tango.Core.CustomAttributes; + +namespace Tango.BL.Entities +{ + [Table("YARN_TYPE")] + public abstract class YarnTypeBase : ObservableEntity + { + + public event EventHandler NameChanged; + + public event EventHandler> RmlsExtensionsChanged; + + protected String _name; + + /// + /// Gets or sets the yarntypebase name. + /// + + [Column("NAME")] + + public String Name + { + get + { + return _name; + } + + set + { + if (_name != value) + { + _name = value; + + OnNameChanged(value); + + } + } + } + + protected SynchronizedObservableCollection _rmlsextensions; + + /// + /// Gets or sets the yarntypebase rmls extensions. + /// + + public virtual SynchronizedObservableCollection RmlsExtensions + { + get + { + return _rmlsextensions; + } + + set + { + if (_rmlsextensions != value) + { + _rmlsextensions = value; + + OnRmlsExtensionsChanged(value); + + } + } + } + + /// + /// Called when the Name has changed. + /// + protected virtual void OnNameChanged(String name) + { + NameChanged?.Invoke(this, name); + RaisePropertyChanged(nameof(Name)); + } + + /// + /// Called when the RmlsExtensions has changed. + /// + protected virtual void OnRmlsExtensionsChanged(SynchronizedObservableCollection rmlsextensions) + { + RmlsExtensionsChanged?.Invoke(this, rmlsextensions); + RaisePropertyChanged(nameof(RmlsExtensions)); + } + + /// + /// Initializes a new instance of the class. + /// + public YarnTypeBase() : base() + { + + RmlsExtensions = new SynchronizedObservableCollection(); + + } + } +} diff --git a/Software/Visual_Studio/Tango.BL/Enumerations/Plies.cs b/Software/Visual_Studio/Tango.BL/Enumerations/Plies.cs new file mode 100644 index 000000000..d099bee5d --- /dev/null +++ b/Software/Visual_Studio/Tango.BL/Enumerations/Plies.cs @@ -0,0 +1,25 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.ComponentModel; + +namespace Tango.BL.Enumerations +{ + public enum Plies + { + [Description("1")] + P1 = 1, + [Description("2")] + P2 = 2, + [Description("3")] + P3 = 3, + [Description("4")] + P4 = 4, + [Description("5")] + P5 = 5, + [Description("6")] + P6 = 6 + } +} diff --git a/Software/Visual_Studio/Tango.BL/Enumerations/TwistDirections.cs b/Software/Visual_Studio/Tango.BL/Enumerations/TwistDirections.cs new file mode 100644 index 000000000..8c6017f6a --- /dev/null +++ b/Software/Visual_Studio/Tango.BL/Enumerations/TwistDirections.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.ComponentModel; + +namespace Tango.BL.Enumerations +{ + public enum TwistDirections + { + S = 0, + Z = 1 + } +} diff --git a/Software/Visual_Studio/Tango.BL/Enumerations/YarnUnits.cs b/Software/Visual_Studio/Tango.BL/Enumerations/YarnUnits.cs new file mode 100644 index 000000000..91ab3bbd1 --- /dev/null +++ b/Software/Visual_Studio/Tango.BL/Enumerations/YarnUnits.cs @@ -0,0 +1,21 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Tango.BL.Enumerations +{ + public enum YarnUnits + { + [Description("DTEX")] + DTEX = 0, + [Description("Tex")] + Tex = 1, + [Description("Ne")] + Ne = 2, + [Description("Nm")] + Nm = 3, + } +} diff --git a/Software/Visual_Studio/Tango.BL/ObservablesContext.cs b/Software/Visual_Studio/Tango.BL/ObservablesContext.cs index 0f4bbb311..10f4575d4 100644 --- a/Software/Visual_Studio/Tango.BL/ObservablesContext.cs +++ b/Software/Visual_Studio/Tango.BL/ObservablesContext.cs @@ -158,6 +158,30 @@ namespace Tango.BL get; set; } + /// + /// Gets or sets the ColorProcessData. + /// + public DbSet ColorProcessData + { + get; set; + } + + /// + /// Gets or sets the ColorProcessFactor. + /// + public DbSet ColorProcessFactor + { + get; set; + } + + /// + /// Gets or sets the ColorProcessParameters. + /// + public DbSet ColorProcessParameters + { + get; set; + } + /// /// Gets or sets the ColorSpaces. /// @@ -742,5 +766,117 @@ namespace Tango.BL get; set; } + /// + /// Gets or sets the YarnApplications. + /// + public DbSet YarnApplications + { + get; set; + } + + /// + /// Gets or sets the YarnBrand. + /// + public DbSet YarnBrand + { + get; set; + } + + /// + /// Gets or sets the YarnColor. + /// + public DbSet YarnColor + { + get; set; + } + + /// + /// Gets or sets the YarnEndUse. + /// + public DbSet YarnEndUse + { + get; set; + } + + /// + /// Gets or sets the YarnFamily. + /// + public DbSet YarnFamily + { + get; set; + } + + /// + /// Gets or sets the YarnGeometry. + /// + public DbSet YarnGeometry + { + get; set; + } + + /// + /// Gets or sets the YarnGlossLevel. + /// + public DbSet YarnGlossLevel + { + get; set; + } + + /// + /// Gets or sets the YarnGroup. + /// + public DbSet YarnGroup + { + get; set; + } + + /// + /// Gets or sets the YarnIndustrysector. + /// + public DbSet YarnIndustrysector + { + get; set; + } + + /// + /// Gets or sets the YarnManufacturer. + /// + public DbSet YarnManufacturer + { + get; set; + } + + /// + /// Gets or sets the YarnMaterials. + /// + public DbSet YarnMaterials + { + get; set; + } + + /// + /// Gets or sets the YarnSubFamily. + /// + public DbSet YarnSubFamily + { + get; set; + } + + /// + /// Gets or sets the YarnTexturing. + /// + public DbSet YarnTexturing + { + get; set; + } + + /// + /// Gets or sets the YarnType. + /// + public DbSet YarnType + { + get; set; + } + } } diff --git a/Software/Visual_Studio/Tango.BL/ObservablesEntitiesAdapterExtension.cs b/Software/Visual_Studio/Tango.BL/ObservablesEntitiesAdapterExtension.cs index 3bb4c6d83..35d256267 100644 --- a/Software/Visual_Studio/Tango.BL/ObservablesEntitiesAdapterExtension.cs +++ b/Software/Visual_Studio/Tango.BL/ObservablesEntitiesAdapterExtension.cs @@ -629,6 +629,114 @@ namespace Tango.BL } + private ObservableCollection _colorprocessdata; + /// + /// Gets or sets the ColorProcessData. + /// + public ObservableCollection ColorProcessData + { + get + { + return _colorprocessdata; + } + + set + { + _colorprocessdata = value; RaisePropertyChanged(nameof(ColorProcessData)); + } + + } + + private ICollectionView _colorprocessdataViewSource; + /// + /// Gets or sets the ColorProcessData View Source. + /// + public ICollectionView ColorProcessDataViewSource + { + get + { + return _colorprocessdataViewSource; + } + + set + { + _colorprocessdataViewSource = value; RaisePropertyChanged(nameof(ColorProcessDataViewSource)); + } + + } + + private ObservableCollection _colorprocessfactor; + /// + /// Gets or sets the ColorProcessFactor. + /// + public ObservableCollection ColorProcessFactor + { + get + { + return _colorprocessfactor; + } + + set + { + _colorprocessfactor = value; RaisePropertyChanged(nameof(ColorProcessFactor)); + } + + } + + private ICollectionView _colorprocessfactorViewSource; + /// + /// Gets or sets the ColorProcessFactor View Source. + /// + public ICollectionView ColorProcessFactorViewSource + { + get + { + return _colorprocessfactorViewSource; + } + + set + { + _colorprocessfactorViewSource = value; RaisePropertyChanged(nameof(ColorProcessFactorViewSource)); + } + + } + + private ObservableCollection _colorprocessparameters; + /// + /// Gets or sets the ColorProcessParameters. + /// + public ObservableCollection ColorProcessParameters + { + get + { + return _colorprocessparameters; + } + + set + { + _colorprocessparameters = value; RaisePropertyChanged(nameof(ColorProcessParameters)); + } + + } + + private ICollectionView _colorprocessparametersViewSource; + /// + /// Gets or sets the ColorProcessParameters View Source. + /// + public ICollectionView ColorProcessParametersViewSource + { + get + { + return _colorprocessparametersViewSource; + } + + set + { + _colorprocessparametersViewSource = value; RaisePropertyChanged(nameof(ColorProcessParametersViewSource)); + } + + } + private ObservableCollection _colorspaces; /// /// Gets or sets the ColorSpaces. @@ -3257,6 +3365,510 @@ namespace Tango.BL } + private ObservableCollection _yarnapplications; + /// + /// Gets or sets the YarnApplications. + /// + public ObservableCollection YarnApplications + { + get + { + return _yarnapplications; + } + + set + { + _yarnapplications = value; RaisePropertyChanged(nameof(YarnApplications)); + } + + } + + private ICollectionView _yarnapplicationsViewSource; + /// + /// Gets or sets the YarnApplications View Source. + /// + public ICollectionView YarnApplicationsViewSource + { + get + { + return _yarnapplicationsViewSource; + } + + set + { + _yarnapplicationsViewSource = value; RaisePropertyChanged(nameof(YarnApplicationsViewSource)); + } + + } + + private ObservableCollection _yarnbrand; + /// + /// Gets or sets the YarnBrand. + /// + public ObservableCollection YarnBrand + { + get + { + return _yarnbrand; + } + + set + { + _yarnbrand = value; RaisePropertyChanged(nameof(YarnBrand)); + } + + } + + private ICollectionView _yarnbrandViewSource; + /// + /// Gets or sets the YarnBrand View Source. + /// + public ICollectionView YarnBrandViewSource + { + get + { + return _yarnbrandViewSource; + } + + set + { + _yarnbrandViewSource = value; RaisePropertyChanged(nameof(YarnBrandViewSource)); + } + + } + + private ObservableCollection _yarncolor; + /// + /// Gets or sets the YarnColor. + /// + public ObservableCollection YarnColor + { + get + { + return _yarncolor; + } + + set + { + _yarncolor = value; RaisePropertyChanged(nameof(YarnColor)); + } + + } + + private ICollectionView _yarncolorViewSource; + /// + /// Gets or sets the YarnColor View Source. + /// + public ICollectionView YarnColorViewSource + { + get + { + return _yarncolorViewSource; + } + + set + { + _yarncolorViewSource = value; RaisePropertyChanged(nameof(YarnColorViewSource)); + } + + } + + private ObservableCollection _yarnenduse; + /// + /// Gets or sets the YarnEndUse. + /// + public ObservableCollection YarnEndUse + { + get + { + return _yarnenduse; + } + + set + { + _yarnenduse = value; RaisePropertyChanged(nameof(YarnEndUse)); + } + + } + + private ICollectionView _yarnenduseViewSource; + /// + /// Gets or sets the YarnEndUse View Source. + /// + public ICollectionView YarnEndUseViewSource + { + get + { + return _yarnenduseViewSource; + } + + set + { + _yarnenduseViewSource = value; RaisePropertyChanged(nameof(YarnEndUseViewSource)); + } + + } + + private ObservableCollection _yarnfamily; + /// + /// Gets or sets the YarnFamily. + /// + public ObservableCollection YarnFamily + { + get + { + return _yarnfamily; + } + + set + { + _yarnfamily = value; RaisePropertyChanged(nameof(YarnFamily)); + } + + } + + private ICollectionView _yarnfamilyViewSource; + /// + /// Gets or sets the YarnFamily View Source. + /// + public ICollectionView YarnFamilyViewSource + { + get + { + return _yarnfamilyViewSource; + } + + set + { + _yarnfamilyViewSource = value; RaisePropertyChanged(nameof(YarnFamilyViewSource)); + } + + } + + private ObservableCollection _yarngeometry; + /// + /// Gets or sets the YarnGeometry. + /// + public ObservableCollection YarnGeometry + { + get + { + return _yarngeometry; + } + + set + { + _yarngeometry = value; RaisePropertyChanged(nameof(YarnGeometry)); + } + + } + + private ICollectionView _yarngeometryViewSource; + /// + /// Gets or sets the YarnGeometry View Source. + /// + public ICollectionView YarnGeometryViewSource + { + get + { + return _yarngeometryViewSource; + } + + set + { + _yarngeometryViewSource = value; RaisePropertyChanged(nameof(YarnGeometryViewSource)); + } + + } + + private ObservableCollection _yarnglosslevel; + /// + /// Gets or sets the YarnGlossLevel. + /// + public ObservableCollection YarnGlossLevel + { + get + { + return _yarnglosslevel; + } + + set + { + _yarnglosslevel = value; RaisePropertyChanged(nameof(YarnGlossLevel)); + } + + } + + private ICollectionView _yarnglosslevelViewSource; + /// + /// Gets or sets the YarnGlossLevel View Source. + /// + public ICollectionView YarnGlossLevelViewSource + { + get + { + return _yarnglosslevelViewSource; + } + + set + { + _yarnglosslevelViewSource = value; RaisePropertyChanged(nameof(YarnGlossLevelViewSource)); + } + + } + + private ObservableCollection _yarngroup; + /// + /// Gets or sets the YarnGroup. + /// + public ObservableCollection YarnGroup + { + get + { + return _yarngroup; + } + + set + { + _yarngroup = value; RaisePropertyChanged(nameof(YarnGroup)); + } + + } + + private ICollectionView _yarngroupViewSource; + /// + /// Gets or sets the YarnGroup View Source. + /// + public ICollectionView YarnGroupViewSource + { + get + { + return _yarngroupViewSource; + } + + set + { + _yarngroupViewSource = value; RaisePropertyChanged(nameof(YarnGroupViewSource)); + } + + } + + private ObservableCollection _yarnindustrysector; + /// + /// Gets or sets the YarnIndustrysector. + /// + public ObservableCollection YarnIndustrysector + { + get + { + return _yarnindustrysector; + } + + set + { + _yarnindustrysector = value; RaisePropertyChanged(nameof(YarnIndustrysector)); + } + + } + + private ICollectionView _yarnindustrysectorViewSource; + /// + /// Gets or sets the YarnIndustrysector View Source. + /// + public ICollectionView YarnIndustrysectorViewSource + { + get + { + return _yarnindustrysectorViewSource; + } + + set + { + _yarnindustrysectorViewSource = value; RaisePropertyChanged(nameof(YarnIndustrysectorViewSource)); + } + + } + + private ObservableCollection _yarnmanufacturer; + /// + /// Gets or sets the YarnManufacturer. + /// + public ObservableCollection YarnManufacturer + { + get + { + return _yarnmanufacturer; + } + + set + { + _yarnmanufacturer = value; RaisePropertyChanged(nameof(YarnManufacturer)); + } + + } + + private ICollectionView _yarnmanufacturerViewSource; + /// + /// Gets or sets the YarnManufacturer View Source. + /// + public ICollectionView YarnManufacturerViewSource + { + get + { + return _yarnmanufacturerViewSource; + } + + set + { + _yarnmanufacturerViewSource = value; RaisePropertyChanged(nameof(YarnManufacturerViewSource)); + } + + } + + private ObservableCollection _yarnmaterials; + /// + /// Gets or sets the YarnMaterials. + /// + public ObservableCollection YarnMaterials + { + get + { + return _yarnmaterials; + } + + set + { + _yarnmaterials = value; RaisePropertyChanged(nameof(YarnMaterials)); + } + + } + + private ICollectionView _yarnmaterialsViewSource; + /// + /// Gets or sets the YarnMaterials View Source. + /// + public ICollectionView YarnMaterialsViewSource + { + get + { + return _yarnmaterialsViewSource; + } + + set + { + _yarnmaterialsViewSource = value; RaisePropertyChanged(nameof(YarnMaterialsViewSource)); + } + + } + + private ObservableCollection _yarnsubfamily; + /// + /// Gets or sets the YarnSubFamily. + /// + public ObservableCollection YarnSubFamily + { + get + { + return _yarnsubfamily; + } + + set + { + _yarnsubfamily = value; RaisePropertyChanged(nameof(YarnSubFamily)); + } + + } + + private ICollectionView _yarnsubfamilyViewSource; + /// + /// Gets or sets the YarnSubFamily View Source. + /// + public ICollectionView YarnSubFamilyViewSource + { + get + { + return _yarnsubfamilyViewSource; + } + + set + { + _yarnsubfamilyViewSource = value; RaisePropertyChanged(nameof(YarnSubFamilyViewSource)); + } + + } + + private ObservableCollection _yarntexturing; + /// + /// Gets or sets the YarnTexturing. + /// + public ObservableCollection YarnTexturing + { + get + { + return _yarntexturing; + } + + set + { + _yarntexturing = value; RaisePropertyChanged(nameof(YarnTexturing)); + } + + } + + private ICollectionView _yarntexturingViewSource; + /// + /// Gets or sets the YarnTexturing View Source. + /// + public ICollectionView YarnTexturingViewSource + { + get + { + return _yarntexturingViewSource; + } + + set + { + _yarntexturingViewSource = value; RaisePropertyChanged(nameof(YarnTexturingViewSource)); + } + + } + + private ObservableCollection _yarntype; + /// + /// Gets or sets the YarnType. + /// + public ObservableCollection YarnType + { + get + { + return _yarntype; + } + + set + { + _yarntype = value; RaisePropertyChanged(nameof(YarnType)); + } + + } + + private ICollectionView _yarntypeViewSource; + /// + /// Gets or sets the YarnType View Source. + /// + public ICollectionView YarnTypeViewSource + { + get + { + return _yarntypeViewSource; + } + + set + { + _yarntypeViewSource = value; RaisePropertyChanged(nameof(YarnTypeViewSource)); + } + + } + /// /// Initialize collection sources. /// @@ -3297,6 +3909,12 @@ namespace Tango.BL ColorCatalogsItemsRecipesViewSource = CreateCollectionView(ColorCatalogsItemsRecipes); + ColorProcessDataViewSource = CreateCollectionView(ColorProcessData); + + ColorProcessFactorViewSource = CreateCollectionView(ColorProcessFactor); + + ColorProcessParametersViewSource = CreateCollectionView(ColorProcessParameters); + ColorSpacesViewSource = CreateCollectionView(ColorSpaces); ConfigurationsViewSource = CreateCollectionView(Configurations); @@ -3443,6 +4061,34 @@ namespace Tango.BL WindingMethodsViewSource = CreateCollectionView(WindingMethods); + YarnApplicationsViewSource = CreateCollectionView(YarnApplications); + + YarnBrandViewSource = CreateCollectionView(YarnBrand); + + YarnColorViewSource = CreateCollectionView(YarnColor); + + YarnEndUseViewSource = CreateCollectionView(YarnEndUse); + + YarnFamilyViewSource = CreateCollectionView(YarnFamily); + + YarnGeometryViewSource = CreateCollectionView(YarnGeometry); + + YarnGlossLevelViewSource = CreateCollectionView(YarnGlossLevel); + + YarnGroupViewSource = CreateCollectionView(YarnGroup); + + YarnIndustrysectorViewSource = CreateCollectionView(YarnIndustrysector); + + YarnManufacturerViewSource = CreateCollectionView(YarnManufacturer); + + YarnMaterialsViewSource = CreateCollectionView(YarnMaterials); + + YarnSubFamilyViewSource = CreateCollectionView(YarnSubFamily); + + YarnTexturingViewSource = CreateCollectionView(YarnTexturing); + + YarnTypeViewSource = CreateCollectionView(YarnType); + } } } diff --git a/Software/Visual_Studio/Tango.BL/ObservablesStaticCollectionsExtension.cs b/Software/Visual_Studio/Tango.BL/ObservablesStaticCollectionsExtension.cs index c113de4a6..daaf341a2 100644 --- a/Software/Visual_Studio/Tango.BL/ObservablesStaticCollectionsExtension.cs +++ b/Software/Visual_Studio/Tango.BL/ObservablesStaticCollectionsExtension.cs @@ -629,6 +629,114 @@ namespace Tango.BL } + private ObservableCollection _colorprocessdata; + /// + /// Gets or sets the ColorProcessData. + /// + public ObservableCollection ColorProcessData + { + get + { + return _colorprocessdata; + } + + set + { + _colorprocessdata = value; RaisePropertyChanged(nameof(ColorProcessData)); + } + + } + + private ICollectionView _colorprocessdataViewSource; + /// + /// Gets or sets the ColorProcessData View Source. + /// + public ICollectionView ColorProcessDataViewSource + { + get + { + return _colorprocessdataViewSource; + } + + set + { + _colorprocessdataViewSource = value; RaisePropertyChanged(nameof(ColorProcessDataViewSource)); + } + + } + + private ObservableCollection _colorprocessfactor; + /// + /// Gets or sets the ColorProcessFactor. + /// + public ObservableCollection ColorProcessFactor + { + get + { + return _colorprocessfactor; + } + + set + { + _colorprocessfactor = value; RaisePropertyChanged(nameof(ColorProcessFactor)); + } + + } + + private ICollectionView _colorprocessfactorViewSource; + /// + /// Gets or sets the ColorProcessFactor View Source. + /// + public ICollectionView ColorProcessFactorViewSource + { + get + { + return _colorprocessfactorViewSource; + } + + set + { + _colorprocessfactorViewSource = value; RaisePropertyChanged(nameof(ColorProcessFactorViewSource)); + } + + } + + private ObservableCollection _colorprocessparameters; + /// + /// Gets or sets the ColorProcessParameters. + /// + public ObservableCollection ColorProcessParameters + { + get + { + return _colorprocessparameters; + } + + set + { + _colorprocessparameters = value; RaisePropertyChanged(nameof(ColorProcessParameters)); + } + + } + + private ICollectionView _colorprocessparametersViewSource; + /// + /// Gets or sets the ColorProcessParameters View Source. + /// + public ICollectionView ColorProcessParametersViewSource + { + get + { + return _colorprocessparametersViewSource; + } + + set + { + _colorprocessparametersViewSource = value; RaisePropertyChanged(nameof(ColorProcessParametersViewSource)); + } + + } + private ObservableCollection _colorspaces; /// /// Gets or sets the ColorSpaces. @@ -3257,6 +3365,510 @@ namespace Tango.BL } + private ObservableCollection _yarnapplications; + /// + /// Gets or sets the YarnApplications. + /// + public ObservableCollection YarnApplications + { + get + { + return _yarnapplications; + } + + set + { + _yarnapplications = value; RaisePropertyChanged(nameof(YarnApplications)); + } + + } + + private ICollectionView _yarnapplicationsViewSource; + /// + /// Gets or sets the YarnApplications View Source. + /// + public ICollectionView YarnApplicationsViewSource + { + get + { + return _yarnapplicationsViewSource; + } + + set + { + _yarnapplicationsViewSource = value; RaisePropertyChanged(nameof(YarnApplicationsViewSource)); + } + + } + + private ObservableCollection _yarnbrand; + /// + /// Gets or sets the YarnBrand. + /// + public ObservableCollection YarnBrand + { + get + { + return _yarnbrand; + } + + set + { + _yarnbrand = value; RaisePropertyChanged(nameof(YarnBrand)); + } + + } + + private ICollectionView _yarnbrandViewSource; + /// + /// Gets or sets the YarnBrand View Source. + /// + public ICollectionView YarnBrandViewSource + { + get + { + return _yarnbrandViewSource; + } + + set + { + _yarnbrandViewSource = value; RaisePropertyChanged(nameof(YarnBrandViewSource)); + } + + } + + private ObservableCollection _yarncolor; + /// + /// Gets or sets the YarnColor. + /// + public ObservableCollection YarnColor + { + get + { + return _yarncolor; + } + + set + { + _yarncolor = value; RaisePropertyChanged(nameof(YarnColor)); + } + + } + + private ICollectionView _yarncolorViewSource; + /// + /// Gets or sets the YarnColor View Source. + /// + public ICollectionView YarnColorViewSource + { + get + { + return _yarncolorViewSource; + } + + set + { + _yarncolorViewSource = value; RaisePropertyChanged(nameof(YarnColorViewSource)); + } + + } + + private ObservableCollection _yarnenduse; + /// + /// Gets or sets the YarnEndUse. + /// + public ObservableCollection YarnEndUse + { + get + { + return _yarnenduse; + } + + set + { + _yarnenduse = value; RaisePropertyChanged(nameof(YarnEndUse)); + } + + } + + private ICollectionView _yarnenduseViewSource; + /// + /// Gets or sets the YarnEndUse View Source. + /// + public ICollectionView YarnEndUseViewSource + { + get + { + return _yarnenduseViewSource; + } + + set + { + _yarnenduseViewSource = value; RaisePropertyChanged(nameof(YarnEndUseViewSource)); + } + + } + + private ObservableCollection _yarnfamily; + /// + /// Gets or sets the YarnFamily. + /// + public ObservableCollection YarnFamily + { + get + { + return _yarnfamily; + } + + set + { + _yarnfamily = value; RaisePropertyChanged(nameof(YarnFamily)); + } + + } + + private ICollectionView _yarnfamilyViewSource; + /// + /// Gets or sets the YarnFamily View Source. + /// + public ICollectionView YarnFamilyViewSource + { + get + { + return _yarnfamilyViewSource; + } + + set + { + _yarnfamilyViewSource = value; RaisePropertyChanged(nameof(YarnFamilyViewSource)); + } + + } + + private ObservableCollection _yarngeometry; + /// + /// Gets or sets the YarnGeometry. + /// + public ObservableCollection YarnGeometry + { + get + { + return _yarngeometry; + } + + set + { + _yarngeometry = value; RaisePropertyChanged(nameof(YarnGeometry)); + } + + } + + private ICollectionView _yarngeometryViewSource; + /// + /// Gets or sets the YarnGeometry View Source. + /// + public ICollectionView YarnGeometryViewSource + { + get + { + return _yarngeometryViewSource; + } + + set + { + _yarngeometryViewSource = value; RaisePropertyChanged(nameof(YarnGeometryViewSource)); + } + + } + + private ObservableCollection _yarnglosslevel; + /// + /// Gets or sets the YarnGlossLevel. + /// + public ObservableCollection YarnGlossLevel + { + get + { + return _yarnglosslevel; + } + + set + { + _yarnglosslevel = value; RaisePropertyChanged(nameof(YarnGlossLevel)); + } + + } + + private ICollectionView _yarnglosslevelViewSource; + /// + /// Gets or sets the YarnGlossLevel View Source. + /// + public ICollectionView YarnGlossLevelViewSource + { + get + { + return _yarnglosslevelViewSource; + } + + set + { + _yarnglosslevelViewSource = value; RaisePropertyChanged(nameof(YarnGlossLevelViewSource)); + } + + } + + private ObservableCollection _yarngroup; + /// + /// Gets or sets the YarnGroup. + /// + public ObservableCollection YarnGroup + { + get + { + return _yarngroup; + } + + set + { + _yarngroup = value; RaisePropertyChanged(nameof(YarnGroup)); + } + + } + + private ICollectionView _yarngroupViewSource; + /// + /// Gets or sets the YarnGroup View Source. + /// + public ICollectionView YarnGroupViewSource + { + get + { + return _yarngroupViewSource; + } + + set + { + _yarngroupViewSource = value; RaisePropertyChanged(nameof(YarnGroupViewSource)); + } + + } + + private ObservableCollection _yarnindustrysector; + /// + /// Gets or sets the YarnIndustrysector. + /// + public ObservableCollection YarnIndustrysector + { + get + { + return _yarnindustrysector; + } + + set + { + _yarnindustrysector = value; RaisePropertyChanged(nameof(YarnIndustrysector)); + } + + } + + private ICollectionView _yarnindustrysectorViewSource; + /// + /// Gets or sets the YarnIndustrysector View Source. + /// + public ICollectionView YarnIndustrysectorViewSource + { + get + { + return _yarnindustrysectorViewSource; + } + + set + { + _yarnindustrysectorViewSource = value; RaisePropertyChanged(nameof(YarnIndustrysectorViewSource)); + } + + } + + private ObservableCollection _yarnmanufacturer; + /// + /// Gets or sets the YarnManufacturer. + /// + public ObservableCollection YarnManufacturer + { + get + { + return _yarnmanufacturer; + } + + set + { + _yarnmanufacturer = value; RaisePropertyChanged(nameof(YarnManufacturer)); + } + + } + + private ICollectionView _yarnmanufacturerViewSource; + /// + /// Gets or sets the YarnManufacturer View Source. + /// + public ICollectionView YarnManufacturerViewSource + { + get + { + return _yarnmanufacturerViewSource; + } + + set + { + _yarnmanufacturerViewSource = value; RaisePropertyChanged(nameof(YarnManufacturerViewSource)); + } + + } + + private ObservableCollection _yarnmaterials; + /// + /// Gets or sets the YarnMaterials. + /// + public ObservableCollection YarnMaterials + { + get + { + return _yarnmaterials; + } + + set + { + _yarnmaterials = value; RaisePropertyChanged(nameof(YarnMaterials)); + } + + } + + private ICollectionView _yarnmaterialsViewSource; + /// + /// Gets or sets the YarnMaterials View Source. + /// + public ICollectionView YarnMaterialsViewSource + { + get + { + return _yarnmaterialsViewSource; + } + + set + { + _yarnmaterialsViewSource = value; RaisePropertyChanged(nameof(YarnMaterialsViewSource)); + } + + } + + private ObservableCollection _yarnsubfamily; + /// + /// Gets or sets the YarnSubFamily. + /// + public ObservableCollection YarnSubFamily + { + get + { + return _yarnsubfamily; + } + + set + { + _yarnsubfamily = value; RaisePropertyChanged(nameof(YarnSubFamily)); + } + + } + + private ICollectionView _yarnsubfamilyViewSource; + /// + /// Gets or sets the YarnSubFamily View Source. + /// + public ICollectionView YarnSubFamilyViewSource + { + get + { + return _yarnsubfamilyViewSource; + } + + set + { + _yarnsubfamilyViewSource = value; RaisePropertyChanged(nameof(YarnSubFamilyViewSource)); + } + + } + + private ObservableCollection _yarntexturing; + /// + /// Gets or sets the YarnTexturing. + /// + public ObservableCollection YarnTexturing + { + get + { + return _yarntexturing; + } + + set + { + _yarntexturing = value; RaisePropertyChanged(nameof(YarnTexturing)); + } + + } + + private ICollectionView _yarntexturingViewSource; + /// + /// Gets or sets the YarnTexturing View Source. + /// + public ICollectionView YarnTexturingViewSource + { + get + { + return _yarntexturingViewSource; + } + + set + { + _yarntexturingViewSource = value; RaisePropertyChanged(nameof(YarnTexturingViewSource)); + } + + } + + private ObservableCollection _yarntype; + /// + /// Gets or sets the YarnType. + /// + public ObservableCollection YarnType + { + get + { + return _yarntype; + } + + set + { + _yarntype = value; RaisePropertyChanged(nameof(YarnType)); + } + + } + + private ICollectionView _yarntypeViewSource; + /// + /// Gets or sets the YarnType View Source. + /// + public ICollectionView YarnTypeViewSource + { + get + { + return _yarntypeViewSource; + } + + set + { + _yarntypeViewSource = value; RaisePropertyChanged(nameof(YarnTypeViewSource)); + } + + } + /// /// Initialize collection sources. /// @@ -3297,6 +3909,12 @@ namespace Tango.BL ColorCatalogsItemsRecipesViewSource = CreateCollectionView(ColorCatalogsItemsRecipes); + ColorProcessDataViewSource = CreateCollectionView(ColorProcessData); + + ColorProcessFactorViewSource = CreateCollectionView(ColorProcessFactor); + + ColorProcessParametersViewSource = CreateCollectionView(ColorProcessParameters); + ColorSpacesViewSource = CreateCollectionView(ColorSpaces); ConfigurationsViewSource = CreateCollectionView(Configurations); @@ -3443,6 +4061,34 @@ namespace Tango.BL WindingMethodsViewSource = CreateCollectionView(WindingMethods); + YarnApplicationsViewSource = CreateCollectionView(YarnApplications); + + YarnBrandViewSource = CreateCollectionView(YarnBrand); + + YarnColorViewSource = CreateCollectionView(YarnColor); + + YarnEndUseViewSource = CreateCollectionView(YarnEndUse); + + YarnFamilyViewSource = CreateCollectionView(YarnFamily); + + YarnGeometryViewSource = CreateCollectionView(YarnGeometry); + + YarnGlossLevelViewSource = CreateCollectionView(YarnGlossLevel); + + YarnGroupViewSource = CreateCollectionView(YarnGroup); + + YarnIndustrysectorViewSource = CreateCollectionView(YarnIndustrysector); + + YarnManufacturerViewSource = CreateCollectionView(YarnManufacturer); + + YarnMaterialsViewSource = CreateCollectionView(YarnMaterials); + + YarnSubFamilyViewSource = CreateCollectionView(YarnSubFamily); + + YarnTexturingViewSource = CreateCollectionView(YarnTexturing); + + YarnTypeViewSource = CreateCollectionView(YarnType); + } } } diff --git a/Software/Visual_Studio/Tango.BL/Tango.BL.csproj b/Software/Visual_Studio/Tango.BL/Tango.BL.csproj index bdc5b4c23..a0f33ac59 100644 --- a/Software/Visual_Studio/Tango.BL/Tango.BL.csproj +++ b/Software/Visual_Studio/Tango.BL/Tango.BL.csproj @@ -106,6 +106,7 @@ + @@ -115,6 +116,8 @@ + + @@ -173,6 +176,12 @@ + + + + + + @@ -319,6 +328,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -342,6 +379,12 @@ + + + + + + @@ -442,6 +485,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -450,9 +521,12 @@ + + + @@ -678,7 +752,7 @@ - + \ No newline at end of file diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/COLOR_PROCESS_DATA.cs b/Software/Visual_Studio/Tango.DAL.Remote/DB/COLOR_PROCESS_DATA.cs new file mode 100644 index 000000000..711e6597c --- /dev/null +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/COLOR_PROCESS_DATA.cs @@ -0,0 +1,29 @@ +//------------------------------------------------------------------------------ +// +// 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 COLOR_PROCESS_DATA + { + public int ID { get; set; } + public string GUID { get; set; } + public System.DateTime LAST_UPDATED { get; set; } + public string COLOR_PROCESS_PARAMETERS_GUID { get; set; } + public string COLOR_NAME { get; set; } + public int INK_NL_CM { get; set; } + public double L { get; set; } + public double A { get; set; } + public double B { get; set; } + + public virtual COLOR_PROCESS_PARAMETERS COLOR_PROCESS_PARAMETERS { get; set; } + } +} diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/COLOR_PROCESS_FACTOR.cs b/Software/Visual_Studio/Tango.DAL.Remote/DB/COLOR_PROCESS_FACTOR.cs new file mode 100644 index 000000000..ad5eadb0a --- /dev/null +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/COLOR_PROCESS_FACTOR.cs @@ -0,0 +1,30 @@ +//------------------------------------------------------------------------------ +// +// 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 COLOR_PROCESS_FACTOR + { + public int ID { get; set; } + public string GUID { get; set; } + public System.DateTime LAST_UPDATED { get; set; } + public string COLOR_PROCESS_PARAMETERS_GUID { get; set; } + public string COLOR_NAME { get; set; } + public int INK_NL_CM { get; set; } + public double L { get; set; } + public double A { get; set; } + public double B { get; set; } + public int FACTOR_PERCENT { get; set; } + + public virtual COLOR_PROCESS_PARAMETERS COLOR_PROCESS_PARAMETERS { get; set; } + } +} diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/COLOR_PROCESS_PARAMETERS.cs b/Software/Visual_Studio/Tango.DAL.Remote/DB/COLOR_PROCESS_PARAMETERS.cs new file mode 100644 index 000000000..3e620912e --- /dev/null +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/COLOR_PROCESS_PARAMETERS.cs @@ -0,0 +1,38 @@ +//------------------------------------------------------------------------------ +// +// 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 COLOR_PROCESS_PARAMETERS + { + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")] + public COLOR_PROCESS_PARAMETERS() + { + this.COLOR_PROCESS_DATA = new HashSet(); + this.COLOR_PROCESS_FACTOR = new HashSet(); + } + + 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 double WHITE_POINT_L { get; set; } + public double WHITE_POINT_A { get; set; } + public double WHITE_POINT_B { get; set; } + + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] + public virtual ICollection COLOR_PROCESS_DATA { get; set; } + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] + public virtual ICollection COLOR_PROCESS_FACTOR { get; set; } + public virtual RMLS_EXTENSIONS RMLS_EXTENSIONS { 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 4a9908912..f4c6880bc 100644 --- a/Software/Visual_Studio/Tango.DAL.Remote/DB/RML.cs +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/RML.cs @@ -22,6 +22,7 @@ namespace Tango.DAL.Remote.DB this.JOBS = new HashSet(); this.LIQUID_TYPES_RMLS = new HashSet(); this.PROCESS_PARAMETERS_TABLES_GROUPS = new HashSet(); + this.RMLS_EXTENSIONS = new HashSet(); this.RMLS_SPOOLS = new HashSet(); this.SITES_RMLS = new HashSet(); } @@ -99,6 +100,8 @@ namespace Tango.DAL.Remote.DB [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] public virtual ICollection PROCESS_PARAMETERS_TABLES_GROUPS { get; set; } [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] + public virtual ICollection RMLS_EXTENSIONS { get; set; } + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] public virtual ICollection RMLS_SPOOLS { get; set; } [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] public virtual ICollection SITES_RMLS { 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 c8f452bc4..a65820556 100644 --- a/Software/Visual_Studio/Tango.DAL.Remote/DB/RMLS_EXTENSIONS.cs +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/RMLS_EXTENSIONS.cs @@ -14,10 +14,68 @@ namespace Tango.DAL.Remote.DB public partial class RMLS_EXTENSIONS { + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")] + public RMLS_EXTENSIONS() + { + this.COLOR_PROCESS_PARAMETERS = 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 string DESCRIPTION { get; set; } + public string RML_GUID { get; set; } + public string USER_GUID { get; set; } + public System.DateTime CREATED { get; set; } + public string YARN_MANUFACTURER_GUID { get; set; } + public string YARN_BRAND_GUID { get; set; } + public string COUNTRY { get; set; } + public string YARN_END_USE_GUID { get; set; } + public string YARN_APPLICATIONS_GUID { get; set; } + public string YARN_INDUSTRYSECTOR_GUID { get; set; } + public string YARN_MATERIAL_GUID { get; set; } + public string YARN_TYPE_GUID { get; set; } + public string YARN_FAMILY_GUID { get; set; } + public string YARN_SUB_FAMILY_GUID { get; set; } + public string YARN_GROUP_GUID { get; set; } + public string YARN_TEXTURING_GUID { get; set; } + public string YARN_GEOMETRY_GUID { get; set; } + public string YARN_COLOR_GUID { get; set; } + public string YARN_GLOSS_LEVEL_GUID { get; set; } + public int LINEAR_DENSITY { get; set; } + public int UNIT { get; set; } + public int PLIES { get; set; } + public int FILAMENT_COUNT { get; set; } + public int TWIST_TPM { get; set; } + public Nullable TWIST_DIRECTION { get; set; } + public Nullable MIN_ELONGATION { get; set; } + public Nullable MAX_ELONGATION { get; set; } + public Nullable MIN_MAX_FORCE_N { get; set; } + public Nullable MAX_MAX_FORCE_N { get; set; } + public Nullable MIN_ELASTICITY { get; set; } + public Nullable MAX_ELASTICITY { get; set; } + public Nullable MIN_TENACITY { get; set; } + public Nullable MAX_TENACITY { get; set; } + public string FINISHING { get; set; } + public string FILE_NAME { get; set; } + public byte[] DATA { get; set; } + + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] + public virtual ICollection COLOR_PROCESS_PARAMETERS { get; set; } + public virtual RML RML { get; set; } + public virtual USER USER { get; set; } + public virtual YARN_APPLICATIONS YARN_APPLICATIONS { get; set; } + public virtual YARN_BRAND YARN_BRAND { get; set; } + public virtual YARN_COLOR YARN_COLOR { get; set; } + public virtual YARN_END_USE YARN_END_USE { get; set; } + public virtual YARN_FAMILY YARN_FAMILY { get; set; } + public virtual YARN_GEOMETRY YARN_GEOMETRY { get; set; } + public virtual YARN_GLOSS_LEVEL YARN_GLOSS_LEVEL { get; set; } + public virtual YARN_GROUP YARN_GROUP { get; set; } + public virtual YARN_INDUSTRYSECTOR YARN_INDUSTRYSECTOR { get; set; } + public virtual YARN_MANUFACTURER YARN_MANUFACTURER { get; set; } + public virtual YARN_MATERIALS YARN_MATERIALS { get; set; } + public virtual YARN_SUB_FAMILY YARN_SUB_FAMILY { get; set; } + public virtual YARN_TEXTURING YARN_TEXTURING { get; set; } + public virtual YARN_TYPE YARN_TYPE { 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 d86ec98ae..a37de51db 100644 --- a/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.Context.cs +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.Context.cs @@ -42,6 +42,9 @@ namespace Tango.DAL.Remote.DB public virtual DbSet COLOR_CATALOGS_GROUPS { get; set; } public virtual DbSet COLOR_CATALOGS_ITEMS { get; set; } public virtual DbSet COLOR_CATALOGS_ITEMS_RECIPES { get; set; } + public virtual DbSet COLOR_PROCESS_DATA { get; set; } + public virtual DbSet COLOR_PROCESS_FACTOR { get; set; } + public virtual DbSet COLOR_PROCESS_PARAMETERS { get; set; } public virtual DbSet COLOR_SPACES { get; set; } public virtual DbSet CONFIGURATIONS { get; set; } public virtual DbSet CONTACTS { get; set; } @@ -115,5 +118,19 @@ namespace Tango.DAL.Remote.DB public virtual DbSet USERS { get; set; } public virtual DbSet USERS_ROLES { get; set; } public virtual DbSet WINDING_METHODS { get; set; } + public virtual DbSet YARN_APPLICATIONS { get; set; } + public virtual DbSet YARN_BRAND { get; set; } + public virtual DbSet YARN_COLOR { get; set; } + public virtual DbSet YARN_END_USE { get; set; } + public virtual DbSet YARN_FAMILY { get; set; } + public virtual DbSet YARN_GEOMETRY { get; set; } + public virtual DbSet YARN_GLOSS_LEVEL { get; set; } + public virtual DbSet YARN_GROUP { get; set; } + public virtual DbSet YARN_INDUSTRYSECTOR { get; set; } + public virtual DbSet YARN_MANUFACTURER { get; set; } + public virtual DbSet YARN_MATERIALS { get; set; } + public virtual DbSet YARN_SUB_FAMILY { get; set; } + public virtual DbSet YARN_TEXTURING { get; set; } + public virtual DbSet YARN_TYPE { 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 8ce8f6e02..79403a182 100644 --- a/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx @@ -243,6 +243,47 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -1098,8 +1139,41 @@ - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -1389,6 +1463,132 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -1549,6 +1749,48 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2323,6 +2565,200 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2594,6 +3030,9 @@ + + + @@ -2668,6 +3107,20 @@ + + + + + + + + + + + + + + @@ -2716,6 +3169,18 @@ + + + + + + + + + + + + @@ -2956,6 +3421,70 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -3055,6 +3584,9 @@ + + + @@ -3128,6 +3660,20 @@ + + + + + + + + + + + + + + @@ -3220,6 +3766,18 @@ + + + + + + + + + + + + @@ -3452,6 +4010,10 @@ + + + + @@ -3460,6 +4022,66 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -3767,6 +4389,52 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -4731,6 +5399,7 @@ + @@ -4741,8 +5410,58 @@ - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -5032,6 +5751,7 @@ + @@ -5059,6 +5779,146 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -5313,45 +6173,87 @@ - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + - - + + - - + + - + - + - - + + - - + + - + - + - - + + @@ -6109,6 +7011,20 @@ + + + + + + + + + + + + + + @@ -6137,6 +7053,186 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -6516,6 +7612,50 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -7418,8 +8558,41 @@ - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -7727,6 +8900,146 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 b47d276c4..017f43c06 100644 --- a/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx.diagram +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx.diagram @@ -5,95 +5,112 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -117,6 +134,9 @@ + + + @@ -175,8 +195,24 @@ + + + + + + + + + + + + + + + + diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/USER.cs b/Software/Visual_Studio/Tango.DAL.Remote/DB/USER.cs index 75cc4e444..375008753 100644 --- a/Software/Visual_Studio/Tango.DAL.Remote/DB/USER.cs +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/USER.cs @@ -22,6 +22,7 @@ namespace Tango.DAL.Remote.DB this.JOBS = new HashSet(); this.MACHINE_STUDIO_VERSIONS = new HashSet(); this.MACHINES_EVENTS = new HashSet(); + this.RMLS_EXTENSIONS = new HashSet(); this.TANGO_VERSIONS = new HashSet(); this.USERS_ROLES = new HashSet(); } @@ -52,6 +53,8 @@ namespace Tango.DAL.Remote.DB public virtual ICollection MACHINES_EVENTS { get; set; } public virtual ORGANIZATION ORGANIZATION { get; set; } [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] + public virtual ICollection RMLS_EXTENSIONS { get; set; } + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] public virtual ICollection TANGO_VERSIONS { get; set; } [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] public virtual ICollection USERS_ROLES { get; set; } diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/YARN_APPLICATIONS.cs b/Software/Visual_Studio/Tango.DAL.Remote/DB/YARN_APPLICATIONS.cs new file mode 100644 index 000000000..771e3ccaa --- /dev/null +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/YARN_APPLICATIONS.cs @@ -0,0 +1,31 @@ +//------------------------------------------------------------------------------ +// +// 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 YARN_APPLICATIONS + { + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")] + public YARN_APPLICATIONS() + { + this.RMLS_EXTENSIONS = new HashSet(); + } + + public int ID { get; set; } + public string GUID { get; set; } + public System.DateTime LAST_UPDATED { get; set; } + public string NAME { get; set; } + + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] + public virtual ICollection RMLS_EXTENSIONS { get; set; } + } +} diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/YARN_BRAND.cs b/Software/Visual_Studio/Tango.DAL.Remote/DB/YARN_BRAND.cs new file mode 100644 index 000000000..2ba5f08cd --- /dev/null +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/YARN_BRAND.cs @@ -0,0 +1,31 @@ +//------------------------------------------------------------------------------ +// +// 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 YARN_BRAND + { + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")] + public YARN_BRAND() + { + this.RMLS_EXTENSIONS = new HashSet(); + } + + public int ID { get; set; } + public string GUID { get; set; } + public System.DateTime LAST_UPDATED { get; set; } + public string NAME { get; set; } + + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] + public virtual ICollection RMLS_EXTENSIONS { get; set; } + } +} diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/YARN_COLOR.cs b/Software/Visual_Studio/Tango.DAL.Remote/DB/YARN_COLOR.cs new file mode 100644 index 000000000..b863f937c --- /dev/null +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/YARN_COLOR.cs @@ -0,0 +1,31 @@ +//------------------------------------------------------------------------------ +// +// 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 YARN_COLOR + { + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")] + public YARN_COLOR() + { + this.RMLS_EXTENSIONS = new HashSet(); + } + + public int ID { get; set; } + public string GUID { get; set; } + public System.DateTime LAST_UPDATED { get; set; } + public string NAME { get; set; } + + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] + public virtual ICollection RMLS_EXTENSIONS { get; set; } + } +} diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/YARN_END_USE.cs b/Software/Visual_Studio/Tango.DAL.Remote/DB/YARN_END_USE.cs new file mode 100644 index 000000000..4008c4f0e --- /dev/null +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/YARN_END_USE.cs @@ -0,0 +1,31 @@ +//------------------------------------------------------------------------------ +// +// 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 YARN_END_USE + { + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")] + public YARN_END_USE() + { + this.RMLS_EXTENSIONS = new HashSet(); + } + + public int ID { get; set; } + public string GUID { get; set; } + public System.DateTime LAST_UPDATED { get; set; } + public string NAME { get; set; } + + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] + public virtual ICollection RMLS_EXTENSIONS { get; set; } + } +} diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/YARN_FAMILY.cs b/Software/Visual_Studio/Tango.DAL.Remote/DB/YARN_FAMILY.cs new file mode 100644 index 000000000..4e29b0ab1 --- /dev/null +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/YARN_FAMILY.cs @@ -0,0 +1,31 @@ +//------------------------------------------------------------------------------ +// +// 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 YARN_FAMILY + { + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")] + public YARN_FAMILY() + { + this.RMLS_EXTENSIONS = new HashSet(); + } + + public int ID { get; set; } + public string GUID { get; set; } + public System.DateTime LAST_UPDATED { get; set; } + public string NAME { get; set; } + + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] + public virtual ICollection RMLS_EXTENSIONS { get; set; } + } +} diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/YARN_GEOMETRY.cs b/Software/Visual_Studio/Tango.DAL.Remote/DB/YARN_GEOMETRY.cs new file mode 100644 index 000000000..87f07131e --- /dev/null +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/YARN_GEOMETRY.cs @@ -0,0 +1,31 @@ +//------------------------------------------------------------------------------ +// +// 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 YARN_GEOMETRY + { + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")] + public YARN_GEOMETRY() + { + this.RMLS_EXTENSIONS = new HashSet(); + } + + public int ID { get; set; } + public string GUID { get; set; } + public System.DateTime LAST_UPDATED { get; set; } + public string NAME { get; set; } + + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] + public virtual ICollection RMLS_EXTENSIONS { get; set; } + } +} diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/YARN_GLOSS_LEVEL.cs b/Software/Visual_Studio/Tango.DAL.Remote/DB/YARN_GLOSS_LEVEL.cs new file mode 100644 index 000000000..75f4dd0b4 --- /dev/null +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/YARN_GLOSS_LEVEL.cs @@ -0,0 +1,31 @@ +//------------------------------------------------------------------------------ +// +// 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 YARN_GLOSS_LEVEL + { + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")] + public YARN_GLOSS_LEVEL() + { + this.RMLS_EXTENSIONS = new HashSet(); + } + + public int ID { get; set; } + public string GUID { get; set; } + public System.DateTime LAST_UPDATED { get; set; } + public string NAME { get; set; } + + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] + public virtual ICollection RMLS_EXTENSIONS { get; set; } + } +} diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/YARN_GROUP.cs b/Software/Visual_Studio/Tango.DAL.Remote/DB/YARN_GROUP.cs new file mode 100644 index 000000000..1442fa1e1 --- /dev/null +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/YARN_GROUP.cs @@ -0,0 +1,31 @@ +//------------------------------------------------------------------------------ +// +// 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 YARN_GROUP + { + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")] + public YARN_GROUP() + { + this.RMLS_EXTENSIONS = new HashSet(); + } + + public int ID { get; set; } + public string GUID { get; set; } + public System.DateTime LAST_UPDATED { get; set; } + public string NAME { get; set; } + + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] + public virtual ICollection RMLS_EXTENSIONS { get; set; } + } +} diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/YARN_INDUSTRYSECTOR.cs b/Software/Visual_Studio/Tango.DAL.Remote/DB/YARN_INDUSTRYSECTOR.cs new file mode 100644 index 000000000..3ca6eeb67 --- /dev/null +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/YARN_INDUSTRYSECTOR.cs @@ -0,0 +1,31 @@ +//------------------------------------------------------------------------------ +// +// 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 YARN_INDUSTRYSECTOR + { + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")] + public YARN_INDUSTRYSECTOR() + { + this.RMLS_EXTENSIONS = new HashSet(); + } + + public int ID { get; set; } + public string GUID { get; set; } + public System.DateTime LAST_UPDATED { get; set; } + public string NAME { get; set; } + + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] + public virtual ICollection RMLS_EXTENSIONS { get; set; } + } +} diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/YARN_MANUFACTURER.cs b/Software/Visual_Studio/Tango.DAL.Remote/DB/YARN_MANUFACTURER.cs new file mode 100644 index 000000000..b2fec3ac4 --- /dev/null +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/YARN_MANUFACTURER.cs @@ -0,0 +1,31 @@ +//------------------------------------------------------------------------------ +// +// 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 YARN_MANUFACTURER + { + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")] + public YARN_MANUFACTURER() + { + this.RMLS_EXTENSIONS = new HashSet(); + } + + public int ID { get; set; } + public string GUID { get; set; } + public System.DateTime LAST_UPDATED { get; set; } + public string NAME { get; set; } + + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] + public virtual ICollection RMLS_EXTENSIONS { get; set; } + } +} diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/YARN_MATERIALS.cs b/Software/Visual_Studio/Tango.DAL.Remote/DB/YARN_MATERIALS.cs new file mode 100644 index 000000000..8e14102bc --- /dev/null +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/YARN_MATERIALS.cs @@ -0,0 +1,31 @@ +//------------------------------------------------------------------------------ +// +// 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 YARN_MATERIALS + { + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")] + public YARN_MATERIALS() + { + this.RMLS_EXTENSIONS = new HashSet(); + } + + public int ID { get; set; } + public string GUID { get; set; } + public System.DateTime LAST_UPDATED { get; set; } + public string NAME { get; set; } + + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] + public virtual ICollection RMLS_EXTENSIONS { get; set; } + } +} diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/YARN_SUB_FAMILY.cs b/Software/Visual_Studio/Tango.DAL.Remote/DB/YARN_SUB_FAMILY.cs new file mode 100644 index 000000000..5172bfb8e --- /dev/null +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/YARN_SUB_FAMILY.cs @@ -0,0 +1,31 @@ +//------------------------------------------------------------------------------ +// +// 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 YARN_SUB_FAMILY + { + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")] + public YARN_SUB_FAMILY() + { + this.RMLS_EXTENSIONS = new HashSet(); + } + + public int ID { get; set; } + public string GUID { get; set; } + public System.DateTime LAST_UPDATED { get; set; } + public string NAME { get; set; } + + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] + public virtual ICollection RMLS_EXTENSIONS { get; set; } + } +} diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/YARN_TEXTURING.cs b/Software/Visual_Studio/Tango.DAL.Remote/DB/YARN_TEXTURING.cs new file mode 100644 index 000000000..7107eba01 --- /dev/null +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/YARN_TEXTURING.cs @@ -0,0 +1,31 @@ +//------------------------------------------------------------------------------ +// +// 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 YARN_TEXTURING + { + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")] + public YARN_TEXTURING() + { + this.RMLS_EXTENSIONS = new HashSet(); + } + + public int ID { get; set; } + public string GUID { get; set; } + public System.DateTime LAST_UPDATED { get; set; } + public string NAME { get; set; } + + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] + public virtual ICollection RMLS_EXTENSIONS { get; set; } + } +} diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/YARN_TYPE.cs b/Software/Visual_Studio/Tango.DAL.Remote/DB/YARN_TYPE.cs new file mode 100644 index 000000000..0070c5da6 --- /dev/null +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/YARN_TYPE.cs @@ -0,0 +1,31 @@ +//------------------------------------------------------------------------------ +// +// 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 YARN_TYPE + { + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")] + public YARN_TYPE() + { + this.RMLS_EXTENSIONS = new HashSet(); + } + + public int ID { get; set; } + public string GUID { get; set; } + public System.DateTime LAST_UPDATED { get; set; } + public string NAME { get; set; } + + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] + public virtual ICollection RMLS_EXTENSIONS { get; set; } + } +} 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 13d896eb2..32add4378 100644 --- a/Software/Visual_Studio/Tango.DAL.Remote/Tango.DAL.Remote.csproj +++ b/Software/Visual_Studio/Tango.DAL.Remote/Tango.DAL.Remote.csproj @@ -114,6 +114,15 @@ RemoteADO.tt + + RemoteADO.tt + + + RemoteADO.tt + + + RemoteADO.tt + RemoteADO.tt @@ -351,6 +360,48 @@ RemoteADO.tt + + RemoteADO.tt + + + RemoteADO.tt + + + RemoteADO.tt + + + RemoteADO.tt + + + RemoteADO.tt + + + RemoteADO.tt + + + RemoteADO.tt + + + RemoteADO.tt + + + RemoteADO.tt + + + RemoteADO.tt + + + RemoteADO.tt + + + RemoteADO.tt + + + RemoteADO.tt + + + RemoteADO.tt + @@ -401,7 +452,7 @@ - + \ No newline at end of file -- cgit v1.3.1 From 8a0b8f6abe3d143b43131a330e0ee39c2547ce8f Mon Sep 17 00:00:00 2001 From: Victoria Plitt Date: Sun, 4 Jul 2021 15:25:08 +0300 Subject: After Virus --- Software/DB/Tango.mdf | Bin 75497472 -> 75497472 bytes Software/DB/Tango_log.ldf | Bin 22675456 -> 22675456 bytes .../ViewModels/MainViewVM.cs | 64 +- .../Tango.MachineStudio.RML/Views/RmlView.xaml | 18 +- .../Contracts/IMainView.cs | 8 +- .../Converters/BoolToDisplayStatusConverter.cs | 32 + .../Converters/ColorNameToBrushConverter.cs | 9 + .../Converters/ColorWithPercentToBrushConverter.cs | 57 + .../Models/FactorTarget.cs | 13 +- .../Models/MachineModel.cs | 44 + .../Models/PlotProperties.cs | 17 +- .../Models/RmlExtensionModel.cs | 33 + .../Tango.MachineStudio.ThreadExtensions.csproj | 35 +- .../ViewModels/ColorParametersVewVM.cs | 539 ++++---- .../ViewModels/MainViewVM.cs | 555 ++++---- .../ViewModels/TestResultViewVM.cs | 201 +++ .../ViewModels/TestResultsViewVM.cs | 368 ++++++ .../Views/ColorParametersView.xaml | 76 +- .../Views/MachineTestResultsView.xaml | 82 ++ .../Views/MachineTestResultsView.xaml.cs | 28 + .../Views/MainView.xaml | 4 +- .../Views/MainView.xaml.cs | 2 +- .../Views/RMLExtensionView.xaml | 82 ++ .../Views/RMLExtensionView.xaml.cs | 27 + .../Views/RMLExtensionsView.xaml | 108 ++ .../Views/RMLExtensionsView.xaml.cs | 27 + .../Views/TestResultsView.xaml | 622 +++++++++ .../Views/TestResultsView.xaml.cs | 56 + .../Views/ThreadCharacteristicsView.xaml | 377 +++--- .../Views/ThreadExtensionView.xaml | 61 - .../Views/ThreadExtensionView.xaml.cs | 27 - .../Views/ThreadExtensionsView.xaml | 103 -- .../Views/ThreadExtensionsView.xaml.cs | 27 - .../packages.config | 1 + .../Builders/ColorProcessParametersBuilder.cs | 16 +- .../RMLExtensionTestResultsCollectionBuilder.cs | 58 + .../Builders/RMLExtentionsCollectionBuilder.cs | 42 +- .../Tango.BL/Builders/RmlExtensionsBuilder.cs | 11 +- .../Tango.BL/DTO/ColorProcessDataDTOBase.cs | 4 +- .../Tango.BL/DTO/ColorProcessFactorDTOBase.cs | 4 +- .../Tango.BL/DTO/ColorProcessParameterDTOBase.cs | 8 + .../Tango.BL/DTO/RmlExtensionTestResultDTO.cs | 14 + .../Tango.BL/DTO/RmlExtensionTestResultDTOBase.cs | 281 ++++ .../Tango.BL/DTO/RmlsExtensionDTOBase.cs | 80 +- .../Visual_Studio/Tango.BL/DTO/RubbingResultDTO.cs | 14 + .../Tango.BL/DTO/RubbingResultDTOBase.cs | 89 ++ .../Visual_Studio/Tango.BL/DTO/TensileResultDTO.cs | 14 + .../Tango.BL/DTO/TensileResultDTOBase.cs | 97 ++ .../Visual_Studio/Tango.BL/DTO/YarnColorDTO.cs | 14 - .../Visual_Studio/Tango.BL/DTO/YarnColorDTOBase.cs | 33 - .../Visual_Studio/Tango.BL/DTO/YarnEndUseDTO.cs | 14 - .../Tango.BL/DTO/YarnEndUseDTOBase.cs | 33 - .../Visual_Studio/Tango.BL/DTO/YarnGeometryDTO.cs | 14 - .../Tango.BL/DTO/YarnGeometryDTOBase.cs | 33 - .../Visual_Studio/Tango.BL/DTO/YarnMaterialDTO.cs | 14 - .../Tango.BL/DTO/YarnMaterialDTOBase.cs | 33 - .../Tango.BL/DTO/YarnWhiteShadeDTO.cs | 14 + .../Tango.BL/DTO/YarnWhiteShadeDTOBase.cs | 33 + .../Tango.BL/Entities/ColorProcessData.cs | 21 +- .../Tango.BL/Entities/ColorProcessDataBase.cs | 26 +- .../Tango.BL/Entities/ColorProcessFactor.cs | 23 +- .../Tango.BL/Entities/ColorProcessFactorBase.cs | 28 +- .../Tango.BL/Entities/ColorProcessParameterBase.cs | 95 +- .../Visual_Studio/Tango.BL/Entities/MachineBase.cs | 76 ++ Software/Visual_Studio/Tango.BL/Entities/Rml.cs | 89 ++ .../Tango.BL/Entities/RmlExtensionTestResult.cs | 16 + .../Entities/RmlExtensionTestResultBase.cs | 1392 ++++++++++++++++++++ .../Tango.BL/Entities/RmlsExtension.cs | 130 +- .../Tango.BL/Entities/RmlsExtensionBase.cs | 665 +++------- .../Tango.BL/Entities/RubbingResult.cs | 40 + .../Tango.BL/Entities/RubbingResultBase.cs | 372 ++++++ .../Tango.BL/Entities/TensileResult.cs | 40 + .../Tango.BL/Entities/TensileResultBase.cs | 410 ++++++ .../Visual_Studio/Tango.BL/Entities/UserBase.cs | 38 - .../Tango.BL/Entities/YarnApplication.cs | 6 +- .../Visual_Studio/Tango.BL/Entities/YarnBrand.cs | 22 +- .../Tango.BL/Entities/YarnBrandBase.cs | 2 +- .../Visual_Studio/Tango.BL/Entities/YarnColor.cs | 16 - .../Tango.BL/Entities/YarnColorBase.cs | 114 -- .../Visual_Studio/Tango.BL/Entities/YarnEndUse.cs | 16 - .../Tango.BL/Entities/YarnEndUseBase.cs | 114 -- .../Visual_Studio/Tango.BL/Entities/YarnFamily.cs | 6 +- .../Tango.BL/Entities/YarnFamilyBase.cs | 2 +- .../Tango.BL/Entities/YarnGeometry.cs | 16 - .../Tango.BL/Entities/YarnGeometryBase.cs | 114 -- .../Tango.BL/Entities/YarnGlossLevel.cs | 6 +- .../Tango.BL/Entities/YarnGlossLevelBase.cs | 2 +- .../Visual_Studio/Tango.BL/Entities/YarnGroup.cs | 6 +- .../Tango.BL/Entities/YarnGroupBase.cs | 2 +- .../Tango.BL/Entities/YarnIndustrysector.cs | 22 +- .../Tango.BL/Entities/YarnIndustrysectorBase.cs | 2 +- .../Tango.BL/Entities/YarnManufacturer.cs | 4 + .../Tango.BL/Entities/YarnManufacturerBase.cs | 2 +- .../Tango.BL/Entities/YarnMaterial.cs | 16 - .../Tango.BL/Entities/YarnMaterialBase.cs | 114 -- .../Tango.BL/Entities/YarnSubFamily.cs | 4 + .../Tango.BL/Entities/YarnSubFamilyBase.cs | 2 +- .../Tango.BL/Entities/YarnTexturing.cs | 4 + .../Tango.BL/Entities/YarnTexturingBase.cs | 2 +- .../Visual_Studio/Tango.BL/Entities/YarnType.cs | 4 + .../Tango.BL/Entities/YarnTypeBase.cs | 2 +- .../Tango.BL/Entities/YarnWhiteShade.cs | 20 + .../Tango.BL/Entities/YarnWhiteShadeBase.cs | 114 ++ .../Tango.BL/Enumerations/FactorColors.cs | 21 + .../Tango.BL/Enumerations/FiberShapes.cs | 36 + .../Enumerations/LinearMassDensityUnits.cs | 24 +- .../Tango.BL/Enumerations/MediaMaterials.cs | 48 + .../Tango.BL/Enumerations/MediaPurposes.cs | 36 + .../Tango.BL/Enumerations/Permissions.cs | 6 + .../Tango.BL/Enumerations/RMLExtensionStatus.cs | 19 + .../Tango.BL/Enumerations/TestResultColors.cs | 24 + .../Tango.BL/Enumerations/TwistDirections.cs | 6 +- .../Visual_Studio/Tango.BL/ObservablesContext.cs | 92 +- .../ObservablesEntitiesAdapterExtension.cs | 470 +++---- .../ObservablesStaticCollectionsExtension.cs | 470 +++---- Software/Visual_Studio/Tango.BL/Tango.BL.csproj | 36 +- .../Tango.ContinuousPumpsActivation.UI/App.config | 6 + .../Tango.ContinuousPumpsActivation.UI/App.xaml | 56 + .../Tango.ContinuousPumpsActivation.UI/App.xaml.cs | 17 + .../MainWindow.xaml | 66 + .../MainWindow.xaml.cs | 39 + .../Model/PumpModel.cs | 196 +++ .../Properties/AssemblyInfo.cs | 55 + .../Properties/Resources.Designer.cs | 71 + .../Properties/Resources.resx | 117 ++ .../Properties/Settings.Designer.cs | 30 + .../Properties/Settings.settings | 7 + .../Tango.ContinuousPumpsActivation.UI.csproj | 177 +++ .../ViewModels/MainWindowVM.cs | 156 +++ .../packages.config | 7 + .../Tango.DAL.Remote/DB/COLOR_PROCESS_DATA.cs | 2 +- .../Tango.DAL.Remote/DB/COLOR_PROCESS_FACTOR.cs | 30 - .../Tango.DAL.Remote/DB/COLOR_PROCESS_FACTORS.cs | 30 + .../DB/COLOR_PROCESS_PARAMETERS.cs | 6 +- .../Visual_Studio/Tango.DAL.Remote/DB/MACHINE.cs | 6 + .../Tango.DAL.Remote/DB/RMLS_EXTENSIONS.cs | 46 +- .../DB/RML_EXTENSION_TEST_RESULTS.cs | 67 + .../Tango.DAL.Remote/DB/RUBBING_RESULTS.cs | 31 + .../Tango.DAL.Remote/DB/RemoteADO.Context.cs | 28 +- .../Tango.DAL.Remote/DB/RemoteADO.edmx | 1154 +++++++++------- .../Tango.DAL.Remote/DB/RemoteADO.edmx.diagram | 243 ++-- .../Tango.DAL.Remote/DB/TENSILE_RESULTS.cs | 32 + Software/Visual_Studio/Tango.DAL.Remote/DB/USER.cs | 3 - .../Tango.DAL.Remote/DB/YARN_BRAND.cs | 31 - .../Tango.DAL.Remote/DB/YARN_BRANDS.cs | 31 + .../Tango.DAL.Remote/DB/YARN_COLOR.cs | 31 - .../Tango.DAL.Remote/DB/YARN_END_USE.cs | 31 - .../Tango.DAL.Remote/DB/YARN_FAMILIES.cs | 31 + .../Tango.DAL.Remote/DB/YARN_FAMILY.cs | 31 - .../Tango.DAL.Remote/DB/YARN_GEOMETRY.cs | 31 - .../Tango.DAL.Remote/DB/YARN_GLOSS_LEVEL.cs | 31 - .../Tango.DAL.Remote/DB/YARN_GLOSS_LEVELS.cs | 31 + .../Tango.DAL.Remote/DB/YARN_GROUP.cs | 31 - .../Tango.DAL.Remote/DB/YARN_GROUPS.cs | 31 + .../Tango.DAL.Remote/DB/YARN_INDUSTRYSECTOR.cs | 31 - .../Tango.DAL.Remote/DB/YARN_INDUSTRYSECTORS.cs | 31 + .../Tango.DAL.Remote/DB/YARN_MANUFACTURER.cs | 31 - .../Tango.DAL.Remote/DB/YARN_MANUFACTURERS.cs | 31 + .../Tango.DAL.Remote/DB/YARN_MATERIALS.cs | 31 - .../Tango.DAL.Remote/DB/YARN_SUB_FAMILIES.cs | 31 + .../Tango.DAL.Remote/DB/YARN_SUB_FAMILY.cs | 31 - .../Tango.DAL.Remote/DB/YARN_TEXTURING.cs | 31 - .../Tango.DAL.Remote/DB/YARN_TEXTURINGS.cs | 31 + .../Visual_Studio/Tango.DAL.Remote/DB/YARN_TYPE.cs | 31 - .../Tango.DAL.Remote/DB/YARN_TYPES.cs | 31 + .../Tango.DAL.Remote/DB/YARN_WHITE_SHADES.cs | 31 + .../Tango.DAL.Remote/Tango.DAL.Remote.csproj | 42 +- .../Converters/EnumToItemsSourceConverter.cs | 6 +- Software/Visual_Studio/Tango.sln | 35 +- 169 files changed, 9427 insertions(+), 4222 deletions(-) create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Converters/BoolToDisplayStatusConverter.cs create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Converters/ColorWithPercentToBrushConverter.cs create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Models/MachineModel.cs create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Models/RmlExtensionModel.cs create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/ViewModels/TestResultViewVM.cs create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/ViewModels/TestResultsViewVM.cs create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/MachineTestResultsView.xaml create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/MachineTestResultsView.xaml.cs create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/RMLExtensionView.xaml create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/RMLExtensionView.xaml.cs create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/RMLExtensionsView.xaml create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/RMLExtensionsView.xaml.cs create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/TestResultsView.xaml create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/TestResultsView.xaml.cs delete mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/ThreadExtensionView.xaml delete mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/ThreadExtensionView.xaml.cs delete mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/ThreadExtensionsView.xaml delete mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/ThreadExtensionsView.xaml.cs create mode 100644 Software/Visual_Studio/Tango.BL/Builders/RMLExtensionTestResultsCollectionBuilder.cs create mode 100644 Software/Visual_Studio/Tango.BL/DTO/RmlExtensionTestResultDTO.cs create mode 100644 Software/Visual_Studio/Tango.BL/DTO/RmlExtensionTestResultDTOBase.cs create mode 100644 Software/Visual_Studio/Tango.BL/DTO/RubbingResultDTO.cs create mode 100644 Software/Visual_Studio/Tango.BL/DTO/RubbingResultDTOBase.cs create mode 100644 Software/Visual_Studio/Tango.BL/DTO/TensileResultDTO.cs create mode 100644 Software/Visual_Studio/Tango.BL/DTO/TensileResultDTOBase.cs delete mode 100644 Software/Visual_Studio/Tango.BL/DTO/YarnColorDTO.cs delete mode 100644 Software/Visual_Studio/Tango.BL/DTO/YarnColorDTOBase.cs delete mode 100644 Software/Visual_Studio/Tango.BL/DTO/YarnEndUseDTO.cs delete mode 100644 Software/Visual_Studio/Tango.BL/DTO/YarnEndUseDTOBase.cs delete mode 100644 Software/Visual_Studio/Tango.BL/DTO/YarnGeometryDTO.cs delete mode 100644 Software/Visual_Studio/Tango.BL/DTO/YarnGeometryDTOBase.cs delete mode 100644 Software/Visual_Studio/Tango.BL/DTO/YarnMaterialDTO.cs delete mode 100644 Software/Visual_Studio/Tango.BL/DTO/YarnMaterialDTOBase.cs create mode 100644 Software/Visual_Studio/Tango.BL/DTO/YarnWhiteShadeDTO.cs create mode 100644 Software/Visual_Studio/Tango.BL/DTO/YarnWhiteShadeDTOBase.cs create mode 100644 Software/Visual_Studio/Tango.BL/Entities/RmlExtensionTestResult.cs create mode 100644 Software/Visual_Studio/Tango.BL/Entities/RmlExtensionTestResultBase.cs create mode 100644 Software/Visual_Studio/Tango.BL/Entities/RubbingResult.cs create mode 100644 Software/Visual_Studio/Tango.BL/Entities/RubbingResultBase.cs create mode 100644 Software/Visual_Studio/Tango.BL/Entities/TensileResult.cs create mode 100644 Software/Visual_Studio/Tango.BL/Entities/TensileResultBase.cs delete mode 100644 Software/Visual_Studio/Tango.BL/Entities/YarnColor.cs delete mode 100644 Software/Visual_Studio/Tango.BL/Entities/YarnColorBase.cs delete mode 100644 Software/Visual_Studio/Tango.BL/Entities/YarnEndUse.cs delete mode 100644 Software/Visual_Studio/Tango.BL/Entities/YarnEndUseBase.cs delete mode 100644 Software/Visual_Studio/Tango.BL/Entities/YarnGeometry.cs delete mode 100644 Software/Visual_Studio/Tango.BL/Entities/YarnGeometryBase.cs delete mode 100644 Software/Visual_Studio/Tango.BL/Entities/YarnMaterial.cs delete mode 100644 Software/Visual_Studio/Tango.BL/Entities/YarnMaterialBase.cs create mode 100644 Software/Visual_Studio/Tango.BL/Entities/YarnWhiteShade.cs create mode 100644 Software/Visual_Studio/Tango.BL/Entities/YarnWhiteShadeBase.cs create mode 100644 Software/Visual_Studio/Tango.BL/Enumerations/FactorColors.cs create mode 100644 Software/Visual_Studio/Tango.BL/Enumerations/RMLExtensionStatus.cs create mode 100644 Software/Visual_Studio/Tango.BL/Enumerations/TestResultColors.cs create mode 100644 Software/Visual_Studio/Tango.ContinuousPumpsActivation.UI/App.config create mode 100644 Software/Visual_Studio/Tango.ContinuousPumpsActivation.UI/App.xaml create mode 100644 Software/Visual_Studio/Tango.ContinuousPumpsActivation.UI/App.xaml.cs create mode 100644 Software/Visual_Studio/Tango.ContinuousPumpsActivation.UI/MainWindow.xaml create mode 100644 Software/Visual_Studio/Tango.ContinuousPumpsActivation.UI/MainWindow.xaml.cs create mode 100644 Software/Visual_Studio/Tango.ContinuousPumpsActivation.UI/Model/PumpModel.cs create mode 100644 Software/Visual_Studio/Tango.ContinuousPumpsActivation.UI/Properties/AssemblyInfo.cs create mode 100644 Software/Visual_Studio/Tango.ContinuousPumpsActivation.UI/Properties/Resources.Designer.cs create mode 100644 Software/Visual_Studio/Tango.ContinuousPumpsActivation.UI/Properties/Resources.resx create mode 100644 Software/Visual_Studio/Tango.ContinuousPumpsActivation.UI/Properties/Settings.Designer.cs create mode 100644 Software/Visual_Studio/Tango.ContinuousPumpsActivation.UI/Properties/Settings.settings create mode 100644 Software/Visual_Studio/Tango.ContinuousPumpsActivation.UI/Tango.ContinuousPumpsActivation.UI.csproj create mode 100644 Software/Visual_Studio/Tango.ContinuousPumpsActivation.UI/ViewModels/MainWindowVM.cs create mode 100644 Software/Visual_Studio/Tango.ContinuousPumpsActivation.UI/packages.config delete mode 100644 Software/Visual_Studio/Tango.DAL.Remote/DB/COLOR_PROCESS_FACTOR.cs create mode 100644 Software/Visual_Studio/Tango.DAL.Remote/DB/COLOR_PROCESS_FACTORS.cs create mode 100644 Software/Visual_Studio/Tango.DAL.Remote/DB/RML_EXTENSION_TEST_RESULTS.cs create mode 100644 Software/Visual_Studio/Tango.DAL.Remote/DB/RUBBING_RESULTS.cs create mode 100644 Software/Visual_Studio/Tango.DAL.Remote/DB/TENSILE_RESULTS.cs delete mode 100644 Software/Visual_Studio/Tango.DAL.Remote/DB/YARN_BRAND.cs create mode 100644 Software/Visual_Studio/Tango.DAL.Remote/DB/YARN_BRANDS.cs delete mode 100644 Software/Visual_Studio/Tango.DAL.Remote/DB/YARN_COLOR.cs delete mode 100644 Software/Visual_Studio/Tango.DAL.Remote/DB/YARN_END_USE.cs create mode 100644 Software/Visual_Studio/Tango.DAL.Remote/DB/YARN_FAMILIES.cs delete mode 100644 Software/Visual_Studio/Tango.DAL.Remote/DB/YARN_FAMILY.cs delete mode 100644 Software/Visual_Studio/Tango.DAL.Remote/DB/YARN_GEOMETRY.cs delete mode 100644 Software/Visual_Studio/Tango.DAL.Remote/DB/YARN_GLOSS_LEVEL.cs create mode 100644 Software/Visual_Studio/Tango.DAL.Remote/DB/YARN_GLOSS_LEVELS.cs delete mode 100644 Software/Visual_Studio/Tango.DAL.Remote/DB/YARN_GROUP.cs create mode 100644 Software/Visual_Studio/Tango.DAL.Remote/DB/YARN_GROUPS.cs delete mode 100644 Software/Visual_Studio/Tango.DAL.Remote/DB/YARN_INDUSTRYSECTOR.cs create mode 100644 Software/Visual_Studio/Tango.DAL.Remote/DB/YARN_INDUSTRYSECTORS.cs delete mode 100644 Software/Visual_Studio/Tango.DAL.Remote/DB/YARN_MANUFACTURER.cs create mode 100644 Software/Visual_Studio/Tango.DAL.Remote/DB/YARN_MANUFACTURERS.cs delete mode 100644 Software/Visual_Studio/Tango.DAL.Remote/DB/YARN_MATERIALS.cs create mode 100644 Software/Visual_Studio/Tango.DAL.Remote/DB/YARN_SUB_FAMILIES.cs delete mode 100644 Software/Visual_Studio/Tango.DAL.Remote/DB/YARN_SUB_FAMILY.cs delete mode 100644 Software/Visual_Studio/Tango.DAL.Remote/DB/YARN_TEXTURING.cs create mode 100644 Software/Visual_Studio/Tango.DAL.Remote/DB/YARN_TEXTURINGS.cs delete mode 100644 Software/Visual_Studio/Tango.DAL.Remote/DB/YARN_TYPE.cs create mode 100644 Software/Visual_Studio/Tango.DAL.Remote/DB/YARN_TYPES.cs create mode 100644 Software/Visual_Studio/Tango.DAL.Remote/DB/YARN_WHITE_SHADES.cs (limited to 'Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions') diff --git a/Software/DB/Tango.mdf b/Software/DB/Tango.mdf index 7954c30c7..221cc57f6 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 5aa254c67..edeb4fd85 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/Tango.MachineStudio.RML/ViewModels/MainViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.RML/ViewModels/MainViewVM.cs index b3e020c85..f44034a2f 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 @@ -101,26 +101,26 @@ namespace Tango.MachineStudio.RML.ViewModels set { _fiberSynths = value; RaisePropertyChangedAuto(); } } - private ObservableCollection _spoolTypes; - public ObservableCollection SpoolTypes - { - get { return _spoolTypes; } - set { _spoolTypes = value; RaisePropertyChangedAuto(); } - } - - private ObservableCollection _btsrApplicationTypes; - public ObservableCollection BtsrApplicationTypes - { - get { return _btsrApplicationTypes; } - set { _btsrApplicationTypes = value; RaisePropertyChangedAuto(); } - } - - private ObservableCollection _btsrYarnTypes; - public ObservableCollection BtsrYarnTypes - { - get { return _btsrYarnTypes; } - set { _btsrYarnTypes = value; RaisePropertyChangedAuto(); } - } + //private ObservableCollection _spoolTypes; + //public ObservableCollection SpoolTypes + //{ + // get { return _spoolTypes; } + // set { _spoolTypes = value; RaisePropertyChangedAuto(); } + //} + + //private ObservableCollection _btsrApplicationTypes; + //public ObservableCollection BtsrApplicationTypes + //{ + // get { return _btsrApplicationTypes; } + // set { _btsrApplicationTypes = value; RaisePropertyChangedAuto(); } + //} + + //private ObservableCollection _btsrYarnTypes; + //public ObservableCollection BtsrYarnTypes + //{ + // get { return _btsrYarnTypes; } + // set { _btsrYarnTypes = value; RaisePropertyChangedAuto(); } + //} private Rml _selectedRML; public Rml SelectedRML @@ -136,6 +136,17 @@ namespace Tango.MachineStudio.RML.ViewModels set { _activeRML = value; RaisePropertyChangedAuto(); } } + private List _manufacturers; + + public List Manufacturers + { + get { return _manufacturers; } + set { _manufacturers = value; + RaisePropertyChangedAuto(); + } + } + + private CalibrationDataViewVM _calibrationDataViewVM; public CalibrationDataViewVM CalibrationDataViewVM { @@ -312,7 +323,7 @@ namespace Tango.MachineStudio.RML.ViewModels x.Guid, x.FileName }).ToListAsync(); - + foreach (var rml in Rmls) { var cct = ccts.SingleOrDefault(x => x.Guid == rml.CctGuid); @@ -337,6 +348,8 @@ namespace Tango.MachineStudio.RML.ViewModels || r.Name.ToLower().Contains(RMLFilter.ToLower()); }; + + } } catch (Exception ex) @@ -373,7 +386,7 @@ namespace Tango.MachineStudio.RML.ViewModels }).ToObservableCollection(); CCTS.Where(x => String.IsNullOrWhiteSpace(x.FileName)).ToList().ForEach(x => x.FileName = x.Guid); - + LoadRmlProperties(); ActiveRML = await new RmlBuilder(_active_context) @@ -499,9 +512,10 @@ namespace Tango.MachineStudio.RML.ViewModels LinearMassDensityUnits = _active_context.LinearMassDensityUnits.ToObservableCollection(); FiberShapes = _active_context.FiberShapes.ToObservableCollection(); FiberSynths = _active_context.FiberSynths.ToObservableCollection(); - SpoolTypes = _active_context.SpoolTypes.ToObservableCollection(); - BtsrApplicationTypes = _active_context.BtsrApplicationTypes.ToObservableCollection(); - BtsrYarnTypes = _active_context.BtsrYarnTypes.ToObservableCollection(); + //SpoolTypes = _active_context.SpoolTypes.ToObservableCollection(); + //BtsrApplicationTypes = _active_context.BtsrApplicationTypes.ToObservableCollection(); + //BtsrYarnTypes = _active_context.BtsrYarnTypes.ToObservableCollection(); + Manufacturers = _active_context.YarnManufacturers.Select(x => x.Name).ToList(); } private async void AddNewRml() 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 099637601..f89da482c 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 @@ -72,14 +72,16 @@ - - + - - + + + - - + + @@ -88,7 +90,7 @@ - + diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Contracts/IMainView.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Contracts/IMainView.cs index 0f432eefb..cd1bfcd75 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Contracts/IMainView.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Contracts/IMainView.cs @@ -7,14 +7,14 @@ using Tango.SharedUI; namespace Tango.MachineStudio.ThreadExtensions.Contracts { - public enum ThreadExtensionNavigationView + public enum RMLExtensionNavigationView { - ThreadExtentionView, - ThreadExtensionsView, + RMLExtentionView, + RMLExtensionsView, } public interface IMainView : IView { - void NavigateTo(ThreadExtensionNavigationView view); + void NavigateTo(RMLExtensionNavigationView view); } } diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Converters/BoolToDisplayStatusConverter.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Converters/BoolToDisplayStatusConverter.cs new file mode 100644 index 000000000..b06bb0309 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Converters/BoolToDisplayStatusConverter.cs @@ -0,0 +1,32 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Globalization; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Data; +using System.Windows.Media; + +namespace Tango.MachineStudio.ThreadExtensions.Converters +{ + public class BoolToDisplayStatusConverter : IValueConverter + { + public object Convert(object value, Type targetType, object parameter, CultureInfo culture) + { + if( value is bool) + { + if((bool)value) + { + return "Done"; + } + } + return "In progress"; + } + + public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) + { + throw new NotImplementedException(); + } + } +} diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Converters/ColorNameToBrushConverter.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Converters/ColorNameToBrushConverter.cs index c9e246bb8..5d97626fe 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Converters/ColorNameToBrushConverter.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Converters/ColorNameToBrushConverter.cs @@ -18,7 +18,16 @@ namespace Tango.MachineStudio.ThreadExtensions.Converters { string colorName = value as string; if(String.IsNullOrEmpty(colorName)) + { + if(value.GetType().IsEnum ) + { + colorName = value.ToString(); + } + } + if (String.IsNullOrEmpty(colorName)) + { return new SolidColorBrush(Colors.Transparent); + } Color color = (Color)TypeDescriptor.GetConverter(typeof(Color)).ConvertFromString(colorName); diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Converters/ColorWithPercentToBrushConverter.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Converters/ColorWithPercentToBrushConverter.cs new file mode 100644 index 000000000..eb45b3959 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Converters/ColorWithPercentToBrushConverter.cs @@ -0,0 +1,57 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Globalization; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Data; +using System.Windows.Media; + + +namespace Tango.MachineStudio.ThreadExtensions.Converters +{ + public class ColorWithPercentToBrushConverter : IMultiValueConverter + { + + public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture) + { + if (values.Length == 2) + { + if (values[0].GetType().IsEnum) + { + string colorName = values[0].ToString(); + if (String.IsNullOrEmpty(colorName)) + { + return new SolidColorBrush(Colors.Transparent); + } + int persent = System.Convert.ToInt32(values[1]); + double opacity = persent == 100 ? 0.3 : 0.7; + + Color color = (Color)TypeDescriptor.GetConverter(typeof(Color)).ConvertFromString(colorName); + SolidColorBrush brush = new SolidColorBrush(color); + brush.Opacity = opacity; + return brush; + } + else + { + return new SolidColorBrush(Colors.Transparent); + } + } + else + { + return new SolidColorBrush(Colors.Transparent); + } + } + + //public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) + //{ + // throw new NotImplementedException(); + //} + + public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture) + { + throw new NotImplementedException(); + } + } +} diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Models/FactorTarget.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Models/FactorTarget.cs index 32f568f5f..0cb2679fd 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Models/FactorTarget.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Models/FactorTarget.cs @@ -3,18 +3,19 @@ using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; +using Tango.BL.Enumerations; namespace Tango.MachineStudio.ThreadExtensions.Models { public static class FactorTarget { - public static Dictionary FACTOR100 = new Dictionary() { - { "CYAN", 51.95}, {"MAGENTA", 47.47}, { "YELLOW", 94.05}, {"BLACK", 26.58}}; + public static Dictionary FACTOR100 = new Dictionary() { + { FactorColors.CYAN, 51.95}, {FactorColors.MAGENTA, 47.47}, { FactorColors.YELLOW, 94.05}, {FactorColors.BLACK, 26.58}}; - public static Dictionary FACTOR200 = new Dictionary() { - { "CYAN", 46.3}, {"MAGENTA", 41.04}, { "YELLOW", 97.78}, {"BLACK", 21.01}}; + public static Dictionary FACTOR200 = new Dictionary() { + { FactorColors.CYAN, 46.3}, {FactorColors.MAGENTA, 41.04}, { FactorColors.YELLOW, 97.78}, {FactorColors.BLACK, 21.01}}; - public static double GetFactor100(string color) + public static double GetFactor100(FactorColors color) { double result; @@ -24,7 +25,7 @@ namespace Tango.MachineStudio.ThreadExtensions.Models } return 0.0; } - public static double GetFactor200(string color) + public static double GetFactor200(FactorColors color) { double result; 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 new file mode 100644 index 000000000..e41a6a220 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Models/MachineModel.cs @@ -0,0 +1,44 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Tango.Core; + +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; } + set + { + _serialnumber = value; + RaisePropertyChangedAuto(); + } + } + + private bool _hasRMLTest; + + public bool HasRMLTest + { + get { return _hasRMLTest; } + set { _hasRMLTest = value; + RaisePropertyChangedAuto(); + } + } + + public MachineModel() + { + HasRMLTest = false; + } + + } +} diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Models/PlotProperties.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Models/PlotProperties.cs index 47632d3aa..ee882ad4b 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Models/PlotProperties.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Models/PlotProperties.cs @@ -5,6 +5,7 @@ using System.Collections.Generic; using System.Diagnostics; using System.Linq; using Tango.BL.Entities; +using Tango.BL.Enumerations; using Tango.Core; using Tango.MachineStudio.ThreadExtensions.ViewModels; @@ -15,12 +16,12 @@ namespace Tango.MachineStudio.ThreadExtensions.Models public Plot PlotControl { get; set; } private IList _points; - private string _colorName; + private FactorColors _color; - public string ColorName + public FactorColors Color { - get { return _colorName; } - set { _colorName = value; } + get { return _color; } + set { _color = value; } } /// @@ -94,12 +95,12 @@ namespace Tango.MachineStudio.ThreadExtensions.Models } } - public PlotProperties(string colorName) + public PlotProperties(FactorColors color) { this.Points = new List(); Target100Points = new List(); Target200Points = new List(); - ColorName = colorName; + Color = color; } @@ -121,8 +122,8 @@ namespace Tango.MachineStudio.ThreadExtensions.Models ClearResults(); PlotControl.InvalidatePlot(true); - double target100Y = FactorTarget.GetFactor100(ColorName); - double target200Y = FactorTarget.GetFactor200(ColorName); + double target100Y = FactorTarget.GetFactor100(Color); + double target200Y = FactorTarget.GetFactor200(Color); _to = target100Y > target200Y? target100Y + 10: target200Y + 10; _from = target100Y < target200Y ? target100Y - 10 : target200Y - 10; diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Models/RmlExtensionModel.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Models/RmlExtensionModel.cs new file mode 100644 index 000000000..9b5d9d8ce --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Models/RmlExtensionModel.cs @@ -0,0 +1,33 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Tango.BL.Enumerations; +using Tango.Core; + +namespace Tango.MachineStudio.ThreadExtensions.Models +{ + public class RmlExtensionModel : ExtendedObject + { + public String Guid { get; set; } + + public String RMLGuid { get; set; } + + public string Name { get; set; } + + public String Manufacturer { get; set; } + + public String Brand { get; set; } + + public int LinearDensity { get; set; } + + public String CreatedBy { get; set;} + + public DateTime Created { get; set; } + + public DateTime LastUpdated { get; set; } + + public RMLExtensionStatus Status{ get; set; } + } +} 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 6b7204aac..1c9ac345b 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 @@ -38,6 +38,9 @@ ..\..\..\packages\EntityFramework.6.2.0\lib\net45\EntityFramework.SqlServer.dll + + ..\..\..\packages\FontAwesome.WPF.4.7.0.9\lib\net40\FontAwesome.WPF.dll + ..\..\..\packages\Google.Protobuf.3.4.1\lib\net45\Google.Protobuf.dll @@ -85,28 +88,40 @@ GlobalVersionInfo.cs + + + + + + ColorParametersView.xaml + + MachineTestResultsView.xaml + MainView.xaml + + TestResultsView.xaml + ThreadCharacteristicsView.xaml - - ThreadExtensionView.xaml + + RMLExtensionView.xaml - - ThreadExtensionsView.xaml + + RMLExtensionsView.xaml MSBuild:Compile @@ -116,19 +131,27 @@ Designer MSBuild:Compile + + Designer + MSBuild:Compile + Designer MSBuild:Compile + + Designer + MSBuild:Compile + Designer MSBuild:Compile - + Designer MSBuild:Compile - + MSBuild:Compile Designer diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/ViewModels/ColorParametersVewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/ViewModels/ColorParametersVewVM.cs index b2e677339..ae90263d2 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/ViewModels/ColorParametersVewVM.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/ViewModels/ColorParametersVewVM.cs @@ -21,6 +21,11 @@ using Tango.MachineStudio.ThreadExtensions.Models; using Tango.Core.Commands; using Microsoft.Win32; using System.Diagnostics; +using Tango.Settings; +using Tango.MachineStudio.Common; +using Tango.Logging; +using Tango.BL.Enumerations; +using System.Data.Entity; namespace Tango.MachineStudio.ThreadExtensions.ViewModels { @@ -28,10 +33,10 @@ namespace Tango.MachineStudio.ThreadExtensions.ViewModels { private INotificationProvider _notification; private IActionLogManager _actionLogManager; - + private ObservablesContext _active_context; - private ObservablesContext _machineDbContext; - // private ColorProcessParameterDTO _hwBeforeSave; + + public event EventHandler SaveColorParameters; #region Properties @@ -48,7 +53,7 @@ namespace Tango.MachineStudio.ThreadExtensions.ViewModels RaisePropertyChangedAuto(); } } - + private ObservableCollection _magentaProcessData; public ObservableCollection MagentaProcessData { @@ -76,7 +81,7 @@ namespace Tango.MachineStudio.ThreadExtensions.ViewModels RaisePropertyChangedAuto(); } } - + private ObservableCollection _yellowProcessData; public ObservableCollection YellowProcessData { @@ -167,7 +172,8 @@ namespace Tango.MachineStudio.ThreadExtensions.ViewModels public PlotProperties CyanPlot { get { return _cyanPlot; } - set { + set + { _cyanPlot = value; RaisePropertyChangedAuto(); } @@ -196,23 +202,32 @@ namespace Tango.MachineStudio.ThreadExtensions.ViewModels get { return _blackPlot; } set { _blackPlot = value; } } - /// - /// Gets or sets the machines providers. - /// - public ISuggestionProvider MachinesProvider { get; set; } - protected Machine _selectedMachine; + private string _RMLExtentionGUID; + + public string RMLExtemtionGUID + { + get { return _RMLExtentionGUID; } + set + { + _RMLExtentionGUID = value; + OnRMLExtensionGUIDChanged(); + } + } + + protected string _selectedMachineGuid; /// /// Gets or sets the selected machine. /// - public Machine SelectedMachine + public String SelectedMachineGUID { - get { return _selectedMachine; } + get { return _selectedMachineGuid; } set { - if (value != null && _selectedMachine != value) + if (value != null && _selectedMachineGuid != value) { - _selectedMachine = value; + _selectedMachineGuid = value; + SelectedMachineChanged(); RaisePropertyChangedAuto(); InvalidateRelayCommands(); } @@ -229,25 +244,27 @@ namespace Tango.MachineStudio.ThreadExtensions.ViewModels public bool IsViewLoaded { get { return _isViewLoaded; } - set { - if(_isViewLoaded != value) + set + { + if (_isViewLoaded != value) { _isViewLoaded = value; } } } - - private Dictionary _removedColorProcessDataBeforeSave; - - public Dictionary RemovedColorProcessDataBeforeSave - { - get { return _removedColorProcessDataBeforeSave; } - set { _removedColorProcessDataBeforeSave = value; } - } + + /// + /// Saved guid of the removed color process data before save. + /// + private List RemovedColorProcessDataBeforeSave { get; set;} #endregion #region commands + public RelayCommand SaveCommand { get; set; } + + public RelayCommand FlytoRMLLiquidFactorsCommand { get; set; } + public RelayCommand ImportCyanDataCommand { get; set; } public RelayCommand ImportMagentaDataCommand { get; set; } public RelayCommand ImportYellowDataCommand { get; set; } @@ -259,9 +276,10 @@ namespace Tango.MachineStudio.ThreadExtensions.ViewModels if (LoadColorDataFromExcel(out items) && items != null) { MagentaProcessData.Clear(); - items.ForEach(x => MagentaProcessData.Add(new ColorProcessData() { InkNlCm = x.NlCm, L = x.L, A = x.A, B = x.B, ColorProcessParametersGuid = SelectedColorProcessParameter.Guid})); + RemoveColorDataByColor((int)FactorColors.MAGENTA, SelectedColorProcessParameter.Guid); + items.ForEach(x => MagentaProcessData.Add(new ColorProcessData() { InkNlCm = x.NlCm, L = x.L, A = x.A, B = x.B, ColorProcessParametersGuid = SelectedColorProcessParameter.Guid })); MagentaPlot.CreateGraph(MagentaProcessData.ToList(), true); - UpdateFactorsOnChangeProcessData("MAGENTA"); + UpdateFactorsOnChangeProcessData(FactorColors.MAGENTA); } } @@ -271,9 +289,10 @@ namespace Tango.MachineStudio.ThreadExtensions.ViewModels if (LoadColorDataFromExcel(out items) && items != null) { YellowProcessData.Clear(); - items.ForEach(x => YellowProcessData.Add(new ColorProcessData() { InkNlCm = x.NlCm, L = x.L, A = x.A, B = x.B, ColorProcessParametersGuid = SelectedColorProcessParameter.Guid})); + RemoveColorDataByColor((int)FactorColors.YELLOW, SelectedColorProcessParameter.Guid); + items.ForEach(x => YellowProcessData.Add(new ColorProcessData() { InkNlCm = x.NlCm, L = x.L, A = x.A, B = x.B, ColorProcessParametersGuid = SelectedColorProcessParameter.Guid })); YellowPlot.CreateGraph(YellowProcessData.ToList(), false); - UpdateFactorsOnChangeProcessData("YELLOW"); + UpdateFactorsOnChangeProcessData(FactorColors.YELLOW); } } @@ -283,21 +302,28 @@ namespace Tango.MachineStudio.ThreadExtensions.ViewModels if (LoadColorDataFromExcel(out items) && items != null) { CyanProcessData.Clear(); + RemoveColorDataByColor((int)FactorColors.CYAN, SelectedColorProcessParameter.Guid); items.ForEach(x => CyanProcessData.Add(new ColorProcessData() { InkNlCm = x.NlCm, L = x.L, A = x.A, B = x.B, ColorProcessParametersGuid = SelectedColorProcessParameter.Guid })); CyanPlot.CreateGraph(CyanProcessData.ToList(), true); - UpdateFactorsOnChangeProcessData("CYAN"); + UpdateFactorsOnChangeProcessData(FactorColors.CYAN); } } + private void FlytoRMLLiquidFactors(FactorColors obj) + { + throw new NotImplementedException(); + } + private void ImportBlackData(object obj) { List items; if (LoadColorDataFromExcel(out items) && items != null) { BlackProcessData.Clear(); + RemoveColorDataByColor((int)FactorColors.BLACK, SelectedColorProcessParameter.Guid); items.ForEach(x => BlackProcessData.Add(new ColorProcessData() { InkNlCm = x.NlCm, L = x.L, A = x.A, B = x.B, ColorProcessParametersGuid = SelectedColorProcessParameter.Guid })); BlackPlot.CreateGraph(BlackProcessData.ToList(), true); - UpdateFactorsOnChangeProcessData("BLACK"); + UpdateFactorsOnChangeProcessData(FactorColors.BLACK); } } @@ -336,19 +362,8 @@ namespace Tango.MachineStudio.ThreadExtensions.ViewModels _notification = notification; _actionLogManager = actionLogManager; _isViewLoaded = false; - RemovedColorProcessDataBeforeSave = new Dictionary(); + RemovedColorProcessDataBeforeSave = new List(); - MachinesProvider = new SuggestionProvider((filter) => - { - try - { - return _machineDbContext.Machines.Where(x => x.SerialNumber.StartsWith(filter)).ToList(); - } - catch - { - return null; - } - }); CyanProcessData = new ObservableCollection(); CyanProcessData.CollectionChanged += OnCyanCollectionChanged; @@ -362,115 +377,125 @@ namespace Tango.MachineStudio.ThreadExtensions.ViewModels BlackProcessData = new ObservableCollection(); BlackProcessData.CollectionChanged += OnBlackCollectionChanged; - CyanPlot = new PlotProperties("CYAN"); - YellowPlot = new PlotProperties("YELLOW"); - MagentaPlot = new PlotProperties("MAGENTA"); - BlackPlot = new PlotProperties("BLACK"); - + CyanPlot = new PlotProperties(FactorColors.CYAN); + YellowPlot = new PlotProperties(FactorColors.YELLOW); + MagentaPlot = new PlotProperties(FactorColors.MAGENTA); + BlackPlot = new PlotProperties(FactorColors.BLACK); + + SaveCommand = new RelayCommand(Save, () => IsFree); ImportCyanDataCommand = new RelayCommand(ImportCyanData); ImportMagentaDataCommand = new RelayCommand(ImportMagentaData); ImportYellowDataCommand = new RelayCommand(ImportYellowData); ImportBlackDataCommand = new RelayCommand(ImportBlackData); + + FlytoRMLLiquidFactorsCommand = new RelayCommand(FlytoRMLLiquidFactors, () => IsFree); } + #region Loading - public async void LoadColorParameters(string RMLExtemtionGUID) + public async void LoadColorParameters() { + if (SelectedMachineGUID == null) + { + _notification.ShowWarning(LogManager.Log($"Please, select machine.", LogCategory.Warning)); + IsFree = false; + return; + } IsFree = false; if (_active_context != null) { _active_context.Dispose(); } - if (_machineDbContext != null) - { - _machineDbContext.Dispose(); - } - - LogManager.Log("Initializing machine Db context..."); - - _machineDbContext = ObservablesContext.CreateDefault(); - - _active_context = ObservablesContext.CreateDefault(); await Task.Factory.StartNew(() => { using (_notification.PushTaskItem("Loading Color Process Parameters ...")) { - - var currentcolorProcessParameter = _active_context.ColorProcessParameters.Where(x => x.RmlsExtensionsGuid == RMLExtemtionGUID).FirstOrDefault(); - if(currentcolorProcessParameter != null) + + var currentcolorProcessParameter = _active_context.ColorProcessParameters.Where(x => x.RmlsExtensionsGuid == RMLExtemtionGUID && x.MachineGuid == SelectedMachineGUID).FirstOrDefault(); + if (currentcolorProcessParameter != null) { - SelectedColorProcessParameter = new ColorProcessParametersBuilder(_active_context).Set(currentcolorProcessParameter.Guid).WithColorProcessData().WithColorProcessFactor(). Build(); + SelectedColorProcessParameter = new ColorProcessParametersBuilder(_active_context).Set(currentcolorProcessParameter.Guid).WithColorProcessData().WithColorProcessFactor().Build(); } - + if (SelectedColorProcessParameter == null) { - SelectedColorProcessParameter = new ColorProcessParameter() { RmlsExtensionsGuid = RMLExtemtionGUID }; + SelectedColorProcessParameter = new ColorProcessParameter() { RmlsExtensionsGuid = RMLExtemtionGUID, MachineGuid = SelectedMachineGUID }; SelectedColorProcessParameter.WhitePointL = 0.0; SelectedColorProcessParameter.WhitePointA = 0.0; SelectedColorProcessParameter.WhitePointB = 0.0; - SelectedColorProcessParameter.ColorProcessFactor.Add(new ColorProcessFactor() { ColorName = "CYAN", FactorPercent = 100, ColorProcessParametersGuid = SelectedColorProcessParameter.Guid }); - SelectedColorProcessParameter.ColorProcessFactor.Add(new ColorProcessFactor() { ColorName = "MAGENTA", FactorPercent = 100, ColorProcessParametersGuid = SelectedColorProcessParameter.Guid }); - SelectedColorProcessParameter.ColorProcessFactor.Add(new ColorProcessFactor() { ColorName = "YELLOW", FactorPercent = 100, ColorProcessParametersGuid = SelectedColorProcessParameter.Guid }); - SelectedColorProcessParameter.ColorProcessFactor.Add(new ColorProcessFactor() { ColorName = "BLACK", FactorPercent = 100, ColorProcessParametersGuid = SelectedColorProcessParameter.Guid }); - SelectedColorProcessParameter.ColorProcessFactor.Add(new ColorProcessFactor() { ColorName = "CYAN", FactorPercent = 200, ColorProcessParametersGuid = SelectedColorProcessParameter.Guid }); - SelectedColorProcessParameter.ColorProcessFactor.Add(new ColorProcessFactor() { ColorName = "MAGENTA", FactorPercent = 200, ColorProcessParametersGuid = SelectedColorProcessParameter.Guid }); - SelectedColorProcessParameter.ColorProcessFactor.Add(new ColorProcessFactor() { ColorName = "YELLOW", FactorPercent = 200, ColorProcessParametersGuid = SelectedColorProcessParameter.Guid }); - SelectedColorProcessParameter.ColorProcessFactor.Add(new ColorProcessFactor() { ColorName = "BLACK", FactorPercent = 200, ColorProcessParametersGuid = SelectedColorProcessParameter.Guid }); - SelectedColorProcessParameter.ColorProcessFactor.Add(new ColorProcessFactor() { ColorName = "CYAN", FactorPercent = 1, ColorProcessParametersGuid = SelectedColorProcessParameter.Guid }); - SelectedColorProcessParameter.ColorProcessFactor.Add(new ColorProcessFactor() { ColorName = "MAGENTA", FactorPercent = 1, ColorProcessParametersGuid = SelectedColorProcessParameter.Guid }); - SelectedColorProcessParameter.ColorProcessFactor.Add(new ColorProcessFactor() { ColorName = "YELLOW", FactorPercent = 1, ColorProcessParametersGuid = SelectedColorProcessParameter.Guid }); - SelectedColorProcessParameter.ColorProcessFactor.Add(new ColorProcessFactor() { ColorName = "BLACK", FactorPercent = 1, ColorProcessParametersGuid = SelectedColorProcessParameter.Guid }); - SelectedColorProcessParameter.ColorProcessFactor.Add(new ColorProcessFactor() { ColorName = "CYAN", FactorPercent = 1111, ColorProcessParametersGuid = SelectedColorProcessParameter.Guid }); - SelectedColorProcessParameter.ColorProcessFactor.Add(new ColorProcessFactor() { ColorName = "MAGENTA", FactorPercent = 1111, ColorProcessParametersGuid = SelectedColorProcessParameter.Guid }); - SelectedColorProcessParameter.ColorProcessFactor.Add(new ColorProcessFactor() { ColorName = "YELLOW", FactorPercent = 1111, ColorProcessParametersGuid = SelectedColorProcessParameter.Guid }); - SelectedColorProcessParameter.ColorProcessFactor.Add(new ColorProcessFactor() { ColorName = "BLACK", FactorPercent = 1111, ColorProcessParametersGuid = SelectedColorProcessParameter.Guid }); + SelectedColorProcessParameter.ColorProcessFactors.Add(new ColorProcessFactor() { FactorColor = FactorColors.CYAN, FactorPercent = 100, ColorProcessParametersGuid = SelectedColorProcessParameter.Guid }); + SelectedColorProcessParameter.ColorProcessFactors.Add(new ColorProcessFactor() { FactorColor = FactorColors.MAGENTA, FactorPercent = 100, ColorProcessParametersGuid = SelectedColorProcessParameter.Guid }); + SelectedColorProcessParameter.ColorProcessFactors.Add(new ColorProcessFactor() { FactorColor = FactorColors.YELLOW, FactorPercent = 100, ColorProcessParametersGuid = SelectedColorProcessParameter.Guid }); + SelectedColorProcessParameter.ColorProcessFactors.Add(new ColorProcessFactor() { FactorColor = FactorColors.BLACK, FactorPercent = 100, ColorProcessParametersGuid = SelectedColorProcessParameter.Guid }); + SelectedColorProcessParameter.ColorProcessFactors.Add(new ColorProcessFactor() { FactorColor = FactorColors.CYAN, FactorPercent = 200, ColorProcessParametersGuid = SelectedColorProcessParameter.Guid }); + SelectedColorProcessParameter.ColorProcessFactors.Add(new ColorProcessFactor() { FactorColor = FactorColors.MAGENTA, FactorPercent = 200, ColorProcessParametersGuid = SelectedColorProcessParameter.Guid }); + SelectedColorProcessParameter.ColorProcessFactors.Add(new ColorProcessFactor() { FactorColor = FactorColors.YELLOW, FactorPercent = 200, ColorProcessParametersGuid = SelectedColorProcessParameter.Guid }); + SelectedColorProcessParameter.ColorProcessFactors.Add(new ColorProcessFactor() { FactorColor = FactorColors.BLACK, FactorPercent = 200, ColorProcessParametersGuid = SelectedColorProcessParameter.Guid }); + SelectedColorProcessParameter.ColorProcessFactors.Add(new ColorProcessFactor() { FactorColor = FactorColors.CYAN, FactorPercent = 1, ColorProcessParametersGuid = SelectedColorProcessParameter.Guid }); + SelectedColorProcessParameter.ColorProcessFactors.Add(new ColorProcessFactor() { FactorColor = FactorColors.MAGENTA, FactorPercent = 1, ColorProcessParametersGuid = SelectedColorProcessParameter.Guid }); + SelectedColorProcessParameter.ColorProcessFactors.Add(new ColorProcessFactor() { FactorColor = FactorColors.YELLOW, FactorPercent = 1, ColorProcessParametersGuid = SelectedColorProcessParameter.Guid }); + SelectedColorProcessParameter.ColorProcessFactors.Add(new ColorProcessFactor() { FactorColor = FactorColors.BLACK, FactorPercent = 1, ColorProcessParametersGuid = SelectedColorProcessParameter.Guid }); + SelectedColorProcessParameter.ColorProcessFactors.Add(new ColorProcessFactor() { FactorColor = FactorColors.CYAN, FactorPercent = 1111, ColorProcessParametersGuid = SelectedColorProcessParameter.Guid }); + SelectedColorProcessParameter.ColorProcessFactors.Add(new ColorProcessFactor() { FactorColor = FactorColors.MAGENTA, FactorPercent = 1111, ColorProcessParametersGuid = SelectedColorProcessParameter.Guid }); + SelectedColorProcessParameter.ColorProcessFactors.Add(new ColorProcessFactor() { FactorColor = FactorColors.YELLOW, FactorPercent = 1111, ColorProcessParametersGuid = SelectedColorProcessParameter.Guid }); + SelectedColorProcessParameter.ColorProcessFactors.Add(new ColorProcessFactor() { FactorColor = FactorColors.BLACK, FactorPercent = 1111, ColorProcessParametersGuid = SelectedColorProcessParameter.Guid }); _active_context.ColorProcessParameters.Add(SelectedColorProcessParameter); _active_context.SaveChangesAsync(); } - + } }); - + LoadParameters(); IsFree = true; } private void LoadParameters() { - Factor100ProcessData = SelectedColorProcessParameter.ColorProcessFactor.Where(x => x.FactorPercent == 100).ToObservableCollection(); + Factor100ProcessData = SelectedColorProcessParameter.ColorProcessFactors.Where(x => x.FactorPercent == 100).ToObservableCollection(); - Factor200ProcessData = SelectedColorProcessParameter.ColorProcessFactor.Where(x => x.FactorPercent == 200).ToObservableCollection(); + Factor200ProcessData = SelectedColorProcessParameter.ColorProcessFactors.Where(x => x.FactorPercent == 200).ToObservableCollection(); - MinInkUptake = SelectedColorProcessParameter.ColorProcessFactor.Where(x => x.FactorPercent == 1).ToObservableCollection(); + MinInkUptake = SelectedColorProcessParameter.ColorProcessFactors.Where(x => x.FactorPercent == 1).ToObservableCollection(); - MaxInkUptake = SelectedColorProcessParameter.ColorProcessFactor.Where(x => x.FactorPercent == 1111).ToObservableCollection(); + MaxInkUptake = SelectedColorProcessParameter.ColorProcessFactors.Where(x => x.FactorPercent == 1111).ToObservableCollection(); RemovedColorProcessDataBeforeSave.Clear(); - var cyanDataList = SelectedColorProcessParameter.ColorProcessData.Where(x => x.ColorName == "CYAN").ToList().OrderBy(x => x.InkNlCm ).ToList(); + var cyanDataList = SelectedColorProcessParameter.ColorProcessData.Where(x => x.FactorColor == FactorColors.CYAN).ToList().OrderBy(x => x.InkNlCm).ToList(); CyanProcessData.Clear(); - cyanDataList.ForEach( y => CyanProcessData.Add(y)); + cyanDataList.ForEach(y => CyanProcessData.Add(y)); - var magentaDatalist = SelectedColorProcessParameter.ColorProcessData.Where(x => x.ColorName == "MAGENTA").ToList().OrderBy(x => x.InkNlCm).ToList(); ; + var magentaDatalist = SelectedColorProcessParameter.ColorProcessData.Where(x => x.FactorColor == FactorColors.MAGENTA).ToList().OrderBy(x => x.InkNlCm).ToList(); ; MagentaProcessData.Clear(); magentaDatalist.ForEach(y => MagentaProcessData.Add(y)); - var yellowDatalist = SelectedColorProcessParameter.ColorProcessData.Where(x => x.ColorName == "YELLOW").ToList().OrderBy(x => x.InkNlCm).ToList(); ; + var yellowDatalist = SelectedColorProcessParameter.ColorProcessData.Where(x => x.FactorColor == FactorColors.YELLOW).ToList().OrderBy(x => x.InkNlCm).ToList(); ; YellowProcessData.Clear(); yellowDatalist.ForEach(y => YellowProcessData.Add(y)); - var blackDatalist = SelectedColorProcessParameter.ColorProcessData.Where(x => x.ColorName == "BLACK").ToList().OrderBy(x => x.InkNlCm).ToList(); ; + var blackDatalist = SelectedColorProcessParameter.ColorProcessData.Where(x => x.FactorColor == FactorColors.BLACK).ToList().OrderBy(x => x.InkNlCm).ToList(); ; BlackProcessData.Clear(); blackDatalist.ForEach(y => BlackProcessData.Add(y)); - + UpdatePlots(); - SelectedColorProcessParameter.ColorProcessFactor.ToList().ForEach(x => UpdateFactorsOnChangeProcessData(x.ColorName)); + SelectedColorProcessParameter.ColorProcessFactors.ToList().ForEach(x => UpdateFactorsOnChangeProcessData(x.FactorColor)); } + private void OnRMLExtensionGUIDChanged() + { + SelectedColorProcessParameter = null; + } + + private void SelectedMachineChanged() + { + SelectedColorProcessParameter = null; + LoadColorParameters(); + } #endregion #region Update Plot @@ -488,83 +513,21 @@ namespace Tango.MachineStudio.ThreadExtensions.ViewModels private void OnCyanCollectionChanged(object sender, NotifyCollectionChangedEventArgs e) { - if (e.Action == NotifyCollectionChangedAction.Reset) - { - var cyanProcessData = SelectedColorProcessParameter.ColorProcessData.Where(x => x.ColorName == "CYAN").ToObservableCollection(); - foreach (ColorProcessData item in cyanProcessData) - { - SelectedColorProcessParameter.ColorProcessData.Remove(item); - RemovedColorProcessDataBeforeSave[item.Guid] = item; - item.PropertyChanged -= CyanMeasurementModelPropertyChanged; - } - // UpdateFactorsOnChangeProcessData("Cyan"); - } - else if (e.Action == NotifyCollectionChangedAction.Remove) - { - foreach (ColorProcessData item in e.OldItems) - { - SelectedColorProcessParameter.ColorProcessData.Remove(item); - RemovedColorProcessDataBeforeSave[item.Guid] = item; - item.PropertyChanged -= CyanMeasurementModelPropertyChanged; - } - UpdateFactorsOnChangeProcessData("CYAN"); - } - else if (e.Action == NotifyCollectionChangedAction.Add) - { - foreach (ColorProcessData item in e.NewItems) - { - item.ColorName = "CYAN"; - item.ColorProcessParametersGuid = SelectedColorProcessParameter.Guid; - SelectedColorProcessParameter.ColorProcessData.Add(item); - RemovedColorProcessDataBeforeSave.Remove(item.Guid); - item.PropertyChanged += CyanMeasurementModelPropertyChanged; - } - } + OnColorCollectionChange(e, FactorColors.CYAN, CyanMeasurementModelPropertyChanged); } private void CyanMeasurementModelPropertyChanged(object sender, PropertyChangedEventArgs e) { - if(IsFree) + if (IsFree) { CyanPlot.CreateGraph(CyanProcessData.ToList(), true); - UpdateFactorsOnChangeProcessData("CYAN"); + UpdateFactorsOnChangeProcessData(FactorColors.CYAN); } } - + private void OnMagentaCollectionChanged(object sender, NotifyCollectionChangedEventArgs e) { - if (e.Action == NotifyCollectionChangedAction.Reset) - { - var magentaProcessData = SelectedColorProcessParameter.ColorProcessData.Where(x => x.ColorName == "MAGENTA").ToObservableCollection(); - foreach (ColorProcessData item in magentaProcessData) - { - item.PropertyChanged -= MagentaMeasurementModelPropertyChanged; - SelectedColorProcessParameter.ColorProcessData.Remove(item); - RemovedColorProcessDataBeforeSave[item.Guid] = item; - } - // UpdateFactorsOnChangeProcessData("Magenta"); - } - else if (e.Action == NotifyCollectionChangedAction.Remove) - { - foreach (ColorProcessData item in e.OldItems) - { - SelectedColorProcessParameter.ColorProcessData.Remove(item); - RemovedColorProcessDataBeforeSave[item.Guid] = item; - item.PropertyChanged -= MagentaMeasurementModelPropertyChanged; - } - UpdateFactorsOnChangeProcessData("MAGENTA"); - } - else if (e.Action == NotifyCollectionChangedAction.Add) - { - foreach (ColorProcessData item in e.NewItems) - { - item.ColorName = "MAGENTA"; - item.ColorProcessParametersGuid = SelectedColorProcessParameter.Guid; - SelectedColorProcessParameter.ColorProcessData.Add(item); - RemovedColorProcessDataBeforeSave.Remove(item.Guid); - item.PropertyChanged += MagentaMeasurementModelPropertyChanged; - } - } + OnColorCollectionChange(e, FactorColors.MAGENTA, MagentaMeasurementModelPropertyChanged); } private void MagentaMeasurementModelPropertyChanged(object sender, PropertyChangedEventArgs e) @@ -572,44 +535,13 @@ namespace Tango.MachineStudio.ThreadExtensions.ViewModels if (IsFree) { MagentaPlot.CreateGraph(MagentaProcessData.ToList(), true); - UpdateFactorsOnChangeProcessData("MAGENTA"); + UpdateFactorsOnChangeProcessData(FactorColors.MAGENTA); } } private void OnYellowCollectionChanged(object sender, NotifyCollectionChangedEventArgs e) { - if (e.Action == NotifyCollectionChangedAction.Reset) - { - var yellowProcessData = SelectedColorProcessParameter.ColorProcessData.Where(x => x.ColorName == "YELLOW").ToObservableCollection(); - foreach (ColorProcessData item in yellowProcessData) - { - item.PropertyChanged -= YellowMeasurementModelPropertyChanged; - SelectedColorProcessParameter.ColorProcessData.Remove(item); - RemovedColorProcessDataBeforeSave[item.Guid] = item; - } - //UpdateFactorsOnChangeProcessData("Yellow"); - } - else if (e.Action == NotifyCollectionChangedAction.Remove) - { - foreach (ColorProcessData item in e.OldItems) - { - SelectedColorProcessParameter.ColorProcessData.Remove(item); - RemovedColorProcessDataBeforeSave[item.Guid] = item; - item.PropertyChanged -= YellowMeasurementModelPropertyChanged; - } - UpdateFactorsOnChangeProcessData("YELLOW"); - } - else if (e.Action == NotifyCollectionChangedAction.Add) - { - foreach (ColorProcessData item in e.NewItems) - { - item.ColorName = "YELLOW"; - item.ColorProcessParametersGuid = SelectedColorProcessParameter.Guid; - SelectedColorProcessParameter.ColorProcessData.Add(item); - RemovedColorProcessDataBeforeSave.Remove(item.Guid); - item.PropertyChanged += YellowMeasurementModelPropertyChanged; - } - } + OnColorCollectionChange(e, FactorColors.YELLOW, YellowMeasurementModelPropertyChanged); } private void YellowMeasurementModelPropertyChanged(object sender, PropertyChangedEventArgs e) @@ -617,56 +549,58 @@ namespace Tango.MachineStudio.ThreadExtensions.ViewModels if (IsFree) { YellowPlot.CreateGraph(YellowProcessData.ToList(), false); - UpdateFactorsOnChangeProcessData("YELLOW"); + UpdateFactorsOnChangeProcessData(FactorColors.YELLOW); } } - + private void OnBlackCollectionChanged(object sender, NotifyCollectionChangedEventArgs e) { - if(e.Action == NotifyCollectionChangedAction.Reset) + OnColorCollectionChange(e, FactorColors.BLACK, BlackMeasurementModelPropertyChanged); + } + + private void BlackMeasurementModelPropertyChanged(object sender, PropertyChangedEventArgs e) + { + if (IsFree) { - var blackProcessData = SelectedColorProcessParameter.ColorProcessData.Where(x => x.ColorName == "BLACK").ToObservableCollection(); - foreach (ColorProcessData item in blackProcessData) + BlackPlot.CreateGraph(BlackProcessData.ToList(), true); + UpdateFactorsOnChangeProcessData(FactorColors.BLACK); + } + } + + private void OnColorCollectionChange(NotifyCollectionChangedEventArgs e, FactorColors color, PropertyChangedEventHandler eventHandler) + { + if (e.Action == NotifyCollectionChangedAction.Reset) + { + var processData = SelectedColorProcessParameter.ColorProcessData.Where(x => x.FactorColor == color).ToObservableCollection(); + + foreach (ColorProcessData item in processData) { - item.PropertyChanged -= BlackMeasurementModelPropertyChanged; + item.PropertyChanged -= eventHandler; SelectedColorProcessParameter.ColorProcessData.Remove(item); - RemovedColorProcessDataBeforeSave[item.Guid] = item; } - //UpdateFactorsOnChangeProcessData("Black"); + //UpdateFactorsOnChangeProcessData(color); } else if (e.Action == NotifyCollectionChangedAction.Remove) { foreach (ColorProcessData item in e.OldItems) { SelectedColorProcessParameter.ColorProcessData.Remove(item); - RemovedColorProcessDataBeforeSave[item.Guid] = item; - item.PropertyChanged -= BlackMeasurementModelPropertyChanged; + item.PropertyChanged -= eventHandler; + RemovedColorProcessDataBeforeSave.Add(item.Guid); } - UpdateFactorsOnChangeProcessData("BLACK"); + UpdateFactorsOnChangeProcessData(color); } else if (e.Action == NotifyCollectionChangedAction.Add) { foreach (ColorProcessData item in e.NewItems) { - item.ColorName = "BLACK"; + item.FactorColor = color; item.ColorProcessParametersGuid = SelectedColorProcessParameter.Guid; SelectedColorProcessParameter.ColorProcessData.Add(item); - RemovedColorProcessDataBeforeSave.Remove(item.Guid); - item.PropertyChanged += BlackMeasurementModelPropertyChanged; + item.PropertyChanged += eventHandler; } - - } - } - - private void BlackMeasurementModelPropertyChanged(object sender, PropertyChangedEventArgs e) - { - if (IsFree) - { - BlackPlot.CreateGraph(BlackProcessData.ToList(), true); - UpdateFactorsOnChangeProcessData("BLACK"); } } - #endregion #region update factors @@ -676,100 +610,155 @@ namespace Tango.MachineStudio.ThreadExtensions.ViewModels /// /// The factor. /// The item. - private void UpdateFactor(ColorProcessFactor factor, ColorProcessData item) + private void UpdateFactor(ColorProcessFactor factor, DataPoint point) { if (factor == null) return; - if (item == null) + if (point.X == 0) { factor.InkNlCm = 0; factor.L = factor.A = factor.B = 0.0; return; } - factor.InkNlCm = item.InkNlCm; - factor.L = item.L; - factor.A = item.A; - factor.B = item.B; + factor.InkNlCm = (int)point.X; + } /// /// Calculate and Update the factors on change process data. /// /// The color. - private void UpdateFactorsOnChangeProcessData(string color) + private void UpdateFactorsOnChangeProcessData(FactorColors color) { - bool isLtype = color.ToLower() == "yellow" ? false : true; - var processData = SelectedColorProcessParameter.ColorProcessData.Where(x => x.ColorName.ToLower() == color.ToLower()).ToObservableCollection(); + bool isLtype = color == FactorColors.YELLOW ? false : true; + var processData = SelectedColorProcessParameter.ColorProcessData.Where(x => x.FactorColor == color).ToList(); double target100 = FactorTarget.GetFactor100(color); double target200 = FactorTarget.GetFactor200(color); - ColorProcessData closest100 = null; - ColorProcessData closest200 = null; - ColorProcessData minInk = null; - ColorProcessData maxInk = null; + //ColorProcessData closest100 = null; + //ColorProcessData closest200 = null; - var minDifference100 = double.MaxValue; - var minDifference200 = double.MaxValue; + //var minDifference100 = double.MaxValue; + //var minDifference200 = double.MaxValue; if (processData.Count == 0) return; - foreach (var item in processData) - { - var colorvalue = isLtype ? item.L : item.B; - var difference100 = Math.Abs(colorvalue - target100); - if (minDifference100 > difference100) - { - minDifference100 = (int)difference100; - closest100 = item; - } - var difference200 = Math.Abs(colorvalue - target200); - if (minDifference200 > difference200) + //foreach (var item in processData) + //{ + // var colorvalue = isLtype ? item.L : item.B; + // var difference100 = Math.Abs(colorvalue - target100); + // if (minDifference100 > difference100) + // { + // minDifference100 = (int)difference100; + // closest100 = item; + // } + // var difference200 = Math.Abs(colorvalue - target200); + // if (minDifference200 > difference200) + // { + // minDifference200 = (int)difference200; + // closest200 = item; + // } + //} + var point100 = GetTargetPoint(processData, target100, isLtype); + UpdateFactor(Factor100ProcessData.FirstOrDefault(x => x.FactorColor == color), point100); + var point200 = GetTargetPoint(processData, target200, isLtype); + UpdateFactor(Factor200ProcessData.FirstOrDefault(x => x.FactorColor == color), point200); + } + + private DataPoint GetTargetPoint(List listValues, double factor, bool isLtype) + { + if (listValues.Count < 2 || factor <= 0) + return new DataPoint(0, 0); + + var test = listValues.GroupBy(x => x.InkNlCm, x => isLtype ? x.L : x.B, (Ink, Value) => new { InkValuep = Ink, ColorValue = Value.Average() }).ToList(); + var distinctItems = listValues.GroupBy(x => x.InkNlCm, x => isLtype ? x.L : x.B, (Ink, Value) => new { InkValuep = Ink, ColorValue = Value }).Select(y => new ColorProcessData { InkNlCm = y.InkValuep, L = y.ColorValue.Average() }).ToList(); + + double calculatedX = 0.0; + ColorProcessData prevItem = distinctItems[0]; + for (int index = 1; index < distinctItems.Count; index++) + { + var item = distinctItems[index]; + if (prevItem.L > item.L && (factor > prevItem.L || (factor <= prevItem.L && factor >= item.L)) + || (prevItem.L <= item.L && (factor > prevItem.L || (factor >= prevItem.L && factor <= item.L))) + || ((index + 1) == distinctItems.Count && calculatedX == 0.0)) { - minDifference200 = (int)difference200; - closest200 = item; - } - if (minInk == null || minInk.InkNlCm > item.InkNlCm) - { - minInk = item; - } - if (maxInk == null || maxInk.InkNlCm < item.InkNlCm) - { - maxInk = item; + calculatedX = CalculateXValue(factor, new DataPoint(prevItem.InkNlCm, prevItem.L), new DataPoint(item.InkNlCm, item.L)); + break; + } + prevItem = item; } - UpdateFactor(Factor100ProcessData.FirstOrDefault(x => x.ColorName == color), closest100); - UpdateFactor(Factor200ProcessData.FirstOrDefault(x => x.ColorName == color), closest200); - UpdateFactor(MinInkUptake.FirstOrDefault(x => x.ColorName == color), minInk); - UpdateFactor(MaxInkUptake.FirstOrDefault(x => x.ColorName == color), maxInk); + + return new DataPoint(calculatedX, factor); ; } + private double CalculateXValue(double factor, DataPoint leftPoint, DataPoint rightPoint) + { + double deltaX = rightPoint.X - leftPoint.X; + double deltaY = rightPoint.Y - leftPoint.Y; + + // prevents division by zero exceptions. + if (deltaX == 0) + return 0.0; + + double slope = deltaY / deltaX; + + // double c = leftPoint.Y - slope * leftPoint.X; + // double cX = (factor - c) / slope; + + return (leftPoint.X + (factor - leftPoint.Y) / slope); + + } #endregion #region save + private async void RemoveColorDataByColor(int color, string colorProcessParamGuid) + { + if(_active_context == null) + { + return; + } + var existingColorProcessData = await _active_context.ColorProcessData.Where(y => y.Color == color && y.ColorProcessParametersGuid == colorProcessParamGuid).ToListAsync(); + foreach( var data in existingColorProcessData) + { + _active_context.ColorProcessData.Remove(data); + } + } public async void Save() { + if (String.IsNullOrEmpty(SelectedMachineGUID)) + { + _notification.ShowWarning(LogManager.Log($"Could not save Color Process Parameters. Please, select machine before save.", LogCategory.Warning)); + return; + } + try { IsFree = false; - await Task.Factory.StartNew(() => - { - SelectedColorProcessParameter.LastUpdated = DateTime.UtcNow; - var colorProcessParameterAfterChange = ColorProcessParameterDTO.FromObservable(SelectedColorProcessParameter); + SelectedColorProcessParameter.LastUpdated = DateTime.UtcNow; - foreach (KeyValuePair item in RemovedColorProcessDataBeforeSave) + foreach (var item in RemovedColorProcessDataBeforeSave) + { + var existingColorProcessData = await _active_context.ColorProcessData.FirstOrDefaultAsync(y => y.Guid == item); + if (existingColorProcessData != null) { - var existingColorProcessData = _active_context.ColorProcessData.FirstOrDefault(y => y.Guid == item.Value.Guid); - if (existingColorProcessData != null) - { - _active_context.ColorProcessData.Remove(existingColorProcessData); - } + _active_context.ColorProcessData.Remove(existingColorProcessData); } - _active_context.SaveChanges(); - - }); - LoadColorParameters(SelectedColorProcessParameter.RmlsExtensionsGuid); + } + foreach(var colordata in SelectedColorProcessParameter.ColorProcessData) + { + colordata.LastUpdated = DateTime.UtcNow; + } + foreach (var factordata in SelectedColorProcessParameter.ColorProcessFactors) + { + factordata.LastUpdated = DateTime.UtcNow; + } + + await _active_context.SaveChangesAsync(); + + LoadColorParameters(); } catch (Exception ex) { @@ -779,9 +768,11 @@ namespace Tango.MachineStudio.ThreadExtensions.ViewModels finally { IsFree = true; + EventHandler handler = SaveColorParameters; + 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 3fde7abbe..09befb26f 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 @@ -25,6 +25,8 @@ using Tango.BL.DTO; using Tango.BL.Enumerations; using Tango.MachineStudio.ThreadExtensions.Contracts; using Tango.MachineStudio.ThreadExtensions.Views; +using Tango.MachineStudio.ThreadExtensions.Models; +using Tango.Settings; namespace Tango.MachineStudio.ThreadExtensions.ViewModels { @@ -33,34 +35,55 @@ namespace Tango.MachineStudio.ThreadExtensions.ViewModels private INotificationProvider _notification; private IAuthenticationProvider _authentication; private IActionLogManager _actionLogManager; - private RmlsExtensionDTO _rmlExtensionBeforeSave; - + private ObservablesContext _rmlExtentions_context; private ObservablesContext _active_context; + private List _allUsers; + #region properties - private ObservableCollection _rmlsExtension; - public ObservableCollection RmlsExtensions - { - get { return _rmlsExtension; } - set { _rmlsExtension = value; + //private ObservableCollection _rmlsExtension; + //public ObservableCollection RmlsExtensions + //{ + // get { return _rmlsExtension; } + // set { _rmlsExtension = value; + // RaisePropertyChangedAuto(); } + //} + + private List _rmlExtensions; + public List RmlExtensions + { + get { return _rmlExtensions; } + set { _rmlExtensions = value; RaisePropertyChangedAuto(); } } - - private RmlsExtension _activeRMLExtention; - public RmlsExtension ActiveRMLExtention + private RmlsExtension _ActiveRMLExtension; + public RmlsExtension ActiveRMLExtension { - get { return _activeRMLExtention; } - set { _activeRMLExtention = value; + get { return _ActiveRMLExtension; } + set { _ActiveRMLExtension = value; RaisePropertyChangedAuto(); } } - private RmlsExtension _selectedRMLExtension; - public RmlsExtension SelectedRMLExtension + private Rml _activeRML; + public Rml ActiveRML + { + get { return _activeRML; } + set + { + _activeRML = value; + RaisePropertyChangedAuto(); + } + } + + private RmlExtensionModel _selectedRMLExtension; + public RmlExtensionModel SelectedRMLExtension { get { return _selectedRMLExtension; } - set { _selectedRMLExtension = value; RaisePropertyChangedAuto(); InvalidateRelayCommands(); } + set { _selectedRMLExtension = value; + RaisePropertyChangedAuto(); + InvalidateRelayCommands(); } } private ICollectionView _rmlExtCollectionView; @@ -91,20 +114,26 @@ namespace Tango.MachineStudio.ThreadExtensions.ViewModels set { _brands = value; RaisePropertyChangedAuto(); } } - private ObservableCollection _yarnColor; - public ObservableCollection YarnColor + private ObservableCollection _yarnWhiteShade; + public ObservableCollection YarnWhiteShade { - get { return _yarnColor; } - set { _yarnColor = value; RaisePropertyChangedAuto(); } + get { return _yarnWhiteShade; } + set { _yarnWhiteShade = value; RaisePropertyChangedAuto(); } } - - private ObservableCollection _enduse; - public ObservableCollection EndUse + private ObservableCollection _enduse; + public ObservableCollection EndUse { get { return _enduse; } set { _enduse = value; RaisePropertyChangedAuto(); } } - + + private ObservableCollection _units; + public ObservableCollection Units + { + get { return _units; } + set { _units = value; RaisePropertyChangedAuto(); } + } + private ObservableCollection _family; public ObservableCollection Family { @@ -112,8 +141,8 @@ namespace Tango.MachineStudio.ThreadExtensions.ViewModels set { _family = value; RaisePropertyChangedAuto(); } } - private ObservableCollection _geometry; - public ObservableCollection Geometry + private ObservableCollection _geometry; + public ObservableCollection Geometry { get { return _geometry; } set { _geometry = value; RaisePropertyChangedAuto(); } @@ -133,20 +162,30 @@ namespace Tango.MachineStudio.ThreadExtensions.ViewModels set { _group = value; RaisePropertyChangedAuto(); } } - private ObservableCollection _manufacturer; - public ObservableCollection Manufacturer + //private ObservableCollection _manufacturer; + //public ObservableCollection Manufacturer + //{ + // get { return _manufacturer; } + // set { _manufacturer = value; RaisePropertyChangedAuto(); } + //} + private List _manufacturers; + + public List Manufacturers { - get { return _manufacturer; } - set { _manufacturer = value; RaisePropertyChangedAuto(); } + get { return _manufacturers; } + set { _manufacturers = value; + RaisePropertyChangedAuto(); + } } - private ObservableCollection _materials; - public ObservableCollection Materials + + private ObservableCollection _materials; + public ObservableCollection Materials { get { return _materials; } set { _materials = value; RaisePropertyChangedAuto(); } } - + private ObservableCollection _subFamilies; public ObservableCollection SubFamilies { @@ -185,9 +224,9 @@ namespace Tango.MachineStudio.ThreadExtensions.ViewModels set { _Filter = value; RaisePropertyChangedAuto(); OnFilterChanged(); } } - private void OnFilterChanged() + private async void OnFilterChanged() { - RmlExtCollectionView.Refresh(); + await LoadRmlExtentions(); } private ColorParametersVewVM _colorParametersVewVM; @@ -196,97 +235,69 @@ namespace Tango.MachineStudio.ThreadExtensions.ViewModels get { return _colorParametersVewVM; } set { _colorParametersVewVM = value; RaisePropertyChangedAuto(); } } - #endregion - #region commands - - public RelayCommand SaveCommand { get; set; } - - public RelayCommand ManageRmlExtensionCommand { get; set; } - - public RelayCommand AddRmlExtCommand { get; set; } - - public RelayCommand RemoveRmlExtensionCommand { get; set; } - - public RelayCommand CloneRmlExtensionCommand { get; set; } - - public RelayCommand BackToThreadExtensionViewsCommand { get; set; } - - - private void BackToThreadExtensionViews(object obj) + private TestResultsViewVM _testResultsViewVM; + public TestResultsViewVM TestResultsViewVM { - View.NavigateTo(ThreadExtensionNavigationView.ThreadExtensionsView); - LoadRmlExtentions(); + get { return _testResultsViewVM; } + set { _testResultsViewVM = value; RaisePropertyChangedAuto(); } } - private async void CloneSelectedRmlExtension(object obj) + protected Machine _selectedMachine; + /// + /// Gets or sets the selected machine. + /// + public Machine SelectedMachine { - using (_notification.PushTaskItem("Cloning thread...")) + get { return _selectedMachine; } + set { - try - { - IsFree = false; - - using (var context = ObservablesContext.CreateDefault()) - { - RmlsExtension rml_extention = await new RmlExtensionsBuilder(_rmlExtentions_context).Set(SelectedRMLExtension.Guid).WithUser().BuildAsync(); - - RmlsExtension cloned = new RmlsExtension(); - rml_extention.MapPropertiesTo(cloned, MappingFlags.NoReferenceTypes); - - cloned.Guid = Guid.NewGuid().ToString(); - cloned.ID = 0; - - - context.RmlsExtensions.Add(cloned); - await context.SaveChangesAsync(); - - //_actionLogManager.InsertLog(BL.Enumerations.ActionLogType.RmlCreated, _authentication.CurrentUser, cloned.Name, cloned, "RML cloned from Machine Studio."); - } - - LoadRmlExtentions(); - } - catch (Exception ex) + if (value != null && _selectedMachine != value) { - LogManager.Log(ex, "Error cloning thread."); - _notification.ShowError($"An error occurred while trying to clone the selected thread\n{ex.Message}"); - } - finally - { - IsFree = true; + _selectedMachine = value; + SelectedMachineChanged(); + RaisePropertyChangedAuto(); + InvalidateRelayCommands(); } } } - private async void RemoveRmlExtension(object obj) + private ObservableCollection _machines; + /// + /// Gets or sets the Machines. + /// + public ObservableCollection Machines { - if (_notification.ShowQuestion(" Are you sure you want to delete the selected RML Extension?")) + get { - using (_notification.PushTaskItem("Removing RML Extension...")) - { - try - { - IsFree = false; - - await SelectedRMLExtension.DeleteCascadeAsync(_rmlExtentions_context); - //_actionLogManager.InsertLog(BL.Enumerations.ActionLogType.RmlDeleted, _authentication.CurrentUser, SelectedRML.Name, SelectedRML, "RML deleted from Machine Studio."); + return _machines; + } - LoadRmlExtentions(); - } - catch (Exception ex) - { - LogManager.Log(ex, $"Error removing selected RML {SelectedRMLExtension?.Name}."); - _notification.ShowError($"An error occurred while trying to remove the selected RML Extension.\n{ex.FlattenMessage()}"); - LoadRmlExtentions(); - } - finally - { - IsFree = true; - } - } + set + { + _machines = value; RaisePropertyChanged(nameof(Machines)); } + } + #endregion + + #region commands + + public RelayCommand SaveCommand { get; set; } + + public RelayCommand ManageRmlExtensionCommand { get; set; } + + public RelayCommand BackToThreadExtensionViewsCommand { get; set; } + + private async void BackToThreadExtensionViews(object obj) + { + View.NavigateTo(RMLExtensionNavigationView.RMLExtensionsView); + await LoadRmlExtentions(); + } + + #endregion + public MainViewVM(INotificationProvider notificationProvider, IAuthenticationProvider authentication, IActionLogManager actionLogManager) { @@ -296,21 +307,20 @@ namespace Tango.MachineStudio.ThreadExtensions.ViewModels BackToThreadExtensionViewsCommand = new RelayCommand(BackToThreadExtensionViews, () => IsFree); SaveCommand = new RelayCommand(Save, () => IsFree); - ManageRmlExtensionCommand = new RelayCommand(() => LoadActiveRMLExtention(SelectedRMLExtension.Guid), () => SelectedRMLExtension != null); - RemoveRmlExtensionCommand = new RelayCommand(RemoveRmlExtension, () => SelectedRMLExtension != null); - CloneRmlExtensionCommand = new RelayCommand(CloneSelectedRmlExtension, () => SelectedRMLExtension != null); - AddRmlExtCommand = new RelayCommand(AddNewRmlExtention); + ManageRmlExtensionCommand = new RelayCommand(() => LoadActiveRMLExtension(SelectedRMLExtension.Guid), () => SelectedRMLExtension != null); } public override void OnApplicationReady() { - LoadRmlExtentions(); } + #region Loading - private async void LoadRmlExtentions() + private async Task LoadRmlExtentions() { + var filter = Filter.ToStringOrEmpty().ToLower(); + try { IsFree = false; @@ -320,19 +330,36 @@ namespace Tango.MachineStudio.ThreadExtensions.ViewModels if (_rmlExtentions_context != null) _rmlExtentions_context.Dispose(); _rmlExtentions_context = ObservablesContext.CreateDefault(); - RmlsExtensions = await new RMLExtentionsCollectionBuilder(_rmlExtentions_context).SetAll().WithUser().WithYarnProperties().BuildAsync(); - - - RmlExtCollectionView = CollectionViewSource.GetDefaultView(RmlsExtensions); - RmlExtCollectionView.SortDescriptions.Add(new SortDescription(nameof(Rml.LastUpdated), ListSortDirection.Descending)); - - RmlExtCollectionView.Filter = (rml) => - { - RmlsExtension r = rml as RmlsExtension; - return String.IsNullOrWhiteSpace(Filter) - || r.Name.ToLower().Contains(Filter.ToLower()); - }; + Brands = _rmlExtentions_context.YarnBrands.ToObservableCollection(); + _allUsers = await _rmlExtentions_context.Users.Include(x => x.Contact).ToListAsync(); + var q = (from c in _rmlExtentions_context.Rmls.Where(x => x.Name.ToLower().Contains(filter)) + join p in _rmlExtentions_context.RmlsExtensions on c.Guid equals p.RmlsGuid into ps + from p in ps.DefaultIfEmpty() + select new { RML = c, RMLExtesion = p }).Distinct().ToList().DistinctBy(x => x.RML.Guid) + .Select(x => new RmlExtensionModel() + { + RMLGuid = x.RML.Guid, + Guid = x.RMLExtesion == null? null : x.RMLExtesion.Guid, + Name = x.RML.Name, + Manufacturer = x.RML.Manufacturer, + Brand = x.RMLExtesion == null ? "" : (Brands.Where( y => y.Guid == x.RMLExtesion.YarnBrandGuid).Select( z => z.Name).FirstOrDefault()), + LinearDensity = (int) x.RML.FiberSize, + CreatedBy = x.RMLExtesion == null ? "" : _allUsers.SingleOrDefault(y => y.Guid == x.RMLExtesion.UsersGuid).Contact.FullName, + Created = x.RMLExtesion == null ? DateTime.Now : x.RMLExtesion.Created, + LastUpdated = x.RMLExtesion == null ? DateTime.Now : x.RMLExtesion.LastUpdated, + Status = x.RMLExtesion == null ? RMLExtensionStatus.New : x.RMLExtesion.RMLStatus + }).ToList(); + RmlExtensions = q; + RmlExtCollectionView = CollectionViewSource.GetDefaultView(RmlExtensions); + RmlExtCollectionView.SortDescriptions.Add(new SortDescription(nameof(Rml.LastUpdated), ListSortDirection.Ascending)); + + //RmlExtCollectionView.Filter = (rml) => + //{ + // RmlExtensionModel r = rml as RmlExtensionModel; + // return String.IsNullOrWhiteSpace(Filter) + // || r.Name.ToLower().Contains(Filter.ToLower()); + //}; } } catch (Exception ex) @@ -348,84 +375,68 @@ namespace Tango.MachineStudio.ThreadExtensions.ViewModels private void LoadRmlProperties() { Applications = _active_context.YarnApplications.ToObservableCollection(); - Brands = _active_context.YarnBrand.ToObservableCollection(); - YarnColor = _active_context.YarnColor.ToObservableCollection(); - EndUse = _active_context.YarnEndUse.ToObservableCollection(); - Family = _active_context.YarnFamily.ToObservableCollection(); - Geometry = _active_context.YarnGeometry.ToObservableCollection(); - GlossLevel = _active_context.YarnGlossLevel.ToObservableCollection(); - Group = _active_context.YarnGroup.ToObservableCollection(); - Manufacturer = _active_context.YarnManufacturer.ToObservableCollection(); - - Materials = _active_context.YarnMaterials.ToObservableCollection(); - SubFamilies = _active_context.YarnSubFamily.ToObservableCollection(); - Texturing = _active_context.YarnTexturing.ToObservableCollection(); - YarnTypes = _active_context.YarnType.ToObservableCollection(); - IndustrySector = _active_context.YarnIndustrysector.ToObservableCollection(); - } - - private async void AddNewRmlExtention(object obj) - { - using (_notification.PushTaskItem("Creating new RML Extension...")) + Brands = _active_context.YarnBrands.ToObservableCollection(); + YarnWhiteShade = _active_context.YarnWhiteShades.ToObservableCollection(); + EndUse = _active_context.MediaPurposes.ToObservableCollection(); + Family = _active_context.YarnFamilies.ToObservableCollection(); + Geometry = _active_context.FiberShapes.ToObservableCollection(); + GlossLevel = _active_context.YarnGlossLevels.ToObservableCollection(); + Group = _active_context.YarnGroups.ToObservableCollection(); + //Manufacturer = _active_context.YarnManufacturers.ToObservableCollection(); + Manufacturers = _active_context.YarnManufacturers.Select(x => x.Name).ToList(); + Units = _active_context.LinearMassDensityUnits.ToObservableCollection(); + Materials = _active_context.MediaMaterials.ToObservableCollection(); + SubFamilies = _active_context.YarnSubFamilies.ToObservableCollection(); + Texturing = _active_context.YarnTexturings.ToObservableCollection(); + YarnTypes = _active_context.YarnTypes.ToObservableCollection(); + IndustrySector = _active_context.YarnIndustrysectors.ToObservableCollection(); + Machines = ObservablesStaticCollections.Instance.Machines.Select(x => new MachineModel() { - IsFree = false; - - if (_active_context != null) - { - _active_context.Dispose(); - } - - _active_context = ObservablesContext.CreateDefault(); - - LoadRmlProperties(); - - RmlsExtension rml_extention = new RmlsExtension(); - rml_extention.Created = DateTime.UtcNow; - rml_extention.UserGuid = _authentication.CurrentUser.Guid; - rml_extention.YarnManufacturer = Manufacturer.FirstOrDefault(); - rml_extention.YarnBrand = Brands.FirstOrDefault(); - rml_extention.Country = null; - rml_extention.YarnEndUse = EndUse.FirstOrDefault(); - rml_extention.YarnApplications = Applications.FirstOrDefault(); - rml_extention.YarnIndustrysector = IndustrySector.FirstOrDefault(); - - rml_extention.YarnMaterial = Materials.FirstOrDefault(); - rml_extention.YarnType = YarnTypes.FirstOrDefault(); - rml_extention.YarnSubFamily = SubFamilies.FirstOrDefault(); - rml_extention.YarnFamily = Family.FirstOrDefault(); - rml_extention.YarnGroup = Group.FirstOrDefault(); - rml_extention.YarnTexturing = Texturing.FirstOrDefault(); - rml_extention.YarnGeometry = Geometry.FirstOrDefault(); - rml_extention.YarnColor = YarnColor.FirstOrDefault(); - rml_extention.YarnGlossLevel = GlossLevel.FirstOrDefault(); - rml_extention.LinearDensity = 0; - rml_extention.YarnUnit = YarnUnits.DTEX; - rml_extention.YarnPlies = Plies.P1; - rml_extention.FilamentCount = 0; - rml_extention.TwistTpm = 0; - rml_extention.YarnTwistDirections = TwistDirections.S; - rml_extention.MinElongation = 0.0; - rml_extention.MaxElongation = 100.0; - rml_extention.MinMaxForceN = 0.0; - rml_extention.MaxMaxForceN = 100.0; - rml_extention.MinElasticity = 0.0; - rml_extention.MaxElasticity = 100.0; - rml_extention.MinTenacity = 0.0; - rml_extention.MaxTenacity = 100.0; - rml_extention.Finishing = "Lubrication"; - - _active_context.RmlsExtensions.Add(rml_extention); - await _active_context.SaveChangesAsync(); - - //_actionLogManager.InsertLog(BL.Enumerations.ActionLogType.RmlCreated, _authentication.CurrentUser, rml.Name, rml, "Rml created using Machine Studio."); - ColorParametersVewVM = new ColorParametersVewVM(_notification, _actionLogManager); - LoadActiveRMLExtention(rml_extention.Guid); + Guid = x.Guid, + Name = x.Name, + SerialNumber = x.SerialNumber + }).ToObservableCollection(); - IsFree = true; - } } - private async void LoadActiveRMLExtention(String guid) + private RmlsExtension GetNewRMLsExtension( string RML_Guid) + { + RmlsExtension rml_extention = new RmlsExtension(); + rml_extention.Created = DateTime.UtcNow; + rml_extention.RmlsGuid = RML_Guid; + rml_extention.UsersGuid = _authentication.CurrentUser.Guid; + //rml_extention.YarnManufacturer = Manufacturer.FirstOrDefault(); + rml_extention.YarnBrand = Brands.FirstOrDefault(); + rml_extention.Country = null; + //rml_extention.YarnEndUse = EndUse.FirstOrDefault(); + rml_extention.YarnApplication = Applications.FirstOrDefault(); + rml_extention.YarnIndustrysector = IndustrySector.FirstOrDefault(); + + //rml_extention.YarnMaterial = Materials.FirstOrDefault(); + rml_extention.YarnType = YarnTypes.FirstOrDefault(); + rml_extention.YarnSubFamily = SubFamilies.FirstOrDefault(); + rml_extention.YarnFamily = Family.FirstOrDefault(); + rml_extention.YarnGroup = Group.FirstOrDefault(); + rml_extention.YarnTexturing = Texturing.FirstOrDefault(); + rml_extention.YarnWhiteShade = YarnWhiteShade.FirstOrDefault(); + rml_extention.YarnGlossLevel = GlossLevel.FirstOrDefault(); + rml_extention.TwistTpm = 0; + rml_extention.YarnTwistDirections = TwistDirections.Unknown; + rml_extention.MinElongation = 0.0; + rml_extention.MaxElongation = 100.0; + rml_extention.MinMaxForceN = 0.0; + rml_extention.MaxMaxForceN = 100.0; + rml_extention.MinElasticity = 0.0; + rml_extention.MaxElasticity = 100.0; + rml_extention.MinTenacity = 0.0; + rml_extention.MaxTenacity = 100.0; + rml_extention.Finishing = "Lubrication"; + rml_extention.RMLStatus = RMLExtensionStatus.New; + + return rml_extention; + } + + private async void LoadActiveRMLExtension(String guid) { using (_notification.PushTaskItem("Loading RML Extension...")) { @@ -439,17 +450,60 @@ namespace Tango.MachineStudio.ThreadExtensions.ViewModels } _active_context = ObservablesContext.CreateDefault(); - LoadRmlProperties(); - ActiveRMLExtention = await new RmlExtensionsBuilder(_active_context) - .Set(guid) - .WithUser() - .BuildAsync(); + if (guid == null) + { + RmlsExtension rml_extention = GetNewRMLsExtension(SelectedRMLExtension.RMLGuid); + _active_context.RmlsExtensions.Add(rml_extention); + await _active_context.SaveChangesAsync(); + guid = rml_extention.Guid; + } + + ActiveRMLExtension = await new RmlExtensionsBuilder(_active_context) + .Set(guid) + .WithUser() + .BuildAsync(); + + ActiveRML = new RmlBuilder(_active_context) + .Set(SelectedRMLExtension.RMLGuid) + .Build(); + + var machinesWithTest = _active_context.RmlExtensionTestResults.Select(x => x.MachineGuid).ToList(); + var machinesWithTest2 = + Join(_active_context.ColorProcessParameters.Select(y => y.MachineGuid), st1 => st1, st2=> st2, (st1, st2)=>).ToList(); + Machines = ObservablesStaticCollections.Instance.Machines.Select(x => new MachineModel() + { + Guid = x.Guid, + Name = x.Name, + SerialNumber = x.SerialNumber + }).ToObservableCollection(); + var settings = SettingsManager.Default.GetOrCreate(); + SelectedMachine = ObservablesStaticCollections.Instance.Machines.SingleOrDefault(x => x.SerialNumber == settings.LastVirtualMachineSerialNumber); ColorParametersVewVM = new ColorParametersVewVM(_notification, _actionLogManager); - ColorParametersVewVM.LoadColorParameters(guid); - View.NavigateTo(ThreadExtensionNavigationView.ThreadExtentionView); + ColorParametersVewVM.RMLExtemtionGUID = guid; + ColorParametersVewVM.SelectedMachineGUID = SelectedMachine.Guid; + + TestResultsViewVM = new TestResultsViewVM(_notification, _actionLogManager); + TestResultsViewVM.RMLExtemtionGUID = guid; + TestResultsViewVM.ThreadName = ActiveRML.Manufacturer; + + var machineGuidsWithTests = await _active_context.RmlExtensionTestResults.Where(x => x.RmlsExtensionsGuid == guid).Select(y => y.MachineGuid).ToListAsync(); + if(machineGuidsWithTests.Count > 0) + { + + } + + if (ActiveRMLExtension.RMLStatus == RMLExtensionStatus.New) + { + ColorParametersVewVM.SaveColorParameters -= UpdateStatus; + ColorParametersVewVM.SaveColorParameters += UpdateStatus; + TestResultsViewVM.SaveTestResults -= UpdateStatus; + TestResultsViewVM.SaveTestResults += UpdateStatus; + } + + View.NavigateTo(RMLExtensionNavigationView.RMLExtentionView); InvalidateRelayCommands(); @@ -466,22 +520,18 @@ namespace Tango.MachineStudio.ThreadExtensions.ViewModels } } } - - private async void RefreshView(String guid) + + private async void RefreshView(String guid, String rmlGuid) { try { IsFree = false; - - //if (_active_context != null) - //{ - // _active_context.Dispose(); - //} - - //_active_context = ObservablesContext.CreateDefault(); - + LoadRmlProperties(); - ActiveRMLExtention = await new RmlExtensionsBuilder(_active_context) + ActiveRML = ActiveRML = await new RmlBuilder(_active_context) + .Set(rmlGuid) + .BuildAsync(); + ActiveRMLExtension = await new RmlExtensionsBuilder(_active_context) .Set(guid) .WithUser() .BuildAsync(); @@ -493,7 +543,7 @@ namespace Tango.MachineStudio.ThreadExtensions.ViewModels catch (Exception ex) { //LogManager.Log($"Error loading RML '{ActiveRML.Name}'..."); - _notification.ShowError($"Error refresh the selected thread.\n{ex.FlattenMessage()}"); + _notification.ShowError($"Error refresh after save the selected thread.\n{ex.FlattenMessage()}"); } finally { @@ -503,34 +553,75 @@ namespace Tango.MachineStudio.ThreadExtensions.ViewModels #endregion - private async void Save() + #region event handlers + + private async void UpdateStatus(object sender, EventArgs e) { IsFree = false; try { - using (_notification.PushTaskItem("Saving RML Extension...")) - { + ColorParametersVewVM.SaveColorParameters -= UpdateStatus; + TestResultsViewVM.SaveTestResults -= UpdateStatus; + ActiveRMLExtension.RMLStatus = RMLExtensionStatus.InProgress; + ActiveRMLExtension.LastUpdated = DateTime.UtcNow; - ActiveRMLExtention.LastUpdated = DateTime.UtcNow; + await _active_context.SaveChangesAsync(); + } + catch (Exception ex) + { + LogManager.Log(ex, $"Error saving Status of RML Extension"); + _notification.ShowError($"An error occurred while trying to save status of the current RML Extension.\n{ex.FlattenMessage()}"); + } + finally + { + IsFree = true; + } + } - ColorParametersVewVM.Save(); + private void SelectedMachineChanged() + { + if(ColorParametersVewVM != null) + { + ColorParametersVewVM.SelectedMachineGUID = SelectedMachine.Guid; + } + } - var rmlExtensionAfter = RmlsExtensionDTO.FromObservable(ActiveRMLExtention); + #endregion - await _active_context.SaveChangesAsync(); + #region Save - //ColorParametersVewVM.LoadColorParameters(ActiveRMLExtention.Guid); - // _actionLogManager.InsertLog(BL.Enumerations.ActionLogType.RmlSaved, _authentication.CurrentUser, _rmlBeforeSave.Name, _rmlBeforeSave, rmlAfter, "RML saved using Machine Studio."); + /// + /// Saves this instance. + /// + private async void Save() + { + IsFree = false; + + try + { + using (_notification.PushTaskItem("Saving RML Extension...")) + { + if(ActiveRMLExtension.RMLStatus == RMLExtensionStatus.New) + { + ActiveRMLExtension.RMLStatus = RMLExtensionStatus.InProgress; + ColorParametersVewVM.SaveColorParameters -= UpdateStatus; + TestResultsViewVM.SaveTestResults -= UpdateStatus; + } - _rmlExtensionBeforeSave = rmlExtensionAfter; + ActiveRMLExtension.LastUpdated = DateTime.UtcNow; + ActiveRML.LastUpdated = DateTime.UtcNow; + + await _active_context.SaveChangesAsync(); - RefreshView(SelectedRMLExtension.Guid); + // _actionLogManager.InsertLog(BL.Enumerations.ActionLogType.RmlSaved, _authentication.CurrentUser, _rmlBeforeSave.Name, _rmlBeforeSave, rmlAfter, "RML saved using Machine Studio."); + + RefreshView(ActiveRMLExtension.Guid, ActiveRML.Guid); } } catch (Exception ex) { - LogManager.Log(ex, $"Error saving RML Extension {ActiveRMLExtention.Name}"); + LogManager.Log(ex, $"Error saving RML Extension of RML{ActiveRML.Name}"); _notification.ShowError($"An error occurred while trying to save the current RML Extension.\n{ex.FlattenMessage()}"); } finally @@ -538,5 +629,7 @@ namespace Tango.MachineStudio.ThreadExtensions.ViewModels IsFree = true; } } + + #endregion } } 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 new file mode 100644 index 000000000..4e7d84e7f --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/ViewModels/TestResultViewVM.cs @@ -0,0 +1,201 @@ +using Microsoft.Win32; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Tango.BL; +using Tango.BL.ActionLogs; +using Tango.BL.DTO; +using Tango.BL.Entities; +using Tango.BL.Enumerations; +using Tango.Core.Commands; +using Tango.MachineStudio.Common.Notifications; +using Tango.SharedUI; + +namespace Tango.MachineStudio.ThreadExtensions.ViewModels +{ + public class TestResultViewVM : ViewModel + { + private INotificationProvider _notification; + private IActionLogManager _actionLogManager; + + #region Properties + + private string _threadName; + /// + /// Gets or sets the name of the thread. Using in print + /// + /// + /// The name of the thread. + /// + public string ThreadName + { + get { return _threadName; } + set + { + _threadName = value; + RaisePropertyChangedAuto(); + } + } + + + private bool _isSelected; + /// + /// Gets or sets a value indicating whether this instance is selected. + /// + public bool IsSelected + { + get { return _isSelected; } + set { _isSelected = value; RaisePropertyChangedAuto(); } + } + + private RmlExtensionTestResult _testResult; + + public RmlExtensionTestResult TestResult + { + get { return _testResult; } + set { _testResult = value; + RaisePropertyChangedAuto(); + } + } + + + #endregion + public RelayCommand ExportToFileCommand { get; set; } + + public TestResultViewVM(INotificationProvider notification, IActionLogManager actionLogManager) + { + _notification = notification; + _actionLogManager = actionLogManager; + ExportToFileCommand = new RelayCommand(ExportToFile); + } + + #region save + // public void Save(ObservablesContext active_context) + //{ + // try + // { + // IsFree = false; + + // TestResult.LastUpdated = DateTime.UtcNow; + + // var RmlExtensionTestResultAfterChange = RmlExtensionTestResultDTO.FromObservable(TestResult); + + // active_context.SaveChanges(); + // } + // catch (Exception ex) + // { + // LogManager.Log(ex, "Could not update RmlExtension TestResult."); + // _notification.ShowError($"An error occurred while trying to save RmlExtension TestResult.\n{ex.Message}"); + // } + // finally + // { + // IsFree = true; + // } + //} + #endregion + + private void ExportToFile() + { + SaveFileDialog dlg = new SaveFileDialog(); + try + { + dlg.Title = $"Export excel calibration file for {TestResult.Name}"; + dlg.Filter = "Text Files|*.txt"; + dlg.DefaultExt = ".txt"; + dlg.FileName = $"RML_EXTENSION_{TestResult.Name}.txt"; + if (dlg.ShowDialog().Value) + { + using (StreamWriter outputFile = new StreamWriter(dlg.FileName)) + { + outputFile.WriteLine(String.Format($" {TestResult.Name.ToUpper()} ")); + outputFile.WriteLine(""); + outputFile.WriteLine(""); + outputFile.WriteLine(" Dryer temperature"); + outputFile.WriteLine(""); + outputFile.WriteLine(String.Format($" Dryer temperature : {TestResult.DryerTemperature.ToString()}")); + outputFile.WriteLine(String.Format($" Tunnel temperature : {TestResult.TunnelTemperature.ToString()}")); + outputFile.WriteLine(String.Format($" Tunnel flow : {TestResult.TunnelFlow.ToString()}")); + outputFile.WriteLine(String.Format($" Tunnel AVG temperature : {TestResult.TunnelAvgTemperature.ToString()}")); + outputFile.WriteLine(""); + outputFile.WriteLine(""); + outputFile.WriteLine(" Tension through the thread path"); + outputFile.WriteLine(""); + outputFile.WriteLine(String.Format($" Head : {TestResult.TensionHeadMin.ToString()} - {TestResult.TensionHeadMax.ToString()}")); + outputFile.WriteLine(String.Format($" After dryer : {TestResult.TensionAfterDryerMin.ToString()} - {TestResult.TensioinAfterDryerMax.ToString()}")); + outputFile.WriteLine(String.Format($" Winder : {TestResult.BtsrMin.ToString()} - {TestResult.BtsrMax.ToString()}")); + outputFile.WriteLine(String.Format($" BTSR : {TestResult.TensionHeadMin.ToString()} - {TestResult.TensionHeadMax.ToString()}")); + outputFile.WriteLine(String.Format($" Puller tension : {TestResult.PullerTensionMin.ToString()} - {TestResult.PullerTensionMax.ToString()}")); + outputFile.WriteLine(String.Format($" Winder exit tension: {TestResult.ExitTensionMin.ToString()} - {TestResult.ExitTensionMax.ToString()}")); + + outputFile.WriteLine(""); + outputFile.WriteLine(" Rubbing results"); + outputFile.WriteLine(""); + outputFile.WriteLine(" Color DeltaE CIE 100 % GS 100% DeltaETestResult CIE 200 % GS 200% "); + foreach (var rubbingResult in TestResult.RubbingResults) + { + StringBuilder sb = new StringBuilder(); + //sb.Append(" Color: "); + sb.Append($" { rubbingResult.TestResultColor.ToString()} "); + //sb.Append(" DeltaE CIE 100 % : "); + sb.Append($" { rubbingResult.DeltaeCie100.ToString()} "); + //sb.Append(" GS 100% : "); + sb.Append($" { rubbingResult.Gs100Min.ToString()}-{rubbingResult.Gs100Max.ToString()} "); + //sb.Append(" DeltaE CIE 200 % : "); + sb.Append($" { rubbingResult.DeltaeCie200.ToString()} "); + //sb.Append(" GS 200% : "); + sb.Append($" { rubbingResult.Gs200Min.ToString()}-{rubbingResult.Gs200Max.ToString()} "); + outputFile.WriteLine(sb); + } + outputFile.WriteLine(""); + outputFile.WriteLine(" Mechanical properties"); + outputFile.WriteLine(""); + outputFile.WriteLine(" %Color Color Load at Maximum Load(N) STDEV Percentage Strain at Maximum Load STDEV "); + foreach (var result in TestResult.TensileResults) + { + StringBuilder sb = new StringBuilder(); + //sb.Append(" % Color: "); + sb.Append($" { result.ColorPercent.ToString()}"); + //sb.Append(" Color : "); + sb.Append($" { result.TestResultColor.ToString()}"); + //sb.Append(" Load at Maximum Load(N) : "); + sb.Append($" { result.MaxLoad.ToString()}"); + //sb.Append(" STDEV : "); + sb.Append($" { result.StdevMaxLoad.ToString()}"); + //sb.Append(" Percentage Strain at Maximum Load: "); + sb.Append($" {result.StrainMaxLoad.ToString()}"); + //sb.Append(" STDEV : "); + sb.Append($" { result.StdevStrainMaxLoad.ToString()}"); + outputFile.WriteLine(sb); + } + outputFile.WriteLine(""); + outputFile.WriteLine(" Uniformity"); + outputFile.WriteLine(""); + outputFile.WriteLine(String.Format($" Zone1 : {TestResult.SeverityZone1Min.ToString()} - {TestResult.SeverityZone1Max.ToString()}")); + outputFile.WriteLine(String.Format($" Zone2 : {TestResult.SeverityZone2Min.ToString()} - {TestResult.SeverityZone2Max.ToString()}")); + outputFile.WriteLine(""); + outputFile.WriteLine(" COF"); + outputFile.WriteLine(""); + outputFile.WriteLine(" Thread name Lub Version COF Lub amount "); + outputFile.WriteLine(String.Format($" REF {TestResult.RefLubVersion} {TestResult.RefCof.ToString()} {TestResult.RefLub.ToString()}")); + outputFile.WriteLine(String.Format($" {ThreadName} {TestResult.ThreadLubVersion} {TestResult.ThreadCof.ToString()} {TestResult.ThreadLub.ToString()}")); + + outputFile.WriteLine(""); + outputFile.WriteLine(String.Format($" Comments: {TestResult.Comment}")); + outputFile.WriteLine(String.Format($" Conclusion: {TestResult.Conclusions}")); + outputFile.WriteLine(""); + outputFile.Flush(); + } + + } + } + catch (Exception ex) + { + LogManager.Log(ex, "Error exporting excel file " + dlg.FileName); + _notification.ShowError("An error occurred while trying to export the test result data."); + } + } + } +} 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 new file mode 100644 index 000000000..c60d5e4fa --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/ViewModels/TestResultsViewVM.cs @@ -0,0 +1,368 @@ +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Tango.AutoComplete.Editors; +using Tango.BL; +using Tango.BL.ActionLogs; +using Tango.BL.Builders; +using Tango.BL.DTO; +using Tango.BL.Entities; +using Tango.BL.Enumerations; +using Tango.Core; +using Tango.Core.Commands; +using Tango.Logging; +using Tango.MachineStudio.Common; +using Tango.MachineStudio.Common.Notifications; +using Tango.Settings; +using Tango.SharedUI; + +namespace Tango.MachineStudio.ThreadExtensions.ViewModels +{ + public class TestResultsViewVM : ViewModel + { + private INotificationProvider _notification; + private IActionLogManager _actionLogManager; + + private ObservablesContext _active_context; + + public event EventHandler SaveTestResults; + + #region Properties + private SynchronizedObservableCollection _selectedTestResults; + + public SynchronizedObservableCollection SelectedTestResults + { + get { return _selectedTestResults; } + set { _selectedTestResults = value; } + } + + + private ObservableCollection _resultTabs; + + public ObservableCollection ResultTabs + { + get { return _resultTabs; } + set { _resultTabs = value; } + } + + private TestResultViewVM _selectedTab; + /// + /// Gets or sets the selected tab. + /// + public TestResultViewVM SelectedTab + { + get { return _selectedTab; } + set + { + _selectedTab = value; + RaisePropertyChangedAuto(); + + foreach (var tab in ResultTabs.Where(x => x != _selectedTab)) + { + tab.IsSelected = false; + } + + if (_selectedTab != null) + { + _selectedTab.IsSelected = true; + } + + //EnableRenderingForSelectedTabGraphs(); + } + } + /// + /// Gets or sets the machines providers. + /// + //public ISuggestionProvider MachinesProvider { get; set; } + + protected Machine _selectedMachine; + /// + /// Gets or sets the selected machine. + /// + public Machine SelectedMachine + { + get { return _selectedMachine; } + set + { + if (value != null && _selectedMachine != value) + { + _selectedMachine = value; + SelectedMachineChanged(); + RaisePropertyChangedAuto(); + InvalidateRelayCommands(); + } + } + } + + private string _RMLExtentionGUID; + + public string RMLExtemtionGUID + { + get { return _RMLExtentionGUID; } + set { _RMLExtentionGUID = value; + OnRMLExtemtionGUIDChanged(); + } + } + + private string _threadName; + + public string ThreadName + { + get { return _threadName; } + set { _threadName = value; + RaisePropertyChangedAuto(); } + } + + + #endregion + + #region Commands + /// + /// Gets or sets the add tab command. + /// + public RelayCommand AddTabCommand { get; set; } + + /// + /// Gets or sets the remove tab command. + /// + public RelayCommand RemoveTabCommand { get; set; } + + /// + /// Gets or sets the rename tab command. + /// + public RelayCommand RenameTabCommand { get; set; } + + public RelayCommand FlytoProcessParametersCommand { get; set; } + + public RelayCommand SaveCommand { get; set; } + + #endregion + + public TestResultsViewVM(INotificationProvider notification, IActionLogManager actionLogManager) + { + _notification = notification; + _actionLogManager = actionLogManager; + ResultTabs = new ObservableCollection(); + + AddTabCommand = new RelayCommand(() => AddNewTab()); + RemoveTabCommand = new RelayCommand(RemoveTab); + RenameTabCommand = new RelayCommand(RenameTab); + + FlytoProcessParametersCommand = new RelayCommand(FlytoProcessParameters); + SaveCommand = new RelayCommand(Save, () => IsFree); + } + + #region Tabs modification + + /// + /// Removes the specified tab. + /// + /// The tab. + private void RemoveTab(TestResultViewVM tab) + { + if (ResultTabs.Count == 1) + return; + if (_notification.ShowQuestion("Are you sure you want to delete the selected tab?")) + { + _active_context.RubbingResults.RemoveRange(tab.TestResult.RubbingResults); + tab.TestResult.RubbingResults = null; + + _active_context.TensileResults.RemoveRange(tab.TestResult.TensileResults); + tab.TestResult.TensileResults = null; + + _active_context.RmlExtensionTestResults.Remove(tab.TestResult); + + ResultTabs.Remove(tab); + SelectedTab = ResultTabs.LastOrDefault(); + _active_context.SaveChanges(); + + } + } + + /// + /// Adds a new tab. + /// + private bool AddNewTab(String name = null) + { + if (ResultTabs.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 = CreateNewTestResultVM(name, (ResultTabs.Count + 1)); + ResultTabs.Add(tab); + _active_context.RmlExtensionTestResults.Add(tab.TestResult); + SelectedTab = tab; + return true; + } + else + { + return false; + } + } + + /// + /// Renames the tab. + /// + /// The tab. + private void RenameTab() + { + if (SelectedTab != null) + { + var name = _notification.ShowTextInput("Enter tab name", "Tab Name", SelectedTab.TestResult.Name); + + if (!String.IsNullOrWhiteSpace(name)) + { + SelectedTab.TestResult.Name = name; + } + } + } + #endregion + + #region Loading test results + + private void OnRMLExtemtionGUIDChanged() + { + ResultTabs.Clear(); + SelectedTab = null; + var settings = SettingsManager.Default.GetOrCreate(); + + SelectedMachine = ObservablesStaticCollections.Instance.Machines.SingleOrDefault(x => x.SerialNumber == settings.LastVirtualMachineSerialNumber); + } + + private void SelectedMachineChanged() + { + ResultTabs.Clear(); + SelectedTab = null; + LoadTestResults(); + } + public async void LoadTestResults() + { + if (SelectedMachine == null || SelectedMachine.Guid == null) + { + _notification.ShowWarning(LogManager.Log($" Please, select machine.", LogCategory.Warning)); + return; + } + + try + { + IsFree = false; + if (_active_context != null) + { + _active_context.Dispose(); + } + _active_context = ObservablesContext.CreateDefault(); + ResultTabs.Clear(); + LogManager.Log("Loading selected test results..."); + + using (_notification.PushTaskItem("Loading Test Results Parameters ...")) + { + var testResults = await new RMLExtensionTestResultsCollectionBuilder(_active_context).SetAll().ForRMLExtension(RMLExtemtionGUID).ForMachine(SelectedMachine.Guid).WithRubbingAndTensileResults().BuildAsync(); + SelectedTestResults = testResults.OrderBy(x => x.ResultIndex).ToSynchronizedObservableCollection(); + foreach (var result in SelectedTestResults) + { + ResultTabs.Add(new TestResultViewVM(_notification, _actionLogManager) { TestResult = result, ThreadName = ThreadName }); + if (result.ResultIndex == 1) + { + SelectedTab = ResultTabs[ResultTabs.Count - 1]; + } + } + if (ResultTabs.Count == 0) + { + SelectedTab = CreateNewTestResultVM("Untitled", 1); + ResultTabs.Add(SelectedTab); + _active_context.RmlExtensionTestResults.Add(SelectedTab.TestResult); + await _active_context.SaveChangesAsync(); + } + } + IsFree = true; + } + catch (Exception ex) + { + LogManager.Log(ex, $"Error loading TestResults.\n{ex.FlattenMessage()}"); + } + finally + { + IsFree = true; + } + } + + private TestResultViewVM CreateNewTestResultVM(string name, int index) + { + TestResultViewVM newtab = new TestResultViewVM(_notification, _actionLogManager) { ThreadName = ThreadName }; + newtab.TestResult = new RmlExtensionTestResult() { RmlsExtensionsGuid = RMLExtemtionGUID, MachineGuid = SelectedMachine.Guid, ResultIndex = index, Name = name, BtsrMax = 0.0, BtsrMin = 0.0, DryerTemperature = 0, TunnelTemperature = 0, TunnelFlow = 0.0, TunnelAvgTemperature = 0.0, TensionHeadMax = 0.0, + TensionHeadMin = 0.0, TensioinAfterDryerMax = 0.0, TensionAfterDryerMin = 0.0, TensionWinderMax = 0.0, TensionWinderMin = 0.0, PullerTensionMax = 0.0, PullerTensionMin = 0.0, ExitTensionMax = 0.0, ExitTensionMin = 0.0, SeverityZone1Max = 0.0, SeverityZone1Min = 0.0, SeverityZone2Max = 0.0, SeverityZone2Min = 0.0, + RefLubVersion="", RefCof = 0.0, RefLub = 0.0, ThreadLubVersion = "", ThreadCof = 0.0, ThreadLub = 0.0, Conclusions="", Comment=""}; + var rubbingresults = new SynchronizedObservableCollection(); + rubbingresults.Add(new RubbingResult() { RmlExtensionTestResultsGuid = newtab.TestResult.Guid, TestResultColor = TestResultColors.CYAN }); + rubbingresults.Add(new RubbingResult() { RmlExtensionTestResultsGuid = newtab.TestResult.Guid, TestResultColor = TestResultColors.MAGENTA }); + rubbingresults.Add(new RubbingResult() { RmlExtensionTestResultsGuid = newtab.TestResult.Guid, TestResultColor = TestResultColors.YELLOW }); + rubbingresults.Add(new RubbingResult() { RmlExtensionTestResultsGuid = newtab.TestResult.Guid, TestResultColor = TestResultColors.BLACK }); + newtab.TestResult.RubbingResults = rubbingresults; + + var tensileresults = new SynchronizedObservableCollection(); + tensileresults.Add(new TensileResult() { RmlExtensionTestResultsGuid = newtab.TestResult.Guid, TestResultColor = TestResultColors.CYAN, ColorPercent = 100 }); + tensileresults.Add(new TensileResult() { RmlExtensionTestResultsGuid = newtab.TestResult.Guid, TestResultColor = TestResultColors.BLACK, ColorPercent = 100 }); + tensileresults.Add(new TensileResult() { RmlExtensionTestResultsGuid = newtab.TestResult.Guid, TestResultColor = TestResultColors.CYAN, ColorPercent = 200 }); + tensileresults.Add(new TensileResult() { RmlExtensionTestResultsGuid = newtab.TestResult.Guid, TestResultColor = TestResultColors.BLACK, ColorPercent = 200 }); + tensileresults.Add(new TensileResult() { RmlExtensionTestResultsGuid = newtab.TestResult.Guid, TestResultColor = TestResultColors.WHITE, ColorPercent = null }); + newtab.TestResult.TensileResults = tensileresults; + + return newtab; + } + + #endregion + #region Save + public void FlytoProcessParameters() + { + + } + + public async void Save() + { + if (SelectedMachine == null || SelectedMachine.Guid == null) + { + _notification.ShowWarning(LogManager.Log($"Could not save Test Results. Please, select machine.", LogCategory.Warning)); + return; + } + try + { + IsFree = false; + await Task.Factory.StartNew(() => + { + foreach (var tab in ResultTabs) + { + tab.TestResult.LastUpdated = DateTime.UtcNow; + } + _active_context.SaveChanges(); + }); + + LoadTestResults(); + } + catch (Exception ex) + { + LogManager.Log(ex, "Could not save test results."); + _notification.ShowError($"An error occurred while trying to save test results.\n{ex.Message}"); + } + finally + { + IsFree = true; + EventHandler handler = SaveTestResults; + handler?.Invoke(this, new EventArgs()); + } + } + + #endregion + } +} diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/ColorParametersView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/ColorParametersView.xaml index 1526a49cb..739a2ae2c 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/ColorParametersView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/ColorParametersView.xaml @@ -6,8 +6,10 @@ xmlns:local="clr-namespace:Tango.MachineStudio.ThreadExtensions.Views" xmlns:vm="clr-namespace:Tango.MachineStudio.ThreadExtensions.ViewModels" xmlns:converters="clr-namespace:Tango.MachineStudio.ThreadExtensions.Converters" + 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:shapes="clr-namespace:Tango.SharedUI.Shapes;assembly=Tango.SharedUI" @@ -17,6 +19,7 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/MachineTestResultsView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/MachineTestResultsView.xaml.cs new file mode 100644 index 000000000..0af378b52 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/MachineTestResultsView.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 +{ + /// + /// Interaction logic for MachineTestResults.xaml + /// + public partial class MachineTestResultsView : UserControl + { + public MachineTestResultsView() + { + InitializeComponent(); + } + } +} diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/MainView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/MainView.xaml index 0ef5850c6..d40c3a05d 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/MainView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/MainView.xaml @@ -12,8 +12,8 @@ d:DesignHeight="1080" d:DesignWidth="1920" Background="Transparent" d:DataContext="{d:DesignInstance Type=vm:MainViewVM, IsDesignTimeCreatable=False}" DataContext="{x:Static global:ViewModelLocator.MainViewVM}"> - - + + diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/MainView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/MainView.xaml.cs index 251099c8a..d5af040f6 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/MainView.xaml.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/MainView.xaml.cs @@ -28,7 +28,7 @@ namespace Tango.MachineStudio.ThreadExtensions.Views TangoIOC.Default.Register(this); } - public void NavigateTo(ThreadExtensionNavigationView view) + public void NavigateTo(RMLExtensionNavigationView view) { navigationControl.NavigateTo(view.ToString()); } diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/RMLExtensionView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/RMLExtensionView.xaml new file mode 100644 index 000000000..7e9d85f49 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/RMLExtensionView.xaml @@ -0,0 +1,82 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/RMLExtensionView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/RMLExtensionView.xaml.cs new file mode 100644 index 000000000..1c7978f64 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/RMLExtensionView.xaml.cs @@ -0,0 +1,27 @@ +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.Shapes; + +namespace Tango.MachineStudio.ThreadExtensions.Views +{ + /// + /// Interaction logic for ThreadExtView.xaml + /// + public partial class RMLExtentionView : UserControl + { + public RMLExtentionView() + { + InitializeComponent(); + } + } +} diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/RMLExtensionsView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/RMLExtensionsView.xaml new file mode 100644 index 000000000..6a1436348 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/RMLExtensionsView.xaml @@ -0,0 +1,108 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/RMLExtensionsView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/RMLExtensionsView.xaml.cs new file mode 100644 index 000000000..03bac4bbe --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/RMLExtensionsView.xaml.cs @@ -0,0 +1,27 @@ +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.Shapes; + +namespace Tango.MachineStudio.ThreadExtensions.Views +{ + /// + /// Interaction logic for ThreadExtViews.xaml + /// + public partial class RMLExtensionsView : UserControl + { + public RMLExtensionsView() + { + InitializeComponent(); + } + } +} 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 new file mode 100644 index 000000000..2654b4ff3 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/TestResultsView.xaml @@ -0,0 +1,622 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Conclusion: + + + + + Comments: + + + + + + + + + + + + + + + + + + + + + + Process Parameters + + + + + Dryer temperature + + + + + + Tunnel temperature + + + + + + Tunnel flow + + + + + + Tunnel AVG temperature + + + + + + + + + Rubbing results + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + + + + + + + + + + - + + + + + + + + + + + Tension through the thread path + + + + Tension in Zone + + + Tensiometer (gr) + + + Tension in Zone + + + MS + + + Head + + + + + - + + + + + BTSR + + + + + - + + + + + After dryer + + + + + - + + + + + Puller tension + + + + + - + + + + + Winder + + + + + - + + + + + Winder Exit Tension + + + + + - + + + + + + + + Mechanical properties + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Uniformity + + + + Uniformity + + + Severity + + + Zone 1 + + + + + - + + + + + Zone 2 + + + + + - + + + + + + + + COF + + + + Thread name + + + Lub version + + + COF + + + Lub amount + + + + + REF + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/TestResultsView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/TestResultsView.xaml.cs new file mode 100644 index 000000000..a75dc5d09 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/TestResultsView.xaml.cs @@ -0,0 +1,56 @@ +using System; +using System.Collections.Generic; +using System.Diagnostics; +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.ThreadExtensions.ViewModels; + +namespace Tango.MachineStudio.ThreadExtensions.Views +{ + /// + /// Interaction logic for TestResultsView.xaml + /// + public partial class TestResultsView : UserControl + { + private Dictionary _tabs_content; + + public TestResultsView() + { + InitializeComponent(); + + _tabs_content = new Dictionary(); + + this.Loaded += TestResultsView_Loaded; + } + private void TestResultsView_Loaded(object sender, RoutedEventArgs e) + { + + } + private void Border_IsVisibleChanged(object sender, DependencyPropertyChangedEventArgs e) + { + Border border = sender as Border; + if (border.Visibility != Visibility.Visible) + { + _tabs_content[border] = border.Child; + border.Child = null; + } + else + { + if (_tabs_content.ContainsKey(border)) + { + border.Child = _tabs_content[border]; + } + } + } + } +} diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/ThreadCharacteristicsView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/ThreadCharacteristicsView.xaml index fac8e6af4..707991f0e 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/ThreadCharacteristicsView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/ThreadCharacteristicsView.xaml @@ -11,185 +11,226 @@ xmlns:controls="clr-namespace:Tango.SharedUI.Controls;assembly=Tango.SharedUI" xmlns:converters="clr-namespace:Tango.SharedUI.Converters;assembly=Tango.SharedUI" xmlns:enumerations="clr-namespace:Tango.BL.Enumerations;assembly=Tango.BL" + xmlns:sys="clr-namespace:System;assembly=mscorlib" xmlns:mahapps="http://metro.mahapps.com/winfx/xaml/controls" mc:Ignorable="d" FontSize="16" d:DesignHeight="450" d:DesignWidth="1200" Background="Transparent" d:DataContext="{d:DesignInstance Type=vm:MainViewVM, IsDesignTimeCreatable=False}" DataContext="{x:Static global:ViewModelLocator.MainViewVM}"> - + - + + + + + + + + + + + + + - - - - - - - Yarn Source - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Yarn Source - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Yarn Data - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Yarn Properties from datasheet - - - - + + + + + + + + + + + + Yarn Source + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Yarn Source + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Yarn Data + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Yarn Properties from datasheet + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/ThreadExtensionView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/ThreadExtensionView.xaml deleted file mode 100644 index f9d8a2dc3..000000000 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/ThreadExtensionView.xaml +++ /dev/null @@ -1,61 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/ThreadExtensionView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/ThreadExtensionView.xaml.cs deleted file mode 100644 index 2cce29e57..000000000 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/ThreadExtensionView.xaml.cs +++ /dev/null @@ -1,27 +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.Shapes; - -namespace Tango.MachineStudio.ThreadExtensions.Views -{ - /// - /// Interaction logic for ThreadExtView.xaml - /// - public partial class ThreadExtentionView : UserControl - { - public ThreadExtentionView() - { - InitializeComponent(); - } - } -} diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/ThreadExtensionsView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/ThreadExtensionsView.xaml deleted file mode 100644 index b85222b12..000000000 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/ThreadExtensionsView.xaml +++ /dev/null @@ -1,103 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/ThreadExtensionsView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/ThreadExtensionsView.xaml.cs deleted file mode 100644 index 9afb7a5c8..000000000 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/ThreadExtensionsView.xaml.cs +++ /dev/null @@ -1,27 +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.Shapes; - -namespace Tango.MachineStudio.ThreadExtensions.Views -{ - /// - /// Interaction logic for ThreadExtViews.xaml - /// - public partial class ThreadExtensionsView : UserControl - { - public ThreadExtensionsView() - { - InitializeComponent(); - } - } -} 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 5a03cfb57..da5ed8abc 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/packages.config +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/packages.config @@ -1,6 +1,7 @@  + diff --git a/Software/Visual_Studio/Tango.BL/Builders/ColorProcessParametersBuilder.cs b/Software/Visual_Studio/Tango.BL/Builders/ColorProcessParametersBuilder.cs index 005ca8a53..de16be5d0 100644 --- a/Software/Visual_Studio/Tango.BL/Builders/ColorProcessParametersBuilder.cs +++ b/Software/Visual_Studio/Tango.BL/Builders/ColorProcessParametersBuilder.cs @@ -16,25 +16,21 @@ namespace Tango.BL.Builders } - //protected override IQueryable OnSetQuery(IQueryable query) - //{ - // return query. - // Include(x => x.ColorProcessData). - // Include(x => x.ColorProcessFactor); - //} public virtual ColorProcessParametersBuilder WithColorProcessData() { - return AddQueryStep(1, (query) => + return AddStep(12, () => { - return query.Include(x => x.ColorProcessData); + Context.ColorProcessData.Where(x => x.ColorProcessParametersGuid == Entity.Guid).OrderBy(x => x.Color).ToList(); + }); } public virtual ColorProcessParametersBuilder WithColorProcessFactor() { - return AddQueryStep(2, (query) => + return AddStep(2, () => { - return query.Include(x => x.ColorProcessFactor); + Context.ColorProcessFactors.Where(x => x.ColorProcessParametersGuid == Entity.Guid).OrderBy(x => x.Color).ToList(); + }); } } diff --git a/Software/Visual_Studio/Tango.BL/Builders/RMLExtensionTestResultsCollectionBuilder.cs b/Software/Visual_Studio/Tango.BL/Builders/RMLExtensionTestResultsCollectionBuilder.cs new file mode 100644 index 000000000..574439852 --- /dev/null +++ b/Software/Visual_Studio/Tango.BL/Builders/RMLExtensionTestResultsCollectionBuilder.cs @@ -0,0 +1,58 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Tango.BL.Entities; +using System.Data.Entity; +using Tango.BL.Enumerations; + +namespace Tango.BL.Builders +{ + public class RMLExtensionTestResultsCollectionBuilder : EntityCollectionBuilderBase + { + public RMLExtensionTestResultsCollectionBuilder(ObservablesContext context) : base(context) + { + } + + public virtual RMLExtensionTestResultsCollectionBuilder WithRubbingAndTensileResults() + { + return AddStep(2, () => + { + foreach (var result in Entities.ToList()) + { + Context.RubbingResults.Where(x => x.RmlExtensionTestResultsGuid == result.Guid).OrderBy(x => x.Color).ToList(); + Context.TensileResults.Where(x => x.RmlExtensionTestResultsGuid == result.Guid).OrderByDescending(i => i.ColorPercent.HasValue).ThenBy(x => x.ColorPercent).ThenByDescending(x => x.Color).ToList(); + } + }); + } + public virtual RMLExtensionTestResultsCollectionBuilder ForRMLExtension(String rmlExtensionGUID) + { + return AddQueryStep(0, (query) => + { + if (rmlExtensionGUID != null) + { + return query.Where(x => x.RmlsExtensionsGuid == rmlExtensionGUID); + } + else + { + return query; + } + }); + } + public virtual RMLExtensionTestResultsCollectionBuilder ForMachine(String machineGUID) + { + return AddQueryStep(1, (query) => + { + if (machineGUID != null ) + { + return query.Where(x => x.MachineGuid == machineGUID); + } + else + { + return query; + } + }); + } + } +} diff --git a/Software/Visual_Studio/Tango.BL/Builders/RMLExtentionsCollectionBuilder.cs b/Software/Visual_Studio/Tango.BL/Builders/RMLExtentionsCollectionBuilder.cs index 370c4273c..e1b91f216 100644 --- a/Software/Visual_Studio/Tango.BL/Builders/RMLExtentionsCollectionBuilder.cs +++ b/Software/Visual_Studio/Tango.BL/Builders/RMLExtentionsCollectionBuilder.cs @@ -14,29 +14,14 @@ namespace Tango.BL.Builders public RMLExtentionsCollectionBuilder(ObservablesContext context) : base(context) { } - public virtual RMLExtentionsCollectionBuilder WithUser() - { - //return AddStep(0, () => - //{ - // foreach (var rmlExtentions in Entities.ToList()) - // { - // new UserBuilder(Context).Set(rmlExtentions.UserGuid).Build(); - // } - //}); - - return AddQueryStep(0, (query) => - { - return query.Include(x => x.User).Include(x => x.User.Contact); - }); - } - + public virtual RMLExtentionsCollectionBuilder WithUsers() { return AddStep(2, () => { foreach (var rmlExtention in Entities) { - new UsersCollectionBuilder(Context).Set(x => x.Guid == rmlExtention.UserGuid).WithAddress().WithContacts().Build(); + new UsersCollectionBuilder(Context).Set(x => x.Guid == rmlExtention.UsersGuid).WithAddress().WithContacts().Build(); } }); } @@ -46,19 +31,16 @@ namespace Tango.BL.Builders return AddStep(1, () => { Context.YarnApplications.ToList(); - Context.YarnBrand.ToList(); - Context.YarnColor.ToList(); - Context.YarnEndUse.ToList(); - Context.YarnGeometry.ToList(); - Context.YarnFamily.ToList(); - Context.YarnGlossLevel.ToList(); - Context.YarnGroup.ToList(); - Context.YarnIndustrysector.ToList(); - Context.YarnManufacturer.ToList(); - Context.YarnMaterials.ToList(); - Context.YarnSubFamily.ToList(); - Context.YarnTexturing.ToList(); - Context.YarnType.ToList(); + Context.YarnBrands.ToList(); + Context.YarnWhiteShades.ToList(); + Context.YarnFamilies.ToList(); + Context.YarnGlossLevels.ToList(); + Context.YarnGroups.ToList(); + Context.YarnIndustrysectors.ToList(); + Context.YarnManufacturers.ToList(); + Context.YarnSubFamilies.ToList(); + Context.YarnTexturings.ToList(); + Context.YarnTypes.ToList(); }); } } diff --git a/Software/Visual_Studio/Tango.BL/Builders/RmlExtensionsBuilder.cs b/Software/Visual_Studio/Tango.BL/Builders/RmlExtensionsBuilder.cs index 00c251a4e..d8c0d3ddc 100644 --- a/Software/Visual_Studio/Tango.BL/Builders/RmlExtensionsBuilder.cs +++ b/Software/Visual_Studio/Tango.BL/Builders/RmlExtensionsBuilder.cs @@ -18,17 +18,14 @@ namespace Tango.BL.Builders protected override IQueryable OnSetQuery(IQueryable query) { return query. - Include(x => x.Rml). - Include(x => x.YarnApplications). + Include(x => x.Rmls). + Include(x => x.YarnApplication). Include(x => x.YarnBrand). - Include(x => x.YarnColor). - Include(x => x.YarnEndUse). + Include(x => x.YarnWhiteShade). Include(x => x.YarnFamily). - Include(x => x.YarnGeometry). Include(x => x.YarnGlossLevel). Include(x => x.YarnGroup). Include(x => x.YarnManufacturer). - Include(x => x.YarnMaterial). Include(x => x.YarnSubFamily). Include(x => x.YarnTexturing). Include(x => x.YarnType); @@ -37,7 +34,7 @@ namespace Tango.BL.Builders { return AddStep(0, () => { - new UserBuilder(Context).Set(Entity.UserGuid).WithRolesAndPermissions().Build(); + new UserBuilder(Context).Set(Entity.UsersGuid).WithRolesAndPermissions().Build(); }); } } diff --git a/Software/Visual_Studio/Tango.BL/DTO/ColorProcessDataDTOBase.cs b/Software/Visual_Studio/Tango.BL/DTO/ColorProcessDataDTOBase.cs index bb0dadfa6..e6becdb87 100644 --- a/Software/Visual_Studio/Tango.BL/DTO/ColorProcessDataDTOBase.cs +++ b/Software/Visual_Studio/Tango.BL/DTO/ColorProcessDataDTOBase.cs @@ -30,9 +30,9 @@ namespace Tango.BL.DTO } /// - /// color name + /// color /// - public String ColorName + public Int32 Color { get; set; } diff --git a/Software/Visual_Studio/Tango.BL/DTO/ColorProcessFactorDTOBase.cs b/Software/Visual_Studio/Tango.BL/DTO/ColorProcessFactorDTOBase.cs index a6e2a83b2..9eee5e299 100644 --- a/Software/Visual_Studio/Tango.BL/DTO/ColorProcessFactorDTOBase.cs +++ b/Software/Visual_Studio/Tango.BL/DTO/ColorProcessFactorDTOBase.cs @@ -30,9 +30,9 @@ namespace Tango.BL.DTO } /// - /// color name + /// color /// - public String ColorName + public Int32 Color { get; set; } diff --git a/Software/Visual_Studio/Tango.BL/DTO/ColorProcessParameterDTOBase.cs b/Software/Visual_Studio/Tango.BL/DTO/ColorProcessParameterDTOBase.cs index 606c23ca6..0c5dcd1de 100644 --- a/Software/Visual_Studio/Tango.BL/DTO/ColorProcessParameterDTOBase.cs +++ b/Software/Visual_Studio/Tango.BL/DTO/ColorProcessParameterDTOBase.cs @@ -29,6 +29,14 @@ namespace Tango.BL.DTO get; set; } + /// + /// machine guid + /// + public String MachineGuid + { + get; set; + } + /// /// white point l /// diff --git a/Software/Visual_Studio/Tango.BL/DTO/RmlExtensionTestResultDTO.cs b/Software/Visual_Studio/Tango.BL/DTO/RmlExtensionTestResultDTO.cs new file mode 100644 index 000000000..4b3c2c680 --- /dev/null +++ b/Software/Visual_Studio/Tango.BL/DTO/RmlExtensionTestResultDTO.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 RmlExtensionTestResultDTO : RmlExtensionTestResultDTOBase + { + + } +} diff --git a/Software/Visual_Studio/Tango.BL/DTO/RmlExtensionTestResultDTOBase.cs b/Software/Visual_Studio/Tango.BL/DTO/RmlExtensionTestResultDTOBase.cs new file mode 100644 index 000000000..d48a36b22 --- /dev/null +++ b/Software/Visual_Studio/Tango.BL/DTO/RmlExtensionTestResultDTOBase.cs @@ -0,0 +1,281 @@ + +//------------------------------------------------------------------------------ +// +// 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.Linq; +using System.Text; +using System.Threading.Tasks; +using Tango.BL.Entities; + +namespace Tango.BL.DTO +{ + public abstract class RmlExtensionTestResultDTOBase : ObservableEntityDTO + { + + /// + /// rmls extensions guid + /// + public String RmlsExtensionsGuid + { + get; set; + } + + /// + /// machine guid + /// + public String MachineGuid + { + get; set; + } + + /// + /// result index + /// + public Int32 ResultIndex + { + get; set; + } + + /// + /// name + /// + public String Name + { + get; set; + } + + /// + /// dryer temperature + /// + public Nullable DryerTemperature + { + get; set; + } + + /// + /// tunnel temperature + /// + public Nullable TunnelTemperature + { + get; set; + } + + /// + /// tunnel flow + /// + public Nullable TunnelFlow + { + get; set; + } + + /// + /// tunnel avg temperature + /// + public Nullable TunnelAvgTemperature + { + get; set; + } + + /// + /// tension head min + /// + public Nullable TensionHeadMin + { + get; set; + } + + /// + /// tension head max + /// + public Nullable TensionHeadMax + { + get; set; + } + + /// + /// tension after dryer min + /// + public Nullable TensionAfterDryerMin + { + get; set; + } + + /// + /// tensioin after dryer max + /// + public Nullable TensioinAfterDryerMax + { + get; set; + } + + /// + /// tension winder min + /// + public Nullable TensionWinderMin + { + get; set; + } + + /// + /// tension winder max + /// + public Nullable TensionWinderMax + { + get; set; + } + + /// + /// btsr min + /// + public Nullable BtsrMin + { + get; set; + } + + /// + /// btsr max + /// + public Nullable BtsrMax + { + get; set; + } + + /// + /// puller tension min + /// + public Nullable PullerTensionMin + { + get; set; + } + + /// + /// puller tension max + /// + public Nullable PullerTensionMax + { + get; set; + } + + /// + /// exit tension min + /// + public Nullable ExitTensionMin + { + get; set; + } + + /// + /// exit tension max + /// + public Nullable ExitTensionMax + { + get; set; + } + + /// + /// severity zone1 min + /// + public Nullable SeverityZone1Min + { + get; set; + } + + /// + /// severity zone1 max + /// + public Nullable SeverityZone1Max + { + get; set; + } + + /// + /// severity zone2 min + /// + public Nullable SeverityZone2Min + { + get; set; + } + + /// + /// severity zone2 max + /// + public Nullable SeverityZone2Max + { + get; set; + } + + /// + /// comment + /// + public String Comment + { + get; set; + } + + /// + /// conclusions + /// + public String Conclusions + { + get; set; + } + + /// + /// ref lub version + /// + public String RefLubVersion + { + get; set; + } + + /// + /// ref cof + /// + public Nullable RefCof + { + get; set; + } + + /// + /// ref lub + /// + public Nullable RefLub + { + get; set; + } + + /// + /// thread lub version + /// + public String ThreadLubVersion + { + get; set; + } + + /// + /// thread cof + /// + public Nullable ThreadCof + { + get; set; + } + + /// + /// thread lub + /// + public Nullable ThreadLub + { + get; set; + } + + } +} diff --git a/Software/Visual_Studio/Tango.BL/DTO/RmlsExtensionDTOBase.cs b/Software/Visual_Studio/Tango.BL/DTO/RmlsExtensionDTOBase.cs index a80e63c75..e77c8caf3 100644 --- a/Software/Visual_Studio/Tango.BL/DTO/RmlsExtensionDTOBase.cs +++ b/Software/Visual_Studio/Tango.BL/DTO/RmlsExtensionDTOBase.cs @@ -22,17 +22,17 @@ namespace Tango.BL.DTO { /// - /// rml guid + /// rmls guid /// - public String RmlGuid + public String RmlsGuid { get; set; } /// - /// user guid + /// users guid /// - public String UserGuid + public String UsersGuid { get; set; } @@ -70,17 +70,9 @@ namespace Tango.BL.DTO } /// - /// yarn end use guid + /// yarn application guid /// - public String YarnEndUseGuid - { - get; set; - } - - /// - /// yarn applications guid - /// - public String YarnApplicationsGuid + public String YarnApplicationGuid { get; set; } @@ -93,14 +85,6 @@ namespace Tango.BL.DTO get; set; } - /// - /// yarn material guid - /// - public String YarnMaterialGuid - { - get; set; - } - /// /// yarn type guid /// @@ -142,17 +126,9 @@ namespace Tango.BL.DTO } /// - /// yarn geometry guid - /// - public String YarnGeometryGuid - { - get; set; - } - - /// - /// yarn color guid + /// yarn white shade guid /// - public String YarnColorGuid + public String YarnWhiteShadeGuid { get; set; } @@ -166,33 +142,9 @@ namespace Tango.BL.DTO } /// - /// linear density - /// - public Int32 LinearDensity - { - get; set; - } - - /// - /// unit + /// linerar density /// - public Int32 Unit - { - get; set; - } - - /// - /// plies - /// - public Int32 Plies - { - get; set; - } - - /// - /// filament count - /// - public Int32 FilamentCount + public Int32 LinerarDensity { get; set; } @@ -286,17 +238,9 @@ namespace Tango.BL.DTO } /// - /// file name - /// - public String FileName - { - get; set; - } - - /// - /// data + /// status /// - public Byte[] Data + public Int32 Status { get; set; } diff --git a/Software/Visual_Studio/Tango.BL/DTO/RubbingResultDTO.cs b/Software/Visual_Studio/Tango.BL/DTO/RubbingResultDTO.cs new file mode 100644 index 000000000..76ff9673f --- /dev/null +++ b/Software/Visual_Studio/Tango.BL/DTO/RubbingResultDTO.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 RubbingResultDTO : RubbingResultDTOBase + { + + } +} diff --git a/Software/Visual_Studio/Tango.BL/DTO/RubbingResultDTOBase.cs b/Software/Visual_Studio/Tango.BL/DTO/RubbingResultDTOBase.cs new file mode 100644 index 000000000..3c569ce30 --- /dev/null +++ b/Software/Visual_Studio/Tango.BL/DTO/RubbingResultDTOBase.cs @@ -0,0 +1,89 @@ + +//------------------------------------------------------------------------------ +// +// 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.Linq; +using System.Text; +using System.Threading.Tasks; +using Tango.BL.Entities; + +namespace Tango.BL.DTO +{ + public abstract class RubbingResultDTOBase : ObservableEntityDTO + { + + /// + /// rml extension test results guid + /// + public String RmlExtensionTestResultsGuid + { + get; set; + } + + /// + /// color + /// + public Nullable Color + { + get; set; + } + + /// + /// deltae cie 100 + /// + public Nullable DeltaeCie100 + { + get; set; + } + + /// + /// gs 100 min + /// + public Nullable Gs100Min + { + get; set; + } + + /// + /// gs 100 max + /// + public Nullable Gs100Max + { + get; set; + } + + /// + /// deltae cie 200 + /// + public Nullable DeltaeCie200 + { + get; set; + } + + /// + /// gs 200 min + /// + public Nullable Gs200Min + { + get; set; + } + + /// + /// gs 200 max + /// + public Nullable Gs200Max + { + get; set; + } + + } +} diff --git a/Software/Visual_Studio/Tango.BL/DTO/TensileResultDTO.cs b/Software/Visual_Studio/Tango.BL/DTO/TensileResultDTO.cs new file mode 100644 index 000000000..db2cb6bcc --- /dev/null +++ b/Software/Visual_Studio/Tango.BL/DTO/TensileResultDTO.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 TensileResultDTO : TensileResultDTOBase + { + + } +} diff --git a/Software/Visual_Studio/Tango.BL/DTO/TensileResultDTOBase.cs b/Software/Visual_Studio/Tango.BL/DTO/TensileResultDTOBase.cs new file mode 100644 index 000000000..ca78166b7 --- /dev/null +++ b/Software/Visual_Studio/Tango.BL/DTO/TensileResultDTOBase.cs @@ -0,0 +1,97 @@ + +//------------------------------------------------------------------------------ +// +// 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.Linq; +using System.Text; +using System.Threading.Tasks; +using Tango.BL.Entities; + +namespace Tango.BL.DTO +{ + public abstract class TensileResultDTOBase : ObservableEntityDTO + { + + /// + /// rml extension test results guid + /// + public String RmlExtensionTestResultsGuid + { + get; set; + } + + /// + /// color percent + /// + public Nullable ColorPercent + { + get; set; + } + + /// + /// color + /// + public Nullable Color + { + get; set; + } + + /// + /// max load + /// + public Nullable MaxLoad + { + get; set; + } + + /// + /// stdev max load + /// + public Nullable StdevMaxLoad + { + get; set; + } + + /// + /// strain max load + /// + public Nullable StrainMaxLoad + { + get; set; + } + + /// + /// stdev strain max load + /// + public Nullable StdevStrainMaxLoad + { + get; set; + } + + /// + /// percent change load + /// + public Nullable PercentChangeLoad + { + get; set; + } + + /// + /// percent change strain + /// + public Nullable PercentChangeStrain + { + get; set; + } + + } +} diff --git a/Software/Visual_Studio/Tango.BL/DTO/YarnColorDTO.cs b/Software/Visual_Studio/Tango.BL/DTO/YarnColorDTO.cs deleted file mode 100644 index cebf7e442..000000000 --- a/Software/Visual_Studio/Tango.BL/DTO/YarnColorDTO.cs +++ /dev/null @@ -1,14 +0,0 @@ - -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace Tango.BL.DTO -{ - public class YarnColorDTO : YarnColorDTOBase - { - - } -} diff --git a/Software/Visual_Studio/Tango.BL/DTO/YarnColorDTOBase.cs b/Software/Visual_Studio/Tango.BL/DTO/YarnColorDTOBase.cs deleted file mode 100644 index 7ca5264bb..000000000 --- a/Software/Visual_Studio/Tango.BL/DTO/YarnColorDTOBase.cs +++ /dev/null @@ -1,33 +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.Linq; -using System.Text; -using System.Threading.Tasks; -using Tango.BL.Entities; - -namespace Tango.BL.DTO -{ - public abstract class YarnColorDTOBase : ObservableEntityDTO - { - - /// - /// name - /// - public String Name - { - get; set; - } - - } -} diff --git a/Software/Visual_Studio/Tango.BL/DTO/YarnEndUseDTO.cs b/Software/Visual_Studio/Tango.BL/DTO/YarnEndUseDTO.cs deleted file mode 100644 index a7e1c5593..000000000 --- a/Software/Visual_Studio/Tango.BL/DTO/YarnEndUseDTO.cs +++ /dev/null @@ -1,14 +0,0 @@ - -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace Tango.BL.DTO -{ - public class YarnEndUseDTO : YarnEndUseDTOBase - { - - } -} diff --git a/Software/Visual_Studio/Tango.BL/DTO/YarnEndUseDTOBase.cs b/Software/Visual_Studio/Tango.BL/DTO/YarnEndUseDTOBase.cs deleted file mode 100644 index c28452a65..000000000 --- a/Software/Visual_Studio/Tango.BL/DTO/YarnEndUseDTOBase.cs +++ /dev/null @@ -1,33 +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.Linq; -using System.Text; -using System.Threading.Tasks; -using Tango.BL.Entities; - -namespace Tango.BL.DTO -{ - public abstract class YarnEndUseDTOBase : ObservableEntityDTO - { - - /// - /// name - /// - public String Name - { - get; set; - } - - } -} diff --git a/Software/Visual_Studio/Tango.BL/DTO/YarnGeometryDTO.cs b/Software/Visual_Studio/Tango.BL/DTO/YarnGeometryDTO.cs deleted file mode 100644 index 1d051e713..000000000 --- a/Software/Visual_Studio/Tango.BL/DTO/YarnGeometryDTO.cs +++ /dev/null @@ -1,14 +0,0 @@ - -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace Tango.BL.DTO -{ - public class YarnGeometryDTO : YarnGeometryDTOBase - { - - } -} diff --git a/Software/Visual_Studio/Tango.BL/DTO/YarnGeometryDTOBase.cs b/Software/Visual_Studio/Tango.BL/DTO/YarnGeometryDTOBase.cs deleted file mode 100644 index a19e5ec37..000000000 --- a/Software/Visual_Studio/Tango.BL/DTO/YarnGeometryDTOBase.cs +++ /dev/null @@ -1,33 +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.Linq; -using System.Text; -using System.Threading.Tasks; -using Tango.BL.Entities; - -namespace Tango.BL.DTO -{ - public abstract class YarnGeometryDTOBase : ObservableEntityDTO - { - - /// - /// name - /// - public String Name - { - get; set; - } - - } -} diff --git a/Software/Visual_Studio/Tango.BL/DTO/YarnMaterialDTO.cs b/Software/Visual_Studio/Tango.BL/DTO/YarnMaterialDTO.cs deleted file mode 100644 index 5b884c13d..000000000 --- a/Software/Visual_Studio/Tango.BL/DTO/YarnMaterialDTO.cs +++ /dev/null @@ -1,14 +0,0 @@ - -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace Tango.BL.DTO -{ - public class YarnMaterialDTO : YarnMaterialDTOBase - { - - } -} diff --git a/Software/Visual_Studio/Tango.BL/DTO/YarnMaterialDTOBase.cs b/Software/Visual_Studio/Tango.BL/DTO/YarnMaterialDTOBase.cs deleted file mode 100644 index 77f9f0aca..000000000 --- a/Software/Visual_Studio/Tango.BL/DTO/YarnMaterialDTOBase.cs +++ /dev/null @@ -1,33 +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.Linq; -using System.Text; -using System.Threading.Tasks; -using Tango.BL.Entities; - -namespace Tango.BL.DTO -{ - public abstract class YarnMaterialDTOBase : ObservableEntityDTO - { - - /// - /// name - /// - public String Name - { - get; set; - } - - } -} diff --git a/Software/Visual_Studio/Tango.BL/DTO/YarnWhiteShadeDTO.cs b/Software/Visual_Studio/Tango.BL/DTO/YarnWhiteShadeDTO.cs new file mode 100644 index 000000000..fd0a705d7 --- /dev/null +++ b/Software/Visual_Studio/Tango.BL/DTO/YarnWhiteShadeDTO.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 YarnWhiteShadeDTO : YarnWhiteShadeDTOBase + { + + } +} diff --git a/Software/Visual_Studio/Tango.BL/DTO/YarnWhiteShadeDTOBase.cs b/Software/Visual_Studio/Tango.BL/DTO/YarnWhiteShadeDTOBase.cs new file mode 100644 index 000000000..139fa5b3e --- /dev/null +++ b/Software/Visual_Studio/Tango.BL/DTO/YarnWhiteShadeDTOBase.cs @@ -0,0 +1,33 @@ + +//------------------------------------------------------------------------------ +// +// 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.Linq; +using System.Text; +using System.Threading.Tasks; +using Tango.BL.Entities; + +namespace Tango.BL.DTO +{ + public abstract class YarnWhiteShadeDTOBase : ObservableEntityDTO + { + + /// + /// name + /// + public String Name + { + get; set; + } + + } +} diff --git a/Software/Visual_Studio/Tango.BL/Entities/ColorProcessData.cs b/Software/Visual_Studio/Tango.BL/Entities/ColorProcessData.cs index cd6781446..773e6be0a 100644 --- a/Software/Visual_Studio/Tango.BL/Entities/ColorProcessData.cs +++ b/Software/Visual_Studio/Tango.BL/Entities/ColorProcessData.cs @@ -1,8 +1,11 @@ -using System; +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 Tango.BL.Enumerations; namespace Tango.BL.Entities { @@ -20,5 +23,21 @@ namespace Tango.BL.Entities context.ColorProcessData.Remove(this); } + + #region value to enum conversion + + [NotMapped] + [JsonIgnore] + public FactorColors FactorColor + { + get { return (FactorColors)Color; } + set + { + Color = (int)value; + RaisePropertyChangedAuto(); + } + } + + #endregion } } diff --git a/Software/Visual_Studio/Tango.BL/Entities/ColorProcessDataBase.cs b/Software/Visual_Studio/Tango.BL/Entities/ColorProcessDataBase.cs index e49883712..cc63d3b31 100644 --- a/Software/Visual_Studio/Tango.BL/Entities/ColorProcessDataBase.cs +++ b/Software/Visual_Studio/Tango.BL/Entities/ColorProcessDataBase.cs @@ -27,7 +27,7 @@ namespace Tango.BL.Entities public abstract class ColorProcessDataBase : ObservableEntity { - public event EventHandler ColorNameChanged; + public event EventHandler ColorChanged; public event EventHandler InkNlCmChanged; @@ -65,28 +65,28 @@ namespace Tango.BL.Entities } } - protected String _colorname; + protected Int32 _color; /// - /// Gets or sets the colorprocessdatabase color name. + /// Gets or sets the colorprocessdatabase color. /// - [Column("COLOR_NAME")] + [Column("COLOR")] - public String ColorName + public Int32 Color { get { - return _colorname; + return _color; } set { - if (_colorname != value) + if (_color != value) { - _colorname = value; + _color = value; - OnColorNameChanged(value); + OnColorChanged(value); } } @@ -233,12 +233,12 @@ namespace Tango.BL.Entities } /// - /// Called when the ColorName has changed. + /// Called when the Color has changed. /// - protected virtual void OnColorNameChanged(String colorname) + protected virtual void OnColorChanged(Int32 color) { - ColorNameChanged?.Invoke(this, colorname); - RaisePropertyChanged(nameof(ColorName)); + ColorChanged?.Invoke(this, color); + RaisePropertyChanged(nameof(Color)); } /// diff --git a/Software/Visual_Studio/Tango.BL/Entities/ColorProcessFactor.cs b/Software/Visual_Studio/Tango.BL/Entities/ColorProcessFactor.cs index e20ca528a..d4a0d62a6 100644 --- a/Software/Visual_Studio/Tango.BL/Entities/ColorProcessFactor.cs +++ b/Software/Visual_Studio/Tango.BL/Entities/ColorProcessFactor.cs @@ -1,8 +1,11 @@ -using System; +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 Tango.BL.Enumerations; namespace Tango.BL.Entities { @@ -12,7 +15,23 @@ namespace Tango.BL.Entities { base.Delete(context); - context.ColorProcessFactor.Remove(this); + context.ColorProcessFactors.Remove(this); } + + #region value to enum conversion + + [NotMapped] + [JsonIgnore] + public FactorColors FactorColor + { + get { return (FactorColors)Color; } + set + { + Color = (int)value; + RaisePropertyChangedAuto(); + } + } + + #endregion } } diff --git a/Software/Visual_Studio/Tango.BL/Entities/ColorProcessFactorBase.cs b/Software/Visual_Studio/Tango.BL/Entities/ColorProcessFactorBase.cs index 5749784a5..d214bd7d2 100644 --- a/Software/Visual_Studio/Tango.BL/Entities/ColorProcessFactorBase.cs +++ b/Software/Visual_Studio/Tango.BL/Entities/ColorProcessFactorBase.cs @@ -23,11 +23,11 @@ using Tango.Core.CustomAttributes; namespace Tango.BL.Entities { - [Table("COLOR_PROCESS_FACTOR")] + [Table("COLOR_PROCESS_FACTORS")] public abstract class ColorProcessFactorBase : ObservableEntity { - public event EventHandler ColorNameChanged; + public event EventHandler ColorChanged; public event EventHandler InkNlCmChanged; @@ -67,28 +67,28 @@ namespace Tango.BL.Entities } } - protected String _colorname; + protected Int32 _color; /// - /// Gets or sets the colorprocessfactorbase color name. + /// Gets or sets the colorprocessfactorbase color. /// - [Column("COLOR_NAME")] + [Column("COLOR")] - public String ColorName + public Int32 Color { get { - return _colorname; + return _color; } set { - if (_colorname != value) + if (_color != value) { - _colorname = value; + _color = value; - OnColorNameChanged(value); + OnColorChanged(value); } } @@ -262,12 +262,12 @@ namespace Tango.BL.Entities } /// - /// Called when the ColorName has changed. + /// Called when the Color has changed. /// - protected virtual void OnColorNameChanged(String colorname) + protected virtual void OnColorChanged(Int32 color) { - ColorNameChanged?.Invoke(this, colorname); - RaisePropertyChanged(nameof(ColorName)); + ColorChanged?.Invoke(this, color); + RaisePropertyChanged(nameof(Color)); } /// diff --git a/Software/Visual_Studio/Tango.BL/Entities/ColorProcessParameterBase.cs b/Software/Visual_Studio/Tango.BL/Entities/ColorProcessParameterBase.cs index a5271b7da..8859e206c 100644 --- a/Software/Visual_Studio/Tango.BL/Entities/ColorProcessParameterBase.cs +++ b/Software/Visual_Studio/Tango.BL/Entities/ColorProcessParameterBase.cs @@ -35,7 +35,9 @@ namespace Tango.BL.Entities public event EventHandler> ColorProcessDataChanged; - public event EventHandler> ColorProcessFactorChanged; + public event EventHandler> ColorProcessFactorsChanged; + + public event EventHandler MachineChanged; public event EventHandler RmlsExtensionsChanged; @@ -65,6 +67,32 @@ namespace Tango.BL.Entities } } + protected String _machineguid; + + /// + /// Gets or sets the colorprocessparameterbase machine guid. + /// + + [Column("MACHINE_GUID")] + [ForeignKey("Machine")] + + public String MachineGuid + { + get + { + return _machineguid; + } + + set + { + if (_machineguid != value) + { + _machineguid = value; + + } + } + } + protected Double _whitepointl; /// @@ -171,26 +199,58 @@ namespace Tango.BL.Entities } } - protected SynchronizedObservableCollection _colorprocessfactor; + protected SynchronizedObservableCollection _colorprocessfactors; /// - /// Gets or sets the colorprocessparameterbase color process factor. + /// Gets or sets the colorprocessparameterbase color process factors. /// - public virtual SynchronizedObservableCollection ColorProcessFactor + public virtual SynchronizedObservableCollection ColorProcessFactors { get { - return _colorprocessfactor; + return _colorprocessfactors; } set { - if (_colorprocessfactor != value) + if (_colorprocessfactors != value) { - _colorprocessfactor = value; + _colorprocessfactors = value; - OnColorProcessFactorChanged(value); + OnColorProcessFactorsChanged(value); + + } + } + } + + protected Machine _machine; + + /// + /// Gets or sets the colorprocessparameterbase machine. + /// + + [XmlIgnore] + [JsonIgnore] + public virtual Machine Machine + { + get + { + return _machine; + } + + set + { + if (_machine != value) + { + _machine = value; + + if (Machine != null) + { + MachineGuid = Machine.Guid; + } + + OnMachineChanged(value); } } @@ -265,12 +325,21 @@ namespace Tango.BL.Entities } /// - /// Called when the ColorProcessFactor has changed. + /// Called when the ColorProcessFactors has changed. + /// + protected virtual void OnColorProcessFactorsChanged(SynchronizedObservableCollection colorprocessfactors) + { + ColorProcessFactorsChanged?.Invoke(this, colorprocessfactors); + RaisePropertyChanged(nameof(ColorProcessFactors)); + } + + /// + /// Called when the Machine has changed. /// - protected virtual void OnColorProcessFactorChanged(SynchronizedObservableCollection colorprocessfactor) + protected virtual void OnMachineChanged(Machine machine) { - ColorProcessFactorChanged?.Invoke(this, colorprocessfactor); - RaisePropertyChanged(nameof(ColorProcessFactor)); + MachineChanged?.Invoke(this, machine); + RaisePropertyChanged(nameof(Machine)); } /// @@ -290,7 +359,7 @@ namespace Tango.BL.Entities ColorProcessData = new SynchronizedObservableCollection(); - ColorProcessFactor = new SynchronizedObservableCollection(); + ColorProcessFactors = new SynchronizedObservableCollection(); } } diff --git a/Software/Visual_Studio/Tango.BL/Entities/MachineBase.cs b/Software/Visual_Studio/Tango.BL/Entities/MachineBase.cs index e527e17e6..f17f39c18 100644 --- a/Software/Visual_Studio/Tango.BL/Entities/MachineBase.cs +++ b/Software/Visual_Studio/Tango.BL/Entities/MachineBase.cs @@ -81,6 +81,8 @@ namespace Tango.BL.Entities public event EventHandler> CatsChanged; + public event EventHandler> ColorProcessParametersChanged; + public event EventHandler ConfigurationChanged; public event EventHandler> DataStoreItemsChanged; @@ -93,6 +95,8 @@ namespace Tango.BL.Entities public event EventHandler OrganizationChanged; + public event EventHandler> RmlExtensionTestResultsChanged; + public event EventHandler> SpoolsChanged; protected String _serialnumber; @@ -1025,6 +1029,31 @@ namespace Tango.BL.Entities } } + protected SynchronizedObservableCollection _colorprocessparameters; + + /// + /// Gets or sets the machinebase color process parameters. + /// + + public virtual SynchronizedObservableCollection ColorProcessParameters + { + get + { + return _colorprocessparameters; + } + + set + { + if (_colorprocessparameters != value) + { + _colorprocessparameters = value; + + OnColorProcessParametersChanged(value); + + } + } + } + protected Configuration _configuration; /// @@ -1196,6 +1225,31 @@ namespace Tango.BL.Entities } } + protected SynchronizedObservableCollection _rmlextensiontestresults; + + /// + /// Gets or sets the machinebase rml extension test results. + /// + + public virtual SynchronizedObservableCollection RmlExtensionTestResults + { + get + { + return _rmlextensiontestresults; + } + + set + { + if (_rmlextensiontestresults != value) + { + _rmlextensiontestresults = value; + + OnRmlExtensionTestResultsChanged(value); + + } + } + } + protected SynchronizedObservableCollection _spools; /// @@ -1464,6 +1518,15 @@ namespace Tango.BL.Entities RaisePropertyChanged(nameof(Cats)); } + /// + /// Called when the ColorProcessParameters has changed. + /// + protected virtual void OnColorProcessParametersChanged(SynchronizedObservableCollection colorprocessparameters) + { + ColorProcessParametersChanged?.Invoke(this, colorprocessparameters); + RaisePropertyChanged(nameof(ColorProcessParameters)); + } + /// /// Called when the Configuration has changed. /// @@ -1518,6 +1581,15 @@ namespace Tango.BL.Entities RaisePropertyChanged(nameof(Organization)); } + /// + /// Called when the RmlExtensionTestResults has changed. + /// + protected virtual void OnRmlExtensionTestResultsChanged(SynchronizedObservableCollection rmlextensiontestresults) + { + RmlExtensionTestResultsChanged?.Invoke(this, rmlextensiontestresults); + RaisePropertyChanged(nameof(RmlExtensionTestResults)); + } + /// /// Called when the Spools has changed. /// @@ -1535,12 +1607,16 @@ namespace Tango.BL.Entities Cats = new SynchronizedObservableCollection(); + ColorProcessParameters = new SynchronizedObservableCollection(); + DataStoreItems = new SynchronizedObservableCollection(); Jobs = new SynchronizedObservableCollection(); MachinesEvents = new SynchronizedObservableCollection(); + RmlExtensionTestResults = new SynchronizedObservableCollection(); + Spools = new SynchronizedObservableCollection(); } diff --git a/Software/Visual_Studio/Tango.BL/Entities/Rml.cs b/Software/Visual_Studio/Tango.BL/Entities/Rml.cs index 58b6749cf..9fbaa62b1 100644 --- a/Software/Visual_Studio/Tango.BL/Entities/Rml.cs +++ b/Software/Visual_Studio/Tango.BL/Entities/Rml.cs @@ -166,5 +166,94 @@ namespace Tango.BL.Entities return tension; } + + #region Dencity and Fiber Count + + /// + /// Called when the LinearMassDensityUnit has changed. + /// + protected override void OnLinearMassDensityUnitChanged(LinearMassDensityUnit linearmassdensityunit) + { + base.OnLinearMassDensityUnitChanged(linearmassdensityunit); + UpdateDencityCount(); + UpdateFiberCount(); + } + + /// + /// Called when the PliesPerFiber has changed. + /// + protected override void OnPliesPerFiberChanged(Int32 pliesperfiber) + { + base.OnPliesPerFiberChanged(pliesperfiber); + UpdateFiberCount(); + } + + private void UpdateDencityCount() + { + RaisePropertyChanged(nameof(DencityCount)); + } + + private void UpdateFiberCount() + { + RaisePropertyChanged(nameof(FiberCount)); + } + + [NotMapped] + [JsonIgnore] + public int DencityCount + { + get + { + if (LinearMassDensityUnit == null) + return 0; + if (LinearMassDensityUnit.Name== "Tex") + return Convert.ToInt32(FiberSize) * 9; + if (LinearMassDensityUnit.Name == "DTEX") + return (int)(Convert.ToInt32(FiberSize) * 0.9); + if (LinearMassDensityUnit.Name == "Ne") + return (int)(5315 / Convert.ToInt32(FiberSize)); + if (LinearMassDensityUnit.Name == "Nm") + return (int)(9000 / Convert.ToInt32(FiberSize)); + return 0; + } + } + + + [NotMapped] + [JsonIgnore] + public string FiberCount + { + get + { + if (DencityCount == 0) + return ""; + + double number =( double)PliesPerFiber / DencityCount; + if (number < 1.0 && number >= 0.3) + return "Micro"; + if (number < 2.4 && number >= 1.0) + return "Fine"; + if (number <= 7.0 && number >= 2.4) + return "Medium"; + if (number > 7.0) + return "Coarse"; + return ""; + } + } + + + [NotMapped] + [JsonIgnore] + public Plies RMLPlies + { + get { return (Plies)PliesPerThread; } + set + { + base.PliesPerThread = value.ToInt32(); + RaisePropertyChangedAuto(); + } + } + + #endregion } } diff --git a/Software/Visual_Studio/Tango.BL/Entities/RmlExtensionTestResult.cs b/Software/Visual_Studio/Tango.BL/Entities/RmlExtensionTestResult.cs new file mode 100644 index 000000000..97c37178b --- /dev/null +++ b/Software/Visual_Studio/Tango.BL/Entities/RmlExtensionTestResult.cs @@ -0,0 +1,16 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Tango.BL.Entities +{ + public class RmlExtensionTestResult : RmlExtensionTestResultBase + { + public RmlExtensionTestResult() + { + + } + } +} diff --git a/Software/Visual_Studio/Tango.BL/Entities/RmlExtensionTestResultBase.cs b/Software/Visual_Studio/Tango.BL/Entities/RmlExtensionTestResultBase.cs new file mode 100644 index 000000000..92f5ef311 --- /dev/null +++ b/Software/Visual_Studio/Tango.BL/Entities/RmlExtensionTestResultBase.cs @@ -0,0 +1,1392 @@ +//------------------------------------------------------------------------------ +// +// 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; +using System.ComponentModel; +using Tango.Core.CustomAttributes; + +namespace Tango.BL.Entities +{ + [Table("RML_EXTENSION_TEST_RESULTS")] + public abstract class RmlExtensionTestResultBase : ObservableEntity + { + + public event EventHandler ResultIndexChanged; + + public event EventHandler NameChanged; + + public event EventHandler> DryerTemperatureChanged; + + public event EventHandler> TunnelTemperatureChanged; + + public event EventHandler> TunnelFlowChanged; + + public event EventHandler> TunnelAvgTemperatureChanged; + + public event EventHandler> TensionHeadMinChanged; + + public event EventHandler> TensionHeadMaxChanged; + + public event EventHandler> TensionAfterDryerMinChanged; + + public event EventHandler> TensioinAfterDryerMaxChanged; + + public event EventHandler> TensionWinderMinChanged; + + public event EventHandler> TensionWinderMaxChanged; + + public event EventHandler> BtsrMinChanged; + + public event EventHandler> BtsrMaxChanged; + + public event EventHandler> PullerTensionMinChanged; + + public event EventHandler> PullerTensionMaxChanged; + + public event EventHandler> ExitTensionMinChanged; + + public event EventHandler> ExitTensionMaxChanged; + + public event EventHandler> SeverityZone1MinChanged; + + public event EventHandler> SeverityZone1MaxChanged; + + public event EventHandler> SeverityZone2MinChanged; + + public event EventHandler> SeverityZone2MaxChanged; + + public event EventHandler CommentChanged; + + public event EventHandler ConclusionsChanged; + + public event EventHandler RefLubVersionChanged; + + public event EventHandler> RefCofChanged; + + public event EventHandler> RefLubChanged; + + public event EventHandler ThreadLubVersionChanged; + + public event EventHandler> ThreadCofChanged; + + public event EventHandler> ThreadLubChanged; + + public event EventHandler MachineChanged; + + public event EventHandler RmlsExtensionsChanged; + + public event EventHandler> RubbingResultsChanged; + + public event EventHandler> TensileResultsChanged; + + protected String _rmlsextensionsguid; + + /// + /// Gets or sets the rmlextensiontestresultbase rmls extensions guid. + /// + + [Column("RMLS_EXTENSIONS_GUID")] + [ForeignKey("RmlsExtensions")] + + public String RmlsExtensionsGuid + { + get + { + return _rmlsextensionsguid; + } + + set + { + if (_rmlsextensionsguid != value) + { + _rmlsextensionsguid = value; + + } + } + } + + protected String _machineguid; + + /// + /// Gets or sets the rmlextensiontestresultbase machine guid. + /// + + [Column("MACHINE_GUID")] + [ForeignKey("Machine")] + + public String MachineGuid + { + get + { + return _machineguid; + } + + set + { + if (_machineguid != value) + { + _machineguid = value; + + } + } + } + + protected Int32 _resultindex; + + /// + /// Gets or sets the rmlextensiontestresultbase result index. + /// + + [Column("RESULT_INDEX")] + + public Int32 ResultIndex + { + get + { + return _resultindex; + } + + set + { + if (_resultindex != value) + { + _resultindex = value; + + OnResultIndexChanged(value); + + } + } + } + + protected String _name; + + /// + /// Gets or sets the rmlextensiontestresultbase name. + /// + + [Column("NAME")] + + public String Name + { + get + { + return _name; + } + + set + { + if (_name != value) + { + _name = value; + + OnNameChanged(value); + + } + } + } + + protected Nullable _dryertemperature; + + /// + /// Gets or sets the rmlextensiontestresultbase dryer temperature. + /// + + [Column("DRYER_TEMPERATURE")] + + public Nullable DryerTemperature + { + get + { + return _dryertemperature; + } + + set + { + if (_dryertemperature != value) + { + _dryertemperature = value; + + OnDryerTemperatureChanged(value); + + } + } + } + + protected Nullable _tunneltemperature; + + /// + /// Gets or sets the rmlextensiontestresultbase tunnel temperature. + /// + + [Column("TUNNEL_TEMPERATURE")] + + public Nullable TunnelTemperature + { + get + { + return _tunneltemperature; + } + + set + { + if (_tunneltemperature != value) + { + _tunneltemperature = value; + + OnTunnelTemperatureChanged(value); + + } + } + } + + protected Nullable _tunnelflow; + + /// + /// Gets or sets the rmlextensiontestresultbase tunnel flow. + /// + + [Column("TUNNEL_FLOW")] + + public Nullable TunnelFlow + { + get + { + return _tunnelflow; + } + + set + { + if (_tunnelflow != value) + { + _tunnelflow = value; + + OnTunnelFlowChanged(value); + + } + } + } + + protected Nullable _tunnelavgtemperature; + + /// + /// Gets or sets the rmlextensiontestresultbase tunnel avg temperature. + /// + + [Column("TUNNEL_AVG_TEMPERATURE")] + + public Nullable TunnelAvgTemperature + { + get + { + return _tunnelavgtemperature; + } + + set + { + if (_tunnelavgtemperature != value) + { + _tunnelavgtemperature = value; + + OnTunnelAvgTemperatureChanged(value); + + } + } + } + + protected Nullable _tensionheadmin; + + /// + /// Gets or sets the rmlextensiontestresultbase tension head min. + /// + + [Column("TENSION_HEAD_MIN")] + + public Nullable TensionHeadMin + { + get + { + return _tensionheadmin; + } + + set + { + if (_tensionheadmin != value) + { + _tensionheadmin = value; + + OnTensionHeadMinChanged(value); + + } + } + } + + protected Nullable _tensionheadmax; + + /// + /// Gets or sets the rmlextensiontestresultbase tension head max. + /// + + [Column("TENSION_HEAD_MAX")] + + public Nullable TensionHeadMax + { + get + { + return _tensionheadmax; + } + + set + { + if (_tensionheadmax != value) + { + _tensionheadmax = value; + + OnTensionHeadMaxChanged(value); + + } + } + } + + protected Nullable _tensionafterdryermin; + + /// + /// Gets or sets the rmlextensiontestresultbase tension after dryer min. + /// + + [Column("TENSION_AFTER_DRYER_MIN")] + + public Nullable TensionAfterDryerMin + { + get + { + return _tensionafterdryermin; + } + + set + { + if (_tensionafterdryermin != value) + { + _tensionafterdryermin = value; + + OnTensionAfterDryerMinChanged(value); + + } + } + } + + protected Nullable _tensioinafterdryermax; + + /// + /// Gets or sets the rmlextensiontestresultbase tensioin after dryer max. + /// + + [Column("TENSIOIN_AFTER_DRYER_MAX")] + + public Nullable TensioinAfterDryerMax + { + get + { + return _tensioinafterdryermax; + } + + set + { + if (_tensioinafterdryermax != value) + { + _tensioinafterdryermax = value; + + OnTensioinAfterDryerMaxChanged(value); + + } + } + } + + protected Nullable _tensionwindermin; + + /// + /// Gets or sets the rmlextensiontestresultbase tension winder min. + /// + + [Column("TENSION_WINDER_MIN")] + + public Nullable TensionWinderMin + { + get + { + return _tensionwindermin; + } + + set + { + if (_tensionwindermin != value) + { + _tensionwindermin = value; + + OnTensionWinderMinChanged(value); + + } + } + } + + protected Nullable _tensionwindermax; + + /// + /// Gets or sets the rmlextensiontestresultbase tension winder max. + /// + + [Column("TENSION_WINDER_MAX")] + + public Nullable TensionWinderMax + { + get + { + return _tensionwindermax; + } + + set + { + if (_tensionwindermax != value) + { + _tensionwindermax = value; + + OnTensionWinderMaxChanged(value); + + } + } + } + + protected Nullable _btsrmin; + + /// + /// Gets or sets the rmlextensiontestresultbase btsr min. + /// + + [Column("BTSR_MIN")] + + public Nullable BtsrMin + { + get + { + return _btsrmin; + } + + set + { + if (_btsrmin != value) + { + _btsrmin = value; + + OnBtsrMinChanged(value); + + } + } + } + + protected Nullable _btsrmax; + + /// + /// Gets or sets the rmlextensiontestresultbase btsr max. + /// + + [Column("BTSR_MAX")] + + public Nullable BtsrMax + { + get + { + return _btsrmax; + } + + set + { + if (_btsrmax != value) + { + _btsrmax = value; + + OnBtsrMaxChanged(value); + + } + } + } + + protected Nullable _pullertensionmin; + + /// + /// Gets or sets the rmlextensiontestresultbase puller tension min. + /// + + [Column("PULLER_TENSION_MIN")] + + public Nullable PullerTensionMin + { + get + { + return _pullertensionmin; + } + + set + { + if (_pullertensionmin != value) + { + _pullertensionmin = value; + + OnPullerTensionMinChanged(value); + + } + } + } + + protected Nullable _pullertensionmax; + + /// + /// Gets or sets the rmlextensiontestresultbase puller tension max. + /// + + [Column("PULLER_TENSION_MAX")] + + public Nullable PullerTensionMax + { + get + { + return _pullertensionmax; + } + + set + { + if (_pullertensionmax != value) + { + _pullertensionmax = value; + + OnPullerTensionMaxChanged(value); + + } + } + } + + protected Nullable _exittensionmin; + + /// + /// Gets or sets the rmlextensiontestresultbase exit tension min. + /// + + [Column("EXIT_TENSION_MIN")] + + public Nullable ExitTensionMin + { + get + { + return _exittensionmin; + } + + set + { + if (_exittensionmin != value) + { + _exittensionmin = value; + + OnExitTensionMinChanged(value); + + } + } + } + + protected Nullable _exittensionmax; + + /// + /// Gets or sets the rmlextensiontestresultbase exit tension max. + /// + + [Column("EXIT_TENSION_MAX")] + + public Nullable ExitTensionMax + { + get + { + return _exittensionmax; + } + + set + { + if (_exittensionmax != value) + { + _exittensionmax = value; + + OnExitTensionMaxChanged(value); + + } + } + } + + protected Nullable _severityzone1min; + + /// + /// Gets or sets the rmlextensiontestresultbase severity zone1 min. + /// + + [Column("SEVERITY_ZONE1_MIN")] + + public Nullable SeverityZone1Min + { + get + { + return _severityzone1min; + } + + set + { + if (_severityzone1min != value) + { + _severityzone1min = value; + + OnSeverityZone1MinChanged(value); + + } + } + } + + protected Nullable _severityzone1max; + + /// + /// Gets or sets the rmlextensiontestresultbase severity zone1 max. + /// + + [Column("SEVERITY_ZONE1_MAX")] + + public Nullable SeverityZone1Max + { + get + { + return _severityzone1max; + } + + set + { + if (_severityzone1max != value) + { + _severityzone1max = value; + + OnSeverityZone1MaxChanged(value); + + } + } + } + + protected Nullable _severityzone2min; + + /// + /// Gets or sets the rmlextensiontestresultbase severity zone2 min. + /// + + [Column("SEVERITY_ZONE2_MIN")] + + public Nullable SeverityZone2Min + { + get + { + return _severityzone2min; + } + + set + { + if (_severityzone2min != value) + { + _severityzone2min = value; + + OnSeverityZone2MinChanged(value); + + } + } + } + + protected Nullable _severityzone2max; + + /// + /// Gets or sets the rmlextensiontestresultbase severity zone2 max. + /// + + [Column("SEVERITY_ZONE2_MAX")] + + public Nullable SeverityZone2Max + { + get + { + return _severityzone2max; + } + + set + { + if (_severityzone2max != value) + { + _severityzone2max = value; + + OnSeverityZone2MaxChanged(value); + + } + } + } + + protected String _comment; + + /// + /// Gets or sets the rmlextensiontestresultbase comment. + /// + + [Column("COMMENT")] + + public String Comment + { + get + { + return _comment; + } + + set + { + if (_comment != value) + { + _comment = value; + + OnCommentChanged(value); + + } + } + } + + protected String _conclusions; + + /// + /// Gets or sets the rmlextensiontestresultbase conclusions. + /// + + [Column("CONCLUSIONS")] + + public String Conclusions + { + get + { + return _conclusions; + } + + set + { + if (_conclusions != value) + { + _conclusions = value; + + OnConclusionsChanged(value); + + } + } + } + + protected String _reflubversion; + + /// + /// Gets or sets the rmlextensiontestresultbase ref lub version. + /// + + [Column("REF_LUB_VERSION")] + + public String RefLubVersion + { + get + { + return _reflubversion; + } + + set + { + if (_reflubversion != value) + { + _reflubversion = value; + + OnRefLubVersionChanged(value); + + } + } + } + + protected Nullable _refcof; + + /// + /// Gets or sets the rmlextensiontestresultbase ref cof. + /// + + [Column("REF_COF")] + + public Nullable RefCof + { + get + { + return _refcof; + } + + set + { + if (_refcof != value) + { + _refcof = value; + + OnRefCofChanged(value); + + } + } + } + + protected Nullable _reflub; + + /// + /// Gets or sets the rmlextensiontestresultbase ref lub. + /// + + [Column("REF_LUB")] + + public Nullable RefLub + { + get + { + return _reflub; + } + + set + { + if (_reflub != value) + { + _reflub = value; + + OnRefLubChanged(value); + + } + } + } + + protected String _threadlubversion; + + /// + /// Gets or sets the rmlextensiontestresultbase thread lub version. + /// + + [Column("THREAD_LUB_VERSION")] + + public String ThreadLubVersion + { + get + { + return _threadlubversion; + } + + set + { + if (_threadlubversion != value) + { + _threadlubversion = value; + + OnThreadLubVersionChanged(value); + + } + } + } + + protected Nullable _threadcof; + + /// + /// Gets or sets the rmlextensiontestresultbase thread cof. + /// + + [Column("THREAD_COF")] + + public Nullable ThreadCof + { + get + { + return _threadcof; + } + + set + { + if (_threadcof != value) + { + _threadcof = value; + + OnThreadCofChanged(value); + + } + } + } + + protected Nullable _threadlub; + + /// + /// Gets or sets the rmlextensiontestresultbase thread lub. + /// + + [Column("THREAD_LUB")] + + public Nullable ThreadLub + { + get + { + return _threadlub; + } + + set + { + if (_threadlub != value) + { + _threadlub = value; + + OnThreadLubChanged(value); + + } + } + } + + protected Machine _machine; + + /// + /// Gets or sets the rmlextensiontestresultbase machine. + /// + + [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; + + /// + /// Gets or sets the rmlextensiontestresultbase rmls extensions. + /// + + [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 _rubbingresults; + + /// + /// Gets or sets the rmlextensiontestresultbase rubbing results. + /// + + public virtual SynchronizedObservableCollection RubbingResults + { + get + { + return _rubbingresults; + } + + set + { + if (_rubbingresults != value) + { + _rubbingresults = value; + + OnRubbingResultsChanged(value); + + } + } + } + + protected SynchronizedObservableCollection _tensileresults; + + /// + /// Gets or sets the rmlextensiontestresultbase tensile results. + /// + + public virtual SynchronizedObservableCollection TensileResults + { + get + { + return _tensileresults; + } + + set + { + if (_tensileresults != value) + { + _tensileresults = value; + + OnTensileResultsChanged(value); + + } + } + } + + /// + /// Called when the ResultIndex has changed. + /// + protected virtual void OnResultIndexChanged(Int32 resultindex) + { + ResultIndexChanged?.Invoke(this, resultindex); + RaisePropertyChanged(nameof(ResultIndex)); + } + + /// + /// Called when the Name has changed. + /// + protected virtual void OnNameChanged(String name) + { + NameChanged?.Invoke(this, name); + RaisePropertyChanged(nameof(Name)); + } + + /// + /// Called when the DryerTemperature has changed. + /// + protected virtual void OnDryerTemperatureChanged(Nullable dryertemperature) + { + DryerTemperatureChanged?.Invoke(this, dryertemperature); + RaisePropertyChanged(nameof(DryerTemperature)); + } + + /// + /// Called when the TunnelTemperature has changed. + /// + protected virtual void OnTunnelTemperatureChanged(Nullable tunneltemperature) + { + TunnelTemperatureChanged?.Invoke(this, tunneltemperature); + RaisePropertyChanged(nameof(TunnelTemperature)); + } + + /// + /// Called when the TunnelFlow has changed. + /// + protected virtual void OnTunnelFlowChanged(Nullable tunnelflow) + { + TunnelFlowChanged?.Invoke(this, tunnelflow); + RaisePropertyChanged(nameof(TunnelFlow)); + } + + /// + /// Called when the TunnelAvgTemperature has changed. + /// + protected virtual void OnTunnelAvgTemperatureChanged(Nullable tunnelavgtemperature) + { + TunnelAvgTemperatureChanged?.Invoke(this, tunnelavgtemperature); + RaisePropertyChanged(nameof(TunnelAvgTemperature)); + } + + /// + /// Called when the TensionHeadMin has changed. + /// + protected virtual void OnTensionHeadMinChanged(Nullable tensionheadmin) + { + TensionHeadMinChanged?.Invoke(this, tensionheadmin); + RaisePropertyChanged(nameof(TensionHeadMin)); + } + + /// + /// Called when the TensionHeadMax has changed. + /// + protected virtual void OnTensionHeadMaxChanged(Nullable tensionheadmax) + { + TensionHeadMaxChanged?.Invoke(this, tensionheadmax); + RaisePropertyChanged(nameof(TensionHeadMax)); + } + + /// + /// Called when the TensionAfterDryerMin has changed. + /// + protected virtual void OnTensionAfterDryerMinChanged(Nullable tensionafterdryermin) + { + TensionAfterDryerMinChanged?.Invoke(this, tensionafterdryermin); + RaisePropertyChanged(nameof(TensionAfterDryerMin)); + } + + /// + /// Called when the TensioinAfterDryerMax has changed. + /// + protected virtual void OnTensioinAfterDryerMaxChanged(Nullable tensioinafterdryermax) + { + TensioinAfterDryerMaxChanged?.Invoke(this, tensioinafterdryermax); + RaisePropertyChanged(nameof(TensioinAfterDryerMax)); + } + + /// + /// Called when the TensionWinderMin has changed. + /// + protected virtual void OnTensionWinderMinChanged(Nullable tensionwindermin) + { + TensionWinderMinChanged?.Invoke(this, tensionwindermin); + RaisePropertyChanged(nameof(TensionWinderMin)); + } + + /// + /// Called when the TensionWinderMax has changed. + /// + protected virtual void OnTensionWinderMaxChanged(Nullable tensionwindermax) + { + TensionWinderMaxChanged?.Invoke(this, tensionwindermax); + RaisePropertyChanged(nameof(TensionWinderMax)); + } + + /// + /// Called when the BtsrMin has changed. + /// + protected virtual void OnBtsrMinChanged(Nullable btsrmin) + { + BtsrMinChanged?.Invoke(this, btsrmin); + RaisePropertyChanged(nameof(BtsrMin)); + } + + /// + /// Called when the BtsrMax has changed. + /// + protected virtual void OnBtsrMaxChanged(Nullable btsrmax) + { + BtsrMaxChanged?.Invoke(this, btsrmax); + RaisePropertyChanged(nameof(BtsrMax)); + } + + /// + /// Called when the PullerTensionMin has changed. + /// + protected virtual void OnPullerTensionMinChanged(Nullable pullertensionmin) + { + PullerTensionMinChanged?.Invoke(this, pullertensionmin); + RaisePropertyChanged(nameof(PullerTensionMin)); + } + + /// + /// Called when the PullerTensionMax has changed. + /// + protected virtual void OnPullerTensionMaxChanged(Nullable pullertensionmax) + { + PullerTensionMaxChanged?.Invoke(this, pullertensionmax); + RaisePropertyChanged(nameof(PullerTensionMax)); + } + + /// + /// Called when the ExitTensionMin has changed. + /// + protected virtual void OnExitTensionMinChanged(Nullable exittensionmin) + { + ExitTensionMinChanged?.Invoke(this, exittensionmin); + RaisePropertyChanged(nameof(ExitTensionMin)); + } + + /// + /// Called when the ExitTensionMax has changed. + /// + protected virtual void OnExitTensionMaxChanged(Nullable exittensionmax) + { + ExitTensionMaxChanged?.Invoke(this, exittensionmax); + RaisePropertyChanged(nameof(ExitTensionMax)); + } + + /// + /// Called when the SeverityZone1Min has changed. + /// + protected virtual void OnSeverityZone1MinChanged(Nullable severityzone1min) + { + SeverityZone1MinChanged?.Invoke(this, severityzone1min); + RaisePropertyChanged(nameof(SeverityZone1Min)); + } + + /// + /// Called when the SeverityZone1Max has changed. + /// + protected virtual void OnSeverityZone1MaxChanged(Nullable severityzone1max) + { + SeverityZone1MaxChanged?.Invoke(this, severityzone1max); + RaisePropertyChanged(nameof(SeverityZone1Max)); + } + + /// + /// Called when the SeverityZone2Min has changed. + /// + protected virtual void OnSeverityZone2MinChanged(Nullable severityzone2min) + { + SeverityZone2MinChanged?.Invoke(this, severityzone2min); + RaisePropertyChanged(nameof(SeverityZone2Min)); + } + + /// + /// Called when the SeverityZone2Max has changed. + /// + protected virtual void OnSeverityZone2MaxChanged(Nullable severityzone2max) + { + SeverityZone2MaxChanged?.Invoke(this, severityzone2max); + RaisePropertyChanged(nameof(SeverityZone2Max)); + } + + /// + /// Called when the Comment has changed. + /// + protected virtual void OnCommentChanged(String comment) + { + CommentChanged?.Invoke(this, comment); + RaisePropertyChanged(nameof(Comment)); + } + + /// + /// Called when the Conclusions has changed. + /// + protected virtual void OnConclusionsChanged(String conclusions) + { + ConclusionsChanged?.Invoke(this, conclusions); + RaisePropertyChanged(nameof(Conclusions)); + } + + /// + /// Called when the RefLubVersion has changed. + /// + protected virtual void OnRefLubVersionChanged(String reflubversion) + { + RefLubVersionChanged?.Invoke(this, reflubversion); + RaisePropertyChanged(nameof(RefLubVersion)); + } + + /// + /// Called when the RefCof has changed. + /// + protected virtual void OnRefCofChanged(Nullable refcof) + { + RefCofChanged?.Invoke(this, refcof); + RaisePropertyChanged(nameof(RefCof)); + } + + /// + /// Called when the RefLub has changed. + /// + protected virtual void OnRefLubChanged(Nullable reflub) + { + RefLubChanged?.Invoke(this, reflub); + RaisePropertyChanged(nameof(RefLub)); + } + + /// + /// Called when the ThreadLubVersion has changed. + /// + protected virtual void OnThreadLubVersionChanged(String threadlubversion) + { + ThreadLubVersionChanged?.Invoke(this, threadlubversion); + RaisePropertyChanged(nameof(ThreadLubVersion)); + } + + /// + /// Called when the ThreadCof has changed. + /// + protected virtual void OnThreadCofChanged(Nullable threadcof) + { + ThreadCofChanged?.Invoke(this, threadcof); + RaisePropertyChanged(nameof(ThreadCof)); + } + + /// + /// Called when the ThreadLub has changed. + /// + protected virtual void OnThreadLubChanged(Nullable threadlub) + { + ThreadLubChanged?.Invoke(this, threadlub); + RaisePropertyChanged(nameof(ThreadLub)); + } + + /// + /// Called when the Machine has changed. + /// + protected virtual void OnMachineChanged(Machine machine) + { + MachineChanged?.Invoke(this, machine); + RaisePropertyChanged(nameof(Machine)); + } + + /// + /// Called when the RmlsExtensions has changed. + /// + protected virtual void OnRmlsExtensionsChanged(RmlsExtension rmlsextensions) + { + RmlsExtensionsChanged?.Invoke(this, rmlsextensions); + RaisePropertyChanged(nameof(RmlsExtensions)); + } + + /// + /// Called when the RubbingResults has changed. + /// + protected virtual void OnRubbingResultsChanged(SynchronizedObservableCollection rubbingresults) + { + RubbingResultsChanged?.Invoke(this, rubbingresults); + RaisePropertyChanged(nameof(RubbingResults)); + } + + /// + /// Called when the TensileResults has changed. + /// + protected virtual void OnTensileResultsChanged(SynchronizedObservableCollection tensileresults) + { + TensileResultsChanged?.Invoke(this, tensileresults); + RaisePropertyChanged(nameof(TensileResults)); + } + + /// + /// Initializes a new instance of the class. + /// + public RmlExtensionTestResultBase() : base() + { + + RubbingResults = new SynchronizedObservableCollection(); + + TensileResults = new SynchronizedObservableCollection(); + + } + } +} diff --git a/Software/Visual_Studio/Tango.BL/Entities/RmlsExtension.cs b/Software/Visual_Studio/Tango.BL/Entities/RmlsExtension.cs index 9436ab48e..94c4fb48b 100644 --- a/Software/Visual_Studio/Tango.BL/Entities/RmlsExtension.cs +++ b/Software/Visual_Studio/Tango.BL/Entities/RmlsExtension.cs @@ -15,139 +15,33 @@ namespace Tango.BL.Entities { public class RmlsExtension : RmlsExtensionBase { - #region Name - protected override void OnYarnMaterialChanged(YarnMaterial yarnmaterial) - { - base.OnYarnMaterialChanged(yarnmaterial); - RaisePropertyChanged(nameof(Name)); - } - - protected override void OnYarnBrandChanged(YarnBrand yarnbrand) - { - base.OnYarnBrandChanged(yarnbrand); - RaisePropertyChanged(nameof(Name)); - } - - - [NotMapped] - [JsonIgnore] - public string Name - { - get - { - if (YarnManufacturer == null) - return ""; - StringBuilder sb = new StringBuilder(YarnManufacturer.Name); - if (YarnBrand != null && !String.IsNullOrEmpty(YarnBrand.Name)) - sb.Append("-" + YarnBrand.Name); - sb.Append("-" + LinearDensity.ToString()); - return sb.ToString(); - } - - } - #endregion - - #region Density count and Fiber count - protected override void OnUnitChanged(int unit) - { - base.OnUnitChanged(unit); - UpdateDencityCount(); - UpdateFiberCount(); - } - - protected override void OnLinearDensityChanged(int lineardensity) - { - base.OnLinearDensityChanged(lineardensity); - UpdateDencityCount(); - UpdateFiberCount(); - RaisePropertyChanged(nameof(Name)); - } - - protected override void OnFilamentCountChanged(int filamentcount) - { - base.OnFilamentCountChanged(filamentcount); - UpdateFiberCount(); - } - - private void UpdateDencityCount() - { - RaisePropertyChanged(nameof(DencityCount)); - } - - private void UpdateFiberCount() - { - RaisePropertyChanged(nameof(FiberCount)); - } - - [NotMapped] - [JsonIgnore] - public int DencityCount - { - get - { - if (YarnUnit.ToDescription() == "Tex") - return Convert.ToInt32(LinearDensity) * 9; - if (YarnUnit.ToDescription() == "DTEX") - return (int)(Convert.ToInt32(LinearDensity) * 0.9); - if (YarnUnit.ToDescription() == "Ne") - return (int) (5315 / Convert.ToInt32(LinearDensity)); - if (YarnUnit.ToDescription() == "Nm") - return (int)(9000 / Convert.ToInt32(LinearDensity)); - return 0; - } - } - - [NotMapped] - [JsonIgnore] - public string FiberCount - { - get - { - if (DencityCount == 0) - return ""; - - var number = FilamentCount / DencityCount; - if (number < 1.0 && number >= 0.3) - return "Micro"; - if (number < 2.4 && number >= 1.0) - return "Fine"; - if (number <= 7.0 && number >= 2.4) - return "Medium"; - if ( number > 7.0) - return "Coarse"; - return ""; - } - } - #endregion - + #region value to enum conversion - [NotMapped] - [JsonIgnore] - public YarnUnits YarnUnit - { - get { return (YarnUnits)Unit; } - set { Unit = (int)value; - RaisePropertyChangedAuto(); } - } [NotMapped] [JsonIgnore] public TwistDirections YarnTwistDirections { get { return (TwistDirections)TwistDirection; } - set { base.TwistDirection = (int?)value; + set { + base.TwistDirection = value.ToInt32(); + RaisePropertyChangedAuto(); } } [NotMapped] [JsonIgnore] - public Plies YarnPlies + public RMLExtensionStatus RMLStatus { - get { return (Plies)Plies; } - set { base.Plies = (int)value; - RaisePropertyChangedAuto(); } + get { return (RMLExtensionStatus)Status; } + set + { + base.Status = value.ToInt32(); + RaisePropertyChangedAuto(); + } } + #endregion } diff --git a/Software/Visual_Studio/Tango.BL/Entities/RmlsExtensionBase.cs b/Software/Visual_Studio/Tango.BL/Entities/RmlsExtensionBase.cs index 54157c644..e772001bb 100644 --- a/Software/Visual_Studio/Tango.BL/Entities/RmlsExtensionBase.cs +++ b/Software/Visual_Studio/Tango.BL/Entities/RmlsExtensionBase.cs @@ -31,13 +31,7 @@ namespace Tango.BL.Entities public event EventHandler CountryChanged; - public event EventHandler LinearDensityChanged; - - public event EventHandler UnitChanged; - - public event EventHandler PliesChanged; - - public event EventHandler FilamentCountChanged; + public event EventHandler LinerarDensityChanged; public event EventHandler TwistTpmChanged; @@ -61,28 +55,20 @@ namespace Tango.BL.Entities public event EventHandler FinishingChanged; - public event EventHandler FileNameChanged; - - public event EventHandler DataChanged; + public event EventHandler StatusChanged; public event EventHandler> ColorProcessParametersChanged; - public event EventHandler RmlChanged; + public event EventHandler> RmlExtensionTestResultsChanged; - public event EventHandler UserChanged; + public event EventHandler RmlsChanged; - public event EventHandler YarnApplicationsChanged; + public event EventHandler YarnApplicationChanged; public event EventHandler YarnBrandChanged; - public event EventHandler YarnColorChanged; - - public event EventHandler YarnEndUseChanged; - public event EventHandler YarnFamilyChanged; - public event EventHandler YarnGeometryChanged; - public event EventHandler YarnGlossLevelChanged; public event EventHandler YarnGroupChanged; @@ -91,61 +77,60 @@ namespace Tango.BL.Entities public event EventHandler YarnManufacturerChanged; - public event EventHandler YarnMaterialChanged; - public event EventHandler YarnSubFamilyChanged; public event EventHandler YarnTexturingChanged; public event EventHandler YarnTypeChanged; - protected String _rmlguid; + public event EventHandler YarnWhiteShadeChanged; + + protected String _rmlsguid; /// - /// Gets or sets the rmlsextensionbase rml guid. + /// Gets or sets the rmlsextensionbase rmls guid. /// - [Column("RML_GUID")] - [ForeignKey("Rml")] + [Column("RMLS_GUID")] + [ForeignKey("Rmls")] - public String RmlGuid + public String RmlsGuid { get { - return _rmlguid; + return _rmlsguid; } set { - if (_rmlguid != value) + if (_rmlsguid != value) { - _rmlguid = value; + _rmlsguid = value; } } } - protected String _userguid; + protected String _usersguid; /// - /// Gets or sets the rmlsextensionbase user guid. + /// Gets or sets the rmlsextensionbase users guid. /// - [Column("USER_GUID")] - [ForeignKey("User")] + [Column("USERS_GUID")] - public String UserGuid + public String UsersGuid { get { - return _userguid; + return _usersguid; } set { - if (_userguid != value) + if (_usersguid != value) { - _userguid = value; + _usersguid = value; } } @@ -257,53 +242,27 @@ namespace Tango.BL.Entities } } - protected String _yarnenduseguid; + protected String _yarnapplicationguid; /// - /// Gets or sets the rmlsextensionbase yarn end use guid. + /// Gets or sets the rmlsextensionbase yarn application guid. /// - [Column("YARN_END_USE_GUID")] - [ForeignKey("YarnEndUse")] + [Column("YARN_APPLICATION_GUID")] + [ForeignKey("YarnApplication")] - public String YarnEndUseGuid + public String YarnApplicationGuid { get { - return _yarnenduseguid; + return _yarnapplicationguid; } set { - if (_yarnenduseguid != value) + if (_yarnapplicationguid != value) { - _yarnenduseguid = value; - - } - } - } - - protected String _yarnapplicationsguid; - - /// - /// Gets or sets the rmlsextensionbase yarn applications guid. - /// - - [Column("YARN_APPLICATIONS_GUID")] - [ForeignKey("YarnApplications")] - - public String YarnApplicationsGuid - { - get - { - return _yarnapplicationsguid; - } - - set - { - if (_yarnapplicationsguid != value) - { - _yarnapplicationsguid = value; + _yarnapplicationguid = value; } } @@ -335,32 +294,6 @@ namespace Tango.BL.Entities } } - protected String _yarnmaterialguid; - - /// - /// Gets or sets the rmlsextensionbase yarn material guid. - /// - - [Column("YARN_MATERIAL_GUID")] - [ForeignKey("YarnMaterial")] - - public String YarnMaterialGuid - { - get - { - return _yarnmaterialguid; - } - - set - { - if (_yarnmaterialguid != value) - { - _yarnmaterialguid = value; - - } - } - } - protected String _yarntypeguid; /// @@ -491,53 +424,27 @@ namespace Tango.BL.Entities } } - protected String _yarngeometryguid; - - /// - /// Gets or sets the rmlsextensionbase yarn geometry guid. - /// - - [Column("YARN_GEOMETRY_GUID")] - [ForeignKey("YarnGeometry")] - - public String YarnGeometryGuid - { - get - { - return _yarngeometryguid; - } - - set - { - if (_yarngeometryguid != value) - { - _yarngeometryguid = value; - - } - } - } - - protected String _yarncolorguid; + protected String _yarnwhiteshadeguid; /// - /// Gets or sets the rmlsextensionbase yarn color guid. + /// Gets or sets the rmlsextensionbase yarn white shade guid. /// - [Column("YARN_COLOR_GUID")] - [ForeignKey("YarnColor")] + [Column("YARN_WHITE_SHADE_GUID")] + [ForeignKey("YarnWhiteShade")] - public String YarnColorGuid + public String YarnWhiteShadeGuid { get { - return _yarncolorguid; + return _yarnwhiteshadeguid; } set { - if (_yarncolorguid != value) + if (_yarnwhiteshadeguid != value) { - _yarncolorguid = value; + _yarnwhiteshadeguid = value; } } @@ -569,109 +476,28 @@ namespace Tango.BL.Entities } } - protected Int32 _lineardensity; - - /// - /// Gets or sets the rmlsextensionbase linear density. - /// - - [Column("LINEAR_DENSITY")] - - public Int32 LinearDensity - { - get - { - return _lineardensity; - } - - set - { - if (_lineardensity != value) - { - _lineardensity = value; - - OnLinearDensityChanged(value); - - } - } - } - - protected Int32 _unit; + protected Int32 _linerardensity; /// - /// Gets or sets the rmlsextensionbase unit. + /// Gets or sets the rmlsextensionbase linerar density. /// - [Column("UNIT")] + [Column("LINERAR_DENSITY")] - public Int32 Unit + public Int32 LinerarDensity { get { - return _unit; + return _linerardensity; } set { - if (_unit != value) + if (_linerardensity != value) { - _unit = value; + _linerardensity = value; - OnUnitChanged(value); - - } - } - } - - protected Int32 _plies; - - /// - /// Gets or sets the rmlsextensionbase plies. - /// - - [Column("PLIES")] - - public Int32 Plies - { - get - { - return _plies; - } - - set - { - if (_plies != value) - { - _plies = value; - - OnPliesChanged(value); - - } - } - } - - protected Int32 _filamentcount; - - /// - /// Gets or sets the rmlsextensionbase filament count. - /// - - [Column("FILAMENT_COUNT")] - - public Int32 FilamentCount - { - get - { - return _filamentcount; - } - - set - { - if (_filamentcount != value) - { - _filamentcount = value; - - OnFilamentCountChanged(value); + OnLinerarDensityChanged(value); } } @@ -974,55 +800,28 @@ namespace Tango.BL.Entities } } - protected String _filename; - - /// - /// Gets or sets the rmlsextensionbase file name. - /// - - [Column("FILE_NAME")] - - public String FileName - { - get - { - return _filename; - } - - set - { - if (_filename != value) - { - _filename = value; - - OnFileNameChanged(value); - - } - } - } - - protected Byte[] _data; + protected Int32 _status; /// - /// Gets or sets the rmlsextensionbase data. + /// Gets or sets the rmlsextensionbase status. /// - [Column("DATA")] + [Column("STATUS")] - public Byte[] Data + public Int32 Status { get { - return _data; + return _status; } set { - if (_data != value) + if (_status != value) { - _data = value; + _status = value; - OnDataChanged(value); + OnStatusChanged(value); } } @@ -1053,71 +852,64 @@ namespace Tango.BL.Entities } } - protected Rml _rml; + protected SynchronizedObservableCollection _rmlextensiontestresults; /// - /// Gets or sets the rmlsextensionbase rml. + /// Gets or sets the rmlsextensionbase rml extension test results. /// - [XmlIgnore] - [JsonIgnore] - public virtual Rml Rml + public virtual SynchronizedObservableCollection RmlExtensionTestResults { get { - return _rml; + return _rmlextensiontestresults; } set { - if (_rml != value) + if (_rmlextensiontestresults != value) { - _rml = value; - - if (Rml != null) - { - RmlGuid = Rml.Guid; - } + _rmlextensiontestresults = value; - OnRmlChanged(value); + OnRmlExtensionTestResultsChanged(value); } } } - protected User _user; + protected Rml _rmls; /// - /// Gets or sets the rmlsextensionbase user. + /// Gets or sets the rmlsextensionbase rml. /// [XmlIgnore] [JsonIgnore] - public virtual User User + public virtual Rml Rmls { get { - return _user; + return _rmls; } set { - if (_user != value) + if (_rmls != value) { - _user = value; + _rmls = value; - if (User != null) + if (Rmls != null) { - UserGuid = User.Guid; + RmlsGuid = Rmls.Guid; } - OnUserChanged(value); + OnRmlsChanged(value); } } } - protected YarnApplication _yarnapplications; + protected YarnApplication _yarnapplication; /// /// Gets or sets the rmlsextensionbase yarn applications. @@ -1125,25 +917,25 @@ namespace Tango.BL.Entities [XmlIgnore] [JsonIgnore] - public virtual YarnApplication YarnApplications + public virtual YarnApplication YarnApplication { get { - return _yarnapplications; + return _yarnapplication; } set { - if (_yarnapplications != value) + if (_yarnapplication != value) { - _yarnapplications = value; + _yarnapplication = value; - if (YarnApplications != null) + if (YarnApplication != null) { - YarnApplicationsGuid = YarnApplications.Guid; + YarnApplicationGuid = YarnApplication.Guid; } - OnYarnApplicationsChanged(value); + OnYarnApplicationChanged(value); } } @@ -1152,7 +944,7 @@ namespace Tango.BL.Entities protected YarnBrand _yarnbrand; /// - /// Gets or sets the rmlsextensionbase yarn brand. + /// Gets or sets the rmlsextensionbase yarn brands. /// [XmlIgnore] @@ -1181,74 +973,10 @@ namespace Tango.BL.Entities } } - protected YarnColor _yarncolor; - - /// - /// Gets or sets the rmlsextensionbase yarn color. - /// - - [XmlIgnore] - [JsonIgnore] - public virtual YarnColor YarnColor - { - get - { - return _yarncolor; - } - - set - { - if (_yarncolor != value) - { - _yarncolor = value; - - if (YarnColor != null) - { - YarnColorGuid = YarnColor.Guid; - } - - OnYarnColorChanged(value); - - } - } - } - - protected YarnEndUse _yarnenduse; - - /// - /// Gets or sets the rmlsextensionbase yarn end use. - /// - - [XmlIgnore] - [JsonIgnore] - public virtual YarnEndUse YarnEndUse - { - get - { - return _yarnenduse; - } - - set - { - if (_yarnenduse != value) - { - _yarnenduse = value; - - if (YarnEndUse != null) - { - YarnEndUseGuid = YarnEndUse.Guid; - } - - OnYarnEndUseChanged(value); - - } - } - } - protected YarnFamily _yarnfamily; /// - /// Gets or sets the rmlsextensionbase yarn family. + /// Gets or sets the rmlsextensionbase yarn families. /// [XmlIgnore] @@ -1277,42 +1005,10 @@ namespace Tango.BL.Entities } } - protected YarnGeometry _yarngeometry; - - /// - /// Gets or sets the rmlsextensionbase yarn geometry. - /// - - [XmlIgnore] - [JsonIgnore] - public virtual YarnGeometry YarnGeometry - { - get - { - return _yarngeometry; - } - - set - { - if (_yarngeometry != value) - { - _yarngeometry = value; - - if (YarnGeometry != null) - { - YarnGeometryGuid = YarnGeometry.Guid; - } - - OnYarnGeometryChanged(value); - - } - } - } - protected YarnGlossLevel _yarnglosslevel; /// - /// Gets or sets the rmlsextensionbase yarn gloss level. + /// Gets or sets the rmlsextensionbase yarn gloss levels. /// [XmlIgnore] @@ -1344,7 +1040,7 @@ namespace Tango.BL.Entities protected YarnGroup _yarngroup; /// - /// Gets or sets the rmlsextensionbase yarn group. + /// Gets or sets the rmlsextensionbase yarn groups. /// [XmlIgnore] @@ -1376,7 +1072,7 @@ namespace Tango.BL.Entities protected YarnIndustrysector _yarnindustrysector; /// - /// Gets or sets the rmlsextensionbase yarn industrysector. + /// Gets or sets the rmlsextensionbase yarn industrysectors. /// [XmlIgnore] @@ -1408,7 +1104,7 @@ namespace Tango.BL.Entities protected YarnManufacturer _yarnmanufacturer; /// - /// Gets or sets the rmlsextensionbase yarn manufacturer. + /// Gets or sets the rmlsextensionbase yarn manufacturers. /// [XmlIgnore] @@ -1437,42 +1133,10 @@ namespace Tango.BL.Entities } } - protected YarnMaterial _yarnmaterial; - - /// - /// Gets or sets the rmlsextensionbase yarn materials. - /// - - [XmlIgnore] - [JsonIgnore] - public virtual YarnMaterial YarnMaterial - { - get - { - return _yarnmaterial; - } - - set - { - if (_yarnmaterial != value) - { - _yarnmaterial = value; - - if (YarnMaterial != null) - { - YarnMaterialGuid = YarnMaterial.Guid; - } - - OnYarnMaterialChanged(value); - - } - } - } - protected YarnSubFamily _yarnsubfamily; /// - /// Gets or sets the rmlsextensionbase yarn sub family. + /// Gets or sets the rmlsextensionbase yarn sub families. /// [XmlIgnore] @@ -1504,7 +1168,7 @@ namespace Tango.BL.Entities protected YarnTexturing _yarntexturing; /// - /// Gets or sets the rmlsextensionbase yarn texturing. + /// Gets or sets the rmlsextensionbase yarn texturings. /// [XmlIgnore] @@ -1536,7 +1200,7 @@ namespace Tango.BL.Entities protected YarnType _yarntype; /// - /// Gets or sets the rmlsextensionbase yarn type. + /// Gets or sets the rmlsextensionbase yarn types. /// [XmlIgnore] @@ -1565,6 +1229,38 @@ namespace Tango.BL.Entities } } + protected YarnWhiteShade _yarnwhiteshade; + + /// + /// Gets or sets the rmlsextensionbase yarn white shades. + /// + + [XmlIgnore] + [JsonIgnore] + public virtual YarnWhiteShade YarnWhiteShade + { + get + { + return _yarnwhiteshade; + } + + set + { + if (_yarnwhiteshade != value) + { + _yarnwhiteshade = value; + + if (YarnWhiteShade != null) + { + YarnWhiteShadeGuid = YarnWhiteShade.Guid; + } + + OnYarnWhiteShadeChanged(value); + + } + } + } + /// /// Called when the Created has changed. /// @@ -1584,39 +1280,12 @@ namespace Tango.BL.Entities } /// - /// Called when the LinearDensity has changed. - /// - protected virtual void OnLinearDensityChanged(Int32 lineardensity) - { - LinearDensityChanged?.Invoke(this, lineardensity); - RaisePropertyChanged(nameof(LinearDensity)); - } - - /// - /// Called when the Unit has changed. - /// - protected virtual void OnUnitChanged(Int32 unit) - { - UnitChanged?.Invoke(this, unit); - RaisePropertyChanged(nameof(Unit)); - } - - /// - /// Called when the Plies has changed. - /// - protected virtual void OnPliesChanged(Int32 plies) - { - PliesChanged?.Invoke(this, plies); - RaisePropertyChanged(nameof(Plies)); - } - - /// - /// Called when the FilamentCount has changed. + /// Called when the LinerarDensity has changed. /// - protected virtual void OnFilamentCountChanged(Int32 filamentcount) + protected virtual void OnLinerarDensityChanged(Int32 linerardensity) { - FilamentCountChanged?.Invoke(this, filamentcount); - RaisePropertyChanged(nameof(FilamentCount)); + LinerarDensityChanged?.Invoke(this, linerardensity); + RaisePropertyChanged(nameof(LinerarDensity)); } /// @@ -1719,21 +1388,12 @@ namespace Tango.BL.Entities } /// - /// Called when the FileName has changed. + /// Called when the Status has changed. /// - protected virtual void OnFileNameChanged(String filename) + protected virtual void OnStatusChanged(Int32 status) { - FileNameChanged?.Invoke(this, filename); - RaisePropertyChanged(nameof(FileName)); - } - - /// - /// Called when the Data has changed. - /// - protected virtual void OnDataChanged(Byte[] data) - { - DataChanged?.Invoke(this, data); - RaisePropertyChanged(nameof(Data)); + StatusChanged?.Invoke(this, status); + RaisePropertyChanged(nameof(Status)); } /// @@ -1746,30 +1406,30 @@ namespace Tango.BL.Entities } /// - /// Called when the Rml has changed. + /// Called when the RmlExtensionTestResults has changed. /// - protected virtual void OnRmlChanged(Rml rml) + protected virtual void OnRmlExtensionTestResultsChanged(SynchronizedObservableCollection rmlextensiontestresults) { - RmlChanged?.Invoke(this, rml); - RaisePropertyChanged(nameof(Rml)); + RmlExtensionTestResultsChanged?.Invoke(this, rmlextensiontestresults); + RaisePropertyChanged(nameof(RmlExtensionTestResults)); } /// - /// Called when the User has changed. + /// Called when the Rmls has changed. /// - protected virtual void OnUserChanged(User user) + protected virtual void OnRmlsChanged(Rml rmls) { - UserChanged?.Invoke(this, user); - RaisePropertyChanged(nameof(User)); + RmlsChanged?.Invoke(this, rmls); + RaisePropertyChanged(nameof(Rmls)); } /// - /// Called when the YarnApplications has changed. + /// Called when the YarnApplication has changed. /// - protected virtual void OnYarnApplicationsChanged(YarnApplication yarnapplications) + protected virtual void OnYarnApplicationChanged(YarnApplication yarnapplication) { - YarnApplicationsChanged?.Invoke(this, yarnapplications); - RaisePropertyChanged(nameof(YarnApplications)); + YarnApplicationChanged?.Invoke(this, yarnapplication); + RaisePropertyChanged(nameof(YarnApplication)); } /// @@ -1781,24 +1441,6 @@ namespace Tango.BL.Entities RaisePropertyChanged(nameof(YarnBrand)); } - /// - /// Called when the YarnColor has changed. - /// - protected virtual void OnYarnColorChanged(YarnColor yarncolor) - { - YarnColorChanged?.Invoke(this, yarncolor); - RaisePropertyChanged(nameof(YarnColor)); - } - - /// - /// Called when the YarnEndUse has changed. - /// - protected virtual void OnYarnEndUseChanged(YarnEndUse yarnenduse) - { - YarnEndUseChanged?.Invoke(this, yarnenduse); - RaisePropertyChanged(nameof(YarnEndUse)); - } - /// /// Called when the YarnFamily has changed. /// @@ -1808,15 +1450,6 @@ namespace Tango.BL.Entities RaisePropertyChanged(nameof(YarnFamily)); } - /// - /// Called when the YarnGeometry has changed. - /// - protected virtual void OnYarnGeometryChanged(YarnGeometry yarngeometry) - { - YarnGeometryChanged?.Invoke(this, yarngeometry); - RaisePropertyChanged(nameof(YarnGeometry)); - } - /// /// Called when the YarnGlossLevel has changed. /// @@ -1853,15 +1486,6 @@ namespace Tango.BL.Entities RaisePropertyChanged(nameof(YarnManufacturer)); } - /// - /// Called when the YarnMaterial has changed. - /// - protected virtual void OnYarnMaterialChanged(YarnMaterial yarnmaterial) - { - YarnMaterialChanged?.Invoke(this, yarnmaterial); - RaisePropertyChanged(nameof(YarnMaterial)); - } - /// /// Called when the YarnSubFamily has changed. /// @@ -1889,6 +1513,15 @@ namespace Tango.BL.Entities RaisePropertyChanged(nameof(YarnType)); } + /// + /// Called when the YarnWhiteShade has changed. + /// + protected virtual void OnYarnWhiteShadeChanged(YarnWhiteShade yarnwhiteshade) + { + YarnWhiteShadeChanged?.Invoke(this, yarnwhiteshade); + RaisePropertyChanged(nameof(YarnWhiteShade)); + } + /// /// Initializes a new instance of the class. /// @@ -1897,6 +1530,8 @@ namespace Tango.BL.Entities ColorProcessParameters = new SynchronizedObservableCollection(); + RmlExtensionTestResults = new SynchronizedObservableCollection(); + } } } diff --git a/Software/Visual_Studio/Tango.BL/Entities/RubbingResult.cs b/Software/Visual_Studio/Tango.BL/Entities/RubbingResult.cs new file mode 100644 index 000000000..10036f19a --- /dev/null +++ b/Software/Visual_Studio/Tango.BL/Entities/RubbingResult.cs @@ -0,0 +1,40 @@ +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 Tango.BL.Enumerations; + +namespace Tango.BL.Entities +{ + public class RubbingResult: RubbingResultBase + { + public RubbingResult(): base() + { + DeltaeCie100 = 0.0; + Gs100Min = 0; + Gs100Max = 0; + DeltaeCie200 = 0.0; + Gs200Min = 0; + Gs200Max = 0; + } + + #region value to enum conversion + + [NotMapped] + [JsonIgnore] + public TestResultColors TestResultColor + { + get { return (TestResultColors)Color; } + set + { + Color = (int)value; + RaisePropertyChangedAuto(); + } + } + #endregion + + } +} diff --git a/Software/Visual_Studio/Tango.BL/Entities/RubbingResultBase.cs b/Software/Visual_Studio/Tango.BL/Entities/RubbingResultBase.cs new file mode 100644 index 000000000..c19d8b7a8 --- /dev/null +++ b/Software/Visual_Studio/Tango.BL/Entities/RubbingResultBase.cs @@ -0,0 +1,372 @@ +//------------------------------------------------------------------------------ +// +// 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; +using System.ComponentModel; +using Tango.Core.CustomAttributes; + +namespace Tango.BL.Entities +{ + [Table("RUBBING_RESULTS")] + public abstract class RubbingResultBase : ObservableEntity + { + + public event EventHandler> ColorChanged; + + public event EventHandler> DeltaeCie100Changed; + + public event EventHandler> Gs100MinChanged; + + public event EventHandler> Gs100MaxChanged; + + public event EventHandler> DeltaeCie200Changed; + + public event EventHandler> Gs200MinChanged; + + public event EventHandler> Gs200MaxChanged; + + public event EventHandler RmlExtensionTestResultsChanged; + + protected String _rmlextensiontestresultsguid; + + /// + /// Gets or sets the rubbingresultbase rml extension test results guid. + /// + + [Column("RML_EXTENSION_TEST_RESULTS_GUID")] + [ForeignKey("RmlExtensionTestResults")] + + public String RmlExtensionTestResultsGuid + { + get + { + return _rmlextensiontestresultsguid; + } + + set + { + if (_rmlextensiontestresultsguid != value) + { + _rmlextensiontestresultsguid = value; + + } + } + } + + protected Nullable _color; + + /// + /// Gets or sets the rubbingresultbase color. + /// + + [Column("COLOR")] + + public Nullable Color + { + get + { + return _color; + } + + set + { + if (_color != value) + { + _color = value; + + OnColorChanged(value); + + } + } + } + + protected Nullable _deltaecie100; + + /// + /// Gets or sets the rubbingresultbase deltae cie 100. + /// + + [Column("DELTAE_CIE_100")] + + public Nullable DeltaeCie100 + { + get + { + return _deltaecie100; + } + + set + { + if (_deltaecie100 != value) + { + _deltaecie100 = value; + + OnDeltaeCie100Changed(value); + + } + } + } + + protected Nullable _gs100min; + + /// + /// Gets or sets the rubbingresultbase gs 100 min. + /// + + [Column("GS_100_MIN")] + + public Nullable Gs100Min + { + get + { + return _gs100min; + } + + set + { + if (_gs100min != value) + { + _gs100min = value; + + OnGs100MinChanged(value); + + } + } + } + + protected Nullable _gs100max; + + /// + /// Gets or sets the rubbingresultbase gs 100 max. + /// + + [Column("GS_100_MAX")] + + public Nullable Gs100Max + { + get + { + return _gs100max; + } + + set + { + if (_gs100max != value) + { + _gs100max = value; + + OnGs100MaxChanged(value); + + } + } + } + + protected Nullable _deltaecie200; + + /// + /// Gets or sets the rubbingresultbase deltae cie 200. + /// + + [Column("DELTAE_CIE_200")] + + public Nullable DeltaeCie200 + { + get + { + return _deltaecie200; + } + + set + { + if (_deltaecie200 != value) + { + _deltaecie200 = value; + + OnDeltaeCie200Changed(value); + + } + } + } + + protected Nullable _gs200min; + + /// + /// Gets or sets the rubbingresultbase gs 200 min. + /// + + [Column("GS_200_MIN")] + + public Nullable Gs200Min + { + get + { + return _gs200min; + } + + set + { + if (_gs200min != value) + { + _gs200min = value; + + OnGs200MinChanged(value); + + } + } + } + + protected Nullable _gs200max; + + /// + /// Gets or sets the rubbingresultbase gs 200 max. + /// + + [Column("GS_200_MAX")] + + public Nullable Gs200Max + { + get + { + return _gs200max; + } + + set + { + if (_gs200max != value) + { + _gs200max = value; + + OnGs200MaxChanged(value); + + } + } + } + + protected RmlExtensionTestResult _rmlextensiontestresults; + + /// + /// Gets or sets the rubbingresultbase rml extension test results. + /// + + [XmlIgnore] + [JsonIgnore] + public virtual RmlExtensionTestResult RmlExtensionTestResults + { + get + { + return _rmlextensiontestresults; + } + + set + { + if (_rmlextensiontestresults != value) + { + _rmlextensiontestresults = value; + + if (RmlExtensionTestResults != null) + { + RmlExtensionTestResultsGuid = RmlExtensionTestResults.Guid; + } + + OnRmlExtensionTestResultsChanged(value); + + } + } + } + + /// + /// Called when the Color has changed. + /// + protected virtual void OnColorChanged(Nullable color) + { + ColorChanged?.Invoke(this, color); + RaisePropertyChanged(nameof(Color)); + } + + /// + /// Called when the DeltaeCie100 has changed. + /// + protected virtual void OnDeltaeCie100Changed(Nullable deltaecie100) + { + DeltaeCie100Changed?.Invoke(this, deltaecie100); + RaisePropertyChanged(nameof(DeltaeCie100)); + } + + /// + /// Called when the Gs100Min has changed. + /// + protected virtual void OnGs100MinChanged(Nullable gs100min) + { + Gs100MinChanged?.Invoke(this, gs100min); + RaisePropertyChanged(nameof(Gs100Min)); + } + + /// + /// Called when the Gs100Max has changed. + /// + protected virtual void OnGs100MaxChanged(Nullable gs100max) + { + Gs100MaxChanged?.Invoke(this, gs100max); + RaisePropertyChanged(nameof(Gs100Max)); + } + + /// + /// Called when the DeltaeCie200 has changed. + /// + protected virtual void OnDeltaeCie200Changed(Nullable deltaecie200) + { + DeltaeCie200Changed?.Invoke(this, deltaecie200); + RaisePropertyChanged(nameof(DeltaeCie200)); + } + + /// + /// Called when the Gs200Min has changed. + /// + protected virtual void OnGs200MinChanged(Nullable gs200min) + { + Gs200MinChanged?.Invoke(this, gs200min); + RaisePropertyChanged(nameof(Gs200Min)); + } + + /// + /// Called when the Gs200Max has changed. + /// + protected virtual void OnGs200MaxChanged(Nullable gs200max) + { + Gs200MaxChanged?.Invoke(this, gs200max); + RaisePropertyChanged(nameof(Gs200Max)); + } + + /// + /// Called when the RmlExtensionTestResults has changed. + /// + protected virtual void OnRmlExtensionTestResultsChanged(RmlExtensionTestResult rmlextensiontestresults) + { + RmlExtensionTestResultsChanged?.Invoke(this, rmlextensiontestresults); + RaisePropertyChanged(nameof(RmlExtensionTestResults)); + } + + /// + /// Initializes a new instance of the class. + /// + public RubbingResultBase() : base() + { + } + } +} diff --git a/Software/Visual_Studio/Tango.BL/Entities/TensileResult.cs b/Software/Visual_Studio/Tango.BL/Entities/TensileResult.cs new file mode 100644 index 000000000..ca16e4a9c --- /dev/null +++ b/Software/Visual_Studio/Tango.BL/Entities/TensileResult.cs @@ -0,0 +1,40 @@ +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 Tango.BL.Enumerations; + +namespace Tango.BL.Entities +{ + public class TensileResult: TensileResultBase + { + public TensileResult() + { + MaxLoad = 0.0; + StdevMaxLoad = 0.0; + StrainMaxLoad = 0.0; + StdevStrainMaxLoad = 0.0; + PercentChangeStrain = 0.0; + PercentChangeLoad = 0.0; + } + + #region value to enum conversion + + [NotMapped] + [JsonIgnore] + public TestResultColors TestResultColor + { + get { return (TestResultColors)Color; } + set + { + Color = (int)value; + RaisePropertyChangedAuto(); + } + } + + #endregion + } +} diff --git a/Software/Visual_Studio/Tango.BL/Entities/TensileResultBase.cs b/Software/Visual_Studio/Tango.BL/Entities/TensileResultBase.cs new file mode 100644 index 000000000..8454b6e93 --- /dev/null +++ b/Software/Visual_Studio/Tango.BL/Entities/TensileResultBase.cs @@ -0,0 +1,410 @@ +//------------------------------------------------------------------------------ +// +// 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; +using System.ComponentModel; +using Tango.Core.CustomAttributes; + +namespace Tango.BL.Entities +{ + [Table("TENSILE_RESULTS")] + public abstract class TensileResultBase : ObservableEntity + { + + public event EventHandler> ColorPercentChanged; + + public event EventHandler> ColorChanged; + + public event EventHandler> MaxLoadChanged; + + public event EventHandler> StdevMaxLoadChanged; + + public event EventHandler> StrainMaxLoadChanged; + + public event EventHandler> StdevStrainMaxLoadChanged; + + public event EventHandler> PercentChangeLoadChanged; + + public event EventHandler> PercentChangeStrainChanged; + + public event EventHandler RmlExtensionTestResultsChanged; + + protected String _rmlextensiontestresultsguid; + + /// + /// Gets or sets the tensileresultbase rml extension test results guid. + /// + + [Column("RML_EXTENSION_TEST_RESULTS_GUID")] + [ForeignKey("RmlExtensionTestResults")] + + public String RmlExtensionTestResultsGuid + { + get + { + return _rmlextensiontestresultsguid; + } + + set + { + if (_rmlextensiontestresultsguid != value) + { + _rmlextensiontestresultsguid = value; + + } + } + } + + protected Nullable _colorpercent; + + /// + /// Gets or sets the tensileresultbase color percent. + /// + + [Column("COLOR_PERCENT")] + + public Nullable ColorPercent + { + get + { + return _colorpercent; + } + + set + { + if (_colorpercent != value) + { + _colorpercent = value; + + OnColorPercentChanged(value); + + } + } + } + + protected Nullable _color; + + /// + /// Gets or sets the tensileresultbase color. + /// + + [Column("COLOR")] + + public Nullable Color + { + get + { + return _color; + } + + set + { + if (_color != value) + { + _color = value; + + OnColorChanged(value); + + } + } + } + + protected Nullable _maxload; + + /// + /// Gets or sets the tensileresultbase max load. + /// + + [Column("MAX_LOAD")] + + public Nullable MaxLoad + { + get + { + return _maxload; + } + + set + { + if (_maxload != value) + { + _maxload = value; + + OnMaxLoadChanged(value); + + } + } + } + + protected Nullable _stdevmaxload; + + /// + /// Gets or sets the tensileresultbase stdev max load. + /// + + [Column("STDEV_MAX_LOAD")] + + public Nullable StdevMaxLoad + { + get + { + return _stdevmaxload; + } + + set + { + if (_stdevmaxload != value) + { + _stdevmaxload = value; + + OnStdevMaxLoadChanged(value); + + } + } + } + + protected Nullable _strainmaxload; + + /// + /// Gets or sets the tensileresultbase strain max load. + /// + + [Column("STRAIN_MAX_LOAD")] + + public Nullable StrainMaxLoad + { + get + { + return _strainmaxload; + } + + set + { + if (_strainmaxload != value) + { + _strainmaxload = value; + + OnStrainMaxLoadChanged(value); + + } + } + } + + protected Nullable _stdevstrainmaxload; + + /// + /// Gets or sets the tensileresultbase stdev strain max load. + /// + + [Column("STDEV_STRAIN_MAX_LOAD")] + + public Nullable StdevStrainMaxLoad + { + get + { + return _stdevstrainmaxload; + } + + set + { + if (_stdevstrainmaxload != value) + { + _stdevstrainmaxload = value; + + OnStdevStrainMaxLoadChanged(value); + + } + } + } + + protected Nullable _percentchangeload; + + /// + /// Gets or sets the tensileresultbase percent change load. + /// + + [Column("PERCENT_CHANGE_LOAD")] + + public Nullable PercentChangeLoad + { + get + { + return _percentchangeload; + } + + set + { + if (_percentchangeload != value) + { + _percentchangeload = value; + + OnPercentChangeLoadChanged(value); + + } + } + } + + protected Nullable _percentchangestrain; + + /// + /// Gets or sets the tensileresultbase percent change strain. + /// + + [Column("PERCENT_CHANGE_STRAIN")] + + public Nullable PercentChangeStrain + { + get + { + return _percentchangestrain; + } + + set + { + if (_percentchangestrain != value) + { + _percentchangestrain = value; + + OnPercentChangeStrainChanged(value); + + } + } + } + + protected RmlExtensionTestResult _rmlextensiontestresults; + + /// + /// Gets or sets the tensileresultbase rml extension test results. + /// + + [XmlIgnore] + [JsonIgnore] + public virtual RmlExtensionTestResult RmlExtensionTestResults + { + get + { + return _rmlextensiontestresults; + } + + set + { + if (_rmlextensiontestresults != value) + { + _rmlextensiontestresults = value; + + if (RmlExtensionTestResults != null) + { + RmlExtensionTestResultsGuid = RmlExtensionTestResults.Guid; + } + + OnRmlExtensionTestResultsChanged(value); + + } + } + } + + /// + /// Called when the ColorPercent has changed. + /// + protected virtual void OnColorPercentChanged(Nullable colorpercent) + { + ColorPercentChanged?.Invoke(this, colorpercent); + RaisePropertyChanged(nameof(ColorPercent)); + } + + /// + /// Called when the Color has changed. + /// + protected virtual void OnColorChanged(Nullable color) + { + ColorChanged?.Invoke(this, color); + RaisePropertyChanged(nameof(Color)); + } + + /// + /// Called when the MaxLoad has changed. + /// + protected virtual void OnMaxLoadChanged(Nullable maxload) + { + MaxLoadChanged?.Invoke(this, maxload); + RaisePropertyChanged(nameof(MaxLoad)); + } + + /// + /// Called when the StdevMaxLoad has changed. + /// + protected virtual void OnStdevMaxLoadChanged(Nullable stdevmaxload) + { + StdevMaxLoadChanged?.Invoke(this, stdevmaxload); + RaisePropertyChanged(nameof(StdevMaxLoad)); + } + + /// + /// Called when the StrainMaxLoad has changed. + /// + protected virtual void OnStrainMaxLoadChanged(Nullable strainmaxload) + { + StrainMaxLoadChanged?.Invoke(this, strainmaxload); + RaisePropertyChanged(nameof(StrainMaxLoad)); + } + + /// + /// Called when the StdevStrainMaxLoad has changed. + /// + protected virtual void OnStdevStrainMaxLoadChanged(Nullable stdevstrainmaxload) + { + StdevStrainMaxLoadChanged?.Invoke(this, stdevstrainmaxload); + RaisePropertyChanged(nameof(StdevStrainMaxLoad)); + } + + /// + /// Called when the PercentChangeLoad has changed. + /// + protected virtual void OnPercentChangeLoadChanged(Nullable percentchangeload) + { + PercentChangeLoadChanged?.Invoke(this, percentchangeload); + RaisePropertyChanged(nameof(PercentChangeLoad)); + } + + /// + /// Called when the PercentChangeStrain has changed. + /// + protected virtual void OnPercentChangeStrainChanged(Nullable percentchangestrain) + { + PercentChangeStrainChanged?.Invoke(this, percentchangestrain); + RaisePropertyChanged(nameof(PercentChangeStrain)); + } + + /// + /// Called when the RmlExtensionTestResults has changed. + /// + protected virtual void OnRmlExtensionTestResultsChanged(RmlExtensionTestResult rmlextensiontestresults) + { + RmlExtensionTestResultsChanged?.Invoke(this, rmlextensiontestresults); + RaisePropertyChanged(nameof(RmlExtensionTestResults)); + } + + /// + /// Initializes a new instance of the class. + /// + public TensileResultBase() : base() + { + } + } +} diff --git a/Software/Visual_Studio/Tango.BL/Entities/UserBase.cs b/Software/Visual_Studio/Tango.BL/Entities/UserBase.cs index 29981fd75..eb6eae4f7 100644 --- a/Software/Visual_Studio/Tango.BL/Entities/UserBase.cs +++ b/Software/Visual_Studio/Tango.BL/Entities/UserBase.cs @@ -53,8 +53,6 @@ namespace Tango.BL.Entities public event EventHandler OrganizationChanged; - public event EventHandler> RmlsExtensionsChanged; - public event EventHandler> TangoVersionsChanged; public event EventHandler> UsersRolesChanged; @@ -493,31 +491,6 @@ namespace Tango.BL.Entities } } - protected SynchronizedObservableCollection _rmlsextensions; - - /// - /// Gets or sets the userbase rmls extensions. - /// - - public virtual SynchronizedObservableCollection RmlsExtensions - { - get - { - return _rmlsextensions; - } - - set - { - if (_rmlsextensions != value) - { - _rmlsextensions = value; - - OnRmlsExtensionsChanged(value); - - } - } - } - protected SynchronizedObservableCollection _tangoversions; /// @@ -685,15 +658,6 @@ namespace Tango.BL.Entities RaisePropertyChanged(nameof(Organization)); } - /// - /// Called when the RmlsExtensions has changed. - /// - protected virtual void OnRmlsExtensionsChanged(SynchronizedObservableCollection rmlsextensions) - { - RmlsExtensionsChanged?.Invoke(this, rmlsextensions); - RaisePropertyChanged(nameof(RmlsExtensions)); - } - /// /// Called when the TangoVersions has changed. /// @@ -728,8 +692,6 @@ namespace Tango.BL.Entities MachinesEvents = new SynchronizedObservableCollection(); - RmlsExtensions = new SynchronizedObservableCollection(); - TangoVersions = new SynchronizedObservableCollection(); UsersRoles = new SynchronizedObservableCollection(); diff --git a/Software/Visual_Studio/Tango.BL/Entities/YarnApplication.cs b/Software/Visual_Studio/Tango.BL/Entities/YarnApplication.cs index 86bc38932..7cca2e84d 100644 --- a/Software/Visual_Studio/Tango.BL/Entities/YarnApplication.cs +++ b/Software/Visual_Studio/Tango.BL/Entities/YarnApplication.cs @@ -10,7 +10,11 @@ namespace Tango.BL.Entities { - public class YarnApplication: YarnApplicationBase + public class YarnApplication :YarnApplicationBase { + public YarnApplication() :base() + { + + } } } \ No newline at end of file diff --git a/Software/Visual_Studio/Tango.BL/Entities/YarnBrand.cs b/Software/Visual_Studio/Tango.BL/Entities/YarnBrand.cs index dbf5b5e95..768409ab4 100644 --- a/Software/Visual_Studio/Tango.BL/Entities/YarnBrand.cs +++ b/Software/Visual_Studio/Tango.BL/Entities/YarnBrand.cs @@ -1,16 +1,16 @@ -//------------------------------------------------------------------------------ -// -// 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.Linq; +using System.Text; +using System.Threading.Tasks; namespace Tango.BL.Entities { - public class YarnBrand: YarnBrandBase + public partial class YarnBrand: YarnBrandBase { + public YarnBrand(): base() + { + + } } -} \ No newline at end of file +} diff --git a/Software/Visual_Studio/Tango.BL/Entities/YarnBrandBase.cs b/Software/Visual_Studio/Tango.BL/Entities/YarnBrandBase.cs index 5f743da43..2655e23e8 100644 --- a/Software/Visual_Studio/Tango.BL/Entities/YarnBrandBase.cs +++ b/Software/Visual_Studio/Tango.BL/Entities/YarnBrandBase.cs @@ -23,7 +23,7 @@ using Tango.Core.CustomAttributes; namespace Tango.BL.Entities { - [Table("YARN_BRAND")] + [Table("YARN_BRANDS")] public abstract class YarnBrandBase : ObservableEntity { diff --git a/Software/Visual_Studio/Tango.BL/Entities/YarnColor.cs b/Software/Visual_Studio/Tango.BL/Entities/YarnColor.cs deleted file mode 100644 index eb35a37fc..000000000 --- a/Software/Visual_Studio/Tango.BL/Entities/YarnColor.cs +++ /dev/null @@ -1,16 +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! -// -//------------------------------------------------------------------------------ - -namespace Tango.BL.Entities -{ - public class YarnColor : YarnColorBase - { - } -} \ No newline at end of file diff --git a/Software/Visual_Studio/Tango.BL/Entities/YarnColorBase.cs b/Software/Visual_Studio/Tango.BL/Entities/YarnColorBase.cs deleted file mode 100644 index e92628012..000000000 --- a/Software/Visual_Studio/Tango.BL/Entities/YarnColorBase.cs +++ /dev/null @@ -1,114 +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; -using System.ComponentModel; -using Tango.Core.CustomAttributes; - -namespace Tango.BL.Entities -{ - [Table("YARN_COLOR")] - public abstract class YarnColorBase : ObservableEntity - { - - public event EventHandler NameChanged; - - public event EventHandler> RmlsExtensionsChanged; - - protected String _name; - - /// - /// Gets or sets the yarncolorbase name. - /// - - [Column("NAME")] - - public String Name - { - get - { - return _name; - } - - set - { - if (_name != value) - { - _name = value; - - OnNameChanged(value); - - } - } - } - - protected SynchronizedObservableCollection _rmlsextensions; - - /// - /// Gets or sets the yarncolorbase rmls extensions. - /// - - public virtual SynchronizedObservableCollection RmlsExtensions - { - get - { - return _rmlsextensions; - } - - set - { - if (_rmlsextensions != value) - { - _rmlsextensions = value; - - OnRmlsExtensionsChanged(value); - - } - } - } - - /// - /// Called when the Name has changed. - /// - protected virtual void OnNameChanged(String name) - { - NameChanged?.Invoke(this, name); - RaisePropertyChanged(nameof(Name)); - } - - /// - /// Called when the RmlsExtensions has changed. - /// - protected virtual void OnRmlsExtensionsChanged(SynchronizedObservableCollection rmlsextensions) - { - RmlsExtensionsChanged?.Invoke(this, rmlsextensions); - RaisePropertyChanged(nameof(RmlsExtensions)); - } - - /// - /// Initializes a new instance of the class. - /// - public YarnColorBase() : base() - { - - RmlsExtensions = new SynchronizedObservableCollection(); - - } - } -} diff --git a/Software/Visual_Studio/Tango.BL/Entities/YarnEndUse.cs b/Software/Visual_Studio/Tango.BL/Entities/YarnEndUse.cs deleted file mode 100644 index a01f95fd5..000000000 --- a/Software/Visual_Studio/Tango.BL/Entities/YarnEndUse.cs +++ /dev/null @@ -1,16 +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! -// -//------------------------------------------------------------------------------ - -namespace Tango.BL.Entities -{ - public class YarnEndUse : YarnEndUseBase - { - } -} \ No newline at end of file diff --git a/Software/Visual_Studio/Tango.BL/Entities/YarnEndUseBase.cs b/Software/Visual_Studio/Tango.BL/Entities/YarnEndUseBase.cs deleted file mode 100644 index 25c51eacd..000000000 --- a/Software/Visual_Studio/Tango.BL/Entities/YarnEndUseBase.cs +++ /dev/null @@ -1,114 +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; -using System.ComponentModel; -using Tango.Core.CustomAttributes; - -namespace Tango.BL.Entities -{ - [Table("YARN_END_USE")] - public abstract class YarnEndUseBase : ObservableEntity - { - - public event EventHandler NameChanged; - - public event EventHandler> RmlsExtensionsChanged; - - protected String _name; - - /// - /// Gets or sets the yarnendusebase name. - /// - - [Column("NAME")] - - public String Name - { - get - { - return _name; - } - - set - { - if (_name != value) - { - _name = value; - - OnNameChanged(value); - - } - } - } - - protected SynchronizedObservableCollection _rmlsextensions; - - /// - /// Gets or sets the yarnendusebase rmls extensions. - /// - - public virtual SynchronizedObservableCollection RmlsExtensions - { - get - { - return _rmlsextensions; - } - - set - { - if (_rmlsextensions != value) - { - _rmlsextensions = value; - - OnRmlsExtensionsChanged(value); - - } - } - } - - /// - /// Called when the Name has changed. - /// - protected virtual void OnNameChanged(String name) - { - NameChanged?.Invoke(this, name); - RaisePropertyChanged(nameof(Name)); - } - - /// - /// Called when the RmlsExtensions has changed. - /// - protected virtual void OnRmlsExtensionsChanged(SynchronizedObservableCollection rmlsextensions) - { - RmlsExtensionsChanged?.Invoke(this, rmlsextensions); - RaisePropertyChanged(nameof(RmlsExtensions)); - } - - /// - /// Initializes a new instance of the class. - /// - public YarnEndUseBase() : base() - { - - RmlsExtensions = new SynchronizedObservableCollection(); - - } - } -} diff --git a/Software/Visual_Studio/Tango.BL/Entities/YarnFamily.cs b/Software/Visual_Studio/Tango.BL/Entities/YarnFamily.cs index f3b9383fd..7ad82041d 100644 --- a/Software/Visual_Studio/Tango.BL/Entities/YarnFamily.cs +++ b/Software/Visual_Studio/Tango.BL/Entities/YarnFamily.cs @@ -10,7 +10,11 @@ namespace Tango.BL.Entities { - public class YarnFamily : YarnFamilyBase + public class YarnFamily: YarnFamilyBase { + public YarnFamily(): base() + { + + } } } \ No newline at end of file diff --git a/Software/Visual_Studio/Tango.BL/Entities/YarnFamilyBase.cs b/Software/Visual_Studio/Tango.BL/Entities/YarnFamilyBase.cs index 7dd46677e..19e2630af 100644 --- a/Software/Visual_Studio/Tango.BL/Entities/YarnFamilyBase.cs +++ b/Software/Visual_Studio/Tango.BL/Entities/YarnFamilyBase.cs @@ -23,7 +23,7 @@ using Tango.Core.CustomAttributes; namespace Tango.BL.Entities { - [Table("YARN_FAMILY")] + [Table("YARN_FAMILIES")] public abstract class YarnFamilyBase : ObservableEntity { diff --git a/Software/Visual_Studio/Tango.BL/Entities/YarnGeometry.cs b/Software/Visual_Studio/Tango.BL/Entities/YarnGeometry.cs deleted file mode 100644 index 3028558a6..000000000 --- a/Software/Visual_Studio/Tango.BL/Entities/YarnGeometry.cs +++ /dev/null @@ -1,16 +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! -// -//------------------------------------------------------------------------------ - -namespace Tango.BL.Entities -{ - public class YarnGeometry : YarnGeometryBase - { - } -} \ No newline at end of file diff --git a/Software/Visual_Studio/Tango.BL/Entities/YarnGeometryBase.cs b/Software/Visual_Studio/Tango.BL/Entities/YarnGeometryBase.cs deleted file mode 100644 index 7ee00b957..000000000 --- a/Software/Visual_Studio/Tango.BL/Entities/YarnGeometryBase.cs +++ /dev/null @@ -1,114 +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; -using System.ComponentModel; -using Tango.Core.CustomAttributes; - -namespace Tango.BL.Entities -{ - [Table("YARN_GEOMETRY")] - public abstract class YarnGeometryBase : ObservableEntity - { - - public event EventHandler NameChanged; - - public event EventHandler> RmlsExtensionsChanged; - - protected String _name; - - /// - /// Gets or sets the yarngeometrybase name. - /// - - [Column("NAME")] - - public String Name - { - get - { - return _name; - } - - set - { - if (_name != value) - { - _name = value; - - OnNameChanged(value); - - } - } - } - - protected SynchronizedObservableCollection _rmlsextensions; - - /// - /// Gets or sets the yarngeometrybase rmls extensions. - /// - - public virtual SynchronizedObservableCollection RmlsExtensions - { - get - { - return _rmlsextensions; - } - - set - { - if (_rmlsextensions != value) - { - _rmlsextensions = value; - - OnRmlsExtensionsChanged(value); - - } - } - } - - /// - /// Called when the Name has changed. - /// - protected virtual void OnNameChanged(String name) - { - NameChanged?.Invoke(this, name); - RaisePropertyChanged(nameof(Name)); - } - - /// - /// Called when the RmlsExtensions has changed. - /// - protected virtual void OnRmlsExtensionsChanged(SynchronizedObservableCollection rmlsextensions) - { - RmlsExtensionsChanged?.Invoke(this, rmlsextensions); - RaisePropertyChanged(nameof(RmlsExtensions)); - } - - /// - /// Initializes a new instance of the class. - /// - public YarnGeometryBase() : base() - { - - RmlsExtensions = new SynchronizedObservableCollection(); - - } - } -} diff --git a/Software/Visual_Studio/Tango.BL/Entities/YarnGlossLevel.cs b/Software/Visual_Studio/Tango.BL/Entities/YarnGlossLevel.cs index 9d368c2e4..f9745167e 100644 --- a/Software/Visual_Studio/Tango.BL/Entities/YarnGlossLevel.cs +++ b/Software/Visual_Studio/Tango.BL/Entities/YarnGlossLevel.cs @@ -10,7 +10,11 @@ namespace Tango.BL.Entities { - public class YarnGlossLevel : YarnGlossLevelBase + public class YarnGlossLevel :YarnGlossLevelBase { + public YarnGlossLevel(): base() + { + + } } } \ No newline at end of file diff --git a/Software/Visual_Studio/Tango.BL/Entities/YarnGlossLevelBase.cs b/Software/Visual_Studio/Tango.BL/Entities/YarnGlossLevelBase.cs index ed87750e7..2d8dbbb45 100644 --- a/Software/Visual_Studio/Tango.BL/Entities/YarnGlossLevelBase.cs +++ b/Software/Visual_Studio/Tango.BL/Entities/YarnGlossLevelBase.cs @@ -23,7 +23,7 @@ using Tango.Core.CustomAttributes; namespace Tango.BL.Entities { - [Table("YARN_GLOSS_LEVEL")] + [Table("YARN_GLOSS_LEVELS")] public abstract class YarnGlossLevelBase : ObservableEntity { diff --git a/Software/Visual_Studio/Tango.BL/Entities/YarnGroup.cs b/Software/Visual_Studio/Tango.BL/Entities/YarnGroup.cs index bd021a09b..737066bdd 100644 --- a/Software/Visual_Studio/Tango.BL/Entities/YarnGroup.cs +++ b/Software/Visual_Studio/Tango.BL/Entities/YarnGroup.cs @@ -10,7 +10,11 @@ namespace Tango.BL.Entities { - public class YarnGroup : YarnGroupBase + public class YarnGroup: YarnGroupBase { + public YarnGroup(): base() + { + + } } } \ No newline at end of file diff --git a/Software/Visual_Studio/Tango.BL/Entities/YarnGroupBase.cs b/Software/Visual_Studio/Tango.BL/Entities/YarnGroupBase.cs index bc07ba6b2..99301a00b 100644 --- a/Software/Visual_Studio/Tango.BL/Entities/YarnGroupBase.cs +++ b/Software/Visual_Studio/Tango.BL/Entities/YarnGroupBase.cs @@ -23,7 +23,7 @@ using Tango.Core.CustomAttributes; namespace Tango.BL.Entities { - [Table("YARN_GROUP")] + [Table("YARN_GROUPS")] public abstract class YarnGroupBase : ObservableEntity { diff --git a/Software/Visual_Studio/Tango.BL/Entities/YarnIndustrysector.cs b/Software/Visual_Studio/Tango.BL/Entities/YarnIndustrysector.cs index 00e9e6401..36780d086 100644 --- a/Software/Visual_Studio/Tango.BL/Entities/YarnIndustrysector.cs +++ b/Software/Visual_Studio/Tango.BL/Entities/YarnIndustrysector.cs @@ -1,12 +1,20 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; +//------------------------------------------------------------------------------ +// +// 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! +// +//------------------------------------------------------------------------------ namespace Tango.BL.Entities { - public class YarnIndustrysector : YarnIndustrysectorBase + public class YarnIndustrysector: YarnIndustrysectorBase { + public YarnIndustrysector(): base() + { + + } } -} +} \ No newline at end of file diff --git a/Software/Visual_Studio/Tango.BL/Entities/YarnIndustrysectorBase.cs b/Software/Visual_Studio/Tango.BL/Entities/YarnIndustrysectorBase.cs index f807ae88e..be332d068 100644 --- a/Software/Visual_Studio/Tango.BL/Entities/YarnIndustrysectorBase.cs +++ b/Software/Visual_Studio/Tango.BL/Entities/YarnIndustrysectorBase.cs @@ -23,7 +23,7 @@ using Tango.Core.CustomAttributes; namespace Tango.BL.Entities { - [Table("YARN_INDUSTRYSECTOR")] + [Table("YARN_INDUSTRYSECTORS")] public abstract class YarnIndustrysectorBase : ObservableEntity { diff --git a/Software/Visual_Studio/Tango.BL/Entities/YarnManufacturer.cs b/Software/Visual_Studio/Tango.BL/Entities/YarnManufacturer.cs index 3c0b4384e..728d077f8 100644 --- a/Software/Visual_Studio/Tango.BL/Entities/YarnManufacturer.cs +++ b/Software/Visual_Studio/Tango.BL/Entities/YarnManufacturer.cs @@ -12,5 +12,9 @@ namespace Tango.BL.Entities { public class YarnManufacturer : YarnManufacturerBase { + public YarnManufacturer(): base() + { + + } } } \ No newline at end of file diff --git a/Software/Visual_Studio/Tango.BL/Entities/YarnManufacturerBase.cs b/Software/Visual_Studio/Tango.BL/Entities/YarnManufacturerBase.cs index d119e54b2..97053f0a9 100644 --- a/Software/Visual_Studio/Tango.BL/Entities/YarnManufacturerBase.cs +++ b/Software/Visual_Studio/Tango.BL/Entities/YarnManufacturerBase.cs @@ -23,7 +23,7 @@ using Tango.Core.CustomAttributes; namespace Tango.BL.Entities { - [Table("YARN_MANUFACTURER")] + [Table("YARN_MANUFACTURERS")] public abstract class YarnManufacturerBase : ObservableEntity { diff --git a/Software/Visual_Studio/Tango.BL/Entities/YarnMaterial.cs b/Software/Visual_Studio/Tango.BL/Entities/YarnMaterial.cs deleted file mode 100644 index 508dda1f2..000000000 --- a/Software/Visual_Studio/Tango.BL/Entities/YarnMaterial.cs +++ /dev/null @@ -1,16 +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! -// -//------------------------------------------------------------------------------ - -namespace Tango.BL.Entities -{ - public class YarnMaterial : YarnMaterialBase - { - } -} \ No newline at end of file diff --git a/Software/Visual_Studio/Tango.BL/Entities/YarnMaterialBase.cs b/Software/Visual_Studio/Tango.BL/Entities/YarnMaterialBase.cs deleted file mode 100644 index 8c4de2cca..000000000 --- a/Software/Visual_Studio/Tango.BL/Entities/YarnMaterialBase.cs +++ /dev/null @@ -1,114 +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; -using System.ComponentModel; -using Tango.Core.CustomAttributes; - -namespace Tango.BL.Entities -{ - [Table("YARN_MATERIALS")] - public abstract class YarnMaterialBase : ObservableEntity - { - - public event EventHandler NameChanged; - - public event EventHandler> RmlsExtensionsChanged; - - protected String _name; - - /// - /// Gets or sets the yarnmaterialbase name. - /// - - [Column("NAME")] - - public String Name - { - get - { - return _name; - } - - set - { - if (_name != value) - { - _name = value; - - OnNameChanged(value); - - } - } - } - - protected SynchronizedObservableCollection _rmlsextensions; - - /// - /// Gets or sets the yarnmaterialbase rmls extensions. - /// - - public virtual SynchronizedObservableCollection RmlsExtensions - { - get - { - return _rmlsextensions; - } - - set - { - if (_rmlsextensions != value) - { - _rmlsextensions = value; - - OnRmlsExtensionsChanged(value); - - } - } - } - - /// - /// Called when the Name has changed. - /// - protected virtual void OnNameChanged(String name) - { - NameChanged?.Invoke(this, name); - RaisePropertyChanged(nameof(Name)); - } - - /// - /// Called when the RmlsExtensions has changed. - /// - protected virtual void OnRmlsExtensionsChanged(SynchronizedObservableCollection rmlsextensions) - { - RmlsExtensionsChanged?.Invoke(this, rmlsextensions); - RaisePropertyChanged(nameof(RmlsExtensions)); - } - - /// - /// Initializes a new instance of the class. - /// - public YarnMaterialBase() : base() - { - - RmlsExtensions = new SynchronizedObservableCollection(); - - } - } -} diff --git a/Software/Visual_Studio/Tango.BL/Entities/YarnSubFamily.cs b/Software/Visual_Studio/Tango.BL/Entities/YarnSubFamily.cs index e19b3008c..28e474bba 100644 --- a/Software/Visual_Studio/Tango.BL/Entities/YarnSubFamily.cs +++ b/Software/Visual_Studio/Tango.BL/Entities/YarnSubFamily.cs @@ -12,5 +12,9 @@ namespace Tango.BL.Entities { public class YarnSubFamily : YarnSubFamilyBase { + public YarnSubFamily(): base() + { + + } } } \ No newline at end of file diff --git a/Software/Visual_Studio/Tango.BL/Entities/YarnSubFamilyBase.cs b/Software/Visual_Studio/Tango.BL/Entities/YarnSubFamilyBase.cs index baf467257..7d71bf8a0 100644 --- a/Software/Visual_Studio/Tango.BL/Entities/YarnSubFamilyBase.cs +++ b/Software/Visual_Studio/Tango.BL/Entities/YarnSubFamilyBase.cs @@ -23,7 +23,7 @@ using Tango.Core.CustomAttributes; namespace Tango.BL.Entities { - [Table("YARN_SUB_FAMILY")] + [Table("YARN_SUB_FAMILIES")] public abstract class YarnSubFamilyBase : ObservableEntity { diff --git a/Software/Visual_Studio/Tango.BL/Entities/YarnTexturing.cs b/Software/Visual_Studio/Tango.BL/Entities/YarnTexturing.cs index f61b40f67..f531a770c 100644 --- a/Software/Visual_Studio/Tango.BL/Entities/YarnTexturing.cs +++ b/Software/Visual_Studio/Tango.BL/Entities/YarnTexturing.cs @@ -12,5 +12,9 @@ namespace Tango.BL.Entities { public class YarnTexturing : YarnTexturingBase { + public YarnTexturing() : base() + { + + } } } \ No newline at end of file diff --git a/Software/Visual_Studio/Tango.BL/Entities/YarnTexturingBase.cs b/Software/Visual_Studio/Tango.BL/Entities/YarnTexturingBase.cs index 0d736df59..7856a5956 100644 --- a/Software/Visual_Studio/Tango.BL/Entities/YarnTexturingBase.cs +++ b/Software/Visual_Studio/Tango.BL/Entities/YarnTexturingBase.cs @@ -23,7 +23,7 @@ using Tango.Core.CustomAttributes; namespace Tango.BL.Entities { - [Table("YARN_TEXTURING")] + [Table("YARN_TEXTURINGS")] public abstract class YarnTexturingBase : ObservableEntity { diff --git a/Software/Visual_Studio/Tango.BL/Entities/YarnType.cs b/Software/Visual_Studio/Tango.BL/Entities/YarnType.cs index 97ddd1ffc..28ac06d69 100644 --- a/Software/Visual_Studio/Tango.BL/Entities/YarnType.cs +++ b/Software/Visual_Studio/Tango.BL/Entities/YarnType.cs @@ -12,5 +12,9 @@ namespace Tango.BL.Entities { public class YarnType : YarnTypeBase { + public YarnType() : base() + { + + } } } \ No newline at end of file diff --git a/Software/Visual_Studio/Tango.BL/Entities/YarnTypeBase.cs b/Software/Visual_Studio/Tango.BL/Entities/YarnTypeBase.cs index b3ae3ba20..40b380db5 100644 --- a/Software/Visual_Studio/Tango.BL/Entities/YarnTypeBase.cs +++ b/Software/Visual_Studio/Tango.BL/Entities/YarnTypeBase.cs @@ -23,7 +23,7 @@ using Tango.Core.CustomAttributes; namespace Tango.BL.Entities { - [Table("YARN_TYPE")] + [Table("YARN_TYPES")] public abstract class YarnTypeBase : ObservableEntity { diff --git a/Software/Visual_Studio/Tango.BL/Entities/YarnWhiteShade.cs b/Software/Visual_Studio/Tango.BL/Entities/YarnWhiteShade.cs new file mode 100644 index 000000000..18bfa6506 --- /dev/null +++ b/Software/Visual_Studio/Tango.BL/Entities/YarnWhiteShade.cs @@ -0,0 +1,20 @@ +//------------------------------------------------------------------------------ +// +// 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! +// +//------------------------------------------------------------------------------ + +namespace Tango.BL.Entities +{ + public class YarnWhiteShade :YarnWhiteShadeBase + { + public YarnWhiteShade(): base() + { + + } + } +} \ No newline at end of file diff --git a/Software/Visual_Studio/Tango.BL/Entities/YarnWhiteShadeBase.cs b/Software/Visual_Studio/Tango.BL/Entities/YarnWhiteShadeBase.cs new file mode 100644 index 000000000..99c8ffe5e --- /dev/null +++ b/Software/Visual_Studio/Tango.BL/Entities/YarnWhiteShadeBase.cs @@ -0,0 +1,114 @@ +//------------------------------------------------------------------------------ +// +// 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; +using System.ComponentModel; +using Tango.Core.CustomAttributes; + +namespace Tango.BL.Entities +{ + [Table("YARN_WHITE_SHADES")] + public abstract class YarnWhiteShadeBase : ObservableEntity + { + + public event EventHandler NameChanged; + + public event EventHandler> RmlsExtensionsChanged; + + protected String _name; + + /// + /// Gets or sets the yarnwhiteshadebase name. + /// + + [Column("NAME")] + + public String Name + { + get + { + return _name; + } + + set + { + if (_name != value) + { + _name = value; + + OnNameChanged(value); + + } + } + } + + protected SynchronizedObservableCollection _rmlsextensions; + + /// + /// Gets or sets the yarnwhiteshadebase rmls extensions. + /// + + public virtual SynchronizedObservableCollection RmlsExtensions + { + get + { + return _rmlsextensions; + } + + set + { + if (_rmlsextensions != value) + { + _rmlsextensions = value; + + OnRmlsExtensionsChanged(value); + + } + } + } + + /// + /// Called when the Name has changed. + /// + protected virtual void OnNameChanged(String name) + { + NameChanged?.Invoke(this, name); + RaisePropertyChanged(nameof(Name)); + } + + /// + /// Called when the RmlsExtensions has changed. + /// + protected virtual void OnRmlsExtensionsChanged(SynchronizedObservableCollection rmlsextensions) + { + RmlsExtensionsChanged?.Invoke(this, rmlsextensions); + RaisePropertyChanged(nameof(RmlsExtensions)); + } + + /// + /// Initializes a new instance of the class. + /// + public YarnWhiteShadeBase() : base() + { + + RmlsExtensions = new SynchronizedObservableCollection(); + + } + } +} diff --git a/Software/Visual_Studio/Tango.BL/Enumerations/FactorColors.cs b/Software/Visual_Studio/Tango.BL/Enumerations/FactorColors.cs new file mode 100644 index 000000000..ed0177568 --- /dev/null +++ b/Software/Visual_Studio/Tango.BL/Enumerations/FactorColors.cs @@ -0,0 +1,21 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.ComponentModel; + +namespace Tango.BL.Enumerations +{ + public enum FactorColors + { + [Description("CYAN")] + CYAN = 0, + [Description("MAGENTA")] + MAGENTA = 1, + [Description("YELLOW")] + YELLOW = 2, + [Description("BLACK")] + BLACK = 3, + } +} diff --git a/Software/Visual_Studio/Tango.BL/Enumerations/FiberShapes.cs b/Software/Visual_Studio/Tango.BL/Enumerations/FiberShapes.cs index f62e2e4c2..5580a9aeb 100644 --- a/Software/Visual_Studio/Tango.BL/Enumerations/FiberShapes.cs +++ b/Software/Visual_Studio/Tango.BL/Enumerations/FiberShapes.cs @@ -19,11 +19,47 @@ namespace Tango.BL.Enumerations public enum FiberShapes { + /// + /// (Trilobal) + /// + [Description("Trilobal")] + Trilobal = 3, + /// /// (Triangle) /// [Description("Triangle")] Triangle = 1, + /// + /// (Hollow) + /// + [Description("Hollow")] + Hollow = 4, + + /// + /// (Irregular) + /// + [Description("Irregular")] + Irregular = 5, + + /// + /// (Pentagona) + /// + [Description("Pentagona")] + Pentagona = 6, + + /// + /// (Round) + /// + [Description("Round")] + Round = 2, + + /// + /// (Unknown) + /// + [Description("Unknown")] + Unknown = 7, + } } diff --git a/Software/Visual_Studio/Tango.BL/Enumerations/LinearMassDensityUnits.cs b/Software/Visual_Studio/Tango.BL/Enumerations/LinearMassDensityUnits.cs index 5d5375125..1a2478a9d 100644 --- a/Software/Visual_Studio/Tango.BL/Enumerations/LinearMassDensityUnits.cs +++ b/Software/Visual_Studio/Tango.BL/Enumerations/LinearMassDensityUnits.cs @@ -20,10 +20,28 @@ namespace Tango.BL.Enumerations { /// - /// (Dex) + /// (Nm) /// - [Description("Dex")] - Dex = 1, + [Description("Nm")] + Nm = 4, + + /// + /// (DTEX) + /// + [Description("DTEX")] + DTEX = 1, + + /// + /// (Ne) + /// + [Description("Ne")] + Ne = 3, + + /// + /// (Tex) + /// + [Description("Tex")] + Tex = 2, } } diff --git a/Software/Visual_Studio/Tango.BL/Enumerations/MediaMaterials.cs b/Software/Visual_Studio/Tango.BL/Enumerations/MediaMaterials.cs index 8b4e9eb8d..1f3af3c8b 100644 --- a/Software/Visual_Studio/Tango.BL/Enumerations/MediaMaterials.cs +++ b/Software/Visual_Studio/Tango.BL/Enumerations/MediaMaterials.cs @@ -19,11 +19,59 @@ namespace Tango.BL.Enumerations public enum MediaMaterials { + /// + /// (PET-CATIONIC) + /// + [Description("PET-CATIONIC")] + PET_CATIONIC = 4, + + /// + /// (LYCRA) + /// + [Description("LYCRA")] + LYCRA = 7, + + /// + /// (PES-LYCRA) + /// + [Description("PES-LYCRA")] + PES_LYCRA = 8, + + /// + /// (PE) + /// + [Description("PE")] + PE = 5, + /// /// (Nylon) /// [Description("Nylon")] Nylon = 1, + /// + /// (PET) + /// + [Description("PET")] + PET = 2, + + /// + /// (CO-PET) + /// + [Description("CO-PET")] + CO_PET = 6, + + /// + /// (PTT) + /// + [Description("PTT")] + PTT = 9, + + /// + /// (PA 6.6) + /// + [Description("PA 6.6")] + PA6_6 = 3, + } } diff --git a/Software/Visual_Studio/Tango.BL/Enumerations/MediaPurposes.cs b/Software/Visual_Studio/Tango.BL/Enumerations/MediaPurposes.cs index 0fa732e60..1d5ea3533 100644 --- a/Software/Visual_Studio/Tango.BL/Enumerations/MediaPurposes.cs +++ b/Software/Visual_Studio/Tango.BL/Enumerations/MediaPurposes.cs @@ -19,11 +19,47 @@ namespace Tango.BL.Enumerations public enum MediaPurposes { + /// + /// (Knitting) + /// + [Description("Knitting")] + Knitting = 4, + + /// + /// (Weaving) + /// + [Description("Weaving")] + Weaving = 6, + + /// + /// (Flat) + /// + [Description("Flat")] + Flat = 3, + + /// + /// (Other) + /// + [Description("Other")] + Other = 7, + + /// + /// (Sewing) + /// + [Description("Sewing")] + Sewing = 2, + /// /// (Embroidery) /// [Description("Embroidery")] Embroidery = 1, + /// + /// (Circular Knitting) + /// + [Description("Circular Knitting")] + CircularKnitting = 5, + } } diff --git a/Software/Visual_Studio/Tango.BL/Enumerations/Permissions.cs b/Software/Visual_Studio/Tango.BL/Enumerations/Permissions.cs index 58a57cbc9..4155a7f9c 100644 --- a/Software/Visual_Studio/Tango.BL/Enumerations/Permissions.cs +++ b/Software/Visual_Studio/Tango.BL/Enumerations/Permissions.cs @@ -343,5 +343,11 @@ namespace Tango.BL.Enumerations [Description("Allows emulating machine events remotely")] FSE_EmulateMachineEvents = 1032, + /// + /// (Allows editing of RML extesions) + /// + [Description("Allows editing of RML extesions")] + RMLExtentionsWrite = 1033, + } } diff --git a/Software/Visual_Studio/Tango.BL/Enumerations/RMLExtensionStatus.cs b/Software/Visual_Studio/Tango.BL/Enumerations/RMLExtensionStatus.cs new file mode 100644 index 000000000..c4c6e2d6d --- /dev/null +++ b/Software/Visual_Studio/Tango.BL/Enumerations/RMLExtensionStatus.cs @@ -0,0 +1,19 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Tango.BL.Enumerations +{ + public enum RMLExtensionStatus + { + [Description("New")] + New = 0, + [Description("In Progress")] + InProgress = 1, + [Description("Completed")] + Done = 2, + } +} diff --git a/Software/Visual_Studio/Tango.BL/Enumerations/TestResultColors.cs b/Software/Visual_Studio/Tango.BL/Enumerations/TestResultColors.cs new file mode 100644 index 000000000..d741d74d2 --- /dev/null +++ b/Software/Visual_Studio/Tango.BL/Enumerations/TestResultColors.cs @@ -0,0 +1,24 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.ComponentModel; + +namespace Tango.BL.Enumerations +{ + public enum TestResultColors + { + [Description("K")] + BLACK = 0, + [Description("C")] + CYAN = 1, + [Description("Y")] + YELLOW = 2, + [Description("M")] + MAGENTA = 3, + [Description("REF")] + WHITE = 4, + + } +} diff --git a/Software/Visual_Studio/Tango.BL/Enumerations/TwistDirections.cs b/Software/Visual_Studio/Tango.BL/Enumerations/TwistDirections.cs index 8c6017f6a..f827bbb58 100644 --- a/Software/Visual_Studio/Tango.BL/Enumerations/TwistDirections.cs +++ b/Software/Visual_Studio/Tango.BL/Enumerations/TwistDirections.cs @@ -9,7 +9,11 @@ namespace Tango.BL.Enumerations { public enum TwistDirections { + [Description("S")] S = 0, - Z = 1 + [Description("Z")] + Z = 1, + [Description("UNKNOWN")] + Unknown = 2 } } diff --git a/Software/Visual_Studio/Tango.BL/ObservablesContext.cs b/Software/Visual_Studio/Tango.BL/ObservablesContext.cs index 10f4575d4..d6bc73bd0 100644 --- a/Software/Visual_Studio/Tango.BL/ObservablesContext.cs +++ b/Software/Visual_Studio/Tango.BL/ObservablesContext.cs @@ -167,9 +167,9 @@ namespace Tango.BL } /// - /// Gets or sets the ColorProcessFactor. + /// Gets or sets the ColorProcessFactors. /// - public DbSet ColorProcessFactor + public DbSet ColorProcessFactors { get; set; } @@ -582,6 +582,14 @@ namespace Tango.BL get; set; } + /// + /// Gets or sets the RmlExtensionTestResults. + /// + public DbSet RmlExtensionTestResults + { + get; set; + } + /// /// Gets or sets the Rmls. /// @@ -622,6 +630,14 @@ namespace Tango.BL get; set; } + /// + /// Gets or sets the RubbingResults. + /// + public DbSet RubbingResults + { + get; set; + } + /// /// Gets or sets the Segments. /// @@ -742,6 +758,14 @@ namespace Tango.BL get; set; } + /// + /// Gets or sets the TensileResults. + /// + public DbSet TensileResults + { + get; set; + } + /// /// Gets or sets the Users. /// @@ -775,105 +799,81 @@ namespace Tango.BL } /// - /// Gets or sets the YarnBrand. - /// - public DbSet YarnBrand - { - get; set; - } - - /// - /// Gets or sets the YarnColor. - /// - public DbSet YarnColor - { - get; set; - } - - /// - /// Gets or sets the YarnEndUse. - /// - public DbSet YarnEndUse - { - get; set; - } - - /// - /// Gets or sets the YarnFamily. + /// Gets or sets the YarnBrands. /// - public DbSet YarnFamily + public DbSet YarnBrands { get; set; } /// - /// Gets or sets the YarnGeometry. + /// Gets or sets the YarnFamilies. /// - public DbSet YarnGeometry + public DbSet YarnFamilies { get; set; } /// - /// Gets or sets the YarnGlossLevel. + /// Gets or sets the YarnGlossLevels. /// - public DbSet YarnGlossLevel + public DbSet YarnGlossLevels { get; set; } /// - /// Gets or sets the YarnGroup. + /// Gets or sets the YarnGroups. /// - public DbSet YarnGroup + public DbSet YarnGroups { get; set; } /// - /// Gets or sets the YarnIndustrysector. + /// Gets or sets the YarnIndustrysectors. /// - public DbSet YarnIndustrysector + public DbSet YarnIndustrysectors { get; set; } /// - /// Gets or sets the YarnManufacturer. + /// Gets or sets the YarnManufacturers. /// - public DbSet YarnManufacturer + public DbSet YarnManufacturers { get; set; } /// - /// Gets or sets the YarnMaterials. + /// Gets or sets the YarnSubFamilies. /// - public DbSet YarnMaterials + public DbSet YarnSubFamilies { get; set; } /// - /// Gets or sets the YarnSubFamily. + /// Gets or sets the YarnTexturings. /// - public DbSet YarnSubFamily + public DbSet YarnTexturings { get; set; } /// - /// Gets or sets the YarnTexturing. + /// Gets or sets the YarnTypes. /// - public DbSet YarnTexturing + public DbSet YarnTypes { get; set; } /// - /// Gets or sets the YarnType. + /// Gets or sets the YarnWhiteShades. /// - public DbSet YarnType + public DbSet YarnWhiteShades { get; set; } diff --git a/Software/Visual_Studio/Tango.BL/ObservablesEntitiesAdapterExtension.cs b/Software/Visual_Studio/Tango.BL/ObservablesEntitiesAdapterExtension.cs index 35d256267..ac276916f 100644 --- a/Software/Visual_Studio/Tango.BL/ObservablesEntitiesAdapterExtension.cs +++ b/Software/Visual_Studio/Tango.BL/ObservablesEntitiesAdapterExtension.cs @@ -665,38 +665,38 @@ namespace Tango.BL } - private ObservableCollection _colorprocessfactor; + private ObservableCollection _colorprocessfactors; /// - /// Gets or sets the ColorProcessFactor. + /// Gets or sets the ColorProcessFactors. /// - public ObservableCollection ColorProcessFactor + public ObservableCollection ColorProcessFactors { get { - return _colorprocessfactor; + return _colorprocessfactors; } set { - _colorprocessfactor = value; RaisePropertyChanged(nameof(ColorProcessFactor)); + _colorprocessfactors = value; RaisePropertyChanged(nameof(ColorProcessFactors)); } } - private ICollectionView _colorprocessfactorViewSource; + private ICollectionView _colorprocessfactorsViewSource; /// - /// Gets or sets the ColorProcessFactor View Source. + /// Gets or sets the ColorProcessFactors View Source. /// - public ICollectionView ColorProcessFactorViewSource + public ICollectionView ColorProcessFactorsViewSource { get { - return _colorprocessfactorViewSource; + return _colorprocessfactorsViewSource; } set { - _colorprocessfactorViewSource = value; RaisePropertyChanged(nameof(ColorProcessFactorViewSource)); + _colorprocessfactorsViewSource = value; RaisePropertyChanged(nameof(ColorProcessFactorsViewSource)); } } @@ -2537,6 +2537,42 @@ namespace Tango.BL } + private ObservableCollection _rmlextensiontestresults; + /// + /// Gets or sets the RmlExtensionTestResults. + /// + public ObservableCollection RmlExtensionTestResults + { + get + { + return _rmlextensiontestresults; + } + + set + { + _rmlextensiontestresults = value; RaisePropertyChanged(nameof(RmlExtensionTestResults)); + } + + } + + private ICollectionView _rmlextensiontestresultsViewSource; + /// + /// Gets or sets the RmlExtensionTestResults View Source. + /// + public ICollectionView RmlExtensionTestResultsViewSource + { + get + { + return _rmlextensiontestresultsViewSource; + } + + set + { + _rmlextensiontestresultsViewSource = value; RaisePropertyChanged(nameof(RmlExtensionTestResultsViewSource)); + } + + } + private ObservableCollection _rmls; /// /// Gets or sets the Rmls. @@ -2717,6 +2753,42 @@ namespace Tango.BL } + private ObservableCollection _rubbingresults; + /// + /// Gets or sets the RubbingResults. + /// + public ObservableCollection RubbingResults + { + get + { + return _rubbingresults; + } + + set + { + _rubbingresults = value; RaisePropertyChanged(nameof(RubbingResults)); + } + + } + + private ICollectionView _rubbingresultsViewSource; + /// + /// Gets or sets the RubbingResults View Source. + /// + public ICollectionView RubbingResultsViewSource + { + get + { + return _rubbingresultsViewSource; + } + + set + { + _rubbingresultsViewSource = value; RaisePropertyChanged(nameof(RubbingResultsViewSource)); + } + + } + private ObservableCollection _segments; /// /// Gets or sets the Segments. @@ -3257,6 +3329,42 @@ namespace Tango.BL } + private ObservableCollection _tensileresults; + /// + /// Gets or sets the TensileResults. + /// + public ObservableCollection TensileResults + { + get + { + return _tensileresults; + } + + set + { + _tensileresults = value; RaisePropertyChanged(nameof(TensileResults)); + } + + } + + private ICollectionView _tensileresultsViewSource; + /// + /// Gets or sets the TensileResults View Source. + /// + public ICollectionView TensileResultsViewSource + { + get + { + return _tensileresultsViewSource; + } + + set + { + _tensileresultsViewSource = value; RaisePropertyChanged(nameof(TensileResultsViewSource)); + } + + } + private ObservableCollection _users; /// /// Gets or sets the Users. @@ -3401,470 +3509,362 @@ namespace Tango.BL } - private ObservableCollection _yarnbrand; - /// - /// Gets or sets the YarnBrand. - /// - public ObservableCollection YarnBrand - { - get - { - return _yarnbrand; - } - - set - { - _yarnbrand = value; RaisePropertyChanged(nameof(YarnBrand)); - } - - } - - private ICollectionView _yarnbrandViewSource; + private ObservableCollection _yarnbrands; /// - /// Gets or sets the YarnBrand View Source. - /// - public ICollectionView YarnBrandViewSource - { - get - { - return _yarnbrandViewSource; - } - - set - { - _yarnbrandViewSource = value; RaisePropertyChanged(nameof(YarnBrandViewSource)); - } - - } - - private ObservableCollection _yarncolor; - /// - /// Gets or sets the YarnColor. + /// Gets or sets the YarnBrands. /// - public ObservableCollection YarnColor + public ObservableCollection YarnBrands { get { - return _yarncolor; + return _yarnbrands; } set { - _yarncolor = value; RaisePropertyChanged(nameof(YarnColor)); + _yarnbrands = value; RaisePropertyChanged(nameof(YarnBrands)); } } - private ICollectionView _yarncolorViewSource; + private ICollectionView _yarnbrandsViewSource; /// - /// Gets or sets the YarnColor View Source. + /// Gets or sets the YarnBrands View Source. /// - public ICollectionView YarnColorViewSource + public ICollectionView YarnBrandsViewSource { get { - return _yarncolorViewSource; + return _yarnbrandsViewSource; } set { - _yarncolorViewSource = value; RaisePropertyChanged(nameof(YarnColorViewSource)); + _yarnbrandsViewSource = value; RaisePropertyChanged(nameof(YarnBrandsViewSource)); } } - private ObservableCollection _yarnenduse; + private ObservableCollection _yarnfamilies; /// - /// Gets or sets the YarnEndUse. + /// Gets or sets the YarnFamilies. /// - public ObservableCollection YarnEndUse + public ObservableCollection YarnFamilies { get { - return _yarnenduse; + return _yarnfamilies; } set { - _yarnenduse = value; RaisePropertyChanged(nameof(YarnEndUse)); + _yarnfamilies = value; RaisePropertyChanged(nameof(YarnFamilies)); } } - private ICollectionView _yarnenduseViewSource; + private ICollectionView _yarnfamiliesViewSource; /// - /// Gets or sets the YarnEndUse View Source. + /// Gets or sets the YarnFamilies View Source. /// - public ICollectionView YarnEndUseViewSource + public ICollectionView YarnFamiliesViewSource { get { - return _yarnenduseViewSource; + return _yarnfamiliesViewSource; } set { - _yarnenduseViewSource = value; RaisePropertyChanged(nameof(YarnEndUseViewSource)); + _yarnfamiliesViewSource = value; RaisePropertyChanged(nameof(YarnFamiliesViewSource)); } } - private ObservableCollection _yarnfamily; + private ObservableCollection _yarnglosslevels; /// - /// Gets or sets the YarnFamily. + /// Gets or sets the YarnGlossLevels. /// - public ObservableCollection YarnFamily + public ObservableCollection YarnGlossLevels { get { - return _yarnfamily; + return _yarnglosslevels; } set { - _yarnfamily = value; RaisePropertyChanged(nameof(YarnFamily)); + _yarnglosslevels = value; RaisePropertyChanged(nameof(YarnGlossLevels)); } } - private ICollectionView _yarnfamilyViewSource; + private ICollectionView _yarnglosslevelsViewSource; /// - /// Gets or sets the YarnFamily View Source. + /// Gets or sets the YarnGlossLevels View Source. /// - public ICollectionView YarnFamilyViewSource + public ICollectionView YarnGlossLevelsViewSource { get { - return _yarnfamilyViewSource; + return _yarnglosslevelsViewSource; } set { - _yarnfamilyViewSource = value; RaisePropertyChanged(nameof(YarnFamilyViewSource)); + _yarnglosslevelsViewSource = value; RaisePropertyChanged(nameof(YarnGlossLevelsViewSource)); } } - private ObservableCollection _yarngeometry; + private ObservableCollection _yarngroups; /// - /// Gets or sets the YarnGeometry. + /// Gets or sets the YarnGroups. /// - public ObservableCollection YarnGeometry + public ObservableCollection YarnGroups { get { - return _yarngeometry; + return _yarngroups; } set { - _yarngeometry = value; RaisePropertyChanged(nameof(YarnGeometry)); + _yarngroups = value; RaisePropertyChanged(nameof(YarnGroups)); } } - private ICollectionView _yarngeometryViewSource; + private ICollectionView _yarngroupsViewSource; /// - /// Gets or sets the YarnGeometry View Source. + /// Gets or sets the YarnGroups View Source. /// - public ICollectionView YarnGeometryViewSource + public ICollectionView YarnGroupsViewSource { get { - return _yarngeometryViewSource; + return _yarngroupsViewSource; } set { - _yarngeometryViewSource = value; RaisePropertyChanged(nameof(YarnGeometryViewSource)); + _yarngroupsViewSource = value; RaisePropertyChanged(nameof(YarnGroupsViewSource)); } } - private ObservableCollection _yarnglosslevel; + private ObservableCollection _yarnindustrysectors; /// - /// Gets or sets the YarnGlossLevel. + /// Gets or sets the YarnIndustrysectors. /// - public ObservableCollection YarnGlossLevel + public ObservableCollection YarnIndustrysectors { get { - return _yarnglosslevel; + return _yarnindustrysectors; } set { - _yarnglosslevel = value; RaisePropertyChanged(nameof(YarnGlossLevel)); + _yarnindustrysectors = value; RaisePropertyChanged(nameof(YarnIndustrysectors)); } } - private ICollectionView _yarnglosslevelViewSource; + private ICollectionView _yarnindustrysectorsViewSource; /// - /// Gets or sets the YarnGlossLevel View Source. + /// Gets or sets the YarnIndustrysectors View Source. /// - public ICollectionView YarnGlossLevelViewSource + public ICollectionView YarnIndustrysectorsViewSource { get { - return _yarnglosslevelViewSource; + return _yarnindustrysectorsViewSource; } set { - _yarnglosslevelViewSource = value; RaisePropertyChanged(nameof(YarnGlossLevelViewSource)); + _yarnindustrysectorsViewSource = value; RaisePropertyChanged(nameof(YarnIndustrysectorsViewSource)); } } - private ObservableCollection _yarngroup; + private ObservableCollection _yarnmanufacturers; /// - /// Gets or sets the YarnGroup. + /// Gets or sets the YarnManufacturers. /// - public ObservableCollection YarnGroup + public ObservableCollection YarnManufacturers { get { - return _yarngroup; + return _yarnmanufacturers; } set { - _yarngroup = value; RaisePropertyChanged(nameof(YarnGroup)); + _yarnmanufacturers = value; RaisePropertyChanged(nameof(YarnManufacturers)); } } - private ICollectionView _yarngroupViewSource; + private ICollectionView _yarnmanufacturersViewSource; /// - /// Gets or sets the YarnGroup View Source. + /// Gets or sets the YarnManufacturers View Source. /// - public ICollectionView YarnGroupViewSource + public ICollectionView YarnManufacturersViewSource { get { - return _yarngroupViewSource; + return _yarnmanufacturersViewSource; } set { - _yarngroupViewSource = value; RaisePropertyChanged(nameof(YarnGroupViewSource)); + _yarnmanufacturersViewSource = value; RaisePropertyChanged(nameof(YarnManufacturersViewSource)); } } - private ObservableCollection _yarnindustrysector; + private ObservableCollection _yarnsubfamilies; /// - /// Gets or sets the YarnIndustrysector. + /// Gets or sets the YarnSubFamilies. /// - public ObservableCollection YarnIndustrysector + public ObservableCollection YarnSubFamilies { get { - return _yarnindustrysector; + return _yarnsubfamilies; } set { - _yarnindustrysector = value; RaisePropertyChanged(nameof(YarnIndustrysector)); + _yarnsubfamilies = value; RaisePropertyChanged(nameof(YarnSubFamilies)); } } - private ICollectionView _yarnindustrysectorViewSource; + private ICollectionView _yarnsubfamiliesViewSource; /// - /// Gets or sets the YarnIndustrysector View Source. + /// Gets or sets the YarnSubFamilies View Source. /// - public ICollectionView YarnIndustrysectorViewSource + public ICollectionView YarnSubFamiliesViewSource { get { - return _yarnindustrysectorViewSource; + return _yarnsubfamiliesViewSource; } set { - _yarnindustrysectorViewSource = value; RaisePropertyChanged(nameof(YarnIndustrysectorViewSource)); + _yarnsubfamiliesViewSource = value; RaisePropertyChanged(nameof(YarnSubFamiliesViewSource)); } } - private ObservableCollection _yarnmanufacturer; + private ObservableCollection _yarntexturings; /// - /// Gets or sets the YarnManufacturer. + /// Gets or sets the YarnTexturings. /// - public ObservableCollection YarnManufacturer + public ObservableCollection YarnTexturings { get { - return _yarnmanufacturer; + return _yarntexturings; } set { - _yarnmanufacturer = value; RaisePropertyChanged(nameof(YarnManufacturer)); + _yarntexturings = value; RaisePropertyChanged(nameof(YarnTexturings)); } } - private ICollectionView _yarnmanufacturerViewSource; + private ICollectionView _yarntexturingsViewSource; /// - /// Gets or sets the YarnManufacturer View Source. + /// Gets or sets the YarnTexturings View Source. /// - public ICollectionView YarnManufacturerViewSource + public ICollectionView YarnTexturingsViewSource { get { - return _yarnmanufacturerViewSource; + return _yarntexturingsViewSource; } set { - _yarnmanufacturerViewSource = value; RaisePropertyChanged(nameof(YarnManufacturerViewSource)); + _yarntexturingsViewSource = value; RaisePropertyChanged(nameof(YarnTexturingsViewSource)); } } - private ObservableCollection _yarnmaterials; + private ObservableCollection _yarntypes; /// - /// Gets or sets the YarnMaterials. + /// Gets or sets the YarnTypes. /// - public ObservableCollection YarnMaterials + public ObservableCollection YarnTypes { get { - return _yarnmaterials; + return _yarntypes; } set { - _yarnmaterials = value; RaisePropertyChanged(nameof(YarnMaterials)); + _yarntypes = value; RaisePropertyChanged(nameof(YarnTypes)); } } - private ICollectionView _yarnmaterialsViewSource; + private ICollectionView _yarntypesViewSource; /// - /// Gets or sets the YarnMaterials View Source. + /// Gets or sets the YarnTypes View Source. /// - public ICollectionView YarnMaterialsViewSource + public ICollectionView YarnTypesViewSource { get { - return _yarnmaterialsViewSource; + return _yarntypesViewSource; } set { - _yarnmaterialsViewSource = value; RaisePropertyChanged(nameof(YarnMaterialsViewSource)); + _yarntypesViewSource = value; RaisePropertyChanged(nameof(YarnTypesViewSource)); } } - private ObservableCollection _yarnsubfamily; + private ObservableCollection _yarnwhiteshades; /// - /// Gets or sets the YarnSubFamily. + /// Gets or sets the YarnWhiteShades. /// - public ObservableCollection YarnSubFamily + public ObservableCollection YarnWhiteShades { get { - return _yarnsubfamily; + return _yarnwhiteshades; } set { - _yarnsubfamily = value; RaisePropertyChanged(nameof(YarnSubFamily)); + _yarnwhiteshades = value; RaisePropertyChanged(nameof(YarnWhiteShades)); } } - private ICollectionView _yarnsubfamilyViewSource; + private ICollectionView _yarnwhiteshadesViewSource; /// - /// Gets or sets the YarnSubFamily View Source. + /// Gets or sets the YarnWhiteShades View Source. /// - public ICollectionView YarnSubFamilyViewSource - { - get - { - return _yarnsubfamilyViewSource; - } - - set - { - _yarnsubfamilyViewSource = value; RaisePropertyChanged(nameof(YarnSubFamilyViewSource)); - } - - } - - private ObservableCollection _yarntexturing; - /// - /// Gets or sets the YarnTexturing. - /// - public ObservableCollection YarnTexturing + public ICollectionView YarnWhiteShadesViewSource { get { - return _yarntexturing; + return _yarnwhiteshadesViewSource; } set { - _yarntexturing = value; RaisePropertyChanged(nameof(YarnTexturing)); - } - - } - - private ICollectionView _yarntexturingViewSource; - /// - /// Gets or sets the YarnTexturing View Source. - /// - public ICollectionView YarnTexturingViewSource - { - get - { - return _yarntexturingViewSource; - } - - set - { - _yarntexturingViewSource = value; RaisePropertyChanged(nameof(YarnTexturingViewSource)); - } - - } - - private ObservableCollection _yarntype; - /// - /// Gets or sets the YarnType. - /// - public ObservableCollection YarnType - { - get - { - return _yarntype; - } - - set - { - _yarntype = value; RaisePropertyChanged(nameof(YarnType)); - } - - } - - private ICollectionView _yarntypeViewSource; - /// - /// Gets or sets the YarnType View Source. - /// - public ICollectionView YarnTypeViewSource - { - get - { - return _yarntypeViewSource; - } - - set - { - _yarntypeViewSource = value; RaisePropertyChanged(nameof(YarnTypeViewSource)); + _yarnwhiteshadesViewSource = value; RaisePropertyChanged(nameof(YarnWhiteShadesViewSource)); } } @@ -3911,7 +3911,7 @@ namespace Tango.BL ColorProcessDataViewSource = CreateCollectionView(ColorProcessData); - ColorProcessFactorViewSource = CreateCollectionView(ColorProcessFactor); + ColorProcessFactorsViewSource = CreateCollectionView(ColorProcessFactors); ColorProcessParametersViewSource = CreateCollectionView(ColorProcessParameters); @@ -4015,6 +4015,8 @@ namespace Tango.BL PublishedProcedureProjectsVersionsViewSource = CreateCollectionView(PublishedProcedureProjectsVersions); + RmlExtensionTestResultsViewSource = CreateCollectionView(RmlExtensionTestResults); + RmlsViewSource = CreateCollectionView(Rmls); RmlsExtensionsViewSource = CreateCollectionView(RmlsExtensions); @@ -4025,6 +4027,8 @@ namespace Tango.BL RolesPermissionsViewSource = CreateCollectionView(RolesPermissions); + RubbingResultsViewSource = CreateCollectionView(RubbingResults); + SegmentsViewSource = CreateCollectionView(Segments); SitesViewSource = CreateCollectionView(Sites); @@ -4055,6 +4059,8 @@ namespace Tango.BL TechValvesViewSource = CreateCollectionView(TechValves); + TensileResultsViewSource = CreateCollectionView(TensileResults); + UsersViewSource = CreateCollectionView(Users); UsersRolesViewSource = CreateCollectionView(UsersRoles); @@ -4063,31 +4069,25 @@ namespace Tango.BL YarnApplicationsViewSource = CreateCollectionView(YarnApplications); - YarnBrandViewSource = CreateCollectionView(YarnBrand); - - YarnColorViewSource = CreateCollectionView(YarnColor); - - YarnEndUseViewSource = CreateCollectionView(YarnEndUse); - - YarnFamilyViewSource = CreateCollectionView(YarnFamily); + YarnBrandsViewSource = CreateCollectionView(YarnBrands); - YarnGeometryViewSource = CreateCollectionView(YarnGeometry); + YarnFamiliesViewSource = CreateCollectionView(YarnFamilies); - YarnGlossLevelViewSource = CreateCollectionView(YarnGlossLevel); + YarnGlossLevelsViewSource = CreateCollectionView(YarnGlossLevels); - YarnGroupViewSource = CreateCollectionView(YarnGroup); + YarnGroupsViewSource = CreateCollectionView(YarnGroups); - YarnIndustrysectorViewSource = CreateCollectionView(YarnIndustrysector); + YarnIndustrysectorsViewSource = CreateCollectionView(YarnIndustrysectors); - YarnManufacturerViewSource = CreateCollectionView(YarnManufacturer); + YarnManufacturersViewSource = CreateCollectionView(YarnManufacturers); - YarnMaterialsViewSource = CreateCollectionView(YarnMaterials); + YarnSubFamiliesViewSource = CreateCollectionView(YarnSubFamilies); - YarnSubFamilyViewSource = CreateCollectionView(YarnSubFamily); + YarnTexturingsViewSource = CreateCollectionView(YarnTexturings); - YarnTexturingViewSource = CreateCollectionView(YarnTexturing); + YarnTypesViewSource = CreateCollectionView(YarnTypes); - YarnTypeViewSource = CreateCollectionView(YarnType); + YarnWhiteShadesViewSource = CreateCollectionView(YarnWhiteShades); } } diff --git a/Software/Visual_Studio/Tango.BL/ObservablesStaticCollectionsExtension.cs b/Software/Visual_Studio/Tango.BL/ObservablesStaticCollectionsExtension.cs index daaf341a2..080a6fa92 100644 --- a/Software/Visual_Studio/Tango.BL/ObservablesStaticCollectionsExtension.cs +++ b/Software/Visual_Studio/Tango.BL/ObservablesStaticCollectionsExtension.cs @@ -665,38 +665,38 @@ namespace Tango.BL } - private ObservableCollection _colorprocessfactor; + private ObservableCollection _colorprocessfactors; /// - /// Gets or sets the ColorProcessFactor. + /// Gets or sets the ColorProcessFactors. /// - public ObservableCollection ColorProcessFactor + public ObservableCollection ColorProcessFactors { get { - return _colorprocessfactor; + return _colorprocessfactors; } set { - _colorprocessfactor = value; RaisePropertyChanged(nameof(ColorProcessFactor)); + _colorprocessfactors = value; RaisePropertyChanged(nameof(ColorProcessFactors)); } } - private ICollectionView _colorprocessfactorViewSource; + private ICollectionView _colorprocessfactorsViewSource; /// - /// Gets or sets the ColorProcessFactor View Source. + /// Gets or sets the ColorProcessFactors View Source. /// - public ICollectionView ColorProcessFactorViewSource + public ICollectionView ColorProcessFactorsViewSource { get { - return _colorprocessfactorViewSource; + return _colorprocessfactorsViewSource; } set { - _colorprocessfactorViewSource = value; RaisePropertyChanged(nameof(ColorProcessFactorViewSource)); + _colorprocessfactorsViewSource = value; RaisePropertyChanged(nameof(ColorProcessFactorsViewSource)); } } @@ -2537,6 +2537,42 @@ namespace Tango.BL } + private ObservableCollection _rmlextensiontestresults; + /// + /// Gets or sets the RmlExtensionTestResults. + /// + public ObservableCollection RmlExtensionTestResults + { + get + { + return _rmlextensiontestresults; + } + + set + { + _rmlextensiontestresults = value; RaisePropertyChanged(nameof(RmlExtensionTestResults)); + } + + } + + private ICollectionView _rmlextensiontestresultsViewSource; + /// + /// Gets or sets the RmlExtensionTestResults View Source. + /// + public ICollectionView RmlExtensionTestResultsViewSource + { + get + { + return _rmlextensiontestresultsViewSource; + } + + set + { + _rmlextensiontestresultsViewSource = value; RaisePropertyChanged(nameof(RmlExtensionTestResultsViewSource)); + } + + } + private ObservableCollection _rmls; /// /// Gets or sets the Rmls. @@ -2717,6 +2753,42 @@ namespace Tango.BL } + private ObservableCollection _rubbingresults; + /// + /// Gets or sets the RubbingResults. + /// + public ObservableCollection RubbingResults + { + get + { + return _rubbingresults; + } + + set + { + _rubbingresults = value; RaisePropertyChanged(nameof(RubbingResults)); + } + + } + + private ICollectionView _rubbingresultsViewSource; + /// + /// Gets or sets the RubbingResults View Source. + /// + public ICollectionView RubbingResultsViewSource + { + get + { + return _rubbingresultsViewSource; + } + + set + { + _rubbingresultsViewSource = value; RaisePropertyChanged(nameof(RubbingResultsViewSource)); + } + + } + private ObservableCollection _segments; /// /// Gets or sets the Segments. @@ -3257,6 +3329,42 @@ namespace Tango.BL } + private ObservableCollection _tensileresults; + /// + /// Gets or sets the TensileResults. + /// + public ObservableCollection TensileResults + { + get + { + return _tensileresults; + } + + set + { + _tensileresults = value; RaisePropertyChanged(nameof(TensileResults)); + } + + } + + private ICollectionView _tensileresultsViewSource; + /// + /// Gets or sets the TensileResults View Source. + /// + public ICollectionView TensileResultsViewSource + { + get + { + return _tensileresultsViewSource; + } + + set + { + _tensileresultsViewSource = value; RaisePropertyChanged(nameof(TensileResultsViewSource)); + } + + } + private ObservableCollection _users; /// /// Gets or sets the Users. @@ -3401,470 +3509,362 @@ namespace Tango.BL } - private ObservableCollection _yarnbrand; - /// - /// Gets or sets the YarnBrand. - /// - public ObservableCollection YarnBrand - { - get - { - return _yarnbrand; - } - - set - { - _yarnbrand = value; RaisePropertyChanged(nameof(YarnBrand)); - } - - } - - private ICollectionView _yarnbrandViewSource; + private ObservableCollection _yarnbrands; /// - /// Gets or sets the YarnBrand View Source. - /// - public ICollectionView YarnBrandViewSource - { - get - { - return _yarnbrandViewSource; - } - - set - { - _yarnbrandViewSource = value; RaisePropertyChanged(nameof(YarnBrandViewSource)); - } - - } - - private ObservableCollection _yarncolor; - /// - /// Gets or sets the YarnColor. + /// Gets or sets the YarnBrands. /// - public ObservableCollection YarnColor + public ObservableCollection YarnBrands { get { - return _yarncolor; + return _yarnbrands; } set { - _yarncolor = value; RaisePropertyChanged(nameof(YarnColor)); + _yarnbrands = value; RaisePropertyChanged(nameof(YarnBrands)); } } - private ICollectionView _yarncolorViewSource; + private ICollectionView _yarnbrandsViewSource; /// - /// Gets or sets the YarnColor View Source. + /// Gets or sets the YarnBrands View Source. /// - public ICollectionView YarnColorViewSource + public ICollectionView YarnBrandsViewSource { get { - return _yarncolorViewSource; + return _yarnbrandsViewSource; } set { - _yarncolorViewSource = value; RaisePropertyChanged(nameof(YarnColorViewSource)); + _yarnbrandsViewSource = value; RaisePropertyChanged(nameof(YarnBrandsViewSource)); } } - private ObservableCollection _yarnenduse; + private ObservableCollection _yarnfamilies; /// - /// Gets or sets the YarnEndUse. + /// Gets or sets the YarnFamilies. /// - public ObservableCollection YarnEndUse + public ObservableCollection YarnFamilies { get { - return _yarnenduse; + return _yarnfamilies; } set { - _yarnenduse = value; RaisePropertyChanged(nameof(YarnEndUse)); + _yarnfamilies = value; RaisePropertyChanged(nameof(YarnFamilies)); } } - private ICollectionView _yarnenduseViewSource; + private ICollectionView _yarnfamiliesViewSource; /// - /// Gets or sets the YarnEndUse View Source. + /// Gets or sets the YarnFamilies View Source. /// - public ICollectionView YarnEndUseViewSource + public ICollectionView YarnFamiliesViewSource { get { - return _yarnenduseViewSource; + return _yarnfamiliesViewSource; } set { - _yarnenduseViewSource = value; RaisePropertyChanged(nameof(YarnEndUseViewSource)); + _yarnfamiliesViewSource = value; RaisePropertyChanged(nameof(YarnFamiliesViewSource)); } } - private ObservableCollection _yarnfamily; + private ObservableCollection _yarnglosslevels; /// - /// Gets or sets the YarnFamily. + /// Gets or sets the YarnGlossLevels. /// - public ObservableCollection YarnFamily + public ObservableCollection YarnGlossLevels { get { - return _yarnfamily; + return _yarnglosslevels; } set { - _yarnfamily = value; RaisePropertyChanged(nameof(YarnFamily)); + _yarnglosslevels = value; RaisePropertyChanged(nameof(YarnGlossLevels)); } } - private ICollectionView _yarnfamilyViewSource; + private ICollectionView _yarnglosslevelsViewSource; /// - /// Gets or sets the YarnFamily View Source. + /// Gets or sets the YarnGlossLevels View Source. /// - public ICollectionView YarnFamilyViewSource + public ICollectionView YarnGlossLevelsViewSource { get { - return _yarnfamilyViewSource; + return _yarnglosslevelsViewSource; } set { - _yarnfamilyViewSource = value; RaisePropertyChanged(nameof(YarnFamilyViewSource)); + _yarnglosslevelsViewSource = value; RaisePropertyChanged(nameof(YarnGlossLevelsViewSource)); } } - private ObservableCollection _yarngeometry; + private ObservableCollection _yarngroups; /// - /// Gets or sets the YarnGeometry. + /// Gets or sets the YarnGroups. /// - public ObservableCollection YarnGeometry + public ObservableCollection YarnGroups { get { - return _yarngeometry; + return _yarngroups; } set { - _yarngeometry = value; RaisePropertyChanged(nameof(YarnGeometry)); + _yarngroups = value; RaisePropertyChanged(nameof(YarnGroups)); } } - private ICollectionView _yarngeometryViewSource; + private ICollectionView _yarngroupsViewSource; /// - /// Gets or sets the YarnGeometry View Source. + /// Gets or sets the YarnGroups View Source. /// - public ICollectionView YarnGeometryViewSource + public ICollectionView YarnGroupsViewSource { get { - return _yarngeometryViewSource; + return _yarngroupsViewSource; } set { - _yarngeometryViewSource = value; RaisePropertyChanged(nameof(YarnGeometryViewSource)); + _yarngroupsViewSource = value; RaisePropertyChanged(nameof(YarnGroupsViewSource)); } } - private ObservableCollection _yarnglosslevel; + private ObservableCollection _yarnindustrysectors; /// - /// Gets or sets the YarnGlossLevel. + /// Gets or sets the YarnIndustrysectors. /// - public ObservableCollection YarnGlossLevel + public ObservableCollection YarnIndustrysectors { get { - return _yarnglosslevel; + return _yarnindustrysectors; } set { - _yarnglosslevel = value; RaisePropertyChanged(nameof(YarnGlossLevel)); + _yarnindustrysectors = value; RaisePropertyChanged(nameof(YarnIndustrysectors)); } } - private ICollectionView _yarnglosslevelViewSource; + private ICollectionView _yarnindustrysectorsViewSource; /// - /// Gets or sets the YarnGlossLevel View Source. + /// Gets or sets the YarnIndustrysectors View Source. /// - public ICollectionView YarnGlossLevelViewSource + public ICollectionView YarnIndustrysectorsViewSource { get { - return _yarnglosslevelViewSource; + return _yarnindustrysectorsViewSource; } set { - _yarnglosslevelViewSource = value; RaisePropertyChanged(nameof(YarnGlossLevelViewSource)); + _yarnindustrysectorsViewSource = value; RaisePropertyChanged(nameof(YarnIndustrysectorsViewSource)); } } - private ObservableCollection _yarngroup; + private ObservableCollection _yarnmanufacturers; /// - /// Gets or sets the YarnGroup. + /// Gets or sets the YarnManufacturers. /// - public ObservableCollection YarnGroup + public ObservableCollection YarnManufacturers { get { - return _yarngroup; + return _yarnmanufacturers; } set { - _yarngroup = value; RaisePropertyChanged(nameof(YarnGroup)); + _yarnmanufacturers = value; RaisePropertyChanged(nameof(YarnManufacturers)); } } - private ICollectionView _yarngroupViewSource; + private ICollectionView _yarnmanufacturersViewSource; /// - /// Gets or sets the YarnGroup View Source. + /// Gets or sets the YarnManufacturers View Source. /// - public ICollectionView YarnGroupViewSource + public ICollectionView YarnManufacturersViewSource { get { - return _yarngroupViewSource; + return _yarnmanufacturersViewSource; } set { - _yarngroupViewSource = value; RaisePropertyChanged(nameof(YarnGroupViewSource)); + _yarnmanufacturersViewSource = value; RaisePropertyChanged(nameof(YarnManufacturersViewSource)); } } - private ObservableCollection _yarnindustrysector; + private ObservableCollection _yarnsubfamilies; /// - /// Gets or sets the YarnIndustrysector. + /// Gets or sets the YarnSubFamilies. /// - public ObservableCollection YarnIndustrysector + public ObservableCollection YarnSubFamilies { get { - return _yarnindustrysector; + return _yarnsubfamilies; } set { - _yarnindustrysector = value; RaisePropertyChanged(nameof(YarnIndustrysector)); + _yarnsubfamilies = value; RaisePropertyChanged(nameof(YarnSubFamilies)); } } - private ICollectionView _yarnindustrysectorViewSource; + private ICollectionView _yarnsubfamiliesViewSource; /// - /// Gets or sets the YarnIndustrysector View Source. + /// Gets or sets the YarnSubFamilies View Source. /// - public ICollectionView YarnIndustrysectorViewSource + public ICollectionView YarnSubFamiliesViewSource { get { - return _yarnindustrysectorViewSource; + return _yarnsubfamiliesViewSource; } set { - _yarnindustrysectorViewSource = value; RaisePropertyChanged(nameof(YarnIndustrysectorViewSource)); + _yarnsubfamiliesViewSource = value; RaisePropertyChanged(nameof(YarnSubFamiliesViewSource)); } } - private ObservableCollection _yarnmanufacturer; + private ObservableCollection _yarntexturings; /// - /// Gets or sets the YarnManufacturer. + /// Gets or sets the YarnTexturings. /// - public ObservableCollection YarnManufacturer + public ObservableCollection YarnTexturings { get { - return _yarnmanufacturer; + return _yarntexturings; } set { - _yarnmanufacturer = value; RaisePropertyChanged(nameof(YarnManufacturer)); + _yarntexturings = value; RaisePropertyChanged(nameof(YarnTexturings)); } } - private ICollectionView _yarnmanufacturerViewSource; + private ICollectionView _yarntexturingsViewSource; /// - /// Gets or sets the YarnManufacturer View Source. + /// Gets or sets the YarnTexturings View Source. /// - public ICollectionView YarnManufacturerViewSource + public ICollectionView YarnTexturingsViewSource { get { - return _yarnmanufacturerViewSource; + return _yarntexturingsViewSource; } set { - _yarnmanufacturerViewSource = value; RaisePropertyChanged(nameof(YarnManufacturerViewSource)); + _yarntexturingsViewSource = value; RaisePropertyChanged(nameof(YarnTexturingsViewSource)); } } - private ObservableCollection _yarnmaterials; + private ObservableCollection _yarntypes; /// - /// Gets or sets the YarnMaterials. + /// Gets or sets the YarnTypes. /// - public ObservableCollection YarnMaterials + public ObservableCollection YarnTypes { get { - return _yarnmaterials; + return _yarntypes; } set { - _yarnmaterials = value; RaisePropertyChanged(nameof(YarnMaterials)); + _yarntypes = value; RaisePropertyChanged(nameof(YarnTypes)); } } - private ICollectionView _yarnmaterialsViewSource; + private ICollectionView _yarntypesViewSource; /// - /// Gets or sets the YarnMaterials View Source. + /// Gets or sets the YarnTypes View Source. /// - public ICollectionView YarnMaterialsViewSource + public ICollectionView YarnTypesViewSource { get { - return _yarnmaterialsViewSource; + return _yarntypesViewSource; } set { - _yarnmaterialsViewSource = value; RaisePropertyChanged(nameof(YarnMaterialsViewSource)); + _yarntypesViewSource = value; RaisePropertyChanged(nameof(YarnTypesViewSource)); } } - private ObservableCollection _yarnsubfamily; + private ObservableCollection _yarnwhiteshades; /// - /// Gets or sets the YarnSubFamily. + /// Gets or sets the YarnWhiteShades. /// - public ObservableCollection YarnSubFamily + public ObservableCollection YarnWhiteShades { get { - return _yarnsubfamily; + return _yarnwhiteshades; } set { - _yarnsubfamily = value; RaisePropertyChanged(nameof(YarnSubFamily)); + _yarnwhiteshades = value; RaisePropertyChanged(nameof(YarnWhiteShades)); } } - private ICollectionView _yarnsubfamilyViewSource; + private ICollectionView _yarnwhiteshadesViewSource; /// - /// Gets or sets the YarnSubFamily View Source. + /// Gets or sets the YarnWhiteShades View Source. /// - public ICollectionView YarnSubFamilyViewSource - { - get - { - return _yarnsubfamilyViewSource; - } - - set - { - _yarnsubfamilyViewSource = value; RaisePropertyChanged(nameof(YarnSubFamilyViewSource)); - } - - } - - private ObservableCollection _yarntexturing; - /// - /// Gets or sets the YarnTexturing. - /// - public ObservableCollection YarnTexturing + public ICollectionView YarnWhiteShadesViewSource { get { - return _yarntexturing; + return _yarnwhiteshadesViewSource; } set { - _yarntexturing = value; RaisePropertyChanged(nameof(YarnTexturing)); - } - - } - - private ICollectionView _yarntexturingViewSource; - /// - /// Gets or sets the YarnTexturing View Source. - /// - public ICollectionView YarnTexturingViewSource - { - get - { - return _yarntexturingViewSource; - } - - set - { - _yarntexturingViewSource = value; RaisePropertyChanged(nameof(YarnTexturingViewSource)); - } - - } - - private ObservableCollection _yarntype; - /// - /// Gets or sets the YarnType. - /// - public ObservableCollection YarnType - { - get - { - return _yarntype; - } - - set - { - _yarntype = value; RaisePropertyChanged(nameof(YarnType)); - } - - } - - private ICollectionView _yarntypeViewSource; - /// - /// Gets or sets the YarnType View Source. - /// - public ICollectionView YarnTypeViewSource - { - get - { - return _yarntypeViewSource; - } - - set - { - _yarntypeViewSource = value; RaisePropertyChanged(nameof(YarnTypeViewSource)); + _yarnwhiteshadesViewSource = value; RaisePropertyChanged(nameof(YarnWhiteShadesViewSource)); } } @@ -3911,7 +3911,7 @@ namespace Tango.BL ColorProcessDataViewSource = CreateCollectionView(ColorProcessData); - ColorProcessFactorViewSource = CreateCollectionView(ColorProcessFactor); + ColorProcessFactorsViewSource = CreateCollectionView(ColorProcessFactors); ColorProcessParametersViewSource = CreateCollectionView(ColorProcessParameters); @@ -4015,6 +4015,8 @@ namespace Tango.BL PublishedProcedureProjectsVersionsViewSource = CreateCollectionView(PublishedProcedureProjectsVersions); + RmlExtensionTestResultsViewSource = CreateCollectionView(RmlExtensionTestResults); + RmlsViewSource = CreateCollectionView(Rmls); RmlsExtensionsViewSource = CreateCollectionView(RmlsExtensions); @@ -4025,6 +4027,8 @@ namespace Tango.BL RolesPermissionsViewSource = CreateCollectionView(RolesPermissions); + RubbingResultsViewSource = CreateCollectionView(RubbingResults); + SegmentsViewSource = CreateCollectionView(Segments); SitesViewSource = CreateCollectionView(Sites); @@ -4055,6 +4059,8 @@ namespace Tango.BL TechValvesViewSource = CreateCollectionView(TechValves); + TensileResultsViewSource = CreateCollectionView(TensileResults); + UsersViewSource = CreateCollectionView(Users); UsersRolesViewSource = CreateCollectionView(UsersRoles); @@ -4063,31 +4069,25 @@ namespace Tango.BL YarnApplicationsViewSource = CreateCollectionView(YarnApplications); - YarnBrandViewSource = CreateCollectionView(YarnBrand); - - YarnColorViewSource = CreateCollectionView(YarnColor); - - YarnEndUseViewSource = CreateCollectionView(YarnEndUse); - - YarnFamilyViewSource = CreateCollectionView(YarnFamily); + YarnBrandsViewSource = CreateCollectionView(YarnBrands); - YarnGeometryViewSource = CreateCollectionView(YarnGeometry); + YarnFamiliesViewSource = CreateCollectionView(YarnFamilies); - YarnGlossLevelViewSource = CreateCollectionView(YarnGlossLevel); + YarnGlossLevelsViewSource = CreateCollectionView(YarnGlossLevels); - YarnGroupViewSource = CreateCollectionView(YarnGroup); + YarnGroupsViewSource = CreateCollectionView(YarnGroups); - YarnIndustrysectorViewSource = CreateCollectionView(YarnIndustrysector); + YarnIndustrysectorsViewSource = CreateCollectionView(YarnIndustrysectors); - YarnManufacturerViewSource = CreateCollectionView(YarnManufacturer); + YarnManufacturersViewSource = CreateCollectionView(YarnManufacturers); - YarnMaterialsViewSource = CreateCollectionView(YarnMaterials); + YarnSubFamiliesViewSource = CreateCollectionView(YarnSubFamilies); - YarnSubFamilyViewSource = CreateCollectionView(YarnSubFamily); + YarnTexturingsViewSource = CreateCollectionView(YarnTexturings); - YarnTexturingViewSource = CreateCollectionView(YarnTexturing); + YarnTypesViewSource = CreateCollectionView(YarnTypes); - YarnTypeViewSource = CreateCollectionView(YarnType); + YarnWhiteShadesViewSource = CreateCollectionView(YarnWhiteShades); } } diff --git a/Software/Visual_Studio/Tango.BL/Tango.BL.csproj b/Software/Visual_Studio/Tango.BL/Tango.BL.csproj index a0f33ac59..d456f5e0d 100644 --- a/Software/Visual_Studio/Tango.BL/Tango.BL.csproj +++ b/Software/Visual_Studio/Tango.BL/Tango.BL.csproj @@ -117,6 +117,7 @@ + @@ -284,6 +285,8 @@ + + @@ -292,6 +295,8 @@ + + @@ -322,6 +327,8 @@ + + @@ -332,14 +339,8 @@ - - - - - - @@ -348,14 +349,14 @@ - - + + @@ -450,12 +451,16 @@ + + + + @@ -482,6 +487,8 @@ + + @@ -489,14 +496,8 @@ - - - - - - @@ -505,26 +506,29 @@ - - + + + + + diff --git a/Software/Visual_Studio/Tango.ContinuousPumpsActivation.UI/App.config b/Software/Visual_Studio/Tango.ContinuousPumpsActivation.UI/App.config new file mode 100644 index 000000000..731f6de6c --- /dev/null +++ b/Software/Visual_Studio/Tango.ContinuousPumpsActivation.UI/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Software/Visual_Studio/Tango.ContinuousPumpsActivation.UI/App.xaml b/Software/Visual_Studio/Tango.ContinuousPumpsActivation.UI/App.xaml new file mode 100644 index 000000000..60c72e43b --- /dev/null +++ b/Software/Visual_Studio/Tango.ContinuousPumpsActivation.UI/App.xaml @@ -0,0 +1,56 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Segoe UI + Lucida Console + + 28 + 26 + 20 + 16 + 14 + 12 + 9 + + + diff --git a/Software/Visual_Studio/Tango.ContinuousPumpsActivation.UI/App.xaml.cs b/Software/Visual_Studio/Tango.ContinuousPumpsActivation.UI/App.xaml.cs new file mode 100644 index 000000000..0c202da81 --- /dev/null +++ b/Software/Visual_Studio/Tango.ContinuousPumpsActivation.UI/App.xaml.cs @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; +using System.Configuration; +using System.Data; +using System.Linq; +using System.Threading.Tasks; +using System.Windows; + +namespace Tango.ContinuousPumpsActivation.UI +{ + /// + /// Interaction logic for App.xaml + /// + public partial class App : Application + { + } +} diff --git a/Software/Visual_Studio/Tango.ContinuousPumpsActivation.UI/MainWindow.xaml b/Software/Visual_Studio/Tango.ContinuousPumpsActivation.UI/MainWindow.xaml new file mode 100644 index 000000000..7b33b8730 --- /dev/null +++ b/Software/Visual_Studio/Tango.ContinuousPumpsActivation.UI/MainWindow.xaml @@ -0,0 +1,66 @@ + + + + + + + + + Status + Set Values + + + + + + + + + + + + + + + + + + + + + + + + + + + + + TIME: + + + + + + + + + + + diff --git a/Software/Visual_Studio/Tango.ContinuousPumpsActivation.UI/MainWindow.xaml.cs b/Software/Visual_Studio/Tango.ContinuousPumpsActivation.UI/MainWindow.xaml.cs new file mode 100644 index 000000000..315beb3fd --- /dev/null +++ b/Software/Visual_Studio/Tango.ContinuousPumpsActivation.UI/MainWindow.xaml.cs @@ -0,0 +1,39 @@ +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.ContinuousPumpsActivation.UI.ViewModels; + +namespace Tango.ContinuousPumpsActivation.UI +{ + /// + /// Interaction logic for MainWindow.xaml + /// + public partial class MainWindow : Window + { + private MainWindowVM _vm; + + public MainWindow() + { + InitializeComponent(); + _vm = new MainWindowVM(); + DataContext = _vm; + Closing += MainWindow_Closing; + } + + private void MainWindow_Closing(object sender, System.ComponentModel.CancelEventArgs e) + { + _vm.ClosePorts(); ; + } + } +} diff --git a/Software/Visual_Studio/Tango.ContinuousPumpsActivation.UI/Model/PumpModel.cs b/Software/Visual_Studio/Tango.ContinuousPumpsActivation.UI/Model/PumpModel.cs new file mode 100644 index 000000000..4f502921b --- /dev/null +++ b/Software/Visual_Studio/Tango.ContinuousPumpsActivation.UI/Model/PumpModel.cs @@ -0,0 +1,196 @@ +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.IO.Ports; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Media; +using Tango.Core; + +namespace Tango.ContinuousPumpsActivation.UI.Model +{ + public class PumpModel : ExtendedObject + { + const char ETX = '\x0d'; + private List _availablePortNames; + + public List AvailablePortNames + { + get { return _availablePortNames; } + set + { + _availablePortNames = value; + RaisePropertyChangedAuto(); + } + } + + private string _pumpName; + + public string PumpName + { + get { return _pumpName; } + set { _pumpName = value; + + RaisePropertyChangedAuto(); + } + } + + + private string _portName; + + public string PortName + { + get { return _portName; } + set + { + if (_portName != value) + { + _portName = value; + OnPortNameChanged(); + RaisePropertyChangedAuto(); + } + + } + } + + private SerialPort _port; + + public SerialPort Port + { + get { return _port; } + set { _port = value; + RaisePropertyChangedAuto(); + } + } + + private double _status; + + public double Status + { + get { return _status; } + set { _status = value; + RaisePropertyChangedAuto(); + } + } + + private double _setValue; + + public double SetValue + { + get { return _setValue; } + set { + _setValue = value; + RaisePropertyChangedAuto(); + } + } + + private Color _pumpColor; + + public Color PumpColor + { + get { return _pumpColor; } + set { _pumpColor = value; + RaisePropertyChangedAuto(); + } + } + + + + public PumpModel(string pumpname, string defaultPortname, Color color, List availablePortNames) + { + PumpName = pumpname; + PortName = defaultPortname; + Status = 0.0; + SetValue = 0.0; + PumpColor = color; + AvailablePortNames = availablePortNames; + } + + private void OnPortNameChanged() + { + if (Port != null && Port.IsOpen) + { + Port.Close(); + } + Port = null; + SetAndOpenPort(); + } + + public void SetAndOpenPort() + { + if (String.IsNullOrEmpty(PortName)) + return; + try + { + if (Port == null) + { + Port = new SerialPort(PortName, 19200, Parity.None, 8, StopBits.One); + + Port.ErrorReceived += Port_ErrorReceived; + Port.DataReceived += Port_DataReceived; + Port.Open(); + //Write("spgmnr1"); + } + else if(!Port.IsOpen) + { + Port.Open(); + } + + } + catch (Exception ex) + { + Debug.WriteLine($"Error: {ex.Message}"); + } + } + + public void StartPump() + { + if(Port != null && Port.IsOpen) + { + Status = SetValue; + double value = 1000000 * SetValue; + var s = String.Format($"run2,0,{value },0,0,0{ETX}"); + Write(s); + } + } + + private void Port_DataReceived(object sender, SerialDataReceivedEventArgs e) + { + // throw new NotImplementedException(); + } + + private void Port_ErrorReceived(object sender, SerialErrorReceivedEventArgs e) + { + throw new NotImplementedException(); + } + + public void StopPump() + { + Status = 0; + if (Port!= null && Port.IsOpen) + { + Write($"stoppump{ETX}"); + + } + } + + public void ClosePort() + { + if (Port != null && Port.IsOpen) + { + Port.Close(); + } + } + + public void Write(string command) + { + if(Port != null && Port.IsOpen) + { + byte[] data = Encoding.ASCII.GetBytes(command); + Port.Write(data, 0, data.Length); + //Port.Write(command); + } + } + } +} diff --git a/Software/Visual_Studio/Tango.ContinuousPumpsActivation.UI/Properties/AssemblyInfo.cs b/Software/Visual_Studio/Tango.ContinuousPumpsActivation.UI/Properties/AssemblyInfo.cs new file mode 100644 index 000000000..5667dfed6 --- /dev/null +++ b/Software/Visual_Studio/Tango.ContinuousPumpsActivation.UI/Properties/AssemblyInfo.cs @@ -0,0 +1,55 @@ +using System.Reflection; +using System.Resources; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using System.Windows; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("Tango.ContinuousPumpsActivation.UI")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("Tango.ContinuousPumpsActivation.UI")] +[assembly: AssemblyCopyright("Copyright © 2021")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +//In order to begin building localizable applications, set +//CultureYouAreCodingWith in your .csproj file +//inside a . For example, if you are using US english +//in your source files, set the to en-US. Then uncomment +//the NeutralResourceLanguage attribute below. Update the "en-US" in +//the line below to match the UICulture setting in the project file. + +//[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)] + + +[assembly: ThemeInfo( + ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located + //(used if a resource is not found in the page, + // or application resource dictionaries) + ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located + //(used if a resource is not found in the page, + // app, or any theme specific resource dictionaries) +)] + + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Software/Visual_Studio/Tango.ContinuousPumpsActivation.UI/Properties/Resources.Designer.cs b/Software/Visual_Studio/Tango.ContinuousPumpsActivation.UI/Properties/Resources.Designer.cs new file mode 100644 index 000000000..97c4b575f --- /dev/null +++ b/Software/Visual_Studio/Tango.ContinuousPumpsActivation.UI/Properties/Resources.Designer.cs @@ -0,0 +1,71 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace Tango.ContinuousPumpsActivation.UI.Properties +{ + + + /// + /// A strongly-typed resource class, for looking up localized strings, etc. + /// + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class Resources + { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Resources() + { + } + + /// + /// Returns the cached ResourceManager instance used by this class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager + { + get + { + if ((resourceMan == null)) + { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Tango.ContinuousPumpsActivation.UI.Properties.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture + { + get + { + return resourceCulture; + } + set + { + resourceCulture = value; + } + } + } +} diff --git a/Software/Visual_Studio/Tango.ContinuousPumpsActivation.UI/Properties/Resources.resx b/Software/Visual_Studio/Tango.ContinuousPumpsActivation.UI/Properties/Resources.resx new file mode 100644 index 000000000..af7dbebba --- /dev/null +++ b/Software/Visual_Studio/Tango.ContinuousPumpsActivation.UI/Properties/Resources.resx @@ -0,0 +1,117 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/Software/Visual_Studio/Tango.ContinuousPumpsActivation.UI/Properties/Settings.Designer.cs b/Software/Visual_Studio/Tango.ContinuousPumpsActivation.UI/Properties/Settings.Designer.cs new file mode 100644 index 000000000..d15fb64ad --- /dev/null +++ b/Software/Visual_Studio/Tango.ContinuousPumpsActivation.UI/Properties/Settings.Designer.cs @@ -0,0 +1,30 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace Tango.ContinuousPumpsActivation.UI.Properties +{ + + + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")] + internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase + { + + private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); + + public static Settings Default + { + get + { + return defaultInstance; + } + } + } +} diff --git a/Software/Visual_Studio/Tango.ContinuousPumpsActivation.UI/Properties/Settings.settings b/Software/Visual_Studio/Tango.ContinuousPumpsActivation.UI/Properties/Settings.settings new file mode 100644 index 000000000..033d7a5e9 --- /dev/null +++ b/Software/Visual_Studio/Tango.ContinuousPumpsActivation.UI/Properties/Settings.settings @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/Software/Visual_Studio/Tango.ContinuousPumpsActivation.UI/Tango.ContinuousPumpsActivation.UI.csproj b/Software/Visual_Studio/Tango.ContinuousPumpsActivation.UI/Tango.ContinuousPumpsActivation.UI.csproj new file mode 100644 index 000000000..7a811e22b --- /dev/null +++ b/Software/Visual_Studio/Tango.ContinuousPumpsActivation.UI/Tango.ContinuousPumpsActivation.UI.csproj @@ -0,0 +1,177 @@ + + + + + Debug + AnyCPU + {FBEF8048-A18E-4F69-B4A5-0156CEABF140} + WinExe + Tango.ContinuousPumpsActivation.UI + Tango.ContinuousPumpsActivation.UI + v4.6.1 + 512 + {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + 4 + true + true + + + false + P:\ContiniusPumpsActivation app\ + true + Disk + false + Foreground + 7 + Days + false + false + true + 1 + 1.0.0.%2a + false + true + true + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + 30276058BB95DA153F06B52D1C7E2CDD8808331C + + + Tango.ContinuousPumpsActivation.UI_TemporaryKey.pfx + + + true + + + true + + + + ..\packages\ControlzEx.3.0.2.4\lib\net45\ControlzEx.dll + + + ..\packages\MahApps.Metro.1.6.5\lib\net46\MahApps.Metro.dll + + + ..\packages\MaterialDesignColors.1.2.2\lib\net45\MaterialDesignColors.dll + + + ..\packages\MaterialDesignThemes.3.0.1\lib\net45\MaterialDesignThemes.Wpf.dll + + + + + + ..\packages\ControlzEx.3.0.2.4\lib\net45\System.Windows.Interactivity.dll + + + + + + + + + 4.0 + + + + + + + + MSBuild:Compile + Designer + + + + + MSBuild:Compile + Designer + + + App.xaml + Code + + + MainWindow.xaml + Code + + + + + Code + + + True + True + Resources.resx + + + True + Settings.settings + True + + + ResXFileCodeGenerator + Resources.Designer.cs + + + + SettingsSingleFileGenerator + Settings.Designer.cs + + + + + + + + + {a34ee0f0-649d-41c8-8489-b6f1cc6924ee} + Tango.Core + + + {8491d07b-c1f6-4b62-a412-41b9fd2d6538} + Tango.SharedUI + + + + + False + Microsoft .NET Framework 4.6.1 %28x86 and x64%29 + true + + + False + .NET Framework 3.5 SP1 + false + + + + + + + This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. + + + + \ No newline at end of file diff --git a/Software/Visual_Studio/Tango.ContinuousPumpsActivation.UI/ViewModels/MainWindowVM.cs b/Software/Visual_Studio/Tango.ContinuousPumpsActivation.UI/ViewModels/MainWindowVM.cs new file mode 100644 index 000000000..0258932a0 --- /dev/null +++ b/Software/Visual_Studio/Tango.ContinuousPumpsActivation.UI/ViewModels/MainWindowVM.cs @@ -0,0 +1,156 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Tango.SharedUI; +using System.IO.Ports; +using System.Management; +using Tango.ContinuousPumpsActivation.UI.Model; +using System.Collections.ObjectModel; +using System.Windows.Media; +using System.Windows.Threading; +using Tango.Core.Commands; + +namespace Tango.ContinuousPumpsActivation.UI.ViewModels +{ + public class MainWindowVM: ViewModel + { + private DateTime _startTime; + + private List _availablePortNames; + + public List AvailablePortNames + { + get { return _availablePortNames; } + set { _availablePortNames = value; + RaisePropertyChangedAuto(); + } + } + + private ObservableCollection _pumps; + + public ObservableCollection Pumps + { + get { return _pumps; } + set { _pumps = value; + RaisePropertyChangedAuto(); + } + } + + public DispatcherTimer DispTimer { get; set; } + + private string _timer; + + public string Timer + { + get { return _timer; } + set { _timer = value; + RaisePropertyChangedAuto(); + } + } + + #region Commands + + public RelayCommand SetCommand { get; set; } + public RelayCommand StopCommand { get; set; } + + #endregion + + public MainWindowVM() + { + AvailablePortNames = new List(); + Pumps = new ObservableCollection(); + InitPorts(); + CreatePumps(); + DispTimer = new DispatcherTimer(); + DispTimer.Interval = TimeSpan.FromSeconds(1); + DispTimer.Tick += timer_Tick; + + SetCommand = new RelayCommand(SetActivation); + StopCommand = new RelayCommand(Stop); + } + + private void Stop(object obj) + { + DispTimer.Stop(); + Timer = "00:00:00"; + foreach (var pump in Pumps) + { + pump.StopPump(); + } + } + + private void SetActivation(object obj) + { + DispTimer.Start(); + _startTime = DateTime.Now; + foreach (var pump in Pumps) + { + pump.StartPump(); + } + } + + private void timer_Tick(object sender, EventArgs e) + { + Timer = (DateTime.Now - _startTime).ToString(@"hh\:mm\:ss"); + } + + public void InitPorts() + { + AvailablePortNames.Clear(); + using (var searcher = new ManagementObjectSearcher + ("SELECT * FROM Win32_PnPEntity WHERE Caption like '%(COM%'")) + { + string[] portnames = SerialPort.GetPortNames(); + var tports = searcher.Get().Cast().Select(p => p["Caption"].ToString()).ToList(); + foreach(var t in tports) + { + if(t.Contains("High-Speed USB Serial Port")) + { + int Start, End; + Start = t.IndexOf("(", 0); + End = t.IndexOf(")", Start); + var curCom = t.Substring(Start +1, End - Start -1); + var comName = portnames.Where(x => x.Contains(curCom)).FirstOrDefault(); + AvailablePortNames.Add(comName); + } + } + } + //var ports = SerialPort.GetPortNames(); + //foreach( var portName in ports) + //{ + // SerialPort port = new SerialPort(portName); + // if (portName.Contains("High-Speed")) + // { + // AvailablePortNames.Add(portName); + // } + //} + } + public void CreatePumps() + { + int index = 0; + Pumps.Add(new PumpModel($"Pump #{index}", AvailablePortNames.Count > index ? AvailablePortNames[index] : "", Colors.Cyan, AvailablePortNames)); + index++; + Pumps.Add(new PumpModel($"Pump #{index} - Low", AvailablePortNames.Count > index ? AvailablePortNames[index] : "", Colors.Magenta, AvailablePortNames)); + index++; + Pumps.Add(new PumpModel($"Pump #{index} - High", AvailablePortNames.Count > index ? AvailablePortNames[index] : "", Colors.Magenta, AvailablePortNames)); + index++; + Pumps.Add(new PumpModel($"Pump #{index}", AvailablePortNames.Count > index ? AvailablePortNames[index] : "", Colors.Yellow, AvailablePortNames)); + index++; + Pumps.Add(new PumpModel($"Pump #{index}", AvailablePortNames.Count > index ? AvailablePortNames[index] : "", Colors.Transparent, AvailablePortNames)); + //foreach (var pump in Pumps) + //{ + // pump.SetAndOpenPort(); + //} + } + + public void ClosePorts() + { + foreach (var pump in Pumps) + { + pump.ClosePort(); + } + } + } +} diff --git a/Software/Visual_Studio/Tango.ContinuousPumpsActivation.UI/packages.config b/Software/Visual_Studio/Tango.ContinuousPumpsActivation.UI/packages.config new file mode 100644 index 000000000..525af8e27 --- /dev/null +++ b/Software/Visual_Studio/Tango.ContinuousPumpsActivation.UI/packages.config @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/COLOR_PROCESS_DATA.cs b/Software/Visual_Studio/Tango.DAL.Remote/DB/COLOR_PROCESS_DATA.cs index 711e6597c..e3383a839 100644 --- a/Software/Visual_Studio/Tango.DAL.Remote/DB/COLOR_PROCESS_DATA.cs +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/COLOR_PROCESS_DATA.cs @@ -18,7 +18,7 @@ namespace Tango.DAL.Remote.DB public string GUID { get; set; } public System.DateTime LAST_UPDATED { get; set; } public string COLOR_PROCESS_PARAMETERS_GUID { get; set; } - public string COLOR_NAME { get; set; } + public int COLOR { get; set; } public int INK_NL_CM { get; set; } public double L { get; set; } public double A { get; set; } diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/COLOR_PROCESS_FACTOR.cs b/Software/Visual_Studio/Tango.DAL.Remote/DB/COLOR_PROCESS_FACTOR.cs deleted file mode 100644 index ad5eadb0a..000000000 --- a/Software/Visual_Studio/Tango.DAL.Remote/DB/COLOR_PROCESS_FACTOR.cs +++ /dev/null @@ -1,30 +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 COLOR_PROCESS_FACTOR - { - public int ID { get; set; } - public string GUID { get; set; } - public System.DateTime LAST_UPDATED { get; set; } - public string COLOR_PROCESS_PARAMETERS_GUID { get; set; } - public string COLOR_NAME { get; set; } - public int INK_NL_CM { get; set; } - public double L { get; set; } - public double A { get; set; } - public double B { get; set; } - public int FACTOR_PERCENT { get; set; } - - public virtual COLOR_PROCESS_PARAMETERS COLOR_PROCESS_PARAMETERS { get; set; } - } -} diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/COLOR_PROCESS_FACTORS.cs b/Software/Visual_Studio/Tango.DAL.Remote/DB/COLOR_PROCESS_FACTORS.cs new file mode 100644 index 000000000..e60f96ab7 --- /dev/null +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/COLOR_PROCESS_FACTORS.cs @@ -0,0 +1,30 @@ +//------------------------------------------------------------------------------ +// +// 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 COLOR_PROCESS_FACTORS + { + public int ID { get; set; } + public string GUID { get; set; } + public System.DateTime LAST_UPDATED { get; set; } + public string COLOR_PROCESS_PARAMETERS_GUID { get; set; } + public int COLOR { get; set; } + public int INK_NL_CM { get; set; } + public double L { get; set; } + public double A { get; set; } + public double B { get; set; } + public int FACTOR_PERCENT { get; set; } + + public virtual COLOR_PROCESS_PARAMETERS COLOR_PROCESS_PARAMETERS { get; set; } + } +} diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/COLOR_PROCESS_PARAMETERS.cs b/Software/Visual_Studio/Tango.DAL.Remote/DB/COLOR_PROCESS_PARAMETERS.cs index 3e620912e..6ae529cad 100644 --- a/Software/Visual_Studio/Tango.DAL.Remote/DB/COLOR_PROCESS_PARAMETERS.cs +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/COLOR_PROCESS_PARAMETERS.cs @@ -18,13 +18,14 @@ namespace Tango.DAL.Remote.DB public COLOR_PROCESS_PARAMETERS() { this.COLOR_PROCESS_DATA = new HashSet(); - this.COLOR_PROCESS_FACTOR = new HashSet(); + this.COLOR_PROCESS_FACTORS = new HashSet(); } 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 double WHITE_POINT_L { get; set; } public double WHITE_POINT_A { get; set; } public double WHITE_POINT_B { get; set; } @@ -32,7 +33,8 @@ namespace Tango.DAL.Remote.DB [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] public virtual ICollection COLOR_PROCESS_DATA { get; set; } [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] - public virtual ICollection COLOR_PROCESS_FACTOR { get; set; } + public virtual ICollection COLOR_PROCESS_FACTORS { get; set; } + public virtual MACHINE MACHINE { get; set; } public virtual RMLS_EXTENSIONS RMLS_EXTENSIONS { 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 0517885c5..78b1e0f63 100644 --- a/Software/Visual_Studio/Tango.DAL.Remote/DB/MACHINE.cs +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/MACHINE.cs @@ -18,9 +18,11 @@ namespace Tango.DAL.Remote.DB public MACHINE() { this.CATS = new HashSet(); + this.COLOR_PROCESS_PARAMETERS = new HashSet(); this.DATA_STORE_ITEMS = new HashSet(); this.JOBS = new HashSet(); this.MACHINES_EVENTS = new HashSet(); + this.RML_EXTENSION_TEST_RESULTS = new HashSet(); this.SPOOLS = new HashSet(); } @@ -64,6 +66,8 @@ namespace Tango.DAL.Remote.DB [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] public virtual ICollection CATS { get; set; } + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] + public virtual ICollection COLOR_PROCESS_PARAMETERS { get; set; } public virtual CONFIGURATION CONFIGURATION { get; set; } [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] public virtual ICollection DATA_STORE_ITEMS { get; set; } @@ -74,6 +78,8 @@ namespace Tango.DAL.Remote.DB public virtual ICollection MACHINES_EVENTS { get; set; } public virtual ORGANIZATION ORGANIZATION { get; set; } [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] + public virtual ICollection RML_EXTENSION_TEST_RESULTS { get; set; } + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] public virtual ICollection 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 a65820556..ceebfcbea 100644 --- a/Software/Visual_Studio/Tango.DAL.Remote/DB/RMLS_EXTENSIONS.cs +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/RMLS_EXTENSIONS.cs @@ -18,33 +18,28 @@ namespace Tango.DAL.Remote.DB public RMLS_EXTENSIONS() { this.COLOR_PROCESS_PARAMETERS = new HashSet(); + this.RML_EXTENSION_TEST_RESULTS = new HashSet(); } 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 USER_GUID { get; set; } + public string RMLS_GUID { get; set; } + public string USERS_GUID { get; set; } public System.DateTime CREATED { get; set; } public string YARN_MANUFACTURER_GUID { get; set; } public string YARN_BRAND_GUID { get; set; } public string COUNTRY { get; set; } - public string YARN_END_USE_GUID { get; set; } - public string YARN_APPLICATIONS_GUID { get; set; } + public string YARN_APPLICATION_GUID { get; set; } public string YARN_INDUSTRYSECTOR_GUID { get; set; } - public string YARN_MATERIAL_GUID { get; set; } public string YARN_TYPE_GUID { get; set; } public string YARN_FAMILY_GUID { get; set; } public string YARN_SUB_FAMILY_GUID { get; set; } public string YARN_GROUP_GUID { get; set; } public string YARN_TEXTURING_GUID { get; set; } - public string YARN_GEOMETRY_GUID { get; set; } - public string YARN_COLOR_GUID { get; set; } + public string YARN_WHITE_SHADE_GUID { get; set; } public string YARN_GLOSS_LEVEL_GUID { get; set; } - public int LINEAR_DENSITY { get; set; } - public int UNIT { get; set; } - public int PLIES { get; set; } - public int FILAMENT_COUNT { get; set; } + public int LINERAR_DENSITY { get; set; } public int TWIST_TPM { get; set; } public Nullable TWIST_DIRECTION { get; set; } public Nullable MIN_ELONGATION { get; set; } @@ -56,26 +51,23 @@ namespace Tango.DAL.Remote.DB public Nullable MIN_TENACITY { get; set; } public Nullable MAX_TENACITY { get; set; } public string FINISHING { get; set; } - public string FILE_NAME { get; set; } - public byte[] DATA { get; set; } + public int STATUS { get; set; } [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] public virtual ICollection COLOR_PROCESS_PARAMETERS { get; set; } + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] + public virtual ICollection RML_EXTENSION_TEST_RESULTS { get; set; } public virtual RML RML { get; set; } - public virtual USER USER { get; set; } public virtual YARN_APPLICATIONS YARN_APPLICATIONS { get; set; } - public virtual YARN_BRAND YARN_BRAND { get; set; } - public virtual YARN_COLOR YARN_COLOR { get; set; } - public virtual YARN_END_USE YARN_END_USE { get; set; } - public virtual YARN_FAMILY YARN_FAMILY { get; set; } - public virtual YARN_GEOMETRY YARN_GEOMETRY { get; set; } - public virtual YARN_GLOSS_LEVEL YARN_GLOSS_LEVEL { get; set; } - public virtual YARN_GROUP YARN_GROUP { get; set; } - public virtual YARN_INDUSTRYSECTOR YARN_INDUSTRYSECTOR { get; set; } - public virtual YARN_MANUFACTURER YARN_MANUFACTURER { get; set; } - public virtual YARN_MATERIALS YARN_MATERIALS { get; set; } - public virtual YARN_SUB_FAMILY YARN_SUB_FAMILY { get; set; } - public virtual YARN_TEXTURING YARN_TEXTURING { get; set; } - public virtual YARN_TYPE YARN_TYPE { get; set; } + public virtual YARN_BRANDS YARN_BRANDS { get; set; } + public virtual YARN_FAMILIES YARN_FAMILIES { get; set; } + public virtual YARN_GLOSS_LEVELS YARN_GLOSS_LEVELS { get; set; } + public virtual YARN_GROUPS YARN_GROUPS { get; set; } + public virtual YARN_INDUSTRYSECTORS YARN_INDUSTRYSECTORS { get; set; } + public virtual YARN_MANUFACTURERS YARN_MANUFACTURERS { get; set; } + public virtual YARN_SUB_FAMILIES YARN_SUB_FAMILIES { get; set; } + 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; } } } 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 new file mode 100644 index 000000000..78e003062 --- /dev/null +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/RML_EXTENSION_TEST_RESULTS.cs @@ -0,0 +1,67 @@ +//------------------------------------------------------------------------------ +// +// 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 RML_EXTENSION_TEST_RESULTS + { + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")] + public RML_EXTENSION_TEST_RESULTS() + { + this.RUBBING_RESULTS = new HashSet(); + this.TENSILE_RESULTS = new HashSet(); + } + + 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 int RESULT_INDEX { get; set; } + public string NAME { get; set; } + public Nullable DRYER_TEMPERATURE { get; set; } + public Nullable TUNNEL_TEMPERATURE { get; set; } + public Nullable TUNNEL_FLOW { get; set; } + public Nullable TUNNEL_AVG_TEMPERATURE { get; set; } + public Nullable TENSION_HEAD_MIN { get; set; } + public Nullable TENSION_HEAD_MAX { get; set; } + public Nullable TENSION_AFTER_DRYER_MIN { get; set; } + public Nullable TENSIOIN_AFTER_DRYER_MAX { get; set; } + public Nullable TENSION_WINDER_MIN { get; set; } + public Nullable TENSION_WINDER_MAX { get; set; } + public Nullable BTSR_MIN { get; set; } + public Nullable BTSR_MAX { get; set; } + public Nullable PULLER_TENSION_MIN { get; set; } + public Nullable PULLER_TENSION_MAX { get; set; } + public Nullable EXIT_TENSION_MIN { get; set; } + public Nullable EXIT_TENSION_MAX { get; set; } + public Nullable SEVERITY_ZONE1_MIN { get; set; } + public Nullable SEVERITY_ZONE1_MAX { get; set; } + public Nullable SEVERITY_ZONE2_MIN { get; set; } + public Nullable SEVERITY_ZONE2_MAX { get; set; } + public string COMMENT { get; set; } + public string CONCLUSIONS { get; set; } + public string REF_LUB_VERSION { get; set; } + public Nullable REF_COF { get; set; } + public Nullable REF_LUB { get; set; } + public string THREAD_LUB_VERSION { get; set; } + public Nullable THREAD_COF { get; set; } + public Nullable THREAD_LUB { 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 RUBBING_RESULTS { get; set; } + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] + public virtual ICollection TENSILE_RESULTS { get; set; } + } +} diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/RUBBING_RESULTS.cs b/Software/Visual_Studio/Tango.DAL.Remote/DB/RUBBING_RESULTS.cs new file mode 100644 index 000000000..956852ad9 --- /dev/null +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/RUBBING_RESULTS.cs @@ -0,0 +1,31 @@ +//------------------------------------------------------------------------------ +// +// 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 RUBBING_RESULTS + { + 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 Nullable COLOR { get; set; } + public Nullable DELTAE_CIE_100 { get; set; } + public Nullable GS_100_MIN { get; set; } + public Nullable GS_100_MAX { get; set; } + public Nullable DELTAE_CIE_200 { get; set; } + public Nullable GS_200_MIN { get; set; } + public Nullable GS_200_MAX { 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 a37de51db..c27c85971 100644 --- a/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.Context.cs +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.Context.cs @@ -43,7 +43,7 @@ namespace Tango.DAL.Remote.DB public virtual DbSet COLOR_CATALOGS_ITEMS { get; set; } public virtual DbSet COLOR_CATALOGS_ITEMS_RECIPES { get; set; } public virtual DbSet COLOR_PROCESS_DATA { get; set; } - public virtual DbSet COLOR_PROCESS_FACTOR { get; set; } + public virtual DbSet COLOR_PROCESS_FACTORS { get; set; } public virtual DbSet COLOR_PROCESS_PARAMETERS { get; set; } public virtual DbSet COLOR_SPACES { get; set; } public virtual DbSet CONFIGURATIONS { get; set; } @@ -95,11 +95,13 @@ namespace Tango.DAL.Remote.DB public virtual DbSet PROCESS_PARAMETERS_TABLES_GROUPS { get; set; } public virtual DbSet PUBLISHED_PROCEDURE_PROJECTS { get; set; } public virtual DbSet PUBLISHED_PROCEDURE_PROJECTS_VERSIONS { get; set; } + public virtual DbSet RML_EXTENSION_TEST_RESULTS { get; set; } public virtual DbSet RMLS { get; set; } public virtual DbSet RMLS_EXTENSIONS { get; set; } public virtual DbSet RMLS_SPOOLS { get; set; } public virtual DbSet ROLES { get; set; } public virtual DbSet ROLES_PERMISSIONS { get; set; } + public virtual DbSet RUBBING_RESULTS { get; set; } public virtual DbSet SEGMENTS { get; set; } public virtual DbSet SITES { get; set; } public virtual DbSet SITES_CATALOGS { get; set; } @@ -115,22 +117,20 @@ namespace Tango.DAL.Remote.DB public virtual DbSet TECH_IOS { get; set; } public virtual DbSet TECH_MONITORS { get; set; } public virtual DbSet TECH_VALVES { get; set; } + public virtual DbSet TENSILE_RESULTS { get; set; } public virtual DbSet USERS { get; set; } public virtual DbSet USERS_ROLES { get; set; } public virtual DbSet WINDING_METHODS { get; set; } public virtual DbSet YARN_APPLICATIONS { get; set; } - public virtual DbSet YARN_BRAND { get; set; } - public virtual DbSet YARN_COLOR { get; set; } - public virtual DbSet YARN_END_USE { get; set; } - public virtual DbSet YARN_FAMILY { get; set; } - public virtual DbSet YARN_GEOMETRY { get; set; } - public virtual DbSet YARN_GLOSS_LEVEL { get; set; } - public virtual DbSet YARN_GROUP { get; set; } - public virtual DbSet YARN_INDUSTRYSECTOR { get; set; } - public virtual DbSet YARN_MANUFACTURER { get; set; } - public virtual DbSet YARN_MATERIALS { get; set; } - public virtual DbSet YARN_SUB_FAMILY { get; set; } - public virtual DbSet YARN_TEXTURING { get; set; } - public virtual DbSet YARN_TYPE { get; set; } + public virtual DbSet YARN_BRANDS { get; set; } + public virtual DbSet YARN_FAMILIES { get; set; } + public virtual DbSet YARN_GLOSS_LEVELS { get; set; } + public virtual DbSet YARN_GROUPS { get; set; } + public virtual DbSet YARN_INDUSTRYSECTORS { get; set; } + public virtual DbSet YARN_MANUFACTURERS { get; set; } + public virtual DbSet YARN_SUB_FAMILIES { get; set; } + public virtual DbSet YARN_TEXTURINGS { get; set; } + public virtual DbSet YARN_TYPES { get; set; } + public virtual DbSet YARN_WHITE_SHADES { 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 79403a182..a9a953f71 100644 --- a/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx @@ -251,13 +251,13 @@ - + - + @@ -265,7 +265,7 @@ - + @@ -280,6 +280,7 @@ + @@ -1075,6 +1076,46 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -1139,28 +1180,22 @@ - - + + - - + - - - - - - - - + + + @@ -1172,8 +1207,7 @@ - - + @@ -1211,6 +1245,22 @@ + + + + + + + + + + + + + + + + @@ -1426,6 +1476,23 @@ + + + + + + + + + + + + + + + + + @@ -1472,25 +1539,7 @@ - - - - - - - - - - - - - - - - - - - + @@ -1499,7 +1548,7 @@ - + @@ -1508,7 +1557,7 @@ - + @@ -1517,7 +1566,7 @@ - + @@ -1526,7 +1575,7 @@ - + @@ -1535,7 +1584,7 @@ - + @@ -1544,7 +1593,7 @@ - + @@ -1553,7 +1602,7 @@ - + @@ -1562,7 +1611,7 @@ - + @@ -1571,16 +1620,7 @@ - - - - - - - - - - + @@ -1767,16 +1807,30 @@ - + - + + + + + + + + + + + + + + + @@ -2457,6 +2511,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -2575,19 +2657,7 @@ - - - - - - - - - - - - - + @@ -2599,15 +2669,15 @@ - + - - + + - + @@ -2615,35 +2685,11 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - + + - + @@ -2651,23 +2697,11 @@ - - - - - - - - - - - - - - + + - + @@ -2675,11 +2709,11 @@ - - + + - + @@ -2687,11 +2721,11 @@ - - + + - + @@ -2699,11 +2733,11 @@ - - + + - + @@ -2711,51 +2745,51 @@ - - + + - + - + - - + + - + - + - - + + - + - + - - + + - + - + @@ -2815,6 +2849,20 @@ + + + + + + + + + + + + + + @@ -2949,6 +2997,20 @@ + + + + + + + + + + + + + + @@ -3031,7 +3093,7 @@ - + @@ -3083,11 +3145,13 @@ + + @@ -3104,23 +3168,21 @@ + - - - - - - - - - - - - - + + + + + + + + + + @@ -3175,7 +3237,11 @@ - + + + + + @@ -3385,6 +3451,14 @@ + + + + + + + + @@ -3425,64 +3499,48 @@ - - - - - - - - - - - - - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - - - - - + + @@ -3501,6 +3559,10 @@ + + + + @@ -3541,6 +3603,10 @@ + + + + @@ -3585,7 +3651,7 @@ - + @@ -3637,11 +3703,13 @@ + + @@ -3657,23 +3725,21 @@ + - - - - - - - - - - - - - + + + + + + + + + + @@ -3772,7 +3838,11 @@ - + + + + + @@ -3966,6 +4036,10 @@ + + + + @@ -4010,6 +4084,18 @@ + + + + + + + + + + + + @@ -4022,64 +4108,48 @@ - - - - - - - - - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - - - - - - - - - + + @@ -4397,14 +4467,14 @@ - + - + @@ -4412,13 +4482,13 @@ - + - + @@ -4428,11 +4498,13 @@ + - + + @@ -5141,12 +5213,14 @@ + + @@ -5329,6 +5403,50 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -5410,28 +5528,22 @@ - - + + - - + - - - - - - - - + + + @@ -5443,25 +5555,21 @@ - - + + - - - - - - - - - - - - - - + + + + + + + + + + @@ -5505,6 +5613,23 @@ + + + + + + + + + + + + + + + + + @@ -5728,6 +5853,24 @@ + + + + + + + + + + + + + + + + + + @@ -5751,7 +5894,6 @@ - @@ -5789,7 +5931,7 @@ - + @@ -5797,9 +5939,9 @@ - + - + @@ -5807,9 +5949,9 @@ - + - + @@ -5817,9 +5959,9 @@ - + - + @@ -5827,9 +5969,9 @@ - + - + @@ -5837,9 +5979,9 @@ - + - + @@ -5847,9 +5989,9 @@ - + - + @@ -5857,9 +5999,9 @@ - + - + @@ -5867,9 +6009,9 @@ - + - + @@ -5877,9 +6019,9 @@ - + - + @@ -5887,37 +6029,7 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -6233,16 +6345,30 @@ - + - + + + + + + + + + + + + + + + @@ -6869,6 +6995,20 @@ + + + + + + + + + + + + + + @@ -7011,6 +7151,48 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -7021,7 +7203,7 @@ - + @@ -7053,18 +7235,6 @@ - - - - - - - - - - - - @@ -7073,15 +7243,15 @@ - + - - + + - + @@ -7089,35 +7259,11 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - + + - + @@ -7125,23 +7271,11 @@ - - - - - - - - - - - - - - + + - + @@ -7149,11 +7283,11 @@ - - + + - + @@ -7161,11 +7295,11 @@ - - + + - + @@ -7173,11 +7307,11 @@ - - + + - + @@ -7185,51 +7319,51 @@ - - + + - + - + - - + + - + - + - - + + - + - + - - + + - + - + @@ -7619,7 +7753,7 @@ - + @@ -7627,15 +7761,15 @@ - - - + + + - + @@ -7649,6 +7783,7 @@ + @@ -8497,6 +8632,47 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -8558,8 +8734,7 @@ - - + @@ -8571,28 +8746,22 @@ - - - - + - - + - - - + - - + + @@ -8638,6 +8807,23 @@ + + + + + + + + + + + + + + + + + @@ -8860,6 +9046,24 @@ + + + + + + + + + + + + + + + + + + @@ -8910,39 +9114,9 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + @@ -8950,9 +9124,9 @@ - - - + + + @@ -8960,9 +9134,9 @@ - - - + + + @@ -8970,9 +9144,9 @@ - - - + + + @@ -8980,9 +9154,9 @@ - - - + + + @@ -8990,9 +9164,9 @@ - - - + + + @@ -9000,9 +9174,9 @@ - - - + + + @@ -9010,9 +9184,9 @@ - - - + + + @@ -9020,9 +9194,9 @@ - - - + + + @@ -9030,9 +9204,9 @@ - - - + + + 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 017f43c06..4cf5ddcc0 100644 --- a/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx.diagram +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx.diagram @@ -4,113 +4,113 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -136,6 +136,7 @@ + @@ -184,6 +185,7 @@ + @@ -195,24 +197,23 @@ + + + - - - - - - - - - - - - - - + + + + + + + + + + diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/TENSILE_RESULTS.cs b/Software/Visual_Studio/Tango.DAL.Remote/DB/TENSILE_RESULTS.cs new file mode 100644 index 000000000..9db373bff --- /dev/null +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/TENSILE_RESULTS.cs @@ -0,0 +1,32 @@ +//------------------------------------------------------------------------------ +// +// 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 TENSILE_RESULTS + { + 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 Nullable COLOR_PERCENT { get; set; } + public Nullable COLOR { get; set; } + public Nullable MAX_LOAD { get; set; } + public Nullable STDEV_MAX_LOAD { get; set; } + public Nullable STRAIN_MAX_LOAD { get; set; } + public Nullable STDEV_STRAIN_MAX_LOAD { get; set; } + public Nullable PERCENT_CHANGE_LOAD { get; set; } + public Nullable PERCENT_CHANGE_STRAIN { get; set; } + + public virtual RML_EXTENSION_TEST_RESULTS RML_EXTENSION_TEST_RESULTS { get; set; } + } +} diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/USER.cs b/Software/Visual_Studio/Tango.DAL.Remote/DB/USER.cs index 375008753..75cc4e444 100644 --- a/Software/Visual_Studio/Tango.DAL.Remote/DB/USER.cs +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/USER.cs @@ -22,7 +22,6 @@ namespace Tango.DAL.Remote.DB this.JOBS = new HashSet(); this.MACHINE_STUDIO_VERSIONS = new HashSet(); this.MACHINES_EVENTS = new HashSet(); - this.RMLS_EXTENSIONS = new HashSet(); this.TANGO_VERSIONS = new HashSet(); this.USERS_ROLES = new HashSet(); } @@ -53,8 +52,6 @@ namespace Tango.DAL.Remote.DB public virtual ICollection MACHINES_EVENTS { get; set; } public virtual ORGANIZATION ORGANIZATION { get; set; } [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] - public virtual ICollection RMLS_EXTENSIONS { get; set; } - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] public virtual ICollection TANGO_VERSIONS { get; set; } [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] public virtual ICollection USERS_ROLES { get; set; } diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/YARN_BRAND.cs b/Software/Visual_Studio/Tango.DAL.Remote/DB/YARN_BRAND.cs deleted file mode 100644 index 2ba5f08cd..000000000 --- a/Software/Visual_Studio/Tango.DAL.Remote/DB/YARN_BRAND.cs +++ /dev/null @@ -1,31 +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 YARN_BRAND - { - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")] - public YARN_BRAND() - { - this.RMLS_EXTENSIONS = new HashSet(); - } - - public int ID { get; set; } - public string GUID { get; set; } - public System.DateTime LAST_UPDATED { get; set; } - public string NAME { get; set; } - - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] - public virtual ICollection RMLS_EXTENSIONS { get; set; } - } -} diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/YARN_BRANDS.cs b/Software/Visual_Studio/Tango.DAL.Remote/DB/YARN_BRANDS.cs new file mode 100644 index 000000000..b468215bd --- /dev/null +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/YARN_BRANDS.cs @@ -0,0 +1,31 @@ +//------------------------------------------------------------------------------ +// +// 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 YARN_BRANDS + { + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")] + public YARN_BRANDS() + { + this.RMLS_EXTENSIONS = new HashSet(); + } + + public int ID { get; set; } + public string GUID { get; set; } + public System.DateTime LAST_UPDATED { get; set; } + public string NAME { get; set; } + + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] + public virtual ICollection RMLS_EXTENSIONS { get; set; } + } +} diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/YARN_COLOR.cs b/Software/Visual_Studio/Tango.DAL.Remote/DB/YARN_COLOR.cs deleted file mode 100644 index b863f937c..000000000 --- a/Software/Visual_Studio/Tango.DAL.Remote/DB/YARN_COLOR.cs +++ /dev/null @@ -1,31 +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 YARN_COLOR - { - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")] - public YARN_COLOR() - { - this.RMLS_EXTENSIONS = new HashSet(); - } - - public int ID { get; set; } - public string GUID { get; set; } - public System.DateTime LAST_UPDATED { get; set; } - public string NAME { get; set; } - - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] - public virtual ICollection RMLS_EXTENSIONS { get; set; } - } -} diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/YARN_END_USE.cs b/Software/Visual_Studio/Tango.DAL.Remote/DB/YARN_END_USE.cs deleted file mode 100644 index 4008c4f0e..000000000 --- a/Software/Visual_Studio/Tango.DAL.Remote/DB/YARN_END_USE.cs +++ /dev/null @@ -1,31 +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 YARN_END_USE - { - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")] - public YARN_END_USE() - { - this.RMLS_EXTENSIONS = new HashSet(); - } - - public int ID { get; set; } - public string GUID { get; set; } - public System.DateTime LAST_UPDATED { get; set; } - public string NAME { get; set; } - - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] - public virtual ICollection RMLS_EXTENSIONS { get; set; } - } -} diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/YARN_FAMILIES.cs b/Software/Visual_Studio/Tango.DAL.Remote/DB/YARN_FAMILIES.cs new file mode 100644 index 000000000..3368225a9 --- /dev/null +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/YARN_FAMILIES.cs @@ -0,0 +1,31 @@ +//------------------------------------------------------------------------------ +// +// 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 YARN_FAMILIES + { + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")] + public YARN_FAMILIES() + { + this.RMLS_EXTENSIONS = new HashSet(); + } + + public int ID { get; set; } + public string GUID { get; set; } + public System.DateTime LAST_UPDATED { get; set; } + public string NAME { get; set; } + + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] + public virtual ICollection RMLS_EXTENSIONS { get; set; } + } +} diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/YARN_FAMILY.cs b/Software/Visual_Studio/Tango.DAL.Remote/DB/YARN_FAMILY.cs deleted file mode 100644 index 4e29b0ab1..000000000 --- a/Software/Visual_Studio/Tango.DAL.Remote/DB/YARN_FAMILY.cs +++ /dev/null @@ -1,31 +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 YARN_FAMILY - { - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")] - public YARN_FAMILY() - { - this.RMLS_EXTENSIONS = new HashSet(); - } - - public int ID { get; set; } - public string GUID { get; set; } - public System.DateTime LAST_UPDATED { get; set; } - public string NAME { get; set; } - - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] - public virtual ICollection RMLS_EXTENSIONS { get; set; } - } -} diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/YARN_GEOMETRY.cs b/Software/Visual_Studio/Tango.DAL.Remote/DB/YARN_GEOMETRY.cs deleted file mode 100644 index 87f07131e..000000000 --- a/Software/Visual_Studio/Tango.DAL.Remote/DB/YARN_GEOMETRY.cs +++ /dev/null @@ -1,31 +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 YARN_GEOMETRY - { - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")] - public YARN_GEOMETRY() - { - this.RMLS_EXTENSIONS = new HashSet(); - } - - public int ID { get; set; } - public string GUID { get; set; } - public System.DateTime LAST_UPDATED { get; set; } - public string NAME { get; set; } - - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] - public virtual ICollection RMLS_EXTENSIONS { get; set; } - } -} diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/YARN_GLOSS_LEVEL.cs b/Software/Visual_Studio/Tango.DAL.Remote/DB/YARN_GLOSS_LEVEL.cs deleted file mode 100644 index 75f4dd0b4..000000000 --- a/Software/Visual_Studio/Tango.DAL.Remote/DB/YARN_GLOSS_LEVEL.cs +++ /dev/null @@ -1,31 +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 YARN_GLOSS_LEVEL - { - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")] - public YARN_GLOSS_LEVEL() - { - this.RMLS_EXTENSIONS = new HashSet(); - } - - public int ID { get; set; } - public string GUID { get; set; } - public System.DateTime LAST_UPDATED { get; set; } - public string NAME { get; set; } - - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] - public virtual ICollection RMLS_EXTENSIONS { get; set; } - } -} diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/YARN_GLOSS_LEVELS.cs b/Software/Visual_Studio/Tango.DAL.Remote/DB/YARN_GLOSS_LEVELS.cs new file mode 100644 index 000000000..ced3b4265 --- /dev/null +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/YARN_GLOSS_LEVELS.cs @@ -0,0 +1,31 @@ +//------------------------------------------------------------------------------ +// +// 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 YARN_GLOSS_LEVELS + { + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")] + public YARN_GLOSS_LEVELS() + { + this.RMLS_EXTENSIONS = new HashSet(); + } + + public int ID { get; set; } + public string GUID { get; set; } + public System.DateTime LAST_UPDATED { get; set; } + public string NAME { get; set; } + + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] + public virtual ICollection RMLS_EXTENSIONS { get; set; } + } +} diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/YARN_GROUP.cs b/Software/Visual_Studio/Tango.DAL.Remote/DB/YARN_GROUP.cs deleted file mode 100644 index 1442fa1e1..000000000 --- a/Software/Visual_Studio/Tango.DAL.Remote/DB/YARN_GROUP.cs +++ /dev/null @@ -1,31 +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 YARN_GROUP - { - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")] - public YARN_GROUP() - { - this.RMLS_EXTENSIONS = new HashSet(); - } - - public int ID { get; set; } - public string GUID { get; set; } - public System.DateTime LAST_UPDATED { get; set; } - public string NAME { get; set; } - - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] - public virtual ICollection RMLS_EXTENSIONS { get; set; } - } -} diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/YARN_GROUPS.cs b/Software/Visual_Studio/Tango.DAL.Remote/DB/YARN_GROUPS.cs new file mode 100644 index 000000000..61b832f0b --- /dev/null +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/YARN_GROUPS.cs @@ -0,0 +1,31 @@ +//------------------------------------------------------------------------------ +// +// 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 YARN_GROUPS + { + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")] + public YARN_GROUPS() + { + this.RMLS_EXTENSIONS = new HashSet(); + } + + public int ID { get; set; } + public string GUID { get; set; } + public System.DateTime LAST_UPDATED { get; set; } + public string NAME { get; set; } + + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] + public virtual ICollection RMLS_EXTENSIONS { get; set; } + } +} diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/YARN_INDUSTRYSECTOR.cs b/Software/Visual_Studio/Tango.DAL.Remote/DB/YARN_INDUSTRYSECTOR.cs deleted file mode 100644 index 3ca6eeb67..000000000 --- a/Software/Visual_Studio/Tango.DAL.Remote/DB/YARN_INDUSTRYSECTOR.cs +++ /dev/null @@ -1,31 +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 YARN_INDUSTRYSECTOR - { - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")] - public YARN_INDUSTRYSECTOR() - { - this.RMLS_EXTENSIONS = new HashSet(); - } - - public int ID { get; set; } - public string GUID { get; set; } - public System.DateTime LAST_UPDATED { get; set; } - public string NAME { get; set; } - - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] - public virtual ICollection RMLS_EXTENSIONS { get; set; } - } -} diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/YARN_INDUSTRYSECTORS.cs b/Software/Visual_Studio/Tango.DAL.Remote/DB/YARN_INDUSTRYSECTORS.cs new file mode 100644 index 000000000..da9e2216c --- /dev/null +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/YARN_INDUSTRYSECTORS.cs @@ -0,0 +1,31 @@ +//------------------------------------------------------------------------------ +// +// 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 YARN_INDUSTRYSECTORS + { + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")] + public YARN_INDUSTRYSECTORS() + { + this.RMLS_EXTENSIONS = new HashSet(); + } + + public int ID { get; set; } + public string GUID { get; set; } + public System.DateTime LAST_UPDATED { get; set; } + public string NAME { get; set; } + + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] + public virtual ICollection RMLS_EXTENSIONS { get; set; } + } +} diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/YARN_MANUFACTURER.cs b/Software/Visual_Studio/Tango.DAL.Remote/DB/YARN_MANUFACTURER.cs deleted file mode 100644 index b2fec3ac4..000000000 --- a/Software/Visual_Studio/Tango.DAL.Remote/DB/YARN_MANUFACTURER.cs +++ /dev/null @@ -1,31 +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 YARN_MANUFACTURER - { - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")] - public YARN_MANUFACTURER() - { - this.RMLS_EXTENSIONS = new HashSet(); - } - - public int ID { get; set; } - public string GUID { get; set; } - public System.DateTime LAST_UPDATED { get; set; } - public string NAME { get; set; } - - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] - public virtual ICollection RMLS_EXTENSIONS { get; set; } - } -} diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/YARN_MANUFACTURERS.cs b/Software/Visual_Studio/Tango.DAL.Remote/DB/YARN_MANUFACTURERS.cs new file mode 100644 index 000000000..f88fbffe3 --- /dev/null +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/YARN_MANUFACTURERS.cs @@ -0,0 +1,31 @@ +//------------------------------------------------------------------------------ +// +// 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 YARN_MANUFACTURERS + { + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")] + public YARN_MANUFACTURERS() + { + this.RMLS_EXTENSIONS = new HashSet(); + } + + public int ID { get; set; } + public string GUID { get; set; } + public System.DateTime LAST_UPDATED { get; set; } + public string NAME { get; set; } + + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] + public virtual ICollection RMLS_EXTENSIONS { get; set; } + } +} diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/YARN_MATERIALS.cs b/Software/Visual_Studio/Tango.DAL.Remote/DB/YARN_MATERIALS.cs deleted file mode 100644 index 8e14102bc..000000000 --- a/Software/Visual_Studio/Tango.DAL.Remote/DB/YARN_MATERIALS.cs +++ /dev/null @@ -1,31 +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 YARN_MATERIALS - { - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")] - public YARN_MATERIALS() - { - this.RMLS_EXTENSIONS = new HashSet(); - } - - public int ID { get; set; } - public string GUID { get; set; } - public System.DateTime LAST_UPDATED { get; set; } - public string NAME { get; set; } - - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] - public virtual ICollection RMLS_EXTENSIONS { get; set; } - } -} diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/YARN_SUB_FAMILIES.cs b/Software/Visual_Studio/Tango.DAL.Remote/DB/YARN_SUB_FAMILIES.cs new file mode 100644 index 000000000..f3ec10b48 --- /dev/null +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/YARN_SUB_FAMILIES.cs @@ -0,0 +1,31 @@ +//------------------------------------------------------------------------------ +// +// 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 YARN_SUB_FAMILIES + { + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")] + public YARN_SUB_FAMILIES() + { + this.RMLS_EXTENSIONS = new HashSet(); + } + + public int ID { get; set; } + public string GUID { get; set; } + public System.DateTime LAST_UPDATED { get; set; } + public string NAME { get; set; } + + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] + public virtual ICollection RMLS_EXTENSIONS { get; set; } + } +} diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/YARN_SUB_FAMILY.cs b/Software/Visual_Studio/Tango.DAL.Remote/DB/YARN_SUB_FAMILY.cs deleted file mode 100644 index 5172bfb8e..000000000 --- a/Software/Visual_Studio/Tango.DAL.Remote/DB/YARN_SUB_FAMILY.cs +++ /dev/null @@ -1,31 +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 YARN_SUB_FAMILY - { - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")] - public YARN_SUB_FAMILY() - { - this.RMLS_EXTENSIONS = new HashSet(); - } - - public int ID { get; set; } - public string GUID { get; set; } - public System.DateTime LAST_UPDATED { get; set; } - public string NAME { get; set; } - - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] - public virtual ICollection RMLS_EXTENSIONS { get; set; } - } -} diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/YARN_TEXTURING.cs b/Software/Visual_Studio/Tango.DAL.Remote/DB/YARN_TEXTURING.cs deleted file mode 100644 index 7107eba01..000000000 --- a/Software/Visual_Studio/Tango.DAL.Remote/DB/YARN_TEXTURING.cs +++ /dev/null @@ -1,31 +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 YARN_TEXTURING - { - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")] - public YARN_TEXTURING() - { - this.RMLS_EXTENSIONS = new HashSet(); - } - - public int ID { get; set; } - public string GUID { get; set; } - public System.DateTime LAST_UPDATED { get; set; } - public string NAME { get; set; } - - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] - public virtual ICollection RMLS_EXTENSIONS { get; set; } - } -} diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/YARN_TEXTURINGS.cs b/Software/Visual_Studio/Tango.DAL.Remote/DB/YARN_TEXTURINGS.cs new file mode 100644 index 000000000..2701a27a0 --- /dev/null +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/YARN_TEXTURINGS.cs @@ -0,0 +1,31 @@ +//------------------------------------------------------------------------------ +// +// 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 YARN_TEXTURINGS + { + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")] + public YARN_TEXTURINGS() + { + this.RMLS_EXTENSIONS = new HashSet(); + } + + public int ID { get; set; } + public string GUID { get; set; } + public System.DateTime LAST_UPDATED { get; set; } + public string NAME { get; set; } + + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] + public virtual ICollection RMLS_EXTENSIONS { get; set; } + } +} diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/YARN_TYPE.cs b/Software/Visual_Studio/Tango.DAL.Remote/DB/YARN_TYPE.cs deleted file mode 100644 index 0070c5da6..000000000 --- a/Software/Visual_Studio/Tango.DAL.Remote/DB/YARN_TYPE.cs +++ /dev/null @@ -1,31 +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 YARN_TYPE - { - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")] - public YARN_TYPE() - { - this.RMLS_EXTENSIONS = new HashSet(); - } - - public int ID { get; set; } - public string GUID { get; set; } - public System.DateTime LAST_UPDATED { get; set; } - public string NAME { get; set; } - - [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] - public virtual ICollection RMLS_EXTENSIONS { get; set; } - } -} diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/YARN_TYPES.cs b/Software/Visual_Studio/Tango.DAL.Remote/DB/YARN_TYPES.cs new file mode 100644 index 000000000..05c261594 --- /dev/null +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/YARN_TYPES.cs @@ -0,0 +1,31 @@ +//------------------------------------------------------------------------------ +// +// 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 YARN_TYPES + { + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")] + public YARN_TYPES() + { + this.RMLS_EXTENSIONS = new HashSet(); + } + + public int ID { get; set; } + public string GUID { get; set; } + public System.DateTime LAST_UPDATED { get; set; } + public string NAME { get; set; } + + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] + public virtual ICollection RMLS_EXTENSIONS { get; set; } + } +} diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/YARN_WHITE_SHADES.cs b/Software/Visual_Studio/Tango.DAL.Remote/DB/YARN_WHITE_SHADES.cs new file mode 100644 index 000000000..692d7ea94 --- /dev/null +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/YARN_WHITE_SHADES.cs @@ -0,0 +1,31 @@ +//------------------------------------------------------------------------------ +// +// 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 YARN_WHITE_SHADES + { + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")] + public YARN_WHITE_SHADES() + { + this.RMLS_EXTENSIONS = new HashSet(); + } + + public int ID { get; set; } + public string GUID { get; set; } + public System.DateTime LAST_UPDATED { get; set; } + public string NAME { get; set; } + + [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] + public virtual ICollection RMLS_EXTENSIONS { get; set; } + } +} 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 32add4378..424b9585f 100644 --- a/Software/Visual_Studio/Tango.DAL.Remote/Tango.DAL.Remote.csproj +++ b/Software/Visual_Studio/Tango.DAL.Remote/Tango.DAL.Remote.csproj @@ -117,7 +117,7 @@ RemoteADO.tt - + RemoteADO.tt @@ -297,12 +297,18 @@ RemoteADO.tt + + RemoteADO.tt + RemoteADO.tt RemoteADO.tt + + RemoteADO.tt + RemoteADO.tt @@ -351,6 +357,9 @@ RemoteADO.tt + + RemoteADO.tt + RemoteADO.tt @@ -363,43 +372,34 @@ RemoteADO.tt - - RemoteADO.tt - - - RemoteADO.tt - - - RemoteADO.tt - - + RemoteADO.tt - + RemoteADO.tt - + RemoteADO.tt - + RemoteADO.tt - + RemoteADO.tt - + RemoteADO.tt - + RemoteADO.tt - + RemoteADO.tt - + RemoteADO.tt - + RemoteADO.tt @@ -452,7 +452,7 @@ - + \ No newline at end of file diff --git a/Software/Visual_Studio/Tango.SharedUI/Converters/EnumToItemsSourceConverter.cs b/Software/Visual_Studio/Tango.SharedUI/Converters/EnumToItemsSourceConverter.cs index 5c725e524..3b9c0acab 100644 --- a/Software/Visual_Studio/Tango.SharedUI/Converters/EnumToItemsSourceConverter.cs +++ b/Software/Visual_Studio/Tango.SharedUI/Converters/EnumToItemsSourceConverter.cs @@ -37,7 +37,11 @@ namespace Tango.SharedUI.Converters public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) { - throw new NotImplementedException(); + if(value is EnumValue) + { + return (value as EnumValue).Value; + } + return value; } } } diff --git a/Software/Visual_Studio/Tango.sln b/Software/Visual_Studio/Tango.sln index ac35279fa..135b5de64 100644 --- a/Software/Visual_Studio/Tango.sln +++ b/Software/Visual_Studio/Tango.sln @@ -469,6 +469,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tango.BitTypesGenerator.CLI EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tango.MachineStudio.ThreadExtensions", "MachineStudio\Modules\Tango.MachineStudio.ThreadExtensions\Tango.MachineStudio.ThreadExtensions.csproj", "{859A766B-78AD-484E-9BF2-2CE0FE288894}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tango.ContinuousPumpsActivation.UI", "Tango.ContinuousPumpsActivation.UI\Tango.ContinuousPumpsActivation.UI.csproj", "{FBEF8048-A18E-4F69-B4A5-0156CEABF140}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -4464,6 +4466,26 @@ Global {859A766B-78AD-484E-9BF2-2CE0FE288894}.Release|x64.Build.0 = Release|Any CPU {859A766B-78AD-484E-9BF2-2CE0FE288894}.Release|x86.ActiveCfg = Release|Any CPU {859A766B-78AD-484E-9BF2-2CE0FE288894}.Release|x86.Build.0 = Release|Any CPU + {FBEF8048-A18E-4F69-B4A5-0156CEABF140}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {FBEF8048-A18E-4F69-B4A5-0156CEABF140}.Debug|Any CPU.Build.0 = Debug|Any CPU + {FBEF8048-A18E-4F69-B4A5-0156CEABF140}.Debug|ARM.ActiveCfg = Debug|Any CPU + {FBEF8048-A18E-4F69-B4A5-0156CEABF140}.Debug|ARM.Build.0 = Debug|Any CPU + {FBEF8048-A18E-4F69-B4A5-0156CEABF140}.Debug|ARM64.ActiveCfg = Debug|Any CPU + {FBEF8048-A18E-4F69-B4A5-0156CEABF140}.Debug|ARM64.Build.0 = Debug|Any CPU + {FBEF8048-A18E-4F69-B4A5-0156CEABF140}.Debug|x64.ActiveCfg = Debug|Any CPU + {FBEF8048-A18E-4F69-B4A5-0156CEABF140}.Debug|x64.Build.0 = Debug|Any CPU + {FBEF8048-A18E-4F69-B4A5-0156CEABF140}.Debug|x86.ActiveCfg = Debug|Any CPU + {FBEF8048-A18E-4F69-B4A5-0156CEABF140}.Debug|x86.Build.0 = Debug|Any CPU + {FBEF8048-A18E-4F69-B4A5-0156CEABF140}.Release|Any CPU.ActiveCfg = Release|Any CPU + {FBEF8048-A18E-4F69-B4A5-0156CEABF140}.Release|Any CPU.Build.0 = Release|Any CPU + {FBEF8048-A18E-4F69-B4A5-0156CEABF140}.Release|ARM.ActiveCfg = Release|Any CPU + {FBEF8048-A18E-4F69-B4A5-0156CEABF140}.Release|ARM.Build.0 = Release|Any CPU + {FBEF8048-A18E-4F69-B4A5-0156CEABF140}.Release|ARM64.ActiveCfg = Release|Any CPU + {FBEF8048-A18E-4F69-B4A5-0156CEABF140}.Release|ARM64.Build.0 = Release|Any CPU + {FBEF8048-A18E-4F69-B4A5-0156CEABF140}.Release|x64.ActiveCfg = Release|Any CPU + {FBEF8048-A18E-4F69-B4A5-0156CEABF140}.Release|x64.Build.0 = Release|Any CPU + {FBEF8048-A18E-4F69-B4A5-0156CEABF140}.Release|x86.ActiveCfg = Release|Any CPU + {FBEF8048-A18E-4F69-B4A5-0156CEABF140}.Release|x86.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -4630,14 +4652,15 @@ Global {6B13E186-ADE2-4D97-9643-8132E00FC207} = {8336A702-9C49-4C9E-ADCC-1886A666D3BD} {B356201F-F958-4AC9-BBEB-E4EAE9DA9EC6} = {5F6BBAA8-EAD0-4B18-97E5-55B4F56DD760} {859A766B-78AD-484E-9BF2-2CE0FE288894} = {B2AF4F3F-2828-47C3-8F3E-A0EA0BD66FF8} + {FBEF8048-A18E-4F69-B4A5-0156CEABF140} = {5F6BBAA8-EAD0-4B18-97E5-55B4F56DD760} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {7986F7F4-A86A-4994-B1B6-0988D7F057B6} - BuildVersion_BuildVersioningStyle = None.None.Increment.DeltaBaseYearDayOfYear - BuildVersion_UpdateAssemblyVersion = True - BuildVersion_UpdateFileVersion = False - BuildVersion_StartDate = 2000/1/1 - BuildVersion_AssemblyInfoFilename = Properties\AssemblyInfo.cs BuildVersion_UseGlobalSettings = False + BuildVersion_AssemblyInfoFilename = Properties\AssemblyInfo.cs + BuildVersion_StartDate = 2000/1/1 + BuildVersion_UpdateFileVersion = False + BuildVersion_UpdateAssemblyVersion = True + BuildVersion_BuildVersioningStyle = None.None.Increment.DeltaBaseYearDayOfYear + SolutionGuid = {7986F7F4-A86A-4994-B1B6-0988D7F057B6} EndGlobalSection EndGlobal -- cgit v1.3.1 From 9da3e0256092cc21398bda66b96b996a0de55dd3 Mon Sep 17 00:00:00 2001 From: Victoria Plitt Date: Tue, 13 Jul 2021 12:21:32 +0300 Subject: RML Extension changes --- .../Converters/ComboBoxVisibleConverter.cs | 30 ++ .../Tango.MachineStudio.ThreadExtensions.csproj | 18 ++ .../ViewModelLocator.cs | 9 + .../ViewModels/AddItemDialogVM.cs | 45 +++ .../ViewModels/MainViewVM.cs | 339 +++++++++++++++++---- .../ViewModels/TestResultsViewVM.cs | 26 +- .../Views/AddItemDialog.xaml | 21 ++ .../Views/AddItemDialog.xaml.cs | 28 ++ .../Views/ComboboxEditable.xaml | 39 +++ .../Views/ComboboxEditable.xaml.cs | 89 ++++++ .../Views/RMLExtensionView.xaml | 10 + .../Views/RMLExtensionsView.xaml | 38 +-- .../Views/ThreadCharacteristicsView.xaml | 121 ++++++-- .../Tango.BL/Builders/RmlExtensionsBuilder.cs | 1 - .../Tango.BL/DTO/RmlsExtensionDTOBase.cs | 8 - .../Tango.BL/Entities/RmlsExtensionBase.cs | 69 ----- .../Tango.BL/Entities/YarnManufacturerBase.cs | 39 --- .../Tango.BL/Enumerations/MediaMaterials.cs | 8 +- .../Tango.ContinuousPumpsActivation.UI.csproj | 6 +- .../Tango.DAL.Remote/DB/RMLS_EXTENSIONS.cs | 2 - .../Tango.DAL.Remote/DB/RemoteADO.Designer.cs | 2 +- .../Tango.DAL.Remote/DB/RemoteADO.edmx | 41 +-- .../Tango.DAL.Remote/DB/RemoteADO.edmx.diagram | 216 ++++++------- .../Tango.DAL.Remote/DB/YARN_MANUFACTURERS.cs | 9 - .../Tango.DispenserAnalyzer.UI.csproj | 21 +- .../Tango.DispenserAnalyzer.UI/packages.config | 1 + 26 files changed, 814 insertions(+), 422 deletions(-) create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Converters/ComboBoxVisibleConverter.cs create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/ViewModels/AddItemDialogVM.cs create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/AddItemDialog.xaml create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/AddItemDialog.xaml.cs create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/ComboboxEditable.xaml create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/ComboboxEditable.xaml.cs (limited to 'Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions') diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Converters/ComboBoxVisibleConverter.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Converters/ComboBoxVisibleConverter.cs new file mode 100644 index 000000000..015290448 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Converters/ComboBoxVisibleConverter.cs @@ -0,0 +1,30 @@ +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Data; +using Tango.BL.Enumerations; + +namespace Tango.MachineStudio.ThreadExtensions.Converters +{ + public class ComboBoxVisibleConverter : IValueConverter + { + public object Convert(object value, Type targetType, object parameter, CultureInfo culture) + { + if(value is RMLExtensionStatus) + { + RMLExtensionStatus enumerationMember = (RMLExtensionStatus)value; + if (enumerationMember == RMLExtensionStatus.New) + return true; + } + return false; + } + + public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) + { + throw new NotImplementedException(); + } + } +} 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 1c9ac345b..e700de3d3 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 @@ -66,7 +66,9 @@ + + ..\..\..\packages\MahApps.Metro.1.5.0\lib\net45\System.Windows.Interactivity.dll @@ -91,19 +93,27 @@ + + + + AddItemDialog.xaml + ColorParametersView.xaml + + ComboboxEditable.xaml + MachineTestResultsView.xaml @@ -127,10 +137,18 @@ MSBuild:Compile Designer + + Designer + MSBuild:Compile + Designer MSBuild:Compile + + Designer + MSBuild:Compile + Designer MSBuild:Compile diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/ViewModelLocator.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/ViewModelLocator.cs index bd1b1dcb2..596332f8d 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/ViewModelLocator.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/ViewModelLocator.cs @@ -16,6 +16,7 @@ namespace Tango.MachineStudio.ThreadExtensions static ViewModelLocator() { TangoIOC.Default.Register(); + TangoIOC.Default.Register(); } public static MainViewVM MainViewVM @@ -25,5 +26,13 @@ namespace Tango.MachineStudio.ThreadExtensions return TangoIOC.Default.GetInstance(); } } + + public static AddItemDialogVM AddItemDialogVM + { + get + { + return TangoIOC.Default.GetInstance(); + } + } } } diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/ViewModels/AddItemDialogVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/ViewModels/AddItemDialogVM.cs new file mode 100644 index 000000000..0187f3bee --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/ViewModels/AddItemDialogVM.cs @@ -0,0 +1,45 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Tango.Core.Commands; +using Tango.SharedUI; + +namespace Tango.MachineStudio.ThreadExtensions.ViewModels +{ + public class AddItemDialogVM : DialogViewVM + { + private string _name; + + public string Name + { + get { return _name; } + set { _name = value; + RaisePropertyChangedAuto(); + SaveCommand.RaiseCanExecuteChanged(); + } + } + + + /// + /// Gets or sets the login command. + /// + public RelayCommand SaveCommand { get; set; } + + /// + /// Gets or sets the cancel command. + /// + public RelayCommand CancelCommand { get; set; } + + /// + /// Initializes a new instance of the class. + /// + public AddItemDialogVM() + { + SaveCommand = new RelayCommand(Accept, () => false == String.IsNullOrEmpty(Name)); + CancelCommand = new RelayCommand(Cancel); + } + + } +} 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 09befb26f..928102f12 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 @@ -35,7 +35,7 @@ namespace Tango.MachineStudio.ThreadExtensions.ViewModels private INotificationProvider _notification; private IAuthenticationProvider _authentication; private IActionLogManager _actionLogManager; - + private ObservablesContext _rmlExtentions_context; private ObservablesContext _active_context; @@ -86,19 +86,19 @@ namespace Tango.MachineStudio.ThreadExtensions.ViewModels InvalidateRelayCommands(); } } - private ICollectionView _rmlExtCollectionView; - /// - /// Gets or sets the RML collection view. - /// - public ICollectionView RmlExtCollectionView - { - get { return _rmlExtCollectionView; } - set - { - _rmlExtCollectionView = value; - RaisePropertyChangedAuto(); - } - } + //private ICollectionView _rmlExtCollectionView; + ///// + ///// Gets or sets the RML collection view. + ///// + //public ICollectionView RmlExtCollectionView + //{ + // get { return _rmlExtCollectionView; } + // set + // { + // _rmlExtCollectionView = value; + // RaisePropertyChangedAuto(); + // } + //} private ObservableCollection _applications; public ObservableCollection Applications @@ -161,13 +161,7 @@ namespace Tango.MachineStudio.ThreadExtensions.ViewModels get { return _group; } set { _group = value; RaisePropertyChangedAuto(); } } - - //private ObservableCollection _manufacturer; - //public ObservableCollection Manufacturer - //{ - // get { return _manufacturer; } - // set { _manufacturer = value; RaisePropertyChangedAuto(); } - //} + private List _manufacturers; public List Manufacturers @@ -185,7 +179,7 @@ namespace Tango.MachineStudio.ThreadExtensions.ViewModels get { return _materials; } set { _materials = value; RaisePropertyChangedAuto(); } } - + private ObservableCollection _subFamilies; public ObservableCollection SubFamilies { @@ -213,7 +207,7 @@ namespace Tango.MachineStudio.ThreadExtensions.ViewModels get { return _industrySector; } set { _industrySector = value; RaisePropertyChangedAuto(); } } - + private String _Filter; /// /// Gets or sets the search filter. @@ -243,11 +237,11 @@ namespace Tango.MachineStudio.ThreadExtensions.ViewModels set { _testResultsViewVM = value; RaisePropertyChangedAuto(); } } - protected Machine _selectedMachine; + protected MachineModel _selectedMachine; /// /// Gets or sets the selected machine. /// - public Machine SelectedMachine + public MachineModel SelectedMachine { get { return _selectedMachine; } set @@ -287,30 +281,260 @@ namespace Tango.MachineStudio.ThreadExtensions.ViewModels public RelayCommand SaveCommand { get; set; } public RelayCommand ManageRmlExtensionCommand { get; set; } - + public RelayCommand BackToThreadExtensionViewsCommand { get; set; } - + private async void BackToThreadExtensionViews(object obj) { View.NavigateTo(RMLExtensionNavigationView.RMLExtensionsView); await LoadRmlExtentions(); } - #endregion - + public RelayCommand AddManufacturerItemCommand { get; set;} + public RelayCommand EditManufacturerItemCommand { get; set; } + public RelayCommand DeleteManufacturerItemCommand { get; set; } + + public RelayCommand AddBrandItemCommand { get; set; } + public RelayCommand EditBrandItemCommand { get; set; } + public RelayCommand DeleteBrandItemCommand { get; set; } + + public RelayCommand AddEndUseItemCommand { get; set; } + public RelayCommand EditEndUseItemCommand { get; set; } + public RelayCommand DeleteEndUseItemCommand { get; set; } + + public RelayCommand AddApplicationItemCommand { get; set; } + public RelayCommand EditApplicationItemCommand { get; set; } + public RelayCommand DeleteApplicationItemCommand { get; set; } + + public RelayCommand AddIndustrySectorItemCommand { get; set; } + public RelayCommand EditIndustrySectorItemCommand { get; set; } + public RelayCommand DeleteIndustrySectorItemCommand { get; set; } + + public RelayCommand AddMaterialItemCommand { get; set; } + public RelayCommand EditMaterialItemCommand { get; set; } + public RelayCommand DeleteMaterialItemCommand { get; set; } + + public RelayCommand AddYarnTypeItemCommand { get; set; } + public RelayCommand EditYarnTypeItemCommand { get; set; } + public RelayCommand DeleteYarnTypeItemCommand { get; set; } + + public RelayCommand AddSubFamilyItemCommand { get; set; } + public RelayCommand EditSubFamilyItemCommand { get; set; } + public RelayCommand DeleteSubFamilyItemCommand { get; set; } + + public RelayCommand AddFamilyItemCommand { get; set; } + public RelayCommand EditFamilyItemCommand { get; set; } + public RelayCommand DeleteFamilyItemCommand { get; set; } + + public RelayCommand AddGroupItemCommand { get; set; } + public RelayCommand EditGroupItemCommand { get; set; } + public RelayCommand DeleteGroupItemCommand { get; set; } + + public RelayCommand AddTexturingItemCommand { get; set; } + public RelayCommand EditTexturingItemCommand { get; set; } + public RelayCommand DeleteTexturingItemCommand { get; set; } + + public RelayCommand AddGeometryItemCommand { get; set; } + public RelayCommand EditGeometryItemCommand { get; set; } + public RelayCommand DeleteGeometryItemCommand { get; set; } + + public RelayCommand AddYarnWhiteShadeItemCommand { get; set; } + public RelayCommand EditYarnWhiteShadeItemCommand { get; set; } + public RelayCommand DeleteYarnWhiteShadeItemCommand { get; set; } + + public RelayCommand AddGlossLevelItemCommand { get; set; } + public RelayCommand EditGlossLevelItemCommand { get; set; } + public RelayCommand DeleteGlossLevelItemCommand { get; set; } + #endregion + + #region Command Functions + + private void AddManufacturerItem(object obj) + { + AddItemDialogVM vm = ViewModelLocator.AddItemDialogVM; + + _notification.ShowModalDialog(vm, (x) => + { + if (Manufacturers.Any(y => y.ToLower() == vm.Name.ToLower())) + { + _notification.ShowError("Manufacturer already exists."); + return; + } + Manufacturers.Add(vm.Name); + RaisePropertyChanged("Manufacturers"); + _active_context.YarnManufacturers.Add(new YarnManufacturer() { Name = vm.Name }); + + + }, () => { }); + } + + private void DeleteManufacturerItem(object obj) + { + if (_notification.ShowQuestion("Are you sure you want to delete the selected item?")) + { + string deletedname = ActiveRML.Manufacturer; + Manufacturers.Remove(deletedname); + RaisePropertyChanged("Manufacturers"); + var deletedItem = _active_context.YarnManufacturers.Where(x => x.Name == deletedname).FirstOrDefault(); + if (deletedItem != null) + { + _active_context.YarnManufacturers.Remove(deletedItem); + ActiveRML.Manufacturer = _active_context.YarnManufacturers.FirstOrDefault().Name; + } + } + } + + private void EditManufacturerItem(object obj) + { + AddItemDialogVM vm = ViewModelLocator.AddItemDialogVM; + vm.Name = ActiveRML.Manufacturer; + + _notification.ShowModalDialog(vm, (x) => + { + if (ActiveRML.Manufacturer == x.Name) + return; + if (Manufacturers.Any(y => y == x.Name)) + { + _notification.ShowError("Manufacturer already exists."); + return; + } + var editItem = _active_context.YarnManufacturers.Where(z => z.Name == ActiveRML.Manufacturer).FirstOrDefault(); + if (editItem != null) + { + editItem.Name = x.Name; + ActiveRML.Manufacturer = x.Name; + } + Manufacturers = _active_context.YarnManufacturers.Select(z => z.Name).ToList(); + }, () => { }); + } + + private void AddBrandItem(object obj) + { + AddItemDialogVM vm = ViewModelLocator.AddItemDialogVM; + + _notification.ShowModalDialog(vm, async (x) => + { + if (Brands.Any(y => y.Name.ToLower() == x.Name.ToLower())) + { + _notification.ShowError("Brand already exists."); + return; + } + YarnBrand newItem = new YarnBrand() { Name = x.Name }; + _active_context.YarnBrands.Add(newItem); + await _active_context.SaveChangesAsync(); + Brands = _active_context.YarnBrands.ToObservableCollection(); + ActiveRMLExtension.YarnBrand = Brands.FirstOrDefault(b => b.Name == vm.Name); + }, () => { }); + } + + private void EditBrandItem(object obj) + { + AddItemDialogVM vm = ViewModelLocator.AddItemDialogVM; + vm.Name = ActiveRMLExtension.YarnBrand.Name; + + _notification.ShowModalDialog(vm, async (x) => + { + if (ActiveRMLExtension.YarnBrand.Name == vm.Name) + return; + if (Brands.Any(y => y.Name == vm.Name)) + { + _notification.ShowError("The Brand already exists."); + return; + } + ActiveRMLExtension.YarnBrand.Name = vm.Name; + await _active_context.SaveChangesAsync(); + }, () => { }); + } + + private async void DeleteBrandItem(object obj) + { + if (_notification.ShowQuestion("Are you sure you want to delete the selected item?")) + { + var deletedItem = _active_context.YarnBrands.Where(x => x.Guid == ActiveRMLExtension.YarnBrand.Guid).FirstOrDefault(); + if (deletedItem != null) + { + _active_context.YarnBrands.Remove(deletedItem); + await _active_context.SaveChangesAsync(); + Brands = _active_context.YarnBrands.ToObservableCollection(); + ActiveRMLExtension.YarnBrand = Brands.FirstOrDefault(); + } + } + } + + private void AddEndUseItem(object ob) + { + AddItemDialogVM vm = ViewModelLocator.AddItemDialogVM; + + _notification.ShowModalDialog(vm, async (x) => + { + if (Brands.Any(y => y.Name.ToLower() == x.Name.ToLower())) + { + _notification.ShowError("This item already exists."); + return; + } + MediaPurpos newItem = new MediaPurpos() { Name = x.Name }; + _active_context.MediaPurposes.Add(newItem); + await _active_context.SaveChangesAsync(); + EndUse = _active_context.MediaPurposes.ToObservableCollection(); + ActiveRML.MediaPurpose = EndUse.FirstOrDefault(b => b.Name == x.Name); + }, () => { }); + } + private void EditEndUseItem(object ob) + { + + } + private void DeleteEndUseItem(object ob) + { + + } + #endregion + + public MainViewVM(INotificationProvider notificationProvider, IAuthenticationProvider authentication, IActionLogManager actionLogManager) { _notification = notificationProvider; _authentication = authentication; _actionLogManager = actionLogManager; - + BackToThreadExtensionViewsCommand = new RelayCommand(BackToThreadExtensionViews, () => IsFree); SaveCommand = new RelayCommand(Save, () => IsFree); ManageRmlExtensionCommand = new RelayCommand(() => LoadActiveRMLExtension(SelectedRMLExtension.Guid), () => SelectedRMLExtension != null); - } - - public override void OnApplicationReady() + + DeleteManufacturerItemCommand = new RelayCommand(DeleteManufacturerItem, () => ActiveRML.Manufacturer != ""); + AddManufacturerItemCommand = new RelayCommand(AddManufacturerItem); + EditManufacturerItemCommand = new RelayCommand(EditManufacturerItem, () => ActiveRML.Manufacturer != ""); + + AddBrandItemCommand = new RelayCommand(AddBrandItem); + EditBrandItemCommand = new RelayCommand(EditBrandItem, () => ActiveRMLExtension.YarnBrand != null); + DeleteBrandItemCommand = new RelayCommand(DeleteBrandItem, () => ActiveRMLExtension.YarnBrand != null); + + AddEndUseItemCommand = new RelayCommand(AddEndUseItem); + EditEndUseItemCommand = new RelayCommand(EditEndUseItem); + DeleteEndUseItemCommand = new RelayCommand(DeleteEndUseItem); + + AddApplicationItemCommand = new RelayCommand(AddEndUseItem); + EditApplicationItemCommand = new RelayCommand(EditEndUseItem); + DeleteApplicationItemCommand = new RelayCommand(DeleteEndUseItem); + + AddIndustrySectorItemCommand = new RelayCommand(AddEndUseItem); + EditIndustrySectorItemCommand = new RelayCommand(EditEndUseItem); + DeleteIndustrySectorItemCommand = new RelayCommand(DeleteEndUseItem); + + AddMaterialItemCommand = new RelayCommand(AddEndUseItem); + EditMaterialItemCommand = new RelayCommand(EditEndUseItem); + DeleteMaterialItemCommand = new RelayCommand(DeleteEndUseItem); + + AddYarnTypeItemCommand = new RelayCommand(AddEndUseItem); + EditYarnTypeItemCommand = new RelayCommand(EditEndUseItem); + DeleteYarnTypeItemCommand = new RelayCommand(DeleteEndUseItem); + + } + + + + + public override void OnApplicationReady() { } @@ -351,8 +575,8 @@ namespace Tango.MachineStudio.ThreadExtensions.ViewModels Status = x.RMLExtesion == null ? RMLExtensionStatus.New : x.RMLExtesion.RMLStatus }).ToList(); RmlExtensions = q; - RmlExtCollectionView = CollectionViewSource.GetDefaultView(RmlExtensions); - RmlExtCollectionView.SortDescriptions.Add(new SortDescription(nameof(Rml.LastUpdated), ListSortDirection.Ascending)); + // RmlExtCollectionView = CollectionViewSource.GetDefaultView(RmlExtensions); + // RmlExtCollectionView.SortDescriptions.Add(new SortDescription(nameof(Rml.LastUpdated), ListSortDirection.Ascending)); //RmlExtCollectionView.Filter = (rml) => //{ @@ -468,33 +692,40 @@ namespace Tango.MachineStudio.ThreadExtensions.ViewModels ActiveRML = new RmlBuilder(_active_context) .Set(SelectedRMLExtension.RMLGuid) .Build(); + + var machineIdsHasTest = (from c in _active_context.ColorProcessParameters.Where(x => x.RmlsExtensionsGuid == guid) + select new { MichineGUID = c.MachineGuid }). + Union (from p in _active_context.RmlExtensionTestResults.Where(x => x.RmlsExtensionsGuid == guid) + select new { MichineGUID = p.MachineGuid }).DistinctBy(x => x).ToList(); - var machinesWithTest = _active_context.RmlExtensionTestResults.Select(x => x.MachineGuid).ToList(); - var machinesWithTest2 = - Join(_active_context.ColorProcessParameters.Select(y => y.MachineGuid), st1 => st1, st2=> st2, (st1, st2)=>).ToList(); - Machines = ObservablesStaticCollections.Instance.Machines.Select(x => new MachineModel() + if(machineIdsHasTest.Count > 0) + { + var MachineGuid = machineIdsHasTest.First().MichineGUID; + Machines.Where(x => machineIdsHasTest.Any(y => y.MichineGUID == x.Guid)).ToList().ForEach(x => x.HasRMLTest = true); + SelectedMachine = Machines.First(x => x.Guid == MachineGuid); + } + else + { + var settings = SettingsManager.Default.GetOrCreate(); + if(settings.LastVirtualMachineSerialNumber != null) { - Guid = x.Guid, - Name = x.Name, - SerialNumber = x.SerialNumber - }).ToObservableCollection(); - var settings = SettingsManager.Default.GetOrCreate(); - SelectedMachine = ObservablesStaticCollections.Instance.Machines.SingleOrDefault(x => x.SerialNumber == settings.LastVirtualMachineSerialNumber); - + SelectedMachine = Machines.SingleOrDefault(x => x.SerialNumber == settings.LastVirtualMachineSerialNumber); + } + else + { + SelectedMachine = Machines.First(); + } + } + ColorParametersVewVM = new ColorParametersVewVM(_notification, _actionLogManager); ColorParametersVewVM.RMLExtemtionGUID = guid; - ColorParametersVewVM.SelectedMachineGUID = SelectedMachine.Guid; + ColorParametersVewVM.SelectedMachineGUID = SelectedMachine != null ? SelectedMachine.Guid : null ; TestResultsViewVM = new TestResultsViewVM(_notification, _actionLogManager); TestResultsViewVM.RMLExtemtionGUID = guid; + TestResultsViewVM.SelectedMachineGUID = SelectedMachine != null ? SelectedMachine.Guid : null; TestResultsViewVM.ThreadName = ActiveRML.Manufacturer; - - var machineGuidsWithTests = await _active_context.RmlExtensionTestResults.Where(x => x.RmlsExtensionsGuid == guid).Select(y => y.MachineGuid).ToListAsync(); - if(machineGuidsWithTests.Count > 0) - { - - } - + if (ActiveRMLExtension.RMLStatus == RMLExtensionStatus.New) { ColorParametersVewVM.SaveColorParameters -= UpdateStatus; 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 c60d5e4fa..24196a3f6 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 @@ -16,6 +16,7 @@ using Tango.Core.Commands; using Tango.Logging; using Tango.MachineStudio.Common; using Tango.MachineStudio.Common.Notifications; +using Tango.MachineStudio.ThreadExtensions.Models; using Tango.Settings; using Tango.SharedUI; @@ -73,23 +74,19 @@ namespace Tango.MachineStudio.ThreadExtensions.ViewModels //EnableRenderingForSelectedTabGraphs(); } } - /// - /// Gets or sets the machines providers. - /// - //public ISuggestionProvider MachinesProvider { get; set; } - protected Machine _selectedMachine; + protected string _selectedMachineGuid; /// /// Gets or sets the selected machine. /// - public Machine SelectedMachine + public String SelectedMachineGUID { - get { return _selectedMachine; } + get { return _selectedMachineGuid; } set { - if (value != null && _selectedMachine != value) + if (value != null && _selectedMachineGuid != value) { - _selectedMachine = value; + _selectedMachineGuid = value; SelectedMachineChanged(); RaisePropertyChangedAuto(); InvalidateRelayCommands(); @@ -236,9 +233,6 @@ namespace Tango.MachineStudio.ThreadExtensions.ViewModels { ResultTabs.Clear(); SelectedTab = null; - var settings = SettingsManager.Default.GetOrCreate(); - - SelectedMachine = ObservablesStaticCollections.Instance.Machines.SingleOrDefault(x => x.SerialNumber == settings.LastVirtualMachineSerialNumber); } private void SelectedMachineChanged() @@ -249,7 +243,7 @@ namespace Tango.MachineStudio.ThreadExtensions.ViewModels } public async void LoadTestResults() { - if (SelectedMachine == null || SelectedMachine.Guid == null) + if (String.IsNullOrEmpty(SelectedMachineGUID)) { _notification.ShowWarning(LogManager.Log($" Please, select machine.", LogCategory.Warning)); return; @@ -268,7 +262,7 @@ namespace Tango.MachineStudio.ThreadExtensions.ViewModels using (_notification.PushTaskItem("Loading Test Results Parameters ...")) { - var testResults = await new RMLExtensionTestResultsCollectionBuilder(_active_context).SetAll().ForRMLExtension(RMLExtemtionGUID).ForMachine(SelectedMachine.Guid).WithRubbingAndTensileResults().BuildAsync(); + var testResults = await new RMLExtensionTestResultsCollectionBuilder(_active_context).SetAll().ForRMLExtension(RMLExtemtionGUID).ForMachine(SelectedMachineGUID).WithRubbingAndTensileResults().BuildAsync(); SelectedTestResults = testResults.OrderBy(x => x.ResultIndex).ToSynchronizedObservableCollection(); foreach (var result in SelectedTestResults) { @@ -301,7 +295,7 @@ namespace Tango.MachineStudio.ThreadExtensions.ViewModels private TestResultViewVM CreateNewTestResultVM(string name, int index) { TestResultViewVM newtab = new TestResultViewVM(_notification, _actionLogManager) { ThreadName = ThreadName }; - newtab.TestResult = new RmlExtensionTestResult() { RmlsExtensionsGuid = RMLExtemtionGUID, MachineGuid = SelectedMachine.Guid, ResultIndex = index, Name = name, BtsrMax = 0.0, BtsrMin = 0.0, DryerTemperature = 0, TunnelTemperature = 0, TunnelFlow = 0.0, TunnelAvgTemperature = 0.0, TensionHeadMax = 0.0, + newtab.TestResult = new RmlExtensionTestResult() { RmlsExtensionsGuid = RMLExtemtionGUID, MachineGuid = SelectedMachineGUID, ResultIndex = index, Name = name, BtsrMax = 0.0, BtsrMin = 0.0, DryerTemperature = 0, TunnelTemperature = 0, TunnelFlow = 0.0, TunnelAvgTemperature = 0.0, TensionHeadMax = 0.0, TensionHeadMin = 0.0, TensioinAfterDryerMax = 0.0, TensionAfterDryerMin = 0.0, TensionWinderMax = 0.0, TensionWinderMin = 0.0, PullerTensionMax = 0.0, PullerTensionMin = 0.0, ExitTensionMax = 0.0, ExitTensionMin = 0.0, SeverityZone1Max = 0.0, SeverityZone1Min = 0.0, SeverityZone2Max = 0.0, SeverityZone2Min = 0.0, RefLubVersion="", RefCof = 0.0, RefLub = 0.0, ThreadLubVersion = "", ThreadCof = 0.0, ThreadLub = 0.0, Conclusions="", Comment=""}; var rubbingresults = new SynchronizedObservableCollection(); @@ -331,7 +325,7 @@ namespace Tango.MachineStudio.ThreadExtensions.ViewModels public async void Save() { - if (SelectedMachine == null || SelectedMachine.Guid == null) + if (String.IsNullOrEmpty(SelectedMachineGUID)) { _notification.ShowWarning(LogManager.Log($"Could not save Test Results. Please, select machine.", LogCategory.Warning)); return; diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/AddItemDialog.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/AddItemDialog.xaml new file mode 100644 index 000000000..c529eabe0 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/AddItemDialog.xaml @@ -0,0 +1,21 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/AddItemDialog.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/AddItemDialog.xaml.cs new file mode 100644 index 000000000..6bd81343e --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/AddItemDialog.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 +{ + /// + /// Interaction logic for AddItemDialog.xaml + /// + public partial class AddItemDialog : UserControl + { + public AddItemDialog() + { + InitializeComponent(); + } + } +} diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/ComboboxEditable.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/ComboboxEditable.xaml new file mode 100644 index 000000000..88b1bbc62 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/ComboboxEditable.xaml @@ -0,0 +1,39 @@ + + + + + + + + + + + + + diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/ComboboxEditable.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/ComboboxEditable.xaml.cs new file mode 100644 index 000000000..e5b542f45 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/ComboboxEditable.xaml.cs @@ -0,0 +1,89 @@ +using System; +using System.Collections; +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.Core.Commands; + +namespace Tango.MachineStudio.ThreadExtensions.Views +{ + /// + /// Interaction logic for ComboboxEditable.xaml + /// + public partial class ComboboxEditable : UserControl + { + public ComboboxEditable() + { + InitializeComponent(); + } + + + public IEnumerable ItemsSource + { + get { return (IEnumerable)GetValue(ItemsSourceProperty); } + set { SetValue(ItemsSourceProperty, value); } + } + + // Using a DependencyProperty as the backing store for ItemsSource. This enables animation, styling, binding, etc... + public static readonly DependencyProperty ItemsSourceProperty = + DependencyProperty.Register("ItemsSource", typeof(IEnumerable), typeof(ComboboxEditable), new PropertyMetadata(null)); + + + + public object SelectedItem + { + get { return (object)GetValue(SelectedItemProperty); } + set { SetValue(SelectedItemProperty, value); } + } + + // Using a DependencyProperty as the backing store for SelectedItem. This enables animation, styling, binding, etc... + public static readonly DependencyProperty SelectedItemProperty = + DependencyProperty.Register("SelectedItem", typeof(object), typeof(ComboboxEditable), new FrameworkPropertyMetadata(null, FrameworkPropertyMetadataOptions.BindsTwoWayByDefault)); + + + + + + public RelayCommand AddCommand + { + get { return (RelayCommand)GetValue(AddCommandProperty); } + set { SetValue(AddCommandProperty, value); } + } + + // Using a DependencyProperty as the backing store for DeleteCommand. This enables animation, styling, binding, etc... + public static readonly DependencyProperty AddCommandProperty = + DependencyProperty.Register("AddCommand", typeof(RelayCommand), typeof(ComboboxEditable)); + + public RelayCommand EditCommand + { + get { return (RelayCommand)GetValue(EditCommandProperty); } + set { SetValue(EditCommandProperty, value); } + } + + // Using a DependencyProperty as the backing store for DeleteCommand. This enables animation, styling, binding, etc... + public static readonly DependencyProperty EditCommandProperty = + DependencyProperty.Register("EditCommand", typeof(RelayCommand), typeof(ComboboxEditable)); + + public RelayCommand DeleteCommand + { + get { return (RelayCommand)GetValue(DeleteCommandProperty); } + set { SetValue(DeleteCommandProperty, value); } + } + + // Using a DependencyProperty as the backing store for DeleteCommand. This enables animation, styling, binding, etc... + public static readonly DependencyProperty DeleteCommandProperty = + DependencyProperty.Register("DeleteCommand", typeof(RelayCommand), typeof(ComboboxEditable)); + + + } +} diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/RMLExtensionView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/RMLExtensionView.xaml index 7e9d85f49..cd131d76d 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/RMLExtensionView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/RMLExtensionView.xaml @@ -18,6 +18,7 @@ + @@ -43,6 +44,15 @@ + + + diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/RMLExtensionsView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/RMLExtensionsView.xaml index 6a1436348..b2bff1dae 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/RMLExtensionsView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/RMLExtensionsView.xaml @@ -33,26 +33,6 @@ - - + diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/ComboboxEditable.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/ComboboxEditable.xaml.cs index e5b542f45..251241159 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/ComboboxEditable.xaml.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/ComboboxEditable.xaml.cs @@ -53,7 +53,17 @@ namespace Tango.MachineStudio.ThreadExtensions.Views + public string DisplayMemberPath + { + get { return (string)GetValue(DisplayMemberPathProperty); } + set { SetValue(DisplayMemberPathProperty, value); } + } + + public static readonly DependencyProperty DisplayMemberPathProperty = + DependencyProperty.Register("DisplayMemberPath", typeof(string), typeof(ComboboxEditable), new PropertyMetadata("")); + + public RelayCommand AddCommand { get { return (RelayCommand)GetValue(AddCommandProperty); } @@ -73,17 +83,6 @@ namespace Tango.MachineStudio.ThreadExtensions.Views // Using a DependencyProperty as the backing store for DeleteCommand. This enables animation, styling, binding, etc... public static readonly DependencyProperty EditCommandProperty = DependencyProperty.Register("EditCommand", typeof(RelayCommand), typeof(ComboboxEditable)); - - public RelayCommand DeleteCommand - { - get { return (RelayCommand)GetValue(DeleteCommandProperty); } - set { SetValue(DeleteCommandProperty, value); } - } - - // Using a DependencyProperty as the backing store for DeleteCommand. This enables animation, styling, binding, etc... - public static readonly DependencyProperty DeleteCommandProperty = - DependencyProperty.Register("DeleteCommand", typeof(RelayCommand), typeof(ComboboxEditable)); - - + } } 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 a8aa173df..27bffbebb 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 @@ -29,30 +29,11 @@ - - - - - + - - - - - - - - - - - + + diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/ThreadCharacteristicsView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/ThreadCharacteristicsView.xaml index 0f1003a63..caab8edfb 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/ThreadCharacteristicsView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/ThreadCharacteristicsView.xaml @@ -56,100 +56,22 @@ - + - + - - - + - - - + - - - + @@ -170,40 +92,32 @@ - - - + + - - - + + - - - + + - - - + + - - - + + - - - + + - - - + + - - - + + - - + + -- cgit v1.3.1 From f4fc9795b21c8631451ca16e93e479bcd3872bb5 Mon Sep 17 00:00:00 2001 From: Victoria Plitt Date: Mon, 19 Jul 2021 19:38:29 +0300 Subject: Added Commands SaveFactors in ColorParameters View, and ApplayToProcessParameters in TestResults view. Related Work Items: #4219 --- .../ViewModels/ColorParametersVewVM.cs | 41 ++++++++++++++++-- .../ViewModels/MainViewVM.cs | 7 ++- .../ViewModels/TestResultsViewVM.cs | 50 ++++++++++++++++++++-- .../Views/TestResultsView.xaml | 2 +- 4 files changed, 92 insertions(+), 8 deletions(-) (limited to 'Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions') diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/ViewModels/ColorParametersVewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/ViewModels/ColorParametersVewVM.cs index 3a5488256..a89a2e33c 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/ViewModels/ColorParametersVewVM.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/ViewModels/ColorParametersVewVM.cs @@ -215,6 +215,18 @@ namespace Tango.MachineStudio.ThreadExtensions.ViewModels } } + private string _RMLGUID; + + public string RMLGUID + { + get { return _RMLGUID; } + set + { + _RMLGUID = value; + OnRMLExtensionGUIDChanged(); + } + } + protected string _selectedMachineGuid; /// /// Gets or sets the selected machine. @@ -323,10 +335,33 @@ namespace Tango.MachineStudio.ThreadExtensions.ViewModels } } - private void SaveFactors(object obj) + private async void SaveFactors(object obj) { - /// var LiquidTypesRmls = ActiveRML.LiquidTypesRmls; - // for( int) + using (var context = ObservablesContext.CreateDefault()) + { + try { + var rml = await new RmlBuilder(context) + .Set(RMLGUID) + .WithLiquidFactors() + .BuildAsync(); + var LiquidTypesRml = rml.LiquidTypesRmls; + foreach (var factor in Factor100ProcessData) + { + var liquidFactor = LiquidTypesRml.ToList().First(x => x.LiquidType.Name.ToLower() == factor.FactorColor.ToDescription().ToLower()); + if(liquidFactor != null) + { + liquidFactor.MaxNlPerCm = factor.InkNlCm; + } + } + await context.SaveChangesAsync(); + } + catch(Exception ex) + { + LogManager.Log(ex, "Could not update color factor."); + _notification.ShowError($"An error occurred while trying to save color factors.\n{ex.Message}"); + } + } + } 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 6c73ab63b..10ec55958 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 @@ -396,10 +396,13 @@ namespace Tango.MachineStudio.ThreadExtensions.ViewModels ActiveRML.Manufacturer = x.Name; bChanged = true; } - Manufacturers = _active_context.YarnManufacturers.Select(z => z.Name).ToList(); }, () => { }); if(bChanged) + { await _active_context.SaveChangesAsync(); + Manufacturers = _active_context.YarnManufacturers.Select(x => x.Name).ToList(); + } + } private bool AddItemToCollection( ObservableCollection collection, DbSet dbColection, ref string name) where T : class @@ -979,9 +982,11 @@ namespace Tango.MachineStudio.ThreadExtensions.ViewModels ColorParametersVewVM = new ColorParametersVewVM(_notification, _actionLogManager); ColorParametersVewVM.RMLExtemtionGUID = guid; ColorParametersVewVM.SelectedMachineGUID = SelectedMachine != null ? SelectedMachine.Guid : null ; + ColorParametersVewVM.RMLGUID = ActiveRML.Guid; TestResultsViewVM = new TestResultsViewVM(_notification, _actionLogManager); TestResultsViewVM.RMLExtemtionGUID = guid; + TestResultsViewVM.RMLGUID = ActiveRML.Guid; TestResultsViewVM.SelectedMachineGUID = SelectedMachine != null ? SelectedMachine.Guid : null; TestResultsViewVM.ThreadName = ActiveRML.Manufacturer; 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 24196a3f6..cc3a49a23 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 @@ -113,6 +113,15 @@ namespace Tango.MachineStudio.ThreadExtensions.ViewModels RaisePropertyChangedAuto(); } } + private string _RMLGUID; + public string RMLGUID + { + get { return _RMLGUID; } + set + { + _RMLGUID = value; + } + } #endregion @@ -132,7 +141,7 @@ namespace Tango.MachineStudio.ThreadExtensions.ViewModels /// public RelayCommand RenameTabCommand { get; set; } - public RelayCommand FlytoProcessParametersCommand { get; set; } + public RelayCommand ApplyToProcessParametersCommand { get; set; } public RelayCommand SaveCommand { get; set; } @@ -148,7 +157,7 @@ namespace Tango.MachineStudio.ThreadExtensions.ViewModels RemoveTabCommand = new RelayCommand(RemoveTab); RenameTabCommand = new RelayCommand(RenameTab); - FlytoProcessParametersCommand = new RelayCommand(FlytoProcessParameters); + ApplyToProcessParametersCommand = new RelayCommand(ApplyToProcessParameters); SaveCommand = new RelayCommand(Save, () => IsFree); } @@ -318,9 +327,44 @@ namespace Tango.MachineStudio.ThreadExtensions.ViewModels #endregion #region Save - public void FlytoProcessParameters() + + public async void ApplyToProcessParameters() { + try { + if (RMLGUID == null) + return; + using (var context = ObservablesContext.CreateDefault()) + { + var rml = await new RmlBuilder(context) + .Set(RMLGUID) + .WithActiveParametersGroup() + .BuildAsync(); + if (rml == null || rml.ProcessParametersTablesGroups.ToList().Count == 0) + { + _notification.ShowError("Could not save process parameters an RML with no process group."); + return; + } + + var activeProcessParametersGroup = rml.ProcessParametersTablesGroups.ToList().SingleOrDefault(x => x.Active); + if(activeProcessParametersGroup != null) + { + + var processParametersTables = activeProcessParametersGroup.ProcessParametersTables.OrderBy(x => x.TableIndex).ToSynchronizedObservableCollection().FirstOrDefault(); + processParametersTables.DryerZone1Temp = SelectedTab.TestResult.DryerTemperature == null? 0 : (double)SelectedTab.TestResult.DryerTemperature; + processParametersTables.RBlowerFlow = SelectedTab.TestResult.TunnelFlow == null ? 0 : (double)SelectedTab.TestResult.TunnelFlow; + processParametersTables.RBlowerTemp = SelectedTab.TestResult.TunnelFlow == null ? 0 : (double)SelectedTab.TestResult.TunnelFlow; ; + processParametersTables.LBlowerFlow = SelectedTab.TestResult.TunnelTemperature == null ? 0 : (double)SelectedTab.TestResult.TunnelTemperature; ; + processParametersTables.LBlowerTemp = SelectedTab.TestResult.TunnelTemperature == null ? 0 : (double)SelectedTab.TestResult.TunnelTemperature; ; + await context.SaveChangesAsync(); + } + } + } + catch(Exception ex) + { + LogManager.Log(ex, "Could not save process parameters."); + _notification.ShowError($"An error occurred while trying to save process parameters.\n{ex.Message}"); + } } public async void Save() 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 2654b4ff3..819200ea1 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 @@ -296,7 +296,7 @@ - Process Parameters -- cgit v1.3.1 From cde89b7390bcf308701e196a68d364a94af2b6d5 Mon Sep 17 00:00:00 2001 From: Victoria Plitt Date: Tue, 20 Jul 2021 19:41:52 +0300 Subject: Save Manufacturer in YarnManufactors table on first open RML/RMLExtention Related Work Items: #4219 --- .../ViewModels/MainViewVM.cs | 3 +++ .../Tango.MachineStudio.RML/ViewModels/MainViewVM.cs | 19 +++++++++++++++++++ .../ViewModels/MainViewVM.cs | 19 +++++++++---------- .../Views/RMLExtensionsView.xaml | 2 +- 4 files changed, 32 insertions(+), 11 deletions(-) (limited to 'Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions') diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels/MainViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels/MainViewVM.cs index cd1abff60..8d83c0a42 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels/MainViewVM.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels/MainViewVM.cs @@ -1256,6 +1256,9 @@ namespace Tango.MachineStudio.Developer.ViewModels { String filter = JobFilter.ToLower(); + if (JobsCollectionView == null) + return; + JobsCollectionView.Filter = (job) => { try 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 13cac9c88..bde174f07 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 @@ -184,6 +184,17 @@ namespace Tango.MachineStudio.RML.ViewModels set { _colorCalibrationVM = value; RaisePropertyChangedAuto(); } } + private List _manufacturers; + public List Manufacturers + { + get { return _manufacturers; } + set + { + _manufacturers = value; + RaisePropertyChangedAuto(); + } + } + private String _RMLFilter; /// /// Gets or sets the job filter. @@ -397,6 +408,13 @@ namespace Tango.MachineStudio.RML.ViewModels } } + if (!String.IsNullOrEmpty(ActiveRML.Manufacturer) && false == Manufacturers.Any(x => x == ActiveRML.Manufacturer)) + { + _active_context.YarnManufacturers.Add(new YarnManufacturer() { Name = ActiveRML.Manufacturer }); + await _active_context.SaveChangesAsync(); + Manufacturers.Add(ActiveRML.Manufacturer); + } + ActiveProcessParametersGroup = ActiveRML.ProcessParametersTablesGroups.ToList().FirstOrDefault(); ActiveProcessParametersTableView = CollectionViewSource.GetDefaultView(ActiveProcessParametersGroup.ProcessParametersTables); ActiveProcessParametersTableView.SortDescriptions.Add(new SortDescription(nameof(ProcessParametersTable.TableIndex), ListSortDirection.Ascending)); @@ -482,6 +500,7 @@ namespace Tango.MachineStudio.RML.ViewModels SpoolTypes = _active_context.SpoolTypes.ToObservableCollection(); BtsrApplicationTypes = _active_context.BtsrApplicationTypes.ToObservableCollection(); BtsrYarnTypes = _active_context.BtsrYarnTypes.ToObservableCollection(); + Manufacturers = _active_context.YarnManufacturers.Select(x => x.Name).ToList(); } private async void AddNewRml() 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 10ec55958..bbabb612e 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 @@ -837,15 +837,7 @@ namespace Tango.MachineStudio.ThreadExtensions.ViewModels Status = x.RMLExtesion == null ? RMLExtensionStatus.New : x.RMLExtesion.RMLStatus }).ToList(); RmlExtensions = q; - // RmlExtCollectionView = CollectionViewSource.GetDefaultView(RmlExtensions); - // RmlExtCollectionView.SortDescriptions.Add(new SortDescription(nameof(Rml.LastUpdated), ListSortDirection.Ascending)); - - //RmlExtCollectionView.Filter = (rml) => - //{ - // RmlExtensionModel r = rml as RmlExtensionModel; - // return String.IsNullOrWhiteSpace(Filter) - // || r.Name.ToLower().Contains(Filter.ToLower()); - //}; + } } catch (Exception ex) @@ -954,7 +946,14 @@ namespace Tango.MachineStudio.ThreadExtensions.ViewModels ActiveRML = new RmlBuilder(_active_context) .Set(SelectedRMLExtension.RMLGuid) .Build(); - + + if (!String.IsNullOrEmpty(ActiveRML.Manufacturer) && false == Manufacturers.Any(x => x == ActiveRML.Manufacturer)) + { + _active_context.YarnManufacturers.Add(new YarnManufacturer() { Name = ActiveRML.Manufacturer }); + await _active_context.SaveChangesAsync(); + Manufacturers.Add(ActiveRML.Manufacturer); + } + var machineIdsHasTest = (from c in _active_context.ColorProcessParameters.Where(x => x.RmlsExtensionsGuid == guid) select new { MichineGUID = c.MachineGuid }). Union (from p in _active_context.RmlExtensionTestResults.Where(x => x.RmlsExtensionsGuid == guid) diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/RMLExtensionsView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/RMLExtensionsView.xaml index b2bff1dae..13d2cd660 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/RMLExtensionsView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/RMLExtensionsView.xaml @@ -25,7 +25,7 @@ - + -- cgit v1.3.1 From 64049f8be57df4a391c64c4200e2b3208ae1b460 Mon Sep 17 00:00:00 2001 From: Victoria Plitt Date: Sun, 25 Jul 2021 19:07:26 +0300 Subject: RML Extension. Added logic to calculate Different% from ref (white color thread) and value in color in Test Results page. Related Work Items: #4219 --- .../Views/TestResultsView.xaml | 22 ++--- Software/Visual_Studio/Tango.BL/Entities/Rml.cs | 2 +- .../Tango.BL/Entities/RmlExtensionTestResult.cs | 99 +++++++++++++++++++++- .../Tango.BL/Entities/TensileResult.cs | 6 ++ 4 files changed, 116 insertions(+), 13 deletions(-) (limited to 'Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions') 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 819200ea1..a78a09415 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 @@ -269,14 +269,14 @@ - + Conclusion: - + - + Comments: - + @@ -296,8 +296,8 @@ - Process Parameters @@ -330,7 +330,7 @@ - + Rubbing results @@ -475,8 +475,8 @@ - - Mechanical properties + + Mechanical properties + + + + + + - + + + + + diff --git a/Software/Visual_Studio/Tango.BL/DTO/RmlsExtensionDTOBase.cs b/Software/Visual_Studio/Tango.BL/DTO/RmlsExtensionDTOBase.cs index 0e5f6be0d..7c8120aa5 100644 --- a/Software/Visual_Studio/Tango.BL/DTO/RmlsExtensionDTOBase.cs +++ b/Software/Visual_Studio/Tango.BL/DTO/RmlsExtensionDTOBase.cs @@ -237,5 +237,13 @@ namespace Tango.BL.DTO get; set; } + /// + /// rml level + /// + public Int32 RmlLevel + { + get; set; + } + } } diff --git a/Software/Visual_Studio/Tango.BL/Entities/ColorProcessParameterBase.cs b/Software/Visual_Studio/Tango.BL/Entities/ColorProcessParameterBase.cs index 8859e206c..864a4a7ba 100644 --- a/Software/Visual_Studio/Tango.BL/Entities/ColorProcessParameterBase.cs +++ b/Software/Visual_Studio/Tango.BL/Entities/ColorProcessParameterBase.cs @@ -37,10 +37,10 @@ namespace Tango.BL.Entities public event EventHandler> ColorProcessFactorsChanged; - public event EventHandler MachineChanged; - public event EventHandler RmlsExtensionsChanged; + public event EventHandler MachineChanged; + protected String _rmlsextensionsguid; /// @@ -224,65 +224,65 @@ namespace Tango.BL.Entities } } - protected Machine _machine; + protected RmlsExtension _rmlsextensions; /// - /// Gets or sets the colorprocessparameterbase machine. + /// Gets or sets the colorprocessparameterbase rmls extensions. /// [XmlIgnore] [JsonIgnore] - public virtual Machine Machine + public virtual RmlsExtension RmlsExtensions { get { - return _machine; + return _rmlsextensions; } set { - if (_machine != value) + if (_rmlsextensions != value) { - _machine = value; + _rmlsextensions = value; - if (Machine != null) + if (RmlsExtensions != null) { - MachineGuid = Machine.Guid; + RmlsExtensionsGuid = RmlsExtensions.Guid; } - OnMachineChanged(value); + OnRmlsExtensionsChanged(value); } } } - protected RmlsExtension _rmlsextensions; + protected Machine _machine; /// - /// Gets or sets the colorprocessparameterbase rmls extensions. + /// Gets or sets the colorprocessparameterbase machine. /// [XmlIgnore] [JsonIgnore] - public virtual RmlsExtension RmlsExtensions + public virtual Machine Machine { get { - return _rmlsextensions; + return _machine; } set { - if (_rmlsextensions != value) + if (_machine != value) { - _rmlsextensions = value; + _machine = value; - if (RmlsExtensions != null) + if (Machine != null) { - RmlsExtensionsGuid = RmlsExtensions.Guid; + MachineGuid = Machine.Guid; } - OnRmlsExtensionsChanged(value); + OnMachineChanged(value); } } @@ -334,21 +334,21 @@ namespace Tango.BL.Entities } /// - /// Called when the Machine has changed. + /// Called when the RmlsExtensions has changed. /// - protected virtual void OnMachineChanged(Machine machine) + protected virtual void OnRmlsExtensionsChanged(RmlsExtension rmlsextensions) { - MachineChanged?.Invoke(this, machine); - RaisePropertyChanged(nameof(Machine)); + RmlsExtensionsChanged?.Invoke(this, rmlsextensions); + RaisePropertyChanged(nameof(RmlsExtensions)); } /// - /// Called when the RmlsExtensions has changed. + /// Called when the Machine has changed. /// - protected virtual void OnRmlsExtensionsChanged(RmlsExtension rmlsextensions) + protected virtual void OnMachineChanged(Machine machine) { - RmlsExtensionsChanged?.Invoke(this, rmlsextensions); - RaisePropertyChanged(nameof(RmlsExtensions)); + MachineChanged?.Invoke(this, machine); + RaisePropertyChanged(nameof(Machine)); } /// diff --git a/Software/Visual_Studio/Tango.BL/Entities/RmlExtensionTestResult.cs b/Software/Visual_Studio/Tango.BL/Entities/RmlExtensionTestResult.cs index 726c88e97..30b008f38 100644 --- a/Software/Visual_Studio/Tango.BL/Entities/RmlExtensionTestResult.cs +++ b/Software/Visual_Studio/Tango.BL/Entities/RmlExtensionTestResult.cs @@ -42,7 +42,7 @@ namespace Tango.BL.Entities { foreach (var result in TensileResults) { - if (result.IsWhiteColor()) + if (result.IsWhiteColor) { WhiteColor = result; WhiteColor.MaxLoadChanged -= WhiteColor_MaxLoadChanged; @@ -67,7 +67,7 @@ namespace Tango.BL.Entities { if (WhiteColor == null || WhiteColor.MaxLoad == 0) result.PercentChangeLoad = 0; - else if (!result.IsWhiteColor()) + else if (!result.IsWhiteColor) result.PercentChangeLoad = 100 - ((result.MaxLoad * 100) / WhiteColor.MaxLoad); } @@ -79,7 +79,7 @@ namespace Tango.BL.Entities { if (WhiteColor == null || WhiteColor.StrainMaxLoad == 0) result.PercentChangeStrain = 0; - else if (!result.IsWhiteColor()) + else if (!result.IsWhiteColor) result.PercentChangeStrain = 100 - ((result.StrainMaxLoad * 100) / WhiteColor.StrainMaxLoad); } } diff --git a/Software/Visual_Studio/Tango.BL/Entities/RmlExtensionTestResultBase.cs b/Software/Visual_Studio/Tango.BL/Entities/RmlExtensionTestResultBase.cs index 92f5ef311..1d37d8199 100644 --- a/Software/Visual_Studio/Tango.BL/Entities/RmlExtensionTestResultBase.cs +++ b/Software/Visual_Studio/Tango.BL/Entities/RmlExtensionTestResultBase.cs @@ -87,14 +87,14 @@ namespace Tango.BL.Entities public event EventHandler> ThreadLubChanged; - public event EventHandler MachineChanged; - public event EventHandler RmlsExtensionsChanged; public event EventHandler> RubbingResultsChanged; public event EventHandler> TensileResultsChanged; + public event EventHandler MachineChanged; + protected String _rmlsextensionsguid; /// @@ -957,38 +957,6 @@ namespace Tango.BL.Entities } } - protected Machine _machine; - - /// - /// Gets or sets the rmlextensiontestresultbase machine. - /// - - [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; /// @@ -1071,6 +1039,38 @@ namespace Tango.BL.Entities } } + protected Machine _machine; + + /// + /// Gets or sets the rmlextensiontestresultbase machine. + /// + + [XmlIgnore] + [JsonIgnore] + public virtual Machine Machine + { + get + { + return _machine; + } + + set + { + if (_machine != value) + { + _machine = value; + + if (Machine != null) + { + MachineGuid = Machine.Guid; + } + + OnMachineChanged(value); + + } + } + } + /// /// Called when the ResultIndex has changed. /// @@ -1341,15 +1341,6 @@ namespace Tango.BL.Entities RaisePropertyChanged(nameof(ThreadLub)); } - /// - /// Called when the Machine has changed. - /// - protected virtual void OnMachineChanged(Machine machine) - { - MachineChanged?.Invoke(this, machine); - RaisePropertyChanged(nameof(Machine)); - } - /// /// Called when the RmlsExtensions has changed. /// @@ -1377,6 +1368,15 @@ namespace Tango.BL.Entities RaisePropertyChanged(nameof(TensileResults)); } + /// + /// Called when the Machine has changed. + /// + protected virtual void OnMachineChanged(Machine machine) + { + MachineChanged?.Invoke(this, machine); + RaisePropertyChanged(nameof(Machine)); + } + /// /// Initializes a new instance of the class. /// diff --git a/Software/Visual_Studio/Tango.BL/Entities/RmlsExtension.cs b/Software/Visual_Studio/Tango.BL/Entities/RmlsExtension.cs index 94c4fb48b..1bb1d489b 100644 --- a/Software/Visual_Studio/Tango.BL/Entities/RmlsExtension.cs +++ b/Software/Visual_Studio/Tango.BL/Entities/RmlsExtension.cs @@ -42,6 +42,18 @@ namespace Tango.BL.Entities } } + [NotMapped] + [JsonIgnore] + public RMLExtensionLevel Level + { + get { return (RMLExtensionLevel)RmlLevel; } + set + { + base.RmlLevel = value.ToInt32(); + RaisePropertyChangedAuto(); + } + } + #endregion } diff --git a/Software/Visual_Studio/Tango.BL/Entities/RmlsExtensionBase.cs b/Software/Visual_Studio/Tango.BL/Entities/RmlsExtensionBase.cs index a748b1905..a5ef66b9d 100644 --- a/Software/Visual_Studio/Tango.BL/Entities/RmlsExtensionBase.cs +++ b/Software/Visual_Studio/Tango.BL/Entities/RmlsExtensionBase.cs @@ -57,12 +57,12 @@ namespace Tango.BL.Entities public event EventHandler StatusChanged; + public event EventHandler RmlLevelChanged; + public event EventHandler> ColorProcessParametersChanged; public event EventHandler> RmlExtensionTestResultsChanged; - public event EventHandler RmlsChanged; - public event EventHandler YarnApplicationChanged; public event EventHandler YarnBrandChanged; @@ -83,6 +83,8 @@ namespace Tango.BL.Entities public event EventHandler YarnWhiteShadeChanged; + public event EventHandler RmlsChanged; + protected String _rmlsguid; /// @@ -799,83 +801,78 @@ namespace Tango.BL.Entities } } - protected SynchronizedObservableCollection _colorprocessparameters; + protected Int32 _rmllevel; /// - /// Gets or sets the rmlsextensionbase color process parameters. + /// Gets or sets the rmlsextensionbase rml level. /// - public virtual SynchronizedObservableCollection ColorProcessParameters + [Column("RML_LEVEL")] + + public Int32 RmlLevel { get { - return _colorprocessparameters; + return _rmllevel; } set { - if (_colorprocessparameters != value) + if (_rmllevel != value) { - _colorprocessparameters = value; + _rmllevel = value; - OnColorProcessParametersChanged(value); + OnRmlLevelChanged(value); } } } - protected SynchronizedObservableCollection _rmlextensiontestresults; + protected SynchronizedObservableCollection _colorprocessparameters; /// - /// Gets or sets the rmlsextensionbase rml extension test results. + /// Gets or sets the rmlsextensionbase color process parameters. /// - public virtual SynchronizedObservableCollection RmlExtensionTestResults + public virtual SynchronizedObservableCollection ColorProcessParameters { get { - return _rmlextensiontestresults; + return _colorprocessparameters; } set { - if (_rmlextensiontestresults != value) + if (_colorprocessparameters != value) { - _rmlextensiontestresults = value; + _colorprocessparameters = value; - OnRmlExtensionTestResultsChanged(value); + OnColorProcessParametersChanged(value); } } } - protected Rml _rmls; + protected SynchronizedObservableCollection _rmlextensiontestresults; /// - /// Gets or sets the rmlsextensionbase rml. + /// Gets or sets the rmlsextensionbase rml extension test results. /// - [XmlIgnore] - [JsonIgnore] - public virtual Rml Rmls + public virtual SynchronizedObservableCollection RmlExtensionTestResults { get { - return _rmls; + return _rmlextensiontestresults; } set { - if (_rmls != value) + if (_rmlextensiontestresults != value) { - _rmls = value; - - if (Rmls != null) - { - RmlsGuid = Rmls.Guid; - } + _rmlextensiontestresults = value; - OnRmlsChanged(value); + OnRmlExtensionTestResultsChanged(value); } } @@ -1201,6 +1198,38 @@ namespace Tango.BL.Entities } } + protected Rml _rmls; + + /// + /// Gets or sets the rmlsextensionbase rml. + /// + + [XmlIgnore] + [JsonIgnore] + public virtual Rml Rmls + { + get + { + return _rmls; + } + + set + { + if (_rmls != value) + { + _rmls = value; + + if (Rmls != null) + { + RmlsGuid = Rmls.Guid; + } + + OnRmlsChanged(value); + + } + } + } + /// /// Called when the Created has changed. /// @@ -1336,6 +1365,15 @@ namespace Tango.BL.Entities RaisePropertyChanged(nameof(Status)); } + /// + /// Called when the RmlLevel has changed. + /// + protected virtual void OnRmlLevelChanged(Int32 rmllevel) + { + RmlLevelChanged?.Invoke(this, rmllevel); + RaisePropertyChanged(nameof(RmlLevel)); + } + /// /// Called when the ColorProcessParameters has changed. /// @@ -1354,15 +1392,6 @@ namespace Tango.BL.Entities RaisePropertyChanged(nameof(RmlExtensionTestResults)); } - /// - /// Called when the Rmls has changed. - /// - protected virtual void OnRmlsChanged(Rml rmls) - { - RmlsChanged?.Invoke(this, rmls); - RaisePropertyChanged(nameof(Rmls)); - } - /// /// Called when the YarnApplication has changed. /// @@ -1453,6 +1482,15 @@ namespace Tango.BL.Entities RaisePropertyChanged(nameof(YarnWhiteShade)); } + /// + /// Called when the Rmls has changed. + /// + protected virtual void OnRmlsChanged(Rml rmls) + { + RmlsChanged?.Invoke(this, rmls); + RaisePropertyChanged(nameof(Rmls)); + } + /// /// Initializes a new instance of the class. /// diff --git a/Software/Visual_Studio/Tango.BL/Entities/TensileResult.cs b/Software/Visual_Studio/Tango.BL/Entities/TensileResult.cs index 913e27a2c..086d6070b 100644 --- a/Software/Visual_Studio/Tango.BL/Entities/TensileResult.cs +++ b/Software/Visual_Studio/Tango.BL/Entities/TensileResult.cs @@ -36,9 +36,13 @@ namespace Tango.BL.Entities } - public bool IsWhiteColor() + public bool IsWhiteColor { - return TestResultColor == TestResultColors.WHITE; + get + { + return TestResultColor == TestResultColors.WHITE; + } + } #endregion diff --git a/Software/Visual_Studio/Tango.BL/Enumerations/Permissions.cs b/Software/Visual_Studio/Tango.BL/Enumerations/Permissions.cs index 1e9aa10bc..9b09e7df0 100644 --- a/Software/Visual_Studio/Tango.BL/Enumerations/Permissions.cs +++ b/Software/Visual_Studio/Tango.BL/Enumerations/Permissions.cs @@ -349,11 +349,5 @@ namespace Tango.BL.Enumerations [Description("Allows emulating machine events remotely")] FSE_EmulateMachineEvents = 1032, - /// - /// (Allows editing of RML extesions) - /// - [Description("Allows editing of RML extesions")] - RMLExtentionsWrite = 1033, - } } diff --git a/Software/Visual_Studio/Tango.BL/Enumerations/RMLExtensionLevel.cs b/Software/Visual_Studio/Tango.BL/Enumerations/RMLExtensionLevel.cs new file mode 100644 index 000000000..ea02204d1 --- /dev/null +++ b/Software/Visual_Studio/Tango.BL/Enumerations/RMLExtensionLevel.cs @@ -0,0 +1,22 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Tango.BL.Enumerations +{ + public enum RMLExtensionLevel + { + [Description("1")] + One = 1, + [Description("2")] + Two = 2, + [Description("3")] + Three = 3, + } +} + + + diff --git a/Software/Visual_Studio/Tango.BL/Tango.BL.csproj b/Software/Visual_Studio/Tango.BL/Tango.BL.csproj index 07d37ca2d..35fd930f9 100644 --- a/Software/Visual_Studio/Tango.BL/Tango.BL.csproj +++ b/Software/Visual_Studio/Tango.BL/Tango.BL.csproj @@ -525,6 +525,7 @@ + @@ -761,7 +762,7 @@ - + \ No newline at end of file diff --git a/Software/Visual_Studio/Tango.DAL.Remote/DB/COLOR_PROCESS_PARAMETERS.cs b/Software/Visual_Studio/Tango.DAL.Remote/DB/COLOR_PROCESS_PARAMETERS.cs index 6ae529cad..e3ff8e462 100644 --- a/Software/Visual_Studio/Tango.DAL.Remote/DB/COLOR_PROCESS_PARAMETERS.cs +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/COLOR_PROCESS_PARAMETERS.cs @@ -34,7 +34,7 @@ namespace Tango.DAL.Remote.DB public virtual ICollection COLOR_PROCESS_DATA { get; set; } [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] public virtual ICollection COLOR_PROCESS_FACTORS { get; set; } - public virtual MACHINE MACHINE { get; set; } public virtual RMLS_EXTENSIONS RMLS_EXTENSIONS { get; set; } + public virtual MACHINE MACHINE { 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 03bfb8613..c19b0a06a 100644 --- a/Software/Visual_Studio/Tango.DAL.Remote/DB/RMLS_EXTENSIONS.cs +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/RMLS_EXTENSIONS.cs @@ -51,12 +51,12 @@ namespace Tango.DAL.Remote.DB public Nullable MAX_TENACITY { get; set; } public string FINISHING { get; set; } public int STATUS { get; set; } + public int RML_LEVEL { get; set; } [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] public virtual ICollection COLOR_PROCESS_PARAMETERS { get; set; } [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] public virtual ICollection RML_EXTENSION_TEST_RESULTS { get; set; } - public virtual RML RML { get; set; } public virtual YARN_APPLICATIONS YARN_APPLICATIONS { get; set; } public virtual YARN_BRANDS YARN_BRANDS { get; set; } public virtual YARN_FAMILIES YARN_FAMILIES { get; set; } @@ -67,5 +67,6 @@ 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; } + public virtual RML RML { 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 78e003062..9f38a5e7c 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 @@ -57,11 +57,11 @@ namespace Tango.DAL.Remote.DB public Nullable THREAD_COF { get; set; } public Nullable THREAD_LUB { 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 RUBBING_RESULTS { get; set; } [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")] public virtual ICollection TENSILE_RESULTS { get; set; } + public virtual MACHINE MACHINE { 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 c27c85971..702ce780c 100644 --- a/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.Context.cs +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.Context.cs @@ -26,6 +26,24 @@ namespace Tango.DAL.Remote.DB } public virtual DbSet SYNC_CONFIGURATIONS { get; set; } + public virtual DbSet COLOR_PROCESS_DATA { get; set; } + public virtual DbSet COLOR_PROCESS_FACTORS { get; set; } + public virtual DbSet COLOR_PROCESS_PARAMETERS { get; set; } + public virtual DbSet RML_EXTENSION_TEST_RESULTS { get; set; } + public virtual DbSet RMLS_EXTENSIONS { get; set; } + public virtual DbSet RUBBING_RESULTS { get; set; } + public virtual DbSet TENSILE_RESULTS { get; set; } + public virtual DbSet YARN_APPLICATIONS { get; set; } + public virtual DbSet YARN_BRANDS { get; set; } + public virtual DbSet YARN_FAMILIES { get; set; } + public virtual DbSet YARN_GLOSS_LEVELS { get; set; } + public virtual DbSet YARN_GROUPS { get; set; } + public virtual DbSet YARN_INDUSTRYSECTORS { get; set; } + public virtual DbSet YARN_MANUFACTURERS { get; set; } + public virtual DbSet YARN_SUB_FAMILIES { get; set; } + public virtual DbSet YARN_TEXTURINGS { get; set; } + public virtual DbSet YARN_TYPES { get; set; } + public virtual DbSet YARN_WHITE_SHADES { get; set; } public virtual DbSet ACTION_LOGS { get; set; } public virtual DbSet
ADDRESSES { get; set; } public virtual DbSet APPLICATION_DISPLAY_PANEL_VERSIONS { get; set; } @@ -42,9 +60,6 @@ namespace Tango.DAL.Remote.DB public virtual DbSet COLOR_CATALOGS_GROUPS { get; set; } public virtual DbSet COLOR_CATALOGS_ITEMS { get; set; } public virtual DbSet COLOR_CATALOGS_ITEMS_RECIPES { get; set; } - public virtual DbSet COLOR_PROCESS_DATA { get; set; } - public virtual DbSet COLOR_PROCESS_FACTORS { get; set; } - public virtual DbSet COLOR_PROCESS_PARAMETERS { get; set; } public virtual DbSet COLOR_SPACES { get; set; } public virtual DbSet CONFIGURATIONS { get; set; } public virtual DbSet CONTACTS { get; set; } @@ -95,13 +110,10 @@ namespace Tango.DAL.Remote.DB public virtual DbSet PROCESS_PARAMETERS_TABLES_GROUPS { get; set; } public virtual DbSet PUBLISHED_PROCEDURE_PROJECTS { get; set; } public virtual DbSet PUBLISHED_PROCEDURE_PROJECTS_VERSIONS { get; set; } - public virtual DbSet RML_EXTENSION_TEST_RESULTS { get; set; } public virtual DbSet RMLS { get; set; } - public virtual DbSet RMLS_EXTENSIONS { get; set; } public virtual DbSet RMLS_SPOOLS { get; set; } public virtual DbSet ROLES { get; set; } public virtual DbSet ROLES_PERMISSIONS { get; set; } - public virtual DbSet RUBBING_RESULTS { get; set; } public virtual DbSet SEGMENTS { get; set; } public virtual DbSet SITES { get; set; } public virtual DbSet SITES_CATALOGS { get; set; } @@ -117,20 +129,8 @@ namespace Tango.DAL.Remote.DB public virtual DbSet TECH_IOS { get; set; } public virtual DbSet TECH_MONITORS { get; set; } public virtual DbSet TECH_VALVES { get; set; } - public virtual DbSet TENSILE_RESULTS { get; set; } public virtual DbSet USERS { get; set; } public virtual DbSet USERS_ROLES { get; set; } public virtual DbSet WINDING_METHODS { get; set; } - public virtual DbSet YARN_APPLICATIONS { get; set; } - public virtual DbSet YARN_BRANDS { get; set; } - public virtual DbSet YARN_FAMILIES { get; set; } - public virtual DbSet YARN_GLOSS_LEVELS { get; set; } - public virtual DbSet YARN_GROUPS { get; set; } - public virtual DbSet YARN_INDUSTRYSECTORS { get; set; } - public virtual DbSet YARN_MANUFACTURERS { get; set; } - public virtual DbSet YARN_SUB_FAMILIES { get; set; } - public virtual DbSet YARN_TEXTURINGS { get; set; } - public virtual DbSet YARN_TYPES { get; set; } - public virtual DbSet YARN_WHITE_SHADES { 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 10618c6ce..78b7b3fdf 100644 --- a/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx @@ -1208,6 +1208,7 @@ + @@ -3618,6 +3619,88 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -3634,9 +3717,6 @@ - - - @@ -3687,13 +3767,10 @@ - - - @@ -3709,21 +3786,9 @@ - - - - - - - - - - - - @@ -3816,22 +3881,10 @@ - - - - - - - - - - - - @@ -4068,18 +4121,6 @@ - - - - - - - - - - - - @@ -4092,46 +4133,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -4173,69 +4174,558 @@ - + - - - - - - - + + + + + + + - + - - - - - - - - - + + + + + + + + - + - - - + + + + + + + + + - + - + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -4440,54 +4930,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -5347,86 +5789,42 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -5502,54 +5900,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -5592,23 +5942,6 @@ - - - - - - - - - - - - - - - - - @@ -5832,24 +6165,6 @@ - - - - - - - - - - - - - - - - - - @@ -5900,115 +6215,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -6291,45 +6497,17 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + - + - + - - + + @@ -6347,20 +6525,6 @@ - - - - - - - - - - - - - - @@ -7129,48 +7293,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -7213,126 +7335,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -7458,6 +7460,274 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -7675,83 +7945,38 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + - - - + + + + + + + + + + + - - - - - - - - + + + + + + + + + + @@ -8599,47 +8824,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -8698,42 +8882,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -8773,23 +8921,6 @@ - - - - - - - - - - - - - - - - - @@ -9012,24 +9143,6 @@ - - - - - - - - - - - - - - - - - - @@ -9070,116 +9183,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 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 385da5d6d..10bd85a35 100644 --- a/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx.diagram +++ b/Software/Visual_Studio/Tango.DAL.Remote/DB/RemoteADO.edmx.diagram @@ -5,94 +5,94 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - + + + + + + + + + + + + -- cgit v1.3.1