using OS.Spin.Common; using System; namespace OS.Spin.Modle.BusinessLayer { public class MFileCopy { private int _copyType = 0; // 向上,向下多缓存的张数 private const int MaxSaveCount = 5; public int CopyType { get { return _copyType; } } private string _fileName = string.Empty; public string FileName { get { return _fileName; } } public int _cameraCount = 0; public int CameraCount { get { return _cameraCount; } } private int _minId = 0; public int MinId { get { return _minId; } } private int _maxId = 0; public int MaxId { get { return _maxId; } } public MFileCopy(int copyType, int imgId, int cameraCount) { try { //_fileName = Guid.NewGuid().ToString().Trim('-'); _fileName = DateTime.Now.ToString("yyyyMMddHHmmss"); var max = 0; _copyType = copyType; _cameraCount = cameraCount; if (1 == copyType) { max = MaxSaveCount; } _minId = Math.Max(imgId - max, 0); _maxId = imgId; } catch (Exception ex) { LogisTrac.WriteLog(string.Format("MFileCopy:{0}", ex.Message)); } } } }