OmagCUT :
- migliorata gestione errori in tastatura lama.
This commit is contained in:
+2
-3
@@ -356,9 +356,8 @@
|
||||
</Border>
|
||||
|
||||
<UniformGrid Columns="4" Grid.Row="7">
|
||||
|
||||
<Button Name="SawProbingBtn"
|
||||
Style="{StaticResource OmagCut_YellowGradientYellowIconButton}">
|
||||
<Button x:Name="SawProbingBtn"
|
||||
Style="{StaticResource OmagCut_YellowGradientYellowIconButton}">
|
||||
<Image Source="Resources/SawProbe.png" Style="{StaticResource OmagCut_ScaleButtonIcon}"/>
|
||||
</Button>
|
||||
|
||||
|
||||
+31
-11
@@ -614,8 +614,17 @@ Public Class AlarmsPageUC
|
||||
' Leggo variabili
|
||||
Dim CmdString As String = String.Empty
|
||||
EgtLuaGetGlobStringVar("CMD.CMDSTRING", CmdString)
|
||||
Dim nErr As Integer = 0
|
||||
EgtLuaGetGlobIntVar("CMD.ERR", nErr)
|
||||
' Reset lua
|
||||
EgtLuaResetGlobVar("CMD")
|
||||
' Verifico condizioni di errore
|
||||
If nErr <> 0 Or String.IsNullOrWhiteSpace(CmdString) Then
|
||||
' Errore in tastatura lama
|
||||
Dim MsgBoxError As New EgtMsgBox(m_MainWindow, "", EgtMsg(MSG_DIRECTCUTPAGEUC + 44), EgtMsgBox.Buttons.OK, EgtMsgBox.Icons.NULL)
|
||||
EgtOutLog("ToolProbing Command error")
|
||||
Return
|
||||
End If
|
||||
' Modifico stringa per inserire i newline
|
||||
CmdString = CmdString.Replace("<br/>", Environment.NewLine)
|
||||
' Creo file...
|
||||
@@ -625,11 +634,18 @@ Public Class AlarmsPageUC
|
||||
Writer.Write(CmdString)
|
||||
Writer.Close()
|
||||
' Verifico se sono connesso alla macchina prima di continuare
|
||||
If Not m_MainWindow.m_bNCLink Then Return
|
||||
If Not m_MainWindow.m_bNCLink Then
|
||||
EgtOutLog("ToolProbing NcLink error")
|
||||
Return
|
||||
End If
|
||||
' Mando file al CN
|
||||
If Not m_MainWindow.m_CNCommunication.SendProgram(FilePath, 900) Then Return
|
||||
If Not m_MainWindow.m_CNCommunication.SendProgram(FilePath, 900) Then
|
||||
' Errore in tastatura lama
|
||||
Dim MsgBoxError As New EgtMsgBox(m_MainWindow, "", EgtMsg(MSG_DIRECTCUTPAGEUC + 44), EgtMsgBox.Buttons.OK, EgtMsgBox.Icons.NULL)
|
||||
EgtOutLog("ToolProbing Send error")
|
||||
Return
|
||||
End If
|
||||
m_MainWindow.m_CurrentProjectPageUC.ClearMessage()
|
||||
EgtOutLog("ToolProbing : sent NC program")
|
||||
' Aspetto e lo avvio
|
||||
System.Threading.Thread.Sleep(300)
|
||||
m_MainWindow.m_CNCommunication.m_CN.DGeneralFunctions_CycleStart()
|
||||
@@ -666,8 +682,13 @@ Public Class AlarmsPageUC
|
||||
UpdateUI()
|
||||
' Verifico se interrotto dall'utente
|
||||
If MsgBoxStateInfo.m_nPressedBtn = 0 Then
|
||||
bProbingOk = False
|
||||
Exit For
|
||||
MsgBoxStateInfo.Close()
|
||||
UpdateUI()
|
||||
System.Threading.Thread.Sleep(100)
|
||||
EgtOutLog("ToolProbing canceled by user")
|
||||
' Tastatura interrotta dall'utente
|
||||
Dim MsgBoxError As New EgtMsgBox(m_MainWindow, "", EgtMsg(MSG_DIRECTCUTPAGEUC + 46), EgtMsgBox.Buttons.OK, EgtMsgBox.Icons.NULL)
|
||||
Return
|
||||
End If
|
||||
Next
|
||||
' Se tastatura riuscita
|
||||
@@ -722,13 +743,12 @@ Public Class AlarmsPageUC
|
||||
End If
|
||||
' Se tastatura non riuscita
|
||||
If Not bProbingOk Then
|
||||
MsgBoxStateInfo.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 44) ' Errore in tastatura lama
|
||||
m_MainWindow.m_CurrentProjectPageUC.SetErrorMessage(EgtMsg(MSG_DIRECTCUTPAGEUC + 44))
|
||||
EgtOutLog("ToolProbing error")
|
||||
' Costringo ad aggiornare UI
|
||||
UpdateUI()
|
||||
System.Threading.Thread.Sleep(3000)
|
||||
MsgBoxStateInfo.Close()
|
||||
UpdateUI()
|
||||
System.Threading.Thread.Sleep(100)
|
||||
EgtOutLog("ToolProbing error")
|
||||
' Errore in tastatura lama
|
||||
Dim MsgBoxError As New EgtMsgBox(m_MainWindow, "", EgtMsg(MSG_DIRECTCUTPAGEUC + 44), EgtMsgBox.Buttons.OK, EgtMsgBox.Icons.NULL)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
Reference in New Issue
Block a user