예제 #1
0
        // tagList gets filled!
        internal static Photo FromString(string element, TagDatabase tagDB, HashSet <Tag> emptyTagList)
        {
            string[] parts  = element.Split(Constants.splitChar);
            string[] tagIDs = parts[1].Split(Constants.subSplitChar);

            for (int i = 0; i < tagIDs.Length; i++)
            {
                emptyTagList.Add(tagDB.GiveTag(Int32.Parse(tagIDs[i])));
            }

            return(new Photo(parts[0], DateTime.Parse(parts[2]), emptyTagList));
        }
예제 #2
0
 public void doAddTag(Photo photo, string tag)
 {
     photoDatabase.addTag(photo, tagDatabase.GiveTag(tag));
 }