Merge branch 'feature/DevExpress' into feature/DevExpress-RawPartList

This commit is contained in:
Emmanuele Sassi
2026-05-07 15:57:32 +02:00
51 changed files with 574 additions and 705 deletions
@@ -13,6 +13,7 @@ Public Class BTLFeatureVM
End Get End Get
End Property End Property
Protected m_BTLPartM As BTLPartM Protected m_BTLPartM As BTLPartM
Protected m_PartM As PartM
Public ReadOnly Property nFeatureId As Integer Public ReadOnly Property nFeatureId As Integer
Get Get
@@ -215,11 +216,17 @@ Public Class BTLFeatureVM
Return m_bStrategy_Visibility Return m_bStrategy_Visibility
End Get End Get
End Property End Property
Public Sub SetbStrategy_Visibility(value As Visibility) Public Sub SetbStrategy_Visibility(value As Boolean)
m_bStrategy_Visibility = value m_bStrategy_Visibility = If(value, Visibility.Visible, Visibility.Collapsed)
NotifyPropertyChanged(NameOf(bStrategy_Visibility)) NotifyPropertyChanged(NameOf(bStrategy_Visibility))
End Sub End Sub
Public ReadOnly Property IsEnabled As Boolean
Get
Return m_PartM.nProductionState < ItemState.Assigned
End Get
End Property
#Region "CONSTRUCTOR" #Region "CONSTRUCTOR"
Sub New() Sub New()
@@ -483,6 +483,12 @@ Public MustInherit Class PartVM
End Get End Get
End Property End Property
Public ReadOnly Property ButtonIsEnabled As Boolean
Get
Return m_PartM.nProductionState < ItemState.Assigned
End Get
End Property
#End Region ' Supervisor #End Region ' Supervisor
' definizione comandi ' definizione comandi
+2 -2
View File
@@ -38,5 +38,5 @@ Imports System.Windows
' by using the '*' as shown below: ' by using the '*' as shown below:
' <Assembly: AssemblyVersion("1.0.*")> ' <Assembly: AssemblyVersion("1.0.*")>
<Assembly: AssemblyVersion("3.1.4.4")> <Assembly: AssemblyVersion("3.1.4.7")>
<Assembly: AssemblyFileVersion("3.1.4.4")> <Assembly: AssemblyFileVersion("3.1.4.7")>
@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
// You can specify all the values or you can default the Build and Revision Numbers // You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below: // by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")] // [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("3.1.4.4")] [assembly: AssemblyVersion("3.1.4.7")]
[assembly: AssemblyFileVersion("3.1.4.4")] [assembly: AssemblyFileVersion("3.1.4.7")]
@@ -18,15 +18,19 @@
<RowDefinition Height="Auto"/> <RowDefinition Height="Auto"/>
<RowDefinition Height="1*"/> <RowDefinition Height="1*"/>
</Grid.RowDefinitions> </Grid.RowDefinitions>
<ComboBox ItemsSource="{Binding StrategySetupList}" <StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
SelectedItem="{Binding SelStrategySetup, UpdateSourceTrigger=PropertyChanged}" <ComboBox ItemsSource="{Binding StrategySetupList}"
Style="{StaticResource BTLDataWnd_ComboBox}"> SelectedItem="{Binding SelStrategySetup, UpdateSourceTrigger=PropertyChanged}"
<ComboBox.ItemContainerStyle> Style="{StaticResource BTLDataWnd_ComboBox}">
<Style TargetType="{x:Type ComboBoxItem}"> <ComboBox.ItemContainerStyle>
<EventSetter Event="PreviewMouseDown" Handler="ComboBoxItem_PreviewMouseDown"/> <Style TargetType="{x:Type ComboBoxItem}">
</Style> <EventSetter Event="PreviewMouseDown" Handler="ComboBoxItem_PreviewMouseDown"/>
</ComboBox.ItemContainerStyle> </Style>
</ComboBox> </ComboBox.ItemContainerStyle>
</ComboBox>
<TextBlock Text="{Binding ErrText}"
Style="{StaticResource ErrConfig_TextBlock}"/>
</StackPanel>
<Grid Grid.Row="1"> <Grid Grid.Row="1">
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="Auto"/> <RowDefinition Height="Auto"/>
@@ -16,7 +16,7 @@
Private Sub ComboBoxItem_PreviewMouseDown(sender As Object, e As MouseButtonEventArgs) Private Sub ComboBoxItem_PreviewMouseDown(sender As Object, e As MouseButtonEventArgs)
Dim SelStrategy As ComboBoxItem = DirectCast(sender, ComboBoxItem) Dim SelStrategy As ComboBoxItem = DirectCast(sender, ComboBoxItem)
If Map.refBTLDataWndVM.SelStrategySetup.Equals(SelStrategy.Content) Then If Not IsNothing(Map.refBTLDataWndVM.SelStrategySetup) AndAlso Map.refBTLDataWndVM.SelStrategySetup.Equals(SelStrategy.Content) Then
Map.refStrategyManagerVM.SelStrategySetup.sName = SelStrategy.Content Map.refStrategyManagerVM.SelStrategySetup.sName = SelStrategy.Content
Map.refStrategyManagerVM.SelStrategySetup.Read() Map.refStrategyManagerVM.SelStrategySetup.Read()
Map.refBTLDataWndVM.ReadCustomGeneralParameters(SelStrategy.Content) Map.refBTLDataWndVM.ReadCustomGeneralParameters(SelStrategy.Content)
+96 -115
View File
@@ -69,6 +69,17 @@ Public Class BTLDataWndVM
NotifyPropertyChanged(NameOf(IsBTLDataWnd)) NotifyPropertyChanged(NameOf(IsBTLDataWnd))
End Sub End Sub
Private m_sErrText As String = String.Empty
Public ReadOnly Property ErrText As String
Get
Return m_sErrText
End Get
End Property
Friend Sub SetErrText(value As String)
m_sErrText = value
NotifyPropertyChanged(NameOf(ErrText))
End Sub
#Region "Parametri generici" #Region "Parametri generici"
Public m_sPROJNUM As String Public m_sPROJNUM As String
@@ -613,57 +624,23 @@ Public Class BTLDataWndVM
' Leggo parametri generali ' Leggo parametri generali
Dim sDefaultConfigFile As String = String.Empty Dim sDefaultConfigFile As String = String.Empty
If EgtGetInfo(m_nBTLInfoLayerId, AI_SETUP, sDefaultConfigFile) Then If EgtGetInfo(m_nBTLInfoLayerId, AI_SETUP, sDefaultConfigFile) Then
m_SelStrategySetup = sDefaultConfigFile If m_StrategySetupList.Contains(sDefaultConfigFile) Then
m_SelStrategySetup = sDefaultConfigFile
SetErrText(String.Empty)
Else
SetErrText(EgtMsg(62113) & sDefaultConfigFile & EgtMsg(62114))
End If
ElseIf EgtUILib.GetPrivateProfileString(S_STRATEGY, K_DEFAULTCONFIG, "", sDefaultConfigFile, Map.refMainWindowVM.MainWindowM.sDefaultConfig) <> 0 Then ElseIf EgtUILib.GetPrivateProfileString(S_STRATEGY, K_DEFAULTCONFIG, "", sDefaultConfigFile, Map.refMainWindowVM.MainWindowM.sDefaultConfig) <> 0 Then
m_SelStrategySetup = sDefaultConfigFile m_SelStrategySetup = sDefaultConfigFile
End If End If
If Not EgtExistsInfo(m_nBTLInfoLayerId, AI_SETUP) AndAlso Not IsNothing(m_SelStrategySetup) Then EgtSetInfo(m_nBTLInfoLayerId, AI_SETUP, m_SelStrategySetup) If Not EgtExistsInfo(m_nBTLInfoLayerId, AI_SETUP) AndAlso Not IsNothing(m_SelStrategySetup) Then EgtSetInfo(m_nBTLInfoLayerId, AI_SETUP, m_SelStrategySetup)
Dim sStrategiesDirPath As String = Map.refMainWindowVM.MainWindowM.GetStrategiesDirPath(nType) GetGeneralParamtersList(nType)
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 UserLevel.ADMINISTRATOR
Map.refMainMenuVM.UserLevelGenericVisibility(GenericItem, If(Map.refMainMenuVM.UnlockAllIsChecked, 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(PADLOCK_IMAGE)
End If
End Select
Next
End If
Dim sAISetupDirPath As String = Map.refMainWindowVM.MainWindowM.GetAISetupDirPath(nType, True) Dim sAISetupDirPath As String = Map.refMainWindowVM.MainWindowM.GetAISetupDirPath(nType, True)
Dim sStrategyConfigurationFilePath As String = sAISetupDirPath & "\" & SelStrategySetup & ".json" Dim sStrategyConfigurationFilePath As String = sAISetupDirPath & "\" & SelStrategySetup & ".json"
If File.Exists(sStrategyConfigurationFilePath) Then ReadGeneralConfiguration(sStrategyConfigurationFilePath)
Dim sReadedFile As String = File.ReadAllText(sStrategyConfigurationFilePath)
Dim JsonRoot As CustomJsonRoot = Nothing
Try
JsonRoot = JsonConvert.DeserializeObject(Of CustomJsonRoot)(sReadedFile)
Catch ex As Exception
JsonRoot = Nothing
Return
End Try
For Each ProjectItem In JsonRoot.GENERAL
Dim DefaultProject As ProjectParameters = m_GeneralParametersList.FirstOrDefault(Function(x) x.sName = ProjectItem.sName)
If Not IsNothing(DefaultProject) Then
DefaultProject.ReadConfiguration(ProjectItem, m_GeneralParametersList)
Else
EgtOutLog("Parametro Generale: " & ProjectItem.sName & " non presente")
End If
Next
End If
' Leggo info se presenti ' Leggo info se presenti
Dim sInfo As String = String.Empty Dim sInfo As String = String.Empty
@@ -684,12 +661,20 @@ Public Class BTLDataWndVM
DirectCast(GeneralParameter, DoubleGenericParameter).sValue = sTmpDoubleValue DirectCast(GeneralParameter, DoubleGenericParameter).sValue = sTmpDoubleValue
End If End If
Case GetType(ComboGenericParameter) Case GetType(ComboGenericParameter)
Dim sTmpComboValue As String = DirectCast(GeneralParameter, ComboGenericParameter).SelValue.sValue Dim sTmpComboValue As String = String.Empty
If Not IsNothing(DirectCast(GeneralParameter, ComboGenericParameter).SelValue) Then
sTmpComboValue = DirectCast(GeneralParameter, ComboGenericParameter).SelValue.sValue
Else
sTmpComboValue = DirectCast(GeneralParameter, ComboGenericParameter).ComboList(0).sValue
End If
Dim sTmpValueInfo As String = String.Empty Dim sTmpValueInfo As String = String.Empty
If EgtExistsInfo(m_nBTLInfoLayerId, GeneralParameter.sNameNge) Then If EgtExistsInfo(m_nBTLInfoLayerId, GeneralParameter.sNameNge) Then
EgtGetInfo(m_nBTLInfoLayerId, GeneralParameter.sNameNge, sTmpValueInfo) EgtGetInfo(m_nBTLInfoLayerId, GeneralParameter.sNameNge, sTmpValueInfo)
DirectCast(GeneralParameter, ComboGenericParameter).SelValue = DirectCast(GeneralParameter, ComboGenericParameter).ComboList.FirstOrDefault(Function(x) x.sValue = sTmpValueInfo) DirectCast(GeneralParameter, ComboGenericParameter).SelValue = DirectCast(GeneralParameter, ComboGenericParameter).ComboList.FirstOrDefault(Function(x) x.sValue = sTmpValueInfo)
Else Else
If IsNothing(DirectCast(GeneralParameter, ComboGenericParameter).SelValue) Then
DirectCast(GeneralParameter, ComboGenericParameter).SelValue = New ComboParameter
End If
DirectCast(GeneralParameter, ComboGenericParameter).SelValue.sValue = sTmpComboValue DirectCast(GeneralParameter, ComboGenericParameter).SelValue.sValue = sTmpComboValue
End If End If
Case GetType(StringGenericParameter) Case GetType(StringGenericParameter)
@@ -716,60 +701,21 @@ Public Class BTLDataWndVM
End Sub End Sub
Friend Sub ReadCustomGeneralParameters(SelStrategySetup As String) Friend Sub ReadCustomGeneralParameters(SelStrategySetup As String)
Dim sStrategiesDirPath As String = Map.refMainWindowVM.MainWindowM.GetStrategiesDirPath(Map.refStrategyManagerVM.SelStrategyType.Id) SetErrText(String.Empty)
Dim sGeneralParametersFilePath As String = sStrategiesDirPath & "\" & GENERALPARAMETERS_FILE & ".json" GetGeneralParamtersList(Map.refStrategyManagerVM.SelStrategyType.Id)
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 Dim sAISetupDirPath As String = Map.refMainWindowVM.MainWindowM.GetAISetupDirPath(Map.refStrategyManagerVM.SelStrategyType.Id, False)
Select Case GenericItem.sMinUserLevel
Case UserLevel.ADVANCED
Map.refMainMenuVM.UserLevelGenericVisibility(GenericItem, If(Map.refMainMenuVM.UserAdmin_IsChecked, Visibility.Visible, Visibility.Collapsed))
Case UserLevel.ADMINISTRATOR
Map.refMainMenuVM.UserLevelGenericVisibility(GenericItem, If(Map.refMainMenuVM.UnlockAllIsChecked, 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(PADLOCK_IMAGE)
End If
End Select
Next
Dim sAISetupDirPath As String = Map.refMainWindowVM.MainWindowM.GetAISetupDirPath(Map.refStrategyManagerVM.SelStrategyType.Id, False) Dim sStrategyConfigurationFilePath As String = sAISetupDirPath & "\" & SelStrategySetup & ".json"
ReadGeneralConfiguration(sStrategyConfigurationFilePath)
Dim sStrategyConfigurationFilePath As String = sAISetupDirPath & "\" & SelStrategySetup & ".json" NotifyPropertyChanged(NameOf(GeneralParametersList))
If File.Exists(sStrategyConfigurationFilePath) Then
Dim sReadedFile As String = File.ReadAllText(sStrategyConfigurationFilePath)
Dim JsonRoot As CustomJsonRoot = Nothing
Try
JsonRoot = JsonConvert.DeserializeObject(Of CustomJsonRoot)(sReadedFile)
Catch ex As Exception
JsonRoot = Nothing
Return
End Try
For Each ProjectItem In JsonRoot.GENERAL
Dim DefaultProject As ProjectParameters = m_GeneralParametersList.FirstOrDefault(Function(x) x.sName = ProjectItem.sName)
If Not IsNothing(DefaultProject) Then
DefaultProject.ReadConfiguration(ProjectItem, m_GeneralParametersList)
Else
EgtOutLog("Parametro Generale: " & ProjectItem.sName & " non presente")
End If
Next
End If
NotifyPropertyChanged(NameOf(GeneralParametersList))
End If
End Sub End Sub
Friend Sub SaveInfoBTL(nType As BWType) Friend Sub SaveInfoBTL(nType As BWType)
Dim AISetupDirPath As String = Map.refMainWindowVM.MainWindowM.GetAISetupDirPath(nType, True) Dim AISetupDirPath As String = Map.refMainWindowVM.MainWindowM.GetAISetupDirPath(nType, True)
Dim sDefaultConfigFile As String = String.Empty Dim sDefaultConfigFile As String = String.Empty
Dim sTmpStrategySetup As String = String.Empty Dim sTmpStrategySetup As String = String.Empty
Dim sInfo As String = String.Empty
' Controllo se presente file default config ' Controllo se presente file default config
If IsNothing(m_SelStrategySetup) Then If IsNothing(m_SelStrategySetup) Then
If EgtUILib.GetPrivateProfileString(S_STRATEGY, K_DEFAULTCONFIG, "", sDefaultConfigFile, Map.refMainWindowVM.MainWindowM.sDefaultConfig) <> 0 Then If EgtUILib.GetPrivateProfileString(S_STRATEGY, K_DEFAULTCONFIG, "", sDefaultConfigFile, Map.refMainWindowVM.MainWindowM.sDefaultConfig) <> 0 Then
@@ -789,36 +735,70 @@ Public Class BTLDataWndVM
If Not IsNothing(m_SelStrategySetup) Then EgtSetInfo(m_nBTLInfoLayerId, AI_SETUP, m_SelStrategySetup) If Not IsNothing(m_SelStrategySetup) Then EgtSetInfo(m_nBTLInfoLayerId, AI_SETUP, m_SelStrategySetup)
End If End If
End If End If
For Each GeneralParameter In GeneralParametersList
Select Case GeneralParameter.GetType() SetInfoGeneralParameters()
Case GetType(BooleanGenericParameter)
EgtSetInfo(m_nBTLInfoLayerId, GeneralParameter.sNameNge, DirectCast(GeneralParameter, BooleanGenericParameter).bValue)
EgtSetInfo(m_nBTLInfoLayerId, GeneralParameter.sNameNge & "_FORCED", DirectCast(GeneralParameter, BooleanGenericParameter).bIsBooleanModify)
Case GetType(DoubleGenericParameter)
EgtSetInfo(m_nBTLInfoLayerId, GeneralParameter.sNameNge, DirectCast(GeneralParameter, DoubleGenericParameter).sValue)
EgtSetInfo(m_nBTLInfoLayerId, GeneralParameter.sNameNge & "_FORCED", DirectCast(GeneralParameter, DoubleGenericParameter).bIsDoubleModify)
Case GetType(ComboGenericParameter)
EgtSetInfo(m_nBTLInfoLayerId, GeneralParameter.sNameNge, DirectCast(GeneralParameter, ComboGenericParameter).SelValue.sValue)
EgtSetInfo(m_nBTLInfoLayerId, GeneralParameter.sNameNge & "_FORCED", DirectCast(GeneralParameter, ComboGenericParameter).bIsComboBoxModify)
Case GetType(StringGenericParameter)
EgtSetInfo(m_nBTLInfoLayerId, GeneralParameter.sNameNge, DirectCast(GeneralParameter, StringGenericParameter).sValue)
EgtSetInfo(m_nBTLInfoLayerId, GeneralParameter.sNameNge & "_FORCED", DirectCast(GeneralParameter, StringGenericParameter).bIsStringModify)
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
EgtSetInfo(m_nBTLInfoLayerId, GeneralParameter.sNameNge & "_FORCED", DirectCast(GeneralParameter, ListGenericParameter).bIsListModify)
End Select
Next
End Sub End Sub
Private Sub SaveInfo() Private Sub SaveInfo()
EgtSetInfo(m_nBTLInfoLayerId, AI_SETUP, m_SelStrategySetup) EgtSetInfo(m_nBTLInfoLayerId, AI_SETUP, m_SelStrategySetup)
SetInfoGeneralParameters()
End Sub
Private Sub ReadGeneralConfiguration(sStrategyConfigurationFilePath As String)
If File.Exists(sStrategyConfigurationFilePath) Then
Dim sReadedFile As String = File.ReadAllText(sStrategyConfigurationFilePath)
Dim JsonRoot As CustomJsonRoot = Nothing
Try
JsonRoot = JsonConvert.DeserializeObject(Of CustomJsonRoot)(sReadedFile)
Catch ex As Exception
JsonRoot = Nothing
Return
End Try
For Each ProjectItem In JsonRoot.GENERAL
Dim DefaultProject As ProjectParameters = m_GeneralParametersList.FirstOrDefault(Function(x) x.sName = ProjectItem.sName)
If Not IsNothing(DefaultProject) Then
DefaultProject.ReadConfiguration(ProjectItem, m_GeneralParametersList)
Else
EgtOutLog("Parametro Generale: " & ProjectItem.sName & " non presente")
End If
Next
End If
End Sub
Private Sub GetGeneralParamtersList(nTypeId As BWType)
Dim sStrategiesDirPath As String = Map.refMainWindowVM.MainWindowM.GetStrategiesDirPath(nTypeId)
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())
UserLevelControl(m_GeneralParametersList)
End If
End Sub
Private Sub UserLevelControl(GeneralParametersList As ObservableCollection(Of ProjectParameters))
For Each GenericItem As ProjectParameters In GeneralParametersList
Select Case GenericItem.sMinUserLevel
Case UserLevel.ADVANCED
Map.refMainMenuVM.UserLevelGenericVisibility(GenericItem, If(Map.refMainMenuVM.UserAdmin_IsChecked, True, False))
Case UserLevel.ADMINISTRATOR
Map.refMainMenuVM.UserLevelGenericVisibility(GenericItem, If(Map.refMainMenuVM.UnlockAllIsChecked, True, False))
Case Else
If Not Map.refMainMenuVM.UserAdmin_IsChecked Then
Map.refMainMenuVM.UserLevelGenericVisibility(GenericItem, If(GenericItem.sMinUserLevel = UserLevel.USER, True, False))
Map.refMainMenuVM.SetUnloackImage(PADLOCK_IMAGE)
End If
End Select
Next
End Sub
Private Sub SetInfoGeneralParameters()
Dim sInfo As String = String.Empty Dim sInfo As String = String.Empty
For Each GeneralParameter In GeneralParametersList For Each GeneralParameter In m_GeneralParametersList
Select Case GeneralParameter.GetType() Select Case GeneralParameter.GetType()
Case GetType(BooleanGenericParameter) Case GetType(BooleanGenericParameter)
EgtSetInfo(m_nBTLInfoLayerId, GeneralParameter.sNameNge, DirectCast(GeneralParameter, BooleanGenericParameter).bValue) EgtSetInfo(m_nBTLInfoLayerId, GeneralParameter.sNameNge, DirectCast(GeneralParameter, BooleanGenericParameter).bValue)
@@ -842,6 +822,7 @@ Public Class BTLDataWndVM
EgtSetInfo(m_nBTLInfoLayerId, GeneralParameter.sNameNge & "_FORCED", DirectCast(GeneralParameter, ListGenericParameter).bIsListModify) EgtSetInfo(m_nBTLInfoLayerId, GeneralParameter.sNameNge & "_FORCED", DirectCast(GeneralParameter, ListGenericParameter).bIsListModify)
End Select End Select
Next Next
NotifyPropertyChanged(NameOf(GeneralParametersList))
End Sub End Sub
#End Region ' METHODS #End Region ' METHODS
@@ -877,7 +858,7 @@ Public Class BTLDataWndVM
#End Region ' Ok #End Region ' Ok
#Region "Ok" #Region "Cancel"
Public ReadOnly Property Cancel_Command As ICommand Public ReadOnly Property Cancel_Command As ICommand
Get Get
@@ -892,7 +873,7 @@ Public Class BTLDataWndVM
RaiseEvent m_CloseWindow(False) RaiseEvent m_CloseWindow(False)
End Sub End Sub
#End Region ' Ok #End Region ' Cancel
#End Region ' COMMANDS #End Region ' COMMANDS
@@ -275,6 +275,7 @@ Public Class BTLPartManagerVM
Private Sub RemoveScenePart(BTLPartToDelete As BTLPartVM) Private Sub RemoveScenePart(BTLPartToDelete As BTLPartVM)
' Rimuovo pezzo dalla scena ' Rimuovo pezzo dalla scena
Dim IdAsseBase As Integer = Map.refProdManagerVM.ListProjAsseBase(BTLPartToDelete.nPROJ) Dim IdAsseBase As Integer = Map.refProdManagerVM.ListProjAsseBase(BTLPartToDelete.nPROJ)
If IdAsseBase < 0 Then Return
' Setto il nuovo contesto ' Setto il nuovo contesto
EgtSetCurrentContext(Map.refSceneShowBuldingVM.SceneShowBulding.GetCtx()) EgtSetCurrentContext(Map.refSceneShowBuldingVM.SceneShowBulding.GetCtx())
If EgtBeamGetBuildingIsOn(IdAsseBase) Then EgtBeamShowBuilding(IdAsseBase, False) If EgtBeamGetBuildingIsOn(IdAsseBase) Then EgtBeamShowBuilding(IdAsseBase, False)
@@ -361,8 +362,9 @@ Public Class BTLPartManagerVM
Else Else
Map.refProjectVM.Read(ProjectManagerVM.CurrProd.nType) Map.refProjectVM.Read(ProjectManagerVM.CurrProd.nType)
End If End If
Map.refProjectVM.SetRawPartManagerVisibility(Visibility.Collapsed)
Map.refProjectVM.SetFeatureListVisibility(Visibility.Collapsed) Map.refProjectVM.SetRawPartManagerVisibility(False)
Map.refProjectVM.SetFeatureListVisibility(False)
Map.refProjectVM.SetSelManagerTab(ProjectVM.StrategyManagerTab.FEATUREMANAGER) Map.refProjectVM.SetSelManagerTab(ProjectVM.StrategyManagerTab.FEATUREMANAGER)
' Disabilito LeftPanel ' Disabilito LeftPanel
Map.refProjectVM.SetLeftPanel_IsEnabled(False) Map.refProjectVM.SetLeftPanel_IsEnabled(False)
@@ -319,6 +319,7 @@ Public Class BTLFeatureVM
m_BTLFeatureM = BTLFeatureM m_BTLFeatureM = BTLFeatureM
AddHandler m_BTLFeatureM.PBTLParamAdded, AddressOf OnPBTLParamAdded AddHandler m_BTLFeatureM.PBTLParamAdded, AddressOf OnPBTLParamAdded
m_BTLPartM = BTLPartM m_BTLPartM = BTLPartM
m_PartM = Nothing
CreatePBTLParamVMList() CreatePBTLParamVMList()
NotifyPropertyChanged(NameOf(Calc_Background)) NotifyPropertyChanged(NameOf(Calc_Background))
NotifyPropertyChanged(NameOf(CALC_ROT_Visibility)) NotifyPropertyChanged(NameOf(CALC_ROT_Visibility))
@@ -328,9 +329,10 @@ Public Class BTLFeatureVM
m_MenuList.Add(New MenuItemVm(Me)) m_MenuList.Add(New MenuItemVm(Me))
End Sub End Sub
Sub New(BTLFeatureM As BTLFeatureM) Sub New(BTLFeatureM As BTLFeatureM, PartM As PartM)
m_BTLFeatureM = BTLFeatureM m_BTLFeatureM = BTLFeatureM
m_BTLPartM = Nothing m_BTLPartM = Nothing
m_PartM = PartM
NotifyPropertyChanged(NameOf(Calc_Background)) NotifyPropertyChanged(NameOf(Calc_Background))
NotifyPropertyChanged(NameOf(CALC_ROT_Visibility)) NotifyPropertyChanged(NameOf(CALC_ROT_Visibility))
NotifyPropertyChanged(NameOf(CALC_ERR_Letter)) NotifyPropertyChanged(NameOf(CALC_ERR_Letter))
@@ -595,9 +597,10 @@ Public Class BTLFeatureVM
If Map.refShowBeamPanelVM.ShowBuilding_IsChecked Then If Map.refShowBeamPanelVM.ShowBuilding_IsChecked Then
Map.refShowBeamPanelVM.ShowBuilding_IsChecked = False Map.refShowBeamPanelVM.ShowBuilding_IsChecked = False
End If End If
Map.refProjectVM.SetRawPartManagerVisibility(Visibility.Collapsed) Map.refProjectVM.SetRawPartManagerVisibility(False)
Map.refProjectVM.SetSelManagerTab(ProjectVM.StrategyManagerTab.FEATUREMANAGERBTL) Map.refProjectVM.SetSelManagerTab(ProjectVM.StrategyManagerTab.FEATUREMANAGERBTL)
Map.refProjectVM.SetSelFeatureManagerTab(ProjectVM.FeatureManagerTab.STRATEGYMANAGERBTL) Map.refProjectVM.SetSelFeatureManagerTab(ProjectVM.FeatureManagerTab.STRATEGYMANAGERBTL)
Map.refFeatureManagerVM.SetEditIsEnabled()
' Disabilito LeftPanel ' Disabilito LeftPanel
Map.refProjectVM.SetLeftPanel_IsEnabled(False) Map.refProjectVM.SetLeftPanel_IsEnabled(False)
Map.refProjectVM.SetLeftPanel_Opacity(0.2) Map.refProjectVM.SetLeftPanel_Opacity(0.2)
+17 -16
View File
@@ -1369,13 +1369,13 @@ Public Class BTLPartVM
Public ReadOnly Property CALC_ROT_Visibility As Visibility Public ReadOnly Property CALC_ROT_Visibility As Visibility
Get Get
Return If(m_BTLPartM.nCALC_ROT <> 0, Visibility.Visible, Visibility.Collapsed) Return If(m_BTLPartM.nCALC_ROT <> 0, Visibility.Visible, Visibility.Hidden)
End Get End Get
End Property End Property
Public ReadOnly Property CALC_FALL_Visibility As Visibility Public ReadOnly Property CALC_FALL_Visibility As Visibility
Get Get
Return If(m_BTLPartM.nCALC_FALL <> 0, Visibility.Visible, Visibility.Collapsed) Return If(m_BTLPartM.nCALC_FALL <> 0, Visibility.Visible, Visibility.Hidden)
End Get End Get
End Property End Property
@@ -1556,7 +1556,7 @@ Public Class BTLPartVM
m_SelBTLFeatureVM.RefreshFCMBtnVisibility() m_SelBTLFeatureVM.RefreshFCMBtnVisibility()
' Controlo se nPRC è 900 rendo visibile combobox Variant ' Controlo se nPRC è 900 rendo visibile combobox Variant
If m_SelBTLFeatureVM.nPRC = 900 Then If m_SelBTLFeatureVM.nPRC = 900 Then
Map.refFeatureManagerVM.SetVariant_Visibility(Visibility.Visible) Map.refFeatureManagerVM.SetVariant_Visibility(True)
Dim nVariant As Integer = 0 Dim nVariant As Integer = 0
If Integer.TryParse(m_SelBTLFeatureVM.sDES, nVariant) Then If Integer.TryParse(m_SelBTLFeatureVM.sDES, nVariant) Then
m_SelBTLFeatureVM.nSelVARIANT = nVariant m_SelBTLFeatureVM.nSelVARIANT = nVariant
@@ -1569,7 +1569,7 @@ Public Class BTLPartVM
Map.refPParameterListVM.SetCurrDraw(Map.refMainWindowVM.MainWindowM.sResourcesRoot & "\Features\" & m_SelBTLFeatureVM.sDescGRP & ".png") Map.refPParameterListVM.SetCurrDraw(Map.refMainWindowVM.MainWindowM.sResourcesRoot & "\Features\" & m_SelBTLFeatureVM.sDescGRP & ".png")
End If End If
Else Else
Map.refFeatureManagerVM.SetVariant_Visibility(Visibility.Collapsed) Map.refFeatureManagerVM.SetVariant_Visibility(False)
End If End If
End If End If
If Not IsNothing(Map.refFeatureListManagerVM) Then Map.refFeatureListManagerVM.FeatureSelectionChanged() If Not IsNothing(Map.refFeatureListManagerVM) Then Map.refFeatureListManagerVM.FeatureSelectionChanged()
@@ -1584,11 +1584,11 @@ Public Class BTLPartVM
NotifyPropertyChanged(NameOf(SelBTLFeatureVM)) NotifyPropertyChanged(NameOf(SelBTLFeatureVM))
' se modalità building, la tolgo ' se modalità building, la tolgo
If Not IsNothing(m_SelBTLFeatureVM) AndAlso Map.refShowBeamPanelVM.ShowBuilding_IsChecked Then If Not IsNothing(m_SelBTLFeatureVM) AndAlso Map.refShowBeamPanelVM.ShowBuilding_IsChecked Then
Map.refProjectVM.SetSceneShowBuldingVisibility(Visibility.Collapsed) Map.refProjectVM.SetSceneShowBuldingVisibility(False)
Map.refProjectVM.BTLStructureVM.ShowBuilding(False, False) Map.refProjectVM.BTLStructureVM.ShowBuilding(False, False)
Map.refShowBeamPanelVM.SetShowBuilding(False) Map.refShowBeamPanelVM.SetShowBuilding(False)
Map.refProjectVM.SetManagerTabVisibility(Visibility.Visible) Map.refProjectVM.SetManagerTabVisibility(True)
If Not IsNothing(Map.refProjectVM.MachGroupPanelVM) Then Map.refProjectVM.SetFeatureListVisibility(Visibility.Visible) If Not IsNothing(Map.refProjectVM.MachGroupPanelVM) Then Map.refProjectVM.SetFeatureListVisibility(True)
End If End If
End Set End Set
End Property End Property
@@ -1606,7 +1606,7 @@ Public Class BTLPartVM
m_SelBTLFeatureVM.RefreshFCMBtnVisibility() m_SelBTLFeatureVM.RefreshFCMBtnVisibility()
' Controlo se nPRC è 900 rendo visibile combobox Variant ' Controlo se nPRC è 900 rendo visibile combobox Variant
If m_SelBTLFeatureVM.nPRC = 900 Then If m_SelBTLFeatureVM.nPRC = 900 Then
Map.refFeatureManagerVM.SetVariant_Visibility(Visibility.Visible) Map.refFeatureManagerVM.SetVariant_Visibility(True)
Dim nVariant As Integer = 0 Dim nVariant As Integer = 0
If Integer.TryParse(m_SelBTLFeatureVM.sDES, nVariant) Then If Integer.TryParse(m_SelBTLFeatureVM.sDES, nVariant) Then
m_SelBTLFeatureVM.nSelVARIANT = nVariant m_SelBTLFeatureVM.nSelVARIANT = nVariant
@@ -1619,7 +1619,7 @@ Public Class BTLPartVM
Map.refPParameterListVM.SetCurrDraw(Map.refMainWindowVM.MainWindowM.sResourcesRoot & "\Features\" & m_SelBTLFeatureVM.sDescGRP & ".png") Map.refPParameterListVM.SetCurrDraw(Map.refMainWindowVM.MainWindowM.sResourcesRoot & "\Features\" & m_SelBTLFeatureVM.sDescGRP & ".png")
End If End If
Else Else
Map.refFeatureManagerVM.SetVariant_Visibility(Visibility.Collapsed) Map.refFeatureManagerVM.SetVariant_Visibility(False)
End If End If
End If End If
If Not IsNothing(Map.refFeatureListManagerVM) Then Map.refFeatureListManagerVM.FeatureSelectionChanged() If Not IsNothing(Map.refFeatureListManagerVM) Then Map.refFeatureListManagerVM.FeatureSelectionChanged()
@@ -1739,14 +1739,14 @@ Public Class BTLPartVM
End Get End Get
End Property End Property
Private m_bStrategyModify_Visibility As Visibility = Visibility.Collapsed Private m_bStrategyModify_Visibility As Visibility = Visibility.Hidden
Public ReadOnly Property StrategyModify_Visibility As Visibility Public ReadOnly Property StrategyModify_Visibility As Visibility
Get Get
Return m_bStrategyModify_Visibility Return m_bStrategyModify_Visibility
End Get End Get
End Property End Property
Friend Sub SetStrategyModify_Visibility(value As Visibility) Friend Sub SetStrategyModify_Visibility(value As Boolean)
m_bStrategyModify_Visibility = value m_bStrategyModify_Visibility = If(value, Visibility.Visible, Visibility.Hidden)
NotifyPropertyChanged(NameOf(StrategyModify_Visibility)) NotifyPropertyChanged(NameOf(StrategyModify_Visibility))
End Sub End Sub
@@ -1865,7 +1865,7 @@ Public Class BTLPartVM
AddHandler m_BTLFeatureVMList.CollectionChanged, AddressOf OnBTLFeatureVMListChanged AddHandler m_BTLFeatureVMList.CollectionChanged, AddressOf OnBTLFeatureVMListChanged
End Sub End Sub
Public Sub Rotation(IsPositive As Boolean, SelectedMachineType As MachineType, Optional bRedraw As Boolean = True, Optional dAng As Double = 90, Optional bVerifyDuplo As Boolean = True, Optional CmdType As CmdTypes = CalcIntegration.CmdTypes.CHECKGEN) Public Sub Rotation(IsPositive As Boolean, SelectedMachineType As MachineType, Optional bRedraw As Boolean = True, Optional dAng As Double = 90, Optional bVerifyDuplo As Boolean = True, Optional bResetCalc As Boolean = True)
Dim OldSection As SectionXMaterial = Section Dim OldSection As SectionXMaterial = Section
If m_BTLPartM.Rotation(IsPositive, SelectedMachineType, bRedraw, dAng) Then If m_BTLPartM.Rotation(IsPositive, SelectedMachineType, bRedraw, dAng) Then
' aggiorno visualizzazione dimensioni ' aggiorno visualizzazione dimensioni
@@ -1873,7 +1873,7 @@ Public Class BTLPartVM
NotifyPropertyChanged(NameOf(sH)) NotifyPropertyChanged(NameOf(sH))
NotifyPropertyChanged(NameOf(sL)) NotifyPropertyChanged(NameOf(sL))
' setto part e tutte le feature da ricalcolare ' setto part e tutte le feature da ricalcolare
If CmdType <> CmdTypes.FLIP_ROT Then ResetCalcTotalPart() If Not bResetCalc Then ResetCalcTotalPart()
' aggiorno sezioni ' aggiorno sezioni
Map.refProjectVM.BTLStructureVM.UpdateSection(Section, OldSection) Map.refProjectVM.BTLStructureVM.UpdateSection(Section, OldSection)
End If End If
@@ -2286,10 +2286,10 @@ Public Class BTLPartVM
ForwardRotation(True) ForwardRotation(True)
End Sub End Sub
Public Sub ForwardRotation(Optional bUpdateSection As Boolean = False, Optional bRedraw As Boolean = True, Optional dAng As Double = 90, Optional CmdType As CmdTypes = CalcIntegration.CmdTypes.CHECKGEN) Public Sub ForwardRotation(Optional bUpdateSection As Boolean = False, Optional bRedraw As Boolean = True, Optional dAng As Double = 90, Optional bResetCalc As Boolean = True)
' salvo sezione impostata ' salvo sezione impostata
Dim CurrSection As SectionXMaterial = Map.refProjectVM.BTLStructureVM.SelSection Dim CurrSection As SectionXMaterial = Map.refProjectVM.BTLStructureVM.SelSection
Rotation(True, Map.refProjectVM.BTLStructureVM.nPROJTYPE, bRedraw, dAng, True, CmdType) Rotation(True, Map.refProjectVM.BTLStructureVM.nPROJTYPE, bRedraw, dAng, True, bResetCalc)
' imposto lock ' imposto lock
bLockRotation = True bLockRotation = True
' se progetto travi e sezione precedente diversa da vuota (tutti i pezzi) ' se progetto travi e sezione precedente diversa da vuota (tutti i pezzi)
@@ -2390,6 +2390,7 @@ Public Class BTLPartVM
Friend Sub Verify() Friend Sub Verify()
If IsNothing(ProjectManagerVM.CurrProd) OrElse IsNothing(Map.refProjectVM.BTLStructureVM) OrElse IsNothing(Map.refProjectVM.MachGroupPanelVM) Then Return If IsNothing(ProjectManagerVM.CurrProd) OrElse IsNothing(Map.refProjectVM.BTLStructureVM) OrElse IsNothing(Map.refProjectVM.MachGroupPanelVM) Then Return
Map.refProjectVM.BTLStructureVM.SelBTLPart.SetIsRowEnabled(False)
Map.refCALCPanelVM.Verify(ProjectType.PROJ, CalcIntegration.CmdTypes.CHECKNOSIM) Map.refCALCPanelVM.Verify(ProjectType.PROJ, CalcIntegration.CmdTypes.CHECKNOSIM)
Return Return
End Sub End Sub
@@ -112,9 +112,9 @@ Public Class BTLStructureVM
If Map.refShowBeamPanelVM.ShowBuilding_IsChecked Then If Map.refShowBeamPanelVM.ShowBuilding_IsChecked Then
ShowBuilding(False, False) ShowBuilding(False, False)
Map.refShowBeamPanelVM.SetShowBuilding(False) Map.refShowBeamPanelVM.SetShowBuilding(False)
Map.refProjectVM.SetSceneShowBuldingVisibility(Visibility.Collapsed) Map.refProjectVM.SetSceneShowBuldingVisibility(False)
Map.refProjectVM.SetManagerTabVisibility(Visibility.Visible) Map.refProjectVM.SetManagerTabVisibility(True)
If Not IsNothing(Map.refProjectVM.MachGroupPanelVM) Then Map.refProjectVM.SetFeatureListVisibility(Visibility.Visible) If Not IsNothing(Map.refProjectVM.MachGroupPanelVM) Then Map.refProjectVM.SetFeatureListVisibility(True)
End If End If
SceneSelPartSelection() SceneSelPartSelection()
' seleziono pezzo in Db geometrico ' seleziono pezzo in Db geometrico
@@ -125,7 +125,6 @@ Public Class BTLStructureVM
EgtBeamShowLoadingSide(bLoadingSideShow, bLeftToRight) EgtBeamShowLoadingSide(bLoadingSideShow, bLeftToRight)
' trovo ed evidenzio MachGroup e Duplo di questo pezzo ' trovo ed evidenzio MachGroup e Duplo di questo pezzo
If Not IsNothing(Map.refProjectVM.MachGroupPanelVM) Then If Not IsNothing(Map.refProjectVM.MachGroupPanelVM) Then
Dim MachGroupList As New List(Of MyMachGroupVM)
For Each Machgroup As MyMachGroupVM In Map.refProjectVM.MachGroupPanelVM.MachGroupVMList For Each Machgroup As MyMachGroupVM In Map.refProjectVM.MachGroupPanelVM.MachGroupVMList
Dim bFound As Boolean = False Dim bFound As Boolean = False
For Each Part As PartVM In Machgroup.PartVMList For Each Part As PartVM In Machgroup.PartVMList
@@ -153,8 +152,8 @@ Public Class BTLStructureVM
bValue = False bValue = False
EgtGetInfo(FeatureParam.nFeatureId, ConstBeam.STRATEGY & FeatureParam.nFeatureId & "_FORCED", bValue) EgtGetInfo(FeatureParam.nFeatureId, ConstBeam.STRATEGY & FeatureParam.nFeatureId & "_FORCED", bValue)
If bValue Then If bValue Then
SelBTLPart.SetStrategyModify_Visibility(Visibility.Visible) SelBTLPart.SetStrategyModify_Visibility(True)
FeatureParam.SetbStrategy_Visibility(Visibility.Visible) FeatureParam.SetbStrategy_Visibility(True)
End If End If
For Each StrategySetupParam As StrategySetup In Map.refStrategyManagerVM.StrategySetupList For Each StrategySetupParam As StrategySetup In Map.refStrategyManagerVM.StrategySetupList
For Each StrategyFeatureParam As StrategyFeature In StrategySetupParam.StrategyFeatureList For Each StrategyFeatureParam As StrategyFeature In StrategySetupParam.StrategyFeatureList
@@ -163,7 +162,7 @@ Public Class BTLStructureVM
For Each Param As StrategyParameter In StrategyParam.ParameterList For Each Param As StrategyParameter In StrategyParam.ParameterList
bValueForced = False bValueForced = False
EgtGetInfo(FeatureParam.nFeatureId, StrategyParam.sStrategyId & "_" & Param.sNameNge & "_FORCED", bValueForced) EgtGetInfo(FeatureParam.nFeatureId, StrategyParam.sStrategyId & "_" & Param.sNameNge & "_FORCED", bValueForced)
If bValueForced Then FeatureParam.SetbStrategy_Visibility(Visibility.Visible) If bValueForced Then FeatureParam.SetbStrategy_Visibility(True)
Next Next
Next Next
Next Next
@@ -883,7 +882,7 @@ Public Class BTLStructureVM
bValueForced = False bValueForced = False
EgtGetInfo(m_BTLStructureM.nBTLInfoId, GeneralParameter.sNameNge & "_FORCED", bValue) EgtGetInfo(m_BTLStructureM.nBTLInfoId, GeneralParameter.sNameNge & "_FORCED", bValue)
EgtGetInfo(BTLPart.nPartId, GeneralParameter.sNameNge & "_FORCED", bValueForced) EgtGetInfo(BTLPart.nPartId, GeneralParameter.sNameNge & "_FORCED", bValueForced)
If bValueForced Then BTLPart.SetStrategyModify_Visibility(Visibility.Visible) If bValueForced Then BTLPart.SetStrategyModify_Visibility(True)
Next Next
Next Next
End If End If
@@ -1382,15 +1381,6 @@ Public Class BTLStructureVM
GetMainPrivateProfileString(S_GENERAL, K_LASTUPDATEDIR, "", sDir) GetMainPrivateProfileString(S_GENERAL, K_LASTUPDATEDIR, "", sDir)
If bWithDlg Then If bWithDlg Then
' apro finestra scelta file ' apro finestra scelta file
'Dim BTLDlg As New EgtBEAMWALL.Core.EgtManageFileDialogV(Application.Current.MainWindow, New EgtManageFileDialogVM()) With {
' .Title = EgtMsg(61834),
' .Filter = "BTL (*.btl)|*.btl" &
' "|BTLX (*.btlx)|*.btlx",
' .FilterIndex = 1,
' .InitialDirectory = If(Directory.Exists(sDir), sDir, ""),
' .CheckFileExists = True,
' .ValidateNames = True,
' .Mode = 1}
Dim BTLDlg As New Microsoft.Win32.OpenFileDialog() With { Dim BTLDlg As New Microsoft.Win32.OpenFileDialog() With {
.Title = EgtMsg(61834), .Title = EgtMsg(61834),
.DefaultExt = ".btl", .DefaultExt = ".btl",
@@ -604,7 +604,7 @@ Public Class CALCPanelVM
End If End If
End Sub End Sub
Private Sub VerifyProdWithEngine(CurrMachGroup As MyMachGroupVM, CmdType As Integer) Private Sub VerifyProdWithEngine(CurrMachGroup As MyMachGroupVM)
' se e' gia' stato assegnato a supervisor, la salto e vado alla prossima barra ' se e' gia' stato assegnato a supervisor, la salto e vado alla prossima barra
If CurrMachGroup.nProduction_State >= ItemState.Assigned Then Return If CurrMachGroup.nProduction_State >= ItemState.Assigned Then Return
Dim Args As New Dictionary(Of String, String) Dim Args As New Dictionary(Of String, String)
@@ -626,7 +626,7 @@ Public Class CALCPanelVM
Dim sMachGroupFilePath As String = BarPath & "\" & CurrMachGroup.Name.ToString() & ".ori.bwe" Dim sMachGroupFilePath As String = BarPath & "\" & CurrMachGroup.Name.ToString() & ".ori.bwe"
If File.Exists(sMachGroupFilePath) Then File.Delete(sMachGroupFilePath) If File.Exists(sMachGroupFilePath) Then File.Delete(sMachGroupFilePath)
End If End If
nCmdType = CmdType nCmdType = CalcIntegration.CmdTypes.CHECKGEN
End Select End Select
Args.Add("CmdType", nCmdType) Args.Add("CmdType", nCmdType)
Dim ExecEnvironment As EXECENVIRONMENTS = EXECENVIRONMENTS.NULL Dim ExecEnvironment As EXECENVIRONMENTS = EXECENVIRONMENTS.NULL
@@ -678,7 +678,7 @@ Public Class CALCPanelVM
ElseIf ProgramPage = ProjectType.PROD Then ElseIf ProgramPage = ProjectType.PROD Then
' se e' gia' stato assegnato a supervisor, la salto e vado alla prossima barra ' se e' gia' stato assegnato a supervisor, la salto e vado alla prossima barra
If Map.refMachGroupPanelVM.SelectedMachGroup.nProduction_State >= ItemState.Assigned Then Return If Map.refMachGroupPanelVM.SelectedMachGroup.nProduction_State >= ItemState.Assigned Then Return
VerifyProdWithEngine(Map.refMachGroupPanelVM.SelectedMachGroup, CmdType) VerifyProdWithEngine(Map.refMachGroupPanelVM.SelectedMachGroup)
End If End If
End Sub End Sub
@@ -804,7 +804,7 @@ Public Class CALCPanelVM
For PartIndex = 0 To Map.refMachGroupPanelVM.MachGroupVMList.Count - 1 For PartIndex = 0 To Map.refMachGroupPanelVM.MachGroupVMList.Count - 1
' se e' gia' stato assegnato a supervisor, la salto e vado alla prossima barra ' se e' gia' stato assegnato a supervisor, la salto e vado alla prossima barra
If DirectCast(Map.refMachGroupPanelVM.MachGroupVMList(PartIndex), MyMachGroupVM).nProduction_State >= ItemState.Assigned Then Return If DirectCast(Map.refMachGroupPanelVM.MachGroupVMList(PartIndex), MyMachGroupVM).nProduction_State >= ItemState.Assigned Then Return
VerifyProdWithEngine(Map.refMachGroupPanelVM.MachGroupVMList(PartIndex), CmdType) VerifyProdWithEngine(Map.refMachGroupPanelVM.MachGroupVMList(PartIndex))
Next Next
End If End If
End Sub End Sub
@@ -971,7 +971,7 @@ Public Class CALCPanelVM
Map.refProjectVM.BTLStructureVM = New BTLStructureVM(BTLStructureM.CreateBTLStructure(ProjId)) Map.refProjectVM.BTLStructureVM = New BTLStructureVM(BTLStructureM.CreateBTLStructure(ProjId))
For Each Part In Map.refProjectVM.BTLStructureVM.BTLPartVMList For Each Part In Map.refProjectVM.BTLStructureVM.BTLPartVMList
Part.ResetCalcTotalPart() Part.ResetCalcTotalPart()
Part.SetStrategyModify_Visibility(Visibility.Collapsed) Part.SetStrategyModify_Visibility(False)
For Each Feature As BTLFeatureVM In Part.BTLFeatureVMList For Each Feature As BTLFeatureVM In Part.BTLFeatureVMList
Map.refForcedStrategyPanelVM.ResetForcedStrategy(Feature.nFeatureId) Map.refForcedStrategyPanelVM.ResetForcedStrategy(Feature.nFeatureId)
Next Next
@@ -27,21 +27,21 @@ Public Class ConfigurationPageVM
If m_SelConfigSubPage = ConfigSubPages.GENERAL Then If m_SelConfigSubPage = ConfigSubPages.GENERAL Then
' Controllo se il file CustomConfig Json è stato modificato ' Controllo se il file CustomConfig Json è stato modificato
If Map.refStrategyManagerVM.bIsModifyStrategy Then Map.refStrategyManagerVM.SaveCustomConfigJson() If Map.refStrategyManagerVM.bIsModifyStrategy Then Map.refStrategyManagerVM.SaveCustomConfigJson()
SetGeneral_Visibility(Visibility.Visible) SetGeneral_Visibility(True)
SetStrategyManager_Visibility(Visibility.Collapsed) SetStrategyManager_Visibility(False)
SetPDFEditor_Visibility(Visibility.Collapsed) SetPDFEditor_Visibility(False)
ElseIf m_SelConfigSubPage = ConfigSubPages.MACHINE Then ElseIf m_SelConfigSubPage = ConfigSubPages.MACHINE Then
' Controllo se il file CustomConfig Json è stato modificato ' Controllo se il file CustomConfig Json è stato modificato
If Map.refStrategyManagerVM.bIsModifyStrategy Then Map.refStrategyManagerVM.SaveCustomConfigJson() If Map.refStrategyManagerVM.bIsModifyStrategy Then Map.refStrategyManagerVM.SaveCustomConfigJson()
SetGeneral_Visibility(Visibility.Collapsed) SetGeneral_Visibility(False)
SetStrategyManager_Visibility(Visibility.Collapsed) SetStrategyManager_Visibility(False)
SetPDFEditor_Visibility(Visibility.Collapsed) SetPDFEditor_Visibility(False)
ElseIf m_SelConfigSubPage = ConfigSubPages.PDFEDITOR Then ElseIf m_SelConfigSubPage = ConfigSubPages.PDFEDITOR Then
' Controllo se il file CustomConfig Json è stato modificato ' Controllo se il file CustomConfig Json è stato modificato
If Map.refStrategyManagerVM.bIsModifyStrategy Then Map.refStrategyManagerVM.SaveCustomConfigJson() If Map.refStrategyManagerVM.bIsModifyStrategy Then Map.refStrategyManagerVM.SaveCustomConfigJson()
SetPDFEditor_Visibility(Visibility.Visible) SetPDFEditor_Visibility(True)
SetGeneral_Visibility(Visibility.Collapsed) SetGeneral_Visibility(False)
SetStrategyManager_Visibility(Visibility.Collapsed) SetStrategyManager_Visibility(False)
End If End If
End Set End Set
End Property End Property
@@ -204,8 +204,8 @@ Public Class ConfigurationPageVM
Return m_bGeneral_Visibility Return m_bGeneral_Visibility
End Get End Get
End Property End Property
Friend Sub SetGeneral_Visibility(value As Visibility) Friend Sub SetGeneral_Visibility(value As Boolean)
m_bGeneral_Visibility = value m_bGeneral_Visibility = If(value, Visibility.Visible, Visibility.Collapsed)
NotifyPropertyChanged(NameOf(General_Visibility)) NotifyPropertyChanged(NameOf(General_Visibility))
End Sub End Sub
@@ -215,8 +215,8 @@ Public Class ConfigurationPageVM
Return m_bStrategyManager_Visibility Return m_bStrategyManager_Visibility
End Get End Get
End Property End Property
Friend Sub SetStrategyManager_Visibility(value As Visibility) Friend Sub SetStrategyManager_Visibility(value As Boolean)
m_bStrategyManager_Visibility = value m_bStrategyManager_Visibility = If(value, Visibility.Visible, Visibility.Collapsed)
NotifyPropertyChanged(NameOf(StrategyManager_Visibility)) NotifyPropertyChanged(NameOf(StrategyManager_Visibility))
End Sub End Sub
@@ -226,8 +226,8 @@ Public Class ConfigurationPageVM
Return m_bMachine_Visibility Return m_bMachine_Visibility
End Get End Get
End Property End Property
Friend Sub SetMachine_Visibility(value As Visibility) Friend Sub SetMachine_Visibility(value As Boolean)
m_bMachine_Visibility = value m_bMachine_Visibility = If(value, Visibility.Visible, Visibility.Collapsed)
NotifyPropertyChanged(NameOf(Machine_Visibility)) NotifyPropertyChanged(NameOf(Machine_Visibility))
End Sub End Sub
@@ -237,8 +237,8 @@ Public Class ConfigurationPageVM
Return m_bPDFEditor_Visibility Return m_bPDFEditor_Visibility
End Get End Get
End Property End Property
Friend Sub SetPDFEditor_Visibility(value As Visibility) Friend Sub SetPDFEditor_Visibility(value As Boolean)
m_bPDFEditor_Visibility = value m_bPDFEditor_Visibility = If(value, Visibility.Visible, Visibility.Collapsed)
NotifyPropertyChanged(NameOf(PDFEditor_Visibility)) NotifyPropertyChanged(NameOf(PDFEditor_Visibility))
End Sub End Sub
@@ -248,8 +248,8 @@ Public Class ConfigurationPageVM
Return m_MachineParameter_Visibility Return m_MachineParameter_Visibility
End Get End Get
End Property End Property
Friend Sub SetMachineParameter_Visibility(value As Visibility) Friend Sub SetMachineParameter_Visibility(value As Boolean)
m_MachineParameter_Visibility = value m_MachineParameter_Visibility = If(value, Visibility.Visible, Visibility.Collapsed)
NotifyPropertyChanged(NameOf(MachineParameter_Visibility)) NotifyPropertyChanged(NameOf(MachineParameter_Visibility))
End Sub End Sub
@@ -614,8 +614,8 @@ Public Class ConfigurationPageVM
SelReminder = m_ReminderList.FirstOrDefault(Function(x) x.Id = nDefaultReminderFrequency) SelReminder = m_ReminderList.FirstOrDefault(Function(x) x.Id = nDefaultReminderFrequency)
Dim nExternalBackupActive As Integer = GetMainPrivateProfileInt(S_BACKUPANDRESTORE, K_EXTERNALBACKUPACTIVE, 0) Dim nExternalBackupActive As Integer = GetMainPrivateProfileInt(S_BACKUPANDRESTORE, K_EXTERNALBACKUPACTIVE, 0)
m_bExternalBackupActive = nExternalBackupActive > 0 m_bExternalBackupActive = nExternalBackupActive > 0
SetMachineParameter_Visibility(Visibility.Collapsed) SetMachineParameter_Visibility(False)
SetMachine_Visibility(Visibility.Collapsed) SetMachine_Visibility(False)
' Recupero flag per verificare se fare solo l'importazione del btl o anche la verifica ' Recupero flag per verificare se fare solo l'importazione del btl o anche la verifica
m_bVerifyImportBTL_IsChecked = GetMainPrivateProfileInt(S_GENERAL, K_VERIFYIMPORTBTL, 0) <> 0 m_bVerifyImportBTL_IsChecked = GetMainPrivateProfileInt(S_GENERAL, K_VERIFYIMPORTBTL, 0) <> 0
'' imposto il tema '' imposto il tema
@@ -718,16 +718,6 @@ Public Class ConfigurationPageVM
End Property End Property
Public Sub ChooseExternalBackupFolderPath() Public Sub ChooseExternalBackupFolderPath()
'Dim FileDialog As New EgtBEAMWALL.Core.EgtManageFileDialogV(Application.Current.MainWindow, New EgtManageFileDialogVM()) With {
' .Title = EgtMsg(63039),
' .Filter = "BTL (*.btl)|*.btl" &
' "|BTLX (*.btlx)|*.btlx",
' .InitialDirectory = m_ExternalBackupFolderPath,
' .FileName = "Select this ",
' .FilterIndex = 1,
' .CheckFileExists = False,
' .OverwritePrompt = False,
' .Mode = 1}
Dim FileDialog As New Microsoft.Win32.SaveFileDialog() With {.InitialDirectory = m_ExternalBackupFolderPath, Dim FileDialog As New Microsoft.Win32.SaveFileDialog() With {.InitialDirectory = m_ExternalBackupFolderPath,
.CheckFileExists = False, .CheckFileExists = False,
.CheckPathExists = False, .CheckPathExists = False,
@@ -1006,7 +1006,7 @@
<Version>3.1.1.2</Version> <Version>3.1.1.2</Version>
</PackageReference> </PackageReference>
<PackageReference Include="EgwWPFBaseLib"> <PackageReference Include="EgwWPFBaseLib">
<Version>3.1.3-beta.1</Version> <Version>3.1.3-beta.6</Version>
</PackageReference> </PackageReference>
<PackageReference Include="EntityFramework"> <PackageReference Include="EntityFramework">
<Version>6.4.4</Version> <Version>6.4.4</Version>
@@ -89,7 +89,7 @@ Module MyExecProcessManager
If BTLPartItem.IsInverted Then bPreInvert = False If BTLPartItem.IsInverted Then bPreInvert = False
BTLPartItem.SetInverted(bPreInvert) BTLPartItem.SetInverted(bPreInvert)
End If End If
If nPreRotate > 0 Then BTLPartItem.ForwardRotation(True, True, dAng, Core.CalcIntegration.CmdTypes.FLIP_ROT) If nPreRotate > 0 Then BTLPartItem.ForwardRotation(True, True, dAng, False)
End If End If
' Gestione progressbar per verificare l'inizio e la fine della verifica ' Gestione progressbar per verificare l'inizio e la fine della verifica
Dim BeamManager As ExecProcessManager = m_ExecProcessManagerList(EXECENVIRONMENTS.BEAM) Dim BeamManager As ExecProcessManager = m_ExecProcessManagerList(EXECENVIRONMENTS.BEAM)
@@ -23,8 +23,8 @@ Public Class FeatureManagerVM
Return m_Variant_Visibility Return m_Variant_Visibility
End Get End Get
End Property End Property
Public Sub SetVariant_Visibility(value As Visibility) Public Sub SetVariant_Visibility(value As Boolean)
m_Variant_Visibility = value m_Variant_Visibility = If(value, Visibility.Visible, Visibility.Collapsed)
NotifyPropertyChanged(NameOf(Variant_Visibility)) NotifyPropertyChanged(NameOf(Variant_Visibility))
End Sub End Sub
@@ -285,15 +285,15 @@ Public Class ForcedStrategyPanelVM
m_SelStrategy.SetbIsStrategyModify(False) m_SelStrategy.SetbIsStrategyModify(False)
EgtRemoveInfo(m_CurrentFeature.nFeatureId, ConstBeam.STRATEGY) EgtRemoveInfo(m_CurrentFeature.nFeatureId, ConstBeam.STRATEGY)
EgtRemoveInfo(m_CurrentFeature.nFeatureId, ConstBeam.STRATEGY & m_CurrentFeature.nFeatureId & "_FORCED") EgtRemoveInfo(m_CurrentFeature.nFeatureId, ConstBeam.STRATEGY & m_CurrentFeature.nFeatureId & "_FORCED")
Map.refProjectVM.BTLStructureVM.SelBTLPart.SetStrategyModify_Visibility(Visibility.Collapsed) Map.refProjectVM.BTLStructureVM.SelBTLPart.SetStrategyModify_Visibility(False)
Map.refProjectVM.BTLStructureVM.SelBTLPart.SelBTLFeatureVM.SetbStrategy_Visibility(Visibility.Collapsed) Map.refProjectVM.BTLStructureVM.SelBTLPart.SelBTLFeatureVM.SetbStrategy_Visibility(False)
Else Else
m_SelStrategy.SetbIsStrategyModify(True) m_SelStrategy.SetbIsStrategyModify(True)
Map.refProjectVM.BTLStructureVM.SelBTLPart.SetStrategyModify_Visibility(Visibility.Visible) Map.refProjectVM.BTLStructureVM.SelBTLPart.SetStrategyModify_Visibility(True)
If Not IsNothing(Map.refProjectVM.BTLStructureVM.SelBTLPart.SelBTLFeatureVM) Then If Not IsNothing(Map.refProjectVM.BTLStructureVM.SelBTLPart.SelBTLFeatureVM) Then
Map.refProjectVM.BTLStructureVM.SelBTLPart.SelBTLFeatureVM.SetbStrategy_Visibility(Visibility.Visible) Map.refProjectVM.BTLStructureVM.SelBTLPart.SelBTLFeatureVM.SetbStrategy_Visibility(True)
ElseIf Not IsNothing(Map.refProjectVM.MachGroupPanelVM.SelectedMachGroup.SelPart.SelFeatureVM) Then ElseIf Not IsNothing(Map.refProjectVM.MachGroupPanelVM.SelectedMachGroup.SelPart.SelFeatureVM) Then
Map.refProjectVM.MachGroupPanelVM.SelectedMachGroup.SelPart.SelFeatureVM.SetbStrategy_Visibility(Visibility.Visible) Map.refProjectVM.MachGroupPanelVM.SelectedMachGroup.SelPart.SelFeatureVM.SetbStrategy_Visibility(True)
End If End If
EgtSetInfo(m_CurrentFeature.nFeatureId, ConstBeam.STRATEGY, SelStrategy.sStrategyId) EgtSetInfo(m_CurrentFeature.nFeatureId, ConstBeam.STRATEGY, SelStrategy.sStrategyId)
EgtSetInfo(m_CurrentFeature.nFeatureId, ConstBeam.STRATEGY & m_CurrentFeature.nFeatureId & "_FORCED", SelStrategy.bIsStrategyModify) EgtSetInfo(m_CurrentFeature.nFeatureId, ConstBeam.STRATEGY & m_CurrentFeature.nFeatureId & "_FORCED", SelStrategy.bIsStrategyModify)
@@ -1,7 +1,7 @@
<StackPanel x:Class="FreeContourManagerV" <StackPanel x:Class="FreeContourManagerV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Style="{StaticResource BTLPartManager_StackPanel}"> Style="{StaticResource FreeContourManager_StackPanel}">
<ComboBox ItemsSource="{Binding TypeList}" <ComboBox ItemsSource="{Binding TypeList}"
SelectedIndex="{Binding SelType, Delay=1}" SelectedIndex="{Binding SelType, Delay=1}"
@@ -74,12 +74,12 @@ Public Class GeneralParametersStrategyVM
For Each GenericItem As ProjectParameters In m_GeneralParametersList For Each GenericItem As ProjectParameters In m_GeneralParametersList
Select Case GenericItem.sMinUserLevel Select Case GenericItem.sMinUserLevel
Case UserLevel.ADVANCED Case UserLevel.ADVANCED
Map.refMainMenuVM.UserLevelGenericVisibility(GenericItem, If(Map.refMainMenuVM.UserAdmin_IsChecked, Visibility.Visible, Visibility.Collapsed)) Map.refMainMenuVM.UserLevelGenericVisibility(GenericItem, If(Map.refMainMenuVM.UserAdmin_IsChecked, True, False))
Case UserLevel.ADMINISTRATOR Case UserLevel.ADMINISTRATOR
Map.refMainMenuVM.UserLevelGenericVisibility(GenericItem, If(Map.refMainMenuVM.UnlockAllIsChecked, Visibility.Visible, Visibility.Collapsed)) Map.refMainMenuVM.UserLevelGenericVisibility(GenericItem, If(Map.refMainMenuVM.UnlockAllIsChecked, True, False))
Case Else Case Else
If Not Map.refMainMenuVM.UserAdmin_IsChecked Then If Not Map.refMainMenuVM.UserAdmin_IsChecked Then
Map.refMainMenuVM.UserLevelGenericVisibility(GenericItem, If(GenericItem.sMinUserLevel = UserLevel.USER, Visibility.Visible, Visibility.Collapsed)) Map.refMainMenuVM.UserLevelGenericVisibility(GenericItem, If(GenericItem.sMinUserLevel = UserLevel.USER, True, False))
Map.refMainMenuVM.SetUnloackImage(PADLOCK_IMAGE) Map.refMainMenuVM.SetUnloackImage(PADLOCK_IMAGE)
End If End If
End Select End Select
@@ -438,29 +438,29 @@ Public MustInherit Class ProjectParameters
Case GetType(BooleanGenericParameter) Case GetType(BooleanGenericParameter)
DirectCast(DefaultProject, BooleanGenericParameter).SetValue(ProjectParameters.sValue) DirectCast(DefaultProject, BooleanGenericParameter).SetValue(ProjectParameters.sValue)
If m_sMinUserLevel = 1 Then If m_sMinUserLevel = 1 Then
DirectCast(DefaultProject, BooleanGenericParameter).SetbBooleanVisibility(Visibility.Visible) DirectCast(DefaultProject, BooleanGenericParameter).SetbBooleanVisibility(True)
End If End If
Case GetType(DoubleGenericParameter) Case GetType(DoubleGenericParameter)
DirectCast(DefaultProject, DoubleGenericParameter).SetValue(ProjectParameters.sValue) DirectCast(DefaultProject, DoubleGenericParameter).SetValue(ProjectParameters.sValue)
If m_sMinUserLevel = 1 Then If m_sMinUserLevel = 1 Then
DirectCast(DefaultProject, DoubleGenericParameter).SetbDoubleVisibility(Visibility.Visible) DirectCast(DefaultProject, DoubleGenericParameter).SetbDoubleVisibility(True)
End If End If
Case GetType(ComboGenericParameter) Case GetType(ComboGenericParameter)
DirectCast(DefaultProject, ComboGenericParameter).SetSelValue(ProjectParameters.sValue) DirectCast(DefaultProject, ComboGenericParameter).SetSelValue(ProjectParameters.sValue)
If m_sMinUserLevel = 1 Then If m_sMinUserLevel = 1 Then
DirectCast(DefaultProject, ComboGenericParameter).SetbComboBoxVisibility(Visibility.Visible) DirectCast(DefaultProject, ComboGenericParameter).SetbComboBoxVisibility(True)
End If End If
Case GetType(StringGenericParameter) Case GetType(StringGenericParameter)
DirectCast(DefaultProject, StringGenericParameter).SetValue(ProjectParameters.sValue) DirectCast(DefaultProject, StringGenericParameter).SetValue(ProjectParameters.sValue)
If m_sMinUserLevel = 1 Then If m_sMinUserLevel = 1 Then
DirectCast(DefaultProject, StringGenericParameter).SetbStringVisibility(Visibility.Visible) DirectCast(DefaultProject, StringGenericParameter).SetbStringVisibility(True)
End If End If
Case GetType(ListGenericParameter) Case GetType(ListGenericParameter)
DirectCast(DefaultProject, ListGenericParameter).SetSelValue(ProjectParameters.sValue) DirectCast(DefaultProject, ListGenericParameter).SetSelValue(ProjectParameters.sValue)
DirectCast(DefaultProject, ListGenericParameter).CreateToolsViews() DirectCast(DefaultProject, ListGenericParameter).CreateToolsViews()
DirectCast(DefaultProject, ListGenericParameter).ToolView() DirectCast(DefaultProject, ListGenericParameter).ToolView()
If DefaultProject.sMinUserLevel = 1 Then If DefaultProject.sMinUserLevel = 1 Then
DirectCast(DefaultProject, ListGenericParameter).SetbListBoxVisibility(Visibility.Visible) DirectCast(DefaultProject, ListGenericParameter).SetbListBoxVisibility(True)
End If End If
End Select End Select
End If End If
@@ -500,8 +500,8 @@ Public Class BooleanGenericParameter
Return m_bBooleanVisibility Return m_bBooleanVisibility
End Get End Get
End Property End Property
Friend Sub SetbBooleanVisibility(value As Visibility) Friend Sub SetbBooleanVisibility(value As Boolean)
m_bBooleanVisibility = value m_bBooleanVisibility = If(value, Visibility.Visible, Visibility.Collapsed)
NotifyPropertyChanged(NameOf(bBooleanVisibility)) NotifyPropertyChanged(NameOf(bBooleanVisibility))
End Sub End Sub
@@ -514,7 +514,7 @@ Public Class BooleanGenericParameter
Friend Sub SetbIsBooleanModify(value As Boolean) Friend Sub SetbIsBooleanModify(value As Boolean)
m_bIsBooleanModify = value m_bIsBooleanModify = value
If m_bIsBooleanModify AndAlso Not IsNothing(Map.refProjectVM.BTLStructureVM.SelBTLPart) AndAlso Map.refProjectVM.bSaveGeneralParameters Then If m_bIsBooleanModify AndAlso Not IsNothing(Map.refProjectVM.BTLStructureVM.SelBTLPart) AndAlso Map.refProjectVM.bSaveGeneralParameters Then
Map.refProjectVM.BTLStructureVM.SelBTLPart.SetStrategyModify_Visibility(Visibility.Visible) Map.refProjectVM.BTLStructureVM.SelBTLPart.SetStrategyModify_Visibility(True)
End If End If
NotifyPropertyChanged(NameOf(bIsBooleanModify)) NotifyPropertyChanged(NameOf(bIsBooleanModify))
End Sub End Sub
@@ -593,8 +593,8 @@ Public Class DoubleGenericParameter
Return m_bDoubleVisibility Return m_bDoubleVisibility
End Get End Get
End Property End Property
Friend Sub SetbDoubleVisibility(value As Visibility) Friend Sub SetbDoubleVisibility(value As Boolean)
m_bDoubleVisibility = value m_bDoubleVisibility = If(value, Visibility.Visible, Visibility.Collapsed)
NotifyPropertyChanged(NameOf(bDoubleVisibility)) NotifyPropertyChanged(NameOf(bDoubleVisibility))
End Sub End Sub
@@ -607,7 +607,7 @@ Public Class DoubleGenericParameter
Friend Sub SetbIsDoubleModify(value As Boolean) Friend Sub SetbIsDoubleModify(value As Boolean)
m_bIsDoubleModify = value m_bIsDoubleModify = value
If m_bIsDoubleModify AndAlso Not IsNothing(Map.refProjectVM.BTLStructureVM.SelBTLPart) AndAlso Map.refProjectVM.bSaveGeneralParameters Then If m_bIsDoubleModify AndAlso Not IsNothing(Map.refProjectVM.BTLStructureVM.SelBTLPart) AndAlso Map.refProjectVM.bSaveGeneralParameters Then
Map.refProjectVM.BTLStructureVM.SelBTLPart.SetStrategyModify_Visibility(Visibility.Visible) Map.refProjectVM.BTLStructureVM.SelBTLPart.SetStrategyModify_Visibility(True)
End If End If
NotifyPropertyChanged(NameOf(bIsDoubleModify)) NotifyPropertyChanged(NameOf(bIsDoubleModify))
End Sub End Sub
@@ -669,8 +669,8 @@ Public Class StringGenericParameter
Return m_bStringVisibility Return m_bStringVisibility
End Get End Get
End Property End Property
Friend Sub SetbStringVisibility(value As Visibility) Friend Sub SetbStringVisibility(value As Boolean)
m_bStringVisibility = value m_bStringVisibility = If(value, Visibility.Visible, Visibility.Collapsed)
NotifyPropertyChanged(NameOf(bStringVisibility)) NotifyPropertyChanged(NameOf(bStringVisibility))
End Sub End Sub
@@ -683,7 +683,7 @@ Public Class StringGenericParameter
Friend Sub SetbIsStringModify(value As Boolean) Friend Sub SetbIsStringModify(value As Boolean)
m_bIsStringModify = value m_bIsStringModify = value
If m_bIsStringModify AndAlso Not IsNothing(Map.refProjectVM.BTLStructureVM.SelBTLPart) AndAlso Map.refProjectVM.bSaveGeneralParameters Then If m_bIsStringModify AndAlso Not IsNothing(Map.refProjectVM.BTLStructureVM.SelBTLPart) AndAlso Map.refProjectVM.bSaveGeneralParameters Then
Map.refProjectVM.BTLStructureVM.SelBTLPart.SetStrategyModify_Visibility(Visibility.Visible) Map.refProjectVM.BTLStructureVM.SelBTLPart.SetStrategyModify_Visibility(True)
End If End If
NotifyPropertyChanged(NameOf(bIsStringModify)) NotifyPropertyChanged(NameOf(bIsStringModify))
End Sub End Sub
@@ -758,8 +758,8 @@ Public Class ComboGenericParameter
Return m_bComboBoxVisibility Return m_bComboBoxVisibility
End Get End Get
End Property End Property
Friend Sub SetbComboBoxVisibility(value As Visibility) Friend Sub SetbComboBoxVisibility(value As Boolean)
m_bComboBoxVisibility = value m_bComboBoxVisibility = If(value, Visibility.Visible, Visibility.Collapsed)
NotifyPropertyChanged(NameOf(bComboBoxVisibility)) NotifyPropertyChanged(NameOf(bComboBoxVisibility))
End Sub End Sub
@@ -772,7 +772,7 @@ Public Class ComboGenericParameter
Friend Sub SetbIsComboBoxModify(value As Boolean) Friend Sub SetbIsComboBoxModify(value As Boolean)
m_bIsComboBoxModify = value m_bIsComboBoxModify = value
If m_bIsComboBoxModify AndAlso Not IsNothing(Map.refProjectVM.BTLStructureVM.SelBTLPart) AndAlso Map.refProjectVM.bSaveGeneralParameters Then If m_bIsComboBoxModify AndAlso Not IsNothing(Map.refProjectVM.BTLStructureVM.SelBTLPart) AndAlso Map.refProjectVM.bSaveGeneralParameters Then
Map.refProjectVM.BTLStructureVM.SelBTLPart.SetStrategyModify_Visibility(Visibility.Visible) Map.refProjectVM.BTLStructureVM.SelBTLPart.SetStrategyModify_Visibility(True)
End If End If
NotifyPropertyChanged(NameOf(bIsComboBoxModify)) NotifyPropertyChanged(NameOf(bIsComboBoxModify))
End Sub End Sub
@@ -870,8 +870,8 @@ Public Class ListGenericParameter
Return m_bAvailableToolListVisibility Return m_bAvailableToolListVisibility
End Get End Get
End Property End Property
Friend Sub SetAvailableToolListVisibility(value As Visibility) Friend Sub SetAvailableToolListVisibility(value As Boolean)
m_bAvailableToolListVisibility = value m_bAvailableToolListVisibility = If(value, Visibility.Visible, Visibility.Collapsed)
NotifyPropertyChanged(NameOf(AvailableToolListVisibility)) NotifyPropertyChanged(NameOf(AvailableToolListVisibility))
End Sub End Sub
@@ -914,8 +914,8 @@ Public Class ListGenericParameter
Return m_bListBoxVisibility Return m_bListBoxVisibility
End Get End Get
End Property End Property
Friend Sub SetbListBoxVisibility(value As Visibility) Friend Sub SetbListBoxVisibility(value As Boolean)
m_bListBoxVisibility = value m_bListBoxVisibility = If(value, Visibility.Visible, Visibility.Collapsed)
NotifyPropertyChanged(NameOf(bListBoxVisibility)) NotifyPropertyChanged(NameOf(bListBoxVisibility))
End Sub End Sub
@@ -928,7 +928,7 @@ Public Class ListGenericParameter
Friend Sub SetbIsListModify(value As Boolean) Friend Sub SetbIsListModify(value As Boolean)
m_bIsListModify = value m_bIsListModify = value
If m_bIsListModify AndAlso Not IsNothing(Map.refProjectVM.BTLStructureVM.SelBTLPart) AndAlso Map.refProjectVM.bSaveGeneralParameters Then If m_bIsListModify AndAlso Not IsNothing(Map.refProjectVM.BTLStructureVM.SelBTLPart) AndAlso Map.refProjectVM.bSaveGeneralParameters Then
Map.refProjectVM.BTLStructureVM.SelBTLPart.SetStrategyModify_Visibility(Visibility.Visible) Map.refProjectVM.BTLStructureVM.SelBTLPart.SetStrategyModify_Visibility(True)
End If End If
NotifyPropertyChanged(NameOf(bIsListModify)) NotifyPropertyChanged(NameOf(bIsListModify))
End Sub End Sub
@@ -1044,7 +1044,7 @@ Public Class ListGenericParameter
End Property End Property
Friend Sub OpenToolList() Friend Sub OpenToolList()
SetAvailableToolListVisibility(Visibility.Visible) SetAvailableToolListVisibility(True)
SetOpenToolListIsEnable(False) SetOpenToolListIsEnable(False)
End Sub End Sub
@@ -1062,7 +1062,7 @@ Public Class ListGenericParameter
End Property End Property
Friend Sub CloseToolList() Friend Sub CloseToolList()
SetAvailableToolListVisibility(Visibility.Collapsed) SetAvailableToolListVisibility(False)
SetOpenToolListIsEnable(True) SetOpenToolListIsEnable(True)
End Sub End Sub
@@ -108,12 +108,12 @@ Public Class GeneralParametersWndVM
For Each GenericItem As ProjectParameters In m_GeneralParametersList For Each GenericItem As ProjectParameters In m_GeneralParametersList
Select Case GenericItem.sMinUserLevel Select Case GenericItem.sMinUserLevel
Case UserLevel.ADVANCED Case UserLevel.ADVANCED
Map.refMainMenuVM.UserLevelGenericVisibility(GenericItem, If(Map.refMainMenuVM.UserAdmin_IsChecked, Visibility.Visible, Visibility.Collapsed)) Map.refMainMenuVM.UserLevelGenericVisibility(GenericItem, If(Map.refMainMenuVM.UserAdmin_IsChecked, True, False))
Case UserLevel.ADMINISTRATOR Case UserLevel.ADMINISTRATOR
Map.refMainMenuVM.UserLevelGenericVisibility(GenericItem, If(Map.refMainMenuVM.UnlockAllIsChecked, Visibility.Visible, Visibility.Collapsed)) Map.refMainMenuVM.UserLevelGenericVisibility(GenericItem, If(Map.refMainMenuVM.UnlockAllIsChecked, True, False))
Case Else Case Else
If Not Map.refMainMenuVM.UserAdmin_IsChecked Then If Not Map.refMainMenuVM.UserAdmin_IsChecked Then
Map.refMainMenuVM.UserLevelGenericVisibility(GenericItem, If(GenericItem.sMinUserLevel = UserLevel.USER, Visibility.Visible, Visibility.Collapsed)) Map.refMainMenuVM.UserLevelGenericVisibility(GenericItem, If(GenericItem.sMinUserLevel = UserLevel.USER, True, False))
Map.refMainMenuVM.SetUnloackImage(PADLOCK_IMAGE) Map.refMainMenuVM.SetUnloackImage(PADLOCK_IMAGE)
End If End If
End Select End Select
@@ -156,13 +156,13 @@ Public Class JsonGeneralParameters
ProjectParameters = New BooleanGenericParameter() ProjectParameters = New BooleanGenericParameter()
DirectCast(ProjectParameters, BooleanGenericParameter).SetValue(m_sValue) DirectCast(ProjectParameters, BooleanGenericParameter).SetValue(m_sValue)
If m_sMinUserLevel = 1 Then If m_sMinUserLevel = 1 Then
DirectCast(ProjectParameters, BooleanGenericParameter).SetbBooleanVisibility(Visibility.Visible) DirectCast(ProjectParameters, BooleanGenericParameter).SetbBooleanVisibility(True)
End If End If
Case "d" Case "d"
ProjectParameters = New DoubleGenericParameter() ProjectParameters = New DoubleGenericParameter()
DirectCast(ProjectParameters, DoubleGenericParameter).SetValue(m_sValue) DirectCast(ProjectParameters, DoubleGenericParameter).SetValue(m_sValue)
If m_sMinUserLevel = 1 Then If m_sMinUserLevel = 1 Then
DirectCast(ProjectParameters, DoubleGenericParameter).SetbDoubleVisibility(Visibility.Visible) DirectCast(ProjectParameters, DoubleGenericParameter).SetbDoubleVisibility(True)
End If End If
Case "combo" Case "combo"
ProjectParameters = New ComboGenericParameter() ProjectParameters = New ComboGenericParameter()
@@ -171,19 +171,19 @@ Public Class JsonGeneralParameters
Next Next
DirectCast(ProjectParameters, ComboGenericParameter).SetSelValue(m_sValue) DirectCast(ProjectParameters, ComboGenericParameter).SetSelValue(m_sValue)
If m_sMinUserLevel = 1 Then If m_sMinUserLevel = 1 Then
DirectCast(ProjectParameters, ComboGenericParameter).SetbComboBoxVisibility(Visibility.Visible) DirectCast(ProjectParameters, ComboGenericParameter).SetbComboBoxVisibility(True)
End If End If
Case "tool" Case "tool"
'ProjectParameters = New ListGenericParameter(m_sSubType) 'ProjectParameters = New ListGenericParameter(m_sSubType)
'DirectCast(ProjectParameters, ListGenericParameter).CreateToolsViews() 'DirectCast(ProjectParameters, ListGenericParameter).CreateToolsViews()
'If m_sMinUserLevel = 1 Then 'If m_sMinUserLevel = 1 Then
' DirectCast(ProjectParameters, ListGenericParameter).SetbListBoxVisibility(Visibility.Visible) ' DirectCast(ProjectParameters, ListGenericParameter).SetbListBoxVisibility(True)
'End If 'End If
Case "s" Case "s"
ProjectParameters = New StringGenericParameter() ProjectParameters = New StringGenericParameter()
DirectCast(ProjectParameters, StringGenericParameter).SetValue(m_sValue) DirectCast(ProjectParameters, StringGenericParameter).SetValue(m_sValue)
If m_sMinUserLevel = 1 Then If m_sMinUserLevel = 1 Then
DirectCast(ProjectParameters, StringGenericParameter).SetbStringVisibility(Visibility.Visible) DirectCast(ProjectParameters, StringGenericParameter).SetbStringVisibility(True)
End If End If
Case Else Case Else
EgtOutLog("Tipo: " & m_sType & " non presente") EgtOutLog("Tipo: " & m_sType & " non presente")
@@ -155,13 +155,13 @@ Public Class JsonProjectParameters
ProjectParameters = New BooleanGenericParameter() ProjectParameters = New BooleanGenericParameter()
DirectCast(ProjectParameters, BooleanGenericParameter).SetValue(m_sValue) DirectCast(ProjectParameters, BooleanGenericParameter).SetValue(m_sValue)
If m_sMinUserLevel = 1 Then If m_sMinUserLevel = 1 Then
DirectCast(ProjectParameters, BooleanGenericParameter).SetbBooleanVisibility(Visibility.Visible) DirectCast(ProjectParameters, BooleanGenericParameter).SetbBooleanVisibility(True)
End If End If
Case "d" Case "d"
ProjectParameters = New DoubleGenericParameter() ProjectParameters = New DoubleGenericParameter()
DirectCast(ProjectParameters, DoubleGenericParameter).SetValue(m_sValue) DirectCast(ProjectParameters, DoubleGenericParameter).SetValue(m_sValue)
If m_sMinUserLevel = 1 Then If m_sMinUserLevel = 1 Then
DirectCast(ProjectParameters, DoubleGenericParameter).SetbDoubleVisibility(Visibility.Visible) DirectCast(ProjectParameters, DoubleGenericParameter).SetbDoubleVisibility(True)
End If End If
Case "combo" Case "combo"
ProjectParameters = New ComboGenericParameter() ProjectParameters = New ComboGenericParameter()
@@ -170,19 +170,19 @@ Public Class JsonProjectParameters
Next Next
DirectCast(ProjectParameters, ComboGenericParameter).SetSelValue(m_sValue) DirectCast(ProjectParameters, ComboGenericParameter).SetSelValue(m_sValue)
If m_sMinUserLevel = 1 Then If m_sMinUserLevel = 1 Then
DirectCast(ProjectParameters, ComboGenericParameter).SetbComboBoxVisibility(Visibility.Visible) DirectCast(ProjectParameters, ComboGenericParameter).SetbComboBoxVisibility(True)
End If End If
Case "tool" Case "tool"
'ProjectParameters = New ListGenericParameter(m_sSubType) 'ProjectParameters = New ListGenericParameter(m_sSubType)
'DirectCast(ProjectParameters, ListGenericParameter).CreateToolsViews() 'DirectCast(ProjectParameters, ListGenericParameter).CreateToolsViews()
'If m_sMinUserLevel = 1 Then 'If m_sMinUserLevel = 1 Then
' DirectCast(ProjectParameters, ListGenericParameter).SetbListBoxVisibility(Visibility.Visible) ' DirectCast(ProjectParameters, ListGenericParameter).SetbListBoxVisibility(True)
'End If 'End If
Case "s" Case "s"
ProjectParameters = New StringGenericParameter() ProjectParameters = New StringGenericParameter()
DirectCast(ProjectParameters, StringGenericParameter).SetValue(m_sValue) DirectCast(ProjectParameters, StringGenericParameter).SetValue(m_sValue)
If m_sMinUserLevel = 1 Then If m_sMinUserLevel = 1 Then
DirectCast(ProjectParameters, StringGenericParameter).SetbStringVisibility(Visibility.Visible) DirectCast(ProjectParameters, StringGenericParameter).SetbStringVisibility(True)
End If End If
Case Else Case Else
EgtOutLog("Tipo: " & m_sType & " non presente") EgtOutLog("Tipo: " & m_sType & " non presente")
@@ -81,6 +81,11 @@
ShowSearchPanelResultInfo="True" ShowSearchPanelResultInfo="True"
ShowSearchPanelNavigationButtons="True"> ShowSearchPanelNavigationButtons="True">
<dxg:TableView.RowStyle>
<Style TargetType="dxg:RowControl">
<Setter Property="IsEnabled" Value="{Binding Row.IsRowEnabled}"/>
</Style>
</dxg:TableView.RowStyle>
<dxg:TableView.ColumnHeaderStyle> <dxg:TableView.ColumnHeaderStyle>
<Style TargetType="dxg:BaseGridHeader"> <Style TargetType="dxg:BaseGridHeader">
<Setter Property="Background" Value="{StaticResource DataGridColumnHeader.Static.Main.Background}"/> <Setter Property="Background" Value="{StaticResource DataGridColumnHeader.Static.Main.Background}"/>
@@ -401,7 +406,8 @@
<RowDefinition Height="1*"/> <RowDefinition Height="1*"/>
<RowDefinition Height="Auto"/> <RowDefinition Height="Auto"/>
</Grid.RowDefinitions> </Grid.RowDefinitions>
<TextBlock Visibility="{Binding RowData.Row.CALC_ROT_Visibility}" <TextBlock Text="&#11119;"
Visibility="{Binding RowData.Row.CALC_ROT_Visibility}"
Style="{StaticResource CALC_ROT_TextBlock}"/> Style="{StaticResource CALC_ROT_TextBlock}"/>
<TextBlock Grid.Row="1" <TextBlock Grid.Row="1"
@@ -410,6 +416,7 @@
Style="{StaticResource CALC_ERR_TextBlock}"/> Style="{StaticResource CALC_ERR_TextBlock}"/>
</Grid> </Grid>
<TextBlock Grid.Column="3" <TextBlock Grid.Column="3"
Text="&#9999;"
Visibility="{Binding RowData.Row.StrategyModify_Visibility}" Visibility="{Binding RowData.Row.StrategyModify_Visibility}"
Style="{StaticResource StrategyModify_TextBlock}"/> Style="{StaticResource StrategyModify_TextBlock}"/>
</Grid> </Grid>
@@ -17,6 +17,11 @@
ColumnHeaderStyle="{StaticResource Main_DataGridColumnHeader}" ColumnHeaderStyle="{StaticResource Main_DataGridColumnHeader}"
CellStyle="{StaticResource CellDataGrid_CustomHighLight}" CellStyle="{StaticResource CellDataGrid_CustomHighLight}"
Style="{StaticResource Optimizer_DataGrid}"> Style="{StaticResource Optimizer_DataGrid}">
<DataGrid.RowStyle>
<Style TargetType="DataGridRow" BasedOn="{StaticResource RowDataGrid_CustomHighLight}">
<Setter Property="IsEnabled" Value="{Binding IsEnabled}"/>
</Style>
</DataGrid.RowStyle>
<DataGrid.InputBindings> <DataGrid.InputBindings>
<KeyBinding Key="Delete" Command="{Binding Tag.SelFeatureVM.DeleteFeature_Command, <KeyBinding Key="Delete" Command="{Binding Tag.SelFeatureVM.DeleteFeature_Command,
@@ -27,6 +32,7 @@
<DataGridTemplateColumn.HeaderTemplate> <DataGridTemplateColumn.HeaderTemplate>
<DataTemplate> <DataTemplate>
<CheckBox IsChecked="{Binding Path=Tag.bDOALL, RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:FeatureInPartInRawPartListV}}}" <CheckBox IsChecked="{Binding Path=Tag.bDOALL, RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:FeatureInPartInRawPartListV}}}"
IsEnabled="{Binding Path=Tag.ButtonIsEnabled, RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:FeatureInPartInRawPartListV}}}"
Style="{StaticResource FeatureInPartInRawPartList_CheckBox}"/> Style="{StaticResource FeatureInPartInRawPartList_CheckBox}"/>
</DataTemplate> </DataTemplate>
</DataGridTemplateColumn.HeaderTemplate> </DataGridTemplateColumn.HeaderTemplate>
@@ -144,8 +144,8 @@ Public Class PParameterListVM
Map.refProjectVM.BTLStructureVM.SelBTLPart.SelBTLFeatureVM.ResetCalcFeature() Map.refProjectVM.BTLStructureVM.SelBTLPart.SelBTLFeatureVM.ResetCalcFeature()
Map.refProjectVM.BTLStructureVM.SelBTLPart.ResetCalcPart() Map.refProjectVM.BTLStructureVM.SelBTLPart.ResetCalcPart()
Map.refForcedStrategyPanelVM.ForcedStrategy() Map.refForcedStrategyPanelVM.ForcedStrategy()
Map.refProjectVM.SetRawPartManagerVisibility(Visibility.Visible) Map.refProjectVM.SetRawPartManagerVisibility(True)
Map.refProjectVM.SetStrategyManagerVisibility(Visibility.Collapsed) Map.refProjectVM.SetStrategyManagerVisibility(False)
Map.refProjectVM.SetSelManagerTab(ProjectVM.StrategyManagerTab.RAWPARTMANAGER) Map.refProjectVM.SetSelManagerTab(ProjectVM.StrategyManagerTab.RAWPARTMANAGER)
Map.refProjectVM.SetSelFeatureManagerTab(ProjectVM.FeatureManagerTab.FEATURERAWPARTMANAGER) Map.refProjectVM.SetSelFeatureManagerTab(ProjectVM.FeatureManagerTab.FEATURERAWPARTMANAGER)
' Abilito LeftPanel ' Abilito LeftPanel
@@ -167,8 +167,8 @@ Public Class PParameterListVM
End Property End Property
Public Sub Cancel() Public Sub Cancel()
Map.refProjectVM.SetRawPartManagerVisibility(Visibility.Visible) Map.refProjectVM.SetRawPartManagerVisibility(True)
Map.refProjectVM.SetStrategyManagerVisibility(Visibility.Collapsed) Map.refProjectVM.SetStrategyManagerVisibility(False)
Map.refProjectVM.SetSelManagerTab(ProjectVM.StrategyManagerTab.RAWPARTMANAGER) Map.refProjectVM.SetSelManagerTab(ProjectVM.StrategyManagerTab.RAWPARTMANAGER)
Map.refProjectVM.SetSelFeatureManagerTab(ProjectVM.FeatureManagerTab.FEATURERAWPARTMANAGER) Map.refProjectVM.SetSelFeatureManagerTab(ProjectVM.FeatureManagerTab.FEATURERAWPARTMANAGER)
' Abilito LeftPanel ' Abilito LeftPanel
@@ -17,12 +17,12 @@ Public Class MyMachGroupPanelVM
EgtBeamShowLoadingSide(False, False) EgtBeamShowLoadingSide(False, False)
' se modalita' assemblato ' se modalita' assemblato
If Map.refShowBeamPanelVM.ShowBuilding_IsChecked Then If Map.refShowBeamPanelVM.ShowBuilding_IsChecked Then
Map.refProjectVM.SetSceneShowBuldingVisibility(Visibility.Collapsed) Map.refProjectVM.SetSceneShowBuldingVisibility(False)
' devo smontarlo prima di calcolare le travi, altrimenti non trova i pezzi ' devo smontarlo prima di calcolare le travi, altrimenti non trova i pezzi
Map.refProjectVM.BTLStructureVM.ShowBuilding(False, False) Map.refProjectVM.BTLStructureVM.ShowBuilding(False, False)
Map.refShowBeamPanelVM.SetShowBuilding(False) Map.refShowBeamPanelVM.SetShowBuilding(False)
Map.refProjectVM.SetManagerTabVisibility(Visibility.Visible) Map.refProjectVM.SetManagerTabVisibility(True)
If Not IsNothing(Map.refProjectVM.MachGroupPanelVM) Then Map.refProjectVM.SetFeatureListVisibility(Visibility.Visible) If Not IsNothing(Map.refProjectVM.MachGroupPanelVM) Then Map.refProjectVM.SetFeatureListVisibility(True)
End If End If
If Not IsNothing(Map.refProjectVM.BTLStructureVM) Then If Not IsNothing(Map.refProjectVM.BTLStructureVM) Then
For BTLPartIndex = 0 To Map.refProjectVM.BTLStructureVM.BTLPartVMList.Count - 1 For BTLPartIndex = 0 To Map.refProjectVM.BTLStructureVM.BTLPartVMList.Count - 1
@@ -38,7 +38,7 @@ Public Class MyMachGroupPanelVM
Map.refProjectVM.SetLastSelGridType(ProjectVM.GridSelTypes.MACHGROUP) Map.refProjectVM.SetLastSelGridType(ProjectVM.GridSelTypes.MACHGROUP)
End If End If
If IsNothing(Map.refProjectVM.BTLStructureVM.SelBTLPart) Then If IsNothing(Map.refProjectVM.BTLStructureVM.SelBTLPart) Then
Map.refProjectVM.SetFeatureListVisibility(Visibility.Collapsed) Map.refProjectVM.SetFeatureListVisibility(False)
End If End If
Map.refMyStatusBarVM.SetLoadingProgress(0) Map.refMyStatusBarVM.SetLoadingProgress(0)
Map.refMyStatusBarVM.SetOutputMessage("") Map.refMyStatusBarVM.SetOutputMessage("")
@@ -52,7 +52,7 @@ Public Class MyMachGroupVM
End If End If
Next Next
End If End If
Map.refProjectVM.SetFeatureListVisibility(Visibility.Collapsed) Map.refProjectVM.SetFeatureListVisibility(False)
End If End If
' se modalita' assemblato ' se modalita' assemblato
If Map.refShowBeamPanelVM.ShowBuilding_IsChecked AndAlso Map.refShowBeamPanelVM.bShowAll Then If Map.refShowBeamPanelVM.ShowBuilding_IsChecked AndAlso Map.refShowBeamPanelVM.bShowAll Then
@@ -63,7 +63,7 @@ Public Class MyMachGroupVM
' seleziono pezzo ' seleziono pezzo
EgtDeselectAll() EgtDeselectAll()
If Not IsNothing(value) Then If Not IsNothing(value) Then
Map.refProjectVM.SetFeatureListVisibility(Visibility.Visible) Map.refProjectVM.SetFeatureListVisibility(True)
EgtSelectObj(SelPart.nPartId) EgtSelectObj(SelPart.nPartId)
' trovo ed evidenzio BTLPart di questo pezzo ' trovo ed evidenzio BTLPart di questo pezzo
If Not IsNothing(Map.refProjectVM.MachGroupPanelVM) Then If Not IsNothing(Map.refProjectVM.MachGroupPanelVM) Then
@@ -80,11 +80,11 @@ Public Class MyMachGroupVM
NotifyPropertyChanged(NameOf(SelPart)) NotifyPropertyChanged(NameOf(SelPart))
' se modalità building, la tolgo ' se modalità building, la tolgo
If Map.refShowBeamPanelVM.ShowBuilding_IsChecked Then If Map.refShowBeamPanelVM.ShowBuilding_IsChecked Then
Map.refProjectVM.SetSceneShowBuldingVisibility(Visibility.Collapsed) Map.refProjectVM.SetSceneShowBuldingVisibility(False)
Map.refProjectVM.BTLStructureVM.ShowBuilding(False, False) Map.refProjectVM.BTLStructureVM.ShowBuilding(False, False)
Map.refShowBeamPanelVM.SetShowBuilding(False) Map.refShowBeamPanelVM.SetShowBuilding(False)
Map.refProjectVM.SetManagerTabVisibility(Visibility.Visible) Map.refProjectVM.SetManagerTabVisibility(True)
If Not IsNothing(Map.refProjectVM.MachGroupPanelVM) Then Map.refProjectVM.SetFeatureListVisibility(Visibility.Visible) If Not IsNothing(Map.refProjectVM.MachGroupPanelVM) Then Map.refProjectVM.SetFeatureListVisibility(True)
End If End If
End Set End Set
End Property End Property
@@ -312,6 +312,12 @@ Public Class MyMachGroupVM
NotifyPropertyChanged(NameOf(IsRowEnabled)) NotifyPropertyChanged(NameOf(IsRowEnabled))
End Sub End Sub
Public ReadOnly Property ButtonIsEnabled As Boolean
Get
Return nProduction_State < ItemState.Assigned
End Get
End Property
#Region "Messages" #Region "Messages"
Public ReadOnly Property Verify_ToolTip As String Public ReadOnly Property Verify_ToolTip As String
@@ -721,6 +727,7 @@ Public Class MyMachGroupVM
nProduction_State = MachGroupModel.State nProduction_State = MachGroupModel.State
dtStartTime = MachGroupModel.DtStart dtStartTime = MachGroupModel.DtStart
dtEndTime = MachGroupModel.DtEnd dtEndTime = MachGroupModel.DtEnd
NotifyPropertyChanged(NameOf(ButtonIsEnabled))
End If End If
End Sub End Sub
@@ -933,6 +940,7 @@ Public Class MyMachGroupVM
Friend Sub Verify() Friend Sub Verify()
If ((IsNothing(ProjectManagerVM.CurrProd) OrElse IsNothing(Map.refProjectVM.BTLStructureVM) OrElse IsNothing(Map.refProjectVM.MachGroupPanelVM))) Then Return If ((IsNothing(ProjectManagerVM.CurrProd) OrElse IsNothing(Map.refProjectVM.BTLStructureVM) OrElse IsNothing(Map.refProjectVM.MachGroupPanelVM))) Then Return
Map.refProjectVM.BTLStructureVM.SelBTLPart.SetIsRowEnabled(False)
Map.refCALCPanelVM.Verify(ProjectType.PROD, CalcIntegration.CmdTypes.CHECKGEN) Map.refCALCPanelVM.Verify(ProjectType.PROD, CalcIntegration.CmdTypes.CHECKGEN)
Return Return
End Sub End Sub
@@ -1076,6 +1084,11 @@ Public Class MyMachGroupVM
DbControllers.m_PartController.UpdateStatus(ProjectManagerVM.CurrProd.nProdId, MachGroup.Id, Part.nPartId, ItemState.Assigned) DbControllers.m_PartController.UpdateStatus(ProjectManagerVM.CurrProd.nProdId, MachGroup.Id, Part.nPartId, ItemState.Assigned)
Part.nProduction_State = ItemState.Assigned Part.nProduction_State = ItemState.Assigned
Part.NotifyPropertyChanged(NameOf(Part.Background)) Part.NotifyPropertyChanged(NameOf(Part.Background))
MachGroup.NotifyPropertyChanged(NameOf(MachGroup.ButtonIsEnabled))
Part.NotifyPropertyChanged(NameOf(Part.ButtonIsEnabled))
For Each Feature As BTLFeatureVM In Part.FeatureVMList
Feature.NotifyPropertyChanged(NameOf(Feature.IsEnabled))
Next
' disabilito impostazione modificato ' disabilito impostazione modificato
Dim DisableMgr As New DisableModifiedMgr Dim DisableMgr As New DisableModifiedMgr
' blocco modifica del pezzo ' blocco modifica del pezzo
@@ -513,6 +513,10 @@ Public Class PartVM
Dim PartModel As PartModel = DbControllers.m_PartController.FindByPartId(ProjectManagerVM.CurrProd.nProdId, nPartId) Dim PartModel As PartModel = DbControllers.m_PartController.FindByPartId(ProjectManagerVM.CurrProd.nProdId, nPartId)
If Not IsNothing(PartModel) Then If Not IsNothing(PartModel) Then
PartM.SetProductionState(PartModel.State) PartM.SetProductionState(PartModel.State)
For Each Feature As BTLFeatureVM In m_FeatureVMList
Feature.NotifyPropertyChanged(NameOf(Feature.IsEnabled))
Next
NotifyPropertyChanged(NameOf(ButtonIsEnabled))
PartM.dtStartTime = PartModel.DtStart PartM.dtStartTime = PartModel.DtStart
PartM.dtEndTime = PartModel.DtEnd PartM.dtEndTime = PartModel.DtEnd
' verifico se bloccare o sbloccare duplo ' verifico se bloccare o sbloccare duplo
@@ -620,7 +624,7 @@ Public Class PartVM
Protected Overrides Sub CreateBTLFeatureVMList() Protected Overrides Sub CreateBTLFeatureVMList()
Dim all As List(Of BTLFeatureVM) = (From BTLFeatureM In m_PartM.GetBTLFeatures() Dim all As List(Of BTLFeatureVM) = (From BTLFeatureM In m_PartM.GetBTLFeatures()
Select New BTLFeatureVM(BTLFeatureM)).ToList() Select New BTLFeatureVM(BTLFeatureM, m_PartM)).ToList()
For Each BTLFeatureVM As BTLFeatureVM In all For Each BTLFeatureVM As BTLFeatureVM In all
AddHandler BTLFeatureVM.PropertyChanged, AddressOf OnBTLFeatureVMPropertyChanged AddHandler BTLFeatureVM.PropertyChanged, AddressOf OnBTLFeatureVMPropertyChanged
@@ -2,6 +2,7 @@
Imports EgtBEAMWALL.Core Imports EgtBEAMWALL.Core
Imports EgtUILib Imports EgtUILib
Imports EgtWPFLib5 Imports EgtWPFLib5
Imports Google.Protobuf.WellKnownTypes
Public Class MachinePanelVM Public Class MachinePanelVM
Inherits EgtWPFLib5.MachinePanelVM Inherits EgtWPFLib5.MachinePanelVM
@@ -76,8 +77,8 @@ Public Class MachinePanelVM
Return m_ChooseMachine_Visibility Return m_ChooseMachine_Visibility
End Get End Get
End Property End Property
Friend Sub SetChooseMachine_Visibility(IsVisible As Visibility) Friend Sub SetChooseMachine_Visibility(IsVisible As Boolean)
m_ChooseMachine_Visibility = IsVisible m_ChooseMachine_Visibility = If(IsVisible, Visibility.Visible, Visibility.Collapsed)
NotifyPropertyChanged(NameOf(ChooseMachine_Visibility)) NotifyPropertyChanged(NameOf(ChooseMachine_Visibility))
End Sub End Sub
@@ -364,7 +365,7 @@ Public Class MachinePanelVM
End Property End Property
Friend Sub ChooseMachine() Friend Sub ChooseMachine()
SetChooseMachine_Visibility(Visibility.Visible) SetChooseMachine_Visibility(True)
End Sub End Sub
#End Region ' ChooseMachine #End Region ' ChooseMachine
@@ -382,7 +383,7 @@ Public Class MachinePanelVM
Friend Sub Ok() Friend Sub Ok()
SetSelMachineName(m_SelectedMachine.Name) SetSelMachineName(m_SelectedMachine.Name)
SetChooseMachine_Visibility(Visibility.Collapsed) SetChooseMachine_Visibility(False)
End Sub End Sub
#End Region ' Ok #End Region ' Ok
+19 -50
View File
@@ -375,7 +375,7 @@ Public Class MainMenuVM
''' Funzione che gestisce la visibilità dei parametri in base al livello utente ''' Funzione che gestisce la visibilità dei parametri in base al livello utente
''' </summary> ''' </summary>
''' <param name="Param"></param> ''' <param name="Param"></param>
Friend Sub UserLevelVisibility(Param As StrategyParameter, Visibility As Visibility) Friend Sub UserLevelVisibility(Param As StrategyParameter, Visibility As Boolean)
Select Case Param.GetType() Select Case Param.GetType()
Case GetType(BooleanStrategyParameter) Case GetType(BooleanStrategyParameter)
DirectCast(Param, BooleanStrategyParameter).SetbBooleanVisibility(Visibility) DirectCast(Param, BooleanStrategyParameter).SetbBooleanVisibility(Visibility)
@@ -390,7 +390,7 @@ Public Class MainMenuVM
End Select End Select
End Sub End Sub
Friend Sub UserLevelGenericVisibility(Generic As ProjectParameters, Visibility As Visibility) Friend Sub UserLevelGenericVisibility(Generic As ProjectParameters, Visibility As Boolean)
Select Case Generic.GetType() Select Case Generic.GetType()
Case GetType(BooleanGenericParameter) Case GetType(BooleanGenericParameter)
DirectCast(Generic, BooleanGenericParameter).SetbBooleanVisibility(Visibility) DirectCast(Generic, BooleanGenericParameter).SetbBooleanVisibility(Visibility)
@@ -412,12 +412,12 @@ Public Class MainMenuVM
For Each ParamItem In StrategyItem.ParameterList For Each ParamItem In StrategyItem.ParameterList
Select Case ParamItem.sMinUserLevel Select Case ParamItem.sMinUserLevel
Case UserLevel.ADVANCED Case UserLevel.ADVANCED
UserLevelVisibility(ParamItem, If(m_bUserAdmin_IsChecked, Visibility.Visible, Visibility.Collapsed)) UserLevelVisibility(ParamItem, If(m_bUserAdmin_IsChecked, True, False))
Case UserLevel.ADMINISTRATOR Case UserLevel.ADMINISTRATOR
UserLevelVisibility(ParamItem, If(m_bUnlockAllIsChecked, Visibility.Visible, Visibility.Collapsed)) UserLevelVisibility(ParamItem, If(m_bUnlockAllIsChecked, True, False))
Case Else Case Else
If Not m_bUserAdmin_IsChecked Then If Not m_bUserAdmin_IsChecked Then
UserLevelVisibility(ParamItem, If(ParamItem.sMinUserLevel = UserLevel.USER, Visibility.Visible, Visibility.Collapsed)) UserLevelVisibility(ParamItem, If(ParamItem.sMinUserLevel = UserLevel.USER, True, False))
SetUnloackImage(PADLOCK_IMAGE) SetUnloackImage(PADLOCK_IMAGE)
End If End If
End Select End Select
@@ -428,12 +428,12 @@ Public Class MainMenuVM
For Each GenericItem As ProjectParameters In Map.refGeneralParametersStrategyVM.GeneralParametersList For Each GenericItem As ProjectParameters In Map.refGeneralParametersStrategyVM.GeneralParametersList
Select Case GenericItem.sMinUserLevel Select Case GenericItem.sMinUserLevel
Case UserLevel.ADVANCED Case UserLevel.ADVANCED
UserLevelGenericVisibility(GenericItem, If(m_bUserAdmin_IsChecked, Visibility.Visible, Visibility.Collapsed)) UserLevelGenericVisibility(GenericItem, If(m_bUserAdmin_IsChecked, True, False))
Case UserLevel.ADMINISTRATOR Case UserLevel.ADMINISTRATOR
UserLevelGenericVisibility(GenericItem, If(m_bUnlockAllIsChecked, Visibility.Visible, Visibility.Collapsed)) UserLevelGenericVisibility(GenericItem, If(m_bUnlockAllIsChecked, True, False))
Case Else Case Else
If Not m_bUserAdmin_IsChecked Then If Not m_bUserAdmin_IsChecked Then
UserLevelGenericVisibility(GenericItem, If(GenericItem.sMinUserLevel = UserLevel.USER, Visibility.Visible, Visibility.Collapsed)) UserLevelGenericVisibility(GenericItem, If(GenericItem.sMinUserLevel = UserLevel.USER, True, False))
SetUnloackImage(PADLOCK_IMAGE) SetUnloackImage(PADLOCK_IMAGE)
End If End If
End Select End Select
@@ -469,7 +469,7 @@ Public Class MainMenuVM
For Each ParamItem As StrategyParameter In StrategyItem.ParameterList For Each ParamItem As StrategyParameter In StrategyItem.ParameterList
If ParamItem.sMinUserLevel >= UserLevel.ADVANCED Then If ParamItem.sMinUserLevel >= UserLevel.ADVANCED Then
' Rendo visibili i parametri che hanno sMinUserLevel a 10 ' Rendo visibili i parametri che hanno sMinUserLevel a 10
UserLevelVisibility(ParamItem, Visibility.Visible) UserLevelVisibility(ParamItem, True)
End If End If
Next Next
Next Next
@@ -478,7 +478,7 @@ Public Class MainMenuVM
For Each GenericItem As ProjectParameters In Map.refGeneralParametersStrategyVM.GeneralParametersList For Each GenericItem As ProjectParameters In Map.refGeneralParametersStrategyVM.GeneralParametersList
If GenericItem.sMinUserLevel >= UserLevel.ADVANCED Then If GenericItem.sMinUserLevel >= UserLevel.ADVANCED Then
' Rendo visibili i parametri che hanno sMinUserLevel a 10 ' Rendo visibili i parametri che hanno sMinUserLevel a 10
UserLevelGenericVisibility(GenericItem, Visibility.Visible) UserLevelGenericVisibility(GenericItem, True)
End If End If
Next Next
End If End If
@@ -492,8 +492,8 @@ Public Class MainMenuVM
For Each StrategyItem As Strategy In StrategyList For Each StrategyItem As Strategy In StrategyList
For Each ParamItem As StrategyParameter In StrategyItem.ParameterList For Each ParamItem As StrategyParameter In StrategyItem.ParameterList
If ParamItem.sMinUserLevel >= UserLevel.ADVANCED Then If ParamItem.sMinUserLevel >= UserLevel.ADVANCED Then
' Rendo visibili i parametri che hanno sMinUserLevel a 10 ' Rendo invisibili i parametri che hanno sMinUserLevel a 10
UserLevelVisibility(ParamItem, Visibility.Collapsed) UserLevelVisibility(ParamItem, False)
End If End If
Next Next
Next Next
@@ -501,8 +501,8 @@ Public Class MainMenuVM
If Not IsNothing(Map.refGeneralParametersStrategyVM) Then If Not IsNothing(Map.refGeneralParametersStrategyVM) Then
For Each GenericItem As ProjectParameters In Map.refGeneralParametersStrategyVM.GeneralParametersList For Each GenericItem As ProjectParameters In Map.refGeneralParametersStrategyVM.GeneralParametersList
If GenericItem.sMinUserLevel >= UserLevel.ADVANCED Then If GenericItem.sMinUserLevel >= UserLevel.ADVANCED Then
' Rendo visibili i parametri che hanno sMinUserLevel a 10 ' Rendo invisibili i parametri che hanno sMinUserLevel a 10
UserLevelGenericVisibility(GenericItem, Visibility.Visible) UserLevelGenericVisibility(GenericItem, False)
End If End If
Next Next
End If End If
@@ -536,11 +536,13 @@ Public Class MainMenuVM
Else Else
Dim sSupervisorPath As String = Path.GetDirectoryName(System.AppDomain.CurrentDomain.BaseDirectory) & "\" & sSupervisorName & ".exe" Dim sSupervisorPath As String = Path.GetDirectoryName(System.AppDomain.CurrentDomain.BaseDirectory) & "\" & sSupervisorName & ".exe"
Try Try
Process.Start(sSupervisorPath) Process.Start(sSupervisorPath, "1 " & CurrProd.nProdId)
Catch ex As Exception Catch ex As Exception
EgtOutLog("Error: impossible starting supervisor from path " & sSupervisorPath) EgtOutLog("Error: impossible starting supervisor from path " & sSupervisorPath)
End Try End Try
End If End If
' mando richiesta di apertura progetto in supervisore
DbControllers.m_StatusMapController.UpdateAction(DbControllers.m_SupervisorId, CurrProd.nProdId, CurrProd.nProdId, StatusMapItemType.Comm, StatusMapOpType.ChangeProdInSupervisorRequest, "")
End Sub End Sub
#End Region ' Supervisor #End Region ' Supervisor
@@ -557,7 +559,7 @@ Public Class MainMenuVM
End Property End Property
Public Sub SendFeedback(ByVal param As Object) Public Sub SendFeedback(ByVal param As Object)
If SelPage = Pages.OPTIMIZERPAGE AndAlso IsNothing(ProjectManagerVM.CurrProd) Then If IsNothing(ProjectManagerVM.CurrProd) Then
EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(61891), EgtMsg(15001), MessageBoxButton.OK, MessageBoxImage.Error) EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, EgtMsg(61891), EgtMsg(15001), MessageBoxButton.OK, MessageBoxImage.Error)
Return Return
End If End If
@@ -574,7 +576,7 @@ Public Class MainMenuVM
EgtGetKeyInfo(sKey) EgtGetKeyInfo(sKey)
' Esporto il progetto ' Esporto il progetto
Dim ProjFileMList As List(Of ProjFileM) Dim ProjFileMList As List(Of ProjFileM)
If SelPage = Pages.OPTIMIZERPAGE And Not IsNothing(ProjectManagerVM.CurrProd) Then If IsNothing(ProjectManagerVM.CurrProd) Then
ProjFileMList = DbControllers.m_ProjController.GetByProdAsc(ProjectManagerVM.CurrProd.nProdId) ProjFileMList = DbControllers.m_ProjController.GetByProdAsc(ProjectManagerVM.CurrProd.nProdId)
Map.refProdManagerVM.SetCurrProj(ProjFileMList(0).nProjId) Map.refProdManagerVM.SetCurrProj(ProjFileMList(0).nProjId)
End If End If
@@ -644,39 +646,6 @@ Public Class MainMenuVM
SendFeedbackWindow.Files.Add(Map.refMainWindowVM.MainWindowM.sTempDir & "\Feedback.zip") SendFeedbackWindow.Files.Add(Map.refMainWindowVM.MainWindowM.sTempDir & "\Feedback.zip")
End If End If
SendFeedbackWindow.ShowDialog() SendFeedbackWindow.ShowDialog()
'Dim mailmessage As New System.Net.Mail.MailMessage With {
' .Subject = "Aedifica Feedback - " & sKey,
' .IsBodyHtml = True,
' .Body = ""
'}
'mailmessage.To.Add(New System.Net.Mail.MailAddress(sAddressArray(0)))
'For index As Integer = 1 To sAddressArray.Length() - 1
' mailmessage.CC.Add(sAddressArray(index))
'Next
'If Not String.IsNullOrWhiteSpace(sZipToCreate) AndAlso File.Exists(sZipToCreate) Then
' mailmessage.Attachments.Add(New System.Net.Mail.Attachment(Map.refMainWindowVM.MainWindowM.sTempDir & "\Feedback.zip"))
'End If
'Dim client As New SmtpClient()
'Dim filename As String = Map.refMainWindowVM.MainWindowM.sTempDir & "\mymessage.eml"
'If Not IsNothing(filename) Then
' Configuration.SaveEml(mailmessage, filename)
' Dim flags = BindingFlags.Instance Or BindingFlags.NonPublic
' Dim method As MethodInfo = GetType(SmtpClient).GetMethod("SendInternal", flags)
' If method Is Nothing Then
' method = GetType(SmtpClient).GetMethod("SendMail", flags)
' End If
' If method Is Nothing Then
' Throw New Exception("Metodo interno SendInternal/SendMail non trovato. Versione .NET non compatibile.")
' End If
' method.Invoke(client, New Object() {mailmessage, filename})
' Process.Start(New ProcessStartInfo(filename) With {.UseShellExecute = True})
' 'Process.Start(filename)
'Else
' MessageBox.Show("Errore creazione file .eml")
'End If
Catch ex As Exception Catch ex As Exception
EgtOutLog("Feedback exception: " & ex.ToString) EgtOutLog("Feedback exception: " & ex.ToString)
bEx = True bEx = True
@@ -67,5 +67,5 @@ Imports System.Windows
' Revision ' Revision
' '
<Assembly: AssemblyVersion("3.1.4.5")> <Assembly: AssemblyVersion("3.1.4.7")>
<Assembly: AssemblyFileVersion("3.1.4.5")> <Assembly: AssemblyFileVersion("3.1.4.7")>
+21 -20
View File
@@ -12,17 +12,7 @@
</TabControl.ItemContainerStyle> </TabControl.ItemContainerStyle>
<TabItem Header="RAWPARTMANAGER"> <TabItem Header="RAWPARTMANAGER">
<TabItem.Content> <TabItem.Content>
<Grid> <OPTIMIZER:RawPartManagerWndV Tag="{Binding DataContext, RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:RightPanelTopV}}}"/>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<OPTIMIZER:FreeContourManagerV DataContext="{StaticResource FreeContourManagerVM}"
Visibility="{Binding DataContext.FreeContourManager_Visibility, RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:RightPanelTopV}}}"/>
<OPTIMIZER:RawPartManagerWndV Grid.Column="1"
Tag="{Binding DataContext, RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:RightPanelTopV}}}"/>
</Grid>
</TabItem.Content> </TabItem.Content>
</TabItem> </TabItem>
<TabItem Header="FEATUREMANAGER"> <TabItem Header="FEATUREMANAGER">
@@ -43,6 +33,14 @@
Grid.ColumnSpan="3" Grid.ColumnSpan="3"
Style="{StaticResource Optimizer_Border}"/> Style="{StaticResource Optimizer_Border}"/>
<Border Grid.ColumnSpan="2"
Background="{StaticResource BeamWall_Glacier}"
Style="{StaticResource Project_Border}">
<TextBlock Grid.ColumnSpan="2"
Text="{Binding BTLStructureVM.SelBTLPart.sNAM}"
Style="{StaticResource RightPanel_TextBlock}"/>
</Border>
<OPTIMIZER:PartManagerV Grid.Row="1" <OPTIMIZER:PartManagerV Grid.Row="1"
DataContext="{StaticResource PartManagerVM}" DataContext="{StaticResource PartManagerVM}"
Tag="{Binding DataContext.BTLStructureVM.SelBTLPart, RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:RightPanelTopV}}}"/> Tag="{Binding DataContext.BTLStructureVM.SelBTLPart, RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:RightPanelTopV}}}"/>
@@ -77,13 +75,6 @@
Style="{StaticResource Project_CheckBox}"/> Style="{StaticResource Project_CheckBox}"/>
</Grid> </Grid>
<Border Grid.ColumnSpan="2"
Background="{StaticResource BeamWall_Glacier}"
Style="{StaticResource Project_Border}">
<TextBlock Grid.ColumnSpan="2"
Text="{Binding BTLStructureVM.SelBTLPart.sNAM}"
Style="{StaticResource RightPanel_TextBlock}"/>
</Border>
<Button Grid.Column="2" <Button Grid.Column="2"
Command="{Binding Parameter_Command}" Command="{Binding Parameter_Command}"
@@ -113,7 +104,7 @@
Style="{StaticResource Back_Button}"> Style="{StaticResource Back_Button}">
<Image Source="{StaticResource Delete_Image}" <Image Source="{StaticResource Delete_Image}"
Style="{StaticResource BTLDataWnd_Image}"/> Style="{StaticResource BTLDataWnd_Image}"/>
</Button> </Button>
</UniformGrid> </UniformGrid>
</Grid> </Grid>
</TabItem.Content> </TabItem.Content>
@@ -130,15 +121,25 @@
<RowDefinition Height="Auto"/> <RowDefinition Height="Auto"/>
<RowDefinition Height="1*"/> <RowDefinition Height="1*"/>
</Grid.RowDefinitions> </Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Border Grid.RowSpan="2" <Border Grid.RowSpan="2"
Grid.ColumnSpan="2" Grid.ColumnSpan="2"
Style="{StaticResource Optimizer_Border}"/> Style="{StaticResource Optimizer_Border}"/>
<OPTIMIZER:FeatureManagerV DataContext="{StaticResource FeatureManagerVM}" <OPTIMIZER:FreeContourManagerV Grid.RowSpan="2"
DataContext="{StaticResource FreeContourManagerVM}"
Visibility="{Binding DataContext.FreeContourManager_Visibility, RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:RightPanelTopV}}}"/>
<OPTIMIZER:FeatureManagerV Grid.Column="1"
DataContext="{StaticResource FeatureManagerVM}"
Tag="{Binding DataContext.BTLStructureVM.SelBTLPart.SelBTLFeatureVM, RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:RightPanelTopV}}}"/> Tag="{Binding DataContext.BTLStructureVM.SelBTLPart.SelBTLFeatureVM, RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:RightPanelTopV}}}"/>
<OPTIMIZER:PParameterListV Grid.Row="1" <OPTIMIZER:PParameterListV Grid.Row="1"
Grid.Column="1"
DataContext="{StaticResource PParameterListVM}" DataContext="{StaticResource PParameterListVM}"
Tag="{Binding DataContext.BTLStructureVM.SelBTLPart.SelBTLFeatureVM, RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:RightPanelTopV}}}" Tag="{Binding DataContext.BTLStructureVM.SelBTLPart.SelBTLFeatureVM, RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:RightPanelTopV}}}"
Margin="5"/> Margin="5"/>
@@ -2,7 +2,7 @@
Private Sub ComboBoxItem_PreviewMouseDown(sender As Object, e As MouseButtonEventArgs) Private Sub ComboBoxItem_PreviewMouseDown(sender As Object, e As MouseButtonEventArgs)
Dim SelStrategy As ComboBoxItem = DirectCast(sender, ComboBoxItem) Dim SelStrategy As ComboBoxItem = DirectCast(sender, ComboBoxItem)
If Map.refProjectVM.SelStrategySetup.Equals(SelStrategy.Content) Then If Not IsNothing(Map.refProjectVM.SelStrategySetup) AndAlso Map.refProjectVM.SelStrategySetup.Equals(SelStrategy.Content) Then
Map.refStrategyManagerVM.SelStrategySetup.sName = SelStrategy.Content Map.refStrategyManagerVM.SelStrategySetup.sName = SelStrategy.Content
Map.refStrategyManagerVM.SelStrategySetup.Read() Map.refStrategyManagerVM.SelStrategySetup.Read()
Map.refProjectVM.CustomGeneralParameters(SelStrategy.Content) Map.refProjectVM.CustomGeneralParameters(SelStrategy.Content)
@@ -505,15 +505,6 @@ Public Class ProdManagerVM
GetMainPrivateProfileString(S_GENERAL, K_LASTIMPDIR, "", sDir) GetMainPrivateProfileString(S_GENERAL, K_LASTIMPDIR, "", sDir)
' apro finestra scelta file ' apro finestra scelta file
Dim sImportFilePath As String = "" Dim sImportFilePath As String = ""
'Dim BTLDlg As New EgtBEAMWALL.Core.EgtManageFileDialogV(Application.Current.MainWindow, New EgtManageFileDialogVM()) With {
' .Title = EgtMsg(61840),
' .Filter = "BTL (*.btl)|*.btl" &
' "|BTLX (*.btlx)|*.btlx",
' .FilterIndex = 1,
' .InitialDirectory = If(Directory.Exists(sDir), sDir, ""),
' .CheckFileExists = True,
' .ValidateNames = True,
' .Mode = 1}
Dim BTLDlg As New Microsoft.Win32.OpenFileDialog() With { Dim BTLDlg As New Microsoft.Win32.OpenFileDialog() With {
.Title = EgtMsg(61840), .Title = EgtMsg(61840),
.DefaultExt = ".btl", .DefaultExt = ".btl",
@@ -704,9 +695,12 @@ Public Class ProdManagerVM
' Apro finestra parametri generali ' Apro finestra parametri generali
Dim GeneralParametersWndVM As New GeneralParametersWndVM(nType) Dim GeneralParametersWndVM As New GeneralParametersWndVM(nType)
' Controllo se la cartella AiSetUp è presente
GetFirstAiSetUp(nType)
Dim sDefaultConfigFile As String = String.Empty Dim sDefaultConfigFile As String = String.Empty
If EgtUILib.GetPrivateProfileString(S_STRATEGY, K_DEFAULTCONFIG, "", sDefaultConfigFile, Map.refMainWindowVM.MainWindowM.sDefaultConfig) = 0 Then If EgtUILib.GetPrivateProfileString(S_STRATEGY, K_DEFAULTCONFIG, "", sDefaultConfigFile, Map.refMainWindowVM.MainWindowM.sDefaultConfig) = 0 Then
SetFirstStrategy(GeneralParametersWndVM, sDefaultConfigFile, nType) SetFirstStrategy(GeneralParametersWndVM, sDefaultConfigFile)
End If End If
GeneralParametersWndVM.SetbSaveGeneralParameters(True) GeneralParametersWndVM.SetbSaveGeneralParameters(True)
@@ -716,12 +710,6 @@ Public Class ProdManagerVM
m_BTLDataWnd.Read(nType) m_BTLDataWnd.Read(nType)
m_BTLDataWnd.SaveInfoBTL(nType) m_BTLDataWnd.SaveInfoBTL(nType)
' Controllo se effettuare import + verifica
If Map.refConfigurationPageVM.bVerifyImportBTL_IsChecked Then
' Eseguo procedura
End If
SectionXMaterial.SetType(nType) SectionXMaterial.SetType(nType)
LoadingWndHelper.UpdateLoadingWnd(ActiveIds.IMPORTBTL, 2, EgtMsg(63005), 50, 70) ' Loading parts LoadingWndHelper.UpdateLoadingWnd(ActiveIds.IMPORTBTL, 2, EgtMsg(63005), 50, 70) ' Loading parts
' leggo struttura BTL per liste ' leggo struttura BTL per liste
@@ -867,12 +855,6 @@ Public Class ProdManagerVM
m_BTLDataWnd.Read(nType) m_BTLDataWnd.Read(nType)
m_BTLDataWnd.SaveInfoBTL(nType) m_BTLDataWnd.SaveInfoBTL(nType)
' Controllo se effettuare import + verifica
If Map.refConfigurationPageVM.bVerifyImportBTL_IsChecked Then
' Eseguo procedura
End If
' leggo struttura BTL per liste ' leggo struttura BTL per liste
Map.refProjectVM.BTLStructureVM = New BTLStructureVM(BTLStructureM.CreateBTLStructure(0)) Map.refProjectVM.BTLStructureVM = New BTLStructureVM(BTLStructureM.CreateBTLStructure(0))
CopyBuilding() CopyBuilding()
@@ -1023,7 +1005,7 @@ Public Class ProdManagerVM
CopyBuilding() CopyBuilding()
' aggiorno Db ' aggiorno Db
Dim ExportDate As DateTime Dim ExportDate As DateTime
Dim sBTLFileName As String = " New - EgtBEAMWALL" Dim sBTLFileName As String = " New - AEdifica"
DateTime.TryParse(Map.refProjectVM.BTLStructureVM.BTLStructureM.m_sEXPDATE & " " & DateTime.TryParse(Map.refProjectVM.BTLStructureVM.BTLStructureM.m_sEXPDATE & " " &
Map.refProjectVM.BTLStructureVM.BTLStructureM.m_sEXPTIME, ExportDate) Map.refProjectVM.BTLStructureVM.BTLStructureM.m_sEXPTIME, ExportDate)
DbControllers.m_ProjController.UpdateInfo(nProjId, sBTLFileName, sBTLFileName, Map.refProjectVM.BTLStructureVM.sLISTNAME, ExportDate, nType, Machine.Name) DbControllers.m_ProjController.UpdateInfo(nProjId, sBTLFileName, sBTLFileName, Map.refProjectVM.BTLStructureVM.sLISTNAME, ExportDate, nType, Machine.Name)
@@ -1413,8 +1395,8 @@ Public Class ProdManagerVM
bValue = False bValue = False
EgtGetInfo(FeatureParam.nFeatureId, ConstBeam.STRATEGY & FeatureParam.nFeatureId & "_FORCED", bValue) EgtGetInfo(FeatureParam.nFeatureId, ConstBeam.STRATEGY & FeatureParam.nFeatureId & "_FORCED", bValue)
If bValue Then If bValue Then
BTLPartParam.SetStrategyModify_Visibility(Visibility.Visible) BTLPartParam.SetStrategyModify_Visibility(True)
FeatureParam.SetbStrategy_Visibility(Visibility.Visible) FeatureParam.SetbStrategy_Visibility(True)
End If End If
For Each StrategySetupParam As StrategySetup In Map.refStrategyManagerVM.StrategySetupList For Each StrategySetupParam As StrategySetup In Map.refStrategyManagerVM.StrategySetupList
For Each StrategyFeatureParam As StrategyFeature In StrategySetupParam.StrategyFeatureList For Each StrategyFeatureParam As StrategyFeature In StrategySetupParam.StrategyFeatureList
@@ -1423,7 +1405,7 @@ Public Class ProdManagerVM
For Each Param As StrategyParameter In StrategyParam.ParameterList For Each Param As StrategyParameter In StrategyParam.ParameterList
bValueForced = False bValueForced = False
EgtGetInfo(FeatureParam.nFeatureId, StrategyParam.sStrategyId & "_" & Param.sNameNge & "_FORCED", bValueForced) EgtGetInfo(FeatureParam.nFeatureId, StrategyParam.sStrategyId & "_" & Param.sNameNge & "_FORCED", bValueForced)
If bValueForced Then FeatureParam.SetbStrategy_Visibility(Visibility.Visible) If bValueForced Then FeatureParam.SetbStrategy_Visibility(True)
Next Next
Next Next
Next Next
@@ -1434,14 +1416,6 @@ Public Class ProdManagerVM
End Sub End Sub
Private Sub ModifyStrategyInfo(BTLPartVMList As ObservableCollection(Of BTLPartVM)) Private Sub ModifyStrategyInfo(BTLPartVMList As ObservableCollection(Of BTLPartVM))
Map.refProjectVM.StrategySetupList.Clear()
' leggo cartella dei setup delle strategie
Dim AISetupDirPath As String = Map.refMainWindowVM.MainWindowM.GetAISetupDirPath(ProjectManagerVM.CurrProd.nType, True)
Dim AISetupPaths As String() = Directory.GetFiles(AISetupDirPath).Where(Function(f) Path.GetExtension(f).ToLower() <> ".ini").ToArray()
For Each AiSetup In AISetupPaths
Map.refProjectVM.StrategySetupList.Add(Path.GetFileNameWithoutExtension(AiSetup))
Next
Dim sStrategiesDirPath As String = Map.refMainWindowVM.MainWindowM.GetStrategiesDirPath(Map.refStrategyManagerVM.SelStrategyType.Id) Dim sStrategiesDirPath As String = Map.refMainWindowVM.MainWindowM.GetStrategiesDirPath(Map.refStrategyManagerVM.SelStrategyType.Id)
Dim sGeneralParametersFilePath As String = sStrategiesDirPath & "\" & GENERALPARAMETERS_FILE & ".json" Dim sGeneralParametersFilePath As String = sStrategiesDirPath & "\" & GENERALPARAMETERS_FILE & ".json"
If File.Exists(sGeneralParametersFilePath) Then If File.Exists(sGeneralParametersFilePath) Then
@@ -1449,20 +1423,6 @@ Public Class ProdManagerVM
Dim JsonGeneralParametersList As List(Of JsonGeneralParameters) = JsonConvert.DeserializeObject(Of List(Of JsonGeneralParameters))(sReadedFiles) Dim JsonGeneralParametersList As List(Of JsonGeneralParameters) = JsonConvert.DeserializeObject(Of List(Of JsonGeneralParameters))(sReadedFiles)
Map.refProjectVM.GeneralParametersList = New ObservableCollection(Of ProjectParameters)((From JsonGeneralParameter In JsonGeneralParametersList Map.refProjectVM.GeneralParametersList = New ObservableCollection(Of ProjectParameters)((From JsonGeneralParameter In JsonGeneralParametersList
Select JsonGeneralParameter.Deserialize(Map.refStrategyManagerVM.SelStrategyType.Id)).ToList()) 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 UserLevel.ADMINISTRATOR
Map.refMainMenuVM.UserLevelGenericVisibility(GenericItem, If(Map.refMainMenuVM.UnlockAllIsChecked, 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(PADLOCK_IMAGE)
End If
End Select
Next
NotifyPropertyChanged(NameOf(Map.refProjectVM.GeneralParametersList))
End If End If
Dim bValuePart As Boolean = False Dim bValuePart As Boolean = False
@@ -1470,17 +1430,31 @@ Public Class ProdManagerVM
For Each GeneralParam As ProjectParameters In Map.refProjectVM.GeneralParametersList For Each GeneralParam As ProjectParameters In Map.refProjectVM.GeneralParametersList
bValuePart = False bValuePart = False
EgtGetInfo(PartItem.nPartId, GeneralParam.sNameNge & "_FORCED", bValuePart) EgtGetInfo(PartItem.nPartId, GeneralParam.sNameNge & "_FORCED", bValuePart)
If bValuePart Then PartItem.SetStrategyModify_Visibility(Visibility.Visible) If bValuePart Then PartItem.SetStrategyModify_Visibility(True)
Next Next
Next Next
NotifyPropertyChanged(NameOf(Map.refProjectVM.GeneralParametersList))
End Sub
Private Sub GetFirstAiSetUp(nType As BWType)
Dim sAISetUpDir As String = String.Empty
If nType = BWType.BEAM Then
sAISetUpDir = Map.refMainWindowVM.MainWindowM.sMachinesRoot & "\" & CurrentMachine.sMachineName & "\" & BEAM_DIR & "\" & AISETUP_DIR
ElseIf nType = BWType.WALL Then
sAISetUpDir = Map.refMainWindowVM.MainWindowM.sMachinesRoot & "\" & CurrentMachine.sMachineName & "\" & WALL_DIR & "\" & AISETUP_DIR
End If
' Controllo se la cartella AISetup è presente
If Not Directory.Exists(sAISetUpDir) Then
' Se non esiste, la crea
Directory.CreateDirectory(sAISetUpDir)
End If
End Sub End Sub
''' <summary> ''' <summary>
''' Funzione che scrive il file json di default se non è presente un file di configurazione ''' Funzione che scrive il file json di default se non è presente un file di configurazione
''' </summary> ''' </summary>
''' <param name="GeneralParametersWndVM"></param> ''' <param name="GeneralParametersWndVM"></param>
''' <param name="nType"></param> Private Sub SetFirstStrategy(GeneralParametersWndVM As GeneralParametersWndVM, sDefaultConfigFile As String)
Private Sub SetFirstStrategy(GeneralParametersWndVM As GeneralParametersWndVM, sDefaultConfigFile As String, nType As BWType)
sDefaultConfigFile = "DefaultConfig" sDefaultConfigFile = "DefaultConfig"
Dim Strategy As New StrategySetup(sDefaultConfigFile) Dim Strategy As New StrategySetup(sDefaultConfigFile)
Map.refStrategyManagerVM.SelStrategySetup = Strategy Map.refStrategyManagerVM.SelStrategySetup = Strategy
@@ -1589,9 +1563,9 @@ Public Class ProdManagerVM
' verifico se progetto modificato, e chiedo se salvare ' verifico se progetto modificato, e chiedo se salvare
If ProdFileVM.VerifyProjectModification(CurrProd) = MessageBoxResult.Cancel Then Return If ProdFileVM.VerifyProjectModification(CurrProd) = MessageBoxResult.Cancel Then Return
Map.refShowBeamPanelVM.ShowBuilding_IsEnabled = False Map.refShowBeamPanelVM.ShowBuilding_IsEnabled = False
Map.refProjectVM.SetSceneShowBuldingVisibility(Visibility.Collapsed) Map.refProjectVM.SetSceneShowBuldingVisibility(False)
Map.refProjectVM.SetManagerTabVisibility(Visibility.Visible) Map.refProjectVM.SetManagerTabVisibility(True)
If Not IsNothing(Map.refProjectVM.MachGroupPanelVM) Then Map.refProjectVM.SetFeatureListVisibility(Visibility.Visible) If Not IsNothing(Map.refProjectVM.MachGroupPanelVM) Then Map.refProjectVM.SetFeatureListVisibility(True)
If Not CreateNewProd() Then If Not CreateNewProd() Then
EgtOutLog("Errore! Creazione del progetto fallita!") EgtOutLog("Errore! Creazione del progetto fallita!")
End If End If
@@ -1617,12 +1591,6 @@ Public Class ProdManagerVM
If IsNothing(CurrProd) Then Return Nothing If IsNothing(CurrProd) Then Return Nothing
' apro finestra di salvataggio progetto ' apro finestra di salvataggio progetto
'Dim ExportDlg As New EgtBEAMWALL.Core.EgtManageFileDialogV(Application.Current.MainWindow, New EgtManageFileDialogVM()) With {
' .Title = EgtMsg(61838),
' .Filter = "ProjectExport (*.ngexp)|*.ngexp",
' .FilterIndex = 1,
' .FileName = CurrProd.nProdId.ToString("0000") & " - " & CurrProd.sName & " - ProjectExport.ngexp",
' .Mode = 1}
Dim ExportDlg As New Microsoft.Win32.SaveFileDialog() With { Dim ExportDlg As New Microsoft.Win32.SaveFileDialog() With {
.Title = EgtMsg(61838), .Title = EgtMsg(61838),
.DefaultExt = ".ngexp", .DefaultExt = ".ngexp",
@@ -1721,8 +1689,8 @@ Public Class ProdManagerVM
Public Sub ImportProject() Public Sub ImportProject()
Map.refShowBeamPanelVM.ShowBuilding_IsEnabled = False Map.refShowBeamPanelVM.ShowBuilding_IsEnabled = False
Map.refProjectVM.SetSceneShowBuldingVisibility(Visibility.Collapsed) Map.refProjectVM.SetSceneShowBuldingVisibility(False)
Map.refProjectVM.SetManagerTabVisibility(Visibility.Visible) Map.refProjectVM.SetManagerTabVisibility(True)
SetOpenImage(DOWN_IMAGE) SetOpenImage(DOWN_IMAGE)
Dim TempCurrProd As ProjectFileVM = CurrProd Dim TempCurrProd As ProjectFileVM = CurrProd
If ProdFileVM.VerifyProjectModification(TempCurrProd) Then Return If ProdFileVM.VerifyProjectModification(TempCurrProd) Then Return
@@ -1730,14 +1698,6 @@ Public Class ProdManagerVM
Dim sDir As String = String.Empty Dim sDir As String = String.Empty
GetMainPrivateProfileString(S_GENERAL, K_LASTNGEXPDIR, "", sDir) GetMainPrivateProfileString(S_GENERAL, K_LASTNGEXPDIR, "", sDir)
' apro finestra scelta file ' apro finestra scelta file
'Dim ImportDlg As New EgtBEAMWALL.Core.EgtManageFileDialogV(Application.Current.MainWindow, New EgtManageFileDialogVM()) With {
' .Title = EgtMsg(61839),
' .Filter = "ProjectExport (*.ngexp)|*.ngexp",
' .FilterIndex = 1,
' .InitialDirectory = If(Directory.Exists(sDir), sDir, ""),
' .CheckFileExists = True,
' .ValidateNames = True,
' .Mode = 1}
Dim ImportDlg As New Microsoft.Win32.OpenFileDialog() With { Dim ImportDlg As New Microsoft.Win32.OpenFileDialog() With {
.Title = EgtMsg(61839), .Title = EgtMsg(61839),
.DefaultExt = ".ngexp", .DefaultExt = ".ngexp",
@@ -2023,15 +1983,6 @@ Public Class ProdManagerVM
Dim sDir As String = String.Empty Dim sDir As String = String.Empty
GetMainPrivateProfileString(S_GENERAL, K_LASTIMPDIR, "", sDir) GetMainPrivateProfileString(S_GENERAL, K_LASTIMPDIR, "", sDir)
Dim sFile As String = "" Dim sFile As String = ""
'Dim BTLDlg As New EgtBEAMWALL.Core.EgtManageFileDialogV(Application.Current.MainWindow, New EgtManageFileDialogVM()) With {
' .Title = EgtMsg(63038),
' .Filter = "BTL (*.btl)|*.btl" &
' "|BTLX (*.btlx)|*.btlx",
' .FilterIndex = 1,
' .InitialDirectory = If(Directory.Exists(sDir), sDir, ""),
' .CheckFileExists = True,
' .ValidateNames = True,
' .Mode = 1}
Dim BTLDlg As New Microsoft.Win32.OpenFileDialog() With { Dim BTLDlg As New Microsoft.Win32.OpenFileDialog() With {
.Title = EgtMsg(63038), .Title = EgtMsg(63038),
.DefaultExt = ".btl", .DefaultExt = ".btl",
@@ -2225,4 +2176,4 @@ Public Class ProdManagerVM
#End Region ' Commands #End Region ' Commands
End Class End Class
+112 -167
View File
@@ -254,8 +254,8 @@ Public Class ProjectVM
Return m_FeatureList_Visibility Return m_FeatureList_Visibility
End Get End Get
End Property End Property
Sub SetFeatureListVisibility(bVisible As Visibility) Sub SetFeatureListVisibility(bVisible As Boolean)
m_FeatureList_Visibility = bVisible m_FeatureList_Visibility = If(bVisible, Visibility.Visible, Visibility.Collapsed)
NotifyPropertyChanged(NameOf(FeatureList_Visibility)) NotifyPropertyChanged(NameOf(FeatureList_Visibility))
End Sub End Sub
@@ -265,8 +265,8 @@ Public Class ProjectVM
Return m_RawPartManagerVisibility Return m_RawPartManagerVisibility
End Get End Get
End Property End Property
Sub SetRawPartManagerVisibility(bVisible As Visibility) Sub SetRawPartManagerVisibility(bVisible As Boolean)
m_RawPartManagerVisibility = bVisible m_RawPartManagerVisibility = If(bVisible, Visibility.Visible, Visibility.Collapsed)
NotifyPropertyChanged(NameOf(RawPartManagerVisibility)) NotifyPropertyChanged(NameOf(RawPartManagerVisibility))
End Sub End Sub
@@ -276,8 +276,8 @@ Public Class ProjectVM
Return m_StrategyManagerVisibility Return m_StrategyManagerVisibility
End Get End Get
End Property End Property
Sub SetStrategyManagerVisibility(bVisible As Visibility) Sub SetStrategyManagerVisibility(bVisible As Boolean)
m_StrategyManagerVisibility = bVisible m_StrategyManagerVisibility = If(bVisible, Visibility.Visible, Visibility.Collapsed)
NotifyPropertyChanged(NameOf(StrategyManagerVisibility)) NotifyPropertyChanged(NameOf(StrategyManagerVisibility))
End Sub End Sub
@@ -287,8 +287,8 @@ Public Class ProjectVM
Return m_SceneShowBuldingVisibility Return m_SceneShowBuldingVisibility
End Get End Get
End Property End Property
Sub SetSceneShowBuldingVisibility(bVisible As Visibility) Sub SetSceneShowBuldingVisibility(bVisible As Boolean)
m_SceneShowBuldingVisibility = bVisible m_SceneShowBuldingVisibility = If(bVisible, Visibility.Visible, Visibility.Collapsed)
NotifyPropertyChanged(NameOf(SceneShowBuldingVisibility)) NotifyPropertyChanged(NameOf(SceneShowBuldingVisibility))
End Sub End Sub
@@ -298,8 +298,8 @@ Public Class ProjectVM
Return m_ManagerTabVisibility Return m_ManagerTabVisibility
End Get End Get
End Property End Property
Sub SetManagerTabVisibility(bVisible As Visibility) Sub SetManagerTabVisibility(bVisible As Boolean)
m_ManagerTabVisibility = bVisible m_ManagerTabVisibility = If(bVisible, Visibility.Visible, Visibility.Collapsed)
NotifyPropertyChanged(NameOf(ManagerTabVisibility)) NotifyPropertyChanged(NameOf(ManagerTabVisibility))
End Sub End Sub
@@ -323,10 +323,10 @@ Public Class ProjectVM
m_bSaveGeneralParameters = value m_bSaveGeneralParameters = value
If m_bSaveGeneralParameters Then If m_bSaveGeneralParameters Then
SetGeneralParametersIsEnable(True) SetGeneralParametersIsEnable(True)
Map.refProjectVM.BTLStructureVM.SelBTLPart.SetStrategyModify_Visibility(Visibility.Visible) Map.refProjectVM.BTLStructureVM.SelBTLPart.SetStrategyModify_Visibility(True)
Else Else
SetGeneralParametersIsEnable(False) SetGeneralParametersIsEnable(False)
Map.refProjectVM.BTLStructureVM.SelBTLPart.SetStrategyModify_Visibility(Visibility.Collapsed) Map.refProjectVM.BTLStructureVM.SelBTLPart.SetStrategyModify_Visibility(False)
Dim sStrategiesDirPath As String = Map.refMainWindowVM.MainWindowM.GetStrategiesDirPath(Map.refStrategyManagerVM.SelStrategyType.Id) Dim sStrategiesDirPath As String = Map.refMainWindowVM.MainWindowM.GetStrategiesDirPath(Map.refStrategyManagerVM.SelStrategyType.Id)
Dim sGeneralParametersFilePath As String = sStrategiesDirPath & "\" & GENERALPARAMETERS_FILE & ".json" Dim sGeneralParametersFilePath As String = sStrategiesDirPath & "\" & GENERALPARAMETERS_FILE & ".json"
If File.Exists(sGeneralParametersFilePath) Then If File.Exists(sGeneralParametersFilePath) Then
@@ -555,6 +555,7 @@ Public Class ProjectVM
''' </summary> ''' </summary>
Friend Sub UpdatePart(nPartId As Integer) Friend Sub UpdatePart(nPartId As Integer)
Dim IdAsseBase As Integer = Map.refProdManagerVM.ListProjAsseBase(Map.refProjectVM.BTLStructureVM.SelBTLPart.nPROJ) Dim IdAsseBase As Integer = Map.refProdManagerVM.ListProjAsseBase(Map.refProjectVM.BTLStructureVM.SelBTLPart.nPROJ)
If IdAsseBase < 0 Then Return
Dim IdPart As Integer = 0 Dim IdPart As Integer = 0
Dim NewId As Integer = 0 Dim NewId As Integer = 0
' Setto il nuovo contesto ' Setto il nuovo contesto
@@ -589,9 +590,9 @@ Public Class ProjectVM
Friend Sub ResetGeneralParameters() Friend Sub ResetGeneralParameters()
Dim sInfo As String = String.Empty Dim sInfo As String = String.Empty
For Each PartItem As BTLPartVM In m_BTLStructureVM.BTLPartVMList For Each PartItem As BTLPartVM In m_BTLStructureVM.BTLPartVMList
PartItem.SetStrategyModify_Visibility(Visibility.Collapsed) PartItem.SetStrategyModify_Visibility(False)
For Each FeatureItem As BTLFeatureVM In PartItem.BTLFeatureVMList For Each FeatureItem As BTLFeatureVM In PartItem.BTLFeatureVMList
FeatureItem.SetbStrategy_Visibility(Visibility.Collapsed) FeatureItem.SetbStrategy_Visibility(False)
Next Next
For Each GeneralParameter In m_GeneralParametersList For Each GeneralParameter In m_GeneralParametersList
Select Case GeneralParameter.GetType() Select Case GeneralParameter.GetType()
@@ -636,9 +637,7 @@ Public Class ProjectVM
' leggo cartella dei setup delle strategie ' leggo cartella dei setup delle strategie
Dim AISetupDirPath As String = Map.refMainWindowVM.MainWindowM.GetAISetupDirPath(nType, True) Dim AISetupDirPath As String = Map.refMainWindowVM.MainWindowM.GetAISetupDirPath(nType, True)
Dim AISetupPaths As String() = Directory.GetFiles(AISetupDirPath).Where(Function(f) Path.GetExtension(f).ToLower() <> ".ini").ToArray() Dim AISetupPaths As String() = Directory.GetFiles(AISetupDirPath).Where(Function(f) Path.GetExtension(f).ToLower() <> ".ini").ToArray()
For Each AiSetup In AISetupPaths GetStrategySetupDir(AISetupPaths, ProjectManagerVM.CurrProd.nType)
m_StrategySetupList.Add(Path.GetFileNameWithoutExtension(AiSetup))
Next
' Leggo info se presenti ' Leggo info se presenti
Dim sStrategyBTLSetup As String = String.Empty Dim sStrategyBTLSetup As String = String.Empty
@@ -656,49 +655,13 @@ Public Class ProjectVM
If bSaveGeneralParameters Then If bSaveGeneralParameters Then
EgtGetInfo(m_BTLStructureVM.SelBTLPart.BTLPartM.nPartId, AI_SETUP, m_SelStrategySetup) EgtGetInfo(m_BTLStructureVM.SelBTLPart.BTLPartM.nPartId, AI_SETUP, m_SelStrategySetup)
Else Else
If EgtUILib.GetPrivateProfileString(S_STRATEGY, K_DEFAULTCONFIG, "", sStrategyBTLSetup, Map.refMainWindowVM.MainWindowM.sDefaultConfig) <> 0 Then SetStrategySetup(sStrategyBTLSetup, AISetupDirPath, sTmpStrategySetup)
SetSelStrategy(sStrategyBTLSetup)
EgtSetInfo(m_BTLStructureVM.SelBTLPart.BTLPartM.nPartId, AI_SETUP, m_SelStrategySetup)
Else
' restituisce la lista dei file presenti nella cartella con le relative informazioni
Dim StrategySetupListFile As List(Of FileInfo) = m_StrategySetupList.Where(Function(f) File.Exists(AISetupDirPath & "\" & f & ".json")).
Select(Function(f) New FileInfo(AISetupDirPath & "\" & f & ".json")).
OrderByDescending(Function(fi) fi.LastWriteTime).ToList()
' restituisce l'ultimo file modificato
If StrategySetupListFile.Any() Then
sStrategyBTLSetup = Path.GetFileNameWithoutExtension(StrategySetupListFile.First().Name)
End If
sTmpStrategySetup = m_StrategySetupList.FirstOrDefault(Function(x) x = sStrategyBTLSetup)
SetSelStrategy(sTmpStrategySetup)
EgtSetInfo(m_BTLStructureVM.SelBTLPart.BTLPartM.nPartId, AI_SETUP, m_SelStrategySetup)
End If
End If End If
Else Else
SetSelStrategy(sStrategyPartSetup) SetSelStrategy(sStrategyBTLPartSetup)
End If End If
Dim sStrategiesDirPath As String = Map.refMainWindowVM.MainWindowM.GetStrategiesDirPath(nType) GetGeneralParamtersList(nType)
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 UserLevel.ADMINISTRATOR
Map.refMainMenuVM.UserLevelGenericVisibility(GenericItem, If(Map.refMainMenuVM.UnlockAllIsChecked, 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(PADLOCK_IMAGE)
End If
End Select
Next
NotifyPropertyChanged(NameOf(GeneralParametersList))
End If
' Leggo info se presenti ' Leggo info se presenti
Dim sInfo As String = String.Empty Dim sInfo As String = String.Empty
@@ -708,94 +671,64 @@ Public Class ProjectVM
Dim sTmpBoolValue As Boolean = False Dim sTmpBoolValue As Boolean = False
EgtGetInfo(nBTLInfoLayerId, GeneralParameter.sNameNge, sTmpBoolValue) EgtGetInfo(nBTLInfoLayerId, GeneralParameter.sNameNge, sTmpBoolValue)
If EgtExistsInfo(m_BTLStructureVM.SelBTLPart.BTLPartM.nPartId, GeneralParameter.sNameNge) Then If EgtExistsInfo(m_BTLStructureVM.SelBTLPart.BTLPartM.nPartId, GeneralParameter.sNameNge) Then
SetGeneralParametersIsEnable(True) SetGeneralParameters(True)
SetbSaveGeneralParameters(True)
EgtGetInfo(m_BTLStructureVM.SelBTLPart.BTLPartM.nPartId, GeneralParameter.sNameNge, DirectCast(GeneralParameter, BooleanGenericParameter).bValue) EgtGetInfo(m_BTLStructureVM.SelBTLPart.BTLPartM.nPartId, GeneralParameter.sNameNge, DirectCast(GeneralParameter, BooleanGenericParameter).bValue)
Else Else
DirectCast(GeneralParameter, BooleanGenericParameter).bValue = sTmpBoolValue DirectCast(GeneralParameter, BooleanGenericParameter).bValue = sTmpBoolValue
SetGeneralParametersIsEnable(False) SetGeneralParameters(False)
SetbSaveGeneralParameters(False)
End If End If
Case GetType(DoubleGenericParameter) Case GetType(DoubleGenericParameter)
Dim sTmpDoubleValue As String = String.Empty Dim sTmpDoubleValue As String = String.Empty
EgtGetInfo(nBTLInfoLayerId, GeneralParameter.sNameNge, sTmpDoubleValue) EgtGetInfo(nBTLInfoLayerId, GeneralParameter.sNameNge, sTmpDoubleValue)
If EgtExistsInfo(m_BTLStructureVM.SelBTLPart.BTLPartM.nPartId, GeneralParameter.sNameNge) Then If EgtExistsInfo(m_BTLStructureVM.SelBTLPart.BTLPartM.nPartId, GeneralParameter.sNameNge) Then
SetGeneralParametersIsEnable(True) SetGeneralParameters(True)
SetbSaveGeneralParameters(True)
EgtGetInfo(m_BTLStructureVM.SelBTLPart.BTLPartM.nPartId, GeneralParameter.sNameNge, DirectCast(GeneralParameter, DoubleGenericParameter).sValue) EgtGetInfo(m_BTLStructureVM.SelBTLPart.BTLPartM.nPartId, GeneralParameter.sNameNge, DirectCast(GeneralParameter, DoubleGenericParameter).sValue)
Else Else
DirectCast(GeneralParameter, DoubleGenericParameter).sValue = sTmpDoubleValue DirectCast(GeneralParameter, DoubleGenericParameter).sValue = sTmpDoubleValue
SetGeneralParametersIsEnable(False) SetGeneralParameters(False)
SetbSaveGeneralParameters(False)
End If End If
Case GetType(ComboGenericParameter) Case GetType(ComboGenericParameter)
Dim sTmpComboValue As String = String.Empty Dim sTmpComboValue As String = String.Empty
EgtGetInfo(nBTLInfoLayerId, GeneralParameter.sNameNge, sTmpComboValue) EgtGetInfo(nBTLInfoLayerId, GeneralParameter.sNameNge, sTmpComboValue)
Dim sTmpValueInfo As String = String.Empty Dim sTmpValueInfo As String = String.Empty
If EgtExistsInfo(m_BTLStructureVM.SelBTLPart.BTLPartM.nPartId, GeneralParameter.sNameNge) Then If EgtExistsInfo(m_BTLStructureVM.SelBTLPart.BTLPartM.nPartId, GeneralParameter.sNameNge) Then
SetGeneralParametersIsEnable(True) SetGeneralParameters(True)
SetbSaveGeneralParameters(True)
EgtGetInfo(m_BTLStructureVM.SelBTLPart.BTLPartM.nPartId, GeneralParameter.sNameNge, sTmpValueInfo) EgtGetInfo(m_BTLStructureVM.SelBTLPart.BTLPartM.nPartId, GeneralParameter.sNameNge, sTmpValueInfo)
DirectCast(GeneralParameter, ComboGenericParameter).SelValue = DirectCast(GeneralParameter, ComboGenericParameter).ComboList.FirstOrDefault(Function(x) x.sValue = sTmpValueInfo) DirectCast(GeneralParameter, ComboGenericParameter).SelValue = DirectCast(GeneralParameter, ComboGenericParameter).ComboList.FirstOrDefault(Function(x) x.sValue = sTmpValueInfo)
Else Else
DirectCast(GeneralParameter, ComboGenericParameter).SelValue.sValue = sTmpComboValue DirectCast(GeneralParameter, ComboGenericParameter).SelValue.sValue = sTmpComboValue
SetGeneralParametersIsEnable(False) SetGeneralParameters(False)
SetbSaveGeneralParameters(False)
End If End If
Case GetType(StringGenericParameter) Case GetType(StringGenericParameter)
Dim sTmpStringValue As String = String.Empty Dim sTmpStringValue As String = String.Empty
EgtGetInfo(nBTLInfoLayerId, GeneralParameter.sNameNge, sTmpStringValue) EgtGetInfo(nBTLInfoLayerId, GeneralParameter.sNameNge, sTmpStringValue)
If EgtExistsInfo(m_BTLStructureVM.SelBTLPart.BTLPartM.nPartId, GeneralParameter.sNameNge) Then If EgtExistsInfo(m_BTLStructureVM.SelBTLPart.BTLPartM.nPartId, GeneralParameter.sNameNge) Then
SetGeneralParametersIsEnable(True) SetGeneralParameters(True)
SetbSaveGeneralParameters(True)
EgtGetInfo(m_BTLStructureVM.SelBTLPart.BTLPartM.nPartId, GeneralParameter.sNameNge, DirectCast(GeneralParameter, StringGenericParameter).sValue) EgtGetInfo(m_BTLStructureVM.SelBTLPart.BTLPartM.nPartId, GeneralParameter.sNameNge, DirectCast(GeneralParameter, StringGenericParameter).sValue)
Else Else
DirectCast(GeneralParameter, StringGenericParameter).sValue = sTmpStringValue DirectCast(GeneralParameter, StringGenericParameter).sValue = sTmpStringValue
SetGeneralParametersIsEnable(False) SetGeneralParameters(False)
SetbSaveGeneralParameters(False)
End If End If
Case GetType(ListGenericParameter) Case GetType(ListGenericParameter)
For Each Item As ToolParameter In DirectCast(GeneralParameter, ListGenericParameter).ListValue For Each Item As ToolParameter In DirectCast(GeneralParameter, ListGenericParameter).ListValue
If Item.bIsActive Then If Item.bIsActive Then
sInfo &= Item.sUUID & "," & Item.sName & ";" sInfo &= Item.sUUID & "," & Item.sName & ";"
If EgtExistsInfo(m_BTLStructureVM.SelBTLPart.BTLPartM.nPartId, GeneralParameter.sNameNge) Then If EgtExistsInfo(m_BTLStructureVM.SelBTLPart.BTLPartM.nPartId, GeneralParameter.sNameNge) Then
SetGeneralParametersIsEnable(True) SetGeneralParameters(True)
SetbSaveGeneralParameters(True)
EgtGetInfo(m_BTLStructureVM.SelBTLPart.BTLPartM.nPartId, GeneralParameter.sNameNge, DirectCast(GeneralParameter, ListGenericParameter).sValue) EgtGetInfo(m_BTLStructureVM.SelBTLPart.BTLPartM.nPartId, GeneralParameter.sNameNge, DirectCast(GeneralParameter, ListGenericParameter).sValue)
Else Else
DirectCast(GeneralParameter, ListGenericParameter).sValue = sInfo DirectCast(GeneralParameter, ListGenericParameter).sValue = sInfo
SetGeneralParametersIsEnable(False) SetGeneralParameters(False)
SetbSaveGeneralParameters(False)
End If End If
End If End If
Next Next
End Select End Select
Next Next
NotifyPropertyChanged(NameOf(GeneralParametersList))
End Sub End Sub
Friend Sub CustomGeneralParameters(SelStrategySetupCombo As String) Friend Sub CustomGeneralParameters(SelStrategySetupCombo As String)
Dim sStrategiesDirPath As String = Map.refMainWindowVM.MainWindowM.GetStrategiesDirPath(Map.refStrategyManagerVM.SelStrategyType.Id) GetGeneralParamtersList(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 UserLevel.ADMINISTRATOR
Map.refMainMenuVM.UserLevelGenericVisibility(GenericItem, If(Map.refMainMenuVM.UnlockAllIsChecked, 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(PADLOCK_IMAGE)
End If
End Select
Next
End If
Dim sAISetupDirPath As String = Map.refMainWindowVM.MainWindowM.GetAISetupDirPath(Map.refStrategyManagerVM.SelStrategyType.Id, False) Dim sAISetupDirPath As String = Map.refMainWindowVM.MainWindowM.GetAISetupDirPath(Map.refStrategyManagerVM.SelStrategyType.Id, False)
@@ -880,33 +813,9 @@ Public Class ProjectVM
' leggo cartella dei setup delle strategie ' leggo cartella dei setup delle strategie
Dim AISetupDirPath As String = Map.refMainWindowVM.MainWindowM.GetAISetupDirPath(ProjectManagerVM.CurrProd.nType, True) Dim AISetupDirPath As String = Map.refMainWindowVM.MainWindowM.GetAISetupDirPath(ProjectManagerVM.CurrProd.nType, True)
Dim AISetupPaths As String() = Directory.GetFiles(AISetupDirPath).Where(Function(f) Path.GetExtension(f).ToLower() <> ".ini").ToArray() Dim AISetupPaths As String() = Directory.GetFiles(AISetupDirPath).Where(Function(f) Path.GetExtension(f).ToLower() <> ".ini").ToArray()
For Each AiSetup In AISetupPaths GetStrategySetupDir(AISetupPaths, ProjectManagerVM.CurrProd.nType)
Map.refProjectVM.StrategySetupList.Add(Path.GetFileNameWithoutExtension(AiSetup))
Next
Dim sStrategiesDirPath As String = Map.refMainWindowVM.MainWindowM.GetStrategiesDirPath(Map.refStrategyManagerVM.SelStrategyType.Id) GetGeneralParamtersList(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 UserLevel.ADMINISTRATOR
Map.refMainMenuVM.UserLevelGenericVisibility(GenericItem, If(Map.refMainMenuVM.UnlockAllIsChecked, 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(PADLOCK_IMAGE)
End If
End Select
Next
NotifyPropertyChanged(NameOf(GeneralParametersList))
End If
' Leggo info se presenti ' Leggo info se presenti
Dim sInfo As String = String.Empty Dim sInfo As String = String.Empty
@@ -914,99 +823,135 @@ Public Class ProjectVM
Dim sTmpStrategySetup As String = String.Empty Dim sTmpStrategySetup As String = String.Empty
Dim nBTLInfoLayerId As Integer = 0 Dim nBTLInfoLayerId As Integer = 0
If bValuePart Then If bValuePart Then
EgtGetInfo(m_BTLStructureVM.SelBTLPart.BTLPartM.nPartId, AI_SETUP, Map.refProjectVM.SelStrategySetup) EgtGetInfo(m_BTLStructureVM.SelBTLPart.BTLPartM.nPartId, AI_SETUP, m_SelStrategySetup)
Else Else
nBTLInfoLayerId = EgtGetFirstNameInGroup(GDB_ID.ROOT, BTLINFO) nBTLInfoLayerId = EgtGetFirstNameInGroup(GDB_ID.ROOT, BTLINFO)
EgtGetInfo(nBTLInfoLayerId, AI_SETUP, sStrategyBTLSetup) EgtGetInfo(nBTLInfoLayerId, AI_SETUP, sStrategyBTLSetup)
If IsNothing(sStrategyBTLSetup) Then If IsNothing(sStrategyBTLSetup) Then
If EgtUILib.GetPrivateProfileString(S_STRATEGY, K_DEFAULTCONFIG, "", sStrategyBTLSetup, Map.refMainWindowVM.MainWindowM.sDefaultConfig) <> 0 Then SetStrategySetup(sStrategyBTLSetup, AISetupDirPath, sTmpStrategySetup)
SetSelStrategy(sStrategyBTLSetup)
EgtSetInfo(m_BTLStructureVM.SelBTLPart.BTLPartM.nPartId, AI_SETUP, m_SelStrategySetup)
Else
' restituisce la lista dei file presenti nella cartella con le relative informazioni
Dim StrategySetupListFile As List(Of FileInfo) = m_StrategySetupList.Where(Function(f) File.Exists(AISetupDirPath & "\" & f & ".json")).
Select(Function(f) New FileInfo(AISetupDirPath & "\" & f & ".json")).
OrderByDescending(Function(fi) fi.LastWriteTime).ToList()
' restituisce l'ultimo file modificato
If StrategySetupListFile.Any() Then
sStrategyBTLSetup = Path.GetFileNameWithoutExtension(StrategySetupListFile.First().Name)
End If
sTmpStrategySetup = m_StrategySetupList.FirstOrDefault(Function(x) x = sStrategyBTLSetup)
SetSelStrategy(sTmpStrategySetup)
EgtSetInfo(m_BTLStructureVM.SelBTLPart.BTLPartM.nPartId, AI_SETUP, m_SelStrategySetup)
End If
Else Else
SetSelStrategy(sStrategyBTLSetup) SetSelStrategy(sStrategyBTLSetup)
EgtSetInfo(m_BTLStructureVM.SelBTLPart.BTLPartM.nPartId, AI_SETUP, m_SelStrategySetup) EgtSetInfo(m_BTLStructureVM.SelBTLPart.BTLPartM.nPartId, AI_SETUP, m_SelStrategySetup)
End If End If
End If End If
For Each GeneralParameter In m_GeneralParametersList For Each GeneralParameter In m_GeneralParametersList
Select Case GeneralParameter.GetType() Select Case GeneralParameter.GetType()
Case GetType(BooleanGenericParameter) Case GetType(BooleanGenericParameter)
Dim sTmpBoolValue As Boolean = DirectCast(GeneralParameter, BooleanGenericParameter).bValue Dim sTmpBoolValue As Boolean = DirectCast(GeneralParameter, BooleanGenericParameter).bValue
If EgtExistsInfo(m_BTLStructureVM.SelBTLPart.BTLPartM.nPartId, GeneralParameter.sNameNge) Then If EgtExistsInfo(m_BTLStructureVM.SelBTLPart.BTLPartM.nPartId, GeneralParameter.sNameNge) Then
SetbSaveGeneralParameters(True) SetGeneralParameters(True)
SetGeneralParametersIsEnable(True)
EgtGetInfo(m_BTLStructureVM.SelBTLPart.BTLPartM.nPartId, GeneralParameter.sNameNge, DirectCast(GeneralParameter, BooleanGenericParameter).bValue) EgtGetInfo(m_BTLStructureVM.SelBTLPart.BTLPartM.nPartId, GeneralParameter.sNameNge, DirectCast(GeneralParameter, BooleanGenericParameter).bValue)
Else Else
DirectCast(GeneralParameter, BooleanGenericParameter).bValue = sTmpBoolValue DirectCast(GeneralParameter, BooleanGenericParameter).bValue = sTmpBoolValue
SetbSaveGeneralParameters(False) SetGeneralParameters(False)
SetGeneralParametersIsEnable(False)
End If End If
Case GetType(DoubleGenericParameter) Case GetType(DoubleGenericParameter)
Dim sTmpDoubleValue As String = DirectCast(GeneralParameter, DoubleGenericParameter).sValue Dim sTmpDoubleValue As String = DirectCast(GeneralParameter, DoubleGenericParameter).sValue
If EgtExistsInfo(m_BTLStructureVM.SelBTLPart.BTLPartM.nPartId, GeneralParameter.sNameNge) Then If EgtExistsInfo(m_BTLStructureVM.SelBTLPart.BTLPartM.nPartId, GeneralParameter.sNameNge) Then
SetbSaveGeneralParameters(True) SetGeneralParameters(True)
SetGeneralParametersIsEnable(True)
EgtGetInfo(m_BTLStructureVM.SelBTLPart.BTLPartM.nPartId, GeneralParameter.sNameNge, DirectCast(GeneralParameter, DoubleGenericParameter).sValue) EgtGetInfo(m_BTLStructureVM.SelBTLPart.BTLPartM.nPartId, GeneralParameter.sNameNge, DirectCast(GeneralParameter, DoubleGenericParameter).sValue)
Else Else
DirectCast(GeneralParameter, DoubleGenericParameter).sValue = sTmpDoubleValue DirectCast(GeneralParameter, DoubleGenericParameter).sValue = sTmpDoubleValue
SetbSaveGeneralParameters(False) SetGeneralParameters(False)
SetGeneralParametersIsEnable(False)
End If End If
Case GetType(ComboGenericParameter) Case GetType(ComboGenericParameter)
Dim sTmpComboValue As String = DirectCast(GeneralParameter, ComboGenericParameter).SelValue.sValue Dim sTmpComboValue As String = DirectCast(GeneralParameter, ComboGenericParameter).SelValue.sValue
Dim sTmpValueInfo As String = String.Empty Dim sTmpValueInfo As String = String.Empty
If EgtExistsInfo(m_BTLStructureVM.SelBTLPart.BTLPartM.nPartId, GeneralParameter.sNameNge) Then If EgtExistsInfo(m_BTLStructureVM.SelBTLPart.BTLPartM.nPartId, GeneralParameter.sNameNge) Then
SetbSaveGeneralParameters(True) SetGeneralParameters(True)
SetGeneralParametersIsEnable(True)
EgtGetInfo(m_BTLStructureVM.SelBTLPart.BTLPartM.nPartId, GeneralParameter.sNameNge, sTmpValueInfo) EgtGetInfo(m_BTLStructureVM.SelBTLPart.BTLPartM.nPartId, GeneralParameter.sNameNge, sTmpValueInfo)
DirectCast(GeneralParameter, ComboGenericParameter).SelValue = DirectCast(GeneralParameter, ComboGenericParameter).ComboList.FirstOrDefault(Function(x) x.sValue = sTmpValueInfo) DirectCast(GeneralParameter, ComboGenericParameter).SelValue = DirectCast(GeneralParameter, ComboGenericParameter).ComboList.FirstOrDefault(Function(x) x.sValue = sTmpValueInfo)
Else Else
DirectCast(GeneralParameter, ComboGenericParameter).SelValue.sValue = sTmpComboValue DirectCast(GeneralParameter, ComboGenericParameter).SelValue.sValue = sTmpComboValue
SetbSaveGeneralParameters(False) SetGeneralParameters(False)
SetGeneralParametersIsEnable(False)
End If End If
Case GetType(StringGenericParameter) Case GetType(StringGenericParameter)
Dim sTmpStringValue As String = DirectCast(GeneralParameter, StringGenericParameter).sValue Dim sTmpStringValue As String = DirectCast(GeneralParameter, StringGenericParameter).sValue
If EgtExistsInfo(m_BTLStructureVM.SelBTLPart.BTLPartM.nPartId, GeneralParameter.sNameNge) Then If EgtExistsInfo(m_BTLStructureVM.SelBTLPart.BTLPartM.nPartId, GeneralParameter.sNameNge) Then
SetbSaveGeneralParameters(True) SetGeneralParameters(True)
SetGeneralParametersIsEnable(True)
EgtGetInfo(m_BTLStructureVM.SelBTLPart.BTLPartM.nPartId, GeneralParameter.sNameNge, DirectCast(GeneralParameter, StringGenericParameter).sValue) EgtGetInfo(m_BTLStructureVM.SelBTLPart.BTLPartM.nPartId, GeneralParameter.sNameNge, DirectCast(GeneralParameter, StringGenericParameter).sValue)
Else Else
DirectCast(GeneralParameter, StringGenericParameter).sValue = sTmpStringValue DirectCast(GeneralParameter, StringGenericParameter).sValue = sTmpStringValue
SetbSaveGeneralParameters(False) SetGeneralParameters(False)
SetGeneralParametersIsEnable(False)
End If End If
Case GetType(ListGenericParameter) Case GetType(ListGenericParameter)
For Each Item As ToolParameter In DirectCast(GeneralParameter, ListGenericParameter).ListValue For Each Item As ToolParameter In DirectCast(GeneralParameter, ListGenericParameter).ListValue
If Item.bIsActive Then If Item.bIsActive Then
sInfo &= Item.sUUID & "," & Item.sName & ";" sInfo &= Item.sUUID & "," & Item.sName & ";"
If EgtExistsInfo(m_BTLStructureVM.SelBTLPart.BTLPartM.nPartId, GeneralParameter.sNameNge) Then If EgtExistsInfo(m_BTLStructureVM.SelBTLPart.BTLPartM.nPartId, GeneralParameter.sNameNge) Then
SetbSaveGeneralParameters(True) SetGeneralParameters(True)
SetGeneralParametersIsEnable(True)
EgtGetInfo(m_BTLStructureVM.SelBTLPart.BTLPartM.nPartId, GeneralParameter.sNameNge, DirectCast(GeneralParameter, ListGenericParameter).sValue) EgtGetInfo(m_BTLStructureVM.SelBTLPart.BTLPartM.nPartId, GeneralParameter.sNameNge, DirectCast(GeneralParameter, ListGenericParameter).sValue)
Else Else
DirectCast(GeneralParameter, ListGenericParameter).sValue = sInfo DirectCast(GeneralParameter, ListGenericParameter).sValue = sInfo
SetbSaveGeneralParameters(False) SetGeneralParameters(False)
SetGeneralParametersIsEnable(False)
End If End If
End If End If
Next Next
End Select End Select
Next Next
NotifyPropertyChanged(NameOf(SelStrategySetup))
NotifyPropertyChanged(NameOf(GeneralParametersList))
End Sub End Sub
Private Sub GetStrategySetupDir(AISetupPaths As String(), nType As BWType)
For Each AiSetup In AISetupPaths
m_StrategySetupList.Add(Path.GetFileNameWithoutExtension(AiSetup))
Next
End Sub
Private Sub GetGeneralParamtersList(nTypeId As BWType)
Dim sStrategiesDirPath As String = Map.refMainWindowVM.MainWindowM.GetStrategiesDirPath(nTypeId)
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())
UserLevelControl(m_GeneralParametersList)
End If
End Sub
Private Sub UserLevelControl(GeneralParametersList As ObservableCollection(Of ProjectParameters))
For Each GenericItem As ProjectParameters In GeneralParametersList
Select Case GenericItem.sMinUserLevel
Case UserLevel.ADVANCED
Map.refMainMenuVM.UserLevelGenericVisibility(GenericItem, If(Map.refMainMenuVM.UserAdmin_IsChecked, True, False))
Case UserLevel.ADMINISTRATOR
Map.refMainMenuVM.UserLevelGenericVisibility(GenericItem, If(Map.refMainMenuVM.UnlockAllIsChecked, True, False))
Case Else
If Not Map.refMainMenuVM.UserAdmin_IsChecked Then
Map.refMainMenuVM.UserLevelGenericVisibility(GenericItem, If(GenericItem.sMinUserLevel = UserLevel.USER, True, False))
Map.refMainMenuVM.SetUnloackImage(PADLOCK_IMAGE)
End If
End Select
Next
End Sub
Private Sub SetGeneralParameters(bValue As Boolean)
SetbSaveGeneralParameters(bValue)
SetGeneralParametersIsEnable(bValue)
End Sub
Private Sub SetStrategySetup(sStrategyBTLSetup As String, AISetupDirPath As String, sTmpStrategySetup As String)
If EgtUILib.GetPrivateProfileString(S_STRATEGY, K_DEFAULTCONFIG, "", sStrategyBTLSetup, Map.refMainWindowVM.MainWindowM.sDefaultConfig) <> 0 Then
SetSelStrategy(sStrategyBTLSetup)
EgtSetInfo(m_BTLStructureVM.SelBTLPart.BTLPartM.nPartId, AI_SETUP, m_SelStrategySetup)
Else
' restituisce la lista dei file presenti nella cartella con le relative informazioni
Dim StrategySetupListFile As List(Of FileInfo) = m_StrategySetupList.Where(Function(f) File.Exists(AISetupDirPath & "\" & f & ".json")).
Select(Function(f) New FileInfo(AISetupDirPath & "\" & f & ".json")).
OrderByDescending(Function(fi) fi.LastWriteTime).ToList()
' restituisce l'ultimo file modificato
If StrategySetupListFile.Any() Then
sStrategyBTLSetup = Path.GetFileNameWithoutExtension(StrategySetupListFile.First().Name)
End If
sTmpStrategySetup = m_StrategySetupList.FirstOrDefault(Function(x) x = sStrategyBTLSetup)
SetSelStrategy(sTmpStrategySetup)
EgtSetInfo(m_BTLStructureVM.SelBTLPart.BTLPartM.nPartId, AI_SETUP, m_SelStrategySetup)
End If
End Sub
#End Region ' Methods #End Region ' Methods
#Region "COMMAND" #Region "COMMAND"
@@ -1059,9 +1004,9 @@ Public Class ProjectVM
End Property End Property
Public Sub Back() Public Sub Back()
SetRawPartManagerVisibility(Visibility.Visible) SetRawPartManagerVisibility(True)
If Not IsNothing(m_MachGroupPanelVM) Then Map.refProjectVM.SetFeatureListVisibility(Visibility.Visible) If Not IsNothing(m_MachGroupPanelVM) Then Map.refProjectVM.SetFeatureListVisibility(True)
SetStrategyManagerVisibility(Visibility.Collapsed) SetStrategyManagerVisibility(False)
SetSelManagerTab(ProjectVM.StrategyManagerTab.RAWPARTMANAGER) SetSelManagerTab(ProjectVM.StrategyManagerTab.RAWPARTMANAGER)
SetSelFeatureManagerTab(ProjectVM.FeatureManagerTab.FEATURERAWPARTMANAGER) SetSelFeatureManagerTab(ProjectVM.FeatureManagerTab.FEATURERAWPARTMANAGER)
' Abilito LeftPanel ' Abilito LeftPanel
@@ -1136,13 +1081,13 @@ Public Class ProjectVM
EgtRemoveInfo(m_BTLStructureVM.SelBTLPart.BTLPartM.nPartId, GeneralParameter.sNameNge & "_FORCED") EgtRemoveInfo(m_BTLStructureVM.SelBTLPart.BTLPartM.nPartId, GeneralParameter.sNameNge & "_FORCED")
End Select End Select
Next Next
m_BTLStructureVM.SelBTLPart.SetStrategyModify_Visibility(Visibility.Collapsed) m_BTLStructureVM.SelBTLPart.SetStrategyModify_Visibility(False)
End If End If
If Not IsNothing(m_BTLStructureVM.SelBTLPart.SelBTLFeatureVM) Then m_BTLStructureVM.SelBTLPart.SelBTLFeatureVM.ResetCalcFeature() If Not IsNothing(m_BTLStructureVM.SelBTLPart.SelBTLFeatureVM) Then m_BTLStructureVM.SelBTLPart.SelBTLFeatureVM.ResetCalcFeature()
Map.refProjectVM.BTLStructureVM.SelBTLPart.ResetCalcPart() Map.refProjectVM.BTLStructureVM.SelBTLPart.ResetCalcPart()
If Map.refProdManagerVM.ListProjAsseBase.Count > 0 Then UpdatePart(m_BTLStructureVM.SelBTLPart.nPartId) If Map.refProdManagerVM.ListProjAsseBase.Count > 0 Then UpdatePart(m_BTLStructureVM.SelBTLPart.nPartId)
SetRawPartManagerVisibility(Visibility.Visible) SetRawPartManagerVisibility(True)
SetStrategyManagerVisibility(Visibility.Collapsed) SetStrategyManagerVisibility(False)
SetSelManagerTab(ProjectVM.StrategyManagerTab.RAWPARTMANAGER) SetSelManagerTab(ProjectVM.StrategyManagerTab.RAWPARTMANAGER)
SetSelFeatureManagerTab(ProjectVM.FeatureManagerTab.FEATURERAWPARTMANAGER) SetSelFeatureManagerTab(ProjectVM.FeatureManagerTab.FEATURERAWPARTMANAGER)
' Abilito LeftPanel ' Abilito LeftPanel
@@ -216,6 +216,11 @@ Public Class RawPartManagerVM
DbControllers.m_PartController.UpdateStatus(ProjectManagerVM.CurrProd.nProdId, MachGroup.Id, Part.nPartId, ItemState.Assigned) DbControllers.m_PartController.UpdateStatus(ProjectManagerVM.CurrProd.nProdId, MachGroup.Id, Part.nPartId, ItemState.Assigned)
Part.nProduction_State = ItemState.Assigned Part.nProduction_State = ItemState.Assigned
Part.NotifyPropertyChanged(NameOf(Part.Background)) Part.NotifyPropertyChanged(NameOf(Part.Background))
MachGroup.NotifyPropertyChanged(NameOf(MachGroup.ButtonIsEnabled))
Part.NotifyPropertyChanged(NameOf(Part.ButtonIsEnabled))
For Each Feature As BTLFeatureVM In Part.FeatureVMList
Feature.NotifyPropertyChanged(NameOf(Feature.IsEnabled))
Next
' disabilito impostazione modificato ' disabilito impostazione modificato
Dim DisableMgr As New DisableModifiedMgr Dim DisableMgr As New DisableModifiedMgr
' blocco modifica del pezzo ' blocco modifica del pezzo
@@ -277,8 +282,6 @@ Public Class RawPartManagerVM
Public Sub ProduceAllRawPart() Public Sub ProduceAllRawPart()
If IsNothing(ProjectManagerVM.CurrProd) Then Return If IsNothing(ProjectManagerVM.CurrProd) Then Return
Map.refMyStatusBarVM.SetLoadingProgress(0)
Map.refMyStatusBarVM.SetOutputMessage("")
' se attiva opzione e non ancora calcolato ' se attiva opzione e non ancora calcolato
If GetMainPrivateProfileInt(S_GENERAL, K_FASTPRODUCE, 0) = 1 And Map.refMachGroupPanelVM.MachGroupVMList.Any(Function(x As MyMachGroupVM) x.nProduction_State = ItemState.ND AndAlso x.nGlobalState = CalcStates.NOTCALCULATED) Then If GetMainPrivateProfileInt(S_GENERAL, K_FASTPRODUCE, 0) = 1 And Map.refMachGroupPanelVM.MachGroupVMList.Any(Function(x As MyMachGroupVM) x.nProduction_State = ItemState.ND AndAlso x.nGlobalState = CalcStates.NOTCALCULATED) Then
Map.refCALCPanelVM.SetFromProduce(CALCPanelVM.ProduceType.PRODUCEALL) Map.refCALCPanelVM.SetFromProduce(CALCPanelVM.ProduceType.PRODUCEALL)
Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 MiB

After

Width:  |  Height:  |  Size: 3.4 MiB

@@ -85,8 +85,8 @@ Public Class SaveAsStrategyVM
Return m_bOpen_Visibility Return m_bOpen_Visibility
End Get End Get
End Property End Property
Friend Sub SetbOpen_Visibility(value As Visibility) Friend Sub SetbOpen_Visibility(value As Boolean)
m_bOpen_Visibility = value m_bOpen_Visibility = If(value, Visibility.Visible, Visibility.Collapsed)
NotifyPropertyChanged(NameOf(bOpen_Visibility)) NotifyPropertyChanged(NameOf(bOpen_Visibility))
End Sub End Sub
@@ -96,8 +96,8 @@ Public Class SaveAsStrategyVM
Return m_bSave_Visibility Return m_bSave_Visibility
End Get End Get
End Property End Property
Friend Sub SetbSave_Visibility(value As Visibility) Friend Sub SetbSave_Visibility(value As Boolean)
m_bSave_Visibility = value m_bSave_Visibility = If(value, Visibility.Visible, Visibility.Collapsed)
NotifyPropertyChanged(NameOf(bSave_Visibility)) NotifyPropertyChanged(NameOf(bSave_Visibility))
End Sub End Sub
@@ -87,14 +87,6 @@ Public Class MySceneHostVM
Dim sTitle As String = EgtMsg(10101) Dim sTitle As String = EgtMsg(10101)
If EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, sText, sTitle, MessageBoxButton.OKCancel, MessageBoxImage.Error) = MessageBoxResult.OK Then If EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, sText, sTitle, MessageBoxButton.OKCancel, MessageBoxImage.Error) = MessageBoxResult.OK Then
' Apro dialogo per richiesta file licenza ' Apro dialogo per richiesta file licenza
'Dim LicDlg As New EgtBEAMWALL.Core.EgtManageFileDialogV(Application.Current.MainWindow, New EgtManageFileDialogVM()) With {
' .Title = EgtMsg(110026),
' .Filter = "Licences (.lic)|*.lic",
' .FilterIndex = 1,
' .InitialDirectory = Map.refMainWindowVM.MainWindowM.sConfigDir,
' .CheckFileExists = True,
' .ValidateNames = True,
' .Mode = 1}
Dim LicDlg As New Microsoft.Win32.OpenFileDialog() With { Dim LicDlg As New Microsoft.Win32.OpenFileDialog() With {
.Title = EgtMsg(110026), .Title = EgtMsg(110026),
.DefaultExt = ".lic", .DefaultExt = ".lic",
@@ -117,8 +117,7 @@ Public Class ButtonBuildingItem
EgtSetStatus(ItemAsseBaseId, GDB_ST.OFF) EgtSetStatus(ItemAsseBaseId, GDB_ST.OFF)
End If End If
Next Next
EgtZoom(ZM.ALL) EgtRedraw()
EgtDraw()
' Ritorno al contesto corrente ' Ritorno al contesto corrente
EgtSetCurrentContext(Map.refSceneHostVM.MainScene.GetCtx()) EgtSetCurrentContext(Map.refSceneHostVM.MainScene.GetCtx())
End Sub End Sub
@@ -148,28 +148,25 @@ Public Class SceneShowBuldingVM
Dim nSel As Integer = 0 Dim nSel As Integer = 0
EgtSelect(e.Location, Scene.DIM_SEL, Scene.DIM_SEL, nSel) EgtSelect(e.Location, Scene.DIM_SEL, Scene.DIM_SEL, nSel)
Dim nId As Integer = EgtGetFirstObjInSelWin() Dim nId As Integer = EgtGetFirstObjInSelWin()
While nId <> GDB_ID.NULL ' Recupero l'identificativo del pezzo cui appartiene
' Recupero l'identificativo del pezzo cui appartiene Dim nPartId As Integer = EgtGetParent(EgtGetParent(nId))
Dim nPartId As Integer = EgtGetParent(EgtGetParent(nId)) Dim nOrigPartId As Integer = nPartId
Dim nOrigPartId As Integer = nPartId nOldPartId = nOrigPartId
nOldPartId = nOrigPartId Dim nCopId As Integer = 0
Dim nCopId As Integer = 0 If EgtGetInfo(nPartId, "!COP", nCopId) Then
If EgtGetInfo(nPartId, "!COP", nCopId) Then nPartId = nCopId
nPartId = nCopId End If
End If Dim nOrIdKey As KeyValuePair(Of Integer, Integer) = Map.refSceneShowBuldingVM.MapInfo.FirstOrDefault(Function(x) x.Value = nPartId)
Dim nOrIdKey As KeyValuePair(Of Integer, Integer) = Map.refSceneShowBuldingVM.MapInfo.FirstOrDefault(Function(x) x.Value = nPartId) Dim nOrdId As Integer = nOrIdKey.Key
Dim nOrdId As Integer = nOrIdKey.Key Dim BTLPartVM As BTLPartVM = Map.refProjectVM.BTLStructureVM.BTLPartVMList.FirstOrDefault(Function(y) y.nPartId = nOrdId)
Dim BTLPartVM As BTLPartVM = Map.refProjectVM.BTLStructureVM.BTLPartVMList.FirstOrDefault(Function(y) y.nPartId = nOrdId) ' Ritorno al contesto corrente
' Ritorno al contesto corrente EgtSetCurrentContext(Map.refSceneHostVM.MainScene.GetCtx())
EgtSetCurrentContext(Map.refSceneHostVM.MainScene.GetCtx()) Map.refProjectVM.BTLStructureVM.SetSelBTLPart(BTLPartVM, True)
Map.refProjectVM.BTLStructureVM.SetSelBTLPart(BTLPartVM, True) Map.refProjectVM.BTLStructureVM.SelectBTLPartScene(BTLPartVM, True)
Map.refProjectVM.BTLStructureVM.SelectBTLPartScene(BTLPartVM, True) ' Setto il nuovo contesto
' Setto il nuovo contesto EgtSetCurrentContext(SceneShowBulding.GetCtx())
EgtSetCurrentContext(SceneShowBulding.GetCtx()) EgtSetStatus(nOrigPartId, GDB_ST.SEL)
EgtSetStatus(nOrigPartId, GDB_ST.SEL) EgtDraw()
EgtDraw()
nId = EgtGetNextObjInSelWin()
End While
End Sub End Sub
#End Region ' Events #End Region ' Events
@@ -53,15 +53,15 @@ Public Class ShowBeamPanelVM
m_bShowBuilding = value m_bShowBuilding = value
If m_bShowBuilding Then If m_bShowBuilding Then
Map.refSceneShowBuldingVM.SceneShowBulding.Enable(True) Map.refSceneShowBuldingVM.SceneShowBulding.Enable(True)
Map.refProjectVM.SetSceneShowBuldingVisibility(Visibility.Visible) Map.refProjectVM.SetSceneShowBuldingVisibility(True)
Map.refProjectVM.SetManagerTabVisibility(Visibility.Collapsed) Map.refProjectVM.SetManagerTabVisibility(False)
Map.refProjectVM.SetFeatureListVisibility(Visibility.Collapsed) Map.refProjectVM.SetFeatureListVisibility(False)
Map.refOptimizePanelVM.SetOptimizePanelIsEnabled(False) Map.refOptimizePanelVM.SetOptimizePanelIsEnabled(False)
Else Else
EgtSetCurrentContext(Map.refSceneHostVM.MainScene.GetCtx()) EgtSetCurrentContext(Map.refSceneHostVM.MainScene.GetCtx())
Map.refProjectVM.SetSceneShowBuldingVisibility(Visibility.Collapsed) Map.refProjectVM.SetSceneShowBuldingVisibility(False)
Map.refProjectVM.SetManagerTabVisibility(Visibility.Visible) Map.refProjectVM.SetManagerTabVisibility(True)
If Not IsNothing(Map.refProjectVM.MachGroupPanelVM) Then Map.refProjectVM.SetFeatureListVisibility(Visibility.Visible) If Not IsNothing(Map.refProjectVM.MachGroupPanelVM) Then Map.refProjectVM.SetFeatureListVisibility(False)
Map.refOptimizePanelVM.SetOptimizePanelIsEnabled(True) Map.refOptimizePanelVM.SetOptimizePanelIsEnabled(True)
End If End If
NotifyPropertyChanged(NameOf(ShowBuilding_IsChecked)) NotifyPropertyChanged(NameOf(ShowBuilding_IsChecked))
+10 -10
View File
@@ -46,8 +46,8 @@ Public Class PDFEditorVM
Return m_PdfViewer_Visibility Return m_PdfViewer_Visibility
End Get End Get
End Property End Property
Friend Sub SetPdfViewer_Visibility(value As Visibility) Friend Sub SetPdfViewer_Visibility(value As Boolean)
m_PdfViewer_Visibility = value m_PdfViewer_Visibility = If(value, Visibility.Visible, Visibility.Hidden)
NotifyPropertyChanged(NameOf(PdfViewer_Visibility)) NotifyPropertyChanged(NameOf(PdfViewer_Visibility))
End Sub End Sub
@@ -78,7 +78,7 @@ Public Class PDFEditorVM
m_ExpanderList.Add(New ExpanderPDF(ListTypes.PART_TOT)) ' Part Totals m_ExpanderList.Add(New ExpanderPDF(ListTypes.PART_TOT)) ' Part Totals
m_ExpanderList.Add(New ExpanderPDF(ListTypes.PART)) ' Part List m_ExpanderList.Add(New ExpanderPDF(ListTypes.PART)) ' Part List
SetWebAddress("") ' Pagina vuota SetWebAddress("") ' Pagina vuota
SetPdfViewer_Visibility(Visibility.Hidden) SetPdfViewer_Visibility(False)
Map.SetRefPDFEditorVM(Me) Map.SetRefPDFEditorVM(Me)
End Sub End Sub
@@ -91,7 +91,7 @@ Public Class PDFEditorVM
End Function End Function
Private Sub SetExpander(ExpanderPDF As ExpanderPDF) Private Sub SetExpander(ExpanderPDF As ExpanderPDF)
ExpanderPDF.SetExpanderVisibilty(Visibility.Visible) ExpanderPDF.SetExpanderVisibilty(True)
End Sub End Sub
#End Region ' Methods #End Region ' Methods
@@ -121,7 +121,7 @@ Public Class PDFEditorVM
If Not IsNothing(sPartList) Then SetExpander(sPartList) If Not IsNothing(sPartList) Then SetExpander(sPartList)
SetViewButton(VIEW_BUTTON.PDF) SetViewButton(VIEW_BUTTON.PDF)
Case VIEW_BUTTON.PDF Case VIEW_BUTTON.PDF
SetPdfViewer_Visibility(Visibility.Visible) SetPdfViewer_Visibility(True)
Configuration.CreatePrintPDF(PDFPage.VIEW, True) Configuration.CreatePrintPDF(PDFPage.VIEW, True)
SetWebAddress(Map.refMainWindowVM.MainWindowM.sTempDir & "\Statistics.pdf") SetWebAddress(Map.refMainWindowVM.MainWindowM.sTempDir & "\Statistics.pdf")
End Select End Select
@@ -156,7 +156,7 @@ Public Class PDFEditorVM
If Not IsNothing(sRawPartList) Then SetExpander(sRawPartList) If Not IsNothing(sRawPartList) Then SetExpander(sRawPartList)
SetViewButton(VIEW_BUTTON.PDF) SetViewButton(VIEW_BUTTON.PDF)
Case VIEW_BUTTON.PDF Case VIEW_BUTTON.PDF
SetPdfViewer_Visibility(Visibility.Visible) SetPdfViewer_Visibility(True)
Configuration.CreatePrintPDF(PDFPage.MACHING, True) Configuration.CreatePrintPDF(PDFPage.MACHING, True)
SetWebAddress(Map.refMainWindowVM.MainWindowM.sTempDir & "\Statistics.pdf") SetWebAddress(Map.refMainWindowVM.MainWindowM.sTempDir & "\Statistics.pdf")
End Select End Select
@@ -188,10 +188,10 @@ Public Class PDFEditorVM
SetViewButton(VIEW_BUTTON.LIST) SetViewButton(VIEW_BUTTON.LIST)
For Each Expander As ExpanderPDF In Map.refPDFEditorVM.ExpanderList For Each Expander As ExpanderPDF In Map.refPDFEditorVM.ExpanderList
Expander.SetExpanderVisibilty(Visibility.Collapsed) Expander.SetExpanderVisibilty(False)
Next Next
SetPdfViewer_Visibility(Visibility.Hidden) SetPdfViewer_Visibility(False)
SetWebAddress("") SetWebAddress("")
End Sub End Sub
@@ -228,8 +228,8 @@ Public Class ExpanderPDF
Return m_ExpanderVisibilty Return m_ExpanderVisibilty
End Get End Get
End Property End Property
Friend Sub SetExpanderVisibilty(value As Visibility) Friend Sub SetExpanderVisibilty(value As Boolean)
m_ExpanderVisibilty = value m_ExpanderVisibilty = If(value, Visibility.Visible, Visibility.Collapsed)
NotifyPropertyChanged(NameOf(ExpanderVisibilty)) NotifyPropertyChanged(NameOf(ExpanderVisibilty))
End Sub End Sub
@@ -455,13 +455,13 @@ Public Class JsonDefaultStrategyParameter
StrategyParameter = New BooleanStrategyParameter() StrategyParameter = New BooleanStrategyParameter()
DirectCast(StrategyParameter, BooleanStrategyParameter).SetValue(m_sValue) DirectCast(StrategyParameter, BooleanStrategyParameter).SetValue(m_sValue)
If m_sMinUserLevel = 1 Then If m_sMinUserLevel = 1 Then
DirectCast(StrategyParameter, BooleanStrategyParameter).SetbBooleanVisibility(Visibility.Visible) DirectCast(StrategyParameter, BooleanStrategyParameter).SetbBooleanVisibility(True)
End If End If
Case "d" Case "d"
StrategyParameter = New DoubleStrategyParameter() StrategyParameter = New DoubleStrategyParameter()
DirectCast(StrategyParameter, DoubleStrategyParameter).SetValue(m_sValue) DirectCast(StrategyParameter, DoubleStrategyParameter).SetValue(m_sValue)
If m_sMinUserLevel = 1 Then If m_sMinUserLevel = 1 Then
DirectCast(StrategyParameter, DoubleStrategyParameter).SetbDoubleVisibility(Visibility.Visible) DirectCast(StrategyParameter, DoubleStrategyParameter).SetbDoubleVisibility(True)
End If End If
Case "combo" Case "combo"
StrategyParameter = New ComboStrategyParameter() StrategyParameter = New ComboStrategyParameter()
@@ -470,19 +470,19 @@ Public Class JsonDefaultStrategyParameter
Next Next
DirectCast(StrategyParameter, ComboStrategyParameter).SetSelValue(m_sValue) DirectCast(StrategyParameter, ComboStrategyParameter).SetSelValue(m_sValue)
If m_sMinUserLevel = 1 Then If m_sMinUserLevel = 1 Then
DirectCast(StrategyParameter, ComboStrategyParameter).SetbComboBoxVisibility(Visibility.Visible) DirectCast(StrategyParameter, ComboStrategyParameter).SetbComboBoxVisibility(True)
End If End If
Case "tool" Case "tool"
StrategyParameter = New ListStrategyParameter(m_sSubType) StrategyParameter = New ListStrategyParameter(m_sSubType)
DirectCast(StrategyParameter, ListStrategyParameter).CreateToolsViews() DirectCast(StrategyParameter, ListStrategyParameter).CreateToolsViews()
If m_sMinUserLevel = 1 Then If m_sMinUserLevel = 1 Then
DirectCast(StrategyParameter, ListStrategyParameter).SetbListBoxVisibility(Visibility.Visible) DirectCast(StrategyParameter, ListStrategyParameter).SetbListBoxVisibility(True)
End If End If
Case "s" Case "s"
StrategyParameter = New StringStrategyParameter() StrategyParameter = New StringStrategyParameter()
DirectCast(StrategyParameter, StringStrategyParameter).SetValue(m_sValue) DirectCast(StrategyParameter, StringStrategyParameter).SetValue(m_sValue)
If m_sMinUserLevel = 1 Then If m_sMinUserLevel = 1 Then
DirectCast(StrategyParameter, StringStrategyParameter).SetbStringVisibility(Visibility.Visible) DirectCast(StrategyParameter, StringStrategyParameter).SetbStringVisibility(True)
End If End If
Case Else Case Else
If Not IsNothing(m_sType) Then EgtOutLog("Tipo: " & m_sType & " non presente") If Not IsNothing(m_sType) Then EgtOutLog("Tipo: " & m_sType & " non presente")
@@ -78,7 +78,6 @@ Public Class StrategyManagerVM
EgtUILib.WritePrivateProfileString(S_STRATEGY, K_DEFAULTCONFIG, m_SelStrategySetup.sName, Map.refMainWindowVM.MainWindowM.sDefaultConfig) EgtUILib.WritePrivateProfileString(S_STRATEGY, K_DEFAULTCONFIG, m_SelStrategySetup.sName, Map.refMainWindowVM.MainWindowM.sDefaultConfig)
m_SelStrategySetup.Read() m_SelStrategySetup.Read()
End If End If
SetSaveImage(MODIFY_IMAGE)
NotifyPropertyChanged(NameOf(SelStrategySetup)) NotifyPropertyChanged(NameOf(SelStrategySetup))
End Sub End Sub
@@ -408,7 +407,7 @@ Public Class StrategyManagerVM
''' </summary> ''' </summary>
Public Sub OpenFileNameCustomConfig() Public Sub OpenFileNameCustomConfig()
Dim SaveAsStrategyVM As New SaveAsStrategyVM() Dim SaveAsStrategyVM As New SaveAsStrategyVM()
SaveAsStrategyVM.SetbSave_Visibility(Visibility.Visible) SaveAsStrategyVM.SetbSave_Visibility(True)
Dim SaveAsStrategyWnd As New SaveAsStrategyV With { Dim SaveAsStrategyWnd As New SaveAsStrategyV With {
.DataContext = SaveAsStrategyVM, .DataContext = SaveAsStrategyVM,
.Owner = Application.Current.MainWindow .Owner = Application.Current.MainWindow
@@ -435,7 +434,7 @@ Public Class StrategyManagerVM
Public Sub NewAiSetup() Public Sub NewAiSetup()
SetDefaultConfig_IsChecked(False) SetDefaultConfig_IsChecked(False)
Dim NewStrategyVM As New SaveAsStrategyVM() Dim NewStrategyVM As New SaveAsStrategyVM()
NewStrategyVM.SetbOpen_Visibility(Visibility.Visible) NewStrategyVM.SetbOpen_Visibility(True)
Dim NewStrategyWnd As New SaveAsStrategyV With { Dim NewStrategyWnd As New SaveAsStrategyV With {
.DataContext = NewStrategyVM, .DataContext = NewStrategyVM,
.Owner = Application.Current.MainWindow .Owner = Application.Current.MainWindow
@@ -1150,29 +1149,29 @@ Public Class Strategy
Case GetType(BooleanStrategyParameter) Case GetType(BooleanStrategyParameter)
DirectCast(DefaultParameter, BooleanStrategyParameter).SetValue(Parameter.sValue) DirectCast(DefaultParameter, BooleanStrategyParameter).SetValue(Parameter.sValue)
If Parameter.sMinUserLevel = 1 Then If Parameter.sMinUserLevel = 1 Then
DirectCast(DefaultParameter, BooleanStrategyParameter).SetbBooleanVisibility(Visibility.Visible) DirectCast(DefaultParameter, BooleanStrategyParameter).SetbBooleanVisibility(True)
End If End If
Case GetType(DoubleStrategyParameter) Case GetType(DoubleStrategyParameter)
DirectCast(DefaultParameter, DoubleStrategyParameter).SetValue(Parameter.sValue) DirectCast(DefaultParameter, DoubleStrategyParameter).SetValue(Parameter.sValue)
If Parameter.sMinUserLevel = 1 Then If Parameter.sMinUserLevel = 1 Then
DirectCast(DefaultParameter, DoubleStrategyParameter).SetbDoubleVisibility(Visibility.Visible) DirectCast(DefaultParameter, DoubleStrategyParameter).SetbDoubleVisibility(True)
End If End If
Case GetType(ComboStrategyParameter) Case GetType(ComboStrategyParameter)
DirectCast(DefaultParameter, ComboStrategyParameter).SetSelValue(Parameter.sValue) DirectCast(DefaultParameter, ComboStrategyParameter).SetSelValue(Parameter.sValue)
If Parameter.sMinUserLevel = 1 Then If Parameter.sMinUserLevel = 1 Then
DirectCast(DefaultParameter, ComboStrategyParameter).SetbComboBoxVisibility(Visibility.Visible) DirectCast(DefaultParameter, ComboStrategyParameter).SetbComboBoxVisibility(True)
End If End If
Case GetType(StringStrategyParameter) Case GetType(StringStrategyParameter)
DirectCast(DefaultParameter, StringStrategyParameter).SetValue(Parameter.sValue) DirectCast(DefaultParameter, StringStrategyParameter).SetValue(Parameter.sValue)
If Parameter.sMinUserLevel = 1 Then If Parameter.sMinUserLevel = 1 Then
DirectCast(DefaultParameter, StringStrategyParameter).SetbStringVisibility(Visibility.Visible) DirectCast(DefaultParameter, StringStrategyParameter).SetbStringVisibility(True)
End If End If
Case GetType(ListStrategyParameter) Case GetType(ListStrategyParameter)
DirectCast(DefaultParameter, ListStrategyParameter).SetSelValue(Parameter.sValue) DirectCast(DefaultParameter, ListStrategyParameter).SetSelValue(Parameter.sValue)
DirectCast(DefaultParameter, ListStrategyParameter).CreateToolsViews() DirectCast(DefaultParameter, ListStrategyParameter).CreateToolsViews()
DirectCast(DefaultParameter, ListStrategyParameter).ToolView() DirectCast(DefaultParameter, ListStrategyParameter).ToolView()
If Parameter.sMinUserLevel = 1 Then If Parameter.sMinUserLevel = 1 Then
DirectCast(DefaultParameter, ListStrategyParameter).SetbListBoxVisibility(Visibility.Visible) DirectCast(DefaultParameter, ListStrategyParameter).SetbListBoxVisibility(True)
End If End If
End Select End Select
End If End If
@@ -1346,8 +1345,8 @@ Public Class BooleanStrategyParameter
Return m_bBooleanVisibility Return m_bBooleanVisibility
End Get End Get
End Property End Property
Friend Sub SetbBooleanVisibility(value As Visibility) Friend Sub SetbBooleanVisibility(value As Boolean)
m_bBooleanVisibility = value m_bBooleanVisibility = If(value, Visibility.Visible, Visibility.Collapsed)
NotifyPropertyChanged(NameOf(bBooleanVisibility)) NotifyPropertyChanged(NameOf(bBooleanVisibility))
End Sub End Sub
@@ -1361,9 +1360,9 @@ Public Class BooleanStrategyParameter
m_bIsBooleanModify = value m_bIsBooleanModify = value
If m_bIsBooleanModify Then If m_bIsBooleanModify Then
If Not IsNothing(Map.refProjectVM.BTLStructureVM.SelBTLPart.SelBTLFeatureVM) Then If Not IsNothing(Map.refProjectVM.BTLStructureVM.SelBTLPart.SelBTLFeatureVM) Then
Map.refProjectVM.BTLStructureVM.SelBTLPart.SelBTLFeatureVM.SetbStrategy_Visibility(Visibility.Visible) Map.refProjectVM.BTLStructureVM.SelBTLPart.SelBTLFeatureVM.SetbStrategy_Visibility(True)
ElseIf Not IsNothing(Map.refProjectVM.MachGroupPanelVM.SelectedMachGroup.SelPart.SelFeatureVM) Then ElseIf Not IsNothing(Map.refProjectVM.MachGroupPanelVM.SelectedMachGroup.SelPart.SelFeatureVM) Then
Map.refProjectVM.MachGroupPanelVM.SelectedMachGroup.SelPart.SelFeatureVM.SetbStrategy_Visibility(Visibility.Visible) Map.refProjectVM.MachGroupPanelVM.SelectedMachGroup.SelPart.SelFeatureVM.SetbStrategy_Visibility(True)
End If End If
End If End If
NotifyPropertyChanged(NameOf(bIsBooleanModify)) NotifyPropertyChanged(NameOf(bIsBooleanModify))
@@ -1443,8 +1442,8 @@ Public Class DoubleStrategyParameter
Return m_bDoubleVisibility Return m_bDoubleVisibility
End Get End Get
End Property End Property
Friend Sub SetbDoubleVisibility(value As Visibility) Friend Sub SetbDoubleVisibility(value As Boolean)
m_bDoubleVisibility = value m_bDoubleVisibility = If(value, Visibility.Visible, Visibility.Collapsed)
NotifyPropertyChanged(NameOf(bDoubleVisibility)) NotifyPropertyChanged(NameOf(bDoubleVisibility))
End Sub End Sub
@@ -1458,9 +1457,9 @@ Public Class DoubleStrategyParameter
m_bIsDoubleModify = value m_bIsDoubleModify = value
If m_bIsDoubleModify Then If m_bIsDoubleModify Then
If Not IsNothing(Map.refProjectVM.BTLStructureVM.SelBTLPart.SelBTLFeatureVM) Then If Not IsNothing(Map.refProjectVM.BTLStructureVM.SelBTLPart.SelBTLFeatureVM) Then
Map.refProjectVM.BTLStructureVM.SelBTLPart.SelBTLFeatureVM.SetbStrategy_Visibility(Visibility.Visible) Map.refProjectVM.BTLStructureVM.SelBTLPart.SelBTLFeatureVM.SetbStrategy_Visibility(True)
ElseIf Not IsNothing(Map.refProjectVM.MachGroupPanelVM.SelectedMachGroup.SelPart.SelFeatureVM) Then ElseIf Not IsNothing(Map.refProjectVM.MachGroupPanelVM.SelectedMachGroup.SelPart.SelFeatureVM) Then
Map.refProjectVM.MachGroupPanelVM.SelectedMachGroup.SelPart.SelFeatureVM.SetbStrategy_Visibility(Visibility.Visible) Map.refProjectVM.MachGroupPanelVM.SelectedMachGroup.SelPart.SelFeatureVM.SetbStrategy_Visibility(True)
End If End If
End If End If
NotifyPropertyChanged(NameOf(bIsDoubleModify)) NotifyPropertyChanged(NameOf(bIsDoubleModify))
@@ -1523,8 +1522,8 @@ Public Class StringStrategyParameter
Return m_bStringVisibility Return m_bStringVisibility
End Get End Get
End Property End Property
Friend Sub SetbStringVisibility(value As Visibility) Friend Sub SetbStringVisibility(value As Boolean)
m_bStringVisibility = value m_bStringVisibility = If(value, Visibility.Visible, Visibility.Collapsed)
NotifyPropertyChanged(NameOf(bStringVisibility)) NotifyPropertyChanged(NameOf(bStringVisibility))
End Sub End Sub
@@ -1538,9 +1537,9 @@ Public Class StringStrategyParameter
m_bIsStringModify = value m_bIsStringModify = value
If m_bIsStringModify Then If m_bIsStringModify Then
If Not IsNothing(Map.refProjectVM.BTLStructureVM.SelBTLPart.SelBTLFeatureVM) Then If Not IsNothing(Map.refProjectVM.BTLStructureVM.SelBTLPart.SelBTLFeatureVM) Then
Map.refProjectVM.BTLStructureVM.SelBTLPart.SelBTLFeatureVM.SetbStrategy_Visibility(Visibility.Visible) Map.refProjectVM.BTLStructureVM.SelBTLPart.SelBTLFeatureVM.SetbStrategy_Visibility(True)
ElseIf Not IsNothing(Map.refProjectVM.MachGroupPanelVM.SelectedMachGroup.SelPart.SelFeatureVM) Then ElseIf Not IsNothing(Map.refProjectVM.MachGroupPanelVM.SelectedMachGroup.SelPart.SelFeatureVM) Then
Map.refProjectVM.MachGroupPanelVM.SelectedMachGroup.SelPart.SelFeatureVM.SetbStrategy_Visibility(Visibility.Visible) Map.refProjectVM.MachGroupPanelVM.SelectedMachGroup.SelPart.SelFeatureVM.SetbStrategy_Visibility(True)
End If End If
End If End If
NotifyPropertyChanged(NameOf(bIsStringModify)) NotifyPropertyChanged(NameOf(bIsStringModify))
@@ -1616,8 +1615,8 @@ Public Class ComboStrategyParameter
Return m_bComboBoxVisibility Return m_bComboBoxVisibility
End Get End Get
End Property End Property
Friend Sub SetbComboBoxVisibility(value As Visibility) Friend Sub SetbComboBoxVisibility(value As Boolean)
m_bComboBoxVisibility = value m_bComboBoxVisibility = If(value, Visibility.Visible, Visibility.Collapsed)
NotifyPropertyChanged(NameOf(bComboBoxVisibility)) NotifyPropertyChanged(NameOf(bComboBoxVisibility))
End Sub End Sub
@@ -1631,9 +1630,9 @@ Public Class ComboStrategyParameter
m_bIsComboBoxModify = value m_bIsComboBoxModify = value
If m_bIsComboBoxModify Then If m_bIsComboBoxModify Then
If Not IsNothing(Map.refProjectVM.BTLStructureVM.SelBTLPart.SelBTLFeatureVM) Then If Not IsNothing(Map.refProjectVM.BTLStructureVM.SelBTLPart.SelBTLFeatureVM) Then
Map.refProjectVM.BTLStructureVM.SelBTLPart.SelBTLFeatureVM.SetbStrategy_Visibility(Visibility.Visible) Map.refProjectVM.BTLStructureVM.SelBTLPart.SelBTLFeatureVM.SetbStrategy_Visibility(True)
ElseIf Not IsNothing(Map.refProjectVM.MachGroupPanelVM.SelectedMachGroup.SelPart.SelFeatureVM) Then ElseIf Not IsNothing(Map.refProjectVM.MachGroupPanelVM.SelectedMachGroup.SelPart.SelFeatureVM) Then
Map.refProjectVM.MachGroupPanelVM.SelectedMachGroup.SelPart.SelFeatureVM.SetbStrategy_Visibility(Visibility.Visible) Map.refProjectVM.MachGroupPanelVM.SelectedMachGroup.SelPart.SelFeatureVM.SetbStrategy_Visibility(True)
End If End If
End If End If
NotifyPropertyChanged(NameOf(bIsComboBoxModify)) NotifyPropertyChanged(NameOf(bIsComboBoxModify))
@@ -1732,8 +1731,8 @@ Public Class ListStrategyParameter
Return m_bAvailableToolListVisibility Return m_bAvailableToolListVisibility
End Get End Get
End Property End Property
Friend Sub SetAvailableToolListVisibility(value As Visibility) Friend Sub SetAvailableToolListVisibility(value As Boolean)
m_bAvailableToolListVisibility = value m_bAvailableToolListVisibility = If(value, Visibility.Visible, Visibility.Collapsed)
NotifyPropertyChanged(NameOf(AvailableToolListVisibility)) NotifyPropertyChanged(NameOf(AvailableToolListVisibility))
End Sub End Sub
@@ -1776,8 +1775,8 @@ Public Class ListStrategyParameter
Return m_bListBoxVisibility Return m_bListBoxVisibility
End Get End Get
End Property End Property
Friend Sub SetbListBoxVisibility(value As Visibility) Friend Sub SetbListBoxVisibility(value As Boolean)
m_bListBoxVisibility = value m_bListBoxVisibility = If(value, Visibility.Visible, Visibility.Collapsed)
NotifyPropertyChanged(NameOf(bListBoxVisibility)) NotifyPropertyChanged(NameOf(bListBoxVisibility))
End Sub End Sub
@@ -1791,9 +1790,9 @@ Public Class ListStrategyParameter
m_bIsListModify = value m_bIsListModify = value
If m_bIsListModify Then If m_bIsListModify Then
If Not IsNothing(Map.refProjectVM.BTLStructureVM.SelBTLPart.SelBTLFeatureVM) Then If Not IsNothing(Map.refProjectVM.BTLStructureVM.SelBTLPart.SelBTLFeatureVM) Then
Map.refProjectVM.BTLStructureVM.SelBTLPart.SelBTLFeatureVM.SetbStrategy_Visibility(Visibility.Visible) Map.refProjectVM.BTLStructureVM.SelBTLPart.SelBTLFeatureVM.SetbStrategy_Visibility(True)
ElseIf Not IsNothing(Map.refProjectVM.MachGroupPanelVM.SelectedMachGroup.SelPart.SelFeatureVM) Then ElseIf Not IsNothing(Map.refProjectVM.MachGroupPanelVM.SelectedMachGroup.SelPart.SelFeatureVM) Then
Map.refProjectVM.MachGroupPanelVM.SelectedMachGroup.SelPart.SelFeatureVM.SetbStrategy_Visibility(Visibility.Visible) Map.refProjectVM.MachGroupPanelVM.SelectedMachGroup.SelPart.SelFeatureVM.SetbStrategy_Visibility(True)
End If End If
End If End If
NotifyPropertyChanged(NameOf(bIsListModify)) NotifyPropertyChanged(NameOf(bIsListModify))
@@ -1910,7 +1909,7 @@ Public Class ListStrategyParameter
End Property End Property
Friend Sub OpenToolList() Friend Sub OpenToolList()
SetAvailableToolListVisibility(Visibility.Visible) SetAvailableToolListVisibility(True)
SetOpenToolListIsEnable(False) SetOpenToolListIsEnable(False)
End Sub End Sub
@@ -1928,7 +1927,7 @@ Public Class ListStrategyParameter
End Property End Property
Friend Sub CloseToolList() Friend Sub CloseToolList()
SetAvailableToolListVisibility(Visibility.Collapsed) SetAvailableToolListVisibility(True)
SetOpenToolListIsEnable(True) SetOpenToolListIsEnable(True)
End Sub End Sub
+14 -2
View File
@@ -425,7 +425,6 @@
<!--#region StrategyModify--> <!--#region StrategyModify-->
<Style x:Key="StrategyModify_TextBlock" TargetType="{x:Type TextBlock}" BasedOn="{StaticResource {x:Type TextBlock}}"> <Style x:Key="StrategyModify_TextBlock" TargetType="{x:Type TextBlock}" BasedOn="{StaticResource {x:Type TextBlock}}">
<Setter Property="Text" Value="&#9999;"/>
<Setter Property="Foreground" Value="{DynamicResource TextBlock.StrategyModify.Foreground}"/> <Setter Property="Foreground" Value="{DynamicResource TextBlock.StrategyModify.Foreground}"/>
<Setter Property="VerticalAlignment" Value="Center"/> <Setter Property="VerticalAlignment" Value="Center"/>
<Setter Property="FontWeight" Value="Normal"/> <Setter Property="FontWeight" Value="Normal"/>
@@ -443,7 +442,6 @@
<!--#region CALC_ROT--> <!--#region CALC_ROT-->
<Style x:Key="CALC_ROT_TextBlock" TargetType="{x:Type TextBlock}" BasedOn="{StaticResource {x:Type TextBlock}}"> <Style x:Key="CALC_ROT_TextBlock" TargetType="{x:Type TextBlock}" BasedOn="{StaticResource {x:Type TextBlock}}">
<Setter Property="Text" Value="&#11119;"/>
<Setter Property="Foreground" Value="{DynamicResource TextBlock.CALC_ROT.Foreground}"/> <Setter Property="Foreground" Value="{DynamicResource TextBlock.CALC_ROT.Foreground}"/>
<Setter Property="HorizontalAlignment" Value="Center"/> <Setter Property="HorizontalAlignment" Value="Center"/>
<Setter Property="VerticalAlignment" Value="Top"/> <Setter Property="VerticalAlignment" Value="Top"/>
@@ -533,6 +531,16 @@
<Setter Property="Margin" Value="10,5,10,0"/> <Setter Property="Margin" Value="10,5,10,0"/>
</Style> </Style>
<Style x:Key="ErrConfig_TextBlock" TargetType="{x:Type TextBlock}" BasedOn="{StaticResource {x:Type TextBlock}}">
<Setter Property="Foreground" Value="{StaticResource BeamWall_Red}"/>
<Setter Property="HorizontalAlignment" Value="Center"/>
<Setter Property="VerticalAlignment" Value="Center"/>
<Setter Property="TextAlignment" Value="Justify"/>
<Setter Property="TextWrapping" Value="Wrap" />
<Setter Property="FontSize" Value="13"/>
<Setter Property="Margin" Value="10,0,0,0"/>
</Style>
<!--#endregion TextBlock--> <!--#endregion TextBlock-->
<!-- ______________________________________________________________________________________________________________________________________________ --> <!-- ______________________________________________________________________________________________________________________________________________ -->
@@ -1969,6 +1977,10 @@
<Setter Property="VerticalAlignment" Value="Center"/> <Setter Property="VerticalAlignment" Value="Center"/>
</Style> </Style>
<Style x:Key="FreeContourManager_StackPanel" TargetType="{x:Type StackPanel}" BasedOn="{StaticResource BTLPartManager_StackPanel}">
<Setter Property="Margin" Value="2,5,2,5"/>
</Style>
<!--#endregion BTLPartManager--> <!--#endregion BTLPartManager-->
<!--#region PartManager--> <!--#region PartManager-->
@@ -72,12 +72,6 @@ Public Class MainMenuVM
End Get End Get
End Property End Property
Public ReadOnly Property ViewerOptimizer_Visibility As Visibility
Get
Return Visibility.Collapsed
End Get
End Property
Private m_SelPage As Integer = -1 Private m_SelPage As Integer = -1
Public Property SelPage As Integer Public Property SelPage As Integer
Get Get
@@ -67,7 +67,7 @@ Public Class MainWindowVM
Public Sub UpdateTitle() Public Sub UpdateTitle()
m_Title = "" m_Title = ""
If Not IsNothing(Map.refSupervisorManagerVM.CurrProd) Then If Not IsNothing(Map.refSupervisorManagerVM.CurrProd) Then
m_Title = Map.refSupervisorManagerVM.CurrProd.nProdId.ToString("0000") & " - EgtBEAMWALL" m_Title = Map.refSupervisorManagerVM.CurrProd.nProdId.ToString("0000") & " - " & Map.refSupervisorManagerVM.CurrProd.sName & " - AEdifica"
End If End If
NotifyPropertyChanged(NameOf(Title)) NotifyPropertyChanged(NameOf(Title))
End Sub End Sub
@@ -70,5 +70,5 @@ Imports System.Windows
' by using the '*' as shown below: ' by using the '*' as shown below:
' <Assembly: AssemblyVersion("1.0.*")> ' <Assembly: AssemblyVersion("1.0.*")>
<Assembly: AssemblyVersion("3.1.4.4")> <Assembly: AssemblyVersion("3.1.4.7")>
<Assembly: AssemblyFileVersion("3.1.4.4")> <Assembly: AssemblyFileVersion("3.1.4.7")>
@@ -10,8 +10,8 @@ Public Class OpenProjectFileDialogVM
Public Overrides Function Init(ProjectType As ProjectType, Optional CurrProjectList As List(Of ProjectFileVM) = Nothing, Optional GoToProd As Boolean = False) As Boolean? Public Overrides Function Init(ProjectType As ProjectType, Optional CurrProjectList As List(Of ProjectFileVM) = Nothing, Optional GoToProd As Boolean = False) As Boolean?
m_ProjectType = ProjectType m_ProjectType = ProjectType
m_GoToProd = GoToProd m_GoToProd = GoToProd
' carico colonne '' carico colonne
LoadColumns() 'LoadColumns()
NotifyPropertyChanged(NameOf(FilterTypeList)) NotifyPropertyChanged(NameOf(FilterTypeList))
m_SelFilterType = m_FilterTypeList(0) m_SelFilterType = m_FilterTypeList(0)
' carico lista progetti ' carico lista progetti
@@ -85,14 +85,6 @@ Public Class MySceneHostVM
Dim sTitle As String = EgtMsg(10101) Dim sTitle As String = EgtMsg(10101)
If EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, sText, sTitle, MessageBoxButton.OKCancel, MessageBoxImage.Error) = MessageBoxResult.OK Then If EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, sText, sTitle, MessageBoxButton.OKCancel, MessageBoxImage.Error) = MessageBoxResult.OK Then
' Apro dialogo per richiesta file licenza ' Apro dialogo per richiesta file licenza
'Dim LicDlg As New EgtBEAMWALL.Core.EgtManageFileDialogV(Application.Current.MainWindow, New EgtManageFileDialogVM()) With {
' .Title = EgtMsg(110026),
' .Filter = "Licences (.lic)|*.lic",
' .FilterIndex = 1,
' .InitialDirectory = Map.refMainWindowVM.MainWindowM.sConfigDir,
' .CheckFileExists = True,
' .ValidateNames = True,
' .Mode = 1}
Dim LicDlg As New Microsoft.Win32.OpenFileDialog() With { Dim LicDlg As New Microsoft.Win32.OpenFileDialog() With {
.Title = EgtMsg(110026), .Title = EgtMsg(110026),
.DefaultExt = ".lic", .DefaultExt = ".lic",