Chat Support
Loupe - Log - Monitor - Resolve
Gibraltar.Agent Namespace / PackagerDialog Class / Send Method
Example

In This Topic
    Send Method
    In This Topic
    Start the package and send process, using the application configuration.
    Syntax
    'Declaration
     
    
    Public Function Send() As DialogResult
    public DialogResult Send()

    Return Value

    A dialog result indicating if the packager completed successfully, failed, or was canceled.
    Remarks

    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.

    Example
    The following example uses the PackagerDialog to display a wizard to the user to send data for the current process and logs to Trace if it doesn't complete successfully. The Packager automatically logs information to the Agent whenever there is a problem, so it isn't necessary to do additional logging.
    //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);
        }
    }
    Requirements

    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

    See Also