Compare commits
151 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 4ac0507050 | |||
| a6a4f29bba | |||
| 0c9b37742a | |||
| ef5c98020e | |||
| c2a1fa3fdc | |||
| 319275f43c | |||
| 61d238e196 | |||
| 0900728bbf | |||
| ee83a453e7 | |||
| 7596849254 | |||
| e12eb2599e | |||
| a0754265ac | |||
| 1645a39506 | |||
| 9e2c2c1b98 | |||
| 51f15818c2 | |||
| b0081241d8 | |||
| 173230df5a | |||
| 22afb6edcd | |||
| 9c8faf25bf | |||
| 58775595c7 | |||
| 367ac62fc8 | |||
| 9750fdfe75 | |||
| 39bc4f55ea | |||
| 803a7bdbfc | |||
| 1473298705 | |||
| 4be7087a1b | |||
| 7c990987e8 | |||
| 3837895350 | |||
| e5195c5c5c | |||
| 17ed0b3807 | |||
| e11722f598 | |||
| 9644529618 | |||
| 0eb6897c08 | |||
| 8462554421 | |||
| 446df8f37f | |||
| 2919cc2dde | |||
| 093f882118 | |||
| f908f073af | |||
| dc0a2f1934 | |||
| 6366aa7938 | |||
| 696ceabb17 | |||
| c55d9b48d3 | |||
| 8c35871e34 | |||
| 4390dbdce8 | |||
| 8d4785334a | |||
| 7cf5a88b23 | |||
| e587cd9d45 | |||
| 973157a0de | |||
| 7ccb7fb96f | |||
| 9a751d0524 | |||
| 0e25b456bf | |||
| 4c8394f22d | |||
| ed3e14229f | |||
| 81f6fa88da | |||
| adbc811206 | |||
| 94866ce13d | |||
| c336390baf | |||
| 0686d543bb | |||
| 58c00878a8 | |||
| 992686a5a2 | |||
| 4cd9b70cf2 | |||
| 140d2bc226 | |||
| 5b2b39789d | |||
| 3c796aeefa | |||
| 2bcab0bbf1 | |||
| df41408ec9 | |||
| 9a2084c216 | |||
| 52844c8d75 | |||
| ad74579ee6 | |||
| 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 |
@@ -674,6 +674,9 @@ Friend Module CamAuto
|
||||
End If
|
||||
' Lo sposto dalla lavorazione al pezzo
|
||||
Dim nId As Integer = EgtGetFirstInGroup(nMchPvId)
|
||||
|
||||
If nId = GDB_ID.NULL Then Return False
|
||||
|
||||
While nId <> GDB_ID.NULL
|
||||
EgtRelocateGlob(nId, nPartPvId)
|
||||
nId = EgtGetFirstInGroup(nMchPvId)
|
||||
@@ -719,10 +722,12 @@ Friend Module CamAuto
|
||||
End Function
|
||||
|
||||
Private Function SetLuaStandardCamParams(Optional bDripOk As Boolean = True) As Boolean
|
||||
Dim sMaterial As String = m_MainWindow.m_CurrentMachine.CurrMat.sName
|
||||
Dim sSawMch As String = m_MainWindow.m_CurrentMachine.sCurrSawing
|
||||
Dim sMillMch As String = m_MainWindow.m_CurrentMachine.sCurrMilling
|
||||
Dim sDrillMch As String = m_MainWindow.m_CurrentMachine.sCurrDrilling
|
||||
Dim sWaterJetMch As String = m_MainWindow.m_CurrentMachine.sCurrWaterJetting
|
||||
Dim sWaterJetQual As String = m_MainWindow.m_CurrentMachine.sCurrWaterJettingQuality
|
||||
Dim sPocketMch As String = m_MainWindow.m_CurrentMachine.sCurrPocketing
|
||||
Dim sDripSawMch As String = If(bDripOk, m_MainWindow.m_CurrentMachine.sCurrDripSawing, "")
|
||||
Dim sDripDrillMch As String = If(bDripOk, m_MainWindow.m_CurrentMachine.sCurrDripDrilling, "")
|
||||
@@ -735,11 +740,13 @@ Friend Module CamAuto
|
||||
Dim bMillingOnCorners As Boolean = (GetPrivateProfileInt(S_MACH_NEST, K_MACH_MILLING_ON_CORNERS, 1, m_MainWindow.GetMachIniFile()) <> 0)
|
||||
Dim bMillingOnSinks As Boolean = (GetPrivateProfileInt(S_MACH_NEST, K_MACH_MILLING_ON_SINKS, 0, m_MainWindow.GetMachIniFile()) <> 0)
|
||||
Dim dMillingShort As Double = GetPrivateProfileDouble(S_MACH_NEST, K_MACH_MILLING_SHORTENING, 0, m_MainWindow.GetMachIniFile())
|
||||
EgtLuaSetGlobStringVar("CAM.MATERIAL", sMaterial)
|
||||
EgtLuaSetGlobStringVar("CAM.SAWMCH", sSawMch)
|
||||
EgtLuaSetGlobStringVar("CAM.MILLMCH", sMillMch)
|
||||
EgtLuaSetGlobStringVar("CAM.DRILLMCH", sDrillMch)
|
||||
EgtLuaSetGlobStringVar("CAM.POCKETMCH", sPocketMch)
|
||||
EgtLuaSetGlobStringVar("CAM.WATERJETMCH", sWaterJetMch)
|
||||
EgtLuaSetGlobStringVar("CAM.WATERJETQLTY", sWaterJetQual)
|
||||
EgtLuaSetGlobStringVar("CAM.DRIPSAWMCH", sDripSawMch)
|
||||
EgtLuaSetGlobStringVar("CAM.DRIPDRILLMCH", sDripDrillMch)
|
||||
EgtLuaSetGlobNumVar("CAM.REDUCEDDEPTH", dReducedDepth)
|
||||
|
||||
@@ -19,6 +19,14 @@ Friend Module CSVFile
|
||||
Public m_dDimX As Double = 0
|
||||
Public m_dDimY As Double = 0
|
||||
Public m_dTh As Double = 0
|
||||
Public m_dAng1 As Double = 0
|
||||
Public m_dHeel1 As Double = 0
|
||||
Public m_dAng2 As Double = 0
|
||||
Public m_dHeel2 As Double = 0
|
||||
Public m_dAng3 As Double = 0
|
||||
Public m_dHeel3 As Double = 0
|
||||
Public m_dAng4 As Double = 0
|
||||
Public m_dHeel4 As Double = 0
|
||||
Public m_nOriInd As Integer = 0
|
||||
Public m_nId As Integer = GDB_ID.NULL
|
||||
End Class
|
||||
@@ -62,6 +70,14 @@ Friend Module CSVFile
|
||||
EgtLuaGetGlobNumVar("CSV.DIMX" & sN, OnePart.m_dDimX)
|
||||
EgtLuaGetGlobNumVar("CSV.DIMY" & sN, OnePart.m_dDimY)
|
||||
EgtLuaGetGlobNumVar("CSV.TH" & sN, OnePart.m_dTh)
|
||||
EgtLuaGetGlobNumVar("CSV.A1_" & sN, OnePart.m_dAng1)
|
||||
EgtLuaGetGlobNumVar("CSV.H1_" & sN, OnePart.m_dHeel1)
|
||||
EgtLuaGetGlobNumVar("CSV.A2_" & sN, OnePart.m_dAng2)
|
||||
EgtLuaGetGlobNumVar("CSV.H2_" & sN, OnePart.m_dHeel2)
|
||||
EgtLuaGetGlobNumVar("CSV.A3_" & sN, OnePart.m_dAng3)
|
||||
EgtLuaGetGlobNumVar("CSV.H3_" & sN, OnePart.m_dHeel3)
|
||||
EgtLuaGetGlobNumVar("CSV.A4_" & sN, OnePart.m_dAng4)
|
||||
EgtLuaGetGlobNumVar("CSV.H4_" & sN, OnePart.m_dHeel4)
|
||||
OnePart.m_nOriInd = i
|
||||
' inserisco in lista
|
||||
CsvPartList.Add(OnePart)
|
||||
@@ -147,6 +163,22 @@ Friend Module CSVFile
|
||||
StringToDouble(sItems(1), OnePart.m_dDimY)
|
||||
ElseIf sItems(0) = "Th" Then
|
||||
StringToDouble(sItems(1), OnePart.m_dTh)
|
||||
ElseIf sItems(0) = "A1" Then
|
||||
StringToDouble(sItems(1), OnePart.m_dAng1)
|
||||
ElseIf sItems(0) = "H1" Then
|
||||
StringToDouble(sItems(1), OnePart.m_dHeel1)
|
||||
ElseIf sItems(0) = "A2" Then
|
||||
StringToDouble(sItems(1), OnePart.m_dAng2)
|
||||
ElseIf sItems(0) = "H2" Then
|
||||
StringToDouble(sItems(1), OnePart.m_dHeel2)
|
||||
ElseIf sItems(0) = "A3" Then
|
||||
StringToDouble(sItems(1), OnePart.m_dAng3)
|
||||
ElseIf sItems(0) = "H3" Then
|
||||
StringToDouble(sItems(1), OnePart.m_dHeel3)
|
||||
ElseIf sItems(0) = "A4" Then
|
||||
StringToDouble(sItems(1), OnePart.m_dAng4)
|
||||
ElseIf sItems(0) = "H4" Then
|
||||
StringToDouble(sItems(1), OnePart.m_dHeel4)
|
||||
ElseIf sItems(0) = "OIn" Then
|
||||
StringToInt(sItems(1), OnePart.m_nOriInd)
|
||||
End If
|
||||
@@ -188,6 +220,14 @@ Friend Module CSVFile
|
||||
Writer.WriteLine("DX=" & DoubleToString(CurrPart.m_dDimX, 4))
|
||||
Writer.WriteLine("DY=" & DoubleToString(CurrPart.m_dDimY, 4))
|
||||
Writer.WriteLine("Th=" & DoubleToString(CurrPart.m_dTh, 4))
|
||||
Writer.WriteLine("A1=" & DoubleToString(CurrPart.m_dAng1, 4))
|
||||
Writer.WriteLine("H1=" & DoubleToString(CurrPart.m_dHeel1, 4))
|
||||
Writer.WriteLine("A2=" & DoubleToString(CurrPart.m_dAng2, 4))
|
||||
Writer.WriteLine("H2=" & DoubleToString(CurrPart.m_dHeel2, 4))
|
||||
Writer.WriteLine("A3=" & DoubleToString(CurrPart.m_dAng3, 4))
|
||||
Writer.WriteLine("H3=" & DoubleToString(CurrPart.m_dHeel3, 4))
|
||||
Writer.WriteLine("A4=" & DoubleToString(CurrPart.m_dAng4, 4))
|
||||
Writer.WriteLine("H4=" & DoubleToString(CurrPart.m_dHeel4, 4))
|
||||
Writer.WriteLine("OIn=" & CurrPart.m_nOriInd.ToString())
|
||||
Next
|
||||
' Terminatore
|
||||
|
||||
@@ -424,10 +424,14 @@ Public Class CSVPage
|
||||
' Definizione variabili
|
||||
Dim dDimX = CurrPart.m_dDimX
|
||||
Dim dDimY = CurrPart.m_dDimY
|
||||
Dim dAng = New Double() {CurrPart.m_dAng1,CurrPart.m_dAng2,CurrPart.m_dAng3,CurrPart.m_dAng4}
|
||||
Dim dHeel = New Double() {CurrPart.m_dHeel1,CurrPart.m_dHeel2,CurrPart.m_dHeel3,CurrPart.m_dHeel4}
|
||||
If bMaxDimOnX And dDimY > dDimX Then
|
||||
Dim dTemp As Double = dDimX
|
||||
dDimX = dDimY
|
||||
dDimY = dTemp
|
||||
dAng = New Double() {CurrPart.m_dAng2,CurrPart.m_dAng3,CurrPart.m_dAng4,CurrPart.m_dAng1}
|
||||
dHeel = New Double() {CurrPart.m_dHeel2,CurrPart.m_dHeel3,CurrPart.m_dHeel4,CurrPart.m_dHeel1}
|
||||
End If
|
||||
EgtLuaSetGlobNumVar("CMP.V1", dDimX)
|
||||
EgtLuaSetGlobNumVar("CMP.V2", dDimY)
|
||||
@@ -439,7 +443,7 @@ Public Class CSVPage
|
||||
If nId = GDB_ID.NULL Then Continue For
|
||||
CurrPart.m_nId = nId
|
||||
' Muovo la regione in Z per evitare problemi in visualizzazione
|
||||
Dim nRegId = EgtGetFirstNameInGroup(nId, NAME_REGION)
|
||||
Dim nRegId As Integer = EgtGetFirstNameInGroup(nId, NAME_REGION)
|
||||
EgtMove(nRegId, New Vector3d(0, 0, DELTAZ_REG), GDB_RT.GLOB)
|
||||
' Eventuale testo per indicare il sopra
|
||||
If Not bMaxDimOnX Then
|
||||
@@ -447,6 +451,31 @@ Public Class CSVPage
|
||||
Dim nText As Integer = EgtCreateTextAdv(nRegId, New Point3d(dDimX / 2, dDimY - 0.6 * dH, 0), 0, "*TOP*", "", 500, False, dH, 1, 0, INS_POS.MC)
|
||||
EgtSetColor(nText, New Color3d( 0, 0, 0))
|
||||
End If
|
||||
' Inserisco eventuali angoli di fianco
|
||||
Dim bSideAngs As Boolean = False
|
||||
Dim nOutLoopId As Integer = EgtGetFirstNameInGroup( nId, NAME_OUTLOOP)
|
||||
For nSide As Integer = 1 To 4
|
||||
Dim dSideAng As Double = dAng( nSide - 1)
|
||||
Dim dSideHeel As Double = dHeel( nSide - 1)
|
||||
If Math.Abs( dSideAng) > EPS_ANG_SMALL Then
|
||||
Dim nEntId As Integer = EgtGetFirstNameInGroup( nOutLoopId, "A" & nSide.ToString())
|
||||
If nEntId <> GDB_ID.NULL Then
|
||||
bSideAngs = True
|
||||
' Assegno valori
|
||||
EgtSetInfo(nEntId, INFO_SIDE_ANGLE, dSideAng)
|
||||
EgtSetInfo(nEntId, INFO_ORIG_SIDE_ANGLE, dSideAng)
|
||||
EgtSetInfo(nEntId, INFO_HEEL, dSideHeel)
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
' Creo layer per testi nesting
|
||||
If bSideAngs Then
|
||||
Dim TextLayId As Integer = EgtCreateGroup(nId)
|
||||
EgtSetName(TextLayId, SIDE_ANGLE_LAYER)
|
||||
EgtSetColor(TextLayId, New Color3d(0, 0, 128))
|
||||
' Opero su geometria esterna pezzo
|
||||
SideAngle.WriteSideAngleOnLoop(nOutLoopId, TextLayId)
|
||||
End If
|
||||
' Aggiusto per lavorazioni
|
||||
EgtAdjustFlatPart(nId)
|
||||
' Se Csv completo, aggiungo info su CSV di origine
|
||||
|
||||
@@ -107,6 +107,7 @@ Public Class CadCutPageUC
|
||||
|
||||
Private Sub PhotoBtn_Click(sender As Object, e As RoutedEventArgs) Handles PhotoBtn.Click
|
||||
m_MainWindow.TestOff()
|
||||
m_MainWindow.DragRettangleOff()
|
||||
m_CurrProjPage.m_SceneButtons.MeasureBtn.IsChecked = False
|
||||
EgtSetCurrentContext(m_MainWindow.m_CurrentProjectPageUC.CurrentProjectScene.GetCtx())
|
||||
' Se macchina fotografica collegata, faccio una foto
|
||||
@@ -140,6 +141,7 @@ Public Class CadCutPageUC
|
||||
|
||||
Private Sub RawPartBtn_Click(sender As Object, e As RoutedEventArgs) Handles RawPartBtn.Click
|
||||
m_MainWindow.TestOff()
|
||||
m_MainWindow.DragRettangleOff()
|
||||
m_CurrProjPage.CurrProjGrid.Visibility = Windows.Visibility.Hidden
|
||||
m_CurrProjPage.CurrentProjectPageGrid.Children.Remove(Me)
|
||||
m_CurrProjPage.CurrentProjectPageGrid.Children.Add(m_MainWindow.m_RawPartPage)
|
||||
@@ -165,6 +167,7 @@ Public Class CadCutPageUC
|
||||
|
||||
Private Sub DrawBtn_Click(sender As Object, e As RoutedEventArgs) Handles DrawBtn.Click
|
||||
m_MainWindow.TestOff()
|
||||
m_MainWindow.DragRettangleOff()
|
||||
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 +175,7 @@ Public Class CadCutPageUC
|
||||
|
||||
Private Sub ImportBtn_Click(sender As Object, e As RoutedEventArgs) Handles ImportBtn.Click
|
||||
m_MainWindow.TestOff()
|
||||
m_MainWindow.DragRettangleOff()
|
||||
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 +197,11 @@ Public Class CadCutPageUC
|
||||
End Sub
|
||||
|
||||
Private Sub SplitBtn_Click(sender As Object, e As RoutedEventArgs) Handles SplitBtn.Click
|
||||
m_MainWindow.DragRettangleOff()
|
||||
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 +211,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
|
||||
|
||||
@@ -94,7 +94,9 @@ Public Class MoveRawPartPage
|
||||
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
|
||||
|
||||
@@ -101,16 +101,30 @@
|
||||
</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="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>
|
||||
</UniformGrid>
|
||||
|
||||
<Button Name="RemovePartBtn" Grid.ColumnSpan="3" Grid.Row="6"
|
||||
Style="{DynamicResource OmagCut_YellowTextButton}" Padding="1"/>
|
||||
<UniformGrid Name ="UG1" Grid.Column="0" Grid.Row="6" Grid.ColumnSpan="3" Columns="2" >
|
||||
<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>
|
||||
</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>
|
||||
|
||||
@@ -12,10 +12,27 @@ Public Class NestPageUC
|
||||
Friend m_bRegister As Boolean = False
|
||||
' Flag per pezzi selezionati in tavola o fuori
|
||||
Private m_nPartPos As Integer = PART_POS.NONE_TABLE
|
||||
' Flag per impostata per selezionare di una curva
|
||||
Friend m_bSelectCurv As Boolean = False
|
||||
' dati per DragRettangoli (estensio/accorciamento dei rettangoli trascinando un lato)
|
||||
Private m_bIsVisibleDragRettangle As Boolean = False
|
||||
Friend m_bIsCheckedDragRettangle As Boolean = False
|
||||
|
||||
' Id della curva e del taglio selezionati per eseguire il test
|
||||
Friend m_CurrSelectedCurv As Integer = GDB_ID.NULL
|
||||
Friend m_CurrSelectedSawCurv As Integer = GDB_ID.NULL
|
||||
|
||||
' Id del rettangolo, del traglio e della curva da modificare tramite Drag
|
||||
Private m_nIdSelectedOutLoopRettangle As Integer = GDB_ID.NULL
|
||||
Private m_nIdSelectedRegionRettangle As Integer = GDB_ID.NULL
|
||||
Private m_nIdSelectedSawRettangle As Integer = GDB_ID.NULL
|
||||
Private m_nIdSelectedCurvRettangle As Integer = GDB_ID.NULL
|
||||
Private m_nIdSelectedTextRettangle As Integer = GDB_ID.NULL
|
||||
Private m_nIdSelectedTextTopRettangle As Integer = GDB_ID.NULL
|
||||
Private m_nIdSelectedFlatSurfRettangle As Integer = GDB_ID.NULL
|
||||
Private m_SideListRettangle(4) As Integer
|
||||
Private m_sTextContent As String = String.Empty
|
||||
|
||||
Enum PART_POS As Integer
|
||||
IN_TABLE = -1
|
||||
NONE_TABLE = 0
|
||||
@@ -56,11 +73,19 @@ Public Class NestPageUC
|
||||
|
||||
Private Sub NestPage_Initialized(sender As Object, e As EventArgs)
|
||||
' Imposto i messaggi letti dal file dei messaggi
|
||||
InsertPartBtn.Content = EgtMsg(MSG_NESTPAGEUC + 1) 'Insert part - Inserisci pezzo
|
||||
StorePartBtn.Content = EgtMsg(MSG_NESTPAGEUC + 2) 'Store part - Parcheggia pezzo
|
||||
RemovePartBtn.Content = EgtMsg(MSG_NESTPAGEUC + 3) 'Remove part - Elimina pezzo
|
||||
SelectAllBtn.Content = EgtMsg(MSG_NESTPAGEUC + 4) 'Select All - Seleziona Tutto
|
||||
DeselectAllBtn.Content = EgtMsg(MSG_NESTPAGEUC + 5) 'Deselect All - Deseleziona Tutto
|
||||
InsertPartBtn.ToolTip = EgtMsg(MSG_NESTPAGEUC + 1) 'Insert part - Inserisci pezzo
|
||||
StorePartBtn.ToolTip = EgtMsg(MSG_NESTPAGEUC + 2) 'Store part - Parcheggia pezzo
|
||||
RemovePartBtn.ToolTip = EgtMsg(MSG_NESTPAGEUC + 3) 'Remove part - Elimina pezzo
|
||||
SelectAllBtn.ToolTip = EgtMsg(MSG_NESTPAGEUC + 4) 'Select All - Seleziona Tutto
|
||||
DeselectAllBtn.ToolTip = EgtMsg(MSG_NESTPAGEUC + 5) 'Deselect All - Deseleziona Tutto
|
||||
|
||||
' gestisco la visualizzazione del comando PAN (per il drag dei rettangoli)
|
||||
m_bIsVisibleDragRettangle = (GetPrivateProfileInt(S_NEST, K_DRAG_RETTANGLE, 0, m_MainWindow.GetIniFile()) <> 0)
|
||||
If Not m_bIsVisibleDragRettangle Then
|
||||
UG1.Columns = 1
|
||||
DragRettanleBtn.Visibility = Visibility.Collapsed
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub NestPage_Loaded(sender As Object, e As RoutedEventArgs)
|
||||
@@ -108,6 +133,7 @@ Public Class NestPageUC
|
||||
m_dRegStep = GetPrivateProfileDouble(S_REG, K_REGSTEP, 10, m_MainWindow.GetIniFile())
|
||||
m_dRegAngStep = GetPrivateProfileDouble(S_REG, K_REGANGSTEP, 1, m_MainWindow.GetIniFile())
|
||||
m_dMaxRegAng = GetPrivateProfileDouble(S_MACH_REG, K_MACH_MAX_ROT_ANG, 10, m_MainWindow.GetMachIniFile())
|
||||
|
||||
' Garantisco visibilità pezzi parcheggiati
|
||||
ShowParkedParts()
|
||||
' Garantisco visibilità eventuale contorno da foto
|
||||
@@ -124,17 +150,17 @@ Public Class NestPageUC
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub OnMyMouseDownSceneSelCurv(sender As Object, e As System.Windows.Forms.MouseEventArgs) Handles m_CurrProjPage.OnMouseDownSceneSelCurv
|
||||
' funzione utilizzata per la selezione dei tagli quando il comando TEST è attivo
|
||||
Private Sub OnMyMouseDownSceneSelCurv(sender As Object, e As System.Windows.Forms.MouseEventArgs)
|
||||
' Verifico di essere il gestore attivo e non in modalità registrazione
|
||||
If Not m_bActive Or m_bRegister Then Return
|
||||
' Si può selezionare solo con il tasto sinistro e se il bottone TEST Attivo
|
||||
If e.Button <> Windows.Forms.MouseButtons.Left Or
|
||||
Not m_CurrProjPage.m_bSelectCurv Then
|
||||
Not m_bSelectCurv Then
|
||||
Return
|
||||
End If
|
||||
|
||||
'------------------- NUOVA DEFINIZIONE -------------------------
|
||||
|
||||
' Se esiste un elemento selezionato
|
||||
EgtResetMark(m_CurrSelectedSawCurv)
|
||||
' provo a riconoscere il valore medio del segmento
|
||||
' Verifico se selezionato indicativo di pezzo
|
||||
EgtSetObjFilterForSelWin(False, True, False, False, False)
|
||||
@@ -155,7 +181,6 @@ Public Class NestPageUC
|
||||
Dim ptE As Point3d
|
||||
EgtEndPoint(nIdMy, ptE)
|
||||
If m_CurrSelectedCurv <> GDB_ID.NULL Or m_CurrSelectedCurv = nIdMy Then
|
||||
EgtDeselectObj(m_CurrSelectedSawCurv)
|
||||
EgtDeselectObj(m_CurrSelectedCurv)
|
||||
End If
|
||||
' recupero il gruppo della lavorazione associata
|
||||
@@ -163,10 +188,9 @@ Public Class NestPageUC
|
||||
Dim nIdPV As Integer = EgtGetFirstNameInGroup(nIdParentPart, "PV")
|
||||
Dim nIdSaw As Integer = EgtGetFirstNameInGroup(nIdPV, "Saw" & nIdMy.ToString)
|
||||
If Not EgtGetGroupObjs(nIdSaw) Then
|
||||
EgtSelectObj(nIdSaw)
|
||||
m_CurrSelectedSawCurv = nIdSaw
|
||||
m_CurrSelectedCurv = nIdMy
|
||||
EgtSelectObj(nIdSaw)
|
||||
EgtSetMark(nIdSaw)
|
||||
EgtSelectObj(nIdMy)
|
||||
EgtDraw()
|
||||
Exit While
|
||||
@@ -176,12 +200,295 @@ Public Class NestPageUC
|
||||
End If
|
||||
nIdMy = EgtGetNextObjInSelWin()
|
||||
End While
|
||||
|
||||
Return
|
||||
|
||||
'------------------- NUOVA DEFINIZIONE -------------------------
|
||||
End Sub
|
||||
|
||||
#Region "DRAG RETTANGLE"
|
||||
|
||||
' funzione chiamata da OnMyMouseMoveScene: verifica che la selezione sia corretta (deve essere il lato di una figura rettangolare)
|
||||
Private Sub OnMyMouseDownSceneSelSideRettangle(sender As Object, e As System.Windows.Forms.MouseEventArgs)
|
||||
' Verifico di essere il gestore attivo e non in modalità registrazione
|
||||
If Not m_bActive Or m_bRegister Then Return
|
||||
' Si può selezionare solo con il tasto sinistro e se il bottone TEST Attivo
|
||||
If e.Button <> Windows.Forms.MouseButtons.Left then
|
||||
Return
|
||||
End If
|
||||
' Verifico se selezionato indicativo di pezzo
|
||||
EgtSetObjFilterForSelWin(False, True, False, False, False)
|
||||
Dim nSelMy As Integer
|
||||
EgtSelect(e.Location, Scene.DIM_SEL, Scene.DIM_SEL, nSelMy)
|
||||
Dim nIdMy As Integer = EgtGetFirstObjInSelWin()
|
||||
While nIdMy <> GDB_ID.NULL
|
||||
Dim sLayer As String = String.Empty
|
||||
' layer di origine
|
||||
Dim nIdParent As Integer = EgtGetParent(nIdMy)
|
||||
' recupero il nome del Layer
|
||||
EgtGetName(nIdParent, sLayer)
|
||||
' solo se il nome del layer è quello associato ad un lato esterno allora procedo con l'evidenziazione
|
||||
If sLayer = NAME_OUTLOOP Then
|
||||
If EgtGetType(nIdMy) = GDB_TY.CRV_LINE Then
|
||||
' -------------------------------- INIZIO VERIFICHE --------------------------------
|
||||
m_nIdSelectedOutLoopRettangle = nIdParent
|
||||
If Not IsRettangle(m_SideListRettangle) Then
|
||||
m_CurrProjPage.ClearMessage()
|
||||
m_CurrProjPage.SetWarningMessage("Non è un rettangolo (0)")
|
||||
Return
|
||||
End If
|
||||
' recupero il gruppo della lavorazione associata
|
||||
Dim nIdParentPart As Integer = EgtGetParent(nIdParent)
|
||||
Dim nIdPV As Integer = EgtGetFirstNameInGroup(nIdParentPart, "PV")
|
||||
' se non esiste un gruppo di lavorazione associato allora esco
|
||||
If nIdPV = GDB_ID.NULL Then
|
||||
m_CurrProjPage.ClearMessage()
|
||||
m_CurrProjPage.SetWarningMessage("Pezzo in parcheggio (1)")
|
||||
Return
|
||||
End If
|
||||
' se esiste ma è vuoto (pezzo scaricato da tavola)
|
||||
If EgtGetFirstInGroup(nIdPV) = GDB_ID.NULL Then
|
||||
m_CurrProjPage.ClearMessage()
|
||||
m_CurrProjPage.SetWarningMessage("Pezzo in parcheggio (2)")
|
||||
Return
|
||||
End If
|
||||
' Devo verificare che sia una lavorazione solo di lama?
|
||||
Dim nIdSaw As Integer = EgtGetFirstNameInGroup(nIdPV, "Saw" & nIdMy.ToString)
|
||||
' -------------------------------- FINE VERIFICHE --------------------------------
|
||||
|
||||
If Not EgtGetGroupObjs(nIdSaw) Then
|
||||
m_nIdSelectedSawRettangle = nIdSaw
|
||||
m_nIdSelectedCurvRettangle = nIdMy
|
||||
|
||||
m_nIdSelectedRegionRettangle = EgtGetFirstNameInGroup(nIdParentPart, NAME_REGION)
|
||||
' recupero i testi cintenuti nel layer Region
|
||||
If m_nIdSelectedRegionRettangle <> GDB_ID.NULL Then
|
||||
Dim nCurrId As Integer = EgtGetFirstInGroup(m_nIdSelectedRegionRettangle)
|
||||
While nCurrId <> GDB_ID.NULL
|
||||
If EgtGetType(nCurrId) = GDB_TY.EXT_TEXT Then
|
||||
Dim sVal As String = String.Empty
|
||||
EgtTextGetContent(nCurrId, sVal)
|
||||
If sVal = "*TOP*" Then
|
||||
m_nIdSelectedTextTopRettangle = nCurrId
|
||||
Else
|
||||
m_nIdSelectedTextRettangle = nCurrId
|
||||
m_sTextContent = GetMyRettangleText(sVal)
|
||||
End If
|
||||
ElseIf EgtGetType(nCurrId) = GDB_TY.SRF_FRGN Then
|
||||
m_nIdSelectedFlatSurfRettangle = nCurrId
|
||||
End If
|
||||
nCurrId = EgtGetNext(nCurrId)
|
||||
End While
|
||||
End If
|
||||
' seleziono ed evidenzio il lato selezionato
|
||||
EgtSelectObj(nIdSaw)
|
||||
EgtSetMark(nIdSaw)
|
||||
EgtSelectObj(nIdMy)
|
||||
EgtDraw()
|
||||
Exit While
|
||||
End If
|
||||
End If
|
||||
' se le'elemto corrente non è una linea
|
||||
End If
|
||||
' se le'elemto corrente non appartiene al layer OutLoop passo al prossimo elemento dell'elenco
|
||||
nIdMy = EgtGetNextObjInSelWin()
|
||||
End While
|
||||
End Sub
|
||||
|
||||
' restituisce il valore del Text ripulito dalle dimensioni
|
||||
Private Function GetMyRettangleText(sTextPz As String) As String
|
||||
' da DrawPageUC.xaml.vb/MultipleInsert
|
||||
Dim sText As String = String.Empty
|
||||
If sTextPz.Contains("<br/>") Then
|
||||
Dim nLastIndex As Integer = sTextPz.LastIndexOf(">")
|
||||
sText = sTextPz.Remove(nLastIndex + 1)
|
||||
Return sText
|
||||
End If
|
||||
If sTextPz.Contains(" ") Then
|
||||
Dim sInfo() As String = sTextPz.Split(" ")
|
||||
If sInfo.Count > 3 Then
|
||||
Return sText = sInfo(0) & " " & sInfo(1) & " "
|
||||
End If
|
||||
End If
|
||||
Return sText
|
||||
End Function
|
||||
|
||||
' verifico che la figura selezionata sia realmente un rettangolo
|
||||
Private Function IsRettangle(ByRef IdSideList() As Integer) As Boolean
|
||||
' creo una lista con i lati del rettangolo
|
||||
Dim nCounter As Integer = 0
|
||||
' recupero i lati dal leyer "OutLoop"
|
||||
Dim IdSideRettangle As Integer = EgtGetFirstInGroup(m_nIdSelectedOutLoopRettangle)
|
||||
While IdSideRettangle <> GDB_ID.NULL And nCounter < 4
|
||||
Dim sVal As String = String.Empty
|
||||
Dim dPrevAng As Double = 0
|
||||
EgtGetInfo(IdSideRettangle, "PrevAng", sVal)
|
||||
StringToDouble(sVal, dPrevAng)
|
||||
Dim dNextAng As Double = 0
|
||||
EgtGetInfo(IdSideRettangle, "NextAng", sVal)
|
||||
StringToDouble(sVal, dNextAng)
|
||||
' se gli angoli non sono retti allora esco senza caricare il lato corrente
|
||||
If Math.Abs(dPrevAng - 90) > EPS_ANG_SMALL OrElse Math.Abs(dNextAng - 90) > EPS_ANG_SMALL Then
|
||||
Exit While
|
||||
End If
|
||||
IdSideList(nCounter) = IdSideRettangle
|
||||
nCounter += 1
|
||||
IdSideRettangle = EgtGetNext(IdSideRettangle)
|
||||
End While
|
||||
' verifico che siano solo quattro lati
|
||||
If IdSideRettangle = GDB_ID.NULL And nCounter = 4 Then
|
||||
' solo se la figura ha 4 lati ortogonali
|
||||
Return True
|
||||
End If
|
||||
|
||||
m_nIdSelectedOutLoopRettangle = GDB_ID.NULL
|
||||
' la figura presenta più/meno di 4 lati
|
||||
Return False
|
||||
End Function
|
||||
|
||||
' recupero le informazioni correnti per sapere se la figura è mdificabile
|
||||
Private Function GetRettangleInfoScale(ByRef frFixed As Frame3d, ByRef MaxLen As Double, ByRef MinLen As Double) As Vector3d
|
||||
' determino la direzione del lato selezionato
|
||||
Dim vtDirSelectedCurv As New Vector3d
|
||||
EgtStartVector(m_nIdSelectedCurvRettangle, GDB_ID.ROOT, vtDirSelectedCurv)
|
||||
|
||||
' recupero il lato successivo a quello selezionato
|
||||
Dim Index As Integer = 0
|
||||
Dim Len As Double = 0
|
||||
For Ind As Integer = 0 To 3
|
||||
If m_SideListRettangle(Ind) = m_nIdSelectedCurvRettangle Then
|
||||
' verifico se esiste un lato Precedente altrimenti recupero l'ultimo della lista
|
||||
If Ind = 0 Then
|
||||
Index = 3
|
||||
Else
|
||||
Index = Ind - 1
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
' recupero la dimensione del lato
|
||||
EgtCurveLength(m_SideListRettangle(Index), MaxLen)
|
||||
EgtCurveLength(m_nIdSelectedCurvRettangle, MinLen)
|
||||
|
||||
' verifico che il lato selezionato sia il maggiore
|
||||
If MinLen > MaxLen Then Return Nothing
|
||||
|
||||
' determimo il versore dal lato appena calcolato
|
||||
Dim vtDir As New Vector3d
|
||||
|
||||
EgtStartVector(m_SideListRettangle(Index), GDB_ID.ROOT, vtDir)
|
||||
vtDir.Normalize()
|
||||
Dim dProjectionBaseX As Double = vtDir * Vector3d.X_AX
|
||||
Dim ptFixed As New Point3d
|
||||
EgtStartPoint(m_SideListRettangle(Index), GDB_ID.ROOT, ptFixed)
|
||||
|
||||
Dim vtPerp As New Vector3d(vtDir.x, vtDir.y, vtDir.z)
|
||||
vtPerp.Rotate(Vector3d.Z_AX, 90)
|
||||
|
||||
' determino il Frame corrente
|
||||
frFixed = New Frame3d(ptFixed, vtDir, vtPerp, Vector3d.Z_AX)
|
||||
|
||||
Return vtDir
|
||||
|
||||
End Function
|
||||
|
||||
' funzione chiamata da OnMyMouseMoveScene: gestisce la modifica lungo una dimensione del rettangolo selezionato
|
||||
Private Sub OnMyMouseMoveSawRettangle(sender As Object, e As System.Windows.Forms.MouseEventArgs)
|
||||
' Verifico di essere il gestore attivo
|
||||
If Not m_bActive Then Return
|
||||
' Se drag non abilitato o già in esecuzione, esco
|
||||
If Not m_bDrag Or m_bDragging Then Return
|
||||
' Se primo movimento di drag, verifico di aver superato la soglia di movimento in pixel
|
||||
If m_bDragToStart Then
|
||||
If Math.Abs(e.Location.X - m_locPrev.X) < m_nRestRadius And
|
||||
Math.Abs(e.Location.Y - m_locPrev.Y) < m_nRestRadius Then
|
||||
Return
|
||||
End If
|
||||
m_bDragToStart = False
|
||||
End If
|
||||
|
||||
' riferiemento che deve rimanere fisso del rettangolo
|
||||
Dim frFixed As Frame3d = Nothing
|
||||
' lunghezza del lato da modificare
|
||||
Dim MaxLen As Double = 0
|
||||
Dim MinLen As Double = 0
|
||||
' recupero info sul rettangolo selezionato
|
||||
Dim vtDir As Vector3d = GetRettangleInfoScale(frFixed, MaxLen, MinLen)
|
||||
If vtDir.Equals(Vector3d.NULL) Then
|
||||
Return
|
||||
End If
|
||||
|
||||
' Inizio esecuzione di drag
|
||||
m_bDragging = True
|
||||
|
||||
' Ricavo il punto corrente in coordinate mondo
|
||||
Dim ptCurr As Point3d
|
||||
EgtUnProjectPoint(e.Location, ptCurr)
|
||||
' Ricavo il vettore di movimento
|
||||
Dim vtMove As Vector3d = ptCurr - m_ptPrev
|
||||
' ricavo il valore efficace di allungamento (la proiezione)
|
||||
Dim dProjection As Double = vtMove * vtDir
|
||||
vtMove = vtDir * dProjection
|
||||
' recupero il valore di scalatura
|
||||
Dim dScalefactor = dProjection / MaxLen + 1
|
||||
|
||||
' Modifico dimensione figura
|
||||
If Math.Abs(dScalefactor) > EPS_SMALL * EPS_SMALL Then
|
||||
EgtScale(m_nIdSelectedOutLoopRettangle, frFixed, dScalefactor, 1, 1, GDB_ID.ROOT)
|
||||
EgtScale(m_nIdSelectedFlatSurfRettangle, frFixed, dScalefactor, 1, 1, GDB_ID.ROOT)
|
||||
Dim ptCen As Point3d
|
||||
EgtCenterPoint(m_nIdSelectedTextRettangle, ptCen)
|
||||
EgtModifyText(m_nIdSelectedTextRettangle, m_sTextContent & LenToString(MaxLen + dProjection, 2) & " x " & LenToString(MinLen, 2))
|
||||
EgtMove(m_nIdSelectedTextRettangle, vtMove * 0.5)
|
||||
If m_nIdSelectedTextTopRettangle <> GDB_ID.NULL Then
|
||||
EgtMove(m_nIdSelectedTextTopRettangle, vtMove * 0.5)
|
||||
End If
|
||||
End If
|
||||
|
||||
Dim nWarn As Integer = 0
|
||||
ResetAllMachinings(nWarn)
|
||||
EnableReferenceRegion(False)
|
||||
' se la modifica genera un errore allora ripristino la figura prima della defomrazione
|
||||
If Not EgtVerifyPart(EgtGetParent(m_nIdSelectedOutLoopRettangle), True) Then
|
||||
EgtScale(m_nIdSelectedOutLoopRettangle, frFixed, 1 / dScalefactor, 1, 1, GDB_ID.ROOT)
|
||||
EgtScale(m_nIdSelectedFlatSurfRettangle, frFixed, 1 / dScalefactor, 1, 1, GDB_ID.ROOT)
|
||||
Dim ptCen As Point3d
|
||||
EgtCenterPoint(m_nIdSelectedTextRettangle, ptCen)
|
||||
EgtModifyText(m_nIdSelectedTextRettangle, m_sTextContent & LenToString(MaxLen, 2) & " x " & LenToString(MinLen, 2))
|
||||
EgtMove(m_nIdSelectedTextRettangle, -vtMove * 0.5)
|
||||
If m_nIdSelectedTextTopRettangle <> GDB_ID.NULL Then
|
||||
EgtMove(m_nIdSelectedTextTopRettangle, -vtMove * 0.5)
|
||||
End If
|
||||
End If
|
||||
|
||||
EgtDraw()
|
||||
' Aggiorno il punto precedente
|
||||
m_ptPrev = ptCurr
|
||||
' Terminata esecuzione di drag
|
||||
m_bDragging = False
|
||||
End Sub
|
||||
|
||||
' funzione chiamata da OnMyMouseUp: gestisce il reset di tutti gli indici in uso
|
||||
Public Sub ResetDragRettangleParam()
|
||||
' deseleziono l'elemento corrente
|
||||
EgtDeselectObj(m_nIdSelectedSawRettangle)
|
||||
EgtDeselectObj(m_nIdSelectedCurvRettangle)
|
||||
EgtResetMark(m_nIdSelectedSawRettangle)
|
||||
' resetto gli indici
|
||||
m_nIdSelectedOutLoopRettangle = GDB_ID.NULL
|
||||
m_nIdSelectedRegionRettangle = GDB_ID.NULL
|
||||
m_nIdSelectedSawRettangle = GDB_ID.NULL
|
||||
m_nIdSelectedCurvRettangle = GDB_ID.NULL
|
||||
m_nIdSelectedTextRettangle = GDB_ID.NULL
|
||||
m_nIdSelectedTextTopRettangle = GDB_ID.NULL
|
||||
m_nIdSelectedFlatSurfRettangle = GDB_ID.NULL
|
||||
m_SideListRettangle = {GDB_ID.NULL, GDB_ID.NULL, GDB_ID.NULL, GDB_ID.NULL}
|
||||
m_sTextContent = String.Empty
|
||||
' disattivo il drag
|
||||
m_bDrag = False
|
||||
' aggiorno le lavorazioni
|
||||
Dim nWarn As Integer = 0
|
||||
ResetAllMachinings(nWarn)
|
||||
EgtDraw()
|
||||
End Sub
|
||||
|
||||
#End Region ' Drag Rettangolo
|
||||
|
||||
Private Sub OnMyMouseDownScene(sender As Object, e As System.Windows.Forms.MouseEventArgs) Handles m_CurrProjPage.OnMouseDownScene
|
||||
' Verifico di essere il gestore attivo e non in modalità registrazione
|
||||
@@ -191,6 +498,25 @@ Public Class NestPageUC
|
||||
Not m_CurrProjPage.CurrentProjectScene.IsStatusNull() Then
|
||||
Return
|
||||
End If
|
||||
|
||||
' se in modalità slezione tagli
|
||||
If m_bSelectCurv Then
|
||||
OnMyMouseDownSceneSelCurv(sender, e)
|
||||
Return
|
||||
End If
|
||||
|
||||
' se in modalità DragRettangle (deformazione delle componenti rettangolari)
|
||||
If m_bIsCheckedDragRettangle Then
|
||||
OnMyMouseDownSceneSelSideRettangle(sender, e)
|
||||
' Dati per drag (abilito il Drag)
|
||||
m_locPrev = e.Location
|
||||
m_bDrag = EgtUnProjectPoint(e.Location, m_ptPrev) And m_nIdSelectedCurvRettangle <> GDB_ID.NULL
|
||||
m_bDragToStart = m_bDrag
|
||||
m_bVerify = m_bDrag AndAlso (Keyboard.Modifiers And ModifierKeys.Shift) > 0
|
||||
m_vtTotMove = Vector3d.NULL()
|
||||
Return
|
||||
End If
|
||||
|
||||
' Per default no drag
|
||||
m_bDrag = False
|
||||
' Verifico se selezionato indicativo di pezzo
|
||||
@@ -219,16 +545,80 @@ Public Class NestPageUC
|
||||
m_bDrag = True
|
||||
Exit While
|
||||
Else
|
||||
' verifico che tra gli elemnti selezionati ci sia un testo
|
||||
' verifico se l'elemento selezionato è il nome della tavola
|
||||
If EgtGetType(nId) = GDB_TY.EXT_TEXT AndAlso (sNamePartId = MAIN_TAB Or sNamePartId = SECOND_TAB) Then
|
||||
Dim nTab As Integer = m_MainWindow.m_CadCutPageUC.m_ProjectMgr.ChangeTable()
|
||||
' se non è stata eseguita nessuna selezione esco dal ciclo
|
||||
If nTab = 0 Then Exit While
|
||||
'' Creo nuovo progetto
|
||||
'm_CurrProjPage.NewProject(nTabInd, bRetainParkedParts)
|
||||
'' Gestione stato FastGrid
|
||||
'm_MainWindow.m_CadCutPageUC.m_FastGridSlabManager.OnPostNewProject()
|
||||
'EgtZoom(ZM.ALL)
|
||||
Dim nRes As Integer = m_MainWindow.m_CadCutPageUC.m_ProjectMgr.ChangeTable()
|
||||
' se non è stata eseguita nessuna scelta esco dal ciclo
|
||||
If nRes = 0 Then Exit While
|
||||
' imposto l'altra tavola
|
||||
Dim sOtherTab = If(sNamePartId = MAIN_TAB, SECOND_TAB, MAIN_TAB)
|
||||
EgtChangeTable(sOtherTab, True)
|
||||
m_CurrProjPage.AdjustAdditionalTable(True)
|
||||
EgtSetMachineLook(MCH_LOOK.TAB)
|
||||
' aggiorno le lavorazioni
|
||||
UpdateAllMachiningsToolpaths()
|
||||
' aggiorno i movimenti pezzi tra disposizioni
|
||||
For nI As Integer = 1 To EgtGetPhaseCount()
|
||||
EgtSetCurrPhase(nI)
|
||||
Dim nDispId As Integer = EgtGetPhaseDisposition(nI)
|
||||
SpecialApplyDisposition(nDispId, True)
|
||||
Next
|
||||
' aggiorno posizionamento ventose per lavorazioni da sotto
|
||||
UpdateVacuumsForDrip()
|
||||
' dichiaro tutto aggiornato
|
||||
m_CurrProjPage.SetOrderMachiningFlag()
|
||||
EgtSetCurrPhase(1)
|
||||
' aggiorno posizione pezzi in parcheggio
|
||||
Dim nPPId As Integer = EgtGetFirstPart()
|
||||
While nPPId <> GDB_ID.NULL
|
||||
PackPartInStore(nPPId)
|
||||
nPPId = EgtGetNextPart(nPPId)
|
||||
End While
|
||||
' se prevista rotazione
|
||||
If GetPrivateProfileInt(S_TABLE, K_CHANGETABWD, 0, m_MainWindow.GetMachIniFile()) = 2 Then
|
||||
' Dati tavola
|
||||
Dim b3Tab As New BBox3d
|
||||
EgtGetTableArea(1, b3Tab)
|
||||
' Box lastra
|
||||
Dim b3OrigRaw As New BBox3d
|
||||
GetRawBox(b3OrigRaw)
|
||||
' Allargo i limiti della tavola in tutte le fasi
|
||||
Const TAB_OFFS As Double = 3000
|
||||
For nI As Integer = 1 To EgtGetPhaseCount()
|
||||
EgtSetCurrPhase(nI)
|
||||
EgtSetTableAreaOffset(TAB_OFFS, TAB_OFFS, TAB_OFFS, TAB_OFFS)
|
||||
Next
|
||||
EgtSetCurrPhase(1)
|
||||
' Rotazione
|
||||
Dim dAngRot As Double = If(sOtherTab = SECOND_TAB, 180, -180)
|
||||
If Not RotateAllRawParts(dAngRot, False) Then
|
||||
m_CurrProjPage.SetWarningMessage(EgtMsg(90339)) 'Rotazione impossibile
|
||||
End If
|
||||
' Traslazione per riportare la lastra nella stessa posizione rispetto all'angolo BL che diveta TR e viceversa
|
||||
Dim b3Raw As New BBox3d
|
||||
GetRawBox(b3Raw)
|
||||
Dim vtMove As Vector3d
|
||||
If sOtherTab = SECOND_TAB Then
|
||||
Dim vtDiffIni As Vector3d = b3OrigRaw.Min() - b3Tab.Min()
|
||||
Dim vtDiffFin As Vector3d = b3Tab.Max() - b3Raw.Max()
|
||||
vtMove = vtDiffFin - vtDiffIni
|
||||
Else
|
||||
Dim vtDiffIni As Vector3d = b3Tab.Max() - b3OrigRaw.Max()
|
||||
Dim vtDiffFin As Vector3d = b3Raw.Min() - b3Tab.Min()
|
||||
vtMove = -(vtDiffFin - vtDiffIni)
|
||||
End If
|
||||
vtMove.z = 0
|
||||
MoveAllRawParts(vtMove)
|
||||
' Ripristino i limiti della tavola in tutte le fasi
|
||||
For nI As Integer = 1 To EgtGetPhaseCount()
|
||||
EgtSetCurrPhase(nI)
|
||||
EgtSetTableAreaOffset(0, 0, 0, 0)
|
||||
Next
|
||||
EgtSetCurrPhase(1)
|
||||
HideAllMachinings()
|
||||
End If
|
||||
' visualizzazione
|
||||
EgtZoom(ZM.ALL)
|
||||
Exit While
|
||||
End If
|
||||
End If
|
||||
@@ -255,6 +645,13 @@ Public Class NestPageUC
|
||||
End If
|
||||
m_bDragToStart = False
|
||||
End If
|
||||
|
||||
' se devo muovere un lato del rettangolo
|
||||
If m_bIsCheckedDragRettangle Then
|
||||
OnMyMouseMoveSawRettangle(sender, e)
|
||||
Return
|
||||
End If
|
||||
|
||||
' Determino cosa muovere
|
||||
Dim nMoveId = If(m_nIdToSel <> GDB_ID.NULL, m_nIdToSel, GDB_ID.SEL)
|
||||
' Verifico se in tavola o in parcheggio
|
||||
@@ -345,6 +742,15 @@ Public Class NestPageUC
|
||||
Private Sub OnMyMouseUpScene(sender As Object, e As System.Windows.Forms.MouseEventArgs) Handles m_CurrProjPage.OnMouseUpScene
|
||||
' Verifico di essere il gestore attivo
|
||||
If Not m_bActive Then Return
|
||||
' verifico che non sia attivo il comando Test
|
||||
If m_bSelectCurv Then Return
|
||||
' verifico che non sia attivo il comando di Drag dei rettangoli
|
||||
If m_bIsCheckedDragRettangle Then
|
||||
' deseleziono gli oggeti, resetto le variabili usate, aggiorno il disegno
|
||||
ResetDragRettangleParam()
|
||||
Return
|
||||
End If
|
||||
|
||||
' Se eseguito drag
|
||||
If Not m_bDragToStart Then
|
||||
' Se movimento con sola verifica finale
|
||||
@@ -355,16 +761,16 @@ Public Class NestPageUC
|
||||
UpdateNestRegions()
|
||||
EnableReferenceRegion(False)
|
||||
' Eseguo verifica
|
||||
If VerifyTrfData( nMoveId) And EgtVerifyPart( nMoveId, m_bReducedCut) Then
|
||||
If VerifyTrfData(nMoveId) And EgtVerifyPart(nMoveId, m_bReducedCut) Then
|
||||
m_CurrProjPage.ResetOrderMachiningFlag()
|
||||
' Non superata riporto alla posizione iniziale
|
||||
' Non superata riporto alla posizione iniziale
|
||||
Else
|
||||
If m_bFromParking Then
|
||||
m_CurrProjPage.ClearMessage()
|
||||
PreRemoveOnePart( nMoveId)
|
||||
VeinMatching.OnRemovePartFromRaw( nMoveId)
|
||||
PreRemoveOnePart(nMoveId)
|
||||
VeinMatching.OnRemovePartFromRaw(nMoveId)
|
||||
Else
|
||||
EgtMove( nMoveId, -m_vtTotMove)
|
||||
EgtMove(nMoveId, -m_vtTotMove)
|
||||
' Eventuale notifica al VeinMatching
|
||||
If nMoveId = GDB_ID.SEL Then
|
||||
Dim nId As Integer = EgtGetFirstSelectedObj()
|
||||
@@ -378,11 +784,11 @@ Public Class NestPageUC
|
||||
End If
|
||||
End If
|
||||
m_bFromParking = False
|
||||
' altrimenti caso con verifica durante il movimento
|
||||
' altrimenti caso con verifica durante il movimento
|
||||
Else
|
||||
' Basta reset alla fine
|
||||
End If
|
||||
' Se selezione da eseguire
|
||||
' Se selezione da eseguire
|
||||
ElseIf m_nIdToSel <> GDB_ID.NULL Then
|
||||
' Determino se pezzo in tavola o in parcheggio
|
||||
Dim bPartInTable As Boolean = (EgtGetParent(m_nIdToSel) = m_nRawId)
|
||||
@@ -399,7 +805,7 @@ Public Class NestPageUC
|
||||
VeinMatching.OnSelectPart(m_nIdToSel)
|
||||
' Set flag posizione selezionati
|
||||
m_nPartPos = If(bPartInTable, PART_POS.IN_TABLE, PART_POS.OUT_TABLE)
|
||||
' Se deselezione da eseguire
|
||||
' Se deselezione da eseguire
|
||||
ElseIf m_nIdToDesel <> GDB_ID.NULL Then
|
||||
EgtDeselectObj(m_nIdToDesel)
|
||||
' Eventuale aggiornamento VeinMatching
|
||||
@@ -655,7 +1061,7 @@ Public Class NestPageUC
|
||||
nId = EgtGetNextSelectedObj()
|
||||
End While
|
||||
Else
|
||||
RotateAllRawParts(m_dRegAngStep)
|
||||
UserRotateAllRawParts(m_dRegAngStep)
|
||||
EgtDraw()
|
||||
End If
|
||||
End Sub
|
||||
@@ -673,7 +1079,7 @@ Public Class NestPageUC
|
||||
nId = EgtGetNextSelectedObj()
|
||||
End While
|
||||
Else
|
||||
RotateAllRawParts(-m_dRegAngStep)
|
||||
UserRotateAllRawParts(-m_dRegAngStep)
|
||||
EgtDraw()
|
||||
End If
|
||||
End Sub
|
||||
@@ -725,7 +1131,7 @@ Public Class NestPageUC
|
||||
End If
|
||||
End Function
|
||||
|
||||
Private Sub RotateAllRawParts(dAngDeg As Double)
|
||||
Private Sub UserRotateAllRawParts(dAngDeg As Double)
|
||||
' Recupero rotazione totale
|
||||
Dim dRegRot As Double = GetRegistrationRotation()
|
||||
' Verifico se nuova rotazione totale ammissibile
|
||||
@@ -734,6 +1140,13 @@ Public Class NestPageUC
|
||||
m_CurrProjPage.SetWarningMessage(EgtMsg(90338)) 'Angolo di registrazione oltre i limiti
|
||||
Return
|
||||
End If
|
||||
Dim bMoveOk As Boolean = RotateAllRawParts( dAngDeg)
|
||||
If Not bMoveOk Then m_CurrProjPage.SetWarningMessage(EgtMsg(90339)) 'Rotazione impossibile
|
||||
End Sub
|
||||
|
||||
Friend Function RotateAllRawParts(dAngDeg As Double, Optional bIsReg As Boolean = True) As Boolean
|
||||
' Recupero rotazione totale
|
||||
Dim dRegRot As Double = GetRegistrationRotation()
|
||||
' Recupero il centro del grezzo iniziale per usarlo come centro della rotazione
|
||||
Dim ptCen As New Point3d
|
||||
GetRawCenter(ptCen)
|
||||
@@ -768,7 +1181,6 @@ Public Class NestPageUC
|
||||
End While
|
||||
' Se rotazione impossibile, ripristino posizione dei grezzi già spostati
|
||||
If Not bMoveOk Then
|
||||
m_CurrProjPage.SetWarningMessage(EgtMsg(90339)) 'Rotazione impossibile
|
||||
Dim nRevPhase As Integer = 1
|
||||
Dim nRevRawId As Integer = GDB_ID.NULL
|
||||
While nRevPhase <= nPhase
|
||||
@@ -851,15 +1263,25 @@ Public Class NestPageUC
|
||||
End If
|
||||
nOpeId = EgtGetNextActiveOperation(nOpeId)
|
||||
End While
|
||||
' Se non è registrazione, ruoto anche l'eventuale foto della lastra
|
||||
'If Not bIsReg Then
|
||||
' Dim nPhotoId = m_CurrProjPage.GetPhoto()
|
||||
' If nPhotoId <> GDB_ID.NULL then EgtRotatePhoto(nPhotoId, ptCen, Vector3d.Z_AX(), dAngDeg)
|
||||
'End If
|
||||
' Aggiorno rotazione totale
|
||||
SetRegistrationRotation(dRegRot + dAngDeg)
|
||||
If bIsReg Then
|
||||
SetRegistrationRotation(dRegRot + dAngDeg)
|
||||
Else
|
||||
SetRegistrationRotation(0)
|
||||
End If
|
||||
' Dichiaro grezzo per punti
|
||||
EgtSetInfo(GetCurrentRaw(), KEY_RAWBYPOINTS, 1)
|
||||
End If
|
||||
' Ripristino lo stato iniziale
|
||||
EgtSetCurrPhase(1)
|
||||
HideAllMachinings()
|
||||
End Sub
|
||||
Return bMoveOk
|
||||
End Function
|
||||
|
||||
Private Sub InsertPartBtn_Click(sender As Object, e As RoutedEventArgs) Handles InsertPartBtn.Click
|
||||
' Se inserimento automatico
|
||||
@@ -1095,7 +1517,7 @@ Public Class NestPageUC
|
||||
nLayId = EgtGetNextName(nLayId, NAME_INLOOP)
|
||||
End While
|
||||
' Aggiorno le entità con tallone e quelle con angolo esterno
|
||||
Const AGG_DEPTH As Double = 2.0
|
||||
Const AGG_DEPTH As Double = 0.75
|
||||
Dim bSizeOnTop As Boolean = ( GetPrivateProfileInt( S_SIDES, K_SIZEALWAYSONTOP, 0, m_MainWindow.GetIniFile()) <> 0)
|
||||
For Each nEnt As Integer In vEnt
|
||||
' Se aggiornamento vietato, vado oltre
|
||||
@@ -1121,12 +1543,14 @@ Public Class NestPageUC
|
||||
EgtSetInfo(nEnt, INFO_OFFSET2, 0)
|
||||
End If
|
||||
EgtSetInfo(nEnt, INFO_DEPTH2, (dTh - dHeel) + AGG_DEPTH)
|
||||
EgtSetInfo(nEnt, INFO_AGG2, AGG_DEPTH)
|
||||
' altrimenti, tallone superiore a spessore -> non c'è taglio inclinato
|
||||
Else
|
||||
EgtSetInfo(nEnt, INFO_SIDE_ANGLE, 0.0)
|
||||
EgtSetInfo(nEnt, INFO_SIDE_ANGLE2, 0.0)
|
||||
EgtRemoveInfo(nEnt, INFO_OFFSET2)
|
||||
EgtRemoveInfo(nEnt, INFO_DEPTH2)
|
||||
EgtRemoveInfo(nEnt, INFO_AGG2)
|
||||
End If
|
||||
' Inclinazione interna
|
||||
Else
|
||||
@@ -1135,12 +1559,14 @@ Public Class NestPageUC
|
||||
EgtSetInfo(nEnt, INFO_OFFSET, dHeel * Math.Tan(-dSideAng * Math.PI / 180))
|
||||
EgtSetInfo(nEnt, INFO_SIDE_ANGLE2, 0.0)
|
||||
EgtSetInfo(nEnt, INFO_DEPTH2, dHeel + AGG_DEPTH)
|
||||
EgtSetInfo(nEnt, INFO_AGG2, AGG_DEPTH)
|
||||
' altrimenti, tallone superiore a spessore -> non c'è taglio inclinato
|
||||
Else
|
||||
EgtSetInfo(nEnt, INFO_SIDE_ANGLE, 0.0)
|
||||
EgtRemoveInfo(nEnt, INFO_OFFSET)
|
||||
EgtRemoveInfo(nEnt, INFO_SIDE_ANGLE2)
|
||||
EgtRemoveInfo(nEnt, INFO_DEPTH2)
|
||||
EgtRemoveInfo(nEnt, INFO_AGG2)
|
||||
End If
|
||||
End If
|
||||
' Se altrimenti inclinazione esterna
|
||||
@@ -1155,6 +1581,18 @@ Public Class NestPageUC
|
||||
Return True
|
||||
End Function
|
||||
|
||||
Private Sub DragRettangle_Click() Handles DragRettanleBtn.Click
|
||||
If DragRettanleBtn.IsChecked Then
|
||||
m_bIsCheckedDragRettangle = True
|
||||
Else
|
||||
m_bIsCheckedDragRettangle = False
|
||||
ResetDragRettangleParam()
|
||||
m_CurrProjPage.ClearMessage()
|
||||
ShowParkedParts()
|
||||
End If
|
||||
EgtDraw()
|
||||
End Sub
|
||||
|
||||
Private Sub StorePartBtn_Click(sender As Object, e As RoutedEventArgs) Handles StorePartBtn.Click
|
||||
EgtSetCurrentContext(m_CurrProjPage.CurrentProjectScene.GetCtx())
|
||||
' Ciclo di parcheggio dei pezzi selezionati
|
||||
|
||||
@@ -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
|
||||
@@ -737,35 +753,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 +853,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
|
||||
@@ -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,17 @@
|
||||
<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>
|
||||
<Button Name="CutEndBtn" Grid.Column="2" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource Fine-Allunga-AccorciaImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||
</Button>
|
||||
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
||||
</Grid>
|
||||
|
||||
@@ -139,18 +151,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>
|
||||
|
||||
|
||||
@@ -6,6 +6,9 @@ Public Class SplitPageUC
|
||||
|
||||
' Riferimento alla MainWindow
|
||||
Private m_MainWindow As MainWindow = DirectCast(Application.Current.MainWindow, MainWindow)
|
||||
Private WithEvents m_CurrProjPage As CurrentProjectPageUC
|
||||
' Flag di pagina attiva
|
||||
Private m_bActive As Boolean = False
|
||||
' Tipo movimento dei grezzi (manuale o con testa ventosa)
|
||||
Private m_bByHand As Boolean = True
|
||||
' Abilitazione movimento finale pezzi su tavola ausiliaria
|
||||
@@ -13,6 +16,16 @@ Public Class SplitPageUC
|
||||
' Stato
|
||||
Private m_nCurrPhase As Integer = 0
|
||||
Private m_MachiningList As New List(Of SplitMach)
|
||||
|
||||
' numero di lavorazioni di tipo lama
|
||||
Private m_nCountSawing As Integer = 0
|
||||
' numero di lavprazioni di tipo waterjet
|
||||
Private m_nCountWaterjetting As Integer = 0
|
||||
' altri tipi di lavorazioni (Foro/Fresa)
|
||||
Private m_nCountOtherMachining As Integer = 0
|
||||
' verifico che le lavorazioni selezionate siano omogenee (con lo stesso utensile)
|
||||
Private m_bAreHomogeneous As Boolean = False
|
||||
|
||||
Private m_ItemList As New ObservableCollection(Of NameIdLsBxItem)
|
||||
'Private m_CurrInd As Integer = -1
|
||||
'Private m_CurrItems As New List(Of NameIdLsBxItem)
|
||||
@@ -23,36 +36,47 @@ Public Class SplitPageUC
|
||||
Private m_nNbrGrpId As Integer = GDB_ID.NULL
|
||||
Private m_bToNext As Boolean = False
|
||||
Friend m_bOnAuxTab As Boolean = False
|
||||
' Drag
|
||||
Private m_nDragInd As Integer = -1
|
||||
Private m_nDragType As Integer = 0 '0=niente, 1=attacco, 2=uscita
|
||||
Private m_ptDragPrev As Point3d
|
||||
Private m_bDragging As Boolean = False
|
||||
' Selected cut
|
||||
Private m_nSelected As Integer = GDB_ID.NULL
|
||||
|
||||
Private Sub SplitPageUC_Initialized(sender As Object, e As EventArgs)
|
||||
PrevBtn.IsEnabled = False
|
||||
' Collego lista di oggetti a ListBox
|
||||
MachiningLsBx.ItemsSource = m_ItemList
|
||||
' Assegno testi
|
||||
OnOffBtn.Content = EgtMsg(MSG_SPLITPAGEUC + 1) ' On/Off
|
||||
AllOnBtn.Content = EgtMsg(MSG_SPLITPAGEUC + 2) ' Tutti On
|
||||
AllOffBtn.Content = EgtMsg(MSG_SPLITPAGEUC + 3) ' Tutti Off
|
||||
CutBtn.Content = EgtMsg(MSG_SPLITPAGEUC + 4) ' Allunga/Accorcia
|
||||
CutStartBtn.Content = EgtMsg(MSG_SPLITPAGEUC + 5) ' Inizio Allunga/Accorcia
|
||||
CutEndBtn.Content = EgtMsg(MSG_SPLITPAGEUC + 6) ' Fine Allunga/Accorcia
|
||||
OutCenStartBtn.Content = EgtMsg(MSG_SPLITPAGEUC + 7) ' Inizio Centro/Fuori
|
||||
OutCenEndBtn.Content = EgtMsg(MSG_SPLITPAGEUC + 12) ' Fine Centro/Fuori
|
||||
ModifStartBtn.Content = EgtMsg(MSG_SPLITPAGEUC + 33) ' Inizio Modif.
|
||||
ModifEndBtn.Content = EgtMsg(MSG_SPLITPAGEUC + 34) ' Fine Modif.
|
||||
InvertBtn.Content = EgtMsg(MSG_SPLITPAGEUC + 36) ' Inverti
|
||||
PauseBtn.Content = EgtMsg(MSG_SPLITPAGEUC + 31) ' Pausa On/Off
|
||||
AllOutStartBtn.Content = EgtMsg(MSG_SPLITPAGEUC + 8) ' Inizi Tutti Fuori
|
||||
AllCenStartBtn.Content = EgtMsg(MSG_SPLITPAGEUC + 9) ' Inizi Tutti Centro
|
||||
AllOutEndBtn.Content = EgtMsg(MSG_SPLITPAGEUC + 13) ' Fine Tutti Fuori
|
||||
AllCenEndBtn.Content = EgtMsg(MSG_SPLITPAGEUC + 14) ' Fine Tutti Centro
|
||||
AllExtendBtn.Content = EgtMsg(MSG_SPLITPAGEUC + 15) ' Allunga Tutti
|
||||
AllReduceBtn.Content = EgtMsg(MSG_SPLITPAGEUC + 16) ' Accorc. Tutti
|
||||
OnOffBtn.ToolTip = EgtMsg(MSG_SPLITPAGEUC + 1) ' On/Off
|
||||
AllOnBtn.ToolTip = EgtMsg(MSG_SPLITPAGEUC + 2) ' Tutti On
|
||||
AllOffBtn.ToolTip = EgtMsg(MSG_SPLITPAGEUC + 3) ' Tutti Off
|
||||
CutBtn.ToolTip = EgtMsg(MSG_SPLITPAGEUC + 4) ' Allunga/Accorcia
|
||||
CutStartBtn.ToolTip = EgtMsg(MSG_SPLITPAGEUC + 5) ' Inizio Allunga/Accorcia
|
||||
CutEndBtn.ToolTip = EgtMsg(MSG_SPLITPAGEUC + 6) ' Fine Allunga/Accorcia
|
||||
OutCenStartBtn.ToolTip = EgtMsg(MSG_SPLITPAGEUC + 7) ' Inizio Centro/Fuori
|
||||
OutCenEndBtn.ToolTip = EgtMsg(MSG_SPLITPAGEUC + 12) ' Fine Centro/Fuori
|
||||
ModifStartBtn.ToolTip = EgtMsg(MSG_SPLITPAGEUC + 33) ' Inizio Modif.
|
||||
ModifEndBtn.ToolTip = EgtMsg(MSG_SPLITPAGEUC + 34) ' Fine Modif.
|
||||
InvertBtn.ToolTip = EgtMsg(MSG_SPLITPAGEUC + 36) ' Inverti
|
||||
PauseBtn.ToolTip = EgtMsg(MSG_SPLITPAGEUC + 31) ' Pausa On/Off
|
||||
AllOutStartBtn.ToolTip = EgtMsg(MSG_SPLITPAGEUC + 8) ' Inizi Tutti Fuori
|
||||
AllCenStartBtn.ToolTip = EgtMsg(MSG_SPLITPAGEUC + 9) ' Inizi Tutti Centro
|
||||
AllOutEndBtn.ToolTip = EgtMsg(MSG_SPLITPAGEUC + 13) ' Fine Tutti Fuori
|
||||
AllCenEndBtn.ToolTip = EgtMsg(MSG_SPLITPAGEUC + 14) ' Fine Tutti Centro
|
||||
AllExtendBtn.ToolTip = EgtMsg(MSG_SPLITPAGEUC + 15) ' Allunga Tutti
|
||||
AllReduceBtn.ToolTip = EgtMsg(MSG_SPLITPAGEUC + 16) ' Accorc. Tutti
|
||||
ModifyBtn.Content = EgtMsg(MSG_SPLITPAGEUC + 17) ' Modifica
|
||||
AutoBtn.Content = EgtMsg(MSG_SPLITPAGEUC + 18) ' Auto
|
||||
RestartBtn.Content = EgtMsg(MSG_SPLITPAGEUC + 19) ' Restart
|
||||
End Sub
|
||||
|
||||
Private Sub SplitPageUC_Loaded(sender As Object, e As EventArgs) Handles Me.Loaded
|
||||
m_bActive = True
|
||||
m_CurrProjPage = m_MainWindow.m_CurrentProjectPageUC
|
||||
m_nDragInd = -1
|
||||
m_nDragType = 0
|
||||
' Leggo tipo movimento grezzi
|
||||
m_bByHand = (EgtGetHeadId(VACUUM_HEAD) = GDB_ID.NULL Or
|
||||
Not m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.AUTO_MANIP) Or
|
||||
@@ -79,7 +103,7 @@ Public Class SplitPageUC
|
||||
If Not m_bShow Then
|
||||
If m_MainWindow.m_CurrentMachine.WaterJettingActive Then ResetAllMachinings()
|
||||
If SortAllMachinings() Then m_MainWindow.m_CurrentProjectPageUC.SetOrderMachiningFlag()
|
||||
If m_MainWindow.m_CurrentMachine.WaterJettingActive Then
|
||||
If m_MainWindow.m_CurrentMachine.WaterJettingActive Then
|
||||
Dim bModif As Boolean = TestAllMachiningsForStrict()
|
||||
If bModif Then m_MainWindow.m_CurrentProjectPageUC.SetWarningMessage(EgtMsg(90321)) 'Ridotte alcune lavorazioni per evitare interferenze
|
||||
End If
|
||||
@@ -97,12 +121,18 @@ Public Class SplitPageUC
|
||||
ShowOnePhaseMachiningPreview(m_nCurrPhase)
|
||||
' Preparo la lista delle lavorazioni
|
||||
CalculateSplitMachList(m_nCurrPhase, m_MachiningList)
|
||||
' azzero i contatori delle lavorazioni
|
||||
m_nCountSawing = 0
|
||||
m_nCountWaterjetting = 0
|
||||
m_nCountOtherMachining = 0
|
||||
' Aggiorno visualizzazione delle lavorazioni
|
||||
For nI As Integer = 0 To m_MachiningList.Count() - 1
|
||||
' sistemo colore
|
||||
ColorMachining(m_MachiningList(nI))
|
||||
' assegno numerazione
|
||||
NumberDirectionMachining(nI)
|
||||
' conto il numero di tipi di lavorazioni
|
||||
CountMachiningType(m_MachiningList(nI), m_nCountSawing, m_nCountWaterjetting, m_nCountOtherMachining)
|
||||
Next
|
||||
' Preparo la lista degli Item
|
||||
ShowMachiningList()
|
||||
@@ -138,33 +168,222 @@ Public Class SplitPageUC
|
||||
Dim sText As String = String.Empty
|
||||
If Math.Abs(Mach.m_dSideAng) < EPS_ANG_SMALL Then
|
||||
sText = EgtMsg(90791) & " " & i.ToString()
|
||||
If Mach.m_sLay = NAME_ONPATH Then AddTopText( sText)
|
||||
If Mach.m_sLay = NAME_ONPATH Then AddTopText(sText)
|
||||
Else
|
||||
sText = EgtMsg(90791) & " " & i.ToString() & " " & DoubleToString( Mach.m_dSideAng, 2) & "°"
|
||||
sText = EgtMsg(90791) & " " & i.ToString() & " " & DoubleToString(Mach.m_dSideAng, 2) & "°"
|
||||
End If
|
||||
If Mach.m_bPause Then AddPauseText(sText)
|
||||
m_ItemList.Add(New NameIdLsBxItem(sText, i - 1, Mach.m_bEnabled))
|
||||
m_ItemList.Add(New NameIdLsBxItem(sText, i - 1, Mach.m_bEnabled, MCH_OY.SAWING))
|
||||
ElseIf Mach.m_nType = MCH_OY.DRILLING Then ' Foratura
|
||||
Dim sText As String = EgtMsg(90792) & " " & i.ToString()
|
||||
If Mach.m_bPause Then AddPauseText(sText)
|
||||
m_ItemList.Add(New NameIdLsBxItem(sText, i - 1, Mach.m_bEnabled))
|
||||
m_ItemList.Add(New NameIdLsBxItem(sText, i - 1, Mach.m_bEnabled, MCH_OY.DRILLING))
|
||||
ElseIf Mach.m_nType = MCH_OY.MILLING Then ' Fresatura
|
||||
Dim sText As String = EgtMsg(90793) & " " & i.ToString()
|
||||
If Mach.m_sLay = NAME_ONPATH Then AddTopText( sText)
|
||||
If Mach.m_bPause Then AddPauseText( sText)
|
||||
m_ItemList.Add(New NameIdLsBxItem(sText, i - 1, Mach.m_bEnabled))
|
||||
If Mach.m_sLay = NAME_ONPATH Then AddTopText(sText)
|
||||
If Mach.m_bPause Then AddPauseText(sText)
|
||||
m_ItemList.Add(New NameIdLsBxItem(sText, i - 1, Mach.m_bEnabled, MCH_OY.MILLING))
|
||||
ElseIf Mach.m_nType = MCH_OY.POCKETING Then ' Svuotatura
|
||||
Dim sText As String = EgtMsg(90796) & " " & i.ToString()
|
||||
If Mach.m_bPause Then AddPauseText(sText)
|
||||
m_ItemList.Add(New NameIdLsBxItem(sText, i - 1, Mach.m_bEnabled))
|
||||
m_ItemList.Add(New NameIdLsBxItem(sText, i - 1, Mach.m_bEnabled, MCH_OY.POCKETING))
|
||||
ElseIf Mach.m_nType = MCH_OY.WATERJETTING Then ' Waterjet
|
||||
Dim sText As String = EgtMsg(90797) & " " & i.ToString()
|
||||
If Mach.m_bPause Then AddPauseText(sText)
|
||||
m_ItemList.Add(New NameIdLsBxItem(sText, i - 1, Mach.m_bEnabled))
|
||||
m_ItemList.Add(New NameIdLsBxItem(sText, i - 1, Mach.m_bEnabled, MCH_OY.WATERJETTING))
|
||||
End If
|
||||
Next
|
||||
End Sub
|
||||
|
||||
Private Sub OnMyMouseDownScene(sender As Object, e As System.Windows.Forms.MouseEventArgs) Handles m_CurrProjPage.OnMouseDownScene
|
||||
' Verifico di essere il gestore attivo e non in modalità sola visualizzazione
|
||||
If Not m_bActive OrElse m_bShow Then Return
|
||||
' Si può selezionare solo con il tasto sinistro e se stato NULL
|
||||
If e.Button <> Windows.Forms.MouseButtons.Left Or
|
||||
Not m_CurrProjPage.CurrentProjectScene.IsStatusNull() Then
|
||||
Return
|
||||
End If
|
||||
' Reset drag
|
||||
m_nDragInd = -1
|
||||
m_nDragType = 0
|
||||
' Reset selection interface
|
||||
m_nSelected = GDB_ID.NULL
|
||||
' Verifico se selezionato estremo di taglio con lama
|
||||
EgtSetObjFilterForSelWin(False, True, False, False, False)
|
||||
Dim nSel As Integer
|
||||
EgtSelect(e.Location, Scene.DIM_SEL, Scene.DIM_SEL, nSel)
|
||||
Dim nId As Integer = EgtGetFirstObjInSelWin()
|
||||
While nId <> GDB_ID.NULL
|
||||
' Verifico sia un attacco o uscita di taglio con lama
|
||||
Dim nType As Integer = 0
|
||||
Dim sName As String = ""
|
||||
EgtGetName(nId, sName)
|
||||
If String.Compare(sName, NAME_PV_PRECUT) = 0 Then
|
||||
nType = 1
|
||||
ElseIf String.Compare(sName, NAME_PV_POSTCUT) = 0 Then
|
||||
nType = 2
|
||||
ElseIf String.Compare(sName, NAME_PV_CUT) = 0 Then
|
||||
nType = 3
|
||||
End If
|
||||
If nType = 1 Or nType = 2 Then
|
||||
Dim nPvId As Integer = EgtGetParent(EgtGetParent(nId))
|
||||
Dim nMchId As Integer = GDB_ID.NULL
|
||||
If EgtGetInfo(nPvId, "MId", nMchId) Then
|
||||
For nInd As Integer = 0 To m_MachiningList.Count() - 1
|
||||
If m_MachiningList(nInd).m_nId = nMchId Then
|
||||
m_nDragInd = nInd
|
||||
m_nDragType = nType
|
||||
End If
|
||||
For nJ As Integer = 0 To m_MachiningList(nInd).m_vOthId.Count() - 1
|
||||
If m_MachiningList(nInd).m_vOthId(nJ) = nMchId Then
|
||||
m_nDragInd = nInd
|
||||
m_nDragType = nType
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
If m_nDragInd >= 0 Then
|
||||
' Assegno l'id dell'elemnto selezionato
|
||||
m_nSelected = m_nDragInd
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
If m_nDragInd >= 0 Then
|
||||
' Assegno l'id dell'elemnto selezionato
|
||||
m_nSelected = m_nDragInd
|
||||
Exit While
|
||||
End If
|
||||
ElseIf nType = 3 Then
|
||||
Dim nPvId As Integer = EgtGetParent(EgtGetParent(nId))
|
||||
Dim nMchId As Integer = GDB_ID.NULL
|
||||
If EgtGetInfo(nPvId, "MId", nMchId) Then
|
||||
For nInd As Integer = 0 To m_MachiningList.Count() - 1
|
||||
If m_MachiningList(nInd).m_nId = nMchId Then
|
||||
m_nSelected = nInd
|
||||
End If
|
||||
For nJ As Integer = 0 To m_MachiningList(nInd).m_vOthId.Count() - 1
|
||||
If m_MachiningList(nInd).m_vOthId(nJ) = nMchId Then
|
||||
m_nSelected = nInd
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
If m_nSelected >= 0 Then Exit For
|
||||
Next
|
||||
End If
|
||||
If m_nSelected >= 0 Then Exit While
|
||||
End If
|
||||
nId = EgtGetNextObjInSelWin()
|
||||
End While
|
||||
' Sistemazioni per drag
|
||||
If m_nSelected >= 0 AndAlso EgtUnProjectPoint(e.Location, m_ptDragPrev) Then
|
||||
MachiningLsBx.SelectedIndex = m_nSelected
|
||||
Else
|
||||
m_nDragInd = -1
|
||||
m_nDragType = 0
|
||||
m_nSelected = GDB_ID.NULL
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub OnMyMouseMoveScene(sender As Object, e As System.Windows.Forms.MouseEventArgs) Handles m_CurrProjPage.OnMouseMoveScene
|
||||
' Verifico di essere il gestore attivo e non in modalità sola visualizzazione
|
||||
If Not m_bActive OrElse m_bShow Then Return
|
||||
' Se drag non abilitato o in corso
|
||||
If m_nDragInd = -1L Or m_bDragging Then Return
|
||||
m_bDragging = True
|
||||
Dim nOperId As Integer = m_MachiningList(m_nDragInd).m_nId
|
||||
' Ricavo il punto corrente in coordinate mondo
|
||||
Dim ptCurr As Point3d
|
||||
EgtUnProjectPoint(e.Location, ptCurr)
|
||||
' Ricavo il vettore di movimento e la variazione di lunghezza
|
||||
Dim vtMove As Vector3d = ptCurr - m_ptDragPrev
|
||||
Dim dDelta = vtMove * m_MachiningList(m_nDragInd).m_vtDir
|
||||
If m_nDragType = 1 Then
|
||||
Dim dOrigUsal As Double = 0
|
||||
Dim dUsal As Double
|
||||
' ----------------------- REPEAT -----------------------
|
||||
Do
|
||||
dDelta = -dDelta
|
||||
' Leggo il valore salvato nella geometria
|
||||
EgtGetInfo(nOperId, INFO_MCH_USER_SAL, dOrigUsal)
|
||||
dUsal = dOrigUsal + dDelta
|
||||
' Se c'è limite alla lunghezza libera
|
||||
If m_MachiningList(m_nDragInd).m_dStartFreeLen < FREELEN_INF Then
|
||||
' Recupero sicurezza in corner interno
|
||||
Dim dCornerSafety As Double = Math.Max(GetPrivateProfileDouble(S_MACH_NEST, K_MACH_SAFE_LEN_INTCORNER, 1, m_MainWindow.GetMachIniFile()), 10 * EPS_SMALL)
|
||||
' Recupero lunghezza baffo del taglio
|
||||
Dim nPvId As Integer = GDB_ID.NULL
|
||||
EgtGetInfo(EgtGetFirstNameInGroup(nOperId, NAME_PREVIEW), INFO_PV_ONPART_ID, nPvId)
|
||||
Dim dDT As Double = 0
|
||||
EgtGetInfo(EgtGetFirstGroupInGroup(nPvId), "DT", dDT)
|
||||
dUsal = Math.Min(dUsal, m_MachiningList(m_nDragInd).m_dStartFreeLen - dDT - dCornerSafety)
|
||||
End If
|
||||
' Modifica della lavorazione
|
||||
EgtSetCurrMachining(nOperId)
|
||||
Dim dAddLen As Double = 0
|
||||
EgtGetMachiningParam(MCH_MP.STARTADDLEN, dAddLen)
|
||||
|
||||
If dAddLen - dOrigUsal < -10 * EPS_SMALL Then
|
||||
m_bDragging = False
|
||||
Return
|
||||
End If
|
||||
EgtSetMachiningParam(MCH_MP.STARTADDLEN, dAddLen + dUsal - dOrigUsal)
|
||||
EgtSetInfo(nOperId, INFO_MCH_USER_SAL, dUsal)
|
||||
Loop Until UpdateMachiningPreview(m_MachiningList(m_nDragInd).m_nId, True)
|
||||
' ----------------------- REPEAT (solo se il segmento scompare) -----------------------
|
||||
Else
|
||||
Dim dOrigUeal As Double = 0
|
||||
Dim dUeal As Double
|
||||
dDelta = -dDelta
|
||||
Do
|
||||
dDelta = -dDelta
|
||||
' Leggo il valore salvato nella geometria
|
||||
EgtGetInfo(nOperId, INFO_MCH_USER_EAL, dOrigUeal)
|
||||
dUeal = dOrigUeal + dDelta
|
||||
' Se c'è limite alla lunghezza libera
|
||||
If m_MachiningList(m_nDragInd).m_dEndFreeLen < FREELEN_INF Then
|
||||
' Recupero sicurezza in corner interno
|
||||
Dim dCornerSafety As Double = Math.Max(GetPrivateProfileDouble(S_MACH_NEST, K_MACH_SAFE_LEN_INTCORNER, 1, m_MainWindow.GetMachIniFile()), 10 * EPS_SMALL)
|
||||
' Recupero lunghezza baffo del taglio
|
||||
Dim nPvId As Integer = GDB_ID.NULL
|
||||
EgtGetInfo(EgtGetFirstNameInGroup(nOperId, NAME_PREVIEW), INFO_PV_ONPART_ID, nPvId)
|
||||
Dim dDT As Double = 0
|
||||
EgtGetInfo(EgtGetFirstGroupInGroup(nPvId), "DT", dDT)
|
||||
dUeal = Math.Min(dUeal, m_MachiningList(m_nDragInd).m_dEndFreeLen - dDT - dCornerSafety)
|
||||
End If
|
||||
' Modifica della lavorazione
|
||||
EgtSetCurrMachining(nOperId)
|
||||
Dim dAddLen As Double = 0
|
||||
EgtGetMachiningParam(MCH_MP.ENDADDLEN, dAddLen)
|
||||
|
||||
If dAddLen - dOrigUeal < -10 * EPS_SMALL Then
|
||||
m_bDragging = False
|
||||
Return
|
||||
End If
|
||||
EgtSetMachiningParam(MCH_MP.ENDADDLEN, dAddLen + dUeal - dOrigUeal)
|
||||
EgtSetInfo(nOperId, INFO_MCH_USER_EAL, dUeal)
|
||||
Loop Until UpdateMachiningPreview(m_MachiningList(m_nDragInd).m_nId, True)
|
||||
End If
|
||||
' verifico interferenza
|
||||
EgtVerifyMachining(m_MachiningList(m_nDragInd).m_nId, m_MachiningList(m_nDragInd).m_nInterf)
|
||||
ColorMachining(m_MachiningList(m_nDragInd))
|
||||
ColorNumberArrow(m_nDragInd)
|
||||
' Aggiorno visualizzazione
|
||||
EgtDraw()
|
||||
m_bModified = True
|
||||
' Aggiorno punto e stato di drag
|
||||
m_ptDragPrev = ptCurr
|
||||
m_bDragging = False
|
||||
End Sub
|
||||
|
||||
Private Sub OnMyMouseUpScene(sender As Object, e As System.Windows.Forms.MouseEventArgs) Handles m_CurrProjPage.OnMouseUpScene
|
||||
' Verifico di essere il gestore attivo e non in modalità sola visualizzazione
|
||||
If Not m_bActive OrElse m_bShow Then Return
|
||||
' Se drag in corso
|
||||
If m_nDragInd >= 0 Then
|
||||
m_nDragInd = -1
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub AddPauseText(ByRef sName As String)
|
||||
sName &= " " & EgtMsg(MSG_SPLITPAGEUC + 32) ' Pausa
|
||||
End Sub
|
||||
@@ -180,11 +399,16 @@ Public Class SplitPageUC
|
||||
|
||||
Private Sub MachiningLsBx_SelectionChanged(sender As Object, e As SelectionChangedEventArgs) Handles MachiningLsBx.SelectionChanged
|
||||
If MachiningLsBx.SelectedItems.Count = 0 Then Return
|
||||
If MachiningLsBx.SelectedItems.Count = 1 Then m_bAreHomogeneous = True
|
||||
' creo lista ordinata dei selezionati
|
||||
Dim ItemList As New List(Of NameIdLsBxItem)
|
||||
For Each Item As NameIdLsBxItem In MachiningLsBx.SelectedItems
|
||||
ItemList.Add(Item)
|
||||
Next
|
||||
|
||||
' verifico che le lavorazioni siano dello stesso tipo
|
||||
VerifyHomogenousMachining(ItemList)
|
||||
|
||||
ItemList.Sort(Function(x, y) Comparer(Of Integer).Default.Compare(m_ItemList.IndexOf(x), m_ItemList.IndexOf(y)))
|
||||
' verifico che siano contigui
|
||||
Dim bContigus As Boolean = False
|
||||
@@ -287,8 +511,14 @@ Public Class SplitPageUC
|
||||
EgtDraw()
|
||||
' Imposto flag di modifica
|
||||
m_bModified = True
|
||||
' Abilitazione bottone Next
|
||||
EnableButtons()
|
||||
|
||||
' recupero l'elenco degli elementi selezionati
|
||||
Dim ItemList As New List(Of NameIdLsBxItem)
|
||||
For Each Item As NameIdLsBxItem In MachiningLsBx.SelectedItems
|
||||
ItemList.Add(Item)
|
||||
Next
|
||||
|
||||
VerifyHomogenousMachining(ItemList)
|
||||
End Sub
|
||||
|
||||
Private Sub AllOnBtn_Click(sender As Object, e As RoutedEventArgs) Handles AllOnBtn.Click
|
||||
@@ -772,26 +1002,37 @@ Public Class SplitPageUC
|
||||
bFirstInd = False
|
||||
End If
|
||||
' ------------------ FINE PREPARAZIONE TASTIERINO VIRTUALE ------------------
|
||||
Dim bRepeat As Boolean = False
|
||||
Do
|
||||
' Se c'è limite alla lunghezza libera
|
||||
If m_MachiningList(nI).m_dStartFreeLen < FREELEN_INF Then
|
||||
' Recupero sicurezza in corner interno
|
||||
Dim dCornerSafety As Double = Math.Max(GetPrivateProfileDouble(S_MACH_NEST, K_MACH_SAFE_LEN_INTCORNER, 1, m_MainWindow.GetMachIniFile()), 10 * EPS_SMALL)
|
||||
' Recupero lunghezza baffo del taglio
|
||||
Dim nPvId As Integer = GDB_ID.NULL
|
||||
EgtGetInfo(EgtGetFirstNameInGroup(nOperId, NAME_PREVIEW), INFO_PV_ONPART_ID, nPvId)
|
||||
Dim dDT As Double = 0
|
||||
EgtGetInfo(EgtGetFirstGroupInGroup(nPvId), "DT", dDT)
|
||||
dUsal = Math.Min(dUsal, m_MachiningList(nI).m_dStartFreeLen - dDT - dCornerSafety)
|
||||
End If
|
||||
' Modifica della lavorazione
|
||||
EgtSetCurrMachining(nOperId)
|
||||
Dim dAddLen As Double = 0
|
||||
EgtGetMachiningParam(MCH_MP.STARTADDLEN, dAddLen)
|
||||
' verifico che non sia sull'angolo interno (altrimenti vieto la modifica)
|
||||
If dAddLen - dOrigUsal < -10 * EPS_SMALL Then
|
||||
Return
|
||||
End If
|
||||
EgtSetMachiningParam(MCH_MP.STARTADDLEN, dAddLen + dUsal - dOrigUsal)
|
||||
EgtSetInfo(nOperId, INFO_MCH_USER_SAL, dUsal)
|
||||
bRepeat = Not UpdateMachiningPreview(m_MachiningList(nI).m_nId, True)
|
||||
If bRepeat Then
|
||||
EgtSetMachiningParam(MCH_MP.STARTADDLEN, dOrigUsal)
|
||||
EgtSetInfo(nOperId, INFO_MCH_USER_SAL, dOrigUsal)
|
||||
dUsal = dOrigUsal
|
||||
End If
|
||||
Loop Until Not bRepeat
|
||||
|
||||
' Se c'è limite alla lunghezza libera
|
||||
If m_MachiningList(nI).m_dStartFreeLen < FREELEN_INF Then
|
||||
' Recupero sicurezza in corner interno
|
||||
Dim dCornerSafety As Double = Math.Max(GetPrivateProfileDouble(S_MACH_NEST, K_MACH_SAFE_LEN_INTCORNER, 1, m_MainWindow.GetMachIniFile()), 10 * EPS_SMALL)
|
||||
' Recupero lunghezza baffo del taglio
|
||||
Dim nPvId As Integer = GDB_ID.NULL
|
||||
EgtGetInfo(EgtGetFirstNameInGroup(nOperId, NAME_PREVIEW), INFO_PV_ONPART_ID, nPvId)
|
||||
Dim dDT As Double = 0
|
||||
EgtGetInfo(EgtGetFirstGroupInGroup(nPvId), "DT", dDT)
|
||||
dUsal = Math.Min(dUsal, m_MachiningList(nI).m_dStartFreeLen - dDT - dCornerSafety)
|
||||
End If
|
||||
' Modifica della lavorazione
|
||||
EgtSetCurrMachining(nOperId)
|
||||
Dim dAddLen As Double = 0
|
||||
EgtGetMachiningParam(MCH_MP.STARTADDLEN, dAddLen)
|
||||
If dAddLen - dOrigUsal < -10 * EPS_SMALL Then Return
|
||||
EgtSetMachiningParam(MCH_MP.STARTADDLEN, dAddLen + dUsal - dOrigUsal)
|
||||
EgtSetInfo(nOperId, INFO_MCH_USER_SAL, dUsal)
|
||||
UpdateMachiningPreview(m_MachiningList(nI).m_nId, True)
|
||||
' verifico interferenza
|
||||
EgtVerifyMachining(m_MachiningList(nI).m_nId, m_MachiningList(nI).m_nInterf)
|
||||
ColorMachining(m_MachiningList(nI))
|
||||
@@ -903,7 +1144,7 @@ Public Class SplitPageUC
|
||||
' Recupero la lavorazione corrente
|
||||
If m_CurrFirstInd = -1 Then Return
|
||||
Dim bGenModif As Boolean = False
|
||||
For Index As integer = m_CurrFirstInd To m_CurrLastInd
|
||||
For Index As Integer = m_CurrFirstInd To m_CurrLastInd
|
||||
Dim nI As Integer = m_ItemList(Index).Ind
|
||||
Dim nOperId As Integer = m_MachiningList(nI).m_nId
|
||||
Dim nMachiningType As Integer = EgtGetOperationType(nOperId)
|
||||
@@ -924,26 +1165,38 @@ Public Class SplitPageUC
|
||||
bFirstInd = False
|
||||
End If
|
||||
' ------------------ FINE PREPARAZIONE TASTIERINO VIRTUALE ------------------
|
||||
Dim bRepeat As Boolean = False
|
||||
Do
|
||||
' Se c'è limite alla lunghezza libera
|
||||
If m_MachiningList(nI).m_dEndFreeLen < FREELEN_INF Then
|
||||
' Recupero sicurezza in corner interno
|
||||
Dim dCornerSafety As Double = Math.Max(GetPrivateProfileDouble(S_MACH_NEST, K_MACH_SAFE_LEN_INTCORNER, 1, m_MainWindow.GetMachIniFile()), 10 * EPS_SMALL)
|
||||
' Recupero lunghezza baffo del taglio
|
||||
Dim nPvId As Integer = GDB_ID.NULL
|
||||
EgtGetInfo(EgtGetFirstNameInGroup(nOperId, NAME_PREVIEW), INFO_PV_ONPART_ID, nPvId)
|
||||
Dim dDT As Double = 0
|
||||
EgtGetInfo(EgtGetFirstGroupInGroup(nPvId), "DT", dDT)
|
||||
dUeal = Math.Min(dUeal, m_MachiningList(nI).m_dEndFreeLen - dDT - dCornerSafety)
|
||||
End If
|
||||
|
||||
' Modifica della lavorazione
|
||||
EgtSetCurrMachining(nOperId)
|
||||
Dim dAddLen As Double = 0
|
||||
EgtGetMachiningParam(MCH_MP.ENDADDLEN, dAddLen)
|
||||
If dAddLen - dOrigUeal < -10 * EPS_SMALL Then
|
||||
Return
|
||||
End If
|
||||
EgtSetMachiningParam(MCH_MP.ENDADDLEN, dAddLen + dUeal - dOrigUeal)
|
||||
EgtSetInfo(nOperId, INFO_MCH_USER_EAL, dUeal)
|
||||
UpdateMachiningPreview(m_MachiningList(nI).m_nId, True)
|
||||
bRepeat = Not UpdateMachiningPreview(m_MachiningList(nI).m_nId, True)
|
||||
If bRepeat Then
|
||||
EgtSetMachiningParam(MCH_MP.ENDADDLEN, dOrigUeal)
|
||||
EgtSetInfo(nOperId, INFO_MCH_USER_EAL, dOrigUeal)
|
||||
dUeal = dOrigUeal
|
||||
End If
|
||||
Loop Until Not bRepeat
|
||||
|
||||
' Se c'è limite alla lunghezza libera
|
||||
If m_MachiningList(nI).m_dEndFreeLen < FREELEN_INF Then
|
||||
' Recupero sicurezza in corner interno
|
||||
Dim dCornerSafety As Double = Math.Max(GetPrivateProfileDouble(S_MACH_NEST, K_MACH_SAFE_LEN_INTCORNER, 1, m_MainWindow.GetMachIniFile()), 10 * EPS_SMALL)
|
||||
' Recupero lunghezza baffo del taglio
|
||||
Dim nPvId As Integer = GDB_ID.NULL
|
||||
EgtGetInfo(EgtGetFirstNameInGroup(nOperId, NAME_PREVIEW), INFO_PV_ONPART_ID, nPvId)
|
||||
Dim dDT As Double = 0
|
||||
EgtGetInfo(EgtGetFirstGroupInGroup(nPvId), "DT", dDT)
|
||||
dUeal = Math.Min(dUeal, m_MachiningList(nI).m_dEndFreeLen - dDT - dCornerSafety)
|
||||
End If
|
||||
' Modifica della lavorazione
|
||||
EgtSetCurrMachining(nOperId)
|
||||
Dim dAddLen As Double = 0
|
||||
EgtGetMachiningParam(MCH_MP.ENDADDLEN, dAddLen)
|
||||
If dAddLen - dOrigUeal < -10 * EPS_SMALL Then Return
|
||||
EgtSetMachiningParam(MCH_MP.ENDADDLEN, dAddLen + dUeal - dOrigUeal)
|
||||
EgtSetInfo(nOperId, INFO_MCH_USER_EAL, dUeal)
|
||||
UpdateMachiningPreview(m_MachiningList(nI).m_nId, True)
|
||||
' verifico interferenza
|
||||
EgtVerifyMachining(m_MachiningList(nI).m_nId, m_MachiningList(nI).m_nInterf)
|
||||
ColorMachining(m_MachiningList(nI))
|
||||
@@ -1027,40 +1280,40 @@ Public Class SplitPageUC
|
||||
For Index As Integer = m_CurrFirstInd To m_CurrLastInd
|
||||
Dim nI As Integer = m_ItemList(Index).Ind
|
||||
' Si possono invertire solo i tagli di lama
|
||||
If m_MachiningList( nI).m_nType <> MCH_OY.SAWING Then Continue For
|
||||
If m_MachiningList(nI).m_nType <> MCH_OY.SAWING Then Continue For
|
||||
' Non si possono invertire i tagli di lama inclinati
|
||||
If Math.Abs( m_MachiningList(nI).m_dSideAng) > 0.1 Then Continue For
|
||||
If Math.Abs(m_MachiningList(nI).m_dSideAng) > 0.1 Then Continue For
|
||||
' Se abilitata inversione automatica e quindi non invertito
|
||||
If m_MachiningList( nI).m_bEnableInvert Then
|
||||
If m_MachiningList(nI).m_bEnableInvert Then
|
||||
' Inverto e disabilito inversione automatica
|
||||
If CamAuto.InvertVerticalCut( m_MachiningList( nI).m_nId) Then
|
||||
m_MachiningList( nI).m_bInvert = True
|
||||
m_MachiningList( nI).m_vtDir = - m_MachiningList( nI).m_vtDir
|
||||
m_MachiningList( nI).m_bEnableInvert = False
|
||||
SwapStartEndData( nI)
|
||||
ResetEnableInvert( m_MachiningList( nI).m_nEntId)
|
||||
EgtErase( m_MachiningList( nI).m_nArrId)
|
||||
NumberDirectionMachining( nI, False)
|
||||
If CamAuto.InvertVerticalCut(m_MachiningList(nI).m_nId) Then
|
||||
m_MachiningList(nI).m_bInvert = True
|
||||
m_MachiningList(nI).m_vtDir = -m_MachiningList(nI).m_vtDir
|
||||
m_MachiningList(nI).m_bEnableInvert = False
|
||||
SwapStartEndData(nI)
|
||||
ResetEnableInvert(m_MachiningList(nI).m_nEntId)
|
||||
EgtErase(m_MachiningList(nI).m_nArrId)
|
||||
NumberDirectionMachining(nI, False)
|
||||
EgtDraw()
|
||||
End If
|
||||
' se altrimenti disabilitata inversione automatica e invertito
|
||||
ElseIf m_MachiningList( nI).m_bInvert Then
|
||||
' se altrimenti disabilitata inversione automatica e invertito
|
||||
ElseIf m_MachiningList(nI).m_bInvert Then
|
||||
' Tolgo inversione e lascio disabilitazione inv. autom.
|
||||
If CamAuto.InvertVerticalCut( m_MachiningList( nI).m_nId) Then
|
||||
m_MachiningList( nI).m_bInvert = False
|
||||
m_MachiningList( nI).m_vtDir = - m_MachiningList( nI).m_vtDir
|
||||
SwapStartEndData( nI)
|
||||
EgtErase( m_MachiningList( nI).m_nArrId)
|
||||
NumberDirectionMachining( nI, False)
|
||||
If CamAuto.InvertVerticalCut(m_MachiningList(nI).m_nId) Then
|
||||
m_MachiningList(nI).m_bInvert = False
|
||||
m_MachiningList(nI).m_vtDir = -m_MachiningList(nI).m_vtDir
|
||||
SwapStartEndData(nI)
|
||||
EgtErase(m_MachiningList(nI).m_nArrId)
|
||||
NumberDirectionMachining(nI, False)
|
||||
EgtDraw()
|
||||
End If
|
||||
' altrimenti disabilitata inversione automatica e non invertito
|
||||
' altrimenti disabilitata inversione automatica e non invertito
|
||||
Else
|
||||
' Abilito inversione automatica e lascio non invertito
|
||||
m_MachiningList( nI).m_bEnableInvert = True
|
||||
SetEnableInvert( m_MachiningList( nI).m_nEntId)
|
||||
EgtErase( m_MachiningList( nI).m_nArrId)
|
||||
NumberDirectionMachining( nI, False)
|
||||
m_MachiningList(nI).m_bEnableInvert = True
|
||||
SetEnableInvert(m_MachiningList(nI).m_nEntId)
|
||||
EgtErase(m_MachiningList(nI).m_nArrId)
|
||||
NumberDirectionMachining(nI, False)
|
||||
EgtDraw()
|
||||
End If
|
||||
Next
|
||||
@@ -1122,7 +1375,7 @@ Public Class SplitPageUC
|
||||
' Se fase corrente è la prima, imposto partenza normale
|
||||
If m_nCurrPhase = 1 Then
|
||||
m_MainWindow.m_CurrentProjectPageUC.ResetProjectNcRestart()
|
||||
' Altrimenti, imposto la ripartenza dalla fase corrente
|
||||
' Altrimenti, imposto la ripartenza dalla fase corrente
|
||||
Else
|
||||
m_MainWindow.m_CurrentProjectPageUC.SetProjectNcRestart(m_nCurrPhase)
|
||||
m_MainWindow.m_CurrentProjectPageUC.SetInfoMessage(EgtMsg(MSG_SPLITPAGEUC + 19) & " (" & m_nCurrPhase.ToString() & ")")
|
||||
@@ -1141,7 +1394,7 @@ Public Class SplitPageUC
|
||||
' Aggiorno le lavorazioni (eliminato sort per lasciare ordine immutato)
|
||||
If m_MainWindow.m_CurrentMachine.WaterJettingActive Then ResetAllMachinings()
|
||||
m_MainWindow.m_CurrentProjectPageUC.SetOrderMachiningFlag()
|
||||
If m_MainWindow.m_CurrentMachine.WaterJettingActive Then
|
||||
If m_MainWindow.m_CurrentMachine.WaterJettingActive Then
|
||||
Dim bModif As Boolean = TestAllMachiningsForStrict()
|
||||
If bModif Then m_MainWindow.m_CurrentProjectPageUC.SetWarningMessage(EgtMsg(90321)) 'Ridotte alcune lavorazioni per evitare interferenze
|
||||
End If
|
||||
@@ -1151,8 +1404,13 @@ Public Class SplitPageUC
|
||||
HideAllMachinings()
|
||||
' Preparo la lista delle lavorazioni e le disabilito
|
||||
CalculateSplitMachList(m_nCurrPhase, m_MachiningList)
|
||||
m_nCountSawing = 0
|
||||
m_nCountWaterjetting = 0
|
||||
m_nCountOtherMachining = 0
|
||||
For nI As Integer = 0 To m_MachiningList.Count() - 1
|
||||
m_MachiningList(nI).m_bEnabled = False
|
||||
' conto il numero di tipi di lavorazioni
|
||||
CountMachiningType(m_MachiningList(nI), m_nCountSawing, m_nCountWaterjetting, m_nCountOtherMachining)
|
||||
Next
|
||||
' Aggiorno visualizzazione delle lavorazioni
|
||||
EgtEmptyGroup(m_nNbrGrpId)
|
||||
@@ -1171,6 +1429,7 @@ Public Class SplitPageUC
|
||||
End Sub
|
||||
|
||||
Private Sub SplitPageUC_Unloaded(sender As Object, e As EventArgs) Handles Me.Unloaded
|
||||
m_bActive = False
|
||||
m_MainWindow.m_CurrentProjectPageUC.ClearMessage()
|
||||
ExitSplit(Not m_bToNext)
|
||||
EgtDraw()
|
||||
@@ -1338,6 +1597,86 @@ Public Class SplitPageUC
|
||||
ModifEndBtn.IsEnabled = Not m_bShow
|
||||
InvertBtn.IsEnabled = Not m_bShow
|
||||
PauseBtn.IsEnabled = Not m_bShow And m_MainWindow.m_CurrentMachine.bEnablePause
|
||||
|
||||
' nascondo i comandi che non devono essere visualizzati in funzione delle lavorazioni attive
|
||||
If m_nCountSawing = 0 And (m_nCountWaterjetting > 0 Or m_nCountOtherMachining) Then
|
||||
VisibilityButtonFromMachinig(MCH_OY.WATERJETTING)
|
||||
Else
|
||||
VisibilityButtonFromMachinig(MCH_OY.SAWING)
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub VerifyHomogenousMachining(ItemList As List(Of NameIdLsBxItem))
|
||||
If IsNothing(ItemList) OrElse ItemList.Count = 0 Then
|
||||
m_MainWindow.m_CurrentProjectPageUC.ClearMessage()
|
||||
Return
|
||||
End If
|
||||
Dim nSawing As Integer = 0
|
||||
Dim nWaterjetting As Integer = 0
|
||||
Dim nOtherMachining As Integer = 0
|
||||
' conto il numero di tipi di lavprazioni
|
||||
For Each Item As NameIdLsBxItem In ItemList
|
||||
If Item.Type = MCH_OY.SAWING Then
|
||||
nSawing += 1
|
||||
ElseIf Item.Type = MCH_OY.WATERJETTING Then
|
||||
nWaterjetting += 1
|
||||
Else
|
||||
nOtherMachining += 1
|
||||
End If
|
||||
Next
|
||||
' verifico se le lavorazioni sono omeogenee
|
||||
If nSawing > 0 And (nWaterjetting > 0 Or nOtherMachining > 0) Then
|
||||
m_bAreHomogeneous = False
|
||||
VisibilityButtonFromMachinig(MCH_OY.SAWING)
|
||||
ElseIf nSawing = 0 And nOtherMachining > 0 And nWaterjetting > 0 Then
|
||||
m_bAreHomogeneous = False
|
||||
VisibilityButtonFromMachinig(MCH_OY.WATERJETTING)
|
||||
Else
|
||||
VisibilityButtonFromMachinig(ItemList(0).Type)
|
||||
m_bAreHomogeneous = True
|
||||
End If
|
||||
' eventualmente stampo messaggio
|
||||
If Not m_bAreHomogeneous Then
|
||||
m_MainWindow.m_CurrentProjectPageUC.ClearMessage()
|
||||
m_MainWindow.m_CurrentProjectPageUC.SetWarningMessage("Lavorazioni non omogenee")
|
||||
Else
|
||||
m_MainWindow.m_CurrentProjectPageUC.ClearMessage()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub VisibilityButtonFromMachinig(ByVal Type As Integer)
|
||||
If Type <> MCH_OY.SAWING Then
|
||||
CutBtn.Visibility = Visibility.Hidden
|
||||
CutStartBtn.Visibility = Visibility.Hidden
|
||||
CutEndBtn.Visibility = Visibility.Hidden
|
||||
|
||||
OutCenStartBtn.Visibility = Visibility.Hidden
|
||||
OutCenEndBtn.Visibility = Visibility.Hidden
|
||||
InvertBtn.Visibility = Visibility.Hidden
|
||||
PauseBtn.Visibility = Visibility.Hidden
|
||||
AllOutStartBtn.Visibility = Visibility.Hidden
|
||||
AllCenStartBtn.Visibility = Visibility.Hidden
|
||||
AllOutEndBtn.Visibility = Visibility.Hidden
|
||||
AllCenEndBtn.Visibility = Visibility.Hidden
|
||||
AllExtendBtn.Visibility = Visibility.Hidden
|
||||
AllReduceBtn.Visibility = Visibility.Hidden
|
||||
Else
|
||||
CutBtn.Visibility = Visibility.Visible
|
||||
CutStartBtn.Visibility = Visibility.Visible
|
||||
CutEndBtn.Visibility = Visibility.Visible
|
||||
|
||||
OutCenStartBtn.Visibility = Visibility.Visible
|
||||
OutCenEndBtn.Visibility = Visibility.Visible
|
||||
InvertBtn.Visibility = Visibility.Visible
|
||||
PauseBtn.Visibility = Visibility.Visible
|
||||
AllOutStartBtn.Visibility = Visibility.Visible
|
||||
AllCenStartBtn.Visibility = Visibility.Visible
|
||||
AllOutEndBtn.Visibility = Visibility.Visible
|
||||
AllCenEndBtn.Visibility = Visibility.Visible
|
||||
AllExtendBtn.Visibility = Visibility.Visible
|
||||
AllReduceBtn.Visibility = Visibility.Visible
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Function ModifyOtherLeadIn(nI As Integer, nLiOthType As Integer) As Boolean
|
||||
@@ -1572,6 +1911,7 @@ Public Class SplitPageUC
|
||||
Private m_nInd As Integer
|
||||
Private m_sName As String
|
||||
Private m_bIsActive As Boolean
|
||||
Private m_nType As Integer
|
||||
|
||||
Public Property Ind As Integer
|
||||
Get
|
||||
@@ -1606,10 +1946,20 @@ Public Class SplitPageUC
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Sub New(Name As String, Ind As Integer, bIsActive As Boolean)
|
||||
Public Property Type As Integer
|
||||
Get
|
||||
Return m_nType
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
m_nType = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Sub New(Name As String, Ind As Integer, bIsActive As Boolean, nType As Integer)
|
||||
Me.m_sName = Name
|
||||
Me.m_nInd = Ind
|
||||
Me.m_bIsActive = bIsActive
|
||||
Me.m_nType = nType
|
||||
End Sub
|
||||
|
||||
Public Sub NotifyPropertyChanged(propName As String)
|
||||
|
||||
@@ -67,6 +67,8 @@ Module ConstGen
|
||||
Public Const MACHININGS_DIR As String = "Machinings"
|
||||
' Nome file Dati delle lucidature
|
||||
Public Const KITS_FILE As String = "Kits.data"
|
||||
' Nome file Dati per waterJet
|
||||
Public Const WATERJETDB_FILE As String = "WaterjetDB.data"
|
||||
|
||||
' File dei pezzi rovinati
|
||||
Public Const CURR_RUINED_EPL As String = "RuinedParts.epl"
|
||||
@@ -203,6 +205,7 @@ Module ConstGen
|
||||
Public Const INFO_DEPTH As String = "Depth"
|
||||
Public Const INFO_WIDTH As String = "Width"
|
||||
Public Const INFO_DEPTH2 As String = "Depth2"
|
||||
Public CONST INFO_AGG2 As String = "Agg2"
|
||||
' Info in entità da tagliare per taglio ristretto
|
||||
Public Const INFO_STRICT As String = "Strict"
|
||||
' Info in entità da tagliare per angolo di lato e tallone
|
||||
@@ -334,6 +337,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 +348,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)
|
||||
|
||||
@@ -105,6 +105,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"
|
||||
@@ -139,6 +148,10 @@ 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 = "DragRettangle"
|
||||
|
||||
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"
|
||||
|
||||
@@ -37,7 +37,9 @@
|
||||
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"
|
||||
@@ -46,6 +48,7 @@
|
||||
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"
|
||||
@@ -107,6 +110,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 +209,7 @@
|
||||
Public Const K_MACH_CUTFSEVENABLE As String = "CutFsevEnable"
|
||||
Public Const K_MACH_CUTFSEVLEN As String = "CutFsevLen"
|
||||
Public Const K_MACH_CUTFSEVPERC As String = "CutFsevPerc"
|
||||
Public Const K_USELASERORIGIN As String = "UseLaserOrigin"
|
||||
' DrillMillC90
|
||||
' CutLongDxSx
|
||||
' AngRotMultiCut
|
||||
@@ -272,9 +277,11 @@
|
||||
Public Const K_CURRDRIPSAWING As String = "CurrDripSawing"
|
||||
Public Const K_CURRDRIPDRILLING As String = "CurrDripDrilling"
|
||||
Public Const K_CURRWATERJETTING As String = "CurrWaterJetting"
|
||||
Public Const K_CURRWATERJETTINGQUALITY As String = "CurrWaterJettingQualilty"
|
||||
|
||||
Public Const S_MATERIALS As String = "Materials"
|
||||
Public Const K_CURRMATERIAL As String = "CurrMaterial"
|
||||
Public Const K_MATERIAL As String = "Material"
|
||||
Public Const K_FROMDBWATERJET As String = "FromDBWaterJet"
|
||||
|
||||
End Module
|
||||
|
||||
@@ -475,7 +475,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
|
||||
|
||||
@@ -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,7 +200,8 @@
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="5*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="4*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
@@ -198,22 +219,27 @@
|
||||
<!--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"
|
||||
<!--Comando Remote-->
|
||||
<ToggleButton Name="RemoteBtn" Grid.Column="5"
|
||||
Style="{DynamicResource OmagCut_GradientYellowIconToggleButton}">
|
||||
<!--<Image Source="{DynamicResource VacuumImg}" Style="{StaticResource OmagCut_ScaleButtonIcon}"/>-->
|
||||
</ToggleButton>
|
||||
<Button Name="ManualModeBtn" Grid.Column="8"
|
||||
Style="{DynamicResource OmagCut_YellowGradientYellowIconButton}">
|
||||
<Image Source="{DynamicResource ManualImg}" Style="{StaticResource OmagCut_ScaleButtonIcon}"/>
|
||||
</Button>
|
||||
|
||||
@@ -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,49 @@ 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
|
||||
|
||||
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"
|
||||
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 +385,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 +417,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 +447,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 +475,44 @@ 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
|
||||
|
||||
'------------------NUOVI BOTTONI PER GESTIONE JOYSTICK-------------------------------------------------
|
||||
Private Sub MachViewModeBtn_Click(sender As Object, e As RoutedEventArgs) Handles MachViewModeBtn.Click
|
||||
If m_bShowMachine Then
|
||||
@@ -462,124 +570,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>
|
||||
|
||||
|
||||
@@ -79,8 +79,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 +89,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 +444,8 @@ Public Class FlatteningCut
|
||||
StringToLen(WidthTxBx.Text, dWidth)
|
||||
' Recupero lo spessore della lama corrente
|
||||
EgtTdbSetCurrTool(m_MainWindow.m_CurrentMachine.sCurrSaw)
|
||||
Dim dThick As Double = 0
|
||||
EgtTdbGetCurrToolParam(MCH_TP.THICK, dThick)
|
||||
Dim dThick As Double = GetFootPrintTool()
|
||||
'EgtTdbGetCurrToolParam(MCH_TP.THICK, dThick)
|
||||
' La larghezza della spianatura nono può essere inferiore allo spessore della lama
|
||||
m_dWid = Math.Max(dWidth, dThick)
|
||||
WidthTxBx.Text = LenToString(m_dWid, 2)
|
||||
@@ -472,8 +472,8 @@ Public Class FlatteningCut
|
||||
|
||||
Private Sub OverlapTxBx_EgtClosed(sender As Object, e As EventArgs) Handles OverlapTxBx.EgtClosed
|
||||
' Recupero spessore della lama correntemente attiva
|
||||
Dim dThick As Double = 0
|
||||
EgtTdbGetCurrToolParam(MCH_TP.THICK, dThick)
|
||||
Dim dThick As Double = GetFootPrintTool()
|
||||
'EgtTdbGetCurrToolParam(MCH_TP.THICK, dThick)
|
||||
' Verifico che la sovrapposizione non sia superiore allo spessore della lama (meno 1mm di offset)
|
||||
Dim dOverlap As Double = 0
|
||||
Const MIN_OFFSET As Double = 1.0
|
||||
@@ -612,6 +612,22 @@ Public Class FlatteningCut
|
||||
m_MainWindow.m_DirectCutPageUC.LeftButtonGrid.Children.Remove(Me)
|
||||
End Sub
|
||||
|
||||
' ricavo l'ingombro di lavorazione in funzione dell'utensile selezionato
|
||||
Private Function GetFootPrintTool() As Double
|
||||
Dim dFootPrint As Double = 0
|
||||
' verifico quale lavorazione è attiva
|
||||
If Not String.IsNullOrEmpty(m_MainWindow.m_CurrentMachine.sCurrSawing) Then
|
||||
EgtTdbGetCurrToolParam(MCH_TP.THICK, dFootPrint)
|
||||
ElseIf Not String.IsNullOrEmpty(m_MainWindow.m_CurrentMachine.sCurrMilling) Then
|
||||
Dim sCurrMill = m_MainWindow.m_CurrentMachine.sCurrMill
|
||||
GetDrillFromDrilling(sCurrMill, m_MainWindow.m_CurrentMachine.sCurrMilling)
|
||||
' recupero informazioni della fresa in uso
|
||||
EgtTdbSetCurrTool(sCurrMill)
|
||||
EgtTdbGetCurrToolParam(MCH_TP.DIAM, dFootPrint)
|
||||
End If
|
||||
Return dFootPrint
|
||||
End Function
|
||||
|
||||
Private Function CreateFlatteningCut() As Boolean
|
||||
' Verifico sia definito il punto iniziale e il grezzo
|
||||
If Not m_bPointP1Ok Or Not m_bRawOk Then
|
||||
@@ -670,22 +686,21 @@ Public Class FlatteningCut
|
||||
RemoveFinalHome()
|
||||
End If
|
||||
UpdateSimulOkBtn()
|
||||
|
||||
|
||||
|
||||
Return m_bCutOk
|
||||
End Function
|
||||
|
||||
Private Function MultiplyCut(nLayerId As Integer, nCutId As Integer) As Boolean
|
||||
' Recupero spessore della lama correntemente attiva
|
||||
Dim dThick As Double = 0
|
||||
EgtTdbGetCurrToolParam(MCH_TP.THICK, dThick)
|
||||
' Recupero spessore della lama (utensile) correntemente attiva
|
||||
Dim dThick As Double = GetFootPrintTool()
|
||||
If dThick = 0 Then Return False
|
||||
|
||||
' Imposto angolo di rotazione a seconda del lato dei tagli
|
||||
Dim dRotAngO As Double = If(SideChBx.IsChecked(), -90, 90)
|
||||
' Definisco vettore di spostamento
|
||||
Dim vtDelta As Vector3d
|
||||
vtDelta = Vector3d.FromPolar(1, m_dAngO)
|
||||
vtDelta.Rotate(Vector3d.Z_AX, dRotAngO)
|
||||
|
||||
' Calcolo numero di iterazioni necessarie a coprire l'area impostata e lunghezza vettore delta
|
||||
Dim nStepNum As Integer
|
||||
Dim dDelta As Double
|
||||
|
||||
@@ -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>
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -121,6 +121,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))
|
||||
@@ -548,7 +550,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 +564,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 +572,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")
|
||||
@@ -602,6 +608,15 @@ 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
|
||||
|
||||
'-----------------------------------------------------------------------------------------------------------------
|
||||
|
||||
Private Function GetToggleButton(ByVal nIndex As Integer) As Primitives.ToggleButton
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
@@ -77,6 +78,7 @@ Public Class AlzFrontUC
|
||||
' nome dei parametri condivisi
|
||||
Parameter1TxBl.Text = "Altezza"
|
||||
Parameter2TxBl.Text = "Delta angolo"
|
||||
Parameter5TxBl.Text = "Spessore"
|
||||
|
||||
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)
|
||||
|
||||
@@ -105,6 +105,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
|
||||
@@ -879,6 +882,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
|
||||
@@ -890,8 +896,6 @@ Public Class DrawPageUC
|
||||
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 +1018,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)
|
||||
@@ -1043,13 +1056,25 @@ Public Class DrawPageUC
|
||||
dNewArea += GeomCalc.GetPartArea(nId2)
|
||||
' Inserisco in parcheggio
|
||||
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)
|
||||
|
||||
@@ -576,6 +576,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 +619,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 +651,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 +683,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
|
||||
|
||||
@@ -24,7 +24,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 +163,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 +252,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)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -75,10 +75,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
|
||||
@@ -179,6 +181,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 +281,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
|
||||
@@ -497,11 +503,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 +573,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
|
||||
@@ -738,6 +755,10 @@ Public Class SideAngleUC
|
||||
vJoint.Add(False)
|
||||
End If
|
||||
Next
|
||||
|
||||
' se non riesco a generare un elenco allora esco
|
||||
If vJoint.Count < 1 Then Return
|
||||
|
||||
If vJoint(0) And vJoint(vJoint.Count - 1) Then
|
||||
bJointStart = True
|
||||
End If
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -10,27 +10,27 @@
|
||||
<!-- Definizione della AlarmsPage -->
|
||||
<Border Style="{DynamicResource OmagCut_PageBorder}" >
|
||||
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="4*"/>
|
||||
<ColumnDefinition Width="4*"/>
|
||||
<ColumnDefinition Width="4*"/>
|
||||
<ColumnDefinition Width="3*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="2*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
|
||||
<RowDefinition Height="1.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="4*"/>
|
||||
<ColumnDefinition Width="4*"/>
|
||||
<ColumnDefinition Width="4*"/>
|
||||
<ColumnDefinition Width="3*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="2*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
|
||||
<!--Costruisco le riche per la colonna 3-->
|
||||
<RowDefinition Height="1.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<!--Costruisco le riche per la colonna 3-->
|
||||
<Grid Grid.Column="2" Grid.RowSpan="9">
|
||||
<Grid.RowDefinitions>
|
||||
<!--GruopBox: taglio lama-->
|
||||
@@ -51,7 +51,7 @@
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="0.375*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
|
||||
<!--Parametri Taglio Lama: 5 Parametri-->
|
||||
<GroupBox Name="SawGpBx" Style="{DynamicResource OmagCut_GroupBox}" Grid.Column="2" Grid.RowSpan="4">
|
||||
<!--definizione della grigli ainterna-->
|
||||
@@ -92,8 +92,8 @@
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||
<CheckBox Name="PreCutExitChBx" Grid.Column="1" Grid.Row="4" Margin="10,0,10,0"
|
||||
Style="{StaticResource OmagCut_CheckBox_Single}"
|
||||
HorizontalAlignment="Right"/>
|
||||
|
||||
HorizontalAlignment="Right"/>
|
||||
|
||||
</Grid>
|
||||
|
||||
</GroupBox>
|
||||
@@ -200,7 +200,7 @@
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}" Margin="10,0,0,10" VerticalAlignment="Bottom" />
|
||||
<CheckBox Name="WjIntCutsChBx" Grid.Row="1" Grid.ColumnSpan="2" Style="{StaticResource OmagCut_CheckBox_Single}"
|
||||
HorizontalAlignment="Right" Margin="0,0,10,0"/>
|
||||
|
||||
|
||||
</Grid>
|
||||
</GroupBox>
|
||||
|
||||
@@ -218,78 +218,78 @@
|
||||
</GroupBox>
|
||||
|
||||
</Grid>
|
||||
|
||||
<Grid Grid.RowSpan="3">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1.75*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<GroupBox Name="SetUpGpBx" Grid.ColumnSpan="3" Grid.RowSpan="9"
|
||||
<Grid Grid.RowSpan="3">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1.75*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<GroupBox Name="SetUpGpBx" Grid.ColumnSpan="3" Grid.RowSpan="9"
|
||||
Style="{DynamicResource OmagCut_GroupBox}">
|
||||
|
||||
<Grid Name="CurrToolsGrid" Grid.ColumnSpan="2">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
<ColumnDefinition Width="3*"/>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid Name="CurrToolsGrid" Grid.ColumnSpan="2">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
<ColumnDefinition Width="3*"/>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<TextBlock Name="CurrSawTxBl" Grid.Column="0" Grid.Row="0" Grid.ColumnSpan="3"
|
||||
<TextBlock Name="CurrSawTxBl" Grid.Column="0" Grid.Row="0" Grid.ColumnSpan="3"
|
||||
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||
<ComboBox x:Name="CurrSawCmBx" Grid.Column="1" Grid.Row="1" Style="{DynamicResource OmagCut_ComboBox}">
|
||||
<ComboBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding}" Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</DataTemplate>
|
||||
</ComboBox.ItemTemplate>
|
||||
</ComboBox>
|
||||
<ComboBox x:Name="CurrSawCmBx" Grid.Column="1" Grid.Row="1" Style="{DynamicResource OmagCut_ComboBox}">
|
||||
<ComboBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding}" Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</DataTemplate>
|
||||
</ComboBox.ItemTemplate>
|
||||
</ComboBox>
|
||||
|
||||
<TextBlock Name="AuxiliaryToolTxBl" Grid.Column="0" Grid.Row="2" Grid.ColumnSpan="3"
|
||||
<TextBlock Name="AuxiliaryToolTxBl" Grid.Column="0" Grid.Row="2" Grid.ColumnSpan="3"
|
||||
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
|
||||
Visibility="Hidden"/>
|
||||
<ComboBox Name="AuxiliaryToolCmBx" Grid.Column="1" Grid.Row="3" Style="{StaticResource OmagCut_ComboBox}" Visibility="Hidden">
|
||||
<ComboBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding sName}" Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</DataTemplate>
|
||||
</ComboBox.ItemTemplate>
|
||||
</ComboBox>
|
||||
<ComboBox Name="AuxiliaryToolCmBx" Grid.Column="1" Grid.Row="3" Style="{StaticResource OmagCut_ComboBox}" Visibility="Hidden">
|
||||
<ComboBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding sName}" Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</DataTemplate>
|
||||
</ComboBox.ItemTemplate>
|
||||
</ComboBox>
|
||||
|
||||
<TextBlock Name="CurrDrillTxBl" Grid.Column="0" Grid.Row="4" Grid.ColumnSpan="3"
|
||||
<TextBlock Name="CurrDrillTxBl" Grid.Column="0" Grid.Row="4" Grid.ColumnSpan="3"
|
||||
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
|
||||
Visibility="Hidden"/>
|
||||
<ComboBox Name="CurrDrillCmBx" Grid.Column="1" Grid.Row="5" Style="{StaticResource OmagCut_ComboBox}" Visibility="Hidden">
|
||||
<ComboBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding}" Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</DataTemplate>
|
||||
</ComboBox.ItemTemplate>
|
||||
</ComboBox>
|
||||
<ComboBox Name="CurrDrillCmBx" Grid.Column="1" Grid.Row="5" Style="{StaticResource OmagCut_ComboBox}" Visibility="Hidden">
|
||||
<ComboBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding}" Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</DataTemplate>
|
||||
</ComboBox.ItemTemplate>
|
||||
</ComboBox>
|
||||
|
||||
<TextBlock Name="CurrMillTxBl" Grid.Column="0" Grid.Row="4" Grid.ColumnSpan="3"
|
||||
<TextBlock Name="CurrMillTxBl" Grid.Column="0" Grid.Row="4" Grid.ColumnSpan="3"
|
||||
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
|
||||
Visibility="Hidden"/>
|
||||
<ComboBox Name="CurrMillCmBx" Grid.Column="1" Grid.Row="5" Style="{StaticResource OmagCut_ComboBox}" Visibility="Hidden">
|
||||
<ComboBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding}" Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</DataTemplate>
|
||||
</ComboBox.ItemTemplate>
|
||||
</ComboBox>
|
||||
<ComboBox Name="CurrMillCmBx" Grid.Column="1" Grid.Row="5" Style="{StaticResource OmagCut_ComboBox}" Visibility="Hidden">
|
||||
<ComboBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding}" Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</DataTemplate>
|
||||
</ComboBox.ItemTemplate>
|
||||
</ComboBox>
|
||||
|
||||
<TextBlock Name="CurrCupWheelTxBl" Grid.Column="0" Grid.Row="4" Grid.ColumnSpan="3"
|
||||
<TextBlock Name="CurrCupWheelTxBl" Grid.Column="0" Grid.Row="4" Grid.ColumnSpan="3"
|
||||
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
|
||||
Visibility="Hidden"/>
|
||||
<ComboBox Name="CurrCupWheelCmBx" Grid.Column="1" Grid.Row="5" Style="{StaticResource OmagCut_ComboBox}" Visibility="Hidden">
|
||||
@@ -303,24 +303,24 @@
|
||||
<TextBlock Name="CurrWJetTxBl" Grid.Column="0" Grid.Row="4" Grid.ColumnSpan="3"
|
||||
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
|
||||
Visibility="Hidden"/>
|
||||
<ComboBox Name="CurrWJetCmBx" Grid.Column="1" Grid.Row="5" Style="{StaticResource OmagCut_ComboBox}" Visibility="Hidden">
|
||||
<ComboBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding}" Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</DataTemplate>
|
||||
</ComboBox.ItemTemplate>
|
||||
</ComboBox>
|
||||
<ComboBox Name="CurrWJetCmBx" Grid.Column="1" Grid.Row="5" Style="{StaticResource OmagCut_ComboBox}" Visibility="Hidden">
|
||||
<ComboBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding}" Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</DataTemplate>
|
||||
</ComboBox.ItemTemplate>
|
||||
</ComboBox>
|
||||
|
||||
<Button Name="SetUpBtn" Grid.Column="1" Grid.Row="3" Grid.RowSpan="2" Visibility="Hidden"
|
||||
<Button Name="SetUpBtn" Grid.Column="1" Grid.Row="3" Grid.RowSpan="2" Visibility="Hidden"
|
||||
Style="{DynamicResource OmagCut_YellowTextButton}"/>
|
||||
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
||||
</GroupBox>
|
||||
</GroupBox>
|
||||
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
||||
<!--<Grid Grid.Column="2" Grid.Row="2" Grid.RowSpan="6">
|
||||
<!--<Grid Grid.Column="2" Grid.Row="2" Grid.RowSpan="6">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition />
|
||||
@@ -424,96 +424,106 @@
|
||||
|
||||
</Grid>-->
|
||||
|
||||
<GroupBox Name="MaterialsGpBx" Style="{DynamicResource OmagCut_GroupBox}" Grid.Column="0"
|
||||
<GroupBox Name="MaterialsGpBx" Style="{DynamicResource OmagCut_GroupBox}" Grid.Column="0"
|
||||
Grid.Row="3" Grid.ColumnSpan="1" Grid.RowSpan="5">
|
||||
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="2.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="2.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<ListBox Name="MaterialsLstBx" Grid.RowSpan="2">
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding sName}" Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</DataTemplate>
|
||||
</ListBox.ItemTemplate>
|
||||
</ListBox>
|
||||
<ListBox Name="MaterialsLstBx" Grid.RowSpan="2">
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding sName}" Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</DataTemplate>
|
||||
</ListBox.ItemTemplate>
|
||||
</ListBox>
|
||||
|
||||
<EgtWPFLib:EgtTextBox Name="MatNameTxBx" Grid.Row="1" Width="240" Visibility="Hidden"
|
||||
<EgtWPFLib:EgtTextBox Name="MatNameTxBx" Grid.Row="1" Width="240" Visibility="Hidden"
|
||||
Style="{DynamicResource OmagCut_KeyboardTextBox}" />
|
||||
|
||||
<UniformGrid Grid.Row="2" Columns="2">
|
||||
<Button Name="NewMatBtn" Grid.Column="1"
|
||||
<UniformGrid Grid.Row="2" Columns="2">
|
||||
<Button Name="NewMatBtn" Grid.Column="1"
|
||||
Style="{DynamicResource OmagCut_RightGrayGradientYellowTextButton}"/>
|
||||
<Button Name="RemoveMatBtn" Grid.Column="1"
|
||||
<Button Name="RemoveMatBtn" Grid.Column="1"
|
||||
Style="{DynamicResource OmagCut_RightGrayGradientYellowTextButton}"/>
|
||||
</UniformGrid>
|
||||
</UniformGrid>
|
||||
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
||||
</GroupBox>
|
||||
</GroupBox>
|
||||
|
||||
<GroupBox Name="MachiningsGpBx" Style="{DynamicResource OmagCut_GroupBox}" Grid.Column="1"
|
||||
<GroupBox Name="MachiningsGpBx" Style="{DynamicResource OmagCut_GroupBox}" Grid.Column="1"
|
||||
Grid.Row="0" Grid.ColumnSpan="1" Grid.RowSpan="3">
|
||||
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<TextBlock Name="CurrSawingTxBl" Grid.Column="0" Grid.Row="0"
|
||||
<TextBlock Name="CurrSawingTxBl" Grid.Column="0" Grid.Row="0"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="CurrSawingTxBx" Grid.Column="1" Grid.Row="0" Margin="10,0,10,0"
|
||||
<EgtWPFLib:EgtTextBox Name="CurrSawingTxBx" Grid.Column="1" Grid.Row="0" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_FixedTextBox}" />
|
||||
|
||||
<TextBlock Name="CurrDrillingTxBl" Grid.Column="0" Grid.Row="1"
|
||||
<TextBlock Name="CurrDrillingTxBl" Grid.Column="0" Grid.Row="1"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="CurrDrillingTxBx" Grid.Column="1" Grid.Row="1" Margin="10,0,10,0"
|
||||
<EgtWPFLib:EgtTextBox Name="CurrDrillingTxBx" Grid.Column="1" Grid.Row="1" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_FixedTextBox}" />
|
||||
|
||||
<TextBlock Name="CurrMillingTxBl" Grid.Column="0" Grid.Row="2"
|
||||
<TextBlock Name="CurrMillingTxBl" Grid.Column="0" Grid.Row="2"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="CurrMillingTxBx" Grid.Column="1" Grid.Row="2" Margin="10,0,10,0"
|
||||
<EgtWPFLib:EgtTextBox Name="CurrMillingTxBx" Grid.Column="1" Grid.Row="2" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_FixedTextBox}" />
|
||||
|
||||
<TextBlock Name="CurrPocketingTxBl" Grid.Column="0" Grid.Row="3"
|
||||
<TextBlock Name="CurrPocketingTxBl" Grid.Column="0" Grid.Row="3"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="CurrPocketingTxBx" Grid.Column="1" Grid.Row="3" Margin="10,0,10,0"
|
||||
<EgtWPFLib:EgtTextBox Name="CurrPocketingTxBx" Grid.Column="1" Grid.Row="3" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_FixedTextBox}" />
|
||||
|
||||
<TextBlock Name="CurrWaterJettingTxBl" Grid.Column="0" Grid.Row="4"
|
||||
<TextBlock Name="CurrWaterJettingTxBl" Grid.Column="0" Grid.Row="4"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="CurrWaterJettingTxBx" Grid.Column="1" Grid.Row="4" Margin="10,0,10,0"
|
||||
|
||||
<Grid Grid.Column="1" Grid.Row="4">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="5*"/>
|
||||
<ColumnDefinition Width="1.5*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<EgtWPFLib:EgtTextBox Name="CurrWaterJettingTxBx" Grid.Column="0" Margin="10,0,5,0"
|
||||
Style="{DynamicResource OmagCut_FixedTextBox}" />
|
||||
<EgtWPFLib:EgtTextBox Name="CurrWaterJettingQualityTxBx" Grid.Column="1" Margin="0,0,10,0"
|
||||
Style="{DynamicResource OmagCut_FixedTextBox}" />
|
||||
</Grid>
|
||||
|
||||
|
||||
<TextBlock Name="CurrDripSawingTxBl" Grid.Column="0" Grid.Row="5"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="CurrDripSawingTxBx" Grid.Column="1" Grid.Row="5" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_FixedTextBox}" />
|
||||
|
||||
<TextBlock Name="CurrDripSawingTxBl" Grid.Column="0" Grid.Row="5"
|
||||
<TextBlock Name="CurrDripDrillingTxBl" Grid.Column="0" Grid.Row="6"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="CurrDripSawingTxBx" Grid.Column="1" Grid.Row="5" Margin="10,0,10,0"
|
||||
<EgtWPFLib:EgtTextBox Name="CurrDripDrillingTxBx" Grid.Column="1" Grid.Row="6" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_FixedTextBox}" />
|
||||
|
||||
<TextBlock Name="CurrDripDrillingTxBl" Grid.Column="0" Grid.Row="6"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="CurrDripDrillingTxBx" Grid.Column="1" Grid.Row="6" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_FixedTextBox}" />
|
||||
</Grid>
|
||||
|
||||
</Grid>
|
||||
</GroupBox>
|
||||
|
||||
</GroupBox>
|
||||
|
||||
<!--<GroupBox Name="SawGpBx" Style="{DynamicResource OmagCut_GroupBox}" Grid.Column="2" Grid.RowSpan="2">
|
||||
<!--<GroupBox Name="SawGpBx" Style="{DynamicResource OmagCut_GroupBox}" Grid.Column="2" Grid.RowSpan="2">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
@@ -551,51 +561,51 @@
|
||||
|
||||
</GroupBox>-->
|
||||
|
||||
<Grid Grid.Column="1" Grid.Row="3" Grid.RowSpan="3">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*"/>
|
||||
<RowDefinition Height="*"/>
|
||||
<RowDefinition Height="*"/>
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid Grid.Column="1" Grid.Row="3" Grid.RowSpan="3">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition />
|
||||
<ColumnDefinition />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*"/>
|
||||
<RowDefinition Height="*"/>
|
||||
<RowDefinition Height="*"/>
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<GroupBox Name="MachineParamGpBx" Style="{DynamicResource OmagCut_GroupBox}" Grid.Column="0" Grid.Row="0" Grid.ColumnSpan="2" Grid.RowSpan="2">
|
||||
<Grid Grid.Column="2" Grid.Row="1">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<GroupBox Name="MachineParamGpBx" Style="{DynamicResource OmagCut_GroupBox}" Grid.Column="0" Grid.Row="0" Grid.ColumnSpan="2" Grid.RowSpan="2">
|
||||
<Grid Grid.Column="2" Grid.Row="1">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<TextBlock Name="SafeZTxBl" Grid.Column="0"
|
||||
<TextBlock Name="SafeZTxBl" Grid.Column="0"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="SafeZTxBx" Grid.Column="1" Margin="10,0,10,0"
|
||||
<EgtWPFLib:EgtTextBox Name="SafeZTxBx" Grid.Column="1" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
||||
</GroupBox>
|
||||
</GroupBox>
|
||||
|
||||
<Border Style="{DynamicResource OmagCut_NoNameGroupBorder}" Grid.Column="0" Grid.Row="2" Grid.ColumnSpan="2" Grid.RowSpan="2">
|
||||
<Grid >
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Border Style="{DynamicResource OmagCut_NoNameGroupBorder}" Grid.Column="0" Grid.Row="2" Grid.ColumnSpan="2" Grid.RowSpan="2">
|
||||
<Grid >
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<TextBlock Name="AdditionalTableTxBl" Grid.Column="0"
|
||||
<TextBlock Name="AdditionalTableTxBl" Grid.Column="0"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}" />
|
||||
<EgtWPFLib:EgtTextBox Name="AdditionalTableTxBx" Grid.Column="1" Margin="10,0,10,0"
|
||||
<EgtWPFLib:EgtTextBox Name="AdditionalTableTxBx" Grid.Column="1" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
||||
</Border>
|
||||
</Border>
|
||||
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
||||
<!--<GroupBox Name="DirectCutsParamGpBx" Style="{DynamicResource OmagCut_GroupBox}" Grid.Column="2" Grid.Row="8">
|
||||
<!--<GroupBox Name="DirectCutsParamGpBx" Style="{DynamicResource OmagCut_GroupBox}" Grid.Column="2" Grid.Row="8">
|
||||
<Grid>
|
||||
<TextBlock Name="FinalHomeTxBl"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}" />
|
||||
@@ -605,199 +615,208 @@
|
||||
|
||||
</GroupBox>-->
|
||||
|
||||
<GroupBox Name="NestingParamGpBx" Style="{DynamicResource OmagCut_GroupBox}" Grid.Column="1" Grid.Row="6" Grid.RowSpan="3">
|
||||
<Grid Name="NestingGrid">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<GroupBox Name="NestingParamGpBx" Style="{DynamicResource OmagCut_GroupBox}" Grid.Column="1" Grid.Row="6" Grid.RowSpan="3">
|
||||
<Grid Name="NestingGrid">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<TextBlock Name="CompleteCutsTxBl" Grid.Column="0" Grid.Row="0" Grid.ColumnSpan="2"
|
||||
<TextBlock Name="CompleteCutsTxBl" Grid.Column="0" Grid.Row="0" Grid.ColumnSpan="2"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}" />
|
||||
<CheckBox Name="CompleteCutsChBx" Grid.Column="0" Grid.Row="0" Grid.ColumnSpan="2" Style="{DynamicResource OmagCut_CheckBox_Single}"
|
||||
<CheckBox Name="CompleteCutsChBx" Grid.Column="0" Grid.Row="0" Grid.ColumnSpan="2" Style="{DynamicResource OmagCut_CheckBox_Single}"
|
||||
HorizontalAlignment="Right" Margin="0,0,10,0"/>
|
||||
|
||||
<!--Allineato-->
|
||||
<TextBlock Name="AlignTxBl" Grid.Row="1" Grid.ColumnSpan="2"
|
||||
<!--Allineato-->
|
||||
<TextBlock Name="AlignTxBl" Grid.Row="1" Grid.ColumnSpan="2"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}" />
|
||||
<CheckBox Name="AlignChBx" Grid.Row="1" Grid.ColumnSpan="2" Style="{StaticResource OmagCut_CheckBox_Single}"
|
||||
<CheckBox Name="AlignChBx" Grid.Row="1" Grid.ColumnSpan="2" Style="{StaticResource OmagCut_CheckBox_Single}"
|
||||
HorizontalAlignment="Right" Margin="0,0,10,0"/>
|
||||
|
||||
<!--Ghigliottina-->
|
||||
<TextBlock Name="GhigliottinaTxBl" Grid.Row="2" Grid.ColumnSpan="2"
|
||||
<!--Ghigliottina-->
|
||||
<TextBlock Name="GhigliottinaTxBl" Grid.Row="2" Grid.ColumnSpan="2"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}" />
|
||||
<CheckBox Name="GhigliottinaChBx" Grid.Row="2" Grid.ColumnSpan="2" Style="{StaticResource OmagCut_CheckBox_Single}"
|
||||
HorizontalAlignment="Right" Margin="0,0,10,0"/>
|
||||
|
||||
<!--Automatico-->
|
||||
<TextBlock Name="AutomaticTxBl" Grid.Row="3" Grid.ColumnSpan="2"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}" />
|
||||
<CheckBox Name="AutomaticChBx" Grid.Row="3" Grid.ColumnSpan="2" Style="{StaticResource OmagCut_CheckBox_Single}"
|
||||
<CheckBox Name="GhigliottinaChBx" Grid.Row="2" Grid.ColumnSpan="2" Style="{StaticResource OmagCut_CheckBox_Single}"
|
||||
HorizontalAlignment="Right" Margin="0,0,10,0"/>
|
||||
|
||||
|
||||
<!--Automatico-->
|
||||
<TextBlock Name="AutomaticTxBl" Grid.Row="3" Grid.ColumnSpan="2"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}" />
|
||||
<CheckBox Name="AutomaticChBx" Grid.Row="3" Grid.ColumnSpan="2" Style="{StaticResource OmagCut_CheckBox_Single}"
|
||||
HorizontalAlignment="Right" Margin="0,0,10,0"/>
|
||||
|
||||
|
||||
|
||||
</Grid>
|
||||
|
||||
</GroupBox>
|
||||
</GroupBox>
|
||||
|
||||
<GroupBox Name="AutoRawImageParamGpBx" Style="{DynamicResource OmagCut_GroupBox}" Grid.Column="3" Grid.Row="0" Grid.RowSpan="2">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<Grid Grid.ColumnSpan="2">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
<GroupBox Name="AutoRawImageParamGpBx" Style="{DynamicResource OmagCut_GroupBox}" Grid.Column="3" Grid.Row="0" Grid.RowSpan="2">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<Button Name="BackImageBtn" Grid.Column="1"
|
||||
<Grid Grid.ColumnSpan="2">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Button Name="BackImageBtn" Grid.Column="1"
|
||||
Style="{DynamicResource OmagCut_RightGrayGradientYellowTextButton}"/>
|
||||
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
||||
<TextBlock Name="ThresholdTxBl" Grid.Column="0" Grid.Row="1"
|
||||
<TextBlock Name="ThresholdTxBl" Grid.Column="0" Grid.Row="1"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="ThresholdTxBx" Grid.Column="1" Grid.Row="1" Margin="10,0,10,0"
|
||||
<EgtWPFLib:EgtTextBox Name="ThresholdTxBx" Grid.Column="1" Grid.Row="1" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
<TextBlock Name="ToleranceTxBl" Grid.Column="0" Grid.Row="2"
|
||||
<TextBlock Name="ToleranceTxBl" Grid.Column="0" Grid.Row="2"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="ToleranceTxBx" Grid.Column="1" Grid.Row="2" Margin="10,0,10,0"
|
||||
<EgtWPFLib:EgtTextBox Name="ToleranceTxBx" Grid.Column="1" Grid.Row="2" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
||||
</GroupBox>
|
||||
</GroupBox>
|
||||
|
||||
<GroupBox Name="CutFredGpBx" Style="{DynamicResource OmagCut_GroupBox}" Grid.Column="3"
|
||||
<GroupBox Name="CutFredGpBx" Style="{DynamicResource OmagCut_GroupBox}" Grid.Column="3"
|
||||
Grid.Row="2" Grid.RowSpan="1">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<TextBlock Name="CfrLenTxBl" Grid.Column="0"
|
||||
<TextBlock Name="CfrLenTxBl" Grid.Column="0"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="CfrLenTxBx" Grid.Column="1" Margin="10,0,10,0"
|
||||
<EgtWPFLib:EgtTextBox Name="CfrLenTxBx" Grid.Column="1" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
<TextBlock Name="CfrPercTxBl" Grid.Column="0" Grid.Row="1"
|
||||
<TextBlock Name="CfrPercTxBl" Grid.Column="0" Grid.Row="1"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="CfrPercTxBx" Grid.Column="1" Grid.Row="1" Margin="10,0,10,0"
|
||||
<EgtWPFLib:EgtTextBox Name="CfrPercTxBx" Grid.Column="1" Grid.Row="1" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
||||
</GroupBox>
|
||||
</GroupBox>
|
||||
|
||||
<!--Incisioni-->
|
||||
<GroupBox Name="TopMillGpBx" Style="{DynamicResource OmagCut_GroupBox}" Grid.Column="3"
|
||||
<!--Incisioni-->
|
||||
<GroupBox Name="TopMillGpBx" Style="{DynamicResource OmagCut_GroupBox}" Grid.Column="3"
|
||||
Grid.Row="3" Grid.RowSpan="3">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<!--Utilizza fresa-->
|
||||
<TextBlock Name="TmEnableTxBl" Grid.Column="0" Grid.Row="0"
|
||||
<!--Utilizza fresa-->
|
||||
<TextBlock Name="TmEnableTxBl" Grid.Column="0" Grid.Row="0"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}" />
|
||||
<CheckBox Name="TmEnableChBx" Grid.Column="1" Grid.Row="0" Style="{DynamicResource OmagCut_CheckBox_Single}"
|
||||
<CheckBox Name="TmEnableChBx" Grid.Column="1" Grid.Row="0" Style="{DynamicResource OmagCut_CheckBox_Single}"
|
||||
HorizontalAlignment="Right" Margin="10,0,10,0"/>
|
||||
<!--Affondamento-->
|
||||
<TextBlock Name="TmDepthTxBl" Grid.Column="0" Grid.Row="1"
|
||||
<!--Affondamento-->
|
||||
<TextBlock Name="TmDepthTxBl" Grid.Column="0" Grid.Row="1"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="TmDepthTxBx" Grid.Column="1" Grid.Row="1" Margin="10,0,10,0"
|
||||
<EgtWPFLib:EgtTextBox Name="TmDepthTxBx" Grid.Column="1" Grid.Row="1" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
<!--Larghezza-->
|
||||
<TextBlock Name="TmWidthTxBl" Grid.Column="0" Grid.Row="2"
|
||||
<!--Larghezza-->
|
||||
<TextBlock Name="TmWidthTxBl" Grid.Column="0" Grid.Row="2"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="TmWidthTxBx" Grid.Column="1" Grid.Row="2" Margin="10,0,10,0"
|
||||
<EgtWPFLib:EgtTextBox Name="TmWidthTxBx" Grid.Column="1" Grid.Row="2" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
||||
</GroupBox>
|
||||
</GroupBox>
|
||||
|
||||
|
||||
<Border Name="SideAngCutProbeGpBx" Style="{DynamicResource OmagCut_NoNameGroupBorder}" Grid.Column="3" Grid.Row="6">
|
||||
<Grid >
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<TextBlock Name="SideAngCutProbeTxBl" Grid.Column="0" Grid.Row="0"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}" />
|
||||
<CheckBox Name="SideAngCutProbeChBx" Grid.Column="1" Grid.Row="0" Style="{StaticResource OmagCut_CheckBox_Single}"
|
||||
HorizontalAlignment="Right" Margin="0,0,10,0"/>
|
||||
</Grid>
|
||||
|
||||
</Border>
|
||||
|
||||
<Border Name="WashingGpBx" Style="{DynamicResource OmagCut_NoNameGroupBorder}" Grid.Column="3" Grid.Row="7">
|
||||
<Grid >
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<TextBlock Name="WashingTxBl" Grid.Column="0" Grid.Row="0"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}" />
|
||||
<CheckBox Name="WashingChBx" Grid.Column="1" Grid.Row="0" Style="{StaticResource OmagCut_CheckBox_Single}"
|
||||
HorizontalAlignment="Right" Margin="0,0,10,0"/>
|
||||
</Grid>
|
||||
|
||||
</Border>
|
||||
|
||||
<!--Cornici-->
|
||||
<GroupBox Name="FrameGpBx" Style="{DynamicResource OmagCut_GroupBox}" Grid.Column="3" Grid.Row="8">
|
||||
<Border Name="SideAngCutProbeGpBx" Style="{DynamicResource OmagCut_NoNameGroupBorder}" Grid.Column="3" Grid.Row="6">
|
||||
<Grid >
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<TextBlock Name="FramePauseTxBl" Grid.Column="0" Grid.Row="0"
|
||||
<TextBlock Name="SideAngCutProbeTxBl" Grid.Column="0" Grid.Row="0"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}" />
|
||||
<CheckBox Name="SideAngCutProbeChBx" Grid.Column="1" Grid.Row="0" Style="{StaticResource OmagCut_CheckBox_Single}"
|
||||
HorizontalAlignment="Right" Margin="0,0,10,0"/>
|
||||
</Grid>
|
||||
|
||||
</Border>
|
||||
|
||||
<Border Name="WashingGpBx" Style="{DynamicResource OmagCut_NoNameGroupBorder}" Grid.Column="3" Grid.Row="7">
|
||||
<Grid >
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<TextBlock Name="WashingTxBl" Grid.Column="0" Grid.Row="0"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}" />
|
||||
<CheckBox Name="WashingChBx" Grid.Column="1" Grid.Row="0" Style="{StaticResource OmagCut_CheckBox_Single}"
|
||||
HorizontalAlignment="Right" Margin="0,0,10,0"/>
|
||||
</Grid>
|
||||
|
||||
</Border>
|
||||
|
||||
<!--Cornici-->
|
||||
<GroupBox Name="FrameGpBx" Style="{DynamicResource OmagCut_GroupBox}" Grid.Column="3" Grid.Row="8">
|
||||
<Grid >
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<TextBlock Name="FramePauseTxBl" Grid.Column="0" Grid.Row="0"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}" />
|
||||
<CheckBox Name="FramePauseChBx" Grid.Column="1" Grid.Row="0" Style="{StaticResource OmagCut_CheckBox_Single}"
|
||||
<CheckBox Name="FramePauseChBx" Grid.Column="1" Grid.Row="0" Style="{StaticResource OmagCut_CheckBox_Single}"
|
||||
HorizontalAlignment="Right" Margin="0,0,10,0"/>
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
||||
</GroupBox>
|
||||
</GroupBox>
|
||||
|
||||
<UniformGrid Columns="4" Grid.Row="8">
|
||||
<Button x:Name="SawProbingBtn"
|
||||
<Grid Grid.Column="0" Grid.Row="8">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="2.5*"/>
|
||||
<ColumnDefinition Width="5*"/>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Button x:Name="SawProbingBtn"
|
||||
Style="{DynamicResource OmagCut_YellowGradientYellowIconButton}">
|
||||
<Image Source="{DynamicResource SawProbeImg}" Style="{StaticResource OmagCut_ScaleButtonIcon}"/>
|
||||
</Button>
|
||||
<Image Source="{DynamicResource SawProbeImg}" Style="{StaticResource OmagCut_ScaleButtonIcon}"/>
|
||||
</Button>
|
||||
|
||||
</UniformGrid>
|
||||
|
||||
</Grid>
|
||||
|
||||
</Border>
|
||||
|
||||
<TextBlock Name="UseLaserOriginTxBl" Grid.Column="1"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}" />
|
||||
<CheckBox Name="UseLaserOriginChBx" Style="{DynamicResource OmagCut_CheckBox_Single}" Grid.Column="2"
|
||||
HorizontalAlignment="Right" Margin="10,0,10,0"/>
|
||||
</Grid>
|
||||
|
||||
</Grid>
|
||||
</Border>
|
||||
|
||||
</UserControl>
|
||||
|
||||
@@ -109,6 +109,7 @@ Public Class AlarmsPageUC
|
||||
CurrDripDrillingTxBl.Text = EgtMsg(MSG_ALARMS2PAGEUC + 6) ' DripDrilling
|
||||
FrameGpBx.Header = EgtMsg(91068) ' Cornici
|
||||
FramePauseTxBl.Text = EgtMsg(91067) ' Inserisci pausa
|
||||
UseLaserOriginTxBl.Text = EgtMsg(91129) ' Usa laser per origine
|
||||
AutoRawImageParamGpBx.Visibility = Windows.Visibility.Hidden
|
||||
End Sub
|
||||
|
||||
@@ -118,6 +119,14 @@ Public Class AlarmsPageUC
|
||||
' Variabile che accorcia il riferimento alla macchina corrente
|
||||
m_CurrentMachine = m_MainWindow.m_CurrentMachine
|
||||
|
||||
' in assenza dell'uscita H1 nascondo i parametri lama
|
||||
If EgtGetHeadId("H1") = GDB_ID.NULL Then
|
||||
SawGpBx.Visibility = Visibility.Hidden
|
||||
TopMillGpBx.Visibility = Visibility.Hidden
|
||||
CurrSawTxBl.Visibility = Visibility.Hidden
|
||||
CurrSawCmBx.Visibility = Visibility.Hidden
|
||||
End If
|
||||
|
||||
' Verifico la configurazione della macchina per creare i combobox
|
||||
Select Case m_CurrentMachine.MountedToolConfig
|
||||
Case CurrentMachine.MountedToolConfigs.SAW
|
||||
@@ -132,7 +141,7 @@ Public Class AlarmsPageUC
|
||||
' Disattivo il gruppo dei parametri fori
|
||||
HolesGpBx.Visibility = Windows.Visibility.Hidden
|
||||
Case CurrentMachine.MountedToolConfigs.SAWANDAUXTOOL
|
||||
'Non faccio alcunchè
|
||||
'Non faccio alcunchè
|
||||
Case CurrentMachine.MountedToolConfigs.MANUALTOOLCHANGER, CurrentMachine.MountedToolConfigs.TOOLCHANGER
|
||||
'Da implementare
|
||||
End Select
|
||||
@@ -151,7 +160,7 @@ Public Class AlarmsPageUC
|
||||
|
||||
' Se non previsti tagli waterjet, disabilito relativo box
|
||||
If Not m_CurrentMachine.bWaterJetting Then
|
||||
WJsParamGpBx.Visibility = Visibility.Hidden
|
||||
WjsParamGpBx.Visibility = Visibility.Hidden
|
||||
End If
|
||||
|
||||
' Abilitazione box per contorni grezzo da foto
|
||||
@@ -164,7 +173,7 @@ Public Class AlarmsPageUC
|
||||
End If
|
||||
|
||||
' Abilitazione Feed ridotta su inizio/fine tagli
|
||||
If m_CurrentMachine.bFsevEnable Then
|
||||
If m_CurrentMachine.bFsevEnable And EgtGetHeadId("H1") <> GDB_ID.NULL Then
|
||||
CutFredGpBx.Visibility = Windows.Visibility.Visible
|
||||
Else
|
||||
CutFredGpBx.Visibility = Windows.Visibility.Hidden
|
||||
@@ -179,11 +188,16 @@ Public Class AlarmsPageUC
|
||||
m_bFirst = False
|
||||
End If
|
||||
|
||||
' Aggiorno lista delle lame per pagina macchina in cui scegliere quella corrente
|
||||
CreateToolList(MCH_TF.SAWBLADE, m_SawList)
|
||||
' Aggiorno lista delle lame per pagina macchina in cui scegliere quella corrente
|
||||
CreateToolList(MCH_TF.SAWBLADE, m_SawList)
|
||||
' Seleziono lama corrente
|
||||
CurrSawCmBx.SelectedItem = m_CurrentMachine.sCurrSaw
|
||||
|
||||
' nascondo la lista dei materiali solo se macchina WaterJet
|
||||
If m_CurrentMachine.bWaterJet Then
|
||||
MaterialsGpBx.Visibility = Visibility.Hidden
|
||||
End If
|
||||
|
||||
' Verifico la configurazione della macchina per creare i combobox
|
||||
Select Case m_CurrentMachine.MountedToolConfig
|
||||
Case CurrentMachine.MountedToolConfigs.SAW
|
||||
@@ -374,6 +388,17 @@ Public Class AlarmsPageUC
|
||||
' Leggo parametri per variazione feed in tagli
|
||||
CfrLenTxBx.Text = LenToString(m_CurrentMachine.dFsevLength, 3)
|
||||
CfrPercTxBx.Text = DoubleToString(m_CurrentMachine.dFsevPerc, 0)
|
||||
|
||||
' leggo flag per tavola definita da laser
|
||||
Dim nUseLaserOrigin As Integer = GetPrivateProfileInt(S_TABLE, K_USELASERORIGIN, -1, m_MainWindow.GetMachIniFile())
|
||||
If nUseLaserOrigin = -1 Then
|
||||
UseLaserOriginTxBl.Visibility = Visibility.Hidden
|
||||
UseLaserOriginChBx.Visibility = Visibility.Hidden
|
||||
Else
|
||||
UseLaserOriginTxBl.Visibility = Visibility.Visible
|
||||
UseLaserOriginChBx.IsChecked = (nUseLaserOrigin <> 0)
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
' aggiorna le text delle lavorazioni (la selezione avviene nella pagina del grezzo o dalla pagina del progetto corrente)
|
||||
@@ -414,9 +439,26 @@ Public Class AlarmsPageUC
|
||||
CurrWaterJettingTxBx.Text = m_CurrentMachine.sCurrWaterJetting
|
||||
CurrWaterJettingTxBl.Visibility = Windows.Visibility.Visible
|
||||
CurrWaterJettingTxBx.Visibility = Windows.Visibility.Visible
|
||||
If m_MainWindow.m_CurrentMachine.bFromDBWaterJet Then
|
||||
CurrWaterJettingTxBx.SetValue(Grid.ColumnSpanProperty, 1)
|
||||
CurrWaterJettingTxBx.SetValue(MarginProperty, New Thickness(CurrWaterJettingTxBx.Margin.Left,
|
||||
CurrWaterJettingTxBx.Margin.Top,
|
||||
5,
|
||||
CurrWaterJettingTxBx.Margin.Bottom))
|
||||
CurrWaterJettingQualityTxBx.Text = m_CurrentMachine.sCurrWaterJettingQuality
|
||||
CurrWaterJettingQualityTxBx.Visibility = Windows.Visibility.Visible
|
||||
Else
|
||||
CurrWaterJettingTxBx.SetValue(Grid.ColumnSpanProperty, 2)
|
||||
CurrWaterJettingTxBx.SetValue(MarginProperty, New Thickness(CurrWaterJettingTxBx.Margin.Left,
|
||||
CurrWaterJettingTxBx.Margin.Top,
|
||||
10,
|
||||
CurrWaterJettingTxBx.Margin.Bottom))
|
||||
CurrWaterJettingQualityTxBx.Visibility = Windows.Visibility.Collapsed
|
||||
End If
|
||||
Else
|
||||
CurrWaterJettingTxBl.Visibility = Windows.Visibility.Hidden
|
||||
CurrWaterJettingTxBx.Visibility = Windows.Visibility.Hidden
|
||||
CurrWaterJettingQualityTxBx.Visibility = Windows.Visibility.Hidden
|
||||
End If
|
||||
If m_CurrentMachine.sCurrDripSawing <> String.Empty Then
|
||||
CurrDripSawingTxBx.Text = m_CurrentMachine.sCurrDripSawing
|
||||
@@ -549,7 +591,7 @@ Public Class AlarmsPageUC
|
||||
If CurrDrillCmBx.SelectedItem.ToString() = NO_TOOL Then
|
||||
m_CurrentMachine.sCurrDrill = String.Empty
|
||||
m_CurrentMachine.sCurrDrilling = String.Empty
|
||||
' Assegno foretto
|
||||
' Assegno foretto
|
||||
Else
|
||||
m_CurrentMachine.sCurrDrill = CurrDrillCmBx.SelectedItem.ToString()
|
||||
' Reset fresa, waterjet e relative lavorazioni
|
||||
@@ -584,7 +626,7 @@ Public Class AlarmsPageUC
|
||||
If CurrMillCmBx.SelectedItem.ToString() = NO_TOOL Then
|
||||
m_CurrentMachine.sCurrMill = String.Empty
|
||||
m_CurrentMachine.sCurrMilling = String.Empty
|
||||
' Assegno fresa
|
||||
' Assegno fresa
|
||||
Else
|
||||
m_CurrentMachine.sCurrMill = CurrMillCmBx.SelectedItem.ToString()
|
||||
' Reset foretto, waterjet e relative lavorazioni
|
||||
@@ -654,7 +696,7 @@ Public Class AlarmsPageUC
|
||||
If CurrWJetCmBx.SelectedItem.ToString() = NO_TOOL Then
|
||||
m_CurrentMachine.sCurrWaterJet = String.Empty
|
||||
m_CurrentMachine.sCurrWaterJetting = String.Empty
|
||||
' Assegno Waterjet
|
||||
' Assegno Waterjet
|
||||
Else
|
||||
m_CurrentMachine.sCurrWaterJet = CurrWJetCmBx.SelectedItem.ToString()
|
||||
' Reset foretto, fresa e relative lavorazioni
|
||||
@@ -857,7 +899,7 @@ Public Class AlarmsPageUC
|
||||
Else
|
||||
WritePrivateProfileString(S_MACH_NEST, K_MACH_ENGRAVING_WITHMILL, "0", m_MainWindow.GetMachIniFile())
|
||||
End If
|
||||
End Sub
|
||||
End Sub
|
||||
|
||||
Private Sub TmDepthTxBx_EgtClosed(sender As Object, e As EventArgs) Handles TmDepthTxBx.EgtClosed
|
||||
Dim dVal As Double = 0
|
||||
@@ -993,6 +1035,14 @@ Public Class AlarmsPageUC
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub UseLaserOriginChBx_Click() Handles UseLaserOriginChBx.Click
|
||||
If UseLaserOriginChBx.IsChecked() Then
|
||||
WritePrivateProfileString(S_TABLE, K_USELASERORIGIN, "1", m_MainWindow.GetMachIniFile())
|
||||
Else
|
||||
WritePrivateProfileString(S_TABLE, K_USELASERORIGIN, "0", m_MainWindow.GetMachIniFile())
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub WashingChBx_Click(sender As Object, e As RoutedEventArgs) Handles WashingChBx.Click
|
||||
If WashingChBx.IsChecked() Then
|
||||
WritePrivateProfileString(S_MACH_NEST, K_MACH_WASHING, "1", m_MainWindow.GetMachIniFile())
|
||||
@@ -1026,6 +1076,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
|
||||
|
||||
@@ -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*"/>
|
||||
|
||||
@@ -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
|
||||
@@ -700,6 +723,17 @@ Public Class CurrentMachine
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Friend Property sCurrWaterJettingQuality As String
|
||||
Get
|
||||
Return m_sCurrWaterJettingQuality
|
||||
End Get
|
||||
Set(value As String)
|
||||
If WritePrivateProfileString(S_MACH_MACH, K_CURRWATERJETTINGQUALITY, value, sMachIniFile) Then
|
||||
m_sCurrWaterJettingQuality = value
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Friend ReadOnly Property WaterJettingActive As Double
|
||||
Get
|
||||
Return m_bWaterJetting AndAlso Not String.IsNullOrWhiteSpace(m_sCurrWaterJetting)
|
||||
@@ -894,6 +928,12 @@ Public Class CurrentMachine
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Friend ReadOnly Property Qualities As ObservableCollection(Of String)
|
||||
Get
|
||||
Return m_Qualities
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Friend Sub AddMaterial(value As Material)
|
||||
For Each Material As Material In Materials
|
||||
If Material.nId = value.nId Then
|
||||
@@ -975,7 +1015,11 @@ Public Class CurrentMachine
|
||||
End Get
|
||||
Set(value As Material)
|
||||
Dim CurrMatId As String = If(Not IsNothing(value), value.nId.ToString, "")
|
||||
WritePrivateProfileString(S_MATERIALS, K_CURRMATERIAL, CurrMatId, sMachIniFile)
|
||||
If bWaterJet And bFromDBWaterJet Then
|
||||
WritePrivateProfileString(S_MATERIALS, K_CURRMATERIAL, CurrMatId & If(Not IsNothing(value), "." & value.SubId, ""), sMachIniFile)
|
||||
Else
|
||||
WritePrivateProfileString(S_MATERIALS, K_CURRMATERIAL, CurrMatId, sMachIniFile)
|
||||
End If
|
||||
m_CurrMat = value
|
||||
End Set
|
||||
End Property
|
||||
@@ -1034,6 +1078,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 +1117,8 @@ Public Class CurrentMachine
|
||||
' waterjet
|
||||
m_bWaterJet = (GetPrivateProfileInt(S_TOOLS, K_WATERJET, 0, sMachIniFile) > 0) And
|
||||
m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.ENABLE_WJ)
|
||||
' Leggo abilitazione DB WaterJet
|
||||
m_bFromDBWaterJet = (GetPrivateProfileInt(S_MATERIALS, K_FROMDBWATERJET, 0, sMachIniFile) > 0)
|
||||
' Leggo abilitazione visualizzazione TcPos, Head/exit e Note utente
|
||||
m_nShowToolChanger = GetPrivateProfileInt(S_TOOLS, K_SHOWTOOLCHANGER, 0, sMachIniFile)
|
||||
m_bShowHeadExit = (GetPrivateProfileInt(S_TOOLS, K_SHOWHEADEXIT, 0, sMachIniFile) > 0)
|
||||
@@ -1147,6 +1194,8 @@ Public Class CurrentMachine
|
||||
GetPrivateProfileString(S_MACH_MACH, K_CURRDRIPDRILLING, Nothing, m_sCurrDripDrilling, sMachIniFile)
|
||||
' waterjetting
|
||||
GetPrivateProfileString(S_MACH_MACH, K_CURRWATERJETTING, Nothing, m_sCurrWaterJetting, sMachIniFile)
|
||||
' waterjettingquality
|
||||
GetPrivateProfileString(S_MACH_MACH, K_CURRWATERJETTINGQUALITY, Nothing, m_sCurrWaterJettingQuality, sMachIniFile)
|
||||
|
||||
' Leggo numero di portautensili
|
||||
m_ToolChangerNbr = GetPrivateProfileInt(S_TOOLCHANGER, K_NUMBER, 0, sMachIniFile)
|
||||
@@ -1208,27 +1257,119 @@ Public Class CurrentMachine
|
||||
' Leggo la lista dei materiali
|
||||
Dim Material As Material = Nothing
|
||||
Dim nIndex As Integer = 1
|
||||
While (GetPrivateProfileMaterial(S_MATERIALS, K_MATERIAL & nIndex, Material, sMachIniFile))
|
||||
m_Materials.Add(Material)
|
||||
nIndex += 1
|
||||
End While
|
||||
|
||||
If m_bWaterJet And m_bFromDBWaterJet Then
|
||||
LoadWJMaterial(True)
|
||||
Else
|
||||
While (GetPrivateProfileMaterial(S_MATERIALS, K_MATERIAL & nIndex, Material, sMachIniFile))
|
||||
m_Materials.Add(Material)
|
||||
nIndex += 1
|
||||
End While
|
||||
End If
|
||||
|
||||
' Salvo massimo indice a cui sono arrivato per usarlo quando devo aggiungere nuovi elementi alla lista
|
||||
m_MaxIdMat = nIndex - 1
|
||||
|
||||
' Leggo materiale correntemente attivo
|
||||
Dim CurrMatId As Integer = GetPrivateProfileInt(S_MATERIALS, K_CURRMATERIAL, 0, sMachIniFile)
|
||||
For Each Material In Materials
|
||||
If Material.nId = CurrMatId Then
|
||||
m_CurrMat = Material
|
||||
Exit For
|
||||
Dim sCurrMatId As String = String.Empty
|
||||
EgtUILib.GetPrivateProfileString(S_MATERIALS, K_CURRMATERIAL, "0", sCurrMatId, sMachIniFile)
|
||||
If bWaterJet And bFromDBWaterJet Then
|
||||
Dim sCurrMatIds As String()
|
||||
sCurrMatIds = sCurrMatId.Split("."c)
|
||||
If sCurrMatIds.Length > 1 Then
|
||||
Dim nCurrMatId As Integer
|
||||
Dim nCurrSubMatId As Integer
|
||||
If Not Integer.TryParse(sCurrMatIds(0), nCurrMatId) Then nCurrMatId = 0
|
||||
If Not Integer.TryParse(sCurrMatIds(1), nCurrSubMatId) Then nCurrSubMatId = 0
|
||||
For Each Material In Materials
|
||||
If Material.nId = nCurrMatId AndAlso Material.SubId = nCurrSubMatId Then
|
||||
m_CurrMat = Material
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
Next
|
||||
Else
|
||||
Dim nCurrMatId As Integer
|
||||
If Not Integer.TryParse(sCurrMatId, nCurrMatId) Then nCurrMatId = 0
|
||||
For Each Material In Materials
|
||||
If Material.nId = nCurrMatId Then
|
||||
m_CurrMat = Material
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
' leggo se la macchina ha il tastatore dello spessore tavola
|
||||
m_HasRawProbe = (GetPrivateProfileInt(S_MACH_PROBING, K_ENABLERAWPROBE, 1, sMachIniFile) <> 0)
|
||||
' leggo se la macchina ha il lettore di codice a barre della lastra
|
||||
m_nEnableBarCodeReader = GetPrivateProfileInt(S_MACH_BARCODEREADER, K_ENABLEBCR, 0, sMachIniFile)
|
||||
End Sub
|
||||
|
||||
Public Sub LoadWJMaterial(Optional bIsStart As Boolean = False)
|
||||
Dim TempCurrMat As Material = CurrMat
|
||||
' Svuoto l'attuale lista di materiali
|
||||
m_Materials.Clear()
|
||||
' Leggo valori da file Data e li carico nelle proprietà
|
||||
Dim sFilePath As String = sMachDir & "\" & MACHININGS_DIR & "\" & WATERJETDB_FILE
|
||||
Dim Local_MaterialList = New ObservableCollection(Of EgtWPFLib5.WjMaterial)
|
||||
Local_MaterialList = EgtWPFLib5.WaterjetDbWindowVM.LoadWjMaterials(sFilePath)
|
||||
' definisco la lista delle qualità (solo se è vuota)
|
||||
If m_Qualities.Count < 1 Then
|
||||
m_Qualities.Add("Q1")
|
||||
m_Qualities.Add("Q2")
|
||||
m_Qualities.Add("Q3")
|
||||
m_Qualities.Add("Q4")
|
||||
m_Qualities.Add("Q5")
|
||||
m_Qualities.Add("QExtra")
|
||||
End If
|
||||
' inserisco il materiale generico di default -- IN SOSPESO
|
||||
'm_Materials.Add(New Material(0, "***", 0))
|
||||
' costruiscoi la lista
|
||||
Dim i As Integer = 0
|
||||
Dim sName As String = String.Empty
|
||||
For i = 0 To Local_MaterialList.Count - 1
|
||||
sName = Local_MaterialList(i).Name
|
||||
Dim j As Integer = 0
|
||||
For j = 0 To Local_MaterialList(i).SubMaterialList.Count - 1
|
||||
m_Materials.Add(New Material(i + 1, sName & "." & Local_MaterialList(i).SubMaterialList(j).Name, j + 1))
|
||||
Next
|
||||
Next
|
||||
If Not bIsStart Then CurrMat = TempCurrMat
|
||||
End Sub
|
||||
|
||||
Public Function GetMaxThicknessCurrMaterial(sCurMat As String) As Double
|
||||
Dim bFound As Boolean = False
|
||||
Dim dMaxThick As Double = 0
|
||||
' Leggo valori da file Data e li carico nelle proprietà
|
||||
Dim sFilePath As String = sMachDir & "\" & MACHININGS_DIR & "\" & WATERJETDB_FILE
|
||||
Dim Local_MaterialList = New ObservableCollection(Of EgtWPFLib5.WjMaterial)
|
||||
Local_MaterialList = EgtWPFLib5.WaterjetDbWindowVM.LoadWjMaterials(sFilePath)
|
||||
Dim sItems() As String = sCurMat.Split("."c)
|
||||
If sItems.Count > 1 Then
|
||||
Dim sMat As String = sItems(0)
|
||||
Dim sSubMat As String = sItems(1)
|
||||
For Each ItemMat As EgtWPFLib5.WjMaterial In Local_MaterialList
|
||||
If ItemMat.Name = sMat Then
|
||||
For Each ItemSubMat As EgtWPFLib5.WjSubMaterial In ItemMat.SubMaterialList
|
||||
If ItemSubMat.Name = sSubMat Then
|
||||
For Each ItemParam As EgtWPFLib5.WjParam In ItemSubMat.ParamList
|
||||
Dim dParamThick As Double
|
||||
StringToDouble(ItemParam.Thickness, dParamThick)
|
||||
If dParamThick > dMaxThick Then
|
||||
dMaxThick = dParamThick
|
||||
End If
|
||||
Next
|
||||
bFound = True
|
||||
Exit For
|
||||
End If
|
||||
If bFound Then Exit For
|
||||
Next
|
||||
End If
|
||||
If bFound Then Exit For
|
||||
Next
|
||||
End If
|
||||
Return dMaxThick
|
||||
End Function
|
||||
|
||||
Friend Function IsVacuumMovePossible() As Boolean
|
||||
' Recupero diametro lama corrente
|
||||
EgtTdbSetCurrTool(sCurrSaw)
|
||||
@@ -1323,6 +1464,7 @@ Friend Class Material
|
||||
|
||||
Private m_nId As Integer
|
||||
Private m_sName As String
|
||||
Private m_SubId As Integer = 0
|
||||
|
||||
Public ReadOnly Property nId As Integer
|
||||
Get
|
||||
@@ -1339,6 +1481,15 @@ Friend Class Material
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property SubId As Integer
|
||||
Get
|
||||
Return m_SubId
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
m_SubId = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Sub New(sName As String, MaterialList As ObservableCollection(Of Material))
|
||||
Dim nMaxId As Integer = 0
|
||||
For Each Material As Material In MaterialList
|
||||
@@ -1355,4 +1506,11 @@ Friend Class Material
|
||||
m_sName = sName
|
||||
End Sub
|
||||
|
||||
Sub New(nId As Integer, sName As String, nSubId As Integer)
|
||||
m_nId = nId
|
||||
m_sName = sName
|
||||
m_SubId = nSubId
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
|
||||
@@ -0,0 +1,139 @@
|
||||
<Window x:Class="ImportExportMachiningWindowWD"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
|
||||
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
|
||||
FontFamily="{DynamicResource OmagCut_Font}"
|
||||
ResizeMode="NoResize" WindowStyle="None" AllowsTransparency="True" Background="Transparent"
|
||||
Title="SaveNameWD" Height="350" Width="426.5" ShowInTaskbar="False">
|
||||
<!--Definizione della pagina di scelta del nome con cui salvare il progetto-->
|
||||
<Border Style="{DynamicResource OmagCut_Border}">
|
||||
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="7*"/>
|
||||
<RowDefinition Height="2*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<ScrollViewer Grid.Row="0" Margin="20">
|
||||
<TreeView ItemsSource="{Binding FamilyList}" Background="{DynamicResource OmagCut_TreeViewBackGroundColor}">
|
||||
<TreeView.Resources>
|
||||
<HierarchicalDataTemplate DataType="{x:Type EgtWPFLib5:ImpExpMachiningFamily}" ItemsSource="{Binding MachiningList}">
|
||||
|
||||
<Grid Height="20">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Image Grid.Column="0" Source="{Binding PictureString}" Height="20" Width="20" Margin="0,0,5,0" />
|
||||
<TextBlock Grid.Column="1" Text="{Binding Name}" FontSize="15" Margin="0,-2,5,0" VerticalAlignment="Center" />
|
||||
|
||||
</Grid>
|
||||
|
||||
<!-- multibinding quando sono attivi.-->
|
||||
<HierarchicalDataTemplate.ItemContainerStyle>
|
||||
<Style TargetType="{x:Type TreeViewItem}" >
|
||||
<Setter Property="Foreground" Value="{DynamicResource OmagCut_TreeViewTextColor}" />
|
||||
<Setter Property="IsSelected" Value="{Binding IsSelected}" />
|
||||
<Setter Property="IsExpanded" Value="{Binding IsExpanded}" />
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type TreeViewItem}">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition MinWidth="19" Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition/>
|
||||
</Grid.RowDefinitions>
|
||||
<ToggleButton x:Name="Expander" ClickMode="Press" IsChecked="{Binding IsExpanded, RelativeSource={RelativeSource TemplatedParent}}" Style="{StaticResource ExpandCollapseToggleStyle}"/>
|
||||
<Border x:Name="Bd" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Grid.Column="1" Padding="{TemplateBinding Padding}" SnapsToDevicePixels="true">
|
||||
<ContentPresenter x:Name="PART_Header" ContentSource="Header" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
|
||||
</Border>
|
||||
<ItemsPresenter x:Name="ItemsHost" Grid.ColumnSpan="2" Grid.Column="1" Grid.Row="1"/>
|
||||
<Rectangle Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="4" HorizontalAlignment="Stretch" VerticalAlignment="Top" Fill="{DynamicResource OmagCut_TreeViewDelimiterColor}" Height="1" />
|
||||
</Grid>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="IsExpanded" Value="false">
|
||||
<Setter Property="Visibility" TargetName="ItemsHost" Value="Collapsed"/>
|
||||
</Trigger>
|
||||
<Trigger Property="HasItems" Value="false">
|
||||
<Setter Property="Visibility" TargetName="Expander" Value="Hidden"/>
|
||||
</Trigger>
|
||||
<Trigger Property="IsSelected" Value="true">
|
||||
<Setter Property="Background" TargetName="Bd" Value="{DynamicResource OmagCut_TreeViewSelectedItemBackground}" />
|
||||
<Setter Property="BorderBrush" TargetName="Bd" Value="{DynamicResource OmagCut_TreeViewSelectedItemBorder}"/>
|
||||
<Setter Property="BorderThickness" TargetName="Bd" Value="1"/>
|
||||
<!--<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.HighlightTextBrushKey}}"/>-->
|
||||
</Trigger>
|
||||
<!--<MultiTrigger>
|
||||
<MultiTrigger.Conditions>
|
||||
<Condition Property="IsSelected" Value="true"/>
|
||||
<Condition Property="IsSelectionActive" Value="false"/>
|
||||
</MultiTrigger.Conditions>
|
||||
<Setter Property="Background" TargetName="Bd" Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}"/>
|
||||
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
|
||||
</MultiTrigger>-->
|
||||
<Trigger Property="IsEnabled" Value="false">
|
||||
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
</HierarchicalDataTemplate.ItemContainerStyle>
|
||||
</HierarchicalDataTemplate>
|
||||
|
||||
<DataTemplate DataType="{x:Type EgtWPFLib5:ImpExpMachiningItem}">
|
||||
<Grid Height="20">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<!--<Image Grid.Column="0" Source="{Binding PictureString}" Height="32" Margin="0,8,6,4" />-->
|
||||
<CheckBox Name="ActiveTxBx" Grid.Column="0" Height="15" Width="15"
|
||||
Margin="-15,0,5,0" VerticalContentAlignment="Center"
|
||||
IsChecked="{Binding Active}"
|
||||
Visibility="{Binding Path=DataContext.Active_Visibility,
|
||||
RelativeSource={RelativeSource AncestorType={x:Type EgtWPFLib5:EgtCustomWindow}}}"/>
|
||||
<TextBlock Grid.Column="1" Text="{Binding Name}"
|
||||
Style="{StaticResource OmagCut_ListBoxTextBlock}" />
|
||||
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
|
||||
</TreeView.Resources>
|
||||
</TreeView>
|
||||
</ScrollViewer>
|
||||
|
||||
<Grid Grid.Column="1" Grid.Row="1">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Button Name="OkBtn" Grid.Row="0" Grid.Column="1" Style="{DynamicResource OmagCut_GradientBlueIconButton}"
|
||||
Margin="5,-10,5,15"
|
||||
Command="{Binding OkCommand}">
|
||||
<Image Source="{DynamicResource VImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="ExitBtn" Grid.Row="0" Grid.Column="3" Style="{DynamicResource OmagCut_GradientBlueIconButton}"
|
||||
Margin="5,-10,5,15"
|
||||
IsCancel="True">
|
||||
<Image Source="{DynamicResource XImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
||||
</Border>
|
||||
|
||||
</Window>
|
||||
@@ -0,0 +1,33 @@
|
||||
Imports EgtWPFLib5
|
||||
Public Class ImportExportMachiningWindowWD
|
||||
|
||||
Private m_MainWindow As MainWindow = DirectCast(Application.Current.MainWindow, MainWindow)
|
||||
|
||||
Private WithEvents m_ImportExportMachiningWindowVM As ImportExportMachiningWindowVM
|
||||
|
||||
Private m_OkResult As Boolean = False
|
||||
Public ReadOnly Property OkResult As Boolean
|
||||
Get
|
||||
Return m_OkResult
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Sub New(Owner As Window, ImportExportToolWindowVM As ImportExportMachiningWindowVM)
|
||||
Me.Owner = Owner
|
||||
' This call is required by the designer.
|
||||
InitializeComponent()
|
||||
Me.DataContext = ImportExportToolWindowVM
|
||||
' Assegno al riferimento locale al VM il VM preso dal DataContext
|
||||
m_ImportExportMachiningWindowVM = ImportExportToolWindowVM
|
||||
End Sub
|
||||
Private Sub OkCloseDialogWD() Handles OkBtn.Click
|
||||
m_OkResult = True
|
||||
Me.Close()
|
||||
End Sub
|
||||
|
||||
Private Sub CancelCloseDialogWD() Handles ExitBtn.Click
|
||||
m_OkResult = False
|
||||
Me.Close()
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
@@ -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, EgtWPFLib5.WaterjetDbWindowVM).CloseWaterjetDb_OmagCut(m_MainWindow)
|
||||
If nPressedBtn = EgtWPFLib5.WaterjetDbWindowVM.SaveWndBtnEnum.CANCEL Then
|
||||
AlarmsBtn.IsChecked = False
|
||||
WaterJetBtn.IsChecked = True
|
||||
Return
|
||||
ElseIf nPressedBtn = EgtWPFLib5.WaterjetDbWindowVM.SaveWndBtnEnum.NO Then
|
||||
m_WaterJetPageUC.WaterJetPage_Reinitialize()
|
||||
End If
|
||||
' passo alla pagina Dati Macchina
|
||||
AlarmsBtn.IsChecked = True
|
||||
WaterJetBtn.IsChecked = False
|
||||
MachinePageGrid.Children.Remove(m_WaterJetPageUC)
|
||||
MachinePageGrid.Children.Add(m_AlarmsPageUC)
|
||||
m_ActiveMachinePage = MachinePages.Alarms
|
||||
Case MachinePages.MachineCN
|
||||
AlarmsBtn.IsChecked = True
|
||||
TestingPageBtn.IsChecked = False
|
||||
@@ -188,6 +213,22 @@ Public Class MachinePageUC
|
||||
MachinePageGrid.Children.Remove(m_PolishingsPageUC)
|
||||
MachinePageGrid.Children.Add(m_ToolsDbPageUC)
|
||||
m_ActiveMachinePage = MachinePages.ToolsDb
|
||||
Case MachinePages.WaterJet
|
||||
'Verifica ed eventuale salvataggio Db Waterjet
|
||||
Dim nPressedBtn As Integer = DirectCast(m_WaterJetPageUC.DataContext, EgtWPFLib5.WaterjetDbWindowVM).CloseWaterjetDb_OmagCut(m_MainWindow)
|
||||
If nPressedBtn = EgtWPFLib5.WaterjetDbWindowVM.SaveWndBtnEnum.CANCEL Then
|
||||
ToolsDBBtn.IsChecked = False
|
||||
WaterJetBtn.IsChecked = True
|
||||
Return
|
||||
ElseIf nPressedBtn = EgtWPFLib5.WaterjetDbWindowVM.SaveWndBtnEnum.NO Then
|
||||
m_WaterJetPageUC.WaterJetPage_Reinitialize()
|
||||
End If
|
||||
' passo alla pagina Dati Macchina
|
||||
ToolsDBBtn.IsChecked = True
|
||||
WaterJetBtn.IsChecked = False
|
||||
MachinePageGrid.Children.Remove(m_WaterJetPageUC)
|
||||
MachinePageGrid.Children.Add(m_ToolsDbPageUC)
|
||||
m_ActiveMachinePage = MachinePages.ToolsDb
|
||||
Case MachinePages.MachineCN
|
||||
ToolsDBBtn.IsChecked = True
|
||||
TestingPageBtn.IsChecked = False
|
||||
@@ -242,6 +283,22 @@ Public Class MachinePageUC
|
||||
MachinePageGrid.Children.Remove(m_PolishingsPageUC)
|
||||
MachinePageGrid.Children.Add(m_MachiningDbPageUC)
|
||||
m_ActiveMachinePage = MachinePages.MachiningDb
|
||||
Case MachinePages.WaterJet
|
||||
' Verifica ed eventuale salvataggio Db Waterjet
|
||||
Dim nPressedBtn As Integer = DirectCast(m_WaterJetPageUC.DataContext, EgtWPFLib5.WaterjetDbWindowVM).CloseWaterjetDb_OmagCut(m_MainWindow)
|
||||
If nPressedBtn = EgtWPFLib5.WaterjetDbWindowVM.SaveWndBtnEnum.CANCEL Then
|
||||
MachiningDBBtn.IsChecked = False
|
||||
WaterJetBtn.IsChecked = True
|
||||
Return
|
||||
ElseIf nPressedBtn = EgtWPFLib5.WaterjetDbWindowVM.SaveWndBtnEnum.NO Then
|
||||
m_WaterJetPageUC.WaterJetPage_Reinitialize()
|
||||
End If
|
||||
' passo alla pagina Dati Macchina
|
||||
MachiningDBBtn.IsChecked = True
|
||||
WaterJetBtn.IsChecked = False
|
||||
MachinePageGrid.Children.Remove(m_WaterJetPageUC)
|
||||
MachinePageGrid.Children.Add(m_MachiningDbPageUC)
|
||||
m_ActiveMachinePage = MachinePages.MachiningDb
|
||||
Case MachinePages.MachineCN
|
||||
MachiningDBBtn.IsChecked = True
|
||||
TestingPageBtn.IsChecked = False
|
||||
@@ -299,6 +356,22 @@ Public Class MachinePageUC
|
||||
m_ActiveMachinePage = MachinePages.Polishings
|
||||
Case MachinePages.Polishings
|
||||
PolishingsBtn.IsChecked = True
|
||||
Case MachinePages.WaterJet
|
||||
' Verifica ed eventuale salvataggio Db Waterjet
|
||||
Dim nPressedBtn As Integer = DirectCast(m_WaterJetPageUC.DataContext, EgtWPFLib5.WaterjetDbWindowVM).CloseWaterjetDb_OmagCut(m_MainWindow)
|
||||
If nPressedBtn = EgtWPFLib5.WaterjetDbWindowVM.SaveWndBtnEnum.CANCEL Then
|
||||
PolishingsBtn.IsChecked = False
|
||||
WaterJetBtn.IsChecked = True
|
||||
Return
|
||||
ElseIf nPressedBtn = EgtWPFLib5.WaterjetDbWindowVM.SaveWndBtnEnum.NO Then
|
||||
m_WaterJetPageUC.WaterJetPage_Reinitialize()
|
||||
End If
|
||||
' passo alla pagina Dati Macchina
|
||||
PolishingsBtn.IsChecked = True
|
||||
WaterJetBtn.IsChecked = False
|
||||
MachinePageGrid.Children.Remove(m_WaterJetPageUC)
|
||||
MachinePageGrid.Children.Add(m_PolishingsPageUC)
|
||||
m_ActiveMachinePage = MachinePages.Polishings
|
||||
Case MachinePages.MachineCN
|
||||
PolishingsBtn.IsChecked = True
|
||||
TestingPageBtn.IsChecked = False
|
||||
@@ -314,6 +387,77 @@ Public Class MachinePageUC
|
||||
End Select
|
||||
End Sub
|
||||
|
||||
Private Sub WaterJetBtn_Click(sender As Object, e As RoutedEventArgs) Handles WaterJetBtn.Click
|
||||
Select Case m_ActiveMachinePage
|
||||
Case MachinePages.Alarms
|
||||
AlarmsBtn.IsChecked = False
|
||||
WaterJetBtn.IsChecked = True
|
||||
MachinePageGrid.Children.Remove(m_AlarmsPageUC)
|
||||
MachinePageGrid.Children.Add(m_WaterJetPageUC)
|
||||
m_ActiveMachinePage = MachinePages.WaterJet
|
||||
'DirectCast(m_WaterJetPageUC.DataContext, WaterjetDbWindowVM).RefreshDImensionPage()
|
||||
Case MachinePages.ToolsDb
|
||||
' Verifica ed eventuale salvataggio utensile corrente
|
||||
If Not m_ToolsDbPageUC.SaveCurrTool() Then
|
||||
PolishingsBtn.IsChecked = False
|
||||
ToolsDBBtn.IsChecked = True
|
||||
Return
|
||||
End If
|
||||
' salvo il DB utensili
|
||||
EgtSetCurrentContext(m_MainWindow.m_CurrentProjectPageUC.CurrentProjectScene.GetCtx())
|
||||
EgtTdbSave()
|
||||
' passo alla pagina WaterJet
|
||||
WaterJetBtn.IsChecked = True
|
||||
ToolsDBBtn.IsChecked = False
|
||||
MachinePageGrid.Children.Remove(m_ToolsDbPageUC)
|
||||
MachinePageGrid.Children.Add(m_WaterJetPageUC)
|
||||
m_ActiveMachinePage = MachinePages.WaterJet
|
||||
Case MachinePages.MachiningDb
|
||||
' Verifica ed eventuale salvataggio lavorazione corrente
|
||||
If Not m_MachiningDbPageUC.SaveCurrMachining() Then
|
||||
WaterJetBtn.IsChecked = False
|
||||
MachiningDBBtn.IsChecked = True
|
||||
Return
|
||||
End If
|
||||
' salvo il DB lavorazioni
|
||||
EgtSetCurrentContext(m_MainWindow.m_CurrentProjectPageUC.CurrentProjectScene.GetCtx())
|
||||
EgtMdbSave()
|
||||
' passo alla pagina WaterJet
|
||||
WaterJetBtn.IsChecked = True
|
||||
MachiningDBBtn.IsChecked = False
|
||||
MachinePageGrid.Children.Remove(m_MachiningDbPageUC)
|
||||
MachinePageGrid.Children.Add(m_WaterJetPageUC)
|
||||
m_ActiveMachinePage = MachinePages.WaterJet
|
||||
Case MachinePages.Polishings
|
||||
' Verifica ed eventuale salvataggio Lucidatura corrente
|
||||
If Not m_PolishingsPageUC.SaveKit() Then
|
||||
WaterJetBtn.IsChecked = False
|
||||
PolishingsBtn.IsChecked = True
|
||||
Return
|
||||
End If
|
||||
' passo alla pagina WaterJet
|
||||
WaterJetBtn.IsChecked = True
|
||||
PolishingsBtn.IsChecked = False
|
||||
MachinePageGrid.Children.Remove(m_PolishingsPageUC)
|
||||
MachinePageGrid.Children.Add(m_WaterJetPageUC)
|
||||
m_ActiveMachinePage = MachinePages.WaterJet
|
||||
Case MachinePages.WaterJet
|
||||
WaterJetBtn.IsChecked = True
|
||||
Case MachinePages.MachineCN
|
||||
WaterJetBtn.IsChecked = True
|
||||
TestingPageBtn.IsChecked = False
|
||||
MachinePageGrid.Children.Remove(m_MachineCNPageUC)
|
||||
MachinePageGrid.Children.Add(m_WaterJetPageUC)
|
||||
m_ActiveMachinePage = MachinePages.WaterJet
|
||||
Case MachinePages.Statistics
|
||||
WaterJetBtn.IsChecked = True
|
||||
StatisticsBtn.IsChecked = False
|
||||
MachinePageGrid.Children.Remove(m_StatisticsPageUC)
|
||||
MachinePageGrid.Children.Add(m_WaterJetPageUC)
|
||||
m_ActiveMachinePage = MachinePages.WaterJet
|
||||
End Select
|
||||
End Sub
|
||||
|
||||
Private Sub TestingPageBtn_Checked(sender As Object, e As RoutedEventArgs) Handles TestingPageBtn.Checked
|
||||
Select Case m_ActiveMachinePage
|
||||
Case MachinePages.Alarms
|
||||
@@ -367,6 +511,22 @@ Public Class MachinePageUC
|
||||
MachinePageGrid.Children.Remove(m_PolishingsPageUC)
|
||||
MachinePageGrid.Children.Add(m_MachineCNPageUC)
|
||||
m_ActiveMachinePage = MachinePages.MachineCN
|
||||
Case MachinePages.WaterJet
|
||||
' Verifica ed eventuale salvataggio Db Waterjet
|
||||
Dim nPressedBtn As Integer = DirectCast(m_WaterJetPageUC.DataContext, EgtWPFLib5.WaterjetDbWindowVM).CloseWaterjetDb_OmagCut(m_MainWindow)
|
||||
If nPressedBtn = EgtWPFLib5.WaterjetDbWindowVM.SaveWndBtnEnum.CANCEL Then
|
||||
TestingPageBtn.IsChecked = False
|
||||
WaterJetBtn.IsChecked = True
|
||||
Return
|
||||
ElseIf nPressedBtn = EgtWPFLib5.WaterjetDbWindowVM.SaveWndBtnEnum.NO Then
|
||||
m_WaterJetPageUC.WaterJetPage_Reinitialize()
|
||||
End If
|
||||
' passo alla pagina Dati Macchina
|
||||
TestingPageBtn.IsChecked = True
|
||||
WaterJetBtn.IsChecked = False
|
||||
MachinePageGrid.Children.Remove(m_WaterJetPageUC)
|
||||
MachinePageGrid.Children.Add(m_MachineCNPageUC)
|
||||
m_ActiveMachinePage = MachinePages.MachineCN
|
||||
Case MachinePages.MachineCN
|
||||
TestingPageBtn.IsChecked = True
|
||||
Case MachinePages.Statistics
|
||||
@@ -431,6 +591,22 @@ Public Class MachinePageUC
|
||||
MachinePageGrid.Children.Remove(m_PolishingsPageUC)
|
||||
MachinePageGrid.Children.Add(m_StatisticsPageUC)
|
||||
m_ActiveMachinePage = MachinePages.Statistics
|
||||
Case MachinePages.WaterJet
|
||||
' Verifica ed eventuale salvataggio Db Waterjet
|
||||
Dim nPressedBtn As Integer = DirectCast(m_WaterJetPageUC.DataContext, EgtWPFLib5.WaterjetDbWindowVM).CloseWaterjetDb_OmagCut(m_MainWindow)
|
||||
If nPressedBtn = EgtWPFLib5.WaterjetDbWindowVM.SaveWndBtnEnum.CANCEL Then
|
||||
StatisticsBtn.IsChecked = False
|
||||
WaterJetBtn.IsChecked = True
|
||||
Return
|
||||
ElseIf nPressedBtn = EgtWPFLib5.WaterjetDbWindowVM.SaveWndBtnEnum.NO Then
|
||||
m_WaterJetPageUC.WaterJetPage_Reinitialize()
|
||||
End If
|
||||
' passo alla pagina Dati Macchina
|
||||
TestingPageBtn.IsChecked = True
|
||||
WaterJetBtn.IsChecked = False
|
||||
MachinePageGrid.Children.Remove(m_WaterJetPageUC)
|
||||
MachinePageGrid.Children.Add(m_StatisticsPageUC)
|
||||
m_ActiveMachinePage = MachinePages.Statistics
|
||||
Case MachinePages.MachineCN
|
||||
StatisticsBtn.IsChecked = True
|
||||
TestingPageBtn.IsChecked = False
|
||||
@@ -467,6 +643,19 @@ Public Class MachinePageUC
|
||||
MachinePageGrid.Children.Remove(m_PolishingsPageUC)
|
||||
MachinePageGrid.Children.Add(m_AlarmsPageUC)
|
||||
m_ActiveMachinePage = MachinePages.Alarms
|
||||
Case MachinePages.WaterJet
|
||||
' Verifica ed eventuale salvataggio Lucidatura corrente
|
||||
'If Not m_PolishingsPageUC.SaveKit() Then
|
||||
' AlarmsBtn.IsChecked = False
|
||||
' PolishingsBtn.IsChecked = True
|
||||
' Return
|
||||
'End If
|
||||
' passo alla pagina Dati Macchina
|
||||
AlarmsBtn.IsChecked = True
|
||||
WaterJetBtn.IsChecked = False
|
||||
MachinePageGrid.Children.Remove(m_WaterJetPageUC)
|
||||
MachinePageGrid.Children.Add(m_AlarmsPageUC)
|
||||
m_ActiveMachinePage = MachinePages.Alarms
|
||||
Case MachinePages.MachineCN
|
||||
AlarmsBtn.IsChecked = True
|
||||
TestingPageBtn.IsChecked = False
|
||||
|
||||
@@ -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)
|
||||
Dim ExportWnd As New ImportExportMachiningWindowWD(Application.Current.MainWindow, ExportWndVM)
|
||||
|
||||
ExportWnd.ShowDialog()
|
||||
End Sub
|
||||
|
||||
Private Sub ImoportBtn_Click() Handles ImportBtn.Click
|
||||
' contesto corrente
|
||||
EgtSetCurrentContext(m_MainWindow.m_CurrentProjectPageUC.CurrentProjectScene.GetCtx())
|
||||
' apro dialogo di scelta file
|
||||
Dim ImportFileDlg As New Microsoft.Win32.OpenFileDialog() With {
|
||||
.Title = EgtMsg(31161) & " " & EgtMsg(31163),
|
||||
.DefaultExt = ".data",
|
||||
.Filter = "Machinings (.data)|*.data",
|
||||
.CheckFileExists = True,
|
||||
.ValidateNames = True
|
||||
}
|
||||
If ImportFileDlg.ShowDialog() <> True Then Return
|
||||
Dim ImportFilePath As String = ImportFileDlg.FileName
|
||||
' recupero liste utensili da importare
|
||||
Dim ImportFileMachiningNameList As String() = Nothing
|
||||
Dim ImportFileMachiningFamilyList As Integer() = Nothing
|
||||
If Not EgtMdbToBeImported(ImportFilePath, ImportFileMachiningNameList, ImportFileMachiningFamilyList) Then Return
|
||||
' li inserisco in lista per finestra di scelta
|
||||
Dim MachinigToImportList As New ObservableCollection(Of ImpExpMachiningFamily)
|
||||
' creo famiglie di utensili in base a quelle trovate in lista importata
|
||||
For MachiningIndex As Integer = 0 To ImportFileMachiningNameList.Count - 1
|
||||
Dim MachiningName As String = ImportFileMachiningNameList(MachiningIndex)
|
||||
Dim MachiningFamily As Integer = ImportFileMachiningFamilyList(MachiningIndex)
|
||||
MachiningFamily = MachiningFamily And
|
||||
(MCH_MY.DRILLING Or
|
||||
MCH_MY.SAWING Or
|
||||
MCH_MY.MILLING Or
|
||||
MCH_MY.POCKETING Or
|
||||
MCH_MY.MORTISING Or
|
||||
MCH_MY.SAWROUGHING Or
|
||||
MCH_MY.SAWFINISHING Or
|
||||
MCH_MY.GENMACHINING Or
|
||||
MCH_MY.CHISELING Or
|
||||
MCH_MY.SURFROUGHING Or
|
||||
MCH_MY.SURFFINISHING Or
|
||||
MCH_MY.WATERJETTING)
|
||||
Dim bFounded As Boolean = False
|
||||
Dim MachinigToImportFamily As ImpExpMachiningFamily
|
||||
For Each MachinigToImportFamily In MachinigToImportList
|
||||
If (MachiningFamily = MachinigToImportFamily.FamilyType) Then
|
||||
MachinigToImportFamily.MachiningList.Add(New ImpExpMachiningItem(MachiningName, AlreadyExist(MachiningName)))
|
||||
bFounded = True
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
If Not bFounded Then
|
||||
Dim NewFamily As New ImpExpMachiningFamily(GetMachiningFamilyName(MachiningFamily), MachiningFamily)
|
||||
NewFamily.MachiningList.Add(New ImpExpMachiningItem(MachiningName, AlreadyExist(MachiningName)))
|
||||
MachinigToImportList.Add(NewFamily)
|
||||
End If
|
||||
Next
|
||||
Dim ImportWndVM As New ImportExportMachiningWindowVM(MachinigToImportList, ImportFilePath, ImportFileMachiningNameList)
|
||||
Dim ImportWnd As New ImportExportMachiningWindowWD(Application.Current.MainWindow, ImportWndVM)
|
||||
|
||||
ImportWnd.ShowDialog()
|
||||
' Aggiungo all'albero visualizzato gli utensili appena importati
|
||||
If ImportWnd.OkResult Then
|
||||
LoadImportedMachineMachinings(ImportWndVM.vsImported)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Function AlreadyExist(MachiningName As String) As Boolean
|
||||
Dim MachiningFamily As CathegoryItem
|
||||
For Each MachiningFamily In MachiningsList
|
||||
Dim MachiningItem As CustomItem
|
||||
For Each MachiningItem In MachiningFamily.Items
|
||||
If MachiningName = MachiningItem.Name Then
|
||||
Return True
|
||||
End If
|
||||
Next
|
||||
Next
|
||||
Return False
|
||||
End Function
|
||||
|
||||
Private Function GetMachiningFamilyName(NewMachinigFamily As Integer) As String
|
||||
Dim MachiningFamily As CathegoryItem
|
||||
For Each MachiningFamily In MachiningsList
|
||||
If NewMachinigFamily = MachiningFamily.nTType Then
|
||||
Return MachiningFamily.Name
|
||||
End If
|
||||
Next
|
||||
Return ""
|
||||
End Function
|
||||
|
||||
Private Sub LoadImportedMachineMachinings(vsImportedMachinings As String())
|
||||
' Leggo tutte le lavorazioni presenti nella Macchina (quindi anche quelli appena importati).
|
||||
Dim ActiveMachiningsFamilies() As MachiningsType = MyReadMachiningFamilies(m_MainWindow.m_CurrentMachine.sMachIniFile)
|
||||
Dim MachiningsFamilyIndex As Integer = 0
|
||||
Dim MachiningsFamilyItem As MachiningsType
|
||||
For Each MachiningsFamilyItem In ActiveMachiningsFamilies
|
||||
Dim FamilyTreeView As New CathegoryItem(MachiningsFamilyItem.Name, MachiningsFamilyItem.Id)
|
||||
Dim MachiningFamilyItem = MachiningsList.FirstOrDefault(Function(MachiningFamily) MachiningsFamilyItem.Id = MachiningFamily.nTType)
|
||||
If IsNothing(MachiningFamilyItem) Then
|
||||
MachiningsList.Insert(MachiningsFamilyIndex, FamilyTreeView)
|
||||
End If
|
||||
Dim nType As Integer = 0
|
||||
Dim MachiningName As String = String.Empty
|
||||
Dim MachiningIndex As Integer = 0
|
||||
EgtSetCurrentContext(m_MainWindow.m_CurrentProjectPageUC.CurrentProjectScene.GetCtx())
|
||||
Dim bFound As Boolean = EgtMdbGetFirstMachining(MachiningsFamilyItem.Id, MachiningName)
|
||||
While bFound
|
||||
Dim MachiningItem = MachiningsList(MachiningsFamilyIndex).Items.FirstOrDefault(Function(Machining) Machining.Name = MachiningName)
|
||||
Dim bInList As Boolean = vsImportedMachinings.Contains(MachiningName)
|
||||
If bInList Then
|
||||
' Se una lavorazione è presente nella MachiningsList visualizzata ma nel contempo è nell'array vsImported
|
||||
' vuol dire che è stata sovrascritta perciò la rimuovo
|
||||
MachiningsList(MachiningsFamilyIndex).Items.Remove(MachiningsList(MachiningsFamilyIndex).Items.FirstOrDefault(Function(Machining) Machining.Name = MachiningName))
|
||||
End If
|
||||
If bInList OrElse IsNothing(MachiningItem) Then
|
||||
' recupero tuuid
|
||||
EgtMdbSetCurrMachining(MachiningName)
|
||||
Dim sCurrMachTUUID As String = String.Empty
|
||||
EgtMdbGetCurrMachiningParam(MCH_MP.TUUID, sCurrMachTUUID)
|
||||
' aggiungo la lavorazione importata
|
||||
MachiningsList(MachiningsFamilyIndex).Items.Insert(MachiningIndex, New CustomItem(MachiningName, MachiningsFamilyItem.Id, ToolDbUtility.IsToolInDb(sCurrMachTUUID)))
|
||||
' eventualmente evidezio l'ultimo elemento inserito (ERRORE: non espando l'albero)
|
||||
'MachiningsList(MachiningsFamilyIndex).Items(MachiningIndex).IsSelected = True
|
||||
End If
|
||||
MachiningIndex += 1
|
||||
bFound = EgtMdbGetNextMachining(MachiningsFamilyItem.Id, MachiningName)
|
||||
End While
|
||||
MachiningsFamilyIndex += 1
|
||||
Next
|
||||
End Sub
|
||||
|
||||
Public Function MyReadMachiningFamilies(sMachineIniPath As String) As MachiningsType()
|
||||
Dim ActiveMachiningsFamiliesList As New List(Of MachiningsType)
|
||||
' Se il materiale lavorato è Marmo l'ordine di lettura e inserimento di Foratura e Taglio di lama nelle famiglie di lavorazioni attive è invertito
|
||||
|
||||
If EgtUILib.GetPrivateProfileInt(S_MACHININGS, K_SAWING, 0, sMachineIniPath) <> 0 Then
|
||||
ActiveMachiningsFamiliesList.Add(New MachiningsType With {.Id = MCH_MY.SAWING, .Name = EgtMsg(31200 + 2)})
|
||||
End If
|
||||
If EgtUILib.GetPrivateProfileInt(S_MACHININGS, K_DRILLING, 0, sMachineIniPath) <> 0 Then
|
||||
ActiveMachiningsFamiliesList.Add(New MachiningsType With {.Id = MCH_MY.DRILLING, .Name = EgtMsg(31200 + 1)})
|
||||
End If
|
||||
|
||||
If EgtUILib.GetPrivateProfileInt(S_MACHININGS, K_MILLING, 0, sMachineIniPath) <> 0 Then
|
||||
ActiveMachiningsFamiliesList.Add(New MachiningsType With {.Id = MCH_MY.MILLING, .Name = EgtMsg(31200 + 3)})
|
||||
End If
|
||||
If EgtUILib.GetPrivateProfileInt(S_MACHININGS, K_POCKETING, 0, sMachineIniPath) <> 0 Then
|
||||
ActiveMachiningsFamiliesList.Add(New MachiningsType With {.Id = MCH_MY.POCKETING, .Name = EgtMsg(31200 + 4)})
|
||||
End If
|
||||
If EgtUILib.GetPrivateProfileInt(S_MACHININGS, K_MORTISING, 0, sMachineIniPath) <> 0 Then
|
||||
ActiveMachiningsFamiliesList.Add(New MachiningsType With {.Id = MCH_MY.MORTISING, .Name = EgtMsg(31200 + 5)})
|
||||
End If
|
||||
If EgtUILib.GetPrivateProfileInt(S_MACHININGS, K_SAWROUGHING, 0, sMachineIniPath) <> 0 Then
|
||||
ActiveMachiningsFamiliesList.Add(New MachiningsType With {.Id = MCH_MY.SAWROUGHING, .Name = EgtMsg(31200 + 6)})
|
||||
End If
|
||||
If EgtUILib.GetPrivateProfileInt(S_MACHININGS, K_SAWFINISHING, 0, sMachineIniPath) <> 0 Then
|
||||
ActiveMachiningsFamiliesList.Add(New MachiningsType With {.Id = MCH_MY.SAWFINISHING, .Name = EgtMsg(31200 + 7)})
|
||||
End If
|
||||
If EgtUILib.GetPrivateProfileInt(S_MACHININGS, K_GENMACHINING, 0, sMachineIniPath) <> 0 Then
|
||||
ActiveMachiningsFamiliesList.Add(New MachiningsType With {.Id = MCH_MY.GENMACHINING, .Name = EgtMsg(31200 + 8)})
|
||||
End If
|
||||
If EgtUILib.GetPrivateProfileInt(S_MACHININGS, K_CHISELING, 0, sMachineIniPath) <> 0 Then
|
||||
ActiveMachiningsFamiliesList.Add(New MachiningsType With {.Id = MCH_MY.CHISELING, .Name = EgtMsg(31200 + 9)})
|
||||
End If
|
||||
If EgtUILib.GetPrivateProfileInt(S_MACHININGS, K_SURFFINISHING, 0, sMachineIniPath) <> 0 Then
|
||||
ActiveMachiningsFamiliesList.Add(New MachiningsType With {.Id = MCH_MY.SURFFINISHING, .Name = EgtMsg(31211)})
|
||||
End If
|
||||
If EgtUILib.GetPrivateProfileInt(S_MACHININGS, K_WATERJETTING, 0, sMachineIniPath) <> 0 Then
|
||||
ActiveMachiningsFamiliesList.Add(New MachiningsType With {.Id = MCH_MY.WATERJETTING, .Name = EgtMsg(31210)})
|
||||
End If
|
||||
Return ActiveMachiningsFamiliesList.ToArray
|
||||
End Function
|
||||
|
||||
Private Sub InitializeMachiningFamily(bEnabled As Boolean, nFType As Integer, sFName As String)
|
||||
If Not bEnabled Then Return
|
||||
' Inserisco categoria ed eventuali elementi
|
||||
@@ -362,12 +552,15 @@ Public Class MachiningDbPageUC
|
||||
HeadSideCmBx.SelectedIndex = ToolInt - 1
|
||||
EgtMdbGetCurrMachiningParam(MCH_MP.LEADINTYPE, ToolInt)
|
||||
If LeadInTypeCmBx.Items.Count > 0 Then
|
||||
LeadInTypeCmBx.SelectedItem = LeadInTypeCmBx.Items(0)
|
||||
LeadInTypeCmBx.SelectedItem = LeadInTypeCmBx.Items(0)
|
||||
Else
|
||||
LeadInTypeCmBx.SelectedItem = Nothing
|
||||
End If
|
||||
For Each LInType As IdNameStruct In LeadInTypeCmBx.Items
|
||||
If ToolInt = LInType.Id Then LeadInTypeCmBx.SelectedItem = LInType
|
||||
If ToolInt = LInType.Id Then
|
||||
LeadInTypeCmBx.SelectedItem = LInType
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
EgtMdbGetCurrMachiningParam(MCH_MP.EXTLINKTYPE, ToolInt)
|
||||
ExtLinkTypeCmBx.SelectedIndex = ToolInt
|
||||
@@ -515,7 +708,11 @@ Public Class MachiningDbPageUC
|
||||
' Lista materiali
|
||||
m_MaterialsList.Clear()
|
||||
For Each Material As Material In m_MainWindow.m_CurrentMachine.Materials
|
||||
m_MaterialsList.Add(New MachiningMaterial(Material.nId, Material.sName))
|
||||
If m_MainWindow.m_CurrentMachine.bWaterJet And m_MainWindow.m_CurrentMachine.bFromDBWaterJet Then
|
||||
m_MaterialsList.Add(New MachiningMaterial(Material.nId, Material.sName, Material.SubId))
|
||||
Else
|
||||
m_MaterialsList.Add(New MachiningMaterial(Material.nId, Material.sName))
|
||||
End If
|
||||
Next
|
||||
EgtMdbGetCurrMachiningParam(MCH_MP.SYSNOTES, ToolString)
|
||||
If ToolString <> String.Empty Then
|
||||
@@ -523,14 +720,30 @@ Public Class MachiningDbPageUC
|
||||
Dim Index As Integer = 0
|
||||
For Each Material As MachiningMaterial In m_MaterialsList
|
||||
Dim Param() As String = sItems(Index).Split(",".ToCharArray)
|
||||
Dim SubParam() As String = Param(0).Split(".".ToCharArray)
|
||||
Dim nParId As Integer = 0
|
||||
If StringToInt(Param(0), nParId) AndAlso nParId = Material.nId Then
|
||||
StringToDouble(Param(1), Material.dMinThickness)
|
||||
StringToDouble(Param(2), Material.dMaxThickness)
|
||||
Material.VerifyIfActive()
|
||||
Index += 1
|
||||
Dim nSubParId As Integer = 0
|
||||
If m_MainWindow.m_CurrentMachine.bWaterJet And m_MainWindow.m_CurrentMachine.bFromDBWaterJet Then
|
||||
If StringToInt(SubParam(0), nParId) AndAlso nParId = Material.nId AndAlso SubParam.Count > 1 AndAlso
|
||||
StringToInt(SubParam(1), nSubParId) AndAlso nSubParId = Material.nSubId Then
|
||||
|
||||
StringToDouble(Param(1), Material.dMinThickness)
|
||||
StringToDouble(Param(2), Material.dMaxThickness)
|
||||
Material.VerifyIfActive()
|
||||
Index += 1
|
||||
Else
|
||||
Material.VerifyIfActive()
|
||||
End If
|
||||
Else
|
||||
Material.VerifyIfActive()
|
||||
If StringToInt(Param(0), nParId) AndAlso nParId = Material.nId Then
|
||||
|
||||
StringToDouble(Param(1), Material.dMinThickness)
|
||||
StringToDouble(Param(2), Material.dMaxThickness)
|
||||
Material.VerifyIfActive()
|
||||
Index += 1
|
||||
Else
|
||||
Material.VerifyIfActive()
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
@@ -609,13 +822,13 @@ Public Class MachiningDbPageUC
|
||||
' Parmetri nascosti di svuotatura
|
||||
If nMachiningType = MCH_MY.POCKETING Then
|
||||
EgtMdbSetCurrMachiningParam(MCH_MP.SUBTYPE, MCH_POCK_SUB.SPIRALOUT)
|
||||
EgtMdbSetCurrMachiningParam( MCH_MP.LEADINTYPE, MCH_POCK_LI.HELIX)
|
||||
' EgtMdbSetCurrMachiningParam( MCH_MP.LEADINTYPE, MCH_POCK_LI.HELIX)
|
||||
Dim dToolDiam As Double = 100
|
||||
If Not IsNothing(ToolCmBx.SelectedItem) Then
|
||||
EgtTdbSetCurrTool( ToolCmBx.SelectedItem.ToString())
|
||||
EgtTdbGetCurrToolParam( MCH_TP.DIAM, dToolDiam)
|
||||
End If
|
||||
EgtMdbSetCurrMachiningParam( MCH_MP.LITANG, 0.495 * dToolDiam)
|
||||
EgtMdbSetCurrMachiningParam(MCH_MP.LITANG, 0.99 * dToolDiam)
|
||||
EgtMdbSetCurrMachiningParam( MCH_MP.LIELEV, 2.0)
|
||||
End If
|
||||
' Parametri WaterJetting
|
||||
@@ -684,8 +897,14 @@ Public Class MachiningDbPageUC
|
||||
' Scrivo stringa materiali da lista
|
||||
Dim sMaterialString As String = String.Empty
|
||||
For Each Material As MachiningMaterial In m_MaterialsList
|
||||
If Material.bIsActive Then
|
||||
sMaterialString += Material.nId.ToString & "," & DoubleToString(Material.dMinThickness, 0) & "," & DoubleToString(Material.dMaxThickness, 0) & ";"
|
||||
If m_MainWindow.m_CurrentMachine.bWaterJet And m_MainWindow.m_CurrentMachine.bFromDBWaterJet Then
|
||||
If Material.bIsActive Then
|
||||
sMaterialString += Material.nId.ToString & "." & Material.nSubId.ToString & "," & DoubleToString(Material.dMinThickness, 0) & "," & DoubleToString(Material.dMaxThickness, 0) & ";"
|
||||
End If
|
||||
Else
|
||||
If Material.bIsActive Then
|
||||
sMaterialString += Material.nId.ToString & "," & DoubleToString(Material.dMinThickness, 0) & "," & DoubleToString(Material.dMaxThickness, 0) & ";"
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
EgtMdbSetCurrMachiningParam(MCH_MP.SYSNOTES, sMaterialString)
|
||||
@@ -922,30 +1141,26 @@ Public Class MachiningDbPageUC
|
||||
' Definizione della grid TypeGrd con la giusta altezza e numero di righe
|
||||
Dim RowNum As Integer = TypeGrd.RowDefinitions.Count
|
||||
If RowNum > 2 Then
|
||||
' elimino eventuali righe in eccesso
|
||||
For Index As Integer = RowNum - 1 To 2 Step -1
|
||||
TypeGrd.RowDefinitions.RemoveAt(Index)
|
||||
Next
|
||||
LeadInTypeTxBl.SetValue(Grid.ColumnProperty, 2)
|
||||
LeadInTypeCmBx.SetValue(Grid.ColumnProperty, 3)
|
||||
LeadOutTypeTxBl.SetValue(Grid.RowProperty, 1)
|
||||
LeadOutTypeTxBl.SetValue(Grid.ColumnProperty, 2)
|
||||
LeadOutTypeCmBx.SetValue(Grid.RowProperty, 1)
|
||||
LeadOutTypeCmBx.SetValue(Grid.ColumnProperty, 3)
|
||||
TypeBrd.SetValue(Grid.RowProperty, 12)
|
||||
TypeBrd.SetValue(Grid.RowSpanProperty, 6)
|
||||
ElseIf RowNum < 2 Then
|
||||
' costruiso una riga in più da inserire
|
||||
Dim Row As New RowDefinition
|
||||
TypeGrd.RowDefinitions.Add(Row)
|
||||
LeadInTypeTxBl.SetValue(Grid.ColumnProperty, 2)
|
||||
LeadInTypeCmBx.SetValue(Grid.ColumnProperty, 3)
|
||||
LeadOutTypeTxBl.SetValue(Grid.RowProperty, 1)
|
||||
LeadOutTypeTxBl.SetValue(Grid.ColumnProperty, 2)
|
||||
LeadOutTypeCmBx.SetValue(Grid.RowProperty, 1)
|
||||
LeadOutTypeCmBx.SetValue(Grid.ColumnProperty, 3)
|
||||
TypeBrd.SetValue(Grid.RowProperty, 12)
|
||||
TypeBrd.SetValue(Grid.RowSpanProperty, 6)
|
||||
End If
|
||||
LeadInTypeTxBl.SetValue(Grid.RowProperty, 1)
|
||||
LeadInTypeTxBl.SetValue(Grid.ColumnProperty, 0)
|
||||
LeadInTypeCmBx.SetValue(Grid.RowProperty, 1)
|
||||
LeadInTypeCmBx.SetValue(Grid.ColumnProperty, 1)
|
||||
LeadOutTypeTxBl.SetValue(Grid.RowProperty, 1)
|
||||
LeadOutTypeTxBl.SetValue(Grid.ColumnProperty, 2)
|
||||
LeadOutTypeCmBx.SetValue(Grid.RowProperty, 1)
|
||||
LeadOutTypeCmBx.SetValue(Grid.ColumnProperty, 3)
|
||||
TypeBrd.SetValue(Grid.RowProperty, 12)
|
||||
TypeBrd.SetValue(Grid.RowSpanProperty, 6)
|
||||
|
||||
LeadInTypeTxBl.Visibility = Windows.Visibility.Visible
|
||||
LeadInTypeCmBx.Visibility = Windows.Visibility.Visible
|
||||
ExtLinkTypeTxBl.Visibility = Windows.Visibility.Hidden
|
||||
@@ -1563,7 +1778,7 @@ Public Class MachiningDbPageUC
|
||||
StepTypeTxBl.Visibility = Windows.Visibility.Hidden
|
||||
StepTypeCmBx.Visibility = Windows.Visibility.Hidden
|
||||
SideBrd.SetValue(Grid.RowProperty, 9)
|
||||
SideBrd.Visibility = Windows.Visibility.Visible
|
||||
SideBrd.Visibility = Windows.Visibility.Hidden
|
||||
WorkSideTxBl.Visibility = Windows.Visibility.Hidden
|
||||
WorkSideCmBx.Visibility = Windows.Visibility.Hidden
|
||||
HeadSideTxBl.Visibility = Windows.Visibility.Hidden
|
||||
@@ -1575,15 +1790,22 @@ Public Class MachiningDbPageUC
|
||||
For Index As Integer = RowNum - 1 To 2 Step -1
|
||||
TypeGrd.RowDefinitions.RemoveAt(Index)
|
||||
Next
|
||||
LeadInTypeTxBl.SetValue(Grid.ColumnProperty, 2)
|
||||
LeadInTypeCmBx.SetValue(Grid.ColumnProperty, 3)
|
||||
LeadOutTypeTxBl.SetValue(Grid.RowProperty, 1)
|
||||
LeadOutTypeTxBl.SetValue(Grid.ColumnProperty, 2)
|
||||
LeadOutTypeCmBx.SetValue(Grid.RowProperty, 1)
|
||||
LeadOutTypeCmBx.SetValue(Grid.ColumnProperty, 3)
|
||||
TypeBrd.SetValue(Grid.RowProperty, 12)
|
||||
TypeBrd.SetValue(Grid.RowSpanProperty, 6)
|
||||
ElseIf RowNum < 2 Then
|
||||
' costruiso una riga in più da inserire
|
||||
Dim Row As New RowDefinition
|
||||
TypeGrd.RowDefinitions.Add(Row)
|
||||
End If
|
||||
LeadInTypeTxBl.SetValue(Grid.RowProperty, 1)
|
||||
LeadInTypeTxBl.SetValue(Grid.ColumnProperty, 0)
|
||||
LeadInTypeCmBx.SetValue(Grid.RowProperty, 1)
|
||||
LeadInTypeCmBx.SetValue(Grid.ColumnProperty, 1)
|
||||
LeadOutTypeTxBl.SetValue(Grid.RowProperty, 1)
|
||||
LeadOutTypeTxBl.SetValue(Grid.ColumnProperty, 2)
|
||||
LeadOutTypeCmBx.SetValue(Grid.RowProperty, 1)
|
||||
LeadOutTypeCmBx.SetValue(Grid.ColumnProperty, 3)
|
||||
TypeBrd.SetValue(Grid.RowProperty, 12)
|
||||
TypeBrd.SetValue(Grid.RowSpanProperty, 6)
|
||||
|
||||
LeadInTypeTxBl.Visibility = Windows.Visibility.Visible
|
||||
LeadInTypeCmBx.Visibility = Windows.Visibility.Visible
|
||||
ExtLinkTypeTxBl.Visibility = Windows.Visibility.Hidden
|
||||
@@ -2068,6 +2290,16 @@ Public Class MachiningDbPageUC
|
||||
|
||||
Private Sub MaxThicknessTxBx_EgtClosed(sender As Object, e As EventArgs) Handles MaxThicknessTxBx.EgtClosed
|
||||
Dim SelectedMaterial As MachiningMaterial = MaterialsList.SelectedItem
|
||||
Dim dMaxThick As Double = 0
|
||||
If m_MainWindow.m_CurrentMachine.bWaterJet And m_MainWindow.m_CurrentMachine.bFromDBWaterJet Then
|
||||
' solo per water jet controllo lo spessore massimo ammissibile
|
||||
dMaxThick = m_MainWindow.m_CurrentMachine.GetMaxThicknessCurrMaterial(SelectedMaterial.Name)
|
||||
Dim dVal As Double
|
||||
StringToLen(MaxThicknessTxBx.Text, dVal)
|
||||
If dVal > dMaxThick Then
|
||||
MaxThicknessTxBx.Text = LenToString(dMaxThick, 3)
|
||||
End If
|
||||
End If
|
||||
StringToLen(MaxThicknessTxBx.Text, SelectedMaterial.dMaxThickness)
|
||||
SelectedMaterial.VerifyIfActive()
|
||||
End Sub
|
||||
@@ -2143,7 +2375,6 @@ Public Class MachiningDbPageUC
|
||||
Case MCH_MY.POCKETING
|
||||
LeadInTypeCmBx.ItemsSource = New ObservableCollection(Of IdNameStruct)(
|
||||
{New IdNameStruct(MCH_POCK_LI.NONE, EgtMsg(MSG_COMBOBOXPARAM + 42)),
|
||||
New IdNameStruct(MCH_POCK_LI.GLIDE, EgtMsg(MSG_COMBOBOXPARAM + 48)),
|
||||
New IdNameStruct(MCH_POCK_LI.ZIGZAG, EgtMsg(MSG_COMBOBOXPARAM + 38)),
|
||||
New IdNameStruct(MCH_POCK_LI.HELIX, EgtMsg(MSG_COMBOBOXPARAM + 49))})
|
||||
LeadOutTypeCmBx.ItemsSource = New ObservableCollection(Of IdNameStruct)(
|
||||
@@ -2215,6 +2446,7 @@ Class MachiningMaterial
|
||||
Implements INotifyPropertyChanged
|
||||
|
||||
Private m_nId As Integer
|
||||
Private m_nSubId As Integer
|
||||
Private m_sName As String
|
||||
Private m_dMinThickness As Double
|
||||
Private m_dMaxThickness As Double
|
||||
@@ -2226,6 +2458,12 @@ Class MachiningMaterial
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property nSubId As Integer
|
||||
Get
|
||||
Return m_nSubId
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property Name As String
|
||||
Get
|
||||
Return m_sName
|
||||
@@ -2264,6 +2502,15 @@ Class MachiningMaterial
|
||||
m_bIsActive = False
|
||||
End Sub
|
||||
|
||||
Sub New(nId As Integer, sName As String, nSubId As Integer)
|
||||
m_nId = nId
|
||||
m_nSubId = nSubId
|
||||
m_sName = sName
|
||||
m_dMinThickness = 0
|
||||
m_dMaxThickness = 0
|
||||
m_bIsActive = False
|
||||
End Sub
|
||||
|
||||
Public Sub VerifyIfActive()
|
||||
Dim bIsActive As Boolean = ( m_dMaxThickness > m_dMinThickness + EPS_SMALL)
|
||||
If bIsActive <> m_bIsActive Then
|
||||
|
||||
@@ -434,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>
|
||||
|
||||
|
||||
@@ -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)
|
||||
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, 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 EgtWPFLib5.WaterjetDbWindowVM
|
||||
Private m_sOrigNewMaterial As String = String.Empty
|
||||
Private m_sOrigNewSubMaterial As String = String.Empty
|
||||
|
||||
Private Sub WaterJetPage_Initialized(sender As Object, e As EventArgs)
|
||||
m_refWaterjetDbWindowVM = New EgtWPFLib5.WaterjetDbWindowVM(m_MainWindow.m_CurrentMachine.sMachDir)
|
||||
Me.DataContext = m_refWaterjetDbWindowVM
|
||||
EgtWPFLib.Utility.MainWindow = m_MainWindow
|
||||
End Sub
|
||||
|
||||
Public Sub WaterJetPage_Reinitialize()
|
||||
m_refWaterjetDbWindowVM = New EgtWPFLib5.WaterjetDbWindowVM(m_MainWindow.m_CurrentMachine.sMachDir)
|
||||
Me.DataContext = m_refWaterjetDbWindowVM
|
||||
End Sub
|
||||
|
||||
Private Sub NewMaterial_EgtOpening(sender As Object, e As EventArgs) Handles NewMaterialNameTxBx.EgtOpening
|
||||
m_sOrigNewMaterial = NewMaterialNameTxBx.Text
|
||||
End Sub
|
||||
|
||||
Private Sub NewSubMaterial_EgtOpening(sender As Object, e As EventArgs) Handles NewSubMaterialNameTxBx.EgtOpening
|
||||
m_sOrigNewSubMaterial = NewSubMaterialNameTxBx.Text
|
||||
End Sub
|
||||
|
||||
Private Sub NewMaterial_EgtClosed(sender As Object, e As EventArgs) Handles NewMaterialNameTxBx.EgtClosed
|
||||
m_refWaterjetDbWindowVM.sNewMaterial = NewMaterialNameTxBx.Text
|
||||
If String.IsNullOrEmpty(m_refWaterjetDbWindowVM.sNewMaterial) OrElse m_refWaterjetDbWindowVM.sNewMaterial = m_sOrigNewMaterial Then
|
||||
m_refWaterjetDbWindowVM.NewMaterial_Visibility = Visibility.Collapsed
|
||||
Else
|
||||
m_refWaterjetDbWindowVM.Done("")
|
||||
NewMaterialNameTxBx.Clear()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub NewSubMaterial_EgtClosed(sender As Object, e As EventArgs) Handles NewSubMaterialNameTxBx.EgtClosed
|
||||
m_refWaterjetDbWindowVM.sNewSubMaterial = NewSubMaterialNameTxBx.Text
|
||||
If String.IsNullOrEmpty(m_refWaterjetDbWindowVM.sNewSubMaterial) OrElse m_refWaterjetDbWindowVM.sNewSubMaterial = m_sOrigNewSubMaterial Then
|
||||
m_refWaterjetDbWindowVM.NewSubMaterial_Visibility = Visibility.Collapsed
|
||||
Else
|
||||
m_refWaterjetDbWindowVM.Done("")
|
||||
NewSubMaterialNameTxBx.Clear()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
@@ -0,0 +1,891 @@
|
||||
'Imports System.Collections.ObjectModel
|
||||
'Imports System.ComponentModel
|
||||
'Imports EgtUILib
|
||||
'Imports EgtWPFLib
|
||||
|
||||
'Public Class WaterJetPageVM
|
||||
' Private m_refWaterPageV As WaterJetPageUC
|
||||
|
||||
' ' lista dei materiali
|
||||
' Private m_ListMaterial As New ObservableCollection(Of MaterialWJ)
|
||||
' Public ReadOnly Property ListMaterial As ObservableCollection(Of MaterialWJ)
|
||||
' Get
|
||||
' Return m_ListMaterial
|
||||
' End Get
|
||||
' End Property
|
||||
' ' materiale selezionato
|
||||
' Private m_SelectedMaterial As MaterialWJ
|
||||
' Public Property SelectedMaterial As MaterialWJ
|
||||
' Get
|
||||
' Return m_SelectedMaterial
|
||||
' End Get
|
||||
' Set(value As MaterialWJ)
|
||||
' m_SelectedMaterial = value
|
||||
' End Set
|
||||
' End Property
|
||||
' ' submateriale selezionato
|
||||
' Private m_SelectedSubMaterial As SubMaterialWJ
|
||||
' Public Property SelectedSubMaterial As SubMaterialWJ
|
||||
' Get
|
||||
' Return m_SelectedSubMaterial
|
||||
' End Get
|
||||
' Set(value As SubMaterialWJ)
|
||||
' m_SelectedSubMaterial = value
|
||||
' End Set
|
||||
' End Property
|
||||
' ' lista parametri selezionata
|
||||
' Private m_SelectedParam As ParamWJ
|
||||
' Public Property SelectedParam As ParamWJ
|
||||
' Get
|
||||
' Return m_SelectedParam
|
||||
' End Get
|
||||
' Set(value As ParamWJ)
|
||||
' m_SelectedParam = value
|
||||
' End Set
|
||||
' End Property
|
||||
|
||||
' Private m_sNewMaterial As MaterialWJ
|
||||
' Public Property sNewMaterial As String
|
||||
' Get
|
||||
' Return m_sNewMaterial.sMaterial
|
||||
' End Get
|
||||
' Set(value As String)
|
||||
' m_sNewMaterial = New MaterialWJ(value)
|
||||
' End Set
|
||||
' End Property
|
||||
|
||||
' Private m_NewMaterialVisibility As Visibility = Visibility.Hidden
|
||||
' Public Property NewMaterialVisibility As Visibility
|
||||
' Get
|
||||
' Return m_NewMaterialVisibility
|
||||
' End Get
|
||||
' Set(value As Visibility)
|
||||
' m_NewMaterialVisibility = value
|
||||
' End Set
|
||||
' End Property
|
||||
|
||||
' Sub New(WaterJetPageV As WaterJetPageUC)
|
||||
' m_refWaterPageV = WaterJetPageV
|
||||
' ' Creo una lista di materiali come esempio
|
||||
' ListMaterial.Add(New MaterialWJ("Marmo"))
|
||||
' ListMaterial.Last.ListOfSubMaterial.Add(New SubMaterialWJ("Binaco"))
|
||||
' ListMaterial.Last.ListOfSubMaterial.Last.ListOfParam.Add(New ParamWJ("10", "Bq1", "Bq2", "Bq3", "Bq4", "Bq5"))
|
||||
' ListMaterial.Last.ListOfSubMaterial.Add(New SubMaterialWJ("Nero"))
|
||||
' ListMaterial.Last.ListOfSubMaterial.Last.ListOfParam.Add(New ParamWJ("20", "Nq1", "Nq2", "Nq3", "Nq4", "Nq5"))
|
||||
' ListMaterial.Add(New MaterialWJ("Granito"))
|
||||
' ListMaterial.Last.ListOfSubMaterial.Add(New SubMaterialWJ("GR_Binaco"))
|
||||
' ListMaterial.Last.ListOfSubMaterial.Last.ListOfParam.Add(New ParamWJ("15", "gBq1", "gBq2", "Bq3", "gBq4", "gBq5"))
|
||||
' ListMaterial.Last.ListOfSubMaterial.Last.ListOfParam.Add(New ParamWJ("15.5", "g_Bq1", "g_Bq2", "g_Bq3", "g_Bq4", "g_Bq5"))
|
||||
' ListMaterial.Last.ListOfSubMaterial.Last.ListOfParam.Add(New ParamWJ("15.8", "G_Bq1", "G_Bq2", "G_Bq3", "G_Bq4", "G_Bq5"))
|
||||
' ListMaterial.Last.ListOfSubMaterial.Add(New SubMaterialWJ("GR_Nero"))
|
||||
' ListMaterial.Last.ListOfSubMaterial.Last.ListOfParam.Add(New ParamWJ("18", "gNq1", "gNq2", "gNq3", "gNq4", "gNq5"))
|
||||
|
||||
' SelectedMaterial = m_ListMaterial(0)
|
||||
' SelectedSubMaterial = m_SelectedMaterial.ListOfSubMaterial(0)
|
||||
' SelectedParam = SelectedSubMaterial.ListOfParam(0)
|
||||
' End Sub
|
||||
|
||||
' Private m_cmdOk As ICommand
|
||||
' Public ReadOnly Property OkCommand() As ICommand
|
||||
' Get
|
||||
' If m_cmdOk Is Nothing Then
|
||||
' m_cmdOk = New Command(AddressOf Ok)
|
||||
' End If
|
||||
' Return m_cmdOk
|
||||
' End Get
|
||||
' End Property
|
||||
|
||||
' Private Sub Ok()
|
||||
' ' Mostro textbox per il nome
|
||||
' m_refWaterPageV.KitNameTxBx.Text = String.Empty
|
||||
' m_refWaterPageV.KitNameTxBx.Visibility = Windows.Visibility.Visible
|
||||
' m_refWaterPageV.KitsLstBx.SetValue(Grid.RowSpanProperty, 1)
|
||||
' MessageBox.Show("Prova di Binding", "Prova di Binding", MessageBoxButton.OK, MessageBoxImage.Asterisk, MessageBoxResult.OK)
|
||||
' m_refWaterPageV.KitNameTxBx.Visibility = Windows.Visibility.Hidden
|
||||
' m_refWaterPageV.KitsLstBx.SetValue(Grid.RowSpanProperty, 2)
|
||||
' End Sub
|
||||
|
||||
'End Class
|
||||
|
||||
|
||||
'Public Class MaterialWJ
|
||||
|
||||
' Private m_sMaterial As String = String.Empty
|
||||
' Public ReadOnly Property sMaterial As String
|
||||
' Get
|
||||
' Return m_sMaterial
|
||||
' End Get
|
||||
' End Property
|
||||
|
||||
' Private m_ListOfSubMaterial As New ObservableCollection(Of SubMaterialWJ)
|
||||
' Public Property ListOfSubMaterial As ObservableCollection(Of SubMaterialWJ)
|
||||
' Get
|
||||
' Return m_ListOfSubMaterial
|
||||
' End Get
|
||||
' Set(value As ObservableCollection(Of SubMaterialWJ))
|
||||
' m_ListOfSubMaterial = value
|
||||
' End Set
|
||||
' End Property
|
||||
|
||||
' Sub New(sMat As String)
|
||||
' m_sMaterial = sMat
|
||||
' End Sub
|
||||
|
||||
'End Class
|
||||
|
||||
'Public Class SubMaterialWJ
|
||||
|
||||
' Dim m_sSubMaterial As String
|
||||
' Public Property sSubMaterial As String
|
||||
' Get
|
||||
' Return m_sSubMaterial
|
||||
' End Get
|
||||
' Set(value As String)
|
||||
' m_sSubMaterial = value
|
||||
' End Set
|
||||
' End Property
|
||||
|
||||
' Private m_ListOfParam As New ObservableCollection(Of ParamWJ)
|
||||
' Public Property ListOfParam As ObservableCollection(Of ParamWJ)
|
||||
' Get
|
||||
' Return m_ListOfParam
|
||||
' End Get
|
||||
' Set(value As ObservableCollection(Of ParamWJ))
|
||||
' m_ListOfParam = value
|
||||
' End Set
|
||||
' End Property
|
||||
|
||||
' Sub New(sName As String)
|
||||
' m_sSubMaterial = sName
|
||||
' End Sub
|
||||
'End Class
|
||||
|
||||
'Public Class ParamWJ
|
||||
|
||||
' Private m_Thickness As String
|
||||
' Private m_Q1 As String
|
||||
' Private m_Q2 As String
|
||||
' Private m_Q3 As String
|
||||
' Private m_Q4 As String
|
||||
' Private m_Q5 As String
|
||||
|
||||
' Public Property Q1 As String
|
||||
' Get
|
||||
' Return m_Q1
|
||||
' End Get
|
||||
' Set(value As String)
|
||||
' m_Q1 = value
|
||||
' End Set
|
||||
' End Property
|
||||
|
||||
' Public Property Thickness As String
|
||||
' Get
|
||||
' Return m_Thickness
|
||||
' End Get
|
||||
' Set(value As String)
|
||||
' m_Thickness = value
|
||||
' End Set
|
||||
' End Property
|
||||
|
||||
' Public Property Q2 As String
|
||||
' Get
|
||||
' Return m_Q2
|
||||
' End Get
|
||||
' Set(value As String)
|
||||
' m_Q2 = value
|
||||
' End Set
|
||||
' End Property
|
||||
|
||||
' Public Property Q3 As String
|
||||
' Get
|
||||
' Return m_Q3
|
||||
' End Get
|
||||
' Set(value As String)
|
||||
' m_Q3 = value
|
||||
' End Set
|
||||
' End Property
|
||||
|
||||
' Public Property Q4 As String
|
||||
' Get
|
||||
' Return m_Q4
|
||||
' End Get
|
||||
' Set(value As String)
|
||||
' m_Q4 = value
|
||||
' End Set
|
||||
' End Property
|
||||
|
||||
' Public Property Q5 As String
|
||||
' Get
|
||||
' Return m_Q5
|
||||
' End Get
|
||||
' Set(value As String)
|
||||
' m_Q5 = value
|
||||
' End Set
|
||||
' End Property
|
||||
|
||||
' Sub New(sT As String, sQ1 As String, sQ2 As String, sQ3 As String, sQ4 As String, sQ5 As String)
|
||||
' m_Thickness = sT
|
||||
' m_Q1 = sQ1
|
||||
' m_Q2 = sQ2
|
||||
' m_Q3 = sQ3
|
||||
' m_Q4 = sQ4
|
||||
' m_Q5 = sQ5
|
||||
' End Sub
|
||||
|
||||
'End Class
|
||||
|
||||
Imports System.Collections.ObjectModel
|
||||
Imports System.IO
|
||||
Imports EgtUILib
|
||||
Imports EgtWPFLib5
|
||||
|
||||
Public Class WaterjetDbWindowVM
|
||||
Inherits VMBase
|
||||
' Riferimento alla MainWindow
|
||||
Private m_MainWindow As MainWindow = DirectCast(Application.Current.MainWindow, MainWindow)
|
||||
Private m_refWaterPageV As WaterJetPageUC
|
||||
|
||||
#Region "FIELDS & PROPERTIES"
|
||||
|
||||
|
||||
#Region "Materiali"
|
||||
Private Property m_MaterialList As ObservableCollection(Of WjMaterial)
|
||||
Public Property MaterialList As ObservableCollection(Of WjMaterial)
|
||||
Get
|
||||
Return m_MaterialList
|
||||
End Get
|
||||
Set(value As ObservableCollection(Of WjMaterial))
|
||||
m_MaterialList = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property m_SelMaterial As WjMaterial
|
||||
Public Property SelMaterial As WjMaterial
|
||||
Get
|
||||
Return m_SelMaterial
|
||||
End Get
|
||||
Set(value As WjMaterial)
|
||||
m_SelMaterial = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property m_sNewMaterial As String
|
||||
Public Property sNewMaterial As String
|
||||
Get
|
||||
Return m_sNewMaterial
|
||||
End Get
|
||||
Set(value As String)
|
||||
m_sNewMaterial = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property m_NewMaterial_Visibility As Visibility = Visibility.Collapsed
|
||||
Public Property NewMaterial_Visibility As Visibility
|
||||
Get
|
||||
Return m_NewMaterial_Visibility
|
||||
End Get
|
||||
Set(value As Visibility)
|
||||
m_NewMaterial_Visibility = value
|
||||
NotifyPropertyChanged(NameOf(NewMaterial_Visibility))
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "SubMateriali"
|
||||
Private Property m_SubMaterialList As New ObservableCollection(Of WjSubMaterial)
|
||||
Public Property SubMaterialList As ObservableCollection(Of WjSubMaterial)
|
||||
Get
|
||||
Return m_SubMaterialList
|
||||
End Get
|
||||
Set(value As ObservableCollection(Of WjSubMaterial))
|
||||
m_SubMaterialList = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
'Private Property m_SelSubMaterial As WjSubMaterial
|
||||
'Public Property SelSubMaterial As WjSubMaterial
|
||||
' Get
|
||||
' Return m_SelSubMaterial
|
||||
' End Get
|
||||
' Set(value As WjSubMaterial)
|
||||
' m_SelSubMaterial = value
|
||||
' End Set
|
||||
'End Property
|
||||
|
||||
Private Property m_sNewSubMaterial As String
|
||||
Public Property sNewSubMaterial As String
|
||||
Get
|
||||
Return m_sNewSubMaterial
|
||||
End Get
|
||||
Set(value As String)
|
||||
m_sNewSubMaterial = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property m_NewSubMaterial_Visibility As Visibility = Visibility.Collapsed
|
||||
Public Property NewSubMaterial_Visibility As Visibility
|
||||
Get
|
||||
Return m_NewSubMaterial_Visibility
|
||||
End Get
|
||||
Set(value As Visibility)
|
||||
m_NewSubMaterial_Visibility = value
|
||||
NotifyPropertyChanged(NameOf(NewSubMaterial_Visibility))
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "Parametri"
|
||||
Private Property m_ParamList As ObservableCollection(Of WjParam)
|
||||
Public Property ParamList As ObservableCollection(Of WjParam)
|
||||
Get
|
||||
Return m_ParamList
|
||||
End Get
|
||||
Set(value As ObservableCollection(Of WjParam))
|
||||
m_ParamList = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
'Private Property m_SelParam As WjParam
|
||||
'Public Property SelParam As WjParam
|
||||
' Get
|
||||
' Return m_SelParam
|
||||
' End Get
|
||||
' Set(value As WjParam)
|
||||
' m_SelParam = value
|
||||
' End Set
|
||||
'End Property
|
||||
|
||||
Private m_HeadParamLstBx_Width As Double
|
||||
Public ReadOnly Property HeadParamLstBx_Width As Double
|
||||
Get
|
||||
If m_HeadParamLstBx_Width < 10 Then
|
||||
Return 700
|
||||
End If
|
||||
Return m_HeadParamLstBx_Width
|
||||
End Get
|
||||
End Property
|
||||
|
||||
#End Region
|
||||
|
||||
Const S_MATERIALS As String = "Materials"
|
||||
|
||||
' Definizione comandi
|
||||
Private m_cmdNewMaterial As ICommand
|
||||
Private m_cmdDeleteMaterial As ICommand
|
||||
Private m_cmdNewSubMaterial As ICommand
|
||||
Private m_cmdDeleteSubMaterial As ICommand
|
||||
Private m_cmdNewWjParam As ICommand
|
||||
Private m_cmdDeleteWjParam As ICommand
|
||||
Private m_cmdSave As ICommand
|
||||
Private m_cmdDone As ICommand
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "MESSAGES"
|
||||
|
||||
Public ReadOnly Property Material_Msg As String
|
||||
Get
|
||||
Return "Materiale"
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property SubMaterial_Msg As String
|
||||
Get
|
||||
Return "SubMateriale"
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property Id_Msg As String
|
||||
Get
|
||||
Return "Id"
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property Thickness_Msg As String
|
||||
Get
|
||||
Return "Spessore"
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property Q1_Msg As String
|
||||
Get
|
||||
Return "Q1"
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property Q2_Msg As String
|
||||
Get
|
||||
Return "Q2"
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property Q3_Msg As String
|
||||
Get
|
||||
Return "Q3"
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property Q4_Msg As String
|
||||
Get
|
||||
Return "Q4"
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property Q5_Msg As String
|
||||
Get
|
||||
Return "Q5"
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property QExtra_Msg As String
|
||||
Get
|
||||
Return "QExtra"
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property New_Msg As String
|
||||
Get
|
||||
Return "Nuovo"
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property Delete_Msg As String
|
||||
Get
|
||||
Return "Elimina"
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property Save_Msg As String
|
||||
Get
|
||||
Return "Salva"
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property Modify_Msg As String
|
||||
Get
|
||||
Return "Modifica"
|
||||
End Get
|
||||
End Property
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "CONSTRUCTOR"
|
||||
|
||||
Sub New(refContext As WaterJetPageUC)
|
||||
' definisco il riferiento con la pagina xaml
|
||||
m_refWaterPageV = refContext
|
||||
' Leggo valori da file Data e li carico nelle proprietà
|
||||
Dim sFilePath As String = m_MainWindow.m_CurrentMachine.sMachDir & "\" & MACHININGS_DIR & "\" & WATERJETDB_FILE
|
||||
MaterialList = New ObservableCollection(Of WjMaterial)
|
||||
|
||||
If File.Exists(sFilePath) Then
|
||||
Dim sMaterial As String = String.Empty
|
||||
|
||||
If EgtUILib.GetPrivateProfileString(S_MATERIALS, "1", "", sMaterial, sFilePath) > 0 Then
|
||||
Dim sMaterials() As String = sMaterial.Split(","c)
|
||||
Dim ind As Integer = 0
|
||||
For ind = 0 To sMaterials.Length() - 1
|
||||
|
||||
'recupero i sottomateriali
|
||||
Dim Index As Integer = 1
|
||||
Dim sSubMat As String = String.Empty
|
||||
Dim SubMatList As New ObservableCollection(Of WjSubMaterial)
|
||||
While EgtUILib.GetPrivateProfileString(sMaterials(ind), Index.ToString(), "", sSubMat, sFilePath) > 0
|
||||
|
||||
|
||||
' recupero la lista dei Q
|
||||
Dim QInd As Integer = 1
|
||||
Dim sParam As String = String.Empty
|
||||
Dim QParamList As New ObservableCollection(Of WjParam)
|
||||
While EgtUILib.GetPrivateProfileString(sMaterials(ind) & "." & sSubMat, QInd.ToString(), "", sParam, sFilePath) > 0
|
||||
Dim sParams() As String = sParam.Split(","c)
|
||||
If sParams.Length() >= 7 Then
|
||||
Dim dThickness As Double
|
||||
Dim dQ1 As Double
|
||||
Dim dQ2 As Double
|
||||
Dim dQ3 As Double
|
||||
Dim dQ4 As Double
|
||||
Dim dQ5 As Double
|
||||
Dim dQExtra As Double
|
||||
StringToDouble(sParams(0), dThickness)
|
||||
StringToDouble(sParams(1), dQ1)
|
||||
StringToDouble(sParams(2), dQ2)
|
||||
StringToDouble(sParams(3), dQ3)
|
||||
StringToDouble(sParams(4), dQ4)
|
||||
StringToDouble(sParams(5), dQ5)
|
||||
StringToDouble(sParams(6), dQExtra)
|
||||
QParamList.Add(New WjParam(QInd, dThickness, dQ1, dQ2, dQ3, dQ4, dQ5, dQExtra, m_refWaterPageV))
|
||||
End If
|
||||
QInd += 1
|
||||
End While
|
||||
|
||||
SubMatList.Add(New WjSubMaterial(sSubMat, QParamList))
|
||||
Index += 1
|
||||
End While
|
||||
|
||||
MaterialList.Add(New WjMaterial(sMaterials(ind), SubMatList))
|
||||
Next
|
||||
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Public Sub RefreshDImensionPage()
|
||||
m_HeadParamLstBx_Width = m_refWaterPageV.ParamsGpBx.ActualWidth - 20
|
||||
NotifyPropertyChanged(NameOf(HeadParamLstBx_Width))
|
||||
End Sub
|
||||
|
||||
#End Region ' Constructor
|
||||
|
||||
#Region "COMMANDS"
|
||||
|
||||
#Region "NewMaterialCommand"
|
||||
|
||||
Public ReadOnly Property NewMaterialCommand As ICommand
|
||||
Get
|
||||
If m_cmdNewMaterial Is Nothing Then
|
||||
m_cmdNewMaterial = New Command(AddressOf NewMaterial)
|
||||
End If
|
||||
Return m_cmdNewMaterial
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Sub NewMaterial(ByVal param As Object)
|
||||
NewSubMaterial_Visibility = Visibility.Collapsed
|
||||
NewMaterial_Visibility = Visibility.Visible
|
||||
End Sub
|
||||
|
||||
#End Region ' NewMaterial
|
||||
|
||||
#Region "DeleteMaterialCommand"
|
||||
|
||||
Public ReadOnly Property DeleteMaterialCommand As ICommand
|
||||
Get
|
||||
If m_cmdDeleteMaterial Is Nothing Then
|
||||
m_cmdDeleteMaterial = New Command(AddressOf DeleteMaterial)
|
||||
End If
|
||||
Return m_cmdDeleteMaterial
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Sub DeleteMaterial(ByVal param As Object)
|
||||
If Not IsNothing(SelMaterial) Then
|
||||
MaterialList.Remove(SelMaterial)
|
||||
'SelMaterial.NotifyPropertyChanged(NameOf(MaterialList))
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#End Region ' DeleteMaterial
|
||||
|
||||
#Region "NewSubMaterialCommand"
|
||||
|
||||
Public ReadOnly Property NewSubMaterialCommand As ICommand
|
||||
Get
|
||||
If m_cmdNewSubMaterial Is Nothing Then
|
||||
m_cmdNewSubMaterial = New Command(AddressOf NewSubMaterial)
|
||||
End If
|
||||
Return m_cmdNewSubMaterial
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Sub NewSubMaterial(ByVal param As Object)
|
||||
If Not IsNothing(SelMaterial) Then
|
||||
NewMaterial_Visibility = Visibility.Collapsed
|
||||
NewSubMaterial_Visibility = Visibility.Visible
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#End Region ' NewSubMaterial
|
||||
|
||||
#Region "DeleteSubMaterialCommand"
|
||||
|
||||
Public ReadOnly Property DeleteSubMaterialCommand As ICommand
|
||||
Get
|
||||
If m_cmdDeleteSubMaterial Is Nothing Then
|
||||
m_cmdDeleteSubMaterial = New Command(AddressOf DeleteSubMaterial)
|
||||
End If
|
||||
Return m_cmdDeleteSubMaterial
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Sub DeleteSubMaterial(ByVal param As Object)
|
||||
If Not IsNothing(SelMaterial.SelSubMaterial) Then
|
||||
SelMaterial.SubMaterialList.Remove(SelMaterial.SelSubMaterial)
|
||||
SelMaterial.NotifyPropertyChanged(NameOf(SubMaterialList))
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#End Region ' DeleteSubMaterial
|
||||
|
||||
#Region "NewWjParamCommand"
|
||||
|
||||
Public ReadOnly Property NewWjParamCommand As ICommand
|
||||
Get
|
||||
If m_cmdNewWjParam Is Nothing Then
|
||||
m_cmdNewWjParam = New Command(AddressOf NewWjParam)
|
||||
End If
|
||||
Return m_cmdNewWjParam
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Sub NewWjParam(ByVal param As Object)
|
||||
If Not IsNothing(SelMaterial.SelSubMaterial) Then
|
||||
Dim nId As Integer = 0
|
||||
If IsNothing(SelMaterial.SelSubMaterial.ParamList) Then
|
||||
nId = 1
|
||||
SelMaterial.SelSubMaterial.ParamList = New ObservableCollection(Of WjParam)
|
||||
Else
|
||||
nId = SelMaterial.SelSubMaterial.ParamList.Count + 1
|
||||
End If
|
||||
SelMaterial.SelSubMaterial.ParamList.Add(New WjParam(nId, 0, 0, 0, 0, 0, 0, 0, m_refWaterPageV))
|
||||
SelMaterial.SelSubMaterial.NotifyPropertyChanged(NameOf(ParamList))
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#End Region ' NewWjParam
|
||||
|
||||
#Region "DeleteWjParamCommand"
|
||||
|
||||
Public ReadOnly Property DeleteWjParamCommand As ICommand
|
||||
Get
|
||||
If m_cmdDeleteWjParam Is Nothing Then
|
||||
m_cmdDeleteWjParam = New Command(AddressOf DeleteWjParam)
|
||||
End If
|
||||
Return m_cmdDeleteWjParam
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Sub DeleteWjParam(ByVal param As Object)
|
||||
If Not IsNothing(SelMaterial.SelSubMaterial.SelWjParam) Then
|
||||
SelMaterial.SelSubMaterial.ParamList.Remove(SelMaterial.SelSubMaterial.SelWjParam)
|
||||
SelMaterial.SelSubMaterial.NotifyPropertyChanged(NameOf(ParamList))
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#End Region ' DeleteWjParam
|
||||
|
||||
#Region "DoneCommand"
|
||||
|
||||
Public ReadOnly Property DoneCommand As ICommand
|
||||
Get
|
||||
If m_cmdDone Is Nothing Then
|
||||
m_cmdDone = New Command(AddressOf Done)
|
||||
End If
|
||||
Return m_cmdDone
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Sub Done(ByVal param As Object)
|
||||
If NewMaterial_Visibility = Visibility.Visible Then
|
||||
MaterialList.Add(New WjMaterial(sNewMaterial))
|
||||
NotifyPropertyChanged(NameOf(MaterialList))
|
||||
NewMaterial_Visibility = Visibility.Collapsed
|
||||
ElseIf NewSubMaterial_Visibility = Visibility.Visible Then
|
||||
SelMaterial.SubMaterialList.Add(New WjSubMaterial(sNewSubMaterial))
|
||||
NotifyPropertyChanged(NameOf(SubMaterialList))
|
||||
NewSubMaterial_Visibility = Visibility.Collapsed
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#End Region ' Done
|
||||
|
||||
#End Region ' Commands
|
||||
|
||||
End Class
|
||||
|
||||
Public Class WjMaterial
|
||||
Inherits VMBase
|
||||
|
||||
Private m_Name As String
|
||||
Public Property Name As String
|
||||
Get
|
||||
Return m_Name
|
||||
End Get
|
||||
Set(value As String)
|
||||
m_Name = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_SubMaterialList As ObservableCollection(Of WjSubMaterial)
|
||||
Public Property SubMaterialList As ObservableCollection(Of WjSubMaterial)
|
||||
Get
|
||||
Return m_SubMaterialList
|
||||
End Get
|
||||
Set(value As ObservableCollection(Of WjSubMaterial))
|
||||
m_SubMaterialList = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property m_SelSubMaterial As WjSubMaterial
|
||||
Public Property SelSubMaterial As WjSubMaterial
|
||||
Get
|
||||
Return m_SelSubMaterial
|
||||
End Get
|
||||
Set(value As WjSubMaterial)
|
||||
m_SelSubMaterial = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Sub New(sName As String, SubMatList As ObservableCollection(Of WjSubMaterial))
|
||||
m_Name = sName
|
||||
m_SubMaterialList = SubMatList
|
||||
End Sub
|
||||
|
||||
Sub New(sName As String)
|
||||
m_Name = sName
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
Public Class WjSubMaterial
|
||||
Inherits VMBase
|
||||
|
||||
Private m_Name As String
|
||||
Public Property Name As String
|
||||
Get
|
||||
Return m_Name
|
||||
End Get
|
||||
Set(value As String)
|
||||
m_Name = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_ParamList As ObservableCollection(Of WjParam)
|
||||
Public Property ParamList As ObservableCollection(Of WjParam)
|
||||
Get
|
||||
Return m_ParamList
|
||||
End Get
|
||||
Set(value As ObservableCollection(Of WjParam))
|
||||
m_ParamList = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property m_SelWjParam As WjParam
|
||||
Public Property SelWjParam As WjParam
|
||||
Get
|
||||
Return m_SelWjParam
|
||||
End Get
|
||||
Set(value As WjParam)
|
||||
m_SelWjParam = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Sub New(sName As String, ParamList As ObservableCollection(Of WjParam))
|
||||
m_Name = sName
|
||||
m_ParamList = ParamList
|
||||
End Sub
|
||||
|
||||
Sub New(sName As String)
|
||||
m_Name = sName
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
Public Class WjParam
|
||||
|
||||
Private m_Id As Integer
|
||||
Public Property Id As Integer
|
||||
Get
|
||||
Return m_Id
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
m_Id = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_Thickness As Double
|
||||
Public Property Thickness As Double
|
||||
Get
|
||||
Return m_Thickness
|
||||
End Get
|
||||
Set(value As Double)
|
||||
m_Thickness = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_Q1 As Double
|
||||
Public Property Q1 As Double
|
||||
Get
|
||||
Return m_Q1
|
||||
End Get
|
||||
Set(value As Double)
|
||||
m_Q1 = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_Q2 As Double
|
||||
Public Property Q2 As Double
|
||||
Get
|
||||
Return m_Q2
|
||||
End Get
|
||||
Set(value As Double)
|
||||
m_Q2 = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_Q3 As Double
|
||||
Public Property Q3 As Double
|
||||
Get
|
||||
Return m_Q3
|
||||
End Get
|
||||
Set(value As Double)
|
||||
m_Q3 = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_Q4 As Double
|
||||
Public Property Q4 As Double
|
||||
Get
|
||||
Return m_Q4
|
||||
End Get
|
||||
Set(value As Double)
|
||||
m_Q4 = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_Q5 As Double
|
||||
Public Property Q5 As Double
|
||||
Get
|
||||
Return m_Q5
|
||||
End Get
|
||||
Set(value As Double)
|
||||
m_Q5 = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_QExtra As Double
|
||||
Public Property QExtra As Double
|
||||
Get
|
||||
Return m_QExtra
|
||||
End Get
|
||||
Set(value As Double)
|
||||
m_QExtra = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property ParamLstBx_Width As Double
|
||||
Get
|
||||
Return m_refWaterPageV.ParamsGpBx.ActualWidth - 20
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_refWaterPageV As WaterJetPageUC
|
||||
|
||||
Sub New(nId As Integer, dThickness As Double, dQ1 As Double, dQ2 As Double, dQ3 As Double, dQ4 As Double, dQ5 As Double, dQExtra As Double, ByRef refWJPage As WaterJetPageUC)
|
||||
m_Id = nId
|
||||
m_Thickness = dThickness
|
||||
m_Q1 = dQ1
|
||||
m_Q2 = dQ2
|
||||
m_Q3 = dQ3
|
||||
m_Q4 = dQ4
|
||||
m_Q5 = dQ5
|
||||
m_QExtra = dQExtra
|
||||
m_refWaterPageV = refWJPage
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
@@ -323,8 +323,8 @@ Class MainWindow
|
||||
' Verifico abilitazione nesting automatico
|
||||
m_bAutoNest = Not String.IsNullOrWhiteSpace(sNestKey)
|
||||
' Recupero opzioni della chiave
|
||||
Dim bKey As Boolean = EgtGetKeyLevel(9423, 2309, 1, m_nKeyLevel) And
|
||||
EgtGetKeyOptions(9423, 2309, 1, m_nKeyOptions)
|
||||
Dim bKey As Boolean = EgtGetKeyLevel(9423, 2401, 1, m_nKeyLevel) And
|
||||
EgtGetKeyOptions(9423, 2401, 1, m_nKeyOptions)
|
||||
' Verifico abilitazione prodotto
|
||||
Dim bProd As Boolean = GetKeyOption(KEY_OPT.CUT_BASE)
|
||||
' Inizializzazione generale di EgtInterface
|
||||
@@ -569,6 +569,8 @@ Class MainWindow
|
||||
m_CurrentProjectPageUC.m_SceneButtons.MeasureBtn.IsChecked = False
|
||||
' disbilito Test
|
||||
TestOff()
|
||||
' disabilito DragRettangle
|
||||
DragRettangleOff()
|
||||
Select Case m_ActivePage
|
||||
Case Pages.WorkInProgress
|
||||
WorkInProgressBtn.IsChecked = True
|
||||
@@ -625,6 +627,7 @@ Class MainWindow
|
||||
EgtMdbGetGeneralParam(MCH_GP.SAFEZ, DirectCutPageUC.m_dZSafe)
|
||||
m_CurrentProjectPageUC.m_SceneButtons.MeasureBtn.IsChecked = False
|
||||
TestOff()
|
||||
DragRettangleOff()
|
||||
Select Case m_ActivePage
|
||||
Case Pages.WorkInProgress
|
||||
WorkInProgressBtn.IsChecked = False
|
||||
@@ -678,6 +681,7 @@ Class MainWindow
|
||||
Private Sub CadCutBtn_Click(sender As Object, e As RoutedEventArgs) Handles CadCutBtn.Click
|
||||
m_CurrentProjectPageUC.m_SceneButtons.MeasureBtn.IsChecked = False
|
||||
TestOff()
|
||||
DragRettangleOff()
|
||||
Select Case m_ActivePage
|
||||
Case Pages.WorkInProgress
|
||||
WorkInProgressBtn.IsChecked = False
|
||||
@@ -730,6 +734,7 @@ Class MainWindow
|
||||
Private Sub FrameCutBtn_Click(sender As Object, e As RoutedEventArgs) Handles FrameCutBtn.Click
|
||||
m_CurrentProjectPageUC.m_SceneButtons.MeasureBtn.IsChecked = False
|
||||
TestOff()
|
||||
DragRettangleOff()
|
||||
Select Case m_ActivePage
|
||||
Case Pages.WorkInProgress
|
||||
WorkInProgressBtn.IsChecked = False
|
||||
@@ -783,6 +788,7 @@ Class MainWindow
|
||||
Private Sub MachineBtn_Click(sender As Object, e As RoutedEventArgs) Handles MachineBtn.Click
|
||||
m_CurrentProjectPageUC.m_SceneButtons.MeasureBtn.IsChecked = False
|
||||
TestOff()
|
||||
DragRettangleOff()
|
||||
Select Case m_ActivePage
|
||||
Case Pages.WorkInProgress
|
||||
WorkInProgressBtn.IsChecked = False
|
||||
@@ -831,6 +837,7 @@ Class MainWindow
|
||||
Private Sub OptionsBtn_Click(sender As Object, e As RoutedEventArgs) Handles OptionsBtn.Click
|
||||
m_CurrentProjectPageUC.m_SceneButtons.MeasureBtn.IsChecked = False
|
||||
TestOff()
|
||||
DragRettangleOff()
|
||||
Select Case m_ActivePage
|
||||
Case Pages.WorkInProgress
|
||||
WorkInProgressBtn.IsChecked = False
|
||||
@@ -1068,6 +1075,15 @@ Class MainWindow
|
||||
If Not m_MachinePageUC.m_PolishingsPageUC.SaveKit() Then
|
||||
Return False
|
||||
End If
|
||||
Case MachinePageUC.MachinePages.WaterJet
|
||||
' Verifica ed eventuale salvataggio Db Waterjet
|
||||
Dim m_MainWindow As MainWindow = DirectCast(Application.Current.MainWindow, MainWindow)
|
||||
Dim nPressedBtn As Integer = DirectCast(m_MachinePageUC.m_WaterJetPageUC.DataContext, EgtWPFLib5.WaterjetDbWindowVM).CloseWaterjetDb_OmagCut(m_MainWindow)
|
||||
If nPressedBtn = EgtWPFLib5.WaterjetDbWindowVM.SaveWndBtnEnum.CANCEL Then
|
||||
Return False
|
||||
ElseIf nPressedBtn = EgtWPFLib5.WaterjetDbWindowVM.SaveWndBtnEnum.NO Then
|
||||
m_MachinePageUC.m_WaterJetPageUC.WaterJetPage_Reinitialize()
|
||||
End If
|
||||
End Select
|
||||
Return True
|
||||
End Function
|
||||
@@ -1094,6 +1110,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
|
||||
@@ -1127,7 +1146,8 @@ Class MainWindow
|
||||
Dim nPrjType As Integer = m_CurrentProjectPageUC.GetCurrentProjectType()
|
||||
' Aggiorno interfaccia
|
||||
CadCutBtn.IsEnabled = (nPrjType <> CurrentProjectPageUC.PRJ_TYPE.FRAMES)
|
||||
FrameCutBtn.IsEnabled = (nPrjType <> CurrentProjectPageUC.PRJ_TYPE.FLATS)
|
||||
FrameCutBtn.IsEnabled = (nPrjType <> CurrentProjectPageUC.PRJ_TYPE.FLATS) AndAlso (EgtGetHeadId("H1") <> GDB_ID.NULL)
|
||||
' DirectCutBtn.IsEnabled = (EgtGetHeadId("H1") <> GDB_ID.NULL)
|
||||
End Sub
|
||||
|
||||
' Nomi dei file per OmagVIEW
|
||||
@@ -1194,7 +1214,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 +1243,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
|
||||
@@ -1868,8 +1892,17 @@ 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
|
||||
|
||||
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.1.3")>
|
||||
<Assembly: AssemblyFileVersion("2.4.1.3")>
|
||||
|
||||
@@ -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,...)
|
||||
@@ -326,20 +331,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 +381,7 @@ Public Class CNCommunication
|
||||
EgtOutLog("ProcessStart : " & """" & m_sCNSiemensHMIPath & """" & " " & sArg)
|
||||
Process.Start(m_sCNSiemensHMIPath, sArg)
|
||||
m_CN.m_IsSiemensOne = GetPrivateProfileInt(S_NCSIEMENS, K_ISSIEMENSONE, 0, m_MainWindow.GetMachIniFile()) > 0
|
||||
m_CN.m_IsActiveModeSubscription = GetPrivateProfileInt(S_NCSIEMENS, K_ISACTIVEMODESUBSCR, 0, m_MainWindow.GetMachIniFile()) > 0
|
||||
If m_CN.m_IsSiemensOne Then
|
||||
' stati bottoni parte 1
|
||||
m_CN.DVariables_Read_Subscription(m_CN.m_szCnDataVar(CN_generico.CnData.Laser), VarType.TInteger, 0)
|
||||
@@ -389,6 +398,8 @@ Public Class CNCommunication
|
||||
m_CN.DVariables_Read_Subscription(m_CN.m_szCnDataVar(CN_generico.CnData.SpeedOvr), VarType.TDouble, 1)
|
||||
|
||||
GetPrivateProfileString(S_NCSIEMENS, K_DBVARPATH, "", m_CN.m_DbVarPath, m_MainWindow.GetMachIniFile)
|
||||
ElseIf m_CN.m_IsActiveModeSubscription Then
|
||||
m_CN.DVariables_Read_Subscription(m_CN.m_szCnDataVar(CN_generico.CnData.BlowState), VarType.TInteger, 3)
|
||||
End If
|
||||
Catch ex As Exception
|
||||
EgtOutLog("Error starting Process -> NcLink=True type=0")
|
||||
@@ -558,6 +569,7 @@ 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)
|
||||
End If
|
||||
Else
|
||||
m_MainWindow.m_DirectCutPageUC.m_MachineButtons.SpindleStateChanged(m_CN.bSpindleState)
|
||||
@@ -578,6 +590,7 @@ Public Class CNCommunication
|
||||
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)
|
||||
End If
|
||||
|
||||
End If
|
||||
@@ -690,12 +703,17 @@ Public Class CNCommunication
|
||||
m_MachineStatus.DisplayVar()
|
||||
'EgtOutLog("Modo attivato: " & m_CN.read_active_mode & " modo attivo: " & m_nCurrMode)
|
||||
|
||||
Dim TempCurrMode As Short = m_CN.read_active_mode()
|
||||
'EgtOutLog("Machine status: " & TempCurrMode)
|
||||
If TempCurrMode <> m_nCurrMode Then
|
||||
'EgtOutLog("Modo attivo: " & m_CN.read_active_mode)
|
||||
m_nCurrMode = CInt(TempCurrMode)
|
||||
m_MachineStatus.DisplayActiveMode(m_nCurrMode)
|
||||
If m_nCountRefresh > 10 Then
|
||||
Dim TempCurrMode As Short = m_CN.read_active_mode()
|
||||
'EgtOutLog("Machine status: " & TempCurrMode)
|
||||
If TempCurrMode <> m_nCurrMode Then
|
||||
'EgtOutLog("Modo attivo: " & m_CN.read_active_mode)
|
||||
m_nCurrMode = CInt(TempCurrMode)
|
||||
m_MachineStatus.DisplayActiveMode(m_nCurrMode)
|
||||
End If
|
||||
m_nCountRefresh = 0
|
||||
Else
|
||||
m_nCountRefresh = m_nCountRefresh + 1
|
||||
End If
|
||||
|
||||
If m_CN.b_NC_error Then
|
||||
|
||||
@@ -131,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
|
||||
|
||||
|
||||
@@ -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 = 52 ' Numero di dati del CN (Speed,Feed,...)
|
||||
|
||||
Public m_NewVariable As Boolean = False ' per scrittura delle vairbaili Apllication del PLC
|
||||
|
||||
@@ -65,6 +65,7 @@ Public MustInherit Class CN_generico
|
||||
ZCJog = 48
|
||||
ZBJog = 49
|
||||
PowerON = 50
|
||||
Remote = 51
|
||||
End Enum
|
||||
|
||||
#End Region
|
||||
@@ -87,6 +88,8 @@ Public MustInherit Class CN_generico
|
||||
#Region " Interface"
|
||||
|
||||
Friend m_IsSiemensOne As Boolean = False
|
||||
Friend m_IsActiveModeSubscription As Boolean = False
|
||||
|
||||
Friend m_DbVarPath As String = ""
|
||||
|
||||
Public IsFlexiumPlus As Boolean = False
|
||||
@@ -205,6 +208,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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
@@ -1085,6 +1085,8 @@ Namespace Num
|
||||
bZBCJog = CBool(values(n))
|
||||
Case CnData.PowerON ' (49)
|
||||
bPowerON = CBool(values(n))
|
||||
Case CnData.Remote ' (50)
|
||||
bRemote = CBool(values(n))
|
||||
|
||||
End Select
|
||||
Next
|
||||
@@ -1576,7 +1578,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
|
||||
|
||||
@@ -196,6 +196,16 @@
|
||||
<DependentUpon>CadCutPageUC.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="CAM\CamAuto.vb" />
|
||||
<Compile Include="Machine\ImportExportMachiningWindowWD.xaml.vb">
|
||||
<DependentUpon>ImportExportMachiningWindowWD.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Machine\ImportExportToolWD.xaml.vb">
|
||||
<DependentUpon>ImportExportToolWD.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Machine\WaterJetPageVM.vb" />
|
||||
<Compile Include="Machine\WaterJetPageUC.xaml.vb">
|
||||
<DependentUpon>WaterJetPageUC.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Project\StartLauncheWD.xaml.vb">
|
||||
<DependentUpon>StartLauncheWD.xaml</DependentUpon>
|
||||
</Compile>
|
||||
@@ -431,6 +441,17 @@
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="Machine\ImportExportMachiningWindowWD.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="Machine\ImportExportToolWD.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="Machine\WaterJetPageUC.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="Project\StartLauncheWD.xaml">
|
||||
</Page>
|
||||
<Page Include="Project\CicloStartWD.xaml">
|
||||
@@ -742,7 +763,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 +1061,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 +1115,132 @@
|
||||
<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\NewIcons\Drag_Rettangle.png" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
|
||||
<PropertyGroup>
|
||||
<PostBuildEvent>IF "$(PlatformName)"=="x86" IF "$(ConfigurationName)" == "Release" copy $(TargetPath) c:\EgtProg\OmagCUT\OmagCUTR32.exe
|
||||
|
||||
@@ -88,28 +88,82 @@
|
||||
<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>
|
||||
|
||||
<!--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 +204,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 +333,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 +546,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 +587,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}">
|
||||
|
||||
@@ -156,18 +156,33 @@
|
||||
<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>
|
||||
|
||||
<!--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 +191,46 @@
|
||||
<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>
|
||||
<BitmapImage x:Key="LastProjImg" UriSource="Resources/NewIcons/PlayStep.png"></BitmapImage>
|
||||
|
||||
<FontFamily x:Key="OmagCut_Font">./Resources/Fonts/#Century Gothic</FontFamily>
|
||||
@@ -199,7 +251,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 +471,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 +1206,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 +1254,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()
|
||||
|
||||
@@ -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
|
||||
@@ -276,7 +275,7 @@ Public Class CurrentProjectPageUC
|
||||
m_MainWindow.MainWindowGrid.Children.Add(m_MainWindow.m_OpenPage)
|
||||
m_MainWindow.m_ActivePage = MainWindow.Pages.Open
|
||||
|
||||
' seleziono il file dalla lista della finestra (= 4)
|
||||
' seleziono il file dalla lista della finestra (= 4)
|
||||
ElseIf MyStartLancherWD.CurrSelection = MODE_LAUNCHER.SelectedProject Then
|
||||
NewProject()
|
||||
Dim sCurrDir As String = Path.GetDirectoryName(MyStartLancherWD.SelPath)
|
||||
@@ -303,29 +302,8 @@ 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
|
||||
End Sub
|
||||
|
||||
' questo metodo è direttamente richiamato in caso di selezione della regione sinistra della pagina
|
||||
@@ -349,12 +327,7 @@ Public Class CurrentProjectPageUC
|
||||
End Sub
|
||||
|
||||
Private Sub OnMyMouseDownScene(sender As Object, e As System.Windows.Forms.MouseEventArgs) Handles CurrentProjectScene.OnMouseDownScene
|
||||
If m_bSelectCurv Then
|
||||
RaiseEvent OnMouseDownSceneSelCurv(sender, e)
|
||||
Else
|
||||
RaiseEvent OnMouseDownScene(sender, e)
|
||||
End If
|
||||
|
||||
RaiseEvent OnMouseDownScene(sender, e)
|
||||
End Sub
|
||||
|
||||
Private Sub OnMyMouseMoveScene(sender As Object, e As System.Windows.Forms.MouseEventArgs) Handles CurrentProjectScene.OnMouseMoveScene
|
||||
@@ -458,7 +431,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 +443,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 +451,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
|
||||
@@ -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")
|
||||
|
||||
@@ -46,13 +46,18 @@
|
||||
<Button Name="ResetCutBtn"
|
||||
Style="{DynamicResource OmagCut_YellowTextButton}"></Button>
|
||||
<!--Abilito la selezione delle linee da disegno-->
|
||||
<ToggleButton Name="TestBtn" Style="{DynamicResource OmagCut_BlueToggleButton}"></ToggleButton>
|
||||
|
||||
<ToggleButton Name="TestBtn" Style="{DynamicResource OmagCut_YellowIconToggleButton}">
|
||||
<Image Source="{DynamicResource Test-lamaImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||
</ToggleButton>
|
||||
|
||||
</UniformGrid>
|
||||
|
||||
<Button Name="SimulateBtn" Grid.Column="1" Style="{DynamicResource OmagCut_GradientBlueTextButtonPrjMgr}"/>
|
||||
<Button Name="WorkBtn" Grid.Column="2" Style="{DynamicResource OmagCut_GradientBlueTextButtonPrjMgr}"/>
|
||||
<Button Name="SimulateBtn" Grid.Column="1" Style="{DynamicResource OmagCut_YellowGradientYellowIconButton}">
|
||||
<Image Source="{DynamicResource SimulaImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="WorkBtn" Grid.Column="2" Style="{DynamicResource OmagCut_YellowGradientYellowIconButton}">
|
||||
<Image Source="{DynamicResource EseguiImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
|
||||
</Grid>
|
||||
</UserControl>
|
||||
|
||||
@@ -23,13 +23,13 @@ Public Class ProjectMgrUC
|
||||
|
||||
RegisterBtn.Content = "REG" 'Shape Registration
|
||||
ResetCutBtn.Content = EgtMsg(MSG_NESTPAGEUC + 6) 'Reset
|
||||
SimulateBtn.Content = EgtMsg(MSG_CADCUTPAGEUC + 1) 'Simulate - Simula
|
||||
SimulateBtn.ToolTip = EgtMsg(MSG_CADCUTPAGEUC + 1) 'Simulate - Simula
|
||||
If m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.OFFICE_TYPE) Then
|
||||
WorkBtn.Content = EgtMsg(MSG_CADCUTPAGEUC + 10) 'Export - Esporta
|
||||
WorkBtn.ToolTip = EgtMsg(MSG_CADCUTPAGEUC + 10) 'Export - Esporta
|
||||
Else
|
||||
WorkBtn.Content = EgtMsg(MSG_CADCUTPAGEUC + 2) 'Work - Lavora
|
||||
WorkBtn.ToolTip = EgtMsg(MSG_CADCUTPAGEUC + 2) 'Work - Lavora
|
||||
End If
|
||||
TestBtn.Content = EgtMsg(90255) 'Test
|
||||
TestBtn.ToolTip = EgtMsg(90255) 'Test
|
||||
End Sub
|
||||
|
||||
Private Sub ProjectMgrUC_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded
|
||||
@@ -128,25 +128,20 @@ Public Class ProjectMgrUC
|
||||
End Function
|
||||
|
||||
Friend Function ChangeTable() As Integer
|
||||
Dim nTabInd As Integer = 0
|
||||
Dim nRes As Integer = 0
|
||||
' se non abilitato esco dalla pagina
|
||||
If GetPrivateProfileInt(S_TABLE, K_CHANGETABWD, 0, m_MainWindow.GetMachIniFile()) = 0 Then
|
||||
Return nTabInd
|
||||
Return nRes
|
||||
End If
|
||||
Select Case GetTableCount()
|
||||
Case 2
|
||||
' Tavolo da usare ?
|
||||
' Vuoi cambiare tavola?
|
||||
Dim TableToUse As New EgtMsgBox(m_MainWindow, "", String.Format(EgtMsg(90968)), EgtMsgBox.Buttons.OK_CANCEL, EgtMsgBox.Icons.NULL)
|
||||
Select Case TableToUse.m_nPressedBtn
|
||||
Case 1 ' 1
|
||||
nTabInd = 1
|
||||
Case 0 ' 2
|
||||
nTabInd = 2
|
||||
End Select
|
||||
nRes = TableToUse.m_nPressedBtn
|
||||
Case Else
|
||||
' negli altri casi (3 tavole o una tavola non fare nulla)
|
||||
End Select
|
||||
Return nTabInd
|
||||
Return nRes
|
||||
End Function
|
||||
|
||||
Private Sub LoadBtn_Click(sender As Object, e As RoutedEventArgs) Handles LoadBtn.Click
|
||||
@@ -281,7 +276,7 @@ Public Class ProjectMgrUC
|
||||
m_CurrProjPage.SetWarningMessage("Trial Version")
|
||||
#Else
|
||||
' se sono in modalità Test allora eseguo solo il posizionamento della lama
|
||||
If m_CurrProjPage.m_bSelectCurv Then
|
||||
If m_MainWindow.m_CadCutPageUC.m_NestPage.m_bSelectCurv Then
|
||||
' Verifico non sia versione Ufficio
|
||||
If m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.OFFICE_TYPE) Then
|
||||
m_CurrProjPage.SetWarningMessage("Office Version")
|
||||
@@ -341,7 +336,7 @@ Public Class ProjectMgrUC
|
||||
' verifica assi lineari
|
||||
EgtVerifyOutstroke(dX, dY, dZ, dC1, dB1, nStat)
|
||||
If nStat <> 0 Then
|
||||
vtDirT = - vtDirT
|
||||
vtDirT = -vtDirT
|
||||
ptMid -= vtDirT * dThick
|
||||
EgtGetCalcAngles(vtDirT, Vector3d.Z_AX(), nStat, dC1, dB1, dC2, dB2)
|
||||
' calcolo la posizione degli assi lineari X, Y, Z ( correggere il punto ptMid.z sommando il raggio utensile)
|
||||
@@ -462,7 +457,7 @@ Public Class ProjectMgrUC
|
||||
' Costringo ad aggiornare UI
|
||||
UpdateUI()
|
||||
' Se macchina normale
|
||||
If Not m_CurrMachine.bProdLine Then
|
||||
If Not (m_CurrMachine.bProdLine Or m_CurrMachine.bDemo) Then
|
||||
' Download programma (eventuali errori sono segnalati dalla funzione)
|
||||
If m_CurrNcComm.SendProgram(sCncPath, 900) Then
|
||||
' copio il progetto corrente come progetto in lavorazione
|
||||
@@ -479,8 +474,11 @@ Public Class ProjectMgrUC
|
||||
End If
|
||||
|
||||
'-------------------Avvio il Ciclo-Start-------------------------
|
||||
Dim MyCicloStartWD As New CicloStartWD(m_MainWindow)
|
||||
MyCicloStartWD.ShowDialog()
|
||||
If GetPrivateProfileInt(S_GENERAL, "StartProgram", 0, m_MainWindow.GetIniFile()) <> 0 Then
|
||||
Dim MyCicloStartWD As New CicloStartWD(m_MainWindow)
|
||||
MyCicloStartWD.ShowDialog()
|
||||
End If
|
||||
|
||||
'-------------------Avvio il Ciclo-Start-------------------------
|
||||
|
||||
' Altrimenti linea di produzione
|
||||
@@ -561,6 +559,7 @@ Public Class ProjectMgrUC
|
||||
|
||||
' Se non collegato alla macchina
|
||||
If Not m_MainWindow.m_bNCLink Then
|
||||
' salvo il progetto corrente incrementando il valore del progetto
|
||||
m_CurrProjPage.SetWarningMessage(EgtMsg(90316)) 'Non connesso alla macchina
|
||||
' copio il progetto corrente come progetto in lavorazione
|
||||
Dim sWrkPath As String = m_MainWindow.GetTempDir() & "\" & "WorkProj.nge"
|
||||
@@ -571,6 +570,7 @@ Public Class ProjectMgrUC
|
||||
m_CurrProjPage.SaveProject()
|
||||
' lancio eventuale lua post-trasmissione
|
||||
m_MainWindow.ExecSentProgScript(False, bAlreadySent)
|
||||
' se in versione demo (per linea di produzione) salvo il file corrente incrementando la numerazione
|
||||
Return
|
||||
End If
|
||||
|
||||
@@ -736,11 +736,11 @@ Public Class ProjectMgrUC
|
||||
|
||||
Private Sub TestBtn_Click(sender As Object, e As RoutedEventArgs) Handles TestBtn.Click
|
||||
If TestBtn.IsChecked Then
|
||||
m_CurrProjPage.m_bSelectCurv = True
|
||||
m_MainWindow.m_CadCutPageUC.m_NestPage.m_bSelectCurv = True
|
||||
' deseleziono tutto
|
||||
EgtDeselectAll()
|
||||
Else
|
||||
m_CurrProjPage.m_bSelectCurv = False
|
||||
m_MainWindow.m_CadCutPageUC.m_NestPage.m_bSelectCurv = False
|
||||
EgtDeselectObj(m_MainWindow.m_CadCutPageUC.m_NestPage.m_CurrSelectedCurv)
|
||||
EgtDeselectObj(m_MainWindow.m_CadCutPageUC.m_NestPage.m_CurrSelectedSawCurv)
|
||||
End If
|
||||
|
||||
@@ -111,9 +111,12 @@ Public Class StartLauncherWD
|
||||
Me.Left = Owner.Left + Owner.Width / 2 - Me.Width / 2
|
||||
|
||||
' imopposto il messaggio di avvio
|
||||
SlectLauncherTxbl.Text = "Seleziona modalità di avvio"
|
||||
FileName.Text = "Progetti recenti"
|
||||
DataFile.Text = "Ultima apertura"
|
||||
SlectLauncherTxbl.Text = EgtMsg(91010) ' Seleziona modalità di avvio
|
||||
FileName.Text = EgtMsg(91011) ' Progetti recenti
|
||||
DataFile.Text = EgtMsg(91012) ' Ultima apertura
|
||||
LastProject.ToolTip = EgtMsg(91013)
|
||||
NewProject.ToolTip = EgtMsg(91014)
|
||||
OpenFolder.ToolTip = EgtMsg(91015)
|
||||
End Sub
|
||||
|
||||
' lancio l'apertura della pagina dei progetti
|
||||
|
||||
@@ -80,17 +80,35 @@
|
||||
</ComboBox>
|
||||
|
||||
<!--WATERJET-->
|
||||
<TextBlock Name="CurrWJettingTxBl" Grid.Column="1" Grid.Row="2"
|
||||
<TextBlock Name="CurrWJettingTxBl" Grid.Column="1" Grid.Row="2"
|
||||
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}" Visibility="Hidden"/>
|
||||
<ComboBox Name="CurrWJettingCmBx" Grid.Column="1" Grid.Row="3" Visibility="Hidden">
|
||||
<ComboBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding}" FontSize="20" />
|
||||
</DataTemplate>
|
||||
</ComboBox.ItemTemplate>
|
||||
</ComboBox>
|
||||
|
||||
<!--Bottoni Conferma/Cancel -->
|
||||
<Grid Name="WaterJettingUGrd" Grid.Column="1" Grid.Row="3">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="4.5*"/>
|
||||
<ColumnDefinition Width="0.2*"/>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<ComboBox Name="CurrWJettingCmBx" Grid.Column="0" Visibility="Hidden">
|
||||
<ComboBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding}" FontSize="20" />
|
||||
</DataTemplate>
|
||||
</ComboBox.ItemTemplate>
|
||||
</ComboBox>
|
||||
<ComboBox Name="CurrWJettingQualityCmBx" Grid.Column="2" Visibility="Hidden">
|
||||
<ComboBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding}" FontSize="20" />
|
||||
</DataTemplate>
|
||||
</ComboBox.ItemTemplate>
|
||||
</ComboBox>
|
||||
</Grid>
|
||||
|
||||
<!--Bottoni Conferma/Cancel -->
|
||||
<Grid Name="ButtonsGrid" Grid.Column="1" Grid.Row="3" Grid.RowSpan="2">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
|
||||
@@ -41,6 +41,7 @@ Public Class ChooseMachining
|
||||
CurrMillingCmBx.ItemsSource = m_MillingList
|
||||
CurrPocketingCmBx.ItemsSource = m_PocketingList
|
||||
CurrWJettingCmBx.ItemsSource = m_WJettingList
|
||||
CurrWJettingQualityCmBx.ItemsSource = m_CurrentMachine.Qualities
|
||||
|
||||
CurrSawingTxBl.Text = EgtMsg(MSG_CHOOSEMACHININGPAGEUC + 1)
|
||||
AuxiliaryMachiningTxBl.Text = EgtMsg(MSG_CHOOSEMACHININGPAGEUC + 2)
|
||||
@@ -59,6 +60,12 @@ Public Class ChooseMachining
|
||||
|
||||
Private Sub InitializeMachiningLists()
|
||||
|
||||
' in assenza dell'uscita H1 nascondo i parametri lama
|
||||
If EgtGetHeadId("H1") = GDB_ID.NULL Then
|
||||
CurrSawingTxBl.Visibility = Visibility.Hidden
|
||||
CurrSawingCmBx.Visibility = Visibility.Hidden
|
||||
End If
|
||||
|
||||
' -- TAGLIO --
|
||||
CreateMachiningList(MCH_MY.SAWING, m_CurrentMachine.sCurrSaw, m_SawingList)
|
||||
' aggiungo un campo vuoto
|
||||
@@ -256,19 +263,38 @@ Public Class ChooseMachining
|
||||
If SysNotes <> String.Empty Then
|
||||
Dim MachiningMaterials() = SysNotes.Split(";".ToCharArray)
|
||||
SysNotes = String.Empty
|
||||
For Each Material As Object In MachiningMaterials
|
||||
Dim Param() As String = Material.Split(",".ToCharArray)
|
||||
If Param(0) = m_CurrentMachine.CurrMat.nId.ToString() Then
|
||||
Dim dRawHeight = GetRawHeight()
|
||||
Dim MatMinH As Double = 0
|
||||
StringToDouble(Param(1), MatMinH)
|
||||
Dim MatMaxH As Double = 0
|
||||
StringToDouble(Param(2), MatMaxH)
|
||||
If dRawHeight > MatMinH - EPS_SMALL And dRawHeight < MatMaxH + EPS_SMALL Then
|
||||
Return True
|
||||
If m_CurrentMachine.bWaterJet And m_CurrentMachine.bFromDBWaterJet Then
|
||||
For Each Material As Object In MachiningMaterials
|
||||
Dim Param() As String = Material.Split(",".ToCharArray)
|
||||
Dim SubParam() As String = Param(0).Split(".".ToCharArray)
|
||||
If SubParam(0) = m_CurrentMachine.CurrMat.nId.ToString() AndAlso SubParam.Count > 1 AndAlso SubParam(1) = m_CurrentMachine.CurrMat.SubId.ToString() Then
|
||||
Dim dRawHeight = GetRawHeight()
|
||||
Dim MatMinH As Double = 0
|
||||
StringToDouble(Param(1), MatMinH)
|
||||
Dim MatMaxH As Double = 0
|
||||
StringToDouble(Param(2), MatMaxH)
|
||||
If dRawHeight > MatMinH - EPS_SMALL And dRawHeight < MatMaxH + EPS_SMALL Then
|
||||
Return True
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
Next
|
||||
Else
|
||||
For Each Material As Object In MachiningMaterials
|
||||
Dim Param() As String = Material.Split(",".ToCharArray)
|
||||
If Param(0) = m_CurrentMachine.CurrMat.nId.ToString() Then
|
||||
Dim dRawHeight = GetRawHeight()
|
||||
Dim MatMinH As Double = 0
|
||||
StringToDouble(Param(1), MatMinH)
|
||||
Dim MatMaxH As Double = 0
|
||||
StringToDouble(Param(2), MatMaxH)
|
||||
If dRawHeight > MatMinH - EPS_SMALL And dRawHeight < MatMaxH + EPS_SMALL Then
|
||||
Return True
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
|
||||
|
||||
Return False
|
||||
Else
|
||||
Return False
|
||||
@@ -553,7 +579,8 @@ Public Class ChooseMachining
|
||||
Next
|
||||
m_RowNumber = m_RowNumber + nNewRow
|
||||
CurrWJettingTxBl.SetValue(Grid.RowProperty, m_RowNumber - nDeltaRow - nNewRow)
|
||||
CurrWJettingCmBx.SetValue(Grid.RowProperty, m_RowNumber - nDeltaRow - nNewRow + 1)
|
||||
'CurrWJettingCmBx.SetValue(Grid.RowProperty, m_RowNumber - nDeltaRow - nNewRow + 1)
|
||||
WaterJettingUGrd.SetValue(Grid.RowProperty, m_RowNumber - nDeltaRow - nNewRow + 1)
|
||||
If m_CurrentMachine.sCurrWaterJetting <> String.Empty Then
|
||||
CurrWJettingCmBx.SelectedItem = m_CurrentMachine.sCurrWaterJetting
|
||||
End If
|
||||
@@ -564,6 +591,22 @@ Public Class ChooseMachining
|
||||
End If
|
||||
CurrWJettingTxBl.Visibility = Windows.Visibility.Visible
|
||||
CurrWJettingCmBx.Visibility = Windows.Visibility.Visible
|
||||
' se DB WaterJet abilitato avrò anche la CmBx della Quality altrimenti espando la CmBx del Waterjetting corrente su tutta la riga
|
||||
If m_MainWindow.m_CurrentMachine.bFromDBWaterJet Then
|
||||
CurrWJettingCmBx.SetValue(Grid.ColumnSpanProperty, 1)
|
||||
If String.IsNullOrEmpty(CurrWJettingQualityCmBx.SelectedItem) Then
|
||||
CurrWJettingQualityCmBx.SelectedItem = m_CurrentMachine.sCurrWaterJettingQuality
|
||||
End If
|
||||
' verifico che la selezione sia andata a buon fine, altrimenti comunico l'avvenuta modifica
|
||||
If String.IsNullOrEmpty(CurrWJettingQualityCmBx.SelectedItem) Then
|
||||
' verifico che sia stato inserito veramente una lavorazione prima di comunicare una modifica
|
||||
If CurrWJettingQualityCmBx.SelectedItem <> m_CurrentMachine.sCurrWaterJettingQuality Then m_MachIsModified = True
|
||||
End If
|
||||
CurrWJettingQualityCmBx.Visibility = Windows.Visibility.Visible
|
||||
Else
|
||||
CurrWJettingCmBx.SetValue(Grid.ColumnSpanProperty, 3)
|
||||
CurrWJettingQualityCmBx.Visibility = Windows.Visibility.Collapsed
|
||||
End If
|
||||
End If
|
||||
|
||||
Me.Height = 42 * m_RowNumber
|
||||
@@ -590,12 +633,20 @@ Public Class ChooseMachining
|
||||
m_MainWindow.m_CurrentMachine.sCurrWaterJetting = CurrWJettingCmBx.SelectedItem.ToString()
|
||||
End Sub
|
||||
|
||||
Private Sub CurrQaulityWJettingCmBx_SelectionChanged(sender As Object, e As SelectionChangedEventArgs) Handles CurrWJettingQualityCmBx.SelectionChanged
|
||||
m_MainWindow.m_CurrentMachine.sCurrWaterJettingQuality = CurrWJettingQualityCmBx.SelectedItem.ToString()
|
||||
End Sub
|
||||
|
||||
Private Sub OkBtn_Click(sender As Object, e As RoutedEventArgs) Handles OkBtn.Click
|
||||
DialogResult = True
|
||||
' Aggiorno i parametri dei tagli diretti
|
||||
m_MainWindow.m_DirectCutPageUC.ReloadParam()
|
||||
End Sub
|
||||
|
||||
Private Sub ExitBtn_Click(sender As Object, e As RoutedEventArgs) Handles ExitBtn.Click
|
||||
DialogResult = False
|
||||
' Aggiorno i parametri dei tagli diretti
|
||||
m_MainWindow.m_DirectCutPageUC.ReloadParam()
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
@@ -41,6 +41,7 @@ Public Class RawPartPageUC
|
||||
Private m_RawOffsX As Double = 0
|
||||
Private m_RawOffsY As Double = 0
|
||||
Private m_RawKerf As Double = 0
|
||||
Private m_PrecKerf As Double = 0
|
||||
' Layer per crocette temporanee
|
||||
Private m_nTempLay As Integer = GDB_ID.NULL
|
||||
' Definizione lista modalità di definizione grezzo per ComboBox
|
||||
@@ -139,7 +140,7 @@ Public Class RawPartPageUC
|
||||
' Nascondo bottone dati lastra se non attivato da file .ini
|
||||
m_bSlabId = (Not m_CurrentMachine.bHasRawBarCodeReader And
|
||||
GetPrivateProfileInt(S_RAWPART, K_SLABID, 0, m_MainWindow.GetIniFile()) <> 0)
|
||||
SlabIdBtn.Visibility = If( m_bSlabId, Windows.Visibility.Visible, Windows.Visibility.Collapsed)
|
||||
SlabIdBtn.Visibility = If(m_bSlabId, Windows.Visibility.Visible, Windows.Visibility.Collapsed)
|
||||
|
||||
m_SmartMachiningPage = GetPrivateProfileInt(S_GENERAL, "SmartMachiningPage", 0, m_MainWindow.GetIniFile()) <> 0
|
||||
|
||||
@@ -164,10 +165,16 @@ Public Class RawPartPageUC
|
||||
End Sub
|
||||
|
||||
Private Sub RawPartPage_Loaded(sender As Object, e As RoutedEventArgs)
|
||||
' aggiorno la lista dei materiali
|
||||
Dim Index As Integer = 1
|
||||
If m_CurrentMachine.bWaterJet And m_CurrentMachine.bFromDBWaterJet Then
|
||||
m_CurrentMachine.LoadWJMaterial()
|
||||
End If
|
||||
|
||||
m_CurrProjPage = m_MainWindow.m_CurrentProjectPageUC
|
||||
m_bActive = True
|
||||
' Assegno modalità acquisizione punti laser (da disegno se non collegato alla macchina)
|
||||
m_bFromDraw = ( m_MainWindow.m_CNCommunication.m_nNCType = 0)
|
||||
m_bFromDraw = (m_MainWindow.m_CNCommunication.m_nNCType = 0)
|
||||
' Correggo differenza tra machinebuttons che ha 10 colonne e spazio disponibile solo per 9 facendolo sbordare(non si vede perchè la parte che avanza è vuota)
|
||||
m_MachineButtons.Width = LowerButtonGrid.ActualWidth / 12 * 10
|
||||
' Se disponibile, imposto possibilità di contorno da foto
|
||||
@@ -225,7 +232,7 @@ Public Class RawPartPageUC
|
||||
End If
|
||||
' aggiorno l'apparenza del grezzo
|
||||
AdjustRawPartOnStart()
|
||||
' Altrimenti lo definisco
|
||||
' Altrimenti lo definisco
|
||||
Else
|
||||
' Leggo da Ini gli ultimi valori
|
||||
m_RawLength = GetPrivateProfileDouble(S_RAWPART, K_RAWLENGTH, 2500, m_MainWindow.GetIniFile())
|
||||
@@ -234,17 +241,18 @@ Public Class RawPartPageUC
|
||||
m_RawOffsX = GetPrivateProfileDouble(S_RAWPART, K_RAWOFFSX, 100, m_MainWindow.GetIniFile())
|
||||
m_RawOffsY = GetPrivateProfileDouble(S_RAWPART, K_RAWOFFSY, 100, m_MainWindow.GetIniFile())
|
||||
m_RawKerf = GetPrivateProfileDouble(S_RAWPART, K_RAWKERF, 50, m_MainWindow.GetIniFile())
|
||||
m_PrecKerf = m_RawKerf
|
||||
' Richiedo ricalcolo quota eventuale foto
|
||||
UpdateRawPart(True)
|
||||
' Eventuale gestione dati lastra
|
||||
If m_bSlabId Then
|
||||
Dim sBlock As String = ""
|
||||
GetPrivateProfileString( S_RAWPART, K_BLOCKNAME, "", sBlock, m_MainWindow.GetIniFile())
|
||||
Dim nSlabNbr As Integer = GetPrivateProfileInt( S_RAWPART, K_SLABNBR, 0, m_MainWindow.GetIniFile())
|
||||
GetPrivateProfileString(S_RAWPART, K_BLOCKNAME, "", sBlock, m_MainWindow.GetIniFile())
|
||||
Dim nSlabNbr As Integer = GetPrivateProfileInt(S_RAWPART, K_SLABNBR, 0, m_MainWindow.GetIniFile())
|
||||
nSlabNbr += 1
|
||||
Dim sSlabNbr As String = nSlabNbr.ToString()
|
||||
WritePrivateProfileString( S_RAWPART, K_SLABNBR, sSlabNbr, m_MainWindow.GetIniFile())
|
||||
Utility.SetBlockAndSlabNbr( sBlock, sSlabNbr)
|
||||
WritePrivateProfileString(S_RAWPART, K_SLABNBR, sSlabNbr, m_MainWindow.GetIniFile())
|
||||
Utility.SetBlockAndSlabNbr(sBlock, sSlabNbr)
|
||||
End If
|
||||
End If
|
||||
' Assegno dati grezzo rettangolare ai textbox
|
||||
@@ -270,11 +278,24 @@ Public Class RawPartPageUC
|
||||
m_ActiveRawMode = RAWMODE.RECTANGLE
|
||||
RawModeCmBx.SelectedIndex = RAWMODE.RECTANGLE
|
||||
PointsGpBx.Visibility = Windows.Visibility.Hidden
|
||||
AdjustRawPartPosition()
|
||||
If dInvertKerf < 1 Then
|
||||
AdjustRawPartPositionNegativeKerf()
|
||||
' assegno il giosto colore al kerf
|
||||
Dim nKerfId As Integer = EgtGetFirstNameInGroup(m_CurrProjPage.m_nRawId, NAME_KERF)
|
||||
EgtSetColor(nKerfId, m_KerfCol)
|
||||
Else
|
||||
AdjustRawPartPosition()
|
||||
End If
|
||||
EgtZoom(ZM.ALL)
|
||||
End If
|
||||
' Imposto il materiale corrente nella combobox
|
||||
MaterialsCmbx.SelectedItem = m_CurrentMachine.CurrMat
|
||||
'Imposto il materiale corrente nella combobox
|
||||
'MaterialsCmbx.SelectedItem = m_CurrentMachine.CurrMat
|
||||
Dim Item As Material
|
||||
For Each Item In MaterialsCmbx.Items
|
||||
If Not IsNothing(m_CurrentMachine.CurrMat) AndAlso Item.sName = m_CurrentMachine.CurrMat.sName Then
|
||||
MaterialsCmbx.SelectedItem = Item
|
||||
End If
|
||||
Next
|
||||
End Sub
|
||||
|
||||
Private Sub OnMyMouseDownScene(sender As Object, e As System.Windows.Forms.MouseEventArgs) Handles m_CurrProjPage.OnMouseDownScene
|
||||
@@ -943,13 +964,21 @@ Public Class RawPartPageUC
|
||||
m_nPtMode = If(AddBtn.IsChecked, PTMODE.ADD, PTMODE.MOVE)
|
||||
Case RAWMODE.FROM_LASER
|
||||
Dim ptAcquired As Point3d
|
||||
'----------------------------------------- INIZIO ------------------ se decido di inserire i punti laser manualmente --------------------------------------------------
|
||||
If m_bFromDraw And Not IsNothing(m_ptPrev) Then
|
||||
ptAcquired = m_ptPrev
|
||||
ptAcquired.ToLoc(New Frame3d(m_ptTableMin))
|
||||
'----------------------------------------- FINE ------------------- se decido di inserire i punti laser manualmente --------------------------------------------------
|
||||
ElseIf Not AcquireLaserPoint(ptAcquired) Then
|
||||
m_CurrProjPage.SetErrorMessage(EgtMsg(MSG_RAWPARTPAGEUC + 32))
|
||||
' Se inserimento manuale dei punti laser
|
||||
If m_bFromDraw Then
|
||||
If Not IsNothing(m_ptPrev) Then
|
||||
ptAcquired = m_ptPrev
|
||||
ptAcquired.ToLoc(New Frame3d(m_ptTableMin))
|
||||
Else
|
||||
m_CurrProjPage.SetErrorMessage(EgtMsg(90532)) ' Errore nell'acquisizione del punto
|
||||
Return
|
||||
End If
|
||||
' altrimenti da macchina
|
||||
Else
|
||||
If Not AcquireLaserPoint(ptAcquired) Then
|
||||
m_CurrProjPage.SetErrorMessage(EgtMsg(90532)) ' Errore nell'acquisizione del punto
|
||||
Return
|
||||
End If
|
||||
End If
|
||||
' Limito il punto a stare nella tavola con franco pari al kerf
|
||||
If ptAcquired.x < m_RawKerf Then ptAcquired.x = m_RawKerf + SAFE_RAW_DIST
|
||||
@@ -993,13 +1022,21 @@ Public Class RawPartPageUC
|
||||
m_nPtDmgMode = DMGMODE.NONE
|
||||
Case RAWMODE.DAMAGED_BY_LASER
|
||||
Dim ptAcquired As Point3d
|
||||
'----------------------------------------- INIZIO ------------------ se decido di inserire i punti laser manualmente --------------------------------------------------
|
||||
If m_bFromDraw And Not IsNothing(m_ptPrev) Then
|
||||
ptAcquired = m_ptPrev
|
||||
ptAcquired.ToLoc(New Frame3d(m_ptTableMin))
|
||||
'----------------------------------------- FINE ------------------- se decido di inserire i punti laser manualmente --------------------------------------------------
|
||||
ElseIf Not AcquireLaserPoint(ptAcquired) Then
|
||||
m_CurrProjPage.SetErrorMessage(EgtMsg(MSG_RAWPARTPAGEUC + 32))
|
||||
' Se inserimento manuale dei punti laser
|
||||
If m_bFromDraw Then
|
||||
If Not IsNothing(m_ptPrev) Then
|
||||
ptAcquired = m_ptPrev
|
||||
ptAcquired.ToLoc(New Frame3d(m_ptTableMin))
|
||||
Else
|
||||
m_CurrProjPage.SetErrorMessage(EgtMsg(90532)) ' Errore nell'acquisizione del punto
|
||||
Return
|
||||
End If
|
||||
' altrimenti da macchina
|
||||
Else
|
||||
If Not AcquireLaserPoint(ptAcquired) Then
|
||||
m_CurrProjPage.SetErrorMessage(EgtMsg(90532)) ' Errore nell'acquisizione del punto
|
||||
Return
|
||||
End If
|
||||
End If
|
||||
' Limito il punto a stare nella tavola con franco pari al kerf
|
||||
If ptAcquired.x < m_RawKerf Then ptAcquired.x = m_RawKerf + SAFE_RAW_DIST
|
||||
@@ -1041,8 +1078,11 @@ Public Class RawPartPageUC
|
||||
If Not m_MainWindow.m_CNCommunication.GetAxesPositions(dL1, dL2, dL3, dR1, dR2) Then
|
||||
Return False
|
||||
End If
|
||||
' Ricavo dati lama corrente
|
||||
Dim sSaw As String = m_CurrentMachine.sCurrSaw
|
||||
' Recupero dati utensile e testa corrente
|
||||
Dim sTool As String = ""
|
||||
Dim sHead As String = ""
|
||||
Dim nExit As Integer = 0
|
||||
EgtGetCalcTool(sTool, sHead, nExit)
|
||||
' Imposto come testa corrente il laser (senza utensile ovviamente)
|
||||
If Not EgtSetCalcTool("", "H3", 1) Then
|
||||
Return False
|
||||
@@ -1051,10 +1091,8 @@ Public Class RawPartPageUC
|
||||
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, dR1, dR2, True, ptTipP1) Then
|
||||
Return False
|
||||
End If
|
||||
' Ora imposto la lama corrente
|
||||
If Not EgtSetCalcTool(sSaw, "H1", 1) Then
|
||||
Return False
|
||||
End If
|
||||
' Reimposto eventuale precedente utensile
|
||||
EgtSetCalcTool(sTool, sHead, nExit)
|
||||
' Porto il tip nell'origine tavola
|
||||
ptAcquired = ptTipP1
|
||||
ptAcquired.ToLoc(New Frame3d(m_ptTableMin))
|
||||
@@ -1171,6 +1209,8 @@ Public Class RawPartPageUC
|
||||
' box grezzo
|
||||
Dim ptMin, ptMax As Point3d
|
||||
GetRawBox(ptMin, ptMax)
|
||||
Dim Lenght As Double = ptMax.x - ptMin.x
|
||||
Dim Width As Double = ptMax.y - ptMin.y
|
||||
ptMin.x += m_RawKerf
|
||||
ptMin.y += m_RawKerf
|
||||
ptMin.z = ptMax.z
|
||||
@@ -1185,6 +1225,41 @@ Public Class RawPartPageUC
|
||||
Return True
|
||||
End Function
|
||||
|
||||
#Region "Negative Kerf"
|
||||
|
||||
Private Function AdjustRawPartNegativeKerf(Optional NegativeOffset As Boolean = True) As Boolean
|
||||
' Se non c'è il grezzo, esco
|
||||
If m_CurrProjPage.m_nRawId = GDB_ID.NULL Then Return False
|
||||
' Cancello eventuale vecchio contorno di kerf
|
||||
Dim nKerfId As Integer = EgtGetFirstNameInGroup(m_CurrProjPage.m_nRawId, NAME_KERF)
|
||||
Dim nInvert As Double = 1
|
||||
If Not NegativeOffset Then
|
||||
nInvert = -1
|
||||
End If
|
||||
EgtOffsetCurve(nKerfId, (-m_RawKerf - m_PrecKerf) * nInvert, OFF_TYPE.EXTEND)
|
||||
EgtSetColor(nKerfId, m_KerfCol)
|
||||
' Salvo il valore del kerf (sempre in mm)
|
||||
EgtSetInfo(m_CurrProjPage.m_nRawId, KEY_KERF, m_RawKerf)
|
||||
Return True
|
||||
End Function
|
||||
|
||||
Private Function AdjustRawPartPositionNegativeKerf() As Boolean
|
||||
' Sistemo la posizione
|
||||
Dim ptRef As New Point3d(m_RawOffsX, m_RawOffsY, m_CurrentMachine.dAdditionalTable)
|
||||
If EgtMoveToCornerRawPart(m_CurrProjPage.m_nRawId, ptRef, MCH_CR.BL) Then
|
||||
OkBtn.IsEnabled = True
|
||||
m_CurrProjPage.ClearMessage()
|
||||
Else
|
||||
OkBtn.IsEnabled = False
|
||||
m_CurrProjPage.SetErrorMessage(EgtMsg(MSG_RAWPARTPAGEUC + 47)) ' Errore nella posizione o dimensione del grezzo
|
||||
End If
|
||||
' Aggiorno visualizzazione
|
||||
EgtZoom(ZM.ALL)
|
||||
Return True
|
||||
End Function
|
||||
|
||||
#End Region ' Negative Kerf
|
||||
|
||||
Private Sub UpdateRawPartHeight()
|
||||
' Se da creare
|
||||
If m_CurrProjPage.m_nRawId = GDB_ID.NULL Then
|
||||
@@ -1514,8 +1589,10 @@ Public Class RawPartPageUC
|
||||
End If
|
||||
Dim dMinOffsetX = m_RawKerf
|
||||
If dKerf < 0 And dOffsetX >= 0 Then
|
||||
m_RawOffsX = dOffsetX + m_RawKerf
|
||||
UpdateRawPart()
|
||||
'm_RawOffsX = dOffsetX + m_RawKerf
|
||||
'UpdateRawPart()
|
||||
m_RawOffsX = dOffsetX
|
||||
AdjustRawPartPositionNegativeKerf()
|
||||
ElseIf dKerf >= 0 And dOffsetX >= dMinOffsetX Then
|
||||
m_RawOffsX = dOffsetX
|
||||
UpdateRawPart()
|
||||
@@ -1534,8 +1611,10 @@ Public Class RawPartPageUC
|
||||
End If
|
||||
Dim dMinOffsetY = m_RawKerf
|
||||
If dKerf < 0 And dOffsetY >= 0 Then
|
||||
m_RawOffsY = dOffsetY + m_RawKerf
|
||||
UpdateRawPart()
|
||||
'm_RawOffsY = dOffsetY + m_RawKerf
|
||||
'UpdateRawPart()
|
||||
m_RawOffsY = dOffsetY
|
||||
AdjustRawPartPositionNegativeKerf()
|
||||
ElseIf dKerf >= 0 And dOffsetY >= dMinOffsetY Then
|
||||
m_RawOffsY = dOffsetY
|
||||
UpdateRawPart()
|
||||
@@ -1554,15 +1633,29 @@ Public Class RawPartPageUC
|
||||
Dim dMaxKerf = Math.Min(Math.Min(m_RawOffsX, m_RawOffsY),
|
||||
Math.Min(m_dTableLength - m_RawLength - m_RawOffsX, m_dTableWidth - m_RawWidth - m_RawOffsY))
|
||||
Dim dMinKerf = -Math.Min(m_RawLength, m_RawWidth) / 2
|
||||
' recuper il segno del valore del Kerf precedente
|
||||
Dim dInvertKerf As Double = 1
|
||||
EgtGetInfo(EgtGetFirstRawPart(), KEY_INVERT_KERF, dInvertKerf)
|
||||
m_PrecKerf = Math.Abs(m_RawKerf)
|
||||
m_PrecKerf = m_PrecKerf * dInvertKerf
|
||||
' Sostituisco: dKerf >= dMinKerf And dKerf <= dMaxKerf
|
||||
If dKerf >= 0 And dKerf <= dMaxKerf Then
|
||||
m_RawKerf = dKerf
|
||||
If m_PrecKerf < 0 Then
|
||||
' definsco la dimensione del grezzo pari a quella del kerf
|
||||
m_RawKerf = 0
|
||||
AdjustRawPartNegativeKerf()
|
||||
UpdateCircles()
|
||||
UpdateRawPartKerf()
|
||||
m_RawKerf = dKerf
|
||||
m_PrecKerf = 0
|
||||
End If
|
||||
If m_ActiveRawMode <> RAWMODE.FROM_PHOTO Then
|
||||
StringToLen(LengthTxBx.Text, m_RawLength)
|
||||
StringToLen(WidthTxBx.Text, m_RawWidth)
|
||||
StringToLen(OffsetXTxBx.Text, m_RawOffsX)
|
||||
StringToLen(OffsetYTxBx.Text, m_RawOffsY)
|
||||
UpdateRawPart()
|
||||
' UpdateRawPart()
|
||||
UpdateRawPartKerf()
|
||||
' Recupero id contorno kerf
|
||||
Dim nKerfId As Integer = EgtGetFirstNameInGroup(m_CurrProjPage.m_nRawId, NAME_KERF)
|
||||
@@ -1576,20 +1669,56 @@ Public Class RawPartPageUC
|
||||
' Ridisegno
|
||||
EgtDraw()
|
||||
ElseIf dKerf >= dMinKerf And dKerf < 0 Then
|
||||
' aggiorno il valore del Kerf corrente
|
||||
m_RawKerf = dKerf
|
||||
If m_ActiveRawMode <> RAWMODE.FROM_PHOTO Then
|
||||
' aggiorno dati grezzo
|
||||
' recupero dati grezzo
|
||||
StringToLen(LengthTxBx.Text, m_RawLength)
|
||||
m_RawLength = m_RawLength + 2 * m_RawKerf
|
||||
StringToLen(WidthTxBx.Text, m_RawWidth)
|
||||
m_RawWidth = m_RawWidth + 2 * m_RawKerf
|
||||
StringToLen(OffsetXTxBx.Text, m_RawOffsX)
|
||||
m_RawOffsX = m_RawOffsX - m_RawKerf
|
||||
StringToLen(OffsetYTxBx.Text, m_RawOffsY)
|
||||
m_RawOffsY = m_RawOffsY - m_RawKerf
|
||||
UpdateRawPart()
|
||||
|
||||
If m_PrecKerf >= 0 Then
|
||||
m_RawLength = m_RawLength + 2 * m_RawKerf
|
||||
m_RawWidth = m_RawWidth + 2 * m_RawKerf
|
||||
m_RawOffsX = m_RawOffsX - m_RawKerf
|
||||
m_RawOffsY = m_RawOffsY - m_RawKerf
|
||||
End If
|
||||
m_RawKerf = -m_RawKerf
|
||||
UpdateRawPartKerf()
|
||||
' esegue l'aggiornamento della dimensione del grezzo solo quando passo dal kerf positivo a quello negativo
|
||||
|
||||
If m_PrecKerf >= 0 Then
|
||||
' definsco la dimensione del grezzo pari a quella del kerf
|
||||
m_RawKerf = 0
|
||||
AdjustRawPartNegativeKerf(False)
|
||||
UpdateCircles()
|
||||
UpdateRawPartKerf()
|
||||
m_RawKerf = -dKerf
|
||||
m_PrecKerf = 0
|
||||
End If
|
||||
AdjustRawPartNegativeKerf()
|
||||
UpdateCircles()
|
||||
'If m_PrecKerf > 0 And m_RawKerf < 0 Then
|
||||
' m_RawLength = m_RawLength + 2 * m_RawKerf
|
||||
' m_RawWidth = m_RawWidth + 2 * m_RawKerf
|
||||
' m_RawOffsX = m_RawOffsX - m_RawKerf - m_PrecKerf
|
||||
' m_RawOffsY = m_RawOffsY - m_RawKerf - m_PrecKerf
|
||||
' m_RawKerf = -m_RawKerf
|
||||
' UpdateRawPartKerf()
|
||||
'If m_PrecKerf >=0 And m_RawKerf < 0 Then
|
||||
' m_RawOffsX = m_RawOffsX - m_PrecKerf
|
||||
' m_RawOffsY = m_RawOffsY - m_PrecKerf
|
||||
' UpdateNegativeRawPart()
|
||||
'Else
|
||||
' UpdateNegativeRawPart()
|
||||
'End If
|
||||
|
||||
'UpdateRawPart()
|
||||
'UpdateNegativeRawPart()
|
||||
|
||||
'm_RawKerf = -m_RawKerf
|
||||
'UpdateRawPartKerf()
|
||||
|
||||
' Recupero id contorno kerf
|
||||
Dim nKerfId As Integer = EgtGetFirstNameInGroup(m_CurrProjPage.m_nRawId, NAME_KERF)
|
||||
' Modifico il colore
|
||||
@@ -1676,7 +1805,7 @@ Public Class RawPartPageUC
|
||||
m_MainWindow.m_CNCommunication.m_CN.n_DReadELS_handle = 0
|
||||
' Definisco flag tastatura
|
||||
Dim bProbingOk As Boolean = False
|
||||
For I As integer = 0 To 120
|
||||
For I As Integer = 0 To 120
|
||||
' Devo rileggere la variabile ad ogni ciclo
|
||||
m_MainWindow.m_CNCommunication.m_CN.ReadEls_Add_Parameter(ProbingStateNameVar, 3)
|
||||
System.Threading.Thread.Sleep(100)
|
||||
@@ -1713,7 +1842,7 @@ Public Class RawPartPageUC
|
||||
Dim RawThicknessNameVar As String = String.Empty
|
||||
GetPrivateProfileString(S_MACH_PROBING, K_RAWTHICKNESS, "", RawThicknessNameVar, m_MainWindow.GetMachIniFile())
|
||||
m_MainWindow.m_CNCommunication.m_CN.n_DReadELS_handle = 0
|
||||
For I As integer = 0 To 20
|
||||
For I As Integer = 0 To 20
|
||||
' Devo rileggere la variabile ad ogni ciclo
|
||||
m_MainWindow.m_CNCommunication.m_CN.ReadEls_Add_Parameter(RawThicknessNameVar, 3)
|
||||
If m_MainWindow.m_CNCommunication.m_CN.n_DReadELS_handle = 3 Then
|
||||
@@ -1800,10 +1929,10 @@ Public Class RawPartPageUC
|
||||
Dim SlabIdWindow As New SlabIdWD(m_MainWindow)
|
||||
' Recupero eventuali vecchi dati della lastra
|
||||
If nRawId <> GDB_ID.NULL Then
|
||||
Dim sBlock As String = "" : EgtGetInfo( nRawId, INFO_RAW_BLOCK, sBlock)
|
||||
Dim sSlabNbr As String = "" : EgtGetInfo( nRawId, INFO_RAW_SLABNBR, sSlabNbr)
|
||||
SlabIdWindow.SetBlockName( sBlock)
|
||||
SlabIdWindow.SetSlabNbr( sSlabNbr)
|
||||
Dim sBlock As String = "" : EgtGetInfo(nRawId, INFO_RAW_BLOCK, sBlock)
|
||||
Dim sSlabNbr As String = "" : EgtGetInfo(nRawId, INFO_RAW_SLABNBR, sSlabNbr)
|
||||
SlabIdWindow.SetBlockName(sBlock)
|
||||
SlabIdWindow.SetSlabNbr(sSlabNbr)
|
||||
End If
|
||||
' Visualizzo finestra richiesta dati
|
||||
If SlabIdWindow.ShowDialog() Then
|
||||
@@ -1811,10 +1940,10 @@ Public Class RawPartPageUC
|
||||
Dim sBlock As String = SlabIdWindow.GetBlockName()
|
||||
Dim sSlabNbr As String = SlabIdWindow.GetSlabNbr()
|
||||
' Li assegno
|
||||
Utility.SetBlockAndSlabNbr( sBlock, sSlabNbr)
|
||||
Utility.SetBlockAndSlabNbr(sBlock, sSlabNbr)
|
||||
' Li salvo
|
||||
WritePrivateProfileString( S_RAWPART, K_BLOCKNAME, sBlock, m_MainWindow.GetIniFile())
|
||||
WritePrivateProfileString( S_RAWPART, K_SLABNBR, sSlabNbr, m_MainWindow.GetIniFile())
|
||||
WritePrivateProfileString(S_RAWPART, K_BLOCKNAME, sBlock, m_MainWindow.GetIniFile())
|
||||
WritePrivateProfileString(S_RAWPART, K_SLABNBR, sSlabNbr, m_MainWindow.GetIniFile())
|
||||
' Aggiorno visualizzazione
|
||||
EgtDraw()
|
||||
End If
|
||||
|
||||
|
After Width: | Height: | Size: 985 B |
|
After Width: | Height: | Size: 1.0 KiB |
|
After Width: | Height: | Size: 1.0 KiB |
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 452 B |
|
After Width: | Height: | Size: 624 B |
|
Before Width: | Height: | Size: 4.2 KiB After Width: | Height: | Size: 608 B |
|
After Width: | Height: | Size: 431 B |
|
After Width: | Height: | Size: 948 B |
|
After Width: | Height: | Size: 1.6 KiB |
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 992 B |
|
After Width: | Height: | Size: 403 B |
|
After Width: | Height: | Size: 741 B |
|
After Width: | Height: | Size: 787 B |