Compare commits

..

11 Commits

Author SHA1 Message Date
Demetrio Cassarino efd2d5d8c9 -Gestione completa cambio tavola 2025-07-22 14:29:19 +02:00
Nicola Pievani da178396f5 Inizio gestione cambio tavola 2025-07-22 12:19:24 +02:00
Nicola Pievani 5e824bf894 Merge branch 'master' into develop 2025-07-21 11:56:32 +02:00
Nicola Pievani 0b24324001 Aggiornamento versione 2.7g1 2025-07-14 08:52:32 +02:00
Nicola Pievani c827a89d94 Merge remote-tracking branch 'origin/Features/Manage_Msg' 2025-07-14 08:48:49 +02:00
Demetrio Cassarino 9518fe951b -corretto condizione photodir in mainwindowm 2025-07-10 11:39:43 +02:00
Demetrio Cassarino 0d81ee5974 -aggiornato messaggi 2025-06-16 08:33:33 +02:00
Nicola Pievani dca88a1aae Aggiornamento versione 2.7f1 2025-06-05 17:11:39 +02:00
Nicola Pievani c433e5b5bd Aggionrnamento programma 2025-06-05 17:01:57 +02:00
Nicola Pievani 07da0b55d4 Gestione parcheggio per gestione posizione pezzi 2025-05-23 11:49:07 +02:00
Nicola Pievani 5c1df0c8d2 Correzione avvio MachiningDBWindow 2025-05-23 11:29:35 +02:00
79 changed files with 4041 additions and 9244 deletions
@@ -295,8 +295,6 @@ Public Class CompoManagerVM
If Not CompoWindowMap.refCompoWindowVM.m_bDrawOk Then If Not CompoWindowMap.refCompoWindowVM.m_bDrawOk Then
Return Return
End If End If
' per il CABINET ridisegno le figure piane e non creo i solidi
CompoWindowMap.refCompoWindowVM.UpdateViewForCabinet()
' Leggo numero di pezzi da inserire ' Leggo numero di pezzi da inserire
Dim InsNbr As Integer Dim InsNbr As Integer
StringToInt(m_PartNum, InsNbr) StringToInt(m_PartNum, InsNbr)
+7 -25
View File
@@ -144,10 +144,9 @@ Public Class CompoWindowVM
#Region "METHODS" #Region "METHODS"
Friend Function MakePreview(ByRef sMsg As String, Optional bDrawSolid As Boolean = True) As Boolean Friend Function MakePreview(ByRef sMsg As String) As Boolean
EgtLuaSetGlobBoolVar("CMP.DrawSolid", bDrawSolid)
If Not EgtLuaExecLine(LUA_CMP_DRAW & "(true)") Then If Not EgtLuaExecLine(LUA_CMP_DRAW & "(true)") Then
sMsg = "Error in component execution" sMsg = EgtMsg(91689) ' Error in component execution
m_bDrawOk = False m_bDrawOk = False
Else Else
EgtLuaGetGlobStringVar(LUA_CMP_VARS & ".MSG", sMsg) EgtLuaGetGlobStringVar(LUA_CMP_VARS & ".MSG", sMsg)
@@ -171,32 +170,20 @@ Public Class CompoWindowVM
Return EgtLuaExecFile(sPath) Return EgtLuaExecFile(sPath)
End Function End Function
Friend Sub UpdateView(Optional bDrawSolid As Boolean = True) Friend Sub UpdateView()
' verifico ci sia un componente corrente ' verifico ci sia un componente corrente
If IsNothing(m_SelCompo) Then If IsNothing(m_SelCompo) Then
Return Return
End If End If
' aggiorno le variabili dalla griglia ' aggiorno le variabili dalla griglia
CompoWindowMap.refCompoParamPageVM.UpdateVariables() CompoWindowMap.refCompoParamPageVM.UpdateVariables()
Dim bResetView As Boolean = True
EgtLuaGetGlobBoolVar("CMP.ResetView", bResetView)
' ricalcolo il disegno ' ricalcolo il disegno
Dim sMsg As String = String.Empty Dim sMsg As String = String.Empty
MakePreview(sMsg, bDrawSolid) MakePreview(sMsg)
CompoWindowMap.refCompoParamPageVM.SetOutputMessage(sMsg, If(m_bDrawOk, MSG_TYPE.INFO, MSG_TYPE.ERROR_)) CompoWindowMap.refCompoParamPageVM.SetOutputMessage(sMsg, If(m_bDrawOk, MSG_TYPE.INFO, MSG_TYPE.ERROR_))
' aggiorno visualizzazione ' aggiorno visualizzazione
If bResetView Then EgtSetView(VT.TOP, False)
EgtSetView(VT.TOP, False) EgtZoom(ZM.ALL)
EgtZoom(ZM.ALL)
Else
EgtDraw()
End If
End Sub
Friend Sub UpdateViewForCabinet(Optional bDrawSolid As Boolean = True)
Dim bIsCabinet As Boolean = False
EgtLuaGetGlobBoolVar("CMP.IsCabinet", bIsCabinet)
If bIsCabinet Then UpdateView(False)
End Sub End Sub
Friend Function MakeInsert(ByVal nNbr As Integer, sName As String) As Boolean Friend Function MakeInsert(ByVal nNbr As Integer, sName As String) As Boolean
@@ -379,8 +366,7 @@ Public Class CompoWindowVM
' identificativo univoico del gruppo di pezzi, se più di un pezzo ' identificativo univoico del gruppo di pezzi, se più di un pezzo
Dim sGUICode As String = String.Empty Dim sGUICode As String = String.Empty
' cancello eventuale layer delle etichette e dimensioni
EgtErase(EgtGetFirstNameInGroup(GDB_ID.ROOT, "Dimensions"))
While Pz <> -1 While Pz <> -1
' imposto il contesto corrente ' imposto il contesto corrente
EgtSetCurrentContext(CompoWindowMap.refCompoSceneHostV.CompoScene.GetCtx()) EgtSetCurrentContext(CompoWindowMap.refCompoSceneHostV.CompoScene.GetCtx())
@@ -394,10 +380,6 @@ Public Class CompoWindowVM
EgtErase(EgtGetFirstNameInGroup(Pz, "Etichette")) EgtErase(EgtGetFirstNameInGroup(Pz, "Etichette"))
EgtErase(EgtGetFirstNameInGroup(Pz, "Quotature")) EgtErase(EgtGetFirstNameInGroup(Pz, "Quotature"))
EgtErase(EgtGetFirstNameInGroup(Pz, "Box")) EgtErase(EgtGetFirstNameInGroup(Pz, "Box"))
' elimino il solido corrispondente
Dim nChild As Integer = GDB_ID.NULL
EgtGetInfo(Pz, "Child", nChild)
EgtErase(nChild)
' Cancello layer etichette dei componenti interni (buchi) ' Cancello layer etichette dei componenti interni (buchi)
Dim nHLId As Integer = EgtGetFirstNameInGroup(Pz, "HoleLabels") Dim nHLId As Integer = EgtGetFirstNameInGroup(Pz, "HoleLabels")
+2 -4
View File
@@ -48,10 +48,6 @@ Module ConstGen
ENABLE_POLISHING = CUInt(2 ^ 18) ' 262144 ENABLE_POLISHING = CUInt(2 ^ 18) ' 262144
OFFICE_TYPE = CUInt(2 ^ 19) ' 524288 - Solo per OmagCUT OFFICE_TYPE = CUInt(2 ^ 19) ' 524288 - Solo per OmagCUT
REGISTRATION = CUInt(2 ^ 20) ' 1048576 - Solo per OmagCUT REGISTRATION = CUInt(2 ^ 20) ' 1048576 - Solo per OmagCUT
' ---
' ---
' ---
VEIN_MATCH_3D = CInt(2 ^ 24) ' 16777216 - Solo per OmagOFFICE
End Enum End Enum
' File di log generale ' File di log generale
@@ -81,5 +77,7 @@ Module ConstGen
Public Const SETUP_LUA As String = "SetUp.lua" Public Const SETUP_LUA As String = "SetUp.lua"
' Sottodirettorio per BackUp ' Sottodirettorio per BackUp
Public Const BACKUP_DIR As String = "BackUp" Public Const BACKUP_DIR As String = "BackUp"
' Info per rotazione in registrazione grezzo
Public Const INFO_REGROT As String = "RegRot"
End Module End Module
+1
View File
@@ -97,6 +97,7 @@ Module ConstIni
Public Const S_SIDES As String = "Sides" Public Const S_SIDES As String = "Sides"
Public Const K_MAXSIDEANGLE As String = "MaxSideAngle" Public Const K_MAXSIDEANGLE As String = "MaxSideAngle"
Public Const K_SIZEALWAYSONTOP As String = "SizeAlwaysOnTop"
Public Const K_PARSIDE_AS_TRF As String = "ParSideAsTrf" Public Const K_PARSIDE_AS_TRF As String = "ParSideAsTrf"
Public Const K_SIDEANGLE As String = "SideAngle" Public Const K_SIDEANGLE As String = "SideAngle"
Public Const K_DELTA_ANG_TG As String = "DeltaAngTg" Public Const K_DELTA_ANG_TG As String = "DeltaAngTg"
+18 -33
View File
@@ -15,9 +15,6 @@ Public Class DxfImportWindowVM
Private m_nFileType As Integer = FT.NULL Private m_nFileType As Integer = FT.NULL
Private m_bEnableTrf As Boolean = False Private m_bEnableTrf As Boolean = False
' in "LoadCurrFile" imposto il valore del parametro per import nge
Private bImportSTD As Boolean = True
Private m_sCad2dName As String Private m_sCad2dName As String
Private m_sCad2dPath As String Private m_sCad2dPath As String
@@ -710,23 +707,13 @@ Public Class DxfImportWindowVM
EgtScale(GDB_ID.SEL, Frame3d.GLOB, 1, 1, 0) EgtScale(GDB_ID.SEL, Frame3d.GLOB, 1, 1, 0)
EgtDeselectAll() EgtDeselectAll()
Case FT.NGE Case FT.NGE
' Carico Nge ' Carico Nge
If Not EgtOpenFile(m_sFilePath) Then Return False If Not EgtOpenFile(m_sFilePath) Then Return False
bImportSTD = True ' Filtro Nge
' Leggo nel file se il progetto arriva dal programma EgtSTONE3D -> bImportSTD = False EstProject.FilterNge()
Dim idGroupStone As Integer = GDB_ID.NULL Case FT_TRF
idGroupStone = EgtGetFirstNameInGroup(GDB_ID.ROOT, "EgtStone3D") ' Carico Trf
If idGroupStone <> GDB_ID.NULL Then If Not ImportTrf(m_sFilePath) Then Return False
bImportSTD = False
EgtErase(idGroupStone)
End If
' Filtro Nge SOLO se importazione STANDARD
If bImportSTD Then
EstProject.FilterNge()
End If
Case FT_TRF
' Carico Trf
If Not ImportTrf(m_sFilePath) Then Return False
Case Else Case Else
Return False Return False
End Select End Select
@@ -1088,20 +1075,18 @@ Public Class DxfImportWindowVM
Public Sub UseRegion(ByVal param As Object) Public Sub UseRegion(ByVal param As Object)
' Creo i pezzi ' Creo i pezzi
If bImportSTD Then Dim nType As Integer = If(m_nFileType = FT.NGE, FPC_TYPE.NGE, FPC_TYPE.REGION)
Dim nType As Integer = If(m_nFileType = FT.NGE, FPC_TYPE.NGE, FPC_TYPE.REGION) Dim dToler As Double = GetPrivateProfileDouble(S_FLATPARTS, K_FLPTOLERANCE, 0.1, IniFile.m_sIniFile)
Dim dToler As Double = GetPrivateProfileDouble(S_FLATPARTS, K_FLPTOLERANCE, 0.1, IniFile.m_sIniFile) EgtCreateAdjustFlatParts(nType, dToler)
EgtCreateAdjustFlatParts(nType, dToler) ' Se prevista gestione colore->angolo di fianco
' Se prevista gestione colore->angolo di fianco If GetPrivateProfileInt(S_COLORTOSIDEANG, K_CTSA_ENABLE, 0, IniFile.m_sIniFile) <> 0 Then
If GetPrivateProfileInt(S_COLORTOSIDEANG, K_CTSA_ENABLE, 0, IniFile.m_sIniFile) <> 0 Then SideEntityControlVM.ColorToSideAngle(DxfImportWindowMap.refDxfImportSceneHostV.ImportDxfScene.GetCtx())
SideEntityControlVM.ColorToSideAngle(DxfImportWindowMap.refDxfImportSceneHostV.ImportDxfScene.GetCtx())
End If
' Se prevista gestione colore->incisioni
If GetPrivateProfileInt(S_COLORTOENGRAVE, K_CTE_ENABLE, 0, IniFile.m_sIniFile) <> 0 Then
SideEntityControlVM.ColorToEngrave(DxfImportWindowMap.refDxfImportSceneHostV.ImportDxfScene.GetCtx())
End If
ColorRegion(DxfImportWindowMap.refDxfImportSceneHostV.ImportDxfScene.GetCtx())
End If End If
' Se prevista gestione colore->incisioni
If GetPrivateProfileInt(S_COLORTOENGRAVE, K_CTE_ENABLE, 0, IniFile.m_sIniFile) <> 0 Then
SideEntityControlVM.ColorToEngrave(DxfImportWindowMap.refDxfImportSceneHostV.ImportDxfScene.GetCtx())
End If
ColorRegion(DxfImportWindowMap.refDxfImportSceneHostV.ImportDxfScene.GetCtx())
' Eseguo zoom ' Eseguo zoom
EgtZoom(ZM.ALL) EgtZoom(ZM.ALL)
' disabilito bottoni UseLayer e UseRegion, abilito bottoni Reset e Insert ' disabilito bottoni UseLayer e UseRegion, abilito bottoni Reset e Insert
+48 -31
View File
@@ -1,5 +1,6 @@
Imports System.Security.Cryptography Imports System.Security.Cryptography
Imports EgtUILib Imports EgtUILib
Imports EgtWPFLib5
Friend Module CamAuto Friend Module CamAuto
@@ -25,9 +26,12 @@ Friend Module CamAuto
bOk = bOk AndAlso EgtLuaCallFunction("CAM.Add") bOk = bOk AndAlso EgtLuaCallFunction("CAM.Add")
EgtLuaGetGlobIntVar("CAM.ERR", nErr) EgtLuaGetGlobIntVar("CAM.ERR", nErr)
EgtLuaResetGlobVar("CAM") EgtLuaResetGlobVar("CAM")
If nErr <> 0 Then If nErr > 0 Then
bOk = False bOk = False
EgtOutLog("Error in CamAuto : " & nErr.ToString()) EgtOutLog("Error in CamAuto : " & nErr.ToString())
ElseIf nErr < 0 Then
EgtOutLog("Warning in CamAuto : " & nErr.ToString())
OmagOFFICEMap.refStatusBarVM.SetOutputMessage(EgtMsg(91017), MSG_TYPE.WARNING)
End If End If
ResetOrderMachiningFlag() ResetOrderMachiningFlag()
Return bOk Return bOk
@@ -43,9 +47,12 @@ Friend Module CamAuto
bOk = bOk AndAlso EgtLuaCallFunction("CAM.AddWaterJet") bOk = bOk AndAlso EgtLuaCallFunction("CAM.AddWaterJet")
EgtLuaGetGlobIntVar("CAM.ERR", nErr) EgtLuaGetGlobIntVar("CAM.ERR", nErr)
EgtLuaResetGlobVar("CAM") EgtLuaResetGlobVar("CAM")
If nErr <> 0 Then If nErr > 0 Then
bOk = False bOk = False
EgtOutLog("Error in CamAuto : " & nErr.ToString()) EgtOutLog("Error in CamAuto : " & nErr.ToString())
' m_MainWindow.m_CurrentProjectPageUC.ClearMessage()
ElseIf nErr < 0 Then
EgtOutLog("Warning in CamAuto : " & nErr.ToString())
End If End If
Return bOk Return bOk
End Function End Function
@@ -63,9 +70,11 @@ Friend Module CamAuto
bOk = bOk AndAlso EgtLuaCallFunction("CAM.AddWaterJets") bOk = bOk AndAlso EgtLuaCallFunction("CAM.AddWaterJets")
EgtLuaGetGlobIntVar("CAM.ERR", nErr) EgtLuaGetGlobIntVar("CAM.ERR", nErr)
EgtLuaResetGlobVar("CAM") EgtLuaResetGlobVar("CAM")
If nErr <> 0 Then If nErr > 0 Then
bOk = False bOk = False
EgtOutLog("Error in CamAuto : " & nErr.ToString()) EgtOutLog("Error in CamAuto : " & nErr.ToString())
ElseIf nErr < 0 Then
EgtOutLog("Warning in CamAuto : " & nErr.ToString())
End If End If
Return bOk Return bOk
End Function End Function
@@ -79,9 +88,11 @@ Friend Module CamAuto
bOk = bOk AndAlso EgtLuaCallFunction("CAM.Erase") bOk = bOk AndAlso EgtLuaCallFunction("CAM.Erase")
EgtLuaGetGlobIntVar("CAM.ERR", nErr) EgtLuaGetGlobIntVar("CAM.ERR", nErr)
EgtLuaResetGlobVar("CAM") EgtLuaResetGlobVar("CAM")
If nErr <> 0 Then If nErr > 0 Then
bOk = False bOk = False
EgtOutLog("Error in CamAuto : " & nErr.ToString()) EgtOutLog("Error in CamAuto : " & nErr.ToString())
ElseIf nErr < 0 Then
EgtOutLog("Warning in CamAuto : " & nErr.ToString())
End If End If
ResetOrderMachiningFlag() ResetOrderMachiningFlag()
Return bOk Return bOk
@@ -96,9 +107,11 @@ Friend Module CamAuto
bOk = bOk AndAlso EgtLuaCallFunction("CAM.InvertVerticalCut") bOk = bOk AndAlso EgtLuaCallFunction("CAM.InvertVerticalCut")
EgtLuaGetGlobIntVar("CAM.ERR", nErr) EgtLuaGetGlobIntVar("CAM.ERR", nErr)
EgtLuaResetGlobVar("CAM") EgtLuaResetGlobVar("CAM")
If nErr <> 0 Then If nErr > 0 Then
bOk = False bOk = False
EgtOutLog("Error in CamAuto : " & nErr.ToString()) EgtOutLog("Error in CamAuto : " & nErr.ToString())
ElseIf nErr < 0 Then
EgtOutLog("Warning in CamAuto : " & nErr.ToString())
End If End If
Return bOk Return bOk
End Function End Function
@@ -109,6 +122,7 @@ Friend Module CamAuto
End Function End Function
Friend Function ResetAllMachinings(ByRef nWarn As Integer) As Boolean Friend Function ResetAllMachinings(ByRef nWarn As Integer) As Boolean
EgtOutLog(" ++ ReserAllMachining ++ ")
' Cancello tutte le lavorazioni ' Cancello tutte le lavorazioni
EraseMachinings(GDB_ID.NULL) EraseMachinings(GDB_ID.NULL)
' Reinserisco tutte le lavorazioni piane (non sono previste le lavorazioni delle cornici) ' Reinserisco tutte le lavorazioni piane (non sono previste le lavorazioni delle cornici)
@@ -293,9 +307,11 @@ Friend Module CamAuto
bOk = bOk AndAlso EgtLuaCallFunction("CAM.UpdateAllTp") bOk = bOk AndAlso EgtLuaCallFunction("CAM.UpdateAllTp")
EgtLuaGetGlobIntVar("CAM.ERR", nErr) EgtLuaGetGlobIntVar("CAM.ERR", nErr)
EgtLuaResetGlobVar("CAM") EgtLuaResetGlobVar("CAM")
If nErr <> 0 Then If nErr > 0 Then
bOk = False bOk = False
EgtOutLog("Error in CamAuto : " & nErr.ToString()) EgtOutLog("Error in CamAuto : " & nErr.ToString())
ElseIf nErr < 0 Then
EgtOutLog("Warning in CamAuto : " & nErr.ToString())
End If End If
Return bOk Return bOk
End Function End Function
@@ -309,9 +325,11 @@ Friend Module CamAuto
bOk = bOk AndAlso EgtLuaCallFunction("CAM.Sort") bOk = bOk AndAlso EgtLuaCallFunction("CAM.Sort")
EgtLuaGetGlobIntVar("CAM.ERR", nErr) EgtLuaGetGlobIntVar("CAM.ERR", nErr)
EgtLuaResetGlobVar("CAM") EgtLuaResetGlobVar("CAM")
If nErr <> 0 Then If nErr > 0 Then
bOk = False bOk = False
EgtOutLog("Error in CamAuto : " & nErr.ToString()) EgtOutLog("Error in CamAuto : " & nErr.ToString())
ElseIf nErr < 0 Then
EgtOutLog("Warning in CamAuto : " & nErr.ToString())
End If End If
Return bOk Return bOk
End Function End Function
@@ -326,9 +344,11 @@ Friend Module CamAuto
bOk = bOk AndAlso EgtLuaCallFunction("CAM.SpecApplyDisp") bOk = bOk AndAlso EgtLuaCallFunction("CAM.SpecApplyDisp")
EgtLuaGetGlobIntVar("CAM.ERR", nErr) EgtLuaGetGlobIntVar("CAM.ERR", nErr)
EgtLuaResetGlobVar("CAM") EgtLuaResetGlobVar("CAM")
If nErr <> 0 Then If nErr > 0 Then
bOk = False bOk = False
EgtOutLog("Error in CamAuto : " & nErr.ToString()) EgtOutLog("Error in CamAuto : " & nErr.ToString())
ElseIf nErr < 0 Then
EgtOutLog("Warning in CamAuto : " & nErr.ToString())
End If End If
If ResetOrderMachiningFlag() Then If ResetOrderMachiningFlag() Then
ResetOrderMachiningFlag() ResetOrderMachiningFlag()
@@ -471,6 +491,7 @@ Friend Module CamAuto
Return EgtRemoveOperationHome(nId) Return EgtRemoveOperationHome(nId)
End Function End Function
' DA AGGIORNARE PER CAMBIO UTENSILE LAMA
Friend Function VerifySetup(ByRef sMissingTools As String) As Boolean Friend Function VerifySetup(ByRef sMissingTools As String) As Boolean
Dim bOk As Boolean = True Dim bOk As Boolean = True
Dim bIsMultiCut = (EgtGetHeadId("H101") <> GDB_ID.NULL) Dim bIsMultiCut = (EgtGetHeadId("H101") <> GDB_ID.NULL)
@@ -882,6 +903,7 @@ Friend Module CamAuto
Private Function SetLuaStandardCamParams(Optional bDripOk As Boolean = True) As Boolean Private Function SetLuaStandardCamParams(Optional bDripOk As Boolean = True) As Boolean
Dim sMaterial As String = CurrentMachine.CurrMat.sName Dim sMaterial As String = CurrentMachine.CurrMat.sName
Dim sSawMch As String = CurrentMachine.sCurrSawing Dim sSawMch As String = CurrentMachine.sCurrSawing
Dim sSawTiltedMch As String = CurrentMachine.sCurrSawingTilted
Dim sMillMch As String = CurrentMachine.sCurrMilling Dim sMillMch As String = CurrentMachine.sCurrMilling
Dim sDrillMch As String = CurrentMachine.sCurrDrilling Dim sDrillMch As String = CurrentMachine.sCurrDrilling
Dim sWaterJetMch As String = CurrentMachine.sCurrWaterJetting Dim sWaterJetMch As String = CurrentMachine.sCurrWaterJetting
@@ -899,6 +921,7 @@ Friend Module CamAuto
Dim dMillingShort As Double = GetPrivateProfileDouble(S_MACH_NEST, K_MACH_MILLING_SHORTENING, 0, CurrentMachine.sMachIniFile) Dim dMillingShort As Double = GetPrivateProfileDouble(S_MACH_NEST, K_MACH_MILLING_SHORTENING, 0, CurrentMachine.sMachIniFile)
EgtLuaSetGlobStringVar("CAM.MATERIAL", sMaterial) EgtLuaSetGlobStringVar("CAM.MATERIAL", sMaterial)
EgtLuaSetGlobStringVar("CAM.SAWMCH", sSawMch) EgtLuaSetGlobStringVar("CAM.SAWMCH", sSawMch)
EgtLuaSetGlobStringVar("CAM.SAWTILTEDMCH", sSawTiltedMch)
EgtLuaSetGlobStringVar("CAM.MILLMCH", sMillMch) EgtLuaSetGlobStringVar("CAM.MILLMCH", sMillMch)
EgtLuaSetGlobStringVar("CAM.DRILLMCH", sDrillMch) EgtLuaSetGlobStringVar("CAM.DRILLMCH", sDrillMch)
EgtLuaSetGlobStringVar("CAM.WATERJETMCH", sWaterJetMch) EgtLuaSetGlobStringVar("CAM.WATERJETMCH", sWaterJetMch)
@@ -919,24 +942,29 @@ Friend Module CamAuto
Return True Return True
End Function End Function
' ver. 2.7f1
Friend Function GetTableCount() As Integer Friend Function GetTableCount() As Integer
If EgtGetTableId(MAIN_TAB) = GDB_ID.NULL Then Return 0 If EgtGetTableId(MAIN_TAB) = GDB_ID.NULL Then Return 0
If EgtGetTableId(SECOND_TAB) = GDB_ID.NULL Then Return 1 If EgtGetTableId(SECOND_TAB) = GDB_ID.NULL Then Return 1
If EgtGetTableId(THIRD_TAB) = GDB_ID.NULL Then Return 2 If EgtGetTableId(THIRD_TAB) = GDB_ID.NULL Then Return 2
Return 3 If EgtGetTableId(FORTH_TAB) = GDB_ID.NULL Then Return 3
Return 4
End Function End Function
Friend Function GetTableName(nInd As Integer) As String Friend Function GetTableName(nInd As Integer) As String
If nInd = 1 Then Return MAIN_TAB If nInd = 1 Then Return MAIN_TAB
If nInd = 2 Then Return SECOND_TAB If nInd = 2 Then Return SECOND_TAB
If nInd = 3 Then Return THIRD_TAB If nInd = 3 Then Return THIRD_TAB
If nInd = 4 Then Return FORTH_TAB
Return "" Return ""
End Function End Function
Friend Function GetCurrentTable() As Integer Friend Function GetCurrentTable() As Integer
Dim sTabName As String = MAIN_TAB Dim sTabName As String = MAIN_TAB
EgtGetTableName(sTabName) EgtGetTableName(sTabName)
If sTabName = THIRD_TAB Then If sTabName = FORTH_TAB Then
Return 4
ElseIf sTabName = THIRD_TAB Then
Return 3 Return 3
ElseIf sTabName = SECOND_TAB Then ElseIf sTabName = SECOND_TAB Then
Return 2 Return 2
@@ -975,27 +1003,6 @@ Friend Module CamAuto
End If End If
End Function End Function
Friend Function GetRawHeightFromPart(CurrIdPart As Integer, VeinCtx As Integer, MachCtx As Integer) As Double
Dim H As Double = 5
EgtSetCurrentContext(MachCtx)
Dim IdRaw As Integer = EgtGetFirstRawPart()
While IdRaw <> GDB_ID.NULL
Dim IdPart As Integer = EgtGetFirstPartInRawPart(IdRaw)
While IdPart <> GDB_ID.NULL
If IdPart = CurrIdPart Then
Dim ptRawMin, ptRawMax As Point3d
EgtGetRawPartBBox(GetCurrentRaw(), ptRawMin, ptRawMax)
EgtSetCurrentContext(VeinCtx)
Return ptRawMax.z - ptRawMin.z
End If
IdPart = EgtGetNextPartInRawPart(IdPart)
End While
IdRaw = EgtGetNextRawPart(IdRaw)
End While
EgtSetCurrentContext(VeinCtx)
Return H
End Function
Friend Function UpdateAllRawsZ(dDeltaZ As Double) As Boolean Friend Function UpdateAllRawsZ(dDeltaZ As Double) As Boolean
For i As Integer = 1 To EgtGetPhaseCount() For i As Integer = 1 To EgtGetPhaseCount()
EgtSetCurrPhase(i) EgtSetCurrPhase(i)
@@ -1437,4 +1444,14 @@ Friend Module CamAuto
Return EgtApplyMachining(False) Return EgtApplyMachining(False)
End Function End Function
Friend Function GetRegistrationRotation() As Double
Dim dRegRot As Double = 0
EgtGetInfo(GetCurrentRaw(), INFO_REGROT, dRegRot)
Return dRegRot
End Function
Friend Function SetRegistrationRotation(dRegRot As Double) As Boolean
Return EgtSetInfo(GetCurrentRaw(), INFO_REGROT, dRegRot)
End Function
End Module End Module
+2
View File
@@ -48,6 +48,7 @@ Module ConstMach
Public Const MAIN_TAB As String = "MainTab" Public Const MAIN_TAB As String = "MainTab"
Public Const SECOND_TAB As String = "2ndTab" Public Const SECOND_TAB As String = "2ndTab"
Public Const THIRD_TAB As String = "3rdTab" Public Const THIRD_TAB As String = "3rdTab"
Public Const FORTH_TAB As String = "4thTab"
' Nome tavola ausiliaria per spostamento finale pezzi ' Nome tavola ausiliaria per spostamento finale pezzi
Public Const AUX_TAB As String = "AuxTab" Public Const AUX_TAB As String = "AuxTab"
@@ -166,6 +167,7 @@ Module ConstMach
' Info in entità da tagliare per affondamento ' Info in entità da tagliare per affondamento
Public Const INFO_DEPTH As String = "Depth" Public Const INFO_DEPTH As String = "Depth"
Public Const INFO_DEPTH2 As String = "Depth2" Public Const INFO_DEPTH2 As String = "Depth2"
Public Const INFO_AGG2 As String = "Agg2"
Public Const INFO_WIDTH As String = "Width" Public Const INFO_WIDTH As String = "Width"
' Info in entità da tagliare per taglio ristretto ' Info in entità da tagliare per taglio ristretto
Public Const INFO_STRICT As String = "Strict" Public Const INFO_STRICT As String = "Strict"
+3
View File
@@ -122,6 +122,7 @@
Public Const K_TAB2_ADDITIONALTABLE As String = "Tab2AdditionalTable" Public Const K_TAB2_ADDITIONALTABLE As String = "Tab2AdditionalTable"
Public Const K_TAB3_ADDITIONALTABLE As String = "Tab3AdditionalTable" Public Const K_TAB3_ADDITIONALTABLE As String = "Tab3AdditionalTable"
Public Const K_CENTER_RAW_ONX As String = "CenterRawOnX" Public Const K_CENTER_RAW_ONX As String = "CenterRawOnX"
Public Const K_CHANGETABWD As String = "ChangeTabWD"
Public Const S_PHOTO As String = "Photo" Public Const S_PHOTO As String = "Photo"
Public Const K_PHOTO_OFFSETX As String = "OffsetX" Public Const K_PHOTO_OFFSETX As String = "OffsetX"
@@ -240,6 +241,7 @@
Public Const S_MACH_MACH As String = "Mach" Public Const S_MACH_MACH As String = "Mach"
Public Const K_CURRSAW As String = "CurrSaw" Public Const K_CURRSAW As String = "CurrSaw"
Public Const K_CURRSAWTILTED As String = "CurrSawTilted"
Public Const K_CURRDRILL As String = "CurrDrill" Public Const K_CURRDRILL As String = "CurrDrill"
Public Const K_CURRMILL As String = "CurrMill" Public Const K_CURRMILL As String = "CurrMill"
Public Const K_CURRMILLNOTIP As String = "CurrMillNoTip" Public Const K_CURRMILLNOTIP As String = "CurrMillNoTip"
@@ -247,6 +249,7 @@
Public Const K_CURRDRIPDRILL As String = "CurrDripDrill" Public Const K_CURRDRIPDRILL As String = "CurrDripDrill"
Public Const K_CURRWATERJET As String = "CurrWaterJet" Public Const K_CURRWATERJET As String = "CurrWaterJet"
Public Const K_CURRSAWING As String = "CurrSawing" Public Const K_CURRSAWING As String = "CurrSawing"
Public Const K_CURRSAWINGTILTED As String = "CurrSawingTilted"
Public Const K_CURRSAWING_OFFICE As String = "CurrOfficeSawing" Public Const K_CURRSAWING_OFFICE As String = "CurrOfficeSawing"
Public Const K_CURRDRILLING As String = "CurrDrilling" Public Const K_CURRDRILLING As String = "CurrDrilling"
Public Const K_CURRDRILLING_OFFICE As String = "CurrOfficeDrilling" Public Const K_CURRDRILLING_OFFICE As String = "CurrOfficeDrilling"
+23
View File
@@ -107,6 +107,7 @@ Public Module CurrentMachine
' Variabili che contengono il nome degli utensili disponibili per tipo ' Variabili che contengono il nome degli utensili disponibili per tipo
Private m_sCurrSaw As String = String.Empty Private m_sCurrSaw As String = String.Empty
Private m_sCurrSawTilted As String = String.Empty
Private m_sCurrDrill As String = String.Empty Private m_sCurrDrill As String = String.Empty
Private m_sCurrMill As String = String.Empty Private m_sCurrMill As String = String.Empty
Private m_sCurrMillNoTip As String = String.Empty Private m_sCurrMillNoTip As String = String.Empty
@@ -116,6 +117,7 @@ Public Module CurrentMachine
' Variabili che contengono le lavorazioni correntemente attive (utilizzate per definire lavorazioni nel programma) ' Variabili che contengono le lavorazioni correntemente attive (utilizzate per definire lavorazioni nel programma)
Private m_sCurrSawing As String = String.Empty Private m_sCurrSawing As String = String.Empty
Private m_sCurrSawingTilted As String = String.Empty
Private m_sCurrDrilling As String = String.Empty Private m_sCurrDrilling As String = String.Empty
Private m_sCurrMilling As String = String.Empty Private m_sCurrMilling As String = String.Empty
Private m_sCurrPocketing As String = String.Empty Private m_sCurrPocketing As String = String.Empty
@@ -731,6 +733,18 @@ Friend Property sCurrMillNoTip As String
End Set End Set
End Property 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 sCurrDrilling As String Friend Property sCurrDrilling As String
Get Get
Return m_sCurrDrilling Return m_sCurrDrilling
@@ -1270,6 +1284,13 @@ Friend Property sCurrMillNoTip As String
' Leggo utensili correnti ' Leggo utensili correnti
' lama ' lama
GetPrivateProfileString(S_MACH_MACH, K_CURRSAW, Nothing, m_sCurrSaw, sMachIniFile) GetPrivateProfileString(S_MACH_MACH, K_CURRSAW, Nothing, m_sCurrSaw, sMachIniFile)
' lama inclinata
If m_nShowToolChanger = 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 ' foretto
GetPrivateProfileString(S_MACH_MACH, K_CURRDRILL, Nothing, m_sCurrDrill, sMachIniFile) GetPrivateProfileString(S_MACH_MACH, K_CURRDRILL, Nothing, m_sCurrDrill, sMachIniFile)
' fresa ' fresa
@@ -1286,6 +1307,8 @@ Friend Property sCurrMillNoTip As String
' Leggo lavorazioni correnti ' Leggo lavorazioni correnti
' lama ' lama
m_sCurrSawing = EstCalc.GetCurrSawing() m_sCurrSawing = EstCalc.GetCurrSawing()
' lama inlicnata
m_sCurrSawingTilted = EstCalc.GetCurrSawingTilted()
' foretto ' foretto
m_sCurrDrilling = EstCalc.GetCurrDrilling() m_sCurrDrilling = EstCalc.GetCurrDrilling()
' fresa ' fresa
+69 -22
View File
@@ -258,6 +258,14 @@ Module EstCalc
Return sCurrSawing Return sCurrSawing
End Function End Function
Friend Function GetCurrSawingTilted() As String
Dim nOperId As Integer = EgtGetFirstNameInGroup(EgtGetCurrMachGroup(), "Opers")
If nOperId = GDB_ID.NULL Then Return ""
Dim sCurrSawing As String = String.Empty
EgtGetInfo(nOperId, INFO_CURRSAWING, sCurrSawing)
Return sCurrSawing
End Function
Friend Function SetCurrMilling(sCurrMilling As String) As Boolean Friend Function SetCurrMilling(sCurrMilling As String) As Boolean
Dim nOperId As Integer = EgtGetFirstNameInGroup(EgtGetCurrMachGroup(), "Opers") Dim nOperId As Integer = EgtGetFirstNameInGroup(EgtGetCurrMachGroup(), "Opers")
If nOperId = GDB_ID.NULL Then Return False If nOperId = GDB_ID.NULL Then Return False
@@ -332,7 +340,7 @@ Module EstCalc
Return (nFlag <> 0) Return (nFlag <> 0)
End Function End Function
Public Function AdjustAdditionalTable() As Boolean Public Function AdjustAdditionalTable(Optional bForced As Boolean = False) As Boolean
' Recupero altezza sottotavola corrente ' Recupero altezza sottotavola corrente
Dim nFixtId As Integer = EgtGetFirstNameInGroup(EgtGetCurrMachGroup(), MACH_FIXT_GROUP) Dim nFixtId As Integer = EgtGetFirstNameInGroup(EgtGetCurrMachGroup(), MACH_FIXT_GROUP)
Dim nAddTabId As Integer = EgtGetFirstNameInGroup(nFixtId, MACH_ADD_TABLE) Dim nAddTabId As Integer = EgtGetFirstNameInGroup(nFixtId, MACH_ADD_TABLE)
@@ -343,18 +351,27 @@ Module EstCalc
dCurrAddTab = b3AddTab.DimZ() dCurrAddTab = b3AddTab.DimZ()
End If End If
' Se valore cambiato, aggiorno... ' Se valore cambiato, aggiorno...
Dim dDeltaZ As Double = dAdditionalTable - dCurrAddTab Dim dDeltaZ As Double = CurrentMachine.dAdditionalTable - dCurrAddTab
If Math.Abs(dDeltaZ) > EPS_SMALL Then 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()
AddAdditionalTable() AddAdditionalTable()
UpdateAllRawsZ(dDeltaZ) UpdateAllRawsZ(dDeltaZ)
' !!! FOTO DA GESTIRE !!! If GetPhoto() <> GDB_ID.NULL Then
'If GetPhoto() <> GDB_ID.NULL Then UpdatePhoto()
' UpdatePhoto() UpdateContour()
' UpdateContour() If EgtGetRawPartCount() > 0 Then
' If EgtGetRawPartCount() > 0 Then ShowPhoto(False)
' ShowPhoto(False) Dim nRawGrpId As Integer = EgtGetFirstRawPart()
' End If While nRawGrpId <> GDB_ID.NULL
'End If 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
If Not bChanged AndAlso bOldEnMod Then EgtEnableModified()
End If End If
Return True Return True
End Function End Function
@@ -726,49 +743,65 @@ Module EstCalc
nLayId = EgtGetNextName(nLayId, NAME_INLOOP) nLayId = EgtGetNextName(nLayId, NAME_INLOOP)
End While End While
' Aggiorno le entità con tallone e quelle con angolo esterno ' Aggiorno le entità con tallone e quelle con angolo esterno
Const AGG_DEPTH As Double = 2.0 Const AGG_DEPTH As Double = 0.75
Dim bSizeOnTop As Boolean = (GetMainPrivateProfileInt(S_SIDES, K_SIZEALWAYSONTOP, 0) <> 0)
For Each nEnt As Integer In vEnt For Each nEnt As Integer In vEnt
' Se aggiornamento vietato, vado oltre ' Se aggiornamento vietato, vado oltre
If EgtExistsInfo( nEnt, INFO_SIDE_FIXED) Then continue for If EgtExistsInfo(nEnt, INFO_SIDE_FIXED) Then Continue For
' Recupero eventuali tallone ed angolo originale ' Recupero eventuali tallone ed angolo originale
Dim dHeel As Double = 0 Dim dHeel As Double = 0
Dim dSideAng As Double = 0 Dim dSideAng As Double = 0
EgtGetInfo(nEnt, INFO_HEEL, dHeel) EgtGetInfo(nEnt, INFO_HEEL, dHeel)
EgtGetInfo(nEnt, INFO_ORIG_SIDE_ANGLE, dSideAng) EgtGetInfo(nEnt, INFO_ORIG_SIDE_ANGLE, dSideAng)
' Se inclinazione con tallone
If Math.Abs(dSideAng) > EPS_ANG_SMALL And dHeel > 10 * EPS_SMALL Then If Math.Abs(dSideAng) > EPS_ANG_SMALL And dHeel > 10 * EPS_SMALL Then
' Angolo esterno ' Inclinazione esterna
If dSideAng > 0 Then If dSideAng > 0 Then
' Se tallone inferiore a spessore ' Se tallone inferiore a spessore
If dHeel < dTh - 10 * EPS_SMALL Then If dHeel < dTh - 10 * EPS_SMALL Then
EgtSetInfo(nEnt, INFO_SIDE_ANGLE, 0.0) EgtSetInfo(nEnt, INFO_SIDE_ANGLE, 0.0)
EgtSetInfo(nEnt, INFO_SIDE_ANGLE2, dSideAng) EgtSetInfo(nEnt, INFO_SIDE_ANGLE2, dSideAng)
EgtSetInfo(nEnt, INFO_OFFSET2, -(dTh - dHeel) * Math.Tan(dSideAng * Math.PI / 180)) If Not bSizeOnTop Then
EgtSetInfo(nEnt, INFO_OFFSET, 0)
EgtSetInfo(nEnt, INFO_OFFSET2, -(dTh - dHeel) * Math.Tan(dSideAng * Math.PI / 180))
Else
EgtSetInfo(nEnt, INFO_OFFSET, (dTh - dHeel) * Math.Tan(dSideAng * Math.PI / 180))
EgtSetInfo(nEnt, INFO_OFFSET2, 0)
End If
EgtSetInfo(nEnt, INFO_DEPTH2, (dTh - dHeel) + AGG_DEPTH) EgtSetInfo(nEnt, INFO_DEPTH2, (dTh - dHeel) + AGG_DEPTH)
' altrimenti, tallone superiore a spessore -> non c'è taglio inclinato EgtSetInfo(nEnt, INFO_AGG2, AGG_DEPTH)
' altrimenti, tallone superiore a spessore -> non c'è taglio inclinato
Else Else
EgtSetInfo(nEnt, INFO_SIDE_ANGLE, 0.0) EgtSetInfo(nEnt, INFO_SIDE_ANGLE, 0.0)
EgtSetInfo(nEnt, INFO_SIDE_ANGLE2, 0.0) EgtSetInfo(nEnt, INFO_SIDE_ANGLE2, 0.0)
EgtRemoveInfo(nEnt, INFO_OFFSET2) EgtRemoveInfo(nEnt, INFO_OFFSET2)
EgtRemoveInfo(nEnt, INFO_DEPTH2) EgtRemoveInfo(nEnt, INFO_DEPTH2)
EgtRemoveInfo(nEnt, INFO_AGG2)
End If End If
' Angolo interno ' Inclinazione interna
Else Else
' Se tallone inferiore a spessore ' Se tallone inferiore a spessore
If dHeel < dTh - 10 * EPS_SMALL Then If dHeel < dTh - 10 * EPS_SMALL Then
EgtSetInfo(nEnt, INFO_OFFSET, dHeel * Math.Tan(-dSideAng * Math.PI / 180)) EgtSetInfo(nEnt, INFO_OFFSET, dHeel * Math.Tan(-dSideAng * Math.PI / 180))
EgtSetInfo(nEnt, INFO_SIDE_ANGLE2, 0.0) EgtSetInfo(nEnt, INFO_SIDE_ANGLE2, 0.0)
EgtSetInfo(nEnt, INFO_DEPTH2, dHeel + AGG_DEPTH) EgtSetInfo(nEnt, INFO_DEPTH2, dHeel + AGG_DEPTH)
' altrimenti, tallone superiore a spessore -> non c'è taglio inclinato EgtSetInfo(nEnt, INFO_AGG2, AGG_DEPTH)
' altrimenti, tallone superiore a spessore -> non c'è taglio inclinato
Else Else
EgtSetInfo(nEnt, INFO_SIDE_ANGLE, 0.0) EgtSetInfo(nEnt, INFO_SIDE_ANGLE, 0.0)
EgtRemoveInfo(nEnt, INFO_OFFSET) EgtRemoveInfo(nEnt, INFO_OFFSET)
EgtRemoveInfo(nEnt, INFO_SIDE_ANGLE2) EgtRemoveInfo(nEnt, INFO_SIDE_ANGLE2)
EgtRemoveInfo(nEnt, INFO_DEPTH2) EgtRemoveInfo(nEnt, INFO_DEPTH2)
EgtRemoveInfo(nEnt, INFO_AGG2)
End If End If
End If End If
' Se altrimenti inclinazione esterna ' Se altrimenti inclinazione esterna
ElseIf dSideAng > EPS_ANG_SMALL Then ElseIf dSideAng > EPS_ANG_SMALL Then
EgtSetInfo(nEnt, INFO_OFFSET, -dTh * Math.Tan(dSideAng * Math.PI / 180)) If Not bSizeOnTop Then
EgtSetInfo(nEnt, INFO_OFFSET, -dTh * Math.Tan(dSideAng * Math.PI / 180))
Else
EgtSetInfo(nEnt, INFO_OFFSET, 0)
End If
End If End If
Next Next
Return True Return True
@@ -990,8 +1023,22 @@ Module EstCalc
Const STORE_DIST As Double = 200 Const STORE_DIST As Double = 200
' 40 il Font usato per indicare il numero di pezzi in parcheggio "# N" ' 40 il Font usato per indicare il numero di pezzi in parcheggio "# N"
Const STORE_OFFS As Double = 20 + 40 + 20 Const STORE_OFFS As Double = 20 + 40 + 20
Dim dStXmin As Double = b3Tab.Min().x - 0.5 * (STORE_LARGH - b3Tab.DimX()) Dim dStoreLarg As Double = GetPrivateProfileDouble("Store", "StoreLargh", STORE_LARGH, CurrentMachine.sMachIniFile)
Return EgtPackBox(nId, dStXmin, -INFINITO, dStXmin + STORE_LARGH, b3Tab.Min().y - STORE_DIST, STORE_OFFS, False) Dim dStoreDist As Double = GetPrivateProfileDouble("Store", "StoreDist", STORE_DIST, CurrentMachine.sMachIniFile)
Dim dStoreOffs As Double = GetPrivateProfileDouble("Store", "StoreOffs", STORE_OFFS, CurrentMachine.sMachIniFile)
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 End Function
Friend Function VerifyPartsNesting(bReducedCut As Boolean) As Boolean Friend Function VerifyPartsNesting(bReducedCut As Boolean) As Boolean
+31
View File
@@ -0,0 +1,31 @@
<Window x:Class="VeinMatchingWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Height="500" Width="500" ShowInTaskbar="False" Initialized="Window_Initialized" MinWidth="300" MinHeight="300">
<Grid Name="VeinMatchingGrid" Background="{StaticResource Omag_Gray}">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="91"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<StackPanel Orientation="Vertical">
<ToggleButton Name="ShowTextBtn" Height="40" Width="80"
Margin="0,5,0,0"/>
<ToggleButton Name="EditBtn" Height="40" Width="80"
Margin="0,5,0,0"/>
<ToggleButton Name="VerifyBtn" Height="40" Width="80"
Margin="0,5,0,0"/>
<ToggleButton Name="MagneticBtn" Height="40" Width="80"
Visibility="Collapsed"
Margin="0,5,0,0"/>
<Button Name="ExportBtn" Height="40" Width="80"
Margin="0,5,0,0"/>
<Button Name="AssemblyBtn" Height="40" Width="80"
Margin="0,5,0,0"
Content="3D"/>
</StackPanel>
</Grid>
</Window>
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -78,7 +78,7 @@ Public Class PrintPanelVM
tmpImg.Stretch = Stretch.Uniform tmpImg.Stretch = Stretch.Uniform
tmpImg.EndInit() tmpImg.EndInit()
' eseguo la stampa ' eseguo la stampa
printDlg.PrintVisual(tmpImg, "Parts Layout") printDlg.PrintVisual(tmpImg, EgtMsg(91688)) ' Parts Layout
Catch Catch
' Rrror in executing print ' Rrror in executing print
EgtOutLog(EgtMsg(50182)) EgtOutLog(EgtMsg(50182))
+2 -2
View File
@@ -576,13 +576,13 @@ Public Class MachOptionWindowVM
Public ReadOnly Property OkMsg As String Public ReadOnly Property OkMsg As String
Get Get
Return "Ok" Return EgtMsg(91651) ' Ok
End Get End Get
End Property End Property
Public ReadOnly Property CancelMsg As String Public ReadOnly Property CancelMsg As String
Get Get
Return "Cancel" Return EgtMsg(91652) ' Cancel
End Get End Get
End Property End Property
+3 -4
View File
@@ -228,8 +228,8 @@ Public Class MainWindowM
' Verifico abilitazione nesting automatico ' Verifico abilitazione nesting automatico
m_bAutoNestOption = Not String.IsNullOrWhiteSpace( sNestKey) m_bAutoNestOption = Not String.IsNullOrWhiteSpace( sNestKey)
' Recupero livello e opzioni della chiave ' Recupero livello e opzioni della chiave
Dim bKey As Boolean = EgtGetKeyLevel(9423, 2612, 1, m_nKeyLevel) And Dim bKey As Boolean = EgtGetKeyLevel(9423, 2707, 1, m_nKeyLevel) And
EgtGetKeyOptions(9423, 2612, 1, m_nKeyOptions) EgtGetKeyOptions(9423, 2707, 1, m_nKeyOptions)
' Verifico abilitazione prodotto ' Verifico abilitazione prodotto
Dim bProd As Boolean = GetKeyOption(KEY_OPT.OFFICE_BASE) Dim bProd As Boolean = GetKeyOption(KEY_OPT.OFFICE_BASE)
' Inizializzazione generale di EgtInterface ' Inizializzazione generale di EgtInterface
@@ -291,7 +291,7 @@ Public Class MainWindowM
' Leggo nome cartella delle foto ' Leggo nome cartella delle foto
GetMainPrivateProfileString(S_GENERAL, K_PHOTODIR, sDataRoot & "\Data", m_sPhotoDir) GetMainPrivateProfileString(S_GENERAL, K_PHOTODIR, sDataRoot & "\Data", m_sPhotoDir)
' Creo connessione al Db ' Creo connessione al Db
If m_SlabDB And Not ManageDb.ConnectToDb(m_sPhotoDir & "\" & DB_FILENAME) Then If m_SlabDB AndAlso Not ManageDb.ConnectToDb(m_sPhotoDir & "\" & DB_FILENAME) Then
EgtOutLog("Error connecting to DB") EgtOutLog("Error connecting to DB")
MessageBox.Show(EgtMsg(92000 + 1), EgtMsg(MSG_EGTMSGBOX + 15), MessageBoxButton.OK, MessageBoxImage.Error) MessageBox.Show(EgtMsg(92000 + 1), EgtMsg(MSG_EGTMSGBOX + 15), MessageBoxButton.OK, MessageBoxImage.Error)
m_SlabDB = False m_SlabDB = False
@@ -381,7 +381,6 @@ Public Class MainWindowM
End Sub End Sub
Friend Function GetKeyOption(nKeyOpt As KEY_OPT) As Boolean Friend Function GetKeyOption(nKeyOpt As KEY_OPT) As Boolean
Dim int As UInteger = m_nKeyOptions And nKeyOpt
Return ((m_nKeyOptions And nKeyOpt) <> 0) Return ((m_nKeyOptions And nKeyOpt) <> 0)
End Function End Function
+3 -3
View File
@@ -30,7 +30,7 @@ Imports System.Windows
#End If #End If
<Assembly: AssemblyCompany("Egalware s.r.l.")> <Assembly: AssemblyCompany("Egalware s.r.l.")>
<Assembly: AssemblyProduct("OmagOFFICE")> <Assembly: AssemblyProduct("OmagOFFICE")>
<Assembly: AssemblyCopyright("Copyright © 2017-2023 by Egalware s.r.l.")> <Assembly: AssemblyCopyright("Copyright © 2017-2025 by Egalware s.r.l.")>
<Assembly: AssemblyTrademark("")> <Assembly: AssemblyTrademark("")>
<Assembly: ComVisible(false)> <Assembly: ComVisible(false)>
'In order to begin building localizable applications, set 'In order to begin building localizable applications, set
@@ -69,6 +69,6 @@ Imports System.Windows
' by using the '*' as shown below: ' by using the '*' as shown below:
' <Assembly: AssemblyVersion("1.0.*")> ' <Assembly: AssemblyVersion("1.0.*")>
<Assembly: AssemblyVersion("2.6.12.1")> <Assembly: AssemblyVersion("2.7.7.1")>
<Assembly: AssemblyFileVersion("2.6.12.1")> <Assembly: AssemblyFileVersion("2.7.7.1")>
+5 -5
View File
@@ -351,11 +351,11 @@ Public Class MyMachGroup
If Not EgtGetInfo(Id, INFO_SLABHEIGHT, dSlabHeight) Then dSlabHeight = 0 If Not EgtGetInfo(Id, INFO_SLABHEIGHT, dSlabHeight) Then dSlabHeight = 0
Dim sCurrSawing As String = String.Empty Dim sCurrSawing As String = String.Empty
If Not EgtGetInfo(m_nOpersGroupId, INFO_CURRSAWING, sCurrSawing) Then sCurrSawing = "---" If Not EgtGetInfo(m_nOpersGroupId, INFO_CURRSAWING, sCurrSawing) Then sCurrSawing = "---"
Return "Name: " & sSlabName & Environment.NewLine & Return EgtMsg(91683) & sSlabName & Environment.NewLine & ' Name:
"Material: " & sMaterial & Environment.NewLine & EgtMsg(91684) & sMaterial & Environment.NewLine & ' Material:
"Thickness: " & LenToString(dSlabHeight, 3) & Environment.NewLine & EgtMsg(91685) & LenToString(dSlabHeight, 3) & Environment.NewLine & ' Thickness:
"Sawing: " & sCurrSawing & Environment.NewLine & EgtMsg(91686) & sCurrSawing & Environment.NewLine & ' Sawing:
"Machine: " & Machine EgtMsg(91687) & Machine ' Machine:
End Get End Get
End Property End Property
+139 -139
View File
@@ -1,165 +1,165 @@
<EgtWPFLib5:EgtCustomWindow x:Class="MyToolDbWindowV" <EgtWPFLib5:EgtCustomWindow x:Class="MyToolDbWindowV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:sys="clr-namespace:System;assembly=mscorlib" xmlns:sys="clr-namespace:System;assembly=mscorlib"
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5" xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
Title="{Binding Title}" Title="{Binding Title}"
Style="{DynamicResource {x:Type EgtWPFLib5:EgtCustomWindow}}" Style="{DynamicResource {x:Type EgtWPFLib5:EgtCustomWindow}}"
WindowStyle="None" ResizeMode="NoResize" TitleBarHeight="30" IsResizable="False" WindowStyle="None" ResizeMode="NoResize" TitleBarHeight="30" IsResizable="False"
IsMinimizable="False" WindowStartupLocation="CenterOwner" ShowInTaskbar="False" IsMinimizable="False" WindowStartupLocation="CenterOwner" ShowInTaskbar="False"
CloseCommand="{Binding CloseToolsDbCommand,Mode=OneWay,UpdateSourceTrigger=PropertyChanged}" CloseCommand="{Binding CloseToolsDbCommand,Mode=OneWay,UpdateSourceTrigger=PropertyChanged}"
CloseCommandParameter="{Binding Path=SelectedItem, ElementName=ToolsTreeView}" CloseCommandParameter="{Binding Path=SelectedItem, ElementName=ToolsTreeView}"
Height="900"> Height="900">
<EgtWPFLib5:EgtCustomWindow.InputBindings> <EgtWPFLib5:EgtCustomWindow.InputBindings>
<KeyBinding Key="Escape" Command="{Binding ReloadToolCommand}" <KeyBinding Key="Escape" Command="{Binding ReloadToolCommand}"
CommandParameter="{Binding Path=SelectedItem,ElementName=ToolsTreeView}"/> CommandParameter="{Binding Path=SelectedItem,ElementName=ToolsTreeView}"/>
</EgtWPFLib5:EgtCustomWindow.InputBindings> </EgtWPFLib5:EgtCustomWindow.InputBindings>
<EgtWPFLib5:EgtCustomWindow.Resources> <EgtWPFLib5:EgtCustomWindow.Resources>
<!--<EgtWPFLib5:ToolParamVisibilityConverter x:Key="ToolParamVisibilityConverter"/>--> <!--<EgtWPFLib5:ToolParamVisibilityConverter x:Key="ToolParamVisibilityConverter"/>-->
<EgtWPFLib5:ToolDrawUUIDConverter x:Key="ToolDrawUUIDConverter"/> <EgtWPFLib5:ToolDrawUUIDConverter x:Key="ToolDrawUUIDConverter"/>
<EgtWPFLib5:ErrorVisibilityConverter x:Key="ErrorVisibilityConverter"/> <EgtWPFLib5:ErrorVisibilityConverter x:Key="ErrorVisibilityConverter"/>
<sys:Int32 x:Key="Corr">0</sys:Int32> <sys:Int32 x:Key="Corr">0</sys:Int32>
<sys:Int32 x:Key="ExitPar">1</sys:Int32> <sys:Int32 x:Key="ExitPar">1</sys:Int32>
<sys:Int32 x:Key="Coolant">2</sys:Int32> <sys:Int32 x:Key="Coolant">2</sys:Int32>
<sys:Int32 x:Key="CornRad">3</sys:Int32> <sys:Int32 x:Key="CornRad">3</sys:Int32>
<sys:Int32 x:Key="Diam">4</sys:Int32> <sys:Int32 x:Key="Diam">4</sys:Int32>
<sys:Int32 x:Key="TotDiam">5</sys:Int32> <sys:Int32 x:Key="TotDiam">5</sys:Int32>
<sys:Int32 x:Key="Feed">6</sys:Int32> <sys:Int32 x:Key="Feed">6</sys:Int32>
<sys:Int32 x:Key="EndFeed">7</sys:Int32> <sys:Int32 x:Key="EndFeed">7</sys:Int32>
<sys:Int32 x:Key="StartFeed">8</sys:Int32> <sys:Int32 x:Key="StartFeed">8</sys:Int32>
<sys:Int32 x:Key="TipFeed">9</sys:Int32> <sys:Int32 x:Key="TipFeed">9</sys:Int32>
<sys:Int32 x:Key="Len">10</sys:Int32> <sys:Int32 x:Key="Len">10</sys:Int32>
<sys:Int32 x:Key="TotLen">11</sys:Int32> <sys:Int32 x:Key="TotLen">11</sys:Int32>
<sys:Int32 x:Key="MaxMat">12</sys:Int32> <sys:Int32 x:Key="MaxMat">12</sys:Int32>
<sys:Int32 x:Key="LonOffset">13</sys:Int32> <sys:Int32 x:Key="LonOffset">13</sys:Int32>
<sys:Int32 x:Key="RadOffset">14</sys:Int32> <sys:Int32 x:Key="RadOffset">14</sys:Int32>
<sys:Int32 x:Key="Speed">15</sys:Int32> <sys:Int32 x:Key="Speed">15</sys:Int32>
<sys:Int32 x:Key="SideAng">16</sys:Int32> <sys:Int32 x:Key="SideAng">16</sys:Int32>
<sys:Int32 x:Key="MaxSpeed">17</sys:Int32> <sys:Int32 x:Key="MaxSpeed">17</sys:Int32>
<sys:Int32 x:Key="Thick">18</sys:Int32> <sys:Int32 x:Key="Thick">18</sys:Int32>
<sys:Int32 x:Key="MaxAbsorption">19</sys:Int32> <sys:Int32 x:Key="MaxAbsorption">19</sys:Int32>
<sys:Int32 x:Key="MinFeed">20</sys:Int32> <sys:Int32 x:Key="MinFeed">20</sys:Int32>
<sys:Int32 x:Key="Draw">21</sys:Int32> <sys:Int32 x:Key="Draw">21</sys:Int32>
<sys:Int32 x:Key="Head">22</sys:Int32> <sys:Int32 x:Key="Head">22</sys:Int32>
<sys:Int32 x:Key="NamePar">23</sys:Int32> <sys:Int32 x:Key="NamePar">23</sys:Int32>
<sys:Int32 x:Key="UserNotes">24</sys:Int32> <sys:Int32 x:Key="UserNotes">24</sys:Int32>
<sys:Int32 x:Key="TcPos">25</sys:Int32> <sys:Int32 x:Key="TcPos">25</sys:Int32>
</EgtWPFLib5:EgtCustomWindow.Resources> </EgtWPFLib5:EgtCustomWindow.Resources>
<Grid Background="Transparent"> <Grid Background="Transparent">
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="0.95*"/> <ColumnDefinition Width="0.95*"/>
<ColumnDefinition Width="2*"/> <ColumnDefinition Width="2*"/>
<ColumnDefinition Width="1*"/> <ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<Grid Background="Transparent"> <Grid Background="Transparent">
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="0.75*"/> <RowDefinition Height="0.75*"/>
<RowDefinition Height="12*"/> <RowDefinition Height="12*"/>
</Grid.RowDefinitions> </Grid.RowDefinitions>
<UniformGrid Grid.Row="0" Columns="8"> <UniformGrid Grid.Row="0" Columns="8">
<Button ToolTip="New" Command="{Binding NewCommand}" <Button ToolTip="New" Command="{Binding NewCommand}"
CommandParameter="{Binding Path=SelectedItem, ElementName=ToolsTreeView}" CommandParameter="{Binding Path=SelectedItem, ElementName=ToolsTreeView}"
IsEnabled="{Binding IsEnabledNewBtn, Mode=OneWay}" IsEnabled="{Binding IsEnabledNewBtn, Mode=OneWay}"
Style = "{DynamicResource MachiningDB_Button}"> Style = "{DynamicResource MachiningDB_Button}">
<Image Source="/Resources/TopCommandBar/New.png" Stretch="Uniform"/> <Image Source="/Resources/TopCommandBar/New.png" Stretch="Uniform"/>
</Button> </Button>
<Button ToolTip="Save" Command="{Binding SaveCommand}" <Button ToolTip="Save" Command="{Binding SaveCommand}"
CommandParameter="{Binding Path=SelectedItem, ElementName=ToolsTreeView}" CommandParameter="{Binding Path=SelectedItem, ElementName=ToolsTreeView}"
IsEnabled="{Binding IsEnabledSaveBtn, Mode=OneWay}" IsEnabled="{Binding IsEnabledSaveBtn, Mode=OneWay}"
Style = "{DynamicResource MachiningDB_Button}"> Style = "{DynamicResource MachiningDB_Button}">
<Image Source="/Resources/TopCommandBar/Save.png" Stretch="Uniform"/> <Image Source="/Resources/TopCommandBar/Save.png" Stretch="Uniform"/>
</Button> </Button>
<Button ToolTip="Remove" Command="{Binding RemoveCommand}" <Button ToolTip="Remove" Command="{Binding RemoveCommand}"
CommandParameter="{Binding Path=SelectedItem, ElementName=ToolsTreeView}" CommandParameter="{Binding Path=SelectedItem, ElementName=ToolsTreeView}"
IsEnabled="{Binding IsEnabledRemoveBtn, Mode=OneWay}" IsEnabled="{Binding IsEnabledRemoveBtn, Mode=OneWay}"
Style = "{DynamicResource MachiningDB_Button}"> Style = "{DynamicResource MachiningDB_Button}">
<Image Source="/Resources/TopCommandBar/Remove.png" Stretch="Uniform"/> <Image Source="/Resources/TopCommandBar/Remove.png" Stretch="Uniform"/>
</Button> </Button>
<Button ToolTip="Import" Command="{Binding ImportCommand}" <Button ToolTip="Import" Command="{Binding ImportCommand}"
CommandParameter="{Binding Path=SelectedItem, ElementName=MachiningsTreeView}" CommandParameter="{Binding Path=SelectedItem, ElementName=MachiningsTreeView}"
IsEnabled="{Binding IsEnabledNewBtn, Mode=OneWay}" IsEnabled="{Binding IsEnabledNewBtn, Mode=OneWay}"
Style = "{DynamicResource MachiningDB_Button}"> Style = "{DynamicResource MachiningDB_Button}">
<Image Source="/Resources/TopCommandBar/Import.png" Stretch="Uniform"/> <Image Source="/Resources/TopCommandBar/Import.png" Stretch="Uniform"/>
</Button> </Button>
<Button ToolTip="Export" Command="{Binding ExportCommand}" <Button ToolTip="Export" Command="{Binding ExportCommand}"
CommandParameter="{Binding Path=SelectedItem, ElementName=MachiningsTreeView}" CommandParameter="{Binding Path=SelectedItem, ElementName=MachiningsTreeView}"
IsEnabled="{Binding IsEnabledSaveBtn, Mode=OneWay}" IsEnabled="{Binding IsEnabledSaveBtn, Mode=OneWay}"
Style = "{DynamicResource MachiningDB_Button}"> Style = "{DynamicResource MachiningDB_Button}">
<Image Source="/Resources/TopCommandBar/Export_1.png" Stretch="Uniform"/> <Image Source="/Resources/TopCommandBar/Export_1.png" Stretch="Uniform"/>
</Button> </Button>
<Button ToolTip="Reset" Command="{Binding ReloadToolCommand}" <Button ToolTip="Reset" Command="{Binding ReloadToolCommand}"
CommandParameter="{Binding Path=SelectedItem, ElementName=MachiningsTreeView}" CommandParameter="{Binding Path=SelectedItem, ElementName=MachiningsTreeView}"
IsEnabled="{Binding IsEnabledRemoveBtn, Mode=OneWay}" IsEnabled="{Binding IsEnabledRemoveBtn, Mode=OneWay}"
Style = "{DynamicResource MachiningDB_Button}"> Style = "{DynamicResource MachiningDB_Button}">
<Image Source="/Resources/TopCommandBar/Reset.png" Stretch="Uniform"/> <Image Source="/Resources/TopCommandBar/Reset.png" Stretch="Uniform"/>
</Button> </Button>
</UniformGrid> </UniformGrid>
<!--Elenco degli utensili--> <!--Elenco degli utensili-->
<TreeView Name="ToolsTreeView" Grid.Row="1" <TreeView Name="ToolsTreeView" Grid.Row="1"
Background="Transparent" BorderThickness="0" Background="Transparent" BorderThickness="0"
ItemsSource="{Binding ToolsList}"> ItemsSource="{Binding ToolsList}">
<TreeView.ItemContainerStyle> <TreeView.ItemContainerStyle>
<Style TargetType="{x:Type TreeViewItem}" BasedOn="{StaticResource Db_TreeViewItem}"> <Style TargetType="{x:Type TreeViewItem}" BasedOn="{StaticResource Db_TreeViewItem}">
<Setter Property="FontSize" Value="10" /> <Setter Property="FontSize" Value="10" />
<Setter Property="Foreground" Value="{StaticResource Omag_White}" /> <Setter Property="Foreground" Value="{StaticResource Omag_White}" />
<Setter Property="IsSelected" Value="{Binding IsSelected, Mode=TwoWay}" /> <Setter Property="IsSelected" Value="{Binding IsSelected, Mode=TwoWay}" />
<Setter Property="IsExpanded" Value="{Binding IsExpanded, Mode=TwoWay}" /> <Setter Property="IsExpanded" Value="{Binding IsExpanded, Mode=TwoWay}" />
<Setter Property="IsEnabled" Value="{Binding IsEnabled, Mode=TwoWay}" /> <Setter Property="IsEnabled" Value="{Binding IsEnabled, Mode=TwoWay}" />
</Style> </Style>
</TreeView.ItemContainerStyle> </TreeView.ItemContainerStyle>
<TreeView.Resources> <TreeView.Resources>
<HierarchicalDataTemplate DataType="{x:Type EgtWPFLib5:FamilyToolTreeViewItem}" ItemsSource="{Binding Items}"> <HierarchicalDataTemplate DataType="{x:Type EgtWPFLib5:FamilyToolTreeViewItem}" ItemsSource="{Binding Items}">
<Grid Background="Transparent"> <Grid Background="Transparent">
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/> <ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="1*"/> <ColumnDefinition Width="1*"/>
<ColumnDefinition Width="Auto"/> <ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<Image Grid.Column="0" Source="{Binding PictureString}" Height="32" Width="32" Margin="0" /> <Image Grid.Column="0" Source="{Binding PictureString}" Height="32" Width="32" Margin="0" />
<TextBlock Grid.Column="1" Text="{Binding Name}" FontSize="15" Margin="5,0,10,0" VerticalAlignment="Center" HorizontalAlignment="left" /> <TextBlock Grid.Column="1" Text="{Binding Name}" FontSize="15" Margin="5,0,10,0" VerticalAlignment="Center" HorizontalAlignment="left" />
<Ellipse Grid.Column="2" Height="10" Width="10" Fill="{Binding FamilyColor}" /> <Ellipse Grid.Column="2" Height="10" Width="10" Fill="{Binding FamilyColor}" />
</Grid> </Grid>
</HierarchicalDataTemplate> </HierarchicalDataTemplate>
<DataTemplate DataType="{x:Type EgtWPFLib5:ToolTreeViewItem}"> <DataTemplate DataType="{x:Type EgtWPFLib5:ToolTreeViewItem}">
<Grid Background="Transparent"> <Grid Background="Transparent">
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/> <ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="1*"/> <ColumnDefinition Width="1*"/>
<ColumnDefinition Width="Auto"/> <ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<!--<Image Grid.Column="0" Source="{Binding PictureString}" Height="32" Margin="0,8,6,4" />--> <!--<Image Grid.Column="0" Source="{Binding PictureString}" Height="32" Margin="0,8,6,4" />-->
<TextBlock Grid.Column="1" Text="{Binding NamePar}" Height="21" FontSize="13" Margin="30,0,10,0" <TextBlock Grid.Column="1" Text="{Binding NamePar}" Height="21" FontSize="13" Margin="30,0,10,0"
VerticalAlignment="Center" HorizontalAlignment="left"/> VerticalAlignment="Center" HorizontalAlignment="left"/>
<Ellipse Grid.Column="2" Height="10" Width="10" Fill="{Binding ToolColor}" /> <Ellipse Grid.Column="2" Height="10" Width="10" Fill="{Binding ToolColor}" />
</Grid> </Grid>
</DataTemplate> </DataTemplate>
</TreeView.Resources> </TreeView.Resources>
</TreeView> </TreeView>
</Grid> </Grid>
<ContentControl Content="{Binding Path=ParamPageV}" Grid.Column="1"/> <ContentControl Content="{Binding Path=ParamPageV}" Grid.Column="1"/>
<!--ContentControl che ospita la scena restituita sotto forma di WindowsFormsHost--> <!--ContentControl che ospita la scena restituita sotto forma di WindowsFormsHost-->
<ContentControl Content="{Binding ToolSceneHost}" Grid.Column="2"/> <ContentControl Content="{Binding ToolSceneHost}" Grid.Column="2"/>
</Grid> </Grid>
</EgtWPFLib5:EgtCustomWindow> </EgtWPFLib5:EgtCustomWindow>
-73
View File
@@ -1,73 +0,0 @@
<Window x:Class="PairInputDataVeinMatch"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:OmagOFFICE"
mc:Ignorable="d"
ShowInTaskbar="False"
WindowStyle="None"
Title="PairInputDataVeinMatch" Height="auto" Width="300"
Background="{StaticResource Omag_DarkGray}">
<StackPanel Name ="WinPair" Orientation="Vertical" VerticalAlignment="Center">
<TextBlock Name="TopBar"
Text="Seleziona dal primo Part il lato che vuoi accoppiare" HorizontalAlignment="Center"
Width="Auto"
TextWrapping="Wrap"
Margin="0,0,0,10"
FontSize="20"/>
<ComboBox Name="PairOption"
Style="{StaticResource Raw_ComboBox}"
Margin="1,5,1,0"
IsEnabled="True"
Visibility="Collapsed"/>
<!--<CheckBox Name="InvertOption" Margin="1,5,1,0"
Foreground="{DynamicResource Omag_White}"
IsEnabled="True"
Visibility="Collapsed">Invert</CheckBox>-->
<CheckBox Name="FlipOption1" Margin="1,5,1,0"
Foreground="{DynamicResource Omag_White}"
IsEnabled="True"
Visibility="Collapsed">Flip ∥</CheckBox>
<CheckBox Name="FlipOption2" Margin="1,5,1,0"
Foreground="{DynamicResource Omag_White}"
IsEnabled="True"
Visibility="Collapsed">Flip ⟂</CheckBox>
<!--<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="2*"/>
</Grid.ColumnDefinitions>
<TextBlock Name="Testo" Height="26"
Foreground="{DynamicResource Omag_White}"
Background="{DynamicResource Omag_Black}"
Margin="1,5,1,0"
Text="Angolo"
TextAlignment="Center"
Grid.Column="0"
IsEnabled="True"/>
<TextBox Name="RotInputData" Height="26"
Foreground="{DynamicResource Omag_White}"
Background="{DynamicResource Omag_Black}"
Margin="1,5,1,0"
Grid.Column="1"
Text="0"
HorizontalContentAlignment="Right"
VerticalContentAlignment="Center"
IsEnabled="False"/>
</Grid>-->
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="2*"/>
</Grid.ColumnDefinitions>
<Button Name="Conferma"
Grid.Column="0"
Content="Conferma"/>
<Button Name="Annulla"
Grid.Column="1"
Content="Annulla"/>
</Grid>
</StackPanel>
</Window>
@@ -1,62 +0,0 @@
Imports EgtUILib.EgtInterface
Public Class PairInputDataVeinMatch
Private Ref As VeinMatchingWindow
Public Sub New(ByVal MVD As Window)
Owner = MVD
Ref = DirectCast(MVD, VeinMatchingWindow)
' La chiamata è richiesta dalla finestra di progettazione.
InitializeComponent()
PairOption.ItemsSource = New List(Of String)({"Start-Start", "Start-End", "End-Start", "End-End", "Middle-Middle"})
PairOption.SelectedIndex = 1
End Sub
Public Sub ConfirmBtn_click() Handles Conferma.Click
OmagOFFICEMap.refVeinMatchingWindow.bInputDone = True
OmagOFFICEMap.refVeinMatchingWindow.TgBtn_Pair.IsChecked = False
Me.Close()
End Sub
Public Sub CancelBtn_click() Handles Annulla.Click
OmagOFFICEMap.refVeinMatchingWindow.bInputDone = False
OmagOFFICEMap.refVeinMatchingWindow.ResetPairing()
OmagOFFICEMap.refVeinMatchingWindow.TgBtn_Pair.IsChecked = False
Me.Close()
End Sub
Private Sub PairOption_Changed() Handles PairOption.SelectionChanged
OmagOFFICEMap.refVeinMatchingWindow.PairOption_Changed()
End Sub
'Private Sub InvertOption_Changed() Handles InvertOption.Click
' OmagOFFICEMap.refVeinMatchingWindow.InvertOption_Changed()
'End Sub
Private Sub FlipParallel_Changed() Handles FlipOption1.Click
OmagOFFICEMap.refVeinMatchingWindow.InvertOption_Changed()
End Sub
Private Sub FlipPerpendicular_Changed() Handles FlipOption2.Click
OmagOFFICEMap.refVeinMatchingWindow.FlipPerpendicular_Changed()
End Sub
Private m_MouseLeftPressed As Boolean = False
' qui dovrebbe funzionare quando entrambe le condizioni sono attive, non solo
Private Sub TopCommandBar_pressed() Handles TopBar.MouseLeftButtonDown
m_MouseLeftPressed = True
End Sub
Private Sub TopCommandBar_released() Handles TopBar.MouseLeftButtonUp
m_MouseLeftPressed = False
End Sub
Private Sub TopCommandBar_Drag() Handles TopBar.MouseMove
If m_MouseLeftPressed Then
Try
Me.DragMove()
Catch e As Exception
End Try
m_MouseLeftPressed = False ' non si sa perché, ma è l'UNICO modo con cui funziona
End If
End Sub
End Class
@@ -1,57 +0,0 @@
<Window x:Class="RotationInputDataVeinMatch"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:OmagOFFICE"
mc:Ignorable="d"
ShowInTaskbar="False"
WindowStyle="None"
Title="InputDataVeinMatch" Height="100" Width="200"
Background="{StaticResource Omag_DarkGray}">
<!--<local:RotateUC></local:RotateUC>-->
<!--<UserControl Name="MyUserControl" Content="{Binding ControlUC}"></UserControl>-->
<StackPanel Name ="WinRotate" Orientation="Vertical" VerticalAlignment="Center">
<Label Name="TopBar"
Content="Seleziona l'asse di rotazione" HorizontalAlignment="Center"
Width="Auto"/>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="2*"/>
</Grid.ColumnDefinitions>
<TextBlock Name="Testo" Height="26"
Foreground="{DynamicResource Omag_White}"
Background="{DynamicResource Omag_Black}"
Margin="1,5,1,0"
Text="Angolo"
TextAlignment="Center"
Grid.Column="0"
IsEnabled="True"/>
<TextBox Name="RotInputData" Height="26"
Foreground="{DynamicResource Omag_White}"
Background="{DynamicResource Omag_Black}"
Margin="1,5,1,0"
Grid.Column="1"
Text="0"
HorizontalContentAlignment="Right"
VerticalContentAlignment="Center"
IsEnabled="False"/>
</Grid>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="2*"/>
</Grid.ColumnDefinitions>
<Button Name="Conferma"
Grid.Column="0"
Content="Conferma"/>
<Button Name="Annulla"
Grid.Column="1"
Content="Annulla"/>
</Grid>
</StackPanel>
</Window>
@@ -1,73 +0,0 @@
Imports System.IO
Imports System.Windows.Interop
Imports System.Collections.ObjectModel
Imports System.Windows.Forms
Imports OmagOFFICE.VeinMatchingWindow
Imports MS.Internal
Public Class RotationInputDataVeinMatch
Private Ref As VeinMatchingWindow
Public Sub New(ByVal MVD As Window)
Owner = MVD
Ref = DirectCast(MVD, VeinMatchingWindow)
' La chiamata è richiesta dalla finestra di progettazione.
InitializeComponent()
'' Aggiungere le eventuali istruzioni di inizializzazione dopo la chiamata a InitializeComponent().
'AddHandler Ref.eAxisSelected, AddressOf MainWindow_MyVariableChanged
End Sub
'' Subscribe to the event
'Private Sub MainWindow_MyVariableChanged(sender As Object, e As EventHandler(Of AxisSelectedEventArgs))
' ' Call a method in the user control
' MyUserControl.HandleMyVariableChanged(e.newValue)
'End Sub
'Public Sub Key_Press(sender As Object, e As System.Windows.Forms.KeyPressEventHandler) Handles Me.KeyDown
' 'If e.KeyChar = ChrW(System.Windows.Forms.Keys.Escape) Then
' ' Dim a As Integer = 10
' 'End If
'End Sub
Public Sub TextValueChanged() Handles RotInputData.TextChanged
OmagOFFICEMap.refVeinMatchingWindow.sInputAng = RotInputData.Text
OmagOFFICEMap.refVeinMatchingWindow.AngText_Changed()
End Sub
Public Sub ConfirmBtn_click() Handles Conferma.Click
OmagOFFICEMap.refVeinMatchingWindow.bInputDone = True
OmagOFFICEMap.refVeinMatchingWindow.TgBtn_Rotation.IsChecked = False
Me.Close()
End Sub
Public Sub CancelBtn_click() Handles Annulla.Click
OmagOFFICEMap.refVeinMatchingWindow.sInputAng = ""
OmagOFFICEMap.refVeinMatchingWindow.bInputDone = False
OmagOFFICEMap.refVeinMatchingWindow.ResetRotation(True, True)
OmagOFFICEMap.refVeinMatchingWindow.TgBtn_Rotation.IsChecked = False
OmagOFFICEMap.refVeinMatchingWindow.MyMsgTxBl.Text = ""
Me.Close()
End Sub
Private m_MouseLeftPressed As Boolean = False
' qui dovrebbe funzionare quando entrambe le condizioni sono attive, non solo
Private Sub TopCommandBar_pressed() Handles TopBar.MouseLeftButtonDown
m_MouseLeftPressed = True
End Sub
Private Sub TopCommandBar_released() Handles TopBar.MouseLeftButtonUp
m_MouseLeftPressed = False
End Sub
Private Sub TopCommandBar_Drag() Handles TopBar.MouseMove
If m_MouseLeftPressed Then
Try
Me.DragMove()
Catch e As Exception
End Try
m_MouseLeftPressed = False ' non si sa perché, ma è l'UNICO modo con cui funziona
End If
End Sub
End Class
@@ -1,14 +0,0 @@
Public Class RotationInputDataVeinMatchVM
'Private m_ControlUC As Control
'Public Property ControlUC As Control
' Get
' Return m_ControlUC
' End Get
' Set(value As Control)
' m_ControlUC = value
' End Set
'End Property
'Sub New(CurrentUC As Control)
' m_ControlUC = CurrentUC
'End Sub
End Class
-52
View File
@@ -1,52 +0,0 @@
<Window x:Class="SolidInputDataVeinMatch"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:OmagOFFICE"
mc:Ignorable="d"
ShowInTaskbar="False"
WindowStyle="None"
Title="InputDataVeinMatch" Height="100" Width="200"
Background="{StaticResource Omag_DarkGray}">
<StackPanel>
<Label Name="TopBar"
Content="Inserisci lo spessore dei solidi" HorizontalAlignment="Center"
Width="Auto"/>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="2*"/>
</Grid.ColumnDefinitions>
<TextBlock Name="Testo" Height="26"
Foreground="{DynamicResource Omag_White}"
Background="{DynamicResource Omag_Black}"
Margin="1,5,1,0"
Text="Spessore"
Grid.Column="0"
IsEnabled="True"/>
<TextBox Name="InputData" Height="26"
Foreground="{DynamicResource Omag_White}"
Background="{DynamicResource Omag_Black}"
Margin="1,5,1,0"
Grid.Column="1"
Text="0"
HorizontalContentAlignment="Right"
VerticalContentAlignment="Center"
IsEnabled="True"/>
</Grid>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="2*"/>
</Grid.ColumnDefinitions>
<Button Name="Conferma"
Grid.Column="0"
Content="Conferma"/>
<Button Name="Annulla"
Grid.Column="1"
Content="Annulla"/>
</Grid>
</StackPanel>
</Window>
@@ -1,41 +0,0 @@
Public Class SolidInputDataVeinMatch
Private m_Ref As Window
Sub New(RefWindow As Window)
m_Ref = RefWindow
' La chiamata è richiesta dalla finestra di progettazione.
InitializeComponent()
' Aggiungere le eventuali istruzioni di inizializzazione dopo la chiamata a InitializeComponent().
End Sub
Public Sub ConfirmBtn_click() Handles Conferma.Click
OmagOFFICEMap.refVeinMatchingWindow.sInputThick = InputData.Text
OmagOFFICEMap.refVeinMatchingWindow.bInputDone = True
Me.Close()
End Sub
Public Sub CancelBtn_click() Handles Annulla.Click
OmagOFFICEMap.refVeinMatchingWindow.sInputThick = ""
OmagOFFICEMap.refVeinMatchingWindow.bInputDone = False
Me.Close()
End Sub
Private m_MouseLeftPressed As Boolean = False
' qui dovrebbe funzionare quando entrambe le condizioni sono attive, non solo
Private Sub TopCommandBar_pressed() Handles TopBar.MouseLeftButtonDown
m_MouseLeftPressed = True
End Sub
Private Sub TopCommandBar_released() Handles TopBar.MouseLeftButtonUp
m_MouseLeftPressed = False
End Sub
Private Sub TopCommandBar_Drag() Handles TopBar.MouseMove
If m_MouseLeftPressed Then
Try
Me.DragMove()
Catch e As Exception
End Try
m_MouseLeftPressed = False ' non si sa perché, ma è l'UNICO modo con cui funziona
End If
End Sub
End Class
-11
View File
@@ -1,11 +0,0 @@
<DockPanel x:Class="TopBarVeinMatch"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" >
<Button Name="Riduci"
DockPanel.Dock="Right"
Style="{StaticResource VeinMatchWindow_Button}"
Margin="0,0,0,0"
ToolTip="Crea solido del part selezionato">
<Image Source="/Resources/VeinMatchNewIcon/cube.png" Stretch="Uniform"/>
</Button>
</DockPanel>
-12
View File
@@ -1,12 +0,0 @@
Public Class TopBarVeinMatch
Public Sub RiduciBtn_click() Handles Riduci.Click
OmagOFFICEMap.refVeinMatchPanelVM.SetVeinMatchIsChecked(False)
' chiudo anche i popup del TreeView
'ClosePopUps()
End Sub
'Public Sub ClosePopUps()
' Popup_LeftPanel.IsOpen = False
' TreeViewWnd.RiduciInfo()
'End Sub
End Class
-54
View File
@@ -1,54 +0,0 @@
<UserControl x:Class="VeinMatchingInfo"
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"
xmlns:local="clr-namespace:OmagOFFICE"
mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="800">
<!--<Grid>
<TextBlock x:Name="InfoPart" Text="La mia prima volta"/>
</Grid>-->
<Grid>
<DataGrid x:Name ="InfoGrid"
Background="{DynamicResource Omag_Black}"
Foreground="{DynamicResource Omag_Black}" ColumnWidth="*" HeadersVisibility = "Column"
HorizontalScrollBarVisibility="Hidden"
BorderThickness="0">
<DataGrid.Resources>
<Style TargetType="{x:Type DataGridColumnHeader}" BasedOn="{StaticResource {x:Type DataGridColumnHeader}}">
<Setter Property="Background" Value="{StaticResource Omag_Black}"/>
<Setter Property="Foreground" Value="{StaticResource Omag_White}"/>
<Setter Property="BorderBrush" Value="{StaticResource Omag_Yellow}"/>
<Setter Property="BorderThickness" Value="0.75"/>
<Setter Property="FontWeight" Value="Bold"/>
<Setter Property="Margin" Value="0"/>
<Setter Property="Opacity" Value="1"/>
<Setter Property="VerticalContentAlignment" Value="Center"/>
<Setter Property="HorizontalContentAlignment" Value="Center"/>
<Setter Property="FontSize" Value="15"/>
</Style>
<Style TargetType="{x:Type DataGridRow}">
<Setter Property="Background" Value="{StaticResource Omag_Black}"/>
<Setter Property="Foreground" Value="{StaticResource Omag_White}"/>
<Setter Property="BorderBrush" Value="{StaticResource Omag_Yellow}"/>
<Setter Property="BorderThickness" Value="0.75"/>
</Style>
<Style TargetType="{x:Type DataGridCell}">
<Setter Property="BorderBrush" Value="{StaticResource Omag_Yellow}"/>
<Setter Property="BorderThickness" Value="0"/>
<Setter Property="HorizontalAlignment" Value="Center"/>
<Style.Triggers>
<Trigger Property="IsSelected" Value="True">
<Setter Property="Background" Value="{StaticResource Omag_DarkGray}"/>
<Setter Property="Foreground" Value="{StaticResource Omag_White}"/>
<Setter Property="BorderBrush" Value="{StaticResource Omag_DarkGray}"/>
</Trigger>
</Style.Triggers>
</Style>
</DataGrid.Resources>
</DataGrid>
</Grid>
</UserControl>
-79
View File
@@ -1,79 +0,0 @@
Imports System.Collections.ObjectModel
Imports EgtUILib
Public Class VeinMatchingInfo
Sub New()
' La chiamata è richiesta dalla finestra di progettazione.
InitializeComponent()
' Aggiungere le eventuali istruzioni di inizializzazione dopo la chiamata a InitializeComponent().
End Sub
Private m_RefVeinMatchingWindow As VeinMatchingWindow
Sub LoadRef(vmw As VeinMatchingWindow)
m_RefVeinMatchingWindow = vmw
End Sub
Sub UpdateText(nIdPart As Integer)
'InfoPart.Text = sText
Dim EdgesList As New ObservableCollection(Of Edge)
EgtSetCurrentContext(m_RefVeinMatchingWindow.VeinMatchingScene.GetCtx())
Dim nEdge As Integer = EgtGetFirstInGroup(EgtGetFirstNameInGroup(nIdPart, "OutLoop"))
Dim nSideAngVal As Integer = 0
Dim nHeelVal As Integer = 0
Dim sName As String = String.Empty
While nEdge <> GDB_ID.NULL
nSideAngVal = 0
nHeelVal = 0
EgtGetName(nEdge, sName)
EgtGetInfo(nEdge, "SideAng", nSideAngVal)
EgtGetInfo(nEdge, "Heel", nHeelVal)
Dim EdgeTemp As New Edge(sName, nSideAngVal, nHeelVal)
EdgesList.Add(EdgeTemp)
nEdge = EgtGetNext(nEdge)
End While
InfoGrid.ItemsSource = EdgesList
End Sub
End Class
Public Class Edge
Private m_EdgeNum As String = String.Empty
Public Property Edge As String
Get
Return m_EdgeNum
End Get
Set(value As String)
m_EdgeNum = value
End Set
End Property
Private m_SideAng As Integer = 0
Public Property Ang As Integer
Get
Return m_SideAng
End Get
Set(value As Integer)
m_SideAng = value
End Set
End Property
Private m_Heel As Integer = 0
Public Property Heel As Integer
Get
Return m_Heel
End Get
Set(value As Integer)
m_Heel = value
End Set
End Property
Sub New(sName As String, nAng As Integer, nHeel As Integer)
m_EdgeNum = sName
m_SideAng = nAng
m_Heel = nHeel
End Sub
End Class
-39
View File
@@ -1,39 +0,0 @@
<UserControl x:Class="VeinMatchingTree"
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"
xmlns:OmagOFFICE="clr-namespace:OmagOFFICE"
mc:Ignorable="d"
Background="Transparent"
d:DesignHeight="450" d:DesignWidth="800">
<StackPanel Orientation="Vertical" Background="Transparent">
<TreeView x:Name="PartInScene"
BorderThickness="0"
Background="Transparent"
Foreground="{DynamicResource Omag_White}"
Margin="10"
SelectedItemChanged="OnTVSelectedItemChanged"
Focusable="False">
<TreeView.ItemContainerStyle>
<Style TargetType="{x:Type TreeViewItem}" BasedOn="{StaticResource TreeViewItem_Part3D}">
<Setter Property="FontSize" Value="18" />
<Setter Property="Foreground" Value="{StaticResource Omag_White}" />
<Setter Property="Background" Value="Transparent"/>
<Setter Property="IsSelected" Value="{Binding IsSelected, Mode=TwoWay}" />
<Setter Property="IsExpanded" Value="{Binding IsExpanded, Mode=TwoWay}" />
<Setter Property="IsEnabled" Value="{Binding IsEnabled, Mode=TwoWay}" />
</Style>
</TreeView.ItemContainerStyle>
</TreeView>
<Popup x:Name="Popup_CurrPart" PlacementTarget="{Binding ElementName=TreeViewItem_CurrPart}" Placement="Right" AllowsTransparency="True">
<!--<TextBlock x:Name="Popup_Text" Text="Placement=Left" FontSize="14" Background="LightGreen"></TextBlock>-->
<OmagOFFICE:VeinMatchingInfo x:Name="Info2PartWnd"/>
</Popup>
<TextBlock Name="Info" Text="" FontSize="18" HorizontalAlignment="Right"
Margin="0,0,10,0"
Background="Transparent"
Foreground="{StaticResource Omag_Yellow}"/>
</StackPanel>
</UserControl>
-121
View File
@@ -1,121 +0,0 @@
Imports System.IO.Ports
Imports System.Windows.Forms
Imports EgtUILib
Public Class VeinMatchingTree
Private m_RefVeinMatchingInfo As VeinMatchingInfo
Private m_RefVeinMatchingWindow As VeinMatchingWindow
Sub New()
' La chiamata è richiesta dalla finestra di progettazione.
InitializeComponent()
' Aggiungere le eventuali istruzioni di inizializzazione dopo la chiamata a InitializeComponent().
End Sub
Public Sub LoadRef(vmiRef As VeinMatchingInfo)
m_RefVeinMatchingInfo = vmiRef
End Sub
Sub LoadRef(vmwRef As VeinMatchingWindow)
m_RefVeinMatchingWindow = vmwRef
End Sub
Public Sub RiduciInfo()
Popup_CurrPart.IsOpen = False
End Sub
Public Sub AdjustInfoPosition()
' spostando l'offset e rimettendolo al valore originale il pop up viene riposizionato correttamente rispetto relativamente
' alla finestra che l'ha creato
Dim offset As Double = Popup_CurrPart.HorizontalOffset
Popup_CurrPart.HorizontalOffset = offset + 1
Popup_CurrPart.HorizontalOffset = offset
End Sub
Private Sub SetStackPanelTextFromTreeView(tItem As TreeViewItem, ByRef PartId As Integer, ByRef sNamePart As String)
If IsNothing(tItem) Then Return
Dim Pan As StackPanel = DirectCast(tItem.Header, StackPanel)
sNamePart = String.Empty
For Each PanItem In Pan.Children
If TypeOf (PanItem) Is TextBlock Then
sNamePart = DirectCast(PanItem, TextBlock).Text
Exit For
End If
Next
PartId = CInt(Val(New Text.StringBuilder((From ch In sNamePart.ToString.ToCharArray Where IsNumeric(ch)).ToArray).ToString))
End Sub
Private Sub SelectItem_Click() Handles PartInScene.SelectedItemChanged
Dim tItem As TreeViewItem = CType(PartInScene.SelectedItem, TreeViewItem)
If IsNothing(tItem) Then Return
'Dim Pan As StackPanel = DirectCast(tItem.Header, StackPanel)
'Dim sNamepart As String = String.Empty
'For Each PanItem In Pan.Children
' If TypeOf (PanItem) Is TextBlock Then
' sNamepart = DirectCast(PanItem, TextBlock).Text
' Exit For
' End If
'Next
'Dim nPartId As Integer = CInt(Val(New Text.StringBuilder((From ch In sNamepart.ToString.ToCharArray Where IsNumeric(ch)).ToArray).ToString))
Dim nPartId As Integer = -1
Dim sNamePart As String = String.Empty
SetStackPanelTextFromTreeView(tItem, nPartId, sNamePart)
Info.Text = sNamePart.ToString
m_RefVeinMatchingInfo.UpdateText(nPartId)
End Sub
Private m_InfoPart As VeinMatchingInfo
Private Sub FaiQualcosa() Handles PartInScene.MouseRightButtonUp
Dim tItem As TreeViewItem = CType(PartInScene.SelectedItem, TreeViewItem)
If IsNothing(tItem) Then Return
Dim nPartId As Integer = -1
Dim sNamePart As String = String.Empty
SetStackPanelTextFromTreeView(tItem, nPartId, sNamePart)
Popup_CurrPart.IsOpen = Not Popup_CurrPart.IsOpen
Popup_CurrPart.PlacementTarget = tItem
Popup_CurrPart.MaxWidth = 175
m_InfoPart = Info2PartWnd
m_InfoPart.LoadRef(m_RefVeinMatchingWindow)
m_InfoPart.UpdateText(nPartId)
'Popup_Text.Text = sNamePart
End Sub
Private Sub OnTVSelectedItemChanged(sender As Object, e As RoutedPropertyChangedEventArgs(Of Object))
If (Keyboard.Modifiers And ModifierKeys.Shift) > 0 Then
'C#
'MyTextBlock.Text = ( (TreeViewItem) ( (TreeView) sender ).SelectedItem ).Header.ToString()
SelectInVeinMatchScene()
End If
End Sub
Public Sub HighlightItem() Handles PartInScene.MouseDoubleClick
SelectInVeinMatchScene()
End Sub
Private Sub SelectInVeinMatchScene()
' prima deseleziono tutto
m_RefVeinMatchingWindow.DeselectAll()
'Dim nPartId As Integer = CInt(Val(New Text.StringBuilder((From ch In tItem.Header.ToString.ToCharArray Where IsNumeric(ch)).ToArray).ToString))
Dim tItem As TreeViewItem = CType(PartInScene.SelectedItem, TreeViewItem)
If IsNothing(tItem) Then Return
Dim nPartId As Integer = -1
Dim sNamePart As String = String.Empty
SetStackPanelTextFromTreeView(tItem, nPartId, sNamePart)
EgtSetCurrentContext(m_RefVeinMatchingWindow.VeinMatchingScene.GetCtx())
For Each PartSolidSel In m_RefVeinMatchingWindow.m_PartSolidList
If PartSolidSel.PartId = nPartId Then
PartSolidSel.SelectPart()
End If
Next
EgtDraw()
End Sub
End Class
-573
View File
@@ -1,573 +0,0 @@
<EgtWPFLib5:EgtCustomWindow x:Class="VeinMatchingWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:OmagOFFICE="clr-namespace:OmagOFFICE"
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
Background="{StaticResource Omag_DarkGray}"
Height="800" Width="500" ShowInTaskbar="False"
Initialized="Window_Initialized"
MinWidth="300" MinHeight="300"
Title="VeinMatching"
WindowStyle="None"
IsClosable="False"
IsMinimizable="False"
IsResizable="True"
Style="{DynamicResource VeinMatchStyle}">
<EgtWPFLib5:EgtCustomWindow.TitlePanel>
<OmagOFFICE:TopBarVeinMatch HorizontalAlignment="Right"/>
</EgtWPFLib5:EgtCustomWindow.TitlePanel>
<!--<Window.Resources>
<Style TargetType="{x:Type Window}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type Window}">
<ContentPresenter/>
</ControlTemplate>
</Setter.Value>
</Setter>
<Setter Property="Background" Value="Transparent"></Setter>
</Style>
</Window.Resources>-->
<!--<Window.CommandBindings>
<CommandBinding Command="OmagOFFICE:MoveItCommand.MoveIt"
Executed="CommandBinding_Executed"
CanExecute="CommandBinding_CanExecute"/>
</Window.CommandBindings>-->
<DockPanel x:Name="DockPanelVeinMatching" Background="Transparent" VirtualizingStackPanel.IsVirtualizing="True">
<StackPanel Name="TopCommandBar1"
DockPanel.Dock="Top" HorizontalAlignment="Right" Orientation="Horizontal"
Background="Transparent">
<!--<Label Name ="TopCommandBar" Content="" Width="{Binding ActualWidth, ElementName=DockPanelVeinMatching}"/>-->
<!--<Button Name="Riduci"
Style="{StaticResource VeinMatchWindow_Button}"
Margin="0,0,0,0"
ToolTip="Crea solido del part selezionato">
<Image Source="/Resources/VeinMatchNewIcon/cube.png" Stretch="Uniform"/>
</Button>-->
</StackPanel>
<TabControl DockPanel.Dock="Left"
x:Name="MyTabCtrl"
Background="Transparent"
Margin="2,0,0,0"
BorderThickness="0"
Width="125">
<TabItem Name="TabItem2"
Background="Transparent"
Foreground="{DynamicResource Omag_Yellow}"
HorizontalContentAlignment="Center"
Style="{StaticResource TabItemVeinMatch}"
Padding="0"
Margin="0,0,0,0">
<TabItem.Header>
<StackPanel Orientation="Horizontal">
<TextBlock Text="🌐"
FontSize="18"/>
</StackPanel>
</TabItem.Header>
<StackPanel Orientation="Vertical">
<Border Style="{StaticResource Border}" Margin="0,1,0,5">
<Expander Foreground="{DynamicResource Omag_White}"
HorizontalAlignment="Stretch"
Header="Options"
ExpandDirection="Down"
IsExpanded="False">
<StackPanel>
<ComboBox Name="OptionColor"
Style="{StaticResource Raw_ComboBox}"
Margin="1,5,1,0"/>
<ComboBox Name="SelType"
Style="{StaticResource Raw_ComboBox}"
Margin="1,5,1,0"/>
<ComboBox Name="RefType"
Style="{StaticResource Raw_ComboBox}"
Margin="1,5,1,0"/>
</StackPanel>
</Expander>
</Border>
<Border Style="{StaticResource Border}" Margin="0,1,0,5">
<Expander Foreground="{DynamicResource Omag_White}"
HorizontalAlignment="Stretch"
Header="RESET"
ExpandDirection="Down"
IsExpanded="False">
<UniformGrid Columns="3" Margin="2">
<Button Name="Btn01"
Style="{StaticResource VeinMatchWindow_Button}"
Margin="1,5,1,0"
Content="🚀"
ToolTip="Crea Part Solid"/>
<Button Name="Btn02"
Style="{StaticResource VeinMatchWindow_Button}"
Margin="1,5,1,0"
Content="👾"
ToolTip="Resetta Part Solid"/>
</UniformGrid>
</Expander>
</Border>
<Border Style="{StaticResource Border}" Margin="0,1,0,5">
<Expander Foreground="{DynamicResource Omag_White}"
HorizontalAlignment="Stretch"
Header="SOLID"
ExpandDirection="Down"
IsExpanded="True">
<StackPanel>
<Grid >
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="1*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
</Grid.RowDefinitions>
<Button Name="CreateCurrSolidBtn" Grid.Row="0" Grid.Column="0"
Style="{StaticResource VeinMatchWindow_Button}"
Margin="1,5,1,0"
ToolTip="Crea solido del part selezionato">
<Image Source="/Resources/VeinMatchNewIcon/cube.png" Stretch="Uniform"/>
</Button>
<Button Name="CreateAllSolidsBtn" Grid.Row="0" Grid.Column="1"
Style="{StaticResource VeinMatchWindow_Button}"
Margin="1,5,1,0"
ToolTip="Crea tutti i solidi">
<Image Source="/Resources/VeinMatchNewIcon/cubes.png" Stretch="Uniform"/>
</Button>
<Button Name="ResetAllSolidsBtn" Grid.Row="0" Grid.Column="2"
Style="{StaticResource VeinMatchWindow_Button}"
Margin="1,5,1,0"
ToolTip="Resetta i solidi">
<Image Source="/Resources/VeinMatchNewIcon/reset cubes.png" Stretch="Uniform"/>
</Button>
<Button Name="ExplodeBtn" Grid.Row="1" Grid.Column="0"
Style="{StaticResource VeinMatchWindow_Button}"
Margin="1,5,1,0"
ToolTip="Esplodi assemblato"
IsEnabled="True">
<Image Source="/Resources/VeinMatchNewIcon/explode.png" Stretch="Uniform"/>
</Button>
<Button Name="CollapseBtn" Grid.Row="1" Grid.Column="1"
Style="{StaticResource VeinMatchWindow_Button}"
Margin="1,5,1,0"
ToolTip="Ricomponi assemblato"
IsEnabled="False">
<Image Source="/Resources/VeinMatchNewIcon/collapse.png" Stretch="Uniform"/>
</Button>
<Button Name="ExplodeNormalsBtn" Grid.Row="1" Grid.Column="2"
Style="{StaticResource VeinMatchWindow_Button}"
Margin="0,5,1,0"
ToolTip="Esplodi assemblato lungo le normali"
HorizontalAlignment="Right" Width="35"
IsEnabled="True">
<Image Source="/Resources/VeinMatchNewIcon/explode_normals.png" Stretch="Uniform"/>
</Button>
</Grid>
<!--<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="0.5*"/>
<ColumnDefinition Width="1.5*"/>
</Grid.ColumnDefinitions>
<UniformGrid>
<TextBlock Name="Spessore" Height="20"
Foreground="{DynamicResource Omag_White}"
Background="Transparent"
Margin="1,5,1,0"
Text="Thick"
HorizontalAlignment="Center"
VerticalAlignment="Center"/>
</UniformGrid>
<UniformGrid Columns="1" Grid.Column="1">
<TextBox Name="TB_Thick" Height="26"
Foreground="{DynamicResource Omag_White}"
Background="{DynamicResource Omag_Black}"
Margin="1,5,1,0"
Text="0"
HorizontalContentAlignment="Right"
VerticalContentAlignment="Center"
IsEnabled="True"/>
</UniformGrid>
</Grid>-->
</StackPanel>
</Expander>
</Border>
<Border Style="{StaticResource Border}" Margin="0,1,0,5">
<Expander Foreground="{DynamicResource Omag_White}"
HorizontalAlignment="Stretch"
Header="ROTATE"
ExpandDirection="Down"
IsExpanded="True">
<StackPanel>
<UniformGrid Columns="3">
<ToggleButton Name="TgBtn_Rotation"
Style="{StaticResource VeinMatchWindow_ToggleButton}"
Margin="1,5,1,0"
ToolTip="Attiva/Conferma Rotazione"
IsEnabled="True">
<Image Source="/Resources/VeinMatchNewIcon/rotate.png" Stretch="Uniform"/>
</ToggleButton>
<Button Name="ResetRotationBtn"
Style="{StaticResource VeinMatchWindow_Button}"
Margin="1,5,1,0"
ToolTip="Resetta Rotazione"
IsEnabled="False">
<Image Source="/Resources/VeinMatchNewIcon/reset rotation.png" Stretch="Uniform"/>
</Button>
</UniformGrid>
<!--<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="0.5*"/>
<ColumnDefinition Width="1.5*"/>
</Grid.ColumnDefinitions>
<UniformGrid>
<TextBlock Name="Angolo" Height="20"
Foreground="{DynamicResource Omag_White}"
Background="Transparent"
Margin="1,5,1,0"
Text="Ang"
HorizontalAlignment="Center"
VerticalAlignment="Center"/>
</UniformGrid>
<UniformGrid Columns="1" Grid.Column="1">
<TextBox Name="AngText" Height="26"
Foreground="{DynamicResource Omag_White}"
Background="{DynamicResource Omag_Black}"
Margin="1,5,1,0"
Text="0"
HorizontalContentAlignment="Right"
VerticalContentAlignment="Center"
IsEnabled="False"/>
</UniformGrid>
</Grid>-->
<!--<CheckBox Name="AllOption_Rotate" Margin="1,5,1,0"
Foreground="{DynamicResource Omag_White}"
IsEnabled="False">All Selected</CheckBox>-->
</StackPanel>
</Expander>
</Border>
<Border Style="{StaticResource Border}" Margin="0,1,0,5">
<Expander Foreground="{DynamicResource Omag_White}"
HorizontalAlignment="Stretch"
Header="PAIR"
ExpandDirection="Down"
IsExpanded="True">
<StackPanel>
<UniformGrid Columns="3">
<ToggleButton Name="TgBtn_Pair"
Style="{StaticResource VeinMatchWindow_ToggleButton}"
Margin="1,5,1,0"
ToolTip="Attiva/Conferma Accoppiamento">
<Image Source="/Resources/VeinMatchNewIcon/pair.png" Stretch="Uniform"/>
</ToggleButton>
<Button Name="ResetPairBtn"
Style="{StaticResource VeinMatchWindow_Button}"
Margin="1,5,1,0"
ToolTip="Resetta Accoppiamento"
IsEnabled="False">
<Image Source="/Resources/VeinMatchNewIcon/reset pair.png" Stretch="Uniform"/>
</Button>
<Button Name="PairAllBtn"
Style="{StaticResource VeinMatchWindow_Button}"
Margin="1,5,1,0"
ToolTip="Accoppiamento automatico"
IsEnabled="True">
<Image Source="/Resources/VeinMatchNewIcon/autopair.png" Stretch="Uniform"/>
</Button>
</UniformGrid>
<ComboBox Name="PairOption"
Style="{StaticResource Raw_ComboBox}"
Margin="1,5,1,0"
IsEnabled="False"
Visibility="Collapsed"/>
<CheckBox Name="InvertOption" Margin="1,5,1,0"
Foreground="{DynamicResource Omag_White}"
IsEnabled="False"
Visibility="Collapsed">Invert</CheckBox>
<CheckBox Name="FlipOption1" Margin="1,5,1,0"
Foreground="{DynamicResource Omag_White}"
IsEnabled="False"
Visibility="Collapsed">Flip ∥</CheckBox>
<CheckBox Name="FlipOption2" Margin="1,5,1,0"
Foreground="{DynamicResource Omag_White}"
IsEnabled="False"
Visibility="Collapsed">Flip ⟂</CheckBox>
</StackPanel>
</Expander>
</Border>
<Border Style="{StaticResource Border}" Margin="0,1,0,5">
<Expander Foreground="{DynamicResource Omag_White}"
HorizontalAlignment="Stretch"
Header="MISURA"
ExpandDirection="Down"
IsExpanded="False">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="2*"/>
</Grid.ColumnDefinitions>
<ToggleButton Name="TgBtn_Measure"
Style="{StaticResource VeinMatchWindow_ToggleButton}"
Margin="1,5,1,0"
ToolTip="Attiva misura">
<Image Source="/Resources/VeinMatchNewIcon/ruler.png" Stretch="Uniform"/>
</ToggleButton>
<ComboBox Grid.Column="2"
Name="MeasureOption"
Style="{StaticResource Raw_ComboBox}"
Margin="1,5,1,0"
IsEnabled="False"/>
</Grid>
</Expander>
</Border>
<Border Style="{StaticResource Border}" Margin="0,1,0,5">
<Expander Foreground="{DynamicResource Omag_White}"
Header="IMPORT"
ExpandDirection="Down"
IsExpanded="False">
<Grid >
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="2*"/>
</Grid.ColumnDefinitions>
<Button Name="ImportBtn"
Style="{StaticResource VeinMatchWindow_Button}"
Margin="1,5,1,0"
ToolTip="Importa oggetto 3D">
<Image Source="/Resources/VeinMatchNewIcon/import.png" Stretch="Uniform"/>
</Button>
</Grid>
</Expander>
</Border>
<UniformGrid Columns="3">
<ToggleButton Name="TgBtn_Inters"
Style="{StaticResource VeinMatchWindow_ToggleButton}"
Margin="1,5,1,0"
ToolTip="Impedisci intersezioni">
<Image Source="/Resources/VeinMatchNewIcon/avoid intersection.png" Stretch="Uniform"/>
</ToggleButton>
<Button Name="ResetIntersBtn"
Style="{StaticResource VeinMatchWindow_Button}"
Margin="1,5,1,0"
ToolTip="Spegni intersezioni"
IsEnabled="False">
<Image Source="/Resources/VeinMatchNewIcon/hide intersections.png" Stretch="Uniform"/>
</Button>
<Button Name="UnpairBtn"
Style="{StaticResource VeinMatchWindow_Button}"
Margin="1,5,1,0"
ToolTip="Disaccoppia"
IsEnabled="False">
<Image Source="/Resources/VeinMatchNewIcon/unpair.png" Stretch="Uniform"/>
</Button>
</UniformGrid>
<UniformGrid Columns="3">
<Button Name="UndoBtn"
Style="{StaticResource VeinMatchWindow_Button}"
Margin="1,5,1,0"
ToolTip="Annulla ultima operazione"
IsEnabled="False">
<Image Source="/Resources/VeinMatchNewIcon/undo.png" Stretch="Uniform"/>
</Button>
<Button Name="RedoBtn"
Style="{StaticResource VeinMatchWindow_Button}"
Margin="1,5,1,0"
ToolTip="Ripeti ultima operazione annullata"
IsEnabled="False">
<Image Source="/Resources/VeinMatchNewIcon/redo.png" Stretch="Uniform"/>
</Button>
</UniformGrid>
<Border Style="{StaticResource Border}" Margin="0,1,0,5">
<Expander Foreground="{DynamicResource Omag_White}"
Header="MOVE"
ExpandDirection="Down"
IsExpanded="False"
Name="MoveExpander"
IsEnabled="False">
<StackPanel>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="0.5*"/>
<ColumnDefinition Width="1.5*"/>
</Grid.ColumnDefinitions>
<UniformGrid Columns="1" Grid.Column="0" Margin="0,0,0,0">
<TextBlock Name="TextBlX" Height="20"
Foreground="{DynamicResource Omag_White}"
Background="Transparent"
Margin="1,0,1,0"
Text="X"
HorizontalAlignment="Center"
VerticalAlignment="Center"/>
<TextBlock Name="TextBlY" Height="20"
Foreground="{DynamicResource Omag_White}"
Background="Transparent"
Margin="1,0,1,0"
Text="Y"
HorizontalAlignment="Center"
VerticalAlignment="Center"/>
<TextBlock Name="TextBlZ" Height="20"
Foreground="{DynamicResource Omag_White}"
Background="Transparent"
Margin="1,0,1,0"
Text="Z"
HorizontalAlignment="Center"
VerticalAlignment="Center"/>
</UniformGrid>
<UniformGrid Columns="1" Grid.Column="1">
<TextBox Name="TextX" Height="26"
Foreground="{DynamicResource Omag_White}"
Background="{DynamicResource Omag_Black}"
Margin="1,0,1,0"
Text="0"
HorizontalContentAlignment="Right"
VerticalContentAlignment="Center"/>
<TextBox Name="TextY" Height="26"
Foreground="{DynamicResource Omag_White}"
Background="{DynamicResource Omag_Black}"
Margin="1,0,1,0"
Text="0"
HorizontalContentAlignment="Right"
VerticalContentAlignment="Center"/>
<TextBox Name="TextZ" Height="26"
Foreground="{DynamicResource Omag_White}"
Background="{DynamicResource Omag_Black}"
Margin="1,0,1,0"
Text="0"
HorizontalContentAlignment="Right"
VerticalContentAlignment="Center"/>
</UniformGrid>
</Grid>
<UniformGrid Columns="3">
<Button Name="MovePreviewBtn"
Style="{StaticResource VeinMatchWindow_Button}"
Margin="1,5,1,0"
ToolTip="Preview dello spostamento">
<Image Source="/Resources/VeinMatchNewIcon/move.png" Stretch="Uniform"/>
</Button>
<Button Name="ConfirmMoveBtn"
Style="{StaticResource VeinMatchWindow_Button}"
Margin="1,5,1,0"
ToolTip="Conferma spostamento">
<Image Source="/Resources/VeinMatchNewIcon/confirm move.png" Stretch="Uniform"/>
</Button>
<Button Name="ResetMoveBtn"
Style="{StaticResource VeinMatchWindow_Button}"
Margin="1,5,1,0"
ToolTip="Resetta spostamento"
IsEnabled="False">
<Image Source="/Resources/VeinMatchNewIcon/reset move.png" Stretch="Uniform"/>
</Button>
</UniformGrid>
<CheckBox Name="AllOption_Move" Margin="1,5,1,0"
Foreground="{DynamicResource Omag_White}">All Selected</CheckBox>
</StackPanel>
</Expander>
</Border>
<Border Style="{StaticResource Border}" Margin="0,1,0,5">
<Expander Foreground="{DynamicResource Omag_White}"
HorizontalAlignment="Stretch"
Header="SELECTION"
ExpandDirection="Down"
IsExpanded="False"
Name="SelectExpander"
IsEnabled="True">
<UniformGrid Columns="3">
<Button Name="SelectAllBtn"
Style="{StaticResource VeinMatchWindow_Button}"
Margin="1,5,1,0"
ToolTip="Seleziona tutti i pezzi">
<Image Source="/Resources/VeinMatchNewIcon/select all.png" Stretch="Uniform"/>
</Button>
<Button Name="DeselectAllBtn"
Style="{StaticResource VeinMatchWindow_Button}"
Margin="1,5,1,0"
ToolTip="Deseleziona tutti i pezzi">
<Image Source="/Resources/VeinMatchNewIcon/deselect all.png" Stretch="Uniform"/>
</Button>
<ToggleButton Name="TgBtn_MultiSel"
Style="{StaticResource VeinMatchWindow_ToggleButton}"
Margin="1,5,1,0"
ToolTip="Attiva selezione multipla">
<Image Source="/Resources/VeinMatchNewIcon/multi sel.png" Stretch="Uniform"/>
</ToggleButton>
</UniformGrid>
</Expander>
</Border>
</StackPanel>
</TabItem>
<TabItem Name="TabItem1"
Background="Transparent"
Foreground="{DynamicResource Omag_Yellow}"
Style="{StaticResource TabItemVeinMatch}"
HorizontalContentAlignment="Center"
Margin="0,0,0,0">
<TabItem.Header>
<StackPanel Orientation="Horizontal">
<TextBlock Text="🗺" FontSize="18"/>
</StackPanel>
</TabItem.Header>
<StackPanel Orientation="Vertical" Grid.Row="0">
<ToggleButton Name="ShowTextBtn" Height="40" Width="80"
Margin="0,5,0,0"
Content="ShowText"/>
<ToggleButton Name="EditBtn" Height="40" Width="80"
Margin="0,5,0,0"
Content="Edit"/>
<ToggleButton Name="VerifyBtn" Height="40" Width="80"
Margin="0,5,0,0"
Content="Verify"/>
<ToggleButton Name="MagneticBtn" Height="40" Width="80"
Visibility="Collapsed"
Margin="0,5,0,0"
Content="Magnetic"/>
<Button Name="ExportBtn" Height="40" Width="80"
Margin="0,5,0,0"
Content="Export"/>
<Button Name="AssemblyBtn" Height="40" Width="80"
Margin="0,5,0,0"
Content="3D"/>
</StackPanel>
</TabItem>
</TabControl>
<StackPanel DockPanel.Dock="Right"
Margin="0,1,0,5"
Width="15">
<Button x:Name="ShowTreeView"
Height="15">
<Image Source="/Resources/VeinMatchNewIcon/feature-tree.png" Stretch="Uniform"/>
</Button>
<!--<OmagOFFICE:VeinMatchingTree x:Name="TreeViewWnd" Visibility="Hidden"/>-->
<OmagOFFICE:VeinMatchingInfo x:Name="InfoPartWnd" Visibility="Hidden"/>
<Popup x:Name="Popup_LeftPanel" PlacementTarget="{Binding ElementName=ShowTreeView}"
Placement="Left" AllowsTransparency="True" Focusable="False">
<OmagOFFICE:VeinMatchingTree x:Name="TreeViewWnd"/>
</Popup>
</StackPanel>
<TextBlock DockPanel.Dock="Bottom"
TextWrapping="WrapWithOverflow"
Margin="5,2,5,2"
Name="MyMsgTxBl"
Text="DEMO by Egalware ( N. and D. ) "
Foreground="{DynamicResource Omag_Yellow}"
FontSize="20"
Height="auto"/>
</DockPanel>
</EgtWPFLib5:EgtCustomWindow>
File diff suppressed because it is too large Load Diff
@@ -116,6 +116,15 @@
</DataTemplate> </DataTemplate>
</DataGridTextColumn.HeaderTemplate> </DataGridTextColumn.HeaderTemplate>
</DataGridTextColumn> </DataGridTextColumn>
<!--Flux-->
<DataGridTextColumn Binding="{Binding Flux}"
Width="*">
<DataGridTextColumn.HeaderTemplate>
<DataTemplate>
<TextBlock Text="{Binding DataContext.Flux_Msg,RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"/>
</DataTemplate>
</DataGridTextColumn.HeaderTemplate>
</DataGridTextColumn>
<!--Q1--> <!--Q1-->
<DataGridTextColumn Binding="{Binding Q1}" <DataGridTextColumn Binding="{Binding Q1}"
Width="*"> Width="*">
+27 -131
View File
@@ -135,11 +135,13 @@
<SpecificVersion>False</SpecificVersion> <SpecificVersion>False</SpecificVersion>
<HintPath>..\..\EgtProg\Dll32\EgtPHOTOLib.dll</HintPath> <HintPath>..\..\EgtProg\Dll32\EgtPHOTOLib.dll</HintPath>
</Reference> </Reference>
<Reference Include="EgtUILib"> <Reference Include="EgtUILib, Version=2.7.5.2, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\EgtProg\DllD32\EgtUILib.dll</HintPath> <SpecificVersion>False</SpecificVersion>
<HintPath>..\..\EgtProg\OmagOFFICE\EgtUILib.dll</HintPath>
</Reference> </Reference>
<Reference Include="EgtWPFLib5"> <Reference Include="EgtWPFLib5, Version=2.7.4.1, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\EgtProg\DllD32\EgtWPFLib5.dll</HintPath> <SpecificVersion>False</SpecificVersion>
<HintPath>..\..\EgtProg\OmagOFFICE\EgtWPFLib5.dll</HintPath>
</Reference> </Reference>
<Reference Include="PresentationFramework.Aero" /> <Reference Include="PresentationFramework.Aero" />
<Reference Include="System.Core" /> <Reference Include="System.Core" />
@@ -229,26 +231,7 @@
<Compile Include="EgtStoneLib\GeomCalc.vb" /> <Compile Include="EgtStoneLib\GeomCalc.vb" />
<Compile Include="EgtStoneLib\SplitAuto.vb" /> <Compile Include="EgtStoneLib\SplitAuto.vb" />
<Compile Include="EgtStoneLib\VacuumCups.vb" /> <Compile Include="EgtStoneLib\VacuumCups.vb" />
<Compile Include="MyVeinMatch\PairInputDataVeinMatch.xaml.vb"> <Compile Include="EgtStoneLib\VeinMatchingWindow.xaml.vb">
<DependentUpon>PairInputDataVeinMatch.xaml</DependentUpon>
</Compile>
<Compile Include="MyVeinMatch\RotationInputDataVeinMatch.xaml.vb">
<DependentUpon>RotationInputDataVeinMatch.xaml</DependentUpon>
</Compile>
<Compile Include="MyVeinMatch\RotationInputDataVeinMatchVM.vb" />
<Compile Include="MyVeinMatch\SolidInputDataVeinMatch.xaml.vb">
<DependentUpon>SolidInputDataVeinMatch.xaml</DependentUpon>
</Compile>
<Compile Include="MyVeinMatch\TopBarVeinMatch.xaml.vb">
<DependentUpon>TopBarVeinMatch.xaml</DependentUpon>
</Compile>
<Compile Include="MyVeinMatch\VeinMatchingInfo.xaml.vb">
<DependentUpon>VeinMatchingInfo.xaml</DependentUpon>
</Compile>
<Compile Include="MyVeinMatch\VeinMatchingTree.xaml.vb">
<DependentUpon>VeinMatchingTree.xaml</DependentUpon>
</Compile>
<Compile Include="MyVeinMatch\VeinMatchingWindow.xaml.vb">
<DependentUpon>VeinMatchingWindow.xaml</DependentUpon> <DependentUpon>VeinMatchingWindow.xaml</DependentUpon>
</Compile> </Compile>
<Compile Include="InstrumentPanel\PrintPanelV.xaml.vb"> <Compile Include="InstrumentPanel\PrintPanelV.xaml.vb">
@@ -310,6 +293,10 @@
<DependentUpon>SplitModeV.xaml</DependentUpon> <DependentUpon>SplitModeV.xaml</DependentUpon>
</Compile> </Compile>
<Compile Include="OptionPanel\MachiningTab\SplitModeVM.vb" /> <Compile Include="OptionPanel\MachiningTab\SplitModeVM.vb" />
<Compile Include="OptionPanel\NestingTab\ChangeTableV.xaml.vb">
<DependentUpon>ChangeTableV.xaml</DependentUpon>
</Compile>
<Compile Include="OptionPanel\NestingTab\ChangeTableVM.vb" />
<Compile Include="OptionPanel\NestingTab\MultiSelectionV.xaml.vb"> <Compile Include="OptionPanel\NestingTab\MultiSelectionV.xaml.vb">
<DependentUpon>MultiSelectionV.xaml</DependentUpon> <DependentUpon>MultiSelectionV.xaml</DependentUpon>
</Compile> </Compile>
@@ -440,31 +427,7 @@
<SubType>Designer</SubType> <SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator> <Generator>MSBuild:Compile</Generator>
</Page> </Page>
<Page Include="MyVeinMatch\PairInputDataVeinMatch.xaml"> <Page Include="EgtStoneLib\VeinMatchingWindow.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="MyVeinMatch\RotationInputDataVeinMatch.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="MyVeinMatch\SolidInputDataVeinMatch.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="MyVeinMatch\TopBarVeinMatch.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="MyVeinMatch\VeinMatchingInfo.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="MyVeinMatch\VeinMatchingTree.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="MyVeinMatch\VeinMatchingWindow.xaml">
<Generator>MSBuild:Compile</Generator> <Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType> <SubType>Designer</SubType>
</Page> </Page>
@@ -540,6 +503,10 @@
<SubType>Designer</SubType> <SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator> <Generator>MSBuild:Compile</Generator>
</Page> </Page>
<Page Include="OptionPanel\NestingTab\ChangeTableV.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="OptionPanel\NestingTab\MultiSelectionV.xaml"> <Page Include="OptionPanel\NestingTab\MultiSelectionV.xaml">
<SubType>Designer</SubType> <SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator> <Generator>MSBuild:Compile</Generator>
@@ -1004,102 +971,31 @@
<Resource Include="Resources\NewIcons\Linea-Copia.png" /> <Resource Include="Resources\NewIcons\Linea-Copia.png" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Resource Include="Resources\TreeView\Import.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\TreeView\PartSolid.png" />
<Resource Include="Resources\NewIcons\DB-WJ.png" /> <Resource Include="Resources\NewIcons\DB-WJ.png" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<Resource Include="Resources\VeinMatchNewIcon\cube.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\VeinMatchNewIcon\cubes.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\VeinMatchNewIcon\reset cubes.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\VeinMatchNewIcon\explode.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\VeinMatchNewIcon\collapse.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\VeinMatchNewIcon\explode_normals.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\VeinMatchNewIcon\rotate.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\VeinMatchNewIcon\reset rotation.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\VeinMatchNewIcon\import.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\VeinMatchNewIcon\pair.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\VeinMatchNewIcon\unpair.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\VeinMatchNewIcon\feature-tree.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\VeinMatchNewIcon\ruler.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\VeinMatchNewIcon\avoid intersection.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\VeinMatchNewIcon\hide intersections.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\VeinMatchNewIcon\undo.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\VeinMatchNewIcon\redo.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\VeinMatchNewIcon\move.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\VeinMatchNewIcon\confirm move.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\VeinMatchNewIcon\reset move.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\VeinMatchNewIcon\reset pair.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\VeinMatchNewIcon\select all.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\VeinMatchNewIcon\deselect all.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\VeinMatchNewIcon\multi sel.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\VeinMatchNewIcon\reset.png" />
</ItemGroup>
<ItemGroup> <ItemGroup>
<Resource Include="Resources\DetailPage\Cancel.png" /> <Resource Include="Resources\DetailPage\Cancel.png" />
<Resource Include="Resources\DetailPage\Confirm.png" /> <Resource Include="Resources\DetailPage\Confirm.png" />
<Resource Include="Resources\DetailPage\Elimina.png" /> <Resource Include="Resources\DetailPage\Elimina.png" />
<Resource Include="Resources\DetailPage\Pencil.png" />
<Resource Include="Resources\DetailPage\Photo.png" /> <Resource Include="Resources\DetailPage\Photo.png" />
<Resource Include="Resources\DetailPage\Polygon.png" />
<Resource Include="Resources\DetailPage\Print.png" /> <Resource Include="Resources\DetailPage\Print.png" />
<Resource Include="Resources\DetailPage\Reset.png" />
<Resource Include="Resources\DetailPage\Rubber.png" />
<Resource Include="Resources\DetailPage\Save.png" /> <Resource Include="Resources\DetailPage\Save.png" />
</ItemGroup> <Resource Include="Resources\DetailPage\ZoomAll.png" />
<ItemGroup>
<Resource Include="Resources\VeinMatchNewIcon\autopair.png" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Resource Include="Resources\NewIcons\LightArrowOff.png" /> <Resource Include="Resources\NewIcons\LightArrowOff.png" />
<Resource Include="Resources\NewIcons\LightArrowOn.png" /> <Resource Include="Resources\NewIcons\LightArrowOn.png" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<Resource Include="Resources\NewIcons\table.png" />
</ItemGroup>
<ItemGroup>
<Resource Include="Resources\NewIcons\tableS.png" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
<PropertyGroup> <PropertyGroup>
<PostBuildEvent>IF "$(PlatformName)"=="x86" IF "$(ConfigurationName)" == "Release" copy $(TargetPath) c:\EgtProg\OmagOFFICE\OmagOFFICER32.exe <PostBuildEvent>IF "$(PlatformName)"=="x86" IF "$(ConfigurationName)" == "Release" copy $(TargetPath) c:\EgtProg\OmagOFFICE\OmagOFFICER32.exe
+3 -3
View File
@@ -749,7 +749,7 @@ Public Class MoveRawModeVM
If VerifyCollisionWithOtherRawPart(nId) Then If VerifyCollisionWithOtherRawPart(nId) Then
' mantengo la selezione del pezzo ' mantengo la selezione del pezzo
EgtSetStatus(nId, GDB_ST.SEL) EgtSetStatus(nId, GDB_ST.SEL)
OmagOFFICEMap.refStatusBarVM.SetOutputMessage("Collisione pezzi", 3, MSG_TYPE.ERROR_) OmagOFFICEMap.refStatusBarVM.SetOutputMessage(EgtMsg(91231), 3, MSG_TYPE.ERROR_) ' Collisione pezzi
Else Else
' Se con ventose, le nascondo ' Se con ventose, le nascondo
If Not OmagOFFICEMap.refMachiningTabVM.ByHand Then EgtSetStatus(GetVacuumId(), GDB_ST.OFF) If Not OmagOFFICEMap.refMachiningTabVM.ByHand Then EgtSetStatus(GetVacuumId(), GDB_ST.OFF)
@@ -761,7 +761,7 @@ Public Class MoveRawModeVM
If VerifyCollisionWithOtherRawPart(m_CurrRawOnVacuum) Then If VerifyCollisionWithOtherRawPart(m_CurrRawOnVacuum) Then
' mantengo la selezione del pezzo ' mantengo la selezione del pezzo
EgtSetStatus(m_CurrRawOnVacuum, GDB_ST.SEL) EgtSetStatus(m_CurrRawOnVacuum, GDB_ST.SEL)
OmagOFFICEMap.refStatusBarVM.SetOutputMessage("Collisione pezzi", 3, MSG_TYPE.ERROR_) OmagOFFICEMap.refStatusBarVM.SetOutputMessage(EgtMsg(91231), 3, MSG_TYPE.ERROR_) ' Collisione pezzi
EgtDraw() EgtDraw()
' esco dal ciclo, prima devo depositare correttamente il pezzo ' esco dal ciclo, prima devo depositare correttamente il pezzo
Exit While Exit While
@@ -819,7 +819,7 @@ Public Class MoveRawModeVM
If VerifyCollisionWithOtherRawPart(m_CurrRawOnVacuum) Then If VerifyCollisionWithOtherRawPart(m_CurrRawOnVacuum) Then
' mantengo la selezione del pezzo ' mantengo la selezione del pezzo
EgtSetStatus(m_CurrRawOnVacuum, GDB_ST.SEL) EgtSetStatus(m_CurrRawOnVacuum, GDB_ST.SEL)
OmagOFFICEMap.refStatusBarVM.SetOutputMessage("Collisione pezzi", 3, MSG_TYPE.ERROR_) OmagOFFICEMap.refStatusBarVM.SetOutputMessage(EgtMsg(91231), 3, MSG_TYPE.ERROR_) ' Collisione pezzi
EgtDraw() EgtDraw()
End If End If
+10 -10
View File
@@ -371,11 +371,11 @@ Public Class SplitModeVM
m_LayNbArrTgBtn_IsChecked = value m_LayNbArrTgBtn_IsChecked = value
If value Then If value Then
StatusOffNumbArrow(GDB_ST.ON_) StatusOffNumbArrow(GDB_ST.ON_)
m_LayNbArrTgBtnMsg = "Hide" m_LayNbArrTgBtnMsg = EgtMsg(91218) ' Hide
m_LayNbArrTgBtnImg = "/Resources/NewIcons/LightArrowOn.png" m_LayNbArrTgBtnImg = "/Resources/NewIcons/LightArrowOn.png"
Else Else
StatusOffNumbArrow(GDB_ST.OFF) StatusOffNumbArrow(GDB_ST.OFF)
m_LayNbArrTgBtnMsg = "Show" m_LayNbArrTgBtnMsg = EgtMsg(91219) ' Show
m_LayNbArrTgBtnImg = "/Resources/NewIcons/LightArrowOff.png" m_LayNbArrTgBtnImg = "/Resources/NewIcons/LightArrowOff.png"
End If End If
NotifyPropertyChanged(NameOf(LayNbArrTgBtnMsg)) NotifyPropertyChanged(NameOf(LayNbArrTgBtnMsg))
@@ -819,7 +819,7 @@ Public Class SplitModeVM
End Sub End Sub
Private Sub AddTopText(ByRef sName As String) Private Sub AddTopText(ByRef sName As String)
sName &= " Top" sName &= EgtMsg(91217) ' Top
End Sub End Sub
Private Sub RemovePauseText(ByRef sName As String) Private Sub RemovePauseText(ByRef sName As String)
@@ -2325,7 +2325,7 @@ Public Class SplitModeVM
If bFirstInd Then If bFirstInd Then
Dim ModifStartWindow As New ModifStartEndCutWindowV Dim ModifStartWindow As New ModifStartEndCutWindowV
Dim ModifStartWindowVM As New ModifStartEndCutWindowVM Dim ModifStartWindowVM As New ModifStartEndCutWindowVM
ModifStartWindowVM.Title = "Sawing" ModifStartWindowVM.Title = EgtMsg(90791) ' Sawing
ModifStartWindow.DataContext = ModifStartWindowVM ModifStartWindow.DataContext = ModifStartWindowVM
ModifStartWindow.Owner = Application.Current.MainWindow ModifStartWindow.Owner = Application.Current.MainWindow
ModifStartWindowVM.SetVal(dOrigUsal) ModifStartWindowVM.SetVal(dOrigUsal)
@@ -2386,7 +2386,7 @@ Public Class SplitModeVM
If bFirstMill Then If bFirstMill Then
Dim ModifStartWindow As New ModifStartEndCutWindowV Dim ModifStartWindow As New ModifStartEndCutWindowV
Dim ModifStartWindowVM As New ModifStartEndCutWindowVM Dim ModifStartWindowVM As New ModifStartEndCutWindowVM
ModifStartWindowVM.Title = "Milling" ModifStartWindowVM.Title = EgtMsg(90793) ' Milling
ModifStartWindow.DataContext = ModifStartWindowVM ModifStartWindow.DataContext = ModifStartWindowVM
ModifStartWindow.Owner = Application.Current.MainWindow ModifStartWindow.Owner = Application.Current.MainWindow
ModifStartWindowVM.SetVal(dOrigUsal) ModifStartWindowVM.SetVal(dOrigUsal)
@@ -2423,7 +2423,7 @@ Public Class SplitModeVM
' Dialogo richiesta valori ' Dialogo richiesta valori
Dim ModifStartWnd As New ModifStartEndWjWindowV Dim ModifStartWnd As New ModifStartEndWjWindowV
Dim ModifStartWndVM As New ModifStartEndWjWindowVM Dim ModifStartWndVM As New ModifStartEndWjWindowVM
ModifStartWndVM.Title = "Water jetting" ModifStartWndVM.Title = EgtMsg(90798) ' Water jetting
ModifStartWnd.DataContext = ModifStartWndVM ModifStartWnd.DataContext = ModifStartWndVM
ModifStartWnd.Owner = Application.Current.MainWindow ModifStartWnd.Owner = Application.Current.MainWindow
ModifStartWndVM.HoleVisibility = Visibility.Visible ModifStartWndVM.HoleVisibility = Visibility.Visible
@@ -2509,7 +2509,7 @@ Public Class SplitModeVM
If bFirstInd Then If bFirstInd Then
Dim ModifStartWindow As New ModifStartEndCutWindowV Dim ModifStartWindow As New ModifStartEndCutWindowV
Dim ModifStartWindowVM As New ModifStartEndCutWindowVM Dim ModifStartWindowVM As New ModifStartEndCutWindowVM
ModifStartWindowVM.Title = "Sawing" ModifStartWindowVM.Title = EgtMsg(90791) ' Sawing
ModifStartWindow.DataContext = ModifStartWindowVM ModifStartWindow.DataContext = ModifStartWindowVM
ModifStartWindow.Owner = Application.Current.MainWindow ModifStartWindow.Owner = Application.Current.MainWindow
ModifStartWindowVM.SetVal(dOrigUeal) ModifStartWindowVM.SetVal(dOrigUeal)
@@ -2564,7 +2564,7 @@ Public Class SplitModeVM
If bFirstMill Then If bFirstMill Then
Dim ModifStartWindow As New ModifStartEndCutWindowV Dim ModifStartWindow As New ModifStartEndCutWindowV
Dim ModifStartWindowVM As New ModifStartEndCutWindowVM Dim ModifStartWindowVM As New ModifStartEndCutWindowVM
ModifStartWindowVM.Title = "Milling" ModifStartWindowVM.Title = EgtMsg(90793) ' Milling
ModifStartWindow.DataContext = ModifStartWindowVM ModifStartWindow.DataContext = ModifStartWindowVM
ModifStartWindow.Owner = Application.Current.MainWindow ModifStartWindow.Owner = Application.Current.MainWindow
ModifStartWindowVM.SetVal(dOrigUeal) ModifStartWindowVM.SetVal(dOrigUeal)
@@ -2599,7 +2599,7 @@ Public Class SplitModeVM
' Dialogo richiesta valori ' Dialogo richiesta valori
Dim ModifStartWnd As New ModifStartEndWjWindowV() Dim ModifStartWnd As New ModifStartEndWjWindowV()
Dim ModifStartWndVM As New ModifStartEndWjWindowVM Dim ModifStartWndVM As New ModifStartEndWjWindowVM
ModifStartWndVM.Title = "Water jetting" ModifStartWndVM.Title = EgtMsg(90798) ' Water jetting
ModifStartWnd.DataContext = ModifStartWndVM ModifStartWnd.DataContext = ModifStartWndVM
ModifStartWnd.Owner = Application.Current.MainWindow ModifStartWnd.Owner = Application.Current.MainWindow
ModifStartWndVM.HoleVisibility = Visibility.Collapsed ModifStartWndVM.HoleVisibility = Visibility.Collapsed
@@ -3007,7 +3007,7 @@ Public Class SplitModeVM
'(m_MainWindow, m_MainWindow.m_CurrentMachine.Qualities, "Quality") '(m_MainWindow, m_MainWindow.m_CurrentMachine.Qualities, "Quality")
Dim ModifyQualityWnd As New ModifyQualityV Dim ModifyQualityWnd As New ModifyQualityV
Dim ModifyQuality As New ModifyQualityVM Dim ModifyQuality As New ModifyQualityVM
ModifyQuality.Title = "Quality" ModifyQuality.Title = EgtMsg(91673) ' Quality
ModifyQuality.QualityList = CurrentMachine.Qualities ModifyQuality.QualityList = CurrentMachine.Qualities
ModifyQualityWnd.DataContext = ModifyQuality ModifyQualityWnd.DataContext = ModifyQuality
ModifyQualityWnd.Owner = Application.Current.MainWindow ModifyQualityWnd.Owner = Application.Current.MainWindow
+63
View File
@@ -0,0 +1,63 @@
<EgtWPFLib5:EgtCustomWindow x:Class="ChangeTableV"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:sys="clr-namespace:System;assembly=mscorlib"
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
Style="{DynamicResource {x:Type EgtWPFLib5:EgtCustomWindow}}"
WindowStyle="None" ResizeMode="NoResize" TitleBarHeight="30" IsResizable="False"
IsMinimizable="False" WindowStartupLocation="CenterScreen"
CloseCommand="{Binding CloseCommand,Mode=OneWay,UpdateSourceTrigger=PropertyChanged}"
Title="{Binding sTitle}" Height="150" Width="320">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="2*"/>
<RowDefinition Height="1*"/>
</Grid.RowDefinitions>
<ItemsControl ItemsSource="{Binding CurrTableList}">
<!--Definisco l'organizzazione dei comandi-->
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<StackPanel Orientation="Horizontal"
HorizontalAlignment="Center"
VerticalAlignment="Center"/>
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
<!--Definisco il contenuto del comando-->
<ItemsControl.ItemTemplate>
<DataTemplate>
<RadioButton GroupName="TabGrp"
IsChecked="{Binding IsActive}"
Width="60" Height="60"
Style="{DynamicResource ChangeTable_ToggleButton}">
<Grid>
<!--Nome della tavole: Tab #-->
<TextBlock Text="{Binding sName}"
HorizontalAlignment="Center"
Background="Transparent">
<TextBlock.Style>
<Style TargetType="{x:Type TextBlock}">
<Setter Property="Foreground" Value="{StaticResource Omag_LightGray}"/>
<Style.Triggers>
<DataTrigger Binding="{Binding IsChecked, RelativeSource={RelativeSource AncestorType=RadioButton}}" Value="True">
<Setter Property="Foreground" Value="{StaticResource Omag_White}"/>
</DataTrigger>
</Style.Triggers>
</Style>
</TextBlock.Style>
</TextBlock>
<!--Rappresentazione di una tavola di lavoro-->
<Image Source="{Binding ImgTab}" Margin="0,20,0,0"/>
</Grid>
</RadioButton>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
<UniformGrid Grid.Row="1" Columns="2">
<Button Content="Ok" Margin="5" Command="{Binding OkCommand}"
Style="{StaticResource OptionPanel_TextButton}"/>
<Button Content="Cancel" Margin="5" Command="{Binding CancelCommand}"
Style="{StaticResource OptionPanel_TextButton}"/>
</UniformGrid>
</Grid>
</EgtWPFLib5:EgtCustomWindow>
@@ -0,0 +1,3 @@
Public Class ChangeTableV
End Class
+143
View File
@@ -0,0 +1,143 @@
Public Class ChangeTableVM
Inherits VMBase
Private m_refChanTableV As ChangeTableV
Public Enum EnumDialogResult
OK
CANCEL
End Enum
Private m_MyDialogResult As EnumDialogResult
Public ReadOnly Property MyDialogResult As EnumDialogResult
Get
Return m_MyDialogResult
End Get
End Property
Private m_sTitle As String = "Seleziona tavola di lavoro"
Public ReadOnly Property sTitle As String
Get
Return m_sTitle
End Get
End Property
Private m_nSelectedTable As Integer = 0
Public ReadOnly Property nSelectedTable As Integer
Get
Return m_nSelectedTable
End Get
End Property
Private m_cmdOk As ICommand
Private m_cmdCancel As ICommand
Sub New(refV As ChangeTableV)
m_refChanTableV = refV
' Procedo alla creazione della lista delle tavole disponibili
Initialized()
End Sub
Private m_CurrTableList As New List(Of TableToChange)
Public ReadOnly Property CurrTableList As List(Of TableToChange)
Get
Return m_CurrTableList
End Get
End Property
Private Sub Initialized()
' 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
m_CurrTableList.Add(New TableToChange("Tab", (nInd + 1), ((nInd + 1) = nIndeXCurrTab)))
Next
End Sub
Public ReadOnly Property OkCommand() As ICommand
Get
If m_cmdOk Is Nothing Then
m_cmdOk = New Command(AddressOf Ok)
End If
Return m_cmdOk
End Get
End Property
Public ReadOnly Property CancelCommand() As ICommand
Get
If m_cmdCancel Is Nothing Then
m_cmdCancel = New Command(AddressOf Cancel)
End If
Return m_cmdCancel
End Get
End Property
Private Sub Ok()
' 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
m_MyDialogResult = EnumDialogResult.OK
' procedo alla chiusura della finetra
m_refChanTableV.Close()
End Sub
Private Sub Cancel()
m_MyDialogResult = EnumDialogResult.CANCEL
' procedo alla chiusura della finetra
m_refChanTableV.Close()
End Sub
End Class
Public Class TableToChange
Inherits VMBase
Private Property m_sName As String = "Tab"
Public ReadOnly Property sName As String
Get
Return m_sName
End Get
End Property
Private m_sImgTab As String = "\Resources\NewIcons\table.png"
Public ReadOnly Property ImgTab As String
Get
Return If(m_bIsActive, "\Resources\NewIcons\table.png", "\Resources\NewIcons\tableS.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
If m_bIsActive Then
m_sImgTab = "\Resources\NewIcons\table.png"
Else
m_sImgTab = "\Resources\NewIcons\tableS.png"
End If
NotifyPropertyChanged(NameOf(IsActive))
NotifyPropertyChanged(NameOf(ImgTab))
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
End Class
+4 -5
View File
@@ -1,5 +1,4 @@
Imports EgtUILib Imports EgtUILib
Imports EgtWPFLib5
Public Class MultiSelectionVM Public Class MultiSelectionVM
Inherits VMBase Inherits VMBase
@@ -8,24 +7,24 @@ Public Class MultiSelectionVM
Public ReadOnly Property TitleMsg As String Public ReadOnly Property TitleMsg As String
Get Get
Return "Multiple selection" Return EgtMsg(91681) ' Multiple selection
End Get End Get
End Property End Property
Public ReadOnly Property SelectionMsg As String Public ReadOnly Property SelectionMsg As String
Get Get
Return "Number of Parts" Return EgtMsg(91682) ' Number of Parts
End Get End Get
End Property End Property
Public ReadOnly Property OkMsg As String Public ReadOnly Property OkMsg As String
Get Get
Return "Ok" Return EgtMsg(91651) ' Ok
End Get End Get
End Property End Property
Public ReadOnly Property CancelMsg As String Public ReadOnly Property CancelMsg As String
Get Get
Return "Cancel" Return EgtMsg(91652) ' Cancel
End Get End Get
End Property End Property
+303 -4
View File
@@ -1,5 +1,6 @@
Imports EgtWPFLib5 Imports EgtWPFLib5
Imports EgtUILib Imports EgtUILib
Imports OmagOFFICE.ChangeTableVM
Public Class NestingTabVM Public Class NestingTabVM
Inherits VMBase Inherits VMBase
@@ -407,6 +408,8 @@ Public Class NestingTabVM
m_CsvImportWindow = New CsvWindowV(Application.Current.MainWindow, New CsvWindowVM) m_CsvImportWindow = New CsvWindowV(Application.Current.MainWindow, New CsvWindowVM)
m_CsvImportWindow.Show() m_CsvImportWindow.Show()
End If End If
' Per sicurezza spengo la visualizzazione di tutti i percorsi di lavorazione
HideAllMachinings()
EgtZoom(ZM.ALL) EgtZoom(ZM.ALL)
Return True Return True
End Function End Function
@@ -582,6 +585,208 @@ Public Class NestingTabVM
m_bStartRot = False m_bStartRot = False
End Sub End Sub
Friend Function RotateAllRawParts(dAngDeg As Double, Optional bIsReg As Boolean = True) As Boolean
' Recupero rotazione totale
Dim dRegRot As Double = CamAuto.GetRegistrationRotation()
' Recupero il centro del grezzo iniziale per usarlo come centro della rotazione
Dim ptCen As New Point3d
GetRawCenter(ptCen)
' Provo la rotazione
Dim bMoveOk As Boolean = True
Dim nPhase As Integer = 1
Dim nRawId As Integer = GDB_ID.NULL
While nPhase <= EgtGetPhaseCount()
EgtSetCurrPhase(nPhase)
nRawId = EgtGetFirstRawPart()
While nRawId <> GDB_ID.NULL
If EgtVerifyRawPartPhase(nRawId, nPhase) Then
' Rotazione del centro come spostamento grezzo più rotazione grezzo attorno al suo centro
Dim ptRawCen As New Point3d
EgtGetRawPartCenter(nRawId, ptRawCen)
Dim ptMovCen As New Point3d(ptRawCen)
ptMovCen.Rotate(ptCen, Vector3d.Z_AX(), dAngDeg)
If Not EgtMoveRawPart(nRawId, ptMovCen - ptRawCen) Then
bMoveOk = False
Exit While
End If
If Not EgtRotateRawPart(nRawId, Vector3d.Z_AX(), dAngDeg) Then
EgtMoveRawPart(nRawId, -(ptMovCen - ptRawCen))
bMoveOk = False
Exit While
End If
End If
nRawId = EgtGetNextRawPart(nRawId)
End While
If Not bMoveOk Then Exit While
nPhase += 1
End While
' Se rotazione impossibile, ripristino posizione dei grezzi già spostati
If Not bMoveOk Then
Dim nRevPhase As Integer = 1
Dim nRevRawId As Integer = GDB_ID.NULL
While nRevPhase <= nPhase
EgtSetCurrPhase(nRevPhase)
nRevRawId = EgtGetFirstRawPart()
While nRevRawId <> GDB_ID.NULL And (nRevPhase < nPhase Or nRevRawId <> nRawId)
If EgtVerifyRawPartPhase(nRevRawId, nRevPhase) Then
' Eseguo al contrario
EgtRotateRawPart(nRevRawId, Vector3d.Z_AX(), -dAngDeg)
Dim ptRawCen As New Point3d
EgtGetRawPartCenter(nRevRawId, ptRawCen)
Dim ptMovCen As New Point3d(ptRawCen)
ptMovCen.Rotate(ptCen, Vector3d.Z_AX(), -dAngDeg)
EgtMoveRawPart(nRevRawId, (ptMovCen - ptRawCen))
End If
nRevRawId = EgtGetNextRawPart(nRevRawId)
End While
nRevPhase += 1
End While
' Altrimenti eseguo sistemazioni
Else
' Origine della tavola
Dim ptOri As Point3d
EgtGetTableRef(1, ptOri)
' Annullo rotazioni dei grezzi e le rifaccio sulle parti componenti
Dim nRevPhase As Integer = 1
Dim nRevRawId As Integer = GDB_ID.NULL
While nRevPhase <= EgtGetPhaseCount()
EgtSetCurrPhase(nRevPhase)
nRevRawId = EgtGetFirstRawPart()
While nRevRawId <> GDB_ID.NULL
If EgtVerifyRawPartPhase(nRevRawId, nRevPhase) Then
' Eseguo al contrario
EgtRotateRawPart(nRevRawId, Vector3d.Z_AX(), -dAngDeg)
Dim ptRawCen As New Point3d
EgtGetRawPartCenter(nRevRawId, ptRawCen)
Dim ptMovCen As New Point3d(ptRawCen)
ptMovCen.Rotate(ptCen, Vector3d.Z_AX(), -dAngDeg)
EgtMoveRawPart(nRevRawId, (ptMovCen - ptRawCen))
' Rifaccio sugli oggetti contenuti nel grezzo
Dim nId As Integer = EgtGetFirstInGroup(nRevRawId)
While nId <> GDB_ID.NULL
EgtRotate(nId, ptCen, Vector3d.Z_AX(), dAngDeg, GDB_RT.GLOB)
nId = EgtGetNext(nId)
End While
' Imposto posizione esatta del grezzo dopo rotazione
Dim b3Raw As New BBox3d
EgtGetRawPartBBox(nRevRawId, b3Raw)
EgtMoveToCornerRawPart(nRevRawId, (b3Raw.Min() - ptOri) + Point3d.ORIG(), MCH_CR.BL)
End If
nRevRawId = EgtGetNextRawPart(nRevRawId)
End While
nRevPhase += 1
End While
' Ruoto opportunamente anche i dati di movimento
Dim nOpeId As Integer = EgtGetFirstActiveOperation()
While nOpeId <> GDB_ID.NULL
If EgtGetOperationType(nOpeId) = MCH_OY.DISP Then
' Recupero i gruppi con i dati
Dim nRpmId As Integer = EgtGetFirstNameInGroup(nOpeId, "Rpm*")
While nRpmId <> GDB_ID.NULL
' Recupero le informazioni
Dim vtRawMove As New Vector3d
If EgtGetInfo(nRpmId, "Mv", vtRawMove) Then
vtRawMove.Rotate(Vector3d.Z_AX(), dAngDeg)
EgtSetInfo(nRpmId, "Mv", vtRawMove)
End If
Dim vtDelta As New Vector3d
If EgtGetInfo(nRpmId, "Dt", vtDelta) Then
vtDelta.Rotate(Vector3d.Z_AX(), dAngDeg)
EgtSetInfo(nRpmId, "Dt", vtDelta)
End If
Dim dAngRotDeg As Double = 0
If EgtGetInfo(nRpmId, "Ad", dAngRotDeg) Then
EgtSetInfo(nRpmId, "Ad", dAngRotDeg + dAngDeg)
End If
' Cerco un altro gruppo
nRpmId = EgtGetNextName(nRpmId, "Rpm*")
End While
End If
nOpeId = EgtGetNextActiveOperation(nOpeId)
End While
' Se non è registrazione, ruoto anche l'eventuale foto della lastra
'If Not bIsReg Then
' Dim nPhotoId = m_CurrProjPage.GetPhoto()
' If nPhotoId <> GDB_ID.NULL then EgtRotatePhoto(nPhotoId, ptCen, Vector3d.Z_AX(), dAngDeg)
'End If
' Aggiorno rotazione totale
If bIsReg Then
CamAuto.SetRegistrationRotation(dRegRot + dAngDeg)
Else
CamAuto.SetRegistrationRotation(0)
End If
' Dichiaro grezzo per punti
EgtSetInfo(GetCurrentRaw(), KEY_RAWBYPOINTS, 1)
End If
' Ruoto i punti SpotReg disegnati in Office
If bMoveOk Then
RotateAllSpotRegistration(dAngDeg, ptCen)
End If
' Ripristino lo stato iniziale
EgtSetCurrPhase(1)
HideAllMachinings()
Return bMoveOk
End Function
' Ruoto solo gli elementi SpotReg creati nel programma OFFICE
Private Sub RotateAllSpotRegistration(dAngRot As Double, ptCen As Point3d)
Dim nId As Integer = EgtGetFirstInGroup(OmagOFFICEMap.refRawPartTabVM.m_nRegGroupId)
While nId <> GDB_ID.NULL
Dim sName As String = String.Empty
EgtGetName(nId, sName)
If Not sName.Contains("CUT") Then
EgtRotate(nId, ptCen, Vector3d.Z_AX, dAngRot)
End If
nId = EgtGetNext(nId)
End While
EgtDraw()
End Sub
Private Sub MoveAllRawParts(vtMove As Vector3d)
' Provo il movimento
Dim bMoveOk As Boolean = True
Dim nPhase As Integer = 1
Dim nRawId As Integer = GDB_ID.NULL
While nPhase <= EgtGetPhaseCount()
EgtSetCurrPhase(nPhase)
nRawId = EgtGetFirstRawPart()
While nRawId <> GDB_ID.NULL
If EgtVerifyRawPartPhase(nRawId, nPhase) Then
If Not EgtMoveRawPart(nRawId, vtMove) Then
bMoveOk = False
Exit While
End If
End If
nRawId = EgtGetNextRawPart(nRawId)
End While
If Not bMoveOk Then Exit While
nPhase += 1
End While
' Se movimento impossibile, ripristino posizione dei grezzi già spostati
If Not bMoveOk Then
Dim nRevPhase As Integer = 1
Dim nRevRawId As Integer = GDB_ID.NULL
While nRevPhase <= nPhase
EgtSetCurrPhase(nRevPhase)
nRevRawId = EgtGetFirstRawPart()
While nRevRawId <> GDB_ID.NULL And (nRevPhase < nPhase Or nRevRawId <> nRawId)
If EgtVerifyRawPartPhase(nRevRawId, nRevPhase) Then
EgtMoveRawPart(nRevRawId, -vtMove)
End If
nRevRawId = EgtGetNextRawPart(nRevRawId)
End While
nRevPhase += 1
End While
End If
' Muovo i punti SpotReg generati nel programma OFFICE
If bMoveOk Then
OmagOFFICEMap.refRawPartTabVM.MoveAllSpotRegistration(vtMove)
End If
' Ripristino lo stato iniziale
EgtSetCurrPhase(1)
HideAllMachinings()
End Sub
' verifica che la rotazione sia ammessa ' verifica che la rotazione sia ammessa
Private Function RotatePartInsideBond(dAngRotDeg As Double, nIdMove As Integer) As Boolean Private Function RotatePartInsideBond(dAngRotDeg As Double, nIdMove As Integer) As Boolean
' Verifico se ci sono dei pezzi bloccati in rotazione ' Verifico se ci sono dei pezzi bloccati in rotazione
@@ -2170,10 +2375,6 @@ Public Class NestingTabVM
#Region "EVENTS" #Region "EVENTS"
Friend Sub OnMouseDownScene(sender As Object, e As Windows.Forms.MouseEventArgs) Friend Sub OnMouseDownScene(sender As Object, e As Windows.Forms.MouseEventArgs)
Dim nCtx As Integer = EgtGetCurrentContext()
Dim x As Integer = EgtGetFirstInGroup(0)
Dim y As Integer = EgtGetLastInGroup(0)
Dim z As Integer = EgtGetFirstPart()
' se in modalità DragRectangle (deformazione delle componenti rettangolari) ' se in modalità DragRectangle (deformazione delle componenti rettangolari)
If m_bDragRectangle Then If m_bDragRectangle Then
OnMyMouseDownSceneSelSideRectangle(sender, e) OnMyMouseDownSceneSelSideRectangle(sender, e)
@@ -2206,6 +2407,8 @@ Public Class NestingTabVM
While nId <> GDB_ID.NULL While nId <> GDB_ID.NULL
' Recupero l'identificativo del pezzo cui appartiene ' Recupero l'identificativo del pezzo cui appartiene
Dim nPartId As Integer = EgtGetParent(EgtGetParent(nId)) Dim nPartId As Integer = EgtGetParent(EgtGetParent(nId))
Dim sNamePartId As String = String.Empty
EgtGetName(nPartId, sNamePartId)
Dim bPartInTable As Boolean = (EgtGetParent(nPartId) = GetRawId()) Dim bPartInTable As Boolean = (EgtGetParent(nPartId) = GetRawId())
If EgtIsPart(nPartId) Or bPartInTable Then If EgtIsPart(nPartId) Or bPartInTable Then
Dim nStat As Integer = GDB_ST.ON_ Dim nStat As Integer = GDB_ST.ON_
@@ -2243,6 +2446,102 @@ Public Class NestingTabVM
' Drag possibile ' Drag possibile
m_bDrag = True m_bDrag = True
Exit While 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
Dim ChgTbV As New ChangeTableV
Dim ChgTbVM As New ChangeTableVM(ChgTbV)
ChgTbV.DataContext = ChgTbVM
ChgTbV.ShowDialog()
' se non è stata eseguita nessuna scelta esco dal ciclo
If ChgTbVM.MyDialogResult = EnumDialogResult.CANCEL Or ChgTbVM.nSelectedTable = 0 Then Exit While
' recupero il nome della tavola corrente
Dim sOtherTab As String = GetTableName(ChgTbVM.nSelectedTable)
EgtChangeTable(sOtherTab, True)
EstCalc.AdjustAdditionalTable(True)
EgtSetMachineLook(MCH_LOOK.TAB)
' aggiorno le lavorazioni
UpdateAllMachiningsToolpaths()
' aggiorno i movimenti pezzi tra disposizioni
For nI As Integer = 1 To EgtGetPhaseCount()
EgtSetCurrPhase(nI)
Dim nDispId As Integer = EgtGetPhaseDisposition(nI)
SpecialApplyDisposition(nDispId, True)
Next
' aggiorno posizionamento ventose per lavorazioni da sotto
UpdateVacuumsForDrip()
' dichiaro tutto aggiornato
EstCalc.SetOrderMachiningFlag()
EgtSetCurrPhase(1)
' aggiorno posizione pezzi in parcheggio
Dim nPPId As Integer = EgtGetFirstPart()
While nPPId <> GDB_ID.NULL
PackPartInStore(nPPId)
nPPId = EgtGetNextPart(nPPId)
End While
' se prevista rotazione
If GetPrivateProfileInt(S_TABLE, K_CHANGETABWD, 0, CurrentMachine.sMachIniFile) = 2 Then
' Dati tavola
Dim b3Tab As New BBox3d
EgtGetTableArea(1, b3Tab)
' Box lastra
Dim b3OrigRaw As New BBox3d
GetRawBox(b3OrigRaw)
' Allargo i limiti della tavola in tutte le fasi
Const TAB_OFFS As Double = 3000
For nI As Integer = 1 To EgtGetPhaseCount()
EgtSetCurrPhase(nI)
EgtSetTableAreaOffset(TAB_OFFS, TAB_OFFS, TAB_OFFS, TAB_OFFS)
Next
' aggiorno posizionamento ventose per lavorazioni da sotto
UpdateVacuumsForDrip()
' dichiaro tutto aggiornato
EstCalc.SetOrderMachiningFlag()
EgtSetCurrPhase(1)
' Rotazione
Dim dAngRot As Double = If(sOtherTab = SECOND_TAB, 180, -180)
If Not RotateAllRawParts(dAngRot, False) Then
'm_CurrProjPage.SetWarningMessage(EgtMsg(90339)) 'Rotazione impossibile
End If
' Traslazione per riportare la lastra nella stessa posizione rispetto all'angolo BL che diveta TR e viceversa
Dim b3Raw As New BBox3d
GetRawBox(b3Raw)
Dim vtMove As Vector3d
If sOtherTab = SECOND_TAB Then
Dim vtDiffIni As Vector3d = b3OrigRaw.Min() - b3Tab.Min()
Dim vtDiffFin As Vector3d = b3Tab.Max() - b3Raw.Max()
vtMove = vtDiffFin - vtDiffIni
Else
Dim vtDiffIni As Vector3d = b3Tab.Max() - b3OrigRaw.Max()
Dim vtDiffFin As Vector3d = b3Raw.Min() - b3Tab.Min()
vtMove = -(vtDiffFin - vtDiffIni)
End If
vtMove.z = 0
MoveAllRawParts(vtMove)
' Ripristino i limiti della tavola in tutte le fasi
For nI As Integer = 1 To EgtGetPhaseCount()
EgtSetCurrPhase(nI)
EgtSetTableAreaOffset(0, 0, 0, 0)
Next
EgtSetCurrPhase(1)
HideAllMachinings()
End If
' visualizzazione
EgtZoom(ZM.ALL)
' Elimino il datacontext della finsetra per la selezione della tavola
ChgTbVM = Nothing
Exit While
End If
End If End If
nId = EgtGetNextObjInSelWin() nId = EgtGetNextObjInSelWin()
End While End While
+8 -4
View File
@@ -43,7 +43,7 @@ Public Class RawPartTabVM
Private m_nTempLay As Integer = GDB_ID.NULL Private m_nTempLay As Integer = GDB_ID.NULL
' Layer per crocette dei punti REG ' Layer per crocette dei punti REG
Private m_nRegGroupId As Integer = GDB_ID.NULL Friend m_nRegGroupId As Integer = GDB_ID.NULL
' Numero di spot inseriti nel grezzo corrente ' Numero di spot inseriti nel grezzo corrente
Private m_nCountSpot As Integer = 0 Private m_nCountSpot As Integer = 0
' Gruppo Spot attualmente selezionato ' Gruppo Spot attualmente selezionato
@@ -1978,10 +1978,14 @@ Public Class RawPartTabVM
Return True Return True
End Function End Function
Private Sub MoveAllSpotRegistration(vtMove As Vector3d) Friend Sub MoveAllSpotRegistration(vtMove As Vector3d, Optional bOnlyOfficeSpot As Boolean = True)
Dim nId As Integer = EgtGetFirstInGroup(m_nRegGroupId) Dim nId As Integer = EgtGetFirstInGroup(OmagOFFICEMap.refRawPartTabVM.m_nRegGroupId)
While nId <> GDB_ID.NULL While nId <> GDB_ID.NULL
EgtMove(nId, vtMove) Dim sName As String = String.Empty
EgtGetName(nId, sName)
If Not sName.Contains("CUT") Or Not bOnlyOfficeSpot Then
EgtMove(nId, vtMove)
End If
nId = EgtGetNext(nId) nId = EgtGetNext(nId)
End While End While
EgtDraw() EgtDraw()
Binary file not shown.
Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 329 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 301 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 79 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 51 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 61 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 125 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 138 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 106 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 73 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 89 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 58 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 170 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 74 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 74 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 86 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 57 KiB

+12 -18
View File
@@ -31,7 +31,7 @@ Public Class SideEntityControlVM
' Variabile che indica se sono in sideangle o drip ' Variabile che indica se sono in sideangle o drip
Friend m_Mode As ModeOpt Friend m_Mode As ModeOpt
Friend Shared m_SideAngleCheck As Boolean = True Friend Shared m_SideAngleCheck As Boolean = False
' Lista di tutte le entità (inclinabili) presenti nel progetto ' Lista di tutte le entità (inclinabili) presenti nel progetto
Private m_SideEntityList As ObservableCollection(Of SideEntity) Private m_SideEntityList As ObservableCollection(Of SideEntity)
@@ -70,7 +70,7 @@ Public Class SideEntityControlVM
sMsg = EgtMsg(91653) sMsg = EgtMsg(91653)
ElseIf m_Mode = SideEntityControlVM.ModeOpt.ALZANDFRONT Then ElseIf m_Mode = SideEntityControlVM.ModeOpt.ALZANDFRONT Then
' Alz ' Alz
sMsg = "Alz." sMsg = EgtMsg(91674)
End If End If
Return sMsg Return sMsg
End Get End Get
@@ -87,7 +87,7 @@ Public Class SideEntityControlVM
sMsg = EgtMsg(91654) sMsg = EgtMsg(91654)
ElseIf m_Mode = SideEntityControlVM.ModeOpt.ALZANDFRONT Then ElseIf m_Mode = SideEntityControlVM.ModeOpt.ALZANDFRONT Then
' Front ' Front
sMsg = "Front." sMsg = EgtMsg(91675)
End If End If
Return sMsg Return sMsg
End Get End Get
@@ -102,8 +102,7 @@ Public Class SideEntityControlVM
Get Get
If m_Mode = ModeOpt.SIDEANGLE Then If m_Mode = ModeOpt.SIDEANGLE Then
If m_SideAngleCheck Then If m_SideAngleCheck Then
'Return Visibility.Visible Return Visibility.Visible
Return Visibility.Collapsed
Else Else
Return Visibility.Collapsed Return Visibility.Collapsed
End If End If
@@ -569,10 +568,8 @@ Public Class SideEntityControlVM
'------------------ VISIBILITA' PARAMETRI '------------------ VISIBILITA' PARAMETRI
' Gestisco visualizzazione dei parametri (sotto l'elenco dei parametri) ' Gestisco visualizzazione dei parametri (sotto l'elenco dei parametri)
If m_Mode = ModeOpt.SIDEANGLE Then If m_Mode = ModeOpt.SIDEANGLE Then
Parameter23_Visibility = Visibility.Hidden Parameter23_Visibility = Windows.Visibility.Hidden
'' Prima dell'inserimento della nuova gestione Parameter2_Visibility = Visibility.Visible
'Parameter2_Visibility = Visibility.Visible
Parameter2_Visibility = Visibility.Hidden
Parameter2ab_Visibility = Visibility.Hidden Parameter2ab_Visibility = Visibility.Hidden
Parameter4_Visibility = Visibility.Hidden Parameter4_Visibility = Visibility.Hidden
Parameter5_Visibility = Visibility.Hidden Parameter5_Visibility = Visibility.Hidden
@@ -620,7 +617,7 @@ Public Class SideEntityControlVM
ElseIf m_Mode = ModeOpt.FILOTOP Then ElseIf m_Mode = ModeOpt.FILOTOP Then
Parameter1Msg = EgtMsg(MSG_IMPORTPAGEUC + 10) ' Offset Parameter1Msg = EgtMsg(MSG_IMPORTPAGEUC + 10) ' Offset
Parameter2Msg = EgtMsg(MSG_IMPORTPAGEUC + 11) ' Depth Parameter2Msg = EgtMsg(MSG_IMPORTPAGEUC + 11) ' Depth
Parameter5Msg = "Round Off" Parameter5Msg = EgtMsg(91676) ' Round Off
m_dOffsetFiloTop = GetMainPrivateProfileDouble(S_SIDES, K_FILOTOPOFFSET, 5) m_dOffsetFiloTop = GetMainPrivateProfileDouble(S_SIDES, K_FILOTOPOFFSET, 5)
m_dDepthFiloTop = GetMainPrivateProfileDouble(S_SIDES, K_FILOTOPDEPTH, 5) m_dDepthFiloTop = GetMainPrivateProfileDouble(S_SIDES, K_FILOTOPDEPTH, 5)
m_bCornerRadius = GetMainPrivateProfileInt(S_SIDES, K_FILOTOPROUNDOFF, 0) <> 0 m_bCornerRadius = GetMainPrivateProfileInt(S_SIDES, K_FILOTOPROUNDOFF, 0) <> 0
@@ -649,9 +646,9 @@ Public Class SideEntityControlVM
ElseIf m_Mode = ModeOpt.ALZANDFRONT Then ElseIf m_Mode = ModeOpt.ALZANDFRONT Then
' definisco i nomi dei campi ' definisco i nomi dei campi
Parameter1Msg = "Spessore" Parameter1Msg = EgtMsg(91677) ' Spessore
Parameter2Msg = "Altezza" Parameter2Msg = EgtMsg(91678) ' Altezza
Parameter3Msg = "Delta Ang." Parameter3Msg = EgtMsg(91679) ' Delta Ang.
' carico i valori letti da file ini ' carico i valori letti da file ini
m_HeightA = GetMainPrivateProfileDouble("Alz&Front", "A_Height", 0) m_HeightA = GetMainPrivateProfileDouble("Alz&Front", "A_Height", 0)
m_HeightF = GetMainPrivateProfileDouble("Alz&Front", "F_Height", 0) m_HeightF = GetMainPrivateProfileDouble("Alz&Front", "F_Height", 0)
@@ -1847,7 +1844,7 @@ Public Class SideEntityControlVM
Dim sMsg As String = String.Empty Dim sMsg As String = String.Empty
' eseguo la funzione per il disegno della componente (CMP_Draw) ' eseguo la funzione per il disegno della componente (CMP_Draw)
If Not EgtLuaExecLine("CMP_Draw" & "(true)") Then If Not EgtLuaExecLine("CMP_Draw" & "(true)") Then
sMsg = "Error in component execution" sMsg = EgtMsg(91680) ' Error in component execution
'm_bDrawOk = False 'm_bDrawOk = False
Else Else
EgtLuaGetGlobStringVar("CMP" & ".MSG", sMsg) EgtLuaGetGlobStringVar("CMP" & ".MSG", sMsg)
@@ -2119,10 +2116,7 @@ Public MustInherit Class SideEntity
Get Get
If m_Mode = SideEntityControlVM.ModeOpt.SIDEANGLE Then If m_Mode = SideEntityControlVM.ModeOpt.SIDEANGLE Then
If SideEntityControlVM.m_SideAngleCheck Then If SideEntityControlVM.m_SideAngleCheck Then
'' Per ogni lato della compo visulizzo solo la CheckBox Return Visibility.Collapsed
'Return Visibility.Collapsed
' Per ogni lato della compo visulizzo campi Ang a Hill
Return Visibility.Visible
Else Else
Return Visibility.Visible Return Visibility.Visible
End If End If
+2 -2
View File
@@ -456,7 +456,6 @@ Public Class TopCommandBarVM
If String.IsNullOrEmpty(sFilePath) Then EgtGetCurrFilePath(sFilePath) If String.IsNullOrEmpty(sFilePath) Then EgtGetCurrFilePath(sFilePath)
Dim nPartInRawsProj As Integer = 0 Dim nPartInRawsProj As Integer = 0
Dim nGrpId = EgtGetFirstMachGroup() Dim nGrpId = EgtGetFirstMachGroup()
While nGrpId <> GDB_ID.NULL While nGrpId <> GDB_ID.NULL
' Imposto la macchinata corrente ' Imposto la macchinata corrente
EgtSetCurrMachGroup(nGrpId) EgtSetCurrMachGroup(nGrpId)
@@ -468,7 +467,6 @@ Public Class TopCommandBarVM
End While End While
nGrpId = EgtGetNextMachGroup(nGrpId) nGrpId = EgtGetNextMachGroup(nGrpId)
End While End While
nGrpId = EgtGetFirstMachGroup() nGrpId = EgtGetFirstMachGroup()
While nGrpId <> GDB_ID.NULL While nGrpId <> GDB_ID.NULL
' percorso progetto ' percorso progetto
@@ -484,6 +482,8 @@ Public Class TopCommandBarVM
EgtOutLog(" NbrProjParts:" & nPartInRawsProj.ToString) EgtOutLog(" NbrProjParts:" & nPartInRawsProj.ToString)
' Reimposto la macchina corrente ' Reimposto la macchina corrente
EgtSetCurrMachGroup(CurrGrpId) EgtSetCurrMachGroup(CurrGrpId)
' Nascondo tutte le lavorazioni
CamAuto.HideAllMachinings()
End Sub End Sub
End Class End Class
File diff suppressed because it is too large Load Diff
-12
View File
@@ -35,7 +35,6 @@ Module OmagOFFICEMap
Private m_refSimulTabVM As SimulTabVM Private m_refSimulTabVM As SimulTabVM
Private m_refSceneHostVM As SceneHostVM Private m_refSceneHostVM As SceneHostVM
Private m_refVeinMatchingWindow As VeinMatchingWindow
#Region "Get" #Region "Get"
@@ -169,12 +168,6 @@ Module OmagOFFICEMap
End Get End Get
End Property End Property
Public ReadOnly Property refVeinMatchingWindow As VeinMatchingWindow
Get
Return m_refVeinMatchingWindow
End Get
End Property
#End Region ' Get #End Region ' Get
#Region "Set" #Region "Set"
@@ -291,11 +284,6 @@ Module OmagOFFICEMap
Return m_HeightProjectV Return m_HeightProjectV
End Function End Function
Friend Function SetRefVeinMatchingWindow(_VeinMatchingWindow As VeinMatchingWindow) As Boolean
m_refVeinMatchingWindow = _VeinMatchingWindow
Return Not IsNothing(m_refVeinMatchingWindow)
End Function
#End Region ' Set #End Region ' Set
#Region "Init" #Region "Init"
-1
View File
@@ -32,7 +32,6 @@ Public Class VeinMatchPanelVM
VeinMatchingWnd.Show() VeinMatchingWnd.Show()
Else Else
VeinMatchingWnd.Hide() VeinMatchingWnd.Hide()
'VeinMatchingWnd.ClosePopUps()
End If End If
EgtSetCurrentContext(OmagOFFICEMap.refSceneHostVM.MainScene.GetCtx()) EgtSetCurrentContext(OmagOFFICEMap.refSceneHostVM.MainScene.GetCtx())
End Set End Set