gxc
2020-01-02 00ab3ddb140ba8bb88b5cf572b004a85e1da85e9
ZigbeeApp/Shared/Phone/Device/Room/EditRoom.cs
@@ -193,7 +193,7 @@
        {
            room = r;
            IconPathType = r.BackgroundImageType;
            OldIconPathType= r.BackgroundImageType;
            OldIconPathType = r.BackgroundImageType;
            if (IconPathType != 0)
            {
                OldBackgroundImagePath = r.BackgroundImage;
@@ -204,11 +204,11 @@
        }
        public override void RemoveFromParent()
        public override void RemoveFromParent()
        {
            ZbGateway.StatusList.Remove(this);
            CommonPage.Instance.IsDrawerLockMode = false;
            base.RemoveFromParent();
            ZbGateway.StatusList.Remove(this);
            CommonPage.Instance.IsDrawerLockMode = false;
            base.RemoveFromParent();
        }
        #region Add____________________________________
@@ -262,7 +262,7 @@
                ImagePath = room.BackgroundImageType == 0 ? room.BackgroundImage : System.IO.Path.Combine(Config.Instance.FullPath, room.BackgroundImage)
            };
            bodyFrameLayout.AddChidren(backGround);
            if (room.BackgroundImageType != 0)
            {
                backGround.ImageBytes = Shared.IO.FileUtils.ReadFile(backGround.ImagePath);
@@ -297,7 +297,7 @@
            nameRow.SetTipTitle($"{Language.StringByID(R.MyInternationalizationString.RoomName)} :");
            nameRow.SetTitle(room.Name);
            infoFL.AddChidren(nameRow);
            if(room.IsLove)
            if (room.IsLove)
            {
                nameRow.NameText.Enable = false;
            }
@@ -357,7 +357,7 @@
            };
            if (string.IsNullOrEmpty(room.TemperatrueDevice) == false)
            {
                temperatureRow.SetTitle(room.Temperatrue==0?"--℃":$"{room.Temperatrue}℃");
                temperatureRow.SetTitle(room.Temperatrue == 0 ? "--℃" : $"{room.Temperatrue}℃");
                //发送获取温度的命令
                var dev = Common.LocalDevice.Current.GetDevice(room.TemperatrueDevice);
                ReadDeviceAttributeLogic.Instance.SendTemperatureStatuComand(dev);
@@ -408,7 +408,7 @@
            if (Config.Instance.Home.FloorDics.Count == 0 || room.IsLove)
            {
                temperatureRow.Y = Application.GetRealHeight(308);
                humidityRow.Y= Application.GetRealHeight(446);
                humidityRow.Y = Application.GetRealHeight(446);
            }
            var confirm = new Device.CommonForm.CompleteButton(1700, 900, 127);
@@ -421,7 +421,7 @@
                room.Name = nameRow.NameText.Text.Trim();
                if (OldIconPathType != 0)
                {
                    Shared.IO.FileUtils.DeleteFile(System.IO.Path.Combine(Config.Instance.FullPath,OldBackgroundImagePath));
                    Shared.IO.FileUtils.DeleteFile(System.IO.Path.Combine(Config.Instance.FullPath, OldBackgroundImagePath));
                    HdlAutoBackupLogic.DeleteFile(System.IO.Path.Combine(Config.Instance.FullPath, OldBackgroundImagePath));
                }
                if (IconPathType == 0)
@@ -600,4 +600,4 @@
        #endregion
    }
}
}