From 39b8b0b9bcf5805ada1a44e5dc72f05f9c6e4fcc Mon Sep 17 00:00:00 2001
From: wxr <464027401@qq.com>
Date: 星期二, 25 七月 2023 13:12:30 +0800
Subject: [PATCH] 2.0备份

---
 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