|
@@ -3,14 +3,21 @@
|
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
|
xmlns:listView="clr-namespace:PRS.Avalonia.Components.ListView"
|
|
|
+ xmlns:prs="using:PRS.Avalonia"
|
|
|
xmlns:local="using:PRS.Avalonia.Components"
|
|
|
xmlns:components="using:InABox.Avalonia.Components"
|
|
|
+ xmlns:converters="using:InABox.Avalonia.Converters"
|
|
|
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
|
|
x:Class="PRS.Avalonia.Components.FormsList"
|
|
|
x:DataType="local:FormsList">
|
|
|
+ <UserControl.Resources>
|
|
|
+ <local:FormsListBackgroundColorConverter x:Key="BackgroundColorConverter"/>
|
|
|
+ <local:FormsListForegroundColorConverter x:Key="ForegroundColorConverter"/>
|
|
|
+ <local:ExistingFormStatusConverter x:Key="StatusConverter"/>
|
|
|
+ <converters:ShellSelectedConverter x:Key="ShellSelectedConverter"/>
|
|
|
+ </UserControl.Resources>
|
|
|
<Grid>
|
|
|
<Grid.RowDefinitions>
|
|
|
- <RowDefinition Height="Auto"/>
|
|
|
<RowDefinition Height="*"/>
|
|
|
<RowDefinition Height="Auto"/>
|
|
|
</Grid.RowDefinitions>
|
|
@@ -18,11 +25,68 @@
|
|
|
<ColumnDefinition Width="*"/>
|
|
|
<ColumnDefinition Width="Auto"/>
|
|
|
</Grid.ColumnDefinitions>
|
|
|
-
|
|
|
- <components:SearchBar Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2"
|
|
|
- Text="{Binding SearchText}"
|
|
|
- Command="{Binding SearchCommand}"/>
|
|
|
-
|
|
|
- <listView:PrsListView Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2"/>
|
|
|
+
|
|
|
+ <listView:PrsListView Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2"
|
|
|
+ Repository="{Binding $parent[local:FormsList].Model}">
|
|
|
+ <listView:PrsListView.ItemTemplate>
|
|
|
+ <DataTemplate DataType="prs:IDigitalFormInstanceShell">
|
|
|
+ <Button Background="{Binding .,Converter={StaticResource BackgroundColorConverter}}"
|
|
|
+ Command="{Binding $parent[local:FormsList].FormClickedCommand}"
|
|
|
+ CommandParameter="{Binding .}"
|
|
|
+ Height="50"
|
|
|
+ Padding="0"
|
|
|
+ HorizontalContentAlignment="Stretch">
|
|
|
+ <Grid>
|
|
|
+ <Grid.RowDefinitions>
|
|
|
+ <RowDefinition Height="*"/>
|
|
|
+ <RowDefinition Height="*"/>
|
|
|
+ </Grid.RowDefinitions>
|
|
|
+ <Grid.ColumnDefinitions>
|
|
|
+ <ColumnDefinition Width="Auto"/>
|
|
|
+ <ColumnDefinition Width="Auto"/>
|
|
|
+ <ColumnDefinition Width="*"/>
|
|
|
+ <ColumnDefinition Width="Auto"/>
|
|
|
+ <ColumnDefinition Width="Auto"/>
|
|
|
+ </Grid.ColumnDefinitions>
|
|
|
+
|
|
|
+ <CheckBox Grid.Row="0" Grid.Column="0"
|
|
|
+ Height="15"
|
|
|
+ Classes="small"
|
|
|
+ IsChecked="{Binding .,Converter={StaticResource ShellSelectedConverter}}"/>
|
|
|
+ <Label Grid.Row="0" Grid.Column="1" Grid.ColumnSpan="3"
|
|
|
+ Content="{Binding FormDescription}"
|
|
|
+ FontSize="{StaticResource PrsFontSizeSmall}"
|
|
|
+ FontWeight="{StaticResource PrsFontWeightBold}"
|
|
|
+ VerticalAlignment="Stretch"
|
|
|
+ VerticalContentAlignment="Center"
|
|
|
+ Foreground="{Binding .,Converter={StaticResource ForegroundColorConverter}}"/>
|
|
|
+ <Label Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="3"
|
|
|
+ Content="{Binding .,Converter={StaticResource StatusConverter}}"
|
|
|
+ FontSize="{StaticResource PrsFontSizeExtraSmall}"
|
|
|
+ VerticalAlignment="Stretch"
|
|
|
+ VerticalContentAlignment="Center"
|
|
|
+ Foreground="{Binding .,Converter={StaticResource ForegroundColorConverter}}"/>
|
|
|
+ <Label Grid.Row="1" Grid.Column="3"
|
|
|
+ Content="{Binding Number}"
|
|
|
+ FontSize="{StaticResource PrsFontSizeExtraSmall}"
|
|
|
+ VerticalAlignment="Stretch"
|
|
|
+ VerticalContentAlignment="Center"
|
|
|
+ Foreground="{Binding .,Converter={StaticResource ForegroundColorConverter}}"/>
|
|
|
+ <Image Grid.Row="0" Grid.Column="4" Grid.RowSpan="2"
|
|
|
+ Source="{SvgImage /Images/digitalform.svg}"/>
|
|
|
+ </Grid>
|
|
|
+ </Button>
|
|
|
+ </DataTemplate>
|
|
|
+ </listView:PrsListView.ItemTemplate>
|
|
|
+ </listView:PrsListView>
|
|
|
+ <TabStrip Grid.Row="1" Grid.Column="0"
|
|
|
+ IsVisible="{Binding $parent[local:FormsList].SeparateHistory}">
|
|
|
+ <TabStripItem Content="Open Forms"/>
|
|
|
+ <TabStripItem Content="History"/>
|
|
|
+ </TabStrip>
|
|
|
+ <Button Grid.Row="1" Grid.Column="1"
|
|
|
+ Background="Silver"
|
|
|
+ IsVisible="False"
|
|
|
+ Command="{Binding $parent[local:FormsList].SelectionMenuCommand}"/>
|
|
|
</Grid>
|
|
|
</UserControl>
|