public virtual int PlayAlarmRecord(string alarmID, IntPtr hWnd) { if (hWnd != IntPtr.Zero) { if (alarmID == null || alarmID.Equals("")) { alarmID = this.PriorAlarmID; if (alarmID == null || alarmID.Equals("")) { return(-1); } } string[] files = null; string path = mRecordRootPath + "\\" + SystemContext.Name + "\\" + Name + "\\" + alarmID; if (System.IO.Directory.Exists(path)) { files = Directory.GetFiles(path, "*.dat"); } if (files != null && files.Length > 0) { IVideoSource vs = GetVideoSource(); if (vs != null) { return(vs.RecordPlay(path, hWnd)); } } else if (SystemContext.RemoteManageClient != null) { if (SystemContext.MonitorSystem.IsLocal) { if (!mConfig.Host.Equals("")) { mHWndPlayAlarmRecord = hWnd; SystemContext.RemoteManageClient.PlayVisionAlarmRecord(mConfig, alarmID, hWnd); return(mHWndPlayAlarmRecord.ToInt32()); } } else { mHWndPlayAlarmRecord = hWnd; SystemContext.RemoteManageClient.PlayVisionAlarmRecord(mConfig, alarmID, hWnd); return(mHWndPlayAlarmRecord.ToInt32()); } } } return(-1); }