WPF等待动画

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

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

01

效果预览

效果预览(更多效果请下载源码体验):

02


代码如下

一、CycleLoading.cs 代码如下

using System.Windows;
using System.Windows.Controls;namespace WPFDevelopers.Controls
{public class CycleLoading : ContentControl{static CycleLoading(){DefaultStyleKeyProperty.OverrideMetadata(typeof(CycleLoading), new FrameworkPropertyMetadata(typeof(CycleLoading)));}public override void OnApplyTemplate(){base.OnApplyTemplate();}public double MaxValue{get { return (double)GetValue(MaxValueProperty); }set { SetValue(MaxValueProperty, value); }}// Using a DependencyProperty as the backing store for MaxValue.  This enables animation, styling, binding, etc...public static readonly DependencyProperty MaxValueProperty =DependencyProperty.Register("MaxValue", typeof(double), typeof(CycleLoading), new PropertyMetadata(100d));public double Value{get { return (double)GetValue(ValueProperty); }set { SetValue(ValueProperty, value); }}// Using a DependencyProperty as the backing store for Value.  This enables animation, styling, binding, etc...public static readonly DependencyProperty ValueProperty =DependencyProperty.Register("Value", typeof(double), typeof(CycleLoading), new PropertyMetadata(0d, OnValuePropertyChangedCallBack));internal string ValueDescription{get { return (string)GetValue(ValueDescriptionProperty); }set { SetValue(ValueDescriptionProperty, value); }}// Using a DependencyProperty as the backing store for ValueDescription.  This enables animation, styling, binding, etc...internal static readonly DependencyProperty ValueDescriptionProperty =DependencyProperty.Register("ValueDescription", typeof(string), typeof(CycleLoading), new PropertyMetadata(default(string)));private static void OnValuePropertyChangedCallBack(DependencyObject d, DependencyPropertyChangedEventArgs e){if (!(d is CycleLoading loading))return;if (!double.TryParse(e.NewValue?.ToString(), out double value))return;if (value >= loading.MaxValue){value = loading.MaxValue;if (loading.IsStart)loading.IsStart = false;}else{if (!loading.IsStart)loading.IsStart = true;}double dValue = value / loading.MaxValue;loading.ValueDescription = dValue.ToString("P0");}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(CycleLoading), new PropertyMetadata(true));public string LoadTitle{get { return (string)GetValue(LoadTitleProperty); }set { SetValue(LoadTitleProperty, value); }}// Using a DependencyProperty as the backing store for LoadTitle.  This enables animation, styling, binding, etc...public static readonly DependencyProperty LoadTitleProperty =DependencyProperty.Register("LoadTitle", typeof(string), typeof(CycleLoading), new PropertyMetadata(default(string)));}
}

二、CycleLoading.xaml 代码如下 

<Style TargetType="{x:Type controls:CycleLoading}" BasedOn="{StaticResource ControlBasicStyle}"><Setter Property="Foreground" Value="White"/><Setter Property="FontSize" Value="30"/><Setter Property="HorizontalContentAlignment" Value="Center"/><Setter Property="VerticalContentAlignment" Value="Center"/><Setter Property="Template"><Setter.Value><ControlTemplate TargetType="{x:Type controls:CycleLoading}"><ControlTemplate.Resources><Storyboard x:Key="Storyboard_LoadRunning" RepeatBehavior="Forever" SpeedRatio="2"><DoubleAnimation Duration="0:0:5" BeginTime="0" From="0" To="360" Storyboard.TargetName="Part_Cycle_Rotate" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)" /><DoubleAnimation Duration="0:0:5" BeginTime="0" From="0" To="360" Storyboard.TargetName="Part_Cycle_Rotate1" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)" /></Storyboard></ControlTemplate.Resources><Grid><Viewbox><Grid Width="400" Height="400"><Grid x:Name="Part_Cycle_Rotate1" RenderTransformOrigin="0.5,0.5"><Grid.RenderTransform><TransformGroup><ScaleTransform/><SkewTransform/><RotateTransform/><TranslateTransform/></TransformGroup></Grid.RenderTransform><Ellipse Margin="0,50,0,50" ><Ellipse.Fill><LinearGradientBrush ><GradientStop Color="White" Offset="0" /><GradientStop Color="White" Offset="1" /></LinearGradientBrush></Ellipse.Fill><Ellipse.Effect><BlurEffect Radius="40"/></Ellipse.Effect></Ellipse><Ellipse Margin="50,0,50,0" ><Ellipse.Fill><LinearGradientBrush StartPoint="0,0" EndPoint="0,1"><GradientStop Color="White" Offset="0.4" /><GradientStop Color="White" Offset="1" /></LinearGradientBrush></Ellipse.Fill><Ellipse.Effect><BlurEffect Radius="40"/></Ellipse.Effect></Ellipse></Grid><Grid x:Name="Part_Cycle_Rotate" RenderTransformOrigin="0.5,0.5"><Grid.RenderTransform><TransformGroup><ScaleTransform/><SkewTransform/><RotateTransform/><TranslateTransform/></TransformGroup></Grid.RenderTransform><Ellipse Margin="0,50,0,50" ><Ellipse.Fill><LinearGradientBrush ><GradientStop Color="#d495f1" Offset="0" /><GradientStop Color="#87d3f7" Offset="1" /></LinearGradientBrush></Ellipse.Fill><Ellipse.Effect><BlurEffect Radius="15"/></Ellipse.Effect></Ellipse><Ellipse Margin="50,0,50,0" ><Ellipse.Fill><LinearGradientBrush StartPoint="0,0" EndPoint="0,1"><GradientStop Color="#f173ac" Offset="0" /><GradientStop Color="#33a3dc" Offset="1" /></LinearGradientBrush></Ellipse.Fill><Ellipse.Effect><BlurEffect Radius="15"/></Ellipse.Effect></Ellipse></Grid><Ellipse Margin="33" Fill="Black" ><Ellipse.Effect><DropShadowEffect BlurRadius="20" ShadowDepth="0" Color="White"/></Ellipse.Effect></Ellipse></Grid></Viewbox><Grid HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"><Grid.RowDefinitions><RowDefinition Height="Auto"/><RowDefinition Height="Auto"/><RowDefinition Height="Auto"/></Grid.RowDefinitions><TextBlock Grid.Row="0" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="20" Text="{TemplateBinding LoadTitle}"/><ContentPresenter Grid.Row="1" HorizontalAlignment="Center" VerticalAlignment="Center" Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}"ContentTemplateSelector="{TemplateBinding ContentTemplateSelector}"ContentStringFormat="{TemplateBinding ContentStringFormat}"/><TextBlock Grid.Row="2" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="15"Text="{TemplateBinding ValueDescription}"/></Grid></Grid><ControlTemplate.Triggers><Trigger Property="IsStart" Value="True"><Trigger.EnterActions><BeginStoryboard Storyboard="{StaticResource Storyboard_LoadRunning}" x:Name="Storyboard_LoadRunning"/></Trigger.EnterActions><Trigger.ExitActions><StopStoryboard BeginStoryboardName="Storyboard_LoadRunning"/></Trigger.ExitActions></Trigger></ControlTemplate.Triggers></ControlTemplate></Setter.Value></Setter>
</Style>

