HamBook – Diff between revs 12 and 54

Subversion Repositories:
Rev:
Show entire fileIgnore whitespace
Rev 12 Rev 54
Line 1... Line -...
1 using Configuration.Annotations; -  
2 using System; -  
3 using System.Collections.Generic; -  
4 using System.ComponentModel; 1 using System.ComponentModel;
5 using System.Data; -  
6 using System.Linq; -  
7 using System.Runtime.CompilerServices; 2 using System.Runtime.CompilerServices;
8 using System.Runtime.InteropServices; 3 using Configuration.Annotations;
9 using System.Text; -  
10 using System.Threading.Tasks; -  
11 using System.Xml.Linq; -  
Line 12... Line 4...
12   4  
13 namespace Configuration 5 namespace Configuration
14 { 6 {
15 public class NotificationState : INotifyPropertyChanged 7 public class NotificationState : INotifyPropertyChanged
-   8 {
16 { 9 private bool _enabled;
17 private int _lingerTime = 5000; -  
18 private bool _enabled = false; 10 private int _lingerTime = 5000;
Line 19... Line 11...
19 private NotificationType _type = NotificationType.None; 11 private NotificationType _type = NotificationType.None;
20   12  
21 public int LingerTime 13 public int LingerTime
22 { 14 {
23 get => _lingerTime; 15 get => _lingerTime;
24 set 16 set
25 { -  
26 if (value == _lingerTime) -  
27 { -  
Line 28... Line 17...
28 return; 17 {
29 } 18 if (value == _lingerTime) return;
30   19  
31 _lingerTime = value; 20 _lingerTime = value;
Line 36... Line 25...
36 public bool Enabled 25 public bool Enabled
37 { 26 {
38 get => _enabled; 27 get => _enabled;
39 set 28 set
40 { 29 {
41 if (value == _enabled) 30 if (value == _enabled) return;
42 { -  
43 return; -  
44 } -  
Line 45... Line 31...
45   31  
46 _enabled = value; 32 _enabled = value;
47 OnPropertyChanged(); 33 OnPropertyChanged();
48 } 34 }
Line 51... Line 37...
51 public NotificationType Type 37 public NotificationType Type
52 { 38 {
53 get => _type; 39 get => _type;
54 set 40 set
55 { 41 {
56 if (value == _type) 42 if (value == _type) return;
57 { -  
58 return; -  
59 } -  
Line 60... Line 43...
60   43  
61 _type = value; 44 _type = value;
62 OnPropertyChanged(); 45 OnPropertyChanged();
63 } 46 }
Line 64... Line -...
64 } -  
65   -  
66 public NotificationState() -  
67 { -  
68   -  
69 } 47 }
Line 70... Line 48...
70   48  
71 public event PropertyChangedEventHandler PropertyChanged; 49 public event PropertyChangedEventHandler PropertyChanged;
72   50  
73 [NotifyPropertyChangedInvocator] 51 [NotifyPropertyChangedInvocator]
74 protected virtual void OnPropertyChanged([CallerMemberName] string propertyName = null) 52 protected virtual void OnPropertyChanged([CallerMemberName] string propertyName = null)
75 { 53 {
76 PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName)); -  
77 } -  
78 } 54 PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
79   55 }