最新(发布|更新)

.net Core在windows注册服务,并开机启动
.Net Core

.net Core在windows注册服务,并开机启动

8029

在这里我用的是nssm 下载地址http://www.nssm.cc/download 1、下载后解压 我在这里是解压到D:\2\这个目录 2、运行CMD 有的电脑要管理员权限运行cmd 3、cmd 移到 d:\2\这个目录 cd /d d:\2\ 4、运行命令 nssm install lqwvje //lqwvje 是要注册的…

C#, .Net添加log4net日志功能
.Net Core

C#, .Net添加log4net日志功能

9137

log4net.config配置文件?xml version="1.0" encoding="utf-8"?configuration configSections section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler, log4net-net-1.0"/ /configSections log4netappende…

WPF页面基础布局源码实例
WPF

WPF页面基础布局源码实例

133

效果图Window x:Class="WpfApp1.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" …

WPF 全局Style样式使用
WPF

WPF 全局Style样式使用

74

1、新建一个资源词典ButtonStyle.xamlResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" !--Button 的全局默认样式-- Style TargetType…

C#, COM串口通讯基类
C#类库与方法

C#, COM串口通讯基类

8037

串口常用的使用流程1、初始化串口2、打开串口3、发送数据4、接收数据public class SerialCommon{ public SerialPort MySerialPort = new SerialPort(); public string[] GetPortNames() { return SerialPort.GetPortNames();//获取当前计算机的串行端口名…

JavaScript获取浏览器指纹
Web前端

JavaScript获取浏览器指纹

62

!DOCTYPE htmlhtml lang="zh-CN"head meta charset="UTF-8" meta name="viewport" content="width=device-width, initial-scale=1.0" titleJavaScript获取浏览器指纹/title style body { font-family: Arial, sans-seri…

WinFrom显示矢量图标(iconfont),字体(ttf)
WinForm技巧

WinFrom显示矢量图标(iconfont),字体(ttf)

5042

矢量图标Iconfont下载地址https://www.iconfont.cn/ C#核心代码public class IconfontHelper{ //提供一个字体系列集合,该集合是基于客户端应用程序提供的字体文件生成的。 private static System.Drawing.Text.PrivateFontCollection pfcc; public static S…