Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 9b0e464e4b |
@@ -36,7 +36,7 @@
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Border Name="LogoBrd" Grid.Column="1">
|
||||
<Image Source="../Resources/NewIcons/Logo-Egalware (3).png" Stretch="Uniform"/>
|
||||
<Image Source="../Resources/AboutBoxImage.png" Stretch="Uniform"/>
|
||||
</Border>
|
||||
</Grid>
|
||||
<TextBlock Name="DescriptionLbl" Grid.Column="1" Grid.Row="3" HorizontalAlignment="Center"
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
Imports System.Windows.Forms.Integration
|
||||
Imports EgtUILib
|
||||
Imports EgtWPFLib5
|
||||
|
||||
Friend Module CamAuto
|
||||
|
||||
@@ -23,54 +22,14 @@ Friend Module CamAuto
|
||||
bOk = bOk AndAlso EgtLuaCallFunction("CAM.Add")
|
||||
EgtLuaGetGlobIntVar("CAM.ERR", nErr)
|
||||
EgtLuaResetGlobVar("CAM")
|
||||
If nErr > 0 Then
|
||||
If nErr <> 0 Then
|
||||
bOk = False
|
||||
EgtOutLog("Error in CamAuto : " & nErr.ToString())
|
||||
ElseIf nErr < 0 Then
|
||||
EgtOutLog("Warning in CamAuto : " & nErr.ToString())
|
||||
m_MainWindow.m_CurrentProjectPageUC.SetWarningMessage(EgtMsg(91017))
|
||||
End If
|
||||
m_MainWindow.m_CurrentProjectPageUC.ResetOrderMachiningFlag()
|
||||
Return bOk
|
||||
End Function
|
||||
|
||||
Friend Function AddSawMachining(nOperId As Integer, ByRef nNewOperation As Integer) As Boolean
|
||||
EgtLuaCreateGlobTable("CAM")
|
||||
SetLuaStandardCamParams()
|
||||
EgtLuaSetGlobIntVar("CAM.OPERID", nOperId)
|
||||
Dim nErr As Integer = 999
|
||||
Dim bOk As Boolean = EgtLuaExecFile(m_MainWindow.GetCamAutoDir() & "\CamAuto.lua")
|
||||
bOk = bOk AndAlso EgtLuaGetGlobIntVar("CAM.ERR", nErr) AndAlso nErr = 0
|
||||
bOk = bOk AndAlso EgtLuaCallFunction("CAM.UpdateSawing")
|
||||
EgtLuaGetGlobIntVar("CAM.ERR", nErr)
|
||||
EgtLuaGetGlobIntVar("CAM.NEW_OPERATION", nNewOperation)
|
||||
EgtLuaResetGlobVar("CAM")
|
||||
If nErr <> 0 Then
|
||||
bOk = False
|
||||
EgtOutLog("Error in CamAuto : " & nErr.ToString())
|
||||
m_MainWindow.m_CurrentProjectPageUC.ClearMessage()
|
||||
End If
|
||||
Return bOk
|
||||
End Function
|
||||
|
||||
Friend Function ChangePvColor(nOperId As Integer, colCut As Color3d)
|
||||
EgtLuaCreateGlobTable("CAM")
|
||||
SetLuaStandardCamParams()
|
||||
EgtLuaSetGlobIntVar("CAM.OPERID", nOperId)
|
||||
Dim nErr As Integer = 999
|
||||
Dim bOk As Boolean = EgtLuaExecFile(m_MainWindow.GetCamAutoDir() & "\CamAuto.lua")
|
||||
bOk = bOk AndAlso EgtLuaGetGlobIntVar("CAM.ERR", nErr) AndAlso nErr = 0
|
||||
bOk = bOk AndAlso EgtLuaExecLine("CAM.ChangePvColor( " & nOperId.ToString & ",Color3d(" & colCut.R.ToString & "," & colCut.G.ToString & "," & colCut.B.ToString & "))")
|
||||
EgtLuaGetGlobIntVar("CAM.ERR", nErr)
|
||||
EgtLuaResetGlobVar("CAM")
|
||||
If nErr <> 0 Then
|
||||
bOk = False
|
||||
EgtOutLog("Error in CamAuto : " & nErr.ToString())
|
||||
m_MainWindow.m_CurrentProjectPageUC.ClearMessage()
|
||||
End If
|
||||
Return bOk
|
||||
End Function
|
||||
|
||||
Friend Function AddWaterJetMachining(nOperId As Integer, ByRef nWarn As Integer) As Boolean
|
||||
EgtLuaCreateGlobTable("CAM")
|
||||
SetLuaStandardCamParams()
|
||||
@@ -81,34 +40,9 @@ Friend Module CamAuto
|
||||
bOk = bOk AndAlso EgtLuaCallFunction("CAM.AddWaterJet")
|
||||
EgtLuaGetGlobIntVar("CAM.ERR", nErr)
|
||||
EgtLuaResetGlobVar("CAM")
|
||||
If nErr > 0 Then
|
||||
If nErr <> 0 Then
|
||||
bOk = False
|
||||
EgtOutLog("Error in CamAuto : " & nErr.ToString())
|
||||
m_MainWindow.m_CurrentProjectPageUC.ClearMessage()
|
||||
ElseIf nErr < 0 Then
|
||||
EgtOutLog("Warning in CamAuto : " & nErr.ToString())
|
||||
End If
|
||||
Return bOk
|
||||
End Function
|
||||
|
||||
' versione CamAuto 2.6l1: gestione tagli con ridotto affondamento
|
||||
Friend Function AddWaterJetMachining(LocaList As List(Of Integer), ByRef nWarn As Integer) As Boolean
|
||||
EgtLuaCreateGlobTable("CAM")
|
||||
SetLuaStandardCamParams()
|
||||
For i As Integer = 0 To LocaList.Count - 1
|
||||
EgtLuaSetGlobIntVar("CAM.TAB_OPERID." & (i + 1).ToString, LocaList(i))
|
||||
Next
|
||||
Dim nErr As Integer = 999
|
||||
Dim bOk As Boolean = EgtLuaExecFile(m_MainWindow.GetCamAutoDir() & "\CamAuto.lua")
|
||||
bOk = bOk AndAlso EgtLuaGetGlobIntVar("CAM.ERR", nErr) AndAlso nErr = 0
|
||||
bOk = bOk AndAlso EgtLuaCallFunction("CAM.AddWaterJets")
|
||||
EgtLuaGetGlobIntVar("CAM.ERR", nErr)
|
||||
EgtLuaResetGlobVar("CAM")
|
||||
If nErr > 0 Then
|
||||
bOk = False
|
||||
EgtOutLog("Error in CamAuto : " & nErr.ToString())
|
||||
ElseIf nErr < 0 Then
|
||||
EgtOutLog("Warning in CamAuto : " & nErr.ToString())
|
||||
End If
|
||||
Return bOk
|
||||
End Function
|
||||
@@ -122,11 +56,9 @@ Friend Module CamAuto
|
||||
bOk = bOk AndAlso EgtLuaCallFunction("CAM.Erase")
|
||||
EgtLuaGetGlobIntVar("CAM.ERR", nErr)
|
||||
EgtLuaResetGlobVar("CAM")
|
||||
If nErr > 0 Then
|
||||
If nErr <> 0 Then
|
||||
bOk = False
|
||||
EgtOutLog("Error in CamAuto : " & nErr.ToString())
|
||||
ElseIf nErr < 0 Then
|
||||
EgtOutLog("Warning in CamAuto : " & nErr.ToString())
|
||||
End If
|
||||
m_MainWindow.m_CurrentProjectPageUC.ResetOrderMachiningFlag()
|
||||
m_MainWindow.m_CurrentProjectPageUC.ResetProjectNcRestart()
|
||||
@@ -142,11 +74,9 @@ Friend Module CamAuto
|
||||
bOk = bOk AndAlso EgtLuaCallFunction("CAM.InvertVerticalCut")
|
||||
EgtLuaGetGlobIntVar("CAM.ERR", nErr)
|
||||
EgtLuaResetGlobVar("CAM")
|
||||
If nErr > 0 Then
|
||||
If nErr <> 0 Then
|
||||
bOk = False
|
||||
EgtOutLog("Error in CamAuto : " & nErr.ToString())
|
||||
ElseIf nErr < 0 Then
|
||||
EgtOutLog("Warning in CamAuto : " & nErr.ToString())
|
||||
End If
|
||||
Return bOk
|
||||
End Function
|
||||
@@ -172,63 +102,6 @@ Friend Module CamAuto
|
||||
Return True
|
||||
End Function
|
||||
|
||||
Friend Function RestoreDef_Machinig(Optional bOnlySideAng As Boolean = True)
|
||||
Dim sSawingTilted As String = m_MainWindow.m_CurrentMachine.sCurrSawingTilted
|
||||
Dim bApplySawingTilted As Boolean = m_MainWindow.m_CurrentMachine.bApplySawingTilted
|
||||
Dim bOk As Boolean = True
|
||||
Dim nIdPart As Integer = EgtGetFirstPart()
|
||||
While nIdPart <> GDB_ID.NULL
|
||||
' accedo al Layer OutLoop dei pezzi nel grezzo
|
||||
Dim nIdLayerOutLoop As Integer = EgtGetFirstNameInGroup(nIdPart, NAME_OUTLOOP)
|
||||
Dim nEntId As Integer = EgtGetFirstInGroup(nIdLayerOutLoop)
|
||||
SetResetDef_Machining(nEntId, sSawingTilted, bApplySawingTilted, bOnlySideAng)
|
||||
nIdPart = EgtGetNextPart(nIdPart)
|
||||
End While
|
||||
Dim nRawId As Integer = CamAuto.GetCurrentRaw()
|
||||
nIdPart = EgtGetFirstPartInRawPart(nRawId)
|
||||
While nIdPart <> GDB_ID.NULL
|
||||
' accedo al Layer OutLoop dei pezzi in parcheggio
|
||||
Dim nIdLayerOutLoop As Integer = EgtGetFirstNameInGroup(nIdPart, NAME_OUTLOOP)
|
||||
Dim nEntId As Integer = EgtGetFirstInGroup(nIdLayerOutLoop)
|
||||
SetResetDef_Machining(nEntId, sSawingTilted, bApplySawingTilted, bOnlySideAng)
|
||||
nIdPart = EgtGetNextPartInRawPart(nIdPart)
|
||||
End While
|
||||
Return bOk
|
||||
End Function
|
||||
|
||||
' ripristina la lavorazone indicata di default per i tagli inclinati
|
||||
Private Sub SetResetDef_Machining(nEntId As Integer, sSawingTilted As String, bApplySawingTilted As Boolean, bOnlySideAng As Boolean)
|
||||
While nEntId <> GDB_ID.NULL
|
||||
Dim sInfoOrigSideAng As String = String.Empty
|
||||
EgtGetInfo(nEntId, INFO_ORIG_SIDE_ANGLE, sInfoOrigSideAng)
|
||||
' Se è un'entità associata ad una lavorazione inclinata
|
||||
If Not String.IsNullOrEmpty(sInfoOrigSideAng) AndAlso sInfoOrigSideAng <> "0" Then
|
||||
If bApplySawingTilted Then
|
||||
' forzo la lavorazione inclinata
|
||||
If String.IsNullOrEmpty(sSawingTilted) Then
|
||||
' ma se non esiste nessuna lavorezione specifica applico qualla standard
|
||||
EgtRemoveInfo(nEntId, DEF_MACHINING_TILTED)
|
||||
Else
|
||||
' Applico quella specificata
|
||||
EgtSetInfo(nEntId, DEF_MACHINING_TILTED, sSawingTilted)
|
||||
End If
|
||||
Else
|
||||
' Rimuovo la lavorazione e applico quella standard
|
||||
EgtRemoveInfo(nEntId, DEF_MACHINING_TILTED)
|
||||
End If
|
||||
|
||||
ElseIf Not bOnlySideAng Then
|
||||
Dim sInfo As String = String.Empty
|
||||
EgtGetInfo(nEntId, DEF_MACHINING, sInfo)
|
||||
If Not String.IsNullOrEmpty(sInfo) Then
|
||||
' se esiste una lavorazione specificata allora la rimuovo
|
||||
EgtRemoveInfo(nEntId, DEF_MACHINING)
|
||||
End If
|
||||
End If
|
||||
nEntId = EgtGetNext(nEntId)
|
||||
End While
|
||||
End Sub
|
||||
|
||||
Friend Function ResetAllSplitCurv() As Boolean
|
||||
Dim bOk As Boolean = True
|
||||
Dim nIdPart As Integer = EgtGetFirstPart()
|
||||
@@ -398,11 +271,9 @@ Friend Module CamAuto
|
||||
bOk = bOk AndAlso EgtLuaCallFunction("CAM.UpdateAllTp")
|
||||
EgtLuaGetGlobIntVar("CAM.ERR", nErr)
|
||||
EgtLuaResetGlobVar("CAM")
|
||||
If nErr > 0 Then
|
||||
If nErr <> 0 Then
|
||||
bOk = False
|
||||
EgtOutLog("Error in CamAuto : " & nErr.ToString())
|
||||
ElseIf nErr < 0 Then
|
||||
EgtOutLog("Warning in CamAuto : " & nErr.ToString())
|
||||
End If
|
||||
Return bOk
|
||||
End Function
|
||||
@@ -416,11 +287,9 @@ Friend Module CamAuto
|
||||
bOk = bOk AndAlso EgtLuaCallFunction("CAM.Sort")
|
||||
EgtLuaGetGlobIntVar("CAM.ERR", nErr)
|
||||
EgtLuaResetGlobVar("CAM")
|
||||
If nErr > 0 Then
|
||||
If nErr <> 0 Then
|
||||
bOk = False
|
||||
EgtOutLog("Error in CamAuto : " & nErr.ToString())
|
||||
ElseIf nErr < 0 Then
|
||||
EgtOutLog("Warning in CamAuto : " & nErr.ToString())
|
||||
End If
|
||||
Return bOk
|
||||
End Function
|
||||
@@ -435,11 +304,9 @@ Friend Module CamAuto
|
||||
bOk = bOk AndAlso EgtLuaCallFunction("CAM.SpecApplyDisp")
|
||||
EgtLuaGetGlobIntVar("CAM.ERR", nErr)
|
||||
EgtLuaResetGlobVar("CAM")
|
||||
If nErr > 0 Then
|
||||
If nErr <> 0 Then
|
||||
bOk = False
|
||||
EgtOutLog("Error in CamAuto : " & nErr.ToString())
|
||||
ElseIf nErr < 0 Then
|
||||
EgtOutLog("Warning in CamAuto : " & nErr.ToString())
|
||||
End If
|
||||
If ResetOrderMachiningFlag Then
|
||||
m_MainWindow.m_CurrentProjectPageUC.ResetOrderMachiningFlag()
|
||||
@@ -455,7 +322,7 @@ Friend Module CamAuto
|
||||
EgtGetGroupObjs(EgtGetFirstNameInGroup(nPartId, NAME_UNDERDRILL)) = 0 Then
|
||||
Return True
|
||||
End If
|
||||
' Se tutti i pezzi
|
||||
' Se tutti i pezzi
|
||||
Else
|
||||
' Salvo fase attualmente corrente
|
||||
Dim nOriPhase As Integer = EgtGetCurrPhase()
|
||||
@@ -582,7 +449,6 @@ Friend Module CamAuto
|
||||
Return EgtRemoveOperationHome(nId)
|
||||
End Function
|
||||
|
||||
' Verifico che per tutte le lavorazioni sia attrezzato l'utensile
|
||||
Friend Function VerifySetup(ByRef sMissingTools As String) As Boolean
|
||||
Dim bOk As Boolean = True
|
||||
Dim bIsMultiCut = (EgtGetHeadId("H101") <> GDB_ID.NULL)
|
||||
@@ -597,9 +463,9 @@ Friend Module CamAuto
|
||||
Dim sTool2 As String = String.Empty
|
||||
EgtGetMachiningParam(MCH_MP.TUUID, sTuuid)
|
||||
EgtTdbGetToolFromUUID(sTuuid, sTool)
|
||||
If String.IsNullOrWhiteSpace(sTool) Then
|
||||
If String.IsNullOrWhiteSpace( sTool) Then
|
||||
Dim sMchTool As String = ""
|
||||
EgtGetMachiningParam(MCH_MP.TOOL, sMchTool)
|
||||
EgtGetMachiningParam( MCH_MP.TOOL, sMchTool)
|
||||
bOk = False
|
||||
If sMissingTools.IndexOf(sMchTool) = -1 Then
|
||||
sMissingTools = sMissingTools & sMchTool & ", "
|
||||
@@ -612,24 +478,8 @@ Friend Module CamAuto
|
||||
End If
|
||||
sTool2 = sTool & "-2"
|
||||
End If
|
||||
If m_MainWindow.m_CurrentMachine.MountedToolConfig = CurrentMachine.MountedToolConfigs.TOOLCHANGERWITHSAW Then
|
||||
Dim bOnHolder As Boolean = False
|
||||
For Each ToolPosition As ToolChangerPos In m_MainWindow.m_CurrentMachine.ToolChanger
|
||||
If ToolPosition.sTool <> String.Empty Then
|
||||
If sTool = ToolPosition.sTool Then
|
||||
bOnHolder = True
|
||||
Exit For
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
If Not bOnHolder Then
|
||||
bOk = False
|
||||
If sMissingTools.IndexOf(sTool) = -1 Then
|
||||
sMissingTools = sMissingTools & sTool & ", "
|
||||
End If
|
||||
End If
|
||||
ElseIf String.Compare(sTool, m_MainWindow.m_CurrentMachine.sCurrSaw) <> 0 AndAlso
|
||||
(String.IsNullOrWhiteSpace(sTool2) OrElse String.Compare(sTool2, m_MainWindow.m_CurrentMachine.sCurrSaw) <> 0) AndAlso
|
||||
If String.Compare(sTool, m_MainWindow.m_CurrentMachine.sCurrSaw) <> 0 AndAlso
|
||||
( String.IsNullOrWhiteSpace( sTool2) OrElse String.Compare(sTool2, m_MainWindow.m_CurrentMachine.sCurrSaw) <> 0) AndAlso
|
||||
String.Compare(sTool, m_MainWindow.m_CurrentMachine.sCurrDripSaw) <> 0 Then
|
||||
bOk = False
|
||||
If sMissingTools.IndexOf(sTool) = -1 Then
|
||||
@@ -667,8 +517,6 @@ Friend Module CamAuto
|
||||
End If
|
||||
nId = EgtGetNextOperation(nId)
|
||||
End While
|
||||
Dim index As Integer = sMissingTools.LastIndexOf(","c)
|
||||
sMissingTools = If(index >= 0, sMissingTools.Remove(index, 1), sMissingTools)
|
||||
Return bOk
|
||||
End Function
|
||||
|
||||
@@ -695,10 +543,9 @@ Friend Module CamAuto
|
||||
Dim dReducedDepth As Double = GetPrivateProfileDouble(S_MACH_NEST, K_MACH_REDUCEDDEPTH, 1, m_MainWindow.GetMachIniFile())
|
||||
' Ciclo sulle lavorazioni
|
||||
Dim nOperId As Integer = EgtGetFirstOperation()
|
||||
Dim LocalListOperId As New List(Of Integer)
|
||||
While nOperId <> GDB_ID.NULL
|
||||
' verifico sia una lavorazione valida di taglio con lama
|
||||
If IsValidMachining(nOperId) And EgtGetOperationType(nOperId) = MCH_OY.SAWING Then
|
||||
If IsValidMachining( nOperId) And EgtGetOperationType( nOperId) = MCH_OY.SAWING Then
|
||||
' verifica interferenza
|
||||
Dim nFlag As Integer = FMI_TYPE.NONE
|
||||
If Not VerifyComposedMachining(nOperId, nFlag) Then
|
||||
@@ -710,14 +557,12 @@ Friend Module CamAuto
|
||||
' se abilitato e attivo waterjet, lo aggiungo per completare il taglio
|
||||
If m_MainWindow.m_CurrentMachine.WaterJettingActive Then
|
||||
Dim nWarn As Integer = 0
|
||||
LocalListOperId.Add(nOperId)
|
||||
'AddWaterJetMachining(nOperId, nWarn)
|
||||
AddWaterJetMachining(nOperId, nWarn)
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
nOperId = EgtGetNextOperation(nOperId)
|
||||
End While
|
||||
If LocalListOperId.Count > 0 Then AddWaterJetMachining(LocalListOperId, 0)
|
||||
Return bModified
|
||||
End Function
|
||||
|
||||
@@ -821,8 +666,8 @@ Friend Module CamAuto
|
||||
If nOriLeadIn <> MCH_SAW_LI.STRICT Then
|
||||
EgtSetMachiningParam(MCH_MP.LEADINTYPE, MCH_SAW_LI.STRICT)
|
||||
Dim dUserAddLen As Double = 0
|
||||
EgtGetInfo(nMchId, INFO_MCH_USER_SAL, dUserAddLen)
|
||||
EgtRemoveInfo(nMchId, INFO_MCH_USER_SAL)
|
||||
EgtGetInfo( nMchId, INFO_MCH_USER_SAL, dUserAddLen)
|
||||
EgtRemoveInfo( nMchId, INFO_MCH_USER_SAL)
|
||||
Dim dAddLen As Double = 0
|
||||
EgtGetMachiningParam(MCH_MP.STARTADDLEN, dAddLen)
|
||||
EgtSetMachiningParam(MCH_MP.STARTADDLEN, dAddLen - dUserAddLen - dSafeLen)
|
||||
@@ -841,8 +686,8 @@ Friend Module CamAuto
|
||||
If nOriLeadOut <> MCH_SAW_LO.STRICT Then
|
||||
EgtSetMachiningParam(MCH_MP.LEADOUTTYPE, MCH_SAW_LO.STRICT)
|
||||
Dim dUserAddLen As Double = 0
|
||||
EgtGetInfo(nMchId, INFO_MCH_USER_EAL, dUserAddLen)
|
||||
EgtRemoveInfo(nMchId, INFO_MCH_USER_EAL)
|
||||
EgtGetInfo( nMchId, INFO_MCH_USER_EAL, dUserAddLen)
|
||||
EgtRemoveInfo( nMchId, INFO_MCH_USER_EAL)
|
||||
Dim dAddLen As Double = 0
|
||||
EgtGetMachiningParam(MCH_MP.ENDADDLEN, dAddLen)
|
||||
EgtSetMachiningParam(MCH_MP.ENDADDLEN, dAddLen - dUserAddLen - dSafeLen)
|
||||
@@ -999,9 +844,9 @@ Friend Module CamAuto
|
||||
Friend Function RemoveAllExitPreCuts() As Boolean
|
||||
Dim nOperId As Integer = EgtGetFirstOperation()
|
||||
While nOperId <> GDB_ID.NULL
|
||||
Dim nNextOperId As Integer = EgtGetNextOperation(nOperId)
|
||||
If EgtGetType(nOperId) <> MCH_OY.DISP AndAlso EgtExistsInfo(nOperId, INFO_MCH_EPC) Then
|
||||
EgtRemoveOperation(nOperId)
|
||||
Dim nNextOperId As Integer = EgtGetNextOperation( nOperId)
|
||||
If EgtGetType( nOperId) <> MCH_OY.DISP AndAlso EgtExistsInfo(nOperId, INFO_MCH_EPC) Then
|
||||
EgtRemoveOperation( nOperId)
|
||||
End If
|
||||
nOperId = nNextOperId
|
||||
End While
|
||||
@@ -1011,7 +856,6 @@ Friend Module CamAuto
|
||||
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 sSawTiltedMch As String = m_MainWindow.m_CurrentMachine.sCurrSawingTilted
|
||||
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
|
||||
@@ -1030,7 +874,6 @@ Friend Module CamAuto
|
||||
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.SAWTILTEDMCH", sSawTiltedMch)
|
||||
EgtLuaSetGlobStringVar("CAM.MILLMCH", sMillMch)
|
||||
EgtLuaSetGlobStringVar("CAM.DRILLMCH", sDrillMch)
|
||||
EgtLuaSetGlobStringVar("CAM.POCKETMCH", sPocketMch)
|
||||
@@ -1056,24 +899,20 @@ Friend Module CamAuto
|
||||
If EgtGetTableId(MAIN_TAB) = GDB_ID.NULL Then Return 0
|
||||
If EgtGetTableId(SECOND_TAB) = GDB_ID.NULL Then Return 1
|
||||
If EgtGetTableId(THIRD_TAB) = GDB_ID.NULL Then Return 2
|
||||
If EgtGetTableId(FORTH_TAB) = GDB_ID.NULL Then Return 3
|
||||
Return 4
|
||||
Return 3
|
||||
End Function
|
||||
|
||||
Friend Function GetTableName(nInd As Integer) As String
|
||||
If nInd = 1 Then Return MAIN_TAB
|
||||
If nInd = 2 Then Return SECOND_TAB
|
||||
If nInd = 3 Then Return THIRD_TAB
|
||||
If nInd = 4 Then Return FORTH_TAB
|
||||
Return ""
|
||||
End Function
|
||||
|
||||
Friend Function GetCurrentTable() As Integer
|
||||
Dim sTabName As String = MAIN_TAB
|
||||
EgtGetTableName(sTabName)
|
||||
If sTabName = FORTH_TAB Then
|
||||
Return 4
|
||||
ElseIf sTabName = THIRD_TAB Then
|
||||
If sTabName = THIRD_TAB Then
|
||||
Return 3
|
||||
ElseIf sTabName = SECOND_TAB Then
|
||||
Return 2
|
||||
@@ -1194,13 +1033,13 @@ Friend Module CamAuto
|
||||
Dim nRawId As Integer = GetCurrentRaw()
|
||||
If nRawId = GDB_ID.NULL Then Return False
|
||||
' Se non ci sono pezzi, esco
|
||||
Dim nPart1Id As Integer = EgtGetFirstPartInRawPart(nRawId)
|
||||
Dim nPart1Id As Integer = EgtGetFirstPartInRawPart( nRawId)
|
||||
If nPart1Id = GDB_ID.NULL Then Return True
|
||||
' Verifico se cornice curva
|
||||
Dim nDir As Integer = 0
|
||||
EgtGetInfo(nPart1Id, INFO_FRAME_DIR, nDir)
|
||||
Dim bSwap As Boolean = (nDir = 0)
|
||||
Dim bCurved As Boolean = (nDir >= 2)
|
||||
Dim bSwap As Boolean = ( nDir = 0)
|
||||
Dim bCurved As Boolean = ( nDir >= 2)
|
||||
' Recupero la lavorazione corrente di sgrossatura con lama
|
||||
Dim sCurrSawRoughing = m_MainWindow.m_CurrentMachine.sCurrSawRoughing
|
||||
If String.IsNullOrEmpty(sCurrSawRoughing) Then Return True
|
||||
@@ -1227,8 +1066,8 @@ Friend Module CamAuto
|
||||
' Imposto la geometria
|
||||
EgtSetMachiningGeometry(vId)
|
||||
' Imposto trim iniziale e finale
|
||||
EgtSetMachiningParam(MCH_MP.STARTADDLEN, If(bSwap, -dTrimEnd, -dTrimStart))
|
||||
EgtSetMachiningParam(MCH_MP.ENDADDLEN, If(bSwap, -dTrimStart, -dTrimEnd))
|
||||
EgtSetMachiningParam(MCH_MP.STARTADDLEN, If( bSwap, -dTrimEnd, -dTrimStart))
|
||||
EgtSetMachiningParam(MCH_MP.ENDADDLEN, If( bSwap, -dTrimStart, -dTrimEnd))
|
||||
' Se cornice curva, imposto SCC
|
||||
If bCurved Then EgtSetMachiningParam(MCH_MP.SOLCHOICETYPE, MCH_SCC.ADIR_NEAR)
|
||||
' Applico la lavorazione
|
||||
@@ -1243,13 +1082,13 @@ Friend Module CamAuto
|
||||
Dim nRawId As Integer = GetCurrentRaw()
|
||||
If nRawId = GDB_ID.NULL Then Return False
|
||||
' Se non ci sono pezzi, esco
|
||||
Dim nPart1Id As Integer = EgtGetFirstPartInRawPart(nRawId)
|
||||
Dim nPart1Id As Integer = EgtGetFirstPartInRawPart( nRawId)
|
||||
If nPart1Id = GDB_ID.NULL Then Return True
|
||||
' Verifico se cornice curva
|
||||
Dim nDir As Integer = 0
|
||||
EgtGetInfo(nPart1Id, INFO_FRAME_DIR, nDir)
|
||||
Dim bSwap As Boolean = (nDir = 0)
|
||||
Dim bCurved As Boolean = (nDir >= 2)
|
||||
EgtGetInfo( nPart1Id, INFO_FRAME_DIR, nDir)
|
||||
Dim bSwap As Boolean = ( nDir = 0)
|
||||
Dim bCurved As Boolean = ( nDir >= 2)
|
||||
' Recupero la lavorazione corrente di finitura con lama
|
||||
Dim sCurrSawFinishing = m_MainWindow.m_CurrentMachine.sCurrSawFinishing
|
||||
If String.IsNullOrEmpty(sCurrSawFinishing) Then Return True
|
||||
@@ -1286,8 +1125,8 @@ Friend Module CamAuto
|
||||
' Imposto la geometria
|
||||
EgtSetMachiningGeometry(vId)
|
||||
' Imposto trim iniziale e finale
|
||||
EgtSetMachiningParam(MCH_MP.STARTADDLEN, If(bSwap, -dTrimEnd, -dTrimStart))
|
||||
EgtSetMachiningParam(MCH_MP.ENDADDLEN, If(bSwap, -dTrimStart, -dTrimEnd))
|
||||
EgtSetMachiningParam(MCH_MP.STARTADDLEN, If( bSwap, -dTrimEnd, -dTrimStart))
|
||||
EgtSetMachiningParam(MCH_MP.ENDADDLEN, If( bSwap, -dTrimStart, -dTrimEnd))
|
||||
' Se cornice curva, imposto SCC
|
||||
If bCurved Then EgtSetMachiningParam(MCH_MP.SOLCHOICETYPE, MCH_SCC.ADIR_NEAR)
|
||||
' Applico la lavorazione
|
||||
@@ -1302,13 +1141,13 @@ Friend Module CamAuto
|
||||
Dim nRawId As Integer = GetCurrentRaw()
|
||||
If nRawId = GDB_ID.NULL Then Return False
|
||||
' Se non ci sono pezzi, esco
|
||||
Dim nPart1Id As Integer = EgtGetFirstPartInRawPart(nRawId)
|
||||
Dim nPart1Id As Integer = EgtGetFirstPartInRawPart( nRawId)
|
||||
If nPart1Id = GDB_ID.NULL Then Return True
|
||||
' Verifico se cornice curva
|
||||
Dim nDir As Integer = 0
|
||||
EgtGetInfo(nPart1Id, INFO_FRAME_DIR, nDir)
|
||||
Dim bSwap As Boolean = (nDir = 0)
|
||||
Dim bCurved As Boolean = (nDir >= 2)
|
||||
Dim bSwap As Boolean = ( nDir = 0)
|
||||
Dim bCurved As Boolean = ( nDir >= 2)
|
||||
' Recupero la lavorazione corrente di spatolatura con lama
|
||||
Dim sCurrSawSideFinishing = m_MainWindow.m_CurrentMachine.sCurrSawSideFinishing
|
||||
If String.IsNullOrEmpty(sCurrSawSideFinishing) Then Return True
|
||||
@@ -1329,8 +1168,8 @@ Friend Module CamAuto
|
||||
' Imposto la geometria
|
||||
EgtSetMachiningGeometry(vId)
|
||||
' Imposto trim iniziale e finale
|
||||
EgtSetMachiningParam(MCH_MP.STARTADDLEN, If(bSwap, -dTrimEnd, -dTrimStart))
|
||||
EgtSetMachiningParam(MCH_MP.ENDADDLEN, If(bSwap, -dTrimStart, -dTrimEnd))
|
||||
EgtSetMachiningParam(MCH_MP.STARTADDLEN, If( bSwap, -dTrimEnd, -dTrimStart))
|
||||
EgtSetMachiningParam(MCH_MP.ENDADDLEN, If( bSwap, -dTrimStart, -dTrimEnd))
|
||||
' Se cornice curva, imposto SCC
|
||||
If bCurved Then EgtSetMachiningParam(MCH_MP.SOLCHOICETYPE, MCH_SCC.ADIR_NEAR)
|
||||
' Applico la lavorazione
|
||||
@@ -1469,14 +1308,14 @@ Friend Module CamAuto
|
||||
dStartDist = dEndDist
|
||||
dEndDist = dTemp
|
||||
End If
|
||||
' altrimenti
|
||||
' altrimenti
|
||||
Else
|
||||
Dim vtSide As Vector3d
|
||||
' Se faccia non limitata da altre o sopra la limitante
|
||||
If bFree Then
|
||||
EgtSetMachiningParam(MCH_MP.FACEUSE, MCH_MIL_FU.ORTUP_DOWN)
|
||||
vtSide = Vector3d.Z_AX()
|
||||
' altrimenti è stata trovata una faccia adiacente limitante
|
||||
' altrimenti è stata trovata una faccia adiacente limitante
|
||||
Else
|
||||
If vtAdjN.x > 10 * EPS_SMALL Then
|
||||
EgtSetMachiningParam(MCH_MP.FACEUSE, MCH_MIL_FU.ORTUP_LEFT)
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<!--Griglia per oscurare i bottoni della pagina sottostante-->
|
||||
<Grid Background="{DynamicResource OmagCut_Gray}">
|
||||
<Grid Background="{DynamicResource OmagCut_Gray}">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
@@ -49,7 +49,7 @@
|
||||
|
||||
<Label Name="CsvPathTxBl" Grid.Row="1" Background="White" FontSize="16" VerticalAlignment="Center" Padding="2,5,0,5"/>
|
||||
|
||||
<TreeView Name="PartsTreeView" Grid.Row="2" Background="{StaticResource OmagCut_TreeViewGradientGray}">
|
||||
<TreeView Name="PartsTreeView" Grid.Row="2" Background="{DynamicResource OmagCut_TreeViewBackGroundColor}">
|
||||
<TreeView.Resources>
|
||||
<!--Modifico HierarchicalDataTemplate del CathegoryItem per poter inserire immagine e testo e per -->
|
||||
<!--renderlo apribile con un solo click -->
|
||||
@@ -62,7 +62,7 @@
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Image Grid.Column="0" Source="{Binding PictureString}" Height="32" Width="32" Margin="0,8,6,4" />
|
||||
<TextBlock Grid.Column="1" Text="{Binding Name}" FontSize="15" Margin="10" Foreground="Black" />
|
||||
<TextBlock Grid.Column="1" Text="{Binding Name}" FontSize="15" Margin="10" />
|
||||
|
||||
</Grid>
|
||||
|
||||
@@ -123,10 +123,7 @@
|
||||
</Setter>
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding bIsActive}" Value="False">
|
||||
<Setter Property="Foreground" Value="{StaticResource OmagCut_White}"/>
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding bIsActive}" Value="True">
|
||||
<Setter Property="Foreground" Value="Black"/>
|
||||
<Setter Property="Foreground" Value="{StaticResource OmagCut_LightGray}"/>
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
@@ -134,25 +131,18 @@
|
||||
</HierarchicalDataTemplate>
|
||||
<!--Modifico DataTemplate del ToolItem per poter inserire immagine e testo-->
|
||||
<DataTemplate DataType="{x:Type self:PartCustomItem}">
|
||||
<Grid Width="234.8" Margin="0,5,0,5" HorizontalAlignment="Right">
|
||||
<Grid Width="246" Margin="0,5,0,5" HorizontalAlignment="Right">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="60"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<TextBlock x:Name="TbName" Grid.Column="0" Text="{Binding Name}" Height="18" FontSize="14" HorizontalAlignment="Right"/>
|
||||
<TextBlock x:Name="TbText1" Grid.Column="1" Text="{Binding sText1}" Height="18" FontSize="14" HorizontalAlignment="Center"/>
|
||||
<TextBlock x:Name="TbText2" Grid.Column="2" Text="{Binding sText2}" Height="18" FontSize="14" HorizontalAlignment="Left"/>
|
||||
<TextBlock Grid.Column="0" Text="{Binding Name}" Height="18" FontSize="14" HorizontalAlignment="Right"/>
|
||||
<TextBlock Grid.Column="1" Text="{Binding sText1}" Height="18" FontSize="14" HorizontalAlignment="Center"/>
|
||||
<TextBlock Grid.Column="2" Text="{Binding sText2}" Height="18" FontSize="14" HorizontalAlignment="Left"/>
|
||||
|
||||
</Grid>
|
||||
<DataTemplate.Triggers>
|
||||
<DataTrigger Binding="{Binding bIsActive}" Value="False">
|
||||
<Setter TargetName="TbName" Property="TextDecorations" Value="Strikethrough" />
|
||||
<Setter TargetName="TbText1" Property="TextDecorations" Value="Strikethrough" />
|
||||
<Setter TargetName="TbText2" Property="TextDecorations" Value="Strikethrough" />
|
||||
</DataTrigger>
|
||||
</DataTemplate.Triggers>
|
||||
</DataTemplate>
|
||||
</TreeView.Resources>
|
||||
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
Imports EgtWPFLib
|
||||
Imports System.Reflection
|
||||
Imports System.Globalization
|
||||
Imports EgtWPFLib5
|
||||
|
||||
Public Class CadCutPageUC
|
||||
|
||||
|
||||
@@ -1,92 +0,0 @@
|
||||
<Window x:Class="ChangeToolWD"
|
||||
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}"
|
||||
Title="ChooseTool" Height="382.6" Width="426.6" WindowStyle="None"
|
||||
ResizeMode="NoResize" ShowInTaskbar="False" AllowsTransparency="True"
|
||||
Background="Transparent">
|
||||
|
||||
<Border Style="{DynamicResource OmagCut_Border}">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
<ColumnDefinition Width="4*"/>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="1.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<TextBlock Name="FilePathTxBl" Grid.Column="1" Grid.Row="0" Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}" />
|
||||
<!--TextAlignment="Center"
|
||||
FontSize="20"
|
||||
VerticalAlignment="Center"-->
|
||||
|
||||
<Grid Grid.Column="1" Grid.Row="1">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="0.8*"/>
|
||||
<ColumnDefinition Width="0.7*"/>
|
||||
<ColumnDefinition Width="0.7*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Grid.Column="0" Text="MACHINING" Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}" />
|
||||
<TextBlock Grid.Column="1" Text="TOOL" Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}" />
|
||||
<TextBlock Grid.Column="2" Text="TC" Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}" Margin="10,0,0,0"/>
|
||||
</Grid>
|
||||
|
||||
<ListBox Name="SetUpToolListBox" Grid.Column="1" Grid.Row="2"
|
||||
ItemsSource="{Binding ItemList}">
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Grid Width="{Binding ActualWidth, ElementName=SetUpToolListBox}" Margin="0,0,-40,0">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="0.8*"/>
|
||||
<ColumnDefinition Width="0.7*"/>
|
||||
<ColumnDefinition Width="0.4*"/>
|
||||
<ColumnDefinition Width="0.0*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Grid.Column="0" Text="{Binding Machining}" Style="{StaticResource OmagCut_ListBoxTextBlock}"/>
|
||||
<TextBlock Grid.Column="1" Text="{Binding ToolName}" Style="{StaticResource OmagCut_ListBoxTextBlock}"/>
|
||||
<TextBlock Grid.Column="2" Text="{Binding ToolPos}" Style="{StaticResource OmagCut_ListBoxTextBlock}"/>
|
||||
<Rectangle Grid.Column="2" Style="{DynamicResource Rect_SplitPage}" Margin="15,0,0,0"/>
|
||||
<Grid.ToolTip>
|
||||
<StackPanel>
|
||||
<TextBlock Text="{Binding Machining}" Style="{StaticResource OmagCut_ListBoxTextBlock}"/>
|
||||
<TextBlock Text="{Binding ToolName}" Style="{StaticResource OmagCut_ListBoxTextBlock}" />
|
||||
<TextBlock Text="{Binding ToolPos}" Style="{StaticResource OmagCut_ListBoxTextBlock}"/>
|
||||
</StackPanel>
|
||||
</Grid.ToolTip>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</ListBox.ItemTemplate>
|
||||
</ListBox>
|
||||
|
||||
<TextBlock Name="ErrorTxBl" Grid.Column="1" Grid.Row="3"
|
||||
Style="{DynamicResource OmagCut_ErrorTextBlock}"/>
|
||||
|
||||
<Grid Grid.Column="1" Grid.Row="5">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Button Name="OkBtn" Grid.Column="1" Style="{DynamicResource OmagCut_GradientBlueIconButton}" >
|
||||
<Image Source="{DynamicResource VImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="ExitBtn" Grid.Column="3" Style="{DynamicResource OmagCut_GradientBlueIconButton}" IsCancel="True">
|
||||
<Image Source="{DynamicResource XImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
</Grid>
|
||||
|
||||
</Grid>
|
||||
|
||||
</Border>
|
||||
</Window>
|
||||
@@ -1,381 +0,0 @@
|
||||
Imports System.Collections.ObjectModel
|
||||
Imports EgtUILib
|
||||
|
||||
Public Class ChangeToolWD
|
||||
Private m_MainWindow As MainWindow = DirectCast(Application.Current.MainWindow, MainWindow)
|
||||
|
||||
Private m_SetUpMachiningList As New ObservableCollection(Of ItemMachining)
|
||||
|
||||
Sub New(Owner As Window)
|
||||
Me.Owner = Owner
|
||||
InitializeComponent()
|
||||
End Sub
|
||||
|
||||
' Parametri della lama impostata correntemente in macchina
|
||||
Private m_DefaultSaw_Name As String = String.Empty
|
||||
Private m_DefaultSaw_Diam As Double = 0
|
||||
Private m_DefaultSaw_Thick As Double = 0
|
||||
Private m_DefaultSaw_Exists As Boolean = False
|
||||
|
||||
' Il nome della lavorazione restituito dalla selezione
|
||||
Private m_NewSawing As String = String.Empty
|
||||
Public ReadOnly Property NewSawing As String
|
||||
Get
|
||||
Return m_NewSawing
|
||||
End Get
|
||||
End Property
|
||||
|
||||
' Il colore della lavorazione
|
||||
Private m_EgtColor As New Color3d
|
||||
Public ReadOnly Property EgtColor As Color3d
|
||||
Get
|
||||
Return m_EgtColor
|
||||
End Get
|
||||
End Property
|
||||
|
||||
' Il nome della posizione sulla rulliera
|
||||
Private m_TCPos As String = String.Empty
|
||||
Public ReadOnly Property TCPos As String
|
||||
Get
|
||||
Return m_TCPos
|
||||
End Get
|
||||
End Property
|
||||
|
||||
' Nome della lavorazione corrente
|
||||
Private m_CurrSawing As String = String.Empty
|
||||
Public Property CurrSawing As String
|
||||
Get
|
||||
Return m_CurrSawing
|
||||
End Get
|
||||
Set(value As String)
|
||||
m_CurrSawing = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Sub GetDiamAndThickDefaultSaw()
|
||||
m_DefaultSaw_Name = m_MainWindow.m_CurrentMachine.sCurrSaw
|
||||
' Dalla lavorazione corrente recupero il nome della lama
|
||||
If EgtMdbSetCurrMachining(m_CurrSawing) Then
|
||||
Dim sNameTool As String = String.Empty
|
||||
If EgtMdbGetCurrMachiningParam(MCH_MP.TOOL, sNameTool) Then m_DefaultSaw_Name = sNameTool
|
||||
End If
|
||||
If EgtTdbSetCurrTool(m_DefaultSaw_Name) Then
|
||||
' Diametro lama lavorazione
|
||||
EgtTdbGetCurrToolParam(MCH_TP.DIAM, m_DefaultSaw_Diam)
|
||||
' Spessore lama corrente
|
||||
EgtTdbGetCurrToolParam(MCH_TP.THICK, m_DefaultSaw_Thick)
|
||||
m_DefaultSaw_Exists = True
|
||||
End If
|
||||
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
|
||||
Me.Left = Owner.Left + Owner.Width / 2 - Me.Width / 2
|
||||
' Definizione del collegamento tra ItemList e ListBox1
|
||||
SetUpToolListBox.ItemsSource = m_SetUpMachiningList
|
||||
' 90378=Seleziona lavorazione
|
||||
FilePathTxBl.Text = EgtMsg(90378)
|
||||
End Sub
|
||||
|
||||
Private Sub OpenFile_Loaded(sender As Object, e As EventArgs) Handles Me.Loaded
|
||||
If String.IsNullOrEmpty(m_CurrSawing) Then
|
||||
m_CurrSawing = m_MainWindow.m_CurrentMachine.sCurrSawing
|
||||
End If
|
||||
' carico elenco degli utensili impostati attualmente in macchina (anche il laser!)
|
||||
LoadSetUpMachining()
|
||||
' ricerco la lavorazione corrente
|
||||
Dim Item As ItemMachining = m_SetUpMachiningList.FirstOrDefault(Function(x) x.Machining = m_CurrSawing)
|
||||
Dim Index As Integer = m_SetUpMachiningList.IndexOf(Item)
|
||||
If Index < 0 Then
|
||||
' Imposto lavorazione di default
|
||||
EgtMdbSetCurrMachining(m_CurrSawing)
|
||||
Dim sTool As String = String.Empty
|
||||
EgtMdbGetCurrMachiningParam(MCH_MP.TOOL, sTool)
|
||||
' ⚠️ Utensile {0} non attrezzato
|
||||
ErrorTxBl.Text = String.Format(EgtMsg(90377), sTool)
|
||||
Index = 0
|
||||
End If
|
||||
' se presente seleziono il primo elemento
|
||||
If m_SetUpMachiningList.Count > 0 Then
|
||||
SetUpToolListBox.SelectedItem = m_SetUpMachiningList(Index)
|
||||
OkBtn.IsEnabled = True
|
||||
Else
|
||||
OkBtn.IsEnabled = False
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#Region "SET UP MACHINING"
|
||||
|
||||
' Creo le liste da mostrare nella lista
|
||||
Private Function LoadSetUpMachining() As Boolean
|
||||
Dim sNameTool As String = String.Empty
|
||||
Dim nType As Integer = 0
|
||||
Dim sHeadTool As String = String.Empty
|
||||
Dim nExitTool As Integer = 0
|
||||
' Imposto il contesto corrente
|
||||
EgtSetCurrentContext(m_MainWindow.m_CurrentProjectPageUC.CurrentProjectScene.GetCtx())
|
||||
' Recupero la lista di tutte le lavorazioni di lama
|
||||
Dim local_Sawing As TreeViewItem.CathegoryItem = GetAllSwaing()
|
||||
' Se non ci sono lavorazioni di lama allora esco
|
||||
If IsNothing(local_Sawing) Then Return False
|
||||
|
||||
' Ripulisco la lista degli utensili
|
||||
m_SetUpMachiningList.Clear()
|
||||
CreateSawingList(local_Sawing)
|
||||
|
||||
Return True
|
||||
End Function
|
||||
|
||||
' Creo la lista delle delle lavorazioni di lama da proporre
|
||||
Private Sub CreateSawingList(SawingFam As TreeViewItem.CathegoryItem)
|
||||
' Recupero le info della lama montata di default
|
||||
GetDiamAndThickDefaultSaw()
|
||||
' recupero la prima lavorazione
|
||||
For Each Item As TreeViewItem.CustomItem In SawingFam.Items
|
||||
Dim sNameTool As String = String.Empty
|
||||
' Imposto la lavorazione corrente
|
||||
EgtMdbSetCurrMachining(Item.Name)
|
||||
' Recupero il nome dell'utensile della lavorazione
|
||||
EgtMdbGetCurrMachiningParam(MCH_MP.TOOL, sNameTool)
|
||||
If Not String.IsNullOrEmpty(sNameTool) And VerifyCurrSawTollerance(sNameTool) Then
|
||||
' Verifico che sia montata su un portautensile
|
||||
EgtTdbSetCurrTool(sNameTool)
|
||||
Dim sTCPos As String = String.Empty
|
||||
EgtTdbGetCurrToolParam(MCH_TP.TCPOS, sTCPos)
|
||||
If Not String.IsNullOrEmpty(sTCPos) Then
|
||||
' Cerco nel porta utensili automaitico
|
||||
For Each ToolPosition As ToolChangerPos In m_MainWindow.m_CurrentMachine.ToolChanger
|
||||
If ToolPosition.sTool <> String.Empty Then
|
||||
If sNameTool = ToolPosition.sTool Then
|
||||
' Verifico che il materiale e lo spessore
|
||||
If VerifyCurrMachiningMaterial() Then
|
||||
m_SetUpMachiningList.Add(New ItemMachining(Item.Name, sNameTool, sTCPos, Utility.GetColorPV()))
|
||||
End If
|
||||
Exit For
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
' reimposto la lavorazione di lama e la lama impostate in macchina
|
||||
EgtTdbSetCurrTool(m_MainWindow.m_CurrentMachine.sCurrSaw)
|
||||
EgtMdbSetCurrMachining(m_MainWindow.m_CurrentMachine.sCurrSawing)
|
||||
End Sub
|
||||
|
||||
' verifico l'utensile corrente (impostato nella funzione chiamante) se può lavorare il grezzo corrente
|
||||
Private Function VerifyCurrMachiningMaterial() As Boolean
|
||||
Dim m_MaterialsList As New ObservableCollection(Of MachiningMaterial)
|
||||
For Each Material As Material In m_MainWindow.m_CurrentMachine.Materials
|
||||
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
|
||||
|
||||
Dim ToolString As String = String.Empty
|
||||
EgtMdbGetCurrMachiningParam(MCH_MP.SYSNOTES, ToolString)
|
||||
If ToolString <> String.Empty Then
|
||||
Dim sItems() = ToolString.Split(";".ToCharArray)
|
||||
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
|
||||
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 = m_MainWindow.m_CurrentMachine.CurrMat.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()
|
||||
Else
|
||||
Material.VerifyIfActive()
|
||||
End If
|
||||
Else
|
||||
If StringToInt(Param(0), nParId) AndAlso nParId = m_MainWindow.m_CurrentMachine.CurrMat.nId Then
|
||||
StringToDouble(Param(1), Material.dMinThickness)
|
||||
StringToDouble(Param(2), Material.dMaxThickness)
|
||||
Material.VerifyIfActive()
|
||||
If m_MainWindow.m_CurrentProjectPageUC.m_dRawHeight > Material.dMinThickness And m_MainWindow.m_CurrentProjectPageUC.m_dRawHeight < Material.dMaxThickness Then
|
||||
Return True
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
Index += 1
|
||||
Next
|
||||
End If
|
||||
Return False
|
||||
End Function
|
||||
|
||||
' verifico l'utensile corrente (impostato nella funzione chiamante) se ha le stesse dimensioni della lama di default
|
||||
Private Function VerifyCurrSawTollerance(sNameTool As String) As Boolean
|
||||
If m_DefaultSaw_Exists Then
|
||||
If EgtTdbSetCurrTool(sNameTool) Then
|
||||
' Diametro nuova lama
|
||||
Dim NewDiam As Double = 0
|
||||
EgtTdbGetCurrToolParam(MCH_TP.DIAM, NewDiam)
|
||||
' Spessore lama
|
||||
Dim NewThick As Double = 0
|
||||
EgtTdbGetCurrToolParam(MCH_TP.THICK, NewThick)
|
||||
' Verifico che la nuova lama possa essere applicata: diametro minore, uguale spessore
|
||||
Dim Delta_Diam As Double = NewDiam - m_DefaultSaw_Diam
|
||||
Dim Delta_Thick As Double = Math.Abs(NewThick - m_DefaultSaw_Thick)
|
||||
If Delta_Diam < EPS_SMALL And Delta_Thick < EPS_SMALL Then
|
||||
Return True
|
||||
Else
|
||||
EgtOutLog(String.Format("New saw {0} can not repalce the current {1}; Delta_Diam={2}, |Delta_Thick|={3} ", sNameTool, m_DefaultSaw_Name, Delta_Diam, Delta_Thick))
|
||||
End If
|
||||
Else
|
||||
EgtOutLog("Impossible to find in tooldb SAW: " & sNameTool)
|
||||
End If
|
||||
Else
|
||||
If String.IsNullOrEmpty(m_DefaultSaw_Name) Then
|
||||
EgtOutLog("There is no currsaw setted in machine!")
|
||||
Else
|
||||
EgtOutLog("Impossible to find in tooldb currsaw setted in machine: " & m_DefaultSaw_Name)
|
||||
End If
|
||||
End If
|
||||
Return False
|
||||
End Function
|
||||
|
||||
' Restituisce tutto l'elenco delle lavorazioni disponibili in macchina
|
||||
Private Function GetAllSwaing() As TreeViewItem.CathegoryItem
|
||||
Dim sFName As String = EgtMsg(MSG_MACHININGSDBPAGEUC + 31)
|
||||
Dim nFType As Integer = MCH_MY.SAWING
|
||||
If Not m_MainWindow.m_CurrentMachine.bSawing Then Return Nothing
|
||||
' Inserisco categoria ed eventuali elementi
|
||||
Dim MachiningCathegory As New TreeViewItem.CathegoryItem(sFName, nFType)
|
||||
Dim MachiningName As String = String.Empty
|
||||
If EgtMdbGetFirstMachining(nFType, MachiningName) Then
|
||||
MachiningCathegory.Items.Add(New TreeViewItem.CustomItem(MachiningName, nFType))
|
||||
While EgtMdbGetNextMachining(nFType, MachiningName)
|
||||
MachiningCathegory.Items.Add(New TreeViewItem.CustomItem(MachiningName, nFType))
|
||||
End While
|
||||
End If
|
||||
Return MachiningCathegory
|
||||
End Function
|
||||
|
||||
#End Region ' Set up machinining
|
||||
|
||||
Private Sub SetUpToolListBox_PreviewMouseUp(sender As Object, e As MouseButtonEventArgs) Handles SetUpToolListBox.PreviewMouseUp
|
||||
' Disabilito Ok
|
||||
OkBtn.IsEnabled = False
|
||||
' Recupero item selezionato
|
||||
If SetUpToolListBox.SelectedItems.Count() = 0 Then
|
||||
Return
|
||||
End If
|
||||
m_NewSawing = m_SetUpMachiningList(SetUpToolListBox.SelectedIndex).Machining
|
||||
m_EgtColor = m_SetUpMachiningList(SetUpToolListBox.SelectedIndex).PrintFootToolColor
|
||||
m_TCPos = m_SetUpMachiningList(SetUpToolListBox.SelectedIndex).ToolPos
|
||||
' A seconda del tipo
|
||||
OkBtn.IsEnabled = True
|
||||
End Sub
|
||||
|
||||
Private Sub SetUpToolListBox_SelectionChanged(sender As Object, e As SelectionChangedEventArgs) Handles SetUpToolListBox.SelectionChanged
|
||||
' Disabilito Ok
|
||||
OkBtn.IsEnabled = False
|
||||
' Recupero item selezionato
|
||||
If SetUpToolListBox.SelectedItems.Count() = 0 Then
|
||||
Return
|
||||
Else
|
||||
m_NewSawing = m_SetUpMachiningList(SetUpToolListBox.SelectedIndex).Machining
|
||||
m_EgtColor = m_SetUpMachiningList(SetUpToolListBox.SelectedIndex).PrintFootToolColor
|
||||
m_TCPos = m_SetUpMachiningList(SetUpToolListBox.SelectedIndex).ToolPos
|
||||
OkBtn.IsEnabled = True
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub OkBtn_Click(sender As Object, e As RoutedEventArgs) Handles OkBtn.Click
|
||||
DialogResult = True
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
Public Class ItemMachining
|
||||
|
||||
Private m_ToolPos As String = String.Empty
|
||||
Private m_ToolName As String = String.Empty
|
||||
Private m_Machining As String = String.Empty
|
||||
Private m_ToolExit As Integer = 1
|
||||
Private m_ToolType As Integer = -1
|
||||
Private m_PrintFootToolColor As New Color3d(0, 255, 0, 100)
|
||||
Private m_cSawColor As SolidColorBrush
|
||||
|
||||
' Posizione porta utensile
|
||||
Public Property ToolPos As String
|
||||
Get
|
||||
Return m_ToolPos
|
||||
End Get
|
||||
Set(value As String)
|
||||
m_ToolPos = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
' Nome utensile
|
||||
Public Property ToolName As String
|
||||
Get
|
||||
Return m_ToolName
|
||||
End Get
|
||||
Set(value As String)
|
||||
m_ToolName = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
' Nome della lavorazione
|
||||
Public Property Machining As String
|
||||
Get
|
||||
Return m_Machining
|
||||
End Get
|
||||
Set(value As String)
|
||||
m_Machining = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property ToolExit As Integer
|
||||
Get
|
||||
Return m_ToolExit
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
m_ToolExit = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property ToolType As Integer
|
||||
Get
|
||||
Return m_ToolType
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
m_ToolType = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property PrintFootToolColor As Color3d
|
||||
Get
|
||||
Return m_PrintFootToolColor
|
||||
End Get
|
||||
Set(value As Color3d)
|
||||
m_PrintFootToolColor = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property SawColor As SolidColorBrush
|
||||
Get
|
||||
Return m_cSawColor
|
||||
End Get
|
||||
Set(value As SolidColorBrush)
|
||||
m_cSawColor = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Sub New(sMachining As String, sToolName As String, sToolPos As String, cColor As Color3d)
|
||||
m_Machining = sMachining
|
||||
m_ToolPos = sToolPos
|
||||
m_ToolName = sToolName
|
||||
m_PrintFootToolColor = cColor
|
||||
m_cSawColor = New SolidColorBrush(Color.FromRgb(m_PrintFootToolColor.R, m_PrintFootToolColor.G, m_PrintFootToolColor.B))
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
@@ -74,12 +74,6 @@ Public Class ChooseTestToolWD
|
||||
End If
|
||||
|
||||
Select Case m_MainWindow.m_CurrentMachine.MountedToolConfig
|
||||
Case CurrentMachine.MountedToolConfigs.SAW
|
||||
sNameTool = m_MainWindow.m_CurrentMachine.sCurrSaw
|
||||
If Not String.IsNullOrEmpty(sNameTool) Then
|
||||
' Imposto la lama
|
||||
m_SetUpToolList.Add(New TestTool(sNameTool, sNameTool))
|
||||
End If
|
||||
Case CurrentMachine.MountedToolConfigs.SAWANDAUXTOOL
|
||||
sNameTool = m_MainWindow.m_CurrentMachine.sCurrSaw
|
||||
If Not String.IsNullOrEmpty(sNameTool) Then
|
||||
@@ -142,30 +136,6 @@ Public Class ChooseTestToolWD
|
||||
End If
|
||||
Next
|
||||
Return True
|
||||
|
||||
Case CurrentMachine.MountedToolConfigs.TOOLCHANGERWITHSAW
|
||||
For Each ToolChangerPos As ToolChangerPos In m_MainWindow.m_CurrentMachine.ToolChanger
|
||||
If Not String.IsNullOrWhiteSpace(ToolChangerPos.sTool) Then
|
||||
'm_SetUpToolList.Add(New ToolPos(ToolChangerPos.sTool, ToolChangerPos.sName, False))
|
||||
sNameTool = ToolChangerPos.sTool
|
||||
If Not String.IsNullOrEmpty(sNameTool) Then
|
||||
' Imposto la lama
|
||||
m_SetUpToolList.Add(New TestTool(sNameTool, sNameTool))
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
For Each ToolChangerPos As ToolChangerPos In m_MainWindow.m_CurrentMachine.ManualToolChanger
|
||||
If Not String.IsNullOrWhiteSpace(ToolChangerPos.sTool) Then
|
||||
'm_SetUpToolList.Add(New ToolPos(ToolChangerPos.sTool, ToolChangerPos.sName, False))
|
||||
sNameTool = ToolChangerPos.sTool
|
||||
If Not String.IsNullOrEmpty(sNameTool) Then
|
||||
' Imposto la lama
|
||||
m_SetUpToolList.Add(New TestTool(sNameTool, sNameTool))
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
Return True
|
||||
|
||||
Case Else
|
||||
Return False
|
||||
End Select
|
||||
|
||||
@@ -44,8 +44,8 @@ Public Class MoveRawPartPage
|
||||
RemovePartBtn.Content = EgtMsg(MSG_MOVERAWPAGEUC + 1) 'Rimuovi
|
||||
ModifyBtn.Content = EgtMsg(MSG_SPLITPAGEUC + 17) 'Modifica
|
||||
ResetBtn.Content = EgtMsg(MSG_NESTPAGEUC + 6) 'Reset
|
||||
ScrapsBtn.Content = EgtMsg(90366) 'Add Scraps
|
||||
UnloadPartsBtn.Content = EgtMsg(90367) 'Move part
|
||||
ScrapsBtn.Content = "Add Scraps"
|
||||
UnloadPartsBtn.Content = "Move part"
|
||||
End Sub
|
||||
|
||||
Private Sub MoveRawPartPage_Loaded(sender As Object, e As EventArgs) Handles Me.Loaded
|
||||
@@ -124,26 +124,19 @@ Public Class MoveRawPartPage
|
||||
If m_SplitPage.m_bOnAuxTab And m_SplitPage.m_bEnableOnAuxTab Then
|
||||
' assegnazione delle info tavola ausiliaria alla dispozione corrente (Spostato nella funzione Refresh)
|
||||
SetAuxTabInCurrDisposition()
|
||||
UnloadPartsBtn.Content = EgtMsg(90368) ' Go to MOVE part
|
||||
UnloadPartsBtn.Content = "Go to MOVE part"
|
||||
' altrimenti, aggiorno visualizzazione
|
||||
ElseIf Not m_SplitPage.m_bOnAuxTab And m_SplitPage.m_bEnableOnAuxTab Then
|
||||
UnloadPartsBtn.Content = EgtMsg(90369) ' Go to UNLOAD part
|
||||
EgtDraw()
|
||||
UnloadPartsBtn.Content = "Go to UNLOAD part"
|
||||
End If
|
||||
'---------------------------- AUX TABLE ----------------------------
|
||||
EgtDraw()
|
||||
|
||||
' Carico i parametri di movimento
|
||||
m_dStep = GetPrivateProfileDouble(S_RAWMOVE, K_RAWSTEP, 50, m_MainWindow.GetIniFile())
|
||||
' Carico il valore ci
|
||||
Dim ExtraStep As Double = GetPrivateProfileDouble(S_RAWMOVE, K_EXTRASTEP, 1, m_MainWindow.GetIniFile())
|
||||
' Ricavo la lunghezza del baffo di taglio
|
||||
m_dStep = SplitAuto.MaxCuttingMustache(m_dStep)
|
||||
If ExtraStep < EPS_SMALL Then
|
||||
StepMoveTxBx.Text = LenToString(m_dStep, 1)
|
||||
Else
|
||||
StepMoveTxBx.Text = LenToString(m_dStep, 1) & "+" & LenToString(ExtraStep, 1)
|
||||
' Aggiorno il valore sommando l'extra
|
||||
m_dStep = m_dStep + ExtraStep
|
||||
End If
|
||||
StepMoveTxBx.Text = LenToString(m_dStep, 1) & "+1"
|
||||
m_dRotation = GetPrivateProfileDouble(S_RAWMOVE, K_RAWROTATION, 30, m_MainWindow.GetIniFile())
|
||||
RotationAngleTxBx.Text = DoubleToString(m_dRotation, 3)
|
||||
' Se movimento manuale perpendicolare
|
||||
@@ -215,10 +208,10 @@ Public Class MoveRawPartPage
|
||||
Else
|
||||
UnloadPartsBtn.Visibility = Visibility.Visible
|
||||
If m_SplitPage.m_bOnAuxTab Then
|
||||
UnloadPartsBtn.Content = EgtMsg(90368) ' Go to MOVE part
|
||||
UnloadPartsBtn.Content = "Go to MOVE part"
|
||||
' altrimenti, aggiorno visualizzazione
|
||||
Else
|
||||
UnloadPartsBtn.Content = EgtMsg(90369) ' Go to UNLOAD part
|
||||
UnloadPartsBtn.Content = "Go to UNLOAD part"
|
||||
End If
|
||||
End If
|
||||
' Aggiorno interfaccia per taglio perpendicolare
|
||||
@@ -342,7 +335,7 @@ Public Class MoveRawPartPage
|
||||
If VerifyCollisionWithOtherRawPart(nId) Then
|
||||
' mantengo la selezione del pezzo
|
||||
EgtSetStatus(nId, GDB_ST.SEL)
|
||||
m_CurrProjPage.SetErrorMessage(EgtMsg(91231)) ' Collisione pezzi
|
||||
m_CurrProjPage.SetErrorMessage("Collisione pezzi")
|
||||
Else
|
||||
' Se con ventose, le nascondo
|
||||
If Not m_bByHand Then EgtSetStatus(GetVacuumId(), GDB_ST.OFF)
|
||||
@@ -352,7 +345,7 @@ Public Class MoveRawPartPage
|
||||
If VerifyCollisionWithOtherRawPart(m_CurrRawOnVacuum) Then
|
||||
' mantengo la selezione del pezzo
|
||||
EgtSetStatus(m_CurrRawOnVacuum, GDB_ST.SEL)
|
||||
m_CurrProjPage.SetErrorMessage(EgtMsg(91231)) ' Collisione pezzi
|
||||
m_CurrProjPage.SetErrorMessage("Collisione pezzi")
|
||||
EgtDraw()
|
||||
' esco dal ciclo, prima devo depositare correttamente il pezzo
|
||||
Exit While
|
||||
@@ -361,7 +354,7 @@ Public Class MoveRawPartPage
|
||||
If VerifyCollisionWithOtherRawPart(nId, True) Then
|
||||
' mantengo la selezione del pezzo
|
||||
EgtSetStatus(m_CurrRawOnVacuum, GDB_ST.SEL)
|
||||
m_CurrProjPage.SetErrorMessage(EgtMsg(91231)) ' Collisione pezzi
|
||||
m_CurrProjPage.SetErrorMessage("Collisione pezzi")
|
||||
EgtDraw()
|
||||
' esco dal ciclo, prima devo depositare correttamente il pezzo
|
||||
Exit While
|
||||
@@ -538,18 +531,18 @@ Public Class MoveRawPartPage
|
||||
If EgtGetInfo(nMyId, K_ISNEWSCRAPS, nVal) Then
|
||||
If nVal = 1 Or nVal = 2 Then
|
||||
' 1 → è stato definito come nuovo grezzo oppure, 2 → è stato definito come nuovo grezzo ed è stato inserito nel DB delle lastre
|
||||
ScrapsBtn.Content = EgtMsg(91228) ' Remove Scrap
|
||||
ScrapsBtn.Content = "Remove Scrap"
|
||||
ScrapsBtn.IsEnabled = True And Not m_SplitPage.m_bShow
|
||||
Return True
|
||||
ElseIf nVal = 3 Then
|
||||
' non è possibile rimuovere il grezzo in questa fase
|
||||
ScrapsBtn.Content = EgtMsg(91229) ' Defined as Scrap
|
||||
ScrapsBtn.Content = "Defined as Scrap"
|
||||
ScrapsBtn.IsEnabled = False
|
||||
Return True
|
||||
End If
|
||||
End If
|
||||
' non è un nuovo grezzo
|
||||
ScrapsBtn.Content = EgtMsg(91230) ' Add Scrap
|
||||
ScrapsBtn.Content = "Add Scrap"
|
||||
ScrapsBtn.IsEnabled = True And Not m_SplitPage.m_bShow
|
||||
Return False
|
||||
End Function
|
||||
@@ -867,12 +860,6 @@ Public Class MoveRawPartPage
|
||||
Return bOk
|
||||
End Function
|
||||
|
||||
Private Sub RemovePart_KeyCancel(sender As Object, e As System.Windows.Forms.KeyEventArgs) Handles m_CurrProjPage.OnKeyCancelDownScene
|
||||
If e.KeyCode = System.Windows.Forms.Keys.Delete Then
|
||||
RemovePartBtn_Click(Nothing, Nothing)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub RemovePartBtn_Click(sender As Object, e As RoutedEventArgs) Handles RemovePartBtn.Click
|
||||
Dim nRawId As Integer = EgtGetFirstSelectedObj()
|
||||
While nRawId <> GDB_ID.NULL
|
||||
@@ -940,7 +927,6 @@ Public Class MoveRawPartPage
|
||||
' Mantengo la fase che è stata creata e passo a gestire solo la visualizzazione dei bottoni
|
||||
RefreshVisibility()
|
||||
EgtZoom(ZM.ALL, True)
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub StepMoveTxBx_EgtClosed(sender As Object, e As EventArgs) Handles StepMoveTxBx.EgtClosed
|
||||
@@ -1376,7 +1362,7 @@ Public Class MoveRawPartPage
|
||||
Return
|
||||
End If
|
||||
|
||||
' ------- VISUALIZZAZIONE (navigazione tra le fasi) -------
|
||||
' ------- VISUALIZZAZIONE -------
|
||||
If m_SplitPage.m_bShow Then
|
||||
' verifico se la fase successiva è uno scarico frontale
|
||||
If NextOperationIsUnloading(m_nCurrDisposition) Then
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="3*"/>
|
||||
<ColumnDefinition Width="12*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="8*"/>
|
||||
@@ -149,31 +149,29 @@
|
||||
</ToggleButton>
|
||||
</UniformGrid>
|
||||
|
||||
<UniformGrid Name ="UG2" Grid.Column="0" Grid.Row="7" Grid.ColumnSpan="3" Columns="3" >
|
||||
<UniformGrid Grid.Column="0" Grid.Row="7" Grid.ColumnSpan="3" Columns="2" >
|
||||
<Button Name="SelectAllBtn" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource Seleziona-tuttoImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="DeselectAllBtn" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource Deseleziona-tuttoImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||
</Button>
|
||||
<ToggleButton Name="ParkIndBtn" Style="{DynamicResource OmagCut_YellowIconToggleButton}">
|
||||
<Image Name="ParkIndImg" Source="{DynamicResource ParkingImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||
</ToggleButton>
|
||||
</UniformGrid>
|
||||
</UniformGrid>
|
||||
|
||||
</Grid>
|
||||
|
||||
<!--LowerButtonGrid-->
|
||||
<Grid Grid.Column="2" Grid.Row="2">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="5*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="4*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid Grid.Column="2" Grid.Row="2">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="5*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="4*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
||||
</Grid>
|
||||
|
||||
</UserControl>
|
||||
|
||||
@@ -9,9 +9,6 @@ Public Class NestPageUC
|
||||
' Riferimento alla MainWindow
|
||||
Private m_MainWindow As MainWindow = DirectCast(Application.Current.MainWindow, MainWindow)
|
||||
Private WithEvents m_CurrProjPage As CurrentProjectPageUC
|
||||
' Fisetra per la gestione dei parcheggi
|
||||
Private m_SelParkInd As SelParkIndWD
|
||||
|
||||
' Flag di pagina attiva
|
||||
Private m_bActive As Boolean = False
|
||||
' Flag per modalità nesting standard o registrazione posizione lastra
|
||||
@@ -110,7 +107,7 @@ Public Class NestPageUC
|
||||
RemovePartBtn.ToolTip = EgtMsg(MSG_NESTPAGEUC + 3) 'Remove part - Elimina pezzo
|
||||
SelectAllBtn.ToolTip = EgtMsg(MSG_NESTPAGEUC + 4) 'Select All - Seleziona Tutto
|
||||
DeselectAllBtn.ToolTip = EgtMsg(MSG_NESTPAGEUC + 5) 'Deselect All - Deseleziona Tutto
|
||||
DragRettanleBtn.ToolTip = EgtMsg(91207) 'Strech
|
||||
DragRettanleBtn.ToolTip = "Strech"
|
||||
|
||||
' Nascondo i pulsanti in uso quando attivo la modalità REG
|
||||
UG0_Reg.Visibility = Visibility.Hidden
|
||||
@@ -147,30 +144,11 @@ Public Class NestPageUC
|
||||
StartCurveWJBtn.Visibility = Visibility.Collapsed
|
||||
End If
|
||||
UG0.Columns = nColumnIn_UG0
|
||||
|
||||
' Gestione dei comandi di parcheggio e selezione (UniformGrid2)
|
||||
If GetPrivateProfileInt(S_GENERAL, K_ENABLEDXFPARK, 0, m_MainWindow.GetIniFile) = 0 Then
|
||||
EgtOutLog("Button 'EnableDXFPark' is not enable, check in file *.ini program.")
|
||||
ParkIndBtn.Visibility = Visibility.Collapsed
|
||||
UG2.Columns = 2
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Dim ImageConverter As New ImageSourceConverter
|
||||
|
||||
Private Sub NestPage_Loaded(sender As Object, e As RoutedEventArgs)
|
||||
m_bActive = True
|
||||
LoadParams()
|
||||
Dim nCpuntParkInd As Integer = UpdateImageParkInd()
|
||||
If nCpuntParkInd > 2 Then
|
||||
If GetPrivateProfileInt(S_GENERAL, K_ENABLEDXFPARK, 0, m_MainWindow.GetIniFile) = 0 Then
|
||||
m_MainWindow.m_CurrentProjectPageUC.ClearMessage()
|
||||
m_MainWindow.m_CurrentProjectPageUC.SetWarningMessage("There are " & (nCpuntParkInd - 1).ToString & " park in project.")
|
||||
EgtOutLog("WARNONG: Enable button 'EnableDXFPark' in file *.ini program.")
|
||||
End If
|
||||
ParkIndBtn.IsChecked = True
|
||||
End If
|
||||
ParkIndBtn_Click()
|
||||
EgtZoom(ZM.ALL)
|
||||
End Sub
|
||||
|
||||
@@ -242,21 +220,17 @@ Public Class NestPageUC
|
||||
m_nCountSpot = 0
|
||||
m_nCountSpotCUT = 0
|
||||
End If
|
||||
'EgtOutLog("Numero di SPOT caricati da OFFICE: " & m_nCountSpot.ToString)
|
||||
' Se nel progetto non sono inseriti punti SpotReg disabilito i comandi
|
||||
If m_nCountSpot < 1 Then
|
||||
UG0_Reg.IsEnabled = False
|
||||
UG1_Reg.IsEnabled = False
|
||||
'EgtOutLog(" Abilito comandi gestione SPOT")
|
||||
Else
|
||||
UG0_Reg.IsEnabled = True
|
||||
UG1_Reg.IsEnabled = True
|
||||
'EgtOutLog(" Disabilito comandi gestione SPOT")
|
||||
End If
|
||||
' Se nel progetto non sono inseriti punti SpotRegCUT provvedo ad aggiungerli
|
||||
If m_nCountSpotCUT < 1 Then
|
||||
InsertSpotRegistration()
|
||||
'EgtOutLog(" Creo SPOT_CUT")
|
||||
End If
|
||||
|
||||
' Se necessario riabilito impostazione modificato
|
||||
@@ -356,7 +330,7 @@ Public Class NestPageUC
|
||||
End While
|
||||
If nIdMy = GDB_ID.NULL Then
|
||||
m_MainWindow.m_CurrentProjectPageUC.ClearMessage()
|
||||
m_MainWindow.m_CurrentProjectPageUC.SetErrorMessage(EgtMsg(91208)) ' Select OUTLOOP
|
||||
m_MainWindow.m_CurrentProjectPageUC.SetErrorMessage("Select OUTLOOP")
|
||||
End If
|
||||
Return
|
||||
End Sub
|
||||
@@ -544,7 +518,7 @@ Public Class NestPageUC
|
||||
m_nIdSelectedOutLoopRettangle = nIdParent
|
||||
If Not IsRettangle(m_SideListRettangle) Then
|
||||
m_CurrProjPage.ClearMessage()
|
||||
m_CurrProjPage.SetWarningMessage(EgtMsg(91209)) ' Non è un rettangolo (0)
|
||||
m_CurrProjPage.SetWarningMessage("Non è un rettangolo (0)")
|
||||
Return
|
||||
End If
|
||||
' recupero il gruppo della lavorazione associata
|
||||
@@ -553,13 +527,13 @@ Public Class NestPageUC
|
||||
' se non esiste un gruppo di lavorazione associato allora esco
|
||||
If nIdPV = GDB_ID.NULL Then
|
||||
m_CurrProjPage.ClearMessage()
|
||||
m_CurrProjPage.SetWarningMessage(EgtMsg(91210)) ' Pezzo in parcheggio (1)
|
||||
m_CurrProjPage.SetWarningMessage("Pezzo in parcheggio (1)")
|
||||
Return
|
||||
End If
|
||||
' se esiste ma è vuoto (pezzo scaricato da tavola)
|
||||
If EgtGetFirstInGroup(nIdPV) = GDB_ID.NULL Then
|
||||
m_CurrProjPage.ClearMessage()
|
||||
m_CurrProjPage.SetWarningMessage(EgtMsg(91211)) ' Pezzo in parcheggio (2)
|
||||
m_CurrProjPage.SetWarningMessage("Pezzo in parcheggio (2)")
|
||||
Return
|
||||
End If
|
||||
' Devo verificare che sia una lavorazione solo di lama?
|
||||
@@ -1017,7 +991,7 @@ Public Class NestPageUC
|
||||
AddPointRegBtn.IsChecked = False
|
||||
Else
|
||||
m_MainWindow.m_CurrentProjectPageUC.ClearMessage()
|
||||
m_MainWindow.m_CurrentProjectPageUC.SetWarningMessage(EgtMsg(91212) & m_nCountSpot.ToString) ' Max spot for reg:
|
||||
m_MainWindow.m_CurrentProjectPageUC.SetWarningMessage("Max spot for reg: " & m_nCountSpot.ToString)
|
||||
End If
|
||||
ElseIf RemovePointRegBtn.IsChecked Then
|
||||
' Verifico se selezionato indicativo di pezzo
|
||||
@@ -1095,7 +1069,8 @@ Public Class NestPageUC
|
||||
End If
|
||||
|
||||
' Si può selezionare solo con il tasto sinistro e se stato NULL
|
||||
If e.Button <> Windows.Forms.MouseButtons.Left Or Not m_CurrProjPage.CurrentProjectScene.IsStatusNull() Then
|
||||
If e.Button <> Windows.Forms.MouseButtons.Left Or
|
||||
Not m_CurrProjPage.CurrentProjectScene.IsStatusNull() Then
|
||||
Return
|
||||
End If
|
||||
|
||||
@@ -1107,6 +1082,7 @@ Public Class NestPageUC
|
||||
m_bIsCounterLy = False
|
||||
' se in modalità DragRettangle (deformazione delle componenti rettangolari)
|
||||
If m_bIsCheckedDragRettangle Then
|
||||
OnMyMouseDownSceneSelSideRettangle(sender, e)
|
||||
' Dati per drag (abilito il Drag)
|
||||
m_locPrev = e.Location
|
||||
m_bDrag = EgtUnProjectPoint(e.Location, m_ptPrev) And m_nIdSelectedCurvRettangle <> GDB_ID.NULL
|
||||
@@ -1179,18 +1155,12 @@ Public Class NestPageUC
|
||||
Exit While
|
||||
Else
|
||||
' verifico se l'elemento selezionato è il nome della tavola
|
||||
If EgtGetType(nId) = GDB_TY.EXT_TEXT AndAlso (sNamePartId = MAIN_TAB Or
|
||||
sNamePartId = SECOND_TAB Or
|
||||
sNamePartId = THIRD_TAB Or
|
||||
sNamePartId = FORTH_TAB) Then
|
||||
' Apro la finestra per la selezione della tavola da usare
|
||||
If EgtGetType(nId) = GDB_TY.EXT_TEXT AndAlso (sNamePartId = MAIN_TAB Or sNamePartId = SECOND_TAB) Then
|
||||
Dim nRes As Integer = m_MainWindow.m_CadCutPageUC.m_ProjectMgr.ChangeTable()
|
||||
' se non è stata eseguita nessuna scelta esco dal ciclo
|
||||
If nRes = 0 Then Exit While
|
||||
|
||||
' recupero il nome della tavola corrente
|
||||
Dim sOtherTab As String = GetTableName(nRes)
|
||||
|
||||
' imposto l'altra tavola
|
||||
Dim sOtherTab = If(sNamePartId = MAIN_TAB, SECOND_TAB, MAIN_TAB)
|
||||
EgtChangeTable(sOtherTab, True)
|
||||
m_CurrProjPage.AdjustAdditionalTable(True)
|
||||
EgtSetMachineLook(MCH_LOOK.TAB)
|
||||
@@ -1596,10 +1566,6 @@ Math.Abs(e.Location.Y - m_locPrev.Y) < m_nRestRadius Then
|
||||
' Eseguo verifica
|
||||
If VerifyTrfData(nMoveId) And EgtVerifyPart(nMoveId, m_bReducedCut) Then
|
||||
m_CurrProjPage.ResetOrderMachiningFlag()
|
||||
' Aggiorno la lista dei parcheggi
|
||||
If ParkIndBtn.IsChecked Then
|
||||
m_SelParkInd.UpdateList()
|
||||
End If
|
||||
' Non superata riporto alla posizione iniziale
|
||||
Else
|
||||
If m_bFromParking Then
|
||||
@@ -1631,7 +1597,7 @@ Math.Abs(e.Location.Y - m_locPrev.Y) < m_nRestRadius Then
|
||||
CountPartInFamily(sRefGroup)
|
||||
End If
|
||||
End If
|
||||
'---------------------- COUNTER PART ----------------------
|
||||
'---------------------- COUNTER PART ----------------------
|
||||
End If
|
||||
m_bFromParking = False
|
||||
End If
|
||||
@@ -2301,10 +2267,7 @@ Math.Abs(e.Location.Y - m_locPrev.Y) < m_nRestRadius Then
|
||||
Else
|
||||
StandardInsert()
|
||||
End If
|
||||
' Aggiorno la lista dei parcheggi
|
||||
If ParkIndBtn.IsChecked Then
|
||||
m_SelParkInd.UpdateList()
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub StandardInsert()
|
||||
@@ -2746,7 +2709,6 @@ Math.Abs(e.Location.Y - m_locPrev.Y) < m_nRestRadius Then
|
||||
End Function
|
||||
|
||||
#End Region ' Manager Counter Part
|
||||
|
||||
Private Sub DragRettangle_Click() Handles DragRettanleBtn.Click
|
||||
If DragRettanleBtn.IsChecked Then
|
||||
m_bIsCheckedDragRettangle = True
|
||||
@@ -2812,12 +2774,6 @@ Math.Abs(e.Location.Y - m_locPrev.Y) < m_nRestRadius Then
|
||||
Dim nNextId = EgtGetNextSelectedObj()
|
||||
' Metto in parcheggio, se in grezzo
|
||||
StoreOnePart(nId)
|
||||
' Aggiorno lo stato di visualizzazione
|
||||
Dim nInfoStatus As Integer = 1
|
||||
' Salvo lo stato (per gestire la navigazione)
|
||||
EgtGetInfo(nId, INFO_PARKSTATUS, nInfoStatus)
|
||||
' Imposto lo stato
|
||||
EgtSetStatus(nId, nInfoStatus)
|
||||
' Eventuale notifiche al VeinMatching
|
||||
VeinMatching.OnRemovePartFromRaw(nId)
|
||||
' Passo al successivo selezionato
|
||||
@@ -2827,8 +2783,6 @@ Math.Abs(e.Location.Y - m_locPrev.Y) < m_nRestRadius Then
|
||||
m_nPartPos = PART_POS.NONE_TABLE
|
||||
' Aggiorno vista
|
||||
EgtZoom(ZM.ALL)
|
||||
' Aggiorno la lista dei parcheggi
|
||||
ReloadListParkInd()
|
||||
End Sub
|
||||
|
||||
' ripulisco la lista dei pezzi in parcheggio
|
||||
@@ -2860,31 +2814,6 @@ Math.Abs(e.Location.Y - m_locPrev.Y) < m_nRestRadius Then
|
||||
Return False
|
||||
End Function
|
||||
|
||||
Friend Function StoreOnePartDXF(nId As Integer, DimX As Double, DimY As Double, MaxPt As Point3d) As Boolean
|
||||
'Const STORE_LARGH As Double = 6000
|
||||
Const STORE_DIST As Double = 200
|
||||
'Const STORE_OFFS As Double = 20 + 40 + 20
|
||||
'Dim dStoreLarg As Double = GetPrivateProfileDouble("Store", "StoreLargh", STORE_LARGH, m_MainWindow.GetMachIniFile())
|
||||
Dim dStoreDist As Double = GetPrivateProfileDouble("Store", "StoreDist", STORE_DIST, m_MainWindow.GetMachIniFile())
|
||||
'Dim dStoreOffs As Double = GetPrivateProfileDouble("Store", "StoreOffs", STORE_OFFS, m_MainWindow.GetMachIniFile())
|
||||
' Recupero box tavola
|
||||
Dim b3Tab As New BBox3d
|
||||
If Not EgtGetTableArea(1, b3Tab) Then
|
||||
b3Tab.Add(New Point3d(0, 0, 0))
|
||||
b3Tab.Add(New Point3d(-3600, -2600, 0))
|
||||
End If
|
||||
Dim Offs_y As Double = b3Tab.Min.y - MaxPt.y - STORE_DIST
|
||||
Dim Offs_x As Double = b3Tab.Min.x - (MaxPt.x - DimX) + (b3Tab.DimX - DimX) / 2
|
||||
Dim vt As New Vector3d(Offs_x, Offs_y, b3Tab.Min.z)
|
||||
EgtMove(nId, vt, GDB_RT.GLOB)
|
||||
' Recupero il centro del pezzo in parcheggio e lo salvo
|
||||
Dim ptCenter As Point3d
|
||||
EgtCenterPoint(nId, GDB_ID.ROOT, ptCenter)
|
||||
EgtSetInfo(nId, "PosInPark", ptCenter)
|
||||
EgtSetStatus(nId, GDB_ST.ON_)
|
||||
Return True
|
||||
End Function
|
||||
|
||||
Friend Function PackPartInStore(nId As Integer) As Boolean
|
||||
' Recupero box tavola
|
||||
Dim b3Tab As New BBox3d
|
||||
@@ -2900,17 +2829,6 @@ Math.Abs(e.Location.Y - m_locPrev.Y) < m_nRestRadius Then
|
||||
Dim dStoreDist As Double = GetPrivateProfileDouble("Store", "StoreDist", STORE_DIST, m_MainWindow.GetMachIniFile())
|
||||
Dim dStoreOffs As Double = GetPrivateProfileDouble("Store", "StoreOffs", STORE_OFFS, m_MainWindow.GetMachIniFile())
|
||||
Dim dStXmin As Double = b3Tab.Min().x - 0.5 * (dStoreLarg - b3Tab.DimX())
|
||||
|
||||
' Verifico che il pezzo ha una posizione salvata
|
||||
Dim ptCenter As Point3d
|
||||
If EgtGetInfo(nId, "PosInPark", ptCenter) Then
|
||||
Dim ptCurrPos As Point3d
|
||||
EgtCenterPoint(nId, GDB_ID.ROOT, ptCurrPos)
|
||||
Dim vt As New Vector3d(ptCenter - ptCurrPos)
|
||||
EgtMove(nId, vt, GDB_RT.GLOB)
|
||||
Return True
|
||||
End If
|
||||
|
||||
Return EgtPackBox(nId, dStXmin, -INFINITO, dStXmin + dStoreLarg, b3Tab.Min().y - dStoreDist, dStoreOffs, False)
|
||||
End Function
|
||||
|
||||
@@ -2999,51 +2917,8 @@ Math.Abs(e.Location.Y - m_locPrev.Y) < m_nRestRadius Then
|
||||
m_CurrProjPage.ShowAreas()
|
||||
' Aggiorno vista
|
||||
EgtZoom(ZM.ALL)
|
||||
' Aggiorno la lista dei parcheggi
|
||||
If ParkIndBtn.IsChecked Then
|
||||
m_SelParkInd.UpdateList()
|
||||
End If
|
||||
' abilito la notofica di modifica
|
||||
UpdateImageParkInd(False)
|
||||
End Sub
|
||||
|
||||
' Aggiorna immagine e restituisce il numero di parcheggi (+1) disponibili (+1 perchè conto anche il comando All_Off)
|
||||
Private Function UpdateImageParkInd(Optional bDisableModified As Boolean = True) As Integer
|
||||
' Carcico la lista dei parcheggi
|
||||
Dim ListparkInd As New List(Of ParkInd)
|
||||
SelParkIndWD.LoadParkInd(ListparkInd)
|
||||
Dim nCount As Integer = ListparkInd.Count
|
||||
' Se il comando è abilitato allora provvedo ad aggiornare l'immagine
|
||||
If GetPrivateProfileInt(S_GENERAL, K_ENABLEDXFPARK, 0, m_MainWindow.GetIniFile) <> 0 Then
|
||||
Dim s As String = m_MainWindow.GetResourcesDir() & "\MachineButtonsImage\NewIcons\Parking.png"
|
||||
If nCount > 1 Then
|
||||
s = m_MainWindow.GetResourcesDir() & "\MachineButtonsImage\NewIcons\Park_Busy.png"
|
||||
Else
|
||||
s = m_MainWindow.GetResourcesDir() & "\MachineButtonsImage\NewIcons\Park_Empty.png"
|
||||
End If
|
||||
ParkIndImg.Source = ImageConverter.ConvertFromString(s)
|
||||
Else
|
||||
Dim bOldEnMod As Boolean = False
|
||||
If bDisableModified Then
|
||||
bOldEnMod = EgtGetEnableModified()
|
||||
If bOldEnMod Then EgtDisableModified()
|
||||
End If
|
||||
' Se il comando non è abilitato allora provvedo a selezionare il primo parcheggio
|
||||
Dim CurrparkInd As ParkInd = SelParkIndWD.GetCurrentParkIndSelected()
|
||||
If Not IsNothing(CurrparkInd) Then
|
||||
SelParkIndWD.SetStatusPartInParkInd(CurrparkInd, True)
|
||||
Else
|
||||
If nCount > 1 Then
|
||||
ListparkInd(1).Status = GDB_ST.ON_
|
||||
SelParkIndWD.SetStatusPartInParkInd(ListparkInd(1), True)
|
||||
End If
|
||||
End If
|
||||
' Se necessario, ripristino precedente impostazione modificato
|
||||
If bOldEnMod Then EgtEnableModified()
|
||||
End If
|
||||
Return nCount
|
||||
End Function
|
||||
|
||||
Private Sub DeleteBridgeAssociated(nMyId As Integer)
|
||||
' verifico se esistono dei ponticelli associati al pezzo indicato
|
||||
' recuoero il gruppo di lavorazione corrente
|
||||
@@ -3087,13 +2962,6 @@ Math.Abs(e.Location.Y - m_locPrev.Y) < m_nRestRadius Then
|
||||
|
||||
Private Sub SelectAllBtn_Click(sender As Object, e As RoutedEventArgs) Handles SelectAllBtn.Click
|
||||
EgtSetCurrentContext(m_CurrProjPage.CurrentProjectScene.GetCtx())
|
||||
' Recupero il ParkInd attualmente attivo
|
||||
Dim CurrParkInd As ParkInd = SelParkIndWD.GetCurrentParkIndSelected()
|
||||
' Il default è ZERO
|
||||
Dim nCurrParkInd As Integer = 0
|
||||
If Not IsNothing(CurrParkInd) Then
|
||||
nCurrParkInd = CurrParkInd.Ind
|
||||
End If
|
||||
' Numero dei pezzi in tavola
|
||||
Dim nPartTab As Integer = EgtGetPartInRawPartCount(m_nRawId)
|
||||
' Se già selezionati in tavola o non ci sono selezionati e pezzi in tavola
|
||||
@@ -3102,21 +2970,8 @@ Math.Abs(e.Location.Y - m_locPrev.Y) < m_nRestRadius Then
|
||||
' Seleziono tutti i pezzi in tavola
|
||||
Dim nPartId As Integer = EgtGetFirstGroupInGroup(m_nRawId)
|
||||
While nPartId <> GDB_ID.NULL
|
||||
' ------------------ INIZIO ------------------ Recupero l'indice del parcheggio in cui è inserito il pezzo
|
||||
Dim sInfoParkInd As String = String.Empty
|
||||
Dim nInfoParkInd As Integer = -1
|
||||
' Recupero l'indice del parcheggio
|
||||
If EgtGetInfo(nPartId, INFO_PARKIND, sInfoParkInd) Then
|
||||
nInfoParkInd = If(IsNumeric(sInfoParkInd), CInt(sInfoParkInd), -1)
|
||||
Else
|
||||
nInfoParkInd = 0
|
||||
End If
|
||||
' ------------------ FINE ------------------ Recupero l'indice del parcheggio in cui è inserito il pezzo
|
||||
' Se l'indice di parcheggio è valido (uguale al parcheggio corrente)
|
||||
If nInfoParkInd = nCurrParkInd Then
|
||||
EgtSelectObj(nPartId)
|
||||
VeinMatching.OnSelectPart(nPartId, False)
|
||||
End If
|
||||
EgtSelectObj(nPartId)
|
||||
VeinMatching.OnSelectPart(nPartId, False)
|
||||
nPartId = EgtGetNextGroup(nPartId)
|
||||
End While
|
||||
' Aggiorno flag
|
||||
@@ -3126,21 +2981,8 @@ Math.Abs(e.Location.Y - m_locPrev.Y) < m_nRestRadius Then
|
||||
' Seleziono tutti i pezzi in parcheggio
|
||||
Dim nPartId As Integer = EgtGetFirstPart()
|
||||
While nPartId <> GDB_ID.NULL
|
||||
' ------------------ INIZIO ------------------ Recupero l'indice del parcheggio in cui è inserito il pezzo
|
||||
Dim sInfoParkInd As String = String.Empty
|
||||
Dim nInfoParkInd As Integer = -1
|
||||
' Recupero l'indice del parcheggio
|
||||
If EgtGetInfo(nPartId, INFO_PARKIND, sInfoParkInd) Then
|
||||
nInfoParkInd = If(IsNumeric(sInfoParkInd), CInt(sInfoParkInd), -1)
|
||||
Else
|
||||
nInfoParkInd = 0
|
||||
End If
|
||||
' ------------------ FINE ------------------ Recupero l'indice del parcheggio in cui è inserito il pezzo
|
||||
' Se l'indice di parcheggio è valido (uguale al parcheggio corrente)
|
||||
If nInfoParkInd = nCurrParkInd Then
|
||||
EgtSelectObj(nPartId)
|
||||
VeinMatching.OnSelectPart(nPartId, False)
|
||||
End If
|
||||
EgtSelectObj(nPartId)
|
||||
VeinMatching.OnSelectPart(nPartId, False)
|
||||
nPartId = EgtGetNextPart(nPartId)
|
||||
End While
|
||||
' Aggiorno flag
|
||||
@@ -3163,36 +3005,6 @@ Math.Abs(e.Location.Y - m_locPrev.Y) < m_nRestRadius Then
|
||||
EgtDraw()
|
||||
End Sub
|
||||
|
||||
Private Sub ParkIndBtn_Click() Handles ParkIndBtn.Click
|
||||
If ParkIndBtn.Visibility = Visibility.Collapsed Then
|
||||
Return
|
||||
End If
|
||||
If ParkIndBtn.IsChecked Then
|
||||
If IsNothing(m_SelParkInd) Then
|
||||
m_SelParkInd = New SelParkIndWD(m_MainWindow)
|
||||
End If
|
||||
m_MainWindow.m_CurrentProjectPageUC.CurrentProjectSceneHost.SetValue(Grid.ColumnSpanProperty, 1)
|
||||
m_SelParkInd.SetValue(Grid.ColumnProperty, 1)
|
||||
m_MainWindow.m_CurrentProjectPageUC.SceneHostGrid.Children.Add(m_SelParkInd)
|
||||
Else
|
||||
If Not IsNothing(m_SelParkInd) Then
|
||||
m_MainWindow.m_CurrentProjectPageUC.SceneHostGrid.Children.Remove(m_SelParkInd)
|
||||
m_MainWindow.m_CurrentProjectPageUC.CurrentProjectSceneHost.SetValue(Grid.ColumnSpanProperty, 2)
|
||||
m_SelParkInd = Nothing
|
||||
End If
|
||||
End If
|
||||
EgtZoom(ZM.ALL)
|
||||
End Sub
|
||||
|
||||
Public Sub ReloadListParkInd()
|
||||
If Not IsNothing(m_SelParkInd) Then
|
||||
m_SelParkInd.UpdateList()
|
||||
End If
|
||||
' abilito la notofica di modifica
|
||||
UpdateImageParkInd(False)
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub PartRotOnBtn_Click(sender As Object, e As RoutedEventArgs) Handles PartRotOnBtn.Click
|
||||
EgtSetCurrentContext(m_CurrProjPage.CurrentProjectScene.GetCtx())
|
||||
' Se non ci sono pezzi selezionati o non sono in parcheggio, esco
|
||||
@@ -3316,13 +3128,6 @@ Math.Abs(e.Location.Y - m_locPrev.Y) < m_nRestRadius Then
|
||||
End Sub
|
||||
|
||||
Private Sub NestPage_Unloaded(sender As Object, e As RoutedEventArgs)
|
||||
' se esiste l'elenco dei parcheggi lo nascondo
|
||||
If Not IsNothing(m_SelParkInd) Then
|
||||
' m_SelParkInd.Close()
|
||||
m_MainWindow.m_CurrentProjectPageUC.SceneHostGrid.Children.Remove(m_SelParkInd)
|
||||
m_MainWindow.m_CurrentProjectPageUC.CurrentProjectSceneHost.SetValue(Grid.ColumnSpanProperty, 2)
|
||||
m_SelParkInd = Nothing
|
||||
End If
|
||||
m_bActive = False
|
||||
m_MainWindow.m_CadCutPageUC.m_ProjectMgr.VeinMatchingHide()
|
||||
End Sub
|
||||
@@ -3716,7 +3521,7 @@ Math.Abs(e.Location.Y - m_locPrev.Y) < m_nRestRadius Then
|
||||
' Verifico che almeno un punto sia stato inserito
|
||||
If m_nCountSpotCUT < 1 Then
|
||||
m_MainWindow.m_CurrentProjectPageUC.ClearMessage()
|
||||
m_MainWindow.m_CurrentProjectPageUC.SetWarningMessage(EgtMsg(91213)) ' Insert one spot reg to start.
|
||||
m_MainWindow.m_CurrentProjectPageUC.SetWarningMessage("Insert one spot reg to start.")
|
||||
End If
|
||||
|
||||
' recupero l'elenco non ordinato degli Id dei punti SpotReg (da Office)
|
||||
|
||||
@@ -1,97 +0,0 @@
|
||||
<UserControl x:Class="SelParkIndWD"
|
||||
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}"
|
||||
Background="Transparent">
|
||||
|
||||
<Border Style="{DynamicResource OmagCut_Border}">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="0.1*"/>
|
||||
<ColumnDefinition Width="10*"/>
|
||||
<ColumnDefinition Width="0.1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="0.0*"/>
|
||||
<RowDefinition Height="0.1*"/>
|
||||
<RowDefinition Height="10*"/>
|
||||
<RowDefinition Height="0.1*"/>
|
||||
<RowDefinition Height="0.0*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<TextBlock Name="FilePathTxBl" Grid.Column="1" Grid.Row="1" Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
|
||||
Visibility="Collapsed"/>
|
||||
<!--TextAlignment="Center"
|
||||
FontSize="20"
|
||||
VerticalAlignment="Center"-->
|
||||
<ListBox Name="ParkIndListBox" Grid.Column="1" Grid.Row="2"
|
||||
ItemsSource="{Binding ItemList}" ScrollViewer.CanContentScroll="False" ScrollViewer.HorizontalScrollBarVisibility="Hidden">
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<StackPanel Orientation="Vertical" >
|
||||
<UniformGrid Columns="2" Visibility="{Binding TitleVisibility}">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<Image Source="{Binding ImgTab}" Height="20" Stretch="Uniform"/>
|
||||
<TextBlock Text="{Binding CountInTab}" Height="20" Width="30">
|
||||
<TextBlock.Style>
|
||||
<Style TargetType="TextBlock" BasedOn="{StaticResource OmagCut_ListBoxTextBlock}">
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding IsStatusON}" Value="False">
|
||||
<Setter Property="FontStyle" Value="Oblique"/>
|
||||
<Setter Property="Foreground" Value="{StaticResource OmagCut_White}"/>
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding IsStatusON}" Value="True">
|
||||
<Setter Property="Foreground" Value="black"/>
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</TextBlock.Style>
|
||||
</TextBlock>
|
||||
</StackPanel>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<Image Source="{Binding ImgPark}" Height="20" Stretch="Uniform"/>
|
||||
<TextBlock Text="{Binding CountInPark}" Height="20" Width="30">
|
||||
<TextBlock.Style>
|
||||
<Style TargetType="TextBlock" BasedOn="{StaticResource OmagCut_ListBoxTextBlock}">
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding IsStatusON}" Value="False">
|
||||
<Setter Property="FontStyle" Value="Oblique"/>
|
||||
<Setter Property="Foreground" Value="{StaticResource OmagCut_White}"/>
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding IsStatusON}" Value="True">
|
||||
<Setter Property="Foreground" Value="black"/>
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</TextBlock.Style>
|
||||
</TextBlock>
|
||||
</StackPanel>
|
||||
</UniformGrid>
|
||||
<Image Source="{Binding Img}" Width="120" Stretch="Uniform" Visibility="{Binding MyVisibilityImg}"/>
|
||||
<Viewbox Name="ViewBoxPark" Visibility="{Binding MyVisibilitySvg}">
|
||||
<ContentPresenter Content="{Binding LocalMyCanvas.CurrCanvas}"/>
|
||||
</Viewbox>
|
||||
</StackPanel>
|
||||
</DataTemplate>
|
||||
</ListBox.ItemTemplate>
|
||||
</ListBox>
|
||||
|
||||
<Grid Grid.Column="1" Grid.Row="4" Visibility="Collapsed">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Button Name="OkBtn" Grid.Column="1" Style="{DynamicResource OmagCut_GradientBlueIconButton}" >
|
||||
<Image Source="{DynamicResource VImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
|
||||
|
||||
</Grid>
|
||||
|
||||
</Grid>
|
||||
|
||||
</Border>
|
||||
</UserControl>
|
||||
@@ -1,920 +0,0 @@
|
||||
Imports System.ComponentModel
|
||||
Imports System.Globalization
|
||||
Imports System.Windows.Ink
|
||||
Imports System.Xml
|
||||
Imports EgtUILib
|
||||
Imports OmagCUT.NestPageUC
|
||||
|
||||
Public Class SelParkIndWD
|
||||
|
||||
Private Shared m_MainWindow As MainWindow = DirectCast(Application.Current.MainWindow, MainWindow)
|
||||
Private m_nCtx As Integer = -1
|
||||
Public Const nIndAllOff As Integer = 999
|
||||
|
||||
Public Shared sActualProj As String = String.Empty
|
||||
|
||||
Private m_ParkIndList As New List(Of ParkInd)
|
||||
Public Property ParkIndList As List(Of ParkInd)
|
||||
Get
|
||||
Return m_ParkIndList
|
||||
End Get
|
||||
Set(value As List(Of ParkInd))
|
||||
m_ParkIndList = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Sub New(Owner As Window, Optional nCtx As Integer = -1)
|
||||
'Me.Owner = Owner
|
||||
InitializeComponent()
|
||||
If nCtx > -1 Then m_nCtx = nCtx
|
||||
End Sub
|
||||
|
||||
Public Sub Me_Laoded() Handles Me.Loaded
|
||||
' Aggiorno la lista
|
||||
UpdateList()
|
||||
' Imposto la selezione del primo parcheggio disponibile
|
||||
UpdateDefaultSelection()
|
||||
End Sub
|
||||
|
||||
Public Sub UpdateList()
|
||||
' Carico lista dei pezzi
|
||||
LoadParkInd(m_ParkIndList, m_nCtx)
|
||||
ParkIndListBox.ItemsSource = m_ParkIndList
|
||||
UpdateDefaultSelection()
|
||||
' Forzo l'aggiornamento della grafica
|
||||
ParkIndListBox.Items.Refresh()
|
||||
End Sub
|
||||
|
||||
Public Sub UpdateDefaultSelection()
|
||||
' Procedo a selezionare il primo (E FORSE ANCHE L'UNICO?) parcheggio attivo
|
||||
Dim bFound As Boolean = False
|
||||
For Each ItemPark As ParkInd In m_ParkIndList
|
||||
If ItemPark.IsStatusON Then
|
||||
ParkIndListBox.SelectedItem = ItemPark
|
||||
bFound = True
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
If Not bFound And m_ParkIndList.Count > 0 Then
|
||||
m_ParkIndList(0).Status = GDB_ST.ON_
|
||||
ParkIndListBox.SelectedItem = m_ParkIndList(0)
|
||||
End If
|
||||
'' Provedo a spegnere tutti gli altri parcheggi
|
||||
'For Each ItemParkInd As ParkInd In m_ParkIndList
|
||||
' If ParkIndListBox.SelectedItem.Ind <> ItemParkInd.Ind Then
|
||||
' ItemParkInd.Status = GDB_ST.OFF
|
||||
' SetStatusPartInParkInd(ItemParkInd)
|
||||
' End If
|
||||
'Next
|
||||
End Sub
|
||||
|
||||
Private Sub ParkIndListBox_SelectionChanged() Handles ParkIndListBox.MouseLeftButtonUp
|
||||
' Non so se il click sta accendeno o spegnendo quinid faccio una verifica dello stato attuale del parcheggio
|
||||
Dim localParkInd As ParkInd = ParkIndListBox.SelectedItem
|
||||
' Se l'elemento selezionato è attivo allora esco (perchè altrimenti lo spegnerei)
|
||||
If localParkInd.IsStatusON Then Return
|
||||
Dim bFound As Boolean = False
|
||||
If localParkInd.Ind = nIndAllOff Then
|
||||
localParkInd.Status = GDB_ST.ON_
|
||||
bFound = True
|
||||
End If
|
||||
Dim nPartId As Integer = EgtGetFirstPart()
|
||||
' Cerco il primo pezzo del parcheggio indicato
|
||||
While nPartId <> GDB_ID.NULL And Not bFound
|
||||
Dim sInfoParkInd As String = String.Empty
|
||||
' Se i pezzi non hanno un indice di parcheggio di default vale "0"
|
||||
If Not EgtGetInfo(nPartId, INFO_PARKIND, sInfoParkInd) Then sInfoParkInd = "0"
|
||||
If localParkInd.Ind.ToString = sInfoParkInd Then
|
||||
' Determino lo stato da assegnare al parcheggio (prendo il primo pezzo del parcheggio come riferimento)
|
||||
Dim OppositStat As Integer = If(localParkInd.Status = GDB_ST.ON_, GDB_ST.OFF, GDB_ST.ON_)
|
||||
localParkInd.Status = OppositStat
|
||||
bFound = True
|
||||
' termino la ricerca
|
||||
Exit While
|
||||
End If
|
||||
nPartId = EgtGetNextPart(nPartId)
|
||||
End While
|
||||
' Assegno lo stato del parcheggio a tutti i pezzi i parcheggio
|
||||
If bFound Then
|
||||
SetStatusPartInParkInd(localParkInd, True, m_nCtx)
|
||||
Else
|
||||
' Significa che i pezzi sono tutti in macchina: quindi i pezzi sono (SICURAMENTE?) accesi
|
||||
Dim OppositStat As Integer = If(localParkInd.Status = GDB_ST.ON_, GDB_ST.OFF, GDB_ST.ON_)
|
||||
localParkInd.Status = OppositStat
|
||||
SetStatusPartInParkInd(localParkInd, True, m_nCtx)
|
||||
End If
|
||||
' Se accendo un parcheggio procedo a spegnere tutto gli atri
|
||||
If localParkInd.Status = GDB_ST.ON_ Then
|
||||
For Each ItemParkInd As ParkInd In m_ParkIndList
|
||||
If localParkInd.Ind <> ItemParkInd.Ind Then
|
||||
ItemParkInd.Status = GDB_ST.OFF
|
||||
SetStatusPartInParkInd(ItemParkInd, True, m_nCtx)
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
EgtZoom(ZM.ALL)
|
||||
End Sub
|
||||
|
||||
#Region "METODI SHARED per gestione della lista parcheggi"
|
||||
|
||||
' Restituisce il primo indice di parcheggio libero
|
||||
Public Shared Function NewParkInd(Optional nCtx As Integer = -1) As Integer
|
||||
' recupero il contesto corrente
|
||||
Dim CurrCtx As Integer = EgtGetCurrentContext()
|
||||
' recupero il contesto del progetto
|
||||
Dim ProjCtx As Integer = m_MainWindow.m_CurrentProjectPageUC.CurrentProjectScene.GetCtx()
|
||||
If nCtx > -1 Then ProjCtx = nCtx
|
||||
EgtSetCurrentContext(ProjCtx)
|
||||
Dim LastParkInd As Integer = 0
|
||||
Dim nRawId As Integer = GetCurrentRaw()
|
||||
' Leggo l'indice di parcheggio dei pezzi in tavola
|
||||
Dim nPartId As Integer = EgtGetFirstGroupInGroup(nRawId)
|
||||
While nPartId <> GDB_ID.NULL
|
||||
' Se i pezzi non hanno un indice di parcheggio
|
||||
Dim sInfoParkInd As String = String.Empty
|
||||
If EgtGetInfo(nPartId, INFO_PARKIND, sInfoParkInd) Then
|
||||
If IsNumeric(sInfoParkInd) Then
|
||||
Dim nInfoParkIndn As Integer = CInt(sInfoParkInd)
|
||||
LastParkInd = Math.Max(LastParkInd, nInfoParkIndn)
|
||||
End If
|
||||
End If
|
||||
nPartId = EgtGetNextGroup(nPartId)
|
||||
End While
|
||||
' Leggo l'indice di parcheggio dei pezzi in parcheggio
|
||||
nPartId = EgtGetFirstPart()
|
||||
While nPartId <> GDB_ID.NULL
|
||||
' Se i pezzi non hanno un indice di parcheggio (COPIA della funzione sopra)
|
||||
Dim sInfoParkInd As String = String.Empty
|
||||
If EgtGetInfo(nPartId, INFO_PARKIND, sInfoParkInd) Then
|
||||
If IsNumeric(sInfoParkInd) Then
|
||||
Dim nInfoParkIndn As Integer = CInt(sInfoParkInd)
|
||||
LastParkInd = Math.Max(LastParkInd, nInfoParkIndn)
|
||||
End If
|
||||
End If
|
||||
nPartId = EgtGetNextPart(nPartId)
|
||||
End While
|
||||
' Ripristino il contesto corrente
|
||||
EgtSetCurrentContext(CurrCtx)
|
||||
Return LastParkInd + 1
|
||||
End Function
|
||||
|
||||
' Gestisce lo stato dei pezzi associati al parcheggio indicato
|
||||
Public Shared Sub SetStatusPartInParkInd(localParkInd As ParkInd, Optional bDraw As Boolean = True, Optional nCtx As Integer = -1)
|
||||
If IsNothing(localParkInd) Then Return
|
||||
' recupero il contesto corrente
|
||||
Dim CurrCtx As Integer = EgtGetCurrentContext()
|
||||
' recupero il contesto del progetto
|
||||
Dim ProjCtx As Integer = m_MainWindow.m_CurrentProjectPageUC.CurrentProjectScene.GetCtx()
|
||||
If nCtx > -1 Then ProjCtx = nCtx
|
||||
EgtSetCurrentContext(ProjCtx)
|
||||
Dim nRawId As Integer = GetCurrentRaw()
|
||||
' Pezzi in tavola
|
||||
Dim nPartId As Integer = EgtGetFirstGroupInGroup(nRawId)
|
||||
While nPartId <> GDB_ID.NULL
|
||||
Dim sInfoParkInd As String = String.Empty
|
||||
If Not EgtGetInfo(nPartId, INFO_PARKIND, sInfoParkInd) Then sInfoParkInd = "0"
|
||||
If localParkInd.Ind.ToString = sInfoParkInd Then
|
||||
' Salvo lo stato del parcheggio (per gestire la navigazione) ANCHE SE I PEZZI SONO ACCESI
|
||||
EgtSetInfo(nPartId, INFO_PARKSTATUS, localParkInd.Status)
|
||||
End If
|
||||
nPartId = EgtGetNextGroup(nPartId)
|
||||
End While
|
||||
' Pezzi in parcheggio
|
||||
nPartId = EgtGetFirstPart()
|
||||
While nPartId <> GDB_ID.NULL
|
||||
Dim sInfoParkInd As String = String.Empty
|
||||
If Not EgtGetInfo(nPartId, INFO_PARKIND, sInfoParkInd) Then sInfoParkInd = "0"
|
||||
If localParkInd.Ind.ToString = sInfoParkInd Then
|
||||
' Setto lo stato
|
||||
EgtSetStatus(nPartId, localParkInd.Status)
|
||||
' Salvo lo stato (per gestire la navigazione)
|
||||
EgtSetInfo(nPartId, INFO_PARKSTATUS, localParkInd.Status)
|
||||
End If
|
||||
nPartId = EgtGetNextPart(nPartId)
|
||||
End While
|
||||
If bDraw Then EgtDraw()
|
||||
' Ripristino il contesto corrente
|
||||
EgtSetCurrentContext(CurrCtx)
|
||||
End Sub
|
||||
|
||||
' Restituuisce la lista dei parcheggi del progetto corrente
|
||||
Public Shared Sub LoadParkInd(P_List As List(Of ParkInd), Optional nCtx As Integer = -1)
|
||||
If IsNothing(P_List) Then Return
|
||||
P_List.Clear()
|
||||
P_List.Add(New ParkInd(nIndAllOff, "All off", 0))
|
||||
' recupero il contesto corrente
|
||||
Dim CurrCtx As Integer = EgtGetCurrentContext()
|
||||
' recupero il contesto del progetto
|
||||
Dim ProjCtx As Integer = m_MainWindow.m_CurrentProjectPageUC.CurrentProjectScene.GetCtx()
|
||||
If nCtx > -1 Then ProjCtx = nCtx
|
||||
EgtSetCurrentContext(ProjCtx)
|
||||
Dim nRawId As Integer = GetCurrentRaw()
|
||||
' Pezzi in tavola
|
||||
Dim nPartId As Integer = EgtGetFirstGroupInGroup(nRawId)
|
||||
While nPartId <> GDB_ID.NULL
|
||||
Dim sInfoParkInd As String = String.Empty
|
||||
Dim nInfoParkInd As Integer = -1
|
||||
' Recupero l'indice del parcheggio
|
||||
If EgtGetInfo(nPartId, INFO_PARKIND, sInfoParkInd) Then
|
||||
nInfoParkInd = If(IsNumeric(sInfoParkInd), CInt(sInfoParkInd), -1)
|
||||
Else
|
||||
nInfoParkInd = 0
|
||||
End If
|
||||
' Se l'indice di parcheggio restituito è valido (Maggiore di -1)
|
||||
If nInfoParkInd > -1 Then
|
||||
' Verifico se nella lista dei parcheggi è già presente l'indice indicato
|
||||
Dim localParkInd As ParkInd = P_List.Find(Function(x) x.Ind = nInfoParkInd)
|
||||
' Se non trovo nessun parcheggio con questo indice allora lo aggiungo
|
||||
If IsNothing(localParkInd) Then
|
||||
Dim nStatus As Integer
|
||||
If Not EgtGetInfo(nPartId, INFO_PARKSTATUS, nStatus) Then nStatus = GDB_ST.ON_
|
||||
' EgtGetStatus(nPartId, nStatus)
|
||||
P_List.Add(New ParkInd(nInfoParkInd, "Park_" & nInfoParkInd.ToString, nStatus))
|
||||
End If
|
||||
End If
|
||||
nPartId = EgtGetNextGroup(nPartId)
|
||||
End While
|
||||
' Pezzi in parcheggio
|
||||
nPartId = EgtGetFirstPart()
|
||||
While nPartId <> GDB_ID.NULL
|
||||
Dim sInfoParkInd As String = String.Empty
|
||||
Dim nInfoParkInd As Integer = -1
|
||||
' Recupero l'indice del parcheggio
|
||||
If EgtGetInfo(nPartId, INFO_PARKIND, sInfoParkInd) Then
|
||||
nInfoParkInd = If(IsNumeric(sInfoParkInd), CInt(sInfoParkInd), -1)
|
||||
Else
|
||||
nInfoParkInd = 0
|
||||
End If
|
||||
' Se l'indice di parcheggio restituito è valido (Maggiore di -1)
|
||||
If nInfoParkInd > -1 Then
|
||||
' Verifico se nella lista dei parcheggi è già presente l'indice indicato
|
||||
Dim localParkInd As ParkInd = P_List.Find(Function(x) x.Ind = nInfoParkInd)
|
||||
' Se non trovo nessun parcheggio con questo indice allora lo aggiungo
|
||||
If IsNothing(localParkInd) Then
|
||||
Dim nStatus As Integer
|
||||
If Not EgtGetInfo(nPartId, INFO_PARKSTATUS, nStatus) Then nStatus = GDB_ST.ON_
|
||||
' EgtGetStatus(nPartId, nStatus)
|
||||
P_List.Add(New ParkInd(nInfoParkInd, "Park_" & nInfoParkInd.ToString, nStatus))
|
||||
End If
|
||||
End If
|
||||
nPartId = EgtGetNextPart(nPartId)
|
||||
End While
|
||||
EgtSetCurrentContext(CurrCtx)
|
||||
End Sub
|
||||
|
||||
' Aggiorna la lista dei parcheggi, se "bDraw=true" aggiorno la scena
|
||||
Public Shared Sub UpdateViewOnParkInd(Optional bDraw As Boolean = True)
|
||||
' Ricarico la lista dei parcheggi
|
||||
Dim ListParkInd As New List(Of ParkInd)
|
||||
SelParkIndWD.LoadParkInd(ListParkInd)
|
||||
' Aggiorna la vista dei parcheggi
|
||||
For Each Item As ParkInd In ListParkInd
|
||||
SelParkIndWD.SetStatusPartInParkInd(Item, bDraw)
|
||||
Next
|
||||
End Sub
|
||||
|
||||
' Restituisce il primo parcheggio attivo (
|
||||
Public Shared Function GetCurrentParkIndSelected() As ParkInd
|
||||
Dim ListParkInd As New List(Of ParkInd)
|
||||
SelParkIndWD.LoadParkInd(ListParkInd)
|
||||
' Procedo a selezionare il primo (E ANCHE UNICO?..a volte no..) parcheggio attivo -> guarda funzione UpdateList <-
|
||||
For Each ItemPark As ParkInd In ListParkInd
|
||||
If ItemPark.IsStatusON Then
|
||||
Return ItemPark
|
||||
End If
|
||||
Next
|
||||
Return Nothing
|
||||
End Function
|
||||
|
||||
' Restitusice il nome del file immagine del parcheggio (manance solo dell'Indice di parcheggio e dell'esetensione png)
|
||||
Public Shared Function GetPathCurrProj() As String
|
||||
Dim nProj As Integer = m_MainWindow.m_CurrentProjectPageUC.GetCurrentProject()
|
||||
Dim sParkPath As String = m_MainWindow.GetSaveDir() & "\" & Math.Abs(nProj).ToString("D4") & "_ParkInd_"
|
||||
If Not String.IsNullOrEmpty(sActualProj) Then
|
||||
Dim sDir As String = System.IO.Path.GetDirectoryName(sActualProj)
|
||||
Dim sFile As String = System.IO.Path.GetFileNameWithoutExtension(sActualProj)
|
||||
sParkPath = sDir & "\" & sFile & "_ParkInd_"
|
||||
End If
|
||||
Return sParkPath
|
||||
End Function
|
||||
|
||||
Public Shared Sub CopyImgSvg(sNewFileName As String, Optional nCtx As Integer = -1)
|
||||
If sNewFileName.EndsWith(".nge") Then
|
||||
sNewFileName = sNewFileName.Remove(sNewFileName.Length - 4, 4) & "_ParkInd_"
|
||||
End If
|
||||
Dim Extension As String = ".svg"
|
||||
If Not MainWindow.m_bShowSVGParkInd Then Extension = ".png"
|
||||
Dim ListParkInd As New List(Of ParkInd)
|
||||
' ricarico la lista
|
||||
SelParkIndWD.LoadParkInd(ListParkInd, nCtx)
|
||||
'SelParkIndWD.sActualProj = Path.GetFileNameWithoutExtension(sPath)
|
||||
For Each ItemParkInd As ParkInd In ListParkInd
|
||||
If ItemParkInd.Ind <> 0 And ItemParkInd.Ind <> 999 And ItemParkInd.nPartInPark > 0 Then
|
||||
Try
|
||||
Dim sNewFile As String = sNewFileName & ItemParkInd.Ind.ToString & Extension
|
||||
If MainWindow.m_bShowSVGParkInd Then
|
||||
WriteMyXML(sNewFile, ItemParkInd.LocalMyCanvas)
|
||||
Else
|
||||
If System.IO.File.Exists(sNewFile) Then
|
||||
System.IO.File.Delete(sNewFile)
|
||||
End If
|
||||
System.IO.File.Copy(If(Extension = ".svg", ItemParkInd.Svg, ItemParkInd.Img), sNewFile)
|
||||
End If
|
||||
Catch ex As Exception
|
||||
EgtOutLog("Copia immagine " & If(Extension = ".svg", ItemParkInd.Svg, ItemParkInd.Img) & " di ParkInd non roiscita")
|
||||
End Try
|
||||
End If
|
||||
Next
|
||||
End Sub
|
||||
|
||||
#End Region ' Metodi Shared
|
||||
|
||||
End Class
|
||||
|
||||
Public Class ParkInd
|
||||
Implements INotifyPropertyChanged
|
||||
|
||||
Private m_VisbilityAllOff As Visibility = Visibility.Hidden
|
||||
|
||||
Private m_Ind As Integer
|
||||
Public Property Ind As Integer
|
||||
Get
|
||||
Return m_Ind
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
m_Ind = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
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_Img As String = String.Empty
|
||||
Public Property Img As String
|
||||
Get
|
||||
Return m_Img
|
||||
End Get
|
||||
Set(value As String)
|
||||
m_Img = value
|
||||
NotifyPropertyChanged("MyVisibilityImg")
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_Svg As String = String.Empty
|
||||
Public Property Svg As String
|
||||
Get
|
||||
Return m_Svg
|
||||
End Get
|
||||
Set(value As String)
|
||||
m_Svg = value
|
||||
NotifyPropertyChanged("MyVisibilitySvg")
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_nPartInTable As Integer = 0
|
||||
Public Property nPartInTable As Integer
|
||||
Get
|
||||
Return m_nPartInTable
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
m_nPartInTable = value
|
||||
NotifyPropertyChanged(NameOf(nPartInTable))
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_nPartInPark As Integer = GDB_ST.ON_
|
||||
Public Property nPartInPark As Integer
|
||||
Get
|
||||
Return m_nPartInPark
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
m_nPartInPark = value
|
||||
NotifyPropertyChanged(NameOf(nPartInPark))
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property CountInTab As String
|
||||
Get
|
||||
Return m_nPartInTable.ToString
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property ImgTab As String
|
||||
Get
|
||||
Return DirectCast(Application.Current.MainWindow, MainWindow).GetResourcesDir() & "\MachineButtonsImage\NewIcons\table.png"
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property CountInPark As String
|
||||
Get
|
||||
Return m_nPartInPark.ToString
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property ImgPark As String
|
||||
Get
|
||||
Return DirectCast(Application.Current.MainWindow, MainWindow).GetResourcesDir() & "\MachineButtonsImage\NewIcons\Park.png"
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_Status As Integer
|
||||
|
||||
Public Property Status As Integer
|
||||
Get
|
||||
Return m_Status
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
m_Status = value
|
||||
NotifyPropertyChanged(NameOf(IsStatusON))
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property IsStatusON As Boolean
|
||||
Get
|
||||
Return (m_Status = GDB_ST.ON_)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property MyVisibilityTmg As Visibility
|
||||
Get
|
||||
Return If(Not System.IO.File.Exists(m_Img), Visibility.Collapsed, Visibility.Visible)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property MyVisibilitySvg As Visibility
|
||||
Get
|
||||
Return If(Not System.IO.File.Exists(m_Svg), Visibility.Collapsed, Visibility.Visible)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property TitleVisibility As Visibility
|
||||
Get
|
||||
Return If(m_Ind = 999, m_VisbilityAllOff, Visibility.Visible)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_LocalMyCanvas As MyCanvas
|
||||
Public ReadOnly Property LocalMyCanvas As MyCanvas
|
||||
Get
|
||||
Return m_LocalMyCanvas
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Sub New(Ind As Integer, Name As String, Stat As Integer)
|
||||
m_Ind = Ind
|
||||
m_Name = Name
|
||||
m_Status = Stat
|
||||
' Costruisco il percorso immagine
|
||||
If m_Ind = 0 Then
|
||||
' Se Ind=0 allora applico il default: C:\EgtData\OmagCUT\Resources\MachineButtonsImage\NewIcons
|
||||
m_Img = DirectCast(Application.Current.MainWindow, MainWindow).GetResourcesDir() & "\MachineButtonsImage\NewIcons\Park_On.png"
|
||||
m_Svg = DirectCast(Application.Current.MainWindow, MainWindow).GetResourcesDir() & "\MachineButtonsImage\NewIcons\Park_On.svg"
|
||||
ElseIf m_Ind = 999 Then
|
||||
' Se Ind=0 allora applico il default: C:\EgtData\OmagCUT\Resources\MachineButtonsImage\NewIcons
|
||||
m_Img = DirectCast(Application.Current.MainWindow, MainWindow).GetResourcesDir() & "\MachineButtonsImage\NewIcons\Park_Off.png"
|
||||
m_Svg = DirectCast(Application.Current.MainWindow, MainWindow).GetResourcesDir() & "\MachineButtonsImage\NewIcons\Park_Off.svg"
|
||||
Else
|
||||
m_Img = SelParkIndWD.GetPathCurrProj() & m_Ind.ToString & ".png"
|
||||
m_Svg = SelParkIndWD.GetPathCurrProj() & m_Ind.ToString & ".svg"
|
||||
End If
|
||||
|
||||
If MainWindow.m_bShowSVGParkInd Then
|
||||
Dim CanvWidth As Integer = 145
|
||||
Dim CanvHeight As Integer = CInt(CanvWidth / 1.4)
|
||||
m_LocalMyCanvas = New MyCanvas(CanvWidth, CanvHeight)
|
||||
If System.IO.File.Exists(m_Svg) Then
|
||||
ReadMyXML(m_Svg, m_LocalMyCanvas)
|
||||
m_Img = ""
|
||||
End If
|
||||
Else
|
||||
m_Svg = ""
|
||||
End If
|
||||
|
||||
' Conto il numero di pezzi in Tavola
|
||||
CountPartInTable()
|
||||
' Conto il numero di pezzi in parcheggio
|
||||
CountPartInPark()
|
||||
|
||||
End Sub
|
||||
|
||||
' Conta in numero di pezzi di questo parcheggio in Tavola
|
||||
Private Sub CountPartInTable()
|
||||
Dim nCount As Integer = 0
|
||||
Dim nRawId As Integer = GetCurrentRaw()
|
||||
' Leggo l'indice di parcheggio dei pezzi in tavola
|
||||
Dim nPartId As Integer = EgtGetFirstGroupInGroup(nRawId)
|
||||
While nPartId <> GDB_ID.NULL
|
||||
' Aggiorno il valore del contatore
|
||||
If IncreaseCounterPart(nPartId, nCount) Then
|
||||
UpdateEntInCanvas(nPartId, 0.2)
|
||||
End If
|
||||
nPartId = EgtGetNextGroup(nPartId)
|
||||
End While
|
||||
m_nPartInTable = nCount
|
||||
End Sub
|
||||
|
||||
' Conta il numero di pezzi di questo parcheggio in Parcheggio
|
||||
Private Sub CountPartInPark()
|
||||
Dim nCount As Integer = 0
|
||||
Dim nPartId As Integer = EgtGetFirstPart()
|
||||
While nPartId <> GDB_ID.NULL
|
||||
' Aggiorno il valore del contatore
|
||||
If IncreaseCounterPart(nPartId, nCount) Then
|
||||
UpdateEntInCanvas(nPartId, 1)
|
||||
End If
|
||||
nPartId = EgtGetNextPart(nPartId)
|
||||
End While
|
||||
m_nPartInPark = nCount
|
||||
End Sub
|
||||
|
||||
Private Sub UpdateEntInCanvas(nPartId, dOpacity)
|
||||
If Not IsNothing(m_LocalMyCanvas) Then
|
||||
' modifico il colore del pezzo nel SVG
|
||||
Dim nIdRegion As Integer = EgtGetFirstNameInGroup(nPartId, "Region")
|
||||
If nIdRegion <> GDB_ID.NULL Then
|
||||
Dim nIdEnt As Integer = EgtGetFirstInGroup(nIdRegion)
|
||||
While nIdEnt <> GDB_ID.NULL
|
||||
If EgtGetType(nIdEnt) = GDB_TY.SRF_FRGN Then
|
||||
Exit While
|
||||
End If
|
||||
End While
|
||||
If nIdEnt <> GDB_ID.NULL Then
|
||||
Dim sName As String = ""
|
||||
EgtGetName(nIdEnt, sName)
|
||||
Dim Idpath As MyPath = m_LocalMyCanvas.ListPath.Find(Function(x) x.id = sName)
|
||||
If Not IsNothing(Idpath) Then
|
||||
Idpath.fill_opacity = dOpacity
|
||||
m_LocalMyCanvas.UpdateMyPath(Idpath)
|
||||
Idpath.LoadPath()
|
||||
NotifyPropertyChanged(NameOf(LocalMyCanvas))
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
' Verifica se il pezzo passato (da parcheggio o tavola) appartiene al ParkInd corrente e quindi aggiorna il valore di nCount+=1
|
||||
Private Function IncreaseCounterPart(nPartId As Integer, ByRef nCount As Integer) As Boolean
|
||||
Dim bOk As Boolean = False
|
||||
' Se i pezzi non hanno un indice di parcheggio
|
||||
Dim sInfoParkInd As String = String.Empty
|
||||
Dim nInfoParkInd As Integer = -1
|
||||
' Recupero l'indice del parcheggio
|
||||
If EgtGetInfo(nPartId, INFO_PARKIND, sInfoParkInd) Then
|
||||
nInfoParkInd = If(IsNumeric(sInfoParkInd), CInt(sInfoParkInd), -1)
|
||||
Else
|
||||
nInfoParkInd = 0
|
||||
End If
|
||||
' Se l'indice di parcheggio restituito è valido (Maggiore di -1)
|
||||
If nInfoParkInd > -1 Then
|
||||
' e uguale a quallo del parcheggio correntemente selezionato
|
||||
If nInfoParkInd = m_Ind Then
|
||||
nCount = nCount + 1
|
||||
bOk = True
|
||||
End If
|
||||
End If
|
||||
|
||||
Return bOk
|
||||
End Function
|
||||
|
||||
Public Event PropertyChanged As PropertyChangedEventHandler Implements INotifyPropertyChanged.PropertyChanged
|
||||
|
||||
Public Sub NotifyPropertyChanged(propName As String)
|
||||
RaiseEvent PropertyChanged(Me, New PropertyChangedEventArgs(propName))
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
#Region "ELEMENTI PER LA GESTIONE SVG"
|
||||
|
||||
Public Class MyCanvas
|
||||
|
||||
Private m_CurrCanvas As New Canvas
|
||||
Public Property CurrCanvas As Canvas
|
||||
Get
|
||||
Return m_CurrCanvas
|
||||
End Get
|
||||
Set(value As Canvas)
|
||||
m_CurrCanvas = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_ListPath As New List(Of MyPath)
|
||||
Public Property ListPath As List(Of MyPath)
|
||||
Get
|
||||
Return m_ListPath
|
||||
End Get
|
||||
Set(value As List(Of MyPath))
|
||||
m_ListPath = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_ViewBoxDim As String
|
||||
Public Property ViewBoxDim As String
|
||||
Get
|
||||
Return m_ViewBoxDim
|
||||
End Get
|
||||
Set(value As String)
|
||||
m_ViewBoxDim = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Sub New(Width As Integer, Height As Integer)
|
||||
m_CurrCanvas.Width = Width
|
||||
m_CurrCanvas.Height = Height
|
||||
m_CurrCanvas.ClipToBounds = True
|
||||
End Sub
|
||||
|
||||
Public Sub LoadCanvas()
|
||||
For Each ItemPath As MyPath In m_ListPath
|
||||
m_CurrCanvas.Children.Add(ItemPath.CurrPath)
|
||||
Next
|
||||
End Sub
|
||||
|
||||
Public Sub UpdateMyPath(CurrPath As MyPath)
|
||||
m_CurrCanvas.Children.Remove(CurrPath.CurrPath)
|
||||
m_CurrCanvas.Children.Add(CurrPath.CurrPath)
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
Public Class MyPath
|
||||
|
||||
Private m_CurrPath As New System.Windows.Shapes.Path
|
||||
Public Property CurrPath As System.Windows.Shapes.Path
|
||||
Get
|
||||
Return m_CurrPath
|
||||
End Get
|
||||
Set(value As System.Windows.Shapes.Path)
|
||||
m_CurrPath = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_CanvX As Double
|
||||
Public ReadOnly Property CanvX As Double
|
||||
Get
|
||||
Return m_CanvX
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_CanvY As Double
|
||||
Public ReadOnly Property CanvY As Double
|
||||
Get
|
||||
Return m_CanvY
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_DimX As Double
|
||||
Public ReadOnly Property DimX As Double
|
||||
Get
|
||||
Return m_DimX
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_DimY As Double
|
||||
Public ReadOnly Property DimY As Double
|
||||
Get
|
||||
Return m_DimY
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_id As String
|
||||
Public ReadOnly Property id As String
|
||||
Get
|
||||
Return m_id
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_d As String
|
||||
Public ReadOnly Property d As String
|
||||
Get
|
||||
Return m_d
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_fill As String
|
||||
Public Property fill As String
|
||||
Get
|
||||
Return m_fill
|
||||
End Get
|
||||
Set(value As String)
|
||||
m_fill = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_fill_opacity As Double
|
||||
Public Property fill_opacity As Double
|
||||
Get
|
||||
Return m_fill_opacity
|
||||
End Get
|
||||
Set(value As Double)
|
||||
m_fill_opacity = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_stroke As String
|
||||
Public Property stroke As String
|
||||
Get
|
||||
Return m_stroke
|
||||
End Get
|
||||
Set(value As String)
|
||||
m_stroke = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_stroke_opacity As Double
|
||||
Public Property stroke_opacity As Double
|
||||
Get
|
||||
Return m_stroke_opacity
|
||||
End Get
|
||||
Set(value As Double)
|
||||
m_stroke_opacity = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_stroke_width As Double
|
||||
Public Property stroke_width As Double
|
||||
Get
|
||||
Return m_stroke_width
|
||||
End Get
|
||||
Set(value As Double)
|
||||
m_stroke_width = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Sub New(Id As String, D As String, CanvX As Double, CanvY As Double, DimX As Double, DimY As Double, Fill As String, FillOpacity As Double, Stroke As String, StrokeOpacity As Double)
|
||||
m_id = Id
|
||||
m_d = D
|
||||
m_CanvX = CanvX
|
||||
m_CanvY = CanvY
|
||||
m_DimX = DimX
|
||||
m_DimY = DimY
|
||||
m_fill = Fill
|
||||
m_fill_opacity = FillOpacity
|
||||
m_stroke = Stroke
|
||||
m_stroke_opacity = StrokeOpacity
|
||||
LoadPath()
|
||||
End Sub
|
||||
|
||||
Public Sub LoadPath()
|
||||
' Carico la geometria
|
||||
m_CurrPath.Data = Geometry.Parse(d)
|
||||
' Carico il colore di sfondo
|
||||
SetBrushFromRGBString(m_fill, m_CurrPath.Fill)
|
||||
' Applico l'opacità della superificie
|
||||
m_CurrPath.Opacity = m_fill_opacity
|
||||
' Calcolo e applico la traslazione e la scalatura
|
||||
Dim myTransformGroup As New TransformGroup()
|
||||
Dim ScaleX As Double = m_CanvX / DimX
|
||||
Dim ScaleY As Double = m_CanvY / DimY
|
||||
Dim OffX As Double = (m_CanvX - Math.Min(ScaleX, ScaleY) * DimX) / 2
|
||||
Dim OffY As Double = (m_CanvY - Math.Min(ScaleX, ScaleY) * DimY) / 2
|
||||
myTransformGroup.Children.Add(New ScaleTransform(Math.Min(ScaleX, ScaleY), Math.Min(ScaleX, ScaleY)))
|
||||
myTransformGroup.Children.Add(New TranslateTransform(OffX, OffY))
|
||||
m_CurrPath.RenderTransform = myTransformGroup
|
||||
End Sub
|
||||
|
||||
Private Sub SetBrushFromRGBString(sFill As String, ByRef brFill As Brush)
|
||||
If String.IsNullOrEmpty(sFill) Then
|
||||
brFill = Brushes.DarkRed
|
||||
Return
|
||||
End If
|
||||
Dim s1 As String = sFill
|
||||
If s1.Contains("rgb") Then
|
||||
s1 = s1.Replace("rgb(", "")
|
||||
s1 = s1.Replace(")", "")
|
||||
Dim s2 As String = ""
|
||||
For Each s As String In s1.Split(",")
|
||||
s2 &= CInt(s).ToString("x2")
|
||||
Next
|
||||
brFill = New BrushConverter().ConvertFrom("#" & s2)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
Public Module XMLReader
|
||||
|
||||
Public Sub ReadMyXML(FilePath As String, Canv As MyCanvas)
|
||||
'Create the XML Reader
|
||||
Dim m_xmlr As XmlTextReader = New XmlTextReader(FilePath)
|
||||
'Disable whitespace so that you don't have to read over whitespaces
|
||||
m_xmlr.WhitespaceHandling = WhitespaceHandling.None
|
||||
' Leggo la prima riga: '?xml' tag
|
||||
m_xmlr.Read()
|
||||
' Passo a leggere la successiva: 'svg' tag
|
||||
m_xmlr.Read()
|
||||
' Leggo gli attributi di questo tag (dimensioni)
|
||||
Dim ViewBoxDim = m_xmlr.GetAttribute("viewBox")
|
||||
Canv.ViewBoxDim = ViewBoxDim
|
||||
' Elaboro i dati per avere la scalatura del disegno
|
||||
Dim DimViewBox As String() = ViewBoxDim.ToString.Split(" ")
|
||||
Dim DimX As Integer = Math.Abs(CInt(DimViewBox(2))) + Math.Abs(CInt(DimViewBox(0)))
|
||||
Dim DimY As Integer = Math.Abs(CInt(DimViewBox(3))) + Math.Abs(CInt(DimViewBox(1)))
|
||||
|
||||
' Leggo in loop i tag: 'path'
|
||||
While Not m_xmlr.EOF
|
||||
m_xmlr.Read()
|
||||
If Not m_xmlr.IsStartElement() Then
|
||||
Continue While
|
||||
End If
|
||||
' recupero il valore dell'attributo 'id'
|
||||
Dim idAttribute = m_xmlr.GetAttribute("id")
|
||||
' recupero il valore dell'attributo 'd'
|
||||
Dim dAttribute = m_xmlr.GetAttribute("d")
|
||||
' recupero il valore dell'attributo 'fill'
|
||||
Dim fillAttribute = m_xmlr.GetAttribute("fill")
|
||||
' recupero il valore dell'attributo 'fill-opacity'
|
||||
Dim fillOpacityAttribute = m_xmlr.GetAttribute("fill-opacity")
|
||||
' recupero il valore dell'attributo 'stroke'
|
||||
Dim strokeAttribute = m_xmlr.GetAttribute("stroke")
|
||||
' recupero il valore dell'attributo 'stroke-opacity'
|
||||
Dim strokeOpacityAttribute = m_xmlr.GetAttribute("stroke-opacity")
|
||||
' recupero il valore dell'attributo 'stroke - Width'
|
||||
Dim strokeWidthAttribute = m_xmlr.GetAttribute("stroke-width")
|
||||
' carico l'elemento in lista solo se esiste un'immagine
|
||||
If Not String.IsNullOrEmpty(idAttribute) And Not String.IsNullOrEmpty(dAttribute) Then
|
||||
Dim fillOpacity As Double = 1 ' CDbl(fillOpacityAttribute)
|
||||
StringToDouble(fillOpacityAttribute, fillOpacity)
|
||||
Dim strokeOpacity As Double = 1 ' CDbl(strokeOpacityAttribute)
|
||||
StringToDouble(strokeOpacityAttribute, strokeOpacity)
|
||||
Canv.ListPath.Add(New MyPath(idAttribute, dAttribute, Canv.CurrCanvas.Width, Canv.CurrCanvas.Height, DimX, DimY, fillAttribute, fillOpacity, strokeAttribute, strokeOpacity))
|
||||
End If
|
||||
|
||||
End While
|
||||
' Libero il file dalla lettura
|
||||
m_xmlr.Close()
|
||||
' popolo la canvas con le Ptah che ho caricato
|
||||
Canv.LoadCanvas()
|
||||
End Sub
|
||||
|
||||
Public Sub WriteMyXML(FilePath As String, Canv As MyCanvas)
|
||||
|
||||
Dim _namespaceDefault As String = "http://www.w3.org/2000/svg"
|
||||
|
||||
Dim doc As New Xml.XmlDocument
|
||||
|
||||
Dim elm As System.Xml.XmlNode
|
||||
Dim elmSub As System.Xml.XmlNode
|
||||
Dim elmMain As Xml.XmlNode
|
||||
|
||||
doc = New Xml.XmlDocument
|
||||
|
||||
elmMain = doc.CreateElement("svg")
|
||||
elmSub = elmMain.Attributes.Append(doc.CreateAttribute("viewBox"))
|
||||
elmSub.Value = Canv.ViewBoxDim
|
||||
elmSub = elmMain.Attributes.Append(doc.CreateAttribute("xmlns"))
|
||||
elmSub.Value = _namespaceDefault
|
||||
|
||||
For Each itemPath As MyPath In Canv.ListPath
|
||||
elm = elmMain.AppendChild(doc.CreateElement("path"))
|
||||
|
||||
elmSub = elm.Attributes.Append(doc.CreateAttribute("id"))
|
||||
elmSub.Value = itemPath.id
|
||||
|
||||
elmSub = elm.Attributes.Append(doc.CreateAttribute("d"))
|
||||
elmSub.Value = itemPath.d
|
||||
|
||||
If Not String.IsNullOrEmpty(itemPath.fill) Then
|
||||
elmSub = elm.Attributes.Append(doc.CreateAttribute("fill"))
|
||||
elmSub.Value = itemPath.fill
|
||||
End If
|
||||
|
||||
If Not String.IsNullOrEmpty(itemPath.fill_opacity) Then
|
||||
elmSub = elm.Attributes.Append(doc.CreateAttribute("fill-opacity"))
|
||||
elmSub.Value = itemPath.fill_opacity.ToString(CultureInfo.InvariantCulture)
|
||||
End If
|
||||
|
||||
If Not String.IsNullOrEmpty(itemPath.stroke) Then
|
||||
elmSub = elm.Attributes.Append(doc.CreateAttribute("stroke"))
|
||||
elmSub.Value = itemPath.stroke
|
||||
End If
|
||||
|
||||
If Not String.IsNullOrEmpty(itemPath.stroke_opacity) Then
|
||||
elmSub = elm.Attributes.Append(doc.CreateAttribute("stroke-opacity"))
|
||||
elmSub.Value = itemPath.stroke_opacity.ToString(CultureInfo.InvariantCulture)
|
||||
End If
|
||||
|
||||
If Not String.IsNullOrEmpty(itemPath.stroke_width) Then
|
||||
elmSub = elm.Attributes.Append(doc.CreateAttribute("stroke-width"))
|
||||
elmSub.Value = itemPath.stroke_width.ToString(CultureInfo.InvariantCulture)
|
||||
End If
|
||||
|
||||
Next
|
||||
|
||||
doc.AppendChild(doc.CreateXmlDeclaration("1.0", "UTF-8", ""))
|
||||
doc.AppendChild(elmMain)
|
||||
doc.Save(FilePath)
|
||||
|
||||
End Sub
|
||||
|
||||
End Module
|
||||
|
||||
#End Region ' Elementi per la gestione SVG
|
||||
@@ -33,8 +33,8 @@
|
||||
Me.Top = Owner.Top + Owner.Height / 2 - Me.Height / 2
|
||||
Me.Left = Owner.Left + Owner.Width / 2 - Me.Width / 2
|
||||
|
||||
TitleWDTxbl.Text = EgtUILib.EgtMsg(91232) ' Selection parts
|
||||
NbrOfPartsMsg.Text = EgtUILib.EgtMsg(91233) ' Number of parts
|
||||
TitleWDTxbl.Text = "Selection parts"
|
||||
NbrOfPartsMsg.Text = "Number of parts"
|
||||
NbrOfParts.Text = m_NumberOfParts.ToString
|
||||
End Sub
|
||||
|
||||
|
||||
@@ -1,82 +0,0 @@
|
||||
<Window x:Class="SelectTableWD"
|
||||
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}"
|
||||
Title="ChooseTool" Height="282.6" Width="326.6" WindowStyle="None"
|
||||
ResizeMode="NoResize" ShowInTaskbar="False" AllowsTransparency="True"
|
||||
Background="Transparent">
|
||||
|
||||
<Border Style="{DynamicResource OmagCut_Border}">
|
||||
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
<ColumnDefinition Width="4*"/>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="1.5*"/>
|
||||
<RowDefinition Height="0.1*"/>
|
||||
<RowDefinition Height="1.0*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<TextBlock Name="Title" Grid.Row="1" Grid.Column="1"
|
||||
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||
|
||||
<ItemsControl Name="TableList"
|
||||
Grid.Row="2" Grid.Column="1">
|
||||
<ItemsControl.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<StackPanel Orientation="Horizontal"
|
||||
HorizontalAlignment="Center"/>
|
||||
</ItemsPanelTemplate>
|
||||
</ItemsControl.ItemsPanel>
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<RadioButton GroupName="TabGrp"
|
||||
IsChecked="{Binding IsActive}"
|
||||
Width="60" Height="60">
|
||||
|
||||
<RadioButton.Style>
|
||||
<Style TargetType="ToggleButton" BasedOn="{StaticResource OmagCut_ToggleButton}">
|
||||
<Style.Triggers>
|
||||
<Trigger Property="IsChecked" Value="True">
|
||||
<Setter Property="Foreground" Value="white"/>
|
||||
<Setter Property="Background" Value="{StaticResource OmagCut_Blue}"/>
|
||||
</Trigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</RadioButton.Style>
|
||||
<Grid>
|
||||
<TextBlock Text="{Binding sName}" Background="Transparent"/>
|
||||
<Image Source="{Binding ImgTab}" Margin="0,10,0,0"
|
||||
Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
</Grid>
|
||||
|
||||
</RadioButton>
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
</ItemsControl>
|
||||
|
||||
<Grid Grid.Column="1" Grid.Row="4">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Button Name="OkBtn" Grid.Column="1" Style="{DynamicResource OmagCut_GradientBlueIconButton}" >
|
||||
<Image Source="{DynamicResource VImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="ExitBtn" Grid.Column="3" Style="{DynamicResource OmagCut_GradientBlueIconButton}" IsCancel="True">
|
||||
<Image Source="{DynamicResource XImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Border>
|
||||
</Window>
|
||||
@@ -1,96 +0,0 @@
|
||||
Imports System.ComponentModel
|
||||
|
||||
Public Class SelectTableWD
|
||||
Private m_MainWindow As MainWindow = DirectCast(Application.Current.MainWindow, MainWindow)
|
||||
|
||||
Private m_nSelectedTable As Integer = 0
|
||||
Public ReadOnly Property nSelectedTable As Integer
|
||||
Get
|
||||
Return m_nSelectedTable
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Sub New(Owner As Window)
|
||||
Me.Owner = Owner
|
||||
Me.WindowStartupLocation = WindowStartupLocation.CenterOwner
|
||||
InitializeComponent()
|
||||
End Sub
|
||||
|
||||
Public CurrTableList As New List(Of TableToChange)
|
||||
|
||||
Private Sub ChangeTable_Initialized() Handles Me.Initialized
|
||||
|
||||
Title.Text = EgtUILib.EgtMsg(91234) ' Seleziona la tavola da usare
|
||||
' recuepero l'inidce della tavola corrente
|
||||
Dim nIndeXCurrTab As Integer = GetCurrentTable()
|
||||
' creo la lista delle tavole disponibili (attivo il bottone della tavola attualmente in uso)
|
||||
For nInd As Integer = 0 To GetTableCount() - 1
|
||||
CurrTableList.Add(New TableToChange("Tab", (nInd + 1).ToString, ((nInd + 1) = nIndeXCurrTab)))
|
||||
Next
|
||||
End Sub
|
||||
|
||||
Private Sub ChangeTable_Loaded() Handles Me.Loaded
|
||||
TableList.ItemsSource = CurrTableList
|
||||
End Sub
|
||||
|
||||
Private Sub OkBtn_Click(sender As Object, e As RoutedEventArgs) Handles OkBtn.Click
|
||||
' recupero l'indice della tavola impostata
|
||||
For Each ItemTab As TableToChange In CurrTableList
|
||||
If ItemTab.IsActive Then
|
||||
m_nSelectedTable = ItemTab.nIndex
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
DialogResult = True
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
Public Class TableToChange
|
||||
Implements INotifyPropertyChanged
|
||||
|
||||
Private Property m_sName As String = "Tab"
|
||||
Public ReadOnly Property sName As String
|
||||
Get
|
||||
Return m_sName
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property ImgTab As String
|
||||
Get
|
||||
Return DirectCast(Application.Current.MainWindow, MainWindow).GetResourcesDir() & "\MachineButtonsImage\table.png"
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private Property m_nIndex As Integer = 3
|
||||
Public ReadOnly Property nIndex As Integer
|
||||
Get
|
||||
Return m_nIndex
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_bIsActive As Boolean = False
|
||||
Public Property IsActive As Boolean
|
||||
Get
|
||||
Return m_bIsActive
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
m_bIsActive = value
|
||||
NotifyPropertyChanged("IsActive")
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Sub New(Name As String, Ind As Integer, IsCurrent As Boolean)
|
||||
m_sName = Name & " " & Ind.ToString
|
||||
m_nIndex = Ind
|
||||
m_bIsActive = IsCurrent
|
||||
NotifyPropertyChanged("IsActive")
|
||||
End Sub
|
||||
|
||||
Public Event PropertyChanged(sender As Object, e As PropertyChangedEventArgs) Implements INotifyPropertyChanged.PropertyChanged
|
||||
|
||||
Public Sub NotifyPropertyChanged(propName As String)
|
||||
RaiseEvent PropertyChanged(Me, New PropertyChangedEventArgs(propName))
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
@@ -1,4 +1,6 @@
|
||||
Imports EgtUILib
|
||||
Imports System.Net
|
||||
Imports System.Windows.Forms.Integration
|
||||
Imports EgtUILib
|
||||
|
||||
Public Module SplitAuto
|
||||
|
||||
@@ -49,296 +51,132 @@ Public Module SplitAuto
|
||||
While nOperId <> GDB_ID.NULL
|
||||
' verifico sia una lavorazione valida della fase corrente
|
||||
If IsValidMachining(nOperId) And EgtGetOperationPhase(nOperId) = nCurrPhase Then
|
||||
Dim Mach As New SplitMach
|
||||
If CreateMach(Mach, nOperId) Then MachSplitList.Add(Mach)
|
||||
'' se appartiene ad un grezzo attivo la inserisco in lista
|
||||
'If IsMachiningInActiveRaw(nOperId) Then
|
||||
' Dim Mach As New SplitMach
|
||||
' Mach.m_nEntId = GDB_ID.NULL
|
||||
' ' identificativo
|
||||
' Mach.m_nId = nOperId
|
||||
' ' eventuali lavorazioni inglobate
|
||||
' Dim sInfo As String = String.Empty
|
||||
' If EgtGetInfo(nOperId, INFO_MCH_OTHMID, sInfo) Then
|
||||
' Dim sItems() As String = sInfo.Split(",".ToCharArray)
|
||||
' For Each sId As String In sItems
|
||||
' Dim nId As Integer = 0
|
||||
' StringToInt(sId, nId)
|
||||
' If nId > 0 Then Mach.m_vOthId.Add(nId)
|
||||
' Next
|
||||
' End If
|
||||
' ' tipo
|
||||
' Mach.m_nType = EgtGetOperationType(nOperId)
|
||||
' ' layer di origine
|
||||
' EgtGetInfo(nOperId, INFO_MCH_LAYER, Mach.m_sLay)
|
||||
' ' se taglio con lama
|
||||
' If Mach.m_nType = MCH_OY.SAWING Then
|
||||
' ' verifica interferenza
|
||||
' If Mach.m_sLay = NAME_OUTLOOP Then
|
||||
' EgtVerifyMachining(nOperId, Mach.m_nInterf)
|
||||
' For Each nId As Integer In Mach.m_vOthId
|
||||
' Dim nRes As Integer = FMI_TYPE.LI Or FMI_TYPE.RM Or FMI_TYPE.LO
|
||||
' EgtVerifyMachining(nId, nRes)
|
||||
' Mach.m_nInterf = Mach.m_nInterf Or nRes
|
||||
' Next
|
||||
' Else
|
||||
' Mach.m_nInterf = FMI_TYPE.NONE
|
||||
' End If
|
||||
' ' la imposto come lavorazione corrente
|
||||
' EgtSetCurrMachining(nOperId)
|
||||
' ' inversione
|
||||
' EgtGetMachiningParam(MCH_MP.INVERT, Mach.m_bInvert)
|
||||
' ' recupero l'angolo di fianco
|
||||
' EgtGetMachiningParam(MCH_MP.SIDEANGLE, Mach.m_dSideAng)
|
||||
' ' recupero allungamento iniziale e finale (negativi vicino ad angoli interni)
|
||||
' Dim dStartAddLen As Double = -10
|
||||
' EgtGetMachiningParam(MCH_MP.STARTADDLEN, dStartAddLen)
|
||||
' Dim dEndAddLen As Double = -10
|
||||
' EgtGetMachiningParam(MCH_MP.ENDADDLEN, dEndAddLen)
|
||||
' ' recupero tipo entità, angolo con entità precedente e successiva, lunghezze libere iniziale e finale
|
||||
' Mach.m_bIsLine = True
|
||||
' Mach.m_dPrevAng = 0
|
||||
' Mach.m_dNextAng = 0
|
||||
' Mach.m_dStartFreeLen = FREELEN_INF + 1
|
||||
' Mach.m_dEndFreeLen = FREELEN_INF + 1
|
||||
' Dim nEntId, nSub As Integer
|
||||
' If EgtGetMachiningGeometry(0, nEntId, nSub) Then
|
||||
' ' EgtGetType( nEntId) = GDB_TY.CRV_ARC OrElse
|
||||
' If EgtGetType(nEntId) = GDB_TY.CRV_COMPO Then Mach.m_bIsLine = False
|
||||
' EgtGetInfo(nEntId, If(Not Mach.m_bInvert, INFO_PREVANG, INFO_NEXTANG), Mach.m_dPrevAng)
|
||||
' EgtGetInfo(nEntId, If(Not Mach.m_bInvert, INFO_NEXTANG, INFO_PREVANG), Mach.m_dNextAng)
|
||||
' EgtGetInfo(nEntId, If(Not Mach.m_bInvert, INFO_START_FREELEN, INFO_END_FREELEN), Mach.m_dStartFreeLen)
|
||||
' EgtGetInfo(nEntId, If(Not Mach.m_bInvert, INFO_END_FREELEN, INFO_START_FREELEN), Mach.m_dEndFreeLen)
|
||||
' Mach.m_bEnableInvert = GetEnableInvert(nEntId)
|
||||
' EgtMidVector(nEntId, GDB_ID.ROOT, Mach.m_vtDir)
|
||||
' If Mach.m_bInvert Then Mach.m_vtDir = -Mach.m_vtDir
|
||||
' Mach.m_nEntId = nEntId
|
||||
' EgtGetInfo(nOperId, "ManageLeadInOnIntCorner", Mach.m_bMngLeadInOnIntCorner)
|
||||
' End If
|
||||
' ' verifico se trasformabile in un taglio di separazione (almeno da un lato)
|
||||
' If (dStartAddLen > -EPS_SMALL Or dEndAddLen > -EPS_SMALL Or Mach.m_bMngLeadInOnIntCorner) And
|
||||
' Mach.m_sLay = NAME_OUTLOOP And ( Mach.m_nInterf And FMI_TYPE.RM) = 0 Then
|
||||
' Dim nRes As Integer = EgtVerifyCutAsSplitting(nOperId)
|
||||
' Dim bIn As Boolean = False
|
||||
' Dim bOut As Boolean = False
|
||||
' CanExtendSides(Mach, bIn, bOut)
|
||||
' Mach.m_bCanStartAll = ((dStartAddLen > -EPS_SMALL Or Mach.m_bMngLeadInOnIntCorner) And (nRes And CAR_RES.LI_OK) <> 0) And
|
||||
' Mach.m_dStartFreeLen > FREELEN_INF And Mach.m_bIsLine And bIn
|
||||
' Mach.m_bCanEndAll = ((dEndAddLen > -EPS_SMALL Or Mach.m_bMngLeadInOnIntCorner) And (nRes And CAR_RES.LO_OK) <> 0) And
|
||||
' Mach.m_dEndFreeLen > FREELEN_INF And Mach.m_bIsLine And bOut
|
||||
' If nRes = 0 Then
|
||||
' EgtOutLog("Operation ID " & nOperId.ToString & " isn't split cut! verify depth machining.")
|
||||
' End If
|
||||
|
||||
' ElseIf (dStartAddLen > -EPS_SMALL Or dEndAddLen > -EPS_SMALL Or Mach.m_bMngLeadInOnIntCorner) And
|
||||
' Mach.m_sLay = NAME_OUTLOOP And
|
||||
' (Mach.m_nInterf = FMI_TYPE.LI Or Mach.m_nInterf = FMI_TYPE.LO Or Mach.m_nInterf = FMI_TYPE.RM) Then
|
||||
' Dim nRes As Integer = EgtVerifyCutAsSplitting(nOperId)
|
||||
' Dim bIn As Boolean = False
|
||||
' Dim bOut As Boolean = False
|
||||
' CanExtendSides(Mach, bIn, bOut)
|
||||
' ' And (nRes And CAR_RES.LI_OK) <> 0 : da aggiungere
|
||||
' Mach.m_bCanStartAll = (dStartAddLen > -EPS_SMALL Or Mach.m_bMngLeadInOnIntCorner) And
|
||||
' Mach.m_dStartFreeLen > FREELEN_INF And Mach.m_bIsLine And bIn And
|
||||
' Mach.m_nInterf <> FMI_TYPE.LI
|
||||
' ' And (nRes And CAR_RES.LO_OK) <> 0 : da aggiungere come sopra
|
||||
' Mach.m_bCanEndAll = (dEndAddLen > -EPS_SMALL Or Mach.m_bMngLeadInOnIntCorner) And
|
||||
' Mach.m_dEndFreeLen > FREELEN_INF And Mach.m_bIsLine And bOut And
|
||||
' Mach.m_nInterf <> FMI_TYPE.LO
|
||||
' If nRes = 0 Then
|
||||
' EgtOutLog("Operation ID " & nOperId.ToString & " isn't split cut! verify depth machining.")
|
||||
' End If
|
||||
' End If
|
||||
' ' se trasformabile in taglio di separazione, verifico se lo è
|
||||
' If Mach.m_bCanStartAll Or Mach.m_bCanEndAll Then
|
||||
' EgtSetCurrMachining(nOperId)
|
||||
' Dim nLiType As Integer
|
||||
' EgtGetMachiningParam(MCH_MP.LEADINTYPE, nLiType)
|
||||
' Dim nLoType As Integer
|
||||
' EgtGetMachiningParam(MCH_MP.LEADOUTTYPE, nLoType)
|
||||
' Mach.m_bStartAll = (nLiType = MCH_SAW_LI.EXT_CENT Or nLiType = MCH_SAW_LI.EXT_OUT)
|
||||
' Mach.m_bEndAll = (nLoType = MCH_SAW_LO.EXT_CENT Or nLoType = MCH_SAW_LO.EXT_OUT)
|
||||
' Else
|
||||
' Mach.m_bStartAll = False
|
||||
' Mach.m_bEndAll = False
|
||||
' End If
|
||||
' ' Waterjet
|
||||
' ElseIf Mach.m_nType = MCH_OY.WATERJETTING Then
|
||||
' Mach.m_nInterf = FMI_TYPE.NONE
|
||||
' ' recupero l'angolo di fianco
|
||||
' EgtGetMachiningParam(MCH_MP.SIDEANGLE, Mach.m_dSideAng)
|
||||
' Mach.m_bCanStartAll = False
|
||||
' Mach.m_bCanEndAll = False
|
||||
' Mach.m_bStartAll = False
|
||||
' Mach.m_bEndAll = False
|
||||
' ' Forature e fresature
|
||||
' Else
|
||||
' Mach.m_nInterf = FMI_TYPE.NONE
|
||||
' Mach.m_dSideAng = 0
|
||||
' Mach.m_bCanStartAll = False
|
||||
' Mach.m_bCanEndAll = False
|
||||
' Mach.m_bStartAll = False
|
||||
' Mach.m_bEndAll = False
|
||||
' End If
|
||||
' ' abilitazione
|
||||
' Mach.m_bEnabled = Not EgtExistsInfo(nOperId, INFO_MCH_USER_OFF)
|
||||
' ' pausa
|
||||
' Mach.m_bPause = GetPause(nOperId)
|
||||
' ' inserisco in lista
|
||||
' MachSplitList.Add(Mach)
|
||||
' ' altrimenti la disattivo
|
||||
'Else
|
||||
' EgtSetOperationMode(nOperId, False)
|
||||
'End If
|
||||
|
||||
' se appartiene ad un grezzo attivo la inserisco in lista
|
||||
If IsMachiningInActiveRaw(nOperId) Then
|
||||
Dim Mach As New SplitMach
|
||||
Mach.m_nEntId = GDB_ID.NULL
|
||||
' identificativo
|
||||
Mach.m_nId = nOperId
|
||||
' eventuali lavorazioni inglobate
|
||||
Dim sInfo As String = String.Empty
|
||||
If EgtGetInfo(nOperId, INFO_MCH_OTHMID, sInfo) Then
|
||||
Dim sItems() As String = sInfo.Split(",".ToCharArray)
|
||||
For Each sId As String In sItems
|
||||
Dim nId As Integer = 0
|
||||
StringToInt(sId, nId)
|
||||
If nId > 0 Then Mach.m_vOthId.Add(nId)
|
||||
Next
|
||||
End If
|
||||
' tipo
|
||||
Mach.m_nType = EgtGetOperationType(nOperId)
|
||||
' layer di origine
|
||||
EgtGetInfo(nOperId, INFO_MCH_LAYER, Mach.m_sLay)
|
||||
' se taglio con lama
|
||||
If Mach.m_nType = MCH_OY.SAWING Then
|
||||
' verifica interferenza
|
||||
If Mach.m_sLay = NAME_OUTLOOP Then
|
||||
EgtVerifyMachining(nOperId, Mach.m_nInterf)
|
||||
For Each nId As Integer In Mach.m_vOthId
|
||||
Dim nRes As Integer = FMI_TYPE.LI Or FMI_TYPE.RM Or FMI_TYPE.LO
|
||||
EgtVerifyMachining(nId, nRes)
|
||||
Mach.m_nInterf = Mach.m_nInterf Or nRes
|
||||
Next
|
||||
Else
|
||||
Mach.m_nInterf = FMI_TYPE.NONE
|
||||
End If
|
||||
' la imposto come lavorazione corrente
|
||||
EgtSetCurrMachining(nOperId)
|
||||
' inversione
|
||||
EgtGetMachiningParam(MCH_MP.INVERT, Mach.m_bInvert)
|
||||
' recupero l'angolo di fianco
|
||||
EgtGetMachiningParam(MCH_MP.SIDEANGLE, Mach.m_dSideAng)
|
||||
' recupero allungamento iniziale e finale (negativi vicino ad angoli interni)
|
||||
Dim dStartAddLen As Double = -10
|
||||
EgtGetMachiningParam(MCH_MP.STARTADDLEN, dStartAddLen)
|
||||
Dim dEndAddLen As Double = -10
|
||||
EgtGetMachiningParam(MCH_MP.ENDADDLEN, dEndAddLen)
|
||||
' recupero tipo entità, angolo con entità precedente e successiva, lunghezze libere iniziale e finale
|
||||
Mach.m_bIsLine = True
|
||||
Mach.m_dPrevAng = 0
|
||||
Mach.m_dNextAng = 0
|
||||
Mach.m_dStartFreeLen = FREELEN_INF + 1
|
||||
Mach.m_dEndFreeLen = FREELEN_INF + 1
|
||||
Dim nEntId, nSub As Integer
|
||||
If EgtGetMachiningGeometry(0, nEntId, nSub) Then
|
||||
' EgtGetType( nEntId) = GDB_TY.CRV_ARC OrElse
|
||||
If EgtGetType(nEntId) = GDB_TY.CRV_COMPO Then Mach.m_bIsLine = False
|
||||
EgtGetInfo(nEntId, If(Not Mach.m_bInvert, INFO_PREVANG, INFO_NEXTANG), Mach.m_dPrevAng)
|
||||
EgtGetInfo(nEntId, If(Not Mach.m_bInvert, INFO_NEXTANG, INFO_PREVANG), Mach.m_dNextAng)
|
||||
EgtGetInfo(nEntId, If(Not Mach.m_bInvert, INFO_START_FREELEN, INFO_END_FREELEN), Mach.m_dStartFreeLen)
|
||||
EgtGetInfo(nEntId, If(Not Mach.m_bInvert, INFO_END_FREELEN, INFO_START_FREELEN), Mach.m_dEndFreeLen)
|
||||
Mach.m_bEnableInvert = GetEnableInvert(nEntId)
|
||||
EgtMidVector(nEntId, GDB_ID.ROOT, Mach.m_vtDir)
|
||||
If Mach.m_bInvert Then Mach.m_vtDir = -Mach.m_vtDir
|
||||
Mach.m_nEntId = nEntId
|
||||
EgtGetInfo(nOperId, "ManageLeadInOnIntCorner", Mach.m_bMngLeadInOnIntCorner)
|
||||
End If
|
||||
' verifico se trasformabile in un taglio di separazione (almeno da un lato)
|
||||
If (dStartAddLen > -EPS_SMALL Or dEndAddLen > -EPS_SMALL Or Mach.m_bMngLeadInOnIntCorner) And
|
||||
Mach.m_sLay = NAME_OUTLOOP And Mach.m_nInterf = FMI_TYPE.NONE Then
|
||||
Dim nRes As Integer = EgtVerifyCutAsSplitting(nOperId)
|
||||
Dim bIn As Boolean = False
|
||||
Dim bOut As Boolean = False
|
||||
CanExtendSides(Mach, bIn, bOut)
|
||||
Mach.m_bCanStartAll = ((dStartAddLen > -EPS_SMALL Or Mach.m_bMngLeadInOnIntCorner) And (nRes And CAR_RES.LI_OK) <> 0) And
|
||||
Mach.m_dStartFreeLen > FREELEN_INF And Mach.m_bIsLine And bIn
|
||||
Mach.m_bCanEndAll = ((dEndAddLen > -EPS_SMALL Or Mach.m_bMngLeadInOnIntCorner) And (nRes And CAR_RES.LO_OK) <> 0) And
|
||||
Mach.m_dEndFreeLen > FREELEN_INF And Mach.m_bIsLine And bOut
|
||||
If nRes = 0 Then
|
||||
EgtOutLog("Operation ID " & nOperId.ToString & " isn't split cut! verify depth machining.")
|
||||
End If
|
||||
End If
|
||||
' se trasformabile in taglio di separazione, verifico se lo è
|
||||
If Mach.m_bCanStartAll Or Mach.m_bCanEndAll Then
|
||||
EgtSetCurrMachining(nOperId)
|
||||
Dim nLiType As Integer
|
||||
EgtGetMachiningParam(MCH_MP.LEADINTYPE, nLiType)
|
||||
Dim nLoType As Integer
|
||||
EgtGetMachiningParam(MCH_MP.LEADOUTTYPE, nLoType)
|
||||
Mach.m_bStartAll = (nLiType = MCH_SAW_LI.EXT_CENT Or nLiType = MCH_SAW_LI.EXT_OUT)
|
||||
Mach.m_bEndAll = (nLoType = MCH_SAW_LO.EXT_CENT Or nLoType = MCH_SAW_LO.EXT_OUT)
|
||||
Else
|
||||
Mach.m_bStartAll = False
|
||||
Mach.m_bEndAll = False
|
||||
End If
|
||||
' Waterjet
|
||||
ElseIf Mach.m_nType = MCH_OY.WATERJETTING Then
|
||||
Mach.m_nInterf = FMI_TYPE.NONE
|
||||
' recupero l'angolo di fianco
|
||||
EgtGetMachiningParam(MCH_MP.SIDEANGLE, Mach.m_dSideAng)
|
||||
Mach.m_bCanStartAll = False
|
||||
Mach.m_bCanEndAll = False
|
||||
Mach.m_bStartAll = False
|
||||
Mach.m_bEndAll = False
|
||||
' Forature e fresature
|
||||
Else
|
||||
Mach.m_nInterf = FMI_TYPE.NONE
|
||||
Mach.m_dSideAng = 0
|
||||
Mach.m_bCanStartAll = False
|
||||
Mach.m_bCanEndAll = False
|
||||
Mach.m_bStartAll = False
|
||||
Mach.m_bEndAll = False
|
||||
End If
|
||||
' abilitazione
|
||||
Mach.m_bEnabled = Not EgtExistsInfo(nOperId, INFO_MCH_USER_OFF)
|
||||
' pausa
|
||||
Mach.m_bPause = GetPause(nOperId)
|
||||
' inserisco in lista
|
||||
MachSplitList.Add(Mach)
|
||||
' altrimenti la disattivo
|
||||
Else
|
||||
EgtSetOperationMode(nOperId, False)
|
||||
End If
|
||||
End If
|
||||
nOperId = EgtGetNextOperation(nOperId)
|
||||
End While
|
||||
Return True
|
||||
End Function
|
||||
|
||||
Friend Function CreateMach(ByRef Mach As SplitMach, nOperId As Integer) As Boolean
|
||||
Dim bOk As Boolean = True
|
||||
' se appartiene ad un grezzo attivo la inserisco in lista
|
||||
If IsMachiningInActiveRaw(nOperId) Then
|
||||
Mach.m_nEntId = GDB_ID.NULL
|
||||
' identificativo
|
||||
Mach.m_nId = nOperId
|
||||
' eventuali lavorazioni inglobate
|
||||
Dim sInfo As String = String.Empty
|
||||
If EgtGetInfo(nOperId, INFO_MCH_OTHMID, sInfo) Then
|
||||
Dim sItems() As String = sInfo.Split(",".ToCharArray)
|
||||
For Each sId As String In sItems
|
||||
Dim nId As Integer = 0
|
||||
StringToInt(sId, nId)
|
||||
If nId > 0 Then Mach.m_vOthId.Add(nId)
|
||||
Next
|
||||
End If
|
||||
' tipo
|
||||
Mach.m_nType = EgtGetOperationType(nOperId)
|
||||
' layer di origine
|
||||
EgtGetInfo(nOperId, INFO_MCH_LAYER, Mach.m_sLay)
|
||||
' se taglio con lama
|
||||
If Mach.m_nType = MCH_OY.SAWING Then
|
||||
' verifica interferenza
|
||||
If Mach.m_sLay = NAME_OUTLOOP Then
|
||||
EgtVerifyMachining(nOperId, Mach.m_nInterf)
|
||||
For Each nId As Integer In Mach.m_vOthId
|
||||
Dim nRes As Integer = FMI_TYPE.LI Or FMI_TYPE.RM Or FMI_TYPE.LO
|
||||
EgtVerifyMachining(nId, nRes)
|
||||
Mach.m_nInterf = Mach.m_nInterf Or nRes
|
||||
Next
|
||||
Else
|
||||
Mach.m_nInterf = FMI_TYPE.NONE
|
||||
End If
|
||||
' la imposto come lavorazione corrente
|
||||
EgtSetCurrMachining(nOperId)
|
||||
' inversione
|
||||
EgtGetMachiningParam(MCH_MP.INVERT, Mach.m_bInvert)
|
||||
' recupero l'angolo di fianco
|
||||
EgtGetMachiningParam(MCH_MP.SIDEANGLE, Mach.m_dSideAng)
|
||||
' recupero allungamento iniziale e finale (negativi vicino ad angoli interni)
|
||||
Dim dStartAddLen As Double = -10
|
||||
EgtGetMachiningParam(MCH_MP.STARTADDLEN, dStartAddLen)
|
||||
Dim dEndAddLen As Double = -10
|
||||
EgtGetMachiningParam(MCH_MP.ENDADDLEN, dEndAddLen)
|
||||
' recupero tipo entità, angolo con entità precedente e successiva, lunghezze libere iniziale e finale
|
||||
Mach.m_bIsLine = True
|
||||
Mach.m_dPrevAng = 0
|
||||
Mach.m_dNextAng = 0
|
||||
Mach.m_dStartFreeLen = FREELEN_INF + 1
|
||||
Mach.m_dEndFreeLen = FREELEN_INF + 1
|
||||
Dim nEntId, nSub As Integer
|
||||
If EgtGetMachiningGeometry(0, nEntId, nSub) Then
|
||||
' EgtGetType( nEntId) = GDB_TY.CRV_ARC OrElse
|
||||
If EgtGetType(nEntId) = GDB_TY.CRV_COMPO Then Mach.m_bIsLine = False
|
||||
EgtGetInfo(nEntId, If(Not Mach.m_bInvert, INFO_PREVANG, INFO_NEXTANG), Mach.m_dPrevAng)
|
||||
EgtGetInfo(nEntId, If(Not Mach.m_bInvert, INFO_NEXTANG, INFO_PREVANG), Mach.m_dNextAng)
|
||||
EgtGetInfo(nEntId, If(Not Mach.m_bInvert, INFO_START_FREELEN, INFO_END_FREELEN), Mach.m_dStartFreeLen)
|
||||
EgtGetInfo(nEntId, If(Not Mach.m_bInvert, INFO_END_FREELEN, INFO_START_FREELEN), Mach.m_dEndFreeLen)
|
||||
Mach.m_bEnableInvert = GetEnableInvert(nEntId)
|
||||
EgtMidVector(nEntId, GDB_ID.ROOT, Mach.m_vtDir)
|
||||
If Mach.m_bInvert Then Mach.m_vtDir = -Mach.m_vtDir
|
||||
Mach.m_nEntId = nEntId
|
||||
EgtGetInfo(nOperId, "ManageLeadInOnIntCorner", Mach.m_bMngLeadInOnIntCorner)
|
||||
End If
|
||||
' verifico se trasformabile in un taglio di separazione (almeno da un lato)
|
||||
If (dStartAddLen > -EPS_SMALL Or dEndAddLen > -EPS_SMALL Or Mach.m_bMngLeadInOnIntCorner) And
|
||||
Mach.m_sLay = NAME_OUTLOOP And (Mach.m_nInterf And FMI_TYPE.RM) = 0 Then
|
||||
Dim nRes As Integer = EgtVerifyCutAsSplitting(nOperId)
|
||||
Dim bIn As Boolean = False
|
||||
Dim bOut As Boolean = False
|
||||
CanExtendSides(Mach, bIn, bOut)
|
||||
Mach.m_bCanStartAll = ((dStartAddLen > -EPS_SMALL Or Mach.m_bMngLeadInOnIntCorner) And (nRes And CAR_RES.LI_OK) <> 0) And
|
||||
Mach.m_dStartFreeLen > FREELEN_INF And Mach.m_bIsLine And bIn
|
||||
Mach.m_bCanEndAll = ((dEndAddLen > -EPS_SMALL Or Mach.m_bMngLeadInOnIntCorner) And (nRes And CAR_RES.LO_OK) <> 0) And
|
||||
Mach.m_dEndFreeLen > FREELEN_INF And Mach.m_bIsLine And bOut
|
||||
If nRes = 0 Then
|
||||
EgtOutLog("Operation ID " & nOperId.ToString & " isn't split cut! verify depth machining.")
|
||||
End If
|
||||
|
||||
ElseIf (dStartAddLen > -EPS_SMALL Or dEndAddLen > -EPS_SMALL Or Mach.m_bMngLeadInOnIntCorner) And
|
||||
Mach.m_sLay = NAME_OUTLOOP And
|
||||
(Mach.m_nInterf = FMI_TYPE.LI Or Mach.m_nInterf = FMI_TYPE.LO Or Mach.m_nInterf = FMI_TYPE.RM) Then
|
||||
Dim nRes As Integer = EgtVerifyCutAsSplitting(nOperId)
|
||||
Dim bIn As Boolean = False
|
||||
Dim bOut As Boolean = False
|
||||
CanExtendSides(Mach, bIn, bOut)
|
||||
' And (nRes And CAR_RES.LI_OK) <> 0 : da aggiungere
|
||||
Mach.m_bCanStartAll = (dStartAddLen > -EPS_SMALL Or Mach.m_bMngLeadInOnIntCorner) And
|
||||
Mach.m_dStartFreeLen > FREELEN_INF And Mach.m_bIsLine And bIn And
|
||||
Mach.m_nInterf <> FMI_TYPE.LI
|
||||
' And (nRes And CAR_RES.LO_OK) <> 0 : da aggiungere come sopra
|
||||
Mach.m_bCanEndAll = (dEndAddLen > -EPS_SMALL Or Mach.m_bMngLeadInOnIntCorner) And
|
||||
Mach.m_dEndFreeLen > FREELEN_INF And Mach.m_bIsLine And bOut And
|
||||
Mach.m_nInterf <> FMI_TYPE.LO
|
||||
If nRes = 0 Then
|
||||
EgtOutLog("Operation ID " & nOperId.ToString & " isn't split cut! verify depth machining.")
|
||||
End If
|
||||
End If
|
||||
' se trasformabile in taglio di separazione, verifico se lo è
|
||||
If Mach.m_bCanStartAll Or Mach.m_bCanEndAll Then
|
||||
EgtSetCurrMachining(nOperId)
|
||||
Dim nLiType As Integer
|
||||
EgtGetMachiningParam(MCH_MP.LEADINTYPE, nLiType)
|
||||
Dim nLoType As Integer
|
||||
EgtGetMachiningParam(MCH_MP.LEADOUTTYPE, nLoType)
|
||||
Mach.m_bStartAll = (nLiType = MCH_SAW_LI.EXT_CENT Or nLiType = MCH_SAW_LI.EXT_OUT)
|
||||
Mach.m_bEndAll = (nLoType = MCH_SAW_LO.EXT_CENT Or nLoType = MCH_SAW_LO.EXT_OUT)
|
||||
Else
|
||||
Mach.m_bStartAll = False
|
||||
Mach.m_bEndAll = False
|
||||
End If
|
||||
' Waterjet
|
||||
ElseIf Mach.m_nType = MCH_OY.WATERJETTING Then
|
||||
Mach.m_nInterf = FMI_TYPE.NONE
|
||||
' recupero l'angolo di fianco
|
||||
EgtGetMachiningParam(MCH_MP.SIDEANGLE, Mach.m_dSideAng)
|
||||
Mach.m_bCanStartAll = False
|
||||
Mach.m_bCanEndAll = False
|
||||
Mach.m_bStartAll = False
|
||||
Mach.m_bEndAll = False
|
||||
' Forature e fresature
|
||||
Else
|
||||
Mach.m_nInterf = FMI_TYPE.NONE
|
||||
Mach.m_dSideAng = 0
|
||||
Mach.m_bCanStartAll = False
|
||||
Mach.m_bCanEndAll = False
|
||||
Mach.m_bStartAll = False
|
||||
Mach.m_bEndAll = False
|
||||
End If
|
||||
' abilitazione
|
||||
Mach.m_bEnabled = Not EgtExistsInfo(nOperId, INFO_MCH_USER_OFF)
|
||||
' pausa
|
||||
Mach.m_bPause = GetPause(nOperId)
|
||||
Else
|
||||
' altrimenti la disattivo
|
||||
EgtSetOperationMode(nOperId, False)
|
||||
bOk = False
|
||||
End If
|
||||
Return bOk
|
||||
End Function
|
||||
|
||||
Private Function CanExtendSides(CurrMach As SplitMach, ByRef bIn As Boolean, ByRef bOut As Boolean) As Boolean
|
||||
If CurrMach.m_dPrevAng < -EPS_ANG_SMALL And CurrMach.m_dNextAng > EPS_ANG_SMALL Then
|
||||
' Posso estendere SOLO l'uscita
|
||||
@@ -426,19 +264,8 @@ Public Module SplitAuto
|
||||
ElseIf Math.Abs(dSideAng) > EPS_ANG_SMALL Then
|
||||
colCut = COL_MCH_CUT_ANG()
|
||||
Else
|
||||
' Se macchina con cambio utensile di lama
|
||||
If m_MainWindow.m_CurrentMachine.MountedToolConfig = CurrentMachine.MountedToolConfigs.TOOLCHANGERWITHSAW Then
|
||||
Dim sSawing As String = String.Empty, sSaw As String = String.Empty
|
||||
m_MainWindow.m_CadCutPageUC.m_SplitPage.GetCurrSawingAndSaw(nOperId, sSawing, sSaw)
|
||||
' Setto l'utensile corrente
|
||||
EgtTdbSetCurrTool(sSaw)
|
||||
' recupero il colore della lavorazione direttamente dall'utensile
|
||||
colCut = Utility.GetColorPV()
|
||||
Else
|
||||
colCut = COL_MCH_CUT()
|
||||
End If
|
||||
colCut = COL_MCH_CUT()
|
||||
End If
|
||||
|
||||
For Each nId In vCutId
|
||||
EgtSetColor(nId, colCut)
|
||||
Next
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
<UserControl x:Class="SplitPageUC"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="853.3" d:DesignWidth="1280" Initialized="SplitPageUC_Initialized">
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="853.3" d:DesignWidth="1280" Initialized="SplitPageUC_Initialized">
|
||||
|
||||
<!-- Definizione della SplitPage -->
|
||||
<Grid Name="SplitPageGrid" >
|
||||
@@ -64,49 +64,24 @@
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<ListBox Name="MachiningLsBx" Grid.Row="1"
|
||||
SelectionMode="Extended">
|
||||
SelectionMode="Extended">
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Grid Width="210">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="2.8*"/>
|
||||
<ColumnDefinition Width="1.2*"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Text="{Binding Name}">
|
||||
<TextBlock.Style>
|
||||
<Style TargetType="TextBlock" BasedOn="{StaticResource OmagCut_CurrProjSummeryTextBlock}">
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding bIsActive}" Value="False">
|
||||
<Setter Property="TextDecorations" Value="Strikethrough"/>
|
||||
<Setter Property="Foreground" Value="{StaticResource OmagCut_White}"/>
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding bIsActive}" Value="True">
|
||||
<Setter Property="Foreground" Value="Black"/>
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</TextBlock.Style>
|
||||
</TextBlock>
|
||||
<TextBlock Grid.Column="1" Text="{Binding TCPos}">
|
||||
<TextBlock.Style>
|
||||
<Style TargetType="TextBlock" BasedOn="{StaticResource OmagCut_CurrProjSummeryTextBlock}">
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding bIsActive}" Value="False">
|
||||
<Setter Property="TextDecorations" Value="Strikethrough"/>
|
||||
<Setter Property="Foreground" Value="{StaticResource OmagCut_White}"/>
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding bIsActive}" Value="True">
|
||||
<Setter Property="Foreground" Value="Black"/>
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</TextBlock.Style>
|
||||
</TextBlock>
|
||||
<Rectangle Grid.Column="2"
|
||||
Visibility="{Binding MachiningTCPosVisibility}"
|
||||
Style="{DynamicResource Rect_SplitPage}"/>
|
||||
</Grid>
|
||||
<TextBlock Text="{Binding Name}">
|
||||
<TextBlock.Style>
|
||||
<Style TargetType="TextBlock" BasedOn="{StaticResource OmagCut_CurrProjSummeryTextBlock}">
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding bIsActive}" Value="False">
|
||||
<Setter Property="TextDecorations" Value="Strikethrough"/>
|
||||
<Setter Property="Foreground" Value="{StaticResource OmagCut_White}"/>
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding bIsActive}" Value="True">
|
||||
<Setter Property="Foreground" Value="Black"/>
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</TextBlock.Style>
|
||||
</TextBlock>
|
||||
</DataTemplate>
|
||||
</ListBox.ItemTemplate>
|
||||
</ListBox>
|
||||
@@ -125,12 +100,6 @@
|
||||
<Button Name="MoveDownBtn" Grid.Column="2" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource DownArrowImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||
</Button>
|
||||
<ToggleButton Name="LayNbArrTgBtn" Grid.Column="3" Style="{DynamicResource OmagCut_YellowIconToggleButton}"
|
||||
Height="25" Width="25">
|
||||
<Image Name="LayNbArrImg"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center" Stretch="Uniform"/>
|
||||
</ToggleButton>
|
||||
|
||||
</Grid>
|
||||
|
||||
@@ -163,7 +132,7 @@
|
||||
<Button Name="CutBtn" Grid.Column="0" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource Allunga-AccorciaImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||
</Button>
|
||||
|
||||
|
||||
<Button Name="CutStartBtn" Grid.Column="1" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource Inizio-Allunga-AccorciaImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||
</Button>
|
||||
@@ -177,17 +146,17 @@
|
||||
<Image Source="{DynamicResource PonticelliWJImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||
</ToggleButton>
|
||||
|
||||
<!--solo per macchine con lavorazioni Waterjet-->
|
||||
<!--solo per macchine con lavorazioni Waterjet-->
|
||||
<Button Name="QualityWJBtn" Grid.Column="1" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource QualityWJImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||
</Button>
|
||||
|
||||
|
||||
<!-- solo per macchine con lavorazioni Waterjet -->
|
||||
<ToggleButton Name="BridgesDeleteWJBtn" Grid.Column="3" Style="{DynamicResource OmagCut_YellowIconToggleButton}">
|
||||
<Image Source="{DynamicResource PonticelliDeleteWJImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||
</ToggleButton>
|
||||
|
||||
|
||||
|
||||
|
||||
</Grid>
|
||||
|
||||
|
||||
@@ -8,9 +8,6 @@ Public Class SplitPageUC
|
||||
Private m_MainWindow As MainWindow = DirectCast(Application.Current.MainWindow, MainWindow)
|
||||
Private WithEvents m_CurrProjPage As CurrentProjectPageUC
|
||||
|
||||
' Creazione converter da String a ImageSource
|
||||
Private ImageConverter As New ImageSourceConverter
|
||||
|
||||
' Flag di pagina attiva
|
||||
Private m_bActive As Boolean = False
|
||||
' Tipo movimento dei grezzi (manuale o con testa ventosa)
|
||||
@@ -93,8 +90,8 @@ Public Class SplitPageUC
|
||||
ModifyBtn.Content = EgtMsg(MSG_SPLITPAGEUC + 17) ' Modifica
|
||||
AutoBtn.Content = EgtMsg(MSG_SPLITPAGEUC + 18) ' Auto
|
||||
RestartBtn.Content = EgtMsg(MSG_SPLITPAGEUC + 19) ' Restart
|
||||
BridgesWJBtn.ToolTip = EgtMsg(91214) ' Bridges
|
||||
BridgesDeleteWJBtn.ToolTip = EgtMsg(91215) ' Remove bridges
|
||||
BridgesWJBtn.ToolTip = "Bridges"
|
||||
BridgesDeleteWJBtn.ToolTip = "Remove bridges"
|
||||
End Sub
|
||||
|
||||
Private Sub SplitPageUC_Loaded(sender As Object, e As EventArgs) Handles Me.Loaded
|
||||
@@ -186,9 +183,6 @@ Public Class SplitPageUC
|
||||
m_MainWindow.m_CurrentProjectPageUC.ClearMessage()
|
||||
End If
|
||||
End If
|
||||
' leggo lo stato del bottone per la visualizzazione delle etichette
|
||||
LayNbArrTgBtn.IsChecked = (GetPrivateProfileInt(S_GENERAL, K_SHOWNBARROW, 1, m_MainWindow.GetIniFile()) <> 0)
|
||||
SetLayNbArrTgBtn_Click()
|
||||
End Sub
|
||||
|
||||
' preparo la lista delle lavorazioni da mostrare in interfaccia
|
||||
@@ -205,54 +199,28 @@ Public Class SplitPageUC
|
||||
sText = EgtMsg(90791) & " " & i.ToString() & " " & DoubleToString(Mach.m_dSideAng, 2) & "°"
|
||||
End If
|
||||
If Mach.m_bPause Then AddPauseText(sText)
|
||||
AddItemToList(i, Mach, sText, MCH_OY.SAWING)
|
||||
m_ItemList.Add(New NameIdLsBxItem(sText, i - 1, Mach.m_bEnabled, MCH_OY.SAWING))
|
||||
ElseIf Mach.m_nType = MCH_OY.DRILLING Then ' Foratura
|
||||
Dim sText As String = EgtMsg(90792) & " " & i.ToString()
|
||||
If Mach.m_bPause Then AddPauseText(sText)
|
||||
'm_ItemList.Add(New NameIdLsBxItem(sText, i - 1, Mach.m_bEnabled, MCH_OY.DRILLING))
|
||||
AddItemToList(i, Mach, sText, MCH_OY.DRILLING)
|
||||
m_ItemList.Add(New NameIdLsBxItem(sText, i - 1, Mach.m_bEnabled, MCH_OY.DRILLING))
|
||||
ElseIf Mach.m_nType = MCH_OY.MILLING Then ' Fresatura
|
||||
Dim sText As String = EgtMsg(90793) & " " & i.ToString()
|
||||
If Mach.m_sLay = NAME_ONPATH Then AddTopText(sText)
|
||||
If Mach.m_bPause Then AddPauseText(sText)
|
||||
'm_ItemList.Add(New NameIdLsBxItem(sText, i - 1, Mach.m_bEnabled, MCH_OY.MILLING))
|
||||
AddItemToList(i, Mach, sText, MCH_OY.MILLING)
|
||||
m_ItemList.Add(New NameIdLsBxItem(sText, i - 1, Mach.m_bEnabled, MCH_OY.MILLING))
|
||||
ElseIf Mach.m_nType = MCH_OY.POCKETING Then ' Svuotatura
|
||||
Dim sText As String = EgtMsg(90796) & " " & i.ToString()
|
||||
If Mach.m_bPause Then AddPauseText(sText)
|
||||
'm_ItemList.Add(New NameIdLsBxItem(sText, i - 1, Mach.m_bEnabled, MCH_OY.POCKETING))
|
||||
AddItemToList(i, Mach, sText, MCH_OY.POCKETING)
|
||||
m_ItemList.Add(New NameIdLsBxItem(sText, i - 1, Mach.m_bEnabled, MCH_OY.POCKETING))
|
||||
ElseIf Mach.m_nType = MCH_OY.WATERJETTING Then ' Waterjet
|
||||
Dim sText As String = EgtMsg(90797) & " " & i.ToString()
|
||||
If Mach.m_bPause Then AddPauseText(sText)
|
||||
'm_ItemList.Add(New NameIdLsBxItem(sText, i - 1, Mach.m_bEnabled, MCH_OY.WATERJETTING))
|
||||
AddItemToList(i, Mach, sText, MCH_OY.WATERJETTING)
|
||||
m_ItemList.Add(New NameIdLsBxItem(sText, i - 1, Mach.m_bEnabled, MCH_OY.WATERJETTING))
|
||||
End If
|
||||
Next
|
||||
End Sub
|
||||
|
||||
Private Sub AddItemToList(i As Integer, Mach As SplitMach, sText As String, nMach As Integer)
|
||||
Dim sTCPos As String = String.Empty
|
||||
' Visualizzo la posizione utensile solo se configurata
|
||||
If m_MainWindow.m_CurrentMachine.MountedToolConfig = CurrentMachine.MountedToolConfigs.TOOLCHANGERWITHSAW Then
|
||||
Dim sSawing As String = String.Empty, sSaw As String = String.Empty
|
||||
GetCurrSawingAndSaw(Mach.m_nId, sSawing, sSaw)
|
||||
' Verifico che sia montata su un portautensile
|
||||
EgtTdbSetCurrTool(sSaw)
|
||||
EgtTdbGetCurrToolParam(MCH_TP.TCPOS, sTCPos)
|
||||
End If
|
||||
' Se TCPos non trovato
|
||||
If String.IsNullOrEmpty(sTCPos) Then
|
||||
' Inserisco solo nome lavorazione
|
||||
m_ItemList.Add(New NameIdLsBxItem(sText, i - 1, Mach.m_bEnabled, nMach))
|
||||
Else
|
||||
' altrimenti se esiste una lama impostata nell'if sopra
|
||||
Dim sawColor As Color3d = Utility.GetColorPV()
|
||||
Dim tmpSawColor As System.Windows.Media.Color = System.Windows.Media.Color.FromRgb(sawColor.R, sawColor.G, sawColor.B)
|
||||
m_ItemList.Add(New NameIdLsBxItem(sText, i - 1, Mach.m_bEnabled, nMach, sTCPos, New SolidColorBrush(tmpSawColor)))
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#Region "BRIDGE"
|
||||
|
||||
Private Sub OnMyMouseDownSceneBridges(sender As Object, e As System.Windows.Forms.MouseEventArgs,
|
||||
@@ -277,7 +245,7 @@ Public Class SplitPageUC
|
||||
' recupero il nome del Layer
|
||||
EgtGetName(nIdParent, sLayer)
|
||||
' solo se il nome del layer è quello associato ad un lato esterno allora procedo con l'evidenziazione
|
||||
If sLayer = NAME_OUTLOOP Or sLayer = "WjRectification" Then
|
||||
If sLayer = NAME_OUTLOOP Then
|
||||
If (EgtGetType(nIdMy) = GDB_TY.CRV_ARC OrElse EgtGetType(nIdMy) = GDB_TY.CRV_COMPO OrElse EgtGetType(nIdMy) = GDB_TY.CRV_LINE) AndAlso VerifySideIsAcceptable(nIdMy) Then
|
||||
If m_nIdSelectedSideWJ <> GDB_ID.NULL Or m_nIdSelectedSideWJ = nIdMy Then
|
||||
EgtDeselectObj(m_nIdSelectedSideWJ)
|
||||
@@ -310,7 +278,7 @@ Public Class SplitPageUC
|
||||
m_nIdSelectedSideWJ = GDB_ID.NULL
|
||||
nIdParentPart = GDB_ID.NULL
|
||||
m_CurrProjPage.ClearMessage()
|
||||
m_CurrProjPage.SetWarningMessage(EgtMsg(91216)) ' Bridge intersects part
|
||||
m_CurrProjPage.SetWarningMessage("Bridge intersects part")
|
||||
Return
|
||||
End If
|
||||
End If
|
||||
@@ -401,22 +369,21 @@ Public Class SplitPageUC
|
||||
Private Function VerifySideIsAcceptable(nMyId As Integer) As Boolean
|
||||
Dim dVal As Double = 0
|
||||
' verifico che l'entità selezionata non contenga questi parametri
|
||||
' If EgtGetInfo(nMyId, INFO_SIDE_ANGLE2, dVal) Then
|
||||
' If dVal <> 0 Then
|
||||
' Return False
|
||||
' End If
|
||||
' End If
|
||||
If EgtGetInfo(nMyId, INFO_SIDE_ANGLE2, dVal) Then
|
||||
If dVal <> 0 Then
|
||||
Return False
|
||||
End If
|
||||
End If
|
||||
If EgtGetInfo(nMyId, INFO_SIDE_ANGLE, dVal) Then
|
||||
If dVal <> 0 Then
|
||||
Return False
|
||||
End If
|
||||
End If
|
||||
' ' Non bastano i controlli sopra...?
|
||||
' If EgtGetInfo(nMyId, INFO_ORIG_SIDE_ANGLE, dVal) Then
|
||||
' If dVal <> 0 Then
|
||||
' Return False
|
||||
' End If
|
||||
' End If
|
||||
If EgtGetInfo(nMyId, INFO_ORIG_SIDE_ANGLE, dVal) Then
|
||||
If dVal <> 0 Then
|
||||
Return False
|
||||
End If
|
||||
End If
|
||||
' altrimenti l'entità è accettabile
|
||||
Return True
|
||||
End Function
|
||||
@@ -490,45 +457,26 @@ Public Class SplitPageUC
|
||||
#End Region ' Bridge
|
||||
|
||||
Private Sub OnMyMouseDownScene_DoubleClick(sender As Object, e As System.Windows.Forms.MouseEventArgs) Handles m_CurrProjPage.OnMouseDownScene_DoubleClick
|
||||
OnOffCut()
|
||||
If MachiningLsBx.SelectedItems.Count = 1 Then
|
||||
OnMyMouseDownScene(sender, e)
|
||||
Dim x As NameIdLsBxItem = DirectCast(MachiningLsBx.SelectedItems(0), NameIdLsBxItem)
|
||||
Dim nI As Integer = x.Ind
|
||||
If m_MachiningList(nI).m_bEnabled Then
|
||||
m_MachiningList(nI).m_bEnabled = False
|
||||
x.bIsActive = False
|
||||
Else
|
||||
m_MachiningList(nI).m_bEnabled = True
|
||||
x.bIsActive = True
|
||||
End If
|
||||
ColorMachining(m_MachiningList(nI))
|
||||
ColorNumberArrow(nI)
|
||||
EgtDraw()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub OnMyMouseDownScene(sender As Object, e As System.Windows.Forms.MouseEventArgs) Handles m_CurrProjPage.OnMouseDownScene
|
||||
' Verifico di essere il gestore attivo e non in modalità sola visualizzazione
|
||||
If Not m_bActive OrElse m_bShow Then Return
|
||||
|
||||
If e.Button = Windows.Forms.MouseButtons.Right And m_MainWindow.m_CurrentMachine.MountedToolConfig = CurrentMachine.MountedToolConfigs.TOOLCHANGERWITHSAW Then
|
||||
Dim nCurrCtx As Integer = EgtGetCurrentContext()
|
||||
Dim nSel1 As Integer = GDB_ID.NULL
|
||||
Dim nPvId As Integer = GDB_ID.NULL
|
||||
Dim nMchId As Integer = GDB_ID.NULL
|
||||
EgtSelect(e.Location, Scene.DIM_SEL, Scene.DIM_SEL, nSel1)
|
||||
Dim nId1 As Integer = EgtGetFirstObjInSelWin()
|
||||
While nId1 <> GDB_ID.NULL
|
||||
' Verifico sia un attacco o uscita di taglio con lama
|
||||
Dim nType As Integer = 0
|
||||
Dim sName As String = ""
|
||||
EgtGetName(nId1, sName)
|
||||
nPvId = EgtGetParent(EgtGetParent(nId1))
|
||||
nMchId = GDB_ID.NULL
|
||||
If String.Compare(sName, NAME_PV_PRECUT) = 0 Or String.Compare(sName, NAME_PV_POSTCUT) = 0 Or String.Compare(sName, NAME_PV_CUT) = 0 Then
|
||||
If EgtGetInfo(nPvId, "MId", nMchId) Then
|
||||
Exit While
|
||||
End If
|
||||
End If
|
||||
nId1 = EgtGetNextObjInSelWin()
|
||||
End While
|
||||
|
||||
If nMchId = GDB_ID.NULL Then
|
||||
GetCurrSelection()
|
||||
Return
|
||||
End If
|
||||
|
||||
ChangeMachinig(nMchId)
|
||||
GetCurrSelection()
|
||||
Return
|
||||
End If
|
||||
|
||||
' Si può selezionare solo con il tasto sinistro e se stato NULL
|
||||
If e.Button <> Windows.Forms.MouseButtons.Left Or
|
||||
Not m_CurrProjPage.CurrentProjectScene.IsStatusNull() Then
|
||||
@@ -548,7 +496,6 @@ Public Class SplitPageUC
|
||||
If m_nIdSelectedPartWJ_Srt <> GDB_ID.NULL And m_nIdSelectedPartWJ_End <> GDB_ID.NULL Then
|
||||
DeselectWJBridgesPart()
|
||||
End If
|
||||
GetCurrSelection()
|
||||
Return
|
||||
End If
|
||||
|
||||
@@ -557,7 +504,6 @@ Public Class SplitPageUC
|
||||
OnMyMouseDownSceneBridgesDelete(sender, e)
|
||||
' aggiorno la visualizzazione delle lavorazioni e la lista
|
||||
RefreshMachList()
|
||||
GetCurrSelection()
|
||||
Return
|
||||
End If
|
||||
|
||||
@@ -639,108 +585,7 @@ Public Class SplitPageUC
|
||||
m_nDragInd = -1
|
||||
m_nDragType = 0
|
||||
m_nSelected = GDB_ID.NULL
|
||||
If Not IsNothing(MachiningLsBx.SelectedItem) Then
|
||||
MarkMachining(MachiningLsBx.SelectedItem.Ind, False)
|
||||
EgtDraw()
|
||||
End If
|
||||
MachiningLsBx.SelectedIndex = -1
|
||||
End If
|
||||
GetCurrSelection()
|
||||
End Sub
|
||||
|
||||
Private Sub ChangeMachinig(nMchId As Integer)
|
||||
' Imposto la lavorazione corrente
|
||||
Dim sSawing As String = String.Empty
|
||||
Dim EntId As Integer = GDB_ID.NULL
|
||||
Dim SubEntId As Integer = GDB_ID.NULL
|
||||
EgtSetCurrMachining(nMchId)
|
||||
If Not EgtGetMachiningGeometry(0, EntId, SubEntId) Then Return
|
||||
' verifico se la lavorazione selezionata ha un angolo di inclinazione
|
||||
Dim dSideAng As Double = 0.0
|
||||
EgtGetMachiningParam(MCH_MP.SIDEANGLE, dSideAng)
|
||||
Dim sDefMach As String = DEF_MACHINING
|
||||
If Math.Abs(dSideAng) > 0 Then
|
||||
sDefMach = DEF_MACHINING_TILTED
|
||||
End If
|
||||
' Recupero il nome della lavorazione
|
||||
EgtGetInfo(EntId, sDefMach, sSawing)
|
||||
|
||||
' Apro pagina di selezione della lavorazione
|
||||
Dim m_ChangeToolPage = New ChangeToolWD(m_MainWindow)
|
||||
' Imposto nome lavorazione corrente
|
||||
m_ChangeToolPage.CurrSawing = sSawing
|
||||
' apro la finestra per la selezione delle lavorazioni
|
||||
m_ChangeToolPage.ShowDialog()
|
||||
|
||||
' se seleziono "Ok" allora resetto tutte le lavorazioni del progetto
|
||||
If m_ChangeToolPage.DialogResult Then
|
||||
EgtSetInfo(EntId, sDefMach, m_ChangeToolPage.NewSawing)
|
||||
Dim Index As Integer = 0
|
||||
For Index = 0 To m_MachiningList.Count() - 1
|
||||
If m_MachiningList(Index).m_nId = nMchId Then
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
Dim nNewMchId As Integer = -1
|
||||
CamAuto.AddSawMachining(nMchId, nNewMchId)
|
||||
' Elimino la numerazione e la freccia
|
||||
EgtErase(m_MachiningList(Index).m_nArrId)
|
||||
EgtErase(m_MachiningList(Index).m_nNbrId)
|
||||
Dim Mach As New SplitMach
|
||||
' Sostituisco la vecchia lavorazione con la nuova
|
||||
If SplitAuto.CreateMach(Mach, nNewMchId) Then
|
||||
' Assegno la lavorazione alla lista
|
||||
m_MachiningList(Index) = Mach
|
||||
' Riassegno la numerazione
|
||||
NumberDirectionMachining(Index)
|
||||
m_ItemList(Index).TCPos = m_ChangeToolPage.TCPos
|
||||
' Recupero il colore della lavorazione
|
||||
Dim EgtCol As Color3d = m_ChangeToolPage.EgtColor
|
||||
Dim tmpSawColor As System.Windows.Media.Color = System.Windows.Media.Color.FromRgb(EgtCol.R, EgtCol.G, EgtCol.B)
|
||||
m_ItemList(Index).SawColor = New SolidColorBrush(tmpSawColor)
|
||||
m_ItemList(Index).MachiningTCPosVisibility = Visibility.Visible
|
||||
EgtDraw()
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Public Sub GetCurrSawingAndSaw(ByVal nMchId As Integer, ByRef sSawing As String, ByRef sNameTool As String)
|
||||
Dim EntId As Integer = GDB_ID.NULL
|
||||
Dim SubEntId As Integer = GDB_ID.NULL
|
||||
EgtSetCurrMachining(nMchId)
|
||||
If Not EgtGetMachiningGeometry(0, EntId, SubEntId) Then Return
|
||||
' verifico se la lavorazione selezionata ha un angolo di inclinazione
|
||||
Dim dSideAng As Double = 0.0
|
||||
EgtGetMachiningParam(MCH_MP.SIDEANGLE, dSideAng)
|
||||
Dim sDefMach As String = DEF_MACHINING
|
||||
If Math.Abs(dSideAng) > EPS_ANG_SMALL Then
|
||||
sDefMach = DEF_MACHINING_TILTED
|
||||
End If
|
||||
' Eventualmente recupero il nome della lavorazione
|
||||
EgtGetInfo(EntId, sDefMach, sSawing)
|
||||
If String.IsNullOrEmpty(sSawing) Then sSawing = m_MainWindow.m_CurrentMachine.sCurrSawing
|
||||
' Imposto la lavorazione corrente
|
||||
EgtMdbSetCurrMachining(sSawing)
|
||||
' Recupero il nome dell'utensile della lavorazione
|
||||
EgtMdbGetCurrMachiningParam(MCH_MP.TOOL, sNameTool)
|
||||
End Sub
|
||||
|
||||
' Dato l'id della lavorazione nel grezzo colora il taglio del colore assegnato
|
||||
Public Sub ColorsCut(nOperId As Integer, EgtCol As Color3d)
|
||||
' Recupero la lavorazione
|
||||
Dim nPVRawId As Integer = EgtGetFirstNameInGroup(nOperId, "PV")
|
||||
Dim nPVPartId As Integer = GDB_ID.NULL
|
||||
EgtGetInfo(nPVRawId, "PvId", nPVPartId)
|
||||
Dim nId2 As Integer = EgtGetFirstInGroup(EgtGetFirstInGroup(nPVPartId))
|
||||
Dim sName As String = ""
|
||||
EgtGetName(nId2, sName)
|
||||
While nId2 <> GDB_ID.NULL
|
||||
If String.Compare(sName, NAME_PV_CUT) = 0 Then
|
||||
EgtSetColor(nId2, EgtCol)
|
||||
Exit While
|
||||
End If
|
||||
nId2 = EgtGetNext(nId2)
|
||||
End While
|
||||
End Sub
|
||||
|
||||
Private Sub OnMyMouseMoveScene(sender As Object, e As System.Windows.Forms.MouseEventArgs) Handles m_CurrProjPage.OnMouseMoveScene
|
||||
@@ -860,7 +705,7 @@ Public Class SplitPageUC
|
||||
End Sub
|
||||
|
||||
Private Sub AddTopText(ByRef sName As String)
|
||||
sName &= EgtMsg(91217) ' Top
|
||||
sName &= " Top"
|
||||
End Sub
|
||||
|
||||
Private Sub RemovePauseText(ByRef sName As String)
|
||||
@@ -869,11 +714,6 @@ Public Class SplitPageUC
|
||||
End Sub
|
||||
|
||||
Private Sub MachiningLsBx_SelectionChanged(sender As Object, e As SelectionChangedEventArgs) Handles MachiningLsBx.SelectionChanged
|
||||
' se non attiva la modifica allora esco
|
||||
If m_bShow Then
|
||||
MachiningLsBx.SelectedIndex = -1
|
||||
Return
|
||||
End If
|
||||
If MachiningLsBx.SelectedItems.Count = 0 Then Return
|
||||
If MachiningLsBx.SelectedItems.Count = 1 Then m_bAreHomogeneous = True
|
||||
' creo lista ordinata dei selezionati
|
||||
@@ -915,19 +755,21 @@ Public Class SplitPageUC
|
||||
End Sub
|
||||
|
||||
Private Sub MachiningLsBx_MouseDoubleClick(sender As Object, e As MouseEventArgs) Handles MachiningLsBx.MouseDoubleClick
|
||||
' se disabilitata la modifica allora esco
|
||||
If m_bShow Then Return
|
||||
If m_IsCtrlKeyDown Or m_IsShiftKeyDown Then Return
|
||||
OnOffCut()
|
||||
End Sub
|
||||
|
||||
Private Sub MachiningLsBx_MouseRightButtonDown(sender As Object, e As MouseEventArgs) Handles MachiningLsBx.PreviewMouseRightButtonDown
|
||||
' se disabilitata la modifica allora esco
|
||||
If m_bShow Then Return
|
||||
If m_IsCtrlKeyDown Or m_IsShiftKeyDown Then Return
|
||||
Dim Index As Integer = MachiningLsBx.SelectedIndex
|
||||
If Index = -1 Then Return
|
||||
ChangeMachinig(m_MachiningList(Index).m_nId)
|
||||
If MachiningLsBx.SelectedItems.Count = 1 Then
|
||||
Dim x As NameIdLsBxItem = DirectCast(MachiningLsBx.SelectedItems(0), NameIdLsBxItem)
|
||||
Dim nI As Integer = x.Ind
|
||||
If m_MachiningList(nI).m_bEnabled Then
|
||||
m_MachiningList(nI).m_bEnabled = False
|
||||
x.bIsActive = False
|
||||
Else
|
||||
m_MachiningList(nI).m_bEnabled = True
|
||||
x.bIsActive = True
|
||||
End If
|
||||
ColorMachining(m_MachiningList(nI))
|
||||
ColorNumberArrow(nI)
|
||||
EgtDraw()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub MoveUpBtn_Click(sender As Object, e As RoutedEventArgs) Handles MoveUpBtn.Click
|
||||
@@ -938,25 +780,6 @@ Public Class SplitPageUC
|
||||
MoveItem(1)
|
||||
End Sub
|
||||
|
||||
Private Sub LayNbArrTgBtn_Click() Handles LayNbArrTgBtn.Click
|
||||
SetLayNbArrTgBtn_Click()
|
||||
WritePrivateProfileString(S_GENERAL, K_SHOWNBARROW, If(LayNbArrTgBtn.IsChecked, "1", "0"), m_MainWindow.GetIniFile())
|
||||
End Sub
|
||||
|
||||
Private Sub SetLayNbArrTgBtn_Click()
|
||||
If LayNbArrTgBtn.IsChecked Then
|
||||
StatusOffNumbArrow(GDB_ST.ON_)
|
||||
LayNbArrTgBtn.ToolTip = EgtMsg(91218) ' Hide
|
||||
Dim Img As ImageSource = ImageConverter.ConvertFromString("pack://application:,,,/Resources/NewIcons/LightArrowOn.png")
|
||||
LayNbArrImg.Source = Img
|
||||
Else
|
||||
StatusOffNumbArrow(GDB_ST.OFF)
|
||||
LayNbArrTgBtn.ToolTip = EgtMsg(91219) ' Show
|
||||
Dim Img As ImageSource = ImageConverter.ConvertFromString("pack://application:,,,/Resources/NewIcons/LightArrowOff.png")
|
||||
LayNbArrImg.Source = Img
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub MoveItem(direction As Integer)
|
||||
' Checking selected item
|
||||
If m_CurrFirstInd = -1 OrElse MachiningLsBx.SelectedIndex < 0 Then
|
||||
@@ -2067,7 +1890,7 @@ Public Class SplitPageUC
|
||||
End Sub
|
||||
|
||||
Private Sub NextBtn_Click(sender As Object, e As RoutedEventArgs) Handles NextBtn.Click
|
||||
' ------- VISUALIZZAZIONE (navigazione tra le fasi) -------
|
||||
' ------- VISUALIZZAZIONE -------
|
||||
If m_bShow Then
|
||||
Dim CurrDisposition As Integer = EgtGetPhaseDisposition(m_nCurrPhase)
|
||||
' recupero l'operazione successiva
|
||||
@@ -2150,22 +1973,22 @@ Public Class SplitPageUC
|
||||
NumberDirectionMachining(nI)
|
||||
Next
|
||||
|
||||
' -------------------- Recupero le lavorazioni indicate come attive -- INIZIO --------------------
|
||||
' -------------------- Recupero le lavorazioni indicate come attive --------------------
|
||||
Dim ActiveMachLst As New List(Of Integer)
|
||||
For Each ItemSplitMach As NameIdLsBxItem In m_ItemList
|
||||
If ItemSplitMach.bIsActive Then ActiveMachLst.Add(ItemSplitMach.Ind)
|
||||
ActiveMachLst.Add(ItemSplitMach.Ind)
|
||||
Next
|
||||
' -------------------- Recupero le lavorazioni indicate come attive -- FINE --------------------
|
||||
' -------------------- Recupero le lavorazioni indicate come attive --------------------
|
||||
|
||||
' Preparo la lista degli Item
|
||||
ShowMachiningList()
|
||||
|
||||
' -------------------- Riattivo le lavorazioni precedenti -- INIZIO --------------------
|
||||
' -------------------- Riattivo le lavorazioni precedenti --------------------
|
||||
|
||||
For Each Item As SplitMach In m_MachiningList
|
||||
' spengo tutte le lavorazioni disponibili
|
||||
EgtSetInfo(Item.m_nId, INFO_MCH_USER_OFF, True)
|
||||
Next
|
||||
' riattivo solo quelle indicate come attive
|
||||
|
||||
For nIndex As Integer = 0 To ActiveMachLst.Count - 1
|
||||
For Each ItemSplitMach As NameIdLsBxItem In m_ItemList
|
||||
If ItemSplitMach.Ind = ActiveMachLst(nIndex) Then
|
||||
@@ -2178,7 +2001,7 @@ Public Class SplitPageUC
|
||||
End If
|
||||
Next
|
||||
Next
|
||||
' -------------------- Riattivo le lavorazioni precedenti -- FINE --------------------
|
||||
' -------------------- Riattivo le lavorazioni precedenti --------------------
|
||||
|
||||
' Aggiorno visualizzazione
|
||||
EgtDraw()
|
||||
@@ -2376,33 +2199,6 @@ Public Class SplitPageUC
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub OnOffCut()
|
||||
If MachiningLsBx.SelectedItems.Count = 1 Then
|
||||
Dim x As NameIdLsBxItem = DirectCast(MachiningLsBx.SelectedItems(0), NameIdLsBxItem)
|
||||
Dim nI As Integer = x.Ind
|
||||
If m_MachiningList(nI).m_bEnabled Then
|
||||
m_MachiningList(nI).m_bEnabled = False
|
||||
x.bIsActive = False
|
||||
Else
|
||||
m_MachiningList(nI).m_bEnabled = True
|
||||
x.bIsActive = True
|
||||
End If
|
||||
ColorMachining(m_MachiningList(nI))
|
||||
ColorNumberArrow(nI)
|
||||
EgtDraw()
|
||||
' Imposto flag di modifica
|
||||
m_bModified = True
|
||||
' recupero l'elenco degli elementi selezionati
|
||||
Dim ItemList As New List(Of NameIdLsBxItem)
|
||||
For Each Item As NameIdLsBxItem In MachiningLsBx.SelectedItems
|
||||
ItemList.Add(Item)
|
||||
Next
|
||||
VerifyHomogenousMachining(ItemList)
|
||||
' Abilitazione bottone Next
|
||||
EnableButtons()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub VerifyHomogenousMachining(ItemList As List(Of NameIdLsBxItem))
|
||||
If IsNothing(ItemList) OrElse ItemList.Count = 0 Then
|
||||
m_MainWindow.m_CurrentProjectPageUC.ClearMessage()
|
||||
@@ -2435,7 +2231,7 @@ Public Class SplitPageUC
|
||||
' eventualmente stampo messaggio
|
||||
If Not m_bAreHomogeneous Then
|
||||
m_MainWindow.m_CurrentProjectPageUC.ClearMessage()
|
||||
m_MainWindow.m_CurrentProjectPageUC.SetWarningMessage(EgtMsg(91220)) ' Lavorazioni non omogenee
|
||||
m_MainWindow.m_CurrentProjectPageUC.SetWarningMessage("Lavorazioni non omogenee")
|
||||
Else
|
||||
m_MainWindow.m_CurrentProjectPageUC.ClearMessage()
|
||||
End If
|
||||
@@ -2584,11 +2380,6 @@ Public Class SplitPageUC
|
||||
' Aggiungo a numero info con identificativo della lavorazione e viceversa
|
||||
EgtSetInfo(nNbrId, "MId", m_MachiningList(nI).m_nId)
|
||||
EgtSetInfo(m_MachiningList(nI).m_nId, "NbrId", nNbrId)
|
||||
If Not LayNbArrTgBtn.IsChecked Then
|
||||
EgtSetStatus(nNbrId, GDB_ST.OFF)
|
||||
Else
|
||||
EgtSetStatus(nNbrId, GDB_ST.ON_)
|
||||
End If
|
||||
End If
|
||||
' Se taglio con lama, metto la direzione accanto al numero
|
||||
If m_MachiningList(nI).m_nType = MCH_OY.SAWING Then
|
||||
@@ -2600,11 +2391,6 @@ Public Class SplitPageUC
|
||||
' Aggiungo a freccia info con identificativo della lavorazione e viceversa
|
||||
EgtSetInfo(nArrId, "MId", m_MachiningList(nI).m_nId)
|
||||
EgtSetInfo(m_MachiningList(nI).m_nId, "ArrId", nArrId)
|
||||
If Not LayNbArrTgBtn.IsChecked Then
|
||||
EgtSetStatus(nArrId, GDB_ST.OFF)
|
||||
Else
|
||||
EgtSetStatus(nArrId, GDB_ST.ON_)
|
||||
End If
|
||||
Else
|
||||
m_MachiningList(nI).m_nArrId = GDB_ID.NULL
|
||||
End If
|
||||
@@ -2721,27 +2507,6 @@ Public Class SplitPageUC
|
||||
EgtResetMark(nNbrId)
|
||||
EgtResetMark(nArrId)
|
||||
End If
|
||||
If Not LayNbArrTgBtn.IsChecked And Not bMark Then
|
||||
EgtSetStatus(nNbrId, GDB_ST.OFF)
|
||||
EgtSetStatus(nArrId, GDB_ST.OFF)
|
||||
Else
|
||||
EgtSetStatus(nNbrId, GDB_ST.ON_)
|
||||
EgtSetStatus(nArrId, GDB_ST.ON_)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub StatusOffNumbArrow(Status As GDB_ST)
|
||||
For Each Item As SplitMach In m_MachiningList
|
||||
Dim nOperId As Integer = Item.m_nId
|
||||
Dim nNbrId As Integer = Item.m_nNbrId
|
||||
Dim nArrId As Integer = Item.m_nArrId
|
||||
Dim nInd As Integer = m_MachiningList.IndexOf(Item)
|
||||
If nInd >= 0 AndAlso nInd < m_ItemList.Count AndAlso Not m_ItemList(nInd).IsSelected Then
|
||||
EgtSetStatus(nNbrId, Status)
|
||||
EgtSetStatus(nArrId, Status)
|
||||
End If
|
||||
Next
|
||||
EgtDraw()
|
||||
End Sub
|
||||
|
||||
Private Sub ColorNumberArrow(nI As Integer)
|
||||
@@ -2832,10 +2597,6 @@ Public Class SplitPageUC
|
||||
Private m_sName As String
|
||||
Private m_bIsActive As Boolean
|
||||
Private m_nType As Integer
|
||||
' Posizione porta utensile (parametro non obbligatorio)
|
||||
Private m_sTCPos As String = ""
|
||||
Private m_cSawColor As SolidColorBrush
|
||||
Private m_bMachiningTCPosVisibility As Visibility = Visibility.Hidden
|
||||
|
||||
Private m_IsSelected As Boolean
|
||||
|
||||
@@ -2860,31 +2621,6 @@ Public Class SplitPageUC
|
||||
End Set
|
||||
End Property
|
||||
|
||||
'!!!!!!!!!!!!!!!!!!!!
|
||||
Public Property TCPos As String
|
||||
Get
|
||||
Return m_sTCPos
|
||||
End Get
|
||||
Set(value As String)
|
||||
If value <> m_sTCPos Then
|
||||
m_sTCPos = value
|
||||
NotifyPropertyChanged("TCPos")
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
|
||||
'!!!!!!!!!!!!!!!!!!!!
|
||||
Public Property SawColor As SolidColorBrush
|
||||
Get
|
||||
Return m_cSawColor
|
||||
End Get
|
||||
Set(value As SolidColorBrush)
|
||||
m_cSawColor = value
|
||||
NotifyPropertyChanged("SawColor")
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property bIsActive As Boolean
|
||||
Get
|
||||
Return m_bIsActive
|
||||
@@ -2915,34 +2651,11 @@ Public Class SplitPageUC
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property MachiningTCPosVisibility As Visibility
|
||||
Get
|
||||
Return m_bMachiningTCPosVisibility
|
||||
End Get
|
||||
Set(value As Visibility)
|
||||
If value <> m_bMachiningTCPosVisibility Then
|
||||
m_bMachiningTCPosVisibility = value
|
||||
NotifyPropertyChanged("MachiningTCPosVisibility")
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Sub New(Name As String, Ind As Integer, bIsActive As Boolean, nType As Integer)
|
||||
Me.m_sName = Name
|
||||
Me.m_nInd = Ind
|
||||
Me.m_bIsActive = bIsActive
|
||||
Me.m_nType = nType
|
||||
Me.m_bMachiningTCPosVisibility = Visibility.Hidden
|
||||
End Sub
|
||||
|
||||
Sub New(Name As String, Ind As Integer, bIsActive As Boolean, nType As Integer, sTCPos As String, cSawColor As SolidColorBrush)
|
||||
Me.m_sName = Name
|
||||
Me.m_nInd = Ind
|
||||
Me.m_bIsActive = bIsActive
|
||||
Me.m_nType = nType
|
||||
Me.m_sTCPos = sTCPos
|
||||
Me.m_cSawColor = cSawColor
|
||||
Me.m_bMachiningTCPosVisibility = Visibility.Visible
|
||||
End Sub
|
||||
|
||||
Public Sub NotifyPropertyChanged(propName As String)
|
||||
|
||||
@@ -112,7 +112,6 @@ Module ConstGen
|
||||
Public Const MAIN_TAB As String = "MainTab"
|
||||
Public Const SECOND_TAB As String = "2ndTab"
|
||||
Public Const THIRD_TAB As String = "3rdTab"
|
||||
Public Const FORTH_TAB As String = "4thTab"
|
||||
' Nome tavola ausiliaria per spostamento finale pezzi
|
||||
Public Const AUX_TAB As String = "AuxTab"
|
||||
|
||||
@@ -158,8 +157,6 @@ Module ConstGen
|
||||
' Info per identificazione gruppo pezzi
|
||||
Public Const INFO_REFGROUP As String = "RefGroup"
|
||||
Public Const INFO_COUNTERLY As String = "CounterPz"
|
||||
Public Const INFO_PARKIND As String = "ParkInd"
|
||||
Public Const INFO_PARKSTATUS As String = "ParkStatus"
|
||||
|
||||
' Contrassegno di progetto OmagCut
|
||||
Public Const NAME_PROJMARK As String = "OmagCut"
|
||||
@@ -325,10 +322,6 @@ Module ConstGen
|
||||
Public Const INFO_START As String = "Start"
|
||||
' Nome dei tagli diretti inseriti in fase di Splitting
|
||||
Public Const SPLIT_CUT As String = "SplitCut"
|
||||
' Forzo specifica lavorazione
|
||||
Public Const DEF_MACHINING As String = "Def_Machining"
|
||||
' Forzo specifica lavorazione solo per tagli con inclinazione
|
||||
Public Const DEF_MACHINING_TILTED As String = "Def_Machining_Tilted"
|
||||
|
||||
' Nome di pezzo che è una cornice
|
||||
Public Const NAME_FRAME As String = "Frame"
|
||||
|
||||
@@ -54,9 +54,6 @@ Module ConstIni
|
||||
Public Const K_FRACTIONPATTERN As String = "FractionPattern"
|
||||
Public Const K_PRECISION As String = "Precision"
|
||||
Public Const K_QUITDRAWPAGE As String = "QuitDrawPage"
|
||||
Public Const K_SHOWNBARROW As String = "ShowNbArrow"
|
||||
Public Const K_SHOWEXPIREASSITANCE As String = "ShowExpireAssistance"
|
||||
Public Const K_ENABLEDXFPARK As String = "EnableDXFPark"
|
||||
|
||||
Public Const S_LANGUAGES As String = "Languages"
|
||||
Public Const K_LANGUAGE As String = "Language"
|
||||
@@ -90,7 +87,6 @@ Module ConstIni
|
||||
Public Const K_TEXMAXLINPIX As String = "TextureMaxLinPixels"
|
||||
Public Const K_ZOOMWIN As String = "ZoomWin"
|
||||
Public Const K_DISTLINE As String = "DistLine"
|
||||
Public Const K_ORTOGRAPHIC As String = "OrtoGraphic"
|
||||
|
||||
Public Const S_ALZFRONT As String = "Alz&Front"
|
||||
Public Const K_ALZFRONT As String = "Alz&Front"
|
||||
@@ -212,7 +208,6 @@ Module ConstIni
|
||||
Public Const K_OFFSXY As String = "OffsXY"
|
||||
Public Const K_OFFSYY As String = "OffsYY"
|
||||
Public Const K_OFFSXINTERY As String = "OffsYInterY"
|
||||
Public Const K_OFFSXINTERYSAWTH As String = "OffsYInterYSawTh"
|
||||
Public Const K_STARTTRIM As String = "StartTrim"
|
||||
Public Const K_ENDTRIM As String = "EndTrim"
|
||||
Public Const K_OTHERSIDE As String = "OtherSide"
|
||||
@@ -237,13 +232,10 @@ Module ConstIni
|
||||
Public Const K_OTHERREFTABX As String = "OtherRefTabX"
|
||||
Public Const K_OTHERREFTABY As String = "OtherRefTabY"
|
||||
Public Const K_OTHERREFTABPOS As String = "OtherRefTabPos"
|
||||
Public Const K_REFTAB As String = "RefTab"
|
||||
Public Const K_CURRENTREFTAB As String = "CurrRefTab"
|
||||
|
||||
|
||||
Public Const S_RAWMOVE As String = "RawMove"
|
||||
Public Const K_RAWSTEP As String = "Step"
|
||||
Public Const K_EXTRASTEP As String = "ExtraStep"
|
||||
Public Const K_RAWROTATION As String = "Rotation"
|
||||
Public Const K_PERPENDICULAR As String = "Perpendicular"
|
||||
|
||||
|
||||
@@ -32,7 +32,6 @@
|
||||
Public Const K_A10ID As String = "A10Id"
|
||||
Public Const K_DELTA_C As String = "DeltaC"
|
||||
Public Const K_ININCHES As String = "InInches"
|
||||
Public Const K_CPOS As String = "CPos"
|
||||
|
||||
Public Const S_NCSIEMENS As String = "NcSiemens"
|
||||
Public Const K_COMM_NAME As String = "CommName"
|
||||
@@ -130,7 +129,6 @@
|
||||
Public Const K_SPOTLIGHT1 As String = "SpotLight1"
|
||||
Public Const K_SPOTLIGHT2 As String = "SpotLight2"
|
||||
Public Const K_NAXES As String = "nAxes"
|
||||
Public Const K_RESETSTATUS As String = "ResetStatus"
|
||||
' Nuove variabili
|
||||
Public Const K_SPEEDHOLD As String = "SpeedHold"
|
||||
Public Const K_XYJOG As String = "XYJog"
|
||||
@@ -173,7 +171,6 @@
|
||||
Public Const K_ADDITIONALTABLE As String = "AdditionalTable"
|
||||
Public Const K_TAB2_ADDITIONALTABLE As String = "Tab2AdditionalTable"
|
||||
Public Const K_TAB3_ADDITIONALTABLE As String = "Tab3AdditionalTable"
|
||||
Public Const K_TAB4_ADDITIONALTABLE As String = "Tab4AdditionalTable"
|
||||
Public Const K_CENTER_RAW_ONX As String = "CenterRawOnX"
|
||||
Public Const K_CHANGETABWD As String = "ChangeTabWD"
|
||||
|
||||
@@ -184,10 +181,6 @@
|
||||
Public Const K_PHOTO_TAB2_OFFSETY As String = "Tab2OffsetY"
|
||||
Public Const K_PHOTO_HQ_OFFSETX As String = "HQOffsetX"
|
||||
Public Const K_PHOTO_HQ_OFFSETY As String = "HQOffsetY"
|
||||
Public Const K_CAMERA_DIRECT_CMD As String = "CameraDirectCmd"
|
||||
Public Const K_CAMERA_STATE_VAR As String = "CameraStateVar"
|
||||
Public Const K_ENABELE_GOHOME_FOR_PHOTO As String = "EnableGoHomeForPhoto"
|
||||
Public Const K_PENDIG_TIME_FOR_PHOTO As String = "PendigTimeForPhoto"
|
||||
|
||||
Public Const S_TOOLS As String = "Tools"
|
||||
Public Const K_DRILLBIT As String = "Drillbit"
|
||||
@@ -314,7 +307,6 @@
|
||||
|
||||
Public Const S_MACH_MACH As String = "Mach"
|
||||
Public Const K_CURRSAW As String = "CurrSaw"
|
||||
Public Const K_CURRSAWTILTED As String = "CurrSawTilted"
|
||||
Public Const K_CURRDRILL As String = "CurrDrill"
|
||||
Public Const K_CURRMILL As String = "CurrMill"
|
||||
Public Const K_CURRMILLNOTIP As String = "CurrMillNoTip"
|
||||
@@ -322,8 +314,6 @@
|
||||
Public Const K_CURRDRIPDRILL As String = "CurrDripDrill"
|
||||
Public Const K_CURRWATERJET As String = "CurrWaterJet"
|
||||
Public Const K_CURRSAWING As String = "CurrSawing"
|
||||
Public Const K_CURRSAWINGTILTED As String = "CurrSawingTilted"
|
||||
Public Const K_APPLYSAWINGTILTED As String = "ApplySawingTilted"
|
||||
Public Const K_CURRDRILLING As String = "CurrDrilling"
|
||||
Public Const K_CURRMILLING As String = "CurrMilling"
|
||||
Public Const K_CURRPOCKETING As String = "CurrPocketing"
|
||||
|
||||
@@ -53,6 +53,7 @@ Public Class ControlsDirectCutUC
|
||||
FlatteningCut
|
||||
Polishing
|
||||
CopyTemplate
|
||||
SawTest
|
||||
SingleCutAuto
|
||||
SingleDrill
|
||||
Squaring
|
||||
|
||||
@@ -179,11 +179,11 @@ Public Class DirectCutPageUC
|
||||
Case K_REMOTE
|
||||
RemoteBtn.Visibility = Visibility.Visible
|
||||
RemoteBtn.Foreground = Brushes.White
|
||||
RemoteBtn.Content = EgtMsg(90262) 'Remote
|
||||
RemoteBtn.Content = "Remote"
|
||||
Case K_PARKING
|
||||
ParkingBtn.Visibility = Visibility.Visible
|
||||
ParkingBtn.Foreground = Brushes.White
|
||||
ParkingBtn.ToolTip = EgtMsg(90263) 'Parking
|
||||
ParkingBtn.ToolTip = "Parking"
|
||||
End Select
|
||||
Next
|
||||
End Sub
|
||||
@@ -482,7 +482,7 @@ Public Class DirectCutPageUC
|
||||
|
||||
Private Sub ManualModeBtn_Click(sender As Object, e As RoutedEventArgs) Handles ManualModeBtn.Click
|
||||
' Imposto modalità manuale della macchina
|
||||
Dim nResult As Short = m_MainWindow.m_DirectCutPageUC.m_CN.DGeneralFunctions_WriteCncMode(7) ' Modalità manuale
|
||||
Dim nResult As Short = m_CN.DGeneralFunctions_WriteCncMode(7) ' Modalità manuale
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
Imports System.Reflection
|
||||
Imports EgtUILib
|
||||
Imports EgtUILib.EgtInterface
|
||||
Imports OmagCUT.MainWindow
|
||||
|
||||
Public Class FlatteningCut
|
||||
|
||||
@@ -12,8 +11,6 @@ Public Class FlatteningCut
|
||||
Private m_bActive As Boolean = False
|
||||
' Flag di simulazione in corso
|
||||
Private m_bSimul As Boolean = False
|
||||
' Definizione del taglio diretto di questa pagina
|
||||
Private Const FLATTENING As String = "Flattening"
|
||||
|
||||
' Origine tavola e dati grezzo
|
||||
Private m_bRawOk As Boolean = False
|
||||
@@ -103,15 +100,15 @@ Public Class FlatteningCut
|
||||
DirectionTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 15)
|
||||
WidthTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 26)
|
||||
OverlapTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 27)
|
||||
ZReleasedTxBl.Text = EgtMsg(91235) 'Z Svincolo
|
||||
ZReleasedTxBl.Text = "Z Svincolo"
|
||||
SideTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 23)
|
||||
RotLockTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 29)
|
||||
ChainedPathTxBl.Text = EgtMsg(91236) 'Chained path
|
||||
ChainedPathTxBl.Text = "Chained path"
|
||||
SimulBtn.ToolTip = EgtMsg(MSG_CADCUTPAGEUC + 1)
|
||||
OkBtn.ToolTip = EgtMsg(MSG_DIRECTCUTPAGEUC + 30)
|
||||
' tipo di utensile in uso per la lavorazione
|
||||
m_ToolsArray(TOOL.SAW) = EgtMsg(MSG_DIRECTCUTPAGEUC + 24)
|
||||
m_ToolsArray(TOOL.MILL) = EgtMsg(91237) 'Mill
|
||||
m_ToolsArray(TOOL.MILL) = "Mill"
|
||||
SelToolCmBx.ItemsSource = m_ToolsArray
|
||||
' Carico i dati dell'ultimo taglio
|
||||
m_dDepth = GetPrivateProfileDouble(S_DIRECTCUTS, K_DC_FLATT_DEPTH, m_dDepth, m_MainWindow.GetIniFile())
|
||||
@@ -728,8 +725,7 @@ Public Class FlatteningCut
|
||||
Dim ptStart As Point3d = m_ptTipP1
|
||||
ptStart.z = 0
|
||||
Dim nCutId = EgtCreateLinePDL(nLayerId, ptStart, m_dAngO, m_dLen)
|
||||
' Inidico che è un taglio Diretto di tipo Flattening
|
||||
EgtSetInfo(nCutId, INFO_DIRECTCUT, FlagDirectCuts.Flattening)
|
||||
EgtSetInfo(nCutId, INFO_DIRECTCUT, 1)
|
||||
' Imposto affondamento e angolo di fianco sul taglio
|
||||
EgtSetInfo(nCutId, INFO_DEPTH, m_dDepth)
|
||||
If (m_nTool = TOOL.MILL) Then
|
||||
@@ -848,8 +844,8 @@ Public Class FlatteningCut
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
CutsList.Add(nCut2Id)
|
||||
End If
|
||||
CutsList.Add(nCut2Id)
|
||||
End If
|
||||
' ----------------------- CREO SEGMENTI PER CONCATENAMENTO CURVE -----------------------
|
||||
|
||||
Next
|
||||
@@ -880,8 +876,7 @@ Public Class FlatteningCut
|
||||
Dim ptNear As Point3d
|
||||
EgtStartPoint(CutsList(0), ptNear)
|
||||
Dim IdJointCurv As Integer = EgtCreateCurveCompoByChain(nLayerId, CutsList.ToArray, ptNear, True)
|
||||
' Inidico che è un taglio Diretto di tipo Flattening
|
||||
EgtSetInfo(IdJointCurv, INFO_DIRECTCUT, FlagDirectCuts.Flattening)
|
||||
EgtSetInfo(IdJointCurv, INFO_DIRECTCUT, 1)
|
||||
EgtSetInfo(IdJointCurv, INFO_STEP_TYPE, m_nMachType)
|
||||
EgtSetInfo(IdJointCurv, INFO_WIDTH, dThick)
|
||||
' Se unisco il percorso devo per forza usare la fresa!
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
Imports EgtUILib
|
||||
Imports OmagCUT.MainWindow
|
||||
|
||||
Public Class GridCut
|
||||
' Riferimenti a pagine
|
||||
@@ -79,21 +78,21 @@ Public Class GridCut
|
||||
SimulBtn.ToolTip = EgtMsg(MSG_CADCUTPAGEUC + 1)
|
||||
OkBtn.ToolTip = EgtMsg(MSG_DIRECTCUTPAGEUC + 30)
|
||||
' Carico i dati dell'ultimo taglio
|
||||
m_dDepth = GetPrivateProfileDouble(S_DIRECTCUTS, K_DC_GRID_DEPTH, m_dDepth, m_MainWindow.GetIniFile())
|
||||
m_dAngO = GetPrivateProfileDouble(S_DIRECTCUTS, K_DC_GRID_ANGH, m_dAngO, m_MainWindow.GetIniFile())
|
||||
m_dAngV = GetPrivateProfileDouble(S_DIRECTCUTS, K_DC_GRID_ANGV, m_dAngV, m_MainWindow.GetIniFile())
|
||||
m_nNumX = GetPrivateProfileInt(S_DIRECTCUTS, K_DC_GRID_NUMX, m_nNumX, m_MainWindow.GetIniFile())
|
||||
m_dDimX = GetPrivateProfileDouble(S_DIRECTCUTS, K_DC_GRID_DIMX, m_dDimX, m_MainWindow.GetIniFile())
|
||||
m_nNumY = GetPrivateProfileInt(S_DIRECTCUTS, K_DC_GRID_NUMY, m_nNumY, m_MainWindow.GetIniFile())
|
||||
m_dDepth = GetPrivateProfileDouble( S_DIRECTCUTS, K_DC_GRID_DEPTH, m_dDepth, m_MainWindow.GetIniFile())
|
||||
m_dAngO = GetPrivateProfileDouble( S_DIRECTCUTS, K_DC_GRID_ANGH, m_dAngO, m_MainWindow.GetIniFile())
|
||||
m_dAngV = GetPrivateProfileDouble( S_DIRECTCUTS, K_DC_GRID_ANGV, m_dAngV, m_MainWindow.GetIniFile())
|
||||
m_nNumX = GetPrivateProfileInt( S_DIRECTCUTS, K_DC_GRID_NUMX, m_nNumX, m_MainWindow.GetIniFile())
|
||||
m_dDimX = GetPrivateProfileDouble( S_DIRECTCUTS, K_DC_GRID_DIMX, m_dDimX, m_MainWindow.GetIniFile())
|
||||
m_nNumY = GetPrivateProfileInt( S_DIRECTCUTS, K_DC_GRID_NUMY, m_nNumY, m_MainWindow.GetIniFile())
|
||||
m_dDimY = GetPrivateProfileDouble(S_DIRECTCUTS, K_DC_GRID_DIMY, m_dDimY, m_MainWindow.GetIniFile())
|
||||
|
||||
' --- INIZIO GESTIONE SPECIALE --- per macchina sinistrorsa
|
||||
m_bSawTh = (GetPrivateProfileInt(S_DIRECTCUTS, K_DC_SING_SAWTH, 0, m_MainWindow.GetIniFile()) <> 0)
|
||||
' --- FINE GESTIONE SPECIALE --- per macchina sinistrorsa
|
||||
|
||||
m_bHeadSide = (GetPrivateProfileInt(S_DIRECTCUTS, K_DC_GRID_HEADSIDE, 0, m_MainWindow.GetIniFile()) <> 0)
|
||||
m_ptTipP1.x = GetPrivateProfileDouble(S_DIRECTCUTS, K_DC_GRID_POSX, m_ptTipP1.x, m_MainWindow.GetIniFile())
|
||||
m_ptTipP1.y = GetPrivateProfileDouble(S_DIRECTCUTS, K_DC_GRID_POSY, m_ptTipP1.y, m_MainWindow.GetIniFile())
|
||||
m_bHeadSide = ( GetPrivateProfileInt( S_DIRECTCUTS, K_DC_GRID_HEADSIDE, 0, m_MainWindow.GetIniFile()) <> 0)
|
||||
m_ptTipP1.x = GetPrivateProfileDouble( S_DIRECTCUTS, K_DC_GRID_POSX, m_ptTipP1.x, m_MainWindow.GetIniFile())
|
||||
m_ptTipP1.y = GetPrivateProfileDouble( S_DIRECTCUTS, K_DC_GRID_POSY, m_ptTipP1.y, m_MainWindow.GetIniFile())
|
||||
End Sub
|
||||
|
||||
Private Sub GridCut_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded
|
||||
@@ -132,7 +131,7 @@ Public Class GridCut
|
||||
m_bPointP1Ok = False
|
||||
m_bPointP2Ok = False
|
||||
' Inizializzo primo punto acquisito dal disegno
|
||||
m_ptPrev = m_ptTipP1 + (m_ptTabOri - Point3d.ORIG())
|
||||
m_ptPrev = m_ptTipP1 + ( m_ptTabOri - Point3d.ORIG())
|
||||
m_ptPrev.z = m_ptRawMax.z
|
||||
' Disegno crocetta che indica il punto acquisito
|
||||
CreateCross(m_nTempLay, m_ptPrev)
|
||||
@@ -141,13 +140,13 @@ Public Class GridCut
|
||||
SetCoordVisibility(True)
|
||||
ShowCoord()
|
||||
' Assegno parametri di lavorazione
|
||||
DepthTxBx.Text = LenToString(m_dDepth, 1)
|
||||
DirectionTxBx.Text = DoubleToString(m_dAngO - m_MainWindow.m_CurrentMachine.dDeltaC, 2)
|
||||
SideAngleTxBx.Text = DoubleToString(m_dAngV, 2)
|
||||
DepthTxBx.Text = LenToString( m_dDepth, 1)
|
||||
DirectionTxBx.Text = DoubleToString( m_dAngO - m_MainWindow.m_CurrentMachine.dDeltaC, 2)
|
||||
SideAngleTxBx.Text = DoubleToString( m_dAngV, 2)
|
||||
NumPzXTxBx.Text = m_nNumX.ToString()
|
||||
DimPzXTxBx.Text = LenToString(m_dDimX, 1)
|
||||
DimPzXTxBx.Text = LenToString( m_dDimX, 1)
|
||||
NumPzYTxBx.Text = m_nNumY.ToString()
|
||||
DimPzYTxBx.Text = LenToString(m_dDimY, 1)
|
||||
DimPzYTxBx.Text = LenToString( m_dDimY, 1)
|
||||
SideChBx.IsChecked = m_bHeadSide
|
||||
|
||||
' --- INIZIO GESTIONE SPECIALE --- per macchina sinistrorsa
|
||||
@@ -168,16 +167,16 @@ Public Class GridCut
|
||||
|
||||
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())
|
||||
WritePrivateProfileString(S_DIRECTCUTS, K_DC_GRID_ANGH, DoubleToString(m_dAngO, 2), m_MainWindow.GetIniFile())
|
||||
WritePrivateProfileString(S_DIRECTCUTS, K_DC_GRID_ANGV, DoubleToString(m_dAngV, 2), m_MainWindow.GetIniFile())
|
||||
WritePrivateProfileString(S_DIRECTCUTS, K_DC_GRID_NUMX, m_nNumX.ToString(), m_MainWindow.GetIniFile())
|
||||
WritePrivateProfileString(S_DIRECTCUTS, K_DC_GRID_DIMX, DoubleToString(m_dDimX, 2), m_MainWindow.GetIniFile())
|
||||
WritePrivateProfileString(S_DIRECTCUTS, K_DC_GRID_NUMY, m_nNumY.ToString(), m_MainWindow.GetIniFile())
|
||||
WritePrivateProfileString(S_DIRECTCUTS, K_DC_GRID_DIMY, DoubleToString(m_dDimY, 2), m_MainWindow.GetIniFile())
|
||||
WritePrivateProfileString(S_DIRECTCUTS, K_DC_GRID_HEADSIDE, If(m_bHeadSide, "1", "0"), m_MainWindow.GetIniFile())
|
||||
WritePrivateProfileString(S_DIRECTCUTS, K_DC_GRID_POSX, DoubleToString(m_ptTipP1.x, 2), m_MainWindow.GetIniFile())
|
||||
WritePrivateProfileString(S_DIRECTCUTS, K_DC_GRID_POSY, DoubleToString(m_ptTipP1.y, 2), m_MainWindow.GetIniFile())
|
||||
WritePrivateProfileString( S_DIRECTCUTS, K_DC_GRID_DEPTH, DoubleToString( m_dDepth, 2), m_MainWindow.GetIniFile())
|
||||
WritePrivateProfileString( S_DIRECTCUTS, K_DC_GRID_ANGH, DoubleToString( m_dAngO, 2), m_MainWindow.GetIniFile())
|
||||
WritePrivateProfileString( S_DIRECTCUTS, K_DC_GRID_ANGV, DoubleToString( m_dAngV, 2), m_MainWindow.GetIniFile())
|
||||
WritePrivateProfileString( S_DIRECTCUTS, K_DC_GRID_NUMX, m_nNumX.ToString(), m_MainWindow.GetIniFile())
|
||||
WritePrivateProfileString( S_DIRECTCUTS, K_DC_GRID_DIMX, DoubleToString( m_dDimX, 2), m_MainWindow.GetIniFile())
|
||||
WritePrivateProfileString( S_DIRECTCUTS, K_DC_GRID_NUMY, m_nNumY.ToString(), m_MainWindow.GetIniFile())
|
||||
WritePrivateProfileString( S_DIRECTCUTS, K_DC_GRID_DIMY, DoubleToString( m_dDimY, 2), m_MainWindow.GetIniFile())
|
||||
WritePrivateProfileString( S_DIRECTCUTS, K_DC_GRID_HEADSIDE, If( m_bHeadSide, "1", "0"), m_MainWindow.GetIniFile())
|
||||
WritePrivateProfileString( S_DIRECTCUTS, K_DC_GRID_POSX, DoubleToString( m_ptTipP1.x, 2), m_MainWindow.GetIniFile())
|
||||
WritePrivateProfileString( S_DIRECTCUTS, K_DC_GRID_POSY, DoubleToString( m_ptTipP1.y, 2), m_MainWindow.GetIniFile())
|
||||
' Se non vado in simulazione
|
||||
If Not m_bSimul Then
|
||||
' Dichiaro sottopagina da non riattivare
|
||||
@@ -316,7 +315,7 @@ Public Class GridCut
|
||||
DirectionTxBx.Text = DoubleToString(m_dAngO - m_MainWindow.m_CurrentMachine.dDeltaC, 2)
|
||||
SideAngleTxBx.Text = DoubleToString(m_dAngV, 2)
|
||||
|
||||
' Altrimenti punto da click di mouse
|
||||
' Altrimenti punto da click di mouse
|
||||
Else
|
||||
' Assegno punto selezionato nel disegno a m_ptTipP1
|
||||
m_ptTipP1 = m_ptPrev
|
||||
@@ -406,7 +405,7 @@ Public Class GridCut
|
||||
m_dAngV = 90 - dTAngV
|
||||
SideAngleTxBx.Text = DoubleToString(m_dAngV, 2)
|
||||
|
||||
' Altrimenti punto da click di mouse
|
||||
' Altrimenti punto da click di mouse
|
||||
Else
|
||||
' Assegno punto selezionato nel disegno a m_ptTipP2
|
||||
m_ptTipP2 = m_ptPrev
|
||||
@@ -545,9 +544,9 @@ Public Class GridCut
|
||||
m_CurrProjPage.SetWarningMessage("Trial Version")
|
||||
#Else
|
||||
' Verifico non sia versione Ufficio
|
||||
If m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.OFFICE_TYPE) Then
|
||||
m_CurrProjPage.SetWarningMessage("Office Version")
|
||||
Return
|
||||
If m_MainWindow.GetKeyOption( MainWindow.KEY_OPT.OFFICE_TYPE) Then
|
||||
m_CurrProjPage.SetWarningMessage( "Office Version")
|
||||
Return
|
||||
End If
|
||||
' Verifico ci sia un taglio valido
|
||||
If Not m_bCutOk Then Return
|
||||
@@ -633,9 +632,9 @@ Public Class GridCut
|
||||
Private Function MultiplyCut(nLayerId As Integer) As Boolean
|
||||
' Recupero lo spessore del taglio della lama o del waterjet correntemente attiva
|
||||
Dim nType As Integer = 0
|
||||
EgtTdbGetCurrToolParam(MCH_TP.TYPE, nType)
|
||||
EgtTdbGetCurrToolParam( MCH_TP.TYPE, nType)
|
||||
Dim dThick As Double = 0
|
||||
EgtTdbGetCurrToolParam(If(nType = MCH_TY.SAW_STD, MCH_TP.THICK, MCH_TP.DIAM), dThick)
|
||||
EgtTdbGetCurrToolParam( If( nType = MCH_TY.SAW_STD, MCH_TP.THICK, MCH_TP.DIAM), dThick)
|
||||
' Ricalcolo lo spessore in base all'inclinazione
|
||||
dThick = dThick / Math.Cos(m_dAngV * Math.PI / 180)
|
||||
' Imposto angolo di rotazione a seconda del lato dei tagli paralleli
|
||||
@@ -657,8 +656,7 @@ Public Class GridCut
|
||||
If dDimPzY <> 0 And nNumPzY > 0 And dDimPzX <> 0 And nNumPzX > 0 Then
|
||||
Dim dLenX As Double = dThick + (dDimPzX + dThick) * nNumPzX
|
||||
Dim nCutParaId = EgtCreateLinePDL(nLayerId, ptStart, m_dAngO, dLenX + 0.1)
|
||||
' Inidico che è un taglio Diretto di tipo GridCut
|
||||
EgtSetInfo(nCutParaId, INFO_DIRECTCUT, FlagDirectCuts.GridCut)
|
||||
|
||||
' --- INIZIO GESTIONE SPECIALE --- per macchina sinistrorsa
|
||||
' Recupero spessore lama corrente
|
||||
Dim sSawing As String = m_MainWindow.m_CurrentMachine.sCurrSawing
|
||||
@@ -685,8 +683,7 @@ Public Class GridCut
|
||||
' Arretro il punto di partenza di uno spessore lama
|
||||
Dim vtDeltaPos As Vector3d = Vector3d.FromPolar(dThick + 0.1, m_dAngO - 90)
|
||||
Dim nCutPerpId = EgtCreateLinePDL(nLayerId, ptStart + vtDeltaPos, m_dAngO + 90, dLenY + 0.2)
|
||||
' Inidico che è un taglio Diretto di tipo GridCut
|
||||
EgtSetInfo(nCutPerpId, INFO_DIRECTCUT, FlagDirectCuts.GridCut)
|
||||
|
||||
' --- INIZIO GESTIONE SPECIALE --- per macchina sinistrorsa
|
||||
If m_bSawTh And Not String.IsNullOrEmpty(sSawing) Then
|
||||
EgtOffsetCurve(nCutPerpId, -dThick, OFF_TYPE.EXTEND)
|
||||
@@ -728,10 +725,10 @@ Public Class GridCut
|
||||
|
||||
Private Sub NumPzsTxBx_EgtClosed(sender As Object, e As EventArgs) Handles NumPzXTxBx.EgtClosed, NumPzYTxBx.EgtClosed,
|
||||
DimPzXTxBx.EgtClosed, DimPzYTxBx.EgtClosed, SideChBx.Click
|
||||
StringToInt(NumPzXTxBx.Text, m_nNumX)
|
||||
StringToLen(DimPzXTxBx.Text, m_dDimX)
|
||||
StringToInt(NumPzYTxBx.Text, m_nNumY)
|
||||
StringToLen(DimPzYTxBx.Text, m_dDimY)
|
||||
StringToInt( NumPzXTxBx.Text, m_nNumX)
|
||||
StringToLen( DimPzXTxBx.Text, m_dDimX)
|
||||
StringToInt( NumPzYTxBx.Text, m_nNumY)
|
||||
StringToLen( DimPzYTxBx.Text, m_dDimY)
|
||||
m_bHeadSide = SideChBx.IsChecked
|
||||
' Disegno il taglio
|
||||
CreateGridCut()
|
||||
|
||||
@@ -136,7 +136,7 @@ Public Class MachineButtonsUC
|
||||
ElseIf StateFlagArray(nIndex) = K_ZBJOG Then
|
||||
CurrToggleBtn.Content = "Z - B"
|
||||
ElseIf StateFlagArray(nIndex) = K_REMOTE Then
|
||||
CurrToggleBtn.Content = EgtMsg(90262) 'Remote
|
||||
CurrToggleBtn.Content = "Remote"
|
||||
End If
|
||||
Catch ex As Exception
|
||||
EgtOutLog("Error loading content " & StateFlagArray(nIndex))
|
||||
|
||||
@@ -53,43 +53,14 @@ Public Class ManualAxesMoveUC
|
||||
' Imposto check per considerare spessore lama
|
||||
L1SawThChBx.IsChecked = m_MainWindow.m_CurrentMachine.bAddSawThTo5AxMove
|
||||
L2SawThChBx.IsChecked = m_MainWindow.m_CurrentMachine.bAddSawThTo5AxMove
|
||||
|
||||
' Aggiorno visualizzazione
|
||||
SetMachineInCurrPos()
|
||||
EgtDraw()
|
||||
m_MainWindow.m_DirectCutPageUC.m_bShowMachine = True
|
||||
End Sub
|
||||
|
||||
Private Sub ManualAxesMove_UnLoaded(sender As Object, e As RoutedEventArgs) Handles Me.Unloaded
|
||||
m_Timer.Stop()
|
||||
m_MainWindow.m_CurrentMachine.bAddSawThTo5AxMove = (L1SawThChBx.IsEnabled And L1SawThChBx.IsChecked) Or
|
||||
(L2SawThChBx.IsEnabled And L2SawThChBx.IsChecked)
|
||||
' Nascondo la macchina
|
||||
m_MainWindow.m_DirectCutPageUC.m_bShowMachine = False
|
||||
EgtSetMachineLook(MCH_LOOK.TAB)
|
||||
EgtDraw()
|
||||
End Sub
|
||||
|
||||
Private Function SetMachineInCurrPos() As Boolean
|
||||
' Recupero la posizione macchina
|
||||
Dim dL1, dL2, dL3, dR1, dR2 As Double
|
||||
If Not m_MainWindow.m_CNCommunication.GetAxesPositions(dL1, dL2, dL3, dR1, dR2) Then Return False
|
||||
' Recupero il nome degli assi macchina
|
||||
Dim sL1 As String = String.Empty
|
||||
Dim sL2 As String = String.Empty
|
||||
Dim sL3 As String = String.Empty
|
||||
Dim sR1 As String = String.Empty
|
||||
Dim sR2 As String = String.Empty
|
||||
If Not m_MainWindow.m_CNCommunication.GetAxesNames(sL1, sL2, sL3, sR1, sR2) Then Return False
|
||||
' Visualizzo macchina in posizione
|
||||
EgtSetAxisPos(sL1, dL1)
|
||||
EgtSetAxisPos(sL2, dL2)
|
||||
EgtSetAxisPos(sL3, dL3)
|
||||
EgtSetAxisPos(sR1, dR1)
|
||||
EgtSetAxisPos(sR2, dR2)
|
||||
Return True
|
||||
End Function
|
||||
|
||||
Private Sub UpdateAxesNames()
|
||||
Dim sL1 As String = String.Empty
|
||||
Dim sL2 As String = String.Empty
|
||||
@@ -154,16 +125,11 @@ Public Class ManualAxesMoveUC
|
||||
Private Sub Timer_tick()
|
||||
UpdateAxesNames()
|
||||
UpdateUseSawThickness()
|
||||
' Aggiorno posizione macchina in disegno
|
||||
SetMachineInCurrPos()
|
||||
' Aggiorno il disegno
|
||||
EgtDraw()
|
||||
End Sub
|
||||
|
||||
Private m_MoveClicked As Boolean = False
|
||||
Private Sub XXBtn_Click(sender As Object, e As MouseButtonEventArgs) Handles L1Btn.PreviewMouseDown, L2Btn.PreviewMouseDown, L3Btn.PreviewMouseDown, R1Btn.PreviewMouseDown, R2Btn.PreviewMouseDown
|
||||
If e.ClickCount > 1 OrElse m_MoveClicked Then
|
||||
EgtOutLog(" → Hold on! Do not click compulsively.")
|
||||
Return
|
||||
End If
|
||||
m_MoveClicked = True
|
||||
@@ -250,7 +216,6 @@ Public Class ManualAxesMoveUC
|
||||
Private Sub SiemensMoveAxis(CurrentBtn As Button)
|
||||
' leggo se stato reset
|
||||
If Not m_CN.bResetState Then
|
||||
EgtOutLog("Reset status is 'False', is denied to execute file '\DirectCmd\AxesMove.lua'.")
|
||||
m_MoveClicked = False
|
||||
Return
|
||||
End If
|
||||
|
||||
@@ -532,8 +532,8 @@ Public Class SawTestUC
|
||||
vtPerp.Rotate(Vector3d.Z_AX, +90)
|
||||
Else
|
||||
m_CurrProjPage.ClearMessage()
|
||||
' 91143 = Set machining side: right or left.
|
||||
m_CurrProjPage.SetInfoMessage(EgtMsg(91143))
|
||||
' 91144 = Set machining side: right or left.
|
||||
m_CurrProjPage.SetInfoMessage(EgtMsg(91144))
|
||||
End If
|
||||
Dim ptEnd As Point3d = ptStart + vtDir * m_dLen + vtPerp * dThick
|
||||
Dim dLen2 As Double = m_dLen / 2
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
Imports System.Windows.Threading
|
||||
Imports EgtUILib
|
||||
Imports OmagCUT.MainWindow
|
||||
|
||||
Public Class SingleCutUC
|
||||
|
||||
@@ -148,8 +147,6 @@ Public Class SingleCutUC
|
||||
' Deseleziono bottone primo punto
|
||||
Point1Btn.IsChecked = False
|
||||
|
||||
' forzo la verifica dell'affondamento in relazione allo spessore del pezzo
|
||||
DepthTxBx_EgtClosed(Nothing, Nothing)
|
||||
' la visualizzazione dei comandi è gestita dalla DirectCutPageUC richiamando la funzione ReloadParam
|
||||
|
||||
' forzo la macchina ad essere visibile fin da subito
|
||||
@@ -162,7 +159,7 @@ Public Class SingleCutUC
|
||||
' Aggiorno visualizzazione
|
||||
EgtDraw()
|
||||
|
||||
' Avvio il timer
|
||||
' Avvi il timer
|
||||
m_RefreshTimer.Start()
|
||||
End Sub
|
||||
|
||||
@@ -675,8 +672,6 @@ Public Class SingleCutUC
|
||||
' Imposto affondamento e angolo di fianco sul taglio
|
||||
EgtSetInfo(nCutId, INFO_DEPTH, m_dDepth)
|
||||
EgtSetInfo(nCutId, INFO_SIDE_ANGLE, m_dAngV)
|
||||
' Inidico che è un taglio Diretto di tipo SingleCut
|
||||
EgtSetInfo(nCutId, INFO_DIRECTCUT, FlagDirectCuts.SingleCut)
|
||||
' Imposto se disabilitare l'inversine di direzione del taglio
|
||||
If Not m_MainWindow.m_CurrentMachine.bEnableInvert Then EgtSetInfo(nCutId, INFO_ENABLE_INVERT, 0)
|
||||
' Creo layer per crocetta di riferimento
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
Imports EgtUILib
|
||||
Imports OmagCUT.MainWindow
|
||||
Imports System.Collections.ObjectModel
|
||||
Public Class SingleDrillUC
|
||||
' Riferimenti a pagine
|
||||
@@ -439,8 +438,7 @@ Public Class SingleDrillUC
|
||||
End If
|
||||
|
||||
Dim nCutId = EgtCreateCircle(nLayerId, ptStart, m_dDiameter / 2)
|
||||
' Inidico che è un taglio Diretto di tipo SingleDrill
|
||||
EgtSetInfo(nCutId, INFO_DIRECTCUT, FlagDirectCuts.SingleDrill)
|
||||
|
||||
' Calcolo punto di inserimento nel grezzo
|
||||
Dim ptMin, ptMax As Point3d
|
||||
EgtGetBBoxGlob(nPartId, GDB_BB.STANDARD, ptMin, ptMax)
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
Imports EgtUILib
|
||||
Imports OmagCUT.MainWindow
|
||||
|
||||
Public Class SquaringUC
|
||||
|
||||
@@ -351,7 +350,6 @@ Public Class SquaringUC
|
||||
EgtTdbGetCurrToolParam(MCH_TP.TYPE, nType)
|
||||
Dim dThick As Double = 0
|
||||
EgtTdbGetCurrToolParam(If(nType = MCH_TY.SAW_STD, MCH_TP.THICK, MCH_TP.DIAM), dThick)
|
||||
EgtOutLog("Curr tool type in use for squaring: " & If(nType = MCH_TY.SAW_STD, "SAW_STD", "NOT 'SAW_STD'"))
|
||||
' Ricalcolo lo spessore in base all'inclinazione
|
||||
dThick = dThick / Math.Cos(m_dAngV * Math.PI / 180)
|
||||
' Imposto angolo di rotazione a seconda del lato dei tagli paralleli
|
||||
@@ -369,14 +367,9 @@ Public Class SquaringUC
|
||||
If dDimPzY <> 0 And nNumPzY > 0 And dDimPzX <> 0 And nNumPzX > 0 Then
|
||||
Dim dLenX As Double = dThick + (dDimPzX + dThick) * nNumPzX
|
||||
Dim nCutParaId = EgtCreateLinePDL(nLayerId, ptStart, m_dAngO, dLenX + 0.1)
|
||||
' Inidico che è un taglio Diretto di tipo Squaring
|
||||
EgtSetInfo(nCutParaId, INFO_DIRECTCUT, FlagDirectCuts.Squaring)
|
||||
' Imposto affondamento e angolo di fianco sul taglio (solo se non lama STD)
|
||||
If Not nType = MCH_TY.SAW_STD Then
|
||||
EgtSetInfo(nCutParaId, INFO_DEPTH, m_dDepth)
|
||||
EgtSetInfo(nCutParaId, INFO_SIDE_ANGLE, m_dAngV)
|
||||
EgtOutLog("Curr tool in use is not of type SAW_STD: Depth is limited to raw thickness")
|
||||
End If
|
||||
' Imposto affondamento e angolo di fianco sul taglio
|
||||
EgtSetInfo(nCutParaId, INFO_DEPTH, m_dDepth)
|
||||
EgtSetInfo(nCutParaId, INFO_SIDE_ANGLE, m_dAngV)
|
||||
' Allungo la geometria
|
||||
EgtExtendCurveStartByLen(nCutParaId, m_dOffsetSquaring + m_dExtraLength)
|
||||
EgtExtendCurveEndByLen(nCutParaId, m_dOffsetSquaring + +m_dExtraLength)
|
||||
|
||||
@@ -29,43 +29,43 @@
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<TextBlock Name="Label1" Grid.Row="0"
|
||||
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="TextBox1" Grid.Column="1" Grid.Row="0" Width="90"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
<TextBlock Name="Label2" Grid.Row="1"
|
||||
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="TextBox2" Grid.Column="1" Grid.Row="1" Width="90"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
<TextBlock Name="Label3" Grid.Row="2"
|
||||
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="TextBox3" Grid.Column="1" Grid.Row="2" Width="90"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
<TextBlock Name="Label4" Grid.Row="3"
|
||||
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="TextBox4" Grid.Column="1" Grid.Row="3" Width="90"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
<TextBlock Name="Label5" Grid.Row="4"
|
||||
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="TextBox5" Grid.Column="1" Grid.Row="4" Width="90"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
<TextBlock Name="Label6" Grid.Row="5"
|
||||
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="TextBox6" Grid.Column="1" Grid.Row="5" Width="90"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
<TextBlock Name="Label7" Grid.Row="6"
|
||||
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="TextBox7" Grid.Column="1" Grid.Row="6" Width="90"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
<TextBlock Name="Label8" Grid.Row="7"
|
||||
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="TextBox8" Grid.Column="1" Grid.Row="7" Width="90"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
<TextBlock Name="Label9" Grid.Row="8"
|
||||
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="TextBox9" Grid.Column="1" Grid.Row="8" Width="90"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
<TextBlock Name="Label10" Grid.Row="9"
|
||||
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="TextBox10" Grid.Column="1" Grid.Row="9" Width="90"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
|
||||
|
||||
@@ -95,7 +95,7 @@
|
||||
<Grid Name="TopGrd">
|
||||
|
||||
<TextBlock Name="TopTxBl"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}" />
|
||||
Style="{StaticResource OmagCut_ToolsDBTextBlock}" />
|
||||
<CheckBox Name="TopChBx" Style="{StaticResource OmagCut_CheckBox}"
|
||||
HorizontalAlignment="Right" Margin="6,0,6,0"/>
|
||||
|
||||
@@ -122,7 +122,7 @@
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<TextBlock Name="PartNumTxBl" Grid.Column="0" Style="{DynamicResource OmagCut_CurrProjSummeryTextBlock}"
|
||||
<TextBlock Name="PartNumTxBl" Grid.Column="0" Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"
|
||||
TextAlignment="Right"/>
|
||||
<EgtWPFLib:EgtTextBox Name="PartNumTxBx" Grid.Column="1" Width="60" IsLength="False"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
|
||||
@@ -1185,8 +1185,6 @@ Public Class DrawPageUC
|
||||
Else
|
||||
MakeMultipleInsert(InsNbr, sPartName)
|
||||
End If
|
||||
' Attivo il parcheggio dei pezzi Draw (per il corretto posizionamento nella scena)
|
||||
ActivateParkIndZero()
|
||||
Dim bExitPage As Boolean = GetPrivateProfileInt(S_GENERAL, K_QUITDRAWPAGE, 1, m_MainWindow.GetIniFile) <> 0
|
||||
' Se Shift premuto eseguo il contrario
|
||||
If Keyboard.Modifiers And ModifierKeys.Shift Then
|
||||
@@ -1241,24 +1239,6 @@ Public Class DrawPageUC
|
||||
m_MainWindow.MainWindowGrid.Children.Remove(m_MainWindow.m_DrawPageUC)
|
||||
m_MainWindow.MainWindowGrid.Children.Add(m_MainWindow.m_CurrentProjectPageUC)
|
||||
m_MainWindow.m_ActivePage = If(m_MainWindow.FrameCutBtn.IsChecked, MainWindow.Pages.FrameCut, MainWindow.Pages.CadCut)
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub ActivateParkIndZero()
|
||||
' Aggiorno la gestione dei parcheggi: spengo tutti i parcheggi tranne quello dei pezzi disegnati "0"
|
||||
Dim ListParkInd As New List(Of ParkInd)
|
||||
SelParkIndWD.LoadParkInd(ListParkInd)
|
||||
For Each ItemParkInd As ParkInd In ListParkInd
|
||||
If ItemParkInd.Ind = 0 Then
|
||||
ItemParkInd.Status = GDB_ST.ON_
|
||||
Else
|
||||
ItemParkInd.Status = GDB_ST.OFF
|
||||
End If
|
||||
Next
|
||||
' Aggiorno lo stato dei pezzi
|
||||
For Each Item As ParkInd In ListParkInd
|
||||
SelParkIndWD.SetStatusPartInParkInd(Item, False)
|
||||
Next
|
||||
End Sub
|
||||
|
||||
Private Sub TrfDataBtn_Click(sender As Object, e As RoutedEventArgs) Handles TrfDataBtn.Click
|
||||
|
||||
@@ -38,8 +38,6 @@ Public Class ImportPageUC
|
||||
Private Const FT_TRF As Integer = 51
|
||||
' Costante per formato CUT
|
||||
Private Const FT_CUT As Integer = 52
|
||||
' Indice del parcheggio corrente
|
||||
Private NewParkInd As Integer = 0
|
||||
|
||||
' Indentificativo del pezzo selezionato
|
||||
Private m_nSelectedPart As Integer = GDB_ID.NULL
|
||||
@@ -84,13 +82,13 @@ Public Class ImportPageUC
|
||||
ResetBtn.Content = EgtMsg(MSG_IMPORTPAGEUC + 3) 'Reset
|
||||
mmBtn.Content = EgtMsg(MSG_IMPORTPAGEUC + 4) 'mm
|
||||
inchBtn.Content = EgtMsg(MSG_IMPORTPAGEUC + 5) 'inch
|
||||
OrderListBtn.Content = EgtMsg(90398) 'Dati Csv
|
||||
TopBtn.Content = EgtMsg(90384) 'Indica Lato Sopra
|
||||
OrderListBtn.Content = EgtMsg( 90398) 'Dati Csv
|
||||
TopBtn.Content = EgtMsg( 90384) 'Indica Lato Sopra
|
||||
PartNumTxBl.Text = EgtMsg(MSG_IMPORTPAGEUC + 15) 'Numero
|
||||
SideAngleBtn.Content = EgtMsg(MSG_IMPORTPAGEUC + 7) 'Inclina lati
|
||||
FiloTopBtn.Content = EgtMsg(90400) 'Filo Top
|
||||
FiloTopBtn.Content = EgtMsg( 90400) 'Filo Top
|
||||
DripCutBtn.Content = EgtMsg(MSG_IMPORTPAGEUC + 8) 'Incidi da sotto
|
||||
EngraveBtn.Content = EgtMsg(91238) 'Engrave
|
||||
EngraveBtn.Content = "Engrave"
|
||||
DripDrillBtn.Content = EgtMsg(MSG_IMPORTPAGEUC + 14) 'Foro da sotto
|
||||
Cad2dBtn.Content = "Cad 2d"
|
||||
|
||||
@@ -100,6 +98,7 @@ Public Class ImportPageUC
|
||||
End Sub
|
||||
|
||||
Private Sub ImportPage_Loaded(sender As Object, e As RoutedEventArgs)
|
||||
|
||||
' abilitazione importazione TRF
|
||||
m_bEnableTrf = (m_MainWindow.m_PrevActivePage = MainWindow.Pages.CadCut And
|
||||
m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.TRF_IMPORT))
|
||||
@@ -161,7 +160,7 @@ Public Class ImportPageUC
|
||||
' Verifico esistenza Cad 2d
|
||||
GetPrivateProfileString(S_CAD2D, K_CAD2D_NAME, "", m_sCad2dName, m_MainWindow.GetIniFile())
|
||||
GetPrivateProfileString(S_CAD2D, K_CAD2D_EXEPATH, "", m_sCad2dPath, m_MainWindow.GetIniFile())
|
||||
Cad2dBtn.IsEnabled = My.Computer.FileSystem.FileExists(m_sCad2dPath)
|
||||
Cad2dBtn.IsEnabled = My.Computer.FileSystem.FileExists( m_sCad2dPath)
|
||||
|
||||
' Pulisco tutto
|
||||
ClearView()
|
||||
@@ -180,7 +179,7 @@ Public Class ImportPageUC
|
||||
UseClosedCurveBtn.Visibility = Windows.Visibility.Visible
|
||||
ResetBtn.Visibility = Windows.Visibility.Visible
|
||||
SideAngleBtn.Visibility = Windows.Visibility.Visible
|
||||
OrderListBtn.Visibility = If(m_bEnableOrderList, Windows.Visibility.Visible, Windows.Visibility.Hidden)
|
||||
OrderListBtn.Visibility = If( m_bEnableOrderList, Windows.Visibility.Visible, Windows.Visibility.Hidden)
|
||||
TopBtn.Visibility = Windows.Visibility.Visible
|
||||
PartNumberGrd.Visibility = Windows.Visibility.Visible
|
||||
Else
|
||||
@@ -190,7 +189,7 @@ Public Class ImportPageUC
|
||||
ResetBtn.Visibility = Windows.Visibility.Hidden
|
||||
SideAngleBtn.Visibility = Windows.Visibility.Hidden
|
||||
OrderListBtn.Visibility = Windows.Visibility.Hidden
|
||||
TopBtn.Visibility = Windows.Visibility.Hidden
|
||||
TopBtn.Visibility = Windows.Visibility.Hidden
|
||||
PartNumberGrd.Visibility = Windows.Visibility.Hidden
|
||||
End If
|
||||
mmBtn.IsEnabled = True
|
||||
@@ -207,8 +206,6 @@ Public Class ImportPageUC
|
||||
PartNumTxBx.Text = "1"
|
||||
' disabilito ok
|
||||
OkBtn.IsEnabled = False
|
||||
' Azzero l'idice di parcheggio
|
||||
NewParkInd = 0
|
||||
End Sub
|
||||
|
||||
Private Sub LoadGridData()
|
||||
@@ -459,7 +456,7 @@ Public Class ImportPageUC
|
||||
ElseIf DripDrillBtn.IsChecked() Then
|
||||
OnMouseDownSceneUnderDrill(e)
|
||||
ElseIf FiloTopBtn.IsChecked() Then
|
||||
OnMouseDownSceneFiloTop(e)
|
||||
OnMouseDownSceneFiloTop( e)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
@@ -589,14 +586,14 @@ Public Class ImportPageUC
|
||||
EgtDeselectObj(nId)
|
||||
EgtDeselectObj(nLayId)
|
||||
Dim sLayName As String = ""
|
||||
If EgtGetName(nLayId, sLayName) AndAlso sLayName = NAME_INLOOP AndAlso EgtExistsInfo(nLayId, INFO_FILOTOP) Then
|
||||
EgtRemoveInfo(nLayId, INFO_FILOTOP)
|
||||
EgtRemoveInfo(nLayId, INFO_OFFSET)
|
||||
EgtRemoveInfo(nLayId, INFO_DEPTH)
|
||||
Dim nEntId As Integer = EgtGetFirstInGroup(nLayId)
|
||||
If EgtGetName(nLayId, sLayName) AndAlso sLayName = NAME_INLOOP AndAlso EgtExistsInfo( nLayId, INFO_FILOTOP) Then
|
||||
EgtRemoveInfo( nLayId, INFO_FILOTOP)
|
||||
EgtRemoveInfo( nLayId, INFO_OFFSET)
|
||||
EgtRemoveInfo( nLayId, INFO_DEPTH)
|
||||
Dim nEntId As Integer = EgtGetFirstInGroup( nLayId)
|
||||
While nEntId <> GDB_ID.NULL
|
||||
EgtSetColor(nEntId, New Color3d(127, 63, 0))
|
||||
nEntId = EgtGetNext(nEntId)
|
||||
nEntId = EgtGetNext( nEntId)
|
||||
End While
|
||||
m_DeselectListHole.Add(nLayId)
|
||||
m_SelListHole.Remove(nLayId)
|
||||
@@ -605,16 +602,16 @@ Public Class ImportPageUC
|
||||
Dim nLayId As Integer = GDB_ID.NULL
|
||||
EgtGetInfo(nId, "ID", nLayId)
|
||||
Dim sLayName As String = ""
|
||||
If EgtGetName(nLayId, sLayName) AndAlso sLayName = NAME_INLOOP Then
|
||||
EgtSelectObj(nId)
|
||||
EgtSelectObj(nLayId)
|
||||
EgtSetInfo(nLayId, INFO_FILOTOP, 1)
|
||||
EgtSetInfo(nLayId, INFO_OFFSET, m_FiloTopUC.FiloTopOffset)
|
||||
EgtSetInfo(nLayId, INFO_DEPTH, m_FiloTopUC.FiloTopDepth)
|
||||
Dim nEntId As Integer = EgtGetFirstInGroup(nLayId)
|
||||
If EgtGetName( nLayId, sLayName) AndAlso sLayName = NAME_INLOOP Then
|
||||
EgtSelectObj( nId)
|
||||
EgtSelectObj( nLayId)
|
||||
EgtSetInfo( nLayId, INFO_FILOTOP, 1)
|
||||
EgtSetInfo( nLayId, INFO_OFFSET, m_FiloTopUC.FiloTopOffset)
|
||||
EgtSetInfo( nLayId, INFO_DEPTH, m_FiloTopUC.FiloTopDepth)
|
||||
Dim nEntId As Integer = EgtGetFirstInGroup( nLayId)
|
||||
While nEntId <> GDB_ID.NULL
|
||||
EgtSetColor(nEntId, New Color3d(255, 255, 255))
|
||||
nEntId = EgtGetNext(nEntId)
|
||||
nEntId = EgtGetNext( nEntId)
|
||||
End While
|
||||
m_SelListHole.Add(nLayId)
|
||||
m_DeselectListHole.Remove(nLayId)
|
||||
@@ -663,7 +660,7 @@ Public Class ImportPageUC
|
||||
' Ciclo sulle regioni
|
||||
Dim EntId As Integer = EgtGetFirstInGroup(RegionId)
|
||||
While EntId <> GDB_ID.NULL
|
||||
If EgtGetType(EntId) = GDB_TY.SRF_FRGN Then EgtSetColor(EntId, InsertColor)
|
||||
If EgtGetType( EntId) = GDB_TY.SRF_FRGN Then EgtSetColor(EntId, InsertColor)
|
||||
EntId = EgtGetNext(EntId)
|
||||
End While
|
||||
RegionId = EgtGetNextName(PartId, NAME_REGION)
|
||||
@@ -859,38 +856,20 @@ Public Class ImportPageUC
|
||||
End Sub
|
||||
|
||||
Private Sub OrderListBtn_Click(sender As Object, e As RoutedEventArgs) Handles OrderListBtn.Click
|
||||
Dim DlgOrderList As New CompoCsvData(m_MainWindow)
|
||||
DlgOrderList.SetData(m_sOrder, m_sList)
|
||||
Dim DlgOrderList As New CompoCsvData( m_MainWindow)
|
||||
DlgOrderList.SetData( m_sOrder, m_sList)
|
||||
If DlgOrderList.ShowDialog() Then
|
||||
DlgOrderList.GetData(m_sOrder, m_sList)
|
||||
DlgOrderList.GetData( m_sOrder, m_sList)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub OkBtn_Click(sender As Object, e As RoutedEventArgs) Handles OkBtn.Click
|
||||
m_SceneButtons.MeasureBtn.IsChecked = False
|
||||
' Genero l'immagine solo se è abilitata la modalità
|
||||
If GetPrivateProfileInt(S_GENERAL, K_ENABLEDXFPARK, 0, m_MainWindow.GetIniFile) <> 0 Then Print()
|
||||
' Se import per pezzi piatti
|
||||
If m_MainWindow.m_PrevActivePage = MainWindow.Pages.CadCut Then
|
||||
' Eseguo importazione pezzi piatti
|
||||
LoadFlatParts()
|
||||
|
||||
' Aggiorno la gestione dei parcheggi: spengo tutti i parcheggi tranne quello indicato
|
||||
Dim ListParkInd As New List(Of ParkInd)
|
||||
SelParkIndWD.LoadParkInd(ListParkInd)
|
||||
For Each ItemParkInd As ParkInd In ListParkInd
|
||||
If ItemParkInd.Ind = NewParkInd Then
|
||||
ItemParkInd.Status = GDB_ST.ON_
|
||||
Else
|
||||
ItemParkInd.Status = GDB_ST.OFF
|
||||
End If
|
||||
Next
|
||||
' Aggiorno lo stato dei pezzi
|
||||
For Each Item As ParkInd In ListParkInd
|
||||
SelParkIndWD.SetStatusPartInParkInd(Item, False)
|
||||
Next
|
||||
|
||||
' altrimenti import per cornici
|
||||
' altrimenti import per cornici
|
||||
Else
|
||||
LoadFrame()
|
||||
End If
|
||||
@@ -900,80 +879,6 @@ Public Class ImportPageUC
|
||||
m_MainWindow.m_ActivePage = m_MainWindow.m_PrevActivePage
|
||||
End Sub
|
||||
|
||||
' Creo una immagine del progetto da importare salvato nel percorso di progetto "..\(#ProjInd)_ParkInd_(#ParkInd).png"
|
||||
Public Sub Print()
|
||||
' recupero la lista degli indici di parcheggio
|
||||
NewParkInd = SelParkIndWD.NewParkInd()
|
||||
|
||||
Dim SM_Select As SM = SM.SHADING
|
||||
' SM_Select = SM.HIDDENLINE
|
||||
' SM_Select = SM.WIREFRAME
|
||||
Dim nProj As Integer = m_MainWindow.m_CurrentProjectPageUC.GetCurrentProject()
|
||||
Dim sPath As String = SelParkIndWD.GetPathCurrProj() & NewParkInd.ToString & ".png"
|
||||
' Recupero le dimensioni dell'area di stampa
|
||||
Dim dW As Integer = 120
|
||||
Dim dH As Integer = 120
|
||||
|
||||
If Not MainWindow.m_bShowSVGParkInd Then
|
||||
Try
|
||||
' Prendo l'immagine corrente per la stampa
|
||||
Dim colBackTopColor As Color3d = GetBackTopColor()
|
||||
Dim colBackBottomColor As Color3d = GetBackBottomColor()
|
||||
' Recupero le dimensioni correnti della pagina di disegno
|
||||
Dim nImgW As Integer = m_MainWindow.m_CurrentProjectPageUC.ActualWidth()
|
||||
Dim nImgH As Integer = m_MainWindow.m_CurrentProjectPageUC.ActualHeight()
|
||||
If Not EgtGetImage(SM_Select, colBackTopColor, colBackBottomColor, nImgW, nImgH, sPath) Then
|
||||
' Error in creating the print image
|
||||
EgtOutLog(EgtMsg(50181))
|
||||
EgtSetLineAttribs(1)
|
||||
Return
|
||||
End If
|
||||
EgtSetLineAttribs(1)
|
||||
'Metodo complesso di stampa che permette di rilasciare il file :
|
||||
'carico la bitmap e la metto in uno stream in memoria
|
||||
Dim stream As System.IO.Stream = New System.IO.MemoryStream()
|
||||
Dim bitmap As System.Drawing.Bitmap = New System.Drawing.Bitmap(sPath)
|
||||
bitmap.Save(stream, System.Drawing.Imaging.ImageFormat.Png)
|
||||
bitmap.Dispose()
|
||||
' la sposto in una BitmapImage
|
||||
Dim bitImage As New System.Windows.Media.Imaging.BitmapImage()
|
||||
bitImage.BeginInit()
|
||||
bitImage.StreamSource = stream
|
||||
bitImage.EndInit()
|
||||
' la sposto in un Visual Control
|
||||
Dim tmpImg As New Image
|
||||
tmpImg.BeginInit()
|
||||
tmpImg.Source = bitImage
|
||||
tmpImg.Stretch = Stretch.Uniform
|
||||
tmpImg.EndInit()
|
||||
' eseguo la stampa
|
||||
Catch
|
||||
' Rrror in executing print
|
||||
EgtOutLog(EgtMsg(50182))
|
||||
End Try
|
||||
Else
|
||||
' Assegno dei nomi ai pezzi (Da controllare bene se funzione sempre)...riassegno i nomi dopo?
|
||||
Dim nIdPart As Integer = EgtGetFirstPart()
|
||||
Dim nIndex As Integer = 0
|
||||
While nIdPart <> GDB_ID.NULL
|
||||
' recupero il primo layer del part
|
||||
Dim nIdLay As Integer = EgtGetFirstLayer(nIdPart)
|
||||
While nIdLay <> GDB_ID.NULL
|
||||
Dim nIdEnt As Integer = EgtGetFirstInGroup(nIdLay)
|
||||
While nIdEnt <> GDB_ID.NULL
|
||||
EgtSetName(nIdEnt, nIndex.ToString)
|
||||
nIdEnt = EgtGetNext(nIdEnt)
|
||||
nIndex = nIndex + 1
|
||||
End While
|
||||
nIdLay = EgtGetNextLayer(nIdLay)
|
||||
End While
|
||||
nIdPart = EgtGetNextPart(nIdPart)
|
||||
End While
|
||||
EgtExportSvg(GDB_ID.ROOT, SelParkIndWD.GetPathCurrProj() & NewParkInd.ToString & ".svg")
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub LoadFlatParts()
|
||||
' Cancello regioni di selezione dai pezzi
|
||||
Dim PartId As Integer = EgtGetFirstPart()
|
||||
@@ -1046,37 +951,21 @@ Public Class ImportPageUC
|
||||
If My.Computer.FileSystem.FileExists(sTmpFile) Then
|
||||
My.Computer.FileSystem.DeleteFile(sTmpFile)
|
||||
End If
|
||||
|
||||
' Calcolo l'area dei pezzi inseriti
|
||||
Dim dNewArea As Double = 0
|
||||
Dim nId As Integer = nFirstId
|
||||
While nId <> GDB_ID.NULL
|
||||
' Definisco l'indice di parcheggio asssganto al pezzo
|
||||
If GetPrivateProfileInt(S_GENERAL, K_ENABLEDXFPARK, 0, m_MainWindow.GetIniFile) <> 0 Then
|
||||
EgtSetInfo(nId, INFO_PARKIND, NewParkInd.ToString)
|
||||
' Imposto lo stato
|
||||
EgtSetStatus(nId, GDB_ST.ON_)
|
||||
' Salvo lo stato (per gestire la navigazione)
|
||||
EgtSetInfo(nId, INFO_PARKSTATUS, GDB_ST.ON_)
|
||||
End If
|
||||
dNewArea += GeomCalc.GetPartArea(nId)
|
||||
' Passo al pezzo successivo
|
||||
nId = EgtGetNextPart(nId)
|
||||
End While
|
||||
' Nascondo tutti i pezzi inseriti (per evitare interferenze con pezzi in fase di parcheggio)
|
||||
nId = nFirstId
|
||||
Dim GlobBBox As New BBox3d
|
||||
While nId <> GDB_ID.NULL
|
||||
Dim bboxTemp As New BBox3d
|
||||
EgtGetBBox(nId, 0, bboxTemp)
|
||||
GlobBBox.Add(bboxTemp)
|
||||
EgtSetStatus(nId, GDB_ST.OFF)
|
||||
' Passo al pezzo successivo
|
||||
nId = EgtGetNextPart(nId)
|
||||
End While
|
||||
Dim DimX As Double = GlobBBox.DimX
|
||||
Dim DimY As Double = GlobBBox.DimY
|
||||
Dim BBoxMaxPt As Point3d = GlobBBox.Max
|
||||
|
||||
' Ciclo sui pezzi inseriti
|
||||
nId = nFirstId
|
||||
@@ -1113,12 +1002,7 @@ Public Class ImportPageUC
|
||||
' Imposto path di provenienza
|
||||
EgtSetInfo(nId, INFO_SOU_PATH, IO.Path.Combine(m_sCurrDir, m_sCurrFile))
|
||||
' Inserisco in parcheggio
|
||||
If GetPrivateProfileInt(S_GENERAL, K_ENABLEDXFPARK, 0, m_MainWindow.GetIniFile) <> 0 Then
|
||||
' Mantengo la posizione relativa tra i pezzi
|
||||
m_MainWindow.m_CadCutPageUC.m_NestPage.StoreOnePartDXF(nId, DimX, DimY, BBoxMaxPt)
|
||||
Else
|
||||
m_MainWindow.m_CadCutPageUC.m_NestPage.StoreOnePart(nId, True)
|
||||
End If
|
||||
m_MainWindow.m_CadCutPageUC.m_NestPage.StoreOnePart(nId, True)
|
||||
' Recupero Id di pezzo successivo
|
||||
Dim nNextId As Integer = EgtGetNextPart(nId)
|
||||
' Se richiesto posizionamento diretto, lo eseguo
|
||||
@@ -1541,9 +1425,8 @@ Public Class ImportPageUC
|
||||
If nType = GDB_TY.CRV_LINE Or nType = GDB_TY.CRV_ARC Or nType = GDB_TY.CRV_COMPO Then
|
||||
vCrvId.Add(nCrvId)
|
||||
End If
|
||||
ElseIf DripDrillBtn.IsChecked Then
|
||||
|
||||
If nType = GDB_TY.CRV_ARC Then
|
||||
ElseIf DripDrillBtn.IsChecked
|
||||
if nType = GDB_TY.CRV_ARC
|
||||
vCrvId.Add(nCrvId)
|
||||
End If
|
||||
End If
|
||||
@@ -1569,11 +1452,11 @@ Public Class ImportPageUC
|
||||
|
||||
Private Sub Cad2dBtn_Click(sender As Object, e As RoutedEventArgs) Handles Cad2dBtn.Click
|
||||
|
||||
Dim ProcsCad2d As Process() = Process.GetProcessesByName(m_sCad2dName)
|
||||
Dim ProcsCad2d As Process() = Process.GetProcessesByName( m_sCad2dName)
|
||||
If ProcsCad2d.Length() > 0 Then
|
||||
ShowWindow(ProcsCad2d(0).MainWindowHandle, 3)
|
||||
ShowWindow( ProcsCad2d(0).MainWindowHandle, 3)
|
||||
Else
|
||||
Process.Start(m_sCad2dPath)
|
||||
Process.Start( m_sCad2dPath)
|
||||
End If
|
||||
|
||||
End Sub
|
||||
@@ -1582,42 +1465,42 @@ End Class
|
||||
|
||||
Public Class IconListBoxItem
|
||||
|
||||
Private m_iPictureID As Integer
|
||||
Private m_sName As String
|
||||
Private m_iPictureID As Integer
|
||||
Private m_sName As String
|
||||
|
||||
Public Property PictureID() As Integer
|
||||
Get
|
||||
Return m_iPictureID
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
m_iPictureID = value
|
||||
End Set
|
||||
End Property
|
||||
Public Property PictureID() As Integer
|
||||
Get
|
||||
Return m_iPictureID
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
m_iPictureID = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property Name() As String
|
||||
Get
|
||||
Return m_sName
|
||||
End Get
|
||||
Set(value As String)
|
||||
m_sName = value
|
||||
End Set
|
||||
End Property
|
||||
Public Property Name() As String
|
||||
Get
|
||||
Return m_sName
|
||||
End Get
|
||||
Set(value As String)
|
||||
m_sName = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property PictureString() As String
|
||||
Get
|
||||
Return "/Resources/ImportPageListBoxImages/" + PictureID.ToString() + ".png"
|
||||
End Get
|
||||
End Property
|
||||
Public ReadOnly Property PictureString() As String
|
||||
Get
|
||||
Return "/Resources/ImportPageListBoxImages/" + PictureID.ToString() + ".png"
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Sub New()
|
||||
Me.Name = String.Empty
|
||||
Me.PictureID = 0
|
||||
End Sub
|
||||
Sub New()
|
||||
Me.Name = String.Empty
|
||||
Me.PictureID = 0
|
||||
End Sub
|
||||
|
||||
Sub New(Name As String, PictureID As Integer)
|
||||
Me.Name = Name
|
||||
Me.PictureID = PictureID
|
||||
End Sub
|
||||
Sub New(Name As String, PictureID As Integer)
|
||||
Me.Name = Name
|
||||
Me.PictureID = PictureID
|
||||
End Sub
|
||||
|
||||
|
||||
End Class
|
||||
@@ -226,10 +226,6 @@ Module SideAngle
|
||||
EgtSetInfo(EntId, INFO_SIDE_ANGLE, dAng)
|
||||
EgtSetInfo(EntId, INFO_ORIG_SIDE_ANGLE, dAng)
|
||||
EgtSetInfo(EntId, INFO_HEEL, dHeel)
|
||||
Dim sSawingTilted As String = m_MainWindow.m_CurrentMachine.sCurrSawingTilted
|
||||
If Not String.IsNullOrEmpty(sSawingTilted) Then
|
||||
EgtSetInfo(EntId, DEF_MACHINING_TILTED, sSawingTilted)
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
@@ -1,83 +0,0 @@
|
||||
<Window x:Class="SideAngleOneForAllWindow"
|
||||
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}"
|
||||
Title="ChooseTool" Height="255.9" Width="426.6" WindowStyle="None"
|
||||
ResizeMode="NoResize" ShowInTaskbar="False" AllowsTransparency="True"
|
||||
Background="Transparent">
|
||||
|
||||
<Border Style="{DynamicResource OmagCut_Border}">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
<ColumnDefinition Width="4*"/>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.7*"/>
|
||||
<RowDefinition Height="0.3*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<TextBlock Name="TitleTxBl"
|
||||
Grid.ColumnSpan="3"
|
||||
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||
<Grid Grid.Row="1"
|
||||
Grid.Column="1">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Text="A °"
|
||||
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
|
||||
FontSize="{DynamicResource FontSize_LowerCaseCharacter}"/>
|
||||
<TextBlock Grid.Column="1"
|
||||
Text="T"
|
||||
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
|
||||
FontSize="{DynamicResource FontSize_LowerCaseCharacter}"/>
|
||||
<ComboBox Grid.Row="1"
|
||||
Name="SideAngleOneForAllCBx"
|
||||
Margin="10,0,10,0">
|
||||
<ComboBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding}" FontSize="20"/>
|
||||
</DataTemplate>
|
||||
</ComboBox.ItemTemplate>
|
||||
</ComboBox>
|
||||
<ComboBox Grid.Row="1"
|
||||
Grid.Column="1"
|
||||
Name="SideHeelOneForAllCBx"
|
||||
Margin="10,0,10,0">
|
||||
<ComboBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding}" FontSize="20"/>
|
||||
</DataTemplate>
|
||||
</ComboBox.ItemTemplate>
|
||||
</ComboBox>
|
||||
</Grid>
|
||||
|
||||
<Grid Name="ButtonsGrid" Grid.Column="1" Grid.Row="3" Grid.RowSpan="1">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Button Name="OkBtn" Grid.Column="1" Style="{DynamicResource OmagCut_GradientBlueIconButton}">
|
||||
<Image Source="{DynamicResource VImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="ExitBtn" Grid.Column="3" Style="{DynamicResource OmagCut_GradientBlueIconButton}"
|
||||
IsCancel="True">
|
||||
<Image Source="{DynamicResource XImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Border>
|
||||
</Window>
|
||||
@@ -1,20 +0,0 @@
|
||||
Public Class SideAngleOneForAllWindow
|
||||
|
||||
Sub New()
|
||||
|
||||
' La chiamata è richiesta dalla finestra di progettazione.
|
||||
InitializeComponent()
|
||||
|
||||
' Aggiungere le eventuali istruzioni di inizializzazione dopo la chiamata a InitializeComponent().
|
||||
TitleTxBl.Text = EgtUILib.EgtMsg(91253)
|
||||
End Sub
|
||||
|
||||
Private Sub OkBtn_Click(sender As Object, e As RoutedEventArgs) Handles OkBtn.Click
|
||||
DialogResult = True
|
||||
End Sub
|
||||
|
||||
Private Sub ExitBtn_Click(sender As Object, e As RoutedEventArgs) Handles ExitBtn.Click
|
||||
DialogResult = False
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
@@ -1,17 +1,17 @@
|
||||
<UserControl x:Class="SideAngleUC"
|
||||
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"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="636.9" d:DesignWidth="255.9">
|
||||
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"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="636.9" d:DesignWidth="255.9">
|
||||
|
||||
<!-- Definizione della Grid Laterale -->
|
||||
<Grid Name="VariablesCompoGrid" Grid.RowSpan="2">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1.2*"/>
|
||||
<ColumnDefinition Width="0.3*"/>
|
||||
<ColumnDefinition Width="0.3*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
@@ -34,191 +34,182 @@
|
||||
<RowDefinition Height="0.5*"/>-->
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<Grid Name="SideAngleGrid" Grid.ColumnSpan="2">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<!--<ColumnDefinition Width="0.4*"/>-->
|
||||
<ColumnDefinition Width="0.8*"/>
|
||||
<ColumnDefinition Width="0.8*"/>
|
||||
<ColumnDefinition Width="0.8*"/>
|
||||
<ColumnDefinition Width="0.4*"/>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
<ColumnDefinition Width="0.4*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Button Name="PrevBtn" Grid.Column="0" Margin="2,0,2,0" Padding="0" Content="<" Style="{StaticResource OmagCut_YellowTextButton}"/>
|
||||
<Button Name="NextBtn" Grid.Column="1" Margin="2,0,2,0" Padding="0" Content=">" Style="{StaticResource OmagCut_YellowTextButton}"/>
|
||||
<CheckBox Name="SideAngleChBx" Grid.Column="2" Margin="2,0,0,0" Padding="0"/>
|
||||
<Button Name="PrevBtn" Grid.Column="1" Margin="4,0,4,0" Padding="0" Content="<" Style="{StaticResource OmagCut_YellowTextButton}"/>
|
||||
<Button Name="NextBtn" Grid.Column="2" Margin="4,0,4,0" Padding="0" Content=">" Style="{StaticResource OmagCut_YellowTextButton}"/>
|
||||
</Grid>
|
||||
|
||||
<TextBlock Name="SideAngleBl" Grid.Row="0" Grid.Column="2" Text="A °"
|
||||
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
|
||||
FontSize="{DynamicResource FontSize_LowerCaseCharacter}"/>
|
||||
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
|
||||
FontSize="{DynamicResource FontSize_LowerCaseCharacter}"/>
|
||||
|
||||
<TextBlock Name="HeelBl" Grid.Row="0" Grid.Column="3" Text="T"
|
||||
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
|
||||
FontSize="{DynamicResource FontSize_LowerCaseCharacter}"/>
|
||||
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
|
||||
FontSize="{DynamicResource FontSize_LowerCaseCharacter}"/>
|
||||
|
||||
<TextBlock Name="NewEntity" Grid.Row="1" Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||
<CheckBox Name="NewA1" Grid.Column="1" Grid.Row="1" Height="30" Width="40" HorizontalAlignment="Right"
|
||||
Margin="-20,0,0,0"/>
|
||||
<EgtWPFLib:EgtTextBox Name="NewA1TxBx" Grid.Column="2" Grid.Row="1" Width="60" IsLength="False"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="NewH1TxBx" Grid.Column="3" Grid.Row="1" Width="60"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
|
||||
<TextBlock Name="Entity1" Grid.Row="1" Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||
<TextBlock Name="Entity1" Grid.Row="1" Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||
<CheckBox Name="A1" Grid.Column="1" Grid.Row="1" Height="30" Width="40" HorizontalAlignment="Right"
|
||||
Margin="-20,0,0,0"/>
|
||||
Margin="-20,0,0,0"/>
|
||||
<EgtWPFLib:EgtTextBox Name="A1TxBx" Grid.Column="2" Grid.Row="1" Width="60" IsLength="False"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="H1TxBx" Grid.Column="3" Grid.Row="1" Width="60"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
|
||||
<TextBlock Name="Entity2" Grid.Row="2" Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||
<TextBlock Name="Entity2" Grid.Row="2" Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||
<CheckBox Name="A2" Grid.Column="1" Grid.Row="2" Height="30" Width="40" HorizontalAlignment="Right"
|
||||
Margin="-20,0,0,0"/>
|
||||
Margin="-20,0,0,0"/>
|
||||
<EgtWPFLib:EgtTextBox Name="A2TxBx" Grid.Column="2" Grid.Row="2" Width="60" IsLength="False"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="H2TxBx" Grid.Column="3" Grid.Row="2" Width="60"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
|
||||
<TextBlock Name="Entity3" Grid.Row="3" Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||
<TextBlock Name="Entity3" Grid.Row="3" Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||
<CheckBox Name="A3" Grid.Column="1" Grid.Row="3" Height="30" Width="40" HorizontalAlignment="Right"
|
||||
Margin="-20,0,0,0"/>
|
||||
Margin="-20,0,0,0"/>
|
||||
<EgtWPFLib:EgtTextBox Name="A3TxBx" Grid.Column="2" Grid.Row="3" Width="60" IsLength="False"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="H3TxBx" Grid.Column="3" Grid.Row="3" Width="60"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
|
||||
<TextBlock Name="Entity4" Grid.Row="4" Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||
<TextBlock Name="Entity4" Grid.Row="4" Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||
<CheckBox Name="A4" Grid.Column="1" Grid.Row="4" Height="30" Width="40" HorizontalAlignment="Right"
|
||||
Margin="-20,0,0,0"/>
|
||||
Margin="-20,0,0,0"/>
|
||||
<EgtWPFLib:EgtTextBox Name="A4TxBx" Grid.Column="2" Grid.Row="4" Width="60" IsLength="False"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="H4TxBx" Grid.Column="3" Grid.Row="4" Width="60"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
|
||||
<TextBlock Name="Entity5" Grid.Row="5" Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||
<TextBlock Name="Entity5" Grid.Row="5" Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||
<CheckBox Name="A5" Grid.Column="1" Grid.Row="5" Height="30" Width="40" HorizontalAlignment="Right"
|
||||
Margin="-20,0,0,0"/>
|
||||
Margin="-20,0,0,0"/>
|
||||
<EgtWPFLib:EgtTextBox Name="A5TxBx" Grid.Column="2" Grid.Row="5" Width="60" IsLength="False"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="H5TxBx" Grid.Column="3" Grid.Row="5" Width="60"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
|
||||
<TextBlock Name="Entity6" Grid.Row="6" Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||
<TextBlock Name="Entity6" Grid.Row="6" Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||
<CheckBox Name="A6" Grid.Column="1" Grid.Row="6" Height="30" Width="40" HorizontalAlignment="Right"
|
||||
Margin="-20,0,0,0"/>
|
||||
Margin="-20,0,0,0"/>
|
||||
<EgtWPFLib:EgtTextBox Name="A6TxBx" Grid.Column="2" Grid.Row="6" Width="60" IsLength="False"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="H6TxBx" Grid.Column="3" Grid.Row="6" Width="60"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
|
||||
<TextBlock Name="Entity7" Grid.Row="7" Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||
<TextBlock Name="Entity7" Grid.Row="7" Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||
<CheckBox Name="A7" Grid.Column="1" Grid.Row="7" Height="30" Width="40" HorizontalAlignment="Right"
|
||||
Margin="-20,0,0,0"/>
|
||||
Margin="-20,0,0,0"/>
|
||||
<EgtWPFLib:EgtTextBox Name="A7TxBx" Grid.Column="2" Grid.Row="7" Width="60" IsLength="False"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="H7TxBx" Grid.Column="3" Grid.Row="7" Width="60"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
|
||||
<TextBlock Name="Entity8" Grid.Row="8" Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||
<TextBlock Name="Entity8" Grid.Row="8" Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||
<CheckBox Name="A8" Grid.Column="1" Grid.Row="8" Height="30" Width="40" HorizontalAlignment="Right"
|
||||
Margin="-20,0,0,0"/>
|
||||
Margin="-20,0,0,0"/>
|
||||
<EgtWPFLib:EgtTextBox Name="A8TxBx" Grid.Column="2" Grid.Row="8" Width="60" IsLength="False"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="H8TxBx" Grid.Column="3" Grid.Row="8" Width="60"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
|
||||
<TextBlock Name="Entity9" Grid.Row="9" Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||
<TextBlock Name="Entity9" Grid.Row="9" Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||
<CheckBox Name="A9" Grid.Column="1" Grid.Row="9" Height="30" Width="40" HorizontalAlignment="Right"
|
||||
Margin="-20,0,0,0"/>
|
||||
Margin="-20,0,0,0"/>
|
||||
<EgtWPFLib:EgtTextBox Name="A9TxBx" Grid.Column="2" Grid.Row="9" Width="60" IsLength="False"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="H9TxBx" Grid.Column="3" Grid.Row="9" Width="60"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
|
||||
<TextBlock Name="Entity10" Grid.Row="10" Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||
<TextBlock Name="Entity10" Grid.Row="10" Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||
<CheckBox Name="A10" Grid.Column="1" Grid.Row="10" Height="30" Width="40" HorizontalAlignment="Right"
|
||||
Margin="-20,0,0,0"/>
|
||||
Margin="-20,0,0,0"/>
|
||||
<EgtWPFLib:EgtTextBox Name="A10TxBx" Grid.Column="2" Grid.Row="10" Width="60" IsLength="False"
|
||||
Margin="0,0,0,-2"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="H10TxBx" Grid.Column="3" Grid.Row="10" Width="60"
|
||||
Margin="0,0,0,-2"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
|
||||
<Grid Grid.Column="0" Grid.Row="12" Grid.ColumnSpan="4" >
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1.5*"/>
|
||||
<ColumnDefinition Width="0.3*"/>
|
||||
<ColumnDefinition Width="0.6*"/>
|
||||
<ColumnDefinition Width="0.6*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="0.9*"/>
|
||||
<RowDefinition Height="0.9*"/>
|
||||
<RowDefinition Height="0.9*"/>
|
||||
<RowDefinition Height="0.9*"/>
|
||||
<RowDefinition Height="0.9*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1.5*"/>
|
||||
<ColumnDefinition Width="0.3*"/>
|
||||
<ColumnDefinition Width="0.6*"/>
|
||||
<ColumnDefinition Width="0.6*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="0.9*"/>
|
||||
<RowDefinition Height="0.9*"/>
|
||||
<RowDefinition Height="0.9*"/>
|
||||
<RowDefinition Height="0.9*"/>
|
||||
<RowDefinition Height="0.9*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<TextBlock Name="Parameter1TxBl" Grid.Row="0" Grid.ColumnSpan="2"
|
||||
Text="Offset"
|
||||
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
|
||||
FontSize="{DynamicResource FontSize_LowerCaseCharacter}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="Parameter1TxBx"
|
||||
Grid.Column="2" Grid.ColumnSpan="2" Grid.Row="0"
|
||||
Width="85" Height="30"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
<TextBlock Name="Parameter1TxBl" Grid.Row="0" Grid.ColumnSpan="2"
|
||||
Text="Offset"
|
||||
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
|
||||
FontSize="{DynamicResource FontSize_LowerCaseCharacter}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="Parameter1TxBx"
|
||||
Grid.Column="2" Grid.ColumnSpan="2" Grid.Row="0"
|
||||
Width="85" Height="30"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
|
||||
<TextBlock Name="Parameter2TxBl" Grid.Row="1" Grid.ColumnSpan="2"
|
||||
Text="Offset2"
|
||||
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
|
||||
FontSize="{DynamicResource FontSize_LowerCaseCharacter}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="Parameter2TxBx"
|
||||
Grid.Column="2" Grid.ColumnSpan="2" Grid.Row="1" Width="85"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
<UniformGrid Rows="1" Grid.Column="2" Grid.Row="1" Grid.ColumnSpan="2" Width="90" >
|
||||
<EgtWPFLib:EgtTextBox Name="Parameter2aTxBx"
|
||||
Grid.Column="2" Grid.Row="12"
|
||||
Width="40" Height="30" IsLength="False"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="Parameter2bTxBx"
|
||||
Grid.Column="3" Grid.Row="12"
|
||||
Width="40" Height="30"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
</UniformGrid>
|
||||
<TextBlock Name="Parameter2TxBl" Grid.Row="1" Grid.ColumnSpan="2"
|
||||
Text="Offset2"
|
||||
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
|
||||
FontSize="{DynamicResource FontSize_LowerCaseCharacter}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="Parameter2TxBx"
|
||||
Grid.Column="2" Grid.ColumnSpan="2" Grid.Row="1" Width="85"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
<UniformGrid Rows="1" Grid.Column="2" Grid.Row="1" Grid.ColumnSpan="2" Width="90" >
|
||||
<EgtWPFLib:EgtTextBox Name="Parameter2aTxBx"
|
||||
Grid.Column="2" Grid.Row="12"
|
||||
Width="40" Height="30" IsLength="False"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="Parameter2bTxBx"
|
||||
Grid.Column="3" Grid.Row="12"
|
||||
Width="40" Height="30"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
</UniformGrid>
|
||||
|
||||
|
||||
<TextBlock Name="Parameter3TxBl" Grid.Row="2" Grid.ColumnSpan="2"
|
||||
Text="Affondamento"
|
||||
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
|
||||
FontSize="{DynamicResource FontSize_LowerCaseCharacter}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="Parameter3TxBx"
|
||||
Grid.Column="2" Grid.ColumnSpan="2" Grid.Row="2"
|
||||
Margin="0,0,0,-2"
|
||||
Width="85" Height="30"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
<TextBlock Name="Parameter3TxBl" Grid.Row="2" Grid.ColumnSpan="2"
|
||||
Text="Affondamento"
|
||||
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
|
||||
FontSize="{DynamicResource FontSize_LowerCaseCharacter}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="Parameter3TxBx"
|
||||
Grid.Column="2" Grid.ColumnSpan="2" Grid.Row="2"
|
||||
Margin="0,0,0,-2"
|
||||
Width="85" Height="30"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
|
||||
<TextBlock Name="Parameter4TxBl" Grid.Row="3" Grid.ColumnSpan="2"
|
||||
Text="Accorciamento"
|
||||
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
|
||||
FontSize="{DynamicResource FontSize_LowerCaseCharacter}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="Parameter4TxBx"
|
||||
Grid.Column="2" Grid.ColumnSpan="2" Grid.Row="3"
|
||||
Margin="0,0,0,-2"
|
||||
Width="85" Height="30"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
<TextBlock Name="Parameter5TxBl" Grid.Row="4" Grid.ColumnSpan="2"
|
||||
Text="Angolo"
|
||||
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
|
||||
FontSize="{DynamicResource FontSize_LowerCaseCharacter}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="Parameter5TxBx"
|
||||
Grid.Column="2" Grid.ColumnSpan="2" Grid.Row="4"
|
||||
Margin="0,0,0,-2"
|
||||
Width="85" Height="30" IsLength="False"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
<TextBlock Name="Parameter4TxBl" Grid.Row="3" Grid.ColumnSpan="2"
|
||||
Text="Accorciamento"
|
||||
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
|
||||
FontSize="{DynamicResource FontSize_LowerCaseCharacter}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="Parameter4TxBx"
|
||||
Grid.Column="2" Grid.ColumnSpan="2" Grid.Row="3"
|
||||
Margin="0,0,0,-2"
|
||||
Width="85" Height="30"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
<TextBlock Name="Parameter5TxBl" Grid.Row="4" Grid.ColumnSpan="2"
|
||||
Text="Angolo"
|
||||
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
|
||||
FontSize="{DynamicResource FontSize_LowerCaseCharacter}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="Parameter5TxBx"
|
||||
Grid.Column="2" Grid.ColumnSpan="2" Grid.Row="4"
|
||||
Margin="0,0,0,-2"
|
||||
Width="85" Height="30" IsLength="False"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
||||
<!--<TextBlock Name="Parameter1TxBl" Grid.Row="11" Text="Offset"
|
||||
<!--<TextBlock Name="Parameter1TxBl" Grid.Row="11" Text="Offset"
|
||||
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
|
||||
FontSize="{DynamicResource FontSize_LowerCaseCharacter}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="Parameter1TxBx" Grid.Column="1" Grid.ColumnSpan="3" Grid.Row="11" Width="90"
|
||||
|
||||
@@ -171,25 +171,25 @@ Public Class SideAngleUC
|
||||
|
||||
' Aggiorno valori
|
||||
If m_Mode = ModeOpt.DRIP Then
|
||||
m_dDripOffset = GetPrivateProfileDouble(S_SIDES, K_DRIPOFFSET, 20, m_MainWindow.GetIniFile())
|
||||
m_dDripOffset2 = GetPrivateProfileDouble(S_SIDES, K_DRIPOFFSET2, 0, m_MainWindow.GetIniFile())
|
||||
m_dDripDepth = GetPrivateProfileDouble(S_SIDES, K_DRIPDEPTH, 10, m_MainWindow.GetIniFile())
|
||||
m_dDripShort = GetPrivateProfileDouble(S_SIDES, K_DRIPSHORT, 0, m_MainWindow.GetIniFile())
|
||||
Parameter1TxBx.Text = LenToString(m_dDripOffset, 3)
|
||||
Parameter2TxBx.Text = LenToString(m_dDripOffset2, 3)
|
||||
Parameter3TxBx.Text = LenToString(m_dDripDepth, 3)
|
||||
Parameter4TxBx.Text = LenToString(m_dDripShort, 3)
|
||||
m_dDripOffset = GetPrivateProfileDouble( S_SIDES, K_DRIPOFFSET, 20, m_MainWindow.GetIniFile())
|
||||
m_dDripOffset2 = GetPrivateProfileDouble( S_SIDES, K_DRIPOFFSET2, 0, m_MainWindow.GetIniFile())
|
||||
m_dDripDepth = GetPrivateProfileDouble( S_SIDES, K_DRIPDEPTH, 10, m_MainWindow.GetIniFile())
|
||||
m_dDripShort = GetPrivateProfileDouble( S_SIDES, K_DRIPSHORT, 0, m_MainWindow.GetIniFile())
|
||||
Parameter1TxBx.Text = LenToString( m_dDripOffset, 3)
|
||||
Parameter2TxBx.Text = LenToString( m_dDripOffset2, 3)
|
||||
Parameter3TxBx.Text = LenToString( m_dDripDepth, 3)
|
||||
Parameter4TxBx.Text = LenToString( m_dDripShort, 3)
|
||||
ElseIf m_Mode = ModeOpt.ENGRAVE Then
|
||||
m_dDripOffset = GetPrivateProfileDouble(S_SIDES, K_ENGRAVEOFFSET, 20, m_MainWindow.GetIniFile())
|
||||
m_nEngrNbr2 = GetPrivateProfileInt(S_SIDES, K_ENGRAVENUMBER2, 1, m_MainWindow.GetIniFile())
|
||||
m_dDripOffset2 = GetPrivateProfileDouble(S_SIDES, K_ENGRAVEOFFSET2, 0, m_MainWindow.GetIniFile())
|
||||
m_dDripDepth = GetPrivateProfileDouble(S_SIDES, K_ENGRAVEDEPTH, 10, m_MainWindow.GetIniFile())
|
||||
m_dDripOffset = GetPrivateProfileDouble( S_SIDES, K_ENGRAVEOFFSET, 20, m_MainWindow.GetIniFile())
|
||||
m_nEngrNbr2 = GetPrivateProfileInt( S_SIDES, K_ENGRAVENUMBER2, 1, m_MainWindow.GetIniFile())
|
||||
m_dDripOffset2 = GetPrivateProfileDouble( S_SIDES, K_ENGRAVEOFFSET2, 0, m_MainWindow.GetIniFile())
|
||||
m_dDripDepth = GetPrivateProfileDouble( S_SIDES, K_ENGRAVEDEPTH, 10, m_MainWindow.GetIniFile())
|
||||
m_dEngraveDepth2 = GetPrivateProfileDouble(S_SIDES, K_ENGRAVEDEPTH2, 0, m_MainWindow.GetIniFile())
|
||||
m_dEngraveAngle = GetPrivateProfileDouble(S_SIDES, K_ENGRAVEANGLE, 0, m_MainWindow.GetIniFile())
|
||||
Parameter1TxBx.Text = LenToString(m_dDripOffset, 3)
|
||||
Parameter2aTxBx.Text = m_nEngrNbr2.ToString()
|
||||
Parameter2bTxBx.Text = LenToString(m_dDripOffset2, 3)
|
||||
Parameter3TxBx.Text = LenToString(m_dDripDepth, 3)
|
||||
Parameter2bTxBx.Text = LenToString( m_dDripOffset2, 3)
|
||||
Parameter3TxBx.Text = LenToString( m_dDripDepth, 3)
|
||||
Parameter4TxBx.Text = LenToString(m_dEngraveDepth2, 3)
|
||||
Parameter5TxBx.Text = DoubleToString(m_dEngraveAngle, 3)
|
||||
End If
|
||||
@@ -311,14 +311,8 @@ Public Class SideAngleUC
|
||||
' Attualmente il vaore m_nCount è inizializzato ad "1"..
|
||||
' Bottoni Prev Next
|
||||
If m_nCount <= MAX_LINES Then
|
||||
PrevBtn.Visibility = Windows.Visibility.Hidden
|
||||
NextBtn.Visibility = Windows.Visibility.Hidden
|
||||
SideAngleChBx.Visibility = Windows.Visibility.Hidden
|
||||
|
||||
NewEntity.Visibility = Windows.Visibility.Hidden
|
||||
NewA1.Visibility = Windows.Visibility.Hidden
|
||||
NewA1TxBx.Visibility = Windows.Visibility.Hidden
|
||||
NewH1TxBx.Visibility = Windows.Visibility.Hidden
|
||||
PrevBtn.Visibility= Windows.Visibility.Hidden
|
||||
NextBtn.Visibility= Windows.Visibility.Hidden
|
||||
Else
|
||||
Grid.SetRow(PrevBtn, MAX_LINES - m_nShow)
|
||||
PrevBtn.Visibility = Windows.Visibility.Visible
|
||||
@@ -326,8 +320,6 @@ Public Class SideAngleUC
|
||||
Grid.SetRow(NextBtn, MAX_LINES - m_nShow)
|
||||
NextBtn.Visibility = Windows.Visibility.Visible
|
||||
NextBtn.IsEnabled = (m_nCount > m_nCurrPage * MAX_LINES)
|
||||
Grid.SetRow(SideAngleGrid, MAX_LINES - m_nShow)
|
||||
SideAngleChBx.Visibility = Windows.Visibility.Visible
|
||||
End If
|
||||
|
||||
' Intestazione per angoli di lato
|
||||
@@ -343,8 +335,6 @@ Public Class SideAngleUC
|
||||
Grid.SetRow(HeelBl, MAX_LINES - m_nShow)
|
||||
HeelBl.Text = EgtMsg(91654) ' T
|
||||
HeelBl.Visibility = Windows.Visibility.Visible
|
||||
Grid.SetRow(SideAngleGrid, MAX_LINES - m_nShow)
|
||||
SideAngleChBx.Visibility = Windows.Visibility.Visible
|
||||
End If
|
||||
Else
|
||||
If m_nCount = 0 Then
|
||||
@@ -381,7 +371,7 @@ Public Class SideAngleUC
|
||||
GetHeelTxBxFromIndex(Index).Text = GetPrivateProfileDouble(S_SIDES, K_DRIPSHORT & "A" & nI.ToString & "_End", 0, m_MainWindow.GetIniFile())
|
||||
End If
|
||||
End If
|
||||
Dim TxBlIndex As Integer = (m_nCurrPage - 1) * MAX_LINES + nI - 1
|
||||
Dim TxBlIndex As Integer = (m_nCurrPage - 1) * MAX_LINES + nI - 1
|
||||
GetTxBlFromIndex(Index).Text = If(m_Mode = ModeOpt.SIDEANGLE,
|
||||
m_SideAngleEntityList(TxBlIndex).sEntityName,
|
||||
m_DripEntityList(TxBlIndex).sEntityName)
|
||||
@@ -401,145 +391,6 @@ Public Class SideAngleUC
|
||||
Next
|
||||
End Sub
|
||||
|
||||
Private Sub CheckedSideAngle() Handles SideAngleChBx.Checked
|
||||
Grid.SetRow(NewEntity, MAX_LINES - m_nShow + 1)
|
||||
Grid.SetRow(NewA1TxBx, MAX_LINES - m_nShow + 1)
|
||||
Grid.SetRow(NewH1TxBx, MAX_LINES - m_nShow + 1)
|
||||
|
||||
NewEntity.Text = "A#"
|
||||
' Se interrompo la creazione di un unico SideAng
|
||||
If Not GetSideAngleFromAllEntities() Then Return
|
||||
|
||||
PrevBtn.Visibility = Visibility.Collapsed
|
||||
NextBtn.Visibility = Visibility.Collapsed
|
||||
|
||||
NewEntity.Visibility = Visibility.Visible
|
||||
NewA1TxBx.Visibility = Visibility.Visible
|
||||
NewH1TxBx.Visibility = Visibility.Visible
|
||||
|
||||
Entity1.Visibility = Visibility.Collapsed
|
||||
A1TxBx.Visibility = Visibility.Collapsed
|
||||
H1TxBx.Visibility = Visibility.Collapsed
|
||||
|
||||
Entity2.Visibility = Visibility.Collapsed
|
||||
A2TxBx.Visibility = Visibility.Collapsed
|
||||
H2TxBx.Visibility = Visibility.Collapsed
|
||||
|
||||
Entity3.Visibility = Visibility.Collapsed
|
||||
A3TxBx.Visibility = Visibility.Collapsed
|
||||
H3TxBx.Visibility = Visibility.Collapsed
|
||||
|
||||
Entity4.Visibility = Visibility.Collapsed
|
||||
A4TxBx.Visibility = Visibility.Collapsed
|
||||
H4TxBx.Visibility = Visibility.Collapsed
|
||||
|
||||
Entity5.Visibility = Visibility.Collapsed
|
||||
A5TxBx.Visibility = Visibility.Collapsed
|
||||
H5TxBx.Visibility = Visibility.Collapsed
|
||||
|
||||
Entity6.Visibility = Visibility.Collapsed
|
||||
A6TxBx.Visibility = Visibility.Collapsed
|
||||
H6TxBx.Visibility = Visibility.Collapsed
|
||||
|
||||
Entity7.Visibility = Visibility.Collapsed
|
||||
A7TxBx.Visibility = Visibility.Collapsed
|
||||
H7TxBx.Visibility = Visibility.Collapsed
|
||||
|
||||
Entity8.Visibility = Visibility.Collapsed
|
||||
A8TxBx.Visibility = Visibility.Collapsed
|
||||
H8TxBx.Visibility = Visibility.Collapsed
|
||||
|
||||
Entity9.Visibility = Visibility.Collapsed
|
||||
A9TxBx.Visibility = Visibility.Collapsed
|
||||
H9TxBx.Visibility = Visibility.Collapsed
|
||||
|
||||
Entity10.Visibility = Visibility.Collapsed
|
||||
A10TxBx.Visibility = Visibility.Collapsed
|
||||
H10TxBx.Visibility = Visibility.Collapsed
|
||||
End Sub
|
||||
|
||||
Private Sub UnCheckSideAngle() Handles SideAngleChBx.Unchecked
|
||||
NewEntity.Visibility = Visibility.Collapsed
|
||||
NewA1TxBx.Visibility = Visibility.Collapsed
|
||||
NewH1TxBx.Visibility = Visibility.Collapsed
|
||||
|
||||
TxBlChBxView()
|
||||
RefreshCheckAndValue()
|
||||
End Sub
|
||||
|
||||
Private Function GetSideAngleFromAllEntities() As Boolean
|
||||
Dim tmpSideAngleList As New List(Of Double)
|
||||
tmpSideAngleList.Clear()
|
||||
Dim tmpSideHeelList As New List(Of Double)
|
||||
tmpSideHeelList.Clear()
|
||||
Dim m_SideAngleOneForAllWindow As New SideAngleOneForAllWindow
|
||||
|
||||
For i As Integer = 0 To m_SideAngleEntityList.Count - 1
|
||||
If Not tmpSideAngleList.Contains(m_SideAngleEntityList(i).dSideAngle) Then
|
||||
tmpSideAngleList.Add(m_SideAngleEntityList(i).dSideAngle)
|
||||
End If
|
||||
If Not tmpSideHeelList.Contains(m_SideAngleEntityList(i).dSideHeel) Then
|
||||
tmpSideHeelList.Add(m_SideAngleEntityList(i).dSideHeel)
|
||||
End If
|
||||
Next
|
||||
NewA1TxBx.Text = DoubleToString(tmpSideAngleList(0), 2)
|
||||
NewH1TxBx.Text = LenToString(tmpSideHeelList(0), 2)
|
||||
|
||||
If tmpSideAngleList.Count > 1 Or tmpSideHeelList.Count > 1 Then
|
||||
m_SideAngleOneForAllWindow.SideAngleOneForAllCBx.ItemsSource = tmpSideAngleList
|
||||
m_SideAngleOneForAllWindow.SideAngleOneForAllCBx.SelectedIndex = 0
|
||||
m_SideAngleOneForAllWindow.SideHeelOneForAllCBx.ItemsSource = tmpSideHeelList
|
||||
m_SideAngleOneForAllWindow.SideHeelOneForAllCBx.SelectedIndex = 0
|
||||
m_SideAngleOneForAllWindow.ShowDialog()
|
||||
If m_SideAngleOneForAllWindow.DialogResult Then
|
||||
NewA1TxBx.Text = DoubleToString(m_SideAngleOneForAllWindow.SideAngleOneForAllCBx.SelectedItem, 2)
|
||||
NewH1TxBx.Text = LenToString(m_SideAngleOneForAllWindow.SideHeelOneForAllCBx.SelectedItem, 2)
|
||||
UpdateSideAngleAllEntities()
|
||||
UpdateHeelAllEntities()
|
||||
Else
|
||||
SideAngleChBx.IsChecked = False
|
||||
Return False
|
||||
End If
|
||||
End If
|
||||
Return True
|
||||
End Function
|
||||
|
||||
Private Sub UpdateHeelAllEntities()
|
||||
' Nuovo tallone
|
||||
Dim dSideHeel As Double
|
||||
StringToLen(NewH1TxBx.Text, dSideHeel)
|
||||
' Verifico stia nei limiti
|
||||
If dSideHeel < 0 Then
|
||||
dSideHeel = 0
|
||||
NewH1TxBx.Text = "0"
|
||||
End If
|
||||
For Each Entity As SideAngleEntity In m_SideAngleEntityList
|
||||
' Lo modifico nella geometria e nella lista inclinazioni
|
||||
ModifySideHeel(Entity.sEntityName, dSideHeel)
|
||||
' Aggiorno tutti i testi
|
||||
RefreshSideAngleText()
|
||||
Next
|
||||
End Sub
|
||||
|
||||
Private Sub UpdateSideAngleAllEntities()
|
||||
' Nuovo angolo di inclinazione
|
||||
Dim dSideAngle As Double
|
||||
StringToDouble(NewA1TxBx.Text, dSideAngle)
|
||||
' Verifico stia nei limiti
|
||||
If dSideAngle < -m_dMaxSideAng Then
|
||||
dSideAngle = -m_dMaxSideAng
|
||||
NewA1TxBx.Text = DoubleToString(dSideAngle, 2)
|
||||
ElseIf dSideAngle > m_dMaxSideAng Then
|
||||
dSideAngle = m_dMaxSideAng
|
||||
NewA1TxBx.Text = DoubleToString(dSideAngle, 2)
|
||||
End If
|
||||
For Each Entity As SideAngleEntity In m_SideAngleEntityList
|
||||
' Lo modifico nella geometria e nella lista inclinazioni
|
||||
ModifySideAngle(Entity.sEntityName, dSideAngle)
|
||||
' Aggiorno tutti i testi
|
||||
RefreshSideAngleText()
|
||||
Next
|
||||
End Sub
|
||||
|
||||
'-------------> Restituisce gli oggetto della grafica assegnato l'indice
|
||||
Private Function GetChBxFromIndex(Index As Integer) As CheckBox
|
||||
@@ -644,15 +495,15 @@ Public Class SideAngleUC
|
||||
'-------------> Restituisce gli oggetto della grafica assegnato l'indice
|
||||
|
||||
' quando esco salvo nel file l'ultima configurazione per le incisioni
|
||||
Private Sub SideAngleUC_Unloaded(sender As Object, e As RoutedEventArgs) Handles Me.Unloaded
|
||||
Private Sub SideAngleUC_Unloaded( sender As Object, e As RoutedEventArgs) Handles Me.Unloaded
|
||||
If m_CallingPage = MainWindow.Pages.Draw Then
|
||||
' Ricavo nome pezzo
|
||||
Dim PartId As Integer = EgtGetFirstInGroup(GDB_ID.ROOT)
|
||||
Dim PartId As Integer = EgtGetFirstInGroup( GDB_ID.ROOT)
|
||||
' Svuoto layer in cui sono presenti i testi con le inclinazioni dei lati
|
||||
If m_Mode = ModeOpt.SIDEANGLE Then
|
||||
EgtEmptyGroup(EgtGetFirstNameInGroup(PartId, SIDE_ANGLE_LAYER))
|
||||
EgtEmptyGroup( EgtGetFirstNameInGroup( PartId, SIDE_ANGLE_LAYER))
|
||||
Else
|
||||
EgtEmptyGroup(EgtGetFirstNameInGroup(PartId, SIDE_ANGLE_LAYER))
|
||||
EgtEmptyGroup( EgtGetFirstNameInGroup( PartId, SIDE_ANGLE_LAYER))
|
||||
End If
|
||||
ElseIf m_CallingPage = MainWindow.Pages.Import Then
|
||||
' Nessuna azione necessaria
|
||||
@@ -665,7 +516,7 @@ Public Class SideAngleUC
|
||||
'WritePrivateProfileString( S_SIDES, K_DRIPSHORT, DoubleToString( m_dDripShort, 3), m_MainWindow.GetIniFile())
|
||||
ElseIf m_Mode = ModeOpt.ENGRAVE Then
|
||||
WritePrivateProfileString(S_SIDES, K_ENGRAVEOFFSET, LenToString(m_dDripOffset, 3), m_MainWindow.GetIniFile())
|
||||
WritePrivateProfileString(S_SIDES, K_ENGRAVENUMBER2, m_nEngrNbr2.ToString(), m_MainWindow.GetIniFile())
|
||||
WritePrivateProfileString( S_SIDES, K_ENGRAVENUMBER2, m_nEngrNbr2.ToString(), m_MainWindow.GetIniFile())
|
||||
WritePrivateProfileString(S_SIDES, K_ENGRAVEOFFSET2, LenToString(m_dDripOffset2, 3), m_MainWindow.GetIniFile())
|
||||
WritePrivateProfileString(S_SIDES, K_ENGRAVEDEPTH, LenToString(m_dDripDepth, 3), m_MainWindow.GetIniFile())
|
||||
WritePrivateProfileString(S_SIDES, K_ENGRAVEDEPTH2, LenToString(m_dEngraveDepth2, 3), m_MainWindow.GetIniFile())
|
||||
@@ -676,6 +527,7 @@ Public Class SideAngleUC
|
||||
EgtDraw()
|
||||
End Sub
|
||||
|
||||
|
||||
' aggiunge il messaggio nel disegno, se DripGeom creo la geometria
|
||||
Private Sub RefreshSideAngleText()
|
||||
Dim PartId As Integer = GDB_ID.NULL
|
||||
@@ -686,7 +538,7 @@ Public Class SideAngleUC
|
||||
PartId = If(m_MainWindow.m_DrawPageUC.SelectedLayer <> GDB_ID.NULL, EgtGetFirstPart(), GDB_ID.NULL)
|
||||
' Recupero nome layer con geometria di contorno (esterno o interno) del pezzo
|
||||
LoopId = m_MainWindow.m_DrawPageUC.SelectedLayer
|
||||
ElseIf m_CallingPage = MainWindow.Pages.Import Then
|
||||
ElseIf m_CallingPage = MainWindow.Pages.Import Then
|
||||
' Imposto contesto corrente
|
||||
EgtSetCurrentContext(m_MainWindow.m_ImportPageUC.ImportScene.GetCtx())
|
||||
' Recupero nome pezzo
|
||||
@@ -748,7 +600,7 @@ Public Class SideAngleUC
|
||||
For nIndex As Integer = 1 To m_nCount
|
||||
Dim Entity As DripEntity = m_DripEntityList(nIndex - 1)
|
||||
' Imposto check box (se sono stati definiti il numero corretto di CheckBox
|
||||
If nIndex < (m_nCurrPage - 1) * MAX_LINES Or nIndex > m_nCurrPage * MAX_LINES Then Continue For
|
||||
If nIndex < ( m_nCurrPage - 1) * MAX_LINES Or nIndex > m_nCurrPage * MAX_LINES Then Continue For
|
||||
Dim nChIndex As Integer = nIndex - (m_nCurrPage - 1) * MAX_LINES + MAX_LINES - m_nShow
|
||||
' verifico se l'entità ha un gocciolatoio
|
||||
GetChBxFromIndex(nChIndex).IsChecked = Entity.bHaveDrip
|
||||
@@ -1121,15 +973,15 @@ Public Class SideAngleUC
|
||||
Private Sub PrevBtn_Click(sender As Object, e As RoutedEventArgs) Handles PrevBtn.Click
|
||||
If m_nCurrPage = 1 Then Return
|
||||
m_nCurrPage -= 1
|
||||
m_nShow = Math.Min(m_nCount - (m_nCurrPage - 1) * MAX_LINES, MAX_LINES)
|
||||
m_nShow = Math.Min( m_nCount - ( m_nCurrPage - 1) * MAX_LINES, MAX_LINES)
|
||||
TxBlChBxView()
|
||||
RefreshCheckAndValue()
|
||||
End Sub
|
||||
|
||||
Private Sub NextBtn_Click(sender As Object, e As RoutedEventArgs) Handles NextBtn.Click
|
||||
If m_nCount <= (m_nCurrPage - 1) * MAX_LINES Then Return
|
||||
If m_nCount <= ( m_nCurrPage - 1) * MAX_LINES Then Return
|
||||
m_nCurrPage += 1
|
||||
m_nShow = Math.Min(m_nCount - (m_nCurrPage - 1) * MAX_LINES, MAX_LINES)
|
||||
m_nShow = Math.Min( m_nCount - ( m_nCurrPage - 1) * MAX_LINES, MAX_LINES)
|
||||
TxBlChBxView()
|
||||
RefreshCheckAndValue()
|
||||
End Sub
|
||||
@@ -1141,7 +993,7 @@ Public Class SideAngleUC
|
||||
Dim bVal As Boolean = CurrCheckBox.IsChecked()
|
||||
Dim SideIndex As Integer = CInt(CurrCheckBox.Name.Substring(1))
|
||||
' Converto nome checkbox in nome elemento tenendo conto della pagina e dello slittamento verso il basso
|
||||
Dim nCurrSide As Integer = (m_nCurrPage - 1) * MAX_LINES + SideIndex - (MAX_LINES - m_nShow)
|
||||
Dim nCurrSide As Integer = ( m_nCurrPage - 1) * MAX_LINES + SideIndex - ( MAX_LINES - m_nShow)
|
||||
Dim sCurrSide As String = m_DripEntityList(nCurrSide - 1).sEntityName
|
||||
' aggiorno l'entità con i valori scritti nel campo di testo
|
||||
Dim CurrEntity As DripEntity = DripEntity.FindEntity(sCurrSide)
|
||||
@@ -1327,19 +1179,6 @@ Public Class SideAngleUC
|
||||
End If
|
||||
End Sub
|
||||
|
||||
'-------> riga nuova
|
||||
Private Sub NewA1TxBx_EgtClosed(sender As Object, e As EventArgs) Handles NewA1TxBx.EgtClosed
|
||||
If m_Mode = ModeOpt.SIDEANGLE Then
|
||||
UpdateSideAngleAllEntities()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub NewH1TxBx_EgtClosed(sender As Object, e As EventArgs) Handles NewH1TxBx.EgtClosed
|
||||
If m_Mode = ModeOpt.SIDEANGLE Then
|
||||
UpdateHeelAllEntities()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub SetSideAngleFromTxBx(SideIndex As Integer, AngleTxBx As EgtWPFLib.EgtTextBox)
|
||||
' Nuovo angolo di inclinazione
|
||||
Dim dSideAngle As Double
|
||||
@@ -1353,7 +1192,7 @@ Public Class SideAngleUC
|
||||
AngleTxBx.Text = DoubleToString(dSideAngle, 2)
|
||||
End If
|
||||
' Converto nome checkbox in nome elemento tenendo conto della pagina e dello slittamento verso il basso
|
||||
Dim nCurrSide As Integer = (m_nCurrPage - 1) * MAX_LINES + SideIndex - (MAX_LINES - m_nShow)
|
||||
Dim nCurrSide As Integer = ( m_nCurrPage - 1) * MAX_LINES + SideIndex - ( MAX_LINES - m_nShow)
|
||||
Dim sCurrSide As String = m_SideAngleEntityList(nCurrSide - 1).sEntityName
|
||||
' Lo modifico nella geometria e nella lista inclinazioni
|
||||
ModifySideAngle(sCurrSide, dSideAngle)
|
||||
@@ -1423,7 +1262,7 @@ Public Class SideAngleUC
|
||||
HeelTxBx.Text = "0"
|
||||
End If
|
||||
' Converto nome checkbox in nome elemento tenendo conto della pagina e dello slittamento verso il basso
|
||||
Dim nCurrSide As Integer = (m_nCurrPage - 1) * MAX_LINES + SideIndex - (MAX_LINES - m_nShow)
|
||||
Dim nCurrSide As Integer = ( m_nCurrPage - 1) * MAX_LINES + SideIndex - ( MAX_LINES - m_nShow)
|
||||
Dim sCurrSide As String = m_SideAngleEntityList(nCurrSide - 1).sEntityName
|
||||
' Lo modifico nella geometria e nella lista inclinazioni
|
||||
ModifySideHeel(sCurrSide, dSideHeel)
|
||||
@@ -1464,15 +1303,10 @@ Public Class SideAngleUC
|
||||
If dSideAngle <> 0 Then
|
||||
EgtSetInfo(CurrEntity.nGeomId, INFO_SIDE_ANGLE, dSideAngle)
|
||||
EgtSetInfo(CurrEntity.nGeomId, INFO_ORIG_SIDE_ANGLE, dSideAngle)
|
||||
Dim sSawingTilted As String = m_MainWindow.m_CurrentMachine.sCurrSawingTilted
|
||||
If Not String.IsNullOrEmpty(sSawingTilted) Then
|
||||
EgtSetInfo(CurrEntity.nGeomId, DEF_MACHINING_TILTED, sSawingTilted)
|
||||
End If
|
||||
' Cancello inclinazione nell'apposito campo info
|
||||
' Cancello inclinazione nell'apposito campo info
|
||||
Else
|
||||
EgtRemoveInfo(CurrEntity.nGeomId, INFO_SIDE_ANGLE)
|
||||
EgtRemoveInfo(CurrEntity.nGeomId, INFO_ORIG_SIDE_ANGLE)
|
||||
EgtRemoveInfo(CurrEntity.nGeomId, DEF_MACHINING_TILTED)
|
||||
End If
|
||||
' Aggiorno lista entità con nuova inclinazione
|
||||
CurrEntity.dSideAngle = dSideAngle
|
||||
@@ -1490,7 +1324,7 @@ Public Class SideAngleUC
|
||||
' Scrivo nuovo tallone nelle info
|
||||
If dSideHeel > 10 * EPS_SMALL Then
|
||||
EgtSetInfo(CurrEntity.nGeomId, INFO_HEEL, dSideHeel)
|
||||
' Cancello inclinazione nell'apposito campo info
|
||||
' Cancello inclinazione nell'apposito campo info
|
||||
Else
|
||||
EgtRemoveInfo(CurrEntity.nGeomId, INFO_HEEL)
|
||||
End If
|
||||
|
||||
@@ -123,19 +123,10 @@
|
||||
<EgtWPFLib:EgtTextBox Name="OffsYyTxBx" Grid.Column="2" Grid.Row="4" Width="50"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
|
||||
<Grid Grid.Column="0" Grid.Row="5" Grid.ColumnSpan="3">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1.5*"/>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Name="OffsXInteryTxBl" Grid.Column="0"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||
<CheckBox Name="UseInteraxisChBx" Grid.Row="7" Grid.Column="1" Height="30" Width="40" HorizontalAlignment="Right"
|
||||
Margin="-20,0,0,0"/>
|
||||
<EgtWPFLib:EgtTextBox Name="OffsXInteryTxBx" Grid.Column="2" Width="50"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" IsEnabled="{Binding ElementName=UseInteraxisChBx, Path=IsChecked}"/>
|
||||
</Grid>
|
||||
<TextBlock Name="OffsXInteryTxBl" Grid.Row="5" Grid.ColumnSpan="2"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="OffsXInteryTxBx" Grid.Column="2" Grid.Row="5" Width="50"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
|
||||
<UniformGrid Grid.Column="0" Grid.Row="7" Grid.ColumnSpan="3" Columns="2" >
|
||||
<Button Name="MirrorPartBtn"
|
||||
|
||||
@@ -54,8 +54,6 @@ Public Class FrameCutPageUC
|
||||
OffsYyTxBx.Text = LenToString(dOffsYY, 3)
|
||||
Dim dOffsXInterY As Double = GetPrivateProfileDouble(S_FRAME, K_OFFSXINTERY, 5, m_MainWindow.GetIniFile())
|
||||
OffsXInteryTxBx.Text = LenToString(dOffsXInterY, 3)
|
||||
Dim bOffsYInterYSawTh As Boolean = False
|
||||
UseInteraxisChBx.IsChecked = (GetPrivateProfileInt(S_FRAME, K_OFFSXINTERYSAWTH, 0, m_MainWindow.GetIniFile()) <> 1)
|
||||
|
||||
' Imposto i messaggi letti dal file dei messaggi
|
||||
m_AlongAx.Add(EgtMsg(MSG_FRAMECUTPAGEUC + 1)) 'Lungo X
|
||||
@@ -75,17 +73,6 @@ Public Class FrameCutPageUC
|
||||
OffsXyTxBl.Text = EgtMsg(MSG_FRAMECUTPAGEUC + 9) 'Distanza inizio
|
||||
OffsYyTxBl.Text = EgtMsg(MSG_FRAMECUTPAGEUC + 22) 'Distanza Y
|
||||
OffsXInteryTxBl.Text = EgtMsg(90645) 'Interasse
|
||||
Dim sChBxToolTip As String = EgtMsg(90646) 'Applica valore indicato\n altrienti spessore lama
|
||||
sChBxToolTip = sChBxToolTip.Replace("/n", "£")
|
||||
Dim sItems As String() = sChBxToolTip.Split("£")
|
||||
For Index As Integer = 0 To sItems.Count - 1
|
||||
If Index = 0 Then
|
||||
sChBxToolTip = sItems(Index).Trim
|
||||
Else
|
||||
sChBxToolTip &= vbCrLf & sItems(Index).Trim
|
||||
End If
|
||||
Next
|
||||
UseInteraxisChBx.ToolTip = sChBxToolTip
|
||||
End Sub
|
||||
|
||||
Private Sub FrameCutPage_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded
|
||||
@@ -293,7 +280,7 @@ Public Class FrameCutPageUC
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub OffsXXTxBx_EgtClosed(sender As Object, e As EventArgs) Handles OffsZTxBx.EgtClosed, OffsXyTxBx.EgtClosed, OffsYyTxBx.EgtClosed, OffsXInteryTxBx.EgtClosed, UseInteraxisChBx.Click
|
||||
Private Sub OffsXXTxBx_EgtClosed(sender As Object, e As EventArgs) Handles OffsZTxBx.EgtClosed, OffsXyTxBx.EgtClosed, OffsYyTxBx.EgtClosed, OffsXInteryTxBx.EgtClosed
|
||||
' Forzo aggiornamento grezzo nella pagina di Nesting
|
||||
m_MainWindow.m_CadCutPageUC.m_NestPage.CalcRawPart()
|
||||
' Parcheggio pezzi presenti nel grezzo
|
||||
@@ -325,11 +312,6 @@ Public Class FrameCutPageUC
|
||||
If StringToLen(OffsXInteryTxBx.Text, dOffsXIntery) Then
|
||||
WritePrivateProfileString(S_FRAME, K_OFFSXINTERY, DoubleToString(dOffsXIntery, 3), m_MainWindow.GetIniFile())
|
||||
End If
|
||||
Dim sUseInteraxis As String = "1"
|
||||
If UseInteraxisChBx.IsChecked Then
|
||||
sUseInteraxis = "0"
|
||||
End If
|
||||
WritePrivateProfileString(S_FRAME, K_OFFSXINTERYSAWTH, sUseInteraxis, m_MainWindow.GetIniFile())
|
||||
End Sub
|
||||
|
||||
Private Sub MirrorPartBtn_Click(sender As Object, e As RoutedEventArgs) Handles MirrorPartBtn.Click
|
||||
@@ -981,22 +963,11 @@ Public Class FrameCutPageUC
|
||||
StringToLen(OffsXInteryTxBx.Text, dOffsXIntery)
|
||||
If EgtTdbSetCurrTool(m_MainWindow.m_CurrentMachine.sCurrSaw) AndAlso
|
||||
EgtTdbGetCurrToolParam(MCH_TP.THICK, dSawThick) Then
|
||||
If UseInteraxisChBx.IsChecked Then
|
||||
If dOffsXIntery < 0 Then
|
||||
dMinDist = 5 * EPS_SMALL
|
||||
OffsXInteryTxBx.Text = "0"
|
||||
Else
|
||||
dMinDist = dOffsXIntery + 5 * EPS_SMALL
|
||||
End If
|
||||
Else
|
||||
If dOffsXIntery <= dSawThick Then
|
||||
dMinDist = dSawThick + 5 * EPS_SMALL
|
||||
Else
|
||||
dMinDist = dOffsXIntery + 5 * EPS_SMALL
|
||||
End If
|
||||
'If dOffsXIntery <= dSawThick Then
|
||||
' dMinDist = dSawThick + 5 * EPS_SMALL
|
||||
' EgtOutLog("WARNINGS: Saw tickness is more width then interaxis")
|
||||
'Else
|
||||
' dMinDist = dOffsXIntery + 5 * EPS_SMALL
|
||||
'End If
|
||||
Else
|
||||
EgtOutLog("Not found current saw for frames mindist")
|
||||
dMinDist = dOffsXIntery
|
||||
|
||||
@@ -3,15 +3,15 @@
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
|
||||
FontFamily="{DynamicResource OmagCut_Font}"
|
||||
Title="OpenFile" Height="587.4" Width="500.6" WindowStyle="None"
|
||||
Title="OpenFile" Height="500.6" Width="426.6" WindowStyle="None"
|
||||
ResizeMode="NoResize" ShowInTaskbar="False" AllowsTransparency="True"
|
||||
Background="Transparent">
|
||||
<Border Style="{DynamicResource OmagCut_Border}">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="0.2*"/>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
<ColumnDefinition Width="4*"/>
|
||||
<ColumnDefinition Width="0.2*"/>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
@@ -36,7 +36,7 @@
|
||||
<StackPanel Grid.Column="1" Grid.Row="2" Orientation="Horizontal"
|
||||
HorizontalAlignment="Center">
|
||||
<ScrollViewer Name="MyScrollViewer" VerticalScrollBarVisibility="Auto">
|
||||
<TextBlock Name="LicenseMsgTxBl" MaxWidth="425"
|
||||
<TextBlock Name="LicenseMsgTxBl" MaxWidth="340"
|
||||
HorizontalAlignment="Center"
|
||||
Foreground="{DynamicResource Omag_White}" FontSize="20" VerticalAlignment="Center"
|
||||
TextWrapping="Wrap"/>
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
Public Sub Init() Handles Me.Initialized
|
||||
IconTxBl.Text = "⚠️"
|
||||
LicenseTxBl.Text = m_sTitle
|
||||
LicenseTxBl.Text = "Warning" & vbCrLf & m_sTitle
|
||||
m_sMessage = m_sMessage.Replace("/n", "£")
|
||||
Dim sItems As String() = m_sMessage.Split("£")
|
||||
For Index As Integer = 0 To sItems.Count - 1
|
||||
|
||||
@@ -57,7 +57,6 @@ Public Class AlarmsPageUC
|
||||
|
||||
' Imposto i messaggi letti dal file dei messaggi
|
||||
CurrSawTxBl.Text = EgtMsg(MSG_ALARMSPAGEUC + 1)
|
||||
CurrSawTiltedTxBl.Text = EgtMsg(91049) ' Current saw tilted
|
||||
AuxiliaryToolTxBl.Text = EgtMsg(MSG_ALARMSPAGEUC + 2)
|
||||
CurrDrillTxBl.Text = EgtMsg(MSG_ALARMSPAGEUC + 3)
|
||||
CurrCupWheelTxBl.Text = EgtMsg(MSG_ALARMS2PAGEUC + 20)
|
||||
@@ -94,13 +93,13 @@ Public Class AlarmsPageUC
|
||||
WJsParamGpBx.Header = EgtMsg( 91058) ' Parametri waterjet
|
||||
WjIntCutsTxBl.Text = EgtMsg(90930) ' Sempre sugli interni
|
||||
'-- INIZIO -- nuovi parametri per preforo lavello
|
||||
HolesDiameterWJTxBl.Text = EgtMsg(91044) ' Diametro
|
||||
HolesOffsetWJTxBl.Text = EgtMsg(91045) ' Offset
|
||||
MinRadiusWJTxBl.Text = EgtMsg(91046) ' Raggio Minimo
|
||||
HolesDiameterWJTxBl.Text = "Diameter"
|
||||
HolesOffsetWJTxBl.Text = "Offset"
|
||||
MinRadiusWJTxBl.Text = "Min Radius"
|
||||
OneHoleInCornerWJTxBl.Text = EgtMsg(MSG_ALARMSPAGEUC + 26)
|
||||
'-- INIZIO -- nuovi parametro Rettifica tagli sottosquadra WJ
|
||||
RectificationWJParamGpBx.Header = EgtMsg(91047) ' Rettifica
|
||||
EnableRectificationTxBl.Text = EgtMsg(91048) ' Abilita (sottosquadra)
|
||||
REctificationWJParamGpBx.Header = "Rectification"
|
||||
EnableRectificationTxBl.Text = "Enable (on subsquare angle)"
|
||||
'-- FINE -- nuovi parametro Rettifica tagli sottosquadra WJ
|
||||
NestingParamGpBx.Header = EgtMsg(MSG_ALARMSPAGEUC + 31) ' Nesting
|
||||
AlignTxBl.Text = EgtMsg(90932) ' Allineato
|
||||
@@ -121,7 +120,6 @@ Public Class AlarmsPageUC
|
||||
CfrPercTxBl.Text = EgtMsg(MSG_ALARMSPAGEUC + 48) ' Riduzione %
|
||||
MachiningsGpBx.Header = EgtMsg(MSG_ALARMS2PAGEUC + 1) ' Lavorazioni
|
||||
CurrSawingTxBl.Text = EgtMsg(MSG_ALARMS2PAGEUC + 2) ' Taglio lama
|
||||
CurrSawingTiltedTxBl.Text = EgtMsg(91050) ' Taglio inclinato
|
||||
CurrDrillingTxBl.Text = EgtMsg(MSG_ALARMS2PAGEUC + 3) ' Foratura
|
||||
CurrMillingTxBl.Text = EgtMsg(MSG_ALARMS2PAGEUC + 4) ' Fresatura
|
||||
CurrPocketingTxBl.Text = EgtMsg(91069) ' Svuotatura
|
||||
@@ -161,7 +159,7 @@ Public Class AlarmsPageUC
|
||||
HolesGpBx.Visibility = Windows.Visibility.Hidden
|
||||
Case CurrentMachine.MountedToolConfigs.SAWANDAUXTOOL
|
||||
'Non faccio alcunchè
|
||||
Case CurrentMachine.MountedToolConfigs.MANUALTOOLCHANGER, CurrentMachine.MountedToolConfigs.TOOLCHANGER, CurrentMachine.MountedToolConfigs.TOOLCHANGERWITHSAW
|
||||
Case CurrentMachine.MountedToolConfigs.MANUALTOOLCHANGER, CurrentMachine.MountedToolConfigs.TOOLCHANGER
|
||||
'Da implementare
|
||||
End Select
|
||||
|
||||
@@ -294,59 +292,6 @@ Public Class AlarmsPageUC
|
||||
' attivo il bottone per l'apertura della pagina che mostra la configurazione degli utensili in parcheggio
|
||||
SetUpBtn.Visibility = Windows.Visibility.Visible
|
||||
|
||||
Case CurrentMachine.MountedToolConfigs.TOOLCHANGERWITHSAW
|
||||
' Aggiorno la lista delle lame con quelle montate sul portautensile automatico
|
||||
Dim m_SawOnHolderList As New ObservableCollection(Of String)
|
||||
Dim bOnHolder As Boolean = False
|
||||
For Each sNameTool As String In m_SawList
|
||||
If Not String.IsNullOrEmpty(sNameTool) Then
|
||||
' Verifico che sia montata su un portautensile
|
||||
EgtTdbSetCurrTool(sNameTool)
|
||||
Dim sTCPos As String = String.Empty
|
||||
EgtTdbGetCurrToolParam(MCH_TP.TCPOS, sTCPos)
|
||||
If Not String.IsNullOrEmpty(sTCPos) Then
|
||||
' Cerco nel porta utensili automaitico
|
||||
For Each ToolPosition As ToolChangerPos In m_MainWindow.m_CurrentMachine.ToolChanger
|
||||
If ToolPosition.sTool <> String.Empty Then
|
||||
If sNameTool = ToolPosition.sTool Then
|
||||
m_SawOnHolderList.Add(sNameTool)
|
||||
' Se il nome dell'utensile è lo stesso di quello impostato nella combo allora lo setto
|
||||
If sNameTool = m_CurrentMachine.sCurrSaw Then
|
||||
bOnHolder = True
|
||||
End If
|
||||
Exit For
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
m_SawList = m_SawOnHolderList
|
||||
CurrSawCmBx.ItemsSource = m_SawList
|
||||
If bOnHolder Then
|
||||
' reimposto la lavorazione di lama e la lama impostate in macchina
|
||||
EgtTdbSetCurrTool(m_CurrentMachine.sCurrSaw)
|
||||
' Seleziono lama corrente
|
||||
CurrSawCmBx.SelectedItem = m_CurrentMachine.sCurrSaw
|
||||
Else
|
||||
m_CurrentMachine.sCurrSawing = ""
|
||||
End If
|
||||
|
||||
CurrSawTiltedCmBx.ItemsSource = m_SawList
|
||||
If m_SawList.IndexOf(m_CurrentMachine.sCurrSawTilted) > -1 Then
|
||||
' Seleziono lama corrente
|
||||
CurrSawTiltedCmBx.SelectedItem = m_CurrentMachine.sCurrSawTilted
|
||||
Else
|
||||
m_CurrentMachine.sCurrSawingTilted = ""
|
||||
End If
|
||||
|
||||
' attivo la selezione della lama per il taglio in inlinato
|
||||
CurrSawTiltedTxBl.Visibility = Visibility.Visible
|
||||
CurrSawTiltedCmBx.Visibility = Visibility.Visible
|
||||
|
||||
' attivo il bottone per l'apertura della pagina che mostra la configurazione degli utensili in parcheggio
|
||||
SetUpBtn.Visibility = Windows.Visibility.Visible
|
||||
|
||||
End Select
|
||||
|
||||
' aggiorno le TextBlock con le lavorazioni correnti
|
||||
@@ -496,21 +441,6 @@ Public Class AlarmsPageUC
|
||||
CurrSawingTxBl.Visibility = Windows.Visibility.Hidden
|
||||
CurrSawingTxBx.Visibility = Windows.Visibility.Hidden
|
||||
End If
|
||||
If m_CurrentMachine.sCurrSawingTilted <> String.Empty Then
|
||||
If Not m_CurrentMachine.bApplySawingTilted Then
|
||||
CurrSawingTiltedTxBx.Foreground = Brushes.Gray
|
||||
CurrSawingTiltedTxBx.TextDecorations = TextDecorations.Strikethrough
|
||||
Else
|
||||
CurrSawingTiltedTxBx.Foreground = Brushes.White
|
||||
CurrSawingTiltedTxBx.TextDecorations = Nothing
|
||||
End If
|
||||
CurrSawingTiltedTxBx.Text = m_CurrentMachine.sCurrSawingTilted
|
||||
CurrSawingTiltedTxBl.Visibility = Windows.Visibility.Visible
|
||||
CurrSawingTiltedTxBx.Visibility = Windows.Visibility.Visible
|
||||
Else
|
||||
CurrSawingTiltedTxBl.Visibility = Windows.Visibility.Hidden
|
||||
CurrSawingTiltedTxBx.Visibility = Windows.Visibility.Hidden
|
||||
End If
|
||||
If m_CurrentMachine.sCurrDrilling <> String.Empty Then
|
||||
CurrDrillingTxBx.Text = m_CurrentMachine.sCurrDrilling
|
||||
CurrDrillingTxBl.Visibility = Windows.Visibility.Visible
|
||||
@@ -711,42 +641,6 @@ Public Class AlarmsPageUC
|
||||
RefreschMachining()
|
||||
End Sub
|
||||
|
||||
' -- SAW TILTED --
|
||||
Private Sub CurrSawTiltedCmBx_SelectionChanged(sender As Object, e As SelectionChangedEventArgs) Handles CurrSawTiltedCmBx.SelectionChanged
|
||||
If IsNothing(CurrSawTiltedCmBx.SelectedItem) Then Return
|
||||
' Assegno
|
||||
m_CurrentMachine.sCurrSawTilted = CurrSawTiltedCmBx.SelectedItem.ToString()
|
||||
' Se nuova lama incompatibile con lavorazione di taglio corrente, resetto quest'ultima
|
||||
Dim sMchTuuid As String = String.Empty
|
||||
Dim sMchTool As String = String.Empty
|
||||
If Not EgtMdbSetCurrMachining(m_CurrentMachine.sCurrSawingTilted) Or
|
||||
Not EgtMdbGetCurrMachiningParam(MCH_MP.TUUID, sMchTuuid) Or
|
||||
Not EgtTdbGetToolFromUUID(sMchTuuid, sMchTool) Or
|
||||
String.Compare(sMchTool, m_CurrentMachine.sCurrSawTilted, True) <> 0 Then
|
||||
m_CurrentMachine.sCurrSawingTilted = String.Empty
|
||||
End If
|
||||
|
||||
' Dim sVal As String = String.Empty
|
||||
' Dim dVal As Double = 0
|
||||
' If m_CurrentMachine.GetUserNote("FsevLength", sVal, m_CurrentMachine.sCurrSaw) Then
|
||||
' StringToDouble(sVal, dVal)
|
||||
' m_CurrentMachine.SetFsevLength(dVal)
|
||||
' End If
|
||||
' If m_CurrentMachine.GetUserNote("FsevPerc", sVal, m_CurrentMachine.sCurrSaw) Then
|
||||
' StringToDouble(sVal, dVal)
|
||||
' m_CurrentMachine.SetFsevPerc(dVal)
|
||||
' End If
|
||||
'
|
||||
' ' Leggo parametri per variazione feed in tagli aggiornati in funzione della lama
|
||||
' CfrLenTxBx.Text = LenToString(m_CurrentMachine.dFsevLength, 3)
|
||||
' CfrPercTxBx.Text = DoubleToString(m_CurrentMachine.dFsevPerc, 0)
|
||||
|
||||
' Aggiorno utensili per lavoro in corso
|
||||
m_MainWindow.m_WorkInProgressPageUC.UpdateTools()
|
||||
' aggiorno la lista delle lavorazioni
|
||||
RefreschMachining()
|
||||
End Sub
|
||||
|
||||
' -- DRILL --
|
||||
Private Sub CurrDrillCmBx_SelectionChanged(sender As Object, e As SelectionChangedEventArgs) Handles CurrDrillCmBx.SelectionChanged
|
||||
If IsNothing(CurrDrillCmBx.SelectedItem) Then Return
|
||||
@@ -1481,7 +1375,7 @@ Public Class AlarmsPageUC
|
||||
Select Case m_CurrentMachine.MountedToolConfig
|
||||
Case CurrentMachine.MountedToolConfigs.SAW
|
||||
Return New ToolPos(m_CurrentMachine.sCurrSaw, "T100", True)
|
||||
Case CurrentMachine.MountedToolConfigs.SAWANDAUXTOOL, CurrentMachine.MountedToolConfigs.MANUALTOOLCHANGER, CurrentMachine.MountedToolConfigs.TOOLCHANGER, CurrentMachine.MountedToolConfigs.TOOLCHANGERWITHSAW
|
||||
Case CurrentMachine.MountedToolConfigs.SAWANDAUXTOOL, CurrentMachine.MountedToolConfigs.MANUALTOOLCHANGER, CurrentMachine.MountedToolConfigs.TOOLCHANGER
|
||||
Dim ChooseTool As New ChooseToolWD(m_MainWindow)
|
||||
If ChooseTool.ShowDialog Then
|
||||
Return ChooseTool.GetSelectedTool
|
||||
|
||||
@@ -76,18 +76,6 @@ Public Class ChooseToolWD
|
||||
End If
|
||||
Next
|
||||
Return True
|
||||
Case CurrentMachine.MountedToolConfigs.TOOLCHANGERWITHSAW
|
||||
For Each ToolChangerPos As ToolChangerPos In m_MainWindow.m_CurrentMachine.ToolChanger
|
||||
If Not String.IsNullOrWhiteSpace(ToolChangerPos.sTool) Then
|
||||
m_SetUpToolList.Add(New ToolPos(ToolChangerPos.sTool, ToolChangerPos.sName, False))
|
||||
End If
|
||||
Next
|
||||
For Each ToolChangerPos As ToolChangerPos In m_MainWindow.m_CurrentMachine.ManualToolChanger
|
||||
If Not String.IsNullOrWhiteSpace(ToolChangerPos.sTool) Then
|
||||
m_SetUpToolList.Add(New ToolPos(ToolChangerPos.sTool, ToolChangerPos.sName, False))
|
||||
End If
|
||||
Next
|
||||
Return True
|
||||
Case Else
|
||||
Return False
|
||||
End Select
|
||||
|
||||
@@ -107,7 +107,6 @@ Public Class CurrentMachine
|
||||
|
||||
' Variabili che contengono il nome degli utensili disponibili per tipo
|
||||
Private m_sCurrSaw As String = String.Empty
|
||||
Private m_sCurrSawTilted As String = String.Empty
|
||||
Private m_sCurrDrill As String = String.Empty
|
||||
Private m_sCurrMill As String = String.Empty
|
||||
Private m_sCurrMillNoTip As String = String.Empty
|
||||
@@ -117,8 +116,6 @@ Public Class CurrentMachine
|
||||
|
||||
' Variabili che contengono le lavorazioni correntemente attive (utilizzate per definire lavorazioni nel programma)
|
||||
Private m_sCurrSawing As String = String.Empty
|
||||
Private m_sCurrSawingTilted As String = String.Empty
|
||||
Private m_bApplySawingTilted As Boolean = False
|
||||
Private m_sCurrDrilling As String = String.Empty
|
||||
Private m_sCurrMilling As String = String.Empty
|
||||
Private m_sCurrPocketing As String = String.Empty
|
||||
@@ -135,7 +132,6 @@ Public Class CurrentMachine
|
||||
Private m_dAdditionalTable As Double = 0
|
||||
Private m_dTab2AdditionalTable As Double = 0
|
||||
Private m_dTab3AdditionalTable As Double = 0
|
||||
Private m_dTab4AdditionalTable As Double = 0
|
||||
Private m_bCenterRawOnX As Boolean = False
|
||||
|
||||
' Offset aggiuntivi per fotografia
|
||||
@@ -197,7 +193,6 @@ Public Class CurrentMachine
|
||||
SAWANDAUXTOOL = 1
|
||||
MANUALTOOLCHANGER = 2
|
||||
TOOLCHANGER = 3
|
||||
TOOLCHANGERWITHSAW = 4
|
||||
End Enum
|
||||
|
||||
' Massimo numero di utensili su Tc
|
||||
@@ -209,9 +204,6 @@ Public Class CurrentMachine
|
||||
' Massima profondità lavorabile nei tagli diretti
|
||||
Private m_MaxTabDepth As Double = 10.0
|
||||
|
||||
' Massima altezza lavorabile con lama grande
|
||||
Private m_dHighPieceZ As Double = 200.0
|
||||
|
||||
#Region "Proprietà che leggono e scrivono i valori anche da o su file ini"
|
||||
Friend ReadOnly Property MaxTabDepth As Double
|
||||
Get
|
||||
@@ -578,18 +570,6 @@ Public Class CurrentMachine
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Friend Property sCurrSawTilted As String
|
||||
Get
|
||||
Return m_sCurrSawTilted
|
||||
End Get
|
||||
Set(value As String)
|
||||
If WritePrivateProfileString(S_MACH_MACH, K_CURRSAWTILTED, value, sMachIniFile) Then
|
||||
m_sCurrSawTilted = value
|
||||
' m_MainWindow.m_CurrentProjectPageUC.ToolTxBx.Text = value
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Friend Property sCurrDrill As String
|
||||
Get
|
||||
Return m_sCurrDrill
|
||||
@@ -664,32 +644,18 @@ Public Class CurrentMachine
|
||||
If WritePrivateProfileString(S_MACH_MACH, K_CURRSAWING, value, sMachIniFile) Then
|
||||
m_sCurrSawing = value
|
||||
m_MainWindow.m_CurrentProjectPageUC.MachiningTxBx.Text = value
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Friend Property sCurrSawingTilted As String
|
||||
Get
|
||||
Return m_sCurrSawingTilted
|
||||
End Get
|
||||
Set(value As String)
|
||||
If WritePrivateProfileString(S_MACH_MACH, K_CURRSAWINGTILTED, value, sMachIniFile) Then
|
||||
m_sCurrSawingTilted = value
|
||||
'm_MainWindow.m_CurrentProjectPageUC.MachiningTxBx.Text = value
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Friend Property bApplySawingTilted As Boolean
|
||||
Get
|
||||
Return m_bApplySawingTilted
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
m_bApplySawingTilted = value
|
||||
If m_bApplySawingTilted Then
|
||||
WritePrivateProfileString(S_MACH_MACH, K_APPLYSAWINGTILTED, "1", sMachIniFile)
|
||||
Else
|
||||
WritePrivateProfileString(S_MACH_MACH, K_APPLYSAWINGTILTED, "0", sMachIniFile)
|
||||
'' aggiorno il file ini della macchina con i valori correnti della lavorazione
|
||||
'Dim sVal As String = String.Empty
|
||||
'Dim dVal As Double = m_dFsevLength
|
||||
'If GetUserNote("FsevLength", sVal, m_sCurrSawing, False) Then
|
||||
' StringToDouble(sVal, dVal)
|
||||
' SetFsevLength(dVal)
|
||||
'End If
|
||||
'dVal = m_dFsevPerc
|
||||
'If GetUserNote("FsevPerc", sVal, m_sCurrSawing, False) Then
|
||||
' StringToDouble(sVal, m_dFsevPerc)
|
||||
' SetFsevPerc(dVal)
|
||||
'End If
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
@@ -834,12 +800,10 @@ Public Class CurrentMachine
|
||||
Friend Property dAdditionalTable As Double
|
||||
Get
|
||||
Select Case GetCurrentTable()
|
||||
Case 2
|
||||
Return m_dTab2AdditionalTable
|
||||
Case 3
|
||||
Return m_dTab3AdditionalTable
|
||||
Case 4
|
||||
Return m_dTab4AdditionalTable
|
||||
Case 2
|
||||
Return m_dTab2AdditionalTable
|
||||
Case Else
|
||||
Return m_dAdditionalTable
|
||||
End Select
|
||||
@@ -847,19 +811,6 @@ Public Class CurrentMachine
|
||||
Set(value As Double)
|
||||
Dim dValue As Double = 0
|
||||
Select Case GetCurrentTable()
|
||||
Case 4
|
||||
If Math.Abs(value - m_dTab4AdditionalTable) > EPS_SMALL And
|
||||
WritePrivateProfileString(S_TABLE, K_TAB4_ADDITIONALTABLE, DoubleToString(value, 3), sMachIniFile) Then
|
||||
' Aggiorno il valore corrente
|
||||
m_dTab4AdditionalTable = value
|
||||
' Aggiorno il progetto corrente
|
||||
m_MainWindow.m_CurrentProjectPageUC.AdjustAdditionalTable()
|
||||
' salvo il valore della sovratavola nel progetto
|
||||
EgtGetInfo(EgtGetFirstNameInGroup(GDB_ID.ROOT, NAME_PROJMARK), K_TAB3_ADDITIONALTABLE, dValue)
|
||||
If Math.Abs(dValue - value) > EPS_SMALL Then
|
||||
EgtSetInfo(EgtGetFirstNameInGroup(GDB_ID.ROOT, NAME_PROJMARK), K_TAB3_ADDITIONALTABLE, value)
|
||||
End If
|
||||
End If
|
||||
Case 3
|
||||
If Math.Abs(value - m_dTab3AdditionalTable) > EPS_SMALL And
|
||||
WritePrivateProfileString(S_TABLE, K_TAB3_ADDITIONALTABLE, DoubleToString(value, 3), sMachIniFile) Then
|
||||
@@ -1198,12 +1149,6 @@ Public Class CurrentMachine
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Friend ReadOnly Property dHighPieceZ As Double
|
||||
Get
|
||||
Return m_dHighPieceZ
|
||||
End Get
|
||||
End Property
|
||||
|
||||
#End Region
|
||||
|
||||
Sub New()
|
||||
@@ -1319,14 +1264,6 @@ Public Class CurrentMachine
|
||||
' Leggo utensili correnti
|
||||
' lama
|
||||
GetPrivateProfileString(S_MACH_MACH, K_CURRSAW, Nothing, m_sCurrSaw, sMachIniFile)
|
||||
' lama inclinata
|
||||
If m_MountedToolConfig = 4 Then
|
||||
GetPrivateProfileString(S_MACH_MACH, K_CURRSAWTILTED, Nothing, m_sCurrSawTilted, sMachIniFile)
|
||||
Else
|
||||
' se non è configurato il cambio utensile e allora imposto l'unica lama disponibile per i tagli inclinati
|
||||
m_sCurrSawTilted = m_sCurrSaw
|
||||
End If
|
||||
|
||||
' foretto
|
||||
GetPrivateProfileString(S_MACH_MACH, K_CURRDRILL, Nothing, m_sCurrDrill, sMachIniFile)
|
||||
' fresa
|
||||
@@ -1343,10 +1280,6 @@ Public Class CurrentMachine
|
||||
' Leggo lavorazioni correnti
|
||||
' lama
|
||||
GetPrivateProfileString(S_MACH_MACH, K_CURRSAWING, Nothing, m_sCurrSawing, sMachIniFile)
|
||||
' lama inlicnata
|
||||
GetPrivateProfileString(S_MACH_MACH, K_CURRSAWINGTILTED, Nothing, m_sCurrSawingTilted, sMachIniFile)
|
||||
' applica lavorazione di lama inclinata
|
||||
m_bApplySawingTilted = (GetPrivateProfileInt(S_MACH_MACH, K_APPLYSAWINGTILTED, 0, sMachIniFile) <> 0)
|
||||
' foretto
|
||||
GetPrivateProfileString(S_MACH_MACH, K_CURRDRILLING, Nothing, m_sCurrDrilling, sMachIniFile)
|
||||
' fresa
|
||||
@@ -1400,7 +1333,6 @@ Public Class CurrentMachine
|
||||
m_dAdditionalTable = GetPrivateProfileDouble(S_TABLE, K_ADDITIONALTABLE, 0, sMachIniFile)
|
||||
m_dTab2AdditionalTable = GetPrivateProfileDouble(S_TABLE, K_TAB2_ADDITIONALTABLE, 0, sMachIniFile)
|
||||
m_dTab3AdditionalTable = GetPrivateProfileDouble(S_TABLE, K_TAB3_ADDITIONALTABLE, 0, sMachIniFile)
|
||||
m_dTab4AdditionalTable = GetPrivateProfileDouble(S_TABLE, K_TAB4_ADDITIONALTABLE, 0, sMachIniFile)
|
||||
|
||||
' Leggo centratura del pezzo in X sulla tavola (per macchine con nastro)
|
||||
m_bCenterRawOnX = (GetPrivateProfileInt(S_TABLE, K_CENTER_RAW_ONX, 0, sMachIniFile) <> 0)
|
||||
@@ -1485,9 +1417,6 @@ Public Class CurrentMachine
|
||||
If m_MaxTabDepth < 0 Then
|
||||
m_MaxTabDepth = 10.0
|
||||
End If
|
||||
|
||||
' Massimo spessore lavorabile con lama grande
|
||||
m_dHighPieceZ = GetPrivateProfileDouble(S_RAWMOVE, "MaxHeightPiece", 800.0, m_MainWindow.GetMachIniFile())
|
||||
End Sub
|
||||
|
||||
' Per il controllo FANUC al momento dell'inizializzazione del CN devono essere lette alcune variabili
|
||||
@@ -1734,7 +1663,7 @@ Public Class CurrentMachine
|
||||
EgtTdbGetCurrToolParam(MCH_TP.DIAM, dToolDiam)
|
||||
' Confronto con massimo ammesso
|
||||
Dim bOk As Boolean = dToolDiam <= dMaxSawDiamForProbe
|
||||
If Not bOk Then EgtOutLog("WARNING: Saw diameter to big for probing")
|
||||
If Not bOk Then EgtOutLog("WARNING: Saw diameter to big for porbing")
|
||||
Return bOk
|
||||
End Function
|
||||
|
||||
|
||||
@@ -41,7 +41,7 @@ Public Class MachineCNPageUC
|
||||
If GetPrivateProfileInt(S_NCDATA, K_NEWCONSOLE, 0, m_MainWindow.GetMachIniFile()) = 1 Then
|
||||
PowerONBtn.Content = "ON"
|
||||
PowerOFFBtn.Content = "OFF"
|
||||
PowerGpBx.Header = EgtMsg(90974) 'Power
|
||||
PowerGpBx.Header = "Power"
|
||||
Else
|
||||
PowerGpBx.Visibility = Visibility.Collapsed
|
||||
End If
|
||||
@@ -49,7 +49,7 @@ Public Class MachineCNPageUC
|
||||
' verifico che sia attiva la modalità per l'uso di due fotocamere
|
||||
If GetPrivateProfileInt(S_CAMERAHQ, K_CAMERAHQ_ENABLE, 0, m_MainWindow.GetMachIniFile()) = 1 Then
|
||||
CameraHQ.Visibility = Visibility.Visible
|
||||
CameraHQ.Header = EgtMsg(90975) 'Photo on table
|
||||
CameraHQ.Header = "Photo on table"
|
||||
CameraHQBtn.Content = "HQ"
|
||||
' verifico quale camera è impostata
|
||||
If GetPrivateProfileInt(S_CAMERAHQ, K_CAMERAHQ_ACTIVATE, 0, m_MainWindow.GetMachIniFile()) = 1 Then
|
||||
@@ -177,7 +177,7 @@ Public Class MachineCNPageUC
|
||||
If m_MainWindow.m_CNCommunication.m_nNCType = 3 AndAlso m_MainWindow.m_CNCommunication.m_CN.m_IsSiemensOne Then
|
||||
Dim sDBVarPath As String = ""
|
||||
GetPrivateProfileString(S_NCSIEMENS, K_DBVARPATH, "", sDBVarPath, m_MainWindow.GetMachIniFile)
|
||||
sDBVarPath &= EgtMsg(90976) ' Start_Cycle
|
||||
sDBVarPath &= "Start_Cycle"
|
||||
m_CN.DVariables_WriteVariables3(sDBVarPath, 1, 1, 0, 0, "") ' Modalità manuale
|
||||
Else
|
||||
m_CN.DGeneralFunctions_CycleStart()
|
||||
@@ -188,7 +188,7 @@ Public Class MachineCNPageUC
|
||||
If m_MainWindow.m_CNCommunication.m_nNCType = 3 AndAlso m_MainWindow.m_CNCommunication.m_CN.m_IsSiemensOne Then
|
||||
Dim sDBVarPath As String = ""
|
||||
GetPrivateProfileString(S_NCSIEMENS, K_DBVARPATH, "", sDBVarPath, m_MainWindow.GetMachIniFile)
|
||||
sDBVarPath &= EgtMsg(90977) ' Stop_Cycle
|
||||
sDBVarPath &= "Stop_Cycle"
|
||||
m_CN.DVariables_WriteVariables3(sDBVarPath, 1, 0, 0, 0, "") ' Modalità manuale
|
||||
Else
|
||||
m_CN.DGeneralFunctions_FeedHold()
|
||||
@@ -199,7 +199,7 @@ Public Class MachineCNPageUC
|
||||
If m_MainWindow.m_CNCommunication.m_nNCType = 3 AndAlso m_MainWindow.m_CNCommunication.m_CN.m_IsSiemensOne Then
|
||||
Dim sDBVarPath As String = ""
|
||||
GetPrivateProfileString(S_NCSIEMENS, K_DBVARPATH, "", sDBVarPath, m_MainWindow.GetMachIniFile)
|
||||
sDBVarPath &= EgtMsg(90978) ' Reset_Cycle
|
||||
sDBVarPath &= "Reset_Cycle"
|
||||
m_CN.DVariables_WriteVariables3(sDBVarPath, 1, 1, 0, 0, "") ' Modalità manuale
|
||||
Else
|
||||
Call m_CN.DGeneralFunctions_Reset()
|
||||
|
||||
@@ -298,8 +298,6 @@ Public Class MachinePageUC
|
||||
WaterJetBtn.IsChecked = False
|
||||
MachinePageGrid.Children.Remove(m_WaterJetPageUC)
|
||||
MachinePageGrid.Children.Add(m_MachiningDbPageUC)
|
||||
' Aggiorno lista materiali
|
||||
m_MainWindow.m_CurrentMachine.LoadWJMaterial()
|
||||
m_ActiveMachinePage = MachinePages.MachiningDb
|
||||
Case MachinePages.MachineCN
|
||||
MachiningDBBtn.IsChecked = True
|
||||
|
||||
@@ -279,16 +279,12 @@ Public Class MachineStatusUC
|
||||
|
||||
Sub DisplayFeed()
|
||||
Dim dRealFeed As Double = m_CN.d_DInterpo_Prog_Feed * m_CN.d_DInterpo_Feed_override / 100
|
||||
'' modifica richiesta 26/05/2023 da Rosario per cliente Lanzetta (lettura feed per CN Fanuc)
|
||||
'If m_MainWindow.m_CNCommunication.m_nNCType = 4 Then
|
||||
' dRealFeed = m_CN.d_DInterpo_Prog_Feed
|
||||
'Else
|
||||
' dRealFeed = m_CN.d_DInterpo_Prog_Feed * m_CN.d_DInterpo_Feed_override / 100
|
||||
'End If
|
||||
|
||||
' modifica richiesta 24/03/2025 da Fabio per cliente Frigerio
|
||||
dRealFeed = m_CN.d_DInterpo_Prog_Feed * m_CN.d_DInterpo_Feed_override / 100
|
||||
|
||||
' modifica richiesta 26/05/2023 da Rosario per cliente Lanzetta
|
||||
If m_MainWindow.m_CNCommunication.m_nNCType = 4 Then
|
||||
dRealFeed = m_CN.d_DInterpo_Prog_Feed
|
||||
Else
|
||||
dRealFeed = m_CN.d_DInterpo_Prog_Feed * m_CN.d_DInterpo_Feed_override / 100
|
||||
End If
|
||||
'Feed = DoubleToString(dRealFeed, 0)
|
||||
FeedTxBx.Text = LenToString(dRealFeed, 0, True)
|
||||
'FeedOverride = DoubleToString(m_CN.d_DInterpo_Feed_override, 0) & "%"
|
||||
|
||||
@@ -79,8 +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 = EgtMsg(91126) ' Export
|
||||
ImportBtn.Content = EgtMsg(91127) ' Import
|
||||
ExportBtn.Content = "Export"
|
||||
ImportBtn.Content = "Import"
|
||||
|
||||
NameTxBl.Text = EgtMsg(MSG_MACHININGSDBPAGEUC + 1)
|
||||
DepthTxBl.Text = EgtMsg(MSG_MACHININGSDBPAGEUC + 2)
|
||||
|
||||
@@ -3,8 +3,6 @@ Imports System.ComponentModel
|
||||
Imports OmagCUT.TreeViewItem
|
||||
Imports EgtUILib
|
||||
Imports EgtWPFLib
|
||||
Imports EgtWPFLib5
|
||||
Imports FXServer
|
||||
|
||||
Public Class SetUpPage
|
||||
|
||||
@@ -15,7 +13,6 @@ Public Class SetUpPage
|
||||
Private m_CurrMachine As CurrentMachine = m_MainWindow.m_CurrentMachine
|
||||
|
||||
Private m_ToolTreeList As New ObservableCollection(Of CathegoryItem)
|
||||
Private m_SawsList As CathegoryItem
|
||||
Private m_DrillbitsList As CathegoryItem
|
||||
Private m_MillsList As CathegoryItem
|
||||
Private m_CupsList As CathegoryItem
|
||||
@@ -29,10 +26,10 @@ Public Class SetUpPage
|
||||
' Assegno la lista utensili come sorgente dell'albero
|
||||
ToolTree.ItemsSource = m_ToolTreeList
|
||||
|
||||
If m_CurrMachine.MountedToolConfig = CurrentMachine.MountedToolConfigs.TOOLCHANGER Or m_CurrMachine.MountedToolConfig = CurrentMachine.MountedToolConfigs.TOOLCHANGERWITHSAW Then
|
||||
If m_CurrMachine.MountedToolConfig = CurrentMachine.MountedToolConfigs.TOOLCHANGER Then
|
||||
'' Cambio utensile macchina
|
||||
' Modifico numero colonne della griglia in base al numero di porta utensili disponibili sulla macchina
|
||||
Dim ColNum As Integer = CInt(Math.Ceiling(m_CurrMachine.ToolChangerNbr / 5.0))
|
||||
Dim ColNum As Integer = CInt( Math.Ceiling( m_CurrMachine.ToolChangerNbr / 5.0))
|
||||
If ColNum > 12 Then
|
||||
EgtOutLog("TC warning : too many tools (max 12 * 5)")
|
||||
ColNum = 12
|
||||
@@ -62,11 +59,11 @@ Public Class SetUpPage
|
||||
|
||||
'' Cambio utensile manuale
|
||||
' Modifico numero colonne della griglia in base al numero di porta utensili disponibili sulla macchina
|
||||
Dim ManColNum As Integer = CInt(Math.Ceiling(m_CurrMachine.ManualToolChangerNbr / 5.0))
|
||||
If ManColNum > 12 Then
|
||||
EgtOutLog("ManTC warning : too many tools (max 12 * 5)")
|
||||
ManColNum = 12
|
||||
End If
|
||||
Dim ManColNum As Integer = CInt( Math.Ceiling( m_CurrMachine.ManualToolChangerNbr / 5.0))
|
||||
If ManColNum > 12 Then
|
||||
EgtOutLog("ManTC warning : too many tools (max 12 * 5)")
|
||||
ManColNum = 12
|
||||
End If
|
||||
For Index As Integer = 12 To ManColNum + 1 Step -1
|
||||
For Index2 As Integer = Index * 5 To (Index - 1) * 5 + 1 Step -1
|
||||
ManTlChGrid.Children.Remove(GetManTlChPosFromIndex(Index2))
|
||||
@@ -88,7 +85,7 @@ Public Class SetUpPage
|
||||
Next
|
||||
|
||||
' Se portautensili della macchina presente
|
||||
If m_CurrMachine.MountedToolConfig = CurrentMachine.MountedToolConfigs.TOOLCHANGER Or m_CurrMachine.MountedToolConfig = CurrentMachine.MountedToolConfigs.TOOLCHANGERWITHSAW Then
|
||||
If m_CurrMachine.MountedToolConfig = CurrentMachine.MountedToolConfigs.TOOLCHANGER Then
|
||||
' Apro quello
|
||||
TlChScVw.Visibility = Windows.Visibility.Visible
|
||||
ToolChangerBtn.IsChecked = True
|
||||
@@ -109,25 +106,15 @@ Public Class SetUpPage
|
||||
Private Sub SetUpPage_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded
|
||||
' Inizializzo le famiglie di utensili nell'albero
|
||||
EgtSetCurrentContext(m_MainWindow.m_CurrentProjectPageUC.CurrentProjectScene.GetCtx())
|
||||
If m_MainWindow.m_CurrentMachine.MountedToolConfig = CurrentMachine.MountedToolConfigs.TOOLCHANGERWITHSAW Then InitializeToolGroup(m_CurrMachine.bSaw, MCH_TY.SAW_STD, EgtMsg(90751), m_SawsList)
|
||||
InitializeToolGroup(m_CurrMachine.bDrill, MCH_TY.DRILL_STD, EgtMsg(90752), m_DrillbitsList)
|
||||
InitializeToolGroup(m_CurrMachine.bMill, MCH_TY.MILL_STD, EgtMsg(90753), m_MillsList)
|
||||
InitializeToolGroup(m_CurrMachine.bCupWheel, MCH_TY.MILL_NOTIP, EgtMsg(90754), m_CupsList)
|
||||
InitializeToolGroup(m_CurrMachine.bPolishingWheel, MCH_TY.MILL_POLISHING, EgtMsg(90756), m_PolishingsList)
|
||||
InitializeToolGroup( m_CurrMachine.bDrill, MCH_TY.DRILL_STD, EgtMsg( 90752), m_DrillbitsList)
|
||||
InitializeToolGroup( m_CurrMachine.bMill, MCH_TY.MILL_STD, EgtMsg( 90753), m_MillsList)
|
||||
InitializeToolGroup( m_CurrMachine.bCupWheel, MCH_TY.MILL_NOTIP, EgtMsg( 90754), m_CupsList)
|
||||
InitializeToolGroup( m_CurrMachine.bPolishingWheel, MCH_TY.MILL_POLISHING, EgtMsg( 90756), m_PolishingsList)
|
||||
|
||||
' Posiziono utensili già posizionati sul portautensili
|
||||
For Each ToolPosition As ToolChangerPos In m_CurrMachine.ToolChanger
|
||||
If ToolPosition.sTool <> String.Empty Then
|
||||
If m_MainWindow.m_CurrentMachine.MountedToolConfig = CurrentMachine.MountedToolConfigs.TOOLCHANGERWITHSAW AndAlso Not IsNothing(m_SawsList) Then
|
||||
For Each Item As CustomItem In m_SawsList.Items
|
||||
If Item.Name = ToolPosition.sTool Then
|
||||
m_SetUpToolsList.Items.Add(Item)
|
||||
m_SawsList.Items.Remove(Item)
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
If Not IsNothing(m_DrillbitsList) Then
|
||||
If Not IsNothing( m_DrillbitsList) Then
|
||||
For Each Item As CustomItem In m_DrillbitsList.Items
|
||||
If Item.Name = ToolPosition.sTool Then
|
||||
m_SetUpToolsList.Items.Add(Item)
|
||||
@@ -136,7 +123,7 @@ Public Class SetUpPage
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
If Not IsNothing(m_MillsList) Then
|
||||
If Not IsNothing( m_MillsList) Then
|
||||
For Each Item As CustomItem In m_MillsList.Items
|
||||
If Item.Name = ToolPosition.sTool Then
|
||||
m_SetUpToolsList.Items.Add(Item)
|
||||
@@ -145,7 +132,7 @@ Public Class SetUpPage
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
If Not IsNothing(m_CupsList) Then
|
||||
If Not IsNothing( m_CupsList) Then
|
||||
For Each Item As CustomItem In m_CupsList.Items
|
||||
If Item.Name = ToolPosition.sTool Then
|
||||
m_SetUpToolsList.Items.Add(Item)
|
||||
@@ -154,7 +141,7 @@ Public Class SetUpPage
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
If Not IsNothing(m_PolishingsList) Then
|
||||
If Not IsNothing( m_PolishingsList) Then
|
||||
For Each Item As CustomItem In m_PolishingsList.Items
|
||||
If Item.Name = ToolPosition.sTool Then
|
||||
m_SetUpToolsList.Items.Add(Item)
|
||||
@@ -171,7 +158,7 @@ Public Class SetUpPage
|
||||
' Posiziono utensili già posizionati sul portautensili manuale
|
||||
For Each ToolPosition As ToolChangerPos In m_CurrMachine.ManualToolChanger
|
||||
If ToolPosition.sTool <> String.Empty Then
|
||||
If Not IsNothing(m_DrillbitsList) Then
|
||||
If Not IsNothing( m_DrillbitsList) Then
|
||||
For Each Item As CustomItem In m_DrillbitsList.Items
|
||||
If Item.Name = ToolPosition.sTool Then
|
||||
m_SetUpToolsList.Items.Add(Item)
|
||||
@@ -180,7 +167,7 @@ Public Class SetUpPage
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
If Not IsNothing(m_MillsList) Then
|
||||
If Not IsNothing( m_MillsList) Then
|
||||
For Each Item As CustomItem In m_MillsList.Items
|
||||
If Item.Name = ToolPosition.sTool Then
|
||||
m_SetUpToolsList.Items.Add(Item)
|
||||
@@ -189,7 +176,7 @@ Public Class SetUpPage
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
If Not IsNothing(m_CupsList) Then
|
||||
If Not IsNothing( m_CupsList) Then
|
||||
For Each Item As CustomItem In m_CupsList.Items
|
||||
If Item.Name = ToolPosition.sTool Then
|
||||
m_SetUpToolsList.Items.Add(Item)
|
||||
@@ -198,7 +185,7 @@ Public Class SetUpPage
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
If Not IsNothing(m_PolishingsList) Then
|
||||
If Not IsNothing( m_PolishingsList) Then
|
||||
For Each Item As CustomItem In m_PolishingsList.Items
|
||||
If Item.Name = ToolPosition.sTool Then
|
||||
m_SetUpToolsList.Items.Add(Item)
|
||||
@@ -723,16 +710,16 @@ Public Class SetUpPage
|
||||
End Function
|
||||
|
||||
' Funzione che carica gli utensili del Db nell'albero
|
||||
Friend Sub InitializeToolGroup(bEnabled As Boolean, nTType As Integer, sFName As String, ByRef ToolCathegory As CathegoryItem)
|
||||
Friend Sub InitializeToolGroup( bEnabled As Boolean, nTType As Integer, sFName As String, ByRef ToolCathegory As CathegoryItem)
|
||||
If Not bEnabled Then Return
|
||||
' Inserisco categoria ed eventuali elementi
|
||||
ToolCathegory = New CathegoryItem(sFName, nTType)
|
||||
ToolCathegory = New CathegoryItem( sFName, nTType)
|
||||
Dim nType As Integer = 0
|
||||
Dim ToolName As String = String.Empty
|
||||
Dim bFound As Boolean = EgtTdbGetFirstTool(nTType, ToolName, nType)
|
||||
Dim bFound As Boolean = EgtTdbGetFirstTool( nTType, ToolName, nType)
|
||||
While bFound
|
||||
If nType = nTType Then ToolCathegory.Items.Add(New CustomItem(ToolName, nType))
|
||||
bFound = EgtTdbGetNextTool(nTType, ToolName, nType)
|
||||
If nType = nTType Then ToolCathegory.Items.Add( New CustomItem( ToolName, nType))
|
||||
bFound = EgtTdbGetNextTool( nTType, ToolName, nType)
|
||||
End While
|
||||
m_ToolTreeList.Add(ToolCathegory)
|
||||
End Sub
|
||||
@@ -774,7 +761,7 @@ Public Class SetUpPage
|
||||
ToolHolderClicked.Tool.IsChecked = False
|
||||
GetTxBxFromTlChPos(ToolHolderClicked.Name).Text = String.Empty
|
||||
End If
|
||||
' altrimenti da levare
|
||||
' altrimenti da levare
|
||||
Else
|
||||
RestoreToolInList(GetTxBxFromTlChPos(ToolHolderClicked.Name).Text)
|
||||
GetTxBxFromTlChPos(ToolHolderClicked.Name).Text = String.Empty
|
||||
@@ -784,17 +771,14 @@ Public Class SetUpPage
|
||||
|
||||
' Funzione che rimuove l'utensile selezionato dall'albero
|
||||
Private Sub RemoveToolFromList()
|
||||
If m_MainWindow.m_CurrentMachine.MountedToolConfig = CurrentMachine.MountedToolConfigs.TOOLCHANGERWITHSAW AndAlso
|
||||
Not IsNothing(m_SawsList) AndAlso m_SawsList.Items.Contains(ToolTree.SelectedItem) Then
|
||||
m_SawsList.Items.Remove(ToolTree.SelectedItem)
|
||||
ElseIf Not IsNothing(m_DrillbitsList) AndAlso m_DrillbitsList.Items.Contains(ToolTree.SelectedItem) Then
|
||||
m_DrillbitsList.Items.Remove(ToolTree.SelectedItem)
|
||||
ElseIf Not IsNothing(m_MillsList) AndAlso m_MillsList.Items.Contains(ToolTree.SelectedItem) Then
|
||||
m_MillsList.Items.Remove(ToolTree.SelectedItem)
|
||||
ElseIf Not IsNothing(m_CupsList) AndAlso m_CupsList.Items.Contains(ToolTree.SelectedItem) Then
|
||||
m_CupsList.Items.Remove(ToolTree.SelectedItem)
|
||||
ElseIf Not IsNothing(m_PolishingsList) AndAlso m_PolishingsList.Items.Contains(ToolTree.SelectedItem) Then
|
||||
m_PolishingsList.Items.Remove(ToolTree.SelectedItem)
|
||||
If Not IsNothing( m_DrillbitsList) AndAlso m_DrillbitsList.Items.Contains( ToolTree.SelectedItem) Then
|
||||
m_DrillbitsList.Items.Remove( ToolTree.SelectedItem)
|
||||
ElseIf Not IsNothing( m_MillsList) AndAlso m_MillsList.Items.Contains( ToolTree.SelectedItem) Then
|
||||
m_MillsList.Items.Remove( ToolTree.SelectedItem)
|
||||
ElseIf Not IsNothing( m_CupsList) AndAlso m_CupsList.Items.Contains( ToolTree.SelectedItem) Then
|
||||
m_CupsList.Items.Remove( ToolTree.SelectedItem)
|
||||
ElseIf Not IsNothing( m_PolishingsList) AndAlso m_PolishingsList.Items.Contains( ToolTree.SelectedItem) Then
|
||||
m_PolishingsList.Items.Remove( ToolTree.SelectedItem)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
@@ -802,9 +786,7 @@ Public Class SetUpPage
|
||||
Private Sub RestoreToolInList(sToolName As String)
|
||||
For Each Tool As CustomItem In m_SetUpToolsList.Items
|
||||
If Tool.Name = sToolName Then
|
||||
If Tool.nType = MCH_TY.SAW_STD Then
|
||||
m_SawsList.Items.Add(Tool)
|
||||
ElseIf Tool.nType = MCH_TY.DRILL_STD Then
|
||||
If Tool.nType = MCH_TY.DRILL_STD Then
|
||||
m_DrillbitsList.Items.Add(Tool)
|
||||
ElseIf Tool.nType = MCH_TY.MILL_STD Then
|
||||
m_MillsList.Items.Add(Tool)
|
||||
@@ -1102,39 +1084,6 @@ Public Class SetUpPage
|
||||
EgtTdbSave()
|
||||
End Sub
|
||||
|
||||
' Funzione che genera il file di setup corrente (per Cam5 e Office)
|
||||
Private Sub SaveSetUpFile()
|
||||
If m_CurrMachine.MountedToolConfig <> CurrentMachine.MountedToolConfigs.TOOLCHANGERWITHSAW Then Return
|
||||
Dim sContentFile As String = EgtMsg(91239) & vbCrLf ' ; this file has been created by program OmagCUT by current setup
|
||||
sContentFile &= EgtMsg(91240) & vbCrLf ' [General]
|
||||
For Each ToolPosition As ToolChangerPos In m_CurrMachine.ToolChanger
|
||||
Dim sToolName As String = ToolPosition.sTool
|
||||
Dim sPositionName As String = ToolPosition.sName
|
||||
Dim sPosition As Integer = ToolPosition.nPosition
|
||||
If Not String.IsNullOrEmpty(sToolName) Then
|
||||
EgtTdbSetCurrTool(sToolName)
|
||||
' Recupero l'uscita
|
||||
Dim nExit As Integer = 1
|
||||
EgtTdbGetCurrToolParam(MCH_TP.EXIT_, nExit)
|
||||
' Recupero la testa
|
||||
Dim sHead As String = ""
|
||||
EgtTdbGetCurrToolParam(MCH_TP.HEAD, sHead)
|
||||
' Recupero nome file nge dell'utensile
|
||||
Dim sUUID As String = ""
|
||||
EgtTdbGetCurrToolParam(MCH_TP.UUID, sUUID)
|
||||
'local sRaw='Pos'..tostring(Index)..'='..TcPos..';'..EgtTdbGetCurrToolParam( MCH_TP.HEAD)..';'..EgtTdbGetCurrToolParam( MCH_TP.EXIT)..'/'..EgtTdbGetCurrToolParam( MCH_TP.UUID)..'/'..ToolName
|
||||
sContentFile &= "Pos" & sPosition.ToString & "=" & sPositionName & ";" & sHead & ";" & nExit.ToString & "/" & sUUID & "/" & sToolName & vbCrLf
|
||||
End If
|
||||
Next
|
||||
' Apro il file e lo sovrascrivo
|
||||
Dim sFileOmagCutSetUp As String = m_CurrMachine.sMachDir & "\SetUp\CurrOmagCUT.stu"
|
||||
Try
|
||||
My.Computer.FileSystem.WriteAllText(sFileOmagCutSetUp, sContentFile, False)
|
||||
Catch ex As Exception
|
||||
EgtOutLog("Error in creatinf file CurrOmagCUT.stu: " & ex.ToString)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
' Evento che permette di aprire le cartelle degli utensili con un click singolo
|
||||
Private Sub ToolTree_PreviewMouseUp(sender As Object, e As MouseButtonEventArgs) Handles ToolTree.PreviewMouseUp
|
||||
If TypeOf ToolTree.SelectedItem Is CathegoryItem Then
|
||||
@@ -1146,8 +1095,6 @@ Public Class SetUpPage
|
||||
Private Sub OkBtn_Click(sender As Object, e As RoutedEventArgs) Handles OkBtn.Click
|
||||
' Eseguo salvataggio (DB utensili + attrezzaggio)
|
||||
SaveToolChangerStatus()
|
||||
' Salvo nel file di setup l'attuale configurazione
|
||||
SaveSetUpFile()
|
||||
' Esco
|
||||
m_MainWindow.m_MachinePageUC.MachinePageGrid.Children.Add(m_MainWindow.m_MachinePageUC.m_AlarmsPageUC)
|
||||
m_MainWindow.m_MachinePageUC.MachinePageGrid.Children.Remove(Me)
|
||||
@@ -1184,7 +1131,7 @@ Public Class SetUpPage
|
||||
RemoveToolFromList()
|
||||
Else
|
||||
' Altrimenti segnalo che la posizione è già occupata
|
||||
Dim InfoMsgBox As New EgtMsgBox(m_MainWindow, "", EgtMsg(90759), EgtMsgBox.Buttons.OK, EgtMsgBox.Icons.ESCLAMATION)
|
||||
Dim InfoMsgBox As New EgtMsgBox(m_MainWindow, "", EgtMsg( 90759), EgtMsgBox.Buttons.OK, EgtMsgBox.Icons.ESCLAMATION)
|
||||
End If
|
||||
Return
|
||||
End If
|
||||
@@ -1202,7 +1149,7 @@ Public Class SetUpPage
|
||||
RemoveToolFromList()
|
||||
Else
|
||||
' Altrimenti segnalo che la posizione è già occupata
|
||||
Dim InfoMsgBox As New EgtMsgBox(m_MainWindow, "", EgtMsg(90759), EgtMsgBox.Buttons.OK, EgtMsgBox.Icons.ESCLAMATION)
|
||||
Dim InfoMsgBox As New EgtMsgBox(m_MainWindow, "", EgtMsg( 90759), EgtMsgBox.Buttons.OK, EgtMsgBox.Icons.ESCLAMATION)
|
||||
End If
|
||||
Return
|
||||
End If
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
</Grid>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="IsChecked" Value="True">
|
||||
<Setter Property="Fill" TargetName="Ellipse" Value="#414141"/>
|
||||
<Setter Property="Fill" TargetName="Ellipse" Value="#FFB4B4B4"/>
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
<UserControl x:Class="ToolsDbPageUC"
|
||||
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="ToolsDbPage_Initialized" Loaded="ToolsDbPage_Loaded">
|
||||
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="ToolsDbPage_Initialized" Loaded="ToolsDbPage_Loaded">
|
||||
|
||||
<!-- Definizione della ImportPage -->
|
||||
<Border Style="{DynamicResource OmagCut_PageBorder}">
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
<TreeView Name="ToolTreeView" Background="{DynamicResource OmagCut_TreeViewBackGroundColor}" >
|
||||
<TreeView.Resources>
|
||||
<!--Modifico HierarchicalDataTemplate del CathegoryItem per poter inserire immagine e testo e per -->
|
||||
<!--Modifico HierarchicalDataTemplate del CathegoryItem per poter inserire immagine e testo e per -->
|
||||
<!--renderlo apribile con un solo click -->
|
||||
<HierarchicalDataTemplate DataType="{x:Type self:CathegoryItem}" ItemsSource="{Binding Items}">
|
||||
|
||||
@@ -224,12 +224,12 @@
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<TextBlock Name="NameTxBl" Grid.Column="0" Grid.Row="0" Grid.RowSpan="3"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="NameTxBx" Grid.Column="1" Grid.Row="0" Grid.RowSpan="3"
|
||||
Style="{DynamicResource OmagCut_LeftKeyboardTextBoxNoBorder}"/>
|
||||
Style="{DynamicResource OmagCut_LeftKeyboardTextBoxNoBorder}"/>
|
||||
|
||||
<Border Name="TCPosBrd" Grid.Column="2" Grid.Row="0" Grid.ColumnSpan="2" Grid.RowSpan="3"
|
||||
BorderThickness="0" BorderBrush="Black" CornerRadius="3">
|
||||
BorderThickness="0" BorderBrush="Black" CornerRadius="3">
|
||||
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
@@ -237,27 +237,17 @@
|
||||
<ColumnDefinition Width="2*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<TextBlock Name="TCPosTxBl" Grid.Column="0">
|
||||
<TextBlock.Style>
|
||||
<Style TargetType="{x:Type TextBlock}" BasedOn="{StaticResource OmagCut_LowerCaseCharacterTextBlock}">
|
||||
<Setter Property="Margin" Value="10,0,0,0"/>
|
||||
<Style.Triggers>
|
||||
<Trigger Property="ToolTip" Value="">
|
||||
<Setter Property="ToolTipService.IsEnabled" Value="False" />
|
||||
</Trigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</TextBlock.Style>
|
||||
</TextBlock>
|
||||
<TextBlock Name="TCPosTxBl" Grid.Column="0"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="TCPosTxBx" Grid.Column="1" Grid.Row="0" Margin="0,0,15,0"
|
||||
Style="{DynamicResource OmagCut_KeyboardTextBox}" />
|
||||
Style="{DynamicResource OmagCut_KeyboardTextBox}" />
|
||||
|
||||
</Grid>
|
||||
|
||||
</Border>
|
||||
|
||||
<Border Name="HeadExitBrd" Grid.Column="0" Grid.Row="3" Grid.ColumnSpan="4" Grid.RowSpan="3"
|
||||
Style="{DynamicResource OmagCut_NoNameGroupBorder}">
|
||||
Style="{DynamicResource OmagCut_NoNameGroupBorder}">
|
||||
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
@@ -269,18 +259,18 @@
|
||||
|
||||
<TextBlock Name="HeadTxBl" Grid.Column="0" Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="HeadTxBx" Grid.Column="1"
|
||||
Style="{DynamicResource OmagCut_LeftKeyboardTextBoxNoBorder}" />
|
||||
Style="{DynamicResource OmagCut_LeftKeyboardTextBoxNoBorder}" />
|
||||
|
||||
<TextBlock Name="ExitTxBl" Grid.Column="2" Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="ExitTxBx" Grid.Column="3"
|
||||
Style="{DynamicResource OmagCut_RightCalculatorTextBoxInBorder}" />
|
||||
Style="{DynamicResource OmagCut_RightCalculatorTextBoxInBorder}" />
|
||||
|
||||
</Grid>
|
||||
|
||||
</Border>
|
||||
|
||||
<GroupBox Name="SpeedGpBx" Grid.Column="0" Grid.Row="6" Grid.ColumnSpan="4" Grid.RowSpan="4"
|
||||
Style="{DynamicResource OmagCut_GroupBox}">
|
||||
Style="{DynamicResource OmagCut_GroupBox}">
|
||||
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
@@ -292,19 +282,19 @@
|
||||
|
||||
<TextBlock Name="SpeedTxBl" Grid.Column="0" Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="SpeedTxBx" Grid.Column="1" IsLength="False"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBoxInGroupBox}" />
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBoxInGroupBox}" />
|
||||
|
||||
<TextBlock Name="MaxSpeedTxBl" Grid.Column="2"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="MaxSpeedTxBx" Grid.Column="3" IsLength="False"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBoxInGroupBox}" />
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBoxInGroupBox}" />
|
||||
|
||||
</Grid>
|
||||
|
||||
</GroupBox>
|
||||
|
||||
<GroupBox Name="FeedGpBx" Grid.Column="0" Grid.Row="10" Grid.ColumnSpan="4" Grid.RowSpan="6"
|
||||
Style="{DynamicResource OmagCut_GroupBox}">
|
||||
Style="{DynamicResource OmagCut_GroupBox}">
|
||||
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
@@ -319,23 +309,23 @@
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<TextBlock Name="FeedTxBl" Grid.Column="0" Grid.Row="0"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="FeedTxBx" Grid.Column="1" Grid.Row="0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBoxInGroupBox}" />
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBoxInGroupBox}" />
|
||||
|
||||
<TextBlock Name="TipFeedTxBl" Grid.Column="2" Grid.Row="0"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="TipFeedTxBx" Grid.Column="3" Grid.Row="0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBoxInGroupBox}" />
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBoxInGroupBox}" />
|
||||
|
||||
<TextBlock Name="StartFeedTxBl" Grid.Column="0" Grid.Row="1"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="StartFeedTxBx" Grid.Column="1" Grid.Row="1"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBoxInGroupBox}" />
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBoxInGroupBox}" />
|
||||
<TextBlock Name="EndFeedTxBl" Grid.Column="2" Grid.Row="1"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="EndFeedTxBx" Grid.Column="3" Grid.Row="1"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBoxInGroupBox}" />
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBoxInGroupBox}" />
|
||||
|
||||
</Grid>
|
||||
|
||||
@@ -346,7 +336,7 @@
|
||||
<ComboBox Name="CoolantCmBx" Grid.Column="1" Grid.Row="16" Grid.RowSpan="3" Style="{StaticResource OmagCut_LeftComboBoxNoBorder}">
|
||||
<ComboBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding}" Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
<TextBlock Text="{Binding}" Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</DataTemplate>
|
||||
</ComboBox.ItemTemplate>
|
||||
</ComboBox>
|
||||
@@ -430,32 +420,11 @@
|
||||
<CheckBox Name="EndLifeChBx" Grid.Column="3" Grid.Row="31" Grid.RowSpan="3"
|
||||
Style="{StaticResource OmagCut_CheckBox_Single}" Margin="0,8,0,0"/>
|
||||
|
||||
<Grid Grid.Column="0" Grid.Row="33" Grid.RowSpan="3" Grid.ColumnSpan="4">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<StackPanel Orientation="Horizontal" HorizontalAlignment="Left">
|
||||
<TextBlock Name="UserNotesTxBl"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="UserNotesTxBx"
|
||||
Grid.RowSpan="3" Grid.ColumnSpan="3" Margin="0,0,15,0"
|
||||
Style="{DynamicResource OmagCut_KeyboardTextBox}"/>
|
||||
</StackPanel>
|
||||
<StackPanel Grid.Column="1" Orientation="Horizontal" HorizontalAlignment="Right" Margin="0,0,12,0">
|
||||
<TextBlock Name="ColorTxBl" Margin="0,0,15,0"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||
|
||||
<Button Name="ColorBtn"
|
||||
Style="{StaticResource Color_Button}" />
|
||||
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
|
||||
|
||||
<TextBlock Name="UserNotesTxBl" Grid.Column="0" Grid.Row="33" Grid.RowSpan="3"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="UserNotesTxBx" Grid.Column="1" Grid.Row="33"
|
||||
Grid.RowSpan="3" Grid.ColumnSpan="3" Margin="0,0,15,0"
|
||||
Style="{DynamicResource OmagCut_KeyboardTextBox}"/>
|
||||
|
||||
</Grid>
|
||||
|
||||
@@ -476,7 +445,7 @@
|
||||
<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>
|
||||
</Grid>
|
||||
|
||||
</Grid>
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
Imports System.Collections.ObjectModel
|
||||
Imports OmagCUT.TreeViewItem
|
||||
Imports System.ComponentModel
|
||||
Imports EgtUILib
|
||||
Imports EgtWPFLib
|
||||
Imports EgtWPFLib5
|
||||
@@ -83,7 +84,6 @@ Public Class ToolsDbPageUC
|
||||
CodeTxBl.Text = EgtMsg(MSG_TOOLSDBPAGEUC + 27) ' Code
|
||||
SupplierTxBl.Text = EgtMsg(MSG_TOOLSDBPAGEUC + 28) ' Supplier
|
||||
EndLifeTxBl.Text = EgtMsg(MSG_TOOLSDBPAGEUC + 29) ' End Life
|
||||
ColorTxBl.Text = EgtMsg(91018) ' Colore lavorazione
|
||||
|
||||
' Associo TextBox e Label
|
||||
Dim TempLabel1 As New Label
|
||||
@@ -122,6 +122,7 @@ Public Class ToolsDbPageUC
|
||||
Dim TempLabel12 As New Label
|
||||
TempLabel12.Content = MaxMatTxBl.Text
|
||||
MaxMatTxBx.Tag = TempLabel12
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub ToolsDbPage_Loaded(sender As Object, e As RoutedEventArgs)
|
||||
@@ -567,15 +568,6 @@ Public Class ToolsDbPageUC
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub ColorBtn_Click(sender As Object, e As RoutedEventArgs) Handles ColorBtn.Click
|
||||
' Il click sul bottone aprirà la finestra ChooseColor che permetterà la scelta del colore
|
||||
m_MainWindow.m_brCurrentColor = ColorBtn.Background
|
||||
Dim ChooseColor As New ChooseColor(m_MainWindow)
|
||||
If ChooseColor.ShowDialog() Then
|
||||
ColorBtn.Background = m_MainWindow.m_brCurrentColor
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Function AlreadyExist(ToolName As String) As Boolean
|
||||
Dim ToolFamily As CathegoryItem
|
||||
For Each ToolFamily In ToolsList
|
||||
@@ -774,50 +766,6 @@ Public Class ToolsDbPageUC
|
||||
EgtTdbGetCurrToolParam(MCH_TP.USERNOTES, ToolString)
|
||||
UserNotesTxBx.Text = ToolString
|
||||
End If
|
||||
' Inizializzo colore di default
|
||||
Dim EgtCol As Color3d = Utility.GetColorPV()
|
||||
ColorBtn.Background = New SolidColorBrush(Color.FromRgb(EgtCol.R, EgtCol.G, EgtCol.B))
|
||||
' Eventualmente verifico se inserito nel setup
|
||||
VerifyToolInSetUp(m_sToolName, TCPosTxBx.Text)
|
||||
End Sub
|
||||
|
||||
Private Sub VerifyToolInSetUp(sNameTool As String, sTCPos As String)
|
||||
' Se configurato cambio utensile lama
|
||||
If m_MainWindow.m_CurrentMachine.MountedToolConfig <> CurrentMachine.MountedToolConfigs.TOOLCHANGERWITHSAW Then Return
|
||||
Dim bFound As Boolean = False
|
||||
Dim sCurrTCPos As String = String.Empty
|
||||
For Each ToolPosition As ToolChangerPos In m_MainWindow.m_CurrentMachine.ToolChanger
|
||||
If ToolPosition.sTool <> String.Empty Then
|
||||
If sNameTool = ToolPosition.sTool Then
|
||||
sCurrTCPos = ToolPosition.sName
|
||||
bFound = True
|
||||
Exit For
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
|
||||
If Not bFound Then
|
||||
TCPosTxBl.Foreground = Brushes.Red
|
||||
If String.IsNullOrEmpty(sTCPos) Then
|
||||
TCPosTxBl.ToolTip = EgtMsg(91019)
|
||||
Else
|
||||
TCPosTxBl.ToolTip = EgtMsg(91020)
|
||||
End If
|
||||
Else
|
||||
If String.IsNullOrEmpty(sTCPos) Then
|
||||
TCPosTxBl.Foreground = Brushes.Gold
|
||||
TCPosTxBl.ToolTip = EgtMsg(91021) & " " & sCurrTCPos
|
||||
Else
|
||||
If sTCPos <> sCurrTCPos Then
|
||||
TCPosTxBl.Foreground = Brushes.Gold
|
||||
TCPosTxBl.ToolTip = EgtMsg(91022) & " " & sCurrTCPos
|
||||
Else
|
||||
TCPosTxBl.Foreground = Brushes.White
|
||||
TCPosTxBl.ToolTip = ""
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub SetToolParams()
|
||||
@@ -873,40 +821,8 @@ Public Class ToolsDbPageUC
|
||||
If Not SetSpecials() Then
|
||||
EgtTdbSetCurrToolParam(MCH_TP.USERNOTES, UserNotesTxBx.Text)
|
||||
End If
|
||||
EgtTdbSetCurrToolValInNotes(MCH_TP.SYSNOTES, "COLOR", ColorToString(ColorBtn.Background.ToString()))
|
||||
End Sub
|
||||
|
||||
Private Function ColorToString(color As String) As String
|
||||
Dim colorCut As Color = HexToRbgNew(color)
|
||||
Return colorCut.R & "," & colorCut.G & "," & colorCut.B
|
||||
End Function
|
||||
|
||||
Public Function HexToRbgNew(ByVal Hex As String) As Color
|
||||
If Hex.StartsWith("#") Then
|
||||
Hex = Hex.Remove(0, 3)
|
||||
End If
|
||||
Dim red As Byte = CByte(HexadecimalToDecimal(Hex.Substring(0, 2)))
|
||||
Dim green As Byte = CByte(HexadecimalToDecimal(Hex.Substring(2, 2)))
|
||||
Dim blue As Byte = CByte(HexadecimalToDecimal(Hex.Substring(4, 2)))
|
||||
Return Color.FromArgb(255, red, green, blue)
|
||||
End Function
|
||||
|
||||
Private Shared Function HexadecimalToDecimal(hex As String) As Integer
|
||||
hex = hex.ToUpper()
|
||||
Dim hexLength As Integer = hex.Length
|
||||
Dim dec As Double = 0
|
||||
For i As Integer = 0 To hexLength - 1
|
||||
Dim b As Byte = CByte(AscW(hex(i)))
|
||||
If b >= 48 AndAlso b <= 57 Then
|
||||
b -= 48
|
||||
ElseIf b >= 65 AndAlso b <= 70 Then
|
||||
b -= 55
|
||||
End If
|
||||
dec += b * Math.Pow(16, ((hexLength - i) - 1))
|
||||
Next
|
||||
Return CInt(Math.Truncate(dec))
|
||||
End Function
|
||||
|
||||
Private Sub ViewToolParams()
|
||||
NameTxBl.Visibility = Windows.Visibility.Visible
|
||||
NameTxBx.Visibility = Windows.Visibility.Visible
|
||||
@@ -947,9 +863,6 @@ Public Class ToolsDbPageUC
|
||||
SupplierTxBx.Visibility = If(bShowSpecials, Windows.Visibility.Visible, Windows.Visibility.Hidden)
|
||||
EndLifeTxBl.Visibility = If(bShowSpecials, Windows.Visibility.Visible, Windows.Visibility.Hidden)
|
||||
EndLifeChBx.Visibility = If(bShowSpecials, Windows.Visibility.Visible, Windows.Visibility.Hidden)
|
||||
|
||||
ColorTxBl.Visibility = If(m_MainWindow.m_CurrentMachine.MountedToolConfig = CurrentMachine.MountedToolConfigs.TOOLCHANGERWITHSAW, Visibility.Visible, Visibility.Hidden)
|
||||
ColorBtn.Visibility = If(m_MainWindow.m_CurrentMachine.MountedToolConfig = CurrentMachine.MountedToolConfigs.TOOLCHANGERWITHSAW, Visibility.Visible, Visibility.Hidden)
|
||||
End Sub
|
||||
|
||||
Private Sub HideToolParams()
|
||||
@@ -977,9 +890,6 @@ Public Class ToolsDbPageUC
|
||||
SupplierTxBx.Visibility = Windows.Visibility.Hidden
|
||||
EndLifeTxBl.Visibility = Windows.Visibility.Hidden
|
||||
EndLifeChBx.Visibility = Windows.Visibility.Hidden
|
||||
|
||||
ColorTxBl.Visibility = Visibility.Hidden
|
||||
ColorBtn.Visibility = Visibility.Hidden
|
||||
End Sub
|
||||
|
||||
Private Sub ToolTreeView_PreviewMouseUp(sender As Object, e As MouseButtonEventArgs) Handles ToolTreeView.PreviewMouseUp
|
||||
@@ -1428,8 +1338,4 @@ Public Class ToolsDbPageUC
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub TCPosTxBx_EgtClosed(sender As Object, e As EventArgs) Handles TCPosTxBx.EgtClosed
|
||||
VerifyToolInSetUp(m_sToolName, TCPosTxBx.Text)
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
@@ -8,292 +8,266 @@
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="768" d:DesignWidth="1280" Initialized="WaterJetPage_Initialized">
|
||||
|
||||
<!-- Definizione della PolishingsPage -->
|
||||
<Border Style="{DynamicResource OmagCut_PageBorder}">
|
||||
<!-- 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>
|
||||
<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"
|
||||
<!--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>
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="7*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<!--Lista dei materiali-->
|
||||
<ListBox Name="MaterialsLstBx"
|
||||
<!--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"
|
||||
<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"
|
||||
<!--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"
|
||||
<Button Name="DeleteMaterialBtn" Grid.Column="1"
|
||||
Content="{Binding Delete_Msg}"
|
||||
Command="{Binding DeleteMaterialCommand}"
|
||||
Style="{DynamicResource OmagCut_WjDbRightGrayGradientYellowTextButton}"/>
|
||||
<Button Name="ModifyMaterialBtn" Grid.Column="1"
|
||||
<Button Name="ModifyMaterialBtn" Grid.Column="1"
|
||||
Content="{Binding Modify_Msg}"
|
||||
Command="{Binding ModifyMaterialCommand}"
|
||||
Style="{DynamicResource OmagCut_WjDbRightGrayGradientYellowTextButton}"/>
|
||||
</UniformGrid>
|
||||
</UniformGrid>
|
||||
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
||||
</GroupBox>
|
||||
</GroupBox>
|
||||
|
||||
<!--Raggruppo all'interno della stessa cornice le sottocatogorie e i parametri-->
|
||||
<Border Style="{DynamicResource OmagCut_Border}"
|
||||
<!--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>
|
||||
<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}"
|
||||
<!--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>
|
||||
<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}"
|
||||
<!--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>
|
||||
<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"
|
||||
<!--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"
|
||||
<!--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"
|
||||
<Button Name="RemoveSubMaterialBtn" Grid.Column="1"
|
||||
Content="{Binding Delete_Msg}"
|
||||
Command="{Binding DeleteSubMaterialCommand}"
|
||||
Style="{DynamicResource OmagCut_WjDbRightGrayGradientYellowTextButton}"/>
|
||||
<Button Name="ModifySubMaterialBtn" Grid.Column="1"
|
||||
<Button Name="ModifySubMaterialBtn" Grid.Column="1"
|
||||
Content="{Binding Modify_Msg}"
|
||||
Command="{Binding ModifySubMaterialCommand}"
|
||||
Style="{DynamicResource OmagCut_WjDbRightGrayGradientYellowTextButton}"/>
|
||||
</UniformGrid>
|
||||
</UniformGrid>
|
||||
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
||||
</GroupBox>
|
||||
</GroupBox>
|
||||
|
||||
<!--Lista dei parametri associata alla sottovcategoria dei materiali-->
|
||||
<GroupBox Name="ParamsGpBx"
|
||||
<!--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*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<!--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*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<TextBlock Text="{Binding Thickness_Msg}" Grid.Column="0" HorizontalAlignment="Center"
|
||||
<TextBlock Text="{Binding Thickness_Msg}" Grid.Column="0" HorizontalAlignment="Center"
|
||||
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"
|
||||
Foreground="{StaticResource Omag_White}"
|
||||
FontSize="{DynamicResource FontSize_GroupBoxHeaderWJ}"/>
|
||||
|
||||
<Border Grid.Column="1" Margin="1,0,-1,-1"
|
||||
Background="{StaticResource Omag_Blue}">
|
||||
<TextBlock Text="{Binding Flux_Msg}" Grid.Column="1" HorizontalAlignment="Center"
|
||||
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"
|
||||
Foreground="{StaticResource Omag_White}"
|
||||
FontSize="{DynamicResource FontSize_GroupBoxHeaderWJ}"/>
|
||||
</Border>
|
||||
|
||||
<TextBlock Text="{Binding Q1_Msg}" Grid.Column="2" HorizontalAlignment="Center"
|
||||
FontSize="{DynamicResource FontSize_GroupBoxHeader}"/>
|
||||
<TextBlock Text="{Binding Q1_Msg}" Grid.Column="1" HorizontalAlignment="Center"
|
||||
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"
|
||||
Foreground="{StaticResource Omag_White}"
|
||||
FontSize="{DynamicResource FontSize_GroupBoxHeaderWJ}"/>
|
||||
<TextBlock Text="{Binding Q2_Msg}" Grid.Column="3" HorizontalAlignment="Center"
|
||||
FontSize="{DynamicResource FontSize_GroupBoxHeader}"/>
|
||||
<TextBlock Text="{Binding Q2_Msg}" Grid.Column="2" HorizontalAlignment="Center"
|
||||
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"
|
||||
Foreground="{StaticResource Omag_White}"
|
||||
FontSize="{DynamicResource FontSize_GroupBoxHeaderWJ}"/>
|
||||
<TextBlock Text="{Binding Q3_Msg}" Grid.Column="4" HorizontalAlignment="Center"
|
||||
FontSize="{DynamicResource FontSize_GroupBoxHeader}"/>
|
||||
<TextBlock Text="{Binding Q3_Msg}" Grid.Column="3" HorizontalAlignment="Center"
|
||||
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"
|
||||
Foreground="{StaticResource Omag_White}"
|
||||
FontSize="{DynamicResource FontSize_GroupBoxHeaderWJ}"/>
|
||||
<TextBlock Text="{Binding Q4_Msg}" Grid.Column="5" HorizontalAlignment="Center"
|
||||
FontSize="{DynamicResource FontSize_GroupBoxHeader}"/>
|
||||
<TextBlock Text="{Binding Q4_Msg}" Grid.Column="4" HorizontalAlignment="Center"
|
||||
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"
|
||||
Foreground="{StaticResource Omag_White}"
|
||||
FontSize="{DynamicResource FontSize_GroupBoxHeaderWJ}"/>
|
||||
<TextBlock Text="{Binding Q5_Msg}" Grid.Column="6" HorizontalAlignment="Center"
|
||||
FontSize="{DynamicResource FontSize_GroupBoxHeader}"/>
|
||||
<TextBlock Text="{Binding Q5_Msg}" Grid.Column="5" HorizontalAlignment="Center"
|
||||
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"
|
||||
Foreground="{StaticResource Omag_White}"
|
||||
FontSize="{DynamicResource FontSize_GroupBoxHeaderWJ}"/>
|
||||
<TextBlock Text="{Binding QExtra_Msg}" Grid.Column="7" HorizontalAlignment="Center"
|
||||
FontSize="{DynamicResource FontSize_GroupBoxHeader}"/>
|
||||
<TextBlock Text="{Binding QExtra_Msg}" Grid.Column="6" HorizontalAlignment="Center"
|
||||
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"
|
||||
Foreground="{StaticResource Omag_White}"
|
||||
FontSize="{DynamicResource FontSize_GroupBoxHeaderWJ}"/>
|
||||
<TextBlock Text="{Binding AngComp_Msg}" Grid.Column="8" HorizontalAlignment="Center"
|
||||
FontSize="{DynamicResource FontSize_GroupBoxHeader}"/>
|
||||
<TextBlock Text="{Binding AngComp_Msg}" Grid.Column="7" HorizontalAlignment="Center"
|
||||
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"
|
||||
Foreground="{StaticResource Omag_White}"
|
||||
FontSize="{DynamicResource FontSize_GroupBoxHeaderWJ}"/>
|
||||
</Grid>
|
||||
FontSize="{DynamicResource FontSize_GroupBoxHeader}"/>
|
||||
</Grid>
|
||||
|
||||
</GroupBox.Header>
|
||||
</GroupBox.Header>
|
||||
|
||||
<!--Definizione della Grid dei parametri delle lavorazioni-->
|
||||
<Grid Grid.Column="2">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="308*"/>
|
||||
<ColumnDefinition Width="73*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="7*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<!--Definizione della Grid dei parametri delle lavorazioni-->
|
||||
<Grid Grid.Column="2">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="308*"/>
|
||||
<ColumnDefinition Width="73*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="7*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<ListBox Name="ParamLstBx"
|
||||
<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" Grid.ColumnSpan="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*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<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*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<EgtWPFLib:EgtTextBox Text="{Binding Thickness}" Grid.Column="0"
|
||||
<EgtWPFLib:EgtTextBox Text="{Binding Thickness}" Grid.Column="0"
|
||||
Style="{DynamicResource OmagCut_CalculatorParamWjTextBox}" />
|
||||
<Border Grid.Column="1" Margin="0,-5,0,-5"
|
||||
Background="Transparent"
|
||||
BorderBrush="{StaticResource Omag_Blue}" BorderThickness="3, 4, 3, 4">
|
||||
<EgtWPFLib:EgtTextBox Text="{Binding Flux}" Grid.Column="1"
|
||||
Margin="-2,0,-2,0"
|
||||
<EgtWPFLib:EgtTextBox Text="{Binding Q1}" Grid.Column="1"
|
||||
Style="{DynamicResource OmagCut_CalculatorParamWjTextBox}" />
|
||||
</Border>
|
||||
<EgtWPFLib:EgtTextBox Text="{Binding Q1}" Grid.Column="2"
|
||||
<EgtWPFLib:EgtTextBox Text="{Binding Q2}" Grid.Column="2"
|
||||
Style="{DynamicResource OmagCut_CalculatorParamWjTextBox}" />
|
||||
<EgtWPFLib:EgtTextBox Text="{Binding Q2}" Grid.Column="3"
|
||||
<EgtWPFLib:EgtTextBox Text="{Binding Q3}" Grid.Column="3"
|
||||
Style="{DynamicResource OmagCut_CalculatorParamWjTextBox}" />
|
||||
<EgtWPFLib:EgtTextBox Text="{Binding Q3}" Grid.Column="4"
|
||||
<EgtWPFLib:EgtTextBox Text="{Binding Q4}" Grid.Column="4"
|
||||
Style="{DynamicResource OmagCut_CalculatorParamWjTextBox}" />
|
||||
<EgtWPFLib:EgtTextBox Text="{Binding Q4}" Grid.Column="5"
|
||||
<EgtWPFLib:EgtTextBox Text="{Binding Q5}" Grid.Column="5"
|
||||
Style="{DynamicResource OmagCut_CalculatorParamWjTextBox}" />
|
||||
<EgtWPFLib:EgtTextBox Text="{Binding Q5}" Grid.Column="6"
|
||||
<EgtWPFLib:EgtTextBox Text="{Binding QExtra}" Grid.Column="6"
|
||||
Style="{DynamicResource OmagCut_CalculatorParamWjTextBox}" />
|
||||
<EgtWPFLib:EgtTextBox Text="{Binding QExtra}" Grid.Column="7"
|
||||
<EgtWPFLib:EgtTextBox Text="{Binding dAngComp}" Grid.Column="7" IsLength="False"
|
||||
Style="{DynamicResource OmagCut_CalculatorParamWjTextBox}" />
|
||||
<EgtWPFLib:EgtTextBox Text="{Binding dAngComp}" Grid.Column="8" IsLength="False"
|
||||
Style="{DynamicResource OmagCut_CalculatorParamWjTextBox}" />
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</ListBox.ItemTemplate>
|
||||
</ListBox>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</ListBox.ItemTemplate>
|
||||
</ListBox>
|
||||
|
||||
<UniformGrid Grid.Row="2" Columns="9" Grid.ColumnSpan="2">
|
||||
<Button Name="NewParamBtn" Grid.Column="0"
|
||||
<UniformGrid Grid.Row="2" Columns="9" Grid.ColumnSpan="2">
|
||||
<Button Name="NewParamBtn" Grid.Column="0"
|
||||
Command="{Binding NewWjParamCommand}"
|
||||
Content="{Binding New_Msg}"
|
||||
Style="{DynamicResource OmagCut_WjDbRightGrayGradientYellowTextButton}"/>
|
||||
<Button Name="RemoveParamBtn" Grid.Column="1"
|
||||
<Button Name="RemoveParamBtn" Grid.Column="1"
|
||||
Command="{Binding DeleteWjParamCommand}"
|
||||
Content="{Binding Delete_Msg}"
|
||||
Style="{DynamicResource OmagCut_WjDbRightGrayGradientYellowTextButton}"/>
|
||||
</UniformGrid>
|
||||
</UniformGrid>
|
||||
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
||||
</GroupBox>
|
||||
</GroupBox>
|
||||
|
||||
</Grid>
|
||||
</Border>
|
||||
<Button Name="SaveKitBtn" Grid.Row="2" Grid.Column="2"
|
||||
</Grid>
|
||||
</Border>
|
||||
<Button Name="SaveKitBtn" Grid.Row="2" Grid.Column="2"
|
||||
Command="{Binding SaveCommand}"
|
||||
Content="{Binding Save_Msg}"
|
||||
Style="{DynamicResource OmagCut_RightGrayGradientYellowTextButton}"/>
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
||||
</Border>
|
||||
</Border>
|
||||
|
||||
</UserControl>
|
||||
@@ -405,13 +405,7 @@ Public Class WaterjetDbWindowVM
|
||||
|
||||
Public ReadOnly Property Thickness_Msg As String
|
||||
Get
|
||||
Return "Spess."
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property Flux_Msg As String
|
||||
Get
|
||||
Return "mg/min"
|
||||
Return "Spessore"
|
||||
End Get
|
||||
End Property
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Border Name="LogoBrd" Background="Transparent">
|
||||
<Image Source="../Resources/NewIcons/logo-OmCut.png" Stretch="Uniform" Margin="1"/>
|
||||
<Image Source="{DynamicResource LogoOmagImg}" Stretch="Uniform" Margin="1"/>
|
||||
</Border>
|
||||
|
||||
<!-- ** Definizione della Grid delle tab ** -->
|
||||
|
||||
@@ -26,8 +26,6 @@ Class MainWindow
|
||||
' Variabile che definisce l'avvio forzato in modalità FRAME
|
||||
Friend m_OnlyFrame As Boolean = False
|
||||
|
||||
Public Shared m_bShowSVGParkInd As Boolean = False
|
||||
|
||||
' Dichiarazione delle Page UserControl
|
||||
Friend m_WorkInProgressPageUC As WorkInProgressPageUC
|
||||
Friend m_CurrentProjectPageUC As CurrentProjectPageUC
|
||||
@@ -149,19 +147,6 @@ Class MainWindow
|
||||
Options
|
||||
End Enum
|
||||
|
||||
' Elenco delle operazioni tagli diretti (decoficiato in CamAuto per riconoscere il tipo taglio diretto)
|
||||
Friend Enum FlagDirectCuts
|
||||
ManualMove = 1
|
||||
SingleCut = 2
|
||||
GridCut = 3
|
||||
SingleDrill = 4
|
||||
Flattening = 5
|
||||
Squaring = 6
|
||||
SawTest = 7
|
||||
Polishing = 8
|
||||
CopyTemplate = 9
|
||||
End Enum
|
||||
|
||||
Public Function GetExeRootDir() As String
|
||||
Return m_sExeRoot
|
||||
End Function
|
||||
@@ -358,8 +343,8 @@ Class MainWindow
|
||||
' Verifico abilitazione nesting automatico
|
||||
m_bAutoNest = Not String.IsNullOrWhiteSpace(sNestKey)
|
||||
' Recupero opzioni della chiave
|
||||
Dim bKey As Boolean = EgtGetKeyLevel(9423, 2705, 1, m_nKeyLevel) And
|
||||
EgtGetKeyOptions(9423, 2705, 1, m_nKeyOptions)
|
||||
Dim bKey As Boolean = EgtGetKeyLevel(9423, 2607, 1, m_nKeyLevel) And
|
||||
EgtGetKeyOptions(9423, 2607, 1, m_nKeyOptions)
|
||||
' Verifico abilitazione prodotto
|
||||
Dim bProd As Boolean = GetKeyOption(KEY_OPT.CUT_BASE)
|
||||
' Impostazione per programma OnlyFrame: solo se CUT_BASE non attivo
|
||||
@@ -671,36 +656,26 @@ Class MainWindow
|
||||
|
||||
Dim sAssStatus As String = " discontinued"
|
||||
Dim nAssLeftDays As Integer
|
||||
' MESSAGGIO...
|
||||
If EgtGetKeyAssLeftDays(nAssLeftDays) And nAssLeftDays >= 0 Then
|
||||
If nAssLeftDays > 0 Then
|
||||
If nAssLeftDays > 30 Then
|
||||
sAssStatus = "expires within " & nAssLeftDays.ToString() & " days"
|
||||
'sAssStatus = "to be renewed within " & nAssLeftDays.ToString() & " days"
|
||||
ElseIf nAssLeftDays > 0 Then
|
||||
sAssStatus = "to be renewed within " & nAssLeftDays.ToString() & " days"
|
||||
Else
|
||||
sAssStatus = "Expired"
|
||||
sAssStatus = "to be renewed by today"
|
||||
End If
|
||||
End If
|
||||
|
||||
Dim bShowInfoAssistance As Boolean = True
|
||||
bShowInfoAssistance = (GetPrivateProfileInt(S_GENERAL, K_SHOWEXPIREASSITANCE, "1", GetIniFile) <> 0)
|
||||
' Or nAssLeftDays = 358
|
||||
If bShowInfoAssistance And ((nAssLeftDays <= 7 And nAssLeftDays >= 0) Or nAssLeftDays = 14 Or nAssLeftDays = 21 Or nAssLeftDays = 28) Then
|
||||
' 91145=Avviso importante
|
||||
Dim sMsg_Title As String = EgtMsg(91145)
|
||||
' 91146=Il contratto di aggiornamento della licenza in uso scadrà tra {0} giorni./n
|
||||
Dim sMsg_AssStatus As String = String.Format(EgtMsg(91146), nAssLeftDays.ToString())
|
||||
' 91147=Se desiderate rimanere aggiornati e continuare ad usufruire dei benefici del servizio, vi invitiamo a contattare la nostra assistenza al seguente indirizzo:/n
|
||||
Dim sMsg_RefAssistance As String = EgtMsg(91147)
|
||||
If (nAssLeftDays <= 7 And nAssLeftDays >= 0) Or nAssLeftDays = 14 Or nAssLeftDays = 21 Or nAssLeftDays = 28 Then
|
||||
Dim sMsg As String = EgtMsg(91141) ' Assistenza in scadenza /nContattare assistenza:/n
|
||||
Dim sAssistance As String = String.Empty
|
||||
GetPrivateProfileString(S_GENERAL, "Assistances", "", sAssistance, GetIniFile)
|
||||
Dim sItems As String() = sAssistance.Split(","c)
|
||||
For Each Item As String In sItems
|
||||
sMsg_RefAssistance &= " → " & Item.Trim & " /n"
|
||||
sMsg &= " → " & Item.Trim & " /n"
|
||||
Next
|
||||
' 91148=Grazie per la vostra collaborazione.
|
||||
Dim sMsg_ThankYou As String = EgtMsg(91148)
|
||||
Dim MyLicWn As New LicenseWindow(Me, sMsg_AssStatus & sMsg_RefAssistance & sMsg_ThankYou, sMsg_Title)
|
||||
MyLicWn.WindowStartupLocation = WindowStartupLocation.CenterOwner
|
||||
Dim MyLicWn As New LicenseWindow(Me, sMsg, "Assistance " & sAssStatus)
|
||||
MyLicWn.Show()
|
||||
End If
|
||||
|
||||
@@ -1231,17 +1206,13 @@ Class MainWindow
|
||||
m_DirectCutPageUC.m_ControlsDirectCutUC.m_GridCut.GridCut_Unloaded(sender, e)
|
||||
Case ControlsDirectCutUC.DirectCutPages.FlatteningCut
|
||||
m_DirectCutPageUC.m_ControlsDirectCutUC.m_FlatteningCut.FlatteningCut_Unloaded(sender, e)
|
||||
End Select
|
||||
|
||||
Select Case m_DirectCutPageUC.m_ControlsDirectCutUC1.m_ActiveDirectCutPage
|
||||
Case ControlsDirectCutUC.DirectCutPages.CopyTemplate
|
||||
m_DirectCutPageUC.m_ControlsDirectCutUC1.m_CopyTemplate.CopyTemplate_Unloaded(sender, e)
|
||||
Case ControlsDirectCutUC.DirectCutPages.Polishing
|
||||
m_DirectCutPageUC.m_ControlsDirectCutUC1.m_Polishing.Polishing_Unloaded(sender, e)
|
||||
Case ControlsDirectCutUC1.DirectCutPages.SawTest
|
||||
Case ControlsDirectCutUC.DirectCutPages.SawTest
|
||||
m_DirectCutPageUC.m_ControlsDirectCutUC1.m_SawTest.SawTest_Unloaded(sender, e)
|
||||
End Select
|
||||
|
||||
Return True
|
||||
End Function
|
||||
|
||||
@@ -1356,7 +1327,7 @@ Class MainWindow
|
||||
If m_OnlyFrame Then
|
||||
If nPrjType = CurrentProjectPageUC.PRJ_TYPE.FLATS And
|
||||
m_ActivePage <> Pages.RawPart And m_ActivePage <> Pages.DirectCut And m_ActivePage <> Pages.Simulation Then
|
||||
Dim FrameWnd As New EgtMsgBox(Me, EgtMsg(91141), EgtMsg(91142), EgtMsgBox.Buttons.OK, EgtMsgBox.Icons.NULL)
|
||||
Dim FrameWnd As New EgtMsgBox(Me, EgtMsg(91142), EgtMsg(91143), EgtMsgBox.Buttons.OK, EgtMsgBox.Icons.NULL)
|
||||
'' Gestione stato FastGrid
|
||||
'm_CadCutPageUC.m_FastGridSlabManager.OnPreNewProject()
|
||||
' Cancello progetto salvato con nome da file ini
|
||||
|
||||
@@ -22,7 +22,7 @@ Imports System.Windows
|
||||
#End If
|
||||
<Assembly: AssemblyCompany("Egalware s.r.l.")>
|
||||
<Assembly: AssemblyProduct("OmagCUT")>
|
||||
<Assembly: AssemblyCopyright("Copyright © 2015-2025 by Egalware s.r.l.")>
|
||||
<Assembly: AssemblyCopyright("Copyright © 2015-2024 by Egalware 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.7.6.1")>
|
||||
<Assembly: AssemblyFileVersion("2.7.6.1")>
|
||||
<Assembly: AssemblyVersion("2.6.7.7")>
|
||||
<Assembly: AssemblyFileVersion("2.6.7.7")>
|
||||
|
||||
@@ -389,9 +389,6 @@ Public Class CNCommunication
|
||||
m_CN.SetCnDataVar(CN_generico.CnData.VacuumOff, sVal)
|
||||
GetPrivateProfileString(S_NCDATA, K_BYPASSTATE, "", sVal, m_MainWindow.GetMachIniFile())
|
||||
m_CN.SetCnDataVar(CN_generico.CnData.BypassState, sVal)
|
||||
' ver 2.6i1 : nuova gestione SiemensONE
|
||||
GetPrivateProfileString(S_NCDATA, K_RESETSTATUS, "", sVal, m_MainWindow.GetMachIniFile())
|
||||
m_CN.SetCnDataVar(CN_generico.CnData.ResetStatus, sVal)
|
||||
|
||||
' nuove variabili: stato dei nuovi pulsanti
|
||||
nVal = GetPrivateProfileInt(S_NCDATA, K_NEWCONSOLE, 0, m_MainWindow.GetMachIniFile())
|
||||
@@ -413,10 +410,6 @@ Public Class CNCommunication
|
||||
GetPrivateProfileString(S_NCDATA, K_NAXES, "", sVal, m_MainWindow.GetMachIniFile())
|
||||
m_CN.SetCnDataVar(CN_generico.CnData.nAxes, sVal)
|
||||
|
||||
' Solo per controllo speciale NUM 22/01/2025
|
||||
GetPrivateProfileString(S_NCDATA, K_CPOS, "", sVal, m_MainWindow.GetMachIniFile())
|
||||
m_CN.SetCnDataVar(CN_generico.CnData.CPos, sVal)
|
||||
If Not String.IsNullOrEmpty(sVal) Then m_CN.bCPos = True
|
||||
|
||||
' Inizializzo la comunicazione
|
||||
m_CN.Init()
|
||||
@@ -492,12 +485,7 @@ Public Class CNCommunication
|
||||
End If
|
||||
nVarType = VarType.TBoolean
|
||||
m_CN.DVariables_Read_Subscription(sItem(1), nVarType, nIndexArrayBool)
|
||||
Dim NewRefFlafSiemens As RefereceFlagSimens = New RefereceFlagSimens(nIndexArrayBool, ItemIndex, nVarType)
|
||||
If sItem.Count = 3 Then
|
||||
' forzo la lettura della variabile di default (ignoro lo stato letto da CN)
|
||||
NewRefFlafSiemens.DefaultValue = sItem(2)
|
||||
End If
|
||||
ListReferenceIndex.Add(NewRefFlafSiemens)
|
||||
ListReferenceIndex.Add(New RefereceFlagSimens(nIndexArrayBool, ItemIndex, nVarType))
|
||||
nIndexArrayBool += 1
|
||||
Case 1
|
||||
If nIndexArrayInt > 14 Then
|
||||
@@ -552,12 +540,7 @@ Public Class CNCommunication
|
||||
Next
|
||||
nVarType = VarType.TInteger
|
||||
m_CN.DVariables_Read_Subscription(sVarName, nVarType, nIndexArrayInt_1)
|
||||
Dim NewRefFlafSiemens As RefereceFlagSimens = New RefereceFlagSimens(nIndexArrayInt_1, ItemIndex, nVarType, sIndexBit)
|
||||
If sItem.Count = 3 Then
|
||||
' forzo la lettura della variabile di default (ignoro lo stato letto da CN)
|
||||
NewRefFlafSiemens.DefaultValue = sItem(2)
|
||||
End If
|
||||
ListReferenceIndex.Add(NewRefFlafSiemens)
|
||||
ListReferenceIndex.Add(New RefereceFlagSimens(nIndexArrayInt_1, ItemIndex, nVarType, sIndexBit))
|
||||
If Not bFound Then
|
||||
nIndexArrayInt += 1
|
||||
ListIndexToVar.Add(New IndexArrayToBit(nIndexArrayInt_1, sVarName.Trim))
|
||||
@@ -1231,7 +1214,6 @@ Public Class CNCommunication
|
||||
Dim nFlag As Integer = ListReferenceIndex(IndxLst).FlagIndex
|
||||
Dim nIndex As Integer = ListReferenceIndex(IndxLst).SiemnesArrayIndex
|
||||
Dim nIndexBit As Integer = ListReferenceIndex(IndxLst).IndexBit
|
||||
Dim sDefaultValue As String = ListReferenceIndex(IndxLst).DefaultValue
|
||||
Dim b_temp As Boolean = False
|
||||
Dim n_temp As Integer = 0
|
||||
Dim l_temp As Long = 0.0
|
||||
@@ -1239,31 +1221,11 @@ Public Class CNCommunication
|
||||
' leggo il valore caricato
|
||||
Select Case nType
|
||||
Case VarType.TBoolean
|
||||
If Not String.IsNullOrEmpty(sDefaultValue) Then
|
||||
' ver 2.6i1
|
||||
Try
|
||||
b_temp = CBool(sDefaultValue)
|
||||
Catch ex As Exception
|
||||
EgtOutLog("Default boolean value of flag " & nFlag.ToString & " is not Boolean, verify the form: True or true or 1, False or false or 0")
|
||||
b_temp = m_CN.b_data(nIndex)
|
||||
End Try
|
||||
Else
|
||||
b_temp = m_CN.b_data(nIndex)
|
||||
End If
|
||||
b_temp = m_CN.b_data(nIndex)
|
||||
Case VarType.TInteger
|
||||
n_temp = m_CN.n_data(nIndex)
|
||||
' VENTOSE: lettura dato da intero Bit a Bit (ver_2.6h1), ritorno un Boolean
|
||||
If Not String.IsNullOrEmpty(sDefaultValue) Then
|
||||
' ver 2.6i1
|
||||
Try
|
||||
b_temp = CBool(sDefaultValue)
|
||||
Catch ex As Exception
|
||||
EgtOutLog("Default bit value of flag " & nFlag.ToString & " is not Boolean, verify the form: True or true or 1, False or false or 0")
|
||||
b_temp = ReadBit(nIndexBit, n_temp)
|
||||
End Try
|
||||
Else
|
||||
b_temp = ReadBit(nIndexBit, n_temp)
|
||||
End If
|
||||
b_temp = ReadBit(nIndexBit, n_temp)
|
||||
Case VarType.TLong
|
||||
l_temp = m_CN.l_data(nIndex)
|
||||
Case VarType.TDouble
|
||||
@@ -1381,8 +1343,6 @@ Public Class CNCommunication
|
||||
Case CN_generico.CnData.nAxes ' (55)
|
||||
m_CN.n_index_is_G24_active = nIndex
|
||||
m_CN.b5AxesState = b_temp
|
||||
Case CN_generico.CnData.ResetStatus ' (56)
|
||||
m_CN.bResetState = b_temp
|
||||
|
||||
End Select
|
||||
Next
|
||||
@@ -1604,17 +1564,9 @@ Public Class CNCommunication
|
||||
Return bOk
|
||||
End Function
|
||||
|
||||
Private Sub GetSpecialCAxes()
|
||||
If m_CN.bCPos Then
|
||||
m_CN.d_axis_position(m_nA4) = m_CN.dCPos
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Friend Function GetAxesPositions(ByRef dA1 As Double, ByRef dA2 As Double, ByRef dA3 As Double,
|
||||
ByRef dA4 As Double, ByRef dA5 As Double, ByRef dA6 As Double,
|
||||
ByRef dA7 As Double, ByRef dA8 As Double, ByRef dA9 As Double, ByRef dA10 As Double) As Boolean
|
||||
' gestione speciale asse C
|
||||
GetSpecialCAxes()
|
||||
dA1 = If(m_nA1 >= 0, m_CN.d_axis_position(m_nA1), 0)
|
||||
dA2 = If(m_nA2 >= 0, m_CN.d_axis_position(m_nA2), 0)
|
||||
dA3 = If(m_nA3 >= 0, m_CN.d_axis_position(m_nA3), 0)
|
||||
@@ -1631,8 +1583,6 @@ Public Class CNCommunication
|
||||
|
||||
Friend Function GetAxesPositions(ByRef dA1 As Double, ByRef dA2 As Double, ByRef dA3 As Double,
|
||||
ByRef dA4 As Double, ByRef dA5 As Double) As Boolean
|
||||
' gestione speciale asse C
|
||||
GetSpecialCAxes()
|
||||
dA1 = If(m_nA1 >= 0, m_CN.d_axis_position(m_nA1), 0)
|
||||
dA2 = If(m_nA2 >= 0, m_CN.d_axis_position(m_nA2), 0)
|
||||
dA3 = If(m_nA3 >= 0, m_CN.d_axis_position(m_nA3), 0)
|
||||
@@ -1651,8 +1601,6 @@ Public Class CNCommunication
|
||||
End Function
|
||||
|
||||
Friend Function GetRotaryAxesPositions(ByRef dR1 As Double, ByRef dR2 As Double) As Boolean
|
||||
' gestione speciale asse C
|
||||
GetSpecialCAxes()
|
||||
dR1 = If(m_nA4 >= 0, m_CN.d_axis_position(m_nA4), 0)
|
||||
dR2 = If(m_nA5 >= 0, m_CN.d_axis_position(m_nA5), 0)
|
||||
Return m_bAxesOk
|
||||
@@ -1725,7 +1673,6 @@ Public Class RefereceFlagSimens
|
||||
Private m_TypeArray As Integer
|
||||
' Opzionale
|
||||
Private m_IndexBit As Integer = -1
|
||||
Private m_DefaultValue As String = ""
|
||||
|
||||
Public Property SiemnesArrayIndex As Integer
|
||||
Get
|
||||
@@ -1763,15 +1710,6 @@ Public Class RefereceFlagSimens
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property DefaultValue As String
|
||||
Get
|
||||
Return m_DefaultValue
|
||||
End Get
|
||||
Set(value As String)
|
||||
m_DefaultValue = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Sub New(IndArray As Integer, Flag As Integer, nType As Integer)
|
||||
m_SiemnesArrayIndex = IndArray
|
||||
m_FlagIndex = Flag
|
||||
|
||||
@@ -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 = 58 ' Numero di dati del CN (Speed,Feed,...)
|
||||
Public Const NUM_DATA = 56 ' Numero di dati del CN (Speed,Feed,...)
|
||||
|
||||
Public m_NewVariable As Boolean = False ' per scrittura delle vairbaili Apllication del PLC
|
||||
|
||||
@@ -72,10 +72,6 @@ Public MustInherit Class CN_generico
|
||||
EnablePC = 54
|
||||
|
||||
nAxes = 55
|
||||
|
||||
ResetStatus = 56
|
||||
|
||||
CPos = 57
|
||||
End Enum
|
||||
|
||||
Public Enum Type As Short
|
||||
@@ -235,10 +231,6 @@ Public MustInherit Class CN_generico
|
||||
Public bRemote As Boolean
|
||||
' Nuovi di bottoni -------------------------------------------
|
||||
|
||||
' gestione speciale asse C
|
||||
Public bCPos As Boolean = False
|
||||
Public dCPos As Double
|
||||
|
||||
' solo per NumOld
|
||||
Public bIsDripFeed As Boolean = False
|
||||
|
||||
|
||||
@@ -53,14 +53,14 @@ Namespace Num
|
||||
Dim WithEvents objDRunTimeSystem As FXServer.DRunTimeSystem
|
||||
Dim WithEvents objDGroupManager As FXServer.DGroupManager
|
||||
Dim WithEvents objDReadELS As FXServer.DReadELS
|
||||
' questa � classe che serve a scrivere i dati nel PLC
|
||||
' questa è classe che serve a scrivere i dati nel PLC
|
||||
Dim WithEvents objDPlcVariables As FXServer.DPlcVariables
|
||||
' questa � la classe che serve a scrivere i dati nelle variabili E
|
||||
' questa è la classe che serve a scrivere i dati nelle variabili E
|
||||
Dim WithEvents objDVariables As FXServer.DVariables
|
||||
Dim WithEvents objDReadTestExectime As FXServer.DReadTestExectime
|
||||
Dim WithEvents objDPosition As FXServer.DPosition
|
||||
Dim WithEvents objDNCKParameter As FXServer.DNCKParameter
|
||||
' questa � la classe che serve a scrivere i comandi MDI (come ad esempio le funzioni M)
|
||||
' questa è la classe che serve a scrivere i comandi MDI (come ad esempio le funzioni M)
|
||||
Dim WithEvents objDMdiCommand As FXServer.DMdiCommand
|
||||
Dim WithEvents objDMainCncData As FXServer.DMainCncData
|
||||
|
||||
@@ -458,7 +458,7 @@ Namespace Num
|
||||
'sz_var_names.Add("Application.IOCONFIG_GLOBALS.Flexium_NCK.WCNC.Spindle[2].Override") ' segnaposto per la speed override
|
||||
'sz_var_names.Add("Application.GVL_HMI_OMAG.HMI_Vel_prog") ' FEED
|
||||
'sz_var_names.Add("Application.GVL_HMI_OMAG.HMI_LabRPM") ' Speed
|
||||
'sz_var_names.Add("Application.GVL_HMI_OMAG.HMI_LabAmper") ' Amp�re = *0.01
|
||||
'sz_var_names.Add("Application.GVL_HMI_OMAG.HMI_LabAmper") ' Ampère = *0.01
|
||||
|
||||
' Creo lista nomi variabili PLC da leggere
|
||||
m_nCnDataVarNum = 0
|
||||
@@ -823,7 +823,7 @@ Namespace Num
|
||||
|
||||
|
||||
' Only for FX Server >= 3.9.0.0
|
||||
' poi in realt� ritorna sempre tipo = -1 per cui � eguale alle altre.....
|
||||
' poi in realtà ritorna sempre tipo = -1 per cui è eguale alle altre.....
|
||||
Private Sub objDReadELS_ValueChanged3(nHandle As Integer, value As Object, DataType As Short, Writable As Short, nerrorCode As Short) Handles objDReadELS.ValueChanged3
|
||||
|
||||
Dim edata_type As eDatatype
|
||||
@@ -996,7 +996,7 @@ Namespace Num
|
||||
d_spindle_eff(0) = CDbl(values(n))
|
||||
Case CnData.SpeedOvr ' (5) Potenziom. speed = ...
|
||||
n_spindle_override(0) = CShort(Math.Round((CDbl(values(n)) * 50 / 255) + 50))
|
||||
Case CnData.Power ' (6) Amp�re = * 0.01
|
||||
Case CnData.Power ' (6) Ampère = * 0.01
|
||||
d_spindle_power = CDbl(CLng(values(n))) * 0.01
|
||||
b_spindle_power_changed = True
|
||||
Case CnData.Spindle ' (7) Stato rotazione mandrino
|
||||
@@ -1095,9 +1095,6 @@ Namespace Num
|
||||
Case CnData.EnablePC ' (54)
|
||||
nEnablePc = CInt(values(n))
|
||||
|
||||
Case CnData.CPos ' (57)
|
||||
dCPos = CDbl(values(n))
|
||||
|
||||
End Select
|
||||
Next
|
||||
|
||||
@@ -1704,11 +1701,11 @@ Namespace Num
|
||||
nTimeOut += 1
|
||||
End While
|
||||
If Not bSetModeDone Then
|
||||
EgtOutLog("Errore cambio modalit� in MDI: " & TIMEOUT)
|
||||
EgtOutLog("Errore cambio modalità in MDI: " & TIMEOUT)
|
||||
Return TIMEOUT 'Errore di timeout
|
||||
End If
|
||||
If nSetModeResult <> 0 Then
|
||||
EgtOutLog("Errore 2 cambio modalit� in MDI: " & nSetModeResult)
|
||||
EgtOutLog("Errore 2 cambio modalità in MDI: " & nSetModeResult)
|
||||
End If
|
||||
Return nSetModeResult
|
||||
|
||||
|
||||
@@ -1297,14 +1297,14 @@ Namespace Num
|
||||
End Function
|
||||
|
||||
Function VerifyBusy() As eStateType
|
||||
For I As Integer = 0 To 150
|
||||
For I As Integer = 0 To 50
|
||||
If global_state <> eStateType.READY Then
|
||||
System.Threading.Thread.Sleep(SLEEP_TIME)
|
||||
Else
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
EgtOutLog("eStateType: " & global_state.ToString & " -- if eStateType=0 it means READY")
|
||||
|
||||
Return global_state
|
||||
|
||||
End Function
|
||||
|
||||
@@ -174,21 +174,12 @@
|
||||
<Compile Include="AboutBox\AboutBoxWD.xaml.vb">
|
||||
<DependentUpon>AboutBoxWD.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="CadCuts\SelectTableWD.xaml.vb">
|
||||
<DependentUpon>SelectTableWD.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="CadCuts\ChooseTestToolWD.xaml.vb">
|
||||
<DependentUpon>ChooseTestToolWD.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="CadCuts\ChangeToolWD.xaml.vb">
|
||||
<DependentUpon>ChangeToolWD.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="CadCuts\SelectPartFromFamilyWD.xaml.vb">
|
||||
<DependentUpon>SelectPartFromFamilyWD.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="CadCuts\SelParkIndWD.xaml.vb">
|
||||
<DependentUpon>SelParkIndWD.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="CAM\CamPolishing.vb" />
|
||||
<Compile Include="DirectCuts\ControlsDirectCutUC.xaml.vb">
|
||||
<DependentUpon>ControlsDirectCutUC.xaml</DependentUpon>
|
||||
@@ -218,9 +209,6 @@
|
||||
<Compile Include="DrawImport\FiloTopUC.xaml.vb">
|
||||
<DependentUpon>FiloTopUC.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="DrawImport\SideAngleOneForAllWindow.xaml.vb">
|
||||
<DependentUpon>SideAngleOneForAllWindow.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="DrawImport\UnderDrillUC.xaml.vb">
|
||||
<DependentUpon>UnderDrillUC.xaml</DependentUpon>
|
||||
</Compile>
|
||||
@@ -459,26 +447,14 @@
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="CadCuts\SelectTableWD.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="CadCuts\ChooseTestToolWD.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="CadCuts\ChangeToolWD.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="CadCuts\SelectPartFromFamilyWD.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="CadCuts\SelParkIndWD.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="DirectCuts\ControlsDirectCutUC.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
@@ -515,10 +491,6 @@
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="DrawImport\SideAngleOneForAllWindow.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="DrawImport\UnderDrillUC.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>XamlIntelliSenseFileGenerator</Generator>
|
||||
@@ -1404,35 +1376,8 @@
|
||||
<Resource Include="Resources\NewIcons\Move-Spot-Reg.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\NewIcons\Logo-Egalware.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\NewIcons\Logo-Egalware %282%29.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\NewIcons\Logo-Egalware %283%29.png" />
|
||||
<Resource Include="Resources\NewIcons\RawHeight.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\NewIcons\LightArrowOff.png" />
|
||||
<Resource Include="Resources\NewIcons\LightArrowOn.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\NewIcons\Park_Busy.png" />
|
||||
<Resource Include="Resources\NewIcons\icoRight-3D.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\NewIcons\icoLeft-3D.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\NewIcons\icoBack-3D.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\NewIcons\icoFront-3D.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\NewIcons\icoBottom-3D.png" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
|
||||
<PropertyGroup>
|
||||
<PostBuildEvent>IF "$(PlatformName)"=="x86" IF "$(ConfigurationName)" == "Release" copy $(TargetPath) c:\EgtProg\OmagCUT\OmagCUTR32.exe
|
||||
|
||||
@@ -81,7 +81,6 @@
|
||||
<system:Double x:Key="FontSize_LowerBarOverride">18.6</system:Double> <!--14pt-->
|
||||
<system:Double x:Key="FontSize_UnitOfMeasure">13.3</system:Double> <!--10pt-->
|
||||
<system:Double x:Key="FontSize_GroupBoxHeader">22</system:Double>
|
||||
<system:Double x:Key="FontSize_GroupBoxHeaderWJ">18</system:Double>
|
||||
<system:Double x:Key="ComboBox_Height">40</system:Double>
|
||||
<system:Double x:Key="ComboBoxTextBlock_Height">40</system:Double>
|
||||
<system:Double x:Key="ArrowImage_Height">65</system:Double>
|
||||
@@ -339,36 +338,7 @@
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="Color_Button" TargetType="{x:Type Button}" BasedOn="{StaticResource {x:Type Button}}">
|
||||
<Setter Property="BorderThickness" Value="{StaticResource BorderThickness}"/>
|
||||
<Setter Property="project:ButtonExtensions.CornerRadius" Value="{StaticResource Button_CornerRadius}"/>
|
||||
<Setter Property="Margin" Value="{StaticResource Button_MarginThickness}"/>
|
||||
<Setter Property="Padding" Value="5"/>
|
||||
<Setter Property="Width" Value="60"/>
|
||||
<Setter Property="Height" Value="35"/>
|
||||
<Setter Property="HorizontalContentAlignment" Value="Center"/>
|
||||
<Setter Property="VerticalContentAlignment" Value="Center"/>
|
||||
<Setter Property="TextBlock.TextAlignment" Value="Center"/>
|
||||
<Style.Triggers>
|
||||
<Trigger Property="IsMouseOver" Value="True">
|
||||
<Setter Property="Background" Value="#FFB8C3CD"/>
|
||||
</Trigger>
|
||||
<Trigger Property="IsPressed" Value="True">
|
||||
<Setter Property="OpacityMask" Value="#33FF0000"/>
|
||||
</Trigger>
|
||||
<Trigger Property="ToggleButton.IsChecked" Value="True">
|
||||
<Setter Property="Background" Value="Transparent"/>
|
||||
</Trigger>
|
||||
<Trigger Property="IsEnabled" Value="False">
|
||||
<Setter Property="Background" Value="#FFF4F4F4"/>
|
||||
<Setter Property="BorderBrush" Value="#FFADB2B5"/>
|
||||
<Setter Property="TextElement.Foreground" Value="#FF838383"/>
|
||||
</Trigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
|
||||
|
||||
<Style x:Key="OmagCut_Button_Wrap" TargetType="{x:Type Button}" BasedOn="{StaticResource OmagCut_Button}">
|
||||
<Style x:Key="OmagCut_Button_Wrap" TargetType="{x:Type Button}" BasedOn="{StaticResource OmagCut_Button}">
|
||||
<Setter Property="ContentTemplate" Value="{StaticResource Button_DataTemplate_Wrap}" />
|
||||
<Setter Property="FontSize" Value="{DynamicResource FontSize_LowerCaseCharacter}" />
|
||||
</Style>
|
||||
@@ -1224,19 +1194,11 @@
|
||||
</Style>
|
||||
|
||||
<Style x:Key="OmagCut_CenteredLowerCaseCharacterTextBlock" TargetType="{x:Type TextBlock}" BasedOn="{StaticResource OmagCut_UpperCaseCharacterTextBlock}">
|
||||
<Setter Property="Foreground" Value="{StaticResource Omag_Black}"/>
|
||||
<Setter Property="VerticalAlignment" Value="Center"/>
|
||||
<Setter Property="HorizontalAlignment" Value="Center"/>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="OmagCut_ErrorTextBlock" TargetType="{x:Type TextBlock}" BasedOn="{StaticResource OmagCut_UpperCaseCharacterTextBlock}">
|
||||
<Setter Property="Foreground" Value="White"/>
|
||||
<Setter Property="FontStyle" Value="Italic"/>
|
||||
<Setter Property="VerticalAlignment" Value="Center"/>
|
||||
<Setter Property="HorizontalAlignment" Value="Center"/>
|
||||
</Style>
|
||||
|
||||
<!-- ______________________________________________________________________________________________________________________ -->
|
||||
<!-- ______________________________________________________________________________________________________________________ -->
|
||||
|
||||
<!--TextBox-->
|
||||
|
||||
@@ -1258,14 +1220,13 @@
|
||||
</Style>
|
||||
|
||||
<Style x:Key="OmagCut_CalculatorTextBox" TargetType="{x:Type EgtWPFLib:EgtTextBox}" BasedOn="{StaticResource OmagCut_TextBox}">
|
||||
<Setter Property="Foreground" Value="{StaticResource Omag_Black}"/>
|
||||
<Setter Property="Keyboard" Value="Calculator"/>
|
||||
<Setter Property="IsLength" Value="True"/>
|
||||
<Setter Property="KeyboardDimension" Value="300"/>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="OmagCut_CalculatorParamWjTextBox" TargetType="{x:Type EgtWPFLib:EgtTextBox}" BasedOn="{StaticResource OmagCut_TextBox}">
|
||||
<Setter Property="Width" Value="70"/>
|
||||
<Setter Property="Width" Value="80"/>
|
||||
<Setter Property="Keyboard" Value="Calculator"/>
|
||||
<Setter Property="KeyboardDimension" Value="300"/>
|
||||
<Setter Property="IsHitTestVisible" Value="False" />
|
||||
@@ -2785,16 +2746,5 @@
|
||||
</Style>
|
||||
|
||||
<!-- *************************************************************************** -->
|
||||
|
||||
<!--Stile Rettangolo in SplitPaceUC-->
|
||||
<Style x:Key="Rect_SplitPage" TargetType="{x:Type Rectangle}">
|
||||
<Setter Property="Fill" Value="{Binding SawColor}"/>
|
||||
<Setter Property="Stroke" Value="Black"/>
|
||||
<Setter Property="HorizontalAlignment" Value="Center"/>
|
||||
<Setter Property="VerticalAlignment" Value="Center"/>
|
||||
<Setter Property="Height" Value="20"/>
|
||||
<Setter Property="Width" Value="5"/>
|
||||
<Setter Property="StrokeThickness" Value="0.5"/>
|
||||
</Style>
|
||||
|
||||
</ResourceDictionary>
|
||||
|
||||
@@ -91,7 +91,7 @@ Public Class AddToDataBaseUC
|
||||
WritePrivateProfileString(S_SCRAPS, K_LASTBLOCK, EgtPHOTOLib.PhotoMap.refOptionPanelVM.SelSlab.sNameBlock, m_OmagPhotoWD.m_MainWindow.GetIniFile())
|
||||
End If
|
||||
' aggiorno il testo del messaggio "Add" → "Save"
|
||||
AddBtn.Content = EgtMsg(91252) ' Save
|
||||
AddBtn.Content = "Save"
|
||||
|
||||
' notifico che da ora la lastra inserita è in modalità di modifica (non salvo la lastra come nuova, ma la sovrascrivo come in modifica)
|
||||
EgtPHOTOLib.PhotoMap.refProjectVM.SetSelProjectMode(ProjectSlabVM.ProjectModeOpt.DETAIL)
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
<ColumnDefinition Width="5*"/>
|
||||
<ColumnDefinition Width="7*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
</Grid>
|
||||
|
||||
<!-- Definizione della Grid laterale -->
|
||||
@@ -71,8 +72,7 @@
|
||||
|
||||
</Border>
|
||||
|
||||
|
||||
<ProgressBar Name="PhotoProgress" Grid.Row="2" Height="50" Margin="10,0,10,0" Minimum="0" Maximum="100"/>
|
||||
<ProgressBar Name="PhotoProgress" Grid.Row="2" Height="50" Margin="10,0,10,0" Minimum="0" Maximum="100"/>
|
||||
|
||||
<Border Name="OutMessageBrd" Grid.Row="2" >
|
||||
<TextBlock Name="OutMessageTxBl" TextAlignment="Center"
|
||||
@@ -81,13 +81,6 @@
|
||||
|
||||
</Grid>
|
||||
|
||||
<Grid Name="SceneHostGrid" Grid.Row="1" Grid.Column="1">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="6*"/>
|
||||
<ColumnDefinition Width="1.2*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
</Grid>
|
||||
|
||||
</Grid>
|
||||
|
||||
</UserControl>
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
Imports System.IO
|
||||
Imports System.Security.Cryptography
|
||||
Imports System.Windows.Interop
|
||||
Imports EgtUILib
|
||||
Imports EgtWPFLib
|
||||
@@ -11,7 +10,6 @@ Public Class CurrentProjectPageUC
|
||||
Friend Event OnMouseDownScene_DoubleClick(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)
|
||||
Friend Event OnKeyCancelDownScene(sender As Object, e As System.Windows.Forms.KeyEventArgs)
|
||||
' Riferimento alla MainWindow
|
||||
Private m_MainWindow As MainWindow = DirectCast(Application.Current.MainWindow, MainWindow)
|
||||
' Dichiarazione delle Page UserControl
|
||||
@@ -20,8 +18,7 @@ Public Class CurrentProjectPageUC
|
||||
Private m_bFirst As Boolean = True
|
||||
' Dichiarazione Scene
|
||||
Friend WithEvents CurrentProjectScene As New Scene
|
||||
' Nella pagina Nest gestisco la dimensione della scena per visualizzare la lista dei parcheggi
|
||||
Public CurrentProjectSceneHost As New System.Windows.Forms.Integration.WindowsFormsHost
|
||||
Private CurrentProjectSceneHost As New System.Windows.Forms.Integration.WindowsFormsHost
|
||||
' Identificativo progetto corrente
|
||||
Private m_nCurrProj As Integer = 0
|
||||
' Dati del grezzo
|
||||
@@ -57,11 +54,9 @@ Public Class CurrentProjectPageUC
|
||||
|
||||
'Assegnazione scena all'host e posizionamento nella PlacePageGrid
|
||||
CurrentProjectSceneHost.Child = CurrentProjectScene
|
||||
CurrentProjectSceneHost.SetValue(Grid.ColumnProperty, 0)
|
||||
CurrentProjectSceneHost.SetValue(Grid.ColumnSpanProperty, 2)
|
||||
' CurrentProjectSceneHost.SetValue(Grid.RowProperty, 1)
|
||||
'Me.CurrentProjectPageGrid.Children.Add(CurrentProjectSceneHost)
|
||||
Me.SceneHostGrid.Children.Add(CurrentProjectSceneHost)
|
||||
CurrentProjectSceneHost.SetValue(Grid.ColumnProperty, 1)
|
||||
CurrentProjectSceneHost.SetValue(Grid.RowProperty, 1)
|
||||
Me.CurrentProjectPageGrid.Children.Add(CurrentProjectSceneHost)
|
||||
|
||||
'Imposto i messaggi letti dal file dei messaggi
|
||||
MaterialTxBl.ToolTip = EgtMsg(MSG_RAWPARTPAGEUC + 9) 'Material - Materiale
|
||||
@@ -196,8 +191,7 @@ Public Class CurrentProjectPageUC
|
||||
' Inizializzo gestore lavorazioni
|
||||
EgtInitMachMgr(m_MainWindow.GetMachinesRootDir(), m_MainWindow.GetToolMakersDir())
|
||||
m_bFirst = False
|
||||
Dim bOrtoGraphic As Boolean = (GetPrivateProfileInt(S_SCENE, K_ORTOGRAPHIC, 1, m_MainWindow.GetIniFile()) <> 0)
|
||||
EgtSetCameraType(bOrtoGraphic, True)
|
||||
|
||||
' creo nuovo progetto
|
||||
m_nCurrProj = GetPrivateProfileInt(S_GENERAL, K_LASTPROJ, 0, m_MainWindow.GetIniFile())
|
||||
'NewProject()
|
||||
@@ -359,10 +353,6 @@ Public Class CurrentProjectPageUC
|
||||
SetInfoMessage(DistToString(vtDist))
|
||||
End Sub
|
||||
|
||||
Private Sub OnMyKeyCancelDownScene(sender As Object, e As System.Windows.Forms.KeyEventArgs) Handles CurrentProjectScene.KeyDown
|
||||
RaiseEvent OnKeyCancelDownScene(sender, e)
|
||||
End Sub
|
||||
|
||||
' Gestione progetto
|
||||
|
||||
Friend Sub SetNextProjectIndex()
|
||||
@@ -436,29 +426,15 @@ Public Class CurrentProjectPageUC
|
||||
' prima di parcheggiare svuoto dei pezzi in parcheggio sia vuota
|
||||
m_MainWindow.m_CadCutPageUC.m_NestPage.ResetListOfGruopInPark()
|
||||
' Parcheggio correttamente i pezzi precedentemente salvati
|
||||
Dim nIdList As New List(Of Integer)
|
||||
Dim nStatList As New List(Of Integer)
|
||||
Dim nId2 As Integer = EgtGetFirstPart()
|
||||
While nId2 <> GDB_ID.NULL
|
||||
' Forzo lo stato per avere il giusto calcolo delle posizioni per evitare sovrapposizioni
|
||||
EgtSetStatus(nId2, GDB_ST.ON_)
|
||||
' Inserisco correttamente in parcheggio
|
||||
m_MainWindow.m_CadCutPageUC.m_NestPage.StoreOnePart(nId2, True)
|
||||
' Aggiorno lo stato di visualizzazione
|
||||
Dim nInfoStatus As Integer = 1
|
||||
' Salvo lo stato (per gestire la navigazione)
|
||||
EgtGetInfo(nId2, INFO_PARKSTATUS, nInfoStatus)
|
||||
' Salvo l'Id e lo stato da impostare successivamente al posizionamento
|
||||
nIdList.Add(nId2)
|
||||
nStatList.Add(nInfoStatus)
|
||||
' Notifica a WeinMatching per modifica Id
|
||||
VeinMatching.UpdatePart(nId2)
|
||||
' Passo al pezzo successivo
|
||||
nId2 = EgtGetNextPart(nId2)
|
||||
End While
|
||||
For IndIndex As Integer = 0 To nIdList.Count - 1
|
||||
EgtSetStatus(nIdList(IndIndex), nStatList(IndIndex))
|
||||
Next
|
||||
' Aggiorno Aree totale e da lavorare dei pezzi
|
||||
SetTotalArea(dTotArea)
|
||||
UpdateToProduceArea()
|
||||
@@ -473,7 +449,7 @@ Public Class CurrentProjectPageUC
|
||||
Return True
|
||||
End Function
|
||||
|
||||
Friend Function AdjustAdditionalTable(Optional bForced As Boolean = False) As Boolean
|
||||
Friend Function AdjustAdditionalTable( Optional bForced As Boolean = False) As Boolean
|
||||
' Recupero altezza sottotavola corrente
|
||||
Dim nFixtId As Integer = EgtGetFirstNameInGroup(EgtGetFirstMachGroup(), MACH_FIXT_GROUP)
|
||||
Dim nAddTabId As Integer = EgtGetFirstNameInGroup(nFixtId, MACH_ADD_TABLE)
|
||||
@@ -485,7 +461,7 @@ Public Class CurrentProjectPageUC
|
||||
End If
|
||||
' Se valore cambiato, aggiorno...
|
||||
Dim dDeltaZ As Double = m_MainWindow.m_CurrentMachine.dAdditionalTable - dCurrAddTab
|
||||
Dim bChanged As Boolean = (Math.Abs(dDeltaZ) > EPS_SMALL)
|
||||
Dim bChanged As Boolean = ( Math.Abs(dDeltaZ) > EPS_SMALL)
|
||||
If bChanged Or bForced Then
|
||||
Dim bOldEnMod As Boolean = EgtGetEnableModified()
|
||||
If Not bChanged AndAlso bOldEnMod Then EgtDisableModified()
|
||||
@@ -498,9 +474,9 @@ Public Class CurrentProjectPageUC
|
||||
ShowPhoto(False)
|
||||
Dim nRawGrpId As Integer = EgtGetFirstRawPart()
|
||||
While nRawGrpId <> GDB_ID.NULL
|
||||
Dim nRawSolidId As Integer = EgtGetFirstNameInGroup(nRawGrpId, NAME_RAW_SOLID)
|
||||
If nRawSolidId <> GDB_ID.NULL Then EgtSetTextureName(nRawSolidId, PHOTO_NAME)
|
||||
nRawGrpId = EgtGetNextRawPart(nRawGrpId)
|
||||
Dim nRawSolidId As Integer = EgtGetFirstNameInGroup( nRawGrpId, NAME_RAW_SOLID)
|
||||
If nRawSolidId <> GDB_ID.NULL Then EgtSetTextureName( nRawSolidId, PHOTO_NAME)
|
||||
nRawGrpId = EgtGetNextRawPart( nRawGrpId)
|
||||
End While
|
||||
End If
|
||||
End If
|
||||
@@ -528,10 +504,10 @@ Public Class CurrentProjectPageUC
|
||||
EgtGetTableName(sNameTable)
|
||||
Dim nRefAddTabId = EgtGetFirstNameInGroup(EgtGetFirstNameInGroup(EgtGetTableId(sNameTable), "SOLID"), MACH_ADD_TABLE)
|
||||
If nRefAddTabId <> GDB_ID.NULL Then
|
||||
nAddTabId = EgtCopyGlob(nRefAddTabId, nFixtId)
|
||||
EgtSetStatus(nAddTabId, GDB_ST.ON_)
|
||||
EgtScale(nAddTabId, New Frame3d(ptMin), 1, 1, dAddTable / 10)
|
||||
' altrimenti la creo
|
||||
nAddTabId = EgtCopyGlob( nRefAddTabId, nFixtId)
|
||||
EgtSetStatus( nAddTabId, GDB_ST.ON_)
|
||||
EgtScale( nAddTabId, new Frame3d( ptMin), 1, 1, dAddTable / 10)
|
||||
' altrimenti la creo
|
||||
Else
|
||||
' Aggiungo sovratavola nel gruppo dei bloccaggi
|
||||
ptMax.z -= DELTAZ_ADDTAB
|
||||
@@ -542,7 +518,7 @@ Public Class CurrentProjectPageUC
|
||||
' Sistemazioni finali
|
||||
If nAddTabId = GDB_ID.NULL Then Return False
|
||||
EgtSetName(nAddTabId, MACH_ADD_TABLE)
|
||||
If nRefAddTabId = GDB_ID.NULL Then EgtSetColor(nAddTabId, New Color3d(150, 75, 0, 100), True)
|
||||
EgtSetColor(nAddTabId, New Color3d(150, 75, 0, 100), True)
|
||||
EgtSetInfo(nAddTabId, KEY_ADD_TABLE, dAddTable)
|
||||
Return True
|
||||
End Function
|
||||
@@ -599,9 +575,6 @@ Public Class CurrentProjectPageUC
|
||||
Else
|
||||
EgtSetInfo(EgtGetFirstNameInGroup(GDB_ID.ROOT, NAME_PROJMARK), INFO_CAXESHOME, DoubleToString(dCHomeCurrMach, 0))
|
||||
End If
|
||||
|
||||
'SelParkIndWD.UpdateViewOnParkInd(False)
|
||||
|
||||
' Dichiaro progetto non modificato
|
||||
EgtResetModified()
|
||||
Return True
|
||||
@@ -626,8 +599,8 @@ Public Class CurrentProjectPageUC
|
||||
End If
|
||||
' Se la macchina del file è quella impostata
|
||||
If String.Compare(sFileMachine, m_MainWindow.GetCurrMachine(), True) = 0 Then
|
||||
AdjustAdditionalTable(True)
|
||||
' altrimenti avverto, porto i pezzi in parcheggio e cancello il grezzo
|
||||
AdjustAdditionalTable( True)
|
||||
' altrimenti avverto, porto i pezzi in parcheggio e cancello il grezzo
|
||||
Else
|
||||
' Emetto messaggio
|
||||
Dim sOut As String = EgtMsg(90320) & " (" & sFileMachine & ")" ' Macchina diversa
|
||||
@@ -777,17 +750,6 @@ Public Class CurrentProjectPageUC
|
||||
' Notifico a foto il cambio di path
|
||||
EgtChangePhotoPath(nPhotoId, sNewPhoto)
|
||||
End If
|
||||
|
||||
'--------------------------------------------------------------------------------
|
||||
If GetPrivateProfileInt(S_GENERAL, K_ENABLEDXFPARK, 0, m_MainWindow.GetIniFile) <> 0 Then
|
||||
' Gestione visulizzazione lista pezzi in parcheggio
|
||||
Dim sNewFileName As String = SelParkIndWD.GetPathCurrProj()
|
||||
SelParkIndWD.CopyImgSvg(sPath)
|
||||
SelParkIndWD.sActualProj = String.Empty
|
||||
SelParkIndWD.CopyImgSvg(sNewFileName)
|
||||
End If
|
||||
'--------------------------------------------------------------------------------
|
||||
|
||||
' Se assente, inserisco contrassegno di progetto OmagCut valido
|
||||
AddProjectMark()
|
||||
' Eseguo
|
||||
@@ -801,15 +763,15 @@ Public Class CurrentProjectPageUC
|
||||
Return True
|
||||
End Function
|
||||
|
||||
Friend Function ExportProject(sPath As String) As Boolean
|
||||
Friend Function ExportProject( sPath As String) As Boolean
|
||||
' Copio eventuale fotografia
|
||||
Dim nPhotoId As Integer = GetPhoto()
|
||||
If nPhotoId <> GDB_ID.NULL Then
|
||||
' Path originale
|
||||
Dim sPhoto As String = String.Empty
|
||||
EgtGetPhotoPath(nPhotoId, sPhoto)
|
||||
EgtGetPhotoPath( nPhotoId, sPhoto)
|
||||
' Nuova path
|
||||
Dim sNewPhoto As String = Path.ChangeExtension(sPath, Path.GetExtension(sPhoto))
|
||||
Dim sNewPhoto As String = Path.ChangeExtension( sPath, Path.GetExtension( sPhoto))
|
||||
' Se diverse, eseguo copia
|
||||
If Not String.Equals(sPhoto, sNewPhoto, StringComparison.InvariantCultureIgnoreCase) Then
|
||||
Try
|
||||
@@ -824,7 +786,7 @@ Public Class CurrentProjectPageUC
|
||||
' Se assente, inserisco contrassegno di progetto OmagCut valido
|
||||
AddProjectMark()
|
||||
' Eseguo copia
|
||||
Return SaveFile(sPath)
|
||||
Return SaveFile( sPath)
|
||||
End Function
|
||||
|
||||
Friend Function GetCurrentProject() As Integer
|
||||
@@ -911,7 +873,7 @@ Public Class CurrentProjectPageUC
|
||||
EgtSetName(nMarkId, NAME_PROJMARK)
|
||||
EgtSetLevel(nMarkId, GDB_LV.SYSTEM)
|
||||
EgtSetInfo(nMarkId, INFO_REDUCEDCUT, nReducedCut)
|
||||
' altrimenti, aggiorno il flag dei tagli ridotti
|
||||
' altrimenti, aggiorno il flag dei tagli ridotti
|
||||
Else
|
||||
Dim nMarkReducedCut As Integer = 0
|
||||
If Not EgtGetInfo(nMarkId, INFO_REDUCEDCUT, nMarkReducedCut) OrElse nMarkReducedCut <> nReducedCut Then
|
||||
@@ -1370,23 +1332,23 @@ Public Class CurrentProjectPageUC
|
||||
|
||||
' Gestione area pezzi totale e area pezzi da produrre
|
||||
|
||||
Friend Function SetTotalArea(dTotArea As Double) As Boolean
|
||||
Friend Function SetTotalArea( dTotArea As Double) As Boolean
|
||||
Dim nMarkId As Integer = AddProjectMark()
|
||||
Return EgtSetInfo(nMarkId, INFO_TOTAREA, dTotArea)
|
||||
End Function
|
||||
|
||||
Friend Function UpdateTotalArea(dNewArea As Double) As Boolean
|
||||
Friend Function UpdateTotalArea( dNewArea As Double) As Boolean
|
||||
Dim nMarkId As Integer = AddProjectMark()
|
||||
Dim dTotArea As Double = 0
|
||||
EgtGetInfo(nMarkId, INFO_TOTAREA, dTotArea)
|
||||
dTotArea = Math.Max(dTotArea + dNewArea, 0)
|
||||
EgtGetInfo( nMarkId, INFO_TOTAREA, dTotArea)
|
||||
dTotArea = Math.Max( dTotArea + dNewArea, 0)
|
||||
Return EgtSetInfo(nMarkId, INFO_TOTAREA, dTotArea)
|
||||
End Function
|
||||
|
||||
Friend Function GetTotalArea() As Double
|
||||
Dim nMarkId As Integer = AddProjectMark()
|
||||
Dim dTotArea As Double = 0
|
||||
EgtGetInfo(nMarkId, INFO_TOTAREA, dTotArea)
|
||||
EgtGetInfo( nMarkId, INFO_TOTAREA, dTotArea)
|
||||
Return dTotArea
|
||||
End Function
|
||||
|
||||
@@ -1394,17 +1356,17 @@ Public Class CurrentProjectPageUC
|
||||
Dim dToProdArea As Double = 0
|
||||
' Se programma non ancora inviato al CN, ciclo sui pezzi nella lastra
|
||||
If GetProjectNcProgSent() = 0 Then
|
||||
Dim nPartInRawId As Integer = EgtGetFirstPartInRawPart(CamAuto.GetCurrentRaw())
|
||||
Dim nPartInRawId As Integer = EgtGetFirstPartInRawPart( CamAuto.GetCurrentRaw())
|
||||
While nPartInRawId <> GDB_ID.NULL
|
||||
dToProdArea += GeomCalc.GetPartArea(nPartInRawId)
|
||||
nPartInRawId = EgtGetNextPartInRawPart(nPartInRawId)
|
||||
dToProdArea += GeomCalc.GetPartArea( nPartInRawId)
|
||||
nPartInRawId = EgtGetNextPartInRawPart( nPartInRawId)
|
||||
End While
|
||||
End If
|
||||
' Ciclo sui pezzi in parcheggio
|
||||
Dim nPartId As Integer = EgtGetFirstPart()
|
||||
While nPartId <> GDB_ID.NULL
|
||||
dToProdArea += GeomCalc.GetPartArea(nPartId)
|
||||
nPartId = EgtGetNextPart(nPartId)
|
||||
dToProdArea += GeomCalc.GetPartArea( nPartId)
|
||||
nPartId = EgtGetNextPart( nPartId)
|
||||
End While
|
||||
Dim nMarkId As Integer = AddProjectMark()
|
||||
Return EgtSetInfo(nMarkId, INFO_TOPRODAREA, dToProdArea)
|
||||
@@ -1413,16 +1375,16 @@ Public Class CurrentProjectPageUC
|
||||
Friend Function GetToProduceArea() As Double
|
||||
Dim nMarkId As Integer = AddProjectMark()
|
||||
Dim dToProdArea As Double = 0
|
||||
EgtGetInfo(nMarkId, INFO_TOPRODAREA, dToProdArea)
|
||||
EgtGetInfo( nMarkId, INFO_TOPRODAREA, dToProdArea)
|
||||
Return dToProdArea
|
||||
End Function
|
||||
|
||||
Friend Sub ShowAreas()
|
||||
' Recupero il gruppo di Mark e lo svuoto
|
||||
Dim nMarkId As Integer = AddProjectMark()
|
||||
EgtEmptyGroup(nMarkId)
|
||||
EgtEmptyGroup( nMarkId)
|
||||
' Se non sono da visualizzare esco
|
||||
If GetPrivateProfileInt(S_STATISTICS, K_SHOWAREAS, 0, m_MainWindow.GetMachIniFile()) = 0 Then Return
|
||||
if GetPrivateProfileInt( S_STATISTICS, K_SHOWAREAS, 0, m_MainWindow.GetMachIniFile()) = 0 Then Return
|
||||
' Recupero dati
|
||||
Dim dTotArea As Double = GetTotalArea()
|
||||
Dim dToProdArea As Double = GetToProduceArea()
|
||||
@@ -1434,19 +1396,20 @@ Public Class CurrentProjectPageUC
|
||||
End If
|
||||
' Scritte
|
||||
Const TEXT_DIST As Double = 100
|
||||
Dim ptIns As New Point3d(b3Tab.Center().x, b3Tab.Max().y + TEXT_DIST, b3Tab.Max().z)
|
||||
Dim ptIns As New Point3d( b3Tab.Center().x, b3Tab.Max().y + TEXT_DIST, b3Tab.Max().z)
|
||||
Dim dCoeff As Double = 1.0 / 1000000.0
|
||||
Dim sUnit As String = " m²"
|
||||
If Not EgtUiUnitsAreMM() Then
|
||||
dCoeff = 1.0 / (12 * ONEINCH * 12 * ONEINCH)
|
||||
dCoeff = 1.0 / ( 12 * ONEINCH * 12 * ONEINCH)
|
||||
sUnit = " ft²"
|
||||
End If
|
||||
Dim sText As String = EgtMsg(90328) & " " & DoubleToString(dTotArea * dCoeff, 3) & sUnit & " " &
|
||||
EgtMsg(90329) & " " & DoubleToString(dToProdArea * dCoeff, 3) & sUnit
|
||||
Dim nText As Integer = EgtCreateTextAdv(nMarkId, ptIns, 0, sText, "", 500, False, 100, 1, 0, INS_POS.MC)
|
||||
EgtSetColor(nText, New Color3d(0, 0, 0))
|
||||
Dim sText As String = EgtMsg( 90328) & " " & DoubleToString( dTotArea * dCoeff, 3) & sUnit & " " &
|
||||
EgtMsg( 90329) & " " & DoubleToString( dToProdArea * dCoeff, 3) & sUnit
|
||||
Dim nText As Integer = EgtCreateTextAdv( nMarkId, ptIns, 0, sText, "", 500, False, 100, 1, 0, INS_POS.MC)
|
||||
EgtSetColor( nText, New Color3d( 0, 0, 0))
|
||||
End Sub
|
||||
Friend Sub SetAreasStatus(bShow As Boolean)
|
||||
|
||||
Friend Sub SetAreasStatus( bShow As Boolean)
|
||||
Dim nMarkId As Integer = EgtGetFirstNameInGroup(GDB_ID.ROOT, NAME_PROJMARK)
|
||||
If nMarkId = GDB_ID.NULL Then Return
|
||||
|
||||
@@ -1454,7 +1417,7 @@ Public Class CurrentProjectPageUC
|
||||
Dim bOldEnMod As Boolean = EgtGetEnableModified()
|
||||
If bOldEnMod Then EgtDisableModified()
|
||||
' Cambio stato visualizzazione
|
||||
EgtSetStatus(nMarkId, If(bShow, GDB_ST.ON_, GDB_ST.OFF))
|
||||
EgtSetStatus( nMarkId, If( bShow, GDB_ST.ON_, GDB_ST.OFF))
|
||||
' Se necessario riabilito impostazione modificato
|
||||
If bOldEnMod Then EgtEnableModified()
|
||||
End Sub
|
||||
|
||||
@@ -145,7 +145,7 @@ Public Class OmagPhotoWD
|
||||
m_AddToDataBaseUC.ThicknessTxBx.Text = EgtPHOTOLib.PhotoMap.refOptionPanelVM.SelSlab.Thickness
|
||||
m_AddToDataBaseUC.ProjectTxBx.Text = EgtPHOTOLib.PhotoMap.refOptionPanelVM.SelSlab.ProjectAssignedTo
|
||||
' aggiorno il testo del messaggio "Add" → "Save"
|
||||
m_AddToDataBaseUC.AddBtn.Content = EgtMsg(91252) ' Save
|
||||
m_AddToDataBaseUC.AddBtn.Content = "Save"
|
||||
Return
|
||||
End If
|
||||
' inizializzo i campi
|
||||
|
||||
@@ -6,40 +6,33 @@
|
||||
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="853.3" d:DesignWidth="1280" Initialized="OpenPage_Initialized" Loaded="OpenPage_Loaded" Unloaded="OpenPage_Unloaded">
|
||||
|
||||
<!-- Definizione della OpenPage -->
|
||||
<Border>
|
||||
<Grid Name="OpenPageGrid" >
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="3*"/>
|
||||
<ColumnDefinition Width="12*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="8*"/>
|
||||
|
||||
<!-- Definizione della OpenPage -->
|
||||
<Border>
|
||||
<Grid Name="OpenPageGrid" >
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="3*"/>
|
||||
<ColumnDefinition Width="12*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="8*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<!-- Definizione della Grid Superiore -->
|
||||
<Grid Name="UpperButtonsGrid" Grid.Column="1" Grid.RowSpan="2">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="5*"/>
|
||||
<ColumnDefinition Width="7*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
</Grid>
|
||||
|
||||
<!-- Definizione della Grid Superiore -->
|
||||
<Grid Name="UpperButtonsGrid" Grid.Column="1" Grid.RowSpan="2">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="5*"/>
|
||||
<ColumnDefinition Width="7*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
</Grid>
|
||||
|
||||
<Grid Name="SceneHostGrid" Grid.Row="2" Grid.Column="1">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="6*"/>
|
||||
<ColumnDefinition Width="1.2*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
</Grid>
|
||||
|
||||
<TextBlock Name="FilePathTxBl" Grid.Row="0" Foreground="White" Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
|
||||
<Grid Grid.Row="1" Grid.RowSpan="2">
|
||||
<TextBlock Name="FilePathTxBl" Grid.Row="0" Foreground="White" Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
|
||||
<Grid Grid.Row="1" Grid.RowSpan="2">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="6.5*"/>
|
||||
<RowDefinition Height="0.65*"/>
|
||||
@@ -60,39 +53,39 @@
|
||||
</Grid>
|
||||
|
||||
</Grid>
|
||||
|
||||
<Border Name="MessageBrd" Grid.Row="3" BorderThickness="0,1,0,0" BorderBrush="Gray">
|
||||
<TextBlock Name="MessageTxBx" TextAlignment="Center"
|
||||
|
||||
<Border Name="MessageBrd" Grid.Row="3" BorderThickness="0,1,0,0" BorderBrush="Gray">
|
||||
<TextBlock Name="MessageTxBx" TextAlignment="Center"
|
||||
Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</Border>
|
||||
</Border>
|
||||
|
||||
<!-- Definizione della Grid Inferiore per i Button V e X -->
|
||||
<Grid Name="BottomButtonsGrid" Grid.Column="1" Grid.Row="3">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="6*"/>
|
||||
<ColumnDefinition Width="3*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<!-- Definizione della Grid Inferiore per i Button V e X -->
|
||||
<Grid Name="BottomButtonsGrid" Grid.Column="1" Grid.Row="3">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="6*"/>
|
||||
<ColumnDefinition Width="3*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Button Name="BarCodeBtn" Grid.Column="0" Style="{DynamicResource OmagCut_YellowGradientYellowIconButton}">
|
||||
<Button Name="BarCodeBtn" Grid.Column="0" Style="{DynamicResource OmagCut_YellowGradientYellowIconButton}">
|
||||
<Image Source="{DynamicResource BarCodeImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
</Button>
|
||||
|
||||
<Button Name="OkBtn" Grid.Column="3" Style="{DynamicResource OmagCut_GradientBlueIconButton}">
|
||||
<Image Source="{DynamicResource VImg}" Width="65" Height="65" HorizontalAlignment="Center"
|
||||
<Button Name="OkBtn" Grid.Column="3" Style="{DynamicResource OmagCut_GradientBlueIconButton}">
|
||||
<Image Source="{DynamicResource VImg}" Width="65" Height="65" HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center" />
|
||||
</Button>
|
||||
<Button Name="ExitBtn" Grid.Column="4" Style="{DynamicResource OmagCut_GradientBlueIconButton}">
|
||||
<Image Source="{DynamicResource XImg}" Width="65" Height="65" HorizontalAlignment="Center"
|
||||
</Button>
|
||||
<Button Name="ExitBtn" Grid.Column="4" Style="{DynamicResource OmagCut_GradientBlueIconButton}">
|
||||
<Image Source="{DynamicResource XImg}" Width="65" Height="65" HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center" />
|
||||
</Button>
|
||||
|
||||
</Grid>
|
||||
|
||||
</Grid>
|
||||
|
||||
</Border>
|
||||
</Button>
|
||||
|
||||
</Grid>
|
||||
|
||||
</Grid>
|
||||
|
||||
</Border>
|
||||
|
||||
</UserControl>
|
||||
|
||||
@@ -5,7 +5,6 @@ Public Class OpenPageUC
|
||||
|
||||
'Riferimento alla MainWindow
|
||||
Private m_MainWindow As MainWindow = DirectCast(Application.Current.MainWindow, MainWindow)
|
||||
Private m_SelParkInd As SelParkIndWD
|
||||
|
||||
'Dichiarazione dello UserControl SceneButtons
|
||||
Private m_SceneButtons As SceneButtonsUC
|
||||
@@ -36,12 +35,11 @@ Public Class OpenPageUC
|
||||
|
||||
' Assegnazione scena all'host e posizionamento nella OpenPageGrid
|
||||
OpenSceneHost.Child = OpenScene
|
||||
OpenSceneHost.SetValue(Grid.ColumnProperty, 0) '1
|
||||
OpenSceneHost.SetValue(Grid.RowProperty, 0) ' 2
|
||||
OpenSceneHost.SetValue(Grid.ColumnProperty, 1)
|
||||
OpenSceneHost.SetValue(Grid.RowProperty, 2)
|
||||
' OpenSceneHost.SetValue(Grid.RowSpanProperty, 1)
|
||||
OpenSceneHost.SetValue(Grid.ColumnSpanProperty, 2)
|
||||
'Me.OpenPageGrid.Children.Add(OpenSceneHost)
|
||||
SceneHostGrid.Children.Add(OpenSceneHost)
|
||||
Me.OpenPageGrid.Children.Add(OpenSceneHost)
|
||||
|
||||
' Definizione del collegamento tra ItemList e ListBox1
|
||||
FileListBox.ItemsSource = m_MainWindow.m_OpenItemList
|
||||
@@ -243,14 +241,6 @@ Public Class OpenPageUC
|
||||
Private Function ClearView() As Boolean
|
||||
' Pulisco il DB geometrico locale
|
||||
EgtNewFile()
|
||||
' Elimino elenco dei parcheggi
|
||||
If Not IsNothing(m_SelParkInd) Then
|
||||
OpenSceneHost.SetValue(Grid.ColumnSpanProperty, 2)
|
||||
SceneHostGrid.Children.Remove(m_SelParkInd)
|
||||
m_SelParkInd = Nothing
|
||||
End If
|
||||
' Pulisco la selezione dei dati
|
||||
SelParkIndWD.sActualProj = String.Empty
|
||||
' Eseguo zoom
|
||||
OpenScene.ZoomAll()
|
||||
' Cancello messaggio
|
||||
@@ -312,24 +302,6 @@ Public Class OpenPageUC
|
||||
MessageBrd.Background = Brushes.Tomato
|
||||
OkBtn.IsEnabled = False
|
||||
End If
|
||||
|
||||
' Recupero il percorso del progetto per caricare le immagini
|
||||
SelParkIndWD.sActualProj = sPath
|
||||
Dim ListParkInd As New List(Of ParkInd)
|
||||
SelParkIndWD.LoadParkInd(ListParkInd, OpenScene.GetCtx)
|
||||
If ListParkInd.Count > 2 And GetPrivateProfileInt(S_GENERAL, K_ENABLEDXFPARK, 0, m_MainWindow.GetIniFile) <> 0 Then
|
||||
m_SelParkInd = New SelParkIndWD(m_MainWindow, OpenScene.GetCtx)
|
||||
OpenSceneHost.SetValue(Grid.ColumnSpanProperty, 1)
|
||||
m_SelParkInd.SetValue(Grid.ColumnProperty, 1)
|
||||
SceneHostGrid.Children.Add(m_SelParkInd)
|
||||
Else
|
||||
OpenSceneHost.SetValue(Grid.ColumnSpanProperty, 2)
|
||||
If Not IsNothing(m_SelParkInd) Then
|
||||
SceneHostGrid.Children.Remove(m_SelParkInd)
|
||||
m_SelParkInd = Nothing
|
||||
End If
|
||||
End If
|
||||
|
||||
' Eseguo zoom
|
||||
OpenScene.ZoomAll()
|
||||
Return bOk
|
||||
@@ -503,21 +475,11 @@ Public Class OpenPageUC
|
||||
' Se file dxf devo processarlo opportunamente
|
||||
Dim bFileDxf As Boolean = (EgtGetFileType(m_sCurrFile) = FT.DXF)
|
||||
If bFileDxf Then AdjustSlabDxf()
|
||||
|
||||
' Istruzioni per chiudere OpenPageUC e aprire currentproject
|
||||
m_MainWindow.MainWindowGrid.Children.Remove(m_MainWindow.m_OpenPage)
|
||||
m_MainWindow.MainWindowGrid.Children.Add(m_MainWindow.m_CurrentProjectPageUC)
|
||||
' Lancio caricamento nuovo progetto corrente
|
||||
m_MainWindow.m_CadCutPageUC.m_ProjectMgr.PostLoad(m_sCurrDir, m_sCurrFile)
|
||||
|
||||
'--------------------------------------------------------------------------------
|
||||
' Gestione visulizzazione lista pezzi in parcheggio
|
||||
Dim nProj As Integer = m_MainWindow.m_CurrentProjectPageUC.GetCurrentProject()
|
||||
Dim sNewFileName As String = m_MainWindow.GetSaveDir() & "\" & Math.Abs(nProj).ToString("D4") & "_ParkInd_"
|
||||
SelParkIndWD.CopyImgSvg(sNewFileName, OpenScene.GetCtx)
|
||||
SelParkIndWD.sActualProj = String.Empty
|
||||
'--------------------------------------------------------------------------------
|
||||
|
||||
' Se file dxf
|
||||
If bFileDxf Then
|
||||
' Applico le lavorazioni
|
||||
@@ -551,12 +513,6 @@ Public Class OpenPageUC
|
||||
End Sub
|
||||
|
||||
Private Sub OpenPage_Unloaded(sender As Object, e As RoutedEventArgs)
|
||||
If Not IsNothing(m_SelParkInd) Then
|
||||
SceneHostGrid.Children.Remove(m_SelParkInd)
|
||||
m_SelParkInd = Nothing
|
||||
End If
|
||||
' resetto il nome del progetto corrente
|
||||
SelParkIndWD.sActualProj = String.Empty
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
@@ -43,30 +43,9 @@
|
||||
|
||||
<ToggleButton Name="RegisterBtn"
|
||||
Style="{DynamicResource OmagCut_YellowToggleButton}"></ToggleButton>
|
||||
|
||||
<Button Name="ResetCutBtn"
|
||||
<Button Name="ResetCutBtn"
|
||||
Style="{DynamicResource OmagCut_YellowTextButton}"></Button>
|
||||
|
||||
<Popup Name="ResetCutPopUp"
|
||||
IsOpen="False"
|
||||
AllowsTransparency="False"
|
||||
PopupAnimation="Scroll"
|
||||
StaysOpen="False"
|
||||
Placement="Top"
|
||||
PlacementTarget="{Binding ElementName=ResetCutBtn}">
|
||||
<WrapPanel Orientation="Vertical"
|
||||
Background="{DynamicResource OmagCut_Gray}">
|
||||
<Button x:Name="ResetCut1Btn"
|
||||
Width ="78" Height="78"
|
||||
Style="{DynamicResource OmagCut_YellowTextButton}"></Button>
|
||||
<Button x:Name="ResetCut2Btn"
|
||||
Width ="78" Height="78"
|
||||
Style="{DynamicResource OmagCut_YellowTextButton}"></Button>
|
||||
</WrapPanel>
|
||||
</Popup>
|
||||
|
||||
|
||||
<!--Abilito la selezione delle linee da disegno-->
|
||||
<!--Abilito la selezione delle linee da disegno-->
|
||||
<ToggleButton Name="TestBtn" Style="{DynamicResource OmagCut_YellowIconToggleButton}">
|
||||
<Image Source="{DynamicResource Test-lamaImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||
</ToggleButton>
|
||||
|
||||
@@ -26,8 +26,6 @@ Public Class ProjectMgrUC
|
||||
|
||||
RegisterBtn.Content = "REG" 'Shape Registration
|
||||
ResetCutBtn.Content = EgtMsg(MSG_NESTPAGEUC + 6) 'Reset
|
||||
ResetCut2Btn.Content = EgtMsg(91024) 'Reset lavorazioni
|
||||
ResetCut1Btn.Content = EgtMsg(91025) 'Aggiorna feed/speed
|
||||
SimulateBtn.ToolTip = EgtMsg(MSG_CADCUTPAGEUC + 1) 'Simulate - Simula
|
||||
If m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.OFFICE_TYPE) Then
|
||||
WorkBtn.ToolTip = EgtMsg(MSG_CADCUTPAGEUC + 10) 'Export - Esporta
|
||||
@@ -35,7 +33,7 @@ Public Class ProjectMgrUC
|
||||
WorkBtn.ToolTip = EgtMsg(MSG_CADCUTPAGEUC + 2) 'Work - Lavora
|
||||
End If
|
||||
TestBtn.ToolTip = EgtMsg(90255) 'Test
|
||||
ResetCutBtn.ToolTip = EgtMsg(91241) & vbCrLf & EgtMsg(91242) ' Reset Cuts - Other Reset (Shift)
|
||||
ResetCutBtn.ToolTip = "Reset Cuts" & vbCrLf & "Reset Feed (Shift)"
|
||||
End Sub
|
||||
|
||||
Private Sub ProjectMgrUC_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded
|
||||
@@ -101,21 +99,8 @@ Public Class ProjectMgrUC
|
||||
End If
|
||||
' Scelta tavola della macchina
|
||||
Dim nTabInd As Integer = ChooseTable()
|
||||
|
||||
' Creo una copia di tutte le immagini usata nella lista dei parcheggi
|
||||
Dim ListParkInd As New List(Of ParkInd)
|
||||
SelParkIndWD.LoadParkInd(ListParkInd)
|
||||
' Creo nuovo progetto
|
||||
m_CurrProjPage.NewProject(nTabInd, bRetainParkedParts)
|
||||
|
||||
|
||||
' Gestione visulizzazione lista pezzi in parcheggio
|
||||
m_MainWindow.m_CadCutPageUC.m_NestPage.ReloadListParkInd()
|
||||
Dim sNewFileName As String = SelParkIndWD.GetPathCurrProj()
|
||||
SelParkIndWD.CopyImgSvg(sNewFileName)
|
||||
m_MainWindow.m_CadCutPageUC.m_NestPage.ReloadListParkInd()
|
||||
|
||||
|
||||
' Gestione stato FastGrid
|
||||
m_MainWindow.m_CadCutPageUC.m_FastGridSlabManager.OnPostNewProject()
|
||||
End Sub
|
||||
@@ -123,11 +108,26 @@ Public Class ProjectMgrUC
|
||||
Friend Function ChooseTable() As Integer
|
||||
Dim nTabInd As Integer = 0
|
||||
Select Case GetTableCount()
|
||||
Case 4, 3, 2
|
||||
Dim SelTabWD As New SelectTableWD(m_MainWindow)
|
||||
SelTabWD.ShowDialog()
|
||||
nTabInd = SelTabWD.nSelectedTable
|
||||
SelTabWD.Close()
|
||||
Case 3
|
||||
' Tavolo da usare ?
|
||||
Dim TableToUse As New EgtMsgBox(m_MainWindow, "", EgtMsg(91111), EgtMsgBox.Buttons.ONE_TWO_THREE, EgtMsgBox.Icons.NULL)
|
||||
Select Case TableToUse.m_nPressedBtn
|
||||
Case 1 ' 1
|
||||
nTabInd = 1
|
||||
Case 2 ' 2
|
||||
nTabInd = 2
|
||||
Case 0 ' 3
|
||||
nTabInd = 3
|
||||
End Select
|
||||
Case 2
|
||||
' Tavolo da usare ?
|
||||
Dim TableToUse As New EgtMsgBox(m_MainWindow, "", EgtMsg(91111), EgtMsgBox.Buttons.ONE_TWO, EgtMsgBox.Icons.NULL)
|
||||
Select Case TableToUse.m_nPressedBtn
|
||||
Case 1 ' 1
|
||||
nTabInd = 1
|
||||
Case 0 ' 2
|
||||
nTabInd = 2
|
||||
End Select
|
||||
Case Else
|
||||
nTabInd = 1
|
||||
End Select
|
||||
@@ -140,18 +140,13 @@ Public Class ProjectMgrUC
|
||||
If GetPrivateProfileInt(S_TABLE, K_CHANGETABWD, 0, m_MainWindow.GetMachIniFile()) = 0 Then
|
||||
Return nRes
|
||||
End If
|
||||
Dim nCountTable As Integer = GetTableCount()
|
||||
Select Case nCountTable
|
||||
Case 4, 3, 2
|
||||
' visualizzo l'elenco dei bottoni associati alle tavole disponibili
|
||||
Dim SelTabWD As New SelectTableWD(m_MainWindow)
|
||||
SelTabWD.ShowDialog()
|
||||
If SelTabWD.DialogResult Then
|
||||
nRes = SelTabWD.nSelectedTable
|
||||
End If
|
||||
SelTabWD.Close()
|
||||
Select Case GetTableCount()
|
||||
Case 2
|
||||
' Vuoi cambiare tavola?
|
||||
Dim TableToUse As New EgtMsgBox(m_MainWindow, "", String.Format(EgtMsg(90968)), EgtMsgBox.Buttons.OK_CANCEL, EgtMsgBox.Icons.NULL)
|
||||
nRes = TableToUse.m_nPressedBtn
|
||||
Case Else
|
||||
' non fare nulla
|
||||
' negli altri casi (3 tavole o una tavola non fare nulla)
|
||||
End Select
|
||||
Return nRes
|
||||
End Function
|
||||
@@ -238,9 +233,6 @@ Public Class ProjectMgrUC
|
||||
If m_MainWindow.m_ActivePage = MainWindow.Pages.FrameCut Then
|
||||
ShowAllCurrPhaseMachinings()
|
||||
End If
|
||||
|
||||
'SelParkIndWD.UpdateViewOnParkInd(False)
|
||||
|
||||
EgtDraw()
|
||||
End Sub
|
||||
|
||||
@@ -260,58 +252,11 @@ Public Class ProjectMgrUC
|
||||
End Sub
|
||||
|
||||
Private Sub ResetCutBtn_Click(sender As Object, e As RoutedEventArgs) Handles ResetCutBtn.Click
|
||||
If (Keyboard.Modifiers And ModifierKeys.Shift) > 0 Then
|
||||
If ResetCutPopUp.IsOpen Then
|
||||
ResetCutPopUp.IsOpen = False
|
||||
Else
|
||||
ResetCutPopUp.IsOpen = True
|
||||
End If
|
||||
Else
|
||||
ResetCut3Btn_Click()
|
||||
If (Keyboard.Modifiers And ModifierKeys.Shift) Then
|
||||
' eseguo il ricalcolo delle sole FEED di lavorazione
|
||||
UpdateFeedAllMachining()
|
||||
Return
|
||||
End If
|
||||
End Sub
|
||||
|
||||
' Reimposto le feed di tutte le lavorazioni
|
||||
Private Sub ResetCut1Btn_Click(sender As Object, e As RoutedEventArgs) Handles ResetCut1Btn.Click
|
||||
' eseguo il ricalcolo delle sole FEED di lavorazione
|
||||
UpdateFeedAllMachining()
|
||||
End Sub
|
||||
|
||||
' Reimposto le lavorazioni di default e ripristino i parametri
|
||||
Private Sub ResetCut2Btn_Click(sender As Object, e As RoutedEventArgs) Handles ResetCut2Btn.Click
|
||||
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()
|
||||
' cancello tutti i ponticelli disegnati
|
||||
ResetAllBRidges()
|
||||
' cancella tutti i tagli di separazione inseriti in OFFICE
|
||||
ResetAllSplitCut()
|
||||
|
||||
' assegno la lavorazione corrente per i tagli di lama inclinati (solo se specificato nella ComboBox della ChooseMachinig)
|
||||
RestoreDef_Machinig(True)
|
||||
' assegno la lavorazione corrente per i tagli verticali
|
||||
RestoreDef_Machinig(False)
|
||||
|
||||
' Ricalcolo tutte le lavorazioni
|
||||
Dim nWarn As Integer = 0
|
||||
ResetAllMachinings(nWarn)
|
||||
If nWarn = 1 Then m_CurrProjPage.SetWarningMessage(EgtMsg(MSG_SPLITPAGEUC + 11)) ' Lama troppo grande per utilizzo ventosa
|
||||
' Se eistono elimino i grezzi delle fasi che non contengono lavorazioni
|
||||
ResetAllRawPart()
|
||||
' Aggiorno Info C Home
|
||||
Dim dCHome As Double
|
||||
EgtGetAxisHomePos("C", dCHome)
|
||||
EgtSetInfo(EgtGetFirstNameInGroup(GDB_ID.ROOT, NAME_PROJMARK), INFO_CAXESHOME, DoubleToString(dCHome, 0))
|
||||
' Aggiorno visualizzazione
|
||||
EgtDraw()
|
||||
End Sub
|
||||
|
||||
' Resetta i valori dei parametri (ma non le lavorazioni)
|
||||
Private Sub ResetCut3Btn_Click()
|
||||
EgtSetCurrentContext(m_CurrProjPage.CurrentProjectScene.GetCtx())
|
||||
' Cancello eventuali messaggi
|
||||
m_CurrProjPage.ClearMessage()
|
||||
@@ -388,10 +333,6 @@ Public Class ProjectMgrUC
|
||||
EgtTdbGetCurrToolParam(MCH_TP.DIAM, dHeight)
|
||||
' Raggio lama
|
||||
dHeight = dHeight / 2
|
||||
ElseIf CurrTestTool.ToolIsLaser Then
|
||||
' Raggio
|
||||
dThick = 0
|
||||
dHeight = 0
|
||||
Else
|
||||
' Diametro FRESA/FORETTO (l'altezza non serve: posizione calcolata tiene conto del Tip Tool)
|
||||
EgtTdbGetCurrToolParam(MCH_TP.DIAM, dThick)
|
||||
@@ -430,7 +371,7 @@ Public Class ProjectMgrUC
|
||||
If Not EgtGetTableRef(1, m_ptTabOri) Then Return
|
||||
' recupero il punto medio della curva
|
||||
EgtMidPoint(nIdSelected, GDB_ID.ROOT, ptMid)
|
||||
ptMid.z = m_ptTabOri.z + CamAuto.GetRawHeight() + dHeight + m_MainWindow.m_CurrentMachine.dAdditionalTable
|
||||
ptMid.z = m_ptTabOri.z + CamAuto.GetRawHeight() + dHeight
|
||||
' Offset dovuto allo spessore Utensile
|
||||
ptMid -= vtOffset * dThick
|
||||
|
||||
@@ -458,10 +399,6 @@ Public Class ProjectMgrUC
|
||||
EgtGetCalcAngles(vtDirT, vtPrefAuxDir, nStat, dC1, dB1, dC2, dB2)
|
||||
' Forzo B90
|
||||
dB1 = 90
|
||||
' Forzo la pozione in Z alla quota di Home (per evitare l'errore di fine corsa asse Z)
|
||||
Dim dHomeZ As Double = 0
|
||||
EgtGetAxisHomePos("Z", dHomeZ)
|
||||
ptMid.z = dHomeZ
|
||||
Else
|
||||
' Se utensile speciale
|
||||
If CurrTestTool.ToolType = MCH_TY.MILL_STD Or CurrTestTool.ToolType = MCH_TY.DRILL_STD Then
|
||||
@@ -487,7 +424,6 @@ Public Class ProjectMgrUC
|
||||
' verifica assi lineari
|
||||
EgtVerifyOutstroke(dX, dY, dZ, dC1, dB1, nStat)
|
||||
If nStat <> 0 Then
|
||||
EgtOutLog("Out of stroke: " & nStat)
|
||||
vtDirT = -vtDirT
|
||||
ptMid -= vtDirT * dThick
|
||||
If CurrTestTool.ToolIsSaw Then
|
||||
@@ -519,12 +455,6 @@ Public Class ProjectMgrUC
|
||||
End If
|
||||
' calcolo la posizione degli assi lineari X, Y, Z ( correggere il punto ptMid.z sommando il raggio utensile)
|
||||
EgtGetCalcPositions(ptMid, dC1, dB1, nStat, dX, dY, dZ)
|
||||
|
||||
' verifica assi lineari
|
||||
EgtVerifyOutstroke(dX, dY, dZ, dC1, dB1, nStat)
|
||||
If nStat <> 0 Then
|
||||
EgtOutLog("2nd attemp out of stroke: " & nStat)
|
||||
End If
|
||||
End If
|
||||
|
||||
'--------------------------- Comunico i movimenti in origine macchina al CN ----------------------------------------
|
||||
@@ -1029,7 +959,7 @@ Public Class ProjectMgrUC
|
||||
End If
|
||||
Next
|
||||
Next
|
||||
m_MainWindow.m_CurrentProjectPageUC.SetInfoMessage(EgtMsg(91243) & nMachUpdated & "/ " & nMach) ' Lavorazione aggiornate:
|
||||
m_MainWindow.m_CurrentProjectPageUC.SetInfoMessage("Lavorazione aggiornate: " & nMachUpdated & "/ " & nMach)
|
||||
End Sub
|
||||
|
||||
' ------------------------------------------------ GENERA COMANDI CNC MOVIMENTO ------------------------------------------------
|
||||
@@ -1067,8 +997,7 @@ Public Class ProjectMgrUC
|
||||
'EgtLuaSetGlobNumVar("CMD.SAWTH", dThick)
|
||||
|
||||
EgtTdbSetCurrTool(SelTestTool.ToolName)
|
||||
EgtLuaSetGlobStringVar("CMD.TLNAME", SelTestTool.ToolName)
|
||||
EgtLuaSetGlobStringVar("CMD.TLALIAS", SelTestTool.ToolAlias)
|
||||
EgtLuaSetGlobStringVar("CMD.TLNAME", SelTestTool.ToolAlias)
|
||||
Dim dThick As Double = 0
|
||||
EgtTdbGetCurrToolParam(MCH_TP.THICK, dThick)
|
||||
EgtLuaSetGlobNumVar("CMD.SAWTH", dThick)
|
||||
|
||||
@@ -39,43 +39,6 @@
|
||||
<Button Name="TopViewBtn" Grid.Column="6" Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}">
|
||||
<Image Source="{DynamicResource LookFromTOPImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
<Popup Name="ViewPopUp"
|
||||
IsOpen="False"
|
||||
AllowsTransparency="False"
|
||||
PopupAnimation="Scroll"
|
||||
StaysOpen="False"
|
||||
Placement="Bottom"
|
||||
PlacementTarget="{Binding ElementName=TopViewBtn}">
|
||||
<WrapPanel Orientation="Vertical"
|
||||
Width="78"
|
||||
Background="{DynamicResource OmagCut_Gray}">
|
||||
<Button x:Name="BottomViewBtn"
|
||||
ToolTip="Bottom View"
|
||||
Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}">
|
||||
<Image Source="{DynamicResource LookFromBOTTOMImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
<Button x:Name="FrontViewBtn"
|
||||
ToolTip="Front View"
|
||||
Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}">
|
||||
<Image Source="{DynamicResource LookFromFRONTImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
<Button x:Name="BackViewBtn"
|
||||
ToolTip="Back View"
|
||||
Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}">
|
||||
<Image Source="{DynamicResource LookFromBACKImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
<Button x:Name="LeftViewBtn"
|
||||
ToolTip="Left View"
|
||||
Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}">
|
||||
<Image Source="{DynamicResource LookFromLEFTImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
<Button x:Name="RightViewBtn"
|
||||
ToolTip="Right View"
|
||||
Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}">
|
||||
<Image Source="{DynamicResource LookFromRIGHTImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
</WrapPanel>
|
||||
</Popup>
|
||||
|
||||
</Grid>
|
||||
|
||||
|
||||
@@ -5,10 +5,6 @@ Public Class SceneButtonsUC
|
||||
'Riferimento alla MainWindow
|
||||
Dim m_MainWindow As MainWindow = DirectCast(Application.Current.MainWindow, MainWindow)
|
||||
|
||||
Private Sub Init() Handles Me.Initialized
|
||||
TopViewBtn.ToolTip = EgtMsg(91244) & vbCrLf & EgtMsg(91245) ' Top View - Select View (Shift)
|
||||
End Sub
|
||||
|
||||
Private Sub MeasureBtn_Checked(sender As Object, e As RoutedEventArgs) Handles MeasureBtn.Checked
|
||||
GetCurrScene.SetStatusGetDistance()
|
||||
Dim ptRef1 As Point3d
|
||||
@@ -53,12 +49,6 @@ Public Class SceneButtonsUC
|
||||
'End Sub
|
||||
|
||||
Private Sub PanBtn_Click(sender As Object, e As RoutedEventArgs) Handles PanBtn.Click
|
||||
If Keyboard.IsKeyDown(Key.LeftShift) Then
|
||||
Dim bOrtoGraphic As Boolean = (GetPrivateProfileInt(S_SCENE, K_ORTOGRAPHIC, 1, m_MainWindow.GetIniFile()) <> 0)
|
||||
EgtSetCameraType(Not bOrtoGraphic, True)
|
||||
WritePrivateProfileString(S_SCENE, K_ORTOGRAPHIC, If(Not bOrtoGraphic, "1", "0"), m_MainWindow.GetIniFile())
|
||||
Return
|
||||
End If
|
||||
GetCurrScene.SetStatusPan()
|
||||
End Sub
|
||||
|
||||
@@ -79,35 +69,7 @@ Public Class SceneButtonsUC
|
||||
End Sub
|
||||
|
||||
Private Sub TopViewBtn_Click(sender As Object, e As RoutedEventArgs) Handles TopViewBtn.Click
|
||||
If (Keyboard.Modifiers And ModifierKeys.Shift) > 0 Then
|
||||
If ViewPopUp.IsOpen Then
|
||||
ViewPopUp.IsOpen = False
|
||||
Else
|
||||
ViewPopUp.IsOpen = True
|
||||
End If
|
||||
Else
|
||||
EgtSetView(VT.TOP)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub BottomViewBtn_Click(sender As Object, e As RoutedEventArgs) Handles BottomViewBtn.Click
|
||||
EgtSetView(VT.BOTTOM)
|
||||
End Sub
|
||||
|
||||
Private Sub FrontViewBtn_Click(sender As Object, e As RoutedEventArgs) Handles FrontViewBtn.Click
|
||||
EgtSetView(VT.FRONT)
|
||||
End Sub
|
||||
|
||||
Private Sub BackViewBtn_Click(sender As Object, e As RoutedEventArgs) Handles BackViewBtn.Click
|
||||
EgtSetView(VT.BACK)
|
||||
End Sub
|
||||
|
||||
Private Sub LeftViewBtn_Click(sender As Object, e As RoutedEventArgs) Handles LeftViewBtn.Click
|
||||
EgtSetView(VT.LEFT)
|
||||
End Sub
|
||||
|
||||
Private Sub RightViewBtn_Click(sender As Object, e As RoutedEventArgs) Handles RightViewBtn.Click
|
||||
EgtSetView(VT.RIGHT)
|
||||
EgtSetView(VT.TOP)
|
||||
End Sub
|
||||
|
||||
Private Function GetCurrScene() As EgtUILib.Scene
|
||||
|
||||
@@ -17,7 +17,7 @@ Public Class ScrapsWD
|
||||
m_MainWindow.m_CurrentProjectPageUC.ClearMessage()
|
||||
|
||||
' inserisco il titolo della pagina aperta
|
||||
TitleTxBl.Content = EgtMsg(91246) ' Scraps List
|
||||
TitleTxBl.Content = "Scraps List"
|
||||
ScrapsListBox.ItemsSource = m_ScrapList
|
||||
' definzione posizione finetra
|
||||
Me.Left = 25
|
||||
@@ -137,7 +137,7 @@ Public Class ScrapsWD
|
||||
MyOmagPhotoWD.ShowDialog()
|
||||
Else
|
||||
m_MainWindow.m_CurrentProjectPageUC.ClearMessage()
|
||||
m_MainWindow.m_CurrentProjectPageUC.SetErrorMessage(EgtMsg(91247)) ' Error loading contour scrap
|
||||
m_MainWindow.m_CurrentProjectPageUC.SetErrorMessage("Error loading contour scrap")
|
||||
End If
|
||||
|
||||
' ripristino il contesto corrente dell'immagine
|
||||
|
||||
@@ -347,13 +347,6 @@ Public Class Camera
|
||||
|
||||
' ------------------------------------ accensione riflettori ------------------------------------
|
||||
|
||||
' ------------------------------------ mando la testa in home ------------------------------------
|
||||
If Not GoHomeForPhoto() Then
|
||||
EgtOutLog("Error in positioning")
|
||||
End If
|
||||
|
||||
' ------------------------------------ mando la testa in home ------------------------------------
|
||||
|
||||
' 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"
|
||||
@@ -371,66 +364,6 @@ Public Class Camera
|
||||
Return bOk
|
||||
End Function
|
||||
|
||||
Private Function GoHomeForPhoto() As Boolean
|
||||
Dim bGoHome As Boolean = GetPrivateProfileInt(S_PHOTO, K_ENABELE_GOHOME_FOR_PHOTO, 0, m_MainWindow.GetMachIniFile()) <> 0
|
||||
' Se non configurato esco senza generare errore
|
||||
If Not bGoHome Then Return True
|
||||
' Costruisco il bottone per potere eseguire il comando MDI
|
||||
Dim GoHome As MachineButton = Nothing
|
||||
Dim sDirectCmdFile As String = String.Empty
|
||||
GetPrivateProfileString(S_PHOTO, K_CAMERA_DIRECT_CMD, "", sDirectCmdFile, m_MainWindow.GetMachIniFile())
|
||||
If String.IsNullOrEmpty(sDirectCmdFile) Then
|
||||
Return False
|
||||
Else
|
||||
EgtOutLog("Direct command for positionig head: " & sDirectCmdFile)
|
||||
End If
|
||||
GoHome = New TwoStateButton("", sDirectCmdFile, "", "", "")
|
||||
' eseguo lo script lua associato
|
||||
GoHome.ExecuteMDICommand(GoHome.TLuaScriptName)
|
||||
' Leggo nome variabile posizione home raggiunta
|
||||
Dim CameraStateNameVar As String = String.Empty
|
||||
GetPrivateProfileString(S_PHOTO, K_CAMERA_STATE_VAR, "", CameraStateNameVar, m_MainWindow.GetMachIniFile())
|
||||
Dim nSteps As Integer = 20
|
||||
nSteps = GetPrivateProfileInt(S_PHOTO, K_PENDIG_TIME_FOR_PHOTO, nSteps, m_MainWindow.GetMachIniFile())
|
||||
If String.IsNullOrEmpty(CameraStateNameVar) Then
|
||||
'Return False
|
||||
Else
|
||||
EgtOutLog("Variable for read status of positioning head: " & CameraStateNameVar)
|
||||
End If
|
||||
' 91144=Going home
|
||||
m_MainWindow.m_CurrentProjectPageUC.SetInfoMessage(EgtMsg(91144))
|
||||
UpdateUI()
|
||||
' Eseguo reset variabile posizione home raggiunta
|
||||
m_MainWindow.m_CNCommunication.m_CN.DVariables_WriteVariables2(CameraStateNameVar, "0")
|
||||
System.Threading.Thread.Sleep(300)
|
||||
' Definisco flag posizionamento completato
|
||||
Dim bPositionOk As Boolean = False
|
||||
For I As Integer = 0 To nSteps
|
||||
' Devo rileggere la variabile ad ogni ciclo
|
||||
m_MainWindow.m_CNCommunication.m_CN.ReadEls_Add_Parameter(CameraStateNameVar, 3)
|
||||
System.Threading.Thread.Sleep(100)
|
||||
If m_MainWindow.m_CNCommunication.m_CN.n_DReadELS_handle = 3 Then
|
||||
Dim CameraStateVal As Integer = CInt(m_MainWindow.m_CNCommunication.m_CN.d_DReadELS_value)
|
||||
Select Case CameraStateVal
|
||||
Case 0
|
||||
' Non faccio alcunchè perchè si sta posizionando
|
||||
Case 1
|
||||
' Posizionamento completato
|
||||
bPositionOk = True
|
||||
Exit For
|
||||
Case 2
|
||||
' Errore
|
||||
bPositionOk = False
|
||||
Exit For
|
||||
End Select
|
||||
End If
|
||||
System.Threading.Thread.Sleep(900)
|
||||
Next
|
||||
m_MainWindow.m_CurrentProjectPageUC.ClearMessage()
|
||||
UpdateUI()
|
||||
Return bPositionOk
|
||||
End Function
|
||||
|
||||
Private Function WaitPhoto(nInd As Integer) As Boolean
|
||||
' Ciclo di ricerca foto scattata
|
||||
Dim nMaxThick = 10 * m_nTimeout
|
||||
|
||||
@@ -35,42 +35,7 @@
|
||||
</ComboBox.ItemTemplate>
|
||||
</ComboBox>
|
||||
|
||||
<!--TAGLIO TILTED-->
|
||||
<Grid Grid.Column="1" Grid.Row="2">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="9*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<CheckBox Name ="ApplySawingTiltedChBx" Grid.Column="0"
|
||||
Style="{StaticResource OmagCut_CheckBox_Single}"
|
||||
Margin="1.5,0,0,0"/>
|
||||
<TextBlock Name="CurrSawingTiltedTxBl" Grid.Column="1"
|
||||
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||
</Grid>
|
||||
|
||||
<ComboBox Name="CurrSawingTiltedCmBx" Grid.Column="1" Grid.Row="1">
|
||||
<ComboBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding}" FontSize="20">
|
||||
<TextBlock.Style>
|
||||
<Style TargetType="TextBlock" BasedOn="{StaticResource OmagCut_CurrProjSummeryTextBlock}">
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding ElementName=ApplySawingTiltedChBx, Path=IsChecked}" Value="False">
|
||||
<Setter Property="TextDecorations" Value="Strikethrough"/>
|
||||
<Setter Property="Foreground" Value="{StaticResource OmagCut_White}"/>
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding ElementName=ApplySawingTiltedChBx, Path=IsChecked}" Value="True">
|
||||
<Setter Property="Foreground" Value="Black"/>
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</TextBlock.Style>
|
||||
</TextBlock>
|
||||
</DataTemplate>
|
||||
</ComboBox.ItemTemplate>
|
||||
</ComboBox>
|
||||
|
||||
<!--LAVORAZIONE SECONDARIA-->
|
||||
<!--LAVORAZIONE SECONDARIA-->
|
||||
<TextBlock Name="AuxiliaryMachiningTxBl" Grid.Column="1" Grid.Row="2"
|
||||
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}" Visibility="Hidden"/>
|
||||
<ComboBox Name="AuxiliaryMachiningCmBx" Grid.Column="1" Grid.Row="3" Visibility="Hidden">
|
||||
|
||||
@@ -8,7 +8,6 @@ Public Class ChooseMachining
|
||||
Private m_CurrentMachine As CurrentMachine = m_MainWindow.m_CurrentMachine
|
||||
' Liste che contengono gli elementi appartenenti alle ComboBox
|
||||
Private m_SawingList As New List(Of String)
|
||||
Private m_SawingTiltedList As New List(Of String)
|
||||
Private m_AuxMachTypeList As New List(Of StringIdCmBx)
|
||||
Private m_DrillingList As New List(Of String)
|
||||
Private m_MillingList As New List(Of String)
|
||||
@@ -37,7 +36,6 @@ Public Class ChooseMachining
|
||||
Me.Top = Owner.Top + Owner.Height / 2 - Me.Height
|
||||
Me.Left = Owner.Left + Owner.Width / 2 - Me.Width / 2
|
||||
CurrSawingCmBx.ItemsSource = m_SawingList
|
||||
CurrSawingTiltedCmBx.ItemsSource = m_SawingTiltedList
|
||||
AuxiliaryMachiningCmBx.ItemsSource = m_AuxMachTypeList
|
||||
CurrDrillingCmBx.ItemsSource = m_DrillingList
|
||||
CurrMillingCmBx.ItemsSource = m_MillingList
|
||||
@@ -46,7 +44,6 @@ Public Class ChooseMachining
|
||||
CurrWJettingQualityCmBx.ItemsSource = m_CurrentMachine.Qualities
|
||||
|
||||
CurrSawingTxBl.Text = EgtMsg(MSG_CHOOSEMACHININGPAGEUC + 1)
|
||||
CurrSawingTiltedTxBl.Text = EgtMsg(91023) ' Lavorazione inclinata
|
||||
AuxiliaryMachiningTxBl.Text = EgtMsg(MSG_CHOOSEMACHININGPAGEUC + 2)
|
||||
CurrDrillingTxBl.Text = EgtMsg(MSG_CHOOSEMACHININGPAGEUC + 3)
|
||||
CurrMillingTxBl.Text = EgtMsg(MSG_CHOOSEMACHININGPAGEUC + 4)
|
||||
@@ -72,13 +69,7 @@ Public Class ChooseMachining
|
||||
' -- TAGLIO --
|
||||
CreateMachiningList(MCH_MY.SAWING, m_CurrentMachine.sCurrSaw, m_SawingList)
|
||||
' aggiungo un campo vuoto
|
||||
m_SawingList.Add("")
|
||||
' -- TAGLIO TILTED --
|
||||
CurrSawingTiltedCmBx.IsEnabled = m_MainWindow.m_CurrentMachine.bApplySawingTilted
|
||||
ApplySawingTiltedChBx.IsChecked = m_MainWindow.m_CurrentMachine.bApplySawingTilted
|
||||
CreateMachiningList(MCH_MY.SAWING, m_CurrentMachine.sCurrSawTilted, m_SawingTiltedList)
|
||||
' aggiungo un campo vuoto
|
||||
m_SawingTiltedList.Add("")
|
||||
m_SawingList.Add( "")
|
||||
|
||||
' Verifico la configurazione della macchina per creare i combobox
|
||||
Select Case m_CurrentMachine.MountedToolConfig
|
||||
@@ -87,7 +78,7 @@ Public Class ChooseMachining
|
||||
ChooseMachiningGrid.Children.Remove(AuxiliaryMachiningTxBl)
|
||||
ChooseMachiningGrid.Children.Remove(AuxiliaryMachiningCmBx)
|
||||
|
||||
Case CurrentMachine.MountedToolConfigs.SAWANDAUXTOOL, CurrentMachine.MountedToolConfigs.MANUALTOOLCHANGER, CurrentMachine.MountedToolConfigs.TOOLCHANGER, CurrentMachine.MountedToolConfigs.TOOLCHANGERWITHSAW
|
||||
Case CurrentMachine.MountedToolConfigs.SAWANDAUXTOOL, CurrentMachine.MountedToolConfigs.MANUALTOOLCHANGER, CurrentMachine.MountedToolConfigs.TOOLCHANGER
|
||||
' Creo lista lavorazioni foretto e fresa
|
||||
If m_CurrentMachine.MountedToolConfig = CurrentMachine.MountedToolConfigs.SAWANDAUXTOOL Then
|
||||
CreateMachiningList(MCH_MY.DRILLING, m_CurrentMachine.sCurrDrill, m_DrillingList)
|
||||
@@ -123,10 +114,7 @@ Public Class ChooseMachining
|
||||
|
||||
' ---- MACCHINA CON CAMBIO UTENSILE ----
|
||||
ElseIf m_CurrentMachine.MountedToolConfig = CurrentMachine.MountedToolConfigs.MANUALTOOLCHANGER Or
|
||||
m_CurrentMachine.MountedToolConfig = CurrentMachine.MountedToolConfigs.TOOLCHANGER Or
|
||||
m_CurrentMachine.MountedToolConfig = CurrentMachine.MountedToolConfigs.TOOLCHANGERWITHSAW Then
|
||||
' -- TAGLIO --
|
||||
' Il taglio è aggiunto sempre (all'inizio di questo metodo)
|
||||
m_CurrentMachine.MountedToolConfig = CurrentMachine.MountedToolConfigs.TOOLCHANGER Then
|
||||
' -- FORATURA --
|
||||
CreateMachiningList(MCH_MY.DRILLING, m_DrillingList)
|
||||
' Se la lista è vuota cancello la lavorazione corrente di questo tipo
|
||||
@@ -218,8 +206,7 @@ Public Class ChooseMachining
|
||||
m_AuxMachTypeList.Add(New StringIdCmBx(4, EgtMsg(91069)))
|
||||
End If
|
||||
If m_CurrentMachine.MountedToolConfig = CurrentMachine.MountedToolConfigs.MANUALTOOLCHANGER Or
|
||||
m_CurrentMachine.MountedToolConfig = CurrentMachine.MountedToolConfigs.TOOLCHANGER Or
|
||||
m_CurrentMachine.MountedToolConfig = CurrentMachine.MountedToolConfigs.TOOLCHANGERWITHSAW Then
|
||||
m_CurrentMachine.MountedToolConfig = CurrentMachine.MountedToolConfigs.TOOLCHANGER Then
|
||||
m_AuxMachTypeList.Add(New StringIdCmBx(3, EgtMsg(MSG_CHOOSEMACHININGPAGEUC + 8)))
|
||||
End If
|
||||
End If
|
||||
@@ -503,10 +490,6 @@ Public Class ChooseMachining
|
||||
Dim nDeltaRow As Integer = 4
|
||||
Dim nNewRow As Integer = 2
|
||||
' nascondo tutte le CmBx e TxBl
|
||||
CurrSawingTiltedTxBl.Visibility = Windows.Visibility.Hidden
|
||||
CurrSawingTiltedCmBx.Visibility = Windows.Visibility.Hidden
|
||||
ApplySawingTiltedChBx.Visibility = Windows.Visibility.Hidden
|
||||
CurrSawingTiltedTxBl.Visibility = Windows.Visibility.Hidden
|
||||
CurrDrillingTxBl.Visibility = Windows.Visibility.Hidden
|
||||
CurrDrillingCmBx.Visibility = Windows.Visibility.Hidden
|
||||
CurrMillingTxBl.Visibility = Windows.Visibility.Hidden
|
||||
@@ -516,35 +499,6 @@ Public Class ChooseMachining
|
||||
CurrWJettingTxBl.Visibility = Windows.Visibility.Hidden
|
||||
CurrWJettingCmBx.Visibility = Windows.Visibility.Hidden
|
||||
|
||||
' -- LAMA TILTED -- se definito il cambio utensile con lama
|
||||
'If m_CurrentMachine.MountedToolConfig = CurrentMachine.MountedToolConfigs.TOOLCHANGERWITHSAW Then
|
||||
If Not String.IsNullOrEmpty(m_CurrentMachine.sCurrSawTilted) Then
|
||||
' Definizione di due righe della tabella con la giusta altezza
|
||||
For Index As Integer = 1 To nNewRow
|
||||
Dim Row As New RowDefinition
|
||||
Row.Height = New GridLength(0.5, GridUnitType.Star)
|
||||
ChooseMachiningGrid.RowDefinitions.Add(Row)
|
||||
Next
|
||||
m_RowNumber = m_RowNumber + nNewRow
|
||||
' titolo della ComboBox
|
||||
CurrSawingTiltedTxBl.SetValue(Grid.RowProperty, m_RowNumber - nDeltaRow - nNewRow)
|
||||
' ComboBox (nella riga successiva al titolo)
|
||||
CurrSawingTiltedCmBx.SetValue(Grid.RowProperty, m_RowNumber - nDeltaRow - nNewRow + 1)
|
||||
'ButtonsGrid.SetValue(Grid.RowProperty, 5)
|
||||
If m_CurrentMachine.sCurrSawingTilted <> String.Empty Then
|
||||
CurrSawingTiltedCmBx.SelectedItem = m_CurrentMachine.sCurrSawingTilted
|
||||
End If
|
||||
' verifico che la selezione sia andata a buon fine, altrimenti comunico l'avvenuta modifica
|
||||
If String.IsNullOrEmpty(CurrSawingTiltedCmBx.SelectedItem) Then
|
||||
' verifico che sia stato inserito veramente una lavorazione prima di comunicare una modifica
|
||||
If CurrSawingTiltedCmBx.SelectedItem <> m_CurrentMachine.sCurrSawingTilted Then m_MachIsModified = True
|
||||
End If
|
||||
CurrSawingTiltedTxBl.Visibility = Windows.Visibility.Visible
|
||||
CurrSawingTiltedCmBx.Visibility = Windows.Visibility.Visible
|
||||
ApplySawingTiltedChBx.Visibility = Windows.Visibility.Visible
|
||||
CurrSawingTiltedTxBl.Visibility = Windows.Visibility.Visible
|
||||
End If
|
||||
|
||||
' -- FORATURA -- se foretto presente
|
||||
If m_CurrentMachine.bDrill And m_DrillingList.Count() > 0 Then
|
||||
' Definizione di due righe della tabella con la giusta altezza
|
||||
@@ -667,20 +621,6 @@ Public Class ChooseMachining
|
||||
m_MainWindow.m_CurrentMachine.sCurrSawing = CurrSawingCmBx.SelectedItem.ToString()
|
||||
End Sub
|
||||
|
||||
Private Sub ApplySawingTiltedChBx_Checked() Handles ApplySawingTiltedChBx.Click
|
||||
If ApplySawingTiltedChBx.IsChecked Then
|
||||
CurrSawingTiltedCmBx.IsEnabled = True
|
||||
m_MainWindow.m_CurrentMachine.bApplySawingTilted = True
|
||||
Else
|
||||
CurrSawingTiltedCmBx.IsEnabled = False
|
||||
m_MainWindow.m_CurrentMachine.bApplySawingTilted = False
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub CurrSawingTiltedCmBx_SelectionChanged(sender As Object, e As SelectionChangedEventArgs) Handles CurrSawingTiltedCmBx.SelectionChanged
|
||||
m_MainWindow.m_CurrentMachine.sCurrSawingTilted = CurrSawingTiltedCmBx.SelectedItem.ToString()
|
||||
End Sub
|
||||
|
||||
Private Sub CurrDrillingCmBx_SelectionChanged(sender As Object, e As SelectionChangedEventArgs) Handles CurrDrillingCmBx.SelectionChanged
|
||||
m_MainWindow.m_CurrentMachine.sCurrDrilling = CurrDrillingCmBx.SelectedItem.ToString()
|
||||
End Sub
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
|
||||
FontFamily="{DynamicResource OmagCut_Font}"
|
||||
ResizeMode="NoResize" WindowStyle="None" AllowsTransparency="True" Background="Transparent"
|
||||
Title="ModifStartEndWD" Height="350" Width="320" ShowInTaskbar="False">
|
||||
Title="ModifStartEndWD" Height="250" Width="320" ShowInTaskbar="False">
|
||||
|
||||
<!--Definizione della pagina di scelta del nome con cui salvare il progetto-->
|
||||
<Border Style="{DynamicResource OmagCut_Border}">
|
||||
@@ -28,30 +28,14 @@
|
||||
<RowDefinition Height="0.2*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="0.2*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="0.2*"/>
|
||||
<RowDefinition Height="0.2*"/>
|
||||
<RowDefinition Height="1.5*"/>
|
||||
<RowDefinition Height="0.2*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<TextBlock Name="SelRefTxbl" Grid.Column="1" Grid.Row="1"
|
||||
<TextBlock Name="RefRawTxbl" Grid.Column="1" Grid.Row="1"
|
||||
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||
|
||||
<ComboBox Name="RefTabCmBx" Grid.Column="2" Grid.Row="1" Style="{StaticResource OmagCut_ComboBox}"
|
||||
MaxDropDownHeight="300" Margin="0,0,0,0">
|
||||
<ComboBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding Name}" Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</DataTemplate>
|
||||
</ComboBox.ItemTemplate>
|
||||
</ComboBox>
|
||||
|
||||
|
||||
<TextBlock Name="RefRawTxbl" Grid.Column="1" Grid.Row="3"
|
||||
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||
|
||||
<ComboBox Name="RefTabOrientationCmBx" Grid.Column="2" Grid.Row="3" Style="{StaticResource OmagCut_ComboBox}"
|
||||
|
||||
<ComboBox Name="RefTabModeCmBx" Grid.Column="2" Grid.Row="1" Style="{StaticResource OmagCut_ComboBox}"
|
||||
MaxDropDownHeight="300" Margin="0,0,0,0">
|
||||
<ComboBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
@@ -60,17 +44,17 @@
|
||||
</ComboBox.ItemTemplate>
|
||||
</ComboBox>
|
||||
|
||||
<TextBlock Name="RefTabXTxbl" Grid.Column="1" Grid.Row="5"
|
||||
<TextBlock Name="RefTabXTxbl" Grid.Column="1" Grid.Row="3"
|
||||
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="RefTabXTxBx" Grid.Column="2" Grid.Row="5"
|
||||
<EgtWPFLib:EgtTextBox Name="RefTabXTxBx" Grid.Column="2" Grid.Row="3"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
|
||||
<TextBlock Name="RefTabYTxbl" Grid.Column="1" Grid.Row="7"
|
||||
<TextBlock Name="RefTabYTxbl" Grid.Column="1" Grid.Row="5"
|
||||
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="RefTabYTxBx" Grid.Column="2" Grid.Row="7"
|
||||
<EgtWPFLib:EgtTextBox Name="RefTabYTxBx" Grid.Column="2" Grid.Row="5"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
|
||||
<Grid Name="ButtonsGrid" Grid.Column="1" Grid.ColumnSpan="2" Grid.Row="10" Grid.RowSpan="1">
|
||||
<Grid Name="ButtonsGrid" Grid.Column="1" Grid.ColumnSpan="2" Grid.Row="7" Grid.RowSpan="1">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
Imports System.IO
|
||||
Imports System.Reflection
|
||||
Imports EgtUILib
|
||||
Imports EgtWPFLib
|
||||
|
||||
@@ -13,14 +12,9 @@ Public Class OtherRefTabWD
|
||||
Private m_dPrevOffsetX As Double = 0
|
||||
Private m_dPrevOffsetY As Double = 0
|
||||
|
||||
Private m_bModifX As Boolean = False
|
||||
Private m_bModifY As Boolean = False
|
||||
|
||||
Private m_SelIndex As Integer = 0
|
||||
|
||||
Private m_SelRef As Integer = 0
|
||||
|
||||
Sub New(Owner As Window, PosX As String, PosY As String, OffsetX As Double, OffsetY As Double, OtherRefMode As Integer, SelRef As Integer)
|
||||
Sub New(Owner As Window, PosX As String, PosY As String, OffsetX As Double, OffsetY As Double, OtherRefMode As Integer)
|
||||
Me.Owner = Owner
|
||||
' La chiamata è richiesta dalla finestra di progettazione.
|
||||
InitializeComponent()
|
||||
@@ -31,7 +25,6 @@ Public Class OtherRefTabWD
|
||||
m_dPrevOffsetX = OffsetX
|
||||
m_dPrevOffsetY = OffsetY
|
||||
m_SelIndex = OtherRefMode
|
||||
m_SelRef = SelRef
|
||||
End Sub
|
||||
|
||||
Private Sub OtherRrefTabWD_Initialized(sender As Object, e As EventArgs) Handles Me.Initialized
|
||||
@@ -40,14 +33,11 @@ Public Class OtherRefTabWD
|
||||
' posiziono la finestra
|
||||
Me.Top = Owner.Top + Owner.Height / 4 - Me.Height / 2
|
||||
Me.Left = Owner.Left + Owner.Width / 6 - Me.Width / 2
|
||||
RefRawTxbl.Text = EgtMsg(91248) ' Raw reference
|
||||
RefTabXTxbl.Text = EgtMsg(91249) ' Position X
|
||||
RefTabYTxbl.Text = EgtMsg(91250) ' Position Y
|
||||
SelRefTxbl.Text = EgtMsg(91251) ' Sel reference
|
||||
RefTabOrientationCmBx.ItemsSource = m_RawPartPage.m_OtherRefTabOrientationList
|
||||
RefTabOrientationCmBx.SelectedIndex = m_RawPartPage.m_OtherRefTabPos
|
||||
RefTabCmBx.ItemsSource = m_RawPartPage.m_OtherRefTabList
|
||||
RefTabCmBx.SelectedIndex = m_RawPartPage.m_CurrRefTab
|
||||
RefRawTxbl.Text = "Raw reference"
|
||||
RefTabXTxbl.Text = "Position X"
|
||||
RefTabYTxbl.Text = "Position Y"
|
||||
RefTabModeCmBx.ItemsSource = m_RawPartPage.m_OtherRefTabList
|
||||
RefTabModeCmBx.SelectedIndex = m_RawPartPage.m_OtherRefTabPos
|
||||
End Sub
|
||||
|
||||
Private Sub OtherRrefTabWD_Load(sender As Object, e As EventArgs) Handles Me.Loaded
|
||||
@@ -55,44 +45,9 @@ Public Class OtherRefTabWD
|
||||
RefTabYTxBx.Text = m_sPosY
|
||||
End Sub
|
||||
|
||||
Private Sub RefTabCmBx_SelectionChanged(sender As Object, e As SelectionChangedEventArgs) Handles RefTabCmBx.SelectionChanged
|
||||
If m_bModifX Or m_bModifY Then
|
||||
Dim SaveCurrToolWnd = New EgtMsgBox(m_MainWindow, "", EgtMsg(MSG_EGTMSGBOX + 2), EgtMsgBox.Buttons.YES_NO_CANCEL, EgtMsgBox.Icons.NULL)
|
||||
Select Case SaveCurrToolWnd.m_nPressedBtn
|
||||
Case 0 ' Annulla
|
||||
' annullo l'operazione di cambio indice
|
||||
RefTabCmBx.SelectedIndex = m_RawPartPage.m_CurrRefTab
|
||||
Return
|
||||
Case 1 ' Si
|
||||
' salvo i valori modificati
|
||||
UpdateCurrOffset()
|
||||
' recupero l'oggetto precedentemente selezionato e lo aggiorno (per evitare di rileggere il file ini)
|
||||
Dim temp_RefTab As ReferenceTable = m_RawPartPage.m_OtherRefTabList(m_RawPartPage.m_CurrRefTab)
|
||||
temp_RefTab.dOffsetX = m_RawPartPage.m_OtherRefTabX
|
||||
temp_RefTab.dOffsetY = m_RawPartPage.m_OtherRefTabY
|
||||
temp_RefTab.nPos = m_RawPartPage.m_OtherRefTabPos
|
||||
Case 2 ' No
|
||||
' Non salvo e vado oltre
|
||||
m_bModifX = False
|
||||
m_bModifY = False
|
||||
End Select
|
||||
End If
|
||||
' recupero l'oggetto selezionato
|
||||
Dim local_RefTab As ReferenceTable = m_RawPartPage.m_OtherRefTabList(RefTabCmBx.SelectedIndex)
|
||||
m_RawPartPage.m_CurrRefTab = RefTabCmBx.SelectedIndex
|
||||
' Imposto gli Offset del riferimento selezionato
|
||||
RefTabXTxBx.Text = LenToString(local_RefTab.dOffsetX, 2)
|
||||
m_RawPartPage.m_OtherRefTabX = local_RefTab.dOffsetX
|
||||
RefTabYTxBx.Text = LenToString(local_RefTab.dOffsetY, 2)
|
||||
m_RawPartPage.m_OtherRefTabY = local_RefTab.dOffsetY
|
||||
' Aggiorno la posizine del grezzo
|
||||
m_RawPartPage.RefTabModeChange()
|
||||
m_bModifX = False
|
||||
m_bModifY = False
|
||||
End Sub
|
||||
|
||||
Private Sub RefTabOrientationCmBx_SelectionChanged(sender As Object, e As SelectionChangedEventArgs) Handles RefTabOrientationCmBx.SelectionChanged
|
||||
m_RawPartPage.m_OtherRefTabPos = RefTabOrientationCmBx.SelectedIndex
|
||||
Private Sub RefTabModeCmBx_SelectionChanged(sender As Object, e As SelectionChangedEventArgs) Handles RefTabModeCmBx.SelectionChanged
|
||||
m_RawPartPage.m_OtherRefTabPos = RefTabModeCmBx.SelectedIndex
|
||||
WritePrivateProfileString(S_RAWPART, K_OTHERREFTABPOS, m_RawPartPage.m_OtherRefTabPos.ToString, m_MainWindow.GetIniFile())
|
||||
m_RawPartPage.RefTabModeChange()
|
||||
End Sub
|
||||
|
||||
@@ -111,7 +66,6 @@ Public Class OtherRefTabWD
|
||||
' errore, posizione fuori dalla tavola
|
||||
End If
|
||||
m_RawPartPage.m_OtherRefTabX = dX
|
||||
m_bModifX = True
|
||||
m_RawPartPage.RefTabModeChange()
|
||||
End If
|
||||
End Sub
|
||||
@@ -131,99 +85,24 @@ Public Class OtherRefTabWD
|
||||
' errore, posizione fuori dalla tavola
|
||||
End If
|
||||
m_RawPartPage.m_OtherRefTabY = dY
|
||||
m_bModifY = True
|
||||
m_RawPartPage.RefTabModeChange()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub OkBtn_Click() Handles OkBtn.Click
|
||||
WritePrivateProfileString(S_RAWPART, K_CURRENTREFTAB, m_RawPartPage.m_CurrRefTab.ToString, m_MainWindow.GetIniFile())
|
||||
' Aggiorno il valore del riferimento correntemente modificato
|
||||
UpdateCurrOffset()
|
||||
m_RawPartPage.RefTabModeChange()
|
||||
WritePrivateProfileString(S_RAWPART, K_OTHERREFTABX, DoubleToString(RefTabXTxBx.Text, 2), m_MainWindow.GetIniFile())
|
||||
WritePrivateProfileString(S_RAWPART, K_OTHERREFTABY, DoubleToString(RefTabYTxBx.Text, 2), m_MainWindow.GetIniFile())
|
||||
WritePrivateProfileString(S_RAWPART, K_OTHERREFTABPOS, m_RawPartPage.m_OtherRefTabPos.ToString, m_MainWindow.GetIniFile())
|
||||
Me.Close()
|
||||
End Sub
|
||||
|
||||
Private Sub UpdateCurrOffset()
|
||||
Dim sKeyMsg As String = K_REFTAB & m_RawPartPage.m_CurrRefTab.ToString
|
||||
Dim sValMsg As String = DoubleToString(m_RawPartPage.m_OtherRefTabX, 2) & "," & DoubleToString(m_RawPartPage.m_OtherRefTabY, 2) & "," & m_RawPartPage.m_OtherRefTabPos.ToString
|
||||
WritePrivateProfileString(S_RAWPART, sKeyMsg, sValMsg, m_MainWindow.GetIniFile())
|
||||
End Sub
|
||||
|
||||
Private Sub ExitBtn_Click() Handles ExitBtn.Click
|
||||
' Recupero la prima selezione eseguita
|
||||
m_RawPartPage.m_CurrRefTab = m_SelRef
|
||||
Dim temp_RefTab As ReferenceTable = m_RawPartPage.m_OtherRefTabList(m_RawPartPage.m_CurrRefTab)
|
||||
' aggiorno i valori
|
||||
m_RawPartPage.m_OtherRefTabX = temp_RefTab.dOffsetX
|
||||
m_RawPartPage.m_OtherRefTabY = temp_RefTab.dOffsetY
|
||||
m_RawPartPage.m_OtherRefTabPos = temp_RefTab.nPos
|
||||
' riposiziono l'origine
|
||||
m_RawPartPage.m_OtherRefTabX = m_sPosX
|
||||
m_RawPartPage.m_OtherRefTabY = m_sPosY
|
||||
' ripristino il valore della combobox
|
||||
m_RawPartPage.m_OtherRefTabPos = m_SelIndex
|
||||
m_RawPartPage.RefTabModeChange()
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
Public Class ReferenceTable
|
||||
|
||||
Private m_dOffsetX As Double
|
||||
Private m_dOffsetY As Double
|
||||
Private m_nPos As RawPartPageUC.OTHERREFMODE = RawPartPageUC.OTHERREFMODE.BL
|
||||
Private m_nIndexRef As Integer = 0
|
||||
|
||||
Public Property dOffsetX As Double
|
||||
Get
|
||||
Return m_dOffsetX
|
||||
End Get
|
||||
Set(value As Double)
|
||||
m_dOffsetX = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property dOffsetY As Double
|
||||
Get
|
||||
Return m_dOffsetY
|
||||
End Get
|
||||
Set(value As Double)
|
||||
m_dOffsetY = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property nPos As Integer
|
||||
Get
|
||||
Return m_nPos
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
m_nPos = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property nIndexRef As Integer
|
||||
Get
|
||||
Return m_nIndexRef
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
m_nIndexRef = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property Name As String
|
||||
Get
|
||||
Return "REF_" & m_nIndexRef.ToString()
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly bOk As Boolean = True
|
||||
|
||||
Sub New(sStringFromIni As String, IndexRef As Integer)
|
||||
Dim sItems() As String = sStringFromIni.Split(","c)
|
||||
If sItems.Count = 3 Then
|
||||
bOk = bOk And StringToLen(sItems(0), m_dOffsetX)
|
||||
bOk = bOk And StringToLen(sItems(1), m_dOffsetY)
|
||||
bOk = bOk And StringToInt(sItems(2), m_nPos)
|
||||
m_nIndexRef = IndexRef
|
||||
Else
|
||||
bOk = False
|
||||
End If
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
@@ -142,8 +142,33 @@ Public Class PhotoPageUC
|
||||
Dim sPhoto As String = m_sCurrDir & "\" & m_sCurrFile
|
||||
Dim sContour As String = String.Empty
|
||||
If m_MainWindow.m_Camera.GetCalcContour() Then
|
||||
|
||||
' ----------------------- LANCIO file Batch per eseguire codice Python -----------------------
|
||||
Dim FileBatch As String = "C:\EgtData\OmagCUT\Temp\PostPhotoTemplate.bat"
|
||||
If File.Exists(FileBatch) Then
|
||||
Dim FileBatchCopy As String = "C:\EgtData\OmagCUT\Temp\PostPhoto.bat"
|
||||
Try
|
||||
IO.File.Delete(FileBatchCopy)
|
||||
Catch ex As Exception
|
||||
End Try
|
||||
IO.File.Copy(FileBatch, FileBatchCopy)
|
||||
Dim sFilePhoto As String = Path.GetDirectoryName(sPhoto) & "\" & Path.GetFileNameWithoutExtension(sPhoto)
|
||||
IO.File.WriteAllText(FileBatchCopy, IO.File.ReadAllText(FileBatchCopy).Replace("£_FILE_IMAGE_£", sFilePhoto))
|
||||
' Creo file Dxf del contorno
|
||||
Dim RunPython As Process = Process.Start(FileBatchCopy)
|
||||
While Not RunPython.HasExited
|
||||
' Attendo che il processo sia terminato
|
||||
System.Threading.Thread.Sleep(1000)
|
||||
End While
|
||||
Try
|
||||
IO.File.Delete(FileBatchCopy)
|
||||
Catch ex As Exception
|
||||
End Try
|
||||
End If
|
||||
' ----------------------- LANCIO file Batch per eseguire codice Python -----------------------
|
||||
|
||||
sContour = Path.ChangeExtension(sPhoto, "dxf")
|
||||
End If
|
||||
End If
|
||||
m_MainWindow.m_CadCutPageUC.PostPhoto(sPhoto, sContour)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
@@ -176,9 +176,7 @@
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="3*"/>
|
||||
<ColumnDefinition Width="5*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
@@ -199,11 +197,7 @@
|
||||
<Image Source="{DynamicResource RefTabImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
|
||||
<Button Name="ManualModeBtn" Grid.Column="6" Style="{DynamicResource OmagCut_YellowGradientYellowIconButton}">
|
||||
<Image Source="{DynamicResource ManualImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
|
||||
<Button Name="OkBtn" Grid.Column="8" Style="{DynamicResource OmagCut_GradientBlueIconButton}">
|
||||
<Button Name="OkBtn" Grid.Column="6" Style="{DynamicResource OmagCut_GradientBlueIconButton}">
|
||||
<Image Source="{DynamicResource VImg}" Width="65" Height="65" HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center" />
|
||||
</Button>
|
||||
|
||||
@@ -1,13 +1,12 @@
|
||||
Imports System.IO
|
||||
Imports System.Reflection
|
||||
Imports System.Globalization
|
||||
Imports System.IO
|
||||
Imports System.Windows.Media.Animation
|
||||
Imports EgtUILib
|
||||
Imports EgtWPFLib
|
||||
Imports Microsoft.VisualBasic.Devices
|
||||
|
||||
Public Class RawPartPageUC
|
||||
|
||||
' Dati generali CN
|
||||
' Friend m_CN As CN_generico
|
||||
|
||||
' Riferimento alla MainWindow
|
||||
Dim m_MainWindow As MainWindow = DirectCast(Application.Current.MainWindow, MainWindow)
|
||||
Dim WithEvents m_CurrProjPage As CurrentProjectPageUC
|
||||
@@ -82,23 +81,13 @@ Public Class RawPartPageUC
|
||||
' Costante raggio cerchietto
|
||||
Private Const RAD_CIRCLE As Double = 30
|
||||
|
||||
Private m_nIdMinRedX As Integer = -1
|
||||
Private m_SafetyZone_X = 0
|
||||
Private m_nIdMinRedY As Integer = -1
|
||||
Private m_SafetyZone_Y = 0
|
||||
Private m_bSafetyZoneRight As Boolean = True
|
||||
Private m_bSafetyZoneBottom As Boolean = True
|
||||
Private m_bExistsSafetyZone As Boolean = False
|
||||
|
||||
' Riferimento grezzo
|
||||
Private m_bEnableOtherRefTab As Boolean = False
|
||||
Private m_bOtherRefTab As Boolean
|
||||
Public m_OtherRefTabX As Double = 0 ' offset riferimento corrente
|
||||
Public m_OtherRefTabY As Double = 0 ' offset riferimento corrente
|
||||
Public m_OtherRefTabPos As Integer = 0 ' poisizione riferimento (Bottom-Left, ..)
|
||||
Public m_OtherRefTabOrientationList(3) As String ' oriemtazione riferiemnto
|
||||
Public m_OtherRefTabList As New List(Of ReferenceTable) ' lista dei riferiemneti configurata nel programma
|
||||
Public m_CurrRefTab As Integer = 1 ' inidice del riferimento della lista corrente
|
||||
Public m_OtherRefTabX As Double = 0
|
||||
Public m_OtherRefTabY As Double = 0
|
||||
Public m_OtherRefTabList(3) As String
|
||||
Public m_OtherRefTabPos As Integer = 0
|
||||
Private m_nOtherRefTabLay As Integer = GDB_ID.NULL
|
||||
Private m_OtherRefTabPoint As Point3d
|
||||
|
||||
@@ -129,20 +118,13 @@ Public Class RawPartPageUC
|
||||
FROM_SAW = 7
|
||||
End Enum
|
||||
|
||||
Friend Enum OTHERREFMODE As Integer
|
||||
Private Enum OTHERREFMODE As Integer
|
||||
BL = 0
|
||||
BR = 1
|
||||
TR = 2
|
||||
TL = 3
|
||||
End Enum
|
||||
|
||||
Private Enum STATDRAG As Integer
|
||||
OK = 0
|
||||
X_ = 1
|
||||
_Y = 2
|
||||
XY = 3
|
||||
End Enum
|
||||
|
||||
Private Sub RawPartPage_Initialized(sender As Object, e As EventArgs)
|
||||
|
||||
'Creazione della Page UserControl e relative impostazioni
|
||||
@@ -162,18 +144,18 @@ Public Class RawPartPageUC
|
||||
KerfTxBx.Tag = KerfTxBl
|
||||
|
||||
' Creo lista modalità di definizione del grezzo
|
||||
m_RawModeList(0) = EgtMsg(MSG_RAWPARTPAGEUC + 1) 'Rettangolo
|
||||
m_RawModeList(1) = EgtMsg(MSG_RAWPARTPAGEUC + 2) 'Per Punti
|
||||
m_RawModeList(2) = EgtMsg(MSG_RAWPARTPAGEUC + 30) 'Da Laser
|
||||
m_RawModeList(0) = EgtMsg(MSG_RAWPARTPAGEUC + 1) 'Rettangolo
|
||||
m_RawModeList(1) = EgtMsg(MSG_RAWPARTPAGEUC + 2) 'Per Punti
|
||||
m_RawModeList(2) = EgtMsg(MSG_RAWPARTPAGEUC + 30) 'Da Laser
|
||||
If m_MainWindow.m_CurrentMachine.bSaw Then
|
||||
m_RawModeList(3) = EgtMsg(MSG_DIRECTCUTPAGEUC + 24) 'Da Lama
|
||||
Else
|
||||
' se non insrisco "Lama" allora ridimensiono il vettore
|
||||
ReDim Preserve m_RawModeList(2)
|
||||
End If
|
||||
m_RawModeListEx(0) = EgtMsg(MSG_RAWPARTPAGEUC + 1) 'Rettangolo
|
||||
m_RawModeListEx(1) = EgtMsg(MSG_RAWPARTPAGEUC + 2) 'Per Punti
|
||||
m_RawModeListEx(2) = EgtMsg(MSG_RAWPARTPAGEUC + 30) 'Da Laser
|
||||
m_RawModeListEx(0) = EgtMsg(MSG_RAWPARTPAGEUC + 1) 'Rettangolo
|
||||
m_RawModeListEx(1) = EgtMsg(MSG_RAWPARTPAGEUC + 2) 'Per Punti
|
||||
m_RawModeListEx(2) = EgtMsg(MSG_RAWPARTPAGEUC + 30) 'Da Laser
|
||||
If m_MainWindow.m_CurrentMachine.bSaw Then
|
||||
m_RawModeListEx(3) = EgtMsg(MSG_DIRECTCUTPAGEUC + 24) 'Da Lama
|
||||
m_RawModeListEx(4) = EgtMsg(MSG_RAWPARTPAGEUC + 35) 'Da Fotografia
|
||||
@@ -185,14 +167,14 @@ Public Class RawPartPageUC
|
||||
RawModeCmBx.ItemsSource = m_RawModeList
|
||||
|
||||
' Creo la lista dei riferimenti tavola
|
||||
m_OtherRefTabOrientationList(OTHERREFMODE.BL) = EgtMsg(91221) 'Bottom left
|
||||
m_OtherRefTabOrientationList(OTHERREFMODE.BR) = EgtMsg(91222) 'Bottom right
|
||||
m_OtherRefTabOrientationList(OTHERREFMODE.TR) = EgtMsg(91223) 'Top right
|
||||
m_OtherRefTabOrientationList(OTHERREFMODE.TL) = EgtMsg(91224) 'Top left
|
||||
m_OtherRefTabList(OTHERREFMODE.BL) = "Bottom left"
|
||||
m_OtherRefTabList(OTHERREFMODE.BR) = "Bottom right"
|
||||
m_OtherRefTabList(OTHERREFMODE.TR) = "Top right"
|
||||
m_OtherRefTabList(OTHERREFMODE.TL) = "Top left"
|
||||
|
||||
' lista per selezione RawModeDamaged
|
||||
m_RawModeDamagedList(0) = EgtMsg(MSG_RAWPARTPAGEUC + 2) 'Per Punti
|
||||
m_RawModeDamagedList(1) = EgtMsg(MSG_RAWPARTPAGEUC + 30) 'Da Laser
|
||||
m_RawModeDamagedList(0) = EgtMsg(MSG_RAWPARTPAGEUC + 2) 'Per Punti
|
||||
m_RawModeDamagedList(1) = EgtMsg(MSG_RAWPARTPAGEUC + 30) 'Da Laser
|
||||
If m_MainWindow.m_CurrentMachine.bSaw Then
|
||||
m_RawModeDamagedList(2) = EgtMsg(MSG_DIRECTCUTPAGEUC + 24) 'Da Lama
|
||||
Else
|
||||
@@ -228,11 +210,10 @@ Public Class RawPartPageUC
|
||||
AddBtn.Content = EgtMsg(MSG_RAWPARTPAGEUC + 14) 'Add - Aggiungi
|
||||
RemoveBtn.Content = EgtMsg(MSG_RAWPARTPAGEUC + 15) 'Remove - Rimuovi
|
||||
CloseBtn.Content = EgtMsg(MSG_RAWPARTPAGEUC + 31) 'Close - Chiudi
|
||||
RectangleBtn.Content = EgtMsg(90501) 'Rectangle
|
||||
RectangleBtn.Content = "Rectangle"
|
||||
ConfirmPhotoBtn.Content = EgtMsg(MSG_RAWPARTPAGEUC + 24) 'Conferma
|
||||
|
||||
OtherRefTabTxBl.Text = EgtMsg(91225) 'New Ref On Tab
|
||||
|
||||
OtherRefTabTxBl.Text = "New Ref On Tab"
|
||||
End Sub
|
||||
|
||||
Private Sub RawPartPage_Loaded(sender As Object, e As RoutedEventArgs)
|
||||
@@ -339,23 +320,6 @@ Public Class RawPartPageUC
|
||||
OffsetXTxBx.Text = LenToString(m_RawOffsX, 2)
|
||||
OffsetYTxBx.Text = LenToString(m_RawOffsY, 2)
|
||||
KerfTxBx.Text = LenToString(dInvertKerf * m_RawKerf, 2)
|
||||
|
||||
' Recupero gli ID delle pareti che delimitano l'area Protetta (movimenti in OverZ)
|
||||
Dim nIdBase As Integer = EgtGetBaseId("Base")
|
||||
m_nIdMinRedX = EgtGetFirstNameInGroup(nIdBase, "MinRedX")
|
||||
m_nIdMinRedY = EgtGetFirstNameInGroup(nIdBase, "MinRedY")
|
||||
If m_nIdMinRedY <> GDB_ID.NULL And m_nIdMinRedY <> GDB_ID.NULL Then
|
||||
m_bExistsSafetyZone = True
|
||||
Dim ptMinX, ptMaxX As Point3d
|
||||
EgtGetBBoxGlob(m_nIdMinRedX, GDB_BB.STANDARD, ptMinX, ptMaxX)
|
||||
m_SafetyZone_X = ptMinX.x
|
||||
Dim ptMinY, ptMaxY As Point3d
|
||||
EgtGetBBoxGlob(m_nIdMinRedY, GDB_BB.STANDARD, ptMinY, ptMaxY)
|
||||
m_SafetyZone_Y = ptMinY.y
|
||||
End If
|
||||
' Verifico se attivare la visualizzazione dell'area sicura (prendo la posizione corrente come posizione di partenza)
|
||||
DrawSafetyZone(m_RawHeight, m_CurrentMachine.dHighPieceZ, New Vector3d(0, 0, 0))
|
||||
|
||||
' Creo layer temporaneo per crocette
|
||||
m_nTempLay = EgtCreateGroup(GDB_ID.ROOT)
|
||||
EgtSetLevel(m_nTempLay, GDB_LV.TEMP)
|
||||
@@ -384,6 +348,7 @@ Public Class RawPartPageUC
|
||||
EgtZoom(ZM.ALL)
|
||||
End If
|
||||
'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
|
||||
@@ -403,36 +368,9 @@ Public Class RawPartPageUC
|
||||
OtherRefTabBtn.Visibility = Visibility.Visible
|
||||
End If
|
||||
m_bOtherRefTab = (GetPrivateProfileInt(S_RAWPART, K_OTHERREFTAB, 0, m_MainWindow.GetIniFile()) <> 0)
|
||||
' Recupero il riferimento attivo
|
||||
m_CurrRefTab = GetPrivateProfileInt(S_RAWPART, K_CURRENTREFTAB, 0, m_MainWindow.GetIniFile())
|
||||
' carico l'elenco dei riferimenti da usare
|
||||
LoadRefTabList()
|
||||
' Solo se non esiste una lista allora leggo i valori
|
||||
If m_OtherRefTabList.Count = 0 Then
|
||||
' Versione precedente 2.7c# DEPRECABILE
|
||||
Dim Off_X As Double = -1000
|
||||
Dim Off_Y As Double = -1000
|
||||
Dim Pos_Ind As Integer = -1
|
||||
Off_X = GetPrivateProfileDouble(S_RAWPART, K_OTHERREFTABX, -1000, m_MainWindow.GetIniFile())
|
||||
Off_Y = GetPrivateProfileDouble(S_RAWPART, K_OTHERREFTABY, -1000, m_MainWindow.GetIniFile())
|
||||
Pos_Ind = GetPrivateProfileInt(S_RAWPART, K_OTHERREFTABPOS, -1, m_MainWindow.GetIniFile())
|
||||
If Off_X <> -1000 And Off_Y <> -1000 And Pos_Ind <> -1 Then
|
||||
Dim Local_Text As String = DoubleToString(Off_X, 2) & "," & DoubleToString(Off_Y, 2) & "," & Pos_Ind.ToString
|
||||
Dim local_NewRef As New ReferenceTable(Local_Text, 0)
|
||||
If local_NewRef.bOk Then
|
||||
m_OtherRefTabList.Add(local_NewRef)
|
||||
m_CurrRefTab = 0
|
||||
' Carico i valori
|
||||
m_OtherRefTabX = m_OtherRefTabList(m_CurrRefTab).dOffsetX
|
||||
m_OtherRefTabY = m_OtherRefTabList(m_CurrRefTab).dOffsetY
|
||||
m_OtherRefTabPos = m_OtherRefTabList(m_CurrRefTab).nPos
|
||||
' Creo la nuova configurazione da usare
|
||||
Dim sKeyMsg As String = K_REFTAB & m_CurrRefTab.ToString
|
||||
Dim sValMsg As String = DoubleToString(m_OtherRefTabX, 2) & "," & DoubleToString(m_OtherRefTabY, 2) & "," & m_OtherRefTabPos.ToString
|
||||
WritePrivateProfileString(S_RAWPART, sKeyMsg, sValMsg, m_MainWindow.GetIniFile())
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
m_OtherRefTabX = GetPrivateProfileDouble(S_RAWPART, K_OTHERREFTABX, 0, m_MainWindow.GetIniFile())
|
||||
m_OtherRefTabY = GetPrivateProfileDouble(S_RAWPART, K_OTHERREFTABY, 0, m_MainWindow.GetIniFile())
|
||||
m_OtherRefTabPos = GetPrivateProfileInt(S_RAWPART, K_OTHERREFTABPOS, 0, m_MainWindow.GetIniFile())
|
||||
' RefTabPosCmbx.SelectedIndex = m_OtherRefTabPos
|
||||
OtherRefTabChBx.IsChecked = m_bOtherRefTab
|
||||
' se riferimento tavola differente da quello atteso
|
||||
@@ -451,29 +389,6 @@ Public Class RawPartPageUC
|
||||
' EgtDraw()
|
||||
End Sub
|
||||
|
||||
Private Sub LoadRefTabList()
|
||||
m_OtherRefTabList.Clear()
|
||||
Dim sRefTab As String = String.Empty
|
||||
Dim nIndex As Integer = 0
|
||||
While GetPrivateProfileString(S_RAWPART, K_REFTAB & nIndex.ToString, "", sRefTab, m_MainWindow.GetIniFile()) > 0
|
||||
Dim local_NewRef As New ReferenceTable(sRefTab, nIndex)
|
||||
If local_NewRef.bOk Then
|
||||
m_OtherRefTabList.Add(local_NewRef)
|
||||
nIndex += 1
|
||||
Else
|
||||
EgtOutLog("ERROR in reading RefTab" & nIndex.ToString & " is not correctly defined in file OmagCUT.ini, any other reference will not loaded")
|
||||
Exit While
|
||||
End If
|
||||
End While
|
||||
' Assegno il riferimento corrente
|
||||
If m_CurrRefTab < m_OtherRefTabList.Count Then
|
||||
m_OtherRefTabX = m_OtherRefTabList(m_CurrRefTab).dOffsetX
|
||||
m_OtherRefTabY = m_OtherRefTabList(m_CurrRefTab).dOffsetY
|
||||
m_OtherRefTabPos = m_OtherRefTabList(m_CurrRefTab).nPos
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub OnMyMouseDownScene(sender As Object, e As System.Windows.Forms.MouseEventArgs) Handles m_CurrProjPage.OnMouseDownScene
|
||||
' Verifico di essere il gestore attivo
|
||||
If Not m_bActive Then Return
|
||||
@@ -656,19 +571,6 @@ Public Class RawPartPageUC
|
||||
' Ricavo il punto corrente in coordinate mondo
|
||||
Dim ptCurr As Point3d
|
||||
EgtUnProjectPoint(e.Location, ptCurr)
|
||||
|
||||
' Creo una copia del punto corrente
|
||||
Dim ptTemp As New Point3d(ptCurr.x, ptCurr.y, ptCurr.z)
|
||||
Select Case DrawSafetyZone(m_RawHeight, m_CurrentMachine.dHighPieceZ, ptCurr - m_ptPrev)
|
||||
Case STATDRAG.X_
|
||||
ptCurr.x = m_ptPrev.x
|
||||
Case STATDRAG._Y
|
||||
ptCurr.y = m_ptPrev.y
|
||||
Case STATDRAG.XY
|
||||
m_ptPrev = ptCurr
|
||||
Return
|
||||
End Select
|
||||
|
||||
' Eseguo modifica
|
||||
Select Case m_ActiveRawMode
|
||||
Case RAWMODE.RECTANGLE
|
||||
@@ -679,7 +581,7 @@ Public Class RawPartPageUC
|
||||
ModifyDamaged(ptCurr)
|
||||
End Select
|
||||
' Aggiorno il punto precedente
|
||||
m_ptPrev = ptTemp
|
||||
m_ptPrev = ptCurr
|
||||
' Resetto i ponticelli (per ora non sono in grado di muoverli assieme ai pezzi)
|
||||
ResetAllBRidges()
|
||||
End Sub
|
||||
@@ -862,13 +764,6 @@ Public Class RawPartPageUC
|
||||
If m_bProbingOn Then Return
|
||||
' reimposto il comando OutLine
|
||||
OutlineBtn_Click(Nothing, Nothing)
|
||||
' Nasocndo eventuali pareti
|
||||
If m_bExistsSafetyZone Then
|
||||
' gestisco la visualizzazione delle pareti che delimitano l'area sicura
|
||||
EgtSetStatus(m_nIdMinRedX, GDB_ST.OFF)
|
||||
EgtSetStatus(m_nIdMinRedY, GDB_ST.OFF)
|
||||
End If
|
||||
|
||||
' Se confermata uscita
|
||||
If ExitRawPart(True) Then
|
||||
m_MainWindow.m_CurrentProjectPageUC.CurrentProjectPageGrid.Children.Remove(Me)
|
||||
@@ -1982,7 +1877,7 @@ Public Class RawPartPageUC
|
||||
m_CurrProjPage.ClearMessage()
|
||||
Else
|
||||
OkBtn.IsEnabled = False
|
||||
m_CurrProjPage.SetErrorMessage(EgtMsg(91226)) ' Errore nella posizione o dimensione del grezzo
|
||||
m_CurrProjPage.SetErrorMessage("Errore nella posizione o dimensione del grezzo")
|
||||
End If
|
||||
End Sub
|
||||
|
||||
@@ -2124,8 +2019,6 @@ Public Class RawPartPageUC
|
||||
Dim dInvertKerf As Double = 1
|
||||
EgtGetInfo(EgtGetFirstRawPart(), KEY_INVERT_KERF, dInvertKerf)
|
||||
Dim dMaxLen = m_dTableLength - m_RawOffsX - m_RawKerf * dInvertKerf
|
||||
' Se è attiva l'area sicura allora devo ricalcolare la dimensione massima
|
||||
|
||||
If dLength <= dMaxLen Then
|
||||
m_CurrProjPage.ClearMessage()
|
||||
If dKerf < 0 Then
|
||||
@@ -2170,8 +2063,6 @@ Public Class RawPartPageUC
|
||||
If Not StringToLen(HeightTxBx.Text, dHeight) Then
|
||||
Return
|
||||
End If
|
||||
' verifico se l'altezza del pezzo è maggiore di quella consentita in macchina
|
||||
DrawSafetyZone(dHeight, m_CurrentMachine.dHighPieceZ, New Vector3d(0, 0, 0))
|
||||
If dHeight > -EPS_ZERO Then
|
||||
m_CurrProjPage.ClearMessage()
|
||||
If Math.Abs(dHeight - m_RawHeight) > EPS_SMALL Then
|
||||
@@ -2241,91 +2132,6 @@ Public Class RawPartPageUC
|
||||
End If
|
||||
End Sub
|
||||
|
||||
' Funzione che si occupa di disegnare le pareti dell'area sicura e di gestire il grezzo (
|
||||
Private Function DrawSafetyZone(dHeight As Double, dHighPieceZ As Double, vtMove As Vector3d) As STATDRAG
|
||||
' Se non esiste allora esci senza eseguire controlli
|
||||
If Not m_bExistsSafetyZone Then Return STATDRAG.OK
|
||||
' Verifico se attivare la visualizzazione
|
||||
Dim nStatus As GDB_ST = GDB_ST.OFF
|
||||
If dHeight > dHighPieceZ Then
|
||||
nStatus = GDB_ST.ON_
|
||||
End If
|
||||
' gestisco la visualizzazione delle pareti che delimitano l'area sicura
|
||||
EgtSetStatus(m_nIdMinRedX, nStatus)
|
||||
EgtSetStatus(m_nIdMinRedY, nStatus)
|
||||
EgtDraw()
|
||||
If nStatus = GDB_ST.ON_ Then
|
||||
Return VerifyDimensionRawSafetyZone(vtMove)
|
||||
End If
|
||||
Return STATDRAG.OK
|
||||
End Function
|
||||
|
||||
' Verifica che le dimensioni del grezzo siano conformi con l'area sicura (altrimenti provvedo a ridimensionare il grezzo)
|
||||
Private Function VerifyDimensionRawSafetyZone(vtMove As Vector3d) As STATDRAG
|
||||
Dim nRawSolidId = EgtGetFirstNameInGroup(m_CurrProjPage.m_nRawId, NAME_RAW_SOLID)
|
||||
Dim ptMinRaw, ptMaxRaw As Point3d
|
||||
EgtGetBBoxGlob(nRawSolidId, GDB_BB.STANDARD, ptMinRaw, ptMaxRaw)
|
||||
' Dimensioni grezzo
|
||||
Dim Len_X As Double = ptMaxRaw.x - ptMinRaw.x
|
||||
Dim Wid_Y As Double = ptMaxRaw.y - ptMinRaw.y
|
||||
' Posiztion SafetyZone: RIGHT-BOTTOM
|
||||
Dim RedTab_X = m_dTableLength - Math.Abs(m_SafetyZone_X - m_ptTableMin.x)
|
||||
Dim RedTab_Y = Math.Abs(m_SafetyZone_Y - m_ptTableMin.y)
|
||||
If RedTab_X < Len_X Then
|
||||
' riduco le dimensioni del grezzo
|
||||
m_RawLength = RedTab_X - EPS_SMALL * 10
|
||||
LengthTxBx.Text = LenToString(m_RawLength, 2)
|
||||
UpdateRawPart()
|
||||
End If
|
||||
If RedTab_Y < Wid_Y Then
|
||||
' riduco le dimensioni del grezzo
|
||||
m_RawWidth = RedTab_Y - EPS_SMALL * 10
|
||||
WidthTxBx.Text = LenToString(m_RawWidth, 2)
|
||||
UpdateRawPart()
|
||||
End If
|
||||
Return VerifyRawInSafetyZone(vtMove)
|
||||
End Function
|
||||
|
||||
' Verifico che la posizione del grezzo sia conforme con la posizione di area sicura
|
||||
Private Function VerifyRawInSafetyZone(vtMove As Vector3d) As STATDRAG
|
||||
Dim nStat As STATDRAG = STATDRAG.OK
|
||||
Dim bCalcBBoxRaw As Boolean = False
|
||||
Dim nRawSolidId = EgtGetFirstNameInGroup(m_CurrProjPage.m_nRawId, NAME_RAW_SOLID)
|
||||
Dim ptMinRaw, ptMaxRaw As Point3d
|
||||
EgtGetBBoxGlob(nRawSolidId, GDB_BB.STANDARD, ptMinRaw, ptMaxRaw)
|
||||
' Posiztion SafetyZone: RIGHT-BOTTOM
|
||||
' Verifico che il grezzo sia all'interno di questi estremi
|
||||
If ptMinRaw.x + vtMove.x < m_SafetyZone_X Then
|
||||
' riposiziono il grezzo sulla parete
|
||||
Dim ptRef As Point3d = New Point3d(m_SafetyZone_X - m_ptTableMin.x, ptMinRaw.y - m_ptTableMin.y, 0)
|
||||
EgtMoveToCornerRawPart(m_CurrProjPage.m_nRawId, ptRef, MCH_CR.BL)
|
||||
' aggiorno il valore di Offset
|
||||
m_RawOffsX = m_SafetyZone_X + m_RawKerf - m_ptTableMin.x
|
||||
m_RawOffsY = ptMinRaw.y + m_RawKerf - m_ptTableMin.y
|
||||
OffsetXTxBx.Text = LenToString(m_RawOffsX, 2)
|
||||
OffsetYTxBx.Text = LenToString(m_RawOffsY, 2)
|
||||
bCalcBBoxRaw = True
|
||||
nStat = STATDRAG.X_
|
||||
End If
|
||||
' Ricalcolo la posizione del grezzo se nel processo sopra ho eseguito uno spostamento
|
||||
If bCalcBBoxRaw Then EgtGetBBoxGlob(nRawSolidId, GDB_BB.STANDARD, ptMinRaw, ptMaxRaw)
|
||||
If ptMaxRaw.y + vtMove.y > m_SafetyZone_Y Then
|
||||
Dim dRawWidth As Double = ptMaxRaw.y - ptMinRaw.y
|
||||
Dim ptRef As Point3d = New Point3d(ptMinRaw.x - m_ptTableMin.x, m_SafetyZone_Y - dRawWidth - m_ptTableMin.y, 0)
|
||||
EgtMoveToCornerRawPart(m_CurrProjPage.m_nRawId, ptRef, MCH_CR.BL)
|
||||
m_RawOffsX = ptMinRaw.x + m_RawKerf - m_ptTableMin.x
|
||||
m_RawOffsY = m_SafetyZone_Y - dRawWidth + m_RawKerf - m_ptTableMin.y
|
||||
OffsetXTxBx.Text = LenToString(m_RawOffsX, 2)
|
||||
OffsetYTxBx.Text = LenToString(m_RawOffsY, 2)
|
||||
bCalcBBoxRaw = True
|
||||
nStat = nStat + STATDRAG._Y
|
||||
End If
|
||||
EgtDraw()
|
||||
' Se ho ricalcolato la posizione del BBox grezzo allora ritorno falso
|
||||
Return nStat
|
||||
End Function
|
||||
|
||||
|
||||
#Region "OTHERREFTAB"
|
||||
|
||||
Private Sub OtherRefTabChBx_Click(sender As Object, e As EventArgs) Handles OtherRefTabChBx.Click
|
||||
@@ -2422,19 +2228,11 @@ Public Class RawPartPageUC
|
||||
End Sub
|
||||
|
||||
Private Sub OtherRefTabBtn_Click(sender As Object, e As EventArgs) Handles OtherRefTabBtn.Click
|
||||
' Aggiorno la lista dei riferimenti
|
||||
LoadRefTabList()
|
||||
' apro la finestra per gestire il riferimento
|
||||
Dim OthWD As New OtherRefTabWD(m_MainWindow, LenToString(m_OtherRefTabX, 2), LenToString(m_OtherRefTabY, 2), m_RawOffsX, m_RawOffsY, m_OtherRefTabPos, m_CurrRefTab)
|
||||
Dim OthWD As New OtherRefTabWD(m_MainWindow, LenToString(m_OtherRefTabX, 2), LenToString(m_OtherRefTabY, 2), m_RawOffsX, m_RawOffsY, m_OtherRefTabPos)
|
||||
OthWD.ShowDialog()
|
||||
End Sub
|
||||
|
||||
Private Sub ManualModeBtn_Click(sender As Object, e As RoutedEventArgs) Handles ManualModeBtn.Click
|
||||
' Imposto modalità manuale della macchina
|
||||
Dim nResult As Short = m_MainWindow.m_CNCommunication.m_CN.DGeneralFunctions_WriteCncMode(7) ' Modalità manuale
|
||||
|
||||
End Sub
|
||||
|
||||
#End Region ' OtherRefTab
|
||||
|
||||
Private Sub KerfTxBx_EgtClosed(sender As Object, e As EventArgs) Handles KerfTxBx.EgtClosed
|
||||
@@ -2554,8 +2352,6 @@ Public Class RawPartPageUC
|
||||
KerfTxBx.Text = LenToString(m_RawKerf, 2)
|
||||
m_CurrProjPage.SetErrorMessage(EgtMsg(MSG_RAWPARTPAGEUC + 22) & " " & LenToString(dMaxKerf, 2)) 'Massimo kerf =
|
||||
End If
|
||||
' Verifico se attivare la visualizzazione dell'area sicura (prendo la posizione corrente come posizione di partenza)
|
||||
DrawSafetyZone(m_RawHeight, m_CurrentMachine.dHighPieceZ, New Vector3d(0, 0, 0))
|
||||
End Sub
|
||||
|
||||
Private Sub RawProbingBtn_Click(sender As Object, e As RoutedEventArgs) Handles RawProbingBtn.Click
|
||||
|
||||
|
Before Width: | Height: | Size: 2.3 KiB |
|
Before Width: | Height: | Size: 2.4 KiB |
|
Before Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 6.4 KiB |
|
Before Width: | Height: | Size: 6.3 KiB After Width: | Height: | Size: 8.2 KiB |
|
Before Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 4.0 KiB |
|
Before Width: | Height: | Size: 4.1 KiB |
|
Before Width: | Height: | Size: 4.0 KiB |
|
Before Width: | Height: | Size: 4.0 KiB |
|
Before Width: | Height: | Size: 4.1 KiB |
|
Before Width: | Height: | Size: 6.5 KiB After Width: | Height: | Size: 16 KiB |
@@ -36,7 +36,6 @@ Public Class SimulationPageUC
|
||||
Friend Sub ResetSimulation()
|
||||
' Termino la simulazione
|
||||
SetStatus(MCH_SIM_ST.UI_STOP)
|
||||
System.Threading.Thread.Sleep(250)
|
||||
EgtSimExit()
|
||||
' Salvo valore dello slider
|
||||
Dim sVal As String = DoubleToString(SpeedSlider.Value, 1)
|
||||
@@ -87,15 +86,8 @@ Public Class SimulationPageUC
|
||||
End Sub
|
||||
|
||||
Private Sub SimulationPage_Loaded(sender As Object, e As RoutedEventArgs)
|
||||
EgtOutLog(" -- PREPARE SIMUL --")
|
||||
m_CurrProjPage = m_MainWindow.m_CurrentProjectPageUC
|
||||
Dim bOk As Boolean = True
|
||||
' Visualizzo opportunamente la macchina
|
||||
m_nMachLook = MCH_LOOK.ALL
|
||||
EgtSetMachineLook(m_nMachLook)
|
||||
' Imposto vista 3d isometrica di tutto
|
||||
EgtSetView(VT.ISO_SE, False)
|
||||
EgtZoom(ZM.ALL)
|
||||
' Elimino eventuale attrezzaggio da OmagOFFICE
|
||||
EgtEraseCurrSetup()
|
||||
' Verifico l'attrezzaggio degli utensili utilizzati
|
||||
@@ -118,9 +110,9 @@ Public Class SimulationPageUC
|
||||
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
|
||||
m_CurrProjPage.SetWarningMessage(EgtMsg(90321)) 'Ridotte alcune lavorazioni per evitare interferenze
|
||||
Else
|
||||
m_CurrProjPage.SetInfoMessage(EgtMsg(90399)) 'Aggiornate tutte le lavorazioni
|
||||
m_CurrProjPage.SetInfoMessage(EgtMsg(90399)) 'Aggiornate tutte le lavorazioni
|
||||
End If
|
||||
End If
|
||||
' Costringo ad aggiornare UI
|
||||
@@ -138,7 +130,7 @@ Public Class SimulationPageUC
|
||||
' Se errore in setup, lo segnalo
|
||||
If Not bSetup Then
|
||||
m_CurrProjPage.SetErrorMessage(EgtMsg(90322) & " " & sMissingTools) 'Mancano gli utensili : ...
|
||||
' Se errore in generazione, segnalo l'errore
|
||||
' Se errore in generazione, segnalo l'errore
|
||||
ElseIf Not bOk Then
|
||||
m_CurrProjPage.SetErrorMessage(EgtMsg(90314)) 'Errore nella generazione del programma CN
|
||||
End If
|
||||
@@ -178,7 +170,7 @@ Public Class SimulationPageUC
|
||||
' Nascondo eventuale contorno da foto
|
||||
m_CurrProjPage.ShowContour(False)
|
||||
' Nascondo eventuali testi con dati su aree
|
||||
m_CurrProjPage.SetAreasStatus(False)
|
||||
m_CurrProjPage.SetAreasStatus( false)
|
||||
' Recupero eventuale fase di ripartenza
|
||||
m_nRestart = m_MainWindow.m_CurrentProjectPageUC.GetProjectNcRestart()
|
||||
' Imposto prima fase
|
||||
@@ -186,6 +178,12 @@ Public Class SimulationPageUC
|
||||
ShowAllCurrPhaseMachinings()
|
||||
' Costringo ad aggiornare UI
|
||||
UpdateUI()
|
||||
' Visualizzo opportunamente la macchina
|
||||
m_nMachLook = MCH_LOOK.ALL
|
||||
EgtSetMachineLook(m_nMachLook)
|
||||
' Imposto vista 3d isometrica di tutto
|
||||
EgtSetView(VT.ISO_SE, False)
|
||||
EgtZoom(ZM.ALL)
|
||||
' Registro funzione su aggiornamento interfaccia da sotto
|
||||
EgtSetProcessEvents(m_ProcEventsCallback)
|
||||
EgtSetOutText(m_OutTextCallback)
|
||||
@@ -208,13 +206,6 @@ Public Class SimulationPageUC
|
||||
Else
|
||||
PlayPauseImage.Source = New System.Windows.Media.Imaging.BitmapImage(New Uri("/Resources/NewIcons/Play.png", UriKind.Relative))
|
||||
End If
|
||||
|
||||
Dim nIdBase As Integer = EgtGetBaseId("Base")
|
||||
Dim m_nIdMinRedX = EgtGetFirstNameInGroup(nIdBase, "MinRedX")
|
||||
If m_nIdMinRedX <> GDB_ID.NULL Then EgtSetStatus(m_nIdMinRedX, GDB_ST.OFF)
|
||||
Dim m_nIdMinRedY = EgtGetFirstNameInGroup(nIdBase, "MinRedY")
|
||||
If m_nIdMinRedY <> GDB_ID.NULL Then EgtSetStatus(m_nIdMinRedY, GDB_ST.OFF)
|
||||
EgtOutLog(" -- END PREPARE SIMUL --")
|
||||
End Sub
|
||||
|
||||
Private Sub StepBtn_Click(sender As Object, e As RoutedEventArgs) Handles StepBtn.Click
|
||||
@@ -486,8 +477,7 @@ Public Class SimulationPageUC
|
||||
|
||||
Private Function LoadCurrTools() As Boolean
|
||||
' Se macchina senza cambio utensile automatico devo caricare gli utensili
|
||||
If m_MainWindow.m_CurrentMachine.MountedToolConfig <> CurrentMachine.MountedToolConfigs.TOOLCHANGER And
|
||||
m_MainWindow.m_CurrentMachine.MountedToolConfig <> CurrentMachine.MountedToolConfigs.TOOLCHANGERWITHSAW Then
|
||||
If m_MainWindow.m_CurrentMachine.MountedToolConfig <> CurrentMachine.MountedToolConfigs.TOOLCHANGER Then
|
||||
' Imposto la lama corrente
|
||||
Dim sSaw As String = m_MainWindow.m_CurrentMachine.sCurrSaw
|
||||
If Not EgtLoadTool("H1", 1, sSaw) Then Return False
|
||||
@@ -623,7 +613,7 @@ Public Class SimulationPageUC
|
||||
' Ripristino come fase corrente quella iniziale
|
||||
EgtSetCurrPhase(1)
|
||||
If bOk Then
|
||||
m_CurrProjPage.SetInfoMessage(EgtMsg(90571) & sFileName & m_MainWindow.m_CurrentMachine.sIsoFileExt) ' Genarato file
|
||||
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
|
||||
|
||||