c973a78476
- migliorie a generazione e simulazione con visualizzazione messaggi di errore - in generazione e simulazione non si ricarica più il progetto ma si ripristina allo stato precedente - migliorata gestione spessore grezzo (ora 0.1 più basso, mentre pezzi in Z esatta) - unificata gestione inserimento e parcheggio pezzi - inizializzate variabili m_bFirst.
93 lines
3.3 KiB
VB.net
93 lines
3.3 KiB
VB.net
Public Class TestingPageUC
|
|
|
|
' Riferimento alla MainWindow
|
|
Private m_MainWindow As MainWindow = Application.Current.MainWindow
|
|
Friend m_CN As CN_generico
|
|
Private m_bFirst As Boolean = True
|
|
|
|
Private Sub TestingPage_Loaded(sender As Object, e As RoutedEventArgs)
|
|
If m_bFirst Then
|
|
If m_MainWindow.m_bNCLink Then
|
|
'Rinomino cn per avere nome più corto
|
|
m_CN = m_MainWindow.m_CNCommunication.m_CN
|
|
End If
|
|
m_bFirst = False
|
|
End If
|
|
End Sub
|
|
|
|
Private Sub StartBtn_Click(sender As Object, e As RoutedEventArgs) Handles StartBtn.Click
|
|
m_CN.DGeneralFunctions_CycleStart()
|
|
End Sub
|
|
|
|
Private Sub StopBtn_Click(sender As Object, e As RoutedEventArgs) Handles StopBtn.Click
|
|
m_CN.DGeneralFunctions_FeedHold()
|
|
End Sub
|
|
|
|
Private Sub ResetBtn_Click(sender As Object, ghe As RoutedEventArgs) Handles ResetBtn.Click
|
|
Call m_CN.DGeneralFunctions_Reset()
|
|
End Sub
|
|
|
|
Private Sub AutoBtn_Click(sender As Object, e As RoutedEventArgs) Handles AutoBtn.Click
|
|
m_CN.DGeneralFunctions_WriteCncMode(0)
|
|
End Sub
|
|
|
|
Private Sub SingleBtn_Click(sender As Object, e As RoutedEventArgs) Handles SingleBtn.Click
|
|
m_CN.DGeneralFunctions_WriteCncMode(1)
|
|
End Sub
|
|
|
|
Private Sub MDIBtn_Click(sender As Object, e As RoutedEventArgs) Handles MDIBtn.Click
|
|
m_CN.DGeneralFunctions_WriteCncMode(2)
|
|
End Sub
|
|
|
|
Private Sub ManualBtn_Click(sender As Object, e As RoutedEventArgs) Handles ManualBtn.Click
|
|
m_CN.DGeneralFunctions_WriteCncMode(7)
|
|
End Sub
|
|
|
|
Private Sub HomeBtn_Click(sender As Object, e As RoutedEventArgs) Handles HomeBtn.Click
|
|
m_CN.DGeneralFunctions_WriteCncMode(8)
|
|
End Sub
|
|
|
|
Private Sub MDITxBx_KeyDown(sender As Object, e As KeyEventArgs) Handles MDITxBx.KeyDown
|
|
If e.Key = Key.Return Then
|
|
m_CN.sz_ManualDataInput = MDITxBx.Text
|
|
m_CN.MDI_command()
|
|
|
|
MDITxBx.Background = Brushes.LightGray
|
|
'Keyboard.ClearFocus()
|
|
End If
|
|
End Sub
|
|
|
|
Private Sub MDITxBx_PreviewMouseDown(sender As Object, e As MouseButtonEventArgs) Handles MDITxBx.PreviewMouseDown
|
|
MDITxBx.Background = Brushes.White
|
|
End Sub
|
|
|
|
Private Sub DownloadBtn_Click(sender As Object, e As RoutedEventArgs) Handles DownloadBtn.Click
|
|
If m_MainWindow.m_CNCommunication.m_nNCType = 1 Then
|
|
m_CN.Delete_NC_prog(DULoadTxBx.Text)
|
|
End If
|
|
m_CN.Download_NC_prog(m_MainWindow.GetCncDir() & "\CadCut.xpi", "%" & DULoadTxBx.Text)
|
|
m_CN.Start_Transfer_NC_prog()
|
|
End Sub
|
|
|
|
Private Sub UploadBtn_Click(sender As Object, e As RoutedEventArgs) Handles UploadBtn.Click
|
|
m_CN.Upload_NC_prog(m_MainWindow.GetCncDir() & "\" & DULoadTxBx.Text & ".xpi", "%" & DULoadTxBx.Text)
|
|
m_CN.Start_Transfer_NC_prog()
|
|
End Sub
|
|
|
|
Private Sub ActivateBtn_Click(sender As Object, e As RoutedEventArgs) Handles ActivateBtn.Click
|
|
m_CN.ActivateProgram(900)
|
|
End Sub
|
|
|
|
Private Sub DeleteBtn_Click(sender As Object, e As RoutedEventArgs) Handles DeleteBtn.Click
|
|
m_CN.Delete_NC_prog(DULoadTxBx.Text)
|
|
End Sub
|
|
|
|
Private Sub MDIConfirmBtn_Click(sender As Object, e As RoutedEventArgs) Handles MDIConfirmBtn.Click
|
|
m_CN.sz_ManualDataInput = MDITxBx.Text
|
|
m_CN.MDI_command()
|
|
|
|
MDITxBx.Background = Brushes.LightGray
|
|
End Sub
|
|
|
|
End Class
|