基于 C# 语言开发网口远程开机功能的源代码
using ServerManagement.Models;using System.Net;using System.Net.Sockets;using System.Text.RegularExpressions;namespace ServerManagement.Common{ public class WakeOnLan { /// summary /// 发送唤醒数据包 /// /summary …
using ServerManagement.Models;using System.Net;using System.Net.Sockets;using System.Text.RegularExpressions;namespace ServerManagement.Common{ public class WakeOnLan { /// summary /// 发送唤醒数据包 /// /summary …
using System.Diagnostics;using System.Runtime.InteropServices;namespace ComputerPower.Common{ public class SystemShutdown { /// summary /// 关机或重启计算机 /// /summary /// param name="action"操作类型:shutd…
在这里我用的是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 是要注册的…
log4net.config配置文件?xml version="1.0" encoding="utf-8"?configuration configSections section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler, log4net-net-1.0"/ /configSections log4netappende…
效果图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" …
1、新建一个资源词典ButtonStyle.xamlResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" !--Button 的全局默认样式-- Style TargetType…
串口常用的使用流程1、初始化串口2、打开串口3、发送数据4、接收数据public class SerialCommon{ public SerialPort MySerialPort = new SerialPort(); public string[] GetPortNames() { return SerialPort.GetPortNames();//获取当前计算机的串行端口名…
public bool AreByteArraysEqual(byte[] a, byte[] b){ if (a == null || b == null || a.Length != b.Length) { return false; } for (int i = 0; i a.Length; i++) { if (a[i] != b[i]) { return false; …
!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…
矢量图标Iconfont下载地址https://www.iconfont.cn/ C#核心代码public class IconfontHelper{ //提供一个字体系列集合,该集合是基于客户端应用程序提供的字体文件生成的。 private static System.Drawing.Text.PrivateFontCollection pfcc; public static S…