-piccola modifica a lista utensili parametri generali
This commit is contained in:
@@ -31,8 +31,7 @@
|
||||
</Grid.ColumnDefinitions>
|
||||
<OPTIMIZER:ProjectParametersV Grid.RowSpan="2"
|
||||
Margin="0,10,0,0"
|
||||
Tag="{Binding GeneralParametersList}"
|
||||
IsEnabled="{Binding GeneralParametersIsEnable}"/>
|
||||
Tag="{Binding GeneralParametersList}"/>
|
||||
<UniformGrid Grid.Column="1"
|
||||
Columns="2"
|
||||
Style="{StaticResource BTLDataWnd_UniformGrid}">
|
||||
|
||||
@@ -58,17 +58,6 @@ Public Class BTLDataWndVM
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_GeneralParametersIsEnable As Boolean = False
|
||||
Public ReadOnly Property GeneralParametersIsEnable As Boolean
|
||||
Get
|
||||
Return m_GeneralParametersIsEnable
|
||||
End Get
|
||||
End Property
|
||||
Friend Sub SetGeneralParametersIsEnable(value As Boolean)
|
||||
m_GeneralParametersIsEnable = value
|
||||
NotifyPropertyChanged(NameOf(GeneralParametersIsEnable))
|
||||
End Sub
|
||||
|
||||
Private m_IsBTLDataWnd As Boolean = False
|
||||
Public ReadOnly Property IsBTLDataWnd As Boolean
|
||||
Get
|
||||
@@ -657,25 +646,20 @@ Public Class BTLDataWndVM
|
||||
For Each GeneralParameter In m_GeneralParametersList
|
||||
Select Case GeneralParameter.GetType()
|
||||
Case GetType(BooleanGenericParameter)
|
||||
SetGeneralParametersIsEnable(True)
|
||||
Dim sTmpBoolValue As Boolean = DirectCast(GeneralParameter, BooleanGenericParameter).bValue
|
||||
If EgtExistsInfo(m_nBTLInfoLayerId, GeneralParameter.sNameNge) Then
|
||||
EgtGetInfo(m_nBTLInfoLayerId, GeneralParameter.sNameNge, DirectCast(GeneralParameter, BooleanGenericParameter).bValue)
|
||||
Else
|
||||
DirectCast(GeneralParameter, BooleanGenericParameter).bValue = sTmpBoolValue
|
||||
SetGeneralParametersIsEnable(False)
|
||||
End If
|
||||
Case GetType(DoubleGenericParameter)
|
||||
SetGeneralParametersIsEnable(True)
|
||||
Dim sTmpDoubleValue As String = DirectCast(GeneralParameter, DoubleGenericParameter).sValue
|
||||
If EgtExistsInfo(m_nBTLInfoLayerId, GeneralParameter.sNameNge) Then
|
||||
EgtGetInfo(m_nBTLInfoLayerId, GeneralParameter.sNameNge, DirectCast(GeneralParameter, DoubleGenericParameter).sValue)
|
||||
Else
|
||||
DirectCast(GeneralParameter, DoubleGenericParameter).sValue = sTmpDoubleValue
|
||||
SetGeneralParametersIsEnable(False)
|
||||
End If
|
||||
Case GetType(ComboGenericParameter)
|
||||
SetGeneralParametersIsEnable(True)
|
||||
Dim sTmpComboValue As String = DirectCast(GeneralParameter, ComboGenericParameter).SelValue.sValue
|
||||
Dim sTmpValueInfo As String = String.Empty
|
||||
If EgtExistsInfo(m_nBTLInfoLayerId, GeneralParameter.sNameNge) Then
|
||||
@@ -683,28 +667,22 @@ Public Class BTLDataWndVM
|
||||
DirectCast(GeneralParameter, ComboGenericParameter).SelValue = DirectCast(GeneralParameter, ComboGenericParameter).ComboList.FirstOrDefault(Function(x) x.sValue = sTmpValueInfo)
|
||||
Else
|
||||
DirectCast(GeneralParameter, ComboGenericParameter).SelValue.sValue = sTmpComboValue
|
||||
SetGeneralParametersIsEnable(False)
|
||||
End If
|
||||
Case GetType(StringGenericParameter)
|
||||
SetGeneralParametersIsEnable(True)
|
||||
Dim sTmpStringValue As String = DirectCast(GeneralParameter, StringGenericParameter).sValue
|
||||
If EgtExistsInfo(m_nBTLInfoLayerId, GeneralParameter.sNameNge) Then
|
||||
EgtGetInfo(m_nBTLInfoLayerId, GeneralParameter.sNameNge, DirectCast(GeneralParameter, StringGenericParameter).sValue)
|
||||
Else
|
||||
DirectCast(GeneralParameter, StringGenericParameter).sValue = sTmpStringValue
|
||||
SetGeneralParametersIsEnable(False)
|
||||
End If
|
||||
Case GetType(ListGenericParameter)
|
||||
SetGeneralParametersIsEnable(True)
|
||||
For Each Item As ToolParameter In DirectCast(GeneralParameter, ListGenericParameter).ListValue
|
||||
If Item.bIsActive Then
|
||||
sInfo &= Item.sUUID & "," & Item.sName & ";"
|
||||
Dim sTmpInfo As String = sInfo
|
||||
If EgtExistsInfo(m_nBTLInfoLayerId, GeneralParameter.sNameNge) Then
|
||||
EgtGetInfo(m_nBTLInfoLayerId, GeneralParameter.sNameNge, sInfo)
|
||||
EgtGetInfo(m_nBTLInfoLayerId, GeneralParameter.sNameNge, DirectCast(GeneralParameter, ListGenericParameter).sValue)
|
||||
Else
|
||||
sInfo = sTmpInfo
|
||||
SetGeneralParametersIsEnable(False)
|
||||
DirectCast(GeneralParameter, ListGenericParameter).sValue = sInfo
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
@@ -744,25 +722,20 @@ Public Class BTLDataWndVM
|
||||
For Each GeneralParameter In m_GeneralParametersList
|
||||
Select Case GeneralParameter.GetType()
|
||||
Case GetType(BooleanGenericParameter)
|
||||
SetGeneralParametersIsEnable(True)
|
||||
Dim sTmpBoolValue As Boolean = DirectCast(GeneralParameter, BooleanGenericParameter).bValue
|
||||
If EgtExistsInfo(m_nBTLInfoLayerId, GeneralParameter.sNameNge) Then
|
||||
EgtGetInfo(m_nBTLInfoLayerId, GeneralParameter.sNameNge, DirectCast(GeneralParameter, BooleanGenericParameter).bValue)
|
||||
Else
|
||||
DirectCast(GeneralParameter, BooleanGenericParameter).bValue = sTmpBoolValue
|
||||
SetGeneralParametersIsEnable(False)
|
||||
End If
|
||||
Case GetType(DoubleGenericParameter)
|
||||
SetGeneralParametersIsEnable(True)
|
||||
Dim sTmpDoubleValue As String = DirectCast(GeneralParameter, DoubleGenericParameter).sValue
|
||||
If EgtExistsInfo(m_nBTLInfoLayerId, GeneralParameter.sNameNge) Then
|
||||
EgtGetInfo(m_nBTLInfoLayerId, GeneralParameter.sNameNge, DirectCast(GeneralParameter, DoubleGenericParameter).sValue)
|
||||
Else
|
||||
DirectCast(GeneralParameter, DoubleGenericParameter).sValue = sTmpDoubleValue
|
||||
SetGeneralParametersIsEnable(False)
|
||||
End If
|
||||
Case GetType(ComboGenericParameter)
|
||||
SetGeneralParametersIsEnable(True)
|
||||
Dim sTmpComboValue As String = DirectCast(GeneralParameter, ComboGenericParameter).SelValue.sValue
|
||||
Dim sTmpValueInfo As String = String.Empty
|
||||
If EgtExistsInfo(m_nBTLInfoLayerId, GeneralParameter.sNameNge) Then
|
||||
@@ -770,28 +743,22 @@ Public Class BTLDataWndVM
|
||||
Else
|
||||
DirectCast(GeneralParameter, ComboGenericParameter).SelValue = DirectCast(GeneralParameter, ComboGenericParameter).ComboList.FirstOrDefault(Function(x) x.sValue = sTmpValueInfo)
|
||||
DirectCast(GeneralParameter, ComboGenericParameter).SelValue.sValue = sTmpComboValue
|
||||
SetGeneralParametersIsEnable(False)
|
||||
End If
|
||||
Case GetType(StringGenericParameter)
|
||||
SetGeneralParametersIsEnable(True)
|
||||
Dim sTmpStringValue As String = DirectCast(GeneralParameter, StringGenericParameter).sValue
|
||||
If EgtExistsInfo(m_nBTLInfoLayerId, GeneralParameter.sNameNge) Then
|
||||
EgtGetInfo(m_nBTLInfoLayerId, GeneralParameter.sNameNge, DirectCast(GeneralParameter, StringGenericParameter).sValue)
|
||||
Else
|
||||
DirectCast(GeneralParameter, StringGenericParameter).sValue = sTmpStringValue
|
||||
SetGeneralParametersIsEnable(False)
|
||||
End If
|
||||
Case GetType(ListGenericParameter)
|
||||
SetGeneralParametersIsEnable(True)
|
||||
For Each Item As ToolParameter In DirectCast(GeneralParameter, ListGenericParameter).ListValue
|
||||
If Item.bIsActive Then
|
||||
sInfo &= Item.sUUID & "," & Item.sName & ";"
|
||||
Dim sTmpInfo As String = sInfo
|
||||
If EgtExistsInfo(m_nBTLInfoLayerId, GeneralParameter.sNameNge) Then
|
||||
EgtGetInfo(m_nBTLInfoLayerId, GeneralParameter.sNameNge, sInfo)
|
||||
EgtGetInfo(m_nBTLInfoLayerId, GeneralParameter.sNameNge, DirectCast(GeneralParameter, ListGenericParameter).sValue)
|
||||
Else
|
||||
sInfo = sTmpInfo
|
||||
SetGeneralParametersIsEnable(False)
|
||||
DirectCast(GeneralParameter, ListGenericParameter).sValue = sInfo
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
|
||||
@@ -757,13 +757,12 @@ Public Class ProjectVM
|
||||
For Each Item As ToolParameter In DirectCast(GeneralParameter, ListGenericParameter).ListValue
|
||||
If Item.bIsActive Then
|
||||
sInfo &= Item.sUUID & "," & Item.sName & ";"
|
||||
Dim sTmpInfo As String = sInfo
|
||||
If EgtExistsInfo(m_BTLStructureVM.SelBTLPart.BTLPartM.nPartId, GeneralParameter.sNameNge) Then
|
||||
SetGeneralParametersIsEnable(True)
|
||||
SetbSaveGeneralParameters(True)
|
||||
EgtGetInfo(m_BTLStructureVM.SelBTLPart.BTLPartM.nPartId, GeneralParameter.sNameNge, sInfo)
|
||||
EgtGetInfo(m_BTLStructureVM.SelBTLPart.BTLPartM.nPartId, GeneralParameter.sNameNge, DirectCast(GeneralParameter, ListGenericParameter).sValue)
|
||||
Else
|
||||
sInfo = sTmpInfo
|
||||
DirectCast(GeneralParameter, ListGenericParameter).sValue = sInfo
|
||||
SetGeneralParametersIsEnable(False)
|
||||
SetbSaveGeneralParameters(False)
|
||||
End If
|
||||
@@ -874,13 +873,12 @@ Public Class ProjectVM
|
||||
For Each Item As ToolParameter In DirectCast(GeneralParameter, ListGenericParameter).ListValue
|
||||
If Item.bIsActive Then
|
||||
sInfo &= Item.sUUID & "," & Item.sName & ";"
|
||||
Dim sTmpInfo As String = sInfo
|
||||
If EgtExistsInfo(m_BTLStructureVM.SelBTLPart.BTLPartM.nPartId, GeneralParameter.sNameNge) Then
|
||||
SetGeneralParametersIsEnable(True)
|
||||
SetbSaveGeneralParameters(True)
|
||||
EgtGetInfo(m_BTLStructureVM.SelBTLPart.BTLPartM.nPartId, GeneralParameter.sNameNge, sInfo)
|
||||
EgtGetInfo(m_BTLStructureVM.SelBTLPart.BTLPartM.nPartId, GeneralParameter.sNameNge, DirectCast(GeneralParameter, ListGenericParameter).sValue)
|
||||
Else
|
||||
sInfo = sTmpInfo
|
||||
DirectCast(GeneralParameter, ListGenericParameter).sValue = sInfo
|
||||
SetGeneralParametersIsEnable(False)
|
||||
SetbSaveGeneralParameters(False)
|
||||
End If
|
||||
@@ -1009,13 +1007,12 @@ Public Class ProjectVM
|
||||
For Each Item As ToolParameter In DirectCast(GeneralParameter, ListGenericParameter).ListValue
|
||||
If Item.bIsActive Then
|
||||
sInfo &= Item.sUUID & "," & Item.sName & ";"
|
||||
Dim sTmpInfo As String = sInfo
|
||||
If EgtExistsInfo(m_BTLStructureVM.SelBTLPart.BTLPartM.nPartId, GeneralParameter.sNameNge) Then
|
||||
SetbSaveGeneralParameters(True)
|
||||
SetGeneralParametersIsEnable(True)
|
||||
EgtGetInfo(m_BTLStructureVM.SelBTLPart.BTLPartM.nPartId, GeneralParameter.sNameNge, sInfo)
|
||||
EgtGetInfo(m_BTLStructureVM.SelBTLPart.BTLPartM.nPartId, GeneralParameter.sNameNge, DirectCast(GeneralParameter, ListGenericParameter).sValue)
|
||||
Else
|
||||
sInfo = sTmpInfo
|
||||
DirectCast(GeneralParameter, ListGenericParameter).sValue = sInfo
|
||||
SetbSaveGeneralParameters(False)
|
||||
SetGeneralParametersIsEnable(False)
|
||||
End If
|
||||
|
||||
Reference in New Issue
Block a user