HamBook – Diff between revs 37 and 54

Subversion Repositories:
Rev:
Show entire fileIgnore whitespace
Rev 37 Rev 54
Line 1... Line 1...
1 using System; 1 using System;
2 using System.Collections.Generic; -  
3 using System.ComponentModel; -  
4 using System.Linq; -  
5 using System.Text; -  
6 using System.Threading.Tasks; -  
Line 7... Line 2...
7   2  
8 namespace HamBook.Radios.Generic 3 namespace HamBook.Radios.Generic
9 { 4 {
10 public class SplitState 5 public class SplitState
11 { -  
12 public int State { get; set; } -  
13   6 {
14 public SplitState(string state) : this() 7 public SplitState(string state) : this()
15 { 8 {
16 State = Parse(state); 9 State = Parse(state);
Line 21... Line 14...
21 State = Parse(state); 14 State = Parse(state);
22 } 15 }
Line 23... Line 16...
23   16  
24 public SplitState() 17 public SplitState()
25 { -  
26   18 {
Line -... Line 19...
-   19 }
-   20  
27 } 21 public int State { get; set; }
28   22  
29 public static bool TryParse(string state, out SplitState splitState) 23 public static bool TryParse(string state, out SplitState splitState)
30 { 24 {
31 switch (state) -  
32 { 25 switch (state)
33   26 {
34 case "On": 27 case "On":
35 case "Off": 28 case "Off":
36 case "+5kHz": 29 case "+5kHz":
Line 113... Line 106...
113 public static implicit operator int(SplitState state) 106 public static implicit operator int(SplitState state)
114 { 107 {
115 return state.State; 108 return state.State;
116 } 109 }
117 } 110 }
118 } 111 }
119   112