优化 PinCode 类
如果粘贴内容有效,则执行 `CompleteCommand` 并触发 `CompleteEvent` 事件。
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user