jj: allow new values when sql suggestions is true / false
This commit is contained in:
parent
128475287f
commit
8e8bb037d0
@ -2677,7 +2677,7 @@
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name="VKT_ADD_ITEMCheckbox.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>618, 133</value>
|
||||
<value>473, 133</value>
|
||||
</data>
|
||||
<data name="VKT_ADD_ITEMCheckbox.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>128, 24</value>
|
||||
@ -2701,7 +2701,7 @@
|
||||
<value>1</value>
|
||||
</data>
|
||||
<data name="MULTISELECTCheckBox.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>483, 133</value>
|
||||
<value>627, 133</value>
|
||||
</data>
|
||||
<data name="MULTISELECTCheckBox.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>115, 24</value>
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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))
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user