WPF 四种不同效果呼吸灯

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

      由于微信群人数太多入群请添加小编微信号

(yanjinhuawechat)或(W_Feng_aiQ)入群

(需备注WPF开发者

  PS:有更好的方式欢迎推荐。

01

代码如下

一、创建 BreathLamp.cs 继承 ContentControl代码如下。

a69c2a7d91cddfbf379d1c425f400b61.png

using System.Windows;
using System.Windows.Controls;namespace WPFDevelopers.Controls
{public enum LampEffect{OuterGlow,Eclipse,Ripple,Streamer}public class BreathLamp : ContentControl{static BreathLamp(){DefaultStyleKeyProperty.OverrideMetadata(typeof(BreathLamp), new FrameworkPropertyMetadata(typeof(BreathLamp)));}public override void OnApplyTemplate(){base.OnApplyTemplate();}public static readonly DependencyProperty CornerRadiusProperty =DependencyProperty.Register("CornerRadius", typeof(CornerRadius), typeof(BreathLamp), new PropertyMetadata(new CornerRadius(60d)));public static readonly DependencyProperty LampEffectProperty =DependencyProperty.Register("LampEffect", typeof(LampEffect), typeof(BreathLamp), new PropertyMetadata(default(LampEffect), OnLampEffectPropertyChangedCallBack));public static readonly DependencyProperty IsLampStartProperty =DependencyProperty.Register("IsLampStart", typeof(bool), typeof(BreathLamp), new PropertyMetadata(true));public CornerRadius CornerRadius{get { return (CornerRadius)GetValue(CornerRadiusProperty); }set { SetValue(CornerRadiusProperty, value); }}public LampEffect LampEffect{get { return (LampEffect)GetValue(LampEffectProperty); }set { SetValue(LampEffectProperty, value); }}private static void OnLampEffectPropertyChangedCallBack(DependencyObject d, DependencyPropertyChangedEventArgs e){}public bool IsLampStart{get { return (bool)GetValue(IsLampStartProperty); }set { SetValue(IsLampStartProperty, value); }}}
}

二、BreathLamp.xaml 代码如下

0df6858fe44b8e2974552f4807edc3c9.png

<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"><ResourceDictionary.MergedDictionaries><ResourceDictionary Source="Basic/ControlBasic.xaml"/><ResourceDictionary Source="Basic/Animations.xaml"/></ResourceDictionary.MergedDictionaries><ControlTemplate x:Key="LampEffect_Eclipse" TargetType="{x:Type controls:BreathLamp}"><Grid><Viewbox><Grid Width="60" Height="60"><Border x:Name="PART_LampEclipse"  BorderThickness="0" BorderBrush="Transparent" CornerRadius="{TemplateBinding CornerRadius}" Background="{DynamicResource DangerSolidColorBrush}"RenderTransformOrigin="0.5,0.5"><!--<Border.Effect><DropShadowEffect BlurRadius="25" ShadowDepth="0" Color="{DynamicResource DangerColor}"/></Border.Effect>--><Border.RenderTransform><ScaleTransform CenterX="0" CenterY="0" ScaleX="0.8" ScaleY="0.8"></ScaleTransform></Border.RenderTransform></Border><Border CornerRadius="{TemplateBinding CornerRadius}" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}" Background="{TemplateBinding Background}"/></Grid></Viewbox><ContentPresenter/></Grid><ControlTemplate.Triggers><Trigger Property="IsLampStart" Value="True"><Setter Property="Effect" TargetName="PART_LampEclipse"><Setter.Value><DropShadowEffect BlurRadius="25" ShadowDepth="0" Color="{DynamicResource DangerColor}"/></Setter.Value></Setter><Trigger.EnterActions><BeginStoryboard><Storyboard RepeatBehavior="Forever" AutoReverse="True"><DoubleAnimation Duration="0:0:1" BeginTime="0" From="0.8" To="1.1" Storyboard.TargetName="PART_LampEclipse" Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleX)" EasingFunction="{StaticResource SineEaseOut}"/><DoubleAnimation Duration="0:0:1" BeginTime="0" From="0.8" To="1.1" Storyboard.TargetName="PART_LampEclipse" Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleY)" EasingFunction="{StaticResource SineEaseOut}"/></Storyboard></BeginStoryboard></Trigger.EnterActions></Trigger></ControlTemplate.Triggers></ControlTemplate><ControlTemplate x:Key="LampEffect_Ripple" TargetType="{x:Type controls:BreathLamp}"><Grid><Viewbox><Grid Width="60" Height="60"><Border x:Name="PART_LampRipple_1" RenderTransformOrigin="0.5,0.5"Background="Transparent" BorderThickness="1"CornerRadius="{TemplateBinding CornerRadius}" BorderBrush="{DynamicResource DangerSolidColorBrush}"><Border.RenderTransform><ScaleTransform CenterX="0" CenterY="0" ScaleX="0.8" ScaleY="0.8"></ScaleTransform></Border.RenderTransform></Border><Border x:Name="PART_LampRipple_2" RenderTransformOrigin="0.5,0.5"Background="Transparent" BorderThickness="1"CornerRadius="{TemplateBinding CornerRadius}" BorderBrush="{DynamicResource DangerSolidColorBrush}"><Border.RenderTransform><ScaleTransform ScaleX="0.8" ScaleY="0.8"></ScaleTransform></Border.RenderTransform></Border><Border CornerRadius="{TemplateBinding CornerRadius}" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}" Background="{TemplateBinding Background}"/></Grid></Viewbox><ContentPresenter/></Grid><ControlTemplate.Triggers><Trigger Property="IsLampStart" Value="True"><Trigger.EnterActions><BeginStoryboard><Storyboard RepeatBehavior="Forever" AutoReverse="True"><DoubleAnimation Duration="0:0:1" BeginTime="0" From="0.8" To="1.3" Storyboard.TargetName="PART_LampRipple_1" Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleX)" EasingFunction="{StaticResource SineEaseOut}"/><DoubleAnimation Duration="0:0:1" BeginTime="0" From="0.8" To="1.3" Storyboard.TargetName="PART_LampRipple_1" Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleY)" EasingFunction="{StaticResource SineEaseOut}"/><DoubleAnimation Duration="0:0:1" BeginTime="0:0:0.4" From="0.8" To="1.3" Storyboard.TargetName="PART_LampRipple_2" Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleX)" EasingFunction="{StaticResource SineEaseOut}"/><DoubleAnimation Duration="0:0:1" BeginTime="0:0:0.4" From="0.8" To="1.3" Storyboard.TargetName="PART_LampRipple_2" Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleY)" EasingFunction="{StaticResource SineEaseOut}"/></Storyboard></BeginStoryboard></Trigger.EnterActions></Trigger></ControlTemplate.Triggers></ControlTemplate><ControlTemplate x:Key="LampEffect_OuterGlow" TargetType="{x:Type controls:BreathLamp}"><Grid><Viewbox><Grid Width="60" Height="60"><Border x:Name="PART_LampOuterGlow"Margin="1"BorderThickness="0" BorderBrush="Transparent" CornerRadius="{TemplateBinding CornerRadius}" Background="{DynamicResource DangerSolidColorBrush}"RenderTransformOrigin="0.5,0.5"><Border.Effect><DropShadowEffect x:Name="PART_LampOuterGlow_Effect" BlurRadius="0" ShadowDepth="0" Color="{DynamicResource DangerColor}"/></Border.Effect></Border><Border CornerRadius="{TemplateBinding CornerRadius}" BorderThickness="{TemplateBinding BorderThickness}" BorderBrush="{TemplateBinding BorderBrush}" Background="{TemplateBinding Background}"/></Grid></Viewbox><ContentPresenter/></Grid><ControlTemplate.Triggers><Trigger Property="IsLampStart" Value="True"><Trigger.EnterActions><BeginStoryboard><Storyboard RepeatBehavior="Forever" ><DoubleAnimation Duration="0:0:0.6" AutoReverse="True" BeginTime="0" From="0" To="40" Storyboard.TargetName="PART_LampOuterGlow_Effect" Storyboard.TargetProperty="BlurRadius" EasingFunction="{StaticResource SineEaseInOut}"/></Storyboard></BeginStoryboard></Trigger.EnterActions></Trigger></ControlTemplate.Triggers></ControlTemplate><ControlTemplate x:Key="LampEffect_Streamer" TargetType="{x:Type controls:BreathLamp}"><Grid><Viewbox><Grid Width="60" Height="60"><Border x:Name="PART_LampContainer" CornerRadius="{TemplateBinding CornerRadius}" BorderThickness="{TemplateBinding BorderThickness}"  Background="Transparent" ><Border.BorderBrush><LinearGradientBrush ><LinearGradientBrush.GradientStops><GradientStop Color="#FF00cec9" Offset="0"/><GradientStop Color="#2000cec9" Offset="0.3"/><GradientStop Color="Transparent" Offset="1" /></LinearGradientBrush.GradientStops></LinearGradientBrush></Border.BorderBrush></Border></Grid></Viewbox><Border Padding="{TemplateBinding BorderThickness}"><ContentPresenter Margin="{TemplateBinding BorderThickness}"/></Border></Grid><ControlTemplate.Triggers><Trigger Property="IsLampStart" Value="True"><Trigger.EnterActions><BeginStoryboard x:Name="PART_LampStoryboard"><Storyboard RepeatBehavior="Forever"><PointAnimationUsingKeyFrames Storyboard.TargetProperty="(Border.BorderBrush).(LinearGradientBrush.StartPoint)"  Storyboard.TargetName="PART_LampContainer"><EasingPointKeyFrame KeyTime="0:0:0.0" Value="0,1"/><EasingPointKeyFrame KeyTime="0:0:0.5" Value="0.855,0.148"/><EasingPointKeyFrame KeyTime="0:0:1" Value="0.852,0.855"/><EasingPointKeyFrame KeyTime="0:0:1.5" Value="0.148,0.855"/><EasingPointKeyFrame KeyTime="0:0:2" Value="0.144,0.149"/><EasingPointKeyFrame KeyTime="0:0:2.5" Value="0,0"/></PointAnimationUsingKeyFrames><PointAnimationUsingKeyFrames Storyboard.TargetProperty="(Border.BorderBrush).(LinearGradientBrush.EndPoint)"  Storyboard.TargetName="PART_LampContainer"><EasingPointKeyFrame KeyTime="0:0:0.0" Value="0,1"/><EasingPointKeyFrame KeyTime="0:0:0.5" Value="0.145,0.852"/><EasingPointKeyFrame KeyTime="0:0:1" Value="0.148,0.145"/><EasingPointKeyFrame KeyTime="0:0:1.5" Value="0.852,0.145"/><EasingPointKeyFrame KeyTime="0:0:2" Value="0.856,0.851"/><EasingPointKeyFrame KeyTime="0:0:2.5" Value="0,1"/></PointAnimationUsingKeyFrames></Storyboard></BeginStoryboard></Trigger.EnterActions><Trigger.ExitActions><StopStoryboard BeginStoryboardName="PART_LampStoryboard"/></Trigger.ExitActions></Trigger></ControlTemplate.Triggers></ControlTemplate><Style TargetType="{x:Type controls:BreathLamp}" BasedOn="{StaticResource ControlBasicStyle}"><Setter Property="BorderThickness" Value="1"/><Style.Triggers><Trigger Property="LampEffect" Value="Eclipse"><Setter Property="Template" Value="{StaticResource LampEffect_Eclipse}"/></Trigger><Trigger Property="LampEffect" Value="Ripple"><Setter Property="Template" Value="{StaticResource LampEffect_Ripple}"/></Trigger><Trigger Property="LampEffect" Value="OuterGlow"><Setter Property="Template" Value="{StaticResource LampEffect_OuterGlow}"/></Trigger><Trigger Property="LampEffect" Value="Streamer"><Setter Property="Template" Value="{StaticResource LampEffect_Streamer}"/></Trigger></Style.Triggers>
</Style>
</ResourceDictionary>

