Esempio n. 1
0
        /// <summary>
        /// 自分自身のクローンを返す。
        /// </summary>
        /// <returns>自分自身のクローン</returns>
        public FssLanguageFooter Clone()
        {
            var languageFooter = new FssLanguageFooter()
            {
                LanguageCategoryFile         = this.LanguageCategoryFile.Clone(),
                CaseInsensitiveTerms         = this.CaseInsensitiveTerms,
                AssetsCount                  = this.AssetsCount,
                NeverDestroy                 = this.NeverDestroy,
                UserAgreesToHaveItOnTheScene = this.UserAgreesToHaveItOnTheScene,
            };

            return(languageFooter);
        }
Esempio n. 2
0
        /// <summary>
        /// 言語情報ファイルを読み込み、言語情報を返す。
        /// </summary>
        /// <param name="path">言語情報ファイル</param>
        /// <returns>言語情報</returns>
        public static FssLanguageInfo LoadFromFile(string path)
        {
            var fssLanguageInfo = new FssLanguageInfo();

            using (var reader = new BinaryReader(File.OpenRead(path), Encoding.UTF8))
            {
                var fssLanguageHeader = FssLanguageHeader.Read(reader);
                var fssLanguageFile   = FssLanguageFile.Read(reader);
                var fssLanguageFooter = FssLanguageFooter.Read(reader);

                fssLanguageInfo.SetHeader(fssLanguageHeader);
                fssLanguageInfo.SetFile(fssLanguageFile);
                fssLanguageInfo.SetFooter(fssLanguageFooter);
            }

            return(fssLanguageInfo);
        }
Esempio n. 3
0
        /// <summary>
        /// Streamからデータを読み込み、言語フッターを返す。
        /// </summary>
        /// <param name="reader">Stream</param>
        /// <returns>言語フッター</returns>
        public static FssLanguageFooter Read(BinaryReader reader)
        {
            var fssLanguageFooter = new FssLanguageFooter();

            try
            {
                fssLanguageFooter.LanguageCategoryFile.Read(reader);

                fssLanguageFooter.CaseInsensitiveTerms = FsbBinUtils.ReadBoolean(reader);
                fssLanguageFooter.AssetsCount          = reader.ReadInt32();
                //// ToDo: Assets配列の処理を追加する。

                fssLanguageFooter.NeverDestroy = FsbBinUtils.ReadBoolean(reader);
                fssLanguageFooter.UserAgreesToHaveItOnTheScene = FsbBinUtils.ReadBoolean(reader);
            }
            catch
            {
                throw;
            }

            return(fssLanguageFooter);
        }