aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/PPC/Tango.PPC.UI/Dialogs
diff options
context:
space:
mode:
authorVictoria Plitt <Victoria.Plitt@twine-s.com>2019-11-14 16:07:42 +0200
committerVictoria Plitt <Victoria.Plitt@twine-s.com>2019-11-14 16:07:42 +0200
commit5727b7e6d821f3ba965ceea382da2d839257bb47 (patch)
tree3b1da9e37baa5bc3c83e3071fd5ee7c956ae937d /Software/Visual_Studio/PPC/Tango.PPC.UI/Dialogs
parentebcd646d565cc251d808048fc7ffa2bacbeaeca2 (diff)
downloadTango-5727b7e6d821f3ba965ceea382da2d839257bb47.tar.gz
Tango-5727b7e6d821f3ba965ceea382da2d839257bb47.zip
Refactored InsufficientLiquidQuantityView on PPC.
Diffstat (limited to 'Software/Visual_Studio/PPC/Tango.PPC.UI/Dialogs')
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/Dialogs/InsufficientLiquidQuantityView.xaml60
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/Dialogs/InsufficientLiquidQuantityView.xaml.cs6
2 files changed, 53 insertions, 13 deletions
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Dialogs/InsufficientLiquidQuantityView.xaml b/Software/Visual_Studio/PPC/Tango.PPC.UI/Dialogs/InsufficientLiquidQuantityView.xaml
index 8b8983fa5..ad1c2ece3 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Dialogs/InsufficientLiquidQuantityView.xaml
+++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Dialogs/InsufficientLiquidQuantityView.xaml
@@ -20,28 +20,59 @@
<Run>The job cannot be completed.</Run>
</TextBlock>
</StackPanel>
- <Grid>
+ <Grid VerticalAlignment="Top" Margin="0 30 0 0">
<ItemsControl ItemsSource="{Binding Exception.IdsPackLevels}">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
- <StackPanel HorizontalAlignment="Center" VerticalAlignment="Center" Orientation="Horizontal" IsItemsHost="True"></StackPanel>
+ <StackPanel HorizontalAlignment="Left" VerticalAlignment="Center" Orientation="Vertical" 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 Margin="0 0 0 4">
+ <Grid.ColumnDefinitions>
+ <ColumnDefinition Width="40" />
+ <ColumnDefinition Width="160" />
+ <ColumnDefinition Width="1*" />
+ </Grid.ColumnDefinitions>
+ <touch:TouchIcon VerticalAlignment="Center" Width="24" Height="24">
+ <touch:TouchIcon.Style>
+ <Style TargetType="touch:TouchIcon">
+ <Setter Property="Icon" Value="Check"></Setter>
+ <Setter Property="Foreground" Value="{StaticResource TangoGreenBrush}"></Setter>
+ <Style.Triggers>
+ <DataTrigger Binding="{Binding IsValid}" Value="False">
+ <Setter Property="Icon" Value="Alert"></Setter>
+ <Setter Property="Foreground" Value="{StaticResource TangoWarningBrush}"></Setter>
+ </DataTrigger>
+ <DataTrigger Binding="{Binding IsOverMax}" Value="True">
+ <Setter Property="Icon" Value="AlertOctagon"></Setter>
+ <Setter Property="Foreground" Value="{StaticResource TangoRedBrush}"></Setter>
+ </DataTrigger>
+ <MultiDataTrigger>
+ <MultiDataTrigger.Conditions>
+ <Condition Binding="{Binding IsValid}" Value="True" />
+ <Condition Binding="{Binding IsOverMax}" Value="False" />
+ </MultiDataTrigger.Conditions>
+ <Setter Property="Icon" Value="Check"></Setter>
+ <Setter Property="Foreground" Value="{StaticResource TangoGreenBrush}"></Setter>
+ </MultiDataTrigger>
+ </Style.Triggers>
+ </Style>
+ </touch:TouchIcon.Style>
+ </touch:TouchIcon>
+
+ <Border Grid.Column="1" Margin="5 0 0 0" Height="45" Width="150" CornerRadius="3" BorderThickness="1" BorderBrush="{StaticResource TangoLightBorderBrush}">
<Grid>
- <Border CornerRadius="3" VerticalAlignment="Bottom" Loaded="IdsPackLoaded" MinHeight="5">
+ <Border VerticalAlignment="Center" CornerRadius="3" Loaded="IdsPackLoaded" MinHeight="45" HorizontalAlignment="Left" MinWidth="5">
<Border.Background>
- <LinearGradientBrush>
- <GradientStop Offset="0" Color="#4DFFFFFF" />
+ <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" VerticalAlignment="Bottom">
+ <Rectangle Loaded="Limit_Loaded" Stroke="{StaticResource TangoRedBrush}" StrokeThickness="2" HorizontalAlignment="Left">
<Rectangle.Style>
<Style TargetType="Rectangle">
<Style.Triggers>
@@ -66,9 +97,18 @@
</Style>
</Rectangle.Style>
</Rectangle>
+
+
+ <TextBlock FontSize="{StaticResource TangoSmallFontSize}" Foreground="{StaticResource TangoDarkForegroundBrush}" HorizontalAlignment="Center" Text="{Binding IdsPack.LiquidType.Name}" VerticalAlignment="Center">
+ <TextBlock.Effect>
+ <DropShadowEffect ShadowDepth="1" BlurRadius="1" Color="White" />
+ </TextBlock.Effect>
+ </TextBlock>
+
</Grid>
</Border>
- </StackPanel>
+ <TextBlock Grid.Column="2" HorizontalAlignment="Left" Text="{Binding Message}" VerticalAlignment="Center" Margin="20,0,0,0" TextWrapping="Wrap" FontSize="{StaticResource TangoSmallFontSize}" Foreground="{StaticResource TangoRedBrush}"></TextBlock>
+ </Grid>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Dialogs/InsufficientLiquidQuantityView.xaml.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/Dialogs/InsufficientLiquidQuantityView.xaml.cs
index 9ec1eec0e..9a17f4f22 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Dialogs/InsufficientLiquidQuantityView.xaml.cs
+++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Dialogs/InsufficientLiquidQuantityView.xaml.cs
@@ -33,7 +33,7 @@ namespace Tango.PPC.UI.Dialogs
Grid parent = border.Parent as Grid;
IDSPackLevel packLevel = border.DataContext as IDSPackLevel;
- border.Height = ((double)packLevel.Current / (double)MachineOperator.MAX_DISPENSER_NANOLITER) * parent.ActualHeight;
+ border.Width = ((double)packLevel.Current / (double)MachineOperator.MAX_DISPENSER_NANOLITER) * parent.ActualWidth;
}
private void Limit_Loaded(object sender, RoutedEventArgs e)
@@ -42,8 +42,8 @@ namespace Tango.PPC.UI.Dialogs
Grid parent = rect.Parent as Grid;
IDSPackLevel packLevel = rect.DataContext as IDSPackLevel;
- var top = ((double)packLevel.Required / (double)MachineOperator.MAX_DISPENSER_NANOLITER) * parent.ActualHeight;
- rect.Margin = new Thickness(0, 0, 0, top);
+ var left = ((double)packLevel.Required / (double)MachineOperator.MAX_DISPENSER_NANOLITER) * parent.ActualWidth;
+ rect.Margin = new Thickness(left, 0, 0, 0);
if (packLevel.IsValid)
{