From 8a0b8f6abe3d143b43131a330e0ee39c2547ce8f Mon Sep 17 00:00:00 2001 From: Victoria Plitt Date: Sun, 4 Jul 2021 15:25:08 +0300 Subject: After Virus --- .../Views/TestResultsView.xaml | 622 +++++++++++++++++++++ 1 file changed, 622 insertions(+) create mode 100644 Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/TestResultsView.xaml (limited to 'Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/TestResultsView.xaml') 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 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -- 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/Views/TestResultsView.xaml') 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 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/Views/TestResultsView.xaml') 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