From fd1f19e8479c764fa28b0da3a2f9b34a3debe772 Mon Sep 17 00:00:00 2001 From: wjc <1243177876@qq.com> Date: 星期四, 03 八月 2023 21:47:04 +0800 Subject: [PATCH] 2023年08月03日21:47:02 --- HDL_ON/UI/UI0-Public/PublicAssmebly.cs | 11 +++++++++-- 1 files changed, 9 insertions(+), 2 deletions(-) diff --git a/HDL_ON/UI/UI0-Public/PublicAssmebly.cs b/HDL_ON/UI/UI0-Public/PublicAssmebly.cs index 1bd77d6..526a60f 100644 --- a/HDL_ON/UI/UI0-Public/PublicAssmebly.cs +++ b/HDL_ON/UI/UI0-Public/PublicAssmebly.cs @@ -11,12 +11,16 @@ { public partial class PublicAssmebly { + public Button btnTip; + + public int entryMaxLength = 40; + //public Action entrylistener; void EditParaterEvent(Button btnConfirm, int errorId_IsNullOrEmpty, int errorId_ContainsPar, List<string> list, EditText editText, Action<string> callBackAction, FrameLayout contentView, Button btnLine, Button btnCancel, FrameLayout editView, Dialog dialog, int titleId) { - var btnTip = new Button() + btnTip = new Button() { X = editView.X, Y = editView.Bottom, @@ -151,13 +155,14 @@ etParater.TextChangeEventHandler = (sender, e) => { - if (etParater.Text.Length > 20) + if (System.Text.Encoding.Default.GetBytes(etParater.Text).Length > entryMaxLength) { etParater.Text = etParater.Text.Remove(20); #if __ANDROID__ etParater.SetSelectionEnd(); #endif + //entrylistener?.Invoke(); } }; @@ -225,6 +230,8 @@ }; EditParaterEvent(btnConfirm, errorId_IsNullOrEmpty, errorId_ContainsPar, baseList, etParater, callBackAction, contentView, btnLine, btnCancel, editView, dialog, titleId); + + etParater.Foucs = true; } /// <summary> -- Gitblit v1.8.0