HamBook – Diff between revs 51 and 54

Subversion Repositories:
Rev:
Show entire fileIgnore whitespace
Rev 51 Rev 54
Line 1... Line -...
1 using HamBook.Radios.Generic; -  
2 using System; 1 using System;
3 using System.Collections.Generic; 2 using System.Collections.Generic;
4 using System.Linq; -  
5 using System.Text; -  
6 using System.Threading.Tasks; -  
7 using System.Xml.Serialization; 3 using System.Xml.Serialization;
Line 8... Line 4...
8   4  
9 namespace HamBook.Radios.Yaesu.FT_891 5 namespace HamBook.Radios.Yaesu.FT_891
10 { 6 {
11 [Radio("Yaesu FT-891")] 7 [Radio("Yaesu FT-891")]
12 [XmlRoot(Namespace = "Yaesu FT-891")] 8 [XmlRoot(Namespace = "Yaesu FT-891")]
13 public class MemoryRadioMode : Generic.MemoryRadioMode 9 public class MemoryRadioMode : Generic.MemoryRadioMode
14 { -  
15 public override char Code { get; set; } -  
16   -  
17 public override string Name { get; set; } -  
18   10 {
19 public MemoryRadioMode() 11 public MemoryRadioMode()
20 { -  
21   12 {
Line 22... Line 13...
22 } 13 }
23   14  
24 public MemoryRadioMode(string name) 15 public MemoryRadioMode(string name)
Line 31... Line 22...
31 { 22 {
32 Code = code; 23 Code = code;
33 Name = CodeToName(code); 24 Name = CodeToName(code);
34 } 25 }
Line -... Line 26...
-   26  
-   27 public override char Code { get; set; }
-   28  
-   29 public override string Name { get; set; }
35   30  
36 public static IEnumerable<char> Codes 31 public static IEnumerable<char> Codes
37 { 32 {
38 get 33 get
39 { 34 {
40 foreach (var code in new[] { '1', '2', '3', '4', '5', '6', '7', '8', '9', 'B', 'C', 'D' }) -  
41 { 35 foreach (var code in new[] { '1', '2', '3', '4', '5', '6', '7', '8', '9', 'B', 'C', 'D' })
42 yield return code; -  
43 } 36 yield return code;
44 } 37 }
Line 45... Line 38...
45 } 38 }
46   39  
47 public static IEnumerable<string> Names 40 public static IEnumerable<string> Names
48 { 41 {
49 get 42 get
50 { 43 {
-   44 foreach (var name in new[]
51 foreach (var name in new[] { "LSB", "USB", "CW", "FM", "AM", "RTTY-LSB", "CW-R", "DATA-LSB", "RTTY-USB", "FM-N", "DATA-USB", "AM-N" }) 45 {
52 { 46 "LSB", "USB", "CW", "FM", "AM", "RTTY-LSB", "CW-R", "DATA-LSB", "RTTY-USB", "FM-N",
53 yield return name; 47 "DATA-USB", "AM-N"
54 } 48 }) yield return name;
Line 55... Line 49...
55 } 49 }
56 } 50 }
Line 119... Line 113...
119 default: 113 default:
120 throw new ArgumentException(); 114 throw new ArgumentException();
121 } 115 }
122 } 116 }
123 } 117 }
124 } 118 }
125   119