/// <summary>
        /// 言語DBの初期化とDB化。
        /// </summary>
        /// <param name="systemDb">データベース接続情報</param>
        /// <param name="langPath">言語情報フォルダーのパス</param>
        /// <param name="productLine">製品区分</param>
        /// <param name="languageType">言語区分</param>
        /// <param name="fileList">FileList</param>
        public void ConvertLanguage(MieSystemDB systemDb, string langPath, MieProduct.NProductLine productLine, MieProduct.NLanguageType languageType, MieFileList fileList)
        {
            if (!Directory.Exists(langPath))
            {
                var msg = $"Directory not found({langPath}).";
                if (productLine == MieProduct.NProductLine.Vanilla)
                {
                    logger.Error(msg);
                    throw new DirectoryNotFoundException(msg);
                }
                else
                {
                    logger.Warn(msg);
                    Console.WriteLine(msg);

                    return;
                }
            }

            //// 話者情報の読み込みとFileListの作成。
            var langInfo = MieStringTableDao.LoadFromFolder(langPath, productLine, languageType, fileList);

            if (this.LanguageInfo == null)
            {
                this.LanguageInfo = langInfo;
            }
            else
            {
                foreach (var langFile in langInfo.Items.Values)
                {
                    this.LanguageInfo.AddFile(langFile, true);
                }
            }
        }
Ejemplo n.º 2
0
 public void LoadFromFolder(
     string folderPath,
     MieProduct.NProductLine productLine,
     MieProduct.NLanguageType languageType,
     MieFileList fileList)
 {
     this.languageInfo = MieStringTableDao.LoadFromFolder(
         folderPath,
         productLine,
         languageType,
         fileList);
     Console.WriteLine(this.languageInfo.FileCount);
 }