const int Version1 = 1; //旧ファイルバージョン1 //バイナリ読み込み void ReadBinary(BinaryReader reader) { int magicID = reader.ReadInt32(); if (magicID != MagicID) { throw new System.Exception("Read File Id Error"); } int fileVersion = reader.ReadInt32(); if (fileVersion == Version) { ReadData.Read(reader); SelectionData.Read(reader); Engine.Config.Read(reader); GalleryData.Read(reader); Engine.Param.ReadSystemData(reader); } else if (fileVersion == Version2) { ReadData.Read(reader); Engine.Config.Read(reader); GalleryData.Read(reader); Engine.Param.ReadSystemData(reader); } else if (fileVersion == Version1) { ReadData.Read(reader); Engine.Config.Read(reader); GalleryData.Read(reader); } else { throw new System.Exception(LanguageErrorMsg.LocalizeTextFormat(ErrorMsg.UnknownVersion, fileVersion)); } }