Horizon – Diff between revs 1 and 12
?pathlinks?
Rev 1 | Rev 12 | |||
---|---|---|---|---|
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:horizon-configuration-schema", ElementName = "Configuration")] |
8 | [XmlRoot(Namespace = "urn:horizon-configuration-schema", ElementName = "Configuration")] |
|
9 | public class Configuration : INotifyPropertyChanged |
9 | public class Configuration : INotifyPropertyChanged |
|
10 | { |
10 | { |
|
11 | private bool _atomicOperations = true; |
11 | private bool _atomicOperations = true; |
|
12 | |
12 | |
|
13 | private bool _enabled; |
13 | private bool _enabled; |
|
14 | |
14 | |
|
15 | private string _lastFolder = "C:\\Users"; |
15 | private string _lastFolder = "C:\\Users"; |
|
16 | |
16 | |
|
17 | private bool _launchOnBoot; |
17 | private bool _launchOnBoot; |
|
18 | |
18 | |
|
19 | private bool _showBalloonTooltips = true; |
19 | private bool _showBalloonTooltips = true; |
|
- | 20 | |
||
- | 21 | private bool _networkSharing = false; |
||
- | 22 | |
||
- | 23 | public bool NetworkSharing |
||
- | 24 | { |
||
- | 25 | get => _networkSharing; |
||
- | 26 | set |
||
- | 27 | { |
||
- | 28 | if (value == _networkSharing) |
||
- | 29 | { |
||
- | 30 | return; |
||
- | 31 | } |
||
- | 32 | |
||
- | 33 | _networkSharing = value; |
||
- | 34 | OnPropertyChanged(); |
||
- | 35 | } |
||
- | 36 | } |
||
20 | |
37 | |
|
21 | public bool ShowBalloonTooltips |
38 | public bool ShowBalloonTooltips |
|
22 | { |
39 | { |
|
23 | get => _showBalloonTooltips; |
40 | get => _showBalloonTooltips; |
|
24 | set |
41 | set |
|
25 | { |
42 | { |
|
26 | if (value == _showBalloonTooltips) |
43 | if (value == _showBalloonTooltips) |
|
27 | { |
44 | { |
|
28 | return; |
45 | return; |
|
29 | } |
46 | } |
|
30 | |
47 | |
|
31 | _showBalloonTooltips = value; |
48 | _showBalloonTooltips = value; |
|
32 | OnPropertyChanged(); |
49 | OnPropertyChanged(); |
|
33 | } |
50 | } |
|
34 | } |
51 | } |
|
35 | |
52 | |
|
36 | public bool Enabled |
53 | public bool Enabled |
|
37 | { |
54 | { |
|
38 | get => _enabled; |
55 | get => _enabled; |
|
39 | set |
56 | set |
|
40 | { |
57 | { |
|
41 | if (value == _enabled) |
58 | if (value == _enabled) |
|
42 | { |
59 | { |
|
43 | return; |
60 | return; |
|
44 | } |
61 | } |
|
45 | |
62 | |
|
46 | _enabled = value; |
63 | _enabled = value; |
|
47 | OnPropertyChanged(); |
64 | OnPropertyChanged(); |
|
48 | } |
65 | } |
|
49 | } |
66 | } |
|
50 | |
67 | |
|
51 | public bool LaunchOnBoot |
68 | public bool LaunchOnBoot |
|
52 | { |
69 | { |
|
53 | get => _launchOnBoot; |
70 | get => _launchOnBoot; |
|
54 | set |
71 | set |
|
55 | { |
72 | { |
|
56 | if (value == _launchOnBoot) |
73 | if (value == _launchOnBoot) |
|
57 | { |
74 | { |
|
58 | return; |
75 | return; |
|
59 | } |
76 | } |
|
60 | |
77 | |
|
61 | _launchOnBoot = value; |
78 | _launchOnBoot = value; |
|
62 | OnPropertyChanged(); |
79 | OnPropertyChanged(); |
|
63 | } |
80 | } |
|
64 | } |
81 | } |
|
65 | |
82 | |
|
66 | public string LastFolder |
83 | public string LastFolder |
|
67 | { |
84 | { |
|
68 | get => _lastFolder; |
85 | get => _lastFolder; |
|
69 | set |
86 | set |
|
70 | { |
87 | { |
|
71 | if (value == _lastFolder) |
88 | if (value == _lastFolder) |
|
72 | { |
89 | { |
|
73 | return; |
90 | return; |
|
74 | } |
91 | } |
|
75 | |
92 | |
|
76 | _lastFolder = value; |
93 | _lastFolder = value; |
|
77 | OnPropertyChanged(); |
94 | OnPropertyChanged(); |
|
78 | } |
95 | } |
|
79 | } |
96 | } |
|
80 | |
97 | |
|
81 | public bool AtomicOperations |
98 | public bool AtomicOperations |
|
82 | { |
99 | { |
|
83 | get => _atomicOperations; |
100 | get => _atomicOperations; |
|
84 | set |
101 | set |
|
85 | { |
102 | { |
|
86 | if (value == _atomicOperations) |
103 | if (value == _atomicOperations) |
|
87 | { |
104 | { |
|
88 | return; |
105 | return; |
|
89 | } |
106 | } |
|
90 | |
107 | |
|
91 | _atomicOperations = value; |
108 | _atomicOperations = value; |
|
92 | OnPropertyChanged(); |
109 | OnPropertyChanged(); |
|
93 | } |
110 | } |
|
94 | } |
111 | } |
|
95 | |
112 | |
|
96 | public CaptureMode CaptureMode { get; set; } = CaptureMode.Window; |
113 | public CaptureMode CaptureMode { get; set; } = CaptureMode.Window; |
|
97 | |
114 | |
|
98 | public event PropertyChangedEventHandler PropertyChanged; |
115 | public event PropertyChangedEventHandler PropertyChanged; |
|
99 | |
116 | |
|
100 | [NotifyPropertyChangedInvocator] |
117 | [NotifyPropertyChangedInvocator] |
|
101 | protected virtual void OnPropertyChanged([CallerMemberName] string propertyName = null) |
118 | protected virtual void OnPropertyChanged([CallerMemberName] string propertyName = null) |
|
102 | { |
119 | { |
|
103 | PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName)); |
120 | PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName)); |
|
104 | } |
121 | } |
|
105 | } |
122 | } |
|
106 | } |
123 | } |
|
107 | |
124 | |
|
108 |
|
125 |
|
|
109 | |
126 | |
|
110 | |
127 | |
|
111 | |
128 | |