随笔 - 125  文章 - 0  评论 - 20  阅读 - 93464
04 2020 档案
心血来潮尝试一个小项目(WinForm)
摘要:尝试一个小项目,实现的功能实现PC的常用功能,比如定时关机、清除缓存、网络重置啥的,不用用户直接去CMD窗口执行,实现便捷的目的 初步规划 1.功能实现 2.版本打包 3.版本更新 4.测试(环境测试) 5.使用 如下: GitHub地址: https://github.com/RookieBoy6 阅读全文
posted @ 2020-04-26 13:15 RookieBoy666 阅读(340) 评论(0) 推荐(0) 编辑
bat文件以管理员运行
摘要:在bat文件中开头加入以下内容: @echo off >nul 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system" if '%errorlevel%' NEQ '0' ( echo Request 阅读全文
posted @ 2020-04-21 17:16 RookieBoy666 阅读(365) 评论(0) 推荐(0) 编辑
DataGridView一些总结
摘要:如下: DataTable dt = (DataTable)this.dataGridView1.DataSource; //数据集转化为DataTable dataGridView1.Rows.Count //数量统计 int ccc = dataGridView1.CurrentCell.Row 阅读全文
posted @ 2020-04-18 08:46 RookieBoy666 阅读(179) 评论(0) 推荐(0) 编辑
常见辅助类、方法
摘要:1.日志记录Log.cs public class Log { private string Event { get; set; } private DateTime Time { get; set; } /// <summary> /// 日志记录,写入文件 /// </summary> /// 阅读全文
posted @ 2020-04-17 14:56 RookieBoy666 阅读(145) 评论(0) 推荐(0) 编辑
向txt文件中添加或者追加文字字符串
摘要:如下: if (!File.Exists(@"D:\MyFile.txt")) { FileStream fs = new FileStream(@"D:\MyFile.txt", FileMode.Create, FileAccess.Write); } else { using (FileStr 阅读全文
posted @ 2020-04-17 14:25 RookieBoy666 阅读(824) 评论(0) 推荐(0) 编辑
获取App.config中的连接字符串
摘要:App.config中: <appSettings> <add key="connectionstring" value="Data Source=127.0.0.1;Initial Catalog=DatabaseName;Persist Security Info=True; User ID=s 阅读全文
posted @ 2020-04-17 13:27 RookieBoy666 阅读(489) 评论(0) 推荐(0) 编辑
将字符串写入txt等文件中
摘要:例如: string str=“你好”; WriteEncodeString(str, "Config.txt");//bin/debug文件夹下会生成Config.txt文件,里面包含str内容 public static void WriteEncodeString(string str,str 阅读全文
posted @ 2020-04-17 13:21 RookieBoy666 阅读(2406) 评论(0) 推荐(0) 编辑
字符串加密解密
摘要:参照网友的教程 加密: //加密 public static string Encode(string encryptString) { try { string KEY = "zjp1202!"; byte[] _vector = { 0x12, 0x34, 0x56, 0x78, 0x90, 0 阅读全文
posted @ 2020-04-17 13:13 RookieBoy666 阅读(705) 评论(0) 推荐(0) 编辑

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

点击右上角即可分享
微信分享提示