private void ScreenLockForm_Load(object sender, EventArgs e)
{
subscribeToEvents();
// Hide all the buttons that are not reqd. Pin length is
// configurable. Any numeric buttons past the pin length should be hidden
for (int ii = Common.AppPreferences.MutePinDigitMax + 1; ii < _keypadButtonArray.Length; ii++)
{
var buttonWidget = _rootWidget.Finder.FindChild(_keypadButtonArray[ii]);
if (buttonWidget != null)
{
buttonWidget.Hide();
}
}
// Display the pin
for (int ii = 0; ii < _pin.Length && ii < _pinButtonArray.Length; ii++)
{
Widget widget = _rootWidget.Finder.FindChild(_pinButtonArray[ii]);
if (widget != null)
{
widget.Value = _pin[ii].ToString();
widget.SetText(_pin[ii].ToString());
}
}
// hide remaining buttons
for (int ii = _pin.Length; ii < _pinButtonArray.Length; ii++)
{
Widget widget = _rootWidget.Finder.FindChild(_pinButtonArray[ii]);
if (widget != null)
{
widget.Hide();
}
}
AuditLog.Audit(new AuditEventScreenLock("show"));
_animationManager.Start(_rootWidget);
}