コード例 #1
0
        public static void InitializeTagsFromFile(string filePath)
        {
            var lines     = File.ReadAllLines(filePath);
            var tagsSoFar = new List <string>();

            foreach (var line in lines)
            {
                var lineSplit   = line.Split('|');
                var category    = lineSplit[0];
                var subcategory = lineSplit[1];
                var cardName    = lineSplit[2];

                if (!tagsSoFar.Contains(category))
                {
                    TagBLL.AddTag(category);
                    tagsSoFar.Add(category);
                }
                TagBLL.AddTagToCard(cardName, category);

                if (subcategory != "")
                {
                    if (!tagsSoFar.Contains(subcategory))
                    {
                        TagBLL.AddTag(subcategory);
                        tagsSoFar.Add(subcategory);
                    }
                    TagBLL.AddTagToCard(cardName, subcategory);
                }
            }
        }
コード例 #2
0
 public static void FindCards(string tag)
 {
     TagBLL.AddTag(tag);
 }