Winify – Diff between revs 55 and 59
?pathlinks?
Rev 55 | Rev 59 | |||
---|---|---|---|---|
1 | using System.ComponentModel; |
1 | using System.ComponentModel; |
|
2 | using System.Runtime.CompilerServices; |
2 | using System.Runtime.CompilerServices; |
|
3 | using System.Xml.Serialization; |
3 | using System.Xml.Serialization; |
|
4 | using Configuration.Annotations; |
4 | using Configuration.Annotations; |
|
5 | |
5 | |
|
6 | namespace Configuration |
6 | namespace Configuration |
|
7 | { |
7 | { |
|
8 | [XmlRoot(Namespace = "urn:winify-configuration-schema", ElementName = "Configuration")] |
8 | [XmlRoot(Namespace = "urn:winify-configuration-schema", ElementName = "Configuration")] |
|
9 | public class Configuration : INotifyPropertyChanged |
9 | public class Configuration : INotifyPropertyChanged |
|
10 | { |
10 | { |
|
11 | private bool _launchOnBoot; |
11 | private bool _launchOnBoot; |
|
12 | private bool _ignoreSelfSignedCertificates; |
12 | private bool _ignoreSelfSignedCertificates; |
|
13 | private Proxy _proxy = new Proxy(); |
13 | private Proxy _proxy = new Proxy(); |
|
14 | private int _toastDuration = 5000; |
14 | private int _toastDuration = 5000; |
|
15 | private bool _infiniteToastDuration; |
15 | private bool _infiniteToastDuration; |
|
- | 16 | private int _retrievePastNotificationHours; |
||
16 | |
17 | |
|
17 | public bool LaunchOnBoot |
18 | public bool LaunchOnBoot |
|
18 | { |
19 | { |
|
19 | get => _launchOnBoot; |
20 | get => _launchOnBoot; |
|
20 | set |
21 | set |
|
21 | { |
22 | { |
|
22 | if (value == _launchOnBoot) return; |
23 | if (value == _launchOnBoot) return; |
|
23 | _launchOnBoot = value; |
24 | _launchOnBoot = value; |
|
24 | OnPropertyChanged(); |
25 | OnPropertyChanged(); |
|
25 | } |
26 | } |
|
26 | } |
27 | } |
|
27 | |
28 | |
|
28 | public bool IgnoreSelfSignedCertificates |
29 | public bool IgnoreSelfSignedCertificates |
|
29 | { |
30 | { |
|
30 | get => _ignoreSelfSignedCertificates; |
31 | get => _ignoreSelfSignedCertificates; |
|
31 | set |
32 | set |
|
32 | { |
33 | { |
|
33 | if (value == _ignoreSelfSignedCertificates) return; |
34 | if (value == _ignoreSelfSignedCertificates) return; |
|
34 | _ignoreSelfSignedCertificates = value; |
35 | _ignoreSelfSignedCertificates = value; |
|
35 | OnPropertyChanged(); |
36 | OnPropertyChanged(); |
|
36 | } |
37 | } |
|
37 | } |
38 | } |
|
38 | |
39 | |
|
39 | public int ToastDuration |
40 | public int ToastDuration |
|
40 | { |
41 | { |
|
41 | get => _toastDuration; |
42 | get => _toastDuration; |
|
42 | set |
43 | set |
|
43 | { |
44 | { |
|
44 | if (value == _toastDuration) return; |
45 | if (value == _toastDuration) return; |
|
45 | _toastDuration = value; |
46 | _toastDuration = value; |
|
46 | OnPropertyChanged(); |
47 | OnPropertyChanged(); |
|
47 | } |
48 | } |
|
48 | } |
49 | } |
|
49 | |
50 | |
|
50 | public bool InfiniteToastDuration |
51 | public bool InfiniteToastDuration |
|
51 | { |
52 | { |
|
52 | get => _infiniteToastDuration; |
53 | get => _infiniteToastDuration; |
|
53 | set |
54 | set |
|
54 | { |
55 | { |
|
55 | if (value == _infiniteToastDuration) return; |
56 | if (value == _infiniteToastDuration) return; |
|
56 | _infiniteToastDuration = value; |
57 | _infiniteToastDuration = value; |
|
57 | OnPropertyChanged(); |
58 | OnPropertyChanged(); |
|
- | 59 | } |
||
- | 60 | } |
||
- | 61 | |
||
- | 62 | public int RetrievePastNotificationHours |
||
- | 63 | { |
||
- | 64 | get => _retrievePastNotificationHours; |
||
- | 65 | set |
||
- | 66 | { |
||
- | 67 | if (value == _retrievePastNotificationHours) return; |
||
- | 68 | _retrievePastNotificationHours = value; |
||
- | 69 | OnPropertyChanged(); |
||
58 | } |
70 | } |
|
59 | } |
71 | } |
|
60 | |
72 | |
|
61 | public Proxy Proxy |
73 | public Proxy Proxy |
|
62 | { |
74 | { |
|
63 | get => _proxy; |
75 | get => _proxy; |
|
64 | set |
76 | set |
|
65 | { |
77 | { |
|
66 | if (Equals(value, _proxy)) return; |
78 | if (Equals(value, _proxy)) return; |
|
67 | _proxy = value; |
79 | _proxy = value; |
|
68 | OnPropertyChanged(); |
80 | OnPropertyChanged(); |
|
69 | } |
81 | } |
|
70 | } |
82 | } |
|
71 | |
83 | |
|
72 | [UsedImplicitly] |
84 | [UsedImplicitly] |
|
73 | public Configuration() |
85 | public Configuration() |
|
74 | { |
86 | { |
|
75 | |
87 | |
|
76 | } |
88 | } |
|
77 | |
89 | |
|
78 | public event PropertyChangedEventHandler PropertyChanged; |
90 | public event PropertyChangedEventHandler PropertyChanged; |
|
79 | |
91 | |
|
80 | [NotifyPropertyChangedInvocator] |
92 | [NotifyPropertyChangedInvocator] |
|
81 | protected virtual void OnPropertyChanged([CallerMemberName] string propertyName = null) |
93 | protected virtual void OnPropertyChanged([CallerMemberName] string propertyName = null) |
|
82 | { |
94 | { |
|
83 | PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName)); |
95 | PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName)); |
|
84 | } |
96 | } |
|
85 | } |
97 | } |
|
86 | } |
98 | } |
|
87 | |
99 | |
|
88 |
|
100 |
|
|
89 | |
101 | |
|
90 | |
102 | |
|
91 | |
103 | |