Ejemplo n.º 1
0
        //yangwei add code 4 end
        /// <summary>
        /// /拦截双击标题栏、移动窗体的系统消息
        /// </summary>
        /// <param name="m"></param>
        //protected override void WndProc(ref Message m)
        //{
        //    //拦截双击标题栏、移动窗体的系统消息
        //    if (m.Msg != 0xA3 && m.Msg != 0x0003 && m.WParam != (IntPtr)0xF012)
        //    {
        //        base.WndProc(ref m);
        //    }
        //}
        /// <summary>
        /// 窗体加载
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void EcgGather_Frm_Load(object sender, EventArgs e)
        {
            SetStyle(ControlStyles.OptimizedDoubleBuffer | ControlStyles.ResizeRedraw |
                     ControlStyles.AllPaintingInWmPaint, true);

            _tecg.Elapsed  += StartClearEcg;
            _tecg.AutoReset = true; //每到指定时间Elapsed事件是触发一次(false),还是一直触发(true)
            _tecg.Enabled   = true;
            _tecg.Start();
            EzUsb.AddUSBEventWatcher(USBEventHandler, USBEventHandler, new TimeSpan(0, 0, 3));

            serialPortOption.CreateInstance().PaperSpeed = 25.0; //走速
            serialPortOption.CreateInstance().Amplitude  = 10.0; //增益

            CheckForIllegalCrossThreadCalls = false;
            //yangwei add code 3 start
            _rtPlayer = new RtWave();
            serialPortOption._instance._eventCallOnData += OnData;
            //yangwei add code 3 end
        }
Ejemplo n.º 2
0
 private void Form1_Load(object sender, EventArgs e)
 {
     ezUSB.AddUSBEventWatcher(USBEventHandler, USBEventHandler, new TimeSpan(0, 0, 3));
 }
Ejemplo n.º 3
0
 public void AddWatcher()
 {
     //是要在USB变动之前判断已经有多少个摄像头
     iCameraCount = VideoInputDevices.Length;
     ezUSB.AddUSBEventWatcher(USBEventHandler, USBEventHandler, new TimeSpan(0, 0, 2));
 }
        public void AddWatcher()
        {
            //是要在USB变动之前判断已经有多少个摄像头

            ezUSB.AddUSBEventWatcher(USBEventHandler, USBEventHandler, new TimeSpan(0, 0, 2));
        }