using System.Text; namespace BookmarkManager.Models { public class R4SaveFileModel { public string SiteName { get; set; } public string SiteAddress { get; set; } public string SiteDescription { get; set; } public string TreeviewPath { get; set; } public string Notes { get; set; } public string Path { get { if (string.IsNullOrWhiteSpace(TreeviewPath)) { return string.Empty; } var path = this.TreeviewPath?.Trim('\\')?.Trim() ?? string.Empty; if (!path.Contains("\\")) { return path?.Trim() ?? string.Empty; } var sb = new StringBuilder(); var parts = path.Split("\\"); for (var i = 1; i < parts.Length; i++) { var item = System.Web.HttpUtility.UrlDecode(parts[i]); sb.Append(item); sb.Append("\n"); } return sb.ToString()?.Trim() ?? string.Empty; } } } }