二、BreatheLightExample.xaml 代码如下

7dc472a8d0aeb92704073061df23f9ff.png

<UserControl x:Class="WPFDevelopers.Samples.ExampleViews.BreatheLightExample"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"><UniformGrid Columns="2"><Border Effect="{StaticResource NormalShadowDepth}" Width="400" Height="140" Background="{StaticResource WhiteSolidColorBrush}"CornerRadius="3"><Grid Margin="20,20,0,0"><Grid.ColumnDefinitions><ColumnDefinition Width="Auto"/><ColumnDefinition/></Grid.ColumnDefinitions><wpfdev:BreathLamp Width="60" Height="60" LampEffect="OuterGlow" Background="Transparent" IsLampStart="true"VerticalAlignment="Top" HorizontalAlignment="Left"><Ellipse><Ellipse.Fill><ImageBrush ImageSource="pack://application:,,,/WPFDevelopers.Samples;component/Images/Breathe/2.jpg"/></Ellipse.Fill></Ellipse></wpfdev:BreathLamp><TextBlock Grid.Column="1" Margin="10,20"FontSize="{StaticResource MediumFontSize}"><Run Foreground="{StaticResource PrimaryTextSolidColorBrush}">周星星|达叔</Run><Run Foreground="{StaticResource SuccessPressedSolidColorBrush}">正在直播</Run></TextBlock><Button Style="{StaticResource PrimaryButton}" Grid.Column="1" HorizontalAlignment="Right" VerticalAlignment="Bottom" Content="进入直播"/></Grid></Border><Border Effect="{StaticResource NormalShadowDepth}" Width="400" Height="140" Background="{StaticResource WhiteSolidColorBrush}"CornerRadius="3"><Grid Margin="20,20,0,0"><Grid.ColumnDefinitions><ColumnDefinition Width="Auto"/><ColumnDefinition/></Grid.ColumnDefinitions><wpfdev:BreathLamp Width="60" Height="60" LampEffect="Eclipse" Background="LightGray" IsLampStart="true"VerticalAlignment="Top" HorizontalAlignment="Left"><Ellipse><Ellipse.Fill><ImageBrush ImageSource="pack://application:,,,/WPFDevelopers.Samples;component/Images/Breathe/1.jpg"/></Ellipse.Fill></Ellipse></wpfdev:BreathLamp><TextBlock Grid.Column="1" Margin="10,20"FontSize="{StaticResource MediumFontSize}"TextWrapping="Wrap"><Run Foreground="{StaticResource PrimaryTextSolidColorBrush}">大话西游之大圣娶亲&#x000A;</Run><Run Foreground="{StaticResource SuccessPressedSolidColorBrush}">正在直播</Run></TextBlock><Button Style="{StaticResource PrimaryButton}" Grid.Column="1" HorizontalAlignment="Right"VerticalAlignment="Bottom" Content="进入直播" Width="100"/></Grid></Border><Border Effect="{StaticResource NormalShadowDepth}" Width="400" Height="140" Background="{StaticResource WhiteSolidColorBrush}"CornerRadius="3"><Grid Margin="20,20,0,0"><Grid.ColumnDefinitions><ColumnDefinition Width="Auto"/><ColumnDefinition/></Grid.ColumnDefinitions><wpfdev:BreathLamp Width="60" Height="60" LampEffect="Ripple" Background="LightGray" IsLampStart="true"VerticalAlignment="Top" HorizontalAlignment="Left"><Ellipse><Ellipse.Fill><ImageBrush ImageSource="pack://application:,,,/WPFDevelopers.Samples;component/Images/Breathe/0.jpg"/></Ellipse.Fill></Ellipse></wpfdev:BreathLamp><TextBlock Grid.Column="1" Margin="10,20"FontSize="{StaticResource MediumFontSize}"><Run Foreground="{StaticResource PrimaryTextSolidColorBrush}">XXXYYY</Run><Run Foreground="{StaticResource SuccessPressedSolidColorBrush}">正在直播</Run></TextBlock><Button Style="{StaticResource PrimaryButton}" Grid.Column="1" HorizontalAlignment="Right"VerticalAlignment="Bottom" Content="进入直播" Width="100"/></Grid></Border><Border Effect="{StaticResource NormalShadowDepth}" Width="400" Height="140" Background="{StaticResource WhiteSolidColorBrush}"CornerRadius="3"><Grid Margin="20,20,0,0"><Grid.ColumnDefinitions><ColumnDefinition Width="Auto"/><ColumnDefinition/></Grid.ColumnDefinitions><wpfdev:BreathLamp Width="60" Height="60" LampEffect="Streamer" Background="LightGray" IsLampStart="True"VerticalAlignment="Top" HorizontalAlignment="Left"><Ellipse Width="53" Height="53"><Ellipse.Fill><ImageBrush ImageSource="pack://application:,,,/WPFDevelopers.Samples;component/Images/Chat/UserImages/yanjinhua.png"/></Ellipse.Fill></Ellipse></wpfdev:BreathLamp><TextBlock Grid.Column="1" Margin="10,20"FontSize="{StaticResource MediumFontSize}"><Run Foreground="{StaticResource PrimaryTextSolidColorBrush}">WPF开发者</Run><Run Foreground="{StaticResource SuccessPressedSolidColorBrush}">正在直播</Run></TextBlock><Button Style="{StaticResource PrimaryButton}" Grid.Column="1" HorizontalAlignment="Right" VerticalAlignment="Bottom" Content="进入直播" /></Grid></Border></UniformGrid>
</UserControl>

