2023-09-11 - THUMBNAILS!!!!!
This commit is contained in:
41
EnvelopeGenerator.Form/Helper/Validator.vb
Normal file
41
EnvelopeGenerator.Form/Helper/Validator.vb
Normal file
@@ -0,0 +1,41 @@
|
||||
Imports DevExpress.Utils.VisualEffects
|
||||
Imports DevExpress.XtraEditors
|
||||
Imports DigitalData.Modules.Base
|
||||
Imports DigitalData.Modules.Logging
|
||||
|
||||
Public Class Validator
|
||||
Inherits BaseClass
|
||||
|
||||
Public ReadOnly Property AdornerUIManager As AdornerUIManager
|
||||
|
||||
Public Sub New(pLogConfig As LogConfig, pAdornerUIManager As AdornerUIManager)
|
||||
MyBase.New(pLogConfig)
|
||||
Me.AdornerUIManager = pAdornerUIManager
|
||||
End Sub
|
||||
|
||||
|
||||
Public Function Validate(pEditor As BaseEdit) As Boolean
|
||||
With AdornerUIManager.ValidationHintProperties
|
||||
.State = ValidationHintState.Invalid
|
||||
.InvalidState.ShowBorder = True
|
||||
.InvalidState.ShowBackgroundMode = ValidationHintBackgroundMode.Target
|
||||
End With
|
||||
|
||||
AdornerUIManager.Hide()
|
||||
AdornerUIManager.Elements.Clear()
|
||||
|
||||
Dim oMissingParams As Boolean = False
|
||||
|
||||
If String.IsNullOrEmpty(pEditor.EditValue) Then
|
||||
AdornerUIManager.Elements.Add(New ValidationHint With {
|
||||
.TargetElement = pEditor,
|
||||
.Visible = True
|
||||
})
|
||||
oMissingParams = True
|
||||
End If
|
||||
|
||||
AdornerUIManager.Show()
|
||||
|
||||
Return oMissingParams
|
||||
End Function
|
||||
End Class
|
||||
Reference in New Issue
Block a user