Winify – Diff between revs 44 and 50
?pathlinks?
Rev 44 | Rev 50 | |||
---|---|---|---|---|
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 | |
14 | |
|
14 | public bool LaunchOnBoot |
15 | public bool LaunchOnBoot |
|
15 | { |
16 | { |
|
16 | get => _launchOnBoot; |
17 | get => _launchOnBoot; |
|
17 | set |
18 | set |
|
18 | { |
19 | { |
|
19 | if (value == _launchOnBoot) return; |
20 | if (value == _launchOnBoot) return; |
|
20 | _launchOnBoot = value; |
21 | _launchOnBoot = value; |
|
21 | OnPropertyChanged(); |
22 | OnPropertyChanged(); |
|
22 | } |
23 | } |
|
23 | } |
24 | } |
|
24 | |
25 | |
|
25 | public bool IgnoreSelfSignedCertificates |
26 | public bool IgnoreSelfSignedCertificates |
|
26 | { |
27 | { |
|
27 | get => _ignoreSelfSignedCertificates; |
28 | get => _ignoreSelfSignedCertificates; |
|
28 | set |
29 | set |
|
29 | { |
30 | { |
|
30 | if (value == _ignoreSelfSignedCertificates) return; |
31 | if (value == _ignoreSelfSignedCertificates) return; |
|
31 | _ignoreSelfSignedCertificates = value; |
32 | _ignoreSelfSignedCertificates = value; |
|
32 | OnPropertyChanged(); |
33 | OnPropertyChanged(); |
|
33 | } |
34 | } |
|
34 | } |
35 | } |
|
- | 36 | |
||
- | 37 | public Proxy Proxy |
||
- | 38 | { |
||
- | 39 | get => _proxy; |
||
- | 40 | set |
||
- | 41 | { |
||
- | 42 | if (Equals(value, _proxy)) return; |
||
- | 43 | _proxy = value; |
||
- | 44 | OnPropertyChanged(); |
||
- | 45 | } |
||
- | 46 | } |
||
- | 47 | |
||
- | 48 | [UsedImplicitly] |
||
- | 49 | public Configuration() |
||
- | 50 | { |
||
- | 51 | |
||
- | 52 | } |
||
35 | |
53 | |
|
36 | public event PropertyChangedEventHandler PropertyChanged; |
54 | public event PropertyChangedEventHandler PropertyChanged; |
|
37 | |
55 | |
|
38 | [NotifyPropertyChangedInvocator] |
56 | [NotifyPropertyChangedInvocator] |
|
39 | protected virtual void OnPropertyChanged([CallerMemberName] string propertyName = null) |
57 | protected virtual void OnPropertyChanged([CallerMemberName] string propertyName = null) |
|
40 | { |
58 | { |
|
41 | PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName)); |
59 | PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName)); |
|
42 | } |
60 | } |
|
43 | } |
61 | } |
|
44 | } |
62 | } |
|
45 | |
63 | |
|
46 |
|
64 |
|
|
47 | |
65 | |
|
48 | |
66 | |
|
49 | |
67 | |