Exemplo n.º 1
0
        public void ChangeCategory(BookmarkCategory newCategory, Bookmark bookmark)
        {
            var currentCategory = this.GetCategoryByBookmark(bookmark);

            if (currentCategory != newCategory)
            {
                currentCategory.RemoveBookmark(bookmark);
                newCategory.AddBookmark(bookmark);
            }
        }
Exemplo n.º 2
0
        public int MovePrevCategory(BookmarkCategory targetCategory)
        {
            if (targetCategory == this.categories.First())
            {
                return(0);
            }

            var index = this.categories.IndexOf(targetCategory);

            this.categories.RemoveAt(index);
            this.categories.Insert(--index, targetCategory);
            return(index);
        }
Exemplo n.º 3
0
        public int MoveNextCategory(BookmarkCategory targetCategory)
        {
            if (targetCategory == this.categories.Last())
            {
                return(this.categories.Count - 1);
            }

            var index = this.categories.IndexOf(targetCategory);

            this.categories.RemoveAt(index);
            this.categories.Insert(++index, targetCategory);
            return(index);
        }
Exemplo n.º 4
0
        public int MovePrevCategory(BookmarkCategory targetCategory)
        {
            if (targetCategory == this.categories.First())
            {
                return 0;
            }

            var index = this.categories.IndexOf(targetCategory);
            this.categories.RemoveAt(index);
            this.categories.Insert(--index, targetCategory);
            return index;
        }
Exemplo n.º 5
0
        public int MoveNextCategory(BookmarkCategory targetCategory)
        {
            if (targetCategory == this.categories.Last())
            {
                return this.categories.Count - 1;
            }

            var index = this.categories.IndexOf(targetCategory);
            this.categories.RemoveAt(index);
            this.categories.Insert(++index, targetCategory);
            return index;
        }
Exemplo n.º 6
0
 public void ChangeCategory(BookmarkCategory newCategory, Bookmark bookmark)
 {
     var currentCategory = this.GetCategoryByBookmark(bookmark);
     if (currentCategory != newCategory)
     {
         currentCategory.RemoveBookmark(bookmark);
         newCategory.AddBookmark(bookmark);
     }
 }