public virtual int StartAlarmRecord(string alarmID) { IVideoSource vs = GetVideoSource(); if (vs != null && vs.Config.IsRecord) { if (alarmID == null || alarmID.Equals("")) { alarmID = this.PriorAlarmID; if (alarmID == null || alarmID.Equals("")) { return(-1); } } string path = mRecordRootPath + "\\" + SystemContext.Name + "\\" + Name + "\\" + alarmID; if (!System.IO.Directory.Exists(path)) { System.IO.Directory.CreateDirectory(path); } if (System.IO.Directory.Exists(path)) { return(vs.Record(path)); } } return(-1); }