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 Property
Protected m_BTLPartM As BTLPartM
Protected m_PartM As PartM
Public ReadOnly Property nFeatureId As Integer
Get
@@ -215,11 +216,17 @@ Public Class BTLFeatureVM
Return m_bStrategy_Visibility
End Get
End Property
Public Sub SetbStrategy_Visibility(value As Visibility)
m_bStrategy_Visibility = value
Public Sub SetbStrategy_Visibility(value As Boolean)
m_bStrategy_Visibility = If(value, Visibility.Visible, Visibility.Collapsed)
NotifyPropertyChanged(NameOf(bStrategy_Visibility))
End Sub
Public ReadOnly Property IsEnabled As Boolean
Get
Return m_PartM.nProductionState < ItemState.Assigned
End Get
End Property
#Region "CONSTRUCTOR"
Sub New()
@@ -483,6 +483,12 @@ Public MustInherit Class PartVM
End Get
End Property
Public ReadOnly Property ButtonIsEnabled As Boolean
Get
Return m_PartM.nProductionState < ItemState.Assigned
End Get
End Property
#End Region ' Supervisor
' definizione comandi
+2 -2
View File
@@ -38,5 +38,5 @@ Imports System.Windows
' by using the '*' as shown below:
' <Assembly: AssemblyVersion("1.0.*")>
<Assembly: AssemblyVersion("3.1.4.4")>
<Assembly: AssemblyFileVersion("3.1.4.4")>
<Assembly: AssemblyVersion("3.1.4.7")>
<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
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("3.1.4.4")]
[assembly: AssemblyFileVersion("3.1.4.4")]
[assembly: AssemblyVersion("3.1.4.7")]
[assembly: AssemblyFileVersion("3.1.4.7")]
@@ -18,15 +18,19 @@
<RowDefinition Height="Auto"/>
<RowDefinition Height="1*"/>
</Grid.RowDefinitions>
<ComboBox ItemsSource="{Binding StrategySetupList}"
SelectedItem="{Binding SelStrategySetup, UpdateSourceTrigger=PropertyChanged}"
Style="{StaticResource BTLDataWnd_ComboBox}">
<ComboBox.ItemContainerStyle>
<Style TargetType="{x:Type ComboBoxItem}">
<EventSetter Event="PreviewMouseDown" Handler="ComboBoxItem_PreviewMouseDown"/>
</Style>
</ComboBox.ItemContainerStyle>
</ComboBox>
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
<ComboBox ItemsSource="{Binding StrategySetupList}"
SelectedItem="{Binding SelStrategySetup, UpdateSourceTrigger=PropertyChanged}"
Style="{StaticResource BTLDataWnd_ComboBox}">
<ComboBox.ItemContainerStyle>
<Style TargetType="{x:Type ComboBoxItem}">
<EventSetter Event="PreviewMouseDown" Handler="ComboBoxItem_PreviewMouseDown"/>
</Style>
</ComboBox.ItemContainerStyle>
</ComboBox>
<TextBlock Text="{Binding ErrText}"
Style="{StaticResource ErrConfig_TextBlock}"/>
</StackPanel>
<Grid Grid.Row="1">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
@@ -16,7 +16,7 @@
Private Sub ComboBoxItem_PreviewMouseDown(sender As Object, e As MouseButtonEventArgs)
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.Read()
Map.refBTLDataWndVM.ReadCustomGeneralParameters(SelStrategy.Content)
+96 -115
View File
@@ -69,6 +69,17 @@ Public Class BTLDataWndVM
NotifyPropertyChanged(NameOf(IsBTLDataWnd))
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"
Public m_sPROJNUM As String
@@ -613,57 +624,23 @@ Public Class BTLDataWndVM
' Leggo parametri generali
Dim sDefaultConfigFile As String = String.Empty
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
m_SelStrategySetup = sDefaultConfigFile
End If
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)
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
GetGeneralParamtersList(nType)
Dim sAISetupDirPath As String = Map.refMainWindowVM.MainWindowM.GetAISetupDirPath(nType, True)
Dim sStrategyConfigurationFilePath As String = sAISetupDirPath & "\" & SelStrategySetup & ".json"
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
ReadGeneralConfiguration(sStrategyConfigurationFilePath)
' Leggo info se presenti
Dim sInfo As String = String.Empty
@@ -684,12 +661,20 @@ Public Class BTLDataWndVM
DirectCast(GeneralParameter, DoubleGenericParameter).sValue = sTmpDoubleValue
End If
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
If EgtExistsInfo(m_nBTLInfoLayerId, GeneralParameter.sNameNge) Then
EgtGetInfo(m_nBTLInfoLayerId, GeneralParameter.sNameNge, sTmpValueInfo)
DirectCast(GeneralParameter, ComboGenericParameter).SelValue = DirectCast(GeneralParameter, ComboGenericParameter).ComboList.FirstOrDefault(Function(x) x.sValue = sTmpValueInfo)
Else
If IsNothing(DirectCast(GeneralParameter, ComboGenericParameter).SelValue) Then
DirectCast(GeneralParameter, ComboGenericParameter).SelValue = New ComboParameter
End If
DirectCast(GeneralParameter, ComboGenericParameter).SelValue.sValue = sTmpComboValue
End If
Case GetType(StringGenericParameter)
@@ -716,60 +701,21 @@ Public Class BTLDataWndVM
End Sub
Friend Sub ReadCustomGeneralParameters(SelStrategySetup As String)
Dim sStrategiesDirPath As String = Map.refMainWindowVM.MainWindowM.GetStrategiesDirPath(Map.refStrategyManagerVM.SelStrategyType.Id)
Dim sGeneralParametersFilePath As String = sStrategiesDirPath & "\" & GENERALPARAMETERS_FILE & ".json"
If File.Exists(sGeneralParametersFilePath) Then
Dim sReadedFiles As String = File.ReadAllText(sGeneralParametersFilePath)
Dim JsonGeneralParametersList As List(Of JsonGeneralParameters) = JsonConvert.DeserializeObject(Of List(Of JsonGeneralParameters))(sReadedFiles)
m_GeneralParametersList = New ObservableCollection(Of ProjectParameters)((From JsonGeneralParameter In JsonGeneralParametersList
Select JsonGeneralParameter.Deserialize(Map.refStrategyManagerVM.SelStrategyType.Id)).ToList())
SetErrText(String.Empty)
GetGeneralParamtersList(Map.refStrategyManagerVM.SelStrategyType.Id)
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
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)
Dim sStrategyConfigurationFilePath As String = sAISetupDirPath & "\" & SelStrategySetup & ".json"
ReadGeneralConfiguration(sStrategyConfigurationFilePath)
Dim sStrategyConfigurationFilePath As String = sAISetupDirPath & "\" & SelStrategySetup & ".json"
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
NotifyPropertyChanged(NameOf(GeneralParametersList))
End Sub
Friend Sub SaveInfoBTL(nType As BWType)
Dim AISetupDirPath As String = Map.refMainWindowVM.MainWindowM.GetAISetupDirPath(nType, True)
Dim sDefaultConfigFile As String = String.Empty
Dim sTmpStrategySetup As String = String.Empty
Dim sInfo As String = String.Empty
' Controllo se presente file default config
If IsNothing(m_SelStrategySetup) 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)
End If
End If
For Each GeneralParameter In GeneralParametersList
Select Case GeneralParameter.GetType()
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
SetInfoGeneralParameters()
End Sub
Private Sub SaveInfo()
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
For Each GeneralParameter In GeneralParametersList
For Each GeneralParameter In m_GeneralParametersList
Select Case GeneralParameter.GetType()
Case GetType(BooleanGenericParameter)
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)
End Select
Next
NotifyPropertyChanged(NameOf(GeneralParametersList))
End Sub
#End Region ' METHODS
@@ -877,7 +858,7 @@ Public Class BTLDataWndVM
#End Region ' Ok
#Region "Ok"
#Region "Cancel"
Public ReadOnly Property Cancel_Command As ICommand
Get
@@ -892,7 +873,7 @@ Public Class BTLDataWndVM
RaiseEvent m_CloseWindow(False)
End Sub
#End Region ' Ok
#End Region ' Cancel
#End Region ' COMMANDS
@@ -275,6 +275,7 @@ Public Class BTLPartManagerVM
Private Sub RemoveScenePart(BTLPartToDelete As BTLPartVM)
' Rimuovo pezzo dalla scena
Dim IdAsseBase As Integer = Map.refProdManagerVM.ListProjAsseBase(BTLPartToDelete.nPROJ)
If IdAsseBase < 0 Then Return
' Setto il nuovo contesto
EgtSetCurrentContext(Map.refSceneShowBuldingVM.SceneShowBulding.GetCtx())
If EgtBeamGetBuildingIsOn(IdAsseBase) Then EgtBeamShowBuilding(IdAsseBase, False)
@@ -361,8 +362,9 @@ Public Class BTLPartManagerVM
Else
Map.refProjectVM.Read(ProjectManagerVM.CurrProd.nType)
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)
' Disabilito LeftPanel
Map.refProjectVM.SetLeftPanel_IsEnabled(False)
@@ -319,6 +319,7 @@ Public Class BTLFeatureVM
m_BTLFeatureM = BTLFeatureM
AddHandler m_BTLFeatureM.PBTLParamAdded, AddressOf OnPBTLParamAdded
m_BTLPartM = BTLPartM
m_PartM = Nothing
CreatePBTLParamVMList()
NotifyPropertyChanged(NameOf(Calc_Background))
NotifyPropertyChanged(NameOf(CALC_ROT_Visibility))
@@ -328,9 +329,10 @@ Public Class BTLFeatureVM
m_MenuList.Add(New MenuItemVm(Me))
End Sub
Sub New(BTLFeatureM As BTLFeatureM)
Sub New(BTLFeatureM As BTLFeatureM, PartM As PartM)
m_BTLFeatureM = BTLFeatureM
m_BTLPartM = Nothing
m_PartM = PartM
NotifyPropertyChanged(NameOf(Calc_Background))
NotifyPropertyChanged(NameOf(CALC_ROT_Visibility))
NotifyPropertyChanged(NameOf(CALC_ERR_Letter))
@@ -595,9 +597,10 @@ Public Class BTLFeatureVM
If Map.refShowBeamPanelVM.ShowBuilding_IsChecked Then
Map.refShowBeamPanelVM.ShowBuilding_IsChecked = False
End If
Map.refProjectVM.SetRawPartManagerVisibility(Visibility.Collapsed)
Map.refProjectVM.SetRawPartManagerVisibility(False)
Map.refProjectVM.SetSelManagerTab(ProjectVM.StrategyManagerTab.FEATUREMANAGERBTL)
Map.refProjectVM.SetSelFeatureManagerTab(ProjectVM.FeatureManagerTab.STRATEGYMANAGERBTL)
Map.refFeatureManagerVM.SetEditIsEnabled()
' Disabilito LeftPanel
Map.refProjectVM.SetLeftPanel_IsEnabled(False)
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
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 Property
Public ReadOnly Property CALC_FALL_Visibility As Visibility
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 Property
@@ -1556,7 +1556,7 @@ Public Class BTLPartVM
m_SelBTLFeatureVM.RefreshFCMBtnVisibility()
' Controlo se nPRC è 900 rendo visibile combobox Variant
If m_SelBTLFeatureVM.nPRC = 900 Then
Map.refFeatureManagerVM.SetVariant_Visibility(Visibility.Visible)
Map.refFeatureManagerVM.SetVariant_Visibility(True)
Dim nVariant As Integer = 0
If Integer.TryParse(m_SelBTLFeatureVM.sDES, nVariant) Then
m_SelBTLFeatureVM.nSelVARIANT = nVariant
@@ -1569,7 +1569,7 @@ Public Class BTLPartVM
Map.refPParameterListVM.SetCurrDraw(Map.refMainWindowVM.MainWindowM.sResourcesRoot & "\Features\" & m_SelBTLFeatureVM.sDescGRP & ".png")
End If
Else
Map.refFeatureManagerVM.SetVariant_Visibility(Visibility.Collapsed)
Map.refFeatureManagerVM.SetVariant_Visibility(False)
End If
End If
If Not IsNothing(Map.refFeatureListManagerVM) Then Map.refFeatureListManagerVM.FeatureSelectionChanged()
@@ -1584,11 +1584,11 @@ Public Class BTLPartVM
NotifyPropertyChanged(NameOf(SelBTLFeatureVM))
' se modalità building, la tolgo
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.refShowBeamPanelVM.SetShowBuilding(False)
Map.refProjectVM.SetManagerTabVisibility(Visibility.Visible)
If Not IsNothing(Map.refProjectVM.MachGroupPanelVM) Then Map.refProjectVM.SetFeatureListVisibility(Visibility.Visible)
Map.refProjectVM.SetManagerTabVisibility(True)
If Not IsNothing(Map.refProjectVM.MachGroupPanelVM) Then Map.refProjectVM.SetFeatureListVisibility(True)
End If
End Set
End Property
@@ -1606,7 +1606,7 @@ Public Class BTLPartVM
m_SelBTLFeatureVM.RefreshFCMBtnVisibility()
' Controlo se nPRC è 900 rendo visibile combobox Variant
If m_SelBTLFeatureVM.nPRC = 900 Then
Map.refFeatureManagerVM.SetVariant_Visibility(Visibility.Visible)
Map.refFeatureManagerVM.SetVariant_Visibility(True)
Dim nVariant As Integer = 0
If Integer.TryParse(m_SelBTLFeatureVM.sDES, nVariant) Then
m_SelBTLFeatureVM.nSelVARIANT = nVariant
@@ -1619,7 +1619,7 @@ Public Class BTLPartVM
Map.refPParameterListVM.SetCurrDraw(Map.refMainWindowVM.MainWindowM.sResourcesRoot & "\Features\" & m_SelBTLFeatureVM.sDescGRP & ".png")
End If
Else
Map.refFeatureManagerVM.SetVariant_Visibility(Visibility.Collapsed)
Map.refFeatureManagerVM.SetVariant_Visibility(False)
End If
End If
If Not IsNothing(Map.refFeatureListManagerVM) Then Map.refFeatureListManagerVM.FeatureSelectionChanged()
@@ -1739,14 +1739,14 @@ Public Class BTLPartVM
End Get
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
Get
Return m_bStrategyModify_Visibility
End Get
End Property
Friend Sub SetStrategyModify_Visibility(value As Visibility)
m_bStrategyModify_Visibility = value
Friend Sub SetStrategyModify_Visibility(value As Boolean)
m_bStrategyModify_Visibility = If(value, Visibility.Visible, Visibility.Hidden)
NotifyPropertyChanged(NameOf(StrategyModify_Visibility))
End Sub
@@ -1865,7 +1865,7 @@ Public Class BTLPartVM
AddHandler m_BTLFeatureVMList.CollectionChanged, AddressOf OnBTLFeatureVMListChanged
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
If m_BTLPartM.Rotation(IsPositive, SelectedMachineType, bRedraw, dAng) Then
' aggiorno visualizzazione dimensioni
@@ -1873,7 +1873,7 @@ Public Class BTLPartVM
NotifyPropertyChanged(NameOf(sH))
NotifyPropertyChanged(NameOf(sL))
' setto part e tutte le feature da ricalcolare
If CmdType <> CmdTypes.FLIP_ROT Then ResetCalcTotalPart()
If Not bResetCalc Then ResetCalcTotalPart()
' aggiorno sezioni
Map.refProjectVM.BTLStructureVM.UpdateSection(Section, OldSection)
End If
@@ -2286,10 +2286,10 @@ Public Class BTLPartVM
ForwardRotation(True)
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
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
bLockRotation = True
' se progetto travi e sezione precedente diversa da vuota (tutti i pezzi)
@@ -2390,6 +2390,7 @@ Public Class BTLPartVM
Friend Sub Verify()
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)
Return
End Sub
@@ -112,9 +112,9 @@ Public Class BTLStructureVM
If Map.refShowBeamPanelVM.ShowBuilding_IsChecked Then
ShowBuilding(False, False)
Map.refShowBeamPanelVM.SetShowBuilding(False)
Map.refProjectVM.SetSceneShowBuldingVisibility(Visibility.Collapsed)
Map.refProjectVM.SetManagerTabVisibility(Visibility.Visible)
If Not IsNothing(Map.refProjectVM.MachGroupPanelVM) Then Map.refProjectVM.SetFeatureListVisibility(Visibility.Visible)
Map.refProjectVM.SetSceneShowBuldingVisibility(False)
Map.refProjectVM.SetManagerTabVisibility(True)
If Not IsNothing(Map.refProjectVM.MachGroupPanelVM) Then Map.refProjectVM.SetFeatureListVisibility(True)
End If
SceneSelPartSelection()
' seleziono pezzo in Db geometrico
@@ -125,7 +125,6 @@ Public Class BTLStructureVM
EgtBeamShowLoadingSide(bLoadingSideShow, bLeftToRight)
' trovo ed evidenzio MachGroup e Duplo di questo pezzo
If Not IsNothing(Map.refProjectVM.MachGroupPanelVM) Then
Dim MachGroupList As New List(Of MyMachGroupVM)
For Each Machgroup As MyMachGroupVM In Map.refProjectVM.MachGroupPanelVM.MachGroupVMList
Dim bFound As Boolean = False
For Each Part As PartVM In Machgroup.PartVMList
@@ -153,8 +152,8 @@ Public Class BTLStructureVM
bValue = False
EgtGetInfo(FeatureParam.nFeatureId, ConstBeam.STRATEGY & FeatureParam.nFeatureId & "_FORCED", bValue)
If bValue Then
SelBTLPart.SetStrategyModify_Visibility(Visibility.Visible)
FeatureParam.SetbStrategy_Visibility(Visibility.Visible)
SelBTLPart.SetStrategyModify_Visibility(True)
FeatureParam.SetbStrategy_Visibility(True)
End If
For Each StrategySetupParam As StrategySetup In Map.refStrategyManagerVM.StrategySetupList
For Each StrategyFeatureParam As StrategyFeature In StrategySetupParam.StrategyFeatureList
@@ -163,7 +162,7 @@ Public Class BTLStructureVM
For Each Param As StrategyParameter In StrategyParam.ParameterList
bValueForced = False
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
@@ -883,7 +882,7 @@ Public Class BTLStructureVM
bValueForced = False
EgtGetInfo(m_BTLStructureM.nBTLInfoId, GeneralParameter.sNameNge & "_FORCED", bValue)
EgtGetInfo(BTLPart.nPartId, GeneralParameter.sNameNge & "_FORCED", bValueForced)
If bValueForced Then BTLPart.SetStrategyModify_Visibility(Visibility.Visible)
If bValueForced Then BTLPart.SetStrategyModify_Visibility(True)
Next
Next
End If
@@ -1382,15 +1381,6 @@ Public Class BTLStructureVM
GetMainPrivateProfileString(S_GENERAL, K_LASTUPDATEDIR, "", sDir)
If bWithDlg Then
' 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 {
.Title = EgtMsg(61834),
.DefaultExt = ".btl",
@@ -604,7 +604,7 @@ Public Class CALCPanelVM
End If
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
If CurrMachGroup.nProduction_State >= ItemState.Assigned Then Return
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"
If File.Exists(sMachGroupFilePath) Then File.Delete(sMachGroupFilePath)
End If
nCmdType = CmdType
nCmdType = CalcIntegration.CmdTypes.CHECKGEN
End Select
Args.Add("CmdType", nCmdType)
Dim ExecEnvironment As EXECENVIRONMENTS = EXECENVIRONMENTS.NULL
@@ -678,7 +678,7 @@ Public Class CALCPanelVM
ElseIf ProgramPage = ProjectType.PROD Then
' se e' gia' stato assegnato a supervisor, la salto e vado alla prossima barra
If Map.refMachGroupPanelVM.SelectedMachGroup.nProduction_State >= ItemState.Assigned Then Return
VerifyProdWithEngine(Map.refMachGroupPanelVM.SelectedMachGroup, CmdType)
VerifyProdWithEngine(Map.refMachGroupPanelVM.SelectedMachGroup)
End If
End Sub
@@ -804,7 +804,7 @@ Public Class CALCPanelVM
For PartIndex = 0 To Map.refMachGroupPanelVM.MachGroupVMList.Count - 1
' 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
VerifyProdWithEngine(Map.refMachGroupPanelVM.MachGroupVMList(PartIndex), CmdType)
VerifyProdWithEngine(Map.refMachGroupPanelVM.MachGroupVMList(PartIndex))
Next
End If
End Sub
@@ -971,7 +971,7 @@ Public Class CALCPanelVM
Map.refProjectVM.BTLStructureVM = New BTLStructureVM(BTLStructureM.CreateBTLStructure(ProjId))
For Each Part In Map.refProjectVM.BTLStructureVM.BTLPartVMList
Part.ResetCalcTotalPart()
Part.SetStrategyModify_Visibility(Visibility.Collapsed)
Part.SetStrategyModify_Visibility(False)
For Each Feature As BTLFeatureVM In Part.BTLFeatureVMList
Map.refForcedStrategyPanelVM.ResetForcedStrategy(Feature.nFeatureId)
Next
@@ -27,21 +27,21 @@ Public Class ConfigurationPageVM
If m_SelConfigSubPage = ConfigSubPages.GENERAL Then
' Controllo se il file CustomConfig Json è stato modificato
If Map.refStrategyManagerVM.bIsModifyStrategy Then Map.refStrategyManagerVM.SaveCustomConfigJson()
SetGeneral_Visibility(Visibility.Visible)
SetStrategyManager_Visibility(Visibility.Collapsed)
SetPDFEditor_Visibility(Visibility.Collapsed)
SetGeneral_Visibility(True)
SetStrategyManager_Visibility(False)
SetPDFEditor_Visibility(False)
ElseIf m_SelConfigSubPage = ConfigSubPages.MACHINE Then
' Controllo se il file CustomConfig Json è stato modificato
If Map.refStrategyManagerVM.bIsModifyStrategy Then Map.refStrategyManagerVM.SaveCustomConfigJson()
SetGeneral_Visibility(Visibility.Collapsed)
SetStrategyManager_Visibility(Visibility.Collapsed)
SetPDFEditor_Visibility(Visibility.Collapsed)
SetGeneral_Visibility(False)
SetStrategyManager_Visibility(False)
SetPDFEditor_Visibility(False)
ElseIf m_SelConfigSubPage = ConfigSubPages.PDFEDITOR Then
' Controllo se il file CustomConfig Json è stato modificato
If Map.refStrategyManagerVM.bIsModifyStrategy Then Map.refStrategyManagerVM.SaveCustomConfigJson()
SetPDFEditor_Visibility(Visibility.Visible)
SetGeneral_Visibility(Visibility.Collapsed)
SetStrategyManager_Visibility(Visibility.Collapsed)
SetPDFEditor_Visibility(True)
SetGeneral_Visibility(False)
SetStrategyManager_Visibility(False)
End If
End Set
End Property
@@ -204,8 +204,8 @@ Public Class ConfigurationPageVM
Return m_bGeneral_Visibility
End Get
End Property
Friend Sub SetGeneral_Visibility(value As Visibility)
m_bGeneral_Visibility = value
Friend Sub SetGeneral_Visibility(value As Boolean)
m_bGeneral_Visibility = If(value, Visibility.Visible, Visibility.Collapsed)
NotifyPropertyChanged(NameOf(General_Visibility))
End Sub
@@ -215,8 +215,8 @@ Public Class ConfigurationPageVM
Return m_bStrategyManager_Visibility
End Get
End Property
Friend Sub SetStrategyManager_Visibility(value As Visibility)
m_bStrategyManager_Visibility = value
Friend Sub SetStrategyManager_Visibility(value As Boolean)
m_bStrategyManager_Visibility = If(value, Visibility.Visible, Visibility.Collapsed)
NotifyPropertyChanged(NameOf(StrategyManager_Visibility))
End Sub
@@ -226,8 +226,8 @@ Public Class ConfigurationPageVM
Return m_bMachine_Visibility
End Get
End Property
Friend Sub SetMachine_Visibility(value As Visibility)
m_bMachine_Visibility = value
Friend Sub SetMachine_Visibility(value As Boolean)
m_bMachine_Visibility = If(value, Visibility.Visible, Visibility.Collapsed)
NotifyPropertyChanged(NameOf(Machine_Visibility))
End Sub
@@ -237,8 +237,8 @@ Public Class ConfigurationPageVM
Return m_bPDFEditor_Visibility
End Get
End Property
Friend Sub SetPDFEditor_Visibility(value As Visibility)
m_bPDFEditor_Visibility = value
Friend Sub SetPDFEditor_Visibility(value As Boolean)
m_bPDFEditor_Visibility = If(value, Visibility.Visible, Visibility.Collapsed)
NotifyPropertyChanged(NameOf(PDFEditor_Visibility))
End Sub
@@ -248,8 +248,8 @@ Public Class ConfigurationPageVM
Return m_MachineParameter_Visibility
End Get
End Property
Friend Sub SetMachineParameter_Visibility(value As Visibility)
m_MachineParameter_Visibility = value
Friend Sub SetMachineParameter_Visibility(value As Boolean)
m_MachineParameter_Visibility = If(value, Visibility.Visible, Visibility.Collapsed)
NotifyPropertyChanged(NameOf(MachineParameter_Visibility))
End Sub
@@ -614,8 +614,8 @@ Public Class ConfigurationPageVM
SelReminder = m_ReminderList.FirstOrDefault(Function(x) x.Id = nDefaultReminderFrequency)
Dim nExternalBackupActive As Integer = GetMainPrivateProfileInt(S_BACKUPANDRESTORE, K_EXTERNALBACKUPACTIVE, 0)
m_bExternalBackupActive = nExternalBackupActive > 0
SetMachineParameter_Visibility(Visibility.Collapsed)
SetMachine_Visibility(Visibility.Collapsed)
SetMachineParameter_Visibility(False)
SetMachine_Visibility(False)
' 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
'' imposto il tema
@@ -718,16 +718,6 @@ Public Class ConfigurationPageVM
End Property
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,
.CheckFileExists = False,
.CheckPathExists = False,
@@ -1006,7 +1006,7 @@
<Version>3.1.1.2</Version>
</PackageReference>
<PackageReference Include="EgwWPFBaseLib">
<Version>3.1.3-beta.1</Version>
<Version>3.1.3-beta.6</Version>
</PackageReference>
<PackageReference Include="EntityFramework">
<Version>6.4.4</Version>
@@ -89,7 +89,7 @@ Module MyExecProcessManager
If BTLPartItem.IsInverted Then bPreInvert = False
BTLPartItem.SetInverted(bPreInvert)
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
' Gestione progressbar per verificare l'inizio e la fine della verifica
Dim BeamManager As ExecProcessManager = m_ExecProcessManagerList(EXECENVIRONMENTS.BEAM)
@@ -23,8 +23,8 @@ Public Class FeatureManagerVM
Return m_Variant_Visibility
End Get
End Property
Public Sub SetVariant_Visibility(value As Visibility)
m_Variant_Visibility = value
Public Sub SetVariant_Visibility(value As Boolean)
m_Variant_Visibility = If(value, Visibility.Visible, Visibility.Collapsed)
NotifyPropertyChanged(NameOf(Variant_Visibility))
End Sub
@@ -285,15 +285,15 @@ Public Class ForcedStrategyPanelVM
m_SelStrategy.SetbIsStrategyModify(False)
EgtRemoveInfo(m_CurrentFeature.nFeatureId, ConstBeam.STRATEGY)
EgtRemoveInfo(m_CurrentFeature.nFeatureId, ConstBeam.STRATEGY & m_CurrentFeature.nFeatureId & "_FORCED")
Map.refProjectVM.BTLStructureVM.SelBTLPart.SetStrategyModify_Visibility(Visibility.Collapsed)
Map.refProjectVM.BTLStructureVM.SelBTLPart.SelBTLFeatureVM.SetbStrategy_Visibility(Visibility.Collapsed)
Map.refProjectVM.BTLStructureVM.SelBTLPart.SetStrategyModify_Visibility(False)
Map.refProjectVM.BTLStructureVM.SelBTLPart.SelBTLFeatureVM.SetbStrategy_Visibility(False)
Else
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
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
Map.refProjectVM.MachGroupPanelVM.SelectedMachGroup.SelPart.SelFeatureVM.SetbStrategy_Visibility(Visibility.Visible)
Map.refProjectVM.MachGroupPanelVM.SelectedMachGroup.SelPart.SelFeatureVM.SetbStrategy_Visibility(True)
End If
EgtSetInfo(m_CurrentFeature.nFeatureId, ConstBeam.STRATEGY, SelStrategy.sStrategyId)
EgtSetInfo(m_CurrentFeature.nFeatureId, ConstBeam.STRATEGY & m_CurrentFeature.nFeatureId & "_FORCED", SelStrategy.bIsStrategyModify)
@@ -1,7 +1,7 @@
<StackPanel x:Class="FreeContourManagerV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Style="{StaticResource BTLPartManager_StackPanel}">
Style="{StaticResource FreeContourManager_StackPanel}">
<ComboBox ItemsSource="{Binding TypeList}"
SelectedIndex="{Binding SelType, Delay=1}"
@@ -74,12 +74,12 @@ Public Class GeneralParametersStrategyVM
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))
Map.refMainMenuVM.UserLevelGenericVisibility(GenericItem, If(Map.refMainMenuVM.UserAdmin_IsChecked, True, False))
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
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)
End If
End Select
@@ -438,29 +438,29 @@ Public MustInherit Class ProjectParameters
Case GetType(BooleanGenericParameter)
DirectCast(DefaultProject, BooleanGenericParameter).SetValue(ProjectParameters.sValue)
If m_sMinUserLevel = 1 Then
DirectCast(DefaultProject, BooleanGenericParameter).SetbBooleanVisibility(Visibility.Visible)
DirectCast(DefaultProject, BooleanGenericParameter).SetbBooleanVisibility(True)
End If
Case GetType(DoubleGenericParameter)
DirectCast(DefaultProject, DoubleGenericParameter).SetValue(ProjectParameters.sValue)
If m_sMinUserLevel = 1 Then
DirectCast(DefaultProject, DoubleGenericParameter).SetbDoubleVisibility(Visibility.Visible)
DirectCast(DefaultProject, DoubleGenericParameter).SetbDoubleVisibility(True)
End If
Case GetType(ComboGenericParameter)
DirectCast(DefaultProject, ComboGenericParameter).SetSelValue(ProjectParameters.sValue)
If m_sMinUserLevel = 1 Then
DirectCast(DefaultProject, ComboGenericParameter).SetbComboBoxVisibility(Visibility.Visible)
DirectCast(DefaultProject, ComboGenericParameter).SetbComboBoxVisibility(True)
End If
Case GetType(StringGenericParameter)
DirectCast(DefaultProject, StringGenericParameter).SetValue(ProjectParameters.sValue)
If m_sMinUserLevel = 1 Then
DirectCast(DefaultProject, StringGenericParameter).SetbStringVisibility(Visibility.Visible)
DirectCast(DefaultProject, StringGenericParameter).SetbStringVisibility(True)
End If
Case GetType(ListGenericParameter)
DirectCast(DefaultProject, ListGenericParameter).SetSelValue(ProjectParameters.sValue)
DirectCast(DefaultProject, ListGenericParameter).CreateToolsViews()
DirectCast(DefaultProject, ListGenericParameter).ToolView()
If DefaultProject.sMinUserLevel = 1 Then
DirectCast(DefaultProject, ListGenericParameter).SetbListBoxVisibility(Visibility.Visible)
DirectCast(DefaultProject, ListGenericParameter).SetbListBoxVisibility(True)
End If
End Select
End If
@@ -500,8 +500,8 @@ Public Class BooleanGenericParameter
Return m_bBooleanVisibility
End Get
End Property
Friend Sub SetbBooleanVisibility(value As Visibility)
m_bBooleanVisibility = value
Friend Sub SetbBooleanVisibility(value As Boolean)
m_bBooleanVisibility = If(value, Visibility.Visible, Visibility.Collapsed)
NotifyPropertyChanged(NameOf(bBooleanVisibility))
End Sub
@@ -514,7 +514,7 @@ Public Class BooleanGenericParameter
Friend Sub SetbIsBooleanModify(value As Boolean)
m_bIsBooleanModify = value
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
NotifyPropertyChanged(NameOf(bIsBooleanModify))
End Sub
@@ -593,8 +593,8 @@ Public Class DoubleGenericParameter
Return m_bDoubleVisibility
End Get
End Property
Friend Sub SetbDoubleVisibility(value As Visibility)
m_bDoubleVisibility = value
Friend Sub SetbDoubleVisibility(value As Boolean)
m_bDoubleVisibility = If(value, Visibility.Visible, Visibility.Collapsed)
NotifyPropertyChanged(NameOf(bDoubleVisibility))
End Sub
@@ -607,7 +607,7 @@ Public Class DoubleGenericParameter
Friend Sub SetbIsDoubleModify(value As Boolean)
m_bIsDoubleModify = value
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
NotifyPropertyChanged(NameOf(bIsDoubleModify))
End Sub
@@ -669,8 +669,8 @@ Public Class StringGenericParameter
Return m_bStringVisibility
End Get
End Property
Friend Sub SetbStringVisibility(value As Visibility)
m_bStringVisibility = value
Friend Sub SetbStringVisibility(value As Boolean)
m_bStringVisibility = If(value, Visibility.Visible, Visibility.Collapsed)
NotifyPropertyChanged(NameOf(bStringVisibility))
End Sub
@@ -683,7 +683,7 @@ Public Class StringGenericParameter
Friend Sub SetbIsStringModify(value As Boolean)
m_bIsStringModify = value
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
NotifyPropertyChanged(NameOf(bIsStringModify))
End Sub
@@ -758,8 +758,8 @@ Public Class ComboGenericParameter
Return m_bComboBoxVisibility
End Get
End Property
Friend Sub SetbComboBoxVisibility(value As Visibility)
m_bComboBoxVisibility = value
Friend Sub SetbComboBoxVisibility(value As Boolean)
m_bComboBoxVisibility = If(value, Visibility.Visible, Visibility.Collapsed)
NotifyPropertyChanged(NameOf(bComboBoxVisibility))
End Sub
@@ -772,7 +772,7 @@ Public Class ComboGenericParameter
Friend Sub SetbIsComboBoxModify(value As Boolean)
m_bIsComboBoxModify = value
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
NotifyPropertyChanged(NameOf(bIsComboBoxModify))
End Sub
@@ -870,8 +870,8 @@ Public Class ListGenericParameter
Return m_bAvailableToolListVisibility
End Get
End Property
Friend Sub SetAvailableToolListVisibility(value As Visibility)
m_bAvailableToolListVisibility = value
Friend Sub SetAvailableToolListVisibility(value As Boolean)
m_bAvailableToolListVisibility = If(value, Visibility.Visible, Visibility.Collapsed)
NotifyPropertyChanged(NameOf(AvailableToolListVisibility))
End Sub
@@ -914,8 +914,8 @@ Public Class ListGenericParameter
Return m_bListBoxVisibility
End Get
End Property
Friend Sub SetbListBoxVisibility(value As Visibility)
m_bListBoxVisibility = value
Friend Sub SetbListBoxVisibility(value As Boolean)
m_bListBoxVisibility = If(value, Visibility.Visible, Visibility.Collapsed)
NotifyPropertyChanged(NameOf(bListBoxVisibility))
End Sub
@@ -928,7 +928,7 @@ Public Class ListGenericParameter
Friend Sub SetbIsListModify(value As Boolean)
m_bIsListModify = value
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
NotifyPropertyChanged(NameOf(bIsListModify))
End Sub
@@ -1044,7 +1044,7 @@ Public Class ListGenericParameter
End Property
Friend Sub OpenToolList()
SetAvailableToolListVisibility(Visibility.Visible)
SetAvailableToolListVisibility(True)
SetOpenToolListIsEnable(False)
End Sub
@@ -1062,7 +1062,7 @@ Public Class ListGenericParameter
End Property
Friend Sub CloseToolList()
SetAvailableToolListVisibility(Visibility.Collapsed)
SetAvailableToolListVisibility(False)
SetOpenToolListIsEnable(True)
End Sub
@@ -108,12 +108,12 @@ Public Class GeneralParametersWndVM
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))
Map.refMainMenuVM.UserLevelGenericVisibility(GenericItem, If(Map.refMainMenuVM.UserAdmin_IsChecked, True, False))
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
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)
End If
End Select
@@ -156,13 +156,13 @@ Public Class JsonGeneralParameters
ProjectParameters = New BooleanGenericParameter()
DirectCast(ProjectParameters, BooleanGenericParameter).SetValue(m_sValue)
If m_sMinUserLevel = 1 Then
DirectCast(ProjectParameters, BooleanGenericParameter).SetbBooleanVisibility(Visibility.Visible)
DirectCast(ProjectParameters, BooleanGenericParameter).SetbBooleanVisibility(True)
End If
Case "d"
ProjectParameters = New DoubleGenericParameter()
DirectCast(ProjectParameters, DoubleGenericParameter).SetValue(m_sValue)
If m_sMinUserLevel = 1 Then
DirectCast(ProjectParameters, DoubleGenericParameter).SetbDoubleVisibility(Visibility.Visible)
DirectCast(ProjectParameters, DoubleGenericParameter).SetbDoubleVisibility(True)
End If
Case "combo"
ProjectParameters = New ComboGenericParameter()
@@ -171,19 +171,19 @@ Public Class JsonGeneralParameters
Next
DirectCast(ProjectParameters, ComboGenericParameter).SetSelValue(m_sValue)
If m_sMinUserLevel = 1 Then
DirectCast(ProjectParameters, ComboGenericParameter).SetbComboBoxVisibility(Visibility.Visible)
DirectCast(ProjectParameters, ComboGenericParameter).SetbComboBoxVisibility(True)
End If
Case "tool"
'ProjectParameters = New ListGenericParameter(m_sSubType)
'DirectCast(ProjectParameters, ListGenericParameter).CreateToolsViews()
'If m_sMinUserLevel = 1 Then
' DirectCast(ProjectParameters, ListGenericParameter).SetbListBoxVisibility(Visibility.Visible)
' DirectCast(ProjectParameters, ListGenericParameter).SetbListBoxVisibility(True)
'End If
Case "s"
ProjectParameters = New StringGenericParameter()
DirectCast(ProjectParameters, StringGenericParameter).SetValue(m_sValue)
If m_sMinUserLevel = 1 Then
DirectCast(ProjectParameters, StringGenericParameter).SetbStringVisibility(Visibility.Visible)
DirectCast(ProjectParameters, StringGenericParameter).SetbStringVisibility(True)
End If
Case Else
EgtOutLog("Tipo: " & m_sType & " non presente")
@@ -155,13 +155,13 @@ Public Class JsonProjectParameters
ProjectParameters = New BooleanGenericParameter()
DirectCast(ProjectParameters, BooleanGenericParameter).SetValue(m_sValue)
If m_sMinUserLevel = 1 Then
DirectCast(ProjectParameters, BooleanGenericParameter).SetbBooleanVisibility(Visibility.Visible)
DirectCast(ProjectParameters, BooleanGenericParameter).SetbBooleanVisibility(True)
End If
Case "d"
ProjectParameters = New DoubleGenericParameter()
DirectCast(ProjectParameters, DoubleGenericParameter).SetValue(m_sValue)
If m_sMinUserLevel = 1 Then
DirectCast(ProjectParameters, DoubleGenericParameter).SetbDoubleVisibility(Visibility.Visible)
DirectCast(ProjectParameters, DoubleGenericParameter).SetbDoubleVisibility(True)
End If
Case "combo"
ProjectParameters = New ComboGenericParameter()
@@ -170,19 +170,19 @@ Public Class JsonProjectParameters
Next
DirectCast(ProjectParameters, ComboGenericParameter).SetSelValue(m_sValue)
If m_sMinUserLevel = 1 Then
DirectCast(ProjectParameters, ComboGenericParameter).SetbComboBoxVisibility(Visibility.Visible)
DirectCast(ProjectParameters, ComboGenericParameter).SetbComboBoxVisibility(True)
End If
Case "tool"
'ProjectParameters = New ListGenericParameter(m_sSubType)
'DirectCast(ProjectParameters, ListGenericParameter).CreateToolsViews()
'If m_sMinUserLevel = 1 Then
' DirectCast(ProjectParameters, ListGenericParameter).SetbListBoxVisibility(Visibility.Visible)
' DirectCast(ProjectParameters, ListGenericParameter).SetbListBoxVisibility(True)
'End If
Case "s"
ProjectParameters = New StringGenericParameter()
DirectCast(ProjectParameters, StringGenericParameter).SetValue(m_sValue)
If m_sMinUserLevel = 1 Then
DirectCast(ProjectParameters, StringGenericParameter).SetbStringVisibility(Visibility.Visible)
DirectCast(ProjectParameters, StringGenericParameter).SetbStringVisibility(True)
End If
Case Else
EgtOutLog("Tipo: " & m_sType & " non presente")
@@ -81,6 +81,11 @@
ShowSearchPanelResultInfo="True"
ShowSearchPanelNavigationButtons="True">
<dxg:TableView.RowStyle>
<Style TargetType="dxg:RowControl">
<Setter Property="IsEnabled" Value="{Binding Row.IsRowEnabled}"/>
</Style>
</dxg:TableView.RowStyle>
<dxg:TableView.ColumnHeaderStyle>
<Style TargetType="dxg:BaseGridHeader">
<Setter Property="Background" Value="{StaticResource DataGridColumnHeader.Static.Main.Background}"/>
@@ -401,7 +406,8 @@
<RowDefinition Height="1*"/>
<RowDefinition Height="Auto"/>
</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}"/>
<TextBlock Grid.Row="1"
@@ -410,6 +416,7 @@
Style="{StaticResource CALC_ERR_TextBlock}"/>
</Grid>
<TextBlock Grid.Column="3"
Text="&#9999;"
Visibility="{Binding RowData.Row.StrategyModify_Visibility}"
Style="{StaticResource StrategyModify_TextBlock}"/>
</Grid>
@@ -17,6 +17,11 @@
ColumnHeaderStyle="{StaticResource Main_DataGridColumnHeader}"
CellStyle="{StaticResource CellDataGrid_CustomHighLight}"
Style="{StaticResource Optimizer_DataGrid}">
<DataGrid.RowStyle>
<Style TargetType="DataGridRow" BasedOn="{StaticResource RowDataGrid_CustomHighLight}">
<Setter Property="IsEnabled" Value="{Binding IsEnabled}"/>
</Style>
</DataGrid.RowStyle>
<DataGrid.InputBindings>
<KeyBinding Key="Delete" Command="{Binding Tag.SelFeatureVM.DeleteFeature_Command,
@@ -27,6 +32,7 @@
<DataGridTemplateColumn.HeaderTemplate>
<DataTemplate>
<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}"/>
</DataTemplate>
</DataGridTemplateColumn.HeaderTemplate>
@@ -144,8 +144,8 @@ Public Class PParameterListVM
Map.refProjectVM.BTLStructureVM.SelBTLPart.SelBTLFeatureVM.ResetCalcFeature()
Map.refProjectVM.BTLStructureVM.SelBTLPart.ResetCalcPart()
Map.refForcedStrategyPanelVM.ForcedStrategy()
Map.refProjectVM.SetRawPartManagerVisibility(Visibility.Visible)
Map.refProjectVM.SetStrategyManagerVisibility(Visibility.Collapsed)
Map.refProjectVM.SetRawPartManagerVisibility(True)
Map.refProjectVM.SetStrategyManagerVisibility(False)
Map.refProjectVM.SetSelManagerTab(ProjectVM.StrategyManagerTab.RAWPARTMANAGER)
Map.refProjectVM.SetSelFeatureManagerTab(ProjectVM.FeatureManagerTab.FEATURERAWPARTMANAGER)
' Abilito LeftPanel
@@ -167,8 +167,8 @@ Public Class PParameterListVM
End Property
Public Sub Cancel()
Map.refProjectVM.SetRawPartManagerVisibility(Visibility.Visible)
Map.refProjectVM.SetStrategyManagerVisibility(Visibility.Collapsed)
Map.refProjectVM.SetRawPartManagerVisibility(True)
Map.refProjectVM.SetStrategyManagerVisibility(False)
Map.refProjectVM.SetSelManagerTab(ProjectVM.StrategyManagerTab.RAWPARTMANAGER)
Map.refProjectVM.SetSelFeatureManagerTab(ProjectVM.FeatureManagerTab.FEATURERAWPARTMANAGER)
' Abilito LeftPanel
@@ -17,12 +17,12 @@ Public Class MyMachGroupPanelVM
EgtBeamShowLoadingSide(False, False)
' se modalita' assemblato
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
Map.refProjectVM.BTLStructureVM.ShowBuilding(False, False)
Map.refShowBeamPanelVM.SetShowBuilding(False)
Map.refProjectVM.SetManagerTabVisibility(Visibility.Visible)
If Not IsNothing(Map.refProjectVM.MachGroupPanelVM) Then Map.refProjectVM.SetFeatureListVisibility(Visibility.Visible)
Map.refProjectVM.SetManagerTabVisibility(True)
If Not IsNothing(Map.refProjectVM.MachGroupPanelVM) Then Map.refProjectVM.SetFeatureListVisibility(True)
End If
If Not IsNothing(Map.refProjectVM.BTLStructureVM) Then
For BTLPartIndex = 0 To Map.refProjectVM.BTLStructureVM.BTLPartVMList.Count - 1
@@ -38,7 +38,7 @@ Public Class MyMachGroupPanelVM
Map.refProjectVM.SetLastSelGridType(ProjectVM.GridSelTypes.MACHGROUP)
End If
If IsNothing(Map.refProjectVM.BTLStructureVM.SelBTLPart) Then
Map.refProjectVM.SetFeatureListVisibility(Visibility.Collapsed)
Map.refProjectVM.SetFeatureListVisibility(False)
End If
Map.refMyStatusBarVM.SetLoadingProgress(0)
Map.refMyStatusBarVM.SetOutputMessage("")
@@ -52,7 +52,7 @@ Public Class MyMachGroupVM
End If
Next
End If
Map.refProjectVM.SetFeatureListVisibility(Visibility.Collapsed)
Map.refProjectVM.SetFeatureListVisibility(False)
End If
' se modalita' assemblato
If Map.refShowBeamPanelVM.ShowBuilding_IsChecked AndAlso Map.refShowBeamPanelVM.bShowAll Then
@@ -63,7 +63,7 @@ Public Class MyMachGroupVM
' seleziono pezzo
EgtDeselectAll()
If Not IsNothing(value) Then
Map.refProjectVM.SetFeatureListVisibility(Visibility.Visible)
Map.refProjectVM.SetFeatureListVisibility(True)
EgtSelectObj(SelPart.nPartId)
' trovo ed evidenzio BTLPart di questo pezzo
If Not IsNothing(Map.refProjectVM.MachGroupPanelVM) Then
@@ -80,11 +80,11 @@ Public Class MyMachGroupVM
NotifyPropertyChanged(NameOf(SelPart))
' se modalità building, la tolgo
If Map.refShowBeamPanelVM.ShowBuilding_IsChecked Then
Map.refProjectVM.SetSceneShowBuldingVisibility(Visibility.Collapsed)
Map.refProjectVM.SetSceneShowBuldingVisibility(False)
Map.refProjectVM.BTLStructureVM.ShowBuilding(False, False)
Map.refShowBeamPanelVM.SetShowBuilding(False)
Map.refProjectVM.SetManagerTabVisibility(Visibility.Visible)
If Not IsNothing(Map.refProjectVM.MachGroupPanelVM) Then Map.refProjectVM.SetFeatureListVisibility(Visibility.Visible)
Map.refProjectVM.SetManagerTabVisibility(True)
If Not IsNothing(Map.refProjectVM.MachGroupPanelVM) Then Map.refProjectVM.SetFeatureListVisibility(True)
End If
End Set
End Property
@@ -312,6 +312,12 @@ Public Class MyMachGroupVM
NotifyPropertyChanged(NameOf(IsRowEnabled))
End Sub
Public ReadOnly Property ButtonIsEnabled As Boolean
Get
Return nProduction_State < ItemState.Assigned
End Get
End Property
#Region "Messages"
Public ReadOnly Property Verify_ToolTip As String
@@ -721,6 +727,7 @@ Public Class MyMachGroupVM
nProduction_State = MachGroupModel.State
dtStartTime = MachGroupModel.DtStart
dtEndTime = MachGroupModel.DtEnd
NotifyPropertyChanged(NameOf(ButtonIsEnabled))
End If
End Sub
@@ -933,6 +940,7 @@ Public Class MyMachGroupVM
Friend Sub Verify()
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)
Return
End Sub
@@ -1076,6 +1084,11 @@ Public Class MyMachGroupVM
DbControllers.m_PartController.UpdateStatus(ProjectManagerVM.CurrProd.nProdId, MachGroup.Id, Part.nPartId, ItemState.Assigned)
Part.nProduction_State = ItemState.Assigned
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
Dim DisableMgr As New DisableModifiedMgr
' blocco modifica del pezzo
@@ -513,6 +513,10 @@ Public Class PartVM
Dim PartModel As PartModel = DbControllers.m_PartController.FindByPartId(ProjectManagerVM.CurrProd.nProdId, nPartId)
If Not IsNothing(PartModel) Then
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.dtEndTime = PartModel.DtEnd
' verifico se bloccare o sbloccare duplo
@@ -620,7 +624,7 @@ Public Class PartVM
Protected Overrides Sub CreateBTLFeatureVMList()
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
AddHandler BTLFeatureVM.PropertyChanged, AddressOf OnBTLFeatureVMPropertyChanged
@@ -2,6 +2,7 @@
Imports EgtBEAMWALL.Core
Imports EgtUILib
Imports EgtWPFLib5
Imports Google.Protobuf.WellKnownTypes
Public Class MachinePanelVM
Inherits EgtWPFLib5.MachinePanelVM
@@ -76,8 +77,8 @@ Public Class MachinePanelVM
Return m_ChooseMachine_Visibility
End Get
End Property
Friend Sub SetChooseMachine_Visibility(IsVisible As Visibility)
m_ChooseMachine_Visibility = IsVisible
Friend Sub SetChooseMachine_Visibility(IsVisible As Boolean)
m_ChooseMachine_Visibility = If(IsVisible, Visibility.Visible, Visibility.Collapsed)
NotifyPropertyChanged(NameOf(ChooseMachine_Visibility))
End Sub
@@ -364,7 +365,7 @@ Public Class MachinePanelVM
End Property
Friend Sub ChooseMachine()
SetChooseMachine_Visibility(Visibility.Visible)
SetChooseMachine_Visibility(True)
End Sub
#End Region ' ChooseMachine
@@ -382,7 +383,7 @@ Public Class MachinePanelVM
Friend Sub Ok()
SetSelMachineName(m_SelectedMachine.Name)
SetChooseMachine_Visibility(Visibility.Collapsed)
SetChooseMachine_Visibility(False)
End Sub
#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
''' </summary>
''' <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()
Case GetType(BooleanStrategyParameter)
DirectCast(Param, BooleanStrategyParameter).SetbBooleanVisibility(Visibility)
@@ -390,7 +390,7 @@ Public Class MainMenuVM
End Select
End Sub
Friend Sub UserLevelGenericVisibility(Generic As ProjectParameters, Visibility As Visibility)
Friend Sub UserLevelGenericVisibility(Generic As ProjectParameters, Visibility As Boolean)
Select Case Generic.GetType()
Case GetType(BooleanGenericParameter)
DirectCast(Generic, BooleanGenericParameter).SetbBooleanVisibility(Visibility)
@@ -412,12 +412,12 @@ Public Class MainMenuVM
For Each ParamItem In StrategyItem.ParameterList
Select Case ParamItem.sMinUserLevel
Case UserLevel.ADVANCED
UserLevelVisibility(ParamItem, If(m_bUserAdmin_IsChecked, Visibility.Visible, Visibility.Collapsed))
UserLevelVisibility(ParamItem, If(m_bUserAdmin_IsChecked, True, False))
Case UserLevel.ADMINISTRATOR
UserLevelVisibility(ParamItem, If(m_bUnlockAllIsChecked, Visibility.Visible, Visibility.Collapsed))
UserLevelVisibility(ParamItem, If(m_bUnlockAllIsChecked, True, False))
Case Else
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)
End If
End Select
@@ -428,12 +428,12 @@ Public Class MainMenuVM
For Each GenericItem As ProjectParameters In Map.refGeneralParametersStrategyVM.GeneralParametersList
Select Case GenericItem.sMinUserLevel
Case UserLevel.ADVANCED
UserLevelGenericVisibility(GenericItem, If(m_bUserAdmin_IsChecked, Visibility.Visible, Visibility.Collapsed))
UserLevelGenericVisibility(GenericItem, If(m_bUserAdmin_IsChecked, True, False))
Case UserLevel.ADMINISTRATOR
UserLevelGenericVisibility(GenericItem, If(m_bUnlockAllIsChecked, Visibility.Visible, Visibility.Collapsed))
UserLevelGenericVisibility(GenericItem, If(m_bUnlockAllIsChecked, True, False))
Case Else
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)
End If
End Select
@@ -469,7 +469,7 @@ Public Class MainMenuVM
For Each ParamItem As StrategyParameter In StrategyItem.ParameterList
If ParamItem.sMinUserLevel >= UserLevel.ADVANCED Then
' Rendo visibili i parametri che hanno sMinUserLevel a 10
UserLevelVisibility(ParamItem, Visibility.Visible)
UserLevelVisibility(ParamItem, True)
End If
Next
Next
@@ -478,7 +478,7 @@ Public Class MainMenuVM
For Each GenericItem As ProjectParameters In Map.refGeneralParametersStrategyVM.GeneralParametersList
If GenericItem.sMinUserLevel >= UserLevel.ADVANCED Then
' Rendo visibili i parametri che hanno sMinUserLevel a 10
UserLevelGenericVisibility(GenericItem, Visibility.Visible)
UserLevelGenericVisibility(GenericItem, True)
End If
Next
End If
@@ -492,8 +492,8 @@ Public Class MainMenuVM
For Each StrategyItem As Strategy In StrategyList
For Each ParamItem As StrategyParameter In StrategyItem.ParameterList
If ParamItem.sMinUserLevel >= UserLevel.ADVANCED Then
' Rendo visibili i parametri che hanno sMinUserLevel a 10
UserLevelVisibility(ParamItem, Visibility.Collapsed)
' Rendo invisibili i parametri che hanno sMinUserLevel a 10
UserLevelVisibility(ParamItem, False)
End If
Next
Next
@@ -501,8 +501,8 @@ Public Class MainMenuVM
If Not IsNothing(Map.refGeneralParametersStrategyVM) Then
For Each GenericItem As ProjectParameters In Map.refGeneralParametersStrategyVM.GeneralParametersList
If GenericItem.sMinUserLevel >= UserLevel.ADVANCED Then
' Rendo visibili i parametri che hanno sMinUserLevel a 10
UserLevelGenericVisibility(GenericItem, Visibility.Visible)
' Rendo invisibili i parametri che hanno sMinUserLevel a 10
UserLevelGenericVisibility(GenericItem, False)
End If
Next
End If
@@ -536,11 +536,13 @@ Public Class MainMenuVM
Else
Dim sSupervisorPath As String = Path.GetDirectoryName(System.AppDomain.CurrentDomain.BaseDirectory) & "\" & sSupervisorName & ".exe"
Try
Process.Start(sSupervisorPath)
Process.Start(sSupervisorPath, "1 " & CurrProd.nProdId)
Catch ex As Exception
EgtOutLog("Error: impossible starting supervisor from path " & sSupervisorPath)
End Try
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 Region ' Supervisor
@@ -557,7 +559,7 @@ Public Class MainMenuVM
End Property
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)
Return
End If
@@ -574,7 +576,7 @@ Public Class MainMenuVM
EgtGetKeyInfo(sKey)
' Esporto il progetto
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)
Map.refProdManagerVM.SetCurrProj(ProjFileMList(0).nProjId)
End If
@@ -644,39 +646,6 @@ Public Class MainMenuVM
SendFeedbackWindow.Files.Add(Map.refMainWindowVM.MainWindowM.sTempDir & "\Feedback.zip")
End If
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
EgtOutLog("Feedback exception: " & ex.ToString)
bEx = True
@@ -67,5 +67,5 @@ Imports System.Windows
' Revision
'
<Assembly: AssemblyVersion("3.1.4.5")>
<Assembly: AssemblyFileVersion("3.1.4.5")>
<Assembly: AssemblyVersion("3.1.4.7")>
<Assembly: AssemblyFileVersion("3.1.4.7")>
+21 -20
View File
@@ -12,17 +12,7 @@
</TabControl.ItemContainerStyle>
<TabItem Header="RAWPARTMANAGER">
<TabItem.Content>
<Grid>
<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>
<OPTIMIZER:RawPartManagerWndV Tag="{Binding DataContext, RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:RightPanelTopV}}}"/>
</TabItem.Content>
</TabItem>
<TabItem Header="FEATUREMANAGER">
@@ -43,6 +33,14 @@
Grid.ColumnSpan="3"
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"
DataContext="{StaticResource PartManagerVM}"
Tag="{Binding DataContext.BTLStructureVM.SelBTLPart, RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:RightPanelTopV}}}"/>
@@ -77,13 +75,6 @@
Style="{StaticResource Project_CheckBox}"/>
</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"
Command="{Binding Parameter_Command}"
@@ -113,7 +104,7 @@
Style="{StaticResource Back_Button}">
<Image Source="{StaticResource Delete_Image}"
Style="{StaticResource BTLDataWnd_Image}"/>
</Button>
</Button>
</UniformGrid>
</Grid>
</TabItem.Content>
@@ -130,15 +121,25 @@
<RowDefinition Height="Auto"/>
<RowDefinition Height="1*"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Border Grid.RowSpan="2"
Grid.ColumnSpan="2"
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}}}"/>
<OPTIMIZER:PParameterListV Grid.Row="1"
Grid.Column="1"
DataContext="{StaticResource PParameterListVM}"
Tag="{Binding DataContext.BTLStructureVM.SelBTLPart.SelBTLFeatureVM, RelativeSource={RelativeSource AncestorType={x:Type OPTIMIZER:RightPanelTopV}}}"
Margin="5"/>
@@ -2,7 +2,7 @@
Private Sub ComboBoxItem_PreviewMouseDown(sender As Object, e As MouseButtonEventArgs)
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.Read()
Map.refProjectVM.CustomGeneralParameters(SelStrategy.Content)
@@ -505,15 +505,6 @@ Public Class ProdManagerVM
GetMainPrivateProfileString(S_GENERAL, K_LASTIMPDIR, "", sDir)
' apro finestra scelta file
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 {
.Title = EgtMsg(61840),
.DefaultExt = ".btl",
@@ -704,9 +695,12 @@ Public Class ProdManagerVM
' Apro finestra parametri generali
Dim GeneralParametersWndVM As New GeneralParametersWndVM(nType)
' Controllo se la cartella AiSetUp è presente
GetFirstAiSetUp(nType)
Dim sDefaultConfigFile As String = String.Empty
If EgtUILib.GetPrivateProfileString(S_STRATEGY, K_DEFAULTCONFIG, "", sDefaultConfigFile, Map.refMainWindowVM.MainWindowM.sDefaultConfig) = 0 Then
SetFirstStrategy(GeneralParametersWndVM, sDefaultConfigFile, nType)
SetFirstStrategy(GeneralParametersWndVM, sDefaultConfigFile)
End If
GeneralParametersWndVM.SetbSaveGeneralParameters(True)
@@ -716,12 +710,6 @@ Public Class ProdManagerVM
m_BTLDataWnd.Read(nType)
m_BTLDataWnd.SaveInfoBTL(nType)
' Controllo se effettuare import + verifica
If Map.refConfigurationPageVM.bVerifyImportBTL_IsChecked Then
' Eseguo procedura
End If
SectionXMaterial.SetType(nType)
LoadingWndHelper.UpdateLoadingWnd(ActiveIds.IMPORTBTL, 2, EgtMsg(63005), 50, 70) ' Loading parts
' leggo struttura BTL per liste
@@ -867,12 +855,6 @@ Public Class ProdManagerVM
m_BTLDataWnd.Read(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
Map.refProjectVM.BTLStructureVM = New BTLStructureVM(BTLStructureM.CreateBTLStructure(0))
CopyBuilding()
@@ -1023,7 +1005,7 @@ Public Class ProdManagerVM
CopyBuilding()
' aggiorno Db
Dim ExportDate As DateTime
Dim sBTLFileName As String = " New - EgtBEAMWALL"
Dim sBTLFileName As String = " New - AEdifica"
DateTime.TryParse(Map.refProjectVM.BTLStructureVM.BTLStructureM.m_sEXPDATE & " " &
Map.refProjectVM.BTLStructureVM.BTLStructureM.m_sEXPTIME, ExportDate)
DbControllers.m_ProjController.UpdateInfo(nProjId, sBTLFileName, sBTLFileName, Map.refProjectVM.BTLStructureVM.sLISTNAME, ExportDate, nType, Machine.Name)
@@ -1413,8 +1395,8 @@ Public Class ProdManagerVM
bValue = False
EgtGetInfo(FeatureParam.nFeatureId, ConstBeam.STRATEGY & FeatureParam.nFeatureId & "_FORCED", bValue)
If bValue Then
BTLPartParam.SetStrategyModify_Visibility(Visibility.Visible)
FeatureParam.SetbStrategy_Visibility(Visibility.Visible)
BTLPartParam.SetStrategyModify_Visibility(True)
FeatureParam.SetbStrategy_Visibility(True)
End If
For Each StrategySetupParam As StrategySetup In Map.refStrategyManagerVM.StrategySetupList
For Each StrategyFeatureParam As StrategyFeature In StrategySetupParam.StrategyFeatureList
@@ -1423,7 +1405,7 @@ Public Class ProdManagerVM
For Each Param As StrategyParameter In StrategyParam.ParameterList
bValueForced = False
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
@@ -1434,14 +1416,6 @@ Public Class ProdManagerVM
End Sub
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 sGeneralParametersFilePath As String = sStrategiesDirPath & "\" & GENERALPARAMETERS_FILE & ".json"
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)
Map.refProjectVM.GeneralParametersList = New ObservableCollection(Of ProjectParameters)((From JsonGeneralParameter In JsonGeneralParametersList
Select JsonGeneralParameter.Deserialize(Map.refStrategyManagerVM.SelStrategyType.Id)).ToList())
For Each GenericItem As ProjectParameters In Map.refProjectVM.GeneralParametersList
Select Case GenericItem.sMinUserLevel
Case UserLevel.ADVANCED
Map.refMainMenuVM.UserLevelGenericVisibility(GenericItem, If(Map.refMainMenuVM.UserAdmin_IsChecked, Visibility.Visible, Visibility.Collapsed))
Case 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
Dim bValuePart As Boolean = False
@@ -1470,17 +1430,31 @@ Public Class ProdManagerVM
For Each GeneralParam As ProjectParameters In Map.refProjectVM.GeneralParametersList
bValuePart = False
EgtGetInfo(PartItem.nPartId, GeneralParam.sNameNge & "_FORCED", bValuePart)
If bValuePart Then PartItem.SetStrategyModify_Visibility(Visibility.Visible)
If bValuePart Then PartItem.SetStrategyModify_Visibility(True)
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
''' <summary>
''' Funzione che scrive il file json di default se non è presente un file di configurazione
''' </summary>
''' <param name="GeneralParametersWndVM"></param>
''' <param name="nType"></param>
Private Sub SetFirstStrategy(GeneralParametersWndVM As GeneralParametersWndVM, sDefaultConfigFile As String, nType As BWType)
Private Sub SetFirstStrategy(GeneralParametersWndVM As GeneralParametersWndVM, sDefaultConfigFile As String)
sDefaultConfigFile = "DefaultConfig"
Dim Strategy As New StrategySetup(sDefaultConfigFile)
Map.refStrategyManagerVM.SelStrategySetup = Strategy
@@ -1589,9 +1563,9 @@ Public Class ProdManagerVM
' verifico se progetto modificato, e chiedo se salvare
If ProdFileVM.VerifyProjectModification(CurrProd) = MessageBoxResult.Cancel Then Return
Map.refShowBeamPanelVM.ShowBuilding_IsEnabled = False
Map.refProjectVM.SetSceneShowBuldingVisibility(Visibility.Collapsed)
Map.refProjectVM.SetManagerTabVisibility(Visibility.Visible)
If Not IsNothing(Map.refProjectVM.MachGroupPanelVM) Then Map.refProjectVM.SetFeatureListVisibility(Visibility.Visible)
Map.refProjectVM.SetSceneShowBuldingVisibility(False)
Map.refProjectVM.SetManagerTabVisibility(True)
If Not IsNothing(Map.refProjectVM.MachGroupPanelVM) Then Map.refProjectVM.SetFeatureListVisibility(True)
If Not CreateNewProd() Then
EgtOutLog("Errore! Creazione del progetto fallita!")
End If
@@ -1617,12 +1591,6 @@ Public Class ProdManagerVM
If IsNothing(CurrProd) Then Return Nothing
' 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 {
.Title = EgtMsg(61838),
.DefaultExt = ".ngexp",
@@ -1721,8 +1689,8 @@ Public Class ProdManagerVM
Public Sub ImportProject()
Map.refShowBeamPanelVM.ShowBuilding_IsEnabled = False
Map.refProjectVM.SetSceneShowBuldingVisibility(Visibility.Collapsed)
Map.refProjectVM.SetManagerTabVisibility(Visibility.Visible)
Map.refProjectVM.SetSceneShowBuldingVisibility(False)
Map.refProjectVM.SetManagerTabVisibility(True)
SetOpenImage(DOWN_IMAGE)
Dim TempCurrProd As ProjectFileVM = CurrProd
If ProdFileVM.VerifyProjectModification(TempCurrProd) Then Return
@@ -1730,14 +1698,6 @@ Public Class ProdManagerVM
Dim sDir As String = String.Empty
GetMainPrivateProfileString(S_GENERAL, K_LASTNGEXPDIR, "", sDir)
' 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 {
.Title = EgtMsg(61839),
.DefaultExt = ".ngexp",
@@ -2023,15 +1983,6 @@ Public Class ProdManagerVM
Dim sDir As String = String.Empty
GetMainPrivateProfileString(S_GENERAL, K_LASTIMPDIR, "", sDir)
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 {
.Title = EgtMsg(63038),
.DefaultExt = ".btl",
@@ -2225,4 +2176,4 @@ Public Class ProdManagerVM
#End Region ' Commands
End Class
End Class
+112 -167
View File
@@ -254,8 +254,8 @@ Public Class ProjectVM
Return m_FeatureList_Visibility
End Get
End Property
Sub SetFeatureListVisibility(bVisible As Visibility)
m_FeatureList_Visibility = bVisible
Sub SetFeatureListVisibility(bVisible As Boolean)
m_FeatureList_Visibility = If(bVisible, Visibility.Visible, Visibility.Collapsed)
NotifyPropertyChanged(NameOf(FeatureList_Visibility))
End Sub
@@ -265,8 +265,8 @@ Public Class ProjectVM
Return m_RawPartManagerVisibility
End Get
End Property
Sub SetRawPartManagerVisibility(bVisible As Visibility)
m_RawPartManagerVisibility = bVisible
Sub SetRawPartManagerVisibility(bVisible As Boolean)
m_RawPartManagerVisibility = If(bVisible, Visibility.Visible, Visibility.Collapsed)
NotifyPropertyChanged(NameOf(RawPartManagerVisibility))
End Sub
@@ -276,8 +276,8 @@ Public Class ProjectVM
Return m_StrategyManagerVisibility
End Get
End Property
Sub SetStrategyManagerVisibility(bVisible As Visibility)
m_StrategyManagerVisibility = bVisible
Sub SetStrategyManagerVisibility(bVisible As Boolean)
m_StrategyManagerVisibility = If(bVisible, Visibility.Visible, Visibility.Collapsed)
NotifyPropertyChanged(NameOf(StrategyManagerVisibility))
End Sub
@@ -287,8 +287,8 @@ Public Class ProjectVM
Return m_SceneShowBuldingVisibility
End Get
End Property
Sub SetSceneShowBuldingVisibility(bVisible As Visibility)
m_SceneShowBuldingVisibility = bVisible
Sub SetSceneShowBuldingVisibility(bVisible As Boolean)
m_SceneShowBuldingVisibility = If(bVisible, Visibility.Visible, Visibility.Collapsed)
NotifyPropertyChanged(NameOf(SceneShowBuldingVisibility))
End Sub
@@ -298,8 +298,8 @@ Public Class ProjectVM
Return m_ManagerTabVisibility
End Get
End Property
Sub SetManagerTabVisibility(bVisible As Visibility)
m_ManagerTabVisibility = bVisible
Sub SetManagerTabVisibility(bVisible As Boolean)
m_ManagerTabVisibility = If(bVisible, Visibility.Visible, Visibility.Collapsed)
NotifyPropertyChanged(NameOf(ManagerTabVisibility))
End Sub
@@ -323,10 +323,10 @@ Public Class ProjectVM
m_bSaveGeneralParameters = value
If m_bSaveGeneralParameters Then
SetGeneralParametersIsEnable(True)
Map.refProjectVM.BTLStructureVM.SelBTLPart.SetStrategyModify_Visibility(Visibility.Visible)
Map.refProjectVM.BTLStructureVM.SelBTLPart.SetStrategyModify_Visibility(True)
Else
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 sGeneralParametersFilePath As String = sStrategiesDirPath & "\" & GENERALPARAMETERS_FILE & ".json"
If File.Exists(sGeneralParametersFilePath) Then
@@ -555,6 +555,7 @@ Public Class ProjectVM
''' </summary>
Friend Sub UpdatePart(nPartId As Integer)
Dim IdAsseBase As Integer = Map.refProdManagerVM.ListProjAsseBase(Map.refProjectVM.BTLStructureVM.SelBTLPart.nPROJ)
If IdAsseBase < 0 Then Return
Dim IdPart As Integer = 0
Dim NewId As Integer = 0
' Setto il nuovo contesto
@@ -589,9 +590,9 @@ Public Class ProjectVM
Friend Sub ResetGeneralParameters()
Dim sInfo As String = String.Empty
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
FeatureItem.SetbStrategy_Visibility(Visibility.Collapsed)
FeatureItem.SetbStrategy_Visibility(False)
Next
For Each GeneralParameter In m_GeneralParametersList
Select Case GeneralParameter.GetType()
@@ -636,9 +637,7 @@ Public Class ProjectVM
' leggo cartella dei setup delle strategie
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()
For Each AiSetup In AISetupPaths
m_StrategySetupList.Add(Path.GetFileNameWithoutExtension(AiSetup))
Next
GetStrategySetupDir(AISetupPaths, ProjectManagerVM.CurrProd.nType)
' Leggo info se presenti
Dim sStrategyBTLSetup As String = String.Empty
@@ -656,49 +655,13 @@ Public Class ProjectVM
If bSaveGeneralParameters Then
EgtGetInfo(m_BTLStructureVM.SelBTLPart.BTLPartM.nPartId, AI_SETUP, m_SelStrategySetup)
Else
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
SetStrategySetup(sStrategyBTLSetup, AISetupDirPath, sTmpStrategySetup)
End If
Else
SetSelStrategy(sStrategyPartSetup)
SetSelStrategy(sStrategyBTLPartSetup)
End If
Dim sStrategiesDirPath As String = Map.refMainWindowVM.MainWindowM.GetStrategiesDirPath(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
GetGeneralParamtersList(nType)
' Leggo info se presenti
Dim sInfo As String = String.Empty
@@ -708,94 +671,64 @@ Public Class ProjectVM
Dim sTmpBoolValue As Boolean = False
EgtGetInfo(nBTLInfoLayerId, GeneralParameter.sNameNge, sTmpBoolValue)
If EgtExistsInfo(m_BTLStructureVM.SelBTLPart.BTLPartM.nPartId, GeneralParameter.sNameNge) Then
SetGeneralParametersIsEnable(True)
SetbSaveGeneralParameters(True)
SetGeneralParameters(True)
EgtGetInfo(m_BTLStructureVM.SelBTLPart.BTLPartM.nPartId, GeneralParameter.sNameNge, DirectCast(GeneralParameter, BooleanGenericParameter).bValue)
Else
DirectCast(GeneralParameter, BooleanGenericParameter).bValue = sTmpBoolValue
SetGeneralParametersIsEnable(False)
SetbSaveGeneralParameters(False)
SetGeneralParameters(False)
End If
Case GetType(DoubleGenericParameter)
Dim sTmpDoubleValue As String = String.Empty
EgtGetInfo(nBTLInfoLayerId, GeneralParameter.sNameNge, sTmpDoubleValue)
If EgtExistsInfo(m_BTLStructureVM.SelBTLPart.BTLPartM.nPartId, GeneralParameter.sNameNge) Then
SetGeneralParametersIsEnable(True)
SetbSaveGeneralParameters(True)
SetGeneralParameters(True)
EgtGetInfo(m_BTLStructureVM.SelBTLPart.BTLPartM.nPartId, GeneralParameter.sNameNge, DirectCast(GeneralParameter, DoubleGenericParameter).sValue)
Else
DirectCast(GeneralParameter, DoubleGenericParameter).sValue = sTmpDoubleValue
SetGeneralParametersIsEnable(False)
SetbSaveGeneralParameters(False)
SetGeneralParameters(False)
End If
Case GetType(ComboGenericParameter)
Dim sTmpComboValue As String = String.Empty
EgtGetInfo(nBTLInfoLayerId, GeneralParameter.sNameNge, sTmpComboValue)
Dim sTmpValueInfo As String = String.Empty
If EgtExistsInfo(m_BTLStructureVM.SelBTLPart.BTLPartM.nPartId, GeneralParameter.sNameNge) Then
SetGeneralParametersIsEnable(True)
SetbSaveGeneralParameters(True)
SetGeneralParameters(True)
EgtGetInfo(m_BTLStructureVM.SelBTLPart.BTLPartM.nPartId, GeneralParameter.sNameNge, sTmpValueInfo)
DirectCast(GeneralParameter, ComboGenericParameter).SelValue = DirectCast(GeneralParameter, ComboGenericParameter).ComboList.FirstOrDefault(Function(x) x.sValue = sTmpValueInfo)
Else
DirectCast(GeneralParameter, ComboGenericParameter).SelValue.sValue = sTmpComboValue
SetGeneralParametersIsEnable(False)
SetbSaveGeneralParameters(False)
SetGeneralParameters(False)
End If
Case GetType(StringGenericParameter)
Dim sTmpStringValue As String = String.Empty
EgtGetInfo(nBTLInfoLayerId, GeneralParameter.sNameNge, sTmpStringValue)
If EgtExistsInfo(m_BTLStructureVM.SelBTLPart.BTLPartM.nPartId, GeneralParameter.sNameNge) Then
SetGeneralParametersIsEnable(True)
SetbSaveGeneralParameters(True)
SetGeneralParameters(True)
EgtGetInfo(m_BTLStructureVM.SelBTLPart.BTLPartM.nPartId, GeneralParameter.sNameNge, DirectCast(GeneralParameter, StringGenericParameter).sValue)
Else
DirectCast(GeneralParameter, StringGenericParameter).sValue = sTmpStringValue
SetGeneralParametersIsEnable(False)
SetbSaveGeneralParameters(False)
SetGeneralParameters(False)
End If
Case GetType(ListGenericParameter)
For Each Item As ToolParameter In DirectCast(GeneralParameter, ListGenericParameter).ListValue
If Item.bIsActive Then
sInfo &= Item.sUUID & "," & Item.sName & ";"
If EgtExistsInfo(m_BTLStructureVM.SelBTLPart.BTLPartM.nPartId, GeneralParameter.sNameNge) Then
SetGeneralParametersIsEnable(True)
SetbSaveGeneralParameters(True)
SetGeneralParameters(True)
EgtGetInfo(m_BTLStructureVM.SelBTLPart.BTLPartM.nPartId, GeneralParameter.sNameNge, DirectCast(GeneralParameter, ListGenericParameter).sValue)
Else
DirectCast(GeneralParameter, ListGenericParameter).sValue = sInfo
SetGeneralParametersIsEnable(False)
SetbSaveGeneralParameters(False)
SetGeneralParameters(False)
End If
End If
Next
End Select
Next
NotifyPropertyChanged(NameOf(GeneralParametersList))
End Sub
Friend Sub CustomGeneralParameters(SelStrategySetupCombo As String)
Dim sStrategiesDirPath As String = Map.refMainWindowVM.MainWindowM.GetStrategiesDirPath(Map.refStrategyManagerVM.SelStrategyType.Id)
Dim sGeneralParametersFilePath As String = sStrategiesDirPath & "\" & GENERALPARAMETERS_FILE & ".json"
If File.Exists(sGeneralParametersFilePath) Then
Dim sReadedFiles As String = File.ReadAllText(sGeneralParametersFilePath)
Dim JsonGeneralParametersList As List(Of JsonGeneralParameters) = JsonConvert.DeserializeObject(Of List(Of JsonGeneralParameters))(sReadedFiles)
m_GeneralParametersList = New ObservableCollection(Of ProjectParameters)((From JsonGeneralParameter In JsonGeneralParametersList
Select JsonGeneralParameter.Deserialize(Map.refStrategyManagerVM.SelStrategyType.Id)).ToList())
For Each GenericItem As ProjectParameters In m_GeneralParametersList
Select Case GenericItem.sMinUserLevel
Case UserLevel.ADVANCED
Map.refMainMenuVM.UserLevelGenericVisibility(GenericItem, If(Map.refMainMenuVM.UserAdmin_IsChecked, Visibility.Visible, Visibility.Collapsed))
Case 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
GetGeneralParamtersList(Map.refStrategyManagerVM.SelStrategyType.Id)
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
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
GetStrategySetupDir(AISetupPaths, ProjectManagerVM.CurrProd.nType)
Dim sStrategiesDirPath As String = Map.refMainWindowVM.MainWindowM.GetStrategiesDirPath(Map.refStrategyManagerVM.SelStrategyType.Id)
Dim sGeneralParametersFilePath As String = sStrategiesDirPath & "\" & GENERALPARAMETERS_FILE & ".json"
If File.Exists(sGeneralParametersFilePath) Then
Dim sReadedFiles As String = File.ReadAllText(sGeneralParametersFilePath)
Dim JsonGeneralParametersList As List(Of JsonGeneralParameters) = JsonConvert.DeserializeObject(Of List(Of JsonGeneralParameters))(sReadedFiles)
m_GeneralParametersList = New ObservableCollection(Of ProjectParameters)((From JsonGeneralParameter In JsonGeneralParametersList
Select JsonGeneralParameter.Deserialize(Map.refStrategyManagerVM.SelStrategyType.Id)).ToList())
For Each GenericItem As ProjectParameters In m_GeneralParametersList
Select Case GenericItem.sMinUserLevel
Case UserLevel.ADVANCED
Map.refMainMenuVM.UserLevelGenericVisibility(GenericItem, If(Map.refMainMenuVM.UserAdmin_IsChecked, Visibility.Visible, Visibility.Collapsed))
Case 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
GetGeneralParamtersList(Map.refStrategyManagerVM.SelStrategyType.Id)
' Leggo info se presenti
Dim sInfo As String = String.Empty
@@ -914,99 +823,135 @@ Public Class ProjectVM
Dim sTmpStrategySetup As String = String.Empty
Dim nBTLInfoLayerId As Integer = 0
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
nBTLInfoLayerId = EgtGetFirstNameInGroup(GDB_ID.ROOT, BTLINFO)
EgtGetInfo(nBTLInfoLayerId, AI_SETUP, sStrategyBTLSetup)
If IsNothing(sStrategyBTLSetup) Then
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
SetStrategySetup(sStrategyBTLSetup, AISetupDirPath, sTmpStrategySetup)
Else
SetSelStrategy(sStrategyBTLSetup)
EgtSetInfo(m_BTLStructureVM.SelBTLPart.BTLPartM.nPartId, AI_SETUP, m_SelStrategySetup)
End If
End If
For Each GeneralParameter In m_GeneralParametersList
Select Case GeneralParameter.GetType()
Case GetType(BooleanGenericParameter)
Dim sTmpBoolValue As Boolean = DirectCast(GeneralParameter, BooleanGenericParameter).bValue
If EgtExistsInfo(m_BTLStructureVM.SelBTLPart.BTLPartM.nPartId, GeneralParameter.sNameNge) Then
SetbSaveGeneralParameters(True)
SetGeneralParametersIsEnable(True)
SetGeneralParameters(True)
EgtGetInfo(m_BTLStructureVM.SelBTLPart.BTLPartM.nPartId, GeneralParameter.sNameNge, DirectCast(GeneralParameter, BooleanGenericParameter).bValue)
Else
DirectCast(GeneralParameter, BooleanGenericParameter).bValue = sTmpBoolValue
SetbSaveGeneralParameters(False)
SetGeneralParametersIsEnable(False)
SetGeneralParameters(False)
End If
Case GetType(DoubleGenericParameter)
Dim sTmpDoubleValue As String = DirectCast(GeneralParameter, DoubleGenericParameter).sValue
If EgtExistsInfo(m_BTLStructureVM.SelBTLPart.BTLPartM.nPartId, GeneralParameter.sNameNge) Then
SetbSaveGeneralParameters(True)
SetGeneralParametersIsEnable(True)
SetGeneralParameters(True)
EgtGetInfo(m_BTLStructureVM.SelBTLPart.BTLPartM.nPartId, GeneralParameter.sNameNge, DirectCast(GeneralParameter, DoubleGenericParameter).sValue)
Else
DirectCast(GeneralParameter, DoubleGenericParameter).sValue = sTmpDoubleValue
SetbSaveGeneralParameters(False)
SetGeneralParametersIsEnable(False)
SetGeneralParameters(False)
End If
Case GetType(ComboGenericParameter)
Dim sTmpComboValue As String = DirectCast(GeneralParameter, ComboGenericParameter).SelValue.sValue
Dim sTmpValueInfo As String = String.Empty
If EgtExistsInfo(m_BTLStructureVM.SelBTLPart.BTLPartM.nPartId, GeneralParameter.sNameNge) Then
SetbSaveGeneralParameters(True)
SetGeneralParametersIsEnable(True)
SetGeneralParameters(True)
EgtGetInfo(m_BTLStructureVM.SelBTLPart.BTLPartM.nPartId, GeneralParameter.sNameNge, sTmpValueInfo)
DirectCast(GeneralParameter, ComboGenericParameter).SelValue = DirectCast(GeneralParameter, ComboGenericParameter).ComboList.FirstOrDefault(Function(x) x.sValue = sTmpValueInfo)
Else
DirectCast(GeneralParameter, ComboGenericParameter).SelValue.sValue = sTmpComboValue
SetbSaveGeneralParameters(False)
SetGeneralParametersIsEnable(False)
SetGeneralParameters(False)
End If
Case GetType(StringGenericParameter)
Dim sTmpStringValue As String = DirectCast(GeneralParameter, StringGenericParameter).sValue
If EgtExistsInfo(m_BTLStructureVM.SelBTLPart.BTLPartM.nPartId, GeneralParameter.sNameNge) Then
SetbSaveGeneralParameters(True)
SetGeneralParametersIsEnable(True)
SetGeneralParameters(True)
EgtGetInfo(m_BTLStructureVM.SelBTLPart.BTLPartM.nPartId, GeneralParameter.sNameNge, DirectCast(GeneralParameter, StringGenericParameter).sValue)
Else
DirectCast(GeneralParameter, StringGenericParameter).sValue = sTmpStringValue
SetbSaveGeneralParameters(False)
SetGeneralParametersIsEnable(False)
SetGeneralParameters(False)
End If
Case GetType(ListGenericParameter)
For Each Item As ToolParameter In DirectCast(GeneralParameter, ListGenericParameter).ListValue
If Item.bIsActive Then
sInfo &= Item.sUUID & "," & Item.sName & ";"
If EgtExistsInfo(m_BTLStructureVM.SelBTLPart.BTLPartM.nPartId, GeneralParameter.sNameNge) Then
SetbSaveGeneralParameters(True)
SetGeneralParametersIsEnable(True)
SetGeneralParameters(True)
EgtGetInfo(m_BTLStructureVM.SelBTLPart.BTLPartM.nPartId, GeneralParameter.sNameNge, DirectCast(GeneralParameter, ListGenericParameter).sValue)
Else
DirectCast(GeneralParameter, ListGenericParameter).sValue = sInfo
SetbSaveGeneralParameters(False)
SetGeneralParametersIsEnable(False)
SetGeneralParameters(False)
End If
End If
Next
End Select
Next
NotifyPropertyChanged(NameOf(SelStrategySetup))
NotifyPropertyChanged(NameOf(GeneralParametersList))
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
#Region "COMMAND"
@@ -1059,9 +1004,9 @@ Public Class ProjectVM
End Property
Public Sub Back()
SetRawPartManagerVisibility(Visibility.Visible)
If Not IsNothing(m_MachGroupPanelVM) Then Map.refProjectVM.SetFeatureListVisibility(Visibility.Visible)
SetStrategyManagerVisibility(Visibility.Collapsed)
SetRawPartManagerVisibility(True)
If Not IsNothing(m_MachGroupPanelVM) Then Map.refProjectVM.SetFeatureListVisibility(True)
SetStrategyManagerVisibility(False)
SetSelManagerTab(ProjectVM.StrategyManagerTab.RAWPARTMANAGER)
SetSelFeatureManagerTab(ProjectVM.FeatureManagerTab.FEATURERAWPARTMANAGER)
' Abilito LeftPanel
@@ -1136,13 +1081,13 @@ Public Class ProjectVM
EgtRemoveInfo(m_BTLStructureVM.SelBTLPart.BTLPartM.nPartId, GeneralParameter.sNameNge & "_FORCED")
End Select
Next
m_BTLStructureVM.SelBTLPart.SetStrategyModify_Visibility(Visibility.Collapsed)
m_BTLStructureVM.SelBTLPart.SetStrategyModify_Visibility(False)
End If
If Not IsNothing(m_BTLStructureVM.SelBTLPart.SelBTLFeatureVM) Then m_BTLStructureVM.SelBTLPart.SelBTLFeatureVM.ResetCalcFeature()
Map.refProjectVM.BTLStructureVM.SelBTLPart.ResetCalcPart()
If Map.refProdManagerVM.ListProjAsseBase.Count > 0 Then UpdatePart(m_BTLStructureVM.SelBTLPart.nPartId)
SetRawPartManagerVisibility(Visibility.Visible)
SetStrategyManagerVisibility(Visibility.Collapsed)
SetRawPartManagerVisibility(True)
SetStrategyManagerVisibility(False)
SetSelManagerTab(ProjectVM.StrategyManagerTab.RAWPARTMANAGER)
SetSelFeatureManagerTab(ProjectVM.FeatureManagerTab.FEATURERAWPARTMANAGER)
' Abilito LeftPanel
@@ -216,6 +216,11 @@ Public Class RawPartManagerVM
DbControllers.m_PartController.UpdateStatus(ProjectManagerVM.CurrProd.nProdId, MachGroup.Id, Part.nPartId, ItemState.Assigned)
Part.nProduction_State = ItemState.Assigned
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
Dim DisableMgr As New DisableModifiedMgr
' blocco modifica del pezzo
@@ -277,8 +282,6 @@ Public Class RawPartManagerVM
Public Sub ProduceAllRawPart()
If IsNothing(ProjectManagerVM.CurrProd) Then Return
Map.refMyStatusBarVM.SetLoadingProgress(0)
Map.refMyStatusBarVM.SetOutputMessage("")
' 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
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
End Get
End Property
Friend Sub SetbOpen_Visibility(value As Visibility)
m_bOpen_Visibility = value
Friend Sub SetbOpen_Visibility(value As Boolean)
m_bOpen_Visibility = If(value, Visibility.Visible, Visibility.Collapsed)
NotifyPropertyChanged(NameOf(bOpen_Visibility))
End Sub
@@ -96,8 +96,8 @@ Public Class SaveAsStrategyVM
Return m_bSave_Visibility
End Get
End Property
Friend Sub SetbSave_Visibility(value As Visibility)
m_bSave_Visibility = value
Friend Sub SetbSave_Visibility(value As Boolean)
m_bSave_Visibility = If(value, Visibility.Visible, Visibility.Collapsed)
NotifyPropertyChanged(NameOf(bSave_Visibility))
End Sub
@@ -87,14 +87,6 @@ Public Class MySceneHostVM
Dim sTitle As String = EgtMsg(10101)
If EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, sText, sTitle, MessageBoxButton.OKCancel, MessageBoxImage.Error) = MessageBoxResult.OK Then
' 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 {
.Title = EgtMsg(110026),
.DefaultExt = ".lic",
@@ -117,8 +117,7 @@ Public Class ButtonBuildingItem
EgtSetStatus(ItemAsseBaseId, GDB_ST.OFF)
End If
Next
EgtZoom(ZM.ALL)
EgtDraw()
EgtRedraw()
' Ritorno al contesto corrente
EgtSetCurrentContext(Map.refSceneHostVM.MainScene.GetCtx())
End Sub
@@ -148,28 +148,25 @@ Public Class SceneShowBuldingVM
Dim nSel As Integer = 0
EgtSelect(e.Location, Scene.DIM_SEL, Scene.DIM_SEL, nSel)
Dim nId As Integer = EgtGetFirstObjInSelWin()
While nId <> GDB_ID.NULL
' Recupero l'identificativo del pezzo cui appartiene
Dim nPartId As Integer = EgtGetParent(EgtGetParent(nId))
Dim nOrigPartId As Integer = nPartId
nOldPartId = nOrigPartId
Dim nCopId As Integer = 0
If EgtGetInfo(nPartId, "!COP", nCopId) Then
nPartId = nCopId
End If
Dim nOrIdKey As KeyValuePair(Of Integer, Integer) = Map.refSceneShowBuldingVM.MapInfo.FirstOrDefault(Function(x) x.Value = nPartId)
Dim nOrdId As Integer = nOrIdKey.Key
Dim BTLPartVM As BTLPartVM = Map.refProjectVM.BTLStructureVM.BTLPartVMList.FirstOrDefault(Function(y) y.nPartId = nOrdId)
' Ritorno al contesto corrente
EgtSetCurrentContext(Map.refSceneHostVM.MainScene.GetCtx())
Map.refProjectVM.BTLStructureVM.SetSelBTLPart(BTLPartVM, True)
Map.refProjectVM.BTLStructureVM.SelectBTLPartScene(BTLPartVM, True)
' Setto il nuovo contesto
EgtSetCurrentContext(SceneShowBulding.GetCtx())
EgtSetStatus(nOrigPartId, GDB_ST.SEL)
EgtDraw()
nId = EgtGetNextObjInSelWin()
End While
' Recupero l'identificativo del pezzo cui appartiene
Dim nPartId As Integer = EgtGetParent(EgtGetParent(nId))
Dim nOrigPartId As Integer = nPartId
nOldPartId = nOrigPartId
Dim nCopId As Integer = 0
If EgtGetInfo(nPartId, "!COP", nCopId) Then
nPartId = nCopId
End If
Dim nOrIdKey As KeyValuePair(Of Integer, Integer) = Map.refSceneShowBuldingVM.MapInfo.FirstOrDefault(Function(x) x.Value = nPartId)
Dim nOrdId As Integer = nOrIdKey.Key
Dim BTLPartVM As BTLPartVM = Map.refProjectVM.BTLStructureVM.BTLPartVMList.FirstOrDefault(Function(y) y.nPartId = nOrdId)
' Ritorno al contesto corrente
EgtSetCurrentContext(Map.refSceneHostVM.MainScene.GetCtx())
Map.refProjectVM.BTLStructureVM.SetSelBTLPart(BTLPartVM, True)
Map.refProjectVM.BTLStructureVM.SelectBTLPartScene(BTLPartVM, True)
' Setto il nuovo contesto
EgtSetCurrentContext(SceneShowBulding.GetCtx())
EgtSetStatus(nOrigPartId, GDB_ST.SEL)
EgtDraw()
End Sub
#End Region ' Events
@@ -53,15 +53,15 @@ Public Class ShowBeamPanelVM
m_bShowBuilding = value
If m_bShowBuilding Then
Map.refSceneShowBuldingVM.SceneShowBulding.Enable(True)
Map.refProjectVM.SetSceneShowBuldingVisibility(Visibility.Visible)
Map.refProjectVM.SetManagerTabVisibility(Visibility.Collapsed)
Map.refProjectVM.SetFeatureListVisibility(Visibility.Collapsed)
Map.refProjectVM.SetSceneShowBuldingVisibility(True)
Map.refProjectVM.SetManagerTabVisibility(False)
Map.refProjectVM.SetFeatureListVisibility(False)
Map.refOptimizePanelVM.SetOptimizePanelIsEnabled(False)
Else
EgtSetCurrentContext(Map.refSceneHostVM.MainScene.GetCtx())
Map.refProjectVM.SetSceneShowBuldingVisibility(Visibility.Collapsed)
Map.refProjectVM.SetManagerTabVisibility(Visibility.Visible)
If Not IsNothing(Map.refProjectVM.MachGroupPanelVM) Then Map.refProjectVM.SetFeatureListVisibility(Visibility.Visible)
Map.refProjectVM.SetSceneShowBuldingVisibility(False)
Map.refProjectVM.SetManagerTabVisibility(True)
If Not IsNothing(Map.refProjectVM.MachGroupPanelVM) Then Map.refProjectVM.SetFeatureListVisibility(False)
Map.refOptimizePanelVM.SetOptimizePanelIsEnabled(True)
End If
NotifyPropertyChanged(NameOf(ShowBuilding_IsChecked))
+10 -10
View File
@@ -46,8 +46,8 @@ Public Class PDFEditorVM
Return m_PdfViewer_Visibility
End Get
End Property
Friend Sub SetPdfViewer_Visibility(value As Visibility)
m_PdfViewer_Visibility = value
Friend Sub SetPdfViewer_Visibility(value As Boolean)
m_PdfViewer_Visibility = If(value, Visibility.Visible, Visibility.Hidden)
NotifyPropertyChanged(NameOf(PdfViewer_Visibility))
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)) ' Part List
SetWebAddress("") ' Pagina vuota
SetPdfViewer_Visibility(Visibility.Hidden)
SetPdfViewer_Visibility(False)
Map.SetRefPDFEditorVM(Me)
End Sub
@@ -91,7 +91,7 @@ Public Class PDFEditorVM
End Function
Private Sub SetExpander(ExpanderPDF As ExpanderPDF)
ExpanderPDF.SetExpanderVisibilty(Visibility.Visible)
ExpanderPDF.SetExpanderVisibilty(True)
End Sub
#End Region ' Methods
@@ -121,7 +121,7 @@ Public Class PDFEditorVM
If Not IsNothing(sPartList) Then SetExpander(sPartList)
SetViewButton(VIEW_BUTTON.PDF)
Case VIEW_BUTTON.PDF
SetPdfViewer_Visibility(Visibility.Visible)
SetPdfViewer_Visibility(True)
Configuration.CreatePrintPDF(PDFPage.VIEW, True)
SetWebAddress(Map.refMainWindowVM.MainWindowM.sTempDir & "\Statistics.pdf")
End Select
@@ -156,7 +156,7 @@ Public Class PDFEditorVM
If Not IsNothing(sRawPartList) Then SetExpander(sRawPartList)
SetViewButton(VIEW_BUTTON.PDF)
Case VIEW_BUTTON.PDF
SetPdfViewer_Visibility(Visibility.Visible)
SetPdfViewer_Visibility(True)
Configuration.CreatePrintPDF(PDFPage.MACHING, True)
SetWebAddress(Map.refMainWindowVM.MainWindowM.sTempDir & "\Statistics.pdf")
End Select
@@ -188,10 +188,10 @@ Public Class PDFEditorVM
SetViewButton(VIEW_BUTTON.LIST)
For Each Expander As ExpanderPDF In Map.refPDFEditorVM.ExpanderList
Expander.SetExpanderVisibilty(Visibility.Collapsed)
Expander.SetExpanderVisibilty(False)
Next
SetPdfViewer_Visibility(Visibility.Hidden)
SetPdfViewer_Visibility(False)
SetWebAddress("")
End Sub
@@ -228,8 +228,8 @@ Public Class ExpanderPDF
Return m_ExpanderVisibilty
End Get
End Property
Friend Sub SetExpanderVisibilty(value As Visibility)
m_ExpanderVisibilty = value
Friend Sub SetExpanderVisibilty(value As Boolean)
m_ExpanderVisibilty = If(value, Visibility.Visible, Visibility.Collapsed)
NotifyPropertyChanged(NameOf(ExpanderVisibilty))
End Sub
@@ -455,13 +455,13 @@ Public Class JsonDefaultStrategyParameter
StrategyParameter = New BooleanStrategyParameter()
DirectCast(StrategyParameter, BooleanStrategyParameter).SetValue(m_sValue)
If m_sMinUserLevel = 1 Then
DirectCast(StrategyParameter, BooleanStrategyParameter).SetbBooleanVisibility(Visibility.Visible)
DirectCast(StrategyParameter, BooleanStrategyParameter).SetbBooleanVisibility(True)
End If
Case "d"
StrategyParameter = New DoubleStrategyParameter()
DirectCast(StrategyParameter, DoubleStrategyParameter).SetValue(m_sValue)
If m_sMinUserLevel = 1 Then
DirectCast(StrategyParameter, DoubleStrategyParameter).SetbDoubleVisibility(Visibility.Visible)
DirectCast(StrategyParameter, DoubleStrategyParameter).SetbDoubleVisibility(True)
End If
Case "combo"
StrategyParameter = New ComboStrategyParameter()
@@ -470,19 +470,19 @@ Public Class JsonDefaultStrategyParameter
Next
DirectCast(StrategyParameter, ComboStrategyParameter).SetSelValue(m_sValue)
If m_sMinUserLevel = 1 Then
DirectCast(StrategyParameter, ComboStrategyParameter).SetbComboBoxVisibility(Visibility.Visible)
DirectCast(StrategyParameter, ComboStrategyParameter).SetbComboBoxVisibility(True)
End If
Case "tool"
StrategyParameter = New ListStrategyParameter(m_sSubType)
DirectCast(StrategyParameter, ListStrategyParameter).CreateToolsViews()
If m_sMinUserLevel = 1 Then
DirectCast(StrategyParameter, ListStrategyParameter).SetbListBoxVisibility(Visibility.Visible)
DirectCast(StrategyParameter, ListStrategyParameter).SetbListBoxVisibility(True)
End If
Case "s"
StrategyParameter = New StringStrategyParameter()
DirectCast(StrategyParameter, StringStrategyParameter).SetValue(m_sValue)
If m_sMinUserLevel = 1 Then
DirectCast(StrategyParameter, StringStrategyParameter).SetbStringVisibility(Visibility.Visible)
DirectCast(StrategyParameter, StringStrategyParameter).SetbStringVisibility(True)
End If
Case Else
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)
m_SelStrategySetup.Read()
End If
SetSaveImage(MODIFY_IMAGE)
NotifyPropertyChanged(NameOf(SelStrategySetup))
End Sub
@@ -408,7 +407,7 @@ Public Class StrategyManagerVM
''' </summary>
Public Sub OpenFileNameCustomConfig()
Dim SaveAsStrategyVM As New SaveAsStrategyVM()
SaveAsStrategyVM.SetbSave_Visibility(Visibility.Visible)
SaveAsStrategyVM.SetbSave_Visibility(True)
Dim SaveAsStrategyWnd As New SaveAsStrategyV With {
.DataContext = SaveAsStrategyVM,
.Owner = Application.Current.MainWindow
@@ -435,7 +434,7 @@ Public Class StrategyManagerVM
Public Sub NewAiSetup()
SetDefaultConfig_IsChecked(False)
Dim NewStrategyVM As New SaveAsStrategyVM()
NewStrategyVM.SetbOpen_Visibility(Visibility.Visible)
NewStrategyVM.SetbOpen_Visibility(True)
Dim NewStrategyWnd As New SaveAsStrategyV With {
.DataContext = NewStrategyVM,
.Owner = Application.Current.MainWindow
@@ -1150,29 +1149,29 @@ Public Class Strategy
Case GetType(BooleanStrategyParameter)
DirectCast(DefaultParameter, BooleanStrategyParameter).SetValue(Parameter.sValue)
If Parameter.sMinUserLevel = 1 Then
DirectCast(DefaultParameter, BooleanStrategyParameter).SetbBooleanVisibility(Visibility.Visible)
DirectCast(DefaultParameter, BooleanStrategyParameter).SetbBooleanVisibility(True)
End If
Case GetType(DoubleStrategyParameter)
DirectCast(DefaultParameter, DoubleStrategyParameter).SetValue(Parameter.sValue)
If Parameter.sMinUserLevel = 1 Then
DirectCast(DefaultParameter, DoubleStrategyParameter).SetbDoubleVisibility(Visibility.Visible)
DirectCast(DefaultParameter, DoubleStrategyParameter).SetbDoubleVisibility(True)
End If
Case GetType(ComboStrategyParameter)
DirectCast(DefaultParameter, ComboStrategyParameter).SetSelValue(Parameter.sValue)
If Parameter.sMinUserLevel = 1 Then
DirectCast(DefaultParameter, ComboStrategyParameter).SetbComboBoxVisibility(Visibility.Visible)
DirectCast(DefaultParameter, ComboStrategyParameter).SetbComboBoxVisibility(True)
End If
Case GetType(StringStrategyParameter)
DirectCast(DefaultParameter, StringStrategyParameter).SetValue(Parameter.sValue)
If Parameter.sMinUserLevel = 1 Then
DirectCast(DefaultParameter, StringStrategyParameter).SetbStringVisibility(Visibility.Visible)
DirectCast(DefaultParameter, StringStrategyParameter).SetbStringVisibility(True)
End If
Case GetType(ListStrategyParameter)
DirectCast(DefaultParameter, ListStrategyParameter).SetSelValue(Parameter.sValue)
DirectCast(DefaultParameter, ListStrategyParameter).CreateToolsViews()
DirectCast(DefaultParameter, ListStrategyParameter).ToolView()
If Parameter.sMinUserLevel = 1 Then
DirectCast(DefaultParameter, ListStrategyParameter).SetbListBoxVisibility(Visibility.Visible)
DirectCast(DefaultParameter, ListStrategyParameter).SetbListBoxVisibility(True)
End If
End Select
End If
@@ -1346,8 +1345,8 @@ Public Class BooleanStrategyParameter
Return m_bBooleanVisibility
End Get
End Property
Friend Sub SetbBooleanVisibility(value As Visibility)
m_bBooleanVisibility = value
Friend Sub SetbBooleanVisibility(value As Boolean)
m_bBooleanVisibility = If(value, Visibility.Visible, Visibility.Collapsed)
NotifyPropertyChanged(NameOf(bBooleanVisibility))
End Sub
@@ -1361,9 +1360,9 @@ Public Class BooleanStrategyParameter
m_bIsBooleanModify = value
If m_bIsBooleanModify 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
Map.refProjectVM.MachGroupPanelVM.SelectedMachGroup.SelPart.SelFeatureVM.SetbStrategy_Visibility(Visibility.Visible)
Map.refProjectVM.MachGroupPanelVM.SelectedMachGroup.SelPart.SelFeatureVM.SetbStrategy_Visibility(True)
End If
End If
NotifyPropertyChanged(NameOf(bIsBooleanModify))
@@ -1443,8 +1442,8 @@ Public Class DoubleStrategyParameter
Return m_bDoubleVisibility
End Get
End Property
Friend Sub SetbDoubleVisibility(value As Visibility)
m_bDoubleVisibility = value
Friend Sub SetbDoubleVisibility(value As Boolean)
m_bDoubleVisibility = If(value, Visibility.Visible, Visibility.Collapsed)
NotifyPropertyChanged(NameOf(bDoubleVisibility))
End Sub
@@ -1458,9 +1457,9 @@ Public Class DoubleStrategyParameter
m_bIsDoubleModify = value
If m_bIsDoubleModify 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
Map.refProjectVM.MachGroupPanelVM.SelectedMachGroup.SelPart.SelFeatureVM.SetbStrategy_Visibility(Visibility.Visible)
Map.refProjectVM.MachGroupPanelVM.SelectedMachGroup.SelPart.SelFeatureVM.SetbStrategy_Visibility(True)
End If
End If
NotifyPropertyChanged(NameOf(bIsDoubleModify))
@@ -1523,8 +1522,8 @@ Public Class StringStrategyParameter
Return m_bStringVisibility
End Get
End Property
Friend Sub SetbStringVisibility(value As Visibility)
m_bStringVisibility = value
Friend Sub SetbStringVisibility(value As Boolean)
m_bStringVisibility = If(value, Visibility.Visible, Visibility.Collapsed)
NotifyPropertyChanged(NameOf(bStringVisibility))
End Sub
@@ -1538,9 +1537,9 @@ Public Class StringStrategyParameter
m_bIsStringModify = value
If m_bIsStringModify 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
Map.refProjectVM.MachGroupPanelVM.SelectedMachGroup.SelPart.SelFeatureVM.SetbStrategy_Visibility(Visibility.Visible)
Map.refProjectVM.MachGroupPanelVM.SelectedMachGroup.SelPart.SelFeatureVM.SetbStrategy_Visibility(True)
End If
End If
NotifyPropertyChanged(NameOf(bIsStringModify))
@@ -1616,8 +1615,8 @@ Public Class ComboStrategyParameter
Return m_bComboBoxVisibility
End Get
End Property
Friend Sub SetbComboBoxVisibility(value As Visibility)
m_bComboBoxVisibility = value
Friend Sub SetbComboBoxVisibility(value As Boolean)
m_bComboBoxVisibility = If(value, Visibility.Visible, Visibility.Collapsed)
NotifyPropertyChanged(NameOf(bComboBoxVisibility))
End Sub
@@ -1631,9 +1630,9 @@ Public Class ComboStrategyParameter
m_bIsComboBoxModify = value
If m_bIsComboBoxModify 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
Map.refProjectVM.MachGroupPanelVM.SelectedMachGroup.SelPart.SelFeatureVM.SetbStrategy_Visibility(Visibility.Visible)
Map.refProjectVM.MachGroupPanelVM.SelectedMachGroup.SelPart.SelFeatureVM.SetbStrategy_Visibility(True)
End If
End If
NotifyPropertyChanged(NameOf(bIsComboBoxModify))
@@ -1732,8 +1731,8 @@ Public Class ListStrategyParameter
Return m_bAvailableToolListVisibility
End Get
End Property
Friend Sub SetAvailableToolListVisibility(value As Visibility)
m_bAvailableToolListVisibility = value
Friend Sub SetAvailableToolListVisibility(value As Boolean)
m_bAvailableToolListVisibility = If(value, Visibility.Visible, Visibility.Collapsed)
NotifyPropertyChanged(NameOf(AvailableToolListVisibility))
End Sub
@@ -1776,8 +1775,8 @@ Public Class ListStrategyParameter
Return m_bListBoxVisibility
End Get
End Property
Friend Sub SetbListBoxVisibility(value As Visibility)
m_bListBoxVisibility = value
Friend Sub SetbListBoxVisibility(value As Boolean)
m_bListBoxVisibility = If(value, Visibility.Visible, Visibility.Collapsed)
NotifyPropertyChanged(NameOf(bListBoxVisibility))
End Sub
@@ -1791,9 +1790,9 @@ Public Class ListStrategyParameter
m_bIsListModify = value
If m_bIsListModify 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
Map.refProjectVM.MachGroupPanelVM.SelectedMachGroup.SelPart.SelFeatureVM.SetbStrategy_Visibility(Visibility.Visible)
Map.refProjectVM.MachGroupPanelVM.SelectedMachGroup.SelPart.SelFeatureVM.SetbStrategy_Visibility(True)
End If
End If
NotifyPropertyChanged(NameOf(bIsListModify))
@@ -1910,7 +1909,7 @@ Public Class ListStrategyParameter
End Property
Friend Sub OpenToolList()
SetAvailableToolListVisibility(Visibility.Visible)
SetAvailableToolListVisibility(True)
SetOpenToolListIsEnable(False)
End Sub
@@ -1928,7 +1927,7 @@ Public Class ListStrategyParameter
End Property
Friend Sub CloseToolList()
SetAvailableToolListVisibility(Visibility.Collapsed)
SetAvailableToolListVisibility(True)
SetOpenToolListIsEnable(True)
End Sub
+14 -2
View File
@@ -425,7 +425,6 @@
<!--#region StrategyModify-->
<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="VerticalAlignment" Value="Center"/>
<Setter Property="FontWeight" Value="Normal"/>
@@ -443,7 +442,6 @@
<!--#region CALC_ROT-->
<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="HorizontalAlignment" Value="Center"/>
<Setter Property="VerticalAlignment" Value="Top"/>
@@ -533,6 +531,16 @@
<Setter Property="Margin" Value="10,5,10,0"/>
</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-->
<!-- ______________________________________________________________________________________________________________________________________________ -->
@@ -1969,6 +1977,10 @@
<Setter Property="VerticalAlignment" Value="Center"/>
</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-->
<!--#region PartManager-->
@@ -72,12 +72,6 @@ Public Class MainMenuVM
End Get
End Property
Public ReadOnly Property ViewerOptimizer_Visibility As Visibility
Get
Return Visibility.Collapsed
End Get
End Property
Private m_SelPage As Integer = -1
Public Property SelPage As Integer
Get
@@ -67,7 +67,7 @@ Public Class MainWindowVM
Public Sub UpdateTitle()
m_Title = ""
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
NotifyPropertyChanged(NameOf(Title))
End Sub
@@ -70,5 +70,5 @@ Imports System.Windows
' by using the '*' as shown below:
' <Assembly: AssemblyVersion("1.0.*")>
<Assembly: AssemblyVersion("3.1.4.4")>
<Assembly: AssemblyFileVersion("3.1.4.4")>
<Assembly: AssemblyVersion("3.1.4.7")>
<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?
m_ProjectType = ProjectType
m_GoToProd = GoToProd
' carico colonne
LoadColumns()
'' carico colonne
'LoadColumns()
NotifyPropertyChanged(NameOf(FilterTypeList))
m_SelFilterType = m_FilterTypeList(0)
' carico lista progetti
@@ -85,14 +85,6 @@ Public Class MySceneHostVM
Dim sTitle As String = EgtMsg(10101)
If EgtBEAMWALL.Core.EgtMessageBoxV.Show(Application.Current.MainWindow, sText, sTitle, MessageBoxButton.OKCancel, MessageBoxImage.Error) = MessageBoxResult.OK Then
' 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 {
.Title = EgtMsg(110026),
.DefaultExt = ".lic",