thumbnail
wpf 地球旋转(向量计算)
代码 # loaded 时计算地球公转的地球中心 // 使用向量法计算太阳相对于地球的中心 var point = this.GetRotateTransformCenterWithTranslatePoint(); // 使用 TranslatePoint 法计算太阳相对于地球的中心 var checkPoint = this.GetRotate…
thumbnail
wpf 向量计算
xaml <Grid> <!-- 坦克图片,RenderTransformOrigin 设置中心点为 .5 .5 --> <Rectangle x:Name="TankRectangle" Width="240" Height="120" RenderTran…
thumbnail
wpf 水波纹按钮
模板 <ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:wa…
thumbnail
wpf 状态切换
调用 # 调用 // 切换状态,指定模拟的状态时使用 VisualStateManager.GoToState, 现在指定了控件的状态,使用 VisualStateManager.GoToElementState VisualStateManager.GoToElementState(this.ColorBorder, name, true); x…
thumbnail
wpf 右下角提示弹窗口
<Window x:Class="WpfDemoApp.PromptPopupBoxCtrls.PopupBoxWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://s…
贝塞尔曲线公式
计算公式 二次曲线 三次曲线 https://www.bilibili.com/video/BV16v4y1Q7PD https://juejin.cn/post/7082701281969569829
centos 7 更换 yum 源
很多源已经停止服务了 cd /etc/yum.repos.d CentOS-Base.repo # 原来的都加上 enable=0 [base] name=CentOS-$releasever - Base - mirrors.aliyun.com failovermethod=priority baseurl=http://mirrors.ali…
centos 7 网络管理
默认为 networkmanager 管理 - 查看服务是否运行 systemctl status NetworkManager - nmcli device status 是否管理了 eth0 等设备, 状态 connected - 查看 /etc/sysconfig/network-scripts/ifcfg-* 是否配置 ONBOOT=yes…
.net 断言库
Ardalis.GuardClauses https://www.nuget.org/packages/Ardalis.GuardClauses https://github.com/ardalis/guardclauses
pwsh 发送钉钉机器人消息
# 钉钉消息发送 $ErrorActionPreference = 'Stop' # 钉钉消息推送相关 class DingMessage { [string] $secret = "" [string] $ServerUrl = "" [void] send($title, $messa…