1 Star 0 Fork 0

TianYe/FieldTools.MediaFindOut

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
VLCWindow.xaml 14.46 KB
一键复制 编辑 原始数据 按行查看 历史
TianYe 提交于 2024-03-17 03:12 . 项目迁移,基本完善
<Window
x:Class="FieldTools.MediaFindOut.VLCWindow"
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:local="clr-namespace:FieldTools.MediaFindOut"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:vlc="clr-namespace:LibVLCSharp.WPF;assembly=LibVLCSharp.WPF"
x:Name="vlcWin"
Title="VLCWindow"
Width="800"
Height="450"
d:DataContext="{d:DesignInstance Type=local:VLCWindow}"
Style="{DynamicResource CustomWindowChrome}"
WindowStartupLocation="CenterScreen"
mc:Ignorable="d">
<Window.Resources>
<Style TargetType="Button">
<Setter Property="Margin" Value="5" />
</Style>
</Window.Resources>
<Border>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition />
<ColumnDefinition Width="Auto" />
<ColumnDefinition x:Name="columnDefinitionEx" Width="150" />
</Grid.ColumnDefinitions>
<!-- 主界面 -->
<Grid Grid.Row="1" Background="Black">
<vlc:VideoView x:Name="video_main" Background="Transparent">
<Grid>
<!-- 调试信息 -->
<Grid Background="{StaticResource translucent1}">
<DockPanel VerticalAlignment="Top">
<Label
VerticalAlignment="Center"
Content="调试信息:"
DockPanel.Dock="Left"
Foreground="Red" />
<TextBlock
x:Name="logTextBlock"
VerticalAlignment="Center"
Foreground="Red"
Text="无" />
</DockPanel>
</Grid>
<!-- 操作按钮 -->
<Grid
Height="40"
VerticalAlignment="Bottom"
Background="{StaticResource translucent1}"
Mouse.MouseEnter="Grid_MouseEnterOrLeave"
Mouse.MouseLeave="Grid_MouseEnterOrLeave">
<Grid>
<Grid.RowDefinitions>
<RowDefinition />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Slider
x:Name="slider"
VerticalAlignment="Bottom"
PreviewMouseLeftButtonDown="Slider_MouseLeftButtonDown"
PreviewMouseLeftButtonUp="Slider_MouseLeftButtonUp"
Style="{DynamicResource SliderStyle1}" />
<Grid
x:Name="showGrid"
Grid.Row="1"
Background="#55e6e6e6"
Visibility="Visible">
<Grid.ColumnDefinitions>
<ColumnDefinition />
<ColumnDefinition />
<ColumnDefinition />
</Grid.ColumnDefinitions>
<StackPanel
Grid.ColumnSpan="3"
Margin="10,0,0,0"
Orientation="Horizontal">
<Button Margin="0,0,10,0" Click="Button_Info_Click"
Content="{StaticResource infoIconPath}"
Style="{StaticResource CustomWindowMenuIconBtn}"
ToolTip="视频信息" />
<TextBlock
x:Name="timeShow"
VerticalAlignment="Center"
Text="时间" />
</StackPanel>
<StackPanel
Grid.Column="1"
Margin="0,0,0,0"
HorizontalAlignment="Center"
Orientation="Horizontal">
<Button Margin="10,0,0,0" Click="Button_Previous_One_Click"
Content="{StaticResource mediaPreviousIconPath}"
Style="{StaticResource CustomWindowMenuIconBtn}"
ToolTip="上一个" />
<Button Margin="10,0,0,0" Click="Button_FastReverse_Click"
Content="{StaticResource mediaBackwardIconPath}"
Style="{StaticResource CustomWindowMenuIconBtn}"
ToolTip="快进" />
<Button x:Name="playButton" Margin="10,0,0,0" Click="Button_Click"
Content="{StaticResource mediaPlayIconPath}"
Style="{StaticResource CustomWindowMenuIconBtn}"
ToolTip="快进" />
<Button x:Name="pauseButton" Margin="10,0,0,0" Click="Button_Click"
Content="{StaticResource mediaPauseIconPath}" Visibility="Collapsed"
Style="{StaticResource CustomWindowMenuIconBtn}"
ToolTip="快进" />
<Button Margin="10,0,0,0" Click="Button_FastForward_Click"
Content="{StaticResource mediaForwardIconPath}"
Style="{StaticResource CustomWindowMenuIconBtn}"
ToolTip="快进" />
<Button Margin="10,0,0,0" Click="Button_Next_One_Click"
Content="{StaticResource mediaNextIconPath}"
Style="{StaticResource CustomWindowMenuIconBtn}"
ToolTip="下一个" />
<Button Margin="10,0,0,0" Click="Button_Refresh_Click"
Content="{StaticResource mediaRefreshIconPath}"
Style="{StaticResource CustomWindowMenuIconBtn}"
ToolTip="重新播放" />
</StackPanel>
<StackPanel
Grid.Column="2"
Margin="0,0,10,0"
HorizontalAlignment="Right"
VerticalAlignment="Center"
Orientation="Horizontal">
<Popup x:Name="settingPopup" StaysOpen="False" Placement="Top">
<Border Width="150" Height="200" Background="{DynamicResource CustomTheme.Theme.Color.Background}" BorderThickness="1" BorderBrush="{DynamicResource CustomTheme.Theme.Color.Border}">
<StackPanel>
<Label Content="播放设置" Style="{DynamicResource labelLineTitle}"/>
<StackPanel Orientation="Horizontal" Background="Transparent">
<Label Content="播放后" Style="{DynamicResource labelLineTitle}"/>
<ComboBox ItemsSource="{Binding PlayAfterTags}" SelectedValuePath="Value" DisplayMemberPath="Key" Selector.SelectionChanged="ComboBox_Selected" SelectedValue="{Binding PlayAfterTag}"/>
</StackPanel>
</StackPanel>
</Border>
</Popup>
<Button x:Name="settingButton" Click="SettingButton_Click"
Content="{StaticResource settingIconPath}"
ToolTip="播放设置"
Style="{StaticResource CustomWindowMenuIconBtn}"/>
<Button Click="Button_Snapshot_Click"
Content="{StaticResource mediaScreenshotIconPath}"
Style="{StaticResource CustomWindowMenuIconBtn}"
ToolTip="截图" />
<Button x:Name="fullScreenIconButton" Click="Button_FullScreen_Click"
Content="{StaticResource mediaFullScreenIconPath}"
Style="{StaticResource CustomWindowMenuIconBtn}"
ToolTip="全屏" />
<Button x:Name="canceFullScreenIconButton" Click="Button_FullScreen_Click" Visibility="Collapsed"
Content="{StaticResource mediaCancelFullScreenIconPath}"
Style="{StaticResource CustomWindowMenuIconBtn}"
ToolTip="取消全屏" />
<Button
Click="Button_List_Click"
Content="{StaticResource listIconPath}"
Style="{StaticResource CustomWindowMenuIconBtn}" ToolTip="播放列表"/>
</StackPanel>
</Grid>
</Grid>
</Grid>
<!-- 视频信息窗口 -->
<Border
x:Name="borderVideoContent"
MinWidth="200"
MinHeight="300"
Background="#55e5e5e5"
BorderBrush="Black"
BorderThickness="2"
CornerRadius="8"
Visibility="Collapsed">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="30" />
<RowDefinition />
<RowDefinition Height="20" />
</Grid.RowDefinitions>
<Label
BorderBrush="Black"
BorderThickness="0,0,0,2"
Content="视频信息" />
<Button
Margin="5"
HorizontalAlignment="Right"
Click="Button_Info_Click"
Style="{StaticResource butIconStyle}">
<Path
Width="15"
Height="15"
Data="{StaticResource closeIconPath}"
Style="{StaticResource handlIconStyle1}" />
<Button.ToolTip>
<ToolTip Content="关闭" />
</Button.ToolTip>
</Button>
<ScrollViewer
Grid.Row="1"
HorizontalScrollBarVisibility="Visible"
VerticalScrollBarVisibility="Visible">
<TextBlock x:Name="textBlockVideoContent" Margin="5" />
</ScrollViewer>
</Grid>
</Border>
</Grid>
</vlc:VideoView>
</Grid>
<!-- 分割线 -->
<GridSplitter
x:Name="gridSplitter"
Grid.Row="2"
Grid.Column="1"
Width="2"
HorizontalAlignment="Center"
VerticalAlignment="Stretch"
Background="Gray"
ShowsPreview="True" />
<!-- 播放列表 -->
<Border
Grid.Row="1"
Grid.Column="2"
BorderBrush="Black"
BorderThickness="1,1,1,0">
<StackPanel>
<ListBox
x:Name="listBox" Height="{Binding ActualHeight,ElementName=video_main}"
Background="{StaticResource translucent1}"
DisplayMemberPath="Key"
ItemsSource="{Binding MediaUrls}"
SelectedValuePath="Value"
SelectionChanged="ListBox_SelectionChanged">
<ListBox.ContextMenu>
<ContextMenu>
<MenuItem Header="另存为"/>
</ContextMenu>
</ListBox.ContextMenu>
</ListBox>
</StackPanel>
</Border>
</Grid>
</Border>
</Window>
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C#
1
https://gitee.com/fieldtianye/field-tools.-media-find-out.git
[email protected]:fieldtianye/field-tools.-media-find-out.git
fieldtianye
field-tools.-media-find-out
FieldTools.MediaFindOut
master

搜索帮助