From 351bdda734832d821a9764b0cde8be5d83c4ec50 Mon Sep 17 00:00:00 2001
From: wjc <1243177876@qq.com>
Date: 星期四, 01 十二月 2022 09:56:25 +0800
Subject: [PATCH] 2022年12月01日09:56:23

---
 ZigbeeApp/Shared/Phone/Device/Logic/CustomText.cs |   12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/ZigbeeApp/Shared/Phone/Device/Logic/CustomText.cs b/ZigbeeApp/Shared/Phone/Device/Logic/CustomText.cs
index 17b995f..64287ce 100755
--- a/ZigbeeApp/Shared/Phone/Device/Logic/CustomText.cs
+++ b/ZigbeeApp/Shared/Phone/Device/Logic/CustomText.cs
@@ -22,7 +22,7 @@
             var middle = new FrameLayout
             {
                 Y = view.topRowLayout.Bottom,
-                Height = Application.GetRealHeight(1920 - 184),
+                Height = Application.GetRealHeight(Method.H - 184),
                 BackgroundColor = ZigbeeColor.Current.LogicMiddleBackgroundColor,
             };
             this.AddChidren(middle);
@@ -52,7 +52,11 @@
             middle.AddChidren(textBtn);
             string s1 = "";
             string s2 = "";
-            textBox.TextChangeEventHandler += (sender, e) =>
+            if (!string.IsNullOrEmpty(Common.Logic.CurrentLogic.LogicCustomPushText))
+            {
+                textBtn.Text = (50 - Common.Logic.CurrentLogic.LogicCustomPushText.Length).ToString();
+            }
+            textBox.TextChangeEventHandler += (sender, e) =>
             {
                 var leng = e.Length;
                 if (leng > 50)
@@ -112,7 +116,7 @@
                  Common.Logic.CurrentLogic.LogicCustomPushText = textBox.Text.Trim();
                  if (string.IsNullOrEmpty(Common.Logic.CurrentLogic.LogicCustomPushText))
                  {
-                     var alert = new UserCenter.ShowMsgControl(UserCenter.ShowMsgType.Normal,
+                     var alert = new UserCenter.ShowMsgControl(ShowMsgType.Normal,
                            Language.StringByID(MyInternationalizationString.tiptextnull),
                            Language.StringByID(MyInternationalizationString.confrim));
                            alert.Show();
@@ -124,7 +128,7 @@
              };
 
 
-        
+        
 
         }
     }

--
Gitblit v1.8.0