1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
|
<UserControl x:Class="Tango.MachineStudio.ThreadExtensions.Views.ThreadCharacteristicsView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:Tango.MachineStudio.ThreadExtensions.Views"
xmlns:vm="clr-namespace:Tango.MachineStudio.ThreadExtensions.ViewModels"
xmlns:global="clr-namespace:Tango.MachineStudio.ThreadExtensions"
xmlns:shapes="clr-namespace:Tango.SharedUI.Shapes;assembly=Tango.SharedUI"
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
xmlns:controls="clr-namespace:Tango.SharedUI.Controls;assembly=Tango.SharedUI"
xmlns:converters="clr-namespace:Tango.SharedUI.Converters;assembly=Tango.SharedUI"
xmlns:enumerations="clr-namespace:Tango.BL.Enumerations;assembly=Tango.BL"
xmlns:mahapps="http://metro.mahapps.com/winfx/xaml/controls"
mc:Ignorable="d"
FontSize="16"
d:DesignHeight="450" d:DesignWidth="1200" Background="Transparent" d:DataContext="{d:DesignInstance Type=vm:MainViewVM, IsDesignTimeCreatable=False}" DataContext="{x:Static global:ViewModelLocator.MainViewVM}">
<UserControl.Resources>
<converters:EnumToItemsSourceConverter x:Key="EnumToItemsSourceConverter"/>
<converters:EnumToDescriptionConverter x:Key="EnumToDescriptionConverter"/>
</UserControl.Resources>
<Grid>
<materialDesign:Card Background="{DynamicResource MaterialDesignBackground}" VerticalAlignment="Stretch" Padding="40">
<UniformGrid Columns="4" >
<Grid Margin="10">
<materialDesign:Card Background="{DynamicResource MaterialDesignBackground}" VerticalAlignment="Stretch" >
<Grid Margin="20">
<DockPanel>
<TextBlock DockPanel.Dock="Top" Margin="20 10 0 10" FontSize="20" FontWeight="DemiBold">Yarn Source</TextBlock>
<controls:TableGrid RowHeight="60" Margin="0 20 0 0" MakeFirstColumnVerticalAlignmentBottom="False" >
<controls:TableGrid.Resources>
<Style TargetType="TextBlock">
<Setter Property="VerticalAlignment" Value="Center"></Setter>
<Setter Property="Margin" Value="0 3 0 0"></Setter>
</Style>
</controls:TableGrid.Resources>
<TextBlock Text="Manufacturer:" VerticalAlignment="Center" FontSize="16" Margin="0 3 0 0"></TextBlock>
<ComboBox VerticalAlignment="Center" ItemsSource="{Binding Manufacturer}" SelectedItem="{Binding ActiveRMLExtention.YarnManufacturer,Mode=TwoWay}" DisplayMemberPath="Name" IsEditable="True" Margin="20 0 20 0"/>
<TextBlock Text="Brand:" VerticalAlignment="Center" ></TextBlock>
<ComboBox ItemsSource="{Binding Brands}" SelectedItem="{Binding ActiveRMLExtention.YarnBrand,Mode=TwoWay}" DisplayMemberPath="Name" IsEditable="True" Margin="20 0 20 0"></ComboBox>
<TextBlock Text="Country:" ></TextBlock>
<TextBox Text="{Binding ActiveRMLExtention.Country,UpdateSourceTrigger=PropertyChanged}" VerticalAlignment="Center"></TextBox>
<TextBlock Text="End Use:" ></TextBlock>
<ComboBox ItemsSource="{Binding EndUse}" SelectedItem="{Binding ActiveRMLExtention.YarnEndUse,Mode=TwoWay}" DisplayMemberPath="Name" IsEditable="True"></ComboBox>
<TextBlock Text="Applications:" ></TextBlock>
<ComboBox ItemsSource="{Binding Applications}" SelectedItem="{Binding ActiveRMLExtention.YarnApplications,Mode=TwoWay}" DisplayMemberPath="Name" IsEditable="True"></ComboBox>
<TextBlock Text="Industry Sector:" ></TextBlock>
<ComboBox ItemsSource="{Binding IndustrySector}" SelectedItem="{Binding ActiveRMLExtention.YarnIndustrysector,Mode=TwoWay}" DisplayMemberPath="Name" IsEditable="True"></ComboBox>
</controls:TableGrid>
</DockPanel>
</Grid>
</materialDesign:Card>
</Grid>
<Grid Margin="10">
<materialDesign:Card Background="{DynamicResource MaterialDesignBackground}" VerticalAlignment="Stretch" >
<Grid Margin="20">
<DockPanel>
<TextBlock DockPanel.Dock="Top" FontSize="20" FontWeight="DemiBold">Yarn Source</TextBlock>
<controls:TableGrid RowHeight="55" Margin="0 20 0 0" MakeFirstColumnVerticalAlignmentBottom="False" >
<controls:TableGrid.Resources>
<Style TargetType="TextBlock">
<Setter Property="VerticalAlignment" Value="Center"></Setter>
<Setter Property="Margin" Value="0 3 0 0"></Setter>
</Style>
</controls:TableGrid.Resources>
<TextBlock Text="Material:" ></TextBlock>
<ComboBox ItemsSource="{Binding Materials}" SelectedItem="{Binding ActiveRMLExtention.YarnMaterial,Mode=TwoWay}" DisplayMemberPath="Name" IsEditable="True"></ComboBox>
<TextBlock Text="Type:" ></TextBlock>
<ComboBox ItemsSource="{Binding YarnTypes}" SelectedItem="{Binding ActiveRMLExtention.YarnType,Mode=TwoWay}" DisplayMemberPath="Name" IsEditable="True"></ComboBox>
<TextBlock Text="Sub family:" ></TextBlock>
<ComboBox ItemsSource="{Binding SubFamilies}" SelectedItem="{Binding ActiveRMLExtention.YarnSubFamily,Mode=TwoWay}" DisplayMemberPath="Name" IsEditable="True"></ComboBox>
<TextBlock Text="Family:" ></TextBlock>
<ComboBox ItemsSource="{Binding Family}" SelectedItem="{Binding ActiveRMLExtention.YarnFamily,Mode=TwoWay}" DisplayMemberPath="Name" IsEditable="True"></ComboBox>
<TextBlock Text="Group:" ></TextBlock>
<ComboBox ItemsSource="{Binding Group}" SelectedItem="{Binding ActiveRMLExtention.YarnGroup,Mode=TwoWay}" DisplayMemberPath="Name" IsEditable="True"></ComboBox>
<TextBlock Text="Texturing:" ></TextBlock>
<ComboBox ItemsSource="{Binding Texturing}" SelectedItem="{Binding ActiveRMLExtention.YarnTexturing,Mode=TwoWay}" DisplayMemberPath="Name" IsEditable="True"></ComboBox>
<TextBlock Text="Geometry:" ></TextBlock>
<ComboBox ItemsSource="{Binding Geometry }" SelectedItem="{Binding ActiveRMLExtention.YarnGeometry ,Mode=TwoWay}" DisplayMemberPath="Name" IsEditable="True"></ComboBox>
<TextBlock Text="Color:" ></TextBlock>
<ComboBox ItemsSource="{Binding YarnColor}" SelectedItem="{Binding ActiveRMLExtention.YarnColor,Mode=TwoWay}" DisplayMemberPath="Name" IsEditable="True"></ComboBox>
<TextBlock Text="Gloss level:" ></TextBlock>
<ComboBox ItemsSource="{Binding GlossLevel }" SelectedItem="{Binding ActiveRMLExtention.YarnGlossLevel ,Mode=TwoWay}" DisplayMemberPath="Name" IsEditable="True"></ComboBox>
</controls:TableGrid>
</DockPanel>
</Grid>
</materialDesign:Card>
</Grid>
<Grid Margin="10">
<materialDesign:Card Background="{DynamicResource MaterialDesignBackground}" VerticalAlignment="Stretch" >
<Grid Margin="20">
<DockPanel>
<TextBlock DockPanel.Dock="Top" FontSize="20" FontWeight="DemiBold">Yarn Data</TextBlock>
<controls:TableGrid RowHeight="55" Margin="0 20 0 0" MakeFirstColumnVerticalAlignmentBottom="False" >
<controls:TableGrid.Resources>
<Style TargetType="TextBlock">
<Setter Property="VerticalAlignment" Value="Center"></Setter>
<Setter Property="Margin" Value="0 3 0 0"></Setter>
</Style>
</controls:TableGrid.Resources>
<TextBlock Text="Linear Density:" ></TextBlock>
<mahapps:NumericUpDown Minimum="0" Maximum="9999" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="False" HorizontalContentAlignment="Left" Value="{Binding ActiveRMLExtention.LinearDensity,Mode=TwoWay}" FontSize="16"></mahapps:NumericUpDown>
<TextBlock Text="Unit:" ></TextBlock>
<ComboBox ItemsSource="{Binding Source={x:Type enumerations:YarnUnits},Converter={StaticResource EnumToItemsSourceConverter}}" SelectedItem="{Binding ActiveRMLExtention.YarnUnit}" SelectedValuePath="Value" DisplayMemberPath="DisplayName" Validation.ErrorTemplate="{x:Null}"></ComboBox>
<TextBlock Text="Plies:" ></TextBlock>
<ComboBox ItemsSource="{Binding Source={x:Type enumerations:Plies},Converter={StaticResource EnumToItemsSourceConverter}}" SelectedItem="{Binding ActiveRMLExtention.YarnPlies}" SelectedValuePath="Value" DisplayMemberPath="DisplayName" Validation.ErrorTemplate="{x:Null}"></ComboBox>
<TextBlock Text="Filament count per plies:" ></TextBlock>
<mahapps:NumericUpDown Minimum="0" Maximum="500" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="False" HorizontalContentAlignment="Left" Value="{Binding ActiveRMLExtention.FilamentCount,Mode=TwoWay}" FontSize="16"></mahapps:NumericUpDown>
<TextBlock Text="Count (den)" ></TextBlock>
<TextBlock Text="{Binding ActiveRMLExtention.DencityCount}" Foreground="Blue" ></TextBlock>
<TextBlock Text="Fiber count " ></TextBlock>
<TextBlock Text="{Binding ActiveRMLExtention.FiberCount}" Foreground="Blue" ></TextBlock>
<TextBlock Text="Twist(tpm):" ></TextBlock>
<mahapps:NumericUpDown Minimum="0" Maximum="9999" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="False" HorizontalContentAlignment="Left" Value="{Binding ActiveRMLExtention.TwistTpm,Mode=TwoWay}" FontSize="16"></mahapps:NumericUpDown>
<TextBlock Text="Twist direction:" ></TextBlock>
<ComboBox ItemsSource="{Binding Source={x:Type enumerations:TwistDirections}, Converter={StaticResource EnumToItemsSourceConverter}}" SelectedItem="{Binding ActiveRMLExtention.YarnTwistDirections }" SelectedValuePath="Value" DisplayMemberPath="DisplayName" Validation.ErrorTemplate="{x:Null}"></ComboBox>
</controls:TableGrid>
</DockPanel>
</Grid>
</materialDesign:Card>
</Grid>
<Grid Margin="10">
<materialDesign:Card Background="{DynamicResource MaterialDesignBackground}" VerticalAlignment="Stretch" >
<Grid Margin="20">
<DockPanel>
<TextBlock DockPanel.Dock="Top" FontSize="20" FontWeight="DemiBold">Yarn Properties from datasheet</TextBlock>
<controls:TableGrid RowHeight="55" Margin="0 20 0 0" MakeFirstColumnVerticalAlignmentBottom="False" >
<controls:TableGrid.Resources>
<Style TargetType="TextBlock">
<Setter Property="VerticalAlignment" Value="Center"></Setter>
<Setter Property="Margin" Value="0 3 0 0"></Setter>
</Style>
<Style TargetType="{x:Type mahapps:NumericUpDown}">
<Setter Property="BorderThickness" Value="0 0 0 0.5"></Setter>
<Setter Property="FontSize" Value="16"/>
</Style>
</controls:TableGrid.Resources>
<TextBlock Text="Max Force (N):" ></TextBlock>
<StackPanel Orientation="Horizontal">
<mahapps:NumericUpDown HasDecimals="True" Minimum="0" Maximum="100" InterceptArrowKeys="True" HideUpDownButtons="True" Value="{Binding ActiveRMLExtention.MinMaxForceN}" HorizontalContentAlignment="Left" BorderBrush="{StaticResource MainWindow.Foreground}" Foreground="{StaticResource MainWindow.Foreground}" />
<mahapps:NumericUpDown HasDecimals="True" Minimum="0" Maximum="100" InterceptArrowKeys="True" HideUpDownButtons="True" Value="{Binding ActiveRMLExtention.MaxMaxForceN}" HorizontalContentAlignment="Left" BorderBrush="{StaticResource MainWindow.Foreground}" Foreground="{StaticResource MainWindow.Foreground}" Margin="10 0 0 0"/>
</StackPanel>
<TextBlock Text="Elasticity (%)" ></TextBlock>
<StackPanel Orientation="Horizontal">
<mahapps:NumericUpDown HasDecimals="True" Minimum="0" Maximum="100" InterceptArrowKeys="True" HideUpDownButtons="True" Value="{Binding ActiveRMLExtention.MinElasticity}" HorizontalContentAlignment="Left" BorderBrush="{StaticResource MainWindow.Foreground}" Foreground="{StaticResource MainWindow.Foreground}" />
<mahapps:NumericUpDown HasDecimals="True" Minimum="0" Maximum="100" InterceptArrowKeys="True" HideUpDownButtons="True" Value="{Binding ActiveRMLExtention.MaxElasticity}" HorizontalContentAlignment="Left" BorderBrush="{StaticResource MainWindow.Foreground}" Foreground="{StaticResource MainWindow.Foreground}" Margin="10 0 0 0"/>
</StackPanel>
<TextBlock Text="Tenacity (%)" ></TextBlock>
<StackPanel Orientation="Horizontal">
<mahapps:NumericUpDown HasDecimals="True" Minimum="0" Maximum="100" InterceptArrowKeys="True" HideUpDownButtons="True" Value="{Binding ActiveRMLExtention.MinTenacity}" HorizontalContentAlignment="Left" BorderBrush="{StaticResource MainWindow.Foreground}" Foreground="{StaticResource MainWindow.Foreground}" />
<mahapps:NumericUpDown HasDecimals="True" Minimum="0" Maximum="100" InterceptArrowKeys="True" HideUpDownButtons="True" Value="{Binding ActiveRMLExtention.MaxTenacity}" HorizontalContentAlignment="Left" BorderBrush="{StaticResource MainWindow.Foreground}" Foreground="{StaticResource MainWindow.Foreground}" Margin="10 0 0 0"/>
</StackPanel>
<TextBlock Text="Finishing:" ></TextBlock>
<TextBlock Text="{Binding ActiveRMLExtention.Finishing}" ></TextBlock>
</controls:TableGrid>
</DockPanel>
</Grid>
</materialDesign:Card>
</Grid>
</UniformGrid>
</materialDesign:Card>
</Grid>
</UserControl>
|