HamBook – Blame information for rev 55

Subversion Repositories:
Rev:
Rev Author Line No. Line
54 office 1 using System.ComponentModel;
1 office 2 using System.Runtime.CompilerServices;
3 using System.Xml.Serialization;
54 office 4 using Configuration.Annotations;
5 using RJCP.IO.Ports;
1 office 6  
7 namespace Configuration
8 {
9 [XmlRoot(Namespace = "urn:hambook-configuration-schema", ElementName = "Configuration")]
10 public class Configuration : INotifyPropertyChanged
11 {
54 office 12 private Audio _audio = new Audio();
1 office 13 private int _dataBits = 8;
5 office 14 private Definitions _definitions = new Definitions();
54 office 15 private Handshake _handshake = Handshake.None;
16 private bool _launchOnBoot;
17 private Navigation _navigation = new Navigation();
18 private Notifications _notifications = new Notifications();
19 private Parity _parity = Parity.None;
20 private string _port = "COM1";
21 private string _radio = "Yaesu FT-891";
7 office 22 private SerialPortTimeout _serialPortTimeout = new SerialPortTimeout();
54 office 23 private int _speed = 38400;
24 private StopBits _stopBits = StopBits.One;
55 office 25 private Visualizations _visualizations = new Visualizations();
1 office 26  
27 public bool LaunchOnBoot
28 {
29 get => _launchOnBoot;
30 set
31 {
54 office 32 if (value == _launchOnBoot) return;
1 office 33  
34 _launchOnBoot = value;
35 OnPropertyChanged();
36 }
37 }
38  
39 public string Radio
40 {
41 get => _radio;
42 set
43 {
54 office 44 if (value == _radio) return;
1 office 45  
46 _radio = value;
47 OnPropertyChanged();
48 }
49 }
50  
51 public string Port
52 {
53 get => _port;
54 set
55 {
54 office 56 if (value == _port) return;
1 office 57  
58 _port = value;
59 OnPropertyChanged();
60 }
61 }
62  
63 public int Speed
64 {
65 get => _speed;
66 set
67 {
54 office 68 if (value == _speed) return;
1 office 69  
70 _speed = value;
71 OnPropertyChanged();
72 }
73 }
54 office 74  
1 office 75 public int DataBits
76 {
77 get => _dataBits;
78 set
79 {
54 office 80 if (value == _dataBits) return;
1 office 81  
82 _dataBits = value;
83 OnPropertyChanged();
84 }
85 }
86  
54 office 87 public Parity Parity
1 office 88 {
89 get => _parity;
90 set
91 {
54 office 92 if (value == _parity) return;
1 office 93  
94 _parity = value;
95 OnPropertyChanged();
96 }
97 }
98  
54 office 99 public StopBits StopBits
1 office 100 {
101 get => _stopBits;
102 set
103 {
54 office 104 if (value == _stopBits) return;
1 office 105  
106 _stopBits = value;
107 OnPropertyChanged();
108 }
109 }
110  
54 office 111 public Handshake Handshake
7 office 112 {
113 get => _handshake;
114 set
115 {
54 office 116 if (value == _handshake) return;
7 office 117  
118 _handshake = value;
119 OnPropertyChanged();
120 }
121 }
122  
123 public SerialPortTimeout SerialPortTimeout
124 {
125 get => _serialPortTimeout;
126 set
127 {
54 office 128 if (value == _serialPortTimeout) return;
7 office 129  
130 _serialPortTimeout = value;
131 OnPropertyChanged();
132 }
133 }
134  
5 office 135 public Definitions Definitions
136 {
137 get => _definitions;
138 set
139 {
54 office 140 if (value == _definitions) return;
5 office 141  
142 _definitions = value;
143 OnPropertyChanged();
144 }
145 }
146  
10 office 147 public Audio Audio
148 {
149 get => _audio;
150 set
151 {
54 office 152 if (value == _audio) return;
10 office 153  
154 _audio = value;
155 OnPropertyChanged();
156 }
157 }
158  
12 office 159 public Notifications Notifications
160 {
161 get => _notifications;
162 set
163 {
54 office 164 if (value == _notifications) return;
12 office 165  
166 _notifications = value;
167 OnPropertyChanged();
168 }
169 }
54 office 170  
55 office 171 public Visualizations Visualizations
14 office 172 {
55 office 173 get => _visualizations;
14 office 174 set
175 {
55 office 176 if (value == _visualizations) return;
12 office 177  
55 office 178 _visualizations = value;
14 office 179 OnPropertyChanged();
180 }
181 }
182  
21 office 183 public Navigation Navigation
184 {
185 get => _navigation;
186 set
187 {
54 office 188 if (value == _navigation) return;
21 office 189  
190 _navigation = value;
191 OnPropertyChanged();
192 }
193 }
194  
1 office 195 public event PropertyChangedEventHandler PropertyChanged;
196  
197 [NotifyPropertyChangedInvocator]
198 protected virtual void OnPropertyChanged([CallerMemberName] string propertyName = null)
199 {
200 PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
201 }
202 }
54 office 203 }