实现提供了完整的弹幕功能,包括多行显示、不同颜色、头像支持、防重叠、椭圆形边框、透明度渐变、点击事件、字体样式设置、暂停/继续功能、过滤功能等。还包含了批处理队列处理逻辑、速率限制、错误处理和性能监控等功能。

This commit is contained in:
yangwx01
2025-03-29 17:19:12 +08:00
parent d347357448
commit 4e178cb724
119 changed files with 2578 additions and 0 deletions

9
WpfApp1/App.xaml Normal file
View File

@@ -0,0 +1,9 @@
<Application x:Class="WpfApp1.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:WpfApp1"
StartupUri="MainWindow.xaml">
<Application.Resources>
</Application.Resources>
</Application>

13
WpfApp1/App.xaml.cs Normal file
View File

@@ -0,0 +1,13 @@
using System.Configuration;
using System.Data;
using System.Windows;
namespace WpfApp1;
/// <summary>
/// Interaction logic for App.xaml
/// </summary>
public partial class App : Application
{
}

10
WpfApp1/AssemblyInfo.cs Normal file
View File

@@ -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)
)]

28
WpfApp1/MainWindow.xaml Normal file
View File

@@ -0,0 +1,28 @@
<Window x:Class="WpfApp1.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:danmu="clr-namespace:YwxAppWpfDanMu.Controls;assembly=YwxAppWpfDanMu"
mc:Ignorable="d"
Title="弹幕演示" Height="450" Width="800">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Grid Grid.Row="0">
<Grid.RowDefinitions>
<RowDefinition Height="7*"/>
<RowDefinition Height="3*"/>
</Grid.RowDefinitions>
<danmu:DanMuControl x:Name="DanMuControl" Grid.Row="0" LineCount="10" />
</Grid>
<StackPanel Grid.Row="1" Orientation="Horizontal" HorizontalAlignment="Center">
<Button Content="暂停" Width="80" Margin="5" Click="PauseButton_Click"/>
<Button Content="继续" Width="80" Margin="5" Click="ResumeButton_Click"/>
<Button Content="清空" Width="80" Margin="5" Click="ClearButton_Click"/>
<Button Content="添加测试" Width="80" Margin="5" Click="Button_Click"/>
</StackPanel>
</Grid>
</Window>

115
WpfApp1/MainWindow.xaml.cs Normal file
View File

