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
|
<UserControl x:Class="Tango.PPC.Jobs.Dialogs.JobCreationView"
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.PPC.Jobs.Dialogs"
xmlns:enumerations="clr-namespace:Tango.BL.Enumerations;assembly=Tango.BL"
xmlns:converters="clr-namespace:Tango.PPC.Jobs.Converters"
xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
xmlns:touch="clr-namespace:Tango.Touch.Controls;assembly=Tango.Touch"
xmlns:keyboard="clr-namespace:Tango.Touch.Keyboard;assembly=Tango.Touch"
mc:Ignorable="d"
Background="{StaticResource TangoMidBackgroundBrush}" d:DesignHeight="861" d:DesignWidth="600" Width="750" Height="1200" d:DataContext="{d:DesignInstance Type=local:JobCreationViewVM, IsDesignTimeCreatable=False}" HorizontalAlignment="Center" touch:TouchPanelEureka.MakeEurekaFullScreen="True">
<UserControl.Resources>
<converters:JobTypeToImageConverter x:Key="JobTypeToImageConverter" />
<converters:ColorSpaceToImageConverter x:Key="ColorSpaceToImageConverter" />
<BitmapImage x:Key="Close_mycolorsdlg" UriSource="../Images/ColorSelection/close_mycolorsdlg.png" />
</UserControl.Resources>
<Border BorderThickness="0" >
<Grid >
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="1*"/>
</Grid.RowDefinitions>
<Grid Height="89" x:Name="JobDetailsHeader" Background="{StaticResource TangoPrimaryBackgroundBrush}">
<!--<Image Source="../Images/JobView/job-details.png" Width="34" />-->
<TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" Margin="0 0 0 0" FontSize="{StaticResource TangoHeaderFontSize}">Job Details</TextBlock>
<Border BorderThickness="0 0 1 0" BorderBrush="{StaticResource TangoDividerBrush}" Margin="30 0 0 0">
<touch:TouchImageButton Width="46" Height="46" Image="{StaticResource Close_mycolorsdlg}" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="0 0 23 0" EnableDropShadow="False" Background="Transparent" BorderThickness="0" Command="{Binding CloseCommand}" Focusable="False"/>
</Border>
</Grid>
<Grid Grid.Row="1" Margin="24 17 24 31" Background="{StaticResource TangoPrimaryBackgroundBrush}">
<Grid x:Name="Container" keyboard:KeyboardView.ContainerOffset="40">
<DockPanel Margin="47 38 54 40" >
<Grid DockPanel.Dock="Bottom">
<touch:TouchButton HorizontalAlignment="Center" CornerRadius="25" Command="{Binding OKCommand}" KeyboardNavigation.TabIndex="3" Width="180" Height="48" VerticalAlignment="Bottom" keyboard:KeyboardView.Container="{Binding ElementName=Container}" TextElement.Foreground="{StaticResource TangoLightForegroundBrush}" FontSize="{StaticResource TangoButtonFontSize}" Content="OK">
<touch:TouchButton.Style >
<Style TargetType="touch:TouchButton" >
<Setter Property="Foreground" Value="{StaticResource TangoPrimaryAccentBrush}"></Setter>
<Setter Property="Background" Value="{StaticResource TangoMidAccentBrush}"/>
<Style.Triggers>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Foreground" Value="{StaticResource TangoDisabledForegroundBrush}"></Setter>
<Setter Property="Background" Value="{StaticResource TangoDisabledBackgroundBrush}"></Setter>
</Trigger>
</Style.Triggers>
</Style>
</touch:TouchButton.Style>
</touch:TouchButton>
</Grid>
<Grid DockPanel.Dock="Top" >
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<StackPanel Grid.Row="1" VerticalAlignment="Top" TextElement.FontWeight="Normal" HorizontalAlignment="Stretch">
<DockPanel Margin="0 50 0 0" HorizontalAlignment="Stretch">
<TextBlock HorizontalAlignment="Left" Margin="0 10 0 0" Text="Job Name" FontSize="{StaticResource TangoDialogFontSize}" Width="155"/>
<Border Margin="49 0 0 0" BorderThickness="1" Height="44" CornerRadius="22" BorderBrush="{StaticResource TangoMidAccentBrush}">
<touch:TouchTextBox Margin="20 0 0 10" FontSize="{StaticResource TangoComboBoxItemFontSize}" Text="{Binding JobName}" IsEnabled="True" HorizontalAlignment="Left" MinWidth="250" VerticalAlignment="Center" FocusSelectionMode="SelectAll" KeyboardMode="AlphaNumeric" KeyboardAction="Next" KeyboardNavigation.TabIndex="1" keyboard:KeyboardView.Container="{Binding ElementName=Container}"></touch:TouchTextBox>
</Border>
</DockPanel >
<DockPanel HorizontalAlignment="Stretch" Margin="0 50 0 0">
<TextBlock HorizontalAlignment="Left" Margin="0 10 0 0" Text="Thread Type" FontSize="{StaticResource TangoDialogFontSize}" Width="155"/>
<Border Margin="49 0 0 0" BorderThickness="1" Height="44" CornerRadius="22" BorderBrush="{StaticResource TangoMidAccentBrush}">
<touch:TouchComboBox Margin="20 0 10 10" ItemsSource="{Binding RMLDisplayList}" SelectedItem="{Binding SelectedRML,Mode=TwoWay}" Focusable="False" KeyboardNavigation.TabNavigation ="None">
<touch:TouchComboBox.ItemTemplate>
<DataTemplate>
<TextBlock Margin="20 10 10 10" TextTrimming="CharacterEllipsis" FontSize="{StaticResource TangoDialogFontSize}" Text="{Binding FinalName}">
</TextBlock>
</DataTemplate>
</touch:TouchComboBox.ItemTemplate>
<touch:TouchComboBox.SelectedItemTemplate>
<DataTemplate>
<TextBlock Margin="0 0 0 5" FontSize="{StaticResource TangoDialogFontSize}" Text="{Binding FinalName}" VerticalAlignment="Center"></TextBlock>
</DataTemplate>
</touch:TouchComboBox.SelectedItemTemplate>
</touch:TouchComboBox>
</Border>
</DockPanel>
<DockPanel Margin="210 15 0 0" TextElement.Foreground="{StaticResource TangoGrayTextBrush}" Visibility="{Binding LubricationLevel,Converter={StaticResource IsNullToVisibilityConverter}}">
<touch:TouchIcon Icon="AlertCircleOutline" Width="16" Foreground="{StaticResource TangoGrayTextBrush}" Focusable="False"/>
<TextBlock Margin="5 0 0 0">
<Run Text="{Binding LubricationLevel.LubricationLevel,Mode=OneWay,Converter={StaticResource EnumToDescriptionConverter}}"></Run>
<Run>Lubrication</Run>
</TextBlock>
</DockPanel>
<StackPanel TextElement.Foreground="{StaticResource TangoGrayTextBrush}" Margin="210 5 0 0" HorizontalAlignment="Left" Visibility="{Binding MachineProvider.Machine.BtsrInstalled,Converter={StaticResource BooleanToVisibilityConverter}}">
<DockPanel>
<touch:TouchIcon Icon="AlertCircleOutline" Width="16" Foreground="{StaticResource TangoGrayTextBrush}" Focusable="False" />
<TextBlock Margin="5 0 0 0" VerticalAlignment="Center">
<Run>Required tensioner level is </Run>
<Run Text="{Binding BtsrSpoolTension}" FontWeight="Bold"></Run>
</TextBlock>
</DockPanel>
</StackPanel>
<!--<DockPanel HorizontalAlignment="Stretch" Margin="0 50 0 0">
<TextBlock HorizontalAlignment="Left" Margin="0 10 0 0" Text="Spool Type" FontSize="{StaticResource TangoDialogFontSize}" Width="155"/>
<Border Margin="49 0 0 0" BorderThickness="1" HorizontalAlignment="Stretch" Height="44" CornerRadius="22" BorderBrush="{StaticResource TangoMidAccentBrush}">
<touch:TouchComboBox Margin="20 0 10 10" ItemsSource="{Binding SpoolTypes}" SelectedItem="{Binding SelectedSpoolType,Mode=TwoWay}" FontSize="{StaticResource TangoDialogFontSize}">
<touch:TouchComboBox.ItemTemplate>
<DataTemplate>
<TextBlock Margin="20 10 10 10" TextTrimming="CharacterEllipsis" FontSize="{StaticResource TangoDialogFontSize}">
<Run Text="{Binding Name}"></Run>
<Run Foreground="{StaticResource TangoDarkForegroundBrush}" Text="{Binding Length,Mode=OneWay}"></Run>
<Run Foreground="{StaticResource TangoDarkForegroundBrush}" Text="m"></Run>
</TextBlock>
</DataTemplate>
</touch:TouchComboBox.ItemTemplate>
<touch:TouchComboBox.SelectedItemTemplate>
<DataTemplate>
<TextBlock Margin="0 0 0 5" FontSize="{StaticResource TangoDialogFontSize}" Text="{Binding Name}"></TextBlock>
</DataTemplate>
</touch:TouchComboBox.SelectedItemTemplate>
</touch:TouchComboBox>
</Border>
</DockPanel>-->
<DockPanel Margin="0 50 0 0" HorizontalAlignment="Stretch">
<TextBlock HorizontalAlignment="Left" Margin="0 10 0 0" FontSize="{StaticResource TangoDialogFontSize}" Width="166" >
<Run Text="White Gap"></Run>
<Run Text="[m]" FontWeight="SemiBold" FontSize="{StaticResource TangoComboBoxItemFontSize}"></Run>
</TextBlock>
<Border Margin="38 0 0 0" BorderThickness="1" Height="44" CornerRadius="22" BorderBrush="{StaticResource TangoMidAccentBrush}">
<touch:TouchNumericTextBox Margin="20 0 0 10" FontSize="{StaticResource TangoComboBoxItemFontSize}" Value="{Binding WhiteGap, Mode=TwoWay}" IsEnabled="True" HorizontalAlignment="Left" MinWidth="250" VerticalAlignment="Center" FocusSelectionMode="SelectAll" KeyboardNavigation.TabIndex="2"></touch:TouchNumericTextBox>
</Border>
</DockPanel >
<DockPanel Visibility="{Binding ShowDuplicate,Converter={StaticResource BooleanToVisibilityConverter}}" Margin="0 50 0 0" HorizontalAlignment="Stretch">
<TextBlock HorizontalAlignment="Left" Margin="0 10 0 0" FontSize="{StaticResource TangoDialogFontSize}" Width="160" >
<Run Text="Use Flat Spool"></Run>
</TextBlock>
<touch:TouchToggleSlider IsChecked="{Binding UseFlatSpool,Mode=TwoWay}" Style="{StaticResource TangoToggleButtonGrayAccent}" Margin="49 0 0 0" HorizontalAlignment="Left" Width="90" Height="42"/>
</DockPanel>
</StackPanel>
<Grid Grid.Row="2" Margin="0 70 0 0" HorizontalAlignment="Stretch" Visibility="{Binding ShowDuplicate, Converter={StaticResource BooleanToVisibilityConverter}}">
<TextBlock HorizontalAlignment="Left" Margin="0 10 0 0" Text="Duplicate Job As New" FontWeight="Normal" FontSize="{StaticResource TangoDialogFontSize}" Width="Auto"/>
<touch:TouchButton CornerRadius="25" Command="{Binding DuplicateCommand}" Width="180" Height="48" VerticalAlignment="Center" HorizontalAlignment="Right" Background="{StaticResource TangoPrimaryAccentBrush}" TextElement.Foreground="{StaticResource TangoLightForegroundBrush}" FontSize="{StaticResource TangoButtonFontSize}" Focusable="False">Duplicate</touch:TouchButton>
</Grid>
<Grid Grid.Row="3" Margin="0 70 0 0" HorizontalAlignment="Stretch" Visibility="Collapsed">
<TextBlock HorizontalAlignment="Left" Margin="0 10 0 0" Text="Save Job As PDF" FontWeight="Normal" FontSize="{StaticResource TangoDialogFontSize}" Width="Auto"/>
<touch:TouchButton CornerRadius="25" Width="180" Height="48" VerticalAlignment="Center" HorizontalAlignment="Right"
TextElement.Foreground="{StaticResource TangoLightForegroundBrush}"
FontSize="{StaticResource TangoButtonFontSize}" Content="Export" IsEnabled="False" Focusable="False">
<touch:TouchButton.Style >
<Style TargetType="touch:TouchButton" >
<Setter Property="Foreground" Value="{StaticResource TangoPrimaryAccentBrush}"></Setter>
<Setter Property="Background" Value="{StaticResource TangoMidAccentBrush}"/>
<Style.Triggers>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Foreground" Value="{StaticResource TangoDisabledForegroundBrush}"></Setter>
<Setter Property="Background" Value="{StaticResource TangoDisabledBackgroundBrush}"></Setter>
</Trigger>
</Style.Triggers>
</Style>
</touch:TouchButton.Style>
</touch:TouchButton>
</Grid>
</Grid>
</DockPanel>
</Grid>
</Grid>
</Grid>
</Border>
</UserControl>
|