Esempio n. 1
0
        /// <summary>
        /// CharacterFolderを作成する
        /// </summary>
        /// <param name="folderPath"></param>
        /// <returns></returns>
        public static CharacterFolder Create(string folderPath)
        {
            CharacterFolder cf = new CharacterFolder();

            cf.FolderFullPath = folderPath;
            cf.FolderName     = Path.GetFileName(folderPath);
            cf.Update();
            return(cf);
        }
Esempio n. 2
0
        /// <summary>
        /// キャラクターフォルダを取得する
        /// </summary>
        /// <returns></returns>
        public CharacterFolder[] GetCharacterFolders()
        {
            List <CharacterFolder> chList = new List <CharacterFolder>();

            if (Directory.Exists(UserFolderPath))
            {
                string[] folders = Directory.GetDirectories(UserFolderPath);
                System.Text.RegularExpressions.Regex regex = new System.Text.RegularExpressions.Regex(@"\\FFXIV_CHR[0-9A-F]{16}$");


                foreach (string folder in folders)
                {
                    if (regex.IsMatch(folder.ToUpper()))
                    {
                        chList.Add(CharacterFolder.Create(folder));
                    }
                }
            }
            return(chList.ToArray());
        }
 /// <summary>
 /// CharacterFolderを作成する
 /// </summary>
 /// <param name="folderPath"></param>
 /// <returns></returns>
 public static CharacterFolder Create(string folderPath)
 {
     CharacterFolder cf = new CharacterFolder();
     cf.FolderFullPath = folderPath;
     cf.FolderName = Path.GetFileName(folderPath);
     cf.Update();
     return cf;
 }