HamBook – Diff between revs 46 and 54

Subversion Repositories:
Rev:
Show entire fileIgnore whitespace
Rev 46 Rev 54
Line 1... Line -...
1 using HamBook.Radios.Generic; -  
2 using System; 1 using System;
3 using System.Collections.Generic; -  
4 using System.Linq; -  
5 using System.Text; -  
6 using System.Threading.Tasks; -  
7 using System.Xml.Serialization; 2 using System.Xml.Serialization;
Line 8... Line 3...
8   3  
9 namespace HamBook.Radios.Yaesu.FT_891 4 namespace HamBook.Radios.Yaesu.FT_891
10 { 5 {
11 [Radio("Yaesu FT-891")] 6 [Radio("Yaesu FT-891")]
12 [XmlRoot(Namespace = "Yaesu FT-891")] 7 [XmlRoot(Namespace = "Yaesu FT-891")]
13 public class RadioMode : Generic.RadioMode 8 public class RadioMode : Generic.RadioMode
14 { -  
15 public override char Code { get; } -  
16   -  
17 public override string Name { get; } -  
18   9 {
19 public RadioMode() 10 public RadioMode()
20 { -  
21   11 {
Line 22... Line 12...
22 } 12 }
23   13  
24 public RadioMode(string name) 14 public RadioMode(string name)
Line 31... Line 21...
31 { 21 {
32 Code = code; 22 Code = code;
33 Name = CodeToName(code); 23 Name = CodeToName(code);
34 } 24 }
Line -... Line 25...
-   25  
-   26 public override char Code { get; }
-   27  
-   28 public override string Name { get; }
35   29  
36 public override char NameToCode(string mode) 30 public override char NameToCode(string mode)
37 { 31 {
38 switch (mode) 32 switch (mode)
39 { -  
40   33 {
41 case "SSB_1": 34 case "SSB_1":
42 return '1'; 35 return '1';
43 case "SSB_2": 36 case "SSB_2":
44 return '2'; 37 return '2';
Line 98... Line 91...
98 default: 91 default:
99 throw new ArgumentException(); 92 throw new ArgumentException();
100 } 93 }
101 } 94 }
102 } 95 }
103 } 96 }
104   97