From 2d5cd35af7437ad4015d38594d8c721dc6166b11 Mon Sep 17 00:00:00 2001
From: mac <user@users-MacBook-Pro.local>
Date: 星期二, 29 八月 2023 09:22:38 +0800
Subject: [PATCH] Merge branch 'wjc' of http://59.41.255.150:6688/r/~wxr/OnPro into wjc

---
 HDL_ON/UI/UI0-Public/PublicAssmebly.cs |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/HDL_ON/UI/UI0-Public/PublicAssmebly.cs b/HDL_ON/UI/UI0-Public/PublicAssmebly.cs
index 526a60f..496c9ab 100644
--- a/HDL_ON/UI/UI0-Public/PublicAssmebly.cs
+++ b/HDL_ON/UI/UI0-Public/PublicAssmebly.cs
@@ -13,7 +13,7 @@
     {
         public Button btnTip;
 
-        public int entryMaxLength = 40;
+        public int entryMaxLength = 20;
         //public Action entrylistener;
 
         void EditParaterEvent(Button btnConfirm, int errorId_IsNullOrEmpty, int errorId_ContainsPar, List<string> list, EditText editText, Action<string> callBackAction,
@@ -155,9 +155,9 @@
 
             etParater.TextChangeEventHandler = (sender, e) =>
             {
-                if (System.Text.Encoding.Default.GetBytes(etParater.Text).Length > entryMaxLength)
+                if (System.Text.Encoding.Unicode.GetBytes(etParater.Text).Length > entryMaxLength)
                 {
-                    etParater.Text = etParater.Text.Remove(20);
+                    etParater.Text = etParater.Text.Remove(etParater.Text.Length-1);
 
 #if __ANDROID__
                     etParater.SetSelectionEnd();

--
Gitblit v1.8.0