02


效果预览

鸣谢素材提供者 - 吴锋

源码地址如下

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

005a570e6117cfacc744547f890cc442.png

扫一扫关注我们,

4e6837d20c69ea44b22d34d8857bb725.gif

更多知识早知道!

399c3b8f05142376528803ad06592f9d.gif

点击阅读原文可跳转至源代码

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

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

相关文章

用GCD线程组与GCD信号量将异步线程转换为同步线程

用GCD线程组与GCD信号量将异步线程转换为同步线程 有时候我们会碰到这样子的一种情形: 同时获取两个网络请求的数据,但是网络请求是异步的,我们需要获取到两个网络请求的数据之后才能够进行下一步的操作,这个时候,就是线程组与信号量的用武之地了. 线程组用以监听线程的执行情况…

基于visual Studio2013解决C语言竞赛题之0710排序函数

&#xfeff;&#xfeff;题目解决代码及点评/* 10、用指向指针的指针的方法对N个整数排序并输出。 要求排序单独写成一个函数。N个整数和N在主程序中输入&#xff0c;最后在主函数中输出。 */ #include <stdio.h> #include <stdlib.h> #define N 10 void main() {…

清华本科生0人去阿里,交叉信息院硕士没人再深造 | 清华大学2020年毕业生就业质量报告...

