WPF 实现火炬效果

 WPF开发者QQ群: 340500857  | 微信群 -> 进入公众号主页 加入组织

欢迎转发、分享、点赞、在看,谢谢~。ad294de29e6f31a4dde6e4002ced8539.png  

01

效果预览

02


代码如下

一、FireControl.cs 代码如下

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;namespace WPFDevelopers.Controls
{public class FireControl : Control{static FireControl(){DefaultStyleKeyProperty.OverrideMetadata(typeof(FireControl), new FrameworkPropertyMetadata(typeof(FireControl)));}public bool IsStart{get { return (bool)GetValue(IsStartProperty); }set { SetValue(IsStartProperty, value); }}// Using a DependencyProperty as the backing store for IsStart.  This enables animation, styling, binding, etc...public static readonly DependencyProperty IsStartProperty =DependencyProperty.Register("IsStart", typeof(bool), typeof(FireControl), new PropertyMetadata(default(bool)));}
}

二、OtherControl.xaml 代码如下

<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"xmlns:controls="clr-namespace:WPFDevelopers.Controls"><Style TargetType="controls:FireControl"><Setter Property="Background" Value="Transparent"/><Setter Property="Template"><Setter.Value><ControlTemplate TargetType="controls:FireControl"><ControlTemplate.Resources><Storyboard x:Key="PART_Fire_Storyboard" RepeatBehavior="Forever" Duration="0:0:0.1"><DoubleAnimationUsingKeyFrames Storyboard.TargetName="PART_Container" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(RotateTransform.Angle)"><LinearDoubleKeyFrame Value="-1" KeyTime="0:0:0" /><LinearDoubleKeyFrame Value="1" KeyTime="0:0:0.2" /><LinearDoubleKeyFrame Value="-1" KeyTime="0:0:0.4" /><LinearDoubleKeyFrame Value="1" KeyTime="0:0:0.6" /><LinearDoubleKeyFrame Value="-1" KeyTime="0:0:0.8" /><LinearDoubleKeyFrame Value="1" KeyTime="0:0:1" /></DoubleAnimationUsingKeyFrames><DoubleAnimationUsingKeyFrames Storyboard.TargetName="PART_Container" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[1].(ScaleTransform.ScaleY)"><LinearDoubleKeyFrame Value="1" KeyTime="0:0:0.0" /><LinearDoubleKeyFrame Value="1.3" KeyTime="0:0:0.2" /><LinearDoubleKeyFrame Value="1" KeyTime="0:0:0.4" /><LinearDoubleKeyFrame Value="1.3" KeyTime="0:0:0.5" /><LinearDoubleKeyFrame Value="1" KeyTime="0:0:0.8" /><LinearDoubleKeyFrame Value="1.3" KeyTime="0:0:1" /></DoubleAnimationUsingKeyFrames></Storyboard></ControlTemplate.Resources><Viewbox><Grid x:Name="PART_Container"  Width="50" Height="50" RenderTransformOrigin="0,1"><Grid.RenderTransform><TransformGroup><RotateTransform CenterX="25" CenterY="25"/><ScaleTransform/></TransformGroup></Grid.RenderTransform><Grid VerticalAlignment="Bottom"><Path HorizontalAlignment="Center" VerticalAlignment="Bottom"  Stretch="Uniform" Height="50" Fill="OrangeRed"  Data="M563.308448 313.43188C495.439988 103.734035 591.338282 0 591.338282 0S276.514483 151.316058 183.199572 559.143951c-39.235011-56.442559-73.469923-87.328305-69.571197-77.222249 42.108942 109.060717-53.057357 157.906279-51.793818 272.879275 1.281557 114.954978 199.722422 246.534159 199.722422 246.53416l0.054055-0.164418a291.39766 291.39766 0 0 0 24.716706 16.349423 384.906268 384.906268 0 0 1-20.761672-26.948732c-21.511687-30.70331-36.61559-63.089087-36.964696-94.303668-0.677941-61.589057 26.252772-104.20927 44.982872-147.2867 16.23906-37.311549 26.345116-74.972205 6.810946-125.592576-3.076637-7.964122 17.63098 9.630821 45.750906 45.111254 54.850185-148.770963 108.878281-277.676668 108.878281-277.676668s1.391919 202.504009 70.028413 332.270091c64.424699 121.801961 60.56201 184.361758 60.56201 184.361757 117.189257-112.026992 156.385979-290.053039 156.385979-290.053039 42.602195 37.568311 67.098175 85.314752 80.884484 133.263899 29.036611 100.932178-30.95782 202.375628-32.295685 212.188885-0.567579 4.083414-1.610392 7.889796-2.488788 11.790774-4.101433 18.417031-11.479957 34.876817-21.640068 49.359086 11.00247-6.993382 21.439614-14.700741 31.489362-22.8473l0.054055 0.164418s182.895512-131.579181 184.159051-246.552178c1.263539-114.954978-93.900507-163.80054-51.793818-272.879275 3.644216-9.446133-24.185163 16.842676-57.724115 66.440504-33.210117-102.432208-54.485313-185.222135-165.46724-283.113712 0 0 20.522929 222.680084-97.434361 383.917509 0.020271 0.047298 41.451271-125.984476-26.435208-335.702591z" ><Path.Effect><DropShadowEffect BlurRadius="6" Color="OrangeRed" ShadowDepth="0"/></Path.Effect></Path><Path HorizontalAlignment="Center" VerticalAlignment="Bottom"  Stretch="Uniform" Margin="0,0,3,0" Height="44" Fill="Orange"  Data="M563.308448 313.43188C495.439988 103.734035 591.338282 0 591.338282 0S276.514483 151.316058 183.199572 559.143951c-39.235011-56.442559-73.469923-87.328305-69.571197-77.222249 42.108942 109.060717-53.057357 157.906279-51.793818 272.879275 1.281557 114.954978 199.722422 246.534159 199.722422 246.53416l0.054055-0.164418a291.39766 291.39766 0 0 0 24.716706 16.349423 384.906268 384.906268 0 0 1-20.761672-26.948732c-21.511687-30.70331-36.61559-63.089087-36.964696-94.303668-0.677941-61.589057 26.252772-104.20927 44.982872-147.2867 16.23906-37.311549 26.345116-74.972205 6.810946-125.592576-3.076637-7.964122 17.63098 9.630821 45.750906 45.111254 54.850185-148.770963 108.878281-277.676668 108.878281-277.676668s1.391919 202.504009 70.028413 332.270091c64.424699 121.801961 60.56201 184.361758 60.56201 184.361757 117.189257-112.026992 156.385979-290.053039 156.385979-290.053039 42.602195 37.568311 67.098175 85.314752 80.884484 133.263899 29.036611 100.932178-30.95782 202.375628-32.295685 212.188885-0.567579 4.083414-1.610392 7.889796-2.488788 11.790774-4.101433 18.417031-11.479957 34.876817-21.640068 49.359086 11.00247-6.993382 21.439614-14.700741 31.489362-22.8473l0.054055 0.164418s182.895512-131.579181 184.159051-246.552178c1.263539-114.954978-93.900507-163.80054-51.793818-272.879275 3.644216-9.446133-24.185163 16.842676-57.724115 66.440504-33.210117-102.432208-54.485313-185.222135-165.46724-283.113712 0 0 20.522929 222.680084-97.434361 383.917509 0.020271 0.047298 41.451271-125.984476-26.435208-335.702591z"><Path.Effect><DropShadowEffect BlurRadius="10" Color="Orange" ShadowDepth="0"/></Path.Effect></Path><Path HorizontalAlignment="Center" VerticalAlignment="Bottom"  Stretch="Uniform" Margin="0,0,3,0" Height="38" Fill="Gold"  Data="M563.308448 313.43188C495.439988 103.734035 591.338282 0 591.338282 0S276.514483 151.316058 183.199572 559.143951c-39.235011-56.442559-73.469923-87.328305-69.571197-77.222249 42.108942 109.060717-53.057357 157.906279-51.793818 272.879275 1.281557 114.954978 199.722422 246.534159 199.722422 246.53416l0.054055-0.164418a291.39766 291.39766 0 0 0 24.716706 16.349423 384.906268 384.906268 0 0 1-20.761672-26.948732c-21.511687-30.70331-36.61559-63.089087-36.964696-94.303668-0.677941-61.589057 26.252772-104.20927 44.982872-147.2867 16.23906-37.311549 26.345116-74.972205 6.810946-125.592576-3.076637-7.964122 17.63098 9.630821 45.750906 45.111254 54.850185-148.770963 108.878281-277.676668 108.878281-277.676668s1.391919 202.504009 70.028413 332.270091c64.424699 121.801961 60.56201 184.361758 60.56201 184.361757 117.189257-112.026992 156.385979-290.053039 156.385979-290.053039 42.602195 37.568311 67.098175 85.314752 80.884484 133.263899 29.036611 100.932178-30.95782 202.375628-32.295685 212.188885-0.567579 4.083414-1.610392 7.889796-2.488788 11.790774-4.101433 18.417031-11.479957 34.876817-21.640068 49.359086 11.00247-6.993382 21.439614-14.700741 31.489362-22.8473l0.054055 0.164418s182.895512-131.579181 184.159051-246.552178c1.263539-114.954978-93.900507-163.80054-51.793818-272.879275 3.644216-9.446133-24.185163 16.842676-57.724115 66.440504-33.210117-102.432208-54.485313-185.222135-165.46724-283.113712 0 0 20.522929 222.680084-97.434361 383.917509 0.020271 0.047298 41.451271-125.984476-26.435208-335.702591z"><Path.Effect><DropShadowEffect BlurRadius="10" Color="Gold" ShadowDepth="0"/></Path.Effect></Path><Path HorizontalAlignment="Center" VerticalAlignment="Bottom"  Stretch="Uniform" Height="32" Margin="0,0,3,0" Fill="LightYellow"  Data="M563.308448 313.43188C495.439988 103.734035 591.338282 0 591.338282 0S276.514483 151.316058 183.199572 559.143951c-39.235011-56.442559-73.469923-87.328305-69.571197-77.222249 42.108942 109.060717-53.057357 157.906279-51.793818 272.879275 1.281557 114.954978 199.722422 246.534159 199.722422 246.53416l0.054055-0.164418a291.39766 291.39766 0 0 0 24.716706 16.349423 384.906268 384.906268 0 0 1-20.761672-26.948732c-21.511687-30.70331-36.61559-63.089087-36.964696-94.303668-0.677941-61.589057 26.252772-104.20927 44.982872-147.2867 16.23906-37.311549 26.345116-74.972205 6.810946-125.592576-3.076637-7.964122 17.63098 9.630821 45.750906 45.111254 54.850185-148.770963 108.878281-277.676668 108.878281-277.676668s1.391919 202.504009 70.028413 332.270091c64.424699 121.801961 60.56201 184.361758 60.56201 184.361757 117.189257-112.026992 156.385979-290.053039 156.385979-290.053039 42.602195 37.568311 67.098175 85.314752 80.884484 133.263899 29.036611 100.932178-30.95782 202.375628-32.295685 212.188885-0.567579 4.083414-1.610392 7.889796-2.488788 11.790774-4.101433 18.417031-11.479957 34.876817-21.640068 49.359086 11.00247-6.993382 21.439614-14.700741 31.489362-22.8473l0.054055 0.164418s182.895512-131.579181 184.159051-246.552178c1.263539-114.954978-93.900507-163.80054-51.793818-272.879275 3.644216-9.446133-24.185163 16.842676-57.724115 66.440504-33.210117-102.432208-54.485313-185.222135-165.46724-283.113712 0 0 20.522929 222.680084-97.434361 383.917509 0.020271 0.047298 41.451271-125.984476-26.435208-335.702591z"><Path.Effect><DropShadowEffect BlurRadius="10" Color="LightYellow" ShadowDepth="0"/></Path.Effect></Path></Grid></Grid></Viewbox><ControlTemplate.Triggers><Trigger Property="IsStart" Value="True"><Trigger.EnterActions><BeginStoryboard Storyboard="{StaticResource PART_Fire_Storyboard}" x:Name="part_fire_storyboard"/></Trigger.EnterActions><Trigger.ExitActions><StopStoryboard BeginStoryboardName="part_fire_storyboard"/></Trigger.ExitActions></Trigger></ControlTemplate.Triggers></ControlTemplate></Setter.Value></Setter>
</Style>
</ResourceDictionary>

三、OtherControlExample.xaml 代码如下

<UserControl x:Class="WPFDevelopers.Samples.ExampleViews.OtherControlExample"xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:local="clr-namespace:WPFDevelopers.Samples.ExampleViews"xmlns:wpfdev="https://github.com/yanjinhuagood/WPFDevelopers"mc:Ignorable="d" d:DesignHeight="450" d:DesignWidth="800"><Grid><Border HorizontalAlignment="Center" VerticalAlignment="Center"Background="{StaticResource BlackSolidColorBrush}"Height="200" Width="200"><StackPanel Orientation="Vertical" VerticalAlignment="Bottom"Margin="0,10"><wpfdev:FireControl IsStart="True" Width="100" Height="100" Opacity="0.8"/><Grid Width="100" Height="60"><Path Data="M495.746032 859.654321l-7.223986-169.763668c-3.611993 0-7.223986-1.805996-12.641975-3.611993l10.835978 155.315696c0 7.223986 3.611993 14.447972 9.029983 18.059965zM530.059965 691.696649c-1.805996-1.805996-12.641975 1.805996-32.507937 0l5.41799 171.569665c3.611993 1.805996 5.417989 1.805996 9.029982 1.805996 5.417989 0 9.029982-1.805996 14.447972-3.611993 5.417989-111.971781 5.417989-167.957672 3.611993-169.763668z" Fill="#FFB938" Stretch="Fill"></Path><Path Data="M502.970018 863.266314l-5.41799-171.569665c-1.805996 0-5.417989 0-9.029982-1.805996l7.223986 169.763668c1.805996 1.805996 3.611993 3.611993 7.223986 3.611993z" Fill="#FFEA8B" Stretch="Fill"></Path><Path Data="M362.102293 572.500882h281.73545c-14.447972 77.657848-61.40388 115.583774-140.867725 115.583774s-126.419753-37.925926-140.867725-111.971781" Fill="#F49B1E" Stretch="Fill"></Path><Path Data="M358.4903 572.500882H573.40388c0 81.269841-30.70194 119.195767-93.911817 117.389771s-102.941799-43.343915-121.001763-117.389771z" Fill="#FFB938" Stretch="Fill"></Path><Path Data="M398.222222 572.500882c5.417989 36.119929 10.835979 59.597884 18.059965 72.239859 10.835979 18.059965 28.895944 37.925926 66.821869 43.343915h1.805997c0-1.805996-10.835979-7.223986-21.671958-16.253968-7.223986-7.223986-12.641975-18.059965-18.059964-30.70194-7.223986-12.641975-10.835979-34.313933-12.641976-68.627866h-34.313933z" Fill="#FFEA8B" Stretch="Fill"></Path></Grid></StackPanel></Border></Grid>
</UserControl>

源码地址

github:https://github.com/yanjinhuagood/WPFDevelopers.git

gitee:https://gitee.com/yanjinhua/WPFDevelopers.git

WPF开发者QQ群: 340500857 

Github:https://github.com/yanjinhuagood

版权:本作品采用「署名-非商业性使用-相同方式共享 4.0 国际」许可协议进行许可。

转载请著名作者 出处 https://github.com/yanjinhuagood

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/297914.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

08 comet反向ajax

一&#xff1a;HTTP协议与技久链接分块传输---->反向ajax 反向ajax又叫comet, server push,服务器推技术. 应用范围: 网页聊天服务器,, 新浪微博在线聊天,google mail 网页聊天,都有用到. 原理: 一般而言, HTTP协议的特点, 连接<->断开. 具体什么时间断开? 服务器响应…

男朋友出的性格测试题

1 一家人出去玩了三天&#xff0c;把猫忘在家里了&#xff01;2 嗷呜3 竟然毫无违和感4 叫你一声造句鬼才不过分吧5 秋天原来是这样来的嘛~6 当代嗑cp网友现状5 现在的年轻人都哪里学来的这么多招数内容自沙雕男友的日常你点的每个赞&#xff0c;我都认真当成了喜欢

linux连接建立的时间,用timedatectl在Linux中检查当前时区及更改时区(创建符号链接来更改时区)...

本文介绍如何在Linux操作系统中设置或更改时区的方法&#xff0c;可以使用timedatectl&#xff0c;包括通过创建符号链接来更改时区。前言时区是具有相同标准时间的地理区域&#xff0c;通常&#xff0c;时区是在操作系统的安装过程中设置的&#xff0c;但以后可以轻松更改。对…

mapbox 导航_狂甩不掉,骑行最稳手机支架!一体式安装太方便,秒变单车导航仪...

发对于骑行爱好者而言&#xff0c;对手机支架的稳固性有很高的要求&#xff0c;同时支架体积不能太大&#xff0c;对手机本身也要有一定的保护性&#xff0c;手机安放好&#xff0c;骑行才能更自在&#xff01;一个舒适的手机支架&#xff0c;对于业务繁忙或者像小渣一样的路痴…

Docker小白到实战之Docker网络简单了解一下

前言现在对于Docker容器的隔离性都有所了解了&#xff0c;但对容器IP地址的分配、容器间的访问等还是有点小疑问&#xff0c;如果容器的IP由于新启动导致变动&#xff0c;那又怎么才能保证原有业务不会被影响&#xff0c;这就和网络有挂钩了&#xff0c;接下来就大概说说。正文…

^_^家园游记^_^

j 你梦想中的家是怎么家的呢&#xff1f; 是鲁宾逊漂流记中那样&#xff1a;一个荒岛&#xff0c;一片青山绿水的悠闲自在&#xff1f; 还是让人流连忘返的色彩斑斓&#xff0c;鳞次栉比&#xff0c;浓浓的欧式典雅&#xff1f; 或是奔放自由的乡村田园&#xff0c;精…

sigar如何获取linux的buffer内存,Linux 下使用Sigar 获取内存信息

上一篇文章介绍了linux下的sigar 库,并使用sigar 库来获取cpu 使用率,本文在这里介绍一下如何使用sigar 库获取内存信息.和cpu 一样,sigar中有和内存相关的结构体sigar_mem_t,我们来看一下结构体原型:typedef struct {sigar_uint64_tram,total,used,free,actual_used,actual_fr…

如何将手机投屏到电脑_手机如何投屏到电脑上?详细教程看这里,手机投屏

手机再大的屏幕&#xff0c;也没有手机投屏到电脑、电视的体验爽。那么哪款投屏软件好用&#xff1f;又如何使用呢&#xff1f;下面小编给大家介绍下金舟苹果手机投屏软件&#xff0c;一起来看看如何将手机投屏到电脑上&#xff0c;详细步骤如下。第一步、首先&#xff0c;在电…

inputstream是否一定要close_汽车加装行李架后,总被交警拦下,类似改装,是否一定要备案...

其实改装不是儿戏&#xff0c;有些部位是一定不能触碰的&#xff0c;汽车“轻改”后担心上路被交警处罚&#xff0c;哪些是不能触碰的“红杠杠”&#xff0c;汽车加装行李架后&#xff0c;总被交警拦下&#xff0c;类似改装&#xff0c;是否一定需要备案&#xff0c;是我们今天…

不好意思,爱因斯坦这次,又对了!

▲ 点击查看在科学界中&#xff0c;有一个非常著名的概念&#xff0c;叫做后设认知。官方解释是&#xff1a;人们是如何对自己的思维模式进行反思。打个简单的比方&#xff1a;你学习或者自己孩子学习的时候&#xff0c;会不会经常出现一道数学题反复做错的情况&#xff0c;明明…

开源Math.NET基础数学类库使用(04)C#解析Matrix Marke数据格式

原文:【原创】开源Math.NET基础数学类库使用(04)C#解析Matrix Marke数据格式开源Math.NET基础数学类库使用系列文章总目录&#xff1a; 1.开源.NET基础数学计算组件Math.NET(一)综合介绍 2.开源.NET基础数学计算组件Math.NET(二)矩阵向量计算 3.开源.NET基础数学计算组件Ma…

元胞自动机模型_【ABM仿真模拟】第三章 元胞自动机 B

是新朋友吗&#xff1f;记得先点蓝字关注我哦&#xff5e;第三章 元胞自动机 B2020/01/233.3投票模型(Voting) 课程导读无论是国内国外&#xff0c;投票结果的预测都异常受到关注。在众多唐斯模型、中间选民模型 、以及Sznajd模型中&#xff0c;投票模型作为典型的元胞自动机&a…

喜报!985大学首次登上Nature封面,这所学校可太不容易了!

全世界只有3.14 % 的人关注了爆炸吧知识建校64年来&#xff0c;第一次登上期刊封面又一所985院校出息了&#xff01;伦敦时间6月4号&#xff0c;《Nature》刊发了电子科技大学邓旭教授团队的最新研究成果&#xff0c;并被选为当期封面。《设计坚固的超疏水表面》《Nature》作为…

getbean方法找不到bean_iphone手机静音找不到怎么办 iphone静音找不到解决方法【图文】...

一个网友给小编留言&#xff0c;询问&#xff1a;“我的iphone调静音了现在找不到&#xff0c;有什么工具能找到”这一个问题&#xff0c;因此&#xff0c;在今天的iPhone使用教程&#xff0c;小编就给大家讲解一下具体的解决方法&#xff0c;那么&#xff0c;iphone手机静音找…

成长 | 《大厂晋升指南》学习总结(上)

【学习总结】| Edison Zhou温馨提示&#xff1a;文中的贴图均来自极客时间《大厂晋升指南》课程。0写在开头今年加入了一家产业互联网平台企业&#xff0c;公司刚好也开始借鉴阿里的职级体系。对于从来没有在互联网企业呆过的我&#xff0c;对于职级体系还比较陌生&#xff0c;…

String,StringBuffer与StringBuilder的区别

2019独角兽企业重金招聘Python工程师标准>>> String 字符串常量StringBuffer 字符串变量&#xff08;线程安全&#xff09;StringBuilder 字符串变量&#xff08;非线程安全&#xff09; 简要的说&#xff0c; String 类型和 StringBuffer 类型的主要性能区别其实在…

68张机械原理动图,够你看一晚上了!

全世界只有3.14 % 的人关注了爆炸吧知识机械动态图有的可以洞察工作原理&#xff0c;有的可以洞察结构&#xff0c;有的可以表达工作过程&#xff0c;不学机械的也能看得懂&#xff01;今天的68幅动态图总有一些你没有见过&#xff0c;相当棒&#xff01;一、制造篇一张图告诉你…

频谱分析幅值单位_案例分享丨某水泥厂入窑斗提减速机不对中故障分析及处理...

斗式提升机是利用均匀固接于无端奉引构件上的一系列料斗,竖向提升物料的连续输送机械。分为环链、板链和皮带三种。今天因大师将给大家分享一个水泥厂的入窑斗提减速机不对中故障的诊断案例。1 设备概况设备基本信息&#xff1a;设备位置&#xff1a;1#产线入窑斗提&#xff08…

中国高校鄙视链指南

全世界只有3.14 % 的人关注了爆炸吧知识某一天&#xff0c;中国各大高校齐聚一堂&#xff0c;开了一场“拒绝高校鄙视链座谈会”&#xff0c;誓要消除高校之间的不平等&#xff0c;不让莘莘学子因为母校问题而被人低看一眼&#xff0c;遗憾终生。首先主持人介绍清华北大发言&am…

.NET 6 ThreadPool 实现概述

前言在即将发布的 .NET 6 runtime 中&#xff0c;默认的线程池实现从 C 代码改为了 C#&#xff0c;更方便我们学习线程池的设计了。https://github.com/dotnet/runtime/tree/release/6.0/src/libraries/System.Threading.ThreadPool新的线程池实现位于 PortableThreadPool 中&a…