Return Value
A dialog result indicating if the packager completed successfully, failed, or was canceled.
The dialog result will be OK if the process completed successfully, Cancel if the user cancels the wizard before it attempts to send the package, and Abort if the package and send process encounters an error.
//create a new packager dialog for the user and start the process to send data //for the current application. PackagerDialog packagerDialog = new PackagerDialog(); DialogResult result = packagerDialog.Send(); if (result != DialogResult.OK) { //The user may have canceled (DialogResult.Cancel) or //there may have been an error (DialogResult.Abort) if (result == System.Windows.Forms.DialogResult.Abort) { Trace.TraceWarning("Package and send process generated an error for the user."); } else { Trace.TraceInformation("Package not sent. Reason: " + result); } }
Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2