예제 #1
0
        /// <summary>
        /// Uploads a package file to the server
        /// </summary>
        /// <param name="owner">The owner form</param>
        /// <param name="connection">The connection used to upload the package</param>
        /// <param name="packageFile">The package file to upload</param>
        /// <returns>A DialogResult object that indicates the result of the operation</returns>
        public static DialogResult UploadPackage(Form owner, IServerConnection connection, string packageFile)
        {
            PackageProgress pkgp = new PackageProgress();
            pkgp.Text = Strings.TitleUploading;

            var builder = new PackageBuilder(connection);
            pkgp.m_invokeObj = builder;
            pkgp.m_method = () => { builder.UploadPackage(packageFile); return true; };

            return pkgp.ShowDialog(owner);
        }