From ad545e9cad25772ce44ec9bba1d021e6e5d71934 Mon Sep 17 00:00:00 2001 From: editor <@51Aspx.com> Date: Wed, 19 Jun 2024 18:24:41 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=9D=E5=A7=8B=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 51Aspx源码必读.txt | 54 ++++++++++++++++++++++++++++++++ App.xaml | 9 ++++++ App.xaml.cs | 15 +++++++++ AssemblyInfo.cs | 10 ++++++ Ball.cs | 15 +++++++++ MainWindow.xaml | 12 +++++++ MainWindow.xaml.cs | 15 +++++++++ ParticleGarden.cs | 15 +++++++++ WPFSkiaParticleGardenDemo.csproj | 14 +++++++++ 9 files changed, 159 insertions(+) create mode 100644 51Aspx源码必读.txt create mode 100644 App.xaml create mode 100644 App.xaml.cs create mode 100644 AssemblyInfo.cs create mode 100644 Ball.cs create mode 100644 MainWindow.xaml create mode 100644 MainWindow.xaml.cs create mode 100644 ParticleGarden.cs create mode 100644 WPFSkiaParticleGardenDemo.csproj diff --git a/51Aspx源码必读.txt b/51Aspx源码必读.txt new file mode 100644 index 0000000..a668e20 --- /dev/null +++ b/51Aspx源码必读.txt @@ -0,0 +1,54 @@ +WPF自绘粒子花园 + + + 一、源码描述 + + + WPF自绘粒子花园 + + + 环境:VS2022 WPF + + + + + + 二、功能介绍 + + + 通过SkiaSharp结合WPF的自绘实现粒子花园的效果。 + + + + + + 三、注意事项 + + + ctrl+F5运行即可。 + + + + + + +作者: coderbest + +如需获得该源码的视频、更新等更多资料请访问: https://www.51aspx.com/Code/ParticleGarden +------------------------------------------------------------------------------------------------ + + 源码服务专家 + 官网: https://www.51aspx.com + 讨论圈: https://club.51aspx.com/ + +平台声明: + +1.51Aspx平台上提供下载的资源为免费、共享、商业三类源码,其中免费和共享源码仅供个人学习和研究使用,商业源码请在相应的授权许可条件下使用; +2.51Aspx平台对提供下载的软件及其它资源不拥有任何权利,其版权归属源码合法拥有者所有; +3.著作权人发现本网站载有侵害其合法权益的内容或作品,请与我们联系( 登录官网与客服反馈或发送邮件到support@51Aspx.com ); +4.51Aspx平台不保证提供的下载资源的准确性、安全性和完整性; + +友情提示: + 一般数据库文件默认在 DB_51Aspx 文件夹下 + 默认账号密码一般均为51Aspx + 关于源码使用常见问题及解决方案,请参阅: https://www.51aspx.com/Help diff --git a/App.xaml b/App.xaml new file mode 100644 index 0000000..6accb3b --- /dev/null +++ b/App.xaml @@ -0,0 +1,9 @@ + + + + + diff --git a/App.xaml.cs b/App.xaml.cs new file mode 100644 index 0000000..74edf79 --- /dev/null +++ b/App.xaml.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Configuration; +using System.Data; +using System.Linq; +using System.Threading.Tasks; +using System.Windows; + +namespace WPFSkiaParticleGardenDemo +{ + /// + /// Interaction logic for App.xaml + /// + public partial class App : Application + { diff --git a/AssemblyInfo.cs b/AssemblyInfo.cs new file mode 100644 index 0000000..8b5504e --- /dev/null +++ b/AssemblyInfo.cs @@ -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) +)] diff --git a/Ball.cs b/Ball.cs new file mode 100644 index 0000000..f8607c0 --- /dev/null +++ b/Ball.cs @@ -0,0 +1,15 @@ +using SkiaSharp; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace WPFSkiaParticleGardenDemo +{ +public class Ball +{ + public double X { get; set; } + public double Y { get; set; } + public double VX { get; set; } + public double VY { get; set; } diff --git a/MainWindow.xaml b/MainWindow.xaml new file mode 100644 index 0000000..9f48a3e --- /dev/null +++ b/MainWindow.xaml @@ -0,0 +1,12 @@ + + + + + diff --git a/MainWindow.xaml.cs b/MainWindow.xaml.cs new file mode 100644 index 0000000..e7bd94d --- /dev/null +++ b/MainWindow.xaml.cs @@ -0,0 +1,15 @@ +using SkiaSharp; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading; +using System.Threading.Tasks; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Data; +using System.Windows.Documents; +using System.Windows.Input; +using System.Windows.Media; +using System.Windows.Media.Imaging; +using System.Windows.Navigation; diff --git a/ParticleGarden.cs b/ParticleGarden.cs new file mode 100644 index 0000000..8609a38 --- /dev/null +++ b/ParticleGarden.cs @@ -0,0 +1,15 @@ +using SkiaSharp; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace WPFSkiaParticleGardenDemo +{ + /// + /// 粒子花园 + /// + public class ParticleGarden + { + public SKPoint centerPoint; diff --git a/WPFSkiaParticleGardenDemo.csproj b/WPFSkiaParticleGardenDemo.csproj new file mode 100644 index 0000000..20536ad --- /dev/null +++ b/WPFSkiaParticleGardenDemo.csproj @@ -0,0 +1,14 @@ + + + + WinExe + net6.0-windows + enable + true + + + + + + +