Esempio 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));
        }
Esempio 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);
        }
Esempio 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;
        }
Esempio n. 4
0
 // Constructor
 public VsMotionEventArgs(VsMotion motion)
 {
     vsMotion = motion;
 }
Esempio n. 5
0
 // Constructor
 public VsMotionEventArgs(VsMotion motion)
 {
     vsMotion = motion;
 }
Esempio 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);;
            }
        }