-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMainWindow.xaml
62 lines (52 loc) · 3.58 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
<Window x:Class="NoSilence.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="MP3 Trimmer" Height="645" Width="562"
AllowDrop="True" Drop="Window_Drop"
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">
<!-- ListBox for displaying the files -->
<ListBox x:Name="fileList" HorizontalAlignment="Stretch" Height="200" VerticalAlignment="Top"
SelectionChanged="FileList_SelectionChanged" Margin="0,0,0,10"
Style="{DynamicResource MaterialDesignListBox}">
<ListBox.BorderBrush>
<SolidColorBrush Color="#19FFFFFF" />
<!-- Use the correct color format -->
</ListBox.BorderBrush>
<ListBox.BorderThickness>1</ListBox.BorderThickness>
</ListBox>
<!-- Controls for actions and settings -->
<StackPanel Orientation="Vertical" VerticalAlignment="Top" HorizontalAlignment="Center" Margin="0,220,0,0" Width="505">
<StackPanel Orientation="Horizontal" Margin="0,0,0,10">
<Button Content="Remove Silence" Width="140" Click="RemoveSilence_Click" Style="{DynamicResource MaterialDesignRaisedButton}"/>
<Button Content="Preview" Width="120" Margin="10,0,0,0" Click="Preview_Click" Style="{DynamicResource MaterialDesignFlatButton}"/>
<Button Content="Load Files" Width="120" Margin="10,0,0,0" Click="Load_Click" Style="{DynamicResource MaterialDesignFlatButton}"/>
</StackPanel>
<CheckBox x:Name="overwriteCheckBox" Content="Overwrite Original Files" Margin="0,0,0,10"/>
<StackPanel Orientation="Horizontal" Margin="0,0,0,10">
<Label Content="Silence Threshold (dB)" VerticalAlignment="Center" Style="{DynamicResource MaterialDesignLabel}"/>
<TextBox x:Name="silenceThresholdTextBox" Width="80" Text="60" Margin="10,0,0,0" Style="{DynamicResource MaterialDesignTextBox}"/>
</StackPanel>
<!-- FFmpeg selection -->
<StackPanel Orientation="Horizontal" Margin="0,0,0,10">
<TextBox x:Name="ffmpegPathTextBox" Width="350" Text="C:\ffmpeg\bin\ffmpeg.exe" Style="{DynamicResource MaterialDesignTextBox}"/>
<Button Content="Browse FFmpeg" Width="142" Margin="10,0,0,0" Click="BrowseFFmpeg_Click" Style="{DynamicResource MaterialDesignRaisedButton}"/>
</StackPanel>
</StackPanel>
<!-- Output TextBox for FFmpeg output -->
<TextBox x:Name="outputTextBox" HorizontalAlignment="Stretch" Margin="0,410,0,0" VerticalAlignment="Top"
Height="100" VerticalScrollBarVisibility="Auto" TextWrapping="Wrap" IsReadOnly="True"/>
<!-- Progress bar and current file label -->
<StackPanel Orientation="Vertical" HorizontalAlignment="Stretch" VerticalAlignment="Bottom" Margin="0,0,0,10" Grid.RowSpan="2">
<ProgressBar x:Name="processingProgressBar" Height="20"/>
<Label x:Name="currentFileLabel" Content="Processing: " Style="{DynamicResource MaterialDesignLabel}"/>
</StackPanel>
</Grid>
</Window>