Example #1
0
 public void AddTag(TagEntity tag)
 {
     if (TagExists(tag))
     {
         return;
     }
     _tags.Add(tag);
     _tagsInternal = TagsToString();
 }
Example #2
0
 public bool Equals(TagEntity value)
 {
     if (ReferenceEquals(null, value))
     {
         return false;
     }
     if (ReferenceEquals(this, value))
     {
         return true;
     }
     return value.EntityId == EntityId;
 }
Example #3
0
 public List<ImageEntity> GetImages(TagEntity tag)
 {
     List<ImageEntity> result;
     if (tag.IsAll)
     {
         result = GetImages();
     }
     else if (tag.IsUntagged)
     {
         result = GetUntagged();
     }
     else
     {
         result = _taggedImages.Values.Where(x => x.ContainsTag(tag)).ToList();
     }
     return result.OrderByDescending(x => x.CreateTime).ToList();
 }
 private void AddTagToImages(TagEntity tag)
 {
     _images.Iter(x => x.AddTag(tag));
 }
 public void AddTag(TagEntity tag)
 {
     _source.Add(tag);
     _controller.tagTokenView.ReloadData();
 }
 public override void RowSelected(UITableView tableView, NSIndexPath indexPath)
 {
     TagEntity addTag;
     TagEntity selectedTag = _tags[(int)indexPath.Item];
     if (selectedTag.IsAddTagRequest)
     {
         //                    bool requirePurchase = _controller.RequirePurchase();
         //                    if (requirePurchase)
         //                    {
         //                        return;
         //                    }
         addTag = new TagEntity { Name = selectedTag.Name };
     }
     else
     {
         addTag = selectedTag;
     }
     _controller.AddTagToImages(addTag);
     _controller._tagTokenSource.AddTag(addTag);
     _tags = GetTags();
     ReloadTags();
 }
 private void RemoveTagFormImages(TagEntity tag)
 {
     _images.Iter(x => x.RemoveTag(tag));
 }
Example #8
0
 private bool TagExists(TagEntity tag)
 {
     return tag.New == false && Tags.Exists(x => x.EntityId == tag.EntityId);
 }
Example #9
0
 public void RemoveTag(TagEntity tag)
 {
     _tags.RemoveAll(x => x.EntityId == tag.EntityId);
     _tagsInternal = TagsToString();
 }
Example #10
0
 public bool ContainsTag(TagEntity tag)
 {
     return TagExists(tag);
 }
Example #11
0
 private void FilterImage(TagEntity entity)
 {
     _homeViewController.FilterImages(entity);
     NavigationController.PushViewController(_homeViewController, true);
 }
Example #12
0
 public void FilterImages(TagEntity entity)
 {
     _currentTag = entity;
 }