// 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); }
// 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)); }
// Constructor public VsDataEventArgs(VsData dt) { vsdata = dt; }
[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); } }
[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); } }
// 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; }