Exemple #1
0
        /// <summary>
        /// Rebuilds a package
        /// </summary>
        /// <param name="owner">The owner form</param>
        /// <param name="connection">The connection used to serialize the items</param>
        /// <param name="sourcePackageFile">The package file that the new file is based on</param>
        /// <param name="items">The items that describes the layout of the new package</param>
        /// <param name="targetfile">The output package file</param>
        /// <param name="insertEraseCommands">True if each resource should have a delete operation inserted before the actual operation, false otherwise</param>
        /// <returns>A DialogResult object that indicates the result of the operation</returns>
        public static DialogResult RebuildPackage(Form owner, IServerConnection connection, string sourcePackageFile, List<ResourceItem> items, string targetfile, bool insertEraseCommands)
        {
            PackageProgress pkgp = new PackageProgress();

            var builder = new PackageBuilder(connection);
            pkgp.m_invokeObj = builder;
            pkgp.m_method = () => { builder.RebuildPackage(sourcePackageFile, items, targetfile, insertEraseCommands); return true; };

            return pkgp.ShowDialog(owner);
        }