步骤设置页面数字输入键盘完善

This commit is contained in:
sc committed 2025-09-04 23:20:13 +08:00
commit f7e051baec
3 files changed
+18 -10

No files matched your search

+7 -5
View File
@@ -2225,11 +2225,9 @@ namespace DyeingComputer.Windows
// 键盘按键事件处理
private void NumeralKeyboard_KeyPressed(object sender, TouchKeyboardNumeral.KeyPressedEventArgs e)
{
if (String.IsNullOrEmpty(e.KeyValue)) return;
switch (e.KeyType)
{
case KeyType.Character:
/* case KeyType.Character:
currentTextBox.Text += e.KeyValue;
break;
case KeyType.Backspace:
@@ -2237,13 +2235,17 @@ namespace DyeingComputer.Windows
{
currentTextBox.Text = currentTextBox.Text.Substring(0, currentTextBox.Text.Length - 1);
}
break;
break;*/
case KeyType.Enter:
// 回车键处理
currentTextBox.Text = e.KeyValue;
if (!String.IsNullOrEmpty(e.KeyValue)) currentTextBox.Text = e.KeyValue;
numeralKeyboard.Close();
boxID.Focus();
break;
case KeyType.Hide:
// 隐藏键盘处理
numeralKeyboard.Close();
boxID.Focus();
break;
}