Esempio n. 1
0
 public bool ResumePlayAlarmRecord()
 {
     lock (mLockObj)
     {
         if (mPlayAlarmRecordHandle >= 0 && VisionMonitor != null)
         {
             return VisionMonitor.ResumePlayAlamRecord(mPlayAlarmRecordHandle);
         }
     }
     return false;
 }
Esempio n. 2
0
        public bool StopAlarmRecord()
        {
            lock (mLockObj)
            {
                if (VisionMonitor != null)
                {
                    if (mStartAlarmRecordHandle >= 0)
                    {
                        return VisionMonitor.StopAlamRecord(mStartAlarmRecordHandle);
                    }

                    if (SystemContext.RemoteManageClient != null)
                    {
                        SystemContext.RemoteManageClient.StopAlarmRecord(VisionMonitor.Config, this.ID);
                    }
                }
            }
            return false;
        }
Esempio n. 3
0
 public bool StartAlarmRecord()
 {
     lock (mLockObj)
     {
         if (mStartAlarmRecordHandle < 0 && VisionMonitor != null)
         {
             mStartAlarmRecordHandle = VisionMonitor.StartAlarmRecord(ID);
             if (mStartAlarmRecordHandle >= 0)
             {
                 mDoRecordStateChanged.BeginInvoke(ID, RecordState.StartRecord, null, null);
                 if (SystemContext.RemoteManageServer != null)
                 {
                     SystemContext.RemoteManageServer.Send(SystemContext.Name + "<SystemContext>" + Sender + "<Monitor><StartAlarmRecord>" + mStartAlarmRecordHandle + "</StartAlarmRecord>");
                 }
                 return true;
             }
         }
     }
     return false;
 }
Esempio n. 4
0
 public bool PlayAlarmRecord(IntPtr hWnd)
 {
     lock (mLockObj)
     {
         if (hWnd != IntPtr.Zero && mStartAlarmRecordHandle < 0 && mPlayAlarmRecordHandle < 0)
         {
             if (VisionMonitor != null)
             {
                 mHWndPlayAlarmRecord = hWnd;
                 mPlayAlarmRecordHandle = VisionMonitor.PlayAlarmRecord(ID, hWnd);
                 if (mPlayAlarmRecordHandle >= 0)
                 {
                     mDoRecordStateChanged.BeginInvoke(ID, RecordState.StartPlay, null, null);
                     return true;
                 }
             }
         }
     }
     return false;
 }