From 454ac814944cf956ff02b84b70ba2ec68e5e5ea1 Mon Sep 17 00:00:00 2001 From: JLChen <551775569@qq.com> Date: 星期三, 15 一月 2020 19:38:47 +0800 Subject: [PATCH] 2020-01-15 1.优化MQTT连接。 2.增加本地通信加密。 --- Crabtree/SmartHome/UI/SimpleControl/Phone/Room/UserDeviceListPage.cs | 9 ++++++++- 1 files changed, 8 insertions(+), 1 deletions(-) diff --git a/Crabtree/SmartHome/UI/SimpleControl/Phone/Room/UserDeviceListPage.cs b/Crabtree/SmartHome/UI/SimpleControl/Phone/Room/UserDeviceListPage.cs index 2314279..e677a48 100644 --- a/Crabtree/SmartHome/UI/SimpleControl/Phone/Room/UserDeviceListPage.cs +++ b/Crabtree/SmartHome/UI/SimpleControl/Phone/Room/UserDeviceListPage.cs @@ -496,8 +496,15 @@ dialogBottomView.AddChidren (editor); editor.MouseUpEventHandler += (dff, ffd) => { - MainPage.Loading.Start (); byte [] remakeBytes = CommonPage.MyEncodingGB2312.GetBytes (etDeviceName.Text.Trim ()); + if (remakeBytes.Length > 20) { + new Alert ("", "Remark length exceeded the limit. ", "Close").Show (); + return; + } + + + MainPage.Loading.Start (); + //byte [] remakeBytes = CommonPage.MyEncodingGB2312.GetBytes (etDeviceName.Text.Trim ()); System.Threading.Tasks.Task.Run (() => { byte [] updateBytes = null; if (commonDevice.Type == DeviceType.LightSwitchSocket) { -- Gitblit v1.8.0