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