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