三、RollLoading 代码如下 

using System.Windows;
using System.Windows.Controls;
using System.Windows.Media;namespace WPFDevelopers.Controls
{public class RollLoading : ContentControl{static RollLoading(){DefaultStyleKeyProperty.OverrideMetadata(typeof(RollLoading), new FrameworkPropertyMetadata(typeof(RollLoading)));}public override void OnApplyTemplate(){base.OnApplyTemplate();}public Color ForegroundColor{get { return (Color)GetValue(ForegroundColorProperty); }set { SetValue(ForegroundColorProperty, value); }}// Using a DependencyProperty as the backing store for ForegroundColor.  This enables animation, styling, binding, etc...public static readonly DependencyProperty ForegroundColorProperty =DependencyProperty.Register("ForegroundColor", typeof(Color), typeof(RollLoading), new PropertyMetadata(Colors.Red));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(RollLoading), new PropertyMetadata(true));}
}

四、RollLoading.xaml 代码如下 

<Style TargetType="{x:Type controls:RollLoading}" BasedOn="{StaticResource ControlBasicStyle}"><Setter Property="ForegroundColor" Value="{StaticResource DangerColor}"/><Setter Property="Template" ><Setter.Value><ControlTemplate TargetType="{x:Type controls:RollLoading}"><ControlTemplate.Resources><Storyboard x:Key="RollKey"  RepeatBehavior="Forever" ><DoubleAnimation Duration="0:0:5" BeginTime="0" From="0" To="360" RepeatBehavior="Forever" SpeedRatio="2" Storyboard.TargetName="PART_Border1" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)" /><DoubleAnimation Duration="0:0:5" BeginTime="0" From="0" To="360" RepeatBehavior="Forever" SpeedRatio="4" Storyboard.TargetName="PART_Border2" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)" /><DoubleAnimation Duration="0:0:5" BeginTime="0" From="0" To="360" RepeatBehavior="Forever" SpeedRatio="6" Storyboard.TargetName="PART_Border3" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)" /><DoubleAnimation Duration="0:0:5" BeginTime="0" From="0" To="360" RepeatBehavior="Forever" SpeedRatio="8" Storyboard.TargetName="PART_Border4" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)" /><DoubleAnimation Duration="0:0:5" BeginTime="0" From="0" To="360" RepeatBehavior="Forever" SpeedRatio="10" Storyboard.TargetName="PART_Border5" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)" /><DoubleAnimation Duration="0:0:5" BeginTime="0" From="0" To="360" RepeatBehavior="Forever" SpeedRatio="12" Storyboard.TargetName="PART_Border6" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)" /><DoubleAnimation Duration="0:0:5" BeginTime="0" From="0" To="360" RepeatBehavior="Forever" SpeedRatio="14" Storyboard.TargetName="PART_Border7" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)" /><DoubleAnimation Duration="0:0:5" BeginTime="0" From="0" To="360" RepeatBehavior="Forever" SpeedRatio="16" Storyboard.TargetName="PART_Border8" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)" /><ColorAnimationUsingKeyFrames Duration="0:0:5" Storyboard.TargetProperty="ForegroundColor" RepeatBehavior="Forever"><EasingColorKeyFrame KeyTime="0:0:0" Value="Red" EasingFunction="{StaticResource PowerEaseInOut}"/><EasingColorKeyFrame KeyTime="0:0:1" Value="Blue" EasingFunction="{StaticResource PowerEaseInOut}"/><EasingColorKeyFrame KeyTime="0:0:2" Value="Yellow" EasingFunction="{StaticResource PowerEaseInOut}"/><EasingColorKeyFrame KeyTime="0:0:3" Value="Green" EasingFunction="{StaticResource PowerEaseInOut}"/><EasingColorKeyFrame KeyTime="0:0:4" Value="Aqua" EasingFunction="{StaticResource PowerEaseInOut}"/><EasingColorKeyFrame KeyTime="0:0:5" Value="Red" EasingFunction="{StaticResource PowerEaseInOut}"/></ColorAnimationUsingKeyFrames></Storyboard></ControlTemplate.Resources><Grid><Grid.RowDefinitions><RowDefinition/><RowDefinition Height="Auto"/></Grid.RowDefinitions><Viewbox><Grid><Border x:Name="PART_Border1" Width="160" Height="160"  BorderThickness="0,5,0,0"  CornerRadius="80" RenderTransformOrigin="0.5,0.5"><Border.BorderBrush><LinearGradientBrush StartPoint="0,0" EndPoint="1,1"><LinearGradientBrush.GradientStops><GradientStop Color="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=ForegroundColor}" Offset="0.5"/><GradientStop Color="Transparent" Offset="0.5"/></LinearGradientBrush.GradientStops></LinearGradientBrush></Border.BorderBrush><Border.RenderTransform><TransformGroup><ScaleTransform/><SkewTransform/><RotateTransform/><TranslateTransform/></TransformGroup></Border.RenderTransform></Border><Border x:Name="PART_Border2" Width="140" Height="140"  BorderThickness="0,5,0,0"  CornerRadius="70" RenderTransformOrigin="0.5,0.5"><Border.BorderBrush><LinearGradientBrush StartPoint="0,0" EndPoint="1,1"><LinearGradientBrush.GradientStops><GradientStop Color="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=ForegroundColor}" Offset="0.5"/><GradientStop Color="Transparent" Offset="0.5"/></LinearGradientBrush.GradientStops></LinearGradientBrush></Border.BorderBrush><Border.RenderTransform><TransformGroup><ScaleTransform/><SkewTransform/><RotateTransform/><TranslateTransform/></TransformGroup></Border.RenderTransform></Border><Border x:Name="PART_Border3" Width="120" Height="120"  BorderThickness="0,5,0,0"  CornerRadius="60" RenderTransformOrigin="0.5,0.5"><Border.BorderBrush><LinearGradientBrush StartPoint="0,0" EndPoint="1,1"><LinearGradientBrush.GradientStops><GradientStop Color="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=ForegroundColor}" Offset="0.5"/><GradientStop Color="Transparent" Offset="0.5"/></LinearGradientBrush.GradientStops></LinearGradientBrush></Border.BorderBrush><Border.RenderTransform><TransformGroup><ScaleTransform/><SkewTransform/><RotateTransform/><TranslateTransform/></TransformGroup></Border.RenderTransform></Border><Border x:Name="PART_Border4" Width="100" Height="100"  BorderThickness="0,5,0,0"  CornerRadius="50" RenderTransformOrigin="0.5,0.5"><Border.BorderBrush><LinearGradientBrush StartPoint="0,0" EndPoint="1,1"><LinearGradientBrush.GradientStops><GradientStop Color="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=ForegroundColor}" Offset="0.5"/><GradientStop Color="Transparent" Offset="0.5"/></LinearGradientBrush.GradientStops></LinearGradientBrush></Border.BorderBrush><Border.RenderTransform><TransformGroup><ScaleTransform/><SkewTransform/><RotateTransform/><TranslateTransform/></TransformGroup></Border.RenderTransform></Border><Border x:Name="PART_Border5" Width="80" Height="80"  BorderThickness="0,5,0,0"  CornerRadius="40" RenderTransformOrigin="0.5,0.5"><Border.BorderBrush><LinearGradientBrush StartPoint="0,0" EndPoint="1,1"><LinearGradientBrush.GradientStops><GradientStop Color="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=ForegroundColor}" Offset="0.5"/><GradientStop Color="Transparent" Offset="0.5"/></LinearGradientBrush.GradientStops></LinearGradientBrush></Border.BorderBrush><Border.RenderTransform><TransformGroup><ScaleTransform/><SkewTransform/><RotateTransform/><TranslateTransform/></TransformGroup></Border.RenderTransform></Border><Border x:Name="PART_Border6" Width="60" Height="60"  BorderThickness="0,5,0,0"  CornerRadius="30" RenderTransformOrigin="0.5,0.5"><Border.BorderBrush><LinearGradientBrush StartPoint="0,0" EndPoint="1,1"><LinearGradientBrush.GradientStops><GradientStop Color="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=ForegroundColor}" Offset="0.5"/><GradientStop Color="Transparent" Offset="0.5"/></LinearGradientBrush.GradientStops></LinearGradientBrush></Border.BorderBrush><Border.RenderTransform><TransformGroup><ScaleTransform/><SkewTransform/><RotateTransform/><TranslateTransform/></TransformGroup></Border.RenderTransform></Border><Border x:Name="PART_Border7" Width="40" Height="40"  BorderThickness="0,5,0,0"  CornerRadius="20" RenderTransformOrigin="0.5,0.5"><Border.BorderBrush><LinearGradientBrush StartPoint="0,0" EndPoint="1,1"><LinearGradientBrush.GradientStops><GradientStop Color="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=ForegroundColor}" Offset="0.5"/><GradientStop Color="Transparent" Offset="0.5"/></LinearGradientBrush.GradientStops></LinearGradientBrush></Border.BorderBrush><Border.RenderTransform><TransformGroup><ScaleTransform/><SkewTransform/><RotateTransform/><TranslateTransform/></TransformGroup></Border.RenderTransform></Border><Border x:Name="PART_Border8" Width="20" Height="20"  BorderThickness="0,5,0,0"  CornerRadius="10" RenderTransformOrigin="0.5,0.5"><Border.BorderBrush><LinearGradientBrush StartPoint="0,0" EndPoint="1,1"><LinearGradientBrush.GradientStops><GradientStop Color="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=ForegroundColor}" Offset="0.5"/><GradientStop Color="Transparent" Offset="0.5"/></LinearGradientBrush.GradientStops></LinearGradientBrush></Border.BorderBrush><Border.RenderTransform><TransformGroup><ScaleTransform/><SkewTransform/><RotateTransform/><TranslateTransform/></TransformGroup></Border.RenderTransform></Border></Grid></Viewbox><ContentPresenter Grid.Row="1" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/></Grid><ControlTemplate.Triggers><Trigger Property="IsStart" Value="True"><Trigger.EnterActions><BeginStoryboard x:Name="Roll_Storyboard" Storyboard="{StaticResource RollKey}"/></Trigger.EnterActions><Trigger.ExitActions><StopStoryboard BeginStoryboardName="Roll_Storyboard"/></Trigger.ExitActions></Trigger></ControlTemplate.Triggers></ControlTemplate></Setter.Value></Setter>
</Style>

