摘要: 代码: private int CopyDirectory(string sourceDir, string targetDir) { try { // 确保目标目录存在,如果不存在则创建 Directory.CreateDirectory(targetDir); // 获取源目录中的所有文件 fo 阅读全文
posted @ 2025-04-02 10:28 .五十米深蓝 阅读(5) 评论(0) 推荐(0)
摘要: Halcon 与 bitmap 互转: public void Bitmap2HObjectBpp24(Bitmap bmp, out HObject image) { try { Rectangle rect = new Rectangle(0, 0, bmp.Width, bmp.Height) 阅读全文
posted @ 2023-11-29 18:04 .五十米深蓝 阅读(798) 评论(0) 推荐(0)
摘要: 普通和递归方式删除文件 /// <summary> /// 删除指定文件夹目录下的文件,不包含其中的文件夹 /// </summary> /// <param name="dirInfo"></param> /// <param name="time"></param> public void de 阅读全文
posted @ 2022-07-18 13:29 .五十米深蓝 阅读(129) 评论(0) 推荐(0)