@@ -0,0 +1,115 @@
using System.Windows;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using YwxAppWpfDanMu;
using YwxAppWpfDanMu.Controls;
using YwxAppWpfDanMu.Models;
namespace WpfApp1;
/// <summary>
/// Interaction logic for MainWindow.xaml
/// </summary>
public partial class MainWindow : Window
{
private readonly Random _random = new Random();
public MainWindow()
{
InitializeComponent();
// 订阅事件
DanMuControl.DanMuClick += OnDanMuClick;
DanMuControl.DanMuAdded += OnDanMuAdded;
DanMuControl.DanMuRemoved += OnDanMuRemoved;
}
private void OnDanMuClick(object sender, DanMuEventArgs e)
{
MessageBox.Show($"点击了弹幕: {e.Message.Content}");
}
private void OnDanMuAdded(object sender, DanMuEventArgs e)
{
// 可以在这里处理弹幕添加事件
}
private void OnDanMuRemoved(object sender, DanMuEventArgs e)
{
// 可以在这里处理弹幕移除事件
}
private void PauseButton_Click(object sender, RoutedEventArgs e)
{
DanMuControl.IsPaused = true;
}
private void ResumeButton_Click(object sender, RoutedEventArgs e)
{
DanMuControl.IsPaused = false;
}
private void ClearButton_Click(object sender, RoutedEventArgs e)
{
DanMuControl.ClearAll();
}
private void Button_Click(object sender, RoutedEventArgs e)
{
// 方法1: 添加单条弹幕
AddSingleTestDanMu();
// 方法2: 添加多条弹幕(批量)
// AddMultipleTestDanMu(5);
}
// 添加单条测试弹幕
private void AddSingleTestDanMu()
{
var colors = new[] { Colors.Red, Colors.Green, Colors.Blue, Colors.Yellow, Colors.White, Colors.Cyan, Colors.Magenta };
var fonts = new[] { "Microsoft YaHei", "SimSun", "Arial", "Segoe UI" };
var message = new DanMuMessage
{
// Content = $"这是单条测试弹幕 {DateTime.Now:HH:mm:ss}",
Content = $"这是单条测试弹幕 ",
Color = colors[_random.Next(colors.Length)],
FontSize = 12 + _random.Next(10),
FontFamily = new FontFamily(fonts[_random.Next(fonts.Length)]),
FontWeight = _random.Next(2) == 0 ? FontWeights.Normal : FontWeights.Bold,
FontStyle = _random.Next(2) == 0 ? FontStyles.Normal : FontStyles.Italic,
// Opacity = 0.7 + _random.NextDouble() * 0.3,
AvatarUrl = "https://unpkg.com/outeres@0.0.10/demo/avatar/1.jpg" // 使用占位图作为头像
};
DanMuControl.AddDanMu(message);
}
// 添加多条测试弹幕
private void AddMultipleTestDanMu(int count)
{
var messages = new List<DanMuMessage>();
var colors = new[] { Colors.Red, Colors.Green, Colors.Blue, Colors.Yellow, Colors.White, Colors.Cyan, Colors.Magenta };
var fonts = new[] { "Microsoft YaHei", "SimSun", "Arial", "Segoe UI" };
for (int i = 0; i < count; i++)
{
messages.Add(new DanMuMessage
{
Content = $"批量测试弹幕 {i + 1} - {DateTime.Now:HH:mm:ss}",
Color = colors[_random.Next(colors.Length)],
FontSize = 12 + _random.Next(10),
FontFamily = new FontFamily(fonts[_random.Next(fonts.Length)]),
FontWeight = _random.Next(2) == 0 ? FontWeights.Normal : FontWeights.Bold,
FontStyle = _random.Next(2) == 0 ? FontStyles.Normal : FontStyles.Italic,
Opacity = 0.7 + _random.NextDouble() * 0.3,
AvatarUrl = $"https://via.placeholder.com/30?text={i + 1}" // 带编号的头像
});
}
DanMuControl.AddDanMuBatch(messages);
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

32
WpfApp1/WpfApp1.csproj Normal file
View File

@@ -0,0 +1,32 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net8.0-windows</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<UseWPF>true</UseWPF>
</PropertyGroup>
<ItemGroup>
<None Remove="Resources\avatar1.png" />
<None Remove="Resources\avatar2.png" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Resources\avatar2.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\YwxAppWpfDanMu\YwxAppWpfDanMu.csproj" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\avatar1.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Resource>
</ItemGroup>
</Project>

View File

@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup />
</Project>

View File

@@ -0,0 +1,4 @@
// <autogenerated />
using System;
using System.Reflection;
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETCoreApp,Version=v8.0", FrameworkDisplayName = ".NET 8.0")]

View File

@@ -0,0 +1,71 @@
#pragma checksum "..\..\..\App.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "DCC59813AB95D23CF72F07367E2D9621042BF6D9"
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
// 运行时版本:4.0.30319.42000
//
// 对此文件的更改可能会导致不正确的行为,并且如果
// 重新生成代码,这些更改将会丢失。
// </auto-generated>
//------------------------------------------------------------------------------
using System;
using System.Diagnostics;
using System.Windows;
using System.Windows.Automation;
using System.Windows.Controls;
using System.Windows.Controls.Primitives;
using System.Windows.Controls.Ribbon;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Markup;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Media.Effects;
using System.Windows.Media.Imaging;
using System.Windows.Media.Media3D;
using System.Windows.Media.TextFormatting;
using System.Windows.Navigation;
using System.Windows.Shapes;
using System.Windows.Shell;
using WpfApp1;
namespace WpfApp1 {
/// <summary>
/// App
/// </summary>
public partial class App : System.Windows.Application {
/// <summary>
/// InitializeComponent
/// </summary>
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
[System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "9.0.3.0")]
public void InitializeComponent() {
#line 5 "..\..\..\App.xaml"
this.StartupUri = new System.Uri("MainWindow.xaml", System.UriKind.Relative);
#line default
#line hidden
}
/// <summary>
/// Application Entry Point.
/// </summary>
[System.STAThreadAttribute()]
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
[System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "9.0.3.0")]
public static void Main() {
WpfApp1.App app = new WpfApp1.App();
app.InitializeComponent();
app.Run();
}
}
}

