HamBook – Diff between revs 21 and 54

Subversion Repositories:
Rev:
Show entire fileIgnore whitespace
Rev 21 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.Linq; -  
6 using System.Runtime.CompilerServices; 2 using System.Runtime.CompilerServices;
7 using System.Text; -  
8 using System.Threading.Tasks; 3 using Configuration.Annotations;
9 using System.Xml.Linq; -  
Line 10... Line 4...
10   4  
11 namespace Configuration 5 namespace Configuration
12 { 6 {
13 public class Band : INotifyPropertyChanged 7 public class Band : INotifyPropertyChanged
14 { 8 {
15 private decimal _min = 0; 9 private decimal _max;
16 private decimal _max = 0; 10 private int _meters;
Line 17... Line 11...
17 private int _meters = 0; 11 private decimal _min;
18   12  
19 public int Meters 13 public int Meters
20 { 14 {
21 get => _meters; 15 get => _meters;
22 set 16 set
23 { -  
24 if (value == _meters) -  
25 { -  
Line 26... Line 17...
26 return; 17 {
27 } 18 if (value == _meters) return;
28   19  
29 _meters = value; 20 _meters = value;
Line 34... Line 25...
34 public decimal Min 25 public decimal Min
35 { 26 {
36 get => _min; 27 get => _min;
37 set 28 set
38 { 29 {
39 if (value == _min) 30 if (value == _min) return;
40 { -  
41 return; -  
42 } -  
Line 43... Line 31...
43   31  
44 _min = value; 32 _min = value;
45 OnPropertyChanged(); 33 OnPropertyChanged();
46 } 34 }
Line 49... Line 37...
49 public decimal Max 37 public decimal Max
50 { 38 {
51 get => _max; 39 get => _max;
52 set 40 set
53 { 41 {
54 if (value == _max) 42 if (value == _max) return;
55 { -  
56 return; -  
57 } -  
Line 58... Line 43...
58   43  
59 _max = value; 44 _max = value;
60 OnPropertyChanged(); 45 OnPropertyChanged();
61 } 46 }
Line 62... Line 47...
62 } 47 }
Line 63... Line -...
63   -  
64 public event PropertyChangedEventHandler PropertyChanged; -  
65   -  
66 public Band() -  
67 { 48  
68 } 49 public event PropertyChangedEventHandler PropertyChanged;
69   50  
70 [NotifyPropertyChangedInvocator] 51 [NotifyPropertyChangedInvocator]
71 protected virtual void OnPropertyChanged([CallerMemberName] string propertyName = null) 52 protected virtual void OnPropertyChanged([CallerMemberName] string propertyName = null)
72 { 53 {
73 PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName)); 54 PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
74 } 55 }