-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
MainWindow.xaml
75 lines (68 loc) · 4.29 KB
/
MainWindow.xaml
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
<Window x:Class="MP3Joiner.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="MP3 Joiner" Height="600" Width="800"
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
TextElement.Foreground="{DynamicResource MaterialDesign.Brush.Foreground}"
Background="{DynamicResource MaterialDesign.Brush.Background}"
TextElement.FontWeight="Regular"
TextElement.FontSize="12"
FontFamily="{materialDesign:MaterialDesignFont}"
TextOptions.TextFormattingMode="Ideal"
TextOptions.TextRenderingMode="Auto">
<Grid Margin="10">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="2*"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="3*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<!-- Buttons for adding files -->
<StackPanel Grid.Row="0" Grid.Column="0" Orientation="Horizontal" Margin="0,0,49,10" Grid.ColumnSpan="2">
<Button x:Name="btnAddFiles" Width="146" Click="btnAddFiles_Click">Add MP3 Files</Button>
<Button x:Name="btnClearFiles" Width="146" Click="btnClearFiles_Click" Margin="10,0,0,0">Clear List</Button>
<!-- New button to join MP3 files -->
<Button x:Name="btnJoinFiles" Width="146" Click="btnJoinFiles_Click" Margin="10,0,0,0">Join MP3 Files</Button>
<Button x:Name="btnreadidv3tag" Width="146" Click="btnreadidv3tag_Click" Margin="10,0,0,0" Content="Read Id3 Tag"/>
</StackPanel>
<!-- ListBox for MP3 Files with Drag and Drop Functionality -->
<ListBox x:Name="mp3FileList" Grid.Row="1" Grid.Column="0" AllowDrop="True" BorderThickness="1" BorderBrush="Black"
Style="{DynamicResource MaterialDesignListBox}"
PreviewMouseMove="mp3FileList_PreviewMouseMove"
DragEnter="mp3FileList_DragEnter"
DragOver="mp3FileList_DragOver"
Drop="mp3FileList_Drop" Background="#FFDEDEDE">
<ListBox.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding}" />
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
<!-- Album Art Drop Area -->
<Border x:Name="AlbumArtBorder" Grid.Row="1" Grid.Column="1" Background="LightGray" Margin="5,5,5,5" BorderThickness="0" BorderBrush="Black"
Width="200" Height="200" HorizontalAlignment="Center" VerticalAlignment="Center" AllowDrop="True"
DragEnter="AlbumArtBorder_DragEnter" Drop="AlbumArtBorder_Drop">
<Grid>
<!-- Image to display the album art -->
<Image x:Name="imgAlbumArt" Stretch="Uniform" Width="200" Height="200"/>
<!-- TextBlock visible initially and hidden after image drop -->
<TextBlock x:Name="AlbumArtPlaceholder" Text="Drop Image Here" HorizontalAlignment="Center" VerticalAlignment="Center"
Foreground="Black" Background="Transparent" Opacity="0.7"/>
</Grid>
</Border>
<!-- Metadata inputs (Artist, Track, etc.) -->
<StackPanel Grid.Row="2" Grid.ColumnSpan="2" Orientation="Vertical" Margin="0, 10, 0, 0">
<TextBlock Text="Track Name:" Width="87" HorizontalAlignment="Left" Style="{DynamicResource MaterialDesignBody1TextBlock}" />
<TextBox x:Name="txtTrackName" Width="400" HorizontalAlignment="Left" Style="{DynamicResource MaterialDesignTextBox}" />
<TextBlock Text="Artist Name:" Margin="0,10,0,0" Width="92" HorizontalAlignment="Left" Style="{DynamicResource MaterialDesignBody1TextBlock}" />
<TextBox x:Name="txtArtistName" Width="400" HorizontalAlignment="Left" Style="{DynamicResource MaterialDesignTextBox}"/>
<!-- Progress Bar -->
<ProgressBar x:Name="progressBar" Height="20" Margin="0, 20, 0, 0" Minimum="0" Maximum="100" Style="{DynamicResource MaterialDesignLinearProgressBar}" />
</StackPanel>
</Grid>
</Window>