aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/MachineStudio
diff options
context:
space:
mode:
authorVictoria Plitt <Victoria.Plitt@twine-s.com>2022-08-31 12:02:47 +0300
committerVictoria Plitt <Victoria.Plitt@twine-s.com>2022-08-31 12:02:47 +0300
commit13e76d80896d61c476ff755a892c795ed4af6de6 (patch)
tree6f03b49624fe2c52ae2a129e1df086c232aa9d7d /Software/Visual_Studio/MachineStudio
parent6e4ddaeef2667e071f7f079876e98bd77ed233f3 (diff)
downloadTango-13e76d80896d61c476ff755a892c795ed4af6de6.tar.gz
Tango-13e76d80896d61c476ff755a892c795ed4af6de6.zip
MS. RML Extension. Added Application Type,
Yarn Type and Tension Error to Test results table. Changes in database. Related Work Items: #6347
Diffstat (limited to 'Software/Visual_Studio/MachineStudio')
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/ViewModels/MainViewVM.cs13
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/ViewModels/TestResultsViewVM.cs2
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.ThreadExtensions/Views/TestResultsView.xaml18
3 files changed, 15 insertions, 18 deletions
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 d6f3ea418..b2f3d99cf 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
@@ -973,7 +973,7 @@ namespace Tango.MachineStudio.ThreadExtensions.ViewModels
}
}
- private async void LoadRmlProperties()
+ private void LoadRmlProperties()
{
Applications = _active_context.YarnApplications.ToObservableCollection();
Brands = _active_context.YarnBrands.ToObservableCollection();
@@ -992,7 +992,7 @@ namespace Tango.MachineStudio.ThreadExtensions.ViewModels
YarnTypes = _active_context.YarnTypes.ToObservableCollection();
IndustrySector = _active_context.YarnIndustrysectors.ToObservableCollection();
- var machines = await new MachinesCollectionBuilder(_active_context).SetAll().WithConfiguration().BuildAsync();
+ var machines = new MachinesCollectionBuilder(_active_context).SetAll().WithConfiguration().Build();
Machines = machines.Select(x => new MachineModel()
{
Guid = x.Guid,
@@ -1067,12 +1067,13 @@ namespace Tango.MachineStudio.ThreadExtensions.ViewModels
guid = rml_extention.Guid;
}
- ActiveRMLExtension = await new RmlExtensionsBuilder(_active_context)
- .Set(guid)
- .WithUser()
- .BuildAsync();
+
ActiveRML = new RmlBuilder(_active_context).Set(SelectedRMLExtension.RMLGuid).WithLiquidFactors().Build();
+
+ ActiveRMLExtension = new RmlExtensionsBuilder(_active_context)
+ .Set(guid)
+ .Build();
if (!String.IsNullOrEmpty(ActiveRML.Manufacturer) && false == Manufacturers.Any(x => x == 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 03c87a3a6..ba7ae7238 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
@@ -300,7 +300,7 @@ namespace Tango.MachineStudio.ThreadExtensions.ViewModels
BtsrYarnTypes = _active_context.BtsrYarnTypes.ToObservableCollection();
- var testResults = await new RMLExtensionTestResultsCollectionBuilder(_active_context).SetAll().ForRMLExtension(RMLExtemtionGUID).ForMachine(SelectedMachineGUID).WithRubbingAndTensileResults().WithTestResultsFiles().WithWashingTestResults().BuildAsync();
+ var testResults = await new RMLExtensionTestResultsCollectionBuilder(_active_context).SetAll().ForRMLExtension(RMLExtemtionGUID).ForMachine(SelectedMachineGUID).WithRubbingAndTensileResults().WithTestResultsFiles().WithWashingTestResults().WithBtsrApplicationTypes().WithBtsrYarnTypes().BuildAsync();
SelectedTestResults = testResults.OrderBy(x => x.ResultIndex).ToSynchronizedObservableCollection();
foreach (var result in SelectedTestResults)
{
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 961c6b358..4ebc9077b 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
@@ -686,9 +686,9 @@
<TextBlock Margin="5 0 0 0" VerticalAlignment="Center">Application Type</TextBlock>
</Border>
<Border Grid.Row="1" Grid.Column="5" BorderThickness="0 0 0 1" Background="{StaticResource TransparentBackgroundBrush700}" BorderBrush="{StaticResource BorderBrushGainsboro}">
- <StackPanel Orientation="Horizontal">
- <ComboBox Margin="0 2 0 0" ItemsSource="{Binding BtsrApplicationTypes}" SelectedItem="{Binding SelectedBtsrApplicationType}" DisplayMemberPath="Description"></ComboBox>
- </StackPanel>
+ <Border Margin="0 0 5 2">
+ <ComboBox HorizontalAlignment="Stretch" ItemsSource="{Binding BtsrApplicationTypes}" SelectedItem="{Binding SelectedTab.TestResult.BtsrApplicationType}" DisplayMemberPath="Description" FontSize="14" Background="{StaticResource MainWindow.Background}" Padding="0" Style="{StaticResource TransparentComboBoxStyle}"></ComboBox>
+ </Border>
</Border>
<Border Grid.Row="2" Grid.Column="0" BorderThickness="0 0 0 1" Background="{StaticResource TransparentBackgroundBrush}" BorderBrush="{StaticResource BorderBrushGainsboro}">
<TextBlock Margin="5 0 0 0" VerticalAlignment="Center">After dryer</TextBlock>
@@ -714,11 +714,9 @@
<TextBlock Margin="5 0 0 0" VerticalAlignment="Center">Yarn Type</TextBlock>
</Border>
<Border Grid.Row="2" Grid.Column="5" 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="14" Margin="10 0 0 0" Padding="0" StringFormat="{}{0:F2}" HorizontalAlignment="Right" MinWidth="26"/>
- <!--<TextBlock FontSize="14" 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="14" Margin="0 0 0 0" Padding="0" StringFormat="{}{0:F2}" HorizontalAlignment="Left" MinWidth="26"/>-->
- </StackPanel>
+ <Border Margin="0 0 5 2">
+ <ComboBox HorizontalAlignment="Stretch" ItemsSource="{Binding BtsrYarnTypes}" SelectedItem="{Binding SelectedTab.TestResult.BtsrYarnType}" DisplayMemberPath="Description" FontSize="14" Background="{StaticResource MainWindow.Background}" Padding="0" Style="{StaticResource TransparentComboBoxStyle}"></ComboBox>
+ </Border>
</Border>
<Border Grid.Row="3" Grid.Column="0" BorderThickness="0 0 0 1" Background="{StaticResource TransparentBackgroundBrush700}" BorderBrush="{StaticResource BorderBrushGainsboro}">
<TextBlock Margin="5 0 0 0" VerticalAlignment="Center">Winder</TextBlock>
@@ -745,9 +743,7 @@
</Border>
<Border Grid.Row="3" Grid.Column="5" 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="14" Margin="10 0 0 0" Padding="0" StringFormat="{}{0:F2}" HorizontalAlignment="Right" MinWidth="26"/>
- <!--<TextBlock FontSize="14" 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="14" Margin="0 0 0 0" Padding="0" StringFormat="{}{0:F2}" HorizontalAlignment="Left" MinWidth="26"/>-->
+ <mahapps:NumericUpDown HasDecimals="True" Minimum="0" Maximum="100" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" HideUpDownButtons="True" InterceptMouseWheel="True" HorizontalContentAlignment="Left" Value="{Binding SelectedTab.TestResult.BtsrTensionError,Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" FontSize="14" Margin="10 0 0 0" Padding="0" StringFormat="{}{0:F2}" HorizontalAlignment="Right" MinWidth="26"/>
</StackPanel>
</Border>
</Grid>