|
|
|
@@ -42,6 +42,17 @@ Public Class SplitModeVM
|
|
|
|
|
End Get
|
|
|
|
|
End Property
|
|
|
|
|
|
|
|
|
|
Private m_bEnabledCommandMove As Boolean = False
|
|
|
|
|
Public Property bEnabledCommandMove As Boolean
|
|
|
|
|
Get
|
|
|
|
|
Return m_bEnabledCommandMove
|
|
|
|
|
End Get
|
|
|
|
|
Set(value As Boolean)
|
|
|
|
|
m_bEnabledCommandMove = value
|
|
|
|
|
NotifyPropertyChanged("bEnabledCommandMove")
|
|
|
|
|
End Set
|
|
|
|
|
End Property
|
|
|
|
|
|
|
|
|
|
Private m_SplitModeIsEnabled As Boolean
|
|
|
|
|
Public Property SplitModeIsEnabled As Boolean
|
|
|
|
|
Get
|
|
|
|
@@ -1054,16 +1065,21 @@ Public Class SplitModeVM
|
|
|
|
|
Public Sub OnOff(ByVal param As Object)
|
|
|
|
|
If m_CurrFirstInd = -1 Then Return
|
|
|
|
|
For Index = m_CurrFirstInd To m_CurrLastInd
|
|
|
|
|
Dim nI As Integer = m_ItemList(Index).Ind
|
|
|
|
|
If m_MachiningList(nI).m_bEnabled Then
|
|
|
|
|
m_MachiningList(nI).m_bEnabled = False
|
|
|
|
|
m_ItemList(Index).bIsActive = False
|
|
|
|
|
Else
|
|
|
|
|
m_MachiningList(nI).m_bEnabled = True
|
|
|
|
|
m_ItemList(Index).bIsActive = True
|
|
|
|
|
If m_ItemList(Index).IsSelected Then
|
|
|
|
|
If Not m_ItemList(Index).IsSelected Then
|
|
|
|
|
Continue For
|
|
|
|
|
End If
|
|
|
|
|
Dim nI As Integer = m_ItemList(Index).Ind
|
|
|
|
|
If m_MachiningList(nI).m_bEnabled Then
|
|
|
|
|
m_MachiningList(nI).m_bEnabled = False
|
|
|
|
|
m_ItemList(Index).bIsActive = False
|
|
|
|
|
Else
|
|
|
|
|
m_MachiningList(nI).m_bEnabled = True
|
|
|
|
|
m_ItemList(Index).bIsActive = True
|
|
|
|
|
End If
|
|
|
|
|
ColorMachining(m_MachiningList(nI))
|
|
|
|
|
ColorNumberArrow(nI)
|
|
|
|
|
End If
|
|
|
|
|
ColorMachining(m_MachiningList(nI))
|
|
|
|
|
ColorNumberArrow(nI)
|
|
|
|
|
Next
|
|
|
|
|
EgtDraw()
|
|
|
|
|
' Imposto flag di modifica
|
|
|
|
@@ -1156,6 +1172,9 @@ Public Class SplitModeVM
|
|
|
|
|
If m_CurrFirstInd = -1 Then Return
|
|
|
|
|
Dim bGenModif As Boolean = False
|
|
|
|
|
For Index = m_CurrFirstInd To m_CurrLastInd
|
|
|
|
|
If Not m_ItemList(Index).IsSelected Then
|
|
|
|
|
Continue For
|
|
|
|
|
End If
|
|
|
|
|
Dim nI As Integer = m_ItemList(Index).Ind
|
|
|
|
|
' Provo ad entrambi gli estremi
|
|
|
|
|
Dim bModif As Boolean = AdjustBothCuts(nI)
|
|
|
|
@@ -1190,6 +1209,9 @@ Public Class SplitModeVM
|
|
|
|
|
If m_CurrFirstInd = -1 Then Return
|
|
|
|
|
Dim bGenModif As Boolean = False
|
|
|
|
|
For Index = m_CurrFirstInd To m_CurrLastInd
|
|
|
|
|
If Not m_ItemList(Index).IsSelected Then
|
|
|
|
|
Continue For
|
|
|
|
|
End If
|
|
|
|
|
Dim nI As Integer = m_ItemList(Index).Ind
|
|
|
|
|
' Eseguo
|
|
|
|
|
If AdjustStartCut(nI) Then
|
|
|
|
@@ -1218,6 +1240,9 @@ Public Class SplitModeVM
|
|
|
|
|
If m_CurrFirstInd = -1 Then Return
|
|
|
|
|
Dim bGenModif As Boolean = False
|
|
|
|
|
For Index = m_CurrFirstInd To m_CurrLastInd
|
|
|
|
|
If Not m_ItemList(Index).IsSelected Then
|
|
|
|
|
Continue For
|
|
|
|
|
End If
|
|
|
|
|
Dim nI As Integer = m_ItemList(Index).Ind
|
|
|
|
|
' Eseguo
|
|
|
|
|
If AdjustEndCut(nI) Then
|
|
|
|
@@ -1359,6 +1384,9 @@ Public Class SplitModeVM
|
|
|
|
|
If m_CurrFirstInd = -1 Then Return
|
|
|
|
|
Dim bGenModif As Boolean = False
|
|
|
|
|
For Index = m_CurrFirstInd To m_CurrLastInd
|
|
|
|
|
If Not m_ItemList(Index).IsSelected Then
|
|
|
|
|
Continue For
|
|
|
|
|
End If
|
|
|
|
|
Dim nI As Integer = m_ItemList(Index).Ind
|
|
|
|
|
If m_MachiningList(nI).m_sLay = NAME_OUTLOOP Then
|
|
|
|
|
EgtSetCurrMachining(m_MachiningList(nI).m_nId)
|
|
|
|
@@ -1496,6 +1524,9 @@ Public Class SplitModeVM
|
|
|
|
|
If m_CurrFirstInd = -1 Then Return
|
|
|
|
|
Dim bGenModif As Boolean = False
|
|
|
|
|
For Index = m_CurrFirstInd To m_CurrLastInd
|
|
|
|
|
If Not m_ItemList(Index).IsSelected Then
|
|
|
|
|
Continue For
|
|
|
|
|
End If
|
|
|
|
|
Dim nI As Integer = m_ItemList(Index).Ind
|
|
|
|
|
If m_MachiningList(nI).m_sLay = NAME_OUTLOOP Then
|
|
|
|
|
EgtSetCurrMachining(m_MachiningList(nI).m_nId)
|
|
|
|
@@ -1698,10 +1729,24 @@ Public Class SplitModeVM
|
|
|
|
|
End Property
|
|
|
|
|
|
|
|
|
|
Public Sub ModifStart(ByVal param As Object)
|
|
|
|
|
Dim bFirstInd As Boolean = True
|
|
|
|
|
Dim bFirstMill As Boolean = True
|
|
|
|
|
Dim bFirstWJ As Boolean = True
|
|
|
|
|
' elenco delle variabili : MCH_MY.SAWING/MCH_MY.MILLING
|
|
|
|
|
Dim dUsal As Double = 0
|
|
|
|
|
' elenco delle variabili : MCH_MY.WATERJETTING
|
|
|
|
|
Dim dWJAddLen As Double = 0
|
|
|
|
|
Dim bWJLiHole As Boolean = True
|
|
|
|
|
Dim nWJTangDist As Double = 0
|
|
|
|
|
Dim nWJPerpDist As Double = 0
|
|
|
|
|
Dim nWJLeadInType As Integer = 0
|
|
|
|
|
' Recupero la lavorazione corrente
|
|
|
|
|
If m_CurrFirstInd = -1 Then Return
|
|
|
|
|
Dim bGenModif As Boolean = False
|
|
|
|
|
For Index = m_CurrFirstInd To m_CurrLastInd
|
|
|
|
|
If Not m_ItemList(Index).IsSelected Then
|
|
|
|
|
Continue For
|
|
|
|
|
End If
|
|
|
|
|
Dim nI As Integer = m_ItemList(Index).Ind
|
|
|
|
|
Dim nOperId As Integer = m_MachiningList(nI).m_nId
|
|
|
|
|
Dim nMachiningType As Integer = EgtGetOperationType(nOperId)
|
|
|
|
@@ -1710,14 +1755,19 @@ Public Class SplitModeVM
|
|
|
|
|
Dim dOrigUsal As Double = 0
|
|
|
|
|
EgtGetInfo(nOperId, INFO_MCH_USER_SAL, dOrigUsal)
|
|
|
|
|
' Dialogo richiesta valore
|
|
|
|
|
Dim ModifStartWindow As New ModifStartEndCutWindowV
|
|
|
|
|
Dim ModifStartWindowVM As New ModifStartEndCutWindowVM
|
|
|
|
|
ModifStartWindow.DataContext = ModifStartWindowVM
|
|
|
|
|
ModifStartWindow.Owner = Application.Current.MainWindow
|
|
|
|
|
ModifStartWindowVM.SetVal(dOrigUsal)
|
|
|
|
|
If Not ModifStartWindow.ShowDialog() Then Return
|
|
|
|
|
' Modifica della lavorazione
|
|
|
|
|
Dim dUsal As Double = ModifStartWindowVM.GetVal()
|
|
|
|
|
If bFirstInd Then
|
|
|
|
|
Dim ModifStartWindow As New ModifStartEndCutWindowV
|
|
|
|
|
Dim ModifStartWindowVM As New ModifStartEndCutWindowVM
|
|
|
|
|
ModifStartWindowVM.Title = "Sawing"
|
|
|
|
|
ModifStartWindow.DataContext = ModifStartWindowVM
|
|
|
|
|
ModifStartWindow.Owner = Application.Current.MainWindow
|
|
|
|
|
ModifStartWindowVM.SetVal(dOrigUsal)
|
|
|
|
|
If Not ModifStartWindow.ShowDialog() Then Return
|
|
|
|
|
' Modifica della lavorazione
|
|
|
|
|
dUsal = ModifStartWindowVM.GetVal()
|
|
|
|
|
bFirstInd = False
|
|
|
|
|
End If
|
|
|
|
|
|
|
|
|
|
Dim bRepeat As Boolean = False
|
|
|
|
|
Do
|
|
|
|
|
EgtSetCurrMachining(nOperId)
|
|
|
|
@@ -1739,41 +1789,81 @@ Public Class SplitModeVM
|
|
|
|
|
ColorMachining(m_MachiningList(nI))
|
|
|
|
|
ColorNumberArrow(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 bLiHole As Boolean = True
|
|
|
|
|
Dim nTangDist As Double = 0
|
|
|
|
|
Dim nPerpDist As Double = 0
|
|
|
|
|
Dim LeadInTypeId 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, LeadInTypeId)
|
|
|
|
|
' Dialogo richiesta valori
|
|
|
|
|
Dim ModifStartWnd As New ModifStartEndWjWindowV
|
|
|
|
|
Dim ModifStartWndVM As New ModifStartEndWjWindowVM
|
|
|
|
|
ModifStartWnd.DataContext = ModifStartWndVM
|
|
|
|
|
ModifStartWnd.Owner = Application.Current.MainWindow
|
|
|
|
|
ModifStartWndVM.HoleVisibility = Visibility.Visible
|
|
|
|
|
ModifStartWndVM.LeadInVisibility = Visibility.Visible
|
|
|
|
|
ModifStartWndVM.LeadOutVisibility = Visibility.Hidden
|
|
|
|
|
ModifStartWndVM.SetVal(dAddLen)
|
|
|
|
|
ModifStartWndVM.SetHole(bLiHole)
|
|
|
|
|
ModifStartWndVM.SetLeadInType(LeadInTypeId)
|
|
|
|
|
ModifStartWndVM.SetLiTangDist(nTangDist)
|
|
|
|
|
ModifStartWndVM.SetLiPerpDist(nPerpDist)
|
|
|
|
|
If Not ModifStartWnd.ShowDialog() Then Return
|
|
|
|
|
|
|
|
|
|
ElseIf nMachiningType = MCH_MY.MILLING Then ' And m_MachiningList(nI).m_sLay = NAME_ONPATH
|
|
|
|
|
|
|
|
|
|
' leggo il valore salvato nella geometria
|
|
|
|
|
Dim dOrigUsal As Double = 0
|
|
|
|
|
EgtGetInfo(nOperId, INFO_MCH_USER_SAL, dOrigUsal)
|
|
|
|
|
' Dialogo richiesta valore
|
|
|
|
|
If bFirstMill Then
|
|
|
|
|
Dim ModifStartWindow As New ModifStartEndCutWindowV
|
|
|
|
|
Dim ModifStartWindowVM As New ModifStartEndCutWindowVM
|
|
|
|
|
ModifStartWindowVM.Title = "Milling"
|
|
|
|
|
ModifStartWindow.DataContext = ModifStartWindowVM
|
|
|
|
|
ModifStartWindow.Owner = Application.Current.MainWindow
|
|
|
|
|
ModifStartWindowVM.SetVal(dOrigUsal)
|
|
|
|
|
If Not ModifStartWindow.ShowDialog() Then Return
|
|
|
|
|
' Modifica della lavorazione
|
|
|
|
|
dUsal = ModifStartWindowVM.GetVal()
|
|
|
|
|
bFirstMill = False
|
|
|
|
|
End If
|
|
|
|
|
' Modifica della lavorazione
|
|
|
|
|
EgtSetCurrMachining(nOperId)
|
|
|
|
|
EgtSetMachiningParam(MCH_MP.LIHOLE, ModifStartWndVM.GetHole())
|
|
|
|
|
EgtSetMachiningParam(MCH_MP.STARTADDLEN, ModifStartWndVM.GetVal())
|
|
|
|
|
EgtSetMachiningParam(MCH_MP.LEADINTYPE, ModifStartWndVM.GetLeadInType().Id)
|
|
|
|
|
EgtSetMachiningParam(MCH_MP.LITANG, ModifStartWndVM.GetLiTangDist())
|
|
|
|
|
EgtSetMachiningParam(MCH_MP.LIPERP, ModifStartWndVM.GetLiPerpDist())
|
|
|
|
|
Dim dAddLen As Double = 0
|
|
|
|
|
EgtGetMachiningParam(MCH_MP.STARTADDLEN, dAddLen)
|
|
|
|
|
EgtSetMachiningParam(MCH_MP.STARTADDLEN, dAddLen + dUsal - dOrigUsal)
|
|
|
|
|
EgtSetInfo(nOperId, INFO_MCH_USER_SAL, dUsal)
|
|
|
|
|
UpdateMachiningPreview(m_MachiningList(nI).m_nId, True)
|
|
|
|
|
bGenModif = True
|
|
|
|
|
|
|
|
|
|
' se altrimenti getto d'acqua
|
|
|
|
|
ElseIf nMachiningType = MCH_MY.WATERJETTING Then
|
|
|
|
|
' Recupero i valori attuali della lavorazione
|
|
|
|
|
If bFirstWJ Then
|
|
|
|
|
Dim bOriginalIsLeadIn As Boolean = True
|
|
|
|
|
Dim dOriginalAddLen As Double = 0
|
|
|
|
|
Dim bOriginalLiHole As Boolean = True
|
|
|
|
|
Dim nOriginalTangDist As Double = 0
|
|
|
|
|
Dim nOriginalPerpDist As Double = 0
|
|
|
|
|
Dim nOriginalLeadInType As Integer = 0
|
|
|
|
|
EgtSetCurrMachining(nOperId)
|
|
|
|
|
EgtGetMachiningParam(MCH_MP.STARTADDLEN, dOriginalAddLen)
|
|
|
|
|
EgtGetMachiningParam(MCH_MP.LIHOLE, bOriginalLiHole)
|
|
|
|
|
EgtGetMachiningParam(MCH_MP.LITANG, nOriginalTangDist)
|
|
|
|
|
EgtGetMachiningParam(MCH_MP.LIPERP, nOriginalPerpDist)
|
|
|
|
|
EgtGetMachiningParam(MCH_MP.LEADINTYPE, nOriginalLeadInType)
|
|
|
|
|
' Dialogo richiesta valori
|
|
|
|
|
Dim ModifStartWnd As New ModifStartEndWjWindowV
|
|
|
|
|
Dim ModifStartWndVM As New ModifStartEndWjWindowVM
|
|
|
|
|
ModifStartWndVM.Title = "Water jetting"
|
|
|
|
|
ModifStartWnd.DataContext = ModifStartWndVM
|
|
|
|
|
ModifStartWnd.Owner = Application.Current.MainWindow
|
|
|
|
|
ModifStartWndVM.HoleVisibility = Visibility.Visible
|
|
|
|
|
ModifStartWndVM.LeadInVisibility = Visibility.Visible
|
|
|
|
|
ModifStartWndVM.LeadOutVisibility = Visibility.Hidden
|
|
|
|
|
ModifStartWndVM.SetVal(dOriginalAddLen)
|
|
|
|
|
ModifStartWndVM.SetHole(bOriginalLiHole)
|
|
|
|
|
ModifStartWndVM.SetLeadInType(nOriginalLeadInType)
|
|
|
|
|
ModifStartWndVM.SetLiTangDist(nOriginalTangDist)
|
|
|
|
|
ModifStartWndVM.SetLiPerpDist(nOriginalPerpDist)
|
|
|
|
|
If Not ModifStartWnd.ShowDialog() Then Return
|
|
|
|
|
|
|
|
|
|
dWJAddLen = ModifStartWndVM.GetVal()
|
|
|
|
|
bWJLiHole = ModifStartWndVM.GetHole()
|
|
|
|
|
nWJTangDist = ModifStartWndVM.GetLiTangDist()
|
|
|
|
|
nWJPerpDist = ModifStartWndVM.GetLiPerpDist()
|
|
|
|
|
nWJLeadInType = ModifStartWndVM.GetLeadInType().Id
|
|
|
|
|
bFirstWJ = False
|
|
|
|
|
End If
|
|
|
|
|
|
|
|
|
|
' Modifica della lavorazione
|
|
|
|
|
EgtSetCurrMachining(nOperId)
|
|
|
|
|
EgtSetMachiningParam(MCH_MP.LIHOLE, bWJLiHole)
|
|
|
|
|
EgtSetMachiningParam(MCH_MP.STARTADDLEN, dWJAddLen)
|
|
|
|
|
EgtSetMachiningParam(MCH_MP.LEADINTYPE, nWJLeadInType)
|
|
|
|
|
EgtSetMachiningParam(MCH_MP.LITANG, nWJTangDist)
|
|
|
|
|
EgtSetMachiningParam(MCH_MP.LIPERP, nWJPerpDist)
|
|
|
|
|
UpdateMachiningPreview(m_MachiningList(nI).m_nId, True)
|
|
|
|
|
' verifico interferenza
|
|
|
|
|
EgtVerifyMachining(m_MachiningList(nI).m_nId, m_MachiningList(nI).m_nInterf)
|
|
|
|
@@ -1803,10 +1893,24 @@ Public Class SplitModeVM
|
|
|
|
|
End Property
|
|
|
|
|
|
|
|
|
|
Public Sub ModifEnd(ByVal param As Object)
|
|
|
|
|
Dim bFirstInd As Boolean = True
|
|
|
|
|
Dim bFirstMill As Boolean = True
|
|
|
|
|
Dim bFirstWJ As Boolean = True
|
|
|
|
|
' elenco delle variabili : MCH_MY.SAWING/MCH_MY.MILLING
|
|
|
|
|
Dim dUeal As Double = 0
|
|
|
|
|
' elenco delle variabili : MCH_MY.WATERJETTING
|
|
|
|
|
Dim dWJAddLen As Double = 0
|
|
|
|
|
Dim nWJTangDist As Double = 0
|
|
|
|
|
Dim nWJPerpDist As Double = 0
|
|
|
|
|
Dim nWJLeadInType As Integer = 0
|
|
|
|
|
|
|
|
|
|
' Recupero la lavorazione corrente
|
|
|
|
|
If m_CurrFirstInd = -1 Then Return
|
|
|
|
|
Dim bGenModif As Boolean = False
|
|
|
|
|
For Index = m_CurrFirstInd To m_CurrLastInd
|
|
|
|
|
If Not m_ItemList(Index).IsSelected Then
|
|
|
|
|
Continue For
|
|
|
|
|
End If
|
|
|
|
|
Dim nI As Integer = m_ItemList(Index).Ind
|
|
|
|
|
Dim nOperId As Integer = m_MachiningList(nI).m_nId
|
|
|
|
|
Dim nMachiningType As Integer = EgtGetOperationType(nOperId)
|
|
|
|
@@ -1815,14 +1919,18 @@ Public Class SplitModeVM
|
|
|
|
|
Dim dOrigUeal As Double = 0
|
|
|
|
|
EgtGetInfo(nOperId, INFO_MCH_USER_EAL, dOrigUeal)
|
|
|
|
|
' Dialogo richiesta valore
|
|
|
|
|
Dim ModifStartWindow As New ModifStartEndCutWindowV
|
|
|
|
|
Dim ModifStartWindowVM As New ModifStartEndCutWindowVM
|
|
|
|
|
ModifStartWindow.DataContext = ModifStartWindowVM
|
|
|
|
|
ModifStartWindow.Owner = Application.Current.MainWindow
|
|
|
|
|
ModifStartWindowVM.SetVal(dOrigUeal)
|
|
|
|
|
If Not ModifStartWindow.ShowDialog() Then Return
|
|
|
|
|
' Modifica della lavorazione
|
|
|
|
|
Dim dUeal As Double = ModifStartWindowVM.GetVal()
|
|
|
|
|
If bFirstInd Then
|
|
|
|
|
Dim ModifStartWindow As New ModifStartEndCutWindowV
|
|
|
|
|
Dim ModifStartWindowVM As New ModifStartEndCutWindowVM
|
|
|
|
|
ModifStartWindowVM.Title = "Sawing"
|
|
|
|
|
ModifStartWindow.DataContext = ModifStartWindowVM
|
|
|
|
|
ModifStartWindow.Owner = Application.Current.MainWindow
|
|
|
|
|
ModifStartWindowVM.SetVal(dOrigUeal)
|
|
|
|
|
If Not ModifStartWindow.ShowDialog() Then Return
|
|
|
|
|
' Modifica della lavorazione
|
|
|
|
|
dUeal = ModifStartWindowVM.GetVal()
|
|
|
|
|
bFirstInd = False
|
|
|
|
|
End If
|
|
|
|
|
Dim bRepeat As Boolean = False
|
|
|
|
|
Do
|
|
|
|
|
EgtSetCurrMachining(nOperId)
|
|
|
|
@@ -1846,37 +1954,75 @@ Public Class SplitModeVM
|
|
|
|
|
ColorMachining(m_MachiningList(nI))
|
|
|
|
|
ColorNumberArrow(nI)
|
|
|
|
|
bGenModif = True
|
|
|
|
|
|
|
|
|
|
ElseIf nMachiningType = MCH_MY.MILLING Then ' And m_MachiningList(nI).m_sLay = NAME_ONPATH
|
|
|
|
|
|
|
|
|
|
Dim dOrigUeal As Double = 0
|
|
|
|
|
EgtGetInfo(nOperId, INFO_MCH_USER_EAL, dOrigUeal)
|
|
|
|
|
' ------------------ INIZIO PREPARAZIONE TASTIERINO VIRTUALE ------------------
|
|
|
|
|
If bFirstMill Then
|
|
|
|
|
Dim ModifStartWindow As New ModifStartEndCutWindowV
|
|
|
|
|
Dim ModifStartWindowVM As New ModifStartEndCutWindowVM
|
|
|
|
|
ModifStartWindowVM.Title = "Milling"
|
|
|
|
|
ModifStartWindow.DataContext = ModifStartWindowVM
|
|
|
|
|
ModifStartWindow.Owner = Application.Current.MainWindow
|
|
|
|
|
ModifStartWindowVM.SetVal(dOrigUeal)
|
|
|
|
|
If Not ModifStartWindow.ShowDialog() Then Return
|
|
|
|
|
' Modifica della lavorazione
|
|
|
|
|
dUeal = ModifStartWindowVM.GetVal()
|
|
|
|
|
bFirstMill = False
|
|
|
|
|
End If
|
|
|
|
|
' ------------------ FINE PREPARAZIONE TASTIERINO VIRTUALE ------------------
|
|
|
|
|
' Modifica della lavorazione
|
|
|
|
|
EgtSetCurrMachining(nOperId)
|
|
|
|
|
Dim dAddLen As Double = 0
|
|
|
|
|
EgtGetMachiningParam(MCH_MP.ENDADDLEN, dAddLen)
|
|
|
|
|
EgtSetMachiningParam(MCH_MP.ENDADDLEN, dAddLen + dUeal - dOrigUeal)
|
|
|
|
|
EgtSetInfo(nOperId, INFO_MCH_USER_EAL, dUeal)
|
|
|
|
|
UpdateMachiningPreview(m_MachiningList(nI).m_nId, True)
|
|
|
|
|
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 nTangDist As Double = 0
|
|
|
|
|
Dim nPerpDist As Double = 0
|
|
|
|
|
Dim LeadOutTypeId As Integer = 0
|
|
|
|
|
EgtSetCurrMachining(nOperId)
|
|
|
|
|
EgtGetMachiningParam(MCH_MP.ENDADDLEN, dAddLen)
|
|
|
|
|
EgtGetMachiningParam(MCH_MP.LOTANG, nTangDist)
|
|
|
|
|
EgtGetMachiningParam(MCH_MP.LOPERP, nPerpDist)
|
|
|
|
|
EgtGetMachiningParam(MCH_MP.LEADOUTTYPE, LeadOutTypeId)
|
|
|
|
|
' Dialogo richiesta valori
|
|
|
|
|
Dim ModifStartWnd As New ModifStartEndWjWindowV()
|
|
|
|
|
Dim ModifStartWndVM As New ModifStartEndWjWindowVM
|
|
|
|
|
ModifStartWnd.DataContext = ModifStartWndVM
|
|
|
|
|
ModifStartWnd.Owner = Application.Current.MainWindow
|
|
|
|
|
ModifStartWndVM.HoleVisibility = Visibility.Hidden
|
|
|
|
|
ModifStartWndVM.LeadInVisibility = Visibility.Hidden
|
|
|
|
|
ModifStartWndVM.LeadOutVisibility = Visibility.Visible
|
|
|
|
|
ModifStartWndVM.SetVal(dAddLen)
|
|
|
|
|
ModifStartWndVM.SetLeadOutType(LeadOutTypeId)
|
|
|
|
|
ModifStartWndVM.SetLoTangDist(nTangDist)
|
|
|
|
|
ModifStartWndVM.SetLoPerpDist(nPerpDist)
|
|
|
|
|
If Not ModifStartWnd.ShowDialog() Then Return
|
|
|
|
|
If bFirstWJ Then
|
|
|
|
|
Dim dAddLen As Double = 0
|
|
|
|
|
Dim nTangDist As Double = 0
|
|
|
|
|
Dim nPerpDist As Double = 0
|
|
|
|
|
Dim LeadOutTypeId As Integer = 0
|
|
|
|
|
EgtSetCurrMachining(nOperId)
|
|
|
|
|
EgtGetMachiningParam(MCH_MP.ENDADDLEN, dAddLen)
|
|
|
|
|
EgtGetMachiningParam(MCH_MP.LOTANG, nTangDist)
|
|
|
|
|
EgtGetMachiningParam(MCH_MP.LOPERP, nPerpDist)
|
|
|
|
|
EgtGetMachiningParam(MCH_MP.LEADOUTTYPE, LeadOutTypeId)
|
|
|
|
|
' Dialogo richiesta valori
|
|
|
|
|
Dim ModifStartWnd As New ModifStartEndWjWindowV()
|
|
|
|
|
Dim ModifStartWndVM As New ModifStartEndWjWindowVM
|
|
|
|
|
ModifStartWndVM.Title = "Water jetting"
|
|
|
|
|
ModifStartWnd.DataContext = ModifStartWndVM
|
|
|
|
|
ModifStartWnd.Owner = Application.Current.MainWindow
|
|
|
|
|
ModifStartWndVM.HoleVisibility = Visibility.Hidden
|
|
|
|
|
ModifStartWndVM.LeadInVisibility = Visibility.Hidden
|
|
|
|
|
ModifStartWndVM.LeadOutVisibility = Visibility.Visible
|
|
|
|
|
ModifStartWndVM.SetVal(dAddLen)
|
|
|
|
|
ModifStartWndVM.SetLeadOutType(LeadOutTypeId)
|
|
|
|
|
ModifStartWndVM.SetLoTangDist(nTangDist)
|
|
|
|
|
ModifStartWndVM.SetLoPerpDist(nPerpDist)
|
|
|
|
|
If Not ModifStartWnd.ShowDialog() Then Return
|
|
|
|
|
|
|
|
|
|
dWJAddLen = ModifStartWndVM.GetVal()
|
|
|
|
|
nWJTangDist = ModifStartWndVM.GetLoTangDist()
|
|
|
|
|
nWJPerpDist = ModifStartWndVM.GetLoPerpDist()
|
|
|
|
|
nWJLeadInType = ModifStartWndVM.GetLeadOutType().Id
|
|
|
|
|
|
|
|
|
|
bFirstWJ = False
|
|
|
|
|
End If
|
|
|
|
|
' Modifica della lavorazione
|
|
|
|
|
EgtSetCurrMachining(nOperId)
|
|
|
|
|
EgtSetMachiningParam(MCH_MP.ENDADDLEN, ModifStartWndVM.GetVal())
|
|
|
|
|
EgtSetMachiningParam(MCH_MP.LEADOUTTYPE, ModifStartWndVM.GetLeadOutType().Id)
|
|
|
|
|
EgtSetMachiningParam(MCH_MP.LOTANG, ModifStartWndVM.GetLoTangDist())
|
|
|
|
|
EgtSetMachiningParam(MCH_MP.LOPERP, ModifStartWndVM.GetLoPerpDist())
|
|
|
|
|
EgtSetMachiningParam(MCH_MP.ENDADDLEN, dWJAddLen)
|
|
|
|
|
EgtSetMachiningParam(MCH_MP.LEADOUTTYPE, nWJLeadInType)
|
|
|
|
|
EgtSetMachiningParam(MCH_MP.LOTANG, nWJTangDist)
|
|
|
|
|
EgtSetMachiningParam(MCH_MP.LOPERP, nWJPerpDist)
|
|
|
|
|
UpdateMachiningPreview(m_MachiningList(nI).m_nId, True)
|
|
|
|
|
' verifico interferenza
|
|
|
|
|
EgtVerifyMachining(m_MachiningList(nI).m_nId, m_MachiningList(nI).m_nInterf)
|
|
|
|
@@ -1908,6 +2054,9 @@ Public Class SplitModeVM
|
|
|
|
|
Public Sub Pause(ByVal param As Object)
|
|
|
|
|
If m_CurrFirstInd = -1 Then Return
|
|
|
|
|
For Index = m_CurrFirstInd To m_CurrLastInd
|
|
|
|
|
If Not m_ItemList(Index).IsSelected Then
|
|
|
|
|
Continue For
|
|
|
|
|
End If
|
|
|
|
|
Dim nI As Integer = m_ItemList(Index).Ind
|
|
|
|
|
Dim nOperId As Integer = m_MachiningList(nI).m_nId
|
|
|
|
|
If GetPause(nOperId) Then
|
|
|
|
@@ -1940,6 +2089,9 @@ Public Class SplitModeVM
|
|
|
|
|
Public Sub Invert(ByVal param As Object)
|
|
|
|
|
If m_CurrFirstInd = -1 Then Return
|
|
|
|
|
For Index = m_CurrFirstInd To m_CurrLastInd
|
|
|
|
|
If Not m_ItemList(Index).IsSelected Then
|
|
|
|
|
Continue For
|
|
|
|
|
End If
|
|
|
|
|
Dim nI As Integer = m_ItemList(Index).Ind
|
|
|
|
|
' Si possono invertire solo i tagli di lama
|
|
|
|
|
If m_MachiningList(nI).m_nType <> MCH_OY.SAWING Then Continue For
|
|
|
|
@@ -2252,29 +2404,34 @@ Public Class SplitModeVM
|
|
|
|
|
' ------------------------ verifico che le lavorazioni siano dello stesso tipo ------------------------
|
|
|
|
|
OmagOFFICEMap.refSplitModeVM.VerifyHomogenousMachining(ItemList)
|
|
|
|
|
' -----------------------------------------------------------------------------------------------------
|
|
|
|
|
' riordino l'elenco delle lavorazioni
|
|
|
|
|
ItemList.Sort(Function(x, y) Comparer(Of Integer).Default.Compare(OmagOFFICEMap.refSplitModeVM.m_ItemList.IndexOf(x), OmagOFFICEMap.refSplitModeVM.m_ItemList.IndexOf(y)))
|
|
|
|
|
' ------------------------ verifico che le lavorazioni siano contigue ---------------------------------
|
|
|
|
|
OmagOFFICEMap.refSplitModeVM.bEnabledCommandMove = VerifyContinuity(ItemList)
|
|
|
|
|
' -----------------------------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
'If Not My.Computer.Keyboard.ShiftKeyDown And (My.Computer.Keyboard.CtrlKeyDown And value) Then
|
|
|
|
|
' ' verifico che siano contigui
|
|
|
|
|
' Dim bContigus As Boolean = False
|
|
|
|
|
' Dim LastSel As NameIdLsBxItem = OmagOFFICEMap.refSplitModeVM.m_SelectedItemsList(OmagOFFICEMap.refSplitModeVM.m_SelectedItemsList.Count - 1)
|
|
|
|
|
' If OmagOFFICEMap.refSplitModeVM.m_SelectedItemsList.Count = 1 Then
|
|
|
|
|
' bContigus = True
|
|
|
|
|
' Else
|
|
|
|
|
' For Each Item In ItemList
|
|
|
|
|
' If Item.Ind = LastSel.Ind + 1 Or Item.Ind = LastSel.Ind - 1 Then
|
|
|
|
|
' bContigus = True
|
|
|
|
|
' End If
|
|
|
|
|
' Next
|
|
|
|
|
' End If
|
|
|
|
|
' ' se non contiguo, elimino dai selezionati il primo(che è l'ultimo ad essere stato selezionato)
|
|
|
|
|
' If Not bContigus Then
|
|
|
|
|
' ItemList.Remove(LastSel)
|
|
|
|
|
' OmagOFFICEMap.refSplitModeVM.m_SelectedItemsList.RemoveAt(OmagOFFICEMap.refSplitModeVM.m_SelectedItemsList.Count - 1)
|
|
|
|
|
' OmagOFFICEMap.refSplitModeVM.ItemList(LastSel.Ind).IsSelected = Not value 'm_IsSelected = Not value
|
|
|
|
|
' ' disabilito il pulsanti per spostare le lavorazioni
|
|
|
|
|
' End If
|
|
|
|
|
'End If
|
|
|
|
|
|
|
|
|
|
ItemList.Sort(Function(x, y) Comparer(Of Integer).Default.Compare(OmagOFFICEMap.refSplitModeVM.m_ItemList.IndexOf(x),
|
|
|
|
|
OmagOFFICEMap.refSplitModeVM.m_ItemList.IndexOf(y)))
|
|
|
|
|
If Not My.Computer.Keyboard.ShiftKeyDown And (My.Computer.Keyboard.CtrlKeyDown And value) Then
|
|
|
|
|
' verifico che siano contigui
|
|
|
|
|
Dim bContigus As Boolean = False
|
|
|
|
|
Dim LastSel As NameIdLsBxItem = OmagOFFICEMap.refSplitModeVM.m_SelectedItemsList(OmagOFFICEMap.refSplitModeVM.m_SelectedItemsList.Count - 1)
|
|
|
|
|
If OmagOFFICEMap.refSplitModeVM.m_SelectedItemsList.Count = 1 Then
|
|
|
|
|
bContigus = True
|
|
|
|
|
Else
|
|
|
|
|
For Each Item In ItemList
|
|
|
|
|
If Item.Ind = LastSel.Ind + 1 Or Item.Ind = LastSel.Ind - 1 Then
|
|
|
|
|
bContigus = True
|
|
|
|
|
End If
|
|
|
|
|
Next
|
|
|
|
|
End If
|
|
|
|
|
' se non contiguo, elimino dai selezionati il primo(che è l'ultimo ad essere stato selezionato)
|
|
|
|
|
If Not bContigus Then
|
|
|
|
|
ItemList.Remove(LastSel)
|
|
|
|
|
OmagOFFICEMap.refSplitModeVM.m_SelectedItemsList.RemoveAt(OmagOFFICEMap.refSplitModeVM.m_SelectedItemsList.Count - 1)
|
|
|
|
|
OmagOFFICEMap.refSplitModeVM.ItemList(LastSel.Ind).IsSelected = Not value 'm_IsSelected = Not value
|
|
|
|
|
End If
|
|
|
|
|
End If
|
|
|
|
|
' resetto marcatura lavorazioni
|
|
|
|
|
If OmagOFFICEMap.refSplitModeVM.m_CurrFirstInd > -1 Then
|
|
|
|
|
For Index = OmagOFFICEMap.refSplitModeVM.m_CurrFirstInd To OmagOFFICEMap.refSplitModeVM.m_CurrLastInd
|
|
|
|
@@ -2298,6 +2455,20 @@ Public Class SplitModeVM
|
|
|
|
|
End Set
|
|
|
|
|
End Property
|
|
|
|
|
|
|
|
|
|
Public Function VerifyContinuity(ItemList As List(Of NameIdLsBxItem)) As Boolean
|
|
|
|
|
If ItemList.Count < 2 Then Return True
|
|
|
|
|
Dim bContigus As Boolean = False
|
|
|
|
|
For Index As Integer = 0 To ItemList.Count - 2
|
|
|
|
|
If ItemList(Index).Ind = ItemList(Index + 1).Ind + 1 Or ItemList(Index).Ind = ItemList(Index + 1).Ind - 1 Then
|
|
|
|
|
bContigus = True
|
|
|
|
|
Else
|
|
|
|
|
bContigus = False
|
|
|
|
|
Exit For
|
|
|
|
|
End If
|
|
|
|
|
Next
|
|
|
|
|
Return bContigus
|
|
|
|
|
End Function
|
|
|
|
|
|
|
|
|
|
Public Property Type As Integer
|
|
|
|
|
Get
|
|
|
|
|
Return m_nType
|
|
|
|
|