diff --git a/EgtInterface.vb b/EgtInterface.vb index 65bd429..7f08b24 100644 --- a/EgtInterface.vb +++ b/EgtInterface.vb @@ -851,6 +851,22 @@ Public Function EgtSetProcessEvents(ByVal Callback As ProcessEventsCallback) As End If End Function +Public Delegate Function OutTextCallback(ByRef psText As IntPtr) As Boolean + + +Private Function EgtSetOutText_32(ByVal Callback As OutTextCallback) As Boolean +End Function + +Private Function EgtSetOutText_64(ByVal Callback As OutTextCallback) As Boolean +End Function +Public Function EgtSetOutText(ByVal Callback As OutTextCallback) As Boolean + If IntPtr.Size = 4 Then + Return EgtSetOutText_32(Callback) + Else + Return EgtSetOutText_64(Callback) + End If +End Function + '---------- UiUnits ------------------------------------------------------------ Private Function EgtSetUiUnits_32(ByVal bMM As Boolean) As Boolean @@ -7664,14 +7680,24 @@ Public Enum MCH_TP As Integer TCPOS = 32773 UUID = 32774 End Enum -'Costanti : tipi di lavorazioni +'Costanti : operazione di disposizione +Public Enum MCH_OY As Integer + NONE = 0 + DISP = 256 + DRILLING = 512 + SAWING = 1024 + MILLING = 2048 + POCKETING = 4096 + MORTISING = 8192 +End Enum +'Costanti : tipi di lavorazioni (altre operazioni) Public Enum MCH_MY As Integer NONE = 0 - DRILLING = 256 - SAWING = 512 - MILLING = 1024 - POCKETING = 2048 - MORTISING = 4096 + DRILLING = MCH_OY.DRILLING + SAWING = MCH_OY.SAWING + MILLING = MCH_OY.MILLING + POCKETING = MCH_OY.POCKETING + MORTISING = MCH_OY.MORTISING End Enum 'Costanti : parametri delle lavorazioni Public Enum MCH_MP As Integer diff --git a/Form1.vb b/Form1.vb index 1e1da3d..7fd2ff5 100644 --- a/Form1.vb +++ b/Form1.vb @@ -42,6 +42,7 @@ Public Class Form1 Private m_MruScripts As New MruList Private m_bStopExec As Boolean = False Private m_ProcEventsCallback As New ProcessEventsCallback(AddressOf ProcessEvents) + Private m_OutTextCallback As New OutTextCallback(AddressOf OutText) Public Function GetInstance() As Integer @@ -267,6 +268,8 @@ Public Class Form1 SetMessages() ' Installo funzione gestione eventi per lua EgtSetProcessEvents(m_ProcEventsCallback) + ' Installo funzione output testo su status per lua + EgtSetOutText(m_OutTextCallback) End Sub Private Sub LoadGridData() @@ -800,6 +803,10 @@ Public Class Form1 End If End Function + Public Function OutText(ByRef psText As IntPtr) As Boolean + EmitStripStatusOutput(Marshal.PtrToStringUni(psText)) + Return True + End Function '-------------------------------- Top Commands --------------------------------------------------- ' ------ File ------- diff --git a/My Project/AssemblyInfo.vb b/My Project/AssemblyInfo.vb index 4bba9d4..e5c9164 100644 --- a/My Project/AssemblyInfo.vb +++ b/My Project/AssemblyInfo.vb @@ -46,5 +46,5 @@ Imports System.Runtime.InteropServices ' utilizzando l'asterisco (*) come descritto di seguito: ' - - + +