예제 #1
0
        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);
        }
예제 #2
0
 public void AddItem(BookmarkItem item)
 {
     mItems.Add(item);
     SaveAsJson();
 }