From dc14dbad8e3a55b57cadddba40c3f437e5e80fc5 Mon Sep 17 00:00:00 2001
From: wxr <464027401@qq.com>
Date: 星期二, 01 十一月 2022 09:08:03 +0800
Subject: [PATCH] 备份

---
 Crabtree/SmartHome/UI/SimpleControl/Phone/Guide/GuideSettingGateway.cs |   11 +++++++++--
 1 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/Crabtree/SmartHome/UI/SimpleControl/Phone/Guide/GuideSettingGateway.cs b/Crabtree/SmartHome/UI/SimpleControl/Phone/Guide/GuideSettingGateway.cs
index 570c048..352e964 100644
--- a/Crabtree/SmartHome/UI/SimpleControl/Phone/Guide/GuideSettingGateway.cs
+++ b/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 ();

--
Gitblit v1.8.0