|
|
@@ -3,6 +3,7 @@
|
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
|
xmlns:modules="clr-namespace:PRS.Avalonia.Modules"
|
|
|
+ xmlns:converters="using:InABox.Avalonia.Converters"
|
|
|
xmlns:avalonia="using:PRS.Avalonia"
|
|
|
xmlns:components="using:InABox.Avalonia.Components"
|
|
|
xmlns:aComponents="using:PRS.Avalonia.Components"
|
|
|
@@ -14,16 +15,99 @@
|
|
|
<modules:ITPColorConverter x:Key="FormColorConverter"
|
|
|
OpenColor="LightSalmon" ClosedColor="LightGreen" NoneColor="Silver"/>
|
|
|
<modules:ITPTextConverter x:Key="OpenFormsTextConverter" Closed="False"/>
|
|
|
+ <modules:ITPVisibilityConverter x:Key="OpenFormsVisibilityConverter" Closed="False"/>
|
|
|
+ <modules:ITPTextConverter x:Key="ClosedFormsTextConverter" Closed="True"/>
|
|
|
+ <modules:ITPVisibilityConverter x:Key="ClosedFormsVisibilityConverter" Closed="True"/>
|
|
|
+
|
|
|
+ <converters:DoubleToCornerRadiusConverter
|
|
|
+ x:Key="SphericalBorder"
|
|
|
+ Ratio="0.5" />
|
|
|
+
|
|
|
+ <converters:DoubleToThicknessConverter
|
|
|
+ x:Key="MarginDoubler"
|
|
|
+ Ratio="2.0" />
|
|
|
|
|
|
<DataTemplate x:Key="ITPShellTemplate" DataType="avalonia:JobITPShell">
|
|
|
- <components:ListViewButton Background="{Binding .,Converter={StaticResource FormColorConverter}}"
|
|
|
- Foreground="Black"
|
|
|
- Command="{Binding $parent[listView:PrsListView].((modules:SiteItpsViewModel)DataContext).SelectITPCommand}"
|
|
|
- CommandParameter="{Binding .}"
|
|
|
- Image="{SvgImage /Images/badge.svg}"
|
|
|
- Title="{Binding Code}"
|
|
|
- Description="{Binding Description}"
|
|
|
- Alert="{Binding .,Converter={StaticResource OpenFormsTextConverter}}"/>
|
|
|
+ <!--components:ListViewButton
|
|
|
+ Alert="{}"/-->
|
|
|
+ <Button Classes="Standard"
|
|
|
+ Background="{Binding .,Converter={StaticResource FormColorConverter}}"
|
|
|
+ Foreground="Black"
|
|
|
+ Command="{Binding $parent[listView:PrsListView].((modules:SiteItpsViewModel)DataContext).SelectITPCommand}"
|
|
|
+ CommandParameter="{Binding .}"
|
|
|
+ Height="80"
|
|
|
+ Padding="0"
|
|
|
+ HorizontalContentAlignment="Stretch"
|
|
|
+ VerticalContentAlignment="Stretch">
|
|
|
+ <Grid>
|
|
|
+ <Grid.RowDefinitions>
|
|
|
+ <RowDefinition Height="*" />
|
|
|
+ <RowDefinition Height="1.2*" />
|
|
|
+ </Grid.RowDefinitions>
|
|
|
+
|
|
|
+ <Grid.ColumnDefinitions>
|
|
|
+ <ColumnDefinition Width="70" />
|
|
|
+ <ColumnDefinition Width="*" />
|
|
|
+ </Grid.ColumnDefinitions>
|
|
|
+
|
|
|
+ <Image Classes="Large"
|
|
|
+ Grid.Row="0" Grid.Column="0" Grid.RowSpan="2"
|
|
|
+ Source="{SvgImage /Images/badge.svg}"
|
|
|
+ HorizontalAlignment="Center"
|
|
|
+ VerticalAlignment="Center" />
|
|
|
+
|
|
|
+ <Label Grid.Row="0" Grid.Column="1"
|
|
|
+ VerticalAlignment="Stretch" VerticalContentAlignment="Center"
|
|
|
+ FontSize="{StaticResource PrsFontSizeLarge}"
|
|
|
+ FontWeight="{StaticResource PrsFontWeightBold}"
|
|
|
+ Content="{Binding Code}" />
|
|
|
+
|
|
|
+ <TextBlock Grid.Row="1" Grid.Column="1"
|
|
|
+ FontSize="{StaticResource PrsFontSizeNormal}"
|
|
|
+ FontStyle="{StaticResource PrsFontStylItalic}"
|
|
|
+ TextWrapping="WrapWithOverflow"
|
|
|
+ VerticalAlignment="Stretch"
|
|
|
+ Text="{Binding Description}" />
|
|
|
+
|
|
|
+ <Border
|
|
|
+ Background="Yellow"
|
|
|
+ BorderBrush="Black"
|
|
|
+ Grid.Row="0"
|
|
|
+ Grid.RowSpan="2"
|
|
|
+ Grid.Column="1"
|
|
|
+ VerticalAlignment="Top"
|
|
|
+ HorizontalAlignment="Right"
|
|
|
+ IsVisible="{Binding ., Converter={StaticResource OpenFormsVisibilityConverter}}"
|
|
|
+ MinWidth="{Binding $self.Bounds.Height}"
|
|
|
+ Margin="{Binding $self, Converter={StaticResource MarginDoubler}, ConverterParameter={StaticResource PrsControlSpacing}}"
|
|
|
+ CornerRadius="{Binding $self.Bounds.Height, Converter={StaticResource SphericalBorder}}">
|
|
|
+
|
|
|
+ <Label Background="Transparent" Foreground="{StaticResource PrsTileForeground}"
|
|
|
+ HorizontalContentAlignment="Center"
|
|
|
+ Content="{Binding .,Converter={StaticResource OpenFormsTextConverter}}" />
|
|
|
+ </Border>
|
|
|
+
|
|
|
+ <Border
|
|
|
+ Background="WhiteSmoke"
|
|
|
+ BorderBrush="Black"
|
|
|
+ BorderThickness="1"
|
|
|
+ Grid.Row="0"
|
|
|
+ Grid.RowSpan="2"
|
|
|
+ Grid.Column="1"
|
|
|
+ VerticalAlignment="Bottom"
|
|
|
+ HorizontalAlignment="Right"
|
|
|
+ IsVisible="{Binding ., Converter={StaticResource ClosedFormsVisibilityConverter}}"
|
|
|
+ MinWidth="{Binding $self.Bounds.Height}"
|
|
|
+ Margin="{Binding $self, Converter={StaticResource MarginDoubler}, ConverterParameter={StaticResource PrsControlSpacing}}"
|
|
|
+ CornerRadius="{Binding $self.Bounds.Height, Converter={StaticResource SphericalBorder}}">
|
|
|
+
|
|
|
+ <Label Background="Transparent" Foreground="{StaticResource PrsTileForeground}"
|
|
|
+ HorizontalContentAlignment="Center"
|
|
|
+ Content="{Binding .,Converter={StaticResource ClosedFormsTextConverter}}" />
|
|
|
+ </Border>
|
|
|
+
|
|
|
+ </Grid>
|
|
|
+ </Button>
|
|
|
</DataTemplate>
|
|
|
</UserControl.Resources>
|
|
|
<listView:PrsListView ItemTemplate="{StaticResource ITPShellTemplate}"
|