public void AddTag(TagEntity tag) { if (TagExists(tag)) { return; } _tags.Add(tag); _tagsInternal = TagsToString(); }
public bool Equals(TagEntity value) { if (ReferenceEquals(null, value)) { return false; } if (ReferenceEquals(this, value)) { return true; } return value.EntityId == EntityId; }
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)); }
private bool TagExists(TagEntity tag) { return tag.New == false && Tags.Exists(x => x.EntityId == tag.EntityId); }
public void RemoveTag(TagEntity tag) { _tags.RemoveAll(x => x.EntityId == tag.EntityId); _tagsInternal = TagsToString(); }
public bool ContainsTag(TagEntity tag) { return TagExists(tag); }
private void FilterImage(TagEntity entity) { _homeViewController.FilterImages(entity); NavigationController.PushViewController(_homeViewController, true); }
public void FilterImages(TagEntity entity) { _currentTag = entity; }