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
|
<UserControl x:Class="Tango.MachineStudio.DB.Views.DBViews.RmlView"
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:mahapps="http://metro.mahapps.com/winfx/xaml/controls"
xmlns:controls="clr-namespace:Tango.MachineStudio.DB.Controls"
xmlns:colorPicker="clr-namespace:Tango;assembly=Tango.ColorPicker"
xmlns:converters="clr-namespace:Tango.SharedUI.Converters;assembly=Tango.SharedUI"
xmlns:vm="clr-namespace:Tango.MachineStudio.DB.ViewModels"
xmlns:local="clr-namespace:Tango.MachineStudio.DB.Views.DBViews"
mc:Ignorable="d"
d:DesignHeight="400" d:DesignWidth="300" d:DataContext="{d:DesignInstance Type=vm:RmlsViewVM, IsDesignTimeCreatable=False}">
<UserControl.Resources>
<converters:ColorToIntegerConverter x:Key="ColorToIntegerConverter"></converters:ColorToIntegerConverter>
</UserControl.Resources>
<Grid>
<controls:TableGrid>
<TextBlock Text="ID:" FontWeight="Bold"></TextBlock>
<TextBox Text="{Binding EditEntity.ID}" IsReadOnly="True"></TextBox>
<TextBlock Text="GUID:" FontWeight="Bold"></TextBlock>
<TextBox Text="{Binding EditEntity.Guid}" IsReadOnly="True"></TextBox>
<TextBlock Text="Last Updated:" FontWeight="Bold"></TextBlock>
<TextBox Text="{Binding EditEntity.LastUpdated}" IsReadOnly="True"></TextBox>
<TextBlock Text="Name:" FontWeight="Bold"></TextBlock>
<TextBox Text="{Binding EditEntity.Name}"></TextBox>
<TextBlock Text="Manufacturer:" FontWeight="Bold"></TextBlock>
<TextBox Text="{Binding EditEntity.Manufacturer}"></TextBox>
<TextBlock Text="Material:" FontWeight="Bold"></TextBlock>
<ComboBox ItemsSource="{Binding Adapter.MediaMaterials}" SelectedItem="{Binding EditEntity.MediaMaterial,Mode=TwoWay}" DisplayMemberPath="Name"></ComboBox>
<TextBlock Text="Color:" FontWeight="Bold"></TextBlock>
<ComboBox ItemsSource="{Binding Adapter.MediaColors}" SelectedItem="{Binding EditEntity.MediaColor,Mode=TwoWay}">
<ComboBox.ItemTemplate>
<DataTemplate>
<StackPanel Orientation="Horizontal">
<Rectangle Width="16" Height="16" VerticalAlignment="Center">
<Rectangle.Fill>
<SolidColorBrush Color="{Binding Color}"></SolidColorBrush>
</Rectangle.Fill>
</Rectangle>
</StackPanel>
</DataTemplate>
</ComboBox.ItemTemplate>
</ComboBox>
<TextBlock Text="Purpose:" FontWeight="Bold"></TextBlock>
<ComboBox ItemsSource="{Binding Adapter.MediaPurposes}" SelectedItem="{Binding EditEntity.MediaPurpose,Mode=TwoWay}" DisplayMemberPath="Name"></ComboBox>
<TextBlock Text="Condition:" FontWeight="Bold"></TextBlock>
<ComboBox ItemsSource="{Binding Adapter.MediaConditions}" SelectedItem="{Binding EditEntity.MediaCondition,Mode=TwoWay}" DisplayMemberPath="Name"></ComboBox>
<TextBlock Text="Linear Mass Density Unit:" FontWeight="Bold"></TextBlock>
<ComboBox ItemsSource="{Binding Adapter.LinearMassDensityUnits}" SelectedItem="{Binding EditEntity.LinearMassDensityUnit,Mode=TwoWay}" DisplayMemberPath="Name"></ComboBox>
<TextBlock Text="Fiber Shape:" FontWeight="Bold"></TextBlock>
<ComboBox ItemsSource="{Binding Adapter.FiberShapes}" SelectedItem="{Binding EditEntity.FiberShape,Mode=TwoWay}" DisplayMemberPath="Name"></ComboBox>
<TextBlock Text="Fiber Syntheses:" FontWeight="Bold"></TextBlock>
<ComboBox ItemsSource="{Binding Adapter.FiberSynths}" SelectedItem="{Binding EditEntity.FiberSynth,Mode=TwoWay}" DisplayMemberPath="Name"></ComboBox>
<TextBlock Text="Fiber Size:" FontWeight="Bold"></TextBlock>
<mahapps:NumericUpDown Minimum="0" Maximum="10000" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Left" Value="{Binding EditEntity.FiberSize,Mode=TwoWay}"></mahapps:NumericUpDown>
<TextBlock Text="Fibers Count:" FontWeight="Bold"></TextBlock>
<mahapps:NumericUpDown Minimum="0" Maximum="10000" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="False" HorizontalContentAlignment="Left" Value="{Binding EditEntity.NumberOfFibers,Mode=TwoWay}"></mahapps:NumericUpDown>
<TextBlock Text="Plies Per Fiber:" FontWeight="Bold"></TextBlock>
<mahapps:NumericUpDown Minimum="0" Maximum="10000" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="False" HorizontalContentAlignment="Left" Value="{Binding EditEntity.PliesPerFiber,Mode=TwoWay}"></mahapps:NumericUpDown>
<TextBlock Text="Plies Per Thread:" FontWeight="Bold"></TextBlock>
<mahapps:NumericUpDown Minimum="0" Maximum="10000" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="False" HorizontalContentAlignment="Left" Value="{Binding EditEntity.PliesPerThread,Mode=TwoWay}"></mahapps:NumericUpDown>
<TextBlock Text="Twisted:" FontWeight="Bold"></TextBlock>
<ToggleButton HorizontalAlignment="Right" IsChecked="{Binding EditEntity.Twisted}" Style="{StaticResource MaterialDesignSwitchToggleButton}" />
<TextBlock Text="Air Entanglement:" FontWeight="Bold"></TextBlock>
<ToggleButton HorizontalAlignment="Right" IsChecked="{Binding EditEntity.AirEntanglement}" Style="{StaticResource MaterialDesignSwitchToggleButton}" />
<TextBlock Text="Lubricant:" FontWeight="Bold"></TextBlock>
<ToggleButton HorizontalAlignment="Right" IsChecked="{Binding EditEntity.Lubricant}" Style="{StaticResource MaterialDesignSwitchToggleButton}" />
<TextBlock Text="Tensile Strength:" FontWeight="Bold"></TextBlock>
<mahapps:NumericUpDown Minimum="0" Maximum="10000" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Left" Value="{Binding EditEntity.TensileStrength,Mode=TwoWay}"></mahapps:NumericUpDown>
<TextBlock Text="Elongation Break Percentage:" FontWeight="Bold"></TextBlock>
<mahapps:NumericUpDown Minimum="0" Maximum="10000" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Left" Value="{Binding EditEntity.ElongationAtBreakPercentage,Mode=TwoWay}"></mahapps:NumericUpDown>
<TextBlock Text="Estimated Thread Diameter:" FontWeight="Bold"></TextBlock>
<mahapps:NumericUpDown Minimum="0" Maximum="10000" InterceptArrowKeys="True" Background="Transparent" BorderThickness="0" InterceptMouseWheel="True" HasDecimals="True" HorizontalContentAlignment="Left" Value="{Binding EditEntity.EstimatedThreadDiameter,Mode=TwoWay}"></mahapps:NumericUpDown>
</controls:TableGrid>
</Grid>
</UserControl>
|