Refine dialog layouts and presentation
This commit is contained in:
parent
d737cd2199
commit
5e99cb6f02
@ -74,6 +74,9 @@
|
|||||||
<Setter Property="Foreground" Value="{DynamicResource HyperlinkNew}"/>
|
<Setter Property="Foreground" Value="{DynamicResource HyperlinkNew}"/>
|
||||||
<Setter Property="ForegroundVisited" Value="{DynamicResource HyperlinkVisited}"/>
|
<Setter Property="ForegroundVisited" Value="{DynamicResource HyperlinkVisited}"/>
|
||||||
</Style>
|
</Style>
|
||||||
|
<Style Selector="Button">
|
||||||
|
<Setter Property="VerticalContentAlignment" Value="Center"/>
|
||||||
|
</Style>
|
||||||
</Application.Styles>
|
</Application.Styles>
|
||||||
|
|
||||||
<NativeMenu.Menu>
|
<NativeMenu.Menu>
|
||||||
|
|||||||
@ -24,7 +24,7 @@
|
|||||||
Name="combo"
|
Name="combo"
|
||||||
MinHeight="{Binding #displayPathTbox.MinHeight}"
|
MinHeight="{Binding #displayPathTbox.MinHeight}"
|
||||||
SelectedItem="{Binding $parent[1].SelectedDirectory, Mode=TwoWay}"
|
SelectedItem="{Binding $parent[1].SelectedDirectory, Mode=TwoWay}"
|
||||||
Items="{Binding $parent[1].KnownDirectories}">
|
ItemsSource="{Binding $parent[1].KnownDirectories}">
|
||||||
<ComboBox.ItemTemplate>
|
<ComboBox.ItemTemplate>
|
||||||
<DataTemplate>
|
<DataTemplate>
|
||||||
<TextBlock Text="{Binding Converter={StaticResource KnownDirectoryConverter}}" />
|
<TextBlock Text="{Binding Converter={StaticResource KnownDirectoryConverter}}" />
|
||||||
|
|||||||
@ -3,46 +3,53 @@
|
|||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
xmlns:controls="clr-namespace:LibationAvalonia.Controls"
|
xmlns:controls="clr-namespace:LibationAvalonia.Controls"
|
||||||
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
mc:Ignorable="d" d:DesignWidth="200" d:DesignHeight="200"
|
||||||
x:Class="LibationAvalonia.Controls.GroupBox">
|
x:Class="LibationAvalonia.Controls.GroupBox">
|
||||||
|
|
||||||
<ContentControl.Styles>
|
<ContentControl.Styles>
|
||||||
<Style Selector="controls|GroupBox Border">
|
|
||||||
<Setter Property="BorderBrush" Value="DarkGray" />
|
|
||||||
</Style>
|
|
||||||
<Style Selector="controls|GroupBox">
|
<Style Selector="controls|GroupBox">
|
||||||
|
<Setter Property="BorderBrush" Value="{DynamicResource SystemBaseMediumLowColor}" />
|
||||||
|
<Setter Property="BorderThickness" Value="1" />
|
||||||
|
<Setter Property="CornerRadius" Value="3" />
|
||||||
<Setter Property="Template">
|
<Setter Property="Template">
|
||||||
<ControlTemplate>
|
<ControlTemplate>
|
||||||
<Grid ColumnDefinitions="Auto,*,Auto" RowDefinitions="8,12,*,Auto">
|
<Grid ColumnDefinitions="Auto,Auto,*,Auto" RowDefinitions="Auto,*,Auto">
|
||||||
|
<Panel
|
||||||
|
Name="PART_LabelOffsetter"
|
||||||
|
Grid.Column="1"
|
||||||
|
Margin="8,9,0,0" />
|
||||||
<Grid
|
<Grid
|
||||||
ZIndex="1"
|
ZIndex="1"
|
||||||
Grid.Row="0"
|
Grid.Row="0"
|
||||||
Grid.RowSpan="2"
|
Grid.RowSpan="2"
|
||||||
Grid.Column="1" Margin="8,0,0,0"
|
Grid.Column="2"
|
||||||
ColumnDefinitions="Auto,*"
|
ColumnDefinitions="Auto,*"
|
||||||
VerticalAlignment="Top">
|
VerticalAlignment="Top">
|
||||||
<TextBlock
|
<TextBlock
|
||||||
Padding="4,0,4,0"
|
Name="PART_Label"
|
||||||
|
Padding="4,0"
|
||||||
Background="{DynamicResource SystemAltHighColor}"
|
Background="{DynamicResource SystemAltHighColor}"
|
||||||
Text="{TemplateBinding Label}"
|
Text="{TemplateBinding Label}"
|
||||||
/>
|
/>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
<ContentPresenter
|
<ContentPresenter
|
||||||
Margin="8,0,8,5"
|
Name="PART_ContentPresenter"
|
||||||
Grid.Row="2"
|
Margin="8,10,8,5"
|
||||||
|
Grid.Row="1"
|
||||||
Grid.Column="1"
|
Grid.Column="1"
|
||||||
|
Grid.ColumnSpan="2"
|
||||||
Content="{TemplateBinding Content}"/>
|
Content="{TemplateBinding Content}"/>
|
||||||
|
|
||||||
<Border
|
<Border
|
||||||
BorderBrush="DarkGray"
|
Name="PART_Border"
|
||||||
BorderThickness="{TemplateBinding BorderWidth}"
|
BorderBrush="{TemplateBinding BorderBrush}"
|
||||||
CornerRadius="3"
|
BorderThickness="{TemplateBinding BorderThickness}"
|
||||||
|
CornerRadius="{TemplateBinding CornerRadius}"
|
||||||
Grid.Column="0"
|
Grid.Column="0"
|
||||||
Grid.ColumnSpan="3"
|
Grid.ColumnSpan="4"
|
||||||
Grid.Row="1"
|
Grid.Row="1"
|
||||||
Grid.RowSpan="3"/>
|
Grid.RowSpan="2"/>
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
</ControlTemplate>
|
</ControlTemplate>
|
||||||
|
|||||||
@ -1,27 +1,19 @@
|
|||||||
using Avalonia;
|
using Avalonia;
|
||||||
using Avalonia.Controls;
|
using Avalonia.Controls;
|
||||||
|
using Avalonia.Styling;
|
||||||
|
|
||||||
namespace LibationAvalonia.Controls
|
namespace LibationAvalonia.Controls
|
||||||
{
|
{
|
||||||
public partial class GroupBox : ContentControl
|
public partial class GroupBox : ContentControl
|
||||||
{
|
{
|
||||||
|
|
||||||
public static readonly StyledProperty<Thickness> BorderWidthProperty =
|
|
||||||
AvaloniaProperty.Register<GroupBox, Thickness>(nameof(BorderWidth));
|
|
||||||
|
|
||||||
public static readonly StyledProperty<string> LabelProperty =
|
public static readonly StyledProperty<string> LabelProperty =
|
||||||
AvaloniaProperty.Register<GroupBox, string>(nameof(Label));
|
AvaloniaProperty.Register<GroupBox, string>(nameof(Label));
|
||||||
public GroupBox()
|
public GroupBox()
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
BorderWidth = new Thickness(3);
|
|
||||||
Label = "This is a groupbox label";
|
Label = "This is a groupbox label";
|
||||||
}
|
}
|
||||||
public Thickness BorderWidth
|
|
||||||
{
|
|
||||||
get { return GetValue(BorderWidthProperty); }
|
|
||||||
set { SetValue(BorderWidthProperty, value); }
|
|
||||||
}
|
|
||||||
|
|
||||||
public string Label
|
public string Label
|
||||||
{
|
{
|
||||||
|
|||||||
@ -2,30 +2,36 @@
|
|||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
mc:Ignorable="d" d:DesignWidth="850" d:DesignHeight="600"
|
mc:Ignorable="d" d:DesignWidth="750" d:DesignHeight="600"
|
||||||
xmlns:controls="clr-namespace:LibationAvalonia.Controls"
|
xmlns:controls="clr-namespace:LibationAvalonia.Controls"
|
||||||
xmlns:vm="clr-namespace:LibationAvalonia.ViewModels.Settings"
|
xmlns:vm="clr-namespace:LibationAvalonia.ViewModels.Settings"
|
||||||
x:DataType="vm:AudioSettingsVM"
|
x:DataType="vm:AudioSettingsVM"
|
||||||
x:Class="LibationAvalonia.Controls.Settings.Audio">
|
x:Class="LibationAvalonia.Controls.Settings.Audio">
|
||||||
|
|
||||||
<Grid
|
<Grid
|
||||||
RowDefinitions="*,Auto"
|
Margin="5"
|
||||||
|
RowDefinitions="Auto,*,Auto"
|
||||||
ColumnDefinitions="*,*">
|
ColumnDefinitions="*,*">
|
||||||
|
|
||||||
|
<Grid.Styles>
|
||||||
|
<Style Selector="CheckBox">
|
||||||
|
<Setter Property="Margin" Value="0,0,0,5" />
|
||||||
|
<Style Selector="^ > TextBlock">
|
||||||
|
<Setter Property="TextWrapping" Value="Wrap" />
|
||||||
|
</Style>
|
||||||
|
</Style>
|
||||||
|
<Style Selector="RadioButton">
|
||||||
|
<Setter Property="Margin" Value="0,0,0,5" />
|
||||||
|
<Style Selector="^ TextBlock">
|
||||||
|
<Setter Property="TextWrapping" Value="Wrap" />
|
||||||
|
</Style>
|
||||||
|
</Style>
|
||||||
|
</Grid.Styles>
|
||||||
|
|
||||||
<StackPanel
|
<StackPanel
|
||||||
Margin="5"
|
|
||||||
Grid.Row="0"
|
Grid.Row="0"
|
||||||
Grid.Column="0">
|
Grid.Column="0">
|
||||||
|
|
||||||
<StackPanel.Styles>
|
|
||||||
<Style Selector="CheckBox">
|
|
||||||
<Setter Property="Margin" Value="0,0,0,5" />
|
|
||||||
<Style Selector="^ > TextBlock">
|
|
||||||
<Setter Property="TextWrapping" Value="Wrap" />
|
|
||||||
</Style>
|
|
||||||
</Style>
|
|
||||||
</StackPanel.Styles>
|
|
||||||
|
|
||||||
<CheckBox IsChecked="{CompiledBinding CreateCueSheet, Mode=TwoWay}">
|
<CheckBox IsChecked="{CompiledBinding CreateCueSheet, Mode=TwoWay}">
|
||||||
<TextBlock Text="{CompiledBinding CreateCueSheetText}" />
|
<TextBlock Text="{CompiledBinding CreateCueSheetText}" />
|
||||||
</CheckBox>
|
</CheckBox>
|
||||||
@ -34,19 +40,18 @@
|
|||||||
<TextBlock Text="{CompiledBinding DownloadCoverArtText}" />
|
<TextBlock Text="{CompiledBinding DownloadCoverArtText}" />
|
||||||
</CheckBox>
|
</CheckBox>
|
||||||
|
|
||||||
<StackPanel Orientation="Horizontal">
|
<Grid ColumnDefinitions="*,Auto">
|
||||||
|
|
||||||
<CheckBox IsChecked="{CompiledBinding DownloadClipsBookmarks, Mode=TwoWay}">
|
<CheckBox IsChecked="{CompiledBinding DownloadClipsBookmarks, Mode=TwoWay}">
|
||||||
<TextBlock Text="Download Clips, Notes and Bookmarks as" />
|
<TextBlock Text="Download Clips, Notes and Bookmarks as" />
|
||||||
</CheckBox>
|
</CheckBox>
|
||||||
|
|
||||||
<controls:WheelComboBox
|
<controls:WheelComboBox
|
||||||
Margin="5,0,0,0"
|
Margin="5,0,0,0"
|
||||||
|
Grid.Column="1"
|
||||||
IsEnabled="{CompiledBinding DownloadClipsBookmarks}"
|
IsEnabled="{CompiledBinding DownloadClipsBookmarks}"
|
||||||
Items="{CompiledBinding ClipBookmarkFormats}"
|
ItemsSource="{CompiledBinding ClipBookmarkFormats}"
|
||||||
SelectedItem="{CompiledBinding ClipBookmarkFormat}"/>
|
SelectedItem="{CompiledBinding ClipBookmarkFormat}"/>
|
||||||
|
</Grid>
|
||||||
</StackPanel>
|
|
||||||
|
|
||||||
<CheckBox IsChecked="{CompiledBinding RetainAaxFile, Mode=TwoWay}">
|
<CheckBox IsChecked="{CompiledBinding RetainAaxFile, Mode=TwoWay}">
|
||||||
<TextBlock Text="{CompiledBinding RetainAaxFileText}" />
|
<TextBlock Text="{CompiledBinding RetainAaxFileText}" />
|
||||||
@ -59,211 +64,137 @@
|
|||||||
<CheckBox IsChecked="{CompiledBinding AllowLibationFixup, Mode=TwoWay}">
|
<CheckBox IsChecked="{CompiledBinding AllowLibationFixup, Mode=TwoWay}">
|
||||||
<TextBlock Text="{CompiledBinding AllowLibationFixupText}" />
|
<TextBlock Text="{CompiledBinding AllowLibationFixupText}" />
|
||||||
</CheckBox>
|
</CheckBox>
|
||||||
|
</StackPanel>
|
||||||
|
|
||||||
<controls:GroupBox
|
<controls:GroupBox
|
||||||
BorderWidth="1"
|
Grid.Row="1"
|
||||||
Label="Audiobook Fix-ups"
|
Label="Audiobook Fix-ups"
|
||||||
IsEnabled="{CompiledBinding AllowLibationFixup}">
|
IsEnabled="{CompiledBinding AllowLibationFixup}">
|
||||||
|
|
||||||
<StackPanel Orientation="Vertical">
|
<StackPanel Orientation="Vertical">
|
||||||
|
|
||||||
<CheckBox IsChecked="{CompiledBinding SplitFilesByChapter, Mode=TwoWay}">
|
<CheckBox IsChecked="{CompiledBinding SplitFilesByChapter, Mode=TwoWay}">
|
||||||
<TextBlock Text="{CompiledBinding SplitFilesByChapterText}" />
|
<TextBlock Text="{CompiledBinding SplitFilesByChapterText}" />
|
||||||
</CheckBox>
|
</CheckBox>
|
||||||
|
|
||||||
<CheckBox IsChecked="{CompiledBinding StripAudibleBrandAudio, Mode=TwoWay}">
|
<CheckBox IsChecked="{CompiledBinding StripAudibleBrandAudio, Mode=TwoWay}">
|
||||||
<TextBlock Text="{CompiledBinding StripAudibleBrandingText}" />
|
<TextBlock Text="{CompiledBinding StripAudibleBrandingText}" />
|
||||||
</CheckBox>
|
</CheckBox>
|
||||||
|
|
||||||
<CheckBox IsChecked="{CompiledBinding StripUnabridged, Mode=TwoWay}">
|
<CheckBox IsChecked="{CompiledBinding StripUnabridged, Mode=TwoWay}">
|
||||||
<TextBlock Text="{CompiledBinding StripUnabridgedText}" />
|
<TextBlock Text="{CompiledBinding StripUnabridgedText}" />
|
||||||
</CheckBox>
|
</CheckBox>
|
||||||
|
|
||||||
<RadioButton IsChecked="{CompiledBinding !DecryptToLossy, Mode=TwoWay}">
|
<RadioButton IsChecked="{CompiledBinding !DecryptToLossy, Mode=TwoWay}">
|
||||||
|
|
||||||
<StackPanel >
|
<StackPanel VerticalAlignment="Center">
|
||||||
|
|
||||||
<TextBlock
|
<TextBlock
|
||||||
TextWrapping="Wrap"
|
Text="Download my books in the original audio format (Lossless)" />
|
||||||
Text="Download my books in the original audio format (Lossless)" />
|
<CheckBox
|
||||||
<CheckBox
|
IsEnabled="{CompiledBinding !DecryptToLossy}"
|
||||||
IsEnabled="{CompiledBinding !DecryptToLossy}"
|
IsChecked="{CompiledBinding MoveMoovToBeginning, Mode=TwoWay}">
|
||||||
IsChecked="{CompiledBinding MoveMoovToBeginning, Mode=TwoWay}">
|
|
||||||
|
|
||||||
<TextBlock Text="{CompiledBinding MoveMoovToBeginningText}" />
|
<TextBlock Text="{CompiledBinding MoveMoovToBeginningText}" />
|
||||||
|
|
||||||
</CheckBox>
|
</CheckBox>
|
||||||
|
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</RadioButton>
|
</RadioButton>
|
||||||
|
|
||||||
<RadioButton
|
<RadioButton IsChecked="{CompiledBinding DecryptToLossy, Mode=TwoWay}">
|
||||||
Margin="0,5,0,5"
|
|
||||||
IsChecked="{CompiledBinding DecryptToLossy, Mode=TwoWay}">
|
<TextBlock
|
||||||
|
TextWrapping="Wrap"
|
||||||
|
Text="Download my books as .MP3 files (transcode if necessary)" />
|
||||||
|
|
||||||
|
</RadioButton>
|
||||||
|
</StackPanel>
|
||||||
|
</controls:GroupBox>
|
||||||
|
|
||||||
|
<controls:GroupBox
|
||||||
|
Grid.Column="1"
|
||||||
|
Grid.RowSpan="2"
|
||||||
|
Margin="10,0,0,0"
|
||||||
|
Label="Mp3 Encoding Options">
|
||||||
|
|
||||||
|
<Grid RowDefinitions="Auto,Auto,Auto,Auto,*">
|
||||||
|
|
||||||
|
<Grid
|
||||||
|
Margin="0,5"
|
||||||
|
ColumnDefinitions="Auto,*">
|
||||||
|
|
||||||
|
<controls:GroupBox
|
||||||
|
Grid.Column="0"
|
||||||
|
Label="Target">
|
||||||
|
|
||||||
|
<Grid ColumnDefinitions="Auto,Auto">
|
||||||
|
<RadioButton
|
||||||
|
Margin="5"
|
||||||
|
Content="Bitrate"
|
||||||
|
IsChecked="{CompiledBinding LameTargetBitrate, Mode=TwoWay}"/>
|
||||||
|
|
||||||
|
<RadioButton
|
||||||
|
Grid.Column="1"
|
||||||
|
Margin="5"
|
||||||
|
Content="Quality"
|
||||||
|
IsChecked="{CompiledBinding !LameTargetBitrate, Mode=TwoWay}"/>
|
||||||
|
</Grid>
|
||||||
|
</controls:GroupBox>
|
||||||
|
|
||||||
|
<CheckBox
|
||||||
|
HorizontalAlignment="Right"
|
||||||
|
Grid.Column="1"
|
||||||
|
IsChecked="{CompiledBinding LameDownsampleMono, Mode=TwoWay}">
|
||||||
|
|
||||||
<TextBlock
|
<TextBlock
|
||||||
TextWrapping="Wrap"
|
TextWrapping="Wrap"
|
||||||
Text="Download my books as .MP3 files (transcode if necessary)" />
|
Text="Downsample to mono? (Recommended)" />
|
||||||
|
|
||||||
</RadioButton>
|
</CheckBox>
|
||||||
</StackPanel>
|
</Grid>
|
||||||
</controls:GroupBox>
|
|
||||||
</StackPanel>
|
|
||||||
|
|
||||||
<StackPanel
|
<Grid Grid.Row="1" Margin="0,5" RowDefinitions="Auto,Auto" ColumnDefinitions="Auto,*,Auto">
|
||||||
Grid.Row="0"
|
|
||||||
Grid.Column="1">
|
|
||||||
|
|
||||||
<controls:GroupBox
|
<TextBlock Margin="0,0,0,5" Text="Max audio sample rate:" />
|
||||||
BorderWidth="1"
|
<controls:WheelComboBox
|
||||||
Label="Mp3 Encoding Options">
|
Grid.Row="1"
|
||||||
|
HorizontalAlignment="Stretch"
|
||||||
|
ItemsSource="{CompiledBinding SampleRates}"
|
||||||
|
SelectedItem="{CompiledBinding SelectedSampleRate, Mode=TwoWay}"/>
|
||||||
|
|
||||||
<StackPanel Orientation="Vertical">
|
<TextBlock Margin="0,0,0,5" Grid.Column="2" Text="Encoder Quality:" />
|
||||||
|
|
||||||
<Grid
|
<controls:WheelComboBox
|
||||||
Margin="5,5,5,0"
|
Grid.Column="2"
|
||||||
ColumnDefinitions="Auto,*">
|
Grid.Row="1"
|
||||||
|
HorizontalAlignment="Stretch"
|
||||||
|
ItemsSource="{CompiledBinding EncoderQualities}"
|
||||||
|
SelectedItem="{CompiledBinding SelectedEncoderQuality, Mode=TwoWay}"/>
|
||||||
|
</Grid>
|
||||||
|
|
||||||
<controls:GroupBox
|
<controls:GroupBox
|
||||||
BorderWidth="1"
|
Grid.Row="2"
|
||||||
Grid.Column="0"
|
Margin="0,5"
|
||||||
Label="Target">
|
Label="Bitrate"
|
||||||
|
IsEnabled="{CompiledBinding LameTargetBitrate}" >
|
||||||
|
|
||||||
<StackPanel Orientation="Horizontal">
|
<StackPanel>
|
||||||
|
<Grid ColumnDefinitions="*,25,Auto">
|
||||||
<RadioButton
|
|
||||||
Margin="10"
|
|
||||||
Content="Bitrate"
|
|
||||||
IsChecked="{CompiledBinding LameTargetBitrate, Mode=TwoWay}"/>
|
|
||||||
|
|
||||||
<RadioButton
|
|
||||||
Margin="10"
|
|
||||||
Content="Quality"
|
|
||||||
IsChecked="{CompiledBinding !LameTargetBitrate, Mode=TwoWay}"/>
|
|
||||||
|
|
||||||
</StackPanel>
|
|
||||||
</controls:GroupBox>
|
|
||||||
|
|
||||||
<CheckBox
|
|
||||||
HorizontalAlignment="Right"
|
|
||||||
Grid.Column="1"
|
|
||||||
IsChecked="{CompiledBinding LameDownsampleMono, Mode=TwoWay}">
|
|
||||||
|
|
||||||
<TextBlock
|
|
||||||
TextWrapping="Wrap"
|
|
||||||
Text="Downsample to mono? (Recommended)" />
|
|
||||||
|
|
||||||
</CheckBox>
|
|
||||||
</Grid>
|
|
||||||
|
|
||||||
<Grid Margin="5,5,5,0" RowDefinitions="Auto,Auto" ColumnDefinitions="Auto,*,Auto">
|
|
||||||
|
|
||||||
<TextBlock Margin="0,0,0,5" Text="Max audio sample rate:" />
|
|
||||||
<controls:WheelComboBox
|
|
||||||
Grid.Row="1"
|
|
||||||
HorizontalAlignment="Stretch"
|
|
||||||
Items="{CompiledBinding SampleRates}"
|
|
||||||
SelectedItem="{CompiledBinding SelectedSampleRate, Mode=TwoWay}"/>
|
|
||||||
|
|
||||||
<TextBlock Margin="0,0,0,5" Grid.Column="2" Text="Encoder Quality:" />
|
|
||||||
|
|
||||||
<controls:WheelComboBox
|
|
||||||
Grid.Column="2"
|
|
||||||
Grid.Row="1"
|
|
||||||
HorizontalAlignment="Stretch"
|
|
||||||
Items="{CompiledBinding EncoderQualities}"
|
|
||||||
SelectedItem="{CompiledBinding SelectedEncoderQuality, Mode=TwoWay}"/>
|
|
||||||
</Grid>
|
|
||||||
|
|
||||||
<controls:GroupBox
|
|
||||||
Margin="5,5,5,0"
|
|
||||||
BorderWidth="1"
|
|
||||||
Label="Bitrate"
|
|
||||||
IsEnabled="{CompiledBinding LameTargetBitrate}" >
|
|
||||||
|
|
||||||
<StackPanel>
|
|
||||||
|
|
||||||
<Grid ColumnDefinitions="*,25,Auto">
|
|
||||||
|
|
||||||
<Slider
|
|
||||||
Grid.Column="0"
|
|
||||||
IsEnabled="{CompiledBinding !LameMatchSource}"
|
|
||||||
Value="{CompiledBinding LameBitrate, Mode=TwoWay}"
|
|
||||||
Minimum="16"
|
|
||||||
Maximum="320"
|
|
||||||
IsSnapToTickEnabled="True" TickFrequency="16"
|
|
||||||
Ticks="16,32,48,64,80,96,112,128,144,160,176,192,208,224,240,256,272,288,304,320"
|
|
||||||
TickPlacement="Outside">
|
|
||||||
|
|
||||||
<Slider.Styles>
|
|
||||||
<Style Selector="Slider /template/ Thumb">
|
|
||||||
<Setter Property="ToolTip.Tip" Value="{CompiledBinding $parent[Slider].Value, Mode=OneWay, StringFormat='\{0:f0\} Kbps'}" />
|
|
||||||
<Setter Property="ToolTip.Placement" Value="Top" />
|
|
||||||
<Setter Property="ToolTip.VerticalOffset" Value="-10" />
|
|
||||||
<Setter Property="ToolTip.HorizontalOffset" Value="-30" />
|
|
||||||
</Style>
|
|
||||||
</Slider.Styles>
|
|
||||||
</Slider>
|
|
||||||
|
|
||||||
<TextBlock
|
|
||||||
Grid.Column="1"
|
|
||||||
HorizontalAlignment="Right"
|
|
||||||
Text="{CompiledBinding LameBitrate}" />
|
|
||||||
|
|
||||||
<TextBlock
|
|
||||||
Grid.Column="2"
|
|
||||||
Text=" Kbps" />
|
|
||||||
|
|
||||||
</Grid>
|
|
||||||
|
|
||||||
<Grid ColumnDefinitions="*,*">
|
|
||||||
|
|
||||||
<CheckBox
|
|
||||||
Grid.Column="0"
|
|
||||||
IsChecked="{CompiledBinding LameConstantBitrate, Mode=TwoWay}">
|
|
||||||
|
|
||||||
<TextBlock
|
|
||||||
TextWrapping="Wrap"
|
|
||||||
Text="Restrict Encoder to Constant Bitrate?" />
|
|
||||||
|
|
||||||
</CheckBox>
|
|
||||||
|
|
||||||
<CheckBox
|
|
||||||
Grid.Column="1"
|
|
||||||
HorizontalAlignment="Right"
|
|
||||||
IsChecked="{CompiledBinding LameMatchSource, Mode=TwoWay}">
|
|
||||||
|
|
||||||
<TextBlock
|
|
||||||
TextWrapping="Wrap"
|
|
||||||
Text="Match Source Bitrate?" />
|
|
||||||
|
|
||||||
</CheckBox>
|
|
||||||
</Grid>
|
|
||||||
</StackPanel>
|
|
||||||
</controls:GroupBox>
|
|
||||||
|
|
||||||
<controls:GroupBox
|
|
||||||
Margin="5,5,5,0"
|
|
||||||
BorderWidth="1"
|
|
||||||
Label="Quality"
|
|
||||||
IsEnabled="{CompiledBinding !LameTargetBitrate}">
|
|
||||||
|
|
||||||
<Grid
|
|
||||||
ColumnDefinitions="*,*,25"
|
|
||||||
RowDefinitions="*,Auto">
|
|
||||||
|
|
||||||
<Slider
|
<Slider
|
||||||
Grid.Column="0"
|
Grid.Column="0"
|
||||||
Grid.ColumnSpan="2"
|
IsEnabled="{CompiledBinding !LameMatchSource}"
|
||||||
Value="{CompiledBinding LameVBRQuality, Mode=TwoWay}"
|
Value="{CompiledBinding LameBitrate, Mode=TwoWay}"
|
||||||
Minimum="0"
|
Minimum="16"
|
||||||
Maximum="9"
|
Maximum="320"
|
||||||
IsSnapToTickEnabled="True" TickFrequency="1"
|
IsSnapToTickEnabled="True" TickFrequency="16"
|
||||||
Ticks="0,1,2,3,4,5,6,7,8,9"
|
Ticks="16,32,48,64,80,96,112,128,144,160,176,192,208,224,240,256,272,288,304,320"
|
||||||
TickPlacement="Outside">
|
TickPlacement="Outside">
|
||||||
|
|
||||||
<Slider.Styles>
|
<Slider.Styles>
|
||||||
<Style Selector="Slider /template/ Thumb">
|
<Style Selector="Slider /template/ Thumb">
|
||||||
<Setter Property="ToolTip.Tip" Value="{CompiledBinding $parent[Slider].Value, Mode=OneWay, StringFormat='V\{0:f0\}'}" />
|
<Setter Property="ToolTip.Tip" Value="{CompiledBinding $parent[Slider].Value, Mode=OneWay, StringFormat='\{0:f0\} Kbps'}" />
|
||||||
<Setter Property="ToolTip.Placement" Value="Top" />
|
<Setter Property="ToolTip.Placement" Value="Top" />
|
||||||
<Setter Property="ToolTip.VerticalOffset" Value="-10" />
|
<Setter Property="ToolTip.VerticalOffset" Value="-10" />
|
||||||
<Setter Property="ToolTip.HorizontalOffset" Value="-30" />
|
<Setter Property="ToolTip.HorizontalOffset" Value="-30" />
|
||||||
@ -271,53 +202,116 @@
|
|||||||
</Slider.Styles>
|
</Slider.Styles>
|
||||||
</Slider>
|
</Slider>
|
||||||
|
|
||||||
<StackPanel
|
|
||||||
Grid.Column="2"
|
|
||||||
HorizontalAlignment="Right"
|
|
||||||
Orientation="Horizontal">
|
|
||||||
|
|
||||||
<TextBlock Text="V" />
|
|
||||||
<TextBlock Text="{CompiledBinding LameVBRQuality}" />
|
|
||||||
|
|
||||||
</StackPanel>
|
|
||||||
|
|
||||||
<TextBlock
|
|
||||||
Grid.Column="0"
|
|
||||||
Grid.Row="1"
|
|
||||||
Margin="10,0,0,0"
|
|
||||||
Text="Higher" />
|
|
||||||
|
|
||||||
<TextBlock
|
<TextBlock
|
||||||
Grid.Column="1"
|
Grid.Column="1"
|
||||||
Grid.Row="1"
|
|
||||||
Margin="0,0,10,0"
|
|
||||||
HorizontalAlignment="Right"
|
HorizontalAlignment="Right"
|
||||||
Text="Lower" />
|
Text="{CompiledBinding LameBitrate}" />
|
||||||
|
|
||||||
|
<TextBlock
|
||||||
|
Grid.Column="2"
|
||||||
|
Text=" Kbps" />
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
</controls:GroupBox>
|
|
||||||
|
|
||||||
<TextBlock
|
<Grid ColumnDefinitions="*,*">
|
||||||
Margin="5,5,5,5"
|
|
||||||
Text="Using L.A.M.E encoding engine"
|
|
||||||
FontStyle="Italic" />
|
|
||||||
|
|
||||||
</StackPanel>
|
<CheckBox
|
||||||
</controls:GroupBox>
|
Grid.Column="0"
|
||||||
</StackPanel>
|
IsChecked="{CompiledBinding LameConstantBitrate, Mode=TwoWay}">
|
||||||
|
|
||||||
|
<TextBlock
|
||||||
|
TextWrapping="Wrap"
|
||||||
|
Text="Restrict Encoder to Constant Bitrate?" />
|
||||||
|
|
||||||
|
</CheckBox>
|
||||||
|
|
||||||
|
<CheckBox
|
||||||
|
Grid.Column="1"
|
||||||
|
HorizontalAlignment="Right"
|
||||||
|
IsChecked="{CompiledBinding LameMatchSource, Mode=TwoWay}">
|
||||||
|
|
||||||
|
<TextBlock
|
||||||
|
TextWrapping="Wrap"
|
||||||
|
Text="Match Source Bitrate?" />
|
||||||
|
|
||||||
|
</CheckBox>
|
||||||
|
</Grid>
|
||||||
|
</StackPanel>
|
||||||
|
</controls:GroupBox>
|
||||||
|
|
||||||
|
<controls:GroupBox
|
||||||
|
Grid.Row="3"
|
||||||
|
Margin="0,5"
|
||||||
|
Label="Quality"
|
||||||
|
IsEnabled="{CompiledBinding !LameTargetBitrate}">
|
||||||
|
|
||||||
|
<Grid
|
||||||
|
ColumnDefinitions="*,Auto,25"
|
||||||
|
RowDefinitions="*,Auto">
|
||||||
|
|
||||||
|
<Slider
|
||||||
|
Grid.Column="0"
|
||||||
|
Grid.ColumnSpan="2"
|
||||||
|
Value="{CompiledBinding LameVBRQuality, Mode=TwoWay}"
|
||||||
|
Minimum="0"
|
||||||
|
Maximum="9"
|
||||||
|
IsSnapToTickEnabled="True" TickFrequency="1"
|
||||||
|
Ticks="0,1,2,3,4,5,6,7,8,9"
|
||||||
|
TickPlacement="Outside">
|
||||||
|
<Slider.Styles>
|
||||||
|
<Style Selector="Slider /template/ Thumb">
|
||||||
|
<Setter Property="ToolTip.Tip" Value="{CompiledBinding $parent[Slider].Value, Mode=OneWay, StringFormat='V\{0:f0\}'}" />
|
||||||
|
<Setter Property="ToolTip.Placement" Value="Top" />
|
||||||
|
<Setter Property="ToolTip.VerticalOffset" Value="-10" />
|
||||||
|
<Setter Property="ToolTip.HorizontalOffset" Value="-30" />
|
||||||
|
</Style>
|
||||||
|
</Slider.Styles>
|
||||||
|
</Slider>
|
||||||
|
|
||||||
|
<StackPanel
|
||||||
|
Grid.Column="2"
|
||||||
|
HorizontalAlignment="Right"
|
||||||
|
Orientation="Horizontal">
|
||||||
|
|
||||||
|
<TextBlock Text="V" />
|
||||||
|
<TextBlock Text="{CompiledBinding LameVBRQuality}" />
|
||||||
|
|
||||||
|
</StackPanel>
|
||||||
|
|
||||||
|
<TextBlock
|
||||||
|
Grid.Column="0"
|
||||||
|
Grid.Row="1"
|
||||||
|
Text="Higher" />
|
||||||
|
|
||||||
|
<TextBlock
|
||||||
|
Grid.Column="1"
|
||||||
|
Grid.Row="1"
|
||||||
|
HorizontalAlignment="Right"
|
||||||
|
Text="Lower" />
|
||||||
|
|
||||||
|
</Grid>
|
||||||
|
</controls:GroupBox>
|
||||||
|
|
||||||
|
<TextBlock
|
||||||
|
Grid.Row="4"
|
||||||
|
Margin="0,5"
|
||||||
|
VerticalAlignment="Bottom"
|
||||||
|
Foreground="{StaticResource SystemControlDisabledBaseMediumLowBrush}"
|
||||||
|
Text="Using L.A.M.E encoding engine"
|
||||||
|
FontStyle="Oblique" />
|
||||||
|
</Grid>
|
||||||
|
</controls:GroupBox>
|
||||||
|
|
||||||
<controls:GroupBox
|
<controls:GroupBox
|
||||||
Grid.Row="1"
|
Grid.Row="2"
|
||||||
Grid.ColumnSpan="2"
|
Grid.ColumnSpan="2"
|
||||||
Margin="5"
|
IsEnabled="{CompiledBinding SplitFilesByChapter}"
|
||||||
BorderWidth="1" IsEnabled="{CompiledBinding SplitFilesByChapter}"
|
|
||||||
Label="{CompiledBinding ChapterTitleTemplateText}">
|
Label="{CompiledBinding ChapterTitleTemplateText}">
|
||||||
|
|
||||||
<Grid ColumnDefinitions="*,Auto">
|
<Grid ColumnDefinitions="*,Auto" Margin="0,8" >
|
||||||
|
|
||||||
<TextBox
|
<TextBox
|
||||||
Grid.Column="0"
|
Grid.Column="0"
|
||||||
Margin="0,10,10,10"
|
|
||||||
FontSize="14"
|
FontSize="14"
|
||||||
IsReadOnly="True"
|
IsReadOnly="True"
|
||||||
Text="{CompiledBinding ChapterTitleTemplate}" />
|
Text="{CompiledBinding ChapterTitleTemplate}" />
|
||||||
@ -325,8 +319,9 @@
|
|||||||
<Button
|
<Button
|
||||||
Grid.Column="1"
|
Grid.Column="1"
|
||||||
Content="Edit"
|
Content="Edit"
|
||||||
Height="30"
|
Padding="30,0"
|
||||||
Padding="30,3,30,3"
|
Margin="10,0,0,0"
|
||||||
|
VerticalAlignment="Stretch"
|
||||||
Click="EditChapterTitleTemplateButton_Click" />
|
Click="EditChapterTitleTemplateButton_Click" />
|
||||||
</Grid>
|
</Grid>
|
||||||
</controls:GroupBox>
|
</controls:GroupBox>
|
||||||
|
|||||||
@ -12,7 +12,6 @@
|
|||||||
<controls:GroupBox
|
<controls:GroupBox
|
||||||
Grid.Row="0"
|
Grid.Row="0"
|
||||||
Margin="5"
|
Margin="5"
|
||||||
BorderWidth="1"
|
|
||||||
Label="{CompiledBinding BadBookGroupboxText}">
|
Label="{CompiledBinding BadBookGroupboxText}">
|
||||||
|
|
||||||
<Grid
|
<Grid
|
||||||
@ -68,7 +67,6 @@
|
|||||||
<controls:GroupBox
|
<controls:GroupBox
|
||||||
Margin="5"
|
Margin="5"
|
||||||
Grid.Row="1"
|
Grid.Row="1"
|
||||||
BorderWidth="1"
|
|
||||||
Label="Custom File Naming">
|
Label="Custom File Naming">
|
||||||
|
|
||||||
<Grid
|
<Grid
|
||||||
@ -83,7 +81,7 @@
|
|||||||
</Style>
|
</Style>
|
||||||
<Style Selector="Button">
|
<Style Selector="Button">
|
||||||
<Setter Property="VerticalAlignment" Value="Stretch" />
|
<Setter Property="VerticalAlignment" Value="Stretch" />
|
||||||
<Setter Property="Margin" Value="0,5,10,10" />
|
<Setter Property="Margin" Value="0,5,0,10" />
|
||||||
<Setter Property="Padding" Value="30,0" />
|
<Setter Property="Padding" Value="30,0" />
|
||||||
</Style>
|
</Style>
|
||||||
</Grid.Styles>
|
</Grid.Styles>
|
||||||
@ -150,14 +148,14 @@
|
|||||||
<controls:GroupBox
|
<controls:GroupBox
|
||||||
Grid.Row="2"
|
Grid.Row="2"
|
||||||
Margin="5"
|
Margin="5"
|
||||||
BorderWidth="1"
|
|
||||||
Label="Temporary Files Location">
|
Label="Temporary Files Location">
|
||||||
|
|
||||||
<StackPanel
|
<StackPanel
|
||||||
Margin="5" >
|
Margin="0,5" >
|
||||||
|
|
||||||
<TextBlock
|
<TextBlock
|
||||||
Margin="0,0,0,10"
|
Margin="0,0,0,10"
|
||||||
|
TextWrapping="Wrap"
|
||||||
Text="{CompiledBinding InProgressDescriptionText}" />
|
Text="{CompiledBinding InProgressDescriptionText}" />
|
||||||
|
|
||||||
<controls:DirectoryOrCustomSelectControl
|
<controls:DirectoryOrCustomSelectControl
|
||||||
|
|||||||
@ -12,7 +12,6 @@
|
|||||||
<controls:GroupBox
|
<controls:GroupBox
|
||||||
Grid.Row="0"
|
Grid.Row="0"
|
||||||
Margin="5"
|
Margin="5"
|
||||||
BorderWidth="1"
|
|
||||||
Label="Books Location">
|
Label="Books Location">
|
||||||
|
|
||||||
<StackPanel>
|
<StackPanel>
|
||||||
@ -43,15 +42,16 @@
|
|||||||
Text="Logging level" />
|
Text="Logging level" />
|
||||||
|
|
||||||
<controls:WheelComboBox
|
<controls:WheelComboBox
|
||||||
Width="150"
|
Width="120"
|
||||||
Height="25"
|
Height="25"
|
||||||
HorizontalContentAlignment="Stretch"
|
HorizontalContentAlignment="Stretch"
|
||||||
SelectedItem="{CompiledBinding LoggingLevel, Mode=TwoWay}"
|
SelectedItem="{CompiledBinding LoggingLevel, Mode=TwoWay}"
|
||||||
Items="{CompiledBinding LoggingLevels}" />
|
ItemsSource="{CompiledBinding LoggingLevels}" />
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
Margin="50,0,0,0"
|
Margin="50,0,0,0"
|
||||||
Padding="20,3,20,3"
|
Padding="20,0"
|
||||||
|
VerticalAlignment="Stretch"
|
||||||
Content="Open Log Folder"
|
Content="Open Log Folder"
|
||||||
Click="OpenLogFolderButton_Click" />
|
Click="OpenLogFolderButton_Click" />
|
||||||
|
|
||||||
@ -70,13 +70,15 @@
|
|||||||
|
|
||||||
<controls:WheelComboBox
|
<controls:WheelComboBox
|
||||||
Grid.Column="1"
|
Grid.Column="1"
|
||||||
SelectedItem="{CompiledBinding ThemeVariant, Mode=TwoWay}"
|
MinWidth="80"
|
||||||
Items="{CompiledBinding Themes}" />
|
SelectedItem="{CompiledBinding ThemeVariant, Mode=TwoWay}"
|
||||||
|
ItemsSource="{CompiledBinding Themes}"/>
|
||||||
|
|
||||||
<TextBlock
|
<TextBlock
|
||||||
Grid.Column="2"
|
Grid.Column="2"
|
||||||
FontSize="16"
|
FontSize="16"
|
||||||
FontWeight="Bold"
|
FontWeight="Bold"
|
||||||
Margin="10,0,0,0"
|
Margin="10,0"
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
IsVisible="{CompiledBinding SelectionChanged}"
|
IsVisible="{CompiledBinding SelectionChanged}"
|
||||||
Text="Theme change takes effect on restart"/>
|
Text="Theme change takes effect on restart"/>
|
||||||
|
|||||||
@ -40,7 +40,7 @@
|
|||||||
</Path>
|
</Path>
|
||||||
</Canvas>
|
</Canvas>
|
||||||
|
|
||||||
<controls:GroupBox Grid.Row="3" BorderWidth="2" Label="Acknowledgements" Grid.ColumnSpan="2">
|
<controls:GroupBox Grid.Row="3" Label="Acknowledgements" Grid.ColumnSpan="2">
|
||||||
<StackPanel>
|
<StackPanel>
|
||||||
|
|
||||||
<Grid ColumnDefinitions="Auto,*" RowDefinitions="Auto,Auto">
|
<Grid ColumnDefinitions="Auto,*" RowDefinitions="Auto,Auto">
|
||||||
|
|||||||
@ -81,7 +81,7 @@
|
|||||||
HorizontalContentAlignment = "Stretch"
|
HorizontalContentAlignment = "Stretch"
|
||||||
HorizontalAlignment = "Stretch"
|
HorizontalAlignment = "Stretch"
|
||||||
SelectedItem="{Binding SelectedLocale, Mode=TwoWay}"
|
SelectedItem="{Binding SelectedLocale, Mode=TwoWay}"
|
||||||
Items="{Binding Locales}">
|
ItemsSource="{Binding Locales}">
|
||||||
|
|
||||||
<ComboBox.ItemTemplate>
|
<ComboBox.ItemTemplate>
|
||||||
<DataTemplate>
|
<DataTemplate>
|
||||||
@ -113,14 +113,12 @@
|
|||||||
|
|
||||||
<Button
|
<Button
|
||||||
Grid.Column="0"
|
Grid.Column="0"
|
||||||
Height="30"
|
|
||||||
Content="Import from audible-cli"
|
Content="Import from audible-cli"
|
||||||
Click="ImportButton_Clicked" />
|
Click="ImportButton_Clicked" />
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
Grid.Column="1"
|
Grid.Column="1"
|
||||||
Height="30"
|
Padding="30,5"
|
||||||
Padding="30,3,30,3"
|
|
||||||
Content="Save"
|
Content="Save"
|
||||||
Click="SaveButton_Clicked" />
|
Click="SaveButton_Clicked" />
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|||||||
@ -45,7 +45,6 @@
|
|||||||
<controls:GroupBox
|
<controls:GroupBox
|
||||||
Label="Edit Tags"
|
Label="Edit Tags"
|
||||||
Grid.Row="1"
|
Grid.Row="1"
|
||||||
BorderWidth="1"
|
|
||||||
Margin="10,0,10,0">
|
Margin="10,0,10,0">
|
||||||
|
|
||||||
<StackPanel Orientation="Vertical">
|
<StackPanel Orientation="Vertical">
|
||||||
@ -63,7 +62,6 @@
|
|||||||
<controls:GroupBox
|
<controls:GroupBox
|
||||||
Label="Liberated status: Whether the book/pdf has been downloaded"
|
Label="Liberated status: Whether the book/pdf has been downloaded"
|
||||||
Grid.Row="2"
|
Grid.Row="2"
|
||||||
BorderWidth="1"
|
|
||||||
Margin="10,10,10,10">
|
Margin="10,10,10,10">
|
||||||
|
|
||||||
<StackPanel Orientation="Vertical">
|
<StackPanel Orientation="Vertical">
|
||||||
@ -95,7 +93,7 @@
|
|||||||
Height="25"
|
Height="25"
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
SelectedItem="{Binding BookLiberatedSelectedItem, Mode=TwoWay}"
|
SelectedItem="{Binding BookLiberatedSelectedItem, Mode=TwoWay}"
|
||||||
Items="{Binding BookLiberatedItems}">
|
ItemsSource="{Binding BookLiberatedItems}">
|
||||||
|
|
||||||
<ComboBox.ItemTemplate>
|
<ComboBox.ItemTemplate>
|
||||||
<DataTemplate>
|
<DataTemplate>
|
||||||
@ -117,7 +115,7 @@
|
|||||||
Width="150"
|
Width="150"
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
SelectedItem="{Binding PdfLiberatedSelectedItem, Mode=TwoWay}"
|
SelectedItem="{Binding PdfLiberatedSelectedItem, Mode=TwoWay}"
|
||||||
Items="{Binding PdfLiberatedItems}">
|
ItemsSource="{Binding PdfLiberatedItems}">
|
||||||
|
|
||||||
<ComboBox.ItemTemplate>
|
<ComboBox.ItemTemplate>
|
||||||
<DataTemplate>
|
<DataTemplate>
|
||||||
|
|||||||
@ -101,13 +101,13 @@
|
|||||||
Grid.Column="0"
|
Grid.Column="0"
|
||||||
Grid.Row="0"
|
Grid.Row="0"
|
||||||
Content="Check All"
|
Content="Check All"
|
||||||
Click="CheckAll_Click"/>
|
Command="{Binding CheckAll}"/>
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
Grid.Column="0"
|
Grid.Column="0"
|
||||||
Grid.Row="1"
|
Grid.Row="1"
|
||||||
Content="Uncheck All"
|
Content="Uncheck All"
|
||||||
Click="UncheckAll_Click"/>
|
Command="{Binding UncheckAll}"/>
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
Grid.Column="1"
|
Grid.Column="1"
|
||||||
|
|||||||
@ -77,12 +77,12 @@ namespace LibationAvalonia.Dialogs
|
|||||||
await setControlEnabled(sender, true);
|
await setControlEnabled(sender, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void CheckAll_Click(object sender, Avalonia.Interactivity.RoutedEventArgs e)
|
public void CheckAll()
|
||||||
{
|
{
|
||||||
foreach (var record in bookRecordEntries)
|
foreach (var record in bookRecordEntries)
|
||||||
record.IsChecked = true;
|
record.IsChecked = true;
|
||||||
}
|
}
|
||||||
public void UncheckAll_Click(object sender, Avalonia.Interactivity.RoutedEventArgs e)
|
public void UncheckAll()
|
||||||
{
|
{
|
||||||
foreach (var record in bookRecordEntries)
|
foreach (var record in bookRecordEntries)
|
||||||
record.IsChecked = false;
|
record.IsChecked = false;
|
||||||
|
|||||||
@ -99,10 +99,10 @@
|
|||||||
|
|
||||||
<Button
|
<Button
|
||||||
Grid.Column="1"
|
Grid.Column="1"
|
||||||
Height="30"
|
Padding="30,5"
|
||||||
Padding="30,3,30,3"
|
Name="saveBtn"
|
||||||
Content="Save"
|
Content="Save"
|
||||||
Click="SaveButton_Clicked" />
|
Command="{Binding SaveAndClose}" />
|
||||||
</Grid>
|
</Grid>
|
||||||
</Grid>
|
</Grid>
|
||||||
</Window>
|
</Window>
|
||||||
|
|||||||
@ -38,7 +38,7 @@ namespace LibationAvalonia.Dialogs
|
|||||||
if (!accounts.Any())
|
if (!accounts.Any())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
ControlToFocusOnShow = this.FindControl<Button>(nameof(SaveButton_Clicked));
|
ControlToFocusOnShow = this.FindControl<Button>(nameof(saveBtn));
|
||||||
|
|
||||||
var allFilters = QuickFilters.Filters.Select(f => new Filter { FilterString = f }).ToList();
|
var allFilters = QuickFilters.Filters.Select(f => new Filter { FilterString = f }).ToList();
|
||||||
allFilters.Add(new Filter());
|
allFilters.Add(new Filter());
|
||||||
@ -100,10 +100,5 @@ namespace LibationAvalonia.Dialogs
|
|||||||
Filters.Insert(index + 1, filter);
|
Filters.Insert(index + 1, filter);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SaveButton_Clicked(object sender, Avalonia.Interactivity.RoutedEventArgs e)
|
|
||||||
{
|
|
||||||
SaveAndClose();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -62,9 +62,9 @@
|
|||||||
Margin="5"
|
Margin="5"
|
||||||
Orientation="Horizontal">
|
Orientation="Horizontal">
|
||||||
|
|
||||||
<Button Margin="0,0,10,0" Click="Defaults_Click" Content="Defaults" />
|
<Button Margin="0,0,10,0" Command="{Binding Defaults}" Content="Defaults" />
|
||||||
<Button Margin="0,0,10,0" Click="LoFiDefaults_Click" Content="LoFi Defaults" />
|
<Button Margin="0,0,10,0" Command="{Binding LoFiDefaults}" Content="LoFi Defaults" />
|
||||||
<Button Click="Barebones_Click" Content="Barebones" />
|
<Button Command="{Binding Barebones}" Content="Barebones" />
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|
||||||
<StackPanel
|
<StackPanel
|
||||||
@ -73,8 +73,8 @@
|
|||||||
Margin="5"
|
Margin="5"
|
||||||
Orientation="Horizontal">
|
Orientation="Horizontal">
|
||||||
|
|
||||||
<Button Margin="0,0,10,0" Click="Cancel_Click" Content="Cancel" />
|
<Button Margin="0,0,10,0" Command="{Binding Close}" Content="Cancel" />
|
||||||
<Button Padding="20,5,20,6" Click="Save_Click" Content="Save" />
|
<Button Padding="20,5,20,6" Command="{Binding SaveAndClose}" Content="Save" />
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|||||||
@ -35,16 +35,12 @@ namespace LibationAvalonia.Dialogs
|
|||||||
LoadTable(config.ReplacementCharacters.Replacements);
|
LoadTable(config.ReplacementCharacters.Replacements);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Defaults_Click(object sender, Avalonia.Interactivity.RoutedEventArgs e)
|
public void Defaults()
|
||||||
=> LoadTable(ReplacementCharacters.Default.Replacements);
|
=> LoadTable(ReplacementCharacters.Default.Replacements);
|
||||||
public void LoFiDefaults_Click(object sender, Avalonia.Interactivity.RoutedEventArgs e)
|
public void LoFiDefaults()
|
||||||
=> LoadTable(ReplacementCharacters.LoFiDefault.Replacements);
|
=> LoadTable(ReplacementCharacters.LoFiDefault.Replacements);
|
||||||
public void Barebones_Click(object sender, Avalonia.Interactivity.RoutedEventArgs e)
|
public void Barebones()
|
||||||
=> LoadTable(ReplacementCharacters.Barebones.Replacements);
|
=> LoadTable(ReplacementCharacters.Barebones.Replacements);
|
||||||
public void Save_Click(object sender, Avalonia.Interactivity.RoutedEventArgs e)
|
|
||||||
=> SaveAndClose();
|
|
||||||
public void Cancel_Click(object sender, Avalonia.Interactivity.RoutedEventArgs e)
|
|
||||||
=> Close();
|
|
||||||
|
|
||||||
protected override void SaveAndClose()
|
protected override void SaveAndClose()
|
||||||
{
|
{
|
||||||
|
|||||||
@ -33,7 +33,7 @@
|
|||||||
VerticalAlignment="Stretch"
|
VerticalAlignment="Stretch"
|
||||||
VerticalContentAlignment="Center"
|
VerticalContentAlignment="Center"
|
||||||
Content="Reset to Default"
|
Content="Reset to Default"
|
||||||
Click="ResetButton_Click" />
|
Command="{Binding ResetToDefault}"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
<Grid Grid.Row="1" ColumnDefinitions="Auto,*">
|
<Grid Grid.Row="1" ColumnDefinitions="Auto,*">
|
||||||
|
|
||||||
@ -70,7 +70,6 @@
|
|||||||
</DataGrid.Columns>
|
</DataGrid.Columns>
|
||||||
</DataGrid>
|
</DataGrid>
|
||||||
|
|
||||||
|
|
||||||
<Grid
|
<Grid
|
||||||
Grid.Column="1"
|
Grid.Column="1"
|
||||||
Margin="5,0,5,0"
|
Margin="5,0,5,0"
|
||||||
|
|||||||
@ -19,14 +19,14 @@ namespace LibationAvalonia.Dialogs
|
|||||||
|
|
||||||
public EditTemplateDialog()
|
public EditTemplateDialog()
|
||||||
{
|
{
|
||||||
AvaloniaXamlLoader.Load(this);
|
InitializeComponent();
|
||||||
userEditTbox = this.FindControl<TextBox>(nameof(userEditTbox));
|
|
||||||
if (Design.IsDesignMode)
|
if (Design.IsDesignMode)
|
||||||
{
|
{
|
||||||
_ = Configuration.Instance.LibationFiles;
|
_ = Configuration.Instance.LibationFiles;
|
||||||
var editor = TemplateEditor<Templates.FileTemplate>.CreateFilenameEditor(Configuration.Instance.Books, Configuration.Instance.FileTemplate);
|
var editor = TemplateEditor<Templates.FileTemplate>.CreateFilenameEditor(Configuration.Instance.Books, Configuration.Instance.FileTemplate);
|
||||||
_viewModel = new(Configuration.Instance, editor);
|
_viewModel = new(Configuration.Instance, editor);
|
||||||
_viewModel.resetTextBox(editor.EditingTemplate.TemplateText);
|
_viewModel.ResetTextBox(editor.EditingTemplate.TemplateText);
|
||||||
Title = $"Edit {editor.TemplateName}";
|
Title = $"Edit {editor.TemplateName}";
|
||||||
DataContext = _viewModel;
|
DataContext = _viewModel;
|
||||||
}
|
}
|
||||||
@ -37,7 +37,7 @@ namespace LibationAvalonia.Dialogs
|
|||||||
ArgumentValidator.EnsureNotNull(templateEditor, nameof(templateEditor));
|
ArgumentValidator.EnsureNotNull(templateEditor, nameof(templateEditor));
|
||||||
|
|
||||||
_viewModel = new EditTemplateViewModel(Configuration.Instance, templateEditor);
|
_viewModel = new EditTemplateViewModel(Configuration.Instance, templateEditor);
|
||||||
_viewModel.resetTextBox(templateEditor.EditingTemplate.TemplateText);
|
_viewModel.ResetTextBox(templateEditor.EditingTemplate.TemplateText);
|
||||||
Title = $"Edit {templateEditor.TemplateName}";
|
Title = $"Edit {templateEditor.TemplateName}";
|
||||||
DataContext = _viewModel;
|
DataContext = _viewModel;
|
||||||
}
|
}
|
||||||
@ -67,9 +67,6 @@ namespace LibationAvalonia.Dialogs
|
|||||||
public async void SaveButton_Click(object sender, Avalonia.Interactivity.RoutedEventArgs e)
|
public async void SaveButton_Click(object sender, Avalonia.Interactivity.RoutedEventArgs e)
|
||||||
=> await SaveAndCloseAsync();
|
=> await SaveAndCloseAsync();
|
||||||
|
|
||||||
public void ResetButton_Click(object sender, Avalonia.Interactivity.RoutedEventArgs e)
|
|
||||||
=> _viewModel.resetTextBox(_viewModel.TemplateEditor.DefaultTemplate);
|
|
||||||
|
|
||||||
private class EditTemplateViewModel : ViewModels.ViewModelBase
|
private class EditTemplateViewModel : ViewModels.ViewModelBase
|
||||||
{
|
{
|
||||||
private readonly Configuration config;
|
private readonly Configuration config;
|
||||||
@ -115,7 +112,8 @@ namespace LibationAvalonia.Dialogs
|
|||||||
|
|
||||||
public AvaloniaList<Tuple<string, string, string>> ListItems { get; set; }
|
public AvaloniaList<Tuple<string, string, string>> ListItems { get; set; }
|
||||||
|
|
||||||
public void resetTextBox(string value) => UserTemplateText = value;
|
public void ResetTextBox(string value) => UserTemplateText = value;
|
||||||
|
public void ResetToDefault() => ResetTextBox(TemplateEditor.DefaultTemplate);
|
||||||
|
|
||||||
public async Task<bool> Validate()
|
public async Task<bool> Validate()
|
||||||
{
|
{
|
||||||
|
|||||||
@ -27,6 +27,6 @@
|
|||||||
Margin="5"
|
Margin="5"
|
||||||
Padding="30,3,30,3"
|
Padding="30,3,30,3"
|
||||||
Content="Save"
|
Content="Save"
|
||||||
Click="SaveButton_Click" />
|
Command="{Binding SaveButtonAsync}" />
|
||||||
</Grid>
|
</Grid>
|
||||||
</Window>
|
</Window>
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
using Avalonia.Controls;
|
using Avalonia.Controls;
|
||||||
using LibationFileManager;
|
using LibationFileManager;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace LibationAvalonia.Dialogs
|
namespace LibationAvalonia.Dialogs
|
||||||
{
|
{
|
||||||
@ -27,9 +28,8 @@ namespace LibationAvalonia.Dialogs
|
|||||||
DataContext = dirSelectOptions = new();
|
DataContext = dirSelectOptions = new();
|
||||||
}
|
}
|
||||||
|
|
||||||
public async void SaveButton_Click(object sender, Avalonia.Interactivity.RoutedEventArgs e)
|
public async Task SaveButtonAsync()
|
||||||
{
|
{
|
||||||
|
|
||||||
var libationDir = dirSelectOptions.Directory;
|
var libationDir = dirSelectOptions.Directory;
|
||||||
|
|
||||||
if (!System.IO.Directory.Exists(libationDir))
|
if (!System.IO.Directory.Exists(libationDir))
|
||||||
|
|||||||
@ -2,21 +2,21 @@
|
|||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
mc:Ignorable="d" d:DesignWidth="550" d:DesignHeight="130"
|
mc:Ignorable="d" d:DesignWidth="550" d:DesignHeight="135"
|
||||||
xmlns:controls="clr-namespace:LibationAvalonia.Controls"
|
xmlns:controls="clr-namespace:LibationAvalonia.Controls"
|
||||||
x:Class="LibationAvalonia.Dialogs.LiberatedStatusBatchAutoDialog"
|
x:Class="LibationAvalonia.Dialogs.LiberatedStatusBatchAutoDialog"
|
||||||
Title="Liberated status: Whether the book has been downloaded"
|
Title="Liberated status: Whether the book has been downloaded"
|
||||||
MinHeight="130" MaxHeight="130"
|
MinHeight="135" MaxHeight="135"
|
||||||
MinWidth="550" MaxWidth="550"
|
MinWidth="550" MaxWidth="550"
|
||||||
Width="550" Height="130"
|
Width="550" Height="135"
|
||||||
WindowStartupLocation="CenterOwner"
|
WindowStartupLocation="CenterOwner"
|
||||||
Icon="/Assets/libation.ico">
|
Icon="/Assets/libation.ico">
|
||||||
|
|
||||||
<Grid Margin="10" RowDefinitions="Auto,Auto,Auto">
|
<Grid Margin="10" RowDefinitions="Auto,Auto">
|
||||||
|
|
||||||
<StackPanel
|
<StackPanel
|
||||||
Grid.Row="0"
|
Grid.Row="0"
|
||||||
Orientation="Horizontal">
|
Orientation="Vertical">
|
||||||
|
|
||||||
<CheckBox
|
<CheckBox
|
||||||
Margin="0,0,0,10"
|
Margin="0,0,0,10"
|
||||||
@ -26,12 +26,6 @@
|
|||||||
TextWrapping="Wrap"
|
TextWrapping="Wrap"
|
||||||
Text="If the audio file can be found, set download status to 'Downloaded'" />
|
Text="If the audio file can be found, set download status to 'Downloaded'" />
|
||||||
</CheckBox>
|
</CheckBox>
|
||||||
</StackPanel>
|
|
||||||
|
|
||||||
<StackPanel
|
|
||||||
Grid.Row="1"
|
|
||||||
Orientation="Horizontal">
|
|
||||||
|
|
||||||
<CheckBox
|
<CheckBox
|
||||||
Margin="0,0,0,10"
|
Margin="0,0,0,10"
|
||||||
IsChecked="{Binding SetNotDownloaded, Mode=TwoWay}">
|
IsChecked="{Binding SetNotDownloaded, Mode=TwoWay}">
|
||||||
@ -43,11 +37,10 @@
|
|||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
Grid.Row="2"
|
Grid.Row="1"
|
||||||
Padding="30,0,30,0"
|
Padding="30,5"
|
||||||
HorizontalAlignment="Right"
|
HorizontalAlignment="Right"
|
||||||
Height="25"
|
|
||||||
Content="Save"
|
Content="Save"
|
||||||
Click="SaveButton_Clicked"/>
|
Command="{Binding SaveAndClose}"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
</Window>
|
</Window>
|
||||||
|
|||||||
@ -10,8 +10,5 @@ namespace LibationAvalonia.Dialogs
|
|||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
DataContext = this;
|
DataContext = this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SaveButton_Clicked(object sender, Avalonia.Interactivity.RoutedEventArgs e)
|
|
||||||
=> SaveAndClose();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,25 +2,25 @@
|
|||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
mc:Ignorable="d" d:DesignWidth="400" d:DesignHeight="120"
|
mc:Ignorable="d" d:DesignWidth="400" d:DesignHeight="100"
|
||||||
xmlns:controls="clr-namespace:LibationAvalonia.Controls"
|
xmlns:controls="clr-namespace:LibationAvalonia.Controls"
|
||||||
x:Class="LibationAvalonia.Dialogs.LiberatedStatusBatchManualDialog"
|
x:Class="LibationAvalonia.Dialogs.LiberatedStatusBatchManualDialog"
|
||||||
Title="Liberated status: Whether the book has been downloaded"
|
Title="Liberated status: Whether the book has been downloaded"
|
||||||
MinWidth="400" MinHeight="120"
|
MinWidth="400" MinHeight="100"
|
||||||
MaxWidth="400" MaxHeight="120"
|
MaxWidth="400" MaxHeight="100"
|
||||||
Width="400" Height="120"
|
Width="400" Height="100"
|
||||||
WindowStartupLocation="CenterOwner"
|
WindowStartupLocation="CenterOwner"
|
||||||
Icon="/Assets/libation.ico">
|
Icon="/Assets/libation.ico">
|
||||||
|
|
||||||
<Grid RowDefinitions="Auto,Auto,Auto">
|
<Grid RowDefinitions="Auto,Auto" ColumnDefinitions="*,Auto">
|
||||||
|
|
||||||
<TextBlock
|
<TextBlock
|
||||||
Grid.Row="0"
|
Grid.ColumnSpan="2"
|
||||||
Margin="10,10,10,0"
|
Margin="10"
|
||||||
Text="To download again next time: change to Not Downloaded
To not download: change to Downloaded"/>
|
Text="To download again next time: change to Not Downloaded
To not download: change to Downloaded"/>
|
||||||
|
|
||||||
<StackPanel
|
<StackPanel
|
||||||
Margin="10"
|
Margin="10,0"
|
||||||
Grid.Row="1"
|
Grid.Row="1"
|
||||||
Orientation="Horizontal">
|
Orientation="Horizontal">
|
||||||
|
|
||||||
@ -36,7 +36,7 @@
|
|||||||
Height="25"
|
Height="25"
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
SelectedItem="{Binding SelectedItem, Mode=TwoWay}"
|
SelectedItem="{Binding SelectedItem, Mode=TwoWay}"
|
||||||
Items="{Binding BookStatuses}">
|
ItemsSource="{Binding BookStatuses}">
|
||||||
|
|
||||||
<ComboBox.ItemTemplate>
|
<ComboBox.ItemTemplate>
|
||||||
<DataTemplate>
|
<DataTemplate>
|
||||||
@ -51,12 +51,13 @@
|
|||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
Grid.Row="2"
|
Grid.Row="1"
|
||||||
Padding="30,0,30,0"
|
Grid.Column="1"
|
||||||
Margin="10,0,10,10"
|
Margin="10,0"
|
||||||
|
Padding="30,5"
|
||||||
|
VerticalAlignment="Stretch"
|
||||||
HorizontalAlignment="Right"
|
HorizontalAlignment="Right"
|
||||||
Height="25"
|
|
||||||
Content="Save"
|
Content="Save"
|
||||||
Click="SaveButton_Clicked"/>
|
Click="SaveButton_Clicked" />
|
||||||
</Grid>
|
</Grid>
|
||||||
</Window>
|
</Window>
|
||||||
|
|||||||
@ -16,7 +16,7 @@
|
|||||||
<TextBlock Text="IDs Found: " />
|
<TextBlock Text="IDs Found: " />
|
||||||
<TextBlock Text="{Binding FoundAsins}" />
|
<TextBlock Text="{Binding FoundAsins}" />
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
<ListBox Margin="0,5,0,0" Grid.Row="1" Grid.ColumnSpan="2" Name="foundAudiobooksLB" Items="{Binding FoundFiles}" AutoScrollToSelectedItem="true">
|
<ListBox Margin="0,5,0,0" Grid.Row="1" Grid.ColumnSpan="2" Name="foundAudiobooksLB" ItemsSource="{Binding FoundFiles}" AutoScrollToSelectedItem="true">
|
||||||
<ListBox.ItemTemplate>
|
<ListBox.ItemTemplate>
|
||||||
<DataTemplate>
|
<DataTemplate>
|
||||||
<Grid ColumnDefinitions="Auto,*">
|
<Grid ColumnDefinitions="Auto,*">
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
mc:Ignorable="d" d:DesignWidth="500" d:DesignHeight="185"
|
mc:Ignorable="d" d:DesignWidth="500" d:DesignHeight="200"
|
||||||
x:Class="LibationAvalonia.Dialogs.ScanAccountsDialog"
|
x:Class="LibationAvalonia.Dialogs.ScanAccountsDialog"
|
||||||
MinWidth="500" MinHeight="160"
|
MinWidth="500" MinHeight="160"
|
||||||
Width="500" Height="200"
|
Width="500" Height="200"
|
||||||
@ -10,7 +10,7 @@
|
|||||||
WindowStartupLocation="CenterOwner"
|
WindowStartupLocation="CenterOwner"
|
||||||
Icon="/Assets/libation.ico">
|
Icon="/Assets/libation.ico">
|
||||||
|
|
||||||
<Grid ColumnDefinitions="*,Auto" RowDefinitions="Auto,Auto,Auto">
|
<Grid ColumnDefinitions="*,Auto" RowDefinitions="Auto,*,Auto">
|
||||||
|
|
||||||
<Grid.Styles>
|
<Grid.Styles>
|
||||||
<Style Selector="Button:focus">
|
<Style Selector="Button:focus">
|
||||||
@ -23,20 +23,19 @@
|
|||||||
Grid.Row="0"
|
Grid.Row="0"
|
||||||
Grid.Column="0"
|
Grid.Column="0"
|
||||||
Grid.ColumnSpan="2"
|
Grid.ColumnSpan="2"
|
||||||
Margin="10,10,10,0"
|
Margin="10"
|
||||||
Text="Check the accounts to scan and import.
To change default selections, go to: Settings > Accounts"/>
|
Text="Check the accounts to scan and import.
To change default selections, go to: Settings > Accounts"/>
|
||||||
|
|
||||||
<ScrollViewer
|
<ScrollViewer
|
||||||
Grid.Row="1"
|
Grid.Row="1"
|
||||||
Grid.Column="0"
|
Grid.Column="0"
|
||||||
Grid.ColumnSpan="2"
|
Grid.ColumnSpan="2"
|
||||||
|
Margin="10,0"
|
||||||
|
VerticalAlignment="Stretch"
|
||||||
HorizontalScrollBarVisibility="Disabled"
|
HorizontalScrollBarVisibility="Disabled"
|
||||||
VerticalScrollBarVisibility="Auto"
|
VerticalScrollBarVisibility="Auto">
|
||||||
Margin="10"
|
|
||||||
MinHeight="90"
|
|
||||||
MaxHeight="90">
|
|
||||||
|
|
||||||
<ListBox Items="{Binding Accounts}">
|
<ListBox ItemsSource="{Binding Accounts}">
|
||||||
<ListBox.ItemTemplate>
|
<ListBox.ItemTemplate>
|
||||||
<DataTemplate>
|
<DataTemplate>
|
||||||
|
|
||||||
@ -62,21 +61,19 @@
|
|||||||
<Button
|
<Button
|
||||||
Grid.Row="2"
|
Grid.Row="2"
|
||||||
Grid.Column="0"
|
Grid.Column="0"
|
||||||
Padding="20,0,20,0"
|
Padding="20,5"
|
||||||
Margin="10,0,10,10"
|
Margin="10"
|
||||||
Height="25"
|
|
||||||
Content="Edit Accounts"
|
Content="Edit Accounts"
|
||||||
Click="EditAccountsButton_Clicked"/>
|
Command="{Binding EditAccountsAsync}"/>
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
Grid.Row="2"
|
Grid.Row="2"
|
||||||
Grid.Column="1"
|
Grid.Column="1"
|
||||||
Padding="30,0,30,0"
|
Padding="30,5"
|
||||||
Margin="10,0,10,10"
|
Margin="10"
|
||||||
HorizontalAlignment="Right"
|
HorizontalAlignment="Right"
|
||||||
Height="25"
|
|
||||||
Content="Import"
|
Content="Import"
|
||||||
Name="ImportButton"
|
Name="ImportButton"
|
||||||
Click="ImportButton_Clicked"/>
|
Command="{Binding SaveAndClose}"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
</Window>
|
</Window>
|
||||||
|
|||||||
@ -4,6 +4,7 @@ using Avalonia.Interactivity;
|
|||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
namespace LibationAvalonia.Dialogs
|
namespace LibationAvalonia.Dialogs
|
||||||
{
|
{
|
||||||
@ -25,7 +26,7 @@ namespace LibationAvalonia.Dialogs
|
|||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
|
|
||||||
this.HideMinMaxBtns();
|
this.HideMinMaxBtns();
|
||||||
this.Opened += ScanAccountsDialog_Opened;
|
ControlToFocusOnShow = this.FindControl<Button>(nameof(ImportButton));
|
||||||
|
|
||||||
LoadAccounts();
|
LoadAccounts();
|
||||||
}
|
}
|
||||||
@ -46,12 +47,7 @@ namespace LibationAvalonia.Dialogs
|
|||||||
DataContext = this;
|
DataContext = this;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void ScanAccountsDialog_Opened(object sender, System.EventArgs e)
|
public async Task EditAccountsAsync()
|
||||||
{
|
|
||||||
this.FindControl<Button>(nameof(ImportButton)).Focus();
|
|
||||||
}
|
|
||||||
|
|
||||||
public async void EditAccountsButton_Clicked(object sender, RoutedEventArgs e)
|
|
||||||
{
|
{
|
||||||
if (await new AccountsDialog().ShowDialog<DialogResult>(this) == DialogResult.OK)
|
if (await new AccountsDialog().ShowDialog<DialogResult>(this) == DialogResult.OK)
|
||||||
{
|
{
|
||||||
@ -67,7 +63,5 @@ namespace LibationAvalonia.Dialogs
|
|||||||
|
|
||||||
base.SaveAndClose();
|
base.SaveAndClose();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void ImportButton_Clicked(object sender, RoutedEventArgs e) => SaveAndClose();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -31,21 +31,18 @@
|
|||||||
<Setter Property="Height" Value="30"/>
|
<Setter Property="Height" Value="30"/>
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="TabControl /template/ ContentPresenter#PART_SelectedContentHost">
|
<Style Selector="TabControl /template/ ContentPresenter#PART_SelectedContentHost">
|
||||||
<Setter Property="BorderBrush" Value="{DynamicResource DataGridGridLinesBrush}" />
|
<Setter Property="BorderBrush" Value="{DynamicResource SystemBaseLowColor}" />
|
||||||
<Setter Property="BorderThickness" Value="2" />
|
<Setter Property="BorderThickness" Value="1" />
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="TabItem">
|
<Style Selector="TabItem">
|
||||||
<Setter Property="MinHeight" Value="40"/>
|
<Setter Property="MinHeight" Value="45"/>
|
||||||
<Setter Property="Height" Value="40"/>
|
<Setter Property="Height" Value="45"/>
|
||||||
<Setter Property="Padding" Value="8,2,8,10"/>
|
<Setter Property="Padding" Value="8,2,8,10"/>
|
||||||
<Style Selector="^ > TextBlock" >
|
<Style Selector="^ > TextBlock" >
|
||||||
<Setter Property="FontSize" Value="14" />
|
<Setter Property="FontSize" Value="14" />
|
||||||
<Setter Property="VerticalAlignment" Value="Center" />
|
<Setter Property="VerticalAlignment" Value="Center" />
|
||||||
</Style>
|
</Style>
|
||||||
</Style>
|
</Style>
|
||||||
<Style Selector="Button">
|
|
||||||
<Setter Property="VerticalContentAlignment" Value="Center" />
|
|
||||||
</Style>
|
|
||||||
</TabControl.Styles>
|
</TabControl.Styles>
|
||||||
|
|
||||||
<TabItem>
|
<TabItem>
|
||||||
|
|||||||
@ -2,33 +2,32 @@
|
|||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
mc:Ignorable="d" d:DesignWidth="630" d:DesignHeight="110"
|
mc:Ignorable="d" d:DesignWidth="630" d:DesignHeight="90"
|
||||||
x:Class="LibationAvalonia.Dialogs.TagsBatchDialog"
|
x:Class="LibationAvalonia.Dialogs.TagsBatchDialog"
|
||||||
MinWidth="630" MinHeight="110"
|
MinWidth="630" MinHeight="90"
|
||||||
MaxWidth="630" MaxHeight="110"
|
MaxWidth="630" MaxHeight="90"
|
||||||
Width="630" Height="110"
|
Width="630" Height="110"
|
||||||
Title="Replace Tags"
|
Title="Replace Tags"
|
||||||
WindowStartupLocation="CenterOwner"
|
WindowStartupLocation="CenterOwner"
|
||||||
Icon="/Assets/libation.ico">
|
Icon="/Assets/libation.ico">
|
||||||
|
|
||||||
<Grid RowDefinitions="Auto,Auto,Auto">
|
<Grid RowDefinitions="Auto,Auto" ColumnDefinitions="*,Auto" Margin="10">
|
||||||
<TextBlock
|
<TextBlock
|
||||||
Grid.Row="0"
|
Grid.ColumnSpan="2"
|
||||||
Margin="10,10,10,0"
|
Margin="0,0,0,10"
|
||||||
Text="Tags are separated by a space. Each tag can contain letters, numbers, and underscores"/>
|
Text="Tags are separated by a space. Each tag can contain letters, numbers, and underscores"/>
|
||||||
<TextBox
|
<TextBox
|
||||||
Grid.Row="1"
|
Grid.Row="1"
|
||||||
Margin="10"
|
|
||||||
MinHeight="25"
|
MinHeight="25"
|
||||||
Name="EditTagsTb"
|
Name="EditTagsTb"
|
||||||
Text="{Binding NewTags, Mode=TwoWay}" />
|
Text="{Binding NewTags, Mode=TwoWay}" />
|
||||||
<Button
|
<Button
|
||||||
Grid.Row="2"
|
Grid.Row="1"
|
||||||
Padding="30,0,30,0"
|
Grid.Column="1"
|
||||||
Margin="10,0,10,10"
|
Margin="10,0,0,0"
|
||||||
HorizontalAlignment="Right"
|
Padding="20,3"
|
||||||
Height="25"
|
VerticalAlignment="Stretch"
|
||||||
Content="Save"
|
Content="Save"
|
||||||
Click="SaveButton_Clicked"/>
|
Command="{Binding SaveAndClose}"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
</Window>
|
</Window>
|
||||||
|
|||||||
@ -12,8 +12,5 @@ namespace LibationAvalonia.Dialogs
|
|||||||
|
|
||||||
DataContext = this;
|
DataContext = this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SaveButton_Clicked(object sender, Avalonia.Interactivity.RoutedEventArgs e)
|
|
||||||
=> SaveAndClose();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -52,12 +52,12 @@
|
|||||||
VerticalAlignment="Stretch"
|
VerticalAlignment="Stretch"
|
||||||
VerticalContentAlignment="Center"
|
VerticalContentAlignment="Center"
|
||||||
Content="Restore"
|
Content="Restore"
|
||||||
Click="Restore_Click" />
|
Command="{Binding RestoreCheckedAsync}"/>
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
IsEnabled="{Binding ControlsEnabled}"
|
IsEnabled="{Binding ControlsEnabled}"
|
||||||
Grid.Column="3"
|
Grid.Column="3"
|
||||||
Click="EmptyTrash_Click" >
|
Command="{Binding PermanentlyDeleteCheckedAsync}" >
|
||||||
<TextBlock
|
<TextBlock
|
||||||
TextAlignment="Center"
|
TextAlignment="Center"
|
||||||
Text="Permanently Delete
from Libation" />
|
Text="Permanently Delete
from Libation" />
|
||||||
|
|||||||
@ -16,26 +16,19 @@ namespace LibationAvalonia.Dialogs
|
|||||||
{
|
{
|
||||||
public partial class TrashBinDialog : Window
|
public partial class TrashBinDialog : Window
|
||||||
{
|
{
|
||||||
TrashBinViewModel _viewModel;
|
|
||||||
|
|
||||||
public TrashBinDialog()
|
public TrashBinDialog()
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
this.RestoreSizeAndLocation(Configuration.Instance);
|
this.RestoreSizeAndLocation(Configuration.Instance);
|
||||||
DataContext = _viewModel = new();
|
DataContext = new TrashBinViewModel();
|
||||||
|
|
||||||
this.Closing += (_, _) => this.SaveSizeAndLocation(Configuration.Instance);
|
this.Closing += (_, _) => this.SaveSizeAndLocation(Configuration.Instance);
|
||||||
this.KeyDown += TrashBinDialog_KeyDown;
|
|
||||||
}
|
|
||||||
|
|
||||||
public async void EmptyTrash_Click(object sender, Avalonia.Interactivity.RoutedEventArgs e)
|
KeyBindings.Add(new Avalonia.Input.KeyBinding
|
||||||
=> await _viewModel.PermanentlyDeleteCheckedAsync();
|
{
|
||||||
public async void Restore_Click(object sender, Avalonia.Interactivity.RoutedEventArgs e)
|
Gesture = new Avalonia.Input.KeyGesture(Avalonia.Input.Key.Escape),
|
||||||
=> await _viewModel.RestoreCheckedAsync();
|
Command = ReactiveCommand.Create(Close)
|
||||||
private void TrashBinDialog_KeyDown(object sender, Avalonia.Input.KeyEventArgs e)
|
});
|
||||||
{
|
|
||||||
if (e.Key == Avalonia.Input.Key.Escape)
|
|
||||||
Close();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -21,7 +21,6 @@
|
|||||||
|
|
||||||
<controls:GroupBox
|
<controls:GroupBox
|
||||||
Grid.Row="1"
|
Grid.Row="1"
|
||||||
BorderWidth="2"
|
|
||||||
Label="Release Information"
|
Label="Release Information"
|
||||||
Margin="0,10,0,10">
|
Margin="0,10,0,10">
|
||||||
|
|
||||||
|
|||||||
@ -1,4 +1,5 @@
|
|||||||
using FileManager;
|
using Avalonia.Controls.Shapes;
|
||||||
|
using FileManager;
|
||||||
using LibationFileManager;
|
using LibationFileManager;
|
||||||
using ReactiveUI;
|
using ReactiveUI;
|
||||||
using System;
|
using System;
|
||||||
@ -29,10 +30,10 @@ namespace LibationAvalonia.ViewModels.Settings
|
|||||||
|
|
||||||
public void SaveSettings(Configuration config)
|
public void SaveSettings(Configuration config)
|
||||||
{
|
{
|
||||||
LongPath lonNewBooks = BooksDirectory;
|
LongPath lonNewBooks = Configuration.GetKnownDirectory(BooksDirectory) is Configuration.KnownDirectories.None ? BooksDirectory : System.IO.Path.Combine(BooksDirectory, "Books");
|
||||||
if (!System.IO.Directory.Exists(lonNewBooks))
|
if (!System.IO.Directory.Exists(lonNewBooks))
|
||||||
System.IO.Directory.CreateDirectory(lonNewBooks);
|
System.IO.Directory.CreateDirectory(lonNewBooks);
|
||||||
config.Books = BooksDirectory;
|
config.Books = lonNewBooks;
|
||||||
config.SavePodcastsToParentFolder = SavePodcastsToParentFolder;
|
config.SavePodcastsToParentFolder = SavePodcastsToParentFolder;
|
||||||
config.LogLevel = LoggingLevel;
|
config.LogLevel = LoggingLevel;
|
||||||
Configuration.Instance.SetString(ThemeVariant, nameof(ThemeVariant));
|
Configuration.Instance.SetString(ThemeVariant, nameof(ThemeVariant));
|
||||||
|
|||||||
@ -8,7 +8,7 @@
|
|||||||
Title="View All Items in Series">
|
Title="View All Items in Series">
|
||||||
|
|
||||||
<TabControl
|
<TabControl
|
||||||
Items="{Binding TabItems}"
|
ItemsSource="{Binding TabItems}"
|
||||||
VerticalAlignment="Stretch"
|
VerticalAlignment="Stretch"
|
||||||
HorizontalAlignment="Stretch">
|
HorizontalAlignment="Stretch">
|
||||||
<TabControl.Styles>
|
<TabControl.Styles>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user