Common/frmDialog: fix cancel button

This commit is contained in:
Jonathan Jenne
2022-09-14 14:25:50 +02:00
parent 57bb377b3a
commit ca3fdd3ef0
3 changed files with 68 additions and 25 deletions

View File

@@ -22,7 +22,7 @@ Public Class frmDialog
Question
End Enum
Public Sub New(pMessageText As String, pTitle As String, pDialogType As DialogType)
Public Sub New(pMessageText As String, pTitle As String, pDialogType As DialogType, Optional pCancel As Boolean = False)
' Dieser Aufruf ist für den Designer erforderlich.
InitializeComponent()
@@ -31,6 +31,12 @@ Public Class frmDialog
txtContent.Text = pMessageText
txtTitle.Text = pTitle
If pCancel Then
CancelButtonVisible()
Else
CancelButtonInvisible()
End If
Select Case pDialogType
Case DialogType.Success
pnlContent.BackColor = Color.LightGreen