48 lines
1.7 KiB
VB.net
48 lines
1.7 KiB
VB.net
Imports System.Windows.Forms
|
|
|
|
Public Class frmYesNo
|
|
Dim oQuestion As String
|
|
Dim oCaption As String
|
|
Public oComment As String
|
|
Public Sub New(pQuestion As String, pCaption As String, pCommentSoFar As String)
|
|
MyBase.New()
|
|
oQuestion = pQuestion
|
|
oCaption = pCaption
|
|
oComment = pCommentSoFar
|
|
InitializeComponent()
|
|
' Add any initialization after the InitializeComponent() call.
|
|
|
|
End Sub
|
|
Private Sub OK_Button_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles OK_Button.Click
|
|
If txtReason.Text = String.Empty Then
|
|
Dim oStop As String
|
|
If USER_LANGUAGE = "de-DE" Then
|
|
oStop = "Bitte eine Begründung eingeben!"
|
|
ElseIf USER_LANGUAGE = "es-ES" Then
|
|
oStop = "Introduzca un motivo!"
|
|
ElseIf USER_LANGUAGE = "en-US" Then
|
|
oStop = "Please enter a reason!"
|
|
ElseIf USER_LANGUAGE = "fr-FR" Then
|
|
oStop = "Veuillez saisir une justification!"
|
|
End If
|
|
MsgBox(oStop, MsgBoxStyle.Exclamation, ADDITIONAL_TITLE)
|
|
Exit Sub
|
|
End If
|
|
oComment = txtReason.Text
|
|
Me.DialogResult = System.Windows.Forms.DialogResult.OK
|
|
|
|
Me.Close()
|
|
End Sub
|
|
|
|
Private Sub Cancel_Button_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Cancel_Button.Click
|
|
Me.DialogResult = System.Windows.Forms.DialogResult.Cancel
|
|
Me.Close()
|
|
End Sub
|
|
|
|
Private Sub frmYesNo_Load(sender As Object, e As EventArgs) Handles Me.Load
|
|
txtQuestion.Text = oQuestion
|
|
txtReason.Text = oComment
|
|
Me.Text = oCaption
|
|
End Sub
|
|
End Class
|