/// <summary>
        /// Retrieves all image objects tagged with the given tag.
        /// </summary>
        /// <param name="tag">
        /// Tag used for selecting image objects.
        /// </param>
        /// <returns>
        /// List of image objects tagged with the given tag.
        /// </returns>
        public List <IImage> AllWithTag(string tag)
        {
            List <IImage> filteredImages = new List <IImage>();

            foreach (IImage obj in All)
            {
                ITaggedImage tObj = obj as ITaggedImage;
                if (tObj != null && tObj.ContainsTag(tag))
                {
                    filteredImages.Add(obj);
                }
            }

            return(filteredImages);
        }
Exemplo n.º 2
0
 public ImageViewModel()
 {
     _imageSelected    = null;
     _tagSelectedIndex = 0;
 }