摘要: 加入ListView,在Columns中添加列。view属性改成Details。 1 private void show_log(string str) 2 { 3 this.BeginInvoke(new MethodInvoker(() => 4 { 5 ListViewItem viewIte 阅读全文
posted @ 2020-06-08 16:11 荼离伤花 阅读(437) 评论(0) 推荐(0) 编辑
摘要: client类 1 using System; 2 using System.Collections.Generic; 3 using System.Linq; 4 using System.Text; 5 using System.Threading.Tasks; 6 using System.N 阅读全文
posted @ 2020-06-08 16:01 荼离伤花 阅读(2519) 评论(0) 推荐(1) 编辑
摘要: c#中读取文件,可以用来保存日志,写最近退出时的控件参数,读文件可以在打开窗口时加载上次退出时的参数信息。 1 using System; 2 using System.Collections.Generic; 3 using System.IO; 4 using System.Linq; 5 us 阅读全文
posted @ 2020-06-08 15:37 荼离伤花 阅读(2159) 评论(0) 推荐(0) 编辑
摘要: public static long GetHardDiskFreeSpace(string str_HardDiskName) //磁盘号 { long freeSpace = new long(); str_HardDiskName = str_HardDiskName + ":\\"; Sys 阅读全文
posted @ 2020-06-08 15:24 荼离伤花 阅读(933) 评论(0) 推荐(0) 编辑
摘要: 在程序运行时,需要自动删除一些文件,以免硬盘占满。 下列程序自动删除文件/文件夹。 首先从工具箱拖入一个Timer,设置Enabled为True,interval为发生的间隔,事件Tick为要发生的事件。 1 private void timer1_Tick(object sender, Event 阅读全文
posted @ 2020-06-08 15:13 荼离伤花 阅读(2780) 评论(0) 推荐(1) 编辑