diff --git a/EgtBEAMWALL.Core/Constants/ConstIni.vb b/EgtBEAMWALL.Core/Constants/ConstIni.vb index 3327d23f..c004720c 100644 --- a/EgtBEAMWALL.Core/Constants/ConstIni.vb +++ b/EgtBEAMWALL.Core/Constants/ConstIni.vb @@ -44,6 +44,7 @@ Public Module ConstIni Public Const K_DATADIR As String = "DataDir" Public Const K_ENABLEEDIT As String = "EnableEdit" Public Const K_FASTPRODUCE As String = "FastProduce" + Public Const K_ADDPROJ As String = "AddProj" 'Public Const S_LANGUAGES As String = "Languages" 'Public Const K_LANGUAGE As String = "Language" diff --git a/EgtBEAMWALL.Core/My Project/AssemblyInfo.vb b/EgtBEAMWALL.Core/My Project/AssemblyInfo.vb index 02b4b39c..a3301e31 100644 --- a/EgtBEAMWALL.Core/My Project/AssemblyInfo.vb +++ b/EgtBEAMWALL.Core/My Project/AssemblyInfo.vb @@ -35,5 +35,5 @@ Imports System.Runtime.InteropServices ' by using the '*' as shown below: ' - - + + diff --git a/EgtBEAMWALL.Core/ProjectFileVM/ProdFileM.vb b/EgtBEAMWALL.Core/ProjectFileVM/ProdFileM.vb index c11a78ab..3678af03 100644 --- a/EgtBEAMWALL.Core/ProjectFileVM/ProdFileM.vb +++ b/EgtBEAMWALL.Core/ProjectFileVM/ProdFileM.vb @@ -10,6 +10,9 @@ Public Class ProdFileM Return m_nProjIdList End Get End Property + Public Sub SetProjIdList(value As List(Of Integer)) + m_nProjIdList = value + End Sub Protected m_sName As String Public ReadOnly Property sName As String diff --git a/EgtBEAMWALL.DataLayer/Properties/AssemblyInfo.cs b/EgtBEAMWALL.DataLayer/Properties/AssemblyInfo.cs index c430bbc2..de28bb6a 100644 --- a/EgtBEAMWALL.DataLayer/Properties/AssemblyInfo.cs +++ b/EgtBEAMWALL.DataLayer/Properties/AssemblyInfo.cs @@ -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("2.5.4.1")] -[assembly: AssemblyFileVersion("2.5.4.1")] +[assembly: AssemblyVersion("2.5.4.2")] +[assembly: AssemblyFileVersion("2.5.4.2")] diff --git a/EgtBEAMWALL.Supervisor/My Project/AssemblyInfo.vb b/EgtBEAMWALL.Supervisor/My Project/AssemblyInfo.vb index 0b5b4b73..19bf4274 100644 --- a/EgtBEAMWALL.Supervisor/My Project/AssemblyInfo.vb +++ b/EgtBEAMWALL.Supervisor/My Project/AssemblyInfo.vb @@ -70,5 +70,5 @@ Imports System.Windows ' by using the '*' as shown below: ' - - + + diff --git a/EgtBEAMWALL.ViewerOptimizer/EgtBEAMWALL.ViewerOptimizer.vbproj b/EgtBEAMWALL.ViewerOptimizer/EgtBEAMWALL.ViewerOptimizer.vbproj index 336d446a..60c47b36 100644 --- a/EgtBEAMWALL.ViewerOptimizer/EgtBEAMWALL.ViewerOptimizer.vbproj +++ b/EgtBEAMWALL.ViewerOptimizer/EgtBEAMWALL.ViewerOptimizer.vbproj @@ -955,6 +955,9 @@ + + + IF "$(PlatformName)"=="x86" IF "$(ConfigurationName)" == "Release" copy $(TargetPath) c:\EgtProg\EgtBEAMWALL\EgtBEAMWALL.ViewerOptimizerR32.exe diff --git a/EgtBEAMWALL.ViewerOptimizer/MainMenu/MainMenuVM.vb b/EgtBEAMWALL.ViewerOptimizer/MainMenu/MainMenuVM.vb index 728b8b3d..0d22043d 100644 --- a/EgtBEAMWALL.ViewerOptimizer/MainMenu/MainMenuVM.vb +++ b/EgtBEAMWALL.ViewerOptimizer/MainMenu/MainMenuVM.vb @@ -373,6 +373,12 @@ Public Class MainMenuVM Map.refProdManagerVM.CurrProd.SetReloadProject(True) End If 'DbControllers.m_ProdController.ResetController() + ' 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 Map.refProdManagerVM.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(Map.refProdManagerVM.CurrProd.nProdId, True, Map.refMainWindowVM.MainWindowM.GetKeyNumber()) diff --git a/EgtBEAMWALL.ViewerOptimizer/My Project/AssemblyInfo.vb b/EgtBEAMWALL.ViewerOptimizer/My Project/AssemblyInfo.vb index 88a74138..154987e1 100644 --- a/EgtBEAMWALL.ViewerOptimizer/My Project/AssemblyInfo.vb +++ b/EgtBEAMWALL.ViewerOptimizer/My Project/AssemblyInfo.vb @@ -70,5 +70,5 @@ Imports System.Windows ' by using the '*' as shown below: ' - - + + diff --git a/EgtBEAMWALL.ViewerOptimizer/OpenProjectFileDialog/OpenProjectFileDialogVM.vb b/EgtBEAMWALL.ViewerOptimizer/OpenProjectFileDialog/OpenProjectFileDialogVM.vb index 96a59177..bf2baa74 100644 --- a/EgtBEAMWALL.ViewerOptimizer/OpenProjectFileDialog/OpenProjectFileDialogVM.vb +++ b/EgtBEAMWALL.ViewerOptimizer/OpenProjectFileDialog/OpenProjectFileDialogVM.vb @@ -126,28 +126,40 @@ Public Class OpenProjectFileDialogVM If nTempCtx <> 0 Then ' inizializzo gestore lavorazioni EgtInitMachMgr(Map.refMainWindowVM.MainWindowM.sMachinesRoot, Map.refMainWindowVM.MainWindowM.sToolMakersDir) - EgtOpenFile(SelProject.sProdPath) - ' cancello tutti i gruppi di lavorazione - Dim nMachGroupId As Integer = EgtGetFirstMachGroup() - While nMachGroupId <> GDB_ID.NULL - EgtSetCurrMachGroup(nMachGroupId) - Dim nRawPartId As Integer = EgtGetFirstRawPart() - While nRawPartId <> GDB_ID.NULL - Dim nPartId As Integer = EgtGetFirstPartInRawPart(nRawPartId) - While nPartId <> GDB_ID.NULL - EgtRemovePartFromRawPart(nPartId) - ' elimino pezzo copia - EgtErase(nPartId) - nPartId = EgtGetFirstPartInRawPart(nRawPartId) - End While - nRawPartId = EgtGetNextRawPart(nRawPartId) - End While - EgtRemoveMachGroup(nMachGroupId) - nMachGroupId = EgtGetFirstMachGroup() - End While - ' lo salvo in tutti i proj correlati + ' apro, ripulisco e salvo il progetto in tutti i proj correlati Dim ProdFile As ProdFileVM = DirectCast(SelProject, ProdFileVM) For Each nProjId In ProdFile.nProjIdList + EgtOpenFile(SelProject.sProdPath) + ' cancello tutti i gruppi di lavorazione + Dim nMachGroupId As Integer = EgtGetFirstMachGroup() + While nMachGroupId <> GDB_ID.NULL + EgtSetCurrMachGroup(nMachGroupId) + Dim nRawPartId As Integer = EgtGetFirstRawPart() + While nRawPartId <> GDB_ID.NULL + Dim nPartId As Integer = EgtGetFirstPartInRawPart(nRawPartId) + While nPartId <> GDB_ID.NULL + EgtRemovePartFromRawPart(nPartId) + ' elimino pezzo copia + EgtErase(nPartId) + nPartId = EgtGetFirstPartInRawPart(nRawPartId) + End While + nRawPartId = EgtGetNextRawPart(nRawPartId) + End While + EgtRemoveMachGroup(nMachGroupId) + nMachGroupId = EgtGetFirstMachGroup() + End While + ' cancello tutti i gruppi che sono di un progetto diverso da questo + Dim nGroupId As Integer = EgtGetFirstInGroup(GDB_ID.ROOT) + While nGroupId <> GDB_ID.NULL + Dim nGroupProjId As Integer = GDB_ID.NULL + Dim nNextGroupId As Integer = EgtGetNext(nGroupId) + If EgtGetInfo(nGroupId, BTL_PRT_PROJ, nGroupProjId) Then + If nGroupProjId <> nProjId Then + EgtErase(nGroupId) + End If + End If + nGroupId = nNextGroupId + End While EgtSaveFile(ProdFile.GetProjPath(nProjId), NGE.CMPTEXT) Next ' torno sul contesto corrente diff --git a/EgtBEAMWALL.ViewerOptimizer/ProdManager/ProdManagerV.xaml b/EgtBEAMWALL.ViewerOptimizer/ProdManager/ProdManagerV.xaml index efbe4867..7c4ae8d4 100644 --- a/EgtBEAMWALL.ViewerOptimizer/ProdManager/ProdManagerV.xaml +++ b/EgtBEAMWALL.ViewerOptimizer/ProdManager/ProdManagerV.xaml @@ -39,9 +39,9 @@ -->