PrintDocument for WinForms | ComponentOne
C1.Win.PrintPreview.4.5.2 Assembly / C1.Win.C1Preview.Design Namespace / SampleC1PrintDocument Class / DocumentEndedScript Property

In This Topic
    DocumentEndedScript Property (SampleC1PrintDocument)
    In This Topic
    Gets or sets the script that is executed when the current document has finished generating.
    Syntax
    'Declaration
     
    Public Property DocumentEndedScript As String
    public string DocumentEndedScript {get; set;}
    Remarks

    C1.C1Preview.C1PrintDocument also fires the C1.C1Preview.C1PrintDocument.DocumentEnded event at this time.

    The difference between events and scripts is that event handlers belong to the application code, while scripts belong to the document. Thus it is recommended that event handlers be used to perform tasks that implement the overall application logic but do not depend on the specific document being processed.

    On the other hand, scripts should be used to perform tasks directly related to the document itself. Scripts attached to a document are executed regardless of the current application (e.g. when the document is regenerated after being loaded from file by a different program). (For example, a document might contain a script that changes the value of a field in that document when an error occurs.)

    See Also