五、LoadingExample.xaml 代码如下 

 <wpfdev:CycleLoading  Value="50" LoadTitle="Loading...." Width="200"><TextBlock Text="activity"/></wpfdev:CycleLoading><wpfdev:RollLoading IsStart="true" HorizontalContentAlignment="Center" VerticalContentAlignment="Center"Width="200"><TextBlock Text="Loading activity..."/></wpfdev:RollLoading>

源码地址

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

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

WPF开发者QQ群: 340500857 

blogs: https://www.cnblogs.com/yanjinhua

Github:https://github.com/yanjinhuagood

出处:https://www.cnblogs.com/yanjinhua

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

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

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

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

相关文章

假期别在家里要发霉了?可以靠他们度过无聊时光

全世界只有3.14 % 的人关注了青少年数学之旅在这个资讯丰富且易获取的时代&#xff0c;越来越多的人不愿意花时间阅读书籍&#xff0c;碎片化阅读成了主流。人们获取的东西多而杂&#xff0c;很难系统、全面。海量信息对人是冲击&#xff0c;更是诱惑。谁不想了解天下奇闻&…

cs6序列号 mac版photoshop_重磅!Parallels Desktop 16 M1版发布

Parallels 现已发布 Parallels Desktop 16 技术预览版&#xff0c;可以在搭载 M1 芯片的 Mac 电脑上运行。该公司表示&#xff0c;它创建了一个 “使用 Apple M1 Mac 芯片硬件辅助虚拟化的新虚拟化引擎”&#xff0c;允许用户在虚拟机中运行基于 Arm 的操作系统&#xff0c;例如…

