优化 PinCode 类

如果粘贴内容有效,则执行 `CompleteCommand` 并触发 `CompleteEvent` 事件。
This commit is contained in:
Soar360
2024-12-05 20:11:57 +08:00
parent 052adb5856
commit 0c24c121a8

View File

@@ -181,6 +181,11 @@ public class PinCode: TemplatedControl
presenter.Text = newText[i].ToString();
}
}
if (newText.Length == Count)
{
CompleteCommand?.Execute(Digits);
RaiseEvent(new PinCodeCompleteEventArgs(Digits, CompleteEvent));
}
}
return;
}