diff options
| author | Victoria Plitt <Victoria.Plitt@twine-s.com> | 2021-11-25 10:17:16 +0200 |
|---|---|---|
| committer | Victoria Plitt <Victoria.Plitt@twine-s.com> | 2021-11-25 10:17:16 +0200 |
| commit | 62d65c64a9a1e44aca6421ddc7a385a6d4b7361e (patch) | |
| tree | c1541168c59b130526bfc3459dea0c592a5c2e3e /Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions | |
| parent | b88f12398df6b1d3126369a4016eceecdfa4dbc8 (diff) | |
| download | Tango-62d65c64a9a1e44aca6421ddc7a385a6d4b7361e.tar.gz Tango-62d65c64a9a1e44aca6421ddc7a385a6d4b7361e.zip | |
#5818 -Export to Excel file
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions')
10 files changed, 479 insertions, 166 deletions
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Models/ColorParametrsExcelModel.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Models/ColorParametrsExcelModel.cs new file mode 100644 index 000000000..b762c1042 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Models/ColorParametrsExcelModel.cs @@ -0,0 +1,59 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Tango.MachineStudio.ThreadExtensions.Models +{ + public class ColorParametrsExcelModel + { + public String Thread_name { get; set; } + public String MachineNumber { get; set; } + public double White_point_L { get; set; } + public double White_point_a { get; set; } + public double White_point_B { get; set; } + public double Factor_100__C { get; set; } + public double Factor_100__Cyan_L { get; set; } + public double Factor_100__Cyan_A { get; set; } + public double Factor_100__Cyan_B { get; set; } + public double Factor_100__M { get; set; } + public double Factor_100__Magenta_L { get; set; } + public double Factor_100__Magenta_A { get; set; } + public double Factor_100__Magenta_B { get; set; } + + public double Factor_100__Y { get; set; } + public double Factor_100__Yellow_L { get; set; } + public double Factor_100__Yellow_A { get; set; } + public double Factor_100__Yellow_B { get; set; } + public double Factor_100_K { get; set; } + public double Factor_100__Key_L { get; set; } + public double Factor_100__Key_A { get; set; } + public double Factor_100__Key_B { get; set; } + public double Factor_200_C { get; set; } + public double Factor_200__Cyan_L { get; set; } + public double Factor_200__Cyan_A { get; set; } + public double Factor_200__Cyan_B { get; set; } + + public double Factor_200__Magenta { get; set; } + public double Factor_200__Magenta_L { get; set; } + public double Factor_200__Magenta_A { get; set; } + public double Factor_200__Magenta_B { get; set; } + + public double Factor_200__Yellow { get; set; } + public double Factor_200__Yellow_L { get; set; } + public double Factor_200__Yellow_A { get; set; } + public double Factor_200__Yellow_B { get; set; } + + public double Factor_200__Key { get; set; } + public double Factor_200__Key_L { get; set; } + public double Factor_200__Key_A { get; set; } + public double Factor_200__Key_B { get; set; } + + public int Min_Ink_Uptake_Zone1 { get; set; } + public int Min_Ink_Uptake_Zone2 { get; set; } + public int Max_Ink_Uptake_Zone1 { get; set; } + public int Max_ink_uptake__Zone2 { get; set; } + + } +} diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Models/TestResultsExcelModel.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Models/TestResultsExcelModel.cs new file mode 100644 index 000000000..fbd142362 --- /dev/null +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Models/TestResultsExcelModel.cs @@ -0,0 +1,123 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Tango.MachineStudio.ThreadExtensions.Models +{ + public class TestResultsExcelModel + { + public String Thread_name_test_results { get; set; } + public String Machine_number { get; set; } + public String Test_results_name__tab { get; set; } + + public int Dryer_temp { get; set; } + public int Dryer_flow { get; set; } + public int Tunnel_temp { get; set; } + public int Tunnel_flow { get; set; } + + public String Tension_in_head { get; set; } + public String Tension_after_dryer { get; set; } + public String Tension_in_winder { get; set; } + public String BTSR { get; set; } + public String Puller_tension { get; set; } + public String Winder_tension { get; set; } + + public double Rubbing_K_100___DE { get; set; } + public double Rubbing_K_100___GS { get; set; } + public double Rubbing_K_200___DE { get; set; } + public double Rubbing_K_200___GS { get; set; } + public double Rubbing_C_100___DE { get; set; } + public double Rubbing_C_100___GS { get; set; } + public double Rubbing_C_200___DE { get; set; } + public double Rubbing_C_200___GS { get; set; } + public double Rubbing_Y_100___DE { get; set; } + public double Rubbing_Y_100___GS { get; set; } + public double Rubbing_Y_200___DE { get; set; } + public double Rubbing_Y_200___GS { get; set; } + public double Rubbing_M_100___DE { get; set; } + public double Rubbing_M_100___GS { get; set; } + public double Rubbing_M_200___DE { get; set; } + public double Rubbing_M_200___GS { get; set; } + + public String Color_REF { get; set; } + public double Load__N_REF { get; set; } + public double STDEV_REF { get; set; } + public double REF_Strain { get; set; } + public double STDEV_Strain_REF { get; set; } + + public String Color_100_C { get; set; } + public int C_color_100_C { get; set; } + public double Load_N_100_C { get; set; } + public double STDEV_100_C { get; set; } + public double Change_100_C { get; set; } + public double Strain_100_C { get; set; } + public double STDEV_100_C_2 { get; set; } + public double Change_100_C_2 { get; set; } + + public String Color_100_K { get; set; } + public int C_color_100_K { get; set; } + public double Load__N_100_K { get; set; } + public double STDEV_100_K { get; set; } + public double Change__100_K { get; set; } + public double Strain_100_K { get; set; } + public double STDEV_100_K_2 { get; set; } + public double Change_100_K_2 { get; set; } + + public String Color_200_C { get; set; } + public int C_color_200_C { get; set; } + public double Load__N_200_C { get; set; } + public double STDEV_200_C { get; set; } + public double Change_200_C { get; set; } + public double Strain_200_C { get; set; } + public double STDEV_200_C_2 { get; set; } + public double Change_200_C_2 { get; set; } + + public String Color_200_K { get; set; } + public int C_color_200_K { get; set; } + public double Load__N_200_K { get; set; } + public double STDEV_200_K { get; set; } + public double Change_200_K { get; set; } + public double Strain_200_K { get; set; } + public double STDEV_200_K_2 { get; set; } + public double Change_200_K_2 { get; set; } + + public String Uniformity_Zone_1 { get; set; } + public String Uniformity_Zone_2 { get; set; } + + public double COF_REF { get; set; } + public double CV_REF { get; set; } + public double COF_Black { get; set; } + public double CV_Black { get; set; } + //for twine inly + public double lub_amount { get; set; } + + public String Comments { get; set; } + public String Conclusion { get; set; } + + public TestResultsExcelModel() + { + Comments = Conclusion = ""; + Color_100_C = "Cyan"; + C_color_100_C = 100; + Load__N_100_K = STDEV_100_K = Change__100_K = Strain_100_K = STDEV_100_K_2 = Change_100_K_2 = 0.0; + + Color_200_C = "Cyan"; + C_color_200_C = 200; + Load__N_200_C = STDEV_200_C = Change_200_C = Strain_200_C = STDEV_200_C_2 = Change_200_C_2 = 0.0; + + Color_100_K = "Black"; + C_color_100_K = 100; + Load__N_100_K = STDEV_100_K = Change__100_K = Strain_100_K = STDEV_100_K_2 = Change_100_K_2 = 0.0; + + Color_200_K = "Black"; + C_color_200_K = 200; + Load__N_200_K = STDEV_200_K = Change_200_K = Strain_200_K = STDEV_200_K_2 = Change_200_K_2 = 0.0; + + Color_REF = "REF"; + Load__N_REF = STDEV_REF = REF_Strain = STDEV_Strain_REF = 0; + } + + } +} diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Models/ThreadCharacteristicsExelModel.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Models/ThreadCharacteristicsExelModel.cs index dc205b7f5..1f894d70b 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Models/ThreadCharacteristicsExelModel.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Models/ThreadCharacteristicsExelModel.cs @@ -6,7 +6,7 @@ using System.Threading.Tasks; namespace Tango.MachineStudio.ThreadExtensions.Models { - public class ThreadCharacteristicsExelModel + public class ThreadCharacteristicsExcelModel { public String ThreadName { get; set; } public String Manufacturer { get; set; } @@ -33,14 +33,5 @@ namespace Tango.MachineStudio.ThreadExtensions.Models public String FiberCount { get; set; } public int Twist { get; set; } public String TwistDirection { get; set; } - - //public Color R_Color { get; set; } - //public String R_Name { get; set; } - //public String R_Media { get; set; } - //public double R_Cyan { get; set; } - //public double R_Magenta { get; set; } - //public double R_Yellow { get; set; } - //public double R_Black { get; set; } - //public int R_Region { 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 dde2df976..5199245a3 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 @@ -96,10 +96,12 @@ <Compile Include="Converters\ComboBoxVisibleConverter.cs" /> <Compile Include="Converters\NumericFieldConverter.cs" /> <Compile Include="Models\ColorDataExcelModel.cs" /> + <Compile Include="Models\ColorParametrsExcelModel.cs" /> <Compile Include="Models\FactorTarget.cs" /> <Compile Include="Models\MachineModel.cs" /> <Compile Include="Models\PlotProperties.cs" /> <Compile Include="Models\RmlExtensionModel.cs" /> + <Compile Include="Models\TestResultsExcelModel.cs" /> <Compile Include="Models\ThreadCharacteristicsExelModel.cs" /> <Compile Include="ViewModelLocator.cs" /> <Compile Include="ViewModels\AddItemDialogVM.cs" /> diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Templates/ExportRMLTemplate.xlsx b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Templates/ExportRMLTemplate.xlsx Binary files differindex 7cd21386f..e9bdd6151 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Templates/ExportRMLTemplate.xlsx +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Templates/ExportRMLTemplate.xlsx 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 c60c65216..e13e016c5 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 @@ -782,6 +782,104 @@ namespace Tango.MachineStudio.ThreadExtensions.ViewModels } #endregion + + #region export to excel + + public void WritetoExcel(ColorParametrsExcelModel colorParametrsExcelModel, string machineGuid) + { + if (_active_context == null) + { + _active_context = ObservablesContext.CreateDefault(); + } + var colorProcessParametercur = _active_context.ColorProcessParameters.Where(x => x.RmlsExtensionsGuid == RMLExtemtionGUID && x.MachineGuid == machineGuid).FirstOrDefault(); + if (colorProcessParametercur == null) + return; + var colorProcessParameter = new ColorProcessParametersBuilder(_active_context).Set(colorProcessParametercur.Guid).WithColorProcessData().WithColorProcessFactor().WithColorProcessInkUptake().Build(); + var factor_cyan100 = colorProcessParameter.ColorProcessFactors.Where(x => x.FactorColor == FactorColors.CYAN && x.FactorPercent == 100).FirstOrDefault(); + if (factor_cyan100 != null) + { + colorParametrsExcelModel.Factor_100__C = factor_cyan100.InkNlCm; + colorParametrsExcelModel.Factor_100__Cyan_L = factor_cyan100.L; + colorParametrsExcelModel.Factor_100__Cyan_A = factor_cyan100.A; + colorParametrsExcelModel.Factor_100__Cyan_B = factor_cyan100.B; + } + + var factor_magenta100 = colorProcessParameter.ColorProcessFactors.Where(x => x.FactorColor == FactorColors.MAGENTA && x.FactorPercent == 100).FirstOrDefault(); + if (factor_magenta100 != null) + { + colorParametrsExcelModel.Factor_100__M = factor_magenta100.InkNlCm; + colorParametrsExcelModel.Factor_100__Magenta_L = factor_magenta100.L; + colorParametrsExcelModel.Factor_100__Magenta_A = factor_magenta100.A; + colorParametrsExcelModel.Factor_100__Magenta_B = factor_magenta100.B; + } + + var factor_yellow100 = colorProcessParameter.ColorProcessFactors.Where(x => x.FactorColor == FactorColors.YELLOW && x.FactorPercent == 100).FirstOrDefault(); + if (factor_yellow100 != null) + { + colorParametrsExcelModel.Factor_100__Y = factor_yellow100.InkNlCm; + colorParametrsExcelModel.Factor_100__Yellow_L = factor_yellow100.L; + colorParametrsExcelModel.Factor_100__Yellow_A = factor_yellow100.A; + colorParametrsExcelModel.Factor_100__Yellow_B = factor_yellow100.B; + } + + var factor_key100 = colorProcessParameter.ColorProcessFactors.Where(x => x.FactorColor == FactorColors.BLACK && x.FactorPercent == 100).FirstOrDefault(); + if (factor_key100 != null) + { + colorParametrsExcelModel.Factor_100_K = factor_key100.InkNlCm; + colorParametrsExcelModel.Factor_100__Key_L = factor_key100.L; + colorParametrsExcelModel.Factor_100__Key_A = factor_key100.A; + colorParametrsExcelModel.Factor_100__Key_B = factor_key100.B; + } + + var factor_cyan200 = colorProcessParameter.ColorProcessFactors.Where(x => x.FactorColor == FactorColors.CYAN && x.FactorPercent == 200).FirstOrDefault(); + if (factor_cyan200 != null) + { + colorParametrsExcelModel.Factor_200_C = factor_cyan200.InkNlCm; + colorParametrsExcelModel.Factor_200__Cyan_L = factor_cyan200.L; + colorParametrsExcelModel.Factor_200__Cyan_A = factor_cyan200.A; + colorParametrsExcelModel.Factor_200__Cyan_B = factor_cyan200.B; + } + + var factor_magenta200 = colorProcessParameter.ColorProcessFactors.Where(x => x.FactorColor == FactorColors.MAGENTA && x.FactorPercent == 200).FirstOrDefault(); + if (factor_magenta200 != null) + { + colorParametrsExcelModel.Factor_200__Magenta = factor_magenta200.InkNlCm; + colorParametrsExcelModel.Factor_200__Magenta_L = factor_magenta200.L; + colorParametrsExcelModel.Factor_200__Magenta_A = factor_magenta200.A; + colorParametrsExcelModel.Factor_200__Magenta_B = factor_magenta200.B; + } + + var factor_yellow200 = colorProcessParameter.ColorProcessFactors.Where(x => x.FactorColor == FactorColors.YELLOW && x.FactorPercent == 200).FirstOrDefault(); + if (factor_yellow200 != null) + { + colorParametrsExcelModel.Factor_200__Yellow = factor_yellow200.InkNlCm; + colorParametrsExcelModel.Factor_200__Yellow_L = factor_yellow200.L; + colorParametrsExcelModel.Factor_200__Yellow_A = factor_yellow200.A; + colorParametrsExcelModel.Factor_200__Yellow_B = factor_yellow200.B; + } + + var factor_key200 = colorProcessParameter.ColorProcessFactors.Where(x => x.FactorColor == FactorColors.BLACK && x.FactorPercent == 200).FirstOrDefault(); + if (factor_key200 != null) + { + colorParametrsExcelModel.Factor_200__Key = factor_key200.InkNlCm; + colorParametrsExcelModel.Factor_200__Key_L = factor_key200.L; + colorParametrsExcelModel.Factor_200__Key_A = factor_key200.A; + colorParametrsExcelModel.Factor_200__Key_B = factor_key200.B; + } + + foreach (var inkUptakeZone in colorProcessParameter.ColorProcessInkUptake) + { + if (inkUptakeZone.InkUptakeZoneType == InkUptakeZoneTypes.MININKUPTAKEZONE1) + colorParametrsExcelModel.Min_Ink_Uptake_Zone1 = (inkUptakeZone.InkValue == null) ? 0 : (int)inkUptakeZone.InkValue; + else if (inkUptakeZone.InkUptakeZoneType == InkUptakeZoneTypes.MININKUPTAKEZONE2) + colorParametrsExcelModel.Min_Ink_Uptake_Zone2 = (inkUptakeZone.InkValue == null) ? 0 : (int)inkUptakeZone.InkValue; + else if (inkUptakeZone.InkUptakeZoneType == InkUptakeZoneTypes.MAXINKUPTAKEZONE1) + colorParametrsExcelModel.Max_Ink_Uptake_Zone1 = (inkUptakeZone.InkValue == null) ? 0 : (int)inkUptakeZone.InkValue; + else if (inkUptakeZone.InkUptakeZoneType == InkUptakeZoneTypes.MAXINKUPTAKEZONE2) + colorParametrsExcelModel.Max_ink_uptake__Zone2 = (inkUptakeZone.InkValue == null) ? 0 : (int)inkUptakeZone.InkValue; + } + } + #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 954500b60..6b95cf190 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 @@ -1255,8 +1255,8 @@ namespace Tango.MachineStudio.ThreadExtensions.ViewModels // .Set(SelectedRMLExtension.RMLGuid) // .Build(); - List<ThreadCharacteristicsExelModel> threadCharacteristicsExelModels = new List<ThreadCharacteristicsExelModel>(); - ThreadCharacteristicsExelModel model = new ThreadCharacteristicsExelModel(); + List<ThreadCharacteristicsExcelModel> threadCharacteristicsExelModels = new List<ThreadCharacteristicsExcelModel>(); + ThreadCharacteristicsExcelModel model = new ThreadCharacteristicsExcelModel(); model.ThreadName = ActiveRML.Name; model.Manufacturer = ActiveRML.Manufacturer == null? "": ActiveRML.Manufacturer; model.Brand = ActiveRMLExtension.YarnBrand == null ? "": ActiveRMLExtension.YarnBrand.Name; @@ -1283,18 +1283,33 @@ namespace Tango.MachineStudio.ThreadExtensions.ViewModels model.Twist = ActiveRMLExtension.TwistTpm; model.TwistDirection = ActiveRMLExtension.YarnTwistDirections.ToDescription(); threadCharacteristicsExelModels.Add(model); - writer.WriteData(threadCharacteristicsExelModels, "Thread characteristics"); - //List<ColorGroup> groups = ActiveCatalog.ColorCatalogsGroups.Select(x => new ColorGroup() - //{ - // GroupColor = x.Color, - // GroupName = x.Name, - // GroupIndex = x.GroupIndex, - //}).ToList(); + writer.WriteData(threadCharacteristicsExelModels, "Thread characteristics", 2); - //writer.WriteData(groups, "Groups"); + List<ColorParametrsExcelModel> colorParametrsExcelList = new List<ColorParametrsExcelModel>(); - //ActiveRMLExtension. + List<TestResultsExcelModel> testResultsExcelModelList = new List<TestResultsExcelModel>(); + foreach(var machine in Machines) + { + if (machine.HasRMLTest) + { + ColorParametrsExcelModel colorParametrsExcelModel = new ColorParametrsExcelModel(); + colorParametrsExcelModel.Thread_name = ActiveRML.Name; + colorParametrsExcelModel.MachineNumber = machine.SerialNumber; + colorParametrsExcelModel.White_point_L = ActiveRML.WhitePointL; + colorParametrsExcelModel.White_point_a = ActiveRML.WhitePointA; + colorParametrsExcelModel.White_point_B = ActiveRML.WhitePointB; + ColorParametersVewVM.WritetoExcel(colorParametrsExcelModel, machine.Guid); + + colorParametrsExcelList.Add(colorParametrsExcelModel); + + TestResultsViewVM.LoadTestResultsExcel(testResultsExcelModelList, machine.Guid, machine.SerialNumber); + } + + } + writer.WriteData(colorParametrsExcelList, "Color parameters",2); + writer.WriteData(testResultsExcelModelList, "Machine tests results", 2); + writer.Dispose(); InvokeUI(() => diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/ViewModels/TestResultViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/ViewModels/TestResultViewVM.cs index 52182cdd7..41be789ed 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/ViewModels/TestResultViewVM.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/ViewModels/TestResultViewVM.cs @@ -12,6 +12,7 @@ using Tango.BL.Entities; using Tango.BL.Enumerations; using Tango.Core.Commands; using Tango.MachineStudio.Common.Notifications; +using Tango.MachineStudio.ThreadExtensions.Models; using Tango.SharedUI; namespace Tango.MachineStudio.ThreadExtensions.ViewModels @@ -63,139 +64,14 @@ namespace Tango.MachineStudio.ThreadExtensions.ViewModels #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.Gs100.ToString()} "); - //sb.Append(" DeltaE CIE 200 % : "); - sb.Append($" { rubbingResult.DeltaeCie200.ToString()} "); - //sb.Append(" GS 200% : "); - sb.Append($" { rubbingResult.Gs200.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 index eea7eb9fc..f7823a77c 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 @@ -402,5 +402,156 @@ namespace Tango.MachineStudio.ThreadExtensions.ViewModels } #endregion + + public async void LoadTestResultsExcel(List<TestResultsExcelModel> testResultsExcelModelList, string machineGUID, string machineSerialNumber) + { + try + { + IsFree = false; + if (_active_context == null) + { + _active_context = ObservablesContext.CreateDefault(); + } + + using (_notification.PushTaskItem("Loading Test Results Parameters for save in Excel file ...")) + { + SynchronizedObservableCollection<RmlExtensionTestResult> testResults = SelectedTestResults; + if (SelectedMachineGUID != machineGUID) + { + var loadedtestResults = await new RMLExtensionTestResultsCollectionBuilder(_active_context).SetAll().ForRMLExtension(RMLExtemtionGUID).ForMachine(machineGUID).WithRubbingAndTensileResults().BuildAsync(); + testResults = loadedtestResults.OrderBy(x => x.ResultIndex).ToSynchronizedObservableCollection(); + + } + foreach (var testresult in testResults) + { + TestResultsExcelModel testResultsExcelModel = new TestResultsExcelModel(); + testResultsExcelModel.Thread_name_test_results = ThreadName; + testResultsExcelModel.Machine_number = machineSerialNumber; + testResultsExcelModel.Test_results_name__tab = testresult.Name; + + testResultsExcelModel.Dryer_temp = testresult.DryerTemperature == null ? 0 : (int)testresult.DryerTemperature; + testResultsExcelModel.Dryer_flow = 0; + testResultsExcelModel.Tunnel_temp = testresult.TunnelTemperature == null ? 0 : (int)testresult.TunnelTemperature; + testResultsExcelModel.Tunnel_flow = testresult.TunnelFlow == null ? 0 : (int)testresult.TunnelFlow; + + testResultsExcelModel.Tension_in_head = testresult.TensionHeadMin == null ? "" : testresult.TensionHeadMin.ToString(); + testResultsExcelModel.Tension_after_dryer = testresult.TensionAfterDryerMin == null ? "" : testresult.TensionAfterDryerMin.ToString(); + testResultsExcelModel.Tension_in_winder = testresult.TensionWinderMin == null ? "" : testresult.TensionWinderMin.ToString(); + testResultsExcelModel.BTSR = testresult.BtsrMin == null ? "" : testresult.BtsrMin.ToString(); + testResultsExcelModel.Puller_tension = testresult.PullerTensionMin == null ? "" : testresult.PullerTensionMin.ToString(); + testResultsExcelModel.Winder_tension = testresult.ExitTensionMin == null ? "" : testresult.ExitTensionMin.ToString(); + + foreach( var tensileResult in testresult.TensileResults) + { + if(tensileResult.TestResultColor == TestResultColors.CYAN) + { + if(tensileResult.ColorPercent == 100) + { + testResultsExcelModel.Load_N_100_C = tensileResult.MaxLoad == null ? 0 : (double)tensileResult.MaxLoad; + testResultsExcelModel.STDEV_100_C = tensileResult.StdevMaxLoad == null ? 0 : (double)tensileResult.StdevMaxLoad; + testResultsExcelModel.Change_100_C = tensileResult.PercentChangeLoad == null ? 0 : (double)tensileResult.PercentChangeLoad; + testResultsExcelModel.Strain_100_C = tensileResult.StrainMaxLoad == null ? 0 : (double)tensileResult.StrainMaxLoad; + testResultsExcelModel.STDEV_100_C_2 = tensileResult.StdevStrainMaxLoad == null ? 0 : (double)tensileResult.StdevStrainMaxLoad; + testResultsExcelModel.Change_100_C_2 = tensileResult.PercentChangeStrain == null ? 0 : (double)tensileResult.PercentChangeStrain; + } + else if(tensileResult.ColorPercent == 200) + { + testResultsExcelModel.Load__N_200_C = tensileResult.MaxLoad == null ? 0 : (double)tensileResult.MaxLoad; + testResultsExcelModel.STDEV_200_C = tensileResult.StdevMaxLoad == null ? 0 : (double)tensileResult.StdevMaxLoad; + testResultsExcelModel.Change_200_C = tensileResult.PercentChangeLoad == null ? 0 : (double)tensileResult.PercentChangeLoad; + testResultsExcelModel.Strain_200_C = tensileResult.StrainMaxLoad == null ? 0 : (double)tensileResult.StrainMaxLoad; + testResultsExcelModel.STDEV_200_C_2 = tensileResult.StdevStrainMaxLoad == null ? 0 : (double)tensileResult.StdevStrainMaxLoad; + testResultsExcelModel.Change_200_C_2 = tensileResult.PercentChangeStrain == null ? 0 : (double)tensileResult.PercentChangeStrain; + } + } + else if(tensileResult.TestResultColor == TestResultColors.BLACK) + { + if (tensileResult.ColorPercent == 100) + { + testResultsExcelModel.Load__N_100_K = tensileResult.MaxLoad == null ? 0 : (double)tensileResult.MaxLoad; + testResultsExcelModel.STDEV_100_K = tensileResult.StdevMaxLoad == null ? 0 : (double)tensileResult.StdevMaxLoad; + testResultsExcelModel.Change__100_K = tensileResult.PercentChangeLoad == null ? 0 : (double)tensileResult.PercentChangeLoad; + testResultsExcelModel.Strain_100_K = tensileResult.StrainMaxLoad == null ? 0 : (double)tensileResult.StrainMaxLoad; + testResultsExcelModel.STDEV_100_K_2 = tensileResult.StdevStrainMaxLoad == null ? 0 : (double)tensileResult.StdevStrainMaxLoad; + testResultsExcelModel.Change_100_K_2 = tensileResult.PercentChangeStrain == null ? 0 : (double)tensileResult.PercentChangeStrain; + } + else if (tensileResult.ColorPercent == 200) + { + testResultsExcelModel.Load__N_200_K = tensileResult.MaxLoad == null ? 0 : (double)tensileResult.MaxLoad; + testResultsExcelModel.STDEV_200_K = tensileResult.StdevMaxLoad == null ? 0 : (double)tensileResult.StdevMaxLoad; + testResultsExcelModel.Change_200_K = tensileResult.PercentChangeLoad == null ? 0 : (double)tensileResult.PercentChangeLoad; + testResultsExcelModel.Strain_200_K = tensileResult.StrainMaxLoad == null ? 0 : (double)tensileResult.StrainMaxLoad; + testResultsExcelModel.STDEV_200_K_2 = tensileResult.StdevStrainMaxLoad == null ? 0 : (double)tensileResult.StdevStrainMaxLoad; + testResultsExcelModel.Change_200_K_2 = tensileResult.PercentChangeStrain == null ? 0 : (double)tensileResult.PercentChangeStrain; + } + + } + else if (tensileResult.IsWhiteColor) + { + testResultsExcelModel.Load__N_REF = tensileResult.MaxLoad == null ? 0 : (double)tensileResult.MaxLoad; + testResultsExcelModel.STDEV_REF = tensileResult.StdevMaxLoad == null ? 0 : (double)tensileResult.StdevMaxLoad; + testResultsExcelModel.REF_Strain = tensileResult.StdevStrainMaxLoad == null ? 0 : (double)tensileResult.StdevStrainMaxLoad; + testResultsExcelModel.STDEV_Strain_REF = tensileResult.PercentChangeStrain == null ? 0 : (double)tensileResult.PercentChangeStrain; + } + + } + + foreach (var rubbingresult in testresult.RubbingResults) + { + if (rubbingresult.TestResultColor == TestResultColors.CYAN) + { + testResultsExcelModel.Rubbing_C_100___DE = rubbingresult.DeltaeCie100 == null ? 0.0 : (double)rubbingresult.DeltaeCie100; + testResultsExcelModel.Rubbing_C_100___GS = rubbingresult.Gs100 == null ? 0.0 : (double)rubbingresult.Gs100; + testResultsExcelModel.Rubbing_C_200___DE = rubbingresult.DeltaeCie200 == null ? 0.0 : (double)rubbingresult.DeltaeCie200; + testResultsExcelModel.Rubbing_C_200___GS = rubbingresult.Gs200 == null ? 0.0 : (double)rubbingresult.Gs200; + } + else if (rubbingresult.TestResultColor == TestResultColors.MAGENTA) + { + testResultsExcelModel.Rubbing_M_100___DE = rubbingresult.DeltaeCie100 == null ? 0.0 : (double)rubbingresult.DeltaeCie100; + testResultsExcelModel.Rubbing_M_100___GS = rubbingresult.Gs100 == null ? 0.0 : (double)rubbingresult.Gs100; + testResultsExcelModel.Rubbing_M_200___DE = rubbingresult.DeltaeCie200 == null ? 0.0 : (double)rubbingresult.DeltaeCie200; + testResultsExcelModel.Rubbing_M_200___GS = rubbingresult.Gs200 == null ? 0.0 : (double)rubbingresult.Gs200; + } + else if (rubbingresult.TestResultColor == TestResultColors.YELLOW) + { + testResultsExcelModel.Rubbing_Y_100___DE = rubbingresult.DeltaeCie100 == null ? 0.0 : (double)rubbingresult.DeltaeCie100; + testResultsExcelModel.Rubbing_Y_100___GS = rubbingresult.Gs100 == null ? 0.0 : (double)rubbingresult.Gs100; + testResultsExcelModel.Rubbing_Y_200___DE = rubbingresult.DeltaeCie200 == null ? 0.0 : (double)rubbingresult.DeltaeCie200; + testResultsExcelModel.Rubbing_Y_200___GS = rubbingresult.Gs200 == null ? 0.0 : (double)rubbingresult.Gs200; + } + else if (rubbingresult.TestResultColor == TestResultColors.BLACK) + { + testResultsExcelModel.Rubbing_K_100___DE = rubbingresult.DeltaeCie100 == null ? 0.0 : (double)rubbingresult.DeltaeCie100; + testResultsExcelModel.Rubbing_K_100___GS = rubbingresult.Gs100 == null ? 0.0 : (double)rubbingresult.Gs100; + testResultsExcelModel.Rubbing_K_200___DE = rubbingresult.DeltaeCie200 == null ? 0.0 : (double)rubbingresult.DeltaeCie200; + testResultsExcelModel.Rubbing_K_200___GS = rubbingresult.Gs200 == null ? 0.0 : (double)rubbingresult.Gs200; + } + } + + testResultsExcelModel.Uniformity_Zone_1 = testresult.SeverityZone1Min == null ? "" : testresult.SeverityZone1Min.ToString() + "-" + testresult.SeverityZone1Max == null ? "" : testresult.SeverityZone1Max.ToString(); + testResultsExcelModel.Uniformity_Zone_2 = testresult.SeverityZone2Min == null ? "" : testresult.SeverityZone2Min.ToString() + "-" + testresult.SeverityZone2Max == null ? "" : testresult.SeverityZone2Max.ToString(); + + testResultsExcelModel.COF_REF = testresult.RefCof == null ? 0.0 : (double)testresult.RefCof; + testResultsExcelModel.CV_REF = 0.0; + testResultsExcelModel.COF_Black = testresult.ThreadCof == null ? 0.0 : (double)testresult.ThreadCof; + testResultsExcelModel.CV_Black = 0.0; + testResultsExcelModel.lub_amount = testresult.ThreadLub == null ? 0.0 : (double)testresult.ThreadLub; + + testResultsExcelModel.Comments = testresult.Comment; + testResultsExcelModel.Conclusion = testresult.Conclusions; + testResultsExcelModelList.Add(testResultsExcelModel); + } + } + IsFree = true; + } + catch (Exception ex) + { + LogManager.Log(ex, $"Error loading TestResults for saving in Excel file.\n{ex.FlattenMessage()}"); + } + finally + { + IsFree = true; + } + } } } 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 53ed5dc2c..17a68afb0 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 @@ -267,16 +267,14 @@ <Grid Grid.Column="0" MinWidth="600" HorizontalAlignment="Left" > <DockPanel > - <Button DockPanel.Dock="Bottom" Width="200" HorizontalAlignment="Right" Margin="20" Command="{Binding SelectedTab.ExportToFileCommand}" IsEnabled="False"> Export to File</Button> - - <Grid DockPanel.Dock="Bottom" Margin="20 10 20 0"> + <Grid DockPanel.Dock="Bottom" Margin="20 10 20 40"> <TextBlock FontSize="21">Conclusion:</TextBlock> - <TextBox Margin="120 0 10 0" HorizontalAlignment="Stretch" MinHeight="40" Text="{Binding SelectedTab.TestResult.Conclusions}" Style="{StaticResource Rounded_Corners_TextBox_Multiline}"></TextBox> + <TextBox Margin="120 0 10 0" HorizontalAlignment="Stretch" Height="46" Text="{Binding SelectedTab.TestResult.Conclusions}" Style="{StaticResource Rounded_Corners_TextBox_Multiline}"></TextBox> </Grid> <Grid DockPanel.Dock="Bottom" Margin="20 10 20 0"> <TextBlock FontSize="21">Comments:</TextBlock> - <TextBox Margin="120 0 10 0" Style="{StaticResource Rounded_Corners_TextBox_Multiline}" HorizontalAlignment="Stretch" MinHeight="40" Text="{Binding SelectedTab.TestResult.Comment}"></TextBox> + <TextBox Margin="120 0 10 0" Style="{StaticResource Rounded_Corners_TextBox_Multiline}" HorizontalAlignment="Stretch" Height="46" Text="{Binding SelectedTab.TestResult.Comment}"></TextBox> </Grid> @@ -414,8 +412,8 @@ <Border BorderThickness="0 0 0 1" Background="{StaticResource TransparentBackgroundBrush700}" BorderBrush="{StaticResource BorderBrushGainsboro}"> <StackPanel Orientation="Horizontal"> <mahapps:NumericUpDown HasDecimals="True" Minimum="0" Maximum="100" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" HideUpDownButtons="True" InterceptMouseWheel="True" HorizontalContentAlignment="Left" Value="{Binding SelectedTab.TestResult.TensionHeadMin,Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" FontSize="16" Margin="10 0 0 0" Padding="0" StringFormat="{}{0:F2}" HorizontalAlignment="Right" MinWidth="26"/> - <TextBlock FontSize="16" VerticalAlignment="Center"> -</TextBlock> - <mahapps:NumericUpDown HasDecimals="True" Minimum="0" Maximum="100" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" HideUpDownButtons="True" InterceptMouseWheel="True" HorizontalContentAlignment="Left" Value="{Binding SelectedTab.TestResult.TensionHeadMax,Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" FontSize="16" Margin="0 0 0 0" Padding="0" StringFormat="{}{0:F2}" HorizontalAlignment="Left" MinWidth="26"/> + <!--<TextBlock FontSize="16" VerticalAlignment="Center"> -</TextBlock> + <mahapps:NumericUpDown HasDecimals="True" Minimum="0" Maximum="100" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" HideUpDownButtons="True" InterceptMouseWheel="True" HorizontalContentAlignment="Left" Value="{Binding SelectedTab.TestResult.TensionHeadMax,Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" FontSize="16" Margin="0 0 0 0" Padding="0" StringFormat="{}{0:F2}" HorizontalAlignment="Left" MinWidth="26"/>--> </StackPanel> </Border> <Border BorderThickness="0 0 0 1" Background="{StaticResource TransparentBackgroundBrush700}" BorderBrush="{StaticResource BorderBrushGainsboro}"> @@ -424,8 +422,8 @@ <Border BorderThickness="0 0 0 1" Background="{StaticResource TransparentBackgroundBrush700}" BorderBrush="{StaticResource BorderBrushGainsboro}"> <StackPanel Orientation="Horizontal"> <mahapps:NumericUpDown HasDecimals="True" Minimum="0" Maximum="100" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" HideUpDownButtons="True" InterceptMouseWheel="True" HorizontalContentAlignment="Left" Value="{Binding SelectedTab.TestResult.BtsrMin,Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" FontSize="16" Margin="10 0 0 0" Padding="0" StringFormat="{}{0:F2}" HorizontalAlignment="Right" MinWidth="26"/> - <TextBlock FontSize="16" VerticalAlignment="Center"> -</TextBlock> - <mahapps:NumericUpDown HasDecimals="True" Minimum="0" Maximum="100" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" HideUpDownButtons="True" InterceptMouseWheel="True" HorizontalContentAlignment="Left" Value="{Binding SelectedTab.TestResult.BtsrMax,Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" FontSize="16" Margin="0 0 0 0" Padding="0" StringFormat="{}{0:F2}" HorizontalAlignment="Left" MinWidth="26"/> + <!--<TextBlock FontSize="16" VerticalAlignment="Center"> -</TextBlock> + <mahapps:NumericUpDown HasDecimals="True" Minimum="0" Maximum="100" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" HideUpDownButtons="True" InterceptMouseWheel="True" HorizontalContentAlignment="Left" Value="{Binding SelectedTab.TestResult.BtsrMax,Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" FontSize="16" Margin="0 0 0 0" Padding="0" StringFormat="{}{0:F2}" HorizontalAlignment="Left" MinWidth="26"/>--> </StackPanel> </Border> <Border BorderThickness="0 0 0 1" Background="{StaticResource TransparentBackgroundBrush}" BorderBrush="{StaticResource BorderBrushGainsboro}"> @@ -434,8 +432,8 @@ <Border BorderThickness="0 0 0 1" Background="{StaticResource TransparentBackgroundBrush}" BorderBrush="{StaticResource BorderBrushGainsboro}"> <StackPanel Orientation="Horizontal"> <mahapps:NumericUpDown HasDecimals="True" Minimum="0" Maximum="100" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" HideUpDownButtons="True" InterceptMouseWheel="True" HorizontalContentAlignment="Left" Value="{Binding SelectedTab.TestResult.TensionAfterDryerMin,Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" FontSize="16" Margin="10 0 0 0" Padding="0" StringFormat="{}{0:F2}" HorizontalAlignment="Right" MinWidth="26"/> - <TextBlock FontSize="16" VerticalAlignment="Center"> -</TextBlock> - <mahapps:NumericUpDown HasDecimals="True" Minimum="0" Maximum="100" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" HideUpDownButtons="True" InterceptMouseWheel="True" HorizontalContentAlignment="Left" Value="{Binding SelectedTab.TestResult.TensioinAfterDryerMax,Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" FontSize="16" Margin="0 0 0 0" Padding="0" StringFormat="{}{0:F2}" HorizontalAlignment="Left" MinWidth="26"/> + <!--<TextBlock FontSize="16" VerticalAlignment="Center"> -</TextBlock> + <mahapps:NumericUpDown HasDecimals="True" Minimum="0" Maximum="100" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" HideUpDownButtons="True" InterceptMouseWheel="True" HorizontalContentAlignment="Left" Value="{Binding SelectedTab.TestResult.TensioinAfterDryerMax,Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" FontSize="16" Margin="0 0 0 0" Padding="0" StringFormat="{}{0:F2}" HorizontalAlignment="Left" MinWidth="26"/>--> </StackPanel> </Border> <Border BorderThickness="0 0 0 1" Background="{StaticResource TransparentBackgroundBrush}" BorderBrush="{StaticResource BorderBrushGainsboro}"> @@ -444,8 +442,8 @@ <Border BorderThickness="0 0 0 1" Background="{StaticResource TransparentBackgroundBrush}" BorderBrush="{StaticResource BorderBrushGainsboro}"> <StackPanel Orientation="Horizontal"> <mahapps:NumericUpDown HasDecimals="True" Minimum="0" Maximum="100000" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" HideUpDownButtons="True" InterceptMouseWheel="True" HorizontalContentAlignment="Left" Value="{Binding SelectedTab.TestResult.PullerTensionMin,Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" FontSize="16" Margin="10 0 0 0" Padding="0" StringFormat="{}{0:F2}" HorizontalAlignment="Right" MinWidth="26"/> - <TextBlock FontSize="16" VerticalAlignment="Center"> -</TextBlock> - <mahapps:NumericUpDown HasDecimals="True" Minimum="0" Maximum="100000" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" HideUpDownButtons="True" InterceptMouseWheel="True" HorizontalContentAlignment="Left" Value="{Binding SelectedTab.TestResult.PullerTensionMax,Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" FontSize="16" Margin="0 0 0 0" Padding="0" StringFormat="{}{0:F2}" HorizontalAlignment="Left" MinWidth="26"/> + <!--<TextBlock FontSize="16" VerticalAlignment="Center"> -</TextBlock> + <mahapps:NumericUpDown HasDecimals="True" Minimum="0" Maximum="100000" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" HideUpDownButtons="True" InterceptMouseWheel="True" HorizontalContentAlignment="Left" Value="{Binding SelectedTab.TestResult.PullerTensionMax,Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" FontSize="16" Margin="0 0 0 0" Padding="0" StringFormat="{}{0:F2}" HorizontalAlignment="Left" MinWidth="26"/>--> </StackPanel> </Border> <Border BorderThickness="0 0 0 1" Background="{StaticResource TransparentBackgroundBrush700}" BorderBrush="{StaticResource BorderBrushGainsboro}"> @@ -454,8 +452,8 @@ <Border BorderThickness="0 0 0 1" Background="{StaticResource TransparentBackgroundBrush700}" BorderBrush="{StaticResource BorderBrushGainsboro}"> <StackPanel Orientation="Horizontal"> <mahapps:NumericUpDown HasDecimals="True" Minimum="0" Maximum="100" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" HideUpDownButtons="True" InterceptMouseWheel="True" HorizontalContentAlignment="Left" Value="{Binding SelectedTab.TestResult.TensionWinderMin,Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" FontSize="16" Margin="10 0 0 0" Padding="0" StringFormat="{}{0:F2}" HorizontalAlignment="Right" MinWidth="26"/> - <TextBlock FontSize="16" VerticalAlignment="Center"> -</TextBlock> - <mahapps:NumericUpDown HasDecimals="True" Minimum="0" Maximum="100" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" HideUpDownButtons="True" InterceptMouseWheel="True" HorizontalContentAlignment="Left" Value="{Binding SelectedTab.TestResult.TensionWinderMax,Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" FontSize="16" Margin="0 0 0 0" Padding="0" StringFormat="{}{0:F2}" HorizontalAlignment="Left" MinWidth="26"/> + <!--<TextBlock FontSize="16" VerticalAlignment="Center"> -</TextBlock> + <mahapps:NumericUpDown HasDecimals="True" Minimum="0" Maximum="100" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" HideUpDownButtons="True" InterceptMouseWheel="True" HorizontalContentAlignment="Left" Value="{Binding SelectedTab.TestResult.TensionWinderMax,Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" FontSize="16" Margin="0 0 0 0" Padding="0" StringFormat="{}{0:F2}" HorizontalAlignment="Left" MinWidth="26"/>--> </StackPanel> </Border> <Border BorderThickness="0 0 0 1" Background="{StaticResource TransparentBackgroundBrush700}" BorderBrush="{StaticResource BorderBrushGainsboro}"> @@ -464,8 +462,8 @@ <Border BorderThickness="0 0 0 1" Background="{StaticResource TransparentBackgroundBrush700}" BorderBrush="{StaticResource BorderBrushGainsboro}"> <StackPanel Orientation="Horizontal"> <mahapps:NumericUpDown HasDecimals="True" Minimum="0" Maximum="100000" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" HideUpDownButtons="True" InterceptMouseWheel="True" HorizontalContentAlignment="Left" Value="{Binding SelectedTab.TestResult.ExitTensionMin,Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" FontSize="16" Margin="10 0 0 0" Padding="0" StringFormat="{}{0:F2}" HorizontalAlignment="Right" MinWidth="26"/> - <TextBlock FontSize="16" VerticalAlignment="Center"> -</TextBlock> - <mahapps:NumericUpDown HasDecimals="True" Minimum="0" Maximum="100000" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" HideUpDownButtons="True" InterceptMouseWheel="True" HorizontalContentAlignment="Left" Value="{Binding SelectedTab.TestResult.ExitTensionMax,Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" FontSize="16" Margin="0 0 0 0" Padding="0" StringFormat="{}{0:F2}" HorizontalAlignment="Left" MinWidth="26"/> + <!--<TextBlock FontSize="16" VerticalAlignment="Center"> -</TextBlock> + <mahapps:NumericUpDown HasDecimals="True" Minimum="0" Maximum="100000" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" HideUpDownButtons="True" InterceptMouseWheel="True" HorizontalContentAlignment="Left" Value="{Binding SelectedTab.TestResult.ExitTensionMax,Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" FontSize="16" Margin="0 0 0 0" Padding="0" StringFormat="{}{0:F2}" HorizontalAlignment="Left" MinWidth="26"/>--> </StackPanel> </Border> </UniformGrid> |
