| | |
| | | /// <summary> |
| | | /// IconPathType |
| | | /// </summary> |
| | | public int IconPathType = 0; |
| | | public int IconPathType; |
| | | /// <summary> |
| | | /// OldBackgroundImagePath |
| | | /// </summary> |
| | | private string OldBackgroundImagePath; |
| | | |
| | | /// <summary> |
| | | /// OldIconPathType |
| | | /// </summary> |
| | | public int OldIconPathType; |
| | | |
| | | |
| | | #endregion |
| | | |
| | |
| | | { |
| | | room = r; |
| | | IconPathType = r.BackgroundImageType; |
| | | OldIconPathType= r.BackgroundImageType; |
| | | if (IconPathType != 1) |
| | | { |
| | | OldBackgroundImagePath = r.BackgroundImage; |
| | | } |
| | | AddTop(); |
| | | |
| | | AddBodyView(); |
| | |
| | | var tradeTime = DateTime.Now.ToString("yyyyMMddHHmmss", DateTimeFormatInfo.InvariantInfo); |
| | | var fileName = $"Room_{tradeTime}"; |
| | | room.Name = nameRow.NameText.Text.Trim(); |
| | | if (OldIconPathType != 1) |
| | | { |
| | | Shared.IO.FileUtils.DeleteFile(OldBackgroundImagePath); |
| | | } |
| | | if (IconPathType == 0) |
| | | { |
| | | room.BackgroundImage = backGround.UnSelectedImagePath; |
| | |
| | | } |
| | | room.BackgroundImageType = IconPathType; |
| | | room.Save(); |
| | | action?.Invoke(); |
| | | RemoveFromParent(); |
| | | }; |
| | | |