public wzarchives(string location) { wzarchive archive = new wzarchive(location); wzpackage root = archive.root; if (null != root) { string prefix = Path.GetDirectoryName(location) + "\\"; List <wzarchive> archives = new List <wzarchive>() { archive, }; properties = new object[] { root, archives, }; foreach (wzpackage property in root) { if (1 == property.type % 2 && 0 == property.count) { location = prefix + property.identity + ".wz"; if (File.Exists(location)) { archive = new wzarchive(location); root = archive.root; if (null != root) { foreach (wzpackage child in root) { child.host = property; property.append(child.identity, child); } archives.Add(archive); } } } } } }
public wzarchives(string location) { wzarchive archive = new wzarchive(location); wzpackage root = archive.root; input = location; packages = root; archives = new List <wzarchive> { archive, }; if (null != root) { string prefix = Path.GetDirectoryName(location) + "\\"; foreach (wzpackage element in root) { if (0 != element.type % 2 && 0 == element.count) { location = prefix + element.identity + ".wz"; if (File.Exists(location)) { archive = new wzarchive(location); root = archive.root; if (null != root) { foreach (wzpackage package in root) { package.parent = element; element.append(package.identity, package); } archives.Add(archive); } } } } } }
public wzarchives(string location) { wzarchive archive = new wzarchive(location); wzpackage root = archive.root; input = location; packages = root; archives = new List <wzarchive> { archive, }; if (null != root) { string prefix = Path.GetDirectoryName(location) + Path.DirectorySeparatorChar; string[] fmts = new string[] { "0", "000" }; foreach (wzpackage element in root) { if (0 != element.type % 2 && 0 == element.count) { //Map += Map001 for (var i = 0; i < 2; ++i) { var num = i == 0 ? "" : i.ToString(fmts[1]); location = prefix + element.identity + num + ".wz"; if (File.Exists(location)) { archive = new wzarchive(location); root = archive.root; if (null != root) { foreach (wzpackage package in root) { package.parent = element; if (element.identities.Contains(package.identity)) { element[package.identity].merge(package); } else { element.append(package.identity, package); } } archives.Add(archive); } } } } } ////Map += Map2 //Regex rgx = new Regex(@"([A-Za-z]+)(\d+)"); //foreach (wzpackage package in this.root) //{ // Match m = rgx.Match(package.identity); // if (m.Success) // { // string identity = m.Groups[1].Value; // // this.root[identity].merge(package); // } //} } }