摘要: <!-- 外联资源 --> <!-- 图床: https://www.imgtp.com/ --> <!-- 音乐外联: https://music.gimhoy.com/ --> <!-- 为博客底部添加音乐组件: 添加在页脚 --> <div id="player" class="aplayer 阅读全文
posted @ 2024-03-24 12:58 edolf 阅读(10) 评论(0) 推荐(0) 编辑
摘要: 开始”输入“cmd”右键“命令提示符”,使用“管理员运行” 输入命令 sc create KPMService binPath= D:\publish\KPMService\KPM.Service.exe start= auto 解释:create 创建 binPath :绝对路径 start:启动 阅读全文
posted @ 2024-03-24 09:20 edolf 阅读(25) 评论(0) 推荐(0) 编辑
摘要: ## 参考链接 WinForm中利用委托和事件实现子窗体传值给父窗体_winform子窗体向父窗体传值-CSDN博客 C#跨窗体传值的几种方法分析(很详细) - xh6300 - 博客园 (cnblogs.com) ## Form1 父窗口 // .Net8 Winform using static 阅读全文
posted @ 2024-03-24 09:14 edolf 阅读(40) 评论(0) 推荐(0) 编辑
摘要: // .net4.8 Winform using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System. 阅读全文
posted @ 2024-03-24 08:54 edolf 阅读(9) 评论(0) 推荐(0) 编辑
摘要: // .net8 Winform using System; using System.Runtime.InteropServices; using System.Threading.Tasks; using System.Windows.Forms; namespace Async_Cancell 阅读全文
posted @ 2024-03-24 08:48 edolf 阅读(12) 评论(0) 推荐(0) 编辑
摘要: // .net8环境 Winform namespace GUI_Async_await异步报告_供参考_ { public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void but 阅读全文
posted @ 2024-03-24 08:41 edolf 阅读(10) 评论(0) 推荐(0) 编辑
摘要: // Stream MS HelpManual: https://learn.microsoft.com/zh-cn/dotnet/api/system.io.stream?view=net-8.0 // FileStream 官方手册: https://learn.microsoft.com/zh 阅读全文
posted @ 2024-03-24 08:31 edolf 阅读(142) 评论(1) 推荐(0) 编辑
摘要: // 官方文档: https://learn.microsoft.com/zh-cn/dotnet/api/system.io.compression.gzipstream?view=net-8.0 /* GZipStream介绍 * 此类表示 gzip 数据格式,该格式使用行业标准算法进行无损文件 阅读全文
posted @ 2024-03-24 08:30 edolf 阅读(28) 评论(0) 推荐(0) 编辑
摘要: // 官方帮助 Console: https://learn.microsoft.com/zh-cn/dotnet/api/system.io.filesystemwatcher?view=net-8.0 // 官方帮助 WPF: https://learn.microsoft.com/zh-cn/ 阅读全文
posted @ 2024-03-24 08:27 edolf 阅读(57) 评论(0) 推荐(0) 编辑
摘要: /// 参考链接 https://learn.microsoft.com/zh-cn/dotnet/api/system.io.fileinfo?view=net-8.0 // 需要直到的是 fileinfo 主要用于查看文件信息, 搭配FileStream或StreamWrite可以操作文件IO, 阅读全文
posted @ 2024-03-24 08:25 edolf 阅读(23) 评论(0) 推荐(0) 编辑
摘要: namespace ConsoleApp_DriveInfo { internal class Program { static void Main(string[] args) { Driveinfo(); } static void Driveinfo() { DriveInfo driveIn 阅读全文
posted @ 2024-03-24 08:23 edolf 阅读(22) 评论(0) 推荐(0) 编辑
摘要: // 参考来源: https://learn.microsoft.com/zh-cn/dotnet/api/system.io.directory?view=net-8.0 // Directory 公开用于通过目录和子目录进行创建、移动和枚举的静态方法。 此类不能被继承。 /* * Directo 阅读全文
posted @ 2024-03-24 08:21 edolf 阅读(6) 评论(0) 推荐(0) 编辑
摘要: // 获取网络时间方法 public static DateTime GetNetworkTime() { try { //default Windows time server //用域名获取时候用这里 //string ntpServer = "time.windows.com"; // NTP 阅读全文
posted @ 2024-03-24 08:15 edolf 阅读(66) 评论(0) 推荐(0) 编辑
摘要: class Program { static void Main(string[] args) { bool isBreak = false; ConsoleColor colorBack = Console.BackgroundColor; ConsoleColor colorFore = Con 阅读全文
posted @ 2024-03-24 08:13 edolf 阅读(25) 评论(0) 推荐(0) 编辑
摘要: // 新建一个cs文件,放在你的项目内,可以调用这个方法。 using System; using System.Diagnostics; // 调用程序 namespace Shutdown { class Proces { public static void Progress(string P 阅读全文
posted @ 2024-03-24 08:10 edolf 阅读(13) 评论(0) 推荐(0) 编辑
摘要: // 该C#代码使用.net8 WinForm using System.Diagnostics; namespace OnlyOne { public partial class Form1 : Form { public Form1() { InitializeComponent(); } pr 阅读全文
posted @ 2024-03-24 08:03 edolf 阅读(17) 评论(0) 推荐(0) 编辑