From 9c16d3614d9b88c637f967518a329f239fcd3aaf Mon Sep 17 00:00:00 2001 From: lss <316519258@qq.com> Date: 星期五, 12 六月 2020 09:22:04 +0800 Subject: [PATCH] 2020.06.12 --- ZigbeeApp/Shared/Phone/SmartSound/Forms/SmartSoundControlContentForm.cs | 13 +++++-------- 1 files changed, 5 insertions(+), 8 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/SmartSound/Forms/SmartSoundControlContentForm.cs b/ZigbeeApp/Shared/Phone/SmartSound/Forms/SmartSoundControlContentForm.cs old mode 100755 new mode 100644 index 02c58fe..a9c778d --- a/ZigbeeApp/Shared/Phone/SmartSound/Forms/SmartSoundControlContentForm.cs +++ b/ZigbeeApp/Shared/Phone/SmartSound/Forms/SmartSoundControlContentForm.cs @@ -133,7 +133,7 @@ // The remote server returned an error: (400) Bad Request. string url = "https://developer.hdlcontrol.com/zigbeespeakerservice/BatchEdit"; string json = Newtonsoft.Json.JsonConvert.SerializeObject(SmartSound.getInstantiate()); - string response_str = await MyHttpWebResponse.PostWebRequest(url, json, Encoding.UTF8); + string response_str = MyHttpWebResponse.PostWebRequest(url, json, Encoding.UTF8); return response_str; } @@ -207,15 +207,12 @@ continue; SmartSound.Device smartDevice = new SmartSound.Device(); - //smartDevice.Id = device.DeviceID.ToString();//璁惧 Id smartDevice.DeviceAddress = device.DeviceAddr;//璁惧 MAC smartDevice.Epoint = device.DeviceEpoint;//璁惧绔彛 - //smartDevice.ClusterID = 0; - smartDevice.DeviceName = device.DeviceName;//璁惧鍚嶇О + smartDevice.DeviceName = Common.LocalDevice.Current.GetDeviceEpointName(device);//璁惧鍚嶇О smartDevice.NicksName = ""; smartDevice.DeviceType = GetDeviceType(device);//璁惧绫诲瀷 smartDevice.GatewayID = device.CurrentGateWayId;//缃戝叧 Id - //smartDevice.RoomID = room.Id;//鎴块棿 Id if (smartDevice.DeviceName == "" || smartDevice.DeviceName == string.Empty) continue; @@ -233,13 +230,10 @@ if (scene == null) continue; SmartSound.Scene smartScene = new SmartSound.Scene(); - //smartScene.Id = scene.DeviceID.ToString(); smartScene.SceneName = scene.Name; smartScene.SceneID = scene.Id; smartScene.DelayTime = scene.DelayTime; - //smartScene.ClusterID = 0; smartScene.NicksName = ""; - //smartScene.RoomID = room.Id; smartScene.GatewayID = ZbGateway.MainGateWay.GwId; if (smartScene.SceneName == "" || smartScene.SceneName == string.Empty) @@ -249,6 +243,9 @@ } #endregion + if (room.ListDevice.Count == 0 && sceneList.Count == 0) + layer.RoomList.Remove(smartRoom); + } catch (Exception e) { -- Gitblit v1.8.0