Пример #1
0
        // methodes
        public VsData Clone()
        {
            VsData data = null;

            try
            {
                data = new VsData(m_ip_camera,
                                  m_ip_camera_lati,
                                  m_ip_camera_long,
                                  m_ip_processor,
                                  m_file_name,
                                  m_file_size,
                                  m_file_location,
                                  m_algo_name,
                                  m_enc_name,
                                  m_enc_codecs,
                                  m_date_start,
                                  m_date_end,
                                  m_detail,
                                  m_image);
            }
            catch (Exception err)
            {
                logger.Log(LogLevel.Error, err.Message + " " + err.Source + " " + err.StackTrace);
            }

            return(data);
        }
Пример #2
0
        // Compares objects of the type
        public int CompareTo(object obj)
        {
            if (obj == null)
            {
                return(1);
            }

            VsData p = (VsData)obj;

            return(this.m_ip_camera.CompareTo(p.m_ip_camera));
        }
Пример #3
0
 // Constructor
 public VsDataEventArgs(VsData dt)
 {
     vsdata = dt;
 }
Пример #4
0
 // Constructor
 public VsDataEventArgs(VsData dt)
 {
     vsdata = dt;
 }
Пример #5
0
        [MethodImpl(MethodImplOptions.Synchronized)] // lock/unlock all thread from current instance object
        public virtual void EmailAlert(Bitmap captureImage)
        {
            try
            {
                if (EventOut != null)
                {
                    dateEnd = DateTime.Now;
                    String camLat = "x";
                    String camLong = "y";

                    VsData vsData = new VsData(CameraName,
                        camLat, camLong,
                        pcHost, "", 0, "", "", "", "",
                        dateEnd, dateEnd, "",
                        captureImage);

                    EventOut(this, new VsDataEventArgs(vsData));
                    vsData.Dispose(); vsData = null;

                    thumbCount = 0;
                    thumbSave = false;
                }
            }
            catch (Exception err)
            {
                logger.Log(LogLevel.Error, err.Message + " " + err.Source + " " + err.StackTrace);
            }
        }
Пример #6
0
        [MethodImpl(MethodImplOptions.Synchronized)] // lock/unlock all thread from current instance object
        public virtual void DataAlert()
        {
            try
            {
                if (DataOut != null)
                {
                    dateEnd = DateTime.Now;
                    String camLat = "x";
                    String camLong = "y";

                    VsData vsData = new VsData(CameraName, 
                        camLat, camLong, 
                        pcHost, aviName, 
                        0, 
                        dirName, "Motion detector", 
                        "Windows Media Encoder", "Windows Audio and Video Codecs 7.0", 
                        dateBegin, dateEnd, recDetail, 
                        thumbImage);

                    DataOut(this, new VsDataEventArgs(vsData));
                    vsData.Dispose(); vsData = null;
                }
            }
            catch (Exception err)
            {
                logger.Log(LogLevel.Error, err.Message + " " + err.Source + " " + err.StackTrace);
            }
        }
Пример #7
0
        // methodes
        public VsData Clone()
        {
            VsData data = null;
            try
            {
                data = new VsData(m_ip_camera, 
                    m_ip_camera_lati,
                    m_ip_camera_long,
                    m_ip_processor, 
                    m_file_name, 
                    m_file_size, 
                    m_file_location, 
                    m_algo_name,
                    m_enc_name, 
                    m_enc_codecs, 
                    m_date_start, 
                    m_date_end, 
                    m_detail, 
                    m_image);
            }
            catch (Exception err)
            {
                logger.Log(LogLevel.Error, err.Message + " " + err.Source + " " + err.StackTrace);
            }

            return data;
        }