| | |
| | | { |
| | | room = r; |
| | | IconPathType = r.BackgroundImageType; |
| | | OldIconPathType= r.BackgroundImageType; |
| | | OldIconPathType = r.BackgroundImageType; |
| | | if (IconPathType != 0) |
| | | { |
| | | OldBackgroundImagePath = r.BackgroundImage; |
| | |
| | | |
| | | } |
| | | |
| | | 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____________________________________ |
| | |
| | | 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); |
| | |
| | | nameRow.SetTipTitle($"{Language.StringByID(R.MyInternationalizationString.RoomName)} :"); |
| | | nameRow.SetTitle(room.Name); |
| | | infoFL.AddChidren(nameRow); |
| | | if(room.IsLove) |
| | | if (room.IsLove) |
| | | { |
| | | nameRow.NameText.Enable = false; |
| | | } |
| | |
| | | }; |
| | | 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); |
| | |
| | | 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); |
| | |
| | | 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) |
| | |
| | | #endregion |
| | | |
| | | } |
| | | } |
| | | } |