public override EFile DatRemove() { Tree = null; Game = null; _dirDats.Clear(); return(base.DatRemove()); }
public override void DatAdd(RvBase b) { Tree = ((RvDir)b).Tree; Game = ((RvDir)b).Game; if (_dirDats.Count > 0) { ReportError.SendAndShow(Resources.RvDir_SetDat_Setting_Dir_with_a_dat_list); } base.DatAdd(b); }
public override void Read(BinaryReader br, List<RvDat> parentDirDats) { base.Read(br, parentDirDats); bool foundTree = br.ReadBoolean(); if (foundTree) { Tree = new RvTreeRow(); Tree.Read(br); } else Tree = null; bool foundGame = br.ReadBoolean(); if (foundGame) { Game = new RvGame(); Game.Read(br); } else Game = null; int count = br.ReadInt32(); _dirDats.Clear(); for (int i = 0; i < count; i++) { RvDat dat = new RvDat { DatIndex = i }; dat.Read(br); _dirDats.Add(dat); string datname = TreeFullName + @"\" + dat.GetData(RvDat.DatData.DatName); if (datname.Length >= 9 && datname.Substring(0, 9) == @"ROMVault\") datname = datname.Substring(9); DB.Bgw.ReportProgress(0, new bgwText("Loading: " + datname)); DB.Bgw.ReportProgress((int)br.BaseStream.Position); } if (_dirDats.Count > 0) parentDirDats = _dirDats; count = br.ReadInt32(); _children.Clear(); for (int i = 0; i < count; i++) { RvBase tChild = DBTypeGet.GetRvType((FileType)br.ReadByte()); tChild.Parent = this; tChild.Read(br, parentDirDats); _children.Add(tChild); } if (DBTypeGet.isCompressedDir(FileType)) ZipStatus = (ZipStatus)br.ReadByte(); }
public override EFile DatRemove() { Tree = null; Game = null; _dirDats.Clear(); return base.DatRemove(); }
public override void DatAdd(RvBase b) { Tree = ((RvDir)b).Tree; Game = ((RvDir)b).Game; if (_dirDats.Count > 0) ReportError.SendAndShow(Resources.RvDir_SetDat_Setting_Dir_with_a_dat_list); base.DatAdd(b); }
public override void Read(BinaryReader br, List <RvDat> parentDirDats) { base.Read(br, parentDirDats); bool foundTree = br.ReadBoolean(); if (foundTree) { Tree = new RvTreeRow(); Tree.Read(br); } else { Tree = null; } bool foundGame = br.ReadBoolean(); if (foundGame) { Game = new RvGame(); Game.Read(br); } else { Game = null; } int count = br.ReadInt32(); _dirDats.Clear(); for (int i = 0; i < count; i++) { RvDat dat = new RvDat { DatIndex = i }; dat.Read(br); _dirDats.Add(dat); string datname = TreeFullName + @"\" + dat.GetData(RvDat.DatData.DatName); if ((datname.Length >= 9) && (datname.Substring(0, 9) == @"RomVault\")) { datname = datname.Substring(9); } DB.Bgw.ReportProgress(0, new bgwText("Loading: " + datname)); DB.Bgw.ReportProgress((int)br.BaseStream.Position); } if (_dirDats.Count > 0) { parentDirDats = _dirDats; } count = br.ReadInt32(); _children.Clear(); for (int i = 0; i < count; i++) { RvBase tChild = DBTypeGet.GetRvType((FileType)br.ReadByte()); tChild.Parent = this; tChild.Read(br, parentDirDats); _children.Add(tChild); } if (DBTypeGet.isCompressedDir(FileType)) { ZipStatus = (ZipStatus)br.ReadByte(); } }