Compare commits
149 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 1bf42ebbc1 | |||
| efa1cb1272 | |||
| 1437d20353 | |||
| 3d4a921719 | |||
| 7815b7ec89 | |||
| 66051943c7 | |||
| 813d224f50 | |||
| 8484087c69 | |||
| 116289cac5 | |||
| 30ee1bcf99 | |||
| a1d7983704 | |||
| 636d3a9eca | |||
| bd70bf1ec9 | |||
| d66b331478 | |||
| aecb8ed442 | |||
| 3e72b216a6 | |||
| 5baa701681 | |||
| e3a1330889 | |||
| aa237fd744 | |||
| ccfc8f89e4 | |||
| a2e28fa134 | |||
| d8c16a34f0 | |||
| 1847154a29 | |||
| 2362c8df61 | |||
| 54127e61ec | |||
| aaa39c3779 | |||
| 78fc3118ab | |||
| 4ff2ac1063 | |||
| edab1024c3 | |||
| 5092385ea4 | |||
| 6cde63cd2e | |||
| 4f12bce90a | |||
| a69418c6f5 | |||
| c79e1b0327 | |||
| 915d3c0408 | |||
| f53b6e0bd5 | |||
| fc7b4d276c | |||
| 95460ecbb2 | |||
| dc31665029 | |||
| e98e9ed416 | |||
| de203b55fa | |||
| 0a8dbb3557 | |||
| 1f66a8f4ef | |||
| 93b432284d | |||
| 677c3af3b7 | |||
| eb22771d06 | |||
| 2710d72a73 | |||
| ccfb1a5179 | |||
| 26e00416c5 | |||
| 73ebd3ecdb | |||
| 02acc77521 | |||
| 7f7c63bc07 | |||
| 22560f434e | |||
| d0c8e3e88b | |||
| 1f184a6f7f | |||
| ea06fe1a9f | |||
| 5025c6a134 | |||
| f66e5d6da9 | |||
| ed6c36bff4 | |||
| 50889df91e | |||
| 75e3c023ad | |||
| d57075b065 | |||
| c3c24cd8e6 | |||
| 63e708d601 | |||
| 0849514253 | |||
| 703b7c0bad | |||
| a9235820c5 | |||
| ba59163234 | |||
| e1897e68b0 | |||
| 86821914b1 | |||
| 46abf5ca91 | |||
| 01a9ebf53b | |||
| e01fbbc35a | |||
| c9356a3889 | |||
| 4ce940bb0a | |||
| fd8ac8f528 | |||
| f07cfdc9dc | |||
| 4f060f3d3d | |||
| 7169fa1fd6 | |||
| 6b89e4067c | |||
| 4ac0507050 | |||
| a6a4f29bba | |||
| 0c9b37742a | |||
| ef5c98020e | |||
| c2a1fa3fdc | |||
| 319275f43c | |||
| 61d238e196 | |||
| 0900728bbf | |||
| c4ac9e6770 | |||
| ee83a453e7 | |||
| 9109a8cfb7 | |||
| f1ab1f1e77 | |||
| 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 | |||
| 4cd9b70cf2 | |||
| 140d2bc226 | |||
| 3c796aeefa | |||
| 2bcab0bbf1 | |||
| df41408ec9 | |||
| 9a2084c216 | |||
| 52844c8d75 |
@@ -101,6 +101,74 @@ Friend Module CamAuto
|
||||
Return True
|
||||
End Function
|
||||
|
||||
Friend Function ResetAllSplitCurv() As Boolean
|
||||
Dim bOk As Boolean = True
|
||||
Dim nIdPart As Integer = EgtGetFirstPart()
|
||||
While nIdPart <> GDB_ID.NULL
|
||||
' elimino il layer dei flag di separazione "AUX_SPLIT_WJ"
|
||||
Dim IdAuxLayer As Integer = EgtGetFirstNameInGroup(nIdPart, INFO_AUX_SPLIT_WJ)
|
||||
EgtErase(IdAuxLayer)
|
||||
' accedo al Layer OutLoop
|
||||
Dim nIdLayerOutLoop As Integer = EgtGetFirstNameInGroup(nIdPart, NAME_OUTLOOP)
|
||||
Dim nIdMy As Integer = EgtGetFirstInGroup(nIdLayerOutLoop)
|
||||
While nIdMy <> GDB_ID.NULL
|
||||
EgtRemoveInfo(nIdMy, INFO_JOINENTITY)
|
||||
nIdMy = EgtGetNext(nIdMy)
|
||||
End While
|
||||
nIdPart = EgtGetNextPart(nIdPart)
|
||||
End While
|
||||
Dim nRawId As Integer = CamAuto.GetCurrentRaw()
|
||||
nIdPart = EgtGetFirstPartInRawPart(nRawId)
|
||||
While nIdPart <> GDB_ID.NULL
|
||||
' elimino il layer dei flag di separazione "AUX_SPLIT_WJ"
|
||||
Dim IdAuxLayer As Integer = EgtGetFirstNameInGroup(nIdPart, INFO_AUX_SPLIT_WJ)
|
||||
EgtErase(IdAuxLayer)
|
||||
' accedo al Layer OutLoop
|
||||
Dim nIdLayerOutLoop As Integer = EgtGetFirstNameInGroup(nIdPart, NAME_OUTLOOP)
|
||||
Dim nIdMy As Integer = EgtGetFirstInGroup(nIdLayerOutLoop)
|
||||
While nIdMy <> GDB_ID.NULL
|
||||
EgtRemoveInfo(nIdMy, INFO_JOINENTITY)
|
||||
nIdMy = EgtGetNext(nIdMy)
|
||||
End While
|
||||
nIdPart = EgtGetNextPartInRawPart(nIdPart)
|
||||
End While
|
||||
Return bOk
|
||||
End Function
|
||||
|
||||
Friend Function ResetAllStartCurv() As Boolean
|
||||
Dim bOk As Boolean = True
|
||||
Dim nIdPart As Integer = EgtGetFirstPart()
|
||||
While nIdPart <> GDB_ID.NULL
|
||||
' accedo al Layer OutLoop
|
||||
Dim nIdLayerOutLoop As Integer = EgtGetFirstNameInGroup(nIdPart, NAME_OUTLOOP)
|
||||
EgtRemoveInfo(nIdLayerOutLoop, INFO_START)
|
||||
nIdPart = EgtGetNextPart(nIdPart)
|
||||
End While
|
||||
Dim nRawId As Integer = CamAuto.GetCurrentRaw()
|
||||
nIdPart = EgtGetFirstPartInRawPart(nRawId)
|
||||
While nIdPart <> GDB_ID.NULL
|
||||
' accedo al Layer OutLoop
|
||||
Dim nIdLayerOutLoop As Integer = EgtGetFirstNameInGroup(nIdPart, NAME_OUTLOOP)
|
||||
EgtRemoveInfo(nIdLayerOutLoop, INFO_START)
|
||||
nIdPart = EgtGetNextPartInRawPart(nIdPart)
|
||||
End While
|
||||
Return bOk
|
||||
End Function
|
||||
|
||||
' verifico che il contorno passato non sia stato separato
|
||||
Friend Function VerifyOutLoopIsClosed(nIdLayerOutLoop As Integer)
|
||||
Dim nIdMy As Integer = EgtGetFirstInGroup(nIdLayerOutLoop)
|
||||
While nIdMy <> GDB_ID.NULL
|
||||
Dim nValInfo As Integer = 1
|
||||
If EgtGetInfo(nIdMy, INFO_JOINENTITY, nValInfo) Then
|
||||
If nValInfo = 0 Then Return False
|
||||
End If
|
||||
EgtRemoveInfo(nIdMy, INFO_JOINENTITY)
|
||||
nIdMy = EgtGetNext(nIdMy)
|
||||
End While
|
||||
Return True
|
||||
End Function
|
||||
|
||||
Friend Function RemoveFinalEmptyPhases() As Boolean
|
||||
Dim nOpeId As Integer = EgtGetLastOperation()
|
||||
While nOpeId <> GDB_ID.NULL
|
||||
@@ -674,6 +742,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 +790,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 +808,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)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
Imports EgtUILib
|
||||
|
||||
Imports System.IO
|
||||
|
||||
Friend Module CSVFile
|
||||
|
||||
@@ -7,6 +7,7 @@ Friend Module CSVFile
|
||||
|
||||
'-----------------------------------------------------------------------------------------------
|
||||
Friend Class CsvPart
|
||||
Public m_sPath As String = String.Empty
|
||||
Public m_sName As String = String.Empty
|
||||
Public m_sOrd As String = String.Empty
|
||||
Public m_sDist As String = String.Empty
|
||||
@@ -19,8 +20,20 @@ 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
|
||||
' definsco il riferimento al gruppo
|
||||
Public m_sRefGuid As String = System.Guid.NewGuid.ToString
|
||||
' definisco il colore del gruppo che sto inserendo
|
||||
Public m_cColor As Color3d = CompoColor(m_MainWindow.GetIniFile())
|
||||
End Class
|
||||
|
||||
'-----------------------------------------------------------------------------------------------
|
||||
@@ -51,6 +64,7 @@ Friend Module CSVFile
|
||||
For i As Integer = 1 To nNbr
|
||||
Dim OnePart As New CsvPart
|
||||
Dim sN As String = i.ToString()
|
||||
OnePart.m_sPath = sFile
|
||||
EgtLuaGetGlobStringVar("CSV.NAME" & sN, OnePart.m_sName)
|
||||
OnePart.m_bActive = True
|
||||
EgtLuaGetGlobStringVar("CSV.ORD" & sN, OnePart.m_sOrd)
|
||||
@@ -62,7 +76,18 @@ 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
|
||||
If OnePart.m_nCount > 1 Then
|
||||
OnePart.m_sRefGuid = System.Guid.NewGuid.ToString
|
||||
End If
|
||||
' inserisco in lista
|
||||
CsvPartList.Add(OnePart)
|
||||
Next
|
||||
@@ -123,7 +148,9 @@ Friend Module CSVFile
|
||||
Else
|
||||
Dim sItems() As String = sLine.Split("=".ToCharArray)
|
||||
If sItems.Count() >= 2 Then
|
||||
If sItems(0) = "Nam" Then
|
||||
If sItems(0) = "Path" Then
|
||||
OnePart.m_sPath = sItems(1)
|
||||
ElseIf sItems(0) = "Nam" Then
|
||||
OnePart.m_sName = sItems(1)
|
||||
ElseIf sItems(0) = "Ord" Then
|
||||
OnePart.m_sOrd = sItems(1)
|
||||
@@ -147,8 +174,26 @@ 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)
|
||||
ElseIf sItems(0) = "Guid" Then
|
||||
OnePart.m_sRefGuid = sItems(1).Trim
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
@@ -176,6 +221,7 @@ Friend Module CSVFile
|
||||
For i As Integer = 1 To CsvPartList.Count()
|
||||
Dim CurrPart As CsvPart = CsvPartList(i - 1)
|
||||
Writer.WriteLine("[P" & i.ToString() & "]")
|
||||
Writer.WriteLine("Path=" & CurrPart.m_sPath)
|
||||
Writer.WriteLine("Nam=" & CurrPart.m_sName)
|
||||
Writer.WriteLine("Ord=" & CurrPart.m_sOrd)
|
||||
Writer.WriteLine("Dist=" & CurrPart.m_sDist)
|
||||
@@ -188,20 +234,53 @@ 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())
|
||||
Writer.WriteLine("Guid=" & CurrPart.m_sRefGuid)
|
||||
Next
|
||||
' Terminatore
|
||||
Writer.WriteLine("[END]")
|
||||
' Chiudo file
|
||||
Writer.Close()
|
||||
Return True
|
||||
' Errore
|
||||
' Errore
|
||||
Catch ex As Exception
|
||||
EgtOutLog("CSV List error writing " & sFile)
|
||||
Return False
|
||||
End Try
|
||||
End Function
|
||||
|
||||
' dato l'elenco completo dei file salvo ogni singolo epl
|
||||
Friend Function WriteCsvMergePartList(CsvPartList As List(Of CsvPart)) As Boolean
|
||||
Dim bOk As Boolean = True
|
||||
Dim LocalPartList As New List(Of CsvPart)
|
||||
Dim Index As Integer = 0
|
||||
' devo dividere la lista in tante parti quanti sono i file che lo costituiscono
|
||||
While Index < CsvPartList.Count
|
||||
Dim CurrFile As String = CsvPartList(Index).m_sPath
|
||||
Dim sFile As String = Path.ChangeExtension(CurrFile, ".epl")
|
||||
LocalPartList.Clear()
|
||||
While CurrFile = CsvPartList(Index).m_sPath
|
||||
LocalPartList.Add(CsvPartList(Index))
|
||||
Index += 1
|
||||
' se terminata la lista
|
||||
If Index = CsvPartList.Count Then
|
||||
Exit While
|
||||
End If
|
||||
End While
|
||||
' salvo l'elenco corrente
|
||||
bOk = WriteCsvPartList(sFile, CurrFile, LocalPartList) And bOk
|
||||
End While
|
||||
Return bOk
|
||||
End Function
|
||||
|
||||
Friend Function RemoveNotToNestParts(ByRef CsvPartList As List(Of CsvPart)) As Boolean
|
||||
For i As Integer = CsvPartList.Count() - 1 To 0 Step -1
|
||||
If CsvPartList(i).m_nToNest = 0 Then
|
||||
|
||||
@@ -11,7 +11,7 @@ Public Class CSVPage
|
||||
Private WithEvents m_CurrProjPage As CurrentProjectPageUC
|
||||
' Flag di pagina attiva
|
||||
Private m_bActive As Boolean = False
|
||||
' Flag tipologia
|
||||
' Flag tipologia (False -> Cvs semplificato)
|
||||
Private m_bFull As Boolean = False
|
||||
' Flag inserimento diretto
|
||||
Private m_bDirect As Boolean = True
|
||||
@@ -28,6 +28,10 @@ Public Class CSVPage
|
||||
Private m_ptRawMin As Point3d
|
||||
Private m_ptRawMax As Point3d
|
||||
|
||||
Dim m_bIsCounterLy As Boolean = False
|
||||
Dim m_nCurrNubrOfParts As Integer = 0
|
||||
Dim m_nIdToSel As Integer = GDB_ID.NULL
|
||||
|
||||
Private Sub CSVPage_Initialized(sender As Object, e As EventArgs) Handles Me.Initialized
|
||||
' Assegno la lista dei pezzi Csv come sorgente del treeview
|
||||
PartsTreeView.ItemsSource = m_ItemsList
|
||||
@@ -101,13 +105,36 @@ Public Class CSVPage
|
||||
If EgtIsPart(nPartId) Or bPartInTable Then
|
||||
Dim nStat As Integer = GDB_ST.ON_
|
||||
EgtGetStatus(nPartId, nStat)
|
||||
' Se già selezionato, lo deselezione
|
||||
If nStat = GDB_ST.SEL Then
|
||||
EgtDeselectObj(nPartId)
|
||||
' Altrimenti lo seleziono
|
||||
Else
|
||||
EgtSelectObj(nPartId)
|
||||
|
||||
' verifico se l'lemento selezionato è il numero di pezzi
|
||||
If EgtGetType(nId) = GDB_TY.EXT_TEXT Then
|
||||
Dim NameLayer As String = String.Empty
|
||||
EgtGetName(EgtGetParent(nId), NameLayer)
|
||||
If NameLayer = INFO_COUNTERLY Then
|
||||
Dim sText As String = String.Empty
|
||||
If EgtTextGetContent(nId, sText) Then
|
||||
Dim sItems() As String = sText.Split("#")
|
||||
If sItems.Count > 1 Then
|
||||
m_nCurrNubrOfParts = 0
|
||||
If StringToInt(sItems(1), m_nCurrNubrOfParts) And m_nCurrNubrOfParts > 0 Then
|
||||
m_bIsCounterLy = True
|
||||
m_nIdToSel = nPartId
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
If Not m_bIsCounterLy Then
|
||||
' Se già selezionato, lo deselezione
|
||||
If nStat = GDB_ST.SEL Then
|
||||
EgtDeselectObj(nPartId)
|
||||
' Altrimenti lo seleziono
|
||||
Else
|
||||
EgtSelectObj(nPartId)
|
||||
End If
|
||||
End If
|
||||
|
||||
Exit While
|
||||
End If
|
||||
nId = EgtGetNextObjInSelWin()
|
||||
@@ -115,6 +142,28 @@ Public Class CSVPage
|
||||
EgtDraw()
|
||||
End Sub
|
||||
|
||||
Private Sub OnMyMouseUpScene(sender As Object, e As System.Windows.Forms.MouseEventArgs) Handles m_CurrProjPage.OnMouseUpScene
|
||||
If m_bIsCounterLy Then
|
||||
' apro una finestra di dialogo per chiedere se inserire tutti i pezzi della famiglia
|
||||
Dim SelectWD As New SelectPartFromFamilyWD(m_MainWindow, m_nCurrNubrOfParts)
|
||||
Dim sRefGroup As String = String.Empty
|
||||
EgtGetInfo(m_nIdToSel, INFO_REFGROUP, sRefGroup)
|
||||
' deseleziono il pezzo corrente
|
||||
m_MainWindow.m_CadCutPageUC.m_NestPage.DeselectPartInFaimily(sRefGroup)
|
||||
Select Case SelectWD.NumberOfSelection
|
||||
Case 0 ' Annulla
|
||||
' continuo senza eseguire niente
|
||||
Case Else
|
||||
' seleziono il numero di pezzi indicati
|
||||
m_MainWindow.m_CadCutPageUC.m_NestPage.SelectPartInFaimily(sRefGroup, SelectWD.NumberOfSelection)
|
||||
End Select
|
||||
m_bIsCounterLy = False
|
||||
' disassegno il riferimento all'oggetto appena creato
|
||||
SelectWD = Nothing
|
||||
EgtDraw()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub OkBtn_Click(sender As Object, e As RoutedEventArgs) Handles OkBtn.Click
|
||||
m_MainWindow.m_CadCutPageUC.CadCutPageGrid.Children.Remove(Me)
|
||||
m_MainWindow.m_CadCutPageUC.CadCutPageGrid.Children.Add(m_MainWindow.m_CadCutPageUC.m_NestPage)
|
||||
@@ -133,15 +182,48 @@ Public Class CSVPage
|
||||
WritePrivateProfileString(S_CSV, K_CSVLASTFILE, "", m_MainWindow.GetIniFile())
|
||||
End Sub
|
||||
|
||||
Private Function CreateListOfDeniedFiles() As List(Of String)
|
||||
Dim LocalList As New List(Of String)
|
||||
LocalList.Add("MERGE")
|
||||
Dim Index1 As Integer = 0
|
||||
Dim Index2 As Integer = 0
|
||||
For Index1 = 0 To m_CsvPartList.Count - 1
|
||||
Dim sFileName As String = m_CsvPartList(Index1).m_sPath
|
||||
sFileName = Path.GetFileNameWithoutExtension(sFileName).ToUpper.Trim()
|
||||
Dim bNewFile As Boolean = True
|
||||
For Index2 = 0 To LocalList.Count - 1
|
||||
If sFileName = LocalList(Index2) Then
|
||||
bNewFile = False
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
If bNewFile Then
|
||||
LocalList.Add(Path.GetFileNameWithoutExtension(sFileName).ToUpper.Trim)
|
||||
End If
|
||||
Next
|
||||
Return LocalList
|
||||
End Function
|
||||
|
||||
Private Sub OpenBtn_Click(sender As Object, e As RoutedEventArgs) Handles OpenBtn.Click
|
||||
' Salvo lista dei pezzi attuale
|
||||
SaveCsvPartList()
|
||||
'' Salvo lista dei pezzi attuale
|
||||
'SaveCsvPartList()
|
||||
' Leggo direttorio corrente dei file CSV
|
||||
Dim sCurrDir As String = ""
|
||||
GetPrivateProfileString(S_CSV, K_CSVCURRDIR, "C:\", sCurrDir, m_MainWindow.GetIniFile())
|
||||
' Apro dialogo scelta file
|
||||
Dim OpenFileWnd As New OpenFileWD(m_MainWindow, sCurrDir, ".CSV", ".EPL")
|
||||
Dim OpenFileWnd As OpenFileWD
|
||||
Dim sDeniedFiles As List(Of String) = CreateListOfDeniedFiles()
|
||||
' imposto il filtro
|
||||
If m_bFull Then
|
||||
OpenFileWnd = New OpenFileWD(m_MainWindow, sCurrDir, ".CSV", ".EPL", sDeniedFiles)
|
||||
Else
|
||||
OpenFileWnd = New OpenFileWD(m_MainWindow, sCurrDir, ".CSV")
|
||||
End If
|
||||
If Not OpenFileWnd.ShowDialog() Then Return
|
||||
' verifico che il file inserito non appartenga al Merge attuale
|
||||
|
||||
' Salvo lista dei pezzi attuale
|
||||
SaveCsvPartList()
|
||||
' Salvo direttorio corrente
|
||||
WritePrivateProfileString(S_CSV, K_CSVCURRDIR, OpenFileWnd.GetFileDir(), m_MainWindow.GetIniFile())
|
||||
' Apertura file
|
||||
@@ -173,17 +255,28 @@ Public Class CSVPage
|
||||
' Pulisco path e lista dei pezzi Csv
|
||||
m_sFilePath = String.Empty
|
||||
m_sCsvPath = String.Empty
|
||||
m_CsvPartList.Clear()
|
||||
|
||||
' mantengo la lista attuale dei pezzi
|
||||
'm_CsvPartList.Clear()
|
||||
|
||||
' aggiungo i pezzi su una lista temporanea
|
||||
Dim LocalPartList As New List(Of CsvPart)
|
||||
' Eseguo la lettura del file Csv
|
||||
If Not ReadCsvFile(sCsvPath, m_bFull, m_sCsvPath, m_CsvPartList) Then
|
||||
If Not ReadCsvFile(sCsvPath, m_bFull, m_sCsvPath, LocalPartList) Then
|
||||
m_CurrProjPage.SetErrorMessage(EgtMsg(91206)) 'Errore nella lettura del file CSV
|
||||
Return False
|
||||
End If
|
||||
|
||||
' Creo un nuovo file che ospitarà il merge de
|
||||
Dim sNewMergeFile As String = Path.GetDirectoryName(m_sCsvPath) & "\Merge.csv"
|
||||
m_sCsvPath = sNewMergeFile
|
||||
m_sFilePath = m_sCsvPath
|
||||
|
||||
' Elimino pezzi nulli
|
||||
RemoveWrongParts(m_CsvPartList)
|
||||
RemoveWrongParts(LocalPartList)
|
||||
' Aggiorno
|
||||
If m_bFull Then
|
||||
MySaveCsvPartList(LocalPartList)
|
||||
' Salvo come epl
|
||||
SaveCsvPartList()
|
||||
' Rinomino file originale
|
||||
@@ -196,9 +289,40 @@ Public Class CSVPage
|
||||
' eseguo rinomina
|
||||
My.Computer.FileSystem.RenameFile(sCsvPath, sBakName)
|
||||
End If
|
||||
' attacco i nuovi pezzi alla lista corrente
|
||||
For Each Item As CsvPart In LocalPartList
|
||||
m_CsvPartList.Add(Item)
|
||||
Next
|
||||
Return True
|
||||
End Function
|
||||
|
||||
Private Sub LoadCsvPartList(sFile As String)
|
||||
' Se Csv semplificato non va letta
|
||||
If Not m_bFull Then Return
|
||||
' Pulisco path e lista dei pezzi Csv
|
||||
m_sCsvPath = String.Empty
|
||||
|
||||
' mantengo la lista attuale dei pezzi
|
||||
'm_CsvPartList.Clear()
|
||||
|
||||
' aggiungo i pezzi su una lista temporanea
|
||||
Dim LocalPartList As New List(Of CsvPart)
|
||||
|
||||
' Lettura del file
|
||||
If ReadCsvPartList(sFile, m_sCsvPath, LocalPartList) Then
|
||||
' Creo un nuovo file che ospitarà il merge de
|
||||
Dim sNewMergeFile As String = Path.GetDirectoryName(m_sCsvPath) & "\Merge.csv"
|
||||
m_sCsvPath = sNewMergeFile
|
||||
m_sFilePath = m_sCsvPath
|
||||
End If
|
||||
' Elimino pezzi nulli
|
||||
RemoveWrongParts(LocalPartList)
|
||||
' attacco i nuovi pezzi alla lista corrente
|
||||
For Each Item As CsvPart In LocalPartList
|
||||
m_CsvPartList.Add(Item)
|
||||
Next
|
||||
End Sub
|
||||
|
||||
Private Sub ShowTreeView()
|
||||
' Path del file Csv
|
||||
Dim TempPath As New Text.StringBuilder(260)
|
||||
@@ -208,6 +332,7 @@ Public Class CSVPage
|
||||
m_ItemsList.Clear()
|
||||
Dim sCurrMat As String = String.Empty
|
||||
Dim dCurrTh As Double = 0
|
||||
Dim sCurrPath As String = String.Empty
|
||||
Dim nCatToNest As Integer = 0
|
||||
Dim nCatCount As Integer = 0
|
||||
Dim PartCathegory As New PartCathegoryItem("", 0)
|
||||
@@ -218,19 +343,28 @@ Public Class CSVPage
|
||||
If i = 1 Then
|
||||
sCurrMat = CurrPart.m_sMaterial
|
||||
dCurrTh = CurrPart.m_dTh
|
||||
sCurrPath = CurrPart.m_sPath
|
||||
ElseIf String.Compare(sCurrMat, CurrPart.m_sMaterial, True) <> 0 Or
|
||||
String.Compare(sCurrPath, CurrPart.m_sPath, True) <> 0 Or
|
||||
Math.Abs(dCurrTh - CurrPart.m_dTh) > 10 * EPS_SMALL Then
|
||||
If m_bFull Then
|
||||
PartCathegory.Name = If(String.IsNullOrWhiteSpace(sCurrMat), "***", sCurrMat) &
|
||||
" - " & LenToString(dCurrTh, 2) &
|
||||
" - " & nCatToNest.ToString() & "/" & nCatCount.ToString()
|
||||
If Not String.IsNullOrWhiteSpace(sCurrPath) Then
|
||||
PartCathegory.Name &= vbCrLf & Path.GetFileNameWithoutExtension(sCurrPath)
|
||||
End If
|
||||
Else
|
||||
PartCathegory.Name = nCatToNest.ToString() & "/" & nCatCount.ToString()
|
||||
If Not String.IsNullOrWhiteSpace(sCurrPath) Then
|
||||
PartCathegory.Name &= vbCrLf & Path.GetFileNameWithoutExtension(sCurrPath)
|
||||
End If
|
||||
End If
|
||||
PartCathegory.IsExpanded = True
|
||||
m_ItemsList.Add(PartCathegory)
|
||||
sCurrMat = CurrPart.m_sMaterial
|
||||
dCurrTh = CurrPart.m_dTh
|
||||
sCurrPath = CurrPart.m_sPath
|
||||
PartCathegory = New PartCathegoryItem("", 0)
|
||||
nCatToNest = 0
|
||||
nCatCount = 0
|
||||
@@ -248,8 +382,14 @@ Public Class CSVPage
|
||||
PartCathegory.Name = If(String.IsNullOrWhiteSpace(sCurrMat), "***", sCurrMat) &
|
||||
" - " & LenToString(dCurrTh, 2) &
|
||||
" - " & nCatToNest.ToString() & "/" & nCatCount.ToString()
|
||||
If Not String.IsNullOrWhiteSpace(sCurrPath) Then
|
||||
PartCathegory.Name &= vbCrLf & Path.GetFileNameWithoutExtension(sCurrPath)
|
||||
End If
|
||||
Else
|
||||
PartCathegory.Name = nCatToNest.ToString() & "/" & nCatCount.ToString()
|
||||
If Not String.IsNullOrWhiteSpace(sCurrPath) Then
|
||||
PartCathegory.Name &= vbCrLf & Path.GetFileNameWithoutExtension(sCurrPath)
|
||||
End If
|
||||
End If
|
||||
PartCathegory.IsExpanded = True
|
||||
m_ItemsList.Add(PartCathegory)
|
||||
@@ -259,6 +399,7 @@ Public Class CSVPage
|
||||
For Each CatItem As PartCathegoryItem In m_ItemsList
|
||||
Dim sCurrMat As String = String.Empty
|
||||
Dim dCurrTh As Double = 0
|
||||
Dim sCurrPath As String = String.Empty
|
||||
Dim nCatToNest As Integer = 0
|
||||
Dim nCatCount As Integer = 0
|
||||
For Each PrtItem As PartCustomItem In CatItem.Items
|
||||
@@ -268,6 +409,7 @@ Public Class CSVPage
|
||||
PrtItem.sText1 = sCount
|
||||
sCurrMat = PartData.m_sMaterial
|
||||
dCurrTh = PartData.m_dTh
|
||||
sCurrPath = PartData.m_sPath
|
||||
nCatToNest += PartData.m_nToNest
|
||||
nCatCount += PartData.m_nCount
|
||||
Next
|
||||
@@ -275,8 +417,14 @@ Public Class CSVPage
|
||||
CatItem.Name = If(String.IsNullOrWhiteSpace(sCurrMat), "***", sCurrMat) &
|
||||
" - " & LenToString(dCurrTh, 2) &
|
||||
" - " & nCatToNest.ToString() & "/" & nCatCount.ToString()
|
||||
If Not String.IsNullOrWhiteSpace(sCurrPath) Then
|
||||
CatItem.Name &= vbCrLf & Path.GetFileNameWithoutExtension(sCurrPath)
|
||||
End If
|
||||
Else
|
||||
CatItem.Name = nCatToNest.ToString() & "/" & nCatCount.ToString()
|
||||
If Not String.IsNullOrWhiteSpace(sCurrPath) Then
|
||||
CatItem.Name &= vbCrLf & Path.GetFileNameWithoutExtension(sCurrPath)
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
End Sub
|
||||
@@ -345,6 +493,7 @@ Public Class CSVPage
|
||||
End Function
|
||||
|
||||
Private Sub InsertBtn_Click(sender As Object, e As RoutedEventArgs) Handles InsertBtn.Click
|
||||
'm_CurrProjPage.ClearMessage()
|
||||
' Recupero lo spessore della lastra corrente
|
||||
Dim dRawHeight As Double = GetRawHeight()
|
||||
If dRawHeight < EPS_SMALL Then Return
|
||||
@@ -355,20 +504,17 @@ Public Class CSVPage
|
||||
End If
|
||||
' Recupero la tolleranza sullo spessore
|
||||
Dim dToler As Double = GetPrivateProfileDouble(S_CSV, K_THICKTOLERANCE, 100 * EPS_SMALL, m_MainWindow.GetIniFile())
|
||||
dToler = Math.Max( dToler, 100 * EPS_SMALL)
|
||||
dToler = Math.Max(dToler, 100 * EPS_SMALL)
|
||||
' Creo la lista dei pezzi inseribili nella lastra corrente
|
||||
Dim InsPartList As New List(Of CsvPart)
|
||||
For i As Integer = 1 To m_CsvPartList.Count()
|
||||
Dim CurrPart As CsvPart = m_CsvPartList(i - 1)
|
||||
If CurrPart.m_bActive And
|
||||
(Math.Abs(CurrPart.m_dTh - dRawHeight) < dToler Or
|
||||
CurrPart.m_dTh < EPS_SMALL) And
|
||||
(String.IsNullOrWhiteSpace(CurrPart.m_sMaterial) Or
|
||||
String.IsNullOrWhiteSpace(sCurrMat) Or
|
||||
CurrPart.m_sMaterial = "***" Or
|
||||
sCurrMat = "***" Or
|
||||
String.Compare(CurrPart.m_sMaterial, sCurrMat, True) = 0) Then
|
||||
(Math.Abs(CurrPart.m_dTh - dRawHeight) < dToler Or CurrPart.m_dTh < EPS_SMALL) And
|
||||
(String.IsNullOrWhiteSpace(CurrPart.m_sMaterial) Or String.IsNullOrWhiteSpace(sCurrMat) Or CurrPart.m_sMaterial = "***" Or sCurrMat = "***" Or String.Compare(CurrPart.m_sMaterial, sCurrMat, True) = 0) Then
|
||||
InsPartList.Add(CurrPart)
|
||||
'ElseIf CurrPart.m_bActive Then
|
||||
' m_CurrProjPage.SetWarningMessage("Grezzo non compatibile")
|
||||
End If
|
||||
Next
|
||||
' Lancio l'inserimento dei pezzi
|
||||
@@ -424,10 +570,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 +589,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,11 +597,36 @@ 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
|
||||
If m_bFull Then
|
||||
EgtSetInfo(nId, INFO_CSV_PATH, m_sCsvPath)
|
||||
EgtSetInfo(nId, INFO_CSV_PATH, CurrPart.m_sPath)
|
||||
EgtSetInfo(nId, INFO_CSV_PART, CurrPart.m_sName)
|
||||
EgtSetInfo(nId, INFO_CSV_ORD, CurrPart.m_sOrd)
|
||||
EgtSetInfo(nId, INFO_CSV_DIST, CurrPart.m_sDist)
|
||||
@@ -461,14 +636,36 @@ Public Class CSVPage
|
||||
Utility.SetTextColor( nRegId)
|
||||
' Lo sposto nel gruppo speciale
|
||||
EgtRelocate(nId, nIpGrp)
|
||||
|
||||
|
||||
' assegno l'identificatico del pezzo, se esiste
|
||||
If Not String.IsNullOrEmpty(CurrPart.m_sRefGuid) Then
|
||||
' GuidCode dovrebbe contenere 36 caratteri, il precode 5: tot = 41
|
||||
If CurrPart.m_sRefGuid.Count <= 36 Then
|
||||
Dim sPreGuid As String = CreatePreGuidCode(CurrPart.m_nId)
|
||||
CurrPart.m_sRefGuid = sPreGuid & CurrPart.m_sRefGuid
|
||||
End If
|
||||
EgtSetInfo(CurrPart.m_nId, INFO_REFGROUP, CurrPart.m_sRefGuid)
|
||||
End If
|
||||
Dim nRegLayId As Integer = EgtGetFirstNameInGroup(CurrPart.m_nId, NAME_REGION)
|
||||
' Imposto il colore del pezzo inserito nel progetto
|
||||
EgtSetColor(nRegLayId, CurrPart.m_cColor)
|
||||
Dim EntId As Integer = EgtGetFirstInGroup(nRegLayId)
|
||||
While EntId <> GDB_ID.NULL
|
||||
If EgtGetType(EntId) = GDB_TY.SRF_FRGN Then EgtSetColor(EntId, CurrPart.m_cColor)
|
||||
EntId = EgtGetNext(EntId)
|
||||
End While
|
||||
|
||||
Next
|
||||
EgtLuaResetGlobVar("CMP")
|
||||
EgtLuaResetGlobVar("CMP_Draw")
|
||||
|
||||
' Provo ad inserire i pezzi
|
||||
Dim dNewArea As Double = 0
|
||||
For i As Integer = 1 To InsPartList.Count()
|
||||
Dim CurrPart As CsvPart = InsPartList(i - 1)
|
||||
While CurrPart.m_nToNest > 0
|
||||
|
||||
If m_bDirect Then
|
||||
If NestOnePart(CurrPart.m_nId) Then
|
||||
dNewArea += GeomCalc.GetPartArea(CurrPart.m_nId)
|
||||
@@ -490,6 +687,7 @@ Public Class CSVPage
|
||||
m_CurrProjPage.UpdateTotalArea( dNewArea)
|
||||
m_CurrProjPage.UpdateToProduceArea()
|
||||
m_MainWindow.m_CurrentProjectPageUC.ShowAreas()
|
||||
|
||||
Return True
|
||||
End Function
|
||||
|
||||
@@ -566,11 +764,11 @@ Public Class CSVPage
|
||||
Dim sName As String = String.Empty
|
||||
EgtGetInfo(nId, INFO_CSV_PART, sName)
|
||||
' Verifico che il pezzo appartenga a questo Csv
|
||||
If String.Compare(sCsvPath, m_sCsvPath, True) = 0 Then
|
||||
If SearchCurrCSV(sCsvPath) Then
|
||||
' Cerco il pezzo nella lista dei pezzi
|
||||
For i As Integer = 1 To m_CsvPartList.Count()
|
||||
Dim CurrPart As CsvPart = m_CsvPartList(i - 1)
|
||||
If String.Compare(sName, CurrPart.m_sName, True) = 0 Then
|
||||
If String.Compare(sName, CurrPart.m_sName, True) = 0 And String.Compare(sCsvPath, CurrPart.m_sPath, True) = 0 Then
|
||||
' Se nel grezzo
|
||||
If EgtGetParent(nId) = m_nRawId Then
|
||||
' Rimuovo le lavorazioni
|
||||
@@ -578,19 +776,38 @@ Public Class CSVPage
|
||||
' Rimuovo dal grezzo
|
||||
EgtRemovePartFromRawPart(nId)
|
||||
End If
|
||||
' recupero il Guid del pezzo corrente (potrebbe essere stato modificato a causa di rotazioni quando il pezzo è passato in parcheggio)
|
||||
Dim sCurrRefGuid As String = String.Empty
|
||||
EgtGetInfo(nId, INFO_REFGROUP, sCurrRefGuid)
|
||||
' Cancello il pezzo
|
||||
EgtErase(nId)
|
||||
' aggiorno il layer che indica il numero di pezzi in parcheggio (se sRefGroup<>"")
|
||||
m_MainWindow.m_CadCutPageUC.m_NestPage.CountPartInFamily(sCurrRefGuid)
|
||||
' Aggiorno il contatore
|
||||
CurrPart.m_nToNest += 1
|
||||
' ricreo la lista delle famiglie di pezzi presenti in parcheggio
|
||||
m_MainWindow.m_CadCutPageUC.m_NestPage.GetFamilyGroupInPark()
|
||||
' Esco
|
||||
Return True
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
' creo la lista delle famiglie di pezzi presenti in parcheggio
|
||||
m_MainWindow.m_CadCutPageUC.m_NestPage.GetFamilyGroupInPark()
|
||||
' Pezzo non appartenente al Csv corrente
|
||||
Return False
|
||||
End Function
|
||||
|
||||
Private Function SearchCurrCSV(ByVal sCSVFile As String) As Boolean
|
||||
For i As Integer = 1 To m_CsvPartList.Count()
|
||||
Dim CurrPart As CsvPart = m_CsvPartList(i - 1)
|
||||
If String.Compare(sCSVFile, CurrPart.m_sPath, True) = 0 Then
|
||||
Return True
|
||||
End If
|
||||
Next
|
||||
Return False
|
||||
End Function
|
||||
|
||||
Friend Sub SaveCsvPartList()
|
||||
' Se Csv semplificato non va salvata
|
||||
If Not m_bFull Then Return
|
||||
@@ -601,24 +818,33 @@ Public Class CSVPage
|
||||
End If
|
||||
' Path del file
|
||||
Dim sFile As String = Path.ChangeExtension(m_sFilePath, ".epl")
|
||||
' Scrittura del file
|
||||
If WriteCsvPartList(sFile, m_sCsvPath, m_CsvPartList) Then
|
||||
' Registro in ini path
|
||||
WritePrivateProfileString(S_CSV, K_CSVLASTFILE, sFile, m_MainWindow.GetIniFile())
|
||||
' Scrittura dei file
|
||||
If WriteCsvMergePartList(m_CsvPartList) Then
|
||||
' Scrittura dei file Merge
|
||||
If WriteCsvPartList(sFile, m_sCsvPath, m_CsvPartList) Then
|
||||
WritePrivateProfileString(S_CSV, K_CSVLASTFILE, sFile, m_MainWindow.GetIniFile())
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub LoadCsvPartList(sFile As String)
|
||||
' Se Csv semplificato non va letta
|
||||
' salvo il sottoelenco dei pezzi
|
||||
Friend Sub MySaveCsvPartList(ByVal CurrPartList As List(Of CsvPart))
|
||||
' Se Csv semplificato non va salvata
|
||||
If Not m_bFull Then Return
|
||||
' Pulisco path e lista dei pezzi Csv
|
||||
m_sCsvPath = String.Empty
|
||||
m_CsvPartList.Clear()
|
||||
' Lettura del file
|
||||
ReadCsvPartList(sFile, m_sCsvPath, m_CsvPartList)
|
||||
m_sFilePath = sFile
|
||||
' Elimino pezzi nulli
|
||||
RemoveWrongParts(m_CsvPartList)
|
||||
Dim sCurrPath As String = String.Empty
|
||||
' recupero dalla lista il nome del file corrente
|
||||
For Each Item As CsvPart In CurrPartList
|
||||
sCurrPath = Item.m_sPath
|
||||
Next
|
||||
' se non trov il nome del file assocciato all'elenco di pezzi esco
|
||||
If String.IsNullOrEmpty(sCurrPath) Then
|
||||
EgtOutLog("CSV Curr list missing")
|
||||
Return
|
||||
End If
|
||||
' Path del file
|
||||
Dim sFile As String = Path.ChangeExtension(sCurrPath, ".epl")
|
||||
' Scrittura del file
|
||||
WriteCsvPartList(sFile, sCurrPath, CurrPartList)
|
||||
End Sub
|
||||
|
||||
Friend Sub UpdateCsvPartList()
|
||||
|
||||
@@ -107,6 +107,9 @@ Public Class CadCutPageUC
|
||||
|
||||
Private Sub PhotoBtn_Click(sender As Object, e As RoutedEventArgs) Handles PhotoBtn.Click
|
||||
m_MainWindow.TestOff()
|
||||
m_MainWindow.DragRettangleOff()
|
||||
m_MainWindow.SplitCurvWJOff()
|
||||
m_MainWindow.StartCurvWJOff()
|
||||
m_CurrProjPage.m_SceneButtons.MeasureBtn.IsChecked = False
|
||||
EgtSetCurrentContext(m_MainWindow.m_CurrentProjectPageUC.CurrentProjectScene.GetCtx())
|
||||
' Se macchina fotografica collegata, faccio una foto
|
||||
@@ -140,6 +143,9 @@ Public Class CadCutPageUC
|
||||
|
||||
Private Sub RawPartBtn_Click(sender As Object, e As RoutedEventArgs) Handles RawPartBtn.Click
|
||||
m_MainWindow.TestOff()
|
||||
m_MainWindow.DragRettangleOff()
|
||||
m_MainWindow.SplitCurvWJOff()
|
||||
m_MainWindow.StartCurvWJOff()
|
||||
m_CurrProjPage.CurrProjGrid.Visibility = Windows.Visibility.Hidden
|
||||
m_CurrProjPage.CurrentProjectPageGrid.Children.Remove(Me)
|
||||
m_CurrProjPage.CurrentProjectPageGrid.Children.Add(m_MainWindow.m_RawPartPage)
|
||||
@@ -165,6 +171,9 @@ Public Class CadCutPageUC
|
||||
|
||||
Private Sub DrawBtn_Click(sender As Object, e As RoutedEventArgs) Handles DrawBtn.Click
|
||||
m_MainWindow.TestOff()
|
||||
m_MainWindow.DragRettangleOff()
|
||||
m_MainWindow.SplitCurvWJOff()
|
||||
m_MainWindow.StartCurvWJOff()
|
||||
m_MainWindow.MainWindowGrid.Children.Remove(m_MainWindow.m_CurrentProjectPageUC)
|
||||
m_MainWindow.MainWindowGrid.Children.Add(m_MainWindow.m_DrawPageUC)
|
||||
m_MainWindow.m_ActivePage = MainWindow.Pages.Draw
|
||||
@@ -172,6 +181,9 @@ Public Class CadCutPageUC
|
||||
|
||||
Private Sub ImportBtn_Click(sender As Object, e As RoutedEventArgs) Handles ImportBtn.Click
|
||||
m_MainWindow.TestOff()
|
||||
m_MainWindow.DragRettangleOff()
|
||||
m_MainWindow.SplitCurvWJOff()
|
||||
m_MainWindow.StartCurvWJOff()
|
||||
m_MainWindow.MainWindowGrid.Children.Remove(m_MainWindow.m_CurrentProjectPageUC)
|
||||
m_MainWindow.MainWindowGrid.Children.Add(m_MainWindow.m_ImportPageUC)
|
||||
m_MainWindow.m_ActivePage = MainWindow.Pages.Import
|
||||
@@ -193,10 +205,13 @@ Public Class CadCutPageUC
|
||||
End Sub
|
||||
|
||||
Private Sub SplitBtn_Click(sender As Object, e As RoutedEventArgs) Handles SplitBtn.Click
|
||||
m_MainWindow.DragRettangleOff()
|
||||
m_MainWindow.SplitCurvWJOff()
|
||||
m_MainWindow.StartCurvWJOff()
|
||||
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
|
||||
@@ -206,9 +221,9 @@ Public Class CadCutPageUC
|
||||
SplitImage.Source = New System.Windows.Media.Imaging.BitmapImage(New Uri("/Resources/NewIcons/Nest.png", UriKind.Relative))
|
||||
End If
|
||||
If m_CadCutMode = CadCutModes.Nest Then
|
||||
CadCutPageGrid.Children.Remove(m_NestPage)
|
||||
Else
|
||||
CadCutPageGrid.Children.Remove(m_FastGridSlabManager)
|
||||
CadCutPageGrid.Children.Remove(m_NestPage)
|
||||
Else
|
||||
CadCutPageGrid.Children.Remove(m_FastGridSlabManager)
|
||||
End If
|
||||
CadCutPageGrid.Children.Add(m_SplitPage)
|
||||
m_CadCutMode = CadCutModes.Split
|
||||
|
||||
@@ -28,6 +28,8 @@ Public Class MoveRawPartPage
|
||||
Private m_RawMoveDataList As New List(Of RawMoveData) ' dati di movimento
|
||||
Private m_bRawWithCups As Boolean = False ' flag per pezzo corrente con ventose
|
||||
|
||||
Private m_CurrRawOnVacuum As Integer = GDB_ID.NULL
|
||||
|
||||
Private Sub MoveRawPartPage_Initialized(sender As Object, e As EventArgs) Handles Me.Initialized
|
||||
' Assegno testi
|
||||
RemovePartBtn.Content = EgtMsg(MSG_MOVERAWPAGEUC + 1) 'Rimuovi
|
||||
@@ -230,16 +232,48 @@ Public Class MoveRawPartPage
|
||||
If nParentId = nRawGroupId Then
|
||||
Dim nStat As Integer = GDB_ST.ON_
|
||||
EgtGetStatus(nId, nStat)
|
||||
' Se il pezzo corrente è selezionato allora lo disattivo -> deposito del pezzo
|
||||
If nStat = GDB_ST.SEL Then
|
||||
EgtSetStatus(nId, GDB_ST.ON_)
|
||||
' Se con ventose, le nascondo
|
||||
If Not m_bByHand Then EgtSetStatus(GetVacuumId(), GDB_ST.OFF)
|
||||
' prima di rilasciare il pezzo verifico che non vada in collisione con altri pezzi sulla tavola
|
||||
If VerifyCollisionWithOtherRawPart(nId) Then
|
||||
' mantengo la selezione del pezzo
|
||||
EgtSetStatus(nId, GDB_ST.SEL)
|
||||
m_CurrProjPage.SetErrorMessage("Collisione pezzi")
|
||||
Else
|
||||
' Se con ventose, le nascondo
|
||||
If Not m_bByHand Then EgtSetStatus(GetVacuumId(), GDB_ST.OFF)
|
||||
End If
|
||||
Else
|
||||
|
||||
' verifico che il pezzo precedente possa essere depositato correttamente
|
||||
If VerifyCollisionWithOtherRawPart(m_CurrRawOnVacuum) Then
|
||||
' mantengo la selezione del pezzo
|
||||
EgtSetStatus(m_CurrRawOnVacuum, GDB_ST.SEL)
|
||||
m_CurrProjPage.SetErrorMessage("Collisione pezzi")
|
||||
EgtDraw()
|
||||
' esco dal ciclo, prima devo depositare correttamente il pezzo
|
||||
Exit While
|
||||
End If
|
||||
' salvo l'indice del pezzo correntemente attaccato alle ventose
|
||||
m_CurrRawOnVacuum = nId
|
||||
|
||||
' Deseleziono tutto e abilito la selezione del pezzo corrente
|
||||
EgtDeselectAll()
|
||||
EgtSetStatus(nId, GDB_ST.SEL)
|
||||
' Se con ventose, le posiziono sul grezzo
|
||||
If Not m_bByHand Then
|
||||
Dim rmData As New RawMoveData
|
||||
' inizializzo i dati del grezzo per il cacolo del peso
|
||||
Dim MaxSinglePlugger As Double = 250
|
||||
MaxSinglePlugger = GetPrivateProfileDouble(S_MACH_RAWMOVE, K_MACH_WEIGHT_SINGLEPLUGGER, MaxSinglePlugger, m_MainWindow.GetMachIniFile())
|
||||
Dim MaxDoublePlugger As Double = 750
|
||||
MaxDoublePlugger = GetPrivateProfileDouble(S_MACH_RAWMOVE, K_MACH_WEIGHT_DOUBLEPLUGGER, MaxDoublePlugger, m_MainWindow.GetMachIniFile())
|
||||
Dim AverageDensity As Double = 2700
|
||||
AverageDensity = GetPrivateProfileDouble(S_MATERIALS, K_AVERAGEDENSITY, AverageDensity, m_MainWindow.GetMachIniFile())
|
||||
VacuumCups.GetWeightInformation(AverageDensity, MaxSinglePlugger, MaxDoublePlugger)
|
||||
VacuumCups.GetRotationForExtraStrokeY(GetPrivateProfileInt(S_MACH_RAWMOVE, K_MACH_ROTATEVACUUMFOREXTRASTROKEY, 0, m_MainWindow.GetMachIniFile()) <> 0)
|
||||
VacuumCups.GetRotationForExtraStrokeX(GetPrivateProfileInt(S_MACH_RAWMOVE, K_MACH_ROTATEVACUUMFOREXTRASTROKEX, 0, m_MainWindow.GetMachIniFile()) <> 0)
|
||||
If PutVacuumCupsOnRaw(nId, rmData) Then
|
||||
' Visualizzo le ventose
|
||||
EgtSetStatus(GetVacuumId(), GDB_ST.ON_)
|
||||
@@ -249,10 +283,18 @@ Public Class MoveRawPartPage
|
||||
' Reset eventuale messaggio
|
||||
m_CurrProjPage.ClearMessage()
|
||||
Else
|
||||
' nascondo la visualizzazione delle ventose
|
||||
EgtSetStatus(GetVacuumId(), GDB_ST.OFF)
|
||||
' Aggiorno i dati
|
||||
m_bRawWithCups = False
|
||||
' Messaggio di avvertimento
|
||||
m_CurrProjPage.SetWarningMessage(EgtMsg(MSG_MOVERAWPAGEUC + 2)) 'Pezzo troppo piccolo : non si può muovere
|
||||
If VacuumCups.bOverWeight Then
|
||||
m_CurrProjPage.SetWarningMessage(EgtMsg(MSG_MOVERAWPAGEUC + 4)) 'Pezzo troppo pesante : non si può muovere
|
||||
ElseIf VacuumCups.bExtraStroke Then
|
||||
m_CurrProjPage.SetWarningMessage(EgtMsg(MSG_MOVERAWPAGEUC + 5)) 'Pezzo oltre le corse : non si può muovere
|
||||
Else
|
||||
' Messaggio di avvertimento
|
||||
m_CurrProjPage.SetWarningMessage(EgtMsg(MSG_MOVERAWPAGEUC + 2)) 'Pezzo troppo piccolo : non si può muovere
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
@@ -261,8 +303,52 @@ Public Class MoveRawPartPage
|
||||
End If
|
||||
nId = EgtGetNextObjInSelWin()
|
||||
End While
|
||||
|
||||
' clicco su un oggetto che non è un grezzo -> verifico che il pezzo precedente possa essere depositato correttamente
|
||||
If VerifyCollisionWithOtherRawPart(m_CurrRawOnVacuum) Then
|
||||
' mantengo la selezione del pezzo
|
||||
EgtSetStatus(m_CurrRawOnVacuum, GDB_ST.SEL)
|
||||
m_CurrProjPage.SetErrorMessage("Collisione pezzi")
|
||||
EgtDraw()
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
' Veririfica che il grezzo non entri in colliosione con altri pezzi
|
||||
Private Function VerifyCollisionWithOtherRawPart(nIdOnVacumm As Integer) As Boolean
|
||||
If nIdOnVacumm = GDB_ID.NULL Then Return False
|
||||
' Creo gruppo temporaneo in cui generare le superfici per la veririfica di collisione
|
||||
Dim m_nTempId As Integer = EgtCreateGroup(GDB_ID.ROOT)
|
||||
If m_nTempId = GDB_ID.NULL Then Return False
|
||||
EgtSetName(m_nTempId, "RawTemp")
|
||||
Dim nIdActualRawOutLine As Integer = EgtGetFirstNameInGroup(nIdOnVacumm, "RawOutline")
|
||||
Dim ActualRawFlatRegion As Integer = EgtCreateSurfFlatRegion(m_nTempId, nIdActualRawOutLine)
|
||||
Dim nCurrPhase As Integer = EgtGetCurrPhase()
|
||||
Dim nRawGroupId = EgtGetParent(EgtGetFirstRawPart())
|
||||
Dim nIdRaw As Integer = EgtGetFirstRawPart()
|
||||
' ciclo su tutti i grezzi per veririficare eventuali collisioni
|
||||
While nIdRaw <> GDB_ID.NULL
|
||||
' verifico la fase del grezzo
|
||||
If EgtVerifyRawPartCurrPhase(nIdRaw) And nIdOnVacumm <> nIdRaw Then
|
||||
' recupero il contorno del pezzo
|
||||
Dim nIdRawOutLine As Integer = EgtGetFirstNameInGroup(nIdRaw, "RawOutline")
|
||||
Dim nIdRawFlatRegion As Integer = EgtCreateSurfFlatRegion(m_nTempId, nIdRawOutLine)
|
||||
If EgtSurfFrIntersect(nIdRawFlatRegion, ActualRawFlatRegion) Then
|
||||
If EgtExistsObj(nIdRawFlatRegion) Then
|
||||
EgtErase(m_nTempId)
|
||||
' esiste una intersezione delle superfici
|
||||
Return True
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
nIdRaw = EgtGetNextRawPart(nIdRaw)
|
||||
End While
|
||||
EgtErase(m_nTempId)
|
||||
Return False
|
||||
End Function
|
||||
|
||||
#Region "Move Up/Down/Left/Right"
|
||||
|
||||
Private Sub UpBtn_Click(sender As Object, e As RoutedEventArgs) Handles UpBtn.Click
|
||||
Dim nRawId As Integer = EgtGetFirstSelectedObj()
|
||||
While nRawId <> GDB_ID.NULL
|
||||
@@ -285,9 +371,15 @@ Public Class MoveRawPartPage
|
||||
Else
|
||||
If m_bRawWithCups Then
|
||||
Dim vtMove As New Vector3d(0, m_dStep, 0)
|
||||
' ----------- INIZIO verifica di essere entro i limiti macchina -----------
|
||||
m_CurrProjPage.ClearMessage()
|
||||
VerifyReleasdPositionIsValid(vtMove)
|
||||
' ----------- FINE verifica di essere entro i limiti macchina -----------
|
||||
If EgtMoveRawPart(nRawId, vtMove) Then
|
||||
EgtMove(GetVacuumId(), vtMove, GDB_RT.GLOB)
|
||||
AddRawMoveData(nRawId, vtMove, m_RawMoveDataList)
|
||||
Else
|
||||
VacuumCups.ptStartPointLift.y -= vtMove.y
|
||||
End If
|
||||
Else
|
||||
m_CurrProjPage.SetWarningMessage(EgtMsg(MSG_MOVERAWPAGEUC + 2)) 'Pezzo troppo piccolo : non si può muovere
|
||||
@@ -322,9 +414,15 @@ Public Class MoveRawPartPage
|
||||
Else
|
||||
If m_bRawWithCups Then
|
||||
Dim vtMove As New Vector3d(0, -m_dStep, 0)
|
||||
' ----------- INIZIO verifica di essere entro i limiti macchina -----------
|
||||
m_CurrProjPage.ClearMessage()
|
||||
VerifyReleasdPositionIsValid(vtMove)
|
||||
' ----------- FINE verifica di essere entro i limiti macchina -----------
|
||||
If EgtMoveRawPart(nRawId, vtMove) Then
|
||||
EgtMove(GetVacuumId(), vtMove, GDB_RT.GLOB)
|
||||
AddRawMoveData(nRawId, vtMove, m_RawMoveDataList)
|
||||
Else
|
||||
VacuumCups.ptStartPointLift.y -= vtMove.y
|
||||
End If
|
||||
Else
|
||||
m_CurrProjPage.SetWarningMessage(EgtMsg(MSG_MOVERAWPAGEUC + 2)) 'Pezzo troppo piccolo : non si può muovere
|
||||
@@ -342,9 +440,15 @@ Public Class MoveRawPartPage
|
||||
While nRawId <> GDB_ID.NULL
|
||||
If m_bRawWithCups Then
|
||||
Dim vtMove As New Vector3d(m_dStep, 0, 0)
|
||||
' ----------- INIZIO verifica di essere entro i limiti macchina -----------
|
||||
m_CurrProjPage.ClearMessage()
|
||||
VerifyReleasdPositionIsValid(vtMove)
|
||||
' ----------- FINE verifica di essere entro i limiti macchina -----------
|
||||
If EgtMoveRawPart(nRawId, vtMove) Then
|
||||
EgtMove(GetVacuumId(), vtMove, GDB_RT.GLOB)
|
||||
AddRawMoveData(nRawId, vtMove, m_RawMoveDataList)
|
||||
Else
|
||||
VacuumCups.ptStartPointLift.x -= vtMove.x
|
||||
End If
|
||||
Else
|
||||
m_CurrProjPage.SetWarningMessage(EgtMsg(MSG_MOVERAWPAGEUC + 2)) 'Pezzo troppo piccolo : non si può muovere
|
||||
@@ -361,9 +465,15 @@ Public Class MoveRawPartPage
|
||||
While nRawId <> GDB_ID.NULL
|
||||
If m_bRawWithCups Then
|
||||
Dim vtMove As New Vector3d(-m_dStep, 0, 0)
|
||||
' ----------- INIZIO verifica di essere entro i limiti macchina -----------
|
||||
m_CurrProjPage.ClearMessage()
|
||||
VerifyReleasdPositionIsValid(vtMove)
|
||||
' ----------- FINE verifica di essere entro i limiti macchina -----------
|
||||
If EgtMoveRawPart(nRawId, vtMove) Then
|
||||
EgtMove(GetVacuumId(), vtMove, GDB_RT.GLOB)
|
||||
AddRawMoveData(nRawId, vtMove, m_RawMoveDataList)
|
||||
Else
|
||||
VacuumCups.ptStartPointLift.x -= vtMove.x
|
||||
End If
|
||||
Else
|
||||
m_CurrProjPage.SetWarningMessage(EgtMsg(MSG_MOVERAWPAGEUC + 2)) 'Pezzo troppo piccolo : non si può muovere
|
||||
@@ -373,6 +483,77 @@ Public Class MoveRawPartPage
|
||||
EgtDraw()
|
||||
End Sub
|
||||
|
||||
#End Region 'Move Up/Down/Left/Right
|
||||
|
||||
' verifica che la poszione da raggiungere sia nei limiti delle corse
|
||||
Private Function VerifyReleasdPositionIsValid(ByRef vtMove As Vector3d) As Boolean
|
||||
Dim bOk As Boolean = True
|
||||
' determino il punto finale dello spostamento
|
||||
Dim ptEndPointLift As Point3d = VacuumCups.ptStartPointLift
|
||||
ptEndPointLift.x += vtMove.x
|
||||
ptEndPointLift.y += vtMove.y
|
||||
Dim sInfo As String = String.Empty
|
||||
Select Case VacuumCups.VerifyOutOfStrokes(ptEndPointLift, VacuumCups.dDegRotStartAng)
|
||||
Case 1
|
||||
' extra corsa sulla x-: devo ridurre del valore di extra corsa
|
||||
EgtGetOutstrokeInfo(sInfo)
|
||||
m_CurrProjPage.SetWarningMessage(EgtMsg(MSG_SIMULATIONPAGEUC + 2) & " " & sInfo) 'Extracorsa ...
|
||||
ptEndPointLift.x -= vtMove.x
|
||||
Dim dMaxMove As Double = VacuumCups.GetExtraStrokeValue(sInfo)
|
||||
If Math.Abs(dMaxMove - vtMove.x) <= EPS_SMALL * 100 Then
|
||||
vtMove.x = 0
|
||||
Else
|
||||
vtMove.x -= dMaxMove - EPS_SMALL * 100
|
||||
End If
|
||||
ptEndPointLift.x += vtMove.x
|
||||
bOk = False
|
||||
Case 2
|
||||
' extra corsa sulla x+: devo ridurre del valore di extra corsa
|
||||
EgtGetOutstrokeInfo(sInfo)
|
||||
m_CurrProjPage.SetWarningMessage(EgtMsg(MSG_SIMULATIONPAGEUC + 2) & " " & sInfo) 'Extracorsa ...
|
||||
ptEndPointLift.x -= vtMove.x
|
||||
Dim dMaxMove As Double = VacuumCups.GetExtraStrokeValue(sInfo)
|
||||
If Math.Abs(dMaxMove - vtMove.x) <= EPS_SMALL * 100 Then
|
||||
vtMove.x = 0
|
||||
Else
|
||||
vtMove.x -= dMaxMove + EPS_SMALL * 100
|
||||
End If
|
||||
ptEndPointLift.x += vtMove.x
|
||||
bOk = False
|
||||
Case 4
|
||||
' extra corsa sulla y-
|
||||
EgtGetOutstrokeInfo(sInfo)
|
||||
m_CurrProjPage.SetWarningMessage(EgtMsg(MSG_SIMULATIONPAGEUC + 2) & " " & sInfo) 'Extracorsa ...
|
||||
ptEndPointLift.y -= vtMove.y
|
||||
Dim dMaxMove As Double = VacuumCups.GetExtraStrokeValue(sInfo)
|
||||
If Math.Abs(dMaxMove - vtMove.y) <= EPS_SMALL * 100 Then
|
||||
vtMove.y = 0
|
||||
Else
|
||||
vtMove.y -= dMaxMove - EPS_SMALL * 100
|
||||
End If
|
||||
ptEndPointLift.y += vtMove.y
|
||||
bOk = False
|
||||
Case 8
|
||||
' extra corsa sulla y+
|
||||
EgtGetOutstrokeInfo(sInfo)
|
||||
m_CurrProjPage.SetWarningMessage(EgtMsg(MSG_SIMULATIONPAGEUC + 2) & " " & sInfo) 'Extracorsa ...
|
||||
ptEndPointLift.y -= vtMove.y
|
||||
Dim dMaxMove As Double = VacuumCups.GetExtraStrokeValue(sInfo)
|
||||
If Math.Abs(dMaxMove - vtMove.y) <= EPS_SMALL * 100 Then
|
||||
vtMove.y = 0
|
||||
Else
|
||||
vtMove.y -= dMaxMove + EPS_SMALL * 100
|
||||
End If
|
||||
ptEndPointLift.y += vtMove.y
|
||||
bOk = False
|
||||
End Select
|
||||
' il movimento del pezzo è accettabile, aggiorno le posizione per la verifica dello step successivo
|
||||
VacuumCups.ptStartPointLift = ptEndPointLift
|
||||
Return bOk
|
||||
End Function
|
||||
|
||||
#Region "Rotate CounterClockWise/ClockWise"
|
||||
|
||||
Private Sub RotateCounterClockwiseBtn_Click(sender As Object, e As RoutedEventArgs) Handles RotateCounterClockwiseBtn.Click
|
||||
' Solo movimento con ventose
|
||||
If m_bByHand Then Return
|
||||
@@ -380,14 +561,24 @@ Public Class MoveRawPartPage
|
||||
While nRawId <> GDB_ID.NULL
|
||||
If m_bRawWithCups Then
|
||||
Dim dAng As Double = m_dRotation
|
||||
' ----------- INIZIO verifica di essere entro i limiti macchina -----------
|
||||
' Recupero il centro del grezzo
|
||||
Dim ptRawCen As Point3d
|
||||
EgtGetRawPartCenter(nRawId, ptRawCen)
|
||||
m_CurrProjPage.ClearMessage()
|
||||
VerifyReleasdAngleIsValid(dAng, ptRawCen)
|
||||
' ----------- FINE verifica di essere entro i limiti macchina -----------
|
||||
If EgtRotateRawPart(nRawId, Vector3d.Z_AX(), dAng) Then
|
||||
' Recupero il centro del grezzo
|
||||
Dim ptRawCen As Point3d
|
||||
EgtGetRawPartCenter(nRawId, ptRawCen)
|
||||
'' Recupero il centro del grezzo
|
||||
'Dim ptRawCen As Point3d
|
||||
'EgtGetRawPartCenter(nRawId, ptRawCen)
|
||||
' Eseguo la rotazione della ventosa
|
||||
EgtRotate(GetVacuumId(), ptRawCen, Vector3d.Z_AX(), dAng, GDB_RT.GLOB)
|
||||
' Memorizzo
|
||||
AddRawMoveData(nRawId, dAng, m_RawMoveDataList)
|
||||
Else
|
||||
VacuumCups.ptStartPointLift.Rotate(ptRawCen, Vector3d.Z_AX(), dAng)
|
||||
VacuumCups.dDegRotStartAng -= dAng
|
||||
End If
|
||||
Else
|
||||
m_CurrProjPage.SetWarningMessage(EgtMsg(MSG_MOVERAWPAGEUC + 2)) 'Pezzo troppo piccolo : non si può muovere
|
||||
@@ -404,14 +595,24 @@ Public Class MoveRawPartPage
|
||||
While nRawId <> GDB_ID.NULL
|
||||
If m_bRawWithCups Then
|
||||
Dim dAng As Double = -m_dRotation
|
||||
' ----------- INIZIO verifica di essere entro i limiti macchina -----------
|
||||
' Recupero il centro del grezzo
|
||||
Dim ptRawCen As Point3d
|
||||
EgtGetRawPartCenter(nRawId, ptRawCen)
|
||||
m_CurrProjPage.ClearMessage()
|
||||
VerifyReleasdAngleIsValid(dAng, ptRawCen)
|
||||
' ----------- FINE verifica di essere entro i limiti macchina -----------
|
||||
If EgtRotateRawPart(nRawId, Vector3d.Z_AX(), dAng) Then
|
||||
' Recupero il centro del grezzo
|
||||
Dim ptRawCen As Point3d
|
||||
EgtGetRawPartCenter(nRawId, ptRawCen)
|
||||
'' Recupero il centro del grezzo
|
||||
'Dim ptRawCen As Point3d
|
||||
'EgtGetRawPartCenter(nRawId, ptRawCen)
|
||||
' Eseguo la rotazione della ventosa
|
||||
EgtRotate(GetVacuumId(), ptRawCen, Vector3d.Z_AX(), dAng, GDB_RT.GLOB)
|
||||
' Memorizzo
|
||||
AddRawMoveData(nRawId, dAng, m_RawMoveDataList)
|
||||
Else
|
||||
VacuumCups.ptStartPointLift.Rotate(ptRawCen, Vector3d.Z_AX(), dAng)
|
||||
VacuumCups.dDegRotStartAng -= dAng
|
||||
End If
|
||||
Else
|
||||
m_CurrProjPage.SetWarningMessage(EgtMsg(MSG_MOVERAWPAGEUC + 2)) 'Pezzo troppo piccolo : non si può muovere
|
||||
@@ -421,6 +622,44 @@ Public Class MoveRawPartPage
|
||||
EgtDraw()
|
||||
End Sub
|
||||
|
||||
#End Region ' Rotate CounterClockWise/ClockWise
|
||||
|
||||
' verifica che la rotazione da raggiungere sia nei limiti delle corse
|
||||
Private Function VerifyReleasdAngleIsValid(ByRef dAngDeg As Double, ByVal ptCenter As Point3d) As Boolean
|
||||
Dim bOk As Boolean = True
|
||||
' determino il punto finale dello spostamento
|
||||
Dim ptEndPointLift As Point3d = VacuumCups.ptStartPointLift
|
||||
Dim dDegRotEndAng As Double = VacuumCups.dDegRotStartAng + dAngDeg
|
||||
ptEndPointLift.Rotate(ptCenter, Vector3d.Z_AX(), dAngDeg)
|
||||
Dim sInfo As String = String.Empty
|
||||
Select Case VacuumCups.VerifyOutOfStrokes(ptEndPointLift, dDegRotEndAng)
|
||||
Case 16
|
||||
' extra corsa sulla c-
|
||||
EgtGetOutstrokeInfo(sInfo)
|
||||
m_CurrProjPage.SetWarningMessage(EgtMsg(MSG_SIMULATIONPAGEUC + 2) & " " & sInfo) 'Extracorsa ...
|
||||
ptEndPointLift.Rotate(ptCenter, Vector3d.Z_AX(), -dAngDeg)
|
||||
dDegRotEndAng -= dAngDeg
|
||||
dAngDeg += VacuumCups.GetExtraStrokeValue(sInfo) + EPS_SMALL
|
||||
dDegRotEndAng += dAngDeg
|
||||
ptEndPointLift.Rotate(ptCenter, Vector3d.Z_AX(), dAngDeg)
|
||||
bOk = False
|
||||
Case 34
|
||||
' extra corsa sulla c+
|
||||
EgtGetOutstrokeInfo(sInfo)
|
||||
m_CurrProjPage.SetWarningMessage(EgtMsg(MSG_SIMULATIONPAGEUC + 2) & " " & sInfo) 'Extracorsa ...
|
||||
ptEndPointLift.Rotate(ptCenter, Vector3d.Z_AX(), -dAngDeg)
|
||||
dDegRotEndAng -= dAngDeg
|
||||
dAngDeg -= VacuumCups.GetExtraStrokeValue(sInfo) + EPS_SMALL
|
||||
dDegRotEndAng += dAngDeg
|
||||
ptEndPointLift.Rotate(ptCenter, Vector3d.Z_AX(), dAngDeg)
|
||||
bOk = False
|
||||
End Select
|
||||
' il movimento del pezzo è accettabile, aggiorno le posizione per la verifica dello step successivo
|
||||
VacuumCups.ptStartPointLift = ptEndPointLift
|
||||
VacuumCups.dDegRotStartAng = dDegRotEndAng
|
||||
Return bOk
|
||||
End Function
|
||||
|
||||
Private Sub RemovePartBtn_Click(sender As Object, e As RoutedEventArgs) Handles RemovePartBtn.Click
|
||||
Dim nRawId As Integer = EgtGetFirstSelectedObj()
|
||||
While nRawId <> GDB_ID.NULL
|
||||
@@ -658,6 +897,17 @@ Public Class MoveRawPartPage
|
||||
End Sub
|
||||
|
||||
Private Sub PrevBtn_Click(sender As Object, e As RoutedEventArgs) Handles PrevBtn.Click
|
||||
' verifico che il pezzo sia depositabile
|
||||
If VerifyCollisionWithOtherRawPart(m_CurrRawOnVacuum) Then
|
||||
' mantengo la selezione del pezzo
|
||||
EgtSetStatus(m_CurrRawOnVacuum, GDB_ST.SEL)
|
||||
m_CurrProjPage.SetErrorMessage("Collisione pezzi")
|
||||
EgtDraw()
|
||||
' non cambio pagina
|
||||
Return
|
||||
End If
|
||||
' resetto l'inidice del pezzo da mnovimentare
|
||||
m_CurrRawOnVacuum = GDB_ID.NULL
|
||||
' Deseleziono tutto
|
||||
EgtDeselectAll()
|
||||
' Torno alla fase precedente
|
||||
@@ -669,6 +919,17 @@ Public Class MoveRawPartPage
|
||||
End Sub
|
||||
|
||||
Private Sub NextBtn_Click(sender As Object, e As RoutedEventArgs) Handles NextBtn.Click
|
||||
' verifico che il pezzo sia depositabile
|
||||
If VerifyCollisionWithOtherRawPart(m_CurrRawOnVacuum) Then
|
||||
' mantengo la selezione del pezzo
|
||||
EgtSetStatus(m_CurrRawOnVacuum, GDB_ST.SEL)
|
||||
m_CurrProjPage.SetErrorMessage("Collisione pezzi")
|
||||
EgtDraw()
|
||||
' non cambio pagina
|
||||
Return
|
||||
End If
|
||||
' resetto l'inidice del pezzo da mnovimentare
|
||||
m_CurrRawOnVacuum = GDB_ID.NULL
|
||||
' Deseleziono tutto
|
||||
EgtDeselectAll()
|
||||
' Passo alla pagina delle spezzature
|
||||
|
||||
@@ -99,19 +99,30 @@
|
||||
<Image Source="{DynamicResource ClockwiseRotateImg}" Width="65" Height="65" HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center" />
|
||||
</Button>
|
||||
|
||||
<UniformGrid Grid.Column="0" Grid.Row="5" Grid.ColumnSpan="3" Columns="2" >
|
||||
|
||||
<UniformGrid Name ="UG0" Grid.Column="0" Grid.Row="5" Grid.ColumnSpan="3" Columns="3" >
|
||||
<Button Name="InsertPartBtn" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource Inserisci-pezzoImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="StorePartBtn" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource Parcheggia-pezzoImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||
</Button>
|
||||
<ToggleButton Name="StartCurveWJBtn" Style="{DynamicResource OmagCut_YellowIconToggleButton}">
|
||||
<Image Source="{DynamicResource StartWJImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||
</ToggleButton>
|
||||
</UniformGrid>
|
||||
|
||||
<UniformGrid Name ="UG1" Grid.Column="0" Grid.Row="6" Grid.ColumnSpan="3" Columns="3" >
|
||||
<Button Name="RemovePartBtn" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource Elimina-pezzoImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||
</Button>
|
||||
<ToggleButton Name="DragRettanleBtn" Style="{DynamicResource OmagCut_YellowIconToggleButton}">
|
||||
<Image Source="{DynamicResource Drag_RettangleImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||
</ToggleButton>
|
||||
<ToggleButton Name="SplitCurveWJBtn" Style="{DynamicResource OmagCut_YellowIconToggleButton}">
|
||||
<Image Source="{DynamicResource SplitWJImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||
</ToggleButton>
|
||||
</UniformGrid>
|
||||
|
||||
<Button Name="RemovePartBtn" Grid.ColumnSpan="3" Grid.Row="6" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource Elimina-pezzoImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||
</Button>
|
||||
|
||||
<UniformGrid Grid.Column="0" Grid.Row="7" Grid.ColumnSpan="3" Columns="2" >
|
||||
<Button Name="SelectAllBtn" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
|
||||
@@ -9,6 +9,7 @@ Public Class OpenFileWD
|
||||
Private m_sCurrFile As String = String.Empty
|
||||
Private m_sExt As String = String.Empty
|
||||
Private m_sExt2 As String = String.Empty
|
||||
Private n_sDeniedFiles As New List(Of String)
|
||||
|
||||
Private m_OpenItemList As New ObservableCollection(Of IconListBoxItem)
|
||||
|
||||
@@ -27,6 +28,15 @@ Public Class OpenFileWD
|
||||
InitializeComponent()
|
||||
End Sub
|
||||
|
||||
Sub New(Owner As Window, sDir As String, sExt As String, sExt2 As String, DeniedFiles As List(Of String))
|
||||
Me.Owner = Owner
|
||||
m_sCurrDir = sDir
|
||||
m_sExt = sExt
|
||||
m_sExt2 = sExt2
|
||||
n_sDeniedFiles = DeniedFiles
|
||||
InitializeComponent()
|
||||
End Sub
|
||||
|
||||
Private Sub OpenFile_Initialized(sender As Object, e As EventArgs) Handles Me.Initialized
|
||||
' Posizione finestra
|
||||
Me.Top = Owner.Top + Owner.Height / 2 - Me.Height / 2
|
||||
@@ -71,13 +81,20 @@ Public Class OpenFileWD
|
||||
Dim FileI As FileInfo
|
||||
For Each FileI In vFileI
|
||||
Dim sExt As String = Path.GetExtension(FileI.Name).ToUpper()
|
||||
If String.Compare(sExt, m_sExt, True) = 0 Or
|
||||
String.Compare(sExt, m_sExt2, True) = 0 Then
|
||||
Dim sFileName As String = Path.GetFileNameWithoutExtension(FileI.Name).ToUpper.Trim
|
||||
Dim bDenied As Boolean = False
|
||||
For Each ItemFile As String In n_sDeniedFiles
|
||||
If ItemFile.ToUpper.Trim = sFileName Then
|
||||
bDenied = True
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
If (String.Compare(sExt, m_sExt, True) = 0 Or String.Compare(sExt, m_sExt2, True) = 0) And Not bDenied Then
|
||||
m_OpenItemList.Add(New IconListBoxItem(FileI.Name, 3))
|
||||
End If
|
||||
Next
|
||||
' riporto visualizzazione in cima alla lista (esiste sempre almeno un elemento)
|
||||
FileListBox.ScrollIntoView(m_OpenItemList(0))
|
||||
' riporto visualizzazione in cima alla lista (esiste sempre almeno un elemento)
|
||||
FileListBox.ScrollIntoView(m_OpenItemList(0))
|
||||
Return True
|
||||
End Function
|
||||
|
||||
|
||||
@@ -0,0 +1,72 @@
|
||||
<Window x:Class="SelectPartFromFamilyWD"
|
||||
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"
|
||||
FontFamily="{DynamicResource OmagCut_Font}"
|
||||
ResizeMode="NoResize" WindowStyle="None" AllowsTransparency="True" Background="Transparent"
|
||||
Title="SaveNameWD" Height="200" Width="400" ShowInTaskbar="False">
|
||||
<!--Definizione della pagina di scelta del nome con cui salvare il progetto-->
|
||||
<Border Style="{DynamicResource OmagCut_Border}">
|
||||
<Grid x:Name="SaveNameGrid">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
<ColumnDefinition Width="4*"/>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="0.1*"/>
|
||||
<RowDefinition Height="0.3*"/>
|
||||
<RowDefinition Height="0.2*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="0.2*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="0.2*"/>
|
||||
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<!--Messaggio: Seleziona il numero di pezzi-->
|
||||
<TextBlock Name="TitleWDTxbl" Grid.Column="1" Grid.Row="1"
|
||||
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||
|
||||
<UniformGrid Grid.Column="1" Grid.Row="3" VerticalAlignment="Center" Columns="2">
|
||||
<TextBlock Name="NbrOfPartsMsg"
|
||||
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="NbrOfParts"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
</UniformGrid>
|
||||
|
||||
<Grid Name="ButtonsGrid" Grid.Column="1" Grid.Row="5" Grid.RowSpan="1">
|
||||
<Grid.ColumnDefinitions>
|
||||
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<!--ultimo progetto-->
|
||||
<Button Name="ConfirmSelection" Grid.Column="1" Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}"
|
||||
ToolTip="Confirm">
|
||||
<Image Source="{DynamicResource VImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
<!--nuovo progetto-->
|
||||
<Button Name="SelectAllPart" Grid.Column="2" Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}"
|
||||
ToolTip="Select all" Visibility="Collapsed">
|
||||
<Image Source="{DynamicResource NuovoImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
<!--apri folder progetti-->
|
||||
<Button Name="CancelSelection" Grid.Column="5" Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}"
|
||||
ToolTip="Cancel">
|
||||
<Image Source="{DynamicResource XImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
|
||||
</Grid>
|
||||
|
||||
</Grid>
|
||||
|
||||
</Border>
|
||||
</Window>
|
||||
@@ -0,0 +1,66 @@
|
||||
Public Class SelectPartFromFamilyWD
|
||||
Private m_MainWindow As MainWindow = DirectCast(Application.Current.MainWindow, MainWindow)
|
||||
|
||||
Private m_NumberOfParts As Integer = 1
|
||||
Public Property NumberOfParts As Integer
|
||||
Get
|
||||
Return m_NumberOfParts
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
m_NumberOfParts = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_NumberOfSelection As Integer = 1
|
||||
Public Property NumberOfSelection As Integer
|
||||
Get
|
||||
Return m_NumberOfSelection
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
m_NumberOfSelection = value
|
||||
End Set
|
||||
End Property
|
||||
Public Sub New(Owner As Window, NbrParts As Integer)
|
||||
Me.Owner = Owner
|
||||
m_NumberOfParts = NbrParts
|
||||
InitializeComponent()
|
||||
Me.ShowDialog()
|
||||
End Sub
|
||||
|
||||
' inizializzo la finestra
|
||||
Private Sub SelectPartFromFamilyWD_Initialized(sender As Object, e As EventArgs) Handles Me.Initialized
|
||||
' posiziono la fistra in centro alla pagina
|
||||
Me.Top = Owner.Top + Owner.Height / 2 - Me.Height / 2
|
||||
Me.Left = Owner.Left + Owner.Width / 2 - Me.Width / 2
|
||||
|
||||
TitleWDTxbl.Text = "Selection parts"
|
||||
NbrOfPartsMsg.Text = "Number of parts"
|
||||
NbrOfParts.Text = m_NumberOfParts.ToString
|
||||
End Sub
|
||||
|
||||
' seleziono il numero di elementi indicati
|
||||
Private Sub ConfirmSelection_Click(sender As Object, e As RoutedEventArgs) Handles ConfirmSelection.Click
|
||||
Dim nVal As Integer = 0
|
||||
StringToInt(NbrOfParts.Text, nVal)
|
||||
If nVal >= 0 Then
|
||||
m_NumberOfSelection = nVal
|
||||
Else
|
||||
' indice non valido per la selezione
|
||||
m_NumberOfSelection = 0
|
||||
End If
|
||||
Me.Close()
|
||||
End Sub
|
||||
|
||||
'' seleziona tutti
|
||||
'Private Sub SelectAllPart_Click(sender As Object, e As RoutedEventArgs) Handles SelectAllPart.Click
|
||||
' m_NumberOfSelection = m_NumberOfParts
|
||||
' Me.Close()
|
||||
'End Sub
|
||||
|
||||
' Deseleziomo tutto
|
||||
Private Sub CancelSelection_Click(sender As Object, e As RoutedEventArgs) Handles CancelSelection.Click
|
||||
m_NumberOfSelection = 0
|
||||
Me.Close()
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
@@ -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
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
Imports EgtUILib
|
||||
Imports System.Text.RegularExpressions
|
||||
|
||||
Module VacuumCups
|
||||
' Tipo manipolatore con ventosa (0=assente, 1=dietro, 2=laterale)
|
||||
@@ -8,7 +9,24 @@ Module VacuumCups
|
||||
Private m_nVacId As Integer = GDB_ID.NULL
|
||||
Private m_nRefId As Integer = GDB_ID.NULL
|
||||
Private m_dPreferredRot As Double = 0
|
||||
Private m_dPrefVertRotXMinus As Double = 0
|
||||
Private m_dPrefVertRotXPlus As Double = 0
|
||||
Private m_dPrefVertRotYMinus As Double = 0
|
||||
Private m_dPrefVertRotYPlus As Double = 0
|
||||
Private m_dDripRefAng As Double = 0
|
||||
' dati carico massimo manipolatore
|
||||
Private m_RawDensity As Double = 2500
|
||||
Private m_RawWeight As Double = 0
|
||||
Private m_MaxWeightSinglePlugger As Double = 250
|
||||
Private m_MaxWeightDoublePlugger As Double = 750
|
||||
Public bOverWeight As Boolean = False
|
||||
' dati per rotazione ventose vicono al fine corsa Y e X
|
||||
Private bRotateVacuumNearExtraStrokeY As Boolean = False
|
||||
Private bRotateVacuumNearExtraStrokeX As Boolean = False
|
||||
' dati stroke
|
||||
Public bExtraStroke As Boolean = False
|
||||
Public ptStartPointLift As Point3d
|
||||
Public dDegRotStartAng As Double
|
||||
|
||||
' Nome del gruppo temporaneo per le ventose
|
||||
Private Const VACTMP_GRP As String = "VacTmp"
|
||||
@@ -48,6 +66,20 @@ Module VacuumCups
|
||||
Return m_nVacType
|
||||
End Function
|
||||
|
||||
' carico i dati macchina relativi al peso massimo movimentabile
|
||||
Friend Sub GetWeightInformation(Density As Double, MaxSingle As Double, MaxDouble As Double)
|
||||
m_RawDensity = Density
|
||||
m_MaxWeightSinglePlugger = MaxSingle
|
||||
m_MaxWeightDoublePlugger = MaxDouble
|
||||
End Sub
|
||||
|
||||
Friend Sub GetRotationForExtraStrokeY(Rotate As Boolean)
|
||||
bRotateVacuumNearExtraStrokeY = Rotate
|
||||
End Sub
|
||||
|
||||
Friend Sub GetRotationForExtraStrokeX(Rotate As Boolean)
|
||||
bRotateVacuumNearExtraStrokeX = Rotate
|
||||
End Sub
|
||||
Friend Function GetVacuumId() As Integer
|
||||
Return m_nVacId
|
||||
End Function
|
||||
@@ -64,6 +96,8 @@ Module VacuumCups
|
||||
' Identificativo riferimento della testa nella macchina
|
||||
Dim nT1Id As Integer = EgtGetFirstNameInGroup(EgtGetHeadId(VACUUM_HEAD), HEAD_FIRST_EXIT)
|
||||
If nT1Id = GDB_ID.NULL Then Return False
|
||||
' imposto la l'uscita della ventosa come fosse l'uscita di un utensile
|
||||
EgtSetCalcTool("", "H4", 1)
|
||||
' Creo gruppo temporaneo in cui copiarli
|
||||
m_nTempId = EgtCreateGroup(GDB_ID.ROOT)
|
||||
If m_nTempId = GDB_ID.NULL Then Return False
|
||||
@@ -74,6 +108,11 @@ Module VacuumCups
|
||||
If m_nVacId = GDB_ID.NULL Then Return False
|
||||
' Angolo di rotazione preferito
|
||||
EgtGetInfo( m_nVacId, KEY_VACLAY_PREFROT, m_dPreferredRot)
|
||||
' Angoli di rotazione preferiti per ventosa in verticale (lungo Y) a sinistra e a destra del centro tavola
|
||||
EgtGetInfo( m_nVacId, KEY_VACLAY_PREFVROTXMINUS, m_dPrefVertRotXMinus)
|
||||
EgtGetInfo(m_nVacId, KEY_VACLAY_PREFVROTXPLUS, m_dPrefVertRotXPlus)
|
||||
EgtGetInfo(m_nVacId, KEY_VACLAY_PREFVROTYMINUS, m_dPrefVertRotYMinus)
|
||||
EgtGetInfo(m_nVacId, KEY_VACLAY_PREFVROTYPLUS, m_dPrefVertRotYPlus)
|
||||
' Direzione di riferimento per tagli Drip
|
||||
EgtGetInfo( m_nVacId, KEY_VACLAY_DRIPREFDIR, m_dDripRefAng)
|
||||
' Nascondo il gruppo ma rendo visibili le curve di contorno delle ventose
|
||||
@@ -160,6 +199,18 @@ Module VacuumCups
|
||||
EgtGetBBoxGlob(nRKerfId, GDB_BB.STANDARD, b3Kerf)
|
||||
Dim ptKerfCen As Point3d
|
||||
EgtCentroid(nRKerfId, GDB_ID.ROOT, ptKerfCen)
|
||||
|
||||
'-------------------- INIZIO CALCOLO PESO --------------------
|
||||
' recupero l'area del grezzo da muovere
|
||||
Dim RawArea As Double = 0
|
||||
' superficie del grezzo senza considerare eventuali fori
|
||||
EgtSurfFrGrossArea(nRKerfId, RawArea)
|
||||
' volume calcolato in mmc
|
||||
Dim RawVolume As Double = RawArea * b3Raw.DimZ()
|
||||
' peso calolato in kg
|
||||
m_RawWeight = RawVolume * m_RawDensity / Math.Pow(10, 9)
|
||||
'-------------------- FINE CALCOLO PESO --------------------
|
||||
|
||||
' Eseguo ricerca
|
||||
If FindVacuumCupsOnRaw(nRawId, ptRawCen, b3Kerf, ptKerfCen, nKerfId, nRKerfId, rmData) Then
|
||||
Return True
|
||||
@@ -182,6 +233,7 @@ Module VacuumCups
|
||||
Return False
|
||||
End Function
|
||||
|
||||
' utilizzata per gestire la movimentazione dei pezzi per eseguire i drip
|
||||
Friend Function PutVacuumCupsOnPart(nPartId As Integer,
|
||||
ByRef rmData As RawMoveData, ByRef b3Part As BBox3d) As Boolean
|
||||
' Ripristino posizione originale ventose
|
||||
@@ -261,6 +313,7 @@ Module VacuumCups
|
||||
Dim sCups() As String = Nothing
|
||||
Dim sCups2() As String = Nothing
|
||||
If Not GetVacuumCupSelection(nI, sCups, sCups2) Then Return False
|
||||
bExtraStroke = False
|
||||
' Determino validità soluzioni della configurazione
|
||||
Dim vtMove As New Vector3d
|
||||
Dim ptRotCen As New Point3d
|
||||
@@ -289,6 +342,7 @@ Module VacuumCups
|
||||
Dim frCurrRef As New Frame3d
|
||||
EgtFrame(m_nRefId, GDB_ID.ROOT, frCurrRef)
|
||||
Dim vtDelta As Vector3d = frCurrRef.Orig() - ptRawCen
|
||||
|
||||
' Assegno dati noti al movimento del grezzo
|
||||
rmData.m_nId = nRawId
|
||||
rmData.m_vtRawMove = Vector3d.NULL()
|
||||
@@ -363,6 +417,26 @@ Module VacuumCups
|
||||
If b3Vac.IsEmpty() Then Return INFINITO
|
||||
' Se box maggiore di quello del pezzo, scarto soluzione
|
||||
If b3Vac.Radius() > b3Raw.Radius() Then Return INFINITO
|
||||
'-------------------- INIZIO VERIFICA PESO --------------------
|
||||
bOverWeight = False
|
||||
Select Case GetPluggerFromCameras(sCups)
|
||||
Case 2
|
||||
' se peso del grezzo oltre il limite consentito allora scarto la soluzione
|
||||
If m_RawWeight > m_MaxWeightDoublePlugger Then
|
||||
bOverWeight = True
|
||||
Return INFINITO
|
||||
End If
|
||||
Case 1
|
||||
' se peso del grezzo oltre il limite consentito allora scarto la soluzione
|
||||
If m_RawWeight > m_MaxWeightSinglePlugger Then
|
||||
bOverWeight = True
|
||||
Return INFINITO
|
||||
End If
|
||||
End Select
|
||||
'-------------------- FINE VERIFICA PESO --------------------
|
||||
' Recupero l'area della tavola
|
||||
Dim b3Tab As New BBox3d
|
||||
EgtGetTableArea(1, b3Tab)
|
||||
' Determino il movimento
|
||||
vtMove = ptRawCen - b3Vac.Center()
|
||||
b3Vac.Move(vtMove)
|
||||
@@ -374,11 +448,30 @@ Module VacuumCups
|
||||
frMinRect.VersX().ToSpherical(dLen, dAngVertDeg, dAngOrizzDeg)
|
||||
dRotAngDeg = dAngOrizzDeg
|
||||
If b3Vac.DimY() > b3Vac.DimX() + EPS_SMALL Then dRotAngDeg -= 90
|
||||
Dim dPreferredRot As Double = m_dPreferredRot
|
||||
' -------------------- INIZIO GESTIONE ROTAZIONE ASSE C PER NON ANDARE IN EXTRA-CORSA --------------------
|
||||
' verifico l'orientamento del pezzo
|
||||
If bRotateVacuumNearExtraStrokeX And (Math.Abs(dRotAngDeg - 90) < 45 Or Math.Abs(dRotAngDeg - 270) < 45) Then
|
||||
' se l'orientamento è verticale
|
||||
If frMinRect.Orig().x < b3Tab.Center().x Then
|
||||
dPreferredRot = m_dPrefVertRotXMinus
|
||||
Else
|
||||
dPreferredRot = m_dPrefVertRotXPlus
|
||||
End If
|
||||
ElseIf bRotateVacuumNearExtraStrokeY And (Math.Abs(dRotAngDeg - 90) > 45 Or Math.Abs(dRotAngDeg - 270) > 45) Then
|
||||
' se l'orientemanto è orizzontale e la macchina è stata abilitata
|
||||
If frMinRect.Orig().y < b3Tab.Center().y Then
|
||||
dPreferredRot = m_dPrefVertRotYPlus
|
||||
Else
|
||||
dPreferredRot = m_dPrefVertRotYMinus
|
||||
End If
|
||||
End If
|
||||
' -------------------- FINE GESTIONE ROTAZIONE ASSE C PER NON ANDARE IN EXTRA-CORSA --------------------
|
||||
Dim dAngDelta As Double = If( Math.Abs( b3Vac.DimY() - b3Vac.DimX()) < 10 * EPS_SMALL, 90, 180)
|
||||
While dRotAngDeg - m_dPreferredRot >= dAngDelta / 2
|
||||
While dRotAngDeg - dPreferredRot >= dAngDelta / 2
|
||||
dRotAngDeg -= dAngDelta
|
||||
End While
|
||||
While dRotAngDeg - m_dPreferredRot <= -dAngDelta / 2
|
||||
While dRotAngDeg - dPreferredRot <= -dAngDelta / 2
|
||||
dRotAngDeg += dAngDelta
|
||||
End While
|
||||
Else
|
||||
@@ -430,13 +523,55 @@ Module VacuumCups
|
||||
' Applico movimento e rotazione al punto
|
||||
ptRef.Move(vtMove)
|
||||
ptRef.Rotate(ptRotCen, Vector3d.Z_AX(), dRotAngDeg)
|
||||
|
||||
' -------------- INIZIO verifica di essere nel limite delle corse macchina --------------
|
||||
If VerifyOutOfStrokes(ptRef, dRotAngDeg) <> 0 Then
|
||||
bExtraStroke = True
|
||||
Return INFINITO
|
||||
End If
|
||||
' se la posizione è accettbaile allora salvo i dati
|
||||
ptStartPointLift = ptRef
|
||||
dDegRotStartAng = dRotAngDeg
|
||||
' -------------- FINE verifica di essere nel limite delle corse macchina --------------
|
||||
|
||||
' Ne calcolo la distanza dal centro della tavola
|
||||
Dim b3Tab As New BBox3d
|
||||
EgtGetTableArea(1, b3Tab)
|
||||
Dim dDist As Double = Point3d.DistXY(ptRef, b3Tab.Center())
|
||||
Return dDist
|
||||
End Function
|
||||
|
||||
' assegante le posizioni del centro delle ventose e l'angolo di posizionamento orizzontale verifica che la posizione sia raggiungibile
|
||||
Public Function VerifyOutOfStrokes(ptRef As Point3d, dRotAngDeg As Double) As Integer
|
||||
Dim dX, dY, dZ As Double
|
||||
Dim nStat As Integer
|
||||
Dim dCHome As Double
|
||||
EgtGetAxisHomePos("C", dCHome)
|
||||
' imposto la l'uscita della ventosa come fosse l'uscita di un utensile
|
||||
EgtSetCalcTool("", "H4", 1)
|
||||
EgtGetCalcPositions(ptRef, dRotAngDeg + dCHome, 0, nStat, dX, dY, dZ)
|
||||
EgtVerifyOutstroke(dX, dY, dZ, dRotAngDeg + dCHome, 0, nStat)
|
||||
Return nStat
|
||||
End Function
|
||||
|
||||
' dall'informazione di extra corsa recupera il valore indicato
|
||||
Public Function GetExtraStrokeValue(sInfo As String) As Double
|
||||
Dim dExtraStroke As Double = 0
|
||||
Dim sItems As String() = sInfo.Split("="c)
|
||||
If sItems.Count = 2 Then
|
||||
Dim nStartIndex As Integer = 0
|
||||
For Each ItemChar As Char In sItems(1)
|
||||
If ItemChar = "("c Then
|
||||
Exit For
|
||||
End If
|
||||
nStartIndex += 1
|
||||
Next
|
||||
If nStartIndex > 0 Then
|
||||
Dim sValue As String = sItems(1).Remove(nStartIndex, sItems(1).Count - nStartIndex)
|
||||
StringToLen(sValue, dExtraStroke)
|
||||
End If
|
||||
End If
|
||||
Return dExtraStroke
|
||||
End Function
|
||||
|
||||
Private Function TestVacuumCups(nCups() As Integer, nRawRegId As Integer,
|
||||
vtMove As Vector3d, ptRotCen As Point3d, dRotAngDeg As Double) As Boolean
|
||||
' Eseguo verifica delle ventose rispetto al grezzo
|
||||
@@ -457,6 +592,28 @@ Module VacuumCups
|
||||
Return bVacOk
|
||||
End Function
|
||||
|
||||
' dato il vettore delle camere restituisco il quali attuatori sono coinvolti
|
||||
Private Function GetPluggerFromCameras(sCups() As String) As Integer
|
||||
Dim nCountPlunger As Integer = 1
|
||||
Dim bPlugger1 As Boolean = False
|
||||
Dim bPlugger2 As Boolean = False
|
||||
For Each Camera As String In sCups
|
||||
If (Camera.Contains("1") Or Camera.Contains("2") Or Camera.Contains("3")) Then
|
||||
bPlugger1 = True
|
||||
Else
|
||||
bPlugger2 = True
|
||||
End If
|
||||
Next
|
||||
' verifico quali sono le camere attive
|
||||
If bPlugger1 And bPlugger2 Then
|
||||
nCountPlunger = 2
|
||||
ElseIf Not bPlugger1 And Not bPlugger2 Then
|
||||
nCountPlunger = 0
|
||||
End If
|
||||
' restituisco il numero di Plugger in uso
|
||||
Return nCountPlunger
|
||||
End Function
|
||||
|
||||
Friend Function SaveOneMoveInfo(nId As Integer, rmData As RawMoveData) As Boolean
|
||||
' Assegno le informazioni
|
||||
EgtSetInfo(nId, "Id", rmData.m_nId)
|
||||
|
||||
@@ -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"
|
||||
@@ -90,6 +92,10 @@ Module ConstGen
|
||||
Public Const KEY_VACLAY_SEL As String = "Sel"
|
||||
' Info in gruppo layout per angolo di rotazione preferito
|
||||
Public Const KEY_VACLAY_PREFROT As String = "PreferredRot"
|
||||
Public Const KEY_VACLAY_PREFVROTXMINUS As String = "PrefVertRotXMinus"
|
||||
Public Const KEY_VACLAY_PREFVROTXPLUS As String = "PrefVertRotXPlus"
|
||||
Public Const KEY_VACLAY_PREFVROTYMINUS As String = "PrefVertRotYMinus"
|
||||
Public Const KEY_VACLAY_PREFVROTYPLUS As String = "PrefVertRotYPlus"
|
||||
' Info in gruppo layout per direzione di riferimento ventose per tagli da sotto
|
||||
Public Const KEY_VACLAY_DRIPREFDIR As String = "DripRefDir"
|
||||
' Info in asse rotante ventosa per step discreti
|
||||
@@ -143,6 +149,9 @@ Module ConstGen
|
||||
Public Const INFO_RAW_BLOCK = "Block"
|
||||
' Info per numero lastra nel blocco
|
||||
Public Const INFO_RAW_SLABNBR = "SlabNbr"
|
||||
' Info per identificazione gruppo pezzi
|
||||
Public Const INFO_REFGROUP As String = "RefGroup"
|
||||
Public Const INFO_COUNTERLY As String = "CounterPz"
|
||||
|
||||
' Contrassegno di progetto OmagCut
|
||||
Public Const NAME_PROJMARK As String = "OmagCut"
|
||||
@@ -178,6 +187,8 @@ Module ConstGen
|
||||
Public Const INFO_TOTAREA As String = "TotArea"
|
||||
' Info per area da produrre dei pezzi del progetto
|
||||
Public Const INFO_TOPRODAREA As String = "ToProdArea"
|
||||
' Info per nome progetti
|
||||
Public Const INFO_PROJNAME As String = "ProjName"
|
||||
|
||||
' Nome layer delle regioni
|
||||
Public Const NAME_REGION As String = "Region"
|
||||
@@ -203,6 +214,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
|
||||
@@ -292,6 +304,12 @@ Module ConstGen
|
||||
Public Const INFO_PARTOK As String = "POK"
|
||||
' Info in pezzo per stato rotazione
|
||||
Public Const INFO_PARTROT As String = "ROT"
|
||||
' Info in entità in OutLoop per indicare se è separata WaterJet
|
||||
Public Const INFO_JOINENTITY As String = "JoinEntity"
|
||||
' Nome layer per "*" inidcanti un lato separato nel taglio WaterJet
|
||||
Public Const INFO_AUX_SPLIT_WJ As String = "AUX_SPLIT_WJ"
|
||||
' Info in OutLoop per punto inzio lavorazione WaterJet
|
||||
Public Const INFO_START As String = "Start"
|
||||
|
||||
' Nome di pezzo che è una cornice
|
||||
Public Const NAME_FRAME As String = "Frame"
|
||||
|
||||
@@ -46,6 +46,10 @@ Module ConstIni
|
||||
Public Const K_THEME As String = "Theme"
|
||||
Public Const K_MANUAL_CUT As String = "ManualCut"
|
||||
Public Const K_TEST As String = "Test"
|
||||
Public Const K_SMARTMACHININGPAGE As String = "SmartMachiningPage"
|
||||
Public Const K_STARTPROGRAM As String = "StartProgram"
|
||||
Public Const K_GENERATECN As String = "GenerateCN"
|
||||
|
||||
|
||||
Public Const S_LANGUAGES As String = "Languages"
|
||||
Public Const K_LANGUAGE As String = "Language"
|
||||
@@ -148,6 +152,7 @@ Module ConstIni
|
||||
Public Const K_TEXTCOLOR As String = "TextColor"
|
||||
Public Const K_AUTOMATICOPTIMIZE As String = "AutomaticOptimize"
|
||||
Public Const K_AUTOMATICMAXTIME As String = "AutomaticMaxTime"
|
||||
Public Const K_DRAG_RETTANGLE As String = "DragRectangle"
|
||||
|
||||
Public Const S_SPLIT As String = "Split"
|
||||
Public Const K_MOVE_LEV As String = "MoveLevel"
|
||||
|
||||
@@ -11,9 +11,18 @@
|
||||
Public Const K_ZIGZAGX As String = "ZigZagX"
|
||||
Public Const K_OFFZIGZAGX As String = "OffZigZagX"
|
||||
Public Const K_STEPX As String = "StepX"
|
||||
Public Const K_RADIUSX As String = "RadiusX"
|
||||
Public Const K_DISTANCEX As String = "DistanceX"
|
||||
Public Const K_ZIGZAGY As String = "ZigZagY"
|
||||
Public Const K_OFFZIGZAGY As String = "OffZigZagY"
|
||||
Public Const K_STEPY As String = "StepY"
|
||||
Public Const K_RADIUSY As String = "RadiusY"
|
||||
Public Const K_DISTANCEY As String = "DistanceY"
|
||||
Public Const K_SPIRAL As String = "Spiral"
|
||||
Public Const K_OFFSPIRAL As String = "OffSpiral"
|
||||
Public Const K_STEPSPIRAL As String = "StepSpiral"
|
||||
Public Const K_RADIUSSPIRAL As String = "RadiusSpiral"
|
||||
Public Const K_DISTANCESPIRAL As String = "DistanceSpiral"
|
||||
Public Const K_LILEN As String = "LiLen"
|
||||
Public Const K_LIHEIGHT As String = "LiHeight"
|
||||
Public Const K_LILOAD As String = "LiLoad"
|
||||
|
||||
@@ -44,6 +44,7 @@
|
||||
Public Const S_NCNUM As String = "NcNUM"
|
||||
Public Const K_RESETSENDDELAY As String = "ResetSendDelay"
|
||||
Public Const K_THREADSLEEP As String = "ThreadSleep"
|
||||
Public Const K_PHOTODELEY As String = "PhotoDeley"
|
||||
|
||||
Public Const S_NCDATA As String = "NcData"
|
||||
Public Const K_NEWVARIABLE As String = "NewVariable"
|
||||
@@ -76,6 +77,9 @@
|
||||
Public Const K_DOORCLOSED As String = "DoorClosed"
|
||||
Public Const K_LIMITZ As String = "LimitZ"
|
||||
Public Const K_POWEROVR As String = "PowerOvr"
|
||||
Public Const K_PARKING As String = "Parking"
|
||||
Public Const K_ENABLEZONE As String = "EnableZone"
|
||||
Public Const K_ENABLEPC As String = "EnablePC"
|
||||
Public Const K_HSM As String = "Hsm"
|
||||
Public Const K_VACUUMUP As String = "VacuumUp"
|
||||
Public Const K_VACUUMDOWN As String = "VacuumDown"
|
||||
@@ -103,6 +107,8 @@
|
||||
Public Const K_VACUUMOFF As String = "VacuumOff"
|
||||
Public Const K_BYPASSTATE As String = "BypassState"
|
||||
Public Const K_FEEDHOLD As String = "FeedHold"
|
||||
Public Const K_SPOTLIGHT1 As String = "SpotLight1"
|
||||
Public Const K_SPOTLIGHT2 As String = "SpotLight2"
|
||||
' Nuove variabili
|
||||
Public Const K_SPEEDHOLD As String = "SpeedHold"
|
||||
Public Const K_XYJOG As String = "XYJog"
|
||||
@@ -209,6 +215,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
|
||||
@@ -221,6 +228,10 @@
|
||||
Public Const S_MACH_RAWMOVE As String = "RawMove"
|
||||
Public Const K_MACH_RM_ROTATE As String = "Rotate"
|
||||
Public Const K_MACH_RM_FINALMOVE As String = "FinalMove"
|
||||
Public Const K_MACH_WEIGHT_SINGLEPLUGGER As String = "MaxWeightSinglePlugger"
|
||||
Public Const K_MACH_WEIGHT_DOUBLEPLUGGER As String = "MaxWeightDoublePlugger"
|
||||
Public Const K_MACH_ROTATEVACUUMFOREXTRASTROKEY As String = "RotateVacuumForExtraStrokeY"
|
||||
Public Const K_MACH_ROTATEVACUUMFOREXTRASTROKEX As String = "RotateVacuumForExtraStrokeX"
|
||||
|
||||
Public Const S_MACH_REG As String = "Reg"
|
||||
Public Const K_MACH_MAX_ROT_ANG As String = "MaxRotAng"
|
||||
@@ -244,6 +255,7 @@
|
||||
|
||||
Public Const S_MACH_INPROGRESS As String = "InProgress"
|
||||
Public Const K_PHASEVAR As String = "PhaseVar"
|
||||
Public Const K_WP_STEPTIME As String = "WPStepTime"
|
||||
|
||||
Public Const S_MACH_PROBING As String = "Probing"
|
||||
Public Const K_PROBINGSTATEVAR As String = "ProbingStateVar"
|
||||
@@ -276,9 +288,12 @@
|
||||
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"
|
||||
Public Const K_AVERAGEDENSITY As String = "AverageDensity"
|
||||
|
||||
End Module
|
||||
|
||||
@@ -330,6 +330,49 @@ Public Class ControlsMachineButtonUC
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Friend Sub ParkingStateChanged(ParkingState As Boolean)
|
||||
Dim ParkingButton As TwoStateButton = Nothing
|
||||
For Each MachineButton As MachineButton In m_ButtonList
|
||||
If MachineButton.StateFlag = K_PARKING Then
|
||||
ParkingButton = MachineButton
|
||||
End If
|
||||
Next
|
||||
If Not IsNothing(ParkingButton) Then
|
||||
ParkingButton.SetIsChecked(ParkingState)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Friend Sub ZoneStateChanged(ZoneState As Integer)
|
||||
'Dim sFlag As String = String.Empty
|
||||
'If ZoneState = 1 Then
|
||||
' sFlag = BTN_ENABLE_ZONE_1
|
||||
'ElseIf ZoneState = 2 Then
|
||||
' sFlag = BTN_ENABLE_ZONE_2
|
||||
'End If
|
||||
'Dim EnableZoneButton As TwoStateButton = Nothing
|
||||
'For Each MachineButton As MachineButton In m_ButtonList
|
||||
' If MachineButton.StateFlag = K_ENABLEZONE Then
|
||||
' EnableZoneButton = MachineButton
|
||||
' End If
|
||||
'Next
|
||||
'If Not IsNothing(EnableZoneButton) Then
|
||||
' EnableZoneButton.SetIsChecked(EnableZone)
|
||||
'End If
|
||||
End Sub
|
||||
|
||||
Friend Sub PcStateChanged(EnablePC As Boolean)
|
||||
'Dim EnablePCButton As TwoStateButton = Nothing
|
||||
'For Each MachineButton As MachineButton In m_ButtonList
|
||||
' If MachineButton.StateFlag = K_ENABLEPC Then
|
||||
' EnablePCButton = MachineButton
|
||||
' End If
|
||||
'Next
|
||||
'If Not IsNothing(EnablePCButton) Then
|
||||
' EnablePCButton.SetIsChecked(EnablePC)
|
||||
'End If
|
||||
End Sub
|
||||
|
||||
|
||||
Public Function GetPrivateProfileMachineButtons(
|
||||
ByVal lpAppName As String,
|
||||
ByVal lpKeyName As String,
|
||||
@@ -402,6 +445,8 @@ Public MustInherit Class MachineButton
|
||||
Friend Const BTN_STATE_THREEAXIS As String = "ThreeAxis"
|
||||
Friend Const BTN_STATE_FIVEAXIS As String = "FiveAxis"
|
||||
Friend Const BTN_STATE_NOTHING As String = "Nothing"
|
||||
Friend Const BTN_ENABLE_ZONE_1 As String = "EnableZone1"
|
||||
Friend Const BTN_ENABLE_ZONE_2 As String = "EnableZone2"
|
||||
|
||||
' Dichiarazione delle Page UserControl
|
||||
Friend Shared m_MainWindow As MainWindow = DirectCast(Application.Current.MainWindow, MainWindow)
|
||||
@@ -647,6 +692,7 @@ Public Class TwoStateButton
|
||||
Return m_IsChecked
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
' accendo il comando, anche se dovrei aspettare di leggere lo stato da PLC
|
||||
m_IsChecked = value
|
||||
If value Then
|
||||
ExecuteMDICommand(TLuaScriptName)
|
||||
|
||||
@@ -201,8 +201,8 @@
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="4*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="5*"/>
|
||||
<!--<ColumnDefinition Width="1*"/>-->
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
@@ -239,9 +239,11 @@
|
||||
Style="{DynamicResource OmagCut_GradientYellowIconToggleButton}">
|
||||
<!--<Image Source="{DynamicResource VacuumImg}" Style="{StaticResource OmagCut_ScaleButtonIcon}"/>-->
|
||||
</ToggleButton>
|
||||
<Button Name="ManualModeBtn" Grid.Column="8"
|
||||
Style="{DynamicResource OmagCut_YellowGradientYellowIconButton}">
|
||||
<Image Source="{DynamicResource ManualImg}" Style="{StaticResource OmagCut_ScaleButtonIcon}"/>
|
||||
|
||||
<!--Comando Manula/MDI-->
|
||||
<Button Name="ManualModeBtn" Grid.Column="7"
|
||||
Style="{DynamicResource OmagCut_YellowGradientYellowIconButton}">
|
||||
<Image Source="{DynamicResource ManualImg}" Style="{StaticResource OmagCut_ScaleButtonIcon}"/>
|
||||
</Button>
|
||||
|
||||
</Grid>
|
||||
|
||||
@@ -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
|
||||
@@ -628,7 +644,8 @@ Public Class FlatteningCut
|
||||
Dim nPartId = EgtCreateGroup(GDB_ID.ROOT)
|
||||
EgtSetName(nPartId, NAME_DIRECTCUT)
|
||||
Dim nLayerId = EgtCreateGroup(nPartId)
|
||||
EgtSetName(nLayerId, NAME_OUTLOOP)
|
||||
' EgtSetName(nLayerId, NAME_OUTLOOP)
|
||||
EgtSetName(nLayerId, NAME_ONPATH)
|
||||
' Creo il taglio
|
||||
Dim ptStart As Point3d = m_ptTipP1
|
||||
ptStart.z = 0
|
||||
@@ -670,22 +687,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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -19,7 +19,8 @@
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<ToggleButton Name="MachineButton1" Grid.Column="0" Style="{DynamicResource OmagCut_ModifiedGradientYellowIconToggleButton}">
|
||||
<Image Name="ImageButton1" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
@@ -61,6 +62,10 @@
|
||||
<Image Name="ImageButton10" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
</ToggleButton>
|
||||
|
||||
</Grid>
|
||||
<ToggleButton Name="MachineButton11" Grid.Column="10" Style="{DynamicResource OmagCut_ModifiedGradientYellowIconToggleButton}">
|
||||
<Image Name="ImageButton11" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
</ToggleButton>
|
||||
|
||||
</Grid>
|
||||
|
||||
</UserControl>
|
||||
|
||||
@@ -10,7 +10,8 @@ Public Class MachineButtonsUC
|
||||
Private m_bOnlyLaser As Boolean = False
|
||||
Private m_bFirst As Boolean = True
|
||||
|
||||
Private Const MAX_BUTTONS As Integer = 10
|
||||
' 9/2 aggiunto spazio per un nuovo bottone
|
||||
Private Const MAX_BUTTONS As Integer = 11
|
||||
Private m_nCount As Integer = 0
|
||||
Private ImageArrayY(MAX_BUTTONS - 1) As String
|
||||
Private ImageArrayN(MAX_BUTTONS - 1) As String
|
||||
@@ -31,6 +32,10 @@ Public Class MachineButtonsUC
|
||||
Private Const BTN_STATE_NOTHING As String = "Nothing"
|
||||
Private Const BTN_STATE_DOOR_OPENED As String = "DoorOpened"
|
||||
Private Const BTN_STATE_DOOR_CLOSED As String = "DoorClosed"
|
||||
Private Const BTN_STATE_PARKING As String = "Parking"
|
||||
Private Const BTN_ENABLE_ZONE_1 As String = "EnableZone1"
|
||||
Private Const BTN_ENABLE_ZONE_2 As String = "EnableZone2"
|
||||
Private Const BTN_ENABLE_PC As String = "EnablePC"
|
||||
|
||||
Public Sub New(Optional bOnlyLaser As Boolean = False)
|
||||
' This call is required by the designer.
|
||||
@@ -75,7 +80,10 @@ Public Class MachineButtonsUC
|
||||
For nIndex As Integer = 0 To m_nCount - 1
|
||||
If StateFlagArray(nIndex) = BTN_STATE_NOTHING OrElse
|
||||
StateFlagArray(nIndex) = BTN_STATE_DOOR_OPENED OrElse
|
||||
StateFlagArray(nIndex) = BTN_STATE_DOOR_CLOSED Then
|
||||
StateFlagArray(nIndex) = BTN_STATE_DOOR_CLOSED OrElse
|
||||
StateFlagArray(nIndex) = BTN_ENABLE_PC OrElse
|
||||
StateFlagArray(nIndex) = BTN_ENABLE_ZONE_1 OrElse
|
||||
StateFlagArray(nIndex) = BTN_ENABLE_ZONE_2 Then
|
||||
' mostra immagine fissa
|
||||
Try
|
||||
Dim s As String
|
||||
@@ -134,7 +142,8 @@ Public Class MachineButtonsUC
|
||||
End Sub
|
||||
|
||||
Private Sub MachineButton_Click(sender As Object, e As RoutedEventArgs) Handles MachineButton1.Click, MachineButton2.Click, MachineButton3.Click, MachineButton4.Click, MachineButton5.Click,
|
||||
MachineButton6.Click, MachineButton7.Click, MachineButton8.Click, MachineButton9.Click, MachineButton10.Click
|
||||
MachineButton6.Click, MachineButton7.Click, MachineButton8.Click, MachineButton9.Click, MachineButton10.Click,
|
||||
MachineButton11.Click
|
||||
Dim CurrentBtn As Primitives.ToggleButton = e.Source
|
||||
' recupero l'inidce del bottone selezionato
|
||||
Dim nIndex As Integer = GetToggleButtonIndex(CurrentBtn) - 1
|
||||
@@ -153,6 +162,18 @@ Public Class MachineButtonsUC
|
||||
Return
|
||||
End If
|
||||
|
||||
' Se il bottone chiamantè quello per la selezione del pannello di controllo
|
||||
If nIndex = Array.IndexOf(StateFlagArray, BTN_ENABLE_PC) Then
|
||||
Dim sTLuaFile As String = sBaseDir & CommandArrayY(nIndex)
|
||||
Dim sFLuaFile As String = sBaseDir & CommandArrayN(nIndex)
|
||||
If m_CN.nEnablePc = 1 Then
|
||||
ExecuteMDICommand(CurrentBtn, sTLuaFile)
|
||||
ElseIf m_CN.nEnablePc = 2 Then
|
||||
ExecuteMDICommand(CurrentBtn, sFLuaFile)
|
||||
End If
|
||||
Return
|
||||
End If
|
||||
|
||||
If CurrentBtn.IsChecked() Then
|
||||
'EgtLuaExecFile(sBaseDir & CommandArrayY(nIndex))
|
||||
sLuaFileName = sBaseDir & CommandArrayY(nIndex)
|
||||
@@ -344,6 +365,7 @@ Public Class MachineButtonsUC
|
||||
" EType2=" & If(Not String.IsNullOrEmpty(EType2), CInt(EType2).ToString, ""))
|
||||
End Sub
|
||||
|
||||
#Region "STATE CHANGED"
|
||||
|
||||
Friend Sub SpindleStateChanged(SpindleState As Boolean)
|
||||
Dim nIndex As Integer = Array.IndexOf(StateFlagArray, BTN_STATE_SPINDLE)
|
||||
@@ -584,6 +606,203 @@ Public Class MachineButtonsUC
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Friend Sub ParkingStateChanged(ParkingState As Boolean)
|
||||
Dim nIndex As Integer = Array.IndexOf(StateFlagArray, BTN_STATE_PARKING)
|
||||
If nIndex = -1 Then Return
|
||||
If ParkingState Then
|
||||
GetToggleButton(nIndex + 1).IsChecked = True
|
||||
Try
|
||||
Dim s As String
|
||||
If (m_MainWindow.m_OptionsPageUC.ThemesCmBx.SelectedIndex = 0) Then
|
||||
s = m_MainWindow.GetResourcesDir() & "\MachineButtonsImage\" & ImageArrayY(nIndex)
|
||||
Else
|
||||
s = m_MainWindow.GetResourcesDir() & "\MachineButtonsImage\NewIcons\" & ImageArrayY(nIndex)
|
||||
End If
|
||||
Dim sButtonImageSource As ImageSource = ImageConverter.ConvertFromString(s)
|
||||
GetImage(nIndex + 1).Source = sButtonImageSource
|
||||
Catch ex As Exception
|
||||
EgtOutLog("Error loading image " & ImageArrayY(nIndex + 1))
|
||||
End Try
|
||||
Else
|
||||
GetToggleButton(nIndex + 1).IsChecked = False
|
||||
Try
|
||||
Dim s As String
|
||||
If (m_MainWindow.m_OptionsPageUC.ThemesCmBx.SelectedIndex = 0) Then
|
||||
s = m_MainWindow.GetResourcesDir() & "\MachineButtonsImage\" & ImageArrayY(nIndex)
|
||||
Else
|
||||
s = m_MainWindow.GetResourcesDir() & "\MachineButtonsImage\NewIcons\" & ImageArrayY(nIndex)
|
||||
End If
|
||||
Dim sButtonImageSource As ImageSource = ImageConverter.ConvertFromString(s)
|
||||
GetImage(nIndex + 1).Source = sButtonImageSource
|
||||
Catch ex As Exception
|
||||
EgtOutLog("Error loading image " & ImageArrayN(nIndex + 1))
|
||||
End Try
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Friend Sub EnableZoneStateChanged(ZoneState As Integer)
|
||||
Dim sFlag As String = String.Empty
|
||||
If ZoneState = 1 Then
|
||||
sFlag = BTN_ENABLE_ZONE_1
|
||||
ElseIf ZoneState = 2 Then
|
||||
sFlag = BTN_ENABLE_ZONE_2
|
||||
End If
|
||||
' recupero il bottone che deve essere acceso (quindi spengo l'altro)
|
||||
Dim nIndex As Integer = Array.IndexOf(StateFlagArray, sFlag)
|
||||
|
||||
' se non trovo nessun riferimento allora spengo entrambi i comandi
|
||||
If nIndex = -1 Then
|
||||
nIndex = Array.IndexOf(StateFlagArray, BTN_ENABLE_ZONE_1)
|
||||
GetToggleButton(nIndex + 1).IsChecked = False
|
||||
nIndex = Array.IndexOf(StateFlagArray, BTN_ENABLE_ZONE_2)
|
||||
GetToggleButton(nIndex + 1).IsChecked = False
|
||||
Return
|
||||
End If
|
||||
|
||||
If ZoneState = 1 Then
|
||||
GetToggleButton(nIndex + 1).IsChecked = True
|
||||
Try
|
||||
Dim s As String
|
||||
If (m_MainWindow.m_OptionsPageUC.ThemesCmBx.SelectedIndex = 0) Then
|
||||
s = m_MainWindow.GetResourcesDir() & "\MachineButtonsImage\" & ImageArrayY(nIndex)
|
||||
Else
|
||||
s = m_MainWindow.GetResourcesDir() & "\MachineButtonsImage\NewIcons\" & ImageArrayY(nIndex)
|
||||
End If
|
||||
Dim sButtonImageSource As ImageSource = ImageConverter.ConvertFromString(s)
|
||||
GetImage(nIndex + 1).Source = sButtonImageSource
|
||||
Catch ex As Exception
|
||||
EgtOutLog("Error loading image " & ImageArrayY(nIndex + 1))
|
||||
End Try
|
||||
' spengo l'altro bottone (lo stato dei due bottoni sono gestiti da una sola variabile)
|
||||
nIndex = Array.IndexOf(StateFlagArray, BTN_ENABLE_ZONE_2)
|
||||
GetToggleButton(nIndex + 1).IsChecked = False
|
||||
|
||||
ElseIf ZoneState = 2 Then
|
||||
GetToggleButton(nIndex + 1).IsChecked = True
|
||||
Try
|
||||
Dim s As String
|
||||
If (m_MainWindow.m_OptionsPageUC.ThemesCmBx.SelectedIndex = 0) Then
|
||||
s = m_MainWindow.GetResourcesDir() & "\MachineButtonsImage\" & ImageArrayY(nIndex)
|
||||
Else
|
||||
s = m_MainWindow.GetResourcesDir() & "\MachineButtonsImage\NewIcons\" & ImageArrayY(nIndex)
|
||||
End If
|
||||
Dim sButtonImageSource As ImageSource = ImageConverter.ConvertFromString(s)
|
||||
GetImage(nIndex + 1).Source = sButtonImageSource
|
||||
Catch ex As Exception
|
||||
EgtOutLog("Error loading image " & ImageArrayN(nIndex + 1))
|
||||
End Try
|
||||
' spengo l'altro bottone (lo stato dei due bottoni sono gestiti da una sola variabile)
|
||||
nIndex = Array.IndexOf(StateFlagArray, BTN_ENABLE_ZONE_1)
|
||||
GetToggleButton(nIndex + 1).IsChecked = False
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Friend Sub EnablePcStateChanged(PcState As Integer)
|
||||
' il comando ButtonY accendo il Pannello_1, il comando ButtonN accendo il Pannello_2 (uno è la negazione dell'altro)
|
||||
Dim nIndex As Integer = Array.IndexOf(StateFlagArray, BTN_ENABLE_PC)
|
||||
If nIndex = -1 Then Return
|
||||
If PcState = 1 Then
|
||||
GetToggleButton(nIndex + 1).IsChecked = True
|
||||
Try
|
||||
Dim s As String
|
||||
If (m_MainWindow.m_OptionsPageUC.ThemesCmBx.SelectedIndex = 0) Then
|
||||
s = m_MainWindow.GetResourcesDir() & "\MachineButtonsImage\" & ImageArrayY(nIndex)
|
||||
Else
|
||||
s = m_MainWindow.GetResourcesDir() & "\MachineButtonsImage\NewIcons\" & ImageArrayY(nIndex)
|
||||
End If
|
||||
Dim sButtonImageSource As ImageSource = ImageConverter.ConvertFromString(s)
|
||||
GetImage(nIndex + 1).Source = sButtonImageSource
|
||||
Catch ex As Exception
|
||||
EgtOutLog("Error loading image " & ImageArrayY(nIndex + 1))
|
||||
End Try
|
||||
ElseIf PcState = 2 Then
|
||||
GetToggleButton(nIndex + 1).IsChecked = True
|
||||
Try
|
||||
Dim s As String
|
||||
If (m_MainWindow.m_OptionsPageUC.ThemesCmBx.SelectedIndex = 0) Then
|
||||
s = m_MainWindow.GetResourcesDir() & "\MachineButtonsImage\" & ImageArrayN(nIndex)
|
||||
Else
|
||||
s = m_MainWindow.GetResourcesDir() & "\MachineButtonsImage\NewIcons\" & ImageArrayN(nIndex)
|
||||
End If
|
||||
Dim sButtonImageSource As ImageSource = ImageConverter.ConvertFromString(s)
|
||||
GetImage(nIndex + 1).Source = sButtonImageSource
|
||||
Catch ex As Exception
|
||||
EgtOutLog("Error loading image " & ImageArrayN(nIndex + 1))
|
||||
End Try
|
||||
Else
|
||||
' nessuno dei due pannelli attivo
|
||||
GetToggleButton(nIndex + 1).IsChecked = False
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Friend Sub TableUpChanged(TableUpState As Boolean)
|
||||
Dim nIndex As Integer = Array.IndexOf(StateFlagArray, K_TABLEUP)
|
||||
If nIndex = -1 Then Return
|
||||
If TableUpState Then
|
||||
GetToggleButton(nIndex + 1).IsChecked = True
|
||||
Try
|
||||
Dim s As String
|
||||
If (m_MainWindow.m_OptionsPageUC.ThemesCmBx.SelectedIndex = 0) Then
|
||||
s = m_MainWindow.GetResourcesDir() & "\MachineButtonsImage\" & ImageArrayY(nIndex)
|
||||
Else
|
||||
s = m_MainWindow.GetResourcesDir() & "\MachineButtonsImage\NewIcons\" & ImageArrayY(nIndex)
|
||||
End If
|
||||
Dim sButtonImageSource As ImageSource = ImageConverter.ConvertFromString(s)
|
||||
GetImage(nIndex + 1).Source = sButtonImageSource
|
||||
Catch ex As Exception
|
||||
EgtOutLog("Error loading image " & ImageArrayY(nIndex + 1))
|
||||
End Try
|
||||
Else
|
||||
GetToggleButton(nIndex + 1).IsChecked = False
|
||||
Try
|
||||
Dim s As String
|
||||
If (m_MainWindow.m_OptionsPageUC.ThemesCmBx.SelectedIndex = 0) Then
|
||||
s = m_MainWindow.GetResourcesDir() & "\MachineButtonsImage\" & ImageArrayN(nIndex)
|
||||
Else
|
||||
s = m_MainWindow.GetResourcesDir() & "\MachineButtonsImage\NewIcons\" & ImageArrayN(nIndex)
|
||||
End If
|
||||
Dim sButtonImageSource As ImageSource = ImageConverter.ConvertFromString(s)
|
||||
GetImage(nIndex + 1).Source = sButtonImageSource
|
||||
Catch ex As Exception
|
||||
EgtOutLog("Error loading image " & ImageArrayN(nIndex + 1))
|
||||
End Try
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Friend Sub TableDownChanged(TableDownState As Boolean)
|
||||
Dim nIndex As Integer = Array.IndexOf(StateFlagArray, K_TABLEDOWN)
|
||||
If nIndex = -1 Then Return
|
||||
If TableDownState Then
|
||||
GetToggleButton(nIndex + 1).IsChecked = True
|
||||
Try
|
||||
Dim s As String
|
||||
If (m_MainWindow.m_OptionsPageUC.ThemesCmBx.SelectedIndex = 0) Then
|
||||
s = m_MainWindow.GetResourcesDir() & "\MachineButtonsImage\" & ImageArrayY(nIndex)
|
||||
Else
|
||||
s = m_MainWindow.GetResourcesDir() & "\MachineButtonsImage\NewIcons\" & ImageArrayY(nIndex)
|
||||
End If
|
||||
Dim sButtonImageSource As ImageSource = ImageConverter.ConvertFromString(s)
|
||||
GetImage(nIndex + 1).Source = sButtonImageSource
|
||||
Catch ex As Exception
|
||||
EgtOutLog("Error loading image " & ImageArrayY(nIndex + 1))
|
||||
End Try
|
||||
Else
|
||||
GetToggleButton(nIndex + 1).IsChecked = False
|
||||
Try
|
||||
Dim s As String
|
||||
If (m_MainWindow.m_OptionsPageUC.ThemesCmBx.SelectedIndex = 0) Then
|
||||
s = m_MainWindow.GetResourcesDir() & "\MachineButtonsImage\" & ImageArrayN(nIndex)
|
||||
Else
|
||||
s = m_MainWindow.GetResourcesDir() & "\MachineButtonsImage\NewIcons\" & ImageArrayN(nIndex)
|
||||
End If
|
||||
Dim sButtonImageSource As ImageSource = ImageConverter.ConvertFromString(s)
|
||||
GetImage(nIndex + 1).Source = sButtonImageSource
|
||||
Catch ex As Exception
|
||||
EgtOutLog("Error loading image " & ImageArrayN(nIndex + 1))
|
||||
End Try
|
||||
End If
|
||||
End Sub
|
||||
|
||||
'----------------- Queste funzioni determina lo stato del bottone direttamente dalla lettura delle variabili CN
|
||||
Friend Sub XYJogChanged(ByVal bXYAxes As Boolean)
|
||||
' recupero le asscociazioni con i bottoni
|
||||
@@ -619,78 +838,86 @@ Public Class MachineButtonsUC
|
||||
|
||||
'-----------------------------------------------------------------------------------------------------------------
|
||||
|
||||
#End Region ' State changed
|
||||
|
||||
Private Function GetToggleButton(ByVal nIndex As Integer) As Primitives.ToggleButton
|
||||
Select Case nIndex
|
||||
Case 1
|
||||
Return MachineButton1
|
||||
Case 2
|
||||
Return MachineButton2
|
||||
Case 3
|
||||
Return MachineButton3
|
||||
Case 4
|
||||
Return MachineButton4
|
||||
Case 5
|
||||
Return MachineButton5
|
||||
Case 6
|
||||
Return MachineButton6
|
||||
Case 7
|
||||
Return MachineButton7
|
||||
Case 8
|
||||
Return MachineButton8
|
||||
Case 9
|
||||
Return MachineButton9
|
||||
Case Else
|
||||
Return MachineButton10
|
||||
Case 1
|
||||
Return MachineButton1
|
||||
Case 2
|
||||
Return MachineButton2
|
||||
Case 3
|
||||
Return MachineButton3
|
||||
Case 4
|
||||
Return MachineButton4
|
||||
Case 5
|
||||
Return MachineButton5
|
||||
Case 6
|
||||
Return MachineButton6
|
||||
Case 7
|
||||
Return MachineButton7
|
||||
Case 8
|
||||
Return MachineButton8
|
||||
Case 9
|
||||
Return MachineButton9
|
||||
Case 10
|
||||
Return MachineButton10
|
||||
Case Else
|
||||
Return MachineButton11
|
||||
End Select
|
||||
End Function
|
||||
|
||||
Private Function GetToggleButtonIndex(ByVal nBtnName As Primitives.ToggleButton) As Integer
|
||||
Select Case nBtnName.Name
|
||||
Case MachineButton1.Name
|
||||
Return 1
|
||||
Case MachineButton2.Name
|
||||
Return 2
|
||||
Case MachineButton3.Name
|
||||
Return 3
|
||||
Case MachineButton4.Name
|
||||
Return 4
|
||||
Case MachineButton5.Name
|
||||
Return 5
|
||||
Case MachineButton6.Name
|
||||
Return 6
|
||||
Case MachineButton7.Name
|
||||
Return 7
|
||||
Case MachineButton8.Name
|
||||
Return 8
|
||||
Case MachineButton9.Name
|
||||
Return 9
|
||||
Case Else
|
||||
Return 10
|
||||
Case MachineButton1.Name
|
||||
Return 1
|
||||
Case MachineButton2.Name
|
||||
Return 2
|
||||
Case MachineButton3.Name
|
||||
Return 3
|
||||
Case MachineButton4.Name
|
||||
Return 4
|
||||
Case MachineButton5.Name
|
||||
Return 5
|
||||
Case MachineButton6.Name
|
||||
Return 6
|
||||
Case MachineButton7.Name
|
||||
Return 7
|
||||
Case MachineButton8.Name
|
||||
Return 8
|
||||
Case MachineButton9.Name
|
||||
Return 9
|
||||
Case MachineButton10.Name
|
||||
Return 10
|
||||
Case Else
|
||||
Return 11
|
||||
End Select
|
||||
End Function
|
||||
|
||||
Private Function GetImage(ByVal nInd As Integer) As Image
|
||||
Select Case nInd
|
||||
Case 1
|
||||
Return ImageButton1
|
||||
Case 2
|
||||
Return ImageButton2
|
||||
Case 3
|
||||
Return ImageButton3
|
||||
Case 4
|
||||
Return ImageButton4
|
||||
Case 5
|
||||
Return ImageButton5
|
||||
Case 6
|
||||
Return ImageButton6
|
||||
Case 7
|
||||
Return ImageButton7
|
||||
Case 8
|
||||
Return ImageButton8
|
||||
Case 9
|
||||
Return ImageButton9
|
||||
Case Else
|
||||
Return ImageButton10
|
||||
Case 1
|
||||
Return ImageButton1
|
||||
Case 2
|
||||
Return ImageButton2
|
||||
Case 3
|
||||
Return ImageButton3
|
||||
Case 4
|
||||
Return ImageButton4
|
||||
Case 5
|
||||
Return ImageButton5
|
||||
Case 6
|
||||
Return ImageButton6
|
||||
Case 7
|
||||
Return ImageButton7
|
||||
Case 8
|
||||
Return ImageButton8
|
||||
Case 9
|
||||
Return ImageButton9
|
||||
Case 10
|
||||
Return ImageButton10
|
||||
Case Else
|
||||
Return ImageButton11
|
||||
End Select
|
||||
End Function
|
||||
|
||||
|
||||
@@ -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 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 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)
|
||||
|
||||
@@ -76,9 +76,9 @@ Public Class AlzFrontUC
|
||||
m_MainWindow.m_DrawPageUC.DripCutBtn.IsEnabled = False
|
||||
|
||||
' nome dei parametri condivisi
|
||||
Parameter1TxBl.Text = "Altezza"
|
||||
Parameter2TxBl.Text = "Delta angolo"
|
||||
Parameter5TxBl.Text = "Spessore"
|
||||
Parameter1TxBl.Text = EgtMsg(91134)
|
||||
Parameter2TxBl.Text = EgtMsg(91135)
|
||||
Parameter5TxBl.Text = EgtMsg(91136)
|
||||
|
||||
EgtZoom(ZM.ALL)
|
||||
End Sub
|
||||
@@ -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
|
||||
|
||||
@@ -882,7 +882,7 @@ Public Class DrawPageUC
|
||||
|
||||
' permette di inserire più di un part
|
||||
Private Function MakeMultipleInsert(ByVal nNbr As Integer, sName As String) As Boolean
|
||||
|
||||
|
||||
Dim InsertColor As Color3d = CompoColor(m_MainWindow.GetIniFile())
|
||||
|
||||
' Imposto il contesto corrente
|
||||
@@ -893,6 +893,9 @@ Public Class DrawPageUC
|
||||
' Cancello layer regioni per selezione buchi
|
||||
Pz = EgtGetFirstGroupInGroup(GDB_ID.ROOT)
|
||||
|
||||
' identificativo univoico del gruppo di pezzi, se più di un pezzo
|
||||
Dim sGUICode As String = String.Empty
|
||||
|
||||
While Pz <> -1
|
||||
' imposto il contesto corrente
|
||||
EgtSetCurrentContext(DrawScene.GetCtx())
|
||||
@@ -1040,6 +1043,11 @@ Public Class DrawPageUC
|
||||
EgtEraseEmptyParts()
|
||||
' Area dei nuovi pezzi
|
||||
Dim dNewArea As Double = 0
|
||||
|
||||
If nNbr > 1 Then
|
||||
sGUICode = System.Guid.NewGuid.ToString
|
||||
End If
|
||||
|
||||
' Se esiste il file del pezzo
|
||||
If My.Computer.FileSystem.FileExists(sTmpFile) Then
|
||||
' eseguo inserimento
|
||||
@@ -1054,7 +1062,13 @@ Public Class DrawPageUC
|
||||
If m_bTrfData Then EgtSetInfo(nId2, "CsvPart", m_TrfOrderCode & "-" & nId2.ToString())
|
||||
' Aggiorno l'area dei nuovi pezzi
|
||||
dNewArea += GeomCalc.GetPartArea(nId2)
|
||||
' Inserisco in parcheggio
|
||||
|
||||
' assegno l'identificatico del pezzo, se esiste
|
||||
If Not String.IsNullOrEmpty(sGUICode) Then
|
||||
Dim sPreGuid As String = CreatePreGuidCode(nId2)
|
||||
EgtSetInfo(nId2, INFO_REFGROUP, sPreGuid & sGUICode)
|
||||
End If
|
||||
' muovo il pezzo nella prima posizione di parcheggio libera
|
||||
m_MainWindow.m_CadCutPageUC.m_NestPage.StoreOnePart(nId2, True)
|
||||
|
||||
' ------------------------ AGGIUNGO PEZZO NEL VEINMATCH ----------------------------------
|
||||
|
||||
@@ -808,6 +808,10 @@ Public Class ImportPageUC
|
||||
EgtErase(EgtGetFirstNameInGroup(PartId, SELECT_REGION_LAYER))
|
||||
PartId = EgtGetNextPart(PartId)
|
||||
End While
|
||||
|
||||
' identificativo univoico del gruppo di pezzi, se più di un pezzo
|
||||
Dim sGUICode As New List(Of String)
|
||||
|
||||
' Scrivo testi per nesting
|
||||
SideAngle.WriteSideAngleForNest(ImportScene.GetCtx())
|
||||
' Imposto riferimento sul centro geometrico di ogni pezzo
|
||||
@@ -817,26 +821,53 @@ Public Class ImportPageUC
|
||||
' Salvo tutti i pezzi in un file temporaneo
|
||||
Dim sTmpFile As String = m_MainWindow.GetTempDir() & "\FlatPart" & ".Nge"
|
||||
If Not EgtSaveFile(sTmpFile, NGE.BIN) Then Return
|
||||
|
||||
' Determino numero ripetizioni
|
||||
Dim nRepeat = 1
|
||||
StringToInt(PartNumTxBx.Text, nRepeat)
|
||||
nRepeat = Math.Min(Math.Max(1, nRepeat), 50)
|
||||
' creo il riferimento
|
||||
If nRepeat > 1 Then
|
||||
' per ogni pezze del file DXF creo un gruppo
|
||||
Dim nIdTemp As Integer = EgtGetFirstPart()
|
||||
While nIdTemp <> GDB_ID.NULL
|
||||
Dim sPreGuid As String = CreatePreGuidCode(nIdTemp)
|
||||
sGUICode.Add(sPreGuid & System.Guid.NewGuid.ToString)
|
||||
nIdTemp = EgtGetNextPart(nIdTemp)
|
||||
End While
|
||||
End If
|
||||
|
||||
' Passo al contesto principale
|
||||
EgtSetCurrentContext(m_MainWindow.m_CurrentProjectPageUC.CurrentProjectScene.GetCtx())
|
||||
' Recupero flag per inserimento diretto in grezzo (altrimenti in parcheggio)
|
||||
Dim bDirect As Boolean = (GetPrivateProfileInt(S_NEST, K_DIRECT, 0, m_MainWindow.GetIniFile()) <> 0)
|
||||
' Elimino eventuali precedenti pezzi vuoti
|
||||
EgtEraseEmptyParts()
|
||||
' Determino numero ripetizioni
|
||||
Dim nRepeat = 1
|
||||
StringToInt(PartNumTxBx.Text, nRepeat)
|
||||
nRepeat = Math.Min(Math.Max(1, nRepeat), 50)
|
||||
|
||||
' Inserisco i pezzi nell'ambiente principale e recupero Id primo pezzo inserito
|
||||
Dim nFirstId As Integer = EgtGetLastPart()
|
||||
For nInd As Integer = 1 To nRepeat
|
||||
Dim nFirst2Id As Integer = EgtGetLastPart()
|
||||
EgtInsertFile(sTmpFile)
|
||||
|
||||
Dim FirstOfImport As Integer = EgtGetNextPart(nFirst2Id)
|
||||
Dim Index As Integer = 1
|
||||
While FirstOfImport <> GDB_ID.NULL And Index <= sGUICode.Count
|
||||
If Not String.IsNullOrEmpty(sGUICode(Index - 1)) Then
|
||||
EgtSetInfo(FirstOfImport, INFO_REFGROUP, sGUICode(Index - 1))
|
||||
Index += 1
|
||||
Else
|
||||
Exit While
|
||||
End If
|
||||
FirstOfImport = EgtGetNextPart(FirstOfImport)
|
||||
End While
|
||||
|
||||
nFirst2Id = If(nFirst2Id <> GDB_ID.NULL, EgtGetNextPart(nFirst2Id), EgtGetFirstPart())
|
||||
' Eventuale inserimento pezzi in VeinMatching
|
||||
VeinMatching.AddParts(sTmpFile, nFirst2Id)
|
||||
Next
|
||||
nFirstId = If(nFirstId <> GDB_ID.NULL, EgtGetNextPart(nFirstId), EgtGetFirstPart())
|
||||
|
||||
' Cancello il file
|
||||
If My.Computer.FileSystem.FileExists(sTmpFile) Then
|
||||
My.Computer.FileSystem.DeleteFile(sTmpFile)
|
||||
@@ -845,7 +876,7 @@ Public Class ImportPageUC
|
||||
Dim dNewArea As Double = 0
|
||||
Dim nId As Integer = nFirstId
|
||||
While nId <> GDB_ID.NULL
|
||||
dNewArea += GeomCalc.GetPartArea( nId)
|
||||
dNewArea += GeomCalc.GetPartArea(nId)
|
||||
' Passo al pezzo successivo
|
||||
nId = EgtGetNextPart(nId)
|
||||
End While
|
||||
@@ -868,26 +899,26 @@ Public Class ImportPageUC
|
||||
If m_nFileType = FT.DXF Or m_nFileType = FT.NGE Then
|
||||
' Eventuale testo per indicare il sopra
|
||||
If TopBtn.IsChecked() Then
|
||||
Utility.AddTopToPartRegion( nRegId)
|
||||
Utility.AddTopToPartRegion(nRegId)
|
||||
End If
|
||||
' Se richiesti, inserisco dati Ordine, Distinta, Nome, Origine
|
||||
If m_bEnableOrderList Then
|
||||
' Cerco il nome del pezzo
|
||||
Dim sName As String = ""
|
||||
EgtGetName( nId, sName)
|
||||
EgtGetName(nId, sName)
|
||||
' Recupero il box del pezzo
|
||||
Dim b3Reg As New BBox3d : EgtGetBBox( nRegId, GDB_BB.IGNORE_TEXT + GDB_BB.IGNORE_DIM, b3Reg)
|
||||
Dim b3Reg As New BBox3d : EgtGetBBox(nRegId, GDB_BB.IGNORE_TEXT + GDB_BB.IGNORE_DIM, b3Reg)
|
||||
' Aggiungo info equivalenti a CSV
|
||||
EgtSetInfo(nId, INFO_CSV_PART, sName)
|
||||
EgtSetInfo(nId, INFO_CSV_ORD, m_sOrder)
|
||||
EgtSetInfo(nId, INFO_CSV_DIST, m_sList)
|
||||
EgtSetInfo(nId, INFO_CSV_MAT, m_MainWindow.m_CurrentMachine.CurrMat.sName)
|
||||
EgtSetInfo(nId, INFO_CSV_V1, DoubleToString( b3Reg.DimX(), 1))
|
||||
EgtSetInfo(nId, INFO_CSV_V2, DoubleToString( b3Reg.DimY(), 1))
|
||||
EgtSetInfo(nId, INFO_CSV_V1, DoubleToString(b3Reg.DimX(), 1))
|
||||
EgtSetInfo(nId, INFO_CSV_V2, DoubleToString(b3Reg.DimY(), 1))
|
||||
End If
|
||||
End If
|
||||
' Imposto colore testi
|
||||
Utility.SetTextColor( nRegId)
|
||||
Utility.SetTextColor(nRegId)
|
||||
' Imposto path di provenienza
|
||||
EgtSetInfo(nId, INFO_SOU_PATH, IO.Path.Combine(m_sCurrDir, m_sCurrFile))
|
||||
' Inserisco in parcheggio
|
||||
@@ -907,7 +938,7 @@ Public Class ImportPageUC
|
||||
' Eventuale aggiornamento VeinMatching
|
||||
VeinMatching.ZoomAll()
|
||||
' Aggiorno Aree totale e da lavorare dei pezzi
|
||||
m_MainWindow.m_CurrentProjectPageUC.UpdateTotalArea( dNewArea)
|
||||
m_MainWindow.m_CurrentProjectPageUC.UpdateTotalArea(dNewArea)
|
||||
m_MainWindow.m_CurrentProjectPageUC.UpdateToProduceArea()
|
||||
m_MainWindow.m_CurrentProjectPageUC.ShowAreas()
|
||||
' Aggiorno ambiente principale
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
Imports EgtUILib
|
||||
Imports System.IO
|
||||
Imports EgtUILib
|
||||
|
||||
Public Class InternalComponentPageUC
|
||||
|
||||
@@ -286,12 +287,22 @@ Public Class InternalComponentPageUC
|
||||
If sCompoImage.Length <> 0 Then
|
||||
Try
|
||||
Dim sPath As String = m_MainWindow.GetResourcesDir() & "\" & sCompoImage
|
||||
sCompoImageSource = ImageConverter.ConvertFromString(sPath)
|
||||
GetImage(index).Height = 65
|
||||
GetImage(index).Width = 65
|
||||
GetImage(index).Source = sCompoImageSource
|
||||
GetLabel(index).SetValue(Grid.ColumnProperty, 1)
|
||||
GetLabel(index).SetValue(Grid.ColumnSpanProperty, 1)
|
||||
If File.Exists(sPath) Then
|
||||
sCompoImageSource = ImageConverter.ConvertFromString(sPath)
|
||||
GetImage(index).Height = 65
|
||||
GetImage(index).Width = 65
|
||||
GetImage(index).Source = sCompoImageSource
|
||||
GetLabel(index).SetValue(Grid.ColumnProperty, 1)
|
||||
GetLabel(index).SetValue(Grid.ColumnSpanProperty, 1)
|
||||
Else
|
||||
sCompoImage = String.Empty
|
||||
GetImage(index).Height = 0
|
||||
GetImage(index).Width = 0
|
||||
CustomThickness.Right = 0
|
||||
GetImage(index).Margin = CustomThickness
|
||||
GetLabel(index).SetValue(Grid.ColumnProperty, 0)
|
||||
GetLabel(index).SetValue(Grid.ColumnSpanProperty, 2)
|
||||
End If
|
||||
Catch ex As Exception
|
||||
EgtOutLog("Error loading image " & sCompoImage)
|
||||
sCompoImage = String.Empty
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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())
|
||||
|
||||
@@ -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
|
||||
@@ -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, true)
|
||||
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, False, 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
|
||||
|
||||
@@ -158,6 +158,9 @@
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
@@ -165,10 +168,12 @@
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<!--Decrizione immagini-->
|
||||
<Border Grid.Row="1" Grid.Column="1" Margin="10">
|
||||
<Image Source="../Resources/Contour.png" Stretch="Uniform"/>
|
||||
</Border>
|
||||
@@ -178,24 +183,45 @@
|
||||
<Border Grid.Row="3" Grid.Column="1" Margin="10">
|
||||
<Image Source="../Resources/ZigZagY.png" Stretch="Uniform"/>
|
||||
</Border>
|
||||
<Border Grid.Row="4" Grid.Column="1" Margin="10">
|
||||
<Image Source="../Resources/Spiral.png" Stretch="Uniform"/>
|
||||
</Border>
|
||||
|
||||
<TextBlock Name="MotionTxBl" Grid.Row="0" Grid.Column="1" Style="{DynamicResource OmagCut_ToolsDBTextBlock}" Margin="30,0" HorizontalAlignment="Center"/>
|
||||
<TextBlock Name="RepeatTxBl" Grid.Row="0" Grid.Column="2" Style="{DynamicResource OmagCut_ToolsDBTextBlock}" Margin="30,0" HorizontalAlignment="Center"/>
|
||||
<TextBlock Name="StepTxBl" Grid.Row="0" Grid.Column="3" Style="{DynamicResource OmagCut_ToolsDBTextBlock}" Margin="30,0" HorizontalAlignment="Center"/>
|
||||
<TextBlock Name="OffSetTxBl" Grid.Row="0" Grid.Column="4" Style="{DynamicResource OmagCut_ToolsDBTextBlock}" Margin="30,0" HorizontalAlignment="Center"/>
|
||||
<!--Titolazione colonne-->
|
||||
<TextBlock Name="MotionTxBl" Grid.Row="0" Grid.Column="1" Style="{DynamicResource OmagCut_ToolsDBTextBlock}" Margin="5,0" HorizontalAlignment="Center"/>
|
||||
<TextBlock Name="RepeatTxBl" Grid.Row="0" Grid.Column="2" Style="{DynamicResource OmagCut_ToolsDBTextBlock}" Margin="5,0" HorizontalAlignment="Center"/>
|
||||
<TextBlock Name="StepTxBl" Grid.Row="0" Grid.Column="3" Style="{DynamicResource OmagCut_ToolsDBTextBlock}" Margin="5,0" HorizontalAlignment="Center"/>
|
||||
<TextBlock Name="OffSetTxBl" Grid.Row="0" Grid.Column="4" Style="{DynamicResource OmagCut_ToolsDBTextBlock}" Margin="5,0" HorizontalAlignment="Center"/>
|
||||
<TextBlock Name="RadiusTxBl" Grid.Row="0" Grid.Column="5" Style="{DynamicResource OmagCut_ToolsDBTextBlock}" Margin="5,0" HorizontalAlignment="Center"/>
|
||||
<TextBlock Name="DistanceTxBl" Grid.Row="0" Grid.Column="6" Style="{DynamicResource OmagCut_ToolsDBTextBlock}" Margin="5,0" HorizontalAlignment="Center"/>
|
||||
|
||||
<EgtWPFLib:EgtTextBox Name="ContourTxBx" Grid.Row="1" Grid.Column="2" Style="{DynamicResource OmagCut_CalculatorTextBox}" Margin="30,0"/>
|
||||
<EgtWPFLib:EgtTextBox Name="OffContourTxBx" Grid.Row="1" Grid.Column="4" Style="{DynamicResource OmagCut_CalculatorTextBox}" Margin="30,0"/>
|
||||
<!--Contornatura-->
|
||||
<EgtWPFLib:EgtTextBox Name="ContourTxBx" Grid.Row="1" Grid.Column="2" Style="{DynamicResource OmagCut_CalculatorTextBox}" Margin="10,0"/>
|
||||
<EgtWPFLib:EgtTextBox Name="OffContourTxBx" Grid.Row="1" Grid.Column="4" Style="{DynamicResource OmagCut_CalculatorTextBox}" Margin="10,0"/>
|
||||
|
||||
<EgtWPFLib:EgtTextBox Name="ZigZagXTxBx" Grid.Row="2" Grid.Column="2" Style="{DynamicResource OmagCut_CalculatorTextBox}" Margin="30,0"/>
|
||||
<EgtWPFLib:EgtTextBox Name="StepXTxBx" Grid.Row="2" Grid.Column="3" Style="{DynamicResource OmagCut_CalculatorTextBox}" Margin="30,0"/>
|
||||
<EgtWPFLib:EgtTextBox Name="OffZigZagXTxBx" Grid.Row="2" Grid.Column="4" Style="{DynamicResource OmagCut_CalculatorTextBox}" Margin="30,0"/>
|
||||
|
||||
<EgtWPFLib:EgtTextBox Name="ZigZagYTxBx" Grid.Row="3" Grid.Column="2" Style="{DynamicResource OmagCut_CalculatorTextBox}" Margin="30,0"/>
|
||||
<EgtWPFLib:EgtTextBox Name="StepYTxBx" Grid.Row="3" Grid.Column="3" Style="{DynamicResource OmagCut_CalculatorTextBox}" Margin="30,0"/>
|
||||
<EgtWPFLib:EgtTextBox Name="OffZigZagYTxBx" Grid.Row="3" Grid.Column="4" Style="{DynamicResource OmagCut_CalculatorTextBox}" Margin="30,0"/>
|
||||
<!--Cammino orizzontale X-->
|
||||
<EgtWPFLib:EgtTextBox Name="ZigZagXTxBx" Grid.Row="2" Grid.Column="2" Style="{DynamicResource OmagCut_CalculatorTextBox}" Margin="10,0"/>
|
||||
<EgtWPFLib:EgtTextBox Name="StepXTxBx" Grid.Row="2" Grid.Column="3" Style="{DynamicResource OmagCut_CalculatorTextBox}" Margin="10,0"/>
|
||||
<EgtWPFLib:EgtTextBox Name="OffZigZagXTxBx" Grid.Row="2" Grid.Column="4" Style="{DynamicResource OmagCut_CalculatorTextBox}" Margin="10,0"/>
|
||||
<EgtWPFLib:EgtTextBox Name="RadiusXTxBx" Grid.Row="2" Grid.Column="5" Style="{DynamicResource OmagCut_CalculatorTextBox}" Margin="10,0" Visibility="Collapsed"/>
|
||||
<EgtWPFLib:EgtTextBox Name="DistanceXTxBx" Grid.Row="2" Grid.Column="6" Style="{DynamicResource OmagCut_CalculatorTextBox}" Margin="10,0" Visibility="Collapsed"/>
|
||||
|
||||
<GroupBox Name="LiLoGpBx" Grid.Row="4" Grid.Column="1" Grid.RowSpan="2" Grid.ColumnSpan="3" Style="{DynamicResource OmagCut_GroupBox}">
|
||||
<!--Cammino verticale Y-->
|
||||
<EgtWPFLib:EgtTextBox Name="ZigZagYTxBx" Grid.Row="3" Grid.Column="2" Style="{DynamicResource OmagCut_CalculatorTextBox}" Margin="10,0"/>
|
||||
<EgtWPFLib:EgtTextBox Name="StepYTxBx" Grid.Row="3" Grid.Column="3" Style="{DynamicResource OmagCut_CalculatorTextBox}" Margin="10,0"/>
|
||||
<EgtWPFLib:EgtTextBox Name="OffZigZagYTxBx" Grid.Row="3" Grid.Column="4" Style="{DynamicResource OmagCut_CalculatorTextBox}" Margin="10,0"/>
|
||||
<EgtWPFLib:EgtTextBox Name="RadiusYTxBx" Grid.Row="3" Grid.Column="5" Style="{DynamicResource OmagCut_CalculatorTextBox}" Margin="10,0" Visibility="Collapsed"/>
|
||||
<EgtWPFLib:EgtTextBox Name="DistanceYTxBx" Grid.Row="3" Grid.Column="6" Style="{DynamicResource OmagCut_CalculatorTextBox}" Margin="10,0" Visibility="Collapsed"/>
|
||||
|
||||
<!--Cammino a spirale-->
|
||||
<EgtWPFLib:EgtTextBox Name="SpiralTxBx" Grid.Row="4" Grid.Column="2" Style="{DynamicResource OmagCut_CalculatorTextBox}" Margin="10,0"/>
|
||||
<EgtWPFLib:EgtTextBox Name="StepSpiralTxBx" Grid.Row="4" Grid.Column="3" Style="{DynamicResource OmagCut_CalculatorTextBox}" Margin="10,0"/>
|
||||
<EgtWPFLib:EgtTextBox Name="OffSpiralTxBx" Grid.Row="4" Grid.Column="4" Style="{DynamicResource OmagCut_CalculatorTextBox}" Margin="10,0"/>
|
||||
<EgtWPFLib:EgtTextBox Name="RadiusSpiralTxBx" Grid.Row="4" Grid.Column="5" Style="{DynamicResource OmagCut_CalculatorTextBox}" Margin="10,0"/>
|
||||
<EgtWPFLib:EgtTextBox Name="DistanceSpiralTxBx" Grid.Row="4" Grid.Column="6" Style="{DynamicResource OmagCut_CalculatorTextBox}" Margin="10,0"/>
|
||||
|
||||
<!--Parametri di lavoro condivisi-->
|
||||
<GroupBox Name="LiLoGpBx" Grid.Row="5" Grid.Column="1" Grid.RowSpan="2" Grid.ColumnSpan="5" Style="{DynamicResource OmagCut_GroupBox}">
|
||||
<Grid Name="LiLoGrd">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
@@ -212,11 +238,11 @@
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<TextBlock Name="LiLenTxBl" Grid.Row="1" Grid.Column="0" Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="LiLenTxBx" Grid.Row="1" Grid.Column="1" Style="{DynamicResource OmagCut_CalculatorTextBox}" Margin="30,0"/>
|
||||
<EgtWPFLib:EgtTextBox Name="LiLenTxBx" Grid.Row="1" Grid.Column="1" Style="{DynamicResource OmagCut_CalculatorTextBox}" Margin="10,0"/>
|
||||
<TextBlock Name="LiHeightTxBl" Grid.Row="1" Grid.Column="2" Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="LiHeightTxBx" Grid.Row="1" Grid.Column="3" Style="{DynamicResource OmagCut_CalculatorTextBox}" Margin="30,0"/>
|
||||
<EgtWPFLib:EgtTextBox Name="LiHeightTxBx" Grid.Row="1" Grid.Column="3" Style="{DynamicResource OmagCut_CalculatorTextBox}" Margin="10,0"/>
|
||||
<TextBlock Name="LiLoadTxBl" Grid.Row="3" Grid.Column="0" Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="LiLoadTxBx" Grid.Row="3" Grid.Column="1" Style="{DynamicResource OmagCut_CalculatorTextBox}" Margin="30,0"/>
|
||||
<EgtWPFLib:EgtTextBox Name="LiLoadTxBx" Grid.Row="3" Grid.Column="1" Style="{DynamicResource OmagCut_CalculatorTextBox}" Margin="10,0"/>
|
||||
|
||||
</Grid>
|
||||
</GroupBox>
|
||||
|
||||
@@ -61,6 +61,8 @@ Public Class PolishingsPageUC
|
||||
RepeatTxBl.Text = EgtMsg(91093) ' Ripetizioni
|
||||
StepTxBl.Text = EgtMsg(90787) ' Passo
|
||||
OffSetTxBl.Text = EgtMsg(91089) ' Offset
|
||||
RadiusTxBl.Text = "Raggio"
|
||||
DistanceTxBl.Text = "Distanza"
|
||||
LiLoGpBx.Header = EgtMsg(91094) ' Attacco/Uscita
|
||||
LiLenTxBl.Text = EgtMsg(91097) ' Lunghezza
|
||||
LiHeightTxBl.Text = EgtMsg(91095) ' Altezza
|
||||
@@ -452,7 +454,9 @@ Public Class PolishingsPageUC
|
||||
If KitMachItem.m_IsModifiedId OrElse KitMachItem.m_IsModifiedToolUUID OrElse KitMachItem.m_IsModifiedToolName OrElse KitMachItem.m_IsModifiedSelTool OrElse
|
||||
KitMachItem.m_IsModifiedActive OrElse KitMachItem.m_IsModifiedContour OrElse KitMachItem.m_IsModifiedOffCnt OrElse KitMachItem.m_IsModifiedZigZagX OrElse
|
||||
KitMachItem.m_IsModifiedOffZigZagX OrElse KitMachItem.m_IsModifiedZigZagY OrElse KitMachItem.m_IsModifiedStepX OrElse KitMachItem.m_IsModifiedStepY OrElse
|
||||
KitMachItem.m_IsModifiedOffZigZagY OrElse KitMachItem.m_IsModifiedLiLen OrElse KitMachItem.m_IsModifiedLiHeight OrElse KitMachItem.m_IsModifiedLiLoad Then
|
||||
KitMachItem.m_IsModifiedOffZigZagY OrElse KitMachItem.m_IsModifiedSpiral OrElse KitMachItem.m_IsModifiedOffSpiral OrElse KitMachItem.m_IsModifiedStepSpiral OrElse
|
||||
KitMachItem.m_IsModifiedRadiusSpiral OrElse KitMachItem.m_IsModifiedDistanceSpiral OrElse KitMachItem.m_IsModifiedLiLen OrElse KitMachItem.m_IsModifiedLiHeight OrElse
|
||||
KitMachItem.m_IsModifiedLiLoad Then
|
||||
Return True
|
||||
End If
|
||||
Next
|
||||
@@ -476,10 +480,19 @@ Public Class PolishingsPageUC
|
||||
KitMachItem.m_IsModifiedOffCnt = False
|
||||
KitMachItem.m_IsModifiedZigZagX = False
|
||||
KitMachItem.m_IsModifiedOffZigZagX = False
|
||||
KitMachItem.m_IsModifiedRadiusX = False
|
||||
KitMachItem.m_IsModifiedDistanceX = False
|
||||
KitMachItem.m_IsModifiedZigZagY = False
|
||||
KitMachItem.m_IsModifiedOffZigZagY = False
|
||||
KitMachItem.m_IsModifiedRadiusY = False
|
||||
KitMachItem.m_IsModifiedDistanceY = False
|
||||
KitMachItem.m_IsModifiedSpiral = False
|
||||
KitMachItem.m_IsModifiedOffSpiral = False
|
||||
KitMachItem.m_IsModifiedRadiusSpiral = False
|
||||
KitMachItem.m_IsModifiedDistanceSpiral = False
|
||||
KitMachItem.m_IsModifiedStepX = False
|
||||
KitMachItem.m_IsModifiedStepY = False
|
||||
KitMachItem.m_IsModifiedStepSpiral = False
|
||||
KitMachItem.m_IsModifiedLiLen = False
|
||||
KitMachItem.m_IsModifiedLiHeight = False
|
||||
KitMachItem.m_IsModifiedLiLoad = False
|
||||
@@ -493,20 +506,29 @@ Public Class PolishingsPageUC
|
||||
OffContourTxBx.Text = LenToString(kmShow.dOffsetCnt, 3)
|
||||
ZigZagXTxBx.Text = kmShow.nZigZagX.ToString()
|
||||
OffZigZagXTxBx.Text = LenToString(kmShow.dOffZigZagX, 3)
|
||||
StepXTxBx.Text = LenToString( kmShow.dStepX, 3)
|
||||
StepXTxBx.Text = LenToString(kmShow.dStepX, 3)
|
||||
RadiusXTxBx.Text = LenToString(kmShow.dRadiusX, 3)
|
||||
DistanceXTxBx.Text = LenToString(kmShow.dDistanceX, 3)
|
||||
ZigZagYTxBx.Text = kmShow.nZigZagY.ToString()
|
||||
OffZigZagYTxBx.Text = LenToString(kmShow.dOffZigZagY, 3)
|
||||
StepYTxBx.Text = LenToString( kmShow.dStepY, 3)
|
||||
LiLenTxBx.Text = LenToString( kmShow.dLiLen, 3)
|
||||
LiHeightTxBx.Text = LenToString( kmShow.dLiHeight, 3)
|
||||
LiLoadTxBx.Text = LenToString( kmShow.dLiLoad, 3)
|
||||
StepYTxBx.Text = LenToString(kmShow.dStepY, 3)
|
||||
RadiusYTxBx.Text = LenToString(kmShow.dRadiusY, 3)
|
||||
DistanceYTxBx.Text = LenToString(kmShow.dDistanceY, 3)
|
||||
SpiralTxBx.Text = kmShow.nSpiral.ToString()
|
||||
StepSpiralTxBx.Text = LenToString(kmShow.dStepSpiral, 3)
|
||||
OffSpiralTxBx.Text = LenToString(kmShow.dOffSpiral, 3)
|
||||
RadiusSpiralTxBx.Text = LenToString(kmShow.dRadiusSpiral, 3)
|
||||
DistanceSpiralTxBx.Text = LenToString(kmShow.dDistanceSpiral, 3)
|
||||
LiLenTxBx.Text = LenToString(kmShow.dLiLen, 3)
|
||||
LiHeightTxBx.Text = LenToString(kmShow.dLiHeight, 3)
|
||||
LiLoadTxBx.Text = LenToString(kmShow.dLiLoad, 3)
|
||||
End Sub
|
||||
|
||||
Private Sub KitMachsLstBx_SelectionChanged(sender As Object, e As SelectionChangedEventArgs) Handles KitMachsLstBx.SelectionChanged
|
||||
Dim SelectedKitMach As KitMach = KitMachsLstBx.SelectedItem
|
||||
If Not IsNothing(SelectedKitMach) Then
|
||||
' visualizzo i parametri relativi al KitMach selezionato
|
||||
ShowKitMach( SelectedKitMach)
|
||||
ShowKitMach(SelectedKitMach)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
@@ -520,14 +542,16 @@ Public Class PolishingsPageUC
|
||||
End Sub
|
||||
|
||||
Private Sub OffContourTxBx_EgtClosed(sender As Object, e As EventArgs) Handles OffContourTxBx.EgtClosed
|
||||
Dim nTemp As Integer = 0
|
||||
Dim dTemp As Double = 0
|
||||
If Not IsNothing(KitMachsLstBx.SelectedItem) Then
|
||||
nTemp = OffContourTxBx.Text
|
||||
KitMachsLstBx.SelectedItem.dOffsetCnt = nTemp
|
||||
m_OldItem.KitMachList(KitMachsLstBx.SelectedItem.nId - 1).dOffsetCnt = nTemp
|
||||
StringToLen(OffContourTxBx.Text, dTemp)
|
||||
KitMachsLstBx.SelectedItem.dOffsetCnt = dTemp
|
||||
m_OldItem.KitMachList(KitMachsLstBx.SelectedItem.nId - 1).dOffsetCnt = dTemp
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#Region "ZigZag X"
|
||||
|
||||
Private Sub ZigZagXTxBx_EgtClosed(sender As Object, e As EventArgs) Handles ZigZagXTxBx.EgtClosed
|
||||
Dim nTemp As Integer = 0
|
||||
If Not IsNothing(KitMachsLstBx.SelectedItem) Then
|
||||
@@ -538,11 +562,11 @@ Public Class PolishingsPageUC
|
||||
End Sub
|
||||
|
||||
Private Sub OffZigZagXTxBx_EgtClosed(sender As Object, e As EventArgs) Handles OffZigZagXTxBx.EgtClosed
|
||||
Dim nTemp As Integer = 0
|
||||
Dim dTemp As Double = 0
|
||||
If Not IsNothing(KitMachsLstBx.SelectedItem) Then
|
||||
nTemp = OffZigZagXTxBx.Text
|
||||
KitMachsLstBx.SelectedItem.dOffZigZagX = nTemp
|
||||
m_OldItem.KitMachList(KitMachsLstBx.SelectedItem.nId - 1).dOffZigZagX = nTemp
|
||||
StringToLen(OffZigZagXTxBx.Text, dTemp)
|
||||
KitMachsLstBx.SelectedItem.dOffZigZagX = dTemp
|
||||
m_OldItem.KitMachList(KitMachsLstBx.SelectedItem.nId - 1).dOffZigZagX = dTemp
|
||||
End If
|
||||
End Sub
|
||||
|
||||
@@ -555,6 +579,28 @@ Public Class PolishingsPageUC
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub RadiusXTxBx_EgtClosed(sender As Object, e As EventArgs) Handles RadiusXTxBx.EgtClosed
|
||||
Dim dTemp As Double = 0
|
||||
If Not IsNothing(KitMachsLstBx.SelectedItem) Then
|
||||
StringToLen(RadiusXTxBx.Text, dTemp)
|
||||
KitMachsLstBx.SelectedItem.dRadiusX = dTemp
|
||||
m_OldItem.KitMachList(KitMachsLstBx.SelectedItem.nId - 1).dRadiusX = dTemp
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub DistanceXTxBx_EgtClosed(sender As Object, e As EventArgs) Handles DistanceXTxBx.EgtClosed
|
||||
Dim dTemp As Double = 0
|
||||
If Not IsNothing(KitMachsLstBx.SelectedItem) Then
|
||||
StringToLen(DistanceXTxBx.Text, dTemp)
|
||||
KitMachsLstBx.SelectedItem.dDistanceX = dTemp
|
||||
m_OldItem.KitMachList(KitMachsLstBx.SelectedItem.nId - 1).dDistanceX = dTemp
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#End Region ' ZigZag X
|
||||
|
||||
#Region "ZizZag Y"
|
||||
|
||||
Private Sub ZigZagYTxBx_EgtClosed(sender As Object, e As EventArgs) Handles ZigZagYTxBx.EgtClosed
|
||||
Dim nTemp As Integer = 0
|
||||
If Not IsNothing(KitMachsLstBx.SelectedItem) Then
|
||||
@@ -565,11 +611,11 @@ Public Class PolishingsPageUC
|
||||
End Sub
|
||||
|
||||
Private Sub OffZigZagYTxBx_EgtClosed(sender As Object, e As EventArgs) Handles OffZigZagYTxBx.EgtClosed
|
||||
Dim nTemp As Integer = 0
|
||||
Dim dTemp As Double = 0
|
||||
If Not IsNothing(KitMachsLstBx.SelectedItem) Then
|
||||
nTemp = OffZigZagYTxBx.Text
|
||||
KitMachsLstBx.SelectedItem.dOffZigZagY = nTemp
|
||||
m_OldItem.KitMachList(KitMachsLstBx.SelectedItem.nId - 1).dOffZigZagY = nTemp
|
||||
StringToLen(OffZigZagYTxBx.Text, dTemp)
|
||||
KitMachsLstBx.SelectedItem.dOffZigZagY = dTemp
|
||||
m_OldItem.KitMachList(KitMachsLstBx.SelectedItem.nId - 1).dOffZigZagY = dTemp
|
||||
End If
|
||||
End Sub
|
||||
|
||||
@@ -582,6 +628,75 @@ Public Class PolishingsPageUC
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub RadiusYTxBx_EgtClosed(sender As Object, e As EventArgs) Handles RadiusYTxBx.EgtClosed
|
||||
Dim dTemp As Double = 0
|
||||
If Not IsNothing(KitMachsLstBx.SelectedItem) Then
|
||||
StringToLen(RadiusYTxBx.Text, dTemp)
|
||||
KitMachsLstBx.SelectedItem.dRadiusY = dTemp
|
||||
m_OldItem.KitMachList(KitMachsLstBx.SelectedItem.nId - 1).dRadiusY = dTemp
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub DistanceYTxBx_EgtClosed(sender As Object, e As EventArgs) Handles DistanceYTxBx.EgtClosed
|
||||
Dim dTemp As Double = 0
|
||||
If Not IsNothing(KitMachsLstBx.SelectedItem) Then
|
||||
StringToLen(DistanceYTxBx.Text, dTemp)
|
||||
KitMachsLstBx.SelectedItem.dDistanceY = dTemp
|
||||
m_OldItem.KitMachList(KitMachsLstBx.SelectedItem.nId - 1).dDistanceY = dTemp
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#End Region ' ZigZagY
|
||||
|
||||
#Region "Spirale"
|
||||
|
||||
Private Sub SpiralTxBx_EgtClosed(sender As Object, e As EventArgs) Handles SpiralTxBx.EgtClosed
|
||||
Dim nTemp As Integer = 0
|
||||
If Not IsNothing(KitMachsLstBx.SelectedItem) Then
|
||||
nTemp = SpiralTxBx.Text
|
||||
KitMachsLstBx.SelectedItem.nSpiral = nTemp
|
||||
m_OldItem.KitMachList(KitMachsLstBx.SelectedItem.nId - 1).nSpiral = nTemp
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub OffSpiralTxBx_EgtClosed(sender As Object, e As EventArgs) Handles OffSpiralTxBx.EgtClosed
|
||||
Dim dTemp As Double = 0
|
||||
If Not IsNothing(KitMachsLstBx.SelectedItem) Then
|
||||
StringToLen(OffSpiralTxBx.Text, dTemp)
|
||||
KitMachsLstBx.SelectedItem.dOffSpiral = dTemp
|
||||
m_OldItem.KitMachList(KitMachsLstBx.SelectedItem.nId - 1).dOffSpiral = dTemp
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub StepSpiralTxBx_EgtClosed(sender As Object, e As EventArgs) Handles StepSpiralTxBx.EgtClosed
|
||||
Dim dTemp As Double = 0
|
||||
If Not IsNothing(KitMachsLstBx.SelectedItem) Then
|
||||
StringToLen(StepSpiralTxBx.Text, dTemp)
|
||||
KitMachsLstBx.SelectedItem.dStepSpiral = dTemp
|
||||
m_OldItem.KitMachList(KitMachsLstBx.SelectedItem.nId - 1).dStepSpiral = dTemp
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub RadiusSpiralTxBx_EgtClosed(sender As Object, e As EventArgs) Handles RadiusSpiralTxBx.EgtClosed
|
||||
Dim dTemp As Double = 0
|
||||
If Not IsNothing(KitMachsLstBx.SelectedItem) Then
|
||||
StringToLen(RadiusSpiralTxBx.Text, dTemp)
|
||||
KitMachsLstBx.SelectedItem.dRadiusSpiral = dTemp
|
||||
m_OldItem.KitMachList(KitMachsLstBx.SelectedItem.nId - 1).dRadiusSpiral = dTemp
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub DistanceSpiralTxBx_EgtClosed(sender As Object, e As EventArgs) Handles DistanceSpiralTxBx.EgtClosed
|
||||
Dim dTemp As Double = 0
|
||||
If Not IsNothing(KitMachsLstBx.SelectedItem) Then
|
||||
StringToLen(DistanceSpiralTxBx.Text, dTemp)
|
||||
KitMachsLstBx.SelectedItem.dDistanceSpiral = dTemp
|
||||
m_OldItem.KitMachList(KitMachsLstBx.SelectedItem.nId - 1).dDistanceSpiral = dTemp
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#End Region ' Spirale
|
||||
|
||||
Private Sub LiLenTxBx_EgtClosed(sender As Object, e As EventArgs) Handles LiLenTxBx.EgtClosed
|
||||
Dim dTemp As Double = 0
|
||||
If Not IsNothing(KitMachsLstBx.SelectedItem) Then
|
||||
@@ -616,11 +731,11 @@ Public Class PolishingsPageUC
|
||||
End Sub
|
||||
|
||||
Private Sub ToolCmBx_SelectionChanged(sender As Object, e As SelectionChangedEventArgs)
|
||||
If Not IsNothing( KitMachsLstBx.SelectedItem) Then
|
||||
If Not IsNothing(KitMachsLstBx.SelectedItem) Then
|
||||
m_OldItem.KitMachList(KitMachsLstBx.SelectedItem.nId - 1).SelTool = KitMachsLstBx.SelectedItem.SelTool
|
||||
If KitMachsLstBx.SelectedItem.SelTool >= 0 then
|
||||
KitMachsLstBx.SelectedItem.sToolName = m_ToolList( KitMachsLstBx.SelectedItem.SelTool)
|
||||
KitMachsLstBx.SelectedItem.sToolUUID = m_ToolUuidList( KitMachsLstBx.SelectedItem.SelTool)
|
||||
If KitMachsLstBx.SelectedItem.SelTool >= 0 Then
|
||||
KitMachsLstBx.SelectedItem.sToolName = m_ToolList(KitMachsLstBx.SelectedItem.SelTool)
|
||||
KitMachsLstBx.SelectedItem.sToolUUID = m_ToolUuidList(KitMachsLstBx.SelectedItem.SelTool)
|
||||
Else
|
||||
KitMachsLstBx.SelectedItem.sToolName = "---"
|
||||
KitMachsLstBx.SelectedItem.sToolUUID = "---"
|
||||
@@ -630,143 +745,176 @@ Public Class PolishingsPageUC
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Function ReadKitName( nKitIndex As Integer) As String
|
||||
Private Function ReadKitName(nKitIndex As Integer) As String
|
||||
' Leggo il nome del kit
|
||||
Dim sKey As String = K_KIT & nKitIndex.ToString("D2")
|
||||
Dim sName As String = ""
|
||||
GetPrivateProfileString( S_HEADER, sKey, "", sName, m_sKitFile)
|
||||
GetPrivateProfileString(S_HEADER, sKey, "", sName, m_sKitFile)
|
||||
Return sName
|
||||
End Function
|
||||
|
||||
Private Function ReadKit( nKitIndex As Integer, removeFlag As Boolean, ByRef Kit As Kit) As Boolean
|
||||
|
||||
Private Function ReadKit(nKitIndex As Integer, removeFlag As Boolean, ByRef Kit As Kit) As Boolean
|
||||
' Leggo il nome del kit
|
||||
Dim sName As String = ReadKitName( nKitIndex)
|
||||
If String.IsNullOrWhiteSpace( sName) Then Return False
|
||||
Dim sName As String = ReadKitName(nKitIndex)
|
||||
If String.IsNullOrWhiteSpace(sName) Then Return False
|
||||
' Creo il kit
|
||||
Kit = New Kit( If( removeFlag, nKitIndex - 1, nKitIndex), sName)
|
||||
Kit = New Kit(If(removeFlag, nKitIndex - 1, nKitIndex), sName)
|
||||
' Leggo le sue lavorazioni
|
||||
For nkitMachIndex As Integer = 1 To 100
|
||||
Dim kmItem As KitMach = Nothing
|
||||
if ReadKitMach( sName, nkitMachIndex, kmItem) Then
|
||||
Kit.AddKitMach( kmItem)
|
||||
If ReadKitMach(sName, nkitMachIndex, kmItem) Then
|
||||
Kit.AddKitMach(kmItem)
|
||||
Else
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
' Se non sono state trovate lavorazioni, ne aggiungo una standard
|
||||
If Kit.KitMachList.Count() = 0 Then
|
||||
Kit.AddKitMach( New KitMach( 1))
|
||||
Kit.AddKitMach(New KitMach(1))
|
||||
End If
|
||||
Return True
|
||||
End Function
|
||||
|
||||
Private Function ReadKitMach( sKitName As String, nKitMachIndex As Integer, ByRef kmItem As KitMach) As Boolean
|
||||
Private Function ReadKitMach(sKitName As String, nKitMachIndex As Integer, ByRef kmItem As KitMach) As Boolean
|
||||
' Verifico esistenza lavorazione del kit
|
||||
Dim sSect As String = S_KIT & "." & sKitName
|
||||
Dim sKeyInd As String = nkitMachIndex.ToString("D2") & "."
|
||||
Dim sKeyInd As String = nKitMachIndex.ToString("D2") & "."
|
||||
Dim sName As String = ""
|
||||
If GetPrivateProfileString( sSect, sKeyInd & K_TOOLNAME, "", sName, m_sKitFile) = 0 Then Return False
|
||||
If GetPrivateProfileString(sSect, sKeyInd & K_TOOLNAME, "", sName, m_sKitFile) = 0 Then Return False
|
||||
' Lettura completa
|
||||
kmItem = New KitMach
|
||||
kmItem.sToolName = sName
|
||||
kmItem.nId = nkitMachIndex
|
||||
GetPrivateProfileString( sSect, sKeyInd & K_TOOL, "", kmItem.sToolUUID, m_sKitFile)
|
||||
kmItem.bActive = ( GetPrivateProfileInt( sSect, sKeyInd & K_ACTIVE, 0, m_sKitFile) = 1)
|
||||
kmItem.nId = nKitMachIndex
|
||||
GetPrivateProfileString(sSect, sKeyInd & K_TOOL, "", kmItem.sToolUUID, m_sKitFile)
|
||||
kmItem.bActive = (GetPrivateProfileInt(sSect, sKeyInd & K_ACTIVE, 0, m_sKitFile) = 1)
|
||||
kmItem.nContour = GetPrivateProfileInt(sSect, sKeyInd & K_CONTOUR, 0, m_sKitFile)
|
||||
kmItem.dOffsetCnt = GetPrivateProfileInt(sSect, sKeyInd & K_OFFSETCNT, 0, m_sKitFile)
|
||||
kmItem.dOffsetCnt = GetPrivateProfileDouble(sSect, sKeyInd & K_OFFSETCNT, 0, m_sKitFile)
|
||||
kmItem.nZigZagX = GetPrivateProfileInt(sSect, sKeyInd & K_ZIGZAGX, 0, m_sKitFile)
|
||||
kmItem.dOffZigZagX = GetPrivateProfileInt(sSect, sKeyInd & K_OFFZIGZAGX, 0, m_sKitFile)
|
||||
kmItem.dOffZigZagX = GetPrivateProfileDouble(sSect, sKeyInd & K_OFFZIGZAGX, 0, m_sKitFile)
|
||||
kmItem.dStepX = GetPrivateProfileDouble(sSect, sKeyInd & K_STEPX, 0, m_sKitFile)
|
||||
kmItem.dRadiusX = GetPrivateProfileDouble(sSect, sKeyInd & K_RADIUSX, 0, m_sKitFile)
|
||||
kmItem.dDistanceX = GetPrivateProfileDouble(sSect, sKeyInd & K_DISTANCEX, 0, m_sKitFile)
|
||||
kmItem.nZigZagY = GetPrivateProfileInt(sSect, sKeyInd & K_ZIGZAGY, 0, m_sKitFile)
|
||||
kmItem.dOffZigZagY = GetPrivateProfileInt(sSect, sKeyInd & K_OFFZIGZAGY, 0, m_sKitFile)
|
||||
kmItem.dStepY = GetPrivateProfileDouble( sSect, sKeyInd & K_STEPY, 0, m_sKitFile)
|
||||
kmItem.dLiLen = GetPrivateProfileDouble( sSect, sKeyInd & K_LILEN, 0, m_sKitFile)
|
||||
kmItem.dLiHeight = GetPrivateProfileDouble( sSect, sKeyInd & K_LIHEIGHT, 0, m_sKitFile)
|
||||
kmItem.dLiLoad = GetPrivateProfileDouble( sSect, sKeyInd & K_LILOAD, 0, m_sKitFile)
|
||||
kmItem.dOffZigZagY = GetPrivateProfileDouble(sSect, sKeyInd & K_OFFZIGZAGY, 0, m_sKitFile)
|
||||
kmItem.dStepY = GetPrivateProfileDouble(sSect, sKeyInd & K_STEPY, 0, m_sKitFile)
|
||||
kmItem.dRadiusY = GetPrivateProfileDouble(sSect, sKeyInd & K_RADIUSY, 0, m_sKitFile)
|
||||
kmItem.dDistanceY = GetPrivateProfileDouble(sSect, sKeyInd & K_DISTANCEY, 0, m_sKitFile)
|
||||
|
||||
kmItem.nSpiral = GetPrivateProfileInt(sSect, sKeyInd & K_SPIRAL, 0, m_sKitFile)
|
||||
kmItem.dOffSpiral = GetPrivateProfileDouble(sSect, sKeyInd & K_OFFSPIRAL, 0, m_sKitFile)
|
||||
kmItem.dStepSpiral = GetPrivateProfileDouble(sSect, sKeyInd & K_STEPSPIRAL, 0, m_sKitFile)
|
||||
kmItem.dRadiusSpiral = GetPrivateProfileDouble(sSect, sKeyInd & K_RADIUSSPIRAL, 0, m_sKitFile)
|
||||
kmItem.dDistanceSpiral = GetPrivateProfileDouble(sSect, sKeyInd & K_DISTANCESPIRAL, 0, m_sKitFile)
|
||||
|
||||
kmItem.dLiLen = GetPrivateProfileDouble(sSect, sKeyInd & K_LILEN, 0, m_sKitFile)
|
||||
kmItem.dLiHeight = GetPrivateProfileDouble(sSect, sKeyInd & K_LIHEIGHT, 0, m_sKitFile)
|
||||
kmItem.dLiLoad = GetPrivateProfileDouble(sSect, sKeyInd & K_LILOAD, 0, m_sKitFile)
|
||||
Return True
|
||||
End Function
|
||||
|
||||
Friend Function WriteKitName( nKitIndex As Integer, sKitName As String) As Boolean
|
||||
Friend Function WriteKitName(nKitIndex As Integer, sKitName As String) As Boolean
|
||||
Dim sKey As String = K_KIT & nKitIndex.ToString("D2")
|
||||
Return WritePrivateProfileString( S_HEADER, sKey, sKitName, m_sKitFile)
|
||||
Return WritePrivateProfileString(S_HEADER, sKey, sKitName, m_sKitFile)
|
||||
End Function
|
||||
|
||||
Private Function WriteKitMach( nKitIndex As Integer, nKitMachIndex As Integer, kmItem As KitMach) As Boolean
|
||||
Private Function WriteKitMach(nKitIndex As Integer, nKitMachIndex As Integer, kmItem As KitMach) As Boolean
|
||||
' Leggo il nome del kit
|
||||
Dim sKitName As String = ReadKitName( nKitIndex)
|
||||
If String.IsNullOrWhiteSpace( sKitName) Then Return False
|
||||
Dim sKitName As String = ReadKitName(nKitIndex)
|
||||
If String.IsNullOrWhiteSpace(sKitName) Then Return False
|
||||
' Sezione
|
||||
Dim sSect As String = S_KIT & "." & sKitName
|
||||
' Indice
|
||||
Dim sKeyInd As String = nKitMachIndex.ToString("D2") & "."
|
||||
' Scrivo i dati della lavorazione
|
||||
If Not IsNothing( kmItem) Then
|
||||
WritePrivateProfileString( sSect, sKeyInd & K_TOOL, kmItem.sToolUUID, m_sKitFile)
|
||||
WritePrivateProfileString( sSect, sKeyInd & K_TOOLNAME, kmItem.sToolName, m_sKitFile)
|
||||
WritePrivateProfileString( sSect, sKeyInd & K_ACTIVE, If( kmItem.bActive, "1", "0"), m_sKitFile)
|
||||
If Not IsNothing(kmItem) Then
|
||||
WritePrivateProfileString(sSect, sKeyInd & K_TOOL, kmItem.sToolUUID, m_sKitFile)
|
||||
WritePrivateProfileString(sSect, sKeyInd & K_TOOLNAME, kmItem.sToolName, m_sKitFile)
|
||||
WritePrivateProfileString(sSect, sKeyInd & K_ACTIVE, If(kmItem.bActive, "1", "0"), m_sKitFile)
|
||||
WritePrivateProfileString(sSect, sKeyInd & K_CONTOUR, kmItem.nContour.ToString(), m_sKitFile)
|
||||
WritePrivateProfileString(sSect, sKeyInd & K_OFFSETCNT, kmItem.dOffsetCnt.ToString(), m_sKitFile)
|
||||
WritePrivateProfileString(sSect, sKeyInd & K_OFFSETCNT, DoubleToString(kmItem.dOffsetCnt, 3), m_sKitFile)
|
||||
WritePrivateProfileString(sSect, sKeyInd & K_ZIGZAGX, kmItem.nZigZagX.ToString(), m_sKitFile)
|
||||
WritePrivateProfileString(sSect, sKeyInd & K_OFFZIGZAGX, kmItem.dOffZigZagX.ToString(), m_sKitFile)
|
||||
WritePrivateProfileString( sSect, sKeyInd & K_STEPX, DoubleToString( kmItem.dStepX, 3), m_sKitFile)
|
||||
WritePrivateProfileString(sSect, sKeyInd & K_OFFZIGZAGX, DoubleToString(kmItem.dOffZigZagX.ToString, 3), m_sKitFile)
|
||||
WritePrivateProfileString(sSect, sKeyInd & K_STEPX, DoubleToString(kmItem.dStepX, 3), m_sKitFile)
|
||||
WritePrivateProfileString(sSect, sKeyInd & K_RADIUSX, DoubleToString(kmItem.dRadiusX, 3), m_sKitFile)
|
||||
WritePrivateProfileString(sSect, sKeyInd & K_DISTANCEX, DoubleToString(kmItem.dDistanceX, 3), m_sKitFile)
|
||||
WritePrivateProfileString(sSect, sKeyInd & K_ZIGZAGY, kmItem.nZigZagY.ToString(), m_sKitFile)
|
||||
WritePrivateProfileString(sSect, sKeyInd & K_OFFZIGZAGY, kmItem.dOffZigZagY.ToString(), m_sKitFile)
|
||||
WritePrivateProfileString( sSect, sKeyInd & K_STEPY, DoubleToString( kmItem.dStepY, 3), m_sKitFile)
|
||||
WritePrivateProfileString( sSect, sKeyInd & K_LILEN, DoubleToString( kmItem.dLiLen, 3), m_sKitFile)
|
||||
WritePrivateProfileString( sSect, sKeyInd & K_LIHEIGHT, DoubleToString( kmItem.dLiHeight, 3), m_sKitFile)
|
||||
WritePrivateProfileString( sSect, sKeyInd & K_LILOAD, DoubleToString( kmItem.dLiLoad, 3), m_sKitFile)
|
||||
WritePrivateProfileString(sSect, sKeyInd & K_OFFZIGZAGY, DoubleToString(kmItem.dOffZigZagY, 3), m_sKitFile)
|
||||
WritePrivateProfileString(sSect, sKeyInd & K_STEPY, DoubleToString(kmItem.dStepY, 3), m_sKitFile)
|
||||
WritePrivateProfileString(sSect, sKeyInd & K_RADIUSY, DoubleToString(kmItem.dRadiusY, 3), m_sKitFile)
|
||||
WritePrivateProfileString(sSect, sKeyInd & K_DISTANCEY, DoubleToString(kmItem.dDistanceY, 3), m_sKitFile)
|
||||
|
||||
WritePrivateProfileString(sSect, sKeyInd & K_SPIRAL, kmItem.nSpiral.ToString(), m_sKitFile)
|
||||
WritePrivateProfileString(sSect, sKeyInd & K_OFFSPIRAL, DoubleToString(kmItem.dOffSpiral.ToString, 3), m_sKitFile)
|
||||
WritePrivateProfileString(sSect, sKeyInd & K_STEPSPIRAL, DoubleToString(kmItem.dStepSpiral, 3), m_sKitFile)
|
||||
WritePrivateProfileString(sSect, sKeyInd & K_RADIUSSPIRAL, DoubleToString(kmItem.dRadiusSpiral, 3), m_sKitFile)
|
||||
WritePrivateProfileString(sSect, sKeyInd & K_DISTANCESPIRAL, DoubleToString(kmItem.dDistanceSpiral, 3), m_sKitFile)
|
||||
|
||||
WritePrivateProfileString(sSect, sKeyInd & K_LILEN, DoubleToString(kmItem.dLiLen, 3), m_sKitFile)
|
||||
WritePrivateProfileString(sSect, sKeyInd & K_LIHEIGHT, DoubleToString(kmItem.dLiHeight, 3), m_sKitFile)
|
||||
WritePrivateProfileString(sSect, sKeyInd & K_LILOAD, DoubleToString(kmItem.dLiLoad, 3), m_sKitFile)
|
||||
Else
|
||||
WritePrivateProfileString( sSect, sKeyInd & K_TOOL, Nothing, m_sKitFile)
|
||||
WritePrivateProfileString( sSect, sKeyInd & K_TOOLNAME, Nothing, m_sKitFile)
|
||||
WritePrivateProfileString( sSect, sKeyInd & K_ACTIVE, Nothing, m_sKitFile)
|
||||
WritePrivateProfileString(sSect, sKeyInd & K_TOOL, Nothing, m_sKitFile)
|
||||
WritePrivateProfileString(sSect, sKeyInd & K_TOOLNAME, Nothing, m_sKitFile)
|
||||
WritePrivateProfileString(sSect, sKeyInd & K_ACTIVE, Nothing, m_sKitFile)
|
||||
WritePrivateProfileString(sSect, sKeyInd & K_CONTOUR, Nothing, m_sKitFile)
|
||||
WritePrivateProfileString(sSect, sKeyInd & K_OFFSETCNT, Nothing, m_sKitFile)
|
||||
WritePrivateProfileString(sSect, sKeyInd & K_ZIGZAGX, Nothing, m_sKitFile)
|
||||
WritePrivateProfileString(sSect, sKeyInd & K_OFFZIGZAGX, Nothing, m_sKitFile)
|
||||
WritePrivateProfileString( sSect, sKeyInd & K_STEPX, Nothing, m_sKitFile)
|
||||
WritePrivateProfileString(sSect, sKeyInd & K_STEPX, Nothing, m_sKitFile)
|
||||
WritePrivateProfileString(sSect, sKeyInd & K_RADIUSX, Nothing, m_sKitFile)
|
||||
WritePrivateProfileString(sSect, sKeyInd & K_DISTANCEX, Nothing, m_sKitFile)
|
||||
WritePrivateProfileString(sSect, sKeyInd & K_ZIGZAGY, Nothing, m_sKitFile)
|
||||
WritePrivateProfileString(sSect, sKeyInd & K_OFFZIGZAGY, Nothing, m_sKitFile)
|
||||
WritePrivateProfileString( sSect, sKeyInd & K_STEPY, Nothing, m_sKitFile)
|
||||
WritePrivateProfileString( sSect, sKeyInd & K_LILEN, Nothing, m_sKitFile)
|
||||
WritePrivateProfileString( sSect, sKeyInd & K_LIHEIGHT, Nothing, m_sKitFile)
|
||||
WritePrivateProfileString( sSect, sKeyInd & K_LILOAD, Nothing, m_sKitFile)
|
||||
WritePrivateProfileString(sSect, sKeyInd & K_STEPY, Nothing, m_sKitFile)
|
||||
WritePrivateProfileString(sSect, sKeyInd & K_RADIUSY, Nothing, m_sKitFile)
|
||||
WritePrivateProfileString(sSect, sKeyInd & K_DISTANCEY, Nothing, m_sKitFile)
|
||||
|
||||
WritePrivateProfileString(sSect, sKeyInd & K_SPIRAL, Nothing, m_sKitFile)
|
||||
WritePrivateProfileString(sSect, sKeyInd & K_OFFSPIRAL, Nothing, m_sKitFile)
|
||||
WritePrivateProfileString(sSect, sKeyInd & K_STEPSPIRAL, Nothing, m_sKitFile)
|
||||
WritePrivateProfileString(sSect, sKeyInd & K_RADIUSSPIRAL, Nothing, m_sKitFile)
|
||||
WritePrivateProfileString(sSect, sKeyInd & K_DISTANCESPIRAL, Nothing, m_sKitFile)
|
||||
|
||||
WritePrivateProfileString(sSect, sKeyInd & K_LILEN, Nothing, m_sKitFile)
|
||||
WritePrivateProfileString(sSect, sKeyInd & K_LIHEIGHT, Nothing, m_sKitFile)
|
||||
WritePrivateProfileString(sSect, sKeyInd & K_LILOAD, Nothing, m_sKitFile)
|
||||
End If
|
||||
Return True
|
||||
End Function
|
||||
|
||||
Private Function EraseKit( nKitIndex As Integer) As Boolean
|
||||
Private Function EraseKit(nKitIndex As Integer) As Boolean
|
||||
' Leggo il nome del kit
|
||||
Dim sKitName As String = ReadKitName( nKitIndex)
|
||||
If String.IsNullOrWhiteSpace( sKitName) Then Return False
|
||||
Dim sKitName As String = ReadKitName(nKitIndex)
|
||||
If String.IsNullOrWhiteSpace(sKitName) Then Return False
|
||||
' Lo elimino dalla lista dei kit scalando tutti di una posizione e eliminando l'ultimo
|
||||
Dim nNextKitIndex As Integer = nKitIndex + 1
|
||||
Dim sNextKitName As String = ReadKitName( nNextKitIndex)
|
||||
while Not String.IsNullOrWhiteSpace( sNextKitName)
|
||||
WriteKitName( nNextKitIndex - 1, sNextKitName)
|
||||
Dim sNextKitName As String = ReadKitName(nNextKitIndex)
|
||||
While Not String.IsNullOrWhiteSpace(sNextKitName)
|
||||
WriteKitName(nNextKitIndex - 1, sNextKitName)
|
||||
nNextKitIndex += 1
|
||||
sNextKitName = ReadKitName( nNextKitIndex)
|
||||
sNextKitName = ReadKitName(nNextKitIndex)
|
||||
End While
|
||||
WriteKitName( nNextKitIndex - 1, Nothing)
|
||||
WriteKitName(nNextKitIndex - 1, Nothing)
|
||||
' Sezione
|
||||
Dim sSect As String = S_KIT & "." & sKitName
|
||||
' Cancello tutte le lavorazioni del kit
|
||||
WritePrivateProfileString( sSect, Nothing, Nothing, m_sKitFile)
|
||||
WritePrivateProfileString(sSect, Nothing, Nothing, m_sKitFile)
|
||||
Return True
|
||||
End Function
|
||||
|
||||
Private Function EraseKitMach( nKitIndex As Integer, nKitMachIndex As Integer) As Boolean
|
||||
Private Function EraseKitMach(nKitIndex As Integer, nKitMachIndex As Integer) As Boolean
|
||||
' Leggo il nome del kit
|
||||
Dim sKitName As String = ReadKitName( nKitIndex)
|
||||
If String.IsNullOrWhiteSpace( sKitName) Then Return False
|
||||
Dim sKitName As String = ReadKitName(nKitIndex)
|
||||
If String.IsNullOrWhiteSpace(sKitName) Then Return False
|
||||
' Lo elimino dali KitMach scalando tutti di una posizione e eliminando l'ultimo
|
||||
Dim kmCurr As KitMach = Nothing
|
||||
Dim nNextKitMachIndex As Integer = nKitMachIndex + 1
|
||||
While ReadKitMach( sKitName, nNextKitMachIndex, kmCurr)
|
||||
While ReadKitMach(sKitName, nNextKitMachIndex, kmCurr)
|
||||
kmCurr.nId = nNextKitMachIndex - 1
|
||||
WriteKitMach( nKitIndex, nNextKitMachIndex - 1, kmCurr)
|
||||
WriteKitMach(nKitIndex, nNextKitMachIndex - 1, kmCurr)
|
||||
nNextKitMachIndex += 1
|
||||
End While
|
||||
WriteKitMach( nKitIndex, nNextKitMachIndex - 1, Nothing)
|
||||
WriteKitMach(nKitIndex, nNextKitMachIndex - 1, Nothing)
|
||||
Return True
|
||||
End Function
|
||||
|
||||
@@ -804,7 +952,7 @@ Class Kit
|
||||
Get
|
||||
Return m_nId
|
||||
End Get
|
||||
Set( value As Integer)
|
||||
Set(value As Integer)
|
||||
m_nId = value
|
||||
End Set
|
||||
End Property
|
||||
@@ -824,7 +972,7 @@ Class Kit
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Sub New( nId As Integer, sName As String)
|
||||
Sub New(nId As Integer, sName As String)
|
||||
m_nId = nId
|
||||
m_sName = sName
|
||||
|
||||
@@ -832,21 +980,21 @@ Class Kit
|
||||
|
||||
End Sub
|
||||
|
||||
Sub New( nId As Integer, sName As String, kitSou As Kit)
|
||||
Sub New(nId As Integer, sName As String, kitSou As Kit)
|
||||
m_nId = nId
|
||||
m_sName = sName
|
||||
|
||||
m_KitMachList = New List(Of KitMach)
|
||||
|
||||
If IsNothing( kitSou) Then Return
|
||||
If IsNothing(kitSou) Then Return
|
||||
|
||||
For Each kmItem As KitMach In kitSou.m_KitMachList
|
||||
AddKitMach( kmItem)
|
||||
AddKitMach(kmItem)
|
||||
Next
|
||||
|
||||
End Sub
|
||||
|
||||
Sub AddKitMach( kitMachItem As KitMach)
|
||||
Sub AddKitMach(kitMachItem As KitMach)
|
||||
m_KitMachList.Add(kitMachItem)
|
||||
End Sub
|
||||
|
||||
@@ -862,15 +1010,29 @@ Class KitMach
|
||||
Private m_sToolName As String
|
||||
Private m_SelTool As Integer
|
||||
Friend Shared m_ToolList As List(Of String)
|
||||
|
||||
Private m_bActive As Boolean
|
||||
Private m_nContour As Integer
|
||||
Private m_dOffsetCnt As Double
|
||||
|
||||
Private m_nZigZagX As Integer
|
||||
Private m_dStepX As Double
|
||||
Private m_dOffZigZagX As Double
|
||||
Private m_dRadiusX As Double
|
||||
Private m_dDistanceX As Double
|
||||
|
||||
Private m_nZigZagY As Integer
|
||||
Private m_dStepY As Double
|
||||
Private m_dOffZigZagY As Double
|
||||
Private m_dRadiusY As Double
|
||||
Private m_dDistanceY As Double
|
||||
|
||||
Private m_nSpiral As Integer
|
||||
Private m_dOffSpiral As Double
|
||||
Private m_dStepSpiral As Double
|
||||
Private m_dRadiusSpiral As Double
|
||||
Private m_dDistanceSpiral As Double
|
||||
|
||||
Private m_dLiLen As Double
|
||||
Private m_dLiHeight As Double
|
||||
Private m_dLiLoad As Double
|
||||
@@ -958,6 +1120,8 @@ Class KitMach
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#Region "Contorno"
|
||||
|
||||
Public m_IsModifiedActive As Boolean = False
|
||||
Public Property bActive As Boolean
|
||||
Get
|
||||
@@ -985,11 +1149,11 @@ Class KitMach
|
||||
End Property
|
||||
|
||||
Public m_IsModifiedOffCnt As Boolean = False
|
||||
Public Property dOffsetCnt As Integer
|
||||
Public Property dOffsetCnt As Double
|
||||
Get
|
||||
Return m_dOffsetCnt
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
Set(value As Double)
|
||||
If value <> m_dOffsetCnt Then
|
||||
m_dOffsetCnt = value
|
||||
m_IsModifiedOffCnt = True
|
||||
@@ -997,6 +1161,10 @@ Class KitMach
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region ' Contorno
|
||||
|
||||
#Region "ZigZag X"
|
||||
|
||||
Public m_IsModifiedZigZagX As Boolean = False
|
||||
Public Property nZigZagX As Integer
|
||||
Get
|
||||
@@ -1011,11 +1179,11 @@ Class KitMach
|
||||
End Property
|
||||
|
||||
Public m_IsModifiedOffZigZagX As Boolean = False
|
||||
Public Property dOffZigZagX As Integer
|
||||
Public Property dOffZigZagX As Double
|
||||
Get
|
||||
Return m_dOffZigZagX
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
Set(value As Double)
|
||||
If value <> m_dOffZigZagX Then
|
||||
m_dOffZigZagX = value
|
||||
m_IsModifiedOffZigZagX = True
|
||||
@@ -1036,6 +1204,36 @@ Class KitMach
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public m_IsModifiedRadiusX As Boolean = False
|
||||
Public Property dRadiusX As Double
|
||||
Get
|
||||
Return m_dRadiusX
|
||||
End Get
|
||||
Set(value As Double)
|
||||
If value <> m_dRadiusX Then
|
||||
m_dRadiusX = value
|
||||
m_IsModifiedRadiusX = True
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public m_IsModifiedDistanceX As Boolean = False
|
||||
Public Property dDistanceX As Double
|
||||
Get
|
||||
Return m_dDistanceX
|
||||
End Get
|
||||
Set(value As Double)
|
||||
If value <> m_dDistanceX Then
|
||||
m_dDistanceX = value
|
||||
m_IsModifiedDistanceX = True
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region ' ZigZag X
|
||||
|
||||
#Region "ZigZag Y"
|
||||
|
||||
Public m_IsModifiedZigZagY As Boolean = False
|
||||
Public Property nZigZagY As Integer
|
||||
Get
|
||||
@@ -1050,11 +1248,11 @@ Class KitMach
|
||||
End Property
|
||||
|
||||
Public m_IsModifiedOffZigZagY As Boolean = False
|
||||
Public Property dOffZigZagY As Integer
|
||||
Public Property dOffZigZagY As Double
|
||||
Get
|
||||
Return m_dOffZigZagY
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
Set(value As Double)
|
||||
If value <> m_dOffZigZagY Then
|
||||
m_dOffZigZagY = value
|
||||
m_IsModifiedOffZigZagY = True
|
||||
@@ -1075,6 +1273,105 @@ Class KitMach
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public m_IsModifiedRadiusY As Boolean = False
|
||||
Public Property dRadiusY As Double
|
||||
Get
|
||||
Return m_dRadiusY
|
||||
End Get
|
||||
Set(value As Double)
|
||||
If value <> m_dRadiusY Then
|
||||
m_dRadiusY = value
|
||||
m_IsModifiedRadiusY = True
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public m_IsModifiedDistanceY As Boolean = False
|
||||
Public Property dDistanceY As Double
|
||||
Get
|
||||
Return m_dDistanceY
|
||||
End Get
|
||||
Set(value As Double)
|
||||
If value <> m_dDistanceY Then
|
||||
m_dDistanceY = value
|
||||
m_IsModifiedDistanceY = True
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region ' ZigZag Y
|
||||
|
||||
#Region "Spirale"
|
||||
|
||||
Public m_IsModifiedSpiral As Boolean = False
|
||||
Public Property nSpiral As Integer
|
||||
Get
|
||||
Return m_nSpiral
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
If value <> m_nSpiral Then
|
||||
m_nSpiral = value
|
||||
m_IsModifiedSpiral = True
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public m_IsModifiedOffSpiral As Boolean = False
|
||||
Public Property dOffSpiral As Double
|
||||
Get
|
||||
Return m_dOffSpiral
|
||||
End Get
|
||||
Set(value As Double)
|
||||
If value <> m_dOffSpiral Then
|
||||
m_dOffSpiral = value
|
||||
m_IsModifiedOffSpiral = True
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public m_IsModifiedStepSpiral As Boolean = False
|
||||
Public Property dStepSpiral As Double
|
||||
Get
|
||||
Return m_dStepSpiral
|
||||
End Get
|
||||
Set(value As Double)
|
||||
If value <> m_dStepSpiral Then
|
||||
m_dStepSpiral = value
|
||||
m_IsModifiedStepSpiral = True
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public m_IsModifiedRadiusSpiral As Boolean = False
|
||||
Public Property dRadiusSpiral As Double
|
||||
Get
|
||||
Return m_dRadiusSpiral
|
||||
End Get
|
||||
Set(value As Double)
|
||||
If value <> m_dRadiusSpiral Then
|
||||
m_dRadiusSpiral = value
|
||||
m_IsModifiedRadiusSpiral = True
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public m_IsModifiedDistanceSpiral As Boolean = False
|
||||
Public Property dDistanceSpiral As Double
|
||||
Get
|
||||
Return m_dDistanceSpiral
|
||||
End Get
|
||||
Set(value As Double)
|
||||
If value <> m_dDistanceSpiral Then
|
||||
m_dDistanceSpiral = value
|
||||
m_IsModifiedDistanceSpiral = True
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region ' Spirale
|
||||
|
||||
#Region "Parametri lavorazione"
|
||||
|
||||
Public m_IsModifiedLiLen As Boolean = False
|
||||
Public Property dLiLen As Double
|
||||
Get
|
||||
@@ -1114,6 +1411,8 @@ Class KitMach
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region ' Parametri lavorazione
|
||||
|
||||
Sub New()
|
||||
m_nId = 0
|
||||
m_SelTool = 0
|
||||
@@ -1125,15 +1424,24 @@ Class KitMach
|
||||
m_nZigZagX = 0
|
||||
m_dOffZigZagX = 0
|
||||
m_dStepX = 0
|
||||
m_dRadiusX = 0
|
||||
m_dDistanceX = 0
|
||||
m_nZigZagY = 0
|
||||
m_dOffZigZagY = 0
|
||||
m_dStepY = 0
|
||||
m_dRadiusY = 0
|
||||
m_dDistanceY = 0
|
||||
m_nSpiral = 0
|
||||
m_dOffSpiral = 0
|
||||
m_dStepSpiral = 0
|
||||
m_dRadiusSpiral = 0
|
||||
m_dDistanceSpiral = 0
|
||||
m_dLiLen = 0
|
||||
m_dLiHeight = 0
|
||||
m_dLiLoad = 0
|
||||
End Sub
|
||||
|
||||
Sub New( nId As Integer)
|
||||
Sub New(nId As Integer)
|
||||
m_nId = nId
|
||||
m_SelTool = 0
|
||||
m_sToolUUID = "---"
|
||||
@@ -1144,17 +1452,26 @@ Class KitMach
|
||||
m_nZigZagX = 0
|
||||
m_dOffZigZagX = 0
|
||||
m_dStepX = 0
|
||||
m_dRadiusX = 0
|
||||
m_dDistanceX = 0
|
||||
m_nZigZagY = 0
|
||||
m_dOffZigZagY = 0
|
||||
m_dStepY = 0
|
||||
m_dRadiusY = 0
|
||||
m_dDistanceY = 0
|
||||
m_nSpiral = 0
|
||||
m_dOffSpiral = 0
|
||||
m_dStepSpiral = 0
|
||||
m_dRadiusSpiral = 0
|
||||
m_dDistanceSpiral = 0
|
||||
m_dLiLen = 0
|
||||
m_dLiHeight = 0
|
||||
m_dLiLoad = 0
|
||||
End Sub
|
||||
|
||||
Sub New( kmSou As KitMach)
|
||||
Sub New(kmSou As KitMach)
|
||||
m_nId = kmSou.nId
|
||||
m_SelTool = kmSou.selTool
|
||||
m_SelTool = kmSou.SelTool
|
||||
m_sToolUUID = kmSou.sToolUUID
|
||||
m_sToolName = kmSou.sToolName
|
||||
m_bActive = kmSou.bActive
|
||||
@@ -1163,9 +1480,18 @@ Class KitMach
|
||||
m_nZigZagX = kmSou.nZigZagX
|
||||
m_dOffZigZagX = kmSou.dOffZigZagX
|
||||
m_dStepX = kmSou.dStepX
|
||||
m_dRadiusX = kmSou.dRadiusX
|
||||
m_dDistanceX = kmSou.dDistanceX
|
||||
m_nZigZagY = kmSou.nZigZagY
|
||||
m_dOffZigZagY = kmSou.dOffZigZagY
|
||||
m_dStepY = kmSou.dStepY
|
||||
m_dRadiusY = kmSou.dRadiusY
|
||||
m_dDistanceY = kmSou.dDistanceY
|
||||
m_nSpiral = kmSou.nSpiral
|
||||
m_dOffSpiral = kmSou.dOffSpiral
|
||||
m_dStepSpiral = kmSou.dStepSpiral
|
||||
m_dRadiusSpiral = kmSou.dRadiusSpiral
|
||||
m_dDistanceSpiral = kmSou.dDistanceSpiral
|
||||
m_dLiLen = kmSou.dLiLen
|
||||
m_dLiHeight = kmSou.dLiHeight
|
||||
m_dLiLoad = kmSou.m_dLiLoad
|
||||
|
||||
@@ -36,7 +36,7 @@ Public Class StatisticsPageUC
|
||||
DayTxBl.Text = sDay
|
||||
' Leggo il numero della settimana
|
||||
Dim nWeek As Integer = GetPrivateProfileInt(S_STATDATA, K_SD_WEEK, -1, m_MainWindow.GetIniFile())
|
||||
WeekTxBl.Text = ( nWeek + 1).ToString()
|
||||
WeekTxBl.Text = (nWeek).ToString()
|
||||
|
||||
' Leggo area pezzi del giorno
|
||||
Dim dDayParts As Double = GetPrivateProfileDouble(S_STATDATA, K_SD_DAYPARTS, 0, m_MainWindow.GetIniFile())
|
||||
|
||||
@@ -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())
|
||||
@@ -506,7 +506,7 @@ Public Class ToolsDbPageUC
|
||||
ToolToExportList.Add(ImpExpToolFamily)
|
||||
Next
|
||||
|
||||
Dim ExportWndVM As New ImportExportToolWindowVM(ToolToExportList)
|
||||
Dim ExportWndVM As New ImportExportToolWindowVM(ToolToExportList, True)
|
||||
Dim ExportWnd As New ImportExportToolWD(Application.Current.MainWindow, ExportWndVM)
|
||||
|
||||
ExportWnd.ShowDialog()
|
||||
@@ -528,7 +528,7 @@ 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 ImpExpToolFamily)
|
||||
' creo famiglie di utensili in base a quelle trovate in lista importata
|
||||
@@ -558,11 +558,12 @@ Public Class ToolsDbPageUC
|
||||
ToolToImportList.Add(NewFamily)
|
||||
End If
|
||||
Next
|
||||
Dim ImportWndVM As New ImportExportToolWindowVM(ToolToImportList, ImportFilePath, ImportFileToolNameList)
|
||||
Dim ImportWndVM As New ImportExportToolWindowVM(ToolToImportList, False, 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
|
||||
@@ -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, 2312, 1, m_nKeyLevel) And
|
||||
EgtGetKeyOptions(9423, 2312, 1, m_nKeyOptions)
|
||||
Dim bKey As Boolean = EgtGetKeyLevel(9423, 2406, 1, m_nKeyLevel) And
|
||||
EgtGetKeyOptions(9423, 2406, 1, m_nKeyOptions)
|
||||
' Verifico abilitazione prodotto
|
||||
Dim bProd As Boolean = GetKeyOption(KEY_OPT.CUT_BASE)
|
||||
' Inizializzazione generale di EgtInterface
|
||||
@@ -569,6 +569,12 @@ Class MainWindow
|
||||
m_CurrentProjectPageUC.m_SceneButtons.MeasureBtn.IsChecked = False
|
||||
' disbilito Test
|
||||
TestOff()
|
||||
' disabilito DragRettangle
|
||||
DragRettangleOff()
|
||||
' disabilito SplitCurv
|
||||
SplitCurvWJOff()
|
||||
' disattivo StartCurv
|
||||
StartCurvWJOff()
|
||||
Select Case m_ActivePage
|
||||
Case Pages.WorkInProgress
|
||||
WorkInProgressBtn.IsChecked = True
|
||||
@@ -625,6 +631,9 @@ Class MainWindow
|
||||
EgtMdbGetGeneralParam(MCH_GP.SAFEZ, DirectCutPageUC.m_dZSafe)
|
||||
m_CurrentProjectPageUC.m_SceneButtons.MeasureBtn.IsChecked = False
|
||||
TestOff()
|
||||
DragRettangleOff()
|
||||
SplitCurvWJOff()
|
||||
StartCurvWJOff()
|
||||
Select Case m_ActivePage
|
||||
Case Pages.WorkInProgress
|
||||
WorkInProgressBtn.IsChecked = False
|
||||
@@ -678,6 +687,9 @@ Class MainWindow
|
||||
Private Sub CadCutBtn_Click(sender As Object, e As RoutedEventArgs) Handles CadCutBtn.Click
|
||||
m_CurrentProjectPageUC.m_SceneButtons.MeasureBtn.IsChecked = False
|
||||
TestOff()
|
||||
DragRettangleOff()
|
||||
SplitCurvWJOff()
|
||||
StartCurvWJOff()
|
||||
Select Case m_ActivePage
|
||||
Case Pages.WorkInProgress
|
||||
WorkInProgressBtn.IsChecked = False
|
||||
@@ -730,6 +742,9 @@ Class MainWindow
|
||||
Private Sub FrameCutBtn_Click(sender As Object, e As RoutedEventArgs) Handles FrameCutBtn.Click
|
||||
m_CurrentProjectPageUC.m_SceneButtons.MeasureBtn.IsChecked = False
|
||||
TestOff()
|
||||
DragRettangleOff()
|
||||
SplitCurvWJOff()
|
||||
StartCurvWJOff()
|
||||
Select Case m_ActivePage
|
||||
Case Pages.WorkInProgress
|
||||
WorkInProgressBtn.IsChecked = False
|
||||
@@ -753,8 +768,8 @@ Class MainWindow
|
||||
m_ActivePage = Pages.FrameCut
|
||||
Case Pages.Photo, Pages.RawPart, Pages.Draw, Pages.Import, Pages.CSV
|
||||
' Pages.Simulation: quando sono nella simulazione devo uscire dalla pagina
|
||||
CadCutBtn.IsChecked = True
|
||||
FrameCutBtn.IsChecked = False
|
||||
CadCutBtn.IsChecked = False
|
||||
FrameCutBtn.IsChecked = True
|
||||
Case Pages.FrameCut
|
||||
FrameCutBtn.IsChecked = True
|
||||
Case Pages.Machine
|
||||
@@ -783,6 +798,9 @@ Class MainWindow
|
||||
Private Sub MachineBtn_Click(sender As Object, e As RoutedEventArgs) Handles MachineBtn.Click
|
||||
m_CurrentProjectPageUC.m_SceneButtons.MeasureBtn.IsChecked = False
|
||||
TestOff()
|
||||
DragRettangleOff()
|
||||
SplitCurvWJOff()
|
||||
StartCurvWJOff()
|
||||
Select Case m_ActivePage
|
||||
Case Pages.WorkInProgress
|
||||
WorkInProgressBtn.IsChecked = False
|
||||
@@ -831,6 +849,9 @@ Class MainWindow
|
||||
Private Sub OptionsBtn_Click(sender As Object, e As RoutedEventArgs) Handles OptionsBtn.Click
|
||||
m_CurrentProjectPageUC.m_SceneButtons.MeasureBtn.IsChecked = False
|
||||
TestOff()
|
||||
DragRettangleOff()
|
||||
SplitCurvWJOff()
|
||||
StartCurvWJOff()
|
||||
Select Case m_ActivePage
|
||||
Case Pages.WorkInProgress
|
||||
WorkInProgressBtn.IsChecked = False
|
||||
@@ -1068,6 +1089,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
|
||||
@@ -1128,9 +1158,15 @@ Class MainWindow
|
||||
Private Sub OnIdle()
|
||||
' Recupero il tipo di progetto
|
||||
Dim nPrjType As Integer = m_CurrentProjectPageUC.GetCurrentProjectType()
|
||||
' Verifico presenza testa H1 per lama/fresa (nel contesto principale)
|
||||
Dim nCurrCtx As Integer = EgtGetCurrentContext()
|
||||
EgtSetCurrentContext(m_CurrentProjectPageUC.CurrentProjectScene.GetCtx())
|
||||
Dim bHeadH1 As Boolean = (EgtGetHeadId("H1") <> GDB_ID.NULL)
|
||||
EgtSetCurrentContext(nCurrCtx)
|
||||
' Aggiorno interfaccia
|
||||
CadCutBtn.IsEnabled = (nPrjType <> CurrentProjectPageUC.PRJ_TYPE.FRAMES)
|
||||
FrameCutBtn.IsEnabled = (nPrjType <> CurrentProjectPageUC.PRJ_TYPE.FLATS)
|
||||
FrameCutBtn.IsEnabled = (nPrjType <> CurrentProjectPageUC.PRJ_TYPE.FLATS) AndAlso bHeadH1
|
||||
' DirectCutBtn.IsEnabled = bHeadH1
|
||||
End Sub
|
||||
|
||||
' Nomi dei file per OmagVIEW
|
||||
@@ -1789,7 +1825,9 @@ Class MainWindow
|
||||
m_CurrentProjectPageUC.SetInfoMessage(EgtMsg(90327)) 'Inseriti Nuovi Pezzi Rovinati
|
||||
Dim nPartId As Integer = EgtGetLastPart()
|
||||
For nI As Integer = 1 To nRuPartsCnt
|
||||
EgtRemoveInfo( nPartId, INFO_PARTOK)
|
||||
EgtRemoveInfo(nPartId, INFO_PARTOK)
|
||||
' ricreo la lista delle famiglie di pezzi presenti in parcheggio
|
||||
m_CadCutPageUC.m_NestPage.GetFamilyGroupInPark()
|
||||
m_CadCutPageUC.m_NestPage.StoreOnePart(nPartId, True)
|
||||
nPartId = EgtGetPrevPart(nPartId)
|
||||
Next
|
||||
@@ -1875,8 +1913,30 @@ 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
|
||||
|
||||
' spegne il comando per la mofica dei rettangoli
|
||||
Public Sub DragRettangleOff()
|
||||
m_CadCutPageUC.m_NestPage.DragRettanleBtn.IsChecked = False
|
||||
Me.m_CadCutPageUC.m_NestPage.m_bIsCheckedDragRettangle = False
|
||||
ShowParkedParts()
|
||||
|
||||
End Sub
|
||||
|
||||
Public Sub SplitCurvWJOff()
|
||||
m_CadCutPageUC.m_NestPage.SplitCurveWJBtn.IsChecked = False
|
||||
Me.m_CadCutPageUC.m_NestPage.m_bIsCheckedSplitCurveWJ = False
|
||||
m_CadCutPageUC.m_NestPage.ResetSplitCurvWJParam()
|
||||
|
||||
End Sub
|
||||
|
||||
Public Sub StartCurvWJOff()
|
||||
m_CadCutPageUC.m_NestPage.StartCurveWJBtn.IsChecked = False
|
||||
Me.m_CadCutPageUC.m_NestPage.m_bIsCheckedStartCurveWJ = False
|
||||
m_CadCutPageUC.m_NestPage.ResetStartCurvWJParam()
|
||||
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.6.2")>
|
||||
<Assembly: AssemblyFileVersion("2.4.6.2")>
|
||||
|
||||
@@ -281,6 +281,14 @@ Public Class CNCommunication
|
||||
m_CN.SetCnDataVar(CN_generico.CnData.LimitZ, sVal)
|
||||
GetPrivateProfileString(S_NCDATA, K_POWEROVR, "", sVal, m_MainWindow.GetMachIniFile())
|
||||
m_CN.SetCnDataVar(CN_generico.CnData.PowerOvr, sVal)
|
||||
|
||||
GetPrivateProfileString(S_NCDATA, K_PARKING, "", sVal, m_MainWindow.GetMachIniFile())
|
||||
m_CN.SetCnDataVar(CN_generico.CnData.Parking, sVal)
|
||||
GetPrivateProfileString(S_NCDATA, K_ENABLEZONE, "", sVal, m_MainWindow.GetMachIniFile())
|
||||
m_CN.SetCnDataVar(CN_generico.CnData.EnableZone, sVal)
|
||||
GetPrivateProfileString(S_NCDATA, K_ENABLEPC, "", sVal, m_MainWindow.GetMachIniFile())
|
||||
m_CN.SetCnDataVar(CN_generico.CnData.EnablePC, sVal)
|
||||
|
||||
GetPrivateProfileString(S_NCDATA, K_VACUUMUP, "", sVal, m_MainWindow.GetMachIniFile())
|
||||
m_CN.SetCnDataVar(CN_generico.CnData.VacuumUp, sVal)
|
||||
GetPrivateProfileString(S_NCDATA, K_VACUUMDOWN, "", sVal, m_MainWindow.GetMachIniFile())
|
||||
@@ -539,6 +547,9 @@ Public Class CNCommunication
|
||||
m_MainWindow.m_DirectCutPageUC.m_ControlsMachineButton.DoorClosedChanged(m_CN.nDoorClosedState)
|
||||
m_MainWindow.m_DirectCutPageUC.m_ControlsMachineButton.LimitZChanged(m_CN.bLimitZState)
|
||||
m_MainWindow.m_DirectCutPageUC.m_ControlsMachineButton.FiveAxisStateChanged(m_CN.Is_G24_active())
|
||||
m_MainWindow.m_DirectCutPageUC.m_ControlsMachineButton.ParkingStateChanged(m_CN.bParkingState)
|
||||
'm_MainWindow.m_DirectCutPageUC.m_ControlsMachineButton.ZoneStateChanged(m_CN.nEnableZone)
|
||||
'm_MainWindow.m_DirectCutPageUC.m_ControlsMachineButton.PcStateChanged(m_CN.nEnablePc)
|
||||
m_MainWindow.m_DirectCutPageUC.m_VacuumMachineButton.VacuumUpChanged(m_CN.bVacuumUp)
|
||||
m_MainWindow.m_DirectCutPageUC.m_VacuumMachineButton.VacuumDownChanged(m_CN.bVacuumDown)
|
||||
m_MainWindow.m_DirectCutPageUC.m_VacuumMachineButton.Vacuum2UpChanged(m_CN.bVacuum2Up)
|
||||
@@ -583,7 +594,12 @@ Public Class CNCommunication
|
||||
m_MainWindow.m_DirectCutPageUC.m_MachineButtons.ThreeAxisStateChanged(True)
|
||||
m_MainWindow.m_DirectCutPageUC.m_MachineButtons.FiveAxisStateChanged(False)
|
||||
End If
|
||||
m_MainWindow.m_WorkInProgressPageUC.m_MachineButtons.DoorStateChanged(m_CN.nDoorClosedState)
|
||||
m_MainWindow.m_DirectCutPageUC.m_MachineButtons.DoorStateChanged(m_CN.nDoorClosedState)
|
||||
m_MainWindow.m_DirectCutPageUC.m_MachineButtons.ParkingStateChanged(m_CN.bParkingState)
|
||||
m_MainWindow.m_DirectCutPageUC.m_MachineButtons.EnableZoneStateChanged(m_CN.nEnableZone)
|
||||
m_MainWindow.m_DirectCutPageUC.m_MachineButtons.EnablePcStateChanged(m_CN.nEnablePc)
|
||||
m_MainWindow.m_DirectCutPageUC.m_MachineButtons.TableUpChanged(m_CN.bTableUpState)
|
||||
m_MainWindow.m_DirectCutPageUC.m_MachineButtons.TableDownChanged(m_CN.bTableDownState)
|
||||
|
||||
' Nuovi bottoni (uso joystick) per Area4
|
||||
If m_IsNewConsole Then
|
||||
@@ -619,6 +635,11 @@ Public Class CNCommunication
|
||||
m_MainWindow.m_WorkInProgressPageUC.m_MachineButtons.FiveAxisStateChanged(False)
|
||||
End If
|
||||
m_MainWindow.m_WorkInProgressPageUC.m_MachineButtons.DoorStateChanged(m_CN.nDoorClosedState)
|
||||
m_MainWindow.m_WorkInProgressPageUC.m_MachineButtons.ParkingStateChanged(m_CN.bParkingState)
|
||||
m_MainWindow.m_WorkInProgressPageUC.m_MachineButtons.EnableZoneStateChanged(m_CN.nEnableZone)
|
||||
m_MainWindow.m_WorkInProgressPageUC.m_MachineButtons.EnablePcStateChanged(m_CN.nEnablePc)
|
||||
m_MainWindow.m_WorkInProgressPageUC.m_MachineButtons.TableUpChanged(m_CN.bTableUpState)
|
||||
m_MainWindow.m_WorkInProgressPageUC.m_MachineButtons.TableDownChanged(m_CN.bTableDownState)
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
@@ -8,7 +8,7 @@ Public MustInherit Class CN_generico
|
||||
Public Const MAX_VAR As Short = 100
|
||||
Public Const MAX_VALUES As Short = 9 ' Max. index to read the data from the FXServer array
|
||||
Public Const MAX_TOOLS As Short = 100
|
||||
Public Const NUM_DATA = 52 ' Numero di dati del CN (Speed,Feed,...)
|
||||
Public Const NUM_DATA = 55 ' Numero di dati del CN (Speed,Feed,...)
|
||||
|
||||
Public m_NewVariable As Boolean = False ' per scrittura delle vairbaili Apllication del PLC
|
||||
|
||||
@@ -66,6 +66,10 @@ Public MustInherit Class CN_generico
|
||||
ZBJog = 49
|
||||
PowerON = 50
|
||||
Remote = 51
|
||||
|
||||
Parking = 52
|
||||
EnableZone = 53
|
||||
EnablePC = 54
|
||||
End Enum
|
||||
|
||||
#End Region
|
||||
@@ -173,6 +177,9 @@ Public MustInherit Class CN_generico
|
||||
Public nDoorClosedState As Integer
|
||||
Public bLimitZState As Boolean
|
||||
Public bPowerOvr As Double
|
||||
Public bParkingState As Boolean
|
||||
Public nEnableZone As Integer
|
||||
Public nEnablePc As Integer
|
||||
Public bHsm As Double
|
||||
Public bVacuumUp As Boolean
|
||||
Public bVacuumDown As Boolean
|
||||
|
||||
@@ -92,7 +92,7 @@ Namespace Num
|
||||
Private Const TIMEOUT As Short = 99
|
||||
Private Const SHORTSLEEPTIME As Short = 10
|
||||
Private Const LONGSLEEPTIME As Short = 40
|
||||
Private Const SHORTSLEEPCOUNT As Short = 20
|
||||
Private Const SHORTSLEEPCOUNT As Short = 100
|
||||
Private Const LONGSLEEPCOUNT As Short = 200
|
||||
|
||||
#End Region
|
||||
@@ -1077,17 +1077,24 @@ Namespace Num
|
||||
Case CnData.VacuumOff ' (45) Stato aspirazione ventose spento
|
||||
bVacuumOff = CBool(values(n))
|
||||
|
||||
Case CnData.XYJog ' (46)
|
||||
Case CnData.XYJog ' (47)
|
||||
bXYJog = CBool(values(n))
|
||||
Case CnData.ZCJog ' (47)
|
||||
Case CnData.ZCJog ' (48)
|
||||
bZCJog = CBool(values(n))
|
||||
Case CnData.ZBJog ' (48)
|
||||
Case CnData.ZBJog ' (49)
|
||||
bZBCJog = CBool(values(n))
|
||||
Case CnData.PowerON ' (49)
|
||||
Case CnData.PowerON ' (50)
|
||||
bPowerON = CBool(values(n))
|
||||
Case CnData.Remote ' (50)
|
||||
Case CnData.Remote ' (51)
|
||||
bRemote = CBool(values(n))
|
||||
|
||||
Case CnData.Parking ' (52)
|
||||
bParkingState = CBool(values(n))
|
||||
Case CnData.EnableZone ' (53)
|
||||
nEnableZone = CInt(values(n))
|
||||
Case CnData.EnablePC ' (54)
|
||||
nEnablePc = CInt(values(n))
|
||||
|
||||
End Select
|
||||
Next
|
||||
|
||||
|
||||
@@ -166,6 +166,9 @@
|
||||
<Compile Include="AboutBox\AboutBoxWD.xaml.vb">
|
||||
<DependentUpon>AboutBoxWD.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="CadCuts\SelectPartFromFamilyWD.xaml.vb">
|
||||
<DependentUpon>SelectPartFromFamilyWD.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="CAM\CamPolishing.vb" />
|
||||
<Compile Include="DirectCuts\Polishing.xaml.vb">
|
||||
<DependentUpon>Polishing.xaml</DependentUpon>
|
||||
@@ -196,9 +199,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>
|
||||
@@ -398,6 +408,10 @@
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="CadCuts\SelectPartFromFamilyWD.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="DirectCuts\Polishing.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
@@ -434,9 +448,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">
|
||||
@@ -1223,6 +1245,22 @@
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\NewIcons\Acquisisci-P.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\Spiral.png" />
|
||||
<Resource Include="Resources\NewIcons\Drag_Rettangle.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\NewIcons\GenerateCN.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\GenerateCN.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\NewIcons\SPLIT-WJ.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\NewIcons\START-WJ.png" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
|
||||
<PropertyGroup>
|
||||
<PostBuildEvent>IF "$(PlatformName)"=="x86" IF "$(ConfigurationName)" == "Release" copy $(TargetPath) c:\EgtProg\OmagCUT\OmagCUTR32.exe
|
||||
|
||||
@@ -46,6 +46,7 @@
|
||||
<BitmapImage x:Key="DownArrowImg" UriSource="Resources/NewIcons/DownArrow.png"></BitmapImage>
|
||||
<BitmapImage x:Key="DrawImg" UriSource="Resources/NewIcons/icone-tagli-3.png"></BitmapImage>
|
||||
<BitmapImage x:Key="FrameMachiningImg" UriSource="Resources/NewIcons/FrameMachining.png"></BitmapImage>
|
||||
<BitmapImage x:Key="GenerateCNImg" UriSource="Resources/NewIcons/GenerateCN.png"></BitmapImage>
|
||||
<BitmapImage x:Key="GenericViewImg" UriSource="Resources/NewIcons/GenericView.png"></BitmapImage>
|
||||
<BitmapImage x:Key="HalfTurnRotateImg" UriSource="Resources/Negative/HalfTurnRotate.png"></BitmapImage>
|
||||
<BitmapImage x:Key="ImportImg" UriSource="Resources/NewIcons/icone-tagli-6.png"></BitmapImage>
|
||||
@@ -105,6 +106,9 @@
|
||||
<BitmapImage x:Key="Elimina-pezzoImg" UriSource="Resources/NewIcons/Elimina-pezzo.png"></BitmapImage>
|
||||
<BitmapImage x:Key="Seleziona-tuttoImg" UriSource="Resources/NewIcons/Seleziona-tutto.png"></BitmapImage>
|
||||
<BitmapImage x:Key="Deseleziona-tuttoImg" UriSource="Resources/NewIcons/Deseleziona-tutto.png"></BitmapImage>
|
||||
<BitmapImage x:Key="Drag_RettangleImg" UriSource="Resources/NewIcons/Drag_Rettangle.png"></BitmapImage>
|
||||
<BitmapImage x:Key="StartWJImg" UriSource="Resources/NewIcons/START-WJ.png"></BitmapImage>
|
||||
<BitmapImage x:Key="SplitWJImg" UriSource="Resources/NewIcons/SPLIT-WJ.png"></BitmapImage>
|
||||
|
||||
<!--Machine-->
|
||||
<BitmapImage x:Key="DatiMacchinaImg" UriSource="Resources/NewIcons/DatiMacchina.png"></BitmapImage>
|
||||
@@ -332,6 +336,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"/>
|
||||
|
||||
@@ -116,6 +116,7 @@
|
||||
<BitmapImage x:Key="DownArrowImg" UriSource="Resources/DownArrow.png"></BitmapImage>
|
||||
<BitmapImage x:Key="DrawImg" UriSource="Resources/Draw.png"></BitmapImage>
|
||||
<BitmapImage x:Key="FrameMachiningImg" UriSource="Resources/FrameMachining.png"></BitmapImage>
|
||||
<BitmapImage x:Key="GenerateCNImg" UriSource="Resources/GenerateCN.png"></BitmapImage>
|
||||
<BitmapImage x:Key="GenericViewImg" UriSource="Resources/GenericView.png"></BitmapImage>
|
||||
<BitmapImage x:Key="HalfTurnRotateImg" UriSource="Resources/HalfTurnRotate.png"></BitmapImage>
|
||||
<BitmapImage x:Key="ImportImg" UriSource="Resources/Import.png"></BitmapImage>
|
||||
@@ -173,6 +174,9 @@
|
||||
<BitmapImage x:Key="Elimina-pezzoImg" UriSource="Resources/NewIcons/Elimina-pezzo.png"></BitmapImage>
|
||||
<BitmapImage x:Key="Seleziona-tuttoImg" UriSource="Resources/NewIcons/Seleziona-tutto.png"></BitmapImage>
|
||||
<BitmapImage x:Key="Deseleziona-tuttoImg" UriSource="Resources/NewIcons/Deseleziona-tutto.png"></BitmapImage>
|
||||
<BitmapImage x:Key="Drag_RettangleImg" UriSource="Resources/NewIcons/Drag_Rettangle.png"></BitmapImage>
|
||||
<BitmapImage x:Key="StartWJImg" UriSource="Resources/NewIcons/START-WJ.png"></BitmapImage>
|
||||
<BitmapImage x:Key="SplitWJImg" UriSource="Resources/NewIcons/SPLIT-WJ.png"></BitmapImage>
|
||||
|
||||
<!--Machine-->
|
||||
<BitmapImage x:Key="DatiMacchinaImg" UriSource="Resources/NewIcons/DatiMacchina.png"></BitmapImage>
|
||||
@@ -470,6 +474,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 +1209,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
|
||||
@@ -181,42 +180,12 @@ Public Class CurrentProjectPageUC
|
||||
EgtInitMachMgr(m_MainWindow.GetMachinesRootDir(), m_MainWindow.GetToolMakersDir())
|
||||
m_bFirst = False
|
||||
|
||||
' ------------------ SELEZIONE AVVIO -----------------------------
|
||||
' apro la finstra di selezione di avvio del programma
|
||||
'StartProgram()
|
||||
' ------------------ SELEZIONE AVVIO -----------------------------
|
||||
|
||||
'' Se richiesto, carico ultimo progetto
|
||||
'Dim bAutoLoadLast As Boolean = GetPrivateProfileInt(S_GENERAL, K_AUTOLOADLASTPROJ, 0, m_MainWindow.GetIniFile()) <> 0
|
||||
'If bAutoLoadLast Then
|
||||
' m_nCurrProj = GetPrivateProfileInt(S_GENERAL, K_LASTPROJ, 0, m_MainWindow.GetIniFile())
|
||||
' Dim sPath As String = m_MainWindow.GetSaveDir() & "\" & m_nCurrProj.ToString("D4") & ".nge"
|
||||
' If Not LoadProject(sPath, False) Then
|
||||
' NewProject()
|
||||
' End If
|
||||
' EgtResetModified()
|
||||
' 'Altrimenti ne imposto uno nuovo
|
||||
'Else
|
||||
' m_nCurrProj = GetPrivateProfileInt(S_GENERAL, K_LASTPROJ, 0, m_MainWindow.GetIniFile())
|
||||
' NewProject()
|
||||
'End If
|
||||
|
||||
' creo nuovo progetto
|
||||
m_nCurrProj = GetPrivateProfileInt(S_GENERAL, K_LASTPROJ, 0, m_MainWindow.GetIniFile())
|
||||
'NewProject()
|
||||
|
||||
' Nascondo progress per fotografia
|
||||
PhotoProgress.Visibility = Windows.Visibility.Hidden
|
||||
' Carico sottopagina opportuna
|
||||
If GetProjectType() <> PRJ_TYPE.FRAMES Then
|
||||
CurrentProjectPageGrid.Children.Add(m_MainWindow.m_CadCutPageUC)
|
||||
m_MainWindow.m_ActivePage = MainWindow.Pages.CadCut
|
||||
m_MainWindow.CadCutBtn.IsChecked = True
|
||||
Else
|
||||
CurrentProjectPageGrid.Children.Add(m_MainWindow.m_FrameCutPageUC)
|
||||
m_MainWindow.m_ActivePage = MainWindow.Pages.FrameCut
|
||||
m_MainWindow.FrameCutBtn.IsChecked = True
|
||||
End If
|
||||
|
||||
Else
|
||||
EgtSetCurrentContext(CurrentProjectScene.GetCtx())
|
||||
@@ -275,8 +244,10 @@ Public Class CurrentProjectPageUC
|
||||
m_MainWindow.MainWindowGrid.Children.Remove(m_MainWindow.m_CurrentProjectPageUC)
|
||||
m_MainWindow.MainWindowGrid.Children.Add(m_MainWindow.m_OpenPage)
|
||||
m_MainWindow.m_ActivePage = MainWindow.Pages.Open
|
||||
' inizializzo gli oggetti della pagina (non passo dalla funzione Load!)
|
||||
m_MainWindow.m_CadCutPageUC.m_ProjectMgr.SetReference()
|
||||
|
||||
' seleziono il file dalla lista della finestra (= 4)
|
||||
' seleziono il file dalla lista della finestra (= 4)
|
||||
ElseIf MyStartLancherWD.CurrSelection = MODE_LAUNCHER.SelectedProject Then
|
||||
NewProject()
|
||||
Dim sCurrDir As String = Path.GetDirectoryName(MyStartLancherWD.SelPath)
|
||||
@@ -305,6 +276,21 @@ Public Class CurrentProjectPageUC
|
||||
End If
|
||||
End If
|
||||
|
||||
' se apro la finestra "OpenFolder" l'assegnazione dei Children è fatta direttamente nella classe ProjectMgrUC
|
||||
If MyStartLancherWD.CurrSelection <> MODE_LAUNCHER.OpenFolder Then
|
||||
' Carico sottopagina opportuna
|
||||
If GetProjectType() <> PRJ_TYPE.FRAMES Then
|
||||
CurrentProjectPageGrid.Children.Add(m_MainWindow.m_CadCutPageUC)
|
||||
m_MainWindow.m_ActivePage = MainWindow.Pages.CadCut
|
||||
m_MainWindow.CadCutBtn.IsChecked = True
|
||||
Else
|
||||
CurrentProjectPageGrid.Children.Add(m_MainWindow.m_FrameCutPageUC)
|
||||
m_MainWindow.m_ActivePage = MainWindow.Pages.FrameCut
|
||||
m_MainWindow.FrameCutBtn.IsChecked = True
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
' questo metodo è direttamente richiamato in caso di selezione della regione sinistra della pagina
|
||||
@@ -328,12 +314,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 +603,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
|
||||
@@ -873,7 +856,7 @@ Public Class CurrentProjectPageUC
|
||||
|
||||
Friend Function UpdateSideAngCutProbeFlag() As Boolean
|
||||
Dim bCurrSacProbe As Boolean =
|
||||
(GetPrivateProfileInt(S_MACH_NEST, K_MACH_SACPROBE, 0, m_MainWindow.GetMachIniFile()) <> 0)
|
||||
(GetPrivateProfileInt(S_MACH_NEST, K_MACH_SACPROBE, 0, m_MainWindow.GetMachIniFile()) <> 0) AndAlso m_MainWindow.m_CurrentMachine.IsRawProbingPossible()
|
||||
Dim bProjSacProbe As Boolean = GetSideAngCutProbeFlag()
|
||||
If bCurrSacProbe <> bProjSacProbe Then Return SetSideAngCutProbeFlag(bCurrSacProbe)
|
||||
Return True
|
||||
|
||||
@@ -34,9 +34,7 @@ Public Class ProjectMgrUC
|
||||
|
||||
Private Sub ProjectMgrUC_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded
|
||||
' Impostazioni
|
||||
m_CurrProjPage = m_MainWindow.m_CurrentProjectPageUC
|
||||
m_CurrMachine = m_MainWindow.m_CurrentMachine
|
||||
m_CurrNcComm = m_MainWindow.m_CNCommunication
|
||||
SetReference()
|
||||
|
||||
' Se richiesto carico finestra per VeinMatching e ultimo intarsio
|
||||
If m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.MAN_PHOTO) And
|
||||
@@ -55,6 +53,12 @@ Public Class ProjectMgrUC
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Public Sub SetReference()
|
||||
m_CurrProjPage = m_MainWindow.m_CurrentProjectPageUC
|
||||
m_CurrMachine = m_MainWindow.m_CurrentMachine
|
||||
m_CurrNcComm = m_MainWindow.m_CNCommunication
|
||||
End Sub
|
||||
|
||||
Private Sub NewBtn_Click(sender As Object, e As RoutedEventArgs) Handles NewBtn.Click
|
||||
EgtSetCurrentContext(m_CurrProjPage.CurrentProjectScene.GetCtx())
|
||||
m_CurrProjPage.m_SceneButtons.MeasureBtn.IsChecked = False
|
||||
@@ -248,6 +252,10 @@ Public Class ProjectMgrUC
|
||||
EgtSetCurrentContext(m_CurrProjPage.CurrentProjectScene.GetCtx())
|
||||
' Cancello eventuali messaggi
|
||||
m_CurrProjPage.ClearMessage()
|
||||
' cancello tutti i tagli di separazione (Waterjet)
|
||||
ResetAllSplitCurv()
|
||||
' cancello tutti i punti di inizio (Waterjet)
|
||||
ResetAllStartCurv()
|
||||
' Ricalcolo tutte le lavorazioni
|
||||
Dim nWarn As Integer = 0
|
||||
ResetAllMachinings(nWarn)
|
||||
@@ -276,7 +284,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 +344,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)
|
||||
@@ -349,6 +357,14 @@ Public Class ProjectMgrUC
|
||||
Return
|
||||
End If
|
||||
' ---------------------------- Fine modalità test --------------------------------------------
|
||||
' se esiste salvo il nome del progetto
|
||||
Dim sCurrProjName As String = String.Empty
|
||||
GetPrivateProfileString(S_GENERAL, K_LASTNAMEPROJ, "", sCurrProjName, m_MainWindow.GetIniFile())
|
||||
If Not String.IsNullOrEmpty(sCurrProjName) Then
|
||||
EgtSetInfo(EgtGetFirstNameInGroup(GDB_ID.ROOT, NAME_PROJMARK), INFO_PROJNAME, sCurrProjName)
|
||||
Else
|
||||
EgtRemoveInfo(EgtGetFirstNameInGroup(GDB_ID.ROOT, NAME_PROJMARK), INFO_PROJNAME)
|
||||
End If
|
||||
|
||||
Dim bOk As Boolean = True
|
||||
EgtSetCurrentContext(m_CurrProjPage.CurrentProjectScene.GetCtx())
|
||||
@@ -466,20 +482,15 @@ Public Class ProjectMgrUC
|
||||
' se abilitato e non è restart, lancio eventuale lua post-trasmissione
|
||||
If m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.SIMPLESTATISTICS) And nPhaseRestart = 0 Then
|
||||
m_MainWindow.ExecSentProgScript(False)
|
||||
''-------------------Avvio il Ciclo-Start-------------------------
|
||||
'Dim MyCicloStartWD As New CicloStartWD(m_MainWindow)
|
||||
'MyCicloStartWD.ShowDialog()
|
||||
''-------------------Avvio il Ciclo-Start-------------------------
|
||||
End If
|
||||
End If
|
||||
|
||||
'-------------------Avvio il Ciclo-Start-------------------------
|
||||
If GetPrivateProfileInt(S_GENERAL, "StartProgram", 0, m_MainWindow.GetIniFile()) <> 0 Then
|
||||
'------------------- INIZIO Avvio il Ciclo-Start-------------------------
|
||||
If GetPrivateProfileInt(S_GENERAL, K_STARTPROGRAM, 0, m_MainWindow.GetIniFile()) <> 0 Then
|
||||
Dim MyCicloStartWD As New CicloStartWD(m_MainWindow)
|
||||
MyCicloStartWD.ShowDialog()
|
||||
End If
|
||||
|
||||
'-------------------Avvio il Ciclo-Start-------------------------
|
||||
'------------------- FINE Avvio il Ciclo-Start-------------------------
|
||||
|
||||
' Altrimenti linea di produzione
|
||||
Else
|
||||
@@ -736,13 +747,13 @@ 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)
|
||||
EgtResetMark(m_MainWindow.m_CadCutPageUC.m_NestPage.m_CurrSelectedSawCurv)
|
||||
End If
|
||||
' aggiorno il disegno
|
||||
EgtDraw()
|
||||
|
||||
@@ -287,7 +287,6 @@ Public Class Camera
|
||||
Public Function CameraClick() As Boolean
|
||||
' Verifiche preliminari
|
||||
Dim nInd As Integer = PrepareCamera()
|
||||
If nInd = 0 Then Return False
|
||||
' Visualizzo progressbar
|
||||
m_bBusy = True
|
||||
m_MainWindow.m_CurrentProjectPageUC.PhotoProgress.Visibility = Visibility.Visible
|
||||
@@ -308,6 +307,30 @@ Public Class Camera
|
||||
End If
|
||||
Catch ex As Exception
|
||||
End Try
|
||||
|
||||
' ------------------------------------ accensione riflettori ------------------------------------
|
||||
Dim sPLCVarSpotLight1 As String = String.Empty
|
||||
GetPrivateProfileString(S_NCDATA, K_SPOTLIGHT1, "", sPLCVarSpotLight1, m_MainWindow.GetMachIniFile())
|
||||
Dim sPLCVarSpotLight2 As String = String.Empty
|
||||
GetPrivateProfileString(S_NCDATA, K_SPOTLIGHT2, "", sPLCVarSpotLight2, m_MainWindow.GetMachIniFile())
|
||||
Dim nPhotoDeley As Integer = GetPrivateProfileInt(S_NCNUM, K_PHOTODELEY, "100", m_MainWindow.GetMachIniFile())
|
||||
|
||||
Select Case m_MainWindow.m_CNCommunication.m_nNCType
|
||||
Case 1, 2
|
||||
If m_MainWindow.m_CNCommunication.m_nNCType = 2 Then
|
||||
' solo per Flexium
|
||||
m_MainWindow.m_CNCommunication.m_CN.DPlcVariables_WriteVariables(If(nInd <> 2, sPLCVarSpotLight1, sPLCVarSpotLight2), "1")
|
||||
' altrimenti scrittura delle variabili E
|
||||
Else
|
||||
m_MainWindow.m_CNCommunication.m_CN.DVariables_WriteVariables2(If(nInd <> 2, sPLCVarSpotLight1, sPLCVarSpotLight2), "1")
|
||||
End If
|
||||
System.Threading.Thread.Sleep(nPhotoDeley)
|
||||
Case 3
|
||||
' SIEMENS
|
||||
End Select
|
||||
|
||||
' ------------------------------------ accensione riflettori ------------------------------------
|
||||
|
||||
' Scatto una foto con eventuale riconoscimento del contorno (il programma deve essere già attivo)
|
||||
Dim bOk As Boolean = False
|
||||
Dim sArgs As String = "2 0"
|
||||
|
||||
@@ -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,9 +140,9 @@ 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
|
||||
m_SmartMachiningPage = GetPrivateProfileInt(S_GENERAL, K_SMARTMACHININGPAGE, 0, m_MainWindow.GetIniFile()) <> 0
|
||||
|
||||
' Imposto i messaggi letti dal file dei messaggi
|
||||
OutlineBtn.Content = EgtMsg(MSG_RAWPARTPAGEUC + 33) 'Rectangle - Rettangolo
|
||||
@@ -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
|
||||
|
||||
|
After Width: | Height: | Size: 9.5 KiB |
|
After Width: | Height: | Size: 1.6 KiB |
|
After Width: | Height: | Size: 9.5 KiB |
|
After Width: | Height: | Size: 8.9 KiB |
|
After Width: | Height: | Size: 2.0 KiB |
|
Before Width: | Height: | Size: 8.7 KiB After Width: | Height: | Size: 6.4 KiB |
|
After Width: | Height: | Size: 863 B |
@@ -240,6 +240,9 @@
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Button Name="GenerateCN_Btn" Grid.Column="1" Style="{DynamicResource OmagCut_GradientBlueIconButton}" Click="GenerateXPIUC_Click">
|
||||
<Image Source="{DynamicResource GenerateCNImg}" Style="{StaticResource OmagCut_ButtonIcon}" />
|
||||
</Button>
|
||||
<Button Grid.Column="2" Style="{DynamicResource OmagCut_GradientBlueIconButton}" Click="ExitBtnUC_Click">
|
||||
<Image Source="{DynamicResource VImg}" Style="{StaticResource OmagCut_ButtonIcon}" />
|
||||
</Button>
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
Imports System.Runtime.InteropServices
|
||||
Imports EgtUILib
|
||||
Imports EgtWPFLib
|
||||
|
||||
Public Class SimulationPageUC
|
||||
' Riferimenti a pagine
|
||||
@@ -76,6 +77,12 @@ Public Class SimulationPageUC
|
||||
End If
|
||||
' Pulsante Play
|
||||
PlayPauseImage.Source = New System.Windows.Media.Imaging.BitmapImage(New Uri("/Resources/Play.png", UriKind.Relative))
|
||||
' abilito la visualizzazione del pulsante per la sola generazione del codice CN
|
||||
If GetPrivateProfileInt(S_GENERAL, K_GENERATECN, 0, m_MainWindow.GetIniFile()) <> 0 Then
|
||||
GenerateCN_Btn.Visibility = Visibility.Visible
|
||||
Else
|
||||
GenerateCN_Btn.Visibility = Visibility.Hidden
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub SimulationPage_Loaded(sender As Object, e As RoutedEventArgs)
|
||||
@@ -559,6 +566,111 @@ Public Class SimulationPageUC
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub GenerateXPIUC_Click(sender As Object, e As RoutedEventArgs)
|
||||
Dim bOk As Boolean = True
|
||||
EgtSetCurrentContext(m_CurrProjPage.CurrentProjectScene.GetCtx())
|
||||
' Elimino eventuale attrezzaggio da OmagOFFICE
|
||||
EgtEraseCurrSetup()
|
||||
' Verifico l'attrezzaggio degli utensili utilizzati
|
||||
Dim sMissingTools As String = String.Empty
|
||||
If Not VerifySetup(sMissingTools) Then
|
||||
m_CurrProjPage.SetErrorMessage(EgtMsg(90322) & " " & sMissingTools) 'Mancano gli utensili : ...
|
||||
Return
|
||||
End If
|
||||
' Costringo ad aggiornare UI
|
||||
UpdateUI()
|
||||
' Aggiorno flag per lavaggio
|
||||
m_CurrProjPage.UpdateWashingFlag()
|
||||
' Aggiorno flag per tastatura per tagli con angolo di fianco
|
||||
m_CurrProjPage.UpdateSideAngCutProbeFlag()
|
||||
' Se pezzi piani e non c'è ordine delle lavorazioni, ricalcolo tutto e ne faccio uno automatico
|
||||
Dim nPrjType As Integer = m_CurrProjPage.GetCurrentProjectType()
|
||||
Dim bDirectCut As Boolean = (GetDirectCutPart() <> GDB_ID.NULL)
|
||||
If nPrjType = CurrentProjectPageUC.PRJ_TYPE.FLATS And
|
||||
Not bDirectCut And
|
||||
Not m_CurrProjPage.GetOrderMachiningFlag() Then
|
||||
ResetAllMachinings()
|
||||
bOk = SortAllMachinings()
|
||||
If bOk Then
|
||||
m_CurrProjPage.SetOrderMachiningFlag()
|
||||
Dim bModif As Boolean = TestAllMachiningsForStrict()
|
||||
If bModif Then
|
||||
m_CurrProjPage.SetWarningMessage(EgtMsg(90321)) 'Ridotte alcune lavorazioni per evitare interferenze
|
||||
Else
|
||||
m_CurrProjPage.SetInfoMessage(EgtMsg(90399)) 'Aggiornate tutte le lavorazioni
|
||||
End If
|
||||
EgtDraw()
|
||||
End If
|
||||
End If
|
||||
' Costringo ad aggiornare UI
|
||||
UpdateUI()
|
||||
' Disabilito impostazione modificato
|
||||
EgtDisableModified()
|
||||
' Aggiorno le lavorazioni
|
||||
bOk = UpdateAllMachiningsToolpaths() And bOk
|
||||
' Aggiorno posizionamento ventose sui pezzi per eventuali tagli da sotto con lama
|
||||
bOk = UpdateVacuumsForDrip() And bOk
|
||||
' Costringo ad aggiornare UI
|
||||
UpdateUI()
|
||||
' Inserisco indice di progetto
|
||||
m_CurrProjPage.SetProjectIndexFlag()
|
||||
' Inserisco il materiale
|
||||
m_CurrProjPage.SetProjectMaterial()
|
||||
' Salvo il progetto con le lavorazioni
|
||||
Dim sMchPath As String = m_MainWindow.GetTempDir() & "\MachProj.nge"
|
||||
m_CurrProjPage.SaveFile(sMchPath)
|
||||
' Costringo ad aggiornare UI
|
||||
UpdateUI()
|
||||
' Se modalità Ufficio, copio il progetto ed esco
|
||||
If m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.OFFICE_TYPE) Then
|
||||
' Ripristino come fase corrente quella iniziale
|
||||
EgtSetCurrPhase(1)
|
||||
' Chiedo il nome del file esportato
|
||||
Dim MySaveNameWD As New SaveNameWD(m_MainWindow, SaveNameWD.SAVE_TYPE.PRJ_COPY)
|
||||
MySaveNameWD.ShowDialog()
|
||||
Return
|
||||
End If
|
||||
' Se presente ripartenza, ne chiedo conferma
|
||||
Dim nPhaseRestart As Integer = m_CurrProjPage.GetProjectNcRestart()
|
||||
If nPhaseRestart <> 0 Then
|
||||
' Confermi ripartenza dalla fase NNN ?
|
||||
Dim AskNcRestart As New EgtMsgBox(m_MainWindow, "", String.Format(EgtMsg(90326), nPhaseRestart),
|
||||
EgtMsgBox.Buttons.YES_NO_CANCEL, EgtMsgBox.Icons.NULL, 2)
|
||||
Select Case AskNcRestart.m_nPressedBtn
|
||||
Case 1 ' YES
|
||||
Case 2 ' NO
|
||||
EgtEnableModified()
|
||||
m_CurrProjPage.ResetProjectNcRestart()
|
||||
nPhaseRestart = 0
|
||||
EgtDisableModified()
|
||||
Case Else ' CANCEL
|
||||
Return
|
||||
End Select
|
||||
End If
|
||||
' Se abilitate, eseguo le stime
|
||||
If GetPrivateProfileInt(S_MACH_ESTIMATIONS, K_ENABLEEST, 0, m_MainWindow.GetMachIniFile()) <> 0 Then
|
||||
EgtEstimate(m_MainWindow.GetTempDir() & "\MachProj.html", "OmagCut ver." & m_MainWindow.GetVersion())
|
||||
End If
|
||||
' Genero file CNC (lancio anche se errore in precedenza) -> recupero la tavola corrente! CamAuto.GetCurrentTable()
|
||||
Dim nIndexTab As Integer = CamAuto.GetCurrentTable()
|
||||
Dim sIndexTab As String = String.Empty
|
||||
If nIndexTab > 0 Then
|
||||
sIndexTab = nIndexTab.ToString
|
||||
End If
|
||||
Dim sFileName As String = "CadCut" & sIndexTab
|
||||
Dim sCncPath As String = m_MainWindow.GetCncDir() & "\" & sFileName & m_MainWindow.m_CurrentMachine.sIsoFileExt
|
||||
bOk = EgtGenerate(sCncPath, "OmagCut ver." & m_MainWindow.GetVersion()) And bOk
|
||||
' Costringo ad aggiornare UI
|
||||
UpdateUI()
|
||||
' Ripristino come fase corrente quella iniziale
|
||||
EgtSetCurrPhase(1)
|
||||
If bOk Then
|
||||
m_CurrProjPage.SetInfoMessage("Genarato file " & sFileName & m_MainWindow.m_CurrentMachine.sIsoFileExt)
|
||||
Else
|
||||
m_CurrProjPage.SetErrorMessage(EgtMsg(90314)) 'Errore nella generazione del programma CN
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Function ProcessEvents(nProg As Integer, nPause As Integer) As Integer
|
||||
' Visualizzo assi
|
||||
ShowCncData()
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
Imports System.Globalization
|
||||
Imports System.Collections.ObjectModel
|
||||
Imports EgtUILib
|
||||
|
||||
Module Utility
|
||||
@@ -59,6 +60,69 @@ Module Utility
|
||||
End If
|
||||
End Function
|
||||
|
||||
#Region "PreGuidCode"
|
||||
|
||||
' recupero i primi 5 caratteri della stringa
|
||||
Friend Function GetPreGuidCode(sGuidCode As String) As String
|
||||
If sGuidCode.Count > 5 Then
|
||||
Return sGuidCode(0) & sGuidCode(1) & sGuidCode(2) & sGuidCode(3) & sGuidCode(4)
|
||||
End If
|
||||
Return String.Empty
|
||||
End Function
|
||||
|
||||
' sostituisce i primi 5 caratteri della stringa con qualle passata
|
||||
Friend Function UppDateGuidCode(ByRef sGuidCode As String, sPreGuidCode As String) As Boolean
|
||||
If sPreGuidCode.Count = 5 Then
|
||||
sGuidCode = sGuidCode.Remove(0, 5)
|
||||
sGuidCode = sPreGuidCode & sGuidCode
|
||||
Return True
|
||||
End If
|
||||
Return False
|
||||
End Function
|
||||
|
||||
' restituisce 5 caratteri
|
||||
Friend Function CreatePreGuidCode(nId As Integer) As String
|
||||
' recupero il frame dell'oggetto
|
||||
Dim frGlobFrame As New Frame3d
|
||||
If Not EgtGetGroupGlobFrame(nId, frGlobFrame) Then
|
||||
Return String.Empty
|
||||
End If
|
||||
' recupero il suo versore
|
||||
Dim vtX As Vector3d = frGlobFrame.VersX
|
||||
Dim Len As Double
|
||||
Dim AngV As Double
|
||||
Dim AngH As Double
|
||||
vtX.ToSpherical(Len, AngV, AngH)
|
||||
' costruisco il codice (6 caratteri!) che identifica la posizione del pezzo in parcheggio
|
||||
Dim sPreGuid As String = GetDirectionCode(AngH)
|
||||
Return sPreGuid
|
||||
End Function
|
||||
|
||||
Friend Function GetDirectionCode(dVal As Double) As String
|
||||
Dim bIsNegative As Boolean = False
|
||||
If dVal < 0 Then
|
||||
dVal = dVal + (-1)
|
||||
bIsNegative = True
|
||||
End If
|
||||
Dim sVal As String = DoubleToString(dVal * 1000, 0)
|
||||
Dim nCount As Integer = sVal.Count
|
||||
For Index As Integer = 1 To 4 - nCount
|
||||
sVal = "0" & sVal
|
||||
Next
|
||||
Dim vVal As Char() = {"+", "1", "0", "0", "0"}
|
||||
If bIsNegative Then
|
||||
vVal = {"-"c, sVal(0), sVal(1), sVal(2), sVal(3)}
|
||||
Else
|
||||
vVal = {"+"c, sVal(0), sVal(1), sVal(2), sVal(3)}
|
||||
End If
|
||||
' ricostruisco la stringa dotata di segno
|
||||
sVal = vVal(0) & vVal(1) & vVal(2) & vVal(3) & vVal(4)
|
||||
Return sVal
|
||||
End Function
|
||||
|
||||
#End Region ' PreGiudCode
|
||||
|
||||
|
||||
Friend Function UIExprToExpr(sUIExpr As String) As String
|
||||
If String.IsNullOrWhiteSpace(sUIExpr) Then
|
||||
Return ""
|
||||
@@ -273,4 +337,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
|
||||
|
||||
@@ -201,6 +201,9 @@ Public Class WorkInProgressPageUC
|
||||
End If
|
||||
EgtSetCurrPhase(nCurrPhase, True)
|
||||
EgtDraw()
|
||||
' Tempo di ritardo nel ciclo
|
||||
Dim nTimeStep As Integer = 50
|
||||
nTimeStep = GetPrivateProfileInt(S_MACH_INPROGRESS, K_WP_STEPTIME, nTimeStep, m_MainWindow.GetMachIniFile())
|
||||
' Ciclo
|
||||
While m_bContinue
|
||||
' Rileggo la variabile di fase
|
||||
@@ -233,7 +236,7 @@ Public Class WorkInProgressPageUC
|
||||
EgtDraw()
|
||||
End If
|
||||
' Per evitare di ciclare rapidissimamente e consumare inutilmente CPU
|
||||
System.Threading.Thread.Sleep(10)
|
||||
System.Threading.Thread.Sleep(nTimeStep)
|
||||
' Leggo la fase
|
||||
If m_MainWindow.m_CNCommunication.m_CN.n_DReadELS_handle = 3 Then
|
||||
m_MainWindow.m_CNCommunication.m_CN.n_DReadELS_handle = 0
|
||||
|
||||