-
Notifications
You must be signed in to change notification settings - Fork 0
/
MainWindow.axaml
52 lines (44 loc) · 2.86 KB
/
MainWindow.axaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
<Window 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" SizeToContent="0" Width="900" Height="400" MinWidth="700" MinHeight="300"
x:Class="YoutubeDownloader.MainWindow"
Title="YouTube Audio Downloader" Icon="icon.png">
<Grid RowDefinitions="50,50,50,50,Auto" Margin="20">
<DockPanel Grid.Row="0" Grid.Column="0" LastChildFill="True">
<Button Width="130" Foreground="White" Background="Black" Click="OnDownloadButton_Click"
HorizontalContentAlignment="Center" DockPanel.Dock="Right"
Margin="5,0,0,0">Download</Button>
<TextBox Height="20" Watermark="Enter a YouTube URL or video ID"
VerticalAlignment="Stretch" HorizontalAlignment="Stretch" x:Name="Url" />
</DockPanel>
<StackPanel Grid.Row="1" Grid.Column="0" Spacing="25" Height="20" Orientation="Horizontal">
<CheckBox x:Name="SplitChapters" IsChecked="True">Split Chapters</CheckBox>
<CheckBox x:Name="DownloadPlaylist">Download Playlist</CheckBox>
</StackPanel>
<DockPanel Grid.Row="2" Grid.Column="0" Height="20" LastChildFill="True">
<!-- <Button Content="Choose folder..." Height="30" Name="FolderSelectButton"
DockPanel.Dock="Left" Margin="0,0,5,0" Click="OnFolderSelectButton_Click" /> -->
<TextBlock x:Name="SaveFolderLabel" Text="Save Folder:" Margin="0,0,10,0" TextWrapping="0" />
<TextBox x:Name="SaveFolder" TextWrapping="1" Height="30" Watermark="Enter a folder path"
Text="{Binding SaveFolder, Mode=OneWay}" />
</DockPanel>
<DockPanel Grid.Row="3" Grid.Column="0" Height="20" LastChildFill="True">
<!-- <Button Content="Choose folder..." Height="30" Name="FolderSelectButton"
DockPanel.Dock="Left" Margin="0,0,5,0" Click="OnFolderSelectButton_Click" /> -->
<TextBlock x:Name="FileNameLabel" Text="(Optional) Rename File To:" Margin="0,0,10,0" TextWrapping="0" />
<TextBox x:Name="FileName" TextWrapping="1" Height="30" Watermark="Enter a new file name (no extension)"
Text="{Binding FileName, Mode=OneWay}" />
</DockPanel>
<Grid Grid.Row="4" Grid.Column="0" Margin="0, 10, 0, 0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<ScrollViewer Height="300">
<TextBlock Grid.Column="0" x:Name="Log" TextWrapping="1"
Text="{Binding LogText, Mode=OneWay}" Foreground="Gray" />
</ScrollViewer>
</Grid>
</Grid>
</Window>