Description
<ol>
<li>Go to Settings UI</li>
<li>Select the PIN (this is the global settings PIN)</li>
<li>Enter a non number PIN (password)</li>
<li>The PIN is not stored because of a silent exception (not logged)</li>
</ol>
<p> </p>
<pre class="brush: csharp;" name="code" style="background-color:#f7f7f7;border:1px solid #d7d7d7;padding:.5em 1em .5em 1em;">
private bool SetPin()
{
var msgGetPassword = new GUIMessage(GUIMessage.MessageType.GUI_MSG_GET_PASSWORD, 0, 0, 0, 0, 0, 0);
GUIWindowManager.SendMessage(msgGetPassword);
try
{
int iPincode = Int32.Parse(msgGetPassword.Label);
_pin = iPincode.ToString(CultureInfo.InvariantCulture);
return true;
}
// ReSharper disable EmptyGeneralCatchClause
catch (Exception) {}
// ReSharper restore EmptyGeneralCatchClause
return false;
}</pre>
<p> </p>
<li>Go to Settings UI</li>
<li>Select the PIN (this is the global settings PIN)</li>
<li>Enter a non number PIN (password)</li>
<li>The PIN is not stored because of a silent exception (not logged)</li>
</ol>
<p> </p>
<pre class="brush: csharp;" name="code" style="background-color:#f7f7f7;border:1px solid #d7d7d7;padding:.5em 1em .5em 1em;">
private bool SetPin()
{
var msgGetPassword = new GUIMessage(GUIMessage.MessageType.GUI_MSG_GET_PASSWORD, 0, 0, 0, 0, 0, 0);
GUIWindowManager.SendMessage(msgGetPassword);
try
{
int iPincode = Int32.Parse(msgGetPassword.Label);
_pin = iPincode.ToString(CultureInfo.InvariantCulture);
return true;
}
// ReSharper disable EmptyGeneralCatchClause
catch (Exception) {}
// ReSharper restore EmptyGeneralCatchClause
return false;
}</pre>
<p> </p>