This repository has been archived by the owner on Jan 15, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ae585ff
commit e6f9b8b
Showing
9 changed files
with
948 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<?xml version="1.0" encoding="utf-8" ?> | ||
<configuration> | ||
<appSettings> | ||
<add key="Speed" value="5"/> | ||
<add key="Range" value="5"/> | ||
<add key="Opacity" value="0.7"/> | ||
<add key="Ratio" value="1"/> | ||
<add key="WindowOpacity" value="0.2"/> | ||
</appSettings> | ||
</configuration> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
<Application x:Class="DanmuXml.App" | ||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | ||
xmlns:local="clr-namespace:DanmuXml" | ||
StartupUri="MainWindow.xaml"> | ||
<Application.Resources> | ||
<Style x:Key="MyButton" TargetType="Button"> | ||
<Setter Property="OverridesDefaultStyle" Value="True" /> | ||
<Setter Property="Cursor" Value="Hand" /> | ||
<Setter Property="Template"> | ||
<Setter.Value> | ||
<ControlTemplate TargetType="Button"> | ||
<Border Name="border" Background="#33000000" BorderThickness="0" BorderBrush="Black" CornerRadius="5,5,5,5"> | ||
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/> | ||
</Border> | ||
<ControlTemplate.Triggers> | ||
<Trigger Property="IsMouseOver" Value="True"> | ||
<Setter Property="Opacity" Value="0.8" /> | ||
</Trigger> | ||
</ControlTemplate.Triggers> | ||
</ControlTemplate> | ||
</Setter.Value> | ||
</Setter> | ||
</Style> | ||
<Style x:Key="DanMuBlock" TargetType="TextBlock"> | ||
<Setter Property="OverridesDefaultStyle" Value="True" /> | ||
<Setter Property="FontSize" Value="25"/> | ||
<Setter Property="Foreground" Value="White"/> | ||
<Setter Property="Width" Value="NaN"/> | ||
<Setter Property="Height" Value="33"/> | ||
<Setter Property="Effect"> | ||
<Setter.Value> | ||
<DropShadowEffect Color="#464646" BlurRadius="2" ShadowDepth="2" Opacity="1"/> | ||
</Setter.Value> | ||
</Setter> | ||
</Style> | ||
|
||
<Style x:Key="NewTabItem" TargetType="{x:Type TabItem}"> | ||
<!--<Setter Property="FocusVisualStyle" Value="{x:null}"/>--> | ||
<Setter Property="Foreground" Value="Transparent"/> | ||
<Setter Property="FontSize" Value="16"/> | ||
<Setter Property="HorizontalContentAlignment" Value="Stretch"/> | ||
<Setter Property="VerticalContentAlignment" Value="Stretch"/> | ||
<Setter Property="Template"> | ||
<Setter.Value> | ||
<ControlTemplate TargetType="{x:Type TabItem}"> | ||
<Grid SnapsToDevicePixels="true" Height="40" MinWidth="110"> | ||
<Path Margin="0,0,0,-12" x:Name="PATH" Visibility="Collapsed" Data="M0.5,0.5 L109.5,0.5 109.5,39.5 64,40 57,51 49,40 0.5,39.5 z" Fill="Transparent" Height="51.5" Stretch="Fill" Stroke="Transparent" Width="110"/> | ||
<Border Name="Bd" Background="Gray" Opacity="0.5" CornerRadius="5,5,0,0"> | ||
<ContentPresenter Margin="5,0,5,0" Name="Content" ContentSource="Header" HorizontalAlignment="{Binding HorizontalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{Binding VerticalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"/> | ||
</Border> | ||
</Grid> | ||
<ControlTemplate.Triggers> | ||
<MultiTrigger> | ||
<MultiTrigger.Conditions> | ||
<Condition Property="IsSelected" Value="True"/> | ||
<Condition Property="TabStripPlacement" Value="Top"/> | ||
</MultiTrigger.Conditions> | ||
<Setter Property="Visibility" Value="Visible" TargetName="PATH"/> | ||
<Setter Property="Background" Value="Black" TargetName="Bd"/> | ||
</MultiTrigger> | ||
</ControlTemplate.Triggers> | ||
</ControlTemplate> | ||
</Setter.Value> | ||
</Setter> | ||
</Style> | ||
</Application.Resources> | ||
</Application> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Configuration; | ||
using System.Data; | ||
using System.Linq; | ||
using System.Threading.Tasks; | ||
using System.Windows; | ||
|
||
namespace DanmuXml | ||
{ | ||
/// <summary> | ||
/// Interaction logic for App.xaml | ||
/// </summary> | ||
public partial class App : Application | ||
{ | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
using System.Windows; | ||
|
||
[assembly: ThemeInfo( | ||
ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located | ||
//(used if a resource is not found in the page, | ||
// or application resource dictionaries) | ||
ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located | ||
//(used if a resource is not found in the page, | ||
// app, or any theme specific resource dictionaries) | ||
)] |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
<Window x:Name="mainwindow" x:Class="DanmuXml.MainWindow" | ||
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:local="clr-namespace:DanmuXml" | ||
mc:Ignorable="d" | ||
Height="360" Width="640" MinHeight = "360" MinWidth = "640" | ||
AllowsTransparency="True" Background="Transparent" WindowStyle="None" | ||
AllowDrop="True" Drop="WDrop" DragEnter="WDrag_Enter" ResizeMode="CanResizeWithGrip" KeyDown="MainWindow_KeyDown"> | ||
<Grid x:Name="grid" Background="Transparent" MouseDown="DoubleClick"> | ||
<Border x:Name="BBackGround" CornerRadius="5,5,5,5" Background="#000000" Opacity="0.2"/> | ||
<Canvas x:Name="canvas"/> | ||
<TextBlock x:Name="textblock" Width="550" Height="92" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="72" Foreground="White" TextAlignment="Center" Text="xml弹幕播放器"> | ||
<TextBlock.Effect> | ||
<DropShadowEffect Color="#464646" BlurRadius="2" ShadowDepth="2" Opacity="1"/> | ||
</TextBlock.Effect> | ||
</TextBlock> | ||
<TextBlock x:Name="Pathtextblock" Height="80" HorizontalAlignment="Stretch" VerticalAlignment="Top" FontSize="24" Foreground="White" TextAlignment="Center" Margin="0,20,0,0" Opacity="0"> | ||
<TextBlock.Effect> | ||
<DropShadowEffect Color="#464646" BlurRadius="2" ShadowDepth="2" Opacity="1"/> | ||
</TextBlock.Effect> | ||
</TextBlock> | ||
<Border Background="Transparent" Width="180" Height="100" HorizontalAlignment="Right" VerticalAlignment="Top" MouseEnter="Border_MouseEnter" Mouse.MouseLeave="Border_MouseLeave"> | ||
<StackPanel Orientation="Horizontal" VerticalAlignment="Top" Height="30" Margin="55,0,0,0" HorizontalAlignment="Right"> | ||
<Button Width="30" Height="30" x:Name="BFront" Click="FrontClick" Foreground="LightGray" Visibility="Hidden" Style="{StaticResource MyButton}" Content="☒" FontSize="24"/> | ||
<Button Width="30" Height="30" x:Name="BSetting" Click="SettingClick" Foreground="LightGray" Visibility="Hidden" Style="{StaticResource MyButton}" Content="❃" FontSize="23"/> | ||
<Button Width="30" Height="30" x:Name="BClose" Click="CloseClick" Foreground="LightGray" Visibility="Hidden" Style="{StaticResource MyButton}" Content="✖" FontSize="15" FontWeight="Bold"/> | ||
</StackPanel> | ||
</Border> | ||
<Border Background="Transparent" Width="100" Height="100" HorizontalAlignment="Left" VerticalAlignment="Top" MouseEnter="BFile_MouseEnter" Mouse.MouseLeave="BFile_MouseLeave"> | ||
<Button Width="30" Height="30" x:Name="BFile" Click="FileClick" Foreground="LightGray" Visibility="Hidden" Style="{StaticResource MyButton}" FontWeight="Bold" HorizontalAlignment="Left" VerticalAlignment="Top"> | ||
<Button.Content> | ||
<TextBlock FontSize="20" Text="…" VerticalAlignment="Top" Margin="0,-19"/> | ||
</Button.Content> | ||
</Button> | ||
</Border> | ||
|
||
<Grid x:Name="ControlGrid" Visibility="Hidden" Height="120" VerticalAlignment="Bottom" HorizontalAlignment="Stretch" MouseEnter="Grid_MouseEnter" MouseLeave="Grid_MouseLeave" Background="Transparent" > | ||
<Button x:Name="Play" Width="40" Visibility="Hidden" Height="40" VerticalAlignment="Bottom" HorizontalAlignment="Left" Content="▶" FontSize="25" Click="PlayPause" Foreground="LightGray" BorderThickness="0,0,0,0" Style="{StaticResource MyButton}"/> | ||
<TextBox x:Name="PlayTime" Width="90" Visibility="Hidden" Height="18" VerticalAlignment="Bottom" HorizontalAlignment="Left" Margin="45,0,0,12" Opacity="0.7" Foreground="White" BorderThickness="0,0,0,0" Background="#33000000" TextAlignment="Center" KeyDown="PlayTime_KeyDown" GotKeyboardFocus="PlayTime_GotKeyboardFocus" LostKeyboardFocus="PlayTime_LostKeyboardFocus"/> | ||
<Slider x:Name="slider" Minimum="0" Visibility="Hidden" Height="20" VerticalAlignment="Bottom" MouseLeftButtonUp="SliderPressed" Margin="140,0,50,10" Opacity="0.8" /> | ||
</Grid> | ||
</Grid> | ||
</Window> |
Oops, something went wrong.