全世界只有3.14 % 的人关注了爆炸吧知识转自&#xff1a;量子位作者&#xff1a;金磊 杨净这几天&#xff0c;《清华大学2020年毕业生就业质量报告》火了。于是&#xff0c;我们也下载下来“拜读”了一下。就业率、毕业去向、就业地域等等信息看下来&#xff0c;也还算是情理之…

Android之TypedArray 为什么需要调用recycle()

转自&#xff1a;http://blog.csdn.net/Monicabg/article/details/45014327 在 Android 自定义 View 的时候&#xff0c;需要使用 TypedArray 来获取 XML layout 中的属性值&#xff0c;使用完之后&#xff0c;需要调用 recyle() 方法将 TypedArray 回收。 那么问题来了&#x…

什么就像谈恋爱一样?

1 向这只猫学习&#xff01;我的妈耶&#xff0c;这撩人的眼神&#xff0c;这小手&#xff0c;以后这大兄die的女朋友还要跟一只猫吃醋&#xff0c;默默先心疼一下2 善良的人最可爱了&#xff01;3 妈妈救我&#xff0c;马路牙子不让我去找你4 这是童年的回忆呀5 一位网友收到老…

.NET Regular Expressions

HTML去空白回车换行 private static readonly Regex REGEX_LINE_BREAKS new Regex("\n\s*", RegexOptions.Compiled); private static readonly Regex REGEX_LINE_SPACE new Regex("\n\s*\r", RegexOptions.Compiled); private static readonly Regex R…

