141 lines
6.7 KiB
XML
141 lines
6.7 KiB
XML
<UserControl xmlns="https://github.com/avaloniaui"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
mc:Ignorable="d"
|
|
d:DesignWidth="800"
|
|
d:DesignHeight="450"
|
|
x:Class="MayShow.Views.StartNewChooseReport"
|
|
xmlns:models="clr-namespace:MayShow.Models"
|
|
xmlns:vm="clr-namespace:MayShow.ViewModels"
|
|
xmlns:dialogHost="clr-namespace:DialogHostAvalonia;assembly=DialogHost.Avalonia"
|
|
x:DataType="vm:StartNewChooseReportViewModel">
|
|
<Grid ColumnDefinitions="100, *, 100"
|
|
RowDefinitions="Auto, Auto, Auto, Auto, Auto, Auto, Auto, *">
|
|
<Button Command="{Binding ShowSettings}"
|
|
Grid.Row="0"
|
|
Grid.Column="0"
|
|
HorizontalAlignment="Left"
|
|
VerticalAlignment="Top"
|
|
Margin="4,4,0,4">
|
|
<TextBlock><Run Text="" FontFamily="{StaticResource FontAwesomeSolid}"/> Settings</TextBlock>
|
|
</Button>
|
|
<Button Command="{Binding ShowAbout}"
|
|
Grid.Row="0"
|
|
Grid.Column="2"
|
|
HorizontalAlignment="Right"
|
|
VerticalAlignment="Top"
|
|
Margin="0,4,4,4">
|
|
<TextBlock><Run Text="" FontFamily="{StaticResource FontAwesomeSolid}"/> About</TextBlock>
|
|
</Button>
|
|
<TextBlock HorizontalAlignment="Center"
|
|
FontSize="36"
|
|
FontWeight="Bold"
|
|
Margin="0,16,0,0"
|
|
Grid.Column="1"
|
|
Grid.Row="0">
|
|
MayShow <Run Text="{Binding Version}"/>
|
|
</TextBlock>
|
|
<Image Source="avares://MayShow/Assets/MayShowIcon.png"
|
|
Width="125"
|
|
Margin="0,12,0,0"
|
|
HorizontalAlignment="Center"
|
|
Grid.Column="1"
|
|
Grid.Row="1" />
|
|
<Label Content="Start New Report"
|
|
HorizontalAlignment="Left"
|
|
FontSize="16"
|
|
FontWeight="Bold"
|
|
Margin="0,24,0,0"
|
|
Grid.Column="1"
|
|
Grid.Row="2"/>
|
|
<Grid HorizontalAlignment="Stretch"
|
|
ColumnDefinitions="*, Auto"
|
|
Margin="0,8,0,0"
|
|
Grid.Column="1"
|
|
Grid.Row="3">
|
|
<TextBox Watermark="Feb 2024 Report"
|
|
Classes="clearButton"
|
|
Text="{Binding CreatingReportTitle}"
|
|
VerticalAlignment="Stretch"
|
|
HorizontalAlignment="Stretch"
|
|
TextWrapping="Wrap"
|
|
Margin="0,0,16,0"
|
|
Grid.Column="0" />
|
|
<Button Command="{Binding StartReport}"
|
|
Classes="accent"
|
|
Grid.Column="1">
|
|
<TextBlock>
|
|
<Run Text=""
|
|
FontFamily="{StaticResource FontAwesomeSolid}" /> Create Blank Report</TextBlock>
|
|
</Button>
|
|
</Grid>
|
|
<Label Content="Start New Report From Existing Files"
|
|
HorizontalAlignment="Left"
|
|
FontSize="16"
|
|
FontWeight="Bold"
|
|
Margin="0,8,0,0"
|
|
Grid.Column="1"
|
|
Grid.Row="4"/>
|
|
<Button Command="{Binding StartReportFromFolder}"
|
|
Classes="accent"
|
|
Grid.Row="5"
|
|
Grid.Column="1">
|
|
<TextBlock>
|
|
<Run Text=""
|
|
FontFamily="{StaticResource FontAwesomeSolid}" /> Create Report from Existing Folder</TextBlock>
|
|
</Button>
|
|
<Label Content="Load Previously Saved Report"
|
|
FontSize="16"
|
|
FontWeight="Bold"
|
|
HorizontalAlignment="Left"
|
|
Margin="0,16,0,0"
|
|
Grid.Column="1"
|
|
Grid.Row="6"/>
|
|
<ScrollViewer Margin="0,8,0,32"
|
|
Grid.Column="1"
|
|
Grid.Row="7"
|
|
VerticalScrollBarVisibility="Visible"
|
|
AllowAutoHide="False"
|
|
HorizontalScrollBarVisibility="Disabled">
|
|
<ItemsControl ItemsSource="{Binding SavedReports}">
|
|
<ItemsControl.ItemTemplate>
|
|
<DataTemplate x:DataType="models:PDFReportInfo">
|
|
<StackPanel Orientation="Vertical"
|
|
Margin="12,4,4,8"
|
|
Spacing="4">
|
|
<TextBlock Text="{Binding Title}" />
|
|
<!-- <TextBlock Text="{Binding BaseFolder}"
|
|
Foreground="Gray"
|
|
TextWrapping="Wrap" /> -->
|
|
<TextBlock Foreground="Gray"
|
|
TextWrapping="Wrap">
|
|
Last saved on: <Run Text="{Binding LastSaved, StringFormat='{}{0:yyyy-MM-dd}'}"/>
|
|
</TextBlock>
|
|
<StackPanel Orientation="Horizontal"
|
|
Spacing="8">
|
|
<Button Command="{Binding $parent[UserControl].((vm:StartNewChooseReportViewModel)DataContext).LoadExistingReport}"
|
|
CommandParameter="{Binding}"
|
|
Classes="accent"
|
|
Grid.Column="1">
|
|
<TextBlock>
|
|
<Run Text=""
|
|
FontFamily="{StaticResource FontAwesomeSolid}" /> Load Report</TextBlock>
|
|
</Button>
|
|
<Button Command="{Binding $parent[UserControl].((vm:StartNewChooseReportViewModel)DataContext).DeleteExistingReport}"
|
|
CommandParameter="{Binding}"
|
|
Classes="Danger"
|
|
Grid.Column="1">
|
|
<TextBlock>
|
|
<Run Text=""
|
|
FontFamily="{StaticResource FontAwesomeSolid}" /> Delete Report</TextBlock>
|
|
</Button>
|
|
</StackPanel>
|
|
<Rectangle Fill="Gray" Height="2" HorizontalAlignment="Stretch" Margin="0,8,0,0"/>
|
|
</StackPanel>
|
|
</DataTemplate>
|
|
</ItemsControl.ItemTemplate>
|
|
</ItemsControl>
|
|
</ScrollViewer>
|
|
</Grid>
|
|
</UserControl> |