Ejemplo n.º 1
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);
            }
        }
Ejemplo n.º 2
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);
            }
        }