blob: c0cb963e7d8099909bcee6536de059df4ca2cf9f (
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
|
<UserControl x:Class="Tango.MachineStudio.Developer.Views.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:vm="clr-namespace:Tango.MachineStudio.Developer.ViewModels"
xmlns:local="clr-namespace:Tango.MachineStudio.Developer.Views"
xmlns:material="http://materialdesigninxaml.net/winfx/xaml/themes"
mc:Ignorable="d"
Height="590" Width="800" d:DataContext="{d:DesignInstance Type=vm:InsufficientLiquidQuantityViewVM, IsDesignTimeCreatable=False}" Foreground="{StaticResource Dialog.Foreground}"
Background="{StaticResource Dialog.Background}">
<Grid Margin="10">
<DockPanel>
<StackPanel DockPanel.Dock="Top">
<TextBlock FontSize="24" Foreground="{StaticResource RedBrush100}">Insufficient Liquid Level</TextBlock>
<TextBlock Margin="0 5 0 0" TextWrapping="Wrap" Foreground="{StaticResource GrayBrush}">
<Run>There seems to be an insufficient ink levels in one or more of the following dispensers.</Run>
<LineBreak/>
<Run>The job cannot be completed.</Run>
</TextBlock>
</StackPanel>
<Grid DockPanel.Dock="Bottom" Height="60">
<Button HorizontalAlignment="Left" DockPanel.Dock="Bottom" Height="40" Width="170" Style="{StaticResource MaterialDesignFlatButton}" BorderBrush="{StaticResource RedBrush300}" Foreground="{StaticResource RedBrush300}" Command="{Binding OKCommand}" ToolTip="Ignore this warning now and in the future">Ignore This Error</Button>
<Button HorizontalAlignment="Right" DockPanel.Dock="Bottom" Height="40" Width="140" Command="{Binding CloseCommand}" Margin="10 0 0 0">CLOSE</Button>
</Grid>
<Border Margin="0 20 0 0" Padding="10" BorderThickness="1" BorderBrush="{StaticResource BorderBrushGainsboro}" CornerRadius="3">
<ItemsControl ItemsSource="{Binding Exception.IdsPackLevels}" VerticalAlignment="Top">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<StackPanel HorizontalAlignment="Left" VerticalAlignment="Center" Orientation="Vertical" IsItemsHost="True"></StackPanel>
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
<ItemsControl.ItemTemplate>
<DataTemplate>
<Grid Margin="0 0 0 4">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="40" />
<ColumnDefinition Width="160" />
<ColumnDefinition Width="1*" />
</Grid.ColumnDefinitions>
<material:PackIcon VerticalAlignment="Center" Width="24" Height="24">
<material:PackIcon.Style>
<Style TargetType="material:PackIcon">
<Setter Property="Kind" Value="Check"></Setter>
<Setter Property="Foreground" Value="{StaticResource GreenBrush100}"></Setter>
<Style.Triggers>
<DataTrigger Binding="{Binding IsValid}" Value="False">
<Setter Property="Kind" Value="Alert"></Setter>
<Setter Property="Foreground" Value="{StaticResource OrangeBrush}"></Setter>
</DataTrigger>
<DataTrigger Binding="{Binding IsOverMax}" Value="True">
<Setter Property="Kind" Value="AlertOctagon"></Setter>
<Setter Property="Foreground" Value="{StaticResource RedBrush100}"></Setter>
</DataTrigger>
<MultiDataTrigger>
<MultiDataTrigger.Conditions>
<Condition Binding="{Binding IsValid}" Value="True" />
<Condition Binding="{Binding IsOverMax}" Value="False" />
</MultiDataTrigger.Conditions>
<Setter Property="Kind" Value="Check"></Setter>
<Setter Property="Foreground" Value="{StaticResource GreenBrush100}"></Setter>
</MultiDataTrigger>
</Style.Triggers>
</Style>
</material:PackIcon.Style>
</material:PackIcon>
<!--<material:PackIcon Kind="AlertOctagon" VerticalAlignment="Center" Width="24" Height="24" Visibility="{Binding IsValid,Converter={StaticResource BoolToVisConverter}}" />-->
<Border Grid.Column="1" Margin="5 0 0 0" Height="45" Width="150" CornerRadius="3" BorderThickness="1" BorderBrush="{StaticResource BorderBrushGainsboro}">
<Grid>
<Border VerticalAlignment="Center" CornerRadius="3" Loaded="IdsPackLoaded" MinHeight="45" HorizontalAlignment="Left" MinWidth="5">
<Border.Background>
<LinearGradientBrush StartPoint="0,0" EndPoint="1,1">
<GradientStop Offset="0.5" Color="{Binding IdsPack.LiquidType.LiquidTypeColor}" />
<GradientStop Offset="1" Color="#4EFFFFFF" />
</LinearGradientBrush>
</Border.Background>
</Border>
<Rectangle Loaded="Limit_Loaded" Stroke="Red" StrokeThickness="2" HorizontalAlignment="Left">
<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>
<TextBlock Foreground="#3B3B3B" HorizontalAlignment="Center" Text="{Binding IdsPack.LiquidType.Name}" VerticalAlignment="Center">
<TextBlock.Effect>
<DropShadowEffect ShadowDepth="1" BlurRadius="1" Color="White" />
</TextBlock.Effect>
</TextBlock>
</Grid>
</Border>
<TextBlock Grid.Column="2" HorizontalAlignment="Left" Text="{Binding Message}" VerticalAlignment="Center" Margin="20,0,0,0" TextWrapping="Wrap" Foreground="{StaticResource RedBrush100}"></TextBlock>
</Grid>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
</Border>
</DockPanel>
</Grid>
</UserControl>
|