Public Class frmBU_Mahnlauf_Ausgabe

    Public AUSGABE = ""
    Public allowMailSend = False
    Sub New(allowMailSend)

        ' Dieser Aufruf ist für den Designer erforderlich.
        InitializeComponent()
        Me.allowMailSend = allowMailSend
        ' Fügen Sie Initialisierungen nach dem InitializeComponent()-Aufruf hinzu.

    End Sub
    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
        Me.DialogResult = DialogResult.Cancel
        Me.Close()
    End Sub

    Private Sub btnPDF_Click(sender As Object, e As EventArgs) Handles btnPDF.Click
        AUSGABE = "PDF"
    End Sub

    Private Sub btnMail_Click(sender As Object, e As EventArgs) Handles btnMail.Click
        If cbxMailOffnen.Checked Or cbxMailOffnen.Visible = False Then
            AUSGABE = "MAIL"
        Else
            AUSGABE = "MAIL_SEND"
        End If
    End Sub

    Private Sub btnPrint_Click(sender As Object, e As EventArgs) Handles btnPrint.Click
        AUSGABE = "PRINT"
    End Sub

    Private Sub frmBU_Mahnlauf_Ausgabe_Load(sender As Object, e As EventArgs) Handles Me.Load
        If Not allowMailSend Then
            cbxMailOffnen.Checked = False
            cbxMailOffnen.Visible = False
        End If
    End Sub
End Class