From a5b3c4bae726ef6770d4bfcbf2f4b50a37ed4a15 Mon Sep 17 00:00:00 2001 From: 黄学彪 <hxb@hdlchina.com.cn> Date: 星期五, 06 三月 2020 15:31:36 +0800 Subject: [PATCH] 删除了郭雪城的 DeviceUi 这个类 --- ZigbeeApp/Shared/Phone/Device/CommonForm/RoomView.cs | 29 +++++++++++++++++------------ 1 files changed, 17 insertions(+), 12 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/Device/CommonForm/RoomView.cs b/ZigbeeApp/Shared/Phone/Device/CommonForm/RoomView.cs index 8fda258..ad3a44d 100755 --- a/ZigbeeApp/Shared/Phone/Device/CommonForm/RoomView.cs +++ b/ZigbeeApp/Shared/Phone/Device/CommonForm/RoomView.cs @@ -250,10 +250,14 @@ { X = Application.GetRealWidth(69), Width = Application.GetRealWidth(120), - Text = room.Temperatrue == 0 ? "--鈩�" : $"{room.Temperatrue}鈩�", + Text = "--鈩�", TextSize = 14, TextAlignment=TextAlignment.CenterLeft }; + if (string.IsNullOrEmpty(room.TemperatrueDevice) == false) + { + temperatureText.Text = room.Temperatrue == 0 ? "0.0鈩�" : room.Temperatrue.ToString() + "鈩�"; + } roomTemperatureBackground.AddChidren(temperatureText); temperatureText.Width = temperatureText.GetTextWidth() + Application.GetRealWidth(60); @@ -271,16 +275,20 @@ { X = humidityIcon.Right, Width = Application.GetRealWidth(120), - Text = room.Humidity == 0 ? "--%" : $"{room.Humidity}%", + Text = "--%", TextSize = 14, TextAlignment = TextAlignment.CenterLeft }; + if (string.IsNullOrEmpty(room.HumidityDevice) == false) + { + humidityText.Text = room.Humidity == 0 ? "0.0%" : room.Humidity.ToString() + "%"; + } roomTemperatureBackground.AddChidren(humidityText); humidityText.Width = humidityText.GetTextWidth() + Application.GetRealWidth(60); roomTemperatureBackground.Width = (humidityText.Width + temperatureText.Width + Application.GetRealWidth(150)) > Application.GetRealWidth(600) ? Application.GetRealWidth(600) : (humidityText.Width + temperatureText.Width + Application.GetRealWidth(150)); if (string.IsNullOrEmpty(room.TemperatrueDevice) == false) - { + { //鍙戦�佽幏鍙栨俯搴︾殑鍛戒护 var dev = Common.LocalDevice.Current.GetDevice(room.TemperatrueDevice); ReadDeviceAttributeLogic.Instance.SendTemperatureStatuComand(dev); @@ -305,15 +313,12 @@ roomListBtn.MouseUpEventHandler += (send, e) => { CommonPage.Instance.IsDrawerLockMode = true; - var editRoom = new Device.Room.EditRoom(); - HomePage.Instance.AddChidren(editRoom); - HomePage.Instance.PageIndex += 1; - editRoom.temperDevice = this.temperDevice; - editRoom.humidDevice = this.humidDevice; - editRoom.Show(room); - editRoom.action += () => - { - action?.Invoke(); + + var form = new UserCenter.Residence.EditorRoomInforForm(); + form.AddForm(room); + form.FinishEditorEvent += (roomName2) => + { + action?.Invoke(); }; }; } -- Gitblit v1.8.0