public static List<string> getItemsWithVocabFiles(Personality persona)
        {
            List<string> items = new List<string>();

            string[] itemsCopy = new string[Items.Count]; //Have to copy all items to not change "Items"
            Items.CopyTo(itemsCopy);

            items.AddRange(itemsCopy);

            try
            {
                foreach (FileInfo file in new DirectoryInfo(persona.Directory.FullName + @"\Vocabulary\").GetFiles())
                {
                    items.Add(file.Name.Replace("#", "").Replace(".txt", ""));
                }
            }
            catch (DirectoryNotFoundException dirNotFoundEx)
            { }

            return items;
        }
Пример #2
0
 private void OpenPersonaIgnoreChecks(string path)
 {
     Personality persona = new Personality(path);
     TreeNode personaRoot = persona.getRootNode();
     this.projectView.Nodes.Add(personaRoot);
     personaRoot.Expand();
 }