HamBook – Blame information for rev 54
?pathlinks?
Rev | Author | Line No. | Line |
---|---|---|---|
54 | office | 1 | using System.ComponentModel; |
7 | office | 2 | using System.Runtime.CompilerServices; |
54 | office | 3 | using Configuration.Annotations; |
7 | office | 4 | |
5 | namespace Configuration |
||
6 | { |
||
7 | public class SerialPortTimeout : INotifyPropertyChanged |
||
8 | { |
||
9 | private int _read = 100; |
||
10 | private int _write = 100; |
||
11 | |||
54 | office | 12 | |
7 | office | 13 | public int Read |
14 | { |
||
15 | get => _read; |
||
16 | set |
||
17 | { |
||
54 | office | 18 | if (value == _read) return; |
7 | office | 19 | |
20 | _read = value; |
||
21 | OnPropertyChanged(); |
||
22 | } |
||
23 | } |
||
24 | |||
25 | public int Write |
||
26 | { |
||
27 | get => _write; |
||
28 | set |
||
29 | { |
||
54 | office | 30 | if (value == _write) return; |
7 | office | 31 | |
32 | _write = value; |
||
33 | OnPropertyChanged(); |
||
34 | } |
||
35 | } |
||
36 | |||
37 | public event PropertyChangedEventHandler PropertyChanged; |
||
38 | |||
39 | [NotifyPropertyChangedInvocator] |
||
40 | protected virtual void OnPropertyChanged([CallerMemberName] string propertyName = null) |
||
41 | { |
||
42 | PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName)); |
||
43 | } |
||
44 | } |
||
54 | office | 45 | } |