Horizon – Blame information for rev 14
?pathlinks?
Rev | Author | Line No. | Line |
---|---|---|---|
1 | office | 1 | using System.ComponentModel; |
2 | using System.IO; |
||
3 | using System.Runtime.CompilerServices; |
||
4 | using System.Xml.Serialization; |
||
5 | using Configuration.Annotations; |
||
6 | |||
7 | namespace Configuration |
||
8 | { |
||
9 | [XmlRoot(Namespace = "urn:horizon-configuration-schema", ElementName = "Configuration")] |
||
10 | public class Configuration : INotifyPropertyChanged |
||
11 | { |
||
12 | private bool _atomicOperations = true; |
||
13 | |||
14 | private bool _enabled; |
||
15 | |||
16 | private string _lastFolder = "C:\\Users"; |
||
17 | |||
18 | private bool _launchOnBoot; |
||
19 | |||
20 | private bool _showBalloonTooltips = true; |
||
21 | |||
22 | private bool _networkSharing = false; |
||
23 | |||
24 | private NotifyFilters _notifyFilters = NotifyFilters.LastWrite | NotifyFilters.Attributes; |
||
25 | |||
7 | office | 26 | private NotifyEvent _notifyEvents = NotifyEvent.Create; |
27 | |||
28 | private bool _enableGotify = false; |
||
29 | |||
30 | private string _gotifyURL = string.Empty; |
||
31 | |||
13 | office | 32 | private bool _autoNotes = true; |
33 | |||
14 | office | 34 | private CaptureMode _captureMode = CaptureMode.Window; |
35 | |||
1 | office | 36 | public NotifyFilters NotifyFilters |
37 | { |
||
38 | get => _notifyFilters; |
||
39 | set |
||
40 | { |
||
41 | if (value == _notifyFilters) |
||
42 | { |
||
43 | return; |
||
44 | } |
||
45 | |||
46 | _notifyFilters = value; |
||
47 | OnPropertyChanged(); |
||
48 | } |
||
49 | } |
||
50 | |||
7 | office | 51 | public NotifyEvent NotifyEvents |
52 | { |
||
53 | get => _notifyEvents; |
||
54 | set |
||
55 | { |
||
56 | if (value == _notifyEvents) |
||
57 | { |
||
58 | return; |
||
59 | } |
||
60 | |||
61 | _notifyEvents = value; |
||
62 | OnPropertyChanged(); |
||
63 | } |
||
64 | } |
||
65 | |||
66 | |||
1 | office | 67 | public bool NetworkSharing |
68 | { |
||
69 | get => _networkSharing; |
||
70 | set |
||
71 | { |
||
72 | if (value == _networkSharing) |
||
73 | { |
||
74 | return; |
||
75 | } |
||
76 | |||
77 | _networkSharing = value; |
||
78 | OnPropertyChanged(); |
||
79 | } |
||
80 | } |
||
81 | |||
82 | public bool ShowBalloonTooltips |
||
83 | { |
||
84 | get => _showBalloonTooltips; |
||
85 | set |
||
86 | { |
||
87 | if (value == _showBalloonTooltips) |
||
88 | { |
||
89 | return; |
||
90 | } |
||
91 | |||
92 | _showBalloonTooltips = value; |
||
93 | OnPropertyChanged(); |
||
94 | } |
||
95 | } |
||
96 | |||
97 | public bool Enabled |
||
98 | { |
||
99 | get => _enabled; |
||
100 | set |
||
101 | { |
||
102 | if (value == _enabled) |
||
103 | { |
||
104 | return; |
||
105 | } |
||
106 | |||
107 | _enabled = value; |
||
108 | OnPropertyChanged(); |
||
109 | } |
||
110 | } |
||
111 | |||
112 | public bool LaunchOnBoot |
||
113 | { |
||
114 | get => _launchOnBoot; |
||
115 | set |
||
116 | { |
||
117 | if (value == _launchOnBoot) |
||
118 | { |
||
119 | return; |
||
120 | } |
||
121 | |||
122 | _launchOnBoot = value; |
||
123 | OnPropertyChanged(); |
||
124 | } |
||
125 | } |
||
126 | |||
127 | public string LastFolder |
||
128 | { |
||
129 | get => _lastFolder; |
||
130 | set |
||
131 | { |
||
132 | if (value == _lastFolder) |
||
133 | { |
||
134 | return; |
||
135 | } |
||
136 | |||
137 | _lastFolder = value; |
||
138 | OnPropertyChanged(); |
||
139 | } |
||
140 | } |
||
141 | |||
142 | public bool AtomicOperations |
||
143 | { |
||
144 | get => _atomicOperations; |
||
145 | set |
||
146 | { |
||
147 | if (value == _atomicOperations) |
||
148 | { |
||
149 | return; |
||
150 | } |
||
151 | |||
152 | _atomicOperations = value; |
||
153 | OnPropertyChanged(); |
||
154 | } |
||
155 | } |
||
156 | |||
7 | office | 157 | public bool EnableGotify |
158 | { |
||
159 | get => _enableGotify; |
||
160 | set |
||
161 | { |
||
162 | if (value == _enableGotify) |
||
163 | { |
||
164 | return; |
||
165 | } |
||
166 | |||
167 | _enableGotify = value; |
||
168 | OnPropertyChanged(); |
||
169 | } |
||
170 | } |
||
171 | |||
13 | office | 172 | public bool AutoNotes |
173 | { |
||
174 | get => _autoNotes; |
||
175 | set |
||
176 | { |
||
177 | if (value == _autoNotes) |
||
178 | { |
||
179 | return; |
||
180 | } |
||
181 | |||
182 | _autoNotes = value; |
||
183 | OnPropertyChanged(); |
||
184 | } |
||
185 | } |
||
186 | |||
7 | office | 187 | public string GotifyURL |
188 | { |
||
189 | get => _gotifyURL; |
||
190 | set |
||
191 | { |
||
192 | if (value == _gotifyURL) |
||
193 | { |
||
194 | return; |
||
195 | } |
||
196 | |||
197 | _gotifyURL = value; |
||
198 | OnPropertyChanged(); |
||
199 | } |
||
200 | } |
||
201 | |||
14 | office | 202 | public CaptureMode CaptureMode |
203 | { |
||
204 | get => _captureMode; |
||
205 | set |
||
206 | { |
||
207 | if (value == _captureMode) |
||
208 | { |
||
209 | return; |
||
210 | } |
||
1 | office | 211 | |
14 | office | 212 | _captureMode = value; |
213 | OnPropertyChanged(); |
||
214 | } |
||
215 | } |
||
216 | |||
1 | office | 217 | public event PropertyChangedEventHandler PropertyChanged; |
218 | |||
219 | [NotifyPropertyChangedInvocator] |
||
220 | protected virtual void OnPropertyChanged([CallerMemberName] string propertyName = null) |
||
221 | { |
||
222 | PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName)); |
||
223 | } |
||
224 | } |
||
225 | } |