in TpmRcDecoder/TpmRcDecoder.Universal/RcDecoder.xaml.cs [30:60]
private void GenerateOutput()
{
string inStr = Input.Text.Trim();
uint input = ~0u;
if (inStr.StartsWith("0x", StringComparison.CurrentCultureIgnoreCase))
{
try
{
input = UInt32.Parse(inStr.Substring(2).Trim(), NumberStyles.HexNumber);
}
catch (FormatException)
{ }
}
else
{
try
{
input = UInt32.Parse(inStr, NumberStyles.Integer);
}
catch (FormatException)
{ }
}
if (input == ~0u)
{
Output.Text = m_InvalidNumberFormat;
return;
}
Decoder decoder = new Decoder();
Output.Text = decoder.Decode(string.Format("{0:x}", input));
}