| | |
| | | //} |
| | | |
| | | EventHandler<MouseEventArgs> eHandler = (sender, e) => { |
| | | Dialog dialog = new Dialog (); |
| | | Dialog dialog = new Dialog ();//修改设备备注 |
| | | FrameLayout dialogBodyView = new FrameLayout () { |
| | | BackgroundColor = SkinStyle.Current.DialogColor, |
| | | Width = Application.GetRealWidth (494), |
| | |
| | | //CommonPage.UpdateRemark (common.SubnetID, common.DeviceID, btnChangeName.Text.Trim ()); |
| | | |
| | | byte [] updateBytes = new byte [20]; |
| | | byte [] remakeBytes = CommonPage.MyEncodingGB2312.GetBytes (btnChangeName.Text.Trim ()); |
| | | string changeName = btnChangeName.Text.Trim (); |
| | | byte [] remakeBytes = CommonPage.MyEncodingGB2312.GetBytes (changeName); |
| | | Array.Copy (remakeBytes, 0, updateBytes, 0, remakeBytes.Length < 20 ? remakeBytes.Length : 20); |
| | | Control.ControlBytesSend (Command.Write_DeviceRamarkCMD, common.SubnetID, common.DeviceID, updateBytes); |
| | | |
| | | //修改云端备注 |
| | | new Thread (() => { |
| | | var http = new HttpServerRequest (); |
| | | http.EditDeviceName (common.DeviceID.ToString(), UserConfig.Instance.CurrentRegion.Id,changeName); |
| | | }) { IsBackground = true }.Start (); |
| | | |
| | | |
| | | btnDeviceName.Text = btnChangeName.Text; |
| | | dialog.Close (); |