public void LoadArchive(string fileName) { MsgTextArchive arch; ArchiveDescriptor desc; desc = GetArchiveDescriptor(fileName); if (desc == null) return; switch (desc.type) { case 0: arch = new MsgTextArchive(); arch.LoadArchive(); break; case 1: goto case 0; default: throw new NotSupportedException(string.Format("Unknown archive type '{0}'", fileName)); } if (!Exists(arch)) { archs.Add(arch); arch.AddDescriptor(desc); } else Find(arch).AddDescriptor(desc); }