Imports EgtUILib

Module ManageBTLParts

   Friend Sub ShowAll(Optional bRedraw As Boolean = True)
      ' disabilito impostazione modificato
      Dim DisableMgr As New DisableModifiedMgr
      ' mostro tutti i pezzi
      ' creo lista id presenti
      Dim nPartId As Integer = EgtGetFirstPart()
      While nPartId <> GDB_ID.NULL
         Dim nMode As Integer
         EgtGetMode(nPartId, nMode)
         If nMode <> GDB_MD.STD Then
            EgtSetMode(nPartId, GDB_MD.STD)
         End If
         nPartId = EgtGetNextPart(nPartId)
      End While
      ' ripristino precedente impostazione modificato
      DisableMgr.ReEnable()
      Core.ViewPanelVM.BWSetView(VT.ISO_SW, False)
      EgtZoom(ZM.ALL, bRedraw)
   End Sub

   Friend Sub HideAll(Optional bRedraw As Boolean = True)
      ' disabilito impostazione modificato
      Dim DisableMgr As New DisableModifiedMgr
      ' nascondo tutti i pezzi
      Dim nPartId As Integer = EgtGetFirstPart()
      While nPartId <> GDB_ID.NULL
         Dim nMode As Integer
         EgtGetMode(nPartId, nMode)
         If nMode <> GDB_MD.HIDDEN Then
            EgtSetMode(nPartId, GDB_MD.HIDDEN)
         End If
         nPartId = EgtGetNextPart(nPartId)
      End While
      ' ripristino precedente impostazione modificato
      DisableMgr.ReEnable()
      Core.ViewPanelVM.BWSetView(VT.ISO_SW, False)
      EgtZoom(ZM.ALL, bRedraw)
   End Sub

End Module
