2020年4月26日
摘要:
尝试一个小项目,实现的功能实现PC的常用功能,比如定时关机、清除缓存、网络重置啥的,不用用户直接去CMD窗口执行,实现便捷的目的 初步规划 1.功能实现 2.版本打包 3.版本更新 4.测试(环境测试) 5.使用 如下: GitHub地址: https://github.com/RookieBoy6
阅读全文
posted @ 2020-04-26 13:15
RookieBoy666
阅读(349)
推荐(0)
2020年4月21日
摘要:
在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
阅读(370)
推荐(0)
2020年4月18日
摘要:
如下: DataTable dt = (DataTable)this.dataGridView1.DataSource; //数据集转化为DataTable dataGridView1.Rows.Count //数量统计 int ccc = dataGridView1.CurrentCell.Row
阅读全文
posted @ 2020-04-18 08:46
RookieBoy666
阅读(181)
推荐(0)
2020年4月17日
摘要:
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
阅读(149)
推荐(0)
摘要:
如下: 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
阅读(846)
推荐(0)
摘要:
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
阅读(496)
推荐(0)
摘要:
例如: 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
阅读(2416)
推荐(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
阅读(715)
推荐(0)
2020年3月20日
摘要:
获取当前用户ip public string getRemoteIp() { var ip = HttpContext.Request.Headers["X-Original-For"].FirstOrDefault(); if (string.IsNullOrEmpty(ip)) { ip = "
阅读全文
posted @ 2020-03-20 15:59
RookieBoy666
阅读(578)
推荐(0)
2020年1月10日
摘要:
declare @TableName sysname = 'Manager' declare @Result varchar(max) = ' /// <summary> /// ' + @TableName + ' /// </summary> public class ' + @TableNam
阅读全文
posted @ 2020-01-10 16:41
RookieBoy666
阅读(1867)
推荐(1)