add vectorbehaviour property
This commit is contained in:
parent
c8eab919ef
commit
a2268dc7fa
@ -46,12 +46,6 @@
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
Return value
|
Return value
|
||||||
|
|
||||||
'If isVector Then
|
|
||||||
' Return $"{PREFIX_VECTOR}{value}"
|
|
||||||
'Else
|
|
||||||
' Return value
|
|
||||||
'End If
|
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
LOGGER.Error(ex)
|
LOGGER.Error(ex)
|
||||||
MsgBox($"Error in GetValue: {ex.Message}", MsgBoxStyle.Critical)
|
MsgBox($"Error in GetValue: {ex.Message}", MsgBoxStyle.Critical)
|
||||||
|
|||||||
23
app/DD_PM_WINDREAM/ClassVectorBehaviourListConverter.vb
Normal file
23
app/DD_PM_WINDREAM/ClassVectorBehaviourListConverter.vb
Normal file
@ -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
|
||||||
@ -220,6 +220,7 @@
|
|||||||
<Compile Include="ClassSQLTypeConverter.vb" />
|
<Compile Include="ClassSQLTypeConverter.vb" />
|
||||||
<Compile Include="ClassSQLValue.vb" />
|
<Compile Include="ClassSQLValue.vb" />
|
||||||
<Compile Include="ClassUser.vb" />
|
<Compile Include="ClassUser.vb" />
|
||||||
|
<Compile Include="ClassVectorBehaviourListConverter.vb" />
|
||||||
<Compile Include="ClassWorkDoc.vb" />
|
<Compile Include="ClassWorkDoc.vb" />
|
||||||
<Compile Include="clsPatterns.vb" />
|
<Compile Include="clsPatterns.vb" />
|
||||||
<Compile Include="clsWMDocGrid.vb" />
|
<Compile Include="clsWMDocGrid.vb" />
|
||||||
|
|||||||
@ -65,7 +65,8 @@ Module ModuleFinalIndexProperties
|
|||||||
|
|
||||||
<Category("Index")>
|
<Category("Index")>
|
||||||
<DisplayName("IndexBehaviour")>
|
<DisplayName("IndexBehaviour")>
|
||||||
<PropertyAttributesProvider("IndexTypeStringProvider")>
|
<TypeConverter(GetType(ClassVectorBehaviourListConverter))>
|
||||||
|
<PropertyAttributesProvider("VectorIndexOnlyProvider")>
|
||||||
Public Property VectorBehaviour As String
|
Public Property VectorBehaviour As String
|
||||||
|
|
||||||
<Category("Index")>
|
<Category("Index")>
|
||||||
@ -77,6 +78,8 @@ Module ModuleFinalIndexProperties
|
|||||||
Public Property Indicies As List(Of String)
|
Public Property Indicies As List(Of String)
|
||||||
<Browsable(False)>
|
<Browsable(False)>
|
||||||
Public Property IndiciesType As List(Of Integer)
|
Public Property IndiciesType As List(Of Integer)
|
||||||
|
<Browsable(False)>
|
||||||
|
Public Property VectorBehaviourType As List(Of String)
|
||||||
|
|
||||||
Public Sub VectorIndexBooleanProvider(attrs As PropertyAttributes)
|
Public Sub VectorIndexBooleanProvider(attrs As PropertyAttributes)
|
||||||
MaybeSetReadOnlyIfNotVectorIndex(attrs)
|
MaybeSetReadOnlyIfNotVectorIndex(attrs)
|
||||||
@ -107,6 +110,10 @@ Module ModuleFinalIndexProperties
|
|||||||
MaybeSetReadOnlyIfSQLHasNoValue(attrs)
|
MaybeSetReadOnlyIfSQLHasNoValue(attrs)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Public Sub VectorIndexOnlyProvider(attrs As PropertyAttributes)
|
||||||
|
MaybeSetBrowsable(attrs, {ClassFinalIndex.INDEX_TYPE_VECTOR_STRING})
|
||||||
|
End Sub
|
||||||
|
|
||||||
Public Sub MaybeSetReadOnlyIfSQLHasNoValue(attrs As PropertyAttributes)
|
Public Sub MaybeSetReadOnlyIfSQLHasNoValue(attrs As PropertyAttributes)
|
||||||
Dim hasSQLValue As Boolean = (SQLCommand.Value <> String.Empty)
|
Dim hasSQLValue As Boolean = (SQLCommand.Value <> String.Empty)
|
||||||
|
|
||||||
|
|||||||
@ -2812,7 +2812,7 @@ der Wertänderungen nutzen wollen:</value>
|
|||||||
<value>Neu hinzufügen</value>
|
<value>Neu hinzufügen</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="BindingNavigatorCountItem1.Size" type="System.Drawing.Size, System.Drawing">
|
<data name="BindingNavigatorCountItem1.Size" type="System.Drawing.Size, System.Drawing">
|
||||||
<value>127, 24</value>
|
<value>128, 24</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="BindingNavigatorCountItem1.Text" xml:space="preserve">
|
<data name="BindingNavigatorCountItem1.Text" xml:space="preserve">
|
||||||
<value>von {0} finalen Indexen</value>
|
<value>von {0} finalen Indexen</value>
|
||||||
@ -2978,7 +2978,7 @@ der Wertänderungen nutzen wollen:</value>
|
|||||||
<value>9, 133</value>
|
<value>9, 133</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="BindingNavigator1.Size" type="System.Drawing.Size, System.Drawing">
|
<data name="BindingNavigator1.Size" type="System.Drawing.Size, System.Drawing">
|
||||||
<value>798, 27</value>
|
<value>679, 27</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="BindingNavigator1.TabIndex" type="System.Int32, mscorlib">
|
<data name="BindingNavigator1.TabIndex" type="System.Int32, mscorlib">
|
||||||
<value>92</value>
|
<value>92</value>
|
||||||
|
|||||||
@ -952,7 +952,7 @@ Public Class frmAdministration
|
|||||||
Dim description As String = NotNull(focusedRow.Item("DESCRIPTION"), "")
|
Dim description As String = NotNull(focusedRow.Item("DESCRIPTION"), "")
|
||||||
Dim preventDuplicates As Boolean = NotNull(focusedRow.Item("PREVENT_DUPLICATES"), False)
|
Dim preventDuplicates As Boolean = NotNull(focusedRow.Item("PREVENT_DUPLICATES"), False)
|
||||||
Dim allowNewValues As Boolean = NotNull(focusedRow.Item("ALLOW_NEW_VALUES"), 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
|
CURRENT_INDEX_ID = guid
|
||||||
@ -1003,6 +1003,10 @@ Public Class frmAdministration
|
|||||||
obj.Indicies = Windream_Indicies
|
obj.Indicies = Windream_Indicies
|
||||||
obj.IndiciesType = Windream_Indicies_Types
|
obj.IndiciesType = Windream_Indicies_Types
|
||||||
obj.IndexName = index
|
obj.IndexName = index
|
||||||
|
obj.VectorBehaviourType = New List(Of String) From {
|
||||||
|
"Add",
|
||||||
|
"Overwrite"
|
||||||
|
}
|
||||||
|
|
||||||
If Not index Is Nothing Then
|
If Not index Is Nothing Then
|
||||||
Dim indexType As Integer = ClassFinalIndex.GetIndexType(index, Windream_Indicies, Windream_Indicies_Types)
|
Dim indexType As Integer = ClassFinalIndex.GetIndexType(index, Windream_Indicies, Windream_Indicies_Types)
|
||||||
@ -1168,13 +1172,4 @@ Public Class frmAdministration
|
|||||||
LOGGER.Error(ex)
|
LOGGER.Error(ex)
|
||||||
End Try
|
End Try
|
||||||
End Sub
|
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
|
End Class
|
||||||
Loading…
x
Reference in New Issue
Block a user