64 lines
1.7 KiB
C#
64 lines
1.7 KiB
C#
using System;
|
|
using System.Text;
|
|
|
|
namespace bzit.bomg.Models
|
|
{
|
|
public class BookmarkItem
|
|
{
|
|
public string SiteName { get; set; }
|
|
|
|
public string SiteAddress { get; set; }
|
|
|
|
public string SiteDescription { get; set; }
|
|
|
|
public string FaviconAddress { get; set; }
|
|
|
|
public string TreeviewPath { get; set; }
|
|
|
|
public string Notes { get; set; }
|
|
|
|
//public BookmarkItemModel ToModel()
|
|
//{
|
|
// return new BookmarkItemModel()
|
|
// {
|
|
// SiteName = this.SiteName,
|
|
// SiteAddress = this.SiteAddress,
|
|
// SiteDescription = this.SiteDescription,
|
|
// FaviconAddress = this.FaviconAddress,
|
|
// TreeviewPath = this.TreeviewPath
|
|
// };
|
|
//}
|
|
|
|
public new string ToString()
|
|
{
|
|
StringBuilder sb = new StringBuilder();
|
|
|
|
if (!string.IsNullOrWhiteSpace(this.SiteName))
|
|
{
|
|
sb.AppendLine("Name");
|
|
sb.AppendLine(this.SiteName + Environment.NewLine);
|
|
}
|
|
|
|
if (!string.IsNullOrWhiteSpace(this.SiteAddress))
|
|
{
|
|
sb.AppendLine("Address");
|
|
sb.AppendLine(this.SiteAddress + Environment.NewLine);
|
|
}
|
|
|
|
if (!string.IsNullOrWhiteSpace(this.SiteDescription))
|
|
{
|
|
sb.AppendLine("Description");
|
|
sb.AppendLine(this.SiteDescription + Environment.NewLine);
|
|
}
|
|
|
|
if (!string.IsNullOrWhiteSpace(this.Notes))
|
|
{
|
|
sb.AppendLine("Notes");
|
|
sb.AppendLine(this.Notes + Environment.NewLine);
|
|
}
|
|
|
|
return sb.ToString();
|
|
}
|
|
|
|
}
|
|
} |