OmagCUT :

- modifiche al lancio dialoghi Modif. Inizio/Fine per WaterJet in SplitPage.
This commit is contained in:
Dario Sassi
2019-10-25 19:38:25 +00:00
parent a7e6956a8a
commit 1be248eac8
2 changed files with 112 additions and 144 deletions
+2 -2
View File
@@ -95,14 +95,14 @@ Public Class ModifStartEndWD
End Sub
Friend Function SetElongation(dVal As Double) As Boolean
m_sElongation = DoubleToString(dVal, 3)
m_sElongation = LenToString(dVal, 3)
ElongationTxBx.Text = m_sElongation
Return True
End Function
Friend Function GetElongation() As Double
Dim dVal As Double = 0
StringToDouble(m_sElongation, dVal)
StringToLen(m_sElongation, dVal)
Return dVal
End Function
+110 -142
View File
@@ -711,79 +711,65 @@ Public Class SplitPageUC
For Index = m_CurrFirstInd To m_CurrLastInd
Dim nI As Integer = m_ItemList(Index).Ind
Dim nOperId As Integer = m_MachiningList(nI).m_nId
Dim dOrigUsal As Double = 0
EgtGetInfo(nOperId, INFO_MCH_USER_SAL, dOrigUsal)
Dim nMachiningType As Integer
nMachiningType = EgtGetOperationType(nOperId)
If nMachiningType = MCH_MY.WATERJETTING Then
' Dialogo richiesta valore
Dim bIsLeadIn As Boolean = True
Dim ModifStartWnd As New ModifStartEndWD(m_MainWindow, EgtMsg(MSG_SPLITPAGEUC + 33), bIsLeadIn, nOperId) ' Inizio Modif.
Dim x = EgtSetCurrMachining(nOperId)
ModifStartWnd.SetElongation(dOrigUsal)
Dim bLiHole As Boolean
Dim nTangDist As Double
Dim nPerpDist As Double
Dim LeadInType As Integer
EgtGetMachiningParam(MCH_MP.LIHOLE, bLiHole)
EgtGetMachiningParam(MCH_MP.LITANG, nTangDist)
EgtGetMachiningParam(MCH_MP.LIPERP, nPerpDist)
EgtGetMachiningParam(MCH_MP.LEADINTYPE, LeadInType)
ModifStartWnd.SetHole(bLiHole)
ModifStartWnd.SetLiTangDist(nTangDist)
ModifStartWnd.SetLiPerpDist(nPerpDist)
ModifStartWnd.SetLeadInType(LeadInType)
If ModifStartWnd.ShowDialog() Then
' Modifica della lavorazione
Dim dUsal As Double = ModifStartWnd.GetElongation()
Dim f = EgtSetCurrMachining(nOperId)
Dim dAddLen As Double = 0
EgtGetMachiningParam(MCH_MP.STARTADDLEN, dAddLen)
If dAddLen - dOrigUsal < -10 * EPS_SMALL Then
Return
End If
EgtSetMachiningParam(MCH_MP.STARTADDLEN, dAddLen + dUsal - dOrigUsal)
Dim y = EgtSetMachiningParam(MCH_MP.LIHOLE, ModifStartWnd.GetHole())
Dim z = EgtSetMachiningParam(MCH_MP.LITANG, ModifStartWnd.GetLiTangDist())
EgtSetMachiningParam(MCH_MP.LIPERP, ModifStartWnd.GetLiPerpDist())
EgtSetMachiningParam(MCH_MP.LEADINTYPE, ModifStartWnd.GetLeadInType().Id)
EgtSetInfo(nOperId, INFO_MCH_USER_SAL, dUsal)
UpdateMachiningPreview(m_MachiningList(nI).m_nId, True)
' verifico interferenza
EgtVerifyMachining(m_MachiningList(nI).m_nId, m_MachiningList(nI).m_nInterf)
ColorMachining(m_MachiningList(nI))
ColorNumber(nI)
bGenModif = True
End If
Else
Dim nMachiningType As Integer = EgtGetOperationType(nOperId)
' Se taglio con lama
If nMachiningType = MCH_MY.SAWING Then
Dim dOrigUsal As Double = 0
EgtGetInfo(nOperId, INFO_MCH_USER_SAL, dOrigUsal)
' Dialogo richiesta valore
Dim ValWnd As New EditValueWD(m_MainWindow, EgtMsg(MSG_SPLITPAGEUC + 35)) ' Allungamento
ValWnd.SetVal(dOrigUsal)
If ValWnd.ShowDialog() Then
' Modifica della lavorazione
Dim dUsal As Double = ValWnd.GetVal()
EgtSetCurrMachining(nOperId)
Dim dAddLen As Double = 0
EgtGetMachiningParam(MCH_MP.STARTADDLEN, dAddLen)
If dAddLen - dOrigUsal < -10 * EPS_SMALL Then
Return
End If
EgtSetMachiningParam(MCH_MP.STARTADDLEN, dAddLen + dUsal - dOrigUsal)
EgtSetInfo(nOperId, INFO_MCH_USER_SAL, dUsal)
UpdateMachiningPreview(m_MachiningList(nI).m_nId, True)
' verifico interferenza
EgtVerifyMachining(m_MachiningList(nI).m_nId, m_MachiningList(nI).m_nInterf)
ColorMachining(m_MachiningList(nI))
ColorNumber(nI)
bGenModif = True
End If
If Not ValWnd.ShowDialog() Then Return
' Modifica della lavorazione
Dim dUsal As Double = ValWnd.GetVal()
EgtSetCurrMachining(nOperId)
Dim dAddLen As Double = 0
EgtGetMachiningParam(MCH_MP.STARTADDLEN, dAddLen)
If dAddLen - dOrigUsal < -10 * EPS_SMALL Then Return
EgtSetMachiningParam(MCH_MP.STARTADDLEN, dAddLen + dUsal - dOrigUsal)
EgtSetInfo(nOperId, INFO_MCH_USER_SAL, dUsal)
UpdateMachiningPreview(m_MachiningList(nI).m_nId, True)
' verifico interferenza
EgtVerifyMachining(m_MachiningList(nI).m_nId, m_MachiningList(nI).m_nInterf)
ColorMachining(m_MachiningList(nI))
ColorNumber(nI)
bGenModif = True
' se altrimenti getto d'acqua
ElseIf nMachiningType = MCH_MY.WATERJETTING Then
' Recupero i valori attuali della lavorazione
Dim bIsLeadIn As Boolean = True
Dim dAddLen As Double = 0
Dim bLiHole As Boolean = true
Dim nTangDist As Double = 0
Dim nPerpDist As Double = 0
Dim LeadInType As Integer = 0
EgtSetCurrMachining( nOperId)
EgtGetMachiningParam( MCH_MP.STARTADDLEN, dAddLen)
EgtGetMachiningParam( MCH_MP.LIHOLE, bLiHole)
EgtGetMachiningParam( MCH_MP.LITANG, nTangDist)
EgtGetMachiningParam( MCH_MP.LIPERP, nPerpDist)
EgtGetMachiningParam( MCH_MP.LEADINTYPE, LeadInType)
' Dialogo richiesta valori
Dim ModifStartWnd As New ModifStartEndWD( m_MainWindow, EgtMsg(MSG_SPLITPAGEUC + 33), bIsLeadIn, nOperId) ' Inizio Modif.
ModifStartWnd.SetElongation( dAddLen)
ModifStartWnd.SetHole( bLiHole)
ModifStartWnd.SetLeadInType( LeadInType)
ModifStartWnd.SetLiTangDist( nTangDist)
ModifStartWnd.SetLiPerpDist( nPerpDist)
If Not ModifStartWnd.ShowDialog() Then return
' Modifica della lavorazione
EgtSetCurrMachining( nOperId)
EgtSetMachiningParam( MCH_MP.LIHOLE, ModifStartWnd.GetHole())
EgtSetMachiningParam( MCH_MP.STARTADDLEN, ModifStartWnd.GetElongation())
EgtSetMachiningParam( MCH_MP.LEADINTYPE, ModifStartWnd.GetLeadInType().Id)
EgtSetMachiningParam( MCH_MP.LITANG, ModifStartWnd.GetLiTangDist())
EgtSetMachiningParam( MCH_MP.LIPERP, ModifStartWnd.GetLiPerpDist())
UpdateMachiningPreview( m_MachiningList(nI).m_nId, True)
' verifico interferenza
EgtVerifyMachining( m_MachiningList(nI).m_nId, m_MachiningList(nI).m_nInterf)
ColorMachining( m_MachiningList(nI))
ColorNumber( nI)
bGenModif = True
End If
Next
' Se modificato qualcosa
@@ -798,80 +784,62 @@ Public Class SplitPageUC
If m_CurrFirstInd = -1 Then Return
Dim bGenModif As Boolean = False
For Index = m_CurrFirstInd To m_CurrLastInd
Dim nI As Integer = m_ItemList(Index).Ind
Dim nOperId As Integer = m_MachiningList(nI).m_nId
Dim dOrigUeal As Double = 0
EgtGetInfo(nOperId, INFO_MCH_USER_EAL, dOrigUeal)
Dim nMachiningType As Integer
nMachiningType = EgtGetOperationType(nOperId)
If nMachiningType = MCH_MY.WATERJETTING Then
Dim nI As Integer = m_ItemList( Index).Ind
Dim nOperId As Integer = m_MachiningList( nI).m_nId
Dim nMachiningType As Integer = EgtGetOperationType( nOperId)
' Se taglio con lama
If nMachiningType = MCH_MY.SAWING Then
Dim dOrigUeal As Double = 0
EgtGetInfo(nOperId, INFO_MCH_USER_EAL, dOrigUeal)
' Dialogo richiesta valore
Dim bIsLeadIn As Boolean = False
Dim ModifStartWnd As New ModifStartEndWD(m_MainWindow, EgtMsg(MSG_SPLITPAGEUC + 34), bIsLeadIn, nOperId) ' Fine Modif.
Dim x = EgtSetCurrMachining(nOperId)
ModifStartWnd.SetElongation(dOrigUeal)
Dim nTangDist As Double
Dim nPerpDist As Double
Dim LeadOutType As Integer
EgtGetMachiningParam(MCH_MP.LOTANG, nTangDist)
EgtGetMachiningParam(MCH_MP.LOPERP, nPerpDist)
EgtGetMachiningParam(MCH_MP.LEADOUTTYPE, LeadOutType)
ModifStartWnd.SetLoTangDist(nTangDist)
ModifStartWnd.SetLoPerpDist(nPerpDist)
ModifStartWnd.SetLeadOutType(LeadOutType)
If ModifStartWnd.ShowDialog() Then
' Modifica della lavorazione
Dim dUsal As Double = ModifStartWnd.GetElongation()
EgtSetCurrMachining(nOperId)
Dim dAddLen As Double = 0
EgtGetMachiningParam(MCH_MP.STARTADDLEN, dAddLen)
If dAddLen - dOrigUeal < -10 * EPS_SMALL Then
Return
End If
EgtSetMachiningParam(MCH_MP.STARTADDLEN, dAddLen + dUsal - dOrigUeal)
Dim z = EgtSetMachiningParam(MCH_MP.LOTANG, ModifStartWnd.GetLoTangDist())
EgtSetMachiningParam(MCH_MP.LOPERP, ModifStartWnd.GetLoPerpDist())
EgtSetMachiningParam(MCH_MP.LEADOUTTYPE, ModifStartWnd.GetLeadOutType().Id)
EgtSetInfo(nOperId, INFO_MCH_USER_SAL, dUsal)
UpdateMachiningPreview(m_MachiningList(nI).m_nId, True)
' verifico interferenza
EgtVerifyMachining(m_MachiningList(nI).m_nId, m_MachiningList(nI).m_nInterf)
ColorMachining(m_MachiningList(nI))
ColorNumber(nI)
bGenModif = True
End If
Else
' Dialogo richiesta valore
Dim ValWnd As New EditValueWD(m_MainWindow, EgtMsg(MSG_SPLITPAGEUC + 35)) ' Allungamento
Dim ValWnd As New EditValueWD( m_MainWindow, EgtMsg(MSG_SPLITPAGEUC + 35)) ' Allungamento
ValWnd.SetVal(dOrigUeal)
If ValWnd.ShowDialog() Then
' Modifica della lavorazione
Dim dUeal As Double = ValWnd.GetVal()
EgtSetCurrMachining(nOperId)
Dim dAddLen As Double = 0
EgtGetMachiningParam(MCH_MP.ENDADDLEN, dAddLen)
If dAddLen - dOrigUeal < -10 * EPS_SMALL Then
Return
End If
EgtSetMachiningParam(MCH_MP.ENDADDLEN, dAddLen + dUeal - dOrigUeal)
EgtSetInfo(nOperId, INFO_MCH_USER_EAL, dUeal)
UpdateMachiningPreview(m_MachiningList(nI).m_nId, True)
' verifico interferenza
EgtVerifyMachining(m_MachiningList(nI).m_nId, m_MachiningList(nI).m_nInterf)
ColorMachining(m_MachiningList(nI))
ColorNumber(nI)
bGenModif = True
End If
If Not ValWnd.ShowDialog() Then Return
' Modifica della lavorazione
Dim dUeal As Double = ValWnd.GetVal()
EgtSetCurrMachining( nOperId)
Dim dAddLen As Double = 0
EgtGetMachiningParam( MCH_MP.ENDADDLEN, dAddLen)
If dAddLen - dOrigUeal < -10 * EPS_SMALL Then Return
EgtSetMachiningParam( MCH_MP.ENDADDLEN, dAddLen + dUeal - dOrigUeal)
EgtSetInfo( nOperId, INFO_MCH_USER_EAL, dUeal)
UpdateMachiningPreview( m_MachiningList(nI).m_nId, True)
' verifico interferenza
EgtVerifyMachining( m_MachiningList(nI).m_nId, m_MachiningList(nI).m_nInterf)
ColorMachining( m_MachiningList(nI))
ColorNumber( nI)
bGenModif = True
' se altrimenti getto d'acqua
ElseIf nMachiningType = MCH_MY.WATERJETTING Then
' Recupero i valori attuali della lavorazione
Dim dAddLen As Double = 0
Dim LeadOutType As Integer = 0
Dim nTangDist As Double = 0
Dim nPerpDist As Double = 0
EgtSetCurrMachining(nOperId)
EgtGetMachiningParam( MCH_MP.ENDADDLEN, dAddLen)
EgtGetMachiningParam( MCH_MP.LEADOUTTYPE, LeadOutType)
EgtGetMachiningParam( MCH_MP.LOTANG, nTangDist)
EgtGetMachiningParam( MCH_MP.LOPERP, nPerpDist)
' Dialogo richiesta valore
Dim ModifStartWnd As New ModifStartEndWD( m_MainWindow, EgtMsg(MSG_SPLITPAGEUC + 34), False, nOperId) ' Fine Modif.
ModifStartWnd.SetElongation( dAddLen)
ModifStartWnd.SetLeadOutType( LeadOutType)
ModifStartWnd.SetLoTangDist( nTangDist)
ModifStartWnd.SetLoPerpDist( nPerpDist)
If Not ModifStartWnd.ShowDialog() Then Return
' Modifica della lavorazione
EgtSetCurrMachining(nOperId)
EgtSetMachiningParam( MCH_MP.ENDADDLEN, ModifStartWnd.GetElongation())
EgtSetMachiningParam( MCH_MP.LEADOUTTYPE, ModifStartWnd.GetLeadOutType().Id)
EgtSetMachiningParam( MCH_MP.LOTANG, ModifStartWnd.GetLoTangDist())
EgtSetMachiningParam( MCH_MP.LOPERP, ModifStartWnd.GetLoPerpDist())
UpdateMachiningPreview(m_MachiningList(nI).m_nId, True)
' verifico interferenza
EgtVerifyMachining( m_MachiningList(nI).m_nId, m_MachiningList(nI).m_nInterf)
ColorMachining( m_MachiningList(nI))
ColorNumber( nI)
bGenModif = True
End If
Next
' Se modificato qualcosa