-migliorata gestione parametri generali

This commit is contained in:
Demetrio Cassarino
2025-10-13 15:07:27 +02:00
parent ca9d376928
commit c67b31c17b
19 changed files with 518 additions and 135 deletions
@@ -24,12 +24,30 @@
<ComboBox ItemsSource="{Binding StrategySetupList}"
SelectedItem="{Binding SelStrategySetup, UpdateSourceTrigger=PropertyChanged}"
Style="{StaticResource Strategy_ComboBox}" />
<CheckBox IsChecked="{Binding bSaveGeneralParameters, UpdateSourceTrigger=PropertyChanged}" Margin="10,0,0,0"
Style="{StaticResource OnlyProdFeatureInPartInRawPartList_CheckBox}"/>
</StackPanel>
<EgtBEAMWALL:ProjectParametersV Grid.Row="1" Margin="0,10,0,0"
Tag="{Binding GeneralParametersList}"
IsEnabled="{Binding GeneralParametersIsEnable}"/>
<Grid Grid.Row="1">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<EgtBEAMWALL:ProjectParametersV Grid.RowSpan="2" Margin="0,10,0,0"
Tag="{Binding GeneralParametersList}"
IsEnabled="{Binding GeneralParametersIsEnable}"/>
<UniformGrid Rows="2" Grid.Column="1" Margin="0,0,5,0">
<CheckBox IsChecked="{Binding bSaveGeneralParameters, UpdateSourceTrigger=PropertyChanged}"
Margin="10,10,0,0" VerticalAlignment="Top" HorizontalAlignment="Center"
Style="{StaticResource OnlyProdFeatureInPartInRawPartList_CheckBox}"/>
<Button Command="{Binding Ok_Command}" VerticalAlignment="Bottom" Margin="0,0,0,5"
ToolTip="{Binding SaveAsToolTip}"
Style="{StaticResource SaveStrategy_Button}">
<Image Source="/Resources/NewPage/Ok.png" Stretch="Uniform"/>
</Button>
</UniformGrid>
</Grid>
</Grid>
</TabItem>
<TabItem Header="BTL">
+116 -36
View File
@@ -63,30 +63,8 @@ Public Class BTLDataWndVM
End Get
Set(value As Boolean)
m_bSaveGeneralParameters = value
WriteMainPrivateProfileString(S_STRATEGY, "ForceGeneralParameters", If(m_bSaveGeneralParameters, 1, 0))
If m_bSaveGeneralParameters Then
SetGeneralParametersIsEnable(True)
Dim sInfo As String = String.Empty
For Each GeneralParameter In GeneralParametersList
Select Case GeneralParameter.GetType()
Case GetType(BooleanGenericParameter)
EgtSetInfo(m_nBTLInfoLayerId, GeneralParameter.sNameNge, DirectCast(GeneralParameter, BooleanGenericParameter).bValue)
Case GetType(DoubleGenericParameter)
EgtSetInfo(m_nBTLInfoLayerId, GeneralParameter.sNameNge, DirectCast(GeneralParameter, DoubleGenericParameter).sValue)
Case GetType(ComboGenericParameter)
EgtSetInfo(m_nBTLInfoLayerId, GeneralParameter.sNameNge, DirectCast(GeneralParameter, ComboGenericParameter).SelValue.sValue)
Case GetType(StringGenericParameter)
EgtSetInfo(m_nBTLInfoLayerId, GeneralParameter.sNameNge, DirectCast(GeneralParameter, StringGenericParameter).sValue)
Case GetType(ListGenericParameter)
For Each Item As ToolParameter In DirectCast(GeneralParameter, ListGenericParameter).ListValue
If Item.bIsActive Then
sInfo &= Item.sUUID & "," & Item.sName & ";"
EgtSetInfo(m_nBTLInfoLayerId, GeneralParameter.sNameNge, sInfo)
End If
Next
End Select
Next
Map.refOnlyProdManagerVM.Save()
Else
SetGeneralParametersIsEnable(False)
Dim sStrategiesDirPath As String = Map.refMainWindowVM.MainWindowM.GetStrategiesDirPath(Map.refStrategyManagerVM.SelStrategyType.Id)
@@ -96,23 +74,15 @@ Public Class BTLDataWndVM
Dim JsonGeneralParametersList As List(Of JsonGeneralParameters) = JsonConvert.DeserializeObject(Of List(Of JsonGeneralParameters))(sReadedFiles)
m_GeneralParametersList = New ObservableCollection(Of ProjectParameters)((From JsonGeneralParameter In JsonGeneralParametersList
Select JsonGeneralParameter.Deserialize(Map.refStrategyManagerVM.SelStrategyType.Id)).ToList())
For Each GenericItem As ProjectParameters In m_GeneralParametersList
Select Case GenericItem.sMinUserLevel
Case UserLevel.ADVANCED
Map.refMainMenuVM.UserLevelGenericVisibility(GenericItem, If(Map.refMainMenuVM.UserAdmin_IsChecked, Visibility.Visible, Visibility.Collapsed))
Case Else
If Not Map.refMainMenuVM.UserAdmin_IsChecked Then
Map.refMainMenuVM.UserLevelGenericVisibility(GenericItem, If(GenericItem.sMinUserLevel = UserLevel.USER, Visibility.Visible, Visibility.Collapsed))
Map.refMainMenuVM.SetUnloackImage("pack://application:,,,/Resources/NewPage/padlock.png")
End If
End Select
Next
NotifyPropertyChanged(NameOf(GeneralParametersList))
End If
End If
NotifyPropertyChanged(NameOf(bSaveGeneralParameters))
End Set
End Property
Friend Sub SetbSaveGeneralParameters(value As Boolean)
m_bSaveGeneralParameters = value
NotifyPropertyChanged(NameOf(bSaveGeneralParameters))
End Sub
Private m_GeneralParametersIsEnable As Boolean = False
Public ReadOnly Property GeneralParametersIsEnable As Boolean
@@ -637,8 +607,74 @@ Public Class BTLDataWndVM
m_SelStrategySetup = sTrimDefaultConfig
EgtSetInfo(m_nBTLInfoLayerId, "AISETUP", m_SelStrategySetup)
End If
m_bSaveGeneralParameters = GetMainPrivateProfileInt(S_STRATEGY, "ForceGeneralParameters", 0) <> 0
m_GeneralParametersList = Map.refOnlyProdManagerVM.GeneralParametersStrategyVM.GeneralParametersList
Dim sStrategiesDirPath As String = Map.refMainWindowVM.MainWindowM.GetStrategiesDirPath(Map.refStrategyManagerVM.SelStrategyType.Id)
Dim sGeneralParametersFilePath As String = sStrategiesDirPath & "\" & GENERALPARAMETERS_FILE & ".json"
If File.Exists(sGeneralParametersFilePath) Then
Dim sReadedFiles As String = File.ReadAllText(sGeneralParametersFilePath)
Dim JsonGeneralParametersList As List(Of JsonGeneralParameters) = JsonConvert.DeserializeObject(Of List(Of JsonGeneralParameters))(sReadedFiles)
m_GeneralParametersList = New ObservableCollection(Of ProjectParameters)((From JsonGeneralParameter In JsonGeneralParametersList
Select JsonGeneralParameter.Deserialize(Map.refStrategyManagerVM.SelStrategyType.Id)).ToList())
For Each GenericItem As ProjectParameters In m_GeneralParametersList
Select Case GenericItem.sMinUserLevel
Case UserLevel.ADVANCED
Map.refMainMenuVM.UserLevelGenericVisibility(GenericItem, If(Map.refMainMenuVM.UserAdmin_IsChecked, Visibility.Visible, Visibility.Collapsed))
Case Else
If Not Map.refMainMenuVM.UserAdmin_IsChecked Then
Map.refMainMenuVM.UserLevelGenericVisibility(GenericItem, If(GenericItem.sMinUserLevel = UserLevel.USER, Visibility.Visible, Visibility.Collapsed))
Map.refMainMenuVM.SetUnloackImage("pack://application:,,,/Resources/NewPage/padlock.png")
End If
End Select
Next
NotifyPropertyChanged(NameOf(GeneralParametersList))
End If
' Leggo info se presenti
Dim sInfo As String = String.Empty
For Each GeneralParameter In m_GeneralParametersList
Select Case GeneralParameter.GetType()
Case GetType(BooleanGenericParameter)
SetbSaveGeneralParameters(True)
Dim sTmpBoolValue As Boolean = DirectCast(GeneralParameter, BooleanGenericParameter).bValue
If Not EgtGetInfo(m_nBTLInfoLayerId, GeneralParameter.sNameNge, DirectCast(GeneralParameter, BooleanGenericParameter).bValue) Then
DirectCast(GeneralParameter, BooleanGenericParameter).bValue = sTmpBoolValue
Return
End If
Case GetType(DoubleGenericParameter)
SetbSaveGeneralParameters(True)
Dim sTmpDoubleValue As String = DirectCast(GeneralParameter, DoubleGenericParameter).sValue
If Not EgtGetInfo(m_nBTLInfoLayerId, GeneralParameter.sNameNge, DirectCast(GeneralParameter, DoubleGenericParameter).sValue) Then
DirectCast(GeneralParameter, DoubleGenericParameter).sValue = sTmpDoubleValue
Return
End If
Case GetType(ComboGenericParameter)
SetbSaveGeneralParameters(True)
Dim sTmpComboValue As String = DirectCast(GeneralParameter, ComboGenericParameter).SelValue.sValue
If Not EgtGetInfo(m_nBTLInfoLayerId, GeneralParameter.sNameNge, DirectCast(GeneralParameter, ComboGenericParameter).SelValue.sValue) Then
DirectCast(GeneralParameter, ComboGenericParameter).SelValue.sValue = sTmpComboValue
Return
End If
Case GetType(StringGenericParameter)
SetbSaveGeneralParameters(True)
Dim sTmpStringValue As String = DirectCast(GeneralParameter, StringGenericParameter).sValue
If Not EgtGetInfo(m_nBTLInfoLayerId, GeneralParameter.sNameNge, DirectCast(GeneralParameter, StringGenericParameter).sValue) Then
DirectCast(GeneralParameter, StringGenericParameter).sValue = sTmpStringValue
Return
End If
Case GetType(ListGenericParameter)
SetbSaveGeneralParameters(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 Not EgtGetInfo(m_nBTLInfoLayerId, GeneralParameter.sNameNge, sInfo) Then
sInfo = sTmpInfo
Return
End If
End If
Next
End Select
Next
End Sub
#End Region ' CONSTRUCTOR
@@ -696,6 +732,50 @@ Public Class BTLDataWndVM
If m_SelStrategySetup <> sOldStrategySetup Then
EgtSetInfo(m_nBTLInfoLayerId, "AISETUP", m_SelStrategySetup)
End If
Dim sInfo As String = String.Empty
If m_bSaveGeneralParameters Then
For Each GeneralParameter In GeneralParametersList
Select Case GeneralParameter.GetType()
Case GetType(BooleanGenericParameter)
EgtSetInfo(m_nBTLInfoLayerId, GeneralParameter.sNameNge, DirectCast(GeneralParameter, BooleanGenericParameter).bValue)
Case GetType(DoubleGenericParameter)
EgtSetInfo(m_nBTLInfoLayerId, GeneralParameter.sNameNge, DirectCast(GeneralParameter, DoubleGenericParameter).sValue)
Case GetType(ComboGenericParameter)
EgtSetInfo(m_nBTLInfoLayerId, GeneralParameter.sNameNge, DirectCast(GeneralParameter, ComboGenericParameter).SelValue.sValue)
Case GetType(StringGenericParameter)
EgtSetInfo(m_nBTLInfoLayerId, GeneralParameter.sNameNge, DirectCast(GeneralParameter, StringGenericParameter).sValue)
Case GetType(ListGenericParameter)
For Each Item As ToolParameter In DirectCast(GeneralParameter, ListGenericParameter).ListValue
If Item.bIsActive Then
sInfo &= Item.sUUID & "," & Item.sName & ";"
EgtSetInfo(m_nBTLInfoLayerId, GeneralParameter.sNameNge, sInfo)
End If
Next
End Select
Next
Else
For Each GeneralParameter In m_GeneralParametersList
Select Case GeneralParameter.GetType()
Case GetType(BooleanGenericParameter)
EgtRemoveInfo(m_nBTLInfoLayerId, GeneralParameter.sNameNge)
Case GetType(DoubleGenericParameter)
EgtRemoveInfo(m_nBTLInfoLayerId, GeneralParameter.sNameNge)
Case GetType(ComboGenericParameter)
EgtRemoveInfo(m_nBTLInfoLayerId, GeneralParameter.sNameNge)
Case GetType(StringGenericParameter)
EgtRemoveInfo(m_nBTLInfoLayerId, GeneralParameter.sNameNge)
Case GetType(ListGenericParameter)
For Each Item As ToolParameter In DirectCast(GeneralParameter, ListGenericParameter).ListValue
If Item.bIsActive Then
sInfo &= Item.sUUID & "," & Item.sName & ";"
EgtRemoveInfo(m_nBTLInfoLayerId, GeneralParameter.sNameNge)
End If
Next
End Select
Next
End If
Map.refOnlyProdManagerVM.Save()
RaiseEvent m_CloseWindow(True)
End Sub
@@ -1,7 +1,10 @@
Imports System.IO
Imports System.Collections.ObjectModel
Imports System.IO
Imports EgtBEAMWALL.Core
Imports EgtBEAMWALL.Optimizer.MainMenuVM
Imports EgtUILib
Imports EgtWPFLib5
Imports Newtonsoft.Json
Public Class BTLPartManagerVM
Inherits VMBase
@@ -173,6 +176,76 @@ Public Class BTLPartManagerVM
Map.refMyStatusBarVM.SetOutputMessage(sProgress)
End Sub
Private Sub GetGeneralParameters()
Dim sStrategiesDirPath As String = Map.refMainWindowVM.MainWindowM.GetStrategiesDirPath(Map.refStrategyManagerVM.SelStrategyType.Id)
Dim sGeneralParametersFilePath As String = sStrategiesDirPath & "\" & GENERALPARAMETERS_FILE & ".json"
If File.Exists(sGeneralParametersFilePath) Then
Dim sReadedFiles As String = File.ReadAllText(sGeneralParametersFilePath)
Dim JsonGeneralParametersList As List(Of JsonGeneralParameters) = JsonConvert.DeserializeObject(Of List(Of JsonGeneralParameters))(sReadedFiles)
Map.refProjectVM.GeneralParametersList = New ObservableCollection(Of ProjectParameters)((From JsonGeneralParameter In JsonGeneralParametersList
Select JsonGeneralParameter.Deserialize(Map.refStrategyManagerVM.SelStrategyType.Id)).ToList())
For Each GenericItem As ProjectParameters In Map.refProjectVM.GeneralParametersList
Select Case GenericItem.sMinUserLevel
Case UserLevel.ADVANCED
Map.refMainMenuVM.UserLevelGenericVisibility(GenericItem, If(Map.refMainMenuVM.UserAdmin_IsChecked, Visibility.Visible, Visibility.Collapsed))
Case Else
If Not Map.refMainMenuVM.UserAdmin_IsChecked Then
Map.refMainMenuVM.UserLevelGenericVisibility(GenericItem, If(GenericItem.sMinUserLevel = UserLevel.USER, Visibility.Visible, Visibility.Collapsed))
Map.refMainMenuVM.SetUnloackImage("pack://application:,,,/Resources/NewPage/padlock.png")
End If
End Select
Next
NotifyPropertyChanged(NameOf(Map.refProjectVM.GeneralParametersList))
End If
' Leggo info se presenti
Dim sInfo As String = String.Empty
For Each GeneralParameter In Map.refProjectVM.GeneralParametersList
Select Case GeneralParameter.GetType()
Case GetType(BooleanGenericParameter)
Map.refProjectVM.SetbSaveGeneralParameters(True)
Dim sTmpBoolValue As Boolean = DirectCast(GeneralParameter, BooleanGenericParameter).bValue
If Not EgtGetInfo(Map.refProjectVM.BTLStructureVM.SelBTLPart.BTLPartM.nPartId, GeneralParameter.sNameNge, DirectCast(GeneralParameter, BooleanGenericParameter).bValue) Then
DirectCast(GeneralParameter, BooleanGenericParameter).bValue = sTmpBoolValue
Return
End If
Case GetType(DoubleGenericParameter)
Map.refProjectVM.SetbSaveGeneralParameters(True)
Dim sTmpDoubleValue As String = DirectCast(GeneralParameter, DoubleGenericParameter).sValue
If Not EgtGetInfo(Map.refProjectVM.BTLStructureVM.SelBTLPart.BTLPartM.nPartId, GeneralParameter.sNameNge, DirectCast(GeneralParameter, DoubleGenericParameter).sValue) Then
DirectCast(GeneralParameter, DoubleGenericParameter).sValue = sTmpDoubleValue
Return
End If
Case GetType(ComboGenericParameter)
Map.refProjectVM.SetbSaveGeneralParameters(True)
Dim sTmpComboValue As String = DirectCast(GeneralParameter, ComboGenericParameter).SelValue.sValue
If Not EgtGetInfo(Map.refProjectVM.BTLStructureVM.SelBTLPart.BTLPartM.nPartId, GeneralParameter.sNameNge, DirectCast(GeneralParameter, ComboGenericParameter).SelValue.sValue) Then
DirectCast(GeneralParameter, ComboGenericParameter).SelValue.sValue = sTmpComboValue
Return
End If
Case GetType(StringGenericParameter)
Map.refProjectVM.SetbSaveGeneralParameters(True)
Dim sTmpStringValue As String = DirectCast(GeneralParameter, StringGenericParameter).sValue
If Not EgtGetInfo(Map.refProjectVM.BTLStructureVM.SelBTLPart.BTLPartM.nPartId, GeneralParameter.sNameNge, DirectCast(GeneralParameter, StringGenericParameter).sValue) Then
DirectCast(GeneralParameter, StringGenericParameter).sValue = sTmpStringValue
Return
End If
Case GetType(ListGenericParameter)
Map.refProjectVM.SetbSaveGeneralParameters(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 Not EgtGetInfo(Map.refProjectVM.BTLStructureVM.SelBTLPart.BTLPartM.nPartId, GeneralParameter.sNameNge, sInfo) Then
sInfo = sTmpInfo
Return
End If
End If
Next
End Select
Next
End Sub
#End Region ' Methods
#Region "COMMANDS"
@@ -330,7 +403,7 @@ Public Class BTLPartManagerVM
End Property
Friend Sub Edit()
Map.refProjectVM.GeneralParametersList = Map.refOnlyProdManagerVM.GeneralParametersStrategyVM.GeneralParametersList
GetGeneralParameters()
Map.refProjectVM.SetRawPartManagerVisibility(Visibility.Collapsed)
Map.refProjectVM.SetFeatureListVisibility(Visibility.Collapsed)
Map.refProjectVM.SetSelManagerTab(ProjectVM.StrategyManagerTab.FEATUREMANAGER)
@@ -995,7 +995,9 @@ Public Class BTLStructureVM
Dim bOn As Boolean = EgtBeamGetBuildingIsOn()
If bShow <> bOn Then
If bShow Then EgtBeamCalcAllSolids(True)
EgtBeamShowBuilding(bShow)
If Not bShow Then EgtBeamShowAllSolids(False)
End If
' ripristino precedente impostazione modificato
@@ -1,11 +1,14 @@
Imports System.Collections.ObjectModel
Imports System.ComponentModel
Imports System.Globalization
Imports System.IO
Imports System.Reflection
Imports System.Windows.Forms
Imports EgtBEAMWALL.Core
Imports EgtBEAMWALL.Optimizer.MainMenuVM
Imports EgtUILib
Imports EgtWPFLib5
Imports Newtonsoft.Json
Imports EgtBEAMWALL.Core
Imports System.ComponentModel
Public Class GeneralParametersStrategyVM
Inherits VMBase
@@ -67,6 +70,18 @@ Public Class GeneralParametersStrategyVM
m_GeneralParametersList = New ObservableCollection(Of ProjectParameters)((From JsonGeneralParameter In JsonGeneralParametersList
Select JsonGeneralParameter.Deserialize(Map.refStrategyManagerVM.SelStrategyType.Id)).ToList())
For Each GenericItem As ProjectParameters In m_GeneralParametersList
Select Case GenericItem.sMinUserLevel
Case UserLevel.ADVANCED
Map.refMainMenuVM.UserLevelGenericVisibility(GenericItem, If(Map.refMainMenuVM.UserAdmin_IsChecked, Visibility.Visible, Visibility.Collapsed))
Case Else
If Not Map.refMainMenuVM.UserAdmin_IsChecked Then
Map.refMainMenuVM.UserLevelGenericVisibility(GenericItem, If(GenericItem.sMinUserLevel = UserLevel.USER, Visibility.Visible, Visibility.Collapsed))
Map.refMainMenuVM.SetUnloackImage("pack://application:,,,/Resources/NewPage/padlock.png")
End If
End Select
Next
NotifyPropertyChanged(NameOf(GeneralParametersList))
End If
Dim sAISetupDirPath As String = Map.refMainWindowVM.MainWindowM.GetAISetupDirPath(Map.refStrategyManagerVM.SelStrategyType.Id, False)
@@ -1012,4 +1027,35 @@ Public Class ListGenericParameter
#End Region ' Commands
End Class
Class GroupVisibilityConverter
Implements IMultiValueConverter
Public Function Convert(values() As Object, targetType As Type, parameter As Object, culture As CultureInfo) As Object Implements IMultiValueConverter.Convert
Dim items = TryCast(values(0), ReadOnlyObservableCollection(Of Object))
If IsNothing(items) OrElse items.Count = 0 Then
Return Visibility.Collapsed
End If
For Each item In items
Dim prop As PropertyInfo = item.GetType().GetProperty("sMinUserLevel")
If Not IsNothing(prop) Then
Dim levelObj = prop.GetValue(item)
Dim level As Integer
If Not IsNothing(levelObj) AndAlso Integer.TryParse(levelObj.ToString(), level) AndAlso level <> 5 Then
Return Visibility.Visible
ElseIf Map.refMainMenuVM.UserAdmin_IsChecked Then
Return Visibility.Visible
End If
End If
Next
Return Visibility.Collapsed
End Function
Public Function ConvertBack(value As Object, targetTypes() As Type, parameter As Object, culture As CultureInfo) As Object() Implements IMultiValueConverter.ConvertBack
Throw New NotImplementedException()
End Function
End Class
@@ -14,14 +14,24 @@
Style="{StaticResource OnlyProd_EgtCustomWindow}">
<Grid Margin="10">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<EgtBEAMWALL:ProjectParametersV IsEnabled="{Binding GeneralParametersIsEnable}"/>
<CheckBox Grid.Column="1" IsChecked="{Binding bSaveGeneralParameters, UpdateSourceTrigger=PropertyChanged}" Margin="5,0,0,0"
VerticalAlignment="Top" HorizontalAlignment="Center"
Style="{StaticResource OnlyProdFeatureInPartInRawPartList_CheckBox}"/>
<EgtBEAMWALL:ProjectParametersV Grid.RowSpan="2" IsEnabled="{Binding GeneralParametersIsEnable}"/>
<UniformGrid Rows="2" Grid.Column="1" Margin="0,0,5,0">
<CheckBox IsChecked="{Binding bSaveGeneralParameters, UpdateSourceTrigger=PropertyChanged}"
VerticalAlignment="Top" HorizontalAlignment="Center" Margin="10,10,0,0"
Style="{StaticResource OnlyProdFeatureInPartInRawPartList_CheckBox}"/>
<Button Command="{Binding Ok_Command}" VerticalAlignment="Bottom" Margin="5,0,0,5"
ToolTip="{Binding SaveAsToolTip}"
Style="{StaticResource SaveStrategy_Button}">
<Image Source="/Resources/NewPage/Ok.png" Stretch="Uniform"/>
</Button>
</UniformGrid>
</Grid>
</EgtWPFLib5:EgtCustomWindow>
@@ -1,5 +1,6 @@
Imports System.Collections.ObjectModel
Imports System.IO
Imports System.Windows.Forms
Imports EgtBEAMWALL.Core
Imports EgtBEAMWALL.Optimizer.MainMenuVM
Imports EgtUILib
@@ -31,31 +32,9 @@ Public Class GeneralParametersWndVM
End Get
Set(value As Boolean)
m_bSaveGeneralParameters = value
WriteMainPrivateProfileString(S_STRATEGY, "ForceGeneralParameters", If(m_bSaveGeneralParameters, 1, 0))
Dim nBTLInfoLayerId As Integer = EgtGetFirstNameInGroup(GDB_ID.ROOT, PROJECTINFO)
'WriteMainPrivateProfileString(S_STRATEGY, "ForceProjectGeneralParameters", If(m_bSaveGeneralParameters, 1, 0))
If m_bSaveGeneralParameters Then
SetGeneralParametersIsEnable(True)
Dim sInfo As String = String.Empty
For Each GeneralParameter In GeneralParametersList
Select Case GeneralParameter.GetType()
Case GetType(BooleanGenericParameter)
EgtSetInfo(nBTLInfoLayerId, GeneralParameter.sNameNge, DirectCast(GeneralParameter, BooleanGenericParameter).bValue)
Case GetType(DoubleGenericParameter)
EgtSetInfo(nBTLInfoLayerId, GeneralParameter.sNameNge, DirectCast(GeneralParameter, DoubleGenericParameter).sValue)
Case GetType(ComboGenericParameter)
EgtSetInfo(nBTLInfoLayerId, GeneralParameter.sNameNge, DirectCast(GeneralParameter, ComboGenericParameter).SelValue.sValue)
Case GetType(StringGenericParameter)
EgtSetInfo(nBTLInfoLayerId, GeneralParameter.sNameNge, DirectCast(GeneralParameter, StringGenericParameter).sValue)
Case GetType(ListGenericParameter)
For Each Item As ToolParameter In DirectCast(GeneralParameter, ListGenericParameter).ListValue
If Item.bIsActive Then
sInfo &= Item.sUUID & "," & Item.sName & ";"
EgtSetInfo(nBTLInfoLayerId, GeneralParameter.sNameNge, sInfo)
End If
Next
End Select
Next
Map.refOnlyProdManagerVM.Save()
Else
SetGeneralParametersIsEnable(False)
Dim sStrategiesDirPath As String = Map.refMainWindowVM.MainWindowM.GetStrategiesDirPath(Map.refStrategyManagerVM.SelStrategyType.Id)
@@ -65,23 +44,15 @@ Public Class GeneralParametersWndVM
Dim JsonGeneralParametersList As List(Of JsonGeneralParameters) = JsonConvert.DeserializeObject(Of List(Of JsonGeneralParameters))(sReadedFiles)
m_GeneralParametersList = New ObservableCollection(Of ProjectParameters)((From JsonGeneralParameter In JsonGeneralParametersList
Select JsonGeneralParameter.Deserialize(Map.refStrategyManagerVM.SelStrategyType.Id)).ToList())
For Each GenericItem As ProjectParameters In m_GeneralParametersList
Select Case GenericItem.sMinUserLevel
Case UserLevel.ADVANCED
Map.refMainMenuVM.UserLevelGenericVisibility(GenericItem, If(Map.refMainMenuVM.UserAdmin_IsChecked, Visibility.Visible, Visibility.Collapsed))
Case Else
If Not Map.refMainMenuVM.UserAdmin_IsChecked Then
Map.refMainMenuVM.UserLevelGenericVisibility(GenericItem, If(GenericItem.sMinUserLevel = UserLevel.USER, Visibility.Visible, Visibility.Collapsed))
Map.refMainMenuVM.SetUnloackImage("pack://application:,,,/Resources/NewPage/padlock.png")
End If
End Select
Next
NotifyPropertyChanged(NameOf(GeneralParametersList))
End If
End If
NotifyPropertyChanged(NameOf(bSaveGeneralParameters))
End Set
End Property
Friend Sub SetbSaveGeneralParameters(value As Boolean)
m_bSaveGeneralParameters = value
NotifyPropertyChanged(NameOf(bSaveGeneralParameters))
End Sub
Private m_GeneralParametersIsEnable As Boolean = False
Public ReadOnly Property GeneralParametersIsEnable As Boolean
@@ -94,15 +65,150 @@ Public Class GeneralParametersWndVM
NotifyPropertyChanged(NameOf(GeneralParametersIsEnable))
End Sub
' Definizione Comandi
Private m_cmdOk_Command As ICommand
#End Region ' Fields & Properties
#Region "CONSTRUCTOR"
Sub New()
m_GeneralParametersList = Map.refOnlyProdManagerVM.GeneralParametersStrategyVM.GeneralParametersList
m_bSaveGeneralParameters = GetMainPrivateProfileInt(S_STRATEGY, "ForceGeneralParameters", 0) <> 0
Dim sStrategiesDirPath As String = Map.refMainWindowVM.MainWindowM.GetStrategiesDirPath(Map.refStrategyManagerVM.SelStrategyType.Id)
Dim sGeneralParametersFilePath As String = sStrategiesDirPath & "\" & GENERALPARAMETERS_FILE & ".json"
If File.Exists(sGeneralParametersFilePath) Then
Dim sReadedFiles As String = File.ReadAllText(sGeneralParametersFilePath)
Dim JsonGeneralParametersList As List(Of JsonGeneralParameters) = JsonConvert.DeserializeObject(Of List(Of JsonGeneralParameters))(sReadedFiles)
m_GeneralParametersList = New ObservableCollection(Of ProjectParameters)((From JsonGeneralParameter In JsonGeneralParametersList
Select JsonGeneralParameter.Deserialize(Map.refStrategyManagerVM.SelStrategyType.Id)).ToList())
For Each GenericItem As ProjectParameters In m_GeneralParametersList
Select Case GenericItem.sMinUserLevel
Case UserLevel.ADVANCED
Map.refMainMenuVM.UserLevelGenericVisibility(GenericItem, If(Map.refMainMenuVM.UserAdmin_IsChecked, Visibility.Visible, Visibility.Collapsed))
Case Else
If Not Map.refMainMenuVM.UserAdmin_IsChecked Then
Map.refMainMenuVM.UserLevelGenericVisibility(GenericItem, If(GenericItem.sMinUserLevel = UserLevel.USER, Visibility.Visible, Visibility.Collapsed))
Map.refMainMenuVM.SetUnloackImage("pack://application:,,,/Resources/NewPage/padlock.png")
End If
End Select
Next
NotifyPropertyChanged(NameOf(GeneralParametersList))
End If
' Leggo info se presenti
Dim nBTLInfoLayerId As Integer = EgtGetFirstNameInGroup(GDB_ID.ROOT, PROJECTINFO)
Dim sInfo As String = String.Empty
For Each GeneralParameter In m_GeneralParametersList
Select Case GeneralParameter.GetType()
Case GetType(BooleanGenericParameter)
SetbSaveGeneralParameters(True)
Dim sTmpBoolValue As Boolean = DirectCast(GeneralParameter, BooleanGenericParameter).bValue
If Not EgtGetInfo(nBTLInfoLayerId, GeneralParameter.sNameNge, DirectCast(GeneralParameter, BooleanGenericParameter).bValue) Then
DirectCast(GeneralParameter, BooleanGenericParameter).bValue = sTmpBoolValue
Return
End If
Case GetType(DoubleGenericParameter)
SetbSaveGeneralParameters(True)
Dim sTmpDoubleValue As String = DirectCast(GeneralParameter, DoubleGenericParameter).sValue
If Not EgtGetInfo(nBTLInfoLayerId, GeneralParameter.sNameNge, DirectCast(GeneralParameter, DoubleGenericParameter).sValue) Then
DirectCast(GeneralParameter, DoubleGenericParameter).sValue = sTmpDoubleValue
Return
End If
Case GetType(ComboGenericParameter)
SetbSaveGeneralParameters(True)
Dim sTmpComboValue As String = DirectCast(GeneralParameter, ComboGenericParameter).SelValue.sValue
If Not EgtGetInfo(nBTLInfoLayerId, GeneralParameter.sNameNge, DirectCast(GeneralParameter, ComboGenericParameter).SelValue.sValue) Then
DirectCast(GeneralParameter, ComboGenericParameter).SelValue.sValue = sTmpComboValue
Return
End If
Case GetType(StringGenericParameter)
SetbSaveGeneralParameters(True)
Dim sTmpStringValue As String = DirectCast(GeneralParameter, StringGenericParameter).sValue
If Not EgtGetInfo(nBTLInfoLayerId, GeneralParameter.sNameNge, DirectCast(GeneralParameter, StringGenericParameter).sValue) Then
DirectCast(GeneralParameter, StringGenericParameter).sValue = sTmpStringValue
Return
End If
Case GetType(ListGenericParameter)
SetbSaveGeneralParameters(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 Not EgtGetInfo(nBTLInfoLayerId, GeneralParameter.sNameNge, sInfo) Then
sInfo = sTmpInfo
Return
End If
End If
Next
End Select
Next
End Sub
#End Region ' Constructor
#Region "COMMANDS"
#Region "Ok_Command"
Public ReadOnly Property Ok_Command As ICommand
Get
If m_cmdOk_Command Is Nothing Then
m_cmdOk_Command = New Command(AddressOf Ok)
End If
Return m_cmdOk_Command
End Get
End Property
Public Sub Ok()
Dim sInfo As String = String.Empty
Dim nBTLInfoLayerId As Integer = EgtGetFirstNameInGroup(GDB_ID.ROOT, PROJECTINFO)
If m_bSaveGeneralParameters Then
For Each GeneralParameter In m_GeneralParametersList
Select Case GeneralParameter.GetType()
Case GetType(BooleanGenericParameter)
EgtSetInfo(nBTLInfoLayerId, GeneralParameter.sNameNge, DirectCast(GeneralParameter, BooleanGenericParameter).bValue)
Case GetType(DoubleGenericParameter)
EgtSetInfo(nBTLInfoLayerId, GeneralParameter.sNameNge, DirectCast(GeneralParameter, DoubleGenericParameter).sValue)
Case GetType(ComboGenericParameter)
EgtSetInfo(nBTLInfoLayerId, GeneralParameter.sNameNge, DirectCast(GeneralParameter, ComboGenericParameter).SelValue.sValue)
Case GetType(StringGenericParameter)
EgtSetInfo(nBTLInfoLayerId, GeneralParameter.sNameNge, DirectCast(GeneralParameter, StringGenericParameter).sValue)
Case GetType(ListGenericParameter)
For Each Item As ToolParameter In DirectCast(GeneralParameter, ListGenericParameter).ListValue
If Item.bIsActive Then
sInfo &= Item.sUUID & "," & Item.sName & ";"
EgtSetInfo(nBTLInfoLayerId, GeneralParameter.sNameNge, sInfo)
End If
Next
End Select
Next
Else
For Each GeneralParameter In m_GeneralParametersList
Select Case GeneralParameter.GetType()
Case GetType(BooleanGenericParameter)
EgtRemoveInfo(nBTLInfoLayerId, GeneralParameter.sNameNge)
Case GetType(DoubleGenericParameter)
EgtRemoveInfo(nBTLInfoLayerId, GeneralParameter.sNameNge)
Case GetType(ComboGenericParameter)
EgtRemoveInfo(nBTLInfoLayerId, GeneralParameter.sNameNge)
Case GetType(StringGenericParameter)
EgtRemoveInfo(nBTLInfoLayerId, GeneralParameter.sNameNge)
Case GetType(ListGenericParameter)
For Each Item As ToolParameter In DirectCast(GeneralParameter, ListGenericParameter).ListValue
If Item.bIsActive Then
sInfo &= Item.sUUID & "," & Item.sName & ";"
EgtRemoveInfo(nBTLInfoLayerId, GeneralParameter.sNameNge)
End If
Next
End Select
Next
End If
Map.refOnlyProdManagerVM.Save()
' Chiudo finestra
RaiseEvent m_CloseWindow(DialogResult.OK)
End Sub
#End Region ' Ok_Command
#End Region ' Commands
End Class
@@ -3,6 +3,7 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:Optmizer="clr-namespace:EgtBEAMWALL.Optimizer">
<UserControl.Resources>
<Optmizer:GroupVisibilityConverter x:Key="GroupVisibilityConverter"/>
<CollectionViewSource x:Key="GroupedParameters" Source="{Binding GeneralParametersList}">
<CollectionViewSource.GroupDescriptions>
<PropertyGroupDescription PropertyName="nGroup"/>
@@ -38,7 +39,6 @@
<GroupBox Margin="0,5,0,0"
BorderBrush="{StaticResource BeamWall_Glacier}"
BorderThickness="1"
Visibility="{Binding GroupVisibility}"
Foreground="Black">
<GroupBox.Header>
<TextBlock Text="{Binding Name}"
@@ -46,6 +46,11 @@
Style="{StaticResource DialogWindow_TextBlock}"/>
</GroupBox.Header>
<ItemsPresenter />
<GroupBox.Visibility>
<MultiBinding Converter="{StaticResource GroupVisibilityConverter}">
<Binding Path="Items"/>
</MultiBinding>
</GroupBox.Visibility>
</GroupBox>
</ControlTemplate>
</Setter.Value>
@@ -290,7 +290,6 @@
BeginningEdit="PartInRawPartList_BeginningEdit"
BindingColumns="{Binding DataContext.PartInRawPartColumns, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:OnlyProdRawPartListV}}}"
ColumnHeaderStyle="{StaticResource RawPart_DataGridColumnHeader}"
FontSize="11"
GridLinesVisibility="None"
BorderThickness="0"
ScrollViewer.HorizontalScrollBarVisibility="Hidden"
@@ -1269,7 +1269,7 @@ Public Class MyMachGroupVM
''' Execute the Exec. This method is invoked by the ExecCommand.
''' </summary>
Public Sub RemoveRawPartCmd()
If MessageBox.Show(EgtMsg(62574) & Map.refProjectVM.MachGroupPanelVM.SelectedMachGroup.SelPart.sNAM & " ?", EgtMsg(30009), MessageBoxButton.OKCancel, MessageBoxImage.Exclamation) = MessageBoxResult.OK Then
If MessageBox.Show(EgtMsg(62574) & Map.refProjectVM.MachGroupPanelVM.SelectedMachGroup.Name & " ?", EgtMsg(30009), MessageBoxButton.OKCancel, MessageBoxImage.Exclamation) = MessageBoxResult.OK Then
RemoveRawPart()
Else
Return
@@ -534,6 +534,8 @@ Public Class OnlyProdManagerVM
End If
' aggiorno nome macchina in statusbar
Map.refMyStatusBarVM.RefreshMachName()
' Aggiorno titolo
Map.refMainWindowVM.UpdateTitle()
SetDefaultConfigFile()
Return True
End Function
@@ -874,7 +876,6 @@ Public Class OnlyProdManagerVM
End If
SectionXMaterial.SetType(nType)
' leggo struttura BTL per liste
Map.refProjectVM.BTLStructureVM = New BTLStructureVM(BTLStructureM.CreateBTLStructure(0))
Dim sProjFileName As String = sProjDir & "\" & nProjId.ToString("0000") & ".nge"
@@ -111,7 +111,7 @@
<RowDefinition Height="1*"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="0.8*"/>
<ColumnDefinition Width="0.9*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
@@ -121,15 +121,24 @@
<EgtBEAMWALL:OnlyProdPartManagerV Grid.Row="1" DataContext="{StaticResource PartManagerVM}"
Tag="{Binding DataContext.BTLStructureVM.SelBTLPart, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:OnlyProdProjectV}}}"/>
<Grid Grid.Row="2" Margin="7,5,0,7">
<Grid Grid.Row="2" Margin="5,5,0,5">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<EgtBEAMWALL:ProjectParametersV Tag="{Binding GeneralParametersList}"
IsEnabled="{Binding GeneralParametersIsEnable}"/>
<CheckBox Grid.Column="1" IsChecked="{Binding bSaveGeneralParameters, UpdateSourceTrigger=PropertyChanged}" Margin="5,0,0,0" VerticalAlignment="Top"
Style="{StaticResource OnlyProdFeatureInPartInRawPartList_CheckBox}"/>
<UniformGrid Rows="2" Grid.Column="1" Margin="0,0,5,0">
<CheckBox IsChecked="{Binding bSaveGeneralParameters, UpdateSourceTrigger=PropertyChanged}"
Margin="5,0,0,0" VerticalAlignment="Top" HorizontalAlignment="Center"
Style="{StaticResource OnlyProdFeatureInPartInRawPartList_CheckBox}"/>
<Button Command="{Binding Ok_Command}" VerticalAlignment="Bottom" Margin="0,0,0,5"
ToolTip="{Binding SaveAsToolTip}"
Style="{StaticResource SaveStrategy_Button}">
<Image Source="/Resources/NewPage/Ok.png" Stretch="Uniform"/>
</Button>
</UniformGrid>
</Grid>
<Border Grid.ColumnSpan="2" Margin="10,5,10,5" Background="{StaticResource BeamWall_Glacier}" Style="{StaticResource OnlyProdPage_Border}">
+65 -35
View File
@@ -321,29 +321,8 @@ Public Class ProjectVM
End Get
Set(value As Boolean)
m_bSaveGeneralParameters = value
WriteMainPrivateProfileString(S_STRATEGY, "ForceGeneralParameters", If(m_bSaveGeneralParameters, 1, 0))
If m_bSaveGeneralParameters Then
SetGeneralParametersIsEnable(True)
Dim sInfo As String = String.Empty
For Each GeneralParameter In GeneralParametersList
Select Case GeneralParameter.GetType()
Case GetType(BooleanGenericParameter)
EgtSetInfo(Map.refProjectVM.BTLStructureVM.SelBTLPart.BTLPartM.nPartId, GeneralParameter.sNameNge, DirectCast(GeneralParameter, BooleanGenericParameter).bValue)
Case GetType(DoubleGenericParameter)
EgtSetInfo(Map.refProjectVM.BTLStructureVM.SelBTLPart.BTLPartM.nPartId, GeneralParameter.sNameNge, DirectCast(GeneralParameter, DoubleGenericParameter).sValue)
Case GetType(ComboGenericParameter)
EgtSetInfo(Map.refProjectVM.BTLStructureVM.SelBTLPart.BTLPartM.nPartId, GeneralParameter.sNameNge, DirectCast(GeneralParameter, ComboGenericParameter).SelValue.sValue)
Case GetType(StringGenericParameter)
EgtSetInfo(Map.refProjectVM.BTLStructureVM.SelBTLPart.BTLPartM.nPartId, GeneralParameter.sNameNge, DirectCast(GeneralParameter, StringGenericParameter).sValue)
Case GetType(ListGenericParameter)
For Each Item As ToolParameter In DirectCast(GeneralParameter, ListGenericParameter).ListValue
If Item.bIsActive Then
sInfo &= Item.sUUID & "," & Item.sName & ";"
EgtSetInfo(Map.refProjectVM.BTLStructureVM.SelBTLPart.BTLPartM.nPartId, GeneralParameter.sNameNge, sInfo)
End If
Next
End Select
Next
Else
SetGeneralParametersIsEnable(False)
Dim sStrategiesDirPath As String = Map.refMainWindowVM.MainWindowM.GetStrategiesDirPath(Map.refStrategyManagerVM.SelStrategyType.Id)
@@ -353,23 +332,15 @@ Public Class ProjectVM
Dim JsonGeneralParametersList As List(Of JsonGeneralParameters) = JsonConvert.DeserializeObject(Of List(Of JsonGeneralParameters))(sReadedFiles)
m_GeneralParametersList = New ObservableCollection(Of ProjectParameters)((From JsonGeneralParameter In JsonGeneralParametersList
Select JsonGeneralParameter.Deserialize(Map.refStrategyManagerVM.SelStrategyType.Id)).ToList())
For Each GenericItem As ProjectParameters In m_GeneralParametersList
Select Case GenericItem.sMinUserLevel
Case UserLevel.ADVANCED
Map.refMainMenuVM.UserLevelGenericVisibility(GenericItem, If(Map.refMainMenuVM.UserAdmin_IsChecked, Visibility.Visible, Visibility.Collapsed))
Case Else
If Not Map.refMainMenuVM.UserAdmin_IsChecked Then
Map.refMainMenuVM.UserLevelGenericVisibility(GenericItem, If(GenericItem.sMinUserLevel = UserLevel.USER, Visibility.Visible, Visibility.Collapsed))
Map.refMainMenuVM.SetUnloackImage("pack://application:,,,/Resources/NewPage/padlock.png")
End If
End Select
Next
NotifyPropertyChanged(NameOf(GeneralParametersList))
End If
End If
NotifyPropertyChanged(NameOf(bSaveGeneralParameters))
End Set
End Property
Friend Sub SetbSaveGeneralParameters(value As Boolean)
m_bSaveGeneralParameters = value
NotifyPropertyChanged(NameOf(bSaveGeneralParameters))
End Sub
Private m_GeneralParametersIsEnable As Boolean = False
Public ReadOnly Property GeneralParametersIsEnable As Boolean
@@ -382,6 +353,7 @@ Public Class ProjectVM
NotifyPropertyChanged(NameOf(GeneralParametersIsEnable))
End Sub
#Region "Messages"
Public ReadOnly Property Statistics_Msg As String
@@ -403,6 +375,7 @@ Public Class ProjectVM
Private m_cmdOptimizer As ICommand
Private m_cmdParameter As ICommand
Private m_cmdBack As ICommand
Private m_cmdOk_Command As ICommand
#End Region ' Fields & Properties
@@ -416,8 +389,6 @@ Public Class ProjectVM
AddHandler m_Calc_Timer.Tick, AddressOf Calc_Timer_Tick
' imposto dimensioni colonne/righe della Grid
DimensionsIniFile.ReadGridDimensions(ConstDims.PROJECT_ONLYPROD, GridDims)
m_bSaveGeneralParameters = GetMainPrivateProfileInt(S_STRATEGY, "ForceGeneralParameters", 0) <> 0
End Sub
#End Region ' Constructor
@@ -671,6 +642,65 @@ Public Class ProjectVM
#End Region ' Cancel_Command
#Region "Ok_Command"
Public ReadOnly Property Ok_Command As ICommand
Get
If m_cmdOk_Command Is Nothing Then
m_cmdOk_Command = New Command(AddressOf Ok)
End If
Return m_cmdOk_Command
End Get
End Property
Public Sub Ok()
Dim sInfo As String = String.Empty
If m_bSaveGeneralParameters Then
For Each GeneralParameter In m_GeneralParametersList
Select Case GeneralParameter.GetType()
Case GetType(BooleanGenericParameter)
EgtSetInfo(Map.refProjectVM.BTLStructureVM.SelBTLPart.BTLPartM.nPartId, GeneralParameter.sNameNge, DirectCast(GeneralParameter, BooleanGenericParameter).bValue)
Case GetType(DoubleGenericParameter)
EgtSetInfo(Map.refProjectVM.BTLStructureVM.SelBTLPart.BTLPartM.nPartId, GeneralParameter.sNameNge, DirectCast(GeneralParameter, DoubleGenericParameter).sValue)
Case GetType(ComboGenericParameter)
EgtSetInfo(Map.refProjectVM.BTLStructureVM.SelBTLPart.BTLPartM.nPartId, GeneralParameter.sNameNge, DirectCast(GeneralParameter, ComboGenericParameter).SelValue.sValue)
Case GetType(StringGenericParameter)
EgtSetInfo(Map.refProjectVM.BTLStructureVM.SelBTLPart.BTLPartM.nPartId, GeneralParameter.sNameNge, DirectCast(GeneralParameter, StringGenericParameter).sValue)
Case GetType(ListGenericParameter)
For Each Item As ToolParameter In DirectCast(GeneralParameter, ListGenericParameter).ListValue
If Item.bIsActive Then
sInfo &= Item.sUUID & "," & Item.sName & ";"
EgtSetInfo(Map.refProjectVM.BTLStructureVM.SelBTLPart.BTLPartM.nPartId, GeneralParameter.sNameNge, sInfo)
End If
Next
End Select
Next
Else
For Each GeneralParameter In m_GeneralParametersList
Select Case GeneralParameter.GetType()
Case GetType(BooleanGenericParameter)
EgtRemoveInfo(Map.refProjectVM.BTLStructureVM.SelBTLPart.BTLPartM.nPartId, GeneralParameter.sNameNge)
Case GetType(DoubleGenericParameter)
EgtRemoveInfo(Map.refProjectVM.BTLStructureVM.SelBTLPart.BTLPartM.nPartId, GeneralParameter.sNameNge)
Case GetType(ComboGenericParameter)
EgtRemoveInfo(Map.refProjectVM.BTLStructureVM.SelBTLPart.BTLPartM.nPartId, GeneralParameter.sNameNge)
Case GetType(StringGenericParameter)
EgtRemoveInfo(Map.refProjectVM.BTLStructureVM.SelBTLPart.BTLPartM.nPartId, GeneralParameter.sNameNge)
Case GetType(ListGenericParameter)
For Each Item As ToolParameter In DirectCast(GeneralParameter, ListGenericParameter).ListValue
If Item.bIsActive Then
sInfo &= Item.sUUID & "," & Item.sName & ";"
EgtRemoveInfo(Map.refProjectVM.BTLStructureVM.SelBTLPart.BTLPartM.nPartId, GeneralParameter.sNameNge)
End If
Next
End Select
Next
End If
Map.refOnlyProdManagerVM.Save()
End Sub
#End Region ' Ok_Command
#End Region ' Command
End Class
@@ -68,7 +68,11 @@ Public Class MyStatusBarVM
' Costringo ad aggiornare
UpdateUI()
' Eventuale attesa
Thread.Sleep(nPause)
If nPause >= 0 Then
Thread.Sleep(nPause)
'ElseIf nPause = -1 Then
' EgtDraw()
End If
' Ritorno eventuale stop
If m_bStopProgress Then
m_bStopProgress = False
@@ -558,7 +558,7 @@ Public Class StrategyManagerVM
End Property
Public Sub ConfigurationParameters()
'Map.refOnlyProdManagerVM.GeneralParametersStrategyVM = New GeneralParametersStrategyVM()
Map.refOnlyProdManagerVM.GeneralParametersStrategyVM = New GeneralParametersStrategyVM()
Dim GeneralParametersStrategyWnd As New GeneralParametersStrategyV(Application.Current.MainWindow, Map.refOnlyProdManagerVM.GeneralParametersStrategyVM)
GeneralParametersStrategyWnd.ShowDialog()
End Sub
@@ -1331,10 +1331,10 @@
</Style>
<Style x:Key="RawPart_DataGridColumnHeader" TargetType="{x:Type DataGridColumnHeader}">
<Setter Property="Background" Value="{StaticResource BeamWall_Christine}" />
<Setter Property="Foreground" Value="{StaticResource BeamWall_White}" />
<Setter Property="FontWeight" Value="Bold" />
<Setter Property="FontSize" Value="15" />
<Setter Property="Background" Value="{StaticResource BeamWall_White}" />
<!--<Setter Property="Foreground" Value="{StaticResource BeamWall_White}" />-->
<Setter Property="FontWeight" Value="SemiBold" />
<Setter Property="FontSize" Value="11" />
<Setter Property="HorizontalContentAlignment" Value="Center" />
<Setter Property="Padding" Value="0,2,0,2" />
</Style>
Binary file not shown.
Binary file not shown.
Binary file not shown.