Partager via


WorkflowDesignerLoader.OnEndLoad(Boolean, ICollection) Méthode

Définition

Appelé lorsque le chargement du concepteur est terminé.

protected:
 override void OnEndLoad(bool successful, System::Collections::ICollection ^ errors);
protected override void OnEndLoad (bool successful, System.Collections.ICollection errors);
override this.OnEndLoad : bool * System.Collections.ICollection -> unit
Protected Overrides Sub OnEndLoad (successful As Boolean, errors As ICollection)

Paramètres

successful
Boolean

true si le chargement a réussi ; sinon, false.

errors
ICollection

Contient les erreurs de chargement.

Exemples

L'exemple suivant montre comment substituer la méthode OnEndLoad pour afficher les erreurs qui se sont éventuellement produites au cours du chargement d'un workflow.

protected override void OnEndLoad(bool successful, ICollection errors)
{
    base.OnEndLoad(successful, errors);

    if (!successful && errors != null)
    {
        System.Text.StringBuilder sb = new System.Text.StringBuilder("Errors\r\n");
        foreach (string error in errors)
        {
            sb.Append(error + "\r\n");
        }

        MessageBox.Show(sb.ToString(), "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
    }
}
Protected Overrides Sub OnEndLoad(ByVal successful As Boolean, ByVal errors As ICollection)
    MyBase.OnEndLoad(successful, errors)

    If Not successful And errors IsNot Nothing Then
        Dim sb As New System.Text.StringBuilder("Errors\r\n")
        For Each errorMessage As String In errors
            sb.Append(errorMessage + "\r\n")
        Next

        MessageBox.Show(sb.ToString(), "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
    End If
End Sub

S’applique à