华为二面!!!面试官直接问我Java中到底什么是NIO?这不是直接送分题???

华为二面&#xff01;&#xff01;&#xff01;面试官直接问我Java中到底什么是NIO&#xff1f;这不是直接送分题&#xff1f;&#xff1f;&#xff1f;什么是NIO缓冲区(Buffer)缓冲区类型获取缓冲区核心属性核心方法非直接缓冲区和直接缓冲区非直接缓冲区直接缓冲区通道(Chann…

Delphi中的容器类(3)

TBucketList和TObjectBucketList类 从Delphi6开始&#xff0c;VCL的Contnrs单元中又增加了两个新的容器类TBucketList和TObjectBucketList。TBucketList实际上也是一个简单基于哈希表的指针-指针对列表。接口定义如下&#xff1a; TBucketList class(TCustomBucketList)… pu…

一文读懂哈希和一致性哈希算法

哈希 Hash 算法介绍哈希算法也叫散列算法, 不过英文单词都是 Hash, 简单一句话概括, 就是可以把任意长度的输入信息通过算法变换成固定长度的输出信息, 输出信息也就是哈希值, 通常哈希值的格式是16进制或者是10进制, 比如下面的使用 md5 哈希算法的示例md5("123456"…

延迟开学?这些教育读书公众号可以帮助孩子学习! 你都关注了吗?

全世界只有3.14 % 的人关注了青少年数学之旅受新型冠状病毒疫情影响&#xff0c;日前&#xff0c;教育部印发《关于2020年春季学期延期开学的通知》。推迟开学时间&#xff0c;意味着寒假的延长。为此&#xff0c;小编精选这些优质的教育号和读书号帮助孩子学习&#xff01;理想…

go方法的深入探究(7.21增补)

2019独角兽企业重金招聘Python工程师标准>>> 1&#xff09;哪些类型可以有方法&#xff1a; 1&#xff09;只能对命名类型和命名类型的指针编写方法&#xff1b; 2&#xff09;不能对接口类型和接口类型的指针编写方法&#xff1b; 3&#xff09;只能在定义命名类型…

element文件上传有文件但是后台接收为空_程序员提高篇:大规格文件(G)是如何做分片优化的?...

作者&#xff1a;凹凸实验室 链接&#xff1a;https://juejin.im/post/5ebb4346e51d451ef53793ad整体思路第一步是结合项目背景&#xff0c;调研比较优化的解决方案。 文件上传失败是老生常谈的问题&#xff0c;常用方案是将一个大文件切片成多个小文件&#xff0c;并行请求接口…

你连简单的枚举类都不知道,还敢说自己会Java???滚出我的公司

枚举类型是Java 5中新增的特性&#xff0c;它是一种特殊的数据类型&#xff0c;之所以特殊是因为它既是一种类(class)类型却又比类类型多了些特殊的约束&#xff0c;但是这些约束的存在也造就了枚举类型的简洁性、安全性以及便捷性。当需要定义一组常量时&#xff0c;强烈建议使…

绝对硬核!万物有“理”,科学原来如此有趣!

▲ 点击查看假如在生活中&#xff0c;你不小心将生鸡蛋和熟鸡蛋混在一起了&#xff0c;那么此时你要如何分辨&#xff0c;哪个鸡蛋是生的&#xff0c;哪个是熟的呢&#xff1f;假若你曾学过力学&#xff0c;那你一定能够轻易的分辨这个生熟问题。我们把这两个鸡蛋放在桌上&…

微软输入法2010下载使用-IME2010下载使用

3年前&#xff0c;写过IME2007的安装和使用&#xff0c;在Office 2010 beta开放之后&#xff0c;觉得单独把ime2010单独开放出来比较适合Office 2003/2007的用户群。 1。 依然还是和上次的IME2007提取方式一样&#xff0c;先用7-zip解压Office 2007 beta的exe文件&#xff1a;由…

理论修炼之RabbitMQ,消息队列服务的稳健者

????欢迎点赞 &#xff1a;???? 收藏 ⭐留言 ???? 如有错误敬请指正&#xff0c;赐人玫瑰&#xff0c;手留余香&#xff01;????本文作者&#xff1a;由webmote 原创&#xff0c;首发于 【掘金】????作者格言&#xff1a;生活在于折腾&#xff0c;当你不折…

为什么年龄大了近视还增加_年龄明明一样大,为什么有人长得年轻,有人显老呢?...

台湾不老男神林志颖&#xff0c;始终是十几年前演偶像剧的脸。而德云社郭德纲与他是同龄人却饱经沧桑显得更加老相。这是一件让人哭笑不得的事&#xff0c;也被很多人编成段子。那么为什么有些人看起来年轻有些人却老的很快呢&#xff1f;哪一种更长寿呢&#xff1f;接下来让我…

利用Asp.net中的AJAX制作网页上自动选取开始日期及结束日期的用户自定义控件...

前段时间用过一个酒店入住预约网站&#xff0c;当你点击"入住时间"时会悬浮出一对并列的日历&#xff0c;然后点击左边的日历就能选择入住时间&#xff0c;点击右侧的日历就能自动得到离店时间&#xff0c;当时没有太留意是怎么实现的&#xff0c;现在在做项目时&…

【00】架构型

为什么80%的码农都做不了架构师&#xff1f;>>> 1、架构型&#xff08;archetype&#xff09; 一种形式&#xff0c;所有的东西或多或少地遵守。一种形式&#xff0c;属于同一类型的类都或多或少地遵守&#xff0c;包括属性、链接、方法、插入点、交互。 2、领域无…

SQL进阶提升(疑惑篇order by)-学习sql server2005 step by step(十一)

这篇主要发出两个疑惑&#xff0c;希望有兴趣的人解答&#xff0c;谢谢&#xff01; 1.newid()疑惑 1 create table tb (aa int,bb char(1)) 2 insert tb values(1,A) 3 insert tb values(1,B) 4 insert tb values(1,C) 5 insert tb values(1,D) 6 7 insert tb value…

钟南山团队在患者粪便中检出新冠活病毒,国家卫健委回应!专家:做好这事很重要...

全世界只有3.14 % 的人关注了青少年数学之旅2月13日下午&#xff0c;在广东省人民政府新闻办召开的疫情防控新闻发布会上&#xff0c;钟南山院士团队成员、广州医科大学国家呼吸疾病重点实验室副主任、教授赵金存介绍&#xff0c;该团队在P3实验室中&#xff0c;在中山大学附属…

CSDN《某一程序员竟然吃过shi?让我们走进他的生活,揭露背后的故事》

CSDN《某一程序员竟然吃过屎&#xff1f;我们走进他的生活&#xff0c;揭露背后的故事》 ——————————接下来让我们走进他的故事 到底是什么原因让他吃屎 这是这位程序员的自曝&#xff0c;我很好奇的不是他吃过屎&#xff0c;我在好奇是啥味的~ 接下来我们开始咨询这…

专升本c语言网课听谁的好_都说塑钢泥比玻璃胶好,填缝永不变黑,师傅却说不好用,听谁的?...

新房装修&#xff0c;我一点不想再用玻璃胶来填补缝隙了。像洗手台、淋浴房、厨房水槽这些地方&#xff0c;不管用多贵多好的玻璃胶&#xff0c;最后&#xff0c;它都会变黑发霉。朋友同我说&#xff0c;可以用塑钢泥替代&#xff0c;20年不发霉~他说&#xff0c;现在很多业主家…

技术分享|明源云天际集成开放平台接口中心基于IdentityServer4的鉴权机制

源宝导读&#xff1a;企业数字化生态建设中为解决集成多样性和资源统一管理的痛点引入企业级网关&#xff0c;网关作为资源访问的大门&#xff0c;身份认证鉴权是其业务的重中之重&#xff0c;本文将介绍企业级网关-天际集成开放平台是如何通过IdentityServer4来做到身份认证和…