1
0
Fork 0
Backup-Essentials/BackupEssentials/Pages/History.xaml

89 lines
6.1 KiB
XML

<Page x:Class="BackupEssentials.Pages.History"
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:sys="clr-namespace:System;assembly=mscorlib"
xmlns:system="clr-namespace:BackupEssentials.Sys"
xmlns:history="clr-namespace:BackupEssentials.Backup.History"
mc:Ignorable="d"
d:DesignWidth="{StaticResource PageWidth}" d:DesignHeight="{StaticResource PageHeight}" Background="{StaticResource PageBackground}"
Title="Backup History">
<Page.Resources>
<sys:Double x:Key="EntryListItemHeight">46</sys:Double>
</Page.Resources>
<Grid Margin="0,0,0,3">
<Grid.RowDefinitions>
<RowDefinition Height="48"/>
<RowDefinition Height="*"/>
<RowDefinition Height="18"/>
</Grid.RowDefinitions>
<StackPanel Orientation="Horizontal" DataContext="{Binding Source={x:Static system:Settings.Default}}">
<StackPanel.Resources>
<Style TargetType="Button">
<Setter Property="Margin" Value="8,8,0,0"/>
<Setter Property="FontSize" Value="16"/>
<Setter Property="Template" Value="{StaticResource ButtonStyleDefault}"/>
</Style>
</StackPanel.Resources>
<Button x:Name="ButtonShowReport" Content="{Binding Language[History.Button.Show]}" IsEnabled="False" Click="ClickShowReport"/>
<Button x:Name="ButtonRemove" Content="{Binding Language[History.Button.Remove]}" IsEnabled="False" Template="{StaticResource ButtonStyleRedDefault}" Click="ClickRemove"/>
</StackPanel>
<ListView x:Name="HistoryListView" Grid.Row="1" Margin="8,8,8,0" Style="{StaticResource ListViewStyleDefault}" SelectionChanged="ListViewSelectionChanged">
<ListView.Resources>
<Style TargetType="{x:Type ListViewItem}">
<Setter Property="Padding" Value="8,4,8,8"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ListViewItem}">
<Border x:Name="border" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Padding="{TemplateBinding Padding}" SnapsToDevicePixels="True" MouseLeftButtonDown="ClickHistoryEntry">
<VisualStateManager.VisualStateGroups>
<VisualStateGroup x:Name="CommonStates">
<VisualState x:Name="Normal"/>
<VisualState x:Name="MouseOver" Storyboard="{StaticResource ListViewItemStoryboardMouseOver}"/>
<VisualState x:Name="Selected" Storyboard="{StaticResource ListViewItemStoryboardSelected}"/>
</VisualStateGroup>
</VisualStateManager.VisualStateGroups>
<Grid Width="Auto" Height="{StaticResource EntryListItemHeight}" SnapsToDevicePixels="True" HorizontalAlignment="Stretch">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<TextBlock Foreground="#FFDDDDDD" Text="{Binding LocationName}" VerticalAlignment="Top" FontSize="20"/>
<TextBlock Foreground="#FFDDDDDD" Text="{Binding BackupTimeParsed}" VerticalAlignment="Bottom" FontSize="14"/>
<StackPanel Grid.Column="1" Orientation="Vertical" HorizontalAlignment="Right" VerticalAlignment="Center" Margin="0,0,8,0" DataContext="{Binding Source={x:Static system:Settings.Default}}">
<TextBlock Text="{Binding Language[History.Entry.Added]}" Foreground="#FFDDDDDD" FontSize="11" HorizontalAlignment="Right"/>
<TextBlock Text="{Binding Language[History.Entry.Updated]}" Foreground="#FFDDDDDD" FontSize="11" HorizontalAlignment="Right"/>
<TextBlock Text="{Binding Language[History.Entry.Deleted]}" Foreground="#FFDDDDDD" FontSize="11" HorizontalAlignment="Right"/>
</StackPanel>
<StackPanel Grid.Column="2" Orientation="Vertical" HorizontalAlignment="Right" VerticalAlignment="Center" MinWidth="36">
<TextBlock Text="{Binding EntriesAdded}" Foreground="#FFDDDDDD" FontSize="11"/>
<TextBlock Text="{Binding EntriesUpdated}" Foreground="#FFDDDDDD" FontSize="11"/>
<TextBlock Text="{Binding EntriesDeleted}" Foreground="#FFDDDDDD" FontSize="11"/>
</StackPanel>
</Grid>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</ListView.Resources>
<ListView.Items>
<history:HistoryEntry LocationName="Dropbox" BackupTime="2015-4-17 17:26:00" EntriesAdded="2600" EntriesDeleted="125"/>
</ListView.Items>
</ListView>
<TextBlock Text="{Binding Language[History.Hint], Source={x:Static system:Settings.Default}}" HorizontalAlignment="Left" Grid.Row="2" VerticalAlignment="Center" Foreground="#FFB9B9B9" Margin="12,0,0,0"/>
</Grid>
</Page>