Compare commits
45 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 22afb6edcd | |||
| 9c8faf25bf | |||
| 58775595c7 | |||
| 9750fdfe75 | |||
| 39bc4f55ea | |||
| 803a7bdbfc | |||
| 1473298705 | |||
| 4be7087a1b | |||
| 7c990987e8 | |||
| 3837895350 | |||
| e5195c5c5c | |||
| 17ed0b3807 | |||
| e11722f598 | |||
| 9644529618 | |||
| 0eb6897c08 | |||
| 8462554421 | |||
| 446df8f37f | |||
| 2919cc2dde | |||
| 093f882118 | |||
| f908f073af | |||
| dc0a2f1934 | |||
| 6366aa7938 | |||
| 696ceabb17 | |||
| c55d9b48d3 | |||
| 8c35871e34 | |||
| 4390dbdce8 | |||
| 8d4785334a | |||
| 7cf5a88b23 | |||
| e587cd9d45 | |||
| 973157a0de | |||
| 0e25b456bf | |||
| 4c8394f22d | |||
| ed3e14229f | |||
| 81f6fa88da | |||
| adbc811206 | |||
| 94866ce13d | |||
| c336390baf | |||
| 0686d543bb | |||
| 4cd9b70cf2 | |||
| 140d2bc226 | |||
| 3c796aeefa | |||
| 2bcab0bbf1 | |||
| df41408ec9 | |||
| 9a2084c216 | |||
| 52844c8d75 |
@@ -674,6 +674,9 @@ Friend Module CamAuto
|
|||||||
End If
|
End If
|
||||||
' Lo sposto dalla lavorazione al pezzo
|
' Lo sposto dalla lavorazione al pezzo
|
||||||
Dim nId As Integer = EgtGetFirstInGroup(nMchPvId)
|
Dim nId As Integer = EgtGetFirstInGroup(nMchPvId)
|
||||||
|
|
||||||
|
If nId = GDB_ID.NULL Then Return False
|
||||||
|
|
||||||
While nId <> GDB_ID.NULL
|
While nId <> GDB_ID.NULL
|
||||||
EgtRelocateGlob(nId, nPartPvId)
|
EgtRelocateGlob(nId, nPartPvId)
|
||||||
nId = EgtGetFirstInGroup(nMchPvId)
|
nId = EgtGetFirstInGroup(nMchPvId)
|
||||||
@@ -719,10 +722,12 @@ Friend Module CamAuto
|
|||||||
End Function
|
End Function
|
||||||
|
|
||||||
Private Function SetLuaStandardCamParams(Optional bDripOk As Boolean = True) As Boolean
|
Private Function SetLuaStandardCamParams(Optional bDripOk As Boolean = True) As Boolean
|
||||||
|
Dim sMaterial As String = m_MainWindow.m_CurrentMachine.CurrMat.sName
|
||||||
Dim sSawMch As String = m_MainWindow.m_CurrentMachine.sCurrSawing
|
Dim sSawMch As String = m_MainWindow.m_CurrentMachine.sCurrSawing
|
||||||
Dim sMillMch As String = m_MainWindow.m_CurrentMachine.sCurrMilling
|
Dim sMillMch As String = m_MainWindow.m_CurrentMachine.sCurrMilling
|
||||||
Dim sDrillMch As String = m_MainWindow.m_CurrentMachine.sCurrDrilling
|
Dim sDrillMch As String = m_MainWindow.m_CurrentMachine.sCurrDrilling
|
||||||
Dim sWaterJetMch As String = m_MainWindow.m_CurrentMachine.sCurrWaterJetting
|
Dim sWaterJetMch As String = m_MainWindow.m_CurrentMachine.sCurrWaterJetting
|
||||||
|
Dim sWaterJetQual As String = m_MainWindow.m_CurrentMachine.sCurrWaterJettingQuality
|
||||||
Dim sPocketMch As String = m_MainWindow.m_CurrentMachine.sCurrPocketing
|
Dim sPocketMch As String = m_MainWindow.m_CurrentMachine.sCurrPocketing
|
||||||
Dim sDripSawMch As String = If(bDripOk, m_MainWindow.m_CurrentMachine.sCurrDripSawing, "")
|
Dim sDripSawMch As String = If(bDripOk, m_MainWindow.m_CurrentMachine.sCurrDripSawing, "")
|
||||||
Dim sDripDrillMch As String = If(bDripOk, m_MainWindow.m_CurrentMachine.sCurrDripDrilling, "")
|
Dim sDripDrillMch As String = If(bDripOk, m_MainWindow.m_CurrentMachine.sCurrDripDrilling, "")
|
||||||
@@ -735,11 +740,13 @@ Friend Module CamAuto
|
|||||||
Dim bMillingOnCorners As Boolean = (GetPrivateProfileInt(S_MACH_NEST, K_MACH_MILLING_ON_CORNERS, 1, m_MainWindow.GetMachIniFile()) <> 0)
|
Dim bMillingOnCorners As Boolean = (GetPrivateProfileInt(S_MACH_NEST, K_MACH_MILLING_ON_CORNERS, 1, m_MainWindow.GetMachIniFile()) <> 0)
|
||||||
Dim bMillingOnSinks As Boolean = (GetPrivateProfileInt(S_MACH_NEST, K_MACH_MILLING_ON_SINKS, 0, m_MainWindow.GetMachIniFile()) <> 0)
|
Dim bMillingOnSinks As Boolean = (GetPrivateProfileInt(S_MACH_NEST, K_MACH_MILLING_ON_SINKS, 0, m_MainWindow.GetMachIniFile()) <> 0)
|
||||||
Dim dMillingShort As Double = GetPrivateProfileDouble(S_MACH_NEST, K_MACH_MILLING_SHORTENING, 0, m_MainWindow.GetMachIniFile())
|
Dim dMillingShort As Double = GetPrivateProfileDouble(S_MACH_NEST, K_MACH_MILLING_SHORTENING, 0, m_MainWindow.GetMachIniFile())
|
||||||
|
EgtLuaSetGlobStringVar("CAM.MATERIAL", sMaterial)
|
||||||
EgtLuaSetGlobStringVar("CAM.SAWMCH", sSawMch)
|
EgtLuaSetGlobStringVar("CAM.SAWMCH", sSawMch)
|
||||||
EgtLuaSetGlobStringVar("CAM.MILLMCH", sMillMch)
|
EgtLuaSetGlobStringVar("CAM.MILLMCH", sMillMch)
|
||||||
EgtLuaSetGlobStringVar("CAM.DRILLMCH", sDrillMch)
|
EgtLuaSetGlobStringVar("CAM.DRILLMCH", sDrillMch)
|
||||||
EgtLuaSetGlobStringVar("CAM.POCKETMCH", sPocketMch)
|
EgtLuaSetGlobStringVar("CAM.POCKETMCH", sPocketMch)
|
||||||
EgtLuaSetGlobStringVar("CAM.WATERJETMCH", sWaterJetMch)
|
EgtLuaSetGlobStringVar("CAM.WATERJETMCH", sWaterJetMch)
|
||||||
|
EgtLuaSetGlobStringVar("CAM.WATERJETQLTY", sWaterJetQual)
|
||||||
EgtLuaSetGlobStringVar("CAM.DRIPSAWMCH", sDripSawMch)
|
EgtLuaSetGlobStringVar("CAM.DRIPSAWMCH", sDripSawMch)
|
||||||
EgtLuaSetGlobStringVar("CAM.DRIPDRILLMCH", sDripDrillMch)
|
EgtLuaSetGlobStringVar("CAM.DRIPDRILLMCH", sDripDrillMch)
|
||||||
EgtLuaSetGlobNumVar("CAM.REDUCEDDEPTH", dReducedDepth)
|
EgtLuaSetGlobNumVar("CAM.REDUCEDDEPTH", dReducedDepth)
|
||||||
|
|||||||
@@ -19,6 +19,14 @@ Friend Module CSVFile
|
|||||||
Public m_dDimX As Double = 0
|
Public m_dDimX As Double = 0
|
||||||
Public m_dDimY As Double = 0
|
Public m_dDimY As Double = 0
|
||||||
Public m_dTh As Double = 0
|
Public m_dTh As Double = 0
|
||||||
|
Public m_dAng1 As Double = 0
|
||||||
|
Public m_dHeel1 As Double = 0
|
||||||
|
Public m_dAng2 As Double = 0
|
||||||
|
Public m_dHeel2 As Double = 0
|
||||||
|
Public m_dAng3 As Double = 0
|
||||||
|
Public m_dHeel3 As Double = 0
|
||||||
|
Public m_dAng4 As Double = 0
|
||||||
|
Public m_dHeel4 As Double = 0
|
||||||
Public m_nOriInd As Integer = 0
|
Public m_nOriInd As Integer = 0
|
||||||
Public m_nId As Integer = GDB_ID.NULL
|
Public m_nId As Integer = GDB_ID.NULL
|
||||||
End Class
|
End Class
|
||||||
@@ -62,6 +70,14 @@ Friend Module CSVFile
|
|||||||
EgtLuaGetGlobNumVar("CSV.DIMX" & sN, OnePart.m_dDimX)
|
EgtLuaGetGlobNumVar("CSV.DIMX" & sN, OnePart.m_dDimX)
|
||||||
EgtLuaGetGlobNumVar("CSV.DIMY" & sN, OnePart.m_dDimY)
|
EgtLuaGetGlobNumVar("CSV.DIMY" & sN, OnePart.m_dDimY)
|
||||||
EgtLuaGetGlobNumVar("CSV.TH" & sN, OnePart.m_dTh)
|
EgtLuaGetGlobNumVar("CSV.TH" & sN, OnePart.m_dTh)
|
||||||
|
EgtLuaGetGlobNumVar("CSV.A1_" & sN, OnePart.m_dAng1)
|
||||||
|
EgtLuaGetGlobNumVar("CSV.H1_" & sN, OnePart.m_dHeel1)
|
||||||
|
EgtLuaGetGlobNumVar("CSV.A2_" & sN, OnePart.m_dAng2)
|
||||||
|
EgtLuaGetGlobNumVar("CSV.H2_" & sN, OnePart.m_dHeel2)
|
||||||
|
EgtLuaGetGlobNumVar("CSV.A3_" & sN, OnePart.m_dAng3)
|
||||||
|
EgtLuaGetGlobNumVar("CSV.H3_" & sN, OnePart.m_dHeel3)
|
||||||
|
EgtLuaGetGlobNumVar("CSV.A4_" & sN, OnePart.m_dAng4)
|
||||||
|
EgtLuaGetGlobNumVar("CSV.H4_" & sN, OnePart.m_dHeel4)
|
||||||
OnePart.m_nOriInd = i
|
OnePart.m_nOriInd = i
|
||||||
' inserisco in lista
|
' inserisco in lista
|
||||||
CsvPartList.Add(OnePart)
|
CsvPartList.Add(OnePart)
|
||||||
@@ -147,6 +163,22 @@ Friend Module CSVFile
|
|||||||
StringToDouble(sItems(1), OnePart.m_dDimY)
|
StringToDouble(sItems(1), OnePart.m_dDimY)
|
||||||
ElseIf sItems(0) = "Th" Then
|
ElseIf sItems(0) = "Th" Then
|
||||||
StringToDouble(sItems(1), OnePart.m_dTh)
|
StringToDouble(sItems(1), OnePart.m_dTh)
|
||||||
|
ElseIf sItems(0) = "A1" Then
|
||||||
|
StringToDouble(sItems(1), OnePart.m_dAng1)
|
||||||
|
ElseIf sItems(0) = "H1" Then
|
||||||
|
StringToDouble(sItems(1), OnePart.m_dHeel1)
|
||||||
|
ElseIf sItems(0) = "A2" Then
|
||||||
|
StringToDouble(sItems(1), OnePart.m_dAng2)
|
||||||
|
ElseIf sItems(0) = "H2" Then
|
||||||
|
StringToDouble(sItems(1), OnePart.m_dHeel2)
|
||||||
|
ElseIf sItems(0) = "A3" Then
|
||||||
|
StringToDouble(sItems(1), OnePart.m_dAng3)
|
||||||
|
ElseIf sItems(0) = "H3" Then
|
||||||
|
StringToDouble(sItems(1), OnePart.m_dHeel3)
|
||||||
|
ElseIf sItems(0) = "A4" Then
|
||||||
|
StringToDouble(sItems(1), OnePart.m_dAng4)
|
||||||
|
ElseIf sItems(0) = "H4" Then
|
||||||
|
StringToDouble(sItems(1), OnePart.m_dHeel4)
|
||||||
ElseIf sItems(0) = "OIn" Then
|
ElseIf sItems(0) = "OIn" Then
|
||||||
StringToInt(sItems(1), OnePart.m_nOriInd)
|
StringToInt(sItems(1), OnePart.m_nOriInd)
|
||||||
End If
|
End If
|
||||||
@@ -188,6 +220,14 @@ Friend Module CSVFile
|
|||||||
Writer.WriteLine("DX=" & DoubleToString(CurrPart.m_dDimX, 4))
|
Writer.WriteLine("DX=" & DoubleToString(CurrPart.m_dDimX, 4))
|
||||||
Writer.WriteLine("DY=" & DoubleToString(CurrPart.m_dDimY, 4))
|
Writer.WriteLine("DY=" & DoubleToString(CurrPart.m_dDimY, 4))
|
||||||
Writer.WriteLine("Th=" & DoubleToString(CurrPart.m_dTh, 4))
|
Writer.WriteLine("Th=" & DoubleToString(CurrPart.m_dTh, 4))
|
||||||
|
Writer.WriteLine("A1=" & DoubleToString(CurrPart.m_dAng1, 4))
|
||||||
|
Writer.WriteLine("H1=" & DoubleToString(CurrPart.m_dHeel1, 4))
|
||||||
|
Writer.WriteLine("A2=" & DoubleToString(CurrPart.m_dAng2, 4))
|
||||||
|
Writer.WriteLine("H2=" & DoubleToString(CurrPart.m_dHeel2, 4))
|
||||||
|
Writer.WriteLine("A3=" & DoubleToString(CurrPart.m_dAng3, 4))
|
||||||
|
Writer.WriteLine("H3=" & DoubleToString(CurrPart.m_dHeel3, 4))
|
||||||
|
Writer.WriteLine("A4=" & DoubleToString(CurrPart.m_dAng4, 4))
|
||||||
|
Writer.WriteLine("H4=" & DoubleToString(CurrPart.m_dHeel4, 4))
|
||||||
Writer.WriteLine("OIn=" & CurrPart.m_nOriInd.ToString())
|
Writer.WriteLine("OIn=" & CurrPart.m_nOriInd.ToString())
|
||||||
Next
|
Next
|
||||||
' Terminatore
|
' Terminatore
|
||||||
|
|||||||
+30
-1
@@ -424,10 +424,14 @@ Public Class CSVPage
|
|||||||
' Definizione variabili
|
' Definizione variabili
|
||||||
Dim dDimX = CurrPart.m_dDimX
|
Dim dDimX = CurrPart.m_dDimX
|
||||||
Dim dDimY = CurrPart.m_dDimY
|
Dim dDimY = CurrPart.m_dDimY
|
||||||
|
Dim dAng = New Double() {CurrPart.m_dAng1,CurrPart.m_dAng2,CurrPart.m_dAng3,CurrPart.m_dAng4}
|
||||||
|
Dim dHeel = New Double() {CurrPart.m_dHeel1,CurrPart.m_dHeel2,CurrPart.m_dHeel3,CurrPart.m_dHeel4}
|
||||||
If bMaxDimOnX And dDimY > dDimX Then
|
If bMaxDimOnX And dDimY > dDimX Then
|
||||||
Dim dTemp As Double = dDimX
|
Dim dTemp As Double = dDimX
|
||||||
dDimX = dDimY
|
dDimX = dDimY
|
||||||
dDimY = dTemp
|
dDimY = dTemp
|
||||||
|
dAng = New Double() {CurrPart.m_dAng2,CurrPart.m_dAng3,CurrPart.m_dAng4,CurrPart.m_dAng1}
|
||||||
|
dHeel = New Double() {CurrPart.m_dHeel2,CurrPart.m_dHeel3,CurrPart.m_dHeel4,CurrPart.m_dHeel1}
|
||||||
End If
|
End If
|
||||||
EgtLuaSetGlobNumVar("CMP.V1", dDimX)
|
EgtLuaSetGlobNumVar("CMP.V1", dDimX)
|
||||||
EgtLuaSetGlobNumVar("CMP.V2", dDimY)
|
EgtLuaSetGlobNumVar("CMP.V2", dDimY)
|
||||||
@@ -439,7 +443,7 @@ Public Class CSVPage
|
|||||||
If nId = GDB_ID.NULL Then Continue For
|
If nId = GDB_ID.NULL Then Continue For
|
||||||
CurrPart.m_nId = nId
|
CurrPart.m_nId = nId
|
||||||
' Muovo la regione in Z per evitare problemi in visualizzazione
|
' Muovo la regione in Z per evitare problemi in visualizzazione
|
||||||
Dim nRegId = EgtGetFirstNameInGroup(nId, NAME_REGION)
|
Dim nRegId As Integer = EgtGetFirstNameInGroup(nId, NAME_REGION)
|
||||||
EgtMove(nRegId, New Vector3d(0, 0, DELTAZ_REG), GDB_RT.GLOB)
|
EgtMove(nRegId, New Vector3d(0, 0, DELTAZ_REG), GDB_RT.GLOB)
|
||||||
' Eventuale testo per indicare il sopra
|
' Eventuale testo per indicare il sopra
|
||||||
If Not bMaxDimOnX Then
|
If Not bMaxDimOnX Then
|
||||||
@@ -447,6 +451,31 @@ Public Class CSVPage
|
|||||||
Dim nText As Integer = EgtCreateTextAdv(nRegId, New Point3d(dDimX / 2, dDimY - 0.6 * dH, 0), 0, "*TOP*", "", 500, False, dH, 1, 0, INS_POS.MC)
|
Dim nText As Integer = EgtCreateTextAdv(nRegId, New Point3d(dDimX / 2, dDimY - 0.6 * dH, 0), 0, "*TOP*", "", 500, False, dH, 1, 0, INS_POS.MC)
|
||||||
EgtSetColor(nText, New Color3d( 0, 0, 0))
|
EgtSetColor(nText, New Color3d( 0, 0, 0))
|
||||||
End If
|
End If
|
||||||
|
' Inserisco eventuali angoli di fianco
|
||||||
|
Dim bSideAngs As Boolean = False
|
||||||
|
Dim nOutLoopId As Integer = EgtGetFirstNameInGroup( nId, NAME_OUTLOOP)
|
||||||
|
For nSide As Integer = 1 To 4
|
||||||
|
Dim dSideAng As Double = dAng( nSide - 1)
|
||||||
|
Dim dSideHeel As Double = dHeel( nSide - 1)
|
||||||
|
If Math.Abs( dSideAng) > EPS_ANG_SMALL Then
|
||||||
|
Dim nEntId As Integer = EgtGetFirstNameInGroup( nOutLoopId, "A" & nSide.ToString())
|
||||||
|
If nEntId <> GDB_ID.NULL Then
|
||||||
|
bSideAngs = True
|
||||||
|
' Assegno valori
|
||||||
|
EgtSetInfo(nEntId, INFO_SIDE_ANGLE, dSideAng)
|
||||||
|
EgtSetInfo(nEntId, INFO_ORIG_SIDE_ANGLE, dSideAng)
|
||||||
|
EgtSetInfo(nEntId, INFO_HEEL, dSideHeel)
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
' Creo layer per testi nesting
|
||||||
|
If bSideAngs Then
|
||||||
|
Dim TextLayId As Integer = EgtCreateGroup(nId)
|
||||||
|
EgtSetName(TextLayId, SIDE_ANGLE_LAYER)
|
||||||
|
EgtSetColor(TextLayId, New Color3d(0, 0, 128))
|
||||||
|
' Opero su geometria esterna pezzo
|
||||||
|
SideAngle.WriteSideAngleOnLoop(nOutLoopId, TextLayId)
|
||||||
|
End If
|
||||||
' Aggiusto per lavorazioni
|
' Aggiusto per lavorazioni
|
||||||
EgtAdjustFlatPart(nId)
|
EgtAdjustFlatPart(nId)
|
||||||
' Se Csv completo, aggiungo info su CSV di origine
|
' Se Csv completo, aggiungo info su CSV di origine
|
||||||
|
|||||||
@@ -1168,7 +1168,7 @@ Public Class NestPageUC
|
|||||||
nLayId = EgtGetNextName(nLayId, NAME_INLOOP)
|
nLayId = EgtGetNextName(nLayId, NAME_INLOOP)
|
||||||
End While
|
End While
|
||||||
' Aggiorno le entità con tallone e quelle con angolo esterno
|
' Aggiorno le entità con tallone e quelle con angolo esterno
|
||||||
Const AGG_DEPTH As Double = 2.0
|
Const AGG_DEPTH As Double = 0.75
|
||||||
Dim bSizeOnTop As Boolean = ( GetPrivateProfileInt( S_SIDES, K_SIZEALWAYSONTOP, 0, m_MainWindow.GetIniFile()) <> 0)
|
Dim bSizeOnTop As Boolean = ( GetPrivateProfileInt( S_SIDES, K_SIZEALWAYSONTOP, 0, m_MainWindow.GetIniFile()) <> 0)
|
||||||
For Each nEnt As Integer In vEnt
|
For Each nEnt As Integer In vEnt
|
||||||
' Se aggiornamento vietato, vado oltre
|
' Se aggiornamento vietato, vado oltre
|
||||||
@@ -1194,12 +1194,14 @@ Public Class NestPageUC
|
|||||||
EgtSetInfo(nEnt, INFO_OFFSET2, 0)
|
EgtSetInfo(nEnt, INFO_OFFSET2, 0)
|
||||||
End If
|
End If
|
||||||
EgtSetInfo(nEnt, INFO_DEPTH2, (dTh - dHeel) + AGG_DEPTH)
|
EgtSetInfo(nEnt, INFO_DEPTH2, (dTh - dHeel) + AGG_DEPTH)
|
||||||
|
EgtSetInfo(nEnt, INFO_AGG2, AGG_DEPTH)
|
||||||
' altrimenti, tallone superiore a spessore -> non c'è taglio inclinato
|
' altrimenti, tallone superiore a spessore -> non c'è taglio inclinato
|
||||||
Else
|
Else
|
||||||
EgtSetInfo(nEnt, INFO_SIDE_ANGLE, 0.0)
|
EgtSetInfo(nEnt, INFO_SIDE_ANGLE, 0.0)
|
||||||
EgtSetInfo(nEnt, INFO_SIDE_ANGLE2, 0.0)
|
EgtSetInfo(nEnt, INFO_SIDE_ANGLE2, 0.0)
|
||||||
EgtRemoveInfo(nEnt, INFO_OFFSET2)
|
EgtRemoveInfo(nEnt, INFO_OFFSET2)
|
||||||
EgtRemoveInfo(nEnt, INFO_DEPTH2)
|
EgtRemoveInfo(nEnt, INFO_DEPTH2)
|
||||||
|
EgtRemoveInfo(nEnt, INFO_AGG2)
|
||||||
End If
|
End If
|
||||||
' Inclinazione interna
|
' Inclinazione interna
|
||||||
Else
|
Else
|
||||||
@@ -1208,12 +1210,14 @@ Public Class NestPageUC
|
|||||||
EgtSetInfo(nEnt, INFO_OFFSET, dHeel * Math.Tan(-dSideAng * Math.PI / 180))
|
EgtSetInfo(nEnt, INFO_OFFSET, dHeel * Math.Tan(-dSideAng * Math.PI / 180))
|
||||||
EgtSetInfo(nEnt, INFO_SIDE_ANGLE2, 0.0)
|
EgtSetInfo(nEnt, INFO_SIDE_ANGLE2, 0.0)
|
||||||
EgtSetInfo(nEnt, INFO_DEPTH2, dHeel + AGG_DEPTH)
|
EgtSetInfo(nEnt, INFO_DEPTH2, dHeel + AGG_DEPTH)
|
||||||
|
EgtSetInfo(nEnt, INFO_AGG2, AGG_DEPTH)
|
||||||
' altrimenti, tallone superiore a spessore -> non c'è taglio inclinato
|
' altrimenti, tallone superiore a spessore -> non c'è taglio inclinato
|
||||||
Else
|
Else
|
||||||
EgtSetInfo(nEnt, INFO_SIDE_ANGLE, 0.0)
|
EgtSetInfo(nEnt, INFO_SIDE_ANGLE, 0.0)
|
||||||
EgtRemoveInfo(nEnt, INFO_OFFSET)
|
EgtRemoveInfo(nEnt, INFO_OFFSET)
|
||||||
EgtRemoveInfo(nEnt, INFO_SIDE_ANGLE2)
|
EgtRemoveInfo(nEnt, INFO_SIDE_ANGLE2)
|
||||||
EgtRemoveInfo(nEnt, INFO_DEPTH2)
|
EgtRemoveInfo(nEnt, INFO_DEPTH2)
|
||||||
|
EgtRemoveInfo(nEnt, INFO_AGG2)
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
' Se altrimenti inclinazione esterna
|
' Se altrimenti inclinazione esterna
|
||||||
|
|||||||
@@ -166,6 +166,17 @@ Public Module SplitAuto
|
|||||||
End Function
|
End Function
|
||||||
|
|
||||||
'-----------------------------------------------------------------------------------------------
|
'-----------------------------------------------------------------------------------------------
|
||||||
|
' calcolo il numero di tipi di lavorazioni
|
||||||
|
Friend Sub CountMachiningType(MachSplit As SplitMach, ByRef nCountSawing As Integer, ByRef nCountWaterjetting As Integer, ByRef nCountOtherMachining As Integer)
|
||||||
|
If MachSplit.m_nType = MCH_OY.SAWING Then
|
||||||
|
nCountSawing += 1
|
||||||
|
ElseIf MachSplit.m_nType = MCH_OY.WATERJETTING Then
|
||||||
|
nCountWaterjetting += 1
|
||||||
|
Else
|
||||||
|
nCountOtherMachining += 1
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
Friend Sub ColorMachining(MachSplit As SplitMach, Optional bReset As Boolean = False)
|
Friend Sub ColorMachining(MachSplit As SplitMach, Optional bReset As Boolean = False)
|
||||||
EgtDisableModified()
|
EgtDisableModified()
|
||||||
' Assegno stato
|
' Assegno stato
|
||||||
|
|||||||
+428
-78
@@ -6,6 +6,9 @@ Public Class SplitPageUC
|
|||||||
|
|
||||||
' Riferimento alla MainWindow
|
' Riferimento alla MainWindow
|
||||||
Private m_MainWindow As MainWindow = DirectCast(Application.Current.MainWindow, MainWindow)
|
Private m_MainWindow As MainWindow = DirectCast(Application.Current.MainWindow, MainWindow)
|
||||||
|
Private WithEvents m_CurrProjPage As CurrentProjectPageUC
|
||||||
|
' Flag di pagina attiva
|
||||||
|
Private m_bActive As Boolean = False
|
||||||
' Tipo movimento dei grezzi (manuale o con testa ventosa)
|
' Tipo movimento dei grezzi (manuale o con testa ventosa)
|
||||||
Private m_bByHand As Boolean = True
|
Private m_bByHand As Boolean = True
|
||||||
' Abilitazione movimento finale pezzi su tavola ausiliaria
|
' Abilitazione movimento finale pezzi su tavola ausiliaria
|
||||||
@@ -13,6 +16,16 @@ Public Class SplitPageUC
|
|||||||
' Stato
|
' Stato
|
||||||
Private m_nCurrPhase As Integer = 0
|
Private m_nCurrPhase As Integer = 0
|
||||||
Private m_MachiningList As New List(Of SplitMach)
|
Private m_MachiningList As New List(Of SplitMach)
|
||||||
|
|
||||||
|
' numero di lavorazioni di tipo lama
|
||||||
|
Private m_nCountSawing As Integer = 0
|
||||||
|
' numero di lavprazioni di tipo waterjet
|
||||||
|
Private m_nCountWaterjetting As Integer = 0
|
||||||
|
' altri tipi di lavorazioni (Foro/Fresa)
|
||||||
|
Private m_nCountOtherMachining As Integer = 0
|
||||||
|
' verifico che le lavorazioni selezionate siano omogenee (con lo stesso utensile)
|
||||||
|
Private m_bAreHomogeneous As Boolean = False
|
||||||
|
|
||||||
Private m_ItemList As New ObservableCollection(Of NameIdLsBxItem)
|
Private m_ItemList As New ObservableCollection(Of NameIdLsBxItem)
|
||||||
'Private m_CurrInd As Integer = -1
|
'Private m_CurrInd As Integer = -1
|
||||||
'Private m_CurrItems As New List(Of NameIdLsBxItem)
|
'Private m_CurrItems As New List(Of NameIdLsBxItem)
|
||||||
@@ -23,6 +36,13 @@ Public Class SplitPageUC
|
|||||||
Private m_nNbrGrpId As Integer = GDB_ID.NULL
|
Private m_nNbrGrpId As Integer = GDB_ID.NULL
|
||||||
Private m_bToNext As Boolean = False
|
Private m_bToNext As Boolean = False
|
||||||
Friend m_bOnAuxTab As Boolean = False
|
Friend m_bOnAuxTab As Boolean = False
|
||||||
|
' Drag
|
||||||
|
Private m_nDragInd As Integer = -1
|
||||||
|
Private m_nDragType As Integer = 0 '0=niente, 1=attacco, 2=uscita
|
||||||
|
Private m_ptDragPrev As Point3d
|
||||||
|
Private m_bDragging As Boolean = False
|
||||||
|
' Selected cut
|
||||||
|
Private m_nSelected As Integer = GDB_ID.NULL
|
||||||
|
|
||||||
Private Sub SplitPageUC_Initialized(sender As Object, e As EventArgs)
|
Private Sub SplitPageUC_Initialized(sender As Object, e As EventArgs)
|
||||||
PrevBtn.IsEnabled = False
|
PrevBtn.IsEnabled = False
|
||||||
@@ -53,6 +73,10 @@ Public Class SplitPageUC
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub SplitPageUC_Loaded(sender As Object, e As EventArgs) Handles Me.Loaded
|
Private Sub SplitPageUC_Loaded(sender As Object, e As EventArgs) Handles Me.Loaded
|
||||||
|
m_bActive = True
|
||||||
|
m_CurrProjPage = m_MainWindow.m_CurrentProjectPageUC
|
||||||
|
m_nDragInd = -1
|
||||||
|
m_nDragType = 0
|
||||||
' Leggo tipo movimento grezzi
|
' Leggo tipo movimento grezzi
|
||||||
m_bByHand = (EgtGetHeadId(VACUUM_HEAD) = GDB_ID.NULL Or
|
m_bByHand = (EgtGetHeadId(VACUUM_HEAD) = GDB_ID.NULL Or
|
||||||
Not m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.AUTO_MANIP) Or
|
Not m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.AUTO_MANIP) Or
|
||||||
@@ -79,7 +103,7 @@ Public Class SplitPageUC
|
|||||||
If Not m_bShow Then
|
If Not m_bShow Then
|
||||||
If m_MainWindow.m_CurrentMachine.WaterJettingActive Then ResetAllMachinings()
|
If m_MainWindow.m_CurrentMachine.WaterJettingActive Then ResetAllMachinings()
|
||||||
If SortAllMachinings() Then m_MainWindow.m_CurrentProjectPageUC.SetOrderMachiningFlag()
|
If SortAllMachinings() Then m_MainWindow.m_CurrentProjectPageUC.SetOrderMachiningFlag()
|
||||||
If m_MainWindow.m_CurrentMachine.WaterJettingActive Then
|
If m_MainWindow.m_CurrentMachine.WaterJettingActive Then
|
||||||
Dim bModif As Boolean = TestAllMachiningsForStrict()
|
Dim bModif As Boolean = TestAllMachiningsForStrict()
|
||||||
If bModif Then m_MainWindow.m_CurrentProjectPageUC.SetWarningMessage(EgtMsg(90321)) 'Ridotte alcune lavorazioni per evitare interferenze
|
If bModif Then m_MainWindow.m_CurrentProjectPageUC.SetWarningMessage(EgtMsg(90321)) 'Ridotte alcune lavorazioni per evitare interferenze
|
||||||
End If
|
End If
|
||||||
@@ -97,12 +121,18 @@ Public Class SplitPageUC
|
|||||||
ShowOnePhaseMachiningPreview(m_nCurrPhase)
|
ShowOnePhaseMachiningPreview(m_nCurrPhase)
|
||||||
' Preparo la lista delle lavorazioni
|
' Preparo la lista delle lavorazioni
|
||||||
CalculateSplitMachList(m_nCurrPhase, m_MachiningList)
|
CalculateSplitMachList(m_nCurrPhase, m_MachiningList)
|
||||||
|
' azzero i contatori delle lavorazioni
|
||||||
|
m_nCountSawing = 0
|
||||||
|
m_nCountWaterjetting = 0
|
||||||
|
m_nCountOtherMachining = 0
|
||||||
' Aggiorno visualizzazione delle lavorazioni
|
' Aggiorno visualizzazione delle lavorazioni
|
||||||
For nI As Integer = 0 To m_MachiningList.Count() - 1
|
For nI As Integer = 0 To m_MachiningList.Count() - 1
|
||||||
' sistemo colore
|
' sistemo colore
|
||||||
ColorMachining(m_MachiningList(nI))
|
ColorMachining(m_MachiningList(nI))
|
||||||
' assegno numerazione
|
' assegno numerazione
|
||||||
NumberDirectionMachining(nI)
|
NumberDirectionMachining(nI)
|
||||||
|
' conto il numero di tipi di lavorazioni
|
||||||
|
CountMachiningType(m_MachiningList(nI), m_nCountSawing, m_nCountWaterjetting, m_nCountOtherMachining)
|
||||||
Next
|
Next
|
||||||
' Preparo la lista degli Item
|
' Preparo la lista degli Item
|
||||||
ShowMachiningList()
|
ShowMachiningList()
|
||||||
@@ -138,33 +168,222 @@ Public Class SplitPageUC
|
|||||||
Dim sText As String = String.Empty
|
Dim sText As String = String.Empty
|
||||||
If Math.Abs(Mach.m_dSideAng) < EPS_ANG_SMALL Then
|
If Math.Abs(Mach.m_dSideAng) < EPS_ANG_SMALL Then
|
||||||
sText = EgtMsg(90791) & " " & i.ToString()
|
sText = EgtMsg(90791) & " " & i.ToString()
|
||||||
If Mach.m_sLay = NAME_ONPATH Then AddTopText( sText)
|
If Mach.m_sLay = NAME_ONPATH Then AddTopText(sText)
|
||||||
Else
|
Else
|
||||||
sText = EgtMsg(90791) & " " & i.ToString() & " " & DoubleToString( Mach.m_dSideAng, 2) & "°"
|
sText = EgtMsg(90791) & " " & i.ToString() & " " & DoubleToString(Mach.m_dSideAng, 2) & "°"
|
||||||
End If
|
End If
|
||||||
If Mach.m_bPause Then AddPauseText(sText)
|
If Mach.m_bPause Then AddPauseText(sText)
|
||||||
m_ItemList.Add(New NameIdLsBxItem(sText, i - 1, Mach.m_bEnabled))
|
m_ItemList.Add(New NameIdLsBxItem(sText, i - 1, Mach.m_bEnabled, MCH_OY.SAWING))
|
||||||
ElseIf Mach.m_nType = MCH_OY.DRILLING Then ' Foratura
|
ElseIf Mach.m_nType = MCH_OY.DRILLING Then ' Foratura
|
||||||
Dim sText As String = EgtMsg(90792) & " " & i.ToString()
|
Dim sText As String = EgtMsg(90792) & " " & i.ToString()
|
||||||
If Mach.m_bPause Then AddPauseText(sText)
|
If Mach.m_bPause Then AddPauseText(sText)
|
||||||
m_ItemList.Add(New NameIdLsBxItem(sText, i - 1, Mach.m_bEnabled))
|
m_ItemList.Add(New NameIdLsBxItem(sText, i - 1, Mach.m_bEnabled, MCH_OY.DRILLING))
|
||||||
ElseIf Mach.m_nType = MCH_OY.MILLING Then ' Fresatura
|
ElseIf Mach.m_nType = MCH_OY.MILLING Then ' Fresatura
|
||||||
Dim sText As String = EgtMsg(90793) & " " & i.ToString()
|
Dim sText As String = EgtMsg(90793) & " " & i.ToString()
|
||||||
If Mach.m_sLay = NAME_ONPATH Then AddTopText( sText)
|
If Mach.m_sLay = NAME_ONPATH Then AddTopText(sText)
|
||||||
If Mach.m_bPause Then AddPauseText( sText)
|
If Mach.m_bPause Then AddPauseText(sText)
|
||||||
m_ItemList.Add(New NameIdLsBxItem(sText, i - 1, Mach.m_bEnabled))
|
m_ItemList.Add(New NameIdLsBxItem(sText, i - 1, Mach.m_bEnabled, MCH_OY.MILLING))
|
||||||
ElseIf Mach.m_nType = MCH_OY.POCKETING Then ' Svuotatura
|
ElseIf Mach.m_nType = MCH_OY.POCKETING Then ' Svuotatura
|
||||||
Dim sText As String = EgtMsg(90796) & " " & i.ToString()
|
Dim sText As String = EgtMsg(90796) & " " & i.ToString()
|
||||||
If Mach.m_bPause Then AddPauseText(sText)
|
If Mach.m_bPause Then AddPauseText(sText)
|
||||||
m_ItemList.Add(New NameIdLsBxItem(sText, i - 1, Mach.m_bEnabled))
|
m_ItemList.Add(New NameIdLsBxItem(sText, i - 1, Mach.m_bEnabled, MCH_OY.POCKETING))
|
||||||
ElseIf Mach.m_nType = MCH_OY.WATERJETTING Then ' Waterjet
|
ElseIf Mach.m_nType = MCH_OY.WATERJETTING Then ' Waterjet
|
||||||
Dim sText As String = EgtMsg(90797) & " " & i.ToString()
|
Dim sText As String = EgtMsg(90797) & " " & i.ToString()
|
||||||
If Mach.m_bPause Then AddPauseText(sText)
|
If Mach.m_bPause Then AddPauseText(sText)
|
||||||
m_ItemList.Add(New NameIdLsBxItem(sText, i - 1, Mach.m_bEnabled))
|
m_ItemList.Add(New NameIdLsBxItem(sText, i - 1, Mach.m_bEnabled, MCH_OY.WATERJETTING))
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Private Sub OnMyMouseDownScene(sender As Object, e As System.Windows.Forms.MouseEventArgs) Handles m_CurrProjPage.OnMouseDownScene
|
||||||
|
' Verifico di essere il gestore attivo e non in modalità sola visualizzazione
|
||||||
|
If Not m_bActive OrElse m_bShow Then Return
|
||||||
|
' Si può selezionare solo con il tasto sinistro e se stato NULL
|
||||||
|
If e.Button <> Windows.Forms.MouseButtons.Left Or
|
||||||
|
Not m_CurrProjPage.CurrentProjectScene.IsStatusNull() Then
|
||||||
|
Return
|
||||||
|
End If
|
||||||
|
' Reset drag
|
||||||
|
m_nDragInd = -1
|
||||||
|
m_nDragType = 0
|
||||||
|
' Reset selection interface
|
||||||
|
m_nSelected = GDB_ID.NULL
|
||||||
|
' Verifico se selezionato estremo di taglio con lama
|
||||||
|
EgtSetObjFilterForSelWin(False, True, False, False, False)
|
||||||
|
Dim nSel As Integer
|
||||||
|
EgtSelect(e.Location, Scene.DIM_SEL, Scene.DIM_SEL, nSel)
|
||||||
|
Dim nId As Integer = EgtGetFirstObjInSelWin()
|
||||||
|
While nId <> GDB_ID.NULL
|
||||||
|
' Verifico sia un attacco o uscita di taglio con lama
|
||||||
|
Dim nType As Integer = 0
|
||||||
|
Dim sName As String = ""
|
||||||
|
EgtGetName(nId, sName)
|
||||||
|
If String.Compare(sName, NAME_PV_PRECUT) = 0 Then
|
||||||
|
nType = 1
|
||||||
|
ElseIf String.Compare(sName, NAME_PV_POSTCUT) = 0 Then
|
||||||
|
nType = 2
|
||||||
|
ElseIf String.Compare(sName, NAME_PV_CUT) = 0 Then
|
||||||
|
nType = 3
|
||||||
|
End If
|
||||||
|
If nType = 1 Or nType = 2 Then
|
||||||
|
Dim nPvId As Integer = EgtGetParent(EgtGetParent(nId))
|
||||||
|
Dim nMchId As Integer = GDB_ID.NULL
|
||||||
|
If EgtGetInfo(nPvId, "MId", nMchId) Then
|
||||||
|
For nInd As Integer = 0 To m_MachiningList.Count() - 1
|
||||||
|
If m_MachiningList(nInd).m_nId = nMchId Then
|
||||||
|
m_nDragInd = nInd
|
||||||
|
m_nDragType = nType
|
||||||
|
End If
|
||||||
|
For nJ As Integer = 0 To m_MachiningList(nInd).m_vOthId.Count() - 1
|
||||||
|
If m_MachiningList(nInd).m_vOthId(nJ) = nMchId Then
|
||||||
|
m_nDragInd = nInd
|
||||||
|
m_nDragType = nType
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
If m_nDragInd >= 0 Then
|
||||||
|
' Assegno l'id dell'elemnto selezionato
|
||||||
|
m_nSelected = m_nDragInd
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
End If
|
||||||
|
If m_nDragInd >= 0 Then
|
||||||
|
' Assegno l'id dell'elemnto selezionato
|
||||||
|
m_nSelected = m_nDragInd
|
||||||
|
Exit While
|
||||||
|
End If
|
||||||
|
ElseIf nType = 3 Then
|
||||||
|
Dim nPvId As Integer = EgtGetParent(EgtGetParent(nId))
|
||||||
|
Dim nMchId As Integer = GDB_ID.NULL
|
||||||
|
If EgtGetInfo(nPvId, "MId", nMchId) Then
|
||||||
|
For nInd As Integer = 0 To m_MachiningList.Count() - 1
|
||||||
|
If m_MachiningList(nInd).m_nId = nMchId Then
|
||||||
|
m_nSelected = nInd
|
||||||
|
End If
|
||||||
|
For nJ As Integer = 0 To m_MachiningList(nInd).m_vOthId.Count() - 1
|
||||||
|
If m_MachiningList(nInd).m_vOthId(nJ) = nMchId Then
|
||||||
|
m_nSelected = nInd
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
If m_nSelected >= 0 Then Exit For
|
||||||
|
Next
|
||||||
|
End If
|
||||||
|
If m_nSelected >= 0 Then Exit While
|
||||||
|
End If
|
||||||
|
nId = EgtGetNextObjInSelWin()
|
||||||
|
End While
|
||||||
|
' Sistemazioni per drag
|
||||||
|
If m_nSelected >= 0 AndAlso EgtUnProjectPoint(e.Location, m_ptDragPrev) Then
|
||||||
|
MachiningLsBx.SelectedIndex = m_nSelected
|
||||||
|
Else
|
||||||
|
m_nDragInd = -1
|
||||||
|
m_nDragType = 0
|
||||||
|
m_nSelected = GDB_ID.NULL
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub OnMyMouseMoveScene(sender As Object, e As System.Windows.Forms.MouseEventArgs) Handles m_CurrProjPage.OnMouseMoveScene
|
||||||
|
' Verifico di essere il gestore attivo e non in modalità sola visualizzazione
|
||||||
|
If Not m_bActive OrElse m_bShow Then Return
|
||||||
|
' Se drag non abilitato o in corso
|
||||||
|
If m_nDragInd = -1L Or m_bDragging Then Return
|
||||||
|
m_bDragging = True
|
||||||
|
Dim nOperId As Integer = m_MachiningList(m_nDragInd).m_nId
|
||||||
|
' Ricavo il punto corrente in coordinate mondo
|
||||||
|
Dim ptCurr As Point3d
|
||||||
|
EgtUnProjectPoint(e.Location, ptCurr)
|
||||||
|
' Ricavo il vettore di movimento e la variazione di lunghezza
|
||||||
|
Dim vtMove As Vector3d = ptCurr - m_ptDragPrev
|
||||||
|
Dim dDelta = vtMove * m_MachiningList(m_nDragInd).m_vtDir
|
||||||
|
If m_nDragType = 1 Then
|
||||||
|
Dim dOrigUsal As Double = 0
|
||||||
|
Dim dUsal As Double
|
||||||
|
' ----------------------- REPEAT -----------------------
|
||||||
|
Do
|
||||||
|
dDelta = -dDelta
|
||||||
|
' Leggo il valore salvato nella geometria
|
||||||
|
EgtGetInfo(nOperId, INFO_MCH_USER_SAL, dOrigUsal)
|
||||||
|
dUsal = dOrigUsal + dDelta
|
||||||
|
' Se c'è limite alla lunghezza libera
|
||||||
|
If m_MachiningList(m_nDragInd).m_dStartFreeLen < FREELEN_INF Then
|
||||||
|
' Recupero sicurezza in corner interno
|
||||||
|
Dim dCornerSafety As Double = Math.Max(GetPrivateProfileDouble(S_MACH_NEST, K_MACH_SAFE_LEN_INTCORNER, 1, m_MainWindow.GetMachIniFile()), 10 * EPS_SMALL)
|
||||||
|
' Recupero lunghezza baffo del taglio
|
||||||
|
Dim nPvId As Integer = GDB_ID.NULL
|
||||||
|
EgtGetInfo(EgtGetFirstNameInGroup(nOperId, NAME_PREVIEW), INFO_PV_ONPART_ID, nPvId)
|
||||||
|
Dim dDT As Double = 0
|
||||||
|
EgtGetInfo(EgtGetFirstGroupInGroup(nPvId), "DT", dDT)
|
||||||
|
dUsal = Math.Min(dUsal, m_MachiningList(m_nDragInd).m_dStartFreeLen - dDT - dCornerSafety)
|
||||||
|
End If
|
||||||
|
' Modifica della lavorazione
|
||||||
|
EgtSetCurrMachining(nOperId)
|
||||||
|
Dim dAddLen As Double = 0
|
||||||
|
EgtGetMachiningParam(MCH_MP.STARTADDLEN, dAddLen)
|
||||||
|
|
||||||
|
If dAddLen - dOrigUsal < -10 * EPS_SMALL Then
|
||||||
|
m_bDragging = False
|
||||||
|
Return
|
||||||
|
End If
|
||||||
|
EgtSetMachiningParam(MCH_MP.STARTADDLEN, dAddLen + dUsal - dOrigUsal)
|
||||||
|
EgtSetInfo(nOperId, INFO_MCH_USER_SAL, dUsal)
|
||||||
|
Loop Until UpdateMachiningPreview(m_MachiningList(m_nDragInd).m_nId, True)
|
||||||
|
' ----------------------- REPEAT (solo se il segmento scompare) -----------------------
|
||||||
|
Else
|
||||||
|
Dim dOrigUeal As Double = 0
|
||||||
|
Dim dUeal As Double
|
||||||
|
dDelta = -dDelta
|
||||||
|
Do
|
||||||
|
dDelta = -dDelta
|
||||||
|
' Leggo il valore salvato nella geometria
|
||||||
|
EgtGetInfo(nOperId, INFO_MCH_USER_EAL, dOrigUeal)
|
||||||
|
dUeal = dOrigUeal + dDelta
|
||||||
|
' Se c'è limite alla lunghezza libera
|
||||||
|
If m_MachiningList(m_nDragInd).m_dEndFreeLen < FREELEN_INF Then
|
||||||
|
' Recupero sicurezza in corner interno
|
||||||
|
Dim dCornerSafety As Double = Math.Max(GetPrivateProfileDouble(S_MACH_NEST, K_MACH_SAFE_LEN_INTCORNER, 1, m_MainWindow.GetMachIniFile()), 10 * EPS_SMALL)
|
||||||
|
' Recupero lunghezza baffo del taglio
|
||||||
|
Dim nPvId As Integer = GDB_ID.NULL
|
||||||
|
EgtGetInfo(EgtGetFirstNameInGroup(nOperId, NAME_PREVIEW), INFO_PV_ONPART_ID, nPvId)
|
||||||
|
Dim dDT As Double = 0
|
||||||
|
EgtGetInfo(EgtGetFirstGroupInGroup(nPvId), "DT", dDT)
|
||||||
|
dUeal = Math.Min(dUeal, m_MachiningList(m_nDragInd).m_dEndFreeLen - dDT - dCornerSafety)
|
||||||
|
End If
|
||||||
|
' Modifica della lavorazione
|
||||||
|
EgtSetCurrMachining(nOperId)
|
||||||
|
Dim dAddLen As Double = 0
|
||||||
|
EgtGetMachiningParam(MCH_MP.ENDADDLEN, dAddLen)
|
||||||
|
|
||||||
|
If dAddLen - dOrigUeal < -10 * EPS_SMALL Then
|
||||||
|
m_bDragging = False
|
||||||
|
Return
|
||||||
|
End If
|
||||||
|
EgtSetMachiningParam(MCH_MP.ENDADDLEN, dAddLen + dUeal - dOrigUeal)
|
||||||
|
EgtSetInfo(nOperId, INFO_MCH_USER_EAL, dUeal)
|
||||||
|
Loop Until UpdateMachiningPreview(m_MachiningList(m_nDragInd).m_nId, True)
|
||||||
|
End If
|
||||||
|
' verifico interferenza
|
||||||
|
EgtVerifyMachining(m_MachiningList(m_nDragInd).m_nId, m_MachiningList(m_nDragInd).m_nInterf)
|
||||||
|
ColorMachining(m_MachiningList(m_nDragInd))
|
||||||
|
ColorNumberArrow(m_nDragInd)
|
||||||
|
' Aggiorno visualizzazione
|
||||||
|
EgtDraw()
|
||||||
|
m_bModified = True
|
||||||
|
' Aggiorno punto e stato di drag
|
||||||
|
m_ptDragPrev = ptCurr
|
||||||
|
m_bDragging = False
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub OnMyMouseUpScene(sender As Object, e As System.Windows.Forms.MouseEventArgs) Handles m_CurrProjPage.OnMouseUpScene
|
||||||
|
' Verifico di essere il gestore attivo e non in modalità sola visualizzazione
|
||||||
|
If Not m_bActive OrElse m_bShow Then Return
|
||||||
|
' Se drag in corso
|
||||||
|
If m_nDragInd >= 0 Then
|
||||||
|
m_nDragInd = -1
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
Private Sub AddPauseText(ByRef sName As String)
|
Private Sub AddPauseText(ByRef sName As String)
|
||||||
sName &= " " & EgtMsg(MSG_SPLITPAGEUC + 32) ' Pausa
|
sName &= " " & EgtMsg(MSG_SPLITPAGEUC + 32) ' Pausa
|
||||||
End Sub
|
End Sub
|
||||||
@@ -180,11 +399,16 @@ Public Class SplitPageUC
|
|||||||
|
|
||||||
Private Sub MachiningLsBx_SelectionChanged(sender As Object, e As SelectionChangedEventArgs) Handles MachiningLsBx.SelectionChanged
|
Private Sub MachiningLsBx_SelectionChanged(sender As Object, e As SelectionChangedEventArgs) Handles MachiningLsBx.SelectionChanged
|
||||||
If MachiningLsBx.SelectedItems.Count = 0 Then Return
|
If MachiningLsBx.SelectedItems.Count = 0 Then Return
|
||||||
|
If MachiningLsBx.SelectedItems.Count = 1 Then m_bAreHomogeneous = True
|
||||||
' creo lista ordinata dei selezionati
|
' creo lista ordinata dei selezionati
|
||||||
Dim ItemList As New List(Of NameIdLsBxItem)
|
Dim ItemList As New List(Of NameIdLsBxItem)
|
||||||
For Each Item As NameIdLsBxItem In MachiningLsBx.SelectedItems
|
For Each Item As NameIdLsBxItem In MachiningLsBx.SelectedItems
|
||||||
ItemList.Add(Item)
|
ItemList.Add(Item)
|
||||||
Next
|
Next
|
||||||
|
|
||||||
|
' verifico che le lavorazioni siano dello stesso tipo
|
||||||
|
VerifyHomogenousMachining(ItemList)
|
||||||
|
|
||||||
ItemList.Sort(Function(x, y) Comparer(Of Integer).Default.Compare(m_ItemList.IndexOf(x), m_ItemList.IndexOf(y)))
|
ItemList.Sort(Function(x, y) Comparer(Of Integer).Default.Compare(m_ItemList.IndexOf(x), m_ItemList.IndexOf(y)))
|
||||||
' verifico che siano contigui
|
' verifico che siano contigui
|
||||||
Dim bContigus As Boolean = False
|
Dim bContigus As Boolean = False
|
||||||
@@ -287,8 +511,14 @@ Public Class SplitPageUC
|
|||||||
EgtDraw()
|
EgtDraw()
|
||||||
' Imposto flag di modifica
|
' Imposto flag di modifica
|
||||||
m_bModified = True
|
m_bModified = True
|
||||||
' Abilitazione bottone Next
|
|
||||||
EnableButtons()
|
' recupero l'elenco degli elementi selezionati
|
||||||
|
Dim ItemList As New List(Of NameIdLsBxItem)
|
||||||
|
For Each Item As NameIdLsBxItem In MachiningLsBx.SelectedItems
|
||||||
|
ItemList.Add(Item)
|
||||||
|
Next
|
||||||
|
|
||||||
|
VerifyHomogenousMachining(ItemList)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub AllOnBtn_Click(sender As Object, e As RoutedEventArgs) Handles AllOnBtn.Click
|
Private Sub AllOnBtn_Click(sender As Object, e As RoutedEventArgs) Handles AllOnBtn.Click
|
||||||
@@ -772,26 +1002,37 @@ Public Class SplitPageUC
|
|||||||
bFirstInd = False
|
bFirstInd = False
|
||||||
End If
|
End If
|
||||||
' ------------------ FINE PREPARAZIONE TASTIERINO VIRTUALE ------------------
|
' ------------------ FINE PREPARAZIONE TASTIERINO VIRTUALE ------------------
|
||||||
|
Dim bRepeat As Boolean = False
|
||||||
|
Do
|
||||||
|
' Se c'è limite alla lunghezza libera
|
||||||
|
If m_MachiningList(nI).m_dStartFreeLen < FREELEN_INF Then
|
||||||
|
' Recupero sicurezza in corner interno
|
||||||
|
Dim dCornerSafety As Double = Math.Max(GetPrivateProfileDouble(S_MACH_NEST, K_MACH_SAFE_LEN_INTCORNER, 1, m_MainWindow.GetMachIniFile()), 10 * EPS_SMALL)
|
||||||
|
' Recupero lunghezza baffo del taglio
|
||||||
|
Dim nPvId As Integer = GDB_ID.NULL
|
||||||
|
EgtGetInfo(EgtGetFirstNameInGroup(nOperId, NAME_PREVIEW), INFO_PV_ONPART_ID, nPvId)
|
||||||
|
Dim dDT As Double = 0
|
||||||
|
EgtGetInfo(EgtGetFirstGroupInGroup(nPvId), "DT", dDT)
|
||||||
|
dUsal = Math.Min(dUsal, m_MachiningList(nI).m_dStartFreeLen - dDT - dCornerSafety)
|
||||||
|
End If
|
||||||
|
' Modifica della lavorazione
|
||||||
|
EgtSetCurrMachining(nOperId)
|
||||||
|
Dim dAddLen As Double = 0
|
||||||
|
EgtGetMachiningParam(MCH_MP.STARTADDLEN, dAddLen)
|
||||||
|
' verifico che non sia sull'angolo interno (altrimenti vieto la modifica)
|
||||||
|
If dAddLen - dOrigUsal < -10 * EPS_SMALL Then
|
||||||
|
Return
|
||||||
|
End If
|
||||||
|
EgtSetMachiningParam(MCH_MP.STARTADDLEN, dAddLen + dUsal - dOrigUsal)
|
||||||
|
EgtSetInfo(nOperId, INFO_MCH_USER_SAL, dUsal)
|
||||||
|
bRepeat = Not UpdateMachiningPreview(m_MachiningList(nI).m_nId, True)
|
||||||
|
If bRepeat Then
|
||||||
|
EgtSetMachiningParam(MCH_MP.STARTADDLEN, dOrigUsal)
|
||||||
|
EgtSetInfo(nOperId, INFO_MCH_USER_SAL, dOrigUsal)
|
||||||
|
dUsal = dOrigUsal
|
||||||
|
End If
|
||||||
|
Loop Until Not bRepeat
|
||||||
|
|
||||||
' Se c'è limite alla lunghezza libera
|
|
||||||
If m_MachiningList(nI).m_dStartFreeLen < FREELEN_INF Then
|
|
||||||
' Recupero sicurezza in corner interno
|
|
||||||
Dim dCornerSafety As Double = Math.Max(GetPrivateProfileDouble(S_MACH_NEST, K_MACH_SAFE_LEN_INTCORNER, 1, m_MainWindow.GetMachIniFile()), 10 * EPS_SMALL)
|
|
||||||
' Recupero lunghezza baffo del taglio
|
|
||||||
Dim nPvId As Integer = GDB_ID.NULL
|
|
||||||
EgtGetInfo(EgtGetFirstNameInGroup(nOperId, NAME_PREVIEW), INFO_PV_ONPART_ID, nPvId)
|
|
||||||
Dim dDT As Double = 0
|
|
||||||
EgtGetInfo(EgtGetFirstGroupInGroup(nPvId), "DT", dDT)
|
|
||||||
dUsal = Math.Min(dUsal, m_MachiningList(nI).m_dStartFreeLen - dDT - dCornerSafety)
|
|
||||||
End If
|
|
||||||
' Modifica della lavorazione
|
|
||||||
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
|
' verifico interferenza
|
||||||
EgtVerifyMachining(m_MachiningList(nI).m_nId, m_MachiningList(nI).m_nInterf)
|
EgtVerifyMachining(m_MachiningList(nI).m_nId, m_MachiningList(nI).m_nInterf)
|
||||||
ColorMachining(m_MachiningList(nI))
|
ColorMachining(m_MachiningList(nI))
|
||||||
@@ -903,7 +1144,7 @@ Public Class SplitPageUC
|
|||||||
' Recupero la lavorazione corrente
|
' Recupero la lavorazione corrente
|
||||||
If m_CurrFirstInd = -1 Then Return
|
If m_CurrFirstInd = -1 Then Return
|
||||||
Dim bGenModif As Boolean = False
|
Dim bGenModif As Boolean = False
|
||||||
For Index As integer = m_CurrFirstInd To m_CurrLastInd
|
For Index As Integer = m_CurrFirstInd To m_CurrLastInd
|
||||||
Dim nI As Integer = m_ItemList(Index).Ind
|
Dim nI As Integer = m_ItemList(Index).Ind
|
||||||
Dim nOperId As Integer = m_MachiningList(nI).m_nId
|
Dim nOperId As Integer = m_MachiningList(nI).m_nId
|
||||||
Dim nMachiningType As Integer = EgtGetOperationType(nOperId)
|
Dim nMachiningType As Integer = EgtGetOperationType(nOperId)
|
||||||
@@ -924,26 +1165,38 @@ Public Class SplitPageUC
|
|||||||
bFirstInd = False
|
bFirstInd = False
|
||||||
End If
|
End If
|
||||||
' ------------------ FINE PREPARAZIONE TASTIERINO VIRTUALE ------------------
|
' ------------------ FINE PREPARAZIONE TASTIERINO VIRTUALE ------------------
|
||||||
|
Dim bRepeat As Boolean = False
|
||||||
|
Do
|
||||||
|
' Se c'è limite alla lunghezza libera
|
||||||
|
If m_MachiningList(nI).m_dEndFreeLen < FREELEN_INF Then
|
||||||
|
' Recupero sicurezza in corner interno
|
||||||
|
Dim dCornerSafety As Double = Math.Max(GetPrivateProfileDouble(S_MACH_NEST, K_MACH_SAFE_LEN_INTCORNER, 1, m_MainWindow.GetMachIniFile()), 10 * EPS_SMALL)
|
||||||
|
' Recupero lunghezza baffo del taglio
|
||||||
|
Dim nPvId As Integer = GDB_ID.NULL
|
||||||
|
EgtGetInfo(EgtGetFirstNameInGroup(nOperId, NAME_PREVIEW), INFO_PV_ONPART_ID, nPvId)
|
||||||
|
Dim dDT As Double = 0
|
||||||
|
EgtGetInfo(EgtGetFirstGroupInGroup(nPvId), "DT", dDT)
|
||||||
|
dUeal = Math.Min(dUeal, m_MachiningList(nI).m_dEndFreeLen - dDT - dCornerSafety)
|
||||||
|
End If
|
||||||
|
|
||||||
|
' Modifica della lavorazione
|
||||||
|
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)
|
||||||
|
bRepeat = Not UpdateMachiningPreview(m_MachiningList(nI).m_nId, True)
|
||||||
|
If bRepeat Then
|
||||||
|
EgtSetMachiningParam(MCH_MP.STARTADDLEN, dOrigUeal)
|
||||||
|
EgtSetInfo(nOperId, INFO_MCH_USER_SAL, dOrigUeal)
|
||||||
|
dUeal = dOrigUeal
|
||||||
|
End If
|
||||||
|
Loop Until Not bRepeat
|
||||||
|
|
||||||
' Se c'è limite alla lunghezza libera
|
|
||||||
If m_MachiningList(nI).m_dEndFreeLen < FREELEN_INF Then
|
|
||||||
' Recupero sicurezza in corner interno
|
|
||||||
Dim dCornerSafety As Double = Math.Max(GetPrivateProfileDouble(S_MACH_NEST, K_MACH_SAFE_LEN_INTCORNER, 1, m_MainWindow.GetMachIniFile()), 10 * EPS_SMALL)
|
|
||||||
' Recupero lunghezza baffo del taglio
|
|
||||||
Dim nPvId As Integer = GDB_ID.NULL
|
|
||||||
EgtGetInfo(EgtGetFirstNameInGroup(nOperId, NAME_PREVIEW), INFO_PV_ONPART_ID, nPvId)
|
|
||||||
Dim dDT As Double = 0
|
|
||||||
EgtGetInfo(EgtGetFirstGroupInGroup(nPvId), "DT", dDT)
|
|
||||||
dUeal = Math.Min(dUeal, m_MachiningList(nI).m_dEndFreeLen - dDT - dCornerSafety)
|
|
||||||
End If
|
|
||||||
' Modifica della lavorazione
|
|
||||||
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
|
' verifico interferenza
|
||||||
EgtVerifyMachining(m_MachiningList(nI).m_nId, m_MachiningList(nI).m_nInterf)
|
EgtVerifyMachining(m_MachiningList(nI).m_nId, m_MachiningList(nI).m_nInterf)
|
||||||
ColorMachining(m_MachiningList(nI))
|
ColorMachining(m_MachiningList(nI))
|
||||||
@@ -1027,40 +1280,40 @@ Public Class SplitPageUC
|
|||||||
For Index As Integer = m_CurrFirstInd To m_CurrLastInd
|
For Index As Integer = m_CurrFirstInd To m_CurrLastInd
|
||||||
Dim nI As Integer = m_ItemList(Index).Ind
|
Dim nI As Integer = m_ItemList(Index).Ind
|
||||||
' Si possono invertire solo i tagli di lama
|
' Si possono invertire solo i tagli di lama
|
||||||
If m_MachiningList( nI).m_nType <> MCH_OY.SAWING Then Continue For
|
If m_MachiningList(nI).m_nType <> MCH_OY.SAWING Then Continue For
|
||||||
' Non si possono invertire i tagli di lama inclinati
|
' Non si possono invertire i tagli di lama inclinati
|
||||||
If Math.Abs( m_MachiningList(nI).m_dSideAng) > 0.1 Then Continue For
|
If Math.Abs(m_MachiningList(nI).m_dSideAng) > 0.1 Then Continue For
|
||||||
' Se abilitata inversione automatica e quindi non invertito
|
' Se abilitata inversione automatica e quindi non invertito
|
||||||
If m_MachiningList( nI).m_bEnableInvert Then
|
If m_MachiningList(nI).m_bEnableInvert Then
|
||||||
' Inverto e disabilito inversione automatica
|
' Inverto e disabilito inversione automatica
|
||||||
If CamAuto.InvertVerticalCut( m_MachiningList( nI).m_nId) Then
|
If CamAuto.InvertVerticalCut(m_MachiningList(nI).m_nId) Then
|
||||||
m_MachiningList( nI).m_bInvert = True
|
m_MachiningList(nI).m_bInvert = True
|
||||||
m_MachiningList( nI).m_vtDir = - m_MachiningList( nI).m_vtDir
|
m_MachiningList(nI).m_vtDir = -m_MachiningList(nI).m_vtDir
|
||||||
m_MachiningList( nI).m_bEnableInvert = False
|
m_MachiningList(nI).m_bEnableInvert = False
|
||||||
SwapStartEndData( nI)
|
SwapStartEndData(nI)
|
||||||
ResetEnableInvert( m_MachiningList( nI).m_nEntId)
|
ResetEnableInvert(m_MachiningList(nI).m_nEntId)
|
||||||
EgtErase( m_MachiningList( nI).m_nArrId)
|
EgtErase(m_MachiningList(nI).m_nArrId)
|
||||||
NumberDirectionMachining( nI, False)
|
NumberDirectionMachining(nI, False)
|
||||||
EgtDraw()
|
EgtDraw()
|
||||||
End If
|
End If
|
||||||
' se altrimenti disabilitata inversione automatica e invertito
|
' se altrimenti disabilitata inversione automatica e invertito
|
||||||
ElseIf m_MachiningList( nI).m_bInvert Then
|
ElseIf m_MachiningList(nI).m_bInvert Then
|
||||||
' Tolgo inversione e lascio disabilitazione inv. autom.
|
' Tolgo inversione e lascio disabilitazione inv. autom.
|
||||||
If CamAuto.InvertVerticalCut( m_MachiningList( nI).m_nId) Then
|
If CamAuto.InvertVerticalCut(m_MachiningList(nI).m_nId) Then
|
||||||
m_MachiningList( nI).m_bInvert = False
|
m_MachiningList(nI).m_bInvert = False
|
||||||
m_MachiningList( nI).m_vtDir = - m_MachiningList( nI).m_vtDir
|
m_MachiningList(nI).m_vtDir = -m_MachiningList(nI).m_vtDir
|
||||||
SwapStartEndData( nI)
|
SwapStartEndData(nI)
|
||||||
EgtErase( m_MachiningList( nI).m_nArrId)
|
EgtErase(m_MachiningList(nI).m_nArrId)
|
||||||
NumberDirectionMachining( nI, False)
|
NumberDirectionMachining(nI, False)
|
||||||
EgtDraw()
|
EgtDraw()
|
||||||
End If
|
End If
|
||||||
' altrimenti disabilitata inversione automatica e non invertito
|
' altrimenti disabilitata inversione automatica e non invertito
|
||||||
Else
|
Else
|
||||||
' Abilito inversione automatica e lascio non invertito
|
' Abilito inversione automatica e lascio non invertito
|
||||||
m_MachiningList( nI).m_bEnableInvert = True
|
m_MachiningList(nI).m_bEnableInvert = True
|
||||||
SetEnableInvert( m_MachiningList( nI).m_nEntId)
|
SetEnableInvert(m_MachiningList(nI).m_nEntId)
|
||||||
EgtErase( m_MachiningList( nI).m_nArrId)
|
EgtErase(m_MachiningList(nI).m_nArrId)
|
||||||
NumberDirectionMachining( nI, False)
|
NumberDirectionMachining(nI, False)
|
||||||
EgtDraw()
|
EgtDraw()
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
@@ -1122,7 +1375,7 @@ Public Class SplitPageUC
|
|||||||
' Se fase corrente è la prima, imposto partenza normale
|
' Se fase corrente è la prima, imposto partenza normale
|
||||||
If m_nCurrPhase = 1 Then
|
If m_nCurrPhase = 1 Then
|
||||||
m_MainWindow.m_CurrentProjectPageUC.ResetProjectNcRestart()
|
m_MainWindow.m_CurrentProjectPageUC.ResetProjectNcRestart()
|
||||||
' Altrimenti, imposto la ripartenza dalla fase corrente
|
' Altrimenti, imposto la ripartenza dalla fase corrente
|
||||||
Else
|
Else
|
||||||
m_MainWindow.m_CurrentProjectPageUC.SetProjectNcRestart(m_nCurrPhase)
|
m_MainWindow.m_CurrentProjectPageUC.SetProjectNcRestart(m_nCurrPhase)
|
||||||
m_MainWindow.m_CurrentProjectPageUC.SetInfoMessage(EgtMsg(MSG_SPLITPAGEUC + 19) & " (" & m_nCurrPhase.ToString() & ")")
|
m_MainWindow.m_CurrentProjectPageUC.SetInfoMessage(EgtMsg(MSG_SPLITPAGEUC + 19) & " (" & m_nCurrPhase.ToString() & ")")
|
||||||
@@ -1141,7 +1394,7 @@ Public Class SplitPageUC
|
|||||||
' Aggiorno le lavorazioni (eliminato sort per lasciare ordine immutato)
|
' Aggiorno le lavorazioni (eliminato sort per lasciare ordine immutato)
|
||||||
If m_MainWindow.m_CurrentMachine.WaterJettingActive Then ResetAllMachinings()
|
If m_MainWindow.m_CurrentMachine.WaterJettingActive Then ResetAllMachinings()
|
||||||
m_MainWindow.m_CurrentProjectPageUC.SetOrderMachiningFlag()
|
m_MainWindow.m_CurrentProjectPageUC.SetOrderMachiningFlag()
|
||||||
If m_MainWindow.m_CurrentMachine.WaterJettingActive Then
|
If m_MainWindow.m_CurrentMachine.WaterJettingActive Then
|
||||||
Dim bModif As Boolean = TestAllMachiningsForStrict()
|
Dim bModif As Boolean = TestAllMachiningsForStrict()
|
||||||
If bModif Then m_MainWindow.m_CurrentProjectPageUC.SetWarningMessage(EgtMsg(90321)) 'Ridotte alcune lavorazioni per evitare interferenze
|
If bModif Then m_MainWindow.m_CurrentProjectPageUC.SetWarningMessage(EgtMsg(90321)) 'Ridotte alcune lavorazioni per evitare interferenze
|
||||||
End If
|
End If
|
||||||
@@ -1151,8 +1404,13 @@ Public Class SplitPageUC
|
|||||||
HideAllMachinings()
|
HideAllMachinings()
|
||||||
' Preparo la lista delle lavorazioni e le disabilito
|
' Preparo la lista delle lavorazioni e le disabilito
|
||||||
CalculateSplitMachList(m_nCurrPhase, m_MachiningList)
|
CalculateSplitMachList(m_nCurrPhase, m_MachiningList)
|
||||||
|
m_nCountSawing = 0
|
||||||
|
m_nCountWaterjetting = 0
|
||||||
|
m_nCountOtherMachining = 0
|
||||||
For nI As Integer = 0 To m_MachiningList.Count() - 1
|
For nI As Integer = 0 To m_MachiningList.Count() - 1
|
||||||
m_MachiningList(nI).m_bEnabled = False
|
m_MachiningList(nI).m_bEnabled = False
|
||||||
|
' conto il numero di tipi di lavorazioni
|
||||||
|
CountMachiningType(m_MachiningList(nI), m_nCountSawing, m_nCountWaterjetting, m_nCountOtherMachining)
|
||||||
Next
|
Next
|
||||||
' Aggiorno visualizzazione delle lavorazioni
|
' Aggiorno visualizzazione delle lavorazioni
|
||||||
EgtEmptyGroup(m_nNbrGrpId)
|
EgtEmptyGroup(m_nNbrGrpId)
|
||||||
@@ -1171,6 +1429,7 @@ Public Class SplitPageUC
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub SplitPageUC_Unloaded(sender As Object, e As EventArgs) Handles Me.Unloaded
|
Private Sub SplitPageUC_Unloaded(sender As Object, e As EventArgs) Handles Me.Unloaded
|
||||||
|
m_bActive = False
|
||||||
m_MainWindow.m_CurrentProjectPageUC.ClearMessage()
|
m_MainWindow.m_CurrentProjectPageUC.ClearMessage()
|
||||||
ExitSplit(Not m_bToNext)
|
ExitSplit(Not m_bToNext)
|
||||||
EgtDraw()
|
EgtDraw()
|
||||||
@@ -1338,6 +1597,86 @@ Public Class SplitPageUC
|
|||||||
ModifEndBtn.IsEnabled = Not m_bShow
|
ModifEndBtn.IsEnabled = Not m_bShow
|
||||||
InvertBtn.IsEnabled = Not m_bShow
|
InvertBtn.IsEnabled = Not m_bShow
|
||||||
PauseBtn.IsEnabled = Not m_bShow And m_MainWindow.m_CurrentMachine.bEnablePause
|
PauseBtn.IsEnabled = Not m_bShow And m_MainWindow.m_CurrentMachine.bEnablePause
|
||||||
|
|
||||||
|
' nascondo i comandi che non devono essere visualizzati in funzione delle lavorazioni attive
|
||||||
|
If m_nCountSawing = 0 And (m_nCountWaterjetting > 0 Or m_nCountOtherMachining) Then
|
||||||
|
VisibilityButtonFromMachinig(MCH_OY.WATERJETTING)
|
||||||
|
Else
|
||||||
|
VisibilityButtonFromMachinig(MCH_OY.SAWING)
|
||||||
|
End If
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub VerifyHomogenousMachining(ItemList As List(Of NameIdLsBxItem))
|
||||||
|
If IsNothing(ItemList) OrElse ItemList.Count = 0 Then
|
||||||
|
m_MainWindow.m_CurrentProjectPageUC.ClearMessage()
|
||||||
|
Return
|
||||||
|
End If
|
||||||
|
Dim nSawing As Integer = 0
|
||||||
|
Dim nWaterjetting As Integer = 0
|
||||||
|
Dim nOtherMachining As Integer = 0
|
||||||
|
' conto il numero di tipi di lavprazioni
|
||||||
|
For Each Item As NameIdLsBxItem In ItemList
|
||||||
|
If Item.Type = MCH_OY.SAWING Then
|
||||||
|
nSawing += 1
|
||||||
|
ElseIf Item.Type = MCH_OY.WATERJETTING Then
|
||||||
|
nWaterjetting += 1
|
||||||
|
Else
|
||||||
|
nOtherMachining += 1
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
' verifico se le lavorazioni sono omeogenee
|
||||||
|
If nSawing > 0 And (nWaterjetting > 0 Or nOtherMachining > 0) Then
|
||||||
|
m_bAreHomogeneous = False
|
||||||
|
VisibilityButtonFromMachinig(MCH_OY.SAWING)
|
||||||
|
ElseIf nSawing = 0 And nOtherMachining > 0 And nWaterjetting > 0 Then
|
||||||
|
m_bAreHomogeneous = False
|
||||||
|
VisibilityButtonFromMachinig(MCH_OY.WATERJETTING)
|
||||||
|
Else
|
||||||
|
VisibilityButtonFromMachinig(ItemList(0).Type)
|
||||||
|
m_bAreHomogeneous = True
|
||||||
|
End If
|
||||||
|
' eventualmente stampo messaggio
|
||||||
|
If Not m_bAreHomogeneous Then
|
||||||
|
m_MainWindow.m_CurrentProjectPageUC.ClearMessage()
|
||||||
|
m_MainWindow.m_CurrentProjectPageUC.SetWarningMessage("Lavorazioni non omogenee")
|
||||||
|
Else
|
||||||
|
m_MainWindow.m_CurrentProjectPageUC.ClearMessage()
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub VisibilityButtonFromMachinig(ByVal Type As Integer)
|
||||||
|
If Type <> MCH_OY.SAWING Then
|
||||||
|
CutBtn.Visibility = Visibility.Hidden
|
||||||
|
CutStartBtn.Visibility = Visibility.Hidden
|
||||||
|
CutEndBtn.Visibility = Visibility.Hidden
|
||||||
|
|
||||||
|
OutCenStartBtn.Visibility = Visibility.Hidden
|
||||||
|
OutCenEndBtn.Visibility = Visibility.Hidden
|
||||||
|
InvertBtn.Visibility = Visibility.Hidden
|
||||||
|
PauseBtn.Visibility = Visibility.Hidden
|
||||||
|
AllOutStartBtn.Visibility = Visibility.Hidden
|
||||||
|
AllCenStartBtn.Visibility = Visibility.Hidden
|
||||||
|
AllOutEndBtn.Visibility = Visibility.Hidden
|
||||||
|
AllCenEndBtn.Visibility = Visibility.Hidden
|
||||||
|
AllExtendBtn.Visibility = Visibility.Hidden
|
||||||
|
AllReduceBtn.Visibility = Visibility.Hidden
|
||||||
|
Else
|
||||||
|
CutBtn.Visibility = Visibility.Visible
|
||||||
|
CutStartBtn.Visibility = Visibility.Visible
|
||||||
|
CutEndBtn.Visibility = Visibility.Visible
|
||||||
|
|
||||||
|
OutCenStartBtn.Visibility = Visibility.Visible
|
||||||
|
OutCenEndBtn.Visibility = Visibility.Visible
|
||||||
|
InvertBtn.Visibility = Visibility.Visible
|
||||||
|
PauseBtn.Visibility = Visibility.Visible
|
||||||
|
AllOutStartBtn.Visibility = Visibility.Visible
|
||||||
|
AllCenStartBtn.Visibility = Visibility.Visible
|
||||||
|
AllOutEndBtn.Visibility = Visibility.Visible
|
||||||
|
AllCenEndBtn.Visibility = Visibility.Visible
|
||||||
|
AllExtendBtn.Visibility = Visibility.Visible
|
||||||
|
AllReduceBtn.Visibility = Visibility.Visible
|
||||||
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Function ModifyOtherLeadIn(nI As Integer, nLiOthType As Integer) As Boolean
|
Private Function ModifyOtherLeadIn(nI As Integer, nLiOthType As Integer) As Boolean
|
||||||
@@ -1572,6 +1911,7 @@ Public Class SplitPageUC
|
|||||||
Private m_nInd As Integer
|
Private m_nInd As Integer
|
||||||
Private m_sName As String
|
Private m_sName As String
|
||||||
Private m_bIsActive As Boolean
|
Private m_bIsActive As Boolean
|
||||||
|
Private m_nType As Integer
|
||||||
|
|
||||||
Public Property Ind As Integer
|
Public Property Ind As Integer
|
||||||
Get
|
Get
|
||||||
@@ -1606,10 +1946,20 @@ Public Class SplitPageUC
|
|||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
Sub New(Name As String, Ind As Integer, bIsActive As Boolean)
|
Public Property Type As Integer
|
||||||
|
Get
|
||||||
|
Return m_nType
|
||||||
|
End Get
|
||||||
|
Set(value As Integer)
|
||||||
|
m_nType = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Sub New(Name As String, Ind As Integer, bIsActive As Boolean, nType As Integer)
|
||||||
Me.m_sName = Name
|
Me.m_sName = Name
|
||||||
Me.m_nInd = Ind
|
Me.m_nInd = Ind
|
||||||
Me.m_bIsActive = bIsActive
|
Me.m_bIsActive = bIsActive
|
||||||
|
Me.m_nType = nType
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Public Sub NotifyPropertyChanged(propName As String)
|
Public Sub NotifyPropertyChanged(propName As String)
|
||||||
|
|||||||
@@ -67,6 +67,8 @@ Module ConstGen
|
|||||||
Public Const MACHININGS_DIR As String = "Machinings"
|
Public Const MACHININGS_DIR As String = "Machinings"
|
||||||
' Nome file Dati delle lucidature
|
' Nome file Dati delle lucidature
|
||||||
Public Const KITS_FILE As String = "Kits.data"
|
Public Const KITS_FILE As String = "Kits.data"
|
||||||
|
' Nome file Dati per waterJet
|
||||||
|
Public Const WATERJETDB_FILE As String = "WaterjetDB.data"
|
||||||
|
|
||||||
' File dei pezzi rovinati
|
' File dei pezzi rovinati
|
||||||
Public Const CURR_RUINED_EPL As String = "RuinedParts.epl"
|
Public Const CURR_RUINED_EPL As String = "RuinedParts.epl"
|
||||||
@@ -203,6 +205,7 @@ Module ConstGen
|
|||||||
Public Const INFO_DEPTH As String = "Depth"
|
Public Const INFO_DEPTH As String = "Depth"
|
||||||
Public Const INFO_WIDTH As String = "Width"
|
Public Const INFO_WIDTH As String = "Width"
|
||||||
Public Const INFO_DEPTH2 As String = "Depth2"
|
Public Const INFO_DEPTH2 As String = "Depth2"
|
||||||
|
Public CONST INFO_AGG2 As String = "Agg2"
|
||||||
' Info in entità da tagliare per taglio ristretto
|
' Info in entità da tagliare per taglio ristretto
|
||||||
Public Const INFO_STRICT As String = "Strict"
|
Public Const INFO_STRICT As String = "Strict"
|
||||||
' Info in entità da tagliare per angolo di lato e tallone
|
' Info in entità da tagliare per angolo di lato e tallone
|
||||||
|
|||||||
@@ -209,6 +209,7 @@
|
|||||||
Public Const K_MACH_CUTFSEVENABLE As String = "CutFsevEnable"
|
Public Const K_MACH_CUTFSEVENABLE As String = "CutFsevEnable"
|
||||||
Public Const K_MACH_CUTFSEVLEN As String = "CutFsevLen"
|
Public Const K_MACH_CUTFSEVLEN As String = "CutFsevLen"
|
||||||
Public Const K_MACH_CUTFSEVPERC As String = "CutFsevPerc"
|
Public Const K_MACH_CUTFSEVPERC As String = "CutFsevPerc"
|
||||||
|
Public Const K_USELASERORIGIN As String = "UseLaserOrigin"
|
||||||
' DrillMillC90
|
' DrillMillC90
|
||||||
' CutLongDxSx
|
' CutLongDxSx
|
||||||
' AngRotMultiCut
|
' AngRotMultiCut
|
||||||
@@ -276,6 +277,7 @@
|
|||||||
Public Const K_CURRDRIPSAWING As String = "CurrDripSawing"
|
Public Const K_CURRDRIPSAWING As String = "CurrDripSawing"
|
||||||
Public Const K_CURRDRIPDRILLING As String = "CurrDripDrilling"
|
Public Const K_CURRDRIPDRILLING As String = "CurrDripDrilling"
|
||||||
Public Const K_CURRWATERJETTING As String = "CurrWaterJetting"
|
Public Const K_CURRWATERJETTING As String = "CurrWaterJetting"
|
||||||
|
Public Const K_CURRWATERJETTINGQUALITY As String = "CurrWaterJettingQualilty"
|
||||||
|
|
||||||
Public Const S_MATERIALS As String = "Materials"
|
Public Const S_MATERIALS As String = "Materials"
|
||||||
Public Const K_CURRMATERIAL As String = "CurrMaterial"
|
Public Const K_CURRMATERIAL As String = "CurrMaterial"
|
||||||
|
|||||||
@@ -444,8 +444,8 @@ Public Class FlatteningCut
|
|||||||
StringToLen(WidthTxBx.Text, dWidth)
|
StringToLen(WidthTxBx.Text, dWidth)
|
||||||
' Recupero lo spessore della lama corrente
|
' Recupero lo spessore della lama corrente
|
||||||
EgtTdbSetCurrTool(m_MainWindow.m_CurrentMachine.sCurrSaw)
|
EgtTdbSetCurrTool(m_MainWindow.m_CurrentMachine.sCurrSaw)
|
||||||
Dim dThick As Double = 0
|
Dim dThick As Double = GetFootPrintTool()
|
||||||
EgtTdbGetCurrToolParam(MCH_TP.THICK, dThick)
|
'EgtTdbGetCurrToolParam(MCH_TP.THICK, dThick)
|
||||||
' La larghezza della spianatura nono può essere inferiore allo spessore della lama
|
' La larghezza della spianatura nono può essere inferiore allo spessore della lama
|
||||||
m_dWid = Math.Max(dWidth, dThick)
|
m_dWid = Math.Max(dWidth, dThick)
|
||||||
WidthTxBx.Text = LenToString(m_dWid, 2)
|
WidthTxBx.Text = LenToString(m_dWid, 2)
|
||||||
@@ -472,8 +472,8 @@ Public Class FlatteningCut
|
|||||||
|
|
||||||
Private Sub OverlapTxBx_EgtClosed(sender As Object, e As EventArgs) Handles OverlapTxBx.EgtClosed
|
Private Sub OverlapTxBx_EgtClosed(sender As Object, e As EventArgs) Handles OverlapTxBx.EgtClosed
|
||||||
' Recupero spessore della lama correntemente attiva
|
' Recupero spessore della lama correntemente attiva
|
||||||
Dim dThick As Double = 0
|
Dim dThick As Double = GetFootPrintTool()
|
||||||
EgtTdbGetCurrToolParam(MCH_TP.THICK, dThick)
|
'EgtTdbGetCurrToolParam(MCH_TP.THICK, dThick)
|
||||||
' Verifico che la sovrapposizione non sia superiore allo spessore della lama (meno 1mm di offset)
|
' Verifico che la sovrapposizione non sia superiore allo spessore della lama (meno 1mm di offset)
|
||||||
Dim dOverlap As Double = 0
|
Dim dOverlap As Double = 0
|
||||||
Const MIN_OFFSET As Double = 1.0
|
Const MIN_OFFSET As Double = 1.0
|
||||||
@@ -612,6 +612,22 @@ Public Class FlatteningCut
|
|||||||
m_MainWindow.m_DirectCutPageUC.LeftButtonGrid.Children.Remove(Me)
|
m_MainWindow.m_DirectCutPageUC.LeftButtonGrid.Children.Remove(Me)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
' ricavo l'ingombro di lavorazione in funzione dell'utensile selezionato
|
||||||
|
Private Function GetFootPrintTool() As Double
|
||||||
|
Dim dFootPrint As Double = 0
|
||||||
|
' verifico quale lavorazione è attiva
|
||||||
|
If Not String.IsNullOrEmpty(m_MainWindow.m_CurrentMachine.sCurrSawing) Then
|
||||||
|
EgtTdbGetCurrToolParam(MCH_TP.THICK, dFootPrint)
|
||||||
|
ElseIf Not String.IsNullOrEmpty(m_MainWindow.m_CurrentMachine.sCurrMilling) Then
|
||||||
|
Dim sCurrMill = m_MainWindow.m_CurrentMachine.sCurrMill
|
||||||
|
GetDrillFromDrilling(sCurrMill, m_MainWindow.m_CurrentMachine.sCurrMilling)
|
||||||
|
' recupero informazioni della fresa in uso
|
||||||
|
EgtTdbSetCurrTool(sCurrMill)
|
||||||
|
EgtTdbGetCurrToolParam(MCH_TP.DIAM, dFootPrint)
|
||||||
|
End If
|
||||||
|
Return dFootPrint
|
||||||
|
End Function
|
||||||
|
|
||||||
Private Function CreateFlatteningCut() As Boolean
|
Private Function CreateFlatteningCut() As Boolean
|
||||||
' Verifico sia definito il punto iniziale e il grezzo
|
' Verifico sia definito il punto iniziale e il grezzo
|
||||||
If Not m_bPointP1Ok Or Not m_bRawOk Then
|
If Not m_bPointP1Ok Or Not m_bRawOk Then
|
||||||
@@ -670,20 +686,21 @@ Public Class FlatteningCut
|
|||||||
RemoveFinalHome()
|
RemoveFinalHome()
|
||||||
End If
|
End If
|
||||||
UpdateSimulOkBtn()
|
UpdateSimulOkBtn()
|
||||||
|
|
||||||
Return m_bCutOk
|
Return m_bCutOk
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Private Function MultiplyCut(nLayerId As Integer, nCutId As Integer) As Boolean
|
Private Function MultiplyCut(nLayerId As Integer, nCutId As Integer) As Boolean
|
||||||
' Recupero spessore della lama correntemente attiva
|
' Recupero spessore della lama (utensile) correntemente attiva
|
||||||
Dim dThick As Double = 0
|
Dim dThick As Double = GetFootPrintTool()
|
||||||
EgtTdbGetCurrToolParam(MCH_TP.THICK, dThick)
|
If dThick = 0 Then Return False
|
||||||
|
|
||||||
' Imposto angolo di rotazione a seconda del lato dei tagli
|
' Imposto angolo di rotazione a seconda del lato dei tagli
|
||||||
Dim dRotAngO As Double = If(SideChBx.IsChecked(), -90, 90)
|
Dim dRotAngO As Double = If(SideChBx.IsChecked(), -90, 90)
|
||||||
' Definisco vettore di spostamento
|
' Definisco vettore di spostamento
|
||||||
Dim vtDelta As Vector3d
|
Dim vtDelta As Vector3d
|
||||||
vtDelta = Vector3d.FromPolar(1, m_dAngO)
|
vtDelta = Vector3d.FromPolar(1, m_dAngO)
|
||||||
vtDelta.Rotate(Vector3d.Z_AX, dRotAngO)
|
vtDelta.Rotate(Vector3d.Z_AX, dRotAngO)
|
||||||
|
|
||||||
' Calcolo numero di iterazioni necessarie a coprire l'area impostata e lunghezza vettore delta
|
' Calcolo numero di iterazioni necessarie a coprire l'area impostata e lunghezza vettore delta
|
||||||
Dim nStepNum As Integer
|
Dim nStepNum As Integer
|
||||||
Dim dDelta As Double
|
Dim dDelta As Double
|
||||||
|
|||||||
@@ -71,7 +71,7 @@ Public Class SingleDrillUC
|
|||||||
|
|
||||||
Private Sub SingleDrill_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded
|
Private Sub SingleDrill_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded
|
||||||
m_sCurrDrill = m_CurrentMachine.sCurrDrill
|
m_sCurrDrill = m_CurrentMachine.sCurrDrill
|
||||||
GetDrillFromDrilling(m_sCurrDrill)
|
GetDrillFromDrilling(m_sCurrDrill, m_CurrentMachine.sCurrDrilling)
|
||||||
|
|
||||||
' recupero informazioni del foretto usato
|
' recupero informazioni del foretto usato
|
||||||
EgtTdbSetCurrTool(m_sCurrDrill)
|
EgtTdbSetCurrTool(m_sCurrDrill)
|
||||||
@@ -267,41 +267,41 @@ Public Class SingleDrillUC
|
|||||||
Point1Btn.IsChecked = True
|
Point1Btn.IsChecked = True
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub GetDrillFromDrilling(ByRef sCurrDrill As String)
|
'Private Sub GetDrillFromDrilling(ByRef sCurrDrill As String)
|
||||||
If String.IsNullOrEmpty(sCurrDrill) Or String.IsNullOrWhiteSpace(sCurrDrill) Then
|
' If String.IsNullOrEmpty(sCurrDrill) Or String.IsNullOrWhiteSpace(sCurrDrill) Then
|
||||||
' creo l'elenco degli utensili di foratura
|
' ' creo l'elenco degli utensili di foratura
|
||||||
Dim sToolName As String = String.Empty
|
' Dim sToolName As String = String.Empty
|
||||||
Dim nType As Integer = MCH_TY.NONE
|
' Dim nType As Integer = MCH_TY.NONE
|
||||||
Dim DrillToolList As New ObservableCollection(Of String)
|
' Dim DrillToolList As New ObservableCollection(Of String)
|
||||||
DrillToolList.Clear()
|
' DrillToolList.Clear()
|
||||||
If EgtTdbGetFirstTool(MCH_TF.DRILLBIT, sToolName, nType) Then
|
' If EgtTdbGetFirstTool(MCH_TF.DRILLBIT, sToolName, nType) Then
|
||||||
DrillToolList.Add(sToolName)
|
' DrillToolList.Add(sToolName)
|
||||||
While EgtTdbGetNextTool(MCH_TF.DRILLBIT, sToolName, nType)
|
' While EgtTdbGetNextTool(MCH_TF.DRILLBIT, sToolName, nType)
|
||||||
DrillToolList.Add(sToolName)
|
' DrillToolList.Add(sToolName)
|
||||||
End While
|
' End While
|
||||||
End If
|
' End If
|
||||||
' recupero l'utensile associato alla lavorazione
|
' ' recupero l'utensile associato alla lavorazione
|
||||||
Dim sCurrDrilling As String = m_MainWindow.m_CurrentMachine.sCurrDrilling
|
' Dim sCurrDrilling As String = m_MainWindow.m_CurrentMachine.sCurrDrilling
|
||||||
Dim ToolString As String = String.Empty
|
' Dim ToolString As String = String.Empty
|
||||||
EgtMdbSetCurrMachining(sCurrDrilling)
|
' EgtMdbSetCurrMachining(sCurrDrilling)
|
||||||
' Recupero nome utensile tramite TUUID
|
' ' Recupero nome utensile tramite TUUID
|
||||||
Dim sTuuid As String = String.Empty
|
' Dim sTuuid As String = String.Empty
|
||||||
EgtMdbGetCurrMachiningParam(MCH_MP.TUUID, sTuuid)
|
' EgtMdbGetCurrMachiningParam(MCH_MP.TUUID, sTuuid)
|
||||||
EgtTdbGetToolFromUUID(sTuuid, ToolString)
|
' EgtTdbGetToolFromUUID(sTuuid, ToolString)
|
||||||
Dim bToolExist As Boolean = False
|
' Dim bToolExist As Boolean = False
|
||||||
For Each CurrTool As IEnumerable In DrillToolList
|
' For Each CurrTool As IEnumerable In DrillToolList
|
||||||
If CurrTool.ToString() = ToolString Then
|
' If CurrTool.ToString() = ToolString Then
|
||||||
bToolExist = True
|
' bToolExist = True
|
||||||
Exit For
|
' Exit For
|
||||||
End If
|
' End If
|
||||||
Next
|
' Next
|
||||||
If bToolExist Then
|
' If bToolExist Then
|
||||||
sCurrDrill = ToolString
|
' sCurrDrill = ToolString
|
||||||
Else
|
' Else
|
||||||
sCurrDrill = String.Empty
|
' sCurrDrill = String.Empty
|
||||||
End If
|
' End If
|
||||||
End If
|
' End If
|
||||||
End Sub
|
'End Sub
|
||||||
|
|
||||||
Private Sub XcoordTxBx_EgtClosed(sender As Object, e As EventArgs) Handles XcoordTxBx.EgtClosed
|
Private Sub XcoordTxBx_EgtClosed(sender As Object, e As EventArgs) Handles XcoordTxBx.EgtClosed
|
||||||
' Recupero il valore della coordinata (in 0 Tab)
|
' Recupero il valore della coordinata (in 0 Tab)
|
||||||
@@ -397,7 +397,7 @@ Public Class SingleDrillUC
|
|||||||
Dim dRawHeight As Double = m_ptRawMax.z - m_ptRawMin.z
|
Dim dRawHeight As Double = m_ptRawMax.z - m_ptRawMin.z
|
||||||
' Recupero spessore lama corrente
|
' Recupero spessore lama corrente
|
||||||
Dim sDrill As String = m_sCurrDrill
|
Dim sDrill As String = m_sCurrDrill
|
||||||
GetDrillFromDrilling(sDrill)
|
GetDrillFromDrilling(sDrill, m_MainWindow.m_CurrentMachine.sCurrDrilling)
|
||||||
EgtTdbSetCurrTool(sDrill)
|
EgtTdbSetCurrTool(sDrill)
|
||||||
Dim dDiam As Double = 0
|
Dim dDiam As Double = 0
|
||||||
EgtTdbGetCurrToolParam(MCH_TP.DIAM, dDiam)
|
EgtTdbGetCurrToolParam(MCH_TP.DIAM, dDiam)
|
||||||
|
|||||||
@@ -281,32 +281,14 @@ Public Class AlzFrontUC
|
|||||||
|
|
||||||
' restituisce vero se il lato possiede delle info legate al sideangle
|
' restituisce vero se il lato possiede delle info legate al sideangle
|
||||||
Private Function VerifyIsThereSideAngle(nCurrLine As Integer) As Boolean
|
Private Function VerifyIsThereSideAngle(nCurrLine As Integer) As Boolean
|
||||||
Dim sInfoSideAngle As String = String.Empty
|
Dim dSideAngle As Double
|
||||||
EgtGetInfo(nCurrLine, INFO_SIDE_ANGLE, sInfoSideAngle)
|
return EgtGetInfo(nCurrLine, INFO_SIDE_ANGLE, dSideAngle)
|
||||||
If Not String.IsNullOrWhiteSpace(sInfoSideAngle) Or Not String.IsNullOrEmpty(sInfoSideAngle) Then
|
|
||||||
' verifico che il dato salvato sia un double
|
|
||||||
Try
|
|
||||||
Dim dSideAngle As Double = 0
|
|
||||||
StringToDouble(sInfoSideAngle, dSideAngle)
|
|
||||||
If dSideAngle <> 0 Then
|
|
||||||
Return True
|
|
||||||
End If
|
|
||||||
Catch ex As Exception
|
|
||||||
End Try
|
|
||||||
End If
|
|
||||||
Return False
|
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
' restituisce vero se il lato possiede delle info legate alle alette
|
' restituisce vero se il lato possiede delle info legate alle alette
|
||||||
Private Function VerifyIsThereAlzFront(nCurrLine As Integer) As Boolean
|
Private Function VerifyIsThereAlzFront(nCurrLine As Integer) As Boolean
|
||||||
Dim sInfoAlzFront As String = String.Empty
|
Dim nAlzFront As Integer
|
||||||
EgtGetInfo(nCurrLine, INFO_ALZFRONT, sInfoAlzFront)
|
return EgtGetInfo(nCurrLine, INFO_ALZFRONT, nAlzFront) AndAlso nAlzFront <> 0
|
||||||
If Not String.IsNullOrWhiteSpace(sInfoAlzFront) Or Not String.IsNullOrEmpty(sInfoAlzFront) Then
|
|
||||||
If sInfoAlzFront.Trim <> "0" Then
|
|
||||||
Return True
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
Return False
|
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
' approvo la costruzione dell'aletta sul lato indicato
|
' approvo la costruzione dell'aletta sul lato indicato
|
||||||
|
|||||||
@@ -159,7 +159,7 @@ Module SideAngle
|
|||||||
Return True
|
Return True
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Private Function WriteSideAngleOnLoop(LoopId As Integer, TextLayId As Integer) As Boolean
|
Friend Function WriteSideAngleOnLoop(LoopId As Integer, TextLayId As Integer) As Boolean
|
||||||
' Verifiche
|
' Verifiche
|
||||||
If LoopId = GDB_ID.NULL Or TextLayId = GDB_ID.NULL Then Return False
|
If LoopId = GDB_ID.NULL Or TextLayId = GDB_ID.NULL Then Return False
|
||||||
' Calcolo dimensione ingombro Loop
|
' Calcolo dimensione ingombro Loop
|
||||||
|
|||||||
+342
-323
@@ -10,27 +10,27 @@
|
|||||||
<!-- Definizione della AlarmsPage -->
|
<!-- Definizione della AlarmsPage -->
|
||||||
<Border Style="{DynamicResource OmagCut_PageBorder}" >
|
<Border Style="{DynamicResource OmagCut_PageBorder}" >
|
||||||
|
|
||||||
<Grid>
|
<Grid>
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="4*"/>
|
<ColumnDefinition Width="4*"/>
|
||||||
<ColumnDefinition Width="4*"/>
|
<ColumnDefinition Width="4*"/>
|
||||||
<ColumnDefinition Width="4*"/>
|
<ColumnDefinition Width="4*"/>
|
||||||
<ColumnDefinition Width="3*"/>
|
<ColumnDefinition Width="3*"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="2*"/>
|
<RowDefinition Height="2*"/>
|
||||||
<RowDefinition Height="0.5*"/>
|
<RowDefinition Height="0.5*"/>
|
||||||
|
|
||||||
<RowDefinition Height="1.5*"/>
|
|
||||||
<RowDefinition Height="0.5*"/>
|
|
||||||
<RowDefinition Height="1*"/>
|
|
||||||
<RowDefinition Height="0.5*"/>
|
|
||||||
<RowDefinition Height="1*"/>
|
|
||||||
<RowDefinition Height="1*"/>
|
|
||||||
<RowDefinition Height="1*"/>
|
|
||||||
</Grid.RowDefinitions>
|
|
||||||
|
|
||||||
<!--Costruisco le riche per la colonna 3-->
|
<RowDefinition Height="1.5*"/>
|
||||||
|
<RowDefinition Height="0.5*"/>
|
||||||
|
<RowDefinition Height="1*"/>
|
||||||
|
<RowDefinition Height="0.5*"/>
|
||||||
|
<RowDefinition Height="1*"/>
|
||||||
|
<RowDefinition Height="1*"/>
|
||||||
|
<RowDefinition Height="1*"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
|
<!--Costruisco le riche per la colonna 3-->
|
||||||
<Grid Grid.Column="2" Grid.RowSpan="9">
|
<Grid Grid.Column="2" Grid.RowSpan="9">
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<!--GruopBox: taglio lama-->
|
<!--GruopBox: taglio lama-->
|
||||||
@@ -51,7 +51,7 @@
|
|||||||
<RowDefinition Height="1*"/>
|
<RowDefinition Height="1*"/>
|
||||||
<RowDefinition Height="0.375*"/>
|
<RowDefinition Height="0.375*"/>
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
<!--Parametri Taglio Lama: 5 Parametri-->
|
<!--Parametri Taglio Lama: 5 Parametri-->
|
||||||
<GroupBox Name="SawGpBx" Style="{DynamicResource OmagCut_GroupBox}" Grid.Column="2" Grid.RowSpan="4">
|
<GroupBox Name="SawGpBx" Style="{DynamicResource OmagCut_GroupBox}" Grid.Column="2" Grid.RowSpan="4">
|
||||||
<!--definizione della grigli ainterna-->
|
<!--definizione della grigli ainterna-->
|
||||||
@@ -92,8 +92,8 @@
|
|||||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||||
<CheckBox Name="PreCutExitChBx" Grid.Column="1" Grid.Row="4" Margin="10,0,10,0"
|
<CheckBox Name="PreCutExitChBx" Grid.Column="1" Grid.Row="4" Margin="10,0,10,0"
|
||||||
Style="{StaticResource OmagCut_CheckBox_Single}"
|
Style="{StaticResource OmagCut_CheckBox_Single}"
|
||||||
HorizontalAlignment="Right"/>
|
HorizontalAlignment="Right"/>
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
</GroupBox>
|
</GroupBox>
|
||||||
@@ -200,7 +200,7 @@
|
|||||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}" Margin="10,0,0,10" VerticalAlignment="Bottom" />
|
Style="{DynamicResource OmagCut_ToolsDBTextBlock}" Margin="10,0,0,10" VerticalAlignment="Bottom" />
|
||||||
<CheckBox Name="WjIntCutsChBx" Grid.Row="1" Grid.ColumnSpan="2" Style="{StaticResource OmagCut_CheckBox_Single}"
|
<CheckBox Name="WjIntCutsChBx" Grid.Row="1" Grid.ColumnSpan="2" Style="{StaticResource OmagCut_CheckBox_Single}"
|
||||||
HorizontalAlignment="Right" Margin="0,0,10,0"/>
|
HorizontalAlignment="Right" Margin="0,0,10,0"/>
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
</GroupBox>
|
</GroupBox>
|
||||||
|
|
||||||
@@ -218,78 +218,78 @@
|
|||||||
</GroupBox>
|
</GroupBox>
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
<Grid Grid.RowSpan="3">
|
|
||||||
<Grid.RowDefinitions>
|
|
||||||
<RowDefinition Height="1.75*"/>
|
|
||||||
<RowDefinition Height="0.5*"/>
|
|
||||||
<RowDefinition Height="0.5*"/>
|
|
||||||
<RowDefinition Height="1*"/>
|
|
||||||
</Grid.RowDefinitions>
|
|
||||||
|
|
||||||
<GroupBox Name="SetUpGpBx" Grid.ColumnSpan="3" Grid.RowSpan="9"
|
<Grid Grid.RowSpan="3">
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="1.75*"/>
|
||||||
|
<RowDefinition Height="0.5*"/>
|
||||||
|
<RowDefinition Height="0.5*"/>
|
||||||
|
<RowDefinition Height="1*"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
|
<GroupBox Name="SetUpGpBx" Grid.ColumnSpan="3" Grid.RowSpan="9"
|
||||||
Style="{DynamicResource OmagCut_GroupBox}">
|
Style="{DynamicResource OmagCut_GroupBox}">
|
||||||
|
|
||||||
<Grid Name="CurrToolsGrid" Grid.ColumnSpan="2">
|
<Grid Name="CurrToolsGrid" Grid.ColumnSpan="2">
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="0.5*"/>
|
<ColumnDefinition Width="0.5*"/>
|
||||||
<ColumnDefinition Width="3*"/>
|
<ColumnDefinition Width="3*"/>
|
||||||
<ColumnDefinition Width="0.5*"/>
|
<ColumnDefinition Width="0.5*"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="0.5*"/>
|
<RowDefinition Height="0.5*"/>
|
||||||
<RowDefinition Height="0.5*"/>
|
<RowDefinition Height="0.5*"/>
|
||||||
<RowDefinition Height="0.5*"/>
|
<RowDefinition Height="0.5*"/>
|
||||||
<RowDefinition Height="0.5*"/>
|
<RowDefinition Height="0.5*"/>
|
||||||
<RowDefinition Height="0.5*"/>
|
<RowDefinition Height="0.5*"/>
|
||||||
<RowDefinition Height="0.5*"/>
|
<RowDefinition Height="0.5*"/>
|
||||||
<RowDefinition Height="0.5*"/>
|
<RowDefinition Height="0.5*"/>
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
<TextBlock Name="CurrSawTxBl" Grid.Column="0" Grid.Row="0" Grid.ColumnSpan="3"
|
<TextBlock Name="CurrSawTxBl" Grid.Column="0" Grid.Row="0" Grid.ColumnSpan="3"
|
||||||
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||||
<ComboBox x:Name="CurrSawCmBx" Grid.Column="1" Grid.Row="1" Style="{DynamicResource OmagCut_ComboBox}">
|
<ComboBox x:Name="CurrSawCmBx" Grid.Column="1" Grid.Row="1" Style="{DynamicResource OmagCut_ComboBox}">
|
||||||
<ComboBox.ItemTemplate>
|
<ComboBox.ItemTemplate>
|
||||||
<DataTemplate>
|
<DataTemplate>
|
||||||
<TextBlock Text="{Binding}" Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
<TextBlock Text="{Binding}" Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
</ComboBox.ItemTemplate>
|
</ComboBox.ItemTemplate>
|
||||||
</ComboBox>
|
</ComboBox>
|
||||||
|
|
||||||
<TextBlock Name="AuxiliaryToolTxBl" Grid.Column="0" Grid.Row="2" Grid.ColumnSpan="3"
|
<TextBlock Name="AuxiliaryToolTxBl" Grid.Column="0" Grid.Row="2" Grid.ColumnSpan="3"
|
||||||
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
|
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
|
||||||
Visibility="Hidden"/>
|
Visibility="Hidden"/>
|
||||||
<ComboBox Name="AuxiliaryToolCmBx" Grid.Column="1" Grid.Row="3" Style="{StaticResource OmagCut_ComboBox}" Visibility="Hidden">
|
<ComboBox Name="AuxiliaryToolCmBx" Grid.Column="1" Grid.Row="3" Style="{StaticResource OmagCut_ComboBox}" Visibility="Hidden">
|
||||||
<ComboBox.ItemTemplate>
|
<ComboBox.ItemTemplate>
|
||||||
<DataTemplate>
|
<DataTemplate>
|
||||||
<TextBlock Text="{Binding sName}" Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
<TextBlock Text="{Binding sName}" Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
</ComboBox.ItemTemplate>
|
</ComboBox.ItemTemplate>
|
||||||
</ComboBox>
|
</ComboBox>
|
||||||
|
|
||||||
<TextBlock Name="CurrDrillTxBl" Grid.Column="0" Grid.Row="4" Grid.ColumnSpan="3"
|
<TextBlock Name="CurrDrillTxBl" Grid.Column="0" Grid.Row="4" Grid.ColumnSpan="3"
|
||||||
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
|
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
|
||||||
Visibility="Hidden"/>
|
Visibility="Hidden"/>
|
||||||
<ComboBox Name="CurrDrillCmBx" Grid.Column="1" Grid.Row="5" Style="{StaticResource OmagCut_ComboBox}" Visibility="Hidden">
|
<ComboBox Name="CurrDrillCmBx" Grid.Column="1" Grid.Row="5" Style="{StaticResource OmagCut_ComboBox}" Visibility="Hidden">
|
||||||
<ComboBox.ItemTemplate>
|
<ComboBox.ItemTemplate>
|
||||||
<DataTemplate>
|
<DataTemplate>
|
||||||
<TextBlock Text="{Binding}" Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
<TextBlock Text="{Binding}" Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
</ComboBox.ItemTemplate>
|
</ComboBox.ItemTemplate>
|
||||||
</ComboBox>
|
</ComboBox>
|
||||||
|
|
||||||
<TextBlock Name="CurrMillTxBl" Grid.Column="0" Grid.Row="4" Grid.ColumnSpan="3"
|
<TextBlock Name="CurrMillTxBl" Grid.Column="0" Grid.Row="4" Grid.ColumnSpan="3"
|
||||||
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
|
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
|
||||||
Visibility="Hidden"/>
|
Visibility="Hidden"/>
|
||||||
<ComboBox Name="CurrMillCmBx" Grid.Column="1" Grid.Row="5" Style="{StaticResource OmagCut_ComboBox}" Visibility="Hidden">
|
<ComboBox Name="CurrMillCmBx" Grid.Column="1" Grid.Row="5" Style="{StaticResource OmagCut_ComboBox}" Visibility="Hidden">
|
||||||
<ComboBox.ItemTemplate>
|
<ComboBox.ItemTemplate>
|
||||||
<DataTemplate>
|
<DataTemplate>
|
||||||
<TextBlock Text="{Binding}" Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
<TextBlock Text="{Binding}" Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
</ComboBox.ItemTemplate>
|
</ComboBox.ItemTemplate>
|
||||||
</ComboBox>
|
</ComboBox>
|
||||||
|
|
||||||
<TextBlock Name="CurrCupWheelTxBl" Grid.Column="0" Grid.Row="4" Grid.ColumnSpan="3"
|
<TextBlock Name="CurrCupWheelTxBl" Grid.Column="0" Grid.Row="4" Grid.ColumnSpan="3"
|
||||||
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
|
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
|
||||||
Visibility="Hidden"/>
|
Visibility="Hidden"/>
|
||||||
<ComboBox Name="CurrCupWheelCmBx" Grid.Column="1" Grid.Row="5" Style="{StaticResource OmagCut_ComboBox}" Visibility="Hidden">
|
<ComboBox Name="CurrCupWheelCmBx" Grid.Column="1" Grid.Row="5" Style="{StaticResource OmagCut_ComboBox}" Visibility="Hidden">
|
||||||
@@ -303,24 +303,24 @@
|
|||||||
<TextBlock Name="CurrWJetTxBl" Grid.Column="0" Grid.Row="4" Grid.ColumnSpan="3"
|
<TextBlock Name="CurrWJetTxBl" Grid.Column="0" Grid.Row="4" Grid.ColumnSpan="3"
|
||||||
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
|
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
|
||||||
Visibility="Hidden"/>
|
Visibility="Hidden"/>
|
||||||
<ComboBox Name="CurrWJetCmBx" Grid.Column="1" Grid.Row="5" Style="{StaticResource OmagCut_ComboBox}" Visibility="Hidden">
|
<ComboBox Name="CurrWJetCmBx" Grid.Column="1" Grid.Row="5" Style="{StaticResource OmagCut_ComboBox}" Visibility="Hidden">
|
||||||
<ComboBox.ItemTemplate>
|
<ComboBox.ItemTemplate>
|
||||||
<DataTemplate>
|
<DataTemplate>
|
||||||
<TextBlock Text="{Binding}" Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
<TextBlock Text="{Binding}" Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
</ComboBox.ItemTemplate>
|
</ComboBox.ItemTemplate>
|
||||||
</ComboBox>
|
</ComboBox>
|
||||||
|
|
||||||
<Button Name="SetUpBtn" Grid.Column="1" Grid.Row="3" Grid.RowSpan="2" Visibility="Hidden"
|
<Button Name="SetUpBtn" Grid.Column="1" Grid.Row="3" Grid.RowSpan="2" Visibility="Hidden"
|
||||||
Style="{DynamicResource OmagCut_YellowTextButton}"/>
|
Style="{DynamicResource OmagCut_YellowTextButton}"/>
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
</GroupBox>
|
</GroupBox>
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
<!--<Grid Grid.Column="2" Grid.Row="2" Grid.RowSpan="6">
|
<!--<Grid Grid.Column="2" Grid.Row="2" Grid.RowSpan="6">
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition />
|
<ColumnDefinition />
|
||||||
<ColumnDefinition />
|
<ColumnDefinition />
|
||||||
@@ -424,96 +424,106 @@
|
|||||||
|
|
||||||
</Grid>-->
|
</Grid>-->
|
||||||
|
|
||||||
<GroupBox Name="MaterialsGpBx" Style="{DynamicResource OmagCut_GroupBox}" Grid.Column="0"
|
<GroupBox Name="MaterialsGpBx" Style="{DynamicResource OmagCut_GroupBox}" Grid.Column="0"
|
||||||
Grid.Row="3" Grid.ColumnSpan="1" Grid.RowSpan="5">
|
Grid.Row="3" Grid.ColumnSpan="1" Grid.RowSpan="5">
|
||||||
|
|
||||||
<Grid>
|
<Grid>
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="2.5*"/>
|
<RowDefinition Height="2.5*"/>
|
||||||
<RowDefinition Height="0.5*"/>
|
<RowDefinition Height="0.5*"/>
|
||||||
<RowDefinition Height="1*"/>
|
<RowDefinition Height="1*"/>
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
<ListBox Name="MaterialsLstBx" Grid.RowSpan="2">
|
<ListBox Name="MaterialsLstBx" Grid.RowSpan="2">
|
||||||
<ListBox.ItemTemplate>
|
<ListBox.ItemTemplate>
|
||||||
<DataTemplate>
|
<DataTemplate>
|
||||||
<TextBlock Text="{Binding sName}" Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
<TextBlock Text="{Binding sName}" Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
</ListBox.ItemTemplate>
|
</ListBox.ItemTemplate>
|
||||||
</ListBox>
|
</ListBox>
|
||||||
|
|
||||||
<EgtWPFLib:EgtTextBox Name="MatNameTxBx" Grid.Row="1" Width="240" Visibility="Hidden"
|
<EgtWPFLib:EgtTextBox Name="MatNameTxBx" Grid.Row="1" Width="240" Visibility="Hidden"
|
||||||
Style="{DynamicResource OmagCut_KeyboardTextBox}" />
|
Style="{DynamicResource OmagCut_KeyboardTextBox}" />
|
||||||
|
|
||||||
<UniformGrid Grid.Row="2" Columns="2">
|
<UniformGrid Grid.Row="2" Columns="2">
|
||||||
<Button Name="NewMatBtn" Grid.Column="1"
|
<Button Name="NewMatBtn" Grid.Column="1"
|
||||||
Style="{DynamicResource OmagCut_RightGrayGradientYellowTextButton}"/>
|
Style="{DynamicResource OmagCut_RightGrayGradientYellowTextButton}"/>
|
||||||
<Button Name="RemoveMatBtn" Grid.Column="1"
|
<Button Name="RemoveMatBtn" Grid.Column="1"
|
||||||
Style="{DynamicResource OmagCut_RightGrayGradientYellowTextButton}"/>
|
Style="{DynamicResource OmagCut_RightGrayGradientYellowTextButton}"/>
|
||||||
</UniformGrid>
|
</UniformGrid>
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
</GroupBox>
|
</GroupBox>
|
||||||
|
|
||||||
<GroupBox Name="MachiningsGpBx" Style="{DynamicResource OmagCut_GroupBox}" Grid.Column="1"
|
<GroupBox Name="MachiningsGpBx" Style="{DynamicResource OmagCut_GroupBox}" Grid.Column="1"
|
||||||
Grid.Row="0" Grid.ColumnSpan="1" Grid.RowSpan="3">
|
Grid.Row="0" Grid.ColumnSpan="1" Grid.RowSpan="3">
|
||||||
|
|
||||||
<Grid>
|
<Grid>
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="2*"/>
|
<ColumnDefinition Width="2*"/>
|
||||||
<ColumnDefinition Width="2*"/>
|
<ColumnDefinition Width="2*"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="0.5*"/>
|
<RowDefinition Height="0.5*"/>
|
||||||
<RowDefinition Height="0.5*"/>
|
<RowDefinition Height="0.5*"/>
|
||||||
<RowDefinition Height="0.5*"/>
|
<RowDefinition Height="0.5*"/>
|
||||||
<RowDefinition Height="0.5*"/>
|
<RowDefinition Height="0.5*"/>
|
||||||
<RowDefinition Height="0.5*"/>
|
<RowDefinition Height="0.5*"/>
|
||||||
<RowDefinition Height="0.5*"/>
|
<RowDefinition Height="0.5*"/>
|
||||||
<RowDefinition Height="0.5*"/>
|
<RowDefinition Height="0.5*"/>
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
<TextBlock Name="CurrSawingTxBl" Grid.Column="0" Grid.Row="0"
|
<TextBlock Name="CurrSawingTxBl" Grid.Column="0" Grid.Row="0"
|
||||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||||
<EgtWPFLib:EgtTextBox Name="CurrSawingTxBx" Grid.Column="1" Grid.Row="0" Margin="10,0,10,0"
|
<EgtWPFLib:EgtTextBox Name="CurrSawingTxBx" Grid.Column="1" Grid.Row="0" Margin="10,0,10,0"
|
||||||
Style="{DynamicResource OmagCut_FixedTextBox}" />
|
Style="{DynamicResource OmagCut_FixedTextBox}" />
|
||||||
|
|
||||||
<TextBlock Name="CurrDrillingTxBl" Grid.Column="0" Grid.Row="1"
|
<TextBlock Name="CurrDrillingTxBl" Grid.Column="0" Grid.Row="1"
|
||||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||||
<EgtWPFLib:EgtTextBox Name="CurrDrillingTxBx" Grid.Column="1" Grid.Row="1" Margin="10,0,10,0"
|
<EgtWPFLib:EgtTextBox Name="CurrDrillingTxBx" Grid.Column="1" Grid.Row="1" Margin="10,0,10,0"
|
||||||
Style="{DynamicResource OmagCut_FixedTextBox}" />
|
Style="{DynamicResource OmagCut_FixedTextBox}" />
|
||||||
|
|
||||||
<TextBlock Name="CurrMillingTxBl" Grid.Column="0" Grid.Row="2"
|
<TextBlock Name="CurrMillingTxBl" Grid.Column="0" Grid.Row="2"
|
||||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||||
<EgtWPFLib:EgtTextBox Name="CurrMillingTxBx" Grid.Column="1" Grid.Row="2" Margin="10,0,10,0"
|
<EgtWPFLib:EgtTextBox Name="CurrMillingTxBx" Grid.Column="1" Grid.Row="2" Margin="10,0,10,0"
|
||||||
Style="{DynamicResource OmagCut_FixedTextBox}" />
|
Style="{DynamicResource OmagCut_FixedTextBox}" />
|
||||||
|
|
||||||
<TextBlock Name="CurrPocketingTxBl" Grid.Column="0" Grid.Row="3"
|
<TextBlock Name="CurrPocketingTxBl" Grid.Column="0" Grid.Row="3"
|
||||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||||
<EgtWPFLib:EgtTextBox Name="CurrPocketingTxBx" Grid.Column="1" Grid.Row="3" Margin="10,0,10,0"
|
<EgtWPFLib:EgtTextBox Name="CurrPocketingTxBx" Grid.Column="1" Grid.Row="3" Margin="10,0,10,0"
|
||||||
Style="{DynamicResource OmagCut_FixedTextBox}" />
|
Style="{DynamicResource OmagCut_FixedTextBox}" />
|
||||||
|
|
||||||
<TextBlock Name="CurrWaterJettingTxBl" Grid.Column="0" Grid.Row="4"
|
<TextBlock Name="CurrWaterJettingTxBl" Grid.Column="0" Grid.Row="4"
|
||||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||||
<EgtWPFLib:EgtTextBox Name="CurrWaterJettingTxBx" Grid.Column="1" Grid.Row="4" Margin="10,0,10,0"
|
|
||||||
|
<Grid Grid.Column="1" Grid.Row="4">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="5*"/>
|
||||||
|
<ColumnDefinition Width="1.5*"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<EgtWPFLib:EgtTextBox Name="CurrWaterJettingTxBx" Grid.Column="0" Margin="10,0,5,0"
|
||||||
|
Style="{DynamicResource OmagCut_FixedTextBox}" />
|
||||||
|
<EgtWPFLib:EgtTextBox Name="CurrWaterJettingQualityTxBx" Grid.Column="1" Margin="0,0,10,0"
|
||||||
|
Style="{DynamicResource OmagCut_FixedTextBox}" />
|
||||||
|
</Grid>
|
||||||
|
|
||||||
|
|
||||||
|
<TextBlock Name="CurrDripSawingTxBl" Grid.Column="0" Grid.Row="5"
|
||||||
|
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||||
|
<EgtWPFLib:EgtTextBox Name="CurrDripSawingTxBx" Grid.Column="1" Grid.Row="5" Margin="10,0,10,0"
|
||||||
Style="{DynamicResource OmagCut_FixedTextBox}" />
|
Style="{DynamicResource OmagCut_FixedTextBox}" />
|
||||||
|
|
||||||
<TextBlock Name="CurrDripSawingTxBl" Grid.Column="0" Grid.Row="5"
|
<TextBlock Name="CurrDripDrillingTxBl" Grid.Column="0" Grid.Row="6"
|
||||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||||
<EgtWPFLib:EgtTextBox Name="CurrDripSawingTxBx" Grid.Column="1" Grid.Row="5" Margin="10,0,10,0"
|
<EgtWPFLib:EgtTextBox Name="CurrDripDrillingTxBx" Grid.Column="1" Grid.Row="6" Margin="10,0,10,0"
|
||||||
Style="{DynamicResource OmagCut_FixedTextBox}" />
|
Style="{DynamicResource OmagCut_FixedTextBox}" />
|
||||||
|
|
||||||
<TextBlock Name="CurrDripDrillingTxBl" Grid.Column="0" Grid.Row="6"
|
</Grid>
|
||||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
|
||||||
<EgtWPFLib:EgtTextBox Name="CurrDripDrillingTxBx" Grid.Column="1" Grid.Row="6" Margin="10,0,10,0"
|
|
||||||
Style="{DynamicResource OmagCut_FixedTextBox}" />
|
|
||||||
|
|
||||||
</Grid>
|
</GroupBox>
|
||||||
|
|
||||||
</GroupBox>
|
<!--<GroupBox Name="SawGpBx" Style="{DynamicResource OmagCut_GroupBox}" Grid.Column="2" Grid.RowSpan="2">
|
||||||
|
|
||||||
<!--<GroupBox Name="SawGpBx" Style="{DynamicResource OmagCut_GroupBox}" Grid.Column="2" Grid.RowSpan="2">
|
|
||||||
<Grid>
|
<Grid>
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="2*"/>
|
<ColumnDefinition Width="2*"/>
|
||||||
@@ -551,51 +561,51 @@
|
|||||||
|
|
||||||
</GroupBox>-->
|
</GroupBox>-->
|
||||||
|
|
||||||
<Grid Grid.Column="1" Grid.Row="3" Grid.RowSpan="3">
|
<Grid Grid.Column="1" Grid.Row="3" Grid.RowSpan="3">
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition />
|
<ColumnDefinition />
|
||||||
<ColumnDefinition />
|
<ColumnDefinition />
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="*"/>
|
<RowDefinition Height="*"/>
|
||||||
<RowDefinition Height="*"/>
|
<RowDefinition Height="*"/>
|
||||||
<RowDefinition Height="*"/>
|
<RowDefinition Height="*"/>
|
||||||
<RowDefinition Height="*"/>
|
<RowDefinition Height="*"/>
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
<GroupBox Name="MachineParamGpBx" Style="{DynamicResource OmagCut_GroupBox}" Grid.Column="0" Grid.Row="0" Grid.ColumnSpan="2" Grid.RowSpan="2">
|
<GroupBox Name="MachineParamGpBx" Style="{DynamicResource OmagCut_GroupBox}" Grid.Column="0" Grid.Row="0" Grid.ColumnSpan="2" Grid.RowSpan="2">
|
||||||
<Grid Grid.Column="2" Grid.Row="1">
|
<Grid Grid.Column="2" Grid.Row="1">
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="2*"/>
|
<ColumnDefinition Width="2*"/>
|
||||||
<ColumnDefinition Width="2*"/>
|
<ColumnDefinition Width="2*"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
<TextBlock Name="SafeZTxBl" Grid.Column="0"
|
<TextBlock Name="SafeZTxBl" Grid.Column="0"
|
||||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||||
<EgtWPFLib:EgtTextBox Name="SafeZTxBx" Grid.Column="1" Margin="10,0,10,0"
|
<EgtWPFLib:EgtTextBox Name="SafeZTxBx" Grid.Column="1" Margin="10,0,10,0"
|
||||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
</GroupBox>
|
</GroupBox>
|
||||||
|
|
||||||
<Border Style="{DynamicResource OmagCut_NoNameGroupBorder}" Grid.Column="0" Grid.Row="2" Grid.ColumnSpan="2" Grid.RowSpan="2">
|
<Border Style="{DynamicResource OmagCut_NoNameGroupBorder}" Grid.Column="0" Grid.Row="2" Grid.ColumnSpan="2" Grid.RowSpan="2">
|
||||||
<Grid >
|
<Grid >
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="2*"/>
|
<ColumnDefinition Width="2*"/>
|
||||||
<ColumnDefinition Width="2*"/>
|
<ColumnDefinition Width="2*"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
<TextBlock Name="AdditionalTableTxBl" Grid.Column="0"
|
<TextBlock Name="AdditionalTableTxBl" Grid.Column="0"
|
||||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}" />
|
Style="{DynamicResource OmagCut_ToolsDBTextBlock}" />
|
||||||
<EgtWPFLib:EgtTextBox Name="AdditionalTableTxBx" Grid.Column="1" Margin="10,0,10,0"
|
<EgtWPFLib:EgtTextBox Name="AdditionalTableTxBx" Grid.Column="1" Margin="10,0,10,0"
|
||||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
</Border>
|
</Border>
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
<!--<GroupBox Name="DirectCutsParamGpBx" Style="{DynamicResource OmagCut_GroupBox}" Grid.Column="2" Grid.Row="8">
|
<!--<GroupBox Name="DirectCutsParamGpBx" Style="{DynamicResource OmagCut_GroupBox}" Grid.Column="2" Grid.Row="8">
|
||||||
<Grid>
|
<Grid>
|
||||||
<TextBlock Name="FinalHomeTxBl"
|
<TextBlock Name="FinalHomeTxBl"
|
||||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}" />
|
Style="{DynamicResource OmagCut_ToolsDBTextBlock}" />
|
||||||
@@ -605,199 +615,208 @@
|
|||||||
|
|
||||||
</GroupBox>-->
|
</GroupBox>-->
|
||||||
|
|
||||||
<GroupBox Name="NestingParamGpBx" Style="{DynamicResource OmagCut_GroupBox}" Grid.Column="1" Grid.Row="6" Grid.RowSpan="3">
|
<GroupBox Name="NestingParamGpBx" Style="{DynamicResource OmagCut_GroupBox}" Grid.Column="1" Grid.Row="6" Grid.RowSpan="3">
|
||||||
<Grid Name="NestingGrid">
|
<Grid Name="NestingGrid">
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="2*"/>
|
<ColumnDefinition Width="2*"/>
|
||||||
<ColumnDefinition Width="2*"/>
|
<ColumnDefinition Width="2*"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="0.5*"/>
|
<RowDefinition Height="0.5*"/>
|
||||||
<RowDefinition Height="0.5*"/>
|
<RowDefinition Height="0.5*"/>
|
||||||
<RowDefinition Height="0.5*"/>
|
<RowDefinition Height="0.5*"/>
|
||||||
<RowDefinition Height="0.5*"/>
|
<RowDefinition Height="0.5*"/>
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
<TextBlock Name="CompleteCutsTxBl" Grid.Column="0" Grid.Row="0" Grid.ColumnSpan="2"
|
<TextBlock Name="CompleteCutsTxBl" Grid.Column="0" Grid.Row="0" Grid.ColumnSpan="2"
|
||||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}" />
|
Style="{DynamicResource OmagCut_ToolsDBTextBlock}" />
|
||||||
<CheckBox Name="CompleteCutsChBx" Grid.Column="0" Grid.Row="0" Grid.ColumnSpan="2" Style="{DynamicResource OmagCut_CheckBox_Single}"
|
<CheckBox Name="CompleteCutsChBx" Grid.Column="0" Grid.Row="0" Grid.ColumnSpan="2" Style="{DynamicResource OmagCut_CheckBox_Single}"
|
||||||
HorizontalAlignment="Right" Margin="0,0,10,0"/>
|
HorizontalAlignment="Right" Margin="0,0,10,0"/>
|
||||||
|
|
||||||
<!--Allineato-->
|
<!--Allineato-->
|
||||||
<TextBlock Name="AlignTxBl" Grid.Row="1" Grid.ColumnSpan="2"
|
<TextBlock Name="AlignTxBl" Grid.Row="1" Grid.ColumnSpan="2"
|
||||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}" />
|
Style="{DynamicResource OmagCut_ToolsDBTextBlock}" />
|
||||||
<CheckBox Name="AlignChBx" Grid.Row="1" Grid.ColumnSpan="2" Style="{StaticResource OmagCut_CheckBox_Single}"
|
<CheckBox Name="AlignChBx" Grid.Row="1" Grid.ColumnSpan="2" Style="{StaticResource OmagCut_CheckBox_Single}"
|
||||||
HorizontalAlignment="Right" Margin="0,0,10,0"/>
|
HorizontalAlignment="Right" Margin="0,0,10,0"/>
|
||||||
|
|
||||||
<!--Ghigliottina-->
|
<!--Ghigliottina-->
|
||||||
<TextBlock Name="GhigliottinaTxBl" Grid.Row="2" Grid.ColumnSpan="2"
|
<TextBlock Name="GhigliottinaTxBl" Grid.Row="2" Grid.ColumnSpan="2"
|
||||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}" />
|
Style="{DynamicResource OmagCut_ToolsDBTextBlock}" />
|
||||||
<CheckBox Name="GhigliottinaChBx" Grid.Row="2" Grid.ColumnSpan="2" Style="{StaticResource OmagCut_CheckBox_Single}"
|
<CheckBox Name="GhigliottinaChBx" Grid.Row="2" Grid.ColumnSpan="2" Style="{StaticResource OmagCut_CheckBox_Single}"
|
||||||
HorizontalAlignment="Right" Margin="0,0,10,0"/>
|
|
||||||
|
|
||||||
<!--Automatico-->
|
|
||||||
<TextBlock Name="AutomaticTxBl" Grid.Row="3" Grid.ColumnSpan="2"
|
|
||||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}" />
|
|
||||||
<CheckBox Name="AutomaticChBx" Grid.Row="3" Grid.ColumnSpan="2" Style="{StaticResource OmagCut_CheckBox_Single}"
|
|
||||||
HorizontalAlignment="Right" Margin="0,0,10,0"/>
|
HorizontalAlignment="Right" Margin="0,0,10,0"/>
|
||||||
|
|
||||||
|
<!--Automatico-->
|
||||||
|
<TextBlock Name="AutomaticTxBl" Grid.Row="3" Grid.ColumnSpan="2"
|
||||||
|
Style="{DynamicResource OmagCut_ToolsDBTextBlock}" />
|
||||||
|
<CheckBox Name="AutomaticChBx" Grid.Row="3" Grid.ColumnSpan="2" Style="{StaticResource OmagCut_CheckBox_Single}"
|
||||||
|
HorizontalAlignment="Right" Margin="0,0,10,0"/>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
</GroupBox>
|
</GroupBox>
|
||||||
|
|
||||||
<GroupBox Name="AutoRawImageParamGpBx" Style="{DynamicResource OmagCut_GroupBox}" Grid.Column="3" Grid.Row="0" Grid.RowSpan="2">
|
<GroupBox Name="AutoRawImageParamGpBx" Style="{DynamicResource OmagCut_GroupBox}" Grid.Column="3" Grid.Row="0" Grid.RowSpan="2">
|
||||||
<Grid>
|
<Grid>
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="2*"/>
|
|
||||||
<ColumnDefinition Width="2*"/>
|
|
||||||
</Grid.ColumnDefinitions>
|
|
||||||
<Grid.RowDefinitions>
|
|
||||||
<RowDefinition Height="1*"/>
|
|
||||||
<RowDefinition Height="0.5*"/>
|
|
||||||
<RowDefinition Height="0.5*"/>
|
|
||||||
</Grid.RowDefinitions>
|
|
||||||
|
|
||||||
<Grid Grid.ColumnSpan="2">
|
|
||||||
<Grid.ColumnDefinitions>
|
|
||||||
<ColumnDefinition Width="0.5*"/>
|
|
||||||
<ColumnDefinition Width="2*"/>
|
<ColumnDefinition Width="2*"/>
|
||||||
<ColumnDefinition Width="0.5*"/>
|
<ColumnDefinition Width="2*"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="1*"/>
|
||||||
|
<RowDefinition Height="0.5*"/>
|
||||||
|
<RowDefinition Height="0.5*"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
<Button Name="BackImageBtn" Grid.Column="1"
|
<Grid Grid.ColumnSpan="2">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="0.5*"/>
|
||||||
|
<ColumnDefinition Width="2*"/>
|
||||||
|
<ColumnDefinition Width="0.5*"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
|
<Button Name="BackImageBtn" Grid.Column="1"
|
||||||
Style="{DynamicResource OmagCut_RightGrayGradientYellowTextButton}"/>
|
Style="{DynamicResource OmagCut_RightGrayGradientYellowTextButton}"/>
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
<TextBlock Name="ThresholdTxBl" Grid.Column="0" Grid.Row="1"
|
<TextBlock Name="ThresholdTxBl" Grid.Column="0" Grid.Row="1"
|
||||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||||
<EgtWPFLib:EgtTextBox Name="ThresholdTxBx" Grid.Column="1" Grid.Row="1" Margin="10,0,10,0"
|
<EgtWPFLib:EgtTextBox Name="ThresholdTxBx" Grid.Column="1" Grid.Row="1" Margin="10,0,10,0"
|
||||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||||
<TextBlock Name="ToleranceTxBl" Grid.Column="0" Grid.Row="2"
|
<TextBlock Name="ToleranceTxBl" Grid.Column="0" Grid.Row="2"
|
||||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||||
<EgtWPFLib:EgtTextBox Name="ToleranceTxBx" Grid.Column="1" Grid.Row="2" Margin="10,0,10,0"
|
<EgtWPFLib:EgtTextBox Name="ToleranceTxBx" Grid.Column="1" Grid.Row="2" Margin="10,0,10,0"
|
||||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
</GroupBox>
|
</GroupBox>
|
||||||
|
|
||||||
<GroupBox Name="CutFredGpBx" Style="{DynamicResource OmagCut_GroupBox}" Grid.Column="3"
|
<GroupBox Name="CutFredGpBx" Style="{DynamicResource OmagCut_GroupBox}" Grid.Column="3"
|
||||||
Grid.Row="2" Grid.RowSpan="1">
|
Grid.Row="2" Grid.RowSpan="1">
|
||||||
<Grid>
|
<Grid>
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="2*"/>
|
<ColumnDefinition Width="2*"/>
|
||||||
<ColumnDefinition Width="2*"/>
|
<ColumnDefinition Width="2*"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="0.5*"/>
|
<RowDefinition Height="0.5*"/>
|
||||||
<RowDefinition Height="0.5*"/>
|
<RowDefinition Height="0.5*"/>
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
<TextBlock Name="CfrLenTxBl" Grid.Column="0"
|
<TextBlock Name="CfrLenTxBl" Grid.Column="0"
|
||||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||||
<EgtWPFLib:EgtTextBox Name="CfrLenTxBx" Grid.Column="1" Margin="10,0,10,0"
|
<EgtWPFLib:EgtTextBox Name="CfrLenTxBx" Grid.Column="1" Margin="10,0,10,0"
|
||||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||||
<TextBlock Name="CfrPercTxBl" Grid.Column="0" Grid.Row="1"
|
<TextBlock Name="CfrPercTxBl" Grid.Column="0" Grid.Row="1"
|
||||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||||
<EgtWPFLib:EgtTextBox Name="CfrPercTxBx" Grid.Column="1" Grid.Row="1" Margin="10,0,10,0"
|
<EgtWPFLib:EgtTextBox Name="CfrPercTxBx" Grid.Column="1" Grid.Row="1" Margin="10,0,10,0"
|
||||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
</GroupBox>
|
</GroupBox>
|
||||||
|
|
||||||
<!--Incisioni-->
|
<!--Incisioni-->
|
||||||
<GroupBox Name="TopMillGpBx" Style="{DynamicResource OmagCut_GroupBox}" Grid.Column="3"
|
<GroupBox Name="TopMillGpBx" Style="{DynamicResource OmagCut_GroupBox}" Grid.Column="3"
|
||||||
Grid.Row="3" Grid.RowSpan="3">
|
Grid.Row="3" Grid.RowSpan="3">
|
||||||
<Grid>
|
<Grid>
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="2*"/>
|
<ColumnDefinition Width="2*"/>
|
||||||
<ColumnDefinition Width="2*"/>
|
<ColumnDefinition Width="2*"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="0.5*"/>
|
<RowDefinition Height="0.5*"/>
|
||||||
<RowDefinition Height="0.5*"/>
|
<RowDefinition Height="0.5*"/>
|
||||||
<RowDefinition Height="0.5*"/>
|
<RowDefinition Height="0.5*"/>
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
<!--Utilizza fresa-->
|
<!--Utilizza fresa-->
|
||||||
<TextBlock Name="TmEnableTxBl" Grid.Column="0" Grid.Row="0"
|
<TextBlock Name="TmEnableTxBl" Grid.Column="0" Grid.Row="0"
|
||||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}" />
|
Style="{DynamicResource OmagCut_ToolsDBTextBlock}" />
|
||||||
<CheckBox Name="TmEnableChBx" Grid.Column="1" Grid.Row="0" Style="{DynamicResource OmagCut_CheckBox_Single}"
|
<CheckBox Name="TmEnableChBx" Grid.Column="1" Grid.Row="0" Style="{DynamicResource OmagCut_CheckBox_Single}"
|
||||||
HorizontalAlignment="Right" Margin="10,0,10,0"/>
|
HorizontalAlignment="Right" Margin="10,0,10,0"/>
|
||||||
<!--Affondamento-->
|
<!--Affondamento-->
|
||||||
<TextBlock Name="TmDepthTxBl" Grid.Column="0" Grid.Row="1"
|
<TextBlock Name="TmDepthTxBl" Grid.Column="0" Grid.Row="1"
|
||||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||||
<EgtWPFLib:EgtTextBox Name="TmDepthTxBx" Grid.Column="1" Grid.Row="1" Margin="10,0,10,0"
|
<EgtWPFLib:EgtTextBox Name="TmDepthTxBx" Grid.Column="1" Grid.Row="1" Margin="10,0,10,0"
|
||||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||||
<!--Larghezza-->
|
<!--Larghezza-->
|
||||||
<TextBlock Name="TmWidthTxBl" Grid.Column="0" Grid.Row="2"
|
<TextBlock Name="TmWidthTxBl" Grid.Column="0" Grid.Row="2"
|
||||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||||
<EgtWPFLib:EgtTextBox Name="TmWidthTxBx" Grid.Column="1" Grid.Row="2" Margin="10,0,10,0"
|
<EgtWPFLib:EgtTextBox Name="TmWidthTxBx" Grid.Column="1" Grid.Row="2" Margin="10,0,10,0"
|
||||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
</GroupBox>
|
</GroupBox>
|
||||||
|
|
||||||
|
|
||||||
<Border Name="SideAngCutProbeGpBx" Style="{DynamicResource OmagCut_NoNameGroupBorder}" Grid.Column="3" Grid.Row="6">
|
<Border Name="SideAngCutProbeGpBx" Style="{DynamicResource OmagCut_NoNameGroupBorder}" Grid.Column="3" Grid.Row="6">
|
||||||
<Grid >
|
|
||||||
<Grid.ColumnDefinitions>
|
|
||||||
<ColumnDefinition Width="2*"/>
|
|
||||||
<ColumnDefinition Width="1*"/>
|
|
||||||
</Grid.ColumnDefinitions>
|
|
||||||
|
|
||||||
<TextBlock Name="SideAngCutProbeTxBl" Grid.Column="0" Grid.Row="0"
|
|
||||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}" />
|
|
||||||
<CheckBox Name="SideAngCutProbeChBx" Grid.Column="1" Grid.Row="0" Style="{StaticResource OmagCut_CheckBox_Single}"
|
|
||||||
HorizontalAlignment="Right" Margin="0,0,10,0"/>
|
|
||||||
</Grid>
|
|
||||||
|
|
||||||
</Border>
|
|
||||||
|
|
||||||
<Border Name="WashingGpBx" Style="{DynamicResource OmagCut_NoNameGroupBorder}" Grid.Column="3" Grid.Row="7">
|
|
||||||
<Grid >
|
|
||||||
<Grid.ColumnDefinitions>
|
|
||||||
<ColumnDefinition Width="2*"/>
|
|
||||||
<ColumnDefinition Width="1*"/>
|
|
||||||
</Grid.ColumnDefinitions>
|
|
||||||
|
|
||||||
<TextBlock Name="WashingTxBl" Grid.Column="0" Grid.Row="0"
|
|
||||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}" />
|
|
||||||
<CheckBox Name="WashingChBx" Grid.Column="1" Grid.Row="0" Style="{StaticResource OmagCut_CheckBox_Single}"
|
|
||||||
HorizontalAlignment="Right" Margin="0,0,10,0"/>
|
|
||||||
</Grid>
|
|
||||||
|
|
||||||
</Border>
|
|
||||||
|
|
||||||
<!--Cornici-->
|
|
||||||
<GroupBox Name="FrameGpBx" Style="{DynamicResource OmagCut_GroupBox}" Grid.Column="3" Grid.Row="8">
|
|
||||||
<Grid >
|
<Grid >
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="2*"/>
|
<ColumnDefinition Width="2*"/>
|
||||||
<ColumnDefinition Width="1*"/>
|
<ColumnDefinition Width="1*"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
<TextBlock Name="FramePauseTxBl" Grid.Column="0" Grid.Row="0"
|
<TextBlock Name="SideAngCutProbeTxBl" Grid.Column="0" Grid.Row="0"
|
||||||
|
Style="{DynamicResource OmagCut_ToolsDBTextBlock}" />
|
||||||
|
<CheckBox Name="SideAngCutProbeChBx" Grid.Column="1" Grid.Row="0" Style="{StaticResource OmagCut_CheckBox_Single}"
|
||||||
|
HorizontalAlignment="Right" Margin="0,0,10,0"/>
|
||||||
|
</Grid>
|
||||||
|
|
||||||
|
</Border>
|
||||||
|
|
||||||
|
<Border Name="WashingGpBx" Style="{DynamicResource OmagCut_NoNameGroupBorder}" Grid.Column="3" Grid.Row="7">
|
||||||
|
<Grid >
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="2*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
|
<TextBlock Name="WashingTxBl" Grid.Column="0" Grid.Row="0"
|
||||||
|
Style="{DynamicResource OmagCut_ToolsDBTextBlock}" />
|
||||||
|
<CheckBox Name="WashingChBx" Grid.Column="1" Grid.Row="0" Style="{StaticResource OmagCut_CheckBox_Single}"
|
||||||
|
HorizontalAlignment="Right" Margin="0,0,10,0"/>
|
||||||
|
</Grid>
|
||||||
|
|
||||||
|
</Border>
|
||||||
|
|
||||||
|
<!--Cornici-->
|
||||||
|
<GroupBox Name="FrameGpBx" Style="{DynamicResource OmagCut_GroupBox}" Grid.Column="3" Grid.Row="8">
|
||||||
|
<Grid >
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="2*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
|
<TextBlock Name="FramePauseTxBl" Grid.Column="0" Grid.Row="0"
|
||||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}" />
|
Style="{DynamicResource OmagCut_ToolsDBTextBlock}" />
|
||||||
<CheckBox Name="FramePauseChBx" Grid.Column="1" Grid.Row="0" Style="{StaticResource OmagCut_CheckBox_Single}"
|
<CheckBox Name="FramePauseChBx" Grid.Column="1" Grid.Row="0" Style="{StaticResource OmagCut_CheckBox_Single}"
|
||||||
HorizontalAlignment="Right" Margin="0,0,10,0"/>
|
HorizontalAlignment="Right" Margin="0,0,10,0"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
</GroupBox>
|
</GroupBox>
|
||||||
|
|
||||||
<UniformGrid Columns="4" Grid.Row="8">
|
<Grid Grid.Column="0" Grid.Row="8">
|
||||||
<Button x:Name="SawProbingBtn"
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="2.5*"/>
|
||||||
|
<ColumnDefinition Width="5*"/>
|
||||||
|
<ColumnDefinition Width="2*"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Button x:Name="SawProbingBtn"
|
||||||
Style="{DynamicResource OmagCut_YellowGradientYellowIconButton}">
|
Style="{DynamicResource OmagCut_YellowGradientYellowIconButton}">
|
||||||
<Image Source="{DynamicResource SawProbeImg}" Style="{StaticResource OmagCut_ScaleButtonIcon}"/>
|
<Image Source="{DynamicResource SawProbeImg}" Style="{StaticResource OmagCut_ScaleButtonIcon}"/>
|
||||||
</Button>
|
</Button>
|
||||||
|
|
||||||
</UniformGrid>
|
|
||||||
|
<TextBlock Name="UseLaserOriginTxBl" Grid.Column="1"
|
||||||
</Grid>
|
Style="{DynamicResource OmagCut_ToolsDBTextBlock}" />
|
||||||
|
<CheckBox Name="UseLaserOriginChBx" Style="{DynamicResource OmagCut_CheckBox_Single}" Grid.Column="2"
|
||||||
</Border>
|
HorizontalAlignment="Right" Margin="10,0,10,0"/>
|
||||||
|
</Grid>
|
||||||
|
|
||||||
|
</Grid>
|
||||||
|
</Border>
|
||||||
|
|
||||||
</UserControl>
|
</UserControl>
|
||||||
|
|||||||
@@ -109,6 +109,7 @@ Public Class AlarmsPageUC
|
|||||||
CurrDripDrillingTxBl.Text = EgtMsg(MSG_ALARMS2PAGEUC + 6) ' DripDrilling
|
CurrDripDrillingTxBl.Text = EgtMsg(MSG_ALARMS2PAGEUC + 6) ' DripDrilling
|
||||||
FrameGpBx.Header = EgtMsg(91068) ' Cornici
|
FrameGpBx.Header = EgtMsg(91068) ' Cornici
|
||||||
FramePauseTxBl.Text = EgtMsg(91067) ' Inserisci pausa
|
FramePauseTxBl.Text = EgtMsg(91067) ' Inserisci pausa
|
||||||
|
UseLaserOriginTxBl.Text = EgtMsg(91129) ' Usa laser per origine
|
||||||
AutoRawImageParamGpBx.Visibility = Windows.Visibility.Hidden
|
AutoRawImageParamGpBx.Visibility = Windows.Visibility.Hidden
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -118,6 +119,14 @@ Public Class AlarmsPageUC
|
|||||||
' Variabile che accorcia il riferimento alla macchina corrente
|
' Variabile che accorcia il riferimento alla macchina corrente
|
||||||
m_CurrentMachine = m_MainWindow.m_CurrentMachine
|
m_CurrentMachine = m_MainWindow.m_CurrentMachine
|
||||||
|
|
||||||
|
' in assenza dell'uscita H1 nascondo i parametri lama
|
||||||
|
If EgtGetHeadId("H1") = GDB_ID.NULL Then
|
||||||
|
SawGpBx.Visibility = Visibility.Hidden
|
||||||
|
TopMillGpBx.Visibility = Visibility.Hidden
|
||||||
|
CurrSawTxBl.Visibility = Visibility.Hidden
|
||||||
|
CurrSawCmBx.Visibility = Visibility.Hidden
|
||||||
|
End If
|
||||||
|
|
||||||
' Verifico la configurazione della macchina per creare i combobox
|
' Verifico la configurazione della macchina per creare i combobox
|
||||||
Select Case m_CurrentMachine.MountedToolConfig
|
Select Case m_CurrentMachine.MountedToolConfig
|
||||||
Case CurrentMachine.MountedToolConfigs.SAW
|
Case CurrentMachine.MountedToolConfigs.SAW
|
||||||
@@ -132,7 +141,7 @@ Public Class AlarmsPageUC
|
|||||||
' Disattivo il gruppo dei parametri fori
|
' Disattivo il gruppo dei parametri fori
|
||||||
HolesGpBx.Visibility = Windows.Visibility.Hidden
|
HolesGpBx.Visibility = Windows.Visibility.Hidden
|
||||||
Case CurrentMachine.MountedToolConfigs.SAWANDAUXTOOL
|
Case CurrentMachine.MountedToolConfigs.SAWANDAUXTOOL
|
||||||
'Non faccio alcunchè
|
'Non faccio alcunchè
|
||||||
Case CurrentMachine.MountedToolConfigs.MANUALTOOLCHANGER, CurrentMachine.MountedToolConfigs.TOOLCHANGER
|
Case CurrentMachine.MountedToolConfigs.MANUALTOOLCHANGER, CurrentMachine.MountedToolConfigs.TOOLCHANGER
|
||||||
'Da implementare
|
'Da implementare
|
||||||
End Select
|
End Select
|
||||||
@@ -151,7 +160,7 @@ Public Class AlarmsPageUC
|
|||||||
|
|
||||||
' Se non previsti tagli waterjet, disabilito relativo box
|
' Se non previsti tagli waterjet, disabilito relativo box
|
||||||
If Not m_CurrentMachine.bWaterJetting Then
|
If Not m_CurrentMachine.bWaterJetting Then
|
||||||
WJsParamGpBx.Visibility = Visibility.Hidden
|
WjsParamGpBx.Visibility = Visibility.Hidden
|
||||||
End If
|
End If
|
||||||
|
|
||||||
' Abilitazione box per contorni grezzo da foto
|
' Abilitazione box per contorni grezzo da foto
|
||||||
@@ -164,7 +173,7 @@ Public Class AlarmsPageUC
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
' Abilitazione Feed ridotta su inizio/fine tagli
|
' Abilitazione Feed ridotta su inizio/fine tagli
|
||||||
If m_CurrentMachine.bFsevEnable Then
|
If m_CurrentMachine.bFsevEnable And EgtGetHeadId("H1") <> GDB_ID.NULL Then
|
||||||
CutFredGpBx.Visibility = Windows.Visibility.Visible
|
CutFredGpBx.Visibility = Windows.Visibility.Visible
|
||||||
Else
|
Else
|
||||||
CutFredGpBx.Visibility = Windows.Visibility.Hidden
|
CutFredGpBx.Visibility = Windows.Visibility.Hidden
|
||||||
@@ -179,11 +188,16 @@ Public Class AlarmsPageUC
|
|||||||
m_bFirst = False
|
m_bFirst = False
|
||||||
End If
|
End If
|
||||||
|
|
||||||
' Aggiorno lista delle lame per pagina macchina in cui scegliere quella corrente
|
' Aggiorno lista delle lame per pagina macchina in cui scegliere quella corrente
|
||||||
CreateToolList(MCH_TF.SAWBLADE, m_SawList)
|
CreateToolList(MCH_TF.SAWBLADE, m_SawList)
|
||||||
' Seleziono lama corrente
|
' Seleziono lama corrente
|
||||||
CurrSawCmBx.SelectedItem = m_CurrentMachine.sCurrSaw
|
CurrSawCmBx.SelectedItem = m_CurrentMachine.sCurrSaw
|
||||||
|
|
||||||
|
' nascondo la lista dei materiali solo se macchina WaterJet
|
||||||
|
If m_CurrentMachine.bWaterJet Then
|
||||||
|
MaterialsGpBx.Visibility = Visibility.Hidden
|
||||||
|
End If
|
||||||
|
|
||||||
' Verifico la configurazione della macchina per creare i combobox
|
' Verifico la configurazione della macchina per creare i combobox
|
||||||
Select Case m_CurrentMachine.MountedToolConfig
|
Select Case m_CurrentMachine.MountedToolConfig
|
||||||
Case CurrentMachine.MountedToolConfigs.SAW
|
Case CurrentMachine.MountedToolConfigs.SAW
|
||||||
@@ -374,6 +388,17 @@ Public Class AlarmsPageUC
|
|||||||
' Leggo parametri per variazione feed in tagli
|
' Leggo parametri per variazione feed in tagli
|
||||||
CfrLenTxBx.Text = LenToString(m_CurrentMachine.dFsevLength, 3)
|
CfrLenTxBx.Text = LenToString(m_CurrentMachine.dFsevLength, 3)
|
||||||
CfrPercTxBx.Text = DoubleToString(m_CurrentMachine.dFsevPerc, 0)
|
CfrPercTxBx.Text = DoubleToString(m_CurrentMachine.dFsevPerc, 0)
|
||||||
|
|
||||||
|
' leggo flag per tavola definita da laser
|
||||||
|
Dim nUseLaserOrigin As Integer = GetPrivateProfileInt(S_TABLE, K_USELASERORIGIN, -1, m_MainWindow.GetMachIniFile())
|
||||||
|
If nUseLaserOrigin = -1 Then
|
||||||
|
UseLaserOriginTxBl.Visibility = Visibility.Hidden
|
||||||
|
UseLaserOriginChBx.Visibility = Visibility.Hidden
|
||||||
|
Else
|
||||||
|
UseLaserOriginTxBl.Visibility = Visibility.Visible
|
||||||
|
UseLaserOriginChBx.IsChecked = (nUseLaserOrigin <> 0)
|
||||||
|
End If
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
' aggiorna le text delle lavorazioni (la selezione avviene nella pagina del grezzo o dalla pagina del progetto corrente)
|
' aggiorna le text delle lavorazioni (la selezione avviene nella pagina del grezzo o dalla pagina del progetto corrente)
|
||||||
@@ -412,11 +437,14 @@ Public Class AlarmsPageUC
|
|||||||
End If
|
End If
|
||||||
If m_CurrentMachine.sCurrWaterJetting <> String.Empty Then
|
If m_CurrentMachine.sCurrWaterJetting <> String.Empty Then
|
||||||
CurrWaterJettingTxBx.Text = m_CurrentMachine.sCurrWaterJetting
|
CurrWaterJettingTxBx.Text = m_CurrentMachine.sCurrWaterJetting
|
||||||
|
CurrWaterJettingQualityTxBx.Text = m_CurrentMachine.sCurrWaterJettingQuality
|
||||||
CurrWaterJettingTxBl.Visibility = Windows.Visibility.Visible
|
CurrWaterJettingTxBl.Visibility = Windows.Visibility.Visible
|
||||||
CurrWaterJettingTxBx.Visibility = Windows.Visibility.Visible
|
CurrWaterJettingTxBx.Visibility = Windows.Visibility.Visible
|
||||||
|
CurrWaterJettingQualityTxBx.Visibility = Windows.Visibility.Visible
|
||||||
Else
|
Else
|
||||||
CurrWaterJettingTxBl.Visibility = Windows.Visibility.Hidden
|
CurrWaterJettingTxBl.Visibility = Windows.Visibility.Hidden
|
||||||
CurrWaterJettingTxBx.Visibility = Windows.Visibility.Hidden
|
CurrWaterJettingTxBx.Visibility = Windows.Visibility.Hidden
|
||||||
|
CurrWaterJettingQualityTxBx.Visibility = Windows.Visibility.Hidden
|
||||||
End If
|
End If
|
||||||
If m_CurrentMachine.sCurrDripSawing <> String.Empty Then
|
If m_CurrentMachine.sCurrDripSawing <> String.Empty Then
|
||||||
CurrDripSawingTxBx.Text = m_CurrentMachine.sCurrDripSawing
|
CurrDripSawingTxBx.Text = m_CurrentMachine.sCurrDripSawing
|
||||||
@@ -549,7 +577,7 @@ Public Class AlarmsPageUC
|
|||||||
If CurrDrillCmBx.SelectedItem.ToString() = NO_TOOL Then
|
If CurrDrillCmBx.SelectedItem.ToString() = NO_TOOL Then
|
||||||
m_CurrentMachine.sCurrDrill = String.Empty
|
m_CurrentMachine.sCurrDrill = String.Empty
|
||||||
m_CurrentMachine.sCurrDrilling = String.Empty
|
m_CurrentMachine.sCurrDrilling = String.Empty
|
||||||
' Assegno foretto
|
' Assegno foretto
|
||||||
Else
|
Else
|
||||||
m_CurrentMachine.sCurrDrill = CurrDrillCmBx.SelectedItem.ToString()
|
m_CurrentMachine.sCurrDrill = CurrDrillCmBx.SelectedItem.ToString()
|
||||||
' Reset fresa, waterjet e relative lavorazioni
|
' Reset fresa, waterjet e relative lavorazioni
|
||||||
@@ -584,7 +612,7 @@ Public Class AlarmsPageUC
|
|||||||
If CurrMillCmBx.SelectedItem.ToString() = NO_TOOL Then
|
If CurrMillCmBx.SelectedItem.ToString() = NO_TOOL Then
|
||||||
m_CurrentMachine.sCurrMill = String.Empty
|
m_CurrentMachine.sCurrMill = String.Empty
|
||||||
m_CurrentMachine.sCurrMilling = String.Empty
|
m_CurrentMachine.sCurrMilling = String.Empty
|
||||||
' Assegno fresa
|
' Assegno fresa
|
||||||
Else
|
Else
|
||||||
m_CurrentMachine.sCurrMill = CurrMillCmBx.SelectedItem.ToString()
|
m_CurrentMachine.sCurrMill = CurrMillCmBx.SelectedItem.ToString()
|
||||||
' Reset foretto, waterjet e relative lavorazioni
|
' Reset foretto, waterjet e relative lavorazioni
|
||||||
@@ -654,7 +682,7 @@ Public Class AlarmsPageUC
|
|||||||
If CurrWJetCmBx.SelectedItem.ToString() = NO_TOOL Then
|
If CurrWJetCmBx.SelectedItem.ToString() = NO_TOOL Then
|
||||||
m_CurrentMachine.sCurrWaterJet = String.Empty
|
m_CurrentMachine.sCurrWaterJet = String.Empty
|
||||||
m_CurrentMachine.sCurrWaterJetting = String.Empty
|
m_CurrentMachine.sCurrWaterJetting = String.Empty
|
||||||
' Assegno Waterjet
|
' Assegno Waterjet
|
||||||
Else
|
Else
|
||||||
m_CurrentMachine.sCurrWaterJet = CurrWJetCmBx.SelectedItem.ToString()
|
m_CurrentMachine.sCurrWaterJet = CurrWJetCmBx.SelectedItem.ToString()
|
||||||
' Reset foretto, fresa e relative lavorazioni
|
' Reset foretto, fresa e relative lavorazioni
|
||||||
@@ -857,7 +885,7 @@ Public Class AlarmsPageUC
|
|||||||
Else
|
Else
|
||||||
WritePrivateProfileString(S_MACH_NEST, K_MACH_ENGRAVING_WITHMILL, "0", m_MainWindow.GetMachIniFile())
|
WritePrivateProfileString(S_MACH_NEST, K_MACH_ENGRAVING_WITHMILL, "0", m_MainWindow.GetMachIniFile())
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub TmDepthTxBx_EgtClosed(sender As Object, e As EventArgs) Handles TmDepthTxBx.EgtClosed
|
Private Sub TmDepthTxBx_EgtClosed(sender As Object, e As EventArgs) Handles TmDepthTxBx.EgtClosed
|
||||||
Dim dVal As Double = 0
|
Dim dVal As Double = 0
|
||||||
@@ -993,6 +1021,14 @@ Public Class AlarmsPageUC
|
|||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Private Sub UseLaserOriginChBx_Click() Handles UseLaserOriginChBx.Click
|
||||||
|
If UseLaserOriginChBx.IsChecked() Then
|
||||||
|
WritePrivateProfileString(S_TABLE, K_USELASERORIGIN, "1", m_MainWindow.GetMachIniFile())
|
||||||
|
Else
|
||||||
|
WritePrivateProfileString(S_TABLE, K_USELASERORIGIN, "0", m_MainWindow.GetMachIniFile())
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
Private Sub WashingChBx_Click(sender As Object, e As RoutedEventArgs) Handles WashingChBx.Click
|
Private Sub WashingChBx_Click(sender As Object, e As RoutedEventArgs) Handles WashingChBx.Click
|
||||||
If WashingChBx.IsChecked() Then
|
If WashingChBx.IsChecked() Then
|
||||||
WritePrivateProfileString(S_MACH_NEST, K_MACH_WASHING, "1", m_MainWindow.GetMachIniFile())
|
WritePrivateProfileString(S_MACH_NEST, K_MACH_WASHING, "1", m_MainWindow.GetMachIniFile())
|
||||||
|
|||||||
+149
-11
@@ -1,4 +1,5 @@
|
|||||||
Imports System.Collections.ObjectModel
|
Imports System.Collections.ObjectModel
|
||||||
|
Imports EgtWPFLib5
|
||||||
Imports EgtUILib
|
Imports EgtUILib
|
||||||
|
|
||||||
Public Class CurrentMachine
|
Public Class CurrentMachine
|
||||||
@@ -114,6 +115,7 @@ Public Class CurrentMachine
|
|||||||
Private m_sCurrDripSawing As String = String.Empty
|
Private m_sCurrDripSawing As String = String.Empty
|
||||||
Private m_sCurrDripDrilling As String = String.Empty
|
Private m_sCurrDripDrilling As String = String.Empty
|
||||||
Private m_sCurrWaterJetting As String = String.Empty
|
Private m_sCurrWaterJetting As String = String.Empty
|
||||||
|
Private m_sCurrWaterJettingQuality As String = String.Empty
|
||||||
|
|
||||||
' Spessore sottopezzo
|
' Spessore sottopezzo
|
||||||
Private m_dAdditionalTable As Double = 0
|
Private m_dAdditionalTable As Double = 0
|
||||||
@@ -157,6 +159,9 @@ Public Class CurrentMachine
|
|||||||
' Lista dei materiali
|
' Lista dei materiali
|
||||||
Private m_Materials As New ObservableCollection(Of Material)
|
Private m_Materials As New ObservableCollection(Of Material)
|
||||||
|
|
||||||
|
' Lista delle qualità di lavorazioni disponibili nel WaterJet
|
||||||
|
Private m_Qualities As New ObservableCollection(Of String)
|
||||||
|
|
||||||
' Massimo id della lista materiali nel file ini
|
' Massimo id della lista materiali nel file ini
|
||||||
Private m_MaxIdMat As Integer = 0
|
Private m_MaxIdMat As Integer = 0
|
||||||
|
|
||||||
@@ -709,6 +714,17 @@ Public Class CurrentMachine
|
|||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
Friend Property sCurrWaterJettingQuality As String
|
||||||
|
Get
|
||||||
|
Return m_sCurrWaterJettingQuality
|
||||||
|
End Get
|
||||||
|
Set(value As String)
|
||||||
|
If WritePrivateProfileString(S_MACH_MACH, K_CURRWATERJETTINGQUALITY, value, sMachIniFile) Then
|
||||||
|
m_sCurrWaterJettingQuality = value
|
||||||
|
End If
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
Friend ReadOnly Property WaterJettingActive As Double
|
Friend ReadOnly Property WaterJettingActive As Double
|
||||||
Get
|
Get
|
||||||
Return m_bWaterJetting AndAlso Not String.IsNullOrWhiteSpace(m_sCurrWaterJetting)
|
Return m_bWaterJetting AndAlso Not String.IsNullOrWhiteSpace(m_sCurrWaterJetting)
|
||||||
@@ -903,6 +919,12 @@ Public Class CurrentMachine
|
|||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
Friend ReadOnly Property Qualities As ObservableCollection(Of String)
|
||||||
|
Get
|
||||||
|
Return m_Qualities
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
Friend Sub AddMaterial(value As Material)
|
Friend Sub AddMaterial(value As Material)
|
||||||
For Each Material As Material In Materials
|
For Each Material As Material In Materials
|
||||||
If Material.nId = value.nId Then
|
If Material.nId = value.nId Then
|
||||||
@@ -984,7 +1006,11 @@ Public Class CurrentMachine
|
|||||||
End Get
|
End Get
|
||||||
Set(value As Material)
|
Set(value As Material)
|
||||||
Dim CurrMatId As String = If(Not IsNothing(value), value.nId.ToString, "")
|
Dim CurrMatId As String = If(Not IsNothing(value), value.nId.ToString, "")
|
||||||
WritePrivateProfileString(S_MATERIALS, K_CURRMATERIAL, CurrMatId, sMachIniFile)
|
If bWaterJet Then
|
||||||
|
WritePrivateProfileString(S_MATERIALS, K_CURRMATERIAL, CurrMatId & If(Not IsNothing(value), "." & value.SubId, ""), sMachIniFile)
|
||||||
|
Else
|
||||||
|
WritePrivateProfileString(S_MATERIALS, K_CURRMATERIAL, CurrMatId, sMachIniFile)
|
||||||
|
End If
|
||||||
m_CurrMat = value
|
m_CurrMat = value
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
@@ -1157,6 +1183,8 @@ Public Class CurrentMachine
|
|||||||
GetPrivateProfileString(S_MACH_MACH, K_CURRDRIPDRILLING, Nothing, m_sCurrDripDrilling, sMachIniFile)
|
GetPrivateProfileString(S_MACH_MACH, K_CURRDRIPDRILLING, Nothing, m_sCurrDripDrilling, sMachIniFile)
|
||||||
' waterjetting
|
' waterjetting
|
||||||
GetPrivateProfileString(S_MACH_MACH, K_CURRWATERJETTING, Nothing, m_sCurrWaterJetting, sMachIniFile)
|
GetPrivateProfileString(S_MACH_MACH, K_CURRWATERJETTING, Nothing, m_sCurrWaterJetting, sMachIniFile)
|
||||||
|
' waterjettingquality
|
||||||
|
GetPrivateProfileString(S_MACH_MACH, K_CURRWATERJETTINGQUALITY, Nothing, m_sCurrWaterJettingQuality, sMachIniFile)
|
||||||
|
|
||||||
' Leggo numero di portautensili
|
' Leggo numero di portautensili
|
||||||
m_ToolChangerNbr = GetPrivateProfileInt(S_TOOLCHANGER, K_NUMBER, 0, sMachIniFile)
|
m_ToolChangerNbr = GetPrivateProfileInt(S_TOOLCHANGER, K_NUMBER, 0, sMachIniFile)
|
||||||
@@ -1218,27 +1246,120 @@ Public Class CurrentMachine
|
|||||||
' Leggo la lista dei materiali
|
' Leggo la lista dei materiali
|
||||||
Dim Material As Material = Nothing
|
Dim Material As Material = Nothing
|
||||||
Dim nIndex As Integer = 1
|
Dim nIndex As Integer = 1
|
||||||
While (GetPrivateProfileMaterial(S_MATERIALS, K_MATERIAL & nIndex, Material, sMachIniFile))
|
|
||||||
m_Materials.Add(Material)
|
If m_bWaterJet Then
|
||||||
nIndex += 1
|
LoadWJMaterial(True)
|
||||||
End While
|
Else
|
||||||
|
While (GetPrivateProfileMaterial(S_MATERIALS, K_MATERIAL & nIndex, Material, sMachIniFile))
|
||||||
|
m_Materials.Add(Material)
|
||||||
|
nIndex += 1
|
||||||
|
End While
|
||||||
|
End If
|
||||||
|
|
||||||
' Salvo massimo indice a cui sono arrivato per usarlo quando devo aggiungere nuovi elementi alla lista
|
' Salvo massimo indice a cui sono arrivato per usarlo quando devo aggiungere nuovi elementi alla lista
|
||||||
m_MaxIdMat = nIndex - 1
|
m_MaxIdMat = nIndex - 1
|
||||||
|
|
||||||
' Leggo materiale correntemente attivo
|
' Leggo materiale correntemente attivo
|
||||||
Dim CurrMatId As Integer = GetPrivateProfileInt(S_MATERIALS, K_CURRMATERIAL, 0, sMachIniFile)
|
Dim sCurrMatId As String = String.Empty
|
||||||
For Each Material In Materials
|
EgtUILib.GetPrivateProfileString(S_MATERIALS, K_CURRMATERIAL, "0", sCurrMatId, sMachIniFile)
|
||||||
If Material.nId = CurrMatId Then
|
If bWaterJet Then
|
||||||
m_CurrMat = Material
|
Dim sCurrMatIds As String()
|
||||||
Exit For
|
sCurrMatIds = sCurrMatId.Split("."c)
|
||||||
|
If sCurrMatIds.Length > 1 Then
|
||||||
|
Dim nCurrMatId As Integer
|
||||||
|
Dim nCurrSubMatId As Integer
|
||||||
|
If Not Integer.TryParse(sCurrMatIds(0), nCurrMatId) Then nCurrMatId = 0
|
||||||
|
If Not Integer.TryParse(sCurrMatIds(1), nCurrSubMatId) Then nCurrSubMatId = 0
|
||||||
|
For Each Material In Materials
|
||||||
|
If Material.nId = nCurrMatId AndAlso Material.SubId = nCurrSubMatId Then
|
||||||
|
m_CurrMat = Material
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
Next
|
||||||
End If
|
End If
|
||||||
Next
|
Else
|
||||||
|
Dim nCurrMatId As Integer
|
||||||
|
If Not Integer.TryParse(sCurrMatId, nCurrMatId) Then nCurrMatId = 0
|
||||||
|
For Each Material In Materials
|
||||||
|
If Material.nId = nCurrMatId Then
|
||||||
|
m_CurrMat = Material
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
End If
|
||||||
' leggo se la macchina ha il tastatore dello spessore tavola
|
' leggo se la macchina ha il tastatore dello spessore tavola
|
||||||
m_HasRawProbe = (GetPrivateProfileInt(S_MACH_PROBING, K_ENABLERAWPROBE, 1, sMachIniFile) <> 0)
|
m_HasRawProbe = (GetPrivateProfileInt(S_MACH_PROBING, K_ENABLERAWPROBE, 1, sMachIniFile) <> 0)
|
||||||
' leggo se la macchina ha il lettore di codice a barre della lastra
|
' leggo se la macchina ha il lettore di codice a barre della lastra
|
||||||
m_nEnableBarCodeReader = GetPrivateProfileInt(S_MACH_BARCODEREADER, K_ENABLEBCR, 0, sMachIniFile)
|
m_nEnableBarCodeReader = GetPrivateProfileInt(S_MACH_BARCODEREADER, K_ENABLEBCR, 0, sMachIniFile)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Public Sub LoadWJMaterial(Optional bIsStart As Boolean = False)
|
||||||
|
Dim TempCurrMat As Material = CurrMat
|
||||||
|
' Svuoto l'attuale lista di materiali
|
||||||
|
m_Materials.Clear()
|
||||||
|
' Leggo valori da file Data e li carico nelle proprietà
|
||||||
|
Dim sFilePath As String = sMachDir & "\" & MACHININGS_DIR & "\" & WATERJETDB_FILE
|
||||||
|
Dim Local_MaterialList = New ObservableCollection(Of EgtWPFLib5.WjMaterial)
|
||||||
|
Local_MaterialList = EgtWPFLib5.WaterjetDbWindowVM.LoadWjMaterials(sFilePath)
|
||||||
|
' definisco la lista delle qualità (solo se è vuota)
|
||||||
|
If m_Qualities.Count < 1 Then
|
||||||
|
m_Qualities.Add("")
|
||||||
|
m_Qualities.Add("Q1")
|
||||||
|
m_Qualities.Add("Q2")
|
||||||
|
m_Qualities.Add("Q3")
|
||||||
|
m_Qualities.Add("Q4")
|
||||||
|
m_Qualities.Add("Q5")
|
||||||
|
m_Qualities.Add("QExtra")
|
||||||
|
End If
|
||||||
|
' inserisco il materiale generico di default -- IN SOSPESO
|
||||||
|
'm_Materials.Add(New Material(0, "***", 0))
|
||||||
|
' costruiscoi la lista
|
||||||
|
Dim i As Integer = 0
|
||||||
|
Dim sName As String = String.Empty
|
||||||
|
For i = 0 To Local_MaterialList.Count - 1
|
||||||
|
sName = Local_MaterialList(i).Name
|
||||||
|
Dim j As Integer = 0
|
||||||
|
For j = 0 To Local_MaterialList(i).SubMaterialList.Count - 1
|
||||||
|
m_Materials.Add(New Material(i + 1, sName & "." & Local_MaterialList(i).SubMaterialList(j).Name, j + 1))
|
||||||
|
Next
|
||||||
|
Next
|
||||||
|
If Not bIsStart Then CurrMat = TempCurrMat
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Public Function GetMaxThicknessCurrMaterial(sCurMat As String) As Double
|
||||||
|
Dim bFound As Boolean = False
|
||||||
|
Dim dMaxThick As Double = 0
|
||||||
|
' Leggo valori da file Data e li carico nelle proprietà
|
||||||
|
Dim sFilePath As String = sMachDir & "\" & MACHININGS_DIR & "\" & WATERJETDB_FILE
|
||||||
|
Dim Local_MaterialList = New ObservableCollection(Of EgtWPFLib5.WjMaterial)
|
||||||
|
Local_MaterialList = EgtWPFLib5.WaterjetDbWindowVM.LoadWjMaterials(sFilePath)
|
||||||
|
Dim sItems() As String = sCurMat.Split("."c)
|
||||||
|
If sItems.Count > 1 Then
|
||||||
|
Dim sMat As String = sItems(0)
|
||||||
|
Dim sSubMat As String = sItems(1)
|
||||||
|
For Each ItemMat As EgtWPFLib5.WjMaterial In Local_MaterialList
|
||||||
|
If ItemMat.Name = sMat Then
|
||||||
|
For Each ItemSubMat As EgtWPFLib5.WjSubMaterial In ItemMat.SubMaterialList
|
||||||
|
If ItemSubMat.Name = sSubMat Then
|
||||||
|
For Each ItemParam As EgtWPFLib5.WjParam In ItemSubMat.ParamList
|
||||||
|
Dim dParamThick As Double
|
||||||
|
StringToDouble(ItemParam.Thickness, dParamThick)
|
||||||
|
If dParamThick > dMaxThick Then
|
||||||
|
dMaxThick = dParamThick
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
bFound = True
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
If bFound Then Exit For
|
||||||
|
Next
|
||||||
|
End If
|
||||||
|
If bFound Then Exit For
|
||||||
|
Next
|
||||||
|
End If
|
||||||
|
Return dMaxThick
|
||||||
|
End Function
|
||||||
|
|
||||||
Friend Function IsVacuumMovePossible() As Boolean
|
Friend Function IsVacuumMovePossible() As Boolean
|
||||||
' Recupero diametro lama corrente
|
' Recupero diametro lama corrente
|
||||||
EgtTdbSetCurrTool(sCurrSaw)
|
EgtTdbSetCurrTool(sCurrSaw)
|
||||||
@@ -1333,6 +1454,7 @@ Friend Class Material
|
|||||||
|
|
||||||
Private m_nId As Integer
|
Private m_nId As Integer
|
||||||
Private m_sName As String
|
Private m_sName As String
|
||||||
|
Private m_SubId As Integer = 0
|
||||||
|
|
||||||
Public ReadOnly Property nId As Integer
|
Public ReadOnly Property nId As Integer
|
||||||
Get
|
Get
|
||||||
@@ -1349,6 +1471,15 @@ Friend Class Material
|
|||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
Public Property SubId As Integer
|
||||||
|
Get
|
||||||
|
Return m_SubId
|
||||||
|
End Get
|
||||||
|
Set(value As Integer)
|
||||||
|
m_SubId = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
Sub New(sName As String, MaterialList As ObservableCollection(Of Material))
|
Sub New(sName As String, MaterialList As ObservableCollection(Of Material))
|
||||||
Dim nMaxId As Integer = 0
|
Dim nMaxId As Integer = 0
|
||||||
For Each Material As Material In MaterialList
|
For Each Material As Material In MaterialList
|
||||||
@@ -1365,4 +1496,11 @@ Friend Class Material
|
|||||||
m_sName = sName
|
m_sName = sName
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Sub New(nId As Integer, sName As String, nSubId As Integer)
|
||||||
|
m_nId = nId
|
||||||
|
m_sName = sName
|
||||||
|
m_SubId = nSubId
|
||||||
|
End Sub
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
|
|
||||||
|
|||||||
@@ -24,9 +24,10 @@
|
|||||||
<ColumnDefinition Width="2*"/>
|
<ColumnDefinition Width="2*"/>
|
||||||
<ColumnDefinition Width="2*"/>
|
<ColumnDefinition Width="2*"/>
|
||||||
<ColumnDefinition Width="2*"/>
|
<ColumnDefinition Width="2*"/>
|
||||||
<ColumnDefinition Width="1*"/>
|
|
||||||
<ColumnDefinition Width="1*"/>
|
|
||||||
<ColumnDefinition Width="2*"/>
|
<ColumnDefinition Width="2*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
<ToggleButton Name="AlarmsBtn" Style="{DynamicResource OmagCut_YellowIconToggleButton}">
|
<ToggleButton Name="AlarmsBtn" Style="{DynamicResource OmagCut_YellowIconToggleButton}">
|
||||||
@@ -41,10 +42,13 @@
|
|||||||
<ToggleButton Name="PolishingsBtn" Grid.Column="3" Style="{DynamicResource OmagCut_BlueIconToggleButton}">
|
<ToggleButton Name="PolishingsBtn" Grid.Column="3" Style="{DynamicResource OmagCut_BlueIconToggleButton}">
|
||||||
<!--<Image Source="{DynamicResource LucidaturaImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>-->
|
<!--<Image Source="{DynamicResource LucidaturaImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>-->
|
||||||
</ToggleButton>
|
</ToggleButton>
|
||||||
<ToggleButton Name="TestingPageBtn" Grid.Column="4" Style="{DynamicResource OmagCut_YellowIconToggleButton}">
|
<ToggleButton Name="WaterJetBtn" Grid.Column="4" Style="{DynamicResource OmagCut_BlueIconToggleButton}">
|
||||||
|
<!--<Image Source="{DynamicResource WaterJetImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>-->
|
||||||
|
</ToggleButton>
|
||||||
|
<ToggleButton Name="TestingPageBtn" Grid.Column="5" Style="{DynamicResource OmagCut_YellowIconToggleButton}">
|
||||||
<Image Source="{DynamicResource MacchinaImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
<Image Source="{DynamicResource MacchinaImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||||
</ToggleButton>
|
</ToggleButton>
|
||||||
<ToggleButton Name="StatisticsBtn" Grid.Column="5" Style="{DynamicResource OmagCut_YellowToggleButton}">
|
<ToggleButton Name="StatisticsBtn" Grid.Column="6" Style="{DynamicResource OmagCut_YellowToggleButton}">
|
||||||
|
|
||||||
</ToggleButton>
|
</ToggleButton>
|
||||||
|
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ Public Class MachinePageUC
|
|||||||
Friend m_ToolsDbPageUC As ToolsDbPageUC
|
Friend m_ToolsDbPageUC As ToolsDbPageUC
|
||||||
Friend m_MachiningDbPageUC As MachiningDbPageUC
|
Friend m_MachiningDbPageUC As MachiningDbPageUC
|
||||||
Friend m_PolishingsPageUC As PolishingsPageUC
|
Friend m_PolishingsPageUC As PolishingsPageUC
|
||||||
|
Friend m_WaterJetPageUC As WaterJetPageUC
|
||||||
Friend m_MachineCNPageUC As MachineCNPageUC
|
Friend m_MachineCNPageUC As MachineCNPageUC
|
||||||
Friend m_StatisticsPageUC As StatisticsPageUC
|
Friend m_StatisticsPageUC As StatisticsPageUC
|
||||||
|
|
||||||
@@ -21,6 +22,7 @@ Public Class MachinePageUC
|
|||||||
ToolsDb
|
ToolsDb
|
||||||
MachiningDb
|
MachiningDb
|
||||||
Polishings
|
Polishings
|
||||||
|
WaterJet
|
||||||
MachineCN
|
MachineCN
|
||||||
Statistics
|
Statistics
|
||||||
End Enum
|
End Enum
|
||||||
@@ -32,6 +34,7 @@ Public Class MachinePageUC
|
|||||||
m_ToolsDbPageUC = New ToolsDbPageUC
|
m_ToolsDbPageUC = New ToolsDbPageUC
|
||||||
m_MachiningDbPageUC = New MachiningDbPageUC
|
m_MachiningDbPageUC = New MachiningDbPageUC
|
||||||
m_PolishingsPageUC = New PolishingsPageUC
|
m_PolishingsPageUC = New PolishingsPageUC
|
||||||
|
m_WaterJetPageUC = New WaterJetPageUC
|
||||||
m_MachineCNPageUC = New MachineCNPageUC
|
m_MachineCNPageUC = New MachineCNPageUC
|
||||||
m_StatisticsPageUC = New StatisticsPageUC
|
m_StatisticsPageUC = New StatisticsPageUC
|
||||||
|
|
||||||
@@ -40,6 +43,7 @@ Public Class MachinePageUC
|
|||||||
m_ToolsDbPageUC.SetValue(Grid.RowProperty, 1)
|
m_ToolsDbPageUC.SetValue(Grid.RowProperty, 1)
|
||||||
m_MachiningDbPageUC.SetValue(Grid.RowProperty, 1)
|
m_MachiningDbPageUC.SetValue(Grid.RowProperty, 1)
|
||||||
m_PolishingsPageUC.SetValue(Grid.RowProperty, 1)
|
m_PolishingsPageUC.SetValue(Grid.RowProperty, 1)
|
||||||
|
m_WaterJetPageUC.SetValue(Grid.RowProperty, 1)
|
||||||
m_MachineCNPageUC.SetValue(Grid.RowProperty, 1)
|
m_MachineCNPageUC.SetValue(Grid.RowProperty, 1)
|
||||||
m_StatisticsPageUC.SetValue(Grid.RowProperty, 1)
|
m_StatisticsPageUC.SetValue(Grid.RowProperty, 1)
|
||||||
|
|
||||||
@@ -47,6 +51,7 @@ Public Class MachinePageUC
|
|||||||
ToolsDBBtn.ToolTip = EgtMsg(MSG_MACHINEPAGEUC + 6)
|
ToolsDBBtn.ToolTip = EgtMsg(MSG_MACHINEPAGEUC + 6)
|
||||||
MachiningDBBtn.ToolTip = EgtMsg(MSG_MACHINEPAGEUC + 7)
|
MachiningDBBtn.ToolTip = EgtMsg(MSG_MACHINEPAGEUC + 7)
|
||||||
PolishingsBtn.Content = EgtMsg(91090)
|
PolishingsBtn.Content = EgtMsg(91090)
|
||||||
|
WaterJetBtn.Content = EgtMsg(91128)
|
||||||
TestingPageBtn.ToolTip = EgtMsg(MSG_MACHINEPAGEUC + 8)
|
TestingPageBtn.ToolTip = EgtMsg(MSG_MACHINEPAGEUC + 8)
|
||||||
StatisticsBtn.Content = EgtMsg(90709)
|
StatisticsBtn.Content = EgtMsg(90709)
|
||||||
|
|
||||||
@@ -55,10 +60,14 @@ Public Class MachinePageUC
|
|||||||
m_ActiveMachinePage = MachinePages.Alarms
|
m_ActiveMachinePage = MachinePages.Alarms
|
||||||
|
|
||||||
' Se lucidature non abilitate, disattivo la pagina DB lucidature
|
' Se lucidature non abilitate, disattivo la pagina DB lucidature
|
||||||
If Not m_MainWindow.m_CurrentMachine.bPolishing Then
|
If Not m_MainWindow.m_CurrentMachine.bPolishing Then
|
||||||
PolishingsBtn.IsEnabled = False
|
PolishingsBtn.IsEnabled = False
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
If Not m_MainWindow.m_CurrentMachine.bWaterJet Then
|
||||||
|
WaterJetBtn.IsEnabled = False
|
||||||
|
End If
|
||||||
|
|
||||||
' Se controllo numerico 0, disattivo la pagina macchina
|
' Se controllo numerico 0, disattivo la pagina macchina
|
||||||
If GetPrivateProfileInt(S_NUMERICALCONTROL, K_TYPE, 0, m_MainWindow.GetMachIniFile()) = 0 Then
|
If GetPrivateProfileInt(S_NUMERICALCONTROL, K_TYPE, 0, m_MainWindow.GetMachIniFile()) = 0 Then
|
||||||
TestingPageBtn.IsEnabled = False
|
TestingPageBtn.IsEnabled = False
|
||||||
@@ -134,6 +143,22 @@ Public Class MachinePageUC
|
|||||||
MachinePageGrid.Children.Remove(m_PolishingsPageUC)
|
MachinePageGrid.Children.Remove(m_PolishingsPageUC)
|
||||||
MachinePageGrid.Children.Add(m_AlarmsPageUC)
|
MachinePageGrid.Children.Add(m_AlarmsPageUC)
|
||||||
m_ActiveMachinePage = MachinePages.Alarms
|
m_ActiveMachinePage = MachinePages.Alarms
|
||||||
|
Case MachinePages.WaterJet
|
||||||
|
' Verifica ed eventuale salvataggio Db Waterjet
|
||||||
|
Dim nPressedBtn As Integer = DirectCast(m_WaterJetPageUC.DataContext, EgtWPFLib5.WaterjetDbWindowVM).CloseWaterjetDb_OmagCut(m_MainWindow)
|
||||||
|
If nPressedBtn = EgtWPFLib5.WaterjetDbWindowVM.SaveWndBtnEnum.CANCEL Then
|
||||||
|
AlarmsBtn.IsChecked = False
|
||||||
|
WaterJetBtn.IsChecked = True
|
||||||
|
Return
|
||||||
|
ElseIf nPressedBtn = EgtWPFLib5.WaterjetDbWindowVM.SaveWndBtnEnum.NO Then
|
||||||
|
m_WaterJetPageUC.WaterJetPage_Reinitialize()
|
||||||
|
End If
|
||||||
|
' passo alla pagina Dati Macchina
|
||||||
|
AlarmsBtn.IsChecked = True
|
||||||
|
WaterJetBtn.IsChecked = False
|
||||||
|
MachinePageGrid.Children.Remove(m_WaterJetPageUC)
|
||||||
|
MachinePageGrid.Children.Add(m_AlarmsPageUC)
|
||||||
|
m_ActiveMachinePage = MachinePages.Alarms
|
||||||
Case MachinePages.MachineCN
|
Case MachinePages.MachineCN
|
||||||
AlarmsBtn.IsChecked = True
|
AlarmsBtn.IsChecked = True
|
||||||
TestingPageBtn.IsChecked = False
|
TestingPageBtn.IsChecked = False
|
||||||
@@ -188,6 +213,22 @@ Public Class MachinePageUC
|
|||||||
MachinePageGrid.Children.Remove(m_PolishingsPageUC)
|
MachinePageGrid.Children.Remove(m_PolishingsPageUC)
|
||||||
MachinePageGrid.Children.Add(m_ToolsDbPageUC)
|
MachinePageGrid.Children.Add(m_ToolsDbPageUC)
|
||||||
m_ActiveMachinePage = MachinePages.ToolsDb
|
m_ActiveMachinePage = MachinePages.ToolsDb
|
||||||
|
Case MachinePages.WaterJet
|
||||||
|
'Verifica ed eventuale salvataggio Db Waterjet
|
||||||
|
Dim nPressedBtn As Integer = DirectCast(m_WaterJetPageUC.DataContext, EgtWPFLib5.WaterjetDbWindowVM).CloseWaterjetDb_OmagCut(m_MainWindow)
|
||||||
|
If nPressedBtn = EgtWPFLib5.WaterjetDbWindowVM.SaveWndBtnEnum.CANCEL Then
|
||||||
|
ToolsDBBtn.IsChecked = False
|
||||||
|
WaterJetBtn.IsChecked = True
|
||||||
|
Return
|
||||||
|
ElseIf nPressedBtn = EgtWPFLib5.WaterjetDbWindowVM.SaveWndBtnEnum.NO Then
|
||||||
|
m_WaterJetPageUC.WaterJetPage_Reinitialize()
|
||||||
|
End If
|
||||||
|
' passo alla pagina Dati Macchina
|
||||||
|
ToolsDBBtn.IsChecked = True
|
||||||
|
WaterJetBtn.IsChecked = False
|
||||||
|
MachinePageGrid.Children.Remove(m_WaterJetPageUC)
|
||||||
|
MachinePageGrid.Children.Add(m_ToolsDbPageUC)
|
||||||
|
m_ActiveMachinePage = MachinePages.ToolsDb
|
||||||
Case MachinePages.MachineCN
|
Case MachinePages.MachineCN
|
||||||
ToolsDBBtn.IsChecked = True
|
ToolsDBBtn.IsChecked = True
|
||||||
TestingPageBtn.IsChecked = False
|
TestingPageBtn.IsChecked = False
|
||||||
@@ -242,6 +283,22 @@ Public Class MachinePageUC
|
|||||||
MachinePageGrid.Children.Remove(m_PolishingsPageUC)
|
MachinePageGrid.Children.Remove(m_PolishingsPageUC)
|
||||||
MachinePageGrid.Children.Add(m_MachiningDbPageUC)
|
MachinePageGrid.Children.Add(m_MachiningDbPageUC)
|
||||||
m_ActiveMachinePage = MachinePages.MachiningDb
|
m_ActiveMachinePage = MachinePages.MachiningDb
|
||||||
|
Case MachinePages.WaterJet
|
||||||
|
' Verifica ed eventuale salvataggio Db Waterjet
|
||||||
|
Dim nPressedBtn As Integer = DirectCast(m_WaterJetPageUC.DataContext, EgtWPFLib5.WaterjetDbWindowVM).CloseWaterjetDb_OmagCut(m_MainWindow)
|
||||||
|
If nPressedBtn = EgtWPFLib5.WaterjetDbWindowVM.SaveWndBtnEnum.CANCEL Then
|
||||||
|
MachiningDBBtn.IsChecked = False
|
||||||
|
WaterJetBtn.IsChecked = True
|
||||||
|
Return
|
||||||
|
ElseIf nPressedBtn = EgtWPFLib5.WaterjetDbWindowVM.SaveWndBtnEnum.NO Then
|
||||||
|
m_WaterJetPageUC.WaterJetPage_Reinitialize()
|
||||||
|
End If
|
||||||
|
' passo alla pagina Dati Macchina
|
||||||
|
MachiningDBBtn.IsChecked = True
|
||||||
|
WaterJetBtn.IsChecked = False
|
||||||
|
MachinePageGrid.Children.Remove(m_WaterJetPageUC)
|
||||||
|
MachinePageGrid.Children.Add(m_MachiningDbPageUC)
|
||||||
|
m_ActiveMachinePage = MachinePages.MachiningDb
|
||||||
Case MachinePages.MachineCN
|
Case MachinePages.MachineCN
|
||||||
MachiningDBBtn.IsChecked = True
|
MachiningDBBtn.IsChecked = True
|
||||||
TestingPageBtn.IsChecked = False
|
TestingPageBtn.IsChecked = False
|
||||||
@@ -299,6 +356,22 @@ Public Class MachinePageUC
|
|||||||
m_ActiveMachinePage = MachinePages.Polishings
|
m_ActiveMachinePage = MachinePages.Polishings
|
||||||
Case MachinePages.Polishings
|
Case MachinePages.Polishings
|
||||||
PolishingsBtn.IsChecked = True
|
PolishingsBtn.IsChecked = True
|
||||||
|
Case MachinePages.WaterJet
|
||||||
|
' Verifica ed eventuale salvataggio Db Waterjet
|
||||||
|
Dim nPressedBtn As Integer = DirectCast(m_WaterJetPageUC.DataContext, EgtWPFLib5.WaterjetDbWindowVM).CloseWaterjetDb_OmagCut(m_MainWindow)
|
||||||
|
If nPressedBtn = EgtWPFLib5.WaterjetDbWindowVM.SaveWndBtnEnum.CANCEL Then
|
||||||
|
PolishingsBtn.IsChecked = False
|
||||||
|
WaterJetBtn.IsChecked = True
|
||||||
|
Return
|
||||||
|
ElseIf nPressedBtn = EgtWPFLib5.WaterjetDbWindowVM.SaveWndBtnEnum.NO Then
|
||||||
|
m_WaterJetPageUC.WaterJetPage_Reinitialize()
|
||||||
|
End If
|
||||||
|
' passo alla pagina Dati Macchina
|
||||||
|
PolishingsBtn.IsChecked = True
|
||||||
|
WaterJetBtn.IsChecked = False
|
||||||
|
MachinePageGrid.Children.Remove(m_WaterJetPageUC)
|
||||||
|
MachinePageGrid.Children.Add(m_PolishingsPageUC)
|
||||||
|
m_ActiveMachinePage = MachinePages.Polishings
|
||||||
Case MachinePages.MachineCN
|
Case MachinePages.MachineCN
|
||||||
PolishingsBtn.IsChecked = True
|
PolishingsBtn.IsChecked = True
|
||||||
TestingPageBtn.IsChecked = False
|
TestingPageBtn.IsChecked = False
|
||||||
@@ -314,6 +387,77 @@ Public Class MachinePageUC
|
|||||||
End Select
|
End Select
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Private Sub WaterJetBtn_Click(sender As Object, e As RoutedEventArgs) Handles WaterJetBtn.Click
|
||||||
|
Select Case m_ActiveMachinePage
|
||||||
|
Case MachinePages.Alarms
|
||||||
|
AlarmsBtn.IsChecked = False
|
||||||
|
WaterJetBtn.IsChecked = True
|
||||||
|
MachinePageGrid.Children.Remove(m_AlarmsPageUC)
|
||||||
|
MachinePageGrid.Children.Add(m_WaterJetPageUC)
|
||||||
|
m_ActiveMachinePage = MachinePages.WaterJet
|
||||||
|
'DirectCast(m_WaterJetPageUC.DataContext, WaterjetDbWindowVM).RefreshDImensionPage()
|
||||||
|
Case MachinePages.ToolsDb
|
||||||
|
' Verifica ed eventuale salvataggio utensile corrente
|
||||||
|
If Not m_ToolsDbPageUC.SaveCurrTool() Then
|
||||||
|
PolishingsBtn.IsChecked = False
|
||||||
|
ToolsDBBtn.IsChecked = True
|
||||||
|
Return
|
||||||
|
End If
|
||||||
|
' salvo il DB utensili
|
||||||
|
EgtSetCurrentContext(m_MainWindow.m_CurrentProjectPageUC.CurrentProjectScene.GetCtx())
|
||||||
|
EgtTdbSave()
|
||||||
|
' passo alla pagina WaterJet
|
||||||
|
WaterJetBtn.IsChecked = True
|
||||||
|
ToolsDBBtn.IsChecked = False
|
||||||
|
MachinePageGrid.Children.Remove(m_ToolsDbPageUC)
|
||||||
|
MachinePageGrid.Children.Add(m_WaterJetPageUC)
|
||||||
|
m_ActiveMachinePage = MachinePages.WaterJet
|
||||||
|
Case MachinePages.MachiningDb
|
||||||
|
' Verifica ed eventuale salvataggio lavorazione corrente
|
||||||
|
If Not m_MachiningDbPageUC.SaveCurrMachining() Then
|
||||||
|
WaterJetBtn.IsChecked = False
|
||||||
|
MachiningDBBtn.IsChecked = True
|
||||||
|
Return
|
||||||
|
End If
|
||||||
|
' salvo il DB lavorazioni
|
||||||
|
EgtSetCurrentContext(m_MainWindow.m_CurrentProjectPageUC.CurrentProjectScene.GetCtx())
|
||||||
|
EgtMdbSave()
|
||||||
|
' passo alla pagina WaterJet
|
||||||
|
WaterJetBtn.IsChecked = True
|
||||||
|
MachiningDBBtn.IsChecked = False
|
||||||
|
MachinePageGrid.Children.Remove(m_MachiningDbPageUC)
|
||||||
|
MachinePageGrid.Children.Add(m_WaterJetPageUC)
|
||||||
|
m_ActiveMachinePage = MachinePages.WaterJet
|
||||||
|
Case MachinePages.Polishings
|
||||||
|
' Verifica ed eventuale salvataggio Lucidatura corrente
|
||||||
|
If Not m_PolishingsPageUC.SaveKit() Then
|
||||||
|
WaterJetBtn.IsChecked = False
|
||||||
|
PolishingsBtn.IsChecked = True
|
||||||
|
Return
|
||||||
|
End If
|
||||||
|
' passo alla pagina WaterJet
|
||||||
|
WaterJetBtn.IsChecked = True
|
||||||
|
PolishingsBtn.IsChecked = False
|
||||||
|
MachinePageGrid.Children.Remove(m_PolishingsPageUC)
|
||||||
|
MachinePageGrid.Children.Add(m_WaterJetPageUC)
|
||||||
|
m_ActiveMachinePage = MachinePages.WaterJet
|
||||||
|
Case MachinePages.WaterJet
|
||||||
|
WaterJetBtn.IsChecked = True
|
||||||
|
Case MachinePages.MachineCN
|
||||||
|
WaterJetBtn.IsChecked = True
|
||||||
|
TestingPageBtn.IsChecked = False
|
||||||
|
MachinePageGrid.Children.Remove(m_MachineCNPageUC)
|
||||||
|
MachinePageGrid.Children.Add(m_WaterJetPageUC)
|
||||||
|
m_ActiveMachinePage = MachinePages.WaterJet
|
||||||
|
Case MachinePages.Statistics
|
||||||
|
WaterJetBtn.IsChecked = True
|
||||||
|
StatisticsBtn.IsChecked = False
|
||||||
|
MachinePageGrid.Children.Remove(m_StatisticsPageUC)
|
||||||
|
MachinePageGrid.Children.Add(m_WaterJetPageUC)
|
||||||
|
m_ActiveMachinePage = MachinePages.WaterJet
|
||||||
|
End Select
|
||||||
|
End Sub
|
||||||
|
|
||||||
Private Sub TestingPageBtn_Checked(sender As Object, e As RoutedEventArgs) Handles TestingPageBtn.Checked
|
Private Sub TestingPageBtn_Checked(sender As Object, e As RoutedEventArgs) Handles TestingPageBtn.Checked
|
||||||
Select Case m_ActiveMachinePage
|
Select Case m_ActiveMachinePage
|
||||||
Case MachinePages.Alarms
|
Case MachinePages.Alarms
|
||||||
@@ -367,6 +511,22 @@ Public Class MachinePageUC
|
|||||||
MachinePageGrid.Children.Remove(m_PolishingsPageUC)
|
MachinePageGrid.Children.Remove(m_PolishingsPageUC)
|
||||||
MachinePageGrid.Children.Add(m_MachineCNPageUC)
|
MachinePageGrid.Children.Add(m_MachineCNPageUC)
|
||||||
m_ActiveMachinePage = MachinePages.MachineCN
|
m_ActiveMachinePage = MachinePages.MachineCN
|
||||||
|
Case MachinePages.WaterJet
|
||||||
|
' Verifica ed eventuale salvataggio Db Waterjet
|
||||||
|
Dim nPressedBtn As Integer = DirectCast(m_WaterJetPageUC.DataContext, EgtWPFLib5.WaterjetDbWindowVM).CloseWaterjetDb_OmagCut(m_MainWindow)
|
||||||
|
If nPressedBtn = EgtWPFLib5.WaterjetDbWindowVM.SaveWndBtnEnum.CANCEL Then
|
||||||
|
TestingPageBtn.IsChecked = False
|
||||||
|
WaterJetBtn.IsChecked = True
|
||||||
|
Return
|
||||||
|
ElseIf nPressedBtn = EgtWPFLib5.WaterjetDbWindowVM.SaveWndBtnEnum.NO Then
|
||||||
|
m_WaterJetPageUC.WaterJetPage_Reinitialize()
|
||||||
|
End If
|
||||||
|
' passo alla pagina Dati Macchina
|
||||||
|
TestingPageBtn.IsChecked = True
|
||||||
|
WaterJetBtn.IsChecked = False
|
||||||
|
MachinePageGrid.Children.Remove(m_WaterJetPageUC)
|
||||||
|
MachinePageGrid.Children.Add(m_MachineCNPageUC)
|
||||||
|
m_ActiveMachinePage = MachinePages.MachineCN
|
||||||
Case MachinePages.MachineCN
|
Case MachinePages.MachineCN
|
||||||
TestingPageBtn.IsChecked = True
|
TestingPageBtn.IsChecked = True
|
||||||
Case MachinePages.Statistics
|
Case MachinePages.Statistics
|
||||||
@@ -431,6 +591,22 @@ Public Class MachinePageUC
|
|||||||
MachinePageGrid.Children.Remove(m_PolishingsPageUC)
|
MachinePageGrid.Children.Remove(m_PolishingsPageUC)
|
||||||
MachinePageGrid.Children.Add(m_StatisticsPageUC)
|
MachinePageGrid.Children.Add(m_StatisticsPageUC)
|
||||||
m_ActiveMachinePage = MachinePages.Statistics
|
m_ActiveMachinePage = MachinePages.Statistics
|
||||||
|
Case MachinePages.WaterJet
|
||||||
|
' Verifica ed eventuale salvataggio Db Waterjet
|
||||||
|
Dim nPressedBtn As Integer = DirectCast(m_WaterJetPageUC.DataContext, EgtWPFLib5.WaterjetDbWindowVM).CloseWaterjetDb_OmagCut(m_MainWindow)
|
||||||
|
If nPressedBtn = EgtWPFLib5.WaterjetDbWindowVM.SaveWndBtnEnum.CANCEL Then
|
||||||
|
StatisticsBtn.IsChecked = False
|
||||||
|
WaterJetBtn.IsChecked = True
|
||||||
|
Return
|
||||||
|
ElseIf nPressedBtn = EgtWPFLib5.WaterjetDbWindowVM.SaveWndBtnEnum.NO Then
|
||||||
|
m_WaterJetPageUC.WaterJetPage_Reinitialize()
|
||||||
|
End If
|
||||||
|
' passo alla pagina Dati Macchina
|
||||||
|
TestingPageBtn.IsChecked = True
|
||||||
|
WaterJetBtn.IsChecked = False
|
||||||
|
MachinePageGrid.Children.Remove(m_WaterJetPageUC)
|
||||||
|
MachinePageGrid.Children.Add(m_StatisticsPageUC)
|
||||||
|
m_ActiveMachinePage = MachinePages.Statistics
|
||||||
Case MachinePages.MachineCN
|
Case MachinePages.MachineCN
|
||||||
StatisticsBtn.IsChecked = True
|
StatisticsBtn.IsChecked = True
|
||||||
TestingPageBtn.IsChecked = False
|
TestingPageBtn.IsChecked = False
|
||||||
@@ -467,6 +643,19 @@ Public Class MachinePageUC
|
|||||||
MachinePageGrid.Children.Remove(m_PolishingsPageUC)
|
MachinePageGrid.Children.Remove(m_PolishingsPageUC)
|
||||||
MachinePageGrid.Children.Add(m_AlarmsPageUC)
|
MachinePageGrid.Children.Add(m_AlarmsPageUC)
|
||||||
m_ActiveMachinePage = MachinePages.Alarms
|
m_ActiveMachinePage = MachinePages.Alarms
|
||||||
|
Case MachinePages.WaterJet
|
||||||
|
' Verifica ed eventuale salvataggio Lucidatura corrente
|
||||||
|
'If Not m_PolishingsPageUC.SaveKit() Then
|
||||||
|
' AlarmsBtn.IsChecked = False
|
||||||
|
' PolishingsBtn.IsChecked = True
|
||||||
|
' Return
|
||||||
|
'End If
|
||||||
|
' passo alla pagina Dati Macchina
|
||||||
|
AlarmsBtn.IsChecked = True
|
||||||
|
WaterJetBtn.IsChecked = False
|
||||||
|
MachinePageGrid.Children.Remove(m_WaterJetPageUC)
|
||||||
|
MachinePageGrid.Children.Add(m_AlarmsPageUC)
|
||||||
|
m_ActiveMachinePage = MachinePages.Alarms
|
||||||
Case MachinePages.MachineCN
|
Case MachinePages.MachineCN
|
||||||
AlarmsBtn.IsChecked = True
|
AlarmsBtn.IsChecked = True
|
||||||
TestingPageBtn.IsChecked = False
|
TestingPageBtn.IsChecked = False
|
||||||
|
|||||||
@@ -705,7 +705,11 @@ Public Class MachiningDbPageUC
|
|||||||
' Lista materiali
|
' Lista materiali
|
||||||
m_MaterialsList.Clear()
|
m_MaterialsList.Clear()
|
||||||
For Each Material As Material In m_MainWindow.m_CurrentMachine.Materials
|
For Each Material As Material In m_MainWindow.m_CurrentMachine.Materials
|
||||||
m_MaterialsList.Add(New MachiningMaterial(Material.nId, Material.sName))
|
If m_MainWindow.m_CurrentMachine.bWaterJet Then
|
||||||
|
m_MaterialsList.Add(New MachiningMaterial(Material.nId, Material.sName, Material.SubId))
|
||||||
|
Else
|
||||||
|
m_MaterialsList.Add(New MachiningMaterial(Material.nId, Material.sName))
|
||||||
|
End If
|
||||||
Next
|
Next
|
||||||
EgtMdbGetCurrMachiningParam(MCH_MP.SYSNOTES, ToolString)
|
EgtMdbGetCurrMachiningParam(MCH_MP.SYSNOTES, ToolString)
|
||||||
If ToolString <> String.Empty Then
|
If ToolString <> String.Empty Then
|
||||||
@@ -713,14 +717,30 @@ Public Class MachiningDbPageUC
|
|||||||
Dim Index As Integer = 0
|
Dim Index As Integer = 0
|
||||||
For Each Material As MachiningMaterial In m_MaterialsList
|
For Each Material As MachiningMaterial In m_MaterialsList
|
||||||
Dim Param() As String = sItems(Index).Split(",".ToCharArray)
|
Dim Param() As String = sItems(Index).Split(",".ToCharArray)
|
||||||
|
Dim SubParam() As String = Param(0).Split(".".ToCharArray)
|
||||||
Dim nParId As Integer = 0
|
Dim nParId As Integer = 0
|
||||||
If StringToInt(Param(0), nParId) AndAlso nParId = Material.nId Then
|
Dim nSubParId As Integer = 0
|
||||||
StringToDouble(Param(1), Material.dMinThickness)
|
If m_MainWindow.m_CurrentMachine.bWaterJet Then
|
||||||
StringToDouble(Param(2), Material.dMaxThickness)
|
If StringToInt(SubParam(0), nParId) AndAlso nParId = Material.nId AndAlso SubParam.Count > 1 AndAlso
|
||||||
Material.VerifyIfActive()
|
StringToInt(SubParam(1), nSubParId) AndAlso nSubParId = Material.nSubId Then
|
||||||
Index += 1
|
|
||||||
|
StringToDouble(Param(1), Material.dMinThickness)
|
||||||
|
StringToDouble(Param(2), Material.dMaxThickness)
|
||||||
|
Material.VerifyIfActive()
|
||||||
|
Index += 1
|
||||||
|
Else
|
||||||
|
Material.VerifyIfActive()
|
||||||
|
End If
|
||||||
Else
|
Else
|
||||||
Material.VerifyIfActive()
|
If StringToInt(Param(0), nParId) AndAlso nParId = Material.nId Then
|
||||||
|
|
||||||
|
StringToDouble(Param(1), Material.dMinThickness)
|
||||||
|
StringToDouble(Param(2), Material.dMaxThickness)
|
||||||
|
Material.VerifyIfActive()
|
||||||
|
Index += 1
|
||||||
|
Else
|
||||||
|
Material.VerifyIfActive()
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
End If
|
End If
|
||||||
@@ -874,8 +894,14 @@ Public Class MachiningDbPageUC
|
|||||||
' Scrivo stringa materiali da lista
|
' Scrivo stringa materiali da lista
|
||||||
Dim sMaterialString As String = String.Empty
|
Dim sMaterialString As String = String.Empty
|
||||||
For Each Material As MachiningMaterial In m_MaterialsList
|
For Each Material As MachiningMaterial In m_MaterialsList
|
||||||
If Material.bIsActive Then
|
If m_MainWindow.m_CurrentMachine.bWaterJet Then
|
||||||
sMaterialString += Material.nId.ToString & "," & DoubleToString(Material.dMinThickness, 0) & "," & DoubleToString(Material.dMaxThickness, 0) & ";"
|
If Material.bIsActive Then
|
||||||
|
sMaterialString += Material.nId.ToString & "." & Material.nSubId.ToString & "," & DoubleToString(Material.dMinThickness, 0) & "," & DoubleToString(Material.dMaxThickness, 0) & ";"
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
If Material.bIsActive Then
|
||||||
|
sMaterialString += Material.nId.ToString & "," & DoubleToString(Material.dMinThickness, 0) & "," & DoubleToString(Material.dMaxThickness, 0) & ";"
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
EgtMdbSetCurrMachiningParam(MCH_MP.SYSNOTES, sMaterialString)
|
EgtMdbSetCurrMachiningParam(MCH_MP.SYSNOTES, sMaterialString)
|
||||||
@@ -2258,6 +2284,16 @@ Public Class MachiningDbPageUC
|
|||||||
|
|
||||||
Private Sub MaxThicknessTxBx_EgtClosed(sender As Object, e As EventArgs) Handles MaxThicknessTxBx.EgtClosed
|
Private Sub MaxThicknessTxBx_EgtClosed(sender As Object, e As EventArgs) Handles MaxThicknessTxBx.EgtClosed
|
||||||
Dim SelectedMaterial As MachiningMaterial = MaterialsList.SelectedItem
|
Dim SelectedMaterial As MachiningMaterial = MaterialsList.SelectedItem
|
||||||
|
Dim dMaxThick As Double = 0
|
||||||
|
If m_MainWindow.m_CurrentMachine.bWaterJet Then
|
||||||
|
' solo per water jet controllo lo spessore massimo ammissibile
|
||||||
|
dMaxThick = m_MainWindow.m_CurrentMachine.GetMaxThicknessCurrMaterial(SelectedMaterial.Name)
|
||||||
|
Dim dVal As Double
|
||||||
|
StringToLen(MaxThicknessTxBx.Text, dVal)
|
||||||
|
If dVal > dMaxThick Then
|
||||||
|
MaxThicknessTxBx.Text = LenToString(dMaxThick, 3)
|
||||||
|
End If
|
||||||
|
End If
|
||||||
StringToLen(MaxThicknessTxBx.Text, SelectedMaterial.dMaxThickness)
|
StringToLen(MaxThicknessTxBx.Text, SelectedMaterial.dMaxThickness)
|
||||||
SelectedMaterial.VerifyIfActive()
|
SelectedMaterial.VerifyIfActive()
|
||||||
End Sub
|
End Sub
|
||||||
@@ -2405,6 +2441,7 @@ Class MachiningMaterial
|
|||||||
Implements INotifyPropertyChanged
|
Implements INotifyPropertyChanged
|
||||||
|
|
||||||
Private m_nId As Integer
|
Private m_nId As Integer
|
||||||
|
Private m_nSubId As Integer
|
||||||
Private m_sName As String
|
Private m_sName As String
|
||||||
Private m_dMinThickness As Double
|
Private m_dMinThickness As Double
|
||||||
Private m_dMaxThickness As Double
|
Private m_dMaxThickness As Double
|
||||||
@@ -2416,6 +2453,12 @@ Class MachiningMaterial
|
|||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property nSubId As Integer
|
||||||
|
Get
|
||||||
|
Return m_nSubId
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
Public ReadOnly Property Name As String
|
Public ReadOnly Property Name As String
|
||||||
Get
|
Get
|
||||||
Return m_sName
|
Return m_sName
|
||||||
@@ -2454,6 +2497,15 @@ Class MachiningMaterial
|
|||||||
m_bIsActive = False
|
m_bIsActive = False
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Sub New(nId As Integer, sName As String, nSubId As Integer)
|
||||||
|
m_nId = nId
|
||||||
|
m_nSubId = nSubId
|
||||||
|
m_sName = sName
|
||||||
|
m_dMinThickness = 0
|
||||||
|
m_dMaxThickness = 0
|
||||||
|
m_bIsActive = False
|
||||||
|
End Sub
|
||||||
|
|
||||||
Public Sub VerifyIfActive()
|
Public Sub VerifyIfActive()
|
||||||
Dim bIsActive As Boolean = ( m_dMaxThickness > m_dMinThickness + EPS_SMALL)
|
Dim bIsActive As Boolean = ( m_dMaxThickness > m_dMinThickness + EPS_SMALL)
|
||||||
If bIsActive <> m_bIsActive Then
|
If bIsActive <> m_bIsActive Then
|
||||||
|
|||||||
@@ -56,8 +56,8 @@ Public Class ToolsDbPageUC
|
|||||||
NewBtn.Content = EgtMsg(MSG_MACHINEPAGEUC + 15)
|
NewBtn.Content = EgtMsg(MSG_MACHINEPAGEUC + 15)
|
||||||
SaveBtn.Content = EgtMsg(MSG_MACHINEPAGEUC + 17)
|
SaveBtn.Content = EgtMsg(MSG_MACHINEPAGEUC + 17)
|
||||||
RemoveBtn.Content = EgtMsg(MSG_MACHINEPAGEUC + 18)
|
RemoveBtn.Content = EgtMsg(MSG_MACHINEPAGEUC + 18)
|
||||||
ExportBtn.Content = "Export"
|
ExportBtn.Content = EgtMsg(91126)
|
||||||
ImportBtn.Content = "Import"
|
ImportBtn.Content = EgtMsg(91127)
|
||||||
|
|
||||||
NameTxBl.Text = EgtMsg(MSG_TOOLSDBPAGEUC + 1)
|
NameTxBl.Text = EgtMsg(MSG_TOOLSDBPAGEUC + 1)
|
||||||
TCPosTxBl.Text = EgtMsg(MSG_TOOLSDBPAGEUC + 2)
|
TCPosTxBl.Text = EgtMsg(MSG_TOOLSDBPAGEUC + 2)
|
||||||
|
|||||||
@@ -0,0 +1,263 @@
|
|||||||
|
<UserControl x:Class="WaterJetPageUC"
|
||||||
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
|
||||||
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
|
xmlns:self="clr-namespace:OmagCUT.TreeViewItem"
|
||||||
|
mc:Ignorable="d"
|
||||||
|
d:DesignHeight="768" d:DesignWidth="1280" Initialized="WaterJetPage_Initialized">
|
||||||
|
|
||||||
|
<!-- Definizione della PolishingsPage -->
|
||||||
|
<Border Style="{DynamicResource OmagCut_PageBorder}">
|
||||||
|
|
||||||
|
<Grid Name="WaterJetPageGrid" >
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="3*"/>
|
||||||
|
<ColumnDefinition Width="8*"/>
|
||||||
|
<ColumnDefinition Width="4*"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="8*"/>
|
||||||
|
<RowDefinition Height="1*"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
|
<!--Lista dei materiali-->
|
||||||
|
<GroupBox Name="MaterialGpBx" Style="{DynamicResource OmagCut_GroupBox}" Grid.Column="0"
|
||||||
|
Header="{Binding Material_Msg}"
|
||||||
|
Grid.Row="0" BorderThickness="0">
|
||||||
|
|
||||||
|
<Grid>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="7*"/>
|
||||||
|
<RowDefinition Height="1*"/>
|
||||||
|
<RowDefinition Height="1*"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
|
<!--Lista dei materiali-->
|
||||||
|
<ListBox Name="MaterialsLstBx"
|
||||||
|
ItemsSource="{Binding MaterialList}" SelectedItem="{Binding SelMaterial}"
|
||||||
|
Grid.RowSpan="2">
|
||||||
|
<ListBox.ItemTemplate>
|
||||||
|
<DataTemplate>
|
||||||
|
<TextBlock Text="{Binding Name}" Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||||
|
</DataTemplate>
|
||||||
|
</ListBox.ItemTemplate>
|
||||||
|
</ListBox>
|
||||||
|
<!--Campo visualizzato solo per aggiungere un nuovo materiale-->
|
||||||
|
<EgtWPFLib:EgtTextBox Name="NewMaterialNameTxBx" Grid.Row="1"
|
||||||
|
Width="220"
|
||||||
|
Text="{Binding sNewMaterial}"
|
||||||
|
Visibility="{Binding NewMaterial_Visibility}"
|
||||||
|
Style="{DynamicResource OmagCut_KeyboardTextBox}"
|
||||||
|
KeyboardPosition="Top"/>
|
||||||
|
<!--Pulsanti per aggiungere/rimuovere/salvare la lista-->
|
||||||
|
<UniformGrid Grid.Row="2" Columns="3">
|
||||||
|
<Button Name="NewMaterialBtn" Grid.Column="0"
|
||||||
|
Content="{Binding New_Msg}"
|
||||||
|
Command="{Binding NewMaterialCommand}"
|
||||||
|
Style="{DynamicResource OmagCut_WjDbRightGrayGradientYellowTextButton}"/>
|
||||||
|
<Button Name="DeleteMaterialBtn" Grid.Column="1"
|
||||||
|
Content="{Binding Delete_Msg}"
|
||||||
|
Command="{Binding DeleteMaterialCommand}"
|
||||||
|
Style="{DynamicResource OmagCut_WjDbRightGrayGradientYellowTextButton}"/>
|
||||||
|
<Button Name="ModifyMaterialBtn" Grid.Column="1"
|
||||||
|
Content="{Binding Modify_Msg}"
|
||||||
|
Command="{Binding ModifyMaterialCommand}"
|
||||||
|
Style="{DynamicResource OmagCut_WjDbRightGrayGradientYellowTextButton}"/>
|
||||||
|
</UniformGrid>
|
||||||
|
|
||||||
|
</Grid>
|
||||||
|
|
||||||
|
</GroupBox>
|
||||||
|
|
||||||
|
<!--Raggruppo all'interno della stessa cornice le sottocatogorie e i parametri-->
|
||||||
|
<Border Style="{DynamicResource OmagCut_Border}"
|
||||||
|
Grid.Column="1" Grid.Row="0"
|
||||||
|
Grid.ColumnSpan="2" Grid.RowSpan="1">
|
||||||
|
|
||||||
|
<Grid Name="SubMaterialGrd" Grid.Column="1">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="2*"/>
|
||||||
|
<ColumnDefinition Width="2*"/>
|
||||||
|
<ColumnDefinition Width="2*"/>
|
||||||
|
<ColumnDefinition Width="2*"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="1*"/>
|
||||||
|
<RowDefinition Height="1*"/>
|
||||||
|
<RowDefinition Height="1*"/>
|
||||||
|
<RowDefinition Height="1*"/>
|
||||||
|
<RowDefinition Height="1*"/>
|
||||||
|
<RowDefinition Height="1*"/>
|
||||||
|
<RowDefinition Height="1*"/>
|
||||||
|
<RowDefinition Height="1*"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
|
<!--Sottocategoria dei materiali associata alla lista precedente-->
|
||||||
|
<GroupBox Name="SubMaterialGpBx" Style="{DynamicResource OmagCut_GroupBox}"
|
||||||
|
Header="{Binding SubMaterial_Msg}"
|
||||||
|
Grid.Column="0" Grid.Row="0"
|
||||||
|
Grid.ColumnSpan="1" Grid.RowSpan="8" BorderThickness="0">
|
||||||
|
|
||||||
|
<Grid Grid.Column="1">
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="7*"/>
|
||||||
|
<RowDefinition Height="1*"/>
|
||||||
|
<RowDefinition Height="1*"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
|
<!--Lista dei materiali-->
|
||||||
|
<ListBox Name="SubMaterialsLstBx" ItemsSource="{Binding Path=SelectedItem.SubMaterialList, ElementName=MaterialsLstBx}"
|
||||||
|
SelectedItem="{Binding Path=SelectedItem.SelSubMaterial, ElementName=MaterialsLstBx}"
|
||||||
|
Grid.RowSpan="2">
|
||||||
|
<ListBox.ItemTemplate>
|
||||||
|
<DataTemplate>
|
||||||
|
<TextBlock Text="{Binding Name}" Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||||
|
</DataTemplate>
|
||||||
|
</ListBox.ItemTemplate>
|
||||||
|
</ListBox>
|
||||||
|
|
||||||
|
<!--Campo visualizzato solo per aggiungere un nuovo materiale-->
|
||||||
|
<EgtWPFLib:EgtTextBox Name="NewSubMaterialNameTxBx" Grid.Row="1"
|
||||||
|
Width="220"
|
||||||
|
Text="{Binding sNewSubMaterial}"
|
||||||
|
Visibility="{Binding NewSubMaterial_Visibility}"
|
||||||
|
Style="{DynamicResource OmagCut_KeyboardTextBox}"
|
||||||
|
KeyboardPosition="Top"/>
|
||||||
|
|
||||||
|
<!--Pulsanti per aggiungere/rimuovere/salvare la lista-->
|
||||||
|
<UniformGrid Grid.Row="2" Columns="3">
|
||||||
|
<Button Name="NewSubMaterialBtn" Grid.Column="0"
|
||||||
|
Content="{Binding New_Msg}"
|
||||||
|
Command="{Binding NewSubMaterialCommand}"
|
||||||
|
Style="{DynamicResource OmagCut_WjDbRightGrayGradientYellowTextButton}"/>
|
||||||
|
<Button Name="RemoveSubMaterialBtn" Grid.Column="1"
|
||||||
|
Content="{Binding Delete_Msg}"
|
||||||
|
Command="{Binding DeleteSubMaterialCommand}"
|
||||||
|
Style="{DynamicResource OmagCut_WjDbRightGrayGradientYellowTextButton}"/>
|
||||||
|
<Button Name="ModifySubMaterialBtn" Grid.Column="1"
|
||||||
|
Content="{Binding Modify_Msg}"
|
||||||
|
Command="{Binding ModifySubMaterialCommand}"
|
||||||
|
Style="{DynamicResource OmagCut_WjDbRightGrayGradientYellowTextButton}"/>
|
||||||
|
</UniformGrid>
|
||||||
|
|
||||||
|
</Grid>
|
||||||
|
|
||||||
|
</GroupBox>
|
||||||
|
|
||||||
|
<!--Lista dei parametri associata alla sottovcategoria dei materiali-->
|
||||||
|
<GroupBox Name="ParamsGpBx"
|
||||||
|
Grid.Column="1" Grid.Row="0" Margin="0,0,0,3"
|
||||||
|
Grid.ColumnSpan="3" Grid.RowSpan="8" BorderThickness="0">
|
||||||
|
|
||||||
|
<!--Titolazione delle colonne della tabella-->
|
||||||
|
<GroupBox.Header >
|
||||||
|
<Grid Width="700">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
|
<TextBlock Text="{Binding Thickness_Msg}" Grid.Column="0" HorizontalAlignment="Center"
|
||||||
|
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"
|
||||||
|
FontSize="{DynamicResource FontSize_GroupBoxHeader}"/>
|
||||||
|
<TextBlock Text="{Binding Q1_Msg}" Grid.Column="1" HorizontalAlignment="Center"
|
||||||
|
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"
|
||||||
|
FontSize="{DynamicResource FontSize_GroupBoxHeader}"/>
|
||||||
|
<TextBlock Text="{Binding Q2_Msg}" Grid.Column="2" HorizontalAlignment="Center"
|
||||||
|
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"
|
||||||
|
FontSize="{DynamicResource FontSize_GroupBoxHeader}"/>
|
||||||
|
<TextBlock Text="{Binding Q3_Msg}" Grid.Column="3" HorizontalAlignment="Center"
|
||||||
|
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"
|
||||||
|
FontSize="{DynamicResource FontSize_GroupBoxHeader}"/>
|
||||||
|
<TextBlock Text="{Binding Q4_Msg}" Grid.Column="4" HorizontalAlignment="Center"
|
||||||
|
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"
|
||||||
|
FontSize="{DynamicResource FontSize_GroupBoxHeader}"/>
|
||||||
|
<TextBlock Text="{Binding Q5_Msg}" Grid.Column="5" HorizontalAlignment="Center"
|
||||||
|
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"
|
||||||
|
FontSize="{DynamicResource FontSize_GroupBoxHeader}"/>
|
||||||
|
<TextBlock Text="{Binding QExtra_Msg}" Grid.Column="6" HorizontalAlignment="Center"
|
||||||
|
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"
|
||||||
|
FontSize="{DynamicResource FontSize_GroupBoxHeader}"/>
|
||||||
|
</Grid>
|
||||||
|
|
||||||
|
</GroupBox.Header>
|
||||||
|
|
||||||
|
<!--Definizione della Grid dei parametri delle lavorazioni-->
|
||||||
|
<Grid Grid.Column="2">
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="7*"/>
|
||||||
|
<RowDefinition Height="1*"/>
|
||||||
|
<RowDefinition Height="1*"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
|
<ListBox Name="ParamLstBx"
|
||||||
|
ItemsSource="{Binding Path=SelectedItem.ParamList , ElementName=SubMaterialsLstBx}"
|
||||||
|
SelectedItem="{Binding Path=SelectedItem.SelWjParam , ElementName=SubMaterialsLstBx}"
|
||||||
|
Margin="0,0,0,0"
|
||||||
|
Grid.RowSpan="2">
|
||||||
|
<ListBox.ItemTemplate>
|
||||||
|
<DataTemplate>
|
||||||
|
<Grid Width="700">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
|
<EgtWPFLib:EgtTextBox Text="{Binding Thickness}" Grid.Column="0"
|
||||||
|
Style="{DynamicResource OmagCut_CalculatorParamWjTextBox}" />
|
||||||
|
<EgtWPFLib:EgtTextBox Text="{Binding Q1}" Grid.Column="1"
|
||||||
|
Style="{DynamicResource OmagCut_CalculatorParamWjTextBox}" />
|
||||||
|
<EgtWPFLib:EgtTextBox Text="{Binding Q2}" Grid.Column="2"
|
||||||
|
Style="{DynamicResource OmagCut_CalculatorParamWjTextBox}" />
|
||||||
|
<EgtWPFLib:EgtTextBox Text="{Binding Q3}" Grid.Column="3"
|
||||||
|
Style="{DynamicResource OmagCut_CalculatorParamWjTextBox}" />
|
||||||
|
<EgtWPFLib:EgtTextBox Text="{Binding Q4}" Grid.Column="4"
|
||||||
|
Style="{DynamicResource OmagCut_CalculatorParamWjTextBox}" />
|
||||||
|
<EgtWPFLib:EgtTextBox Text="{Binding Q5}" Grid.Column="5"
|
||||||
|
Style="{DynamicResource OmagCut_CalculatorParamWjTextBox}" />
|
||||||
|
<EgtWPFLib:EgtTextBox Text="{Binding QExtra}" Grid.Column="6"
|
||||||
|
Style="{DynamicResource OmagCut_CalculatorParamWjTextBox}" />
|
||||||
|
|
||||||
|
</Grid>
|
||||||
|
</DataTemplate>
|
||||||
|
</ListBox.ItemTemplate>
|
||||||
|
</ListBox>
|
||||||
|
|
||||||
|
<UniformGrid Grid.Row="2" Columns="9" Grid.ColumnSpan="3">
|
||||||
|
<Button Name="NewParamBtn" Grid.Column="0"
|
||||||
|
Command="{Binding NewWjParamCommand}"
|
||||||
|
Content="{Binding New_Msg}"
|
||||||
|
Style="{DynamicResource OmagCut_WjDbRightGrayGradientYellowTextButton}"/>
|
||||||
|
<Button Name="RemoveParamBtn" Grid.Column="1"
|
||||||
|
Command="{Binding DeleteWjParamCommand}"
|
||||||
|
Content="{Binding Delete_Msg}"
|
||||||
|
Style="{DynamicResource OmagCut_WjDbRightGrayGradientYellowTextButton}"/>
|
||||||
|
</UniformGrid>
|
||||||
|
|
||||||
|
</Grid>
|
||||||
|
|
||||||
|
</GroupBox>
|
||||||
|
|
||||||
|
</Grid>
|
||||||
|
</Border>
|
||||||
|
<Button Name="SaveKitBtn" Grid.Row="2" Grid.Column="2"
|
||||||
|
Command="{Binding SaveCommand}"
|
||||||
|
Content="{Binding Save_Msg}"
|
||||||
|
Style="{DynamicResource OmagCut_RightGrayGradientYellowTextButton}"/>
|
||||||
|
</Grid>
|
||||||
|
|
||||||
|
</Border>
|
||||||
|
|
||||||
|
</UserControl>
|
||||||
@@ -0,0 +1,55 @@
|
|||||||
|
Imports System.Collections.ObjectModel
|
||||||
|
Imports System.ComponentModel
|
||||||
|
Imports EgtUILib
|
||||||
|
Imports EgtWPFLib
|
||||||
|
Imports EgtWPFLib5
|
||||||
|
|
||||||
|
Public Class WaterJetPageUC
|
||||||
|
|
||||||
|
' Riferimento alla MainWindow
|
||||||
|
Private m_MainWindow As MainWindow = DirectCast(Application.Current.MainWindow, MainWindow)
|
||||||
|
Private m_refWaterjetDbWindowVM As EgtWPFLib5.WaterjetDbWindowVM
|
||||||
|
Private m_sOrigNewMaterial As String = String.Empty
|
||||||
|
Private m_sOrigNewSubMaterial As String = String.Empty
|
||||||
|
|
||||||
|
Private Sub WaterJetPage_Initialized(sender As Object, e As EventArgs)
|
||||||
|
m_refWaterjetDbWindowVM = New EgtWPFLib5.WaterjetDbWindowVM(m_MainWindow.m_CurrentMachine.sMachDir)
|
||||||
|
Me.DataContext = m_refWaterjetDbWindowVM
|
||||||
|
EgtWPFLib.Utility.MainWindow = m_MainWindow
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Public Sub WaterJetPage_Reinitialize()
|
||||||
|
m_refWaterjetDbWindowVM = New EgtWPFLib5.WaterjetDbWindowVM(m_MainWindow.m_CurrentMachine.sMachDir)
|
||||||
|
Me.DataContext = m_refWaterjetDbWindowVM
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub NewMaterial_EgtOpening(sender As Object, e As EventArgs) Handles NewMaterialNameTxBx.EgtOpening
|
||||||
|
m_sOrigNewMaterial = NewMaterialNameTxBx.Text
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub NewSubMaterial_EgtOpening(sender As Object, e As EventArgs) Handles NewSubMaterialNameTxBx.EgtOpening
|
||||||
|
m_sOrigNewSubMaterial = NewSubMaterialNameTxBx.Text
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub NewMaterial_EgtClosed(sender As Object, e As EventArgs) Handles NewMaterialNameTxBx.EgtClosed
|
||||||
|
m_refWaterjetDbWindowVM.sNewMaterial = NewMaterialNameTxBx.Text
|
||||||
|
If String.IsNullOrEmpty(m_refWaterjetDbWindowVM.sNewMaterial) OrElse m_refWaterjetDbWindowVM.sNewMaterial = m_sOrigNewMaterial Then
|
||||||
|
m_refWaterjetDbWindowVM.NewMaterial_Visibility = Visibility.Collapsed
|
||||||
|
Else
|
||||||
|
m_refWaterjetDbWindowVM.Done("")
|
||||||
|
NewMaterialNameTxBx.Clear()
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub NewSubMaterial_EgtClosed(sender As Object, e As EventArgs) Handles NewSubMaterialNameTxBx.EgtClosed
|
||||||
|
m_refWaterjetDbWindowVM.sNewSubMaterial = NewSubMaterialNameTxBx.Text
|
||||||
|
If String.IsNullOrEmpty(m_refWaterjetDbWindowVM.sNewSubMaterial) OrElse m_refWaterjetDbWindowVM.sNewSubMaterial = m_sOrigNewSubMaterial Then
|
||||||
|
m_refWaterjetDbWindowVM.NewSubMaterial_Visibility = Visibility.Collapsed
|
||||||
|
Else
|
||||||
|
m_refWaterjetDbWindowVM.Done("")
|
||||||
|
NewSubMaterialNameTxBx.Clear()
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
End Class
|
||||||
|
|
||||||
@@ -0,0 +1,891 @@
|
|||||||
|
'Imports System.Collections.ObjectModel
|
||||||
|
'Imports System.ComponentModel
|
||||||
|
'Imports EgtUILib
|
||||||
|
'Imports EgtWPFLib
|
||||||
|
|
||||||
|
'Public Class WaterJetPageVM
|
||||||
|
' Private m_refWaterPageV As WaterJetPageUC
|
||||||
|
|
||||||
|
' ' lista dei materiali
|
||||||
|
' Private m_ListMaterial As New ObservableCollection(Of MaterialWJ)
|
||||||
|
' Public ReadOnly Property ListMaterial As ObservableCollection(Of MaterialWJ)
|
||||||
|
' Get
|
||||||
|
' Return m_ListMaterial
|
||||||
|
' End Get
|
||||||
|
' End Property
|
||||||
|
' ' materiale selezionato
|
||||||
|
' Private m_SelectedMaterial As MaterialWJ
|
||||||
|
' Public Property SelectedMaterial As MaterialWJ
|
||||||
|
' Get
|
||||||
|
' Return m_SelectedMaterial
|
||||||
|
' End Get
|
||||||
|
' Set(value As MaterialWJ)
|
||||||
|
' m_SelectedMaterial = value
|
||||||
|
' End Set
|
||||||
|
' End Property
|
||||||
|
' ' submateriale selezionato
|
||||||
|
' Private m_SelectedSubMaterial As SubMaterialWJ
|
||||||
|
' Public Property SelectedSubMaterial As SubMaterialWJ
|
||||||
|
' Get
|
||||||
|
' Return m_SelectedSubMaterial
|
||||||
|
' End Get
|
||||||
|
' Set(value As SubMaterialWJ)
|
||||||
|
' m_SelectedSubMaterial = value
|
||||||
|
' End Set
|
||||||
|
' End Property
|
||||||
|
' ' lista parametri selezionata
|
||||||
|
' Private m_SelectedParam As ParamWJ
|
||||||
|
' Public Property SelectedParam As ParamWJ
|
||||||
|
' Get
|
||||||
|
' Return m_SelectedParam
|
||||||
|
' End Get
|
||||||
|
' Set(value As ParamWJ)
|
||||||
|
' m_SelectedParam = value
|
||||||
|
' End Set
|
||||||
|
' End Property
|
||||||
|
|
||||||
|
' Private m_sNewMaterial As MaterialWJ
|
||||||
|
' Public Property sNewMaterial As String
|
||||||
|
' Get
|
||||||
|
' Return m_sNewMaterial.sMaterial
|
||||||
|
' End Get
|
||||||
|
' Set(value As String)
|
||||||
|
' m_sNewMaterial = New MaterialWJ(value)
|
||||||
|
' End Set
|
||||||
|
' End Property
|
||||||
|
|
||||||
|
' Private m_NewMaterialVisibility As Visibility = Visibility.Hidden
|
||||||
|
' Public Property NewMaterialVisibility As Visibility
|
||||||
|
' Get
|
||||||
|
' Return m_NewMaterialVisibility
|
||||||
|
' End Get
|
||||||
|
' Set(value As Visibility)
|
||||||
|
' m_NewMaterialVisibility = value
|
||||||
|
' End Set
|
||||||
|
' End Property
|
||||||
|
|
||||||
|
' Sub New(WaterJetPageV As WaterJetPageUC)
|
||||||
|
' m_refWaterPageV = WaterJetPageV
|
||||||
|
' ' Creo una lista di materiali come esempio
|
||||||
|
' ListMaterial.Add(New MaterialWJ("Marmo"))
|
||||||
|
' ListMaterial.Last.ListOfSubMaterial.Add(New SubMaterialWJ("Binaco"))
|
||||||
|
' ListMaterial.Last.ListOfSubMaterial.Last.ListOfParam.Add(New ParamWJ("10", "Bq1", "Bq2", "Bq3", "Bq4", "Bq5"))
|
||||||
|
' ListMaterial.Last.ListOfSubMaterial.Add(New SubMaterialWJ("Nero"))
|
||||||
|
' ListMaterial.Last.ListOfSubMaterial.Last.ListOfParam.Add(New ParamWJ("20", "Nq1", "Nq2", "Nq3", "Nq4", "Nq5"))
|
||||||
|
' ListMaterial.Add(New MaterialWJ("Granito"))
|
||||||
|
' ListMaterial.Last.ListOfSubMaterial.Add(New SubMaterialWJ("GR_Binaco"))
|
||||||
|
' ListMaterial.Last.ListOfSubMaterial.Last.ListOfParam.Add(New ParamWJ("15", "gBq1", "gBq2", "Bq3", "gBq4", "gBq5"))
|
||||||
|
' ListMaterial.Last.ListOfSubMaterial.Last.ListOfParam.Add(New ParamWJ("15.5", "g_Bq1", "g_Bq2", "g_Bq3", "g_Bq4", "g_Bq5"))
|
||||||
|
' ListMaterial.Last.ListOfSubMaterial.Last.ListOfParam.Add(New ParamWJ("15.8", "G_Bq1", "G_Bq2", "G_Bq3", "G_Bq4", "G_Bq5"))
|
||||||
|
' ListMaterial.Last.ListOfSubMaterial.Add(New SubMaterialWJ("GR_Nero"))
|
||||||
|
' ListMaterial.Last.ListOfSubMaterial.Last.ListOfParam.Add(New ParamWJ("18", "gNq1", "gNq2", "gNq3", "gNq4", "gNq5"))
|
||||||
|
|
||||||
|
' SelectedMaterial = m_ListMaterial(0)
|
||||||
|
' SelectedSubMaterial = m_SelectedMaterial.ListOfSubMaterial(0)
|
||||||
|
' SelectedParam = SelectedSubMaterial.ListOfParam(0)
|
||||||
|
' End Sub
|
||||||
|
|
||||||
|
' Private m_cmdOk As ICommand
|
||||||
|
' Public ReadOnly Property OkCommand() As ICommand
|
||||||
|
' Get
|
||||||
|
' If m_cmdOk Is Nothing Then
|
||||||
|
' m_cmdOk = New Command(AddressOf Ok)
|
||||||
|
' End If
|
||||||
|
' Return m_cmdOk
|
||||||
|
' End Get
|
||||||
|
' End Property
|
||||||
|
|
||||||
|
' Private Sub Ok()
|
||||||
|
' ' Mostro textbox per il nome
|
||||||
|
' m_refWaterPageV.KitNameTxBx.Text = String.Empty
|
||||||
|
' m_refWaterPageV.KitNameTxBx.Visibility = Windows.Visibility.Visible
|
||||||
|
' m_refWaterPageV.KitsLstBx.SetValue(Grid.RowSpanProperty, 1)
|
||||||
|
' MessageBox.Show("Prova di Binding", "Prova di Binding", MessageBoxButton.OK, MessageBoxImage.Asterisk, MessageBoxResult.OK)
|
||||||
|
' m_refWaterPageV.KitNameTxBx.Visibility = Windows.Visibility.Hidden
|
||||||
|
' m_refWaterPageV.KitsLstBx.SetValue(Grid.RowSpanProperty, 2)
|
||||||
|
' End Sub
|
||||||
|
|
||||||
|
'End Class
|
||||||
|
|
||||||
|
|
||||||
|
'Public Class MaterialWJ
|
||||||
|
|
||||||
|
' Private m_sMaterial As String = String.Empty
|
||||||
|
' Public ReadOnly Property sMaterial As String
|
||||||
|
' Get
|
||||||
|
' Return m_sMaterial
|
||||||
|
' End Get
|
||||||
|
' End Property
|
||||||
|
|
||||||
|
' Private m_ListOfSubMaterial As New ObservableCollection(Of SubMaterialWJ)
|
||||||
|
' Public Property ListOfSubMaterial As ObservableCollection(Of SubMaterialWJ)
|
||||||
|
' Get
|
||||||
|
' Return m_ListOfSubMaterial
|
||||||
|
' End Get
|
||||||
|
' Set(value As ObservableCollection(Of SubMaterialWJ))
|
||||||
|
' m_ListOfSubMaterial = value
|
||||||
|
' End Set
|
||||||
|
' End Property
|
||||||
|
|
||||||
|
' Sub New(sMat As String)
|
||||||
|
' m_sMaterial = sMat
|
||||||
|
' End Sub
|
||||||
|
|
||||||
|
'End Class
|
||||||
|
|
||||||
|
'Public Class SubMaterialWJ
|
||||||
|
|
||||||
|
' Dim m_sSubMaterial As String
|
||||||
|
' Public Property sSubMaterial As String
|
||||||
|
' Get
|
||||||
|
' Return m_sSubMaterial
|
||||||
|
' End Get
|
||||||
|
' Set(value As String)
|
||||||
|
' m_sSubMaterial = value
|
||||||
|
' End Set
|
||||||
|
' End Property
|
||||||
|
|
||||||
|
' Private m_ListOfParam As New ObservableCollection(Of ParamWJ)
|
||||||
|
' Public Property ListOfParam As ObservableCollection(Of ParamWJ)
|
||||||
|
' Get
|
||||||
|
' Return m_ListOfParam
|
||||||
|
' End Get
|
||||||
|
' Set(value As ObservableCollection(Of ParamWJ))
|
||||||
|
' m_ListOfParam = value
|
||||||
|
' End Set
|
||||||
|
' End Property
|
||||||
|
|
||||||
|
' Sub New(sName As String)
|
||||||
|
' m_sSubMaterial = sName
|
||||||
|
' End Sub
|
||||||
|
'End Class
|
||||||
|
|
||||||
|
'Public Class ParamWJ
|
||||||
|
|
||||||
|
' Private m_Thickness As String
|
||||||
|
' Private m_Q1 As String
|
||||||
|
' Private m_Q2 As String
|
||||||
|
' Private m_Q3 As String
|
||||||
|
' Private m_Q4 As String
|
||||||
|
' Private m_Q5 As String
|
||||||
|
|
||||||
|
' Public Property Q1 As String
|
||||||
|
' Get
|
||||||
|
' Return m_Q1
|
||||||
|
' End Get
|
||||||
|
' Set(value As String)
|
||||||
|
' m_Q1 = value
|
||||||
|
' End Set
|
||||||
|
' End Property
|
||||||
|
|
||||||
|
' Public Property Thickness As String
|
||||||
|
' Get
|
||||||
|
' Return m_Thickness
|
||||||
|
' End Get
|
||||||
|
' Set(value As String)
|
||||||
|
' m_Thickness = value
|
||||||
|
' End Set
|
||||||
|
' End Property
|
||||||
|
|
||||||
|
' Public Property Q2 As String
|
||||||
|
' Get
|
||||||
|
' Return m_Q2
|
||||||
|
' End Get
|
||||||
|
' Set(value As String)
|
||||||
|
' m_Q2 = value
|
||||||
|
' End Set
|
||||||
|
' End Property
|
||||||
|
|
||||||
|
' Public Property Q3 As String
|
||||||
|
' Get
|
||||||
|
' Return m_Q3
|
||||||
|
' End Get
|
||||||
|
' Set(value As String)
|
||||||
|
' m_Q3 = value
|
||||||
|
' End Set
|
||||||
|
' End Property
|
||||||
|
|
||||||
|
' Public Property Q4 As String
|
||||||
|
' Get
|
||||||
|
' Return m_Q4
|
||||||
|
' End Get
|
||||||
|
' Set(value As String)
|
||||||
|
' m_Q4 = value
|
||||||
|
' End Set
|
||||||
|
' End Property
|
||||||
|
|
||||||
|
' Public Property Q5 As String
|
||||||
|
' Get
|
||||||
|
' Return m_Q5
|
||||||
|
' End Get
|
||||||
|
' Set(value As String)
|
||||||
|
' m_Q5 = value
|
||||||
|
' End Set
|
||||||
|
' End Property
|
||||||
|
|
||||||
|
' Sub New(sT As String, sQ1 As String, sQ2 As String, sQ3 As String, sQ4 As String, sQ5 As String)
|
||||||
|
' m_Thickness = sT
|
||||||
|
' m_Q1 = sQ1
|
||||||
|
' m_Q2 = sQ2
|
||||||
|
' m_Q3 = sQ3
|
||||||
|
' m_Q4 = sQ4
|
||||||
|
' m_Q5 = sQ5
|
||||||
|
' End Sub
|
||||||
|
|
||||||
|
'End Class
|
||||||
|
|
||||||
|
Imports System.Collections.ObjectModel
|
||||||
|
Imports System.IO
|
||||||
|
Imports EgtUILib
|
||||||
|
Imports EgtWPFLib5
|
||||||
|
|
||||||
|
Public Class WaterjetDbWindowVM
|
||||||
|
Inherits VMBase
|
||||||
|
' Riferimento alla MainWindow
|
||||||
|
Private m_MainWindow As MainWindow = DirectCast(Application.Current.MainWindow, MainWindow)
|
||||||
|
Private m_refWaterPageV As WaterJetPageUC
|
||||||
|
|
||||||
|
#Region "FIELDS & PROPERTIES"
|
||||||
|
|
||||||
|
|
||||||
|
#Region "Materiali"
|
||||||
|
Private Property m_MaterialList As ObservableCollection(Of WjMaterial)
|
||||||
|
Public Property MaterialList As ObservableCollection(Of WjMaterial)
|
||||||
|
Get
|
||||||
|
Return m_MaterialList
|
||||||
|
End Get
|
||||||
|
Set(value As ObservableCollection(Of WjMaterial))
|
||||||
|
m_MaterialList = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private Property m_SelMaterial As WjMaterial
|
||||||
|
Public Property SelMaterial As WjMaterial
|
||||||
|
Get
|
||||||
|
Return m_SelMaterial
|
||||||
|
End Get
|
||||||
|
Set(value As WjMaterial)
|
||||||
|
m_SelMaterial = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private Property m_sNewMaterial As String
|
||||||
|
Public Property sNewMaterial As String
|
||||||
|
Get
|
||||||
|
Return m_sNewMaterial
|
||||||
|
End Get
|
||||||
|
Set(value As String)
|
||||||
|
m_sNewMaterial = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private Property m_NewMaterial_Visibility As Visibility = Visibility.Collapsed
|
||||||
|
Public Property NewMaterial_Visibility As Visibility
|
||||||
|
Get
|
||||||
|
Return m_NewMaterial_Visibility
|
||||||
|
End Get
|
||||||
|
Set(value As Visibility)
|
||||||
|
m_NewMaterial_Visibility = value
|
||||||
|
NotifyPropertyChanged(NameOf(NewMaterial_Visibility))
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
#End Region
|
||||||
|
|
||||||
|
#Region "SubMateriali"
|
||||||
|
Private Property m_SubMaterialList As New ObservableCollection(Of WjSubMaterial)
|
||||||
|
Public Property SubMaterialList As ObservableCollection(Of WjSubMaterial)
|
||||||
|
Get
|
||||||
|
Return m_SubMaterialList
|
||||||
|
End Get
|
||||||
|
Set(value As ObservableCollection(Of WjSubMaterial))
|
||||||
|
m_SubMaterialList = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
'Private Property m_SelSubMaterial As WjSubMaterial
|
||||||
|
'Public Property SelSubMaterial As WjSubMaterial
|
||||||
|
' Get
|
||||||
|
' Return m_SelSubMaterial
|
||||||
|
' End Get
|
||||||
|
' Set(value As WjSubMaterial)
|
||||||
|
' m_SelSubMaterial = value
|
||||||
|
' End Set
|
||||||
|
'End Property
|
||||||
|
|
||||||
|
Private Property m_sNewSubMaterial As String
|
||||||
|
Public Property sNewSubMaterial As String
|
||||||
|
Get
|
||||||
|
Return m_sNewSubMaterial
|
||||||
|
End Get
|
||||||
|
Set(value As String)
|
||||||
|
m_sNewSubMaterial = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private Property m_NewSubMaterial_Visibility As Visibility = Visibility.Collapsed
|
||||||
|
Public Property NewSubMaterial_Visibility As Visibility
|
||||||
|
Get
|
||||||
|
Return m_NewSubMaterial_Visibility
|
||||||
|
End Get
|
||||||
|
Set(value As Visibility)
|
||||||
|
m_NewSubMaterial_Visibility = value
|
||||||
|
NotifyPropertyChanged(NameOf(NewSubMaterial_Visibility))
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
#End Region
|
||||||
|
|
||||||
|
#Region "Parametri"
|
||||||
|
Private Property m_ParamList As ObservableCollection(Of WjParam)
|
||||||
|
Public Property ParamList As ObservableCollection(Of WjParam)
|
||||||
|
Get
|
||||||
|
Return m_ParamList
|
||||||
|
End Get
|
||||||
|
Set(value As ObservableCollection(Of WjParam))
|
||||||
|
m_ParamList = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
'Private Property m_SelParam As WjParam
|
||||||
|
'Public Property SelParam As WjParam
|
||||||
|
' Get
|
||||||
|
' Return m_SelParam
|
||||||
|
' End Get
|
||||||
|
' Set(value As WjParam)
|
||||||
|
' m_SelParam = value
|
||||||
|
' End Set
|
||||||
|
'End Property
|
||||||
|
|
||||||
|
Private m_HeadParamLstBx_Width As Double
|
||||||
|
Public ReadOnly Property HeadParamLstBx_Width As Double
|
||||||
|
Get
|
||||||
|
If m_HeadParamLstBx_Width < 10 Then
|
||||||
|
Return 700
|
||||||
|
End If
|
||||||
|
Return m_HeadParamLstBx_Width
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
#End Region
|
||||||
|
|
||||||
|
Const S_MATERIALS As String = "Materials"
|
||||||
|
|
||||||
|
' Definizione comandi
|
||||||
|
Private m_cmdNewMaterial As ICommand
|
||||||
|
Private m_cmdDeleteMaterial As ICommand
|
||||||
|
Private m_cmdNewSubMaterial As ICommand
|
||||||
|
Private m_cmdDeleteSubMaterial As ICommand
|
||||||
|
Private m_cmdNewWjParam As ICommand
|
||||||
|
Private m_cmdDeleteWjParam As ICommand
|
||||||
|
Private m_cmdSave As ICommand
|
||||||
|
Private m_cmdDone As ICommand
|
||||||
|
|
||||||
|
#End Region
|
||||||
|
|
||||||
|
#Region "MESSAGES"
|
||||||
|
|
||||||
|
Public ReadOnly Property Material_Msg As String
|
||||||
|
Get
|
||||||
|
Return "Materiale"
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property SubMaterial_Msg As String
|
||||||
|
Get
|
||||||
|
Return "SubMateriale"
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property Id_Msg As String
|
||||||
|
Get
|
||||||
|
Return "Id"
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property Thickness_Msg As String
|
||||||
|
Get
|
||||||
|
Return "Spessore"
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property Q1_Msg As String
|
||||||
|
Get
|
||||||
|
Return "Q1"
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property Q2_Msg As String
|
||||||
|
Get
|
||||||
|
Return "Q2"
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property Q3_Msg As String
|
||||||
|
Get
|
||||||
|
Return "Q3"
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property Q4_Msg As String
|
||||||
|
Get
|
||||||
|
Return "Q4"
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property Q5_Msg As String
|
||||||
|
Get
|
||||||
|
Return "Q5"
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property QExtra_Msg As String
|
||||||
|
Get
|
||||||
|
Return "QExtra"
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property New_Msg As String
|
||||||
|
Get
|
||||||
|
Return "Nuovo"
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property Delete_Msg As String
|
||||||
|
Get
|
||||||
|
Return "Elimina"
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property Save_Msg As String
|
||||||
|
Get
|
||||||
|
Return "Salva"
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property Modify_Msg As String
|
||||||
|
Get
|
||||||
|
Return "Modifica"
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
#End Region
|
||||||
|
|
||||||
|
#Region "CONSTRUCTOR"
|
||||||
|
|
||||||
|
Sub New(refContext As WaterJetPageUC)
|
||||||
|
' definisco il riferiento con la pagina xaml
|
||||||
|
m_refWaterPageV = refContext
|
||||||
|
' Leggo valori da file Data e li carico nelle proprietà
|
||||||
|
Dim sFilePath As String = m_MainWindow.m_CurrentMachine.sMachDir & "\" & MACHININGS_DIR & "\" & WATERJETDB_FILE
|
||||||
|
MaterialList = New ObservableCollection(Of WjMaterial)
|
||||||
|
|
||||||
|
If File.Exists(sFilePath) Then
|
||||||
|
Dim sMaterial As String = String.Empty
|
||||||
|
|
||||||
|
If EgtUILib.GetPrivateProfileString(S_MATERIALS, "1", "", sMaterial, sFilePath) > 0 Then
|
||||||
|
Dim sMaterials() As String = sMaterial.Split(","c)
|
||||||
|
Dim ind As Integer = 0
|
||||||
|
For ind = 0 To sMaterials.Length() - 1
|
||||||
|
|
||||||
|
'recupero i sottomateriali
|
||||||
|
Dim Index As Integer = 1
|
||||||
|
Dim sSubMat As String = String.Empty
|
||||||
|
Dim SubMatList As New ObservableCollection(Of WjSubMaterial)
|
||||||
|
While EgtUILib.GetPrivateProfileString(sMaterials(ind), Index.ToString(), "", sSubMat, sFilePath) > 0
|
||||||
|
|
||||||
|
|
||||||
|
' recupero la lista dei Q
|
||||||
|
Dim QInd As Integer = 1
|
||||||
|
Dim sParam As String = String.Empty
|
||||||
|
Dim QParamList As New ObservableCollection(Of WjParam)
|
||||||
|
While EgtUILib.GetPrivateProfileString(sMaterials(ind) & "." & sSubMat, QInd.ToString(), "", sParam, sFilePath) > 0
|
||||||
|
Dim sParams() As String = sParam.Split(","c)
|
||||||
|
If sParams.Length() >= 7 Then
|
||||||
|
Dim dThickness As Double
|
||||||
|
Dim dQ1 As Double
|
||||||
|
Dim dQ2 As Double
|
||||||
|
Dim dQ3 As Double
|
||||||
|
Dim dQ4 As Double
|
||||||
|
Dim dQ5 As Double
|
||||||
|
Dim dQExtra As Double
|
||||||
|
StringToDouble(sParams(0), dThickness)
|
||||||
|
StringToDouble(sParams(1), dQ1)
|
||||||
|
StringToDouble(sParams(2), dQ2)
|
||||||
|
StringToDouble(sParams(3), dQ3)
|
||||||
|
StringToDouble(sParams(4), dQ4)
|
||||||
|
StringToDouble(sParams(5), dQ5)
|
||||||
|
StringToDouble(sParams(6), dQExtra)
|
||||||
|
QParamList.Add(New WjParam(QInd, dThickness, dQ1, dQ2, dQ3, dQ4, dQ5, dQExtra, m_refWaterPageV))
|
||||||
|
End If
|
||||||
|
QInd += 1
|
||||||
|
End While
|
||||||
|
|
||||||
|
SubMatList.Add(New WjSubMaterial(sSubMat, QParamList))
|
||||||
|
Index += 1
|
||||||
|
End While
|
||||||
|
|
||||||
|
MaterialList.Add(New WjMaterial(sMaterials(ind), SubMatList))
|
||||||
|
Next
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Public Sub RefreshDImensionPage()
|
||||||
|
m_HeadParamLstBx_Width = m_refWaterPageV.ParamsGpBx.ActualWidth - 20
|
||||||
|
NotifyPropertyChanged(NameOf(HeadParamLstBx_Width))
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region ' Constructor
|
||||||
|
|
||||||
|
#Region "COMMANDS"
|
||||||
|
|
||||||
|
#Region "NewMaterialCommand"
|
||||||
|
|
||||||
|
Public ReadOnly Property NewMaterialCommand As ICommand
|
||||||
|
Get
|
||||||
|
If m_cmdNewMaterial Is Nothing Then
|
||||||
|
m_cmdNewMaterial = New Command(AddressOf NewMaterial)
|
||||||
|
End If
|
||||||
|
Return m_cmdNewMaterial
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Sub NewMaterial(ByVal param As Object)
|
||||||
|
NewSubMaterial_Visibility = Visibility.Collapsed
|
||||||
|
NewMaterial_Visibility = Visibility.Visible
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region ' NewMaterial
|
||||||
|
|
||||||
|
#Region "DeleteMaterialCommand"
|
||||||
|
|
||||||
|
Public ReadOnly Property DeleteMaterialCommand As ICommand
|
||||||
|
Get
|
||||||
|
If m_cmdDeleteMaterial Is Nothing Then
|
||||||
|
m_cmdDeleteMaterial = New Command(AddressOf DeleteMaterial)
|
||||||
|
End If
|
||||||
|
Return m_cmdDeleteMaterial
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Sub DeleteMaterial(ByVal param As Object)
|
||||||
|
If Not IsNothing(SelMaterial) Then
|
||||||
|
MaterialList.Remove(SelMaterial)
|
||||||
|
'SelMaterial.NotifyPropertyChanged(NameOf(MaterialList))
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region ' DeleteMaterial
|
||||||
|
|
||||||
|
#Region "NewSubMaterialCommand"
|
||||||
|
|
||||||
|
Public ReadOnly Property NewSubMaterialCommand As ICommand
|
||||||
|
Get
|
||||||
|
If m_cmdNewSubMaterial Is Nothing Then
|
||||||
|
m_cmdNewSubMaterial = New Command(AddressOf NewSubMaterial)
|
||||||
|
End If
|
||||||
|
Return m_cmdNewSubMaterial
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Sub NewSubMaterial(ByVal param As Object)
|
||||||
|
If Not IsNothing(SelMaterial) Then
|
||||||
|
NewMaterial_Visibility = Visibility.Collapsed
|
||||||
|
NewSubMaterial_Visibility = Visibility.Visible
|
||||||
|
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region ' NewSubMaterial
|
||||||
|
|
||||||
|
#Region "DeleteSubMaterialCommand"
|
||||||
|
|
||||||
|
Public ReadOnly Property DeleteSubMaterialCommand As ICommand
|
||||||
|
Get
|
||||||
|
If m_cmdDeleteSubMaterial Is Nothing Then
|
||||||
|
m_cmdDeleteSubMaterial = New Command(AddressOf DeleteSubMaterial)
|
||||||
|
End If
|
||||||
|
Return m_cmdDeleteSubMaterial
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Sub DeleteSubMaterial(ByVal param As Object)
|
||||||
|
If Not IsNothing(SelMaterial.SelSubMaterial) Then
|
||||||
|
SelMaterial.SubMaterialList.Remove(SelMaterial.SelSubMaterial)
|
||||||
|
SelMaterial.NotifyPropertyChanged(NameOf(SubMaterialList))
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region ' DeleteSubMaterial
|
||||||
|
|
||||||
|
#Region "NewWjParamCommand"
|
||||||
|
|
||||||
|
Public ReadOnly Property NewWjParamCommand As ICommand
|
||||||
|
Get
|
||||||
|
If m_cmdNewWjParam Is Nothing Then
|
||||||
|
m_cmdNewWjParam = New Command(AddressOf NewWjParam)
|
||||||
|
End If
|
||||||
|
Return m_cmdNewWjParam
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Sub NewWjParam(ByVal param As Object)
|
||||||
|
If Not IsNothing(SelMaterial.SelSubMaterial) Then
|
||||||
|
Dim nId As Integer = 0
|
||||||
|
If IsNothing(SelMaterial.SelSubMaterial.ParamList) Then
|
||||||
|
nId = 1
|
||||||
|
SelMaterial.SelSubMaterial.ParamList = New ObservableCollection(Of WjParam)
|
||||||
|
Else
|
||||||
|
nId = SelMaterial.SelSubMaterial.ParamList.Count + 1
|
||||||
|
End If
|
||||||
|
SelMaterial.SelSubMaterial.ParamList.Add(New WjParam(nId, 0, 0, 0, 0, 0, 0, 0, m_refWaterPageV))
|
||||||
|
SelMaterial.SelSubMaterial.NotifyPropertyChanged(NameOf(ParamList))
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region ' NewWjParam
|
||||||
|
|
||||||
|
#Region "DeleteWjParamCommand"
|
||||||
|
|
||||||
|
Public ReadOnly Property DeleteWjParamCommand As ICommand
|
||||||
|
Get
|
||||||
|
If m_cmdDeleteWjParam Is Nothing Then
|
||||||
|
m_cmdDeleteWjParam = New Command(AddressOf DeleteWjParam)
|
||||||
|
End If
|
||||||
|
Return m_cmdDeleteWjParam
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Sub DeleteWjParam(ByVal param As Object)
|
||||||
|
If Not IsNothing(SelMaterial.SelSubMaterial.SelWjParam) Then
|
||||||
|
SelMaterial.SelSubMaterial.ParamList.Remove(SelMaterial.SelSubMaterial.SelWjParam)
|
||||||
|
SelMaterial.SelSubMaterial.NotifyPropertyChanged(NameOf(ParamList))
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region ' DeleteWjParam
|
||||||
|
|
||||||
|
#Region "DoneCommand"
|
||||||
|
|
||||||
|
Public ReadOnly Property DoneCommand As ICommand
|
||||||
|
Get
|
||||||
|
If m_cmdDone Is Nothing Then
|
||||||
|
m_cmdDone = New Command(AddressOf Done)
|
||||||
|
End If
|
||||||
|
Return m_cmdDone
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Sub Done(ByVal param As Object)
|
||||||
|
If NewMaterial_Visibility = Visibility.Visible Then
|
||||||
|
MaterialList.Add(New WjMaterial(sNewMaterial))
|
||||||
|
NotifyPropertyChanged(NameOf(MaterialList))
|
||||||
|
NewMaterial_Visibility = Visibility.Collapsed
|
||||||
|
ElseIf NewSubMaterial_Visibility = Visibility.Visible Then
|
||||||
|
SelMaterial.SubMaterialList.Add(New WjSubMaterial(sNewSubMaterial))
|
||||||
|
NotifyPropertyChanged(NameOf(SubMaterialList))
|
||||||
|
NewSubMaterial_Visibility = Visibility.Collapsed
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
#End Region ' Done
|
||||||
|
|
||||||
|
#End Region ' Commands
|
||||||
|
|
||||||
|
End Class
|
||||||
|
|
||||||
|
Public Class WjMaterial
|
||||||
|
Inherits VMBase
|
||||||
|
|
||||||
|
Private m_Name As String
|
||||||
|
Public Property Name As String
|
||||||
|
Get
|
||||||
|
Return m_Name
|
||||||
|
End Get
|
||||||
|
Set(value As String)
|
||||||
|
m_Name = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_SubMaterialList As ObservableCollection(Of WjSubMaterial)
|
||||||
|
Public Property SubMaterialList As ObservableCollection(Of WjSubMaterial)
|
||||||
|
Get
|
||||||
|
Return m_SubMaterialList
|
||||||
|
End Get
|
||||||
|
Set(value As ObservableCollection(Of WjSubMaterial))
|
||||||
|
m_SubMaterialList = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private Property m_SelSubMaterial As WjSubMaterial
|
||||||
|
Public Property SelSubMaterial As WjSubMaterial
|
||||||
|
Get
|
||||||
|
Return m_SelSubMaterial
|
||||||
|
End Get
|
||||||
|
Set(value As WjSubMaterial)
|
||||||
|
m_SelSubMaterial = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Sub New(sName As String, SubMatList As ObservableCollection(Of WjSubMaterial))
|
||||||
|
m_Name = sName
|
||||||
|
m_SubMaterialList = SubMatList
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Sub New(sName As String)
|
||||||
|
m_Name = sName
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
End Class
|
||||||
|
|
||||||
|
Public Class WjSubMaterial
|
||||||
|
Inherits VMBase
|
||||||
|
|
||||||
|
Private m_Name As String
|
||||||
|
Public Property Name As String
|
||||||
|
Get
|
||||||
|
Return m_Name
|
||||||
|
End Get
|
||||||
|
Set(value As String)
|
||||||
|
m_Name = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_ParamList As ObservableCollection(Of WjParam)
|
||||||
|
Public Property ParamList As ObservableCollection(Of WjParam)
|
||||||
|
Get
|
||||||
|
Return m_ParamList
|
||||||
|
End Get
|
||||||
|
Set(value As ObservableCollection(Of WjParam))
|
||||||
|
m_ParamList = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private Property m_SelWjParam As WjParam
|
||||||
|
Public Property SelWjParam As WjParam
|
||||||
|
Get
|
||||||
|
Return m_SelWjParam
|
||||||
|
End Get
|
||||||
|
Set(value As WjParam)
|
||||||
|
m_SelWjParam = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Sub New(sName As String, ParamList As ObservableCollection(Of WjParam))
|
||||||
|
m_Name = sName
|
||||||
|
m_ParamList = ParamList
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Sub New(sName As String)
|
||||||
|
m_Name = sName
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
End Class
|
||||||
|
|
||||||
|
Public Class WjParam
|
||||||
|
|
||||||
|
Private m_Id As Integer
|
||||||
|
Public Property Id As Integer
|
||||||
|
Get
|
||||||
|
Return m_Id
|
||||||
|
End Get
|
||||||
|
Set(value As Integer)
|
||||||
|
m_Id = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_Thickness As Double
|
||||||
|
Public Property Thickness As Double
|
||||||
|
Get
|
||||||
|
Return m_Thickness
|
||||||
|
End Get
|
||||||
|
Set(value As Double)
|
||||||
|
m_Thickness = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_Q1 As Double
|
||||||
|
Public Property Q1 As Double
|
||||||
|
Get
|
||||||
|
Return m_Q1
|
||||||
|
End Get
|
||||||
|
Set(value As Double)
|
||||||
|
m_Q1 = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_Q2 As Double
|
||||||
|
Public Property Q2 As Double
|
||||||
|
Get
|
||||||
|
Return m_Q2
|
||||||
|
End Get
|
||||||
|
Set(value As Double)
|
||||||
|
m_Q2 = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_Q3 As Double
|
||||||
|
Public Property Q3 As Double
|
||||||
|
Get
|
||||||
|
Return m_Q3
|
||||||
|
End Get
|
||||||
|
Set(value As Double)
|
||||||
|
m_Q3 = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_Q4 As Double
|
||||||
|
Public Property Q4 As Double
|
||||||
|
Get
|
||||||
|
Return m_Q4
|
||||||
|
End Get
|
||||||
|
Set(value As Double)
|
||||||
|
m_Q4 = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_Q5 As Double
|
||||||
|
Public Property Q5 As Double
|
||||||
|
Get
|
||||||
|
Return m_Q5
|
||||||
|
End Get
|
||||||
|
Set(value As Double)
|
||||||
|
m_Q5 = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_QExtra As Double
|
||||||
|
Public Property QExtra As Double
|
||||||
|
Get
|
||||||
|
Return m_QExtra
|
||||||
|
End Get
|
||||||
|
Set(value As Double)
|
||||||
|
m_QExtra = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property ParamLstBx_Width As Double
|
||||||
|
Get
|
||||||
|
Return m_refWaterPageV.ParamsGpBx.ActualWidth - 20
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private m_refWaterPageV As WaterJetPageUC
|
||||||
|
|
||||||
|
Sub New(nId As Integer, dThickness As Double, dQ1 As Double, dQ2 As Double, dQ3 As Double, dQ4 As Double, dQ5 As Double, dQExtra As Double, ByRef refWJPage As WaterJetPageUC)
|
||||||
|
m_Id = nId
|
||||||
|
m_Thickness = dThickness
|
||||||
|
m_Q1 = dQ1
|
||||||
|
m_Q2 = dQ2
|
||||||
|
m_Q3 = dQ3
|
||||||
|
m_Q4 = dQ4
|
||||||
|
m_Q5 = dQ5
|
||||||
|
m_QExtra = dQExtra
|
||||||
|
m_refWaterPageV = refWJPage
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
End Class
|
||||||
+11
-1
@@ -1068,6 +1068,15 @@ Class MainWindow
|
|||||||
If Not m_MachinePageUC.m_PolishingsPageUC.SaveKit() Then
|
If Not m_MachinePageUC.m_PolishingsPageUC.SaveKit() Then
|
||||||
Return False
|
Return False
|
||||||
End If
|
End If
|
||||||
|
Case MachinePageUC.MachinePages.WaterJet
|
||||||
|
' Verifica ed eventuale salvataggio Db Waterjet
|
||||||
|
Dim m_MainWindow As MainWindow = DirectCast(Application.Current.MainWindow, MainWindow)
|
||||||
|
Dim nPressedBtn As Integer = DirectCast(m_MachinePageUC.m_WaterJetPageUC.DataContext, EgtWPFLib5.WaterjetDbWindowVM).CloseWaterjetDb_OmagCut(m_MainWindow)
|
||||||
|
If nPressedBtn = EgtWPFLib5.WaterjetDbWindowVM.SaveWndBtnEnum.CANCEL Then
|
||||||
|
Return False
|
||||||
|
ElseIf nPressedBtn = EgtWPFLib5.WaterjetDbWindowVM.SaveWndBtnEnum.NO Then
|
||||||
|
m_MachinePageUC.m_WaterJetPageUC.WaterJetPage_Reinitialize()
|
||||||
|
End If
|
||||||
End Select
|
End Select
|
||||||
Return True
|
Return True
|
||||||
End Function
|
End Function
|
||||||
@@ -1130,7 +1139,8 @@ Class MainWindow
|
|||||||
Dim nPrjType As Integer = m_CurrentProjectPageUC.GetCurrentProjectType()
|
Dim nPrjType As Integer = m_CurrentProjectPageUC.GetCurrentProjectType()
|
||||||
' Aggiorno interfaccia
|
' Aggiorno interfaccia
|
||||||
CadCutBtn.IsEnabled = (nPrjType <> CurrentProjectPageUC.PRJ_TYPE.FRAMES)
|
CadCutBtn.IsEnabled = (nPrjType <> CurrentProjectPageUC.PRJ_TYPE.FRAMES)
|
||||||
FrameCutBtn.IsEnabled = (nPrjType <> CurrentProjectPageUC.PRJ_TYPE.FLATS)
|
FrameCutBtn.IsEnabled = (nPrjType <> CurrentProjectPageUC.PRJ_TYPE.FLATS) AndAlso (EgtGetHeadId("H1") <> GDB_ID.NULL)
|
||||||
|
DirectCutBtn.IsEnabled = (EgtGetHeadId("H1") <> GDB_ID.NULL)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
' Nomi dei file per OmagVIEW
|
' Nomi dei file per OmagVIEW
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ Imports System.Windows
|
|||||||
#End If
|
#End If
|
||||||
<Assembly: AssemblyCompany("EgalTech s.r.l.")>
|
<Assembly: AssemblyCompany("EgalTech s.r.l.")>
|
||||||
<Assembly: AssemblyProduct("OmagCUT")>
|
<Assembly: AssemblyProduct("OmagCUT")>
|
||||||
<Assembly: AssemblyCopyright("Copyright © 2015-2021 by EgalTech s.r.l.")>
|
<Assembly: AssemblyCopyright("Copyright © 2015-2022 by EgalTech s.r.l.")>
|
||||||
<Assembly: AssemblyTrademark("")>
|
<Assembly: AssemblyTrademark("")>
|
||||||
<Assembly: ComVisible(False)>
|
<Assembly: ComVisible(False)>
|
||||||
|
|
||||||
@@ -62,5 +62,5 @@ Imports System.Windows
|
|||||||
' by using the '*' as shown below:
|
' by using the '*' as shown below:
|
||||||
' <Assembly: AssemblyVersion("1.0.*")>
|
' <Assembly: AssemblyVersion("1.0.*")>
|
||||||
|
|
||||||
<Assembly: AssemblyVersion("2.3.12.1")>
|
<Assembly: AssemblyVersion("2.4.1.1")>
|
||||||
<Assembly: AssemblyFileVersion("2.3.12.1")>
|
<Assembly: AssemblyFileVersion("2.4.1.1")>
|
||||||
|
|||||||
@@ -202,6 +202,10 @@
|
|||||||
<Compile Include="Machine\ImportExportToolWD.xaml.vb">
|
<Compile Include="Machine\ImportExportToolWD.xaml.vb">
|
||||||
<DependentUpon>ImportExportToolWD.xaml</DependentUpon>
|
<DependentUpon>ImportExportToolWD.xaml</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
|
<Compile Include="Machine\WaterJetPageVM.vb" />
|
||||||
|
<Compile Include="Machine\WaterJetPageUC.xaml.vb">
|
||||||
|
<DependentUpon>WaterJetPageUC.xaml</DependentUpon>
|
||||||
|
</Compile>
|
||||||
<Compile Include="Project\StartLauncheWD.xaml.vb">
|
<Compile Include="Project\StartLauncheWD.xaml.vb">
|
||||||
<DependentUpon>StartLauncheWD.xaml</DependentUpon>
|
<DependentUpon>StartLauncheWD.xaml</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
@@ -444,6 +448,10 @@
|
|||||||
<Page Include="Machine\ImportExportToolWD.xaml">
|
<Page Include="Machine\ImportExportToolWD.xaml">
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
</Page>
|
</Page>
|
||||||
|
<Page Include="Machine\WaterJetPageUC.xaml">
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
<Generator>MSBuild:Compile</Generator>
|
||||||
|
</Page>
|
||||||
<Page Include="Project\StartLauncheWD.xaml">
|
<Page Include="Project\StartLauncheWD.xaml">
|
||||||
</Page>
|
</Page>
|
||||||
<Page Include="Project\CicloStartWD.xaml">
|
<Page Include="Project\CicloStartWD.xaml">
|
||||||
|
|||||||
@@ -332,6 +332,13 @@
|
|||||||
<Setter Property="Foreground" Value="White"/>
|
<Setter Property="Foreground" Value="White"/>
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
|
<Style x:Key="OmagCut_WjDbRightGrayGradientYellowTextButton" TargetType="{x:Type Button}" BasedOn="{StaticResource OmagCut_Button_Wrap}">
|
||||||
|
<Setter Property="Background" Value="#1C1D22"/>
|
||||||
|
<Setter Property="BorderBrush" Value="#1C1D22"/>
|
||||||
|
<Setter Property="Foreground" Value="White"/>
|
||||||
|
<Setter Property="FontSize" Value="15"/>
|
||||||
|
</Style>
|
||||||
|
|
||||||
<Style x:Key="OmagCut_YellowIconToggleButton" TargetType="{x:Type ToggleButton}" BasedOn="{StaticResource OmagCut_ToggleButton}">
|
<Style x:Key="OmagCut_YellowIconToggleButton" TargetType="{x:Type ToggleButton}" BasedOn="{StaticResource OmagCut_ToggleButton}">
|
||||||
<Setter Property="OverridesDefaultStyle" Value="True" />
|
<Setter Property="OverridesDefaultStyle" Value="True" />
|
||||||
<Setter Property="Background" Value="#636974"/>
|
<Setter Property="Background" Value="#636974"/>
|
||||||
|
|||||||
+22
-1
@@ -470,6 +470,13 @@
|
|||||||
</Style.Triggers>
|
</Style.Triggers>
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
|
<Style x:Key="OmagCut_WjDbRightGrayGradientYellowTextButton" TargetType="{x:Type Button}" BasedOn="{StaticResource OmagCut_Button_Wrap}">
|
||||||
|
<Setter Property="Background" Value="{StaticResource OmagCut_RightGradientGray}"/>
|
||||||
|
<Setter Property="BorderBrush" Value="{StaticResource OmagCut_Yellow}"/>
|
||||||
|
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
|
||||||
|
<Setter Property="FontSize" Value="15"/>
|
||||||
|
</Style>
|
||||||
|
|
||||||
<!-- ______________________________________________________________________________________________________________________ -->
|
<!-- ______________________________________________________________________________________________________________________ -->
|
||||||
|
|
||||||
<!--CheckBox-->
|
<!--CheckBox-->
|
||||||
@@ -1198,7 +1205,21 @@
|
|||||||
<Setter Property="KeyboardDimension" Value="300"/>
|
<Setter Property="KeyboardDimension" Value="300"/>
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<Style x:Key="OmagCut_MachToolCalculatorTextBox" TargetType="{x:Type EgtWPFLib:EgtTextBox}" BasedOn="{StaticResource OmagCut_CalculatorTextBox}">
|
<Style x:Key="OmagCut_CalculatorParamWjTextBox" TargetType="{x:Type EgtWPFLib:EgtTextBox}" BasedOn="{StaticResource OmagCut_TextBox}">
|
||||||
|
<Setter Property="Width" Value="80"/>
|
||||||
|
<Setter Property="Keyboard" Value="Calculator"/>
|
||||||
|
<Setter Property="KeyboardDimension" Value="300"/>
|
||||||
|
<Setter Property="IsHitTestVisible" Value="False" />
|
||||||
|
<Style.Triggers>
|
||||||
|
<DataTrigger Binding="{Binding IsSelected, RelativeSource={RelativeSource FindAncestor,
|
||||||
|
AncestorType={x:Type ListBoxItem}, AncestorLevel=1}}"
|
||||||
|
Value="True">
|
||||||
|
<Setter Property="IsHitTestVisible" Value="True" />
|
||||||
|
</DataTrigger>
|
||||||
|
</Style.Triggers>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<Style x:Key="OmagCut_MachToolCalculatorTextBox" TargetType="{x:Type EgtWPFLib:EgtTextBox}" BasedOn="{StaticResource OmagCut_CalculatorTextBox}">
|
||||||
<Setter Property="Margin" Value="{DynamicResource MachToolLeftTextBoxNoBorder_Margin}"/>
|
<Setter Property="Margin" Value="{DynamicResource MachToolLeftTextBoxNoBorder_Margin}"/>
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
|
|||||||
@@ -622,6 +622,8 @@ Public Class CurrentProjectPageUC
|
|||||||
File.Copy(sPhoto, sNewPhoto, True)
|
File.Copy(sPhoto, sNewPhoto, True)
|
||||||
Catch ex As FileNotFoundException
|
Catch ex As FileNotFoundException
|
||||||
' non è un problema
|
' non è un problema
|
||||||
|
Catch ex As DirectoryNotFoundException
|
||||||
|
' non è un problema
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
Return False
|
Return False
|
||||||
End Try
|
End Try
|
||||||
|
|||||||
@@ -80,17 +80,35 @@
|
|||||||
</ComboBox>
|
</ComboBox>
|
||||||
|
|
||||||
<!--WATERJET-->
|
<!--WATERJET-->
|
||||||
<TextBlock Name="CurrWJettingTxBl" Grid.Column="1" Grid.Row="2"
|
<TextBlock Name="CurrWJettingTxBl" Grid.Column="1" Grid.Row="2"
|
||||||
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}" Visibility="Hidden"/>
|
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}" Visibility="Hidden"/>
|
||||||
<ComboBox Name="CurrWJettingCmBx" Grid.Column="1" Grid.Row="3" Visibility="Hidden">
|
|
||||||
<ComboBox.ItemTemplate>
|
|
||||||
<DataTemplate>
|
|
||||||
<TextBlock Text="{Binding}" FontSize="20" />
|
|
||||||
</DataTemplate>
|
|
||||||
</ComboBox.ItemTemplate>
|
|
||||||
</ComboBox>
|
|
||||||
|
|
||||||
<!--Bottoni Conferma/Cancel -->
|
<Grid Name="WaterJettingUGrd" Grid.Column="1" Grid.Row="3">
|
||||||
|
<Grid.ColumnDefinitions>
|
||||||
|
<ColumnDefinition Width="4.5*"/>
|
||||||
|
<ColumnDefinition Width="0.2*"/>
|
||||||
|
<ColumnDefinition Width="2*"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="1*"/>
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<ComboBox Name="CurrWJettingCmBx" Grid.Column="0" Visibility="Hidden">
|
||||||
|
<ComboBox.ItemTemplate>
|
||||||
|
<DataTemplate>
|
||||||
|
<TextBlock Text="{Binding}" FontSize="20" />
|
||||||
|
</DataTemplate>
|
||||||
|
</ComboBox.ItemTemplate>
|
||||||
|
</ComboBox>
|
||||||
|
<ComboBox Name="CurrWJettingQualityCmBx" Grid.Column="2" Visibility="Hidden">
|
||||||
|
<ComboBox.ItemTemplate>
|
||||||
|
<DataTemplate>
|
||||||
|
<TextBlock Text="{Binding}" FontSize="20" />
|
||||||
|
</DataTemplate>
|
||||||
|
</ComboBox.ItemTemplate>
|
||||||
|
</ComboBox>
|
||||||
|
</Grid>
|
||||||
|
|
||||||
|
<!--Bottoni Conferma/Cancel -->
|
||||||
<Grid Name="ButtonsGrid" Grid.Column="1" Grid.Row="3" Grid.RowSpan="2">
|
<Grid Name="ButtonsGrid" Grid.Column="1" Grid.Row="3" Grid.RowSpan="2">
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="0.5*"/>
|
<ColumnDefinition Width="0.5*"/>
|
||||||
|
|||||||
@@ -41,6 +41,7 @@ Public Class ChooseMachining
|
|||||||
CurrMillingCmBx.ItemsSource = m_MillingList
|
CurrMillingCmBx.ItemsSource = m_MillingList
|
||||||
CurrPocketingCmBx.ItemsSource = m_PocketingList
|
CurrPocketingCmBx.ItemsSource = m_PocketingList
|
||||||
CurrWJettingCmBx.ItemsSource = m_WJettingList
|
CurrWJettingCmBx.ItemsSource = m_WJettingList
|
||||||
|
CurrWJettingQualityCmBx.ItemsSource = m_CurrentMachine.Qualities
|
||||||
|
|
||||||
CurrSawingTxBl.Text = EgtMsg(MSG_CHOOSEMACHININGPAGEUC + 1)
|
CurrSawingTxBl.Text = EgtMsg(MSG_CHOOSEMACHININGPAGEUC + 1)
|
||||||
AuxiliaryMachiningTxBl.Text = EgtMsg(MSG_CHOOSEMACHININGPAGEUC + 2)
|
AuxiliaryMachiningTxBl.Text = EgtMsg(MSG_CHOOSEMACHININGPAGEUC + 2)
|
||||||
@@ -59,6 +60,12 @@ Public Class ChooseMachining
|
|||||||
|
|
||||||
Private Sub InitializeMachiningLists()
|
Private Sub InitializeMachiningLists()
|
||||||
|
|
||||||
|
' in assenza dell'uscita H1 nascondo i parametri lama
|
||||||
|
If EgtGetHeadId("H1") = GDB_ID.NULL Then
|
||||||
|
CurrSawingTxBl.Visibility = Visibility.Hidden
|
||||||
|
CurrSawingCmBx.Visibility = Visibility.Hidden
|
||||||
|
End If
|
||||||
|
|
||||||
' -- TAGLIO --
|
' -- TAGLIO --
|
||||||
CreateMachiningList(MCH_MY.SAWING, m_CurrentMachine.sCurrSaw, m_SawingList)
|
CreateMachiningList(MCH_MY.SAWING, m_CurrentMachine.sCurrSaw, m_SawingList)
|
||||||
' aggiungo un campo vuoto
|
' aggiungo un campo vuoto
|
||||||
@@ -256,19 +263,38 @@ Public Class ChooseMachining
|
|||||||
If SysNotes <> String.Empty Then
|
If SysNotes <> String.Empty Then
|
||||||
Dim MachiningMaterials() = SysNotes.Split(";".ToCharArray)
|
Dim MachiningMaterials() = SysNotes.Split(";".ToCharArray)
|
||||||
SysNotes = String.Empty
|
SysNotes = String.Empty
|
||||||
For Each Material As Object In MachiningMaterials
|
If m_CurrentMachine.bWaterJet Then
|
||||||
Dim Param() As String = Material.Split(",".ToCharArray)
|
For Each Material As Object In MachiningMaterials
|
||||||
If Param(0) = m_CurrentMachine.CurrMat.nId.ToString() Then
|
Dim Param() As String = Material.Split(",".ToCharArray)
|
||||||
Dim dRawHeight = GetRawHeight()
|
Dim SubParam() As String = Param(0).Split(".".ToCharArray)
|
||||||
Dim MatMinH As Double = 0
|
If SubParam(0) = m_CurrentMachine.CurrMat.nId.ToString() AndAlso SubParam.Count > 1 AndAlso SubParam(1) = m_CurrentMachine.CurrMat.SubId.ToString() Then
|
||||||
StringToDouble(Param(1), MatMinH)
|
Dim dRawHeight = GetRawHeight()
|
||||||
Dim MatMaxH As Double = 0
|
Dim MatMinH As Double = 0
|
||||||
StringToDouble(Param(2), MatMaxH)
|
StringToDouble(Param(1), MatMinH)
|
||||||
If dRawHeight > MatMinH - EPS_SMALL And dRawHeight < MatMaxH + EPS_SMALL Then
|
Dim MatMaxH As Double = 0
|
||||||
Return True
|
StringToDouble(Param(2), MatMaxH)
|
||||||
|
If dRawHeight > MatMinH - EPS_SMALL And dRawHeight < MatMaxH + EPS_SMALL Then
|
||||||
|
Return True
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
End If
|
Next
|
||||||
Next
|
Else
|
||||||
|
For Each Material As Object In MachiningMaterials
|
||||||
|
Dim Param() As String = Material.Split(",".ToCharArray)
|
||||||
|
If Param(0) = m_CurrentMachine.CurrMat.nId.ToString() Then
|
||||||
|
Dim dRawHeight = GetRawHeight()
|
||||||
|
Dim MatMinH As Double = 0
|
||||||
|
StringToDouble(Param(1), MatMinH)
|
||||||
|
Dim MatMaxH As Double = 0
|
||||||
|
StringToDouble(Param(2), MatMaxH)
|
||||||
|
If dRawHeight > MatMinH - EPS_SMALL And dRawHeight < MatMaxH + EPS_SMALL Then
|
||||||
|
Return True
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
Return False
|
Return False
|
||||||
Else
|
Else
|
||||||
Return False
|
Return False
|
||||||
@@ -553,7 +579,8 @@ Public Class ChooseMachining
|
|||||||
Next
|
Next
|
||||||
m_RowNumber = m_RowNumber + nNewRow
|
m_RowNumber = m_RowNumber + nNewRow
|
||||||
CurrWJettingTxBl.SetValue(Grid.RowProperty, m_RowNumber - nDeltaRow - nNewRow)
|
CurrWJettingTxBl.SetValue(Grid.RowProperty, m_RowNumber - nDeltaRow - nNewRow)
|
||||||
CurrWJettingCmBx.SetValue(Grid.RowProperty, m_RowNumber - nDeltaRow - nNewRow + 1)
|
'CurrWJettingCmBx.SetValue(Grid.RowProperty, m_RowNumber - nDeltaRow - nNewRow + 1)
|
||||||
|
WaterJettingUGrd.SetValue(Grid.RowProperty, m_RowNumber - nDeltaRow - nNewRow + 1)
|
||||||
If m_CurrentMachine.sCurrWaterJetting <> String.Empty Then
|
If m_CurrentMachine.sCurrWaterJetting <> String.Empty Then
|
||||||
CurrWJettingCmBx.SelectedItem = m_CurrentMachine.sCurrWaterJetting
|
CurrWJettingCmBx.SelectedItem = m_CurrentMachine.sCurrWaterJetting
|
||||||
End If
|
End If
|
||||||
@@ -562,6 +589,16 @@ Public Class ChooseMachining
|
|||||||
' verifico che sia stato inserito veramente una lavorazione prima di comunicare una modifica
|
' verifico che sia stato inserito veramente una lavorazione prima di comunicare una modifica
|
||||||
If CurrMillingCmBx.SelectedItem <> m_CurrentMachine.sCurrWaterJetting Then m_MachIsModified = True
|
If CurrMillingCmBx.SelectedItem <> m_CurrentMachine.sCurrWaterJetting Then m_MachIsModified = True
|
||||||
End If
|
End If
|
||||||
|
If String.IsNullOrEmpty(CurrWJettingQualityCmBx.SelectedItem) Then
|
||||||
|
CurrWJettingQualityCmBx.SelectedItem = m_CurrentMachine.sCurrWaterJettingQuality
|
||||||
|
End If
|
||||||
|
' verifico che la selezione sia andata a buon fine, altrimenti comunico l'avvenuta modifica
|
||||||
|
If String.IsNullOrEmpty(CurrWJettingQualityCmBx.SelectedItem) Then
|
||||||
|
' verifico che sia stato inserito veramente una lavorazione prima di comunicare una modifica
|
||||||
|
If CurrWJettingQualityCmBx.SelectedItem <> m_CurrentMachine.sCurrWaterJettingQuality Then m_MachIsModified = True
|
||||||
|
End If
|
||||||
|
|
||||||
|
CurrWJettingQualityCmBx.Visibility = Windows.Visibility.Visible
|
||||||
CurrWJettingTxBl.Visibility = Windows.Visibility.Visible
|
CurrWJettingTxBl.Visibility = Windows.Visibility.Visible
|
||||||
CurrWJettingCmBx.Visibility = Windows.Visibility.Visible
|
CurrWJettingCmBx.Visibility = Windows.Visibility.Visible
|
||||||
End If
|
End If
|
||||||
@@ -590,6 +627,10 @@ Public Class ChooseMachining
|
|||||||
m_MainWindow.m_CurrentMachine.sCurrWaterJetting = CurrWJettingCmBx.SelectedItem.ToString()
|
m_MainWindow.m_CurrentMachine.sCurrWaterJetting = CurrWJettingCmBx.SelectedItem.ToString()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Private Sub CurrQaulityWJettingCmBx_SelectionChanged(sender As Object, e As SelectionChangedEventArgs) Handles CurrWJettingQualityCmBx.SelectionChanged
|
||||||
|
m_MainWindow.m_CurrentMachine.sCurrWaterJettingQuality = CurrWJettingQualityCmBx.SelectedItem.ToString()
|
||||||
|
End Sub
|
||||||
|
|
||||||
Private Sub OkBtn_Click(sender As Object, e As RoutedEventArgs) Handles OkBtn.Click
|
Private Sub OkBtn_Click(sender As Object, e As RoutedEventArgs) Handles OkBtn.Click
|
||||||
DialogResult = True
|
DialogResult = True
|
||||||
End Sub
|
End Sub
|
||||||
|
|||||||
@@ -140,7 +140,7 @@ Public Class RawPartPageUC
|
|||||||
' Nascondo bottone dati lastra se non attivato da file .ini
|
' Nascondo bottone dati lastra se non attivato da file .ini
|
||||||
m_bSlabId = (Not m_CurrentMachine.bHasRawBarCodeReader And
|
m_bSlabId = (Not m_CurrentMachine.bHasRawBarCodeReader And
|
||||||
GetPrivateProfileInt(S_RAWPART, K_SLABID, 0, m_MainWindow.GetIniFile()) <> 0)
|
GetPrivateProfileInt(S_RAWPART, K_SLABID, 0, m_MainWindow.GetIniFile()) <> 0)
|
||||||
SlabIdBtn.Visibility = If( m_bSlabId, Windows.Visibility.Visible, Windows.Visibility.Collapsed)
|
SlabIdBtn.Visibility = If(m_bSlabId, Windows.Visibility.Visible, Windows.Visibility.Collapsed)
|
||||||
|
|
||||||
m_SmartMachiningPage = GetPrivateProfileInt(S_GENERAL, "SmartMachiningPage", 0, m_MainWindow.GetIniFile()) <> 0
|
m_SmartMachiningPage = GetPrivateProfileInt(S_GENERAL, "SmartMachiningPage", 0, m_MainWindow.GetIniFile()) <> 0
|
||||||
|
|
||||||
@@ -165,10 +165,16 @@ Public Class RawPartPageUC
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub RawPartPage_Loaded(sender As Object, e As RoutedEventArgs)
|
Private Sub RawPartPage_Loaded(sender As Object, e As RoutedEventArgs)
|
||||||
|
' aggiorno la lista dei materiali
|
||||||
|
Dim Index As Integer = 1
|
||||||
|
If m_CurrentMachine.bWaterJet Then
|
||||||
|
m_CurrentMachine.LoadWJMaterial()
|
||||||
|
End If
|
||||||
|
|
||||||
m_CurrProjPage = m_MainWindow.m_CurrentProjectPageUC
|
m_CurrProjPage = m_MainWindow.m_CurrentProjectPageUC
|
||||||
m_bActive = True
|
m_bActive = True
|
||||||
' Assegno modalità acquisizione punti laser (da disegno se non collegato alla macchina)
|
' Assegno modalità acquisizione punti laser (da disegno se non collegato alla macchina)
|
||||||
m_bFromDraw = ( m_MainWindow.m_CNCommunication.m_nNCType = 0)
|
m_bFromDraw = (m_MainWindow.m_CNCommunication.m_nNCType = 0)
|
||||||
' Correggo differenza tra machinebuttons che ha 10 colonne e spazio disponibile solo per 9 facendolo sbordare(non si vede perchè la parte che avanza è vuota)
|
' Correggo differenza tra machinebuttons che ha 10 colonne e spazio disponibile solo per 9 facendolo sbordare(non si vede perchè la parte che avanza è vuota)
|
||||||
m_MachineButtons.Width = LowerButtonGrid.ActualWidth / 12 * 10
|
m_MachineButtons.Width = LowerButtonGrid.ActualWidth / 12 * 10
|
||||||
' Se disponibile, imposto possibilità di contorno da foto
|
' Se disponibile, imposto possibilità di contorno da foto
|
||||||
@@ -226,7 +232,7 @@ Public Class RawPartPageUC
|
|||||||
End If
|
End If
|
||||||
' aggiorno l'apparenza del grezzo
|
' aggiorno l'apparenza del grezzo
|
||||||
AdjustRawPartOnStart()
|
AdjustRawPartOnStart()
|
||||||
' Altrimenti lo definisco
|
' Altrimenti lo definisco
|
||||||
Else
|
Else
|
||||||
' Leggo da Ini gli ultimi valori
|
' Leggo da Ini gli ultimi valori
|
||||||
m_RawLength = GetPrivateProfileDouble(S_RAWPART, K_RAWLENGTH, 2500, m_MainWindow.GetIniFile())
|
m_RawLength = GetPrivateProfileDouble(S_RAWPART, K_RAWLENGTH, 2500, m_MainWindow.GetIniFile())
|
||||||
@@ -241,12 +247,12 @@ Public Class RawPartPageUC
|
|||||||
' Eventuale gestione dati lastra
|
' Eventuale gestione dati lastra
|
||||||
If m_bSlabId Then
|
If m_bSlabId Then
|
||||||
Dim sBlock As String = ""
|
Dim sBlock As String = ""
|
||||||
GetPrivateProfileString( S_RAWPART, K_BLOCKNAME, "", sBlock, m_MainWindow.GetIniFile())
|
GetPrivateProfileString(S_RAWPART, K_BLOCKNAME, "", sBlock, m_MainWindow.GetIniFile())
|
||||||
Dim nSlabNbr As Integer = GetPrivateProfileInt( S_RAWPART, K_SLABNBR, 0, m_MainWindow.GetIniFile())
|
Dim nSlabNbr As Integer = GetPrivateProfileInt(S_RAWPART, K_SLABNBR, 0, m_MainWindow.GetIniFile())
|
||||||
nSlabNbr += 1
|
nSlabNbr += 1
|
||||||
Dim sSlabNbr As String = nSlabNbr.ToString()
|
Dim sSlabNbr As String = nSlabNbr.ToString()
|
||||||
WritePrivateProfileString( S_RAWPART, K_SLABNBR, sSlabNbr, m_MainWindow.GetIniFile())
|
WritePrivateProfileString(S_RAWPART, K_SLABNBR, sSlabNbr, m_MainWindow.GetIniFile())
|
||||||
Utility.SetBlockAndSlabNbr( sBlock, sSlabNbr)
|
Utility.SetBlockAndSlabNbr(sBlock, sSlabNbr)
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
' Assegno dati grezzo rettangolare ai textbox
|
' Assegno dati grezzo rettangolare ai textbox
|
||||||
@@ -282,8 +288,14 @@ Public Class RawPartPageUC
|
|||||||
End If
|
End If
|
||||||
EgtZoom(ZM.ALL)
|
EgtZoom(ZM.ALL)
|
||||||
End If
|
End If
|
||||||
' Imposto il materiale corrente nella combobox
|
'Imposto il materiale corrente nella combobox
|
||||||
MaterialsCmbx.SelectedItem = m_CurrentMachine.CurrMat
|
'MaterialsCmbx.SelectedItem = m_CurrentMachine.CurrMat
|
||||||
|
Dim Item As Material
|
||||||
|
For Each Item In MaterialsCmbx.Items
|
||||||
|
If Not IsNothing(m_CurrentMachine.CurrMat) AndAlso Item.sName = m_CurrentMachine.CurrMat.sName Then
|
||||||
|
MaterialsCmbx.SelectedItem = Item
|
||||||
|
End If
|
||||||
|
Next
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub OnMyMouseDownScene(sender As Object, e As System.Windows.Forms.MouseEventArgs) Handles m_CurrProjPage.OnMouseDownScene
|
Private Sub OnMyMouseDownScene(sender As Object, e As System.Windows.Forms.MouseEventArgs) Handles m_CurrProjPage.OnMouseDownScene
|
||||||
@@ -952,13 +964,21 @@ Public Class RawPartPageUC
|
|||||||
m_nPtMode = If(AddBtn.IsChecked, PTMODE.ADD, PTMODE.MOVE)
|
m_nPtMode = If(AddBtn.IsChecked, PTMODE.ADD, PTMODE.MOVE)
|
||||||
Case RAWMODE.FROM_LASER
|
Case RAWMODE.FROM_LASER
|
||||||
Dim ptAcquired As Point3d
|
Dim ptAcquired As Point3d
|
||||||
'----------------------------------------- INIZIO ------------------ se decido di inserire i punti laser manualmente --------------------------------------------------
|
' Se inserimento manuale dei punti laser
|
||||||
If m_bFromDraw And Not IsNothing(m_ptPrev) Then
|
If m_bFromDraw Then
|
||||||
ptAcquired = m_ptPrev
|
If Not IsNothing(m_ptPrev) Then
|
||||||
ptAcquired.ToLoc(New Frame3d(m_ptTableMin))
|
ptAcquired = m_ptPrev
|
||||||
'----------------------------------------- FINE ------------------- se decido di inserire i punti laser manualmente --------------------------------------------------
|
ptAcquired.ToLoc(New Frame3d(m_ptTableMin))
|
||||||
ElseIf Not AcquireLaserPoint(ptAcquired) Then
|
Else
|
||||||
m_CurrProjPage.SetErrorMessage(EgtMsg(MSG_RAWPARTPAGEUC + 32))
|
m_CurrProjPage.SetErrorMessage(EgtMsg(90532)) ' Errore nell'acquisizione del punto
|
||||||
|
Return
|
||||||
|
End If
|
||||||
|
' altrimenti da macchina
|
||||||
|
Else
|
||||||
|
If Not AcquireLaserPoint(ptAcquired) Then
|
||||||
|
m_CurrProjPage.SetErrorMessage(EgtMsg(90532)) ' Errore nell'acquisizione del punto
|
||||||
|
Return
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
' Limito il punto a stare nella tavola con franco pari al kerf
|
' Limito il punto a stare nella tavola con franco pari al kerf
|
||||||
If ptAcquired.x < m_RawKerf Then ptAcquired.x = m_RawKerf + SAFE_RAW_DIST
|
If ptAcquired.x < m_RawKerf Then ptAcquired.x = m_RawKerf + SAFE_RAW_DIST
|
||||||
@@ -1002,13 +1022,21 @@ Public Class RawPartPageUC
|
|||||||
m_nPtDmgMode = DMGMODE.NONE
|
m_nPtDmgMode = DMGMODE.NONE
|
||||||
Case RAWMODE.DAMAGED_BY_LASER
|
Case RAWMODE.DAMAGED_BY_LASER
|
||||||
Dim ptAcquired As Point3d
|
Dim ptAcquired As Point3d
|
||||||
'----------------------------------------- INIZIO ------------------ se decido di inserire i punti laser manualmente --------------------------------------------------
|
' Se inserimento manuale dei punti laser
|
||||||
If m_bFromDraw And Not IsNothing(m_ptPrev) Then
|
If m_bFromDraw Then
|
||||||
ptAcquired = m_ptPrev
|
If Not IsNothing(m_ptPrev) Then
|
||||||
ptAcquired.ToLoc(New Frame3d(m_ptTableMin))
|
ptAcquired = m_ptPrev
|
||||||
'----------------------------------------- FINE ------------------- se decido di inserire i punti laser manualmente --------------------------------------------------
|
ptAcquired.ToLoc(New Frame3d(m_ptTableMin))
|
||||||
ElseIf Not AcquireLaserPoint(ptAcquired) Then
|
Else
|
||||||
m_CurrProjPage.SetErrorMessage(EgtMsg(MSG_RAWPARTPAGEUC + 32))
|
m_CurrProjPage.SetErrorMessage(EgtMsg(90532)) ' Errore nell'acquisizione del punto
|
||||||
|
Return
|
||||||
|
End If
|
||||||
|
' altrimenti da macchina
|
||||||
|
Else
|
||||||
|
If Not AcquireLaserPoint(ptAcquired) Then
|
||||||
|
m_CurrProjPage.SetErrorMessage(EgtMsg(90532)) ' Errore nell'acquisizione del punto
|
||||||
|
Return
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
' Limito il punto a stare nella tavola con franco pari al kerf
|
' Limito il punto a stare nella tavola con franco pari al kerf
|
||||||
If ptAcquired.x < m_RawKerf Then ptAcquired.x = m_RawKerf + SAFE_RAW_DIST
|
If ptAcquired.x < m_RawKerf Then ptAcquired.x = m_RawKerf + SAFE_RAW_DIST
|
||||||
@@ -1050,8 +1078,11 @@ Public Class RawPartPageUC
|
|||||||
If Not m_MainWindow.m_CNCommunication.GetAxesPositions(dL1, dL2, dL3, dR1, dR2) Then
|
If Not m_MainWindow.m_CNCommunication.GetAxesPositions(dL1, dL2, dL3, dR1, dR2) Then
|
||||||
Return False
|
Return False
|
||||||
End If
|
End If
|
||||||
' Ricavo dati lama corrente
|
' Recupero dati utensile e testa corrente
|
||||||
Dim sSaw As String = m_CurrentMachine.sCurrSaw
|
Dim sTool As String = ""
|
||||||
|
Dim sHead As String = ""
|
||||||
|
Dim nExit As Integer = 0
|
||||||
|
EgtGetCalcTool(sTool, sHead, nExit)
|
||||||
' Imposto come testa corrente il laser (senza utensile ovviamente)
|
' Imposto come testa corrente il laser (senza utensile ovviamente)
|
||||||
If Not EgtSetCalcTool("", "H3", 1) Then
|
If Not EgtSetCalcTool("", "H3", 1) Then
|
||||||
Return False
|
Return False
|
||||||
@@ -1060,10 +1091,8 @@ Public Class RawPartPageUC
|
|||||||
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, dR1, dR2, True, ptTipP1) Then
|
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, dR1, dR2, True, ptTipP1) Then
|
||||||
Return False
|
Return False
|
||||||
End If
|
End If
|
||||||
' Ora imposto la lama corrente
|
' Reimposto eventuale precedente utensile
|
||||||
If Not EgtSetCalcTool(sSaw, "H1", 1) Then
|
EgtSetCalcTool(sTool, sHead, nExit)
|
||||||
Return False
|
|
||||||
End If
|
|
||||||
' Porto il tip nell'origine tavola
|
' Porto il tip nell'origine tavola
|
||||||
ptAcquired = ptTipP1
|
ptAcquired = ptTipP1
|
||||||
ptAcquired.ToLoc(New Frame3d(m_ptTableMin))
|
ptAcquired.ToLoc(New Frame3d(m_ptTableMin))
|
||||||
@@ -1776,7 +1805,7 @@ Public Class RawPartPageUC
|
|||||||
m_MainWindow.m_CNCommunication.m_CN.n_DReadELS_handle = 0
|
m_MainWindow.m_CNCommunication.m_CN.n_DReadELS_handle = 0
|
||||||
' Definisco flag tastatura
|
' Definisco flag tastatura
|
||||||
Dim bProbingOk As Boolean = False
|
Dim bProbingOk As Boolean = False
|
||||||
For I As integer = 0 To 120
|
For I As Integer = 0 To 120
|
||||||
' Devo rileggere la variabile ad ogni ciclo
|
' Devo rileggere la variabile ad ogni ciclo
|
||||||
m_MainWindow.m_CNCommunication.m_CN.ReadEls_Add_Parameter(ProbingStateNameVar, 3)
|
m_MainWindow.m_CNCommunication.m_CN.ReadEls_Add_Parameter(ProbingStateNameVar, 3)
|
||||||
System.Threading.Thread.Sleep(100)
|
System.Threading.Thread.Sleep(100)
|
||||||
@@ -1813,7 +1842,7 @@ Public Class RawPartPageUC
|
|||||||
Dim RawThicknessNameVar As String = String.Empty
|
Dim RawThicknessNameVar As String = String.Empty
|
||||||
GetPrivateProfileString(S_MACH_PROBING, K_RAWTHICKNESS, "", RawThicknessNameVar, m_MainWindow.GetMachIniFile())
|
GetPrivateProfileString(S_MACH_PROBING, K_RAWTHICKNESS, "", RawThicknessNameVar, m_MainWindow.GetMachIniFile())
|
||||||
m_MainWindow.m_CNCommunication.m_CN.n_DReadELS_handle = 0
|
m_MainWindow.m_CNCommunication.m_CN.n_DReadELS_handle = 0
|
||||||
For I As integer = 0 To 20
|
For I As Integer = 0 To 20
|
||||||
' Devo rileggere la variabile ad ogni ciclo
|
' Devo rileggere la variabile ad ogni ciclo
|
||||||
m_MainWindow.m_CNCommunication.m_CN.ReadEls_Add_Parameter(RawThicknessNameVar, 3)
|
m_MainWindow.m_CNCommunication.m_CN.ReadEls_Add_Parameter(RawThicknessNameVar, 3)
|
||||||
If m_MainWindow.m_CNCommunication.m_CN.n_DReadELS_handle = 3 Then
|
If m_MainWindow.m_CNCommunication.m_CN.n_DReadELS_handle = 3 Then
|
||||||
@@ -1900,10 +1929,10 @@ Public Class RawPartPageUC
|
|||||||
Dim SlabIdWindow As New SlabIdWD(m_MainWindow)
|
Dim SlabIdWindow As New SlabIdWD(m_MainWindow)
|
||||||
' Recupero eventuali vecchi dati della lastra
|
' Recupero eventuali vecchi dati della lastra
|
||||||
If nRawId <> GDB_ID.NULL Then
|
If nRawId <> GDB_ID.NULL Then
|
||||||
Dim sBlock As String = "" : EgtGetInfo( nRawId, INFO_RAW_BLOCK, sBlock)
|
Dim sBlock As String = "" : EgtGetInfo(nRawId, INFO_RAW_BLOCK, sBlock)
|
||||||
Dim sSlabNbr As String = "" : EgtGetInfo( nRawId, INFO_RAW_SLABNBR, sSlabNbr)
|
Dim sSlabNbr As String = "" : EgtGetInfo(nRawId, INFO_RAW_SLABNBR, sSlabNbr)
|
||||||
SlabIdWindow.SetBlockName( sBlock)
|
SlabIdWindow.SetBlockName(sBlock)
|
||||||
SlabIdWindow.SetSlabNbr( sSlabNbr)
|
SlabIdWindow.SetSlabNbr(sSlabNbr)
|
||||||
End If
|
End If
|
||||||
' Visualizzo finestra richiesta dati
|
' Visualizzo finestra richiesta dati
|
||||||
If SlabIdWindow.ShowDialog() Then
|
If SlabIdWindow.ShowDialog() Then
|
||||||
@@ -1911,10 +1940,10 @@ Public Class RawPartPageUC
|
|||||||
Dim sBlock As String = SlabIdWindow.GetBlockName()
|
Dim sBlock As String = SlabIdWindow.GetBlockName()
|
||||||
Dim sSlabNbr As String = SlabIdWindow.GetSlabNbr()
|
Dim sSlabNbr As String = SlabIdWindow.GetSlabNbr()
|
||||||
' Li assegno
|
' Li assegno
|
||||||
Utility.SetBlockAndSlabNbr( sBlock, sSlabNbr)
|
Utility.SetBlockAndSlabNbr(sBlock, sSlabNbr)
|
||||||
' Li salvo
|
' Li salvo
|
||||||
WritePrivateProfileString( S_RAWPART, K_BLOCKNAME, sBlock, m_MainWindow.GetIniFile())
|
WritePrivateProfileString(S_RAWPART, K_BLOCKNAME, sBlock, m_MainWindow.GetIniFile())
|
||||||
WritePrivateProfileString( S_RAWPART, K_SLABNBR, sSlabNbr, m_MainWindow.GetIniFile())
|
WritePrivateProfileString(S_RAWPART, K_SLABNBR, sSlabNbr, m_MainWindow.GetIniFile())
|
||||||
' Aggiorno visualizzazione
|
' Aggiorno visualizzazione
|
||||||
EgtDraw()
|
EgtDraw()
|
||||||
End If
|
End If
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 8.7 KiB After Width: | Height: | Size: 6.4 KiB |
@@ -1,4 +1,5 @@
|
|||||||
Imports System.Globalization
|
Imports System.Globalization
|
||||||
|
Imports System.Collections.ObjectModel
|
||||||
Imports EgtUILib
|
Imports EgtUILib
|
||||||
|
|
||||||
Module Utility
|
Module Utility
|
||||||
@@ -273,4 +274,40 @@ Module Utility
|
|||||||
Return BackBottomColor
|
Return BackBottomColor
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
Public Sub GetDrillFromDrilling(ByRef sCurrDrill As String, ByVal sCurrDrilling As String)
|
||||||
|
If String.IsNullOrEmpty(sCurrDrill) Or String.IsNullOrWhiteSpace(sCurrDrill) Then
|
||||||
|
' creo l'elenco degli utensili di foratura
|
||||||
|
Dim sToolName As String = String.Empty
|
||||||
|
Dim nType As Integer = MCH_TY.NONE
|
||||||
|
Dim DrillToolList As New ObservableCollection(Of String)
|
||||||
|
DrillToolList.Clear()
|
||||||
|
If EgtTdbGetFirstTool(MCH_TF.DRILLBIT, sToolName, nType) Then
|
||||||
|
DrillToolList.Add(sToolName)
|
||||||
|
While EgtTdbGetNextTool(MCH_TF.DRILLBIT, sToolName, nType)
|
||||||
|
DrillToolList.Add(sToolName)
|
||||||
|
End While
|
||||||
|
End If
|
||||||
|
' recupero l'utensile associato alla lavorazione
|
||||||
|
'Dim sCurrDrilling As String = m_MainWindow.m_CurrentMachine.sCurrDrilling
|
||||||
|
Dim ToolString As String = String.Empty
|
||||||
|
EgtMdbSetCurrMachining(sCurrDrilling)
|
||||||
|
' Recupero nome utensile tramite TUUID
|
||||||
|
Dim sTuuid As String = String.Empty
|
||||||
|
EgtMdbGetCurrMachiningParam(MCH_MP.TUUID, sTuuid)
|
||||||
|
EgtTdbGetToolFromUUID(sTuuid, ToolString)
|
||||||
|
Dim bToolExist As Boolean = False
|
||||||
|
For Each CurrTool As IEnumerable In DrillToolList
|
||||||
|
If CurrTool.ToString() = ToolString Then
|
||||||
|
bToolExist = True
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
If bToolExist Then
|
||||||
|
sCurrDrill = ToolString
|
||||||
|
Else
|
||||||
|
sCurrDrill = String.Empty
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
End Module
|
End Module
|
||||||
|
|||||||
Reference in New Issue
Block a user