From 489d3bd60ad7dc2fecb398b09cf4c52df16f0fc2 Mon Sep 17 00:00:00 2001 From: Davin <591807572@qq.com> Date: 星期三, 26 七月 2023 15:55:30 +0800 Subject: [PATCH] Merge branch 'Dev-Branch' of http://59.41.255.150:6688/r/~wxr/OnPro into Dev-Branch --- HDL_ON/UI/UI0-Public/PublicAssmebly.cs | 9 +++++++-- 1 files changed, 7 insertions(+), 2 deletions(-) diff --git a/HDL_ON/UI/UI0-Public/PublicAssmebly.cs b/HDL_ON/UI/UI0-Public/PublicAssmebly.cs index fd6cc65..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(); } }; -- Gitblit v1.8.0