Exemplo n.º 1
0
        // Compares objects of the type
        public int CompareTo(object obj)
        {
            if (obj == null)
            {
                return(1);
            }

            VsMotion p = (VsMotion)obj;

            return(this.m_ip_camera.CompareTo(p.m_ip_camera));
        }
Exemplo n.º 2
0
        // methodes
        public VsMotion Clone()
        {
            VsMotion motion = null;

            try
            {
                motion = new VsMotion(m_ip_camera, m_ip_processor, m_date_start, m_event);
            }
            catch (Exception err)
            {
                logger.Log(LogLevel.Error, err.Message + " " + err.Source + " " + err.StackTrace);
            }

            return(motion);
        }
Exemplo n.º 3
0
        // methodes
        public VsMotion Clone()
        {
            VsMotion motion = null;
            try
            {
                motion = new VsMotion(m_ip_camera, m_ip_processor, m_date_start, m_event);
            }
            catch (Exception err)
            {
                logger.Log(LogLevel.Error, err.Message + " " + err.Source + " " + err.StackTrace);
            }

            return motion;
        }
Exemplo n.º 4
0
 // Constructor
 public VsMotionEventArgs(VsMotion motion)
 {
     vsMotion = motion;
 }
Exemplo n.º 5
0
 // Constructor
 public VsMotionEventArgs(VsMotion motion)
 {
     vsMotion = motion;
 }
Exemplo n.º 6
0
        public virtual void EventAlert()
        {
            try
            {
                if (MotionOut != null)
                {
                    VsMotion vsMotion = new VsMotion(CameraName, LocalHost, DateTime.Now, analyserName);
                    MotionOut(this, new VsMotionEventArgs(vsMotion));
                    vsMotion.Dispose(); vsMotion = null;

                    logger.Log(LogLevel.Info, "Camera: " + CameraName + ", Host: " + LocalHost + ", Analyzer: " + analyserName);
                }
            }
            catch (Exception err)
            {
                logger.Log(LogLevel.Error, err.Message + " " + err.Source + " " + err.StackTrace);;
            }
        }