摘要: Thread 创建线程 Thread t = new Thread(Test); t.Start(); public void Test() { for (int i = 0; i < 10; i++) { Thread.Sleep(1000); } } Thread t = new Thread( 阅读全文
posted @ 2021-10-13 21:31 追风少年2021 阅读(158) 评论(0) 推荐(0)
摘要: 使用ManualResetEvent 在一个线程中控制另一个线程的执行 首先需要先实例化一个信号对象 ManualResetEvent signal= new ManualResetEvent(false); signal.WaitOne() 阻塞当前线程,等待接收到其他线程发来的取消信号 sign 阅读全文
posted @ 2021-10-13 21:30 追风少年2021 阅读(390) 评论(0) 推荐(0)
摘要: 1 /// <summary> 2 /// 搜索指定目录下全部文件,获得文件的全路径 3 /// </summary> 4 /// <param name="dir">搜索目录</param> 5 /// <param name="type">指定文件类型,格式如*.txt,不指定类型用*</par 阅读全文
posted @ 2020-03-08 11:33 追风少年2021 阅读(420) 评论(0) 推荐(0)
摘要: 消息弹框通用类 public class MessageUtil { /// <summary> /// 显示一般的提示信息 /// </summary> /// <param name="message">提示信息</param> public static DialogResult ShowTi 阅读全文
posted @ 2019-11-18 10:25 追风少年2021 阅读(179) 评论(0) 推荐(0)
摘要: 1、首先下载NLog框架,在vs NuGet中搜索NLog,下载安装NLog.Config 2、配置NLog.Config文件,我的常用配置如下 <?xml version="1.0" encoding="utf-8" ?> <nlog xmlns="http://www.nlog-project. 阅读全文
posted @ 2019-11-16 09:36 追风少年2021 阅读(1240) 评论(0) 推荐(0)
摘要: 1 #!/usr/bin/env python 2 # coding: utf-8 3 ''' 4 Created on 2017-10-25 5 6 @author: 7 ''' 8 9 from ImageConvert import * 10 from MVSDK import * 11 import time 12 import numpy... 阅读全文
posted @ 2019-10-23 10:58 追风少年2021 阅读(4262) 评论(0) 推荐(2)
摘要: *为了让这两种语言写的东西对话,我花了整整两天,换了三种方法,最后终于找到了最好的方式,就是用xmlRpc。我必须要说如果有人像两天前的我一样急于让c#和Python对话,最好不要选择ironPython* Python 使用SimpleXMLRPCServer class RequestHandl 阅读全文
posted @ 2019-10-14 15:24 追风少年2021 阅读(553) 评论(0) 推荐(0)
摘要: 1 # -*- coding: utf-8 -*- 2 3 import os 4 import logging 5 from logging import handlers 6 7 8 class Logger(object): 9 level_relations = { 10 'debug': logging.DEBUG, 11 ... 阅读全文
posted @ 2019-09-25 16:17 追风少年2021 阅读(293) 评论(0) 推荐(0)
摘要: 1 class Camera // 大华相机类 2 { 3 private IDevice m_dev; /* 设备对象 */ 4 List<IGrabbedRawData> m_frameList = new List<IGrabbedRawData>(); /* 图像缓存列表 */ 5 Thre 阅读全文
posted @ 2019-09-24 19:06 追风少年2021 阅读(2062) 评论(0) 推荐(0)
摘要: using System; using System.Collections.Generic; using System.Drawing; using System.Linq; using System.Threading; using System.Windows.Forms; using ThridLibray; namespace _1_5相机SDK图像采集 { public c... 阅读全文
posted @ 2019-06-15 14:02 追风少年2021 阅读(2699) 评论(0) 推荐(2)