157 lines
11 KiB
XML
157 lines
11 KiB
XML
<Page x:Class="BackupEssentials.Pages.Settings"
|
|
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:BackupEssentials.Sys"
|
|
mc:Ignorable="d"
|
|
d:DesignWidth="{StaticResource PageWidth}" d:DesignHeight="{StaticResource PageHeight}" Background="{StaticResource PageBackground}"
|
|
Title="Settings">
|
|
|
|
<Grid x:Name="MainGrid" DataContext="{Binding Source={x:Static sys:Settings.Default}}" Margin="0,0,0,3">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="50"/>
|
|
<RowDefinition Height="*"/>
|
|
<RowDefinition Height="18"/>
|
|
</Grid.RowDefinitions>
|
|
|
|
<WrapPanel Grid.Row="0" VerticalAlignment="Center" Margin="32,0" HorizontalAlignment="Right">
|
|
<WrapPanel.Resources>
|
|
<Style TargetType="Button">
|
|
<Setter Property="Height" Value="40"/>
|
|
<Setter Property="FontSize" Value="16"/>
|
|
</Style>
|
|
</WrapPanel.Resources>
|
|
|
|
<Button x:Name="ButtonSave" Content="{Binding Language[Settings.Button.Save]}" IsEnabled="False" FontSize="16" Template="{StaticResource ButtonStyleDefault}" Margin="0,0,10,0" Click="ClickSave"/>
|
|
<Button x:Name="ButtonCancel" Content="{Binding Language[Settings.Button.Cancel]}" IsEnabled="False" FontSize="16" Template="{StaticResource ButtonStyleRedDefault}" Margin="0,0,10,0" Click="ClickCancel"/>
|
|
<Button x:Name="ButtonReset" Content="{Binding Language[Settings.Button.Reset]}" FontSize="16" Template="{StaticResource ButtonStyleRedDefault}" Click="ClickReset"/>
|
|
</WrapPanel>
|
|
|
|
<Grid x:Name="GridContainer" Grid.Row="1" Margin="28,0" SnapsToDevicePixels="True">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="*"/>
|
|
<ColumnDefinition Width="*"/>
|
|
</Grid.ColumnDefinitions>
|
|
|
|
<Grid.Resources>
|
|
<Style TargetType="StackPanel">
|
|
<Setter Property="Margin" Value="12,4"/>
|
|
</Style>
|
|
<Style x:Key="StackPanelSub" TargetType="StackPanel">
|
|
<Setter Property="Margin" Value="4"/>
|
|
</Style>
|
|
<Style TargetType="TextBlock">
|
|
<Setter Property="Foreground" Value="#FFDDDDDD"/>
|
|
<Setter Property="TextWrapping" Value="NoWrap"/>
|
|
</Style>
|
|
<Style TargetType="TextBlock" x:Key="LabelBlock">
|
|
<Setter Property="Margin" Value="0,0,8,0"/>
|
|
<Setter Property="VerticalAlignment" Value="Center"/>
|
|
</Style>
|
|
<Style TargetType="CheckBox">
|
|
<Setter Property="Foreground" Value="#FFDDDDDD"/>
|
|
</Style>
|
|
<Style TargetType="GroupBox">
|
|
<Setter Property="Foreground" Value="#FFDDDDDD"/>
|
|
<Setter Property="FontSize" Value="14"/>
|
|
<Setter Property="Margin" Value="0,0,0,20"/>
|
|
<Setter Property="SnapsToDevicePixels" Value="True"/>
|
|
<Setter Property="UseLayoutRounding" Value="True"/>
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="GroupBox">
|
|
<Grid SnapsToDevicePixels="True">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="6"/>
|
|
<ColumnDefinition Width="Auto"/>
|
|
<ColumnDefinition Width="*"/>
|
|
<ColumnDefinition Width="6"/>
|
|
</Grid.ColumnDefinitions>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="Auto"/>
|
|
<RowDefinition Height="*"/>
|
|
<RowDefinition Height="6"/>
|
|
</Grid.RowDefinitions>
|
|
<Border BorderBrush="Transparent" BorderThickness="1" Background="{TemplateBinding Background}" Grid.ColumnSpan="4" Grid.Column="0" CornerRadius="0" Grid.Row="1" Grid.RowSpan="3"/>
|
|
<Border BorderBrush="#FF9C9C9C" Grid.ColumnSpan="4" CornerRadius="0" Grid.Row="1" Grid.RowSpan="3" BorderThickness="1">
|
|
<Border.OpacityMask>
|
|
<MultiBinding ConverterParameter="7" UpdateSourceTrigger="Default">
|
|
<MultiBinding.Converter>
|
|
<BorderGapMaskConverter/>
|
|
</MultiBinding.Converter>
|
|
<Binding ElementName="Header" Path="ActualWidth"/>
|
|
<Binding Path="ActualWidth" RelativeSource="{RelativeSource Self}"/>
|
|
<Binding Path="ActualHeight" RelativeSource="{RelativeSource Self}"/>
|
|
</MultiBinding>
|
|
</Border.OpacityMask>
|
|
<Border CornerRadius="0" BorderBrush="#FF9C9C9C" BorderThickness="1"/>
|
|
</Border>
|
|
<Border x:Name="Header" Grid.Column="1" Padding="3,1,3,0" Grid.Row="0" Grid.RowSpan="2">
|
|
<ContentPresenter ContentTemplate="{TemplateBinding HeaderTemplate}" Content="{TemplateBinding Header}" ContentStringFormat="{TemplateBinding HeaderStringFormat}" ContentSource="Header" RecognizesAccessKey="True"/>
|
|
</Border>
|
|
<ContentPresenter Grid.ColumnSpan="2" ContentTemplate="{TemplateBinding ContentTemplate}" Content="{TemplateBinding Content}" Grid.Column="1" ContentStringFormat="{TemplateBinding ContentStringFormat}" Margin="{TemplateBinding Padding}" Grid.Row="2"/>
|
|
</Grid>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
|
|
<Thickness x:Key="Item">0,0,0,6</Thickness>
|
|
</Grid.Resources>
|
|
|
|
<StackPanel>
|
|
<GroupBox Header="{Binding Language[Settings.Group.UserInterface]}">
|
|
<StackPanel Style="{StaticResource StackPanelSub}">
|
|
<DockPanel LastChildFill="True" Margin="{StaticResource Item}">
|
|
<TextBlock ToolTip="{Binding Language[Settings.Label.Language.Tooltip]}" Style="{StaticResource LabelBlock}" Text="{Binding Language[Settings.Label.Language]}"/>
|
|
<ComboBox ItemsSource="{Binding Source={x:Static sys:SettingsData.LanguageList}}" SelectedItem="{Binding Language}" DisplayMemberPath="LangName"/>
|
|
</DockPanel>
|
|
<DockPanel LastChildFill="True" Margin="{StaticResource Item}">
|
|
<TextBlock ToolTip="{Binding Language[Settings.Label.DateFormat.Tooltip]}" Style="{StaticResource LabelBlock}" Text="{Binding Language[Settings.Label.DateFormat]}"/>
|
|
<ComboBox ItemsSource="{Binding Source={x:Static sys:SettingsData.DateFormatList}}" SelectedItem="{Binding DateFormat}" DisplayMemberPath="Display"/>
|
|
</DockPanel>
|
|
<DockPanel LastChildFill="True" Margin="{StaticResource Item}">
|
|
<TextBlock ToolTip="{Binding Language[Settings.Label.Theme.Tooltip]}" Style="{StaticResource LabelBlock}" Text="{Binding Language[Settings.Label.Theme]}"/>
|
|
<ComboBox>
|
|
<ComboBoxItem IsSelected="True">Dark</ComboBoxItem>
|
|
<ComboBoxItem>Bright</ComboBoxItem>
|
|
</ComboBox>
|
|
</DockPanel>
|
|
</StackPanel>
|
|
</GroupBox>
|
|
|
|
<GroupBox Header="{Binding Language[Settings.Group.Advanced]}">
|
|
<StackPanel Style="{StaticResource StackPanelSub}">
|
|
<CheckBox ToolTip="{Binding Language[Settings.Check.Preload.Tooltip]}" Content="{Binding Language[Settings.Check.Preload]}"/>
|
|
<CheckBox ToolTip="{Binding Language[Settings.Check.ExplorerIntegration.Tooltip]}" IsChecked="{Binding ExplorerIntegration}" Content="{Binding Language[Settings.Check.ExplorerIntegration]}"/>
|
|
<DockPanel LastChildFill="True" Margin="0,4,0,0">
|
|
<TextBlock ToolTip="" Style="{StaticResource LabelBlock}" Text="{Binding Language[Settings.Label.ExplorerLabel]}"/>
|
|
<TextBox Text="{Binding ExplorerLabel, UpdateSourceTrigger=PropertyChanged}"></TextBox>
|
|
</DockPanel>
|
|
</StackPanel>
|
|
</GroupBox>
|
|
</StackPanel>
|
|
|
|
<StackPanel Grid.Column="1">
|
|
<GroupBox Header="{Binding Language[Settings.Group.Backup]}">
|
|
<StackPanel Style="{StaticResource StackPanelSub}">
|
|
<DockPanel LastChildFill="True" Margin="{StaticResource Item}">
|
|
<TextBlock ToolTip="{Binding Language[Settings.Label.WindowClose.Tooltip]}" Style="{StaticResource LabelBlock}" Text="{Binding Language[Settings.Label.WindowClose]}"/>
|
|
<ComboBox ItemsSource="{Binding Source={x:Static sys:SettingsData.WindowCloseList}}" SelectedItem="{Binding WindowCloseTime}" DisplayMemberPath="Display"/>
|
|
</DockPanel>
|
|
<DockPanel LastChildFill="True" Margin="{StaticResource Item}">
|
|
<TextBlock ToolTip="{Binding Language[Settings.Label.ReportsKept.Tooltip]}" Style="{StaticResource LabelBlock}" Text="{Binding Language[Settings.Label.ReportsKept]}"/>
|
|
<ComboBox ItemsSource="{Binding Source={x:Static sys:SettingsData.HistoryKeptList}}" SelectedItem="{Binding HistoryEntriesKept}" DisplayMemberPath="Display" SelectionChanged="HistoryEntriesKeptChanged"/>
|
|
</DockPanel>
|
|
<CheckBox ToolTip="{Binding Language[Settings.Check.SaveEmptyReports.Tooltip]}" IsChecked="{Binding SaveHistoryWithNoEntries}" Content="{Binding Language[Settings.Check.SaveEmptyReports]}"/>
|
|
</StackPanel>
|
|
</GroupBox>
|
|
</StackPanel>
|
|
</Grid>
|
|
|
|
<TextBlock Text="{Binding Language[Settings.Hint]}" HorizontalAlignment="Left" Grid.Row="2" VerticalAlignment="Center" Foreground="#FFB9B9B9" Margin="12,0,0,0"/>
|
|
</Grid>
|
|
</Page>
|