Horizon – Blame information for rev 12
?pathlinks?
Rev | Author | Line No. | Line |
---|---|---|---|
1 | office | 1 | using System; |
2 | using System.ComponentModel; |
||
3 | using System.Drawing; |
||
4 | using System.Globalization; |
||
5 | |||
6 | namespace Horizon.Snapshots |
||
7 | { |
||
8 | public class Snapshot |
||
9 | { |
||
10 | #region Private Delegates, Events, Enums, Properties, Indexers and Fields |
||
11 | |||
12 | private DateTime _time; |
||
13 | |||
14 | #endregion |
||
15 | |||
16 | #region Public Enums, Properties and Fields |
||
17 | |||
18 | [DefaultValue(typeof(Color), "Empty")] |
||
19 | public Color Color { get; set; } |
||
20 | |||
21 | public string Name { get; set; } |
||
22 | |||
23 | public string Path { get; set; } |
||
24 | |||
25 | public string Time |
||
26 | { |
||
27 | get => _time.ToString(CultureInfo.InvariantCulture); |
||
28 | set |
||
29 | { |
||
30 | if (DateTime.TryParse(value, out var dateTime)) |
||
31 | { |
||
32 | _time = dateTime; |
||
33 | } |
||
34 | } |
||
35 | } |
||
36 | |||
37 | public Bitmap Shot { get; set; } |
||
38 | |||
39 | public string Hash { get; set; } |
||
40 | |||
41 | #endregion |
||
42 | |||
43 | #region Constructors, Destructors and Finalizers |
||
44 | |||
45 | public Snapshot(string name, string path, string time, string hash) |
||
46 | { |
||
47 | Name = name; |
||
48 | Path = path; |
||
49 | Time = time; |
||
50 | Hash = hash; |
||
51 | } |
||
52 | |||
53 | public Snapshot(string name, string path, string time, string hash, Color color) : this(name, path, time, hash) |
||
54 | { |
||
55 | Color = color; |
||
56 | } |
||
57 | |||
58 | public Snapshot(string name, string path, string time, string hash, Bitmap shot) : this(name, path, time, hash) |
||
59 | { |
||
60 | Shot = shot; |
||
61 | } |
||
62 | |||
12 | office | 63 | protected Snapshot() |
64 | { |
||
65 | } |
||
66 | |||
1 | office | 67 | #endregion |
68 | } |
||
69 | } |