From c1863db0158fb6c2a1cd96686d514c98c1073937 Mon Sep 17 00:00:00 2001 From: JLChen <551775569@qq.com> Date: 星期五, 17 一月 2020 11:58:18 +0800 Subject: [PATCH] 2020-01-17 --- Crabtree/SmartHome/UI/SimpleControl/Phone/Room/UserDeviceListPage.cs | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/Crabtree/SmartHome/UI/SimpleControl/Phone/Room/UserDeviceListPage.cs b/Crabtree/SmartHome/UI/SimpleControl/Phone/Room/UserDeviceListPage.cs index e677a48..3acad0a 100644 --- a/Crabtree/SmartHome/UI/SimpleControl/Phone/Room/UserDeviceListPage.cs +++ b/Crabtree/SmartHome/UI/SimpleControl/Phone/Room/UserDeviceListPage.cs @@ -461,7 +461,9 @@ dialogView.AddChidren (etDeviceName); etDeviceName.TextChangeEventHandler += (sender, e) => { byte [] remakeBytes = CommonPage.MyEncodingGB2312.GetBytes (etDeviceName.Text.Trim ()); + if (remakeBytes.Length > 20) { + etDeviceName.Text = CommonPage.MyEncodingGB2312.GetString (remakeBytes, 0, 20); new Alert ("", "Remark length exceeded the limit. ", "Close").Show (); } }; -- Gitblit v1.8.0