-piccole migliorie

This commit is contained in:
Demetrio Cassarino
2025-05-12 14:33:48 +02:00
parent 17ebba3e11
commit 32d576111a
8 changed files with 122 additions and 101 deletions
+1 -1
View File
@@ -103,6 +103,6 @@ Public Module ConstGen
' File contenente lista strategie per feature/topologia
Public Const AVAILABLESTRATEGYLIST_FILE As String = "AvailableStrategyList"
' File contente tutte le feature
Public Const CUSTOMERCONFIG_FILE As String = "CustumerConfig"
Public Const CUSTOMERCONFIG_FILE As String = "CustomerConfig"
End Module
@@ -27,9 +27,8 @@
ColumnHeaderFontSize="15"
ColumnHeaderPadding="0,2,0,2"
AreRowDetailsFrozen="True"
ScrollViewer.CanContentScroll="True"
VirtualizingPanel.ScrollUnit="Pixel"
VirtualizingPanel.IsVirtualizingWhenGrouping="True"
RowHeight="23"
Style="{StaticResource DataGrid_OnlyProd}">
<DataGrid.InputBindings>
@@ -125,6 +125,12 @@ Public Class LeftPanelVM
End Get
End Property
Public ReadOnly Property FilterAll_ToolTip As String
Get
Return EgtMsg(62570)
End Get
End Property
#End Region ' Messages
#End Region 'FIELDS & PROPERTIES
+108 -94
View File
@@ -29,35 +29,35 @@ Public Class MainMenuVM
End Get
End Property
Public Property View_IsChecked As Boolean
Get
Return m_SelPage = Pages.VIEW
End Get
Set(value As Boolean)
If value Then
If Not IsNothing(ProjectManagerVM.CurrProj) AndAlso Not IsNothing(ProjectManagerVM.CurrProd) AndAlso
ProjectManagerVM.CurrProj.nProdId = ProjectManagerVM.CurrProd.nProdId Then
ProjectManagerVM.CurrProj.SetReloadProject(False)
End If
SelPage = Pages.VIEW
End If
End Set
End Property
'Public Property View_IsChecked As Boolean
' Get
' Return m_SelPage = Pages.VIEW
' End Get
' Set(value As Boolean)
' If value Then
' If Not IsNothing(ProjectManagerVM.CurrProj) AndAlso Not IsNothing(ProjectManagerVM.CurrProd) AndAlso
' ProjectManagerVM.CurrProj.nProdId = ProjectManagerVM.CurrProd.nProdId Then
' ProjectManagerVM.CurrProj.SetReloadProject(False)
' End If
' SelPage = Pages.VIEW
' End If
' End Set
'End Property
Public Property Machining_IsChecked As Boolean
Get
Return m_SelPage = Pages.MACHINING
End Get
Set(value As Boolean)
If value Then
If Not IsNothing(ProjectManagerVM.CurrProj) AndAlso Not IsNothing(ProjectManagerVM.CurrProd) AndAlso
ProjectManagerVM.CurrProj.nProdId = ProjectManagerVM.CurrProd.nProdId Then
ProjectManagerVM.CurrProd.SetReloadProject(False)
End If
SelPage = Pages.MACHINING
End If
End Set
End Property
'Public Property Machining_IsChecked As Boolean
' Get
' Return m_SelPage = Pages.MACHINING
' End Get
' Set(value As Boolean)
' If value Then
' If Not IsNothing(ProjectManagerVM.CurrProj) AndAlso Not IsNothing(ProjectManagerVM.CurrProd) AndAlso
' ProjectManagerVM.CurrProj.nProdId = ProjectManagerVM.CurrProd.nProdId Then
' ProjectManagerVM.CurrProd.SetReloadProject(False)
' End If
' SelPage = Pages.MACHINING
' End If
' End Set
'End Property
Public Property OnlyProdPage_IsChecked As Boolean
Get
@@ -115,6 +115,7 @@ Public Class MainMenuVM
' bOk = ExitMACHINING(bVerifyModification)
Case Pages.CONFIG
bOk = ExitCONFIG()
SetbOpenProject(True)
Case Pages.ONLYPRODPAGE
bOk = ExitONLYPRODPAGE(bVerifyModification)
End Select
@@ -266,6 +267,17 @@ Public Class MainMenuVM
NotifyPropertyChanged(NameOf(MainMenu_IsEnabled))
End Sub
Private m_bOpenProject As Boolean = False
Public ReadOnly Property bOpenProject As Boolean
Get
Return bOpenProject
End Get
End Property
Friend Sub SetbOpenProject(value As Boolean)
m_bOpenProject = value
NotifyPropertyChanged(NameOf(bOpenProject))
End Sub
'Private Function InitVIEW() As Boolean
' Map.refProjectVM.SetBottomPanel_Visibility(True)
' Map.refProjectVM.SetLeftPanel_Visibility(True)
@@ -593,76 +605,78 @@ Public Class MainMenuVM
' inizializzo gruppi di lavorazione
If Not IsNothing(ProjectManagerVM.CurrProd) AndAlso Not IsNothing(ProjectManagerVM.CurrProd.nProdId) AndAlso ProjectManagerVM.CurrProd.nProdId > 0 Then
If File.Exists(ProjectManagerVM.CurrProd.sProdPath) Then
' apro progetto
If ProjectManagerVM.CurrProd.bReloadProject OrElse Map.refConfigurationPageVM.QParametersModified Then
LoadingWndHelper.UpdateLoadingWnd(ActiveIds.GOTOPROD, 2, EgtMsg(63005), 10, 50) ' Loading parts
Map.refOnlyProdManagerVM.TempCurrProd = ProjectManagerVM.CurrProd
If Map.refSceneHostVM.MainController.OpenProject(ProjectManagerVM.CurrProd.sProdPath, False) Then
' aggiorno le colonne in base al tipo progetto
Map.refRawPartListVM.UpdateColumns(Map.refProjectVM.BTLStructureVM.nPROJTYPE)
Map.refFeatureInPartInRawPartListVM.UpdateColumns(CurrentMachine.nType)
Map.refRawPartListVM.UpdateColumns(Map.refProjectVM.BTLStructureVM.nPROJTYPE)
' resetto modifica parametri Q default
Map.refConfigurationPageVM.ResetQParametersModified()
DbControllers.m_ProdController.LockByProdId(ProjectManagerVM.CurrProd.nProdId, True, Map.refMainWindowVM.MainWindowM.GetKeyNumber())
Map.refOnlyProdManagerVM.NotifyPropertyChanged(NameOf(Map.refOnlyProdManagerVM.MruFileNames))
End If
Else
LoadingWndHelper.UpdateLoadingWnd(ActiveIds.GOTOPROD, 2, EgtMsg(63005), 10, 30) ' Loading parts
' mostro tutti i pezzi
Map.refShowBeamPanelVM.ShowAll(False)
' verifico se il prod ha piu' proj
If ProjectManagerVM.CurrProd.nProjIdList.Count > 1 Then
' se si rigenero BTLStructure
Map.refProjectVM.BTLStructureVM = New BTLStructureVM(BTLStructureM.CreateBTLStructure(0))
' carico filtri di ricerca
Map.refProjectVM.BTLStructureVM.LoadFilters()
End If
' recupero indice di modifica progetto
Dim CommIndex As Integer = -1
Dim ActiveSessionList As List(Of StatusMapModel) = DbControllers.m_StatusMapController.GetProd(m_SupervisorId)
For Each ActiveSession In ActiveSessionList
If ActiveSession.ItemId = ProjectManagerVM.CurrProd.nProdId Then
CommIndex = ActiveSession.Index
If Not m_bOpenProject Then
If File.Exists(ProjectManagerVM.CurrProd.sProdPath) Then
' apro progetto
If ProjectManagerVM.CurrProd.bReloadProject OrElse Map.refConfigurationPageVM.QParametersModified Then
LoadingWndHelper.UpdateLoadingWnd(ActiveIds.GOTOPROD, 2, EgtMsg(63005), 10, 50) ' Loading parts
Map.refOnlyProdManagerVM.TempCurrProd = ProjectManagerVM.CurrProd
If Map.refSceneHostVM.MainController.OpenProject(ProjectManagerVM.CurrProd.sProdPath, False) Then
' aggiorno le colonne in base al tipo progetto
Map.refRawPartListVM.UpdateColumns(Map.refProjectVM.BTLStructureVM.nPROJTYPE)
Map.refFeatureInPartInRawPartListVM.UpdateColumns(CurrentMachine.nType)
Map.refRawPartListVM.UpdateColumns(Map.refProjectVM.BTLStructureVM.nPROJTYPE)
' resetto modifica parametri Q default
Map.refConfigurationPageVM.ResetQParametersModified()
DbControllers.m_ProdController.LockByProdId(ProjectManagerVM.CurrProd.nProdId, True, Map.refMainWindowVM.MainWindowM.GetKeyNumber())
Map.refOnlyProdManagerVM.NotifyPropertyChanged(NameOf(Map.refOnlyProdManagerVM.MruFileNames))
End If
Next
LoadingWndHelper.UpdateLoadingWnd(ActiveIds.GOTOPROD, 3, EgtMsg(63002), 30, 100) ' Loading machining groups
' carico lista dei MachGroup
Map.refProjectVM.MachGroupPanelVM = New MyMachGroupPanelVM(MyMachGroupPanelM.CreateMyMachGroupPanel(Map.refMachinePanelVM.MachineList.ToList()))
' fisso indice sessione di comunicazione
If CommIndex > -1 Then
ProjectManagerVM.CurrProd.SetModificationIndex(CommIndex)
Else
LoadingWndHelper.UpdateLoadingWnd(ActiveIds.GOTOPROD, 2, EgtMsg(63005), 10, 30) ' Loading parts
' mostro tutti i pezzi
Map.refShowBeamPanelVM.ShowAll(False)
' verifico se il prod ha piu' proj
If ProjectManagerVM.CurrProd.nProjIdList.Count > 1 Then
' se si rigenero BTLStructure
Map.refProjectVM.BTLStructureVM = New BTLStructureVM(BTLStructureM.CreateBTLStructure(0))
' carico filtri di ricerca
Map.refProjectVM.BTLStructureVM.LoadFilters()
End If
' recupero indice di modifica progetto
Dim CommIndex As Integer = -1
Dim ActiveSessionList As List(Of StatusMapModel) = DbControllers.m_StatusMapController.GetProd(m_SupervisorId)
For Each ActiveSession In ActiveSessionList
If ActiveSession.ItemId = ProjectManagerVM.CurrProd.nProdId Then
CommIndex = ActiveSession.Index
End If
Next
LoadingWndHelper.UpdateLoadingWnd(ActiveIds.GOTOPROD, 3, EgtMsg(63002), 30, 100) ' Loading machining groups
' carico lista dei MachGroup
Map.refProjectVM.MachGroupPanelVM = New MyMachGroupPanelVM(MyMachGroupPanelM.CreateMyMachGroupPanel(Map.refMachinePanelVM.MachineList.ToList()))
' fisso indice sessione di comunicazione
If CommIndex > -1 Then
ProjectManagerVM.CurrProd.SetModificationIndex(CommIndex)
End If
ProjectManagerVM.CurrProd.SetReloadProject(True)
End If
ProjectManagerVM.CurrProd.SetReloadProject(True)
End If
' se Warehouse di tipo Medium e piu' di un progetto collegato
Dim nDefault As Integer = 2
If GetMainPrivateProfileInt(S_WAREHOUSE, EgtBEAMWALL.Core.ConstIni.K_TYPE, nDefault) = WarehouseType.MEDIUM AndAlso ProjectManagerVM.CurrProd.nProjIdList.Count > 1 Then
' confronto le Sezioni del BTL importato con quelle in Warehouse
WarehouseWndVM.UpdateSectionXMaterial()
End If
' aggiorno titolo
Map.refMainWindowVM.UpdateTitle()
DbControllers.m_ProdController.LockByProdId(ProjectManagerVM.CurrProd.nProdId, True, Map.refMainWindowVM.MainWindowM.GetKeyNumber())
' controllo se devo lanciare verifica perche' importato
Dim bGetVerifyResult As Boolean = False
Dim bVerifyMach As Boolean = False
Dim nBTLInfoLayerId As Integer = EgtGetFirstNameInGroup(GDB_ID.ROOT, BTLINFO)
While nBTLInfoLayerId <> GDB_ID.NULL
If EgtGetInfo(nBTLInfoLayerId, IMP_VERIFYMACHGROUP, bGetVerifyResult) AndAlso bGetVerifyResult Then
If Not bVerifyMach Then bVerifyMach = True
EgtSetInfo(nBTLInfoLayerId, IMP_VERIFYMACHGROUP, False)
' se Warehouse di tipo Medium e piu' di un progetto collegato
Dim nDefault As Integer = 2
If GetMainPrivateProfileInt(S_WAREHOUSE, EgtBEAMWALL.Core.ConstIni.K_TYPE, nDefault) = WarehouseType.MEDIUM AndAlso ProjectManagerVM.CurrProd.nProjIdList.Count > 1 Then
' confronto le Sezioni del BTL importato con quelle in Warehouse
WarehouseWndVM.UpdateSectionXMaterial()
End If
nBTLInfoLayerId = EgtGetNextName(nBTLInfoLayerId, BTLINFO)
End While
If bVerifyMach Then
Map.refCALCPanelVM.VerifyAll()
' aggiorno titolo
Map.refMainWindowVM.UpdateTitle()
DbControllers.m_ProdController.LockByProdId(ProjectManagerVM.CurrProd.nProdId, True, Map.refMainWindowVM.MainWindowM.GetKeyNumber())
' controllo se devo lanciare verifica perche' importato
Dim bGetVerifyResult As Boolean = False
Dim bVerifyMach As Boolean = False
Dim nBTLInfoLayerId As Integer = EgtGetFirstNameInGroup(GDB_ID.ROOT, BTLINFO)
While nBTLInfoLayerId <> GDB_ID.NULL
If EgtGetInfo(nBTLInfoLayerId, IMP_VERIFYMACHGROUP, bGetVerifyResult) AndAlso bGetVerifyResult Then
If Not bVerifyMach Then bVerifyMach = True
EgtSetInfo(nBTLInfoLayerId, IMP_VERIFYMACHGROUP, False)
End If
nBTLInfoLayerId = EgtGetNextName(nBTLInfoLayerId, BTLINFO)
End While
If bVerifyMach Then
Map.refCALCPanelVM.VerifyAll()
End If
' seleziono prima barra
Map.refProjectVM.MachGroupPanelVM.SelFirstMachGroup()
Else
MessageBox.Show(EgtMsg(61871))
End If
' seleziono prima barra
Map.refProjectVM.MachGroupPanelVM.SelFirstMachGroup()
Else
MessageBox.Show(EgtMsg(61871))
End If
Else
Map.refSceneHostVM.MainController.NewProject()
@@ -45,6 +45,7 @@
<StackPanel Orientation="Horizontal"
HorizontalAlignment="Center">
<Button Command="{Binding OpenFileNameCustomConfigCommand}"
ToolTip="{Binding SaveAsToolTip}"
Margin="0,0,10,0"
Style="{StaticResource SaveOptionPanel_Button}">
<Image Source="/Resources/NewPage/+.png" Stretch="Uniform"/>
@@ -311,13 +311,13 @@ Public Class StrategyManagerVM
Public ReadOnly Property SaveToolTip As String
Get
Return EgtMsg(30503)
Return EgtMsg(62571)
End Get
End Property
Public ReadOnly Property SaveAsToolTip As String
Get
Return EgtMsg(30504)
Return EgtMsg(62572)
End Get
End Property
@@ -1303,6 +1303,7 @@
<Setter Property="VirtualizingPanel.VirtualizationMode" Value="Recycling"/>
<Setter Property="EnableColumnVirtualization" Value="True"/>
<Setter Property="EnableRowVirtualization" Value="True"/>
<Setter Property="VirtualizingStackPanel.ScrollUnit" Value="Pixel"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type DataGrid}">
@@ -135,11 +135,11 @@
</DataGrid>
</Border>
</Grid>
<Border Grid.Column="1"
<!--<Border Grid.Column="1"
Margin="0,10,10,10"
Style="{StaticResource OnlyProdPage_Border}">
<WebView:WebView2 Grid.Column="1"
Source="{Binding LinkVersionView}"/>
</Border>
</Border>-->
</Grid>