Compare commits
352 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 24ab2e0ba8 | |||
| 8aec6c87b0 | |||
| 24fa5e089a | |||
| 1ce036a0f6 | |||
| dd5dd7c93c | |||
| 393559d41a | |||
| 45f6639dcd | |||
| de989f5762 | |||
| c33d6c1e77 | |||
| a1b2158404 | |||
| 05e94943e0 | |||
| 6bba5143f9 | |||
| 3957f66ec1 | |||
| 46f7e78efc | |||
| 02a8e3a274 | |||
| 00bbe3ad70 | |||
| f81970accc | |||
| 165ed71234 | |||
| 01b04e6a9d | |||
| 8a8ff33110 | |||
| 4ca3b4ee47 | |||
| 6b6031379b | |||
| 7e96fb2385 | |||
| 7ee4a2e552 | |||
| 105a12c497 | |||
| e0f380ed1d | |||
| a568c614fb | |||
| 6dc5fe5a12 | |||
| a1db5945df | |||
| fba8b377f9 | |||
| 401b171c4e | |||
| 3285d72817 | |||
| 17229ab9bc | |||
| c3abca3cee | |||
| 2e0f2eab1b | |||
| 9c60ef020f | |||
| 58c62ebd5c | |||
| ab525c7431 | |||
| 613b9fa725 | |||
| e4e20b9f91 | |||
| ca6a468cda | |||
| 24ddd7d245 | |||
| f9fd0f0168 | |||
| eac7b0999a | |||
| a464e0dc3b | |||
| 401af44bb5 | |||
| 1599515d58 | |||
| 0be1695246 | |||
| a79725783f | |||
| f13a51e8a1 | |||
| b77ed406ae | |||
| bb650afe9c | |||
| 1d87ac5c47 | |||
| fc3053df66 | |||
| 588ef08b17 | |||
| ebdaeece85 | |||
| 1605f81090 | |||
| a10703fe94 | |||
| a0575cbbac | |||
| 8180ffaeaa | |||
| 848783078c | |||
| 45f0245f9f | |||
| a81a7f8d9e | |||
| ca0210cf09 | |||
| 622912dec3 | |||
| 8ed35a5c46 | |||
| a2bbcfed95 | |||
| 0667da3692 | |||
| 5ff39c9d1c | |||
| 60a666c1c1 | |||
| df47692e8e | |||
| 5f2d03cbcb | |||
| 5255fad7fc | |||
| 41903872b1 | |||
| beb3ce841b | |||
| 4a2da4ac41 | |||
| 869b459c3b | |||
| aa84b2c8ab | |||
| 555d2d029f | |||
| 749fb2d949 | |||
| 5b3e73290c | |||
| 854519b706 | |||
| d8179b47ee | |||
| f68e141449 | |||
| 011c94cc6b | |||
| 64da46c0a4 | |||
| aab81c6af7 | |||
| 46be644285 | |||
| 5fe75b78e5 | |||
| eafe6184eb | |||
| 1bf42ebbc1 | |||
| 0e35e41c4a | |||
| 64e3fd83de | |||
| e5e74a6afd | |||
| 28deac8501 | |||
| 367a8c9fc3 | |||
| 0717546ad0 | |||
| 3bf1a87688 | |||
| 6d82b6efee | |||
| 94102172dd | |||
| 82426db72a | |||
| 20fd722dee | |||
| c83b3e6bea | |||
| a45613ff39 | |||
| 84690ddf32 | |||
| 844cb3cfe6 | |||
| ee84a57194 | |||
| efa1cb1272 | |||
| 1437d20353 | |||
| 3d4a921719 | |||
| e26d68b0f3 | |||
| 7815b7ec89 | |||
| 66051943c7 | |||
| 2e9071569a | |||
| 813d224f50 | |||
| 5f03a36df2 | |||
| ac9c347bc0 | |||
| 9784c75766 | |||
| 8af69e553d | |||
| 3128f89f63 | |||
| 56884c34f2 | |||
| 332b17e55e | |||
| 4aaf1d084e | |||
| 4bcbe8d290 | |||
| 8484087c69 | |||
| 116289cac5 | |||
| 30ee1bcf99 | |||
| a1d7983704 | |||
| 636d3a9eca | |||
| bd70bf1ec9 | |||
| d66b331478 | |||
| aecb8ed442 | |||
| 3e72b216a6 | |||
| 5baa701681 | |||
| e3a1330889 | |||
| aa237fd744 | |||
| ccfc8f89e4 | |||
| a2e28fa134 | |||
| d8c16a34f0 | |||
| 1847154a29 | |||
| 2362c8df61 | |||
| 54127e61ec | |||
| aaa39c3779 | |||
| 78fc3118ab | |||
| 4ff2ac1063 | |||
| edab1024c3 | |||
| 5092385ea4 | |||
| 6cde63cd2e | |||
| 4f12bce90a | |||
| 0107fc022b | |||
| a69418c6f5 | |||
| c79e1b0327 | |||
| 915d3c0408 | |||
| f53b6e0bd5 | |||
| fc7b4d276c | |||
| 95460ecbb2 | |||
| dc31665029 | |||
| e98e9ed416 | |||
| de203b55fa | |||
| 0a8dbb3557 | |||
| 1f66a8f4ef | |||
| 93b432284d | |||
| 677c3af3b7 | |||
| eb22771d06 | |||
| 2710d72a73 | |||
| ccfb1a5179 | |||
| 26e00416c5 | |||
| 73ebd3ecdb | |||
| 02acc77521 | |||
| 7f7c63bc07 | |||
| 22560f434e | |||
| d0c8e3e88b | |||
| 1f184a6f7f | |||
| ea06fe1a9f | |||
| 5025c6a134 | |||
| f66e5d6da9 | |||
| ed6c36bff4 | |||
| 50889df91e | |||
| 75e3c023ad | |||
| d57075b065 | |||
| c3c24cd8e6 | |||
| 63e708d601 | |||
| 0849514253 | |||
| 703b7c0bad | |||
| a9235820c5 | |||
| ba59163234 | |||
| e1897e68b0 | |||
| 86821914b1 | |||
| 46abf5ca91 | |||
| 01a9ebf53b | |||
| e01fbbc35a | |||
| c9356a3889 | |||
| 4ce940bb0a | |||
| fd8ac8f528 | |||
| f07cfdc9dc | |||
| 4f060f3d3d | |||
| 7169fa1fd6 | |||
| 6b89e4067c | |||
| 4ac0507050 | |||
| a6a4f29bba | |||
| 0c9b37742a | |||
| ef5c98020e | |||
| c2a1fa3fdc | |||
| 319275f43c | |||
| 61d238e196 | |||
| 0900728bbf | |||
| c4ac9e6770 | |||
| ee83a453e7 | |||
| 9109a8cfb7 | |||
| f1ab1f1e77 | |||
| 7596849254 | |||
| e12eb2599e | |||
| a0754265ac | |||
| 1645a39506 | |||
| 9e2c2c1b98 | |||
| 51f15818c2 | |||
| b0081241d8 | |||
| 173230df5a | |||
| 22afb6edcd | |||
| 9c8faf25bf | |||
| 58775595c7 | |||
| 367ac62fc8 | |||
| 9750fdfe75 | |||
| 39bc4f55ea | |||
| 803a7bdbfc | |||
| 1473298705 | |||
| 4be7087a1b | |||
| 7c990987e8 | |||
| 3837895350 | |||
| e5195c5c5c | |||
| 17ed0b3807 | |||
| e11722f598 | |||
| 9644529618 | |||
| 0eb6897c08 | |||
| 8462554421 | |||
| 446df8f37f | |||
| 2919cc2dde | |||
| 093f882118 | |||
| f908f073af | |||
| dc0a2f1934 | |||
| 6366aa7938 | |||
| 696ceabb17 | |||
| c55d9b48d3 | |||
| 8c35871e34 | |||
| 4390dbdce8 | |||
| 8d4785334a | |||
| 7cf5a88b23 | |||
| e587cd9d45 | |||
| 973157a0de | |||
| 7ccb7fb96f | |||
| 9a751d0524 | |||
| 0e25b456bf | |||
| 4c8394f22d | |||
| ed3e14229f | |||
| 81f6fa88da | |||
| adbc811206 | |||
| 94866ce13d | |||
| c336390baf | |||
| 0686d543bb | |||
| 58c00878a8 | |||
| 992686a5a2 | |||
| 4cd9b70cf2 | |||
| 140d2bc226 | |||
| 5b2b39789d | |||
| 3c796aeefa | |||
| 2bcab0bbf1 | |||
| df41408ec9 | |||
| 9a2084c216 | |||
| 52844c8d75 | |||
| ad74579ee6 | |||
| f3f9db7bb7 | |||
| 2900aa98f8 | |||
| 153374cd5d | |||
| 1076abd8de | |||
| 0e260a570e | |||
| 59176a1269 | |||
| 2e2de2ade4 | |||
| b6f19b04cb | |||
| 7289e84d7b | |||
| c5757cb3c7 | |||
| 311f6fca99 | |||
| 0efe5b51e4 | |||
| 38bf52893b | |||
| d4b49699c8 | |||
| 09e8c0f6b4 | |||
| 03fdc33be0 | |||
| 50c3eac8fe | |||
| 004258a469 | |||
| ce83d8ee49 | |||
| 9db1f5085c | |||
| 49435ba828 | |||
| 6e963ad6a2 | |||
| 4d12d4a129 | |||
| c46b7d1aa0 | |||
| 08d71ecec2 | |||
| 9f4448220e | |||
| 6117963ac1 | |||
| 941fa96d03 | |||
| 9f995079e2 | |||
| 604f0f744c | |||
| 185cfffe71 | |||
| 289c58f867 | |||
| 8ee25d6883 | |||
| cd946a7353 | |||
| bdefedae39 | |||
| 2a07343685 | |||
| b5ed38e20f | |||
| 6507ef0a97 | |||
| ab33dbcc46 | |||
| 17f1bc1b20 | |||
| 97c99d3114 | |||
| cecbacd614 | |||
| 7c8dccfa57 | |||
| fb0436d090 | |||
| aa83984a15 | |||
| 27feb8a7cc | |||
| 0edda465f1 | |||
| 8bc2076027 | |||
| 174738f252 | |||
| 9112fb5691 | |||
| db608e6c0e | |||
| 5ce753e4b7 | |||
| d7445f828a | |||
| ca4eb016a5 | |||
| ea48c05112 | |||
| 3f6e8fbbeb | |||
| e52a56a683 | |||
| 3d44bbaa5c | |||
| 5d75e658fb | |||
| fc68efd4f4 | |||
| 191a973ee3 | |||
| e3f628a07d | |||
| 8b57174267 | |||
| 2035c83062 | |||
| 3aa9129acc | |||
| 8ccfda96f8 | |||
| 8a67feab0f | |||
| f76d91fc20 | |||
| 372b084d53 | |||
| 00f30c943c | |||
| 4418d53557 | |||
| 0fe95e4ccc | |||
| c2d150b402 | |||
| efba122f14 | |||
| ed19ade967 | |||
| 80857bb4e1 | |||
| 584a635ff4 | |||
| f1ddce36d8 | |||
| 8aae4ff8d0 | |||
| 01e0fa3a9c | |||
| 27bfef3fc1 | |||
| 6db4dd995f |
+84
-1
@@ -93,7 +93,7 @@ Friend Module CamAuto
|
||||
If nPrjType = CurrentProjectPageUC.PRJ_TYPE.FLATS Then
|
||||
' Reinserisco tutte le lavorazioni piane
|
||||
AddMachinings(GDB_ID.NULL, nWarn)
|
||||
' Se altrimenti progetto con cornici
|
||||
' Se altrimenti progetto con cornici
|
||||
ElseIf nPrjType = CurrentProjectPageUC.PRJ_TYPE.FRAMES Then
|
||||
' Reinserisco tutte le lavorazioni delle cornici
|
||||
AddFrameMachinings(m_MainWindow.m_FrameCutPageUC.m_FrameMachiningUC.m_dStartTrim, m_MainWindow.m_FrameCutPageUC.m_FrameMachiningUC.m_dEndTrim)
|
||||
@@ -101,6 +101,82 @@ Friend Module CamAuto
|
||||
Return True
|
||||
End Function
|
||||
|
||||
Friend Function ResetAllSplitCurv() As Boolean
|
||||
Dim bOk As Boolean = True
|
||||
Dim nIdPart As Integer = EgtGetFirstPart()
|
||||
While nIdPart <> GDB_ID.NULL
|
||||
' elimino il layer dei flag di separazione "AUX_SPLIT_WJ"
|
||||
Dim IdAuxLayer As Integer = EgtGetFirstNameInGroup(nIdPart, INFO_AUX_SPLIT_WJ)
|
||||
EgtErase(IdAuxLayer)
|
||||
' accedo al Layer OutLoop
|
||||
Dim nIdLayerOutLoop As Integer = EgtGetFirstNameInGroup(nIdPart, NAME_OUTLOOP)
|
||||
Dim nIdMy As Integer = EgtGetFirstInGroup(nIdLayerOutLoop)
|
||||
While nIdMy <> GDB_ID.NULL
|
||||
EgtRemoveInfo(nIdMy, INFO_JOINENTITY)
|
||||
nIdMy = EgtGetNext(nIdMy)
|
||||
End While
|
||||
nIdPart = EgtGetNextPart(nIdPart)
|
||||
End While
|
||||
Dim nRawId As Integer = CamAuto.GetCurrentRaw()
|
||||
nIdPart = EgtGetFirstPartInRawPart(nRawId)
|
||||
While nIdPart <> GDB_ID.NULL
|
||||
' elimino il layer dei flag di separazione "AUX_SPLIT_WJ"
|
||||
Dim IdAuxLayer As Integer = EgtGetFirstNameInGroup(nIdPart, INFO_AUX_SPLIT_WJ)
|
||||
EgtErase(IdAuxLayer)
|
||||
' accedo al Layer OutLoop
|
||||
Dim nIdLayerOutLoop As Integer = EgtGetFirstNameInGroup(nIdPart, NAME_OUTLOOP)
|
||||
Dim nIdMy As Integer = EgtGetFirstInGroup(nIdLayerOutLoop)
|
||||
While nIdMy <> GDB_ID.NULL
|
||||
EgtRemoveInfo(nIdMy, INFO_JOINENTITY)
|
||||
nIdMy = EgtGetNext(nIdMy)
|
||||
End While
|
||||
nIdPart = EgtGetNextPartInRawPart(nIdPart)
|
||||
End While
|
||||
Return bOk
|
||||
End Function
|
||||
|
||||
Friend Function ResetAllStartCurv() As Boolean
|
||||
Dim bOk As Boolean = True
|
||||
Dim nIdPart As Integer = EgtGetFirstPart()
|
||||
While nIdPart <> GDB_ID.NULL
|
||||
' accedo al Layer OutLoop
|
||||
Dim nIdLayerOutLoop As Integer = EgtGetFirstNameInGroup(nIdPart, NAME_OUTLOOP)
|
||||
EgtRemoveInfo(nIdLayerOutLoop, INFO_START)
|
||||
nIdPart = EgtGetNextPart(nIdPart)
|
||||
End While
|
||||
Dim nRawId As Integer = CamAuto.GetCurrentRaw()
|
||||
nIdPart = EgtGetFirstPartInRawPart(nRawId)
|
||||
While nIdPart <> GDB_ID.NULL
|
||||
' accedo al Layer OutLoop
|
||||
Dim nIdLayerOutLoop As Integer = EgtGetFirstNameInGroup(nIdPart, NAME_OUTLOOP)
|
||||
EgtRemoveInfo(nIdLayerOutLoop, INFO_START)
|
||||
nIdPart = EgtGetNextPartInRawPart(nIdPart)
|
||||
End While
|
||||
Return bOk
|
||||
End Function
|
||||
|
||||
Friend Function ResetAllBRidges() As Boolean
|
||||
Dim bOk As Boolean = True
|
||||
Dim nMachGroup As Integer = EgtGetCurrMachGroup()
|
||||
Dim nBridgesGroup As Integer = EgtGetFirstNameInGroup(nMachGroup, "Bridges")
|
||||
bOk = EgtErase(nBridgesGroup)
|
||||
Return bOk
|
||||
End Function
|
||||
|
||||
' verifico che il contorno passato non sia stato separato
|
||||
Friend Function VerifyOutLoopIsClosed(nIdLayerOutLoop As Integer)
|
||||
Dim nIdMy As Integer = EgtGetFirstInGroup(nIdLayerOutLoop)
|
||||
While nIdMy <> GDB_ID.NULL
|
||||
Dim nValInfo As Integer = 1
|
||||
If EgtGetInfo(nIdMy, INFO_JOINENTITY, nValInfo) Then
|
||||
If nValInfo = 0 Then Return False
|
||||
End If
|
||||
EgtRemoveInfo(nIdMy, INFO_JOINENTITY)
|
||||
nIdMy = EgtGetNext(nIdMy)
|
||||
End While
|
||||
Return True
|
||||
End Function
|
||||
|
||||
Friend Function RemoveFinalEmptyPhases() As Boolean
|
||||
Dim nOpeId As Integer = EgtGetLastOperation()
|
||||
While nOpeId <> GDB_ID.NULL
|
||||
@@ -674,6 +750,9 @@ Friend Module CamAuto
|
||||
End If
|
||||
' Lo sposto dalla lavorazione al pezzo
|
||||
Dim nId As Integer = EgtGetFirstInGroup(nMchPvId)
|
||||
|
||||
If nId = GDB_ID.NULL Then Return False
|
||||
|
||||
While nId <> GDB_ID.NULL
|
||||
EgtRelocateGlob(nId, nPartPvId)
|
||||
nId = EgtGetFirstInGroup(nMchPvId)
|
||||
@@ -719,10 +798,12 @@ Friend Module CamAuto
|
||||
End Function
|
||||
|
||||
Private Function SetLuaStandardCamParams(Optional bDripOk As Boolean = True) As Boolean
|
||||
Dim sMaterial As String = m_MainWindow.m_CurrentMachine.CurrMat.sName
|
||||
Dim sSawMch As String = m_MainWindow.m_CurrentMachine.sCurrSawing
|
||||
Dim sMillMch As String = m_MainWindow.m_CurrentMachine.sCurrMilling
|
||||
Dim sDrillMch As String = m_MainWindow.m_CurrentMachine.sCurrDrilling
|
||||
Dim sWaterJetMch As String = m_MainWindow.m_CurrentMachine.sCurrWaterJetting
|
||||
Dim sWaterJetQual As String = m_MainWindow.m_CurrentMachine.sCurrWaterJettingQuality
|
||||
Dim sPocketMch As String = m_MainWindow.m_CurrentMachine.sCurrPocketing
|
||||
Dim sDripSawMch As String = If(bDripOk, m_MainWindow.m_CurrentMachine.sCurrDripSawing, "")
|
||||
Dim sDripDrillMch As String = If(bDripOk, m_MainWindow.m_CurrentMachine.sCurrDripDrilling, "")
|
||||
@@ -735,11 +816,13 @@ Friend Module CamAuto
|
||||
Dim bMillingOnCorners As Boolean = (GetPrivateProfileInt(S_MACH_NEST, K_MACH_MILLING_ON_CORNERS, 1, m_MainWindow.GetMachIniFile()) <> 0)
|
||||
Dim bMillingOnSinks As Boolean = (GetPrivateProfileInt(S_MACH_NEST, K_MACH_MILLING_ON_SINKS, 0, m_MainWindow.GetMachIniFile()) <> 0)
|
||||
Dim dMillingShort As Double = GetPrivateProfileDouble(S_MACH_NEST, K_MACH_MILLING_SHORTENING, 0, m_MainWindow.GetMachIniFile())
|
||||
EgtLuaSetGlobStringVar("CAM.MATERIAL", sMaterial)
|
||||
EgtLuaSetGlobStringVar("CAM.SAWMCH", sSawMch)
|
||||
EgtLuaSetGlobStringVar("CAM.MILLMCH", sMillMch)
|
||||
EgtLuaSetGlobStringVar("CAM.DRILLMCH", sDrillMch)
|
||||
EgtLuaSetGlobStringVar("CAM.POCKETMCH", sPocketMch)
|
||||
EgtLuaSetGlobStringVar("CAM.WATERJETMCH", sWaterJetMch)
|
||||
EgtLuaSetGlobStringVar("CAM.WATERJETQLTY", sWaterJetQual)
|
||||
EgtLuaSetGlobStringVar("CAM.DRIPSAWMCH", sDripSawMch)
|
||||
EgtLuaSetGlobStringVar("CAM.DRIPDRILLMCH", sDripDrillMch)
|
||||
EgtLuaSetGlobNumVar("CAM.REDUCEDDEPTH", dReducedDepth)
|
||||
|
||||
+82
-3
@@ -1,5 +1,5 @@
|
||||
Imports EgtUILib
|
||||
|
||||
Imports System.IO
|
||||
|
||||
Friend Module CSVFile
|
||||
|
||||
@@ -7,6 +7,7 @@ Friend Module CSVFile
|
||||
|
||||
'-----------------------------------------------------------------------------------------------
|
||||
Friend Class CsvPart
|
||||
Public m_sPath As String = String.Empty
|
||||
Public m_sName As String = String.Empty
|
||||
Public m_sOrd As String = String.Empty
|
||||
Public m_sDist As String = String.Empty
|
||||
@@ -19,8 +20,20 @@ Friend Module CSVFile
|
||||
Public m_dDimX As Double = 0
|
||||
Public m_dDimY As Double = 0
|
||||
Public m_dTh As Double = 0
|
||||
Public m_dAng1 As Double = 0
|
||||
Public m_dHeel1 As Double = 0
|
||||
Public m_dAng2 As Double = 0
|
||||
Public m_dHeel2 As Double = 0
|
||||
Public m_dAng3 As Double = 0
|
||||
Public m_dHeel3 As Double = 0
|
||||
Public m_dAng4 As Double = 0
|
||||
Public m_dHeel4 As Double = 0
|
||||
Public m_nOriInd As Integer = 0
|
||||
Public m_nId As Integer = GDB_ID.NULL
|
||||
' definsco il riferimento al gruppo
|
||||
Public m_sRefGuid As String = System.Guid.NewGuid.ToString
|
||||
' definisco il colore del gruppo che sto inserendo
|
||||
Public m_cColor As Color3d = CompoColor(m_MainWindow.GetIniFile())
|
||||
End Class
|
||||
|
||||
'-----------------------------------------------------------------------------------------------
|
||||
@@ -51,6 +64,7 @@ Friend Module CSVFile
|
||||
For i As Integer = 1 To nNbr
|
||||
Dim OnePart As New CsvPart
|
||||
Dim sN As String = i.ToString()
|
||||
OnePart.m_sPath = sFile
|
||||
EgtLuaGetGlobStringVar("CSV.NAME" & sN, OnePart.m_sName)
|
||||
OnePart.m_bActive = True
|
||||
EgtLuaGetGlobStringVar("CSV.ORD" & sN, OnePart.m_sOrd)
|
||||
@@ -62,7 +76,18 @@ Friend Module CSVFile
|
||||
EgtLuaGetGlobNumVar("CSV.DIMX" & sN, OnePart.m_dDimX)
|
||||
EgtLuaGetGlobNumVar("CSV.DIMY" & sN, OnePart.m_dDimY)
|
||||
EgtLuaGetGlobNumVar("CSV.TH" & sN, OnePart.m_dTh)
|
||||
EgtLuaGetGlobNumVar("CSV.A1_" & sN, OnePart.m_dAng1)
|
||||
EgtLuaGetGlobNumVar("CSV.H1_" & sN, OnePart.m_dHeel1)
|
||||
EgtLuaGetGlobNumVar("CSV.A2_" & sN, OnePart.m_dAng2)
|
||||
EgtLuaGetGlobNumVar("CSV.H2_" & sN, OnePart.m_dHeel2)
|
||||
EgtLuaGetGlobNumVar("CSV.A3_" & sN, OnePart.m_dAng3)
|
||||
EgtLuaGetGlobNumVar("CSV.H3_" & sN, OnePart.m_dHeel3)
|
||||
EgtLuaGetGlobNumVar("CSV.A4_" & sN, OnePart.m_dAng4)
|
||||
EgtLuaGetGlobNumVar("CSV.H4_" & sN, OnePart.m_dHeel4)
|
||||
OnePart.m_nOriInd = i
|
||||
If OnePart.m_nCount > 1 Then
|
||||
OnePart.m_sRefGuid = System.Guid.NewGuid.ToString
|
||||
End If
|
||||
' inserisco in lista
|
||||
CsvPartList.Add(OnePart)
|
||||
Next
|
||||
@@ -123,7 +148,9 @@ Friend Module CSVFile
|
||||
Else
|
||||
Dim sItems() As String = sLine.Split("=".ToCharArray)
|
||||
If sItems.Count() >= 2 Then
|
||||
If sItems(0) = "Nam" Then
|
||||
If sItems(0) = "Path" Then
|
||||
OnePart.m_sPath = sItems(1)
|
||||
ElseIf sItems(0) = "Nam" Then
|
||||
OnePart.m_sName = sItems(1)
|
||||
ElseIf sItems(0) = "Ord" Then
|
||||
OnePart.m_sOrd = sItems(1)
|
||||
@@ -147,8 +174,26 @@ Friend Module CSVFile
|
||||
StringToDouble(sItems(1), OnePart.m_dDimY)
|
||||
ElseIf sItems(0) = "Th" Then
|
||||
StringToDouble(sItems(1), OnePart.m_dTh)
|
||||
ElseIf sItems(0) = "A1" Then
|
||||
StringToDouble(sItems(1), OnePart.m_dAng1)
|
||||
ElseIf sItems(0) = "H1" Then
|
||||
StringToDouble(sItems(1), OnePart.m_dHeel1)
|
||||
ElseIf sItems(0) = "A2" Then
|
||||
StringToDouble(sItems(1), OnePart.m_dAng2)
|
||||
ElseIf sItems(0) = "H2" Then
|
||||
StringToDouble(sItems(1), OnePart.m_dHeel2)
|
||||
ElseIf sItems(0) = "A3" Then
|
||||
StringToDouble(sItems(1), OnePart.m_dAng3)
|
||||
ElseIf sItems(0) = "H3" Then
|
||||
StringToDouble(sItems(1), OnePart.m_dHeel3)
|
||||
ElseIf sItems(0) = "A4" Then
|
||||
StringToDouble(sItems(1), OnePart.m_dAng4)
|
||||
ElseIf sItems(0) = "H4" Then
|
||||
StringToDouble(sItems(1), OnePart.m_dHeel4)
|
||||
ElseIf sItems(0) = "OIn" Then
|
||||
StringToInt(sItems(1), OnePart.m_nOriInd)
|
||||
ElseIf sItems(0) = "Guid" Then
|
||||
OnePart.m_sRefGuid = sItems(1).Trim
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
@@ -176,6 +221,7 @@ Friend Module CSVFile
|
||||
For i As Integer = 1 To CsvPartList.Count()
|
||||
Dim CurrPart As CsvPart = CsvPartList(i - 1)
|
||||
Writer.WriteLine("[P" & i.ToString() & "]")
|
||||
Writer.WriteLine("Path=" & CurrPart.m_sPath)
|
||||
Writer.WriteLine("Nam=" & CurrPart.m_sName)
|
||||
Writer.WriteLine("Ord=" & CurrPart.m_sOrd)
|
||||
Writer.WriteLine("Dist=" & CurrPart.m_sDist)
|
||||
@@ -188,20 +234,53 @@ Friend Module CSVFile
|
||||
Writer.WriteLine("DX=" & DoubleToString(CurrPart.m_dDimX, 4))
|
||||
Writer.WriteLine("DY=" & DoubleToString(CurrPart.m_dDimY, 4))
|
||||
Writer.WriteLine("Th=" & DoubleToString(CurrPart.m_dTh, 4))
|
||||
Writer.WriteLine("A1=" & DoubleToString(CurrPart.m_dAng1, 4))
|
||||
Writer.WriteLine("H1=" & DoubleToString(CurrPart.m_dHeel1, 4))
|
||||
Writer.WriteLine("A2=" & DoubleToString(CurrPart.m_dAng2, 4))
|
||||
Writer.WriteLine("H2=" & DoubleToString(CurrPart.m_dHeel2, 4))
|
||||
Writer.WriteLine("A3=" & DoubleToString(CurrPart.m_dAng3, 4))
|
||||
Writer.WriteLine("H3=" & DoubleToString(CurrPart.m_dHeel3, 4))
|
||||
Writer.WriteLine("A4=" & DoubleToString(CurrPart.m_dAng4, 4))
|
||||
Writer.WriteLine("H4=" & DoubleToString(CurrPart.m_dHeel4, 4))
|
||||
Writer.WriteLine("OIn=" & CurrPart.m_nOriInd.ToString())
|
||||
Writer.WriteLine("Guid=" & CurrPart.m_sRefGuid)
|
||||
Next
|
||||
' Terminatore
|
||||
Writer.WriteLine("[END]")
|
||||
' Chiudo file
|
||||
Writer.Close()
|
||||
Return True
|
||||
' Errore
|
||||
' Errore
|
||||
Catch ex As Exception
|
||||
EgtOutLog("CSV List error writing " & sFile)
|
||||
Return False
|
||||
End Try
|
||||
End Function
|
||||
|
||||
' dato l'elenco completo dei file salvo ogni singolo epl
|
||||
Friend Function WriteCsvMergePartList(CsvPartList As List(Of CsvPart)) As Boolean
|
||||
Dim bOk As Boolean = True
|
||||
Dim LocalPartList As New List(Of CsvPart)
|
||||
Dim Index As Integer = 0
|
||||
' devo dividere la lista in tante parti quanti sono i file che lo costituiscono
|
||||
While Index < CsvPartList.Count
|
||||
Dim CurrFile As String = CsvPartList(Index).m_sPath
|
||||
Dim sFile As String = Path.ChangeExtension(CurrFile, ".epl")
|
||||
LocalPartList.Clear()
|
||||
While CurrFile = CsvPartList(Index).m_sPath
|
||||
LocalPartList.Add(CsvPartList(Index))
|
||||
Index += 1
|
||||
' se terminata la lista
|
||||
If Index = CsvPartList.Count Then
|
||||
Exit While
|
||||
End If
|
||||
End While
|
||||
' salvo l'elenco corrente
|
||||
bOk = WriteCsvPartList(sFile, CurrFile, LocalPartList) And bOk
|
||||
End While
|
||||
Return bOk
|
||||
End Function
|
||||
|
||||
Friend Function RemoveNotToNestParts(ByRef CsvPartList As List(Of CsvPart)) As Boolean
|
||||
For i As Integer = CsvPartList.Count() - 1 To 0 Step -1
|
||||
If CsvPartList(i).m_nToNest = 0 Then
|
||||
|
||||
+265
-39
@@ -11,7 +11,7 @@ Public Class CSVPage
|
||||
Private WithEvents m_CurrProjPage As CurrentProjectPageUC
|
||||
' Flag di pagina attiva
|
||||
Private m_bActive As Boolean = False
|
||||
' Flag tipologia
|
||||
' Flag tipologia (False -> Cvs semplificato)
|
||||
Private m_bFull As Boolean = False
|
||||
' Flag inserimento diretto
|
||||
Private m_bDirect As Boolean = True
|
||||
@@ -28,6 +28,10 @@ Public Class CSVPage
|
||||
Private m_ptRawMin As Point3d
|
||||
Private m_ptRawMax As Point3d
|
||||
|
||||
Dim m_bIsCounterLy As Boolean = False
|
||||
Dim m_nCurrNubrOfParts As Integer = 0
|
||||
Dim m_nIdToSel As Integer = GDB_ID.NULL
|
||||
|
||||
Private Sub CSVPage_Initialized(sender As Object, e As EventArgs) Handles Me.Initialized
|
||||
' Assegno la lista dei pezzi Csv come sorgente del treeview
|
||||
PartsTreeView.ItemsSource = m_ItemsList
|
||||
@@ -101,13 +105,36 @@ Public Class CSVPage
|
||||
If EgtIsPart(nPartId) Or bPartInTable Then
|
||||
Dim nStat As Integer = GDB_ST.ON_
|
||||
EgtGetStatus(nPartId, nStat)
|
||||
' Se già selezionato, lo deselezione
|
||||
If nStat = GDB_ST.SEL Then
|
||||
EgtDeselectObj(nPartId)
|
||||
' Altrimenti lo seleziono
|
||||
Else
|
||||
EgtSelectObj(nPartId)
|
||||
|
||||
' verifico se l'lemento selezionato è il numero di pezzi
|
||||
If EgtGetType(nId) = GDB_TY.EXT_TEXT Then
|
||||
Dim NameLayer As String = String.Empty
|
||||
EgtGetName(EgtGetParent(nId), NameLayer)
|
||||
If NameLayer = INFO_COUNTERLY Then
|
||||
Dim sText As String = String.Empty
|
||||
If EgtTextGetContent(nId, sText) Then
|
||||
Dim sItems() As String = sText.Split("#")
|
||||
If sItems.Count > 1 Then
|
||||
m_nCurrNubrOfParts = 0
|
||||
If StringToInt(sItems(1), m_nCurrNubrOfParts) And m_nCurrNubrOfParts > 0 Then
|
||||
m_bIsCounterLy = True
|
||||
m_nIdToSel = nPartId
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
If Not m_bIsCounterLy Then
|
||||
' Se già selezionato, lo deselezione
|
||||
If nStat = GDB_ST.SEL Then
|
||||
EgtDeselectObj(nPartId)
|
||||
' Altrimenti lo seleziono
|
||||
Else
|
||||
EgtSelectObj(nPartId)
|
||||
End If
|
||||
End If
|
||||
|
||||
Exit While
|
||||
End If
|
||||
nId = EgtGetNextObjInSelWin()
|
||||
@@ -115,6 +142,28 @@ Public Class CSVPage
|
||||
EgtDraw()
|
||||
End Sub
|
||||
|
||||
Private Sub OnMyMouseUpScene(sender As Object, e As System.Windows.Forms.MouseEventArgs) Handles m_CurrProjPage.OnMouseUpScene
|
||||
If m_bIsCounterLy Then
|
||||
' apro una finestra di dialogo per chiedere se inserire tutti i pezzi della famiglia
|
||||
Dim SelectWD As New SelectPartFromFamilyWD(m_MainWindow, m_nCurrNubrOfParts)
|
||||
Dim sRefGroup As String = String.Empty
|
||||
EgtGetInfo(m_nIdToSel, INFO_REFGROUP, sRefGroup)
|
||||
' deseleziono il pezzo corrente
|
||||
m_MainWindow.m_CadCutPageUC.m_NestPage.DeselectPartInFaimily(sRefGroup)
|
||||
Select Case SelectWD.NumberOfSelection
|
||||
Case 0 ' Annulla
|
||||
' continuo senza eseguire niente
|
||||
Case Else
|
||||
' seleziono il numero di pezzi indicati
|
||||
m_MainWindow.m_CadCutPageUC.m_NestPage.SelectPartInFaimily(sRefGroup, SelectWD.NumberOfSelection)
|
||||
End Select
|
||||
m_bIsCounterLy = False
|
||||
' disassegno il riferimento all'oggetto appena creato
|
||||
SelectWD = Nothing
|
||||
EgtDraw()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub OkBtn_Click(sender As Object, e As RoutedEventArgs) Handles OkBtn.Click
|
||||
m_MainWindow.m_CadCutPageUC.CadCutPageGrid.Children.Remove(Me)
|
||||
m_MainWindow.m_CadCutPageUC.CadCutPageGrid.Children.Add(m_MainWindow.m_CadCutPageUC.m_NestPage)
|
||||
@@ -133,15 +182,48 @@ Public Class CSVPage
|
||||
WritePrivateProfileString(S_CSV, K_CSVLASTFILE, "", m_MainWindow.GetIniFile())
|
||||
End Sub
|
||||
|
||||
Private Function CreateListOfDeniedFiles() As List(Of String)
|
||||
Dim LocalList As New List(Of String)
|
||||
LocalList.Add("MERGE")
|
||||
Dim Index1 As Integer = 0
|
||||
Dim Index2 As Integer = 0
|
||||
For Index1 = 0 To m_CsvPartList.Count - 1
|
||||
Dim sFileName As String = m_CsvPartList(Index1).m_sPath
|
||||
sFileName = Path.GetFileNameWithoutExtension(sFileName).ToUpper.Trim()
|
||||
Dim bNewFile As Boolean = True
|
||||
For Index2 = 0 To LocalList.Count - 1
|
||||
If sFileName = LocalList(Index2) Then
|
||||
bNewFile = False
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
If bNewFile Then
|
||||
LocalList.Add(Path.GetFileNameWithoutExtension(sFileName).ToUpper.Trim)
|
||||
End If
|
||||
Next
|
||||
Return LocalList
|
||||
End Function
|
||||
|
||||
Private Sub OpenBtn_Click(sender As Object, e As RoutedEventArgs) Handles OpenBtn.Click
|
||||
' Salvo lista dei pezzi attuale
|
||||
SaveCsvPartList()
|
||||
'' Salvo lista dei pezzi attuale
|
||||
'SaveCsvPartList()
|
||||
' Leggo direttorio corrente dei file CSV
|
||||
Dim sCurrDir As String = ""
|
||||
GetPrivateProfileString(S_CSV, K_CSVCURRDIR, "C:\", sCurrDir, m_MainWindow.GetIniFile())
|
||||
' Apro dialogo scelta file
|
||||
Dim OpenFileWnd As New OpenFileWD(m_MainWindow, sCurrDir, ".CSV", ".EPL")
|
||||
Dim OpenFileWnd As OpenFileWD
|
||||
Dim sDeniedFiles As List(Of String) = CreateListOfDeniedFiles()
|
||||
' imposto il filtro
|
||||
If m_bFull Then
|
||||
OpenFileWnd = New OpenFileWD(m_MainWindow, sCurrDir, ".CSV", ".EPL", sDeniedFiles)
|
||||
Else
|
||||
OpenFileWnd = New OpenFileWD(m_MainWindow, sCurrDir, ".CSV")
|
||||
End If
|
||||
If Not OpenFileWnd.ShowDialog() Then Return
|
||||
' verifico che il file inserito non appartenga al Merge attuale
|
||||
|
||||
' Salvo lista dei pezzi attuale
|
||||
SaveCsvPartList()
|
||||
' Salvo direttorio corrente
|
||||
WritePrivateProfileString(S_CSV, K_CSVCURRDIR, OpenFileWnd.GetFileDir(), m_MainWindow.GetIniFile())
|
||||
' Apertura file
|
||||
@@ -173,17 +255,28 @@ Public Class CSVPage
|
||||
' Pulisco path e lista dei pezzi Csv
|
||||
m_sFilePath = String.Empty
|
||||
m_sCsvPath = String.Empty
|
||||
m_CsvPartList.Clear()
|
||||
|
||||
' mantengo la lista attuale dei pezzi
|
||||
'm_CsvPartList.Clear()
|
||||
|
||||
' aggiungo i pezzi su una lista temporanea
|
||||
Dim LocalPartList As New List(Of CsvPart)
|
||||
' Eseguo la lettura del file Csv
|
||||
If Not ReadCsvFile(sCsvPath, m_bFull, m_sCsvPath, m_CsvPartList) Then
|
||||
If Not ReadCsvFile(sCsvPath, m_bFull, m_sCsvPath, LocalPartList) Then
|
||||
m_CurrProjPage.SetErrorMessage(EgtMsg(91206)) 'Errore nella lettura del file CSV
|
||||
Return False
|
||||
End If
|
||||
|
||||
' Creo un nuovo file che ospitarà il merge de
|
||||
Dim sNewMergeFile As String = Path.GetDirectoryName(m_sCsvPath) & "\Merge.csv"
|
||||
m_sCsvPath = sNewMergeFile
|
||||
m_sFilePath = m_sCsvPath
|
||||
|
||||
' Elimino pezzi nulli
|
||||
RemoveWrongParts(m_CsvPartList)
|
||||
RemoveWrongParts(LocalPartList)
|
||||
' Aggiorno
|
||||
If m_bFull Then
|
||||
MySaveCsvPartList(LocalPartList)
|
||||
' Salvo come epl
|
||||
SaveCsvPartList()
|
||||
' Rinomino file originale
|
||||
@@ -196,9 +289,40 @@ Public Class CSVPage
|
||||
' eseguo rinomina
|
||||
My.Computer.FileSystem.RenameFile(sCsvPath, sBakName)
|
||||
End If
|
||||
' attacco i nuovi pezzi alla lista corrente
|
||||
For Each Item As CsvPart In LocalPartList
|
||||
m_CsvPartList.Add(Item)
|
||||
Next
|
||||
Return True
|
||||
End Function
|
||||
|
||||
Private Sub LoadCsvPartList(sFile As String)
|
||||
' Se Csv semplificato non va letta
|
||||
If Not m_bFull Then Return
|
||||
' Pulisco path e lista dei pezzi Csv
|
||||
m_sCsvPath = String.Empty
|
||||
|
||||
' mantengo la lista attuale dei pezzi
|
||||
'm_CsvPartList.Clear()
|
||||
|
||||
' aggiungo i pezzi su una lista temporanea
|
||||
Dim LocalPartList As New List(Of CsvPart)
|
||||
|
||||
' Lettura del file
|
||||
If ReadCsvPartList(sFile, m_sCsvPath, LocalPartList) Then
|
||||
' Creo un nuovo file che ospitarà il merge de
|
||||
Dim sNewMergeFile As String = Path.GetDirectoryName(m_sCsvPath) & "\Merge.csv"
|
||||
m_sCsvPath = sNewMergeFile
|
||||
m_sFilePath = m_sCsvPath
|
||||
End If
|
||||
' Elimino pezzi nulli
|
||||
RemoveWrongParts(LocalPartList)
|
||||
' attacco i nuovi pezzi alla lista corrente
|
||||
For Each Item As CsvPart In LocalPartList
|
||||
m_CsvPartList.Add(Item)
|
||||
Next
|
||||
End Sub
|
||||
|
||||
Private Sub ShowTreeView()
|
||||
' Path del file Csv
|
||||
Dim TempPath As New Text.StringBuilder(260)
|
||||
@@ -208,6 +332,7 @@ Public Class CSVPage
|
||||
m_ItemsList.Clear()
|
||||
Dim sCurrMat As String = String.Empty
|
||||
Dim dCurrTh As Double = 0
|
||||
Dim sCurrPath As String = String.Empty
|
||||
Dim nCatToNest As Integer = 0
|
||||
Dim nCatCount As Integer = 0
|
||||
Dim PartCathegory As New PartCathegoryItem("", 0)
|
||||
@@ -218,19 +343,28 @@ Public Class CSVPage
|
||||
If i = 1 Then
|
||||
sCurrMat = CurrPart.m_sMaterial
|
||||
dCurrTh = CurrPart.m_dTh
|
||||
sCurrPath = CurrPart.m_sPath
|
||||
ElseIf String.Compare(sCurrMat, CurrPart.m_sMaterial, True) <> 0 Or
|
||||
String.Compare(sCurrPath, CurrPart.m_sPath, True) <> 0 Or
|
||||
Math.Abs(dCurrTh - CurrPart.m_dTh) > 10 * EPS_SMALL Then
|
||||
If m_bFull Then
|
||||
PartCathegory.Name = If(String.IsNullOrWhiteSpace(sCurrMat), "***", sCurrMat) &
|
||||
" - " & LenToString(dCurrTh, 2) &
|
||||
" - " & nCatToNest.ToString() & "/" & nCatCount.ToString()
|
||||
If Not String.IsNullOrWhiteSpace(sCurrPath) Then
|
||||
PartCathegory.Name &= vbCrLf & Path.GetFileNameWithoutExtension(sCurrPath)
|
||||
End If
|
||||
Else
|
||||
PartCathegory.Name = nCatToNest.ToString() & "/" & nCatCount.ToString()
|
||||
If Not String.IsNullOrWhiteSpace(sCurrPath) Then
|
||||
PartCathegory.Name &= vbCrLf & Path.GetFileNameWithoutExtension(sCurrPath)
|
||||
End If
|
||||
End If
|
||||
PartCathegory.IsExpanded = True
|
||||
m_ItemsList.Add(PartCathegory)
|
||||
sCurrMat = CurrPart.m_sMaterial
|
||||
dCurrTh = CurrPart.m_dTh
|
||||
sCurrPath = CurrPart.m_sPath
|
||||
PartCathegory = New PartCathegoryItem("", 0)
|
||||
nCatToNest = 0
|
||||
nCatCount = 0
|
||||
@@ -248,8 +382,14 @@ Public Class CSVPage
|
||||
PartCathegory.Name = If(String.IsNullOrWhiteSpace(sCurrMat), "***", sCurrMat) &
|
||||
" - " & LenToString(dCurrTh, 2) &
|
||||
" - " & nCatToNest.ToString() & "/" & nCatCount.ToString()
|
||||
If Not String.IsNullOrWhiteSpace(sCurrPath) Then
|
||||
PartCathegory.Name &= vbCrLf & Path.GetFileNameWithoutExtension(sCurrPath)
|
||||
End If
|
||||
Else
|
||||
PartCathegory.Name = nCatToNest.ToString() & "/" & nCatCount.ToString()
|
||||
If Not String.IsNullOrWhiteSpace(sCurrPath) Then
|
||||
PartCathegory.Name &= vbCrLf & Path.GetFileNameWithoutExtension(sCurrPath)
|
||||
End If
|
||||
End If
|
||||
PartCathegory.IsExpanded = True
|
||||
m_ItemsList.Add(PartCathegory)
|
||||
@@ -259,6 +399,7 @@ Public Class CSVPage
|
||||
For Each CatItem As PartCathegoryItem In m_ItemsList
|
||||
Dim sCurrMat As String = String.Empty
|
||||
Dim dCurrTh As Double = 0
|
||||
Dim sCurrPath As String = String.Empty
|
||||
Dim nCatToNest As Integer = 0
|
||||
Dim nCatCount As Integer = 0
|
||||
For Each PrtItem As PartCustomItem In CatItem.Items
|
||||
@@ -268,6 +409,7 @@ Public Class CSVPage
|
||||
PrtItem.sText1 = sCount
|
||||
sCurrMat = PartData.m_sMaterial
|
||||
dCurrTh = PartData.m_dTh
|
||||
sCurrPath = PartData.m_sPath
|
||||
nCatToNest += PartData.m_nToNest
|
||||
nCatCount += PartData.m_nCount
|
||||
Next
|
||||
@@ -275,8 +417,14 @@ Public Class CSVPage
|
||||
CatItem.Name = If(String.IsNullOrWhiteSpace(sCurrMat), "***", sCurrMat) &
|
||||
" - " & LenToString(dCurrTh, 2) &
|
||||
" - " & nCatToNest.ToString() & "/" & nCatCount.ToString()
|
||||
If Not String.IsNullOrWhiteSpace(sCurrPath) Then
|
||||
CatItem.Name &= vbCrLf & Path.GetFileNameWithoutExtension(sCurrPath)
|
||||
End If
|
||||
Else
|
||||
CatItem.Name = nCatToNest.ToString() & "/" & nCatCount.ToString()
|
||||
If Not String.IsNullOrWhiteSpace(sCurrPath) Then
|
||||
CatItem.Name &= vbCrLf & Path.GetFileNameWithoutExtension(sCurrPath)
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
End Sub
|
||||
@@ -345,6 +493,7 @@ Public Class CSVPage
|
||||
End Function
|
||||
|
||||
Private Sub InsertBtn_Click(sender As Object, e As RoutedEventArgs) Handles InsertBtn.Click
|
||||
'm_CurrProjPage.ClearMessage()
|
||||
' Recupero lo spessore della lastra corrente
|
||||
Dim dRawHeight As Double = GetRawHeight()
|
||||
If dRawHeight < EPS_SMALL Then Return
|
||||
@@ -355,20 +504,17 @@ Public Class CSVPage
|
||||
End If
|
||||
' Recupero la tolleranza sullo spessore
|
||||
Dim dToler As Double = GetPrivateProfileDouble(S_CSV, K_THICKTOLERANCE, 100 * EPS_SMALL, m_MainWindow.GetIniFile())
|
||||
dToler = Math.Max( dToler, 100 * EPS_SMALL)
|
||||
dToler = Math.Max(dToler, 100 * EPS_SMALL)
|
||||
' Creo la lista dei pezzi inseribili nella lastra corrente
|
||||
Dim InsPartList As New List(Of CsvPart)
|
||||
For i As Integer = 1 To m_CsvPartList.Count()
|
||||
Dim CurrPart As CsvPart = m_CsvPartList(i - 1)
|
||||
If CurrPart.m_bActive And
|
||||
(Math.Abs(CurrPart.m_dTh - dRawHeight) < dToler Or
|
||||
CurrPart.m_dTh < EPS_SMALL) And
|
||||
(String.IsNullOrWhiteSpace(CurrPart.m_sMaterial) Or
|
||||
String.IsNullOrWhiteSpace(sCurrMat) Or
|
||||
CurrPart.m_sMaterial = "***" Or
|
||||
sCurrMat = "***" Or
|
||||
String.Compare(CurrPart.m_sMaterial, sCurrMat, True) = 0) Then
|
||||
(Math.Abs(CurrPart.m_dTh - dRawHeight) < dToler Or CurrPart.m_dTh < EPS_SMALL) And
|
||||
(String.IsNullOrWhiteSpace(CurrPart.m_sMaterial) Or String.IsNullOrWhiteSpace(sCurrMat) Or CurrPart.m_sMaterial = "***" Or sCurrMat = "***" Or String.Compare(CurrPart.m_sMaterial, sCurrMat, True) = 0) Then
|
||||
InsPartList.Add(CurrPart)
|
||||
'ElseIf CurrPart.m_bActive Then
|
||||
' m_CurrProjPage.SetWarningMessage("Grezzo non compatibile")
|
||||
End If
|
||||
Next
|
||||
' Lancio l'inserimento dei pezzi
|
||||
@@ -424,10 +570,14 @@ Public Class CSVPage
|
||||
' Definizione variabili
|
||||
Dim dDimX = CurrPart.m_dDimX
|
||||
Dim dDimY = CurrPart.m_dDimY
|
||||
Dim dAng = New Double() {CurrPart.m_dAng1,CurrPart.m_dAng2,CurrPart.m_dAng3,CurrPart.m_dAng4}
|
||||
Dim dHeel = New Double() {CurrPart.m_dHeel1,CurrPart.m_dHeel2,CurrPart.m_dHeel3,CurrPart.m_dHeel4}
|
||||
If bMaxDimOnX And dDimY > dDimX Then
|
||||
Dim dTemp As Double = dDimX
|
||||
dDimX = dDimY
|
||||
dDimY = dTemp
|
||||
dAng = New Double() {CurrPart.m_dAng2,CurrPart.m_dAng3,CurrPart.m_dAng4,CurrPart.m_dAng1}
|
||||
dHeel = New Double() {CurrPart.m_dHeel2,CurrPart.m_dHeel3,CurrPart.m_dHeel4,CurrPart.m_dHeel1}
|
||||
End If
|
||||
EgtLuaSetGlobNumVar("CMP.V1", dDimX)
|
||||
EgtLuaSetGlobNumVar("CMP.V2", dDimY)
|
||||
@@ -439,7 +589,7 @@ Public Class CSVPage
|
||||
If nId = GDB_ID.NULL Then Continue For
|
||||
CurrPart.m_nId = nId
|
||||
' Muovo la regione in Z per evitare problemi in visualizzazione
|
||||
Dim nRegId = EgtGetFirstNameInGroup(nId, NAME_REGION)
|
||||
Dim nRegId As Integer = EgtGetFirstNameInGroup(nId, NAME_REGION)
|
||||
EgtMove(nRegId, New Vector3d(0, 0, DELTAZ_REG), GDB_RT.GLOB)
|
||||
' Eventuale testo per indicare il sopra
|
||||
If Not bMaxDimOnX Then
|
||||
@@ -447,11 +597,36 @@ Public Class CSVPage
|
||||
Dim nText As Integer = EgtCreateTextAdv(nRegId, New Point3d(dDimX / 2, dDimY - 0.6 * dH, 0), 0, "*TOP*", "", 500, False, dH, 1, 0, INS_POS.MC)
|
||||
EgtSetColor(nText, New Color3d( 0, 0, 0))
|
||||
End If
|
||||
' Inserisco eventuali angoli di fianco
|
||||
Dim bSideAngs As Boolean = False
|
||||
Dim nOutLoopId As Integer = EgtGetFirstNameInGroup( nId, NAME_OUTLOOP)
|
||||
For nSide As Integer = 1 To 4
|
||||
Dim dSideAng As Double = dAng( nSide - 1)
|
||||
Dim dSideHeel As Double = dHeel( nSide - 1)
|
||||
If Math.Abs( dSideAng) > EPS_ANG_SMALL Then
|
||||
Dim nEntId As Integer = EgtGetFirstNameInGroup( nOutLoopId, "A" & nSide.ToString())
|
||||
If nEntId <> GDB_ID.NULL Then
|
||||
bSideAngs = True
|
||||
' Assegno valori
|
||||
EgtSetInfo(nEntId, INFO_SIDE_ANGLE, dSideAng)
|
||||
EgtSetInfo(nEntId, INFO_ORIG_SIDE_ANGLE, dSideAng)
|
||||
EgtSetInfo(nEntId, INFO_HEEL, dSideHeel)
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
' Creo layer per testi nesting
|
||||
If bSideAngs Then
|
||||
Dim TextLayId As Integer = EgtCreateGroup(nId)
|
||||
EgtSetName(TextLayId, SIDE_ANGLE_LAYER)
|
||||
EgtSetColor(TextLayId, New Color3d(0, 0, 128))
|
||||
' Opero su geometria esterna pezzo
|
||||
SideAngle.WriteSideAngleOnLoop(nOutLoopId, TextLayId)
|
||||
End If
|
||||
' Aggiusto per lavorazioni
|
||||
EgtAdjustFlatPart(nId)
|
||||
' Se Csv completo, aggiungo info su CSV di origine
|
||||
If m_bFull Then
|
||||
EgtSetInfo(nId, INFO_CSV_PATH, m_sCsvPath)
|
||||
EgtSetInfo(nId, INFO_CSV_PATH, CurrPart.m_sPath)
|
||||
EgtSetInfo(nId, INFO_CSV_PART, CurrPart.m_sName)
|
||||
EgtSetInfo(nId, INFO_CSV_ORD, CurrPart.m_sOrd)
|
||||
EgtSetInfo(nId, INFO_CSV_DIST, CurrPart.m_sDist)
|
||||
@@ -461,14 +636,36 @@ Public Class CSVPage
|
||||
Utility.SetTextColor( nRegId)
|
||||
' Lo sposto nel gruppo speciale
|
||||
EgtRelocate(nId, nIpGrp)
|
||||
|
||||
|
||||
' assegno l'identificatico del pezzo, se esiste
|
||||
If Not String.IsNullOrEmpty(CurrPart.m_sRefGuid) Then
|
||||
' GuidCode dovrebbe contenere 36 caratteri, il precode 5: tot = 41
|
||||
If CurrPart.m_sRefGuid.Count <= 36 Then
|
||||
Dim sPreGuid As String = CreatePreGuidCode(CurrPart.m_nId)
|
||||
CurrPart.m_sRefGuid = sPreGuid & CurrPart.m_sRefGuid
|
||||
End If
|
||||
EgtSetInfo(CurrPart.m_nId, INFO_REFGROUP, CurrPart.m_sRefGuid)
|
||||
End If
|
||||
Dim nRegLayId As Integer = EgtGetFirstNameInGroup(CurrPart.m_nId, NAME_REGION)
|
||||
' Imposto il colore del pezzo inserito nel progetto
|
||||
EgtSetColor(nRegLayId, CurrPart.m_cColor)
|
||||
Dim EntId As Integer = EgtGetFirstInGroup(nRegLayId)
|
||||
While EntId <> GDB_ID.NULL
|
||||
If EgtGetType(EntId) = GDB_TY.SRF_FRGN Then EgtSetColor(EntId, CurrPart.m_cColor)
|
||||
EntId = EgtGetNext(EntId)
|
||||
End While
|
||||
|
||||
Next
|
||||
EgtLuaResetGlobVar("CMP")
|
||||
EgtLuaResetGlobVar("CMP_Draw")
|
||||
|
||||
' Provo ad inserire i pezzi
|
||||
Dim dNewArea As Double = 0
|
||||
For i As Integer = 1 To InsPartList.Count()
|
||||
Dim CurrPart As CsvPart = InsPartList(i - 1)
|
||||
While CurrPart.m_nToNest > 0
|
||||
|
||||
If m_bDirect Then
|
||||
If NestOnePart(CurrPart.m_nId) Then
|
||||
dNewArea += GeomCalc.GetPartArea(CurrPart.m_nId)
|
||||
@@ -490,6 +687,7 @@ Public Class CSVPage
|
||||
m_CurrProjPage.UpdateTotalArea( dNewArea)
|
||||
m_CurrProjPage.UpdateToProduceArea()
|
||||
m_MainWindow.m_CurrentProjectPageUC.ShowAreas()
|
||||
|
||||
Return True
|
||||
End Function
|
||||
|
||||
@@ -566,11 +764,11 @@ Public Class CSVPage
|
||||
Dim sName As String = String.Empty
|
||||
EgtGetInfo(nId, INFO_CSV_PART, sName)
|
||||
' Verifico che il pezzo appartenga a questo Csv
|
||||
If String.Compare(sCsvPath, m_sCsvPath, True) = 0 Then
|
||||
If SearchCurrCSV(sCsvPath) Then
|
||||
' Cerco il pezzo nella lista dei pezzi
|
||||
For i As Integer = 1 To m_CsvPartList.Count()
|
||||
Dim CurrPart As CsvPart = m_CsvPartList(i - 1)
|
||||
If String.Compare(sName, CurrPart.m_sName, True) = 0 Then
|
||||
If String.Compare(sName, CurrPart.m_sName, True) = 0 And String.Compare(sCsvPath, CurrPart.m_sPath, True) = 0 Then
|
||||
' Se nel grezzo
|
||||
If EgtGetParent(nId) = m_nRawId Then
|
||||
' Rimuovo le lavorazioni
|
||||
@@ -578,19 +776,38 @@ Public Class CSVPage
|
||||
' Rimuovo dal grezzo
|
||||
EgtRemovePartFromRawPart(nId)
|
||||
End If
|
||||
' recupero il Guid del pezzo corrente (potrebbe essere stato modificato a causa di rotazioni quando il pezzo è passato in parcheggio)
|
||||
Dim sCurrRefGuid As String = String.Empty
|
||||
EgtGetInfo(nId, INFO_REFGROUP, sCurrRefGuid)
|
||||
' Cancello il pezzo
|
||||
EgtErase(nId)
|
||||
' aggiorno il layer che indica il numero di pezzi in parcheggio (se sRefGroup<>"")
|
||||
m_MainWindow.m_CadCutPageUC.m_NestPage.CountPartInFamily(sCurrRefGuid)
|
||||
' Aggiorno il contatore
|
||||
CurrPart.m_nToNest += 1
|
||||
' ricreo la lista delle famiglie di pezzi presenti in parcheggio
|
||||
m_MainWindow.m_CadCutPageUC.m_NestPage.GetFamilyGroupInPark()
|
||||
' Esco
|
||||
Return True
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
' creo la lista delle famiglie di pezzi presenti in parcheggio
|
||||
m_MainWindow.m_CadCutPageUC.m_NestPage.GetFamilyGroupInPark()
|
||||
' Pezzo non appartenente al Csv corrente
|
||||
Return False
|
||||
End Function
|
||||
|
||||
Private Function SearchCurrCSV(ByVal sCSVFile As String) As Boolean
|
||||
For i As Integer = 1 To m_CsvPartList.Count()
|
||||
Dim CurrPart As CsvPart = m_CsvPartList(i - 1)
|
||||
If String.Compare(sCSVFile, CurrPart.m_sPath, True) = 0 Then
|
||||
Return True
|
||||
End If
|
||||
Next
|
||||
Return False
|
||||
End Function
|
||||
|
||||
Friend Sub SaveCsvPartList()
|
||||
' Se Csv semplificato non va salvata
|
||||
If Not m_bFull Then Return
|
||||
@@ -601,24 +818,33 @@ Public Class CSVPage
|
||||
End If
|
||||
' Path del file
|
||||
Dim sFile As String = Path.ChangeExtension(m_sFilePath, ".epl")
|
||||
' Scrittura del file
|
||||
If WriteCsvPartList(sFile, m_sCsvPath, m_CsvPartList) Then
|
||||
' Registro in ini path
|
||||
WritePrivateProfileString(S_CSV, K_CSVLASTFILE, sFile, m_MainWindow.GetIniFile())
|
||||
' Scrittura dei file
|
||||
If WriteCsvMergePartList(m_CsvPartList) Then
|
||||
' Scrittura dei file Merge
|
||||
If WriteCsvPartList(sFile, m_sCsvPath, m_CsvPartList) Then
|
||||
WritePrivateProfileString(S_CSV, K_CSVLASTFILE, sFile, m_MainWindow.GetIniFile())
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub LoadCsvPartList(sFile As String)
|
||||
' Se Csv semplificato non va letta
|
||||
' salvo il sottoelenco dei pezzi
|
||||
Friend Sub MySaveCsvPartList(ByVal CurrPartList As List(Of CsvPart))
|
||||
' Se Csv semplificato non va salvata
|
||||
If Not m_bFull Then Return
|
||||
' Pulisco path e lista dei pezzi Csv
|
||||
m_sCsvPath = String.Empty
|
||||
m_CsvPartList.Clear()
|
||||
' Lettura del file
|
||||
ReadCsvPartList(sFile, m_sCsvPath, m_CsvPartList)
|
||||
m_sFilePath = sFile
|
||||
' Elimino pezzi nulli
|
||||
RemoveWrongParts(m_CsvPartList)
|
||||
Dim sCurrPath As String = String.Empty
|
||||
' recupero dalla lista il nome del file corrente
|
||||
For Each Item As CsvPart In CurrPartList
|
||||
sCurrPath = Item.m_sPath
|
||||
Next
|
||||
' se non trov il nome del file assocciato all'elenco di pezzi esco
|
||||
If String.IsNullOrEmpty(sCurrPath) Then
|
||||
EgtOutLog("CSV Curr list missing")
|
||||
Return
|
||||
End If
|
||||
' Path del file
|
||||
Dim sFile As String = Path.ChangeExtension(sCurrPath, ".epl")
|
||||
' Scrittura del file
|
||||
WriteCsvPartList(sFile, sCurrPath, CurrPartList)
|
||||
End Sub
|
||||
|
||||
Friend Sub UpdateCsvPartList()
|
||||
|
||||
@@ -107,6 +107,9 @@ Public Class CadCutPageUC
|
||||
|
||||
Private Sub PhotoBtn_Click(sender As Object, e As RoutedEventArgs) Handles PhotoBtn.Click
|
||||
m_MainWindow.TestOff()
|
||||
m_MainWindow.DragRettangleOff()
|
||||
m_MainWindow.SplitCurvWJOff()
|
||||
m_MainWindow.StartCurvWJOff()
|
||||
m_CurrProjPage.m_SceneButtons.MeasureBtn.IsChecked = False
|
||||
EgtSetCurrentContext(m_MainWindow.m_CurrentProjectPageUC.CurrentProjectScene.GetCtx())
|
||||
' Se macchina fotografica collegata, faccio una foto
|
||||
@@ -140,6 +143,9 @@ Public Class CadCutPageUC
|
||||
|
||||
Private Sub RawPartBtn_Click(sender As Object, e As RoutedEventArgs) Handles RawPartBtn.Click
|
||||
m_MainWindow.TestOff()
|
||||
m_MainWindow.DragRettangleOff()
|
||||
m_MainWindow.SplitCurvWJOff()
|
||||
m_MainWindow.StartCurvWJOff()
|
||||
m_CurrProjPage.CurrProjGrid.Visibility = Windows.Visibility.Hidden
|
||||
m_CurrProjPage.CurrentProjectPageGrid.Children.Remove(Me)
|
||||
m_CurrProjPage.CurrentProjectPageGrid.Children.Add(m_MainWindow.m_RawPartPage)
|
||||
@@ -165,6 +171,9 @@ Public Class CadCutPageUC
|
||||
|
||||
Private Sub DrawBtn_Click(sender As Object, e As RoutedEventArgs) Handles DrawBtn.Click
|
||||
m_MainWindow.TestOff()
|
||||
m_MainWindow.DragRettangleOff()
|
||||
m_MainWindow.SplitCurvWJOff()
|
||||
m_MainWindow.StartCurvWJOff()
|
||||
m_MainWindow.MainWindowGrid.Children.Remove(m_MainWindow.m_CurrentProjectPageUC)
|
||||
m_MainWindow.MainWindowGrid.Children.Add(m_MainWindow.m_DrawPageUC)
|
||||
m_MainWindow.m_ActivePage = MainWindow.Pages.Draw
|
||||
@@ -172,6 +181,9 @@ Public Class CadCutPageUC
|
||||
|
||||
Private Sub ImportBtn_Click(sender As Object, e As RoutedEventArgs) Handles ImportBtn.Click
|
||||
m_MainWindow.TestOff()
|
||||
m_MainWindow.DragRettangleOff()
|
||||
m_MainWindow.SplitCurvWJOff()
|
||||
m_MainWindow.StartCurvWJOff()
|
||||
m_MainWindow.MainWindowGrid.Children.Remove(m_MainWindow.m_CurrentProjectPageUC)
|
||||
m_MainWindow.MainWindowGrid.Children.Add(m_MainWindow.m_ImportPageUC)
|
||||
m_MainWindow.m_ActivePage = MainWindow.Pages.Import
|
||||
@@ -193,10 +205,13 @@ Public Class CadCutPageUC
|
||||
End Sub
|
||||
|
||||
Private Sub SplitBtn_Click(sender As Object, e As RoutedEventArgs) Handles SplitBtn.Click
|
||||
m_MainWindow.DragRettangleOff()
|
||||
m_MainWindow.SplitCurvWJOff()
|
||||
m_MainWindow.StartCurvWJOff()
|
||||
m_CurrProjPage.m_SceneButtons.MeasureBtn.IsChecked = False
|
||||
EgtDeselectObj(m_NestPage.m_CurrSelectedCurv)
|
||||
m_ProjectMgr.TestBtn.IsChecked = False
|
||||
m_CurrProjPage.m_bSelectCurv = False
|
||||
m_MainWindow.m_CadCutPageUC.m_NestPage.m_bSelectCurv = False
|
||||
Select Case m_CadCutMode
|
||||
Case CadCutModes.Nest, CadCutModes.FastGrid
|
||||
' Passo alla pagina Split
|
||||
@@ -206,9 +221,9 @@ Public Class CadCutPageUC
|
||||
SplitImage.Source = New System.Windows.Media.Imaging.BitmapImage(New Uri("/Resources/NewIcons/Nest.png", UriKind.Relative))
|
||||
End If
|
||||
If m_CadCutMode = CadCutModes.Nest Then
|
||||
CadCutPageGrid.Children.Remove(m_NestPage)
|
||||
Else
|
||||
CadCutPageGrid.Children.Remove(m_FastGridSlabManager)
|
||||
CadCutPageGrid.Children.Remove(m_NestPage)
|
||||
Else
|
||||
CadCutPageGrid.Children.Remove(m_FastGridSlabManager)
|
||||
End If
|
||||
CadCutPageGrid.Children.Add(m_SplitPage)
|
||||
m_CadCutMode = CadCutModes.Split
|
||||
|
||||
@@ -133,10 +133,14 @@
|
||||
</Button>
|
||||
|
||||
|
||||
<Button Name="RemovePartBtn" Grid.ColumnSpan="3" Grid.Row="6"
|
||||
Style="{DynamicResource OmagCut_YellowTextButton}"/>
|
||||
<Button Name="RemovePartBtn" Grid.ColumnSpan="2" Grid.Row="6"
|
||||
Style="{DynamicResource OmagCut_YellowTextButton}"/>
|
||||
|
||||
<Grid Grid.Row="7" Grid.ColumnSpan="3">
|
||||
<Button Name="ScrapsBtn" Grid.Column="3" Grid.Row="6"
|
||||
Style="{DynamicResource OmagCut_YellowTextButton}"/>
|
||||
|
||||
|
||||
<Grid Grid.Row="7" Grid.ColumnSpan="3">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
@@ -155,9 +159,11 @@
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="10*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
|
||||
</Grid>
|
||||
<!-- Inserimento della pausa durante il movimento sulla tavola di scarico-->
|
||||
<Button Name="PauseBtn" Grid.Column="1" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource Pausa-ON_OFFImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||
</Button>
|
||||
</Grid>
|
||||
|
||||
</Grid>
|
||||
|
||||
|
||||
+547
-45
@@ -11,8 +11,12 @@ Public Class MoveRawPartPage
|
||||
Private m_nAuxTabId As Integer = GDB_ID.NULL
|
||||
' Fase corrente
|
||||
Private m_nCurrPhase As Integer = 0
|
||||
' Disposizione corrente
|
||||
Private m_nCurrDisposition As Integer = GDB_ID.NULL
|
||||
' Premuto Prev
|
||||
Private m_bPrev As Boolean = False
|
||||
' Pemuto Next
|
||||
Private m_bToNext As Boolean = False
|
||||
' Dati movimento
|
||||
Private m_dStep As Double = 0
|
||||
Private m_dRotation As Double = 0
|
||||
@@ -27,18 +31,24 @@ Public Class MoveRawPartPage
|
||||
Private m_bRemovedRaw As Boolean = False ' flag per rimozione manuale pezzi
|
||||
Private m_RawMoveDataList As New List(Of RawMoveData) ' dati di movimento
|
||||
Private m_bRawWithCups As Boolean = False ' flag per pezzo corrente con ventose
|
||||
' Visibilità comando Scrap
|
||||
Private m_ScrapsVisibility As Visibility = Visibility.Visible
|
||||
Private m_CurrRawOnVacuum As Integer = GDB_ID.NULL
|
||||
|
||||
Private Sub MoveRawPartPage_Initialized(sender As Object, e As EventArgs) Handles Me.Initialized
|
||||
' Assegno testi
|
||||
RemovePartBtn.Content = EgtMsg(MSG_MOVERAWPAGEUC + 1) 'Rimuovi
|
||||
ModifyBtn.Content = EgtMsg(MSG_SPLITPAGEUC + 17) 'Modifica
|
||||
ResetBtn.Content = EgtMsg(MSG_NESTPAGEUC + 6) 'Reset
|
||||
ScrapsBtn.Content = "Add Scraps"
|
||||
End Sub
|
||||
|
||||
Private Sub MoveRawPartPage_Loaded(sender As Object, e As EventArgs) Handles Me.Loaded
|
||||
m_CurrProjPage = m_MainWindow.m_CurrentProjectPageUC
|
||||
m_SplitPage = m_MainWindow.m_CadCutPageUC.m_SplitPage
|
||||
m_bActive = True
|
||||
' resetto l'inidice del pezzo da mnovimentare
|
||||
m_CurrRawOnVacuum = GDB_ID.NULL
|
||||
' Leggo tipo movimento grezzi
|
||||
m_bByHand = (GetVacuumType() = 0 Or
|
||||
Not m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.AUTO_MANIP) Or
|
||||
@@ -55,46 +65,55 @@ Public Class MoveRawPartPage
|
||||
m_SplitPage.GetEnabledCuts(Cuts)
|
||||
' Fase precedente
|
||||
Dim nPrevPhase As Integer = EgtGetCurrPhase()
|
||||
' Creo nuova fase, eseguo spezzatura grezzi e vi sposto le lavorazioni
|
||||
Dim vNewRaws As New List(Of Integer)
|
||||
If Not m_SplitPage.m_bShow Then
|
||||
' Creo nuova fase, eseguo spezzatura grezzi e vi sposto le lavorazioni
|
||||
Dim vNewRaws As New List(Of Integer)
|
||||
SplitRawParts(nPrevPhase, Cuts, vNewRaws)
|
||||
Else
|
||||
EgtSetCurrPhase(nPrevPhase + 1)
|
||||
HideAllMachinings()
|
||||
End If
|
||||
m_nCurrPhase = EgtGetCurrPhase()
|
||||
|
||||
'---------------------------- SCRAPS ----------------------------
|
||||
' gestione visualizzazione del comando "Scraps"
|
||||
Dim ScrapsVisibility As Visibility = Visibility.Collapsed
|
||||
' verifico se licenza abilitat: m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.SCRAPS)
|
||||
If GetPrivateProfileInt(S_SCRAPS, K_ENABLESCRAPS, 0, m_MainWindow.GetIniFile()) <> 0 Then
|
||||
' leggo il direttorio in cui cercare il database delle lastre
|
||||
Dim PhotDir As String = String.Empty
|
||||
GetPrivateProfileString(S_SCRAPS, K_PHOTODIR, "", PhotDir, m_MainWindow.GetIniFile())
|
||||
' verifico che esista il file "OmagPHOTOVb.sqlite" nel direttorio inidicato
|
||||
If System.IO.File.Exists(PhotDir.Trim & "\OmagPHOTODb.sqlite") Then
|
||||
ScrapsVisibility = Visibility.Visible
|
||||
End If
|
||||
End If
|
||||
' verifico che siano stati generati dei nuovi grezzi
|
||||
If vNewRaws.Count = 0 Then
|
||||
ScrapsVisibility = Visibility.Collapsed
|
||||
End If
|
||||
' aggiorno la grafica
|
||||
m_ScrapsVisibility = ScrapsVisibility
|
||||
If m_ScrapsVisibility <> Visibility.Visible Then
|
||||
Grid.SetColumnSpan(RemovePartBtn, 3)
|
||||
Else
|
||||
Grid.SetColumnSpan(RemovePartBtn, 2)
|
||||
End If
|
||||
'---------------------------- SCRAPS ----------------------------
|
||||
|
||||
' Se movimento pezzi finale, sistemazioni per tavolo ausiliario
|
||||
If m_SplitPage.m_bOnAuxTab Then
|
||||
m_nAuxTabId = EgtGetTableId(AUX_TAB)
|
||||
' Visualizzo tavolo ausiliario
|
||||
Dim bOldEnMod As Boolean = EgtGetEnableModified()
|
||||
If bOldEnMod Then EgtDisableModified()
|
||||
EgtSetStatus(m_nAuxTabId, GDB_ST.ON_)
|
||||
If bOldEnMod Then EgtEnableModified()
|
||||
' Se definizione movimenti
|
||||
If Not m_SplitPage.m_bShow Then
|
||||
' Area tavolo ausiliario
|
||||
Dim b3AuxTab As New BBox3d
|
||||
EgtGetBBoxGlob(EgtGetFirstNameInGroup(m_nAuxTabId, "A1"), GDB_BB.STANDARD, b3AuxTab)
|
||||
' Area tavolo principale
|
||||
Dim b3Tab As New BBox3d
|
||||
EgtGetTableArea(1, b3Tab)
|
||||
' Imposto offset su tavolo principale per includere anche il secondario
|
||||
Dim dOffsXP As Double = Math.Max(b3AuxTab.Max().x - b3Tab.Max().x, 0)
|
||||
Dim dOffsYP As Double = Math.Max(b3AuxTab.Max().y - b3Tab.Max().y, 0)
|
||||
Dim dOffsXM As Double = Math.Max(b3Tab.Min().x - b3AuxTab.Min().x, 0)
|
||||
Dim dOffsYM As Double = Math.Max(b3Tab.Min().y - b3AuxTab.Min().y, 0)
|
||||
EgtSetTableAreaOffset(dOffsXP, dOffsYP, dOffsXM, dOffsYM)
|
||||
End If
|
||||
EgtZoom(ZM.ALL)
|
||||
' altrimenti, aggiorno visualizzazione
|
||||
' assegnazione delle info tavola ausiliaria alla dispozione corrente
|
||||
SetAuxTabInCurrDisposition()
|
||||
' altrimenti, aggiorno visualizzazione
|
||||
Else
|
||||
EgtDraw()
|
||||
End If
|
||||
' Carico i parametri di movimento
|
||||
m_dStep = GetPrivateProfileDouble(S_RAWMOVE, K_RAWSTEP, 50, m_MainWindow.GetIniFile())
|
||||
StepMoveTxBx.Text = LenToString(m_dStep, 3)
|
||||
' Ricavo la lunghezza del baffo di taglio
|
||||
m_dStep = SplitAuto.MaxCuttingMustache(m_dStep)
|
||||
StepMoveTxBx.Text = LenToString(m_dStep, 1) & "+1"
|
||||
m_dRotation = GetPrivateProfileDouble(S_RAWMOVE, K_RAWROTATION, 30, m_MainWindow.GetIniFile())
|
||||
RotationAngleTxBx.Text = DoubleToString(m_dRotation, 3)
|
||||
' Se movimento manuale perpendicolare
|
||||
@@ -124,14 +143,14 @@ Public Class MoveRawPartPage
|
||||
' Distanza iniziale
|
||||
m_dCurrDist = 0
|
||||
End If
|
||||
' Non dovrebbe mai accadere, ma inizializzo con default
|
||||
' Non dovrebbe mai accadere, ma inizializzo con default
|
||||
Else
|
||||
m_vtDir = Vector3d.Y_AX()
|
||||
m_ptMid = Point3d.ORIG()
|
||||
m_dOrigDist = 0
|
||||
m_dCurrDist = 0
|
||||
End If
|
||||
' Altrimenti movimento con ventose
|
||||
' Altrimenti movimento con ventose
|
||||
Else
|
||||
m_bRemovedRaw = False
|
||||
m_bRawWithCups = False
|
||||
@@ -145,6 +164,9 @@ Public Class MoveRawPartPage
|
||||
GetMoveInfoInDisposition(nDispId, m_RawMoveDataList)
|
||||
End If
|
||||
End If
|
||||
|
||||
' aggiorno il messaggio del comando per gestire gli sfridi
|
||||
VerifyIsNewScrap(m_CurrRawOnVacuum)
|
||||
' Aggiorno interfaccia per taglio perpendicolare
|
||||
If m_bByHand Then
|
||||
UpBtn.Visibility = Windows.Visibility.Visible
|
||||
@@ -160,8 +182,10 @@ Public Class MoveRawPartPage
|
||||
TopRBtn.Visibility = Windows.Visibility.Hidden
|
||||
BottomLBtn.Visibility = Windows.Visibility.Hidden
|
||||
BottomRBtn.Visibility = Windows.Visibility.Hidden
|
||||
PauseBtn.Visibility = Windows.Visibility.Hidden
|
||||
ResetBtn.Visibility = Windows.Visibility.Hidden
|
||||
' altrimenti per movimento con ventose
|
||||
ScrapsBtn.Visibility = m_ScrapsVisibility
|
||||
' altrimenti per movimento con ventose
|
||||
ElseIf Not m_SplitPage.m_bOnAuxTab Then
|
||||
UpBtn.Visibility = Windows.Visibility.Visible
|
||||
LeftBtn.Visibility = Windows.Visibility.Visible
|
||||
@@ -176,8 +200,10 @@ Public Class MoveRawPartPage
|
||||
TopRBtn.Visibility = Windows.Visibility.Hidden
|
||||
BottomLBtn.Visibility = Windows.Visibility.Hidden
|
||||
BottomRBtn.Visibility = Windows.Visibility.Hidden
|
||||
PauseBtn.Visibility = Windows.Visibility.Hidden
|
||||
ResetBtn.Visibility = Windows.Visibility.Hidden
|
||||
' altrimenti per movimento finale dei pezzi
|
||||
ScrapsBtn.Visibility = m_ScrapsVisibility
|
||||
' altrimenti per movimento finale dei pezzi
|
||||
Else
|
||||
UpBtn.Visibility = Windows.Visibility.Hidden
|
||||
LeftBtn.Visibility = Windows.Visibility.Hidden
|
||||
@@ -192,14 +218,45 @@ Public Class MoveRawPartPage
|
||||
TopRBtn.Visibility = Windows.Visibility.Visible
|
||||
BottomLBtn.Visibility = Windows.Visibility.Visible
|
||||
BottomRBtn.Visibility = Windows.Visibility.Visible
|
||||
PauseBtn.Visibility = Windows.Visibility.Visible
|
||||
ResetBtn.Visibility = Windows.Visibility.Visible
|
||||
ScrapsBtn.Visibility = Windows.Visibility.Hidden
|
||||
End If
|
||||
' salvo l'idice della fase corrente
|
||||
m_nCurrDisposition = EgtGetPhaseDisposition(m_nCurrPhase)
|
||||
' Abilitazione bottone modifica
|
||||
ModifyBtn.IsEnabled = m_SplitPage.m_bShow
|
||||
' gestione abilitazione altri bottoni
|
||||
EnableButtons()
|
||||
End Sub
|
||||
|
||||
Private Sub SetAuxTabInCurrDisposition()
|
||||
' Se movimento pezzi finale, sistemazioni per tavolo ausiliario
|
||||
m_nAuxTabId = EgtGetTableId(AUX_TAB)
|
||||
' Visualizzo tavolo ausiliario
|
||||
Dim bOldEnMod As Boolean = EgtGetEnableModified()
|
||||
If bOldEnMod Then EgtDisableModified()
|
||||
EgtSetStatus(m_nAuxTabId, GDB_ST.ON_)
|
||||
If bOldEnMod Then EgtEnableModified()
|
||||
' Se definizione movimenti
|
||||
If Not m_SplitPage.m_bShow Then
|
||||
' Area tavolo ausiliario
|
||||
Dim b3AuxTab As New BBox3d
|
||||
EgtGetBBoxGlob(EgtGetFirstNameInGroup(m_nAuxTabId, "A1"), GDB_BB.STANDARD, b3AuxTab)
|
||||
' Area tavolo principale
|
||||
Dim b3Tab As New BBox3d
|
||||
EgtGetTableArea(1, b3Tab)
|
||||
' Imposto offset su tavolo principale per includere anche il secondario
|
||||
Dim dOffsXP As Double = Math.Max(b3AuxTab.Max().x - b3Tab.Max().x, 0)
|
||||
Dim dOffsYP As Double = Math.Max(b3AuxTab.Max().y - b3Tab.Max().y, 0)
|
||||
Dim dOffsXM As Double = Math.Max(b3Tab.Min().x - b3AuxTab.Min().x, 0)
|
||||
Dim dOffsYM As Double = Math.Max(b3Tab.Min().y - b3AuxTab.Min().y, 0)
|
||||
EgtSetTableAreaOffset(dOffsXP, dOffsYP, dOffsXM, dOffsYM)
|
||||
End If
|
||||
EgtZoom(ZM.ALL)
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub OnMyMouseDownScene(sender As Object, e As System.Windows.Forms.MouseEventArgs) Handles m_CurrProjPage.OnMouseDownScene
|
||||
' Verifico di essere il gestore attivo
|
||||
If Not m_bActive Then Return
|
||||
@@ -228,16 +285,50 @@ Public Class MoveRawPartPage
|
||||
If nParentId = nRawGroupId Then
|
||||
Dim nStat As Integer = GDB_ST.ON_
|
||||
EgtGetStatus(nId, nStat)
|
||||
' aggiorno il messaggio del bottone "Scrap" a seconda che il grezzo sia già uno scrap
|
||||
VerifyIsNewScrap(nId)
|
||||
' Se il pezzo corrente è selezionato allora lo disattivo -> deposito del pezzo
|
||||
If nStat = GDB_ST.SEL Then
|
||||
EgtSetStatus(nId, GDB_ST.ON_)
|
||||
' Se con ventose, le nascondo
|
||||
If Not m_bByHand Then EgtSetStatus(GetVacuumId(), GDB_ST.OFF)
|
||||
' prima di rilasciare il pezzo verifico che non vada in collisione con altri pezzi sulla tavola (evito il controllo se ultima fase)
|
||||
If VerifyCollisionWithOtherRawPart(nId) Then
|
||||
' mantengo la selezione del pezzo
|
||||
EgtSetStatus(nId, GDB_ST.SEL)
|
||||
m_CurrProjPage.SetErrorMessage("Collisione pezzi")
|
||||
Else
|
||||
' Se con ventose, le nascondo
|
||||
If Not m_bByHand Then EgtSetStatus(GetVacuumId(), GDB_ST.OFF)
|
||||
End If
|
||||
Else
|
||||
|
||||
' verifico che il pezzo precedente possa essere depositato correttamente
|
||||
If VerifyCollisionWithOtherRawPart(m_CurrRawOnVacuum) Then
|
||||
' mantengo la selezione del pezzo
|
||||
EgtSetStatus(m_CurrRawOnVacuum, GDB_ST.SEL)
|
||||
m_CurrProjPage.SetErrorMessage("Collisione pezzi")
|
||||
EgtDraw()
|
||||
' esco dal ciclo, prima devo depositare correttamente il pezzo
|
||||
Exit While
|
||||
End If
|
||||
' salvo l'indice del pezzo correntemente attaccato alle ventose
|
||||
m_CurrRawOnVacuum = nId
|
||||
|
||||
' Deseleziono tutto e abilito la selezione del pezzo corrente
|
||||
EgtDeselectAll()
|
||||
EgtSetStatus(nId, GDB_ST.SEL)
|
||||
' Se con ventose, le posiziono sul grezzo
|
||||
If Not m_bByHand Then
|
||||
Dim rmData As New RawMoveData
|
||||
' inizializzo i dati del grezzo per il cacolo del peso
|
||||
Dim MaxSinglePlugger As Double = 250
|
||||
MaxSinglePlugger = GetPrivateProfileDouble(S_MACH_RAWMOVE, K_MACH_WEIGHT_SINGLEPLUGGER, MaxSinglePlugger, m_MainWindow.GetMachIniFile())
|
||||
Dim MaxDoublePlugger As Double = 750
|
||||
MaxDoublePlugger = GetPrivateProfileDouble(S_MACH_RAWMOVE, K_MACH_WEIGHT_DOUBLEPLUGGER, MaxDoublePlugger, m_MainWindow.GetMachIniFile())
|
||||
Dim AverageDensity As Double = 2700
|
||||
AverageDensity = GetPrivateProfileDouble(S_MATERIALS, K_AVERAGEDENSITY, AverageDensity, m_MainWindow.GetMachIniFile())
|
||||
VacuumCups.SetWeightInformation(AverageDensity, MaxSinglePlugger, MaxDoublePlugger)
|
||||
VacuumCups.SetRotationForExtraStrokeY(GetPrivateProfileInt(S_MACH_RAWMOVE, K_MACH_ROTATEVACUUMFOREXTRASTROKEY, 0, m_MainWindow.GetMachIniFile()) <> 0)
|
||||
VacuumCups.SetRotationForExtraStrokeX(GetPrivateProfileInt(S_MACH_RAWMOVE, K_MACH_ROTATEVACUUMFOREXTRASTROKEX, 0, m_MainWindow.GetMachIniFile()) <> 0)
|
||||
If PutVacuumCupsOnRaw(nId, rmData) Then
|
||||
' Visualizzo le ventose
|
||||
EgtSetStatus(GetVacuumId(), GDB_ST.ON_)
|
||||
@@ -247,10 +338,18 @@ Public Class MoveRawPartPage
|
||||
' Reset eventuale messaggio
|
||||
m_CurrProjPage.ClearMessage()
|
||||
Else
|
||||
' nascondo la visualizzazione delle ventose
|
||||
EgtSetStatus(GetVacuumId(), GDB_ST.OFF)
|
||||
' Aggiorno i dati
|
||||
m_bRawWithCups = False
|
||||
' Messaggio di avvertimento
|
||||
m_CurrProjPage.SetWarningMessage(EgtMsg(MSG_MOVERAWPAGEUC + 2)) 'Pezzo troppo piccolo : non si può muovere
|
||||
If VacuumCups.bOverWeight Then
|
||||
m_CurrProjPage.SetWarningMessage(EgtMsg(MSG_MOVERAWPAGEUC + 4)) 'Pezzo troppo pesante : non si può muovere
|
||||
ElseIf VacuumCups.bExtraStroke Then
|
||||
m_CurrProjPage.SetWarningMessage(EgtMsg(MSG_MOVERAWPAGEUC + 5)) 'Pezzo oltre le corse : non si può muovere
|
||||
Else
|
||||
' Messaggio di avvertimento
|
||||
m_CurrProjPage.SetWarningMessage(EgtMsg(MSG_MOVERAWPAGEUC + 2)) 'Pezzo troppo piccolo : non si può muovere
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
@@ -259,8 +358,75 @@ Public Class MoveRawPartPage
|
||||
End If
|
||||
nId = EgtGetNextObjInSelWin()
|
||||
End While
|
||||
|
||||
' clicco su un oggetto che non è un grezzo -> verifico che il pezzo precedente possa essere depositato correttamente
|
||||
If VerifyCollisionWithOtherRawPart(m_CurrRawOnVacuum) Then
|
||||
' mantengo la selezione del pezzo
|
||||
EgtSetStatus(m_CurrRawOnVacuum, GDB_ST.SEL)
|
||||
m_CurrProjPage.SetErrorMessage("Collisione pezzi")
|
||||
EgtDraw()
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
' Veririfica che il grezzo non entri in colliosione con altri pezzi
|
||||
Private Function VerifyCollisionWithOtherRawPart(nIdOnVacumm As Integer) As Boolean
|
||||
' se movimento su tavola di scarico non eseguo il controllo (evito di segnalre errori per pezzi ricavati interni al grezzo...)
|
||||
If m_SplitPage.m_bOnAuxTab Then Return False
|
||||
If nIdOnVacumm = GDB_ID.NULL Then Return False
|
||||
' Creo gruppo temporaneo in cui generare le superfici per la veririfica di collisione
|
||||
Dim m_nTempId As Integer = EgtCreateGroup(GDB_ID.ROOT)
|
||||
If m_nTempId = GDB_ID.NULL Then Return False
|
||||
EgtSetName(m_nTempId, "RawTemp")
|
||||
Dim nIdActualRawOutLine As Integer = EgtGetFirstNameInGroup(nIdOnVacumm, "RawOutline")
|
||||
Dim ActualRawFlatRegion As Integer = EgtCreateSurfFlatRegion(m_nTempId, nIdActualRawOutLine)
|
||||
Dim nCurrPhase As Integer = EgtGetCurrPhase()
|
||||
Dim nRawGroupId = EgtGetParent(EgtGetFirstRawPart())
|
||||
Dim nIdRaw As Integer = EgtGetFirstRawPart()
|
||||
' ciclo su tutti i grezzi per veririficare eventuali collisioni
|
||||
While nIdRaw <> GDB_ID.NULL
|
||||
' verifico la fase del grezzo
|
||||
If EgtVerifyRawPartCurrPhase(nIdRaw) And nIdOnVacumm <> nIdRaw Then
|
||||
' recupero il contorno del pezzo
|
||||
Dim nIdRawOutLine As Integer = EgtGetFirstNameInGroup(nIdRaw, "RawOutline")
|
||||
Dim nIdRawFlatRegion As Integer = EgtCreateSurfFlatRegion(m_nTempId, nIdRawOutLine)
|
||||
If EgtSurfFrIntersect(nIdRawFlatRegion, ActualRawFlatRegion) Then
|
||||
If EgtExistsObj(nIdRawFlatRegion) Then
|
||||
EgtErase(m_nTempId)
|
||||
' esiste una intersezione delle superfici
|
||||
Return True
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
nIdRaw = EgtGetNextRawPart(nIdRaw)
|
||||
End While
|
||||
EgtErase(m_nTempId)
|
||||
Return False
|
||||
End Function
|
||||
|
||||
Private Function VerifyIsNewScrap(nMyId As Integer) As Boolean
|
||||
Dim nVal As Integer = 0
|
||||
If EgtGetInfo(nMyId, K_ISNEWSCRAPS, nVal) Then
|
||||
If nVal = 1 Or nVal = 2 Then
|
||||
' 1 → è stato definito come nuovo grezzo oppure, 2 → è stato definito come nuovo grezzo ed è stato inserito nel DB delle lastre
|
||||
ScrapsBtn.Content = "Remove Scrap"
|
||||
ScrapsBtn.IsEnabled = True And Not m_SplitPage.m_bShow
|
||||
Return True
|
||||
ElseIf nVal = 3 Then
|
||||
' non è possibile rimuovere il grezzo in questa fase
|
||||
ScrapsBtn.Content = "Defined as Scrap"
|
||||
ScrapsBtn.IsEnabled = False
|
||||
Return True
|
||||
End If
|
||||
End If
|
||||
' non è un nuovo grezzo
|
||||
ScrapsBtn.Content = "Add Scrap"
|
||||
ScrapsBtn.IsEnabled = True And Not m_SplitPage.m_bShow
|
||||
Return False
|
||||
End Function
|
||||
|
||||
#Region "Move Up/Down/Left/Right"
|
||||
|
||||
Private Sub UpBtn_Click(sender As Object, e As RoutedEventArgs) Handles UpBtn.Click
|
||||
Dim nRawId As Integer = EgtGetFirstSelectedObj()
|
||||
While nRawId <> GDB_ID.NULL
|
||||
@@ -283,9 +449,15 @@ Public Class MoveRawPartPage
|
||||
Else
|
||||
If m_bRawWithCups Then
|
||||
Dim vtMove As New Vector3d(0, m_dStep, 0)
|
||||
' ----------- INIZIO verifica di essere entro i limiti macchina -----------
|
||||
m_CurrProjPage.ClearMessage()
|
||||
VerifyReleasdPositionIsValid(vtMove)
|
||||
' ----------- FINE verifica di essere entro i limiti macchina -----------
|
||||
If EgtMoveRawPart(nRawId, vtMove) Then
|
||||
EgtMove(GetVacuumId(), vtMove, GDB_RT.GLOB)
|
||||
AddRawMoveData(nRawId, vtMove, m_RawMoveDataList)
|
||||
Else
|
||||
VacuumCups.ptStartPointLift.y -= vtMove.y
|
||||
End If
|
||||
Else
|
||||
m_CurrProjPage.SetWarningMessage(EgtMsg(MSG_MOVERAWPAGEUC + 2)) 'Pezzo troppo piccolo : non si può muovere
|
||||
@@ -320,9 +492,15 @@ Public Class MoveRawPartPage
|
||||
Else
|
||||
If m_bRawWithCups Then
|
||||
Dim vtMove As New Vector3d(0, -m_dStep, 0)
|
||||
' ----------- INIZIO verifica di essere entro i limiti macchina -----------
|
||||
m_CurrProjPage.ClearMessage()
|
||||
VerifyReleasdPositionIsValid(vtMove)
|
||||
' ----------- FINE verifica di essere entro i limiti macchina -----------
|
||||
If EgtMoveRawPart(nRawId, vtMove) Then
|
||||
EgtMove(GetVacuumId(), vtMove, GDB_RT.GLOB)
|
||||
AddRawMoveData(nRawId, vtMove, m_RawMoveDataList)
|
||||
Else
|
||||
VacuumCups.ptStartPointLift.y -= vtMove.y
|
||||
End If
|
||||
Else
|
||||
m_CurrProjPage.SetWarningMessage(EgtMsg(MSG_MOVERAWPAGEUC + 2)) 'Pezzo troppo piccolo : non si può muovere
|
||||
@@ -340,9 +518,15 @@ Public Class MoveRawPartPage
|
||||
While nRawId <> GDB_ID.NULL
|
||||
If m_bRawWithCups Then
|
||||
Dim vtMove As New Vector3d(m_dStep, 0, 0)
|
||||
' ----------- INIZIO verifica di essere entro i limiti macchina -----------
|
||||
m_CurrProjPage.ClearMessage()
|
||||
VerifyReleasdPositionIsValid(vtMove)
|
||||
' ----------- FINE verifica di essere entro i limiti macchina -----------
|
||||
If EgtMoveRawPart(nRawId, vtMove) Then
|
||||
EgtMove(GetVacuumId(), vtMove, GDB_RT.GLOB)
|
||||
AddRawMoveData(nRawId, vtMove, m_RawMoveDataList)
|
||||
Else
|
||||
VacuumCups.ptStartPointLift.x -= vtMove.x
|
||||
End If
|
||||
Else
|
||||
m_CurrProjPage.SetWarningMessage(EgtMsg(MSG_MOVERAWPAGEUC + 2)) 'Pezzo troppo piccolo : non si può muovere
|
||||
@@ -359,9 +543,15 @@ Public Class MoveRawPartPage
|
||||
While nRawId <> GDB_ID.NULL
|
||||
If m_bRawWithCups Then
|
||||
Dim vtMove As New Vector3d(-m_dStep, 0, 0)
|
||||
' ----------- INIZIO verifica di essere entro i limiti macchina -----------
|
||||
m_CurrProjPage.ClearMessage()
|
||||
VerifyReleasdPositionIsValid(vtMove)
|
||||
' ----------- FINE verifica di essere entro i limiti macchina -----------
|
||||
If EgtMoveRawPart(nRawId, vtMove) Then
|
||||
EgtMove(GetVacuumId(), vtMove, GDB_RT.GLOB)
|
||||
AddRawMoveData(nRawId, vtMove, m_RawMoveDataList)
|
||||
Else
|
||||
VacuumCups.ptStartPointLift.x -= vtMove.x
|
||||
End If
|
||||
Else
|
||||
m_CurrProjPage.SetWarningMessage(EgtMsg(MSG_MOVERAWPAGEUC + 2)) 'Pezzo troppo piccolo : non si può muovere
|
||||
@@ -371,6 +561,77 @@ Public Class MoveRawPartPage
|
||||
EgtDraw()
|
||||
End Sub
|
||||
|
||||
#End Region 'Move Up/Down/Left/Right
|
||||
|
||||
' verifica che la poszione da raggiungere sia nei limiti delle corse
|
||||
Private Function VerifyReleasdPositionIsValid(ByRef vtMove As Vector3d) As Boolean
|
||||
Dim bOk As Boolean = True
|
||||
' determino il punto finale dello spostamento
|
||||
Dim ptEndPointLift As Point3d = VacuumCups.ptStartPointLift
|
||||
ptEndPointLift.x += vtMove.x
|
||||
ptEndPointLift.y += vtMove.y
|
||||
Dim sInfo As String = String.Empty
|
||||
Select Case VacuumCups.VerifyOutOfStrokes(ptEndPointLift, VacuumCups.dDegRotStartAng)
|
||||
Case 1
|
||||
' extra corsa sulla x-: devo ridurre del valore di extra corsa
|
||||
EgtGetOutstrokeInfo(sInfo)
|
||||
m_CurrProjPage.SetWarningMessage(EgtMsg(MSG_SIMULATIONPAGEUC + 2) & " " & sInfo) 'Extracorsa ...
|
||||
ptEndPointLift.x -= vtMove.x
|
||||
Dim dMaxMove As Double = VacuumCups.GetExtraStrokeValue(sInfo)
|
||||
If Math.Abs(dMaxMove - vtMove.x) <= EPS_SMALL * 100 Then
|
||||
vtMove.x = 0
|
||||
Else
|
||||
vtMove.x -= dMaxMove - EPS_SMALL * 100
|
||||
End If
|
||||
ptEndPointLift.x += vtMove.x
|
||||
bOk = False
|
||||
Case 2
|
||||
' extra corsa sulla x+: devo ridurre del valore di extra corsa
|
||||
EgtGetOutstrokeInfo(sInfo)
|
||||
m_CurrProjPage.SetWarningMessage(EgtMsg(MSG_SIMULATIONPAGEUC + 2) & " " & sInfo) 'Extracorsa ...
|
||||
ptEndPointLift.x -= vtMove.x
|
||||
Dim dMaxMove As Double = VacuumCups.GetExtraStrokeValue(sInfo)
|
||||
If Math.Abs(dMaxMove - vtMove.x) <= EPS_SMALL * 100 Then
|
||||
vtMove.x = 0
|
||||
Else
|
||||
vtMove.x -= dMaxMove + EPS_SMALL * 100
|
||||
End If
|
||||
ptEndPointLift.x += vtMove.x
|
||||
bOk = False
|
||||
Case 4
|
||||
' extra corsa sulla y-
|
||||
EgtGetOutstrokeInfo(sInfo)
|
||||
m_CurrProjPage.SetWarningMessage(EgtMsg(MSG_SIMULATIONPAGEUC + 2) & " " & sInfo) 'Extracorsa ...
|
||||
ptEndPointLift.y -= vtMove.y
|
||||
Dim dMaxMove As Double = VacuumCups.GetExtraStrokeValue(sInfo)
|
||||
If Math.Abs(dMaxMove - vtMove.y) <= EPS_SMALL * 100 Then
|
||||
vtMove.y = 0
|
||||
Else
|
||||
vtMove.y -= dMaxMove - EPS_SMALL * 100
|
||||
End If
|
||||
ptEndPointLift.y += vtMove.y
|
||||
bOk = False
|
||||
Case 8
|
||||
' extra corsa sulla y+
|
||||
EgtGetOutstrokeInfo(sInfo)
|
||||
m_CurrProjPage.SetWarningMessage(EgtMsg(MSG_SIMULATIONPAGEUC + 2) & " " & sInfo) 'Extracorsa ...
|
||||
ptEndPointLift.y -= vtMove.y
|
||||
Dim dMaxMove As Double = VacuumCups.GetExtraStrokeValue(sInfo)
|
||||
If Math.Abs(dMaxMove - vtMove.y) <= EPS_SMALL * 100 Then
|
||||
vtMove.y = 0
|
||||
Else
|
||||
vtMove.y -= dMaxMove + EPS_SMALL * 100
|
||||
End If
|
||||
ptEndPointLift.y += vtMove.y
|
||||
bOk = False
|
||||
End Select
|
||||
' il movimento del pezzo è accettabile, aggiorno le posizione per la verifica dello step successivo
|
||||
VacuumCups.ptStartPointLift = ptEndPointLift
|
||||
Return bOk
|
||||
End Function
|
||||
|
||||
#Region "Rotate CounterClockWise/ClockWise"
|
||||
|
||||
Private Sub RotateCounterClockwiseBtn_Click(sender As Object, e As RoutedEventArgs) Handles RotateCounterClockwiseBtn.Click
|
||||
' Solo movimento con ventose
|
||||
If m_bByHand Then Return
|
||||
@@ -378,14 +639,24 @@ Public Class MoveRawPartPage
|
||||
While nRawId <> GDB_ID.NULL
|
||||
If m_bRawWithCups Then
|
||||
Dim dAng As Double = m_dRotation
|
||||
' ----------- INIZIO verifica di essere entro i limiti macchina -----------
|
||||
' Recupero il centro del grezzo
|
||||
Dim ptRawCen As Point3d
|
||||
EgtGetRawPartCenter(nRawId, ptRawCen)
|
||||
m_CurrProjPage.ClearMessage()
|
||||
VerifyReleasdAngleIsValid(dAng, ptRawCen)
|
||||
' ----------- FINE verifica di essere entro i limiti macchina -----------
|
||||
If EgtRotateRawPart(nRawId, Vector3d.Z_AX(), dAng) Then
|
||||
' Recupero il centro del grezzo
|
||||
Dim ptRawCen As Point3d
|
||||
EgtGetRawPartCenter(nRawId, ptRawCen)
|
||||
'' Recupero il centro del grezzo
|
||||
'Dim ptRawCen As Point3d
|
||||
'EgtGetRawPartCenter(nRawId, ptRawCen)
|
||||
' Eseguo la rotazione della ventosa
|
||||
EgtRotate(GetVacuumId(), ptRawCen, Vector3d.Z_AX(), dAng, GDB_RT.GLOB)
|
||||
' Memorizzo
|
||||
AddRawMoveData(nRawId, dAng, m_RawMoveDataList)
|
||||
Else
|
||||
VacuumCups.ptStartPointLift.Rotate(ptRawCen, Vector3d.Z_AX(), dAng)
|
||||
VacuumCups.dDegRotStartAng -= dAng
|
||||
End If
|
||||
Else
|
||||
m_CurrProjPage.SetWarningMessage(EgtMsg(MSG_MOVERAWPAGEUC + 2)) 'Pezzo troppo piccolo : non si può muovere
|
||||
@@ -402,14 +673,24 @@ Public Class MoveRawPartPage
|
||||
While nRawId <> GDB_ID.NULL
|
||||
If m_bRawWithCups Then
|
||||
Dim dAng As Double = -m_dRotation
|
||||
' ----------- INIZIO verifica di essere entro i limiti macchina -----------
|
||||
' Recupero il centro del grezzo
|
||||
Dim ptRawCen As Point3d
|
||||
EgtGetRawPartCenter(nRawId, ptRawCen)
|
||||
m_CurrProjPage.ClearMessage()
|
||||
VerifyReleasdAngleIsValid(dAng, ptRawCen)
|
||||
' ----------- FINE verifica di essere entro i limiti macchina -----------
|
||||
If EgtRotateRawPart(nRawId, Vector3d.Z_AX(), dAng) Then
|
||||
' Recupero il centro del grezzo
|
||||
Dim ptRawCen As Point3d
|
||||
EgtGetRawPartCenter(nRawId, ptRawCen)
|
||||
'' Recupero il centro del grezzo
|
||||
'Dim ptRawCen As Point3d
|
||||
'EgtGetRawPartCenter(nRawId, ptRawCen)
|
||||
' Eseguo la rotazione della ventosa
|
||||
EgtRotate(GetVacuumId(), ptRawCen, Vector3d.Z_AX(), dAng, GDB_RT.GLOB)
|
||||
' Memorizzo
|
||||
AddRawMoveData(nRawId, dAng, m_RawMoveDataList)
|
||||
Else
|
||||
VacuumCups.ptStartPointLift.Rotate(ptRawCen, Vector3d.Z_AX(), dAng)
|
||||
VacuumCups.dDegRotStartAng -= dAng
|
||||
End If
|
||||
Else
|
||||
m_CurrProjPage.SetWarningMessage(EgtMsg(MSG_MOVERAWPAGEUC + 2)) 'Pezzo troppo piccolo : non si può muovere
|
||||
@@ -419,6 +700,44 @@ Public Class MoveRawPartPage
|
||||
EgtDraw()
|
||||
End Sub
|
||||
|
||||
#End Region ' Rotate CounterClockWise/ClockWise
|
||||
|
||||
' verifica che la rotazione da raggiungere sia nei limiti delle corse
|
||||
Private Function VerifyReleasdAngleIsValid(ByRef dAngDeg As Double, ByVal ptCenter As Point3d) As Boolean
|
||||
Dim bOk As Boolean = True
|
||||
' determino il punto finale dello spostamento
|
||||
Dim ptEndPointLift As Point3d = VacuumCups.ptStartPointLift
|
||||
Dim dDegRotEndAng As Double = VacuumCups.dDegRotStartAng + dAngDeg
|
||||
ptEndPointLift.Rotate(ptCenter, Vector3d.Z_AX(), dAngDeg)
|
||||
Dim sInfo As String = String.Empty
|
||||
Select Case VacuumCups.VerifyOutOfStrokes(ptEndPointLift, dDegRotEndAng)
|
||||
Case 16
|
||||
' extra corsa sulla c-
|
||||
EgtGetOutstrokeInfo(sInfo)
|
||||
m_CurrProjPage.SetWarningMessage(EgtMsg(MSG_SIMULATIONPAGEUC + 2) & " " & sInfo) 'Extracorsa ...
|
||||
ptEndPointLift.Rotate(ptCenter, Vector3d.Z_AX(), -dAngDeg)
|
||||
dDegRotEndAng -= dAngDeg
|
||||
dAngDeg += VacuumCups.GetExtraStrokeValue(sInfo) + EPS_SMALL
|
||||
dDegRotEndAng += dAngDeg
|
||||
ptEndPointLift.Rotate(ptCenter, Vector3d.Z_AX(), dAngDeg)
|
||||
bOk = False
|
||||
Case 34
|
||||
' extra corsa sulla c+
|
||||
EgtGetOutstrokeInfo(sInfo)
|
||||
m_CurrProjPage.SetWarningMessage(EgtMsg(MSG_SIMULATIONPAGEUC + 2) & " " & sInfo) 'Extracorsa ...
|
||||
ptEndPointLift.Rotate(ptCenter, Vector3d.Z_AX(), -dAngDeg)
|
||||
dDegRotEndAng -= dAngDeg
|
||||
dAngDeg -= VacuumCups.GetExtraStrokeValue(sInfo) + EPS_SMALL
|
||||
dDegRotEndAng += dAngDeg
|
||||
ptEndPointLift.Rotate(ptCenter, Vector3d.Z_AX(), dAngDeg)
|
||||
bOk = False
|
||||
End Select
|
||||
' il movimento del pezzo è accettabile, aggiorno le posizione per la verifica dello step successivo
|
||||
VacuumCups.ptStartPointLift = ptEndPointLift
|
||||
VacuumCups.dDegRotStartAng = dDegRotEndAng
|
||||
Return bOk
|
||||
End Function
|
||||
|
||||
Private Sub RemovePartBtn_Click(sender As Object, e As RoutedEventArgs) Handles RemovePartBtn.Click
|
||||
Dim nRawId As Integer = EgtGetFirstSelectedObj()
|
||||
While nRawId <> GDB_ID.NULL
|
||||
@@ -438,6 +757,29 @@ Public Class MoveRawPartPage
|
||||
EgtDraw()
|
||||
End Sub
|
||||
|
||||
Private Sub ScrapsBtn_Click(Sender As Object, e As RoutedEventArgs) Handles ScrapsBtn.Click
|
||||
Dim nRawId As Integer = EgtGetFirstSelectedObj()
|
||||
While nRawId <> GDB_ID.NULL
|
||||
' verifico che il grezzo non contenga dei pezzi (altrimenti non risulta selezionabile)
|
||||
Dim nPartInRaw As Integer = EgtGetFirstPartInRawPart(nRawId)
|
||||
If nPartInRaw = GDB_ID.NULL Then
|
||||
If Not VerifyIsNewScrap(nRawId) Then
|
||||
EgtSetInfo(nRawId, K_ISNEWSCRAPS, "1")
|
||||
Else
|
||||
EgtRemoveInfo(nRawId, K_ISNEWSCRAPS)
|
||||
End If
|
||||
' aggiorno il contenuto del bottone
|
||||
VerifyIsNewScrap(nRawId)
|
||||
Else
|
||||
' coumico che il grezzo contiene un pezzo e quindi non può essere definito come grezzo
|
||||
m_CurrProjPage.ClearMessage()
|
||||
m_CurrProjPage.SetErrorMessage("Part inside raw!")
|
||||
End If
|
||||
' passo al grezzo succesivo (NON dovrebbero esserci altri grezzi selezionabili contemporaneamente!)
|
||||
nRawId = EgtGetNextSelectedObj()
|
||||
End While
|
||||
End Sub
|
||||
|
||||
Private Sub StepMoveTxBx_EgtClosed(sender As Object, e As EventArgs) Handles StepMoveTxBx.EgtClosed
|
||||
Dim dStep As Double
|
||||
If StringToLen(StepMoveTxBx.Text, dStep) Then
|
||||
@@ -500,9 +842,12 @@ Public Class MoveRawPartPage
|
||||
|
||||
' ricavo l'angolo di posizionamento del grezzo/pezzo sulla tavola
|
||||
If Not DispositionRawOnTable(nRawId, dAngRaw, AngRotList) Then Return
|
||||
Dim bb3dRaw As New BBox3d
|
||||
EgtGetRawPartBBox(nRawId, bb3dRaw)
|
||||
Dim ForceToRotate As Boolean = bb3dRaw.DimX < bb3dRaw.DimY
|
||||
|
||||
' provo a verificare di poter depositare il pezzo (senza applicare delle rotazioni)
|
||||
If Not EgtMoveToCornerRawPart(nRawId, ptRef, nCorn) Then
|
||||
If Not EgtMoveToCornerRawPart(nRawId, ptRef, nCorn) Or ForceToRotate Then
|
||||
' se sono impostati degli step di rotazione
|
||||
If AngRotList.Count > 0 Then
|
||||
Dim bOkRotate As Boolean = False
|
||||
@@ -522,6 +867,16 @@ Public Class MoveRawPartPage
|
||||
Next
|
||||
If Not bOkRotate Then Return
|
||||
Else
|
||||
' sposto il pezzo in centro tavola → perchè tutti i movimenti sono fatti ruotando il pezzo in centro tavola!
|
||||
Dim b3Area As New BBox3d
|
||||
EgtGetTableArea(1, b3Area)
|
||||
Dim b3RawTemp As New BBox3d
|
||||
EgtGetRawPartBBox(nRawId, b3RawTemp)
|
||||
' ricavo il riferimento dell'angolo in basso a sinstra del grezzo rispetto alla tavola
|
||||
Dim ptCorner As Point3d = New Point3d(b3Area.DimX / 2, b3Area.DimY / 2, 0) - New Vector3d(b3RawTemp.DimX / 2, b3RawTemp.DimY / 2, 0)
|
||||
' sposto il pezzo in questa posizione
|
||||
EgtMoveToCornerRawPart(nRawId, ptCorner, MCH_CR.BL)
|
||||
' riprovo il movimento
|
||||
If EgtRotateRawPart(nRawId, Vector3d.Z_AX(), -dAngRaw) Then
|
||||
If Not EgtMoveToCornerRawPart(nRawId, ptRef, nCorn) Then
|
||||
' riposiziono il pezzo come era prima
|
||||
@@ -636,6 +991,64 @@ Public Class MoveRawPartPage
|
||||
Return True
|
||||
End Function
|
||||
|
||||
Private Sub PauseBtn_Click(sender As Object, e As RoutedEventArgs) Handles PauseBtn.Click
|
||||
' verifico che ci sia almeno un elemto selezionato (dati di aggancio pezzo)
|
||||
If m_RawMoveDataList.Count = 0 Then Return
|
||||
' verifico che sia stato inseito almeno uno spostamento, altrimenti lo rimuovo
|
||||
Dim Index As Integer = 0
|
||||
For Index = m_RawMoveDataList.Count - 1 To 0 Step -1
|
||||
If Math.Abs(m_RawMoveDataList(Index).m_vtRawMove.x) < EPS_SMALL AndAlso Math.Abs(m_RawMoveDataList(Index).m_vtRawMove.y) < EPS_SMALL Then
|
||||
m_RawMoveDataList.RemoveAt(Index)
|
||||
End If
|
||||
Next
|
||||
' verifico che la lista non sia vuota
|
||||
If m_RawMoveDataList.Count = 0 Then Return
|
||||
|
||||
' recupero disposizione fase corrente
|
||||
Dim nDispId As Integer = EgtGetPhaseDisposition(m_nCurrPhase)
|
||||
' imposto la pausa nella disposizione corrente
|
||||
SetPause(nDispId)
|
||||
' aggiungo al gruppo disposizione dei sottogruppi con i dati di movimento dei grezzi spostati
|
||||
SaveMoveInfoInDisposition(nDispId, m_RawMoveDataList)
|
||||
' imposto eventuale movimento pezzi su tavola ausiliaria
|
||||
SaveMovePartsOnAuxTable(nDispId, m_SplitPage.m_bOnAuxTab)
|
||||
'' Eseguo calcolo speciale dei movimenti: per tavola multicut
|
||||
'SpecialApplyDisposition(nDispId, True, Not m_SplitPage.m_bOnAuxTab)
|
||||
|
||||
' Creo nuova fase
|
||||
Dim nNewPhase As Integer = EgtAddPhase()
|
||||
|
||||
' Eseguo eventuali spezzature dei grezzi e vi sposto i pezzi (i grezzi devono essere sempre copiati per Registrazione con rotazione)
|
||||
Dim nRawId As Integer = EgtGetFirstRawPart()
|
||||
While nRawId <> GDB_ID.NULL
|
||||
' se il grezzo è presente nella fase precedente e non è quello selezionato allora procedo a creare una copia nella nuova fase
|
||||
If EgtVerifyRawPartPhase(nRawId, nNewPhase - 1) Then
|
||||
Dim bKeepRawPart As Boolean = True
|
||||
For Each RawOnAuxTabData As RawMoveData In m_RawMoveDataList
|
||||
If nRawId = RawOnAuxTabData.m_nId Then
|
||||
bKeepRawPart = False
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
If bKeepRawPart Then EgtKeepRawPart(nRawId, nNewPhase - 1)
|
||||
End If
|
||||
' passo al successivo grezzo
|
||||
nRawId = EgtGetNextRawPart(nRawId)
|
||||
End While
|
||||
|
||||
Dim nCurrDisposition As Integer = EgtGetPhaseDisposition(nNewPhase)
|
||||
'SetPause(nCurrDisposition)
|
||||
m_nCurrDisposition = nCurrDisposition
|
||||
' EgtSetStatus(nRawIdSlected, GDB_ST.OFF)
|
||||
EgtSetStatus(GetVacuumId(), GDB_ST.OFF)
|
||||
EgtSetCurrPhase(nNewPhase)
|
||||
SetAuxTabInCurrDisposition()
|
||||
' ripulisco la lista degli spostamenti
|
||||
m_RawMoveDataList.Clear()
|
||||
' aggiorno la fase corrente
|
||||
m_nCurrPhase = EgtGetCurrPhase()
|
||||
End Sub
|
||||
|
||||
Private Sub ResetBtn_Click(sender As Object, e As RoutedEventArgs) Handles ResetBtn.Click
|
||||
' Recupero il primo grezzo selezionato
|
||||
Dim nRawId As Integer = EgtGetFirstSelectedObj()
|
||||
@@ -656,17 +1069,75 @@ Public Class MoveRawPartPage
|
||||
End Sub
|
||||
|
||||
Private Sub PrevBtn_Click(sender As Object, e As RoutedEventArgs) Handles PrevBtn.Click
|
||||
' verifico che il pezzo sia depositabile
|
||||
If VerifyCollisionWithOtherRawPart(m_CurrRawOnVacuum) Then
|
||||
' mantengo la selezione del pezzo
|
||||
EgtSetStatus(m_CurrRawOnVacuum, GDB_ST.SEL)
|
||||
m_CurrProjPage.SetErrorMessage("Collisione pezzi")
|
||||
EgtDraw()
|
||||
' non cambio pagina
|
||||
Return
|
||||
End If
|
||||
' resetto l'inidice del pezzo da mnovimentare
|
||||
m_CurrRawOnVacuum = GDB_ID.NULL
|
||||
' Deseleziono tutto
|
||||
EgtDeselectAll()
|
||||
' Torno alla fase precedente
|
||||
m_bPrev = True
|
||||
' Passo alla pagina delle spezzature
|
||||
' Passo alla pagina delle spezzature solo se non esiste prima una fased di deposito sulla tavola di scarico
|
||||
|
||||
Dim nPrevDispId As Integer = EgtGetPrevOperation(m_nCurrDisposition)
|
||||
' verifico se la fasa precedente è di tipo scarico
|
||||
If IsDispUnloadOnAuxTab(nPrevDispId) <> 0 Then
|
||||
EgtSetCurrPhase(m_nCurrPhase - 1)
|
||||
m_nCurrDisposition = nPrevDispId
|
||||
m_nCurrPhase -= 1
|
||||
m_bPrev = False
|
||||
m_SplitPage.m_bShow = True
|
||||
EgtDraw()
|
||||
Return
|
||||
End If
|
||||
|
||||
'If EgtGetOperationType(EgtGetPrevOperation(m_nCurrDisposition)) = MCH_OY.DISP AndAlso m_SplitPage.m_bOnAuxTab Then
|
||||
' EgtSetCurrPhase(m_nCurrPhase - 1)
|
||||
' m_nCurrDisposition = EgtGetPrevOperation(m_nCurrDisposition)
|
||||
' m_nCurrPhase -= 1
|
||||
' m_bPrev = False
|
||||
' m_SplitPage.m_bShow = True
|
||||
' EgtDraw()
|
||||
' Return
|
||||
'End If
|
||||
|
||||
m_MainWindow.m_CadCutPageUC.CadCutPageGrid.Children.Remove(Me)
|
||||
m_MainWindow.m_CadCutPageUC.CadCutPageGrid.Children.Add(m_SplitPage)
|
||||
m_MainWindow.m_CadCutPageUC.m_CadCutMode = CadCutPageUC.CadCutModes.Split
|
||||
End Sub
|
||||
|
||||
Private Sub NextBtn_Click(sender As Object, e As RoutedEventArgs) Handles NextBtn.Click
|
||||
' verifico che il pezzo sia depositabile
|
||||
If VerifyCollisionWithOtherRawPart(m_CurrRawOnVacuum) Then
|
||||
' mantengo la selezione del pezzo
|
||||
EgtSetStatus(m_CurrRawOnVacuum, GDB_ST.SEL)
|
||||
m_CurrProjPage.SetErrorMessage("Collisione pezzi")
|
||||
EgtDraw()
|
||||
' non cambio pagina
|
||||
Return
|
||||
End If
|
||||
|
||||
' se la disposizione corrente è sulla tavola ausiliaria allora lo sarà anche quella successiva
|
||||
If IsDispUnloadOnAuxTab(m_nCurrDisposition) <> 0 Then
|
||||
EgtSetCurrPhase(m_nCurrPhase + 1)
|
||||
m_nCurrDisposition = EgtGetNextOperation(m_nCurrDisposition)
|
||||
m_nCurrPhase += 1
|
||||
m_bToNext = False
|
||||
m_SplitPage.m_bShow = True
|
||||
EgtDraw()
|
||||
EnableButtons()
|
||||
Return
|
||||
End If
|
||||
|
||||
' resetto l'inidice del pezzo da mnovimentare
|
||||
m_CurrRawOnVacuum = GDB_ID.NULL
|
||||
' Deseleziono tutto
|
||||
EgtDeselectAll()
|
||||
' Passo alla pagina delle spezzature
|
||||
@@ -710,6 +1181,26 @@ Public Class MoveRawPartPage
|
||||
EnableButtons()
|
||||
End Sub
|
||||
|
||||
' verifica se la disposizione indicata è uno scarico sulla tavola ausiliaria
|
||||
Public Function IsDispUnloadOnAuxTab(nCurrDispId As Integer) As Integer
|
||||
' verifico se la fase precedente è uno scarico su tavola ausiliaria
|
||||
Dim bVal As Integer = 0
|
||||
EgtGetInfo(nCurrDispId, "Pat", bVal)
|
||||
Return bVal
|
||||
End Function
|
||||
|
||||
' recupero la prima disposizione disponibile tra l'elenco delle operazioni presenti
|
||||
Public Function GetNextDisposition(nCurrDisposId As Integer) As Integer
|
||||
Dim nDispId As Integer = nCurrDisposId
|
||||
While nDispId <> GDB_ID.NULL
|
||||
If EgtGetOperationType(nDispId) = MCH_OY.DISP Then
|
||||
Return nDispId
|
||||
End If
|
||||
nDispId = EgtGetNextOperation(nDispId)
|
||||
End While
|
||||
Return GDB_ID.NULL
|
||||
End Function
|
||||
|
||||
Private Sub EnableButtons()
|
||||
UpBtn.IsEnabled = Not m_SplitPage.m_bShow
|
||||
LeftBtn.IsEnabled = Not m_SplitPage.m_bShow
|
||||
@@ -724,11 +1215,22 @@ Public Class MoveRawPartPage
|
||||
TopRBtn.IsEnabled = Not m_SplitPage.m_bShow
|
||||
BottomLBtn.IsEnabled = Not m_SplitPage.m_bShow
|
||||
BottomRBtn.IsEnabled = Not m_SplitPage.m_bShow
|
||||
PauseBtn.IsEnabled = Not m_SplitPage.m_bShow
|
||||
ResetBtn.IsEnabled = Not m_SplitPage.m_bShow
|
||||
NextBtn.IsEnabled = Not m_SplitPage.m_bOnAuxTab
|
||||
If m_SplitPage.m_bShow Then
|
||||
NextBtn.IsEnabled = (m_nCurrPhase < EgtGetPhaseCount())
|
||||
Else
|
||||
NextBtn.IsEnabled = Not m_SplitPage.m_bOnAuxTab
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub MoveRawPartPage_Unloaded(sender As Object, e As EventArgs) Handles Me.Unloaded
|
||||
' verifico che la fase corrente non sia vuota
|
||||
Dim nLastDispId As Integer = EgtGetPhaseDisposition(m_nCurrPhase)
|
||||
If EgtIsOperationEmpty(nLastDispId) And m_SplitPage.m_bOnAuxTab And m_RawMoveDataList.Count = 0 Then
|
||||
EgtErase(nLastDispId)
|
||||
End If
|
||||
|
||||
' Se movimento con ventose
|
||||
If Not m_bByHand Then
|
||||
' nascondo le ventose
|
||||
@@ -744,11 +1246,11 @@ Public Class MoveRawPartPage
|
||||
' imposto eventuale presenza rimozioni manuali
|
||||
SaveRemoveByHandInDisposition(nDispId, m_bRemovedRaw)
|
||||
' imposto eventuale movimento pezzi su tavola ausiliaria
|
||||
SaveMovePartsOnAuxTable( nDispId, m_SplitPage.m_bOnAuxTab)
|
||||
SaveMovePartsOnAuxTable(nDispId, m_SplitPage.m_bOnAuxTab)
|
||||
' Eseguo calcolo speciale dei movimenti
|
||||
SpecialApplyDisposition(nDispId, True, Not m_SplitPage.m_bOnAuxTab)
|
||||
End If
|
||||
' se altrimenti movimento senza ventose perchè lama troppo grande
|
||||
' se altrimenti movimento senza ventose perchè lama troppo grande
|
||||
ElseIf GetVacuumType() > 0 Then
|
||||
' se non solo visualizzazione
|
||||
If Not m_SplitPage.m_bShow Then
|
||||
|
||||
+30
-10
@@ -99,18 +99,38 @@
|
||||
<Image Source="{DynamicResource ClockwiseRotateImg}" Width="65" Height="65" HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center" />
|
||||
</Button>
|
||||
|
||||
<UniformGrid Grid.Column="0" Grid.Row="5" Grid.ColumnSpan="3" Columns="2" >
|
||||
<Button Name="InsertPartBtn" Style="{DynamicResource OmagCut_YellowTextButton}" Padding="1"/>
|
||||
<Button Name="StorePartBtn" Style="{DynamicResource OmagCut_YellowTextButton}" Padding="1"/>
|
||||
</UniformGrid>
|
||||
|
||||
<Button Name="RemovePartBtn" Grid.ColumnSpan="3" Grid.Row="6"
|
||||
Style="{DynamicResource OmagCut_YellowTextButton}" Padding="1"/>
|
||||
<UniformGrid Name ="UG0" Grid.Column="0" Grid.Row="5" Grid.ColumnSpan="3" Columns="3" >
|
||||
<Button Name="InsertPartBtn" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource Inserisci-pezzoImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="StorePartBtn" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource Parcheggia-pezzoImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||
</Button>
|
||||
<ToggleButton Name="StartCurveWJBtn" Style="{DynamicResource OmagCut_YellowIconToggleButton}">
|
||||
<Image Source="{DynamicResource StartWJImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||
</ToggleButton>
|
||||
</UniformGrid>
|
||||
|
||||
<UniformGrid Name ="UG1" Grid.Column="0" Grid.Row="6" Grid.ColumnSpan="3" Columns="3" >
|
||||
<Button Name="RemovePartBtn" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource Elimina-pezzoImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||
</Button>
|
||||
<ToggleButton Name="DragRettanleBtn" Style="{DynamicResource OmagCut_YellowIconToggleButton}">
|
||||
<Image Source="{DynamicResource Drag_RettangleImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||
</ToggleButton>
|
||||
<ToggleButton Name="SplitCurveWJBtn" Style="{DynamicResource OmagCut_YellowIconToggleButton}">
|
||||
<Image Source="{DynamicResource SplitWJImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||
</ToggleButton>
|
||||
</UniformGrid>
|
||||
|
||||
<UniformGrid Grid.Column="0" Grid.Row="7" Grid.ColumnSpan="3" Columns="2" >
|
||||
<Button Name="SelectAllBtn" Style="{DynamicResource OmagCut_YellowTextButton}" Padding="1"/>
|
||||
<Button Name="DeselectAllBtn" Style="{DynamicResource OmagCut_YellowTextButton}" Padding="1"/>
|
||||
<UniformGrid Grid.Column="0" Grid.Row="7" Grid.ColumnSpan="3" Columns="2" >
|
||||
<Button Name="SelectAllBtn" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource Seleziona-tuttoImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="DeselectAllBtn" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource Deseleziona-tuttoImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||
</Button>
|
||||
</UniformGrid>
|
||||
|
||||
</Grid>
|
||||
|
||||
+1390
-127
File diff suppressed because it is too large
Load Diff
@@ -9,6 +9,7 @@ Public Class OpenFileWD
|
||||
Private m_sCurrFile As String = String.Empty
|
||||
Private m_sExt As String = String.Empty
|
||||
Private m_sExt2 As String = String.Empty
|
||||
Private n_sDeniedFiles As New List(Of String)
|
||||
|
||||
Private m_OpenItemList As New ObservableCollection(Of IconListBoxItem)
|
||||
|
||||
@@ -27,6 +28,15 @@ Public Class OpenFileWD
|
||||
InitializeComponent()
|
||||
End Sub
|
||||
|
||||
Sub New(Owner As Window, sDir As String, sExt As String, sExt2 As String, DeniedFiles As List(Of String))
|
||||
Me.Owner = Owner
|
||||
m_sCurrDir = sDir
|
||||
m_sExt = sExt
|
||||
m_sExt2 = sExt2
|
||||
n_sDeniedFiles = DeniedFiles
|
||||
InitializeComponent()
|
||||
End Sub
|
||||
|
||||
Private Sub OpenFile_Initialized(sender As Object, e As EventArgs) Handles Me.Initialized
|
||||
' Posizione finestra
|
||||
Me.Top = Owner.Top + Owner.Height / 2 - Me.Height / 2
|
||||
@@ -71,13 +81,20 @@ Public Class OpenFileWD
|
||||
Dim FileI As FileInfo
|
||||
For Each FileI In vFileI
|
||||
Dim sExt As String = Path.GetExtension(FileI.Name).ToUpper()
|
||||
If String.Compare(sExt, m_sExt, True) = 0 Or
|
||||
String.Compare(sExt, m_sExt2, True) = 0 Then
|
||||
Dim sFileName As String = Path.GetFileNameWithoutExtension(FileI.Name).ToUpper.Trim
|
||||
Dim bDenied As Boolean = False
|
||||
For Each ItemFile As String In n_sDeniedFiles
|
||||
If ItemFile.ToUpper.Trim = sFileName Then
|
||||
bDenied = True
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
If (String.Compare(sExt, m_sExt, True) = 0 Or String.Compare(sExt, m_sExt2, True) = 0) And Not bDenied Then
|
||||
m_OpenItemList.Add(New IconListBoxItem(FileI.Name, 3))
|
||||
End If
|
||||
Next
|
||||
' riporto visualizzazione in cima alla lista (esiste sempre almeno un elemento)
|
||||
FileListBox.ScrollIntoView(m_OpenItemList(0))
|
||||
' riporto visualizzazione in cima alla lista (esiste sempre almeno un elemento)
|
||||
FileListBox.ScrollIntoView(m_OpenItemList(0))
|
||||
Return True
|
||||
End Function
|
||||
|
||||
|
||||
@@ -0,0 +1,72 @@
|
||||
<Window x:Class="SelectPartFromFamilyWD"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
|
||||
FontFamily="{DynamicResource OmagCut_Font}"
|
||||
ResizeMode="NoResize" WindowStyle="None" AllowsTransparency="True" Background="Transparent"
|
||||
Title="SaveNameWD" Height="200" Width="400" ShowInTaskbar="False">
|
||||
<!--Definizione della pagina di scelta del nome con cui salvare il progetto-->
|
||||
<Border Style="{DynamicResource OmagCut_Border}">
|
||||
<Grid x:Name="SaveNameGrid">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
<ColumnDefinition Width="4*"/>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="0.1*"/>
|
||||
<RowDefinition Height="0.3*"/>
|
||||
<RowDefinition Height="0.2*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="0.2*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="0.2*"/>
|
||||
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<!--Messaggio: Seleziona il numero di pezzi-->
|
||||
<TextBlock Name="TitleWDTxbl" Grid.Column="1" Grid.Row="1"
|
||||
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||
|
||||
<UniformGrid Grid.Column="1" Grid.Row="3" VerticalAlignment="Center" Columns="2">
|
||||
<TextBlock Name="NbrOfPartsMsg"
|
||||
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="NbrOfParts"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
</UniformGrid>
|
||||
|
||||
<Grid Name="ButtonsGrid" Grid.Column="1" Grid.Row="5" Grid.RowSpan="1">
|
||||
<Grid.ColumnDefinitions>
|
||||
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<!--ultimo progetto-->
|
||||
<Button Name="ConfirmSelection" Grid.Column="1" Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}"
|
||||
ToolTip="Confirm">
|
||||
<Image Source="{DynamicResource VImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
<!--nuovo progetto-->
|
||||
<Button Name="SelectAllPart" Grid.Column="2" Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}"
|
||||
ToolTip="Select all" Visibility="Collapsed">
|
||||
<Image Source="{DynamicResource NuovoImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
<!--apri folder progetti-->
|
||||
<Button Name="CancelSelection" Grid.Column="5" Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}"
|
||||
ToolTip="Cancel">
|
||||
<Image Source="{DynamicResource XImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
|
||||
</Grid>
|
||||
|
||||
</Grid>
|
||||
|
||||
</Border>
|
||||
</Window>
|
||||
@@ -0,0 +1,66 @@
|
||||
Public Class SelectPartFromFamilyWD
|
||||
Private m_MainWindow As MainWindow = DirectCast(Application.Current.MainWindow, MainWindow)
|
||||
|
||||
Private m_NumberOfParts As Integer = 1
|
||||
Public Property NumberOfParts As Integer
|
||||
Get
|
||||
Return m_NumberOfParts
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
m_NumberOfParts = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_NumberOfSelection As Integer = 1
|
||||
Public Property NumberOfSelection As Integer
|
||||
Get
|
||||
Return m_NumberOfSelection
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
m_NumberOfSelection = value
|
||||
End Set
|
||||
End Property
|
||||
Public Sub New(Owner As Window, NbrParts As Integer)
|
||||
Me.Owner = Owner
|
||||
m_NumberOfParts = NbrParts
|
||||
InitializeComponent()
|
||||
Me.ShowDialog()
|
||||
End Sub
|
||||
|
||||
' inizializzo la finestra
|
||||
Private Sub SelectPartFromFamilyWD_Initialized(sender As Object, e As EventArgs) Handles Me.Initialized
|
||||
' posiziono la fistra in centro alla pagina
|
||||
Me.Top = Owner.Top + Owner.Height / 2 - Me.Height / 2
|
||||
Me.Left = Owner.Left + Owner.Width / 2 - Me.Width / 2
|
||||
|
||||
TitleWDTxbl.Text = "Selection parts"
|
||||
NbrOfPartsMsg.Text = "Number of parts"
|
||||
NbrOfParts.Text = m_NumberOfParts.ToString
|
||||
End Sub
|
||||
|
||||
' seleziono il numero di elementi indicati
|
||||
Private Sub ConfirmSelection_Click(sender As Object, e As RoutedEventArgs) Handles ConfirmSelection.Click
|
||||
Dim nVal As Integer = 0
|
||||
StringToInt(NbrOfParts.Text, nVal)
|
||||
If nVal >= 0 Then
|
||||
m_NumberOfSelection = nVal
|
||||
Else
|
||||
' indice non valido per la selezione
|
||||
m_NumberOfSelection = 0
|
||||
End If
|
||||
Me.Close()
|
||||
End Sub
|
||||
|
||||
'' seleziona tutti
|
||||
'Private Sub SelectAllPart_Click(sender As Object, e As RoutedEventArgs) Handles SelectAllPart.Click
|
||||
' m_NumberOfSelection = m_NumberOfParts
|
||||
' Me.Close()
|
||||
'End Sub
|
||||
|
||||
' Deseleziomo tutto
|
||||
Private Sub CancelSelection_Click(sender As Object, e As RoutedEventArgs) Handles CancelSelection.Click
|
||||
m_NumberOfSelection = 0
|
||||
Me.Close()
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
+81
-12
@@ -5,6 +5,11 @@ Public Module SplitAuto
|
||||
Private m_MainWindow As MainWindow = DirectCast(Application.Current.MainWindow, MainWindow)
|
||||
|
||||
Private m_dLastDT As Double = 0
|
||||
Public ReadOnly Property dLastDT As Double
|
||||
Get
|
||||
Return m_dLastDT
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'-----------------------------------------------------------------------------------------------
|
||||
Friend Class SplitMach
|
||||
@@ -161,6 +166,17 @@ Public Module SplitAuto
|
||||
End Function
|
||||
|
||||
'-----------------------------------------------------------------------------------------------
|
||||
' calcolo il numero di tipi di lavorazioni
|
||||
Friend Sub CountMachiningType(MachSplit As SplitMach, ByRef nCountSawing As Integer, ByRef nCountWaterjetting As Integer, ByRef nCountOtherMachining As Integer)
|
||||
If MachSplit.m_nType = MCH_OY.SAWING Then
|
||||
nCountSawing += 1
|
||||
ElseIf MachSplit.m_nType = MCH_OY.WATERJETTING Then
|
||||
nCountWaterjetting += 1
|
||||
Else
|
||||
nCountOtherMachining += 1
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Friend Sub ColorMachining(MachSplit As SplitMach, Optional bReset As Boolean = False)
|
||||
EgtDisableModified()
|
||||
' Assegno stato
|
||||
@@ -347,6 +363,13 @@ Public Module SplitAuto
|
||||
vNewRaws.Add(nNewRawId)
|
||||
nNewRawId = EgtGetNextRawPart(nNewRawId)
|
||||
End While
|
||||
Else
|
||||
' verifico che nella fase precedente è stato definito come sfrido, allora lo riassegno
|
||||
Dim nVal As Integer = 0
|
||||
EgtGetInfo(nRawId, K_ISNEWSCRAPS, nVal)
|
||||
If nVal = 1 Or nVal = 2 Or nVal = 3 Then
|
||||
EgtSetInfo(nRaw1Id, K_ISNEWSCRAPS, "3")
|
||||
End If
|
||||
End If
|
||||
' Assegno ai nuovi grezzi eventuale texture del grezzo originale
|
||||
Dim nSolidId = EgtGetFirstNameInGroup(nRawId, NAME_RAW_SOLID)
|
||||
@@ -737,35 +760,55 @@ Public Module SplitAuto
|
||||
End Function
|
||||
|
||||
Private Function SafeMoveRawPart(nRawId As Integer, ByRef vtMove As Vector3d, dMindist As Double) As Boolean
|
||||
' Spostamento originale
|
||||
Dim vtOriMove As New Vector3d( vtMove)
|
||||
' Livello di movimento
|
||||
Dim nMoveLevel As Integer = GetPrivateProfileInt( S_SPLIT, K_MOVE_LEV, 5, m_MainWindow.GetIniFile())
|
||||
Dim nMove As Integer = 1
|
||||
' Se esce dalla tavola, movimento già annullato ed esco con errore
|
||||
If Not EgtMoveRawPart(nRawId, vtMove) Then Return False
|
||||
If Not EgtMoveRawPart(nRawId, vtOriMove) Then Return False
|
||||
' Se interferisce con altri grezzi, annullo movimento ed esco con errore
|
||||
If Not VerifyRawWithOtherRaws(nRawId, dMindist) Then
|
||||
EgtMoveRawPart(nRawId, -vtMove)
|
||||
EgtMoveRawPart(nRawId, -vtOriMove)
|
||||
Return False
|
||||
End If
|
||||
If nMoveLevel < 2 Then Return True
|
||||
' Provo ad aggiungere un altro movimento
|
||||
If EgtMoveRawPart(nRawId, vtMove) Then
|
||||
If EgtMoveRawPart(nRawId, vtOriMove) Then
|
||||
If VerifyRawWithOtherRaws(nRawId, dMindist) Then
|
||||
vtMove += vtMove
|
||||
vtMove += vtOriMove
|
||||
nMove += 1
|
||||
If nMoveLevel = nMove Then Return True
|
||||
Else
|
||||
EgtMoveRawPart(nRawId, -vtMove)
|
||||
EgtMoveRawPart(nRawId, -vtOriMove)
|
||||
End If
|
||||
End If
|
||||
' Provo ad aggiungere un altro movimento
|
||||
If EgtMoveRawPart(nRawId, vtOriMove) Then
|
||||
If VerifyRawWithOtherRaws(nRawId, dMindist) Then
|
||||
vtMove += vtOriMove
|
||||
nMove += 1
|
||||
If nMoveLevel = nMove Then Return True
|
||||
Else
|
||||
EgtMoveRawPart(nRawId, -vtOriMove)
|
||||
End If
|
||||
End If
|
||||
' Provo ad aggiungere un movimento dimezzato
|
||||
If EgtMoveRawPart(nRawId, 0.5 * vtMove) Then
|
||||
If EgtMoveRawPart(nRawId, 0.5 * vtOriMove) Then
|
||||
If VerifyRawWithOtherRaws(nRawId, dMindist) Then
|
||||
vtMove += 0.5 * vtMove
|
||||
vtMove += 0.5 * vtOriMove
|
||||
nMove += 1
|
||||
If nMoveLevel = nMove Then return True
|
||||
Else
|
||||
EgtMoveRawPart(nRawId, -0.5 * vtMove)
|
||||
EgtMoveRawPart(nRawId, -0.5 * vtOriMove)
|
||||
End If
|
||||
End If
|
||||
' Provo ad aggiunger un movimento 1/4
|
||||
If EgtMoveRawPart(nRawId, 0.25 * vtMove) Then
|
||||
' Provo ad aggiungere un movimento 1/4
|
||||
If EgtMoveRawPart(nRawId, 0.25 * vtOriMove) Then
|
||||
If VerifyRawWithOtherRaws(nRawId, dMindist) Then
|
||||
vtMove += 0.25 * vtMove
|
||||
vtMove += 0.25 * vtOriMove
|
||||
Else
|
||||
EgtMoveRawPart(nRawId, -0.25 * vtMove)
|
||||
EgtMoveRawPart(nRawId, -0.25 * vtOriMove)
|
||||
End If
|
||||
End If
|
||||
Return True
|
||||
@@ -817,4 +860,30 @@ Public Module SplitAuto
|
||||
Return (Not bInterf)
|
||||
End Function
|
||||
|
||||
Public Function MaxCuttingMustache(dMustache As Double) As Double
|
||||
Dim MachSplitList As New List(Of SplitMach)
|
||||
' Recupero l'indice della fase corrente
|
||||
Dim nCurrPhase As Integer = EgtGetCurrPhase()
|
||||
' se non è stata creata nessuna lista allora restituisco il valore di Default
|
||||
If Not CalculateSplitMachList(nCurrPhase, MachSplitList) Then Return dMustache
|
||||
Dim NewMustache As Double = 0
|
||||
Dim ItemMachSplit As SplitMach
|
||||
For Each ItemMachSplit In MachSplitList
|
||||
' Recupero lunghezza baffo secondo taglio
|
||||
Dim nPvId As Integer = GDB_ID.NULL
|
||||
EgtGetInfo(EgtGetFirstNameInGroup(ItemMachSplit.m_nId, NAME_PREVIEW), INFO_PV_ONPART_ID, nPvId)
|
||||
Dim dDT As Double
|
||||
If EgtGetInfo(EgtGetFirstGroupInGroup(nPvId), "DT", dDT) Then
|
||||
If NewMustache < dDT Then NewMustache = dDT
|
||||
End If
|
||||
Next
|
||||
Dim dExtraL As Double = 0
|
||||
EgtMdbGetGeneralParam(MCH_GP.EXTRALONCUTREG, dExtraL)
|
||||
' se esiste il valore di un baffo allora sovrascrivo il valore di default
|
||||
If NewMustache > 0 Then
|
||||
dMustache = Math.Ceiling(NewMustache)
|
||||
End If
|
||||
Return dMustache + dExtraL
|
||||
End Function
|
||||
|
||||
End Module
|
||||
+68
-21
@@ -48,8 +48,8 @@
|
||||
</Button>
|
||||
<Button Name="ModifyBtn" Grid.Column="2" Style="{DynamicResource OmagCut_YellowTextButton}"/>
|
||||
<Button Name="AutoBtn" Grid.Column="3" Style="{DynamicResource OmagCut_YellowTextButton}"/>
|
||||
<Button Name="RestartBtn" Grid.Column="3" Style="{DynamicResource OmagCut_YellowTextButton}" Visibility="Hidden"/>
|
||||
</Grid>
|
||||
<Button Name="RestartBtn" Grid.Column="3" Style="{DynamicResource OmagCut_YellowTextButton}" Visibility="Hidden"/>
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
||||
<!--Left Button Grid-->
|
||||
@@ -100,9 +100,15 @@
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Button Name="OnOffBtn" Grid.Column="0" Style="{DynamicResource OmagCut_YellowTextButton}" FontSize="{DynamicResource SplitPageBtn_FontSize}"/>
|
||||
<Button Name="AllOnBtn" Grid.Column="1" Style="{DynamicResource OmagCut_YellowTextButton}" FontSize="{DynamicResource SplitPageBtn_FontSize}"/>
|
||||
<Button Name="AllOffBtn" Grid.Column="2" Style="{DynamicResource OmagCut_YellowTextButton}" FontSize="{DynamicResource SplitPageBtn_FontSize}"/>
|
||||
<Button Name="OnOffBtn" Grid.Column="0" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource ON_OFF-singolo-taglioImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="AllOnBtn" Grid.Column="1" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource Tutti-ONImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="AllOffBtn" Grid.Column="2" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource Tutti-OFFImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||
</Button>
|
||||
|
||||
</Grid>
|
||||
|
||||
@@ -113,11 +119,28 @@
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Button Name="CutBtn" Grid.Column="0" Style="{DynamicResource OmagCut_YellowTextButton}" FontSize="{DynamicResource SplitPageBtn_FontSize}"/>
|
||||
<Button Name="CutStartBtn" Grid.Column="1" Style="{DynamicResource OmagCut_YellowTextButton}" FontSize="{DynamicResource SplitPageBtn_FontSize}"/>
|
||||
<Button Name="CutEndBtn" Grid.Column="2" Style="{DynamicResource OmagCut_YellowTextButton}" FontSize="{DynamicResource SplitPageBtn_FontSize}"/>
|
||||
<Button Name="CutBtn" Grid.Column="0" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource Allunga-AccorciaImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="CutStartBtn" Grid.Column="1" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource Inizio-Allunga-AccorciaImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||
</Button>
|
||||
|
||||
</Grid>
|
||||
<!-- solo per macchine con lavorazioni Waterjet -->
|
||||
<ToggleButton Name="BridgesWJBtn" Grid.Column="0" Style="{DynamicResource OmagCut_YellowIconToggleButton}">
|
||||
<Image Source="{DynamicResource PonticelliWJImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||
</ToggleButton>
|
||||
|
||||
<!-- solo per macchine con lavorazioni Waterjet -->
|
||||
<ToggleButton Name="BridgesDeleteWJBtn" Grid.Column="3" Style="{DynamicResource OmagCut_YellowIconToggleButton}">
|
||||
<Image Source="{DynamicResource PonticelliDeleteWJImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||
</ToggleButton>
|
||||
|
||||
<Button Name="CutEndBtn" Grid.Column="2" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource Fine-Allunga-AccorciaImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||
</Button>
|
||||
|
||||
</Grid>
|
||||
|
||||
</Grid>
|
||||
|
||||
@@ -139,18 +162,42 @@
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
|
||||
<Button Name="OutCenStartBtn" Grid.Column="0" Style="{DynamicResource OmagCut_YellowTextButton}" FontSize="{DynamicResource SplitPageBtn_FontSize}"/>
|
||||
<Button Name="OutCenEndBtn" Grid.Column="1" Style="{DynamicResource OmagCut_YellowTextButton}" FontSize="{DynamicResource SplitPageBtn_FontSize}"/>
|
||||
<Button Name="ModifStartBtn" Grid.Column="2" Style="{DynamicResource OmagCut_YellowTextButton}" FontSize="{DynamicResource SplitPageBtn_FontSize}"/>
|
||||
<Button Name="ModifEndBtn" Grid.Column="3" Style="{DynamicResource OmagCut_YellowTextButton}" FontSize="{DynamicResource SplitPageBtn_FontSize}"/>
|
||||
<Button Name="InvertBtn" Grid.Column="4" Style="{DynamicResource OmagCut_YellowTextButton}" FontSize="{DynamicResource SplitPageBtn_FontSize}"/>
|
||||
<Button Name="PauseBtn" Grid.Column="5" Style="{DynamicResource OmagCut_YellowTextButton}" FontSize="{DynamicResource SplitPageBtn_FontSize}"/>
|
||||
<Button Name="AllOutStartBtn" Grid.Column="6" Style="{DynamicResource OmagCut_YellowTextButton}" FontSize="{DynamicResource SplitPageBtn_FontSize}"/>
|
||||
<Button Name="AllCenStartBtn" Grid.Column="7" Style="{DynamicResource OmagCut_YellowTextButton}" FontSize="{DynamicResource SplitPageBtn_FontSize}"/>
|
||||
<Button Name="AllOutEndBtn" Grid.Column="8" Style="{DynamicResource OmagCut_YellowTextButton}" FontSize="{DynamicResource SplitPageBtn_FontSize}"/>
|
||||
<Button Name="AllCenEndBtn" Grid.Column="9" Style="{DynamicResource OmagCut_YellowTextButton}" FontSize="{DynamicResource SplitPageBtn_FontSize}"/>
|
||||
<Button Name="AllExtendBtn" Grid.Column="10" Style="{DynamicResource OmagCut_YellowTextButton}" FontSize="{DynamicResource SplitPageBtn_FontSize}"/>
|
||||
<Button Name="AllReduceBtn" Grid.Column="11" Style="{DynamicResource OmagCut_YellowTextButton}" FontSize="{DynamicResource SplitPageBtn_FontSize}"/>
|
||||
<Button Name="OutCenStartBtn" Grid.Column="0" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource Inizio-Centro-FuoriImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="OutCenEndBtn" Grid.Column="1" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource Fine-Centro-FuoriImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="ModifStartBtn" Grid.Column="2" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource Modifica-InizioImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="ModifEndBtn" Grid.Column="3" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource Modifica-FineImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="InvertBtn" Grid.Column="4" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource InvertiImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="PauseBtn" Grid.Column="5" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource Pausa-ON_OFFImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="AllOutStartBtn" Grid.Column="6" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource Inizio-tutti-fuoriImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="AllCenStartBtn" Grid.Column="7" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource Inizio-tutti-centroImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="AllOutEndBtn" Grid.Column="8" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource Fine-tutti-fuoriImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="AllCenEndBtn" Grid.Column="9" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource Fine-tutti-centroImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="AllExtendBtn" Grid.Column="10" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource Tutti-allungaImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="AllReduceBtn" Grid.Column="11" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource Tutti-accorciaImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||
</Button>
|
||||
|
||||
</Grid>
|
||||
|
||||
|
||||
+1015
-130
File diff suppressed because it is too large
Load Diff
+161
-4
@@ -1,4 +1,5 @@
|
||||
Imports EgtUILib
|
||||
Imports System.Text.RegularExpressions
|
||||
|
||||
Module VacuumCups
|
||||
' Tipo manipolatore con ventosa (0=assente, 1=dietro, 2=laterale)
|
||||
@@ -8,7 +9,24 @@ Module VacuumCups
|
||||
Private m_nVacId As Integer = GDB_ID.NULL
|
||||
Private m_nRefId As Integer = GDB_ID.NULL
|
||||
Private m_dPreferredRot As Double = 0
|
||||
Private m_dPrefVertRotXMinus As Double = 0
|
||||
Private m_dPrefVertRotXPlus As Double = 0
|
||||
Private m_dPrefVertRotYMinus As Double = 0
|
||||
Private m_dPrefVertRotYPlus As Double = 0
|
||||
Private m_dDripRefAng As Double = 0
|
||||
' dati carico massimo manipolatore
|
||||
Private m_RawDensity As Double = 2500
|
||||
Private m_RawWeight As Double = 0
|
||||
Private m_MaxWeightSinglePlugger As Double = 250
|
||||
Private m_MaxWeightDoublePlugger As Double = 750
|
||||
Public bOverWeight As Boolean = False
|
||||
' dati per rotazione ventose vicono al fine corsa Y e X
|
||||
Private bRotateVacuumNearExtraStrokeY As Boolean = False
|
||||
Private bRotateVacuumNearExtraStrokeX As Boolean = False
|
||||
' dati stroke
|
||||
Public bExtraStroke As Boolean = False
|
||||
Public ptStartPointLift As Point3d
|
||||
Public dDegRotStartAng As Double
|
||||
|
||||
' Nome del gruppo temporaneo per le ventose
|
||||
Private Const VACTMP_GRP As String = "VacTmp"
|
||||
@@ -48,6 +66,20 @@ Module VacuumCups
|
||||
Return m_nVacType
|
||||
End Function
|
||||
|
||||
' carico i dati macchina relativi al peso massimo movimentabile
|
||||
Friend Sub SetWeightInformation(Density As Double, MaxSingle As Double, MaxDouble As Double)
|
||||
m_RawDensity = Density
|
||||
m_MaxWeightSinglePlugger = MaxSingle
|
||||
m_MaxWeightDoublePlugger = MaxDouble
|
||||
End Sub
|
||||
|
||||
Friend Sub SetRotationForExtraStrokeY(Rotate As Boolean)
|
||||
bRotateVacuumNearExtraStrokeY = Rotate
|
||||
End Sub
|
||||
|
||||
Friend Sub SetRotationForExtraStrokeX(Rotate As Boolean)
|
||||
bRotateVacuumNearExtraStrokeX = Rotate
|
||||
End Sub
|
||||
Friend Function GetVacuumId() As Integer
|
||||
Return m_nVacId
|
||||
End Function
|
||||
@@ -64,6 +96,8 @@ Module VacuumCups
|
||||
' Identificativo riferimento della testa nella macchina
|
||||
Dim nT1Id As Integer = EgtGetFirstNameInGroup(EgtGetHeadId(VACUUM_HEAD), HEAD_FIRST_EXIT)
|
||||
If nT1Id = GDB_ID.NULL Then Return False
|
||||
' imposto la l'uscita della ventosa come fosse l'uscita di un utensile
|
||||
EgtSetCalcTool("", "H4", 1)
|
||||
' Creo gruppo temporaneo in cui copiarli
|
||||
m_nTempId = EgtCreateGroup(GDB_ID.ROOT)
|
||||
If m_nTempId = GDB_ID.NULL Then Return False
|
||||
@@ -74,6 +108,11 @@ Module VacuumCups
|
||||
If m_nVacId = GDB_ID.NULL Then Return False
|
||||
' Angolo di rotazione preferito
|
||||
EgtGetInfo( m_nVacId, KEY_VACLAY_PREFROT, m_dPreferredRot)
|
||||
' Angoli di rotazione preferiti per ventosa in verticale (lungo Y) a sinistra e a destra del centro tavola
|
||||
EgtGetInfo( m_nVacId, KEY_VACLAY_PREFVROTXMINUS, m_dPrefVertRotXMinus)
|
||||
EgtGetInfo(m_nVacId, KEY_VACLAY_PREFVROTXPLUS, m_dPrefVertRotXPlus)
|
||||
EgtGetInfo(m_nVacId, KEY_VACLAY_PREFVROTYMINUS, m_dPrefVertRotYMinus)
|
||||
EgtGetInfo(m_nVacId, KEY_VACLAY_PREFVROTYPLUS, m_dPrefVertRotYPlus)
|
||||
' Direzione di riferimento per tagli Drip
|
||||
EgtGetInfo( m_nVacId, KEY_VACLAY_DRIPREFDIR, m_dDripRefAng)
|
||||
' Nascondo il gruppo ma rendo visibili le curve di contorno delle ventose
|
||||
@@ -160,6 +199,18 @@ Module VacuumCups
|
||||
EgtGetBBoxGlob(nRKerfId, GDB_BB.STANDARD, b3Kerf)
|
||||
Dim ptKerfCen As Point3d
|
||||
EgtCentroid(nRKerfId, GDB_ID.ROOT, ptKerfCen)
|
||||
|
||||
'-------------------- INIZIO CALCOLO PESO --------------------
|
||||
' recupero l'area del grezzo da muovere
|
||||
Dim RawArea As Double = 0
|
||||
' superficie del grezzo senza considerare eventuali fori
|
||||
EgtSurfFrGrossArea(nRKerfId, RawArea)
|
||||
' volume calcolato in mmc
|
||||
Dim RawVolume As Double = RawArea * b3Raw.DimZ()
|
||||
' peso calolato in kg
|
||||
m_RawWeight = RawVolume * m_RawDensity / Math.Pow(10, 9)
|
||||
'-------------------- FINE CALCOLO PESO --------------------
|
||||
|
||||
' Eseguo ricerca
|
||||
If FindVacuumCupsOnRaw(nRawId, ptRawCen, b3Kerf, ptKerfCen, nKerfId, nRKerfId, rmData) Then
|
||||
Return True
|
||||
@@ -182,6 +233,7 @@ Module VacuumCups
|
||||
Return False
|
||||
End Function
|
||||
|
||||
' utilizzata per gestire la movimentazione dei pezzi per eseguire i drip
|
||||
Friend Function PutVacuumCupsOnPart(nPartId As Integer,
|
||||
ByRef rmData As RawMoveData, ByRef b3Part As BBox3d) As Boolean
|
||||
' Ripristino posizione originale ventose
|
||||
@@ -261,6 +313,7 @@ Module VacuumCups
|
||||
Dim sCups() As String = Nothing
|
||||
Dim sCups2() As String = Nothing
|
||||
If Not GetVacuumCupSelection(nI, sCups, sCups2) Then Return False
|
||||
bExtraStroke = False
|
||||
' Determino validità soluzioni della configurazione
|
||||
Dim vtMove As New Vector3d
|
||||
Dim ptRotCen As New Point3d
|
||||
@@ -289,6 +342,7 @@ Module VacuumCups
|
||||
Dim frCurrRef As New Frame3d
|
||||
EgtFrame(m_nRefId, GDB_ID.ROOT, frCurrRef)
|
||||
Dim vtDelta As Vector3d = frCurrRef.Orig() - ptRawCen
|
||||
|
||||
' Assegno dati noti al movimento del grezzo
|
||||
rmData.m_nId = nRawId
|
||||
rmData.m_vtRawMove = Vector3d.NULL()
|
||||
@@ -363,6 +417,26 @@ Module VacuumCups
|
||||
If b3Vac.IsEmpty() Then Return INFINITO
|
||||
' Se box maggiore di quello del pezzo, scarto soluzione
|
||||
If b3Vac.Radius() > b3Raw.Radius() Then Return INFINITO
|
||||
'-------------------- INIZIO VERIFICA PESO --------------------
|
||||
bOverWeight = False
|
||||
Select Case GetPluggerFromCameras(sCups)
|
||||
Case 2
|
||||
' se peso del grezzo oltre il limite consentito allora scarto la soluzione
|
||||
If m_RawWeight > m_MaxWeightDoublePlugger Then
|
||||
bOverWeight = True
|
||||
Return INFINITO
|
||||
End If
|
||||
Case 1
|
||||
' se peso del grezzo oltre il limite consentito allora scarto la soluzione
|
||||
If m_RawWeight > m_MaxWeightSinglePlugger Then
|
||||
bOverWeight = True
|
||||
Return INFINITO
|
||||
End If
|
||||
End Select
|
||||
'-------------------- FINE VERIFICA PESO --------------------
|
||||
' Recupero l'area della tavola
|
||||
Dim b3Tab As New BBox3d
|
||||
EgtGetTableArea(1, b3Tab)
|
||||
' Determino il movimento
|
||||
vtMove = ptRawCen - b3Vac.Center()
|
||||
b3Vac.Move(vtMove)
|
||||
@@ -374,11 +448,30 @@ Module VacuumCups
|
||||
frMinRect.VersX().ToSpherical(dLen, dAngVertDeg, dAngOrizzDeg)
|
||||
dRotAngDeg = dAngOrizzDeg
|
||||
If b3Vac.DimY() > b3Vac.DimX() + EPS_SMALL Then dRotAngDeg -= 90
|
||||
Dim dPreferredRot As Double = m_dPreferredRot
|
||||
' -------------------- INIZIO GESTIONE ROTAZIONE ASSE C PER NON ANDARE IN EXTRA-CORSA --------------------
|
||||
' verifico l'orientamento del pezzo
|
||||
If bRotateVacuumNearExtraStrokeX And (Math.Abs(dRotAngDeg - 90) < 45 Or Math.Abs(dRotAngDeg - 270) < 45) Then
|
||||
' se l'orientamento è verticale
|
||||
If frMinRect.Orig().x < b3Tab.Center().x Then
|
||||
dPreferredRot = m_dPrefVertRotXMinus
|
||||
Else
|
||||
dPreferredRot = m_dPrefVertRotXPlus
|
||||
End If
|
||||
ElseIf bRotateVacuumNearExtraStrokeY And (Math.Abs(dRotAngDeg - 90) > 45 Or Math.Abs(dRotAngDeg - 270) > 45) Then
|
||||
' se l'orientemanto è orizzontale e la macchina è stata abilitata
|
||||
If frMinRect.Orig().y < b3Tab.Center().y Then
|
||||
dPreferredRot = m_dPrefVertRotYPlus
|
||||
Else
|
||||
dPreferredRot = m_dPrefVertRotYMinus
|
||||
End If
|
||||
End If
|
||||
' -------------------- FINE GESTIONE ROTAZIONE ASSE C PER NON ANDARE IN EXTRA-CORSA --------------------
|
||||
Dim dAngDelta As Double = If( Math.Abs( b3Vac.DimY() - b3Vac.DimX()) < 10 * EPS_SMALL, 90, 180)
|
||||
While dRotAngDeg - m_dPreferredRot >= dAngDelta / 2
|
||||
While dRotAngDeg - dPreferredRot >= dAngDelta / 2
|
||||
dRotAngDeg -= dAngDelta
|
||||
End While
|
||||
While dRotAngDeg - m_dPreferredRot <= -dAngDelta / 2
|
||||
While dRotAngDeg - dPreferredRot <= -dAngDelta / 2
|
||||
dRotAngDeg += dAngDelta
|
||||
End While
|
||||
Else
|
||||
@@ -430,13 +523,55 @@ Module VacuumCups
|
||||
' Applico movimento e rotazione al punto
|
||||
ptRef.Move(vtMove)
|
||||
ptRef.Rotate(ptRotCen, Vector3d.Z_AX(), dRotAngDeg)
|
||||
|
||||
' -------------- INIZIO verifica di essere nel limite delle corse macchina --------------
|
||||
If VerifyOutOfStrokes(ptRef, dRotAngDeg) <> 0 Then
|
||||
bExtraStroke = True
|
||||
Return INFINITO
|
||||
End If
|
||||
' se la posizione è accettbaile allora salvo i dati
|
||||
ptStartPointLift = ptRef
|
||||
dDegRotStartAng = dRotAngDeg
|
||||
' -------------- FINE verifica di essere nel limite delle corse macchina --------------
|
||||
|
||||
' Ne calcolo la distanza dal centro della tavola
|
||||
Dim b3Tab As New BBox3d
|
||||
EgtGetTableArea(1, b3Tab)
|
||||
Dim dDist As Double = Point3d.DistXY(ptRef, b3Tab.Center())
|
||||
Return dDist
|
||||
End Function
|
||||
|
||||
' assegante le posizioni del centro delle ventose e l'angolo di posizionamento orizzontale verifica che la posizione sia raggiungibile
|
||||
Public Function VerifyOutOfStrokes(ptRef As Point3d, dRotAngDeg As Double) As Integer
|
||||
Dim dX, dY, dZ As Double
|
||||
Dim nStat As Integer
|
||||
Dim dCHome As Double
|
||||
EgtGetAxisHomePos("C", dCHome)
|
||||
' imposto la l'uscita della ventosa come fosse l'uscita di un utensile
|
||||
EgtSetCalcTool("", "H4", 1)
|
||||
EgtGetCalcPositions(ptRef, dRotAngDeg + dCHome, 0, nStat, dX, dY, dZ)
|
||||
EgtVerifyOutstroke(dX, dY, dZ, dRotAngDeg + dCHome, 0, nStat)
|
||||
Return nStat
|
||||
End Function
|
||||
|
||||
' dall'informazione di extra corsa recupera il valore indicato
|
||||
Public Function GetExtraStrokeValue(sInfo As String) As Double
|
||||
Dim dExtraStroke As Double = 0
|
||||
Dim sItems As String() = sInfo.Split("="c)
|
||||
If sItems.Count = 2 Then
|
||||
Dim nStartIndex As Integer = 0
|
||||
For Each ItemChar As Char In sItems(1)
|
||||
If ItemChar = "("c Then
|
||||
Exit For
|
||||
End If
|
||||
nStartIndex += 1
|
||||
Next
|
||||
If nStartIndex > 0 Then
|
||||
Dim sValue As String = sItems(1).Remove(nStartIndex, sItems(1).Count - nStartIndex)
|
||||
StringToLen(sValue, dExtraStroke)
|
||||
End If
|
||||
End If
|
||||
Return dExtraStroke
|
||||
End Function
|
||||
|
||||
Private Function TestVacuumCups(nCups() As Integer, nRawRegId As Integer,
|
||||
vtMove As Vector3d, ptRotCen As Point3d, dRotAngDeg As Double) As Boolean
|
||||
' Eseguo verifica delle ventose rispetto al grezzo
|
||||
@@ -457,6 +592,28 @@ Module VacuumCups
|
||||
Return bVacOk
|
||||
End Function
|
||||
|
||||
' dato il vettore delle camere restituisco il quali attuatori sono coinvolti
|
||||
Private Function GetPluggerFromCameras(sCups() As String) As Integer
|
||||
Dim nCountPlunger As Integer = 1
|
||||
Dim bPlugger1 As Boolean = False
|
||||
Dim bPlugger2 As Boolean = False
|
||||
For Each Camera As String In sCups
|
||||
If (Camera.Contains("1") Or Camera.Contains("2") Or Camera.Contains("3")) Then
|
||||
bPlugger1 = True
|
||||
Else
|
||||
bPlugger2 = True
|
||||
End If
|
||||
Next
|
||||
' verifico quali sono le camere attive
|
||||
If bPlugger1 And bPlugger2 Then
|
||||
nCountPlunger = 2
|
||||
ElseIf Not bPlugger1 And Not bPlugger2 Then
|
||||
nCountPlunger = 0
|
||||
End If
|
||||
' restituisco il numero di Plugger in uso
|
||||
Return nCountPlunger
|
||||
End Function
|
||||
|
||||
Friend Function SaveOneMoveInfo(nId As Integer, rmData As RawMoveData) As Boolean
|
||||
' Assegno le informazioni
|
||||
EgtSetInfo(nId, "Id", rmData.m_nId)
|
||||
|
||||
@@ -67,6 +67,8 @@ Module ConstGen
|
||||
Public Const MACHININGS_DIR As String = "Machinings"
|
||||
' Nome file Dati delle lucidature
|
||||
Public Const KITS_FILE As String = "Kits.data"
|
||||
' Nome file Dati per waterJet
|
||||
Public Const WATERJETDB_FILE As String = "WaterjetDB.data"
|
||||
|
||||
' File dei pezzi rovinati
|
||||
Public Const CURR_RUINED_EPL As String = "RuinedParts.epl"
|
||||
@@ -90,6 +92,10 @@ Module ConstGen
|
||||
Public Const KEY_VACLAY_SEL As String = "Sel"
|
||||
' Info in gruppo layout per angolo di rotazione preferito
|
||||
Public Const KEY_VACLAY_PREFROT As String = "PreferredRot"
|
||||
Public Const KEY_VACLAY_PREFVROTXMINUS As String = "PrefVertRotXMinus"
|
||||
Public Const KEY_VACLAY_PREFVROTXPLUS As String = "PrefVertRotXPlus"
|
||||
Public Const KEY_VACLAY_PREFVROTYMINUS As String = "PrefVertRotYMinus"
|
||||
Public Const KEY_VACLAY_PREFVROTYPLUS As String = "PrefVertRotYPlus"
|
||||
' Info in gruppo layout per direzione di riferimento ventose per tagli da sotto
|
||||
Public Const KEY_VACLAY_DRIPREFDIR As String = "DripRefDir"
|
||||
' Info in asse rotante ventosa per step discreti
|
||||
@@ -143,6 +149,9 @@ Module ConstGen
|
||||
Public Const INFO_RAW_BLOCK = "Block"
|
||||
' Info per numero lastra nel blocco
|
||||
Public Const INFO_RAW_SLABNBR = "SlabNbr"
|
||||
' Info per identificazione gruppo pezzi
|
||||
Public Const INFO_REFGROUP As String = "RefGroup"
|
||||
Public Const INFO_COUNTERLY As String = "CounterPz"
|
||||
|
||||
' Contrassegno di progetto OmagCut
|
||||
Public Const NAME_PROJMARK As String = "OmagCut"
|
||||
@@ -178,6 +187,8 @@ Module ConstGen
|
||||
Public Const INFO_TOTAREA As String = "TotArea"
|
||||
' Info per area da produrre dei pezzi del progetto
|
||||
Public Const INFO_TOPRODAREA As String = "ToProdArea"
|
||||
' Info per nome progetti
|
||||
Public Const INFO_PROJNAME As String = "ProjName"
|
||||
|
||||
' Nome layer delle regioni
|
||||
Public Const NAME_REGION As String = "Region"
|
||||
@@ -203,6 +214,8 @@ Module ConstGen
|
||||
Public Const INFO_DEPTH As String = "Depth"
|
||||
Public Const INFO_WIDTH As String = "Width"
|
||||
Public Const INFO_DEPTH2 As String = "Depth2"
|
||||
Public Const INFO_AGG2 As String = "Agg2"
|
||||
Public Const INFO_ROUNDOFF As String = "RoundOff"
|
||||
' Info in entità da tagliare per taglio ristretto
|
||||
Public Const INFO_STRICT As String = "Strict"
|
||||
' Info in entità da tagliare per angolo di lato e tallone
|
||||
@@ -292,6 +305,12 @@ Module ConstGen
|
||||
Public Const INFO_PARTOK As String = "POK"
|
||||
' Info in pezzo per stato rotazione
|
||||
Public Const INFO_PARTROT As String = "ROT"
|
||||
' Info in entità in OutLoop per indicare se è separata WaterJet
|
||||
Public Const INFO_JOINENTITY As String = "JoinEntity"
|
||||
' Nome layer per "*" inidcanti un lato separato nel taglio WaterJet
|
||||
Public Const INFO_AUX_SPLIT_WJ As String = "AUX_SPLIT_WJ"
|
||||
' Info in OutLoop per punto inzio lavorazione WaterJet
|
||||
Public Const INFO_START As String = "Start"
|
||||
|
||||
' Nome di pezzo che è una cornice
|
||||
Public Const NAME_FRAME As String = "Frame"
|
||||
@@ -324,6 +343,11 @@ Module ConstGen
|
||||
' Info in pezzo per facet di ultima superficie selezionata
|
||||
Public Const INFO_FRAME_FACET As String = "Facet"
|
||||
|
||||
' Nome del groppo dei ponticelli per lavorazioni Water
|
||||
Public Const BRIDGES As String = "Bridges"
|
||||
' Nome dell'entità ponticello contenuta nel gruppo BRIDGES
|
||||
Public Const BRIDGELINE As String = "BridgeLine"
|
||||
|
||||
' utensile per le lavorazioni manuali
|
||||
Public Const DUMMY_SAW As String = "DummySAW"
|
||||
' lavorazione manuale
|
||||
@@ -334,6 +358,8 @@ Module ConstGen
|
||||
' Nome di pezzo temporaneo che serve per copia dime
|
||||
Public Const NAME_COPYTEMPLATE As String = "CopyTemplate"
|
||||
|
||||
' Nome layer solidi per VM
|
||||
Public Const NAME_VM_SOLID As String = "Solid"
|
||||
' Chiave per Id originale del pezzo per VeinMatch
|
||||
Public Const KEY_ORI_ID As String = "OriId"
|
||||
|
||||
@@ -343,6 +369,9 @@ Module ConstGen
|
||||
' Lunghezza libera infinita
|
||||
Public Const FREELEN_INF = 9999
|
||||
|
||||
' Costante per lunghezza gambo di lama
|
||||
Public Const STEM = 131072
|
||||
|
||||
' Colori per lavorazioni
|
||||
Public Function COL_MCH_CUT() As Color3d
|
||||
Return New Color3d(0, 255, 0)
|
||||
@@ -362,6 +391,9 @@ Module ConstGen
|
||||
Public Function COL_MCH_DRIPCUT() As Color3d
|
||||
Return New Color3d(255, 0, 165)
|
||||
End Function
|
||||
Public Function COL_MCH_ONENGRAVE_ANG() As Color3d
|
||||
Return New Color3d(255, 255, 100)
|
||||
End Function
|
||||
Public Function COL_MCH_DRIPFREE() As Color3d
|
||||
Return New Color3d(192, 0, 128)
|
||||
End Function
|
||||
|
||||
@@ -18,6 +18,7 @@ Module ConstIni
|
||||
Public Const S_GENERAL As String = "General"
|
||||
Public Const K_DEBUG As String = "Debug"
|
||||
Public Const K_LICENCE As String = "Licence"
|
||||
Public Const K_NETKEY As String = "NetKey"
|
||||
Public Const K_MESSAGESDIR As String = "MessagesDir"
|
||||
Public Const K_MESSAGES As String = "Messages"
|
||||
Public Const K_SUPPORT As String = "Support"
|
||||
@@ -46,6 +47,10 @@ Module ConstIni
|
||||
Public Const K_THEME As String = "Theme"
|
||||
Public Const K_MANUAL_CUT As String = "ManualCut"
|
||||
Public Const K_TEST As String = "Test"
|
||||
Public Const K_SMARTMACHININGPAGE As String = "SmartMachiningPage"
|
||||
Public Const K_STARTPROGRAM As String = "StartProgram"
|
||||
Public Const K_GENERATECN As String = "GenerateCN"
|
||||
|
||||
|
||||
Public Const S_LANGUAGES As String = "Languages"
|
||||
Public Const K_LANGUAGE As String = "Language"
|
||||
@@ -105,6 +110,15 @@ Module ConstIni
|
||||
Public Const K_TRFDATA As String = "TrfData"
|
||||
Public Const K_CSVDATA As String = "CsvData"
|
||||
Public Const K_COMPODIR As String = "CompoDir"
|
||||
Public Const K_CMP_COUNT As String = "Count"
|
||||
Public Const K_LASTCOLOR As String = "LastColor"
|
||||
Public Const K_COLOR As String = "Color"
|
||||
|
||||
Public Const S_EXTCOMPO As String = "Compo"
|
||||
|
||||
Public Const S_INTCOMPO As String = "InternalCompo"
|
||||
Public Const K_INT_COMPODIR As String = "CompoDir"
|
||||
Public Const K_INT_COUNT As String = "Count"
|
||||
|
||||
Public Const S_FLATPARTS As String = "FlatParts"
|
||||
Public Const K_FLPCURRDIR As String = "CurrDir"
|
||||
@@ -120,7 +134,9 @@ Module ConstIni
|
||||
Public Const K_ENGRAVENUMBER2 As String = "EngraveNumber2"
|
||||
Public Const K_ENGRAVEOFFSET2 As String = "EngraveOffset2"
|
||||
Public Const K_ENGRAVEDEPTH As String = "EngraveDepth"
|
||||
Public Const K_ENGRAVEDEPTH2 As String = "EngraveDepth2"
|
||||
Public Const K_ENGRAVESHORT As String = "EngraveShort"
|
||||
Public Const K_ENGRAVEANGLE As String = "EngraveAngle"
|
||||
Public Const K_DRIPOFFSET As String = "DripOffset"
|
||||
Public Const K_DRIPOFFSET2 As String = "DripOffset2"
|
||||
Public Const K_DRIPDEPTH As String = "DripDepth"
|
||||
@@ -128,6 +144,7 @@ Module ConstIni
|
||||
Public Const K_UNDERDRILLDEPTH As String = "UnderDrillDepth"
|
||||
Public Const K_FILOTOPOFFSET As String = "FiloTopOffset"
|
||||
Public Const K_FILOTOPDEPTH As String = "FiloTopDepth"
|
||||
Public Const K_ROUNDOFF As String = "RoundOff"
|
||||
|
||||
Public Const S_NEST As String = "Nest"
|
||||
Public Const K_DIRECT As String = "Direct"
|
||||
@@ -139,6 +156,11 @@ Module ConstIni
|
||||
Public Const K_TEXTCOLOR As String = "TextColor"
|
||||
Public Const K_AUTOMATICOPTIMIZE As String = "AutomaticOptimize"
|
||||
Public Const K_AUTOMATICMAXTIME As String = "AutomaticMaxTime"
|
||||
Public Const K_DRAG_RETTANGLE As String = "DragRectangle"
|
||||
Public Const K_STARTENDMODIFYONINTCORNER As String = "StartEndModifyOnIntCorner"
|
||||
|
||||
Public Const S_SPLIT As String = "Split"
|
||||
Public Const K_MOVE_LEV As String = "MoveLevel"
|
||||
|
||||
Public Const S_CSV As String = "Csv"
|
||||
Public Const K_FULL As String = "Full"
|
||||
@@ -151,6 +173,14 @@ Module ConstIni
|
||||
Public Const K_CSVCURRDIR As String = "CurrDir"
|
||||
Public Const K_CSVLASTFILE As String = "LastFile"
|
||||
|
||||
Public Const S_TRF As String = "TRF"
|
||||
Public Const K_ORDCODE As String = "OrdCode"
|
||||
Public Const K_ORDDESC As String = "OrdDesc"
|
||||
Public Const K_PARTCODE As String = "PartCode"
|
||||
Public Const K_MATCODE As String = "MatCode"
|
||||
Public Const K_SURFCODE As String = "SurfCode"
|
||||
Public Const K_TRFTHICKNESS As String = "TrfThickness"
|
||||
|
||||
Public Const S_SLABDXF As String = "SlabDxf"
|
||||
Public Const K_IMPORTSLABDXF As String = "ImportSlabDxf"
|
||||
Public Const K_SLABLAYER As String = "SlabLayer"
|
||||
@@ -197,6 +227,15 @@ Module ConstIni
|
||||
Public Const K_RAWROTATION As String = "Rotation"
|
||||
Public Const K_PERPENDICULAR As String = "Perpendicular"
|
||||
|
||||
Public Const S_SCRAPS As String = "Scraps"
|
||||
Public Const K_ENABLESCRAPS As String = "EnableScraps"
|
||||
Public Const K_PHOTODIR As String = "PhotoDir"
|
||||
Public Const K_LASTBLOCK As String = "LastBlock"
|
||||
Public Const K_TEMPLATE As String = "Template"
|
||||
Public Const K_DAT As String = "Dat"
|
||||
Public Const K_ZEBRAUTILITIES As String = "ZebraUtilities"
|
||||
Public Const K_ENABLE_PRINTER As String = "EnablePrinter"
|
||||
|
||||
Public Const S_REG As String = "Reg"
|
||||
Public Const K_REGSTEP As String = "Step"
|
||||
Public Const K_REGANGSTEP As String = "AngStep"
|
||||
|
||||
@@ -11,9 +11,18 @@
|
||||
Public Const K_ZIGZAGX As String = "ZigZagX"
|
||||
Public Const K_OFFZIGZAGX As String = "OffZigZagX"
|
||||
Public Const K_STEPX As String = "StepX"
|
||||
Public Const K_RADIUSX As String = "RadiusX"
|
||||
Public Const K_DISTANCEX As String = "DistanceX"
|
||||
Public Const K_ZIGZAGY As String = "ZigZagY"
|
||||
Public Const K_OFFZIGZAGY As String = "OffZigZagY"
|
||||
Public Const K_STEPY As String = "StepY"
|
||||
Public Const K_RADIUSY As String = "RadiusY"
|
||||
Public Const K_DISTANCEY As String = "DistanceY"
|
||||
Public Const K_SPIRAL As String = "Spiral"
|
||||
Public Const K_OFFSPIRAL As String = "OffSpiral"
|
||||
Public Const K_STEPSPIRAL As String = "StepSpiral"
|
||||
Public Const K_RADIUSSPIRAL As String = "RadiusSpiral"
|
||||
Public Const K_DISTANCESPIRAL As String = "DistanceSpiral"
|
||||
Public Const K_LILEN As String = "LiLen"
|
||||
Public Const K_LIHEIGHT As String = "LiHeight"
|
||||
Public Const K_LILOAD As String = "LiLoad"
|
||||
|
||||
@@ -37,15 +37,24 @@
|
||||
Public Const K_PATH_HMI As String = "PathHmi"
|
||||
Public Const K_USENEWMDI As String = "UseNewMDI"
|
||||
Public Const K_ISSIEMENSONE As String = "IsSiemensOne"
|
||||
Public Const K_ISACTIVEMODESUBSCR As String = "IsActiveModeSubscr"
|
||||
Public Const K_DBVARPATH As String = "DBVarPath"
|
||||
Public Const K_NEWWRITECNCMODE As String = "NewWriteCNCMode"
|
||||
|
||||
Public Const S_NCNUM As String = "NcNUM"
|
||||
Public Const K_RESETSENDDELAY As String = "ResetSendDelay"
|
||||
Public Const K_THREADSLEEP As String = "ThreadSleep"
|
||||
Public Const K_PHOTODELEY As String = "PhotoDeley"
|
||||
|
||||
Public Const S_EXECLUA As String = "ExecLua"
|
||||
Public Const K_DIRSCRIPT_LUA As String = "DirScript"
|
||||
Public Const K_FILESCRIPT_LUA As String = "FileScript"
|
||||
Public Const K_CALLFUNCTION As String = "CallFunction"
|
||||
|
||||
Public Const S_NCDATA As String = "NcData"
|
||||
Public Const K_NEWVARIABLE As String = "NewVariable"
|
||||
Public Const K_NEWCONSOLE As String = "NewConsole"
|
||||
Public Const K_WRITECNCMODEVAR As String = "WriteCNCModeVar"
|
||||
Public Const K_COMM As String = "Comm"
|
||||
Public Const K_REFRESH As String = "Refresh"
|
||||
Public Const K_MODE As String = "Mode"
|
||||
@@ -73,6 +82,9 @@
|
||||
Public Const K_DOORCLOSED As String = "DoorClosed"
|
||||
Public Const K_LIMITZ As String = "LimitZ"
|
||||
Public Const K_POWEROVR As String = "PowerOvr"
|
||||
Public Const K_PARKING As String = "Parking"
|
||||
Public Const K_ENABLEZONE As String = "EnableZone"
|
||||
Public Const K_ENABLEPC As String = "EnablePC"
|
||||
Public Const K_HSM As String = "Hsm"
|
||||
Public Const K_VACUUMUP As String = "VacuumUp"
|
||||
Public Const K_VACUUMDOWN As String = "VacuumDown"
|
||||
@@ -100,6 +112,8 @@
|
||||
Public Const K_VACUUMOFF As String = "VacuumOff"
|
||||
Public Const K_BYPASSTATE As String = "BypassState"
|
||||
Public Const K_FEEDHOLD As String = "FeedHold"
|
||||
Public Const K_SPOTLIGHT1 As String = "SpotLight1"
|
||||
Public Const K_SPOTLIGHT2 As String = "SpotLight2"
|
||||
' Nuove variabili
|
||||
Public Const K_SPEEDHOLD As String = "SpeedHold"
|
||||
Public Const K_XYJOG As String = "XYJog"
|
||||
@@ -107,6 +121,7 @@
|
||||
Public Const K_ZBJOG As String = "ZBJog"
|
||||
Public Const K_POWERON As String = "PowerON"
|
||||
Public Const K_POWEROFF As String = "PowerOFF"
|
||||
Public Const K_REMOTE As String = "Remote"
|
||||
|
||||
Public Const S_PRODUCTIONLINE As String = "ProductionLine"
|
||||
Public Const K_ACTIVE As String = "Active"
|
||||
@@ -205,6 +220,7 @@
|
||||
Public Const K_MACH_CUTFSEVENABLE As String = "CutFsevEnable"
|
||||
Public Const K_MACH_CUTFSEVLEN As String = "CutFsevLen"
|
||||
Public Const K_MACH_CUTFSEVPERC As String = "CutFsevPerc"
|
||||
Public Const K_USELASERORIGIN As String = "UseLaserOrigin"
|
||||
' DrillMillC90
|
||||
' CutLongDxSx
|
||||
' AngRotMultiCut
|
||||
@@ -217,6 +233,13 @@
|
||||
Public Const S_MACH_RAWMOVE As String = "RawMove"
|
||||
Public Const K_MACH_RM_ROTATE As String = "Rotate"
|
||||
Public Const K_MACH_RM_FINALMOVE As String = "FinalMove"
|
||||
Public Const K_MACH_WEIGHT_SINGLEPLUGGER As String = "MaxWeightSinglePlugger"
|
||||
Public Const K_MACH_WEIGHT_DOUBLEPLUGGER As String = "MaxWeightDoublePlugger"
|
||||
Public Const K_MACH_ROTATEVACUUMFOREXTRASTROKEY As String = "RotateVacuumForExtraStrokeY"
|
||||
Public Const K_MACH_ROTATEVACUUMFOREXTRASTROKEX As String = "RotateVacuumForExtraStrokeX"
|
||||
|
||||
Public Const K_ISNEWSCRAPS As String = "IsNewScraps"
|
||||
Public Const K_DATABASEID As String = "DatabaseID"
|
||||
|
||||
Public Const S_MACH_REG As String = "Reg"
|
||||
Public Const K_MACH_MAX_ROT_ANG As String = "MaxRotAng"
|
||||
@@ -240,6 +263,7 @@
|
||||
|
||||
Public Const S_MACH_INPROGRESS As String = "InProgress"
|
||||
Public Const K_PHASEVAR As String = "PhaseVar"
|
||||
Public Const K_WP_STEPTIME As String = "WPStepTime"
|
||||
|
||||
Public Const S_MACH_PROBING As String = "Probing"
|
||||
Public Const K_PROBINGSTATEVAR As String = "ProbingStateVar"
|
||||
@@ -272,9 +296,12 @@
|
||||
Public Const K_CURRDRIPSAWING As String = "CurrDripSawing"
|
||||
Public Const K_CURRDRIPDRILLING As String = "CurrDripDrilling"
|
||||
Public Const K_CURRWATERJETTING As String = "CurrWaterJetting"
|
||||
Public Const K_CURRWATERJETTINGQUALITY As String = "CurrWaterJettingQualilty"
|
||||
|
||||
Public Const S_MATERIALS As String = "Materials"
|
||||
Public Const K_CURRMATERIAL As String = "CurrMaterial"
|
||||
Public Const K_MATERIAL As String = "Material"
|
||||
Public Const K_FROMDBWATERJET As String = "FromDBWaterJet"
|
||||
Public Const K_AVERAGEDENSITY As String = "AverageDensity"
|
||||
|
||||
End Module
|
||||
|
||||
@@ -330,6 +330,49 @@ Public Class ControlsMachineButtonUC
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Friend Sub ParkingStateChanged(ParkingState As Boolean)
|
||||
Dim ParkingButton As TwoStateButton = Nothing
|
||||
For Each MachineButton As MachineButton In m_ButtonList
|
||||
If MachineButton.StateFlag = K_PARKING Then
|
||||
ParkingButton = MachineButton
|
||||
End If
|
||||
Next
|
||||
If Not IsNothing(ParkingButton) Then
|
||||
ParkingButton.SetIsChecked(ParkingState)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Friend Sub ZoneStateChanged(ZoneState As Integer)
|
||||
'Dim sFlag As String = String.Empty
|
||||
'If ZoneState = 1 Then
|
||||
' sFlag = BTN_ENABLE_ZONE_1
|
||||
'ElseIf ZoneState = 2 Then
|
||||
' sFlag = BTN_ENABLE_ZONE_2
|
||||
'End If
|
||||
'Dim EnableZoneButton As TwoStateButton = Nothing
|
||||
'For Each MachineButton As MachineButton In m_ButtonList
|
||||
' If MachineButton.StateFlag = K_ENABLEZONE Then
|
||||
' EnableZoneButton = MachineButton
|
||||
' End If
|
||||
'Next
|
||||
'If Not IsNothing(EnableZoneButton) Then
|
||||
' EnableZoneButton.SetIsChecked(EnableZone)
|
||||
'End If
|
||||
End Sub
|
||||
|
||||
Friend Sub PcStateChanged(EnablePC As Boolean)
|
||||
'Dim EnablePCButton As TwoStateButton = Nothing
|
||||
'For Each MachineButton As MachineButton In m_ButtonList
|
||||
' If MachineButton.StateFlag = K_ENABLEPC Then
|
||||
' EnablePCButton = MachineButton
|
||||
' End If
|
||||
'Next
|
||||
'If Not IsNothing(EnablePCButton) Then
|
||||
' EnablePCButton.SetIsChecked(EnablePC)
|
||||
'End If
|
||||
End Sub
|
||||
|
||||
|
||||
Public Function GetPrivateProfileMachineButtons(
|
||||
ByVal lpAppName As String,
|
||||
ByVal lpKeyName As String,
|
||||
@@ -402,6 +445,8 @@ Public MustInherit Class MachineButton
|
||||
Friend Const BTN_STATE_THREEAXIS As String = "ThreeAxis"
|
||||
Friend Const BTN_STATE_FIVEAXIS As String = "FiveAxis"
|
||||
Friend Const BTN_STATE_NOTHING As String = "Nothing"
|
||||
Friend Const BTN_ENABLE_ZONE_1 As String = "EnableZone1"
|
||||
Friend Const BTN_ENABLE_ZONE_2 As String = "EnableZone2"
|
||||
|
||||
' Dichiarazione delle Page UserControl
|
||||
Friend Shared m_MainWindow As MainWindow = DirectCast(Application.Current.MainWindow, MainWindow)
|
||||
@@ -475,7 +520,7 @@ Public MustInherit Class MachineButton
|
||||
If m_CN.m_NewVariable And m_MainWindow.m_CNCommunication.m_nNCType = 2 Then
|
||||
' solo per Flexium
|
||||
m_CN.DPlcVariables_WriteVariables(ENumber, EValue)
|
||||
If Not IsNothing(ENumber2) And Not IsNothing(EValue2) Then
|
||||
If Not String.IsNullOrEmpty(ENumber2) And Not String.IsNullOrEmpty(EValue2) Then
|
||||
m_CN.DPlcVariables_WriteVariables(ENumber2, EValue2)
|
||||
End If
|
||||
' altrimenti scrittura delle variabili E
|
||||
@@ -647,6 +692,7 @@ Public Class TwoStateButton
|
||||
Return m_IsChecked
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
' accendo il comando, anche se dovrei aspettare di leggere lo stato da PLC
|
||||
m_IsChecked = value
|
||||
If value Then
|
||||
ExecuteMDICommand(TLuaScriptName)
|
||||
|
||||
@@ -35,10 +35,11 @@
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Button Name="Point1Btn" Grid.Column="0"
|
||||
Style="{DynamicResource OmagCut_YellowTextButton}"/>
|
||||
<Button Name="Point1Btn" Grid.Column="0" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource Acquisisci-PImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||
</Button>
|
||||
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
||||
<ComboBox Name="PointModeCmBx" Grid.Row="1" Grid.ColumnSpan="2" Style="{StaticResource OmagCut_ComboBox}"
|
||||
Margin="6,0,6,0">
|
||||
@@ -55,10 +56,12 @@
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<ToggleButton Name="LineBtn" Grid.Column="0"
|
||||
Style="{DynamicResource OmagCut_YellowToggleButton}"/>
|
||||
<ToggleButton Name="ArcBtn" Grid.Column="1"
|
||||
Style="{DynamicResource OmagCut_YellowToggleButton}"/>
|
||||
<ToggleButton Name="LineBtn" Grid.Column="0" Style="{DynamicResource OmagCut_YellowIconToggleButton}">
|
||||
<Image Source="{DynamicResource LineaImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||
</ToggleButton>
|
||||
<ToggleButton Name="ArcBtn" Grid.Column="1" Style="{DynamicResource OmagCut_YellowIconToggleButton}">
|
||||
<Image Source="{DynamicResource ArcoImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||
</ToggleButton>
|
||||
|
||||
</Grid>
|
||||
|
||||
@@ -69,14 +72,18 @@
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Button Name="RemoveBtn" Grid.Column="0" Grid.Row="3" Grid.RowSpan="2"
|
||||
Style="{DynamicResource OmagCut_GradientBlueTextButton}"/>
|
||||
<Button Name="CloseBtn" Grid.Column="1" Grid.Row="3" Grid.RowSpan="2"
|
||||
Style="{DynamicResource OmagCut_GradientBlueTextButton}"/>
|
||||
<Button Name="RemoveBtn" Grid.Column="0" Grid.Row="3" Grid.RowSpan="2" Style="{DynamicResource OmagCut_GradientBlueIconButton}">
|
||||
<Image Source="{DynamicResource Rimuovi-segmentoImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="CloseBtn" Grid.Column="1" Grid.Row="3" Grid.RowSpan="2" Style="{DynamicResource OmagCut_GradientBlueIconButton}">
|
||||
<Image Source="{DynamicResource ChiudiImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||
</Button>
|
||||
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
||||
<Button Name="SaveBtn" Grid.Column="0" Grid.Row="10" Style="{DynamicResource OmagCut_GradientBlueTextButton}"/>
|
||||
<Button Name="SaveBtn" Grid.Column="0" Grid.Row="10" Style="{DynamicResource OmagCut_GradientBlueIconButton}">
|
||||
<Image Source="{DynamicResource Salva-taglioImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||
</Button>
|
||||
|
||||
<Button Name="ExitBtn" Grid.Column="2" Grid.Row="10" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource XImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
|
||||
@@ -49,12 +49,12 @@ Public Class CopyTemplateUC
|
||||
' la associo alla combobox
|
||||
PointModeCmBx.ItemsSource = m_PointsModeArray
|
||||
|
||||
Point1Btn.Content = EgtMsg(MSG_DIRECTCUTPAGEUC + 10)
|
||||
LineBtn.Content = EgtMsg(MSG_DIRECTCUTPAGEUC + 50)
|
||||
ArcBtn.Content = EgtMsg(MSG_DIRECTCUTPAGEUC + 51)
|
||||
RemoveBtn.Content = EgtMsg(MSG_DIRECTCUTPAGEUC + 52)
|
||||
CloseBtn.Content = EgtMsg(MSG_DIRECTCUTPAGEUC + 53)
|
||||
SaveBtn.Content = EgtMsg(MSG_DIRECTCUTPAGEUC + 54)
|
||||
Point1Btn.ToolTip = EgtMsg(MSG_DIRECTCUTPAGEUC + 10)
|
||||
LineBtn.ToolTip = EgtMsg(MSG_DIRECTCUTPAGEUC + 50)
|
||||
ArcBtn.ToolTip = EgtMsg(MSG_DIRECTCUTPAGEUC + 51)
|
||||
RemoveBtn.ToolTip = EgtMsg(MSG_DIRECTCUTPAGEUC + 52)
|
||||
CloseBtn.ToolTip = EgtMsg(MSG_DIRECTCUTPAGEUC + 53)
|
||||
SaveBtn.ToolTip = EgtMsg(MSG_DIRECTCUTPAGEUC + 54)
|
||||
End Sub
|
||||
|
||||
Private Sub CopyTemplate_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded
|
||||
|
||||
@@ -141,10 +141,20 @@
|
||||
</Grid>
|
||||
</Button>
|
||||
|
||||
<Button Name="PolishingBtn" Grid.Row="6"
|
||||
Style="{DynamicResource OmagCut_YellowTextButton}"/>
|
||||
<Button Name="PolishingBtn" Grid.Row="6"
|
||||
Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="80"/>
|
||||
<ColumnDefinition Width="140"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Image Source="{DynamicResource LucidaturaImg}" Style="{DynamicResource OmagCut_ButtonIcon}" Grid.Column="0" />
|
||||
<TextBlock Name="PolishingTxt" Grid.Column="1"
|
||||
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</Grid>
|
||||
</Button>
|
||||
|
||||
<Button Name="CopyTemplateBtn" Grid.Row="7"
|
||||
<Button Name="CopyTemplateBtn" Grid.Row="7"
|
||||
Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
@@ -158,9 +168,19 @@
|
||||
</Button>
|
||||
|
||||
<Button Name="SawTestBtn" Grid.Row="8"
|
||||
Style="{DynamicResource OmagCut_YellowTextButton}"/>
|
||||
|
||||
Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="80"/>
|
||||
<ColumnDefinition Width="140"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Image Source="{DynamicResource Test-lamaImg}" Style="{DynamicResource OmagCut_ButtonIcon}" Grid.Column="0" />
|
||||
<TextBlock Name="SawTestTxt" Grid.Column="1"
|
||||
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</Grid>
|
||||
</Button>
|
||||
|
||||
</Grid>
|
||||
|
||||
</Grid>
|
||||
|
||||
@@ -180,9 +200,11 @@
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="5*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="4*"/>
|
||||
<!--<ColumnDefinition Width="1*"/>-->
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<ToggleButton Name="ControlsMachineBtn" Grid.Column="0"
|
||||
@@ -198,24 +220,37 @@
|
||||
<!--Comando asse X-Y-->
|
||||
<ToggleButton Name="XYBtn" Grid.Column="2"
|
||||
Style="{DynamicResource OmagCut_GradientYellowIconToggleButton}">
|
||||
<!--<Image Source="{DynamicResource VacuumImg}" Style="{StaticResource OmagCut_ScaleButtonIcon}"/>-->
|
||||
<Image Source="{DynamicResource XYJogImg}" Style="{StaticResource OmagCut_ScaleButtonIcon}"/>
|
||||
</ToggleButton>
|
||||
|
||||
<!--Comando asse Z-C-->
|
||||
<ToggleButton Name="ZCBtn" Grid.Column="3"
|
||||
Style="{DynamicResource OmagCut_GradientYellowIconToggleButton}">
|
||||
<!--<Image Source="{DynamicResource VacuumImg}" Style="{StaticResource OmagCut_ScaleButtonIcon}"/>-->
|
||||
<Image Source="{DynamicResource ZCJogImg}" Style="{StaticResource OmagCut_ScaleButtonIcon}"/>
|
||||
</ToggleButton>
|
||||
|
||||
<!--Comando asse Z-B-->
|
||||
<ToggleButton Name="ZBBtn" Grid.Column="4"
|
||||
<!--Comando asse Z-B-->
|
||||
<ToggleButton Name="ZBBtn" Grid.Column="4"
|
||||
Style="{DynamicResource OmagCut_GradientYellowIconToggleButton}">
|
||||
<!--<Image Source="{DynamicResource VacuumImg}" Style="{StaticResource OmagCut_ScaleButtonIcon}"/>-->
|
||||
</ToggleButton>
|
||||
<Image Source="{DynamicResource ZBJogImg}" Style="{StaticResource OmagCut_ScaleButtonIcon}"/>
|
||||
</ToggleButton>
|
||||
|
||||
<Button Name="ManualModeBtn" Grid.Column="7"
|
||||
Style="{DynamicResource OmagCut_YellowGradientYellowIconButton}">
|
||||
<Image Source="{DynamicResource ManualImg}" Style="{StaticResource OmagCut_ScaleButtonIcon}"/>
|
||||
<!--Comando Remote-->
|
||||
<ToggleButton Name="RemoteBtn" Grid.Column="5"
|
||||
Style="{DynamicResource OmagCut_GradientYellowIconToggleButton}">
|
||||
<!--<Image Source="{DynamicResource VacuumImg}" Style="{StaticResource OmagCut_ScaleButtonIcon}"/>-->
|
||||
</ToggleButton>
|
||||
|
||||
<!--Parking-->
|
||||
<ToggleButton Name="ParkingBtn" Grid.Column="6"
|
||||
Style="{DynamicResource OmagCut_GradientYellowIconToggleButton}">
|
||||
<Image Source="{DynamicResource ParkingImg}" Style="{StaticResource OmagCut_ScaleButtonIcon}"/>
|
||||
</ToggleButton>
|
||||
|
||||
<!--Comando Manula/MDI-->
|
||||
<Button Name="ManualModeBtn" Grid.Column="8"
|
||||
Style="{DynamicResource OmagCut_YellowGradientYellowIconButton}">
|
||||
<Image Source="{DynamicResource ManualImg}" Style="{StaticResource OmagCut_ScaleButtonIcon}"/>
|
||||
</Button>
|
||||
|
||||
</Grid>
|
||||
|
||||
+176
-146
@@ -77,7 +77,7 @@ Public Class DirectCutPageUC
|
||||
|
||||
'Posizionemento nella griglia delle Page UserControl
|
||||
m_MachineButtons.SetValue(Grid.RowProperty, 2)
|
||||
m_MachineButtons.SetValue(Grid.ColumnSpanProperty, 6)
|
||||
m_MachineButtons.SetValue(Grid.ColumnSpanProperty, 7)
|
||||
m_ManualAxesMove.SetValue(Grid.RowProperty, 1)
|
||||
If m_bManulaCut Then
|
||||
m_SingleCutAuto.SetValue(Grid.RowProperty, 1)
|
||||
@@ -94,15 +94,14 @@ Public Class DirectCutPageUC
|
||||
m_ControlsMachineButton.SetValue(Grid.RowProperty, 1)
|
||||
m_VacuumMachineButton.SetValue(Grid.RowProperty, 1)
|
||||
|
||||
Dim bCollapsedNewBottonsConsole As Boolean = False
|
||||
' verifico che sia presente almeno uno dei bottoni della nuova console (SOLO PER MACCHINA CON paragrafo [ControlMachButtons])
|
||||
Dim bCollapsedNewBottonsConsole As Boolean = Not m_ControlsMachineButton.GetPrivateProfileMachineButtons("JogButtons", "Button1", Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, m_MainWindow.GetMachIniFile())
|
||||
m_NewMachineButtonsType = m_ControlsMachineButton.GetPrivateProfileMachineButtons(S_CONTROLMACHBUTTONS, "Button1", Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, m_MainWindow.GetMachIniFile())
|
||||
If Not m_NewMachineButtonsType Then
|
||||
'Assegno MachineButtons alla pagina
|
||||
LowerButtonGrid.Children.Add(m_MachineButtons)
|
||||
ControlsMachineBtn.Visibility = Windows.Visibility.Collapsed
|
||||
VacuumMachineBtn.Visibility = Windows.Visibility.Collapsed
|
||||
' per le configurazioni diverse dalla Digitale5
|
||||
bCollapsedNewBottonsConsole = True
|
||||
End If
|
||||
|
||||
If GetPrivateProfileInt(S_NUMERICALCONTROL, K_TYPE, 0, m_MainWindow.GetMachIniFile()) = 0 Then
|
||||
@@ -122,27 +121,17 @@ Public Class DirectCutPageUC
|
||||
GridCutTxt.Text = EgtMsg(90204)
|
||||
'FlatteningCutBtn.Content = EgtMsg(90206)
|
||||
FlatteningCutTxt.Text = EgtMsg(90206)
|
||||
PolishingBtn.Content = EgtMsg(90231)
|
||||
'PolishingBtn.Content = EgtMsg(90231)
|
||||
PolishingTxt.Text = EgtMsg(90231)
|
||||
'CopyTemplateBtn.Content = EgtMsg(90209)
|
||||
CopyTemplateTxt.Text = EgtMsg(90209)
|
||||
SawTestBtn.Content = EgtMsg(90207)
|
||||
'SawTestBtn.Content = EgtMsg(90207)
|
||||
SawTestTxt.text = EgtMsg(90207)
|
||||
|
||||
|
||||
' nuovi bottoni 20/05/2021 - modifica specifiche 04/08/2021
|
||||
' leggo il numero di assi attivi nella macchina
|
||||
Dim AxesNumber = GetPrivateProfileInt(S_AXES, K_AXESNUM, 5, m_MainWindow.GetMachIniFile())
|
||||
Dim x As Integer = GetPrivateProfileInt(S_NCDATA, K_NEWCONSOLE, 0, m_MainWindow.GetMachIniFile())
|
||||
If GetPrivateProfileInt(S_NCDATA, K_NEWCONSOLE, 0, m_MainWindow.GetMachIniFile()) = 1 And Not bCollapsedNewBottonsConsole Then
|
||||
XYBtn.Content = "X - Y"
|
||||
ZCBtn.Content = "Z - C"
|
||||
If AxesNumber < 5 Then
|
||||
ZBBtn.Visibility = Windows.Visibility.Collapsed
|
||||
End If
|
||||
ZBBtn.Content = "Z - B"
|
||||
Else
|
||||
XYBtn.Visibility = Windows.Visibility.Collapsed
|
||||
ZCBtn.Visibility = Windows.Visibility.Collapsed
|
||||
ZBBtn.Visibility = Windows.Visibility.Collapsed
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
@@ -182,6 +171,8 @@ Public Class DirectCutPageUC
|
||||
End If
|
||||
End If
|
||||
End While
|
||||
' attivo la visualizzazione dei comandi
|
||||
SetVisibilityJogButtuns()
|
||||
' lo stato di questi comandi vieni carico dalla lettura del PLC (refresh)
|
||||
'----------- FINE NUOVI BOTTONI------------
|
||||
|
||||
@@ -218,8 +209,12 @@ Public Class DirectCutPageUC
|
||||
' Se macchina fotografica abilitata
|
||||
PhotoBtn.IsEnabled = m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.MAN_PHOTO)
|
||||
|
||||
' Attivo le lavorazioni solo se esiste il grezzo
|
||||
' Attivo le lavorazioni solo se esiste il grezzo e se presente testa H1
|
||||
Dim bRawOk As Boolean = (GetRawHeight() > EPS_SMALL)
|
||||
Dim bH1Exists As Boolean = (EgtGetHeadId("H1") <> GDB_ID.NULL)
|
||||
|
||||
ManualBtn.IsEnabled = bH1Exists
|
||||
' sviluppo rimasto in sospeso
|
||||
If m_bManulaCut Then
|
||||
' anche se non è presente un grezzo mantengo abilitato il bottone
|
||||
SingleCutBtn.IsEnabled = True
|
||||
@@ -228,9 +223,14 @@ Public Class DirectCutPageUC
|
||||
End If
|
||||
MultipleCutBtn.IsEnabled = bRawOk
|
||||
GridCutBtn.IsEnabled = bRawOk
|
||||
FlatteningCutBtn.IsEnabled = bRawOk
|
||||
SingleDrillBtn.IsEnabled = (bRawOk And bH1Exists)
|
||||
FlatteningCutBtn.IsEnabled = (bRawOk And bH1Exists)
|
||||
PolishingBtn.IsEnabled = (bRawOk And m_MainWindow.m_CurrentMachine.bPolishing)
|
||||
SawTestBtn.IsEnabled = bRawOk
|
||||
SawTestBtn.IsEnabled = (bRawOk And bH1Exists)
|
||||
CopyTemplateBtn.IsEnabled = bH1Exists
|
||||
|
||||
' aggiorno la visualizzazione dei parametri
|
||||
ReloadParam()
|
||||
|
||||
' Nascondo i pezzi in parcheggio
|
||||
HideParkedParts()
|
||||
@@ -238,6 +238,54 @@ Public Class DirectCutPageUC
|
||||
|
||||
End Sub
|
||||
|
||||
Public Sub ReloadParam()
|
||||
Dim sCurrSawing As String = m_MainWindow.m_CurrentMachine.sCurrSawing
|
||||
Dim sCurrSaw As String = m_MainWindow.m_CurrentMachine.sCurrSaw
|
||||
Dim bSaw As Boolean = False
|
||||
|
||||
' se esiste una lavorazione di lama corrente vuol dire che deve essere preferita
|
||||
If Not String.IsNullOrEmpty(sCurrSaw) And Not String.IsNullOrEmpty(sCurrSawing) Then
|
||||
bSaw = EgtSetCalcTool(sCurrSaw, "H1", 1)
|
||||
End If
|
||||
m_SingleCut.SetEnableParam(bSaw)
|
||||
m_MultipleCut.SetEnableParam(bSaw)
|
||||
m_GridCut.SetEnableParam(bSaw)
|
||||
End Sub
|
||||
|
||||
Private Sub SetVisibilityJogButtuns()
|
||||
XYBtn.Visibility = Visibility.Collapsed
|
||||
ZCBtn.Visibility = Visibility.Collapsed
|
||||
ZBBtn.Visibility = Visibility.Collapsed
|
||||
RemoteBtn.Visibility = Visibility.Collapsed
|
||||
ParkingBtn.Visibility = Visibility.Collapsed
|
||||
|
||||
Dim Item As MachineButton = Nothing
|
||||
For Each Item In m_ButtonJogList
|
||||
Select Case Item.StateFlag.Trim
|
||||
Case K_XYJOG
|
||||
XYBtn.Visibility = Visibility.Visible
|
||||
XYBtn.Foreground = Brushes.White
|
||||
XYBtn.ToolTip = "X - Y"
|
||||
Case K_ZCJOG
|
||||
ZCBtn.Visibility = Visibility.Visible
|
||||
ZCBtn.Foreground = Brushes.White
|
||||
ZCBtn.ToolTip = "Z - C"
|
||||
Case K_ZBJOG
|
||||
ZBBtn.Visibility = Visibility.Visible
|
||||
ZBBtn.Foreground = Brushes.White
|
||||
ZBBtn.ToolTip = "Z - B"
|
||||
Case K_REMOTE
|
||||
RemoteBtn.Visibility = Visibility.Visible
|
||||
RemoteBtn.Foreground = Brushes.White
|
||||
RemoteBtn.Content = "Remote"
|
||||
Case K_PARKING
|
||||
ParkingBtn.Visibility = Visibility.Visible
|
||||
ParkingBtn.Foreground = Brushes.White
|
||||
ParkingBtn.ToolTip = "Parking"
|
||||
End Select
|
||||
Next
|
||||
End Sub
|
||||
|
||||
Private Sub PhotoBtn_Click(sender As Object, e As RoutedEventArgs) Handles PhotoBtn.Click
|
||||
EgtSetCurrentContext(m_MainWindow.m_CurrentProjectPageUC.CurrentProjectScene.GetCtx())
|
||||
' Se macchina fotografica collegata, faccio una foto
|
||||
@@ -342,7 +390,16 @@ Public Class DirectCutPageUC
|
||||
|
||||
'------------------NUOVI BOTTONI PER GESTIONE JOYSTICK-------------------------------------------------
|
||||
Private Sub XYBtn_Click(sender As Object, e As RoutedEventArgs) Handles XYBtn.Click
|
||||
Dim XYJogButton As MachineButton = m_ButtonJogList(0)
|
||||
' riverco in elenco il bottone XYJog
|
||||
Dim XYJogButton As MachineButton = Nothing
|
||||
Dim ItemButton As MachineButton = Nothing
|
||||
For Each ItemButton In m_ButtonJogList
|
||||
If ItemButton.StateFlag = K_XYJOG Then
|
||||
XYJogButton = ItemButton
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
If IsNothing(XYJogButton) Then Return
|
||||
' eseguo lo script lua associato
|
||||
XYJogButton.ExecuteMDICommand(XYJogButton.TLuaScriptName)
|
||||
' che comunica al PLC di cambiare lo stato, la modifica dello stato è intercettata dalla funzione Refresh che avvia il metodo Changed
|
||||
@@ -365,7 +422,16 @@ Public Class DirectCutPageUC
|
||||
End Sub
|
||||
|
||||
Private Sub ZCBtn_Click(sender As Object, e As RoutedEventArgs) Handles ZCBtn.Click
|
||||
Dim ZJogButton As MachineButton = m_ButtonJogList(1)
|
||||
' riverco in elenco il bottone ZCYJog
|
||||
Dim ZJogButton As MachineButton = Nothing
|
||||
Dim ItemButton As MachineButton = Nothing
|
||||
For Each ItemButton In m_ButtonJogList
|
||||
If ItemButton.StateFlag = K_ZCJOG Then
|
||||
ZJogButton = ItemButton
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
If IsNothing(ZJogButton) Then Return
|
||||
' eseguo lo script lua associato
|
||||
ZJogButton.ExecuteMDICommand(ZJogButton.TLuaScriptName)
|
||||
End Sub
|
||||
@@ -386,9 +452,18 @@ Public Class DirectCutPageUC
|
||||
End Sub
|
||||
|
||||
Private Sub ZBBtn_Click(sender As Object, e As RoutedEventArgs) Handles ZBBtn.Click
|
||||
Dim BCJogButton As MachineButton = m_ButtonJogList(2)
|
||||
' riverco in elenco il bottone ZCYJog
|
||||
Dim ZBJogButton As MachineButton = Nothing
|
||||
Dim ItemButton As MachineButton = Nothing
|
||||
For Each ItemButton In m_ButtonJogList
|
||||
If ItemButton.StateFlag = K_ZBJOG Then
|
||||
ZBJogButton = ItemButton
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
If IsNothing(ZBJogButton) Then Return
|
||||
' eseguo lo script lua associato
|
||||
BCJogButton.ExecuteMDICommand(BCJogButton.TLuaScriptName)
|
||||
ZBJogButton.ExecuteMDICommand(ZBJogButton.TLuaScriptName)
|
||||
End Sub
|
||||
|
||||
Friend Sub ZBJogChanged(bBCAxes As Boolean)
|
||||
@@ -405,6 +480,81 @@ Public Class DirectCutPageUC
|
||||
ZBBtn.IsChecked = bBCAxes
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub RemoteBtn_Click(sender As Object, e As RoutedEventArgs) Handles RemoteBtn.Click
|
||||
Dim RemoteButton As MachineButton = Nothing
|
||||
Dim ItemButton As MachineButton = Nothing
|
||||
For Each ItemButton In m_ButtonJogList
|
||||
If ItemButton.StateFlag = K_REMOTE Then
|
||||
RemoteButton = ItemButton
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
If IsNothing(RemoteButton) Then Return
|
||||
' eseguo lo script lua associato
|
||||
Dim CurrentBtn As Primitives.ToggleButton = e.Source
|
||||
Dim sLuaFileName As String = String.Empty
|
||||
' verifico lo stato del bottone per avviare il giusto script
|
||||
If CurrentBtn.IsChecked() Then
|
||||
sLuaFileName = RemoteButton.TLuaScriptName
|
||||
Else
|
||||
sLuaFileName = RemoteButton.FLuaScriptName
|
||||
End If
|
||||
RemoteButton.ExecuteMDICommand(sLuaFileName)
|
||||
End Sub
|
||||
|
||||
Friend Sub RemoteChanged(bRemote As Boolean)
|
||||
' devo decodificare il tipo di pulsante, quindi eseguire la conversione...
|
||||
Dim RemoteButton As TwoStateButton = Nothing
|
||||
For Each MachineButton As MachineButton In m_ButtonJogList
|
||||
If MachineButton.StateFlag.Trim = K_REMOTE Then
|
||||
RemoteButton = MachineButton
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
If Not IsNothing(RemoteButton) Then
|
||||
RemoteButton.SetIsChecked(bRemote)
|
||||
RemoteBtn.IsChecked = bRemote
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub ParkingBtn_Click(sender As Object, e As RoutedEventArgs) Handles ParkingBtn.Click
|
||||
Dim ParkingButton As MachineButton = Nothing
|
||||
Dim ItemButton As MachineButton = Nothing
|
||||
For Each ItemButton In m_ButtonJogList
|
||||
If ItemButton.StateFlag = K_PARKING Then
|
||||
ParkingButton = ItemButton
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
If IsNothing(ParkingButton) Then Return
|
||||
' eseguo lo script lua associato
|
||||
Dim CurrentBtn As Primitives.ToggleButton = e.Source
|
||||
Dim sLuaFileName As String = String.Empty
|
||||
' verifico lo stato del bottone per avviare il giusto script
|
||||
If CurrentBtn.IsChecked() Then
|
||||
sLuaFileName = ParkingButton.TLuaScriptName
|
||||
Else
|
||||
sLuaFileName = ParkingButton.FLuaScriptName
|
||||
End If
|
||||
ParkingButton.ExecuteMDICommand(sLuaFileName)
|
||||
End Sub
|
||||
|
||||
Friend Sub ParkingStateChanged(bParkingState As Boolean)
|
||||
' devo decodificare il tipo di pulsante, quindi eseguire la conversione...
|
||||
Dim ParkingButton As TwoStateButton = Nothing
|
||||
For Each MachineButton As MachineButton In m_ButtonJogList
|
||||
If MachineButton.StateFlag.Trim = K_PARKING Then
|
||||
ParkingButton = MachineButton
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
If Not IsNothing(ParkingButton) Then
|
||||
ParkingButton.SetIsChecked(bParkingState)
|
||||
ParkingButton.IsChecked = bParkingState
|
||||
End If
|
||||
End Sub
|
||||
|
||||
'------------------NUOVI BOTTONI PER GESTIONE JOYSTICK-------------------------------------------------
|
||||
Private Sub MachViewModeBtn_Click(sender As Object, e As RoutedEventArgs) Handles MachViewModeBtn.Click
|
||||
If m_bShowMachine Then
|
||||
@@ -462,124 +612,4 @@ Public Class DirectCutPageUC
|
||||
|
||||
End Sub
|
||||
|
||||
'' ------------------------ GESTIONE SECONDA PAGINA ------------------------
|
||||
'Private Sub ClearButton(nCount As Integer)
|
||||
' Dim nEndIndex As Integer
|
||||
' If m_bIsFirstPage Then
|
||||
' nEndIndex = If(nCount < 8, nCount, 8)
|
||||
' Else
|
||||
' nEndIndex = If(nCount < 16, nCount - 8, 8)
|
||||
' End If
|
||||
' For index As Integer = 1 To nEndIndex
|
||||
' GetLabel(index).Text = String.Empty
|
||||
' GetImage(index).Source = Nothing
|
||||
' GetButton(index).Visibility = Windows.Visibility.Visible
|
||||
' Next
|
||||
' For index As Integer = nEndIndex + 1 To 8
|
||||
' GetLabel(index).Text = String.Empty
|
||||
' GetImage(index).Source = Nothing
|
||||
' GetButton(index).Visibility = Windows.Visibility.Hidden
|
||||
' Next
|
||||
'End Sub
|
||||
|
||||
'Private Sub LoadPage()
|
||||
' Dim nDeltaSecondPage As Integer = 8
|
||||
' ' Leggo numero di componenti presenti
|
||||
' Dim nCompoNumber As Integer = GetPrivateProfileInt("Compo", "Count", 0, m_MainWindow.GetIniFile())
|
||||
' ' Calcolo indici a seconda della pagina in cui sono
|
||||
' If m_bIsFirstPage Then
|
||||
' ClearButton(nCompoNumber)
|
||||
' nDeltaSecondPage = 0
|
||||
' Else
|
||||
' ClearButton(nCompoNumber)
|
||||
' nDeltaSecondPage = 8
|
||||
' End If
|
||||
|
||||
' ' Creazione converter da String a ImageSource
|
||||
' Dim ImageConverter As New ImageSourceConverter
|
||||
' Dim ThicknessConverter As New ThicknessConverter
|
||||
|
||||
' 'Assegnazione immagine e testo ai Button
|
||||
' For index As Integer = 1 To 8
|
||||
' Dim CustomThickness As New Thickness(0)
|
||||
' Dim nCompoName As Integer = GetPrivateProfileInt("Compo" & index + nDeltaSecondPage, "Name", 0, m_MainWindow.GetIniFile())
|
||||
' Dim sCompoImage As String = ""
|
||||
' Dim sCompoImageSource As ImageSource
|
||||
|
||||
' 'verifico presenza immagine e la aggiungo
|
||||
' If GetPrivateProfileString("Compo" & index + nDeltaSecondPage, "Image", "", sCompoImage, m_MainWindow.GetIniFile()) <> 0 Then
|
||||
' Try
|
||||
' sCompoImageSource = ImageConverter.ConvertFromString(m_MainWindow.GetResourcesDir() & "\" & sCompoImage)
|
||||
' GetImage(index).Height = 65
|
||||
' GetImage(index).Width = 65
|
||||
' GetImage(index).Source = sCompoImageSource
|
||||
' Catch ex As Exception
|
||||
' EgtOutLog("Error loading image " & sCompoImage)
|
||||
' sCompoImage = String.Empty
|
||||
' GetImage(index).Height = 0
|
||||
' GetImage(index).Width = 0
|
||||
' CustomThickness.Right = 0
|
||||
' GetImage(index).Margin = CustomThickness
|
||||
' End Try
|
||||
' Else
|
||||
' 'Se non c'è l'immagine azzero la distanza tra testo e immagine
|
||||
' CustomThickness.Right = 0
|
||||
' GetImage(index).Margin = CustomThickness
|
||||
' End If
|
||||
|
||||
' 'verifico presenza testo
|
||||
' If nCompoName > 0 Then
|
||||
' Dim sCompoName As String = EgtMsg(MSG_COMPONENTPAGEUC + nCompoName)
|
||||
' 'verifico presenza immagine
|
||||
' If sCompoImage.Length > 0 Then
|
||||
' 'se la lunghezza del testo è maggiore di 15 lo taglio
|
||||
' If sCompoName.Length > 15 Then
|
||||
' sCompoName = sCompoName.Substring(0, 15)
|
||||
' End If
|
||||
' GetLabel(index).Text = sCompoName
|
||||
' 'Se ci sono sia testo che immagine imposto un margine di 10
|
||||
' CustomThickness.Right = 10
|
||||
' GetImage(index).Margin = CustomThickness
|
||||
' Else
|
||||
' 'se l'immagine non c'è e il testo è maggiore di 20 lo taglio
|
||||
' If sCompoName.Length > 20 Then
|
||||
' sCompoName = sCompoName.Substring(0, 20)
|
||||
' End If
|
||||
' GetLabel(index).Text = sCompoName
|
||||
' End If
|
||||
' Else
|
||||
' 'Se non c'è testo azzero la distanza tra testo e immagine
|
||||
' CustomThickness.Right = 0
|
||||
' GetImage(index).Margin = CustomThickness
|
||||
' End If
|
||||
|
||||
' Next
|
||||
|
||||
'End Sub
|
||||
|
||||
'' Gestione bottone altri componenti
|
||||
'Private Sub Compo9_Click(sender As Object, e As RoutedEventArgs) Handles Compo9.Click
|
||||
' If m_bIsFirstPage Then
|
||||
' m_bIsFirstPage = False
|
||||
' LoadPage()
|
||||
' 'Compo9.SetValue(Grid.ColumnProperty, 1)
|
||||
' 'Compo9.SetValue(Grid.ColumnSpanProperty, 1)
|
||||
' 'ImageCompo9.Source = New System.Windows.Media.Imaging.BitmapImage(New Uri("/Resources/NumericKeyboardArrow.png", UriKind.Relative))
|
||||
' 'ImageCompo9.Visibility = Windows.Visibility.Visible
|
||||
' 'LabelCompo9.Visibility = Windows.Visibility.Hidden
|
||||
' Compo9.SetValue(Grid.ColumnProperty, 0)
|
||||
' Compo9.SetValue(Grid.ColumnSpanProperty, 2)
|
||||
' ImageCompo9.Visibility = Windows.Visibility.Hidden
|
||||
' LabelCompo9.Visibility = Windows.Visibility.Visible
|
||||
' Else
|
||||
' m_bIsFirstPage = True
|
||||
' LoadPage()
|
||||
' Compo9.SetValue(Grid.ColumnProperty, 0)
|
||||
' Compo9.SetValue(Grid.ColumnSpanProperty, 2)
|
||||
' ImageCompo9.Visibility = Windows.Visibility.Hidden
|
||||
' LabelCompo9.Visibility = Windows.Visibility.Visible
|
||||
' End If
|
||||
'End Sub
|
||||
|
||||
|
||||
End Class
|
||||
|
||||
@@ -38,12 +38,17 @@
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<ToggleButton Name="Point1Btn" Grid.Column="0"
|
||||
Style="{DynamicResource OmagCut_YellowToggleButton}"/>
|
||||
<ToggleButton Name="Point2Btn" Grid.Column="1"
|
||||
Style="{DynamicResource OmagCut_YellowToggleButton}"/>
|
||||
<ToggleButton Name="Point1Btn" Grid.Column="0"
|
||||
Style="{DynamicResource OmagCut_YellowIconToggleButton}">
|
||||
<Image Source="{DynamicResource Acquisisci-P1Img}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
</ToggleButton>
|
||||
|
||||
</Grid>
|
||||
<ToggleButton Name="Point2Btn" Grid.Column="1"
|
||||
Style="{DynamicResource OmagCut_YellowIconToggleButton}">
|
||||
<Image Source="{DynamicResource Acquisisci-P2Img}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
</ToggleButton>
|
||||
|
||||
</Grid>
|
||||
|
||||
<ComboBox Name="PointModeCmBx" Grid.Row="1" Grid.ColumnSpan="2" Style="{StaticResource OmagCut_ComboBox}" Margin="6,0,6,0">
|
||||
<ComboBox.ItemTemplate>
|
||||
@@ -125,12 +130,16 @@
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Button Name="SimulBtn" Grid.Column="0" Style="{DynamicResource OmagCut_GradientBlueTextButton}"/>
|
||||
<Button Name="OkBtn" Grid.Column="1" Style="{DynamicResource OmagCut_GradientBlueTextButton}"/>
|
||||
<Button Name="ExitBtn" Grid.Column="2" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource XImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
</Grid>
|
||||
<Button Name="SimulBtn" Grid.Column="0" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource SimulaImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="OkBtn" Grid.Column="1" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource EseguiImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="ExitBtn" Grid.Column="2" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource XImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
</Grid>
|
||||
|
||||
</Grid>
|
||||
|
||||
|
||||
@@ -66,6 +66,7 @@ Public Class FlatteningCut
|
||||
Right
|
||||
End Enum
|
||||
|
||||
' Per abilitare la spianatura con la FRESA deve essere imposatato a TRUE il flag "Usa Fresa" nella pagina MACCHINA (campo INCISIONI)
|
||||
Private Sub FlatteningCut_Initialized(sender As Object, e As EventArgs) Handles Me.Initialized
|
||||
' Creo lista modalità di acquisizione punto
|
||||
m_PointsModeArray(PT_MODE.SAW) = EgtMsg(MSG_DIRECTCUTPAGEUC + 24)
|
||||
@@ -79,8 +80,8 @@ Public Class FlatteningCut
|
||||
' la associo alla combobox
|
||||
TypeCmBx.ItemsSource = m_TypeArray
|
||||
' assegno messaggi
|
||||
Point1Btn.Content = EgtMsg(MSG_DIRECTCUTPAGEUC + 10)
|
||||
Point2Btn.Content = EgtMsg(MSG_DIRECTCUTPAGEUC + 11)
|
||||
Point1Btn.ToolTip = EgtMsg(MSG_DIRECTCUTPAGEUC + 10)
|
||||
Point2Btn.ToolTip = EgtMsg(MSG_DIRECTCUTPAGEUC + 11)
|
||||
DepthTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 13)
|
||||
LenghtTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 14)
|
||||
DirectionTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 15)
|
||||
@@ -89,8 +90,8 @@ Public Class FlatteningCut
|
||||
ZReleasedTxBl.Text = "Z Svincolo"
|
||||
SideTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 23)
|
||||
RotLockTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 29)
|
||||
SimulBtn.Content = EgtMsg(MSG_CADCUTPAGEUC + 1)
|
||||
OkBtn.Content = EgtMsg(MSG_DIRECTCUTPAGEUC + 30)
|
||||
SimulBtn.ToolTip = EgtMsg(MSG_CADCUTPAGEUC + 1)
|
||||
OkBtn.ToolTip = EgtMsg(MSG_DIRECTCUTPAGEUC + 30)
|
||||
' Carico i dati dell'ultimo taglio
|
||||
m_dDepth = GetPrivateProfileDouble( S_DIRECTCUTS, K_DC_FLATT_DEPTH, m_dDepth, m_MainWindow.GetIniFile())
|
||||
m_dAngO = GetPrivateProfileDouble( S_DIRECTCUTS, K_DC_FLATT_ANGH, m_dAngO, m_MainWindow.GetIniFile())
|
||||
@@ -444,8 +445,8 @@ Public Class FlatteningCut
|
||||
StringToLen(WidthTxBx.Text, dWidth)
|
||||
' Recupero lo spessore della lama corrente
|
||||
EgtTdbSetCurrTool(m_MainWindow.m_CurrentMachine.sCurrSaw)
|
||||
Dim dThick As Double = 0
|
||||
EgtTdbGetCurrToolParam(MCH_TP.THICK, dThick)
|
||||
Dim dThick As Double = GetFootPrintTool()
|
||||
'EgtTdbGetCurrToolParam(MCH_TP.THICK, dThick)
|
||||
' La larghezza della spianatura nono può essere inferiore allo spessore della lama
|
||||
m_dWid = Math.Max(dWidth, dThick)
|
||||
WidthTxBx.Text = LenToString(m_dWid, 2)
|
||||
@@ -472,8 +473,8 @@ Public Class FlatteningCut
|
||||
|
||||
Private Sub OverlapTxBx_EgtClosed(sender As Object, e As EventArgs) Handles OverlapTxBx.EgtClosed
|
||||
' Recupero spessore della lama correntemente attiva
|
||||
Dim dThick As Double = 0
|
||||
EgtTdbGetCurrToolParam(MCH_TP.THICK, dThick)
|
||||
Dim dThick As Double = GetFootPrintTool()
|
||||
'EgtTdbGetCurrToolParam(MCH_TP.THICK, dThick)
|
||||
' Verifico che la sovrapposizione non sia superiore allo spessore della lama (meno 1mm di offset)
|
||||
Dim dOverlap As Double = 0
|
||||
Const MIN_OFFSET As Double = 1.0
|
||||
@@ -612,6 +613,24 @@ Public Class FlatteningCut
|
||||
m_MainWindow.m_DirectCutPageUC.LeftButtonGrid.Children.Remove(Me)
|
||||
End Sub
|
||||
|
||||
' ricavo l'ingombro di lavorazione in funzione dell'utensile selezionato
|
||||
Private Function GetFootPrintTool() As Double
|
||||
' vedere nella pagina Allarm il capito "Incisioni"
|
||||
Dim bForceUseMill As Boolean = (GetPrivateProfileInt(S_MACH_NEST, K_MACH_ENGRAVING_WITHMILL, 1, m_MainWindow.GetMachIniFile()) <> 0)
|
||||
Dim dFootPrint As Double = 0
|
||||
' verifico quale lavorazione è attiva
|
||||
If Not String.IsNullOrEmpty(m_MainWindow.m_CurrentMachine.sCurrSawing) AndAlso Not bForceUseMill Then
|
||||
EgtTdbGetCurrToolParam(MCH_TP.THICK, dFootPrint)
|
||||
ElseIf Not String.IsNullOrEmpty(m_MainWindow.m_CurrentMachine.sCurrMilling) Then
|
||||
Dim sCurrMill = m_MainWindow.m_CurrentMachine.sCurrMill
|
||||
GetDrillFromDrilling(sCurrMill, m_MainWindow.m_CurrentMachine.sCurrMilling)
|
||||
' recupero informazioni della fresa in uso
|
||||
EgtTdbSetCurrTool(sCurrMill)
|
||||
EgtTdbGetCurrToolParam(MCH_TP.DIAM, dFootPrint)
|
||||
End If
|
||||
Return dFootPrint
|
||||
End Function
|
||||
|
||||
Private Function CreateFlatteningCut() As Boolean
|
||||
' Verifico sia definito il punto iniziale e il grezzo
|
||||
If Not m_bPointP1Ok Or Not m_bRawOk Then
|
||||
@@ -628,13 +647,17 @@ Public Class FlatteningCut
|
||||
Dim nPartId = EgtCreateGroup(GDB_ID.ROOT)
|
||||
EgtSetName(nPartId, NAME_DIRECTCUT)
|
||||
Dim nLayerId = EgtCreateGroup(nPartId)
|
||||
EgtSetName(nLayerId, NAME_OUTLOOP)
|
||||
' EgtSetName(nLayerId, NAME_OUTLOOP)
|
||||
EgtSetName(nLayerId, NAME_ONPATH)
|
||||
' Creo il taglio
|
||||
Dim ptStart As Point3d = m_ptTipP1
|
||||
ptStart.z = 0
|
||||
Dim nCutId = EgtCreateLinePDL(nLayerId, ptStart, m_dAngO, m_dLen)
|
||||
' Imposto affondamento e angolo di fianco sul taglio
|
||||
EgtSetInfo(nCutId, INFO_DEPTH, m_dDepth)
|
||||
If (GetPrivateProfileInt(S_MACH_NEST, K_MACH_ENGRAVING_WITHMILL, 1, m_MainWindow.GetMachIniFile()) <> 0) Then
|
||||
EgtSetInfo(nCutId, INFO_WIDTH, GetFootPrintTool)
|
||||
End If
|
||||
EgtSetInfo(nCutId, INFO_SIDE_ANGLE, 0)
|
||||
' Imposto prima direzione
|
||||
EgtSetInfo(nCutId, INFO_DIR, 1)
|
||||
@@ -670,22 +693,21 @@ Public Class FlatteningCut
|
||||
RemoveFinalHome()
|
||||
End If
|
||||
UpdateSimulOkBtn()
|
||||
|
||||
|
||||
|
||||
Return m_bCutOk
|
||||
End Function
|
||||
|
||||
Private Function MultiplyCut(nLayerId As Integer, nCutId As Integer) As Boolean
|
||||
' Recupero spessore della lama correntemente attiva
|
||||
Dim dThick As Double = 0
|
||||
EgtTdbGetCurrToolParam(MCH_TP.THICK, dThick)
|
||||
' Recupero spessore della lama (utensile) correntemente attiva
|
||||
Dim dThick As Double = GetFootPrintTool()
|
||||
If dThick = 0 Then Return False
|
||||
|
||||
' Imposto angolo di rotazione a seconda del lato dei tagli
|
||||
Dim dRotAngO As Double = If(SideChBx.IsChecked(), -90, 90)
|
||||
' Definisco vettore di spostamento
|
||||
Dim vtDelta As Vector3d
|
||||
vtDelta = Vector3d.FromPolar(1, m_dAngO)
|
||||
vtDelta.Rotate(Vector3d.Z_AX, dRotAngO)
|
||||
|
||||
' Calcolo numero di iterazioni necessarie a coprire l'area impostata e lunghezza vettore delta
|
||||
Dim nStepNum As Integer
|
||||
Dim dDelta As Double
|
||||
|
||||
+19
-11
@@ -34,12 +34,16 @@
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<ToggleButton Name="Point1Btn" Grid.Column="0"
|
||||
Style="{DynamicResource OmagCut_YellowToggleButton}"/>
|
||||
<ToggleButton Name="Point2Btn" Grid.Column="1"
|
||||
Style="{DynamicResource OmagCut_YellowToggleButton}"/>
|
||||
<ToggleButton Name="Point1Btn" Grid.Column="0"
|
||||
Style="{DynamicResource OmagCut_YellowIconToggleButton}">
|
||||
<Image Source="{DynamicResource Acquisisci-P1Img}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
</ToggleButton>
|
||||
|
||||
</Grid>
|
||||
<ToggleButton Name="Point2Btn" Grid.Column="1"
|
||||
Style="{DynamicResource OmagCut_YellowIconToggleButton}">
|
||||
<Image Source="{DynamicResource Acquisisci-P2Img}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
</ToggleButton>
|
||||
</Grid>
|
||||
|
||||
<ComboBox Name="PointModeCmBx" Grid.Row="1" Grid.ColumnSpan="2" Style="{StaticResource OmagCut_ComboBox}"
|
||||
Margin="6,0,6,0">
|
||||
@@ -131,12 +135,16 @@
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Button Name="SimulBtn" Grid.Column="0" Style="{DynamicResource OmagCut_GradientBlueTextButton}"/>
|
||||
<Button Name="OkBtn" Grid.Column="1" Style="{DynamicResource OmagCut_GradientBlueTextButton}"/>
|
||||
<Button Name="ExitBtn" Grid.Column="2" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource XImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
</Grid>
|
||||
<Button Name="SimulBtn" Grid.Column="0" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource SimulaImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="OkBtn" Grid.Column="1" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource EseguiImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="ExitBtn" Grid.Column="2" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource XImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
</Grid>
|
||||
|
||||
</Grid>
|
||||
|
||||
|
||||
+34
-20
@@ -63,8 +63,8 @@ Public Class GridCut
|
||||
' la associo alla combobox
|
||||
PointModeCmBx.ItemsSource = m_PointsModeArray
|
||||
' assegno messaggi
|
||||
Point1Btn.Content = EgtMsg(MSG_DIRECTCUTPAGEUC + 10)
|
||||
Point2Btn.Content = EgtMsg(MSG_DIRECTCUTPAGEUC + 11)
|
||||
Point1Btn.ToolTip = EgtMsg(MSG_DIRECTCUTPAGEUC + 10)
|
||||
Point2Btn.ToolTip = EgtMsg(MSG_DIRECTCUTPAGEUC + 11)
|
||||
DepthTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 13)
|
||||
DirectionTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 15)
|
||||
SideAngleTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 16)
|
||||
@@ -73,8 +73,8 @@ Public Class GridCut
|
||||
NumPzYTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 21)
|
||||
DimPzYTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 22)
|
||||
SideTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 23)
|
||||
SimulBtn.Content = EgtMsg(MSG_CADCUTPAGEUC + 1)
|
||||
OkBtn.Content = EgtMsg(MSG_DIRECTCUTPAGEUC + 30)
|
||||
SimulBtn.ToolTip = EgtMsg(MSG_CADCUTPAGEUC + 1)
|
||||
OkBtn.ToolTip = EgtMsg(MSG_DIRECTCUTPAGEUC + 30)
|
||||
' Carico i dati dell'ultimo taglio
|
||||
m_dDepth = GetPrivateProfileDouble( S_DIRECTCUTS, K_DC_GRID_DEPTH, m_dDepth, m_MainWindow.GetIniFile())
|
||||
m_dAngO = GetPrivateProfileDouble( S_DIRECTCUTS, K_DC_GRID_ANGH, m_dAngO, m_MainWindow.GetIniFile())
|
||||
@@ -152,6 +152,7 @@ Public Class GridCut
|
||||
EgtDraw()
|
||||
End Sub
|
||||
|
||||
|
||||
Friend Sub GridCut_Unloaded(sender As Object, e As RoutedEventArgs) Handles Me.Unloaded
|
||||
' Salvo i dati correnti
|
||||
WritePrivateProfileString( S_DIRECTCUTS, K_DC_GRID_DEPTH, DoubleToString( m_dDepth, 2), m_MainWindow.GetIniFile())
|
||||
@@ -185,6 +186,11 @@ Public Class GridCut
|
||||
m_bActive = False
|
||||
End Sub
|
||||
|
||||
Public Sub SetEnableParam(ByVal bIsSaw As Boolean)
|
||||
' se macchina solo WaterJet Disabilito/Nascondo parametri della lama
|
||||
DepthTxBx.IsEnabled = bIsSaw
|
||||
End Sub
|
||||
|
||||
Private Sub UpdateSimulOkBtn()
|
||||
If m_bCutOk Then
|
||||
SimulBtn.IsEnabled = True
|
||||
@@ -242,6 +248,12 @@ Public Class GridCut
|
||||
' Verifico configurazione tavola e grezzo
|
||||
If Not m_bRawOk Then Return
|
||||
|
||||
' Recupero dati utensile e testa corrente
|
||||
Dim sTool As String = ""
|
||||
Dim sHead As String = ""
|
||||
Dim nExit As Integer = 0
|
||||
EgtGetCalcTool(sTool, sHead, nExit)
|
||||
|
||||
' Se acquisizone lama o laser
|
||||
If PointModeCmBx.SelectedIndex = PT_MODE.SAW Or PointModeCmBx.SelectedIndex = PT_MODE.LASER Then
|
||||
|
||||
@@ -256,12 +268,12 @@ Public Class GridCut
|
||||
If Not EgtSetCalcTool("", "H3", 1) Then Return
|
||||
' Trasformo in posizione punta utensile in basso
|
||||
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, dR1, dR2, True, m_ptTipP1) Then Return
|
||||
' Ora imposto la lama corrente
|
||||
If Not EgtSetCalcTool(sSaw, "H1", 1) Then Return
|
||||
' Reimposto eventuale precedente utensile
|
||||
EgtSetCalcTool(sTool, sHead, nExit)
|
||||
' Altrimenti da lama
|
||||
Else
|
||||
' Imposto la lama corrente
|
||||
If Not EgtSetCalcTool(sSaw, "H1", 1) Then Return
|
||||
' Reimposto eventuale precedente utensile
|
||||
EgtSetCalcTool(sTool, sHead, nExit)
|
||||
' Trasformo in posizione punta utensile in basso
|
||||
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, dR1, dR2, True, m_ptTipP1) Then Return
|
||||
End If
|
||||
@@ -285,10 +297,8 @@ Public Class GridCut
|
||||
' Porto il tip nell'origine tavola
|
||||
m_ptTipP1.ToLoc(New Frame3d(m_ptTabOri))
|
||||
m_bPointP1Ok = True
|
||||
' Ricavo dati lama corrente
|
||||
Dim sSaw As String = m_MainWindow.m_CurrentMachine.sCurrSaw
|
||||
' Imposto la lama corrente
|
||||
If Not EgtSetCalcTool(sSaw, "H1", 1) Then Return
|
||||
' Reimposto eventuale precedente utensile
|
||||
EgtSetCalcTool(sTool, sHead, nExit)
|
||||
End If
|
||||
|
||||
' Disegno il taglio
|
||||
@@ -317,6 +327,12 @@ Public Class GridCut
|
||||
' Verifico configurazione tavola e grezzo
|
||||
If Not m_bRawOk Then Return
|
||||
|
||||
' Recupero dati utensile e testa corrente
|
||||
Dim sTool As String = ""
|
||||
Dim sHead As String = ""
|
||||
Dim nExit As Integer = 0
|
||||
EgtGetCalcTool(sTool, sHead, nExit)
|
||||
|
||||
' Se acquisizone lama o laser
|
||||
If PointModeCmBx.SelectedIndex = PT_MODE.SAW Or PointModeCmBx.SelectedIndex = PT_MODE.LASER Then
|
||||
|
||||
@@ -331,12 +347,12 @@ Public Class GridCut
|
||||
If Not EgtSetCalcTool("", "H3", 1) Then Return
|
||||
' Trasformo in posizione punta utensile in basso
|
||||
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, dR1, dR2, True, m_ptTipP2) Then Return
|
||||
' Ora imposto la lama corrente
|
||||
If Not EgtSetCalcTool(sSaw, "H1", 1) Then Return
|
||||
' Reimposto eventuale precedente utensile
|
||||
EgtSetCalcTool(sTool, sHead, nExit)
|
||||
' Altrimenti da lama
|
||||
Else
|
||||
' Imposto la lama corrente
|
||||
If Not EgtSetCalcTool(sSaw, "H1", 1) Then Return
|
||||
' Reimposto eventuale precedente utensile
|
||||
EgtSetCalcTool(sTool, sHead, nExit)
|
||||
' Trasformo in posizione punta utensile in basso
|
||||
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, dR1, dR2, True, m_ptTipP2) Then Return
|
||||
End If
|
||||
@@ -358,10 +374,8 @@ Public Class GridCut
|
||||
' Porto il tip nell'origine tavola
|
||||
m_ptTipP2.ToLoc(New Frame3d(m_ptTabOri))
|
||||
m_bPointP2Ok = True
|
||||
' Ricavo dati lama corrente
|
||||
Dim sSaw As String = m_MainWindow.m_CurrentMachine.sCurrSaw
|
||||
' Imposto la lama corrente
|
||||
If Not EgtSetCalcTool(sSaw, "H1", 1) Then Return
|
||||
' Reimposto eventuale precedente utensile
|
||||
EgtSetCalcTool(sTool, sHead, nExit)
|
||||
End If
|
||||
|
||||
' Se il secondo punto non coincide con il primo, disegno il taglio
|
||||
|
||||
@@ -19,7 +19,8 @@
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<ToggleButton Name="MachineButton1" Grid.Column="0" Style="{DynamicResource OmagCut_ModifiedGradientYellowIconToggleButton}">
|
||||
<Image Name="ImageButton1" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
@@ -61,6 +62,10 @@
|
||||
<Image Name="ImageButton10" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
</ToggleButton>
|
||||
|
||||
</Grid>
|
||||
<ToggleButton Name="MachineButton11" Grid.Column="10" Style="{DynamicResource OmagCut_ModifiedGradientYellowIconToggleButton}">
|
||||
<Image Name="ImageButton11" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
</ToggleButton>
|
||||
|
||||
</Grid>
|
||||
|
||||
</UserControl>
|
||||
|
||||
@@ -10,7 +10,8 @@ Public Class MachineButtonsUC
|
||||
Private m_bOnlyLaser As Boolean = False
|
||||
Private m_bFirst As Boolean = True
|
||||
|
||||
Private Const MAX_BUTTONS As Integer = 10
|
||||
' 9/2 aggiunto spazio per un nuovo bottone
|
||||
Private Const MAX_BUTTONS As Integer = 11
|
||||
Private m_nCount As Integer = 0
|
||||
Private ImageArrayY(MAX_BUTTONS - 1) As String
|
||||
Private ImageArrayN(MAX_BUTTONS - 1) As String
|
||||
@@ -31,6 +32,10 @@ Public Class MachineButtonsUC
|
||||
Private Const BTN_STATE_NOTHING As String = "Nothing"
|
||||
Private Const BTN_STATE_DOOR_OPENED As String = "DoorOpened"
|
||||
Private Const BTN_STATE_DOOR_CLOSED As String = "DoorClosed"
|
||||
Private Const BTN_STATE_PARKING As String = "Parking"
|
||||
Private Const BTN_ENABLE_ZONE_1 As String = "EnableZone1"
|
||||
Private Const BTN_ENABLE_ZONE_2 As String = "EnableZone2"
|
||||
Private Const BTN_ENABLE_PC As String = "EnablePC"
|
||||
|
||||
Public Sub New(Optional bOnlyLaser As Boolean = False)
|
||||
' This call is required by the designer.
|
||||
@@ -75,7 +80,10 @@ Public Class MachineButtonsUC
|
||||
For nIndex As Integer = 0 To m_nCount - 1
|
||||
If StateFlagArray(nIndex) = BTN_STATE_NOTHING OrElse
|
||||
StateFlagArray(nIndex) = BTN_STATE_DOOR_OPENED OrElse
|
||||
StateFlagArray(nIndex) = BTN_STATE_DOOR_CLOSED Then
|
||||
StateFlagArray(nIndex) = BTN_STATE_DOOR_CLOSED OrElse
|
||||
StateFlagArray(nIndex) = BTN_ENABLE_PC OrElse
|
||||
StateFlagArray(nIndex) = BTN_ENABLE_ZONE_1 OrElse
|
||||
StateFlagArray(nIndex) = BTN_ENABLE_ZONE_2 Then
|
||||
' mostra immagine fissa
|
||||
Try
|
||||
Dim s As String
|
||||
@@ -121,6 +129,8 @@ Public Class MachineButtonsUC
|
||||
CurrToggleBtn.Content = "Z - C"
|
||||
ElseIf StateFlagArray(nIndex) = K_ZBJOG Then
|
||||
CurrToggleBtn.Content = "Z - B"
|
||||
ElseIf StateFlagArray(nIndex) = K_REMOTE Then
|
||||
CurrToggleBtn.Content = "Remote"
|
||||
End If
|
||||
Catch ex As Exception
|
||||
EgtOutLog("Error loading content " & StateFlagArray(nIndex))
|
||||
@@ -132,7 +142,8 @@ Public Class MachineButtonsUC
|
||||
End Sub
|
||||
|
||||
Private Sub MachineButton_Click(sender As Object, e As RoutedEventArgs) Handles MachineButton1.Click, MachineButton2.Click, MachineButton3.Click, MachineButton4.Click, MachineButton5.Click,
|
||||
MachineButton6.Click, MachineButton7.Click, MachineButton8.Click, MachineButton9.Click, MachineButton10.Click
|
||||
MachineButton6.Click, MachineButton7.Click, MachineButton8.Click, MachineButton9.Click, MachineButton10.Click,
|
||||
MachineButton11.Click
|
||||
Dim CurrentBtn As Primitives.ToggleButton = e.Source
|
||||
' recupero l'inidce del bottone selezionato
|
||||
Dim nIndex As Integer = GetToggleButtonIndex(CurrentBtn) - 1
|
||||
@@ -151,6 +162,18 @@ Public Class MachineButtonsUC
|
||||
Return
|
||||
End If
|
||||
|
||||
' Se il bottone chiamantè quello per la selezione del pannello di controllo
|
||||
If nIndex = Array.IndexOf(StateFlagArray, BTN_ENABLE_PC) Then
|
||||
Dim sTLuaFile As String = sBaseDir & CommandArrayY(nIndex)
|
||||
Dim sFLuaFile As String = sBaseDir & CommandArrayN(nIndex)
|
||||
If m_CN.nEnablePc = 1 Then
|
||||
ExecuteMDICommand(CurrentBtn, sTLuaFile)
|
||||
ElseIf m_CN.nEnablePc = 2 Then
|
||||
ExecuteMDICommand(CurrentBtn, sFLuaFile)
|
||||
End If
|
||||
Return
|
||||
End If
|
||||
|
||||
If CurrentBtn.IsChecked() Then
|
||||
'EgtLuaExecFile(sBaseDir & CommandArrayY(nIndex))
|
||||
sLuaFileName = sBaseDir & CommandArrayY(nIndex)
|
||||
@@ -342,6 +365,7 @@ Public Class MachineButtonsUC
|
||||
" EType2=" & If(Not String.IsNullOrEmpty(EType2), CInt(EType2).ToString, ""))
|
||||
End Sub
|
||||
|
||||
#Region "STATE CHANGED"
|
||||
|
||||
Friend Sub SpindleStateChanged(SpindleState As Boolean)
|
||||
Dim nIndex As Integer = Array.IndexOf(StateFlagArray, BTN_STATE_SPINDLE)
|
||||
@@ -548,7 +572,11 @@ Public Class MachineButtonsUC
|
||||
End Sub
|
||||
|
||||
Friend Sub DoorStateChanged(DoorState As Integer)
|
||||
' recupero le asscociazioni con i bottoni
|
||||
If IsNothing(DoorState) Then
|
||||
EgtOutLog("Error: door state null!")
|
||||
Return
|
||||
End If
|
||||
' recupero le associazioni con i bottoni
|
||||
Dim nIndex As Integer = Array.IndexOf(StateFlagArray, BTN_STATE_DOOR_OPENED)
|
||||
If nIndex = -1 Then Return
|
||||
' bottone di apertura porte
|
||||
@@ -558,7 +586,7 @@ Public Class MachineButtonsUC
|
||||
' bottone di chiusura porte
|
||||
Dim DoorClosedButton As Primitives.ToggleButton = GetToggleButton(nIndex + 1)
|
||||
' modifico il colore dei bottoni
|
||||
If Not IsNothing(DoorState) Then
|
||||
If Not IsNothing(DoorState) AndAlso Not IsNothing(DoorClosedButton) Then
|
||||
Select Case DoorState
|
||||
Case 0
|
||||
DoorClosedButton.Background = Application.Current.FindResource("OmagCut_Red")
|
||||
@@ -566,7 +594,7 @@ Public Class MachineButtonsUC
|
||||
DoorClosedButton.Background = Application.Current.FindResource("OmagCut_LightGray")
|
||||
End Select
|
||||
End If
|
||||
If Not IsNothing(DoorState) Then
|
||||
If Not IsNothing(DoorState) AndAlso Not IsNothing(DoorOpenedButton) Then
|
||||
Select Case DoorState
|
||||
Case 0
|
||||
DoorOpenedButton.Background = Application.Current.FindResource("OmagCut_LightGray")
|
||||
@@ -578,6 +606,203 @@ Public Class MachineButtonsUC
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Friend Sub ParkingStateChanged(ParkingState As Boolean)
|
||||
Dim nIndex As Integer = Array.IndexOf(StateFlagArray, BTN_STATE_PARKING)
|
||||
If nIndex = -1 Then Return
|
||||
If ParkingState Then
|
||||
GetToggleButton(nIndex + 1).IsChecked = True
|
||||
Try
|
||||
Dim s As String
|
||||
If (m_MainWindow.m_OptionsPageUC.ThemesCmBx.SelectedIndex = 0) Then
|
||||
s = m_MainWindow.GetResourcesDir() & "\MachineButtonsImage\" & ImageArrayY(nIndex)
|
||||
Else
|
||||
s = m_MainWindow.GetResourcesDir() & "\MachineButtonsImage\NewIcons\" & ImageArrayY(nIndex)
|
||||
End If
|
||||
Dim sButtonImageSource As ImageSource = ImageConverter.ConvertFromString(s)
|
||||
GetImage(nIndex + 1).Source = sButtonImageSource
|
||||
Catch ex As Exception
|
||||
EgtOutLog("Error loading image " & ImageArrayY(nIndex + 1))
|
||||
End Try
|
||||
Else
|
||||
GetToggleButton(nIndex + 1).IsChecked = False
|
||||
Try
|
||||
Dim s As String
|
||||
If (m_MainWindow.m_OptionsPageUC.ThemesCmBx.SelectedIndex = 0) Then
|
||||
s = m_MainWindow.GetResourcesDir() & "\MachineButtonsImage\" & ImageArrayY(nIndex)
|
||||
Else
|
||||
s = m_MainWindow.GetResourcesDir() & "\MachineButtonsImage\NewIcons\" & ImageArrayY(nIndex)
|
||||
End If
|
||||
Dim sButtonImageSource As ImageSource = ImageConverter.ConvertFromString(s)
|
||||
GetImage(nIndex + 1).Source = sButtonImageSource
|
||||
Catch ex As Exception
|
||||
EgtOutLog("Error loading image " & ImageArrayN(nIndex + 1))
|
||||
End Try
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Friend Sub EnableZoneStateChanged(ZoneState As Integer)
|
||||
Dim sFlag As String = String.Empty
|
||||
If ZoneState = 1 Then
|
||||
sFlag = BTN_ENABLE_ZONE_1
|
||||
ElseIf ZoneState = 2 Then
|
||||
sFlag = BTN_ENABLE_ZONE_2
|
||||
End If
|
||||
' recupero il bottone che deve essere acceso (quindi spengo l'altro)
|
||||
Dim nIndex As Integer = Array.IndexOf(StateFlagArray, sFlag)
|
||||
|
||||
' se non trovo nessun riferimento allora spengo entrambi i comandi
|
||||
If nIndex = -1 Then
|
||||
nIndex = Array.IndexOf(StateFlagArray, BTN_ENABLE_ZONE_1)
|
||||
GetToggleButton(nIndex + 1).IsChecked = False
|
||||
nIndex = Array.IndexOf(StateFlagArray, BTN_ENABLE_ZONE_2)
|
||||
GetToggleButton(nIndex + 1).IsChecked = False
|
||||
Return
|
||||
End If
|
||||
|
||||
If ZoneState = 1 Then
|
||||
GetToggleButton(nIndex + 1).IsChecked = True
|
||||
Try
|
||||
Dim s As String
|
||||
If (m_MainWindow.m_OptionsPageUC.ThemesCmBx.SelectedIndex = 0) Then
|
||||
s = m_MainWindow.GetResourcesDir() & "\MachineButtonsImage\" & ImageArrayY(nIndex)
|
||||
Else
|
||||
s = m_MainWindow.GetResourcesDir() & "\MachineButtonsImage\NewIcons\" & ImageArrayY(nIndex)
|
||||
End If
|
||||
Dim sButtonImageSource As ImageSource = ImageConverter.ConvertFromString(s)
|
||||
GetImage(nIndex + 1).Source = sButtonImageSource
|
||||
Catch ex As Exception
|
||||
EgtOutLog("Error loading image " & ImageArrayY(nIndex + 1))
|
||||
End Try
|
||||
' spengo l'altro bottone (lo stato dei due bottoni sono gestiti da una sola variabile)
|
||||
nIndex = Array.IndexOf(StateFlagArray, BTN_ENABLE_ZONE_2)
|
||||
GetToggleButton(nIndex + 1).IsChecked = False
|
||||
|
||||
ElseIf ZoneState = 2 Then
|
||||
GetToggleButton(nIndex + 1).IsChecked = True
|
||||
Try
|
||||
Dim s As String
|
||||
If (m_MainWindow.m_OptionsPageUC.ThemesCmBx.SelectedIndex = 0) Then
|
||||
s = m_MainWindow.GetResourcesDir() & "\MachineButtonsImage\" & ImageArrayY(nIndex)
|
||||
Else
|
||||
s = m_MainWindow.GetResourcesDir() & "\MachineButtonsImage\NewIcons\" & ImageArrayY(nIndex)
|
||||
End If
|
||||
Dim sButtonImageSource As ImageSource = ImageConverter.ConvertFromString(s)
|
||||
GetImage(nIndex + 1).Source = sButtonImageSource
|
||||
Catch ex As Exception
|
||||
EgtOutLog("Error loading image " & ImageArrayN(nIndex + 1))
|
||||
End Try
|
||||
' spengo l'altro bottone (lo stato dei due bottoni sono gestiti da una sola variabile)
|
||||
nIndex = Array.IndexOf(StateFlagArray, BTN_ENABLE_ZONE_1)
|
||||
GetToggleButton(nIndex + 1).IsChecked = False
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Friend Sub EnablePcStateChanged(PcState As Integer)
|
||||
' il comando ButtonY accendo il Pannello_1, il comando ButtonN accendo il Pannello_2 (uno è la negazione dell'altro)
|
||||
Dim nIndex As Integer = Array.IndexOf(StateFlagArray, BTN_ENABLE_PC)
|
||||
If nIndex = -1 Then Return
|
||||
If PcState = 1 Then
|
||||
GetToggleButton(nIndex + 1).IsChecked = True
|
||||
Try
|
||||
Dim s As String
|
||||
If (m_MainWindow.m_OptionsPageUC.ThemesCmBx.SelectedIndex = 0) Then
|
||||
s = m_MainWindow.GetResourcesDir() & "\MachineButtonsImage\" & ImageArrayY(nIndex)
|
||||
Else
|
||||
s = m_MainWindow.GetResourcesDir() & "\MachineButtonsImage\NewIcons\" & ImageArrayY(nIndex)
|
||||
End If
|
||||
Dim sButtonImageSource As ImageSource = ImageConverter.ConvertFromString(s)
|
||||
GetImage(nIndex + 1).Source = sButtonImageSource
|
||||
Catch ex As Exception
|
||||
EgtOutLog("Error loading image " & ImageArrayY(nIndex + 1))
|
||||
End Try
|
||||
ElseIf PcState = 2 Then
|
||||
GetToggleButton(nIndex + 1).IsChecked = True
|
||||
Try
|
||||
Dim s As String
|
||||
If (m_MainWindow.m_OptionsPageUC.ThemesCmBx.SelectedIndex = 0) Then
|
||||
s = m_MainWindow.GetResourcesDir() & "\MachineButtonsImage\" & ImageArrayN(nIndex)
|
||||
Else
|
||||
s = m_MainWindow.GetResourcesDir() & "\MachineButtonsImage\NewIcons\" & ImageArrayN(nIndex)
|
||||
End If
|
||||
Dim sButtonImageSource As ImageSource = ImageConverter.ConvertFromString(s)
|
||||
GetImage(nIndex + 1).Source = sButtonImageSource
|
||||
Catch ex As Exception
|
||||
EgtOutLog("Error loading image " & ImageArrayN(nIndex + 1))
|
||||
End Try
|
||||
Else
|
||||
' nessuno dei due pannelli attivo
|
||||
GetToggleButton(nIndex + 1).IsChecked = False
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Friend Sub TableUpChanged(TableUpState As Boolean)
|
||||
Dim nIndex As Integer = Array.IndexOf(StateFlagArray, K_TABLEUP)
|
||||
If nIndex = -1 Then Return
|
||||
If TableUpState Then
|
||||
GetToggleButton(nIndex + 1).IsChecked = True
|
||||
Try
|
||||
Dim s As String
|
||||
If (m_MainWindow.m_OptionsPageUC.ThemesCmBx.SelectedIndex = 0) Then
|
||||
s = m_MainWindow.GetResourcesDir() & "\MachineButtonsImage\" & ImageArrayY(nIndex)
|
||||
Else
|
||||
s = m_MainWindow.GetResourcesDir() & "\MachineButtonsImage\NewIcons\" & ImageArrayY(nIndex)
|
||||
End If
|
||||
Dim sButtonImageSource As ImageSource = ImageConverter.ConvertFromString(s)
|
||||
GetImage(nIndex + 1).Source = sButtonImageSource
|
||||
Catch ex As Exception
|
||||
EgtOutLog("Error loading image " & ImageArrayY(nIndex + 1))
|
||||
End Try
|
||||
Else
|
||||
GetToggleButton(nIndex + 1).IsChecked = False
|
||||
Try
|
||||
Dim s As String
|
||||
If (m_MainWindow.m_OptionsPageUC.ThemesCmBx.SelectedIndex = 0) Then
|
||||
s = m_MainWindow.GetResourcesDir() & "\MachineButtonsImage\" & ImageArrayN(nIndex)
|
||||
Else
|
||||
s = m_MainWindow.GetResourcesDir() & "\MachineButtonsImage\NewIcons\" & ImageArrayN(nIndex)
|
||||
End If
|
||||
Dim sButtonImageSource As ImageSource = ImageConverter.ConvertFromString(s)
|
||||
GetImage(nIndex + 1).Source = sButtonImageSource
|
||||
Catch ex As Exception
|
||||
EgtOutLog("Error loading image " & ImageArrayN(nIndex + 1))
|
||||
End Try
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Friend Sub TableDownChanged(TableDownState As Boolean)
|
||||
Dim nIndex As Integer = Array.IndexOf(StateFlagArray, K_TABLEDOWN)
|
||||
If nIndex = -1 Then Return
|
||||
If TableDownState Then
|
||||
GetToggleButton(nIndex + 1).IsChecked = True
|
||||
Try
|
||||
Dim s As String
|
||||
If (m_MainWindow.m_OptionsPageUC.ThemesCmBx.SelectedIndex = 0) Then
|
||||
s = m_MainWindow.GetResourcesDir() & "\MachineButtonsImage\" & ImageArrayY(nIndex)
|
||||
Else
|
||||
s = m_MainWindow.GetResourcesDir() & "\MachineButtonsImage\NewIcons\" & ImageArrayY(nIndex)
|
||||
End If
|
||||
Dim sButtonImageSource As ImageSource = ImageConverter.ConvertFromString(s)
|
||||
GetImage(nIndex + 1).Source = sButtonImageSource
|
||||
Catch ex As Exception
|
||||
EgtOutLog("Error loading image " & ImageArrayY(nIndex + 1))
|
||||
End Try
|
||||
Else
|
||||
GetToggleButton(nIndex + 1).IsChecked = False
|
||||
Try
|
||||
Dim s As String
|
||||
If (m_MainWindow.m_OptionsPageUC.ThemesCmBx.SelectedIndex = 0) Then
|
||||
s = m_MainWindow.GetResourcesDir() & "\MachineButtonsImage\" & ImageArrayN(nIndex)
|
||||
Else
|
||||
s = m_MainWindow.GetResourcesDir() & "\MachineButtonsImage\NewIcons\" & ImageArrayN(nIndex)
|
||||
End If
|
||||
Dim sButtonImageSource As ImageSource = ImageConverter.ConvertFromString(s)
|
||||
GetImage(nIndex + 1).Source = sButtonImageSource
|
||||
Catch ex As Exception
|
||||
EgtOutLog("Error loading image " & ImageArrayN(nIndex + 1))
|
||||
End Try
|
||||
End If
|
||||
End Sub
|
||||
|
||||
'----------------- Queste funzioni determina lo stato del bottone direttamente dalla lettura delle variabili CN
|
||||
Friend Sub XYJogChanged(ByVal bXYAxes As Boolean)
|
||||
' recupero le asscociazioni con i bottoni
|
||||
@@ -602,80 +827,97 @@ Public Class MachineButtonsUC
|
||||
' selezoiono lo stato del bottone
|
||||
GetToggleButton(nIndex + 1).IsChecked = bBCAxes
|
||||
End Sub
|
||||
|
||||
Friend Sub RemoteChanged(ByVal bRemote As Boolean)
|
||||
' recupero le asscociazioni con i bottoni
|
||||
Dim nIndex As Integer = Array.IndexOf(StateFlagArray, K_REMOTE)
|
||||
If nIndex = -1 Then Return
|
||||
' selezoiono lo stato del bottone
|
||||
GetToggleButton(nIndex + 1).IsChecked = bRemote
|
||||
End Sub
|
||||
|
||||
'-----------------------------------------------------------------------------------------------------------------
|
||||
|
||||
#End Region ' State changed
|
||||
|
||||
Private Function GetToggleButton(ByVal nIndex As Integer) As Primitives.ToggleButton
|
||||
Select Case nIndex
|
||||
Case 1
|
||||
Return MachineButton1
|
||||
Case 2
|
||||
Return MachineButton2
|
||||
Case 3
|
||||
Return MachineButton3
|
||||
Case 4
|
||||
Return MachineButton4
|
||||
Case 5
|
||||
Return MachineButton5
|
||||
Case 6
|
||||
Return MachineButton6
|
||||
Case 7
|
||||
Return MachineButton7
|
||||
Case 8
|
||||
Return MachineButton8
|
||||
Case 9
|
||||
Return MachineButton9
|
||||
Case Else
|
||||
Return MachineButton10
|
||||
Case 1
|
||||
Return MachineButton1
|
||||
Case 2
|
||||
Return MachineButton2
|
||||
Case 3
|
||||
Return MachineButton3
|
||||
Case 4
|
||||
Return MachineButton4
|
||||
Case 5
|
||||
Return MachineButton5
|
||||
Case 6
|
||||
Return MachineButton6
|
||||
Case 7
|
||||
Return MachineButton7
|
||||
Case 8
|
||||
Return MachineButton8
|
||||
Case 9
|
||||
Return MachineButton9
|
||||
Case 10
|
||||
Return MachineButton10
|
||||
Case Else
|
||||
Return MachineButton11
|
||||
End Select
|
||||
End Function
|
||||
|
||||
Private Function GetToggleButtonIndex(ByVal nBtnName As Primitives.ToggleButton) As Integer
|
||||
Select Case nBtnName.Name
|
||||
Case MachineButton1.Name
|
||||
Return 1
|
||||
Case MachineButton2.Name
|
||||
Return 2
|
||||
Case MachineButton3.Name
|
||||
Return 3
|
||||
Case MachineButton4.Name
|
||||
Return 4
|
||||
Case MachineButton5.Name
|
||||
Return 5
|
||||
Case MachineButton6.Name
|
||||
Return 6
|
||||
Case MachineButton7.Name
|
||||
Return 7
|
||||
Case MachineButton8.Name
|
||||
Return 8
|
||||
Case MachineButton9.Name
|
||||
Return 9
|
||||
Case Else
|
||||
Return 10
|
||||
Case MachineButton1.Name
|
||||
Return 1
|
||||
Case MachineButton2.Name
|
||||
Return 2
|
||||
Case MachineButton3.Name
|
||||
Return 3
|
||||
Case MachineButton4.Name
|
||||
Return 4
|
||||
Case MachineButton5.Name
|
||||
Return 5
|
||||
Case MachineButton6.Name
|
||||
Return 6
|
||||
Case MachineButton7.Name
|
||||
Return 7
|
||||
Case MachineButton8.Name
|
||||
Return 8
|
||||
Case MachineButton9.Name
|
||||
Return 9
|
||||
Case MachineButton10.Name
|
||||
Return 10
|
||||
Case Else
|
||||
Return 11
|
||||
End Select
|
||||
End Function
|
||||
|
||||
Private Function GetImage(ByVal nInd As Integer) As Image
|
||||
Select Case nInd
|
||||
Case 1
|
||||
Return ImageButton1
|
||||
Case 2
|
||||
Return ImageButton2
|
||||
Case 3
|
||||
Return ImageButton3
|
||||
Case 4
|
||||
Return ImageButton4
|
||||
Case 5
|
||||
Return ImageButton5
|
||||
Case 6
|
||||
Return ImageButton6
|
||||
Case 7
|
||||
Return ImageButton7
|
||||
Case 8
|
||||
Return ImageButton8
|
||||
Case 9
|
||||
Return ImageButton9
|
||||
Case Else
|
||||
Return ImageButton10
|
||||
Case 1
|
||||
Return ImageButton1
|
||||
Case 2
|
||||
Return ImageButton2
|
||||
Case 3
|
||||
Return ImageButton3
|
||||
Case 4
|
||||
Return ImageButton4
|
||||
Case 5
|
||||
Return ImageButton5
|
||||
Case 6
|
||||
Return ImageButton6
|
||||
Case 7
|
||||
Return ImageButton7
|
||||
Case 8
|
||||
Return ImageButton8
|
||||
Case 9
|
||||
Return ImageButton9
|
||||
Case 10
|
||||
Return ImageButton10
|
||||
Case Else
|
||||
Return ImageButton11
|
||||
End Select
|
||||
End Function
|
||||
|
||||
|
||||
@@ -201,11 +201,12 @@ Public Class ManualAxesMoveUC
|
||||
EgtOutLog("CmdString=" & CmdString)
|
||||
' Eseguo in MDI
|
||||
m_CN.DGeneralFunctions_WriteCncMode(2) ' Modalità MDI
|
||||
System.Threading.Thread.Sleep(m_MainWindow.m_CurrentMachine.nThreadSleep)
|
||||
System.Threading.Thread.Sleep(150)
|
||||
m_CN.sz_ManualDataInput = CmdString
|
||||
m_CN.MDI_command()
|
||||
System.Threading.Thread.Sleep(m_MainWindow.m_CurrentMachine.nThreadSleep)
|
||||
System.Threading.Thread.Sleep(150)
|
||||
m_CN.DGeneralFunctions_CycleStart()
|
||||
System.Threading.Thread.Sleep(m_MainWindow.m_CurrentMachine.nThreadSleep)
|
||||
m_CN.DGeneralFunctions_WriteCncMode(7) ' Modalità manuale
|
||||
m_MoveClicked = False
|
||||
End Sub
|
||||
|
||||
+20
-11
@@ -35,12 +35,17 @@
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<ToggleButton Name="Point1Btn" Grid.Column="0"
|
||||
Style="{DynamicResource OmagCut_YellowToggleButton}"/>
|
||||
<ToggleButton Name="Point2Btn" Grid.Column="1"
|
||||
Style="{DynamicResource OmagCut_YellowToggleButton}"/>
|
||||
<ToggleButton Name="Point1Btn" Grid.Column="0"
|
||||
Style="{DynamicResource OmagCut_YellowIconToggleButton}">
|
||||
<Image Source="{DynamicResource Acquisisci-P1Img}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
</ToggleButton>
|
||||
|
||||
</Grid>
|
||||
<ToggleButton Name="Point2Btn" Grid.Column="1"
|
||||
Style="{DynamicResource OmagCut_YellowIconToggleButton}">
|
||||
<Image Source="{DynamicResource Acquisisci-P2Img}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
</ToggleButton>
|
||||
|
||||
</Grid>
|
||||
|
||||
<ComboBox Name="PointModeCmBx" Grid.Row="1" Grid.ColumnSpan="2" Style="{StaticResource OmagCut_ComboBox}"
|
||||
Margin="6,0,6,0">
|
||||
@@ -256,12 +261,16 @@
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Button Name="SimulBtn" Grid.Column="0" Style="{DynamicResource OmagCut_GradientBlueTextButton}"/>
|
||||
<Button Name="OkBtn" Grid.Column="1" Style="{DynamicResource OmagCut_GradientBlueTextButton}"/>
|
||||
<Button Name="ExitBtn" Grid.Column="2" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource XImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
</Grid>
|
||||
<Button Name="SimulBtn" Grid.Column="0" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource SimulaImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="OkBtn" Grid.Column="1" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource EseguiImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="ExitBtn" Grid.Column="2" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource XImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
</Grid>
|
||||
|
||||
</Grid>
|
||||
|
||||
|
||||
@@ -63,8 +63,8 @@ Public Class MultipleCut
|
||||
' la associo alla combobox
|
||||
PointModeCmBx.ItemsSource = m_PointsModeArray
|
||||
' assegno messaggi
|
||||
Point1Btn.Content = EgtMsg(MSG_DIRECTCUTPAGEUC + 10)
|
||||
Point2Btn.Content = EgtMsg(MSG_DIRECTCUTPAGEUC + 11)
|
||||
Point1Btn.ToolTip = EgtMsg(MSG_DIRECTCUTPAGEUC + 10)
|
||||
Point2Btn.ToolTip = EgtMsg(MSG_DIRECTCUTPAGEUC + 11)
|
||||
DepthTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 13)
|
||||
LenghtTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 14)
|
||||
DirectionTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 15)
|
||||
@@ -72,8 +72,8 @@ Public Class MultipleCut
|
||||
NumPzTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 17)
|
||||
DimPzTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 18)
|
||||
SideTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 23)
|
||||
SimulBtn.Content = EgtMsg(MSG_CADCUTPAGEUC + 1)
|
||||
OkBtn.Content = EgtMsg(MSG_DIRECTCUTPAGEUC + 30)
|
||||
SimulBtn.ToolTip = EgtMsg(MSG_CADCUTPAGEUC + 1)
|
||||
OkBtn.ToolTip = EgtMsg(MSG_DIRECTCUTPAGEUC + 30)
|
||||
Num1TxBl.Text = "1"
|
||||
Num2TxBl.Text = "2"
|
||||
Num3TxBl.Text = "3"
|
||||
@@ -213,6 +213,10 @@ Public Class MultipleCut
|
||||
m_bActive = False
|
||||
End Sub
|
||||
|
||||
Public Sub SetEnableParam(ByVal bIsSaw As Boolean)
|
||||
DepthTxBx.IsEnabled = bIsSaw
|
||||
End Sub
|
||||
|
||||
Private Sub UpdateSimulOkBtn()
|
||||
If m_bCutOk Then
|
||||
SimulBtn.IsEnabled = True
|
||||
@@ -270,6 +274,12 @@ Public Class MultipleCut
|
||||
' Verifico configurazione tavola e grezzo
|
||||
If Not m_bRawOk Then Return
|
||||
|
||||
' Recupero dati utensile e testa corrente
|
||||
Dim sTool As String = ""
|
||||
Dim sHead As String = ""
|
||||
Dim nExit As Integer = 0
|
||||
EgtGetCalcTool(sTool, sHead, nExit)
|
||||
|
||||
' Se acquisizone lama o laser
|
||||
If PointModeCmBx.SelectedIndex = PT_MODE.SAW Or PointModeCmBx.SelectedIndex = PT_MODE.LASER Then
|
||||
|
||||
@@ -284,12 +294,14 @@ Public Class MultipleCut
|
||||
If Not EgtSetCalcTool("", "H3", 1) Then Return
|
||||
' Trasformo in posizione punta utensile in basso
|
||||
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, dR1, dR2, True, m_ptTipP1) Then Return
|
||||
' Ora imposto la lama corrente
|
||||
If Not EgtSetCalcTool(sSaw, "H1", 1) Then Return
|
||||
' Altrimenti da lama
|
||||
' Reimposto eventuale precedente utensile
|
||||
EgtSetCalcTool(sTool, sHead, nExit)
|
||||
|
||||
' Altrimenti da lama
|
||||
Else
|
||||
' Imposto la lama corrente
|
||||
If Not EgtSetCalcTool(sSaw, "H1", 1) Then Return
|
||||
' Reimposto eventuale precedente utensile
|
||||
EgtSetCalcTool(sTool, sHead, nExit)
|
||||
|
||||
' Trasformo in posizione punta utensile in basso
|
||||
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, dR1, dR2, True, m_ptTipP1) Then Return
|
||||
End If
|
||||
@@ -312,10 +324,9 @@ Public Class MultipleCut
|
||||
' Porto il tip nell'origine tavola
|
||||
m_ptTipP1.ToLoc(New Frame3d(m_ptTabOri))
|
||||
m_bPointP1Ok = True
|
||||
' Ricavo dati lama corrente
|
||||
Dim sSaw As String = m_MainWindow.m_CurrentMachine.sCurrSaw
|
||||
' Imposto la lama corrente
|
||||
If Not EgtSetCalcTool(sSaw, "H1", 1) Then Return
|
||||
' Reimposto eventuale precedente utensile
|
||||
EgtSetCalcTool(sTool, sHead, nExit)
|
||||
|
||||
End If
|
||||
' Disegno il taglio
|
||||
CreateMultipleCut()
|
||||
@@ -343,6 +354,12 @@ Public Class MultipleCut
|
||||
' Verifico configurazione tavola e grezzo
|
||||
If Not m_bRawOk Then Return
|
||||
|
||||
' Recupero dati utensile e testa corrente
|
||||
Dim sTool As String = ""
|
||||
Dim sHead As String = ""
|
||||
Dim nExit As Integer = 0
|
||||
EgtGetCalcTool(sTool, sHead, nExit)
|
||||
|
||||
' Se acquisizone lama o laser
|
||||
If PointModeCmBx.SelectedIndex = PT_MODE.SAW Or PointModeCmBx.SelectedIndex = PT_MODE.LASER Then
|
||||
|
||||
@@ -357,12 +374,12 @@ Public Class MultipleCut
|
||||
If Not EgtSetCalcTool("", "H3", 1) Then Return
|
||||
' Trasformo in posizione punta utensile in basso
|
||||
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, dR1, dR2, True, m_ptTipP2) Then Return
|
||||
' Ora imposto la lama corrente
|
||||
If Not EgtSetCalcTool(sSaw, "H1", 1) Then Return
|
||||
' Altrimenti da lama
|
||||
' Reimposto eventuale precedente utensile
|
||||
EgtSetCalcTool(sTool, sHead, nExit)
|
||||
' Altrimenti da lama
|
||||
Else
|
||||
' Imposto la lama corrente
|
||||
If Not EgtSetCalcTool(sSaw, "H1", 1) Then Return
|
||||
' Reimposto eventuale precedente utensile
|
||||
EgtSetCalcTool(sTool, sHead, nExit)
|
||||
' Trasformo in posizione punta utensile in basso
|
||||
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, dR1, dR2, True, m_ptTipP2) Then Return
|
||||
End If
|
||||
@@ -383,10 +400,9 @@ Public Class MultipleCut
|
||||
' Porto il tip nell'origine tavola
|
||||
m_ptTipP2.ToLoc(New Frame3d(m_ptTabOri))
|
||||
m_bPointP2Ok = True
|
||||
' Ricavo dati lama corrente
|
||||
Dim sSaw As String = m_MainWindow.m_CurrentMachine.sCurrSaw
|
||||
' Imposto la lama corrente
|
||||
If Not EgtSetCalcTool(sSaw, "H1", 1) Then Return
|
||||
' Reimposto eventuale precedente utensile
|
||||
EgtSetCalcTool(sTool, sHead, nExit)
|
||||
|
||||
End If
|
||||
|
||||
' Se il secondo punto non coincide con il primo, disegno il taglio
|
||||
|
||||
@@ -63,12 +63,16 @@
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Button Name="SimulBtn" Grid.Column="0" Style="{DynamicResource OmagCut_GradientBlueTextButton}"/>
|
||||
<Button Name="OkBtn" Grid.Column="1" Style="{DynamicResource OmagCut_GradientBlueTextButton}"/>
|
||||
<Button Name="ExitBtn" Grid.Column="2" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource XImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
</Grid>
|
||||
<Button Name="SimulBtn" Grid.Column="0" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource SimulaImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="OkBtn" Grid.Column="1" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource EseguiImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="ExitBtn" Grid.Column="2" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource XImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
</Grid>
|
||||
|
||||
</Grid>
|
||||
|
||||
|
||||
@@ -23,8 +23,8 @@ Public Class Polishing
|
||||
|
||||
Private Sub Polishing_Initialized(sender As Object, e As EventArgs) Handles Me.Initialized
|
||||
' assegno messaggi
|
||||
SimulBtn.Content = EgtMsg(MSG_CADCUTPAGEUC + 1)
|
||||
OkBtn.Content = EgtMsg(MSG_DIRECTCUTPAGEUC + 30)
|
||||
SimulBtn.ToolTip = EgtMsg(MSG_CADCUTPAGEUC + 1)
|
||||
OkBtn.ToolTip = EgtMsg(MSG_DIRECTCUTPAGEUC + 30)
|
||||
End Sub
|
||||
|
||||
Private Sub Polishing_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded
|
||||
|
||||
+20
-11
@@ -37,12 +37,17 @@
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<ToggleButton Name="Point1Btn" Grid.Column="0"
|
||||
Style="{DynamicResource OmagCut_YellowToggleButton}"/>
|
||||
<ToggleButton Name="Point2Btn" Grid.Column="1"
|
||||
Style="{DynamicResource OmagCut_YellowToggleButton}"/>
|
||||
<ToggleButton Name="Point1Btn" Grid.Column="0"
|
||||
Style="{DynamicResource OmagCut_YellowIconToggleButton}">
|
||||
<Image Source="{DynamicResource Acquisisci-P1Img}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
</ToggleButton>
|
||||
|
||||
</Grid>
|
||||
<ToggleButton Name="Point2Btn" Grid.Column="1"
|
||||
Style="{DynamicResource OmagCut_YellowIconToggleButton}">
|
||||
<Image Source="{DynamicResource Acquisisci-P2Img}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
</ToggleButton>
|
||||
|
||||
</Grid>
|
||||
|
||||
<ComboBox Name="PointModeCmBx" Grid.Row="1" Grid.ColumnSpan="2" Style="{StaticResource OmagCut_ComboBox}"
|
||||
Margin="6,0,6,0">
|
||||
@@ -80,12 +85,16 @@
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Button Name="SimulBtn" Grid.Column="0" Style="{DynamicResource OmagCut_GradientBlueTextButton}"/>
|
||||
<Button Name="OkBtn" Grid.Column="1" Style="{DynamicResource OmagCut_GradientBlueTextButton}"/>
|
||||
<Button Name="ExitBtn" Grid.Column="2" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource XImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
</Grid>
|
||||
<Button Name="SimulBtn" Grid.Column="0" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource SimulaImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="OkBtn" Grid.Column="1" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource EseguiImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="ExitBtn" Grid.Column="2" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource XImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
</Grid>
|
||||
|
||||
</Grid>
|
||||
|
||||
|
||||
@@ -58,14 +58,14 @@ Public Class SawTestUC
|
||||
' la associo alla combobox
|
||||
PointModeCmBx.ItemsSource = m_PointsModeArray
|
||||
' assegno messaggi
|
||||
Point1Btn.Content = EgtMsg(MSG_DIRECTCUTPAGEUC + 10)
|
||||
Point2Btn.Content = EgtMsg(MSG_DIRECTCUTPAGEUC + 11)
|
||||
Point1Btn.ToolTip = EgtMsg(MSG_DIRECTCUTPAGEUC + 10)
|
||||
Point2Btn.ToolTip = EgtMsg(MSG_DIRECTCUTPAGEUC + 11)
|
||||
DepthTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 13)
|
||||
LenghtTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 14)
|
||||
DirectionTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 15)
|
||||
OffsetTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 28)
|
||||
SimulBtn.Content = EgtMsg(MSG_CADCUTPAGEUC + 1)
|
||||
OkBtn.Content = EgtMsg(MSG_DIRECTCUTPAGEUC + 30)
|
||||
SimulBtn.ToolTip = EgtMsg(MSG_CADCUTPAGEUC + 1)
|
||||
OkBtn.ToolTip = EgtMsg(MSG_DIRECTCUTPAGEUC + 30)
|
||||
' Carico i dati dell'ultimo test
|
||||
m_dDepth = GetPrivateProfileDouble( S_DIRECTCUTS, K_DC_TEST_DEPTH, m_dDepth, m_MainWindow.GetIniFile())
|
||||
m_dLen = GetPrivateProfileDouble( S_DIRECTCUTS, K_DC_TEST_LENGTH, m_dLen, m_MainWindow.GetIniFile())
|
||||
|
||||
@@ -38,11 +38,16 @@
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<ToggleButton Name="Point1Btn" Grid.Column="0"
|
||||
Style="{DynamicResource OmagCut_YellowToggleButton}"/>
|
||||
<ToggleButton Name="Point2Btn" Grid.Column="1"
|
||||
Style="{DynamicResource OmagCut_YellowToggleButton}"/>
|
||||
Style="{DynamicResource OmagCut_YellowIconToggleButton}">
|
||||
<Image Source="{DynamicResource Acquisisci-P1Img}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
</ToggleButton>
|
||||
|
||||
</Grid>
|
||||
<ToggleButton Name="Point2Btn" Grid.Column="1"
|
||||
Style="{DynamicResource OmagCut_YellowIconToggleButton}">
|
||||
<Image Source="{DynamicResource Acquisisci-P2Img}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
</ToggleButton>
|
||||
|
||||
</Grid>
|
||||
|
||||
<ComboBox Name="PointModeCmBx" Grid.Row="1" Grid.ColumnSpan="2" Style="{StaticResource OmagCut_ComboBox}" Margin="6,0,6,0">
|
||||
<ComboBox.ItemTemplate>
|
||||
@@ -106,10 +111,14 @@
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Button Name="SimulBtn" Grid.Column="0" Style="{DynamicResource OmagCut_GradientBlueTextButton}"/>
|
||||
<Button Name="OkBtn" Grid.Column="1" Style="{DynamicResource OmagCut_GradientBlueTextButton}"/>
|
||||
<Button Name="SimulBtn" Grid.Column="0" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource SimulaImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="OkBtn" Grid.Column="1" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource EseguiImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="ExitBtn" Grid.Column="2" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource XImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
<Image Source="{DynamicResource XImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
</Grid>
|
||||
|
||||
|
||||
@@ -57,16 +57,16 @@ Public Class SingleCutUC
|
||||
' la associo alla combobox
|
||||
PointModeCmBx.ItemsSource = m_PointsModeArray
|
||||
' Assegno messaggi
|
||||
Point1Btn.Content = EgtMsg(MSG_DIRECTCUTPAGEUC + 10)
|
||||
Point2Btn.Content = EgtMsg(MSG_DIRECTCUTPAGEUC + 11)
|
||||
Point1Btn.ToolTip = EgtMsg(MSG_DIRECTCUTPAGEUC + 10)
|
||||
Point2Btn.ToolTip = EgtMsg(MSG_DIRECTCUTPAGEUC + 11)
|
||||
DepthTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 13)
|
||||
LenghtTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 14)
|
||||
DirectionTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 15)
|
||||
SideAngleTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 16)
|
||||
OffsetTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 28)
|
||||
SawThChBl.Text = EgtMsg(90232) ' Spessore lama
|
||||
SimulBtn.Content = EgtMsg(MSG_CADCUTPAGEUC + 1)
|
||||
OkBtn.Content = EgtMsg(MSG_DIRECTCUTPAGEUC + 30)
|
||||
SimulBtn.ToolTip = EgtMsg(MSG_CADCUTPAGEUC + 1)
|
||||
OkBtn.ToolTip = EgtMsg(MSG_DIRECTCUTPAGEUC + 30)
|
||||
' Carico i dati dell'ultimo taglio
|
||||
m_dDepth = GetPrivateProfileDouble( S_DIRECTCUTS, K_DC_SING_DEPTH, m_dDepth, m_MainWindow.GetIniFile())
|
||||
m_dLen = GetPrivateProfileDouble( S_DIRECTCUTS, K_DC_SING_LENGTH, m_dLen, m_MainWindow.GetIniFile())
|
||||
@@ -137,6 +137,9 @@ Public Class SingleCutUC
|
||||
Point2Btn.IsEnabled = False
|
||||
' Deseleziono bottone primo punto
|
||||
Point1Btn.IsChecked = False
|
||||
|
||||
' la visualizzazione dei comandi è gestira dalla DirectCutPageUC richiamando la funzione ReloadParam
|
||||
|
||||
' Aggiorno visualizzazione
|
||||
EgtDraw()
|
||||
End Sub
|
||||
@@ -172,6 +175,12 @@ Public Class SingleCutUC
|
||||
m_bActive = False
|
||||
End Sub
|
||||
|
||||
Public Sub SetEnableParam(ByVal bIsSaw As Boolean)
|
||||
' se macchina solo WaterJet Disabilito/Nascondo parametri della lama
|
||||
DepthTxBx.IsEnabled = bIsSaw
|
||||
SawThChBx.IsEnabled = bIsSaw
|
||||
End Sub
|
||||
|
||||
Private Sub UpdateSimulOkBtn()
|
||||
If m_bCutOk Then
|
||||
SimulBtn.IsEnabled = True
|
||||
@@ -229,6 +238,12 @@ Public Class SingleCutUC
|
||||
' Verifico configurazione tavola e grezzo
|
||||
If Not m_bRawOk Then Return
|
||||
|
||||
' Recupero dati utensile e testa corrente
|
||||
Dim sTool As String = ""
|
||||
Dim sHead As String = ""
|
||||
Dim nExit As Integer = 0
|
||||
EgtGetCalcTool(sTool, sHead, nExit)
|
||||
|
||||
' Se acquisizione lama o laser
|
||||
If PointModeCmBx.SelectedIndex = PT_MODE.SAW Or PointModeCmBx.SelectedIndex = PT_MODE.LASER Then
|
||||
' Recupero la posizione macchina
|
||||
@@ -242,12 +257,12 @@ Public Class SingleCutUC
|
||||
If Not EgtSetCalcTool("", "H3", 1) Then Return
|
||||
' Trasformo in posizione punta utensile in basso
|
||||
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, dR1, dR2, True, m_ptTipP1) Then Return
|
||||
' Ora imposto la lama corrente
|
||||
If Not EgtSetCalcTool(sSaw, "H1", 1) Then Return
|
||||
' Altrimenti da lama
|
||||
' Reimposto eventuale precedente utensile
|
||||
EgtSetCalcTool(sTool, sHead, nExit)
|
||||
' Altrimenti da lama
|
||||
Else
|
||||
' Imposto la lama corrente
|
||||
If Not EgtSetCalcTool(sSaw, "H1", 1) Then Return
|
||||
' Reimposto eventuale precedente utensile
|
||||
EgtSetCalcTool(sTool, sHead, nExit)
|
||||
' Trasformo in posizione punta utensile in basso
|
||||
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, dR1, dR2, True, m_ptTipP1) Then Return
|
||||
End If
|
||||
@@ -271,10 +286,9 @@ Public Class SingleCutUC
|
||||
' Porto il tip nell'origine tavola
|
||||
m_ptTipP1.ToLoc(New Frame3d(m_ptTabOri))
|
||||
m_bPointP1Ok = True
|
||||
' Ricavo dati lama corrente
|
||||
Dim sSaw As String = m_MainWindow.m_CurrentMachine.sCurrSaw
|
||||
' Imposto la lama corrente
|
||||
If Not EgtSetCalcTool(sSaw, "H1", 1) Then Return
|
||||
' Reimposto eventuale precedente utensile
|
||||
EgtSetCalcTool(sTool, sHead, nExit)
|
||||
|
||||
End If
|
||||
|
||||
' Disegno il taglio
|
||||
@@ -303,6 +317,12 @@ Public Class SingleCutUC
|
||||
' Verifico configurazione tavola e grezzo
|
||||
If Not m_bRawOk Then Return
|
||||
|
||||
' Recupero dati utensile e testa corrente
|
||||
Dim sTool As String = ""
|
||||
Dim sHead As String = ""
|
||||
Dim nExit As Integer = 0
|
||||
EgtGetCalcTool(sTool, sHead, nExit)
|
||||
|
||||
' Se acquisizone lama o laser
|
||||
If PointModeCmBx.SelectedIndex = PT_MODE.SAW Or PointModeCmBx.SelectedIndex = PT_MODE.LASER Then
|
||||
' Recupero la posizione macchina
|
||||
@@ -316,12 +336,14 @@ Public Class SingleCutUC
|
||||
If Not EgtSetCalcTool("", "H3", 1) Then Return
|
||||
' Trasformo in posizione punta utensile in basso
|
||||
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, dR1, dR2, True, m_ptTipP2) Then Return
|
||||
' Ora imposto la lama corrente
|
||||
If Not EgtSetCalcTool(sSaw, "H1", 1) Then Return
|
||||
' Altrimenti da lama
|
||||
' Reimposto eventuale precedente utensile
|
||||
EgtSetCalcTool(sTool, sHead, nExit)
|
||||
|
||||
' Altrimenti da lama
|
||||
Else
|
||||
' Imposto la lama corrente
|
||||
If Not EgtSetCalcTool(sSaw, "H1", 1) Then Return
|
||||
' Reimposto eventuale precedente utensile
|
||||
EgtSetCalcTool(sTool, sHead, nExit)
|
||||
|
||||
' Trasformo in posizione punta utensile in basso
|
||||
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, dR1, dR2, True, m_ptTipP2) Then Return
|
||||
End If
|
||||
@@ -343,10 +365,8 @@ Public Class SingleCutUC
|
||||
' Porto il tip nell'origine tavola
|
||||
m_ptTipP2.ToLoc(New Frame3d(m_ptTabOri))
|
||||
m_bPointP2Ok = True
|
||||
' Ricavo dati lama corrente
|
||||
Dim sSaw As String = m_MainWindow.m_CurrentMachine.sCurrSaw
|
||||
' Imposto la lama corrente
|
||||
If Not EgtSetCalcTool(sSaw, "H1", 1) Then Return
|
||||
' Reimposto eventuale precedente utensile
|
||||
EgtSetCalcTool(sTool, sHead, nExit)
|
||||
End If
|
||||
|
||||
' Se il secondo punto non coincide con il primo, disegno il taglio
|
||||
@@ -559,9 +579,13 @@ Public Class SingleCutUC
|
||||
Dim dRawHeight As Double = m_ptRawMax.z - m_ptRawMin.z
|
||||
' Recupero spessore lama corrente
|
||||
Dim sSaw As String = m_MainWindow.m_CurrentMachine.sCurrSaw
|
||||
Dim sSawing As String = m_MainWindow.m_CurrentMachine.sCurrSawing
|
||||
EgtTdbSetCurrTool(sSaw)
|
||||
Dim dThick As Double = 0
|
||||
EgtTdbGetCurrToolParam(MCH_TP.THICK, dThick)
|
||||
' se è impostata una lavorazione di lama
|
||||
If Not String.IsNullOrEmpty(sSawing) Then
|
||||
EgtTdbGetCurrToolParam(MCH_TP.THICK, dThick)
|
||||
End If
|
||||
' Rimuovo eventuale vecchio pezzo per taglio diretto
|
||||
EraseDirectCutPart()
|
||||
' Disattivo eventuali lavorazioni presenti
|
||||
|
||||
@@ -38,8 +38,10 @@
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<ToggleButton Name="Point1Btn" Grid.Column="0"
|
||||
Style="{DynamicResource OmagCut_YellowToggleButton}"/>
|
||||
|
||||
Style="{DynamicResource OmagCut_YellowIconToggleButton}">
|
||||
<Image Source="{DynamicResource Acquisisci-PImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
</ToggleButton>
|
||||
|
||||
|
||||
</Grid>
|
||||
|
||||
@@ -77,8 +79,12 @@
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Button Name="SimulBtn" Grid.Column="0" Style="{DynamicResource OmagCut_GradientBlueTextButton}"/>
|
||||
<Button Name="OkBtn" Grid.Column="1" Style="{DynamicResource OmagCut_GradientBlueTextButton}"/>
|
||||
<Button Name="SimulBtn" Grid.Column="0" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource SimulaImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="OkBtn" Grid.Column="1" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource EseguiImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="ExitBtn" Grid.Column="2" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource XImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
Imports EgtUILib
|
||||
Imports System.Collections.ObjectModel
|
||||
Public Class SingleDrillUC
|
||||
' Riferimenti a pagine
|
||||
Private m_MainWindow As MainWindow = DirectCast(Application.Current.MainWindow, MainWindow)
|
||||
@@ -37,6 +38,8 @@ Public Class SingleDrillUC
|
||||
|
||||
Private m_dDiameter As Double = 0
|
||||
|
||||
Private m_sCurrDrill As String = String.Empty
|
||||
|
||||
' Costanti
|
||||
Private Const MAX_TAB_DEPTH As Double = 10.0
|
||||
Private Const MIN_CUT_LEN As Double = 10.0
|
||||
@@ -61,14 +64,17 @@ Public Class SingleDrillUC
|
||||
PointModeCmBx.ItemsSource = m_PointsModeArray
|
||||
|
||||
' Assegno messaggi
|
||||
Point1Btn.Content = EgtMsg(MSG_DIRECTCUTPAGEUC + 10)
|
||||
SimulBtn.Content = EgtMsg(MSG_CADCUTPAGEUC + 1)
|
||||
OkBtn.Content = EgtMsg(MSG_DIRECTCUTPAGEUC + 30)
|
||||
Point1Btn.ToolTip = EgtMsg(MSG_DIRECTCUTPAGEUC + 10)
|
||||
SimulBtn.ToolTip = EgtMsg(MSG_CADCUTPAGEUC + 1)
|
||||
OkBtn.ToolTip = EgtMsg(MSG_DIRECTCUTPAGEUC + 30)
|
||||
End Sub
|
||||
|
||||
Private Sub SingleDrill_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded
|
||||
m_sCurrDrill = m_CurrentMachine.sCurrDrill
|
||||
GetDrillFromDrilling(m_sCurrDrill, m_CurrentMachine.sCurrDrilling)
|
||||
|
||||
' recupero informazioni del foretto usato
|
||||
EgtTdbSetCurrTool(m_CurrentMachine.sCurrDrill)
|
||||
EgtTdbSetCurrTool(m_sCurrDrill)
|
||||
EgtTdbGetCurrToolParam(MCH_TP.DIAM, m_dDiameter)
|
||||
|
||||
' Attivo la pagina
|
||||
@@ -215,7 +221,7 @@ Public Class SingleDrillUC
|
||||
If Not m_MainWindow.m_CNCommunication.GetAxesPositions(dL1, dL2, dL3, dR1, dR2) Then Return
|
||||
|
||||
' Ricavo dati Foretto corrente
|
||||
Dim sDrill As String = m_MainWindow.m_CurrentMachine.sCurrDrill
|
||||
Dim sDrill As String = m_sCurrDrill
|
||||
' Se punto da laser
|
||||
If PointModeCmBx.SelectedIndex = PT_MODE.LASER Then
|
||||
' Imposto come testa corrente il laser (senza utensile ovviamente)
|
||||
@@ -245,9 +251,9 @@ Public Class SingleDrillUC
|
||||
m_ptTipP1.ToLoc(New Frame3d(m_ptTabOri))
|
||||
m_bPointP1Ok = True
|
||||
' Ricavo dati lama corrente
|
||||
Dim sSaw As String = m_MainWindow.m_CurrentMachine.sCurrDrill
|
||||
Dim sDrill As String = m_sCurrDrill
|
||||
' Imposto la lama corrente
|
||||
If Not EgtSetCalcTool(sSaw, "H1", 1) Then Return
|
||||
If Not EgtSetCalcTool(sDrill, "H1", 1) Then Return
|
||||
End If
|
||||
|
||||
' Disegno il taglio
|
||||
@@ -261,6 +267,42 @@ Public Class SingleDrillUC
|
||||
Point1Btn.IsChecked = True
|
||||
End Sub
|
||||
|
||||
'Private Sub GetDrillFromDrilling(ByRef sCurrDrill As String)
|
||||
' If String.IsNullOrEmpty(sCurrDrill) Or String.IsNullOrWhiteSpace(sCurrDrill) Then
|
||||
' ' creo l'elenco degli utensili di foratura
|
||||
' Dim sToolName As String = String.Empty
|
||||
' Dim nType As Integer = MCH_TY.NONE
|
||||
' Dim DrillToolList As New ObservableCollection(Of String)
|
||||
' DrillToolList.Clear()
|
||||
' If EgtTdbGetFirstTool(MCH_TF.DRILLBIT, sToolName, nType) Then
|
||||
' DrillToolList.Add(sToolName)
|
||||
' While EgtTdbGetNextTool(MCH_TF.DRILLBIT, sToolName, nType)
|
||||
' DrillToolList.Add(sToolName)
|
||||
' End While
|
||||
' End If
|
||||
' ' recupero l'utensile associato alla lavorazione
|
||||
' Dim sCurrDrilling As String = m_MainWindow.m_CurrentMachine.sCurrDrilling
|
||||
' Dim ToolString As String = String.Empty
|
||||
' EgtMdbSetCurrMachining(sCurrDrilling)
|
||||
' ' Recupero nome utensile tramite TUUID
|
||||
' Dim sTuuid As String = String.Empty
|
||||
' EgtMdbGetCurrMachiningParam(MCH_MP.TUUID, sTuuid)
|
||||
' EgtTdbGetToolFromUUID(sTuuid, ToolString)
|
||||
' Dim bToolExist As Boolean = False
|
||||
' For Each CurrTool As IEnumerable In DrillToolList
|
||||
' If CurrTool.ToString() = ToolString Then
|
||||
' bToolExist = True
|
||||
' Exit For
|
||||
' End If
|
||||
' Next
|
||||
' If bToolExist Then
|
||||
' sCurrDrill = ToolString
|
||||
' Else
|
||||
' sCurrDrill = String.Empty
|
||||
' End If
|
||||
' End If
|
||||
'End Sub
|
||||
|
||||
Private Sub XcoordTxBx_EgtClosed(sender As Object, e As EventArgs) Handles XcoordTxBx.EgtClosed
|
||||
' Recupero il valore della coordinata (in 0 Tab)
|
||||
Dim dXcoord As Double = 0
|
||||
@@ -354,10 +396,11 @@ Public Class SingleDrillUC
|
||||
' Spessore grezzo
|
||||
Dim dRawHeight As Double = m_ptRawMax.z - m_ptRawMin.z
|
||||
' Recupero spessore lama corrente
|
||||
Dim sDrill As String = m_MainWindow.m_CurrentMachine.sCurrDrill
|
||||
Dim sDrill As String = m_sCurrDrill
|
||||
GetDrillFromDrilling(sDrill, m_MainWindow.m_CurrentMachine.sCurrDrilling)
|
||||
EgtTdbSetCurrTool(sDrill)
|
||||
Dim dThick As Double = 0
|
||||
EgtTdbGetCurrToolParam(MCH_TP.THICK, dThick)
|
||||
Dim dDiam As Double = 0
|
||||
EgtTdbGetCurrToolParam(MCH_TP.DIAM, dDiam)
|
||||
' Rimuovo eventuale vecchio pezzo per taglio diretto
|
||||
EraseDirectCutPart()
|
||||
' Disattivo eventuali lavorazioni presenti
|
||||
|
||||
@@ -165,12 +165,13 @@
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="0.55*"/>
|
||||
<RowDefinition Height="0.55*"/>
|
||||
<RowDefinition Height="0.55*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<!--<RowDefinition Height="1*"/>-->
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<!-- Altezza delle alette -->
|
||||
<TextBlock Name="Parameter1TxBl" Grid.Row="0" Grid.ColumnSpan="2"
|
||||
Text="Offset"
|
||||
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
|
||||
@@ -187,12 +188,15 @@
|
||||
Width="60" Height="30" Margin="0,0,0,0"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
|
||||
|
||||
<!-- Delta angolo (abilitato solo per i frontalini) -->
|
||||
<TextBlock Name="Parameter2TxBl" Grid.Row="1" Grid.ColumnSpan="2"
|
||||
Text="Offset2"
|
||||
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
|
||||
FontSize="{DynamicResource FontSize_LowerCaseCharacter}"/>
|
||||
<!-- temporaneamente disabilito la definizione delta angolo per alzatine -->
|
||||
<EgtWPFLib:EgtTextBox Name="Parameter2ATxBx"
|
||||
IsEnabled="False"
|
||||
Visibility="Collapsed"
|
||||
Grid.Column="2" Grid.Row="1"
|
||||
HorizontalAlignment="Right"
|
||||
Width="60" Height="30" Margin="0,0,0,0"
|
||||
@@ -202,7 +206,18 @@
|
||||
HorizontalAlignment="Right"
|
||||
Width="60" Height="30" Margin="0,0,0,0"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
|
||||
|
||||
<!-- Spessore aletta -->
|
||||
<TextBlock Name="Parameter5TxBl" Grid.Row="2" Grid.ColumnSpan="2"
|
||||
Text="Offset2"
|
||||
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
|
||||
FontSize="{DynamicResource FontSize_LowerCaseCharacter}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="Parameter5TxBx"
|
||||
Grid.Column="2" Grid.Row="2"
|
||||
HorizontalAlignment="Right"
|
||||
Width="60" Height="30" Margin="0,0,0,0"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
|
||||
<!--Gestisco nello spazio di una TextBox due TextBoxs--><!--
|
||||
<UniformGrid Rows="1" Grid.Column="2" Grid.Row="1" Grid.ColumnSpan="2" Width="90" >
|
||||
<EgtWPFLib:EgtTextBox Name="Parameter2aTxBx"
|
||||
@@ -236,7 +251,7 @@
|
||||
Width="85" Height="30"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>-->
|
||||
|
||||
<UniformGrid Columns="2" Grid.ColumnSpan="4" Grid.Row="2">
|
||||
<UniformGrid Columns="2" Grid.ColumnSpan="4" Grid.Row="3">
|
||||
<!--questo bottone è stato creato solo per garantire il corretto allinaemento-->
|
||||
<Button Name="Vuoto" Visibility="Hidden"/>
|
||||
<!--Bottone per tornare indietro alla selezione di CompoInterni e Alz&Front-->
|
||||
|
||||
@@ -20,6 +20,7 @@ Public Class AlzFrontUC
|
||||
|
||||
' nome della info riferita alle alzatine e ai frontalini (1=Alz, 2=Front, 0=niente)
|
||||
Private Const INFO_ALZFRONT As String = "AF"
|
||||
Private Const INFO_ENABLE As String = "EnableAF"
|
||||
|
||||
' Properties
|
||||
Private m_sCompoDir As String = String.Empty
|
||||
@@ -75,8 +76,9 @@ Public Class AlzFrontUC
|
||||
m_MainWindow.m_DrawPageUC.DripCutBtn.IsEnabled = False
|
||||
|
||||
' nome dei parametri condivisi
|
||||
Parameter1TxBl.Text = "Altezza"
|
||||
Parameter2TxBl.Text = "Delta angolo"
|
||||
Parameter1TxBl.Text = EgtMsg(91134)
|
||||
Parameter2TxBl.Text = EgtMsg(91135)
|
||||
Parameter5TxBl.Text = EgtMsg(91136)
|
||||
|
||||
EgtZoom(ZM.ALL)
|
||||
End Sub
|
||||
@@ -98,6 +100,7 @@ Public Class AlzFrontUC
|
||||
GetPrivateProfileString(S_ALZFRONT, K_FRONT_HEIGHT, "0", Parameter1FTxBx.Text, m_MainWindow.GetIniFile)
|
||||
GetPrivateProfileString(S_ALZFRONT, K_ALZ_DELTA_ANG, "0", Parameter2ATxBx.Text, m_MainWindow.GetIniFile)
|
||||
GetPrivateProfileString(S_ALZFRONT, K_FRONT_DELTA_ANG, "0", Parameter2FTxBx.Text, m_MainWindow.GetIniFile)
|
||||
Parameter5TxBx.Text = Utility.LenToString(m_MainWindow.m_CurrentProjectPageUC.m_dRawHeight, 2)
|
||||
|
||||
' Imposto contesto corrente
|
||||
EgtSetCurrentContext(m_MainWindow.m_DrawPageUC.DrawScene.GetCtx())
|
||||
@@ -138,31 +141,41 @@ Public Class AlzFrontUC
|
||||
|
||||
' inserisco il lato nella lista
|
||||
While CurrLine <> GDB_ID.NULL
|
||||
' escludo tutte le forme che non sono delle linee
|
||||
If EgtGetType(CurrLine) = GDB_TY.CRV_LINE Then
|
||||
' Aggiungo il lato alla lista di quelli su cui è possibile mettere una alzatina o un frontalino
|
||||
Dim sNameCurrLine As String = String.Empty
|
||||
Dim nInfo As Integer = 0
|
||||
Dim dSideAng As Integer = 0
|
||||
EgtSetName(CurrLine, "A" & nEntityIndex.ToString)
|
||||
EgtGetName(CurrLine, sNameCurrLine)
|
||||
' inserisco la numerazione dei lati della figura
|
||||
AddTextToLine(sNameCurrLine, LabelId, CurrLine, 20, m_dBBoxRad, True)
|
||||
' recupero l'informazione
|
||||
EgtGetInfo(CurrLine, INFO_ALZFRONT, nInfo)
|
||||
If nInfo = 1 Then
|
||||
AlzFrontEntityList.Add(New AlzFrontEntity(sNameCurrLine, CurrLine, AlzFrontEntity.AlzFront.ALZATINA))
|
||||
ElseIf nInfo = 2 Then
|
||||
AlzFrontEntityList.Add(New AlzFrontEntity(sNameCurrLine, CurrLine, AlzFrontEntity.AlzFront.FRONTALINO))
|
||||
Else
|
||||
AlzFrontEntityList.Add(New AlzFrontEntity(sNameCurrLine, CurrLine))
|
||||
End If
|
||||
nEntityIndex += 1
|
||||
Else
|
||||
EgtSetName(CurrLine, "B" & nOtherIndex.ToString)
|
||||
nOtherIndex = nOtherIndex + 1
|
||||
End If
|
||||
Dim NextId As Integer = EgtGetNext(CurrLine)
|
||||
If NextId = GDB_ID.NULL Then NextId = EgtGetFirstInGroup(LoopId)
|
||||
If VerifySideAnglePossible(PrevLine, CurrLine, NextId, bOutLoop) Then
|
||||
|
||||
If ApprovedSideToAlzFront(CurrLine) Then
|
||||
' Aggiungo il lato alla lista di quelli su cui è possibile mettere una alzatina o un frontalino
|
||||
Dim sNameCurrLine As String = String.Empty
|
||||
Dim nInfo As Integer = 0
|
||||
Dim dSideAng As Integer = 0
|
||||
EgtSetName(CurrLine, "A" & nEntityIndex.ToString)
|
||||
EgtGetName(CurrLine, sNameCurrLine)
|
||||
' inserisco la numerazione dei lati della figura
|
||||
AddTextToLine(sNameCurrLine, LabelId, CurrLine, 20, m_dBBoxRad, True)
|
||||
' recupero l'informazione
|
||||
EgtGetInfo(CurrLine, INFO_ALZFRONT, nInfo)
|
||||
If nInfo = 1 Then
|
||||
AlzFrontEntityList.Add(New AlzFrontEntity(sNameCurrLine, CurrLine, AlzFrontEntity.AlzFront.ALZATINA))
|
||||
ElseIf nInfo = 2 Then
|
||||
AlzFrontEntityList.Add(New AlzFrontEntity(sNameCurrLine, CurrLine, AlzFrontEntity.AlzFront.FRONTALINO))
|
||||
Else
|
||||
AlzFrontEntityList.Add(New AlzFrontEntity(sNameCurrLine, CurrLine))
|
||||
End If
|
||||
' inserisco riferimento univoco al lato (solo se non esiste)
|
||||
Dim sInfoRef As String = String.Empty
|
||||
EgtGetInfo(CurrLine, "RefAF", sInfoRef)
|
||||
If String.IsNullOrEmpty(sInfoRef) Then
|
||||
Dim sRefGUID As String = System.Guid.NewGuid().ToString()
|
||||
EgtSetInfo(CurrLine, "RefAF", sRefGUID)
|
||||
End If
|
||||
nEntityIndex += 1
|
||||
Else
|
||||
EgtSetName(CurrLine, "B" & nOtherIndex.ToString)
|
||||
nOtherIndex = nOtherIndex + 1
|
||||
End If
|
||||
End If
|
||||
PrevLine = CurrLine
|
||||
CurrLine = EgtGetNext(CurrLine)
|
||||
End While
|
||||
@@ -266,6 +279,26 @@ Public Class AlzFrontUC
|
||||
bInternalSelection = False
|
||||
End Sub
|
||||
|
||||
' restituisce vero se il lato possiede delle info legate al sideangle
|
||||
Private Function VerifyIsThereSideAngle(nCurrLine As Integer) As Boolean
|
||||
Dim dSideAngle As Double
|
||||
return EgtGetInfo(nCurrLine, INFO_SIDE_ANGLE, dSideAngle)
|
||||
End Function
|
||||
|
||||
' restituisce vero se il lato possiede delle info legate alle alette
|
||||
Private Function VerifyIsThereAlzFront(nCurrLine As Integer) As Boolean
|
||||
Dim nAlzFront As Integer
|
||||
return EgtGetInfo(nCurrLine, INFO_ALZFRONT, nAlzFront) AndAlso nAlzFront <> 0
|
||||
End Function
|
||||
|
||||
' approvo la costruzione dell'aletta sul lato indicato
|
||||
Private Function ApprovedSideToAlzFront(nCurrLine As Integer) As Boolean
|
||||
If VerifyIsThereSideAngle(nCurrLine) And Not VerifyIsThereAlzFront(nCurrLine) Then
|
||||
' se esiste SideAngle e un'aletta allora NON approvo
|
||||
Return False
|
||||
End If
|
||||
Return True
|
||||
End Function
|
||||
|
||||
' Permette di aggiugere accanto alla linea passata
|
||||
Friend Function AddTextToLine(sText As String, TextLayer As Integer, CurrLine As Integer, dDistance As Double,
|
||||
@@ -614,6 +647,13 @@ Public Class AlzFrontUC
|
||||
LoadCurrentCompo()
|
||||
End Sub
|
||||
|
||||
Private Sub Parameter5TxBx_EgtClosed(sender As Object, e As EventArgs) Handles Parameter5TxBx.EgtClosed
|
||||
Dim dValue As Double
|
||||
StringToDouble(Parameter5TxBx.Text, dValue)
|
||||
' aggiorno il disegno
|
||||
LoadCurrentCompo()
|
||||
End Sub
|
||||
|
||||
#End Region ' Altezza, delta angolo di spoglia
|
||||
|
||||
#Region "METHODS"
|
||||
@@ -749,6 +789,9 @@ Public Class AlzFrontUC
|
||||
If StringToLen(Parameter2FTxBx.Text, dVal) Then
|
||||
EgtLuaSetGlobNumVar("CMP.F_DeltaAng", dVal)
|
||||
End If
|
||||
If StringToLen(Parameter5TxBx.Text, dVal) Then
|
||||
EgtLuaSetGlobNumVar("CMP.ThicknessRaw", dVal)
|
||||
End If
|
||||
' parametri per la scrittura dei caratteri
|
||||
EgtLuaSetGlobNumVar("CMP.BBoxRad", m_dBBoxRad)
|
||||
EgtLuaSetGlobNumVar("CMP.HeightText", m_dH)
|
||||
|
||||
@@ -336,6 +336,7 @@ Public Class CompoDimensionUC
|
||||
Dim nCmpInfo As Integer = 0
|
||||
If EgtGetInfo(nId, "ID", nCmpInfo) AndAlso nCmp = nCmpInfo Then
|
||||
EgtSetStatus(nId, GDB_ST.OFF)
|
||||
UpdateInLoopReference(nCmp)
|
||||
Exit While
|
||||
End If
|
||||
nId = EgtGetNextName(nId, "HoleLabels")
|
||||
@@ -379,5 +380,42 @@ Public Class CompoDimensionUC
|
||||
EgtDraw()
|
||||
End Sub
|
||||
|
||||
Private Sub UpdateInLoopReference(nCmp As Integer)
|
||||
' aggiorno il layer "FiloTop"
|
||||
Dim nIdInLoop As Integer = EgtGetFirstNameInGroup(EgtGetFirstGroupInGroup(GDB_ID.ROOT), "InLoop")
|
||||
While nIdInLoop <> GDB_ID.NULL
|
||||
Dim nCmpInfoIL As Integer = 0
|
||||
If EgtGetInfo(nIdInLoop, "ID", nCmpInfoIL) AndAlso nCmp = nCmpInfoIL Then
|
||||
Dim nLayFiloTop As Integer = GDB_ID.NULL
|
||||
EgtGetInfo(nIdInLoop, "FiloTopRef", nLayFiloTop)
|
||||
If nLayFiloTop <> GDB_ID.NULL Then
|
||||
Dim LocalList As New List(Of Integer) From {nIdInLoop}
|
||||
m_DrawPage.m_FiloTopUC.CreateFiloTopPreView(LocalList)
|
||||
EgtSetStatus(nLayFiloTop, GDB_ST.ON_)
|
||||
Exit While
|
||||
End If
|
||||
End If
|
||||
nIdInLoop = EgtGetNextName(nIdInLoop, "InLoop")
|
||||
End While
|
||||
End Sub
|
||||
|
||||
' riceve la info "ID" della componente
|
||||
Public Sub SetStatusVisibilityInLoopReference(nCmp As Integer, Status As GDB_ST)
|
||||
' aggiorno il layer "FiloTop"
|
||||
Dim nIdInLoop As Integer = EgtGetFirstNameInGroup(EgtGetFirstGroupInGroup(GDB_ID.ROOT), "InLoop")
|
||||
While nIdInLoop <> GDB_ID.NULL
|
||||
Dim nCmpInfoIL As Integer = 0
|
||||
If EgtGetInfo(nIdInLoop, "ID", nCmpInfoIL) AndAlso nCmp = nCmpInfoIL Then
|
||||
Dim nLayFiloTop As Integer = GDB_ID.NULL
|
||||
EgtGetInfo(nIdInLoop, "FiloTopRef", nLayFiloTop)
|
||||
If nLayFiloTop <> GDB_ID.NULL Then
|
||||
EgtSetStatus(nLayFiloTop, Status)
|
||||
Exit While
|
||||
End If
|
||||
End If
|
||||
nIdInLoop = EgtGetNextName(nIdInLoop, "InLoop")
|
||||
End While
|
||||
End Sub
|
||||
|
||||
#End Region ' METHODS for InternalCompo
|
||||
End Class
|
||||
|
||||
@@ -24,6 +24,7 @@ Public Class CompoTrfData
|
||||
|
||||
Private Sub OkBtn_Click(sender As Object, e As RoutedEventArgs) Handles OkBtn.Click
|
||||
DialogResult = True
|
||||
SaveData()
|
||||
Close()
|
||||
End Sub
|
||||
|
||||
@@ -32,7 +33,30 @@ Public Class CompoTrfData
|
||||
Close()
|
||||
End Sub
|
||||
|
||||
Private Sub SaveData()
|
||||
WritePrivateProfileString(S_TRF, K_ORDCODE, OrdCodeTxBx.Text, m_MainWindow.GetIniFile())
|
||||
WritePrivateProfileString(S_TRF, K_ORDDESC, OrdDescTxBx.Text, m_MainWindow.GetIniFile())
|
||||
WritePrivateProfileString(S_TRF, K_PARTCODE, PartCodeTxBx.Text, m_MainWindow.GetIniFile())
|
||||
WritePrivateProfileString(S_TRF, K_MATCODE, MatCodeTxBx.Text, m_MainWindow.GetIniFile())
|
||||
WritePrivateProfileString(S_TRF, K_SURFCODE, SurfCodeTxBx.Text, m_MainWindow.GetIniFile())
|
||||
' prima di salvare lo spessore converto in mm e poi di nuovo in stringa
|
||||
Dim dVal As Double = 0
|
||||
StringToLen(ThicknessTxBx.Text, dVal)
|
||||
WritePrivateProfileString(S_TRF, K_TRFTHICKNESS, DoubleToString(dVal, 4), m_MainWindow.GetIniFile())
|
||||
End Sub
|
||||
|
||||
Friend Sub SetData(sOrdCode As String, sOrdDesc As String, sPartCode As String, sMatCode As String, sSurfCode As String, dTh As Double)
|
||||
' se verifico che non sono stati iniziliazzti i campi allora provvedo a leggere il file ini del programma
|
||||
If sOrdCode = "" And sOrdDesc = "" And sPartCode = "" And sMatCode = "" And sSurfCode = "" Then
|
||||
GetPrivateProfileString(S_TRF, K_ORDCODE, sOrdCode, sOrdCode, m_MainWindow.GetIniFile())
|
||||
GetPrivateProfileString(S_TRF, K_ORDDESC, sOrdDesc, sOrdDesc, m_MainWindow.GetIniFile())
|
||||
GetPrivateProfileString(S_TRF, K_PARTCODE, sPartCode, sPartCode, m_MainWindow.GetIniFile())
|
||||
GetPrivateProfileString(S_TRF, K_MATCODE, sMatCode, sMatCode, m_MainWindow.GetIniFile())
|
||||
GetPrivateProfileString(S_TRF, K_SURFCODE, sSurfCode, sSurfCode, m_MainWindow.GetIniFile())
|
||||
' recupero il dato dello spessore che deve essere in mm
|
||||
dTh = GetPrivateProfileDouble(S_TRF, K_TRFTHICKNESS, dTh, m_MainWindow.GetIniFile())
|
||||
End If
|
||||
' inizializzo i campi della finestra
|
||||
OrdCodeTxBx.Text = sOrdCode
|
||||
OrdDescTxBx.Text = sOrdDesc
|
||||
PartCodeTxBx.Text = sPartCode
|
||||
|
||||
@@ -64,7 +64,7 @@
|
||||
<ToggleButton Name="DimensionBtn" Grid.Column="0" Style="{DynamicResource OmagCut_YellowToggleButton}" Visibility="Collapsed"/>
|
||||
</Grid>
|
||||
|
||||
<Grid Name="VariablesGrd" Grid.Row="1" Grid.ColumnSpan="2"/>
|
||||
<Grid Name="VariablesGrd" Grid.Row="1" Grid.RowSpan="2" Grid.ColumnSpan="2"/>
|
||||
|
||||
<Grid Name="MessageGrid" Grid.Row="2" Grid.ColumnSpan="2">
|
||||
<TextBlock Name="MessageTxBl" Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||
|
||||
@@ -41,6 +41,9 @@ Public Class DrawPageUC
|
||||
Friend m_bDrawOk As Boolean = False
|
||||
Private m_bFirst As Boolean = True
|
||||
|
||||
Private m_SelListHole As New List(Of Integer)
|
||||
Private m_DeselectListHole As New List(Of Integer)
|
||||
|
||||
' questa variabile serve per risalire al nome della componente che ospita i componenti interni att
|
||||
Friend m_sMainCompo As String = String.Empty
|
||||
|
||||
@@ -105,6 +108,9 @@ Public Class DrawPageUC
|
||||
Return m_nSelectedLayer
|
||||
End Get
|
||||
End Property
|
||||
Public Sub SetCurrLayer(ByVal nCurrLayer As Integer)
|
||||
m_nSelectedLayer = nCurrLayer
|
||||
End Sub
|
||||
|
||||
Enum Pages
|
||||
MainComponent
|
||||
@@ -357,6 +363,8 @@ Public Class DrawPageUC
|
||||
Dim nCmpInfo As Integer = 0
|
||||
If EgtGetInfo(nHLId, "ID", nCmpInfo) AndAlso nCmp = nCmpInfo Then
|
||||
EgtSetStatus(nHLId, GDB_ST.ON_)
|
||||
' nascondo eventuali FiloTop
|
||||
m_CompoDimension.SetStatusVisibilityInLoopReference(nCmp, GDB_ST.OFF)
|
||||
Exit While
|
||||
End If
|
||||
nHLId = EgtGetNextName(nHLId, "HoleLabels")
|
||||
@@ -459,21 +467,25 @@ Public Class DrawPageUC
|
||||
EgtDeselectObj(nId)
|
||||
EgtDeselectObj(nLayId)
|
||||
Dim sLayName As String = ""
|
||||
If EgtGetName(nLayId, sLayName) AndAlso sLayName = NAME_INLOOP AndAlso EgtExistsInfo( nLayId, INFO_FILOTOP) Then
|
||||
EgtRemoveInfo( nLayId, INFO_FILOTOP)
|
||||
EgtRemoveInfo( nLayId, INFO_OFFSET)
|
||||
EgtRemoveInfo( nLayId, INFO_DEPTH)
|
||||
EgtResetColor( nLayId)
|
||||
If EgtGetName(nLayId, sLayName) AndAlso sLayName = NAME_INLOOP AndAlso EgtExistsInfo(nLayId, INFO_FILOTOP) Then
|
||||
EgtRemoveInfo(nLayId, INFO_FILOTOP)
|
||||
EgtRemoveInfo(nLayId, INFO_OFFSET)
|
||||
EgtRemoveInfo(nLayId, INFO_DEPTH)
|
||||
EgtResetColor(nLayId)
|
||||
End If
|
||||
m_DeselectListHole.Add(nLayId)
|
||||
m_SelListHole.Remove(nLayId)
|
||||
Else
|
||||
Dim sLayName As String = ""
|
||||
If EgtGetName( nLayId, sLayName) AndAlso sLayName = NAME_INLOOP Then
|
||||
EgtSelectObj( nId)
|
||||
EgtSelectObj( nLayId)
|
||||
EgtSetInfo( nLayId, INFO_FILOTOP, 1)
|
||||
EgtSetInfo( nLayId, INFO_OFFSET, m_FiloTopUC.FiloTopOffset)
|
||||
EgtSetInfo( nLayId, INFO_DEPTH, m_FiloTopUC.FiloTopDepth)
|
||||
EgtSetColor( nLayId, New Color3d(255, 255, 255))
|
||||
If EgtGetName(nLayId, sLayName) AndAlso sLayName = NAME_INLOOP Then
|
||||
EgtSelectObj(nId)
|
||||
EgtSelectObj(nLayId)
|
||||
EgtSetInfo(nLayId, INFO_FILOTOP, 1)
|
||||
EgtSetInfo(nLayId, INFO_OFFSET, m_FiloTopUC.FiloTopOffset)
|
||||
EgtSetInfo(nLayId, INFO_DEPTH, m_FiloTopUC.FiloTopDepth)
|
||||
EgtSetColor(nLayId, New Color3d(255, 255, 255))
|
||||
m_SelListHole.Add(nLayId)
|
||||
m_DeselectListHole.Remove(nLayId)
|
||||
End If
|
||||
End If
|
||||
EgtDraw()
|
||||
@@ -481,6 +493,8 @@ Public Class DrawPageUC
|
||||
End If
|
||||
nId = EgtGetNextObjInSelWin()
|
||||
End While
|
||||
m_FiloTopUC.CreateFiloTopPreView(m_SelListHole)
|
||||
m_FiloTopUC.EraseFiloTopPreview(m_DeselectListHole)
|
||||
End Sub
|
||||
|
||||
Private Sub OnShowDistanceVector(sender As Object, vtDist As Vector3d) Handles DrawScene.OnShowDistanceVector
|
||||
@@ -879,6 +893,9 @@ Public Class DrawPageUC
|
||||
|
||||
' permette di inserire più di un part
|
||||
Private Function MakeMultipleInsert(ByVal nNbr As Integer, sName As String) As Boolean
|
||||
|
||||
Dim InsertColor As Color3d = CompoColor(m_MainWindow.GetIniFile())
|
||||
|
||||
' Imposto il contesto corrente
|
||||
EgtSetCurrentContext(DrawScene.GetCtx())
|
||||
Dim Pz As Integer = -1
|
||||
@@ -887,11 +904,12 @@ Public Class DrawPageUC
|
||||
' Cancello layer regioni per selezione buchi
|
||||
Pz = EgtGetFirstGroupInGroup(GDB_ID.ROOT)
|
||||
|
||||
' identificativo univoico del gruppo di pezzi, se più di un pezzo
|
||||
Dim sGUICode As String = String.Empty
|
||||
|
||||
While Pz <> -1
|
||||
' imposto il contesto corrente
|
||||
EgtSetCurrentContext(DrawScene.GetCtx())
|
||||
' salvo il file temporaneo per studio delle alzatine
|
||||
EgtSaveFile("c:\EgtData\OmagCUT\Temp\TempAlzatine.nge", NGE.CMPTEXT)
|
||||
' cerco un altro pezzo nell'elenco
|
||||
NxtPz = EgtGetNextPart(Pz)
|
||||
|
||||
@@ -1014,11 +1032,20 @@ Public Class DrawPageUC
|
||||
SideAngle.WriteSideAngleForNest(DrawScene.GetCtx())
|
||||
' Imposto colore testi
|
||||
Utility.SetTextColor(nRegLayId)
|
||||
' Imposto il colore del pezzo inserito nel progetto
|
||||
EgtSetColor(nRegLayId, InsertColor)
|
||||
Dim EntId As Integer = EgtGetFirstInGroup(nRegLayId)
|
||||
While EntId <> GDB_ID.NULL
|
||||
If EgtGetType( EntId) = GDB_TY.SRF_FRGN Then EgtSetColor(EntId, InsertColor)
|
||||
EntId = EgtGetNext(EntId)
|
||||
End While
|
||||
|
||||
' Esporto il pezzo in un file temporaneo
|
||||
Dim sTmpFile As String = m_MainWindow.GetTempDir() & "\FlatPartCompo.Nge"
|
||||
If Not EgtSaveObjToFile(Pz, sTmpFile, NGE.BIN) Then
|
||||
Return False
|
||||
End If
|
||||
|
||||
' Passo al contesto principale
|
||||
EgtSetCurrentContext(m_MainWindow.m_CurrentProjectPageUC.CurrentProjectScene.GetCtx())
|
||||
' Recupero flag per inserimento diretto in grezzo (altrimenti in parcheggio)
|
||||
@@ -1027,6 +1054,11 @@ Public Class DrawPageUC
|
||||
EgtEraseEmptyParts()
|
||||
' Area dei nuovi pezzi
|
||||
Dim dNewArea As Double = 0
|
||||
|
||||
If nNbr > 1 Then
|
||||
sGUICode = System.Guid.NewGuid.ToString
|
||||
End If
|
||||
|
||||
' Se esiste il file del pezzo
|
||||
If My.Computer.FileSystem.FileExists(sTmpFile) Then
|
||||
' eseguo inserimento
|
||||
@@ -1041,15 +1073,33 @@ Public Class DrawPageUC
|
||||
If m_bTrfData Then EgtSetInfo(nId2, "CsvPart", m_TrfOrderCode & "-" & nId2.ToString())
|
||||
' Aggiorno l'area dei nuovi pezzi
|
||||
dNewArea += GeomCalc.GetPartArea(nId2)
|
||||
' Inserisco in parcheggio
|
||||
|
||||
' assegno l'identificatico del pezzo, se esiste
|
||||
If Not String.IsNullOrEmpty(sGUICode) Then
|
||||
Dim sPreGuid As String = CreatePreGuidCode(nId2)
|
||||
EgtSetInfo(nId2, INFO_REFGROUP, sPreGuid & sGUICode)
|
||||
End If
|
||||
' muovo il pezzo nella prima posizione di parcheggio libera
|
||||
m_MainWindow.m_CadCutPageUC.m_NestPage.StoreOnePart(nId2, True)
|
||||
' Se richiesto posizionamento diretto, lo eseguo
|
||||
If bDirect Then
|
||||
If m_MainWindow.m_CadCutPageUC.m_NestPage.InsertOnePart(nId2) Then
|
||||
' Eventuale notifica al VeinMatching
|
||||
VeinMatching.OnInsertPartInRaw(nId2)
|
||||
|
||||
' ------------------------ AGGIUNGO PEZZO NEL VEINMATCH ----------------------------------
|
||||
' verifico che il pezzo sia un Piano Cucina o un Piano Bagno o un'Aletta
|
||||
Dim sCMP As String = String.Empty
|
||||
EgtGetInfo(nId2, "CMP", sCMP)
|
||||
If sCMP.StartsWith("PCucina") Or sCMP.StartsWith("PBagno") Or sCMP.StartsWith("AlzFront") Then
|
||||
' Aggiungo riferimento e lo inserisco in VeinMatching
|
||||
VeinMatching.SetRefOnPart(nId2)
|
||||
VeinMatching.AddPartFromDraw(nId2)
|
||||
' Se richiesto posizionamento diretto, lo eseguo
|
||||
If bDirect Then
|
||||
If m_MainWindow.m_CadCutPageUC.m_NestPage.InsertOnePart(nId2) Then
|
||||
' Eventuale notifica al VeinMatching
|
||||
VeinMatching.OnInsertPartInRaw(nId2)
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
' ------------------------ AGGIUNGO PEZZO NEL VEINMATCH ----------------------------------
|
||||
|
||||
Next
|
||||
' Cancello il file
|
||||
My.Computer.FileSystem.DeleteFile(sTmpFile)
|
||||
@@ -1123,8 +1173,10 @@ Public Class DrawPageUC
|
||||
Private Sub TrfDataBtn_Click(sender As Object, e As RoutedEventArgs) Handles TrfDataBtn.Click
|
||||
If m_bTrfData Then
|
||||
Dim DlgTrfData As New CompoTrfData(m_MainWindow)
|
||||
' carico i dati appena salvati nella pagina
|
||||
DlgTrfData.SetData(m_TrfOrderCode, m_TrfOrderDesc, m_TrfPartCode, m_TrfMatCode, m_TrfSurfCode, m_TrfThickness)
|
||||
If DlgTrfData.ShowDialog() Then
|
||||
' recupero i dati salvati nella pagina
|
||||
DlgTrfData.GetData(m_TrfOrderCode, m_TrfOrderDesc, m_TrfPartCode, m_TrfMatCode, m_TrfSurfCode, m_TrfThickness)
|
||||
End If
|
||||
ElseIf m_bCsvData Then
|
||||
@@ -1203,6 +1255,8 @@ Public Class DrawPageUC
|
||||
Private Sub EngraveBtn_Click(sender As Object, e As RoutedEventArgs) Handles EngraveBtn.Click
|
||||
m_SceneButtons.MeasureBtn.IsChecked = False
|
||||
If EngraveBtn.IsChecked Then
|
||||
' Aumento lo spazio disponibile per inserirei i parametri (tolgo spazio ad eventuali messaggi)
|
||||
Grid.SetRowSpan(VariablesGrd, 2)
|
||||
' Imposto modalità
|
||||
m_SideAngleUC.m_Mode = SideAngleUC.ModeOpt.ENGRAVE
|
||||
If m_ActiveComponentPage = Pages.CompoDimension Then
|
||||
@@ -1234,6 +1288,7 @@ Public Class DrawPageUC
|
||||
EgtSetStatus(EgtGetFirstNameInGroup(PartId, COMPO_LAYER_QUOTATURE), GDB_ST.OFF)
|
||||
EgtSetStatus(EgtGetFirstNameInGroup(PartId, COMPO_LAYER_ETICHETTE), GDB_ST.OFF)
|
||||
Else
|
||||
Grid.SetRowSpan(VariablesGrd, 2)
|
||||
VariablesGrd.Children.Remove(m_SideAngleUC)
|
||||
If m_PrevSideAnglePage = Pages.CompoDimension Then
|
||||
VariablesGrd.Children.Add(m_CompoDimension)
|
||||
@@ -1323,6 +1378,8 @@ Public Class DrawPageUC
|
||||
End Sub
|
||||
|
||||
Private Sub FiloTopBtn_Click(sender As Object, e As RoutedEventArgs) Handles FiloTopBtn.Click
|
||||
m_SelListHole.Clear()
|
||||
m_DeselectListHole.Clear()
|
||||
m_SceneButtons.MeasureBtn.IsChecked = False
|
||||
If FiloTopBtn.IsChecked Then
|
||||
' Imposto modalità
|
||||
@@ -1336,25 +1393,25 @@ Public Class DrawPageUC
|
||||
m_PrevSideAnglePage = Pages.AlzFront
|
||||
LeftButtonGrd.Children.Remove(m_CompoDimension.m_AlzFrontPage)
|
||||
End If
|
||||
VariablesGrd.Children.Add( m_FiloTopUC)
|
||||
VariablesGrd.Children.Add(m_FiloTopUC)
|
||||
SideAngleBtn.IsEnabled = False
|
||||
EngraveBtn.IsEnabled = False
|
||||
DripCutBtn.IsEnabled = False
|
||||
MessageGrid.Visibility = Windows.Visibility.Hidden
|
||||
BackBtn.Visibility = Windows.Visibility.Hidden
|
||||
MessageTxBx.Text = EgtMsg( MSG_DRAWPAGEUC + 6) ' Selezionare un contorno
|
||||
MessageTxBx.Text = EgtMsg(MSG_DRAWPAGEUC + 6) ' Selezionare un contorno
|
||||
MessageBrd.Background = Application.Current.FindResource("OmagCut_Green")
|
||||
' In ogni caso, nascondo layer delle misure
|
||||
Dim PartId As Integer = EgtGetFirstInGroup( GDB_ID.ROOT)
|
||||
EgtSetStatus(EgtGetFirstNameInGroup( PartId, COMPO_LAYER_AUX), GDB_ST.OFF)
|
||||
EgtSetStatus(EgtGetFirstNameInGroup( PartId, COMPO_LAYER_QUOTATURE), GDB_ST.OFF)
|
||||
EgtSetStatus(EgtGetFirstNameInGroup( PartId, COMPO_LAYER_ETICHETTE), GDB_ST.OFF)
|
||||
Dim PartId As Integer = EgtGetFirstInGroup(GDB_ID.ROOT)
|
||||
EgtSetStatus(EgtGetFirstNameInGroup(PartId, COMPO_LAYER_AUX), GDB_ST.OFF)
|
||||
EgtSetStatus(EgtGetFirstNameInGroup(PartId, COMPO_LAYER_QUOTATURE), GDB_ST.OFF)
|
||||
EgtSetStatus(EgtGetFirstNameInGroup(PartId, COMPO_LAYER_ETICHETTE), GDB_ST.OFF)
|
||||
Else
|
||||
VariablesGrd.Children.Remove( m_FiloTopUC)
|
||||
VariablesGrd.Children.Remove(m_FiloTopUC)
|
||||
If m_PrevSideAnglePage = Pages.CompoDimension Then
|
||||
VariablesGrd.Children.Add( m_CompoDimension)
|
||||
VariablesGrd.Children.Add(m_CompoDimension)
|
||||
ElseIf m_PrevSideAnglePage = Pages.InternalComponent Then
|
||||
LeftButtonGrd.Children.Add( m_CompoDimension.m_InternalCompoPage)
|
||||
LeftButtonGrd.Children.Add(m_CompoDimension.m_InternalCompoPage)
|
||||
End If
|
||||
SideAngleBtn.IsEnabled = m_bEnableSideAngle
|
||||
EngraveBtn.IsEnabled = True
|
||||
|
||||
@@ -41,7 +41,11 @@
|
||||
FontSize="{DynamicResource FontSize_LowerCaseCharacter}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="Parameter2TxBx" Grid.Column="1" Grid.Row="11" Width="90"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
|
||||
</Grid>
|
||||
<TextBlock Name="Parameter3TxBl" Grid.Row="12" Text="Arrotonda"
|
||||
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
|
||||
FontSize="{DynamicResource FontSize_LowerCaseCharacter}"/>
|
||||
<CheckBox Name="Parameter3ChBx" Grid.Row="12" Grid.Column="1" Style="{StaticResource OmagCut_CheckBox_Single}"
|
||||
HorizontalAlignment="Center" Margin="0,0,6,0"/>
|
||||
</Grid>
|
||||
|
||||
</UserControl>
|
||||
|
||||
@@ -7,6 +7,8 @@ Public Class FiloTopUC
|
||||
' Riferimento alla pagina che ha aperto SideAngleUC
|
||||
Private m_CallingPage As MainWindow.Pages
|
||||
|
||||
Private m_SelList As New List(Of Integer)
|
||||
|
||||
' Offset della sfilettatura
|
||||
Private m_dFiloTopOffset As Double = 0
|
||||
Friend ReadOnly Property FiloTopOffset As Double
|
||||
@@ -23,6 +25,13 @@ Public Class FiloTopUC
|
||||
End Get
|
||||
End Property
|
||||
|
||||
' esegue l'arrotindamento sugli angoli del percorso utensile
|
||||
Private m_bCornerradius As Boolean = False
|
||||
Friend ReadOnly Property bCornerRadius As Boolean
|
||||
Get
|
||||
Return m_bCornerradius
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private Sub FiloTopUC_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded
|
||||
' Imposto riferimenti ad altre pagine
|
||||
@@ -43,14 +52,18 @@ Public Class FiloTopUC
|
||||
End If
|
||||
|
||||
' Gestisco visualizzazione dei parametri
|
||||
Parameter2TxBl.Visibility = Windows.Visibility.Visible
|
||||
ParameterTxBl.Visibility = Windows.Visibility.Visible
|
||||
Parameter2TxBx.Visibility = Windows.Visibility.Visible
|
||||
Parameter3TxBl.Visibility = Windows.Visibility.Visible
|
||||
|
||||
' Aggiorno valori
|
||||
m_dFiloTopOffset = GetPrivateProfileDouble( S_SIDES, K_FILOTOPOFFSET, 5, m_MainWindow.GetIniFile())
|
||||
ParameterTxBx.Text = LenToString( m_dFiloTopOffset, 3)
|
||||
m_dFiloTopDepth = GetPrivateProfileDouble( S_SIDES, K_FILOTOPDEPTH, 5, m_MainWindow.GetIniFile())
|
||||
Parameter2TxBx.Text = LenToString( m_dFiloTopDepth, 3)
|
||||
Parameter2TxBx.Text = LenToString(m_dFiloTopDepth, 3)
|
||||
m_bCornerradius = GetPrivateProfileInt(S_SIDES, K_ROUNDOFF, 0, m_MainWindow.GetIniFile()) <> 0
|
||||
Parameter3ChBx.IsChecked = m_bCornerradius
|
||||
m_SelList.Clear()
|
||||
End Sub
|
||||
|
||||
Private Sub FiloTopUC_Unloaded(sender As Object, e As RoutedEventArgs) Handles Me.Unloaded
|
||||
@@ -74,6 +87,8 @@ Public Class FiloTopUC
|
||||
End While
|
||||
nPartId = EgtGetNextPart(nPartId)
|
||||
End While
|
||||
' aggiorno la preview
|
||||
CreateFiloTopPreView(m_SelList, False)
|
||||
End Sub
|
||||
|
||||
Private Sub Parameter2TxBx_EgtClosed(sender As Object, e As EventArgs) Handles Parameter2TxBx.EgtClosed
|
||||
@@ -95,4 +110,161 @@ Public Class FiloTopUC
|
||||
End While
|
||||
End Sub
|
||||
|
||||
Private Sub Parameter3ChBx_Checked() Handles Parameter3ChBx.Click
|
||||
' Assegno il valore
|
||||
m_bCornerradius = Parameter3ChBx.IsChecked
|
||||
WritePrivateProfileString(S_SIDES, K_ROUNDOFF, If(m_bCornerradius, "1", "0"), m_MainWindow.GetIniFile())
|
||||
' Aggiorno le info del profilo
|
||||
Dim nPartId As Integer = EgtGetFirstPart()
|
||||
While nPartId <> GDB_ID.NULL
|
||||
Dim nLayId As Integer = EgtGetFirstLayer(nPartId)
|
||||
While nLayId <> GDB_ID.NULL
|
||||
Dim sLayName As String = ""
|
||||
If EgtGetName(nLayId, sLayName) AndAlso sLayName = NAME_INLOOP AndAlso EgtExistsInfo(nLayId, INFO_FILOTOP) Then
|
||||
EgtSetInfo(nLayId, INFO_ROUNDOFF, If(m_bCornerradius, 1, 0))
|
||||
End If
|
||||
nLayId = EgtGetNextLayer(nLayId)
|
||||
End While
|
||||
nPartId = EgtGetNextPart(nPartId)
|
||||
End While
|
||||
' aggiorno la preview (False = blocco la lettura dei dati della componente)
|
||||
CreateFiloTopPreView(m_SelList, False)
|
||||
End Sub
|
||||
|
||||
Public Sub CreateFiloTopPreView(SelList As List(Of Integer), Optional bReadInfo As Boolean = True)
|
||||
m_SelList = SelList
|
||||
If m_SelList.Count < 1 Then Return
|
||||
Dim nPartId As Integer = EgtGetFirstPart()
|
||||
While nPartId <> GDB_ID.NULL
|
||||
Dim nLayId As Integer = EgtGetFirstLayer(nPartId)
|
||||
While nLayId <> GDB_ID.NULL
|
||||
Dim sLayName As String = ""
|
||||
' verifico che lemento corrente appartenga all'elenco degli elementi selezionati
|
||||
Dim bIsSelected As Boolean = m_SelList.Find(Function(value As Integer)
|
||||
Return value = nLayId
|
||||
End Function) <> 0
|
||||
If EgtGetName(nLayId, sLayName) AndAlso sLayName = NAME_INLOOP AndAlso EgtExistsInfo(nLayId, INFO_FILOTOP) AndAlso bIsSelected Then
|
||||
' ---------------------- Inizio GESTIONE PREVIEW percorso -------------------------------
|
||||
Dim nLayFiloTop As Integer = GDB_ID.NULL
|
||||
Dim nInLoopRef As Integer = GDB_ID.NULL
|
||||
nLayFiloTop = EgtGetFirstNameInGroup(nPartId, "FiloTop")
|
||||
EgtGetInfo(nLayFiloTop, "InLoopRef", nInLoopRef)
|
||||
' verifico il Layer "FiloTop" sia associato all'InLoop corrente
|
||||
While (nLayFiloTop <> GDB_ID.NULL AndAlso nInLoopRef <> nLayId)
|
||||
nLayFiloTop = EgtGetNextName(nLayFiloTop, "FiloTop")
|
||||
EgtGetInfo(nLayFiloTop, "InLoopRef", nInLoopRef)
|
||||
End While
|
||||
|
||||
' se non esiste il Layer "FiloTop"
|
||||
If nLayFiloTop = GDB_ID.NULL Then
|
||||
' lo creo
|
||||
nLayFiloTop = EgtCreateGroup(nPartId)
|
||||
EgtSetName(nLayFiloTop, "FiloTop")
|
||||
EgtSetInfo(nLayFiloTop, "InLoopRef", nLayId)
|
||||
EgtSetInfo(nLayId, "FiloTopRef", nLayFiloTop)
|
||||
End If
|
||||
|
||||
' carico i dati del filo top selezionato
|
||||
If bReadInfo Then
|
||||
EgtGetInfo(nLayFiloTop, INFO_OFFSET, m_dFiloTopOffset)
|
||||
ParameterTxBx.Text = LenToString(m_dFiloTopOffset, 3)
|
||||
EgtGetInfo(nLayFiloTop, INFO_DEPTH, m_dFiloTopDepth)
|
||||
Parameter2TxBx.Text = LenToString(m_dFiloTopDepth, 3)
|
||||
Dim nVal As Integer = If(m_bCornerradius, 1, 0)
|
||||
EgtGetInfo(nLayFiloTop, INFO_ROUNDOFF, nVal)
|
||||
Parameter3ChBx.IsChecked = If(nVal = 1, True, False)
|
||||
m_bCornerradius = Parameter3ChBx.IsChecked
|
||||
End If
|
||||
|
||||
' procedo alla creazione della curva
|
||||
Dim nIdCompoCurve As Integer = GDB_ID.NULL
|
||||
' cancello un eventuale curva composita creata in precedenza
|
||||
nIdCompoCurve = EgtGetFirstNameInGroup(nLayFiloTop, "OffsetPreView")
|
||||
If nIdCompoCurve <> GDB_ID.NULL Then
|
||||
EgtErase(nIdCompoCurve)
|
||||
End If
|
||||
Dim nCompoCurve As New List(Of Integer)
|
||||
' costruisco il percorso chiuso dati i lati di contorno
|
||||
Dim nLine As Integer = EgtGetFirstInGroup(nLayId)
|
||||
While nLine <> GDB_ID.NULL
|
||||
nCompoCurve.Add(nLine)
|
||||
nLine = EgtGetNext(nLine)
|
||||
End While
|
||||
Dim PtNearStart As Point3d
|
||||
Dim nInfoRoundOff As Integer = If(m_bCornerradius, 1, 0)
|
||||
|
||||
nIdCompoCurve = EgtCreateCurveCompoByChain(nLayFiloTop, nCompoCurve.ToArray, PtNearStart, False)
|
||||
EgtSetName(nIdCompoCurve, "OffsetPreView")
|
||||
|
||||
' salvo i dati nel layer FiloTop
|
||||
EgtSetInfo(nLayFiloTop, INFO_OFFSET, m_dFiloTopOffset)
|
||||
EgtSetInfo(nLayFiloTop, INFO_DEPTH, m_dFiloTopDepth)
|
||||
EgtSetInfo(nLayFiloTop, INFO_ROUNDOFF, nInfoRoundOff)
|
||||
|
||||
Dim bOk As Boolean = False
|
||||
' leggo che tipo di offset applicare (Round, Extend)
|
||||
If nInfoRoundOff <> 1 Then
|
||||
bOk = EgtOffsetCurve(nIdCompoCurve, -m_dFiloTopOffset, OFF_TYPE.EXTEND)
|
||||
Else
|
||||
bOk = EgtOffsetCurve(nIdCompoCurve, -m_dFiloTopOffset, OFF_TYPE.FILLET)
|
||||
End If
|
||||
|
||||
' se la generazione della curva non va a buon fine
|
||||
If Not bOk Then
|
||||
EgtErase(nLayFiloTop)
|
||||
EgtRemoveInfo(nLayId, "FiloTopRef")
|
||||
EgtOutLog("Error in generation OffsetPreView in TopEgde ")
|
||||
End If
|
||||
' ---------------------- Fine GESTIONE PREVIEW percorso -------------------------------
|
||||
End If
|
||||
nLayId = EgtGetNextLayer(nLayId)
|
||||
End While
|
||||
nPartId = EgtGetNextPart(nPartId)
|
||||
End While
|
||||
EgtDraw()
|
||||
End Sub
|
||||
|
||||
' riceve la lista dei LayerFiloTop che devono essere eliminati
|
||||
Public Sub EraseFiloTopPreview(EraseList As List(Of Integer))
|
||||
Dim m_EraseList As List(Of Integer) = EraseList
|
||||
If m_EraseList.Count < 1 Then Return
|
||||
Dim nPartId As Integer = EgtGetFirstPart()
|
||||
While nPartId <> GDB_ID.NULL
|
||||
Dim nLayId As Integer = EgtGetFirstLayer(nPartId)
|
||||
While nLayId <> GDB_ID.NULL
|
||||
Dim sLayName As String = ""
|
||||
Dim bIsSelected As Boolean = m_EraseList.Find(Function(value As Integer)
|
||||
Return value = nLayId
|
||||
End Function) <> 0
|
||||
If EgtGetName(nLayId, sLayName) AndAlso sLayName = NAME_INLOOP AndAlso bIsSelected Then
|
||||
' ---------------------- Inizio GESTIONE PREVIEW percorso -------------------------------
|
||||
Dim nLayFiloTop As Integer = GDB_ID.NULL
|
||||
Dim nInLoopRef As Integer = GDB_ID.NULL
|
||||
nLayFiloTop = EgtGetFirstNameInGroup(nPartId, "FiloTop")
|
||||
EgtGetInfo(nLayFiloTop, "InLoopRef", nInLoopRef)
|
||||
' cerco il Layer associato all'InLoop corrente
|
||||
While (nLayFiloTop <> GDB_ID.NULL AndAlso nInLoopRef <> nLayId)
|
||||
nLayFiloTop = EgtGetNextName(nLayFiloTop, "FiloTop")
|
||||
EgtGetInfo(nLayFiloTop, "InLoopRef", nInLoopRef)
|
||||
End While
|
||||
|
||||
' se non esiste il Layer
|
||||
If nLayFiloTop = GDB_ID.NULL Then
|
||||
' esco
|
||||
Return
|
||||
Else
|
||||
' lo elimino
|
||||
EgtErase(nLayFiloTop)
|
||||
EraseList.Remove(nLayId)
|
||||
End If
|
||||
' ---------------------- Fine GESTIONE PREVIEW percorso -------------------------------
|
||||
End If
|
||||
nLayId = EgtGetNextLayer(nLayId)
|
||||
End While
|
||||
nPartId = EgtGetNextPart(nPartId)
|
||||
End While
|
||||
EgtDraw()
|
||||
End Sub
|
||||
|
||||
|
||||
End Class
|
||||
|
||||
@@ -49,15 +49,28 @@
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="8*"/>
|
||||
<RowDefinition Height="7.25*"/>
|
||||
<RowDefinition Height="0.75*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<TextBlock Name="FilePathTxBl" Foreground="White" Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
<ListBox Name="FileListBox" Grid.Row="1" Grid.RowSpan="2" ItemTemplate="{DynamicResource DataTemplateItem}"
|
||||
ItemsSource="{Binding ItemList}"/>
|
||||
ItemsSource="{Binding ItemList}"/>
|
||||
|
||||
<Border Name="MessageBrd" Grid.Row="4" BorderThickness="0,1,0,0" BorderBrush="Gray">
|
||||
<Grid Grid.Row="3" Margin="0,0,8,0">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="4*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<EgtWPFLib:EgtTextBox Name="FindTxBx" Grid.Column="0"
|
||||
Style="{DynamicResource OmagCut_LeftKeyboardTextBoxNoBorder}"/>
|
||||
<Button Name="ClearFindBtn" Grid.Column="1" Style="{DynamicResource OmagCut_GradientBlueIconButton}" Margin="0,6,2,6">
|
||||
<Image Source="{DynamicResource XImg}" Style="{StaticResource OmagCut_ButtonIcon}" Width="30" />
|
||||
</Button>
|
||||
</Grid>
|
||||
|
||||
<Border Name="MessageBrd" Grid.Row="5" BorderThickness="0,1,0,0" BorderBrush="Gray">
|
||||
<TextBlock Name="MessageTxBx" TextAlignment="Center"
|
||||
Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</Border>
|
||||
|
||||
+111
-12
@@ -297,6 +297,36 @@ Public Class ImportPageUC
|
||||
End Select
|
||||
End Sub
|
||||
|
||||
Private Sub FindTxBx_EgtClosed(sender As Object, e As EventArgs) Handles FindTxBx.EgtClosed
|
||||
' Elimino spazi iniziali e finali
|
||||
FindTxBx.Text = FindTxBx.Text.Trim()
|
||||
' ricarico la lista dei file
|
||||
LoadCurrDir()
|
||||
Dim UpdateListFile As New List(Of IconListBoxItem)
|
||||
' Se esiste un nome
|
||||
If Not String.IsNullOrWhiteSpace(FindTxBx.Text) Then
|
||||
For Each Item As IconListBoxItem In FileListBox.ItemsSource
|
||||
If Item.Name.ToLower.Contains(FindTxBx.Text.ToLower) Then
|
||||
UpdateListFile.Add(Item)
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
If UpdateListFile.Count > 0 Then
|
||||
FileListBox.ItemsSource = UpdateListFile
|
||||
Else
|
||||
FileListBox.ItemsSource = m_MainWindow.m_ImportItemList
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub ClearFindBtn_Click() Handles ClearFindBtn.Click
|
||||
' svuoto la text
|
||||
FindTxBx.Text = ""
|
||||
' ricarico la lista dei file
|
||||
LoadCurrDir()
|
||||
' e aggiorno la lista dei file
|
||||
FileListBox.ItemsSource = m_MainWindow.m_ImportItemList
|
||||
End Sub
|
||||
|
||||
Private Function ClearView() As Boolean
|
||||
' Pulisco il DB geometrico locale
|
||||
EgtNewFile()
|
||||
@@ -576,6 +606,36 @@ Public Class ImportPageUC
|
||||
End If
|
||||
End Sub
|
||||
|
||||
' metodo utilizzato per definire il colore dei pezzi DXF importati
|
||||
Private Sub ColorRegion(nCtx As Integer)
|
||||
|
||||
' Leggo dati corrispondenza colore
|
||||
Dim InsertColor As Color3d = CompoColor(m_MainWindow.GetIniFile())
|
||||
|
||||
' Imposto contesto corrente
|
||||
EgtSetCurrentContext(nCtx)
|
||||
' Ciclo sui pezzi
|
||||
Dim PartId As Integer = EgtGetFirstPart()
|
||||
While PartId <> GDB_ID.NULL
|
||||
' Ciclo sui layer delle regioni
|
||||
Dim RegionId As Integer = EgtGetFirstNameInGroup(PartId, NAME_REGION)
|
||||
While RegionId <> GDB_ID.NULL
|
||||
EgtSetColor(RegionId, InsertColor)
|
||||
' Ciclo sulle regioni
|
||||
Dim EntId As Integer = EgtGetFirstInGroup(RegionId)
|
||||
While EntId <> GDB_ID.NULL
|
||||
If EgtGetType( EntId) = GDB_TY.SRF_FRGN Then EgtSetColor(EntId, InsertColor)
|
||||
EntId = EgtGetNext(EntId)
|
||||
End While
|
||||
RegionId = EgtGetNextName(PartId, NAME_REGION)
|
||||
End While
|
||||
' passo al pezzo successico
|
||||
PartId = EgtGetNextPart(PartId)
|
||||
End While
|
||||
' Aggiorno scritte per angoli sui lati
|
||||
WriteSideAngleForNest(nCtx)
|
||||
End Sub
|
||||
|
||||
Private Sub UseLayerBtn_Click(sender As Object, e As RoutedEventArgs) Handles UseLayerBtn.Click
|
||||
' Creo i pezzi
|
||||
Dim nType As Integer = If(m_nFileType = FT.NGE, FPC_TYPE.NGE, FPC_TYPE.LAYER)
|
||||
@@ -589,6 +649,8 @@ Public Class ImportPageUC
|
||||
If GetPrivateProfileInt(S_COLORTOENGRAVE, K_CTE_ENABLE, 0, m_MainWindow.GetIniFile()) <> 0 Then
|
||||
Engrave.ColorToEngrave(ImportScene.GetCtx())
|
||||
End If
|
||||
' gestico il colore degli elementi da importare (devono avere una regione definita!
|
||||
ColorRegion(ImportScene.GetCtx())
|
||||
' Eseguo zoom
|
||||
ImportScene.ZoomAll()
|
||||
' disabilito bottoni UseLayer e UseRegion, abilito bottoni Reset e Insert
|
||||
@@ -619,6 +681,8 @@ Public Class ImportPageUC
|
||||
If GetPrivateProfileInt(S_COLORTOENGRAVE, K_CTE_ENABLE, 0, m_MainWindow.GetIniFile()) <> 0 Then
|
||||
Engrave.ColorToEngrave(ImportScene.GetCtx())
|
||||
End If
|
||||
' gestico il colore degli elementi da importare (devono avere una regione definita!
|
||||
ColorRegion(ImportScene.GetCtx())
|
||||
' Eseguo zoom
|
||||
ImportScene.ZoomAll()
|
||||
' disabilito bottoni UseLayer e UseRegion, abilito bottoni Reset e Insert
|
||||
@@ -649,6 +713,8 @@ Public Class ImportPageUC
|
||||
If GetPrivateProfileInt(S_COLORTOENGRAVE, K_CTE_ENABLE, 0, m_MainWindow.GetIniFile()) <> 0 Then
|
||||
Engrave.ColorToEngrave(ImportScene.GetCtx())
|
||||
End If
|
||||
' gestico il colore degli elementi da importare (devono avere una regione definita!
|
||||
ColorRegion(ImportScene.GetCtx())
|
||||
' Eseguo zoom
|
||||
ImportScene.ZoomAll()
|
||||
' disabilito bottoni UseLayer e UseRegion, abilito bottoni Reset e Insert
|
||||
@@ -772,6 +838,10 @@ Public Class ImportPageUC
|
||||
EgtErase(EgtGetFirstNameInGroup(PartId, SELECT_REGION_LAYER))
|
||||
PartId = EgtGetNextPart(PartId)
|
||||
End While
|
||||
|
||||
' identificativo univoico del gruppo di pezzi, se più di un "Repeat"
|
||||
Dim sGUICode As New List(Of String)
|
||||
|
||||
' Scrivo testi per nesting
|
||||
SideAngle.WriteSideAngleForNest(ImportScene.GetCtx())
|
||||
' Imposto riferimento sul centro geometrico di ogni pezzo
|
||||
@@ -781,26 +851,54 @@ Public Class ImportPageUC
|
||||
' Salvo tutti i pezzi in un file temporaneo
|
||||
Dim sTmpFile As String = m_MainWindow.GetTempDir() & "\FlatPart" & ".Nge"
|
||||
If Not EgtSaveFile(sTmpFile, NGE.BIN) Then Return
|
||||
|
||||
' Determino numero ripetizioni
|
||||
Dim nRepeat = 1
|
||||
StringToInt(PartNumTxBx.Text, nRepeat)
|
||||
nRepeat = Math.Min(Math.Max(1, nRepeat), 50)
|
||||
' creo il riferimento
|
||||
If nRepeat > 1 Then
|
||||
' per ogni pezze del file DXF creo un gruppo
|
||||
Dim nIdTemp As Integer = EgtGetFirstPart()
|
||||
While nIdTemp <> GDB_ID.NULL
|
||||
Dim sPreGuid As String = CreatePreGuidCode(nIdTemp)
|
||||
sGUICode.Add(sPreGuid & System.Guid.NewGuid.ToString)
|
||||
nIdTemp = EgtGetNextPart(nIdTemp)
|
||||
End While
|
||||
End If
|
||||
|
||||
' Passo al contesto principale
|
||||
EgtSetCurrentContext(m_MainWindow.m_CurrentProjectPageUC.CurrentProjectScene.GetCtx())
|
||||
' Recupero flag per inserimento diretto in grezzo (altrimenti in parcheggio)
|
||||
Dim bDirect As Boolean = (GetPrivateProfileInt(S_NEST, K_DIRECT, 0, m_MainWindow.GetIniFile()) <> 0)
|
||||
' Elimino eventuali precedenti pezzi vuoti
|
||||
EgtEraseEmptyParts()
|
||||
' Determino numero ripetizioni
|
||||
Dim nRepeat = 1
|
||||
StringToInt(PartNumTxBx.Text, nRepeat)
|
||||
nRepeat = Math.Min(Math.Max(1, nRepeat), 50)
|
||||
|
||||
' Inserisco i pezzi nell'ambiente principale e recupero Id primo pezzo inserito
|
||||
Dim nFirstId As Integer = EgtGetLastPart()
|
||||
For nInd As Integer = 1 To nRepeat
|
||||
Dim nFirst2Id As Integer = EgtGetLastPart()
|
||||
EgtInsertFile(sTmpFile)
|
||||
|
||||
Dim FirstOfImport As Integer = EgtGetNextPart(nFirst2Id)
|
||||
If FirstOfImport = GDB_ID.NULL Then FirstOfImport = EgtGetFirstPart()
|
||||
Dim Index As Integer = 1
|
||||
While FirstOfImport <> GDB_ID.NULL And Index <= sGUICode.Count
|
||||
If Not String.IsNullOrEmpty(sGUICode(Index - 1)) Then
|
||||
EgtSetInfo(FirstOfImport, INFO_REFGROUP, sGUICode(Index - 1))
|
||||
Index += 1
|
||||
Else
|
||||
Exit While
|
||||
End If
|
||||
FirstOfImport = EgtGetNextPart(FirstOfImport)
|
||||
End While
|
||||
|
||||
nFirst2Id = If(nFirst2Id <> GDB_ID.NULL, EgtGetNextPart(nFirst2Id), EgtGetFirstPart())
|
||||
' Eventuale inserimento pezzi in VeinMatching
|
||||
VeinMatching.AddParts(sTmpFile, nFirst2Id)
|
||||
Next
|
||||
nFirstId = If(nFirstId <> GDB_ID.NULL, EgtGetNextPart(nFirstId), EgtGetFirstPart())
|
||||
|
||||
' Cancello il file
|
||||
If My.Computer.FileSystem.FileExists(sTmpFile) Then
|
||||
My.Computer.FileSystem.DeleteFile(sTmpFile)
|
||||
@@ -809,7 +907,7 @@ Public Class ImportPageUC
|
||||
Dim dNewArea As Double = 0
|
||||
Dim nId As Integer = nFirstId
|
||||
While nId <> GDB_ID.NULL
|
||||
dNewArea += GeomCalc.GetPartArea( nId)
|
||||
dNewArea += GeomCalc.GetPartArea(nId)
|
||||
' Passo al pezzo successivo
|
||||
nId = EgtGetNextPart(nId)
|
||||
End While
|
||||
@@ -820,6 +918,7 @@ Public Class ImportPageUC
|
||||
' Passo al pezzo successivo
|
||||
nId = EgtGetNextPart(nId)
|
||||
End While
|
||||
|
||||
' Ciclo sui pezzi inseriti
|
||||
nId = nFirstId
|
||||
While nId <> GDB_ID.NULL
|
||||
@@ -832,26 +931,26 @@ Public Class ImportPageUC
|
||||
If m_nFileType = FT.DXF Or m_nFileType = FT.NGE Then
|
||||
' Eventuale testo per indicare il sopra
|
||||
If TopBtn.IsChecked() Then
|
||||
Utility.AddTopToPartRegion( nRegId)
|
||||
Utility.AddTopToPartRegion(nRegId)
|
||||
End If
|
||||
' Se richiesti, inserisco dati Ordine, Distinta, Nome, Origine
|
||||
If m_bEnableOrderList Then
|
||||
' Cerco il nome del pezzo
|
||||
Dim sName As String = ""
|
||||
EgtGetName( nId, sName)
|
||||
EgtGetName(nId, sName)
|
||||
' Recupero il box del pezzo
|
||||
Dim b3Reg As New BBox3d : EgtGetBBox( nRegId, GDB_BB.IGNORE_TEXT + GDB_BB.IGNORE_DIM, b3Reg)
|
||||
Dim b3Reg As New BBox3d : EgtGetBBox(nRegId, GDB_BB.IGNORE_TEXT + GDB_BB.IGNORE_DIM, b3Reg)
|
||||
' Aggiungo info equivalenti a CSV
|
||||
EgtSetInfo(nId, INFO_CSV_PART, sName)
|
||||
EgtSetInfo(nId, INFO_CSV_ORD, m_sOrder)
|
||||
EgtSetInfo(nId, INFO_CSV_DIST, m_sList)
|
||||
EgtSetInfo(nId, INFO_CSV_MAT, m_MainWindow.m_CurrentMachine.CurrMat.sName)
|
||||
EgtSetInfo(nId, INFO_CSV_V1, DoubleToString( b3Reg.DimX(), 1))
|
||||
EgtSetInfo(nId, INFO_CSV_V2, DoubleToString( b3Reg.DimY(), 1))
|
||||
EgtSetInfo(nId, INFO_CSV_V1, DoubleToString(b3Reg.DimX(), 1))
|
||||
EgtSetInfo(nId, INFO_CSV_V2, DoubleToString(b3Reg.DimY(), 1))
|
||||
End If
|
||||
End If
|
||||
' Imposto colore testi
|
||||
Utility.SetTextColor( nRegId)
|
||||
Utility.SetTextColor(nRegId)
|
||||
' Imposto path di provenienza
|
||||
EgtSetInfo(nId, INFO_SOU_PATH, IO.Path.Combine(m_sCurrDir, m_sCurrFile))
|
||||
' Inserisco in parcheggio
|
||||
@@ -871,7 +970,7 @@ Public Class ImportPageUC
|
||||
' Eventuale aggiornamento VeinMatching
|
||||
VeinMatching.ZoomAll()
|
||||
' Aggiorno Aree totale e da lavorare dei pezzi
|
||||
m_MainWindow.m_CurrentProjectPageUC.UpdateTotalArea( dNewArea)
|
||||
m_MainWindow.m_CurrentProjectPageUC.UpdateTotalArea(dNewArea)
|
||||
m_MainWindow.m_CurrentProjectPageUC.UpdateToProduceArea()
|
||||
m_MainWindow.m_CurrentProjectPageUC.ShowAreas()
|
||||
' Aggiorno ambiente principale
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
Imports EgtUILib
|
||||
Imports System.IO
|
||||
Imports EgtUILib
|
||||
|
||||
Public Class InternalComponentPageUC
|
||||
|
||||
@@ -24,7 +25,7 @@ Public Class InternalComponentPageUC
|
||||
ImageCompo9.Visibility = Windows.Visibility.Hidden
|
||||
LabelCompo9.Visibility = Windows.Visibility.Visible
|
||||
' Se i componenti interni sono più di 8 viene visualizzato il bottone "Altri" altrimenti no
|
||||
Dim nCount As Integer = GetPrivateProfileInt("InternalCompo", "Count", 0, m_MainWindow.GetIniFile())
|
||||
Dim nCount As Integer = GetPrivateProfileInt(S_INTCOMPO, K_INT_COUNT, 0, m_MainWindow.GetIniFile())
|
||||
If nCount > 8 Then
|
||||
Compo9.Visibility = Windows.Visibility.Visible
|
||||
Else
|
||||
@@ -163,10 +164,10 @@ Public Class InternalComponentPageUC
|
||||
|
||||
Private Sub Compo_Click(sender As Object, e As RoutedEventArgs) Handles Compo1.Click, Compo2.Click, Compo3.Click, Compo4.Click, Compo5.Click, Compo6.Click, Compo7.Click, Compo8.Click
|
||||
CurrentBtn = e.Source
|
||||
Dim CompoName As String = "InternalCompo" & GetIndexFromButton(CurrentBtn).ToString
|
||||
Dim CompoName As String = S_INTCOMPO & GetIndexFromButton(CurrentBtn).ToString
|
||||
m_sCurrCompoFam = CompoName
|
||||
' m_SecondaryComponentPage.m_sCurrCompo = String.Empty
|
||||
Dim nCount As Integer = GetPrivateProfileInt(CompoName, "Count", 0, m_MainWindow.GetIniFile())
|
||||
Dim nCount As Integer = GetPrivateProfileInt(CompoName, K_CMP_COUNT, 0, m_MainWindow.GetIniFile())
|
||||
If nCount > 1 Then
|
||||
m_MainWindow.m_DrawPageUC.LeftButtonGrd.Children.Remove(Me)
|
||||
m_MainWindow.m_DrawPageUC.m_ActiveComponentPage = DrawPageUC.Pages.SecondaryComponent
|
||||
@@ -252,7 +253,7 @@ Public Class InternalComponentPageUC
|
||||
Private Sub LoadPage()
|
||||
Dim nDeltaSecondPage As Integer = 8
|
||||
' Leggo numero di componenti presenti
|
||||
Dim nCompoNumber As Integer = GetPrivateProfileInt("InternalCompo", "Count", 0, m_MainWindow.GetIniFile())
|
||||
Dim nCompoNumber As Integer = GetPrivateProfileInt(S_INTCOMPO, K_INT_COUNT, 0, m_MainWindow.GetIniFile())
|
||||
' Calcolo indici a seconda della pagina in cui sono
|
||||
If m_bIsFirstPage Then
|
||||
ClearButton(nCompoNumber)
|
||||
@@ -286,12 +287,22 @@ Public Class InternalComponentPageUC
|
||||
If sCompoImage.Length <> 0 Then
|
||||
Try
|
||||
Dim sPath As String = m_MainWindow.GetResourcesDir() & "\" & sCompoImage
|
||||
sCompoImageSource = ImageConverter.ConvertFromString(sPath)
|
||||
GetImage(index).Height = 65
|
||||
GetImage(index).Width = 65
|
||||
GetImage(index).Source = sCompoImageSource
|
||||
GetLabel(index).SetValue(Grid.ColumnProperty, 1)
|
||||
GetLabel(index).SetValue(Grid.ColumnSpanProperty, 1)
|
||||
If File.Exists(sPath) Then
|
||||
sCompoImageSource = ImageConverter.ConvertFromString(sPath)
|
||||
GetImage(index).Height = 65
|
||||
GetImage(index).Width = 65
|
||||
GetImage(index).Source = sCompoImageSource
|
||||
GetLabel(index).SetValue(Grid.ColumnProperty, 1)
|
||||
GetLabel(index).SetValue(Grid.ColumnSpanProperty, 1)
|
||||
Else
|
||||
sCompoImage = String.Empty
|
||||
GetImage(index).Height = 0
|
||||
GetImage(index).Width = 0
|
||||
CustomThickness.Right = 0
|
||||
GetImage(index).Margin = CustomThickness
|
||||
GetLabel(index).SetValue(Grid.ColumnProperty, 0)
|
||||
GetLabel(index).SetValue(Grid.ColumnSpanProperty, 2)
|
||||
End If
|
||||
Catch ex As Exception
|
||||
EgtOutLog("Error loading image " & sCompoImage)
|
||||
sCompoImage = String.Empty
|
||||
|
||||
@@ -167,10 +167,10 @@ Public Class MainComponentPageUC
|
||||
|
||||
Private Sub Compo_Click(sender As Object, e As RoutedEventArgs) Handles Compo1.Click, Compo2.Click, Compo3.Click, Compo4.Click, Compo5.Click, Compo6.Click, Compo7.Click, Compo8.Click
|
||||
CurrentBtn = DirectCast(e.Source, Button)
|
||||
Dim CompoName As String = "Compo" & GetIndexFromButton(CurrentBtn).ToString
|
||||
Dim CompoName As String = S_COMPO & GetIndexFromButton(CurrentBtn).ToString
|
||||
m_sCurrCompoFam = CompoName
|
||||
m_SecondaryComponentPage.m_sCurrCompo = String.Empty
|
||||
Dim nCount As Integer = GetPrivateProfileInt(CompoName, "Count", 0, m_MainWindow.GetIniFile())
|
||||
Dim nCount As Integer = GetPrivateProfileInt(CompoName, K_CMP_COUNT, 0, m_MainWindow.GetIniFile())
|
||||
If nCount > 1 Then
|
||||
m_MainWindow.m_DrawPageUC.LeftButtonGrd.Children.Remove(Me)
|
||||
m_MainWindow.m_DrawPageUC.m_ActiveComponentPage = DrawPageUC.Pages.SecondaryComponent
|
||||
@@ -253,7 +253,7 @@ Public Class MainComponentPageUC
|
||||
Private Sub LoadPage()
|
||||
Dim nDeltaSecondPage As Integer = 8
|
||||
' Leggo numero di componenti presenti
|
||||
Dim nCompoNumber As Integer = GetPrivateProfileInt("Compo", "Count", 0, m_MainWindow.GetIniFile())
|
||||
Dim nCompoNumber As Integer = GetPrivateProfileInt(S_COMPO, K_CMP_COUNT, 0, m_MainWindow.GetIniFile())
|
||||
' Calcolo indici a seconda della pagina in cui sono
|
||||
If m_bIsFirstPage Then
|
||||
ClearButton(nCompoNumber)
|
||||
|
||||
@@ -26,17 +26,17 @@ Public Class SecondaryComponentPageUC
|
||||
Dim ImageConverter As New ImageSourceConverter
|
||||
Dim ThicknessConverter As New ThicknessConverter
|
||||
|
||||
m_sMainCompoName = m_MainComponentPage.m_sCurrCompoFam '"Compo" & m_MainComponentPage.GetIndexFromButton(CurrentMainBtn)
|
||||
m_sMainCompoName = m_MainComponentPage.m_sCurrCompoFam
|
||||
|
||||
'Assegnazione immagine e testo ai Button
|
||||
Dim nCount As Integer = GetPrivateProfileInt(m_sMainCompoName, "Count", 0, m_MainWindow.GetIniFile())
|
||||
Dim nCount As Integer = GetPrivateProfileInt(m_sMainCompoName, K_CMP_COUNT, 0, m_MainWindow.GetIniFile())
|
||||
ClearButton(nCount)
|
||||
For index As Integer = 1 To nCount
|
||||
Dim CustomThickness As Thickness = ThicknessConverter.ConvertFromString("0")
|
||||
Dim nCompoName As Integer = GetPrivateProfileInt(m_sMainCompoName, "Compo" & index, 0, m_MainWindow.GetIniFile())
|
||||
Dim nCompoName As Integer = GetPrivateProfileInt(m_sMainCompoName, S_EXTCOMPO & index, 0, m_MainWindow.GetIniFile())
|
||||
Dim sCompo As String = ""
|
||||
Dim sCompoImage As String = ""
|
||||
m_MainComponentPage.GetPrivateProfileCompo(m_sMainCompoName, "Compo" & index, nCompoName, sCompo, sCompoImage, m_MainWindow.GetIniFile())
|
||||
m_MainComponentPage.GetPrivateProfileCompo(m_sMainCompoName, S_EXTCOMPO & index, nCompoName, sCompo, sCompoImage, m_MainWindow.GetIniFile())
|
||||
Dim sCompoImageSource As ImageSource
|
||||
|
||||
'verifico presenza immagine e la aggiungo
|
||||
|
||||
+14
-14
@@ -159,7 +159,7 @@ Module SideAngle
|
||||
Return True
|
||||
End Function
|
||||
|
||||
Private Function WriteSideAngleOnLoop(LoopId As Integer, TextLayId As Integer) As Boolean
|
||||
Friend Function WriteSideAngleOnLoop(LoopId As Integer, TextLayId As Integer) As Boolean
|
||||
' Verifiche
|
||||
If LoopId = GDB_ID.NULL Or TextLayId = GDB_ID.NULL Then Return False
|
||||
' Calcolo dimensione ingombro Loop
|
||||
@@ -201,7 +201,7 @@ Module SideAngle
|
||||
Friend Sub ColorToSideAngle(nCtx As Integer)
|
||||
' Leggo dati corrispondenza colore-angolo
|
||||
Dim CurrCSA As New ColorSideAngs
|
||||
CurrCSA.Read( m_MainWindow.GetIniFile)
|
||||
CurrCSA.Read(m_MainWindow.GetIniFile)
|
||||
' Imposto contesto corrente
|
||||
EgtSetCurrentContext(nCtx)
|
||||
' Ciclo sui pezzi
|
||||
@@ -212,27 +212,27 @@ Module SideAngle
|
||||
Dim LoopId As Integer = EgtGetFirstNameInGroup(PartId, NAME_OUTLOOP)
|
||||
While LoopId <> GDB_ID.NULL
|
||||
' Ciclo sulle curve
|
||||
Dim PrevId As Integer = EgtGetLastInGroup( LoopId)
|
||||
Dim EntId As Integer = EgtGetFirstInGroup( LoopId)
|
||||
Dim PrevId As Integer = EgtGetLastInGroup(LoopId)
|
||||
Dim EntId As Integer = EgtGetFirstInGroup(LoopId)
|
||||
While EntId <> GDB_ID.NULL
|
||||
Dim NextId As Integer = EgtGetNext( EntId)
|
||||
If NextId = GDB_ID.NULL Then NextId = EgtGetFirstInGroup( LoopId)
|
||||
If VerifySideAnglePossible( PrevId, EntId, NextId, bOutLoop) Then
|
||||
Dim NextId As Integer = EgtGetNext(EntId)
|
||||
If NextId = GDB_ID.NULL Then NextId = EgtGetFirstInGroup(LoopId)
|
||||
If VerifySideAnglePossible(PrevId, EntId, NextId, bOutLoop) Then
|
||||
Dim colEnt As Color3d
|
||||
If EgtGetColor( EntId, colEnt) Then
|
||||
If EgtGetColor(EntId, colEnt) Then
|
||||
Dim dAng As Double
|
||||
Dim dHeel As Double
|
||||
If CurrCSA.GetSideAngHeel( colEnt, dAng, dHeel) Then
|
||||
EgtSetInfo( EntId, INFO_SIDE_ANGLE, dAng)
|
||||
EgtSetInfo( EntId, INFO_ORIG_SIDE_ANGLE, dAng)
|
||||
EgtSetInfo( EntId, INFO_HEEL, dHeel)
|
||||
If CurrCSA.GetSideAngHeel(colEnt, dAng, dHeel) Then
|
||||
EgtSetInfo(EntId, INFO_SIDE_ANGLE, dAng)
|
||||
EgtSetInfo(EntId, INFO_ORIG_SIDE_ANGLE, dAng)
|
||||
EgtSetInfo(EntId, INFO_HEEL, dHeel)
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
PrevId = EntId
|
||||
EntId = EgtGetNext( EntId)
|
||||
EntId = EgtGetNext(EntId)
|
||||
End While
|
||||
If bOutLoop then
|
||||
If bOutLoop Then
|
||||
bOutLoop = False
|
||||
LoopId = EgtGetFirstNameInGroup(PartId, NAME_INLOOP)
|
||||
Else
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="597.1" d:DesignWidth="255.9">
|
||||
d:DesignHeight="636.9" d:DesignWidth="255.9">
|
||||
|
||||
<!-- Definizione della Grid Laterale -->
|
||||
<Grid Name="VariablesCompoGrid" Grid.RowSpan="2">
|
||||
@@ -28,7 +28,7 @@
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="0.2*"/>
|
||||
<RowDefinition Height="4*"/>
|
||||
<RowDefinition Height="5*"/>
|
||||
<!--<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>-->
|
||||
@@ -135,7 +135,7 @@
|
||||
Margin="0,0,0,-2"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
|
||||
<Grid Grid.Column="0" Grid.Row="12" Grid.ColumnSpan="4">
|
||||
<Grid Grid.Column="0" Grid.Row="12" Grid.ColumnSpan="4" >
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1.5*"/>
|
||||
<ColumnDefinition Width="0.3*"/>
|
||||
@@ -143,10 +143,11 @@
|
||||
<ColumnDefinition Width="0.6*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="0.9*"/>
|
||||
<RowDefinition Height="0.9*"/>
|
||||
<RowDefinition Height="0.9*"/>
|
||||
<RowDefinition Height="0.9*"/>
|
||||
<RowDefinition Height="0.9*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<TextBlock Name="Parameter1TxBl" Grid.Row="0" Grid.ColumnSpan="2"
|
||||
@@ -196,6 +197,16 @@
|
||||
Margin="0,0,0,-2"
|
||||
Width="85" Height="30"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
<TextBlock Name="Parameter5TxBl" Grid.Row="4" Grid.ColumnSpan="2"
|
||||
Text="Angolo"
|
||||
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
|
||||
FontSize="{DynamicResource FontSize_LowerCaseCharacter}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="Parameter5TxBx"
|
||||
Grid.Column="2" Grid.ColumnSpan="2" Grid.Row="4"
|
||||
Margin="0,0,0,-2"
|
||||
Width="85" Height="30"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
|
||||
</Grid>
|
||||
|
||||
<!--<TextBlock Name="Parameter1TxBl" Grid.Row="11" Text="Offset"
|
||||
|
||||
+148
-16
@@ -34,7 +34,9 @@ Public Class SideAngleUC
|
||||
Friend m_dDripOffset2 As Double = 0
|
||||
Friend m_nEngrNbr2 As Integer = 1
|
||||
Friend m_dDripDepth As Double = 10
|
||||
Friend m_dEngraveDepth2 As Double = 15
|
||||
Friend m_dDripShort As Double = 0
|
||||
Friend m_dEngraveAngle As Double = 0
|
||||
|
||||
Private CurrEntityDrip As DripEntity
|
||||
|
||||
@@ -75,10 +77,12 @@ Public Class SideAngleUC
|
||||
|
||||
' Inizializzo lati per angoli e per gocciolatoi (ne compilo la lista e aggiungo la scritta nel disegno)
|
||||
InitSides()
|
||||
' Aggiorno testi nel disegno e creo i gocciolatoi
|
||||
RefreshSideAngleText()
|
||||
'' Aggiorno testi nel disegno e creo i gocciolatoi
|
||||
'RefreshSideAngleText()
|
||||
' Aggiorno check e valori
|
||||
RefreshCheckAndValue()
|
||||
' Aggiorno testi nel disegno e creo i gocciolatoi
|
||||
RefreshSideAngleText()
|
||||
|
||||
' Gestisco visualizzazione di tutti i parametri
|
||||
If m_Mode = ModeOpt.SIDEANGLE Then
|
||||
@@ -103,6 +107,9 @@ Public Class SideAngleUC
|
||||
' Accorciamento
|
||||
Parameter4TxBl.Visibility = Windows.Visibility.Hidden
|
||||
Parameter4TxBx.Visibility = Windows.Visibility.Hidden
|
||||
' Angolo
|
||||
Parameter5TxBl.Visibility = Windows.Visibility.Hidden
|
||||
Parameter5TxBx.Visibility = Windows.Visibility.Hidden
|
||||
Else
|
||||
' se aggiungo gli ENGRAVE e i DRIP
|
||||
|
||||
@@ -114,10 +121,12 @@ Public Class SideAngleUC
|
||||
GetAngleTxBxFromIndex(Index).Visibility = Windows.Visibility.Visible
|
||||
GetHeelTxBxFromIndex(Index).Visibility = Windows.Visibility.Visible
|
||||
Next
|
||||
|
||||
' Offset
|
||||
Parameter1TxBl.Visibility = Windows.Visibility.Visible
|
||||
Parameter1TxBx.Visibility = Windows.Visibility.Visible
|
||||
Parameter2TxBl.Visibility = Windows.Visibility.Visible
|
||||
|
||||
' Offset2
|
||||
If m_Mode <> ModeOpt.ENGRAVE Then
|
||||
Parameter2TxBx.Visibility = Windows.Visibility.Visible
|
||||
@@ -128,12 +137,33 @@ Public Class SideAngleUC
|
||||
Parameter2aTxBx.Visibility = Windows.Visibility.Visible
|
||||
Parameter2bTxBx.Visibility = Windows.Visibility.Visible
|
||||
End If
|
||||
|
||||
' Affondamento
|
||||
Parameter3TxBl.Visibility = Windows.Visibility.Visible
|
||||
Parameter3TxBx.Visibility = Windows.Visibility.Visible
|
||||
|
||||
' Accorciamento
|
||||
Parameter4TxBl.Visibility = Windows.Visibility.Hidden
|
||||
Parameter4TxBx.Visibility = Windows.Visibility.Hidden
|
||||
If m_Mode = ModeOpt.ENGRAVE Then
|
||||
' modifico il nome del messaggio
|
||||
Parameter4TxBl.Text = EgtMsg(MSG_IMPORTPAGEUC + 11) & "2" ' Affondamento2
|
||||
Parameter4TxBl.Visibility = Windows.Visibility.Visible
|
||||
Parameter4TxBx.Visibility = Windows.Visibility.Visible
|
||||
Else
|
||||
Parameter4TxBl.Visibility = Windows.Visibility.Hidden
|
||||
Parameter4TxBx.Visibility = Windows.Visibility.Hidden
|
||||
End If
|
||||
|
||||
' Angolo
|
||||
If m_Mode = ModeOpt.ENGRAVE Then
|
||||
' modifico il nome del messaggio
|
||||
Parameter5TxBl.Text = EgtMsg(MSG_IMPORTPAGEUC + 9) ' Angolo
|
||||
Parameter5TxBl.Visibility = Windows.Visibility.Visible
|
||||
Parameter5TxBx.Visibility = Windows.Visibility.Visible
|
||||
Else
|
||||
Parameter5TxBl.Visibility = Windows.Visibility.Hidden
|
||||
Parameter5TxBx.Visibility = Windows.Visibility.Hidden
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
' Gestisco Checkbox e nomi in base al numero di lati inclinabili
|
||||
@@ -154,12 +184,14 @@ Public Class SideAngleUC
|
||||
m_nEngrNbr2 = GetPrivateProfileInt( S_SIDES, K_ENGRAVENUMBER2, 1, m_MainWindow.GetIniFile())
|
||||
m_dDripOffset2 = GetPrivateProfileDouble( S_SIDES, K_ENGRAVEOFFSET2, 0, m_MainWindow.GetIniFile())
|
||||
m_dDripDepth = GetPrivateProfileDouble( S_SIDES, K_ENGRAVEDEPTH, 10, m_MainWindow.GetIniFile())
|
||||
m_dDripShort = GetPrivateProfileDouble( S_SIDES, K_ENGRAVESHORT, 0, m_MainWindow.GetIniFile())
|
||||
Parameter1TxBx.Text = LenToString( m_dDripOffset, 3)
|
||||
m_dEngraveDepth2 = GetPrivateProfileDouble(S_SIDES, K_ENGRAVEDEPTH2, 0, m_MainWindow.GetIniFile())
|
||||
m_dEngraveAngle = GetPrivateProfileDouble(S_SIDES, K_ENGRAVEANGLE, 0, m_MainWindow.GetIniFile())
|
||||
Parameter1TxBx.Text = LenToString(m_dDripOffset, 3)
|
||||
Parameter2aTxBx.Text = m_nEngrNbr2.ToString()
|
||||
Parameter2bTxBx.Text = LenToString( m_dDripOffset2, 3)
|
||||
Parameter3TxBx.Text = LenToString( m_dDripDepth, 3)
|
||||
Parameter4TxBx.Text = LenToString( m_dDripShort, 3)
|
||||
Parameter4TxBx.Text = LenToString(m_dEngraveDepth2, 3)
|
||||
Parameter5TxBx.Text = LenToString(m_dEngraveAngle, 3)
|
||||
End If
|
||||
|
||||
' Aggiorno visualizzazione
|
||||
@@ -179,6 +211,10 @@ Public Class SideAngleUC
|
||||
' Imposto contesto corrente
|
||||
EgtSetCurrentContext(m_MainWindow.m_DrawPageUC.DrawScene.GetCtx())
|
||||
' Ricavo nome primo pezzo e lo sistemo
|
||||
If m_Mode = ModeOpt.ENGRAVE And m_MainWindow.m_DrawPageUC.SelectedLayer = GDB_ID.NULL Then
|
||||
PartId = EgtGetFirstPart()
|
||||
m_MainWindow.m_DrawPageUC.SetCurrLayer(EgtGetFirstNameInGroup(PartId, NAME_OUTLOOP))
|
||||
End If
|
||||
PartId = If(m_MainWindow.m_DrawPageUC.SelectedLayer <> GDB_ID.NULL, EgtGetFirstPart(), GDB_ID.NULL)
|
||||
' Recupero nome layer con geometria di contorno (esterno o interno) del pezzo
|
||||
LoopId = m_MainWindow.m_DrawPageUC.SelectedLayer
|
||||
@@ -275,8 +311,8 @@ Public Class SideAngleUC
|
||||
' Attualmente il vaore m_nCount è inizializzato ad "1"..
|
||||
' Bottoni Prev Next
|
||||
If m_nCount <= MAX_LINES Then
|
||||
PrevBtn.Visibility = Windows.Visibility.Hidden
|
||||
NextBtn.Visibility = Windows.Visibility.Hidden
|
||||
PrevBtn.Visibility= Windows.Visibility.Hidden
|
||||
NextBtn.Visibility= Windows.Visibility.Hidden
|
||||
Else
|
||||
Grid.SetRow(PrevBtn, MAX_LINES - m_nShow)
|
||||
PrevBtn.Visibility = Windows.Visibility.Visible
|
||||
@@ -483,7 +519,9 @@ Public Class SideAngleUC
|
||||
WritePrivateProfileString( S_SIDES, K_ENGRAVENUMBER2, m_nEngrNbr2.ToString(), m_MainWindow.GetIniFile())
|
||||
WritePrivateProfileString(S_SIDES, K_ENGRAVEOFFSET2, LenToString(m_dDripOffset2, 3), m_MainWindow.GetIniFile())
|
||||
WritePrivateProfileString(S_SIDES, K_ENGRAVEDEPTH, LenToString(m_dDripDepth, 3), m_MainWindow.GetIniFile())
|
||||
WritePrivateProfileString(S_SIDES, K_ENGRAVEDEPTH2, LenToString(m_dEngraveDepth2, 3), m_MainWindow.GetIniFile())
|
||||
'WritePrivateProfileString( S_SIDES, K_ENGRAVESHORT, DoubleToString( m_dDripShort, 3), m_MainWindow.GetIniFile())
|
||||
WritePrivateProfileString(S_SIDES, K_ENGRAVEANGLE, LenToString(m_dEngraveAngle, 3), m_MainWindow.GetIniFile())
|
||||
End If
|
||||
|
||||
EgtDraw()
|
||||
@@ -497,11 +535,10 @@ Public Class SideAngleUC
|
||||
If m_CallingPage = MainWindow.Pages.Draw Then
|
||||
' Imposto contesto corrente
|
||||
EgtSetCurrentContext(m_MainWindow.m_DrawPageUC.DrawScene.GetCtx())
|
||||
' Ricavo nome primo pezzo
|
||||
PartId = If(m_MainWindow.m_DrawPageUC.SelectedLayer <> GDB_ID.NULL, EgtGetFirstPart(), GDB_ID.NULL)
|
||||
' Recupero nome layer con geometria di contorno (esterno o interno) del pezzo
|
||||
LoopId = m_MainWindow.m_DrawPageUC.SelectedLayer
|
||||
ElseIf m_CallingPage = MainWindow.Pages.Import Then
|
||||
ElseIf m_CallingPage = MainWindow.Pages.Import Then
|
||||
' Imposto contesto corrente
|
||||
EgtSetCurrentContext(m_MainWindow.m_ImportPageUC.ImportScene.GetCtx())
|
||||
' Recupero nome pezzo
|
||||
@@ -568,8 +605,20 @@ Public Class SideAngleUC
|
||||
' verifico se l'entità ha un gocciolatoio
|
||||
GetChBxFromIndex(nChIndex).IsChecked = Entity.bHaveDrip
|
||||
' aggiorno i valore delle caselle di testo per le entità caricate (Start/End)
|
||||
GetAngleTxBxFromIndex(nChIndex).Text = DoubleToString(Entity.dShortStart, 1)
|
||||
GetHeelTxBxFromIndex(nChIndex).Text = LenToString(Entity.dShortStart, 1)
|
||||
If m_Mode = ModeOpt.ENGRAVE Then
|
||||
Dim dVal As Double = 0
|
||||
If StringToLen(GetPrivateProfileDouble(S_SIDES, K_ENGRAVESHORT & "A" & nIndex.ToString & "_Start", 0, m_MainWindow.GetIniFile()), dVal) Then
|
||||
Entity.dShortStart = dVal
|
||||
End If
|
||||
If StringToLen(GetPrivateProfileDouble(S_SIDES, K_ENGRAVESHORT & "A" & nIndex.ToString & "_End", 0, m_MainWindow.GetIniFile()), dVal) Then
|
||||
Entity.dShortEnd = dVal
|
||||
End If
|
||||
Else
|
||||
'GetAngleTxBxFromIndex(Index).Text = GetPrivateProfileDouble(S_SIDES, K_DRIPSHORT & "A" & nI.ToString & "_Start", 0, m_MainWindow.GetIniFile())
|
||||
'GetHeelTxBxFromIndex(Index).Text = GetPrivateProfileDouble(S_SIDES, K_DRIPSHORT & "A" & nI.ToString & "_End", 0, m_MainWindow.GetIniFile())
|
||||
End If
|
||||
GetAngleTxBxFromIndex(nChIndex).Text = LenToString(Entity.dShortStart, 1)
|
||||
GetHeelTxBxFromIndex(nChIndex).Text = LenToString(Entity.dShortEnd, 1)
|
||||
Next
|
||||
End If
|
||||
End Sub
|
||||
@@ -618,7 +667,7 @@ Public Class SideAngleUC
|
||||
SideAngle.AddTextToLine(sEntityName, TextLayer, CurrLine, 20, dBBoxRad, True)
|
||||
End Sub
|
||||
|
||||
' Funzione che crea le geometrie dei gocciolatoi
|
||||
' Funzione che crea le geometrie dei gocciolatoi (NON UTILIZZATA)
|
||||
Friend Sub CreateDripGeomOLD(nPartId As Integer)
|
||||
' Recupero Id layer di contorno esterno
|
||||
Dim nOutLoopId = EgtGetFirstNameInGroup(nPartId, NAME_OUTLOOP)
|
||||
@@ -738,6 +787,10 @@ Public Class SideAngleUC
|
||||
vJoint.Add(False)
|
||||
End If
|
||||
Next
|
||||
|
||||
' se non riesco a generare un elenco allora esco
|
||||
If vJoint.Count < 1 Then Return
|
||||
|
||||
If vJoint(0) And vJoint(vJoint.Count - 1) Then
|
||||
bJointStart = True
|
||||
End If
|
||||
@@ -809,6 +862,9 @@ Public Class SideAngleUC
|
||||
Dim nCrvId = EgtGetFirstInGroup(DripLayer)
|
||||
While nCrvId <> GDB_ID.NULL
|
||||
EgtOffsetCurve(nCrvId, -m_dDripOffset, OFF_TYPE.EXTEND)
|
||||
If m_Mode = ModeOpt.ENGRAVE Then
|
||||
EgtSetInfo(nCrvId, INFO_DEPTH, m_dDripDepth)
|
||||
End If
|
||||
nCrvId = EgtGetNext(nCrvId)
|
||||
End While
|
||||
' Eventuali curve aggiuntive con offset2
|
||||
@@ -819,10 +875,16 @@ Public Class SideAngleUC
|
||||
For i As Integer = 1 To m_nEngrNbr2
|
||||
Dim nNewId As Integer = EgtCopy(nCrvId, nCrvId, GDB_POS.AFTER)
|
||||
EgtOffsetCurve(nNewId, -i * m_dDripOffset2, OFF_TYPE.EXTEND)
|
||||
If m_Mode = ModeOpt.ENGRAVE Then
|
||||
EgtSetInfo(nNewId, INFO_DEPTH, m_dEngraveDepth2)
|
||||
End If
|
||||
Next
|
||||
nCrvId = nNextCrvId
|
||||
End While
|
||||
End If
|
||||
|
||||
Dim ListEngraveSideAng As New List(Of Integer)
|
||||
|
||||
If m_Mode = ModeOpt.DRIP Then
|
||||
' Esplodo nelle curve componenti
|
||||
nCrvId = EgtGetFirstInGroup(DripLayer)
|
||||
@@ -842,14 +904,70 @@ Public Class SideAngleUC
|
||||
End While
|
||||
Else
|
||||
' Assegno colore e attributi
|
||||
Dim nInd As Integer = 0
|
||||
nCrvId = EgtGetFirstInGroup(DripLayer)
|
||||
While nCrvId <> GDB_ID.NULL
|
||||
EgtSetColor(nCrvId, COL_MCH_DRIPCUT())
|
||||
EgtSetInfo(nCrvId, INFO_DEPTH, m_dDripDepth)
|
||||
'EgtSetInfo(nCrvId, INFO_DEPTH, m_dDripDepth)
|
||||
EgtSetInfo(nCrvId, INFO_STRICT, If(m_dDripShort > EPS_SMALL, "3", "0"))
|
||||
If nInd = 0 Then
|
||||
' solo se m_dEngraveAngle > 0
|
||||
If Math.Abs(m_dEngraveAngle) > EPS_ANG_SMALL Then
|
||||
' salvo l'Id della curva che deve essere manipolato separatamente
|
||||
ListEngraveSideAng.Add(nCrvId)
|
||||
Else
|
||||
EgtRemoveInfo(nCrvId, INFO_SIDE_ANGLE)
|
||||
EgtModifyCurveThickness(nCrvId, -m_dEngraveDepth2)
|
||||
End If
|
||||
Else
|
||||
If nInd = m_nEngrNbr2 Then
|
||||
nInd = -1
|
||||
End If
|
||||
EgtModifyCurveThickness(nCrvId, -m_dEngraveDepth2)
|
||||
End If
|
||||
nInd = nInd + 1
|
||||
If nInd > m_nEngrNbr2 Then nInd = 0
|
||||
nCrvId = EgtGetNext(nCrvId)
|
||||
End While
|
||||
End If
|
||||
SplitJointedSideEngrave(ListEngraveSideAng)
|
||||
End Sub
|
||||
|
||||
Private Sub SplitJointedSideEngrave(ListEngraveSideAngId As List(Of Integer))
|
||||
For Each nCrvId As Integer In ListEngraveSideAngId
|
||||
' eventualmente separo il taglio inclinato
|
||||
Dim dUs, dUe As Double
|
||||
EgtCurveDomain(nCrvId, dUs, dUe)
|
||||
Dim dU As Double = dUs
|
||||
While dU < dUe ' + EPS_ZERO
|
||||
Dim ptCurr As Point3d
|
||||
EgtAtParamPoint(nCrvId, dU + 1, nCrvId, ptCurr)
|
||||
' separa la curva in questo punto
|
||||
Dim nNewCurvId As Integer = GDB_ID.NULL
|
||||
If dUe > 1 Then
|
||||
nNewCurvId = EgtSplitCurveAtPoint(nCrvId, ptCurr, GDB_RT.LOC)
|
||||
Else
|
||||
nNewCurvId = nCrvId
|
||||
End If
|
||||
EgtSetColor(nCrvId, COL_MCH_ONENGRAVE_ANG())
|
||||
EgtSetInfo(nCrvId, INFO_SIDE_ANGLE, m_dEngraveAngle)
|
||||
' recupero il vettore di estrusione della curva e la direzione della curva
|
||||
Dim vtAux As Vector3d
|
||||
EgtStartVector(nCrvId, vtAux)
|
||||
Dim vtExtrusion As Vector3d
|
||||
EgtCurveExtrusion(nCrvId, vtExtrusion)
|
||||
' ruoto il vetottore nella nuova direzione
|
||||
vtExtrusion.Rotate(vtAux, -m_dEngraveAngle)
|
||||
' assegno il vettore di estrusione nella nuova direzione indicata (segno negativo perchè dentro il pezzo)
|
||||
EgtModifyCurveExtrusion(nCrvId, vtExtrusion)
|
||||
Dim ExtendFactor As Double = New Vector3d(0, 0, 1) * vtExtrusion
|
||||
EgtModifyCurveThickness(nCrvId, -m_dDripDepth / ExtendFactor)
|
||||
If dUe = 1 Then Exit While
|
||||
nCrvId = nNewCurvId
|
||||
' aggiorno i valori del dominio della curva che rimane
|
||||
EgtCurveDomain(nCrvId, dUs, dUe)
|
||||
End While
|
||||
Next
|
||||
End Sub
|
||||
|
||||
Private Sub PrevBtn_Click(sender As Object, e As RoutedEventArgs) Handles PrevBtn.Click
|
||||
@@ -1283,11 +1401,25 @@ Public Class SideAngleUC
|
||||
End Sub
|
||||
|
||||
Private Sub Parameter4TxBx_EgtClosed(sender As Object, e As EventArgs) Handles Parameter4TxBx.EgtClosed
|
||||
If m_Mode = ModeOpt.DRIP Or m_Mode = ModeOpt.ENGRAVE Then
|
||||
If m_Mode = ModeOpt.DRIP Then
|
||||
' Recupero il valore
|
||||
StringToLen(Parameter4TxBx.Text, m_dDripShort)
|
||||
' Creo le geometrie dei gocciolatoi
|
||||
RefreshSideAngleText()
|
||||
ElseIf m_Mode = ModeOpt.ENGRAVE Then
|
||||
' Recupero il valore
|
||||
StringToLen(Parameter4TxBx.Text, m_dEngraveDepth2)
|
||||
' Creo le geometrie dei gocciolatoi
|
||||
RefreshSideAngleText()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub Parameter5TxBx_EgtClosed(sender As Object, e As EventArgs) Handles Parameter5TxBx.EgtClosed
|
||||
If m_Mode = ModeOpt.ENGRAVE Then
|
||||
' Recupero il valore
|
||||
StringToLen(Parameter5TxBx.Text, m_dEngraveAngle)
|
||||
' Creo le geometrie dei gocciolatoi
|
||||
RefreshSideAngleText()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
+158
-11
@@ -1,16 +1,48 @@
|
||||
<ResourceDictionary
|
||||
x:Class="EgtDictionary"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:Project="clr-namespace:OmagCUT"
|
||||
xmlns:ControlExtensions="clr-namespace:OmagCUT.ControlExtensions">
|
||||
<ResourceDictionary x:Class="EgtDictionary"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:Project="clr-namespace:OmagCUT"
|
||||
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
|
||||
xmlns:EgtPHOTOLib="clr-namespace:EgtPHOTOLib;assembly=EgtPHOTOLib"
|
||||
xmlns:EgtFloating="clr-namespace:EgtWPFLib5.EgtFloating;assembly=EgtWPFLib5"
|
||||
xmlns:ControlExtensions="clr-namespace:OmagCUT.ControlExtensions">
|
||||
|
||||
<!--Template che permette di andare a capo-->
|
||||
<EgtWPFLib5:StatusBarVM x:Key="StatusBarVM"/>
|
||||
<EgtWPFLib5:ShowPanelVM x:Key="ShowPanelVM"/>
|
||||
<EgtWPFLib5:ViewPanelVM x:Key="ViewPanelVM"/>
|
||||
<EgtWPFLib5:InstrumentPanelVM x:Key="InstrumentPanelVM"/>
|
||||
|
||||
<EgtPHOTOLib:ProjectSlabVM x:Key="ProjectSlabVM"/>
|
||||
<EgtPHOTOLib:OptionPanelSlabVM x:Key="OptionPanelSlabVM"/>
|
||||
<EgtPHOTOLib:ListPageSlabVM x:Key="ListPageSlabVM"/>
|
||||
<EgtPHOTOLib:DetailPageSlabVM x:Key="DetailPageSlabVM"/>
|
||||
<EgtPHOTOLib:SearchPanelSlabVM x:Key="SearchPanelSlabVM"/>
|
||||
<EgtPHOTOLib:MyInstrumentPanelSlabVM x:Key="MyInstrumentPanelSlabVM"/>
|
||||
|
||||
<!--Colori predefiniti-->
|
||||
<SolidColorBrush x:Key="Omag_Blue" Color="#FF095CA8" />
|
||||
<SolidColorBrush x:Key="Omag_Yellow" Color="#FFFFCE5B" />
|
||||
<SolidColorBrush x:Key="Omag_Red" Color="Red" />
|
||||
<SolidColorBrush x:Key="Omag_Green" Color="LawnGreen" />
|
||||
<SolidColorBrush x:Key="Omag_VeryLightGray" Color="#FFF2F2F2" />
|
||||
<SolidColorBrush x:Key="Omag_LightGray" Color="LightGray" />
|
||||
<SolidColorBrush x:Key="Omag_Gray" Color="#FF9E9E9E" />
|
||||
<SolidColorBrush x:Key="Omag_DarkGray" Color="#FF444444" />
|
||||
<SolidColorBrush x:Key="Omag_White" Color="#FFFFFFFF" />
|
||||
<SolidColorBrush x:Key="Omag_Black" Color="#FF000000" />
|
||||
|
||||
<SolidColorBrush x:Key="EgaltechBlue1" Color="#FF095CA8" />
|
||||
<SolidColorBrush x:Key="EgaltechWhite" Color="#FFFFFFFF" />
|
||||
|
||||
<!--Template che permette di andare a capo-->
|
||||
<DataTemplate x:Key="Button_DataTemplate_Wrap">
|
||||
<TextBlock TextWrapping="Wrap" Text="{Binding}"/>
|
||||
</DataTemplate>
|
||||
|
||||
<!--ButtonBase-->
|
||||
<!-- ______________________________________________________________________________________________________________________________________________ -->
|
||||
|
||||
<!-- Button Style -->
|
||||
|
||||
<Style TargetType="{x:Type Button}">
|
||||
<Setter Property="FocusVisualStyle">
|
||||
<Setter.Value>
|
||||
@@ -71,7 +103,44 @@
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<!-- ______________________________________________________________________________________________________________________ -->
|
||||
<!--Template che permette di andare a capo-->
|
||||
<DataTemplate x:Key="WrapButton_DataTemplate">
|
||||
<TextBlock TextWrapping="WrapWithOverflow" Text="{Binding}"/>
|
||||
</DataTemplate>
|
||||
|
||||
<Style x:Key="ToolBar_Button" TargetType="{x:Type Button}" BasedOn="{StaticResource {x:Type Button}}">
|
||||
<Setter Property="Height" Value="30"/>
|
||||
<Setter Property="Width" Value="30"/>
|
||||
</Style>
|
||||
<Style x:Key="ToolBar_TextButton" TargetType="{x:Type Button}" BasedOn="{StaticResource {x:Type Button}}">
|
||||
<Setter Property="Height" Value="30"/>
|
||||
<Setter Property="Width" Value="80"/>
|
||||
</Style>
|
||||
<Style x:Key="OptionPanel_Button" TargetType="{x:Type Button}" BasedOn="{StaticResource {x:Type Button}}">
|
||||
<Setter Property="Height" Value="60"/>
|
||||
<Setter Property="Width" Value="60"/>
|
||||
</Style>
|
||||
<Style x:Key="OptionPanel_TextButton" TargetType="{x:Type Button}" BasedOn="{StaticResource {x:Type Button}}">
|
||||
<Setter Property="Height" Value="30"/>
|
||||
</Style>
|
||||
<Style x:Key="OptionPanel_TextWrapButton" TargetType="{x:Type Button}" BasedOn="{StaticResource {x:Type Button}}">
|
||||
<Setter Property="ContentTemplate" Value="{StaticResource WrapButton_DataTemplate}" />
|
||||
<Setter Property="TextBlock.TextAlignment" Value="Center"/>
|
||||
<Setter Property="Height" Value="45"/>
|
||||
</Style>
|
||||
<Style x:Key="OptionPanel_NestingButton" TargetType="{x:Type Button}" BasedOn="{StaticResource {x:Type Button}}">
|
||||
<Setter Property="Height" Value="60"/>
|
||||
<Setter Property="Width" Value="60"/>
|
||||
</Style>
|
||||
<Style x:Key="CompoWindow_Button" TargetType="{x:Type Button}" BasedOn="{StaticResource {x:Type Button}}">
|
||||
<Setter Property="Height" Value="40"/>
|
||||
</Style>
|
||||
<Style x:Key="EgtWPFLib5_InputButton" TargetType="{x:Type Button}" BasedOn="{StaticResource {x:Type Button}}">
|
||||
<Setter Property="Height" Value="30"/>
|
||||
<Setter Property="Width" Value="60"/>
|
||||
</Style>
|
||||
|
||||
<!-- ______________________________________________________________________________________________________________________ -->
|
||||
|
||||
<!--Template che permette di andare a capo-->
|
||||
<DataTemplate x:Key="CheckBox_DataTemplate_Wrap">
|
||||
@@ -375,7 +444,59 @@
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<!-- ______________________________________________________________________________________________________________________ -->
|
||||
<Style x:Key="ToolBar_ToggleButton" TargetType="{x:Type ToggleButton}" BasedOn="{StaticResource {x:Type ToggleButton}}">
|
||||
<Setter Property="Height" Value="30"/>
|
||||
<Setter Property="Width" Value="30"/>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="ToolBar_TextToggleButton" TargetType="{x:Type ToggleButton}" BasedOn="{StaticResource {x:Type ToggleButton}}">
|
||||
<Setter Property="Height" Value="30"/>
|
||||
<Setter Property="Width" Value="70"/>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="OptionPanel_ToggleButton" TargetType="{x:Type ToggleButton}" BasedOn="{StaticResource {x:Type ToggleButton}}">
|
||||
<Setter Property="Height" Value="30"/>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="OptionPanel_NestingToggleButton" TargetType="{x:Type ToggleButton}" BasedOn="{StaticResource {x:Type ToggleButton}}">
|
||||
<Setter Property="Height" Value="60"/>
|
||||
<Setter Property="Width" Value="60"/>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="CompoWindow_ToggleButton" TargetType="{x:Type ToggleButton}" BasedOn="{StaticResource {x:Type ToggleButton}}">
|
||||
<Setter Property="Height" Value="40"/>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="CompoWindow_WrapToggleButton" TargetType="{x:Type ToggleButton}" BasedOn="{StaticResource {x:Type ToggleButton}}">
|
||||
<Setter Property="ContentTemplate" Value="{StaticResource WrapButton_DataTemplate}" />
|
||||
<Setter Property="TextBlock.TextAlignment" Value="Center" />
|
||||
<Setter Property="Height" Value="40"/>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="Option_ColorButton" TargetType="{x:Type Button}" BasedOn="{StaticResource {x:Type Button}}">
|
||||
<Setter Property="Padding" Value="5"/>
|
||||
<Setter Property="HorizontalContentAlignment" Value="Center"/>
|
||||
<Setter Property="VerticalContentAlignment" Value="Center"/>
|
||||
<Setter Property="TextBlock.TextAlignment" Value="Center"/>
|
||||
<Style.Triggers>
|
||||
<Trigger Property="IsMouseOver" Value="True">
|
||||
<Setter Property="Background" Value="#FFB8C3CD"/>
|
||||
</Trigger>
|
||||
<Trigger Property="IsPressed" Value="True">
|
||||
<Setter Property="OpacityMask" Value="#33FF0000"/>
|
||||
</Trigger>
|
||||
<Trigger Property="ToggleButton.IsChecked" Value="True">
|
||||
<Setter Property="Background" Value="Transparent"/>
|
||||
</Trigger>
|
||||
<Trigger Property="IsEnabled" Value="False">
|
||||
<Setter Property="Background" Value="#FFF4F4F4"/>
|
||||
<Setter Property="BorderBrush" Value="#FFADB2B5"/>
|
||||
<Setter Property="TextElement.Foreground" Value="#FF838383"/>
|
||||
</Trigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
|
||||
<!-- ______________________________________________________________________________________________________________________ -->
|
||||
|
||||
<!--TreeViewBase-->
|
||||
<!--Style e colori della freccia di espansione, necessari per modificare il ContainerItemStyle perchè contiene riferimenti ad essi-->
|
||||
@@ -431,6 +552,32 @@
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<!-- ______________________________________________________________________________________________________________________ -->
|
||||
<!-- ______________________________________________________________________________________________________________________________________________ -->
|
||||
|
||||
<!-- EgtCustomWindow -->
|
||||
|
||||
<Style TargetType="{x:Type EgtWPFLib5:EgtCustomWindow}" BasedOn="{StaticResource {x:Type EgtWPFLib5:EgtCustomWindow}}">
|
||||
<Setter Property="TitleBarHeight" Value="32"/>
|
||||
<Setter Property="TitleBarBrush" Value="{StaticResource Omag_LightGray}"/>
|
||||
<Setter Property="BorderBrush" Value="{StaticResource Omag_Gray}"/>
|
||||
</Style>
|
||||
|
||||
<!-- ______________________________________________________________________________________________________________________________________________ -->
|
||||
|
||||
<!-- EgtFloatingPanel -->
|
||||
|
||||
<Style x:Key="ToolBar_EgtFloatingPanel" TargetType="{x:Type EgtFloating:EgtFloatingPanel}" BasedOn="{StaticResource {x:Type EgtFloating:EgtFloatingPanel}}">
|
||||
<Setter Property="Background" Value="{StaticResource Omag_Gray}"/>
|
||||
<Setter Property="BorderBrush" Value="{StaticResource Omag_Gray}"/>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="Option_EgtFloatingPanel" TargetType="{x:Type EgtFloating:EgtFloatingPanel}" BasedOn="{StaticResource {x:Type EgtFloating:EgtFloatingPanel}}">
|
||||
<Setter Property="IsToolBar" Value="False"/>
|
||||
<Setter Property="TitleBarOrientation" Value="Vertical"/>
|
||||
<Setter Property="Background" Value="{StaticResource Omag_Gray}"/>
|
||||
<Setter Property="BorderBrush" Value="{StaticResource Omag_Gray}"/>
|
||||
</Style>
|
||||
|
||||
<!-- ______________________________________________________________________________________________________________________ -->
|
||||
|
||||
</ResourceDictionary>
|
||||
|
||||
@@ -115,9 +115,13 @@
|
||||
|
||||
<UniformGrid Grid.Column="0" Grid.Row="5" Grid.ColumnSpan="3" Columns="2" >
|
||||
<Button Name="MirrorPartBtn"
|
||||
Style="{DynamicResource OmagCut_YellowTextButton}"/>
|
||||
Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}">
|
||||
<Image Source="{DynamicResource SpecchiaImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="RemovePartBtn"
|
||||
Style="{DynamicResource OmagCut_YellowTextButton}"/>
|
||||
Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}">
|
||||
<Image Source="{DynamicResource Rimuovi_eliminaImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
</UniformGrid>
|
||||
|
||||
<!--<TextBlock Name="SawRoughingTxBl" Grid.Row="4" Grid.ColumnSpan="3"
|
||||
|
||||
@@ -65,8 +65,8 @@ Public Class FrameCutPageUC
|
||||
SelGuideBtn.Content = EgtMsg(MSG_FRAMECUTPAGEUC + 16) 'Guida
|
||||
ArcRadTxBl.Text = EgtMsg(MSG_FRAMECUTPAGEUC + 17) 'Rad
|
||||
ArcAngTxBl.Text = EgtMsg(MSG_FRAMECUTPAGEUC + 18) 'Ang
|
||||
MirrorPartBtn.Content = EgtMsg(MSG_FRAMECUTPAGEUC + 7) 'Mirror cornice
|
||||
RemovePartBtn.Content = EgtMsg(MSG_FRAMECUTPAGEUC + 3) 'Rimuovi cornice
|
||||
MirrorPartBtn.ToolTip = EgtMsg(MSG_FRAMECUTPAGEUC + 7) 'Mirror cornice
|
||||
RemovePartBtn.ToolTip = EgtMsg(MSG_FRAMECUTPAGEUC + 3) 'Rimuovi cornice
|
||||
OffsZTxBl.Text = EgtMsg(MSG_FRAMECUTPAGEUC + 8) 'Distanza sopra
|
||||
OffsXyTxBl.Text = EgtMsg(MSG_FRAMECUTPAGEUC + 9) 'Distanza inizio
|
||||
OffsYyTxBl.Text = EgtMsg(MSG_FRAMECUTPAGEUC + 22) 'Distanza Y
|
||||
|
||||
+347
-324
@@ -10,27 +10,27 @@
|
||||
<!-- Definizione della AlarmsPage -->
|
||||
<Border Style="{DynamicResource OmagCut_PageBorder}" >
|
||||
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="4*"/>
|
||||
<ColumnDefinition Width="4*"/>
|
||||
<ColumnDefinition Width="4*"/>
|
||||
<ColumnDefinition Width="3*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="2*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
|
||||
<RowDefinition Height="1.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="4*"/>
|
||||
<ColumnDefinition Width="4*"/>
|
||||
<ColumnDefinition Width="4*"/>
|
||||
<ColumnDefinition Width="3*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="2*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
|
||||
<!--Costruisco le riche per la colonna 3-->
|
||||
<RowDefinition Height="1.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<!--Costruisco le riche per la colonna 3-->
|
||||
<Grid Grid.Column="2" Grid.RowSpan="9">
|
||||
<Grid.RowDefinitions>
|
||||
<!--GruopBox: taglio lama-->
|
||||
@@ -51,7 +51,7 @@
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="0.375*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
|
||||
<!--Parametri Taglio Lama: 5 Parametri-->
|
||||
<GroupBox Name="SawGpBx" Style="{DynamicResource OmagCut_GroupBox}" Grid.Column="2" Grid.RowSpan="4">
|
||||
<!--definizione della grigli ainterna-->
|
||||
@@ -92,8 +92,8 @@
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||
<CheckBox Name="PreCutExitChBx" Grid.Column="1" Grid.Row="4" Margin="10,0,10,0"
|
||||
Style="{StaticResource OmagCut_CheckBox_Single}"
|
||||
HorizontalAlignment="Right"/>
|
||||
|
||||
HorizontalAlignment="Right"/>
|
||||
|
||||
</Grid>
|
||||
|
||||
</GroupBox>
|
||||
@@ -200,7 +200,7 @@
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}" Margin="10,0,0,10" VerticalAlignment="Bottom" />
|
||||
<CheckBox Name="WjIntCutsChBx" Grid.Row="1" Grid.ColumnSpan="2" Style="{StaticResource OmagCut_CheckBox_Single}"
|
||||
HorizontalAlignment="Right" Margin="0,0,10,0"/>
|
||||
|
||||
|
||||
</Grid>
|
||||
</GroupBox>
|
||||
|
||||
@@ -218,78 +218,78 @@
|
||||
</GroupBox>
|
||||
|
||||
</Grid>
|
||||
|
||||
<Grid Grid.RowSpan="3">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1.75*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<GroupBox Name="SetUpGpBx" Grid.ColumnSpan="3" Grid.RowSpan="9"
|
||||
<Grid Grid.RowSpan="3">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1.75*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<GroupBox Name="SetUpGpBx" Grid.ColumnSpan="3" Grid.RowSpan="9"
|
||||
Style="{DynamicResource OmagCut_GroupBox}">
|
||||
|
||||
<Grid Name="CurrToolsGrid" Grid.ColumnSpan="2">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
<ColumnDefinition Width="3*"/>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid Name="CurrToolsGrid" Grid.ColumnSpan="2">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
<ColumnDefinition Width="3*"/>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<TextBlock Name="CurrSawTxBl" Grid.Column="0" Grid.Row="0" Grid.ColumnSpan="3"
|
||||
<TextBlock Name="CurrSawTxBl" Grid.Column="0" Grid.Row="0" Grid.ColumnSpan="3"
|
||||
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||
<ComboBox x:Name="CurrSawCmBx" Grid.Column="1" Grid.Row="1" Style="{DynamicResource OmagCut_ComboBox}">
|
||||
<ComboBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding}" Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</DataTemplate>
|
||||
</ComboBox.ItemTemplate>
|
||||
</ComboBox>
|
||||
<ComboBox x:Name="CurrSawCmBx" Grid.Column="1" Grid.Row="1" Style="{DynamicResource OmagCut_ComboBox}">
|
||||
<ComboBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding}" Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</DataTemplate>
|
||||
</ComboBox.ItemTemplate>
|
||||
</ComboBox>
|
||||
|
||||
<TextBlock Name="AuxiliaryToolTxBl" Grid.Column="0" Grid.Row="2" Grid.ColumnSpan="3"
|
||||
<TextBlock Name="AuxiliaryToolTxBl" Grid.Column="0" Grid.Row="2" Grid.ColumnSpan="3"
|
||||
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
|
||||
Visibility="Hidden"/>
|
||||
<ComboBox Name="AuxiliaryToolCmBx" Grid.Column="1" Grid.Row="3" Style="{StaticResource OmagCut_ComboBox}" Visibility="Hidden">
|
||||
<ComboBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding sName}" Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</DataTemplate>
|
||||
</ComboBox.ItemTemplate>
|
||||
</ComboBox>
|
||||
<ComboBox Name="AuxiliaryToolCmBx" Grid.Column="1" Grid.Row="3" Style="{StaticResource OmagCut_ComboBox}" Visibility="Hidden">
|
||||
<ComboBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding sName}" Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</DataTemplate>
|
||||
</ComboBox.ItemTemplate>
|
||||
</ComboBox>
|
||||
|
||||
<TextBlock Name="CurrDrillTxBl" Grid.Column="0" Grid.Row="4" Grid.ColumnSpan="3"
|
||||
<TextBlock Name="CurrDrillTxBl" Grid.Column="0" Grid.Row="4" Grid.ColumnSpan="3"
|
||||
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
|
||||
Visibility="Hidden"/>
|
||||
<ComboBox Name="CurrDrillCmBx" Grid.Column="1" Grid.Row="5" Style="{StaticResource OmagCut_ComboBox}" Visibility="Hidden">
|
||||
<ComboBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding}" Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</DataTemplate>
|
||||
</ComboBox.ItemTemplate>
|
||||
</ComboBox>
|
||||
<ComboBox Name="CurrDrillCmBx" Grid.Column="1" Grid.Row="5" Style="{StaticResource OmagCut_ComboBox}" Visibility="Hidden">
|
||||
<ComboBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding}" Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</DataTemplate>
|
||||
</ComboBox.ItemTemplate>
|
||||
</ComboBox>
|
||||
|
||||
<TextBlock Name="CurrMillTxBl" Grid.Column="0" Grid.Row="4" Grid.ColumnSpan="3"
|
||||
<TextBlock Name="CurrMillTxBl" Grid.Column="0" Grid.Row="4" Grid.ColumnSpan="3"
|
||||
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
|
||||
Visibility="Hidden"/>
|
||||
<ComboBox Name="CurrMillCmBx" Grid.Column="1" Grid.Row="5" Style="{StaticResource OmagCut_ComboBox}" Visibility="Hidden">
|
||||
<ComboBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding}" Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</DataTemplate>
|
||||
</ComboBox.ItemTemplate>
|
||||
</ComboBox>
|
||||
<ComboBox Name="CurrMillCmBx" Grid.Column="1" Grid.Row="5" Style="{StaticResource OmagCut_ComboBox}" Visibility="Hidden">
|
||||
<ComboBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding}" Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</DataTemplate>
|
||||
</ComboBox.ItemTemplate>
|
||||
</ComboBox>
|
||||
|
||||
<TextBlock Name="CurrCupWheelTxBl" Grid.Column="0" Grid.Row="4" Grid.ColumnSpan="3"
|
||||
<TextBlock Name="CurrCupWheelTxBl" Grid.Column="0" Grid.Row="4" Grid.ColumnSpan="3"
|
||||
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
|
||||
Visibility="Hidden"/>
|
||||
<ComboBox Name="CurrCupWheelCmBx" Grid.Column="1" Grid.Row="5" Style="{StaticResource OmagCut_ComboBox}" Visibility="Hidden">
|
||||
@@ -303,24 +303,24 @@
|
||||
<TextBlock Name="CurrWJetTxBl" Grid.Column="0" Grid.Row="4" Grid.ColumnSpan="3"
|
||||
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
|
||||
Visibility="Hidden"/>
|
||||
<ComboBox Name="CurrWJetCmBx" Grid.Column="1" Grid.Row="5" Style="{StaticResource OmagCut_ComboBox}" Visibility="Hidden">
|
||||
<ComboBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding}" Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</DataTemplate>
|
||||
</ComboBox.ItemTemplate>
|
||||
</ComboBox>
|
||||
<ComboBox Name="CurrWJetCmBx" Grid.Column="1" Grid.Row="5" Style="{StaticResource OmagCut_ComboBox}" Visibility="Hidden">
|
||||
<ComboBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding}" Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</DataTemplate>
|
||||
</ComboBox.ItemTemplate>
|
||||
</ComboBox>
|
||||
|
||||
<Button Name="SetUpBtn" Grid.Column="1" Grid.Row="3" Grid.RowSpan="2" Visibility="Hidden"
|
||||
<Button Name="SetUpBtn" Grid.Column="1" Grid.Row="3" Grid.RowSpan="2" Visibility="Hidden"
|
||||
Style="{DynamicResource OmagCut_YellowTextButton}"/>
|
||||
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
||||
</GroupBox>
|
||||
</GroupBox>
|
||||
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
||||
<!--<Grid Grid.Column="2" Grid.Row="2" Grid.RowSpan="6">
|
||||
<!--<Grid Grid.Column="2" Grid.Row="2" Grid.RowSpan="6">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition />
|
||||
@@ -424,96 +424,106 @@
|
||||
|
||||
</Grid>-->
|
||||
|
||||
<GroupBox Name="MaterialsGpBx" Style="{DynamicResource OmagCut_GroupBox}" Grid.Column="0"
|
||||
<GroupBox Name="MaterialsGpBx" Style="{DynamicResource OmagCut_GroupBox}" Grid.Column="0"
|
||||
Grid.Row="3" Grid.ColumnSpan="1" Grid.RowSpan="5">
|
||||
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="2.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="2.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<ListBox Name="MaterialsLstBx" Grid.RowSpan="2">
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding sName}" Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</DataTemplate>
|
||||
</ListBox.ItemTemplate>
|
||||
</ListBox>
|
||||
<ListBox Name="MaterialsLstBx" Grid.RowSpan="2">
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding sName}" Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</DataTemplate>
|
||||
</ListBox.ItemTemplate>
|
||||
</ListBox>
|
||||
|
||||
<EgtWPFLib:EgtTextBox Name="MatNameTxBx" Grid.Row="1" Width="240" Visibility="Hidden"
|
||||
<EgtWPFLib:EgtTextBox Name="MatNameTxBx" Grid.Row="1" Width="240" Visibility="Hidden"
|
||||
Style="{DynamicResource OmagCut_KeyboardTextBox}" />
|
||||
|
||||
<UniformGrid Grid.Row="2" Columns="2">
|
||||
<Button Name="NewMatBtn" Grid.Column="1"
|
||||
<UniformGrid Grid.Row="2" Columns="2">
|
||||
<Button Name="NewMatBtn" Grid.Column="1"
|
||||
Style="{DynamicResource OmagCut_RightGrayGradientYellowTextButton}"/>
|
||||
<Button Name="RemoveMatBtn" Grid.Column="1"
|
||||
<Button Name="RemoveMatBtn" Grid.Column="1"
|
||||
Style="{DynamicResource OmagCut_RightGrayGradientYellowTextButton}"/>
|
||||
</UniformGrid>
|
||||
</UniformGrid>
|
||||
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
||||
</GroupBox>
|
||||
</GroupBox>
|
||||
|
||||
<GroupBox Name="MachiningsGpBx" Style="{DynamicResource OmagCut_GroupBox}" Grid.Column="1"
|
||||
<GroupBox Name="MachiningsGpBx" Style="{DynamicResource OmagCut_GroupBox}" Grid.Column="1"
|
||||
Grid.Row="0" Grid.ColumnSpan="1" Grid.RowSpan="3">
|
||||
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<TextBlock Name="CurrSawingTxBl" Grid.Column="0" Grid.Row="0"
|
||||
<TextBlock Name="CurrSawingTxBl" Grid.Column="0" Grid.Row="0"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="CurrSawingTxBx" Grid.Column="1" Grid.Row="0" Margin="10,0,10,0"
|
||||
<EgtWPFLib:EgtTextBox Name="CurrSawingTxBx" Grid.Column="1" Grid.Row="0" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_FixedTextBox}" />
|
||||
|
||||
<TextBlock Name="CurrDrillingTxBl" Grid.Column="0" Grid.Row="1"
|
||||
<TextBlock Name="CurrDrillingTxBl" Grid.Column="0" Grid.Row="1"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="CurrDrillingTxBx" Grid.Column="1" Grid.Row="1" Margin="10,0,10,0"
|
||||
<EgtWPFLib:EgtTextBox Name="CurrDrillingTxBx" Grid.Column="1" Grid.Row="1" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_FixedTextBox}" />
|
||||
|
||||
<TextBlock Name="CurrMillingTxBl" Grid.Column="0" Grid.Row="2"
|
||||
<TextBlock Name="CurrMillingTxBl" Grid.Column="0" Grid.Row="2"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="CurrMillingTxBx" Grid.Column="1" Grid.Row="2" Margin="10,0,10,0"
|
||||
<EgtWPFLib:EgtTextBox Name="CurrMillingTxBx" Grid.Column="1" Grid.Row="2" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_FixedTextBox}" />
|
||||
|
||||
<TextBlock Name="CurrPocketingTxBl" Grid.Column="0" Grid.Row="3"
|
||||
<TextBlock Name="CurrPocketingTxBl" Grid.Column="0" Grid.Row="3"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="CurrPocketingTxBx" Grid.Column="1" Grid.Row="3" Margin="10,0,10,0"
|
||||
<EgtWPFLib:EgtTextBox Name="CurrPocketingTxBx" Grid.Column="1" Grid.Row="3" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_FixedTextBox}" />
|
||||
|
||||
<TextBlock Name="CurrWaterJettingTxBl" Grid.Column="0" Grid.Row="4"
|
||||
<TextBlock Name="CurrWaterJettingTxBl" Grid.Column="0" Grid.Row="4"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="CurrWaterJettingTxBx" Grid.Column="1" Grid.Row="4" Margin="10,0,10,0"
|
||||
|
||||
<Grid Grid.Column="1" Grid.Row="4">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="5*"/>
|
||||
<ColumnDefinition Width="1.5*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<EgtWPFLib:EgtTextBox Name="CurrWaterJettingTxBx" Grid.Column="0" Margin="10,0,5,0"
|
||||
Style="{DynamicResource OmagCut_FixedTextBox}" />
|
||||
<EgtWPFLib:EgtTextBox Name="CurrWaterJettingQualityTxBx" Grid.Column="1" Margin="0,0,10,0"
|
||||
Style="{DynamicResource OmagCut_FixedTextBox}" />
|
||||
</Grid>
|
||||
|
||||
|
||||
<TextBlock Name="CurrDripSawingTxBl" Grid.Column="0" Grid.Row="5"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="CurrDripSawingTxBx" Grid.Column="1" Grid.Row="5" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_FixedTextBox}" />
|
||||
|
||||
<TextBlock Name="CurrDripSawingTxBl" Grid.Column="0" Grid.Row="5"
|
||||
<TextBlock Name="CurrDripDrillingTxBl" Grid.Column="0" Grid.Row="6"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="CurrDripSawingTxBx" Grid.Column="1" Grid.Row="5" Margin="10,0,10,0"
|
||||
<EgtWPFLib:EgtTextBox Name="CurrDripDrillingTxBx" Grid.Column="1" Grid.Row="6" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_FixedTextBox}" />
|
||||
|
||||
<TextBlock Name="CurrDripDrillingTxBl" Grid.Column="0" Grid.Row="6"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="CurrDripDrillingTxBx" Grid.Column="1" Grid.Row="6" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_FixedTextBox}" />
|
||||
</Grid>
|
||||
|
||||
</Grid>
|
||||
</GroupBox>
|
||||
|
||||
</GroupBox>
|
||||
|
||||
<!--<GroupBox Name="SawGpBx" Style="{DynamicResource OmagCut_GroupBox}" Grid.Column="2" Grid.RowSpan="2">
|
||||
<!--<GroupBox Name="SawGpBx" Style="{DynamicResource OmagCut_GroupBox}" Grid.Column="2" Grid.RowSpan="2">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
@@ -551,51 +561,51 @@
|
||||
|
||||
</GroupBox>-->
|
||||
|
||||
<Grid Grid.Column="1" Grid.Row="3" Grid.RowSpan="3">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*"/>
|
||||
<RowDefinition Height="*"/>
|
||||
<RowDefinition Height="*"/>
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid Grid.Column="1" Grid.Row="3" Grid.RowSpan="3">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*"/>
|
||||
<RowDefinition Height="*"/>
|
||||
<RowDefinition Height="*"/>
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<GroupBox Name="MachineParamGpBx" Style="{DynamicResource OmagCut_GroupBox}" Grid.Column="0" Grid.Row="0" Grid.ColumnSpan="2" Grid.RowSpan="2">
|
||||
<Grid Grid.Column="2" Grid.Row="1">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<GroupBox Name="MachineParamGpBx" Style="{DynamicResource OmagCut_GroupBox}" Grid.Column="0" Grid.Row="0" Grid.ColumnSpan="2" Grid.RowSpan="2">
|
||||
<Grid Grid.Column="2" Grid.Row="1">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<TextBlock Name="SafeZTxBl" Grid.Column="0"
|
||||
<TextBlock Name="SafeZTxBl" Grid.Column="0"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="SafeZTxBx" Grid.Column="1" Margin="10,0,10,0"
|
||||
<EgtWPFLib:EgtTextBox Name="SafeZTxBx" Grid.Column="1" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
||||
</GroupBox>
|
||||
</GroupBox>
|
||||
|
||||
<Border Style="{DynamicResource OmagCut_NoNameGroupBorder}" Grid.Column="0" Grid.Row="2" Grid.ColumnSpan="2" Grid.RowSpan="2">
|
||||
<Grid >
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Border Style="{DynamicResource OmagCut_NoNameGroupBorder}" Grid.Column="0" Grid.Row="2" Grid.ColumnSpan="2" Grid.RowSpan="2">
|
||||
<Grid >
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<TextBlock Name="AdditionalTableTxBl" Grid.Column="0"
|
||||
<TextBlock Name="AdditionalTableTxBl" Grid.Column="0"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}" />
|
||||
<EgtWPFLib:EgtTextBox Name="AdditionalTableTxBx" Grid.Column="1" Margin="10,0,10,0"
|
||||
<EgtWPFLib:EgtTextBox Name="AdditionalTableTxBx" Grid.Column="1" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
||||
</Border>
|
||||
</Border>
|
||||
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
||||
<!--<GroupBox Name="DirectCutsParamGpBx" Style="{DynamicResource OmagCut_GroupBox}" Grid.Column="2" Grid.Row="8">
|
||||
<!--<GroupBox Name="DirectCutsParamGpBx" Style="{DynamicResource OmagCut_GroupBox}" Grid.Column="2" Grid.Row="8">
|
||||
<Grid>
|
||||
<TextBlock Name="FinalHomeTxBl"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}" />
|
||||
@@ -605,199 +615,212 @@
|
||||
|
||||
</GroupBox>-->
|
||||
|
||||
<GroupBox Name="NestingParamGpBx" Style="{DynamicResource OmagCut_GroupBox}" Grid.Column="1" Grid.Row="6" Grid.RowSpan="3">
|
||||
<Grid Name="NestingGrid">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<GroupBox Name="NestingParamGpBx" Style="{DynamicResource OmagCut_GroupBox}" Grid.Column="1" Grid.Row="6" Grid.RowSpan="3">
|
||||
<Grid Name="NestingGrid">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<TextBlock Name="CompleteCutsTxBl" Grid.Column="0" Grid.Row="0" Grid.ColumnSpan="2"
|
||||
<TextBlock Name="CompleteCutsTxBl" Grid.Column="0" Grid.Row="0" Grid.ColumnSpan="2"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}" />
|
||||
<CheckBox Name="CompleteCutsChBx" Grid.Column="0" Grid.Row="0" Grid.ColumnSpan="2" Style="{DynamicResource OmagCut_CheckBox_Single}"
|
||||
<CheckBox Name="CompleteCutsChBx" Grid.Column="0" Grid.Row="0" Grid.ColumnSpan="2" Style="{DynamicResource OmagCut_CheckBox_Single}"
|
||||
HorizontalAlignment="Right" Margin="0,0,10,0"/>
|
||||
|
||||
<!--Allineato-->
|
||||
<TextBlock Name="AlignTxBl" Grid.Row="1" Grid.ColumnSpan="2"
|
||||
<!--Allineato-->
|
||||
<TextBlock Name="AlignTxBl" Grid.Row="1" Grid.ColumnSpan="2"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}" />
|
||||
<CheckBox Name="AlignChBx" Grid.Row="1" Grid.ColumnSpan="2" Style="{StaticResource OmagCut_CheckBox_Single}"
|
||||
<CheckBox Name="AlignChBx" Grid.Row="1" Grid.ColumnSpan="2" Style="{StaticResource OmagCut_CheckBox_Single}"
|
||||
HorizontalAlignment="Right" Margin="0,0,10,0"/>
|
||||
|
||||
<!--Ghigliottina-->
|
||||
<TextBlock Name="GhigliottinaTxBl" Grid.Row="2" Grid.ColumnSpan="2"
|
||||
<!--Ghigliottina-->
|
||||
<TextBlock Name="GhigliottinaTxBl" Grid.Row="2" Grid.ColumnSpan="2"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}" />
|
||||
<CheckBox Name="GhigliottinaChBx" Grid.Row="2" Grid.ColumnSpan="2" Style="{StaticResource OmagCut_CheckBox_Single}"
|
||||
HorizontalAlignment="Right" Margin="0,0,10,0"/>
|
||||
|
||||
<!--Automatico-->
|
||||
<TextBlock Name="AutomaticTxBl" Grid.Row="3" Grid.ColumnSpan="2"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}" />
|
||||
<CheckBox Name="AutomaticChBx" Grid.Row="3" Grid.ColumnSpan="2" Style="{StaticResource OmagCut_CheckBox_Single}"
|
||||
<CheckBox Name="GhigliottinaChBx" Grid.Row="2" Grid.ColumnSpan="2" Style="{StaticResource OmagCut_CheckBox_Single}"
|
||||
HorizontalAlignment="Right" Margin="0,0,10,0"/>
|
||||
|
||||
|
||||
<!--Automatico-->
|
||||
<TextBlock Name="AutomaticTxBl" Grid.Row="3" Grid.ColumnSpan="2"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}" />
|
||||
<CheckBox Name="AutomaticChBx" Grid.Row="3" Grid.ColumnSpan="2" Style="{StaticResource OmagCut_CheckBox_Single}"
|
||||
HorizontalAlignment="Right" Margin="0,0,10,0"/>
|
||||
|
||||
|
||||
|
||||
</Grid>
|
||||
|
||||
</GroupBox>
|
||||
</GroupBox>
|
||||
|
||||
<GroupBox Name="AutoRawImageParamGpBx" Style="{DynamicResource OmagCut_GroupBox}" Grid.Column="3" Grid.Row="0" Grid.RowSpan="2">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<Grid Grid.ColumnSpan="2">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
<GroupBox Name="AutoRawImageParamGpBx" Style="{DynamicResource OmagCut_GroupBox}" Grid.Column="3" Grid.Row="0" Grid.RowSpan="2">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<Button Name="BackImageBtn" Grid.Column="1"
|
||||
<Grid Grid.ColumnSpan="2">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Button Name="BackImageBtn" Grid.Column="1"
|
||||
Style="{DynamicResource OmagCut_RightGrayGradientYellowTextButton}"/>
|
||||
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
||||
<TextBlock Name="ThresholdTxBl" Grid.Column="0" Grid.Row="1"
|
||||
<TextBlock Name="ThresholdTxBl" Grid.Column="0" Grid.Row="1"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="ThresholdTxBx" Grid.Column="1" Grid.Row="1" Margin="10,0,10,0"
|
||||
<EgtWPFLib:EgtTextBox Name="ThresholdTxBx" Grid.Column="1" Grid.Row="1" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
<TextBlock Name="ToleranceTxBl" Grid.Column="0" Grid.Row="2"
|
||||
<TextBlock Name="ToleranceTxBl" Grid.Column="0" Grid.Row="2"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="ToleranceTxBx" Grid.Column="1" Grid.Row="2" Margin="10,0,10,0"
|
||||
<EgtWPFLib:EgtTextBox Name="ToleranceTxBx" Grid.Column="1" Grid.Row="2" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
||||
</GroupBox>
|
||||
</GroupBox>
|
||||
|
||||
<GroupBox Name="CutFredGpBx" Style="{DynamicResource OmagCut_GroupBox}" Grid.Column="3"
|
||||
<GroupBox Name="CutFredGpBx" Style="{DynamicResource OmagCut_GroupBox}" Grid.Column="3"
|
||||
Grid.Row="2" Grid.RowSpan="1">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<TextBlock Name="CfrLenTxBl" Grid.Column="0"
|
||||
<TextBlock Name="CfrLenTxBl" Grid.Column="0"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="CfrLenTxBx" Grid.Column="1" Margin="10,0,10,0"
|
||||
<EgtWPFLib:EgtTextBox Name="CfrLenTxBx" Grid.Column="1" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
<TextBlock Name="CfrPercTxBl" Grid.Column="0" Grid.Row="1"
|
||||
<TextBlock Name="CfrPercTxBl" Grid.Column="0" Grid.Row="1"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="CfrPercTxBx" Grid.Column="1" Grid.Row="1" Margin="10,0,10,0"
|
||||
<EgtWPFLib:EgtTextBox Name="CfrPercTxBx" Grid.Column="1" Grid.Row="1" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
||||
</GroupBox>
|
||||
</GroupBox>
|
||||
|
||||
<!--Incisioni-->
|
||||
<GroupBox Name="TopMillGpBx" Style="{DynamicResource OmagCut_GroupBox}" Grid.Column="3"
|
||||
<!--Incisioni-->
|
||||
<GroupBox Name="TopMillGpBx" Style="{DynamicResource OmagCut_GroupBox}" Grid.Column="3"
|
||||
Grid.Row="3" Grid.RowSpan="3">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<!--Utilizza fresa-->
|
||||
<TextBlock Name="TmEnableTxBl" Grid.Column="0" Grid.Row="0"
|
||||
<!--Utilizza fresa-->
|
||||
<TextBlock Name="TmEnableTxBl" Grid.Column="0" Grid.Row="0"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}" />
|
||||
<CheckBox Name="TmEnableChBx" Grid.Column="1" Grid.Row="0" Style="{DynamicResource OmagCut_CheckBox_Single}"
|
||||
<CheckBox Name="TmEnableChBx" Grid.Column="1" Grid.Row="0" Style="{DynamicResource OmagCut_CheckBox_Single}"
|
||||
HorizontalAlignment="Right" Margin="10,0,10,0"/>
|
||||
<!--Affondamento-->
|
||||
<TextBlock Name="TmDepthTxBl" Grid.Column="0" Grid.Row="1"
|
||||
<!--Affondamento-->
|
||||
<TextBlock Name="TmDepthTxBl" Grid.Column="0" Grid.Row="1"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="TmDepthTxBx" Grid.Column="1" Grid.Row="1" Margin="10,0,10,0"
|
||||
<EgtWPFLib:EgtTextBox Name="TmDepthTxBx" Grid.Column="1" Grid.Row="1" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
<!--Larghezza-->
|
||||
<TextBlock Name="TmWidthTxBl" Grid.Column="0" Grid.Row="2"
|
||||
<!--Larghezza-->
|
||||
<TextBlock Name="TmWidthTxBl" Grid.Column="0" Grid.Row="2"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="TmWidthTxBx" Grid.Column="1" Grid.Row="2" Margin="10,0,10,0"
|
||||
<EgtWPFLib:EgtTextBox Name="TmWidthTxBx" Grid.Column="1" Grid.Row="2" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
||||
</GroupBox>
|
||||
</GroupBox>
|
||||
|
||||
|
||||
<Border Name="SideAngCutProbeGpBx" Style="{DynamicResource OmagCut_NoNameGroupBorder}" Grid.Column="3" Grid.Row="6">
|
||||
<Grid >
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<TextBlock Name="SideAngCutProbeTxBl" Grid.Column="0" Grid.Row="0"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}" />
|
||||
<CheckBox Name="SideAngCutProbeChBx" Grid.Column="1" Grid.Row="0" Style="{StaticResource OmagCut_CheckBox_Single}"
|
||||
HorizontalAlignment="Right" Margin="0,0,10,0"/>
|
||||
</Grid>
|
||||
|
||||
</Border>
|
||||
|
||||
<Border Name="WashingGpBx" Style="{DynamicResource OmagCut_NoNameGroupBorder}" Grid.Column="3" Grid.Row="7">
|
||||
<Grid >
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<TextBlock Name="WashingTxBl" Grid.Column="0" Grid.Row="0"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}" />
|
||||
<CheckBox Name="WashingChBx" Grid.Column="1" Grid.Row="0" Style="{StaticResource OmagCut_CheckBox_Single}"
|
||||
HorizontalAlignment="Right" Margin="0,0,10,0"/>
|
||||
</Grid>
|
||||
|
||||
</Border>
|
||||
|
||||
<!--Cornici-->
|
||||
<GroupBox Name="FrameGpBx" Style="{DynamicResource OmagCut_GroupBox}" Grid.Column="3" Grid.Row="8">
|
||||
<Border Name="SideAngCutProbeGpBx" Style="{DynamicResource OmagCut_NoNameGroupBorder}" Grid.Column="3" Grid.Row="6">
|
||||
<Grid >
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<TextBlock Name="FramePauseTxBl" Grid.Column="0" Grid.Row="0"
|
||||
<TextBlock Name="SideAngCutProbeTxBl" Grid.Column="0" Grid.Row="0"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}" />
|
||||
<CheckBox Name="SideAngCutProbeChBx" Grid.Column="1" Grid.Row="0" Style="{StaticResource OmagCut_CheckBox_Single}"
|
||||
HorizontalAlignment="Right" Margin="0,0,10,0"/>
|
||||
</Grid>
|
||||
|
||||
</Border>
|
||||
|
||||
<Border Name="WashingGpBx" Style="{DynamicResource OmagCut_NoNameGroupBorder}" Grid.Column="3" Grid.Row="7">
|
||||
<Grid >
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<TextBlock Name="WashingTxBl" Grid.Column="0" Grid.Row="0"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}" />
|
||||
<CheckBox Name="WashingChBx" Grid.Column="1" Grid.Row="0" Style="{StaticResource OmagCut_CheckBox_Single}"
|
||||
HorizontalAlignment="Right" Margin="0,0,10,0"/>
|
||||
</Grid>
|
||||
|
||||
</Border>
|
||||
|
||||
<!--Cornici-->
|
||||
<GroupBox Name="FrameGpBx" Style="{DynamicResource OmagCut_GroupBox}" Grid.Column="3" Grid.Row="8">
|
||||
<Grid >
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<TextBlock Name="FramePauseTxBl" Grid.Column="0" Grid.Row="0"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}" />
|
||||
<CheckBox Name="FramePauseChBx" Grid.Column="1" Grid.Row="0" Style="{StaticResource OmagCut_CheckBox_Single}"
|
||||
<CheckBox Name="FramePauseChBx" Grid.Column="1" Grid.Row="0" Style="{StaticResource OmagCut_CheckBox_Single}"
|
||||
HorizontalAlignment="Right" Margin="0,0,10,0"/>
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
||||
</GroupBox>
|
||||
</GroupBox>
|
||||
|
||||
<UniformGrid Columns="4" Grid.Row="8">
|
||||
<Button x:Name="SawProbingBtn"
|
||||
Style="{DynamicResource OmagCut_YellowGradientYellowIconButton}">
|
||||
<Image Source="{DynamicResource SawProbeImg}" Style="{StaticResource OmagCut_ScaleButtonIcon}"/>
|
||||
</Button>
|
||||
<Grid Grid.Column="0" Grid.Row="8">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="2.5*"/>
|
||||
<ColumnDefinition Width="2.5*"/>
|
||||
<ColumnDefinition Width="4.5*"/>
|
||||
<ColumnDefinition Width="1.8*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Button x:Name="SawProbingBtn"
|
||||
Style="{DynamicResource OmagCut_YellowGradientYellowIconButton}">
|
||||
<Image Source="{DynamicResource SawProbeImg}" Style="{StaticResource OmagCut_ScaleButtonIcon}"/>
|
||||
</Button>
|
||||
<Button x:Name="ExecLuaBtn" Grid.Column="1"
|
||||
Style="{DynamicResource OmagCut_YellowGradientYellowIconButton}">
|
||||
<Image Source="{DynamicResource PlayImg}" Style="{StaticResource OmagCut_ScaleButtonIcon}"/>
|
||||
</Button>
|
||||
|
||||
</UniformGrid>
|
||||
|
||||
</Grid>
|
||||
|
||||
</Border>
|
||||
<TextBlock Name="UseLaserOriginTxBl" Grid.Column="2"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}" />
|
||||
<CheckBox Name="UseLaserOriginChBx" Style="{DynamicResource OmagCut_CheckBox_Single}" Grid.Column="3"
|
||||
HorizontalAlignment="Right" Margin="0,0,10,0"/>
|
||||
</Grid>
|
||||
|
||||
</Grid>
|
||||
</Border>
|
||||
|
||||
</UserControl>
|
||||
|
||||
@@ -45,6 +45,13 @@ Public Class AlarmsPageUC
|
||||
SawProbingBtn.Visibility = Windows.Visibility.Hidden
|
||||
End If
|
||||
|
||||
' Se esiste un file lua valido allora mostro il pulsante per l'esecuzione dello script
|
||||
If Not String.IsNullOrEmpty(GetExecLuaFile()) And
|
||||
ExecLuaBtn.Visibility = Visibility.Visible Then
|
||||
Else
|
||||
ExecLuaBtn.Visibility = Visibility.Hidden
|
||||
End If
|
||||
|
||||
' Imposto i messaggi letti dal file dei messaggi
|
||||
CurrSawTxBl.Text = EgtMsg(MSG_ALARMSPAGEUC + 1)
|
||||
AuxiliaryToolTxBl.Text = EgtMsg(MSG_ALARMSPAGEUC + 2)
|
||||
@@ -109,6 +116,7 @@ Public Class AlarmsPageUC
|
||||
CurrDripDrillingTxBl.Text = EgtMsg(MSG_ALARMS2PAGEUC + 6) ' DripDrilling
|
||||
FrameGpBx.Header = EgtMsg(91068) ' Cornici
|
||||
FramePauseTxBl.Text = EgtMsg(91067) ' Inserisci pausa
|
||||
UseLaserOriginTxBl.Text = EgtMsg(91129) ' Usa laser per origine
|
||||
AutoRawImageParamGpBx.Visibility = Windows.Visibility.Hidden
|
||||
End Sub
|
||||
|
||||
@@ -118,6 +126,14 @@ Public Class AlarmsPageUC
|
||||
' Variabile che accorcia il riferimento alla macchina corrente
|
||||
m_CurrentMachine = m_MainWindow.m_CurrentMachine
|
||||
|
||||
' in assenza dell'uscita H1 nascondo i parametri lama
|
||||
If EgtGetHeadId("H1") = GDB_ID.NULL Then
|
||||
SawGpBx.Visibility = Visibility.Hidden
|
||||
TopMillGpBx.Visibility = Visibility.Hidden
|
||||
CurrSawTxBl.Visibility = Visibility.Hidden
|
||||
CurrSawCmBx.Visibility = Visibility.Hidden
|
||||
End If
|
||||
|
||||
' Verifico la configurazione della macchina per creare i combobox
|
||||
Select Case m_CurrentMachine.MountedToolConfig
|
||||
Case CurrentMachine.MountedToolConfigs.SAW
|
||||
@@ -132,7 +148,7 @@ Public Class AlarmsPageUC
|
||||
' Disattivo il gruppo dei parametri fori
|
||||
HolesGpBx.Visibility = Windows.Visibility.Hidden
|
||||
Case CurrentMachine.MountedToolConfigs.SAWANDAUXTOOL
|
||||
'Non faccio alcunchè
|
||||
'Non faccio alcunchè
|
||||
Case CurrentMachine.MountedToolConfigs.MANUALTOOLCHANGER, CurrentMachine.MountedToolConfigs.TOOLCHANGER
|
||||
'Da implementare
|
||||
End Select
|
||||
@@ -151,7 +167,7 @@ Public Class AlarmsPageUC
|
||||
|
||||
' Se non previsti tagli waterjet, disabilito relativo box
|
||||
If Not m_CurrentMachine.bWaterJetting Then
|
||||
WJsParamGpBx.Visibility = Visibility.Hidden
|
||||
WjsParamGpBx.Visibility = Visibility.Hidden
|
||||
End If
|
||||
|
||||
' Abilitazione box per contorni grezzo da foto
|
||||
@@ -164,7 +180,7 @@ Public Class AlarmsPageUC
|
||||
End If
|
||||
|
||||
' Abilitazione Feed ridotta su inizio/fine tagli
|
||||
If m_CurrentMachine.bFsevEnable Then
|
||||
If m_CurrentMachine.bFsevEnable And EgtGetHeadId("H1") <> GDB_ID.NULL Then
|
||||
CutFredGpBx.Visibility = Windows.Visibility.Visible
|
||||
Else
|
||||
CutFredGpBx.Visibility = Windows.Visibility.Hidden
|
||||
@@ -179,11 +195,16 @@ Public Class AlarmsPageUC
|
||||
m_bFirst = False
|
||||
End If
|
||||
|
||||
' Aggiorno lista delle lame per pagina macchina in cui scegliere quella corrente
|
||||
CreateToolList(MCH_TF.SAWBLADE, m_SawList)
|
||||
' Aggiorno lista delle lame per pagina macchina in cui scegliere quella corrente
|
||||
CreateToolList(MCH_TF.SAWBLADE, m_SawList)
|
||||
' Seleziono lama corrente
|
||||
CurrSawCmBx.SelectedItem = m_CurrentMachine.sCurrSaw
|
||||
|
||||
' nascondo la lista dei materiali solo se macchina WaterJet
|
||||
If m_CurrentMachine.bWaterJet Then
|
||||
MaterialsGpBx.Visibility = Visibility.Hidden
|
||||
End If
|
||||
|
||||
' Verifico la configurazione della macchina per creare i combobox
|
||||
Select Case m_CurrentMachine.MountedToolConfig
|
||||
Case CurrentMachine.MountedToolConfigs.SAW
|
||||
@@ -374,6 +395,17 @@ Public Class AlarmsPageUC
|
||||
' Leggo parametri per variazione feed in tagli
|
||||
CfrLenTxBx.Text = LenToString(m_CurrentMachine.dFsevLength, 3)
|
||||
CfrPercTxBx.Text = DoubleToString(m_CurrentMachine.dFsevPerc, 0)
|
||||
|
||||
' leggo flag per tavola definita da laser
|
||||
Dim nUseLaserOrigin As Integer = GetPrivateProfileInt(S_TABLE, K_USELASERORIGIN, -1, m_MainWindow.GetMachIniFile())
|
||||
If nUseLaserOrigin = -1 Then
|
||||
UseLaserOriginTxBl.Visibility = Visibility.Hidden
|
||||
UseLaserOriginChBx.Visibility = Visibility.Hidden
|
||||
Else
|
||||
UseLaserOriginTxBl.Visibility = Visibility.Visible
|
||||
UseLaserOriginChBx.IsChecked = (nUseLaserOrigin <> 0)
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
' aggiorna le text delle lavorazioni (la selezione avviene nella pagina del grezzo o dalla pagina del progetto corrente)
|
||||
@@ -414,9 +446,26 @@ Public Class AlarmsPageUC
|
||||
CurrWaterJettingTxBx.Text = m_CurrentMachine.sCurrWaterJetting
|
||||
CurrWaterJettingTxBl.Visibility = Windows.Visibility.Visible
|
||||
CurrWaterJettingTxBx.Visibility = Windows.Visibility.Visible
|
||||
If m_MainWindow.m_CurrentMachine.bFromDBWaterJet Then
|
||||
CurrWaterJettingTxBx.SetValue(Grid.ColumnSpanProperty, 1)
|
||||
CurrWaterJettingTxBx.SetValue(MarginProperty, New Thickness(CurrWaterJettingTxBx.Margin.Left,
|
||||
CurrWaterJettingTxBx.Margin.Top,
|
||||
5,
|
||||
CurrWaterJettingTxBx.Margin.Bottom))
|
||||
CurrWaterJettingQualityTxBx.Text = m_CurrentMachine.sCurrWaterJettingQuality
|
||||
CurrWaterJettingQualityTxBx.Visibility = Windows.Visibility.Visible
|
||||
Else
|
||||
CurrWaterJettingTxBx.SetValue(Grid.ColumnSpanProperty, 2)
|
||||
CurrWaterJettingTxBx.SetValue(MarginProperty, New Thickness(CurrWaterJettingTxBx.Margin.Left,
|
||||
CurrWaterJettingTxBx.Margin.Top,
|
||||
10,
|
||||
CurrWaterJettingTxBx.Margin.Bottom))
|
||||
CurrWaterJettingQualityTxBx.Visibility = Windows.Visibility.Collapsed
|
||||
End If
|
||||
Else
|
||||
CurrWaterJettingTxBl.Visibility = Windows.Visibility.Hidden
|
||||
CurrWaterJettingTxBx.Visibility = Windows.Visibility.Hidden
|
||||
CurrWaterJettingQualityTxBx.Visibility = Windows.Visibility.Hidden
|
||||
End If
|
||||
If m_CurrentMachine.sCurrDripSawing <> String.Empty Then
|
||||
CurrDripSawingTxBx.Text = m_CurrentMachine.sCurrDripSawing
|
||||
@@ -536,6 +585,33 @@ Public Class AlarmsPageUC
|
||||
String.Compare(sMchTool, m_CurrentMachine.sCurrSaw, True) <> 0 Then
|
||||
m_CurrentMachine.sCurrSawing = String.Empty
|
||||
End If
|
||||
|
||||
'Dim sVal As String = String.Empty
|
||||
'Dim dVal As Double = 0
|
||||
'If m_CurrentMachine.GetUserNote("FsevLength", sVal, m_CurrentMachine.sCurrSawing, false) Then
|
||||
' StringToDouble(sVal, dVal)
|
||||
' m_CurrentMachine.SetFsevLength(dVal)
|
||||
'End If
|
||||
'If m_CurrentMachine.GetUserNote("FsevPerc", sVal, m_CurrentMachine.sCurrSawing, false) Then
|
||||
' StringToDouble(sVal, dVal)
|
||||
' m_CurrentMachine.SetFsevPerc(dVal)
|
||||
'End If
|
||||
|
||||
Dim sVal As String = String.Empty
|
||||
Dim dVal As Double = 0
|
||||
If m_CurrentMachine.GetUserNote("FsevLength", sVal, m_CurrentMachine.sCurrSaw) Then
|
||||
StringToDouble(sVal, dVal)
|
||||
m_CurrentMachine.SetFsevLength(dVal)
|
||||
End If
|
||||
If m_CurrentMachine.GetUserNote("FsevPerc", sVal, m_CurrentMachine.sCurrSaw) Then
|
||||
StringToDouble(sVal, dVal)
|
||||
m_CurrentMachine.SetFsevPerc(dVal)
|
||||
End If
|
||||
|
||||
' Leggo parametri per variazione feed in tagli aggiornati in funzione della lama
|
||||
CfrLenTxBx.Text = LenToString(m_CurrentMachine.dFsevLength, 3)
|
||||
CfrPercTxBx.Text = DoubleToString(m_CurrentMachine.dFsevPerc, 0)
|
||||
|
||||
' Aggiorno utensili per lavoro in corso
|
||||
m_MainWindow.m_WorkInProgressPageUC.UpdateTools()
|
||||
' aggiorno la lista delle lavorazioni
|
||||
@@ -549,7 +625,7 @@ Public Class AlarmsPageUC
|
||||
If CurrDrillCmBx.SelectedItem.ToString() = NO_TOOL Then
|
||||
m_CurrentMachine.sCurrDrill = String.Empty
|
||||
m_CurrentMachine.sCurrDrilling = String.Empty
|
||||
' Assegno foretto
|
||||
' Assegno foretto
|
||||
Else
|
||||
m_CurrentMachine.sCurrDrill = CurrDrillCmBx.SelectedItem.ToString()
|
||||
' Reset fresa, waterjet e relative lavorazioni
|
||||
@@ -584,7 +660,7 @@ Public Class AlarmsPageUC
|
||||
If CurrMillCmBx.SelectedItem.ToString() = NO_TOOL Then
|
||||
m_CurrentMachine.sCurrMill = String.Empty
|
||||
m_CurrentMachine.sCurrMilling = String.Empty
|
||||
' Assegno fresa
|
||||
' Assegno fresa
|
||||
Else
|
||||
m_CurrentMachine.sCurrMill = CurrMillCmBx.SelectedItem.ToString()
|
||||
' Reset foretto, waterjet e relative lavorazioni
|
||||
@@ -654,7 +730,7 @@ Public Class AlarmsPageUC
|
||||
If CurrWJetCmBx.SelectedItem.ToString() = NO_TOOL Then
|
||||
m_CurrentMachine.sCurrWaterJet = String.Empty
|
||||
m_CurrentMachine.sCurrWaterJetting = String.Empty
|
||||
' Assegno Waterjet
|
||||
' Assegno Waterjet
|
||||
Else
|
||||
m_CurrentMachine.sCurrWaterJet = CurrWJetCmBx.SelectedItem.ToString()
|
||||
' Reset foretto, fresa e relative lavorazioni
|
||||
@@ -857,7 +933,7 @@ Public Class AlarmsPageUC
|
||||
Else
|
||||
WritePrivateProfileString(S_MACH_NEST, K_MACH_ENGRAVING_WITHMILL, "0", m_MainWindow.GetMachIniFile())
|
||||
End If
|
||||
End Sub
|
||||
End Sub
|
||||
|
||||
Private Sub TmDepthTxBx_EgtClosed(sender As Object, e As EventArgs) Handles TmDepthTxBx.EgtClosed
|
||||
Dim dVal As Double = 0
|
||||
@@ -993,6 +1069,14 @@ Public Class AlarmsPageUC
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub UseLaserOriginChBx_Click() Handles UseLaserOriginChBx.Click
|
||||
If UseLaserOriginChBx.IsChecked() Then
|
||||
WritePrivateProfileString(S_TABLE, K_USELASERORIGIN, "1", m_MainWindow.GetMachIniFile())
|
||||
Else
|
||||
WritePrivateProfileString(S_TABLE, K_USELASERORIGIN, "0", m_MainWindow.GetMachIniFile())
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub WashingChBx_Click(sender As Object, e As RoutedEventArgs) Handles WashingChBx.Click
|
||||
If WashingChBx.IsChecked() Then
|
||||
WritePrivateProfileString(S_MACH_NEST, K_MACH_WASHING, "1", m_MainWindow.GetMachIniFile())
|
||||
@@ -1026,6 +1110,14 @@ Public Class AlarmsPageUC
|
||||
End Sub
|
||||
|
||||
Private Sub SawProbingBtn_Click(sender As Object, e As RoutedEventArgs) Handles SawProbingBtn.Click
|
||||
' imposto modo automatico
|
||||
Select Case m_MainWindow.m_CNCommunication.m_nNCType
|
||||
Case 1, 2
|
||||
' in attesa di verifica
|
||||
Case 3
|
||||
Dim nResult As Short = m_CN.DGeneralFunctions_WriteCncMode(0)
|
||||
EgtOutLog("Impostata modalità automatica: esito " & nResult.ToString)
|
||||
End Select
|
||||
' Recupero file LUA
|
||||
EgtLuaExecFile(m_MainWindow.m_CurrentMachine.sMachDir() & "\DirectCmd\SawProbing.lua")
|
||||
' Recupero utensile da tastare
|
||||
@@ -1242,4 +1334,53 @@ Public Class AlarmsPageUC
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub ExecLuaBtn_Click(sender As Object, e As RoutedEventArgs) Handles ExecLuaBtn.Click
|
||||
Dim sExecFile As String = GetExecLuaFile()
|
||||
Dim sCallFunction As String = GetCallFunction()
|
||||
' Recupero file LUA
|
||||
Dim bExec As Boolean = EgtLuaExecFile(sExecFile)
|
||||
' Lancio l'esecuzione della funzione principale
|
||||
bExec = bExec And EgtLuaCallFunction(sCallFunction)
|
||||
' Leggo variabili
|
||||
Dim nErr As Integer = 0
|
||||
EgtLuaGetGlobIntVar("CMD.ERR", nErr)
|
||||
' Reset lua
|
||||
EgtLuaResetGlobVar("CMD")
|
||||
' Verifico condizioni di errore
|
||||
If nErr <> 0 And bExec Then
|
||||
' Errore in tastatura lama
|
||||
EgtOutLog("Error in execution file: " & sExecFile & ", calling function: " & sCallFunction & ", CMD.ERR=" & nErr, ToString)
|
||||
Return
|
||||
End If
|
||||
End Sub
|
||||
|
||||
' Recupero il percorso del file lua da eseguire
|
||||
Private Function GetExecLuaFile() As String
|
||||
Dim sDir As String = String.Empty
|
||||
Dim sFile As String = String.Empty
|
||||
If GetPrivateProfileString(S_EXECLUA, K_DIRSCRIPT_LUA, "", sDir, m_MainWindow.GetMachIniFile()) <> 0 And
|
||||
GetPrivateProfileString(S_EXECLUA, K_FILESCRIPT_LUA, "", sFile, m_MainWindow.GetMachIniFile()) <> 0 Then
|
||||
' Formatto le stringhe lette
|
||||
sDir = sDir.Trim
|
||||
sFile = sFile.Trim
|
||||
If sDir.EndsWith("\"c) Then
|
||||
sDir = sDir.Remove(sDir.LastIndexOf("\"c))
|
||||
End If
|
||||
If Not sFile.EndsWith(".lua") Then
|
||||
sFile = sFile & ".lua"
|
||||
End If
|
||||
If File.Exists(sDir & "\" & sFile) Then
|
||||
Return sDir & "\" & sFile
|
||||
End If
|
||||
End If
|
||||
Return String.Empty
|
||||
End Function
|
||||
|
||||
' Recupera il nome della funzione che deve essere chiamata
|
||||
Private Function GetCallFunction() As String
|
||||
Dim sCallFunction As String = "CMD.CmdString"
|
||||
GetPrivateProfileString(S_EXECLUA, K_CALLFUNCTION, sCallFunction, sCallFunction, m_MainWindow.GetMachIniFile())
|
||||
Return sCallFunction
|
||||
End Function
|
||||
|
||||
End Class
|
||||
|
||||
@@ -3,9 +3,11 @@
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
|
||||
FontFamily="{DynamicResource OmagCut_Font}"
|
||||
Title="OpenFile" Height="682.6" Width="426.6" WindowStyle="None" ResizeMode="NoResize" ShowInTaskbar="False" AllowsTransparency="True" Background="Transparent">
|
||||
Title="OpenFile" Height="682.6" Width="426.6" WindowStyle="None"
|
||||
ResizeMode="NoResize" ShowInTaskbar="False" AllowsTransparency="True"
|
||||
Background="Transparent">
|
||||
|
||||
<Border Style="{DynamicResource OmagCut_Border}">
|
||||
<Border Style="{DynamicResource OmagCut_Border}">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
|
||||
+353
-12
@@ -1,4 +1,5 @@
|
||||
Imports System.Collections.ObjectModel
|
||||
Imports EgtWPFLib5
|
||||
Imports EgtUILib
|
||||
|
||||
Public Class CurrentMachine
|
||||
@@ -28,6 +29,9 @@ Public Class CurrentMachine
|
||||
Private m_nThreadSleep As Integer = 150
|
||||
|
||||
' Dati su linea di produzione
|
||||
Private m_bDemo As Boolean = False
|
||||
Public nLastProjSentToViewDEMO As Integer = 0
|
||||
|
||||
Private m_bProdLine As Boolean = False
|
||||
Private m_sVarProg1 As String = "E80021"
|
||||
Private m_nProg1 As Integer = 901
|
||||
@@ -73,6 +77,9 @@ Public Class CurrentMachine
|
||||
Private m_bPolishingWheel As Boolean = False
|
||||
Private m_bWaterJet As Boolean = False
|
||||
|
||||
' Abilitazione DB WaterJet
|
||||
Private m_bFromDBWaterJet As Boolean = False
|
||||
|
||||
' Flag per visualizzazione TcPos, Testa/uscita e Note utente
|
||||
Private m_nShowToolChanger As Integer = 0 ' 0=no, 1=tutti utensili, 2=solo lame
|
||||
Private m_bShowHeadExit As Boolean = False
|
||||
@@ -111,6 +118,7 @@ Public Class CurrentMachine
|
||||
Private m_sCurrDripSawing As String = String.Empty
|
||||
Private m_sCurrDripDrilling As String = String.Empty
|
||||
Private m_sCurrWaterJetting As String = String.Empty
|
||||
Private m_sCurrWaterJettingQuality As String = String.Empty
|
||||
|
||||
' Spessore sottopezzo
|
||||
Private m_dAdditionalTable As Double = 0
|
||||
@@ -154,6 +162,9 @@ Public Class CurrentMachine
|
||||
' Lista dei materiali
|
||||
Private m_Materials As New ObservableCollection(Of Material)
|
||||
|
||||
' Lista delle qualità di lavorazioni disponibili nel WaterJet
|
||||
Private m_Qualities As New ObservableCollection(Of String)
|
||||
|
||||
' Massimo id della lista materiali nel file ini
|
||||
Private m_MaxIdMat As Integer = 0
|
||||
|
||||
@@ -225,6 +236,12 @@ Public Class CurrentMachine
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Friend ReadOnly Property bDemo As Boolean
|
||||
Get
|
||||
Return m_bDemo
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Friend ReadOnly Property bProdLine As Boolean
|
||||
Get
|
||||
Return m_bProdLine
|
||||
@@ -422,6 +439,12 @@ Public Class CurrentMachine
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Friend ReadOnly Property bFromDBWaterJet As Boolean
|
||||
Get
|
||||
Return m_bFromDBWaterJet
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Friend ReadOnly Property ShowToolChanger As Integer
|
||||
Get
|
||||
Return m_nShowToolChanger
|
||||
@@ -586,6 +609,18 @@ Public Class CurrentMachine
|
||||
If WritePrivateProfileString(S_MACH_MACH, K_CURRSAWING, value, sMachIniFile) Then
|
||||
m_sCurrSawing = value
|
||||
m_MainWindow.m_CurrentProjectPageUC.MachiningTxBx.Text = value
|
||||
'' aggiorno il file ini della macchina con i valori correnti della lavorazione
|
||||
'Dim sVal As String = String.Empty
|
||||
'Dim dVal As Double = m_dFsevLength
|
||||
'If GetUserNote("FsevLength", sVal, m_sCurrSawing, False) Then
|
||||
' StringToDouble(sVal, dVal)
|
||||
' SetFsevLength(dVal)
|
||||
'End If
|
||||
'dVal = m_dFsevPerc
|
||||
'If GetUserNote("FsevPerc", sVal, m_sCurrSawing, False) Then
|
||||
' StringToDouble(sVal, m_dFsevPerc)
|
||||
' SetFsevPerc(dVal)
|
||||
'End If
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
@@ -700,6 +735,17 @@ Public Class CurrentMachine
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Friend Property sCurrWaterJettingQuality As String
|
||||
Get
|
||||
Return m_sCurrWaterJettingQuality
|
||||
End Get
|
||||
Set(value As String)
|
||||
If WritePrivateProfileString(S_MACH_MACH, K_CURRWATERJETTINGQUALITY, value, sMachIniFile) Then
|
||||
m_sCurrWaterJettingQuality = value
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Friend ReadOnly Property WaterJettingActive As Double
|
||||
Get
|
||||
Return m_bWaterJetting AndAlso Not String.IsNullOrWhiteSpace(m_sCurrWaterJetting)
|
||||
@@ -718,6 +764,7 @@ Public Class CurrentMachine
|
||||
End Select
|
||||
End Get
|
||||
Set(value As Double)
|
||||
Dim dValue As Double = 0
|
||||
Select Case GetCurrentTable()
|
||||
Case 3
|
||||
If Math.Abs(value - m_dTab3AdditionalTable) > EPS_SMALL And
|
||||
@@ -726,14 +773,24 @@ Public Class CurrentMachine
|
||||
m_dTab3AdditionalTable = value
|
||||
' Aggiorno il progetto corrente
|
||||
m_MainWindow.m_CurrentProjectPageUC.AdjustAdditionalTable()
|
||||
' salvo il valore della sovratavola nel progetto
|
||||
EgtGetInfo(EgtGetFirstNameInGroup(GDB_ID.ROOT, NAME_PROJMARK), K_TAB3_ADDITIONALTABLE, dValue)
|
||||
If Math.Abs(dValue - value) > EPS_SMALL Then
|
||||
EgtSetInfo(EgtGetFirstNameInGroup(GDB_ID.ROOT, NAME_PROJMARK), K_TAB3_ADDITIONALTABLE, value)
|
||||
End If
|
||||
End If
|
||||
Case 2
|
||||
Case 2
|
||||
If Math.Abs(value - m_dTab2AdditionalTable) > EPS_SMALL And
|
||||
WritePrivateProfileString(S_TABLE, K_TAB2_ADDITIONALTABLE, DoubleToString(value, 3), sMachIniFile) Then
|
||||
' Aggiorno il valore corrente
|
||||
m_dTab2AdditionalTable = value
|
||||
' Aggiorno il progetto corrente
|
||||
m_MainWindow.m_CurrentProjectPageUC.AdjustAdditionalTable()
|
||||
' salvo il valore della sovratavola nel progetto
|
||||
EgtGetInfo(EgtGetFirstNameInGroup(GDB_ID.ROOT, NAME_PROJMARK), K_TAB2_ADDITIONALTABLE, dValue)
|
||||
If Math.Abs(dValue - value) > EPS_SMALL Then
|
||||
EgtSetInfo(EgtGetFirstNameInGroup(GDB_ID.ROOT, NAME_PROJMARK), K_TAB2_ADDITIONALTABLE, value)
|
||||
End If
|
||||
End If
|
||||
Case Else
|
||||
If Math.Abs(value - m_dAdditionalTable) > EPS_SMALL And
|
||||
@@ -742,6 +799,11 @@ Public Class CurrentMachine
|
||||
m_dAdditionalTable = value
|
||||
' Aggiorno il progetto corrente
|
||||
m_MainWindow.m_CurrentProjectPageUC.AdjustAdditionalTable()
|
||||
' salvo il valore della sovratavola nel progetto
|
||||
EgtGetInfo(EgtGetFirstNameInGroup(GDB_ID.ROOT, NAME_PROJMARK), K_ADDITIONALTABLE, dValue)
|
||||
If Math.Abs(dValue - value) > EPS_SMALL Then
|
||||
EgtSetInfo(EgtGetFirstNameInGroup(GDB_ID.ROOT, NAME_PROJMARK), K_ADDITIONALTABLE, value)
|
||||
End If
|
||||
End If
|
||||
End Select
|
||||
End Set
|
||||
@@ -811,9 +873,18 @@ Public Class CurrentMachine
|
||||
Set(value As Double)
|
||||
If WritePrivateProfileString(S_NEST, K_MACH_CUTFSEVLEN, DoubleToString(value, 3), sMachIniFile) Then
|
||||
m_dFsevLength = value
|
||||
' salvo il dato nelle UserNote della lavorazione
|
||||
'MdbSetCurrMachiningUserNote("FsevLength", m_dFsevLength.ToString, sCurrSawing, false)
|
||||
' salvo il dato nelle UserNote dell'utensile
|
||||
TdbSetCurrToolUserNote("FsevLength", m_dFsevLength.ToString, sCurrSaw)
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
Friend Sub SetFsevLength(value As Double)
|
||||
If WritePrivateProfileString(S_NEST, K_MACH_CUTFSEVLEN, DoubleToString(value, 3), sMachIniFile) Then
|
||||
m_dFsevLength = value
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Friend Property dFsevPerc As Double
|
||||
Get
|
||||
@@ -822,9 +893,18 @@ Public Class CurrentMachine
|
||||
Set(value As Double)
|
||||
If WritePrivateProfileString(S_NEST, K_MACH_CUTFSEVPERC, DoubleToString(value, 3), sMachIniFile) Then
|
||||
m_dFsevPerc = value
|
||||
'' salvo il dato nelle UserNote della lavorazione
|
||||
'MdbSetCurrMachiningUserNote("FsevPerc", m_dFsevPerc.ToString, sCurrSawing)
|
||||
' salvo il dato nelle UserNote dell'utensile
|
||||
TdbSetCurrToolUserNote("FsevPerc", m_dFsevPerc.ToString, sCurrSaw)
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
Friend Sub SetFsevPerc(value As Double)
|
||||
If WritePrivateProfileString(S_NEST, K_MACH_CUTFSEVPERC, DoubleToString(value, 3), sMachIniFile) Then
|
||||
m_dFsevPerc = value
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Friend ReadOnly Property ToolChangerNbr As Integer
|
||||
Get
|
||||
@@ -894,6 +974,12 @@ Public Class CurrentMachine
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Friend ReadOnly Property Qualities As ObservableCollection(Of String)
|
||||
Get
|
||||
Return m_Qualities
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Friend Sub AddMaterial(value As Material)
|
||||
For Each Material As Material In Materials
|
||||
If Material.nId = value.nId Then
|
||||
@@ -975,7 +1061,11 @@ Public Class CurrentMachine
|
||||
End Get
|
||||
Set(value As Material)
|
||||
Dim CurrMatId As String = If(Not IsNothing(value), value.nId.ToString, "")
|
||||
WritePrivateProfileString(S_MATERIALS, K_CURRMATERIAL, CurrMatId, sMachIniFile)
|
||||
If bWaterJet And bFromDBWaterJet Then
|
||||
WritePrivateProfileString(S_MATERIALS, K_CURRMATERIAL, CurrMatId & If(Not IsNothing(value), "." & value.SubId, ""), sMachIniFile)
|
||||
Else
|
||||
WritePrivateProfileString(S_MATERIALS, K_CURRMATERIAL, CurrMatId, sMachIniFile)
|
||||
End If
|
||||
m_CurrMat = value
|
||||
End Set
|
||||
End Property
|
||||
@@ -1034,6 +1124,7 @@ Public Class CurrentMachine
|
||||
m_bProdLine = False
|
||||
EgtOutLog("Error - Production line requested but not key enabled")
|
||||
End If
|
||||
m_bDemo = (GetPrivateProfileInt(S_PRODUCTIONLINE, "Demo", 0, sMachIniFile) <> 0)
|
||||
GetPrivateProfileString(S_PRODUCTIONLINE, K_VARPROG1, "", m_sVarProg1, sMachIniFile)
|
||||
m_nProg1 = GetPrivateProfileInt(S_PRODUCTIONLINE, K_NAMEPROG1, 0, m_MainWindow.GetMachIniFile())
|
||||
GetPrivateProfileString(S_PRODUCTIONLINE, K_VARPROG2, "", m_sVarProg2, sMachIniFile)
|
||||
@@ -1072,6 +1163,8 @@ Public Class CurrentMachine
|
||||
' waterjet
|
||||
m_bWaterJet = (GetPrivateProfileInt(S_TOOLS, K_WATERJET, 0, sMachIniFile) > 0) And
|
||||
m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.ENABLE_WJ)
|
||||
' Leggo abilitazione DB WaterJet
|
||||
m_bFromDBWaterJet = (GetPrivateProfileInt(S_MATERIALS, K_FROMDBWATERJET, 0, sMachIniFile) > 0)
|
||||
' Leggo abilitazione visualizzazione TcPos, Head/exit e Note utente
|
||||
m_nShowToolChanger = GetPrivateProfileInt(S_TOOLS, K_SHOWTOOLCHANGER, 0, sMachIniFile)
|
||||
m_bShowHeadExit = (GetPrivateProfileInt(S_TOOLS, K_SHOWHEADEXIT, 0, sMachIniFile) > 0)
|
||||
@@ -1147,6 +1240,8 @@ Public Class CurrentMachine
|
||||
GetPrivateProfileString(S_MACH_MACH, K_CURRDRIPDRILLING, Nothing, m_sCurrDripDrilling, sMachIniFile)
|
||||
' waterjetting
|
||||
GetPrivateProfileString(S_MACH_MACH, K_CURRWATERJETTING, Nothing, m_sCurrWaterJetting, sMachIniFile)
|
||||
' waterjettingquality
|
||||
GetPrivateProfileString(S_MACH_MACH, K_CURRWATERJETTINGQUALITY, Nothing, m_sCurrWaterJettingQuality, sMachIniFile)
|
||||
|
||||
' Leggo numero di portautensili
|
||||
m_ToolChangerNbr = GetPrivateProfileInt(S_TOOLCHANGER, K_NUMBER, 0, sMachIniFile)
|
||||
@@ -1200,6 +1295,7 @@ Public Class CurrentMachine
|
||||
|
||||
' Leggo dati per feed ridotta all'inizio/fine dei tagli
|
||||
m_bFsevEnable = (GetPrivateProfileInt(S_NEST, K_MACH_CUTFSEVENABLE, 0, sMachIniFile) <> 0)
|
||||
' sposto la lettura nel DB delle lavorazioni della lama corrente!
|
||||
m_dFsevLength = GetPrivateProfileDouble(S_NEST, K_MACH_CUTFSEVLEN, 0, sMachIniFile)
|
||||
m_dFsevPerc = GetPrivateProfileDouble(S_NEST, K_MACH_CUTFSEVPERC, 0, sMachIniFile)
|
||||
|
||||
@@ -1208,27 +1304,255 @@ Public Class CurrentMachine
|
||||
' Leggo la lista dei materiali
|
||||
Dim Material As Material = Nothing
|
||||
Dim nIndex As Integer = 1
|
||||
While (GetPrivateProfileMaterial(S_MATERIALS, K_MATERIAL & nIndex, Material, sMachIniFile))
|
||||
m_Materials.Add(Material)
|
||||
nIndex += 1
|
||||
End While
|
||||
|
||||
If m_bWaterJet And m_bFromDBWaterJet Then
|
||||
LoadWJMaterial(True)
|
||||
Else
|
||||
While (GetPrivateProfileMaterial(S_MATERIALS, K_MATERIAL & nIndex, Material, sMachIniFile))
|
||||
m_Materials.Add(Material)
|
||||
nIndex += 1
|
||||
End While
|
||||
End If
|
||||
|
||||
' Salvo massimo indice a cui sono arrivato per usarlo quando devo aggiungere nuovi elementi alla lista
|
||||
m_MaxIdMat = nIndex - 1
|
||||
|
||||
' Leggo materiale correntemente attivo
|
||||
Dim CurrMatId As Integer = GetPrivateProfileInt(S_MATERIALS, K_CURRMATERIAL, 0, sMachIniFile)
|
||||
For Each Material In Materials
|
||||
If Material.nId = CurrMatId Then
|
||||
m_CurrMat = Material
|
||||
Exit For
|
||||
Dim sCurrMatId As String = String.Empty
|
||||
EgtUILib.GetPrivateProfileString(S_MATERIALS, K_CURRMATERIAL, "0", sCurrMatId, sMachIniFile)
|
||||
If bWaterJet And bFromDBWaterJet Then
|
||||
Dim sCurrMatIds As String()
|
||||
sCurrMatIds = sCurrMatId.Split("."c)
|
||||
If sCurrMatIds.Length > 1 Then
|
||||
Dim nCurrMatId As Integer
|
||||
Dim nCurrSubMatId As Integer
|
||||
If Not Integer.TryParse(sCurrMatIds(0), nCurrMatId) Then nCurrMatId = 0
|
||||
If Not Integer.TryParse(sCurrMatIds(1), nCurrSubMatId) Then nCurrSubMatId = 0
|
||||
For Each Material In Materials
|
||||
If Material.nId = nCurrMatId AndAlso Material.SubId = nCurrSubMatId Then
|
||||
m_CurrMat = Material
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
Next
|
||||
Else
|
||||
Dim nCurrMatId As Integer
|
||||
If Not Integer.TryParse(sCurrMatId, nCurrMatId) Then nCurrMatId = 0
|
||||
For Each Material In Materials
|
||||
If Material.nId = nCurrMatId Then
|
||||
m_CurrMat = Material
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
' leggo se la macchina ha il tastatore dello spessore tavola
|
||||
m_HasRawProbe = (GetPrivateProfileInt(S_MACH_PROBING, K_ENABLERAWPROBE, 1, sMachIniFile) <> 0)
|
||||
' leggo se la macchina ha il lettore di codice a barre della lastra
|
||||
m_nEnableBarCodeReader = GetPrivateProfileInt(S_MACH_BARCODEREADER, K_ENABLEBCR, 0, sMachIniFile)
|
||||
End Sub
|
||||
|
||||
Public Sub LoadWJMaterial(Optional bIsStart As Boolean = False)
|
||||
Dim TempCurrMat As Material = CurrMat
|
||||
' Svuoto l'attuale lista di materiali
|
||||
m_Materials.Clear()
|
||||
' Leggo valori da file Data e li carico nelle proprietà
|
||||
Dim sFilePath As String = sMachDir & "\" & MACHININGS_DIR & "\" & WATERJETDB_FILE
|
||||
Dim Local_MaterialList = New ObservableCollection(Of EgtWPFLib5.WjMaterial)
|
||||
Local_MaterialList = WaterjetDbWindowVM_OmagCUT.LoadWjMaterials(sFilePath)
|
||||
' definisco la lista delle qualità (solo se è vuota)
|
||||
If m_Qualities.Count < 1 Then
|
||||
m_Qualities.Add("Q1")
|
||||
m_Qualities.Add("Q2")
|
||||
m_Qualities.Add("Q3")
|
||||
m_Qualities.Add("Q4")
|
||||
m_Qualities.Add("Q5")
|
||||
m_Qualities.Add("QExtra")
|
||||
End If
|
||||
' inserisco il materiale generico di default -- IN SOSPESO
|
||||
'm_Materials.Add(New Material(0, "***", 0))
|
||||
' costruiscoi la lista
|
||||
Dim i As Integer = 0
|
||||
Dim sName As String = String.Empty
|
||||
For i = 0 To Local_MaterialList.Count - 1
|
||||
sName = Local_MaterialList(i).Name
|
||||
Dim j As Integer = 0
|
||||
For j = 0 To Local_MaterialList(i).SubMaterialList.Count - 1
|
||||
m_Materials.Add(New Material(i + 1, sName & "." & Local_MaterialList(i).SubMaterialList(j).Name, j + 1))
|
||||
Next
|
||||
Next
|
||||
If Not bIsStart Then CurrMat = TempCurrMat
|
||||
End Sub
|
||||
|
||||
Public Function GetMaxThicknessCurrMaterial(sCurMat As String) As Double
|
||||
Dim bFound As Boolean = False
|
||||
Dim dMaxThick As Double = 0
|
||||
' Leggo valori da file Data e li carico nelle proprietà
|
||||
Dim sFilePath As String = sMachDir & "\" & MACHININGS_DIR & "\" & WATERJETDB_FILE
|
||||
Dim Local_MaterialList = New ObservableCollection(Of EgtWPFLib5.WjMaterial)
|
||||
Local_MaterialList = WaterjetDbWindowVM_OmagCUT.LoadWjMaterials(sFilePath)
|
||||
Dim sItems() As String = sCurMat.Split("."c)
|
||||
If sItems.Count > 1 Then
|
||||
Dim sMat As String = sItems(0)
|
||||
Dim sSubMat As String = sItems(1)
|
||||
For Each ItemMat As EgtWPFLib5.WjMaterial In Local_MaterialList
|
||||
If ItemMat.Name = sMat Then
|
||||
For Each ItemSubMat As EgtWPFLib5.WjSubMaterial In ItemMat.SubMaterialList
|
||||
If ItemSubMat.Name = sSubMat Then
|
||||
For Each ItemParam As EgtWPFLib5.WjParam In ItemSubMat.ParamList
|
||||
Dim dParamThick As Double
|
||||
StringToDouble(ItemParam.Thickness, dParamThick)
|
||||
If dParamThick > dMaxThick Then
|
||||
dMaxThick = dParamThick
|
||||
End If
|
||||
Next
|
||||
bFound = True
|
||||
Exit For
|
||||
End If
|
||||
If bFound Then Exit For
|
||||
Next
|
||||
End If
|
||||
If bFound Then Exit For
|
||||
Next
|
||||
End If
|
||||
Return dMaxThick
|
||||
End Function
|
||||
|
||||
#Region "USERNOTE"
|
||||
|
||||
' recupero le note UserNote associate alla LAVORAZIONE Machining
|
||||
Friend Function MdbGetCurrMachiningUserNote(Machining As String) As String
|
||||
Dim UserNotes As String = String.Empty
|
||||
' lavorazione corrente
|
||||
Dim CurrMach As String = String.Empty
|
||||
EgtMdbGetCurrMachiningParam(MCH_MP.NAME, CurrMach)
|
||||
' Imposto utensile lama corrente
|
||||
If Not String.IsNullOrWhiteSpace(Machining) AndAlso EgtMdbSetCurrMachining(Machining) Then
|
||||
' leggo nel db corrente della lavorazione questa info
|
||||
EgtMdbGetCurrMachiningParam(MCH_MP.USERNOTES, UserNotes)
|
||||
' reimposto lavorazione corrente
|
||||
EgtMdbSetCurrMachining(CurrMach)
|
||||
End If
|
||||
Return UserNotes
|
||||
End Function
|
||||
|
||||
' recupero le note UserNote associate all'UTENSILE Tool
|
||||
Friend Function TdbGetCurrToolUserNote(Tool As String) As String
|
||||
Dim UserNotes As String = String.Empty
|
||||
' lavorazione corrente
|
||||
Dim CurrTool As String = String.Empty
|
||||
EgtTdbGetCurrToolParam(MCH_TP.NAME, CurrTool)
|
||||
' Imposto utensile lama corrente
|
||||
If Not String.IsNullOrWhiteSpace(Tool) AndAlso EgtTdbSetCurrTool(Tool) Then
|
||||
' leggo nel db corrente della lavorazione questa info
|
||||
EgtTdbGetCurrToolParam(MCH_TP.USERNOTES, UserNotes)
|
||||
' reimposto lavorazione corrente
|
||||
EgtTdbSetCurrTool(CurrTool)
|
||||
End If
|
||||
Return UserNotes
|
||||
End Function
|
||||
|
||||
' imposta il nuovo valore in UserNote della LAVORAZIONE Machining
|
||||
Friend Sub MdbSetCurrMachiningUserNote(sKeyUserNote As String, sValUserNote As String, Machining As String)
|
||||
' lavorazione corrente
|
||||
Dim CurrMach As String = String.Empty
|
||||
EgtMdbGetCurrMachiningParam(MCH_MP.NAME, CurrMach)
|
||||
' Imposto utensile lama corrente
|
||||
If Not String.IsNullOrWhiteSpace(Machining) AndAlso EgtMdbSetCurrMachining(Machining) Then
|
||||
Dim UserNotes As String = String.Empty
|
||||
' salvo nel db corrente della lavorazione questa info → devo gestire l'inserimento: sovrascrivo NON ESEGUE un APPEND delle info
|
||||
EgtMdbSetCurrMachiningParam(MCH_MP.USERNOTES, AssembUserNote(sKeyUserNote, sValUserNote, Machining))
|
||||
EgtMdbSaveCurrMachining()
|
||||
EgtMdbSave()
|
||||
' reimposto lavorazione corrente
|
||||
EgtMdbSetCurrMachining(CurrMach)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
' imposta il nuovo valore in UserNote dell'UTENSILE Tool
|
||||
Friend Sub TdbSetCurrToolUserNote(sKeyUserNote As String, sValUserNote As String, Tool As String)
|
||||
' lavorazione corrente
|
||||
Dim CurrTool As String = String.Empty
|
||||
EgtTdbGetCurrToolParam(MCH_TP.NAME, CurrTool)
|
||||
' Imposto utensile lama corrente
|
||||
If Not String.IsNullOrWhiteSpace(Tool) AndAlso EgtTdbSetCurrTool(Tool) Then
|
||||
Dim UserNotes As String = String.Empty
|
||||
' salvo nel db corrente della lavorazione questa info → devo gestire l'inserimento: sovrascrivo NON ESEGUE un APPEND delle info
|
||||
EgtTdbSetCurrToolParam(MCH_TP.USERNOTES, AssembUserNote(sKeyUserNote, sValUserNote, Tool))
|
||||
EgtTdbSaveCurrTool()
|
||||
EgtTdbSave()
|
||||
' reimposto lavorazione corrente
|
||||
EgtTdbSetCurrTool(Tool)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
' separa la le note UserNote della LAVORAZIONE
|
||||
Private Function SplitUserNoteMachinig(Machining As String) As String()
|
||||
Dim sUserNotes As String = MdbGetCurrMachiningUserNote(Machining)
|
||||
If String.IsNullOrEmpty(sUserNotes) Then Return Nothing
|
||||
Dim sItems As String() = sUserNotes.Split(";"c)
|
||||
Return sItems
|
||||
End Function
|
||||
|
||||
' separa la le note UserNote della LAVORAZIONE
|
||||
Private Function SplitUserNoteTool(Tool As String) As String()
|
||||
Dim sUserNotes As String = TdbGetCurrToolUserNote(Tool)
|
||||
If String.IsNullOrEmpty(sUserNotes) Then Return Nothing
|
||||
Dim sItems As String() = sUserNotes.Split(";"c)
|
||||
Return sItems
|
||||
End Function
|
||||
|
||||
' recupera il valore della associato alla chiave per la lavorazione oppure utensile (bIsToolNote)
|
||||
Friend Function GetUserNote(sKeyUserNote As String, ByRef sValUserNote As String, sName As String, Optional bIsToolNote As Boolean = True) As Boolean
|
||||
Dim sUserNotesList As String() = Nothing
|
||||
If bIsToolNote Then
|
||||
sUserNotesList = SplitUserNoteTool(sName)
|
||||
Else
|
||||
sUserNotesList = SplitUserNoteMachinig(sName)
|
||||
End If
|
||||
If IsNothing(sUserNotesList) Then Return False
|
||||
For Index As Integer = 0 To sUserNotesList.Count - 1
|
||||
Dim sNote As String() = sUserNotesList(Index).Split("="c)
|
||||
If sNote.Count = 2 AndAlso sNote(0).Trim = sKeyUserNote Then
|
||||
sValUserNote = sNote(1).Trim
|
||||
End If
|
||||
Next
|
||||
Return True
|
||||
End Function
|
||||
|
||||
' ricostruisce la stringa UserNote da salvare
|
||||
Friend Function AssembUserNote(sKeyUserNote As String, sValUserNote As String, sName As String, Optional bIsToolNote As Boolean = True) As String
|
||||
Dim sUserNotes As String = String.Empty
|
||||
Dim sUserNotesList As String() = Nothing
|
||||
If bIsToolNote Then
|
||||
sUserNotesList = SplitUserNoteTool(sName)
|
||||
Else
|
||||
sUserNotesList = SplitUserNoteMachinig(sName)
|
||||
End If
|
||||
Dim bExists As Boolean = False
|
||||
If Not IsNothing(sUserNotesList) Then
|
||||
For Index As Integer = 0 To sUserNotesList.Count - 1
|
||||
Dim sNote As String() = sUserNotesList(Index).Split("="c)
|
||||
If sNote.Count = 2 AndAlso sNote(0).Trim = sKeyUserNote Then
|
||||
sUserNotesList(Index) = sKeyUserNote & "=" & sValUserNote
|
||||
bExists = True
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
' riassemblo la stringa
|
||||
For Each Item As String In sUserNotesList
|
||||
If Not String.IsNullOrWhiteSpace(Item) Then
|
||||
sUserNotes &= Item & ";"
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
If Not bExists Then
|
||||
sUserNotes &= sKeyUserNote & "=" & sValUserNote & ";"
|
||||
End If
|
||||
Return sUserNotes
|
||||
End Function
|
||||
|
||||
#End Region ' USERNOTE
|
||||
|
||||
Friend Function IsVacuumMovePossible() As Boolean
|
||||
' Recupero diametro lama corrente
|
||||
EgtTdbSetCurrTool(sCurrSaw)
|
||||
@@ -1323,6 +1647,7 @@ Friend Class Material
|
||||
|
||||
Private m_nId As Integer
|
||||
Private m_sName As String
|
||||
Private m_SubId As Integer = 0
|
||||
|
||||
Public ReadOnly Property nId As Integer
|
||||
Get
|
||||
@@ -1339,6 +1664,15 @@ Friend Class Material
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property SubId As Integer
|
||||
Get
|
||||
Return m_SubId
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
m_SubId = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Sub New(sName As String, MaterialList As ObservableCollection(Of Material))
|
||||
Dim nMaxId As Integer = 0
|
||||
For Each Material As Material In MaterialList
|
||||
@@ -1355,4 +1689,11 @@ Friend Class Material
|
||||
m_sName = sName
|
||||
End Sub
|
||||
|
||||
Sub New(nId As Integer, sName As String, nSubId As Integer)
|
||||
m_nId = nId
|
||||
m_sName = sName
|
||||
m_SubId = nSubId
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
|
||||
@@ -0,0 +1,139 @@
|
||||
<Window x:Class="ImportExportMachiningWindowWD"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
|
||||
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
|
||||
FontFamily="{DynamicResource OmagCut_Font}"
|
||||
ResizeMode="NoResize" WindowStyle="None" AllowsTransparency="True" Background="Transparent"
|
||||
Title="SaveNameWD" Height="350" Width="426.5" ShowInTaskbar="False">
|
||||
<!--Definizione della pagina di scelta del nome con cui salvare il progetto-->
|
||||
<Border Style="{DynamicResource OmagCut_Border}">
|
||||
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="7*"/>
|
||||
<RowDefinition Height="2*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<ScrollViewer Grid.Row="0" Margin="20">
|
||||
<TreeView ItemsSource="{Binding FamilyList}" Background="{DynamicResource OmagCut_TreeViewBackGroundColor}">
|
||||
<TreeView.Resources>
|
||||
<HierarchicalDataTemplate DataType="{x:Type EgtWPFLib5:ImpExpMachiningFamily}" ItemsSource="{Binding MachiningList}">
|
||||
|
||||
<Grid Height="20">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Image Grid.Column="0" Source="{Binding PictureString}" Height="20" Width="20" Margin="0,0,5,0" />
|
||||
<TextBlock Grid.Column="1" Text="{Binding Name}" FontSize="15" Margin="0,-2,5,0" VerticalAlignment="Center" />
|
||||
|
||||
</Grid>
|
||||
|
||||
<!-- multibinding quando sono attivi.-->
|
||||
<HierarchicalDataTemplate.ItemContainerStyle>
|
||||
<Style TargetType="{x:Type TreeViewItem}" >
|
||||
<Setter Property="Foreground" Value="{DynamicResource OmagCut_TreeViewTextColor}" />
|
||||
<Setter Property="IsSelected" Value="{Binding IsSelected}" />
|
||||
<Setter Property="IsExpanded" Value="{Binding IsExpanded}" />
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type TreeViewItem}">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition MinWidth="19" Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition/>
|
||||
</Grid.RowDefinitions>
|
||||
<ToggleButton x:Name="Expander" ClickMode="Press" IsChecked="{Binding IsExpanded, RelativeSource={RelativeSource TemplatedParent}}" Style="{StaticResource ExpandCollapseToggleStyle}"/>
|
||||
<Border x:Name="Bd" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Grid.Column="1" Padding="{TemplateBinding Padding}" SnapsToDevicePixels="true">
|
||||
<ContentPresenter x:Name="PART_Header" ContentSource="Header" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
|
||||
</Border>
|
||||
<ItemsPresenter x:Name="ItemsHost" Grid.ColumnSpan="2" Grid.Column="1" Grid.Row="1"/>
|
||||
<Rectangle Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="4" HorizontalAlignment="Stretch" VerticalAlignment="Top" Fill="{DynamicResource OmagCut_TreeViewDelimiterColor}" Height="1" />
|
||||
</Grid>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="IsExpanded" Value="false">
|
||||
<Setter Property="Visibility" TargetName="ItemsHost" Value="Collapsed"/>
|
||||
</Trigger>
|
||||
<Trigger Property="HasItems" Value="false">
|
||||
<Setter Property="Visibility" TargetName="Expander" Value="Hidden"/>
|
||||
</Trigger>
|
||||
<Trigger Property="IsSelected" Value="true">
|
||||
<Setter Property="Background" TargetName="Bd" Value="{DynamicResource OmagCut_TreeViewSelectedItemBackground}" />
|
||||
<Setter Property="BorderBrush" TargetName="Bd" Value="{DynamicResource OmagCut_TreeViewSelectedItemBorder}"/>
|
||||
<Setter Property="BorderThickness" TargetName="Bd" Value="1"/>
|
||||
<!--<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.HighlightTextBrushKey}}"/>-->
|
||||
</Trigger>
|
||||
<!--<MultiTrigger>
|
||||
<MultiTrigger.Conditions>
|
||||
<Condition Property="IsSelected" Value="true"/>
|
||||
<Condition Property="IsSelectionActive" Value="false"/>
|
||||
</MultiTrigger.Conditions>
|
||||
<Setter Property="Background" TargetName="Bd" Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}"/>
|
||||
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
|
||||
</MultiTrigger>-->
|
||||
<Trigger Property="IsEnabled" Value="false">
|
||||
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
</HierarchicalDataTemplate.ItemContainerStyle>
|
||||
</HierarchicalDataTemplate>
|
||||
|
||||
<DataTemplate DataType="{x:Type EgtWPFLib5:ImpExpMachiningItem}">
|
||||
<Grid Height="20">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<!--<Image Grid.Column="0" Source="{Binding PictureString}" Height="32" Margin="0,8,6,4" />-->
|
||||
<CheckBox Name="ActiveTxBx" Grid.Column="0" Height="15" Width="15"
|
||||
Margin="-15,0,5,0" VerticalContentAlignment="Center"
|
||||
IsChecked="{Binding Active}"
|
||||
Visibility="{Binding Path=DataContext.Active_Visibility,
|
||||
RelativeSource={RelativeSource AncestorType={x:Type EgtWPFLib5:EgtCustomWindow}}}"/>
|
||||
<TextBlock Grid.Column="1" Text="{Binding Name}"
|
||||
Style="{StaticResource OmagCut_ListBoxTextBlock}" />
|
||||
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
|
||||
</TreeView.Resources>
|
||||
</TreeView>
|
||||
</ScrollViewer>
|
||||
|
||||
<Grid Grid.Column="1" Grid.Row="1">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Button Name="OkBtn" Grid.Row="0" Grid.Column="1" Style="{DynamicResource OmagCut_GradientBlueIconButton}"
|
||||
Margin="5,-10,5,15"
|
||||
Command="{Binding OkCommand}">
|
||||
<Image Source="{DynamicResource VImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="ExitBtn" Grid.Row="0" Grid.Column="3" Style="{DynamicResource OmagCut_GradientBlueIconButton}"
|
||||
Margin="5,-10,5,15"
|
||||
IsCancel="True">
|
||||
<Image Source="{DynamicResource XImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
||||
</Border>
|
||||
|
||||
</Window>
|
||||
@@ -0,0 +1,33 @@
|
||||
Imports EgtWPFLib5
|
||||
Public Class ImportExportMachiningWindowWD
|
||||
|
||||
Private m_MainWindow As MainWindow = DirectCast(Application.Current.MainWindow, MainWindow)
|
||||
|
||||
Private WithEvents m_ImportExportMachiningWindowVM As ImportExportMachiningWindowVM
|
||||
|
||||
Private m_OkResult As Boolean = False
|
||||
Public ReadOnly Property OkResult As Boolean
|
||||
Get
|
||||
Return m_OkResult
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Sub New(Owner As Window, ImportExportToolWindowVM As ImportExportMachiningWindowVM)
|
||||
Me.Owner = Owner
|
||||
' This call is required by the designer.
|
||||
InitializeComponent()
|
||||
Me.DataContext = ImportExportToolWindowVM
|
||||
' Assegno al riferimento locale al VM il VM preso dal DataContext
|
||||
m_ImportExportMachiningWindowVM = ImportExportToolWindowVM
|
||||
End Sub
|
||||
Private Sub OkCloseDialogWD() Handles OkBtn.Click
|
||||
m_OkResult = True
|
||||
Me.Close()
|
||||
End Sub
|
||||
|
||||
Private Sub CancelCloseDialogWD() Handles ExitBtn.Click
|
||||
m_OkResult = False
|
||||
Me.Close()
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,138 @@
|
||||
<Window x:Class="ImportExportToolWD"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
|
||||
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
|
||||
FontFamily="{DynamicResource OmagCut_Font}"
|
||||
ResizeMode="NoResize" WindowStyle="None" AllowsTransparency="True" Background="Transparent"
|
||||
Title="SaveNameWD" Height="350" Width="426.5" ShowInTaskbar="False">
|
||||
<!--Definizione della pagina di scelta del nome con cui salvare il progetto-->
|
||||
<Border Style="{DynamicResource OmagCut_Border}">
|
||||
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="7*"/>
|
||||
<RowDefinition Height="2*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<ScrollViewer Grid.Row="0" Margin="20">
|
||||
<TreeView ItemsSource="{Binding FamilyList}" Background="{DynamicResource OmagCut_TreeViewBackGroundColor}">
|
||||
<TreeView.Resources>
|
||||
<HierarchicalDataTemplate DataType="{x:Type EgtWPFLib5:ImpExpToolFamily}" ItemsSource="{Binding ToolList}">
|
||||
|
||||
<Grid Height="20">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Image Grid.Column="0" Source="{Binding PictureString}" Height="20" Width="20" Margin="0,0,5,0" />
|
||||
<TextBlock Grid.Column="1" Text="{Binding Name}" FontSize="15" Margin="0,-2,5,0" VerticalAlignment="Center" />
|
||||
|
||||
</Grid>
|
||||
<!-- multibinding quando sono attivi.-->
|
||||
<HierarchicalDataTemplate.ItemContainerStyle>
|
||||
<Style TargetType="{x:Type TreeViewItem}" >
|
||||
<Setter Property="Foreground" Value="{DynamicResource OmagCut_TreeViewTextColor}" />
|
||||
<Setter Property="IsSelected" Value="{Binding IsSelected}" />
|
||||
<Setter Property="IsExpanded" Value="{Binding IsExpanded}" />
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type TreeViewItem}">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition MinWidth="19" Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition/>
|
||||
</Grid.RowDefinitions>
|
||||
<ToggleButton x:Name="Expander" ClickMode="Press" IsChecked="{Binding IsExpanded, RelativeSource={RelativeSource TemplatedParent}}" Style="{StaticResource ExpandCollapseToggleStyle}"/>
|
||||
<Border x:Name="Bd" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Grid.Column="1" Padding="{TemplateBinding Padding}" SnapsToDevicePixels="true">
|
||||
<ContentPresenter x:Name="PART_Header" ContentSource="Header" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
|
||||
</Border>
|
||||
<ItemsPresenter x:Name="ItemsHost" Grid.ColumnSpan="2" Grid.Column="1" Grid.Row="1"/>
|
||||
<Rectangle Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="4" HorizontalAlignment="Stretch" VerticalAlignment="Top" Fill="{DynamicResource OmagCut_TreeViewDelimiterColor}" Height="1" />
|
||||
</Grid>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="IsExpanded" Value="false">
|
||||
<Setter Property="Visibility" TargetName="ItemsHost" Value="Collapsed"/>
|
||||
</Trigger>
|
||||
<Trigger Property="HasItems" Value="false">
|
||||
<Setter Property="Visibility" TargetName="Expander" Value="Hidden"/>
|
||||
</Trigger>
|
||||
<Trigger Property="IsSelected" Value="true">
|
||||
<Setter Property="Background" TargetName="Bd" Value="{DynamicResource OmagCut_TreeViewSelectedItemBackground}" />
|
||||
<Setter Property="BorderBrush" TargetName="Bd" Value="{DynamicResource OmagCut_TreeViewSelectedItemBorder}"/>
|
||||
<Setter Property="BorderThickness" TargetName="Bd" Value="1"/>
|
||||
<!--<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.HighlightTextBrushKey}}"/>-->
|
||||
</Trigger>
|
||||
<!--<MultiTrigger>
|
||||
<MultiTrigger.Conditions>
|
||||
<Condition Property="IsSelected" Value="true"/>
|
||||
<Condition Property="IsSelectionActive" Value="false"/>
|
||||
</MultiTrigger.Conditions>
|
||||
<Setter Property="Background" TargetName="Bd" Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}"/>
|
||||
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
|
||||
</MultiTrigger>-->
|
||||
<Trigger Property="IsEnabled" Value="false">
|
||||
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
</HierarchicalDataTemplate.ItemContainerStyle>
|
||||
</HierarchicalDataTemplate>
|
||||
|
||||
<DataTemplate DataType="{x:Type EgtWPFLib5:ImpExpToolItem}">
|
||||
<Grid Height="20">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<!--<Image Grid.Column="0" Source="{Binding PictureString}" Height="32" Margin="0,8,6,4" />-->
|
||||
<CheckBox Name="ActiveTxBx" Grid.Column="0" Height="15" Width="15"
|
||||
Margin="-15,0,5,0" VerticalContentAlignment="Center"
|
||||
IsChecked="{Binding Active}"
|
||||
Visibility="{Binding Path=DataContext.Active_Visibility,
|
||||
RelativeSource={RelativeSource AncestorType={x:Type EgtWPFLib5:EgtCustomWindow}}}"/>
|
||||
<TextBlock Grid.Column="1" Text="{Binding Name}"
|
||||
Style="{StaticResource OmagCut_ListBoxTextBlock}" />
|
||||
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
|
||||
</TreeView.Resources>
|
||||
</TreeView>
|
||||
</ScrollViewer>
|
||||
|
||||
<Grid Grid.Column="1" Grid.Row="1">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Button Name="OkBtn" Grid.Row="0" Grid.Column="1" Style="{DynamicResource OmagCut_GradientBlueIconButton}"
|
||||
Margin="5,-10,5,15"
|
||||
Command="{Binding OkCommand}">
|
||||
<Image Source="{DynamicResource VImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="ExitBtn" Grid.Row="0" Grid.Column="3" Style="{DynamicResource OmagCut_GradientBlueIconButton}"
|
||||
Margin="5,-10,5,15"
|
||||
IsCancel="True">
|
||||
<Image Source="{DynamicResource XImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
</Grid>
|
||||
|
||||
</Grid>
|
||||
|
||||
</Border>
|
||||
|
||||
</Window>
|
||||
@@ -0,0 +1,38 @@
|
||||
Imports EgtWPFLib5
|
||||
Public Class ImportExportToolWD
|
||||
|
||||
Private m_MainWindow As MainWindow = DirectCast(Application.Current.MainWindow, MainWindow)
|
||||
|
||||
Private WithEvents m_ImportExportToolWindowVM As ImportExportToolWindowVM
|
||||
|
||||
Private m_OkResult As Boolean = False
|
||||
Public ReadOnly Property OkResult As Boolean
|
||||
Get
|
||||
Return m_OkResult
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Sub New(Owner As Window, ImportExportToolWindowVM As ImportExportToolWindowVM)
|
||||
Me.Owner = Owner
|
||||
' This call is required by the designer.
|
||||
InitializeComponent()
|
||||
Me.DataContext = ImportExportToolWindowVM
|
||||
' Assegno al riferimento locale al VM il VM preso dal DataContext
|
||||
m_ImportExportToolWindowVM = ImportExportToolWindowVM
|
||||
End Sub
|
||||
|
||||
'Private Sub CloseWindow(bDialogResult As Boolean) Handles m_ImportExportToolWindowVM.m_CloseWindow
|
||||
' Me.DialogResult = bDialogResult
|
||||
'End Sub
|
||||
|
||||
Private Sub OkCloseDialogWD() Handles OkBtn.Click
|
||||
m_OkResult = True
|
||||
Me.Close()
|
||||
End Sub
|
||||
|
||||
Private Sub CancelCloseDialogWD() Handles ExitBtn.Click
|
||||
m_OkResult = False
|
||||
Me.Close()
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
@@ -24,9 +24,10 @@
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<ToggleButton Name="AlarmsBtn" Style="{DynamicResource OmagCut_YellowIconToggleButton}">
|
||||
@@ -38,11 +39,16 @@
|
||||
<ToggleButton Name="MachiningDBBtn" Grid.Column="2" Style="{DynamicResource OmagCut_YellowIconToggleButton}">
|
||||
<Image Source="{DynamicResource DB-utensiliImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||
</ToggleButton>
|
||||
<ToggleButton Name="PolishingsBtn" Grid.Column="3" Style="{DynamicResource OmagCut_YellowToggleButton}"></ToggleButton>
|
||||
<ToggleButton Name="TestingPageBtn" Grid.Column="4" Style="{DynamicResource OmagCut_YellowIconToggleButton}">
|
||||
<ToggleButton Name="PolishingsBtn" Grid.Column="3" Style="{DynamicResource OmagCut_BlueIconToggleButton}">
|
||||
<!--<Image Source="{DynamicResource LucidaturaImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>-->
|
||||
</ToggleButton>
|
||||
<ToggleButton Name="WaterJetBtn" Grid.Column="4" Style="{DynamicResource OmagCut_BlueIconToggleButton}">
|
||||
<!--<Image Source="{DynamicResource WaterJetImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>-->
|
||||
</ToggleButton>
|
||||
<ToggleButton Name="TestingPageBtn" Grid.Column="5" Style="{DynamicResource OmagCut_YellowIconToggleButton}">
|
||||
<Image Source="{DynamicResource MacchinaImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||
</ToggleButton>
|
||||
<ToggleButton Name="StatisticsBtn" Grid.Column="5" Style="{DynamicResource OmagCut_YellowToggleButton}">
|
||||
<ToggleButton Name="StatisticsBtn" Grid.Column="6" Style="{DynamicResource OmagCut_YellowToggleButton}">
|
||||
|
||||
</ToggleButton>
|
||||
|
||||
|
||||
@@ -10,6 +10,7 @@ Public Class MachinePageUC
|
||||
Friend m_ToolsDbPageUC As ToolsDbPageUC
|
||||
Friend m_MachiningDbPageUC As MachiningDbPageUC
|
||||
Friend m_PolishingsPageUC As PolishingsPageUC
|
||||
Friend m_WaterJetPageUC As WaterJetPageUC
|
||||
Friend m_MachineCNPageUC As MachineCNPageUC
|
||||
Friend m_StatisticsPageUC As StatisticsPageUC
|
||||
|
||||
@@ -21,6 +22,7 @@ Public Class MachinePageUC
|
||||
ToolsDb
|
||||
MachiningDb
|
||||
Polishings
|
||||
WaterJet
|
||||
MachineCN
|
||||
Statistics
|
||||
End Enum
|
||||
@@ -32,6 +34,7 @@ Public Class MachinePageUC
|
||||
m_ToolsDbPageUC = New ToolsDbPageUC
|
||||
m_MachiningDbPageUC = New MachiningDbPageUC
|
||||
m_PolishingsPageUC = New PolishingsPageUC
|
||||
m_WaterJetPageUC = New WaterJetPageUC
|
||||
m_MachineCNPageUC = New MachineCNPageUC
|
||||
m_StatisticsPageUC = New StatisticsPageUC
|
||||
|
||||
@@ -40,6 +43,7 @@ Public Class MachinePageUC
|
||||
m_ToolsDbPageUC.SetValue(Grid.RowProperty, 1)
|
||||
m_MachiningDbPageUC.SetValue(Grid.RowProperty, 1)
|
||||
m_PolishingsPageUC.SetValue(Grid.RowProperty, 1)
|
||||
m_WaterJetPageUC.SetValue(Grid.RowProperty, 1)
|
||||
m_MachineCNPageUC.SetValue(Grid.RowProperty, 1)
|
||||
m_StatisticsPageUC.SetValue(Grid.RowProperty, 1)
|
||||
|
||||
@@ -47,6 +51,7 @@ Public Class MachinePageUC
|
||||
ToolsDBBtn.ToolTip = EgtMsg(MSG_MACHINEPAGEUC + 6)
|
||||
MachiningDBBtn.ToolTip = EgtMsg(MSG_MACHINEPAGEUC + 7)
|
||||
PolishingsBtn.Content = EgtMsg(91090)
|
||||
WaterJetBtn.Content = EgtMsg(91128)
|
||||
TestingPageBtn.ToolTip = EgtMsg(MSG_MACHINEPAGEUC + 8)
|
||||
StatisticsBtn.Content = EgtMsg(90709)
|
||||
|
||||
@@ -55,10 +60,14 @@ Public Class MachinePageUC
|
||||
m_ActiveMachinePage = MachinePages.Alarms
|
||||
|
||||
' Se lucidature non abilitate, disattivo la pagina DB lucidature
|
||||
If Not m_MainWindow.m_CurrentMachine.bPolishing Then
|
||||
If Not m_MainWindow.m_CurrentMachine.bPolishing Then
|
||||
PolishingsBtn.IsEnabled = False
|
||||
End If
|
||||
|
||||
If Not m_MainWindow.m_CurrentMachine.bWaterJet Or Not m_MainWindow.m_CurrentMachine.bFromDBWaterJet Then
|
||||
WaterJetBtn.IsEnabled = False
|
||||
End If
|
||||
|
||||
' Se controllo numerico 0, disattivo la pagina macchina
|
||||
If GetPrivateProfileInt(S_NUMERICALCONTROL, K_TYPE, 0, m_MainWindow.GetMachIniFile()) = 0 Then
|
||||
TestingPageBtn.IsEnabled = False
|
||||
@@ -134,6 +143,22 @@ Public Class MachinePageUC
|
||||
MachinePageGrid.Children.Remove(m_PolishingsPageUC)
|
||||
MachinePageGrid.Children.Add(m_AlarmsPageUC)
|
||||
m_ActiveMachinePage = MachinePages.Alarms
|
||||
Case MachinePages.WaterJet
|
||||
' Verifica ed eventuale salvataggio Db Waterjet
|
||||
Dim nPressedBtn As Integer = DirectCast(m_WaterJetPageUC.DataContext, WaterjetDbWindowVM_OmagCUT).CloseWaterjetDb_OmagCut(m_MainWindow)
|
||||
If nPressedBtn = WaterjetDbWindowVM_OmagCUT.SaveWndBtnEnum.CANCEL Then
|
||||
AlarmsBtn.IsChecked = False
|
||||
WaterJetBtn.IsChecked = True
|
||||
Return
|
||||
ElseIf nPressedBtn = WaterjetDbWindowVM_OmagCUT.SaveWndBtnEnum.NO Then
|
||||
m_WaterJetPageUC.WaterJetPage_Reinitialize()
|
||||
End If
|
||||
' passo alla pagina Dati Macchina
|
||||
AlarmsBtn.IsChecked = True
|
||||
WaterJetBtn.IsChecked = False
|
||||
MachinePageGrid.Children.Remove(m_WaterJetPageUC)
|
||||
MachinePageGrid.Children.Add(m_AlarmsPageUC)
|
||||
m_ActiveMachinePage = MachinePages.Alarms
|
||||
Case MachinePages.MachineCN
|
||||
AlarmsBtn.IsChecked = True
|
||||
TestingPageBtn.IsChecked = False
|
||||
@@ -188,6 +213,22 @@ Public Class MachinePageUC
|
||||
MachinePageGrid.Children.Remove(m_PolishingsPageUC)
|
||||
MachinePageGrid.Children.Add(m_ToolsDbPageUC)
|
||||
m_ActiveMachinePage = MachinePages.ToolsDb
|
||||
Case MachinePages.WaterJet
|
||||
'Verifica ed eventuale salvataggio Db Waterjet
|
||||
Dim nPressedBtn As Integer = DirectCast(m_WaterJetPageUC.DataContext, WaterjetDbWindowVM_OmagCUT).CloseWaterjetDb_OmagCut(m_MainWindow)
|
||||
If nPressedBtn = WaterjetDbWindowVM_OmagCUT.SaveWndBtnEnum.CANCEL Then
|
||||
ToolsDBBtn.IsChecked = False
|
||||
WaterJetBtn.IsChecked = True
|
||||
Return
|
||||
ElseIf nPressedBtn = WaterjetDbWindowVM_OmagCUT.SaveWndBtnEnum.NO Then
|
||||
m_WaterJetPageUC.WaterJetPage_Reinitialize()
|
||||
End If
|
||||
' passo alla pagina Dati Macchina
|
||||
ToolsDBBtn.IsChecked = True
|
||||
WaterJetBtn.IsChecked = False
|
||||
MachinePageGrid.Children.Remove(m_WaterJetPageUC)
|
||||
MachinePageGrid.Children.Add(m_ToolsDbPageUC)
|
||||
m_ActiveMachinePage = MachinePages.ToolsDb
|
||||
Case MachinePages.MachineCN
|
||||
ToolsDBBtn.IsChecked = True
|
||||
TestingPageBtn.IsChecked = False
|
||||
@@ -242,6 +283,22 @@ Public Class MachinePageUC
|
||||
MachinePageGrid.Children.Remove(m_PolishingsPageUC)
|
||||
MachinePageGrid.Children.Add(m_MachiningDbPageUC)
|
||||
m_ActiveMachinePage = MachinePages.MachiningDb
|
||||
Case MachinePages.WaterJet
|
||||
' Verifica ed eventuale salvataggio Db Waterjet
|
||||
Dim nPressedBtn As Integer = DirectCast(m_WaterJetPageUC.DataContext, WaterjetDbWindowVM_OmagCUT).CloseWaterjetDb_OmagCut(m_MainWindow)
|
||||
If nPressedBtn = WaterjetDbWindowVM_OmagCUT.SaveWndBtnEnum.CANCEL Then
|
||||
MachiningDBBtn.IsChecked = False
|
||||
WaterJetBtn.IsChecked = True
|
||||
Return
|
||||
ElseIf nPressedBtn = WaterjetDbWindowVM_OmagCUT.SaveWndBtnEnum.NO Then
|
||||
m_WaterJetPageUC.WaterJetPage_Reinitialize()
|
||||
End If
|
||||
' passo alla pagina Dati Macchina
|
||||
MachiningDBBtn.IsChecked = True
|
||||
WaterJetBtn.IsChecked = False
|
||||
MachinePageGrid.Children.Remove(m_WaterJetPageUC)
|
||||
MachinePageGrid.Children.Add(m_MachiningDbPageUC)
|
||||
m_ActiveMachinePage = MachinePages.MachiningDb
|
||||
Case MachinePages.MachineCN
|
||||
MachiningDBBtn.IsChecked = True
|
||||
TestingPageBtn.IsChecked = False
|
||||
@@ -299,6 +356,22 @@ Public Class MachinePageUC
|
||||
m_ActiveMachinePage = MachinePages.Polishings
|
||||
Case MachinePages.Polishings
|
||||
PolishingsBtn.IsChecked = True
|
||||
Case MachinePages.WaterJet
|
||||
' Verifica ed eventuale salvataggio Db Waterjet
|
||||
Dim nPressedBtn As Integer = DirectCast(m_WaterJetPageUC.DataContext, WaterjetDbWindowVM_OmagCUT).CloseWaterjetDb_OmagCut(m_MainWindow)
|
||||
If nPressedBtn = WaterjetDbWindowVM_OmagCUT.SaveWndBtnEnum.CANCEL Then
|
||||
PolishingsBtn.IsChecked = False
|
||||
WaterJetBtn.IsChecked = True
|
||||
Return
|
||||
ElseIf nPressedBtn = WaterjetDbWindowVM_OmagCUT.SaveWndBtnEnum.NO Then
|
||||
m_WaterJetPageUC.WaterJetPage_Reinitialize()
|
||||
End If
|
||||
' passo alla pagina Dati Macchina
|
||||
PolishingsBtn.IsChecked = True
|
||||
WaterJetBtn.IsChecked = False
|
||||
MachinePageGrid.Children.Remove(m_WaterJetPageUC)
|
||||
MachinePageGrid.Children.Add(m_PolishingsPageUC)
|
||||
m_ActiveMachinePage = MachinePages.Polishings
|
||||
Case MachinePages.MachineCN
|
||||
PolishingsBtn.IsChecked = True
|
||||
TestingPageBtn.IsChecked = False
|
||||
@@ -314,6 +387,77 @@ Public Class MachinePageUC
|
||||
End Select
|
||||
End Sub
|
||||
|
||||
Private Sub WaterJetBtn_Click(sender As Object, e As RoutedEventArgs) Handles WaterJetBtn.Click
|
||||
Select Case m_ActiveMachinePage
|
||||
Case MachinePages.Alarms
|
||||
AlarmsBtn.IsChecked = False
|
||||
WaterJetBtn.IsChecked = True
|
||||
MachinePageGrid.Children.Remove(m_AlarmsPageUC)
|
||||
MachinePageGrid.Children.Add(m_WaterJetPageUC)
|
||||
m_ActiveMachinePage = MachinePages.WaterJet
|
||||
'DirectCast(m_WaterJetPageUC.DataContext, WaterjetDbWindowVM).RefreshDImensionPage()
|
||||
Case MachinePages.ToolsDb
|
||||
' Verifica ed eventuale salvataggio utensile corrente
|
||||
If Not m_ToolsDbPageUC.SaveCurrTool() Then
|
||||
PolishingsBtn.IsChecked = False
|
||||
ToolsDBBtn.IsChecked = True
|
||||
Return
|
||||
End If
|
||||
' salvo il DB utensili
|
||||
EgtSetCurrentContext(m_MainWindow.m_CurrentProjectPageUC.CurrentProjectScene.GetCtx())
|
||||
EgtTdbSave()
|
||||
' passo alla pagina WaterJet
|
||||
WaterJetBtn.IsChecked = True
|
||||
ToolsDBBtn.IsChecked = False
|
||||
MachinePageGrid.Children.Remove(m_ToolsDbPageUC)
|
||||
MachinePageGrid.Children.Add(m_WaterJetPageUC)
|
||||
m_ActiveMachinePage = MachinePages.WaterJet
|
||||
Case MachinePages.MachiningDb
|
||||
' Verifica ed eventuale salvataggio lavorazione corrente
|
||||
If Not m_MachiningDbPageUC.SaveCurrMachining() Then
|
||||
WaterJetBtn.IsChecked = False
|
||||
MachiningDBBtn.IsChecked = True
|
||||
Return
|
||||
End If
|
||||
' salvo il DB lavorazioni
|
||||
EgtSetCurrentContext(m_MainWindow.m_CurrentProjectPageUC.CurrentProjectScene.GetCtx())
|
||||
EgtMdbSave()
|
||||
' passo alla pagina WaterJet
|
||||
WaterJetBtn.IsChecked = True
|
||||
MachiningDBBtn.IsChecked = False
|
||||
MachinePageGrid.Children.Remove(m_MachiningDbPageUC)
|
||||
MachinePageGrid.Children.Add(m_WaterJetPageUC)
|
||||
m_ActiveMachinePage = MachinePages.WaterJet
|
||||
Case MachinePages.Polishings
|
||||
' Verifica ed eventuale salvataggio Lucidatura corrente
|
||||
If Not m_PolishingsPageUC.SaveKit() Then
|
||||
WaterJetBtn.IsChecked = False
|
||||
PolishingsBtn.IsChecked = True
|
||||
Return
|
||||
End If
|
||||
' passo alla pagina WaterJet
|
||||
WaterJetBtn.IsChecked = True
|
||||
PolishingsBtn.IsChecked = False
|
||||
MachinePageGrid.Children.Remove(m_PolishingsPageUC)
|
||||
MachinePageGrid.Children.Add(m_WaterJetPageUC)
|
||||
m_ActiveMachinePage = MachinePages.WaterJet
|
||||
Case MachinePages.WaterJet
|
||||
WaterJetBtn.IsChecked = True
|
||||
Case MachinePages.MachineCN
|
||||
WaterJetBtn.IsChecked = True
|
||||
TestingPageBtn.IsChecked = False
|
||||
MachinePageGrid.Children.Remove(m_MachineCNPageUC)
|
||||
MachinePageGrid.Children.Add(m_WaterJetPageUC)
|
||||
m_ActiveMachinePage = MachinePages.WaterJet
|
||||
Case MachinePages.Statistics
|
||||
WaterJetBtn.IsChecked = True
|
||||
StatisticsBtn.IsChecked = False
|
||||
MachinePageGrid.Children.Remove(m_StatisticsPageUC)
|
||||
MachinePageGrid.Children.Add(m_WaterJetPageUC)
|
||||
m_ActiveMachinePage = MachinePages.WaterJet
|
||||
End Select
|
||||
End Sub
|
||||
|
||||
Private Sub TestingPageBtn_Checked(sender As Object, e As RoutedEventArgs) Handles TestingPageBtn.Checked
|
||||
Select Case m_ActiveMachinePage
|
||||
Case MachinePages.Alarms
|
||||
@@ -367,6 +511,22 @@ Public Class MachinePageUC
|
||||
MachinePageGrid.Children.Remove(m_PolishingsPageUC)
|
||||
MachinePageGrid.Children.Add(m_MachineCNPageUC)
|
||||
m_ActiveMachinePage = MachinePages.MachineCN
|
||||
Case MachinePages.WaterJet
|
||||
' Verifica ed eventuale salvataggio Db Waterjet
|
||||
Dim nPressedBtn As Integer = DirectCast(m_WaterJetPageUC.DataContext, WaterjetDbWindowVM_OmagCUT).CloseWaterjetDb_OmagCut(m_MainWindow)
|
||||
If nPressedBtn = WaterjetDbWindowVM_OmagCUT.SaveWndBtnEnum.CANCEL Then
|
||||
TestingPageBtn.IsChecked = False
|
||||
WaterJetBtn.IsChecked = True
|
||||
Return
|
||||
ElseIf nPressedBtn = WaterjetDbWindowVM_OmagCUT.SaveWndBtnEnum.NO Then
|
||||
m_WaterJetPageUC.WaterJetPage_Reinitialize()
|
||||
End If
|
||||
' passo alla pagina Dati Macchina
|
||||
TestingPageBtn.IsChecked = True
|
||||
WaterJetBtn.IsChecked = False
|
||||
MachinePageGrid.Children.Remove(m_WaterJetPageUC)
|
||||
MachinePageGrid.Children.Add(m_MachineCNPageUC)
|
||||
m_ActiveMachinePage = MachinePages.MachineCN
|
||||
Case MachinePages.MachineCN
|
||||
TestingPageBtn.IsChecked = True
|
||||
Case MachinePages.Statistics
|
||||
@@ -431,6 +591,22 @@ Public Class MachinePageUC
|
||||
MachinePageGrid.Children.Remove(m_PolishingsPageUC)
|
||||
MachinePageGrid.Children.Add(m_StatisticsPageUC)
|
||||
m_ActiveMachinePage = MachinePages.Statistics
|
||||
Case MachinePages.WaterJet
|
||||
' Verifica ed eventuale salvataggio Db Waterjet
|
||||
Dim nPressedBtn As Integer = DirectCast(m_WaterJetPageUC.DataContext, WaterjetDbWindowVM_OmagCUT).CloseWaterjetDb_OmagCut(m_MainWindow)
|
||||
If nPressedBtn = WaterjetDbWindowVM_OmagCUT.SaveWndBtnEnum.CANCEL Then
|
||||
StatisticsBtn.IsChecked = False
|
||||
WaterJetBtn.IsChecked = True
|
||||
Return
|
||||
ElseIf nPressedBtn = WaterjetDbWindowVM_OmagCUT.SaveWndBtnEnum.NO Then
|
||||
m_WaterJetPageUC.WaterJetPage_Reinitialize()
|
||||
End If
|
||||
' passo alla pagina Dati Macchina
|
||||
TestingPageBtn.IsChecked = True
|
||||
WaterJetBtn.IsChecked = False
|
||||
MachinePageGrid.Children.Remove(m_WaterJetPageUC)
|
||||
MachinePageGrid.Children.Add(m_StatisticsPageUC)
|
||||
m_ActiveMachinePage = MachinePages.Statistics
|
||||
Case MachinePages.MachineCN
|
||||
StatisticsBtn.IsChecked = True
|
||||
TestingPageBtn.IsChecked = False
|
||||
@@ -467,6 +643,19 @@ Public Class MachinePageUC
|
||||
MachinePageGrid.Children.Remove(m_PolishingsPageUC)
|
||||
MachinePageGrid.Children.Add(m_AlarmsPageUC)
|
||||
m_ActiveMachinePage = MachinePages.Alarms
|
||||
Case MachinePages.WaterJet
|
||||
' Verifica ed eventuale salvataggio Lucidatura corrente
|
||||
'If Not m_PolishingsPageUC.SaveKit() Then
|
||||
' AlarmsBtn.IsChecked = False
|
||||
' PolishingsBtn.IsChecked = True
|
||||
' Return
|
||||
'End If
|
||||
' passo alla pagina Dati Macchina
|
||||
AlarmsBtn.IsChecked = True
|
||||
WaterJetBtn.IsChecked = False
|
||||
MachinePageGrid.Children.Remove(m_WaterJetPageUC)
|
||||
MachinePageGrid.Children.Add(m_AlarmsPageUC)
|
||||
m_ActiveMachinePage = MachinePages.Alarms
|
||||
Case MachinePages.MachineCN
|
||||
AlarmsBtn.IsChecked = True
|
||||
TestingPageBtn.IsChecked = False
|
||||
|
||||
@@ -423,8 +423,8 @@
|
||||
|
||||
<TextBlock Grid.Column="0" Name="ConsumptionNameTxBx" Text="A"
|
||||
Style="{StaticResource OmagCut_LowerBarTitleTextBlock}"/>
|
||||
<TextBlock Grid.Column="1" Name="ConsumptionTxBx" Text="25"
|
||||
Style="{StaticResource OmagCut_LowerBarValueTextBlock}"/>
|
||||
<TextBlock Grid.Column="1" Name="ConsumptionTxBx" Text="25.00"
|
||||
Style="{StaticResource OmagCut_LowerBarValueTextBlock}" FontSize="22"/>
|
||||
|
||||
</Grid>
|
||||
|
||||
|
||||
@@ -931,14 +931,16 @@
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="11*"/>
|
||||
<ColumnDefinition Width="10*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Button Name="NewBtn" Grid.Column="0" Style="{DynamicResource OmagCut_YellowGradientYellowTextButton}"/>
|
||||
<Button Name="SaveBtn" Grid.Column="1" Style="{DynamicResource OmagCut_YellowGradientYellowTextButton}"/>
|
||||
<Button Name="RemoveBtn" Grid.Column="2" Style="{DynamicResource OmagCut_YellowGradientYellowTextButton}" Padding="0"/>
|
||||
|
||||
<Button Name="ExportBtn" Grid.Column="4" Style="{DynamicResource OmagCut_YellowGradientYellowTextButton}"/>
|
||||
<Button Name="ImportBtn" Grid.Column="5" Style="{DynamicResource OmagCut_YellowGradientYellowTextButton}" Padding="0"/>
|
||||
</Grid>
|
||||
|
||||
</Grid>
|
||||
|
||||
@@ -3,6 +3,7 @@ Imports System.ComponentModel
|
||||
Imports OmagCUT.TreeViewItem
|
||||
Imports EgtUILib
|
||||
Imports EgtWPFLib
|
||||
Imports EgtWPFLib5
|
||||
|
||||
Public Class MachiningDbPageUC
|
||||
|
||||
@@ -78,6 +79,8 @@ Public Class MachiningDbPageUC
|
||||
NewBtn.Content = EgtMsg(MSG_MACHINEPAGEUC + 16)
|
||||
SaveBtn.Content = EgtMsg(MSG_MACHINEPAGEUC + 17)
|
||||
RemoveBtn.Content = EgtMsg(MSG_MACHINEPAGEUC + 18)
|
||||
ExportBtn.Content = "Export"
|
||||
ImportBtn.Content = "Import"
|
||||
|
||||
NameTxBl.Text = EgtMsg(MSG_MACHININGSDBPAGEUC + 1)
|
||||
DepthTxBl.Text = EgtMsg(MSG_MACHININGSDBPAGEUC + 2)
|
||||
@@ -321,6 +324,193 @@ Public Class MachiningDbPageUC
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub ExportBtn_Click(Sender As Object, e As RoutedEventArgs) Handles ExportBtn.Click
|
||||
' contesto corrente
|
||||
EgtSetCurrentContext(m_MainWindow.m_CurrentProjectPageUC.CurrentProjectScene.GetCtx())
|
||||
|
||||
' creo lista lavorazioni per esportazione
|
||||
Dim MachiningToExportList As New ObservableCollection(Of ImpExpMachiningFamily)
|
||||
Dim Family As CathegoryItem
|
||||
Dim Machining As CustomItem
|
||||
For Each Family In MachiningsList
|
||||
Dim ImpExpMachiningFamily As New ImpExpMachiningFamily(Family.Name, Family.nTType)
|
||||
For Each Machining In Family.Items
|
||||
ImpExpMachiningFamily.MachiningList.Add(New ImpExpMachiningItem(Machining.Name, False))
|
||||
Next
|
||||
MachiningToExportList.Add(ImpExpMachiningFamily)
|
||||
Next
|
||||
Dim ExportWndVM As New ImportExportMachiningWindowVM(MachiningToExportList, true)
|
||||
Dim ExportWnd As New ImportExportMachiningWindowWD(Application.Current.MainWindow, ExportWndVM)
|
||||
|
||||
ExportWnd.ShowDialog()
|
||||
End Sub
|
||||
|
||||
Private Sub ImoportBtn_Click() Handles ImportBtn.Click
|
||||
' contesto corrente
|
||||
EgtSetCurrentContext(m_MainWindow.m_CurrentProjectPageUC.CurrentProjectScene.GetCtx())
|
||||
' apro dialogo di scelta file
|
||||
Dim ImportFileDlg As New Microsoft.Win32.OpenFileDialog() With {
|
||||
.Title = EgtMsg(31161) & " " & EgtMsg(31163),
|
||||
.DefaultExt = ".data",
|
||||
.Filter = "Machinings (.data)|*.data",
|
||||
.CheckFileExists = True,
|
||||
.ValidateNames = True
|
||||
}
|
||||
If ImportFileDlg.ShowDialog() <> True Then Return
|
||||
Dim ImportFilePath As String = ImportFileDlg.FileName
|
||||
' recupero liste utensili da importare
|
||||
Dim ImportFileMachiningNameList As String() = Nothing
|
||||
Dim ImportFileMachiningFamilyList As Integer() = Nothing
|
||||
If Not EgtMdbToBeImported(ImportFilePath, ImportFileMachiningNameList, ImportFileMachiningFamilyList) Then Return
|
||||
' li inserisco in lista per finestra di scelta
|
||||
Dim MachinigToImportList As New ObservableCollection(Of ImpExpMachiningFamily)
|
||||
' creo famiglie di utensili in base a quelle trovate in lista importata
|
||||
For MachiningIndex As Integer = 0 To ImportFileMachiningNameList.Count - 1
|
||||
Dim MachiningName As String = ImportFileMachiningNameList(MachiningIndex)
|
||||
Dim MachiningFamily As Integer = ImportFileMachiningFamilyList(MachiningIndex)
|
||||
MachiningFamily = MachiningFamily And
|
||||
(MCH_MY.DRILLING Or
|
||||
MCH_MY.SAWING Or
|
||||
MCH_MY.MILLING Or
|
||||
MCH_MY.POCKETING Or
|
||||
MCH_MY.MORTISING Or
|
||||
MCH_MY.SAWROUGHING Or
|
||||
MCH_MY.SAWFINISHING Or
|
||||
MCH_MY.GENMACHINING Or
|
||||
MCH_MY.CHISELING Or
|
||||
MCH_MY.SURFROUGHING Or
|
||||
MCH_MY.SURFFINISHING Or
|
||||
MCH_MY.WATERJETTING)
|
||||
Dim bFounded As Boolean = False
|
||||
Dim MachinigToImportFamily As ImpExpMachiningFamily
|
||||
For Each MachinigToImportFamily In MachinigToImportList
|
||||
If (MachiningFamily = MachinigToImportFamily.FamilyType) Then
|
||||
MachinigToImportFamily.MachiningList.Add(New ImpExpMachiningItem(MachiningName, AlreadyExist(MachiningName)))
|
||||
bFounded = True
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
If Not bFounded Then
|
||||
Dim NewFamily As New ImpExpMachiningFamily(GetMachiningFamilyName(MachiningFamily), MachiningFamily)
|
||||
NewFamily.MachiningList.Add(New ImpExpMachiningItem(MachiningName, AlreadyExist(MachiningName)))
|
||||
MachinigToImportList.Add(NewFamily)
|
||||
End If
|
||||
Next
|
||||
Dim ImportWndVM As New ImportExportMachiningWindowVM(MachinigToImportList, False, ImportFilePath, ImportFileMachiningNameList)
|
||||
Dim ImportWnd As New ImportExportMachiningWindowWD(Application.Current.MainWindow, ImportWndVM)
|
||||
|
||||
ImportWnd.ShowDialog()
|
||||
' Aggiungo all'albero visualizzato gli utensili appena importati
|
||||
If ImportWnd.OkResult Then
|
||||
LoadImportedMachineMachinings(ImportWndVM.vsImported)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Function AlreadyExist(MachiningName As String) As Boolean
|
||||
Dim MachiningFamily As CathegoryItem
|
||||
For Each MachiningFamily In MachiningsList
|
||||
Dim MachiningItem As CustomItem
|
||||
For Each MachiningItem In MachiningFamily.Items
|
||||
If MachiningName = MachiningItem.Name Then
|
||||
Return True
|
||||
End If
|
||||
Next
|
||||
Next
|
||||
Return False
|
||||
End Function
|
||||
|
||||
Private Function GetMachiningFamilyName(NewMachinigFamily As Integer) As String
|
||||
Dim MachiningFamily As CathegoryItem
|
||||
For Each MachiningFamily In MachiningsList
|
||||
If NewMachinigFamily = MachiningFamily.nTType Then
|
||||
Return MachiningFamily.Name
|
||||
End If
|
||||
Next
|
||||
Return ""
|
||||
End Function
|
||||
|
||||
Private Sub LoadImportedMachineMachinings(vsImportedMachinings As String())
|
||||
' Leggo tutte le lavorazioni presenti nella Macchina (quindi anche quelli appena importati).
|
||||
Dim ActiveMachiningsFamilies() As MachiningsType = MyReadMachiningFamilies(m_MainWindow.m_CurrentMachine.sMachIniFile)
|
||||
Dim MachiningsFamilyIndex As Integer = 0
|
||||
Dim MachiningsFamilyItem As MachiningsType
|
||||
For Each MachiningsFamilyItem In ActiveMachiningsFamilies
|
||||
Dim FamilyTreeView As New CathegoryItem(MachiningsFamilyItem.Name, MachiningsFamilyItem.Id)
|
||||
Dim MachiningFamilyItem = MachiningsList.FirstOrDefault(Function(MachiningFamily) MachiningsFamilyItem.Id = MachiningFamily.nTType)
|
||||
If IsNothing(MachiningFamilyItem) Then
|
||||
MachiningsList.Insert(MachiningsFamilyIndex, FamilyTreeView)
|
||||
End If
|
||||
Dim nType As Integer = 0
|
||||
Dim MachiningName As String = String.Empty
|
||||
Dim MachiningIndex As Integer = 0
|
||||
EgtSetCurrentContext(m_MainWindow.m_CurrentProjectPageUC.CurrentProjectScene.GetCtx())
|
||||
Dim bFound As Boolean = EgtMdbGetFirstMachining(MachiningsFamilyItem.Id, MachiningName)
|
||||
While bFound
|
||||
Dim MachiningItem = MachiningsList(MachiningsFamilyIndex).Items.FirstOrDefault(Function(Machining) Machining.Name = MachiningName)
|
||||
Dim bInList As Boolean = vsImportedMachinings.Contains(MachiningName)
|
||||
If bInList Then
|
||||
' Se una lavorazione è presente nella MachiningsList visualizzata ma nel contempo è nell'array vsImported
|
||||
' vuol dire che è stata sovrascritta perciò la rimuovo
|
||||
MachiningsList(MachiningsFamilyIndex).Items.Remove(MachiningsList(MachiningsFamilyIndex).Items.FirstOrDefault(Function(Machining) Machining.Name = MachiningName))
|
||||
End If
|
||||
If bInList OrElse IsNothing(MachiningItem) Then
|
||||
' recupero tuuid
|
||||
EgtMdbSetCurrMachining(MachiningName)
|
||||
Dim sCurrMachTUUID As String = String.Empty
|
||||
EgtMdbGetCurrMachiningParam(MCH_MP.TUUID, sCurrMachTUUID)
|
||||
' aggiungo la lavorazione importata
|
||||
MachiningsList(MachiningsFamilyIndex).Items.Insert(MachiningIndex, New CustomItem(MachiningName, MachiningsFamilyItem.Id, ToolDbUtility.IsToolInDb(sCurrMachTUUID)))
|
||||
' eventualmente evidezio l'ultimo elemento inserito (ERRORE: non espando l'albero)
|
||||
'MachiningsList(MachiningsFamilyIndex).Items(MachiningIndex).IsSelected = True
|
||||
End If
|
||||
MachiningIndex += 1
|
||||
bFound = EgtMdbGetNextMachining(MachiningsFamilyItem.Id, MachiningName)
|
||||
End While
|
||||
MachiningsFamilyIndex += 1
|
||||
Next
|
||||
End Sub
|
||||
|
||||
Public Function MyReadMachiningFamilies(sMachineIniPath As String) As MachiningsType()
|
||||
Dim ActiveMachiningsFamiliesList As New List(Of MachiningsType)
|
||||
' Se il materiale lavorato è Marmo l'ordine di lettura e inserimento di Foratura e Taglio di lama nelle famiglie di lavorazioni attive è invertito
|
||||
|
||||
If EgtUILib.GetPrivateProfileInt(S_MACHININGS, K_SAWING, 0, sMachineIniPath) <> 0 Then
|
||||
ActiveMachiningsFamiliesList.Add(New MachiningsType With {.Id = MCH_MY.SAWING, .Name = EgtMsg(31200 + 2)})
|
||||
End If
|
||||
If EgtUILib.GetPrivateProfileInt(S_MACHININGS, K_DRILLING, 0, sMachineIniPath) <> 0 Then
|
||||
ActiveMachiningsFamiliesList.Add(New MachiningsType With {.Id = MCH_MY.DRILLING, .Name = EgtMsg(31200 + 1)})
|
||||
End If
|
||||
|
||||
If EgtUILib.GetPrivateProfileInt(S_MACHININGS, K_MILLING, 0, sMachineIniPath) <> 0 Then
|
||||
ActiveMachiningsFamiliesList.Add(New MachiningsType With {.Id = MCH_MY.MILLING, .Name = EgtMsg(31200 + 3)})
|
||||
End If
|
||||
If EgtUILib.GetPrivateProfileInt(S_MACHININGS, K_POCKETING, 0, sMachineIniPath) <> 0 Then
|
||||
ActiveMachiningsFamiliesList.Add(New MachiningsType With {.Id = MCH_MY.POCKETING, .Name = EgtMsg(31200 + 4)})
|
||||
End If
|
||||
If EgtUILib.GetPrivateProfileInt(S_MACHININGS, K_MORTISING, 0, sMachineIniPath) <> 0 Then
|
||||
ActiveMachiningsFamiliesList.Add(New MachiningsType With {.Id = MCH_MY.MORTISING, .Name = EgtMsg(31200 + 5)})
|
||||
End If
|
||||
If EgtUILib.GetPrivateProfileInt(S_MACHININGS, K_SAWROUGHING, 0, sMachineIniPath) <> 0 Then
|
||||
ActiveMachiningsFamiliesList.Add(New MachiningsType With {.Id = MCH_MY.SAWROUGHING, .Name = EgtMsg(31200 + 6)})
|
||||
End If
|
||||
If EgtUILib.GetPrivateProfileInt(S_MACHININGS, K_SAWFINISHING, 0, sMachineIniPath) <> 0 Then
|
||||
ActiveMachiningsFamiliesList.Add(New MachiningsType With {.Id = MCH_MY.SAWFINISHING, .Name = EgtMsg(31200 + 7)})
|
||||
End If
|
||||
If EgtUILib.GetPrivateProfileInt(S_MACHININGS, K_GENMACHINING, 0, sMachineIniPath) <> 0 Then
|
||||
ActiveMachiningsFamiliesList.Add(New MachiningsType With {.Id = MCH_MY.GENMACHINING, .Name = EgtMsg(31200 + 8)})
|
||||
End If
|
||||
If EgtUILib.GetPrivateProfileInt(S_MACHININGS, K_CHISELING, 0, sMachineIniPath) <> 0 Then
|
||||
ActiveMachiningsFamiliesList.Add(New MachiningsType With {.Id = MCH_MY.CHISELING, .Name = EgtMsg(31200 + 9)})
|
||||
End If
|
||||
If EgtUILib.GetPrivateProfileInt(S_MACHININGS, K_SURFFINISHING, 0, sMachineIniPath) <> 0 Then
|
||||
ActiveMachiningsFamiliesList.Add(New MachiningsType With {.Id = MCH_MY.SURFFINISHING, .Name = EgtMsg(31211)})
|
||||
End If
|
||||
If EgtUILib.GetPrivateProfileInt(S_MACHININGS, K_WATERJETTING, 0, sMachineIniPath) <> 0 Then
|
||||
ActiveMachiningsFamiliesList.Add(New MachiningsType With {.Id = MCH_MY.WATERJETTING, .Name = EgtMsg(31210)})
|
||||
End If
|
||||
Return ActiveMachiningsFamiliesList.ToArray
|
||||
End Function
|
||||
|
||||
Private Sub InitializeMachiningFamily(bEnabled As Boolean, nFType As Integer, sFName As String)
|
||||
If Not bEnabled Then Return
|
||||
' Inserisco categoria ed eventuali elementi
|
||||
@@ -362,12 +552,15 @@ Public Class MachiningDbPageUC
|
||||
HeadSideCmBx.SelectedIndex = ToolInt - 1
|
||||
EgtMdbGetCurrMachiningParam(MCH_MP.LEADINTYPE, ToolInt)
|
||||
If LeadInTypeCmBx.Items.Count > 0 Then
|
||||
LeadInTypeCmBx.SelectedItem = LeadInTypeCmBx.Items(0)
|
||||
LeadInTypeCmBx.SelectedItem = LeadInTypeCmBx.Items(0)
|
||||
Else
|
||||
LeadInTypeCmBx.SelectedItem = Nothing
|
||||
End If
|
||||
For Each LInType As IdNameStruct In LeadInTypeCmBx.Items
|
||||
If ToolInt = LInType.Id Then LeadInTypeCmBx.SelectedItem = LInType
|
||||
If ToolInt = LInType.Id Then
|
||||
LeadInTypeCmBx.SelectedItem = LInType
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
EgtMdbGetCurrMachiningParam(MCH_MP.EXTLINKTYPE, ToolInt)
|
||||
ExtLinkTypeCmBx.SelectedIndex = ToolInt
|
||||
@@ -515,7 +708,11 @@ Public Class MachiningDbPageUC
|
||||
' Lista materiali
|
||||
m_MaterialsList.Clear()
|
||||
For Each Material As Material In m_MainWindow.m_CurrentMachine.Materials
|
||||
m_MaterialsList.Add(New MachiningMaterial(Material.nId, Material.sName))
|
||||
If m_MainWindow.m_CurrentMachine.bWaterJet And m_MainWindow.m_CurrentMachine.bFromDBWaterJet Then
|
||||
m_MaterialsList.Add(New MachiningMaterial(Material.nId, Material.sName, Material.SubId))
|
||||
Else
|
||||
m_MaterialsList.Add(New MachiningMaterial(Material.nId, Material.sName))
|
||||
End If
|
||||
Next
|
||||
EgtMdbGetCurrMachiningParam(MCH_MP.SYSNOTES, ToolString)
|
||||
If ToolString <> String.Empty Then
|
||||
@@ -523,14 +720,30 @@ Public Class MachiningDbPageUC
|
||||
Dim Index As Integer = 0
|
||||
For Each Material As MachiningMaterial In m_MaterialsList
|
||||
Dim Param() As String = sItems(Index).Split(",".ToCharArray)
|
||||
Dim SubParam() As String = Param(0).Split(".".ToCharArray)
|
||||
Dim nParId As Integer = 0
|
||||
If StringToInt(Param(0), nParId) AndAlso nParId = Material.nId Then
|
||||
StringToDouble(Param(1), Material.dMinThickness)
|
||||
StringToDouble(Param(2), Material.dMaxThickness)
|
||||
Material.VerifyIfActive()
|
||||
Index += 1
|
||||
Dim nSubParId As Integer = 0
|
||||
If m_MainWindow.m_CurrentMachine.bWaterJet And m_MainWindow.m_CurrentMachine.bFromDBWaterJet Then
|
||||
If StringToInt(SubParam(0), nParId) AndAlso nParId = Material.nId AndAlso SubParam.Count > 1 AndAlso
|
||||
StringToInt(SubParam(1), nSubParId) AndAlso nSubParId = Material.nSubId Then
|
||||
|
||||
StringToDouble(Param(1), Material.dMinThickness)
|
||||
StringToDouble(Param(2), Material.dMaxThickness)
|
||||
Material.VerifyIfActive()
|
||||
Index += 1
|
||||
Else
|
||||
Material.VerifyIfActive()
|
||||
End If
|
||||
Else
|
||||
Material.VerifyIfActive()
|
||||
If StringToInt(Param(0), nParId) AndAlso nParId = Material.nId Then
|
||||
|
||||
StringToDouble(Param(1), Material.dMinThickness)
|
||||
StringToDouble(Param(2), Material.dMaxThickness)
|
||||
Material.VerifyIfActive()
|
||||
Index += 1
|
||||
Else
|
||||
Material.VerifyIfActive()
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
@@ -609,13 +822,13 @@ Public Class MachiningDbPageUC
|
||||
' Parmetri nascosti di svuotatura
|
||||
If nMachiningType = MCH_MY.POCKETING Then
|
||||
EgtMdbSetCurrMachiningParam(MCH_MP.SUBTYPE, MCH_POCK_SUB.SPIRALOUT)
|
||||
EgtMdbSetCurrMachiningParam( MCH_MP.LEADINTYPE, MCH_POCK_LI.HELIX)
|
||||
' EgtMdbSetCurrMachiningParam( MCH_MP.LEADINTYPE, MCH_POCK_LI.HELIX)
|
||||
Dim dToolDiam As Double = 100
|
||||
If Not IsNothing(ToolCmBx.SelectedItem) Then
|
||||
EgtTdbSetCurrTool( ToolCmBx.SelectedItem.ToString())
|
||||
EgtTdbGetCurrToolParam( MCH_TP.DIAM, dToolDiam)
|
||||
End If
|
||||
EgtMdbSetCurrMachiningParam( MCH_MP.LITANG, 0.495 * dToolDiam)
|
||||
EgtMdbSetCurrMachiningParam(MCH_MP.LITANG, 0.99 * dToolDiam)
|
||||
EgtMdbSetCurrMachiningParam( MCH_MP.LIELEV, 2.0)
|
||||
End If
|
||||
' Parametri WaterJetting
|
||||
@@ -684,8 +897,14 @@ Public Class MachiningDbPageUC
|
||||
' Scrivo stringa materiali da lista
|
||||
Dim sMaterialString As String = String.Empty
|
||||
For Each Material As MachiningMaterial In m_MaterialsList
|
||||
If Material.bIsActive Then
|
||||
sMaterialString += Material.nId.ToString & "," & DoubleToString(Material.dMinThickness, 0) & "," & DoubleToString(Material.dMaxThickness, 0) & ";"
|
||||
If m_MainWindow.m_CurrentMachine.bWaterJet And m_MainWindow.m_CurrentMachine.bFromDBWaterJet Then
|
||||
If Material.bIsActive Then
|
||||
sMaterialString += Material.nId.ToString & "." & Material.nSubId.ToString & "," & DoubleToString(Material.dMinThickness, 0) & "," & DoubleToString(Material.dMaxThickness, 0) & ";"
|
||||
End If
|
||||
Else
|
||||
If Material.bIsActive Then
|
||||
sMaterialString += Material.nId.ToString & "," & DoubleToString(Material.dMinThickness, 0) & "," & DoubleToString(Material.dMaxThickness, 0) & ";"
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
EgtMdbSetCurrMachiningParam(MCH_MP.SYSNOTES, sMaterialString)
|
||||
@@ -922,30 +1141,26 @@ Public Class MachiningDbPageUC
|
||||
' Definizione della grid TypeGrd con la giusta altezza e numero di righe
|
||||
Dim RowNum As Integer = TypeGrd.RowDefinitions.Count
|
||||
If RowNum > 2 Then
|
||||
' elimino eventuali righe in eccesso
|
||||
For Index As Integer = RowNum - 1 To 2 Step -1
|
||||
TypeGrd.RowDefinitions.RemoveAt(Index)
|
||||
Next
|
||||
LeadInTypeTxBl.SetValue(Grid.ColumnProperty, 2)
|
||||
LeadInTypeCmBx.SetValue(Grid.ColumnProperty, 3)
|
||||
LeadOutTypeTxBl.SetValue(Grid.RowProperty, 1)
|
||||
LeadOutTypeTxBl.SetValue(Grid.ColumnProperty, 2)
|
||||
LeadOutTypeCmBx.SetValue(Grid.RowProperty, 1)
|
||||
LeadOutTypeCmBx.SetValue(Grid.ColumnProperty, 3)
|
||||
TypeBrd.SetValue(Grid.RowProperty, 12)
|
||||
TypeBrd.SetValue(Grid.RowSpanProperty, 6)
|
||||
ElseIf RowNum < 2 Then
|
||||
' costruiso una riga in più da inserire
|
||||
Dim Row As New RowDefinition
|
||||
TypeGrd.RowDefinitions.Add(Row)
|
||||
LeadInTypeTxBl.SetValue(Grid.ColumnProperty, 2)
|
||||
LeadInTypeCmBx.SetValue(Grid.ColumnProperty, 3)
|
||||
LeadOutTypeTxBl.SetValue(Grid.RowProperty, 1)
|
||||
LeadOutTypeTxBl.SetValue(Grid.ColumnProperty, 2)
|
||||
LeadOutTypeCmBx.SetValue(Grid.RowProperty, 1)
|
||||
LeadOutTypeCmBx.SetValue(Grid.ColumnProperty, 3)
|
||||
TypeBrd.SetValue(Grid.RowProperty, 12)
|
||||
TypeBrd.SetValue(Grid.RowSpanProperty, 6)
|
||||
End If
|
||||
LeadInTypeTxBl.SetValue(Grid.RowProperty, 1)
|
||||
LeadInTypeTxBl.SetValue(Grid.ColumnProperty, 0)
|
||||
LeadInTypeCmBx.SetValue(Grid.RowProperty, 1)
|
||||
LeadInTypeCmBx.SetValue(Grid.ColumnProperty, 1)
|
||||
LeadOutTypeTxBl.SetValue(Grid.RowProperty, 1)
|
||||
LeadOutTypeTxBl.SetValue(Grid.ColumnProperty, 2)
|
||||
LeadOutTypeCmBx.SetValue(Grid.RowProperty, 1)
|
||||
LeadOutTypeCmBx.SetValue(Grid.ColumnProperty, 3)
|
||||
TypeBrd.SetValue(Grid.RowProperty, 12)
|
||||
TypeBrd.SetValue(Grid.RowSpanProperty, 6)
|
||||
|
||||
LeadInTypeTxBl.Visibility = Windows.Visibility.Visible
|
||||
LeadInTypeCmBx.Visibility = Windows.Visibility.Visible
|
||||
ExtLinkTypeTxBl.Visibility = Windows.Visibility.Hidden
|
||||
@@ -1563,7 +1778,7 @@ Public Class MachiningDbPageUC
|
||||
StepTypeTxBl.Visibility = Windows.Visibility.Hidden
|
||||
StepTypeCmBx.Visibility = Windows.Visibility.Hidden
|
||||
SideBrd.SetValue(Grid.RowProperty, 9)
|
||||
SideBrd.Visibility = Windows.Visibility.Visible
|
||||
SideBrd.Visibility = Windows.Visibility.Hidden
|
||||
WorkSideTxBl.Visibility = Windows.Visibility.Hidden
|
||||
WorkSideCmBx.Visibility = Windows.Visibility.Hidden
|
||||
HeadSideTxBl.Visibility = Windows.Visibility.Hidden
|
||||
@@ -1575,15 +1790,22 @@ Public Class MachiningDbPageUC
|
||||
For Index As Integer = RowNum - 1 To 2 Step -1
|
||||
TypeGrd.RowDefinitions.RemoveAt(Index)
|
||||
Next
|
||||
LeadInTypeTxBl.SetValue(Grid.ColumnProperty, 2)
|
||||
LeadInTypeCmBx.SetValue(Grid.ColumnProperty, 3)
|
||||
LeadOutTypeTxBl.SetValue(Grid.RowProperty, 1)
|
||||
LeadOutTypeTxBl.SetValue(Grid.ColumnProperty, 2)
|
||||
LeadOutTypeCmBx.SetValue(Grid.RowProperty, 1)
|
||||
LeadOutTypeCmBx.SetValue(Grid.ColumnProperty, 3)
|
||||
TypeBrd.SetValue(Grid.RowProperty, 12)
|
||||
TypeBrd.SetValue(Grid.RowSpanProperty, 6)
|
||||
ElseIf RowNum < 2 Then
|
||||
' costruiso una riga in più da inserire
|
||||
Dim Row As New RowDefinition
|
||||
TypeGrd.RowDefinitions.Add(Row)
|
||||
End If
|
||||
LeadInTypeTxBl.SetValue(Grid.RowProperty, 1)
|
||||
LeadInTypeTxBl.SetValue(Grid.ColumnProperty, 0)
|
||||
LeadInTypeCmBx.SetValue(Grid.RowProperty, 1)
|
||||
LeadInTypeCmBx.SetValue(Grid.ColumnProperty, 1)
|
||||
LeadOutTypeTxBl.SetValue(Grid.RowProperty, 1)
|
||||
LeadOutTypeTxBl.SetValue(Grid.ColumnProperty, 2)
|
||||
LeadOutTypeCmBx.SetValue(Grid.RowProperty, 1)
|
||||
LeadOutTypeCmBx.SetValue(Grid.ColumnProperty, 3)
|
||||
TypeBrd.SetValue(Grid.RowProperty, 12)
|
||||
TypeBrd.SetValue(Grid.RowSpanProperty, 6)
|
||||
|
||||
LeadInTypeTxBl.Visibility = Windows.Visibility.Visible
|
||||
LeadInTypeCmBx.Visibility = Windows.Visibility.Visible
|
||||
ExtLinkTypeTxBl.Visibility = Windows.Visibility.Hidden
|
||||
@@ -2068,6 +2290,16 @@ Public Class MachiningDbPageUC
|
||||
|
||||
Private Sub MaxThicknessTxBx_EgtClosed(sender As Object, e As EventArgs) Handles MaxThicknessTxBx.EgtClosed
|
||||
Dim SelectedMaterial As MachiningMaterial = MaterialsList.SelectedItem
|
||||
Dim dMaxThick As Double = 0
|
||||
If m_MainWindow.m_CurrentMachine.bWaterJet And m_MainWindow.m_CurrentMachine.bFromDBWaterJet Then
|
||||
' solo per water jet controllo lo spessore massimo ammissibile
|
||||
dMaxThick = m_MainWindow.m_CurrentMachine.GetMaxThicknessCurrMaterial(SelectedMaterial.Name)
|
||||
Dim dVal As Double
|
||||
StringToLen(MaxThicknessTxBx.Text, dVal)
|
||||
If dVal > dMaxThick Then
|
||||
MaxThicknessTxBx.Text = LenToString(dMaxThick, 3)
|
||||
End If
|
||||
End If
|
||||
StringToLen(MaxThicknessTxBx.Text, SelectedMaterial.dMaxThickness)
|
||||
SelectedMaterial.VerifyIfActive()
|
||||
End Sub
|
||||
@@ -2143,7 +2375,6 @@ Public Class MachiningDbPageUC
|
||||
Case MCH_MY.POCKETING
|
||||
LeadInTypeCmBx.ItemsSource = New ObservableCollection(Of IdNameStruct)(
|
||||
{New IdNameStruct(MCH_POCK_LI.NONE, EgtMsg(MSG_COMBOBOXPARAM + 42)),
|
||||
New IdNameStruct(MCH_POCK_LI.GLIDE, EgtMsg(MSG_COMBOBOXPARAM + 48)),
|
||||
New IdNameStruct(MCH_POCK_LI.ZIGZAG, EgtMsg(MSG_COMBOBOXPARAM + 38)),
|
||||
New IdNameStruct(MCH_POCK_LI.HELIX, EgtMsg(MSG_COMBOBOXPARAM + 49))})
|
||||
LeadOutTypeCmBx.ItemsSource = New ObservableCollection(Of IdNameStruct)(
|
||||
@@ -2215,6 +2446,7 @@ Class MachiningMaterial
|
||||
Implements INotifyPropertyChanged
|
||||
|
||||
Private m_nId As Integer
|
||||
Private m_nSubId As Integer
|
||||
Private m_sName As String
|
||||
Private m_dMinThickness As Double
|
||||
Private m_dMaxThickness As Double
|
||||
@@ -2226,6 +2458,12 @@ Class MachiningMaterial
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property nSubId As Integer
|
||||
Get
|
||||
Return m_nSubId
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property Name As String
|
||||
Get
|
||||
Return m_sName
|
||||
@@ -2264,6 +2502,15 @@ Class MachiningMaterial
|
||||
m_bIsActive = False
|
||||
End Sub
|
||||
|
||||
Sub New(nId As Integer, sName As String, nSubId As Integer)
|
||||
m_nId = nId
|
||||
m_nSubId = nSubId
|
||||
m_sName = sName
|
||||
m_dMinThickness = 0
|
||||
m_dMaxThickness = 0
|
||||
m_bIsActive = False
|
||||
End Sub
|
||||
|
||||
Public Sub VerifyIfActive()
|
||||
Dim bIsActive As Boolean = ( m_dMaxThickness > m_dMinThickness + EPS_SMALL)
|
||||
If bIsActive <> m_bIsActive Then
|
||||
|
||||
@@ -158,6 +158,9 @@
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
@@ -165,10 +168,12 @@
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<!--Decrizione immagini-->
|
||||
<Border Grid.Row="1" Grid.Column="1" Margin="10">
|
||||
<Image Source="../Resources/Contour.png" Stretch="Uniform"/>
|
||||
</Border>
|
||||
@@ -178,24 +183,45 @@
|
||||
<Border Grid.Row="3" Grid.Column="1" Margin="10">
|
||||
<Image Source="../Resources/ZigZagY.png" Stretch="Uniform"/>
|
||||
</Border>
|
||||
<Border Grid.Row="4" Grid.Column="1" Margin="10">
|
||||
<Image Source="../Resources/Spiral.png" Stretch="Uniform"/>
|
||||
</Border>
|
||||
|
||||
<TextBlock Name="MotionTxBl" Grid.Row="0" Grid.Column="1" Style="{DynamicResource OmagCut_ToolsDBTextBlock}" Margin="30,0" HorizontalAlignment="Center"/>
|
||||
<TextBlock Name="RepeatTxBl" Grid.Row="0" Grid.Column="2" Style="{DynamicResource OmagCut_ToolsDBTextBlock}" Margin="30,0" HorizontalAlignment="Center"/>
|
||||
<TextBlock Name="StepTxBl" Grid.Row="0" Grid.Column="3" Style="{DynamicResource OmagCut_ToolsDBTextBlock}" Margin="30,0" HorizontalAlignment="Center"/>
|
||||
<TextBlock Name="OffSetTxBl" Grid.Row="0" Grid.Column="4" Style="{DynamicResource OmagCut_ToolsDBTextBlock}" Margin="30,0" HorizontalAlignment="Center"/>
|
||||
<!--Titolazione colonne-->
|
||||
<TextBlock Name="MotionTxBl" Grid.Row="0" Grid.Column="1" Style="{DynamicResource OmagCut_ToolsDBTextBlock}" Margin="5,0" HorizontalAlignment="Center"/>
|
||||
<TextBlock Name="RepeatTxBl" Grid.Row="0" Grid.Column="2" Style="{DynamicResource OmagCut_ToolsDBTextBlock}" Margin="5,0" HorizontalAlignment="Center"/>
|
||||
<TextBlock Name="StepTxBl" Grid.Row="0" Grid.Column="3" Style="{DynamicResource OmagCut_ToolsDBTextBlock}" Margin="5,0" HorizontalAlignment="Center"/>
|
||||
<TextBlock Name="OffSetTxBl" Grid.Row="0" Grid.Column="4" Style="{DynamicResource OmagCut_ToolsDBTextBlock}" Margin="5,0" HorizontalAlignment="Center"/>
|
||||
<TextBlock Name="RadiusTxBl" Grid.Row="0" Grid.Column="5" Style="{DynamicResource OmagCut_ToolsDBTextBlock}" Margin="5,0" HorizontalAlignment="Center"/>
|
||||
<TextBlock Name="DistanceTxBl" Grid.Row="0" Grid.Column="6" Style="{DynamicResource OmagCut_ToolsDBTextBlock}" Margin="5,0" HorizontalAlignment="Center"/>
|
||||
|
||||
<EgtWPFLib:EgtTextBox Name="ContourTxBx" Grid.Row="1" Grid.Column="2" Style="{DynamicResource OmagCut_CalculatorTextBox}" Margin="30,0"/>
|
||||
<EgtWPFLib:EgtTextBox Name="OffContourTxBx" Grid.Row="1" Grid.Column="4" Style="{DynamicResource OmagCut_CalculatorTextBox}" Margin="30,0"/>
|
||||
<!--Contornatura-->
|
||||
<EgtWPFLib:EgtTextBox Name="ContourTxBx" Grid.Row="1" Grid.Column="2" Style="{DynamicResource OmagCut_CalculatorTextBox}" Margin="10,0"/>
|
||||
<EgtWPFLib:EgtTextBox Name="OffContourTxBx" Grid.Row="1" Grid.Column="4" Style="{DynamicResource OmagCut_CalculatorTextBox}" Margin="10,0"/>
|
||||
|
||||
<EgtWPFLib:EgtTextBox Name="ZigZagXTxBx" Grid.Row="2" Grid.Column="2" Style="{DynamicResource OmagCut_CalculatorTextBox}" Margin="30,0"/>
|
||||
<EgtWPFLib:EgtTextBox Name="StepXTxBx" Grid.Row="2" Grid.Column="3" Style="{DynamicResource OmagCut_CalculatorTextBox}" Margin="30,0"/>
|
||||
<EgtWPFLib:EgtTextBox Name="OffZigZagXTxBx" Grid.Row="2" Grid.Column="4" Style="{DynamicResource OmagCut_CalculatorTextBox}" Margin="30,0"/>
|
||||
|
||||
<EgtWPFLib:EgtTextBox Name="ZigZagYTxBx" Grid.Row="3" Grid.Column="2" Style="{DynamicResource OmagCut_CalculatorTextBox}" Margin="30,0"/>
|
||||
<EgtWPFLib:EgtTextBox Name="StepYTxBx" Grid.Row="3" Grid.Column="3" Style="{DynamicResource OmagCut_CalculatorTextBox}" Margin="30,0"/>
|
||||
<EgtWPFLib:EgtTextBox Name="OffZigZagYTxBx" Grid.Row="3" Grid.Column="4" Style="{DynamicResource OmagCut_CalculatorTextBox}" Margin="30,0"/>
|
||||
<!--Cammino orizzontale X-->
|
||||
<EgtWPFLib:EgtTextBox Name="ZigZagXTxBx" Grid.Row="2" Grid.Column="2" Style="{DynamicResource OmagCut_CalculatorTextBox}" Margin="10,0"/>
|
||||
<EgtWPFLib:EgtTextBox Name="StepXTxBx" Grid.Row="2" Grid.Column="3" Style="{DynamicResource OmagCut_CalculatorTextBox}" Margin="10,0"/>
|
||||
<EgtWPFLib:EgtTextBox Name="OffZigZagXTxBx" Grid.Row="2" Grid.Column="4" Style="{DynamicResource OmagCut_CalculatorTextBox}" Margin="10,0"/>
|
||||
<EgtWPFLib:EgtTextBox Name="RadiusXTxBx" Grid.Row="2" Grid.Column="5" Style="{DynamicResource OmagCut_CalculatorTextBox}" Margin="10,0" Visibility="Collapsed"/>
|
||||
<EgtWPFLib:EgtTextBox Name="DistanceXTxBx" Grid.Row="2" Grid.Column="6" Style="{DynamicResource OmagCut_CalculatorTextBox}" Margin="10,0" Visibility="Collapsed"/>
|
||||
|
||||
<GroupBox Name="LiLoGpBx" Grid.Row="4" Grid.Column="1" Grid.RowSpan="2" Grid.ColumnSpan="3" Style="{DynamicResource OmagCut_GroupBox}">
|
||||
<!--Cammino verticale Y-->
|
||||
<EgtWPFLib:EgtTextBox Name="ZigZagYTxBx" Grid.Row="3" Grid.Column="2" Style="{DynamicResource OmagCut_CalculatorTextBox}" Margin="10,0"/>
|
||||
<EgtWPFLib:EgtTextBox Name="StepYTxBx" Grid.Row="3" Grid.Column="3" Style="{DynamicResource OmagCut_CalculatorTextBox}" Margin="10,0"/>
|
||||
<EgtWPFLib:EgtTextBox Name="OffZigZagYTxBx" Grid.Row="3" Grid.Column="4" Style="{DynamicResource OmagCut_CalculatorTextBox}" Margin="10,0"/>
|
||||
<EgtWPFLib:EgtTextBox Name="RadiusYTxBx" Grid.Row="3" Grid.Column="5" Style="{DynamicResource OmagCut_CalculatorTextBox}" Margin="10,0" Visibility="Collapsed"/>
|
||||
<EgtWPFLib:EgtTextBox Name="DistanceYTxBx" Grid.Row="3" Grid.Column="6" Style="{DynamicResource OmagCut_CalculatorTextBox}" Margin="10,0" Visibility="Collapsed"/>
|
||||
|
||||
<!--Cammino a spirale-->
|
||||
<EgtWPFLib:EgtTextBox Name="SpiralTxBx" Grid.Row="4" Grid.Column="2" Style="{DynamicResource OmagCut_CalculatorTextBox}" Margin="10,0"/>
|
||||
<EgtWPFLib:EgtTextBox Name="StepSpiralTxBx" Grid.Row="4" Grid.Column="3" Style="{DynamicResource OmagCut_CalculatorTextBox}" Margin="10,0"/>
|
||||
<EgtWPFLib:EgtTextBox Name="OffSpiralTxBx" Grid.Row="4" Grid.Column="4" Style="{DynamicResource OmagCut_CalculatorTextBox}" Margin="10,0"/>
|
||||
<EgtWPFLib:EgtTextBox Name="RadiusSpiralTxBx" Grid.Row="4" Grid.Column="5" Style="{DynamicResource OmagCut_CalculatorTextBox}" Margin="10,0"/>
|
||||
<EgtWPFLib:EgtTextBox Name="DistanceSpiralTxBx" Grid.Row="4" Grid.Column="6" Style="{DynamicResource OmagCut_CalculatorTextBox}" Margin="10,0"/>
|
||||
|
||||
<!--Parametri di lavoro condivisi-->
|
||||
<GroupBox Name="LiLoGpBx" Grid.Row="5" Grid.Column="1" Grid.RowSpan="2" Grid.ColumnSpan="5" Style="{DynamicResource OmagCut_GroupBox}">
|
||||
<Grid Name="LiLoGrd">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
@@ -212,11 +238,11 @@
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<TextBlock Name="LiLenTxBl" Grid.Row="1" Grid.Column="0" Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="LiLenTxBx" Grid.Row="1" Grid.Column="1" Style="{DynamicResource OmagCut_CalculatorTextBox}" Margin="30,0"/>
|
||||
<EgtWPFLib:EgtTextBox Name="LiLenTxBx" Grid.Row="1" Grid.Column="1" Style="{DynamicResource OmagCut_CalculatorTextBox}" Margin="10,0"/>
|
||||
<TextBlock Name="LiHeightTxBl" Grid.Row="1" Grid.Column="2" Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="LiHeightTxBx" Grid.Row="1" Grid.Column="3" Style="{DynamicResource OmagCut_CalculatorTextBox}" Margin="30,0"/>
|
||||
<EgtWPFLib:EgtTextBox Name="LiHeightTxBx" Grid.Row="1" Grid.Column="3" Style="{DynamicResource OmagCut_CalculatorTextBox}" Margin="10,0"/>
|
||||
<TextBlock Name="LiLoadTxBl" Grid.Row="3" Grid.Column="0" Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="LiLoadTxBx" Grid.Row="3" Grid.Column="1" Style="{DynamicResource OmagCut_CalculatorTextBox}" Margin="30,0"/>
|
||||
<EgtWPFLib:EgtTextBox Name="LiLoadTxBx" Grid.Row="3" Grid.Column="1" Style="{DynamicResource OmagCut_CalculatorTextBox}" Margin="10,0"/>
|
||||
|
||||
</Grid>
|
||||
</GroupBox>
|
||||
|
||||
+427
-101
@@ -61,6 +61,8 @@ Public Class PolishingsPageUC
|
||||
RepeatTxBl.Text = EgtMsg(91093) ' Ripetizioni
|
||||
StepTxBl.Text = EgtMsg(90787) ' Passo
|
||||
OffSetTxBl.Text = EgtMsg(91089) ' Offset
|
||||
RadiusTxBl.Text = "Raggio"
|
||||
DistanceTxBl.Text = "Distanza"
|
||||
LiLoGpBx.Header = EgtMsg(91094) ' Attacco/Uscita
|
||||
LiLenTxBl.Text = EgtMsg(91097) ' Lunghezza
|
||||
LiHeightTxBl.Text = EgtMsg(91095) ' Altezza
|
||||
@@ -452,7 +454,9 @@ Public Class PolishingsPageUC
|
||||
If KitMachItem.m_IsModifiedId OrElse KitMachItem.m_IsModifiedToolUUID OrElse KitMachItem.m_IsModifiedToolName OrElse KitMachItem.m_IsModifiedSelTool OrElse
|
||||
KitMachItem.m_IsModifiedActive OrElse KitMachItem.m_IsModifiedContour OrElse KitMachItem.m_IsModifiedOffCnt OrElse KitMachItem.m_IsModifiedZigZagX OrElse
|
||||
KitMachItem.m_IsModifiedOffZigZagX OrElse KitMachItem.m_IsModifiedZigZagY OrElse KitMachItem.m_IsModifiedStepX OrElse KitMachItem.m_IsModifiedStepY OrElse
|
||||
KitMachItem.m_IsModifiedOffZigZagY OrElse KitMachItem.m_IsModifiedLiLen OrElse KitMachItem.m_IsModifiedLiHeight OrElse KitMachItem.m_IsModifiedLiLoad Then
|
||||
KitMachItem.m_IsModifiedOffZigZagY OrElse KitMachItem.m_IsModifiedSpiral OrElse KitMachItem.m_IsModifiedOffSpiral OrElse KitMachItem.m_IsModifiedStepSpiral OrElse
|
||||
KitMachItem.m_IsModifiedRadiusSpiral OrElse KitMachItem.m_IsModifiedDistanceSpiral OrElse KitMachItem.m_IsModifiedLiLen OrElse KitMachItem.m_IsModifiedLiHeight OrElse
|
||||
KitMachItem.m_IsModifiedLiLoad Then
|
||||
Return True
|
||||
End If
|
||||
Next
|
||||
@@ -476,10 +480,19 @@ Public Class PolishingsPageUC
|
||||
KitMachItem.m_IsModifiedOffCnt = False
|
||||
KitMachItem.m_IsModifiedZigZagX = False
|
||||
KitMachItem.m_IsModifiedOffZigZagX = False
|
||||
KitMachItem.m_IsModifiedRadiusX = False
|
||||
KitMachItem.m_IsModifiedDistanceX = False
|
||||
KitMachItem.m_IsModifiedZigZagY = False
|
||||
KitMachItem.m_IsModifiedOffZigZagY = False
|
||||
KitMachItem.m_IsModifiedRadiusY = False
|
||||
KitMachItem.m_IsModifiedDistanceY = False
|
||||
KitMachItem.m_IsModifiedSpiral = False
|
||||
KitMachItem.m_IsModifiedOffSpiral = False
|
||||
KitMachItem.m_IsModifiedRadiusSpiral = False
|
||||
KitMachItem.m_IsModifiedDistanceSpiral = False
|
||||
KitMachItem.m_IsModifiedStepX = False
|
||||
KitMachItem.m_IsModifiedStepY = False
|
||||
KitMachItem.m_IsModifiedStepSpiral = False
|
||||
KitMachItem.m_IsModifiedLiLen = False
|
||||
KitMachItem.m_IsModifiedLiHeight = False
|
||||
KitMachItem.m_IsModifiedLiLoad = False
|
||||
@@ -493,20 +506,29 @@ Public Class PolishingsPageUC
|
||||
OffContourTxBx.Text = LenToString(kmShow.dOffsetCnt, 3)
|
||||
ZigZagXTxBx.Text = kmShow.nZigZagX.ToString()
|
||||
OffZigZagXTxBx.Text = LenToString(kmShow.dOffZigZagX, 3)
|
||||
StepXTxBx.Text = LenToString( kmShow.dStepX, 3)
|
||||
StepXTxBx.Text = LenToString(kmShow.dStepX, 3)
|
||||
RadiusXTxBx.Text = LenToString(kmShow.dRadiusX, 3)
|
||||
DistanceXTxBx.Text = LenToString(kmShow.dDistanceX, 3)
|
||||
ZigZagYTxBx.Text = kmShow.nZigZagY.ToString()
|
||||
OffZigZagYTxBx.Text = LenToString(kmShow.dOffZigZagY, 3)
|
||||
StepYTxBx.Text = LenToString( kmShow.dStepY, 3)
|
||||
LiLenTxBx.Text = LenToString( kmShow.dLiLen, 3)
|
||||
LiHeightTxBx.Text = LenToString( kmShow.dLiHeight, 3)
|
||||
LiLoadTxBx.Text = LenToString( kmShow.dLiLoad, 3)
|
||||
StepYTxBx.Text = LenToString(kmShow.dStepY, 3)
|
||||
RadiusYTxBx.Text = LenToString(kmShow.dRadiusY, 3)
|
||||
DistanceYTxBx.Text = LenToString(kmShow.dDistanceY, 3)
|
||||
SpiralTxBx.Text = kmShow.nSpiral.ToString()
|
||||
StepSpiralTxBx.Text = LenToString(kmShow.dStepSpiral, 3)
|
||||
OffSpiralTxBx.Text = LenToString(kmShow.dOffSpiral, 3)
|
||||
RadiusSpiralTxBx.Text = LenToString(kmShow.dRadiusSpiral, 3)
|
||||
DistanceSpiralTxBx.Text = LenToString(kmShow.dDistanceSpiral, 3)
|
||||
LiLenTxBx.Text = LenToString(kmShow.dLiLen, 3)
|
||||
LiHeightTxBx.Text = LenToString(kmShow.dLiHeight, 3)
|
||||
LiLoadTxBx.Text = LenToString(kmShow.dLiLoad, 3)
|
||||
End Sub
|
||||
|
||||
Private Sub KitMachsLstBx_SelectionChanged(sender As Object, e As SelectionChangedEventArgs) Handles KitMachsLstBx.SelectionChanged
|
||||
Dim SelectedKitMach As KitMach = KitMachsLstBx.SelectedItem
|
||||
If Not IsNothing(SelectedKitMach) Then
|
||||
' visualizzo i parametri relativi al KitMach selezionato
|
||||
ShowKitMach( SelectedKitMach)
|
||||
ShowKitMach(SelectedKitMach)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
@@ -520,14 +542,16 @@ Public Class PolishingsPageUC
|
||||
End Sub
|
||||
|
||||
Private Sub OffContourTxBx_EgtClosed(sender As Object, e As EventArgs) Handles OffContourTxBx.EgtClosed
|
||||
Dim nTemp As Integer = 0
|
||||
Dim dTemp As Double = 0
|
||||
If Not IsNothing(KitMachsLstBx.SelectedItem) Then
|
||||
nTemp = OffContourTxBx.Text
|
||||
KitMachsLstBx.SelectedItem.dOffsetCnt = nTemp
|
||||
m_OldItem.KitMachList(KitMachsLstBx.SelectedItem.nId - 1).dOffsetCnt = nTemp
|
||||
StringToLen(OffContourTxBx.Text, dTemp)
|
||||
KitMachsLstBx.SelectedItem.dOffsetCnt = dTemp
|
||||
m_OldItem.KitMachList(KitMachsLstBx.SelectedItem.nId - 1).dOffsetCnt = dTemp
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#Region "ZigZag X"
|
||||
|
||||
Private Sub ZigZagXTxBx_EgtClosed(sender As Object, e As EventArgs) Handles ZigZagXTxBx.EgtClosed
|
||||
Dim nTemp As Integer = 0
|
||||
If Not IsNothing(KitMachsLstBx.SelectedItem) Then
|
||||
@@ -538,11 +562,11 @@ Public Class PolishingsPageUC
|
||||
End Sub
|
||||
|
||||
Private Sub OffZigZagXTxBx_EgtClosed(sender As Object, e As EventArgs) Handles OffZigZagXTxBx.EgtClosed
|
||||
Dim nTemp As Integer = 0
|
||||
Dim dTemp As Double = 0
|
||||
If Not IsNothing(KitMachsLstBx.SelectedItem) Then
|
||||
nTemp = OffZigZagXTxBx.Text
|
||||
KitMachsLstBx.SelectedItem.dOffZigZagX = nTemp
|
||||
m_OldItem.KitMachList(KitMachsLstBx.SelectedItem.nId - 1).dOffZigZagX = nTemp
|
||||
StringToLen(OffZigZagXTxBx.Text, dTemp)
|
||||
KitMachsLstBx.SelectedItem.dOffZigZagX = dTemp
|
||||
m_OldItem.KitMachList(KitMachsLstBx.SelectedItem.nId - 1).dOffZigZagX = dTemp
|
||||
End If
|
||||
End Sub
|
||||
|
||||
@@ -555,6 +579,28 @@ Public Class PolishingsPageUC
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub RadiusXTxBx_EgtClosed(sender As Object, e As EventArgs) Handles RadiusXTxBx.EgtClosed
|
||||
Dim dTemp As Double = 0
|
||||
If Not IsNothing(KitMachsLstBx.SelectedItem) Then
|
||||
StringToLen(RadiusXTxBx.Text, dTemp)
|
||||
KitMachsLstBx.SelectedItem.dRadiusX = dTemp
|
||||
m_OldItem.KitMachList(KitMachsLstBx.SelectedItem.nId - 1).dRadiusX = dTemp
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub DistanceXTxBx_EgtClosed(sender As Object, e As EventArgs) Handles DistanceXTxBx.EgtClosed
|
||||
Dim dTemp As Double = 0
|
||||
If Not IsNothing(KitMachsLstBx.SelectedItem) Then
|
||||
StringToLen(DistanceXTxBx.Text, dTemp)
|
||||
KitMachsLstBx.SelectedItem.dDistanceX = dTemp
|
||||
m_OldItem.KitMachList(KitMachsLstBx.SelectedItem.nId - 1).dDistanceX = dTemp
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#End Region ' ZigZag X
|
||||
|
||||
#Region "ZizZag Y"
|
||||
|
||||
Private Sub ZigZagYTxBx_EgtClosed(sender As Object, e As EventArgs) Handles ZigZagYTxBx.EgtClosed
|
||||
Dim nTemp As Integer = 0
|
||||
If Not IsNothing(KitMachsLstBx.SelectedItem) Then
|
||||
@@ -565,11 +611,11 @@ Public Class PolishingsPageUC
|
||||
End Sub
|
||||
|
||||
Private Sub OffZigZagYTxBx_EgtClosed(sender As Object, e As EventArgs) Handles OffZigZagYTxBx.EgtClosed
|
||||
Dim nTemp As Integer = 0
|
||||
Dim dTemp As Double = 0
|
||||
If Not IsNothing(KitMachsLstBx.SelectedItem) Then
|
||||
nTemp = OffZigZagYTxBx.Text
|
||||
KitMachsLstBx.SelectedItem.dOffZigZagY = nTemp
|
||||
m_OldItem.KitMachList(KitMachsLstBx.SelectedItem.nId - 1).dOffZigZagY = nTemp
|
||||
StringToLen(OffZigZagYTxBx.Text, dTemp)
|
||||
KitMachsLstBx.SelectedItem.dOffZigZagY = dTemp
|
||||
m_OldItem.KitMachList(KitMachsLstBx.SelectedItem.nId - 1).dOffZigZagY = dTemp
|
||||
End If
|
||||
End Sub
|
||||
|
||||
@@ -582,6 +628,75 @@ Public Class PolishingsPageUC
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub RadiusYTxBx_EgtClosed(sender As Object, e As EventArgs) Handles RadiusYTxBx.EgtClosed
|
||||
Dim dTemp As Double = 0
|
||||
If Not IsNothing(KitMachsLstBx.SelectedItem) Then
|
||||
StringToLen(RadiusYTxBx.Text, dTemp)
|
||||
KitMachsLstBx.SelectedItem.dRadiusY = dTemp
|
||||
m_OldItem.KitMachList(KitMachsLstBx.SelectedItem.nId - 1).dRadiusY = dTemp
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub DistanceYTxBx_EgtClosed(sender As Object, e As EventArgs) Handles DistanceYTxBx.EgtClosed
|
||||
Dim dTemp As Double = 0
|
||||
If Not IsNothing(KitMachsLstBx.SelectedItem) Then
|
||||
StringToLen(DistanceYTxBx.Text, dTemp)
|
||||
KitMachsLstBx.SelectedItem.dDistanceY = dTemp
|
||||
m_OldItem.KitMachList(KitMachsLstBx.SelectedItem.nId - 1).dDistanceY = dTemp
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#End Region ' ZigZagY
|
||||
|
||||
#Region "Spirale"
|
||||
|
||||
Private Sub SpiralTxBx_EgtClosed(sender As Object, e As EventArgs) Handles SpiralTxBx.EgtClosed
|
||||
Dim nTemp As Integer = 0
|
||||
If Not IsNothing(KitMachsLstBx.SelectedItem) Then
|
||||
nTemp = SpiralTxBx.Text
|
||||
KitMachsLstBx.SelectedItem.nSpiral = nTemp
|
||||
m_OldItem.KitMachList(KitMachsLstBx.SelectedItem.nId - 1).nSpiral = nTemp
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub OffSpiralTxBx_EgtClosed(sender As Object, e As EventArgs) Handles OffSpiralTxBx.EgtClosed
|
||||
Dim dTemp As Double = 0
|
||||
If Not IsNothing(KitMachsLstBx.SelectedItem) Then
|
||||
StringToLen(OffSpiralTxBx.Text, dTemp)
|
||||
KitMachsLstBx.SelectedItem.dOffSpiral = dTemp
|
||||
m_OldItem.KitMachList(KitMachsLstBx.SelectedItem.nId - 1).dOffSpiral = dTemp
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub StepSpiralTxBx_EgtClosed(sender As Object, e As EventArgs) Handles StepSpiralTxBx.EgtClosed
|
||||
Dim dTemp As Double = 0
|
||||
If Not IsNothing(KitMachsLstBx.SelectedItem) Then
|
||||
StringToLen(StepSpiralTxBx.Text, dTemp)
|
||||
KitMachsLstBx.SelectedItem.dStepSpiral = dTemp
|
||||
m_OldItem.KitMachList(KitMachsLstBx.SelectedItem.nId - 1).dStepSpiral = dTemp
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub RadiusSpiralTxBx_EgtClosed(sender As Object, e As EventArgs) Handles RadiusSpiralTxBx.EgtClosed
|
||||
Dim dTemp As Double = 0
|
||||
If Not IsNothing(KitMachsLstBx.SelectedItem) Then
|
||||
StringToLen(RadiusSpiralTxBx.Text, dTemp)
|
||||
KitMachsLstBx.SelectedItem.dRadiusSpiral = dTemp
|
||||
m_OldItem.KitMachList(KitMachsLstBx.SelectedItem.nId - 1).dRadiusSpiral = dTemp
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub DistanceSpiralTxBx_EgtClosed(sender As Object, e As EventArgs) Handles DistanceSpiralTxBx.EgtClosed
|
||||
Dim dTemp As Double = 0
|
||||
If Not IsNothing(KitMachsLstBx.SelectedItem) Then
|
||||
StringToLen(DistanceSpiralTxBx.Text, dTemp)
|
||||
KitMachsLstBx.SelectedItem.dDistanceSpiral = dTemp
|
||||
m_OldItem.KitMachList(KitMachsLstBx.SelectedItem.nId - 1).dDistanceSpiral = dTemp
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#End Region ' Spirale
|
||||
|
||||
Private Sub LiLenTxBx_EgtClosed(sender As Object, e As EventArgs) Handles LiLenTxBx.EgtClosed
|
||||
Dim dTemp As Double = 0
|
||||
If Not IsNothing(KitMachsLstBx.SelectedItem) Then
|
||||
@@ -616,11 +731,11 @@ Public Class PolishingsPageUC
|
||||
End Sub
|
||||
|
||||
Private Sub ToolCmBx_SelectionChanged(sender As Object, e As SelectionChangedEventArgs)
|
||||
If Not IsNothing( KitMachsLstBx.SelectedItem) Then
|
||||
If Not IsNothing(KitMachsLstBx.SelectedItem) Then
|
||||
m_OldItem.KitMachList(KitMachsLstBx.SelectedItem.nId - 1).SelTool = KitMachsLstBx.SelectedItem.SelTool
|
||||
If KitMachsLstBx.SelectedItem.SelTool >= 0 then
|
||||
KitMachsLstBx.SelectedItem.sToolName = m_ToolList( KitMachsLstBx.SelectedItem.SelTool)
|
||||
KitMachsLstBx.SelectedItem.sToolUUID = m_ToolUuidList( KitMachsLstBx.SelectedItem.SelTool)
|
||||
If KitMachsLstBx.SelectedItem.SelTool >= 0 Then
|
||||
KitMachsLstBx.SelectedItem.sToolName = m_ToolList(KitMachsLstBx.SelectedItem.SelTool)
|
||||
KitMachsLstBx.SelectedItem.sToolUUID = m_ToolUuidList(KitMachsLstBx.SelectedItem.SelTool)
|
||||
Else
|
||||
KitMachsLstBx.SelectedItem.sToolName = "---"
|
||||
KitMachsLstBx.SelectedItem.sToolUUID = "---"
|
||||
@@ -630,143 +745,176 @@ Public Class PolishingsPageUC
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Function ReadKitName( nKitIndex As Integer) As String
|
||||
Private Function ReadKitName(nKitIndex As Integer) As String
|
||||
' Leggo il nome del kit
|
||||
Dim sKey As String = K_KIT & nKitIndex.ToString("D2")
|
||||
Dim sName As String = ""
|
||||
GetPrivateProfileString( S_HEADER, sKey, "", sName, m_sKitFile)
|
||||
GetPrivateProfileString(S_HEADER, sKey, "", sName, m_sKitFile)
|
||||
Return sName
|
||||
End Function
|
||||
|
||||
Private Function ReadKit( nKitIndex As Integer, removeFlag As Boolean, ByRef Kit As Kit) As Boolean
|
||||
|
||||
Private Function ReadKit(nKitIndex As Integer, removeFlag As Boolean, ByRef Kit As Kit) As Boolean
|
||||
' Leggo il nome del kit
|
||||
Dim sName As String = ReadKitName( nKitIndex)
|
||||
If String.IsNullOrWhiteSpace( sName) Then Return False
|
||||
Dim sName As String = ReadKitName(nKitIndex)
|
||||
If String.IsNullOrWhiteSpace(sName) Then Return False
|
||||
' Creo il kit
|
||||
Kit = New Kit( If( removeFlag, nKitIndex - 1, nKitIndex), sName)
|
||||
Kit = New Kit(If(removeFlag, nKitIndex - 1, nKitIndex), sName)
|
||||
' Leggo le sue lavorazioni
|
||||
For nkitMachIndex As Integer = 1 To 100
|
||||
Dim kmItem As KitMach = Nothing
|
||||
if ReadKitMach( sName, nkitMachIndex, kmItem) Then
|
||||
Kit.AddKitMach( kmItem)
|
||||
If ReadKitMach(sName, nkitMachIndex, kmItem) Then
|
||||
Kit.AddKitMach(kmItem)
|
||||
Else
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
' Se non sono state trovate lavorazioni, ne aggiungo una standard
|
||||
If Kit.KitMachList.Count() = 0 Then
|
||||
Kit.AddKitMach( New KitMach( 1))
|
||||
Kit.AddKitMach(New KitMach(1))
|
||||
End If
|
||||
Return True
|
||||
End Function
|
||||
|
||||
Private Function ReadKitMach( sKitName As String, nKitMachIndex As Integer, ByRef kmItem As KitMach) As Boolean
|
||||
Private Function ReadKitMach(sKitName As String, nKitMachIndex As Integer, ByRef kmItem As KitMach) As Boolean
|
||||
' Verifico esistenza lavorazione del kit
|
||||
Dim sSect As String = S_KIT & "." & sKitName
|
||||
Dim sKeyInd As String = nkitMachIndex.ToString("D2") & "."
|
||||
Dim sKeyInd As String = nKitMachIndex.ToString("D2") & "."
|
||||
Dim sName As String = ""
|
||||
If GetPrivateProfileString( sSect, sKeyInd & K_TOOLNAME, "", sName, m_sKitFile) = 0 Then Return False
|
||||
If GetPrivateProfileString(sSect, sKeyInd & K_TOOLNAME, "", sName, m_sKitFile) = 0 Then Return False
|
||||
' Lettura completa
|
||||
kmItem = New KitMach
|
||||
kmItem.sToolName = sName
|
||||
kmItem.nId = nkitMachIndex
|
||||
GetPrivateProfileString( sSect, sKeyInd & K_TOOL, "", kmItem.sToolUUID, m_sKitFile)
|
||||
kmItem.bActive = ( GetPrivateProfileInt( sSect, sKeyInd & K_ACTIVE, 0, m_sKitFile) = 1)
|
||||
kmItem.nId = nKitMachIndex
|
||||
GetPrivateProfileString(sSect, sKeyInd & K_TOOL, "", kmItem.sToolUUID, m_sKitFile)
|
||||
kmItem.bActive = (GetPrivateProfileInt(sSect, sKeyInd & K_ACTIVE, 0, m_sKitFile) = 1)
|
||||
kmItem.nContour = GetPrivateProfileInt(sSect, sKeyInd & K_CONTOUR, 0, m_sKitFile)
|
||||
kmItem.dOffsetCnt = GetPrivateProfileInt(sSect, sKeyInd & K_OFFSETCNT, 0, m_sKitFile)
|
||||
kmItem.dOffsetCnt = GetPrivateProfileDouble(sSect, sKeyInd & K_OFFSETCNT, 0, m_sKitFile)
|
||||
kmItem.nZigZagX = GetPrivateProfileInt(sSect, sKeyInd & K_ZIGZAGX, 0, m_sKitFile)
|
||||
kmItem.dOffZigZagX = GetPrivateProfileInt(sSect, sKeyInd & K_OFFZIGZAGX, 0, m_sKitFile)
|
||||
kmItem.dOffZigZagX = GetPrivateProfileDouble(sSect, sKeyInd & K_OFFZIGZAGX, 0, m_sKitFile)
|
||||
kmItem.dStepX = GetPrivateProfileDouble(sSect, sKeyInd & K_STEPX, 0, m_sKitFile)
|
||||
kmItem.dRadiusX = GetPrivateProfileDouble(sSect, sKeyInd & K_RADIUSX, 0, m_sKitFile)
|
||||
kmItem.dDistanceX = GetPrivateProfileDouble(sSect, sKeyInd & K_DISTANCEX, 0, m_sKitFile)
|
||||
kmItem.nZigZagY = GetPrivateProfileInt(sSect, sKeyInd & K_ZIGZAGY, 0, m_sKitFile)
|
||||
kmItem.dOffZigZagY = GetPrivateProfileInt(sSect, sKeyInd & K_OFFZIGZAGY, 0, m_sKitFile)
|
||||
kmItem.dStepY = GetPrivateProfileDouble( sSect, sKeyInd & K_STEPY, 0, m_sKitFile)
|
||||
kmItem.dLiLen = GetPrivateProfileDouble( sSect, sKeyInd & K_LILEN, 0, m_sKitFile)
|
||||
kmItem.dLiHeight = GetPrivateProfileDouble( sSect, sKeyInd & K_LIHEIGHT, 0, m_sKitFile)
|
||||
kmItem.dLiLoad = GetPrivateProfileDouble( sSect, sKeyInd & K_LILOAD, 0, m_sKitFile)
|
||||
kmItem.dOffZigZagY = GetPrivateProfileDouble(sSect, sKeyInd & K_OFFZIGZAGY, 0, m_sKitFile)
|
||||
kmItem.dStepY = GetPrivateProfileDouble(sSect, sKeyInd & K_STEPY, 0, m_sKitFile)
|
||||
kmItem.dRadiusY = GetPrivateProfileDouble(sSect, sKeyInd & K_RADIUSY, 0, m_sKitFile)
|
||||
kmItem.dDistanceY = GetPrivateProfileDouble(sSect, sKeyInd & K_DISTANCEY, 0, m_sKitFile)
|
||||
|
||||
kmItem.nSpiral = GetPrivateProfileInt(sSect, sKeyInd & K_SPIRAL, 0, m_sKitFile)
|
||||
kmItem.dOffSpiral = GetPrivateProfileDouble(sSect, sKeyInd & K_OFFSPIRAL, 0, m_sKitFile)
|
||||
kmItem.dStepSpiral = GetPrivateProfileDouble(sSect, sKeyInd & K_STEPSPIRAL, 0, m_sKitFile)
|
||||
kmItem.dRadiusSpiral = GetPrivateProfileDouble(sSect, sKeyInd & K_RADIUSSPIRAL, 0, m_sKitFile)
|
||||
kmItem.dDistanceSpiral = GetPrivateProfileDouble(sSect, sKeyInd & K_DISTANCESPIRAL, 0, m_sKitFile)
|
||||
|
||||
kmItem.dLiLen = GetPrivateProfileDouble(sSect, sKeyInd & K_LILEN, 0, m_sKitFile)
|
||||
kmItem.dLiHeight = GetPrivateProfileDouble(sSect, sKeyInd & K_LIHEIGHT, 0, m_sKitFile)
|
||||
kmItem.dLiLoad = GetPrivateProfileDouble(sSect, sKeyInd & K_LILOAD, 0, m_sKitFile)
|
||||
Return True
|
||||
End Function
|
||||
|
||||
Friend Function WriteKitName( nKitIndex As Integer, sKitName As String) As Boolean
|
||||
Friend Function WriteKitName(nKitIndex As Integer, sKitName As String) As Boolean
|
||||
Dim sKey As String = K_KIT & nKitIndex.ToString("D2")
|
||||
Return WritePrivateProfileString( S_HEADER, sKey, sKitName, m_sKitFile)
|
||||
Return WritePrivateProfileString(S_HEADER, sKey, sKitName, m_sKitFile)
|
||||
End Function
|
||||
|
||||
Private Function WriteKitMach( nKitIndex As Integer, nKitMachIndex As Integer, kmItem As KitMach) As Boolean
|
||||
Private Function WriteKitMach(nKitIndex As Integer, nKitMachIndex As Integer, kmItem As KitMach) As Boolean
|
||||
' Leggo il nome del kit
|
||||
Dim sKitName As String = ReadKitName( nKitIndex)
|
||||
If String.IsNullOrWhiteSpace( sKitName) Then Return False
|
||||
Dim sKitName As String = ReadKitName(nKitIndex)
|
||||
If String.IsNullOrWhiteSpace(sKitName) Then Return False
|
||||
' Sezione
|
||||
Dim sSect As String = S_KIT & "." & sKitName
|
||||
' Indice
|
||||
Dim sKeyInd As String = nKitMachIndex.ToString("D2") & "."
|
||||
' Scrivo i dati della lavorazione
|
||||
If Not IsNothing( kmItem) Then
|
||||
WritePrivateProfileString( sSect, sKeyInd & K_TOOL, kmItem.sToolUUID, m_sKitFile)
|
||||
WritePrivateProfileString( sSect, sKeyInd & K_TOOLNAME, kmItem.sToolName, m_sKitFile)
|
||||
WritePrivateProfileString( sSect, sKeyInd & K_ACTIVE, If( kmItem.bActive, "1", "0"), m_sKitFile)
|
||||
If Not IsNothing(kmItem) Then
|
||||
WritePrivateProfileString(sSect, sKeyInd & K_TOOL, kmItem.sToolUUID, m_sKitFile)
|
||||
WritePrivateProfileString(sSect, sKeyInd & K_TOOLNAME, kmItem.sToolName, m_sKitFile)
|
||||
WritePrivateProfileString(sSect, sKeyInd & K_ACTIVE, If(kmItem.bActive, "1", "0"), m_sKitFile)
|
||||
WritePrivateProfileString(sSect, sKeyInd & K_CONTOUR, kmItem.nContour.ToString(), m_sKitFile)
|
||||
WritePrivateProfileString(sSect, sKeyInd & K_OFFSETCNT, kmItem.dOffsetCnt.ToString(), m_sKitFile)
|
||||
WritePrivateProfileString(sSect, sKeyInd & K_OFFSETCNT, DoubleToString(kmItem.dOffsetCnt, 3), m_sKitFile)
|
||||
WritePrivateProfileString(sSect, sKeyInd & K_ZIGZAGX, kmItem.nZigZagX.ToString(), m_sKitFile)
|
||||
WritePrivateProfileString(sSect, sKeyInd & K_OFFZIGZAGX, kmItem.dOffZigZagX.ToString(), m_sKitFile)
|
||||
WritePrivateProfileString( sSect, sKeyInd & K_STEPX, DoubleToString( kmItem.dStepX, 3), m_sKitFile)
|
||||
WritePrivateProfileString(sSect, sKeyInd & K_OFFZIGZAGX, DoubleToString(kmItem.dOffZigZagX.ToString, 3), m_sKitFile)
|
||||
WritePrivateProfileString(sSect, sKeyInd & K_STEPX, DoubleToString(kmItem.dStepX, 3), m_sKitFile)
|
||||
WritePrivateProfileString(sSect, sKeyInd & K_RADIUSX, DoubleToString(kmItem.dRadiusX, 3), m_sKitFile)
|
||||
WritePrivateProfileString(sSect, sKeyInd & K_DISTANCEX, DoubleToString(kmItem.dDistanceX, 3), m_sKitFile)
|
||||
WritePrivateProfileString(sSect, sKeyInd & K_ZIGZAGY, kmItem.nZigZagY.ToString(), m_sKitFile)
|
||||
WritePrivateProfileString(sSect, sKeyInd & K_OFFZIGZAGY, kmItem.dOffZigZagY.ToString(), m_sKitFile)
|
||||
WritePrivateProfileString( sSect, sKeyInd & K_STEPY, DoubleToString( kmItem.dStepY, 3), m_sKitFile)
|
||||
WritePrivateProfileString( sSect, sKeyInd & K_LILEN, DoubleToString( kmItem.dLiLen, 3), m_sKitFile)
|
||||
WritePrivateProfileString( sSect, sKeyInd & K_LIHEIGHT, DoubleToString( kmItem.dLiHeight, 3), m_sKitFile)
|
||||
WritePrivateProfileString( sSect, sKeyInd & K_LILOAD, DoubleToString( kmItem.dLiLoad, 3), m_sKitFile)
|
||||
WritePrivateProfileString(sSect, sKeyInd & K_OFFZIGZAGY, DoubleToString(kmItem.dOffZigZagY, 3), m_sKitFile)
|
||||
WritePrivateProfileString(sSect, sKeyInd & K_STEPY, DoubleToString(kmItem.dStepY, 3), m_sKitFile)
|
||||
WritePrivateProfileString(sSect, sKeyInd & K_RADIUSY, DoubleToString(kmItem.dRadiusY, 3), m_sKitFile)
|
||||
WritePrivateProfileString(sSect, sKeyInd & K_DISTANCEY, DoubleToString(kmItem.dDistanceY, 3), m_sKitFile)
|
||||
|
||||
WritePrivateProfileString(sSect, sKeyInd & K_SPIRAL, kmItem.nSpiral.ToString(), m_sKitFile)
|
||||
WritePrivateProfileString(sSect, sKeyInd & K_OFFSPIRAL, DoubleToString(kmItem.dOffSpiral.ToString, 3), m_sKitFile)
|
||||
WritePrivateProfileString(sSect, sKeyInd & K_STEPSPIRAL, DoubleToString(kmItem.dStepSpiral, 3), m_sKitFile)
|
||||
WritePrivateProfileString(sSect, sKeyInd & K_RADIUSSPIRAL, DoubleToString(kmItem.dRadiusSpiral, 3), m_sKitFile)
|
||||
WritePrivateProfileString(sSect, sKeyInd & K_DISTANCESPIRAL, DoubleToString(kmItem.dDistanceSpiral, 3), m_sKitFile)
|
||||
|
||||
WritePrivateProfileString(sSect, sKeyInd & K_LILEN, DoubleToString(kmItem.dLiLen, 3), m_sKitFile)
|
||||
WritePrivateProfileString(sSect, sKeyInd & K_LIHEIGHT, DoubleToString(kmItem.dLiHeight, 3), m_sKitFile)
|
||||
WritePrivateProfileString(sSect, sKeyInd & K_LILOAD, DoubleToString(kmItem.dLiLoad, 3), m_sKitFile)
|
||||
Else
|
||||
WritePrivateProfileString( sSect, sKeyInd & K_TOOL, Nothing, m_sKitFile)
|
||||
WritePrivateProfileString( sSect, sKeyInd & K_TOOLNAME, Nothing, m_sKitFile)
|
||||
WritePrivateProfileString( sSect, sKeyInd & K_ACTIVE, Nothing, m_sKitFile)
|
||||
WritePrivateProfileString(sSect, sKeyInd & K_TOOL, Nothing, m_sKitFile)
|
||||
WritePrivateProfileString(sSect, sKeyInd & K_TOOLNAME, Nothing, m_sKitFile)
|
||||
WritePrivateProfileString(sSect, sKeyInd & K_ACTIVE, Nothing, m_sKitFile)
|
||||
WritePrivateProfileString(sSect, sKeyInd & K_CONTOUR, Nothing, m_sKitFile)
|
||||
WritePrivateProfileString(sSect, sKeyInd & K_OFFSETCNT, Nothing, m_sKitFile)
|
||||
WritePrivateProfileString(sSect, sKeyInd & K_ZIGZAGX, Nothing, m_sKitFile)
|
||||
WritePrivateProfileString(sSect, sKeyInd & K_OFFZIGZAGX, Nothing, m_sKitFile)
|
||||
WritePrivateProfileString( sSect, sKeyInd & K_STEPX, Nothing, m_sKitFile)
|
||||
WritePrivateProfileString(sSect, sKeyInd & K_STEPX, Nothing, m_sKitFile)
|
||||
WritePrivateProfileString(sSect, sKeyInd & K_RADIUSX, Nothing, m_sKitFile)
|
||||
WritePrivateProfileString(sSect, sKeyInd & K_DISTANCEX, Nothing, m_sKitFile)
|
||||
WritePrivateProfileString(sSect, sKeyInd & K_ZIGZAGY, Nothing, m_sKitFile)
|
||||
WritePrivateProfileString(sSect, sKeyInd & K_OFFZIGZAGY, Nothing, m_sKitFile)
|
||||
WritePrivateProfileString( sSect, sKeyInd & K_STEPY, Nothing, m_sKitFile)
|
||||
WritePrivateProfileString( sSect, sKeyInd & K_LILEN, Nothing, m_sKitFile)
|
||||
WritePrivateProfileString( sSect, sKeyInd & K_LIHEIGHT, Nothing, m_sKitFile)
|
||||
WritePrivateProfileString( sSect, sKeyInd & K_LILOAD, Nothing, m_sKitFile)
|
||||
WritePrivateProfileString(sSect, sKeyInd & K_STEPY, Nothing, m_sKitFile)
|
||||
WritePrivateProfileString(sSect, sKeyInd & K_RADIUSY, Nothing, m_sKitFile)
|
||||
WritePrivateProfileString(sSect, sKeyInd & K_DISTANCEY, Nothing, m_sKitFile)
|
||||
|
||||
WritePrivateProfileString(sSect, sKeyInd & K_SPIRAL, Nothing, m_sKitFile)
|
||||
WritePrivateProfileString(sSect, sKeyInd & K_OFFSPIRAL, Nothing, m_sKitFile)
|
||||
WritePrivateProfileString(sSect, sKeyInd & K_STEPSPIRAL, Nothing, m_sKitFile)
|
||||
WritePrivateProfileString(sSect, sKeyInd & K_RADIUSSPIRAL, Nothing, m_sKitFile)
|
||||
WritePrivateProfileString(sSect, sKeyInd & K_DISTANCESPIRAL, Nothing, m_sKitFile)
|
||||
|
||||
WritePrivateProfileString(sSect, sKeyInd & K_LILEN, Nothing, m_sKitFile)
|
||||
WritePrivateProfileString(sSect, sKeyInd & K_LIHEIGHT, Nothing, m_sKitFile)
|
||||
WritePrivateProfileString(sSect, sKeyInd & K_LILOAD, Nothing, m_sKitFile)
|
||||
End If
|
||||
Return True
|
||||
End Function
|
||||
|
||||
Private Function EraseKit( nKitIndex As Integer) As Boolean
|
||||
Private Function EraseKit(nKitIndex As Integer) As Boolean
|
||||
' Leggo il nome del kit
|
||||
Dim sKitName As String = ReadKitName( nKitIndex)
|
||||
If String.IsNullOrWhiteSpace( sKitName) Then Return False
|
||||
Dim sKitName As String = ReadKitName(nKitIndex)
|
||||
If String.IsNullOrWhiteSpace(sKitName) Then Return False
|
||||
' Lo elimino dalla lista dei kit scalando tutti di una posizione e eliminando l'ultimo
|
||||
Dim nNextKitIndex As Integer = nKitIndex + 1
|
||||
Dim sNextKitName As String = ReadKitName( nNextKitIndex)
|
||||
while Not String.IsNullOrWhiteSpace( sNextKitName)
|
||||
WriteKitName( nNextKitIndex - 1, sNextKitName)
|
||||
Dim sNextKitName As String = ReadKitName(nNextKitIndex)
|
||||
While Not String.IsNullOrWhiteSpace(sNextKitName)
|
||||
WriteKitName(nNextKitIndex - 1, sNextKitName)
|
||||
nNextKitIndex += 1
|
||||
sNextKitName = ReadKitName( nNextKitIndex)
|
||||
sNextKitName = ReadKitName(nNextKitIndex)
|
||||
End While
|
||||
WriteKitName( nNextKitIndex - 1, Nothing)
|
||||
WriteKitName(nNextKitIndex - 1, Nothing)
|
||||
' Sezione
|
||||
Dim sSect As String = S_KIT & "." & sKitName
|
||||
' Cancello tutte le lavorazioni del kit
|
||||
WritePrivateProfileString( sSect, Nothing, Nothing, m_sKitFile)
|
||||
WritePrivateProfileString(sSect, Nothing, Nothing, m_sKitFile)
|
||||
Return True
|
||||
End Function
|
||||
|
||||
Private Function EraseKitMach( nKitIndex As Integer, nKitMachIndex As Integer) As Boolean
|
||||
Private Function EraseKitMach(nKitIndex As Integer, nKitMachIndex As Integer) As Boolean
|
||||
' Leggo il nome del kit
|
||||
Dim sKitName As String = ReadKitName( nKitIndex)
|
||||
If String.IsNullOrWhiteSpace( sKitName) Then Return False
|
||||
Dim sKitName As String = ReadKitName(nKitIndex)
|
||||
If String.IsNullOrWhiteSpace(sKitName) Then Return False
|
||||
' Lo elimino dali KitMach scalando tutti di una posizione e eliminando l'ultimo
|
||||
Dim kmCurr As KitMach = Nothing
|
||||
Dim nNextKitMachIndex As Integer = nKitMachIndex + 1
|
||||
While ReadKitMach( sKitName, nNextKitMachIndex, kmCurr)
|
||||
While ReadKitMach(sKitName, nNextKitMachIndex, kmCurr)
|
||||
kmCurr.nId = nNextKitMachIndex - 1
|
||||
WriteKitMach( nKitIndex, nNextKitMachIndex - 1, kmCurr)
|
||||
WriteKitMach(nKitIndex, nNextKitMachIndex - 1, kmCurr)
|
||||
nNextKitMachIndex += 1
|
||||
End While
|
||||
WriteKitMach( nKitIndex, nNextKitMachIndex - 1, Nothing)
|
||||
WriteKitMach(nKitIndex, nNextKitMachIndex - 1, Nothing)
|
||||
Return True
|
||||
End Function
|
||||
|
||||
@@ -804,7 +952,7 @@ Class Kit
|
||||
Get
|
||||
Return m_nId
|
||||
End Get
|
||||
Set( value As Integer)
|
||||
Set(value As Integer)
|
||||
m_nId = value
|
||||
End Set
|
||||
End Property
|
||||
@@ -824,7 +972,7 @@ Class Kit
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Sub New( nId As Integer, sName As String)
|
||||
Sub New(nId As Integer, sName As String)
|
||||
m_nId = nId
|
||||
m_sName = sName
|
||||
|
||||
@@ -832,21 +980,21 @@ Class Kit
|
||||
|
||||
End Sub
|
||||
|
||||
Sub New( nId As Integer, sName As String, kitSou As Kit)
|
||||
Sub New(nId As Integer, sName As String, kitSou As Kit)
|
||||
m_nId = nId
|
||||
m_sName = sName
|
||||
|
||||
m_KitMachList = New List(Of KitMach)
|
||||
|
||||
If IsNothing( kitSou) Then Return
|
||||
If IsNothing(kitSou) Then Return
|
||||
|
||||
For Each kmItem As KitMach In kitSou.m_KitMachList
|
||||
AddKitMach( kmItem)
|
||||
AddKitMach(kmItem)
|
||||
Next
|
||||
|
||||
End Sub
|
||||
|
||||
Sub AddKitMach( kitMachItem As KitMach)
|
||||
Sub AddKitMach(kitMachItem As KitMach)
|
||||
m_KitMachList.Add(kitMachItem)
|
||||
End Sub
|
||||
|
||||
@@ -862,15 +1010,29 @@ Class KitMach
|
||||
Private m_sToolName As String
|
||||
Private m_SelTool As Integer
|
||||
Friend Shared m_ToolList As List(Of String)
|
||||
|
||||
Private m_bActive As Boolean
|
||||
Private m_nContour As Integer
|
||||
Private m_dOffsetCnt As Double
|
||||
|
||||
Private m_nZigZagX As Integer
|
||||
Private m_dStepX As Double
|
||||
Private m_dOffZigZagX As Double
|
||||
Private m_dRadiusX As Double
|
||||
Private m_dDistanceX As Double
|
||||
|
||||
Private m_nZigZagY As Integer
|
||||
Private m_dStepY As Double
|
||||
Private m_dOffZigZagY As Double
|
||||
Private m_dRadiusY As Double
|
||||
Private m_dDistanceY As Double
|
||||
|
||||
Private m_nSpiral As Integer
|
||||
Private m_dOffSpiral As Double
|
||||
Private m_dStepSpiral As Double
|
||||
Private m_dRadiusSpiral As Double
|
||||
Private m_dDistanceSpiral As Double
|
||||
|
||||
Private m_dLiLen As Double
|
||||
Private m_dLiHeight As Double
|
||||
Private m_dLiLoad As Double
|
||||
@@ -958,6 +1120,8 @@ Class KitMach
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#Region "Contorno"
|
||||
|
||||
Public m_IsModifiedActive As Boolean = False
|
||||
Public Property bActive As Boolean
|
||||
Get
|
||||
@@ -985,11 +1149,11 @@ Class KitMach
|
||||
End Property
|
||||
|
||||
Public m_IsModifiedOffCnt As Boolean = False
|
||||
Public Property dOffsetCnt As Integer
|
||||
Public Property dOffsetCnt As Double
|
||||
Get
|
||||
Return m_dOffsetCnt
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
Set(value As Double)
|
||||
If value <> m_dOffsetCnt Then
|
||||
m_dOffsetCnt = value
|
||||
m_IsModifiedOffCnt = True
|
||||
@@ -997,6 +1161,10 @@ Class KitMach
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region ' Contorno
|
||||
|
||||
#Region "ZigZag X"
|
||||
|
||||
Public m_IsModifiedZigZagX As Boolean = False
|
||||
Public Property nZigZagX As Integer
|
||||
Get
|
||||
@@ -1011,11 +1179,11 @@ Class KitMach
|
||||
End Property
|
||||
|
||||
Public m_IsModifiedOffZigZagX As Boolean = False
|
||||
Public Property dOffZigZagX As Integer
|
||||
Public Property dOffZigZagX As Double
|
||||
Get
|
||||
Return m_dOffZigZagX
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
Set(value As Double)
|
||||
If value <> m_dOffZigZagX Then
|
||||
m_dOffZigZagX = value
|
||||
m_IsModifiedOffZigZagX = True
|
||||
@@ -1036,6 +1204,36 @@ Class KitMach
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public m_IsModifiedRadiusX As Boolean = False
|
||||
Public Property dRadiusX As Double
|
||||
Get
|
||||
Return m_dRadiusX
|
||||
End Get
|
||||
Set(value As Double)
|
||||
If value <> m_dRadiusX Then
|
||||
m_dRadiusX = value
|
||||
m_IsModifiedRadiusX = True
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public m_IsModifiedDistanceX As Boolean = False
|
||||
Public Property dDistanceX As Double
|
||||
Get
|
||||
Return m_dDistanceX
|
||||
End Get
|
||||
Set(value As Double)
|
||||
If value <> m_dDistanceX Then
|
||||
m_dDistanceX = value
|
||||
m_IsModifiedDistanceX = True
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region ' ZigZag X
|
||||
|
||||
#Region "ZigZag Y"
|
||||
|
||||
Public m_IsModifiedZigZagY As Boolean = False
|
||||
Public Property nZigZagY As Integer
|
||||
Get
|
||||
@@ -1050,11 +1248,11 @@ Class KitMach
|
||||
End Property
|
||||
|
||||
Public m_IsModifiedOffZigZagY As Boolean = False
|
||||
Public Property dOffZigZagY As Integer
|
||||
Public Property dOffZigZagY As Double
|
||||
Get
|
||||
Return m_dOffZigZagY
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
Set(value As Double)
|
||||
If value <> m_dOffZigZagY Then
|
||||
m_dOffZigZagY = value
|
||||
m_IsModifiedOffZigZagY = True
|
||||
@@ -1075,6 +1273,105 @@ Class KitMach
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public m_IsModifiedRadiusY As Boolean = False
|
||||
Public Property dRadiusY As Double
|
||||
Get
|
||||
Return m_dRadiusY
|
||||
End Get
|
||||
Set(value As Double)
|
||||
If value <> m_dRadiusY Then
|
||||
m_dRadiusY = value
|
||||
m_IsModifiedRadiusY = True
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public m_IsModifiedDistanceY As Boolean = False
|
||||
Public Property dDistanceY As Double
|
||||
Get
|
||||
Return m_dDistanceY
|
||||
End Get
|
||||
Set(value As Double)
|
||||
If value <> m_dDistanceY Then
|
||||
m_dDistanceY = value
|
||||
m_IsModifiedDistanceY = True
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region ' ZigZag Y
|
||||
|
||||
#Region "Spirale"
|
||||
|
||||
Public m_IsModifiedSpiral As Boolean = False
|
||||
Public Property nSpiral As Integer
|
||||
Get
|
||||
Return m_nSpiral
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
If value <> m_nSpiral Then
|
||||
m_nSpiral = value
|
||||
m_IsModifiedSpiral = True
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public m_IsModifiedOffSpiral As Boolean = False
|
||||
Public Property dOffSpiral As Double
|
||||
Get
|
||||
Return m_dOffSpiral
|
||||
End Get
|
||||
Set(value As Double)
|
||||
If value <> m_dOffSpiral Then
|
||||
m_dOffSpiral = value
|
||||
m_IsModifiedOffSpiral = True
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public m_IsModifiedStepSpiral As Boolean = False
|
||||
Public Property dStepSpiral As Double
|
||||
Get
|
||||
Return m_dStepSpiral
|
||||
End Get
|
||||
Set(value As Double)
|
||||
If value <> m_dStepSpiral Then
|
||||
m_dStepSpiral = value
|
||||
m_IsModifiedStepSpiral = True
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public m_IsModifiedRadiusSpiral As Boolean = False
|
||||
Public Property dRadiusSpiral As Double
|
||||
Get
|
||||
Return m_dRadiusSpiral
|
||||
End Get
|
||||
Set(value As Double)
|
||||
If value <> m_dRadiusSpiral Then
|
||||
m_dRadiusSpiral = value
|
||||
m_IsModifiedRadiusSpiral = True
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public m_IsModifiedDistanceSpiral As Boolean = False
|
||||
Public Property dDistanceSpiral As Double
|
||||
Get
|
||||
Return m_dDistanceSpiral
|
||||
End Get
|
||||
Set(value As Double)
|
||||
If value <> m_dDistanceSpiral Then
|
||||
m_dDistanceSpiral = value
|
||||
m_IsModifiedDistanceSpiral = True
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region ' Spirale
|
||||
|
||||
#Region "Parametri lavorazione"
|
||||
|
||||
Public m_IsModifiedLiLen As Boolean = False
|
||||
Public Property dLiLen As Double
|
||||
Get
|
||||
@@ -1114,6 +1411,8 @@ Class KitMach
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region ' Parametri lavorazione
|
||||
|
||||
Sub New()
|
||||
m_nId = 0
|
||||
m_SelTool = 0
|
||||
@@ -1125,15 +1424,24 @@ Class KitMach
|
||||
m_nZigZagX = 0
|
||||
m_dOffZigZagX = 0
|
||||
m_dStepX = 0
|
||||
m_dRadiusX = 0
|
||||
m_dDistanceX = 0
|
||||
m_nZigZagY = 0
|
||||
m_dOffZigZagY = 0
|
||||
m_dStepY = 0
|
||||
m_dRadiusY = 0
|
||||
m_dDistanceY = 0
|
||||
m_nSpiral = 0
|
||||
m_dOffSpiral = 0
|
||||
m_dStepSpiral = 0
|
||||
m_dRadiusSpiral = 0
|
||||
m_dDistanceSpiral = 0
|
||||
m_dLiLen = 0
|
||||
m_dLiHeight = 0
|
||||
m_dLiLoad = 0
|
||||
End Sub
|
||||
|
||||
Sub New( nId As Integer)
|
||||
Sub New(nId As Integer)
|
||||
m_nId = nId
|
||||
m_SelTool = 0
|
||||
m_sToolUUID = "---"
|
||||
@@ -1144,17 +1452,26 @@ Class KitMach
|
||||
m_nZigZagX = 0
|
||||
m_dOffZigZagX = 0
|
||||
m_dStepX = 0
|
||||
m_dRadiusX = 0
|
||||
m_dDistanceX = 0
|
||||
m_nZigZagY = 0
|
||||
m_dOffZigZagY = 0
|
||||
m_dStepY = 0
|
||||
m_dRadiusY = 0
|
||||
m_dDistanceY = 0
|
||||
m_nSpiral = 0
|
||||
m_dOffSpiral = 0
|
||||
m_dStepSpiral = 0
|
||||
m_dRadiusSpiral = 0
|
||||
m_dDistanceSpiral = 0
|
||||
m_dLiLen = 0
|
||||
m_dLiHeight = 0
|
||||
m_dLiLoad = 0
|
||||
End Sub
|
||||
|
||||
Sub New( kmSou As KitMach)
|
||||
Sub New(kmSou As KitMach)
|
||||
m_nId = kmSou.nId
|
||||
m_SelTool = kmSou.selTool
|
||||
m_SelTool = kmSou.SelTool
|
||||
m_sToolUUID = kmSou.sToolUUID
|
||||
m_sToolName = kmSou.sToolName
|
||||
m_bActive = kmSou.bActive
|
||||
@@ -1163,9 +1480,18 @@ Class KitMach
|
||||
m_nZigZagX = kmSou.nZigZagX
|
||||
m_dOffZigZagX = kmSou.dOffZigZagX
|
||||
m_dStepX = kmSou.dStepX
|
||||
m_dRadiusX = kmSou.dRadiusX
|
||||
m_dDistanceX = kmSou.dDistanceX
|
||||
m_nZigZagY = kmSou.nZigZagY
|
||||
m_dOffZigZagY = kmSou.dOffZigZagY
|
||||
m_dStepY = kmSou.dStepY
|
||||
m_dRadiusY = kmSou.dRadiusY
|
||||
m_dDistanceY = kmSou.dDistanceY
|
||||
m_nSpiral = kmSou.nSpiral
|
||||
m_dOffSpiral = kmSou.dOffSpiral
|
||||
m_dStepSpiral = kmSou.dStepSpiral
|
||||
m_dRadiusSpiral = kmSou.dRadiusSpiral
|
||||
m_dDistanceSpiral = kmSou.dDistanceSpiral
|
||||
m_dLiLen = kmSou.dLiLen
|
||||
m_dLiHeight = kmSou.dLiHeight
|
||||
m_dLiLoad = kmSou.m_dLiLoad
|
||||
|
||||
@@ -36,7 +36,7 @@ Public Class StatisticsPageUC
|
||||
DayTxBl.Text = sDay
|
||||
' Leggo il numero della settimana
|
||||
Dim nWeek As Integer = GetPrivateProfileInt(S_STATDATA, K_SD_WEEK, -1, m_MainWindow.GetIniFile())
|
||||
WeekTxBl.Text = ( nWeek + 1).ToString()
|
||||
WeekTxBl.Text = (nWeek).ToString()
|
||||
|
||||
' Leggo area pezzi del giorno
|
||||
Dim dDayParts As Double = GetPrivateProfileDouble(S_STATDATA, K_SD_DAYPARTS, 0, m_MainWindow.GetIniFile())
|
||||
|
||||
@@ -434,13 +434,16 @@
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="11*"/>
|
||||
<ColumnDefinition Width="10*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Button Name="NewBtn" Grid.Column="0" Style="{DynamicResource OmagCut_YellowGradientYellowTextButton}"/>
|
||||
<Button Name="SaveBtn" Grid.Column="1" Style="{DynamicResource OmagCut_YellowGradientYellowTextButton}"/>
|
||||
<Button Name="RemoveBtn" Grid.Column="2" Style="{DynamicResource OmagCut_YellowGradientYellowTextButton}" Padding="0"/>
|
||||
<Button Name="ExportBtn" Grid.Column="4" Style="{DynamicResource OmagCut_YellowGradientYellowTextButton}" Padding="0"/>
|
||||
<Button Name="ImportBtn" Grid.Column="5" Style="{DynamicResource OmagCut_YellowGradientYellowTextButton}" Padding="0"/>
|
||||
|
||||
</Grid>
|
||||
|
||||
|
||||
+300
-28
@@ -3,6 +3,7 @@ Imports OmagCUT.TreeViewItem
|
||||
Imports System.ComponentModel
|
||||
Imports EgtUILib
|
||||
Imports EgtWPFLib
|
||||
Imports EgtWPFLib5
|
||||
|
||||
Public Class ToolsDbPageUC
|
||||
|
||||
@@ -16,6 +17,8 @@ Public Class ToolsDbPageUC
|
||||
Dim ToolsList As New ObservableCollection(Of CathegoryItem)
|
||||
' Proprietà
|
||||
Private m_bFirst As Boolean = True
|
||||
' Flag nuova gestione parametri lama in disegno
|
||||
Private m_bNewSawbladeMaker As Boolean = False
|
||||
' Stringa identificativa variabile geometrica in modifica
|
||||
Private m_sCurrVar As String = String.Empty
|
||||
' Parametri dell'utensile corrente
|
||||
@@ -53,6 +56,8 @@ Public Class ToolsDbPageUC
|
||||
NewBtn.Content = EgtMsg(MSG_MACHINEPAGEUC + 15)
|
||||
SaveBtn.Content = EgtMsg(MSG_MACHINEPAGEUC + 17)
|
||||
RemoveBtn.Content = EgtMsg(MSG_MACHINEPAGEUC + 18)
|
||||
ExportBtn.Content = EgtMsg(91126)
|
||||
ImportBtn.Content = EgtMsg(91127)
|
||||
|
||||
NameTxBl.Text = EgtMsg(MSG_TOOLSDBPAGEUC + 1)
|
||||
TCPosTxBl.Text = EgtMsg(MSG_TOOLSDBPAGEUC + 2)
|
||||
@@ -170,6 +175,10 @@ Public Class ToolsDbPageUC
|
||||
If Not m_CurrMachine.bShowHeadExit Then
|
||||
MoveParam()
|
||||
End If
|
||||
' Verifico se macchina con nuovo SawbladeMaker
|
||||
Dim sSawBladeMaker As String = ""
|
||||
GetPrivateProfileString(S_TOOLS, K_SAWBLADEMAKER, "", sSawBladeMaker, m_MainWindow.GetIniFile())
|
||||
m_bNewSawbladeMaker = String.Compare(sSawBladeMaker, "MakeStoneSawBlade.lua", True)
|
||||
m_bFirst = False
|
||||
Else
|
||||
EgtSetCurrentContext(m_MainWindow.m_CurrentProjectPageUC.CurrentProjectScene.GetCtx())
|
||||
@@ -239,17 +248,17 @@ Public Class ToolsDbPageUC
|
||||
Next
|
||||
' Determino il tipo di utensile
|
||||
Dim nType As Integer
|
||||
EgtTdbGetCurrToolParam( MCH_TP.TYPE, nType)
|
||||
EgtTdbGetCurrToolParam(MCH_TP.TYPE, nType)
|
||||
' Imposto testa e uscita
|
||||
' Sempre lame su H1.1 e utensili foretto, fresa e mola da scasso su H1.2
|
||||
If ( nType And MCH_TF.WATERJET) = 0 then
|
||||
If (nType And MCH_TF.WATERJET) = 0 Then
|
||||
Dim bSaw As Boolean = ((nType And MCH_TF.SAWBLADE) <> 0)
|
||||
EgtTdbSetCurrToolParam( MCH_TP.HEAD, "H1")
|
||||
EgtTdbSetCurrToolParam( MCH_TP.EXIT_, If(bSaw, 1, 2))
|
||||
' Waterjet sempre su H2.1
|
||||
EgtTdbSetCurrToolParam(MCH_TP.HEAD, "H1")
|
||||
EgtTdbSetCurrToolParam(MCH_TP.EXIT_, If(bSaw, 1, 2))
|
||||
' Waterjet sempre su H2.1
|
||||
Else
|
||||
EgtTdbSetCurrToolParam( MCH_TP.HEAD, "H2")
|
||||
EgtTdbSetCurrToolParam( MCH_TP.EXIT_, 1)
|
||||
EgtTdbSetCurrToolParam(MCH_TP.HEAD, "H2")
|
||||
EgtTdbSetCurrToolParam(MCH_TP.EXIT_, 1)
|
||||
End If
|
||||
' Per macchine senza ToolChanger, resetto la posizione su questo
|
||||
If m_CurrMachine.ShowToolChanger = 0 Then
|
||||
@@ -317,8 +326,8 @@ Public Class ToolsDbPageUC
|
||||
EgtTdbGetCurrToolParam(MCH_TP.TYPE, CurrType)
|
||||
For Each ToolFamily As CathegoryItem In ToolsList
|
||||
If ToolFamily.nTType = CurrType Then
|
||||
Dim NewToolItem As New CustomItem( NewName, CurrType)
|
||||
ToolFamily.Items.Add( NewToolItem)
|
||||
Dim NewToolItem As New CustomItem(NewName, CurrType)
|
||||
ToolFamily.Items.Add(NewToolItem)
|
||||
NewToolItem.IsSelected = True
|
||||
GetToolParams()
|
||||
m_OldItem = ToolTreeView.SelectedItem
|
||||
@@ -354,15 +363,15 @@ Public Class ToolsDbPageUC
|
||||
Dim sItems() As String = sUserNotes.Split(";".ToCharArray)
|
||||
For i As Integer = 0 To sItems.Count() - 1
|
||||
If sItems(i).Contains("CODE=") Then
|
||||
CodeTxBx.Text = sItems(i).Substring( 5)
|
||||
CodeTxBx.Text = sItems(i).Substring(5)
|
||||
ElseIf sItems(i).Contains("SUPPL=") Then
|
||||
SupplierTxBx.Text = sItems(i).Substring( 6)
|
||||
SupplierTxBx.Text = sItems(i).Substring(6)
|
||||
ElseIf sItems(i).Contains("S/N=") Then
|
||||
SerNbrTxBx.Text = sItems(i).Substring( 4)
|
||||
SerNbrTxBx.Text = sItems(i).Substring(4)
|
||||
ElseIf sItems(i).Contains("END=") Then
|
||||
EndLifeChBx.IsChecked = True
|
||||
m_sEndLife = sItems(i).Substring( 4)
|
||||
ElseIf Not String.IsNullOrWhiteSpace(sItems(i))
|
||||
m_sEndLife = sItems(i).Substring(4)
|
||||
ElseIf Not String.IsNullOrWhiteSpace(sItems(i)) Then
|
||||
sToShow &= sItems(i) & ";"
|
||||
End If
|
||||
Next
|
||||
@@ -383,7 +392,7 @@ Public Class ToolsDbPageUC
|
||||
sUserNotes &= "SUPPL=" & SupplierTxBx.Text & ";"
|
||||
sUserNotes &= "S/N=" & SerNbrTxBx.Text & ";"
|
||||
If EndLifeChBx.IsChecked Then
|
||||
If String.IsNullOrWhiteSpace( m_sEndLife) Then
|
||||
If String.IsNullOrWhiteSpace(m_sEndLife) Then
|
||||
m_sEndLife = My.Computer.Clock.LocalTime.ToString("dd.MM.yyyy HH:mm:ss")
|
||||
End If
|
||||
sUserNotes &= "END=" & m_sEndLife & ";"
|
||||
@@ -479,18 +488,217 @@ Public Class ToolsDbPageUC
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub ExportBtn_Click(Sender As Object, e As RoutedEventArgs) Handles ExportBtn.Click
|
||||
' contesto corrente
|
||||
EgtSetCurrentContext(m_MainWindow.m_CurrentProjectPageUC.CurrentProjectScene.GetCtx())
|
||||
|
||||
' creo lista utensili per esportazione
|
||||
Dim ToolToExportList = New ObservableCollection(Of ImpExpToolFamily)
|
||||
Dim Family As CathegoryItem
|
||||
Dim Tool As CustomItem
|
||||
For Each Family In ToolsList
|
||||
Dim ImpExpToolFamily As New ImpExpToolFamily(Family.Name, Family.nTType)
|
||||
ImpExpToolFamily.PictureString = "/Resources/ToolsTreeviewImages/Folder.png"
|
||||
For Each Tool In Family.Items
|
||||
Dim CurrTool = New ImpExpToolItem(Tool.Name, False)
|
||||
ImpExpToolFamily.ToolList.Add(CurrTool)
|
||||
Next
|
||||
ToolToExportList.Add(ImpExpToolFamily)
|
||||
Next
|
||||
|
||||
Dim ExportWndVM As New ImportExportToolWindowVM(ToolToExportList, True)
|
||||
Dim ExportWnd As New ImportExportToolWD(Application.Current.MainWindow, ExportWndVM)
|
||||
|
||||
ExportWnd.ShowDialog()
|
||||
End Sub
|
||||
|
||||
Private Sub ImportBtn_Click(Sender As Object, e As RoutedEventArgs) Handles ImportBtn.Click
|
||||
' contesto corrente
|
||||
EgtSetCurrentContext(m_MainWindow.m_CurrentProjectPageUC.CurrentProjectScene.GetCtx())
|
||||
' apro dialogo di scelta file
|
||||
Dim ImportFileDlg As New Microsoft.Win32.OpenFileDialog() With {
|
||||
.Title = EgtMsg(31161) & " " & EgtMsg(31163),
|
||||
.DefaultExt = ".data",
|
||||
.Filter = "Tools (.data)|*.data",
|
||||
.CheckFileExists = True,
|
||||
.ValidateNames = True
|
||||
}
|
||||
If ImportFileDlg.ShowDialog() <> True Then Return
|
||||
Dim ImportFilePath As String = ImportFileDlg.FileName
|
||||
' recupero liste utensili da importare
|
||||
Dim ImportFileToolNameList As String() = Nothing
|
||||
Dim ImportFileToolFamilyList As Integer() = Nothing
|
||||
If Not EgtTdbToBeImported(ImportFilePath, ImportFileToolNameList, ImportFileToolFamilyList) Then Return
|
||||
' li inserisco in lista per finestra di scelta
|
||||
Dim ToolToImportList As New ObservableCollection(Of ImpExpToolFamily)
|
||||
' creo famiglie di utensili in base a quelle trovate in lista importata
|
||||
For ToolIndex As Integer = 0 To ImportFileToolNameList.Count - 1
|
||||
Dim ToolName As String = ImportFileToolNameList(ToolIndex)
|
||||
Dim ToolFamily As Integer = ImportFileToolFamilyList(ToolIndex)
|
||||
ToolFamily = ToolFamily And
|
||||
(MCH_TF.DRILLBIT Or
|
||||
MCH_TF.SAWBLADE Or
|
||||
MCH_TF.MILL Or
|
||||
MCH_TF.MORTISE Or
|
||||
MCH_TF.CHISEL Or
|
||||
MCH_TF.WATERJET Or
|
||||
MCH_TF.COMPO)
|
||||
Dim bFounded As Boolean = False
|
||||
Dim ToolToImportFamily As ImpExpToolFamily
|
||||
For Each ToolToImportFamily In ToolToImportList
|
||||
If (ToolFamily = ToolToImportFamily.FamilyType) Then
|
||||
ToolToImportFamily.ToolList.Add(New ImpExpToolItem(ToolName, AlreadyExist(ToolName)))
|
||||
bFounded = True
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
If Not bFounded Then
|
||||
Dim NewFamily As New ImpExpToolFamily(GetToolFamilyName(ToolFamily), ToolFamily)
|
||||
NewFamily.ToolList.Add(New ImpExpToolItem(ToolName, AlreadyExist(ToolName)))
|
||||
ToolToImportList.Add(NewFamily)
|
||||
End If
|
||||
Next
|
||||
Dim ImportWndVM As New ImportExportToolWindowVM(ToolToImportList, False, ImportFilePath, ImportFileToolNameList)
|
||||
Dim ImportWnd As New ImportExportToolWD(Application.Current.MainWindow, ImportWndVM)
|
||||
|
||||
ImportWnd.ShowDialog()
|
||||
' Aggiungo all'albero visualizzato gli utensili appena importati
|
||||
If ImportWnd.OkResult Then
|
||||
LoadImportedMachineTools(ImportWndVM.vsImported)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Function AlreadyExist(ToolName As String) As Boolean
|
||||
Dim ToolFamily As CathegoryItem
|
||||
For Each ToolFamily In ToolsList
|
||||
Dim ToolItem As CustomItem
|
||||
For Each ToolItem In ToolFamily.Items
|
||||
If ToolName = ToolItem.Name Then
|
||||
Return True
|
||||
End If
|
||||
Next
|
||||
Next
|
||||
Return False
|
||||
End Function
|
||||
|
||||
Private Function GetToolFamilyName(NewToolFamily As Integer) As String
|
||||
Dim ToolFamily As CathegoryItem
|
||||
For Each ToolFamily In ToolsList
|
||||
If NewToolFamily = ToolFamily.nTType Then
|
||||
Return ToolFamily.Name
|
||||
End If
|
||||
Next
|
||||
Return ""
|
||||
End Function
|
||||
|
||||
Private Sub LoadImportedMachineTools(vsImportedTools As String())
|
||||
' Leggo tutti gli utensili presenti nella Macchina (quindi anche quelli appena importati).
|
||||
Dim ActiveToolsFamilies() As ToolsFamily = MyReadToolFamilies(m_CurrMachine.sMachIniFile)
|
||||
Dim ToolsFamilyIndex As Integer = 0
|
||||
Dim ToolsFamilyItem As ToolsFamily
|
||||
For Each ToolsFamilyItem In ActiveToolsFamilies
|
||||
' dalla lista che ho ricavato dalla libreria recupero gli utensili associati
|
||||
Dim FamilyTreeView As New CathegoryItem(ToolsFamilyItem.Name, ToolsFamilyItem.Id)
|
||||
Dim ToolFamilyItem = ToolsList.FirstOrDefault(Function(ToolFamily) ToolFamily.nTType = ToolsFamilyItem.Id)
|
||||
If IsNothing(ToolFamilyItem) Then
|
||||
ToolsList.Insert(ToolsFamilyIndex, FamilyTreeView)
|
||||
Else
|
||||
' ricerco l'indice nella lista Tools
|
||||
|
||||
End If
|
||||
Dim nType As Integer = 0
|
||||
Dim ToolName As String = String.Empty
|
||||
Dim ToolIndex As Integer = 0
|
||||
'EgtSetCurrentContext(ToolScene.GetCtx())
|
||||
EgtSetCurrentContext(m_MainWindow.m_CurrentProjectPageUC.CurrentProjectScene.GetCtx())
|
||||
If EgtTdbGetFirstTool(ToolsFamilyItem.Id, ToolName, nType) Then
|
||||
Dim ToolItem = ToolsList(ToolsFamilyIndex).Items.FirstOrDefault(Function(Tool) Tool.Name = ToolName)
|
||||
If IsNothing(ToolItem) Then
|
||||
' Se leggo un utensile non presente nella ToolsList visualizzata lo aggiungo ad essa.
|
||||
Dim NewToolName As New CustomItem(ToolName, nType)
|
||||
ToolsList(ToolsFamilyIndex).Items.Insert(ToolIndex, NewToolName)
|
||||
'NewToolName.IsSelected = True
|
||||
ElseIf vsImportedTools.Contains(ToolName) Then
|
||||
' Se un utensile è presente nella ToolsList visualizzata ma nel contempo è nell'array vsImported
|
||||
' vuol dire che è stato sovrascritto perciò lo rimuovo e lo riaggiungo alla ToolsList.
|
||||
ToolsList(ToolsFamilyIndex).Items.Remove(ToolsList(ToolsFamilyIndex).Items.FirstOrDefault(Function(Tool) Tool.Name = ToolName))
|
||||
Dim NewToolName As New CustomItem(ToolName, nType)
|
||||
ToolsList(ToolsFamilyIndex).Items.Insert(ToolIndex, NewToolName)
|
||||
'NewToolName.IsSelected = True
|
||||
End If
|
||||
ToolIndex += 1
|
||||
While EgtTdbGetNextTool(ToolsFamilyItem.Id, ToolName, nType)
|
||||
ToolItem = ToolsList(ToolsFamilyIndex).Items.FirstOrDefault(Function(Tool) Tool.Name = ToolName)
|
||||
If IsNothing(ToolItem) Then
|
||||
' Se leggo un utensile non presente nella ToolsList visualizzata lo aggiungo ad essa.
|
||||
Dim NewToolName As New CustomItem(ToolName, nType)
|
||||
ToolsList(ToolsFamilyIndex).Items.Insert(ToolIndex, NewToolName)
|
||||
'NewToolName.IsSelected = True
|
||||
ElseIf vsImportedTools.Contains(ToolName) Then
|
||||
' Se un utensile è presente nella ToolsList visualizzata ma nel contempo è nell'array vsImported
|
||||
' vuol dire che è stato sovrascritto perciò lo rimuovo e lo riaggiungo alla ToolsList.
|
||||
ToolsList(ToolsFamilyIndex).Items.Remove(ToolsList(ToolsFamilyIndex).Items.FirstOrDefault(Function(Tool) Tool.Name = ToolName))
|
||||
Dim NewToolName As New CustomItem(ToolName, nType)
|
||||
ToolsList(ToolsFamilyIndex).Items.Insert(ToolIndex, NewToolName)
|
||||
'NewToolName.IsSelected = True
|
||||
End If
|
||||
ToolIndex += 1
|
||||
End While
|
||||
End If
|
||||
ToolsFamilyIndex += 1
|
||||
Next
|
||||
|
||||
End Sub
|
||||
|
||||
Public Function MyReadToolFamilies(sMachineIniPath As String) As ToolsFamily()
|
||||
Dim ActiveToolsFamiliesList As New List(Of ToolsFamily)
|
||||
|
||||
' Se il materiale lavorato è Marmo l'ordine di lettura e inserimento di Punta e Lama nelle famiglie di utensili attivi è invertito
|
||||
If EgtUILib.GetPrivateProfileInt(S_TOOLS, K_SAWBLADE, 0, sMachineIniPath) <> 0 Then
|
||||
ActiveToolsFamiliesList.Add(New ToolsFamily(MCH_TF.SAWBLADE, EgtMsg(31000 + 2)))
|
||||
End If
|
||||
If EgtUILib.GetPrivateProfileInt(S_TOOLS, K_DRILLBIT, 0, sMachineIniPath) <> 0 Then
|
||||
ActiveToolsFamiliesList.Add(New ToolsFamily(MCH_TF.DRILLBIT, EgtMsg(31000 + 1)))
|
||||
End If
|
||||
|
||||
|
||||
If EgtUILib.GetPrivateProfileInt(S_TOOLS, K_MILL, 0, sMachineIniPath) <> 0 Then
|
||||
ActiveToolsFamiliesList.Add(New ToolsFamily(MCH_TF.MILL, EgtMsg(31000 + 3)))
|
||||
End If
|
||||
If EgtUILib.GetPrivateProfileInt(S_TOOLS, "CupWheel", 0, sMachineIniPath) <> 0 Then
|
||||
ActiveToolsFamiliesList.Add(New ToolsFamily(MCH_TF.MILL, EgtMsg(90754)))
|
||||
End If
|
||||
If EgtUILib.GetPrivateProfileInt(S_TOOLS, "PolishingWheel", 0, sMachineIniPath) <> 0 Then
|
||||
ActiveToolsFamiliesList.Add(New ToolsFamily(MCH_TF.MILL, EgtMsg(90756)))
|
||||
End If
|
||||
|
||||
If EgtUILib.GetPrivateProfileInt(S_TOOLS, K_MORTISE, 0, sMachineIniPath) <> 0 Then
|
||||
ActiveToolsFamiliesList.Add(New ToolsFamily(MCH_TF.MORTISE, EgtMsg(31000 + 4)))
|
||||
End If
|
||||
If EgtUILib.GetPrivateProfileInt(S_TOOLS, K_CHISEL, 0, sMachineIniPath) <> 0 Then
|
||||
ActiveToolsFamiliesList.Add(New ToolsFamily(MCH_TF.CHISEL, EgtMsg(31000 + 9)))
|
||||
End If
|
||||
If EgtUILib.GetPrivateProfileInt(S_TOOLS, K_COMPO, 0, sMachineIniPath) <> 0 Then
|
||||
ActiveToolsFamiliesList.Add(New ToolsFamily(MCH_TF.COMPO, EgtMsg(31000 + 5)))
|
||||
End If
|
||||
If EgtUILib.GetPrivateProfileInt(S_TOOLS, K_WATERJET, 0, sMachineIniPath) <> 0 Then
|
||||
ActiveToolsFamiliesList.Add(New ToolsFamily(MCH_TF.WATERJET, EgtMsg(31010)))
|
||||
End If
|
||||
Return ActiveToolsFamiliesList.ToArray
|
||||
End Function
|
||||
|
||||
Friend Sub InitializeToolGroup(bEnabled As Boolean, nTType As Integer, sFName As String)
|
||||
If Not bEnabled Then Return
|
||||
' Inserisco categoria ed eventuali elementi
|
||||
Dim ToolCathegory As New CathegoryItem( sFName, nTType)
|
||||
Dim ToolCathegory As New CathegoryItem(sFName, nTType)
|
||||
Dim nType As Integer = 0
|
||||
Dim ToolName As String = String.Empty
|
||||
Dim bFound As Boolean = EgtTdbGetFirstTool( nTType, ToolName, nType)
|
||||
Dim bFound As Boolean = EgtTdbGetFirstTool(nTType, ToolName, nType)
|
||||
While bFound
|
||||
If nType = nTType Then ToolCathegory.Items.Add( New CustomItem( ToolName, nType))
|
||||
bFound = EgtTdbGetNextTool( nTType, ToolName, nType)
|
||||
If nType = nTType Then ToolCathegory.Items.Add(New CustomItem(ToolName, nType))
|
||||
bFound = EgtTdbGetNextTool(nTType, ToolName, nType)
|
||||
End While
|
||||
ToolsList.Add( ToolCathegory)
|
||||
ToolsList.Add(ToolCathegory)
|
||||
End Sub
|
||||
|
||||
Private Sub GetToolParams()
|
||||
@@ -545,7 +753,7 @@ Public Class ToolsDbPageUC
|
||||
HeadTxBx.Text = ToolString
|
||||
EgtTdbGetCurrToolParam(MCH_TP.EXIT_, ToolInt)
|
||||
ExitTxBx.Text = ToolInt.ToString()
|
||||
if Not GetSpecials() Then
|
||||
If Not GetSpecials() Then
|
||||
EgtTdbGetCurrToolParam(MCH_TP.USERNOTES, ToolString)
|
||||
UserNotesTxBx.Text = ToolString
|
||||
End If
|
||||
@@ -601,7 +809,7 @@ Public Class ToolsDbPageUC
|
||||
EgtTdbSetCurrToolParam(MCH_TP.HEAD, HeadTxBx.Text)
|
||||
Int32.TryParse(ExitTxBx.Text, nTemp)
|
||||
EgtTdbSetCurrToolParam(MCH_TP.EXIT_, nTemp)
|
||||
if Not SetSpecials() Then
|
||||
If Not SetSpecials() Then
|
||||
EgtTdbSetCurrToolParam(MCH_TP.USERNOTES, UserNotesTxBx.Text)
|
||||
End If
|
||||
End Sub
|
||||
@@ -637,7 +845,7 @@ Public Class ToolsDbPageUC
|
||||
Dim bShowUserNotes As Boolean = ((m_nToolType = MCH_TY.SAW_STD And m_CurrMachine.ShowUserNotes <> 0) Or m_CurrMachine.ShowUserNotes = 1)
|
||||
UserNotesTxBl.Visibility = If(bShowUserNotes, Windows.Visibility.Visible, Windows.Visibility.Hidden)
|
||||
UserNotesTxBx.Visibility = If(bShowUserNotes, Windows.Visibility.Visible, Windows.Visibility.Hidden)
|
||||
Dim bShowSpecials As Boolean = ((m_nToolType = MCH_TY.SAW_STD And m_CurrMachine.ShowSpecials <> 0) Or m_CurrMachine.ShowSpecials = 1)
|
||||
Dim bShowSpecials As Boolean = ((m_nToolType = MCH_TY.SAW_STD And m_CurrMachine.ShowSpecials <> 0) Or m_CurrMachine.ShowSpecials = 1)
|
||||
SerNbrTxBl.Visibility = If(bShowSpecials, Windows.Visibility.Visible, Windows.Visibility.Hidden)
|
||||
SerNbrTxBx.Visibility = If(bShowSpecials, Windows.Visibility.Visible, Windows.Visibility.Hidden)
|
||||
CodeTxBl.Visibility = If(bShowSpecials, Windows.Visibility.Visible, Windows.Visibility.Hidden)
|
||||
@@ -759,6 +967,10 @@ Public Class ToolsDbPageUC
|
||||
nMsg = MSG_TOOLSDBPAGEUC + 23 ' Spessore
|
||||
Case MCH_TP.MAXMAT
|
||||
nMsg = MSG_TOOLSDBPAGEUC + 24 ' Tagliente
|
||||
Case MCH_TP.CORE
|
||||
nMsg = 90720 ' Anima
|
||||
Case STEM
|
||||
nMsg = 90719 ' Lunghezza portautensile
|
||||
End Select
|
||||
' Predispongo calcolatrice (converto sempre in UIUnits perchè tutte lunghezze)
|
||||
Dim EgtCalculator As New EgtCalculatorWD(m_MainWindow, EgtToUiUnits(dVal), 300, WidthType.PIXEL, 0, 0, EgtMsg(nMsg))
|
||||
@@ -776,7 +988,7 @@ Public Class ToolsDbPageUC
|
||||
Private Sub RecreateToolDraw(ByVal dVal As Double)
|
||||
' Salvo il vecchio valore
|
||||
Dim dOldVal As Double
|
||||
GetVariableValue( dOldVal)
|
||||
GetVariableValue(dOldVal)
|
||||
' Aggiorno dati utensile
|
||||
SetVariableValue(dVal)
|
||||
' Creo utensile
|
||||
@@ -789,7 +1001,20 @@ Public Class ToolsDbPageUC
|
||||
Private Function GetVariableValue(ByRef dVal As Double) As Boolean
|
||||
' Recupero valore variabile
|
||||
EgtSetCurrentContext(m_MainWindow.m_CurrentProjectPageUC.CurrentProjectScene.GetCtx())
|
||||
Return EgtTdbGetCurrToolParam(GetVariableType(), dVal)
|
||||
Dim nVarType As Integer = GetVariableType()
|
||||
If m_nToolType <> MCH_TY.SAW_STD OrElse nVarType <> STEM Then
|
||||
Return EgtTdbGetCurrToolParam(nVarType, dVal)
|
||||
Else
|
||||
Dim dL, dCore, dTh As Double
|
||||
If EgtTdbGetCurrToolParam(MCH_TP.LEN, dL) AndAlso
|
||||
EgtTdbGetCurrToolParam(MCH_TP.CORE, dCore) AndAlso
|
||||
EgtTdbGetCurrToolParam(MCH_TP.THICK, dTh) Then
|
||||
dVal = Math.Max(dL - (dCore + dTh) / 2, 0.0)
|
||||
Return True
|
||||
Else
|
||||
Return False
|
||||
End If
|
||||
End If
|
||||
End Function
|
||||
|
||||
Private Function SetVariableValue(ByVal dVal As Double) As Boolean
|
||||
@@ -803,6 +1028,30 @@ Public Class ToolsDbPageUC
|
||||
EgtTdbSetCurrToolParam(MCH_TP.TOTLEN, dVal + 1)
|
||||
Case MCH_TP.DIAM
|
||||
EgtTdbSetCurrToolParam(MCH_TP.TOTDIAM, dVal)
|
||||
Case MCH_TP.THICK
|
||||
If m_bNewSawbladeMaker Then
|
||||
Dim dTh, dLen As Double
|
||||
If EgtTdbGetCurrToolParam(MCH_TP.THICK, dTh) AndAlso
|
||||
EgtTdbGetCurrToolParam(MCH_TP.LEN, dLen) Then
|
||||
Dim dNewLen As Double = dLen + ((dVal - dTh) / 2)
|
||||
EgtTdbSetCurrToolParam(MCH_TP.LEN, dNewLen)
|
||||
EgtTdbSetCurrToolParam(MCH_TP.TOTLEN, dNewLen + 1)
|
||||
Else
|
||||
Return False
|
||||
End If
|
||||
End If
|
||||
Case MCH_TP.CORE
|
||||
If m_bNewSawbladeMaker Then
|
||||
Dim dCore, dLen As Double
|
||||
If EgtTdbGetCurrToolParam(MCH_TP.CORE, dCore) AndAlso
|
||||
EgtTdbGetCurrToolParam(MCH_TP.LEN, dLen) Then
|
||||
Dim dNewLen As Double = dLen + ((dVal - dCore) / 2)
|
||||
EgtTdbSetCurrToolParam(MCH_TP.LEN, dNewLen)
|
||||
EgtTdbSetCurrToolParam(MCH_TP.TOTLEN, dNewLen + 1)
|
||||
Else
|
||||
Return False
|
||||
End If
|
||||
End If
|
||||
End Select
|
||||
ElseIf m_nToolType = MCH_TY.DRILL_STD Then
|
||||
Select Case nType
|
||||
@@ -828,7 +1077,19 @@ Public Class ToolsDbPageUC
|
||||
EgtTdbSetCurrToolParam(MCH_TP.TOTDIAM, dVal)
|
||||
End Select
|
||||
End If
|
||||
Return EgtTdbSetCurrToolParam(nType, dVal)
|
||||
If m_nToolType <> MCH_TY.SAW_STD OrElse nType <> STEM Then
|
||||
Return EgtTdbSetCurrToolParam(nType, dVal)
|
||||
Else
|
||||
Dim dCore, dTh As Double
|
||||
If EgtTdbGetCurrToolParam(MCH_TP.CORE, dCore) AndAlso
|
||||
EgtTdbGetCurrToolParam(MCH_TP.THICK, dTh) Then
|
||||
Dim dL As Double = Math.Max(dVal, 0.0) + ((dCore + dTh) / 2)
|
||||
EgtTdbSetCurrToolParam(MCH_TP.TOTLEN, dL + 1)
|
||||
Return EgtTdbSetCurrToolParam(MCH_TP.LEN, dL)
|
||||
Else
|
||||
Return False
|
||||
End If
|
||||
End If
|
||||
End Function
|
||||
|
||||
Private Function GetVariableType() As Integer
|
||||
@@ -841,6 +1102,10 @@ Public Class ToolsDbPageUC
|
||||
nType = MCH_TP.THICK
|
||||
ElseIf m_sCurrVar = "MAXMAT" Then
|
||||
nType = MCH_TP.MAXMAT
|
||||
ElseIf m_sCurrVar = "CORE" Then
|
||||
nType = MCH_TP.CORE
|
||||
ElseIf m_sCurrVar = "STEM" Then
|
||||
nType = STEM
|
||||
End If
|
||||
Return nType
|
||||
End Function
|
||||
@@ -902,6 +1167,13 @@ Public Class ToolsDbPageUC
|
||||
EgtTdbSetCurrToolParam(MCH_TP.THICK, dToolThick)
|
||||
EgtOutLog("ToolThick too small ->" & DoubleToString(dToolThick, 1))
|
||||
End If
|
||||
Dim dToolCore As Double
|
||||
EgtTdbGetCurrToolParam(MCH_TP.CORE, dToolCore)
|
||||
If dToolCore < EPS_SMALL Then
|
||||
dToolCore = If(dToolLen >= dToolThick, dToolThick - 1, 2 * dToolLen - dToolThick)
|
||||
EgtTdbSetCurrToolParam(MCH_TP.CORE, dToolCore)
|
||||
EgtOutLog("ToolCore too small ->" & DoubleToString(dToolCore, 1))
|
||||
End If
|
||||
Dim dToolMaxMat As Double
|
||||
EgtTdbGetCurrToolParam(MCH_TP.MAXMAT, dToolMaxMat)
|
||||
If dToolMaxMat < EPS_SMALL Then
|
||||
@@ -1004,7 +1276,7 @@ Public Class ToolsDbPageUC
|
||||
End Function
|
||||
|
||||
Private Function CreateToolDraw() As Boolean
|
||||
Dim nErr As Integer = EgtTdbCurrToolDraw( m_MainWindow.m_CurrentProjectPageUC.CurrentProjectScene.GetCtx(), ToolScene.GetCtx())
|
||||
Dim nErr As Integer = EgtTdbCurrToolDraw(m_MainWindow.m_CurrentProjectPageUC.CurrentProjectScene.GetCtx(), ToolScene.GetCtx())
|
||||
EgtSetCurrentContext(ToolScene.GetCtx())
|
||||
Return (nErr = 0)
|
||||
End Function
|
||||
@@ -1057,4 +1329,4 @@ Public Class ToolsDbPageUC
|
||||
End If
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
End Class
|
||||
@@ -0,0 +1,263 @@
|
||||
<UserControl x:Class="WaterJetPageUC"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:self="clr-namespace:OmagCUT.TreeViewItem"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="768" d:DesignWidth="1280" Initialized="WaterJetPage_Initialized">
|
||||
|
||||
<!-- Definizione della PolishingsPage -->
|
||||
<Border Style="{DynamicResource OmagCut_PageBorder}">
|
||||
|
||||
<Grid Name="WaterJetPageGrid" >
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="3*"/>
|
||||
<ColumnDefinition Width="8*"/>
|
||||
<ColumnDefinition Width="4*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="8*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<!--Lista dei materiali-->
|
||||
<GroupBox Name="MaterialGpBx" Style="{DynamicResource OmagCut_GroupBox}" Grid.Column="0"
|
||||
Header="{Binding Material_Msg}"
|
||||
Grid.Row="0" BorderThickness="0">
|
||||
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="7*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<!--Lista dei materiali-->
|
||||
<ListBox Name="MaterialsLstBx"
|
||||
ItemsSource="{Binding MaterialList}" SelectedItem="{Binding SelMaterial}"
|
||||
Grid.RowSpan="2">
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding Name}" Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</DataTemplate>
|
||||
</ListBox.ItemTemplate>
|
||||
</ListBox>
|
||||
<!--Campo visualizzato solo per aggiungere un nuovo materiale-->
|
||||
<EgtWPFLib:EgtTextBox Name="NewMaterialNameTxBx" Grid.Row="1"
|
||||
Width="220"
|
||||
Text="{Binding sNewMaterial}"
|
||||
Visibility="{Binding NewMaterial_Visibility}"
|
||||
Style="{DynamicResource OmagCut_KeyboardTextBox}"
|
||||
KeyboardPosition="Top"/>
|
||||
<!--Pulsanti per aggiungere/rimuovere/salvare la lista-->
|
||||
<UniformGrid Grid.Row="2" Columns="3">
|
||||
<Button Name="NewMaterialBtn" Grid.Column="0"
|
||||
Content="{Binding New_Msg}"
|
||||
Command="{Binding NewMaterialCommand}"
|
||||
Style="{DynamicResource OmagCut_WjDbRightGrayGradientYellowTextButton}"/>
|
||||
<Button Name="DeleteMaterialBtn" Grid.Column="1"
|
||||
Content="{Binding Delete_Msg}"
|
||||
Command="{Binding DeleteMaterialCommand}"
|
||||
Style="{DynamicResource OmagCut_WjDbRightGrayGradientYellowTextButton}"/>
|
||||
<Button Name="ModifyMaterialBtn" Grid.Column="1"
|
||||
Content="{Binding Modify_Msg}"
|
||||
Command="{Binding ModifyMaterialCommand}"
|
||||
Style="{DynamicResource OmagCut_WjDbRightGrayGradientYellowTextButton}"/>
|
||||
</UniformGrid>
|
||||
|
||||
</Grid>
|
||||
|
||||
</GroupBox>
|
||||
|
||||
<!--Raggruppo all'interno della stessa cornice le sottocatogorie e i parametri-->
|
||||
<Border Style="{DynamicResource OmagCut_Border}"
|
||||
Grid.Column="1" Grid.Row="0"
|
||||
Grid.ColumnSpan="2" Grid.RowSpan="1">
|
||||
|
||||
<Grid Name="SubMaterialGrd" Grid.Column="1">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<!--Sottocategoria dei materiali associata alla lista precedente-->
|
||||
<GroupBox Name="SubMaterialGpBx" Style="{DynamicResource OmagCut_GroupBox}"
|
||||
Header="{Binding SubMaterial_Msg}"
|
||||
Grid.Column="0" Grid.Row="0"
|
||||
Grid.ColumnSpan="1" Grid.RowSpan="8" BorderThickness="0">
|
||||
|
||||
<Grid Grid.Column="1">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="7*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<!--Lista dei materiali-->
|
||||
<ListBox Name="SubMaterialsLstBx" ItemsSource="{Binding Path=SelectedItem.SubMaterialList, ElementName=MaterialsLstBx}"
|
||||
SelectedItem="{Binding Path=SelectedItem.SelSubMaterial, ElementName=MaterialsLstBx}"
|
||||
Grid.RowSpan="2">
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding Name}" Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</DataTemplate>
|
||||
</ListBox.ItemTemplate>
|
||||
</ListBox>
|
||||
|
||||
<!--Campo visualizzato solo per aggiungere un nuovo materiale-->
|
||||
<EgtWPFLib:EgtTextBox Name="NewSubMaterialNameTxBx" Grid.Row="1"
|
||||
Width="220"
|
||||
Text="{Binding sNewSubMaterial}"
|
||||
Visibility="{Binding NewSubMaterial_Visibility}"
|
||||
Style="{DynamicResource OmagCut_KeyboardTextBox}"
|
||||
KeyboardPosition="Top"/>
|
||||
|
||||
<!--Pulsanti per aggiungere/rimuovere/salvare la lista-->
|
||||
<UniformGrid Grid.Row="2" Columns="3">
|
||||
<Button Name="NewSubMaterialBtn" Grid.Column="0"
|
||||
Content="{Binding New_Msg}"
|
||||
Command="{Binding NewSubMaterialCommand}"
|
||||
Style="{DynamicResource OmagCut_WjDbRightGrayGradientYellowTextButton}"/>
|
||||
<Button Name="RemoveSubMaterialBtn" Grid.Column="1"
|
||||
Content="{Binding Delete_Msg}"
|
||||
Command="{Binding DeleteSubMaterialCommand}"
|
||||
Style="{DynamicResource OmagCut_WjDbRightGrayGradientYellowTextButton}"/>
|
||||
<Button Name="ModifySubMaterialBtn" Grid.Column="1"
|
||||
Content="{Binding Modify_Msg}"
|
||||
Command="{Binding ModifySubMaterialCommand}"
|
||||
Style="{DynamicResource OmagCut_WjDbRightGrayGradientYellowTextButton}"/>
|
||||
</UniformGrid>
|
||||
|
||||
</Grid>
|
||||
|
||||
</GroupBox>
|
||||
|
||||
<!--Lista dei parametri associata alla sottovcategoria dei materiali-->
|
||||
<GroupBox Name="ParamsGpBx"
|
||||
Grid.Column="1" Grid.Row="0" Margin="0,0,0,3"
|
||||
Grid.ColumnSpan="3" Grid.RowSpan="8" BorderThickness="0">
|
||||
|
||||
<!--Titolazione delle colonne della tabella-->
|
||||
<GroupBox.Header >
|
||||
<Grid Width="700">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<TextBlock Text="{Binding Thickness_Msg}" Grid.Column="0" HorizontalAlignment="Center"
|
||||
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"
|
||||
FontSize="{DynamicResource FontSize_GroupBoxHeader}"/>
|
||||
<TextBlock Text="{Binding Q1_Msg}" Grid.Column="1" HorizontalAlignment="Center"
|
||||
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"
|
||||
FontSize="{DynamicResource FontSize_GroupBoxHeader}"/>
|
||||
<TextBlock Text="{Binding Q2_Msg}" Grid.Column="2" HorizontalAlignment="Center"
|
||||
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"
|
||||
FontSize="{DynamicResource FontSize_GroupBoxHeader}"/>
|
||||
<TextBlock Text="{Binding Q3_Msg}" Grid.Column="3" HorizontalAlignment="Center"
|
||||
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"
|
||||
FontSize="{DynamicResource FontSize_GroupBoxHeader}"/>
|
||||
<TextBlock Text="{Binding Q4_Msg}" Grid.Column="4" HorizontalAlignment="Center"
|
||||
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"
|
||||
FontSize="{DynamicResource FontSize_GroupBoxHeader}"/>
|
||||
<TextBlock Text="{Binding Q5_Msg}" Grid.Column="5" HorizontalAlignment="Center"
|
||||
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"
|
||||
FontSize="{DynamicResource FontSize_GroupBoxHeader}"/>
|
||||
<TextBlock Text="{Binding QExtra_Msg}" Grid.Column="6" HorizontalAlignment="Center"
|
||||
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"
|
||||
FontSize="{DynamicResource FontSize_GroupBoxHeader}"/>
|
||||
</Grid>
|
||||
|
||||
</GroupBox.Header>
|
||||
|
||||
<!--Definizione della Grid dei parametri delle lavorazioni-->
|
||||
<Grid Grid.Column="2">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="7*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<ListBox Name="ParamLstBx"
|
||||
ItemsSource="{Binding Path=SelectedItem.ParamList , ElementName=SubMaterialsLstBx}"
|
||||
SelectedItem="{Binding Path=SelectedItem.SelWjParam , ElementName=SubMaterialsLstBx}"
|
||||
Margin="0,0,0,0"
|
||||
Grid.RowSpan="2">
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Grid Width="700">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<EgtWPFLib:EgtTextBox Text="{Binding Thickness}" Grid.Column="0"
|
||||
Style="{DynamicResource OmagCut_CalculatorParamWjTextBox}" />
|
||||
<EgtWPFLib:EgtTextBox Text="{Binding Q1}" Grid.Column="1"
|
||||
Style="{DynamicResource OmagCut_CalculatorParamWjTextBox}" />
|
||||
<EgtWPFLib:EgtTextBox Text="{Binding Q2}" Grid.Column="2"
|
||||
Style="{DynamicResource OmagCut_CalculatorParamWjTextBox}" />
|
||||
<EgtWPFLib:EgtTextBox Text="{Binding Q3}" Grid.Column="3"
|
||||
Style="{DynamicResource OmagCut_CalculatorParamWjTextBox}" />
|
||||
<EgtWPFLib:EgtTextBox Text="{Binding Q4}" Grid.Column="4"
|
||||
Style="{DynamicResource OmagCut_CalculatorParamWjTextBox}" />
|
||||
<EgtWPFLib:EgtTextBox Text="{Binding Q5}" Grid.Column="5"
|
||||
Style="{DynamicResource OmagCut_CalculatorParamWjTextBox}" />
|
||||
<EgtWPFLib:EgtTextBox Text="{Binding QExtra}" Grid.Column="6"
|
||||
Style="{DynamicResource OmagCut_CalculatorParamWjTextBox}" />
|
||||
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</ListBox.ItemTemplate>
|
||||
</ListBox>
|
||||
|
||||
<UniformGrid Grid.Row="2" Columns="9" Grid.ColumnSpan="3">
|
||||
<Button Name="NewParamBtn" Grid.Column="0"
|
||||
Command="{Binding NewWjParamCommand}"
|
||||
Content="{Binding New_Msg}"
|
||||
Style="{DynamicResource OmagCut_WjDbRightGrayGradientYellowTextButton}"/>
|
||||
<Button Name="RemoveParamBtn" Grid.Column="1"
|
||||
Command="{Binding DeleteWjParamCommand}"
|
||||
Content="{Binding Delete_Msg}"
|
||||
Style="{DynamicResource OmagCut_WjDbRightGrayGradientYellowTextButton}"/>
|
||||
</UniformGrid>
|
||||
|
||||
</Grid>
|
||||
|
||||
</GroupBox>
|
||||
|
||||
</Grid>
|
||||
</Border>
|
||||
<Button Name="SaveKitBtn" Grid.Row="2" Grid.Column="2"
|
||||
Command="{Binding SaveCommand}"
|
||||
Content="{Binding Save_Msg}"
|
||||
Style="{DynamicResource OmagCut_RightGrayGradientYellowTextButton}"/>
|
||||
</Grid>
|
||||
|
||||
</Border>
|
||||
|
||||
</UserControl>
|
||||
@@ -0,0 +1,55 @@
|
||||
Imports System.Collections.ObjectModel
|
||||
Imports System.ComponentModel
|
||||
Imports EgtUILib
|
||||
Imports EgtWPFLib
|
||||
Imports EgtWPFLib5
|
||||
|
||||
Public Class WaterJetPageUC
|
||||
|
||||
' Riferimento alla MainWindow
|
||||
Private m_MainWindow As MainWindow = DirectCast(Application.Current.MainWindow, MainWindow)
|
||||
Private m_refWaterjetDbWindowVM As WaterjetDbWindowVM_OmagCUT
|
||||
Private m_sOrigNewMaterial As String = String.Empty
|
||||
Private m_sOrigNewSubMaterial As String = String.Empty
|
||||
|
||||
Private Sub WaterJetPage_Initialized(sender As Object, e As EventArgs)
|
||||
m_refWaterjetDbWindowVM = New WaterjetDbWindowVM_OmagCUT(m_MainWindow.m_CurrentMachine.sMachDir)
|
||||
Me.DataContext = m_refWaterjetDbWindowVM
|
||||
EgtWPFLib.Utility.MainWindow = m_MainWindow
|
||||
End Sub
|
||||
|
||||
Public Sub WaterJetPage_Reinitialize()
|
||||
m_refWaterjetDbWindowVM = New WaterjetDbWindowVM_OmagCUT(m_MainWindow.m_CurrentMachine.sMachDir)
|
||||
Me.DataContext = m_refWaterjetDbWindowVM
|
||||
End Sub
|
||||
|
||||
Private Sub NewMaterial_EgtOpening(sender As Object, e As EventArgs) Handles NewMaterialNameTxBx.EgtOpening
|
||||
m_sOrigNewMaterial = NewMaterialNameTxBx.Text
|
||||
End Sub
|
||||
|
||||
Private Sub NewSubMaterial_EgtOpening(sender As Object, e As EventArgs) Handles NewSubMaterialNameTxBx.EgtOpening
|
||||
m_sOrigNewSubMaterial = NewSubMaterialNameTxBx.Text
|
||||
End Sub
|
||||
|
||||
Private Sub NewMaterial_EgtClosed(sender As Object, e As EventArgs) Handles NewMaterialNameTxBx.EgtClosed
|
||||
m_refWaterjetDbWindowVM.sNewMaterial = NewMaterialNameTxBx.Text
|
||||
If String.IsNullOrEmpty(m_refWaterjetDbWindowVM.sNewMaterial) OrElse m_refWaterjetDbWindowVM.sNewMaterial = m_sOrigNewMaterial Then
|
||||
m_refWaterjetDbWindowVM.NewMaterial_Visibility = Visibility.Collapsed
|
||||
Else
|
||||
m_refWaterjetDbWindowVM.Done("")
|
||||
NewMaterialNameTxBx.Clear()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub NewSubMaterial_EgtClosed(sender As Object, e As EventArgs) Handles NewSubMaterialNameTxBx.EgtClosed
|
||||
m_refWaterjetDbWindowVM.sNewSubMaterial = NewSubMaterialNameTxBx.Text
|
||||
If String.IsNullOrEmpty(m_refWaterjetDbWindowVM.sNewSubMaterial) OrElse m_refWaterjetDbWindowVM.sNewSubMaterial = m_sOrigNewSubMaterial Then
|
||||
m_refWaterjetDbWindowVM.NewSubMaterial_Visibility = Visibility.Collapsed
|
||||
Else
|
||||
m_refWaterjetDbWindowVM.Done("")
|
||||
NewSubMaterialNameTxBx.Clear()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
@@ -0,0 +1,891 @@
|
||||
'Imports System.Collections.ObjectModel
|
||||
'Imports System.ComponentModel
|
||||
'Imports EgtUILib
|
||||
'Imports EgtWPFLib
|
||||
|
||||
'Public Class WaterJetPageVM
|
||||
' Private m_refWaterPageV As WaterJetPageUC
|
||||
|
||||
' ' lista dei materiali
|
||||
' Private m_ListMaterial As New ObservableCollection(Of MaterialWJ)
|
||||
' Public ReadOnly Property ListMaterial As ObservableCollection(Of MaterialWJ)
|
||||
' Get
|
||||
' Return m_ListMaterial
|
||||
' End Get
|
||||
' End Property
|
||||
' ' materiale selezionato
|
||||
' Private m_SelectedMaterial As MaterialWJ
|
||||
' Public Property SelectedMaterial As MaterialWJ
|
||||
' Get
|
||||
' Return m_SelectedMaterial
|
||||
' End Get
|
||||
' Set(value As MaterialWJ)
|
||||
' m_SelectedMaterial = value
|
||||
' End Set
|
||||
' End Property
|
||||
' ' submateriale selezionato
|
||||
' Private m_SelectedSubMaterial As SubMaterialWJ
|
||||
' Public Property SelectedSubMaterial As SubMaterialWJ
|
||||
' Get
|
||||
' Return m_SelectedSubMaterial
|
||||
' End Get
|
||||
' Set(value As SubMaterialWJ)
|
||||
' m_SelectedSubMaterial = value
|
||||
' End Set
|
||||
' End Property
|
||||
' ' lista parametri selezionata
|
||||
' Private m_SelectedParam As ParamWJ
|
||||
' Public Property SelectedParam As ParamWJ
|
||||
' Get
|
||||
' Return m_SelectedParam
|
||||
' End Get
|
||||
' Set(value As ParamWJ)
|
||||
' m_SelectedParam = value
|
||||
' End Set
|
||||
' End Property
|
||||
|
||||
' Private m_sNewMaterial As MaterialWJ
|
||||
' Public Property sNewMaterial As String
|
||||
' Get
|
||||
' Return m_sNewMaterial.sMaterial
|
||||
' End Get
|
||||
' Set(value As String)
|
||||
' m_sNewMaterial = New MaterialWJ(value)
|
||||
' End Set
|
||||
' End Property
|
||||
|
||||
' Private m_NewMaterialVisibility As Visibility = Visibility.Hidden
|
||||
' Public Property NewMaterialVisibility As Visibility
|
||||
' Get
|
||||
' Return m_NewMaterialVisibility
|
||||
' End Get
|
||||
' Set(value As Visibility)
|
||||
' m_NewMaterialVisibility = value
|
||||
' End Set
|
||||
' End Property
|
||||
|
||||
' Sub New(WaterJetPageV As WaterJetPageUC)
|
||||
' m_refWaterPageV = WaterJetPageV
|
||||
' ' Creo una lista di materiali come esempio
|
||||
' ListMaterial.Add(New MaterialWJ("Marmo"))
|
||||
' ListMaterial.Last.ListOfSubMaterial.Add(New SubMaterialWJ("Binaco"))
|
||||
' ListMaterial.Last.ListOfSubMaterial.Last.ListOfParam.Add(New ParamWJ("10", "Bq1", "Bq2", "Bq3", "Bq4", "Bq5"))
|
||||
' ListMaterial.Last.ListOfSubMaterial.Add(New SubMaterialWJ("Nero"))
|
||||
' ListMaterial.Last.ListOfSubMaterial.Last.ListOfParam.Add(New ParamWJ("20", "Nq1", "Nq2", "Nq3", "Nq4", "Nq5"))
|
||||
' ListMaterial.Add(New MaterialWJ("Granito"))
|
||||
' ListMaterial.Last.ListOfSubMaterial.Add(New SubMaterialWJ("GR_Binaco"))
|
||||
' ListMaterial.Last.ListOfSubMaterial.Last.ListOfParam.Add(New ParamWJ("15", "gBq1", "gBq2", "Bq3", "gBq4", "gBq5"))
|
||||
' ListMaterial.Last.ListOfSubMaterial.Last.ListOfParam.Add(New ParamWJ("15.5", "g_Bq1", "g_Bq2", "g_Bq3", "g_Bq4", "g_Bq5"))
|
||||
' ListMaterial.Last.ListOfSubMaterial.Last.ListOfParam.Add(New ParamWJ("15.8", "G_Bq1", "G_Bq2", "G_Bq3", "G_Bq4", "G_Bq5"))
|
||||
' ListMaterial.Last.ListOfSubMaterial.Add(New SubMaterialWJ("GR_Nero"))
|
||||
' ListMaterial.Last.ListOfSubMaterial.Last.ListOfParam.Add(New ParamWJ("18", "gNq1", "gNq2", "gNq3", "gNq4", "gNq5"))
|
||||
|
||||
' SelectedMaterial = m_ListMaterial(0)
|
||||
' SelectedSubMaterial = m_SelectedMaterial.ListOfSubMaterial(0)
|
||||
' SelectedParam = SelectedSubMaterial.ListOfParam(0)
|
||||
' End Sub
|
||||
|
||||
' Private m_cmdOk As ICommand
|
||||
' Public ReadOnly Property OkCommand() As ICommand
|
||||
' Get
|
||||
' If m_cmdOk Is Nothing Then
|
||||
' m_cmdOk = New Command(AddressOf Ok)
|
||||
' End If
|
||||
' Return m_cmdOk
|
||||
' End Get
|
||||
' End Property
|
||||
|
||||
' Private Sub Ok()
|
||||
' ' Mostro textbox per il nome
|
||||
' m_refWaterPageV.KitNameTxBx.Text = String.Empty
|
||||
' m_refWaterPageV.KitNameTxBx.Visibility = Windows.Visibility.Visible
|
||||
' m_refWaterPageV.KitsLstBx.SetValue(Grid.RowSpanProperty, 1)
|
||||
' MessageBox.Show("Prova di Binding", "Prova di Binding", MessageBoxButton.OK, MessageBoxImage.Asterisk, MessageBoxResult.OK)
|
||||
' m_refWaterPageV.KitNameTxBx.Visibility = Windows.Visibility.Hidden
|
||||
' m_refWaterPageV.KitsLstBx.SetValue(Grid.RowSpanProperty, 2)
|
||||
' End Sub
|
||||
|
||||
'End Class
|
||||
|
||||
|
||||
'Public Class MaterialWJ
|
||||
|
||||
' Private m_sMaterial As String = String.Empty
|
||||
' Public ReadOnly Property sMaterial As String
|
||||
' Get
|
||||
' Return m_sMaterial
|
||||
' End Get
|
||||
' End Property
|
||||
|
||||
' Private m_ListOfSubMaterial As New ObservableCollection(Of SubMaterialWJ)
|
||||
' Public Property ListOfSubMaterial As ObservableCollection(Of SubMaterialWJ)
|
||||
' Get
|
||||
' Return m_ListOfSubMaterial
|
||||
' End Get
|
||||
' Set(value As ObservableCollection(Of SubMaterialWJ))
|
||||
' m_ListOfSubMaterial = value
|
||||
' End Set
|
||||
' End Property
|
||||
|
||||
' Sub New(sMat As String)
|
||||
' m_sMaterial = sMat
|
||||
' End Sub
|
||||
|
||||
'End Class
|
||||
|
||||
'Public Class SubMaterialWJ
|
||||
|
||||
' Dim m_sSubMaterial As String
|
||||
' Public Property sSubMaterial As String
|
||||
' Get
|
||||
' Return m_sSubMaterial
|
||||
' End Get
|
||||
' Set(value As String)
|
||||
' m_sSubMaterial = value
|
||||
' End Set
|
||||
' End Property
|
||||
|
||||
' Private m_ListOfParam As New ObservableCollection(Of ParamWJ)
|
||||
' Public Property ListOfParam As ObservableCollection(Of ParamWJ)
|
||||
' Get
|
||||
' Return m_ListOfParam
|
||||
' End Get
|
||||
' Set(value As ObservableCollection(Of ParamWJ))
|
||||
' m_ListOfParam = value
|
||||
' End Set
|
||||
' End Property
|
||||
|
||||
' Sub New(sName As String)
|
||||
' m_sSubMaterial = sName
|
||||
' End Sub
|
||||
'End Class
|
||||
|
||||
'Public Class ParamWJ
|
||||
|
||||
' Private m_Thickness As String
|
||||
' Private m_Q1 As String
|
||||
' Private m_Q2 As String
|
||||
' Private m_Q3 As String
|
||||
' Private m_Q4 As String
|
||||
' Private m_Q5 As String
|
||||
|
||||
' Public Property Q1 As String
|
||||
' Get
|
||||
' Return m_Q1
|
||||
' End Get
|
||||
' Set(value As String)
|
||||
' m_Q1 = value
|
||||
' End Set
|
||||
' End Property
|
||||
|
||||
' Public Property Thickness As String
|
||||
' Get
|
||||
' Return m_Thickness
|
||||
' End Get
|
||||
' Set(value As String)
|
||||
' m_Thickness = value
|
||||
' End Set
|
||||
' End Property
|
||||
|
||||
' Public Property Q2 As String
|
||||
' Get
|
||||
' Return m_Q2
|
||||
' End Get
|
||||
' Set(value As String)
|
||||
' m_Q2 = value
|
||||
' End Set
|
||||
' End Property
|
||||
|
||||
' Public Property Q3 As String
|
||||
' Get
|
||||
' Return m_Q3
|
||||
' End Get
|
||||
' Set(value As String)
|
||||
' m_Q3 = value
|
||||
' End Set
|
||||
' End Property
|
||||
|
||||
' Public Property Q4 As String
|
||||
' Get
|
||||
' Return m_Q4
|
||||
' End Get
|
||||
' Set(value As String)
|
||||
' m_Q4 = value
|
||||
' End Set
|
||||
' End Property
|
||||
|
||||
' Public Property Q5 As String
|
||||
' Get
|
||||
' Return m_Q5
|
||||
' End Get
|
||||
' Set(value As String)
|
||||
' m_Q5 = value
|
||||
' End Set
|
||||
' End Property
|
||||
|
||||
' Sub New(sT As String, sQ1 As String, sQ2 As String, sQ3 As String, sQ4 As String, sQ5 As String)
|
||||
' m_Thickness = sT
|
||||
' m_Q1 = sQ1
|
||||
' m_Q2 = sQ2
|
||||
' m_Q3 = sQ3
|
||||
' m_Q4 = sQ4
|
||||
' m_Q5 = sQ5
|
||||
' End Sub
|
||||
|
||||
'End Class
|
||||
|
||||
Imports System.Collections.ObjectModel
|
||||
Imports System.IO
|
||||
Imports EgtUILib
|
||||
Imports EgtWPFLib5
|
||||
|
||||
Public Class WaterjetDbWindowVM
|
||||
Inherits VMBase
|
||||
' Riferimento alla MainWindow
|
||||
Private m_MainWindow As MainWindow = DirectCast(Application.Current.MainWindow, MainWindow)
|
||||
Private m_refWaterPageV As WaterJetPageUC
|
||||
|
||||
#Region "FIELDS & PROPERTIES"
|
||||
|
||||
|
||||
#Region "Materiali"
|
||||
Private Property m_MaterialList As ObservableCollection(Of WjMaterial)
|
||||
Public Property MaterialList As ObservableCollection(Of WjMaterial)
|
||||
Get
|
||||
Return m_MaterialList
|
||||
End Get
|
||||
Set(value As ObservableCollection(Of WjMaterial))
|
||||
m_MaterialList = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property m_SelMaterial As WjMaterial
|
||||
Public Property SelMaterial As WjMaterial
|
||||
Get
|
||||
Return m_SelMaterial
|
||||
End Get
|
||||
Set(value As WjMaterial)
|
||||
m_SelMaterial = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property m_sNewMaterial As String
|
||||
Public Property sNewMaterial As String
|
||||
Get
|
||||
Return m_sNewMaterial
|
||||
End Get
|
||||
Set(value As String)
|
||||
m_sNewMaterial = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property m_NewMaterial_Visibility As Visibility = Visibility.Collapsed
|
||||
Public Property NewMaterial_Visibility As Visibility
|
||||
Get
|
||||
Return m_NewMaterial_Visibility
|
||||
End Get
|
||||
Set(value As Visibility)
|
||||
m_NewMaterial_Visibility = value
|
||||
NotifyPropertyChanged(NameOf(NewMaterial_Visibility))
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "SubMateriali"
|
||||
Private Property m_SubMaterialList As New ObservableCollection(Of WjSubMaterial)
|
||||
Public Property SubMaterialList As ObservableCollection(Of WjSubMaterial)
|
||||
Get
|
||||
Return m_SubMaterialList
|
||||
End Get
|
||||
Set(value As ObservableCollection(Of WjSubMaterial))
|
||||
m_SubMaterialList = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
'Private Property m_SelSubMaterial As WjSubMaterial
|
||||
'Public Property SelSubMaterial As WjSubMaterial
|
||||
' Get
|
||||
' Return m_SelSubMaterial
|
||||
' End Get
|
||||
' Set(value As WjSubMaterial)
|
||||
' m_SelSubMaterial = value
|
||||
' End Set
|
||||
'End Property
|
||||
|
||||
Private Property m_sNewSubMaterial As String
|
||||
Public Property sNewSubMaterial As String
|
||||
Get
|
||||
Return m_sNewSubMaterial
|
||||
End Get
|
||||
Set(value As String)
|
||||
m_sNewSubMaterial = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property m_NewSubMaterial_Visibility As Visibility = Visibility.Collapsed
|
||||
Public Property NewSubMaterial_Visibility As Visibility
|
||||
Get
|
||||
Return m_NewSubMaterial_Visibility
|
||||
End Get
|
||||
Set(value As Visibility)
|
||||
m_NewSubMaterial_Visibility = value
|
||||
NotifyPropertyChanged(NameOf(NewSubMaterial_Visibility))
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "Parametri"
|
||||
Private Property m_ParamList As ObservableCollection(Of WjParam)
|
||||
Public Property ParamList As ObservableCollection(Of WjParam)
|
||||
Get
|
||||
Return m_ParamList
|
||||
End Get
|
||||
Set(value As ObservableCollection(Of WjParam))
|
||||
m_ParamList = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
'Private Property m_SelParam As WjParam
|
||||
'Public Property SelParam As WjParam
|
||||
' Get
|
||||
' Return m_SelParam
|
||||
' End Get
|
||||
' Set(value As WjParam)
|
||||
' m_SelParam = value
|
||||
' End Set
|
||||
'End Property
|
||||
|
||||
Private m_HeadParamLstBx_Width As Double
|
||||
Public ReadOnly Property HeadParamLstBx_Width As Double
|
||||
Get
|
||||
If m_HeadParamLstBx_Width < 10 Then
|
||||
Return 700
|
||||
End If
|
||||
Return m_HeadParamLstBx_Width
|
||||
End Get
|
||||
End Property
|
||||
|
||||
#End Region
|
||||
|
||||
Const S_MATERIALS As String = "Materials"
|
||||
|
||||
' Definizione comandi
|
||||
Private m_cmdNewMaterial As ICommand
|
||||
Private m_cmdDeleteMaterial As ICommand
|
||||
Private m_cmdNewSubMaterial As ICommand
|
||||
Private m_cmdDeleteSubMaterial As ICommand
|
||||
Private m_cmdNewWjParam As ICommand
|
||||
Private m_cmdDeleteWjParam As ICommand
|
||||
Private m_cmdSave As ICommand
|
||||
Private m_cmdDone As ICommand
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "MESSAGES"
|
||||
|
||||
Public ReadOnly Property Material_Msg As String
|
||||
Get
|
||||
Return "Materiale"
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property SubMaterial_Msg As String
|
||||
Get
|
||||
Return "SubMateriale"
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property Id_Msg As String
|
||||
Get
|
||||
Return "Id"
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property Thickness_Msg As String
|
||||
Get
|
||||
Return "Spessore"
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property Q1_Msg As String
|
||||
Get
|
||||
Return "Q1"
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property Q2_Msg As String
|
||||
Get
|
||||
Return "Q2"
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property Q3_Msg As String
|
||||
Get
|
||||
Return "Q3"
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property Q4_Msg As String
|
||||
Get
|
||||
Return "Q4"
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property Q5_Msg As String
|
||||
Get
|
||||
Return "Q5"
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property QExtra_Msg As String
|
||||
Get
|
||||
Return "QExtra"
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property New_Msg As String
|
||||
Get
|
||||
Return "Nuovo"
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property Delete_Msg As String
|
||||
Get
|
||||
Return "Elimina"
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property Save_Msg As String
|
||||
Get
|
||||
Return "Salva"
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property Modify_Msg As String
|
||||
Get
|
||||
Return "Modifica"
|
||||
End Get
|
||||
End Property
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "CONSTRUCTOR"
|
||||
|
||||
Sub New(refContext As WaterJetPageUC)
|
||||
' definisco il riferiento con la pagina xaml
|
||||
m_refWaterPageV = refContext
|
||||
' Leggo valori da file Data e li carico nelle proprietà
|
||||
Dim sFilePath As String = m_MainWindow.m_CurrentMachine.sMachDir & "\" & MACHININGS_DIR & "\" & WATERJETDB_FILE
|
||||
MaterialList = New ObservableCollection(Of WjMaterial)
|
||||
|
||||
If File.Exists(sFilePath) Then
|
||||
Dim sMaterial As String = String.Empty
|
||||
|
||||
If EgtUILib.GetPrivateProfileString(S_MATERIALS, "1", "", sMaterial, sFilePath) > 0 Then
|
||||
Dim sMaterials() As String = sMaterial.Split(","c)
|
||||
Dim ind As Integer = 0
|
||||
For ind = 0 To sMaterials.Length() - 1
|
||||
|
||||
'recupero i sottomateriali
|
||||
Dim Index As Integer = 1
|
||||
Dim sSubMat As String = String.Empty
|
||||
Dim SubMatList As New ObservableCollection(Of WjSubMaterial)
|
||||
While EgtUILib.GetPrivateProfileString(sMaterials(ind), Index.ToString(), "", sSubMat, sFilePath) > 0
|
||||
|
||||
|
||||
' recupero la lista dei Q
|
||||
Dim QInd As Integer = 1
|
||||
Dim sParam As String = String.Empty
|
||||
Dim QParamList As New ObservableCollection(Of WjParam)
|
||||
While EgtUILib.GetPrivateProfileString(sMaterials(ind) & "." & sSubMat, QInd.ToString(), "", sParam, sFilePath) > 0
|
||||
Dim sParams() As String = sParam.Split(","c)
|
||||
If sParams.Length() >= 7 Then
|
||||
Dim dThickness As Double
|
||||
Dim dQ1 As Double
|
||||
Dim dQ2 As Double
|
||||
Dim dQ3 As Double
|
||||
Dim dQ4 As Double
|
||||
Dim dQ5 As Double
|
||||
Dim dQExtra As Double
|
||||
StringToDouble(sParams(0), dThickness)
|
||||
StringToDouble(sParams(1), dQ1)
|
||||
StringToDouble(sParams(2), dQ2)
|
||||
StringToDouble(sParams(3), dQ3)
|
||||
StringToDouble(sParams(4), dQ4)
|
||||
StringToDouble(sParams(5), dQ5)
|
||||
StringToDouble(sParams(6), dQExtra)
|
||||
QParamList.Add(New WjParam(QInd, dThickness, dQ1, dQ2, dQ3, dQ4, dQ5, dQExtra, m_refWaterPageV))
|
||||
End If
|
||||
QInd += 1
|
||||
End While
|
||||
|
||||
SubMatList.Add(New WjSubMaterial(sSubMat, QParamList))
|
||||
Index += 1
|
||||
End While
|
||||
|
||||
MaterialList.Add(New WjMaterial(sMaterials(ind), SubMatList))
|
||||
Next
|
||||
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Public Sub RefreshDImensionPage()
|
||||
m_HeadParamLstBx_Width = m_refWaterPageV.ParamsGpBx.ActualWidth - 20
|
||||
NotifyPropertyChanged(NameOf(HeadParamLstBx_Width))
|
||||
End Sub
|
||||
|
||||
#End Region ' Constructor
|
||||
|
||||
#Region "COMMANDS"
|
||||
|
||||
#Region "NewMaterialCommand"
|
||||
|
||||
Public ReadOnly Property NewMaterialCommand As ICommand
|
||||
Get
|
||||
If m_cmdNewMaterial Is Nothing Then
|
||||
m_cmdNewMaterial = New Command(AddressOf NewMaterial)
|
||||
End If
|
||||
Return m_cmdNewMaterial
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Sub NewMaterial(ByVal param As Object)
|
||||
NewSubMaterial_Visibility = Visibility.Collapsed
|
||||
NewMaterial_Visibility = Visibility.Visible
|
||||
End Sub
|
||||
|
||||
#End Region ' NewMaterial
|
||||
|
||||
#Region "DeleteMaterialCommand"
|
||||
|
||||
Public ReadOnly Property DeleteMaterialCommand As ICommand
|
||||
Get
|
||||
If m_cmdDeleteMaterial Is Nothing Then
|
||||
m_cmdDeleteMaterial = New Command(AddressOf DeleteMaterial)
|
||||
End If
|
||||
Return m_cmdDeleteMaterial
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Sub DeleteMaterial(ByVal param As Object)
|
||||
If Not IsNothing(SelMaterial) Then
|
||||
MaterialList.Remove(SelMaterial)
|
||||
'SelMaterial.NotifyPropertyChanged(NameOf(MaterialList))
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#End Region ' DeleteMaterial
|
||||
|
||||
#Region "NewSubMaterialCommand"
|
||||
|
||||
Public ReadOnly Property NewSubMaterialCommand As ICommand
|
||||
Get
|
||||
If m_cmdNewSubMaterial Is Nothing Then
|
||||
m_cmdNewSubMaterial = New Command(AddressOf NewSubMaterial)
|
||||
End If
|
||||
Return m_cmdNewSubMaterial
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Sub NewSubMaterial(ByVal param As Object)
|
||||
If Not IsNothing(SelMaterial) Then
|
||||
NewMaterial_Visibility = Visibility.Collapsed
|
||||
NewSubMaterial_Visibility = Visibility.Visible
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#End Region ' NewSubMaterial
|
||||
|
||||
#Region "DeleteSubMaterialCommand"
|
||||
|
||||
Public ReadOnly Property DeleteSubMaterialCommand As ICommand
|
||||
Get
|
||||
If m_cmdDeleteSubMaterial Is Nothing Then
|
||||
m_cmdDeleteSubMaterial = New Command(AddressOf DeleteSubMaterial)
|
||||
End If
|
||||
Return m_cmdDeleteSubMaterial
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Sub DeleteSubMaterial(ByVal param As Object)
|
||||
If Not IsNothing(SelMaterial.SelSubMaterial) Then
|
||||
SelMaterial.SubMaterialList.Remove(SelMaterial.SelSubMaterial)
|
||||
SelMaterial.NotifyPropertyChanged(NameOf(SubMaterialList))
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#End Region ' DeleteSubMaterial
|
||||
|
||||
#Region "NewWjParamCommand"
|
||||
|
||||
Public ReadOnly Property NewWjParamCommand As ICommand
|
||||
Get
|
||||
If m_cmdNewWjParam Is Nothing Then
|
||||
m_cmdNewWjParam = New Command(AddressOf NewWjParam)
|
||||
End If
|
||||
Return m_cmdNewWjParam
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Sub NewWjParam(ByVal param As Object)
|
||||
If Not IsNothing(SelMaterial.SelSubMaterial) Then
|
||||
Dim nId As Integer = 0
|
||||
If IsNothing(SelMaterial.SelSubMaterial.ParamList) Then
|
||||
nId = 1
|
||||
SelMaterial.SelSubMaterial.ParamList = New ObservableCollection(Of WjParam)
|
||||
Else
|
||||
nId = SelMaterial.SelSubMaterial.ParamList.Count + 1
|
||||
End If
|
||||
SelMaterial.SelSubMaterial.ParamList.Add(New WjParam(nId, 0, 0, 0, 0, 0, 0, 0, m_refWaterPageV))
|
||||
SelMaterial.SelSubMaterial.NotifyPropertyChanged(NameOf(ParamList))
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#End Region ' NewWjParam
|
||||
|
||||
#Region "DeleteWjParamCommand"
|
||||
|
||||
Public ReadOnly Property DeleteWjParamCommand As ICommand
|
||||
Get
|
||||
If m_cmdDeleteWjParam Is Nothing Then
|
||||
m_cmdDeleteWjParam = New Command(AddressOf DeleteWjParam)
|
||||
End If
|
||||
Return m_cmdDeleteWjParam
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Sub DeleteWjParam(ByVal param As Object)
|
||||
If Not IsNothing(SelMaterial.SelSubMaterial.SelWjParam) Then
|
||||
SelMaterial.SelSubMaterial.ParamList.Remove(SelMaterial.SelSubMaterial.SelWjParam)
|
||||
SelMaterial.SelSubMaterial.NotifyPropertyChanged(NameOf(ParamList))
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#End Region ' DeleteWjParam
|
||||
|
||||
#Region "DoneCommand"
|
||||
|
||||
Public ReadOnly Property DoneCommand As ICommand
|
||||
Get
|
||||
If m_cmdDone Is Nothing Then
|
||||
m_cmdDone = New Command(AddressOf Done)
|
||||
End If
|
||||
Return m_cmdDone
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Sub Done(ByVal param As Object)
|
||||
If NewMaterial_Visibility = Visibility.Visible Then
|
||||
MaterialList.Add(New WjMaterial(sNewMaterial))
|
||||
NotifyPropertyChanged(NameOf(MaterialList))
|
||||
NewMaterial_Visibility = Visibility.Collapsed
|
||||
ElseIf NewSubMaterial_Visibility = Visibility.Visible Then
|
||||
SelMaterial.SubMaterialList.Add(New WjSubMaterial(sNewSubMaterial))
|
||||
NotifyPropertyChanged(NameOf(SubMaterialList))
|
||||
NewSubMaterial_Visibility = Visibility.Collapsed
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#End Region ' Done
|
||||
|
||||
#End Region ' Commands
|
||||
|
||||
End Class
|
||||
|
||||
Public Class WjMaterial
|
||||
Inherits VMBase
|
||||
|
||||
Private m_Name As String
|
||||
Public Property Name As String
|
||||
Get
|
||||
Return m_Name
|
||||
End Get
|
||||
Set(value As String)
|
||||
m_Name = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_SubMaterialList As ObservableCollection(Of WjSubMaterial)
|
||||
Public Property SubMaterialList As ObservableCollection(Of WjSubMaterial)
|
||||
Get
|
||||
Return m_SubMaterialList
|
||||
End Get
|
||||
Set(value As ObservableCollection(Of WjSubMaterial))
|
||||
m_SubMaterialList = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property m_SelSubMaterial As WjSubMaterial
|
||||
Public Property SelSubMaterial As WjSubMaterial
|
||||
Get
|
||||
Return m_SelSubMaterial
|
||||
End Get
|
||||
Set(value As WjSubMaterial)
|
||||
m_SelSubMaterial = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Sub New(sName As String, SubMatList As ObservableCollection(Of WjSubMaterial))
|
||||
m_Name = sName
|
||||
m_SubMaterialList = SubMatList
|
||||
End Sub
|
||||
|
||||
Sub New(sName As String)
|
||||
m_Name = sName
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
Public Class WjSubMaterial
|
||||
Inherits VMBase
|
||||
|
||||
Private m_Name As String
|
||||
Public Property Name As String
|
||||
Get
|
||||
Return m_Name
|
||||
End Get
|
||||
Set(value As String)
|
||||
m_Name = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_ParamList As ObservableCollection(Of WjParam)
|
||||
Public Property ParamList As ObservableCollection(Of WjParam)
|
||||
Get
|
||||
Return m_ParamList
|
||||
End Get
|
||||
Set(value As ObservableCollection(Of WjParam))
|
||||
m_ParamList = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property m_SelWjParam As WjParam
|
||||
Public Property SelWjParam As WjParam
|
||||
Get
|
||||
Return m_SelWjParam
|
||||
End Get
|
||||
Set(value As WjParam)
|
||||
m_SelWjParam = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Sub New(sName As String, ParamList As ObservableCollection(Of WjParam))
|
||||
m_Name = sName
|
||||
m_ParamList = ParamList
|
||||
End Sub
|
||||
|
||||
Sub New(sName As String)
|
||||
m_Name = sName
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
Public Class WjParam
|
||||
|
||||
Private m_Id As Integer
|
||||
Public Property Id As Integer
|
||||
Get
|
||||
Return m_Id
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
m_Id = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_Thickness As Double
|
||||
Public Property Thickness As Double
|
||||
Get
|
||||
Return m_Thickness
|
||||
End Get
|
||||
Set(value As Double)
|
||||
m_Thickness = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_Q1 As Double
|
||||
Public Property Q1 As Double
|
||||
Get
|
||||
Return m_Q1
|
||||
End Get
|
||||
Set(value As Double)
|
||||
m_Q1 = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_Q2 As Double
|
||||
Public Property Q2 As Double
|
||||
Get
|
||||
Return m_Q2
|
||||
End Get
|
||||
Set(value As Double)
|
||||
m_Q2 = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_Q3 As Double
|
||||
Public Property Q3 As Double
|
||||
Get
|
||||
Return m_Q3
|
||||
End Get
|
||||
Set(value As Double)
|
||||
m_Q3 = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_Q4 As Double
|
||||
Public Property Q4 As Double
|
||||
Get
|
||||
Return m_Q4
|
||||
End Get
|
||||
Set(value As Double)
|
||||
m_Q4 = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_Q5 As Double
|
||||
Public Property Q5 As Double
|
||||
Get
|
||||
Return m_Q5
|
||||
End Get
|
||||
Set(value As Double)
|
||||
m_Q5 = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_QExtra As Double
|
||||
Public Property QExtra As Double
|
||||
Get
|
||||
Return m_QExtra
|
||||
End Get
|
||||
Set(value As Double)
|
||||
m_QExtra = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property ParamLstBx_Width As Double
|
||||
Get
|
||||
Return m_refWaterPageV.ParamsGpBx.ActualWidth - 20
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_refWaterPageV As WaterJetPageUC
|
||||
|
||||
Sub New(nId As Integer, dThickness As Double, dQ1 As Double, dQ2 As Double, dQ3 As Double, dQ4 As Double, dQ5 As Double, dQExtra As Double, ByRef refWJPage As WaterJetPageUC)
|
||||
m_Id = nId
|
||||
m_Thickness = dThickness
|
||||
m_Q1 = dQ1
|
||||
m_Q2 = dQ2
|
||||
m_Q3 = dQ3
|
||||
m_Q4 = dQ4
|
||||
m_Q5 = dQ5
|
||||
m_QExtra = dQExtra
|
||||
m_refWaterPageV = refWJPage
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,61 @@
|
||||
Imports System.Collections.ObjectModel
|
||||
Imports System.IO
|
||||
Imports EgtUILib
|
||||
Imports EgtWPFLib5
|
||||
Imports EgtWPFLib
|
||||
|
||||
' nuova libreria EgtWPFLib5 ver 2.4g1
|
||||
Public Class WaterjetDbWindowVM_OmagCUT
|
||||
Inherits EgtWPFLib5.WaterjetDbWindowVM
|
||||
|
||||
Public Function CloseWaterjetDb_OmagCut(MainWindow As Window) As SaveWndBtnEnum
|
||||
If bIsModified Then
|
||||
Dim SaveWjDbWnd As New EgtMsgBox(MainWindow, "", EgtMsg(31759), EgtMsgBox.Buttons.YES_NO_CANCEL, EgtMsgBox.Icons.NULL)
|
||||
Select Case SaveWjDbWnd.m_nPressedBtn
|
||||
Case 1 ' Yes
|
||||
WriteWaterjetDb()
|
||||
bIsModified = False
|
||||
Return SaveWndBtnEnum.YES
|
||||
Case 2 ' No
|
||||
Return SaveWndBtnEnum.NO
|
||||
Case Else ' Cancel
|
||||
Return SaveWndBtnEnum.CANCEL
|
||||
End Select
|
||||
Else
|
||||
Dim bExitFor As Boolean = False
|
||||
For Each Material As EgtWPFLib5.WjMaterial In MaterialList
|
||||
If Not IsNothing(Material.SubMaterialList) Then
|
||||
For Each SubMaterial As EgtWPFLib5.WjSubMaterial In Material.SubMaterialList
|
||||
If Not IsNothing(SubMaterial.ParamList) Then
|
||||
For Each QParam As EgtWPFLib5.WjParam In SubMaterial.ParamList
|
||||
bExitFor = QParam.IsModified()
|
||||
If bExitFor Then Exit For
|
||||
Next
|
||||
End If
|
||||
If bExitFor Then Exit For
|
||||
Next
|
||||
End If
|
||||
If bExitFor Then Exit For
|
||||
Next
|
||||
If bExitFor Then
|
||||
Dim SaveWjDbWnd As New EgtMsgBox(MainWindow, "", EgtMsg(31759), EgtMsgBox.Buttons.YES_NO_CANCEL, EgtMsgBox.Icons.NULL)
|
||||
Select Case SaveWjDbWnd.m_nPressedBtn
|
||||
Case 1 ' Yes
|
||||
WriteWaterjetDb()
|
||||
bIsModified = False
|
||||
Return SaveWndBtnEnum.YES
|
||||
Case 2 ' No
|
||||
Return SaveWndBtnEnum.NO
|
||||
Case Else ' Cancel
|
||||
Return SaveWndBtnEnum.CANCEL
|
||||
End Select
|
||||
End If
|
||||
End If
|
||||
Return SaveWndBtnEnum.YES
|
||||
End Function
|
||||
|
||||
Sub New(sMachDir As String)
|
||||
MyBase.New(sMachDir)
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
+146
-8
@@ -2,6 +2,7 @@
|
||||
Imports System.Collections.ObjectModel
|
||||
Imports EgtUILib
|
||||
Imports EgtWPFLib
|
||||
Imports EgtPHOTOLib
|
||||
Imports System.ComponentModel
|
||||
Imports System.Threading
|
||||
Imports System.Windows.Threading
|
||||
@@ -320,11 +321,13 @@ Class MainWindow
|
||||
Dim sNestKey As String = ""
|
||||
EgtUILib.GetPrivateProfileString(S_LICENCE, K_NESTKEY, "", sNestKey, sLicFile)
|
||||
EgtSetNestKey(sNestKey)
|
||||
Dim bNetHwKey As Boolean = ( GetPrivateProfileInt(S_GENERAL, K_NETKEY, 0, m_sIniFile) = 1)
|
||||
EgtSetNetHwKey( bNetHwKey)
|
||||
' Verifico abilitazione nesting automatico
|
||||
m_bAutoNest = Not String.IsNullOrWhiteSpace(sNestKey)
|
||||
' Recupero opzioni della chiave
|
||||
Dim bKey As Boolean = EgtGetKeyLevel(9423, 2309, 1, m_nKeyLevel) And
|
||||
EgtGetKeyOptions(9423, 2309, 1, m_nKeyOptions)
|
||||
Dim bKey As Boolean = EgtGetKeyLevel(9423, 2411, 1, m_nKeyLevel) And
|
||||
EgtGetKeyOptions(9423, 2411, 1, m_nKeyOptions)
|
||||
' Verifico abilitazione prodotto
|
||||
Dim bProd As Boolean = GetKeyOption(KEY_OPT.CUT_BASE)
|
||||
' Inizializzazione generale di EgtInterface
|
||||
@@ -498,6 +501,64 @@ Class MainWindow
|
||||
AddHandler m_ProdLineTimer.Tick, AddressOf OnProdLine
|
||||
' Imposto riferimento a funzione delle textbox che disattiva scene in libreria
|
||||
EgtWPFLib.EgtTextBox.m_refScenesIsEnabled = AddressOf IsEnabledScenes
|
||||
|
||||
' --------------------------------- SLAB DB -------------------------------------------------------
|
||||
If GetPrivateProfileInt(S_SCRAPS, K_ENABLESCRAPS, 0, GetIniFile()) <> 0 Then
|
||||
' leggo il direttorio in cui cercare il database delle lastre
|
||||
Dim PhotDir As String = String.Empty
|
||||
GetPrivateProfileString(S_SCRAPS, K_PHOTODIR, "", PhotDir, GetIniFile())
|
||||
' verifico che esista il file "OmagPHOTOVb.sqlite" nel direttorio inidicato
|
||||
If System.IO.File.Exists(PhotDir.Trim & "\" & DB_FILENAME) Then
|
||||
|
||||
If Not ManageDb.ConnectToDb(PhotDir.Trim & "\" & DB_FILENAME) Then
|
||||
EgtOutLog("Error connecting to DB: " & PhotDir.Trim & "\" & DB_FILENAME)
|
||||
' coumico che il grezzo contiene un pezzo e quindi non può essere definito come grezzo
|
||||
m_CurrentProjectPageUC.ClearMessage()
|
||||
m_CurrentProjectPageUC.SetErrorMessage("Denied connection SlabDB")
|
||||
Else
|
||||
' Impostazione direttorio per backup
|
||||
Dim BackUpDir As String = m_sDataRoot & "\BackUp"
|
||||
Directory.CreateDirectory(BackUpDir)
|
||||
EgtPHOTOLib.MainData.SetConfigDir(m_sConfigDir)
|
||||
EgtPHOTOLib.MainData.SetKeyLevel(m_nKeyLevel)
|
||||
EgtPHOTOLib.MainData.SetKeyOptions(CInt(m_nKeyOptions))
|
||||
EgtPHOTOLib.MainData.SetPhotoDir(PhotDir)
|
||||
EgtPHOTOLib.MainData.SetBackUpDir(BackUpDir)
|
||||
EgtPHOTOLib.MainData.SetIsOMagCUT(True)
|
||||
Dim sLastBlock As String = String.Empty
|
||||
GetPrivateProfileString(S_SCRAPS, K_LASTBLOCK, "", sLastBlock, GetIniFile())
|
||||
If Not String.IsNullOrEmpty(sLastBlock) Then
|
||||
EgtPHOTOLib.MainData.SetLastBlock(sLastBlock)
|
||||
End If
|
||||
|
||||
If GetPrivateProfileInt(S_SCRAPS, K_ENABLE_PRINTER, 0, GetIniFile()) = 1 Then
|
||||
' leggo nome file prn (per stampante zebra)
|
||||
Dim m_TemplateFilePrinter As String = String.Empty
|
||||
GetPrivateProfileString(S_SCRAPS, K_TEMPLATE, m_sDataRoot & "\Label\Default.prn", m_TemplateFilePrinter, GetIniFile())
|
||||
' leggo nome del direttorio in cui scrivere il file ini (per stampante zebra) -- solo se si desidera scrivere il file in un direttorio diverso
|
||||
Dim m_DatFilePrinter As String = String.Empty
|
||||
GetPrivateProfileString(S_SCRAPS, K_DAT, m_sDataRoot & "\Temp", m_DatFilePrinter, GetIniFile())
|
||||
' leggo nome file exe (per stampante zebra)
|
||||
Dim m_ZebraUtilitiesExe As String = String.Empty
|
||||
GetPrivateProfileString(S_SCRAPS, K_ZEBRAUTILITIES, System.AppDomain.CurrentDomain.BaseDirectory & "ZebraPrinterUtilitiesR32.exe", m_ZebraUtilitiesExe, GetIniFile())
|
||||
EgtPHOTOLib.MainData.SetTemplateFilePrinter(m_TemplateFilePrinter)
|
||||
EgtPHOTOLib.MainData.SetDataFilePrinter(m_DatFilePrinter)
|
||||
EgtPHOTOLib.MainData.SetZebraPrinterExe(m_ZebraUtilitiesExe)
|
||||
EgtPHOTOLib.MainData.SetPrinterVisibility(True)
|
||||
Else
|
||||
EgtPHOTOLib.MainData.SetPrinterVisibility(False)
|
||||
End If
|
||||
|
||||
' è permessa una sola istanza alla volta del programma OmagCUT -> "(1)" : "(" & nIstance.ToString & ")"
|
||||
EgtPHOTOLib.MainData.SetUser(Environment.MachineName & "\" & Environment.UserName & " (1)")
|
||||
Dim sIdKey As String = String.Empty
|
||||
EgtGetKeyInfo(sIdKey)
|
||||
EgtPHOTOLib.MainData.SetKey(sIdKey)
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
' --------------------------------- SLAB DB -------------------------------------------------------
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub ManageSingleIstance()
|
||||
@@ -546,6 +607,16 @@ Class MainWindow
|
||||
m_WorkInProgressPageUC.Prepare()
|
||||
m_WorkInProgressPageUC.UpdateTools()
|
||||
|
||||
Dim sVal As String = String.Empty
|
||||
If m_CurrentMachine.GetUserNote("FsevLength", sVal, m_CurrentMachine.sCurrSaw) Then
|
||||
StringToDouble(sVal, m_CurrentMachine.dFsevLength)
|
||||
m_CurrentMachine.SetFsevLength(m_CurrentMachine.dFsevLength)
|
||||
End If
|
||||
If m_CurrentMachine.GetUserNote("FsevPerc", sVal, m_CurrentMachine.sCurrSaw) Then
|
||||
StringToDouble(sVal, m_CurrentMachine.dFsevPerc)
|
||||
m_CurrentMachine.SetFsevPerc(m_CurrentMachine.dFsevPerc)
|
||||
End If
|
||||
|
||||
' Se macchina fotografica abilitata, ne inizializzo il gestore
|
||||
#If Not TRIAL Then
|
||||
If GetKeyOption(MainWindow.KEY_OPT.MAN_PHOTO) Then
|
||||
@@ -569,6 +640,12 @@ Class MainWindow
|
||||
m_CurrentProjectPageUC.m_SceneButtons.MeasureBtn.IsChecked = False
|
||||
' disbilito Test
|
||||
TestOff()
|
||||
' disabilito DragRettangle
|
||||
DragRettangleOff()
|
||||
' disabilito SplitCurv
|
||||
SplitCurvWJOff()
|
||||
' disattivo StartCurv
|
||||
StartCurvWJOff()
|
||||
Select Case m_ActivePage
|
||||
Case Pages.WorkInProgress
|
||||
WorkInProgressBtn.IsChecked = True
|
||||
@@ -625,6 +702,9 @@ Class MainWindow
|
||||
EgtMdbGetGeneralParam(MCH_GP.SAFEZ, DirectCutPageUC.m_dZSafe)
|
||||
m_CurrentProjectPageUC.m_SceneButtons.MeasureBtn.IsChecked = False
|
||||
TestOff()
|
||||
DragRettangleOff()
|
||||
SplitCurvWJOff()
|
||||
StartCurvWJOff()
|
||||
Select Case m_ActivePage
|
||||
Case Pages.WorkInProgress
|
||||
WorkInProgressBtn.IsChecked = False
|
||||
@@ -678,6 +758,9 @@ Class MainWindow
|
||||
Private Sub CadCutBtn_Click(sender As Object, e As RoutedEventArgs) Handles CadCutBtn.Click
|
||||
m_CurrentProjectPageUC.m_SceneButtons.MeasureBtn.IsChecked = False
|
||||
TestOff()
|
||||
DragRettangleOff()
|
||||
SplitCurvWJOff()
|
||||
StartCurvWJOff()
|
||||
Select Case m_ActivePage
|
||||
Case Pages.WorkInProgress
|
||||
WorkInProgressBtn.IsChecked = False
|
||||
@@ -730,6 +813,9 @@ Class MainWindow
|
||||
Private Sub FrameCutBtn_Click(sender As Object, e As RoutedEventArgs) Handles FrameCutBtn.Click
|
||||
m_CurrentProjectPageUC.m_SceneButtons.MeasureBtn.IsChecked = False
|
||||
TestOff()
|
||||
DragRettangleOff()
|
||||
SplitCurvWJOff()
|
||||
StartCurvWJOff()
|
||||
Select Case m_ActivePage
|
||||
Case Pages.WorkInProgress
|
||||
WorkInProgressBtn.IsChecked = False
|
||||
@@ -753,8 +839,8 @@ Class MainWindow
|
||||
m_ActivePage = Pages.FrameCut
|
||||
Case Pages.Photo, Pages.RawPart, Pages.Draw, Pages.Import, Pages.CSV
|
||||
' Pages.Simulation: quando sono nella simulazione devo uscire dalla pagina
|
||||
CadCutBtn.IsChecked = True
|
||||
FrameCutBtn.IsChecked = False
|
||||
CadCutBtn.IsChecked = False
|
||||
FrameCutBtn.IsChecked = True
|
||||
Case Pages.FrameCut
|
||||
FrameCutBtn.IsChecked = True
|
||||
Case Pages.Machine
|
||||
@@ -783,6 +869,9 @@ Class MainWindow
|
||||
Private Sub MachineBtn_Click(sender As Object, e As RoutedEventArgs) Handles MachineBtn.Click
|
||||
m_CurrentProjectPageUC.m_SceneButtons.MeasureBtn.IsChecked = False
|
||||
TestOff()
|
||||
DragRettangleOff()
|
||||
SplitCurvWJOff()
|
||||
StartCurvWJOff()
|
||||
Select Case m_ActivePage
|
||||
Case Pages.WorkInProgress
|
||||
WorkInProgressBtn.IsChecked = False
|
||||
@@ -831,6 +920,9 @@ Class MainWindow
|
||||
Private Sub OptionsBtn_Click(sender As Object, e As RoutedEventArgs) Handles OptionsBtn.Click
|
||||
m_CurrentProjectPageUC.m_SceneButtons.MeasureBtn.IsChecked = False
|
||||
TestOff()
|
||||
DragRettangleOff()
|
||||
SplitCurvWJOff()
|
||||
StartCurvWJOff()
|
||||
Select Case m_ActivePage
|
||||
Case Pages.WorkInProgress
|
||||
WorkInProgressBtn.IsChecked = False
|
||||
@@ -1068,6 +1160,15 @@ Class MainWindow
|
||||
If Not m_MachinePageUC.m_PolishingsPageUC.SaveKit() Then
|
||||
Return False
|
||||
End If
|
||||
Case MachinePageUC.MachinePages.WaterJet
|
||||
' Verifica ed eventuale salvataggio Db Waterjet
|
||||
Dim m_MainWindow As MainWindow = DirectCast(Application.Current.MainWindow, MainWindow)
|
||||
Dim nPressedBtn As Integer = DirectCast(m_MachinePageUC.m_WaterJetPageUC.DataContext, WaterjetDbWindowVM_OmagCUT).CloseWaterjetDb_OmagCut(m_MainWindow)
|
||||
If nPressedBtn = WaterjetDbWindowVM_OmagCUT.SaveWndBtnEnum.CANCEL Then
|
||||
Return False
|
||||
ElseIf nPressedBtn = WaterjetDbWindowVM_OmagCUT.SaveWndBtnEnum.NO Then
|
||||
m_MachinePageUC.m_WaterJetPageUC.WaterJetPage_Reinitialize()
|
||||
End If
|
||||
End Select
|
||||
Return True
|
||||
End Function
|
||||
@@ -1094,6 +1195,9 @@ Class MainWindow
|
||||
If m_bNCLink And m_CurrentMachine.bProdLine Then
|
||||
m_ProdLineTimer.Interval = TimeSpan.FromMilliseconds(2000)
|
||||
m_ProdLineTimer.Start()
|
||||
ElseIf m_CurrentMachine.bDemo Then
|
||||
m_ProdLineTimer.Interval = TimeSpan.FromMilliseconds(2000)
|
||||
m_ProdLineTimer.Start()
|
||||
End If
|
||||
|
||||
' seleziono il tipo di avvio
|
||||
@@ -1125,9 +1229,15 @@ Class MainWindow
|
||||
Private Sub OnIdle()
|
||||
' Recupero il tipo di progetto
|
||||
Dim nPrjType As Integer = m_CurrentProjectPageUC.GetCurrentProjectType()
|
||||
' Verifico presenza testa H1 per lama/fresa (nel contesto principale)
|
||||
Dim nCurrCtx As Integer = EgtGetCurrentContext()
|
||||
EgtSetCurrentContext(m_CurrentProjectPageUC.CurrentProjectScene.GetCtx())
|
||||
Dim bHeadH1 As Boolean = (EgtGetHeadId("H1") <> GDB_ID.NULL)
|
||||
EgtSetCurrentContext(nCurrCtx)
|
||||
' Aggiorno interfaccia
|
||||
CadCutBtn.IsEnabled = (nPrjType <> CurrentProjectPageUC.PRJ_TYPE.FRAMES)
|
||||
FrameCutBtn.IsEnabled = (nPrjType <> CurrentProjectPageUC.PRJ_TYPE.FLATS)
|
||||
FrameCutBtn.IsEnabled = (nPrjType <> CurrentProjectPageUC.PRJ_TYPE.FLATS) AndAlso bHeadH1
|
||||
' DirectCutBtn.IsEnabled = bHeadH1
|
||||
End Sub
|
||||
|
||||
' Nomi dei file per OmagVIEW
|
||||
@@ -1194,7 +1304,7 @@ Class MainWindow
|
||||
nProjInd = If(nLastProj = 1, nMaxProj, nLastProj - 1)
|
||||
nMove = 1
|
||||
End If
|
||||
' altrimenti forzo trasmissione ultimo inviato
|
||||
' altrimenti forzo trasmissione ultimo inviato
|
||||
Else
|
||||
nProjInd = If(nLastProj = 1, nMaxProj, nLastProj - 1)
|
||||
nMove = 1
|
||||
@@ -1223,6 +1333,10 @@ Class MainWindow
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
|
||||
' forzo la variabile CN - aggiornando il valore dell'indice del progetto in elaborazione
|
||||
If m_CurrentMachine.bDemo Then nVarCopy = GetPrivateProfileInt(S_GENERAL, K_LASTPROJ, 0, GetIniFile())
|
||||
|
||||
' Leggo variabile con ultimo progetto mandato a OmagView
|
||||
Dim nLastCopy As Integer = GetPrivateProfileInt(S_GENERAL, K_LASTPROJTOVIEW, 0, GetIniFile())
|
||||
' Se non nulla e diversa da ultimo copiato, verifico se eseguire la copia
|
||||
@@ -1782,7 +1896,9 @@ Class MainWindow
|
||||
m_CurrentProjectPageUC.SetInfoMessage(EgtMsg(90327)) 'Inseriti Nuovi Pezzi Rovinati
|
||||
Dim nPartId As Integer = EgtGetLastPart()
|
||||
For nI As Integer = 1 To nRuPartsCnt
|
||||
EgtRemoveInfo( nPartId, INFO_PARTOK)
|
||||
EgtRemoveInfo(nPartId, INFO_PARTOK)
|
||||
' ricreo la lista delle famiglie di pezzi presenti in parcheggio
|
||||
m_CadCutPageUC.m_NestPage.GetFamilyGroupInPark()
|
||||
m_CadCutPageUC.m_NestPage.StoreOnePart(nPartId, True)
|
||||
nPartId = EgtGetPrevPart(nPartId)
|
||||
Next
|
||||
@@ -1868,8 +1984,30 @@ Class MainWindow
|
||||
' deseleziono gli oggetti e spengo il bottone
|
||||
EgtDeselectObj(m_CadCutPageUC.m_NestPage.m_CurrSelectedCurv)
|
||||
EgtDeselectObj(m_CadCutPageUC.m_NestPage.m_CurrSelectedSawCurv)
|
||||
EgtResetMark(m_CadCutPageUC.m_NestPage.m_CurrSelectedSawCurv)
|
||||
m_CadCutPageUC.m_ProjectMgr.TestBtn.IsChecked = False
|
||||
m_CurrentProjectPageUC.m_bSelectCurv = False
|
||||
Me.m_CadCutPageUC.m_NestPage.m_bSelectCurv = False
|
||||
End Sub
|
||||
|
||||
' spegne il comando per la mofica dei rettangoli
|
||||
Public Sub DragRettangleOff()
|
||||
m_CadCutPageUC.m_NestPage.DragRettanleBtn.IsChecked = False
|
||||
Me.m_CadCutPageUC.m_NestPage.m_bIsCheckedDragRettangle = False
|
||||
ShowParkedParts()
|
||||
|
||||
End Sub
|
||||
|
||||
Public Sub SplitCurvWJOff()
|
||||
m_CadCutPageUC.m_NestPage.SplitCurveWJBtn.IsChecked = False
|
||||
Me.m_CadCutPageUC.m_NestPage.m_bIsCheckedSplitCurveWJ = False
|
||||
m_CadCutPageUC.m_NestPage.ResetSplitCurvWJParam()
|
||||
|
||||
End Sub
|
||||
|
||||
Public Sub StartCurvWJOff()
|
||||
m_CadCutPageUC.m_NestPage.StartCurveWJBtn.IsChecked = False
|
||||
Me.m_CadCutPageUC.m_NestPage.m_bIsCheckedStartCurveWJ = False
|
||||
m_CadCutPageUC.m_NestPage.ResetStartCurvWJParam()
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
@@ -22,7 +22,7 @@ Imports System.Windows
|
||||
#End If
|
||||
<Assembly: AssemblyCompany("EgalTech s.r.l.")>
|
||||
<Assembly: AssemblyProduct("OmagCUT")>
|
||||
<Assembly: AssemblyCopyright("Copyright © 2015-2021 by EgalTech s.r.l.")>
|
||||
<Assembly: AssemblyCopyright("Copyright © 2015-2022 by EgalTech s.r.l.")>
|
||||
<Assembly: AssemblyTrademark("")>
|
||||
<Assembly: ComVisible(False)>
|
||||
|
||||
@@ -62,5 +62,5 @@ Imports System.Windows
|
||||
' by using the '*' as shown below:
|
||||
' <Assembly: AssemblyVersion("1.0.*")>
|
||||
|
||||
<Assembly: AssemblyVersion("2.3.9.1")>
|
||||
<Assembly: AssemblyFileVersion("2.3.9.1")>
|
||||
<Assembly: AssemblyVersion("2.4.11.1")>
|
||||
<Assembly: AssemblyFileVersion("2.4.11.1")>
|
||||
|
||||
+57
-16
@@ -11,6 +11,8 @@ Public Class CNCommunication
|
||||
Private m_AlarmsPage As AlarmsPageUC = m_MainWindow.m_MachinePageUC.m_AlarmsPageUC
|
||||
Private m_CurrProjPage As CurrentProjectPageUC = m_MainWindow.m_CurrentProjectPageUC
|
||||
|
||||
Friend m_nCountRefresh As Integer = 0
|
||||
|
||||
' Variabile per tipologia CN
|
||||
Friend m_nNCType As Integer
|
||||
|
||||
@@ -225,8 +227,11 @@ Public Class CNCommunication
|
||||
|
||||
' definisco il tipo di varibili che devono essere scritte nl plc
|
||||
Dim sVal As String = String.Empty
|
||||
GetPrivateProfileString(S_NCDATA, K_NEWVARIABLE, "0", sVal, m_MainWindow.GetMachIniFile())
|
||||
m_CN.m_NewVariable = sVal <> 0
|
||||
Dim nVal As Integer = 0
|
||||
'GetPrivateProfileString(S_NCDATA, K_NEWVARIABLE, "0", sVal, m_MainWindow.GetMachIniFile())
|
||||
nVal = GetPrivateProfileInt(S_NCDATA, K_NEWVARIABLE, nVal, m_MainWindow.GetMachIniFile())
|
||||
'm_CN.m_NewVariable = sVal <> "0"
|
||||
m_CN.m_NewVariable = (nVal <> 0)
|
||||
EgtOutLog("NewVariable=" & If(m_CN.m_NewVariable, "1", "0"))
|
||||
|
||||
' Recupero e imposto le variabili per i dati del CN (feed, speed,...)
|
||||
@@ -276,6 +281,14 @@ Public Class CNCommunication
|
||||
m_CN.SetCnDataVar(CN_generico.CnData.LimitZ, sVal)
|
||||
GetPrivateProfileString(S_NCDATA, K_POWEROVR, "", sVal, m_MainWindow.GetMachIniFile())
|
||||
m_CN.SetCnDataVar(CN_generico.CnData.PowerOvr, sVal)
|
||||
|
||||
GetPrivateProfileString(S_NCDATA, K_PARKING, "", sVal, m_MainWindow.GetMachIniFile())
|
||||
m_CN.SetCnDataVar(CN_generico.CnData.Parking, sVal)
|
||||
GetPrivateProfileString(S_NCDATA, K_ENABLEZONE, "", sVal, m_MainWindow.GetMachIniFile())
|
||||
m_CN.SetCnDataVar(CN_generico.CnData.EnableZone, sVal)
|
||||
GetPrivateProfileString(S_NCDATA, K_ENABLEPC, "", sVal, m_MainWindow.GetMachIniFile())
|
||||
m_CN.SetCnDataVar(CN_generico.CnData.EnablePC, sVal)
|
||||
|
||||
GetPrivateProfileString(S_NCDATA, K_VACUUMUP, "", sVal, m_MainWindow.GetMachIniFile())
|
||||
m_CN.SetCnDataVar(CN_generico.CnData.VacuumUp, sVal)
|
||||
GetPrivateProfileString(S_NCDATA, K_VACUUMDOWN, "", sVal, m_MainWindow.GetMachIniFile())
|
||||
@@ -326,20 +339,23 @@ Public Class CNCommunication
|
||||
m_CN.SetCnDataVar(CN_generico.CnData.BypassState, sVal)
|
||||
|
||||
' nuove variabili: stato dei nuovi pulsanti
|
||||
m_IsNewConsole = GetPrivateProfileString(S_NCDATA, K_NEWCONSOLE, "", sVal, m_MainWindow.GetMachIniFile())
|
||||
nVal = GetPrivateProfileInt(S_NCDATA, K_NEWCONSOLE, 0, m_MainWindow.GetMachIniFile())
|
||||
m_IsNewConsole = (nVal = 1)
|
||||
If m_IsNewConsole Then
|
||||
GetPrivateProfileString(S_NCDATA, K_XYJOG, "", sVal, m_MainWindow.GetMachIniFile())
|
||||
m_CN.SetCnDataVar(CN_generico.CnData.XYJog, sVal)
|
||||
If Not String.IsNullOrEmpty(sVal) Then m_CN.SetCnDataVar(CN_generico.CnData.XYJog, sVal)
|
||||
GetPrivateProfileString(S_NCDATA, K_ZCJOG, "", sVal, m_MainWindow.GetMachIniFile())
|
||||
m_CN.SetCnDataVar(CN_generico.CnData.ZCJog, sVal)
|
||||
If Not String.IsNullOrEmpty(sVal) Then m_CN.SetCnDataVar(CN_generico.CnData.ZCJog, sVal)
|
||||
GetPrivateProfileString(S_NCDATA, K_ZBJOG, "", sVal, m_MainWindow.GetMachIniFile())
|
||||
m_CN.SetCnDataVar(CN_generico.CnData.ZBJog, sVal)
|
||||
If Not String.IsNullOrEmpty(sVal) Then m_CN.SetCnDataVar(CN_generico.CnData.ZBJog, sVal)
|
||||
GetPrivateProfileString(S_NCDATA, K_POWERON, "", sVal, m_MainWindow.GetMachIniFile())
|
||||
m_CN.SetCnDataVar(CN_generico.CnData.PowerON, sVal)
|
||||
If Not String.IsNullOrEmpty(sVal) Then m_CN.SetCnDataVar(CN_generico.CnData.PowerON, sVal)
|
||||
GetPrivateProfileString(S_NCDATA, K_REMOTE, "", sVal, m_MainWindow.GetMachIniFile())
|
||||
If Not String.IsNullOrEmpty(sVal) Then m_CN.SetCnDataVar(CN_generico.CnData.Remote, sVal)
|
||||
End If
|
||||
|
||||
' Inizializzo la comunicazione
|
||||
m_CN.Init()
|
||||
' Inizializzo la comunicazione
|
||||
m_CN.Init()
|
||||
|
||||
Catch ex As Exception
|
||||
' set status to statusbar
|
||||
@@ -373,6 +389,7 @@ Public Class CNCommunication
|
||||
EgtOutLog("ProcessStart : " & """" & m_sCNSiemensHMIPath & """" & " " & sArg)
|
||||
Process.Start(m_sCNSiemensHMIPath, sArg)
|
||||
m_CN.m_IsSiemensOne = GetPrivateProfileInt(S_NCSIEMENS, K_ISSIEMENSONE, 0, m_MainWindow.GetMachIniFile()) > 0
|
||||
m_CN.m_IsActiveModeSubscription = GetPrivateProfileInt(S_NCSIEMENS, K_ISACTIVEMODESUBSCR, 0, m_MainWindow.GetMachIniFile()) > 0
|
||||
If m_CN.m_IsSiemensOne Then
|
||||
' stati bottoni parte 1
|
||||
m_CN.DVariables_Read_Subscription(m_CN.m_szCnDataVar(CN_generico.CnData.Laser), VarType.TInteger, 0)
|
||||
@@ -389,6 +406,8 @@ Public Class CNCommunication
|
||||
m_CN.DVariables_Read_Subscription(m_CN.m_szCnDataVar(CN_generico.CnData.SpeedOvr), VarType.TDouble, 1)
|
||||
|
||||
GetPrivateProfileString(S_NCSIEMENS, K_DBVARPATH, "", m_CN.m_DbVarPath, m_MainWindow.GetMachIniFile)
|
||||
ElseIf m_CN.m_IsActiveModeSubscription Then
|
||||
m_CN.DVariables_Read_Subscription(m_CN.m_szCnDataVar(CN_generico.CnData.BlowState), VarType.TInteger, 3)
|
||||
End If
|
||||
Catch ex As Exception
|
||||
EgtOutLog("Error starting Process -> NcLink=True type=0")
|
||||
@@ -528,6 +547,9 @@ Public Class CNCommunication
|
||||
m_MainWindow.m_DirectCutPageUC.m_ControlsMachineButton.DoorClosedChanged(m_CN.nDoorClosedState)
|
||||
m_MainWindow.m_DirectCutPageUC.m_ControlsMachineButton.LimitZChanged(m_CN.bLimitZState)
|
||||
m_MainWindow.m_DirectCutPageUC.m_ControlsMachineButton.FiveAxisStateChanged(m_CN.Is_G24_active())
|
||||
m_MainWindow.m_DirectCutPageUC.m_ControlsMachineButton.ParkingStateChanged(m_CN.bParkingState)
|
||||
'm_MainWindow.m_DirectCutPageUC.m_ControlsMachineButton.ZoneStateChanged(m_CN.nEnableZone)
|
||||
'm_MainWindow.m_DirectCutPageUC.m_ControlsMachineButton.PcStateChanged(m_CN.nEnablePc)
|
||||
m_MainWindow.m_DirectCutPageUC.m_VacuumMachineButton.VacuumUpChanged(m_CN.bVacuumUp)
|
||||
m_MainWindow.m_DirectCutPageUC.m_VacuumMachineButton.VacuumDownChanged(m_CN.bVacuumDown)
|
||||
m_MainWindow.m_DirectCutPageUC.m_VacuumMachineButton.Vacuum2UpChanged(m_CN.bVacuum2Up)
|
||||
@@ -558,6 +580,8 @@ Public Class CNCommunication
|
||||
m_MainWindow.m_DirectCutPageUC.XYJogChanged(m_CN.bXYJog)
|
||||
m_MainWindow.m_DirectCutPageUC.ZCJogChanged(m_CN.bZCJog)
|
||||
m_MainWindow.m_DirectCutPageUC.ZBJogChanged(m_CN.bZBCJog)
|
||||
m_MainWindow.m_DirectCutPageUC.RemoteChanged(m_CN.bRemote)
|
||||
m_MainWindow.m_DirectCutPageUC.ParkingStateChanged(m_CN.bParkingState)
|
||||
End If
|
||||
Else
|
||||
m_MainWindow.m_DirectCutPageUC.m_MachineButtons.SpindleStateChanged(m_CN.bSpindleState)
|
||||
@@ -571,13 +595,20 @@ Public Class CNCommunication
|
||||
m_MainWindow.m_DirectCutPageUC.m_MachineButtons.ThreeAxisStateChanged(True)
|
||||
m_MainWindow.m_DirectCutPageUC.m_MachineButtons.FiveAxisStateChanged(False)
|
||||
End If
|
||||
m_MainWindow.m_WorkInProgressPageUC.m_MachineButtons.DoorStateChanged(m_CN.nDoorClosedState)
|
||||
m_MainWindow.m_DirectCutPageUC.m_MachineButtons.DoorStateChanged(m_CN.nDoorClosedState)
|
||||
m_MainWindow.m_DirectCutPageUC.m_MachineButtons.ParkingStateChanged(m_CN.bParkingState)
|
||||
m_MainWindow.m_DirectCutPageUC.m_MachineButtons.EnableZoneStateChanged(m_CN.nEnableZone)
|
||||
m_MainWindow.m_DirectCutPageUC.m_MachineButtons.EnablePcStateChanged(m_CN.nEnablePc)
|
||||
m_MainWindow.m_DirectCutPageUC.m_MachineButtons.TableUpChanged(m_CN.bTableUpState)
|
||||
m_MainWindow.m_DirectCutPageUC.m_MachineButtons.TableDownChanged(m_CN.bTableDownState)
|
||||
|
||||
' Nuovi bottoni (uso joystick) per Area4
|
||||
If m_IsNewConsole Then
|
||||
m_MainWindow.m_DirectCutPageUC.m_MachineButtons.XYJogChanged(m_CN.bXYJog)
|
||||
m_MainWindow.m_DirectCutPageUC.m_MachineButtons.ZJogChanged(m_CN.bZCJog)
|
||||
m_MainWindow.m_DirectCutPageUC.m_MachineButtons.BCJogChanged(m_CN.bZBCJog)
|
||||
m_MainWindow.m_DirectCutPageUC.m_MachineButtons.RemoteChanged(m_CN.bRemote)
|
||||
m_MainWindow.m_DirectCutPageUC.ParkingStateChanged(m_CN.bParkingState)
|
||||
End If
|
||||
|
||||
End If
|
||||
@@ -606,6 +637,11 @@ Public Class CNCommunication
|
||||
m_MainWindow.m_WorkInProgressPageUC.m_MachineButtons.FiveAxisStateChanged(False)
|
||||
End If
|
||||
m_MainWindow.m_WorkInProgressPageUC.m_MachineButtons.DoorStateChanged(m_CN.nDoorClosedState)
|
||||
m_MainWindow.m_WorkInProgressPageUC.m_MachineButtons.ParkingStateChanged(m_CN.bParkingState)
|
||||
m_MainWindow.m_WorkInProgressPageUC.m_MachineButtons.EnableZoneStateChanged(m_CN.nEnableZone)
|
||||
m_MainWindow.m_WorkInProgressPageUC.m_MachineButtons.EnablePcStateChanged(m_CN.nEnablePc)
|
||||
m_MainWindow.m_WorkInProgressPageUC.m_MachineButtons.TableUpChanged(m_CN.bTableUpState)
|
||||
m_MainWindow.m_WorkInProgressPageUC.m_MachineButtons.TableDownChanged(m_CN.bTableDownState)
|
||||
End If
|
||||
|
||||
End Sub
|
||||
@@ -690,12 +726,17 @@ Public Class CNCommunication
|
||||
m_MachineStatus.DisplayVar()
|
||||
'EgtOutLog("Modo attivato: " & m_CN.read_active_mode & " modo attivo: " & m_nCurrMode)
|
||||
|
||||
Dim TempCurrMode As Short = m_CN.read_active_mode()
|
||||
'EgtOutLog("Machine status: " & TempCurrMode)
|
||||
If TempCurrMode <> m_nCurrMode Then
|
||||
'EgtOutLog("Modo attivo: " & m_CN.read_active_mode)
|
||||
m_nCurrMode = CInt(TempCurrMode)
|
||||
m_MachineStatus.DisplayActiveMode(m_nCurrMode)
|
||||
If m_nCountRefresh > 10 Then
|
||||
Dim TempCurrMode As Short = m_CN.read_active_mode()
|
||||
'EgtOutLog("Machine status: " & TempCurrMode)
|
||||
If TempCurrMode <> m_nCurrMode Then
|
||||
'EgtOutLog("Modo attivo: " & m_CN.read_active_mode)
|
||||
m_nCurrMode = CInt(TempCurrMode)
|
||||
m_MachineStatus.DisplayActiveMode(m_nCurrMode)
|
||||
End If
|
||||
m_nCountRefresh = 0
|
||||
Else
|
||||
m_nCountRefresh = m_nCountRefresh + 1
|
||||
End If
|
||||
|
||||
If m_CN.b_NC_error Then
|
||||
|
||||
@@ -131,8 +131,7 @@ Public Class CN_Siemens
|
||||
|
||||
Public Overrides Function read_active_mode() As Short
|
||||
'EgtOutLog("Modo attivo: " & M_MMFiles.SiemensRet.n_param2)
|
||||
'Return M_MMFiles.read_active_mode()
|
||||
If m_IsSiemensOne Then
|
||||
If m_IsSiemensOne Or m_IsActiveModeSubscription Then
|
||||
Select Case n_data(3)
|
||||
Case 1
|
||||
Return 0
|
||||
@@ -144,7 +143,10 @@ Public Class CN_Siemens
|
||||
Return 0
|
||||
End Select
|
||||
Else
|
||||
Return CShort(M_MMFiles.SiemensRet.n_param2)
|
||||
' per verificare che la comunicazione funzioni correttamente
|
||||
EgtOutLog("Modo -read_active_mode-: " & M_MMFiles.SiemensRet.n_param2.ToString)
|
||||
Return M_MMFiles.read_active_mode()
|
||||
'Return CShort(M_MMFiles.SiemensRet.n_param2)
|
||||
End If
|
||||
End Function
|
||||
|
||||
|
||||
+12
-1
@@ -8,7 +8,7 @@ Public MustInherit Class CN_generico
|
||||
Public Const MAX_VAR As Short = 100
|
||||
Public Const MAX_VALUES As Short = 9 ' Max. index to read the data from the FXServer array
|
||||
Public Const MAX_TOOLS As Short = 100
|
||||
Public Const NUM_DATA = 51 ' Numero di dati del CN (Speed,Feed,...)
|
||||
Public Const NUM_DATA = 55 ' Numero di dati del CN (Speed,Feed,...)
|
||||
|
||||
Public m_NewVariable As Boolean = False ' per scrittura delle vairbaili Apllication del PLC
|
||||
|
||||
@@ -65,6 +65,11 @@ Public MustInherit Class CN_generico
|
||||
ZCJog = 48
|
||||
ZBJog = 49
|
||||
PowerON = 50
|
||||
Remote = 51
|
||||
|
||||
Parking = 52
|
||||
EnableZone = 53
|
||||
EnablePC = 54
|
||||
End Enum
|
||||
|
||||
#End Region
|
||||
@@ -87,6 +92,8 @@ Public MustInherit Class CN_generico
|
||||
#Region " Interface"
|
||||
|
||||
Friend m_IsSiemensOne As Boolean = False
|
||||
Friend m_IsActiveModeSubscription As Boolean = False
|
||||
|
||||
Friend m_DbVarPath As String = ""
|
||||
|
||||
Public IsFlexiumPlus As Boolean = False
|
||||
@@ -170,6 +177,9 @@ Public MustInherit Class CN_generico
|
||||
Public nDoorClosedState As Integer
|
||||
Public bLimitZState As Boolean
|
||||
Public bPowerOvr As Double
|
||||
Public bParkingState As Boolean
|
||||
Public nEnableZone As Integer
|
||||
Public nEnablePc As Integer
|
||||
Public bHsm As Double
|
||||
Public bVacuumUp As Boolean
|
||||
Public bVacuumDown As Boolean
|
||||
@@ -205,6 +215,7 @@ Public MustInherit Class CN_generico
|
||||
Public bZBCJog As Boolean
|
||||
|
||||
Public bPowerON As Boolean
|
||||
Public bRemote As Boolean
|
||||
' Nuovi di bottoni -------------------------------------------
|
||||
|
||||
Public nMachineMode As Integer
|
||||
|
||||
+51
-28
@@ -398,13 +398,35 @@ Module M_MMFiles
|
||||
End Function
|
||||
|
||||
Function WriteCncMode(ByVal nmode As Short) As Short
|
||||
'EgtOutLog("WriteCncMode start dell'm_mmFiles")
|
||||
SiemensSend.n_Command = CMD.CMD_WriteCncMode
|
||||
SiemensSend.n_param1 = nmode
|
||||
|
||||
execute_command()
|
||||
'EgtOutLog("WriteCncMode end dell'm_mmFiles")
|
||||
Return SiemensRet.n_result
|
||||
Dim nNewWriteCNCMode As Integer = 0
|
||||
If GetPrivateProfileInt(S_NCSIEMENS, K_NEWWRITECNCMODE, nNewWriteCNCMode, m_MainWindow.GetMachIniFile()) <> 0 Then
|
||||
Dim s_var As String = String.Empty
|
||||
GetPrivateProfileString(S_NCDATA, K_WRITECNCMODEVAR, "db11.dbx0", s_var, m_MainWindow.GetMachIniFile())
|
||||
Select Case nmode
|
||||
Case 0
|
||||
' Auto
|
||||
s_var &= ".0"
|
||||
Case 2
|
||||
' MDI
|
||||
s_var &= ".1"
|
||||
Case 7
|
||||
' manuale
|
||||
s_var &= ".2"
|
||||
Case Else
|
||||
' manuale
|
||||
s_var &= ".2"
|
||||
End Select
|
||||
EgtOutLog("Nuova scrittura modo: case(" & nmode.ToString & ") -> " & s_var)
|
||||
Return Write_var(s_var, CShort(1), CInt(1), 0, 0, "")
|
||||
Else
|
||||
'EgtOutLog("WriteCncMode start dell'm_mmFiles")
|
||||
SiemensSend.n_Command = CMD.CMD_WriteCncMode
|
||||
SiemensSend.n_param1 = nmode
|
||||
EgtOutLog("Attivata modalità: " & SiemensSend.n_param1.ToString)
|
||||
execute_command()
|
||||
'EgtOutLog("WriteCncMode end dell'm_mmFiles")
|
||||
Return SiemensRet.n_result
|
||||
End If
|
||||
|
||||
End Function
|
||||
|
||||
@@ -454,6 +476,7 @@ Module M_MMFiles
|
||||
SiemensSend.n_param1 = nChannel
|
||||
|
||||
execute_command()
|
||||
|
||||
'EgtOutLog("MDI_command end dell'm_mmFiles")
|
||||
Return SiemensRet.n_result
|
||||
|
||||
@@ -592,7 +615,6 @@ Module M_MMFiles
|
||||
'----------------------------------------------------------------------------------------------------------
|
||||
'
|
||||
Sub execute_command()
|
||||
|
||||
Try
|
||||
' Attesa eventuale busy iniziale
|
||||
Dim nCount As Integer = 0
|
||||
@@ -619,25 +641,25 @@ Module M_MMFiles
|
||||
bEnd = False
|
||||
While Not bEnd
|
||||
Select Case nState
|
||||
Case State.Command_on ' alzato il comando attendo il busy
|
||||
If SiemensRet.b_busy Then
|
||||
nState = State.Busy_On
|
||||
Else
|
||||
System.Threading.Thread.Sleep(50)
|
||||
End If
|
||||
Case State.Busy_On ' trovato il busy abbasso il comando
|
||||
SiemensSend.n_Flag = COMMAND_OFF ' abbasso il comando
|
||||
' scrivo !!!!!
|
||||
Marshal.StructureToPtr(SiemensSend, pView, False)
|
||||
nState = State.Command_off
|
||||
Case State.Command_off ' abbassato il comando attendo il busy basso
|
||||
If SiemensRet.b_busy Then
|
||||
System.Threading.Thread.Sleep(50)
|
||||
Else
|
||||
nState = State.Busy_Off
|
||||
End If
|
||||
Case State.Busy_Off
|
||||
bEnd = True
|
||||
Case State.Command_on ' alzato il comando attendo il busy
|
||||
If SiemensRet.b_busy Then
|
||||
nState = State.Busy_On
|
||||
Else
|
||||
System.Threading.Thread.Sleep(50)
|
||||
End If
|
||||
Case State.Busy_On ' trovato il busy abbasso il comando
|
||||
SiemensSend.n_Flag = COMMAND_OFF ' abbasso il comando
|
||||
' scrivo !!!!!
|
||||
Marshal.StructureToPtr(SiemensSend, pView, False)
|
||||
nState = State.Command_off
|
||||
Case State.Command_off ' abbassato il comando attendo il busy basso
|
||||
If SiemensRet.b_busy Then
|
||||
System.Threading.Thread.Sleep(50)
|
||||
Else
|
||||
nState = State.Busy_Off
|
||||
End If
|
||||
Case State.Busy_Off
|
||||
bEnd = True
|
||||
End Select
|
||||
' controllo massimo numero di cicli
|
||||
nCount += 1
|
||||
@@ -723,7 +745,8 @@ Module M_MMFiles
|
||||
CurrCN.d_Dvariable_values(n) = SiemensRet.d_interf_variable_values(n)
|
||||
Next
|
||||
|
||||
' copy spindle current
|
||||
' copy spindle current: per debuggare errore di comunicazione
|
||||
'EgtOutLog("Spindle -d_interf_spindle_power-: " & SiemensRet.d_interf_spindle_power.ToString)
|
||||
CurrCN.d_spindle_power = SiemensRet.d_interf_spindle_power
|
||||
|
||||
CurrCN.n_spindle_override(0) = SiemensRet.n_interf_spindle_override
|
||||
|
||||
+25
-7
@@ -92,7 +92,7 @@ Namespace Num
|
||||
Private Const TIMEOUT As Short = 99
|
||||
Private Const SHORTSLEEPTIME As Short = 10
|
||||
Private Const LONGSLEEPTIME As Short = 40
|
||||
Private Const SHORTSLEEPCOUNT As Short = 20
|
||||
Private Const SHORTSLEEPCOUNT As Short = 100
|
||||
Private Const LONGSLEEPCOUNT As Short = 200
|
||||
|
||||
#End Region
|
||||
@@ -236,7 +236,7 @@ Namespace Num
|
||||
' Detect and identify the Flexium CNC type
|
||||
sz_CncFxIdentifier = objDMainCncData.GetCncIdentifier()
|
||||
' _txtGetCncIdentification.Invoke(DirectCast(Sub() _txtGetCncIdentification.Text = CncFxIdentifier, MethodInvoker))
|
||||
|
||||
EgtOutLog("Modello Flexium: " & sz_CncFxIdentifier)
|
||||
If sz_CncFxIdentifier = "Flexium 6" OrElse sz_CncFxIdentifier = "Flexium 8" OrElse sz_CncFxIdentifier = "Flexium 68" Then
|
||||
IsFlexiumPlus = False
|
||||
Else
|
||||
@@ -1077,14 +1077,23 @@ Namespace Num
|
||||
Case CnData.VacuumOff ' (45) Stato aspirazione ventose spento
|
||||
bVacuumOff = CBool(values(n))
|
||||
|
||||
Case CnData.XYJog ' (46)
|
||||
Case CnData.XYJog ' (47)
|
||||
bXYJog = CBool(values(n))
|
||||
Case CnData.ZCJog ' (47)
|
||||
Case CnData.ZCJog ' (48)
|
||||
bZCJog = CBool(values(n))
|
||||
Case CnData.ZBJog ' (48)
|
||||
Case CnData.ZBJog ' (49)
|
||||
bZBCJog = CBool(values(n))
|
||||
Case CnData.PowerON ' (49)
|
||||
Case CnData.PowerON ' (50)
|
||||
bPowerON = CBool(values(n))
|
||||
Case CnData.Remote ' (51)
|
||||
bRemote = CBool(values(n))
|
||||
|
||||
Case CnData.Parking ' (52)
|
||||
bParkingState = CBool(values(n))
|
||||
Case CnData.EnableZone ' (53)
|
||||
nEnableZone = CInt(values(n))
|
||||
Case CnData.EnablePC ' (54)
|
||||
nEnablePc = CInt(values(n))
|
||||
|
||||
End Select
|
||||
Next
|
||||
@@ -1576,7 +1585,16 @@ Namespace Num
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub DPlcVariables_WriteVariables(sz_var_names As String, sz_values As String)
|
||||
Dim _ret As Short = objDPlcVariables.WriteVariables(sz_var_names, CShort(sz_values))
|
||||
Dim value As Short = 0
|
||||
If Not Short.TryParse(sz_values, value) Then
|
||||
If Not IsNothing( sz_values) then
|
||||
EgtOutLog("Write variable: " & sz_var_names & ", value:" & sz_values & " failed!")
|
||||
Else
|
||||
EgtOutLog("Write variable: " & sz_var_names & ", value:nothing failed!")
|
||||
End If
|
||||
Return
|
||||
End If
|
||||
Dim _ret As Short = objDPlcVariables.WriteVariables(sz_var_names, value)
|
||||
If _ret <> 0 Then
|
||||
EgtOutLog("Scrittura " & sz_var_names & " fallita")
|
||||
Else
|
||||
|
||||
+205
-5
@@ -115,6 +115,9 @@
|
||||
<Reference Include="AxInterop.FXLib">
|
||||
<HintPath>..\..\EgtProg\OmagCUT\AxInterop.FXLib.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="EgtPHOTOLib">
|
||||
<HintPath>..\..\EgtProg\Dll32\EgtPHOTOLib.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="EgtUILib, Version=2.3.4.5, Culture=neutral, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\EgtProg\DllD32\EgtUILib.dll</HintPath>
|
||||
@@ -143,6 +146,10 @@
|
||||
</Reference>
|
||||
<Reference Include="PresentationFramework.Aero" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Data.SQLite, Version=1.0.112.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=x86">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\EgtProg\Dll32\System.Data.SQLite.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
@@ -166,6 +173,9 @@
|
||||
<Compile Include="AboutBox\AboutBoxWD.xaml.vb">
|
||||
<DependentUpon>AboutBoxWD.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="CadCuts\SelectPartFromFamilyWD.xaml.vb">
|
||||
<DependentUpon>SelectPartFromFamilyWD.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="CAM\CamPolishing.vb" />
|
||||
<Compile Include="DirectCuts\Polishing.xaml.vb">
|
||||
<DependentUpon>Polishing.xaml</DependentUpon>
|
||||
@@ -196,6 +206,26 @@
|
||||
<DependentUpon>CadCutPageUC.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="CAM\CamAuto.vb" />
|
||||
<Compile Include="Machine\ImportExportMachiningWindowWD.xaml.vb">
|
||||
<DependentUpon>ImportExportMachiningWindowWD.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Machine\ImportExportToolWD.xaml.vb">
|
||||
<DependentUpon>ImportExportToolWD.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Machine\WaterjetDbWindowVM.vb" />
|
||||
<Compile Include="Machine\WaterJetPageVM.vb" />
|
||||
<Compile Include="Machine\WaterJetPageUC.xaml.vb">
|
||||
<DependentUpon>WaterJetPageUC.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Project\AddToDataBaseUC.xaml.vb">
|
||||
<DependentUpon>AddToDataBaseUC.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Project\OmagPhotoWD.xaml.vb">
|
||||
<DependentUpon>OmagPhotoWD.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Project\ScrapsWD.xaml.vb">
|
||||
<DependentUpon>ScrapsWD.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Project\StartLauncheWD.xaml.vb">
|
||||
<DependentUpon>StartLauncheWD.xaml</DependentUpon>
|
||||
</Compile>
|
||||
@@ -395,6 +425,10 @@
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="CadCuts\SelectPartFromFamilyWD.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="DirectCuts\Polishing.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
@@ -431,6 +465,29 @@
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="Machine\ImportExportMachiningWindowWD.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="Machine\ImportExportToolWD.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="Machine\WaterJetPageUC.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="Project\AddToDataBaseUC.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="Project\OmagPhotoWD.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="Project\ScrapsWD.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="Project\StartLauncheWD.xaml">
|
||||
</Page>
|
||||
<Page Include="Project\CicloStartWD.xaml">
|
||||
@@ -742,7 +799,6 @@
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\AvantiVeloce.png" />
|
||||
<Resource Include="Resources\IndietroVeloce.png" />
|
||||
<Resource Include="Resources\NewIcons\ZCJog.png" />
|
||||
<Resource Include="Resources\Pause.png" />
|
||||
<Resource Include="Resources\Play.png" />
|
||||
</ItemGroup>
|
||||
@@ -1041,10 +1097,6 @@
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\NewIcons\SlabId.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\NewIcons\XYJog.png" />
|
||||
<Resource Include="Resources\NewIcons\ZBJog.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\NewIcons\Nuovo.png" />
|
||||
</ItemGroup>
|
||||
@@ -1099,6 +1151,154 @@
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\NewIcons\Foro-singolo.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\NewIcons\Acquisisci-P1_P2.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\NewIcons\Esegui.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\NewIcons\Simula.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\NewIcons\Test-lama.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\NewIcons\File-CSV.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\NewIcons\Allunga-o-accorcia.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\NewIcons\Inizio-allunga-o-accorcia.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\NewIcons\Fine-allunga-o-accorcia.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\NewIcons\ON_OFF-singolo-taglio.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\NewIcons\Tutti-ON.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\NewIcons\Tutti-OFF.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\NewIcons\Inizio-centro-fuori.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\NewIcons\Fine-centro-fuori.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\NewIcons\Modifica-inizio.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\NewIcons\Modifica-fine.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\NewIcons\Inverti.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\NewIcons\Pausa-ON_OFF.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\NewIcons\Inizio-tutti-fuori.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\NewIcons\Inizio-tutti-centro.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\NewIcons\Fine-tutti-centro.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\NewIcons\Fine-tutti-fuori.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\NewIcons\Tutti-allunga.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\NewIcons\Tutti-accorcia.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\NewIcons\Parcheggia-pezzo.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\NewIcons\Inserisci-pezzo.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\NewIcons\Elimina-pezzo.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\NewIcons\Seleziona-tutto.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\NewIcons\Deseleziona-tutto.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\NewIcons\Arco.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\NewIcons\Linea.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\NewIcons\Rimuovi-segmento.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\NewIcons\Chiudi.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\NewIcons\Salva-taglio.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\NewIcons\Take-point.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\NewIcons\Specchia.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\NewIcons\Rimuovi_elimina.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\NewIcons\XYJog.png" />
|
||||
<Resource Include="Resources\NewIcons\ZBJog.png" />
|
||||
<Resource Include="Resources\NewIcons\ZCJog.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\NewIcons\Lucidatura.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\NewIcons\Acquisisci-P1.png" />
|
||||
<Resource Include="Resources\NewIcons\Acquisisci-P2.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\NewIcons\Acquisisci-P.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\Spiral.png" />
|
||||
<Resource Include="Resources\NewIcons\Drag_Rettangle.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\NewIcons\GenerateCN.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\GenerateCN.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\NewIcons\SPLIT-WJ.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\NewIcons\START-WJ.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\NewIcons\Ponticelli.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\NewIcons\Ponticelli_delete.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\NewIcons\Parking.png" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
|
||||
<PropertyGroup>
|
||||
<PostBuildEvent>IF "$(PlatformName)"=="x86" IF "$(ConfigurationName)" == "Release" copy $(TargetPath) c:\EgtProg\OmagCUT\OmagCUTR32.exe
|
||||
|
||||
+134
-6
@@ -46,6 +46,7 @@
|
||||
<BitmapImage x:Key="DownArrowImg" UriSource="Resources/NewIcons/DownArrow.png"></BitmapImage>
|
||||
<BitmapImage x:Key="DrawImg" UriSource="Resources/NewIcons/icone-tagli-3.png"></BitmapImage>
|
||||
<BitmapImage x:Key="FrameMachiningImg" UriSource="Resources/NewIcons/FrameMachining.png"></BitmapImage>
|
||||
<BitmapImage x:Key="GenerateCNImg" UriSource="Resources/NewIcons/GenerateCN.png"></BitmapImage>
|
||||
<BitmapImage x:Key="GenericViewImg" UriSource="Resources/NewIcons/GenericView.png"></BitmapImage>
|
||||
<BitmapImage x:Key="HalfTurnRotateImg" UriSource="Resources/Negative/HalfTurnRotate.png"></BitmapImage>
|
||||
<BitmapImage x:Key="ImportImg" UriSource="Resources/NewIcons/icone-tagli-6.png"></BitmapImage>
|
||||
@@ -88,28 +89,84 @@
|
||||
<BitmapImage x:Key="StopImg" UriSource="Resources/NewIcons/Stop.png"></BitmapImage>
|
||||
<BitmapImage x:Key="VacuumImg" UriSource="Resources/NewIcons/Vacuum.png"></BitmapImage>
|
||||
|
||||
<!--General-->
|
||||
<BitmapImage x:Key="EseguiImg" UriSource="Resources/NewIcons/Esegui.png"></BitmapImage>
|
||||
<BitmapImage x:Key="SimulaImg" UriSource="Resources/NewIcons/Simula.png"></BitmapImage>
|
||||
|
||||
<!--ProjectManager-->
|
||||
<BitmapImage x:Key="NuovoImg" UriSource="Resources/NewIcons/Nuovo.png"></BitmapImage>
|
||||
<BitmapImage x:Key="CaricaImg" UriSource="Resources/NewIcons/Carica.png"></BitmapImage>
|
||||
<BitmapImage x:Key="SalvaImg" UriSource="Resources/NewIcons/Salva.png"></BitmapImage>
|
||||
<BitmapImage x:Key="Salva-con-nomeImg" UriSource="Resources/NewIcons/Salva-con-nome.png"></BitmapImage>
|
||||
<BitmapImage x:Key="CSVImg" UriSource="Resources/NewIcons/CSV.png"></BitmapImage>
|
||||
<BitmapImage x:Key="CSVImg" UriSource="Resources/NewIcons/File-CSV.png"></BitmapImage>
|
||||
<BitmapImage x:Key="Vein-matchImg" UriSource="Resources/NewIcons/Vein-match.png"></BitmapImage>
|
||||
<BitmapImage x:Key="Test-lamaImg" UriSource="Resources/NewIcons/Test-lama.png"></BitmapImage>
|
||||
<BitmapImage x:Key="Parcheggia-pezzoImg" UriSource="Resources/NewIcons/Parcheggia-pezzo.png"></BitmapImage>
|
||||
<BitmapImage x:Key="Inserisci-pezzoImg" UriSource="Resources/NewIcons/Inserisci-pezzo.png"></BitmapImage>
|
||||
<BitmapImage x:Key="Elimina-pezzoImg" UriSource="Resources/NewIcons/Elimina-pezzo.png"></BitmapImage>
|
||||
<BitmapImage x:Key="Seleziona-tuttoImg" UriSource="Resources/NewIcons/Seleziona-tutto.png"></BitmapImage>
|
||||
<BitmapImage x:Key="Deseleziona-tuttoImg" UriSource="Resources/NewIcons/Deseleziona-tutto.png"></BitmapImage>
|
||||
<BitmapImage x:Key="Drag_RettangleImg" UriSource="Resources/NewIcons/Drag_Rettangle.png"></BitmapImage>
|
||||
<BitmapImage x:Key="StartWJImg" UriSource="Resources/NewIcons/START-WJ.png"></BitmapImage>
|
||||
<BitmapImage x:Key="SplitWJImg" UriSource="Resources/NewIcons/SPLIT-WJ.png"></BitmapImage>
|
||||
|
||||
<!--Machine-->
|
||||
<BitmapImage x:Key="DatiMacchinaImg" UriSource="Resources/NewIcons/DatiMacchina.png"></BitmapImage>
|
||||
<BitmapImage x:Key="DB-lavorazioniImg" UriSource="Resources/NewIcons/DB-lavorazioni.png"></BitmapImage>
|
||||
<BitmapImage x:Key="DB-utensiliImg" UriSource="Resources/NewIcons/DB-utensili.png"></BitmapImage>
|
||||
<BitmapImage x:Key="MacchinaImg" UriSource="Resources/NewIcons/Macchina.png"></BitmapImage>
|
||||
<BitmapImage x:Key="LucidaturaImg" UriSource="Resources/NewIcons/Lucidatura.png"></BitmapImage>
|
||||
|
||||
|
||||
<!--Direct cuts-->
|
||||
<BitmapImage x:Key="Taglio-grigliaImg" UriSource="Resources/NewIcons/Taglio-griglia.png"></BitmapImage>
|
||||
<BitmapImage x:Key="Taglio-multiploImg" UriSource="Resources/NewIcons/Taglio-multiplo.png"></BitmapImage>
|
||||
<BitmapImage x:Key="Taglio-singoloImg" UriSource="Resources/NewIcons/Taglio-singolo.png"></BitmapImage>
|
||||
<BitmapImage x:Key="Foro-singoloImg" UriSource="Resources/NewIcons/Foro-singolo.png"></BitmapImage>
|
||||
<BitmapImage x:Key="SpianaturaImg" UriSource="Resources/NewIcons/Spianatura.png"></BitmapImage>
|
||||
<BitmapImage x:Key="Movimento-manualeImg" UriSource="Resources/NewIcons/Movimento-manuale.png"></BitmapImage>
|
||||
<BitmapImage x:Key="Copia-dimaImg" UriSource="Resources/NewIcons/Copia-dima.png"></BitmapImage>
|
||||
<BitmapImage x:Key="Acquisisci-P1_P2Img" UriSource="Resources/NewIcons/Acquisisci-P1_P2.png"></BitmapImage>
|
||||
<BitmapImage x:Key="Acquisisci-P1Img" UriSource="Resources/NewIcons/Acquisisci-P1.png"></BitmapImage>
|
||||
<BitmapImage x:Key="Acquisisci-P2Img" UriSource="Resources/NewIcons/Acquisisci-P2.png"></BitmapImage>
|
||||
<BitmapImage x:Key="Acquisisci-PImg" UriSource="Resources/NewIcons/Acquisisci-P.png"></BitmapImage>
|
||||
<BitmapImage x:Key="ArcoImg" UriSource="Resources/NewIcons/Arco.png"></BitmapImage>
|
||||
<BitmapImage x:Key="LineaImg" UriSource="Resources/NewIcons/Linea.png"></BitmapImage>
|
||||
<BitmapImage x:Key="Rimuovi-segmentoImg" UriSource="Resources/NewIcons/Rimuovi-segmento.png"></BitmapImage>
|
||||
<BitmapImage x:Key="ChiudiImg" UriSource="Resources/NewIcons/Chiudi.png"></BitmapImage>
|
||||
<BitmapImage x:Key="Salva-taglioImg" UriSource="Resources/NewIcons/Salva-taglio.png"></BitmapImage>
|
||||
<BitmapImage x:Key="Take-pointImg" UriSource="Resources/NewIcons/Take-point.png"></BitmapImage>
|
||||
|
||||
<BitmapImage x:Key="XYJogImg" UriSource="Resources/NewIcons/XYJog.png"></BitmapImage>
|
||||
<BitmapImage x:Key="ZCJogImg" UriSource="Resources/NewIcons/ZCJog.png"></BitmapImage>
|
||||
<BitmapImage x:Key="ZBJogImg" UriSource="Resources/NewIcons/ZBJog.png"></BitmapImage>
|
||||
|
||||
|
||||
<!--Frame-->
|
||||
<BitmapImage x:Key="Sezione-corniceImg" UriSource="Resources/NewIcons/Sezione-cornice.png"></BitmapImage>
|
||||
|
||||
<BitmapImage x:Key="SpecchiaImg" UriSource="Resources/NewIcons/Specchia.png"></BitmapImage>
|
||||
<BitmapImage x:Key="Rimuovi_eliminaImg" UriSource="Resources/NewIcons/Rimuovi_elimina.png"></BitmapImage>
|
||||
|
||||
<!--Machinig-->
|
||||
<BitmapImage x:Key="Allunga-AccorciaImg" UriSource="Resources/NewIcons/Allunga-o-accorcia.png"></BitmapImage>
|
||||
<BitmapImage x:Key="Inizio-Allunga-AccorciaImg" UriSource="Resources/NewIcons/Inizio-allunga-o-accorcia.png"></BitmapImage>
|
||||
<BitmapImage x:Key="Fine-Allunga-AccorciaImg" UriSource="Resources/NewIcons/Fine-allunga-o-accorcia.png"></BitmapImage>
|
||||
<BitmapImage x:Key="ON_OFF-singolo-taglioImg" UriSource="Resources/NewIcons/ON_OFF-singolo-taglio.png"></BitmapImage>
|
||||
<BitmapImage x:Key="Tutti-ONImg" UriSource="Resources/NewIcons/Tutti-ON.png"></BitmapImage>
|
||||
<BitmapImage x:Key="Tutti-OFFImg" UriSource="Resources/NewIcons/Tutti-OFF.png"></BitmapImage>
|
||||
<BitmapImage x:Key="Inizio-Centro-FuoriImg" UriSource="Resources/NewIcons/Inizio-centro-fuori.png"></BitmapImage>
|
||||
<BitmapImage x:Key="Fine-Centro-FuoriImg" UriSource="Resources/NewIcons/Fine-centro-fuori.png"></BitmapImage>
|
||||
<BitmapImage x:Key="Modifica-InizioImg" UriSource="Resources/NewIcons/Modifica-inizio.png"></BitmapImage>
|
||||
<BitmapImage x:Key="Modifica-FineImg" UriSource="Resources/NewIcons/Modifica-fine.png"></BitmapImage>
|
||||
<BitmapImage x:Key="InvertiImg" UriSource="Resources/NewIcons/Inverti.png"></BitmapImage>
|
||||
<BitmapImage x:Key="Pausa-ON_OFFImg" UriSource="Resources/NewIcons/Pausa-ON_OFF.png"></BitmapImage>
|
||||
<BitmapImage x:Key="Inizio-tutti-fuoriImg" UriSource="Resources/NewIcons/Inizio-tutti-fuori.png"></BitmapImage>
|
||||
<BitmapImage x:Key="Inizio-tutti-centroImg" UriSource="Resources/NewIcons/Inizio-tutti-centro.png"></BitmapImage>
|
||||
<BitmapImage x:Key="Fine-tutti-fuoriImg" UriSource="Resources/NewIcons/Fine-tutti-fuori.png"></BitmapImage>
|
||||
<BitmapImage x:Key="Fine-tutti-centroImg" UriSource="Resources/NewIcons/Fine-tutti-centro.png"></BitmapImage>
|
||||
<BitmapImage x:Key="Tutti-allungaImg" UriSource="Resources/NewIcons/Tutti-allunga.png"></BitmapImage>
|
||||
<BitmapImage x:Key="Tutti-accorciaImg" UriSource="Resources/NewIcons/Tutti-accorcia.png"></BitmapImage>
|
||||
|
||||
<FontFamily x:Key="OmagCut_Font">./Resources/Fonts/#Roboto</FontFamily>
|
||||
|
||||
<SolidColorBrush x:Key="OmagCut_TreeViewBackGroundColor" Color="#636974" />
|
||||
@@ -150,12 +207,19 @@
|
||||
</Style>
|
||||
|
||||
<Style x:Key="OmagCut_Border" TargetType="{x:Type Border}" BasedOn="{StaticResource OmagCut_EmptyBorder}">
|
||||
<!--<Setter Property="Background" Value="#636974"/>
|
||||
<Setter Property="BorderBrush" Value="#636974"/>-->
|
||||
<!--<Setter Property="Background" Value="#636974" #3C3F48/>
|
||||
<Setter Property="BorderBrush" Value="#636974" #3C3F48/>-->
|
||||
<Setter Property="Background" Value="#3C3F48"/>
|
||||
<Setter Property="BorderBrush" Value="#3C3F48"/>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="OmagCut_MachiningBorder" TargetType="{x:Type Border}" BasedOn="{StaticResource OmagCut_EmptyBorder}">
|
||||
<!--<Setter Property="Background" Value="#636974" #3C3F48/>
|
||||
<Setter Property="BorderBrush" Value="#636974" #3C3F48/>-->
|
||||
<Setter Property="Background" Value="{StaticResource OmagCut_Blue}"/>
|
||||
<Setter Property="BorderBrush" Value="#3C3F48"/>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="OmagCut_EmptyBorder" TargetType="{x:Type Border}">
|
||||
<Setter Property="BorderThickness" Value="{StaticResource BorderThickness}"/>
|
||||
<Setter Property="CornerRadius" Value="{DynamicResource EmptyBorder_CornerRadius}"/>
|
||||
@@ -272,15 +336,40 @@
|
||||
<Setter Property="Foreground" Value="White"/>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="OmagCut_WjDbRightGrayGradientYellowTextButton" TargetType="{x:Type Button}" BasedOn="{StaticResource OmagCut_Button_Wrap}">
|
||||
<Setter Property="Background" Value="#1C1D22"/>
|
||||
<Setter Property="BorderBrush" Value="#1C1D22"/>
|
||||
<Setter Property="Foreground" Value="White"/>
|
||||
<Setter Property="FontSize" Value="15"/>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="OmagCut_YellowIconToggleButton" TargetType="{x:Type ToggleButton}" BasedOn="{StaticResource OmagCut_ToggleButton}">
|
||||
<Setter Property="OverridesDefaultStyle" Value="True" />
|
||||
<Setter Property="Background" Value="#636974"/>
|
||||
<Setter Property="BorderBrush" Value="#636974"/>
|
||||
<Setter Property="FontSize" Value="{StaticResource FontSize_UpperCaseCharacter}"/>
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type ToggleButton}">
|
||||
<Grid Background="{TemplateBinding Background}">
|
||||
<ContentPresenter x:Name="MyContentPresenter"
|
||||
Content="{TemplateBinding Content}"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center" />
|
||||
</Grid>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
<Style.Triggers>
|
||||
<Trigger Property="IsChecked" Value="True">
|
||||
<Setter Property="ToggleButton.Background" Value="#145993" />
|
||||
</Trigger>
|
||||
<Trigger Property="IsEnabled" Value="False">
|
||||
<Setter Property="Button.Background" Value="{StaticResource OmagCut_LightGray}" />
|
||||
<Setter Property="Button.Foreground" Value="{StaticResource OmagCut_Blue}"/>
|
||||
</Trigger>
|
||||
</Style.Triggers>
|
||||
|
||||
</Style>
|
||||
|
||||
<Style x:Key="OmagCut_CalculatorTextBox" TargetType="{x:Type EgtWPFLib:EgtTextBox}" BasedOn="{StaticResource OmagCut_TextBox}">
|
||||
@@ -460,10 +549,30 @@
|
||||
</Style>
|
||||
|
||||
<Style x:Key="OmagCut_YellowIconButton" TargetType="{x:Type Button}" BasedOn="{StaticResource OmagCut_Button}">
|
||||
<Setter Property="OverridesDefaultStyle" Value="True" />
|
||||
<Setter Property="Background" Value="#1C1D22"/>
|
||||
<Setter Property="BorderBrush" Value="#1C1D22"/>
|
||||
<!--<Setter Property="BorderBrush" Value="{StaticResource OmagCut_Yellow}"/>-->
|
||||
<Setter Property="Foreground" Value="White"/>
|
||||
<Setter Property="Foreground" Value="LightGray"/>
|
||||
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type Button}">
|
||||
<Grid Background="{TemplateBinding Background}">
|
||||
<ContentPresenter x:Name="MyContentPresenter"
|
||||
Content="{TemplateBinding Content}"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center" />
|
||||
</Grid>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
<Style.Triggers>
|
||||
<Trigger Property="IsEnabled" Value="False">
|
||||
<Setter Property="Button.Background" Value="{StaticResource OmagCut_LightGray}" />
|
||||
<Setter Property="Button.Foreground" Value="{StaticResource OmagCut_DarkGray}"/>
|
||||
</Trigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="OmagCut_RightGrayYellowTextToggleButton" TargetType="{x:Type ToggleButton}" BasedOn="{StaticResource OmagCut_ToggleButton_Wrap}">
|
||||
@@ -481,10 +590,29 @@
|
||||
</Style>
|
||||
|
||||
<Style x:Key="OmagCut_GradientBlueIconButton" TargetType="{x:Type Button}" BasedOn="{StaticResource OmagCut_Button}">
|
||||
<Setter Property="OverridesDefaultStyle" Value="True" />
|
||||
<Setter Property="Background" Value="#2D3036"/>
|
||||
<Setter Property="BorderBrush" Value="#2D3036"/>
|
||||
<!--<Setter Property="BorderBrush" Value="{StaticResource OmagCut_Blue}"/>-->
|
||||
<Setter Property="BorderBrush" Value="{StaticResource OmagCut_Blue}"/>
|
||||
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type Button}">
|
||||
<Grid Background="{TemplateBinding Background}">
|
||||
<ContentPresenter x:Name="MyContentPresenter"
|
||||
Content="{TemplateBinding Content}"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center" />
|
||||
</Grid>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
<Style.Triggers>
|
||||
<Trigger Property="IsEnabled" Value="False">
|
||||
<Setter Property="Button.Background" Value="{StaticResource OmagCut_LightGray}" />
|
||||
<Setter Property="Button.Foreground" Value="{StaticResource OmagCut_Blue}"/>
|
||||
</Trigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="OmagCut_CenteredLowerCaseCharacterTextBlock" TargetType="{x:Type TextBlock}" BasedOn="{StaticResource OmagCut_UpperCaseCharacterTextBlock}">
|
||||
|
||||
+90
-3
@@ -116,6 +116,7 @@
|
||||
<BitmapImage x:Key="DownArrowImg" UriSource="Resources/DownArrow.png"></BitmapImage>
|
||||
<BitmapImage x:Key="DrawImg" UriSource="Resources/Draw.png"></BitmapImage>
|
||||
<BitmapImage x:Key="FrameMachiningImg" UriSource="Resources/FrameMachining.png"></BitmapImage>
|
||||
<BitmapImage x:Key="GenerateCNImg" UriSource="Resources/GenerateCN.png"></BitmapImage>
|
||||
<BitmapImage x:Key="GenericViewImg" UriSource="Resources/GenericView.png"></BitmapImage>
|
||||
<BitmapImage x:Key="HalfTurnRotateImg" UriSource="Resources/HalfTurnRotate.png"></BitmapImage>
|
||||
<BitmapImage x:Key="ImportImg" UriSource="Resources/Import.png"></BitmapImage>
|
||||
@@ -156,18 +157,35 @@
|
||||
<BitmapImage x:Key="VacuumImg" UriSource="Resources/Vacuum.png"></BitmapImage>
|
||||
|
||||
<!--sono le stesse immagini usate per l'interfaccia Dark-->
|
||||
<!--General-->
|
||||
<BitmapImage x:Key="EseguiImg" UriSource="Resources/NewIcons/Esegui.png"></BitmapImage>
|
||||
<BitmapImage x:Key="SimulaImg" UriSource="Resources/NewIcons/Simula.png"></BitmapImage>
|
||||
|
||||
<!--ProjectManager-->
|
||||
<BitmapImage x:Key="NuovoImg" UriSource="Resources/NewIcons/Nuovo.png"></BitmapImage>
|
||||
<BitmapImage x:Key="CaricaImg" UriSource="Resources/NewIcons/Carica.png"></BitmapImage>
|
||||
<BitmapImage x:Key="SalvaImg" UriSource="Resources/NewIcons/Salva.png"></BitmapImage>
|
||||
<BitmapImage x:Key="Salva-con-nomeImg" UriSource="Resources/NewIcons/Salva-con-nome.png"></BitmapImage>
|
||||
<BitmapImage x:Key="CSVImg" UriSource="Resources/NewIcons/CSV.png"></BitmapImage>
|
||||
<BitmapImage x:Key="CSVImg" UriSource="Resources/NewIcons/File-CSV.png"></BitmapImage>
|
||||
<BitmapImage x:Key="Vein-matchImg" UriSource="Resources/NewIcons/Vein-match.png"></BitmapImage>
|
||||
<BitmapImage x:Key="Test-lamaImg" UriSource="Resources/NewIcons/Test-lama.png"></BitmapImage>
|
||||
<BitmapImage x:Key="Parcheggia-pezzoImg" UriSource="Resources/NewIcons/Parcheggia-pezzo.png"></BitmapImage>
|
||||
<BitmapImage x:Key="Inserisci-pezzoImg" UriSource="Resources/NewIcons/Inserisci-pezzo.png"></BitmapImage>
|
||||
<BitmapImage x:Key="Elimina-pezzoImg" UriSource="Resources/NewIcons/Elimina-pezzo.png"></BitmapImage>
|
||||
<BitmapImage x:Key="Seleziona-tuttoImg" UriSource="Resources/NewIcons/Seleziona-tutto.png"></BitmapImage>
|
||||
<BitmapImage x:Key="Deseleziona-tuttoImg" UriSource="Resources/NewIcons/Deseleziona-tutto.png"></BitmapImage>
|
||||
<BitmapImage x:Key="Drag_RettangleImg" UriSource="Resources/NewIcons/Drag_Rettangle.png"></BitmapImage>
|
||||
<BitmapImage x:Key="StartWJImg" UriSource="Resources/NewIcons/START-WJ.png"></BitmapImage>
|
||||
<BitmapImage x:Key="SplitWJImg" UriSource="Resources/NewIcons/SPLIT-WJ.png"></BitmapImage>
|
||||
|
||||
<!--Machine-->
|
||||
<BitmapImage x:Key="DatiMacchinaImg" UriSource="Resources/NewIcons/DatiMacchina.png"></BitmapImage>
|
||||
<BitmapImage x:Key="DB-lavorazioniImg" UriSource="Resources/NewIcons/DB-lavorazioni.png"></BitmapImage>
|
||||
<BitmapImage x:Key="DB-utensiliImg" UriSource="Resources/NewIcons/DB-utensili.png"></BitmapImage>
|
||||
<BitmapImage x:Key="MacchinaImg" UriSource="Resources/NewIcons/Macchina.png"></BitmapImage>
|
||||
<BitmapImage x:Key="LucidaturaImg" UriSource="Resources/NewIcons/Lucidatura.png"></BitmapImage>
|
||||
|
||||
|
||||
<!--Direct cuts-->
|
||||
<BitmapImage x:Key="Taglio-grigliaImg" UriSource="Resources/NewIcons/Taglio-griglia.png"></BitmapImage>
|
||||
<BitmapImage x:Key="Taglio-multiploImg" UriSource="Resources/NewIcons/Taglio-multiplo.png"></BitmapImage>
|
||||
@@ -176,9 +194,49 @@
|
||||
<BitmapImage x:Key="SpianaturaImg" UriSource="Resources/NewIcons/Spianatura.png"></BitmapImage>
|
||||
<BitmapImage x:Key="Movimento-manualeImg" UriSource="Resources/NewIcons/Movimento-manuale.png"></BitmapImage>
|
||||
<BitmapImage x:Key="Copia-dimaImg" UriSource="Resources/NewIcons/Copia-dima.png"></BitmapImage>
|
||||
<BitmapImage x:Key="Acquisisci-P1_P2Img" UriSource="Resources/NewIcons/Acquisisci-P1_P2.png"></BitmapImage>
|
||||
<BitmapImage x:Key="Acquisisci-P1Img" UriSource="Resources/NewIcons/Acquisisci-P1.png"></BitmapImage>
|
||||
<BitmapImage x:Key="Acquisisci-P2Img" UriSource="Resources/NewIcons/Acquisisci-P2.png"></BitmapImage>
|
||||
<BitmapImage x:Key="Acquisisci-PImg" UriSource="Resources/NewIcons/Acquisisci-P.png"></BitmapImage>
|
||||
<BitmapImage x:Key="ArcoImg" UriSource="Resources/NewIcons/Arco.png"></BitmapImage>
|
||||
<BitmapImage x:Key="LineaImg" UriSource="Resources/NewIcons/Linea.png"></BitmapImage>
|
||||
<BitmapImage x:Key="Rimuovi-segmentoImg" UriSource="Resources/NewIcons/Rimuovi-segmento.png"></BitmapImage>
|
||||
<BitmapImage x:Key="ChiudiImg" UriSource="Resources/NewIcons/Chiudi.png"></BitmapImage>
|
||||
<BitmapImage x:Key="Salva-taglioImg" UriSource="Resources/NewIcons/Salva-taglio.png"></BitmapImage>
|
||||
<BitmapImage x:Key="Take-pointImg" UriSource="Resources/NewIcons/Take-point.png"></BitmapImage>
|
||||
|
||||
<BitmapImage x:Key="XYJogImg" UriSource="Resources/NewIcons/XYJog.png"></BitmapImage>
|
||||
<BitmapImage x:Key="ZCJogImg" UriSource="Resources/NewIcons/ZCJog.png"></BitmapImage>
|
||||
<BitmapImage x:Key="ZBJogImg" UriSource="Resources/NewIcons/ZBJog.png"></BitmapImage>
|
||||
<BitmapImage x:Key="ParkingImg" UriSource="Resources/NewIcons/Parking.png"></BitmapImage>
|
||||
|
||||
|
||||
<!--Frame-->
|
||||
<BitmapImage x:Key="Sezione-corniceImg" UriSource="Resources/NewIcons/Sezione-cornice.png"></BitmapImage>
|
||||
<BitmapImage x:Key="SpecchiaImg" UriSource="Resources/NewIcons/Specchia.png"></BitmapImage>
|
||||
<BitmapImage x:Key="Rimuovi_eliminaImg" UriSource="Resources/NewIcons/Rimuovi_elimina.png"></BitmapImage>
|
||||
|
||||
<!--Machinig-->
|
||||
<BitmapImage x:Key="Allunga-AccorciaImg" UriSource="Resources/NewIcons/Allunga-o-accorcia.png"></BitmapImage>
|
||||
<BitmapImage x:Key="Inizio-Allunga-AccorciaImg" UriSource="Resources/NewIcons/Inizio-allunga-o-accorcia.png"></BitmapImage>
|
||||
<BitmapImage x:Key="PonticelliWJImg" UriSource="Resources/NewIcons/Ponticelli.png"></BitmapImage>
|
||||
<BitmapImage x:Key="PonticelliDeleteWJImg" UriSource="Resources/NewIcons/Ponticelli_delete.png"></BitmapImage>
|
||||
<BitmapImage x:Key="Fine-Allunga-AccorciaImg" UriSource="Resources/NewIcons/Fine-allunga-o-accorcia.png"></BitmapImage>
|
||||
<BitmapImage x:Key="ON_OFF-singolo-taglioImg" UriSource="Resources/NewIcons/ON_OFF-singolo-taglio.png"></BitmapImage>
|
||||
<BitmapImage x:Key="Tutti-ONImg" UriSource="Resources/NewIcons/Tutti-ON.png"></BitmapImage>
|
||||
<BitmapImage x:Key="Tutti-OFFImg" UriSource="Resources/NewIcons/Tutti-OFF.png"></BitmapImage>
|
||||
<BitmapImage x:Key="Inizio-Centro-FuoriImg" UriSource="Resources/NewIcons/Inizio-centro-fuori.png"></BitmapImage>
|
||||
<BitmapImage x:Key="Fine-Centro-FuoriImg" UriSource="Resources/NewIcons/Fine-centro-fuori.png"></BitmapImage>
|
||||
<BitmapImage x:Key="Modifica-InizioImg" UriSource="Resources/NewIcons/Modifica-inizio.png"></BitmapImage>
|
||||
<BitmapImage x:Key="Modifica-FineImg" UriSource="Resources/NewIcons/Modifica-fine.png"></BitmapImage>
|
||||
<BitmapImage x:Key="InvertiImg" UriSource="Resources/NewIcons/Inverti.png"></BitmapImage>
|
||||
<BitmapImage x:Key="Pausa-ON_OFFImg" UriSource="Resources/NewIcons/Pausa-ON_OFF.png"></BitmapImage>
|
||||
<BitmapImage x:Key="Inizio-tutti-fuoriImg" UriSource="Resources/NewIcons/Inizio-tutti-fuori.png"></BitmapImage>
|
||||
<BitmapImage x:Key="Inizio-tutti-centroImg" UriSource="Resources/NewIcons/Inizio-tutti-centro.png"></BitmapImage>
|
||||
<BitmapImage x:Key="Fine-tutti-fuoriImg" UriSource="Resources/NewIcons/Fine-tutti-fuori.png"></BitmapImage>
|
||||
<BitmapImage x:Key="Fine-tutti-centroImg" UriSource="Resources/NewIcons/Fine-tutti-centro.png"></BitmapImage>
|
||||
<BitmapImage x:Key="Tutti-allungaImg" UriSource="Resources/NewIcons/Tutti-allunga.png"></BitmapImage>
|
||||
<BitmapImage x:Key="Tutti-accorciaImg" UriSource="Resources/NewIcons/Tutti-accorcia.png"></BitmapImage>
|
||||
<BitmapImage x:Key="LastProjImg" UriSource="Resources/NewIcons/PlayStep.png"></BitmapImage>
|
||||
|
||||
<FontFamily x:Key="OmagCut_Font">./Resources/Fonts/#Century Gothic</FontFamily>
|
||||
@@ -199,7 +257,14 @@
|
||||
<Setter Property="Margin" Value="1" />
|
||||
</Style>
|
||||
|
||||
<!--Border-->
|
||||
<Style x:Key="OmagCut_MachiningBorder" TargetType="{x:Type Border}" BasedOn="{StaticResource OmagCut_EmptyBorder}">
|
||||
<!--<Setter Property="Background" Value="#636974" #3C3F48/>
|
||||
<Setter Property="BorderBrush" Value="#636974" #3C3F48/>-->
|
||||
<Setter Property="Background" Value="{StaticResource OmagCut_Yellow}"/>
|
||||
<Setter Property="BorderBrush" Value="#3C3F48"/>
|
||||
</Style>
|
||||
|
||||
<!--Border-->
|
||||
<Style x:Key="OmagCut_Border" TargetType="{x:Type Border}" BasedOn="{StaticResource OmagCut_EmptyBorder}">
|
||||
<Setter Property="Background" Value="{StaticResource OmagCut_LightGray}"/>
|
||||
<Setter Property="BorderBrush" Value="{StaticResource OmagCut_Blue}"/>
|
||||
@@ -412,6 +477,13 @@
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="OmagCut_WjDbRightGrayGradientYellowTextButton" TargetType="{x:Type Button}" BasedOn="{StaticResource OmagCut_Button_Wrap}">
|
||||
<Setter Property="Background" Value="{StaticResource OmagCut_RightGradientGray}"/>
|
||||
<Setter Property="BorderBrush" Value="{StaticResource OmagCut_Yellow}"/>
|
||||
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
|
||||
<Setter Property="FontSize" Value="15"/>
|
||||
</Style>
|
||||
|
||||
<!-- ______________________________________________________________________________________________________________________ -->
|
||||
|
||||
<!--CheckBox-->
|
||||
@@ -1140,7 +1212,21 @@
|
||||
<Setter Property="KeyboardDimension" Value="300"/>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="OmagCut_MachToolCalculatorTextBox" TargetType="{x:Type EgtWPFLib:EgtTextBox}" BasedOn="{StaticResource OmagCut_CalculatorTextBox}">
|
||||
<Style x:Key="OmagCut_CalculatorParamWjTextBox" TargetType="{x:Type EgtWPFLib:EgtTextBox}" BasedOn="{StaticResource OmagCut_TextBox}">
|
||||
<Setter Property="Width" Value="80"/>
|
||||
<Setter Property="Keyboard" Value="Calculator"/>
|
||||
<Setter Property="KeyboardDimension" Value="300"/>
|
||||
<Setter Property="IsHitTestVisible" Value="False" />
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding IsSelected, RelativeSource={RelativeSource FindAncestor,
|
||||
AncestorType={x:Type ListBoxItem}, AncestorLevel=1}}"
|
||||
Value="True">
|
||||
<Setter Property="IsHitTestVisible" Value="True" />
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="OmagCut_MachToolCalculatorTextBox" TargetType="{x:Type EgtWPFLib:EgtTextBox}" BasedOn="{StaticResource OmagCut_CalculatorTextBox}">
|
||||
<Setter Property="Margin" Value="{DynamicResource MachToolLeftTextBoxNoBorder_Margin}"/>
|
||||
</Style>
|
||||
|
||||
@@ -1174,6 +1260,7 @@
|
||||
|
||||
<Style x:Key="OmagCut_FixedTextBox" TargetType="{x:Type EgtWPFLib:EgtTextBox}" BasedOn="{StaticResource OmagCut_TextBox}">
|
||||
<Setter Property="BorderBrush" Value="{StaticResource OmagCut_Gray}"/>
|
||||
<Setter Property="Background" Value="White"/>
|
||||
<Setter Property="IsReadOnly" Value="True"/>
|
||||
<Setter Property="IsEnabled" Value="False"/>
|
||||
<Setter Property="Template" Value="{StaticResource FixedTextBoxTemplate}" />
|
||||
|
||||
@@ -50,6 +50,7 @@ Namespace TreeViewItem
|
||||
Private m_sPictureString As String
|
||||
Private m_nTType As Integer
|
||||
Private m_Items As ObservableCollection(Of CustomItem)
|
||||
Friend m_IsValidTool As Boolean
|
||||
|
||||
Public ReadOnly Property PictureString As String
|
||||
Get
|
||||
@@ -86,12 +87,13 @@ Namespace TreeViewItem
|
||||
'Private m_sTitle As String
|
||||
Private m_nType As Integer
|
||||
|
||||
'Private m_sName As String
|
||||
'Public Property Name As String
|
||||
' Get
|
||||
' Return m_sTitle
|
||||
' Return m_sName
|
||||
' End Get
|
||||
' Set(value As String)
|
||||
' m_sTitle = value
|
||||
' m_sName = value
|
||||
' End Set
|
||||
'End Property
|
||||
|
||||
@@ -101,11 +103,31 @@ Namespace TreeViewItem
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Friend m_IsValidTool As Boolean = True
|
||||
|
||||
Public Property IsValidTool As Boolean
|
||||
Get
|
||||
Return m_IsValidTool
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
If value <> m_IsValidTool Then
|
||||
m_IsValidTool = value
|
||||
NotifyPropertyChanged("ToolColor")
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Sub New(Title As String, nType As Integer)
|
||||
Me.Name = Title
|
||||
m_nType = nType
|
||||
End Sub
|
||||
|
||||
Sub New(sName As String, nType As Integer, bIsValidTool As Boolean)
|
||||
MyBase.Name = sName
|
||||
m_nType = nType
|
||||
m_IsValidTool = bIsValidTool
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
Public Class PartCathegoryItem
|
||||
|
||||
@@ -9,7 +9,8 @@ Public Class OptionsPageUC
|
||||
Private UnitsList() As String = {"inch", "mm"}
|
||||
Private ThemesList() As String = {"Classic", "Dark"}
|
||||
|
||||
Private StartLauncherList() As String = {"Last Project", "New Project", "Open Folder", "Show Window"}
|
||||
' "Last Project", "New Project", "Open Folder", "Show Window"
|
||||
Private StartLauncherList() As String = {EgtMsg(91013), EgtMsg(91014), EgtMsg(91015), EgtMsg(91016)}
|
||||
|
||||
Private Sub OptionsPageUC_Initialized(sender As Object, e As EventArgs) Handles Me.Initialized
|
||||
|
||||
@@ -109,7 +110,7 @@ Public Class OptionsPageUC
|
||||
ToleranceEMsgTxBl.Text = EgtMsg(MSG_OPTIONSPAGEUC + 21)
|
||||
AffondamentoMsgTxBl.Text = EgtMsg(MSG_OPTIONSPAGEUC + 27)
|
||||
LarghezzaMsgTxBl.Text = EgtMsg(MSG_OPTIONSPAGEUC + 28)
|
||||
StartLauncherGpBx.Header = "Avvio Programma"
|
||||
StartLauncherGpBx.Header = EgtMsg(91009)
|
||||
End Sub
|
||||
|
||||
Private Sub UpdateSlabDxf()
|
||||
|
||||
@@ -0,0 +1,95 @@
|
||||
<UserControl x:Class="AddToDataBaseUC"
|
||||
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:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="853.3" d:DesignWidth="1280">
|
||||
|
||||
<Border Style="{DynamicResource OmagCut_Border}">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
<ColumnDefinition Width="2.5*"/>
|
||||
<ColumnDefinition Width="0.25*"/>
|
||||
<ColumnDefinition Width="4*"/>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<!--Nome BLOCCO-->
|
||||
<TextBlock Name="BlockTxBl" Grid.Column="1" Grid.Row="1" Text="Name block"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="BlockTxBx" Grid.Column="3" Grid.Row="1"
|
||||
Style="{DynamicResource OmagCut_KeyboardTextBox}"/>
|
||||
<!--Numero ID-->
|
||||
<TextBlock Name="NbrIdTxBl" Grid.Column="1" Grid.Row="3" Text="ID"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="NbrIdTxBx" Grid.Column="3" Grid.Row="3"
|
||||
Style="{DynamicResource OmagCut_KeyboardTextBox}"/>
|
||||
<!--STATE-->
|
||||
<TextBlock Name="StateTxBl" Grid.Column="1" Grid.Row="5" Text="State"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||
<ComboBox Name="StateCmBx" Grid.Column="3" Grid.Row="5" Style="{StaticResource OmagCut_LeftComboBoxInBorder}">
|
||||
<ComboBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding}" Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</DataTemplate>
|
||||
</ComboBox.ItemTemplate>
|
||||
</ComboBox>
|
||||
<!--PROJECT-->
|
||||
<TextBlock Name="ProjectNameTxBl" Grid.Column="1" Grid.Row="7" Text="Project"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="ProjectTxBx" Grid.Column="3" Grid.Row="7"
|
||||
Style="{DynamicResource OmagCut_KeyboardTextBox}"/>
|
||||
<!--MATERIAL-->
|
||||
<TextBlock Name="MatTxBl" Grid.Column="1" Grid.Row="9" Text="Mat"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="MatTxBx" Grid.Column="3" Grid.Row="9"
|
||||
Style="{DynamicResource OmagCut_KeyboardTextBox}" IsEnabled="False"/>
|
||||
<!--THICKNESS-->
|
||||
<TextBlock Name="ThicknessTxBl" Grid.Column="1" Grid.Row="11" Text="Thickness"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="ThicknessTxBx" Grid.Column="3" Grid.Row="11"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
<!--WAREHOUSE-->
|
||||
<TextBlock Name="WarehouseTxBl" Grid.Column="1" Grid.Row="13" Text="Warehouse position"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="WarehouseTxBx" Grid.Column="3" Grid.Row="13"
|
||||
Style="{DynamicResource OmagCut_KeyboardTextBox}"/>
|
||||
|
||||
<!--CANCEL-->
|
||||
<Button Name="CacelBtn" Grid.Column="1" Grid.Row="15" Content="Delete"
|
||||
Style="{DynamicResource OmagCut_YellowTextButton}"/>
|
||||
<!--ADD-->
|
||||
<Button Name="AddBtn" Grid.Column="3" Grid.Row="15" Content="Add"
|
||||
Style="{DynamicResource OmagCut_YellowTextButton}"/>
|
||||
<!--PRINT-->
|
||||
<Button Name="PrintBtn" Grid.Column="1" Grid.Row="17" Content="Print"
|
||||
Style="{DynamicResource OmagCut_YellowTextButton}"/>
|
||||
|
||||
</Grid>
|
||||
|
||||
</Border>
|
||||
|
||||
</UserControl>
|
||||
@@ -0,0 +1,121 @@
|
||||
Imports EgtUILib
|
||||
Imports EgtPHOTOLib
|
||||
Imports System.IO
|
||||
|
||||
Public Class AddToDataBaseUC
|
||||
|
||||
Private m_OmagPhotoWD As OmagPhotoWD
|
||||
|
||||
#Region "PROPERTY"
|
||||
Private Sub BlockTxBx_EgtClosed(sender As Object, e As EventArgs) Handles BlockTxBx.EgtClosed
|
||||
' assegno il dato alla classe inizializzata nella libreria
|
||||
EgtPHOTOLib.PhotoMap.refOptionPanelVM.SelSlab.sNameBlock = BlockTxBx.Text
|
||||
' devo riasseganre il valore dell'indice
|
||||
NbrIdTxBx.Text = EgtPHOTOLib.PhotoMap.refOptionPanelVM.SelSlab.sNbrID
|
||||
EnableButtons()
|
||||
End Sub
|
||||
|
||||
Private Sub NbrIdTxBx_EgtClosed(sender As Object, e As EventArgs) Handles NbrIdTxBx.EgtClosed
|
||||
' assegno il dato alla classe inizializzata nella libreria
|
||||
EgtPHOTOLib.PhotoMap.refOptionPanelVM.SelSlab.sNbrID = NbrIdTxBx.Text
|
||||
EnableButtons()
|
||||
End Sub
|
||||
|
||||
Private Sub StateCmBx_Changed() Handles StateCmBx.SelectionChanged
|
||||
EgtPHOTOLib.PhotoMap.refOptionPanelVM.SelSlab.State = StateCmBx.SelectedIndex
|
||||
EnableButtons()
|
||||
End Sub
|
||||
|
||||
Private Sub ProjectTxBx_EgtClosed(sender As Object, e As EventArgs) Handles ProjectTxBx.EgtClosed
|
||||
EgtPHOTOLib.PhotoMap.refOptionPanelVM.SelSlab.ProjectAssignedTo = ProjectTxBx.Text
|
||||
EnableButtons()
|
||||
End Sub
|
||||
|
||||
Private Sub ThicknessTxBx_EgtClosed(sender As Object, e As EventArgs) Handles ThicknessTxBx.EgtClosed
|
||||
EgtPHOTOLib.PhotoMap.refOptionPanelVM.SelSlab.Thickness = ThicknessTxBx.Text
|
||||
EnableButtons()
|
||||
End Sub
|
||||
|
||||
Private Sub WarehouseTxBx_EgtClosed(sender As Object, e As EventArgs) Handles WarehouseTxBx.EgtClosed
|
||||
EgtPHOTOLib.PhotoMap.refOptionPanelVM.SelSlab.WarehousePosition = WarehouseTxBl.Text
|
||||
EnableButtons()
|
||||
End Sub
|
||||
#End Region ' Property
|
||||
|
||||
Sub New(LocalOmagPhotoWD As OmagPhotoWD)
|
||||
|
||||
' La chiamata è richiesta dalla finestra di progettazione.
|
||||
InitializeComponent()
|
||||
|
||||
' Aggiungere le eventuali istruzioni di inizializzazione dopo la chiamata a InitializeComponent().
|
||||
m_OmagPhotoWD = LocalOmagPhotoWD
|
||||
End Sub
|
||||
|
||||
' dopo la crezione della pagina imposto lo stato dei pulsanti
|
||||
Private Sub PostLoaded() Handles Me.Loaded
|
||||
If EgtPHOTOLib.MainData.bEnableTextId Then
|
||||
BlockTxBx.Visibility = Visibility.Collapsed
|
||||
BlockTxBl.Visibility = Visibility.Collapsed
|
||||
Else
|
||||
NbrIdTxBx.IsEnabled = False
|
||||
End If
|
||||
PrintBtn.IsEnabled = EgtPHOTOLib.MainData.bEnablePrinter
|
||||
EnableButtons()
|
||||
End Sub
|
||||
|
||||
#Region "COMMAND"
|
||||
Private Sub CancelBtn_Click() Handles CacelBtn.Click
|
||||
' se è stata inserita nel DB allora devo rimuoverla ed esco dalla pagina
|
||||
EgtPHOTOLib.refOptionPanelVM.Delete()
|
||||
' notifico che il grezzo è stato rimosso
|
||||
OmagPhotoWD.m_IsDeleted = True
|
||||
' notifico che il grezzo non è stato aggiunto al DB delle lastre
|
||||
OmagPhotoWD.m_IsAdded = False
|
||||
' elimino l'identificativo usato nel database del grezzo appena inserito
|
||||
OmagPhotoWD.m_sDtBsId = ""
|
||||
' esco dalla pagina
|
||||
m_OmagPhotoWD.Close()
|
||||
End Sub
|
||||
|
||||
Private Sub AddBtn_Click() Handles AddBtn.Click
|
||||
' se non sono validi i campi allora attendo
|
||||
If Not EgtPHOTOLib.PhotoMap.refOptionPanelVM.Ok_IsEnabled Then Return
|
||||
' modalità di funzionamento della libreria: ProjectSlabVM.ProjectModeOpt.NEWSLAB
|
||||
EgtPHOTOLib.PhotoMap.refOptionPanelVM.Save()
|
||||
' notifico che il grezzo è stato aggiunto al DB delle lastre
|
||||
OmagPhotoWD.m_IsAdded = True
|
||||
' salvo l'identificativo usato nel database del grezzo appena inserito
|
||||
OmagPhotoWD.m_sDtBsId = EgtPHOTOLib.PhotoMap.refOptionPanelVM.SelSlab.Id
|
||||
' salvo il nome del blocco che è stato utilizzato
|
||||
If Not EgtPHOTOLib.MainData.bEnableTextId Then
|
||||
WritePrivateProfileString(S_SCRAPS, K_LASTBLOCK, EgtPHOTOLib.PhotoMap.refOptionPanelVM.SelSlab.sNameBlock, m_OmagPhotoWD.m_MainWindow.GetIniFile())
|
||||
End If
|
||||
' aggiorno il testo del messaggio "Add" → "Save"
|
||||
AddBtn.Content = "Save"
|
||||
|
||||
' notifico che da ora la lastra inserita è in modalità di modifica (non salvo la lastra come nuova, ma la sovrascrivo come in modifica)
|
||||
EgtPHOTOLib.PhotoMap.refProjectVM.SetSelProjectMode(ProjectSlabVM.ProjectModeOpt.DETAIL)
|
||||
EgtPHOTOLib.PhotoMap.refProjectVM.SelSlab.SetOrigValues()
|
||||
|
||||
' notifico che la lastra è in modifica da questo programma
|
||||
EgtPHOTOLib.PhotoMap.refProjectVM.SelSlab.IsSelected = EgtPHOTOLib.MainData.nKey
|
||||
EgtPHOTOLib.PhotoMap.refOptionPanelVM.IsSelected()
|
||||
End Sub
|
||||
|
||||
Private Sub PrintBtn_Click() Handles PrintBtn.Click
|
||||
EgtPHOTOLib.PhotoMap.refOptionPanelVM.PrintLabel()
|
||||
End Sub
|
||||
#End Region ' Command
|
||||
|
||||
#Region "METHODS"
|
||||
Private Sub EnableButtons()
|
||||
AddBtn.IsEnabled = EgtPHOTOLib.PhotoMap.refOptionPanelVM.Ok_IsEnabled
|
||||
' se la stampante non è abilitata allora non permetto assolutamente di abilitare il comando
|
||||
If EgtPHOTOLib.MainData.bEnablePrinter Then
|
||||
PrintBtn.IsEnabled = EgtPHOTOLib.PhotoMap.refOptionPanelVM.Ok_IsEnabled
|
||||
End If
|
||||
|
||||
End Sub
|
||||
#End Region ' Methods
|
||||
|
||||
End Class
|
||||
@@ -18,7 +18,7 @@ Class CicloStartWD
|
||||
Me.Top = Owner.Top + Owner.Height / 2 - Me.Height / 2
|
||||
Me.Left = Owner.Left + Owner.Width / 2 - Me.Width / 2
|
||||
' imopposto il messaggio di avvio
|
||||
CicloStartTxbl.Text = "Avvio Ciclo-Start"
|
||||
CicloStartTxbl.Text = EgtMsg(91130) ' Esegui programma?
|
||||
End Sub
|
||||
|
||||
' creo un progetto nuovo
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<!-- Definizione della Grid con le caratteristiche del progetto -->
|
||||
<Border Name="CurrProjGrid" Style="{DynamicResource OmagCut_Border}" Grid.Row="0" >
|
||||
<Border Name="CurrProjGrid" Style="{DynamicResource OmagCut_MachiningBorder}" Grid.Row="0" >
|
||||
<Grid >
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
|
||||
@@ -6,7 +6,6 @@ Imports EgtWPFLib5
|
||||
|
||||
Public Class CurrentProjectPageUC
|
||||
' Dichiarazione eventi
|
||||
Friend Event OnMouseDownSceneSelCurv(sender As Object, e As System.Windows.Forms.MouseEventArgs)
|
||||
Friend Event OnMouseDownScene(sender As Object, e As System.Windows.Forms.MouseEventArgs)
|
||||
Friend Event OnMouseMoveScene(sender As Object, e As System.Windows.Forms.MouseEventArgs)
|
||||
Friend Event OnMouseUpScene(sender As Object, e As System.Windows.Forms.MouseEventArgs)
|
||||
@@ -24,8 +23,8 @@ Public Class CurrentProjectPageUC
|
||||
' Dati del grezzo
|
||||
Friend m_nRawId As Integer = GDB_ID.NULL
|
||||
Friend m_dRawHeight As Double
|
||||
' pagina impostata per selezionare una lavorazione
|
||||
Friend m_bSelectCurv As Boolean = False
|
||||
'' Flag per impostata per selezionare di una curva
|
||||
'Friend m_bSelectCurv As Boolean = False
|
||||
' Costanti tipo progetto
|
||||
Friend Enum PRJ_TYPE As Integer
|
||||
EMPTY = 0
|
||||
@@ -108,7 +107,8 @@ Public Class CurrentProjectPageUC
|
||||
Dim nDepthBits As Integer = GetPrivateProfileInt(S_OPENGL, K_DEPTHBITS, 32, m_MainWindow.GetIniFile())
|
||||
CurrentProjectScene.SetViewAttributes(nDriver, b2Buff, nColorBits, nDepthBits)
|
||||
' inizializzo la scena (DB geometrico + visualizzazione) e verifico presenza chiave
|
||||
If Not CurrentProjectScene.Init() Then
|
||||
Dim bProd As Boolean = m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.CUT_BASE)
|
||||
If Not CurrentProjectScene.Init() Or Not bProd Then
|
||||
' Rimuovo l'host della scena perchè altrimenti rimarrebbe il buco!!
|
||||
Me.CurrentProjectPageGrid.Children.Remove(CurrentProjectSceneHost)
|
||||
' Flag per riavvio programma
|
||||
@@ -159,6 +159,7 @@ Public Class CurrentProjectPageUC
|
||||
#End If
|
||||
m_MainWindow.Close()
|
||||
If bRestart Then Process.Start(Application.ResourceAssembly.Location)
|
||||
Return
|
||||
End If
|
||||
' visualizzazione avanzata dei triangoli costituenti le superfici
|
||||
Dim bShowTriaAdv As Boolean = (GetPrivateProfileInt(S_SCENE, K_SHOWTRIAADV, 1, m_MainWindow.GetIniFile()) <> 0)
|
||||
@@ -169,11 +170,6 @@ Public Class CurrentProjectPageUC
|
||||
' dimensione lineare max in pixel delle textures
|
||||
Dim nTxrMaxLinPix As Integer = GetPrivateProfileInt(S_SCENE, K_TEXMAXLINPIX, 4096, m_MainWindow.GetIniFile())
|
||||
EgtSetTextureMaxLinPixels(nTxrMaxLinPix)
|
||||
' Verifico abilitazione prodotto
|
||||
If Not m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.CUT_BASE) Then
|
||||
Dim MissingKeyWnd As New EgtMsgBox(m_MainWindow, EgtMsg(MSG_MISSINGKEYWD + 1), EgtMsg(MSG_MISSINGKEYWD + 5), EgtMsgBox.Buttons.OK, EgtMsgBox.Icons.NULL, 1)
|
||||
m_MainWindow.Close()
|
||||
End If
|
||||
' Recupero e imposto handle finestra principale
|
||||
Dim hMainWnd As IntPtr = New WindowInteropHelper(Application.Current.MainWindow).Handle
|
||||
EgtSetMainWindowHandle(hMainWnd)
|
||||
@@ -181,42 +177,12 @@ Public Class CurrentProjectPageUC
|
||||
EgtInitMachMgr(m_MainWindow.GetMachinesRootDir(), m_MainWindow.GetToolMakersDir())
|
||||
m_bFirst = False
|
||||
|
||||
' ------------------ SELEZIONE AVVIO -----------------------------
|
||||
' apro la finstra di selezione di avvio del programma
|
||||
'StartProgram()
|
||||
' ------------------ SELEZIONE AVVIO -----------------------------
|
||||
|
||||
'' Se richiesto, carico ultimo progetto
|
||||
'Dim bAutoLoadLast As Boolean = GetPrivateProfileInt(S_GENERAL, K_AUTOLOADLASTPROJ, 0, m_MainWindow.GetIniFile()) <> 0
|
||||
'If bAutoLoadLast Then
|
||||
' m_nCurrProj = GetPrivateProfileInt(S_GENERAL, K_LASTPROJ, 0, m_MainWindow.GetIniFile())
|
||||
' Dim sPath As String = m_MainWindow.GetSaveDir() & "\" & m_nCurrProj.ToString("D4") & ".nge"
|
||||
' If Not LoadProject(sPath, False) Then
|
||||
' NewProject()
|
||||
' End If
|
||||
' EgtResetModified()
|
||||
' 'Altrimenti ne imposto uno nuovo
|
||||
'Else
|
||||
' m_nCurrProj = GetPrivateProfileInt(S_GENERAL, K_LASTPROJ, 0, m_MainWindow.GetIniFile())
|
||||
' NewProject()
|
||||
'End If
|
||||
|
||||
' creo nuovo progetto
|
||||
m_nCurrProj = GetPrivateProfileInt(S_GENERAL, K_LASTPROJ, 0, m_MainWindow.GetIniFile())
|
||||
'NewProject()
|
||||
|
||||
' Nascondo progress per fotografia
|
||||
PhotoProgress.Visibility = Windows.Visibility.Hidden
|
||||
' Carico sottopagina opportuna
|
||||
If GetProjectType() <> PRJ_TYPE.FRAMES Then
|
||||
CurrentProjectPageGrid.Children.Add(m_MainWindow.m_CadCutPageUC)
|
||||
m_MainWindow.m_ActivePage = MainWindow.Pages.CadCut
|
||||
m_MainWindow.CadCutBtn.IsChecked = True
|
||||
Else
|
||||
CurrentProjectPageGrid.Children.Add(m_MainWindow.m_FrameCutPageUC)
|
||||
m_MainWindow.m_ActivePage = MainWindow.Pages.FrameCut
|
||||
m_MainWindow.FrameCutBtn.IsChecked = True
|
||||
End If
|
||||
|
||||
Else
|
||||
EgtSetCurrentContext(CurrentProjectScene.GetCtx())
|
||||
@@ -275,6 +241,8 @@ Public Class CurrentProjectPageUC
|
||||
m_MainWindow.MainWindowGrid.Children.Remove(m_MainWindow.m_CurrentProjectPageUC)
|
||||
m_MainWindow.MainWindowGrid.Children.Add(m_MainWindow.m_OpenPage)
|
||||
m_MainWindow.m_ActivePage = MainWindow.Pages.Open
|
||||
' inizializzo gli oggetti della pagina (non passo dalla funzione Load!)
|
||||
m_MainWindow.m_CadCutPageUC.m_ProjectMgr.SetReference()
|
||||
|
||||
' seleziono il file dalla lista della finestra (= 4)
|
||||
ElseIf MyStartLancherWD.CurrSelection = MODE_LAUNCHER.SelectedProject Then
|
||||
@@ -303,29 +271,23 @@ Public Class CurrentProjectPageUC
|
||||
End If
|
||||
m_MruFiles.Add(sCurrDir & "\" & sCurrFile)
|
||||
End If
|
||||
|
||||
'If Not LoadProject(MyStartLancherWD.SelPath, False) Then
|
||||
' ' altrimenti apro un nuovo progetto
|
||||
' NewProject()
|
||||
'Else
|
||||
' ' salvo il nome del file caricato
|
||||
' m_MruFiles.Add(MyStartLancherWD.SelPath)
|
||||
'End If
|
||||
'EgtResetModified()
|
||||
End If
|
||||
|
||||
'' Nascondo progress per fotografia
|
||||
'PhotoProgress.Visibility = Windows.Visibility.Hidden
|
||||
'' Carico sottopagina opportuna
|
||||
'If GetProjectType() <> PRJ_TYPE.FRAMES Then
|
||||
' CurrentProjectPageGrid.Children.Add(m_MainWindow.m_CadCutPageUC)
|
||||
' m_MainWindow.m_ActivePage = MainWindow.Pages.CadCut
|
||||
' m_MainWindow.CadCutBtn.IsChecked = True
|
||||
'Else
|
||||
' CurrentProjectPageGrid.Children.Add(m_MainWindow.m_FrameCutPageUC)
|
||||
' m_MainWindow.m_ActivePage = MainWindow.Pages.FrameCut
|
||||
' m_MainWindow.FrameCutBtn.IsChecked = True
|
||||
'End If
|
||||
' se apro la finestra "OpenFolder" l'assegnazione dei Children è fatta direttamente nella classe ProjectMgrUC
|
||||
If MyStartLancherWD.CurrSelection <> MODE_LAUNCHER.OpenFolder Then
|
||||
' Carico sottopagina opportuna
|
||||
If GetProjectType() <> PRJ_TYPE.FRAMES Then
|
||||
CurrentProjectPageGrid.Children.Add(m_MainWindow.m_CadCutPageUC)
|
||||
m_MainWindow.m_ActivePage = MainWindow.Pages.CadCut
|
||||
m_MainWindow.CadCutBtn.IsChecked = True
|
||||
Else
|
||||
CurrentProjectPageGrid.Children.Add(m_MainWindow.m_FrameCutPageUC)
|
||||
m_MainWindow.m_ActivePage = MainWindow.Pages.FrameCut
|
||||
m_MainWindow.FrameCutBtn.IsChecked = True
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
' questo metodo è direttamente richiamato in caso di selezione della regione sinistra della pagina
|
||||
@@ -349,12 +311,7 @@ Public Class CurrentProjectPageUC
|
||||
End Sub
|
||||
|
||||
Private Sub OnMyMouseDownScene(sender As Object, e As System.Windows.Forms.MouseEventArgs) Handles CurrentProjectScene.OnMouseDownScene
|
||||
If m_bSelectCurv Then
|
||||
RaiseEvent OnMouseDownSceneSelCurv(sender, e)
|
||||
Else
|
||||
RaiseEvent OnMouseDownScene(sender, e)
|
||||
End If
|
||||
|
||||
RaiseEvent OnMouseDownScene(sender, e)
|
||||
End Sub
|
||||
|
||||
Private Sub OnMyMouseMoveScene(sender As Object, e As System.Windows.Forms.MouseEventArgs) Handles CurrentProjectScene.OnMouseMoveScene
|
||||
@@ -439,6 +396,8 @@ Public Class CurrentProjectPageUC
|
||||
m_MainWindow.m_CadCutPageUC.m_NestPage.CalcRawPart()
|
||||
m_dRawHeight = 0
|
||||
UpdateHeightTxBx()
|
||||
' prima di parcheggiare svuoto dei pezzi in parcheggio sia vuota
|
||||
m_MainWindow.m_CadCutPageUC.m_NestPage.ResetListOfGruopInPark()
|
||||
' Parcheggio correttamente i pezzi precedentemente salvati
|
||||
Dim nId2 As Integer = EgtGetFirstPart()
|
||||
While nId2 <> GDB_ID.NULL
|
||||
@@ -450,7 +409,7 @@ Public Class CurrentProjectPageUC
|
||||
nId2 = EgtGetNextPart(nId2)
|
||||
End While
|
||||
' Aggiorno Aree totale e da lavorare dei pezzi
|
||||
SetTotalArea( dTotArea)
|
||||
SetTotalArea(dTotArea)
|
||||
UpdateToProduceArea()
|
||||
ShowAreas()
|
||||
' Dichiaro progetto non modificato
|
||||
@@ -458,7 +417,7 @@ Public Class CurrentProjectPageUC
|
||||
Return True
|
||||
End Function
|
||||
|
||||
Friend Function AdjustAdditionalTable() As Boolean
|
||||
Friend Function AdjustAdditionalTable( Optional bForced As Boolean = False) As Boolean
|
||||
' Recupero altezza sottotavola corrente
|
||||
Dim nFixtId As Integer = EgtGetFirstNameInGroup(EgtGetFirstMachGroup(), MACH_FIXT_GROUP)
|
||||
Dim nAddTabId As Integer = EgtGetFirstNameInGroup(nFixtId, MACH_ADD_TABLE)
|
||||
@@ -470,7 +429,7 @@ Public Class CurrentProjectPageUC
|
||||
End If
|
||||
' Se valore cambiato, aggiorno...
|
||||
Dim dDeltaZ As Double = m_MainWindow.m_CurrentMachine.dAdditionalTable - dCurrAddTab
|
||||
If Math.Abs(dDeltaZ) > EPS_SMALL Then
|
||||
If Math.Abs(dDeltaZ) > EPS_SMALL Or bForced Then
|
||||
AddAdditionalTable()
|
||||
UpdateAllRawsZ(dDeltaZ)
|
||||
If GetPhoto() <> GDB_ID.NULL Then
|
||||
@@ -478,6 +437,12 @@ Public Class CurrentProjectPageUC
|
||||
UpdateContour()
|
||||
If EgtGetRawPartCount() > 0 Then
|
||||
ShowPhoto(False)
|
||||
Dim nRawGrpId As Integer = EgtGetFirstRawPart()
|
||||
While nRawGrpId <> GDB_ID.NULL
|
||||
Dim nRawSolidId As Integer = EgtGetFirstNameInGroup( nRawGrpId, NAME_RAW_SOLID)
|
||||
If nRawSolidId <> GDB_ID.NULL Then EgtSetTextureName( nRawSolidId, PHOTO_NAME)
|
||||
nRawGrpId = EgtGetNextRawPart( nRawGrpId)
|
||||
End While
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
@@ -542,6 +507,20 @@ Public Class CurrentProjectPageUC
|
||||
UpdateHeightTxBx()
|
||||
' aggiorno materiale
|
||||
m_MainWindow.m_CurrentMachine.SetCurrMatByName(GetProjectMaterial())
|
||||
' aggiorno altezza sovaratavola
|
||||
If GetPrivateProfileInt(S_GENERAL, "AdditionalTableByProj", 0, m_sIniFile) = 1 Then
|
||||
' leggo il valore OrigiAdditionalTable
|
||||
Dim dValue As Double = m_MainWindow.m_CurrentMachine.dAdditionalTable
|
||||
Select Case GetCurrentTable()
|
||||
Case 3
|
||||
EgtGetInfo(EgtGetFirstNameInGroup(GDB_ID.ROOT, NAME_PROJMARK), K_TAB3_ADDITIONALTABLE, dValue)
|
||||
Case 2
|
||||
EgtGetInfo(EgtGetFirstNameInGroup(GDB_ID.ROOT, NAME_PROJMARK), K_TAB2_ADDITIONALTABLE, dValue)
|
||||
Case Else
|
||||
EgtGetInfo(EgtGetFirstNameInGroup(GDB_ID.ROOT, NAME_PROJMARK), K_ADDITIONALTABLE, dValue)
|
||||
End Select
|
||||
m_MainWindow.m_CurrentMachine.dAdditionalTable = dValue
|
||||
End If
|
||||
' forzo visualizzazione eventuali dati su aree
|
||||
SetAreasStatus( True)
|
||||
' Dichiaro progetto non modificato
|
||||
@@ -568,7 +547,7 @@ Public Class CurrentProjectPageUC
|
||||
End If
|
||||
' Se la macchina del file è quella impostata
|
||||
If String.Compare(sFileMachine, m_MainWindow.GetCurrMachine(), True) = 0 Then
|
||||
AdjustAdditionalTable()
|
||||
AdjustAdditionalTable( True)
|
||||
' altrimenti avverto, porto i pezzi in parcheggio e cancello il grezzo
|
||||
Else
|
||||
' Emetto messaggio
|
||||
@@ -637,13 +616,15 @@ Public Class CurrentProjectPageUC
|
||||
File.Copy(sPhoto, sNewPhoto, True)
|
||||
Catch ex As FileNotFoundException
|
||||
' non è un problema
|
||||
Catch ex As DirectoryNotFoundException
|
||||
' non è un problema
|
||||
Catch ex As Exception
|
||||
Return False
|
||||
End Try
|
||||
End If
|
||||
' Notifico a foto il cambio di path
|
||||
EgtChangePhotoPath(nPhotoId, sNewPhoto)
|
||||
' Altrimenti cancello eventuali file di foto associabili al progetto
|
||||
' Altrimenti cancello eventuali file di foto associabili al progetto
|
||||
Else
|
||||
Dim sPhoto1 As String = Path.ChangeExtension(sPath, "jpg")
|
||||
Dim sPhoto2 As String = Path.ChangeExtension(sPath, "png")
|
||||
@@ -888,7 +869,7 @@ Public Class CurrentProjectPageUC
|
||||
|
||||
Friend Function UpdateSideAngCutProbeFlag() As Boolean
|
||||
Dim bCurrSacProbe As Boolean =
|
||||
(GetPrivateProfileInt(S_MACH_NEST, K_MACH_SACPROBE, 0, m_MainWindow.GetMachIniFile()) <> 0)
|
||||
(GetPrivateProfileInt(S_MACH_NEST, K_MACH_SACPROBE, 0, m_MainWindow.GetMachIniFile()) <> 0) AndAlso m_MainWindow.m_CurrentMachine.IsRawProbingPossible()
|
||||
Dim bProjSacProbe As Boolean = GetSideAngCutProbeFlag()
|
||||
If bCurrSacProbe <> bProjSacProbe Then Return SetSideAngCutProbeFlag(bCurrSacProbe)
|
||||
Return True
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
<Window x:Class="OmagPhotoWD"
|
||||
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:OmagCUT="clr-namespace:OmagCUT"
|
||||
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
|
||||
xmlns:EgtPHOTOLib="clr-namespace:EgtPHOTOLib;assembly=EgtPHOTOLib"
|
||||
FontFamily="{DynamicResource OmagCut_Font}"
|
||||
Title="OmagPHOTO" Height="700" Width="1250" WindowStyle="None" ResizeMode="NoResize" ShowInTaskbar="False" >
|
||||
<Border Style="{DynamicResource OmagCut_Border}">
|
||||
<Grid Name="OptionSLabGrid">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="4*"/>
|
||||
<ColumnDefinition Width="10*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="0.25*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="0.25*"/>
|
||||
<RowDefinition Height="10*"/>
|
||||
<RowDefinition Height="0.25*"/>
|
||||
<RowDefinition Height="1.5*"/>
|
||||
<RowDefinition Height="0.25*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<!-- nel codice mi occupo di riempire la griglia con gli UserControl -->
|
||||
|
||||
<Button Name="ExitBtn" Grid.Column="2" Grid.Row="3"
|
||||
Style="{DynamicResource OmagCut_GradientBlueIconButton}" IsCancel="True">
|
||||
<Image Source="{DynamicResource XImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
|
||||
<DockPanel Grid.Column="1" Grid.Row="1" Visibility="Hidden">
|
||||
<!--StatusBar-->
|
||||
<EgtWPFLib5:StatusBarV DataContext="{StaticResource StatusBarVM}" DockPanel.Dock="Bottom"/>
|
||||
</DockPanel>
|
||||
</Grid>
|
||||
</Border>
|
||||
</Window>
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user