4128c0de4e
- migliorie per selezione pezzi.
55 lines
2.0 KiB
VB.net
55 lines
2.0 KiB
VB.net
Imports EgtUILib
|
|
|
|
Public Class SimulationPageUC
|
|
|
|
Dim m_MainWindow As MainWindow = Application.Current.MainWindow
|
|
Dim m_CurrProjPage As CurrentProjectPageUC
|
|
|
|
'Dichiarazione delle Page UserControl
|
|
Friend m_SceneButtons As SceneButtonsUC
|
|
|
|
Private Sub SimulationPage_Initialized(sender As Object, e As EventArgs)
|
|
|
|
'Creazione del UserCOntrol SceneButtons
|
|
m_SceneButtons = New SceneButtonsUC
|
|
|
|
'Posizionemento nella griglia del UserControl SceneButtons
|
|
m_SceneButtons.SetValue(Grid.ColumnProperty, 1)
|
|
UpperButtonGrid.Children.Add(m_SceneButtons)
|
|
|
|
End Sub
|
|
|
|
Private Sub SimulationPage_Loaded(sender As Object, e As RoutedEventArgs)
|
|
m_CurrProjPage = m_MainWindow.m_CurrentProjectPageUC
|
|
' Nascondo eventuali pezzi in parcheggio
|
|
Dim nPartId As Integer = EgtGetFirstPart()
|
|
While nPartId <> GDB_ID.NULL
|
|
EgtSetStatus(nPartId, GDB_ST.OFF)
|
|
nPartId = EgtGetNextPart(nPartId)
|
|
End While
|
|
' Visualizzo tutta la macchina
|
|
EgtShowOnlyTable(False)
|
|
EgtSetView(VT.ISO_SE, False)
|
|
EgtZoom(ZM.ALL)
|
|
End Sub
|
|
|
|
Private Sub ExitBtnUC_Click(sender As Object, e As RoutedEventArgs)
|
|
' Ripristino visualizzazione di eventuali pezzi in parcheggio
|
|
Dim nPartId As Integer = EgtGetFirstPart()
|
|
While nPartId <> GDB_ID.NULL
|
|
EgtSetStatus(nPartId, GDB_ST.ON_)
|
|
nPartId = EgtGetNextPart(nPartId)
|
|
End While
|
|
' Ripristino visualizzazione della sola tavola
|
|
EgtShowOnlyTable(True)
|
|
EgtSetView(VT.TOP, False)
|
|
EgtZoom(ZM.ALL)
|
|
' Esco dalla pagina
|
|
m_MainWindow.m_CurrentProjectPageUC.CurrentProjectPageGrid.Children.Remove(Me)
|
|
m_CurrProjPage.CurrProjGrid.Visibility = Windows.Visibility.Visible
|
|
m_MainWindow.m_CurrentProjectPageUC.CurrentProjectPageGrid.Children.Add(m_MainWindow.m_CadCutPageUC)
|
|
m_MainWindow.m_ActivePage = MainWindow.Pages.CadCut
|
|
End Sub
|
|
|
|
End Class
|