他拥有当今世界最高智商,从出生就一路开挂,然而,获得数学最高奖的他却说自己只是个热爱数学的普通人...

全世界只有3.14 % 的人关注了爆炸吧知识今天就讲讲这位平易近人的顶级天才吧。1975年&#xff0c;陶哲轩出生在澳大利亚&#xff0c;父母均毕业于香港大学&#xff0c;父亲陶象国是一名儿科医生&#xff0c;母亲梁蕙兰是物理和数学专业的高材生&#xff0c;曾当过中学数学教师。…

Win11用户增长迅速!你升了吗?

近日&#xff0c;AdDuplex 发布了 2021 年 11 月微软现代 Windows 操作系统的市场报告。现代 Windows 操作系统的统计只包括 Windows 11 和 Windows 10。Windows 11在 11 月&#xff0c;Windows 11 操作系统的市场份额达到 8.9%&#xff0c;其中包括 8.6% 运行 Windows 11 正式…

豆瓣9分,颠覆世界观的好书,每读一章就感叹一次:原来如此!(免费领)

全世界只有3.14 % 的人关注了爆炸吧知识聪明人的投资直击本质股神巴菲特曾在2019股东大会上&#xff0c;遇到了一位来自美国旧金山的年轻人提问&#xff1a;“要想成为一个好的投资者&#xff0c;最好的方法是什么&#xff1f;”巴菲特毫不犹豫回答道&#xff1a;“阅读”。5岁…

C# WPF MVVM开发框架Caliburn.Micro Screens, Conductors 和 Composition⑦

01—Screens, Conductors and CompositionActions, Coroutines and Conventions往往最能吸引Caliburn.Micro的注意力&#xff0c;但如果你想让你的UI设计得更好&#xff0c;那么了解屏幕和导体可能是最重要的。如果您想利用合成&#xff0c;这一点尤其重要。杰里米米勒最近在为…

