public bool RemoveItem(BookmarkItem item) { bool bSuccess = mItems.Remove(item); bool bDuplicated = false; foreach (var other in mItems) { if (Math.Abs(item.Seconds - other.Seconds) <= double.Epsilon) { bDuplicated = true; break; } } if (!bDuplicated && File.Exists(item.ImagePath)) { File.Delete(item.ImagePath); } SaveAsJson(); return(bSuccess); }
public void AddItem(BookmarkItem item) { mItems.Add(item); SaveAsJson(); }