Ejemplo n.º 1
0
        public void vsListView_Update(object sender, VsMotionEventArgs e)
        {
            VsMotion vsMotion = (VsMotion)e.Motion.Clone();
            
            String [] strItem = {vsMotion.DateStart.ToString(), vsMotion.CameraName, vsMotion.EventName};

            ListViewItem item = new ListViewItem(strItem);
            this.listView1.Items.Add(item);
            item.Selected = true;
            item.EnsureVisible();
        }
Ejemplo n.º 2
0
        // On new frame ready
        //[MethodImpl(MethodImplOptions.Synchronized)]
        public void FrameIn(object sender, VsMotionEventArgs e)
        {
            try
            {
                /*
                if (eventBuffer.Count > 1000 / syncTimer)
                {
                    VsMotion rm = (VsMotion)eventBuffer.Dequeue();
                    rm.Dispose(); rm = null;
                    logger.Log(LogLevel.Warn, DateTime.Now.ToString() + "; frame removed from EventAlert");
                }*/

                VsMotion img = (VsMotion)e.Motion.Clone();
                eventBuffer.Enqueue(img);
            }
            catch (Exception err)
            {
                logger.Log(LogLevel.Error, err.Message + " " + err.Source + " " + err.StackTrace);
            }
        }
Ejemplo n.º 3
0
 // New frame
 public void FrameIn(object sender, VsMotionEventArgs e)
 {
     this.listView1.Invoke(new VsMotionEventHandler(vsListView_Update), sender, e);
 }