Compare commits
64 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 319275f43c | |||
| 61d238e196 | |||
| 0900728bbf | |||
| ee83a453e7 | |||
| 7596849254 | |||
| e12eb2599e | |||
| a0754265ac | |||
| 1645a39506 | |||
| 9e2c2c1b98 | |||
| 51f15818c2 | |||
| b0081241d8 | |||
| 173230df5a | |||
| 22afb6edcd | |||
| 9c8faf25bf | |||
| 58775595c7 | |||
| 367ac62fc8 | |||
| 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 | |||
| 7ccb7fb96f | |||
| 9a751d0524 | |||
| 0e25b456bf | |||
| 4c8394f22d | |||
| ed3e14229f | |||
| 81f6fa88da | |||
| adbc811206 | |||
| 94866ce13d | |||
| c336390baf | |||
| 0686d543bb | |||
| 58c00878a8 | |||
| 992686a5a2 | |||
| 4cd9b70cf2 | |||
| 140d2bc226 | |||
| 5b2b39789d | |||
| 3c796aeefa | |||
| 2bcab0bbf1 | |||
| df41408ec9 | |||
| 9a2084c216 | |||
| 52844c8d75 | |||
| ad74579ee6 |
@@ -674,6 +674,9 @@ Friend Module CamAuto
|
||||
End If
|
||||
' Lo sposto dalla lavorazione al pezzo
|
||||
Dim nId As Integer = EgtGetFirstInGroup(nMchPvId)
|
||||
|
||||
If nId = GDB_ID.NULL Then Return False
|
||||
|
||||
While nId <> GDB_ID.NULL
|
||||
EgtRelocateGlob(nId, nPartPvId)
|
||||
nId = EgtGetFirstInGroup(nMchPvId)
|
||||
@@ -719,10 +722,12 @@ Friend Module CamAuto
|
||||
End Function
|
||||
|
||||
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 sMillMch As String = m_MainWindow.m_CurrentMachine.sCurrMilling
|
||||
Dim sDrillMch As String = m_MainWindow.m_CurrentMachine.sCurrDrilling
|
||||
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 sDripSawMch As String = If(bDripOk, m_MainWindow.m_CurrentMachine.sCurrDripSawing, "")
|
||||
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 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())
|
||||
EgtLuaSetGlobStringVar("CAM.MATERIAL", sMaterial)
|
||||
EgtLuaSetGlobStringVar("CAM.SAWMCH", sSawMch)
|
||||
EgtLuaSetGlobStringVar("CAM.MILLMCH", sMillMch)
|
||||
EgtLuaSetGlobStringVar("CAM.DRILLMCH", sDrillMch)
|
||||
EgtLuaSetGlobStringVar("CAM.POCKETMCH", sPocketMch)
|
||||
EgtLuaSetGlobStringVar("CAM.WATERJETMCH", sWaterJetMch)
|
||||
EgtLuaSetGlobStringVar("CAM.WATERJETQLTY", sWaterJetQual)
|
||||
EgtLuaSetGlobStringVar("CAM.DRIPSAWMCH", sDripSawMch)
|
||||
EgtLuaSetGlobStringVar("CAM.DRIPDRILLMCH", sDripDrillMch)
|
||||
EgtLuaSetGlobNumVar("CAM.REDUCEDDEPTH", dReducedDepth)
|
||||
|
||||
@@ -19,6 +19,14 @@ Friend Module CSVFile
|
||||
Public m_dDimX As Double = 0
|
||||
Public m_dDimY 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_nId As Integer = GDB_ID.NULL
|
||||
End Class
|
||||
@@ -62,6 +70,14 @@ Friend Module CSVFile
|
||||
EgtLuaGetGlobNumVar("CSV.DIMX" & sN, OnePart.m_dDimX)
|
||||
EgtLuaGetGlobNumVar("CSV.DIMY" & sN, OnePart.m_dDimY)
|
||||
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
|
||||
' inserisco in lista
|
||||
CsvPartList.Add(OnePart)
|
||||
@@ -147,6 +163,22 @@ Friend Module CSVFile
|
||||
StringToDouble(sItems(1), OnePart.m_dDimY)
|
||||
ElseIf sItems(0) = "Th" Then
|
||||
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
|
||||
StringToInt(sItems(1), OnePart.m_nOriInd)
|
||||
End If
|
||||
@@ -188,6 +220,14 @@ Friend Module CSVFile
|
||||
Writer.WriteLine("DX=" & DoubleToString(CurrPart.m_dDimX, 4))
|
||||
Writer.WriteLine("DY=" & DoubleToString(CurrPart.m_dDimY, 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())
|
||||
Next
|
||||
' Terminatore
|
||||
|
||||
+30
-1
@@ -424,10 +424,14 @@ Public Class CSVPage
|
||||
' Definizione variabili
|
||||
Dim dDimX = CurrPart.m_dDimX
|
||||
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
|
||||
Dim dTemp As Double = dDimX
|
||||
dDimX = dDimY
|
||||
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
|
||||
EgtLuaSetGlobNumVar("CMP.V1", dDimX)
|
||||
EgtLuaSetGlobNumVar("CMP.V2", dDimY)
|
||||
@@ -439,7 +443,7 @@ Public Class CSVPage
|
||||
If nId = GDB_ID.NULL Then Continue For
|
||||
CurrPart.m_nId = nId
|
||||
' 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)
|
||||
' Eventuale testo per indicare il sopra
|
||||
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)
|
||||
EgtSetColor(nText, New Color3d( 0, 0, 0))
|
||||
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
|
||||
EgtAdjustFlatPart(nId)
|
||||
' Se Csv completo, aggiungo info su CSV di origine
|
||||
|
||||
@@ -196,7 +196,7 @@ Public Class CadCutPageUC
|
||||
m_CurrProjPage.m_SceneButtons.MeasureBtn.IsChecked = False
|
||||
EgtDeselectObj(m_NestPage.m_CurrSelectedCurv)
|
||||
m_ProjectMgr.TestBtn.IsChecked = False
|
||||
m_CurrProjPage.m_bSelectCurv = False
|
||||
m_MainWindow.m_CadCutPageUC.m_NestPage.m_bSelectCurv = False
|
||||
Select Case m_CadCutMode
|
||||
Case CadCutModes.Nest, CadCutModes.FastGrid
|
||||
' Passo alla pagina Split
|
||||
|
||||
@@ -12,6 +12,8 @@ Public Class NestPageUC
|
||||
Friend m_bRegister As Boolean = False
|
||||
' Flag per pezzi selezionati in tavola o fuori
|
||||
Private m_nPartPos As Integer = PART_POS.NONE_TABLE
|
||||
' Flag per impostata per selezionare di una curva
|
||||
Friend m_bSelectCurv As Boolean = False
|
||||
|
||||
Friend m_CurrSelectedCurv As Integer = GDB_ID.NULL
|
||||
Friend m_CurrSelectedSawCurv As Integer = GDB_ID.NULL
|
||||
@@ -124,14 +126,16 @@ Public Class NestPageUC
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub OnMyMouseDownSceneSelCurv(sender As Object, e As System.Windows.Forms.MouseEventArgs) Handles m_CurrProjPage.OnMouseDownSceneSelCurv
|
||||
Private Sub OnMyMouseDownSceneSelCurv(sender As Object, e As System.Windows.Forms.MouseEventArgs)
|
||||
' Verifico di essere il gestore attivo e non in modalità registrazione
|
||||
If Not m_bActive Or m_bRegister Then Return
|
||||
' Si può selezionare solo con il tasto sinistro e se il bottone TEST Attivo
|
||||
If e.Button <> Windows.Forms.MouseButtons.Left Or
|
||||
Not m_CurrProjPage.m_bSelectCurv Then
|
||||
Not m_bSelectCurv Then
|
||||
Return
|
||||
End If
|
||||
' Se esiste un elemento selezionato
|
||||
EgtResetMark(m_CurrSelectedSawCurv)
|
||||
' provo a riconoscere il valore medio del segmento
|
||||
' Verifico se selezionato indicativo di pezzo
|
||||
EgtSetObjFilterForSelWin(False, True, False, False, False)
|
||||
@@ -164,6 +168,7 @@ Public Class NestPageUC
|
||||
m_CurrSelectedSawCurv = nIdSaw
|
||||
m_CurrSelectedCurv = nIdMy
|
||||
EgtSelectObj(nIdSaw)
|
||||
EgtSetMark(nIdSaw)
|
||||
EgtSelectObj(nIdMy)
|
||||
EgtDraw()
|
||||
Exit While
|
||||
@@ -184,6 +189,12 @@ Public Class NestPageUC
|
||||
Not m_CurrProjPage.CurrentProjectScene.IsStatusNull() Then
|
||||
Return
|
||||
End If
|
||||
' se in modalità slezione tagli
|
||||
If m_bSelectCurv Then
|
||||
OnMyMouseDownSceneSelCurv(sender, e)
|
||||
Return
|
||||
End If
|
||||
|
||||
' Per default no drag
|
||||
m_bDrag = False
|
||||
' Verifico se selezionato indicativo di pezzo
|
||||
@@ -402,6 +413,8 @@ Public Class NestPageUC
|
||||
Private Sub OnMyMouseUpScene(sender As Object, e As System.Windows.Forms.MouseEventArgs) Handles m_CurrProjPage.OnMouseUpScene
|
||||
' Verifico di essere il gestore attivo
|
||||
If Not m_bActive Then Return
|
||||
' verifico che non sia attivo il comando Test
|
||||
If m_bSelectCurv Then Return
|
||||
' Se eseguito drag
|
||||
If Not m_bDragToStart Then
|
||||
' Se movimento con sola verifica finale
|
||||
@@ -1168,7 +1181,7 @@ Public Class NestPageUC
|
||||
nLayId = EgtGetNextName(nLayId, NAME_INLOOP)
|
||||
End While
|
||||
' 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)
|
||||
For Each nEnt As Integer In vEnt
|
||||
' Se aggiornamento vietato, vado oltre
|
||||
@@ -1194,12 +1207,14 @@ Public Class NestPageUC
|
||||
EgtSetInfo(nEnt, INFO_OFFSET2, 0)
|
||||
End If
|
||||
EgtSetInfo(nEnt, INFO_DEPTH2, (dTh - dHeel) + AGG_DEPTH)
|
||||
EgtSetInfo(nEnt, INFO_AGG2, AGG_DEPTH)
|
||||
' altrimenti, tallone superiore a spessore -> non c'è taglio inclinato
|
||||
Else
|
||||
EgtSetInfo(nEnt, INFO_SIDE_ANGLE, 0.0)
|
||||
EgtSetInfo(nEnt, INFO_SIDE_ANGLE2, 0.0)
|
||||
EgtRemoveInfo(nEnt, INFO_OFFSET2)
|
||||
EgtRemoveInfo(nEnt, INFO_DEPTH2)
|
||||
EgtRemoveInfo(nEnt, INFO_AGG2)
|
||||
End If
|
||||
' Inclinazione interna
|
||||
Else
|
||||
@@ -1208,12 +1223,14 @@ Public Class NestPageUC
|
||||
EgtSetInfo(nEnt, INFO_OFFSET, dHeel * Math.Tan(-dSideAng * Math.PI / 180))
|
||||
EgtSetInfo(nEnt, INFO_SIDE_ANGLE2, 0.0)
|
||||
EgtSetInfo(nEnt, INFO_DEPTH2, dHeel + AGG_DEPTH)
|
||||
EgtSetInfo(nEnt, INFO_AGG2, AGG_DEPTH)
|
||||
' altrimenti, tallone superiore a spessore -> non c'è taglio inclinato
|
||||
Else
|
||||
EgtSetInfo(nEnt, INFO_SIDE_ANGLE, 0.0)
|
||||
EgtRemoveInfo(nEnt, INFO_OFFSET)
|
||||
EgtRemoveInfo(nEnt, INFO_SIDE_ANGLE2)
|
||||
EgtRemoveInfo(nEnt, INFO_DEPTH2)
|
||||
EgtRemoveInfo(nEnt, INFO_AGG2)
|
||||
End If
|
||||
End If
|
||||
' Se altrimenti inclinazione esterna
|
||||
|
||||
@@ -166,6 +166,17 @@ Public Module SplitAuto
|
||||
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)
|
||||
EgtDisableModified()
|
||||
' Assegno stato
|
||||
|
||||
+428
-78
@@ -6,6 +6,9 @@ Public Class SplitPageUC
|
||||
|
||||
' Riferimento alla 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)
|
||||
Private m_bByHand As Boolean = True
|
||||
' Abilitazione movimento finale pezzi su tavola ausiliaria
|
||||
@@ -13,6 +16,16 @@ Public Class SplitPageUC
|
||||
' Stato
|
||||
Private m_nCurrPhase As Integer = 0
|
||||
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_CurrInd As Integer = -1
|
||||
'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_bToNext 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)
|
||||
PrevBtn.IsEnabled = False
|
||||
@@ -53,6 +73,10 @@ Public Class SplitPageUC
|
||||
End Sub
|
||||
|
||||
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
|
||||
m_bByHand = (EgtGetHeadId(VACUUM_HEAD) = GDB_ID.NULL Or
|
||||
Not m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.AUTO_MANIP) Or
|
||||
@@ -79,7 +103,7 @@ Public Class SplitPageUC
|
||||
If Not m_bShow Then
|
||||
If m_MainWindow.m_CurrentMachine.WaterJettingActive Then ResetAllMachinings()
|
||||
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()
|
||||
If bModif Then m_MainWindow.m_CurrentProjectPageUC.SetWarningMessage(EgtMsg(90321)) 'Ridotte alcune lavorazioni per evitare interferenze
|
||||
End If
|
||||
@@ -97,12 +121,18 @@ Public Class SplitPageUC
|
||||
ShowOnePhaseMachiningPreview(m_nCurrPhase)
|
||||
' Preparo la lista delle lavorazioni
|
||||
CalculateSplitMachList(m_nCurrPhase, m_MachiningList)
|
||||
' azzero i contatori delle lavorazioni
|
||||
m_nCountSawing = 0
|
||||
m_nCountWaterjetting = 0
|
||||
m_nCountOtherMachining = 0
|
||||
' Aggiorno visualizzazione delle lavorazioni
|
||||
For nI As Integer = 0 To m_MachiningList.Count() - 1
|
||||
' sistemo colore
|
||||
ColorMachining(m_MachiningList(nI))
|
||||
' assegno numerazione
|
||||
NumberDirectionMachining(nI)
|
||||
' conto il numero di tipi di lavorazioni
|
||||
CountMachiningType(m_MachiningList(nI), m_nCountSawing, m_nCountWaterjetting, m_nCountOtherMachining)
|
||||
Next
|
||||
' Preparo la lista degli Item
|
||||
ShowMachiningList()
|
||||
@@ -138,33 +168,222 @@ Public Class SplitPageUC
|
||||
Dim sText As String = String.Empty
|
||||
If Math.Abs(Mach.m_dSideAng) < EPS_ANG_SMALL Then
|
||||
sText = EgtMsg(90791) & " " & i.ToString()
|
||||
If Mach.m_sLay = NAME_ONPATH Then AddTopText( sText)
|
||||
If Mach.m_sLay = NAME_ONPATH Then AddTopText(sText)
|
||||
Else
|
||||
sText = EgtMsg(90791) & " " & i.ToString() & " " & DoubleToString( Mach.m_dSideAng, 2) & "°"
|
||||
sText = EgtMsg(90791) & " " & i.ToString() & " " & DoubleToString(Mach.m_dSideAng, 2) & "°"
|
||||
End If
|
||||
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
|
||||
Dim sText As String = EgtMsg(90792) & " " & i.ToString()
|
||||
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
|
||||
Dim sText As String = EgtMsg(90793) & " " & i.ToString()
|
||||
If Mach.m_sLay = NAME_ONPATH Then AddTopText( sText)
|
||||
If Mach.m_bPause Then AddPauseText( sText)
|
||||
m_ItemList.Add(New NameIdLsBxItem(sText, i - 1, Mach.m_bEnabled))
|
||||
If Mach.m_sLay = NAME_ONPATH Then AddTopText(sText)
|
||||
If Mach.m_bPause Then AddPauseText(sText)
|
||||
m_ItemList.Add(New NameIdLsBxItem(sText, i - 1, Mach.m_bEnabled, MCH_OY.MILLING))
|
||||
ElseIf Mach.m_nType = MCH_OY.POCKETING Then ' Svuotatura
|
||||
Dim sText As String = EgtMsg(90796) & " " & i.ToString()
|
||||
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
|
||||
Dim sText As String = EgtMsg(90797) & " " & i.ToString()
|
||||
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
|
||||
Next
|
||||
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)
|
||||
sName &= " " & EgtMsg(MSG_SPLITPAGEUC + 32) ' Pausa
|
||||
End Sub
|
||||
@@ -180,11 +399,16 @@ Public Class SplitPageUC
|
||||
|
||||
Private Sub MachiningLsBx_SelectionChanged(sender As Object, e As SelectionChangedEventArgs) Handles MachiningLsBx.SelectionChanged
|
||||
If MachiningLsBx.SelectedItems.Count = 0 Then Return
|
||||
If MachiningLsBx.SelectedItems.Count = 1 Then m_bAreHomogeneous = True
|
||||
' creo lista ordinata dei selezionati
|
||||
Dim ItemList As New List(Of NameIdLsBxItem)
|
||||
For Each Item As NameIdLsBxItem In MachiningLsBx.SelectedItems
|
||||
ItemList.Add(Item)
|
||||
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)))
|
||||
' verifico che siano contigui
|
||||
Dim bContigus As Boolean = False
|
||||
@@ -287,8 +511,14 @@ Public Class SplitPageUC
|
||||
EgtDraw()
|
||||
' Imposto flag di modifica
|
||||
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
|
||||
|
||||
Private Sub AllOnBtn_Click(sender As Object, e As RoutedEventArgs) Handles AllOnBtn.Click
|
||||
@@ -772,26 +1002,37 @@ Public Class SplitPageUC
|
||||
bFirstInd = False
|
||||
End If
|
||||
' ------------------ 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
|
||||
EgtVerifyMachining(m_MachiningList(nI).m_nId, m_MachiningList(nI).m_nInterf)
|
||||
ColorMachining(m_MachiningList(nI))
|
||||
@@ -903,7 +1144,7 @@ Public Class SplitPageUC
|
||||
' Recupero la lavorazione corrente
|
||||
If m_CurrFirstInd = -1 Then Return
|
||||
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 nOperId As Integer = m_MachiningList(nI).m_nId
|
||||
Dim nMachiningType As Integer = EgtGetOperationType(nOperId)
|
||||
@@ -924,26 +1165,38 @@ Public Class SplitPageUC
|
||||
bFirstInd = False
|
||||
End If
|
||||
' ------------------ 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.ENDADDLEN, dOrigUeal)
|
||||
EgtSetInfo(nOperId, INFO_MCH_USER_EAL, 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
|
||||
EgtVerifyMachining(m_MachiningList(nI).m_nId, m_MachiningList(nI).m_nInterf)
|
||||
ColorMachining(m_MachiningList(nI))
|
||||
@@ -1027,40 +1280,40 @@ Public Class SplitPageUC
|
||||
For Index As Integer = m_CurrFirstInd To m_CurrLastInd
|
||||
Dim nI As Integer = m_ItemList(Index).Ind
|
||||
' Si possono invertire solo i tagli di lama
|
||||
If m_MachiningList( nI).m_nType <> MCH_OY.SAWING Then Continue For
|
||||
If m_MachiningList(nI).m_nType <> MCH_OY.SAWING Then Continue For
|
||||
' 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
|
||||
If m_MachiningList( nI).m_bEnableInvert Then
|
||||
If m_MachiningList(nI).m_bEnableInvert Then
|
||||
' Inverto e disabilito inversione automatica
|
||||
If CamAuto.InvertVerticalCut( m_MachiningList( nI).m_nId) Then
|
||||
m_MachiningList( nI).m_bInvert = True
|
||||
m_MachiningList( nI).m_vtDir = - m_MachiningList( nI).m_vtDir
|
||||
m_MachiningList( nI).m_bEnableInvert = False
|
||||
SwapStartEndData( nI)
|
||||
ResetEnableInvert( m_MachiningList( nI).m_nEntId)
|
||||
EgtErase( m_MachiningList( nI).m_nArrId)
|
||||
NumberDirectionMachining( nI, False)
|
||||
If CamAuto.InvertVerticalCut(m_MachiningList(nI).m_nId) Then
|
||||
m_MachiningList(nI).m_bInvert = True
|
||||
m_MachiningList(nI).m_vtDir = -m_MachiningList(nI).m_vtDir
|
||||
m_MachiningList(nI).m_bEnableInvert = False
|
||||
SwapStartEndData(nI)
|
||||
ResetEnableInvert(m_MachiningList(nI).m_nEntId)
|
||||
EgtErase(m_MachiningList(nI).m_nArrId)
|
||||
NumberDirectionMachining(nI, False)
|
||||
EgtDraw()
|
||||
End If
|
||||
' se altrimenti disabilitata inversione automatica e invertito
|
||||
ElseIf m_MachiningList( nI).m_bInvert Then
|
||||
' se altrimenti disabilitata inversione automatica e invertito
|
||||
ElseIf m_MachiningList(nI).m_bInvert Then
|
||||
' Tolgo inversione e lascio disabilitazione inv. autom.
|
||||
If CamAuto.InvertVerticalCut( m_MachiningList( nI).m_nId) Then
|
||||
m_MachiningList( nI).m_bInvert = False
|
||||
m_MachiningList( nI).m_vtDir = - m_MachiningList( nI).m_vtDir
|
||||
SwapStartEndData( nI)
|
||||
EgtErase( m_MachiningList( nI).m_nArrId)
|
||||
NumberDirectionMachining( nI, False)
|
||||
If CamAuto.InvertVerticalCut(m_MachiningList(nI).m_nId) Then
|
||||
m_MachiningList(nI).m_bInvert = False
|
||||
m_MachiningList(nI).m_vtDir = -m_MachiningList(nI).m_vtDir
|
||||
SwapStartEndData(nI)
|
||||
EgtErase(m_MachiningList(nI).m_nArrId)
|
||||
NumberDirectionMachining(nI, False)
|
||||
EgtDraw()
|
||||
End If
|
||||
' altrimenti disabilitata inversione automatica e non invertito
|
||||
' altrimenti disabilitata inversione automatica e non invertito
|
||||
Else
|
||||
' Abilito inversione automatica e lascio non invertito
|
||||
m_MachiningList( nI).m_bEnableInvert = True
|
||||
SetEnableInvert( m_MachiningList( nI).m_nEntId)
|
||||
EgtErase( m_MachiningList( nI).m_nArrId)
|
||||
NumberDirectionMachining( nI, False)
|
||||
m_MachiningList(nI).m_bEnableInvert = True
|
||||
SetEnableInvert(m_MachiningList(nI).m_nEntId)
|
||||
EgtErase(m_MachiningList(nI).m_nArrId)
|
||||
NumberDirectionMachining(nI, False)
|
||||
EgtDraw()
|
||||
End If
|
||||
Next
|
||||
@@ -1122,7 +1375,7 @@ Public Class SplitPageUC
|
||||
' Se fase corrente è la prima, imposto partenza normale
|
||||
If m_nCurrPhase = 1 Then
|
||||
m_MainWindow.m_CurrentProjectPageUC.ResetProjectNcRestart()
|
||||
' Altrimenti, imposto la ripartenza dalla fase corrente
|
||||
' Altrimenti, imposto la ripartenza dalla fase corrente
|
||||
Else
|
||||
m_MainWindow.m_CurrentProjectPageUC.SetProjectNcRestart(m_nCurrPhase)
|
||||
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)
|
||||
If m_MainWindow.m_CurrentMachine.WaterJettingActive Then ResetAllMachinings()
|
||||
m_MainWindow.m_CurrentProjectPageUC.SetOrderMachiningFlag()
|
||||
If m_MainWindow.m_CurrentMachine.WaterJettingActive Then
|
||||
If m_MainWindow.m_CurrentMachine.WaterJettingActive Then
|
||||
Dim bModif As Boolean = TestAllMachiningsForStrict()
|
||||
If bModif Then m_MainWindow.m_CurrentProjectPageUC.SetWarningMessage(EgtMsg(90321)) 'Ridotte alcune lavorazioni per evitare interferenze
|
||||
End If
|
||||
@@ -1151,8 +1404,13 @@ Public Class SplitPageUC
|
||||
HideAllMachinings()
|
||||
' Preparo la lista delle lavorazioni e le disabilito
|
||||
CalculateSplitMachList(m_nCurrPhase, m_MachiningList)
|
||||
m_nCountSawing = 0
|
||||
m_nCountWaterjetting = 0
|
||||
m_nCountOtherMachining = 0
|
||||
For nI As Integer = 0 To m_MachiningList.Count() - 1
|
||||
m_MachiningList(nI).m_bEnabled = False
|
||||
' conto il numero di tipi di lavorazioni
|
||||
CountMachiningType(m_MachiningList(nI), m_nCountSawing, m_nCountWaterjetting, m_nCountOtherMachining)
|
||||
Next
|
||||
' Aggiorno visualizzazione delle lavorazioni
|
||||
EgtEmptyGroup(m_nNbrGrpId)
|
||||
@@ -1171,6 +1429,7 @@ Public Class SplitPageUC
|
||||
End Sub
|
||||
|
||||
Private Sub SplitPageUC_Unloaded(sender As Object, e As EventArgs) Handles Me.Unloaded
|
||||
m_bActive = False
|
||||
m_MainWindow.m_CurrentProjectPageUC.ClearMessage()
|
||||
ExitSplit(Not m_bToNext)
|
||||
EgtDraw()
|
||||
@@ -1338,6 +1597,86 @@ Public Class SplitPageUC
|
||||
ModifEndBtn.IsEnabled = Not m_bShow
|
||||
InvertBtn.IsEnabled = Not m_bShow
|
||||
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
|
||||
|
||||
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_sName As String
|
||||
Private m_bIsActive As Boolean
|
||||
Private m_nType As Integer
|
||||
|
||||
Public Property Ind As Integer
|
||||
Get
|
||||
@@ -1606,10 +1946,20 @@ Public Class SplitPageUC
|
||||
End Set
|
||||
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_nInd = Ind
|
||||
Me.m_bIsActive = bIsActive
|
||||
Me.m_nType = nType
|
||||
End Sub
|
||||
|
||||
Public Sub NotifyPropertyChanged(propName As String)
|
||||
|
||||
@@ -67,6 +67,8 @@ Module ConstGen
|
||||
Public Const MACHININGS_DIR As String = "Machinings"
|
||||
' Nome file Dati delle lucidature
|
||||
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
|
||||
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_WIDTH As String = "Width"
|
||||
Public Const INFO_DEPTH2 As String = "Depth2"
|
||||
Public CONST INFO_AGG2 As String = "Agg2"
|
||||
' Info in entità da tagliare per taglio ristretto
|
||||
Public Const INFO_STRICT As String = "Strict"
|
||||
' Info in entità da tagliare per angolo di lato e tallone
|
||||
|
||||
@@ -37,6 +37,7 @@
|
||||
Public Const K_PATH_HMI As String = "PathHmi"
|
||||
Public Const K_USENEWMDI As String = "UseNewMDI"
|
||||
Public Const K_ISSIEMENSONE As String = "IsSiemensOne"
|
||||
Public Const K_ISACTIVEMODESUBSCR As String = "IsActiveModeSubscr"
|
||||
Public Const K_DBVARPATH As String = "DBVarPath"
|
||||
Public Const K_NEWWRITECNCMODE As String = "NewWriteCNCMode"
|
||||
|
||||
@@ -208,6 +209,7 @@
|
||||
Public Const K_MACH_CUTFSEVENABLE As String = "CutFsevEnable"
|
||||
Public Const K_MACH_CUTFSEVLEN As String = "CutFsevLen"
|
||||
Public Const K_MACH_CUTFSEVPERC As String = "CutFsevPerc"
|
||||
Public Const K_USELASERORIGIN As String = "UseLaserOrigin"
|
||||
' DrillMillC90
|
||||
' CutLongDxSx
|
||||
' AngRotMultiCut
|
||||
@@ -275,9 +277,11 @@
|
||||
Public Const K_CURRDRIPSAWING As String = "CurrDripSawing"
|
||||
Public Const K_CURRDRIPDRILLING As String = "CurrDripDrilling"
|
||||
Public Const K_CURRWATERJETTING As String = "CurrWaterJetting"
|
||||
Public Const K_CURRWATERJETTINGQUALITY As String = "CurrWaterJettingQualilty"
|
||||
|
||||
Public Const S_MATERIALS As String = "Materials"
|
||||
Public Const K_CURRMATERIAL As String = "CurrMaterial"
|
||||
Public Const K_MATERIAL As String = "Material"
|
||||
Public Const K_FROMDBWATERJET As String = "FromDBWaterJet"
|
||||
|
||||
End Module
|
||||
|
||||
@@ -133,25 +133,6 @@ Public Class DirectCutPageUC
|
||||
' leggo il numero di assi attivi nella macchina
|
||||
Dim AxesNumber = GetPrivateProfileInt(S_AXES, K_AXESNUM, 5, m_MainWindow.GetMachIniFile())
|
||||
|
||||
'' leggo se è stata configurata la nuova conole
|
||||
'If GetPrivateProfileInt(S_NCDATA, K_NEWCONSOLE, 0, m_MainWindow.GetMachIniFile()) = 1 And Not bCollapsedNewBottonsConsole Then
|
||||
' XYBtn.Content = "X - Y"
|
||||
' XYBtn.Foreground = Brushes.White
|
||||
' ZCBtn.Content = "Z - C"
|
||||
' ZCBtn.Foreground = Brushes.White
|
||||
' If AxesNumber < 5 Then
|
||||
' ZBBtn.Visibility = Windows.Visibility.Collapsed
|
||||
' End If
|
||||
' ZBBtn.Content = "Z - B"
|
||||
' ZBBtn.Foreground = Brushes.White
|
||||
' RemoteBtn.Content = "Remote"
|
||||
' RemoteBtn.Foreground = Brushes.White
|
||||
'Else
|
||||
' XYBtn.Visibility = Windows.Visibility.Collapsed
|
||||
' ZCBtn.Visibility = Windows.Visibility.Collapsed
|
||||
' ZBBtn.Visibility = Windows.Visibility.Collapsed
|
||||
'End If
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub DirectCutPage_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded
|
||||
@@ -228,8 +209,12 @@ Public Class DirectCutPageUC
|
||||
' Se macchina fotografica abilitata
|
||||
PhotoBtn.IsEnabled = m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.MAN_PHOTO)
|
||||
|
||||
' Attivo le lavorazioni solo se esiste il grezzo
|
||||
' Attivo le lavorazioni solo se esiste il grezzo e se presente testa H1
|
||||
Dim bRawOk As Boolean = (GetRawHeight() > EPS_SMALL)
|
||||
Dim bH1Exists As Boolean = (EgtGetHeadId("H1") <> GDB_ID.NULL)
|
||||
|
||||
ManualBtn.IsEnabled = bH1Exists
|
||||
' sviluppo rimasto in sospeso
|
||||
If m_bManulaCut Then
|
||||
' anche se non è presente un grezzo mantengo abilitato il bottone
|
||||
SingleCutBtn.IsEnabled = True
|
||||
@@ -238,10 +223,14 @@ Public Class DirectCutPageUC
|
||||
End If
|
||||
MultipleCutBtn.IsEnabled = bRawOk
|
||||
GridCutBtn.IsEnabled = bRawOk
|
||||
SingleDrillBtn.IsEnabled = bRawOk
|
||||
FlatteningCutBtn.IsEnabled = bRawOk
|
||||
SingleDrillBtn.IsEnabled = (bRawOk And bH1Exists)
|
||||
FlatteningCutBtn.IsEnabled = (bRawOk And bH1Exists)
|
||||
PolishingBtn.IsEnabled = (bRawOk And m_MainWindow.m_CurrentMachine.bPolishing)
|
||||
SawTestBtn.IsEnabled = bRawOk
|
||||
SawTestBtn.IsEnabled = (bRawOk And bH1Exists)
|
||||
CopyTemplateBtn.IsEnabled = bH1Exists
|
||||
|
||||
' aggiorno la visualizzazione dei parametri
|
||||
ReloadParam()
|
||||
|
||||
' Nascondo i pezzi in parcheggio
|
||||
HideParkedParts()
|
||||
@@ -249,6 +238,20 @@ Public Class DirectCutPageUC
|
||||
|
||||
End Sub
|
||||
|
||||
Public Sub ReloadParam()
|
||||
Dim sCurrSawing As String = m_MainWindow.m_CurrentMachine.sCurrSawing
|
||||
Dim sCurrSaw As String = m_MainWindow.m_CurrentMachine.sCurrSaw
|
||||
Dim bSaw As Boolean = False
|
||||
|
||||
' se esiste una lavorazione di lama corrente vuol dire che deve essere preferita
|
||||
If Not String.IsNullOrEmpty(sCurrSaw) And Not String.IsNullOrEmpty(sCurrSawing) Then
|
||||
bSaw = EgtSetCalcTool(sCurrSaw, "H1", 1)
|
||||
End If
|
||||
m_SingleCut.SetEnableParam(bSaw)
|
||||
m_MultipleCut.SetEnableParam(bSaw)
|
||||
m_GridCut.SetEnableParam(bSaw)
|
||||
End Sub
|
||||
|
||||
Private Sub SetVisibilityJogButtuns()
|
||||
XYBtn.Visibility = Visibility.Collapsed
|
||||
ZCBtn.Visibility = Visibility.Collapsed
|
||||
|
||||
@@ -444,8 +444,8 @@ Public Class FlatteningCut
|
||||
StringToLen(WidthTxBx.Text, dWidth)
|
||||
' Recupero lo spessore della lama corrente
|
||||
EgtTdbSetCurrTool(m_MainWindow.m_CurrentMachine.sCurrSaw)
|
||||
Dim dThick As Double = 0
|
||||
EgtTdbGetCurrToolParam(MCH_TP.THICK, dThick)
|
||||
Dim dThick As Double = GetFootPrintTool()
|
||||
'EgtTdbGetCurrToolParam(MCH_TP.THICK, dThick)
|
||||
' La larghezza della spianatura nono può essere inferiore allo spessore della lama
|
||||
m_dWid = Math.Max(dWidth, dThick)
|
||||
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
|
||||
' Recupero spessore della lama correntemente attiva
|
||||
Dim dThick As Double = 0
|
||||
EgtTdbGetCurrToolParam(MCH_TP.THICK, dThick)
|
||||
Dim dThick As Double = GetFootPrintTool()
|
||||
'EgtTdbGetCurrToolParam(MCH_TP.THICK, dThick)
|
||||
' Verifico che la sovrapposizione non sia superiore allo spessore della lama (meno 1mm di offset)
|
||||
Dim dOverlap As Double = 0
|
||||
Const MIN_OFFSET As Double = 1.0
|
||||
@@ -612,6 +612,22 @@ Public Class FlatteningCut
|
||||
m_MainWindow.m_DirectCutPageUC.LeftButtonGrid.Children.Remove(Me)
|
||||
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
|
||||
' Verifico sia definito il punto iniziale e il grezzo
|
||||
If Not m_bPointP1Ok Or Not m_bRawOk Then
|
||||
@@ -670,22 +686,21 @@ Public Class FlatteningCut
|
||||
RemoveFinalHome()
|
||||
End If
|
||||
UpdateSimulOkBtn()
|
||||
|
||||
|
||||
|
||||
Return m_bCutOk
|
||||
End Function
|
||||
|
||||
Private Function MultiplyCut(nLayerId As Integer, nCutId As Integer) As Boolean
|
||||
' Recupero spessore della lama correntemente attiva
|
||||
Dim dThick As Double = 0
|
||||
EgtTdbGetCurrToolParam(MCH_TP.THICK, dThick)
|
||||
' Recupero spessore della lama (utensile) correntemente attiva
|
||||
Dim dThick As Double = GetFootPrintTool()
|
||||
If dThick = 0 Then Return False
|
||||
|
||||
' Imposto angolo di rotazione a seconda del lato dei tagli
|
||||
Dim dRotAngO As Double = If(SideChBx.IsChecked(), -90, 90)
|
||||
' Definisco vettore di spostamento
|
||||
Dim vtDelta As Vector3d
|
||||
vtDelta = Vector3d.FromPolar(1, m_dAngO)
|
||||
vtDelta.Rotate(Vector3d.Z_AX, dRotAngO)
|
||||
|
||||
' Calcolo numero di iterazioni necessarie a coprire l'area impostata e lunghezza vettore delta
|
||||
Dim nStepNum As Integer
|
||||
Dim dDelta As Double
|
||||
|
||||
+30
-16
@@ -152,6 +152,7 @@ Public Class GridCut
|
||||
EgtDraw()
|
||||
End Sub
|
||||
|
||||
|
||||
Friend Sub GridCut_Unloaded(sender As Object, e As RoutedEventArgs) Handles Me.Unloaded
|
||||
' Salvo i dati correnti
|
||||
WritePrivateProfileString( S_DIRECTCUTS, K_DC_GRID_DEPTH, DoubleToString( m_dDepth, 2), m_MainWindow.GetIniFile())
|
||||
@@ -185,6 +186,11 @@ Public Class GridCut
|
||||
m_bActive = False
|
||||
End Sub
|
||||
|
||||
Public Sub SetEnableParam(ByVal bIsSaw As Boolean)
|
||||
' se macchina solo WaterJet Disabilito/Nascondo parametri della lama
|
||||
DepthTxBx.IsEnabled = bIsSaw
|
||||
End Sub
|
||||
|
||||
Private Sub UpdateSimulOkBtn()
|
||||
If m_bCutOk Then
|
||||
SimulBtn.IsEnabled = True
|
||||
@@ -242,6 +248,12 @@ Public Class GridCut
|
||||
' Verifico configurazione tavola e grezzo
|
||||
If Not m_bRawOk Then Return
|
||||
|
||||
' Recupero dati utensile e testa corrente
|
||||
Dim sTool As String = ""
|
||||
Dim sHead As String = ""
|
||||
Dim nExit As Integer = 0
|
||||
EgtGetCalcTool(sTool, sHead, nExit)
|
||||
|
||||
' Se acquisizone lama o laser
|
||||
If PointModeCmBx.SelectedIndex = PT_MODE.SAW Or PointModeCmBx.SelectedIndex = PT_MODE.LASER Then
|
||||
|
||||
@@ -256,12 +268,12 @@ Public Class GridCut
|
||||
If Not EgtSetCalcTool("", "H3", 1) Then Return
|
||||
' Trasformo in posizione punta utensile in basso
|
||||
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, dR1, dR2, True, m_ptTipP1) Then Return
|
||||
' Ora imposto la lama corrente
|
||||
If Not EgtSetCalcTool(sSaw, "H1", 1) Then Return
|
||||
' Reimposto eventuale precedente utensile
|
||||
EgtSetCalcTool(sTool, sHead, nExit)
|
||||
' Altrimenti da lama
|
||||
Else
|
||||
' Imposto la lama corrente
|
||||
If Not EgtSetCalcTool(sSaw, "H1", 1) Then Return
|
||||
' Reimposto eventuale precedente utensile
|
||||
EgtSetCalcTool(sTool, sHead, nExit)
|
||||
' Trasformo in posizione punta utensile in basso
|
||||
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, dR1, dR2, True, m_ptTipP1) Then Return
|
||||
End If
|
||||
@@ -285,10 +297,8 @@ Public Class GridCut
|
||||
' Porto il tip nell'origine tavola
|
||||
m_ptTipP1.ToLoc(New Frame3d(m_ptTabOri))
|
||||
m_bPointP1Ok = True
|
||||
' Ricavo dati lama corrente
|
||||
Dim sSaw As String = m_MainWindow.m_CurrentMachine.sCurrSaw
|
||||
' Imposto la lama corrente
|
||||
If Not EgtSetCalcTool(sSaw, "H1", 1) Then Return
|
||||
' Reimposto eventuale precedente utensile
|
||||
EgtSetCalcTool(sTool, sHead, nExit)
|
||||
End If
|
||||
|
||||
' Disegno il taglio
|
||||
@@ -317,6 +327,12 @@ Public Class GridCut
|
||||
' Verifico configurazione tavola e grezzo
|
||||
If Not m_bRawOk Then Return
|
||||
|
||||
' Recupero dati utensile e testa corrente
|
||||
Dim sTool As String = ""
|
||||
Dim sHead As String = ""
|
||||
Dim nExit As Integer = 0
|
||||
EgtGetCalcTool(sTool, sHead, nExit)
|
||||
|
||||
' Se acquisizone lama o laser
|
||||
If PointModeCmBx.SelectedIndex = PT_MODE.SAW Or PointModeCmBx.SelectedIndex = PT_MODE.LASER Then
|
||||
|
||||
@@ -331,12 +347,12 @@ Public Class GridCut
|
||||
If Not EgtSetCalcTool("", "H3", 1) Then Return
|
||||
' Trasformo in posizione punta utensile in basso
|
||||
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, dR1, dR2, True, m_ptTipP2) Then Return
|
||||
' Ora imposto la lama corrente
|
||||
If Not EgtSetCalcTool(sSaw, "H1", 1) Then Return
|
||||
' Reimposto eventuale precedente utensile
|
||||
EgtSetCalcTool(sTool, sHead, nExit)
|
||||
' Altrimenti da lama
|
||||
Else
|
||||
' Imposto la lama corrente
|
||||
If Not EgtSetCalcTool(sSaw, "H1", 1) Then Return
|
||||
' Reimposto eventuale precedente utensile
|
||||
EgtSetCalcTool(sTool, sHead, nExit)
|
||||
' Trasformo in posizione punta utensile in basso
|
||||
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, dR1, dR2, True, m_ptTipP2) Then Return
|
||||
End If
|
||||
@@ -358,10 +374,8 @@ Public Class GridCut
|
||||
' Porto il tip nell'origine tavola
|
||||
m_ptTipP2.ToLoc(New Frame3d(m_ptTabOri))
|
||||
m_bPointP2Ok = True
|
||||
' Ricavo dati lama corrente
|
||||
Dim sSaw As String = m_MainWindow.m_CurrentMachine.sCurrSaw
|
||||
' Imposto la lama corrente
|
||||
If Not EgtSetCalcTool(sSaw, "H1", 1) Then Return
|
||||
' Reimposto eventuale precedente utensile
|
||||
EgtSetCalcTool(sTool, sHead, nExit)
|
||||
End If
|
||||
|
||||
' Se il secondo punto non coincide con il primo, disegno il taglio
|
||||
|
||||
@@ -213,6 +213,10 @@ Public Class MultipleCut
|
||||
m_bActive = False
|
||||
End Sub
|
||||
|
||||
Public Sub SetEnableParam(ByVal bIsSaw As Boolean)
|
||||
DepthTxBx.IsEnabled = bIsSaw
|
||||
End Sub
|
||||
|
||||
Private Sub UpdateSimulOkBtn()
|
||||
If m_bCutOk Then
|
||||
SimulBtn.IsEnabled = True
|
||||
@@ -270,6 +274,12 @@ Public Class MultipleCut
|
||||
' Verifico configurazione tavola e grezzo
|
||||
If Not m_bRawOk Then Return
|
||||
|
||||
' Recupero dati utensile e testa corrente
|
||||
Dim sTool As String = ""
|
||||
Dim sHead As String = ""
|
||||
Dim nExit As Integer = 0
|
||||
EgtGetCalcTool(sTool, sHead, nExit)
|
||||
|
||||
' Se acquisizone lama o laser
|
||||
If PointModeCmBx.SelectedIndex = PT_MODE.SAW Or PointModeCmBx.SelectedIndex = PT_MODE.LASER Then
|
||||
|
||||
@@ -284,12 +294,14 @@ Public Class MultipleCut
|
||||
If Not EgtSetCalcTool("", "H3", 1) Then Return
|
||||
' Trasformo in posizione punta utensile in basso
|
||||
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, dR1, dR2, True, m_ptTipP1) Then Return
|
||||
' Ora imposto la lama corrente
|
||||
If Not EgtSetCalcTool(sSaw, "H1", 1) Then Return
|
||||
' Altrimenti da lama
|
||||
' Reimposto eventuale precedente utensile
|
||||
EgtSetCalcTool(sTool, sHead, nExit)
|
||||
|
||||
' Altrimenti da lama
|
||||
Else
|
||||
' Imposto la lama corrente
|
||||
If Not EgtSetCalcTool(sSaw, "H1", 1) Then Return
|
||||
' Reimposto eventuale precedente utensile
|
||||
EgtSetCalcTool(sTool, sHead, nExit)
|
||||
|
||||
' Trasformo in posizione punta utensile in basso
|
||||
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, dR1, dR2, True, m_ptTipP1) Then Return
|
||||
End If
|
||||
@@ -312,10 +324,9 @@ Public Class MultipleCut
|
||||
' Porto il tip nell'origine tavola
|
||||
m_ptTipP1.ToLoc(New Frame3d(m_ptTabOri))
|
||||
m_bPointP1Ok = True
|
||||
' Ricavo dati lama corrente
|
||||
Dim sSaw As String = m_MainWindow.m_CurrentMachine.sCurrSaw
|
||||
' Imposto la lama corrente
|
||||
If Not EgtSetCalcTool(sSaw, "H1", 1) Then Return
|
||||
' Reimposto eventuale precedente utensile
|
||||
EgtSetCalcTool(sTool, sHead, nExit)
|
||||
|
||||
End If
|
||||
' Disegno il taglio
|
||||
CreateMultipleCut()
|
||||
@@ -343,6 +354,12 @@ Public Class MultipleCut
|
||||
' Verifico configurazione tavola e grezzo
|
||||
If Not m_bRawOk Then Return
|
||||
|
||||
' Recupero dati utensile e testa corrente
|
||||
Dim sTool As String = ""
|
||||
Dim sHead As String = ""
|
||||
Dim nExit As Integer = 0
|
||||
EgtGetCalcTool(sTool, sHead, nExit)
|
||||
|
||||
' Se acquisizone lama o laser
|
||||
If PointModeCmBx.SelectedIndex = PT_MODE.SAW Or PointModeCmBx.SelectedIndex = PT_MODE.LASER Then
|
||||
|
||||
@@ -357,12 +374,12 @@ Public Class MultipleCut
|
||||
If Not EgtSetCalcTool("", "H3", 1) Then Return
|
||||
' Trasformo in posizione punta utensile in basso
|
||||
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, dR1, dR2, True, m_ptTipP2) Then Return
|
||||
' Ora imposto la lama corrente
|
||||
If Not EgtSetCalcTool(sSaw, "H1", 1) Then Return
|
||||
' Altrimenti da lama
|
||||
' Reimposto eventuale precedente utensile
|
||||
EgtSetCalcTool(sTool, sHead, nExit)
|
||||
' Altrimenti da lama
|
||||
Else
|
||||
' Imposto la lama corrente
|
||||
If Not EgtSetCalcTool(sSaw, "H1", 1) Then Return
|
||||
' Reimposto eventuale precedente utensile
|
||||
EgtSetCalcTool(sTool, sHead, nExit)
|
||||
' Trasformo in posizione punta utensile in basso
|
||||
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, dR1, dR2, True, m_ptTipP2) Then Return
|
||||
End If
|
||||
@@ -383,10 +400,9 @@ Public Class MultipleCut
|
||||
' Porto il tip nell'origine tavola
|
||||
m_ptTipP2.ToLoc(New Frame3d(m_ptTabOri))
|
||||
m_bPointP2Ok = True
|
||||
' Ricavo dati lama corrente
|
||||
Dim sSaw As String = m_MainWindow.m_CurrentMachine.sCurrSaw
|
||||
' Imposto la lama corrente
|
||||
If Not EgtSetCalcTool(sSaw, "H1", 1) Then Return
|
||||
' Reimposto eventuale precedente utensile
|
||||
EgtSetCalcTool(sTool, sHead, nExit)
|
||||
|
||||
End If
|
||||
|
||||
' Se il secondo punto non coincide con il primo, disegno il taglio
|
||||
|
||||
@@ -137,6 +137,9 @@ Public Class SingleCutUC
|
||||
Point2Btn.IsEnabled = False
|
||||
' Deseleziono bottone primo punto
|
||||
Point1Btn.IsChecked = False
|
||||
|
||||
' la visualizzazione dei comandi è gestira dalla DirectCutPageUC richiamando la funzione ReloadParam
|
||||
|
||||
' Aggiorno visualizzazione
|
||||
EgtDraw()
|
||||
End Sub
|
||||
@@ -172,6 +175,12 @@ Public Class SingleCutUC
|
||||
m_bActive = False
|
||||
End Sub
|
||||
|
||||
Public Sub SetEnableParam(ByVal bIsSaw As Boolean)
|
||||
' se macchina solo WaterJet Disabilito/Nascondo parametri della lama
|
||||
DepthTxBx.IsEnabled = bIsSaw
|
||||
SawThChBx.IsEnabled = bIsSaw
|
||||
End Sub
|
||||
|
||||
Private Sub UpdateSimulOkBtn()
|
||||
If m_bCutOk Then
|
||||
SimulBtn.IsEnabled = True
|
||||
@@ -229,6 +238,12 @@ Public Class SingleCutUC
|
||||
' Verifico configurazione tavola e grezzo
|
||||
If Not m_bRawOk Then Return
|
||||
|
||||
' Recupero dati utensile e testa corrente
|
||||
Dim sTool As String = ""
|
||||
Dim sHead As String = ""
|
||||
Dim nExit As Integer = 0
|
||||
EgtGetCalcTool(sTool, sHead, nExit)
|
||||
|
||||
' Se acquisizione lama o laser
|
||||
If PointModeCmBx.SelectedIndex = PT_MODE.SAW Or PointModeCmBx.SelectedIndex = PT_MODE.LASER Then
|
||||
' Recupero la posizione macchina
|
||||
@@ -242,12 +257,12 @@ Public Class SingleCutUC
|
||||
If Not EgtSetCalcTool("", "H3", 1) Then Return
|
||||
' Trasformo in posizione punta utensile in basso
|
||||
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, dR1, dR2, True, m_ptTipP1) Then Return
|
||||
' Ora imposto la lama corrente
|
||||
If Not EgtSetCalcTool(sSaw, "H1", 1) Then Return
|
||||
' Altrimenti da lama
|
||||
' Reimposto eventuale precedente utensile
|
||||
EgtSetCalcTool(sTool, sHead, nExit)
|
||||
' Altrimenti da lama
|
||||
Else
|
||||
' Imposto la lama corrente
|
||||
If Not EgtSetCalcTool(sSaw, "H1", 1) Then Return
|
||||
' Reimposto eventuale precedente utensile
|
||||
EgtSetCalcTool(sTool, sHead, nExit)
|
||||
' Trasformo in posizione punta utensile in basso
|
||||
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, dR1, dR2, True, m_ptTipP1) Then Return
|
||||
End If
|
||||
@@ -271,10 +286,9 @@ Public Class SingleCutUC
|
||||
' Porto il tip nell'origine tavola
|
||||
m_ptTipP1.ToLoc(New Frame3d(m_ptTabOri))
|
||||
m_bPointP1Ok = True
|
||||
' Ricavo dati lama corrente
|
||||
Dim sSaw As String = m_MainWindow.m_CurrentMachine.sCurrSaw
|
||||
' Imposto la lama corrente
|
||||
If Not EgtSetCalcTool(sSaw, "H1", 1) Then Return
|
||||
' Reimposto eventuale precedente utensile
|
||||
EgtSetCalcTool(sTool, sHead, nExit)
|
||||
|
||||
End If
|
||||
|
||||
' Disegno il taglio
|
||||
@@ -303,6 +317,12 @@ Public Class SingleCutUC
|
||||
' Verifico configurazione tavola e grezzo
|
||||
If Not m_bRawOk Then Return
|
||||
|
||||
' Recupero dati utensile e testa corrente
|
||||
Dim sTool As String = ""
|
||||
Dim sHead As String = ""
|
||||
Dim nExit As Integer = 0
|
||||
EgtGetCalcTool(sTool, sHead, nExit)
|
||||
|
||||
' Se acquisizone lama o laser
|
||||
If PointModeCmBx.SelectedIndex = PT_MODE.SAW Or PointModeCmBx.SelectedIndex = PT_MODE.LASER Then
|
||||
' Recupero la posizione macchina
|
||||
@@ -316,12 +336,14 @@ Public Class SingleCutUC
|
||||
If Not EgtSetCalcTool("", "H3", 1) Then Return
|
||||
' Trasformo in posizione punta utensile in basso
|
||||
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, dR1, dR2, True, m_ptTipP2) Then Return
|
||||
' Ora imposto la lama corrente
|
||||
If Not EgtSetCalcTool(sSaw, "H1", 1) Then Return
|
||||
' Altrimenti da lama
|
||||
' Reimposto eventuale precedente utensile
|
||||
EgtSetCalcTool(sTool, sHead, nExit)
|
||||
|
||||
' Altrimenti da lama
|
||||
Else
|
||||
' Imposto la lama corrente
|
||||
If Not EgtSetCalcTool(sSaw, "H1", 1) Then Return
|
||||
' Reimposto eventuale precedente utensile
|
||||
EgtSetCalcTool(sTool, sHead, nExit)
|
||||
|
||||
' Trasformo in posizione punta utensile in basso
|
||||
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, dR1, dR2, True, m_ptTipP2) Then Return
|
||||
End If
|
||||
@@ -343,10 +365,8 @@ Public Class SingleCutUC
|
||||
' Porto il tip nell'origine tavola
|
||||
m_ptTipP2.ToLoc(New Frame3d(m_ptTabOri))
|
||||
m_bPointP2Ok = True
|
||||
' Ricavo dati lama corrente
|
||||
Dim sSaw As String = m_MainWindow.m_CurrentMachine.sCurrSaw
|
||||
' Imposto la lama corrente
|
||||
If Not EgtSetCalcTool(sSaw, "H1", 1) Then Return
|
||||
' Reimposto eventuale precedente utensile
|
||||
EgtSetCalcTool(sTool, sHead, nExit)
|
||||
End If
|
||||
|
||||
' Se il secondo punto non coincide con il primo, disegno il taglio
|
||||
@@ -559,9 +579,13 @@ Public Class SingleCutUC
|
||||
Dim dRawHeight As Double = m_ptRawMax.z - m_ptRawMin.z
|
||||
' Recupero spessore lama corrente
|
||||
Dim sSaw As String = m_MainWindow.m_CurrentMachine.sCurrSaw
|
||||
Dim sSawing As String = m_MainWindow.m_CurrentMachine.sCurrSawing
|
||||
EgtTdbSetCurrTool(sSaw)
|
||||
Dim dThick As Double = 0
|
||||
EgtTdbGetCurrToolParam(MCH_TP.THICK, dThick)
|
||||
' se è impostata una lavorazione di lama
|
||||
If Not String.IsNullOrEmpty(sSawing) Then
|
||||
EgtTdbGetCurrToolParam(MCH_TP.THICK, dThick)
|
||||
End If
|
||||
' Rimuovo eventuale vecchio pezzo per taglio diretto
|
||||
EraseDirectCutPart()
|
||||
' Disattivo eventuali lavorazioni presenti
|
||||
|
||||
@@ -71,7 +71,7 @@ Public Class SingleDrillUC
|
||||
|
||||
Private Sub SingleDrill_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded
|
||||
m_sCurrDrill = m_CurrentMachine.sCurrDrill
|
||||
GetDrillFromDrilling(m_sCurrDrill)
|
||||
GetDrillFromDrilling(m_sCurrDrill, m_CurrentMachine.sCurrDrilling)
|
||||
|
||||
' recupero informazioni del foretto usato
|
||||
EgtTdbSetCurrTool(m_sCurrDrill)
|
||||
@@ -267,41 +267,41 @@ Public Class SingleDrillUC
|
||||
Point1Btn.IsChecked = True
|
||||
End Sub
|
||||
|
||||
Private Function GetDrillFromDrilling(ByRef sCurrDrill 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 Function
|
||||
'Private Sub GetDrillFromDrilling(ByRef sCurrDrill 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
|
||||
|
||||
Private Sub XcoordTxBx_EgtClosed(sender As Object, e As EventArgs) Handles XcoordTxBx.EgtClosed
|
||||
' 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
|
||||
' Recupero spessore lama corrente
|
||||
Dim sDrill As String = m_sCurrDrill
|
||||
GetDrillFromDrilling(sDrill)
|
||||
GetDrillFromDrilling(sDrill, m_MainWindow.m_CurrentMachine.sCurrDrilling)
|
||||
EgtTdbSetCurrTool(sDrill)
|
||||
Dim dDiam As Double = 0
|
||||
EgtTdbGetCurrToolParam(MCH_TP.DIAM, dDiam)
|
||||
|
||||
@@ -281,32 +281,14 @@ Public Class AlzFrontUC
|
||||
|
||||
' restituisce vero se il lato possiede delle info legate al sideangle
|
||||
Private Function VerifyIsThereSideAngle(nCurrLine As Integer) As Boolean
|
||||
Dim sInfoSideAngle As String = String.Empty
|
||||
EgtGetInfo(nCurrLine, INFO_SIDE_ANGLE, sInfoSideAngle)
|
||||
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
|
||||
Dim dSideAngle As Double
|
||||
return EgtGetInfo(nCurrLine, INFO_SIDE_ANGLE, dSideAngle)
|
||||
End Function
|
||||
|
||||
' restituisce vero se il lato possiede delle info legate alle alette
|
||||
Private Function VerifyIsThereAlzFront(nCurrLine As Integer) As Boolean
|
||||
Dim sInfoAlzFront As String = String.Empty
|
||||
EgtGetInfo(nCurrLine, INFO_ALZFRONT, sInfoAlzFront)
|
||||
If Not String.IsNullOrWhiteSpace(sInfoAlzFront) Or Not String.IsNullOrEmpty(sInfoAlzFront) Then
|
||||
If sInfoAlzFront.Trim <> "0" Then
|
||||
Return True
|
||||
End If
|
||||
End If
|
||||
Return False
|
||||
Dim nAlzFront As Integer
|
||||
return EgtGetInfo(nCurrLine, INFO_ALZFRONT, nAlzFront) AndAlso nAlzFront <> 0
|
||||
End Function
|
||||
|
||||
' approvo la costruzione dell'aletta sul lato indicato
|
||||
|
||||
@@ -159,7 +159,7 @@ Module SideAngle
|
||||
Return True
|
||||
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
|
||||
If LoopId = GDB_ID.NULL Or TextLayId = GDB_ID.NULL Then Return False
|
||||
' Calcolo dimensione ingombro Loop
|
||||
|
||||
@@ -755,6 +755,10 @@ Public Class SideAngleUC
|
||||
vJoint.Add(False)
|
||||
End If
|
||||
Next
|
||||
|
||||
' se non riesco a generare un elenco allora esco
|
||||
If vJoint.Count < 1 Then Return
|
||||
|
||||
If vJoint(0) And vJoint(vJoint.Count - 1) Then
|
||||
bJointStart = True
|
||||
End If
|
||||
|
||||
+342
-323
@@ -10,27 +10,27 @@
|
||||
<!-- Definizione della AlarmsPage -->
|
||||
<Border Style="{DynamicResource OmagCut_PageBorder}" >
|
||||
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="4*"/>
|
||||
<ColumnDefinition Width="4*"/>
|
||||
<ColumnDefinition Width="4*"/>
|
||||
<ColumnDefinition Width="3*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="2*"/>
|
||||
<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>
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="4*"/>
|
||||
<ColumnDefinition Width="4*"/>
|
||||
<ColumnDefinition Width="4*"/>
|
||||
<ColumnDefinition Width="3*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="2*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
|
||||
<!--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.RowDefinitions>
|
||||
<!--GruopBox: taglio lama-->
|
||||
@@ -51,7 +51,7 @@
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="0.375*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
|
||||
<!--Parametri Taglio Lama: 5 Parametri-->
|
||||
<GroupBox Name="SawGpBx" Style="{DynamicResource OmagCut_GroupBox}" Grid.Column="2" Grid.RowSpan="4">
|
||||
<!--definizione della grigli ainterna-->
|
||||
@@ -92,8 +92,8 @@
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||
<CheckBox Name="PreCutExitChBx" Grid.Column="1" Grid.Row="4" Margin="10,0,10,0"
|
||||
Style="{StaticResource OmagCut_CheckBox_Single}"
|
||||
HorizontalAlignment="Right"/>
|
||||
|
||||
HorizontalAlignment="Right"/>
|
||||
|
||||
</Grid>
|
||||
|
||||
</GroupBox>
|
||||
@@ -200,7 +200,7 @@
|
||||
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}"
|
||||
HorizontalAlignment="Right" Margin="0,0,10,0"/>
|
||||
|
||||
|
||||
</Grid>
|
||||
</GroupBox>
|
||||
|
||||
@@ -218,78 +218,78 @@
|
||||
</GroupBox>
|
||||
|
||||
</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}">
|
||||
|
||||
<Grid Name="CurrToolsGrid" Grid.ColumnSpan="2">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
<ColumnDefinition Width="3*"/>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<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*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid Name="CurrToolsGrid" Grid.ColumnSpan="2">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
<ColumnDefinition Width="3*"/>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<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*"/>
|
||||
</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}"/>
|
||||
<ComboBox x:Name="CurrSawCmBx" Grid.Column="1" Grid.Row="1" Style="{DynamicResource OmagCut_ComboBox}">
|
||||
<ComboBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding}" Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</DataTemplate>
|
||||
</ComboBox.ItemTemplate>
|
||||
</ComboBox>
|
||||
<ComboBox x:Name="CurrSawCmBx" Grid.Column="1" Grid.Row="1" Style="{DynamicResource OmagCut_ComboBox}">
|
||||
<ComboBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding}" Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</DataTemplate>
|
||||
</ComboBox.ItemTemplate>
|
||||
</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}"
|
||||
Visibility="Hidden"/>
|
||||
<ComboBox Name="AuxiliaryToolCmBx" Grid.Column="1" Grid.Row="3" Style="{StaticResource OmagCut_ComboBox}" Visibility="Hidden">
|
||||
<ComboBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding sName}" Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</DataTemplate>
|
||||
</ComboBox.ItemTemplate>
|
||||
</ComboBox>
|
||||
<ComboBox Name="AuxiliaryToolCmBx" Grid.Column="1" Grid.Row="3" Style="{StaticResource OmagCut_ComboBox}" Visibility="Hidden">
|
||||
<ComboBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding sName}" Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</DataTemplate>
|
||||
</ComboBox.ItemTemplate>
|
||||
</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}"
|
||||
Visibility="Hidden"/>
|
||||
<ComboBox Name="CurrDrillCmBx" Grid.Column="1" Grid.Row="5" Style="{StaticResource OmagCut_ComboBox}" Visibility="Hidden">
|
||||
<ComboBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding}" Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</DataTemplate>
|
||||
</ComboBox.ItemTemplate>
|
||||
</ComboBox>
|
||||
<ComboBox Name="CurrDrillCmBx" Grid.Column="1" Grid.Row="5" Style="{StaticResource OmagCut_ComboBox}" Visibility="Hidden">
|
||||
<ComboBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding}" Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</DataTemplate>
|
||||
</ComboBox.ItemTemplate>
|
||||
</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}"
|
||||
Visibility="Hidden"/>
|
||||
<ComboBox Name="CurrMillCmBx" Grid.Column="1" Grid.Row="5" Style="{StaticResource OmagCut_ComboBox}" Visibility="Hidden">
|
||||
<ComboBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding}" Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</DataTemplate>
|
||||
</ComboBox.ItemTemplate>
|
||||
</ComboBox>
|
||||
<ComboBox Name="CurrMillCmBx" Grid.Column="1" Grid.Row="5" Style="{StaticResource OmagCut_ComboBox}" Visibility="Hidden">
|
||||
<ComboBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding}" Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</DataTemplate>
|
||||
</ComboBox.ItemTemplate>
|
||||
</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}"
|
||||
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"
|
||||
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
|
||||
Visibility="Hidden"/>
|
||||
<ComboBox Name="CurrWJetCmBx" Grid.Column="1" Grid.Row="5" Style="{StaticResource OmagCut_ComboBox}" Visibility="Hidden">
|
||||
<ComboBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding}" Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</DataTemplate>
|
||||
</ComboBox.ItemTemplate>
|
||||
</ComboBox>
|
||||
<ComboBox Name="CurrWJetCmBx" Grid.Column="1" Grid.Row="5" Style="{StaticResource OmagCut_ComboBox}" Visibility="Hidden">
|
||||
<ComboBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding}" Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</DataTemplate>
|
||||
</ComboBox.ItemTemplate>
|
||||
</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}"/>
|
||||
|
||||
</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>
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition />
|
||||
@@ -424,96 +424,106 @@
|
||||
|
||||
</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>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="2.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="2.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<ListBox Name="MaterialsLstBx" Grid.RowSpan="2">
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding sName}" Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</DataTemplate>
|
||||
</ListBox.ItemTemplate>
|
||||
</ListBox>
|
||||
<ListBox Name="MaterialsLstBx" Grid.RowSpan="2">
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding sName}" Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</DataTemplate>
|
||||
</ListBox.ItemTemplate>
|
||||
</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}" />
|
||||
|
||||
<UniformGrid Grid.Row="2" Columns="2">
|
||||
<Button Name="NewMatBtn" Grid.Column="1"
|
||||
<UniformGrid Grid.Row="2" Columns="2">
|
||||
<Button Name="NewMatBtn" Grid.Column="1"
|
||||
Style="{DynamicResource OmagCut_RightGrayGradientYellowTextButton}"/>
|
||||
<Button Name="RemoveMatBtn" Grid.Column="1"
|
||||
<Button Name="RemoveMatBtn" Grid.Column="1"
|
||||
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>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<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*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<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*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<TextBlock Name="CurrSawingTxBl" Grid.Column="0" Grid.Row="0"
|
||||
<TextBlock Name="CurrSawingTxBl" Grid.Column="0" Grid.Row="0"
|
||||
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}" />
|
||||
|
||||
<TextBlock Name="CurrDrillingTxBl" Grid.Column="0" Grid.Row="1"
|
||||
<TextBlock Name="CurrDrillingTxBl" Grid.Column="0" Grid.Row="1"
|
||||
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}" />
|
||||
|
||||
<TextBlock Name="CurrMillingTxBl" Grid.Column="0" Grid.Row="2"
|
||||
<TextBlock Name="CurrMillingTxBl" Grid.Column="0" Grid.Row="2"
|
||||
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}" />
|
||||
|
||||
<TextBlock Name="CurrPocketingTxBl" Grid.Column="0" Grid.Row="3"
|
||||
<TextBlock Name="CurrPocketingTxBl" Grid.Column="0" Grid.Row="3"
|
||||
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}" />
|
||||
|
||||
<TextBlock Name="CurrWaterJettingTxBl" Grid.Column="0" Grid.Row="4"
|
||||
<TextBlock Name="CurrWaterJettingTxBl" Grid.Column="0" Grid.Row="4"
|
||||
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}" />
|
||||
|
||||
<TextBlock Name="CurrDripSawingTxBl" Grid.Column="0" Grid.Row="5"
|
||||
<TextBlock Name="CurrDripDrillingTxBl" Grid.Column="0" Grid.Row="6"
|
||||
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}" />
|
||||
|
||||
<TextBlock Name="CurrDripDrillingTxBl" Grid.Column="0" Grid.Row="6"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="CurrDripDrillingTxBx" Grid.Column="1" Grid.Row="6" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_FixedTextBox}" />
|
||||
</Grid>
|
||||
|
||||
</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.ColumnDefinitions>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
@@ -551,51 +561,51 @@
|
||||
|
||||
</GroupBox>-->
|
||||
|
||||
<Grid Grid.Column="1" Grid.Row="3" Grid.RowSpan="3">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*"/>
|
||||
<RowDefinition Height="*"/>
|
||||
<RowDefinition Height="*"/>
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid Grid.Column="1" Grid.Row="3" Grid.RowSpan="3">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*"/>
|
||||
<RowDefinition Height="*"/>
|
||||
<RowDefinition Height="*"/>
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<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.ColumnDefinitions>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<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.ColumnDefinitions>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<TextBlock Name="SafeZTxBl" Grid.Column="0"
|
||||
<TextBlock Name="SafeZTxBl" Grid.Column="0"
|
||||
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}"/>
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
||||
</GroupBox>
|
||||
</GroupBox>
|
||||
|
||||
<Border Style="{DynamicResource OmagCut_NoNameGroupBorder}" Grid.Column="0" Grid.Row="2" Grid.ColumnSpan="2" Grid.RowSpan="2">
|
||||
<Grid >
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Border Style="{DynamicResource OmagCut_NoNameGroupBorder}" Grid.Column="0" Grid.Row="2" Grid.ColumnSpan="2" Grid.RowSpan="2">
|
||||
<Grid >
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<TextBlock Name="AdditionalTableTxBl" Grid.Column="0"
|
||||
<TextBlock Name="AdditionalTableTxBl" Grid.Column="0"
|
||||
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}"/>
|
||||
</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>
|
||||
<TextBlock Name="FinalHomeTxBl"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}" />
|
||||
@@ -605,199 +615,208 @@
|
||||
|
||||
</GroupBox>-->
|
||||
|
||||
<GroupBox Name="NestingParamGpBx" Style="{DynamicResource OmagCut_GroupBox}" Grid.Column="1" Grid.Row="6" Grid.RowSpan="3">
|
||||
<Grid Name="NestingGrid">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<GroupBox Name="NestingParamGpBx" Style="{DynamicResource OmagCut_GroupBox}" Grid.Column="1" Grid.Row="6" Grid.RowSpan="3">
|
||||
<Grid Name="NestingGrid">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
</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}" />
|
||||
<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"/>
|
||||
|
||||
<!--Allineato-->
|
||||
<TextBlock Name="AlignTxBl" Grid.Row="1" Grid.ColumnSpan="2"
|
||||
<!--Allineato-->
|
||||
<TextBlock Name="AlignTxBl" Grid.Row="1" Grid.ColumnSpan="2"
|
||||
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"/>
|
||||
|
||||
<!--Ghigliottina-->
|
||||
<TextBlock Name="GhigliottinaTxBl" Grid.Row="2" Grid.ColumnSpan="2"
|
||||
<!--Ghigliottina-->
|
||||
<TextBlock Name="GhigliottinaTxBl" Grid.Row="2" Grid.ColumnSpan="2"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}" />
|
||||
<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}"
|
||||
<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"/>
|
||||
|
||||
|
||||
|
||||
</Grid>
|
||||
|
||||
</GroupBox>
|
||||
</GroupBox>
|
||||
|
||||
<GroupBox Name="AutoRawImageParamGpBx" Style="{DynamicResource OmagCut_GroupBox}" Grid.Column="3" Grid.Row="0" Grid.RowSpan="2">
|
||||
<Grid>
|
||||
<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*"/>
|
||||
<GroupBox Name="AutoRawImageParamGpBx" Style="{DynamicResource OmagCut_GroupBox}" Grid.Column="3" Grid.Row="0" Grid.RowSpan="2">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
</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}"/>
|
||||
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
||||
<TextBlock Name="ThresholdTxBl" Grid.Column="0" Grid.Row="1"
|
||||
<TextBlock Name="ThresholdTxBl" Grid.Column="0" Grid.Row="1"
|
||||
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}"/>
|
||||
<TextBlock Name="ToleranceTxBl" Grid.Column="0" Grid.Row="2"
|
||||
<TextBlock Name="ToleranceTxBl" Grid.Column="0" Grid.Row="2"
|
||||
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}"/>
|
||||
|
||||
</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>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<TextBlock Name="CfrLenTxBl" Grid.Column="0"
|
||||
<TextBlock Name="CfrLenTxBl" Grid.Column="0"
|
||||
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}"/>
|
||||
<TextBlock Name="CfrPercTxBl" Grid.Column="0" Grid.Row="1"
|
||||
<TextBlock Name="CfrPercTxBl" Grid.Column="0" Grid.Row="1"
|
||||
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}"/>
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
||||
</GroupBox>
|
||||
</GroupBox>
|
||||
|
||||
<!--Incisioni-->
|
||||
<GroupBox Name="TopMillGpBx" Style="{DynamicResource OmagCut_GroupBox}" Grid.Column="3"
|
||||
<!--Incisioni-->
|
||||
<GroupBox Name="TopMillGpBx" Style="{DynamicResource OmagCut_GroupBox}" Grid.Column="3"
|
||||
Grid.Row="3" Grid.RowSpan="3">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<!--Utilizza fresa-->
|
||||
<TextBlock Name="TmEnableTxBl" Grid.Column="0" Grid.Row="0"
|
||||
<!--Utilizza fresa-->
|
||||
<TextBlock Name="TmEnableTxBl" Grid.Column="0" Grid.Row="0"
|
||||
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"/>
|
||||
<!--Affondamento-->
|
||||
<TextBlock Name="TmDepthTxBl" Grid.Column="0" Grid.Row="1"
|
||||
<!--Affondamento-->
|
||||
<TextBlock Name="TmDepthTxBl" Grid.Column="0" Grid.Row="1"
|
||||
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}"/>
|
||||
<!--Larghezza-->
|
||||
<TextBlock Name="TmWidthTxBl" Grid.Column="0" Grid.Row="2"
|
||||
<!--Larghezza-->
|
||||
<TextBlock Name="TmWidthTxBl" Grid.Column="0" Grid.Row="2"
|
||||
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}"/>
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
||||
</GroupBox>
|
||||
</GroupBox>
|
||||
|
||||
|
||||
<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">
|
||||
<Border Name="SideAngCutProbeGpBx" Style="{DynamicResource OmagCut_NoNameGroupBorder}" Grid.Column="3" Grid.Row="6">
|
||||
<Grid >
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</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}" />
|
||||
<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"/>
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
||||
</GroupBox>
|
||||
</GroupBox>
|
||||
|
||||
<UniformGrid Columns="4" Grid.Row="8">
|
||||
<Button x:Name="SawProbingBtn"
|
||||
<Grid Grid.Column="0" Grid.Row="8">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="2.5*"/>
|
||||
<ColumnDefinition Width="5*"/>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Button x:Name="SawProbingBtn"
|
||||
Style="{DynamicResource OmagCut_YellowGradientYellowIconButton}">
|
||||
<Image Source="{DynamicResource SawProbeImg}" Style="{StaticResource OmagCut_ScaleButtonIcon}"/>
|
||||
</Button>
|
||||
<Image Source="{DynamicResource SawProbeImg}" Style="{StaticResource OmagCut_ScaleButtonIcon}"/>
|
||||
</Button>
|
||||
|
||||
</UniformGrid>
|
||||
|
||||
</Grid>
|
||||
|
||||
</Border>
|
||||
|
||||
<TextBlock Name="UseLaserOriginTxBl" Grid.Column="1"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}" />
|
||||
<CheckBox Name="UseLaserOriginChBx" Style="{DynamicResource OmagCut_CheckBox_Single}" Grid.Column="2"
|
||||
HorizontalAlignment="Right" Margin="10,0,10,0"/>
|
||||
</Grid>
|
||||
|
||||
</Grid>
|
||||
</Border>
|
||||
|
||||
</UserControl>
|
||||
|
||||
@@ -109,6 +109,7 @@ Public Class AlarmsPageUC
|
||||
CurrDripDrillingTxBl.Text = EgtMsg(MSG_ALARMS2PAGEUC + 6) ' DripDrilling
|
||||
FrameGpBx.Header = EgtMsg(91068) ' Cornici
|
||||
FramePauseTxBl.Text = EgtMsg(91067) ' Inserisci pausa
|
||||
UseLaserOriginTxBl.Text = EgtMsg(91129) ' Usa laser per origine
|
||||
AutoRawImageParamGpBx.Visibility = Windows.Visibility.Hidden
|
||||
End Sub
|
||||
|
||||
@@ -118,6 +119,14 @@ Public Class AlarmsPageUC
|
||||
' Variabile che accorcia il riferimento alla macchina corrente
|
||||
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
|
||||
Select Case m_CurrentMachine.MountedToolConfig
|
||||
Case CurrentMachine.MountedToolConfigs.SAW
|
||||
@@ -132,7 +141,7 @@ Public Class AlarmsPageUC
|
||||
' Disattivo il gruppo dei parametri fori
|
||||
HolesGpBx.Visibility = Windows.Visibility.Hidden
|
||||
Case CurrentMachine.MountedToolConfigs.SAWANDAUXTOOL
|
||||
'Non faccio alcunchè
|
||||
'Non faccio alcunchè
|
||||
Case CurrentMachine.MountedToolConfigs.MANUALTOOLCHANGER, CurrentMachine.MountedToolConfigs.TOOLCHANGER
|
||||
'Da implementare
|
||||
End Select
|
||||
@@ -151,7 +160,7 @@ Public Class AlarmsPageUC
|
||||
|
||||
' Se non previsti tagli waterjet, disabilito relativo box
|
||||
If Not m_CurrentMachine.bWaterJetting Then
|
||||
WJsParamGpBx.Visibility = Visibility.Hidden
|
||||
WjsParamGpBx.Visibility = Visibility.Hidden
|
||||
End If
|
||||
|
||||
' Abilitazione box per contorni grezzo da foto
|
||||
@@ -164,7 +173,7 @@ Public Class AlarmsPageUC
|
||||
End If
|
||||
|
||||
' 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
|
||||
Else
|
||||
CutFredGpBx.Visibility = Windows.Visibility.Hidden
|
||||
@@ -179,11 +188,16 @@ Public Class AlarmsPageUC
|
||||
m_bFirst = False
|
||||
End If
|
||||
|
||||
' Aggiorno lista delle lame per pagina macchina in cui scegliere quella corrente
|
||||
CreateToolList(MCH_TF.SAWBLADE, m_SawList)
|
||||
' Aggiorno lista delle lame per pagina macchina in cui scegliere quella corrente
|
||||
CreateToolList(MCH_TF.SAWBLADE, m_SawList)
|
||||
' Seleziono lama corrente
|
||||
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
|
||||
Select Case m_CurrentMachine.MountedToolConfig
|
||||
Case CurrentMachine.MountedToolConfigs.SAW
|
||||
@@ -374,6 +388,17 @@ Public Class AlarmsPageUC
|
||||
' Leggo parametri per variazione feed in tagli
|
||||
CfrLenTxBx.Text = LenToString(m_CurrentMachine.dFsevLength, 3)
|
||||
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
|
||||
|
||||
' aggiorna le text delle lavorazioni (la selezione avviene nella pagina del grezzo o dalla pagina del progetto corrente)
|
||||
@@ -414,9 +439,26 @@ Public Class AlarmsPageUC
|
||||
CurrWaterJettingTxBx.Text = m_CurrentMachine.sCurrWaterJetting
|
||||
CurrWaterJettingTxBl.Visibility = Windows.Visibility.Visible
|
||||
CurrWaterJettingTxBx.Visibility = Windows.Visibility.Visible
|
||||
If m_MainWindow.m_CurrentMachine.bFromDBWaterJet Then
|
||||
CurrWaterJettingTxBx.SetValue(Grid.ColumnSpanProperty, 1)
|
||||
CurrWaterJettingTxBx.SetValue(MarginProperty, New Thickness(CurrWaterJettingTxBx.Margin.Left,
|
||||
CurrWaterJettingTxBx.Margin.Top,
|
||||
5,
|
||||
CurrWaterJettingTxBx.Margin.Bottom))
|
||||
CurrWaterJettingQualityTxBx.Text = m_CurrentMachine.sCurrWaterJettingQuality
|
||||
CurrWaterJettingQualityTxBx.Visibility = Windows.Visibility.Visible
|
||||
Else
|
||||
CurrWaterJettingTxBx.SetValue(Grid.ColumnSpanProperty, 2)
|
||||
CurrWaterJettingTxBx.SetValue(MarginProperty, New Thickness(CurrWaterJettingTxBx.Margin.Left,
|
||||
CurrWaterJettingTxBx.Margin.Top,
|
||||
10,
|
||||
CurrWaterJettingTxBx.Margin.Bottom))
|
||||
CurrWaterJettingQualityTxBx.Visibility = Windows.Visibility.Collapsed
|
||||
End If
|
||||
Else
|
||||
CurrWaterJettingTxBl.Visibility = Windows.Visibility.Hidden
|
||||
CurrWaterJettingTxBx.Visibility = Windows.Visibility.Hidden
|
||||
CurrWaterJettingQualityTxBx.Visibility = Windows.Visibility.Hidden
|
||||
End If
|
||||
If m_CurrentMachine.sCurrDripSawing <> String.Empty Then
|
||||
CurrDripSawingTxBx.Text = m_CurrentMachine.sCurrDripSawing
|
||||
@@ -549,7 +591,7 @@ Public Class AlarmsPageUC
|
||||
If CurrDrillCmBx.SelectedItem.ToString() = NO_TOOL Then
|
||||
m_CurrentMachine.sCurrDrill = String.Empty
|
||||
m_CurrentMachine.sCurrDrilling = String.Empty
|
||||
' Assegno foretto
|
||||
' Assegno foretto
|
||||
Else
|
||||
m_CurrentMachine.sCurrDrill = CurrDrillCmBx.SelectedItem.ToString()
|
||||
' Reset fresa, waterjet e relative lavorazioni
|
||||
@@ -584,7 +626,7 @@ Public Class AlarmsPageUC
|
||||
If CurrMillCmBx.SelectedItem.ToString() = NO_TOOL Then
|
||||
m_CurrentMachine.sCurrMill = String.Empty
|
||||
m_CurrentMachine.sCurrMilling = String.Empty
|
||||
' Assegno fresa
|
||||
' Assegno fresa
|
||||
Else
|
||||
m_CurrentMachine.sCurrMill = CurrMillCmBx.SelectedItem.ToString()
|
||||
' Reset foretto, waterjet e relative lavorazioni
|
||||
@@ -654,7 +696,7 @@ Public Class AlarmsPageUC
|
||||
If CurrWJetCmBx.SelectedItem.ToString() = NO_TOOL Then
|
||||
m_CurrentMachine.sCurrWaterJet = String.Empty
|
||||
m_CurrentMachine.sCurrWaterJetting = String.Empty
|
||||
' Assegno Waterjet
|
||||
' Assegno Waterjet
|
||||
Else
|
||||
m_CurrentMachine.sCurrWaterJet = CurrWJetCmBx.SelectedItem.ToString()
|
||||
' Reset foretto, fresa e relative lavorazioni
|
||||
@@ -857,7 +899,7 @@ Public Class AlarmsPageUC
|
||||
Else
|
||||
WritePrivateProfileString(S_MACH_NEST, K_MACH_ENGRAVING_WITHMILL, "0", m_MainWindow.GetMachIniFile())
|
||||
End If
|
||||
End Sub
|
||||
End Sub
|
||||
|
||||
Private Sub TmDepthTxBx_EgtClosed(sender As Object, e As EventArgs) Handles TmDepthTxBx.EgtClosed
|
||||
Dim dVal As Double = 0
|
||||
@@ -993,6 +1035,14 @@ Public Class AlarmsPageUC
|
||||
End If
|
||||
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
|
||||
If WashingChBx.IsChecked() Then
|
||||
WritePrivateProfileString(S_MACH_NEST, K_MACH_WASHING, "1", m_MainWindow.GetMachIniFile())
|
||||
|
||||
+159
-11
@@ -1,4 +1,5 @@
|
||||
Imports System.Collections.ObjectModel
|
||||
Imports EgtWPFLib5
|
||||
Imports EgtUILib
|
||||
|
||||
Public Class CurrentMachine
|
||||
@@ -76,6 +77,9 @@ Public Class CurrentMachine
|
||||
Private m_bPolishingWheel As Boolean = False
|
||||
Private m_bWaterJet As Boolean = False
|
||||
|
||||
' Abilitazione DB WaterJet
|
||||
Private m_bFromDBWaterJet As Boolean = False
|
||||
|
||||
' Flag per visualizzazione TcPos, Testa/uscita e Note utente
|
||||
Private m_nShowToolChanger As Integer = 0 ' 0=no, 1=tutti utensili, 2=solo lame
|
||||
Private m_bShowHeadExit As Boolean = False
|
||||
@@ -114,6 +118,7 @@ Public Class CurrentMachine
|
||||
Private m_sCurrDripSawing As String = String.Empty
|
||||
Private m_sCurrDripDrilling As String = String.Empty
|
||||
Private m_sCurrWaterJetting As String = String.Empty
|
||||
Private m_sCurrWaterJettingQuality As String = String.Empty
|
||||
|
||||
' Spessore sottopezzo
|
||||
Private m_dAdditionalTable As Double = 0
|
||||
@@ -157,6 +162,9 @@ Public Class CurrentMachine
|
||||
' Lista dei materiali
|
||||
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
|
||||
Private m_MaxIdMat As Integer = 0
|
||||
|
||||
@@ -431,6 +439,12 @@ Public Class CurrentMachine
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Friend ReadOnly Property bFromDBWaterJet As Boolean
|
||||
Get
|
||||
Return m_bFromDBWaterJet
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Friend ReadOnly Property ShowToolChanger As Integer
|
||||
Get
|
||||
Return m_nShowToolChanger
|
||||
@@ -709,6 +723,17 @@ Public Class CurrentMachine
|
||||
End Set
|
||||
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
|
||||
Get
|
||||
Return m_bWaterJetting AndAlso Not String.IsNullOrWhiteSpace(m_sCurrWaterJetting)
|
||||
@@ -903,6 +928,12 @@ Public Class CurrentMachine
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Friend ReadOnly Property Qualities As ObservableCollection(Of String)
|
||||
Get
|
||||
Return m_Qualities
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Friend Sub AddMaterial(value As Material)
|
||||
For Each Material As Material In Materials
|
||||
If Material.nId = value.nId Then
|
||||
@@ -984,7 +1015,11 @@ Public Class CurrentMachine
|
||||
End Get
|
||||
Set(value As Material)
|
||||
Dim CurrMatId As String = If(Not IsNothing(value), value.nId.ToString, "")
|
||||
WritePrivateProfileString(S_MATERIALS, K_CURRMATERIAL, CurrMatId, sMachIniFile)
|
||||
If bWaterJet And bFromDBWaterJet 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
|
||||
End Set
|
||||
End Property
|
||||
@@ -1082,6 +1117,8 @@ Public Class CurrentMachine
|
||||
' waterjet
|
||||
m_bWaterJet = (GetPrivateProfileInt(S_TOOLS, K_WATERJET, 0, sMachIniFile) > 0) And
|
||||
m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.ENABLE_WJ)
|
||||
' Leggo abilitazione DB WaterJet
|
||||
m_bFromDBWaterJet = (GetPrivateProfileInt(S_MATERIALS, K_FROMDBWATERJET, 0, sMachIniFile) > 0)
|
||||
' Leggo abilitazione visualizzazione TcPos, Head/exit e Note utente
|
||||
m_nShowToolChanger = GetPrivateProfileInt(S_TOOLS, K_SHOWTOOLCHANGER, 0, sMachIniFile)
|
||||
m_bShowHeadExit = (GetPrivateProfileInt(S_TOOLS, K_SHOWHEADEXIT, 0, sMachIniFile) > 0)
|
||||
@@ -1157,6 +1194,8 @@ Public Class CurrentMachine
|
||||
GetPrivateProfileString(S_MACH_MACH, K_CURRDRIPDRILLING, Nothing, m_sCurrDripDrilling, sMachIniFile)
|
||||
' waterjetting
|
||||
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
|
||||
m_ToolChangerNbr = GetPrivateProfileInt(S_TOOLCHANGER, K_NUMBER, 0, sMachIniFile)
|
||||
@@ -1218,27 +1257,119 @@ Public Class CurrentMachine
|
||||
' Leggo la lista dei materiali
|
||||
Dim Material As Material = Nothing
|
||||
Dim nIndex As Integer = 1
|
||||
While (GetPrivateProfileMaterial(S_MATERIALS, K_MATERIAL & nIndex, Material, sMachIniFile))
|
||||
m_Materials.Add(Material)
|
||||
nIndex += 1
|
||||
End While
|
||||
|
||||
If m_bWaterJet And m_bFromDBWaterJet Then
|
||||
LoadWJMaterial(True)
|
||||
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
|
||||
m_MaxIdMat = nIndex - 1
|
||||
|
||||
' Leggo materiale correntemente attivo
|
||||
Dim CurrMatId As Integer = GetPrivateProfileInt(S_MATERIALS, K_CURRMATERIAL, 0, sMachIniFile)
|
||||
For Each Material In Materials
|
||||
If Material.nId = CurrMatId Then
|
||||
m_CurrMat = Material
|
||||
Exit For
|
||||
Dim sCurrMatId As String = String.Empty
|
||||
EgtUILib.GetPrivateProfileString(S_MATERIALS, K_CURRMATERIAL, "0", sCurrMatId, sMachIniFile)
|
||||
If bWaterJet And bFromDBWaterJet Then
|
||||
Dim sCurrMatIds As String()
|
||||
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
|
||||
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
|
||||
m_HasRawProbe = (GetPrivateProfileInt(S_MACH_PROBING, K_ENABLERAWPROBE, 1, sMachIniFile) <> 0)
|
||||
' leggo se la macchina ha il lettore di codice a barre della lastra
|
||||
m_nEnableBarCodeReader = GetPrivateProfileInt(S_MACH_BARCODEREADER, K_ENABLEBCR, 0, sMachIniFile)
|
||||
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("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
|
||||
' Recupero diametro lama corrente
|
||||
EgtTdbSetCurrTool(sCurrSaw)
|
||||
@@ -1333,6 +1464,7 @@ Friend Class Material
|
||||
|
||||
Private m_nId As Integer
|
||||
Private m_sName As String
|
||||
Private m_SubId As Integer = 0
|
||||
|
||||
Public ReadOnly Property nId As Integer
|
||||
Get
|
||||
@@ -1349,6 +1481,15 @@ Friend Class Material
|
||||
End Set
|
||||
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))
|
||||
Dim nMaxId As Integer = 0
|
||||
For Each Material As Material In MaterialList
|
||||
@@ -1365,4 +1506,11 @@ Friend Class Material
|
||||
m_sName = sName
|
||||
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
|
||||
|
||||
|
||||
@@ -0,0 +1,139 @@
|
||||
<Window x:Class="ImportExportMachiningWindowWD"
|
||||
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:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
|
||||
FontFamily="{DynamicResource OmagCut_Font}"
|
||||
ResizeMode="NoResize" WindowStyle="None" AllowsTransparency="True" Background="Transparent"
|
||||
Title="SaveNameWD" Height="350" Width="426.5" ShowInTaskbar="False">
|
||||
<!--Definizione della pagina di scelta del nome con cui salvare il progetto-->
|
||||
<Border Style="{DynamicResource OmagCut_Border}">
|
||||
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="7*"/>
|
||||
<RowDefinition Height="2*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<ScrollViewer Grid.Row="0" Margin="20">
|
||||
<TreeView ItemsSource="{Binding FamilyList}" Background="{DynamicResource OmagCut_TreeViewBackGroundColor}">
|
||||
<TreeView.Resources>
|
||||
<HierarchicalDataTemplate DataType="{x:Type EgtWPFLib5:ImpExpMachiningFamily}" ItemsSource="{Binding MachiningList}">
|
||||
|
||||
<Grid Height="20">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Image Grid.Column="0" Source="{Binding PictureString}" Height="20" Width="20" Margin="0,0,5,0" />
|
||||
<TextBlock Grid.Column="1" Text="{Binding Name}" FontSize="15" Margin="0,-2,5,0" VerticalAlignment="Center" />
|
||||
|
||||
</Grid>
|
||||
|
||||
<!-- multibinding quando sono attivi.-->
|
||||
<HierarchicalDataTemplate.ItemContainerStyle>
|
||||
<Style TargetType="{x:Type TreeViewItem}" >
|
||||
<Setter Property="Foreground" Value="{DynamicResource OmagCut_TreeViewTextColor}" />
|
||||
<Setter Property="IsSelected" Value="{Binding IsSelected}" />
|
||||
<Setter Property="IsExpanded" Value="{Binding IsExpanded}" />
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type TreeViewItem}">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition MinWidth="19" Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition/>
|
||||
</Grid.RowDefinitions>
|
||||
<ToggleButton x:Name="Expander" ClickMode="Press" IsChecked="{Binding IsExpanded, RelativeSource={RelativeSource TemplatedParent}}" Style="{StaticResource ExpandCollapseToggleStyle}"/>
|
||||
<Border x:Name="Bd" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Grid.Column="1" Padding="{TemplateBinding Padding}" SnapsToDevicePixels="true">
|
||||
<ContentPresenter x:Name="PART_Header" ContentSource="Header" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
|
||||
</Border>
|
||||
<ItemsPresenter x:Name="ItemsHost" Grid.ColumnSpan="2" Grid.Column="1" Grid.Row="1"/>
|
||||
<Rectangle Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="4" HorizontalAlignment="Stretch" VerticalAlignment="Top" Fill="{DynamicResource OmagCut_TreeViewDelimiterColor}" Height="1" />
|
||||
</Grid>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="IsExpanded" Value="false">
|
||||
<Setter Property="Visibility" TargetName="ItemsHost" Value="Collapsed"/>
|
||||
</Trigger>
|
||||
<Trigger Property="HasItems" Value="false">
|
||||
<Setter Property="Visibility" TargetName="Expander" Value="Hidden"/>
|
||||
</Trigger>
|
||||
<Trigger Property="IsSelected" Value="true">
|
||||
<Setter Property="Background" TargetName="Bd" Value="{DynamicResource OmagCut_TreeViewSelectedItemBackground}" />
|
||||
<Setter Property="BorderBrush" TargetName="Bd" Value="{DynamicResource OmagCut_TreeViewSelectedItemBorder}"/>
|
||||
<Setter Property="BorderThickness" TargetName="Bd" Value="1"/>
|
||||
<!--<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.HighlightTextBrushKey}}"/>-->
|
||||
</Trigger>
|
||||
<!--<MultiTrigger>
|
||||
<MultiTrigger.Conditions>
|
||||
<Condition Property="IsSelected" Value="true"/>
|
||||
<Condition Property="IsSelectionActive" Value="false"/>
|
||||
</MultiTrigger.Conditions>
|
||||
<Setter Property="Background" TargetName="Bd" Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}"/>
|
||||
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
|
||||
</MultiTrigger>-->
|
||||
<Trigger Property="IsEnabled" Value="false">
|
||||
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
</HierarchicalDataTemplate.ItemContainerStyle>
|
||||
</HierarchicalDataTemplate>
|
||||
|
||||
<DataTemplate DataType="{x:Type EgtWPFLib5:ImpExpMachiningItem}">
|
||||
<Grid Height="20">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<!--<Image Grid.Column="0" Source="{Binding PictureString}" Height="32" Margin="0,8,6,4" />-->
|
||||
<CheckBox Name="ActiveTxBx" Grid.Column="0" Height="15" Width="15"
|
||||
Margin="-15,0,5,0" VerticalContentAlignment="Center"
|
||||
IsChecked="{Binding Active}"
|
||||
Visibility="{Binding Path=DataContext.Active_Visibility,
|
||||
RelativeSource={RelativeSource AncestorType={x:Type EgtWPFLib5:EgtCustomWindow}}}"/>
|
||||
<TextBlock Grid.Column="1" Text="{Binding Name}"
|
||||
Style="{StaticResource OmagCut_ListBoxTextBlock}" />
|
||||
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
|
||||
</TreeView.Resources>
|
||||
</TreeView>
|
||||
</ScrollViewer>
|
||||
|
||||
<Grid Grid.Column="1" Grid.Row="1">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Button Name="OkBtn" Grid.Row="0" Grid.Column="1" Style="{DynamicResource OmagCut_GradientBlueIconButton}"
|
||||
Margin="5,-10,5,15"
|
||||
Command="{Binding OkCommand}">
|
||||
<Image Source="{DynamicResource VImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="ExitBtn" Grid.Row="0" Grid.Column="3" Style="{DynamicResource OmagCut_GradientBlueIconButton}"
|
||||
Margin="5,-10,5,15"
|
||||
IsCancel="True">
|
||||
<Image Source="{DynamicResource XImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
||||
</Border>
|
||||
|
||||
</Window>
|
||||
@@ -0,0 +1,33 @@
|
||||
Imports EgtWPFLib5
|
||||
Public Class ImportExportMachiningWindowWD
|
||||
|
||||
Private m_MainWindow As MainWindow = DirectCast(Application.Current.MainWindow, MainWindow)
|
||||
|
||||
Private WithEvents m_ImportExportMachiningWindowVM As ImportExportMachiningWindowVM
|
||||
|
||||
Private m_OkResult As Boolean = False
|
||||
Public ReadOnly Property OkResult As Boolean
|
||||
Get
|
||||
Return m_OkResult
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Sub New(Owner As Window, ImportExportToolWindowVM As ImportExportMachiningWindowVM)
|
||||
Me.Owner = Owner
|
||||
' This call is required by the designer.
|
||||
InitializeComponent()
|
||||
Me.DataContext = ImportExportToolWindowVM
|
||||
' Assegno al riferimento locale al VM il VM preso dal DataContext
|
||||
m_ImportExportMachiningWindowVM = ImportExportToolWindowVM
|
||||
End Sub
|
||||
Private Sub OkCloseDialogWD() Handles OkBtn.Click
|
||||
m_OkResult = True
|
||||
Me.Close()
|
||||
End Sub
|
||||
|
||||
Private Sub CancelCloseDialogWD() Handles ExitBtn.Click
|
||||
m_OkResult = False
|
||||
Me.Close()
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
@@ -18,7 +18,7 @@
|
||||
<ScrollViewer Grid.Row="0" Margin="20">
|
||||
<TreeView ItemsSource="{Binding FamilyList}" Background="{DynamicResource OmagCut_TreeViewBackGroundColor}">
|
||||
<TreeView.Resources>
|
||||
<HierarchicalDataTemplate DataType="{x:Type EgtWPFLib5:ImpExpFamily}" ItemsSource="{Binding ToolList}">
|
||||
<HierarchicalDataTemplate DataType="{x:Type EgtWPFLib5:ImpExpToolFamily}" ItemsSource="{Binding ToolList}">
|
||||
|
||||
<Grid Height="20">
|
||||
<Grid.ColumnDefinitions>
|
||||
@@ -88,7 +88,7 @@
|
||||
</HierarchicalDataTemplate.ItemContainerStyle>
|
||||
</HierarchicalDataTemplate>
|
||||
|
||||
<DataTemplate DataType="{x:Type EgtWPFLib5:ImpExpItem}">
|
||||
<DataTemplate DataType="{x:Type EgtWPFLib5:ImpExpToolItem}">
|
||||
<Grid Height="20">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
|
||||
@@ -5,6 +5,13 @@ Public Class ImportExportToolWD
|
||||
|
||||
Private WithEvents m_ImportExportToolWindowVM As ImportExportToolWindowVM
|
||||
|
||||
Private m_OkResult As Boolean = False
|
||||
Public ReadOnly Property OkResult As Boolean
|
||||
Get
|
||||
Return m_OkResult
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Sub New(Owner As Window, ImportExportToolWindowVM As ImportExportToolWindowVM)
|
||||
Me.Owner = Owner
|
||||
' This call is required by the designer.
|
||||
@@ -17,4 +24,15 @@ Public Class ImportExportToolWD
|
||||
'Private Sub CloseWindow(bDialogResult As Boolean) Handles m_ImportExportToolWindowVM.m_CloseWindow
|
||||
' Me.DialogResult = bDialogResult
|
||||
'End Sub
|
||||
|
||||
Private Sub OkCloseDialogWD() Handles OkBtn.Click
|
||||
m_OkResult = True
|
||||
Me.Close()
|
||||
End Sub
|
||||
|
||||
Private Sub CancelCloseDialogWD() Handles ExitBtn.Click
|
||||
m_OkResult = False
|
||||
Me.Close()
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
@@ -24,9 +24,10 @@
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<ToggleButton Name="AlarmsBtn" Style="{DynamicResource OmagCut_YellowIconToggleButton}">
|
||||
@@ -41,10 +42,13 @@
|
||||
<ToggleButton Name="PolishingsBtn" Grid.Column="3" Style="{DynamicResource OmagCut_BlueIconToggleButton}">
|
||||
<!--<Image Source="{DynamicResource LucidaturaImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>-->
|
||||
</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}"/>
|
||||
</ToggleButton>
|
||||
<ToggleButton Name="StatisticsBtn" Grid.Column="5" Style="{DynamicResource OmagCut_YellowToggleButton}">
|
||||
<ToggleButton Name="StatisticsBtn" Grid.Column="6" Style="{DynamicResource OmagCut_YellowToggleButton}">
|
||||
|
||||
</ToggleButton>
|
||||
|
||||
|
||||
@@ -10,6 +10,7 @@ Public Class MachinePageUC
|
||||
Friend m_ToolsDbPageUC As ToolsDbPageUC
|
||||
Friend m_MachiningDbPageUC As MachiningDbPageUC
|
||||
Friend m_PolishingsPageUC As PolishingsPageUC
|
||||
Friend m_WaterJetPageUC As WaterJetPageUC
|
||||
Friend m_MachineCNPageUC As MachineCNPageUC
|
||||
Friend m_StatisticsPageUC As StatisticsPageUC
|
||||
|
||||
@@ -21,6 +22,7 @@ Public Class MachinePageUC
|
||||
ToolsDb
|
||||
MachiningDb
|
||||
Polishings
|
||||
WaterJet
|
||||
MachineCN
|
||||
Statistics
|
||||
End Enum
|
||||
@@ -32,6 +34,7 @@ Public Class MachinePageUC
|
||||
m_ToolsDbPageUC = New ToolsDbPageUC
|
||||
m_MachiningDbPageUC = New MachiningDbPageUC
|
||||
m_PolishingsPageUC = New PolishingsPageUC
|
||||
m_WaterJetPageUC = New WaterJetPageUC
|
||||
m_MachineCNPageUC = New MachineCNPageUC
|
||||
m_StatisticsPageUC = New StatisticsPageUC
|
||||
|
||||
@@ -40,6 +43,7 @@ Public Class MachinePageUC
|
||||
m_ToolsDbPageUC.SetValue(Grid.RowProperty, 1)
|
||||
m_MachiningDbPageUC.SetValue(Grid.RowProperty, 1)
|
||||
m_PolishingsPageUC.SetValue(Grid.RowProperty, 1)
|
||||
m_WaterJetPageUC.SetValue(Grid.RowProperty, 1)
|
||||
m_MachineCNPageUC.SetValue(Grid.RowProperty, 1)
|
||||
m_StatisticsPageUC.SetValue(Grid.RowProperty, 1)
|
||||
|
||||
@@ -47,6 +51,7 @@ Public Class MachinePageUC
|
||||
ToolsDBBtn.ToolTip = EgtMsg(MSG_MACHINEPAGEUC + 6)
|
||||
MachiningDBBtn.ToolTip = EgtMsg(MSG_MACHINEPAGEUC + 7)
|
||||
PolishingsBtn.Content = EgtMsg(91090)
|
||||
WaterJetBtn.Content = EgtMsg(91128)
|
||||
TestingPageBtn.ToolTip = EgtMsg(MSG_MACHINEPAGEUC + 8)
|
||||
StatisticsBtn.Content = EgtMsg(90709)
|
||||
|
||||
@@ -55,10 +60,14 @@ Public Class MachinePageUC
|
||||
m_ActiveMachinePage = MachinePages.Alarms
|
||||
|
||||
' 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
|
||||
End If
|
||||
|
||||
If Not m_MainWindow.m_CurrentMachine.bWaterJet Or Not m_MainWindow.m_CurrentMachine.bFromDBWaterJet Then
|
||||
WaterJetBtn.IsEnabled = False
|
||||
End If
|
||||
|
||||
' Se controllo numerico 0, disattivo la pagina macchina
|
||||
If GetPrivateProfileInt(S_NUMERICALCONTROL, K_TYPE, 0, m_MainWindow.GetMachIniFile()) = 0 Then
|
||||
TestingPageBtn.IsEnabled = False
|
||||
@@ -134,6 +143,22 @@ Public Class MachinePageUC
|
||||
MachinePageGrid.Children.Remove(m_PolishingsPageUC)
|
||||
MachinePageGrid.Children.Add(m_AlarmsPageUC)
|
||||
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
|
||||
AlarmsBtn.IsChecked = True
|
||||
TestingPageBtn.IsChecked = False
|
||||
@@ -188,6 +213,22 @@ Public Class MachinePageUC
|
||||
MachinePageGrid.Children.Remove(m_PolishingsPageUC)
|
||||
MachinePageGrid.Children.Add(m_ToolsDbPageUC)
|
||||
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
|
||||
ToolsDBBtn.IsChecked = True
|
||||
TestingPageBtn.IsChecked = False
|
||||
@@ -242,6 +283,22 @@ Public Class MachinePageUC
|
||||
MachinePageGrid.Children.Remove(m_PolishingsPageUC)
|
||||
MachinePageGrid.Children.Add(m_MachiningDbPageUC)
|
||||
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
|
||||
MachiningDBBtn.IsChecked = True
|
||||
TestingPageBtn.IsChecked = False
|
||||
@@ -299,6 +356,22 @@ Public Class MachinePageUC
|
||||
m_ActiveMachinePage = MachinePages.Polishings
|
||||
Case MachinePages.Polishings
|
||||
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
|
||||
PolishingsBtn.IsChecked = True
|
||||
TestingPageBtn.IsChecked = False
|
||||
@@ -314,6 +387,77 @@ Public Class MachinePageUC
|
||||
End Select
|
||||
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
|
||||
Select Case m_ActiveMachinePage
|
||||
Case MachinePages.Alarms
|
||||
@@ -367,6 +511,22 @@ Public Class MachinePageUC
|
||||
MachinePageGrid.Children.Remove(m_PolishingsPageUC)
|
||||
MachinePageGrid.Children.Add(m_MachineCNPageUC)
|
||||
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
|
||||
TestingPageBtn.IsChecked = True
|
||||
Case MachinePages.Statistics
|
||||
@@ -431,6 +591,22 @@ Public Class MachinePageUC
|
||||
MachinePageGrid.Children.Remove(m_PolishingsPageUC)
|
||||
MachinePageGrid.Children.Add(m_StatisticsPageUC)
|
||||
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
|
||||
StatisticsBtn.IsChecked = True
|
||||
TestingPageBtn.IsChecked = False
|
||||
@@ -467,6 +643,19 @@ Public Class MachinePageUC
|
||||
MachinePageGrid.Children.Remove(m_PolishingsPageUC)
|
||||
MachinePageGrid.Children.Add(m_AlarmsPageUC)
|
||||
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
|
||||
AlarmsBtn.IsChecked = True
|
||||
TestingPageBtn.IsChecked = False
|
||||
|
||||
@@ -931,14 +931,16 @@
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="11*"/>
|
||||
<ColumnDefinition Width="10*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Button Name="NewBtn" Grid.Column="0" Style="{DynamicResource OmagCut_YellowGradientYellowTextButton}"/>
|
||||
<Button Name="SaveBtn" Grid.Column="1" Style="{DynamicResource OmagCut_YellowGradientYellowTextButton}"/>
|
||||
<Button Name="RemoveBtn" Grid.Column="2" Style="{DynamicResource OmagCut_YellowGradientYellowTextButton}" Padding="0"/>
|
||||
|
||||
<Button Name="ExportBtn" Grid.Column="4" Style="{DynamicResource OmagCut_YellowGradientYellowTextButton}"/>
|
||||
<Button Name="ImportBtn" Grid.Column="5" Style="{DynamicResource OmagCut_YellowGradientYellowTextButton}" Padding="0"/>
|
||||
</Grid>
|
||||
|
||||
</Grid>
|
||||
|
||||
@@ -3,6 +3,7 @@ Imports System.ComponentModel
|
||||
Imports OmagCUT.TreeViewItem
|
||||
Imports EgtUILib
|
||||
Imports EgtWPFLib
|
||||
Imports EgtWPFLib5
|
||||
|
||||
Public Class MachiningDbPageUC
|
||||
|
||||
@@ -78,6 +79,8 @@ Public Class MachiningDbPageUC
|
||||
NewBtn.Content = EgtMsg(MSG_MACHINEPAGEUC + 16)
|
||||
SaveBtn.Content = EgtMsg(MSG_MACHINEPAGEUC + 17)
|
||||
RemoveBtn.Content = EgtMsg(MSG_MACHINEPAGEUC + 18)
|
||||
ExportBtn.Content = "Export"
|
||||
ImportBtn.Content = "Import"
|
||||
|
||||
NameTxBl.Text = EgtMsg(MSG_MACHININGSDBPAGEUC + 1)
|
||||
DepthTxBl.Text = EgtMsg(MSG_MACHININGSDBPAGEUC + 2)
|
||||
@@ -321,6 +324,193 @@ Public Class MachiningDbPageUC
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub ExportBtn_Click(Sender As Object, e As RoutedEventArgs) Handles ExportBtn.Click
|
||||
' contesto corrente
|
||||
EgtSetCurrentContext(m_MainWindow.m_CurrentProjectPageUC.CurrentProjectScene.GetCtx())
|
||||
|
||||
' creo lista lavorazioni per esportazione
|
||||
Dim MachiningToExportList As New ObservableCollection(Of ImpExpMachiningFamily)
|
||||
Dim Family As CathegoryItem
|
||||
Dim Machining As CustomItem
|
||||
For Each Family In MachiningsList
|
||||
Dim ImpExpMachiningFamily As New ImpExpMachiningFamily(Family.Name, Family.nTType)
|
||||
For Each Machining In Family.Items
|
||||
ImpExpMachiningFamily.MachiningList.Add(New ImpExpMachiningItem(Machining.Name, False))
|
||||
Next
|
||||
MachiningToExportList.Add(ImpExpMachiningFamily)
|
||||
Next
|
||||
Dim ExportWndVM As New ImportExportMachiningWindowVM(MachiningToExportList)
|
||||
Dim ExportWnd As New ImportExportMachiningWindowWD(Application.Current.MainWindow, ExportWndVM)
|
||||
|
||||
ExportWnd.ShowDialog()
|
||||
End Sub
|
||||
|
||||
Private Sub ImoportBtn_Click() Handles ImportBtn.Click
|
||||
' contesto corrente
|
||||
EgtSetCurrentContext(m_MainWindow.m_CurrentProjectPageUC.CurrentProjectScene.GetCtx())
|
||||
' apro dialogo di scelta file
|
||||
Dim ImportFileDlg As New Microsoft.Win32.OpenFileDialog() With {
|
||||
.Title = EgtMsg(31161) & " " & EgtMsg(31163),
|
||||
.DefaultExt = ".data",
|
||||
.Filter = "Machinings (.data)|*.data",
|
||||
.CheckFileExists = True,
|
||||
.ValidateNames = True
|
||||
}
|
||||
If ImportFileDlg.ShowDialog() <> True Then Return
|
||||
Dim ImportFilePath As String = ImportFileDlg.FileName
|
||||
' recupero liste utensili da importare
|
||||
Dim ImportFileMachiningNameList As String() = Nothing
|
||||
Dim ImportFileMachiningFamilyList As Integer() = Nothing
|
||||
If Not EgtMdbToBeImported(ImportFilePath, ImportFileMachiningNameList, ImportFileMachiningFamilyList) Then Return
|
||||
' li inserisco in lista per finestra di scelta
|
||||
Dim MachinigToImportList As New ObservableCollection(Of ImpExpMachiningFamily)
|
||||
' creo famiglie di utensili in base a quelle trovate in lista importata
|
||||
For MachiningIndex As Integer = 0 To ImportFileMachiningNameList.Count - 1
|
||||
Dim MachiningName As String = ImportFileMachiningNameList(MachiningIndex)
|
||||
Dim MachiningFamily As Integer = ImportFileMachiningFamilyList(MachiningIndex)
|
||||
MachiningFamily = MachiningFamily And
|
||||
(MCH_MY.DRILLING Or
|
||||
MCH_MY.SAWING Or
|
||||
MCH_MY.MILLING Or
|
||||
MCH_MY.POCKETING Or
|
||||
MCH_MY.MORTISING Or
|
||||
MCH_MY.SAWROUGHING Or
|
||||
MCH_MY.SAWFINISHING Or
|
||||
MCH_MY.GENMACHINING Or
|
||||
MCH_MY.CHISELING Or
|
||||
MCH_MY.SURFROUGHING Or
|
||||
MCH_MY.SURFFINISHING Or
|
||||
MCH_MY.WATERJETTING)
|
||||
Dim bFounded As Boolean = False
|
||||
Dim MachinigToImportFamily As ImpExpMachiningFamily
|
||||
For Each MachinigToImportFamily In MachinigToImportList
|
||||
If (MachiningFamily = MachinigToImportFamily.FamilyType) Then
|
||||
MachinigToImportFamily.MachiningList.Add(New ImpExpMachiningItem(MachiningName, AlreadyExist(MachiningName)))
|
||||
bFounded = True
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
If Not bFounded Then
|
||||
Dim NewFamily As New ImpExpMachiningFamily(GetMachiningFamilyName(MachiningFamily), MachiningFamily)
|
||||
NewFamily.MachiningList.Add(New ImpExpMachiningItem(MachiningName, AlreadyExist(MachiningName)))
|
||||
MachinigToImportList.Add(NewFamily)
|
||||
End If
|
||||
Next
|
||||
Dim ImportWndVM As New ImportExportMachiningWindowVM(MachinigToImportList, ImportFilePath, ImportFileMachiningNameList)
|
||||
Dim ImportWnd As New ImportExportMachiningWindowWD(Application.Current.MainWindow, ImportWndVM)
|
||||
|
||||
ImportWnd.ShowDialog()
|
||||
' Aggiungo all'albero visualizzato gli utensili appena importati
|
||||
If ImportWnd.OkResult Then
|
||||
LoadImportedMachineMachinings(ImportWndVM.vsImported)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Function AlreadyExist(MachiningName As String) As Boolean
|
||||
Dim MachiningFamily As CathegoryItem
|
||||
For Each MachiningFamily In MachiningsList
|
||||
Dim MachiningItem As CustomItem
|
||||
For Each MachiningItem In MachiningFamily.Items
|
||||
If MachiningName = MachiningItem.Name Then
|
||||
Return True
|
||||
End If
|
||||
Next
|
||||
Next
|
||||
Return False
|
||||
End Function
|
||||
|
||||
Private Function GetMachiningFamilyName(NewMachinigFamily As Integer) As String
|
||||
Dim MachiningFamily As CathegoryItem
|
||||
For Each MachiningFamily In MachiningsList
|
||||
If NewMachinigFamily = MachiningFamily.nTType Then
|
||||
Return MachiningFamily.Name
|
||||
End If
|
||||
Next
|
||||
Return ""
|
||||
End Function
|
||||
|
||||
Private Sub LoadImportedMachineMachinings(vsImportedMachinings As String())
|
||||
' Leggo tutte le lavorazioni presenti nella Macchina (quindi anche quelli appena importati).
|
||||
Dim ActiveMachiningsFamilies() As MachiningsType = MyReadMachiningFamilies(m_MainWindow.m_CurrentMachine.sMachIniFile)
|
||||
Dim MachiningsFamilyIndex As Integer = 0
|
||||
Dim MachiningsFamilyItem As MachiningsType
|
||||
For Each MachiningsFamilyItem In ActiveMachiningsFamilies
|
||||
Dim FamilyTreeView As New CathegoryItem(MachiningsFamilyItem.Name, MachiningsFamilyItem.Id)
|
||||
Dim MachiningFamilyItem = MachiningsList.FirstOrDefault(Function(MachiningFamily) MachiningsFamilyItem.Id = MachiningFamily.nTType)
|
||||
If IsNothing(MachiningFamilyItem) Then
|
||||
MachiningsList.Insert(MachiningsFamilyIndex, FamilyTreeView)
|
||||
End If
|
||||
Dim nType As Integer = 0
|
||||
Dim MachiningName As String = String.Empty
|
||||
Dim MachiningIndex As Integer = 0
|
||||
EgtSetCurrentContext(m_MainWindow.m_CurrentProjectPageUC.CurrentProjectScene.GetCtx())
|
||||
Dim bFound As Boolean = EgtMdbGetFirstMachining(MachiningsFamilyItem.Id, MachiningName)
|
||||
While bFound
|
||||
Dim MachiningItem = MachiningsList(MachiningsFamilyIndex).Items.FirstOrDefault(Function(Machining) Machining.Name = MachiningName)
|
||||
Dim bInList As Boolean = vsImportedMachinings.Contains(MachiningName)
|
||||
If bInList Then
|
||||
' Se una lavorazione è presente nella MachiningsList visualizzata ma nel contempo è nell'array vsImported
|
||||
' vuol dire che è stata sovrascritta perciò la rimuovo
|
||||
MachiningsList(MachiningsFamilyIndex).Items.Remove(MachiningsList(MachiningsFamilyIndex).Items.FirstOrDefault(Function(Machining) Machining.Name = MachiningName))
|
||||
End If
|
||||
If bInList OrElse IsNothing(MachiningItem) Then
|
||||
' recupero tuuid
|
||||
EgtMdbSetCurrMachining(MachiningName)
|
||||
Dim sCurrMachTUUID As String = String.Empty
|
||||
EgtMdbGetCurrMachiningParam(MCH_MP.TUUID, sCurrMachTUUID)
|
||||
' aggiungo la lavorazione importata
|
||||
MachiningsList(MachiningsFamilyIndex).Items.Insert(MachiningIndex, New CustomItem(MachiningName, MachiningsFamilyItem.Id, ToolDbUtility.IsToolInDb(sCurrMachTUUID)))
|
||||
' eventualmente evidezio l'ultimo elemento inserito (ERRORE: non espando l'albero)
|
||||
'MachiningsList(MachiningsFamilyIndex).Items(MachiningIndex).IsSelected = True
|
||||
End If
|
||||
MachiningIndex += 1
|
||||
bFound = EgtMdbGetNextMachining(MachiningsFamilyItem.Id, MachiningName)
|
||||
End While
|
||||
MachiningsFamilyIndex += 1
|
||||
Next
|
||||
End Sub
|
||||
|
||||
Public Function MyReadMachiningFamilies(sMachineIniPath As String) As MachiningsType()
|
||||
Dim ActiveMachiningsFamiliesList As New List(Of MachiningsType)
|
||||
' Se il materiale lavorato è Marmo l'ordine di lettura e inserimento di Foratura e Taglio di lama nelle famiglie di lavorazioni attive è invertito
|
||||
|
||||
If EgtUILib.GetPrivateProfileInt(S_MACHININGS, K_SAWING, 0, sMachineIniPath) <> 0 Then
|
||||
ActiveMachiningsFamiliesList.Add(New MachiningsType With {.Id = MCH_MY.SAWING, .Name = EgtMsg(31200 + 2)})
|
||||
End If
|
||||
If EgtUILib.GetPrivateProfileInt(S_MACHININGS, K_DRILLING, 0, sMachineIniPath) <> 0 Then
|
||||
ActiveMachiningsFamiliesList.Add(New MachiningsType With {.Id = MCH_MY.DRILLING, .Name = EgtMsg(31200 + 1)})
|
||||
End If
|
||||
|
||||
If EgtUILib.GetPrivateProfileInt(S_MACHININGS, K_MILLING, 0, sMachineIniPath) <> 0 Then
|
||||
ActiveMachiningsFamiliesList.Add(New MachiningsType With {.Id = MCH_MY.MILLING, .Name = EgtMsg(31200 + 3)})
|
||||
End If
|
||||
If EgtUILib.GetPrivateProfileInt(S_MACHININGS, K_POCKETING, 0, sMachineIniPath) <> 0 Then
|
||||
ActiveMachiningsFamiliesList.Add(New MachiningsType With {.Id = MCH_MY.POCKETING, .Name = EgtMsg(31200 + 4)})
|
||||
End If
|
||||
If EgtUILib.GetPrivateProfileInt(S_MACHININGS, K_MORTISING, 0, sMachineIniPath) <> 0 Then
|
||||
ActiveMachiningsFamiliesList.Add(New MachiningsType With {.Id = MCH_MY.MORTISING, .Name = EgtMsg(31200 + 5)})
|
||||
End If
|
||||
If EgtUILib.GetPrivateProfileInt(S_MACHININGS, K_SAWROUGHING, 0, sMachineIniPath) <> 0 Then
|
||||
ActiveMachiningsFamiliesList.Add(New MachiningsType With {.Id = MCH_MY.SAWROUGHING, .Name = EgtMsg(31200 + 6)})
|
||||
End If
|
||||
If EgtUILib.GetPrivateProfileInt(S_MACHININGS, K_SAWFINISHING, 0, sMachineIniPath) <> 0 Then
|
||||
ActiveMachiningsFamiliesList.Add(New MachiningsType With {.Id = MCH_MY.SAWFINISHING, .Name = EgtMsg(31200 + 7)})
|
||||
End If
|
||||
If EgtUILib.GetPrivateProfileInt(S_MACHININGS, K_GENMACHINING, 0, sMachineIniPath) <> 0 Then
|
||||
ActiveMachiningsFamiliesList.Add(New MachiningsType With {.Id = MCH_MY.GENMACHINING, .Name = EgtMsg(31200 + 8)})
|
||||
End If
|
||||
If EgtUILib.GetPrivateProfileInt(S_MACHININGS, K_CHISELING, 0, sMachineIniPath) <> 0 Then
|
||||
ActiveMachiningsFamiliesList.Add(New MachiningsType With {.Id = MCH_MY.CHISELING, .Name = EgtMsg(31200 + 9)})
|
||||
End If
|
||||
If EgtUILib.GetPrivateProfileInt(S_MACHININGS, K_SURFFINISHING, 0, sMachineIniPath) <> 0 Then
|
||||
ActiveMachiningsFamiliesList.Add(New MachiningsType With {.Id = MCH_MY.SURFFINISHING, .Name = EgtMsg(31211)})
|
||||
End If
|
||||
If EgtUILib.GetPrivateProfileInt(S_MACHININGS, K_WATERJETTING, 0, sMachineIniPath) <> 0 Then
|
||||
ActiveMachiningsFamiliesList.Add(New MachiningsType With {.Id = MCH_MY.WATERJETTING, .Name = EgtMsg(31210)})
|
||||
End If
|
||||
Return ActiveMachiningsFamiliesList.ToArray
|
||||
End Function
|
||||
|
||||
Private Sub InitializeMachiningFamily(bEnabled As Boolean, nFType As Integer, sFName As String)
|
||||
If Not bEnabled Then Return
|
||||
' Inserisco categoria ed eventuali elementi
|
||||
@@ -362,12 +552,15 @@ Public Class MachiningDbPageUC
|
||||
HeadSideCmBx.SelectedIndex = ToolInt - 1
|
||||
EgtMdbGetCurrMachiningParam(MCH_MP.LEADINTYPE, ToolInt)
|
||||
If LeadInTypeCmBx.Items.Count > 0 Then
|
||||
LeadInTypeCmBx.SelectedItem = LeadInTypeCmBx.Items(0)
|
||||
LeadInTypeCmBx.SelectedItem = LeadInTypeCmBx.Items(0)
|
||||
Else
|
||||
LeadInTypeCmBx.SelectedItem = Nothing
|
||||
End If
|
||||
For Each LInType As IdNameStruct In LeadInTypeCmBx.Items
|
||||
If ToolInt = LInType.Id Then LeadInTypeCmBx.SelectedItem = LInType
|
||||
If ToolInt = LInType.Id Then
|
||||
LeadInTypeCmBx.SelectedItem = LInType
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
EgtMdbGetCurrMachiningParam(MCH_MP.EXTLINKTYPE, ToolInt)
|
||||
ExtLinkTypeCmBx.SelectedIndex = ToolInt
|
||||
@@ -515,7 +708,11 @@ Public Class MachiningDbPageUC
|
||||
' Lista materiali
|
||||
m_MaterialsList.Clear()
|
||||
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 And m_MainWindow.m_CurrentMachine.bFromDBWaterJet 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
|
||||
EgtMdbGetCurrMachiningParam(MCH_MP.SYSNOTES, ToolString)
|
||||
If ToolString <> String.Empty Then
|
||||
@@ -523,14 +720,30 @@ Public Class MachiningDbPageUC
|
||||
Dim Index As Integer = 0
|
||||
For Each Material As MachiningMaterial In m_MaterialsList
|
||||
Dim Param() As String = sItems(Index).Split(",".ToCharArray)
|
||||
Dim SubParam() As String = Param(0).Split(".".ToCharArray)
|
||||
Dim nParId As Integer = 0
|
||||
If StringToInt(Param(0), nParId) AndAlso nParId = Material.nId Then
|
||||
StringToDouble(Param(1), Material.dMinThickness)
|
||||
StringToDouble(Param(2), Material.dMaxThickness)
|
||||
Material.VerifyIfActive()
|
||||
Index += 1
|
||||
Dim nSubParId As Integer = 0
|
||||
If m_MainWindow.m_CurrentMachine.bWaterJet And m_MainWindow.m_CurrentMachine.bFromDBWaterJet Then
|
||||
If StringToInt(SubParam(0), nParId) AndAlso nParId = Material.nId AndAlso SubParam.Count > 1 AndAlso
|
||||
StringToInt(SubParam(1), nSubParId) AndAlso nSubParId = Material.nSubId Then
|
||||
|
||||
StringToDouble(Param(1), Material.dMinThickness)
|
||||
StringToDouble(Param(2), Material.dMaxThickness)
|
||||
Material.VerifyIfActive()
|
||||
Index += 1
|
||||
Else
|
||||
Material.VerifyIfActive()
|
||||
End If
|
||||
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
|
||||
Next
|
||||
End If
|
||||
@@ -609,13 +822,13 @@ Public Class MachiningDbPageUC
|
||||
' Parmetri nascosti di svuotatura
|
||||
If nMachiningType = MCH_MY.POCKETING Then
|
||||
EgtMdbSetCurrMachiningParam(MCH_MP.SUBTYPE, MCH_POCK_SUB.SPIRALOUT)
|
||||
EgtMdbSetCurrMachiningParam( MCH_MP.LEADINTYPE, MCH_POCK_LI.HELIX)
|
||||
' EgtMdbSetCurrMachiningParam( MCH_MP.LEADINTYPE, MCH_POCK_LI.HELIX)
|
||||
Dim dToolDiam As Double = 100
|
||||
If Not IsNothing(ToolCmBx.SelectedItem) Then
|
||||
EgtTdbSetCurrTool( ToolCmBx.SelectedItem.ToString())
|
||||
EgtTdbGetCurrToolParam( MCH_TP.DIAM, dToolDiam)
|
||||
End If
|
||||
EgtMdbSetCurrMachiningParam( MCH_MP.LITANG, 0.495 * dToolDiam)
|
||||
EgtMdbSetCurrMachiningParam(MCH_MP.LITANG, 0.99 * dToolDiam)
|
||||
EgtMdbSetCurrMachiningParam( MCH_MP.LIELEV, 2.0)
|
||||
End If
|
||||
' Parametri WaterJetting
|
||||
@@ -684,8 +897,14 @@ Public Class MachiningDbPageUC
|
||||
' Scrivo stringa materiali da lista
|
||||
Dim sMaterialString As String = String.Empty
|
||||
For Each Material As MachiningMaterial In m_MaterialsList
|
||||
If Material.bIsActive Then
|
||||
sMaterialString += Material.nId.ToString & "," & DoubleToString(Material.dMinThickness, 0) & "," & DoubleToString(Material.dMaxThickness, 0) & ";"
|
||||
If m_MainWindow.m_CurrentMachine.bWaterJet And m_MainWindow.m_CurrentMachine.bFromDBWaterJet Then
|
||||
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
|
||||
Next
|
||||
EgtMdbSetCurrMachiningParam(MCH_MP.SYSNOTES, sMaterialString)
|
||||
@@ -922,30 +1141,26 @@ Public Class MachiningDbPageUC
|
||||
' Definizione della grid TypeGrd con la giusta altezza e numero di righe
|
||||
Dim RowNum As Integer = TypeGrd.RowDefinitions.Count
|
||||
If RowNum > 2 Then
|
||||
' elimino eventuali righe in eccesso
|
||||
For Index As Integer = RowNum - 1 To 2 Step -1
|
||||
TypeGrd.RowDefinitions.RemoveAt(Index)
|
||||
Next
|
||||
LeadInTypeTxBl.SetValue(Grid.ColumnProperty, 2)
|
||||
LeadInTypeCmBx.SetValue(Grid.ColumnProperty, 3)
|
||||
LeadOutTypeTxBl.SetValue(Grid.RowProperty, 1)
|
||||
LeadOutTypeTxBl.SetValue(Grid.ColumnProperty, 2)
|
||||
LeadOutTypeCmBx.SetValue(Grid.RowProperty, 1)
|
||||
LeadOutTypeCmBx.SetValue(Grid.ColumnProperty, 3)
|
||||
TypeBrd.SetValue(Grid.RowProperty, 12)
|
||||
TypeBrd.SetValue(Grid.RowSpanProperty, 6)
|
||||
ElseIf RowNum < 2 Then
|
||||
' costruiso una riga in più da inserire
|
||||
Dim Row As New RowDefinition
|
||||
TypeGrd.RowDefinitions.Add(Row)
|
||||
LeadInTypeTxBl.SetValue(Grid.ColumnProperty, 2)
|
||||
LeadInTypeCmBx.SetValue(Grid.ColumnProperty, 3)
|
||||
LeadOutTypeTxBl.SetValue(Grid.RowProperty, 1)
|
||||
LeadOutTypeTxBl.SetValue(Grid.ColumnProperty, 2)
|
||||
LeadOutTypeCmBx.SetValue(Grid.RowProperty, 1)
|
||||
LeadOutTypeCmBx.SetValue(Grid.ColumnProperty, 3)
|
||||
TypeBrd.SetValue(Grid.RowProperty, 12)
|
||||
TypeBrd.SetValue(Grid.RowSpanProperty, 6)
|
||||
End If
|
||||
LeadInTypeTxBl.SetValue(Grid.RowProperty, 1)
|
||||
LeadInTypeTxBl.SetValue(Grid.ColumnProperty, 0)
|
||||
LeadInTypeCmBx.SetValue(Grid.RowProperty, 1)
|
||||
LeadInTypeCmBx.SetValue(Grid.ColumnProperty, 1)
|
||||
LeadOutTypeTxBl.SetValue(Grid.RowProperty, 1)
|
||||
LeadOutTypeTxBl.SetValue(Grid.ColumnProperty, 2)
|
||||
LeadOutTypeCmBx.SetValue(Grid.RowProperty, 1)
|
||||
LeadOutTypeCmBx.SetValue(Grid.ColumnProperty, 3)
|
||||
TypeBrd.SetValue(Grid.RowProperty, 12)
|
||||
TypeBrd.SetValue(Grid.RowSpanProperty, 6)
|
||||
|
||||
LeadInTypeTxBl.Visibility = Windows.Visibility.Visible
|
||||
LeadInTypeCmBx.Visibility = Windows.Visibility.Visible
|
||||
ExtLinkTypeTxBl.Visibility = Windows.Visibility.Hidden
|
||||
@@ -1563,7 +1778,7 @@ Public Class MachiningDbPageUC
|
||||
StepTypeTxBl.Visibility = Windows.Visibility.Hidden
|
||||
StepTypeCmBx.Visibility = Windows.Visibility.Hidden
|
||||
SideBrd.SetValue(Grid.RowProperty, 9)
|
||||
SideBrd.Visibility = Windows.Visibility.Visible
|
||||
SideBrd.Visibility = Windows.Visibility.Hidden
|
||||
WorkSideTxBl.Visibility = Windows.Visibility.Hidden
|
||||
WorkSideCmBx.Visibility = Windows.Visibility.Hidden
|
||||
HeadSideTxBl.Visibility = Windows.Visibility.Hidden
|
||||
@@ -1575,15 +1790,22 @@ Public Class MachiningDbPageUC
|
||||
For Index As Integer = RowNum - 1 To 2 Step -1
|
||||
TypeGrd.RowDefinitions.RemoveAt(Index)
|
||||
Next
|
||||
LeadInTypeTxBl.SetValue(Grid.ColumnProperty, 2)
|
||||
LeadInTypeCmBx.SetValue(Grid.ColumnProperty, 3)
|
||||
LeadOutTypeTxBl.SetValue(Grid.RowProperty, 1)
|
||||
LeadOutTypeTxBl.SetValue(Grid.ColumnProperty, 2)
|
||||
LeadOutTypeCmBx.SetValue(Grid.RowProperty, 1)
|
||||
LeadOutTypeCmBx.SetValue(Grid.ColumnProperty, 3)
|
||||
TypeBrd.SetValue(Grid.RowProperty, 12)
|
||||
TypeBrd.SetValue(Grid.RowSpanProperty, 6)
|
||||
ElseIf RowNum < 2 Then
|
||||
' costruiso una riga in più da inserire
|
||||
Dim Row As New RowDefinition
|
||||
TypeGrd.RowDefinitions.Add(Row)
|
||||
End If
|
||||
LeadInTypeTxBl.SetValue(Grid.RowProperty, 1)
|
||||
LeadInTypeTxBl.SetValue(Grid.ColumnProperty, 0)
|
||||
LeadInTypeCmBx.SetValue(Grid.RowProperty, 1)
|
||||
LeadInTypeCmBx.SetValue(Grid.ColumnProperty, 1)
|
||||
LeadOutTypeTxBl.SetValue(Grid.RowProperty, 1)
|
||||
LeadOutTypeTxBl.SetValue(Grid.ColumnProperty, 2)
|
||||
LeadOutTypeCmBx.SetValue(Grid.RowProperty, 1)
|
||||
LeadOutTypeCmBx.SetValue(Grid.ColumnProperty, 3)
|
||||
TypeBrd.SetValue(Grid.RowProperty, 12)
|
||||
TypeBrd.SetValue(Grid.RowSpanProperty, 6)
|
||||
|
||||
LeadInTypeTxBl.Visibility = Windows.Visibility.Visible
|
||||
LeadInTypeCmBx.Visibility = Windows.Visibility.Visible
|
||||
ExtLinkTypeTxBl.Visibility = Windows.Visibility.Hidden
|
||||
@@ -2068,6 +2290,16 @@ Public Class MachiningDbPageUC
|
||||
|
||||
Private Sub MaxThicknessTxBx_EgtClosed(sender As Object, e As EventArgs) Handles MaxThicknessTxBx.EgtClosed
|
||||
Dim SelectedMaterial As MachiningMaterial = MaterialsList.SelectedItem
|
||||
Dim dMaxThick As Double = 0
|
||||
If m_MainWindow.m_CurrentMachine.bWaterJet And m_MainWindow.m_CurrentMachine.bFromDBWaterJet 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)
|
||||
SelectedMaterial.VerifyIfActive()
|
||||
End Sub
|
||||
@@ -2143,7 +2375,6 @@ Public Class MachiningDbPageUC
|
||||
Case MCH_MY.POCKETING
|
||||
LeadInTypeCmBx.ItemsSource = New ObservableCollection(Of IdNameStruct)(
|
||||
{New IdNameStruct(MCH_POCK_LI.NONE, EgtMsg(MSG_COMBOBOXPARAM + 42)),
|
||||
New IdNameStruct(MCH_POCK_LI.GLIDE, EgtMsg(MSG_COMBOBOXPARAM + 48)),
|
||||
New IdNameStruct(MCH_POCK_LI.ZIGZAG, EgtMsg(MSG_COMBOBOXPARAM + 38)),
|
||||
New IdNameStruct(MCH_POCK_LI.HELIX, EgtMsg(MSG_COMBOBOXPARAM + 49))})
|
||||
LeadOutTypeCmBx.ItemsSource = New ObservableCollection(Of IdNameStruct)(
|
||||
@@ -2215,6 +2446,7 @@ Class MachiningMaterial
|
||||
Implements INotifyPropertyChanged
|
||||
|
||||
Private m_nId As Integer
|
||||
Private m_nSubId As Integer
|
||||
Private m_sName As String
|
||||
Private m_dMinThickness As Double
|
||||
Private m_dMaxThickness As Double
|
||||
@@ -2226,6 +2458,12 @@ Class MachiningMaterial
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property nSubId As Integer
|
||||
Get
|
||||
Return m_nSubId
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property Name As String
|
||||
Get
|
||||
Return m_sName
|
||||
@@ -2264,6 +2502,15 @@ Class MachiningMaterial
|
||||
m_bIsActive = False
|
||||
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()
|
||||
Dim bIsActive As Boolean = ( m_dMaxThickness > m_dMinThickness + EPS_SMALL)
|
||||
If bIsActive <> m_bIsActive Then
|
||||
|
||||
@@ -434,17 +434,16 @@
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="10*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="9*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Button Name="NewBtn" Grid.Column="0" Style="{DynamicResource OmagCut_YellowGradientYellowTextButton}"/>
|
||||
<Button Name="SaveBtn" Grid.Column="1" Style="{DynamicResource OmagCut_YellowGradientYellowTextButton}"/>
|
||||
<Button Name="RemoveBtn" Grid.Column="2" Style="{DynamicResource OmagCut_YellowGradientYellowTextButton}" Padding="0"/>
|
||||
<Button Name="ExportBtn" Grid.Column="3" Style="{DynamicResource OmagCut_YellowGradientYellowTextButton}" Padding="0"/>
|
||||
<Button Name="ImportBtn" Grid.Column="4" Style="{DynamicResource OmagCut_YellowGradientYellowTextButton}" Padding="0"/>
|
||||
<Button Name="ExportBtn" Grid.Column="4" Style="{DynamicResource OmagCut_YellowGradientYellowTextButton}" Padding="0"/>
|
||||
<Button Name="ImportBtn" Grid.Column="5" Style="{DynamicResource OmagCut_YellowGradientYellowTextButton}" Padding="0"/>
|
||||
|
||||
</Grid>
|
||||
|
||||
|
||||
@@ -56,8 +56,8 @@ Public Class ToolsDbPageUC
|
||||
NewBtn.Content = EgtMsg(MSG_MACHINEPAGEUC + 15)
|
||||
SaveBtn.Content = EgtMsg(MSG_MACHINEPAGEUC + 17)
|
||||
RemoveBtn.Content = EgtMsg(MSG_MACHINEPAGEUC + 18)
|
||||
ExportBtn.Content = "Export"
|
||||
ImportBtn.Content = "Import"
|
||||
ExportBtn.Content = EgtMsg(91126)
|
||||
ImportBtn.Content = EgtMsg(91127)
|
||||
|
||||
NameTxBl.Text = EgtMsg(MSG_TOOLSDBPAGEUC + 1)
|
||||
TCPosTxBl.Text = EgtMsg(MSG_TOOLSDBPAGEUC + 2)
|
||||
@@ -177,8 +177,8 @@ Public Class ToolsDbPageUC
|
||||
End If
|
||||
' Verifico se macchina con nuovo SawbladeMaker
|
||||
Dim sSawBladeMaker As String = ""
|
||||
GetPrivateProfileString( S_TOOLS, K_SAWBLADEMAKER, "", sSawBladeMaker, m_MainWindow.GetIniFile())
|
||||
m_bNewSawbladeMaker = String.Compare( sSawBladeMaker, "MakeStoneSawBlade.lua", True)
|
||||
GetPrivateProfileString(S_TOOLS, K_SAWBLADEMAKER, "", sSawBladeMaker, m_MainWindow.GetIniFile())
|
||||
m_bNewSawbladeMaker = String.Compare(sSawBladeMaker, "MakeStoneSawBlade.lua", True)
|
||||
m_bFirst = False
|
||||
Else
|
||||
EgtSetCurrentContext(m_MainWindow.m_CurrentProjectPageUC.CurrentProjectScene.GetCtx())
|
||||
@@ -493,17 +493,17 @@ Public Class ToolsDbPageUC
|
||||
EgtSetCurrentContext(m_MainWindow.m_CurrentProjectPageUC.CurrentProjectScene.GetCtx())
|
||||
|
||||
' creo lista utensili per esportazione
|
||||
Dim ToolToExportList = New ObservableCollection(Of ImpExpFamily)
|
||||
Dim ToolToExportList = New ObservableCollection(Of ImpExpToolFamily)
|
||||
Dim Family As CathegoryItem
|
||||
Dim Tool As CustomItem
|
||||
For Each Family In ToolsList
|
||||
Dim ImpExpFamily As New ImpExpFamily(Family.Name, Family.nTType)
|
||||
ImpExpFamily.PictureString = "/Resources/ToolsTreeviewImages/Folder.png"
|
||||
Dim ImpExpToolFamily As New ImpExpToolFamily(Family.Name, Family.nTType)
|
||||
ImpExpToolFamily.PictureString = "/Resources/ToolsTreeviewImages/Folder.png"
|
||||
For Each Tool In Family.Items
|
||||
Dim CurrTool = New ImpExpItem(Tool.Name, False)
|
||||
ImpExpFamily.ToolList.Add(CurrTool)
|
||||
Dim CurrTool = New ImpExpToolItem(Tool.Name, False)
|
||||
ImpExpToolFamily.ToolList.Add(CurrTool)
|
||||
Next
|
||||
ToolToExportList.Add(ImpExpFamily)
|
||||
ToolToExportList.Add(ImpExpToolFamily)
|
||||
Next
|
||||
|
||||
Dim ExportWndVM As New ImportExportToolWindowVM(ToolToExportList)
|
||||
@@ -528,9 +528,9 @@ Public Class ToolsDbPageUC
|
||||
' recupero liste utensili da importare
|
||||
Dim ImportFileToolNameList As String() = Nothing
|
||||
Dim ImportFileToolFamilyList As Integer() = Nothing
|
||||
EgtTdbToBeImported(ImportFilePath, ImportFileToolNameList, ImportFileToolFamilyList)
|
||||
If Not EgtTdbToBeImported(ImportFilePath, ImportFileToolNameList, ImportFileToolFamilyList) Then Return
|
||||
' li inserisco in lista per finestra di scelta
|
||||
Dim ToolToImportList As New ObservableCollection(Of ImpExpFamily)
|
||||
Dim ToolToImportList As New ObservableCollection(Of ImpExpToolFamily)
|
||||
' creo famiglie di utensili in base a quelle trovate in lista importata
|
||||
For ToolIndex As Integer = 0 To ImportFileToolNameList.Count - 1
|
||||
Dim ToolName As String = ImportFileToolNameList(ToolIndex)
|
||||
@@ -544,25 +544,26 @@ Public Class ToolsDbPageUC
|
||||
MCH_TF.WATERJET Or
|
||||
MCH_TF.COMPO)
|
||||
Dim bFounded As Boolean = False
|
||||
Dim ToolToImportFamily As ImpExpFamily
|
||||
Dim ToolToImportFamily As ImpExpToolFamily
|
||||
For Each ToolToImportFamily In ToolToImportList
|
||||
If (ToolFamily = ToolToImportFamily.FamilyType) Then
|
||||
ToolToImportFamily.ToolList.Add(New ImpExpItem(ToolName, AlreadyExist(ToolName)))
|
||||
ToolToImportFamily.ToolList.Add(New ImpExpToolItem(ToolName, AlreadyExist(ToolName)))
|
||||
bFounded = True
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
If Not bFounded Then
|
||||
Dim NewFamily As New ImpExpFamily(GetToolFamilyName(ToolFamily), ToolFamily)
|
||||
NewFamily.ToolList.Add(New ImpExpItem(ToolName, AlreadyExist(ToolName)))
|
||||
Dim NewFamily As New ImpExpToolFamily(GetToolFamilyName(ToolFamily), ToolFamily)
|
||||
NewFamily.ToolList.Add(New ImpExpToolItem(ToolName, AlreadyExist(ToolName)))
|
||||
ToolToImportList.Add(NewFamily)
|
||||
End If
|
||||
Next
|
||||
Dim ImportWndVM As New ImportExportToolWindowVM(ToolToImportList, ImportFilePath, ImportFileToolNameList)
|
||||
Dim ImportWnd As New ImportExportToolWD(Application.Current.MainWindow, ImportWndVM)
|
||||
|
||||
If ImportWnd.ShowDialog() Then
|
||||
' Aggiungo all'albero visualizzato gli utensili appena importati
|
||||
ImportWnd.ShowDialog()
|
||||
' Aggiungo all'albero visualizzato gli utensili appena importati
|
||||
If ImportWnd.OkResult Then
|
||||
LoadImportedMachineTools(ImportWndVM.vsImported)
|
||||
End If
|
||||
End Sub
|
||||
@@ -592,31 +593,38 @@ Public Class ToolsDbPageUC
|
||||
|
||||
Private Sub LoadImportedMachineTools(vsImportedTools As String())
|
||||
' Leggo tutti gli utensili presenti nella Macchina (quindi anche quelli appena importati).
|
||||
Dim ActiveToolsFamilies() As ToolsFamily = MachineUtility.ReadToolFamilies(m_CurrMachine.sMachIniFile)
|
||||
Dim ActiveToolsFamilies() As ToolsFamily = MyReadToolFamilies(m_CurrMachine.sMachIniFile)
|
||||
Dim ToolsFamilyIndex As Integer = 0
|
||||
Dim ToolsFamilyItem As ToolsFamily
|
||||
For Each ToolsFamilyItem In ActiveToolsFamilies
|
||||
' dalla lista che ho ricavato dalla libreria recupero gli utensili associati
|
||||
Dim FamilyTreeView As New CathegoryItem(ToolsFamilyItem.Name, ToolsFamilyItem.Id)
|
||||
Dim ToolFamilyItem = ToolsList.FirstOrDefault(Function(ToolFamily) ToolsFamilyItem.Id = FamilyTreeView.nTType)
|
||||
Dim ToolFamilyItem = ToolsList.FirstOrDefault(Function(ToolFamily) ToolFamily.nTType = ToolsFamilyItem.Id)
|
||||
If IsNothing(ToolFamilyItem) Then
|
||||
ToolsList.Insert(ToolsFamilyIndex, FamilyTreeView)
|
||||
Else
|
||||
' ricerco l'indice nella lista Tools
|
||||
|
||||
End If
|
||||
Dim nType As Integer = 0
|
||||
Dim ToolName As String = String.Empty
|
||||
Dim ToolIndex As Integer = 0
|
||||
EgtSetCurrentContext(ToolScene.GetCtx())
|
||||
'EgtSetCurrentContext(ToolScene.GetCtx())
|
||||
EgtSetCurrentContext(m_MainWindow.m_CurrentProjectPageUC.CurrentProjectScene.GetCtx())
|
||||
If EgtTdbGetFirstTool(ToolsFamilyItem.Id, ToolName, nType) Then
|
||||
Dim ToolItem = ToolsList(ToolsFamilyIndex).Items.FirstOrDefault(Function(Tool) Tool.Name = ToolName)
|
||||
If IsNothing(ToolItem) Then
|
||||
' Se leggo un utensile non presente nella ToolsList visualizzata lo aggiungo ad essa.
|
||||
Dim NewToolName As New CustomItem(ToolName, nType)
|
||||
ToolsList(ToolsFamilyIndex).Items.Insert(ToolIndex, NewToolName)
|
||||
'NewToolName.IsSelected = True
|
||||
ElseIf vsImportedTools.Contains(ToolName) Then
|
||||
' Se un utensile è presente nella ToolsList visualizzata ma nel contempo è nell'array vsImported
|
||||
' vuol dire che è stato sovrascritto perciò lo rimuovo e lo riaggiungo alla ToolsList.
|
||||
ToolsList(ToolsFamilyIndex).Items.Remove(ToolsList(ToolsFamilyIndex).Items.FirstOrDefault(Function(Tool) Tool.Name = ToolName))
|
||||
Dim NewToolName As New CustomItem(ToolName, nType)
|
||||
ToolsList(ToolsFamilyIndex).Items.Insert(ToolIndex, NewToolName)
|
||||
'NewToolName.IsSelected = True
|
||||
End If
|
||||
ToolIndex += 1
|
||||
While EgtTdbGetNextTool(ToolsFamilyItem.Id, ToolName, nType)
|
||||
@@ -625,20 +633,60 @@ Public Class ToolsDbPageUC
|
||||
' Se leggo un utensile non presente nella ToolsList visualizzata lo aggiungo ad essa.
|
||||
Dim NewToolName As New CustomItem(ToolName, nType)
|
||||
ToolsList(ToolsFamilyIndex).Items.Insert(ToolIndex, NewToolName)
|
||||
'NewToolName.IsSelected = True
|
||||
ElseIf vsImportedTools.Contains(ToolName) Then
|
||||
' Se un utensile è presente nella ToolsList visualizzata ma nel contempo è nell'array vsImported
|
||||
' vuol dire che è stato sovrascritto perciò lo rimuovo e lo riaggiungo alla ToolsList.
|
||||
ToolsList(ToolsFamilyIndex).Items.Remove(ToolsList(ToolsFamilyIndex).Items.FirstOrDefault(Function(Tool) Tool.Name = ToolName))
|
||||
Dim NewToolName As New CustomItem(ToolName, nType)
|
||||
ToolsList(ToolsFamilyIndex).Items.Insert(ToolIndex, NewToolName)
|
||||
'NewToolName.IsSelected = True
|
||||
End If
|
||||
ToolIndex += 1
|
||||
End While
|
||||
End If
|
||||
ToolsFamilyIndex += 1
|
||||
Next
|
||||
|
||||
End Sub
|
||||
|
||||
Public Function MyReadToolFamilies(sMachineIniPath As String) As ToolsFamily()
|
||||
Dim ActiveToolsFamiliesList As New List(Of ToolsFamily)
|
||||
|
||||
' Se il materiale lavorato è Marmo l'ordine di lettura e inserimento di Punta e Lama nelle famiglie di utensili attivi è invertito
|
||||
If EgtUILib.GetPrivateProfileInt(S_TOOLS, K_SAWBLADE, 0, sMachineIniPath) <> 0 Then
|
||||
ActiveToolsFamiliesList.Add(New ToolsFamily(MCH_TF.SAWBLADE, EgtMsg(31000 + 2)))
|
||||
End If
|
||||
If EgtUILib.GetPrivateProfileInt(S_TOOLS, K_DRILLBIT, 0, sMachineIniPath) <> 0 Then
|
||||
ActiveToolsFamiliesList.Add(New ToolsFamily(MCH_TF.DRILLBIT, EgtMsg(31000 + 1)))
|
||||
End If
|
||||
|
||||
|
||||
If EgtUILib.GetPrivateProfileInt(S_TOOLS, K_MILL, 0, sMachineIniPath) <> 0 Then
|
||||
ActiveToolsFamiliesList.Add(New ToolsFamily(MCH_TF.MILL, EgtMsg(31000 + 3)))
|
||||
End If
|
||||
If EgtUILib.GetPrivateProfileInt(S_TOOLS, "CupWheel", 0, sMachineIniPath) <> 0 Then
|
||||
ActiveToolsFamiliesList.Add(New ToolsFamily(MCH_TF.MILL, EgtMsg(90754)))
|
||||
End If
|
||||
If EgtUILib.GetPrivateProfileInt(S_TOOLS, "PolishingWheel", 0, sMachineIniPath) <> 0 Then
|
||||
ActiveToolsFamiliesList.Add(New ToolsFamily(MCH_TF.MILL, EgtMsg(90756)))
|
||||
End If
|
||||
|
||||
If EgtUILib.GetPrivateProfileInt(S_TOOLS, K_MORTISE, 0, sMachineIniPath) <> 0 Then
|
||||
ActiveToolsFamiliesList.Add(New ToolsFamily(MCH_TF.MORTISE, EgtMsg(31000 + 4)))
|
||||
End If
|
||||
If EgtUILib.GetPrivateProfileInt(S_TOOLS, K_CHISEL, 0, sMachineIniPath) <> 0 Then
|
||||
ActiveToolsFamiliesList.Add(New ToolsFamily(MCH_TF.CHISEL, EgtMsg(31000 + 9)))
|
||||
End If
|
||||
If EgtUILib.GetPrivateProfileInt(S_TOOLS, K_COMPO, 0, sMachineIniPath) <> 0 Then
|
||||
ActiveToolsFamiliesList.Add(New ToolsFamily(MCH_TF.COMPO, EgtMsg(31000 + 5)))
|
||||
End If
|
||||
If EgtUILib.GetPrivateProfileInt(S_TOOLS, K_WATERJET, 0, sMachineIniPath) <> 0 Then
|
||||
ActiveToolsFamiliesList.Add(New ToolsFamily(MCH_TF.WATERJET, EgtMsg(31010)))
|
||||
End If
|
||||
Return ActiveToolsFamiliesList.ToArray
|
||||
End Function
|
||||
|
||||
Friend Sub InitializeToolGroup(bEnabled As Boolean, nTType As Integer, sFName As String)
|
||||
If Not bEnabled Then Return
|
||||
' Inserisco categoria ed eventuali elementi
|
||||
@@ -1035,7 +1083,7 @@ Public Class ToolsDbPageUC
|
||||
Dim dCore, dTh As Double
|
||||
If EgtTdbGetCurrToolParam(MCH_TP.CORE, dCore) AndAlso
|
||||
EgtTdbGetCurrToolParam(MCH_TP.THICK, dTh) Then
|
||||
Dim dL As Double = Math.Max( dVal, 0.0) + ((dCore + dTh) / 2)
|
||||
Dim dL As Double = Math.Max(dVal, 0.0) + ((dCore + dTh) / 2)
|
||||
EgtTdbSetCurrToolParam(MCH_TP.TOTLEN, dL + 1)
|
||||
Return EgtTdbSetCurrToolParam(MCH_TP.LEN, dL)
|
||||
Else
|
||||
@@ -1122,7 +1170,7 @@ Public Class ToolsDbPageUC
|
||||
Dim dToolCore As Double
|
||||
EgtTdbGetCurrToolParam(MCH_TP.CORE, dToolCore)
|
||||
If dToolCore < EPS_SMALL Then
|
||||
dToolCore = If( dToolLen >= dToolThick, dToolThick - 1, 2 * dToolLen - dToolThick)
|
||||
dToolCore = If(dToolLen >= dToolThick, dToolThick - 1, 2 * dToolLen - dToolThick)
|
||||
EgtTdbSetCurrToolParam(MCH_TP.CORE, dToolCore)
|
||||
EgtOutLog("ToolCore too small ->" & DoubleToString(dToolCore, 1))
|
||||
End If
|
||||
|
||||
@@ -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
|
||||
+15
-4
@@ -323,8 +323,8 @@ Class MainWindow
|
||||
' Verifico abilitazione nesting automatico
|
||||
m_bAutoNest = Not String.IsNullOrWhiteSpace(sNestKey)
|
||||
' Recupero opzioni della chiave
|
||||
Dim bKey As Boolean = EgtGetKeyLevel(9423, 2310, 1, m_nKeyLevel) And
|
||||
EgtGetKeyOptions(9423, 2310, 1, m_nKeyOptions)
|
||||
Dim bKey As Boolean = EgtGetKeyLevel(9423, 2401, 1, m_nKeyLevel) And
|
||||
EgtGetKeyOptions(9423, 2401, 1, m_nKeyOptions)
|
||||
' Verifico abilitazione prodotto
|
||||
Dim bProd As Boolean = GetKeyOption(KEY_OPT.CUT_BASE)
|
||||
' Inizializzazione generale di EgtInterface
|
||||
@@ -1068,6 +1068,15 @@ Class MainWindow
|
||||
If Not m_MachinePageUC.m_PolishingsPageUC.SaveKit() Then
|
||||
Return False
|
||||
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
|
||||
Return True
|
||||
End Function
|
||||
@@ -1130,7 +1139,8 @@ Class MainWindow
|
||||
Dim nPrjType As Integer = m_CurrentProjectPageUC.GetCurrentProjectType()
|
||||
' Aggiorno interfaccia
|
||||
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
|
||||
|
||||
' Nomi dei file per OmagVIEW
|
||||
@@ -1875,8 +1885,9 @@ Class MainWindow
|
||||
' deseleziono gli oggetti e spengo il bottone
|
||||
EgtDeselectObj(m_CadCutPageUC.m_NestPage.m_CurrSelectedCurv)
|
||||
EgtDeselectObj(m_CadCutPageUC.m_NestPage.m_CurrSelectedSawCurv)
|
||||
EgtResetMark(m_CadCutPageUC.m_NestPage.m_CurrSelectedSawCurv)
|
||||
m_CadCutPageUC.m_ProjectMgr.TestBtn.IsChecked = False
|
||||
m_CurrentProjectPageUC.m_bSelectCurv = False
|
||||
Me.m_CadCutPageUC.m_NestPage.m_bSelectCurv = False
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
@@ -22,7 +22,7 @@ Imports System.Windows
|
||||
#End If
|
||||
<Assembly: AssemblyCompany("EgalTech s.r.l.")>
|
||||
<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: ComVisible(False)>
|
||||
|
||||
@@ -62,5 +62,5 @@ Imports System.Windows
|
||||
' by using the '*' as shown below:
|
||||
' <Assembly: AssemblyVersion("1.0.*")>
|
||||
|
||||
<Assembly: AssemblyVersion("2.3.12.1")>
|
||||
<Assembly: AssemblyFileVersion("2.3.12.1")>
|
||||
<Assembly: AssemblyVersion("2.4.1.2")>
|
||||
<Assembly: AssemblyFileVersion("2.4.1.2")>
|
||||
|
||||
@@ -11,6 +11,8 @@ Public Class CNCommunication
|
||||
Private m_AlarmsPage As AlarmsPageUC = m_MainWindow.m_MachinePageUC.m_AlarmsPageUC
|
||||
Private m_CurrProjPage As CurrentProjectPageUC = m_MainWindow.m_CurrentProjectPageUC
|
||||
|
||||
Friend m_nCountRefresh As Integer = 0
|
||||
|
||||
' Variabile per tipologia CN
|
||||
Friend m_nNCType As Integer
|
||||
|
||||
@@ -379,6 +381,7 @@ Public Class CNCommunication
|
||||
EgtOutLog("ProcessStart : " & """" & m_sCNSiemensHMIPath & """" & " " & sArg)
|
||||
Process.Start(m_sCNSiemensHMIPath, sArg)
|
||||
m_CN.m_IsSiemensOne = GetPrivateProfileInt(S_NCSIEMENS, K_ISSIEMENSONE, 0, m_MainWindow.GetMachIniFile()) > 0
|
||||
m_CN.m_IsActiveModeSubscription = GetPrivateProfileInt(S_NCSIEMENS, K_ISACTIVEMODESUBSCR, 0, m_MainWindow.GetMachIniFile()) > 0
|
||||
If m_CN.m_IsSiemensOne Then
|
||||
' stati bottoni parte 1
|
||||
m_CN.DVariables_Read_Subscription(m_CN.m_szCnDataVar(CN_generico.CnData.Laser), VarType.TInteger, 0)
|
||||
@@ -395,6 +398,8 @@ Public Class CNCommunication
|
||||
m_CN.DVariables_Read_Subscription(m_CN.m_szCnDataVar(CN_generico.CnData.SpeedOvr), VarType.TDouble, 1)
|
||||
|
||||
GetPrivateProfileString(S_NCSIEMENS, K_DBVARPATH, "", m_CN.m_DbVarPath, m_MainWindow.GetMachIniFile)
|
||||
ElseIf m_CN.m_IsActiveModeSubscription Then
|
||||
m_CN.DVariables_Read_Subscription(m_CN.m_szCnDataVar(CN_generico.CnData.BlowState), VarType.TInteger, 3)
|
||||
End If
|
||||
Catch ex As Exception
|
||||
EgtOutLog("Error starting Process -> NcLink=True type=0")
|
||||
@@ -698,12 +703,17 @@ Public Class CNCommunication
|
||||
m_MachineStatus.DisplayVar()
|
||||
'EgtOutLog("Modo attivato: " & m_CN.read_active_mode & " modo attivo: " & m_nCurrMode)
|
||||
|
||||
Dim TempCurrMode As Short = m_CN.read_active_mode()
|
||||
'EgtOutLog("Machine status: " & TempCurrMode)
|
||||
If TempCurrMode <> m_nCurrMode Then
|
||||
'EgtOutLog("Modo attivo: " & m_CN.read_active_mode)
|
||||
m_nCurrMode = CInt(TempCurrMode)
|
||||
m_MachineStatus.DisplayActiveMode(m_nCurrMode)
|
||||
If m_nCountRefresh > 10 Then
|
||||
Dim TempCurrMode As Short = m_CN.read_active_mode()
|
||||
'EgtOutLog("Machine status: " & TempCurrMode)
|
||||
If TempCurrMode <> m_nCurrMode Then
|
||||
'EgtOutLog("Modo attivo: " & m_CN.read_active_mode)
|
||||
m_nCurrMode = CInt(TempCurrMode)
|
||||
m_MachineStatus.DisplayActiveMode(m_nCurrMode)
|
||||
End If
|
||||
m_nCountRefresh = 0
|
||||
Else
|
||||
m_nCountRefresh = m_nCountRefresh + 1
|
||||
End If
|
||||
|
||||
If m_CN.b_NC_error Then
|
||||
|
||||
@@ -131,7 +131,7 @@ Public Class CN_Siemens
|
||||
|
||||
Public Overrides Function read_active_mode() As Short
|
||||
'EgtOutLog("Modo attivo: " & M_MMFiles.SiemensRet.n_param2)
|
||||
If m_IsSiemensOne Then
|
||||
If m_IsSiemensOne Or m_IsActiveModeSubscription Then
|
||||
Select Case n_data(3)
|
||||
Case 1
|
||||
Return 0
|
||||
@@ -144,7 +144,7 @@ Public Class CN_Siemens
|
||||
End Select
|
||||
Else
|
||||
' per verificare che la comunicazione funzioni correttamente
|
||||
'EgtOutLog("Modo -read_active_mode-: " & M_MMFiles.SiemensRet.n_param2.ToString)
|
||||
EgtOutLog("Modo -read_active_mode-: " & M_MMFiles.SiemensRet.n_param2.ToString)
|
||||
Return M_MMFiles.read_active_mode()
|
||||
'Return CShort(M_MMFiles.SiemensRet.n_param2)
|
||||
End If
|
||||
|
||||
@@ -88,6 +88,8 @@ Public MustInherit Class CN_generico
|
||||
#Region " Interface"
|
||||
|
||||
Friend m_IsSiemensOne As Boolean = False
|
||||
Friend m_IsActiveModeSubscription As Boolean = False
|
||||
|
||||
Friend m_DbVarPath As String = ""
|
||||
|
||||
Public IsFlexiumPlus As Boolean = False
|
||||
|
||||
+20
-20
@@ -476,6 +476,7 @@ Module M_MMFiles
|
||||
SiemensSend.n_param1 = nChannel
|
||||
|
||||
execute_command()
|
||||
|
||||
'EgtOutLog("MDI_command end dell'm_mmFiles")
|
||||
Return SiemensRet.n_result
|
||||
|
||||
@@ -614,7 +615,6 @@ Module M_MMFiles
|
||||
'----------------------------------------------------------------------------------------------------------
|
||||
'
|
||||
Sub execute_command()
|
||||
|
||||
Try
|
||||
' Attesa eventuale busy iniziale
|
||||
Dim nCount As Integer = 0
|
||||
@@ -641,25 +641,25 @@ Module M_MMFiles
|
||||
bEnd = False
|
||||
While Not bEnd
|
||||
Select Case nState
|
||||
Case State.Command_on ' alzato il comando attendo il busy
|
||||
If SiemensRet.b_busy Then
|
||||
nState = State.Busy_On
|
||||
Else
|
||||
System.Threading.Thread.Sleep(50)
|
||||
End If
|
||||
Case State.Busy_On ' trovato il busy abbasso il comando
|
||||
SiemensSend.n_Flag = COMMAND_OFF ' abbasso il comando
|
||||
' scrivo !!!!!
|
||||
Marshal.StructureToPtr(SiemensSend, pView, False)
|
||||
nState = State.Command_off
|
||||
Case State.Command_off ' abbassato il comando attendo il busy basso
|
||||
If SiemensRet.b_busy Then
|
||||
System.Threading.Thread.Sleep(50)
|
||||
Else
|
||||
nState = State.Busy_Off
|
||||
End If
|
||||
Case State.Busy_Off
|
||||
bEnd = True
|
||||
Case State.Command_on ' alzato il comando attendo il busy
|
||||
If SiemensRet.b_busy Then
|
||||
nState = State.Busy_On
|
||||
Else
|
||||
System.Threading.Thread.Sleep(50)
|
||||
End If
|
||||
Case State.Busy_On ' trovato il busy abbasso il comando
|
||||
SiemensSend.n_Flag = COMMAND_OFF ' abbasso il comando
|
||||
' scrivo !!!!!
|
||||
Marshal.StructureToPtr(SiemensSend, pView, False)
|
||||
nState = State.Command_off
|
||||
Case State.Command_off ' abbassato il comando attendo il busy basso
|
||||
If SiemensRet.b_busy Then
|
||||
System.Threading.Thread.Sleep(50)
|
||||
Else
|
||||
nState = State.Busy_Off
|
||||
End If
|
||||
Case State.Busy_Off
|
||||
bEnd = True
|
||||
End Select
|
||||
' controllo massimo numero di cicli
|
||||
nCount += 1
|
||||
|
||||
@@ -196,9 +196,16 @@
|
||||
<DependentUpon>CadCutPageUC.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="CAM\CamAuto.vb" />
|
||||
<Compile Include="Machine\ImportExportMachiningWindowWD.xaml.vb">
|
||||
<DependentUpon>ImportExportMachiningWindowWD.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Machine\ImportExportToolWD.xaml.vb">
|
||||
<DependentUpon>ImportExportToolWD.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Machine\WaterJetPageVM.vb" />
|
||||
<Compile Include="Machine\WaterJetPageUC.xaml.vb">
|
||||
<DependentUpon>WaterJetPageUC.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Project\StartLauncheWD.xaml.vb">
|
||||
<DependentUpon>StartLauncheWD.xaml</DependentUpon>
|
||||
</Compile>
|
||||
@@ -434,9 +441,17 @@
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="Machine\ImportExportMachiningWindowWD.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="Machine\ImportExportToolWD.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="Machine\WaterJetPageUC.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="Project\StartLauncheWD.xaml">
|
||||
</Page>
|
||||
<Page Include="Project\CicloStartWD.xaml">
|
||||
|
||||
@@ -332,6 +332,13 @@
|
||||
<Setter Property="Foreground" Value="White"/>
|
||||
</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}">
|
||||
<Setter Property="OverridesDefaultStyle" Value="True" />
|
||||
<Setter Property="Background" Value="#636974"/>
|
||||
|
||||
+22
-1
@@ -470,6 +470,13 @@
|
||||
</Style.Triggers>
|
||||
</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-->
|
||||
@@ -1198,7 +1205,21 @@
|
||||
<Setter Property="KeyboardDimension" Value="300"/>
|
||||
</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}"/>
|
||||
</Style>
|
||||
|
||||
|
||||
@@ -50,6 +50,7 @@ Namespace TreeViewItem
|
||||
Private m_sPictureString As String
|
||||
Private m_nTType As Integer
|
||||
Private m_Items As ObservableCollection(Of CustomItem)
|
||||
Friend m_IsValidTool As Boolean
|
||||
|
||||
Public ReadOnly Property PictureString As String
|
||||
Get
|
||||
@@ -86,12 +87,13 @@ Namespace TreeViewItem
|
||||
'Private m_sTitle As String
|
||||
Private m_nType As Integer
|
||||
|
||||
'Private m_sName As String
|
||||
'Public Property Name As String
|
||||
' Get
|
||||
' Return m_sTitle
|
||||
' Return m_sName
|
||||
' End Get
|
||||
' Set(value As String)
|
||||
' m_sTitle = value
|
||||
' m_sName = value
|
||||
' End Set
|
||||
'End Property
|
||||
|
||||
@@ -101,11 +103,31 @@ Namespace TreeViewItem
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Friend m_IsValidTool As Boolean = True
|
||||
|
||||
Public Property IsValidTool As Boolean
|
||||
Get
|
||||
Return m_IsValidTool
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
If value <> m_IsValidTool Then
|
||||
m_IsValidTool = value
|
||||
NotifyPropertyChanged("ToolColor")
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Sub New(Title As String, nType As Integer)
|
||||
Me.Name = Title
|
||||
m_nType = nType
|
||||
End Sub
|
||||
|
||||
Sub New(sName As String, nType As Integer, bIsValidTool As Boolean)
|
||||
MyBase.Name = sName
|
||||
m_nType = nType
|
||||
m_IsValidTool = bIsValidTool
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
Public Class PartCathegoryItem
|
||||
|
||||
@@ -18,7 +18,7 @@ Class CicloStartWD
|
||||
Me.Top = Owner.Top + Owner.Height / 2 - Me.Height / 2
|
||||
Me.Left = Owner.Left + Owner.Width / 2 - Me.Width / 2
|
||||
' imopposto il messaggio di avvio
|
||||
CicloStartTxbl.Text = "Avvio Ciclo-Start"
|
||||
CicloStartTxbl.Text = EgtMsg(91130) ' Esegui programma?
|
||||
End Sub
|
||||
|
||||
' creo un progetto nuovo
|
||||
|
||||
@@ -6,7 +6,6 @@ Imports EgtWPFLib5
|
||||
|
||||
Public Class CurrentProjectPageUC
|
||||
' Dichiarazione eventi
|
||||
Friend Event OnMouseDownSceneSelCurv(sender As Object, e As System.Windows.Forms.MouseEventArgs)
|
||||
Friend Event OnMouseDownScene(sender As Object, e As System.Windows.Forms.MouseEventArgs)
|
||||
Friend Event OnMouseMoveScene(sender As Object, e As System.Windows.Forms.MouseEventArgs)
|
||||
Friend Event OnMouseUpScene(sender As Object, e As System.Windows.Forms.MouseEventArgs)
|
||||
@@ -24,8 +23,8 @@ Public Class CurrentProjectPageUC
|
||||
' Dati del grezzo
|
||||
Friend m_nRawId As Integer = GDB_ID.NULL
|
||||
Friend m_dRawHeight As Double
|
||||
' pagina impostata per selezionare una lavorazione
|
||||
Friend m_bSelectCurv As Boolean = False
|
||||
'' Flag per impostata per selezionare di una curva
|
||||
'Friend m_bSelectCurv As Boolean = False
|
||||
' Costanti tipo progetto
|
||||
Friend Enum PRJ_TYPE As Integer
|
||||
EMPTY = 0
|
||||
@@ -328,12 +327,7 @@ Public Class CurrentProjectPageUC
|
||||
End Sub
|
||||
|
||||
Private Sub OnMyMouseDownScene(sender As Object, e As System.Windows.Forms.MouseEventArgs) Handles CurrentProjectScene.OnMouseDownScene
|
||||
If m_bSelectCurv Then
|
||||
RaiseEvent OnMouseDownSceneSelCurv(sender, e)
|
||||
Else
|
||||
RaiseEvent OnMouseDownScene(sender, e)
|
||||
End If
|
||||
|
||||
RaiseEvent OnMouseDownScene(sender, e)
|
||||
End Sub
|
||||
|
||||
Private Sub OnMyMouseMoveScene(sender As Object, e As System.Windows.Forms.MouseEventArgs) Handles CurrentProjectScene.OnMouseMoveScene
|
||||
@@ -622,6 +616,8 @@ Public Class CurrentProjectPageUC
|
||||
File.Copy(sPhoto, sNewPhoto, True)
|
||||
Catch ex As FileNotFoundException
|
||||
' non è un problema
|
||||
Catch ex As DirectoryNotFoundException
|
||||
' non è un problema
|
||||
Catch ex As Exception
|
||||
Return False
|
||||
End Try
|
||||
|
||||
@@ -276,7 +276,7 @@ Public Class ProjectMgrUC
|
||||
m_CurrProjPage.SetWarningMessage("Trial Version")
|
||||
#Else
|
||||
' se sono in modalità Test allora eseguo solo il posizionamento della lama
|
||||
If m_CurrProjPage.m_bSelectCurv Then
|
||||
If m_MainWindow.m_CadCutPageUC.m_NestPage.m_bSelectCurv Then
|
||||
' Verifico non sia versione Ufficio
|
||||
If m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.OFFICE_TYPE) Then
|
||||
m_CurrProjPage.SetWarningMessage("Office Version")
|
||||
@@ -336,7 +336,7 @@ Public Class ProjectMgrUC
|
||||
' verifica assi lineari
|
||||
EgtVerifyOutstroke(dX, dY, dZ, dC1, dB1, nStat)
|
||||
If nStat <> 0 Then
|
||||
vtDirT = - vtDirT
|
||||
vtDirT = -vtDirT
|
||||
ptMid -= vtDirT * dThick
|
||||
EgtGetCalcAngles(vtDirT, Vector3d.Z_AX(), nStat, dC1, dB1, dC2, dB2)
|
||||
' calcolo la posizione degli assi lineari X, Y, Z ( correggere il punto ptMid.z sommando il raggio utensile)
|
||||
@@ -736,11 +736,11 @@ Public Class ProjectMgrUC
|
||||
|
||||
Private Sub TestBtn_Click(sender As Object, e As RoutedEventArgs) Handles TestBtn.Click
|
||||
If TestBtn.IsChecked Then
|
||||
m_CurrProjPage.m_bSelectCurv = True
|
||||
m_MainWindow.m_CadCutPageUC.m_NestPage.m_bSelectCurv = True
|
||||
' deseleziono tutto
|
||||
EgtDeselectAll()
|
||||
Else
|
||||
m_CurrProjPage.m_bSelectCurv = False
|
||||
m_MainWindow.m_CadCutPageUC.m_NestPage.m_bSelectCurv = False
|
||||
EgtDeselectObj(m_MainWindow.m_CadCutPageUC.m_NestPage.m_CurrSelectedCurv)
|
||||
EgtDeselectObj(m_MainWindow.m_CadCutPageUC.m_NestPage.m_CurrSelectedSawCurv)
|
||||
End If
|
||||
|
||||
@@ -80,17 +80,35 @@
|
||||
</ComboBox>
|
||||
|
||||
<!--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"/>
|
||||
<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.ColumnDefinitions>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
|
||||
@@ -41,6 +41,7 @@ Public Class ChooseMachining
|
||||
CurrMillingCmBx.ItemsSource = m_MillingList
|
||||
CurrPocketingCmBx.ItemsSource = m_PocketingList
|
||||
CurrWJettingCmBx.ItemsSource = m_WJettingList
|
||||
CurrWJettingQualityCmBx.ItemsSource = m_CurrentMachine.Qualities
|
||||
|
||||
CurrSawingTxBl.Text = EgtMsg(MSG_CHOOSEMACHININGPAGEUC + 1)
|
||||
AuxiliaryMachiningTxBl.Text = EgtMsg(MSG_CHOOSEMACHININGPAGEUC + 2)
|
||||
@@ -59,6 +60,12 @@ Public Class ChooseMachining
|
||||
|
||||
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 --
|
||||
CreateMachiningList(MCH_MY.SAWING, m_CurrentMachine.sCurrSaw, m_SawingList)
|
||||
' aggiungo un campo vuoto
|
||||
@@ -256,19 +263,38 @@ Public Class ChooseMachining
|
||||
If SysNotes <> String.Empty Then
|
||||
Dim MachiningMaterials() = SysNotes.Split(";".ToCharArray)
|
||||
SysNotes = String.Empty
|
||||
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
|
||||
If m_CurrentMachine.bWaterJet And m_CurrentMachine.bFromDBWaterJet Then
|
||||
For Each Material As Object In MachiningMaterials
|
||||
Dim Param() As String = Material.Split(",".ToCharArray)
|
||||
Dim SubParam() As String = Param(0).Split(".".ToCharArray)
|
||||
If SubParam(0) = m_CurrentMachine.CurrMat.nId.ToString() AndAlso SubParam.Count > 1 AndAlso SubParam(1) = m_CurrentMachine.CurrMat.SubId.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
|
||||
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
|
||||
Else
|
||||
Return False
|
||||
@@ -553,7 +579,8 @@ Public Class ChooseMachining
|
||||
Next
|
||||
m_RowNumber = m_RowNumber + 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
|
||||
CurrWJettingCmBx.SelectedItem = m_CurrentMachine.sCurrWaterJetting
|
||||
End If
|
||||
@@ -564,6 +591,22 @@ Public Class ChooseMachining
|
||||
End If
|
||||
CurrWJettingTxBl.Visibility = Windows.Visibility.Visible
|
||||
CurrWJettingCmBx.Visibility = Windows.Visibility.Visible
|
||||
' se DB WaterJet abilitato avrò anche la CmBx della Quality altrimenti espando la CmBx del Waterjetting corrente su tutta la riga
|
||||
If m_MainWindow.m_CurrentMachine.bFromDBWaterJet Then
|
||||
CurrWJettingCmBx.SetValue(Grid.ColumnSpanProperty, 1)
|
||||
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
|
||||
Else
|
||||
CurrWJettingCmBx.SetValue(Grid.ColumnSpanProperty, 3)
|
||||
CurrWJettingQualityCmBx.Visibility = Windows.Visibility.Collapsed
|
||||
End If
|
||||
End If
|
||||
|
||||
Me.Height = 42 * m_RowNumber
|
||||
@@ -590,12 +633,20 @@ Public Class ChooseMachining
|
||||
m_MainWindow.m_CurrentMachine.sCurrWaterJetting = CurrWJettingCmBx.SelectedItem.ToString()
|
||||
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
|
||||
DialogResult = True
|
||||
' Aggiorno i parametri dei tagli diretti
|
||||
m_MainWindow.m_DirectCutPageUC.ReloadParam()
|
||||
End Sub
|
||||
|
||||
Private Sub ExitBtn_Click(sender As Object, e As RoutedEventArgs) Handles ExitBtn.Click
|
||||
DialogResult = False
|
||||
' Aggiorno i parametri dei tagli diretti
|
||||
m_MainWindow.m_DirectCutPageUC.ReloadParam()
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
@@ -140,7 +140,7 @@ Public Class RawPartPageUC
|
||||
' Nascondo bottone dati lastra se non attivato da file .ini
|
||||
m_bSlabId = (Not m_CurrentMachine.bHasRawBarCodeReader And
|
||||
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
|
||||
|
||||
@@ -165,10 +165,16 @@ Public Class RawPartPageUC
|
||||
End Sub
|
||||
|
||||
Private Sub RawPartPage_Loaded(sender As Object, e As RoutedEventArgs)
|
||||
' aggiorno la lista dei materiali
|
||||
Dim Index As Integer = 1
|
||||
If m_CurrentMachine.bWaterJet And m_CurrentMachine.bFromDBWaterJet Then
|
||||
m_CurrentMachine.LoadWJMaterial()
|
||||
End If
|
||||
|
||||
m_CurrProjPage = m_MainWindow.m_CurrentProjectPageUC
|
||||
m_bActive = True
|
||||
' 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)
|
||||
m_MachineButtons.Width = LowerButtonGrid.ActualWidth / 12 * 10
|
||||
' Se disponibile, imposto possibilità di contorno da foto
|
||||
@@ -226,7 +232,7 @@ Public Class RawPartPageUC
|
||||
End If
|
||||
' aggiorno l'apparenza del grezzo
|
||||
AdjustRawPartOnStart()
|
||||
' Altrimenti lo definisco
|
||||
' Altrimenti lo definisco
|
||||
Else
|
||||
' Leggo da Ini gli ultimi valori
|
||||
m_RawLength = GetPrivateProfileDouble(S_RAWPART, K_RAWLENGTH, 2500, m_MainWindow.GetIniFile())
|
||||
@@ -241,12 +247,12 @@ Public Class RawPartPageUC
|
||||
' Eventuale gestione dati lastra
|
||||
If m_bSlabId Then
|
||||
Dim sBlock As String = ""
|
||||
GetPrivateProfileString( S_RAWPART, K_BLOCKNAME, "", sBlock, m_MainWindow.GetIniFile())
|
||||
Dim nSlabNbr As Integer = GetPrivateProfileInt( S_RAWPART, K_SLABNBR, 0, 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())
|
||||
nSlabNbr += 1
|
||||
Dim sSlabNbr As String = nSlabNbr.ToString()
|
||||
WritePrivateProfileString( S_RAWPART, K_SLABNBR, sSlabNbr, m_MainWindow.GetIniFile())
|
||||
Utility.SetBlockAndSlabNbr( sBlock, sSlabNbr)
|
||||
WritePrivateProfileString(S_RAWPART, K_SLABNBR, sSlabNbr, m_MainWindow.GetIniFile())
|
||||
Utility.SetBlockAndSlabNbr(sBlock, sSlabNbr)
|
||||
End If
|
||||
End If
|
||||
' Assegno dati grezzo rettangolare ai textbox
|
||||
@@ -282,8 +288,14 @@ Public Class RawPartPageUC
|
||||
End If
|
||||
EgtZoom(ZM.ALL)
|
||||
End If
|
||||
' Imposto il materiale corrente nella combobox
|
||||
MaterialsCmbx.SelectedItem = m_CurrentMachine.CurrMat
|
||||
'Imposto il materiale corrente nella combobox
|
||||
'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
|
||||
|
||||
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)
|
||||
Case RAWMODE.FROM_LASER
|
||||
Dim ptAcquired As Point3d
|
||||
'----------------------------------------- INIZIO ------------------ se decido di inserire i punti laser manualmente --------------------------------------------------
|
||||
If m_bFromDraw And Not IsNothing(m_ptPrev) Then
|
||||
ptAcquired = m_ptPrev
|
||||
ptAcquired.ToLoc(New Frame3d(m_ptTableMin))
|
||||
'----------------------------------------- FINE ------------------- se decido di inserire i punti laser manualmente --------------------------------------------------
|
||||
ElseIf Not AcquireLaserPoint(ptAcquired) Then
|
||||
m_CurrProjPage.SetErrorMessage(EgtMsg(MSG_RAWPARTPAGEUC + 32))
|
||||
' Se inserimento manuale dei punti laser
|
||||
If m_bFromDraw Then
|
||||
If Not IsNothing(m_ptPrev) Then
|
||||
ptAcquired = m_ptPrev
|
||||
ptAcquired.ToLoc(New Frame3d(m_ptTableMin))
|
||||
Else
|
||||
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
|
||||
' 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
|
||||
@@ -1002,13 +1022,21 @@ Public Class RawPartPageUC
|
||||
m_nPtDmgMode = DMGMODE.NONE
|
||||
Case RAWMODE.DAMAGED_BY_LASER
|
||||
Dim ptAcquired As Point3d
|
||||
'----------------------------------------- INIZIO ------------------ se decido di inserire i punti laser manualmente --------------------------------------------------
|
||||
If m_bFromDraw And Not IsNothing(m_ptPrev) Then
|
||||
ptAcquired = m_ptPrev
|
||||
ptAcquired.ToLoc(New Frame3d(m_ptTableMin))
|
||||
'----------------------------------------- FINE ------------------- se decido di inserire i punti laser manualmente --------------------------------------------------
|
||||
ElseIf Not AcquireLaserPoint(ptAcquired) Then
|
||||
m_CurrProjPage.SetErrorMessage(EgtMsg(MSG_RAWPARTPAGEUC + 32))
|
||||
' Se inserimento manuale dei punti laser
|
||||
If m_bFromDraw Then
|
||||
If Not IsNothing(m_ptPrev) Then
|
||||
ptAcquired = m_ptPrev
|
||||
ptAcquired.ToLoc(New Frame3d(m_ptTableMin))
|
||||
Else
|
||||
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
|
||||
' 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
|
||||
@@ -1050,8 +1078,11 @@ Public Class RawPartPageUC
|
||||
If Not m_MainWindow.m_CNCommunication.GetAxesPositions(dL1, dL2, dL3, dR1, dR2) Then
|
||||
Return False
|
||||
End If
|
||||
' Ricavo dati lama corrente
|
||||
Dim sSaw As String = m_CurrentMachine.sCurrSaw
|
||||
' Recupero dati utensile e testa corrente
|
||||
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)
|
||||
If Not EgtSetCalcTool("", "H3", 1) Then
|
||||
Return False
|
||||
@@ -1060,10 +1091,8 @@ Public Class RawPartPageUC
|
||||
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, dR1, dR2, True, ptTipP1) Then
|
||||
Return False
|
||||
End If
|
||||
' Ora imposto la lama corrente
|
||||
If Not EgtSetCalcTool(sSaw, "H1", 1) Then
|
||||
Return False
|
||||
End If
|
||||
' Reimposto eventuale precedente utensile
|
||||
EgtSetCalcTool(sTool, sHead, nExit)
|
||||
' Porto il tip nell'origine tavola
|
||||
ptAcquired = ptTipP1
|
||||
ptAcquired.ToLoc(New Frame3d(m_ptTableMin))
|
||||
@@ -1776,7 +1805,7 @@ Public Class RawPartPageUC
|
||||
m_MainWindow.m_CNCommunication.m_CN.n_DReadELS_handle = 0
|
||||
' Definisco flag tastatura
|
||||
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
|
||||
m_MainWindow.m_CNCommunication.m_CN.ReadEls_Add_Parameter(ProbingStateNameVar, 3)
|
||||
System.Threading.Thread.Sleep(100)
|
||||
@@ -1813,7 +1842,7 @@ Public Class RawPartPageUC
|
||||
Dim RawThicknessNameVar As String = String.Empty
|
||||
GetPrivateProfileString(S_MACH_PROBING, K_RAWTHICKNESS, "", RawThicknessNameVar, m_MainWindow.GetMachIniFile())
|
||||
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
|
||||
m_MainWindow.m_CNCommunication.m_CN.ReadEls_Add_Parameter(RawThicknessNameVar, 3)
|
||||
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)
|
||||
' Recupero eventuali vecchi dati della lastra
|
||||
If nRawId <> GDB_ID.NULL Then
|
||||
Dim sBlock As String = "" : EgtGetInfo( nRawId, INFO_RAW_BLOCK, sBlock)
|
||||
Dim sSlabNbr As String = "" : EgtGetInfo( nRawId, INFO_RAW_SLABNBR, sSlabNbr)
|
||||
SlabIdWindow.SetBlockName( sBlock)
|
||||
SlabIdWindow.SetSlabNbr( sSlabNbr)
|
||||
Dim sBlock As String = "" : EgtGetInfo(nRawId, INFO_RAW_BLOCK, sBlock)
|
||||
Dim sSlabNbr As String = "" : EgtGetInfo(nRawId, INFO_RAW_SLABNBR, sSlabNbr)
|
||||
SlabIdWindow.SetBlockName(sBlock)
|
||||
SlabIdWindow.SetSlabNbr(sSlabNbr)
|
||||
End If
|
||||
' Visualizzo finestra richiesta dati
|
||||
If SlabIdWindow.ShowDialog() Then
|
||||
@@ -1911,10 +1940,10 @@ Public Class RawPartPageUC
|
||||
Dim sBlock As String = SlabIdWindow.GetBlockName()
|
||||
Dim sSlabNbr As String = SlabIdWindow.GetSlabNbr()
|
||||
' Li assegno
|
||||
Utility.SetBlockAndSlabNbr( sBlock, sSlabNbr)
|
||||
Utility.SetBlockAndSlabNbr(sBlock, sSlabNbr)
|
||||
' Li salvo
|
||||
WritePrivateProfileString( S_RAWPART, K_BLOCKNAME, sBlock, m_MainWindow.GetIniFile())
|
||||
WritePrivateProfileString( S_RAWPART, K_SLABNBR, sSlabNbr, m_MainWindow.GetIniFile())
|
||||
WritePrivateProfileString(S_RAWPART, K_BLOCKNAME, sBlock, m_MainWindow.GetIniFile())
|
||||
WritePrivateProfileString(S_RAWPART, K_SLABNBR, sSlabNbr, m_MainWindow.GetIniFile())
|
||||
' Aggiorno visualizzazione
|
||||
EgtDraw()
|
||||
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.Collections.ObjectModel
|
||||
Imports EgtUILib
|
||||
|
||||
Module Utility
|
||||
@@ -273,4 +274,40 @@ Module Utility
|
||||
Return BackBottomColor
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user