<Window x:Class="VideoConcat.Views.VideoPreviewWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        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"
        xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
        mc:Ignorable="d"
        Title="视频预览" Height="600" Width="900"
        WindowStartupLocation="CenterOwner"
        ResizeMode="CanResize">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
            <RowDefinition Height="Auto"/>
        </Grid.RowDefinitions>
        
        <!-- 标题栏 -->
        <Border Grid.Row="0" Background="#40568D" Height="40">
            <StackPanel Orientation="Horizontal" Margin="10,0">
                <TextBlock Text="视频预览" FontSize="16" Foreground="White" VerticalAlignment="Center" FontWeight="Bold"/>
                <TextBlock x:Name="FileNameText" Text="" FontSize="14" Foreground="White" VerticalAlignment="Center" Margin="20,0,0,0"/>
            </StackPanel>
        </Border>
        
        <!-- 视频播放区域 -->
        <Grid Grid.Row="1" Background="Black">
            <MediaElement x:Name="VideoPlayer"
                          LoadedBehavior="Manual"
                          UnloadedBehavior="Stop"
                          Stretch="Uniform"
                          MediaOpened="VideoPlayer_MediaOpened"
                          MediaEnded="VideoPlayer_MediaEnded"/>
            
            <!-- 播放控制按钮 -->
            <StackPanel Orientation="Horizontal" 
                       HorizontalAlignment="Center" 
                       VerticalAlignment="Bottom"
                       Margin="0,0,0,20"
                       Background="#80000000">
                <Button x:Name="PlayPauseButton" 
                        Content="播放" 
                        Width="80" 
                        Height="35"
                        Margin="5"
                        Click="PlayPauseButton_Click"
                        Style="{StaticResource MaterialDesignRaisedButton}"
                        Background="#40568D"/>
                <Button Content="停止" 
                        Width="80" 
                        Height="35"
                        Margin="5"
                        Click="StopButton_Click"
                        Style="{StaticResource MaterialDesignRaisedButton}"
                        Background="#E54858"/>
                <Button Content="打开文件" 
                        Width="100" 
                        Height="35"
                        Margin="5"
                        Click="OpenFileButton_Click"
                        Style="{StaticResource MaterialDesignRaisedButton}"
                        Background="#40568D"/>
            </StackPanel>
        </Grid>
        
        <!-- 进度条和时间信息 -->
        <Grid Grid.Row="2" Background="#F5F5F5" Height="80">
            <StackPanel Margin="10">
                <!-- 进度条 -->
                <ProgressBar x:Name="ProgressBar" 
                            Height="20" 
                            Margin="0,5"
                            Minimum="0"
                            Maximum="100"/>
                
                <!-- 时间信息 -->
                <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Margin="0,5">
                    <TextBlock x:Name="CurrentTimeText" Text="00:00" FontSize="12" Margin="5,0"/>
                    <TextBlock Text=" / " FontSize="12" Margin="5,0"/>
                    <TextBlock x:Name="TotalTimeText" Text="00:00" FontSize="12" Margin="5,0"/>
                </StackPanel>
            </StackPanel>
        </Grid>
    </Grid>
</Window>

