fcc59469f8
- Correzioni varie. - Implementata gestione CN da pagina Macchina.
68 lines
2.5 KiB
VB.net
68 lines
2.5 KiB
VB.net
Public Class MachinePageUC
|
|
|
|
' Riferimento alla MainWindow
|
|
Private m_MainWindow As MainWindow = Application.Current.MainWindow
|
|
Private cn As Num.NumNC
|
|
|
|
Private Sub UserControl_Loaded(sender As Object, e As RoutedEventArgs)
|
|
cn = m_MainWindow.m_MachineStatusUC.cn
|
|
End Sub
|
|
|
|
Private Sub StartBtn_Click(sender As Object, e As RoutedEventArgs) Handles StartBtn.Click
|
|
cn.DGeneralFunctions_CycleStart()
|
|
End Sub
|
|
|
|
Private Sub StopBtn_Click(sender As Object, e As RoutedEventArgs) Handles StopBtn.Click
|
|
cn.DGeneralFunctions_FeedHold()
|
|
End Sub
|
|
|
|
Private Sub ResetBtn_Click(sender As Object, e As RoutedEventArgs) Handles ResetBtn.Click
|
|
Call cn.DGeneralFunctions_Reset()
|
|
End Sub
|
|
|
|
Private Sub AutoBtn_Click(sender As Object, e As RoutedEventArgs) Handles AutoBtn.Click
|
|
cn.DGeneralFunctions_WriteCncMode(0)
|
|
End Sub
|
|
|
|
Private Sub SingleBtn_Click(sender As Object, e As RoutedEventArgs) Handles SingleBtn.Click
|
|
cn.DGeneralFunctions_WriteCncMode(1)
|
|
End Sub
|
|
|
|
Private Sub MDIBtn_Click(sender As Object, e As RoutedEventArgs) Handles MDIBtn.Click
|
|
cn.DGeneralFunctions_WriteCncMode(2)
|
|
End Sub
|
|
|
|
Private Sub HomeBtn_Click(sender As Object, e As RoutedEventArgs) Handles HomeBtn.Click
|
|
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
|
|
cn.sz_ManualDataInput = MDITxBx.Text
|
|
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
|
|
cn.Download_NC_prog("c:\EgtData\OmagCUT\CN\" & DULoadTxBx.Text & ".xpi", "%" & DULoadTxBx.Text)
|
|
cn.Start_Transfer_NC_prog()
|
|
End Sub
|
|
|
|
Private Sub UploadBtn_Click(sender As Object, e As RoutedEventArgs) Handles UploadBtn.Click
|
|
cn.Upload_NC_prog("c:\EgtData\OmagCUT\CN\" & DULoadTxBx.Text & ".xpi", "%" & DULoadTxBx.Text)
|
|
cn.Start_Transfer_NC_prog()
|
|
End Sub
|
|
|
|
Private Sub ActivateBtn_Click(sender As Object, e As RoutedEventArgs) Handles ActivateBtn.Click
|
|
cn.DGeneralFunctions_ActivateProgram(900)
|
|
End Sub
|
|
|
|
End Class
|