MS - Changes Doc2Doc search
This commit is contained in:
@@ -52,6 +52,11 @@ Public Class frmValidator
|
||||
Dim viewer_string As String
|
||||
Dim pdfxchange As Boolean = False
|
||||
Dim sumatra As Boolean = False
|
||||
|
||||
Private _CURRENT_INDEX_ARRAY(100, 250) As String
|
||||
|
||||
|
||||
Private _ValidatorSearch As frmValidatorSearch 'You need a reference to Form1
|
||||
Private _dependingControl_in_action As Boolean = False
|
||||
|
||||
<DllImport("user32.dll", CharSet:=CharSet.Ansi, SetLastError:=True, ExactSpelling:=True)>
|
||||
@@ -290,6 +295,8 @@ Public Class frmValidator
|
||||
sumatra = False
|
||||
RibbonControl1.Minimized = True
|
||||
|
||||
|
||||
|
||||
If My.Settings.frmValidatorPosition.IsEmpty = False Then
|
||||
If My.Settings.frmValidatorPosition.X > 0 And My.Settings.frmValidatorPosition.Y > 0 Then
|
||||
Location = My.Settings.frmValidatorPosition
|
||||
@@ -404,6 +411,15 @@ Public Class frmValidator
|
||||
|
||||
End If
|
||||
End If
|
||||
If Not IsNothing(CURRENT_DT_PROFILE_SEARCHES_RT) Then
|
||||
If CURRENT_DT_PROFILE_SEARCHES_RT.Rows.Count > 0 Then
|
||||
For Each _searchRow As DataRow In CURRENT_DT_PROFILE_SEARCHES_RT.Rows
|
||||
|
||||
Next
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
|
||||
Catch ex As Exception
|
||||
MsgBox("Error LOADING Profile-Data1:" & vbNewLine & ex.Message, MsgBoxStyle.Critical, "Attention:")
|
||||
@@ -447,6 +463,7 @@ Public Class frmValidator
|
||||
MsgBox($"SQL-Query for control {control.Name} is invalid.")
|
||||
Exit Sub
|
||||
End If
|
||||
Dim oValue
|
||||
|
||||
If TypeOf control Is TextBox Then
|
||||
Try
|
||||
@@ -454,6 +471,7 @@ Public Class frmValidator
|
||||
Dim value = firstRow.Item(0)
|
||||
|
||||
control.Text = value
|
||||
oValue = value
|
||||
Catch ex As Exception
|
||||
clsLogger.Add("Error in LoadSimpleData for TextBox: " & ex.Message)
|
||||
End Try
|
||||
@@ -594,15 +612,15 @@ Public Class frmValidator
|
||||
'Dim dt As DataTable = DD_DMSLiteDataSet.VWPM_CONTROL_INDEX
|
||||
|
||||
TBPM_PROFILE_CONTROLSTableAdapter.FillByProfil(DD_DMSLiteDataSet.TBPM_PROFILE_CONTROLS, CURRENT_ProfilGUID)
|
||||
Dim dt As DataTable = DD_DMSLiteDataSet.TBPM_PROFILE_CONTROLS
|
||||
|
||||
For Each dr As DataRow In dt.Rows
|
||||
Dim oCount As Integer = 0
|
||||
Dim oDTProfileControl As DataTable = DD_DMSLiteDataSet.TBPM_PROFILE_CONTROLS
|
||||
For Each oControlRow As DataRow In oDTProfileControl.Rows
|
||||
Dim ctrl As Control
|
||||
|
||||
Select Case dr.Item("CTRL_TYPE").ToString.ToUpper
|
||||
Select Case oControlRow.Item("CTRL_TYPE").ToString.ToUpper
|
||||
Case "TXT"
|
||||
If LogErrorsOnly = False Then ClassLogger.Add(" >> Versuch TXT zu laden", False)
|
||||
Dim txt As TextBox = ClassControlCreator.CreateExistingTextbox(dr, False)
|
||||
Dim txt As TextBox = ClassControlCreator.CreateExistingTextbox(oControlRow, False)
|
||||
If LogErrorsOnly = False Then ClassLogger.Add(" >> TXT wurde geladen", False)
|
||||
|
||||
AddHandler txt.GotFocus, AddressOf OnTextBoxFocus
|
||||
@@ -612,11 +630,11 @@ Public Class frmValidator
|
||||
ctrl = txt
|
||||
Case "LBL"
|
||||
If LogErrorsOnly = False Then ClassLogger.Add(" >> Versuch LBL zu laden", False)
|
||||
ctrl = ClassControlCreator.CreateExistingLabel(dr, False)
|
||||
ctrl = ClassControlCreator.CreateExistingLabel(oControlRow, False)
|
||||
Case "CMB"
|
||||
If LogErrorsOnly = False Then ClassLogger.Add(" >> Versuch CMB zu laden", False)
|
||||
|
||||
Dim cmb = ClassControlCreator.CreateExistingCombobox(dr, False)
|
||||
Dim cmb = ClassControlCreator.CreateExistingCombobox(oControlRow, False)
|
||||
|
||||
AddHandler cmb.SelectedValueChanged, AddressOf OnCmbselectedIndex
|
||||
|
||||
@@ -749,12 +767,12 @@ Public Class frmValidator
|
||||
'add_ComboBox(dr.Item("GUID"), dr.Item("CTRL_NAME"), CInt(dr.Item("X_LOC")), CInt(dr.Item("Y_LOC")), CInt(dr.Item("WIDTH")), CInt(dr.Item("HEIGHT")), dr.Item("READ_ONLY"), dr.Item("LOAD_IDX_VALUE")) 'dr.Item("INDEX_NAME"),
|
||||
Case "DTP"
|
||||
If LogErrorsOnly = False Then ClassLogger.Add(" >> Versuch DTP zu laden", False)
|
||||
ctrl = ClassControlCreator.CreateExistingDatepicker(dr, False)
|
||||
ctrl = ClassControlCreator.CreateExistingDatepicker(oControlRow, False)
|
||||
|
||||
'add_DTP(dr.Item("GUID"), dr.Item("NAME"), CInt(dr.Item("X_LOC")), CInt(dr.Item("Y_LOC")), CInt(dr.Item("WIDTH")), CInt(dr.Item("HEIGHT")), dr.Item("READ_ONLY"), dr.Item("LOAD_IDX_VALUE")) 'dr.Item("INDEX_NAME"),
|
||||
Case "DGV"
|
||||
If LogErrorsOnly = False Then ClassLogger.Add(" >> Versuch DGV zu laden", False)
|
||||
Dim dgv = ClassControlCreator.CreateExistingDataGridView(dr, False)
|
||||
Dim dgv = ClassControlCreator.CreateExistingDataGridView(oControlRow, False)
|
||||
|
||||
AddHandler dgv.RowValidating, AddressOf onDGVRowValidating
|
||||
|
||||
@@ -762,14 +780,14 @@ Public Class frmValidator
|
||||
|
||||
Case "LOOKUP"
|
||||
If LogErrorsOnly = False Then ClassLogger.Add(" >> Versuch LOOKUP zu laden", False)
|
||||
Dim lookup As LookupControl = ClassControlCreator.CreateExistingLookupControl(dr, False)
|
||||
Dim lookup As LookupControl = ClassControlCreator.CreateExistingLookupControl(oControlRow, False)
|
||||
|
||||
lookup.PreventDuplicates = dr.Item("VKT_PREVENT_MULTIPLE_VALUES")
|
||||
lookup.AllowAddNewValues = dr.Item("VKT_ADD_ITEM")
|
||||
lookup.MultiSelect = dr.Item("MULTISELECT")
|
||||
lookup.PreventDuplicates = oControlRow.Item("VKT_PREVENT_MULTIPLE_VALUES")
|
||||
lookup.AllowAddNewValues = oControlRow.Item("VKT_ADD_ITEM")
|
||||
lookup.MultiSelect = oControlRow.Item("MULTISELECT")
|
||||
|
||||
If NotNull(dr.Item("DEFAULT_VALUE"), "") <> "" Then
|
||||
lookup.SelectedValues = New List(Of String) From {dr.Item("DEFAULT_VALUE")}
|
||||
If NotNull(oControlRow.Item("DEFAULT_VALUE"), "") <> "" Then
|
||||
lookup.SelectedValues = New List(Of String) From {oControlRow.Item("DEFAULT_VALUE")}
|
||||
End If
|
||||
|
||||
ctrl = lookup
|
||||
@@ -778,21 +796,21 @@ Public Class frmValidator
|
||||
Case "CHK"
|
||||
If LogErrorsOnly = False Then ClassLogger.Add(" >> Versuch Checkbox zu laden", False)
|
||||
|
||||
ctrl = ClassControlCreator.CreateExisingCheckbox(dr, False)
|
||||
ctrl = ClassControlCreator.CreateExisingCheckbox(oControlRow, False)
|
||||
'add_Checkbox(dr.Item("GUID"), dr.Item("CTRL_NAME"), dr.Item("CTRL_TEXT"), CInt(dr.Item("X_LOC")), CInt(dr.Item("Y_LOC")), dr.Item("READ_ONLY"), dr.Item("LOAD_IDX_VALUE"))
|
||||
Case "TABLE"
|
||||
If LogErrorsOnly = False Then ClassLogger.Add(" >> Versuch Tabelle zu laden", False)
|
||||
|
||||
Dim columns As List(Of DD_DMSLiteDataSet.TBPM_CONTROL_TABLERow) = (From r As DD_DMSLiteDataSet.TBPM_CONTROL_TABLERow In DD_DMSLiteDataSet.TBPM_CONTROL_TABLE
|
||||
Where r.CONTROL_ID = dr.Item("GUID")
|
||||
Where r.CONTROL_ID = oControlRow.Item("GUID")
|
||||
Select r).ToList()
|
||||
|
||||
ctrl = ClassControlCreator.CreateExistingTable(dr, columns, False)
|
||||
ctrl = ClassControlCreator.CreateExistingTable(oControlRow, columns, False)
|
||||
'add_TABLE(dr.Item("GUID"), dr.Item("CTRL_NAME"), CInt(dr.Item("X_LOC")), CInt(dr.Item("Y_LOC")), dr.Item("WIDTH"), CInt(dr.Item("HEIGHT")), dr.Item("READ_ONLY"))
|
||||
Case "LINE"
|
||||
If LogErrorsOnly = False Then ClassLogger.Add(" >> Versuch Linie zu laden", False)
|
||||
|
||||
ctrl = ClassControlCreator.CreateExistingLine(dr, False)
|
||||
ctrl = ClassControlCreator.CreateExistingLine(oControlRow, False)
|
||||
End Select
|
||||
|
||||
If TypeOf ctrl IsNot Label Then
|
||||
@@ -804,7 +822,7 @@ Public Class frmValidator
|
||||
|
||||
pnldesigner.Controls.Add(ctrl)
|
||||
|
||||
LoadSimpleData(ctrl, dr.Item("GUID"))
|
||||
LoadSimpleData(ctrl, oControlRow.Item("GUID"))
|
||||
Next
|
||||
If LogErrorsOnly = False Then ClassLogger.Add(" >> Controls geladen", False)
|
||||
ClassLogger.Add("", False)
|
||||
@@ -1854,59 +1872,67 @@ Public Class frmValidator
|
||||
Dim resultvalue
|
||||
Try
|
||||
If DD_DMSLiteDataSet.VWPM_CONTROL_INDEX.Rows.Count > 0 Then
|
||||
For Each inctrl As Control In Me.pnldesigner.Controls
|
||||
Dim CONTROL_ID = inctrl.Tag
|
||||
Dim oCount As Integer = 0
|
||||
For Each oControl As Control In Me.pnldesigner.Controls
|
||||
Dim CONTROL_ID = oControl.Tag
|
||||
Dim controlRow = (From form In DD_DMSLiteDataSet.VWPM_CONTROL_INDEX.AsEnumerable()
|
||||
Select form
|
||||
Where form.Item("GUID") = CONTROL_ID).Single()
|
||||
|
||||
Dim Type As String = inctrl.GetType.ToString
|
||||
Dim Type As String = oControl.GetType.ToString
|
||||
Dim Typ As String = controlRow.Item("CTRL_TYPE")
|
||||
Dim idxname As String = controlRow.Item("INDEX_NAME")
|
||||
Dim oWMIndexName As String = controlRow.Item("INDEX_NAME")
|
||||
' Wenn kein defaultValue existiert, leeren String setzen
|
||||
Dim defaultValue As String = NotNull(controlRow.Item("DEFAULT_VALUE"), String.Empty)
|
||||
indexname = idxname
|
||||
Dim LoadIDX As Boolean = controlRow.Item("LOAD_IDX_VALUE")
|
||||
If LogErrorsOnly = False Then ClassLogger.Add(" >> INDEX: " & idxname & " - CONTROLNAME: " & inctrl.Name & " - LOAD IDXVALUES: " & LoadIDX.ToString, False)
|
||||
indexname = oWMIndexName
|
||||
|
||||
Dim LoadIDX As Boolean = controlRow.Item("LOAD_IDX_VALUE")
|
||||
If LogErrorsOnly = False Then ClassLogger.Add(" >> INDEX: " & oWMIndexName & " - CONTROLNAME: " & oControl.Name & " - LOAD IDXVALUES: " & LoadIDX.ToString, False)
|
||||
|
||||
_CURRENT_INDEX_ARRAY(oCount, 0) = oWMIndexName
|
||||
Select Case Type
|
||||
Case "System.Windows.Forms.TextBox"
|
||||
Try
|
||||
controltype = "Textbox"
|
||||
If idxname = "" Then
|
||||
MsgBox("Achtung fehlerhafte Konfiguration:" & vbNewLine & "Für das Control " & inctrl.Name & " wurde KEIN INDEX hinterlegt!" & vbNewLine & "Bitte prüfen Sie den Formulardesigner!", MsgBoxStyle.Critical)
|
||||
If oWMIndexName = "" 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
|
||||
End If
|
||||
If idxname Is Nothing = False Then
|
||||
If LoadIDX = False Or idxname = "DD PM-ONLY FOR DISPLAY" Then
|
||||
If oWMIndexName Is Nothing = False Then
|
||||
If LoadIDX = False Or oWMIndexName = "DD PM-ONLY FOR DISPLAY" Then
|
||||
' Wenn kein Index exisitiert, defaultValue laden
|
||||
inctrl.Text = defaultValue
|
||||
oControl.Text = defaultValue
|
||||
_CURRENT_INDEX_ARRAY(oCount, 1) = defaultValue
|
||||
If LogErrorsOnly = False Then ClassLogger.Add(" >> Indexwert soll nicht geladen werden.", False)
|
||||
Exit Select
|
||||
End If
|
||||
Dim wertWD
|
||||
|
||||
If idxname.StartsWith("[%VKT") And PROFIL_VEKTORINDEX <> "" Then
|
||||
wertWD = ReturnVektor_IndexValue(idxname)
|
||||
If oWMIndexName.StartsWith("[%VKT") And PROFIL_VEKTORINDEX <> "" Then
|
||||
wertWD = ReturnVektor_IndexValue(oWMIndexName)
|
||||
Else
|
||||
wertWD = aktivesDokument.GetVariableValue(idxname)
|
||||
wertWD = aktivesDokument.GetVariableValue(oWMIndexName)
|
||||
If wertWD Is Nothing Then
|
||||
wertWD = ""
|
||||
Else
|
||||
If wertWD.ToString = "System.Object[]" Then
|
||||
If LogErrorsOnly = False Then ClassLogger.Add(" >> TextBox with VektorField: " & idxname, False)
|
||||
If LogErrorsOnly = False Then ClassLogger.Add(" >> TextBox with VektorField: " & oWMIndexName, False)
|
||||
If wertWD.length = 1 Then
|
||||
wertWD = wertWD(0)
|
||||
_CURRENT_INDEX_ARRAY(oCount, 1) = wertWD(0)
|
||||
Else '
|
||||
ClassLogger.Add(" >> Vectorfield " & idxname & "' contains more then one value - First value will be used", False)
|
||||
ClassLogger.Add(" >> Vectorfield " & oWMIndexName & "' contains more then one value - First value will be used", False)
|
||||
wertWD = wertWD(0)
|
||||
_CURRENT_INDEX_ARRAY(oCount, 1) = wertWD(0)
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
inctrl.Text = NotNull(wertWD, defaultValue)
|
||||
oControl.Text = NotNull(wertWD, defaultValue)
|
||||
_CURRENT_INDEX_ARRAY(oCount, 1) = NotNull(wertWD, defaultValue)
|
||||
|
||||
End If
|
||||
Catch ex As Exception
|
||||
errormessage = "Unvorhergesehener Fehler bei FillIndexValues TextBox:" & vbNewLine & ex.Message & vbNewLine & "Check Logfile"
|
||||
@@ -1920,47 +1946,49 @@ Public Class frmValidator
|
||||
|
||||
Case "System.Windows.Forms.ComboBox"
|
||||
controltype = "ComboBox"
|
||||
Dim cmb As ComboBox = inctrl
|
||||
Dim cmb As ComboBox = oControl
|
||||
Try
|
||||
If idxname = "" Then
|
||||
MsgBox("Achtung fehlerhafte Konfiguration:" & vbNewLine & "Für das Control " & inctrl.Name & " wurde KEIN INDEX hinterlegt!" & vbNewLine & "Bitte prüfen Sie den Formulardesigner!", MsgBoxStyle.Critical)
|
||||
If oWMIndexName = "" 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
|
||||
End If
|
||||
If idxname Is Nothing = False Then
|
||||
If LoadIDX = False Or idxname = "DD PM-ONLY FOR DISPLAY" Then
|
||||
If oWMIndexName Is Nothing = False Then
|
||||
If LoadIDX = False Or oWMIndexName = "DD PM-ONLY FOR DISPLAY" Then
|
||||
If defaultValue = String.Empty Then
|
||||
cmb.SelectedIndex = -1
|
||||
Else
|
||||
cmb.Text = defaultValue
|
||||
_CURRENT_INDEX_ARRAY(oCount, 1) = defaultValue
|
||||
End If
|
||||
If LogErrorsOnly = False Then ClassLogger.Add(" >> Indexwert soll nicht geladen werden.", False)
|
||||
Exit Select
|
||||
End If
|
||||
Dim wertWD
|
||||
If idxname.StartsWith("[%VKT") And PROFIL_VEKTORINDEX <> "" Then
|
||||
wertWD = ReturnVektor_IndexValue(idxname)
|
||||
If oWMIndexName.StartsWith("[%VKT") And PROFIL_VEKTORINDEX <> "" Then
|
||||
wertWD = ReturnVektor_IndexValue(oWMIndexName)
|
||||
Else
|
||||
wertWD = aktivesDokument.GetVariableValue(idxname)
|
||||
wertWD = aktivesDokument.GetVariableValue(oWMIndexName)
|
||||
End If
|
||||
|
||||
If wertWD Is Nothing Then
|
||||
If LogErrorsOnly = False Then ClassLogger.Add($" >> Indexwert aus index {idxname}: Nothing", False)
|
||||
If LogErrorsOnly = False Then ClassLogger.Add($" >> Indexwert aus index {oWMIndexName}: Nothing", False)
|
||||
If defaultValue = String.Empty Then
|
||||
If LogErrorsOnly = False Then ClassLogger.Add($" >> Indexwert-defaultValue wurde nicht gefunden", False)
|
||||
cmb.SelectedIndex = -1
|
||||
Else
|
||||
If LogErrorsOnly = False Then ClassLogger.Add($" >> Indexwert-defaultValue wird geladen", False)
|
||||
cmb.Text = defaultValue
|
||||
_CURRENT_INDEX_ARRAY(oCount, 1) = defaultValue
|
||||
'cmb.SelectedIndex = cmb.FindStringExact(defaultValue)
|
||||
End If
|
||||
Else
|
||||
If LogErrorsOnly = False Then ClassLogger.Add($" >> Indexwert aus index {idxname}: {wertWD}", False)
|
||||
If LogErrorsOnly = False Then ClassLogger.Add($" >> Indexwert aus index {oWMIndexName}: {wertWD}", False)
|
||||
If LogErrorsOnly = False Then ClassLogger.Add($" >> Items in Combobox: {cmb.Items.Count}", False)
|
||||
|
||||
|
||||
If LogErrorsOnly = False Then ClassLogger.Add($" >> Index Wert wurde gesetzt", False)
|
||||
cmb.Text = wertWD
|
||||
|
||||
_CURRENT_INDEX_ARRAY(oCount, 1) = wertWD
|
||||
'If cmb.Items.Count = 0 Then
|
||||
' If LogErrorsOnly = False Then ClassLogger.Add($" >> Index Wert wurde gesetzt", False)
|
||||
' cmb.Text = wertWD
|
||||
@@ -1982,18 +2010,18 @@ Public Class frmValidator
|
||||
|
||||
Case "System.Windows.Forms.DataGridView"
|
||||
controltype = "DataGridView"
|
||||
Dim dgv As DataGridView = inctrl
|
||||
If idxname = "" Then
|
||||
MsgBox("Achtung fehlerhafte Konfiguration:" & vbNewLine & "Für das Control " & inctrl.Name & " wurde KEIN INDEX hinterlegt!" & vbNewLine & "Bitte prüfen Sie den Formulardesigner!", MsgBoxStyle.Critical)
|
||||
Dim dgv As DataGridView = oControl
|
||||
If oWMIndexName = "" 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
|
||||
End If
|
||||
If idxname Is Nothing = False Then
|
||||
If oWMIndexName Is Nothing = False Then
|
||||
If LoadIDX = False Then
|
||||
If LogErrorsOnly = False Then ClassLogger.Add(" >> Indexwert soll nicht geladen werden.", False)
|
||||
Exit Select
|
||||
End If
|
||||
|
||||
Dim wertWD = aktivesDokument.GetVariableValue(idxname)
|
||||
Dim wertWD = aktivesDokument.GetVariableValue(oWMIndexName)
|
||||
|
||||
If wertWD Is Nothing = False Then
|
||||
'Es wird gegen ein Vektorfeld nachindexiert
|
||||
@@ -2041,6 +2069,7 @@ Public Class frmValidator
|
||||
For Each obj As Object In wertWD
|
||||
If obj Is Nothing = False Then
|
||||
dgv.Rows.Add(New String() {obj.ToString})
|
||||
|
||||
End If
|
||||
|
||||
Next
|
||||
@@ -2053,21 +2082,23 @@ Public Class frmValidator
|
||||
|
||||
Case "System.Windows.Forms.CheckBox"
|
||||
controltype = "CheckBox"
|
||||
If idxname = "" Then
|
||||
MsgBox("Achtung fehlerhafte Konfiguration:" & vbNewLine & "Für das Control " & inctrl.Name & " wurde KEIN INDEX hinterlegt!" & vbNewLine & "Bitte prüfen Sie den Formulardesigner!", MsgBoxStyle.Critical)
|
||||
If oWMIndexName = "" 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
|
||||
End If
|
||||
If idxname Is Nothing = False Then
|
||||
If oWMIndexName Is Nothing = False Then
|
||||
|
||||
Dim chk As CheckBox = inctrl
|
||||
Dim chk As CheckBox = oControl
|
||||
|
||||
If LoadIDX = False Or idxname = "DD PM-ONLY FOR DISPLAY" Then
|
||||
If LoadIDX = False Or oWMIndexName = "DD PM-ONLY FOR DISPLAY" Then
|
||||
If LogErrorsOnly = False Then ClassLogger.Add(" >> Indexwert soll nicht geladen werden.", False)
|
||||
|
||||
If defaultValue <> String.Empty Then
|
||||
Dim result = False
|
||||
_CURRENT_INDEX_ARRAY(oCount, 1) = "False"
|
||||
If Boolean.TryParse(defaultValue, result) Then
|
||||
chk.Checked = result
|
||||
|
||||
End If
|
||||
End If
|
||||
|
||||
@@ -2077,12 +2108,12 @@ Public Class frmValidator
|
||||
|
||||
|
||||
Dim wertWD
|
||||
If idxname.StartsWith("[%VKT") And PROFIL_VEKTORINDEX <> "" Then
|
||||
wertWD = ReturnVektor_IndexValue(idxname)
|
||||
If oWMIndexName.StartsWith("[%VKT") And PROFIL_VEKTORINDEX <> "" Then
|
||||
wertWD = ReturnVektor_IndexValue(oWMIndexName)
|
||||
Else
|
||||
wertWD = aktivesDokument.GetVariableValue(idxname)
|
||||
wertWD = aktivesDokument.GetVariableValue(oWMIndexName)
|
||||
End If
|
||||
|
||||
_CURRENT_INDEX_ARRAY(oCount, 1) = wertWD.ToString
|
||||
If wertWD Is Nothing Then
|
||||
ClassLogger.Add(">> Zurückgegebener Wert des Wertes für Checkbox mit Indexname '" & indexname & "' ist nothing. Check defaultvalue", False)
|
||||
chk.Checked = False
|
||||
@@ -2104,11 +2135,11 @@ Public Class frmValidator
|
||||
Else
|
||||
Dim _value
|
||||
If wertWD.ToString = "System.Object[]" Then
|
||||
If LogErrorsOnly = False Then ClassLogger.Add(" >> CheckBoxValue with VektorField: " & idxname, False)
|
||||
If LogErrorsOnly = False Then ClassLogger.Add(" >> CheckBoxValue with VektorField: " & oWMIndexName, False)
|
||||
If wertWD.length = 1 Then
|
||||
_value = wertWD(0)
|
||||
Else '
|
||||
ClassLogger.Add(" >> Vectorfield " & idxname & "' contains more then one value - First value will be used", False)
|
||||
ClassLogger.Add(" >> Vectorfield " & oWMIndexName & "' contains more then one value - First value will be used", False)
|
||||
_value = wertWD(0)
|
||||
End If
|
||||
Else
|
||||
@@ -2133,8 +2164,8 @@ Public Class frmValidator
|
||||
End If
|
||||
Case "DigitalData.Controls.LookupGrid.LookupControl"
|
||||
Try
|
||||
Dim lookup As LookupControl = inctrl
|
||||
Dim wertWD = aktivesDokument.GetVariableValue(idxname)
|
||||
Dim lookup As LookupControl = oControl
|
||||
Dim wertWD = aktivesDokument.GetVariableValue(oWMIndexName)
|
||||
If wertWD.GetType.ToString.Contains("System.Object") Then
|
||||
Dim oArrlist As New List(Of String)
|
||||
For Each oVectorRow As Object In wertWD
|
||||
@@ -2146,7 +2177,7 @@ Public Class frmValidator
|
||||
Else
|
||||
|
||||
End If
|
||||
|
||||
_CURRENT_INDEX_ARRAY(oCount, 1) = wertWD.ToString
|
||||
Catch ex As Exception
|
||||
ClassLogger.Add(" - Unvorhergesehener Unexpected error in AddVorschlag_ComboBox - Indexname: " & indexname & " - Fehler: " & vbNewLine & ex.Message)
|
||||
MsgBox(ex.Message, MsgBoxStyle.Critical, "Unvorhergesehener Unexpected error in Add LookupControl:")
|
||||
@@ -2154,20 +2185,20 @@ Public Class frmValidator
|
||||
|
||||
Case "System.Windows.Forms.DateTimePicker"
|
||||
controltype = "DateTimePicker"
|
||||
Dim DTP As DateTimePicker = inctrl
|
||||
If idxname = "" Then
|
||||
MsgBox("Achtung fehlerhafte Konfiguration:" & vbNewLine & "Für das Control " & inctrl.Name & " wurde KEIN INDEX hinterlegt!" & vbNewLine & "Bitte prüfen Sie den Formulardesigner!", MsgBoxStyle.Critical)
|
||||
Dim DTP As DateTimePicker = oControl
|
||||
If oWMIndexName = "" 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
|
||||
End If
|
||||
If idxname Is Nothing = False Then
|
||||
If oWMIndexName Is Nothing = False Then
|
||||
Dim wertWD
|
||||
Try
|
||||
If idxname.StartsWith("[%VKT") And PROFIL_VEKTORINDEX <> "" Then
|
||||
If oWMIndexName.StartsWith("[%VKT") And PROFIL_VEKTORINDEX <> "" Then
|
||||
If LogErrorsOnly = False Then ClassLogger.Add(" >> DATE über PM-Vektor holen", False)
|
||||
wertWD = ReturnVektor_IndexValue(idxname)
|
||||
wertWD = ReturnVektor_IndexValue(oWMIndexName)
|
||||
ClassLogger.Add(">> DTP is """, False)
|
||||
Else
|
||||
wertWD = aktivesDokument.GetVariableValue(idxname)
|
||||
wertWD = aktivesDokument.GetVariableValue(oWMIndexName)
|
||||
End If
|
||||
|
||||
If wertWD Is Nothing Then wertWD = ""
|
||||
@@ -2186,13 +2217,13 @@ Public Class frmValidator
|
||||
ValueDTP = tempdate
|
||||
DTP.Text = tempdate
|
||||
End If
|
||||
|
||||
_CURRENT_INDEX_ARRAY(oCount, 1) = wertWD.ToString
|
||||
|
||||
|
||||
Catch ex As Exception
|
||||
errormessage = "Unvorhergesehener Fehler bei DTP: " & vbNewLine & ex.Message
|
||||
|
||||
ClassLogger.Add(">> Unvorhergesehener Fehler bei FillIndex DTP: " & ex.Message & vbNewLine & "Wert WD: " & wertWD.ToString & vbNewLine & "Indexname: " & idxname, True)
|
||||
ClassLogger.Add(">> Unvorhergesehener Fehler bei FillIndex DTP: " & ex.Message & vbNewLine & "Wert WD: " & wertWD.ToString & vbNewLine & "Indexname: " & oWMIndexName, True)
|
||||
frmError.ShowDialog()
|
||||
ClassLogger.Add(">> Unvorhergesehener Fehler bei FillIndex DTP: " & ex.Message, True)
|
||||
End Try
|
||||
@@ -2204,6 +2235,7 @@ Public Class frmValidator
|
||||
'Case Else
|
||||
' MsgBox(Type)
|
||||
End Select
|
||||
oCount += 1
|
||||
Next
|
||||
set_foreground()
|
||||
If first_control Is Nothing = False Then first_control.Focus()
|
||||
@@ -3399,4 +3431,8 @@ Public Class frmValidator
|
||||
Private Sub DateiInfoToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles DateiInfoToolStripMenuItem.Click
|
||||
frmFileInfo.ShowDialog()
|
||||
End Sub
|
||||
|
||||
Private Sub RefreshAdditionalSearchToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles RefreshAdditionalSearchToolStripMenuItem.Click
|
||||
_ValidatorSearch.RefreshTab1()
|
||||
End Sub
|
||||
End Class
|
||||
Reference in New Issue
Block a user