using System; using System.Drawing; using System.Text; using System.Text.Json.Serialization; namespace bzit.bomg.Models { public class BookmarkModel { public Guid Id { get; set; } = Guid.NewGuid(); public string Title { get; set; } public string Address { get; set; } public string Description { get; set; } public string IconId { get; set; } [JsonIgnore] public Image Icon { get; set; } public string Path { get; set; } public string Notes { get; set; } public new string ToString() { StringBuilder sb = new StringBuilder(); if (!string.IsNullOrWhiteSpace(this.Title)) { sb.AppendLine("Name"); sb.AppendLine(this.Title + Environment.NewLine); } if (!string.IsNullOrWhiteSpace(this.Address)) { sb.AppendLine("Address"); sb.AppendLine(this.Address + Environment.NewLine); } if (!string.IsNullOrWhiteSpace(this.Description)) { sb.AppendLine("Description"); sb.AppendLine(this.Description + Environment.NewLine); } if (!string.IsNullOrWhiteSpace(this.Notes)) { sb.AppendLine("Notes"); sb.AppendLine(this.Notes + Environment.NewLine); } return sb.ToString(); } } }