diff --git a/Global_Indexer/frmAdministration.resx b/Global_Indexer/frmAdministration.resx
index c84e821..f4f764f 100644
--- a/Global_Indexer/frmAdministration.resx
+++ b/Global_Indexer/frmAdministration.resx
@@ -2677,7 +2677,7 @@
0
- 618, 133
+ 473, 133
128, 24
@@ -2701,7 +2701,7 @@
1
- 483, 133
+ 627, 133
115, 24
diff --git a/Global_Indexer/frmAdministration.vb b/Global_Indexer/frmAdministration.vb
index ecb374c..ff39b16 100644
--- a/Global_Indexer/frmAdministration.vb
+++ b/Global_Indexer/frmAdministration.vb
@@ -412,9 +412,15 @@ Public Class frmAdministration
If frmloaded = True Then
If SUGGESTIONCheckBox.CheckState = CheckState.Checked Then
btnSQLView.Visible = True
+ VKT_ADD_ITEMCheckbox.Enabled = True
Else
-
btnSQLView.Visible = False
+
+ If (_indexIsVectorField) Then
+ VKT_ADD_ITEMCheckbox.Enabled = True
+ Else
+ VKT_ADD_ITEMCheckbox.Enabled = False
+ End If
End If
End If
End Sub
@@ -1179,23 +1185,31 @@ Public Class frmAdministration
End If
End Sub
+ Private _indexIsVectorField As Boolean = False
+
Private Sub WD_INDEXComboBox_SelectedIndexChanged(sender As Object, e As EventArgs) Handles WD_INDEXComboBox.SelectedIndexChanged
- Dim selectedIndexName As String = WD_INDEXComboBox.Text
+ _indexIsVectorField = indexIsVectorField()
+ MULTISELECTCheckBox.Visible = _indexIsVectorField
+ VKT_PREVENT_MULTIPLE_VALUESCheckbox.Visible = _indexIsVectorField
- If selectedIndexName = String.Empty Then
- Exit Sub
- End If
-
- ' Vektorindexe fangen bei 4000 an
- Dim isVectorIndex As Boolean = ClassWindream.GetTypeOfIndexAsIntByName(selectedIndexName) > 4000
- MULTISELECTCheckBox.Visible = isVectorIndex
- VKT_ADD_ITEMCheckbox.Visible = isVectorIndex
- VKT_PREVENT_MULTIPLE_VALUESCheckbox.Visible = isVectorIndex
-
- If Not isVectorIndex Then
+ If Not _indexIsVectorField Then
MULTISELECTCheckBox.Checked = False
- VKT_ADD_ITEMCheckbox.Checked = False
VKT_PREVENT_MULTIPLE_VALUESCheckbox.Checked = False
End If
End Sub
+
+ Private Function indexIsVectorField() As Boolean
+ Try
+ Dim selectedIndexName As String = WD_INDEXComboBox.Text
+
+ If selectedIndexName = String.Empty Then
+ Return False
+ End If
+
+ ' Vektorindexe fangen bei 4000 an
+ Return ClassWindream.GetTypeOfIndexAsIntByName(selectedIndexName) > 4000
+ Catch ex As Exception
+ Return False
+ End Try
+ End Function
End Class
diff --git a/Global_Indexer/frmIndex.vb b/Global_Indexer/frmIndex.vb
index e548074..47c2ef6 100644
--- a/Global_Indexer/frmIndex.vb
+++ b/Global_Indexer/frmIndex.vb
@@ -621,6 +621,7 @@ Public Class frmIndex
frm.FormBorderStyle = FormBorderStyle.SizableToolWindow
frm.MultiSelect = False
frm.DataSource = table
+ frm.AddNewValues = AddNewValues
frm.StartPosition = FormStartPosition.Manual
frm.SelectedValues = New List(Of String) From {textBox.Text}
frm.Location = pnlIndex.PointToScreen(New Point(340, y))