コード例 #1
0
        public void ChangeCategory(BookmarkCategory newCategory, Bookmark bookmark)
        {
            var currentCategory = this.GetCategoryByBookmark(bookmark);

            if (currentCategory != newCategory)
            {
                currentCategory.RemoveBookmark(bookmark);
                newCategory.AddBookmark(bookmark);
            }
        }
コード例 #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);
        }
コード例 #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);
        }
コード例 #4
0
ファイル: BookmarkerModel.cs プロジェクト: runceel/winrtapps
        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;
        }
コード例 #5
0
ファイル: BookmarkerModel.cs プロジェクト: runceel/winrtapps
        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;
        }
コード例 #6
0
ファイル: BookmarkerModel.cs プロジェクト: runceel/winrtapps
 public void ChangeCategory(BookmarkCategory newCategory, Bookmark bookmark)
 {
     var currentCategory = this.GetCategoryByBookmark(bookmark);
     if (currentCategory != newCategory)
     {
         currentCategory.RemoveBookmark(bookmark);
         newCategory.AddBookmark(bookmark);
     }
 }