diff --git a/app/DD_PM_WINDREAM/ClassFinalIndex.vb b/app/DD_PM_WINDREAM/ClassFinalIndex.vb index eb0cb3f..3fc0f9e 100644 --- a/app/DD_PM_WINDREAM/ClassFinalIndex.vb +++ b/app/DD_PM_WINDREAM/ClassFinalIndex.vb @@ -46,12 +46,6 @@ End If Return value - - 'If isVector Then - ' Return $"{PREFIX_VECTOR}{value}" - 'Else - ' Return value - 'End If Catch ex As Exception LOGGER.Error(ex) MsgBox($"Error in GetValue: {ex.Message}", MsgBoxStyle.Critical) diff --git a/app/DD_PM_WINDREAM/ClassVectorBehaviourListConverter.vb b/app/DD_PM_WINDREAM/ClassVectorBehaviourListConverter.vb new file mode 100644 index 0000000..7bb0430 --- /dev/null +++ b/app/DD_PM_WINDREAM/ClassVectorBehaviourListConverter.vb @@ -0,0 +1,23 @@ +Imports System.ComponentModel +Imports System.Globalization + +Public Class ClassVectorBehaviourListConverter + Inherits TypeConverter + + Public Overrides Function GetStandardValuesSupported(context As ITypeDescriptorContext) As Boolean + Return True + End Function + + Public Overrides Function GetStandardValues(context As ITypeDescriptorContext) As StandardValuesCollection + Dim oBehaviourList = DirectCast(context.Instance, FinalIndexProperties).VectorBehaviourType + Return New StandardValuesCollection(oBehaviourList) + End Function + + Public Overrides Function ConvertTo(context As ITypeDescriptorContext, culture As CultureInfo, value As Object, destinationType As Type) As Object + If IsNothing(value) Then + Return "" + Else + Return value.ToString() + End If + End Function +End Class diff --git a/app/DD_PM_WINDREAM/DD_PM_WINDREAM.vbproj b/app/DD_PM_WINDREAM/DD_PM_WINDREAM.vbproj index aaa8a85..59d6ca9 100644 --- a/app/DD_PM_WINDREAM/DD_PM_WINDREAM.vbproj +++ b/app/DD_PM_WINDREAM/DD_PM_WINDREAM.vbproj @@ -220,6 +220,7 @@ + diff --git a/app/DD_PM_WINDREAM/ModuleFinalIndexProperties.vb b/app/DD_PM_WINDREAM/ModuleFinalIndexProperties.vb index 593e2df..6358fdb 100644 --- a/app/DD_PM_WINDREAM/ModuleFinalIndexProperties.vb +++ b/app/DD_PM_WINDREAM/ModuleFinalIndexProperties.vb @@ -65,7 +65,8 @@ Module ModuleFinalIndexProperties - + + Public Property VectorBehaviour As String @@ -77,6 +78,8 @@ Module ModuleFinalIndexProperties Public Property Indicies As List(Of String) Public Property IndiciesType As List(Of Integer) + + Public Property VectorBehaviourType As List(Of String) Public Sub VectorIndexBooleanProvider(attrs As PropertyAttributes) MaybeSetReadOnlyIfNotVectorIndex(attrs) @@ -107,6 +110,10 @@ Module ModuleFinalIndexProperties MaybeSetReadOnlyIfSQLHasNoValue(attrs) End Sub + Public Sub VectorIndexOnlyProvider(attrs As PropertyAttributes) + MaybeSetBrowsable(attrs, {ClassFinalIndex.INDEX_TYPE_VECTOR_STRING}) + End Sub + Public Sub MaybeSetReadOnlyIfSQLHasNoValue(attrs As PropertyAttributes) Dim hasSQLValue As Boolean = (SQLCommand.Value <> String.Empty) diff --git a/app/DD_PM_WINDREAM/frmAdministration.resx b/app/DD_PM_WINDREAM/frmAdministration.resx index 0f56975..7632de4 100644 --- a/app/DD_PM_WINDREAM/frmAdministration.resx +++ b/app/DD_PM_WINDREAM/frmAdministration.resx @@ -2812,7 +2812,7 @@ der Wertänderungen nutzen wollen: Neu hinzufügen - 127, 24 + 128, 24 von {0} finalen Indexen @@ -2978,7 +2978,7 @@ der Wertänderungen nutzen wollen: 9, 133 - 798, 27 + 679, 27 92 diff --git a/app/DD_PM_WINDREAM/frmAdministration.vb b/app/DD_PM_WINDREAM/frmAdministration.vb index b836f1d..9a101f9 100644 --- a/app/DD_PM_WINDREAM/frmAdministration.vb +++ b/app/DD_PM_WINDREAM/frmAdministration.vb @@ -952,7 +952,7 @@ Public Class frmAdministration Dim description As String = NotNull(focusedRow.Item("DESCRIPTION"), "") Dim preventDuplicates As Boolean = NotNull(focusedRow.Item("PREVENT_DUPLICATES"), False) Dim allowNewValues As Boolean = NotNull(focusedRow.Item("ALLOW_NEW_VALUES"), False) - Dim VectorBehaviour As String = NotNull(focusedRow.Item("IF_VEKTOR_BEHAVIOUR"), False) + Dim VectorBehaviour As String = NotNull(focusedRow.Item("IF_VEKTOR_BEHAVIOUR"), "Add") CURRENT_INDEX_ID = guid @@ -1003,6 +1003,10 @@ Public Class frmAdministration obj.Indicies = Windream_Indicies obj.IndiciesType = Windream_Indicies_Types obj.IndexName = index + obj.VectorBehaviourType = New List(Of String) From { + "Add", + "Overwrite" + } If Not index Is Nothing Then Dim indexType As Integer = ClassFinalIndex.GetIndexType(index, Windream_Indicies, Windream_Indicies_Types) @@ -1168,13 +1172,4 @@ Public Class frmAdministration LOGGER.Error(ex) End Try End Sub - - - 'Private Sub viewFinalIndex_ValidateRow(sender As Object, e As Views.Base.ValidateRowEventArgs) Handles viewFinalIndex.ValidateRow - ' Dim rowView As DataRowView = e.Row - - ' If rowView.IsNew Then - ' Dim props As FinalIndexProperties = PropertyGrid1.SelectedObject - ' End If - 'End Sub End Class \ No newline at end of file