/// <summary> /// Lists the contents of a package /// </summary> /// <param name="owner">The owner form</param> /// <param name="connection">The connection used to deserialize the items</param> /// <param name="packageFile">The package file to read</param> /// <returns>A list of resources in the package</returns> public static Dictionary<string, ResourceItem> ListPackageContents(Form owner, IServerConnection connection, string packageFile) { PackageProgress pkgp = new PackageProgress(); var builder = new PackageBuilder(connection); pkgp.m_invokeObj = builder; pkgp.m_method = () => { return builder.ListPackageContents(packageFile); }; if (pkgp.ShowDialog(owner) == DialogResult.OK) return (Dictionary<string, ResourceItem>)pkgp.m_invokeResult; else return null; }