Switch from Textbox to DevExpress TextEdit
This commit is contained in:
@@ -7,6 +7,7 @@ Imports DigitalData.Modules.Language.Utils
|
||||
Imports System.IO
|
||||
Imports DigitalData.Modules.EDMI.API.DatabaseWithFallback
|
||||
Imports DigitalData.Modules.EDMI.API.Constants
|
||||
Imports DevExpress.XtraEditors
|
||||
|
||||
Public Class frmMassValidator
|
||||
Private DTCONTROLS As DataTable
|
||||
@@ -143,9 +144,9 @@ Public Class frmMassValidator
|
||||
Dim oControl As Control
|
||||
oLastControl = $"CtrlName {oControlRow.Item("NAME")}, CtrlIndexname: {oControlRow.Item("INDEX_NAME")}"
|
||||
Select Case oControlRow.Item("CTRL_TYPE").ToString.ToUpper
|
||||
Case "TXT"
|
||||
Case ClassControlCreator.PREFIX_TEXTBOX
|
||||
LOGGER.Debug("Versuch TXT zu laden")
|
||||
Dim txt As TextBox = ClassControlCreator.CreateExistingTextbox(oControlRow, False)
|
||||
Dim txt As TextEdit = ClassControlCreator.CreateExistingTextbox(oControlRow, False)
|
||||
|
||||
AddHandler txt.GotFocus, AddressOf OnTextBoxFocus
|
||||
AddHandler txt.LostFocus, AddressOf OnTextBoxLostFocus
|
||||
@@ -473,7 +474,7 @@ Public Class frmMassValidator
|
||||
LOGGER.Debug("INDEX: " & idxname & " - CONTROLNAME: " & oControl.Name & " - LOAD IDXVALUES: " & LoadIDX.ToString)
|
||||
Dim wertWD
|
||||
Select Case Type
|
||||
Case "System.Windows.Forms.TextBox"
|
||||
Case "DevExpress.XtraEditors.TextEdit"
|
||||
Try
|
||||
controltype = "Textbox"
|
||||
If idxname = "" Then
|
||||
@@ -509,7 +510,7 @@ Public Class frmMassValidator
|
||||
|
||||
Case "System.Windows.Forms.ComboBox"
|
||||
controltype = "ComboBox"
|
||||
Dim cmb As ComboBox = oControl
|
||||
Dim cmb As Windows.Forms.ComboBox = oControl
|
||||
If idxname = "" Then
|
||||
MsgBox("Achtung fehlerhafte Konfiguration:" & vbNewLine & "Für das Control " & oControl.Name & " wurde KEIN INDEX hinterlegt!" & vbNewLine & "Bitte prüfen Sie den Formulardesigner!", MsgBoxStyle.Critical)
|
||||
Exit For
|
||||
@@ -838,16 +839,16 @@ Public Class frmMassValidator
|
||||
End Function
|
||||
|
||||
Public Sub OnTextBoxFocus(sender As Object, e As EventArgs)
|
||||
Dim box As TextBox = sender
|
||||
Dim box As TextEdit = sender
|
||||
box.BackColor = Color.LightSteelBlue
|
||||
box.SelectAll()
|
||||
End Sub
|
||||
Public Sub OnTextBoxLostFocus(sender As System.Object, e As System.EventArgs)
|
||||
Dim box As TextBox = sender
|
||||
Dim box As TextEdit = sender
|
||||
box.BackColor = Color.White
|
||||
End Sub
|
||||
Public Sub OnTextBoxKeyUp(sender As Object, e As KeyEventArgs)
|
||||
Dim box As TextBox = sender
|
||||
Dim box As TextEdit = sender
|
||||
If box.Text <> String.Empty And me_closing = False And CTRLS_Loaded = True And FORM_Shown = True Then
|
||||
|
||||
If (e.KeyCode = Keys.Return) Or (e.KeyCode = Keys.Tab) Or (e.KeyCode = Keys.Enter) Then
|
||||
@@ -908,7 +909,7 @@ Public Class frmMassValidator
|
||||
If displayboxname.StartsWith(ClassControlCreator.PREFIX_COMBOBOX) Then
|
||||
LOGGER.Debug("Filling Combobox with Results")
|
||||
|
||||
Dim oCombobox As ComboBox = pnldesigner.Controls(displayboxname)
|
||||
Dim oCombobox As Windows.Forms.ComboBox = pnldesigner.Controls(displayboxname)
|
||||
|
||||
If IsNothing(oCombobox) Then
|
||||
Exit Sub
|
||||
@@ -1097,7 +1098,7 @@ Public Class frmMassValidator
|
||||
End If
|
||||
Dim oValue
|
||||
|
||||
If TypeOf control Is TextBox Then
|
||||
If TypeOf control Is TextEdit Then
|
||||
Try
|
||||
Dim firstRow As DataRow = dt.Rows(0)
|
||||
Dim value = firstRow.Item(0)
|
||||
@@ -1108,9 +1109,9 @@ Public Class frmMassValidator
|
||||
LOGGER.Error(ex)
|
||||
clsLogger.Add("Error in LoadSimpleData for TextBox: " & ex.Message)
|
||||
End Try
|
||||
ElseIf TypeOf control Is ComboBox Then
|
||||
ElseIf TypeOf control Is Windows.Forms.ComboBox Then
|
||||
Try
|
||||
Dim comboxBox As ComboBox = control
|
||||
Dim comboxBox As Windows.Forms.ComboBox = control
|
||||
Dim list As New List(Of String)
|
||||
|
||||
For Each _row As DataRow In dt.Rows
|
||||
@@ -1223,7 +1224,7 @@ Public Class frmMassValidator
|
||||
'######
|
||||
Dim Type As String = oControl.GetType.ToString
|
||||
Select Case Type
|
||||
Case "System.Windows.Forms.TextBox"
|
||||
Case "DevExpress.XtraEditors.TextEdit"
|
||||
Try
|
||||
value_from_control = oControl.Text
|
||||
Catch ex As Exception
|
||||
@@ -1521,7 +1522,7 @@ Public Class frmMassValidator
|
||||
Catch ex As Exception
|
||||
LOGGER.Error(ex)
|
||||
End Try
|
||||
Case "System.Windows.Forms.TextBox"
|
||||
Case "DevExpress.XtraEditors.TextEdit"
|
||||
Try
|
||||
'Als erstes überprüfen ob überhaupt etwas eingetragen worden ist
|
||||
If Check_Missing(oControl, "txt") = True And _MUSSEINGABE = True Then 'NICHTS EINGETRAGEN
|
||||
@@ -1742,11 +1743,14 @@ Public Class frmMassValidator
|
||||
Function Check_Missing(control As Control, typ As String)
|
||||
Select Case typ
|
||||
Case "txt"
|
||||
If control.Text = String.Empty Or control.Text = "(Different values)" Or control.Text = "(Untersch. Werte)" Then
|
||||
Dim oTextBox As TextEdit = control
|
||||
If oTextBox.Text = String.Empty Or oTextBox.Text = "(Different values)" Or oTextBox.Text = "(Untersch. Werte)" Then
|
||||
Return True
|
||||
End If
|
||||
Return False
|
||||
|
||||
End Select
|
||||
|
||||
Return False
|
||||
End Function
|
||||
|
||||
Private Function IndexMultipleFiles(idxxname As String, idxvalue As Object)
|
||||
|
||||
Reference in New Issue
Block a user