예제 #1
0
        public bool SaveTag(TagItem tag)
        {
            try
            {
                var currentTags = LoadTag(tag);
                if (currentTags == null)
                {
                    currentTags = tag;
                }
                else
                {
                    currentTags.TagName = tag.TagName;
                    currentTags.Count = tag.Count;
                    currentTags.Weight = tag.Weight;
                }



                Store.Save(currentTags);
            }
            catch (Exception)
            {
                return false;
            }
            return true;
        }
예제 #2
0
        public bool SaveTag(TagItem tag)
        {
            try
            {
                var currentTags = LoadTag(tag);
                if (currentTags == null)
                {
                    currentTags = tag;
                }
                else
                {
                    currentTags.TagName = tag.TagName;
                    currentTags.Count   = tag.Count;
                    currentTags.Weight  = tag.Weight;
                }



                Store.Save(currentTags);
            }
            catch (Exception)
            {
                return(false);
            }
            return(true);
        }
예제 #3
0
 public TagItem LoadTag(TagItem tag)
 {
     return LoadTags().Where(x => x.TagName == tag.TagName).FirstOrDefault();          
 }
예제 #4
0
        public void IncreaseTagCount(TagItem tag)
        {
            tag.Count++;

            SaveTag(tag);
        }
예제 #5
0
 public TagItem LoadTag(TagItem tag)
 {
     return(LoadTags().Where(x => x.TagName == tag.TagName).FirstOrDefault());
 }
예제 #6
0
        public void IncreaseTagCount(TagItem tag)
        {
            tag.Count++;

            SaveTag(tag);
        }