随笔分类 - 个人源码
摘要:喏,计算两个时间的时间差,精确到年月日时分秒 看起来比较笨的方法了,不知道有没有改进
阅读全文
摘要: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) ...
阅读全文
摘要:Brush brush = new LinearGradientBrush(new Point(0, 100), new Point(800, 100), Color.Blue, Color.White); e.Graphics.FillRectangle(brush, this.ClientRectangle);
阅读全文
摘要:我们在使用FileInfo获取文件大小的时候得到的值总是以字节为单位的,感觉看起来不太方便,所以写了这个方法来把字节转换为相应的显示方式,话不多说,直接上代码:/// <summary> /// 将文件大小(字节)转换为最适合的显示方式 /// </summary> /// <param name="size"></param> /// <returns></returns> public static string ConvertFileSize(long size) { string ...
阅读全文
浙公网安备 33010602011771号