aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/PPC/Tango.PPC.UI/Dialogs/InsufficientLiquidQuantityView.xaml
blob: f3c471954af55e573dc5421adae66054e45f3457 (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
<UserControl x:Class="Tango.PPC.UI.Dialogs.InsufficientLiquidQuantityView"
             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.UI.Dialogs"
             mc:Ignorable="d" 
             Background="{StaticResource TangoPrimaryBackgroundBrush}" Width="700" Height="800" d:DataContext="{d:DesignInstance Type=local:InsufficientLiquidQuantityViewVM, IsDesignTimeCreatable=False}">
    <Grid Margin="20">
        <DockPanel>
            <Grid DockPanel.Dock="Bottom">
                <touch:TouchButton HorizontalAlignment="Right" CornerRadius="25" Command="{Binding OKCommand}" Style="{StaticResource TangoHollowButton}" Width="150" Height="50" VerticalAlignment="Bottom">CLOSE</touch:TouchButton>
            </Grid>
            <StackPanel DockPanel.Dock="Top">
                <Image Source="/Images/cartridge_validation.png" RenderOptions.BitmapScalingMode="Fant" Stretch="Uniform" Height="120"></Image>
                <TextBlock HorizontalAlignment="Center" Margin="0 20 0 0" FontSize="{StaticResource TangoHeaderFontSize}">Insufficient Ink Level</TextBlock>
                <TextBlock Margin="20 10" HorizontalAlignment="Center" TextWrapping="Wrap" TextAlignment="Center">
                    <Run>There seems to be an insufficient ink levels in one or more of the following dispensers.</Run>
                    <Run>The job cannot be completed.</Run>
                </TextBlock>
            </StackPanel>
            <Grid>
                <ItemsControl ItemsSource="{Binding Exception.IdsPackLevels}">
                    <ItemsControl.ItemsPanel>
                        <ItemsPanelTemplate>
                            <StackPanel HorizontalAlignment="Center" VerticalAlignment="Center" Orientation="Horizontal" IsItemsHost="True"></StackPanel>
                        </ItemsPanelTemplate>
                    </ItemsControl.ItemsPanel>
                    <ItemsControl.ItemTemplate>
                        <DataTemplate>
                            <StackPanel Margin="15 0" Width="60">
                                <TextBlock HorizontalAlignment="Center" Text="{Binding IdsPack.LiquidType.Name}" Margin="-20 0 -20 0" TextTrimming="CharacterEllipsis"></TextBlock>
                                <Border Margin="0 5 0 0" Height="150" Width="50" CornerRadius="3" BorderThickness="1" BorderBrush="{StaticResource TangoLightBorderBrush}">
                                    <Grid>
                                        <Border CornerRadius="3" VerticalAlignment="Bottom" Loaded="IdsPackLoaded" MinHeight="5">
                                            <Border.Background>
                                                <LinearGradientBrush>
                                                    <GradientStop Offset="0" Color="#4DFFFFFF" />
                                                    <GradientStop Offset="0.5" Color="{Binding IdsPack.LiquidType.LiquidTypeColor}" />
                                                </LinearGradientBrush>
                                            </Border.Background>
                                        </Border>
                                        <Rectangle Loaded="Limit_Loaded" Stroke="Red" StrokeThickness="2" VerticalAlignment="Bottom">
                                            <Rectangle.Style>
                                                <Style TargetType="Rectangle">
                                                    <Style.Triggers>
                                                        <EventTrigger RoutedEvent="Loaded">
                                                            <EventTrigger.Actions>
                                                                <BeginStoryboard Name="str">
                                                                    <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>
                                                            </EventTrigger.Actions>
                                                        </EventTrigger>
                                                        <EventTrigger RoutedEvent="Unloaded">
                                                            <EventTrigger.Actions>
                                                                <RemoveStoryboard BeginStoryboardName="str" />
                                                            </EventTrigger.Actions>
                                                        </EventTrigger>
                                                    </Style.Triggers>
                                                </Style>
                                            </Rectangle.Style>
                                        </Rectangle>
                                    </Grid>
                                </Border>
                            </StackPanel>
                        </DataTemplate>
                    </ItemsControl.ItemTemplate>
                </ItemsControl>
            </Grid>
        </DockPanel>
    </Grid>
</UserControl>