|
6 | 6 |
|
7 | 7 | namespace Files.App.Data.Models |
8 | 8 | { |
9 | | - public sealed partial class SignatureInfoItem : ObservableObject |
10 | | - { |
11 | | - private readonly string _fileName; |
12 | | - |
13 | | - private readonly IntPtr _hwndParent; |
14 | | - |
15 | | - private readonly int _index; |
16 | | - |
17 | | - private string _Version = string.Empty; |
18 | | - public string Version |
19 | | - { |
20 | | - get => _Version; |
21 | | - set => SetProperty(ref _Version, value); |
22 | | - } |
23 | | - |
24 | | - private string _IssuedBy = string.Empty; |
25 | | - public string IssuedBy |
26 | | - { |
27 | | - get => _IssuedBy; |
28 | | - set => SetProperty(ref _IssuedBy, value); |
29 | | - } |
30 | | - |
31 | | - private string _IssuedTo = string.Empty; |
32 | | - public string IssuedTo |
33 | | - { |
34 | | - get => _IssuedTo; |
35 | | - set => SetProperty(ref _IssuedTo, value); |
36 | | - } |
37 | | - |
38 | | - private string _ValidFromTimestamp = string.Empty; |
39 | | - public string ValidFromTimestamp |
40 | | - { |
41 | | - get => _ValidFromTimestamp; |
42 | | - set => SetProperty(ref _ValidFromTimestamp, value); |
43 | | - } |
44 | | - |
45 | | - private string _ValidToTimestamp = string.Empty; |
46 | | - public string ValidToTimestamp |
47 | | - { |
48 | | - get => _ValidToTimestamp; |
49 | | - set => SetProperty(ref _ValidToTimestamp, value); |
50 | | - } |
51 | | - |
52 | | - private string _VerifiedTimestamp = string.Empty; |
53 | | - public string VerifiedTimestamp |
54 | | - { |
55 | | - get => _VerifiedTimestamp; |
56 | | - set => SetProperty(ref _VerifiedTimestamp, value); |
57 | | - } |
58 | | - |
59 | | - private bool _Verified = false; |
60 | | - public bool Verified |
61 | | - { |
62 | | - get => _Verified; |
63 | | - set |
64 | | - { |
65 | | - if (SetProperty(ref _Verified, value)) |
66 | | - OnPropertyChanged(nameof(Glyph)); |
67 | | - } |
68 | | - } |
69 | | - |
70 | | - public List<CertNodeInfoItem> SignChain { get; } |
71 | | - |
72 | | - public string Glyph => Verified ? "\uE930" : "\uEA39"; |
73 | | - |
74 | | - public ICommand OpenDetailsCommand { get; } |
75 | | - |
76 | | - public SignatureInfoItem(string fileName, int index, IntPtr hWnd, List<CertNodeInfoItem> chain) |
77 | | - { |
78 | | - _fileName = fileName; |
79 | | - _hwndParent = hWnd; |
80 | | - _index = index; |
81 | | - SignChain = chain ?? new List<CertNodeInfoItem>(); |
82 | | - OpenDetailsCommand = new AsyncRelayCommand(DoOpenDetails); |
83 | | - } |
84 | | - |
85 | | - private Task DoOpenDetails() |
86 | | - { |
87 | | - DigitalSignaturesUtil.DisplaySignerInfoDialog(_fileName, _hwndParent, _index); |
88 | | - return Task.CompletedTask; |
89 | | - } |
90 | | - } |
| 9 | + public sealed partial class SignatureInfoItem : ObservableObject |
| 10 | + { |
| 11 | + private readonly string _fileName; |
| 12 | + |
| 13 | + private readonly IntPtr _hwndParent; |
| 14 | + |
| 15 | + private readonly int _index; |
| 16 | + |
| 17 | + private string _Version = string.Empty; |
| 18 | + public string Version |
| 19 | + { |
| 20 | + get => _Version; |
| 21 | + set => SetProperty(ref _Version, value); |
| 22 | + } |
| 23 | + |
| 24 | + private string _IssuedBy = string.Empty; |
| 25 | + public string IssuedBy |
| 26 | + { |
| 27 | + get => _IssuedBy; |
| 28 | + set => SetProperty(ref _IssuedBy, value); |
| 29 | + } |
| 30 | + |
| 31 | + private string _IssuedTo = string.Empty; |
| 32 | + public string IssuedTo |
| 33 | + { |
| 34 | + get => _IssuedTo; |
| 35 | + set => SetProperty(ref _IssuedTo, value); |
| 36 | + } |
| 37 | + |
| 38 | + private string _ValidFromTimestamp = string.Empty; |
| 39 | + public string ValidFromTimestamp |
| 40 | + { |
| 41 | + get => _ValidFromTimestamp; |
| 42 | + set => SetProperty(ref _ValidFromTimestamp, value); |
| 43 | + } |
| 44 | + |
| 45 | + private string _ValidToTimestamp = string.Empty; |
| 46 | + public string ValidToTimestamp |
| 47 | + { |
| 48 | + get => _ValidToTimestamp; |
| 49 | + set => SetProperty(ref _ValidToTimestamp, value); |
| 50 | + } |
| 51 | + |
| 52 | + private string _VerifiedTimestamp = string.Empty; |
| 53 | + public string VerifiedTimestamp |
| 54 | + { |
| 55 | + get => _VerifiedTimestamp; |
| 56 | + set => SetProperty(ref _VerifiedTimestamp, value); |
| 57 | + } |
| 58 | + |
| 59 | + private bool _Verified = false; |
| 60 | + public bool Verified |
| 61 | + { |
| 62 | + get => _Verified; |
| 63 | + set |
| 64 | + { |
| 65 | + if (SetProperty(ref _Verified, value)) |
| 66 | + OnPropertyChanged(nameof(Glyph)); |
| 67 | + } |
| 68 | + } |
| 69 | + |
| 70 | + public List<CertNodeInfoItem> SignChain { get; } |
| 71 | + |
| 72 | + public string Glyph => Verified ? "\uE930" : "\uEA39"; |
| 73 | + |
| 74 | + public ICommand OpenDetailsCommand { get; } |
| 75 | + |
| 76 | + public SignatureInfoItem(string fileName, int index, IntPtr hWnd, List<CertNodeInfoItem> chain) |
| 77 | + { |
| 78 | + _fileName = fileName; |
| 79 | + _hwndParent = hWnd; |
| 80 | + _index = index; |
| 81 | + SignChain = chain ?? new List<CertNodeInfoItem>(); |
| 82 | + OpenDetailsCommand = new AsyncRelayCommand(DoOpenDetails); |
| 83 | + } |
| 84 | + |
| 85 | + private Task DoOpenDetails() |
| 86 | + { |
| 87 | + DigitalSignaturesUtil.DisplaySignerInfoDialog(_fileName, _hwndParent, _index); |
| 88 | + return Task.CompletedTask; |
| 89 | + } |
| 90 | + } |
91 | 91 | } |
0 commit comments