随笔分类 -  个人源码

摘要:喏,计算两个时间的时间差,精确到年月日时分秒 看起来比较笨的方法了,不知道有没有改进 阅读全文
posted @ 2017-08-30 17:53 Micmacs 阅读(1309) 评论(0) 推荐(0)
摘要:Point point = new Point(-10, -10); bool mouseDown = false; private void panelEx5_MouseDown(object sender, MouseEventArgs e) { mouseDown = true; point = e.Location; } private void panelEx5_MouseMove(object sender, MouseEventArgs e) ... 阅读全文
posted @ 2013-07-23 18:22 Micmacs 阅读(1228) 评论(0) 推荐(0)
摘要:Brush brush = new LinearGradientBrush(new Point(0, 100), new Point(800, 100), Color.Blue, Color.White); e.Graphics.FillRectangle(brush, this.ClientRectangle); 阅读全文
posted @ 2013-07-19 09:37 Micmacs 阅读(1074) 评论(0) 推荐(0)
摘要:我们在使用FileInfo获取文件大小的时候得到的值总是以字节为单位的,感觉看起来不太方便,所以写了这个方法来把字节转换为相应的显示方式,话不多说,直接上代码:/// <summary> /// 将文件大小(字节)转换为最适合的显示方式 /// </summary> /// <param name="size"></param> /// <returns></returns> public static string ConvertFileSize(long size) { string ... 阅读全文
posted @ 2013-04-28 11:46 Micmacs 阅读(1447) 评论(0) 推荐(1)