如此生猛的纪录片,背后是难以置信的故事!

全世界只有3.14 % 的人关注了爆炸吧知识美国纪录片大师阿尔伯特梅索斯所言&#xff1a;“制作一部电影不是为一个问题寻求答案&#xff0c;而是尝试去捕捉生活本身。”从赵忠祥那句大名鼎鼎的“春天到了&#xff0c;又到了动物交配的季节”开始&#xff0c;纪录片看似没有像影视…

官宣!.NET官网发布中⽂版

#官宣.NET简体中文版.NET的官网终于正式发布简体中⽂版本了&#xff0c;⽽且是作为官方支持的第一梯队&#xff01;这是一个影响未来中国.NET技术生态的大事。我承认好的英文是从事IT技术的重要基础&#xff0c;但本地化语言能帮助更多人了解、学习、应用该技术。.NET官网中文版…

爱因斯坦为什么不是普通人?看他怎么喝茶就明白了,差距太明显了!没法比.......

全世界只有3.14 % 的人关注了爆炸吧知识来源&#xff1a;Закройте, дует看到上面这个动图&#xff0c;猜到这篇文章要讲什么了吗&#xff1f;讲泡茶&#xff0c;啊呸&#xff01;讲“茶叶悖论”&#xff0c;一个爱因斯坦喝茶时不经意间看到的物理现象&#xff0c;然…

在应用程序中实现对NandFlash的操作

以TC58NVG2S3ETA00 为例&#xff1a; 下面是它的一些物理参数&#xff1a; 图一 图二 图三 图四 图五 图6-0 图6-1 说明一下&#xff0c;在图6-1中中间的那个布局表可以看做是实际的NandFlash一页数据的布局&#xff0c;其中Data区域用于存放有效的数据&#xff0c;也就是我们可…

1 盒用 1 年,这个防雾黑科技,让你的眼镜再也不起雾!

▲ 点击查看本来被疫情这么一闹&#xff0c;口罩就已经成了我们离不开的刚需品。现在天气大幅度降温&#xff0c;口罩更不能摘了&#xff0c;必须得御寒防疫两手抓&#xff01;虽然口罩的优点有目共睹&#xff0c;但它最大的 Bug 也够大伙儿吐槽一顿了——口罩眼镜一秒起雾&…

福利好礼现金大奖等你来→首届 .NET Conf China Hackathon 火热报名中!

.NET 开源以来越来越多的开发者和企业开始加入到 .NET 的生态。.NET 6 是 .NET Framework, .NET Core 和 Mono 三个平台完成融合的第一个长期支持版本&#xff0c;无论你是开发云原生应用&#xff0c;还是 IOT 应用&#xff0c;移动端&#xff0c;桌面应用&#xff0c;.NET 6 …

java属于面相_[Java教程]面相对象

[Java教程]面相对象0 2018-09-13 16:00:26面向对象那什么是面向对象&#xff1f; 在Java 中&#xff0c;我们是一切皆对象&#xff0c;所有的方法都是围绕着对象来的。面相对象是相对面向过程而来的&#xff0c;他们都是一种思想&#xff0c;面向过程&#xff0c;强调的是一种功…

下面由我来给大家表演个绝活

1 娶个老婆真不容易啊&#xff01;▼2 孩子有些东西不是努力就能吃到的啊▼3 给大家表演个绝活▼4 在危险的边缘一点点试探▼5 你知道为什么狗子要拆家了吗▼6 外国版姜太公钓鱼愿者上钩▼7 最好看的那个晚霞永远出现在教室的窗外▼你点的每个赞&#xff0c;我都认真当成…

.Net 下高性能分表分库组件-连ShardingCore接模式原理

ShardingCore 一款ef-core下高性能、轻量级针对分表分库读写分离的解决方案&#xff0c;具有零依赖、零学习成本、零业务代码入侵。Github Source Code 助力dotnet 生态 Gitee Source Code介绍在分表分库领域java有着很多的解决方案,尤其是客户端解决方案(ShardingSphere)&…

php 利用http上传协议(表单提交上传图片 )

主要就是利用php 的 fsocketopen 消息传输。 这里先通过upload.html 文件提交&#xff0c;利用chrome抓包&#xff0c;可以看到几个关键的信息。 首先指定了表单类型为multipart/form-data;。 boundary是分隔符 因为上传文件不在使用原有的http协议了。请求内容不再可能以 x…