blob: 658d0502c2423cb3d67002fa8c1051736aa5ea1d (
plain)
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
|
<UserControl x:Class="Tango.PPC.Maintenance.Views.MaintenanceView"
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:vm="clr-namespace:Tango.PPC.Maintenance.ViewModels"
xmlns:global="clr-namespace:Tango.PPC.Maintenance"
xmlns:touch="clr-namespace:Tango.Touch.Controls;assembly=Tango.Touch"
xmlns:localConverters="clr-namespace:Tango.PPC.Maintenance.Converters"
xmlns:local="clr-namespace:Tango.PPC.Maintenance.Views"
mc:Ignorable="d"
d:DesignHeight="1280" d:DesignWidth="800" d:DataContext="{d:DesignInstance Type=vm:MaintenanceViewVM, IsDesignTimeCreatable=False}" DataContext="{x:Static global:ViewModelLocator.MaintenanceViewVM}">
<UserControl.Resources>
<localConverters:StringToFirstLetterConverter x:Key="StringToFirstLetterConverter" />
<localConverters:MidTankLevelToElementHeightConverter x:Key="MidTankLevelToElementHeightConverter" />
<Style TargetType="FrameworkElement" x:Key="Level1Container">
<Setter Property="Margin" Value="20 15 60 15"></Setter>
</Style>
<Style TargetType="FrameworkElement" x:Key="Level2Container">
<Setter Property="Margin" Value="80 30 60 0"></Setter>
</Style>
<Style TargetType="FrameworkElement" x:Key="Level2ContainerExtraMargin">
<Setter Property="Margin" Value="80 40 60 0"></Setter>
</Style>
</UserControl.Resources>
<Grid Background="{StaticResource TangoMidBackgroundBrush}">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="1*"/>
</Grid.RowDefinitions>
<Border Padding="20" Background="{StaticResource TangoPrimaryBackgroundBrush}" BorderThickness="0 0 0 1" BorderBrush="{StaticResource TangoDividerBrush}">
<Border.Effect>
<DropShadowEffect Color="Silver" ShadowDepth="0" BlurRadius="20" Opacity="1" />
</Border.Effect>
<TextBlock VerticalAlignment="Center" FontSize="{StaticResource TangoHeaderFontSize}" FontWeight="SemiBold">Maintenance</TextBlock>
</Border>
<Grid Grid.Row="1">
<touch:LightTouchScrollViewer>
<StackPanel Margin="10 60 10 0">
<!--STATUS-->
<touch:TouchDropShadowBorder Padding="0 0 0 50">
<StackPanel>
<StackPanel Orientation="Horizontal" VerticalAlignment="Center" Style="{StaticResource Level1Container}">
<Image Source="../Images/status.png" />
<TextBlock FontWeight="Medium" Margin="20 0 0 0" VerticalAlignment="Center" FontSize="{StaticResource TangoExpanderHeaderFontSize}">Current Status</TextBlock>
</StackPanel>
<StackPanel Style="{StaticResource Level2ContainerExtraMargin}">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="150*" />
<ColumnDefinition Width="250*" />
<ColumnDefinition Width="100*" />
<ColumnDefinition Width="100*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="100" />
<RowDefinition Height="25" />
</Grid.RowDefinitions>
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">
<Image Source="../Images/temperature-green.png" Stretch="None"></Image>
<TextBlock Margin="5 0 0 0" VerticalAlignment="Center" FontSize="{StaticResource TangoTitleFontSize}" Text="86 º"></TextBlock>
</StackPanel>
<Grid Grid.Column="1" Margin="0 0 0 10">
<ItemsControl ItemsSource="{Binding MidTankLevels}">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<UniformGrid Rows="1" IsItemsHost="True"></UniformGrid>
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
<ItemsControl.ItemTemplate>
<DataTemplate>
<DockPanel>
<TextBlock DockPanel.Dock="Top" Text="{Binding IDSPack.LiquidType.Name,Converter={StaticResource StringToFirstLetterConverter}}" HorizontalAlignment="Center"></TextBlock>
<Grid MaxWidth="30" Margin="5 0">
<touch:TouchIcon Icon="MapMarkerSolid" Width="20" Height="20" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="0 0 0 10">
<touch:TouchIcon.Foreground>
<SolidColorBrush Color="{Binding IDSPack.LiquidType.LiquidTypeColor}" />
</touch:TouchIcon.Foreground>
<touch:TouchIcon.Style>
<Style TargetType="touch:TouchIcon">
<Setter Property="Visibility" Value="Hidden"></Setter>
<Style.Triggers>
<DataTrigger Binding="{Binding IsLow}" Value="True">
<Setter Property="Visibility" Value="Visible"></Setter>
</DataTrigger>
<DataTrigger Binding="{Binding IsEmpty}" Value="True">
<DataTrigger.EnterActions>
<BeginStoryboard Name="blinkDrop">
<Storyboard>
<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Opacity" Duration="00:00:01" RepeatBehavior="Forever">
<DiscreteDoubleKeyFrame KeyTime="00:00:00" Value="1" />
<DiscreteDoubleKeyFrame KeyTime="00:00:0.5" Value="0" />
</DoubleAnimationUsingKeyFrames>
</Storyboard>
</BeginStoryboard>
</DataTrigger.EnterActions>
<DataTrigger.ExitActions>
<RemoveStoryboard BeginStoryboardName="blinkDrop" />
</DataTrigger.ExitActions>
</DataTrigger>
</Style.Triggers>
</Style>
</touch:TouchIcon.Style>
</touch:TouchIcon>
<Border BorderThickness="1" BorderBrush="{StaticResource TangoLightBorderBrush}" CornerRadius="3">
<Border CornerRadius="3" VerticalAlignment="Bottom" MinHeight="2">
<Border.Background>
<SolidColorBrush Color="{Binding IDSPack.LiquidType.LiquidTypeColor}" />
</Border.Background>
<Border.Height>
<MultiBinding Converter="{StaticResource MidTankLevelToElementHeightConverter}">
<Binding RelativeSource="{RelativeSource AncestorType=Border}" Path="ActualHeight" />
<Binding Path="Level" />
</MultiBinding>
</Border.Height>
</Border>
</Border>
</Grid>
</DockPanel>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
</Grid>
<TextBlock Grid.Row="1" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="{StaticResource TangoTitleFontSize}">Temperature</TextBlock>
<TextBlock Grid.Column="1" Grid.Row="1" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="{StaticResource TangoTitleFontSize}">Inks</TextBlock>
</Grid>
</StackPanel>
</StackPanel>
</touch:TouchDropShadowBorder>
<!--ACTIONS-->
<touch:TouchDropShadowBorder Margin="0 20 0 0" Padding="0 0 0 50">
<StackPanel>
<StackPanel Orientation="Horizontal" VerticalAlignment="Center" Style="{StaticResource Level1Container}">
<Image Source="../Images/action.png" />
<TextBlock FontWeight="Medium" Margin="20 0 0 0" VerticalAlignment="Center" FontSize="{StaticResource TangoExpanderHeaderFontSize}">Actions</TextBlock>
</StackPanel>
<StackPanel Style="{StaticResource Level2ContainerExtraMargin}">
<UniformGrid Columns="2" Margin="40 0">
<touch:TouchButton Margin="20" CornerRadius="25" Height="50" FontSize="18" Style="{StaticResource TangoHollowButton}">RUN HEAD CLEANING</touch:TouchButton>
<touch:TouchButton Margin="20" CornerRadius="25" Height="50" FontSize="18" Style="{StaticResource TangoHollowButton}">RUN HEAD CLEANING</touch:TouchButton>
<touch:TouchButton Margin="20" CornerRadius="25" Height="50" FontSize="18" Style="{StaticResource TangoHollowButton}">RUN HEAD CLEANING</touch:TouchButton>
</UniformGrid>
</StackPanel>
</StackPanel>
</touch:TouchDropShadowBorder>
<!--GUIDES-->
<touch:TouchDropShadowBorder Margin="0 20 0 0" Padding="0 0 0 50">
<StackPanel>
<StackPanel Orientation="Horizontal" VerticalAlignment="Center" Style="{StaticResource Level1Container}">
<Image Source="../Images/guides.png" />
<TextBlock FontWeight="Medium" Margin="20 0 0 0" VerticalAlignment="Center" FontSize="{StaticResource TangoExpanderHeaderFontSize}">Guides</TextBlock>
</StackPanel>
<StackPanel Margin="65 10 0 0">
<ItemsControl ItemsSource="{Binding Guides}">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<UniformGrid Columns="2" IsItemsHost="True" />
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
<ItemsControl.ItemTemplate>
<DataTemplate>
<touch:TouchButton Command="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=DataContext.OpenGuideCommand}" CommandParameter="{Binding}" Padding="20" FontSize="{StaticResource TangoTitleFontSize}" Style="{StaticResource TangoLinkButton}" HorizontalAlignment="Left">
<TextBlock Text="{Binding Name}"></TextBlock>
</touch:TouchButton>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
</StackPanel>
</StackPanel>
</touch:TouchDropShadowBorder>
</StackPanel>
</touch:LightTouchScrollViewer>
</Grid>
</Grid>
</UserControl>
|