blob: 01b8dd8f85bc895f07811b4ae8301135720c0d7b (
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
|
<UserControl x:Class="Tango.PPC.Maintenance.Dialogs.HeadCleaningView"
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:touch="clr-namespace:Tango.Touch.Controls;assembly=Tango.Touch"
xmlns:local="clr-namespace:Tango.PPC.Maintenance.Dialogs"
mc:Ignorable="d"
Background="{StaticResource TangoPrimaryBackgroundBrush}" d:DesignHeight="555" d:DesignWidth="560" Width="600" Height="800" d:DataContext="{d:DesignInstance Type=local:HeadCleaningViewVM, IsDesignTimeCreatable=False}">
<Grid>
<StackPanel Margin="0 50 0 0" HorizontalAlignment="Center">
<Image Source="../Images/head_cleaning.png" RenderOptions.BitmapScalingMode="Fant" Stretch="Uniform" Height="120"></Image>
<TextBlock HorizontalAlignment="Center" FontSize="{StaticResource TangoTitleFontSize}" Margin="0 30 0 0">Head Cleaning</TextBlock>
<TextBlock Margin="20 10" HorizontalAlignment="Center" TextWrapping="Wrap" TextAlignment="Center">
<TextBlock.Style>
<Style TargetType="TextBlock">
<Setter Property="Text" Value="Press 'START' to start the head cleaning sequence"></Setter>
<Style.Triggers>
<DataTrigger Binding="{Binding IsStarted}" Value="True">
<Setter Property="Text" Value="Head cleaning in progress"></Setter>
</DataTrigger>
<DataTrigger Binding="{Binding IsAborting}" Value="True">
<Setter Property="Text" Value="Aborting head cleaning"></Setter>
</DataTrigger>
<DataTrigger Binding="{Binding IsCompleted}" Value="True">
<Setter Property="Text" Value="Head cleaning completed"></Setter>
</DataTrigger>
</Style.Triggers>
</Style>
</TextBlock.Style>
</TextBlock>
<touch:TouchCheckBox Margin="110 20 0 0" IsChecked="{Binding IsLongCleaning}" Visibility="{Binding IsStarted,Converter={StaticResource BooleanToVisibilityInverseConverter}}">Perform Long Cleaning</touch:TouchCheckBox>
<Grid>
<touch:TouchButton Visibility="{Binding IsStarted,Converter={StaticResource BooleanToVisibilityInverseConverter}}" Command="{Binding StartCommand}" Margin="0 100 0 0" Style="{StaticResource TangoHollowButton}" HorizontalAlignment="Center" Padding="80 15" CornerRadius="25">START</touch:TouchButton>
<touch:TouchButton Visibility="{Binding IsStarted,Converter={StaticResource BooleanToVisibilityConverter}}" IsEnabled="{Binding IsAborting,Converter={StaticResource BooleanInverseConverter}}" Command="{Binding AbortCommand}" Margin="0 100 0 0" Style="{StaticResource TangoHollowButton}" HorizontalAlignment="Center" Padding="80 15" CornerRadius="25">ABORT</touch:TouchButton>
</Grid>
<StackPanel Margin="40">
<TextBlock HorizontalAlignment="Left" TextWrapping="Wrap" Text="{Binding Status.Status}"></TextBlock>
<touch:TouchProgressBar Margin="0 20 0 0" VerticalAlignment="Bottom" Width="500" Height="10" Minimum="0" Maximum="{Binding Status.Total}" Value="{Binding Status.Progress}">
<touch:TouchProgressBar.Style>
<Style TargetType="touch:TouchProgressBar" BasedOn="{StaticResource {x:Type touch:TouchProgressBar}}">
<Setter Property="IsIndeterminate" Value="False"></Setter>
<Style.Triggers>
<DataTrigger Binding="{Binding Status.Progress}" Value="0">
<Setter Property="IsIndeterminate" Value="True"></Setter>
</DataTrigger>
</Style.Triggers>
</Style>
</touch:TouchProgressBar.Style>
</touch:TouchProgressBar>
</StackPanel>
</StackPanel>
</Grid>
</UserControl>
|