HamBook – Diff between revs 11 and 15

Subversion Repositories:
Rev:
Show entire fileIgnore whitespace
Rev 11 Rev 15
Line 84... Line 84...
84 { 84 {
85 var match = InformationRegex.Match(input); 85 var match = InformationRegex.Match(input);
Line 86... Line 86...
86   86  
87 if(!match.Success) 87 if(!match.Success)
88 { 88 {
89 return null; 89 throw new UnmatchedRadioResponseException(Name, input);
Line 90... Line 90...
90 } 90 }
91   91  
92 var radioBank = int.Parse(match.Result("${radioBank}")); 92 var radioBank = int.Parse(match.Result("${radioBank}"));
93 var frequency = int.Parse(match.Result("${frequency}")); 93 var frequency = int.Parse(match.Result("${frequency}"));
94 var clarifierDirection = char.Parse(match.Result("${clarifierDirection}")); 94 var clarifierDirection = char.Parse(match.Result("${clarifierDirection}"));
95 var clarifierOffset = int.Parse(match.Result("${clarifierOffset}")); 95 var clarifierOffset = int.Parse(match.Result("${clarifierOffset}"));
96 var clar = int.Parse(match.Result("${clar}")); 96 var clar = int.Parse(match.Result("${clar}")) == 0 ? false : true;
97 var radioMode = char.Parse(match.Result("${mode}")); 97 var radioMode = char.Parse(match.Result("${mode}"));
98 var storage = (RadioStorage)int.Parse(match.Result("${storage}")); 98 var storage = match.Result("${storage}");
Line 99... Line 99...
99 var ctcssMode = (CtcssMode)int.Parse(match.Result("${ctcssMode}")); 99 var ctcssMode = match.Result("${ctcssMode}");
100 var phase = (RadioPhase)int.Parse(match.Result("${phase}")); 100 var phase = match.Result("${phase}");
101   101  
102 var information = new Information 102 var information = new Information
Line 107... Line 107...
107 ClarifierOffset = clarifierOffset, 107 ClarifierOffset = clarifierOffset,
108 Clar = clar, 108 Clar = clar,
109 RadioMode = radioMode, 109 RadioMode = radioMode,
110 Storage = storage, 110 Storage = storage,
111 CtcssMode = ctcssMode, 111 CtcssMode = ctcssMode,
112 Phase =phase 112 Phase = phase
113 }; 113 };
Line 114... Line 114...
114   114  
115 return information; 115 return information;