CrabtreeOn,印度客户定制APP,迁移2.0平台版本
wxr
2022-11-01 dc14dbad8e3a55b57cadddba40c3f437e5e80fc5
Crabtree/SmartHome/UI/SimpleControl/Phone/Guide/GuideSettingGateway.cs
@@ -316,7 +316,7 @@
                    //}
                    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),
@@ -415,10 +415,17 @@
                            //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 ();