| | |
| | | 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 (); |
| | | } |
| | | }; |
| | |
| | | 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) { |