摘要: 相对之前发的日志记录来说,此类将程序记录处理与写磁盘操作分离,用户代码部分,将日志放到队列,并通知线程将日志写到文件: 1.公共类: using System;using System.IO;using System.Collections.Generic;using static System.C 阅读全文
posted @ 2018-01-06 21:11 淺笑嫣然 阅读(466) 评论(3) 推荐(0) 编辑
摘要: 每次更新、发布新的dll到Nuget,都好烦,烦命令行的各种操作,今天就写一个WinForm小工具来发布自己的项目到Nuget: 由于此工具没啥技术含量(所调用的DLL已封装并发布到Nuget,可以在VSNuget包管理器搜索Gaofajin),故此处就不贴代码。,代码在附件中打包上传! https 阅读全文
posted @ 2018-01-05 10:39 淺笑嫣然 阅读(729) 评论(0) 推荐(1) 编辑
摘要: //此程序根据微信公众号DotNet的文章》net开发一个微信跳一跳辅助而来, 其核心时间系数值直接引用自文章; 1.窗体 using System;using System.Collections.Generic;using System.ComponentModel;using System.D 阅读全文
posted @ 2018-01-04 14:45 淺笑嫣然 阅读(1550) 评论(1) 推荐(0) 编辑
摘要: 1.定义一个枚举,乐器类型 #region 乐器定义 public enum MusicNo:uint { /// <summary> /// //大钢琴 /// </summary> AcousticGrandPiano = 0, /// <summary> ///明亮的钢琴 /// </summ 阅读全文
posted @ 2018-01-02 20:47 淺笑嫣然 阅读(1475) 评论(2) 推荐(0) 编辑
摘要: 大概已经习惯了黑底白字的控制台程序了:今天贴一下实现控制台输出彩色文字及背景的最简单方法! 方法1: 1.设置控制台背景颜色; 2设置控制台前景色; 3调用WriteLine(XXX)方法输出内容 4.调用ResetColor()方法恢复控制台 下面是一个简单实例: class Program { 阅读全文
posted @ 2018-01-01 19:24 淺笑嫣然 阅读(564) 评论(2) 推荐(1) 编辑
摘要: 运行完毕后删除自己: public class DelSelf { /// <summary> /// 删除自身,只删除Application对象所取得的文件 /// </summary> /// <param name="args">删除延时必须大于0,也不需太长,太小可能导致删不掉!请根据计算机 阅读全文
posted @ 2017-12-31 19:20 淺笑嫣然 阅读(1143) 评论(0) 推荐(0) 编辑
摘要: 翻出 初学C#时候写的一个计算器:初学者可以看看 using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System 阅读全文
posted @ 2017-12-30 18:53 淺笑嫣然 阅读(480) 评论(0) 推荐(0) 编辑
摘要: 经常使用控制台来写小玩意,总希望有个进度条,各种百度,终于简单实现: 先上进度条帮助类: public class ConsoleProgress { static ConsoleProgress consoleProgress = new ConsoleProgress(); int top=0; 阅读全文
posted @ 2017-12-29 13:08 淺笑嫣然 阅读(1281) 评论(16) 推荐(0) 编辑
摘要: 最近在学python学了简单的从网上抓取图片:刚好做一个C#版本的: 下面贴代码: using System;using System.IO;using System.Collections.Generic;using static System.Console;using System.Text; 阅读全文
posted @ 2017-12-28 17:25 淺笑嫣然 阅读(1404) 评论(2) 推荐(0) 编辑
摘要: 生产,操作,常需要,用LED屏显示一些信息 下面给一个最简单的LED实例程序:本实例使用LEDSender2010.dll类库 适用于中天等LED! 1.建立窗体: /* * Created by SharpDevelop. * User: gaofajin * Date: 2015/10/20 * 阅读全文
posted @ 2017-12-27 09:24 淺笑嫣然 阅读(2749) 评论(0) 推荐(0) 编辑