Imports System.Collections.ObjectModel Imports System.IO Imports EgtUILib Imports EgtWPFLib5 Public Class MachGroupPanelVM Inherits EgtWPFLib5.EgtMachGroupPanelVM #Region "CONSTRUCTOR" Sub New() MyBase.New() ' Creo riferimento a questa classe in OmagOFFICEMap OmagOFFICEMap.SetRefMachGroupPanelVM(Me) InitMachGroups(True, OmagOFFICEMap.refMachinePanelVM.MachineList.ToList(), BASE_MACH_GROUP & "1") End Sub #End Region ' CONSTRUCTOR #Region "METHODS" Public Overrides Function OnPostNewMachGroup() As Boolean ' !!! GESTIRE MACCHINE CON DUE TAVOLE !!! EgtSetTable("MainTab") ' Aggiorno grezzo iniziale EstCalc.UpdateRawPart() Return True End Function Public Overrides Function OnPostSetCurrMachGroup() As Boolean ' Imposto vista solo tavola EgtSetMachineLook(MCH_LOOK.TAB) ' Ricarico la macchina corrente InitCurrentMachine(OmagOFFICEMap.refMachinePanelVM.sMachinesRoot, SelectedMachGroup.Machine, OmagOFFICEMap.refMainWindowVM.MainWindowM.GetKeyOption(KEY_OPT.PROCUCTION_LINE), OmagOFFICEMap.refMainWindowVM.MainWindowM.GetKeyOption(KEY_OPT.ENABLE_MILL)) ' Imposto tab Disposizione OmagOFFICEMap.refOptionPanelVM.SelItem = OptionPanelVM.Tabs.NESTING ' Aggiorno grezzo iniziale EstCalc.UpdateRawPart() Return True End Function Public Overrides Function OnPreRemoveCurrMachGroup() As Boolean EgtSetCurrentContext(OmagOFFICEMap.refSceneHostV.OmagOFFICEScene.GetCtx()) ' Seleziono tutti i pezzi in tavola Dim nPartId As Integer = EgtGetFirstGroupInGroup(GetRawId()) While nPartId <> GDB_ID.NULL Dim nNextPartId As Integer = EgtGetNextGroup(nPartId) StoreOnePart(nPartId) nPartId = nNextPartId End While Return True End Function #End Region ' METHODS End Class