View File

@@ -0,0 +1,122 @@
#pragma checksum "..\..\..\MainWindow.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "F66A7243C3D042690095180AF4E312C076945AB0"
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
// 运行时版本:4.0.30319.42000
//
// 对此文件的更改可能会导致不正确的行为,并且如果
// 重新生成代码,这些更改将会丢失。
// </auto-generated>
//------------------------------------------------------------------------------
using System;
using System.Diagnostics;
using System.Windows;
using System.Windows.Automation;
using System.Windows.Controls;
using System.Windows.Controls.Primitives;
using System.Windows.Controls.Ribbon;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Markup;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Media.Effects;
using System.Windows.Media.Imaging;
using System.Windows.Media.Media3D;
using System.Windows.Media.TextFormatting;
using System.Windows.Navigation;
using System.Windows.Shapes;
using System.Windows.Shell;
using YwxAppWpfDanMu.Controls;
namespace WpfApp1 {
/// <summary>
/// MainWindow
/// </summary>
public partial class MainWindow : System.Windows.Window, System.Windows.Markup.IComponentConnector {
#line 19 "..\..\..\MainWindow.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal YwxAppWpfDanMu.Controls.DanMuControl DanMuControl;
#line default
#line hidden
private bool _contentLoaded;
/// <summary>
/// InitializeComponent
/// </summary>
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
[System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "9.0.3.0")]
public void InitializeComponent() {
if (_contentLoaded) {
return;
}
_contentLoaded = true;
System.Uri resourceLocater = new System.Uri("/WpfApp1;component/mainwindow.xaml", System.UriKind.Relative);
#line 1 "..\..\..\MainWindow.xaml"
System.Windows.Application.LoadComponent(this, resourceLocater);
#line default
#line hidden
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
[System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "9.0.3.0")]
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1800:DoNotCastUnnecessarily")]
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
switch (connectionId)
{
case 1:
this.DanMuControl = ((YwxAppWpfDanMu.Controls.DanMuControl)(target));
return;
case 2:
#line 22 "..\..\..\MainWindow.xaml"
((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.PauseButton_Click);
#line default
#line hidden
return;
case 3:
#line 23 "..\..\..\MainWindow.xaml"
((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.ResumeButton_Click);
#line default
#line hidden
return;
case 4:
#line 24 "..\..\..\MainWindow.xaml"
((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.ClearButton_Click);
#line default
#line hidden
return;
case 5:
#line 25 "..\..\..\MainWindow.xaml"
((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Button_Click);
#line default
#line hidden
return;
}
this._contentLoaded = true;
}
}
}

View File

@@ -0,0 +1,6 @@
// <auto-generated/>
global using global::System;
global using global::System.Collections.Generic;
global using global::System.Linq;
global using global::System.Threading;
global using global::System.Threading.Tasks;

Binary file not shown.

View File

@@ -0,0 +1,24 @@
D:\repos\WpfApp1\obj\Debug\net8.0-windows\App.g.cs
D:\repos\WpfApp1\obj\Debug\net8.0-windows\WpfApp1_MarkupCompile.cache
D:\repos\WpfApp1\obj\Debug\net8.0-windows\WpfApp1.csproj.AssemblyReference.cache
D:\repos\WpfApp1\obj\Debug\net8.0-windows\MainWindow.baml
D:\repos\WpfApp1\obj\Debug\net8.0-windows\MainWindow.g.cs
D:\repos\WpfApp1\obj\Debug\net8.0-windows\WpfApp1.g.resources
D:\repos\WpfApp1\obj\Debug\net8.0-windows\WpfApp1.GeneratedMSBuildEditorConfig.editorconfig
D:\repos\WpfApp1\obj\Debug\net8.0-windows\WpfApp1.AssemblyInfoInputs.cache
D:\repos\WpfApp1\obj\Debug\net8.0-windows\WpfApp1.AssemblyInfo.cs
D:\repos\WpfApp1\obj\Debug\net8.0-windows\WpfApp1.csproj.CoreCompileInputs.cache
D:\repos\WpfApp1\bin\Debug\net8.0-windows\Resources\avatar2.png
D:\repos\WpfApp1\bin\Debug\net8.0-windows\WpfApp1.exe
D:\repos\WpfApp1\bin\Debug\net8.0-windows\WpfApp1.deps.json
D:\repos\WpfApp1\bin\Debug\net8.0-windows\WpfApp1.runtimeconfig.json
D:\repos\WpfApp1\bin\Debug\net8.0-windows\WpfApp1.dll
D:\repos\WpfApp1\bin\Debug\net8.0-windows\WpfApp1.pdb
D:\repos\WpfApp1\bin\Debug\net8.0-windows\YwxAppWpfDanMu.dll
D:\repos\WpfApp1\bin\Debug\net8.0-windows\YwxAppWpfDanMu.pdb
D:\repos\WpfApp1\obj\Debug\net8.0-windows\WpfApp1.csproj.Up2Date
D:\repos\WpfApp1\obj\Debug\net8.0-windows\WpfApp1.dll
D:\repos\WpfApp1\obj\Debug\net8.0-windows\refint\WpfApp1.dll
D:\repos\WpfApp1\obj\Debug\net8.0-windows\WpfApp1.pdb
D:\repos\WpfApp1\obj\Debug\net8.0-windows\WpfApp1.genruntimeconfig.cache
D:\repos\WpfApp1\obj\Debug\net8.0-windows\ref\WpfApp1.dll

View File

@@ -0,0 +1,11 @@
{
"runtimeTarget": {
"name": ".NETCoreApp,Version=v8.0",
"signature": ""
},
"compilationOptions": {},
"targets": {
".NETCoreApp,Version=v8.0": {}
},
"libraries": {}
}

View File

@@ -0,0 +1,25 @@
{
"runtimeOptions": {
"tfm": "net8.0",
"frameworks": [
{
"name": "Microsoft.NETCore.App",
"version": "8.0.0"
},
{
"name": "Microsoft.WindowsDesktop.App",
"version": "8.0.0"
}
],
"additionalProbingPaths": [
"C:\\Users\\shiy7\\.dotnet\\store\\|arch|\\|tfm|",
"C:\\Users\\shiy7\\.nuget\\packages",
"C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages"
],
"configProperties": {
"System.Runtime.Serialization.EnableUnsafeBinaryFormatterSerialization": true,
"CSWINRT_USE_WINDOWS_UI_XAML_PROJECTIONS": false,
"Microsoft.NETCore.DotNetHostPolicy.SetAppPaths": true
}
}
}

View File

@@ -0,0 +1,20 @@
WpfApp1
1.0.0.0
winexe
C#
.cs
D:\repos\YwxAppWpfDanMu\WpfApp1\obj\Debug\net8.0-windows\
WpfApp1
none
false
TRACE;DEBUG;NET;NET8_0;NETCOREAPP;WINDOWS;WINDOWS7_0;NET5_0_OR_GREATER;NET6_0_OR_GREATER;NET7_0_OR_GREATER;NET8_0_OR_GREATER;NETCOREAPP3_0_OR_GREATER;NETCOREAPP3_1_OR_GREATER;WINDOWS7_0_OR_GREATER
D:\repos\YwxAppWpfDanMu\WpfApp1\App.xaml
11407045341
6-294469655
1991235962195
MainWindow.xaml;
False

View File

@@ -0,0 +1,25 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
// 运行时版本:4.0.30319.42000
//
// 对此文件的更改可能会导致不正确的行为,并且如果
// 重新生成代码,这些更改将会丢失。
// </auto-generated>
//------------------------------------------------------------------------------
using System;
using System.Reflection;
[assembly: System.Reflection.AssemblyCompanyAttribute("WpfApp1")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")]
[assembly: System.Reflection.AssemblyProductAttribute("WpfApp1")]
[assembly: System.Reflection.AssemblyTitleAttribute("WpfApp1")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
[assembly: System.Runtime.Versioning.TargetPlatformAttribute("Windows7.0")]
[assembly: System.Runtime.Versioning.SupportedOSPlatformAttribute("Windows7.0")]
// 由 MSBuild WriteCodeFragment 类生成。

View File

@@ -0,0 +1 @@
5ac7be5a9a219a310f512482b3871af9c403f9ef5ecf304e7b56289ac0d20745

View File

@@ -0,0 +1,16 @@
is_global = true
build_property.TargetFramework = net8.0-windows
build_property.TargetPlatformMinVersion = 7.0
build_property.UsingMicrosoftNETSdkWeb =
build_property.ProjectTypeGuids =
build_property.InvariantGlobalization =
build_property.PlatformNeutralAssembly =
build_property.EnforceExtendedAnalyzerRules =
build_property._SupportedPlatformList = Linux,macOS,Windows
build_property.RootNamespace = WpfApp1
build_property.ProjectDir = D:\repos\WpfApp1\
build_property.EnableComHosting =
build_property.EnableGeneratedComInterfaceComImportInterop =
build_property.CsWinRTUseWindowsUIXamlProjections = false
build_property.EffectiveAnalysisLevelStyle = 8.0
build_property.EnableCodeStyleSeverity =

View File

@@ -0,0 +1,6 @@
// <auto-generated/>
global using global::System;
global using global::System.Collections.Generic;
global using global::System.Linq;
global using global::System.Threading;
global using global::System.Threading.Tasks;

View File

@@ -0,0 +1,25 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
// 运行时版本:4.0.30319.42000
//
// 对此文件的更改可能会导致不正确的行为,并且如果
// 重新生成代码,这些更改将会丢失。
// </auto-generated>
//------------------------------------------------------------------------------
using System;
using System.Reflection;
[assembly: System.Reflection.AssemblyCompanyAttribute("WpfApp1")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")]
[assembly: System.Reflection.AssemblyProductAttribute("WpfApp1")]
[assembly: System.Reflection.AssemblyTitleAttribute("WpfApp1")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
[assembly: System.Runtime.Versioning.TargetPlatformAttribute("Windows7.0")]
[assembly: System.Runtime.Versioning.SupportedOSPlatformAttribute("Windows7.0")]
// 由 MSBuild WriteCodeFragment 类生成。

View File

@@ -0,0 +1 @@
5ac7be5a9a219a310f512482b3871af9c403f9ef5ecf304e7b56289ac0d20745

View File

@@ -0,0 +1,16 @@
is_global = true
build_property.TargetFramework = net8.0-windows
build_property.TargetPlatformMinVersion = 7.0
build_property.UsingMicrosoftNETSdkWeb =
build_property.ProjectTypeGuids =
build_property.InvariantGlobalization =
build_property.PlatformNeutralAssembly =
build_property.EnforceExtendedAnalyzerRules =
build_property._SupportedPlatformList = Linux,macOS,Windows
build_property.RootNamespace = WpfApp1
build_property.ProjectDir = D:\repos\WpfApp1\
build_property.EnableComHosting =
build_property.EnableGeneratedComInterfaceComImportInterop =
build_property.CsWinRTUseWindowsUIXamlProjections = false
build_property.EffectiveAnalysisLevelStyle = 8.0
build_property.EnableCodeStyleSeverity =

View File

@@ -0,0 +1,6 @@
// <auto-generated/>
global using global::System;
global using global::System.Collections.Generic;
global using global::System.Linq;
global using global::System.Threading;
global using global::System.Threading.Tasks;

View File

@@ -0,0 +1,25 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
// 运行时版本:4.0.30319.42000
//
// 对此文件的更改可能会导致不正确的行为,并且如果
// 重新生成代码,这些更改将会丢失。
// </auto-generated>
//------------------------------------------------------------------------------
using System;
using System.Reflection;
[assembly: System.Reflection.AssemblyCompanyAttribute("WpfApp1")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")]
[assembly: System.Reflection.AssemblyProductAttribute("WpfApp1")]
[assembly: System.Reflection.AssemblyTitleAttribute("WpfApp1")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
[assembly: System.Runtime.Versioning.TargetPlatformAttribute("Windows7.0")]
[assembly: System.Runtime.Versioning.SupportedOSPlatformAttribute("Windows7.0")]
// 由 MSBuild WriteCodeFragment 类生成。

View File

@@ -0,0 +1 @@
5ac7be5a9a219a310f512482b3871af9c403f9ef5ecf304e7b56289ac0d20745

View File

@@ -0,0 +1,16 @@
is_global = true
build_property.TargetFramework = net8.0-windows
build_property.TargetPlatformMinVersion = 7.0
build_property.UsingMicrosoftNETSdkWeb =
build_property.ProjectTypeGuids =
build_property.InvariantGlobalization =
build_property.PlatformNeutralAssembly =
build_property.EnforceExtendedAnalyzerRules =
build_property._SupportedPlatformList = Linux,macOS,Windows
build_property.RootNamespace = WpfApp1
build_property.ProjectDir = D:\repos\WpfApp1\
build_property.EnableComHosting =
build_property.EnableGeneratedComInterfaceComImportInterop =
build_property.CsWinRTUseWindowsUIXamlProjections = false
build_property.EffectiveAnalysisLevelStyle = 8.0
build_property.EnableCodeStyleSeverity =

View File

@@ -0,0 +1,6 @@
// <auto-generated/>
global using global::System;
global using global::System.Collections.Generic;
global using global::System.Linq;
global using global::System.Threading;
global using global::System.Threading.Tasks;

Binary file not shown.

View File

@@ -0,0 +1,148 @@
{
"format": 1,
"restore": {
"D:\\repos\\YwxAppWpfDanMu\\WpfApp1\\WpfApp1.csproj": {}
},
"projects": {
"D:\\repos\\YwxAppWpfDanMu\\WpfApp1\\WpfApp1.csproj": {
"version": "1.0.0",
"restore": {
"projectUniqueName": "D:\\repos\\YwxAppWpfDanMu\\WpfApp1\\WpfApp1.csproj",
"projectName": "WpfApp1",
"projectPath": "D:\\repos\\YwxAppWpfDanMu\\WpfApp1\\WpfApp1.csproj",
"packagesPath": "C:\\Users\\shiy7\\.nuget\\packages\\",
"outputPath": "D:\\repos\\YwxAppWpfDanMu\\WpfApp1\\obj\\",
"projectStyle": "PackageReference",
"fallbackFolders": [
"C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages"
],
"configFilePaths": [
"C:\\Users\\shiy7\\AppData\\Roaming\\NuGet\\NuGet.Config",
"C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.FallbackLocation.config",
"C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config"
],
"originalTargetFrameworks": [
"net8.0-windows"
],
"sources": {
"C:\\Program Files (x86)\\Microsoft SDKs\\NuGetPackages\\": {},
"https://api.nuget.org/v3/index.json": {}
},
"frameworks": {
"net8.0-windows7.0": {
"targetAlias": "net8.0-windows",
"projectReferences": {
"D:\\repos\\YwxAppWpfDanMu\\YwxAppWpfDanMu\\YwxAppWpfDanMu.csproj": {
"projectPath": "D:\\repos\\YwxAppWpfDanMu\\YwxAppWpfDanMu\\YwxAppWpfDanMu.csproj"
}
}
}
},
"warningProperties": {
"warnAsError": [
"NU1605"
]
},
"restoreAuditProperties": {
"enableAudit": "true",
"auditLevel": "low",
"auditMode": "direct"
},
"SdkAnalysisLevel": "9.0.200"
},
"frameworks": {
"net8.0-windows7.0": {
"targetAlias": "net8.0-windows",
"imports": [
"net461",
"net462",
"net47",
"net471",
"net472",
"net48",
"net481"
],
"assetTargetFallback": true,
"warn": true,
"frameworkReferences": {
"Microsoft.NETCore.App": {
"privateAssets": "all"
},
"Microsoft.WindowsDesktop.App.WPF": {
"privateAssets": "none"
}
},
"runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\9.0.201/PortableRuntimeIdentifierGraph.json"
}
}
},
"D:\\repos\\YwxAppWpfDanMu\\YwxAppWpfDanMu\\YwxAppWpfDanMu.csproj": {
"version": "1.0.0",
"restore": {
"projectUniqueName": "D:\\repos\\YwxAppWpfDanMu\\YwxAppWpfDanMu\\YwxAppWpfDanMu.csproj",
"projectName": "YwxAppWpfDanMu",
"projectPath": "D:\\repos\\YwxAppWpfDanMu\\YwxAppWpfDanMu\\YwxAppWpfDanMu.csproj",
"packagesPath": "C:\\Users\\shiy7\\.nuget\\packages\\",
"outputPath": "D:\\repos\\YwxAppWpfDanMu\\YwxAppWpfDanMu\\obj\\",
"projectStyle": "PackageReference",
"fallbackFolders": [
"C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages"
],
"configFilePaths": [
"C:\\Users\\shiy7\\AppData\\Roaming\\NuGet\\NuGet.Config",
"C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.FallbackLocation.config",
"C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config"
],
"originalTargetFrameworks": [
"net8.0-windows"
],
"sources": {
"C:\\Program Files (x86)\\Microsoft SDKs\\NuGetPackages\\": {},
"https://api.nuget.org/v3/index.json": {}
},
"frameworks": {
"net8.0-windows7.0": {
"targetAlias": "net8.0-windows",
"projectReferences": {}
}
},
"warningProperties": {
"warnAsError": [
"NU1605"
]
},
"restoreAuditProperties": {
"enableAudit": "true",
"auditLevel": "low",
"auditMode": "direct"
},
"SdkAnalysisLevel": "9.0.200"
},
"frameworks": {
"net8.0-windows7.0": {
"targetAlias": "net8.0-windows",
"imports": [
"net461",
"net462",
"net47",
"net471",
"net472",
"net48",
"net481"
],
"assetTargetFallback": true,
"warn": true,
"frameworkReferences": {
"Microsoft.NETCore.App": {
"privateAssets": "all"
},
"Microsoft.WindowsDesktop.App.WPF": {
"privateAssets": "none"
}
},
"runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\9.0.201/PortableRuntimeIdentifierGraph.json"
}
}
}
}
}

View File

@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
<RestoreSuccess Condition=" '$(RestoreSuccess)' == '' ">True</RestoreSuccess>
<RestoreTool Condition=" '$(RestoreTool)' == '' ">NuGet</RestoreTool>
<ProjectAssetsFile Condition=" '$(ProjectAssetsFile)' == '' ">$(MSBuildThisFileDirectory)project.assets.json</ProjectAssetsFile>
<NuGetPackageRoot Condition=" '$(NuGetPackageRoot)' == '' ">$(UserProfile)\.nuget\packages\</NuGetPackageRoot>
<NuGetPackageFolders Condition=" '$(NuGetPackageFolders)' == '' ">C:\Users\shiy7\.nuget\packages\;C:\Program Files (x86)\Microsoft Visual Studio\Shared\NuGetPackages</NuGetPackageFolders>
<NuGetProjectStyle Condition=" '$(NuGetProjectStyle)' == '' ">PackageReference</NuGetProjectStyle>
<NuGetToolVersion Condition=" '$(NuGetToolVersion)' == '' ">6.13.2</NuGetToolVersion>
</PropertyGroup>
<ItemGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
<SourceRoot Include="C:\Users\shiy7\.nuget\packages\" />
<SourceRoot Include="C:\Program Files (x86)\Microsoft Visual Studio\Shared\NuGetPackages\" />
</ItemGroup>
</Project>

View File

@@ -0,0 +1,2 @@
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" />

View File

@@ -0,0 +1,108 @@
{
"version": 3,
"targets": {
"net8.0-windows7.0": {
"YwxAppWpfDanMu/1.0.0": {
"type": "project",
"framework": ".NETCoreApp,Version=v8.0",
"compile": {
"bin/placeholder/YwxAppWpfDanMu.dll": {}
},
"runtime": {
"bin/placeholder/YwxAppWpfDanMu.dll": {}
},
"frameworkReferences": [
"Microsoft.WindowsDesktop.App.WPF"
]
}
}
},
"libraries": {
"YwxAppWpfDanMu/1.0.0": {
"type": "project",
"path": "../YwxAppWpfDanMu/YwxAppWpfDanMu.csproj",
"msbuildProject": "../YwxAppWpfDanMu/YwxAppWpfDanMu.csproj"
}
},
"projectFileDependencyGroups": {
"net8.0-windows7.0": [
"YwxAppWpfDanMu >= 1.0.0"
]
},
"packageFolders": {
"C:\\Users\\shiy7\\.nuget\\packages\\": {},
"C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages": {}
},
"project": {
"version": "1.0.0",
"restore": {
"projectUniqueName": "D:\\repos\\YwxAppWpfDanMu\\WpfApp1\\WpfApp1.csproj",
"projectName": "WpfApp1",
"projectPath": "D:\\repos\\YwxAppWpfDanMu\\WpfApp1\\WpfApp1.csproj",
"packagesPath": "C:\\Users\\shiy7\\.nuget\\packages\\",
"outputPath": "D:\\repos\\YwxAppWpfDanMu\\WpfApp1\\obj\\",
"projectStyle": "PackageReference",
"fallbackFolders": [
"C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages"
],
"configFilePaths": [
"C:\\Users\\shiy7\\AppData\\Roaming\\NuGet\\NuGet.Config",
"C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.FallbackLocation.config",
"C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config"
],
"originalTargetFrameworks": [
"net8.0-windows"
],
"sources": {
"C:\\Program Files (x86)\\Microsoft SDKs\\NuGetPackages\\": {},
"https://api.nuget.org/v3/index.json": {}
},
"frameworks": {
"net8.0-windows7.0": {
"targetAlias": "net8.0-windows",
"projectReferences": {
"D:\\repos\\YwxAppWpfDanMu\\YwxAppWpfDanMu\\YwxAppWpfDanMu.csproj": {
"projectPath": "D:\\repos\\YwxAppWpfDanMu\\YwxAppWpfDanMu\\YwxAppWpfDanMu.csproj"
}
}
}
},
"warningProperties": {
"warnAsError": [
"NU1605"
]
},
"restoreAuditProperties": {
"enableAudit": "true",
"auditLevel": "low",
"auditMode": "direct"
},
"SdkAnalysisLevel": "9.0.200"
},
"frameworks": {
"net8.0-windows7.0": {
"targetAlias": "net8.0-windows",
"imports": [
"net461",
"net462",
"net47",
"net471",
"net472",
"net48",
"net481"
],
"assetTargetFallback": true,
"warn": true,
"frameworkReferences": {
"Microsoft.NETCore.App": {
"privateAssets": "all"
},
"Microsoft.WindowsDesktop.App.WPF": {
"privateAssets": "none"
}
},
"runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\9.0.201/PortableRuntimeIdentifierGraph.json"
}
}
}
}