From 2ed75b8b337048e5d75e6d9ec8307633134f02fd Mon Sep 17 00:00:00 2001
From: 黄学彪 <hxb@hdlchina.com.cn>
Date: 星期四, 10 十月 2019 11:33:04 +0800
Subject: [PATCH] 个人中心添加楼层和创建房间,实装二级验证

---
 ZigbeeApp/Shared/Phone/Device/Room/AddRoom.cs |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/ZigbeeApp/Shared/Phone/Device/Room/AddRoom.cs b/ZigbeeApp/Shared/Phone/Device/Room/AddRoom.cs
index a6d5baf..09d68bd 100755
--- a/ZigbeeApp/Shared/Phone/Device/Room/AddRoom.cs
+++ b/ZigbeeApp/Shared/Phone/Device/Room/AddRoom.cs
@@ -290,7 +290,8 @@
             };
             settingContentFL.AddChidren(settingLine);
 
-            confirm = new Device.CommonForm.CompleteButton() { };
+            confirm = new Device.CommonForm.CompleteButton(1700, 700, 90);
+            confirm.SetTitle(R.MyInternationalizationString.Confrim);
             this.AddChidren(confirm);
             #endregion
 
@@ -448,6 +449,7 @@
                     if (room.BackgroundImageType == 1 || room.BackgroundImageType == 2)
                     {
                         OldBackgroundImagePath = room.BackgroundImage;
+                        System.IO.File.Delete(OldBackgroundImagePath);
                     }
                     backGround.UnSelectedImagePath = $"RoomPicture{tradeTime}.png";
                     //room.BackgroundImage = $"{Config.Instance.HomeId}/{backGround.UnSelectedImagePath}";
@@ -469,6 +471,7 @@
                     if (room.BackgroundImageType == 1 || room.BackgroundImageType == 2)
                     {
                         OldBackgroundImagePath = room.BackgroundImage;
+                        System.IO.File.Delete(OldBackgroundImagePath);
                     }
                     backGround.UnSelectedImagePath = $"RoomPicture{tradeTime}.png";
                     //room.BackgroundImage = $"{Config.Instance.HomeId}/{backGround.UnSelectedImagePath}";
@@ -576,7 +579,7 @@
                 if (IconType == 1 || IconType == 2)
                 {
                     room.MoveBackGroundIamageFileToDirectory(backGround.UnSelectedImagePath, backGround.UnSelectedImagePath);
-                    room.BackgroundImage = $"{Config.Instance.FullPath}/{backGround.UnSelectedImagePath}";
+                    room.BackgroundImage = $"{Config.Instance.Guid}/{Config.Instance.HomeId}/{backGround.UnSelectedImagePath}";
                 }
                 else
                 {
@@ -611,7 +614,7 @@
                     if (IconType == 1 || IconType == 2)
                     {
                         room.MoveBackGroundIamageFileToDirectory(backGround.UnSelectedImagePath, backGround.UnSelectedImagePath);
-                        room.BackgroundImage = $"{Config.Instance.FullPath}/{backGround.UnSelectedImagePath}";
+                        room.BackgroundImage = $"{Config.Instance.Guid}/{Config.Instance.HomeId}/{backGround.UnSelectedImagePath}";
                     }
                     else
                     {

--
Gitblit v1.8.0