MFileCopy.cs
1.51 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
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));
}
}
}
}