Compare commits
388 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| a18cba5261 | |||
| 0e08cc7d0d | |||
| a2bb9e250c | |||
| 7565e2e0ed | |||
| 2673d51008 | |||
| 1d5cce387f | |||
| 07e5756793 | |||
| e5e80e9a55 | |||
| cd0388b970 | |||
| 135be5f104 | |||
| 2f116ba3fe | |||
| 96ee5b5172 | |||
| 484f7eb410 | |||
| c1eb839fe8 | |||
| f3b1d80de7 | |||
| 14b4897575 | |||
| 213a66d916 | |||
| c9c7aeafae | |||
| 07d54499b7 | |||
| 9f266f1c56 | |||
| 48e523ce26 | |||
| a73b45d23e | |||
| 8ea607611c | |||
| bdf0971c20 | |||
| 7d77297695 | |||
| bdcdcaecf0 | |||
| 44011c5775 | |||
| cba095188e | |||
| ebedccf46a | |||
| 8bd7d9e3fa | |||
| 8dfa932bd7 | |||
| 5422e905e7 | |||
| da396cc82e | |||
| da8e7a9e42 | |||
| d8cbe1a2c6 | |||
| 79c2c17d6b | |||
| ccb8945a4f | |||
| 842ab19e8b | |||
| 5cfc72be27 | |||
| 45d3f5c7d8 | |||
| ac67a14fea | |||
| 1df823cdec | |||
| be29ea050d | |||
| cd4d2b1ccb | |||
| c730513f27 | |||
| 9f3920a2b2 | |||
| f388dc0c50 | |||
| 6613b3d551 | |||
| 615d6d2652 | |||
| 3ea8335357 | |||
| bbdac91894 | |||
| c424ff6661 | |||
| 4d64328b1b | |||
| 10c4c7ecc1 | |||
| 03def4b530 | |||
| a3b56444f6 | |||
| 837380226a | |||
| f15935ecbc | |||
| 00360013e3 | |||
| 0010deb7fc | |||
| 9c267aacf7 | |||
| 311cf40a8e | |||
| 4c34b62e65 | |||
| 87037b6c6a | |||
| 74c479d17d | |||
| ee6c0ad146 | |||
| ead6bcec6d | |||
| a1ad658f27 | |||
| 4ab7811b50 | |||
| 1899c9a735 | |||
| 3f769c49da | |||
| da4ddb2a7f | |||
| 3667ecb3b7 | |||
| 206af48539 | |||
| 253e92b111 | |||
| 123d6118e9 | |||
| a2104eaa03 | |||
| 65b9bfdcdb | |||
| 004591896c | |||
| 02af01052b | |||
| 2bc386807f | |||
| 82af1baae3 | |||
| 68b4dfed80 | |||
| ffc7536177 | |||
| 70368b73be | |||
| 05b4e2e95a | |||
| 1d7cdf8fa0 | |||
| 5190a41470 | |||
| 3afe6bb35b | |||
| c546df45ca | |||
| 554ae16e48 | |||
| 1b4d239202 | |||
| 3b2d15703a | |||
| 8e5a4d4ac5 | |||
| ef621a340a | |||
| f2ce55ff27 | |||
| ae3b16b715 | |||
| 8ff4b74725 | |||
| 18fb37b497 | |||
| 246e55f733 | |||
| e7e1946230 | |||
| 8dc6b63801 | |||
| 9b29b16a33 | |||
| 1debeab653 | |||
| 63c3a4e085 | |||
| 7830105bc4 | |||
| 8a11051575 | |||
| 0b50832b4e | |||
| 7f548e5ba6 | |||
| 40bdcec46e | |||
| 2cf1be7348 | |||
| bb932788f9 | |||
| 4c0da9af53 | |||
| 9eaca47566 | |||
| 7c53ecceb4 | |||
| 9a6f6ad37e | |||
| 8174c6137a | |||
| b84699e3c1 | |||
| 5101c1cca9 | |||
| 3ad3694454 | |||
| 9d9e184efa | |||
| cf3f756683 | |||
| 72544190cc | |||
| 2ce454ad0a | |||
| 5a3ad4356f | |||
| ba4414c9f6 | |||
| aa29e4106d | |||
| 76eb17868c | |||
| 829b58a0e5 | |||
| 79847e3cce | |||
| 59be071d12 | |||
| d9150c75f4 | |||
| 00088315cd | |||
| e12a310010 | |||
| 449fe3ad57 | |||
| e8d8637832 | |||
| 6671f2269e | |||
| 26ef6b2d3b | |||
| b5e9686da2 | |||
| f57410dffb | |||
| 346c452546 | |||
| 2eff34e8b6 | |||
| 7c3a107c31 | |||
| e119e9673a | |||
| 2407d3a0ae | |||
| fd32ba3ea1 | |||
| 9045469c0d | |||
| 10972a466d | |||
| e6b674ec46 | |||
| 68cdd41b20 | |||
| cf23a2b7c2 | |||
| 67c2a9d0ec | |||
| 7b70a27ff4 | |||
| 00c37ad74f | |||
| 18e079d235 | |||
| f734885de5 | |||
| 0cc673b047 | |||
| acc1365fd2 | |||
| 7dcf1fe8dc | |||
| fcca1ed72c | |||
| 03ecf3493b | |||
| 36b667fcc5 | |||
| cd748dea7a | |||
| c2f03a883a | |||
| 9b09eeaa9c | |||
| 919890e68d | |||
| fa0bc2ffdd | |||
| b8143b0ff5 | |||
| 085975338a | |||
| 53fc2694a3 | |||
| 9c8563f5c3 | |||
| 2f78dd796d | |||
| 378369d3d5 | |||
| 656c5a7d54 | |||
| c40bc508d0 | |||
| de2234387d | |||
| d7c1ecacc2 | |||
| ec813beae5 | |||
| 7a9faf537f | |||
| 6f58b6f090 | |||
| 529fb6d3a6 | |||
| 53d06d6098 | |||
| eb571bf5fd | |||
| 3d11abfa31 | |||
| b1f8d21cc5 | |||
| ec8fbd3297 | |||
| fdd3342492 | |||
| f41b8f1409 | |||
| 5edd5300cd | |||
| 92be9189c6 | |||
| 6c0bb175d9 | |||
| a079596aed | |||
| 60da7384a2 | |||
| 761842bf45 | |||
| 32cfbfbeec | |||
| 2ff2e6ffc4 | |||
| 0c7c729914 | |||
| 7195e16c37 | |||
| 42b0622bdf | |||
| bcdb79e796 | |||
| d7aa8902d9 | |||
| 9d7fb9ab99 | |||
| 8419659647 | |||
| 8becdfb219 | |||
| 7c6b18d996 | |||
| 44e9a448fe | |||
| 5740820eed | |||
| 3202993a3e | |||
| b293156a30 | |||
| dfe876638f | |||
| 1c861ee7e3 | |||
| 5da026accb | |||
| 5396796d28 | |||
| ae18c7f027 | |||
| 54122d82e6 | |||
| f85e97a126 | |||
| 06654d923c | |||
| ce1c6fcf02 | |||
| da11ec0a11 | |||
| 52688ed0da | |||
| 60eda04669 | |||
| b95dd8f41d | |||
| 4b2351c20a | |||
| 988743187b | |||
| 2c0afccbe3 | |||
| a5d6d34664 | |||
| 27b13292cf | |||
| 7b9d99a9c6 | |||
| 1e2b4bed27 | |||
| 4ecf7980ce | |||
| 82157d3b6e | |||
| 10cb8f64f5 | |||
| 6dbf4f5ccb | |||
| 4ba0fe2520 | |||
| a55ab4f83d | |||
| 419776c89f | |||
| fd89a6cf3b | |||
| b505b79d9a | |||
| b1313ddb55 | |||
| f3889ede24 | |||
| 5ca010ae4a | |||
| 391d25507e | |||
| c954f364e3 | |||
| 1ab6d2746f | |||
| 41de0516c8 | |||
| dec4c0d312 | |||
| 834f3afe1c | |||
| e6c95323fb | |||
| fa6e5b520f | |||
| aefc037cd9 | |||
| c475f7dc12 | |||
| c5f3d4fcfb | |||
| a04e2cbe62 | |||
| da980a649e | |||
| 4c282d7531 | |||
| a941f963c2 | |||
| eab341d7fe | |||
| 9c7d60d307 | |||
| a7adcdcaca | |||
| acb8ceed4d | |||
| 65d8f58b45 | |||
| 07cf7ced42 | |||
| b1410ca11c | |||
| 1975f46995 | |||
| 6863186e07 | |||
| b434f80030 | |||
| 0151cd8f9e | |||
| 75e3729216 | |||
| ef1aef12ed | |||
| 959fb2e44f | |||
| 59e3ae5841 | |||
| 941e7837be | |||
| 58de5d4077 | |||
| b6beef668d | |||
| 680505af10 | |||
| b0bfa67d2a | |||
| 29d8c1e29b | |||
| e5d4f223f8 | |||
| 3cfc7276c9 | |||
| 0c0233b27e | |||
| 4e8925515d | |||
| 3b552b2f4e | |||
| 3fae33404b | |||
| 0d4d853834 | |||
| 37fcbe8240 | |||
| 4393f282b7 | |||
| 6844a8c77c | |||
| 659405c52f | |||
| efafacf6ca | |||
| 6905a8d6dc | |||
| d8ba23894e | |||
| aba1572f95 | |||
| fdb0ed598b | |||
| 4cb3518346 | |||
| 56b8ee88d3 | |||
| d0439f2b05 | |||
| 07d8145d57 | |||
| 652c396933 | |||
| 997e8c380d | |||
| 8d363b8b06 | |||
| 7ecad4c218 | |||
| d49c231541 | |||
| 8d82058e49 | |||
| d6a9cac6b4 | |||
| 4ce898c25c | |||
| 6f59cddd80 | |||
| c8b018f6df | |||
| 36a1ecb509 | |||
| e287e827c4 | |||
| 68e9a9201d | |||
| 0eaebd5aad | |||
| 8946bf3a00 | |||
| aeb0be0590 | |||
| a15acb6528 | |||
| e7e9d26b75 | |||
| b48d4900ea | |||
| d9de23daca | |||
| ad5c9331ba | |||
| b67330b509 | |||
| ca66108145 | |||
| 379ccc7519 | |||
| b751c27773 | |||
| 14e1c254f0 | |||
| 6f08e5f520 | |||
| 7d8933cc39 | |||
| 2179996bff | |||
| 316bcc89ea | |||
| 17f41f1563 | |||
| 6a17b88283 | |||
| ce151e5db7 | |||
| b303fe2615 | |||
| 6f248ec645 | |||
| 3e0d43c1d8 | |||
| 70b1822446 | |||
| 17d6ced974 | |||
| db145af965 | |||
| 037fdb41b6 | |||
| f89fe7fefd | |||
| 6ecbd7f545 | |||
| 734f480f67 | |||
| 87fa5cc6dd | |||
| 5b00409abe | |||
| 0f3b91e847 | |||
| 3befbecd3c | |||
| b6d2cc434c | |||
| 800a589285 | |||
| 2618d3f14c | |||
| bb32a4e500 | |||
| 6d266819db | |||
| 3ce8965206 | |||
| d924f4c107 | |||
| b141bda34d | |||
| ecb599c5c1 | |||
| 957a012de5 | |||
| 12277387b6 | |||
| ac92d1b4df | |||
| 5fe84aa6fd | |||
| b3ec57fb79 | |||
| c5f8e1f3fd | |||
| 202a63329b | |||
| 8cdc527943 | |||
| 61bb35fda2 | |||
| ee70e8f4c2 | |||
| 4d0e700d50 | |||
| 4432893794 | |||
| 9fa98d78a5 | |||
| e1d166375a | |||
| 4e669bc577 | |||
| 73a1caf1d0 | |||
| 322497121d | |||
| 468270cbab | |||
| 71ce283bad | |||
| 576d547a85 | |||
| a79316f290 | |||
| 51ee7a0c92 | |||
| 237eeb8871 | |||
| abe1b3a430 | |||
| 7e205a6424 | |||
| a7d7c66e2b | |||
| 7bb35e4694 | |||
| 65e72391d8 | |||
| 32e4d6d76b | |||
| 59b9354551 | |||
| 7315166ca7 | |||
| b9875ba243 | |||
| f7bcdff766 | |||
| a6457ece76 | |||
| abaf1ac3a8 |
@@ -23,7 +23,8 @@
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.25*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.25*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.25*"/>
|
||||
</Grid.RowDefinitions>
|
||||
@@ -35,7 +36,7 @@
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Border Name="LogoBrd" Grid.Column="1">
|
||||
<Image Source="../Resources/AboutBoxImage.png" Stretch="Uniform"/>
|
||||
<Image Source="../Resources/NewIcons/Logo-Egalware (3).png" Stretch="Uniform"/>
|
||||
</Border>
|
||||
</Grid>
|
||||
<TextBlock Name="DescriptionLbl" Grid.Column="1" Grid.Row="3" HorizontalAlignment="Center"
|
||||
@@ -44,13 +45,17 @@
|
||||
VerticalAlignment="Center" FontSize="18"/>
|
||||
<TextBlock Name="KeyLbl" Grid.Column="1" Grid.Row="5" HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center" FontSize="18"/>
|
||||
<TextBlock Name="MachineLbl" Grid.Column="1" Grid.Row="6" HorizontalAlignment="Center"
|
||||
|
||||
<TextBlock Name="AssStatusLbl" Grid.Column="1" Grid.Row="6" HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center" FontSize="18"/>
|
||||
<TextBlock Name="ProjectLbl" Grid.Column="1" Grid.Row="7" HorizontalAlignment="Center"
|
||||
|
||||
<TextBlock Name="MachineLbl" Grid.Column="1" Grid.Row="7" HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center" FontSize="18"/>
|
||||
<TextBlock Name="CopyrightLbl" Grid.Column="1" Grid.Row="8" HorizontalAlignment="Center"
|
||||
<TextBlock Name="ProjectLbl" Grid.Column="1" Grid.Row="8" HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center" FontSize="18"/>
|
||||
<TextBlock Name="CopyrightLbl" Grid.Column="1" Grid.Row="9" HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center" FontSize="15" />
|
||||
<Button Name="ExitBtn" Grid.Column="1" Grid.Row="10" IsCancel="True"
|
||||
<Button Name="ExitBtn" Grid.Column="1" Grid.Row="11" IsCancel="True"
|
||||
Style="{DynamicResource OmagCut_WindowGrayTextButton}" Margin="1,0"/>
|
||||
|
||||
</Grid>
|
||||
|
||||
@@ -33,6 +33,19 @@ Public Class AboutBoxWD
|
||||
#Else
|
||||
KeyLbl.Text = sKey & " - " & sOpts
|
||||
#End If
|
||||
' COPIATO da codice CAM5
|
||||
Dim sAssStatus As String = " discontinued"
|
||||
Dim nAssLeftDays As Integer
|
||||
If EgtGetKeyAssLeftDays(nAssLeftDays) And nAssLeftDays >= 0 Then
|
||||
If nAssLeftDays > 30 Then
|
||||
sAssStatus = "expires within " & nAssLeftDays.ToString() & " days"
|
||||
ElseIf nAssLeftDays > 0 Then
|
||||
sAssStatus = "to be renewed within " & nAssLeftDays.ToString() & " days"
|
||||
Else
|
||||
sAssStatus = "to be renewed by today"
|
||||
End If
|
||||
End If
|
||||
AssStatusLbl.Text = sAssStatus
|
||||
CopyrightLbl.Text = My.Application.Info.Copyright.ToString()
|
||||
MachineLbl.Text = "Machine : " & m_MainWindow.m_CurrentMachine.sMachineName
|
||||
ProjectLbl.Text = "Project : " & m_MainWindow.m_CurrentProjectPageUC.GetCurrentProjectName()
|
||||
|
||||
+108
-11
@@ -1,4 +1,5 @@
|
||||
Imports EgtUILib
|
||||
Imports System.Windows.Forms.Integration
|
||||
Imports EgtUILib
|
||||
|
||||
Friend Module CamAuto
|
||||
|
||||
@@ -21,15 +22,18 @@ Friend Module CamAuto
|
||||
bOk = bOk AndAlso EgtLuaCallFunction("CAM.Add")
|
||||
EgtLuaGetGlobIntVar("CAM.ERR", nErr)
|
||||
EgtLuaResetGlobVar("CAM")
|
||||
If nErr <> 0 Then
|
||||
If nErr > 0 Then
|
||||
bOk = False
|
||||
EgtOutLog("Error in CamAuto : " & nErr.ToString())
|
||||
ElseIf nErr < 0 Then
|
||||
EgtOutLog("Warning in CamAuto : " & nErr.ToString())
|
||||
m_MainWindow.m_CurrentProjectPageUC.SetWarningMessage(EgtMsg(91017))
|
||||
End If
|
||||
m_MainWindow.m_CurrentProjectPageUC.ResetOrderMachiningFlag()
|
||||
Return bOk
|
||||
End Function
|
||||
|
||||
Friend Function AddWaterJetMachining( nOperId As Integer, ByRef nWarn As Integer) As Boolean
|
||||
Friend Function AddWaterJetMachining(nOperId As Integer, ByRef nWarn As Integer) As Boolean
|
||||
EgtLuaCreateGlobTable("CAM")
|
||||
SetLuaStandardCamParams()
|
||||
EgtLuaSetGlobIntVar("CAM.OPERID", nOperId)
|
||||
@@ -39,9 +43,34 @@ Friend Module CamAuto
|
||||
bOk = bOk AndAlso EgtLuaCallFunction("CAM.AddWaterJet")
|
||||
EgtLuaGetGlobIntVar("CAM.ERR", nErr)
|
||||
EgtLuaResetGlobVar("CAM")
|
||||
If nErr <> 0 Then
|
||||
If nErr > 0 Then
|
||||
bOk = False
|
||||
EgtOutLog("Error in CamAuto : " & nErr.ToString())
|
||||
m_MainWindow.m_CurrentProjectPageUC.ClearMessage()
|
||||
ElseIf nErr < 0 Then
|
||||
EgtOutLog("Warning in CamAuto : " & nErr.ToString())
|
||||
End If
|
||||
Return bOk
|
||||
End Function
|
||||
|
||||
' versione CamAuto 2.6l1: gestione tagli con ridotto affondamento
|
||||
Friend Function AddWaterJetMachining(LocaList As List(Of Integer), ByRef nWarn As Integer) As Boolean
|
||||
EgtLuaCreateGlobTable("CAM")
|
||||
SetLuaStandardCamParams()
|
||||
For i As Integer = 0 To LocaList.Count - 1
|
||||
EgtLuaSetGlobIntVar("CAM.TAB_OPERID." & (i + 1).ToString, LocaList(i))
|
||||
Next
|
||||
Dim nErr As Integer = 999
|
||||
Dim bOk As Boolean = EgtLuaExecFile(m_MainWindow.GetCamAutoDir() & "\CamAuto.lua")
|
||||
bOk = bOk AndAlso EgtLuaGetGlobIntVar("CAM.ERR", nErr) AndAlso nErr = 0
|
||||
bOk = bOk AndAlso EgtLuaCallFunction("CAM.AddWaterJets")
|
||||
EgtLuaGetGlobIntVar("CAM.ERR", nErr)
|
||||
EgtLuaResetGlobVar("CAM")
|
||||
If nErr > 0 Then
|
||||
bOk = False
|
||||
EgtOutLog("Error in CamAuto : " & nErr.ToString())
|
||||
ElseIf nErr < 0 Then
|
||||
EgtOutLog("Warning in CamAuto : " & nErr.ToString())
|
||||
End If
|
||||
Return bOk
|
||||
End Function
|
||||
@@ -55,9 +84,11 @@ Friend Module CamAuto
|
||||
bOk = bOk AndAlso EgtLuaCallFunction("CAM.Erase")
|
||||
EgtLuaGetGlobIntVar("CAM.ERR", nErr)
|
||||
EgtLuaResetGlobVar("CAM")
|
||||
If nErr <> 0 Then
|
||||
If nErr > 0 Then
|
||||
bOk = False
|
||||
EgtOutLog("Error in CamAuto : " & nErr.ToString())
|
||||
ElseIf nErr < 0 Then
|
||||
EgtOutLog("Warning in CamAuto : " & nErr.ToString())
|
||||
End If
|
||||
m_MainWindow.m_CurrentProjectPageUC.ResetOrderMachiningFlag()
|
||||
m_MainWindow.m_CurrentProjectPageUC.ResetProjectNcRestart()
|
||||
@@ -73,9 +104,11 @@ Friend Module CamAuto
|
||||
bOk = bOk AndAlso EgtLuaCallFunction("CAM.InvertVerticalCut")
|
||||
EgtLuaGetGlobIntVar("CAM.ERR", nErr)
|
||||
EgtLuaResetGlobVar("CAM")
|
||||
If nErr <> 0 Then
|
||||
If nErr > 0 Then
|
||||
bOk = False
|
||||
EgtOutLog("Error in CamAuto : " & nErr.ToString())
|
||||
ElseIf nErr < 0 Then
|
||||
EgtOutLog("Warning in CamAuto : " & nErr.ToString())
|
||||
End If
|
||||
Return bOk
|
||||
End Function
|
||||
@@ -163,6 +196,61 @@ Friend Module CamAuto
|
||||
Return bOk
|
||||
End Function
|
||||
|
||||
Friend Function ResetAllSplitCut() As Boolean
|
||||
Dim PartList As New List(Of Integer)
|
||||
' Ricerca nei grezzi dei pezzi (devono essere ricercati tra quelli presenti nei grezzi)
|
||||
Dim bOk As Boolean = True
|
||||
' Recupero il numero di fasi presenti nel progetto
|
||||
Dim nPhaseCount As Integer = EgtGetPhaseCount()
|
||||
For nPhase As Integer = 1 To nPhaseCount
|
||||
EgtSetCurrPhase(nPhase)
|
||||
Dim nRawId As Integer = EgtGetFirstRawPart()
|
||||
While nRawId <> GDB_ID.NULL
|
||||
Dim nParId As Integer = EgtGetFirstPartInRawPart(nRawId)
|
||||
If EgtVerifyRawPartPhase(nRawId, nPhase) Then
|
||||
While nParId <> GDB_ID.NULL
|
||||
Dim nNextParId As Integer = EgtGetNextPartInRawPart(nParId)
|
||||
' verifico se il pezzo passato è un taglio di sepatazione (il nome deve contenere "SpliCut")
|
||||
Dim sName As String = String.Empty
|
||||
If EgtGetName(nParId, sName) AndAlso sName.Contains(SPLIT_CUT) Then
|
||||
' Rimuovo il pezzo dal grezzo
|
||||
If EgtRemovePartFromRawPart(nParId) Then
|
||||
' Salvo l'indice del pezzo se non è stato già inserito
|
||||
Dim nIndex As Integer = PartList.FirstOrDefault(Function(nId) nId = nParId)
|
||||
If nIndex = 0 Then PartList.Add(nParId)
|
||||
End If
|
||||
End If
|
||||
nParId = nNextParId
|
||||
End While
|
||||
End If
|
||||
nRawId = EgtGetNextRawPart(nRawId)
|
||||
End While
|
||||
Next
|
||||
' Reimposto la prima fase del progetto
|
||||
EgtSetCurrPhase(1)
|
||||
' Procedo ad eliminare il pezzo
|
||||
For Each Item As Integer In PartList
|
||||
bOk = bOk And EgtErase(Item)
|
||||
Next
|
||||
Return bOk
|
||||
End Function
|
||||
|
||||
Friend Function ResetAllRawPart() As Boolean
|
||||
Dim nPhase As Integer = 1
|
||||
Dim nOtherRaw As Integer = EgtGetFirstRawPart()
|
||||
While nOtherRaw <> GDB_ID.NULL
|
||||
' se il pezzo non appartiene alla prima fase allora viene eliminato
|
||||
If Not EgtVerifyRawPartPhase(nOtherRaw, nPhase) Then
|
||||
Dim NextRaw As Integer = EgtGetNextRawPart(nOtherRaw)
|
||||
EgtRemoveRawPart(nOtherRaw)
|
||||
nOtherRaw = NextRaw
|
||||
Else
|
||||
nOtherRaw = EgtGetNextRawPart(nOtherRaw)
|
||||
End If
|
||||
End While
|
||||
Return True
|
||||
End Function
|
||||
|
||||
' verifico che il contorno passato non sia stato separato
|
||||
Friend Function VerifyOutLoopIsClosed(nIdLayerOutLoop As Integer)
|
||||
Dim nIdMy As Integer = EgtGetFirstInGroup(nIdLayerOutLoop)
|
||||
@@ -215,9 +303,11 @@ Friend Module CamAuto
|
||||
bOk = bOk AndAlso EgtLuaCallFunction("CAM.UpdateAllTp")
|
||||
EgtLuaGetGlobIntVar("CAM.ERR", nErr)
|
||||
EgtLuaResetGlobVar("CAM")
|
||||
If nErr <> 0 Then
|
||||
If nErr > 0 Then
|
||||
bOk = False
|
||||
EgtOutLog("Error in CamAuto : " & nErr.ToString())
|
||||
ElseIf nErr < 0 Then
|
||||
EgtOutLog("Warning in CamAuto : " & nErr.ToString())
|
||||
End If
|
||||
Return bOk
|
||||
End Function
|
||||
@@ -231,9 +321,11 @@ Friend Module CamAuto
|
||||
bOk = bOk AndAlso EgtLuaCallFunction("CAM.Sort")
|
||||
EgtLuaGetGlobIntVar("CAM.ERR", nErr)
|
||||
EgtLuaResetGlobVar("CAM")
|
||||
If nErr <> 0 Then
|
||||
If nErr > 0 Then
|
||||
bOk = False
|
||||
EgtOutLog("Error in CamAuto : " & nErr.ToString())
|
||||
ElseIf nErr < 0 Then
|
||||
EgtOutLog("Warning in CamAuto : " & nErr.ToString())
|
||||
End If
|
||||
Return bOk
|
||||
End Function
|
||||
@@ -248,9 +340,11 @@ Friend Module CamAuto
|
||||
bOk = bOk AndAlso EgtLuaCallFunction("CAM.SpecApplyDisp")
|
||||
EgtLuaGetGlobIntVar("CAM.ERR", nErr)
|
||||
EgtLuaResetGlobVar("CAM")
|
||||
If nErr <> 0 Then
|
||||
If nErr > 0 Then
|
||||
bOk = False
|
||||
EgtOutLog("Error in CamAuto : " & nErr.ToString())
|
||||
ElseIf nErr < 0 Then
|
||||
EgtOutLog("Warning in CamAuto : " & nErr.ToString())
|
||||
End If
|
||||
If ResetOrderMachiningFlag Then
|
||||
m_MainWindow.m_CurrentProjectPageUC.ResetOrderMachiningFlag()
|
||||
@@ -487,6 +581,7 @@ Friend Module CamAuto
|
||||
Dim dReducedDepth As Double = GetPrivateProfileDouble(S_MACH_NEST, K_MACH_REDUCEDDEPTH, 1, m_MainWindow.GetMachIniFile())
|
||||
' Ciclo sulle lavorazioni
|
||||
Dim nOperId As Integer = EgtGetFirstOperation()
|
||||
Dim LocalListOperId As New List(Of Integer)
|
||||
While nOperId <> GDB_ID.NULL
|
||||
' verifico sia una lavorazione valida di taglio con lama
|
||||
If IsValidMachining( nOperId) And EgtGetOperationType( nOperId) = MCH_OY.SAWING Then
|
||||
@@ -501,12 +596,14 @@ Friend Module CamAuto
|
||||
' se abilitato e attivo waterjet, lo aggiungo per completare il taglio
|
||||
If m_MainWindow.m_CurrentMachine.WaterJettingActive Then
|
||||
Dim nWarn As Integer = 0
|
||||
AddWaterJetMachining(nOperId, nWarn)
|
||||
LocalListOperId.Add(nOperId)
|
||||
'AddWaterJetMachining(nOperId, nWarn)
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
nOperId = EgtGetNextOperation(nOperId)
|
||||
End While
|
||||
If LocalListOperId.Count > 0 Then AddWaterJetMachining(LocalListOperId, 0)
|
||||
Return bModified
|
||||
End Function
|
||||
|
||||
|
||||
+18
-8
@@ -27,7 +27,7 @@
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<!--Griglia per oscurare i bottoni della pagina sottostante-->
|
||||
<Grid Background="{DynamicResource OmagCut_Gray}">
|
||||
<Grid Background="{DynamicResource OmagCut_Gray}">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
@@ -49,7 +49,7 @@
|
||||
|
||||
<Label Name="CsvPathTxBl" Grid.Row="1" Background="White" FontSize="16" VerticalAlignment="Center" Padding="2,5,0,5"/>
|
||||
|
||||
<TreeView Name="PartsTreeView" Grid.Row="2" Background="{DynamicResource OmagCut_TreeViewBackGroundColor}">
|
||||
<TreeView Name="PartsTreeView" Grid.Row="2" Background="{StaticResource OmagCut_TreeViewGradientGray}">
|
||||
<TreeView.Resources>
|
||||
<!--Modifico HierarchicalDataTemplate del CathegoryItem per poter inserire immagine e testo e per -->
|
||||
<!--renderlo apribile con un solo click -->
|
||||
@@ -62,7 +62,7 @@
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Image Grid.Column="0" Source="{Binding PictureString}" Height="32" Width="32" Margin="0,8,6,4" />
|
||||
<TextBlock Grid.Column="1" Text="{Binding Name}" FontSize="15" Margin="10" />
|
||||
<TextBlock Grid.Column="1" Text="{Binding Name}" FontSize="15" Margin="10" Foreground="Black" />
|
||||
|
||||
</Grid>
|
||||
|
||||
@@ -123,7 +123,10 @@
|
||||
</Setter>
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding bIsActive}" Value="False">
|
||||
<Setter Property="Foreground" Value="{StaticResource OmagCut_LightGray}"/>
|
||||
<Setter Property="Foreground" Value="{StaticResource OmagCut_White}"/>
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding bIsActive}" Value="True">
|
||||
<Setter Property="Foreground" Value="Black"/>
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
@@ -131,18 +134,25 @@
|
||||
</HierarchicalDataTemplate>
|
||||
<!--Modifico DataTemplate del ToolItem per poter inserire immagine e testo-->
|
||||
<DataTemplate DataType="{x:Type self:PartCustomItem}">
|
||||
<Grid Width="246" Margin="0,5,0,5" HorizontalAlignment="Right">
|
||||
<Grid Width="234.8" Margin="0,5,0,5" HorizontalAlignment="Right">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="60"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<TextBlock Grid.Column="0" Text="{Binding Name}" Height="18" FontSize="14" HorizontalAlignment="Right"/>
|
||||
<TextBlock Grid.Column="1" Text="{Binding sText1}" Height="18" FontSize="14" HorizontalAlignment="Center"/>
|
||||
<TextBlock Grid.Column="2" Text="{Binding sText2}" Height="18" FontSize="14" HorizontalAlignment="Left"/>
|
||||
<TextBlock x:Name="TbName" Grid.Column="0" Text="{Binding Name}" Height="18" FontSize="14" HorizontalAlignment="Right"/>
|
||||
<TextBlock x:Name="TbText1" Grid.Column="1" Text="{Binding sText1}" Height="18" FontSize="14" HorizontalAlignment="Center"/>
|
||||
<TextBlock x:Name="TbText2" Grid.Column="2" Text="{Binding sText2}" Height="18" FontSize="14" HorizontalAlignment="Left"/>
|
||||
|
||||
</Grid>
|
||||
<DataTemplate.Triggers>
|
||||
<DataTrigger Binding="{Binding bIsActive}" Value="False">
|
||||
<Setter TargetName="TbName" Property="TextDecorations" Value="Strikethrough" />
|
||||
<Setter TargetName="TbText1" Property="TextDecorations" Value="Strikethrough" />
|
||||
<Setter TargetName="TbText2" Property="TextDecorations" Value="Strikethrough" />
|
||||
</DataTrigger>
|
||||
</DataTemplate.Triggers>
|
||||
</DataTemplate>
|
||||
</TreeView.Resources>
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Button Name="PhotoBtn" Grid.Column="0" Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}">
|
||||
<Image Source="{DynamicResource PhotoImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
<Image Name="PhotoIMG" Source="{DynamicResource PhotoImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="RawPartBtn" Grid.Column="1" Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}">
|
||||
<Image Source="{DynamicResource RawPartImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
Imports EgtWPFLib
|
||||
Imports System.Reflection
|
||||
Imports System.Globalization
|
||||
Imports EgtWPFLib5
|
||||
|
||||
Public Class CadCutPageUC
|
||||
|
||||
|
||||
@@ -0,0 +1,61 @@
|
||||
<Window x:Class="ChooseTestToolWD"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
|
||||
FontFamily="{DynamicResource OmagCut_Font}"
|
||||
Title="OpenFile" Height="382.6" Width="426.6" WindowStyle="None"
|
||||
ResizeMode="NoResize" ShowInTaskbar="False" AllowsTransparency="True"
|
||||
Background="Transparent">
|
||||
|
||||
<Border Style="{DynamicResource OmagCut_Border}">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
<ColumnDefinition Width="4*"/>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="1.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<TextBlock Name="FilePathTxBl" Grid.Column="1" Grid.Row="1" Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}" />
|
||||
<!--TextAlignment="Center"
|
||||
FontSize="20"
|
||||
VerticalAlignment="Center"-->
|
||||
<ListBox Name="SetUpToolListBox" Grid.Column="1" Grid.Row="2"
|
||||
ItemsSource="{Binding ItemList}">
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding ToolAlias}" Style="{StaticResource OmagCut_ListBoxTextBlock}" />
|
||||
</DataTemplate>
|
||||
</ListBox.ItemTemplate>
|
||||
</ListBox>
|
||||
|
||||
<Grid Grid.Column="1" Grid.Row="4">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Button Name="OkBtn" Grid.Column="1" Style="{DynamicResource OmagCut_GradientBlueIconButton}" >
|
||||
<Image Source="{DynamicResource VImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="ExitBtn" Grid.Column="3" Style="{DynamicResource OmagCut_GradientBlueIconButton}" IsCancel="True">
|
||||
<Image Source="{DynamicResource XImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
|
||||
</Grid>
|
||||
|
||||
</Grid>
|
||||
|
||||
</Border>
|
||||
|
||||
</Window>
|
||||
@@ -0,0 +1,287 @@
|
||||
Imports System.Collections.ObjectModel
|
||||
Imports System.IO
|
||||
Imports EgtUILib
|
||||
|
||||
Public Class ChooseTestToolWD
|
||||
|
||||
Private m_MainWindow As MainWindow = DirectCast(Application.Current.MainWindow, MainWindow)
|
||||
|
||||
Private m_SetUpToolList As New ObservableCollection(Of TestTool)
|
||||
|
||||
Sub New(Owner As Window)
|
||||
Me.Owner = Owner
|
||||
InitializeComponent()
|
||||
End Sub
|
||||
|
||||
Private Sub OpenFile_Initialized(sender As Object, e As EventArgs) Handles Me.Initialized
|
||||
' Posizione finestra
|
||||
Me.Top = Owner.Top + Owner.Height / 2 - Me.Height / 2
|
||||
Me.Left = Owner.Left + Owner.Width / 2 - Me.Width / 2
|
||||
' Definizione del collegamento tra ItemList e ListBox1
|
||||
SetUpToolListBox.ItemsSource = m_SetUpToolList
|
||||
FilePathTxBl.Text = EgtMsg(MSG_ALARMSPAGEUC + 45) ' Selezionare l'utensile da tastare
|
||||
End Sub
|
||||
|
||||
Private Sub OpenFile_Loaded(sender As Object, e As EventArgs) Handles Me.Loaded
|
||||
' carico elenco degli utensili impostati attualmente in macchina (anche il laser!)
|
||||
LoadSetUpTool()
|
||||
' ricerco l'utensile della lavorazione indicata
|
||||
Dim Item As TestTool = m_SetUpToolList.FirstOrDefault(Function(x) x.ToolName = m_MainWindow.m_CadCutPageUC.m_NestPage.m_CurrToolFromSelectedSawCurv)
|
||||
Dim Index As Integer = m_SetUpToolList.IndexOf(Item)
|
||||
If Index < 0 Then
|
||||
Index = 0
|
||||
End If
|
||||
' se presente seleziono il primo elemento
|
||||
If m_SetUpToolList.Count > 0 Then
|
||||
SetUpToolListBox.SelectedItem = m_SetUpToolList(Index)
|
||||
OkBtn.IsEnabled = True
|
||||
Else
|
||||
OkBtn.IsEnabled = False
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Function LoadSetUpTool() As Boolean
|
||||
Dim sNameTool As String = String.Empty
|
||||
Dim sHeadTool As String = String.Empty
|
||||
Dim nExitTool As Integer = 0
|
||||
|
||||
'sNameTool = m_MainWindow.m_CurrentMachine.sCurrSaw
|
||||
'If Not String.IsNullOrEmpty(sNameTool) Then
|
||||
' ' Imposto la lama
|
||||
' m_SetUpToolList.Add(New TestTool(sNameTool, sNameTool, True))
|
||||
'End If
|
||||
'sNameTool = m_MainWindow.m_CurrentMachine.sCurrMill
|
||||
'If Not String.IsNullOrEmpty(sNameTool) Then
|
||||
' ' Imposto la fresa
|
||||
' m_SetUpToolList.Add(New TestTool(sNameTool, sNameTool, False))
|
||||
'End If
|
||||
'sNameTool = m_MainWindow.m_CurrentMachine.sCurrDrill
|
||||
'If Not String.IsNullOrEmpty(sNameTool) Then
|
||||
' ' Imposto il foretto
|
||||
' m_SetUpToolList.Add(New TestTool(sNameTool, sNameTool, False))
|
||||
'End If
|
||||
|
||||
sNameTool = "Laser point"
|
||||
If Not String.IsNullOrEmpty(sNameTool) Then
|
||||
' Imposto laser di puntamento
|
||||
m_SetUpToolList.Add(New TestTool(sNameTool, ""))
|
||||
End If
|
||||
|
||||
sNameTool = m_MainWindow.m_CurrentMachine.sCurrWaterJet
|
||||
If Not String.IsNullOrEmpty(sNameTool) Then
|
||||
' Imposto WJ
|
||||
m_SetUpToolList.Add(New TestTool(sNameTool, sNameTool))
|
||||
End If
|
||||
|
||||
Select Case m_MainWindow.m_CurrentMachine.MountedToolConfig
|
||||
Case CurrentMachine.MountedToolConfigs.SAW
|
||||
sNameTool = m_MainWindow.m_CurrentMachine.sCurrSaw
|
||||
If Not String.IsNullOrEmpty(sNameTool) Then
|
||||
' Imposto la lama
|
||||
m_SetUpToolList.Add(New TestTool(sNameTool, sNameTool))
|
||||
End If
|
||||
Case CurrentMachine.MountedToolConfigs.SAWANDAUXTOOL
|
||||
sNameTool = m_MainWindow.m_CurrentMachine.sCurrSaw
|
||||
If Not String.IsNullOrEmpty(sNameTool) Then
|
||||
' Imposto la lama
|
||||
m_SetUpToolList.Add(New TestTool(sNameTool, sNameTool))
|
||||
End If
|
||||
sNameTool = m_MainWindow.m_CurrentMachine.sCurrMill
|
||||
If Not String.IsNullOrEmpty(sNameTool) Then
|
||||
' Imposto la fresa
|
||||
m_SetUpToolList.Add(New TestTool(sNameTool, sNameTool))
|
||||
End If
|
||||
sNameTool = m_MainWindow.m_CurrentMachine.sCurrDrill
|
||||
If Not String.IsNullOrEmpty(sNameTool) Then
|
||||
' Imposto il foretto
|
||||
m_SetUpToolList.Add(New TestTool(sNameTool, sNameTool))
|
||||
End If
|
||||
|
||||
Case CurrentMachine.MountedToolConfigs.MANUALTOOLCHANGER
|
||||
sNameTool = m_MainWindow.m_CurrentMachine.sCurrSaw
|
||||
If Not String.IsNullOrEmpty(sNameTool) Then
|
||||
' Imposto la lama
|
||||
m_SetUpToolList.Add(New TestTool(sNameTool, sNameTool))
|
||||
End If
|
||||
' Recupero tutti gli utensili attrezzati (nel ToolChanger e nel ManualToolChanger)
|
||||
For Each ToolChangerPos As ToolChangerPos In m_MainWindow.m_CurrentMachine.ManualToolChanger
|
||||
'm_SetUpToolList.Add(New ToolPos(ToolChangerPos.sTool, ToolChangerPos.sName, False))
|
||||
sNameTool = ToolChangerPos.sTool
|
||||
If Not String.IsNullOrEmpty(sNameTool) Then
|
||||
' Imposto la lama
|
||||
m_SetUpToolList.Add(New TestTool(sNameTool, sNameTool))
|
||||
End If
|
||||
Next
|
||||
Return True
|
||||
|
||||
Case CurrentMachine.MountedToolConfigs.TOOLCHANGER
|
||||
' Recupero tutti gli utensili attrezzati (nel ToolChanger e nel ManualToolChanger)
|
||||
sNameTool = m_MainWindow.m_CurrentMachine.sCurrSaw
|
||||
If Not String.IsNullOrEmpty(sNameTool) Then
|
||||
' Imposto la lama
|
||||
m_SetUpToolList.Add(New TestTool(sNameTool, sNameTool))
|
||||
End If
|
||||
For Each ToolChangerPos As ToolChangerPos In m_MainWindow.m_CurrentMachine.ToolChanger
|
||||
If Not String.IsNullOrWhiteSpace(ToolChangerPos.sTool) Then
|
||||
'm_SetUpToolList.Add(New ToolPos(ToolChangerPos.sTool, ToolChangerPos.sName, False))
|
||||
sNameTool = ToolChangerPos.sTool
|
||||
If Not String.IsNullOrEmpty(sNameTool) Then
|
||||
' Imposto la lama
|
||||
m_SetUpToolList.Add(New TestTool(sNameTool, sNameTool))
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
For Each ToolChangerPos As ToolChangerPos In m_MainWindow.m_CurrentMachine.ManualToolChanger
|
||||
If Not String.IsNullOrWhiteSpace(ToolChangerPos.sTool) Then
|
||||
'm_SetUpToolList.Add(New ToolPos(ToolChangerPos.sTool, ToolChangerPos.sName, False))
|
||||
sNameTool = ToolChangerPos.sTool
|
||||
If Not String.IsNullOrEmpty(sNameTool) Then
|
||||
' Imposto la lama
|
||||
m_SetUpToolList.Add(New TestTool(sNameTool, sNameTool))
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
Return True
|
||||
Case Else
|
||||
Return False
|
||||
End Select
|
||||
|
||||
|
||||
Return True
|
||||
End Function
|
||||
|
||||
Private Sub SetUpToolListBox_PreviewMouseUp(sender As Object, e As MouseButtonEventArgs) Handles SetUpToolListBox.PreviewMouseUp
|
||||
' Disabilito Ok
|
||||
OkBtn.IsEnabled = False
|
||||
' Recupero item selezionato
|
||||
If SetUpToolListBox.SelectedItems.Count() = 0 Then
|
||||
Return
|
||||
End If
|
||||
' A seconda del tipo
|
||||
OkBtn.IsEnabled = True
|
||||
End Sub
|
||||
|
||||
Private Sub SetUpToolListBox_SelectionChanged(sender As Object, e As SelectionChangedEventArgs) Handles SetUpToolListBox.SelectionChanged
|
||||
' Disabilito Ok
|
||||
OkBtn.IsEnabled = False
|
||||
' Recupero item selezionato
|
||||
If SetUpToolListBox.SelectedItems.Count() = 0 Then
|
||||
Return
|
||||
Else
|
||||
OkBtn.IsEnabled = True
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub OkBtn_Click(sender As Object, e As RoutedEventArgs) Handles OkBtn.Click
|
||||
DialogResult = True
|
||||
End Sub
|
||||
|
||||
' restituisce l'oggetto selezionato in elenco e lo imposta come attivo
|
||||
Friend Function GetSelectedTool() As TestTool
|
||||
Dim SelTestTool As TestTool = DirectCast(SetUpToolListBox.SelectedItem, TestTool)
|
||||
If SelTestTool.ToolAlias = "Laser point" Then
|
||||
SelTestTool.ToolHead = "H3"
|
||||
SelTestTool.ToolExit = 1
|
||||
SelTestTool.ToolIsSaw = False
|
||||
SelTestTool.ToolIsLaser = True
|
||||
Else
|
||||
EgtTdbSetCurrTool(SelTestTool.ToolName)
|
||||
Dim sHeadTool As String = String.Empty
|
||||
Dim nExitTool As Integer = 0
|
||||
Dim sTypeTool As String = String.Empty
|
||||
Dim nTypeTool As Integer
|
||||
EgtTdbGetCurrToolParam(MCH_TP.TYPE, nTypeTool)
|
||||
EgtTdbGetCurrToolParam(MCH_TP.HEAD, sHeadTool)
|
||||
EgtTdbGetCurrToolParam(MCH_TP.EXIT_, nExitTool)
|
||||
EgtTdbGetCurrToolParam(MCH_TP.TYPE, sTypeTool)
|
||||
SelTestTool.ToolHead = sHeadTool
|
||||
SelTestTool.ToolExit = nExitTool
|
||||
SelTestTool.ToolType = nTypeTool
|
||||
SelTestTool.ToolIsSaw = (nTypeTool = MCH_TY.SAW_STD)
|
||||
SelTestTool.ToolIsLaser = False
|
||||
End If
|
||||
|
||||
Return SelTestTool
|
||||
End Function
|
||||
|
||||
End Class
|
||||
|
||||
Public Class TestTool
|
||||
|
||||
Private m_ToolAlias As String = String.Empty
|
||||
Private m_ToolName As String = String.Empty
|
||||
Private m_ToolHead As String = "H1"
|
||||
Private m_ToolExit As Integer = 1
|
||||
Private m_ToolIsSaw As Boolean = False
|
||||
Private m_ToolIsLaser As Boolean = False
|
||||
Private m_ToolType As Integer = -1
|
||||
|
||||
Public Property ToolAlias As String
|
||||
Get
|
||||
Return m_ToolAlias
|
||||
End Get
|
||||
Set(value As String)
|
||||
m_ToolAlias = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property ToolName As String
|
||||
Get
|
||||
Return m_ToolName
|
||||
End Get
|
||||
Set(value As String)
|
||||
m_ToolName = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property ToolHead As String
|
||||
Get
|
||||
Return m_ToolHead
|
||||
End Get
|
||||
Set(value As String)
|
||||
m_ToolHead = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property ToolExit As Integer
|
||||
Get
|
||||
Return m_ToolExit
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
m_ToolExit = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property ToolType As Integer
|
||||
Get
|
||||
Return m_ToolType
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
m_ToolType = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property ToolIsSaw As Boolean
|
||||
Get
|
||||
Return m_ToolIsSaw
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
m_ToolIsSaw = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property ToolIsLaser As Boolean
|
||||
Get
|
||||
Return m_ToolIsLaser
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
m_ToolIsLaser = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Sub New(sToolAlias As String, sToolName As String)
|
||||
m_ToolAlias = sToolAlias
|
||||
m_ToolName = sToolName
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
@@ -27,6 +27,14 @@
|
||||
<EgtWPFLib:EgtTextBox Name="ValueTxBx" Grid.Column="1" Grid.Row="1"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
|
||||
<ComboBox Name="ValueCmBx" Grid.Column="1" Grid.Row="1">
|
||||
<ComboBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding}" FontSize="20" />
|
||||
</DataTemplate>
|
||||
</ComboBox.ItemTemplate>
|
||||
</ComboBox>
|
||||
|
||||
<Grid Name="ButtonsGrid" Grid.Column="1" Grid.Row="3" Grid.RowSpan="1">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
Imports System.IO
|
||||
Imports EgtUILib
|
||||
Imports EgtWPFLib
|
||||
Imports System.Collections.ObjectModel
|
||||
|
||||
Public Class EditValueWD
|
||||
|
||||
@@ -8,29 +9,77 @@ Public Class EditValueWD
|
||||
Private m_MainWindow As MainWindow = DirectCast(Application.Current.MainWindow, MainWindow)
|
||||
Private m_sMsg As String = "Value"
|
||||
Private m_sValue As String = ""
|
||||
Private m_sList As ObservableCollection(Of String)
|
||||
Private m_IsText As Boolean = True
|
||||
|
||||
' avvia la visualizzazione della textbox
|
||||
Sub New(Owner As Window, Optional sMsg As String = "")
|
||||
Me.Owner = Owner
|
||||
m_sMsg = sMsg
|
||||
m_IsText = True
|
||||
InitializeComponent()
|
||||
End Sub
|
||||
|
||||
Friend Function SetVal( dVal As Double) As Boolean
|
||||
m_sValue = DoubleToString( dVal, 3)
|
||||
Friend Function SetVal(dVal As Double, Optional ByVal bLen As Boolean = False) As Boolean
|
||||
If bLen Then
|
||||
m_sValue = LenToString(dVal, 3)
|
||||
Else
|
||||
m_sValue = DoubleToString(dVal, 3)
|
||||
End If
|
||||
ValueTxBx.Text = m_sValue
|
||||
Return true
|
||||
Return True
|
||||
End Function
|
||||
|
||||
Friend Function GetVal() As Double
|
||||
' avvia la visualizzazione della combobox
|
||||
Sub New(Owner As Window, sList As ObservableCollection(Of String), Optional sMsg As String = "")
|
||||
Me.Owner = Owner
|
||||
m_sMsg = sMsg
|
||||
m_IsText = False
|
||||
InitializeComponent()
|
||||
m_sList = sList
|
||||
SetComboBox(m_sList)
|
||||
End Sub
|
||||
|
||||
Friend Function GetVal(Optional ByVal bLen As Boolean = False) As Double
|
||||
Dim dVal As Double = 0
|
||||
StringToDouble( m_sValue, dVal)
|
||||
If bLen Then
|
||||
StringToLen(m_sValue, dVal)
|
||||
Else
|
||||
StringToDouble(m_sValue, dVal)
|
||||
End If
|
||||
Return dVal
|
||||
End Function
|
||||
|
||||
Friend Function SetComboBox(sList As ObservableCollection(Of String)) As Boolean
|
||||
ValueCmBx.ItemsSource = sList
|
||||
Return True
|
||||
End Function
|
||||
|
||||
Friend Function SetItemComboBox(sItem As String) As Boolean
|
||||
For Each MyItem As String In ValueCmBx.ItemsSource
|
||||
If MyItem = sItem Then
|
||||
ValueCmBx.SelectedItem = MyItem
|
||||
End If
|
||||
Next
|
||||
Return True
|
||||
End Function
|
||||
|
||||
Friend Function GetItemComboBox() As String
|
||||
Dim sVal As String = ValueCmBx.SelectedItem
|
||||
Return sVal
|
||||
End Function
|
||||
|
||||
Private Sub EditValueWD_Initialized(sender As Object, e As EventArgs) Handles Me.Initialized
|
||||
Me.Top = Owner.Top + Owner.Height / 2 - Me.Height / 2
|
||||
Me.Left = Owner.Left + Owner.Width / 2 - Me.Width / 2
|
||||
ValueTxbl.Text = m_sMsg
|
||||
If m_IsText Then
|
||||
ValueCmBx.Visibility = Visibility.Collapsed
|
||||
ValueTxBx.Visibility = Visibility.Visible
|
||||
Else
|
||||
ValueCmBx.Visibility = Visibility.Visible
|
||||
ValueTxBx.Visibility = Visibility.Collapsed
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub EditValueWD_Rendered(sender As Object, e As EventArgs) Handles Me.ContentRendered
|
||||
|
||||
+123
-120
@@ -7,164 +7,167 @@
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="853.3" d:DesignWidth="1280">
|
||||
|
||||
<!-- Definizione della SplitPage -->
|
||||
<Grid Name="SplitPageGrid" >
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="3*"/>
|
||||
<ColumnDefinition Width="12*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="8*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<!-- Definizione della SplitPage -->
|
||||
<Grid Name="SplitPageGrid" >
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="3*"/>
|
||||
<ColumnDefinition Width="12*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="8*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<!--Upper button grid-->
|
||||
<Grid Grid.Column="1">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="4*"/>
|
||||
<ColumnDefinition Width="8*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<!--Griglia per oscurare i bottoni della pagina sottostante-->
|
||||
<Grid Background="{DynamicResource OmagCut_Gray}">
|
||||
<!--Upper button grid-->
|
||||
<Grid Grid.Column="1">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="4*"/>
|
||||
<ColumnDefinition Width="8*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Button Name="PrevBtn" Grid.Column="0" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource NumericKeyboardArrowImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
<!--Griglia per oscurare i bottoni della pagina sottostante-->
|
||||
<Grid Background="{DynamicResource OmagCut_Gray}">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Button Name="PrevBtn" Grid.Column="0" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource NumericKeyboardArrowImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="NextBtn" Grid.Column="1" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource NumericKeyboardArrowImg}" Style="{StaticResource OmagCut_ButtonIcon}" RenderTransformOrigin="0.5,0.5">
|
||||
<Image.RenderTransform>
|
||||
<TransformGroup>
|
||||
<RotateTransform Angle="180"/>
|
||||
</TransformGroup>
|
||||
</Image.RenderTransform>
|
||||
</Image>
|
||||
</Button>
|
||||
<Button Name="ModifyBtn" Grid.Column="2" Style="{DynamicResource OmagCut_YellowTextButton}"/>
|
||||
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
||||
<!--Left Button Grid-->
|
||||
<Grid Grid.RowSpan="3">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="2*"/>
|
||||
<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>
|
||||
|
||||
<Button Name="TopLBtn" Grid.Column="0" Grid.Row="1"
|
||||
Style="{DynamicResource OmagCut_TopGrayGradientYellowButton}">
|
||||
<Image Source="{DynamicResource TopLeftImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="NextBtn" Grid.Column="1" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource NumericKeyboardArrowImg}" Style="{StaticResource OmagCut_ButtonIcon}" RenderTransformOrigin="0.5,0.5">
|
||||
<Image.RenderTransform>
|
||||
<TransformGroup>
|
||||
<RotateTransform Angle="180"/>
|
||||
</TransformGroup>
|
||||
</Image.RenderTransform>
|
||||
</Image>
|
||||
<Button Name="UpBtn" Grid.Column="1" Grid.Row="1"
|
||||
Style="{DynamicResource OmagCut_TopGrayGradientYellowButton}">
|
||||
<Image Source="{DynamicResource UpArrowImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="ModifyBtn" Grid.Column="2" Style="{DynamicResource OmagCut_YellowTextButton}"/>
|
||||
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
||||
<!--Left Button Grid-->
|
||||
<Grid Grid.RowSpan="3">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="2*"/>
|
||||
<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>
|
||||
|
||||
<Button Name="TopLBtn" Grid.Column="0" Grid.Row="1"
|
||||
<Button Name="TopRBtn" Grid.Column="2" Grid.Row="1"
|
||||
Style="{DynamicResource OmagCut_TopGrayGradientYellowButton}">
|
||||
<Image Source="{DynamicResource TopLeftImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="UpBtn" Grid.Column="1" Grid.Row="1"
|
||||
Style="{DynamicResource OmagCut_TopGrayGradientYellowButton}">
|
||||
<Image Source="{DynamicResource UpArrowImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="TopRBtn" Grid.Column="2" Grid.Row="1"
|
||||
Style="{DynamicResource OmagCut_TopGrayGradientYellowButton}">
|
||||
<Image Source="{DynamicResource TopRightImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="LeftBtn" Grid.Column="0" Grid.Row="2"
|
||||
<Image Source="{DynamicResource TopRightImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="LeftBtn" Grid.Column="0" Grid.Row="2"
|
||||
Style="{DynamicResource OmagCut_LeftGrayGradientYellowButton}">
|
||||
<Image Source="{DynamicResource LeftArrowImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||
</Button>
|
||||
<EgtWPFLib:EgtTextBox Name="StepMoveTxBx" Grid.Column="1" Grid.Row="2" Width="50"
|
||||
<Image Source="{DynamicResource LeftArrowImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||
</Button>
|
||||
<EgtWPFLib:EgtTextBox Name="StepMoveTxBx" Grid.Column="1" Grid.Row="2" Width="50"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
<Button Name="ResetBtn" Grid.Column="1" Grid.Row="2"
|
||||
<Button Name="ResetBtn" Grid.Column="1" Grid.Row="2"
|
||||
Style="{DynamicResource OmagCut_YellowTextButton}">
|
||||
</Button>
|
||||
<Button Name="RightBtn" Grid.Column="2" Grid.Row="2"
|
||||
</Button>
|
||||
<Button Name="RightBtn" Grid.Column="2" Grid.Row="2"
|
||||
Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}">
|
||||
<Image Source="{DynamicResource RightArrowImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="BottomLBtn" Grid.Column="0" Grid.Row="3"
|
||||
<Image Source="{DynamicResource RightArrowImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="BottomLBtn" Grid.Column="0" Grid.Row="3"
|
||||
Style="{DynamicResource OmagCut_BottomGrayGradientYellowButton}">
|
||||
<Image Source="{DynamicResource BottomLeftImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="DownBtn" Grid.Column="1" Grid.Row="3"
|
||||
<Image Source="{DynamicResource BottomLeftImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="DownBtn" Grid.Column="1" Grid.Row="3"
|
||||
Style="{DynamicResource OmagCut_BottomGrayGradientYellowButton}">
|
||||
<Image Source="{DynamicResource DownArrowImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="BottomRBtn" Grid.Column="2" Grid.Row="3"
|
||||
<Image Source="{DynamicResource DownArrowImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="BottomRBtn" Grid.Column="2" Grid.Row="3"
|
||||
Style="{DynamicResource OmagCut_BottomGrayGradientYellowButton}">
|
||||
<Image Source="{DynamicResource BottomRightImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||
</Button>
|
||||
<Image Source="{DynamicResource BottomRightImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||
</Button>
|
||||
|
||||
<Button Name="RotateCounterClockwiseBtn" Grid.Column="0" Grid.Row="4"
|
||||
<Button Name="RotateCounterClockwiseBtn" Grid.Column="0" Grid.Row="4"
|
||||
Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}">
|
||||
<Image Source="{DynamicResource CounterClockwiseRotateImg}" Width="64" Height="65" HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center" />
|
||||
</Button>
|
||||
</Button>
|
||||
|
||||
<Grid Name="RotationAngle" Grid.Column="1" Grid.Row="4" HorizontalAlignment="Center" VerticalAlignment="Center">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<EgtWPFLib:EgtTextBox Name="RotationAngleTxBx" Width="50"
|
||||
<Grid Name="RotationAngle" Grid.Column="1" Grid.Row="4" HorizontalAlignment="Center" VerticalAlignment="Center">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<EgtWPFLib:EgtTextBox Name="RotationAngleTxBx" Width="50" IsLength="False"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
<TextBlock Grid.Column="1" FontSize="30" Margin="2,-5,0,0"
|
||||
<TextBlock Grid.Column="1" FontSize="30" Margin="2,-5,0,0"
|
||||
Text="°"/>
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
||||
<Button Name="RotateClockwiseBtn" Grid.Column="2" Grid.Row="4"
|
||||
<Button Name="RotateClockwiseBtn" Grid.Column="2" Grid.Row="4"
|
||||
Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}">
|
||||
<Image Source="{DynamicResource ClockwiseRotateImg}" Width="65" Height="65" HorizontalAlignment="Center"
|
||||
<Image Source="{DynamicResource ClockwiseRotateImg}" Width="65" Height="65" HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center" />
|
||||
</Button>
|
||||
</Button>
|
||||
|
||||
|
||||
<Button Name="RemovePartBtn" Grid.ColumnSpan="2" Grid.Row="6"
|
||||
<!--Gestione sfridi-->
|
||||
<Button Name="RemovePartBtn" Grid.ColumnSpan="2" Grid.Row="6"
|
||||
Style="{DynamicResource OmagCut_YellowTextButton}"/>
|
||||
|
||||
<Button Name="ScrapsBtn" Grid.Column="3" Grid.Row="6"
|
||||
<Button Name="ScrapsBtn" Grid.Column="3" Grid.Row="6"
|
||||
Style="{DynamicResource OmagCut_YellowTextButton}"/>
|
||||
|
||||
<!--Gestione scarico pezzi-->
|
||||
<Button Name="UnloadPartsBtn" Grid.ColumnSpan="2" Grid.Row="7"
|
||||
Style="{DynamicResource OmagCut_YellowTextButton}"/>
|
||||
|
||||
<Grid Grid.Row="7" Grid.ColumnSpan="3">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
</Grid>
|
||||
|
||||
</Grid>
|
||||
|
||||
<!--Lower button grid, sfondo grigio per coprire i bottoni della pagina sottostante-->
|
||||
<Grid Grid.Column="1" Grid.Row="2" Background="{DynamicResource OmagCut_Gray}">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="10*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
</Grid>
|
||||
|
||||
</Grid>
|
||||
|
||||
<!--Lower button grid, sfondo grigio per coprire i bottoni della pagina sottostante-->
|
||||
<Grid Grid.Column="1" Grid.Row="2" Background="{DynamicResource OmagCut_Gray}">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="10*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<!-- Inserimento della pausa durante il movimento sulla tavola di scarico-->
|
||||
<Button Name="PauseBtn" Grid.Column="1" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource Pausa-ON_OFFImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||
</Button>
|
||||
</Grid>
|
||||
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
||||
</UserControl>
|
||||
|
||||
+429
-82
@@ -1,4 +1,5 @@
|
||||
Imports EgtUILib
|
||||
Imports System.Windows.Forms.Integration
|
||||
Imports EgtUILib
|
||||
|
||||
Public Class MoveRawPartPage
|
||||
' Riferimento alla MainWindow
|
||||
@@ -35,12 +36,16 @@ Public Class MoveRawPartPage
|
||||
Private m_ScrapsVisibility As Visibility = Visibility.Visible
|
||||
Private m_CurrRawOnVacuum As Integer = GDB_ID.NULL
|
||||
|
||||
' definisce se è stata inserito uno scarico
|
||||
Private m_IsCurrPhaseUnloaded As Boolean = False
|
||||
|
||||
Private Sub MoveRawPartPage_Initialized(sender As Object, e As EventArgs) Handles Me.Initialized
|
||||
' Assegno testi
|
||||
RemovePartBtn.Content = EgtMsg(MSG_MOVERAWPAGEUC + 1) 'Rimuovi
|
||||
ModifyBtn.Content = EgtMsg(MSG_SPLITPAGEUC + 17) 'Modifica
|
||||
ResetBtn.Content = EgtMsg(MSG_NESTPAGEUC + 6) 'Reset
|
||||
ScrapsBtn.Content = "Add Scraps"
|
||||
UnloadPartsBtn.Content = "Move part"
|
||||
End Sub
|
||||
|
||||
Private Sub MoveRawPartPage_Loaded(sender As Object, e As EventArgs) Handles Me.Loaded
|
||||
@@ -60,7 +65,12 @@ Public Class MoveRawPartPage
|
||||
End If
|
||||
' Deseleziono tutto
|
||||
EgtDeselectAll()
|
||||
' Recupero i tagli allungati prima definiti
|
||||
' resetto variabili di navigazione nelle fasi
|
||||
m_bPrev = False
|
||||
m_bToNext = False
|
||||
|
||||
'---------------------------- CREATE NEW PHASE ----------------------------
|
||||
' Recupero i tagli ABILITATI prima definiti
|
||||
Dim Cuts(0) As Integer
|
||||
m_SplitPage.GetEnabledCuts(Cuts)
|
||||
' Fase precedente
|
||||
@@ -69,11 +79,19 @@ Public Class MoveRawPartPage
|
||||
Dim vNewRaws As New List(Of Integer)
|
||||
If Not m_SplitPage.m_bShow Then
|
||||
SplitRawParts(nPrevPhase, Cuts, vNewRaws)
|
||||
m_IsCurrPhaseUnloaded = False
|
||||
Else
|
||||
EgtSetCurrPhase(nPrevPhase + 1)
|
||||
nPrevPhase = nPrevPhase + 1
|
||||
EgtSetCurrPhase(nPrevPhase)
|
||||
HideAllMachinings()
|
||||
' verifico se la fase corrente è di tipo scarico frontale
|
||||
m_nCurrDisposition = EgtGetPhaseDisposition(nPrevPhase)
|
||||
If IsDispUnloadOnAuxTab(m_nCurrDisposition) Then
|
||||
m_SplitPage.m_bOnAuxTab = True
|
||||
End If
|
||||
End If
|
||||
m_nCurrPhase = EgtGetCurrPhase()
|
||||
'---------------------------- CREATE NEW PHASE ----------------------------
|
||||
|
||||
'---------------------------- SCRAPS ----------------------------
|
||||
' gestione visualizzazione del comando "Scraps"
|
||||
@@ -101,19 +119,31 @@ Public Class MoveRawPartPage
|
||||
End If
|
||||
'---------------------------- SCRAPS ----------------------------
|
||||
|
||||
'---------------------------- AUX TABLE ----------------------------
|
||||
' Se movimento pezzi finale, sistemazioni per tavolo ausiliario
|
||||
If m_SplitPage.m_bOnAuxTab Then
|
||||
' assegnazione delle info tavola ausiliaria alla dispozione corrente
|
||||
If m_SplitPage.m_bOnAuxTab And m_SplitPage.m_bEnableOnAuxTab Then
|
||||
' assegnazione delle info tavola ausiliaria alla dispozione corrente (Spostato nella funzione Refresh)
|
||||
SetAuxTabInCurrDisposition()
|
||||
UnloadPartsBtn.Content = "Go to MOVE part"
|
||||
' altrimenti, aggiorno visualizzazione
|
||||
Else
|
||||
EgtDraw()
|
||||
ElseIf Not m_SplitPage.m_bOnAuxTab And m_SplitPage.m_bEnableOnAuxTab Then
|
||||
UnloadPartsBtn.Content = "Go to UNLOAD part"
|
||||
End If
|
||||
'---------------------------- AUX TABLE ----------------------------
|
||||
EgtDraw()
|
||||
' Carico i parametri di movimento
|
||||
m_dStep = GetPrivateProfileDouble(S_RAWMOVE, K_RAWSTEP, 50, m_MainWindow.GetIniFile())
|
||||
' Carico il valore ci
|
||||
Dim ExtraStep As Double = GetPrivateProfileDouble(S_RAWMOVE, K_EXTRASTEP, 1, m_MainWindow.GetIniFile())
|
||||
' Ricavo la lunghezza del baffo di taglio
|
||||
m_dStep = SplitAuto.MaxCuttingMustache(m_dStep)
|
||||
StepMoveTxBx.Text = LenToString(m_dStep, 1) & "+1"
|
||||
If ExtraStep < EPS_SMALL Then
|
||||
StepMoveTxBx.Text = LenToString(m_dStep, 1)
|
||||
Else
|
||||
StepMoveTxBx.Text = LenToString(m_dStep, 1) & "+" & LenToString(ExtraStep, 1)
|
||||
' Aggiorno il valore sommando l'extra
|
||||
m_dStep = m_dStep + ExtraStep
|
||||
End If
|
||||
m_dRotation = GetPrivateProfileDouble(S_RAWMOVE, K_RAWROTATION, 30, m_MainWindow.GetIniFile())
|
||||
RotationAngleTxBx.Text = DoubleToString(m_dRotation, 3)
|
||||
' Se movimento manuale perpendicolare
|
||||
@@ -167,6 +197,30 @@ Public Class MoveRawPartPage
|
||||
|
||||
' aggiorno il messaggio del comando per gestire gli sfridi
|
||||
VerifyIsNewScrap(m_CurrRawOnVacuum)
|
||||
' aggiorno la visibilità dei comandi
|
||||
RefreshVisibility()
|
||||
' salvo l'idice della fase corrente
|
||||
m_nCurrDisposition = EgtGetPhaseDisposition(m_nCurrPhase)
|
||||
' Abilitazione bottone modifica
|
||||
ModifyBtn.IsEnabled = m_SplitPage.m_bShow
|
||||
' gestione abilitazione altri bottoni
|
||||
EnableButtons()
|
||||
End Sub
|
||||
|
||||
' Gestione di visualizzazione dei comandi per il movimento dei pezzi
|
||||
Private Sub RefreshVisibility()
|
||||
' Aggiorno visulizzazione comando per passare alla pagina di scarico
|
||||
If Not m_SplitPage.m_bEnableOnAuxTab Then
|
||||
UnloadPartsBtn.Visibility = Visibility.Hidden
|
||||
Else
|
||||
UnloadPartsBtn.Visibility = Visibility.Visible
|
||||
If m_SplitPage.m_bOnAuxTab Then
|
||||
UnloadPartsBtn.Content = "Go to MOVE part"
|
||||
' altrimenti, aggiorno visualizzazione
|
||||
Else
|
||||
UnloadPartsBtn.Content = "Go to UNLOAD part"
|
||||
End If
|
||||
End If
|
||||
' Aggiorno interfaccia per taglio perpendicolare
|
||||
If m_bByHand Then
|
||||
UpBtn.Visibility = Windows.Visibility.Visible
|
||||
@@ -222,12 +276,6 @@ Public Class MoveRawPartPage
|
||||
ResetBtn.Visibility = Windows.Visibility.Visible
|
||||
ScrapsBtn.Visibility = Windows.Visibility.Hidden
|
||||
End If
|
||||
' salvo l'idice della fase corrente
|
||||
m_nCurrDisposition = EgtGetPhaseDisposition(m_nCurrPhase)
|
||||
' Abilitazione bottone modifica
|
||||
ModifyBtn.IsEnabled = m_SplitPage.m_bShow
|
||||
' gestione abilitazione altri bottoni
|
||||
EnableButtons()
|
||||
End Sub
|
||||
|
||||
Private Sub SetAuxTabInCurrDisposition()
|
||||
@@ -292,15 +340,14 @@ Public Class MoveRawPartPage
|
||||
EgtSetStatus(nId, GDB_ST.ON_)
|
||||
' prima di rilasciare il pezzo verifico che non vada in collisione con altri pezzi sulla tavola (evito il controllo se ultima fase)
|
||||
If VerifyCollisionWithOtherRawPart(nId) Then
|
||||
' mantengo la selezione del pezzo
|
||||
EgtSetStatus(nId, GDB_ST.SEL)
|
||||
m_CurrProjPage.SetErrorMessage("Collisione pezzi")
|
||||
Else
|
||||
' Se con ventose, le nascondo
|
||||
If Not m_bByHand Then EgtSetStatus(GetVacuumId(), GDB_ST.OFF)
|
||||
' mantengo la selezione del pezzo
|
||||
EgtSetStatus(nId, GDB_ST.SEL)
|
||||
m_CurrProjPage.SetErrorMessage("Collisione pezzi")
|
||||
Else
|
||||
' Se con ventose, le nascondo
|
||||
If Not m_bByHand Then EgtSetStatus(GetVacuumId(), GDB_ST.OFF)
|
||||
End If
|
||||
Else
|
||||
|
||||
' verifico che il pezzo precedente possa essere depositato correttamente
|
||||
If VerifyCollisionWithOtherRawPart(m_CurrRawOnVacuum) Then
|
||||
' mantengo la selezione del pezzo
|
||||
@@ -310,6 +357,15 @@ Public Class MoveRawPartPage
|
||||
' esco dal ciclo, prima devo depositare correttamente il pezzo
|
||||
Exit While
|
||||
End If
|
||||
' Verifico che il pezzo corrente sia prelevabile - versione 2.6c3 -
|
||||
If VerifyCollisionWithOtherRawPart(nId, True) Then
|
||||
' mantengo la selezione del pezzo
|
||||
EgtSetStatus(m_CurrRawOnVacuum, GDB_ST.SEL)
|
||||
m_CurrProjPage.SetErrorMessage("Collisione pezzi")
|
||||
EgtDraw()
|
||||
' esco dal ciclo, prima devo depositare correttamente il pezzo
|
||||
Exit While
|
||||
End If
|
||||
' salvo l'indice del pezzo correntemente attaccato alle ventose
|
||||
m_CurrRawOnVacuum = nId
|
||||
|
||||
@@ -329,7 +385,15 @@ Public Class MoveRawPartPage
|
||||
VacuumCups.SetWeightInformation(AverageDensity, MaxSinglePlugger, MaxDoublePlugger)
|
||||
VacuumCups.SetRotationForExtraStrokeY(GetPrivateProfileInt(S_MACH_RAWMOVE, K_MACH_ROTATEVACUUMFOREXTRASTROKEY, 0, m_MainWindow.GetMachIniFile()) <> 0)
|
||||
VacuumCups.SetRotationForExtraStrokeX(GetPrivateProfileInt(S_MACH_RAWMOVE, K_MACH_ROTATEVACUUMFOREXTRASTROKEX, 0, m_MainWindow.GetMachIniFile()) <> 0)
|
||||
If PutVacuumCupsOnRaw(nId, rmData) Then
|
||||
|
||||
VacuumCups.ResetHeadName()
|
||||
Dim bPutVacuum As Boolean = PutVacuumCupsOnRaw(nId, rmData)
|
||||
If Not bPutVacuum Then
|
||||
Dim bTwoHeadVac As Boolean = (EgtGetHeadId(VACUUM_HEAD_2) <> GDB_ID.NULL)
|
||||
If bTwoHeadVac Then bPutVacuum = PutVacuumCupsOnRaw(nId, rmData)
|
||||
End If
|
||||
|
||||
If bPutVacuum Then
|
||||
' Visualizzo le ventose
|
||||
EgtSetStatus(GetVacuumId(), GDB_ST.ON_)
|
||||
' Aggiorno i dati
|
||||
@@ -351,6 +415,8 @@ Public Class MoveRawPartPage
|
||||
m_CurrProjPage.SetWarningMessage(EgtMsg(MSG_MOVERAWPAGEUC + 2)) 'Pezzo troppo piccolo : non si può muovere
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
End If
|
||||
End If
|
||||
EgtDraw()
|
||||
@@ -370,7 +436,7 @@ Public Class MoveRawPartPage
|
||||
End Sub
|
||||
|
||||
' Veririfica che il grezzo non entri in colliosione con altri pezzi
|
||||
Private Function VerifyCollisionWithOtherRawPart(nIdOnVacumm As Integer) As Boolean
|
||||
Private Function VerifyCollisionWithOtherRawPart_0(nIdOnVacumm As Integer) As Boolean
|
||||
' se movimento su tavola di scarico non eseguo il controllo (evito di segnalre errori per pezzi ricavati interni al grezzo...)
|
||||
If m_SplitPage.m_bOnAuxTab Then Return False
|
||||
If nIdOnVacumm = GDB_ID.NULL Then Return False
|
||||
@@ -404,6 +470,69 @@ Public Class MoveRawPartPage
|
||||
Return False
|
||||
End Function
|
||||
|
||||
' Veririfica che il grezzo non entri in colliosione con altri pezzi - versione 2.6c3 -
|
||||
Private Function VerifyCollisionWithOtherRawPart(nIdOnVacumm As Integer, Optional IsTaking As Boolean = False) As Boolean
|
||||
' se movimento su tavola di scarico non eseguo il controllo (evito di segnalre errori per pezzi ricavati interni al grezzo...)
|
||||
If m_SplitPage.m_bOnAuxTab Then Return False
|
||||
If nIdOnVacumm = GDB_ID.NULL Then Return False
|
||||
' Creo gruppo temporaneo in cui generare le superfici per la veririfica di collisione
|
||||
Dim m_nTempId As Integer = EgtCreateGroup(GDB_ID.ROOT)
|
||||
If m_nTempId = GDB_ID.NULL Then Return False
|
||||
EgtSetName(m_nTempId, "RawTemp")
|
||||
' recupero il contorno del'ID attaccato alle ventose e da questo genero una superificie
|
||||
Dim nIdUpRegionOnVac As Integer = EgtGetFirstNameInGroup(nIdOnVacumm, "RawUpReg")
|
||||
Dim nIdDwnRegionOnVac As Integer = EgtGetFirstNameInGroup(nIdOnVacumm, "RawDwnReg")
|
||||
' recupero gli ID di tutti i grezzi della fase corrente
|
||||
Dim nCurrPhase As Integer = EgtGetCurrPhase()
|
||||
Dim nRawGroupId = EgtGetParent(EgtGetFirstRawPart())
|
||||
Dim nIdRaw As Integer = EgtGetFirstRawPart()
|
||||
' ciclo su tutti i grezzi per veririficare eventuali collisioni
|
||||
While nIdRaw <> GDB_ID.NULL
|
||||
' verifico la fase del grezzo
|
||||
If EgtVerifyRawPartCurrPhase(nIdRaw) And nIdOnVacumm <> nIdRaw Then
|
||||
' recupero il contorno del pezzo e genero la sua sueperificie
|
||||
Dim nIdUpRegion As Integer = EgtGetFirstNameInGroup(nIdRaw, "RawUpReg")
|
||||
Dim nIdDwnRegion As Integer = EgtGetFirstNameInGroup(nIdRaw, "RawDwnReg")
|
||||
' creo la copia delle superifici
|
||||
Dim nCopy_IdDwnRegionOnVac As Integer = EgtCopyGlob(nIdDwnRegionOnVac, m_nTempId)
|
||||
Dim nCopy_nIdUpRegion As Integer = EgtCopyGlob(nIdUpRegion, m_nTempId)
|
||||
' PRELIEVO
|
||||
If EgtSurfFrIntersect(nCopy_IdDwnRegionOnVac, nCopy_nIdUpRegion) Then
|
||||
' se esite una superficie allora esiste un'intersezione
|
||||
If EgtExistsObj(nCopy_IdDwnRegionOnVac) Then
|
||||
EgtErase(m_nTempId)
|
||||
' Esco: Intersezione TROVATA → true
|
||||
Return True
|
||||
End If
|
||||
End If
|
||||
If Not IsTaking Then
|
||||
' DEPOSITO : devono essere esguiti due controlli ulteririori
|
||||
Dim nCopy_IdUpRegionOnVac As Integer = EgtCopyGlob(nIdUpRegionOnVac, m_nTempId)
|
||||
Dim nCopy_nIdDwnRegion As Integer = EgtCopyGlob(nIdDwnRegion, m_nTempId)
|
||||
If EgtSurfFrIntersect(nCopy_IdDwnRegionOnVac, nCopy_nIdDwnRegion) Then
|
||||
' se esite una superficie allora esiste un'intersezione
|
||||
If EgtExistsObj(nCopy_IdDwnRegionOnVac) Then
|
||||
EgtErase(m_nTempId)
|
||||
' Esco: Intersezione TROVATA → true
|
||||
Return True
|
||||
End If
|
||||
End If
|
||||
If EgtSurfFrIntersect(nCopy_IdUpRegionOnVac, nCopy_nIdUpRegion) Then
|
||||
' se esite una superficie allora esiste un'intersezione
|
||||
If EgtExistsObj(nCopy_IdUpRegionOnVac) Then
|
||||
EgtErase(m_nTempId)
|
||||
' Esco: Intersezione TROVATA → true
|
||||
Return True
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
nIdRaw = EgtGetNextRawPart(nIdRaw)
|
||||
End While
|
||||
EgtErase(m_nTempId)
|
||||
Return False
|
||||
End Function
|
||||
|
||||
Private Function VerifyIsNewScrap(nMyId As Integer) As Boolean
|
||||
Dim nVal As Integer = 0
|
||||
If EgtGetInfo(nMyId, K_ISNEWSCRAPS, nVal) Then
|
||||
@@ -445,7 +574,7 @@ Public Class MoveRawPartPage
|
||||
If EgtMoveRawPart(nRawId, dMove * m_vtDir) Then
|
||||
m_dCurrDist += Math.Abs(dMove)
|
||||
End If
|
||||
' Altrimenti movimento Y +
|
||||
' Altrimenti movimento Y +
|
||||
Else
|
||||
If m_bRawWithCups Then
|
||||
Dim vtMove As New Vector3d(0, m_dStep, 0)
|
||||
@@ -488,7 +617,7 @@ Public Class MoveRawPartPage
|
||||
If EgtMoveRawPart(nRawId, dMove * m_vtDir) Then
|
||||
m_dCurrDist -= Math.Abs(dMove)
|
||||
End If
|
||||
' Altrimenti movimento Y -
|
||||
' Altrimenti movimento Y -
|
||||
Else
|
||||
If m_bRawWithCups Then
|
||||
Dim vtMove As New Vector3d(0, -m_dStep, 0)
|
||||
@@ -738,6 +867,12 @@ Public Class MoveRawPartPage
|
||||
Return bOk
|
||||
End Function
|
||||
|
||||
Private Sub RemovePart_KeyCancel(sender As Object, e As System.Windows.Forms.KeyEventArgs) Handles m_CurrProjPage.OnKeyCancelDownScene
|
||||
If e.KeyCode = System.Windows.Forms.Keys.Delete Then
|
||||
RemovePartBtn_Click(Nothing, Nothing)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub RemovePartBtn_Click(sender As Object, e As RoutedEventArgs) Handles RemovePartBtn.Click
|
||||
Dim nRawId As Integer = EgtGetFirstSelectedObj()
|
||||
While nRawId <> GDB_ID.NULL
|
||||
@@ -780,6 +915,34 @@ Public Class MoveRawPartPage
|
||||
End While
|
||||
End Sub
|
||||
|
||||
' Passo dalla pagina di movimento dei pezzi alla pagina di scarico
|
||||
Private Sub UnloadPartBtn_Click() Handles UnloadPartsBtn.Click
|
||||
' forzo lo stato di scarico frontale oppure di movimento
|
||||
m_SplitPage.m_bOnAuxTab = Not m_SplitPage.m_bOnAuxTab
|
||||
|
||||
' se rientro nella fase di spostamenti allora nascondo la tavola di scarico
|
||||
If Not m_SplitPage.m_bOnAuxTab Then
|
||||
' se ci sono pezzi sulla tavola di scarico non posso nasconderla
|
||||
Dim LclLstOfUnldPart As New List(Of Integer)
|
||||
If Not PartOnAuxTab(LclLstOfUnldPart, m_nCurrPhase) Then
|
||||
EgtDisableModified()
|
||||
' nascondo la tavola di scarico
|
||||
EgtSetStatus(m_nAuxTabId, GDB_ST.OFF)
|
||||
' Nascondo eventuali pezzi in parcheggio
|
||||
HideParkedParts()
|
||||
EgtEnableModified()
|
||||
End If
|
||||
Else
|
||||
' Assegnazione delle info tavola ausiliaria alla dispozione corrente
|
||||
SetAuxTabInCurrDisposition()
|
||||
End If
|
||||
|
||||
' Mantengo la fase che è stata creata e passo a gestire solo la visualizzazione dei bottoni
|
||||
RefreshVisibility()
|
||||
EgtZoom(ZM.ALL, True)
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub StepMoveTxBx_EgtClosed(sender As Object, e As EventArgs) Handles StepMoveTxBx.EgtClosed
|
||||
Dim dStep As Double
|
||||
If StringToLen(StepMoveTxBx.Text, dStep) Then
|
||||
@@ -821,22 +984,23 @@ Public Class MoveRawPartPage
|
||||
Dim ptRef As Point3d
|
||||
If Not EgtGetInfo(nRefId, "Pos", ptRef) Then Return
|
||||
Dim sCorn As String = ""
|
||||
EgtGetInfo( nRefId, "COR", sCorn)
|
||||
Select sCorn
|
||||
Case "TL"
|
||||
nCorn = MCH_CR.TL
|
||||
Case "TR"
|
||||
nCorn = MCH_CR.TR
|
||||
Case "BL"
|
||||
nCorn = MCH_CR.BL
|
||||
Case "BR"
|
||||
nCorn = MCH_CR.BR
|
||||
EgtGetInfo(nRefId, "COR", sCorn)
|
||||
Select Case sCorn
|
||||
Case "TL"
|
||||
nCorn = MCH_CR.TL
|
||||
Case "TR"
|
||||
nCorn = MCH_CR.TR
|
||||
Case "BL"
|
||||
nCorn = MCH_CR.BL
|
||||
Case "BR"
|
||||
nCorn = MCH_CR.BR
|
||||
End Select
|
||||
' Recupero il centro del grezzo
|
||||
Dim ptRawCen As Point3d
|
||||
EgtGetRawPartCenter(nRawId, ptRawCen)
|
||||
' Sposto il grezzo in battuta sul corner
|
||||
Dim dAngRaw As Double = 0
|
||||
Dim dNewAngRot As Double = 0
|
||||
|
||||
Dim AngRotList As New List(Of Double)
|
||||
|
||||
@@ -877,12 +1041,16 @@ Public Class MoveRawPartPage
|
||||
' sposto il pezzo in questa posizione
|
||||
EgtMoveToCornerRawPart(nRawId, ptCorner, MCH_CR.BL)
|
||||
' riprovo il movimento
|
||||
If EgtRotateRawPart(nRawId, Vector3d.Z_AX(), -dAngRaw) Then
|
||||
dNewAngRot = GetPrefRotAng(dAngRaw)
|
||||
'dNewAngRot = DeltaAngC
|
||||
If EgtRotateRawPart(nRawId, Vector3d.Z_AX(), dNewAngRot) Then
|
||||
If Not EgtMoveToCornerRawPart(nRawId, ptRef, nCorn) Then
|
||||
' riposiziono il pezzo come era prima
|
||||
EgtRotateRawPart(nRawId, Vector3d.Z_AX(), dAngRaw)
|
||||
EgtRotateRawPart(nRawId, Vector3d.Z_AX(), -dAngRaw)
|
||||
EgtDraw()
|
||||
Return
|
||||
End If
|
||||
dAngRaw = dNewAngRot
|
||||
Else
|
||||
Return
|
||||
End If
|
||||
@@ -908,17 +1076,18 @@ Public Class MoveRawPartPage
|
||||
End If
|
||||
nOtherRaw = EgtGetNextRawPart(nOtherRaw)
|
||||
End While
|
||||
|
||||
' Determino il movimento effettuato
|
||||
Dim ptNewRawCen As Point3d
|
||||
EgtGetRawPartCenter(nRawId, ptNewRawCen)
|
||||
' Se tutto bene, aggiorno lista movimenti
|
||||
If bRawOk Then
|
||||
AddRawMoveData(nRawId, ptNewRawCen - ptRawCen, m_RawMoveDataList)
|
||||
If dAngRaw <> 0 Then AddRawMoveData(nRawId, -dAngRaw, m_RawMoveDataList)
|
||||
If dAngRaw <> 0 Then AddRawMoveData(nRawId, dAngRaw, m_RawMoveDataList)
|
||||
' altrimenti annullo il movimento
|
||||
Else
|
||||
EgtMoveRawPart(nRawId, ptRawCen - ptNewRawCen)
|
||||
EgtRotateRawPart(nRawId, Vector3d.Z_AX(), dAngRaw)
|
||||
EgtRotateRawPart(nRawId, Vector3d.Z_AX(), -dAngRaw)
|
||||
m_CurrProjPage.SetWarningMessage(EgtMsg(MSG_MOVERAWPAGEUC + 3)) ' Posizione scelta già occupata
|
||||
End If
|
||||
' Disabilito pezzo e nascondo le ventose
|
||||
@@ -991,9 +1160,54 @@ Public Class MoveRawPartPage
|
||||
Return True
|
||||
End Function
|
||||
|
||||
' determino la migliore rotazione per portare il pezzo in orizzontale
|
||||
Private Function GetPrefRotAng(ByVal dAngDeg As Double) As Double
|
||||
Dim dNewAngDeg As Double = -dAngDeg
|
||||
If dAngDeg > 90 And dAngDeg < 270 Then
|
||||
dNewAngDeg = 180 - dAngDeg
|
||||
End If
|
||||
Return dNewAngDeg
|
||||
End Function
|
||||
|
||||
Private Sub PauseBtn_Click(sender As Object, e As RoutedEventArgs) Handles PauseBtn.Click
|
||||
' verifico la presenza di eventuali pezzi sulla tavola di scarico
|
||||
Dim LclLstOfUnldPart As New List(Of Integer)
|
||||
PartOnAuxTab(LclLstOfUnldPart, m_nCurrPhase)
|
||||
If Not InsertPauseInCurrPhase() Then Return
|
||||
AddNewPhase()
|
||||
End Sub
|
||||
|
||||
' restituisce la lista dei pezzi che sono sulla tavola di scarico nella fase indicata
|
||||
Private Function PartOnAuxTab(ByRef ListOfUnloadedPatr As List(Of Integer), nPhase As Integer) As Boolean
|
||||
m_IsCurrPhaseUnloaded = False
|
||||
' Area tavolo ausiliario
|
||||
Dim b3AuxTab As New BBox3d
|
||||
EgtGetBBoxGlob(EgtGetFirstNameInGroup(m_nAuxTabId, "A1"), GDB_BB.STANDARD, b3AuxTab)
|
||||
' Area pezzi
|
||||
Dim nOtherRaw As Integer = EgtGetFirstRawPart()
|
||||
While nOtherRaw <> GDB_ID.NULL
|
||||
If EgtVerifyRawPartPhase(nOtherRaw, nPhase) Then
|
||||
Dim b3OtherRaw As New BBox3d
|
||||
' EgtGetRawPartBBox(nOtherRaw, b3OtherRaw)
|
||||
EgtGetBBoxGlob(nOtherRaw, GDB_BB.STANDARD, b3OtherRaw)
|
||||
' se il centro del pezzo è sulla tavola di scarico
|
||||
If b3OtherRaw.Center.y < b3AuxTab.Max().y Then
|
||||
m_IsCurrPhaseUnloaded = True
|
||||
ListOfUnloadedPatr.Add(nOtherRaw)
|
||||
' salvo l'info che indica che il pezzo deve essere scaricato
|
||||
EgtSetInfo(nOtherRaw, "Unloaded", 1)
|
||||
'Exit While
|
||||
End If
|
||||
End If
|
||||
nOtherRaw = EgtGetNextRawPart(nOtherRaw)
|
||||
End While
|
||||
Return m_IsCurrPhaseUnloaded
|
||||
End Function
|
||||
|
||||
' inserisce una pausa nella fase corrente
|
||||
Private Function InsertPauseInCurrPhase() As Boolean
|
||||
' verifico che ci sia almeno un elemto selezionato (dati di aggancio pezzo)
|
||||
If m_RawMoveDataList.Count = 0 Then Return
|
||||
If m_RawMoveDataList.Count = 0 Then Return False
|
||||
' verifico che sia stato inseito almeno uno spostamento, altrimenti lo rimuovo
|
||||
Dim Index As Integer = 0
|
||||
For Index = m_RawMoveDataList.Count - 1 To 0 Step -1
|
||||
@@ -1002,8 +1216,9 @@ Public Class MoveRawPartPage
|
||||
End If
|
||||
Next
|
||||
' verifico che la lista non sia vuota
|
||||
If m_RawMoveDataList.Count = 0 Then Return
|
||||
|
||||
If m_RawMoveDataList.Count = 0 Then
|
||||
Return False
|
||||
End If
|
||||
' recupero disposizione fase corrente
|
||||
Dim nDispId As Integer = EgtGetPhaseDisposition(m_nCurrPhase)
|
||||
' imposto la pausa nella disposizione corrente
|
||||
@@ -1011,30 +1226,22 @@ Public Class MoveRawPartPage
|
||||
' aggiungo al gruppo disposizione dei sottogruppi con i dati di movimento dei grezzi spostati
|
||||
SaveMoveInfoInDisposition(nDispId, m_RawMoveDataList)
|
||||
' imposto eventuale movimento pezzi su tavola ausiliaria
|
||||
SaveMovePartsOnAuxTable(nDispId, m_SplitPage.m_bOnAuxTab)
|
||||
SaveMovePartsOnAuxTable(nDispId, m_IsCurrPhaseUnloaded)
|
||||
' SaveMovePartsOnAuxTable(nDispId, m_SplitPage.m_bOnAuxTab)
|
||||
'' Eseguo calcolo speciale dei movimenti: per tavola multicut
|
||||
'SpecialApplyDisposition(nDispId, True, Not m_SplitPage.m_bOnAuxTab)
|
||||
SaveRemoveByHandInDisposition(nDispId, False)
|
||||
Return True
|
||||
End Function
|
||||
|
||||
' crea una nuvoa fase/disposizione, la rende corrente, ricalcolo i grezzi e le lavorazioni della nuova fase
|
||||
Private Function AddNewPhase() As Boolean
|
||||
' Creo nuova fase
|
||||
Dim nNewPhase As Integer = EgtAddPhase()
|
||||
|
||||
' Eseguo eventuali spezzature dei grezzi e vi sposto i pezzi (i grezzi devono essere sempre copiati per Registrazione con rotazione)
|
||||
Dim nRawId As Integer = EgtGetFirstRawPart()
|
||||
While nRawId <> GDB_ID.NULL
|
||||
' se il grezzo è presente nella fase precedente e non è quello selezionato allora procedo a creare una copia nella nuova fase
|
||||
If EgtVerifyRawPartPhase(nRawId, nNewPhase - 1) Then
|
||||
Dim bKeepRawPart As Boolean = True
|
||||
For Each RawOnAuxTabData As RawMoveData In m_RawMoveDataList
|
||||
If nRawId = RawOnAuxTabData.m_nId Then
|
||||
bKeepRawPart = False
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
If bKeepRawPart Then EgtKeepRawPart(nRawId, nNewPhase - 1)
|
||||
End If
|
||||
' passo al successivo grezzo
|
||||
nRawId = EgtGetNextRawPart(nRawId)
|
||||
End While
|
||||
' Carico i grezzi rimasti sulla tavola nella nuova fase
|
||||
ChangePhaseRawPart(nNewPhase)
|
||||
' Sposto le lavorazioni rimaste nella nuova fase
|
||||
ChangeOperationPhase(nNewPhase)
|
||||
|
||||
Dim nCurrDisposition As Integer = EgtGetPhaseDisposition(nNewPhase)
|
||||
'SetPause(nCurrDisposition)
|
||||
@@ -1045,8 +1252,43 @@ Public Class MoveRawPartPage
|
||||
SetAuxTabInCurrDisposition()
|
||||
' ripulisco la lista degli spostamenti
|
||||
m_RawMoveDataList.Clear()
|
||||
m_IsCurrPhaseUnloaded = False
|
||||
' aggiorno la fase corrente
|
||||
m_nCurrPhase = EgtGetCurrPhase()
|
||||
Return True
|
||||
End Function
|
||||
|
||||
' Copio i grezzi rimasti sulla tavola nella fase successiva
|
||||
Private Sub ChangePhaseRawPart(ByVal nNewPhase As Integer)
|
||||
' recupero l'elenco dei pezzi che sono stati scaricati sulla tavola
|
||||
Dim LocalLstOfUnldPart As New List(Of Integer)
|
||||
PartOnAuxTab(LocalLstOfUnldPart, nNewPhase - 1)
|
||||
' Eseguo eventuali spezzature dei grezzi e vi sposto i pezzi (i grezzi devono essere sempre copiati per Registrazione con rotazione)
|
||||
Dim nRawId As Integer = EgtGetFirstRawPart()
|
||||
While nRawId <> GDB_ID.NULL
|
||||
' se il grezzo è presente nella fase precedente e non è quello selezionato allora procedo a creare una copia nella nuova fase
|
||||
If EgtVerifyRawPartPhase(nRawId, nNewPhase - 1) Then
|
||||
Dim bKeepRawPart As Boolean = True
|
||||
For Each RawOnAuxTabData As RawMoveData In m_RawMoveDataList
|
||||
If nRawId = RawOnAuxTabData.m_nId Then
|
||||
' se il pezzo è stato scaricato allora non deve essere riportato nella fase successiva
|
||||
For Each UnloadPart As Integer In LocalLstOfUnldPart
|
||||
If nRawId = UnloadPart Then
|
||||
' salvo l'info che indica che il pezzo deve essere scaricato
|
||||
EgtSetInfo(nRawId, "Unloaded", 1)
|
||||
bKeepRawPart = False
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
'bKeepRawPart = False
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
If bKeepRawPart Then EgtKeepRawPart(nRawId, nNewPhase - 1)
|
||||
End If
|
||||
' passo al successivo grezzo
|
||||
nRawId = EgtGetNextRawPart(nRawId)
|
||||
End While
|
||||
End Sub
|
||||
|
||||
Private Sub ResetBtn_Click(sender As Object, e As RoutedEventArgs) Handles ResetBtn.Click
|
||||
@@ -1062,6 +1304,8 @@ Public Class MoveRawPartPage
|
||||
EgtRotateRawPart(nRawId, Vector3d.Z_AX(), dAngRaw)
|
||||
AddRawMoveData(nRawId, vtMove, m_RawMoveDataList)
|
||||
RemoveRawMoveData(nRawId, m_RawMoveDataList)
|
||||
' elimino l'info che indica che il pezzo è scaricato sulla tavola
|
||||
EgtRemoveInfo(nRawId, "Unloaded")
|
||||
' Disabilito pezzo e nascondo le ventose
|
||||
EgtSetStatus(nRawId, GDB_ST.ON_)
|
||||
EgtSetStatus(GetVacuumId(), GDB_ST.OFF)
|
||||
@@ -1094,6 +1338,14 @@ Public Class MoveRawPartPage
|
||||
m_nCurrPhase -= 1
|
||||
m_bPrev = False
|
||||
m_SplitPage.m_bShow = True
|
||||
m_SplitPage.m_bOnAuxTab = True
|
||||
' imposto la visibilità della tavola ausiliaria
|
||||
SetAuxTabInCurrDisposition()
|
||||
' carico le info di disposizione dei pezzi
|
||||
m_RawMoveDataList.Clear()
|
||||
m_bRemovedRaw = GetRemoveByHandInDisposition(m_nCurrDisposition)
|
||||
GetMoveInfoInDisposition(m_nCurrDisposition, m_RawMoveDataList)
|
||||
RefreshVisibility()
|
||||
EgtDraw()
|
||||
Return
|
||||
End If
|
||||
@@ -1124,18 +1376,53 @@ Public Class MoveRawPartPage
|
||||
Return
|
||||
End If
|
||||
|
||||
' se la disposizione corrente è sulla tavola ausiliaria allora lo sarà anche quella successiva
|
||||
If IsDispUnloadOnAuxTab(m_nCurrDisposition) <> 0 Then
|
||||
EgtSetCurrPhase(m_nCurrPhase + 1)
|
||||
m_nCurrDisposition = EgtGetNextOperation(m_nCurrDisposition)
|
||||
m_nCurrPhase += 1
|
||||
m_bToNext = False
|
||||
m_SplitPage.m_bShow = True
|
||||
EgtDraw()
|
||||
EnableButtons()
|
||||
Return
|
||||
' ------- VISUALIZZAZIONE (navigazione tra le fasi) -------
|
||||
If m_SplitPage.m_bShow Then
|
||||
' verifico se la fase successiva è uno scarico frontale
|
||||
If NextOperationIsUnloading(m_nCurrDisposition) Then
|
||||
' imposto la nuova fase (che è stata modificata all'interno della funzione di controllo)
|
||||
EgtSetCurrPhase(m_nCurrPhase)
|
||||
' carico i dati di movimento dei pezzi nella fase corrente
|
||||
m_RawMoveDataList.Clear()
|
||||
m_bRemovedRaw = GetRemoveByHandInDisposition(m_nCurrDisposition)
|
||||
GetMoveInfoInDisposition(m_nCurrDisposition, m_RawMoveDataList)
|
||||
EgtDraw()
|
||||
EnableButtons()
|
||||
Return
|
||||
ElseIf IsDispUnloadOnAuxTab(m_nCurrDisposition) <> 0 AndAlso Not NextOperationIsUnloading(m_nCurrDisposition) Then
|
||||
' imposto la nuova fase, al termine della Sub verrà caricata la pagina Split nella fase indicata ora
|
||||
m_bToNext = True
|
||||
m_nCurrPhase += 1
|
||||
EgtSetCurrPhase(m_nCurrPhase)
|
||||
EgtDraw()
|
||||
End If
|
||||
End If
|
||||
|
||||
' ------- MODIFICA -------
|
||||
If Not m_SplitPage.m_bShow Then
|
||||
' se la tavola di scarico presente oppure ci sono pezzi sulla tavola di scarico
|
||||
Dim LclLstOfUnldPart As New List(Of Integer)
|
||||
If m_SplitPage.m_bOnAuxTab Or PartOnAuxTab(LclLstOfUnldPart, m_nCurrPhase) Then
|
||||
' se ci sono pezzi sulla tavola di scarico prima di procedere inserisco una pausa e creo una nuoava fase
|
||||
If m_IsCurrPhaseUnloaded AndAlso InsertPauseInCurrPhase() Then AddNewPhase()
|
||||
' nascondo la tavola di scarico
|
||||
EgtDisableModified()
|
||||
EgtSetStatus(m_nAuxTabId, GDB_ST.OFF)
|
||||
EgtEnableModified()
|
||||
End If
|
||||
m_bToNext = True
|
||||
'' se la disposizione corrente è sulla tavola ausiliaria allora lo sarà anche quella successiva
|
||||
'If IsDispUnloadOnAuxTab(m_nCurrDisposition) <> 0 Then
|
||||
' EgtSetCurrPhase(m_nCurrPhase + 1)
|
||||
' m_nCurrDisposition = EgtGetNextOperation(m_nCurrDisposition)
|
||||
' m_nCurrPhase += 1
|
||||
' m_bToNext = False
|
||||
' m_SplitPage.m_bShow = True
|
||||
' EgtDraw()
|
||||
' EnableButtons()
|
||||
' Return
|
||||
'End If
|
||||
End If
|
||||
' resetto l'inidice del pezzo da mnovimentare
|
||||
m_CurrRawOnVacuum = GDB_ID.NULL
|
||||
' Deseleziono tutto
|
||||
@@ -1178,7 +1465,7 @@ Public Class MoveRawPartPage
|
||||
' disabilito bottone
|
||||
ModifyBtn.IsEnabled = False
|
||||
' gestione abilitazione altri bottoni
|
||||
EnableButtons()
|
||||
EnableButtons(MachiningList.Count > 0)
|
||||
End Sub
|
||||
|
||||
' verifica se la disposizione indicata è uno scarico sulla tavola ausiliaria
|
||||
@@ -1189,6 +1476,20 @@ Public Class MoveRawPartPage
|
||||
Return bVal
|
||||
End Function
|
||||
|
||||
' restituisce e attiva la successiva disposizione se è uno scarico frontale
|
||||
Public Function NextOperationIsUnloading(nCurrDispId As Integer) As Boolean
|
||||
' recupero la primo operazione successiva
|
||||
Dim nNextIdOperation As Integer = EgtGetNextOperation(nCurrDispId)
|
||||
' a partire da questa cerco la prima disposizione disponibile
|
||||
Dim nNextIdDips As Integer = GetNextDisposition(nNextIdOperation)
|
||||
If nNextIdDips = nNextIdOperation And IsDispUnloadOnAuxTab(nNextIdOperation) Then
|
||||
m_nCurrPhase += 1
|
||||
m_nCurrDisposition = nNextIdOperation
|
||||
Return True
|
||||
End If
|
||||
Return False
|
||||
End Function
|
||||
|
||||
' recupero la prima disposizione disponibile tra l'elenco delle operazioni presenti
|
||||
Public Function GetNextDisposition(nCurrDisposId As Integer) As Integer
|
||||
Dim nDispId As Integer = nCurrDisposId
|
||||
@@ -1201,7 +1502,7 @@ Public Class MoveRawPartPage
|
||||
Return GDB_ID.NULL
|
||||
End Function
|
||||
|
||||
Private Sub EnableButtons()
|
||||
Private Sub EnableButtons(Optional bExistsMachining As Boolean = False)
|
||||
UpBtn.IsEnabled = Not m_SplitPage.m_bShow
|
||||
LeftBtn.IsEnabled = Not m_SplitPage.m_bShow
|
||||
RightBtn.IsEnabled = Not m_SplitPage.m_bShow
|
||||
@@ -1217,19 +1518,39 @@ Public Class MoveRawPartPage
|
||||
BottomRBtn.IsEnabled = Not m_SplitPage.m_bShow
|
||||
PauseBtn.IsEnabled = Not m_SplitPage.m_bShow
|
||||
ResetBtn.IsEnabled = Not m_SplitPage.m_bShow
|
||||
UnloadPartsBtn.IsEnabled = Not m_SplitPage.m_bShow
|
||||
If m_SplitPage.m_bShow Then
|
||||
NextBtn.IsEnabled = (m_nCurrPhase < EgtGetPhaseCount())
|
||||
' se ultima fase (e non sacrico su tavola)
|
||||
If m_nCurrPhase = EgtGetPhaseCount() And m_SplitPage.m_bOnAuxTab Then
|
||||
NextBtn.IsEnabled = (m_nCurrPhase < EgtGetPhaseCount())
|
||||
Else
|
||||
NextBtn.IsEnabled = (m_nCurrPhase <= EgtGetPhaseCount())
|
||||
End If
|
||||
Else
|
||||
NextBtn.IsEnabled = Not m_SplitPage.m_bOnAuxTab
|
||||
' Se esistono delle lavorazioni allora abilito il pulsante per procedere
|
||||
If Not bExistsMachining Then
|
||||
NextBtn.IsEnabled = Not m_SplitPage.m_bOnAuxTab
|
||||
Else
|
||||
NextBtn.IsEnabled = True
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
' esco dalla pagina di scarico
|
||||
Private Sub MoveRawPartPage_Unloaded(sender As Object, e As EventArgs) Handles Me.Unloaded
|
||||
' verifico che la fase corrente non sia vuota
|
||||
Dim nLastDispId As Integer = EgtGetPhaseDisposition(m_nCurrPhase)
|
||||
If EgtIsOperationEmpty(nLastDispId) And m_SplitPage.m_bOnAuxTab And m_RawMoveDataList.Count = 0 Then
|
||||
EgtErase(nLastDispId)
|
||||
End If
|
||||
|
||||
'' se sono in visualizzazione allora non elimino essuna operazione
|
||||
'If Not m_SplitPage.m_bShow Then
|
||||
' If EgtIsOperationEmpty(nLastDispId) And Not m_SplitPage.m_bOnAuxTab And m_RawMoveDataList.Count = 0 Then
|
||||
' EgtErase(nLastDispId)
|
||||
' ElseIf EgtIsOperationEmpty(nLastDispId) And m_SplitPage.m_bOnAuxTab And m_RawMoveDataList.Count = 0 Then
|
||||
' ' Dichiaro pagina non attiva
|
||||
' m_bActive = False
|
||||
' Return
|
||||
' End If
|
||||
'End If
|
||||
|
||||
' Se movimento con ventose
|
||||
If Not m_bByHand Then
|
||||
@@ -1245,8 +1566,9 @@ Public Class MoveRawPartPage
|
||||
SaveMoveInfoInDisposition(nDispId, m_RawMoveDataList)
|
||||
' imposto eventuale presenza rimozioni manuali
|
||||
SaveRemoveByHandInDisposition(nDispId, m_bRemovedRaw)
|
||||
' imposto eventuale movimento pezzi su tavola ausiliaria
|
||||
SaveMovePartsOnAuxTable(nDispId, m_SplitPage.m_bOnAuxTab)
|
||||
' imposto eventuale movimento pezzi su tavola ausiliaria (se è realmente avvenuto)
|
||||
'SaveMovePartsOnAuxTable(nDispId, m_SplitPage.m_bOnAuxTab)
|
||||
SaveMovePartsOnAuxTable(nDispId, m_IsCurrPhaseUnloaded)
|
||||
' Eseguo calcolo speciale dei movimenti
|
||||
SpecialApplyDisposition(nDispId, True, Not m_SplitPage.m_bOnAuxTab)
|
||||
End If
|
||||
@@ -1262,13 +1584,18 @@ Public Class MoveRawPartPage
|
||||
SpecialApplyDisposition(nDispId, True)
|
||||
End If
|
||||
End If
|
||||
|
||||
' Nascondo eventuale tavola ausiliaria
|
||||
If m_SplitPage.m_bOnAuxTab Then
|
||||
EgtDisableModified()
|
||||
EgtSetStatus(m_nAuxTabId, GDB_ST.OFF)
|
||||
EgtEnableModified()
|
||||
EgtZoom(ZM.ALL, False)
|
||||
If Not m_bPrev Then
|
||||
' se sto uscendo dalla pagina delle spezzature
|
||||
If Not m_bPrev And Not m_bToNext Then
|
||||
Dim nDispId As Integer = EgtGetPhaseDisposition(m_nCurrPhase)
|
||||
' se sto uscendo dalla pagina split (senza passare dal comando next)
|
||||
Dim lclLstUnlPart As New List(Of Integer)
|
||||
SaveMovePartsOnAuxTable(nDispId, PartOnAuxTab(lclLstUnlPart, m_nCurrPhase))
|
||||
' Cancello eventuale manipolatore pezzi
|
||||
EgtDisableModified()
|
||||
RemoveVacuumCups()
|
||||
@@ -1285,10 +1612,30 @@ Public Class MoveRawPartPage
|
||||
m_bPrev = False
|
||||
m_SplitPage.m_bShow = True
|
||||
End If
|
||||
|
||||
Dim Ph As Integer = EgtGetCurrPhase()
|
||||
' aggiorno il disegno
|
||||
EgtZoom(ZM.ALL, False)
|
||||
' Dichiaro pagina non attiva
|
||||
m_bActive = False
|
||||
End Sub
|
||||
|
||||
' ----------------- TEST funzione per debug operazioni -----------------
|
||||
Private Sub SaveMyFileTest(sFilename As String)
|
||||
LoadCurrPhaseMachining()
|
||||
' salvo il file corrente per poterlo studiare e capire cosa è successo nella rappresentazione dei grezzi
|
||||
EgtSaveFile("C:\EgtData\OmagCUT\MyProjects\" & sFilename & ".nge", NGE.BIN)
|
||||
End Sub
|
||||
|
||||
Private Sub LoadCurrPhaseMachining()
|
||||
Dim m_MachiningList As New List(Of SplitMach)
|
||||
'm_SplitPage.ShowMachiningList()
|
||||
'm_SplitPage.SaveOrderMachinig(m_nCurrPhase)
|
||||
' Preparo la lista delle lavorazioni
|
||||
CalculateSplitMachList(m_nCurrPhase, m_MachiningList)
|
||||
Dim b As Boolean = False
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
|
||||
|
||||
+44
-17
@@ -8,11 +8,11 @@
|
||||
d:DesignHeight="853.3" d:DesignWidth="1280" Initialized="NestPage_Initialized" Loaded="NestPage_Loaded" Unloaded="NestPage_Unloaded">
|
||||
|
||||
<!-- Definizione della NestPage -->
|
||||
<Grid Name="NestPageGrid" >
|
||||
<Grid Name="NestPageGrid">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="3*"/>
|
||||
<ColumnDefinition Width="12*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="8*"/>
|
||||
@@ -78,7 +78,7 @@
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<EgtWPFLib:EgtTextBox Name="RotationAngleTxBx" Width="50"
|
||||
<EgtWPFLib:EgtTextBox Name="RotationAngleTxBx" Width="50" IsLength="False"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
<TextBlock Grid.Column="1" FontSize="30" Margin="2,-5,0,0"
|
||||
Text="°"/>
|
||||
@@ -100,7 +100,32 @@
|
||||
VerticalAlignment="Center" />
|
||||
</Button>
|
||||
|
||||
<UniformGrid Name ="UG0" Grid.Column="0" Grid.Row="5" Grid.ColumnSpan="3" Columns="3" >
|
||||
<!--Comandi attivi solo in madalità REG-->
|
||||
<UniformGrid Name ="UG0_Reg" Grid.Column="0" Grid.Row="6" Grid.ColumnSpan="3" Columns="3" Visibility="Hidden">
|
||||
<ToggleButton Name="AddPointRegBtn" Visibility="Hidden"
|
||||
Style="{DynamicResource OmagCut_YellowIconToggleButton}">
|
||||
<Image Source="{DynamicResource RefTabImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||
</ToggleButton>
|
||||
<ToggleButton Name="ModPointRegBtn" Style="{DynamicResource OmagCut_YellowIconToggleButton}">
|
||||
<Image Source="{DynamicResource Move-Spot-RegImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||
</ToggleButton>
|
||||
<ToggleButton Name="RemovePointRegBtn" Visibility="Hidden"
|
||||
Style="{DynamicResource OmagCut_YellowIconToggleButton}">
|
||||
<Image Source="{DynamicResource RefTabImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||
</ToggleButton>
|
||||
</UniformGrid>
|
||||
|
||||
<!--Comandi attivi solo in madalità REG-->
|
||||
<UniformGrid Name ="UG1_Reg" Grid.Column="0" Grid.Row="5" Grid.ColumnSpan="3" Columns="2" Visibility="Hidden">
|
||||
<Button Name="AdjustPointRegBtn" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource Muovi-grezzoImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||
</Button>
|
||||
<ToggleButton Name="ActivatePointRegBtn" Style="{DynamicResource OmagCut_YellowIconToggleButton}">
|
||||
<Image Source="{DynamicResource ON_OFF-REGImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||
</ToggleButton>
|
||||
</UniformGrid>
|
||||
|
||||
<UniformGrid Name ="UG0" Grid.Column="0" Grid.Row="5" Grid.ColumnSpan="3" Columns="3">
|
||||
<Button Name="InsertPartBtn" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource Inserisci-pezzoImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||
</Button>
|
||||
@@ -124,29 +149,31 @@
|
||||
</ToggleButton>
|
||||
</UniformGrid>
|
||||
|
||||
<UniformGrid Grid.Column="0" Grid.Row="7" Grid.ColumnSpan="3" Columns="2" >
|
||||
<UniformGrid Name ="UG2" Grid.Column="0" Grid.Row="7" Grid.ColumnSpan="3" Columns="3" >
|
||||
<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>
|
||||
<ToggleButton Name="ParkIndBtn" Style="{DynamicResource OmagCut_YellowIconToggleButton}">
|
||||
<Image Name="ParkIndImg" Source="{DynamicResource ParkingImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||
</ToggleButton>
|
||||
</UniformGrid>
|
||||
|
||||
</Grid>
|
||||
|
||||
<!--LowerButtonGrid-->
|
||||
<Grid Grid.Column="2" Grid.Row="2">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="5*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="4*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid Grid.Column="2" Grid.Row="2">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="5*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="4*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
</Grid>
|
||||
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
||||
</UserControl>
|
||||
|
||||
+1204
-126
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,97 @@
|
||||
<UserControl x:Class="SelParkIndWD"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
|
||||
FontFamily="{DynamicResource OmagCut_Font}"
|
||||
Background="Transparent">
|
||||
|
||||
<Border Style="{DynamicResource OmagCut_Border}">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="0.1*"/>
|
||||
<ColumnDefinition Width="10*"/>
|
||||
<ColumnDefinition Width="0.1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="0.0*"/>
|
||||
<RowDefinition Height="0.1*"/>
|
||||
<RowDefinition Height="10*"/>
|
||||
<RowDefinition Height="0.1*"/>
|
||||
<RowDefinition Height="0.0*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<TextBlock Name="FilePathTxBl" Grid.Column="1" Grid.Row="1" Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
|
||||
Visibility="Collapsed"/>
|
||||
<!--TextAlignment="Center"
|
||||
FontSize="20"
|
||||
VerticalAlignment="Center"-->
|
||||
<ListBox Name="ParkIndListBox" Grid.Column="1" Grid.Row="2"
|
||||
ItemsSource="{Binding ItemList}" ScrollViewer.CanContentScroll="False" ScrollViewer.HorizontalScrollBarVisibility="Hidden">
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<StackPanel Orientation="Vertical" >
|
||||
<UniformGrid Columns="2" Visibility="{Binding TitleVisibility}">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<Image Source="{Binding ImgTab}" Height="20" Stretch="Uniform"/>
|
||||
<TextBlock Text="{Binding CountInTab}" Height="20" Width="30">
|
||||
<TextBlock.Style>
|
||||
<Style TargetType="TextBlock" BasedOn="{StaticResource OmagCut_ListBoxTextBlock}">
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding IsStatusON}" Value="False">
|
||||
<Setter Property="FontStyle" Value="Oblique"/>
|
||||
<Setter Property="Foreground" Value="{StaticResource OmagCut_White}"/>
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding IsStatusON}" Value="True">
|
||||
<Setter Property="Foreground" Value="black"/>
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</TextBlock.Style>
|
||||
</TextBlock>
|
||||
</StackPanel>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<Image Source="{Binding ImgPark}" Height="20" Stretch="Uniform"/>
|
||||
<TextBlock Text="{Binding CountInPark}" Height="20" Width="30">
|
||||
<TextBlock.Style>
|
||||
<Style TargetType="TextBlock" BasedOn="{StaticResource OmagCut_ListBoxTextBlock}">
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding IsStatusON}" Value="False">
|
||||
<Setter Property="FontStyle" Value="Oblique"/>
|
||||
<Setter Property="Foreground" Value="{StaticResource OmagCut_White}"/>
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding IsStatusON}" Value="True">
|
||||
<Setter Property="Foreground" Value="black"/>
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</TextBlock.Style>
|
||||
</TextBlock>
|
||||
</StackPanel>
|
||||
</UniformGrid>
|
||||
<Image Source="{Binding Img}" Width="120" Stretch="Uniform" Visibility="{Binding MyVisibilityImg}"/>
|
||||
<Viewbox Name="ViewBoxPark" Visibility="{Binding MyVisibilitySvg}">
|
||||
<ContentPresenter Content="{Binding LocalMyCanvas.CurrCanvas}"/>
|
||||
</Viewbox>
|
||||
</StackPanel>
|
||||
</DataTemplate>
|
||||
</ListBox.ItemTemplate>
|
||||
</ListBox>
|
||||
|
||||
<Grid Grid.Column="1" Grid.Row="4" Visibility="Collapsed">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Button Name="OkBtn" Grid.Column="1" Style="{DynamicResource OmagCut_GradientBlueIconButton}" >
|
||||
<Image Source="{DynamicResource VImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
|
||||
|
||||
</Grid>
|
||||
|
||||
</Grid>
|
||||
|
||||
</Border>
|
||||
</UserControl>
|
||||
@@ -0,0 +1,929 @@
|
||||
Imports System.ComponentModel
|
||||
Imports System.Globalization
|
||||
Imports System.Windows.Ink
|
||||
Imports System.Xml
|
||||
Imports EgtUILib
|
||||
Imports OmagCUT.NestPageUC
|
||||
|
||||
Public Class SelParkIndWD
|
||||
|
||||
Private Shared m_MainWindow As MainWindow = DirectCast(Application.Current.MainWindow, MainWindow)
|
||||
Private m_nCtx As Integer = -1
|
||||
Public Const nIndAllOff As Integer = 999
|
||||
|
||||
Public Shared sActualProj As String = String.Empty
|
||||
|
||||
Private m_ParkIndList As New List(Of ParkInd)
|
||||
Public Property ParkIndList As List(Of ParkInd)
|
||||
Get
|
||||
Return m_ParkIndList
|
||||
End Get
|
||||
Set(value As List(Of ParkInd))
|
||||
m_ParkIndList = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Sub New(Owner As Window, Optional nCtx As Integer = -1)
|
||||
'Me.Owner = Owner
|
||||
InitializeComponent()
|
||||
If nCtx > -1 Then m_nCtx = nCtx
|
||||
End Sub
|
||||
|
||||
Public Sub Me_Laoded() Handles Me.Loaded
|
||||
' Aggiorno la lista
|
||||
UpdateList()
|
||||
' Imposto la selezione del primo parcheggio disponibile
|
||||
UpdateDefaultSelection()
|
||||
End Sub
|
||||
|
||||
Public Sub UpdateList()
|
||||
' Carico lista dei pezzi
|
||||
LoadParkInd(m_ParkIndList, m_nCtx)
|
||||
ParkIndListBox.ItemsSource = m_ParkIndList
|
||||
UpdateDefaultSelection()
|
||||
' Forzo l'aggiornamento della grafica
|
||||
ParkIndListBox.Items.Refresh()
|
||||
End Sub
|
||||
|
||||
Public Sub UpdateDefaultSelection()
|
||||
' Procedo a selezionare il primo (E FORSE ANCHE L'UNICO?) parcheggio attivo
|
||||
Dim bFound As Boolean = False
|
||||
For Each ItemPark As ParkInd In m_ParkIndList
|
||||
If ItemPark.IsStatusON Then
|
||||
ParkIndListBox.SelectedItem = ItemPark
|
||||
bFound = True
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
If Not bFound And m_ParkIndList.Count > 0 Then
|
||||
m_ParkIndList(0).Status = GDB_ST.ON_
|
||||
ParkIndListBox.SelectedItem = m_ParkIndList(0)
|
||||
End If
|
||||
'' Provedo a spegnere tutti gli altri parcheggi
|
||||
'For Each ItemParkInd As ParkInd In m_ParkIndList
|
||||
' If ParkIndListBox.SelectedItem.Ind <> ItemParkInd.Ind Then
|
||||
' ItemParkInd.Status = GDB_ST.OFF
|
||||
' SetStatusPartInParkInd(ItemParkInd)
|
||||
' End If
|
||||
'Next
|
||||
End Sub
|
||||
|
||||
Private Sub ParkIndListBox_SelectionChanged() Handles ParkIndListBox.MouseLeftButtonUp
|
||||
' Non so se il click sta accendeno o spegnendo quinid faccio una verifica dello stato attuale del parcheggio
|
||||
Dim localParkInd As ParkInd = ParkIndListBox.SelectedItem
|
||||
' Se l'elemento selezionato è attivo allora esco (perchè altrimenti lo spegnerei)
|
||||
If localParkInd.IsStatusON Then Return
|
||||
Dim bFound As Boolean = False
|
||||
If localParkInd.Ind = nIndAllOff Then
|
||||
localParkInd.Status = GDB_ST.ON_
|
||||
bFound = True
|
||||
End If
|
||||
Dim nPartId As Integer = EgtGetFirstPart()
|
||||
' Cerco il primo pezzo del parcheggio indicato
|
||||
While nPartId <> GDB_ID.NULL And Not bFound
|
||||
Dim sInfoParkInd As String = String.Empty
|
||||
' Se i pezzi non hanno un indice di parcheggio di default vale "0"
|
||||
If Not EgtGetInfo(nPartId, INFO_PARKIND, sInfoParkInd) Then sInfoParkInd = "0"
|
||||
If localParkInd.Ind.ToString = sInfoParkInd Then
|
||||
' Determino lo stato da assegnare al parcheggio (prendo il primo pezzo del parcheggio come riferimento)
|
||||
Dim OppositStat As Integer = If(localParkInd.Status = GDB_ST.ON_, GDB_ST.OFF, GDB_ST.ON_)
|
||||
localParkInd.Status = OppositStat
|
||||
bFound = True
|
||||
' termino la ricerca
|
||||
Exit While
|
||||
End If
|
||||
nPartId = EgtGetNextPart(nPartId)
|
||||
End While
|
||||
' Assegno lo stato del parcheggio a tutti i pezzi i parcheggio
|
||||
If bFound Then
|
||||
SetStatusPartInParkInd(localParkInd, True, m_nCtx)
|
||||
Else
|
||||
' Significa che i pezzi sono tutti in macchina: quindi i pezzi sono (SICURAMENTE?) accesi
|
||||
Dim OppositStat As Integer = If(localParkInd.Status = GDB_ST.ON_, GDB_ST.OFF, GDB_ST.ON_)
|
||||
localParkInd.Status = OppositStat
|
||||
SetStatusPartInParkInd(localParkInd, True, m_nCtx)
|
||||
End If
|
||||
' Se accendo un parcheggio procedo a spegnere tutto gli atri
|
||||
If localParkInd.Status = GDB_ST.ON_ Then
|
||||
For Each ItemParkInd As ParkInd In m_ParkIndList
|
||||
If localParkInd.Ind <> ItemParkInd.Ind Then
|
||||
ItemParkInd.Status = GDB_ST.OFF
|
||||
SetStatusPartInParkInd(ItemParkInd, True, m_nCtx)
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
EgtZoom(ZM.ALL)
|
||||
End Sub
|
||||
|
||||
#Region "METODI SHARED per gestione della lista parcheggi"
|
||||
|
||||
' Restituisce il primo indice di parcheggio libero
|
||||
Public Shared Function NewParkInd(Optional nCtx As Integer = -1) As Integer
|
||||
' recupero il contesto corrente
|
||||
Dim CurrCtx As Integer = EgtGetCurrentContext()
|
||||
' recupero il contesto del progetto
|
||||
Dim ProjCtx As Integer = m_MainWindow.m_CurrentProjectPageUC.CurrentProjectScene.GetCtx()
|
||||
If nCtx > -1 Then ProjCtx = nCtx
|
||||
EgtSetCurrentContext(ProjCtx)
|
||||
Dim LastParkInd As Integer = 0
|
||||
Dim nRawId As Integer = GetCurrentRaw()
|
||||
' Leggo l'indice di parcheggio dei pezzi in tavola
|
||||
Dim nPartId As Integer = EgtGetFirstGroupInGroup(nRawId)
|
||||
While nPartId <> GDB_ID.NULL
|
||||
' Se i pezzi non hanno un indice di parcheggio
|
||||
Dim sInfoParkInd As String = String.Empty
|
||||
If EgtGetInfo(nPartId, INFO_PARKIND, sInfoParkInd) Then
|
||||
If IsNumeric(sInfoParkInd) Then
|
||||
Dim nInfoParkIndn As Integer = CInt(sInfoParkInd)
|
||||
LastParkInd = Math.Max(LastParkInd, nInfoParkIndn)
|
||||
End If
|
||||
End If
|
||||
nPartId = EgtGetNextGroup(nPartId)
|
||||
End While
|
||||
' Leggo l'indice di parcheggio dei pezzi in parcheggio
|
||||
nPartId = EgtGetFirstPart()
|
||||
While nPartId <> GDB_ID.NULL
|
||||
' Se i pezzi non hanno un indice di parcheggio (COPIA della funzione sopra)
|
||||
Dim sInfoParkInd As String = String.Empty
|
||||
If EgtGetInfo(nPartId, INFO_PARKIND, sInfoParkInd) Then
|
||||
If IsNumeric(sInfoParkInd) Then
|
||||
Dim nInfoParkIndn As Integer = CInt(sInfoParkInd)
|
||||
LastParkInd = Math.Max(LastParkInd, nInfoParkIndn)
|
||||
End If
|
||||
End If
|
||||
nPartId = EgtGetNextPart(nPartId)
|
||||
End While
|
||||
' Ripristino il contesto corrente
|
||||
EgtSetCurrentContext(CurrCtx)
|
||||
Return LastParkInd + 1
|
||||
End Function
|
||||
|
||||
' Gestisce lo stato dei pezzi associati al parcheggio indicato
|
||||
Public Shared Sub SetStatusPartInParkInd(localParkInd As ParkInd, Optional bDraw As Boolean = True, Optional nCtx As Integer = -1)
|
||||
If IsNothing(localParkInd) Then Return
|
||||
' recupero il contesto corrente
|
||||
Dim CurrCtx As Integer = EgtGetCurrentContext()
|
||||
' recupero il contesto del progetto
|
||||
Dim ProjCtx As Integer = m_MainWindow.m_CurrentProjectPageUC.CurrentProjectScene.GetCtx()
|
||||
If nCtx > -1 Then ProjCtx = nCtx
|
||||
EgtSetCurrentContext(ProjCtx)
|
||||
Dim nRawId As Integer = GetCurrentRaw()
|
||||
' Pezzi in tavola
|
||||
Dim nPartId As Integer = EgtGetFirstGroupInGroup(nRawId)
|
||||
While nPartId <> GDB_ID.NULL
|
||||
Dim sInfoParkInd As String = String.Empty
|
||||
If Not EgtGetInfo(nPartId, INFO_PARKIND, sInfoParkInd) Then sInfoParkInd = "0"
|
||||
If localParkInd.Ind.ToString = sInfoParkInd Then
|
||||
' Salvo lo stato del parcheggio (per gestire la navigazione) ANCHE SE I PEZZI SONO ACCESI
|
||||
EgtSetInfo(nPartId, INFO_PARKSTATUS, localParkInd.Status)
|
||||
End If
|
||||
nPartId = EgtGetNextGroup(nPartId)
|
||||
End While
|
||||
' Pezzi in parcheggio
|
||||
nPartId = EgtGetFirstPart()
|
||||
While nPartId <> GDB_ID.NULL
|
||||
Dim sInfoParkInd As String = String.Empty
|
||||
If Not EgtGetInfo(nPartId, INFO_PARKIND, sInfoParkInd) Then sInfoParkInd = "0"
|
||||
If localParkInd.Ind.ToString = sInfoParkInd Then
|
||||
' Setto lo stato
|
||||
EgtSetStatus(nPartId, localParkInd.Status)
|
||||
' Salvo lo stato (per gestire la navigazione)
|
||||
EgtSetInfo(nPartId, INFO_PARKSTATUS, localParkInd.Status)
|
||||
End If
|
||||
nPartId = EgtGetNextPart(nPartId)
|
||||
End While
|
||||
If bDraw Then EgtDraw()
|
||||
' Ripristino il contesto corrente
|
||||
EgtSetCurrentContext(CurrCtx)
|
||||
End Sub
|
||||
|
||||
' Restituuisce la lista dei parcheggi del progetto corrente
|
||||
Public Shared Sub LoadParkInd(P_List As List(Of ParkInd), Optional nCtx As Integer = -1)
|
||||
If IsNothing(P_List) Then Return
|
||||
P_List.Clear()
|
||||
P_List.Add(New ParkInd(nIndAllOff, "All off", 0))
|
||||
' recupero il contesto corrente
|
||||
Dim CurrCtx As Integer = EgtGetCurrentContext()
|
||||
' recupero il contesto del progetto
|
||||
Dim ProjCtx As Integer = m_MainWindow.m_CurrentProjectPageUC.CurrentProjectScene.GetCtx()
|
||||
If nCtx > -1 Then ProjCtx = nCtx
|
||||
EgtSetCurrentContext(ProjCtx)
|
||||
Dim nRawId As Integer = GetCurrentRaw()
|
||||
' Pezzi in tavola
|
||||
Dim nPartId As Integer = EgtGetFirstGroupInGroup(nRawId)
|
||||
While nPartId <> GDB_ID.NULL
|
||||
Dim sInfoParkInd As String = String.Empty
|
||||
Dim nInfoParkInd As Integer = -1
|
||||
' Recupero l'indice del parcheggio
|
||||
If EgtGetInfo(nPartId, INFO_PARKIND, sInfoParkInd) Then
|
||||
nInfoParkInd = If(IsNumeric(sInfoParkInd), CInt(sInfoParkInd), -1)
|
||||
Else
|
||||
nInfoParkInd = 0
|
||||
End If
|
||||
' Se l'indice di parcheggio restituito è valido (Maggiore di -1)
|
||||
If nInfoParkInd > -1 Then
|
||||
' Verifico se nella lista dei parcheggi è già presente l'indice indicato
|
||||
Dim localParkInd As ParkInd = P_List.Find(Function(x) x.Ind = nInfoParkInd)
|
||||
' Se non trovo nessun parcheggio con questo indice allora lo aggiungo
|
||||
If IsNothing(localParkInd) Then
|
||||
Dim nStatus As Integer
|
||||
If Not EgtGetInfo(nPartId, INFO_PARKSTATUS, nStatus) Then nStatus = GDB_ST.ON_
|
||||
' EgtGetStatus(nPartId, nStatus)
|
||||
P_List.Add(New ParkInd(nInfoParkInd, "Park_" & nInfoParkInd.ToString, nStatus))
|
||||
End If
|
||||
End If
|
||||
nPartId = EgtGetNextGroup(nPartId)
|
||||
End While
|
||||
' Pezzi in parcheggio
|
||||
nPartId = EgtGetFirstPart()
|
||||
While nPartId <> GDB_ID.NULL
|
||||
Dim sInfoParkInd As String = String.Empty
|
||||
Dim nInfoParkInd As Integer = -1
|
||||
' Recupero l'indice del parcheggio
|
||||
If EgtGetInfo(nPartId, INFO_PARKIND, sInfoParkInd) Then
|
||||
nInfoParkInd = If(IsNumeric(sInfoParkInd), CInt(sInfoParkInd), -1)
|
||||
Else
|
||||
nInfoParkInd = 0
|
||||
End If
|
||||
' Se l'indice di parcheggio restituito è valido (Maggiore di -1)
|
||||
If nInfoParkInd > -1 Then
|
||||
' Verifico se nella lista dei parcheggi è già presente l'indice indicato
|
||||
Dim localParkInd As ParkInd = P_List.Find(Function(x) x.Ind = nInfoParkInd)
|
||||
' Se non trovo nessun parcheggio con questo indice allora lo aggiungo
|
||||
If IsNothing(localParkInd) Then
|
||||
Dim nStatus As Integer
|
||||
If Not EgtGetInfo(nPartId, INFO_PARKSTATUS, nStatus) Then nStatus = GDB_ST.ON_
|
||||
' EgtGetStatus(nPartId, nStatus)
|
||||
P_List.Add(New ParkInd(nInfoParkInd, "Park_" & nInfoParkInd.ToString, nStatus))
|
||||
End If
|
||||
End If
|
||||
nPartId = EgtGetNextPart(nPartId)
|
||||
End While
|
||||
EgtSetCurrentContext(CurrCtx)
|
||||
End Sub
|
||||
|
||||
' Aggiorna la lista dei parcheggi, se "bDraw=true" aggiorno la scena
|
||||
Public Shared Sub UpdateViewOnParkInd(Optional bDraw As Boolean = True)
|
||||
' Ricarico la lista dei parcheggi
|
||||
Dim ListParkInd As New List(Of ParkInd)
|
||||
SelParkIndWD.LoadParkInd(ListParkInd)
|
||||
' Aggiorna la vista dei parcheggi
|
||||
For Each Item As ParkInd In ListParkInd
|
||||
SelParkIndWD.SetStatusPartInParkInd(Item, bDraw)
|
||||
Next
|
||||
End Sub
|
||||
|
||||
' Restituisce il primo parcheggio attivo
|
||||
Public Shared Function GetCurrentParkIndSelected() As ParkInd
|
||||
Dim ListParkInd As New List(Of ParkInd)
|
||||
SelParkIndWD.LoadParkInd(ListParkInd)
|
||||
' Procedo a selezionare il primo (E ANCHE UNICO?..a volte no..) parcheggio attivo -> guarda funzione UpdateList <-
|
||||
For Each ItemPark As ParkInd In ListParkInd
|
||||
If ItemPark.IsStatusON Then
|
||||
Return ItemPark
|
||||
End If
|
||||
Next
|
||||
Return Nothing
|
||||
End Function
|
||||
|
||||
' Restitusice il nome del file immagine del parcheggio (manca solo dell'Indice di parcheggio e dell'esetensione png)
|
||||
Public Shared Function GetPathCurrProj() As String
|
||||
Dim nProj As Integer = m_MainWindow.m_CurrentProjectPageUC.GetCurrentProject()
|
||||
Dim sParkPath As String = m_MainWindow.GetSaveDir() & "\" & Math.Abs(nProj).ToString("D4") & "_ParkInd_"
|
||||
If Not String.IsNullOrEmpty(sActualProj) Then
|
||||
Dim sDir As String = System.IO.Path.GetDirectoryName(sActualProj)
|
||||
Dim sFile As String = System.IO.Path.GetFileNameWithoutExtension(sActualProj)
|
||||
sParkPath = sDir & "\" & sFile & "_ParkInd_"
|
||||
End If
|
||||
Return sParkPath
|
||||
End Function
|
||||
|
||||
' Dato il nome del progetto crea le immagini dei parcheggi
|
||||
Public Shared Sub CopyImgSvg(sNewFileName As String, refListParkInd As List(Of ParkInd), Optional nCtx As Integer = -1)
|
||||
If sNewFileName.EndsWith(".nge") Then
|
||||
sNewFileName = sNewFileName.Remove(sNewFileName.Length - 4, 4) & "_ParkInd_"
|
||||
End If
|
||||
Dim Extension As String = ".svg"
|
||||
If Not MainWindow.m_bShowSVGParkInd Then Extension = ".png"
|
||||
Dim ListParkInd As New List(Of ParkInd)
|
||||
If Not IsNothing(refListParkInd) Then
|
||||
ListParkInd = refListParkInd
|
||||
Else
|
||||
' ricarico la lista
|
||||
SelParkIndWD.LoadParkInd(ListParkInd, nCtx)
|
||||
End If
|
||||
'SelParkIndWD.sActualProj = Path.GetFileNameWithoutExtension(sPath)
|
||||
For Each ItemParkInd As ParkInd In ListParkInd
|
||||
If ItemParkInd.Ind <> 0 And ItemParkInd.Ind <> 999 And ItemParkInd.nPartInPark > 0 Then
|
||||
Try
|
||||
Dim sNewFile As String = sNewFileName & ItemParkInd.Ind.ToString & Extension
|
||||
If MainWindow.m_bShowSVGParkInd Then
|
||||
WriteMyXML(sNewFile, ItemParkInd.LocalMyCanvas)
|
||||
Else
|
||||
If System.IO.File.Exists(sNewFile) Then
|
||||
System.IO.File.Delete(sNewFile)
|
||||
End If
|
||||
System.IO.File.Copy(If(Extension = ".svg", ItemParkInd.Svg, ItemParkInd.Img), sNewFile)
|
||||
End If
|
||||
Catch ex As Exception
|
||||
EgtOutLog("Copia immagine " & If(Extension = ".svg", ItemParkInd.Svg, ItemParkInd.Img) & " di ParkInd non roiscita")
|
||||
End Try
|
||||
End If
|
||||
Next
|
||||
End Sub
|
||||
|
||||
#End Region ' Metodi Shared
|
||||
|
||||
End Class
|
||||
|
||||
Public Class ParkInd
|
||||
Implements INotifyPropertyChanged
|
||||
|
||||
Private m_VisbilityAllOff As Visibility = Visibility.Hidden
|
||||
|
||||
Private m_Ind As Integer
|
||||
Public Property Ind As Integer
|
||||
Get
|
||||
Return m_Ind
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
m_Ind = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_Name As String
|
||||
Public Property Name As String
|
||||
Get
|
||||
Return m_Name
|
||||
End Get
|
||||
Set(value As String)
|
||||
m_Name = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_Img As String = String.Empty
|
||||
Public Property Img As String
|
||||
Get
|
||||
Return m_Img
|
||||
End Get
|
||||
Set(value As String)
|
||||
m_Img = value
|
||||
NotifyPropertyChanged("MyVisibilityImg")
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_Svg As String = String.Empty
|
||||
Public Property Svg As String
|
||||
Get
|
||||
Return m_Svg
|
||||
End Get
|
||||
Set(value As String)
|
||||
m_Svg = value
|
||||
NotifyPropertyChanged("MyVisibilitySvg")
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_nPartInTable As Integer = 0
|
||||
Public Property nPartInTable As Integer
|
||||
Get
|
||||
Return m_nPartInTable
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
m_nPartInTable = value
|
||||
NotifyPropertyChanged(NameOf(nPartInTable))
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_nPartInPark As Integer = GDB_ST.ON_
|
||||
Public Property nPartInPark As Integer
|
||||
Get
|
||||
Return m_nPartInPark
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
m_nPartInPark = value
|
||||
NotifyPropertyChanged(NameOf(nPartInPark))
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property CountInTab As String
|
||||
Get
|
||||
Return m_nPartInTable.ToString
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property ImgTab As String
|
||||
Get
|
||||
Return DirectCast(Application.Current.MainWindow, MainWindow).GetResourcesDir() & "\MachineButtonsImage\NewIcons\table.png"
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property CountInPark As String
|
||||
Get
|
||||
Return m_nPartInPark.ToString
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property ImgPark As String
|
||||
Get
|
||||
Return DirectCast(Application.Current.MainWindow, MainWindow).GetResourcesDir() & "\MachineButtonsImage\NewIcons\Park.png"
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_Status As Integer
|
||||
|
||||
Public Property Status As Integer
|
||||
Get
|
||||
Return m_Status
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
m_Status = value
|
||||
NotifyPropertyChanged(NameOf(IsStatusON))
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property IsStatusON As Boolean
|
||||
Get
|
||||
Return (m_Status = GDB_ST.ON_)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property MyVisibilityTmg As Visibility
|
||||
Get
|
||||
Return If(Not System.IO.File.Exists(m_Img), Visibility.Collapsed, Visibility.Visible)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property MyVisibilitySvg As Visibility
|
||||
Get
|
||||
Return If(Not System.IO.File.Exists(m_Svg), Visibility.Collapsed, Visibility.Visible)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property TitleVisibility As Visibility
|
||||
Get
|
||||
Return If(m_Ind = 999, m_VisbilityAllOff, Visibility.Visible)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_LocalMyCanvas As MyCanvas
|
||||
Public ReadOnly Property LocalMyCanvas As MyCanvas
|
||||
Get
|
||||
Return m_LocalMyCanvas
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Sub New(Ind As Integer, Name As String, Stat As Integer)
|
||||
m_Ind = Ind
|
||||
m_Name = Name
|
||||
m_Status = Stat
|
||||
' Costruisco il percorso immagine
|
||||
If m_Ind = 0 Then
|
||||
' Se Ind=0 allora applico il default: C:\EgtData\OmagCUT\Resources\MachineButtonsImage\NewIcons
|
||||
m_Img = DirectCast(Application.Current.MainWindow, MainWindow).GetResourcesDir() & "\MachineButtonsImage\NewIcons\Park_On.png"
|
||||
m_Svg = DirectCast(Application.Current.MainWindow, MainWindow).GetResourcesDir() & "\MachineButtonsImage\NewIcons\Park_On.svg"
|
||||
ElseIf m_Ind = 999 Then
|
||||
' Se Ind=0 allora applico il default: C:\EgtData\OmagCUT\Resources\MachineButtonsImage\NewIcons
|
||||
m_Img = DirectCast(Application.Current.MainWindow, MainWindow).GetResourcesDir() & "\MachineButtonsImage\NewIcons\Park_Off.png"
|
||||
m_Svg = DirectCast(Application.Current.MainWindow, MainWindow).GetResourcesDir() & "\MachineButtonsImage\NewIcons\Park_Off.svg"
|
||||
Else
|
||||
m_Img = SelParkIndWD.GetPathCurrProj() & m_Ind.ToString & ".png"
|
||||
m_Svg = SelParkIndWD.GetPathCurrProj() & m_Ind.ToString & ".svg"
|
||||
End If
|
||||
|
||||
If MainWindow.m_bShowSVGParkInd Then
|
||||
Dim CanvWidth As Integer = 145
|
||||
Dim CanvHeight As Integer = CInt(CanvWidth / 1.4)
|
||||
m_LocalMyCanvas = New MyCanvas(CanvWidth, CanvHeight)
|
||||
If System.IO.File.Exists(m_Svg) Then
|
||||
ReadMyXML(m_Svg, m_LocalMyCanvas)
|
||||
m_Img = ""
|
||||
End If
|
||||
Else
|
||||
m_Svg = ""
|
||||
End If
|
||||
|
||||
' Conto il numero di pezzi in Tavola
|
||||
CountPartInTable()
|
||||
' Conto il numero di pezzi in parcheggio
|
||||
CountPartInPark()
|
||||
|
||||
End Sub
|
||||
|
||||
' Conta in numero di pezzi di questo parcheggio in Tavola
|
||||
Private Sub CountPartInTable()
|
||||
Dim nCount As Integer = 0
|
||||
Dim nRawId As Integer = GetCurrentRaw()
|
||||
' Leggo l'indice di parcheggio dei pezzi in tavola
|
||||
Dim nPartId As Integer = EgtGetFirstGroupInGroup(nRawId)
|
||||
While nPartId <> GDB_ID.NULL
|
||||
' Aggiorno il valore del contatore
|
||||
If IncreaseCounterPart(nPartId, nCount) Then
|
||||
UpdateEntInCanvas(nPartId, 0.2)
|
||||
End If
|
||||
nPartId = EgtGetNextGroup(nPartId)
|
||||
End While
|
||||
m_nPartInTable = nCount
|
||||
End Sub
|
||||
|
||||
' Conta il numero di pezzi di questo parcheggio in Parcheggio
|
||||
Private Sub CountPartInPark()
|
||||
Dim nCount As Integer = 0
|
||||
Dim nPartId As Integer = EgtGetFirstPart()
|
||||
While nPartId <> GDB_ID.NULL
|
||||
' Aggiorno il valore del contatore
|
||||
If IncreaseCounterPart(nPartId, nCount) Then
|
||||
UpdateEntInCanvas(nPartId, 1)
|
||||
End If
|
||||
nPartId = EgtGetNextPart(nPartId)
|
||||
End While
|
||||
m_nPartInPark = nCount
|
||||
End Sub
|
||||
|
||||
Private Sub UpdateEntInCanvas(nPartId, dOpacity)
|
||||
If Not IsNothing(m_LocalMyCanvas) Then
|
||||
' modifico il colore del pezzo nel SVG
|
||||
Dim nIdRegion As Integer = EgtGetFirstNameInGroup(nPartId, "Region")
|
||||
If nIdRegion <> GDB_ID.NULL Then
|
||||
Dim nIdEnt As Integer = EgtGetFirstInGroup(nIdRegion)
|
||||
While nIdEnt <> GDB_ID.NULL
|
||||
If EgtGetType(nIdEnt) = GDB_TY.SRF_FRGN Then
|
||||
Exit While
|
||||
End If
|
||||
End While
|
||||
If nIdEnt <> GDB_ID.NULL Then
|
||||
Dim sName As String = ""
|
||||
EgtGetName(nIdEnt, sName)
|
||||
Dim Idpath As MyPath = m_LocalMyCanvas.ListPath.Find(Function(x) x.id = sName)
|
||||
If Not IsNothing(Idpath) Then
|
||||
Idpath.fill_opacity = dOpacity
|
||||
m_LocalMyCanvas.UpdateMyPath(Idpath)
|
||||
Idpath.LoadPath()
|
||||
NotifyPropertyChanged(NameOf(LocalMyCanvas))
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
' Verifica se il pezzo passato (da parcheggio o tavola) appartiene al ParkInd corrente e quindi aggiorna il valore di nCount+=1
|
||||
Private Function IncreaseCounterPart(nPartId As Integer, ByRef nCount As Integer) As Boolean
|
||||
Dim bOk As Boolean = False
|
||||
' Se i pezzi non hanno un indice di parcheggio
|
||||
Dim sInfoParkInd As String = String.Empty
|
||||
Dim nInfoParkInd As Integer = -1
|
||||
' Recupero l'indice del parcheggio
|
||||
If EgtGetInfo(nPartId, INFO_PARKIND, sInfoParkInd) Then
|
||||
nInfoParkInd = If(IsNumeric(sInfoParkInd), CInt(sInfoParkInd), -1)
|
||||
Else
|
||||
nInfoParkInd = 0
|
||||
End If
|
||||
' Se l'indice di parcheggio restituito è valido (Maggiore di -1)
|
||||
If nInfoParkInd > -1 Then
|
||||
' e uguale a quallo del parcheggio correntemente selezionato
|
||||
If nInfoParkInd = m_Ind Then
|
||||
nCount = nCount + 1
|
||||
bOk = True
|
||||
End If
|
||||
End If
|
||||
|
||||
Return bOk
|
||||
End Function
|
||||
|
||||
Public Event PropertyChanged As PropertyChangedEventHandler Implements INotifyPropertyChanged.PropertyChanged
|
||||
|
||||
Public Sub NotifyPropertyChanged(propName As String)
|
||||
RaiseEvent PropertyChanged(Me, New PropertyChangedEventArgs(propName))
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
#Region "ELEMENTI PER LA GESTIONE SVG"
|
||||
|
||||
Public Class MyCanvas
|
||||
|
||||
Private m_CurrCanvas As New Canvas
|
||||
Public Property CurrCanvas As Canvas
|
||||
Get
|
||||
Return m_CurrCanvas
|
||||
End Get
|
||||
Set(value As Canvas)
|
||||
m_CurrCanvas = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_ListPath As New List(Of MyPath)
|
||||
Public Property ListPath As List(Of MyPath)
|
||||
Get
|
||||
Return m_ListPath
|
||||
End Get
|
||||
Set(value As List(Of MyPath))
|
||||
m_ListPath = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_ViewBoxDim As String
|
||||
Public Property ViewBoxDim As String
|
||||
Get
|
||||
Return m_ViewBoxDim
|
||||
End Get
|
||||
Set(value As String)
|
||||
m_ViewBoxDim = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Sub New(Width As Integer, Height As Integer)
|
||||
m_CurrCanvas.Width = Width
|
||||
m_CurrCanvas.Height = Height
|
||||
m_CurrCanvas.ClipToBounds = True
|
||||
End Sub
|
||||
|
||||
Public Sub LoadCanvas()
|
||||
For Each ItemPath As MyPath In m_ListPath
|
||||
m_CurrCanvas.Children.Add(ItemPath.CurrPath)
|
||||
Next
|
||||
End Sub
|
||||
|
||||
Public Sub UpdateMyPath(CurrPath As MyPath)
|
||||
m_CurrCanvas.Children.Remove(CurrPath.CurrPath)
|
||||
m_CurrCanvas.Children.Add(CurrPath.CurrPath)
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
Public Class MyPath
|
||||
|
||||
Private m_CurrPath As New System.Windows.Shapes.Path
|
||||
Public Property CurrPath As System.Windows.Shapes.Path
|
||||
Get
|
||||
Return m_CurrPath
|
||||
End Get
|
||||
Set(value As System.Windows.Shapes.Path)
|
||||
m_CurrPath = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_CanvX As Double
|
||||
Public ReadOnly Property CanvX As Double
|
||||
Get
|
||||
Return m_CanvX
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_CanvY As Double
|
||||
Public ReadOnly Property CanvY As Double
|
||||
Get
|
||||
Return m_CanvY
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_DimX As Double
|
||||
Public ReadOnly Property DimX As Double
|
||||
Get
|
||||
Return m_DimX
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_DimY As Double
|
||||
Public ReadOnly Property DimY As Double
|
||||
Get
|
||||
Return m_DimY
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_id As String
|
||||
Public ReadOnly Property id As String
|
||||
Get
|
||||
Return m_id
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_d As String
|
||||
Public ReadOnly Property d As String
|
||||
Get
|
||||
Return m_d
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_fill As String
|
||||
Public Property fill As String
|
||||
Get
|
||||
Return m_fill
|
||||
End Get
|
||||
Set(value As String)
|
||||
m_fill = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_fill_opacity As Double
|
||||
Public Property fill_opacity As Double
|
||||
Get
|
||||
Return m_fill_opacity
|
||||
End Get
|
||||
Set(value As Double)
|
||||
m_fill_opacity = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_stroke As String
|
||||
Public Property stroke As String
|
||||
Get
|
||||
Return m_stroke
|
||||
End Get
|
||||
Set(value As String)
|
||||
m_stroke = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_stroke_opacity As Double
|
||||
Public Property stroke_opacity As Double
|
||||
Get
|
||||
Return m_stroke_opacity
|
||||
End Get
|
||||
Set(value As Double)
|
||||
m_stroke_opacity = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_stroke_width As Double
|
||||
Public Property stroke_width As Double
|
||||
Get
|
||||
Return m_stroke_width
|
||||
End Get
|
||||
Set(value As Double)
|
||||
m_stroke_width = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Sub New(Id As String, D As String, CanvX As Double, CanvY As Double, DimX As Double, DimY As Double, Fill As String, FillOpacity As Double, Stroke As String, StrokeOpacity As Double)
|
||||
m_id = Id
|
||||
m_d = D
|
||||
m_CanvX = CanvX
|
||||
m_CanvY = CanvY
|
||||
m_DimX = DimX
|
||||
m_DimY = DimY
|
||||
m_fill = Fill
|
||||
m_fill_opacity = FillOpacity
|
||||
m_stroke = Stroke
|
||||
m_stroke_opacity = StrokeOpacity
|
||||
LoadPath()
|
||||
End Sub
|
||||
|
||||
Public Sub LoadPath()
|
||||
' Carico la geometria
|
||||
m_CurrPath.Data = Geometry.Parse(d)
|
||||
' Carico il colore di sfondo
|
||||
SetBrushFromRGBString(m_fill, m_CurrPath.Fill)
|
||||
' Applico l'opacità della superificie
|
||||
m_CurrPath.Opacity = m_fill_opacity
|
||||
' Calcolo e applico la traslazione e la scalatura
|
||||
Dim myTransformGroup As New TransformGroup()
|
||||
Dim ScaleX As Double = m_CanvX / DimX
|
||||
Dim ScaleY As Double = m_CanvY / DimY
|
||||
Dim OffX As Double = (m_CanvX - Math.Min(ScaleX, ScaleY) * DimX) / 2
|
||||
Dim OffY As Double = (m_CanvY - Math.Min(ScaleX, ScaleY) * DimY) / 2
|
||||
myTransformGroup.Children.Add(New ScaleTransform(Math.Min(ScaleX, ScaleY), Math.Min(ScaleX, ScaleY)))
|
||||
myTransformGroup.Children.Add(New TranslateTransform(OffX, OffY))
|
||||
m_CurrPath.RenderTransform = myTransformGroup
|
||||
End Sub
|
||||
|
||||
Private Sub SetBrushFromRGBString(sFill As String, ByRef brFill As Brush)
|
||||
If String.IsNullOrEmpty(sFill) Then
|
||||
brFill = Brushes.DarkRed
|
||||
Return
|
||||
End If
|
||||
Dim s1 As String = sFill
|
||||
If s1.Contains("rgb") Then
|
||||
s1 = s1.Replace("rgb(", "")
|
||||
s1 = s1.Replace(")", "")
|
||||
Dim s2 As String = ""
|
||||
For Each s As String In s1.Split(",")
|
||||
s2 &= CInt(s).ToString("x2")
|
||||
Next
|
||||
brFill = New BrushConverter().ConvertFrom("#" & s2)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
Public Module XMLReader
|
||||
|
||||
Public Sub ReadMyXML(FilePath As String, Canv As MyCanvas)
|
||||
'Create the XML Reader
|
||||
Dim m_xmlr As XmlTextReader = New XmlTextReader(FilePath)
|
||||
'Disable whitespace so that you don't have to read over whitespaces
|
||||
m_xmlr.WhitespaceHandling = WhitespaceHandling.None
|
||||
' Leggo la prima riga: '?xml' tag
|
||||
m_xmlr.Read()
|
||||
' Passo a leggere la successiva: 'svg' tag
|
||||
m_xmlr.Read()
|
||||
' Leggo gli attributi di questo tag (dimensioni)
|
||||
Dim ViewBoxDim = m_xmlr.GetAttribute("viewBox")
|
||||
Canv.ViewBoxDim = ViewBoxDim
|
||||
' Elaboro i dati per avere la scalatura del disegno
|
||||
Dim DimViewBox As String() = ViewBoxDim.ToString.Split(" ")
|
||||
Dim DimX As Integer = 10
|
||||
Dim DimY As Integer = 10
|
||||
If DimViewBox.Count = 4 Then
|
||||
DimX = Math.Abs(CInt(DimViewBox(2))) + Math.Abs(CInt(DimViewBox(0)))
|
||||
DimY = Math.Abs(CInt(DimViewBox(3))) + Math.Abs(CInt(DimViewBox(1)))
|
||||
End If
|
||||
|
||||
' Leggo in loop i tag: 'path'
|
||||
While Not m_xmlr.EOF
|
||||
m_xmlr.Read()
|
||||
If Not m_xmlr.IsStartElement() Then
|
||||
Continue While
|
||||
End If
|
||||
' recupero il valore dell'attributo 'id'
|
||||
Dim idAttribute = m_xmlr.GetAttribute("id")
|
||||
' recupero il valore dell'attributo 'd'
|
||||
Dim dAttribute = m_xmlr.GetAttribute("d")
|
||||
' recupero il valore dell'attributo 'fill'
|
||||
Dim fillAttribute = m_xmlr.GetAttribute("fill")
|
||||
' recupero il valore dell'attributo 'fill-opacity'
|
||||
Dim fillOpacityAttribute = m_xmlr.GetAttribute("fill-opacity")
|
||||
' recupero il valore dell'attributo 'stroke'
|
||||
Dim strokeAttribute = m_xmlr.GetAttribute("stroke")
|
||||
' recupero il valore dell'attributo 'stroke-opacity'
|
||||
Dim strokeOpacityAttribute = m_xmlr.GetAttribute("stroke-opacity")
|
||||
' recupero il valore dell'attributo 'stroke - Width'
|
||||
Dim strokeWidthAttribute = m_xmlr.GetAttribute("stroke-width")
|
||||
' carico l'elemento in lista solo se esiste un'immagine
|
||||
If Not String.IsNullOrEmpty(idAttribute) And Not String.IsNullOrEmpty(dAttribute) Then
|
||||
Dim fillOpacity As Double = 1 ' CDbl(fillOpacityAttribute)
|
||||
StringToDouble(fillOpacityAttribute, fillOpacity)
|
||||
Dim strokeOpacity As Double = 1 ' CDbl(strokeOpacityAttribute)
|
||||
StringToDouble(strokeOpacityAttribute, strokeOpacity)
|
||||
Canv.ListPath.Add(New MyPath(idAttribute, dAttribute, Canv.CurrCanvas.Width, Canv.CurrCanvas.Height, DimX, DimY, fillAttribute, fillOpacity, strokeAttribute, strokeOpacity))
|
||||
End If
|
||||
|
||||
End While
|
||||
' Libero il file dalla lettura
|
||||
m_xmlr.Close()
|
||||
' popolo la canvas con le Ptah che ho caricato
|
||||
Canv.LoadCanvas()
|
||||
End Sub
|
||||
|
||||
Public Sub WriteMyXML(FilePath As String, Canv As MyCanvas)
|
||||
|
||||
Dim _namespaceDefault As String = "http://www.w3.org/2000/svg"
|
||||
|
||||
Dim doc As New Xml.XmlDocument
|
||||
|
||||
Dim elm As System.Xml.XmlNode
|
||||
Dim elmSub As System.Xml.XmlNode
|
||||
Dim elmMain As Xml.XmlNode
|
||||
|
||||
doc = New Xml.XmlDocument
|
||||
|
||||
elmMain = doc.CreateElement("svg")
|
||||
elmSub = elmMain.Attributes.Append(doc.CreateAttribute("viewBox"))
|
||||
elmSub.Value = Canv.ViewBoxDim
|
||||
elmSub = elmMain.Attributes.Append(doc.CreateAttribute("xmlns"))
|
||||
elmSub.Value = _namespaceDefault
|
||||
|
||||
For Each itemPath As MyPath In Canv.ListPath
|
||||
elm = elmMain.AppendChild(doc.CreateElement("path"))
|
||||
|
||||
elmSub = elm.Attributes.Append(doc.CreateAttribute("id"))
|
||||
elmSub.Value = itemPath.id
|
||||
|
||||
elmSub = elm.Attributes.Append(doc.CreateAttribute("d"))
|
||||
elmSub.Value = itemPath.d
|
||||
|
||||
If Not String.IsNullOrEmpty(itemPath.fill) Then
|
||||
elmSub = elm.Attributes.Append(doc.CreateAttribute("fill"))
|
||||
elmSub.Value = itemPath.fill
|
||||
End If
|
||||
|
||||
If Not String.IsNullOrEmpty(itemPath.fill_opacity) Then
|
||||
elmSub = elm.Attributes.Append(doc.CreateAttribute("fill-opacity"))
|
||||
elmSub.Value = itemPath.fill_opacity.ToString(CultureInfo.InvariantCulture)
|
||||
End If
|
||||
|
||||
If Not String.IsNullOrEmpty(itemPath.stroke) Then
|
||||
elmSub = elm.Attributes.Append(doc.CreateAttribute("stroke"))
|
||||
elmSub.Value = itemPath.stroke
|
||||
End If
|
||||
|
||||
If Not String.IsNullOrEmpty(itemPath.stroke_opacity) Then
|
||||
elmSub = elm.Attributes.Append(doc.CreateAttribute("stroke-opacity"))
|
||||
elmSub.Value = itemPath.stroke_opacity.ToString(CultureInfo.InvariantCulture)
|
||||
End If
|
||||
|
||||
If Not String.IsNullOrEmpty(itemPath.stroke_width) Then
|
||||
elmSub = elm.Attributes.Append(doc.CreateAttribute("stroke-width"))
|
||||
elmSub.Value = itemPath.stroke_width.ToString(CultureInfo.InvariantCulture)
|
||||
End If
|
||||
|
||||
Next
|
||||
|
||||
doc.AppendChild(doc.CreateXmlDeclaration("1.0", "UTF-8", ""))
|
||||
doc.AppendChild(elmMain)
|
||||
doc.Save(FilePath)
|
||||
|
||||
End Sub
|
||||
|
||||
End Module
|
||||
|
||||
#End Region ' Elementi per la gestione SVG
|
||||
+145
-35
@@ -1,4 +1,6 @@
|
||||
Imports EgtUILib
|
||||
Imports System.Net
|
||||
Imports System.Windows.Forms.Integration
|
||||
Imports EgtUILib
|
||||
|
||||
Public Module SplitAuto
|
||||
|
||||
@@ -36,6 +38,8 @@ Public Module SplitAuto
|
||||
Public m_dStartFreeLen As Double
|
||||
Public m_dEndFreeLen As Double
|
||||
Public m_vtDir As Vector3d
|
||||
' ver 2.6f4: tagli corti gestiti con LeadIn.OUT/LeadOut.OUT
|
||||
Public m_bMngLeadInOnIntCorner As Boolean
|
||||
End Class
|
||||
|
||||
'-----------------------------------------------------------------------------------------------
|
||||
@@ -98,25 +102,52 @@ Public Module SplitAuto
|
||||
Mach.m_dStartFreeLen = FREELEN_INF + 1
|
||||
Mach.m_dEndFreeLen = FREELEN_INF + 1
|
||||
Dim nEntId, nSub As Integer
|
||||
If EgtGetMachiningGeometry( 0, nEntId, nSub) Then
|
||||
If EgtGetType( nEntId) = GDB_TY.CRV_ARC OrElse EgtGetType( nEntId) = GDB_TY.CRV_COMPO Then Mach.m_bIsLine = False
|
||||
EgtGetInfo( nEntId, If( Not Mach.m_bInvert, INFO_PREVANG, INFO_NEXTANG), Mach.m_dPrevAng)
|
||||
EgtGetInfo( nEntId, If( Not Mach.m_bInvert, INFO_NEXTANG, INFO_PREVANG), Mach.m_dNextAng)
|
||||
EgtGetInfo( nEntId, If( Not Mach.m_bInvert, INFO_START_FREELEN, INFO_END_FREELEN), Mach.m_dStartFreeLen)
|
||||
EgtGetInfo( nEntId, If( Not Mach.m_bInvert, INFO_END_FREELEN, INFO_START_FREELEN), Mach.m_dEndFreeLen)
|
||||
Mach.m_bEnableInvert = GetEnableInvert( nEntId)
|
||||
EgtMidVector( nEntId, GDB_ID.ROOT, Mach.m_vtDir)
|
||||
If EgtGetMachiningGeometry(0, nEntId, nSub) Then
|
||||
' EgtGetType( nEntId) = GDB_TY.CRV_ARC OrElse
|
||||
If EgtGetType(nEntId) = GDB_TY.CRV_COMPO Then Mach.m_bIsLine = False
|
||||
EgtGetInfo(nEntId, If(Not Mach.m_bInvert, INFO_PREVANG, INFO_NEXTANG), Mach.m_dPrevAng)
|
||||
EgtGetInfo(nEntId, If(Not Mach.m_bInvert, INFO_NEXTANG, INFO_PREVANG), Mach.m_dNextAng)
|
||||
EgtGetInfo(nEntId, If(Not Mach.m_bInvert, INFO_START_FREELEN, INFO_END_FREELEN), Mach.m_dStartFreeLen)
|
||||
EgtGetInfo(nEntId, If(Not Mach.m_bInvert, INFO_END_FREELEN, INFO_START_FREELEN), Mach.m_dEndFreeLen)
|
||||
Mach.m_bEnableInvert = GetEnableInvert(nEntId)
|
||||
EgtMidVector(nEntId, GDB_ID.ROOT, Mach.m_vtDir)
|
||||
If Mach.m_bInvert Then Mach.m_vtDir = -Mach.m_vtDir
|
||||
Mach.m_nEntId = nEntId
|
||||
EgtGetInfo(nOperId, "ManageLeadInOnIntCorner", Mach.m_bMngLeadInOnIntCorner)
|
||||
End If
|
||||
' verifico se trasformabile in un taglio di separazione (almeno da un lato)
|
||||
If (dStartAddLen > -EPS_SMALL Or dEndAddLen > -EPS_SMALL) And
|
||||
Mach.m_sLay = NAME_OUTLOOP And Mach.m_nInterf = FMI_TYPE.NONE Then
|
||||
If (dStartAddLen > -EPS_SMALL Or dEndAddLen > -EPS_SMALL Or Mach.m_bMngLeadInOnIntCorner) And
|
||||
Mach.m_sLay = NAME_OUTLOOP And ( Mach.m_nInterf And FMI_TYPE.RM) = 0 Then
|
||||
Dim nRes As Integer = EgtVerifyCutAsSplitting(nOperId)
|
||||
Mach.m_bCanStartAll = (dStartAddLen > -EPS_SMALL And (nRes And CAR_RES.LI_OK) <> 0) And
|
||||
Mach.m_dStartFreeLen > FREELEN_INF And Mach.m_bIsLine
|
||||
Mach.m_bCanEndAll = (dEndAddLen > -EPS_SMALL And (nRes And CAR_RES.LO_OK) <> 0) And
|
||||
Mach.m_dEndFreeLen > FREELEN_INF And Mach.m_bIsLine
|
||||
Dim bIn As Boolean = False
|
||||
Dim bOut As Boolean = False
|
||||
CanExtendSides(Mach, bIn, bOut)
|
||||
Mach.m_bCanStartAll = ((dStartAddLen > -EPS_SMALL Or Mach.m_bMngLeadInOnIntCorner) And (nRes And CAR_RES.LI_OK) <> 0) And
|
||||
Mach.m_dStartFreeLen > FREELEN_INF And Mach.m_bIsLine And bIn
|
||||
Mach.m_bCanEndAll = ((dEndAddLen > -EPS_SMALL Or Mach.m_bMngLeadInOnIntCorner) And (nRes And CAR_RES.LO_OK) <> 0) And
|
||||
Mach.m_dEndFreeLen > FREELEN_INF And Mach.m_bIsLine And bOut
|
||||
If nRes = 0 Then
|
||||
EgtOutLog("Operation ID " & nOperId.ToString & " isn't split cut! verify depth machining.")
|
||||
End If
|
||||
|
||||
ElseIf (dStartAddLen > -EPS_SMALL Or dEndAddLen > -EPS_SMALL Or Mach.m_bMngLeadInOnIntCorner) And
|
||||
Mach.m_sLay = NAME_OUTLOOP And
|
||||
(Mach.m_nInterf = FMI_TYPE.LI Or Mach.m_nInterf = FMI_TYPE.LO Or Mach.m_nInterf = FMI_TYPE.RM) Then
|
||||
Dim nRes As Integer = EgtVerifyCutAsSplitting(nOperId)
|
||||
Dim bIn As Boolean = False
|
||||
Dim bOut As Boolean = False
|
||||
CanExtendSides(Mach, bIn, bOut)
|
||||
' And (nRes And CAR_RES.LI_OK) <> 0 : da aggiungere
|
||||
Mach.m_bCanStartAll = (dStartAddLen > -EPS_SMALL Or Mach.m_bMngLeadInOnIntCorner) And
|
||||
Mach.m_dStartFreeLen > FREELEN_INF And Mach.m_bIsLine And bIn And
|
||||
Mach.m_nInterf <> FMI_TYPE.LI
|
||||
' And (nRes And CAR_RES.LO_OK) <> 0 : da aggiungere come sopra
|
||||
Mach.m_bCanEndAll = (dEndAddLen > -EPS_SMALL Or Mach.m_bMngLeadInOnIntCorner) And
|
||||
Mach.m_dEndFreeLen > FREELEN_INF And Mach.m_bIsLine And bOut And
|
||||
Mach.m_nInterf <> FMI_TYPE.LO
|
||||
If nRes = 0 Then
|
||||
EgtOutLog("Operation ID " & nOperId.ToString & " isn't split cut! verify depth machining.")
|
||||
End If
|
||||
End If
|
||||
' se trasformabile in taglio di separazione, verifico se lo è
|
||||
If Mach.m_bCanStartAll Or Mach.m_bCanEndAll Then
|
||||
@@ -131,7 +162,7 @@ Public Module SplitAuto
|
||||
Mach.m_bStartAll = False
|
||||
Mach.m_bEndAll = False
|
||||
End If
|
||||
' Waterjet
|
||||
' Waterjet
|
||||
ElseIf Mach.m_nType = MCH_OY.WATERJETTING Then
|
||||
Mach.m_nInterf = FMI_TYPE.NONE
|
||||
' recupero l'angolo di fianco
|
||||
@@ -140,7 +171,7 @@ Public Module SplitAuto
|
||||
Mach.m_bCanEndAll = False
|
||||
Mach.m_bStartAll = False
|
||||
Mach.m_bEndAll = False
|
||||
' Forature e fresature
|
||||
' Forature e fresature
|
||||
Else
|
||||
Mach.m_nInterf = FMI_TYPE.NONE
|
||||
Mach.m_dSideAng = 0
|
||||
@@ -155,7 +186,7 @@ Public Module SplitAuto
|
||||
Mach.m_bPause = GetPause(nOperId)
|
||||
' inserisco in lista
|
||||
MachSplitList.Add(Mach)
|
||||
' altrimenti la disattivo
|
||||
' altrimenti la disattivo
|
||||
Else
|
||||
EgtSetOperationMode(nOperId, False)
|
||||
End If
|
||||
@@ -165,6 +196,26 @@ Public Module SplitAuto
|
||||
Return True
|
||||
End Function
|
||||
|
||||
Private Function CanExtendSides(CurrMach As SplitMach, ByRef bIn As Boolean, ByRef bOut As Boolean) As Boolean
|
||||
If CurrMach.m_dPrevAng < -EPS_ANG_SMALL And CurrMach.m_dNextAng > EPS_ANG_SMALL Then
|
||||
' Posso estendere SOLO l'uscita
|
||||
bOut = True
|
||||
bIn = False
|
||||
ElseIf CurrMach.m_dPrevAng > EPS_ANG_SMALL And CurrMach.m_dNextAng < -EPS_ANG_SMALL Then
|
||||
' Posso estendere SOLO l'ingresso
|
||||
bIn = True
|
||||
bOut = False
|
||||
ElseIf CurrMach.m_dPrevAng < -EPS_ANG_SMALL And CurrMach.m_dNextAng < -EPS_ANG_SMALL Then
|
||||
' NON Posso estendere
|
||||
bIn = False
|
||||
bOut = False
|
||||
Else
|
||||
bIn = True
|
||||
bOut = True
|
||||
End If
|
||||
Return True
|
||||
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)
|
||||
@@ -193,7 +244,7 @@ Public Module SplitAuto
|
||||
|
||||
Private Sub ColorSingleMachining(nOperId As Integer, sLay As String, dSideAng As Double, bEnabled As Boolean, nInterf As Integer)
|
||||
' Verifico se è un taglio da sopra o da sotto
|
||||
Dim bOnMach As Boolean = (sLay = NAME_ONPATH Or ( sLay = NAME_INLOOP AndAlso EgtExistsInfo( nOperId, INFO_FILOTOP)))
|
||||
Dim bOnMach As Boolean = (sLay = NAME_ONPATH Or (sLay = NAME_INLOOP AndAlso EgtExistsInfo(nOperId, INFO_FILOTOP)))
|
||||
Dim bDrip As Boolean = (sLay = NAME_DRIPCUT Or sLay = NAME_UNDERDRILL)
|
||||
' Recupero il preview della lavorazione
|
||||
Dim nPvId As Integer = GDB_ID.NULL
|
||||
@@ -218,11 +269,11 @@ Public Module SplitAuto
|
||||
Next
|
||||
EgtSetColor(nDwnCutId, COL_MCH_DISABLED)
|
||||
Dim bFreeStart As Boolean = (nInterf And FMI_TYPE.LI) <> FMI_TYPE.LI
|
||||
EgtSetColor(nPrcId, If(bFreeStart, COL_MCH_DISABLED, COL_MCH_DIS_INTERF))
|
||||
EgtSetColor(nDwnPrcId, If(bFreeStart, COL_MCH_DISABLED, COL_MCH_DIS_INTERF))
|
||||
EgtSetColor(nPrcId, If(bFreeStart, COL_MCH_DISABLED(), COL_MCH_DIS_INTERF()))
|
||||
EgtSetColor(nDwnPrcId, If(bFreeStart, COL_MCH_DISABLED(), COL_MCH_DIS_INTERF()))
|
||||
Dim bFreeEnd As Boolean = (nInterf And FMI_TYPE.LO) <> FMI_TYPE.LO
|
||||
EgtSetColor(nPocId, If(bFreeEnd, COL_MCH_DISABLED, COL_MCH_DIS_INTERF))
|
||||
EgtSetColor(nDwnPocId, If(bFreeEnd, COL_MCH_DISABLED, COL_MCH_DIS_INTERF))
|
||||
EgtSetColor(nPocId, If(bFreeEnd, COL_MCH_DISABLED(), COL_MCH_DIS_INTERF()))
|
||||
EgtSetColor(nDwnPocId, If(bFreeEnd, COL_MCH_DISABLED(), COL_MCH_DIS_INTERF()))
|
||||
Else
|
||||
Dim colCut As Color3d
|
||||
If bOnMach Then
|
||||
@@ -341,6 +392,7 @@ Public Module SplitAuto
|
||||
Dim ptOri As Point3d
|
||||
EgtGetTableRef(1, ptOri)
|
||||
Dim vtOri As New Vector3d(ptOri.x, ptOri.y, ptOri.z)
|
||||
' ---------------------------------- GREZZI ----------------------------------
|
||||
' Eseguo eventuali spezzature dei grezzi e vi sposto i pezzi (i grezzi devono essere sempre copiati per Registrazione con rotazione)
|
||||
Dim nRawId As Integer = EgtGetFirstRawPart()
|
||||
While nRawId <> GDB_ID.NULL
|
||||
@@ -392,10 +444,19 @@ Public Module SplitAuto
|
||||
' passo al successivo grezzo
|
||||
nRawId = EgtGetNextRawPart(nRawId)
|
||||
End While
|
||||
' ---------------------------------- GREZZI ----------------------------------
|
||||
' Cancello preview dei tagli allungati dalla lavorazione
|
||||
For Each nCut As Integer In vCuts
|
||||
RemoveMachiningPreview(nCut)
|
||||
Next
|
||||
' ---------------------------------- LAVORAZIONI ----------------------------------
|
||||
ChangeOperationPhase(nNewPhase)
|
||||
' ---------------------------------- LAVORAZIONI ----------------------------------
|
||||
Return True
|
||||
End Function
|
||||
|
||||
' Sposta le lavorzioni della fase precedente a quella indicata
|
||||
Friend Sub ChangeOperationPhase_ERR(nNewPhase As Integer)
|
||||
' Sposto tutte le lavorazioni disabilitate e le eventuali inglobate nella nuova fase
|
||||
Dim nId = EgtGetFirstOperation()
|
||||
While nId <> GDB_ID.NULL
|
||||
@@ -416,9 +477,50 @@ Public Module SplitAuto
|
||||
End If
|
||||
nId = nNextId
|
||||
End While
|
||||
Return True
|
||||
End Function
|
||||
End Sub
|
||||
|
||||
' Miglioramento della gestione delle lavorazioni
|
||||
Friend Sub ChangeOperationPhase(nNewPhase As Integer)
|
||||
' creo l'elenco delle lavorazioni che devono essere sposate
|
||||
Dim MchList As New List(Of Integer)
|
||||
' Recupero le lavorazioni disabilitate e le eventuali inglobate nella nuova fase
|
||||
Dim nId = EgtGetFirstOperation()
|
||||
While nId <> GDB_ID.NULL
|
||||
Dim nNextId = EgtGetNextOperation(nId)
|
||||
If IsValidMachining(nId) And EgtGetOperationPhase(nId) = nNewPhase - 1 And EgtExistsInfo(nId, INFO_MCH_USER_OFF) Then
|
||||
' Provo ad inserire la lavorazione nell'elenco
|
||||
AddMach(MchList, nId)
|
||||
' sposto le inglobate
|
||||
Dim sInfo As String = String.Empty
|
||||
If EgtGetInfo(nId, INFO_MCH_OTHMID, sInfo) Then
|
||||
Dim sItems() As String = sInfo.Split(",".ToCharArray)
|
||||
For Each sId2 As String In sItems
|
||||
Dim nId2 As Integer = 0
|
||||
StringToInt(sId2, nId2)
|
||||
If nId2 > 0 Then
|
||||
' Provo ad inserire la lavorazione nell'elenco
|
||||
AddMach(MchList, nId2)
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
End If
|
||||
nId = nNextId
|
||||
End While
|
||||
' Procedo ora a spostare le lavorazioni nella nuova disposizione
|
||||
For Each ItemMchId As Integer In MchList
|
||||
EgtChangeOperationPhase(ItemMchId, nNewPhase)
|
||||
Next
|
||||
End Sub
|
||||
|
||||
' Inserisce gli inidici delle lavorazioni evitando di inserire dei doppioni
|
||||
Private Sub AddMach(MchList As List(Of Integer), IdMch As Integer)
|
||||
For Each Item As Integer In MchList
|
||||
If IdMch = Item Then
|
||||
Return
|
||||
End If
|
||||
Next
|
||||
MchList.Add(IdMch)
|
||||
End Sub
|
||||
'-----------------------------------------------------------------------------------------------
|
||||
Friend Function CalculateSplitAuto() As Boolean
|
||||
' Fase iniziale
|
||||
@@ -742,28 +844,36 @@ Public Module SplitAuto
|
||||
|
||||
Private Function ExecMove(nDispId As Integer, vNewRaws As List(Of Integer),
|
||||
vtMove As Vector3d, dMinMove As Double) As Boolean
|
||||
Dim vtMove2 As Vector3d = -vtMove
|
||||
Dim bTwoHeadVac As Boolean = (EgtGetHeadId(VACUUM_HEAD_2) <> GDB_ID.NULL)
|
||||
Dim rmData As New RawMoveData
|
||||
If PutVacuumCupsOnRaw(vNewRaws(1), rmData) AndAlso
|
||||
SafeMoveRawPart(vNewRaws(1), vtMove, dMinMove) Then
|
||||
Dim vtMove2 As Vector3d = -vtMove
|
||||
|
||||
VacuumCups.ResetHeadName()
|
||||
Dim bPutVacuum As Boolean = PutVacuumCupsOnRaw(vNewRaws(1), rmData)
|
||||
If Not bPutVacuum And bTwoHeadVac Then bPutVacuum = PutVacuumCupsOnRaw(vNewRaws(1), rmData)
|
||||
If bPutVacuum AndAlso SafeMoveRawPart(vNewRaws(1), vtMove, dMinMove) Then
|
||||
rmData.m_vtRawMove = vtMove
|
||||
SaveOneMoveInfoInDisposition(nDispId, rmData)
|
||||
Return True
|
||||
ElseIf PutVacuumCupsOnRaw(vNewRaws(0), rmData) AndAlso
|
||||
SafeMoveRawPart(vNewRaws(0), vtMove2, dMinMove) Then
|
||||
End If
|
||||
|
||||
VacuumCups.ResetHeadName()
|
||||
Dim bPut2Vacuum As Boolean = PutVacuumCupsOnRaw(vNewRaws(0), rmData)
|
||||
If Not bPut2Vacuum And bTwoHeadVac Then bPutVacuum = PutVacuumCupsOnRaw(vNewRaws(0), rmData)
|
||||
If bPut2Vacuum AndAlso SafeMoveRawPart(vNewRaws(0), vtMove2, dMinMove) Then
|
||||
rmData.m_vtRawMove = vtMove2
|
||||
SaveOneMoveInfoInDisposition(nDispId, rmData)
|
||||
Return True
|
||||
Else
|
||||
Return False
|
||||
End If
|
||||
|
||||
Return False
|
||||
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)
|
||||
Dim vtOriMove As New Vector3d(vtMove)
|
||||
' Livello di movimento
|
||||
Dim nMoveLevel As Integer = GetPrivateProfileInt( S_SPLIT, K_MOVE_LEV, 5, m_MainWindow.GetIniFile())
|
||||
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, vtOriMove) Then Return False
|
||||
@@ -798,7 +908,7 @@ Public Module SplitAuto
|
||||
If VerifyRawWithOtherRaws(nRawId, dMindist) Then
|
||||
vtMove += 0.5 * vtOriMove
|
||||
nMove += 1
|
||||
If nMoveLevel = nMove Then return True
|
||||
If nMoveLevel = nMove Then Return True
|
||||
Else
|
||||
EgtMoveRawPart(nRawId, -0.5 * vtOriMove)
|
||||
End If
|
||||
|
||||
+93
-69
@@ -38,7 +38,7 @@
|
||||
<Image Source="{DynamicResource NumericKeyboardArrowImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="NextBtn" Grid.Column="1" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource NumericKeyboardArrowImg}" Style="{StaticResource OmagCut_ButtonIcon}" RenderTransformOrigin="0.5,0.5">
|
||||
<Image Source="{DynamicResource NumericKeyboardArrowImg}" Style="{StaticResource OmagCut_ButtonIcon}" RenderTransformOrigin="0.5,0.5">
|
||||
<Image.RenderTransform>
|
||||
<TransformGroup>
|
||||
<RotateTransform Angle="180"/>
|
||||
@@ -48,8 +48,8 @@
|
||||
</Button>
|
||||
<Button Name="ModifyBtn" Grid.Column="2" Style="{DynamicResource OmagCut_YellowTextButton}"/>
|
||||
<Button Name="AutoBtn" Grid.Column="3" Style="{DynamicResource OmagCut_YellowTextButton}"/>
|
||||
<Button Name="RestartBtn" Grid.Column="3" Style="{DynamicResource OmagCut_YellowTextButton}" Visibility="Hidden"/>
|
||||
</Grid>
|
||||
<Button Name="RestartBtn" Grid.Column="3" Style="{DynamicResource OmagCut_YellowTextButton}" Visibility="Hidden"/>
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
||||
<!--Left Button Grid-->
|
||||
@@ -63,17 +63,27 @@
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<ListBox Name="MachiningLsBx" Grid.Row="1" ItemTemplate="{DynamicResource NameIdLsBxItem}"
|
||||
<ListBox Name="MachiningLsBx" Grid.Row="1"
|
||||
SelectionMode="Extended">
|
||||
<ListBox.ItemContainerStyle>
|
||||
<Style TargetType="ListBoxItem">
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding bIsActive}" Value="False">
|
||||
<Setter Property="Foreground" Value="{StaticResource OmagCut_White}"/>
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</ListBox.ItemContainerStyle>
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding Name}">
|
||||
<TextBlock.Style>
|
||||
<Style TargetType="TextBlock" BasedOn="{StaticResource OmagCut_CurrProjSummeryTextBlock}">
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding bIsActive}" Value="False">
|
||||
<Setter Property="TextDecorations" Value="Strikethrough"/>
|
||||
<Setter Property="Foreground" Value="{StaticResource OmagCut_White}"/>
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding bIsActive}" Value="True">
|
||||
<Setter Property="Foreground" Value="Black"/>
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</TextBlock.Style>
|
||||
</TextBlock>
|
||||
</DataTemplate>
|
||||
</ListBox.ItemTemplate>
|
||||
</ListBox>
|
||||
|
||||
<Grid Grid.Row="2">
|
||||
@@ -90,8 +100,14 @@
|
||||
<Button Name="MoveDownBtn" Grid.Column="2" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource DownArrowImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||
</Button>
|
||||
<ToggleButton Name="LayNbArrTgBtn" Grid.Column="3" Style="{DynamicResource OmagCut_YellowIconToggleButton}"
|
||||
Height="25" Width="25">
|
||||
<Image Name="LayNbArrImg"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center" Stretch="Uniform"/>
|
||||
</ToggleButton>
|
||||
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
||||
<Grid Grid.Row="3">
|
||||
<Grid.ColumnDefinitions>
|
||||
@@ -101,13 +117,13 @@
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Button Name="OnOffBtn" Grid.Column="0" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource ON_OFF-singolo-taglioImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||
<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}"/>
|
||||
<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}"/>
|
||||
<Image Source="{DynamicResource Tutti-OFFImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||
</Button>
|
||||
|
||||
</Grid>
|
||||
@@ -119,28 +135,36 @@
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<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="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>
|
||||
|
||||
<!-- solo per macchine con lavorazioni Waterjet -->
|
||||
<ToggleButton Name="BridgesWJBtn" Grid.Column="0" Style="{DynamicResource OmagCut_YellowIconToggleButton}">
|
||||
<Image Source="{DynamicResource PonticelliWJImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||
</ToggleButton>
|
||||
<Button Name="CutEndBtn" Grid.Column="2" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource Fine-Allunga-AccorciaImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||
</Button>
|
||||
|
||||
<!-- solo per macchine con lavorazioni Waterjet -->
|
||||
<ToggleButton Name="BridgesDeleteWJBtn" Grid.Column="3" Style="{DynamicResource OmagCut_YellowIconToggleButton}">
|
||||
<Image Source="{DynamicResource PonticelliDeleteWJImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||
</ToggleButton>
|
||||
<!-- solo per macchine con lavorazioni Waterjet -->
|
||||
<ToggleButton Name="BridgesWJBtn" Grid.Column="0" Style="{DynamicResource OmagCut_YellowIconToggleButton}">
|
||||
<Image Source="{DynamicResource PonticelliWJImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||
</ToggleButton>
|
||||
|
||||
<Button Name="CutEndBtn" Grid.Column="2" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource Fine-Allunga-AccorciaImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||
</Button>
|
||||
<!--solo per macchine con lavorazioni Waterjet-->
|
||||
<Button Name="QualityWJBtn" Grid.Column="1" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource QualityWJImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||
</Button>
|
||||
|
||||
<!-- solo per macchine con lavorazioni Waterjet -->
|
||||
<ToggleButton Name="BridgesDeleteWJBtn" Grid.Column="3" Style="{DynamicResource OmagCut_YellowIconToggleButton}">
|
||||
<Image Source="{DynamicResource PonticelliDeleteWJImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||
</ToggleButton>
|
||||
|
||||
</Grid>
|
||||
|
||||
|
||||
</Grid>
|
||||
|
||||
</Grid>
|
||||
|
||||
@@ -163,41 +187,41 @@
|
||||
|
||||
|
||||
<Button Name="OutCenStartBtn" Grid.Column="0" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource Inizio-Centro-FuoriImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||
<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>
|
||||
<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>
|
||||
|
||||
|
||||
+469
-239
File diff suppressed because it is too large
Load Diff
+86
-40
@@ -1,5 +1,6 @@
|
||||
Imports EgtUILib
|
||||
Imports System.Text.RegularExpressions
|
||||
Imports System.Threading
|
||||
|
||||
Module VacuumCups
|
||||
' Tipo manipolatore con ventosa (0=assente, 1=dietro, 2=laterale)
|
||||
@@ -31,6 +32,19 @@ Module VacuumCups
|
||||
' Nome del gruppo temporaneo per le ventose
|
||||
Private Const VACTMP_GRP As String = "VacTmp"
|
||||
|
||||
Private m_sHeadName As String = VACUUM_HEAD
|
||||
Public Sub ResetHeadName()
|
||||
Dim bReload As Boolean = (m_sHeadName <> VACUUM_HEAD)
|
||||
m_sHeadName = VACUUM_HEAD
|
||||
If bReload Then LoadVacuumCups()
|
||||
End Sub
|
||||
Public Function ChangeHeadName() As Boolean
|
||||
If EgtGetHeadId( VACUUM_HEAD_2) = GDB_ID.NULL Then Return False
|
||||
m_sHeadName = If( m_sHeadName = VACUUM_HEAD, VACUUM_HEAD_2, VACUUM_HEAD)
|
||||
LoadVacuumCups()
|
||||
Return True
|
||||
End Function
|
||||
|
||||
'-----------------------------------------------------------------------------------------------
|
||||
Friend Class RawMoveData
|
||||
|
||||
@@ -87,17 +101,17 @@ Module VacuumCups
|
||||
Friend Function LoadVacuumCups() As Boolean
|
||||
' Leggo tipo manipolatore con ventosa
|
||||
m_nVacType = 0
|
||||
EgtGetInfo(EgtGetHeadId(VACUUM_HEAD), KEY_VAC_TYPE, m_nVacType)
|
||||
EgtGetInfo(EgtGetHeadId(m_sHeadName), KEY_VAC_TYPE, m_nVacType)
|
||||
' Cancello eventuali vecchie ventose
|
||||
RemoveVacuumCups()
|
||||
' Identificativo ventose nella macchina
|
||||
Dim nLayId As Integer = EgtGetFirstNameInGroup(EgtGetHeadId(VACUUM_HEAD), VACUUM_HEAD_LAYOUT)
|
||||
Dim nLayId As Integer = EgtGetFirstNameInGroup(EgtGetHeadId(m_sHeadName), VACUUM_HEAD_LAYOUT)
|
||||
If nLayId = GDB_ID.NULL Then Return False
|
||||
' Identificativo riferimento della testa nella macchina
|
||||
Dim nT1Id As Integer = EgtGetFirstNameInGroup(EgtGetHeadId(VACUUM_HEAD), HEAD_FIRST_EXIT)
|
||||
Dim nT1Id As Integer = EgtGetFirstNameInGroup(EgtGetHeadId(m_sHeadName), HEAD_FIRST_EXIT)
|
||||
If nT1Id = GDB_ID.NULL Then Return False
|
||||
' imposto la l'uscita della ventosa come fosse l'uscita di un utensile
|
||||
EgtSetCalcTool("", "H4", 1)
|
||||
EgtSetCalcTool("", m_sHeadName, 1)
|
||||
' Creo gruppo temporaneo in cui copiarli
|
||||
m_nTempId = EgtCreateGroup(GDB_ID.ROOT)
|
||||
If m_nTempId = GDB_ID.NULL Then Return False
|
||||
@@ -107,23 +121,23 @@ Module VacuumCups
|
||||
m_nVacId = EgtCopyGlob(nLayId, m_nTempId)
|
||||
If m_nVacId = GDB_ID.NULL Then Return False
|
||||
' Angolo di rotazione preferito
|
||||
EgtGetInfo( m_nVacId, KEY_VACLAY_PREFROT, m_dPreferredRot)
|
||||
EgtGetInfo(m_nVacId, KEY_VACLAY_PREFROT, m_dPreferredRot)
|
||||
' Angoli di rotazione preferiti per ventosa in verticale (lungo Y) a sinistra e a destra del centro tavola
|
||||
EgtGetInfo( m_nVacId, KEY_VACLAY_PREFVROTXMINUS, m_dPrefVertRotXMinus)
|
||||
EgtGetInfo(m_nVacId, KEY_VACLAY_PREFVROTXMINUS, m_dPrefVertRotXMinus)
|
||||
EgtGetInfo(m_nVacId, KEY_VACLAY_PREFVROTXPLUS, m_dPrefVertRotXPlus)
|
||||
EgtGetInfo(m_nVacId, KEY_VACLAY_PREFVROTYMINUS, m_dPrefVertRotYMinus)
|
||||
EgtGetInfo(m_nVacId, KEY_VACLAY_PREFVROTYPLUS, m_dPrefVertRotYPlus)
|
||||
' Direzione di riferimento per tagli Drip
|
||||
EgtGetInfo( m_nVacId, KEY_VACLAY_DRIPREFDIR, m_dDripRefAng)
|
||||
EgtGetInfo(m_nVacId, KEY_VACLAY_DRIPREFDIR, m_dDripRefAng)
|
||||
' Nascondo il gruppo ma rendo visibili le curve di contorno delle ventose
|
||||
EgtSetStatus(m_nVacId, GDB_ST.OFF)
|
||||
Dim nId As Integer = EgtGetFirstInGroup(m_nVacId)
|
||||
While nId <> GDB_ID.NULL
|
||||
Select Case EgtGetType(nId)
|
||||
Case GDB_TY.CRV_LINE, GDB_TY.CRV_ARC, GDB_TY.CRV_BEZ, GDB_TY.CRV_COMPO
|
||||
EgtSetStatus(nId, GDB_ST.ON_)
|
||||
Case Else
|
||||
EgtSetStatus(nId, GDB_ST.OFF)
|
||||
Case GDB_TY.CRV_LINE, GDB_TY.CRV_ARC, GDB_TY.CRV_BEZ, GDB_TY.CRV_COMPO
|
||||
EgtSetStatus(nId, GDB_ST.ON_)
|
||||
Case Else
|
||||
EgtSetStatus(nId, GDB_ST.OFF)
|
||||
End Select
|
||||
nId = EgtGetNext(nId)
|
||||
End While
|
||||
@@ -152,7 +166,7 @@ Module VacuumCups
|
||||
Friend Function ResetVacuumCups() As Boolean
|
||||
' Ripristino posizione e rotazione originali
|
||||
Dim frOriRef As New Frame3d
|
||||
EgtFrame(EgtGetFirstNameInGroup(EgtGetHeadId(VACUUM_HEAD), HEAD_FIRST_EXIT), GDB_ID.ROOT, frOriRef)
|
||||
EgtFrame(EgtGetFirstNameInGroup(EgtGetHeadId(m_sHeadName), HEAD_FIRST_EXIT), GDB_ID.ROOT, frOriRef)
|
||||
Dim frCurrRef As New Frame3d
|
||||
EgtFrame(m_nRefId, GDB_ID.ROOT, frCurrRef)
|
||||
EgtMove(m_nVacId, frOriRef.Orig() - frCurrRef.Orig(), GDB_RT.GLOB)
|
||||
@@ -164,10 +178,10 @@ Module VacuumCups
|
||||
Dim nId As Integer = EgtGetFirstInGroup(m_nVacId)
|
||||
While nId <> GDB_ID.NULL
|
||||
Select Case EgtGetType(nId)
|
||||
Case GDB_TY.CRV_LINE, GDB_TY.CRV_ARC, GDB_TY.CRV_BEZ, GDB_TY.CRV_COMPO
|
||||
EgtSetStatus(nId, GDB_ST.ON_)
|
||||
Case Else
|
||||
EgtSetStatus(nId, GDB_ST.OFF)
|
||||
Case GDB_TY.CRV_LINE, GDB_TY.CRV_ARC, GDB_TY.CRV_BEZ, GDB_TY.CRV_COMPO
|
||||
EgtSetStatus(nId, GDB_ST.ON_)
|
||||
Case Else
|
||||
EgtSetStatus(nId, GDB_ST.OFF)
|
||||
End Select
|
||||
nId = EgtGetNext(nId)
|
||||
End While
|
||||
@@ -207,14 +221,17 @@ Module VacuumCups
|
||||
EgtSurfFrGrossArea(nRKerfId, RawArea)
|
||||
' volume calcolato in mmc
|
||||
Dim RawVolume As Double = RawArea * b3Raw.DimZ()
|
||||
' peso calolato in kg
|
||||
' peso calcolato in kg
|
||||
m_RawWeight = RawVolume * m_RawDensity / Math.Pow(10, 9)
|
||||
'-------------------- FINE CALCOLO PESO --------------------
|
||||
|
||||
' Eseguo ricerca
|
||||
If FindVacuumCupsOnRaw(nRawId, ptRawCen, b3Kerf, ptKerfCen, nKerfId, nRKerfId, rmData) Then
|
||||
Return True
|
||||
Else
|
||||
If ChangeHeadName() Then Return False
|
||||
End If
|
||||
|
||||
' In caso di fallimento, provo riducendo con offset la regione di kerf
|
||||
' (così si simula la proiezione del centro sul MAT - medial axis transform)
|
||||
Dim bOkFind As Boolean = False
|
||||
@@ -241,20 +258,20 @@ Module VacuumCups
|
||||
' Verifico sia veramente un pezzo
|
||||
If EgtGetRawPartFromPart(nPartId) = GDB_ID.NULL Then Return False
|
||||
' Cerco la direzione del primo taglio attivo da sotto
|
||||
Dim nDripLayId As Integer = EgtGetFirstNameInGroup( nPartId, NAME_DRIPCUT)
|
||||
Dim nDripLineId As Integer = EgtGetFirstInGroup( nDripLayId)
|
||||
Dim nDripLayId As Integer = EgtGetFirstNameInGroup(nPartId, NAME_DRIPCUT)
|
||||
Dim nDripLineId As Integer = EgtGetFirstInGroup(nDripLayId)
|
||||
While nDripLineId <> GDB_ID.NULL
|
||||
Dim nMchId As Integer = EgtGetOperationId( "DripSaw" & nDripLineId.ToString())
|
||||
Dim nMchId As Integer = EgtGetOperationId("DripSaw" & nDripLineId.ToString())
|
||||
Dim nMode As Integer
|
||||
If EgtGetMode( nMchId, nMode) AndAlso nMode = GDB_MD.STD Then Exit While
|
||||
nDripLineId = EgtGetNext( nDripLineId)
|
||||
If EgtGetMode(nMchId, nMode) AndAlso nMode = GDB_MD.STD Then Exit While
|
||||
nDripLineId = EgtGetNext(nDripLineId)
|
||||
End While
|
||||
Dim vtDir As New Vector3d
|
||||
if EgtStartVector( nDripLineId, GDB_ID.ROOT, vtDir) Then
|
||||
If EgtStartVector(nDripLineId, GDB_ID.ROOT, vtDir) Then
|
||||
Dim dLen, dAngV, dAngH As Double
|
||||
vtDir.ToSpherical( dLen, dAngV, dAngH)
|
||||
vtDir.ToSpherical(dLen, dAngV, dAngH)
|
||||
Dim dOffsAng = dAngH - m_dDripRefAng
|
||||
While dOffsAng - m_dPreferredRot >= 90
|
||||
While dOffsAng - m_dPreferredRot >= 90
|
||||
dOffsAng -= 180
|
||||
End While
|
||||
While dOffsAng - m_dPreferredRot <= -90
|
||||
@@ -388,7 +405,7 @@ Module VacuumCups
|
||||
|
||||
Private Function GetVacRotAxisSteps(ByRef vAngRot As List(Of Double)) As Boolean
|
||||
' Recupero l'asse rotante della testa ventosa
|
||||
Dim nRotAxId As Integer = EgtGetParent(EgtGetHeadId(VACUUM_HEAD))
|
||||
Dim nRotAxId As Integer = EgtGetParent(EgtGetHeadId(m_sHeadName))
|
||||
' Verifico se contiene info con STEPS
|
||||
Dim sSteps As String = ""
|
||||
If Not EgtGetInfo(nRotAxId, KEY_ROTVAC_STEPS, sSteps) Then Return False
|
||||
@@ -493,15 +510,15 @@ Module VacuumCups
|
||||
' Ordino secondo distanza angolare crescente da direzione di allineamento (modulo 180 deg)
|
||||
Dim dRotRefDeg As Double = dRotAngDeg
|
||||
vAngRot.Sort(Function(P, Q)
|
||||
Dim dDiffP = Math.Abs( P - dRotRefDeg)
|
||||
If Math.Abs( dDiffP - 180) < 10 * EPS_ANG_SMALL Then dDiffP = 1
|
||||
Dim dDiffQ = Math.Abs( Q - dRotRefDeg)
|
||||
If Math.Abs( dDiffQ - 180) < 10 * EPS_ANG_SMALL Then dDiffQ = 1
|
||||
Return ( dDiffP - dDiffQ)
|
||||
Dim dDiffP = Math.Abs(P - dRotRefDeg)
|
||||
If Math.Abs(dDiffP - 180) < 10 * EPS_ANG_SMALL Then dDiffP = 1
|
||||
Dim dDiffQ = Math.Abs(Q - dRotRefDeg)
|
||||
If Math.Abs(dDiffQ - 180) < 10 * EPS_ANG_SMALL Then dDiffQ = 1
|
||||
Return (dDiffP - dDiffQ)
|
||||
End Function)
|
||||
' Annullo la rotazione di allineamento
|
||||
dRotAngDeg = 0
|
||||
' altrimenti in continuo
|
||||
' altrimenti in continuo
|
||||
Else
|
||||
' Assegno più valori di ricerca e conservo angolo di allineamento
|
||||
vAngRot.AddRange({0, +5, -5, +12.5, -12.5, +25, -25, +45, -45})
|
||||
@@ -546,16 +563,45 @@ Module VacuumCups
|
||||
Return True
|
||||
End Function
|
||||
|
||||
' assegante le posizioni del centro delle ventose e l'angolo di posizionamento orizzontale verifica che la posizione sia raggiungibile
|
||||
' assegnate le posizioni del centro delle ventose e l'angolo di posizionamento orizzontale verifica che la posizione sia raggiungibile
|
||||
Public Function VerifyOutOfStrokes(ptRef As Point3d, dRotAngDeg As Double) As Integer
|
||||
Dim sAxisName As String = "C"
|
||||
' verifico che il nome dell'asse impostato sia corretto
|
||||
If EgtGetAxisId(sAxisName) = GDB_ID.NULL Then
|
||||
If m_sHeadName = VACUUM_HEAD Then
|
||||
sAxisName = "C1"
|
||||
Else
|
||||
sAxisName = "C2"
|
||||
End If
|
||||
End If
|
||||
' Posizione Home dell'asse rotante
|
||||
Dim dCHome As Double
|
||||
EgtGetAxisHomePos(sAxisName, dCHome)
|
||||
' Corse dell'asse
|
||||
Dim dCMin As Double
|
||||
EgtGetAxisMin(sAxisName, dCMin)
|
||||
Dim dCMax As Double
|
||||
EgtGetAxisMax(sAxisName, dCMax)
|
||||
' Porto l'angolo nel range
|
||||
Dim dRotAngMachDeg As Double = dRotAngDeg + dCHome
|
||||
AdjustAngleInRange(dRotAngMachDeg, dCMin, dCMax)
|
||||
' Imposto la ventosa come fosse un utensile
|
||||
EgtSetCalcTool("", m_sHeadName, 1)
|
||||
' Calcolo gli assi macchina
|
||||
Dim dX, dY, dZ As Double
|
||||
Dim nStat As Integer
|
||||
Dim dCHome As Double
|
||||
EgtGetAxisHomePos("C", dCHome)
|
||||
' imposto la l'uscita della ventosa come fosse l'uscita di un utensile
|
||||
EgtSetCalcTool("", "H4", 1)
|
||||
EgtGetCalcPositions(ptRef, dRotAngDeg + dCHome, 0, nStat, dX, dY, dZ)
|
||||
EgtVerifyOutstroke(dX, dY, dZ, dRotAngDeg + dCHome, 0, nStat)
|
||||
If EgtGetAxisId("A") <> GDB_ID.NULL Then
|
||||
' Asse tavola rotante (movimenti solo con A0)
|
||||
EgtGetCalcPositions(ptRef, 0, dRotAngMachDeg, nStat, dX, dY, dZ)
|
||||
' Verifico le corse
|
||||
EgtVerifyOutstroke(dX, dY, dZ, 0, dRotAngMachDeg, nStat)
|
||||
Else
|
||||
EgtGetCalcPositions(ptRef, dRotAngMachDeg, 0, nStat, dX, dY, dZ)
|
||||
' Verifico le corse
|
||||
EgtVerifyOutstroke(dX, dY, dZ, dRotAngMachDeg, 0, nStat)
|
||||
End If
|
||||
|
||||
|
||||
Return nStat
|
||||
End Function
|
||||
|
||||
@@ -721,7 +767,7 @@ Module VacuumCups
|
||||
rmList.RemoveAt(nInd)
|
||||
nInd = rmList.Count() - 1
|
||||
End If
|
||||
' Se non trovato, lo accodo
|
||||
' Se non trovato, lo accodo
|
||||
Else
|
||||
rmList.Add(New RawMoveData(nRawId))
|
||||
nInd = rmList.Count() - 1
|
||||
|
||||
@@ -84,6 +84,11 @@ Module ConstGen
|
||||
|
||||
' Nome testa con ventose per spostamento pezzi
|
||||
Public Const VACUUM_HEAD As String = "H4"
|
||||
Public Const VACUUM_HEAD_2 As String = "H104"
|
||||
' Nome teste laser
|
||||
Public Const LASER_HEAD As String = "H3"
|
||||
Public Const LASER_HEAD_2 As String = "H103"
|
||||
|
||||
' Info tipo ventosa
|
||||
Public Const KEY_VAC_TYPE As String = "VacType"
|
||||
' Nome gruppo layout in testa con ventose
|
||||
@@ -152,6 +157,8 @@ Module ConstGen
|
||||
' Info per identificazione gruppo pezzi
|
||||
Public Const INFO_REFGROUP As String = "RefGroup"
|
||||
Public Const INFO_COUNTERLY As String = "CounterPz"
|
||||
Public Const INFO_PARKIND As String = "ParkInd"
|
||||
Public Const INFO_PARKSTATUS As String = "ParkStatus"
|
||||
|
||||
' Contrassegno di progetto OmagCut
|
||||
Public Const NAME_PROJMARK As String = "OmagCut"
|
||||
@@ -189,6 +196,8 @@ Module ConstGen
|
||||
Public Const INFO_TOPRODAREA As String = "ToProdArea"
|
||||
' Info per nome progetti
|
||||
Public Const INFO_PROJNAME As String = "ProjName"
|
||||
' Info per parcheggio asse C
|
||||
Public Const INFO_CAXESHOME As String = "CAxesHome"
|
||||
|
||||
' Nome layer delle regioni
|
||||
Public Const NAME_REGION As String = "Region"
|
||||
@@ -216,6 +225,8 @@ Module ConstGen
|
||||
Public Const INFO_DEPTH2 As String = "Depth2"
|
||||
Public Const INFO_AGG2 As String = "Agg2"
|
||||
Public Const INFO_ROUNDOFF As String = "RoundOff"
|
||||
Public Const INFO_DIRECTCUT As String = "DirectCut"
|
||||
Public Const INFO_STEP_TYPE As String = "StepType"
|
||||
' 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
|
||||
@@ -311,6 +322,8 @@ Module ConstGen
|
||||
Public Const INFO_AUX_SPLIT_WJ As String = "AUX_SPLIT_WJ"
|
||||
' Info in OutLoop per punto inzio lavorazione WaterJet
|
||||
Public Const INFO_START As String = "Start"
|
||||
' Nome dei tagli diretti inseriti in fase di Splitting
|
||||
Public Const SPLIT_CUT As String = "SplitCut"
|
||||
|
||||
' Nome di pezzo che è una cornice
|
||||
Public Const NAME_FRAME As String = "Frame"
|
||||
|
||||
+28
-1
@@ -19,6 +19,7 @@ Module ConstIni
|
||||
Public Const K_DEBUG As String = "Debug"
|
||||
Public Const K_LICENCE As String = "Licence"
|
||||
Public Const K_NETKEY As String = "NetKey"
|
||||
Public Const K_LOCKID As String = "LockId"
|
||||
Public Const K_MESSAGESDIR As String = "MessagesDir"
|
||||
Public Const K_MESSAGES As String = "Messages"
|
||||
Public Const K_SUPPORT As String = "Support"
|
||||
@@ -50,7 +51,12 @@ Module ConstIni
|
||||
Public Const K_SMARTMACHININGPAGE As String = "SmartMachiningPage"
|
||||
Public Const K_STARTPROGRAM As String = "StartProgram"
|
||||
Public Const K_GENERATECN As String = "GenerateCN"
|
||||
|
||||
Public Const K_FRACTIONPATTERN As String = "FractionPattern"
|
||||
Public Const K_PRECISION As String = "Precision"
|
||||
Public Const K_QUITDRAWPAGE As String = "QuitDrawPage"
|
||||
Public Const K_SHOWNBARROW As String = "ShowNbArrow"
|
||||
Public Const K_SHOWEXPIREASSITANCE As String = "ShowExpireAssistance"
|
||||
Public Const K_ENABLEDXFPARK As String = "EnableDXFPark"
|
||||
|
||||
Public Const S_LANGUAGES As String = "Languages"
|
||||
Public Const K_LANGUAGE As String = "Language"
|
||||
@@ -84,6 +90,7 @@ Module ConstIni
|
||||
Public Const K_TEXMAXLINPIX As String = "TextureMaxLinPixels"
|
||||
Public Const K_ZOOMWIN As String = "ZoomWin"
|
||||
Public Const K_DISTLINE As String = "DistLine"
|
||||
Public Const K_ORTOGRAPHIC As String = "OrtoGraphic"
|
||||
|
||||
Public Const S_ALZFRONT As String = "Alz&Front"
|
||||
Public Const K_ALZFRONT As String = "Alz&Front"
|
||||
@@ -114,6 +121,8 @@ Module ConstIni
|
||||
Public Const K_LASTCOLOR As String = "LastColor"
|
||||
Public Const K_COLOR As String = "Color"
|
||||
|
||||
Public Const S_FRAMECOMPO As String = "FrameCompo"
|
||||
|
||||
Public Const S_EXTCOMPO As String = "Compo"
|
||||
|
||||
Public Const S_INTCOMPO As String = "InternalCompo"
|
||||
@@ -202,6 +211,8 @@ Module ConstIni
|
||||
Public Const K_OFFSZ As String = "OffsZ"
|
||||
Public Const K_OFFSXY As String = "OffsXY"
|
||||
Public Const K_OFFSYY As String = "OffsYY"
|
||||
Public Const K_OFFSXINTERY As String = "OffsYInterY"
|
||||
Public Const K_OFFSXINTERYSAWTH As String = "OffsYInterYSawTh"
|
||||
Public Const K_STARTTRIM As String = "StartTrim"
|
||||
Public Const K_ENDTRIM As String = "EndTrim"
|
||||
Public Const K_OTHERSIDE As String = "OtherSide"
|
||||
@@ -221,9 +232,18 @@ Module ConstIni
|
||||
Public Const K_RAWOFFSX As String = "OffsX"
|
||||
Public Const K_RAWOFFSY As String = "OffsY"
|
||||
Public Const K_RAWKERF As String = "Kerf"
|
||||
Public Const K_ENABLEOTHERREFTAB As String = "EnableOtherRefTab"
|
||||
Public Const K_OTHERREFTAB As String = "OtherRefTab"
|
||||
Public Const K_OTHERREFTABX As String = "OtherRefTabX"
|
||||
Public Const K_OTHERREFTABY As String = "OtherRefTabY"
|
||||
Public Const K_OTHERREFTABPOS As String = "OtherRefTabPos"
|
||||
Public Const K_REFTAB As String = "RefTab"
|
||||
Public Const K_CURRENTREFTAB As String = "CurrRefTab"
|
||||
|
||||
|
||||
Public Const S_RAWMOVE As String = "RawMove"
|
||||
Public Const K_RAWSTEP As String = "Step"
|
||||
Public Const K_EXTRASTEP As String = "ExtraStep"
|
||||
Public Const K_RAWROTATION As String = "Rotation"
|
||||
Public Const K_PERPENDICULAR As String = "Perpendicular"
|
||||
|
||||
@@ -275,6 +295,8 @@ Module ConstIni
|
||||
Public Const S_VEINMATCHING As String = "VeinMatching"
|
||||
Public Const K_VEINMA_ENABLE As String = "Enable"
|
||||
Public Const K_VEINMA_PLACE As String = "WinPlace"
|
||||
Public Const K_VEINMA_WIDTH As String = "Width"
|
||||
Public Const K_VEINMA_HEIGHT As String = "Height"
|
||||
|
||||
Public Const S_FASTGRID As String = "FastGrid"
|
||||
Public Const K_FG_ENABLE As String = "FGEnable"
|
||||
@@ -321,6 +343,8 @@ Module ConstIni
|
||||
Public Const K_DC_FLATT_HEADSIDE As String = "FlattHeadSide"
|
||||
Public Const K_DC_FLATT_MACHTYPE As String = "FlattMachType"
|
||||
Public Const K_DC_FLATT_ROTLOCK As String = "FlattRotLock"
|
||||
Public Const K_DC_FLATT_SAWTH As String = "FlattSawThick"
|
||||
Public Const K_DC_FLAT_CHAINEDPATH As String = "ChainedPath"
|
||||
Public Const K_DC_FLATT_POSX As String = "FlattPosX"
|
||||
Public Const K_DC_FLATT_POSY As String = "FlattPosY"
|
||||
Public Const K_DC_POLISH_NAME As String = "PolishName"
|
||||
@@ -328,6 +352,9 @@ Module ConstIni
|
||||
Public Const K_DC_TEST_LENGTH As String = "TestLength"
|
||||
Public Const K_DC_TEST_ANGH As String = "TestAngH"
|
||||
Public Const K_DC_TEST_OFFSET As String = "TestOffset"
|
||||
Public Const K_DC_OFFSET_SQUARING As String = "OffsetSquaring"
|
||||
Public Const K_DC_EXTRA_LEN_SQUARING As String = "ExtraLenSquaring"
|
||||
Public Const K_ENABLEINVERT As String = "EnableInvert"
|
||||
|
||||
Public Const S_STATDATA As String = "StatData"
|
||||
Public Const K_SD_DAY As String = "Day"
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
|
||||
Public Const S_PARTPROGRAM As String = "PartProgram"
|
||||
Public Const K_EXTENSION As String = "Extension"
|
||||
Public Const K_EXTFILECN As String = "ExtFileCN"
|
||||
|
||||
Public Const S_AXES As String = "Axes"
|
||||
Public Const K_AXESNUM As String = "AxesNum"
|
||||
@@ -31,6 +32,7 @@
|
||||
Public Const K_A10ID As String = "A10Id"
|
||||
Public Const K_DELTA_C As String = "DeltaC"
|
||||
Public Const K_ININCHES As String = "InInches"
|
||||
Public Const K_CPOS As String = "CPos"
|
||||
|
||||
Public Const S_NCSIEMENS As String = "NcSiemens"
|
||||
Public Const K_COMM_NAME As String = "CommName"
|
||||
@@ -46,9 +48,20 @@
|
||||
Public Const K_THREADSLEEP As String = "ThreadSleep"
|
||||
Public Const K_PHOTODELEY As String = "PhotoDeley"
|
||||
|
||||
Public Const S_NCFANUC As String = "NcFanuc"
|
||||
Public Const K_SETNCMODE As String = "SetNcMode"
|
||||
Public Const K_BASEADDRINT As String = "BaseAddrInt"
|
||||
Public Const K_BASEADDRBIT As String = "BaseAddrBit"
|
||||
Public Const K_NUMVARINT As String = "NumVarInt"
|
||||
Public Const K_NUMVARBIT As String = "NumVarBit"
|
||||
|
||||
Public Const S_EXECLUA As String = "ExecLua"
|
||||
Public Const K_FILESCRIPT_LUA As String = "FileScript"
|
||||
|
||||
Public Const S_CAMERAHQ As String = "CameraHQ"
|
||||
Public Const K_CAMERAHQ_ENABLE As String = "EnableHQ"
|
||||
Public Const K_CAMERAHQ_ACTIVATE As String = "ActivateHQ"
|
||||
|
||||
Public Const S_NCDATA As String = "NcData"
|
||||
Public Const K_NEWVARIABLE As String = "NewVariable"
|
||||
Public Const K_NEWCONSOLE As String = "NewConsole"
|
||||
@@ -78,12 +91,16 @@
|
||||
Public Const K_TABLEDOWN As String = "TableDown"
|
||||
Public Const K_MANUAL As String = "Manual"
|
||||
Public Const K_DOORCLOSED As String = "DoorClosed"
|
||||
Public Const K_DOOROPENDED As String = "DoorOpened"
|
||||
Public Const K_LIMITZ As String = "LimitZ"
|
||||
Public Const K_POWEROVR As String = "PowerOvr"
|
||||
Public Const K_PARKING As String = "Parking"
|
||||
Public Const K_ENABLEZONE As String = "EnableZone"
|
||||
Public Const K_ENABLEPC As String = "EnablePC"
|
||||
Public Const K_HSM As String = "Hsm"
|
||||
Public Const BTN_ENABLE_ZONE_1 As String = "EnableZone1"
|
||||
Public Const BTN_ENABLE_ZONE_2 As String = "EnableZone2"
|
||||
Public Const BTN_ENABLE_PC As String = "EnablePC"
|
||||
Public Const K_VACUUMUP As String = "VacuumUp"
|
||||
Public Const K_VACUUMDOWN As String = "VacuumDown"
|
||||
Public Const K_VACUUM2UP As String = "Vacuum2Up"
|
||||
@@ -112,6 +129,8 @@
|
||||
Public Const K_FEEDHOLD As String = "FeedHold"
|
||||
Public Const K_SPOTLIGHT1 As String = "SpotLight1"
|
||||
Public Const K_SPOTLIGHT2 As String = "SpotLight2"
|
||||
Public Const K_NAXES As String = "nAxes"
|
||||
Public Const K_RESETSTATUS As String = "ResetStatus"
|
||||
' Nuove variabili
|
||||
Public Const K_SPEEDHOLD As String = "SpeedHold"
|
||||
Public Const K_XYJOG As String = "XYJog"
|
||||
@@ -142,6 +161,10 @@
|
||||
Public Const K_PRODLIPROBINGTCPOS2VAR As String = "ProbingTcPos2Var"
|
||||
Public Const K_PRODLISAWDIAMETER2VAR As String = "SawDiameter2Var"
|
||||
|
||||
Public Const S_POLISHLINE As String = "PolishLine"
|
||||
Public Const K_CLICKSTATE As String = "ClickState"
|
||||
Public Const k_CLICKDIR As String = "ClickDir"
|
||||
|
||||
Public Const S_STATISTICS As String = "Stats"
|
||||
Public Const K_DATADIR As String = "DataDir"
|
||||
Public Const K_SHOWAREAS As String = "ShowAreas"
|
||||
@@ -158,6 +181,12 @@
|
||||
Public Const K_PHOTO_OFFSETY As String = "OffsetY"
|
||||
Public Const K_PHOTO_TAB2_OFFSETX As String = "Tab2OffsetX"
|
||||
Public Const K_PHOTO_TAB2_OFFSETY As String = "Tab2OffsetY"
|
||||
Public Const K_PHOTO_HQ_OFFSETX As String = "HQOffsetX"
|
||||
Public Const K_PHOTO_HQ_OFFSETY As String = "HQOffsetY"
|
||||
Public Const K_CAMERA_DIRECT_CMD As String = "CameraDirectCmd"
|
||||
Public Const K_CAMERA_STATE_VAR As String = "CameraStateVar"
|
||||
Public Const K_ENABELE_GOHOME_FOR_PHOTO As String = "EnableGoHomeForPhoto"
|
||||
Public Const K_PENDIG_TIME_FOR_PHOTO As String = "PendigTimeForPhoto"
|
||||
|
||||
Public Const S_TOOLS As String = "Tools"
|
||||
Public Const K_DRILLBIT As String = "Drillbit"
|
||||
@@ -207,6 +236,7 @@
|
||||
Public Const K_MACH_MILLING_ON_SINKS As String = "MillingOnSinks"
|
||||
Public Const K_MACH_MILLING_SHORTENING As String = "MillingShortening"
|
||||
Public Const K_MACH_ENGRAVING_WITHMILL As String = "EngravingWithMill"
|
||||
Public Const K_MACH_STARTCENERTOOLPATH As String = "StartCenterToolPath"
|
||||
Public Const K_MACH_ENGRAVING_DEPTH As String = "EngravingDepth"
|
||||
Public Const K_MACH_ENGRAVING_WIDTH As String = "EngravingWidth"
|
||||
Public Const K_MACH_NEST_ALIGNED As String = "Aligned"
|
||||
@@ -219,7 +249,12 @@
|
||||
Public Const K_MACH_CUTFSEVLEN As String = "CutFsevLen"
|
||||
Public Const K_MACH_CUTFSEVPERC As String = "CutFsevPerc"
|
||||
Public Const K_USELASERORIGIN As String = "UseLaserOrigin"
|
||||
' DrillMillC90
|
||||
Public Const K_HOLES_DIAMITERWJ As String = "HolesDiameterWJ"
|
||||
Public Const K_HOLES_OFFSETWJ As String = "HolesOffsetWJ"
|
||||
Public Const K_MIN_RADIUSWJ As String = "MinRadiusWJ"
|
||||
Public Const K_MACH_DRILLINGWJ_ON_CORNERS As String = "DrillingWJOnCorners"
|
||||
Public Const K_MACH_RECTIFICATION_ON_SUBSQUARE As String = "RectificationSubSqWJ"
|
||||
Public Const K_MACH_DRILL_MILL_C90 As String = "DrillMillC90"
|
||||
' CutLongDxSx
|
||||
' AngRotMultiCut
|
||||
' MinDistHeadsMultiCut
|
||||
@@ -266,6 +301,7 @@
|
||||
Public Const S_MACH_PROBING As String = "Probing"
|
||||
Public Const K_PROBINGSTATEVAR As String = "ProbingStateVar"
|
||||
Public Const K_SAWDIAMETER As String = "SawDiameter"
|
||||
Public Const K_TOOLLENGTH As String = "ToolLength"
|
||||
Public Const K_RAWTHICKNESS As String = "RawThickness"
|
||||
Public Const K_ENABLERAWPROBE As String = "EnableRawProbe"
|
||||
|
||||
|
||||
@@ -0,0 +1,177 @@
|
||||
<UserControl x:Class="ControlsDirectCutUC"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
DataContext="Self"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:OmagCUT="clr-namespace:OmagCUT"
|
||||
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="597.3" d:DesignWidth="256">
|
||||
|
||||
<Grid Name="LeftButtonGrid" Grid.Row="1" >
|
||||
<Grid.RowDefinitions>
|
||||
<!--<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="7*"/>-->
|
||||
<RowDefinition Height="9*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<!-- Definizione della Grid laterale -->
|
||||
<Grid Name="CutTypeGrid" Grid.Row="1" >
|
||||
<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*"/>
|
||||
<!--<RowDefinition Height="1*"/>-->
|
||||
</Grid.RowDefinitions>
|
||||
<Button Name="ManualBtn" Grid.Column="2" Grid.Row="0"
|
||||
Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="80"/>
|
||||
<ColumnDefinition Width="140"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Image Source="{DynamicResource Movimento-manualeImg}" Style="{DynamicResource OmagCut_ButtonIcon}" Grid.Column="0" />
|
||||
<TextBlock Name="ManualTxt" Grid.Column="1"
|
||||
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</Grid>
|
||||
</Button>
|
||||
|
||||
<Button Name="SingleCutBtn" Grid.Row="1"
|
||||
Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="80"/>
|
||||
<ColumnDefinition Width="140"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Image Source="{DynamicResource Taglio-singoloImg}" Style="{DynamicResource OmagCut_ButtonIcon}" Grid.Column="0" />
|
||||
<TextBlock Name="SingleCutTxt" Grid.Column="1"
|
||||
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</Grid>
|
||||
</Button>
|
||||
|
||||
<Button Name="MultipleCutBtn" Grid.Row="2"
|
||||
Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="80"/>
|
||||
<ColumnDefinition Width="140"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Image Source="{DynamicResource Taglio-multiploImg}" Style="{DynamicResource OmagCut_ButtonIcon}" Grid.Column="0" />
|
||||
<TextBlock Name="MultipleCutTxt" Grid.Column="1"
|
||||
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</Grid>
|
||||
</Button>
|
||||
|
||||
<Button Name="GridCutBtn" Grid.Row="3"
|
||||
Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="80"/>
|
||||
<ColumnDefinition Width="140"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Image Source="{DynamicResource Taglio-grigliaImg}" Style="{DynamicResource OmagCut_ButtonIcon}" Grid.Column="0" />
|
||||
<TextBlock Name="GridCutTxt" Grid.Column="1"
|
||||
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</Grid>
|
||||
</Button>
|
||||
|
||||
|
||||
<Button Name="SingleDrillBtn" Grid.Row="4"
|
||||
Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="80"/>
|
||||
<ColumnDefinition Width="140"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Image Source="{DynamicResource Foro-singoloImg}" Style="{DynamicResource OmagCut_ButtonIcon}" Grid.Column="0" />
|
||||
<TextBlock Name="SingleDrillTxt" Grid.Column="1"
|
||||
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</Grid>
|
||||
</Button>
|
||||
|
||||
<Button Name="FlatteningCutBtn" Grid.Row="5"
|
||||
Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="80"/>
|
||||
<ColumnDefinition Width="140"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Image Source="{DynamicResource SpianaturaImg}" Style="{DynamicResource OmagCut_ButtonIcon}" Grid.Column="0" />
|
||||
<TextBlock Name="FlatteningCutTxt" Grid.Column="1"
|
||||
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</Grid>
|
||||
</Button>
|
||||
|
||||
<!--<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"
|
||||
Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="80"/>
|
||||
<ColumnDefinition Width="140"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Image Source="{DynamicResource Copia-dimaImg}" Style="{DynamicResource OmagCut_ButtonIcon}" Grid.Column="0" />
|
||||
<TextBlock Name="CopyTemplateTxt" Grid.Column="1"
|
||||
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</Grid>
|
||||
</Button>-->
|
||||
|
||||
<Button Name="SquaringBtn" Grid.Row="6"
|
||||
Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="80"/>
|
||||
<ColumnDefinition Width="140"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Image Source="{DynamicResource Copia-dimaImg}" Style="{DynamicResource OmagCut_ButtonIcon}" Grid.Column="0" />
|
||||
<TextBlock Name="SquaringTxt" Grid.Column="1"
|
||||
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</Grid>
|
||||
</Button>
|
||||
|
||||
<!--<Button Name="SawTestBtn" Grid.Row="6"
|
||||
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 Name="ChangeUCGrid" Grid.Row="7">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Button Name="ChangeUCBtn" Grid.ColumnSpan="2" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Grid>
|
||||
<!--<Image Name="ImageCompo9" Source="{DynamicResource NumericKeyboardArrowImg}" />-->
|
||||
<TextBlock Name="ChangeUCTxBl" Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</Grid>
|
||||
</Button>
|
||||
</Grid>
|
||||
|
||||
</Grid>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
@@ -0,0 +1,267 @@
|
||||
Imports EgtUILib
|
||||
Public Class ControlsDirectCutUC
|
||||
|
||||
' Dichiarazione delle Page UserControl
|
||||
Private m_MainWindow As MainWindow = DirectCast(Application.Current.MainWindow, MainWindow)
|
||||
' ---- MAI USATA ---- nuova finestra per i comandi per il taglio manuale nuovo
|
||||
Friend m_SingleCutAuto As SingleCutAuto
|
||||
' ---- MAI USATA ----
|
||||
Friend m_MachineButtons As MachineButtonsUC
|
||||
Friend m_ManualAxesMove As ManualAxesMoveUC
|
||||
Friend m_SingleCut As SingleCutUC
|
||||
Friend m_SingleDrill As SingleDrillUC
|
||||
Friend m_MultipleCut As MultipleCut
|
||||
Friend m_GridCut As GridCut
|
||||
Friend m_FlatteningCut As FlatteningCut
|
||||
Friend m_Squaring As SquaringUC
|
||||
Friend m_ControlsMachineButton As ControlsMachineButtonUC
|
||||
Friend m_VacuumMachineButton As VacuumMachineButtonUC
|
||||
|
||||
Friend m_ControlDirectCutPage1 As ControlsDirectCutUC1
|
||||
|
||||
' Stato di visualizzazione della macchina
|
||||
Friend m_bShowMachine As Boolean = False
|
||||
Friend m_nMachLook As Integer = MCH_LOOK.ALL
|
||||
' Dati generali CN
|
||||
Friend m_CN As CN_generico
|
||||
Private m_bFirst As Boolean = True
|
||||
' Riferimento alla pagina correntemente attiva
|
||||
Friend m_ActiveDirectCutPage As DirectCutPages = DirectCutPages.DirectCut
|
||||
' Variabili che indicano attivazione paginette con bottoni macchina
|
||||
Private m_ControlsBtn_IsActive As Boolean
|
||||
|
||||
Public Shared m_dZSafe As Double = 52
|
||||
|
||||
' Variabile che indica se sono attivi i bottoni macchina nuovi o vecchi
|
||||
Friend m_NewMachineButtonsType As Boolean
|
||||
' Indica che la finestra del talio Singolo deve essere di tipo manuale
|
||||
Friend m_bManulaCut As Boolean = False
|
||||
|
||||
' elenco dei nuovi bottoni
|
||||
Private m_ButtonJogList As New List(Of MachineButton)
|
||||
|
||||
Enum DirectCutPages
|
||||
' pagina principale di tagli diretti
|
||||
DirectCut
|
||||
' nuova pagina di tagli diretti
|
||||
DirectCut1
|
||||
' elenco dei comandi associati
|
||||
ManualAxesMove
|
||||
SingleCut
|
||||
MultipleCut
|
||||
GridCut
|
||||
FlatteningCut
|
||||
Polishing
|
||||
CopyTemplate
|
||||
SingleCutAuto
|
||||
SingleDrill
|
||||
Squaring
|
||||
End Enum
|
||||
|
||||
Private Sub ControlsDirectCutUC_Initialized(sender As Object, e As EventArgs) Handles Me.Initialized
|
||||
' leggo la configurazione del programma per i nuovi tagli manuali
|
||||
m_bManulaCut = GetPrivateProfileInt(S_GENERAL, K_MANUAL_CUT, 0, m_MainWindow.GetIniFile()) <> 0
|
||||
|
||||
'Creazione delle Page UserControl
|
||||
m_MachineButtons = New MachineButtonsUC
|
||||
m_ManualAxesMove = New ManualAxesMoveUC
|
||||
m_SingleCut = New SingleCutUC
|
||||
m_SingleDrill = New SingleDrillUC
|
||||
m_MultipleCut = New MultipleCut
|
||||
m_GridCut = New GridCut
|
||||
m_FlatteningCut = New FlatteningCut
|
||||
m_Squaring = New SquaringUC
|
||||
m_ControlsMachineButton = New ControlsMachineButtonUC
|
||||
m_VacuumMachineButton = New VacuumMachineButtonUC
|
||||
' reiferimento alla pagina succesiva
|
||||
m_ControlDirectCutPage1 = New ControlsDirectCutUC1
|
||||
' Costruisco la finestra per il nuovo tipo di taglio manuale
|
||||
m_SingleCutAuto = New SingleCutAuto
|
||||
|
||||
'Posizionemento nella griglia delle Page UserControl DirectCutPageUC
|
||||
m_MachineButtons.SetValue(Grid.RowProperty, 2)
|
||||
m_MachineButtons.SetValue(Grid.ColumnSpanProperty, 7)
|
||||
m_ManualAxesMove.SetValue(Grid.RowProperty, 1)
|
||||
If m_bManulaCut Then
|
||||
m_SingleCutAuto.SetValue(Grid.RowProperty, 1)
|
||||
Else
|
||||
m_SingleCut.SetValue(Grid.RowProperty, 1)
|
||||
End If
|
||||
m_SingleDrill.SetValue(Grid.RowProperty, 1)
|
||||
m_MultipleCut.SetValue(Grid.RowProperty, 1)
|
||||
m_GridCut.SetValue(Grid.RowProperty, 1)
|
||||
m_FlatteningCut.SetValue(Grid.RowProperty, 1)
|
||||
m_Squaring.SetValue(Grid.RowProperty, 1)
|
||||
m_ControlsMachineButton.SetValue(Grid.RowProperty, 1)
|
||||
m_VacuumMachineButton.SetValue(Grid.RowProperty, 1)
|
||||
|
||||
' ManualBtn.Content = EgtMsg(90201)
|
||||
ManualTxt.Text = EgtMsg(90201)
|
||||
'SingleCutBtn.Content = EgtMsg(90202)
|
||||
SingleCutTxt.Text = EgtMsg(90202)
|
||||
'SingleDrillBtn.Content = "Foro singolo"
|
||||
SingleDrillTxt.Text = EgtMsg(90258)
|
||||
'MultipleCutBtn.Content = EgtMsg(90203)
|
||||
MultipleCutTxt.Text = EgtMsg(90203)
|
||||
'GridCutBtn.Content = EgtMsg(90204)
|
||||
GridCutTxt.Text = EgtMsg(90204)
|
||||
'FlatteningCutBtn.Content = EgtMsg(90206)
|
||||
FlatteningCutTxt.Text = EgtMsg(90206)
|
||||
' 90261=Squaring
|
||||
SquaringTxt.Text = EgtMsg(90261)
|
||||
' 90409=Others
|
||||
ChangeUCTxBl.Text = EgtMsg(90409)
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub ControlsDirectCutUC_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded
|
||||
' Se rientro da simulazione
|
||||
If m_ActiveDirectCutPage = DirectCutPages.SingleCut Then
|
||||
LeftButtonGrid.Children.Add(m_SingleCut)
|
||||
Return
|
||||
ElseIf m_ActiveDirectCutPage = DirectCutPages.SingleCutAuto Then
|
||||
LeftButtonGrid.Children.Add(m_SingleCutAuto)
|
||||
Return
|
||||
ElseIf m_ActiveDirectCutPage = DirectCutPages.MultipleCut Then
|
||||
LeftButtonGrid.Children.Add(m_MultipleCut)
|
||||
Return
|
||||
ElseIf m_ActiveDirectCutPage = DirectCutPages.GridCut Then
|
||||
LeftButtonGrid.Children.Add(m_GridCut)
|
||||
Return
|
||||
ElseIf m_ActiveDirectCutPage = DirectCutPages.FlatteningCut Then
|
||||
LeftButtonGrid.Children.Add(m_FlatteningCut)
|
||||
Return
|
||||
ElseIf m_ActiveDirectCutPage = DirectCutPages.SingleDrill Then
|
||||
LeftButtonGrid.Children.Add(m_SingleDrill)
|
||||
Return
|
||||
ElseIf m_ActiveDirectCutPage = DirectCutPages.Squaring Then
|
||||
LeftButtonGrid.Children.Add(m_Squaring)
|
||||
Return
|
||||
End If
|
||||
|
||||
If m_MainWindow.m_DirectCutPageUC.m_ActiveControl <> DirectCutPageUC.Controls.MachineButtonUC Or
|
||||
m_MainWindow.m_DirectCutPageUC.m_ActiveControl <> DirectCutPageUC.Controls.VacuumButtonUC Then
|
||||
' Caso standard
|
||||
m_ActiveDirectCutPage = DirectCutPages.DirectCut
|
||||
End If
|
||||
|
||||
' 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
|
||||
Else
|
||||
SingleCutBtn.IsEnabled = bRawOk
|
||||
End If
|
||||
MultipleCutBtn.IsEnabled = bRawOk
|
||||
GridCutBtn.IsEnabled = bRawOk
|
||||
SingleDrillBtn.IsEnabled = (bRawOk And bH1Exists)
|
||||
FlatteningCutBtn.IsEnabled = (bRawOk And bH1Exists)
|
||||
SquaringBtn.IsEnabled = bRawOk
|
||||
|
||||
' aggiorno la visualizzazione dei parametri
|
||||
ReloadParam()
|
||||
|
||||
' Nascondo i pezzi in parcheggio
|
||||
HideParkedParts()
|
||||
EgtZoom(ZM.ALL)
|
||||
|
||||
End Sub
|
||||
|
||||
' ricarico i parametri utensili per definizione
|
||||
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
|
||||
If Not bSaw Then
|
||||
EgtOutLog(" WARNING! Impossible to get point from SAW, there isn't SAW or SAWING! It's available only by DRAW")
|
||||
End If
|
||||
m_SingleCut.SetEnableParam(bSaw)
|
||||
m_MultipleCut.SetEnableParam(bSaw)
|
||||
m_GridCut.SetEnableParam(bSaw)
|
||||
End Sub
|
||||
|
||||
#Region "COMMAND CLICK BTN"
|
||||
|
||||
Private Sub ManualBtn_Click(sender As Object, e As RoutedEventArgs) Handles ManualBtn.Click
|
||||
LeftButtonGrid.Children.Add(m_ManualAxesMove)
|
||||
m_ActiveDirectCutPage = DirectCutPages.ManualAxesMove
|
||||
End Sub
|
||||
|
||||
Private Sub SingleCutBtn_Click(sender As Object, e As RoutedEventArgs) Handles SingleCutBtn.Click
|
||||
If m_bManulaCut Then
|
||||
LeftButtonGrid.Children.Add(m_SingleCutAuto)
|
||||
m_ActiveDirectCutPage = DirectCutPages.SingleCutAuto
|
||||
Else
|
||||
LeftButtonGrid.Children.Add(m_SingleCut)
|
||||
m_ActiveDirectCutPage = DirectCutPages.SingleCut
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub MultipleCutBtn_Click(sender As Object, e As RoutedEventArgs) Handles MultipleCutBtn.Click
|
||||
LeftButtonGrid.Children.Add(m_MultipleCut)
|
||||
m_ActiveDirectCutPage = DirectCutPages.MultipleCut
|
||||
End Sub
|
||||
|
||||
Private Sub GridCutBtn_Click(sender As Object, e As RoutedEventArgs) Handles GridCutBtn.Click
|
||||
LeftButtonGrid.Children.Add(m_GridCut)
|
||||
m_ActiveDirectCutPage = DirectCutPages.GridCut
|
||||
End Sub
|
||||
|
||||
Private Sub FlatteningCutBtn_Click(sender As Object, e As RoutedEventArgs) Handles FlatteningCutBtn.Click
|
||||
LeftButtonGrid.Children.Add(m_FlatteningCut)
|
||||
m_ActiveDirectCutPage = DirectCutPages.FlatteningCut
|
||||
End Sub
|
||||
|
||||
Private Sub SquaringBtn_Click(sender As Object, e As RoutedEventArgs) Handles SquaringBtn.Click
|
||||
LeftButtonGrid.Children.Add(m_Squaring)
|
||||
m_ActiveDirectCutPage = DirectCutPages.Squaring
|
||||
End Sub
|
||||
|
||||
Private Sub SingleDrillBtn_Click(sender As Object, e As RoutedEventArgs) Handles SingleDrillBtn.Click
|
||||
LeftButtonGrid.Children.Add(m_SingleDrill)
|
||||
m_ActiveDirectCutPage = DirectCutPages.SingleDrill
|
||||
End Sub
|
||||
|
||||
' cambio pagina
|
||||
Private Sub ChangeUCBtn_Click(sender As Object, e As RoutedEventArgs) Handles ChangeUCBtn.Click
|
||||
DirectCutPage_Unloaded(Nothing, Nothing)
|
||||
m_ActiveDirectCutPage = DirectCutPages.DirectCut
|
||||
m_MainWindow.m_DirectCutPageUC.LoadDirectCutUC1()
|
||||
End Sub
|
||||
|
||||
#End Region ' Command Click Btn
|
||||
|
||||
|
||||
Friend Sub DirectCutPage_Unloaded(sender As Object, e As RoutedEventArgs) Handles Me.Unloaded
|
||||
Select Case m_ActiveDirectCutPage
|
||||
Case DirectCutPages.DirectCut Or DirectCutPages.ManualAxesMove
|
||||
' Non è necessario fare alcunché
|
||||
Case DirectCutPages.SingleCut
|
||||
LeftButtonGrid.Children.Remove(m_SingleCut)
|
||||
Case DirectCutPages.SingleCutAuto
|
||||
LeftButtonGrid.Children.Remove(m_SingleCutAuto)
|
||||
Case DirectCutPages.MultipleCut
|
||||
LeftButtonGrid.Children.Remove(m_MultipleCut)
|
||||
Case DirectCutPages.GridCut
|
||||
LeftButtonGrid.Children.Remove(m_GridCut)
|
||||
Case DirectCutPages.FlatteningCut
|
||||
LeftButtonGrid.Children.Remove(m_FlatteningCut)
|
||||
Case DirectCutPages.SingleDrill
|
||||
LeftButtonGrid.Children.Remove(m_SingleDrill)
|
||||
Case DirectCutPages.Squaring
|
||||
LeftButtonGrid.Children.Remove(m_Squaring)
|
||||
End Select
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,86 @@
|
||||
<UserControl x:Class="ControlsDirectCutUC1"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
DataContext="Self"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:OmagCUT="clr-namespace:OmagCUT"
|
||||
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="597.3" d:DesignWidth="256">
|
||||
|
||||
<Grid Name="LeftButtonGrid" Grid.Row="1" >
|
||||
<Grid.RowDefinitions>
|
||||
<!--<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="7*"/>-->
|
||||
<RowDefinition Height="9*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<!-- Definizione della Grid laterale -->
|
||||
<Grid Name="CutTypeGrid" Grid.Row="1" >
|
||||
<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*"/>
|
||||
<!--<RowDefinition Height="1*"/>-->
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<Button Name="SawTestBtn" Grid.Row="0"
|
||||
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>
|
||||
|
||||
<Button Name="PolishingBtn" Grid.Row="1"
|
||||
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="2"
|
||||
Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="80"/>
|
||||
<ColumnDefinition Width="140"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Image Source="{DynamicResource Copia-dimaImg}" Style="{DynamicResource OmagCut_ButtonIcon}" Grid.Column="0" />
|
||||
<TextBlock Name="CopyTemplateTxt" Grid.Column="1"
|
||||
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</Grid>
|
||||
</Button>
|
||||
|
||||
<Grid Name="ChangeUC1Grid" Grid.Row="7">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Button Name="ChangeUC1Btn" Grid.ColumnSpan="2" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Grid>
|
||||
<Image Name="ImageCompo9" Source="{DynamicResource NumericKeyboardArrowImg}" />
|
||||
<!--<TextBlock Name="LabelCompo9" Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>-->
|
||||
</Grid>
|
||||
</Button>
|
||||
</Grid>
|
||||
|
||||
</Grid>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
@@ -0,0 +1,145 @@
|
||||
Imports EgtUILib
|
||||
Public Class ControlsDirectCutUC1
|
||||
|
||||
' Dichiarazione delle Page UserControl
|
||||
Private m_MainWindow As MainWindow = DirectCast(Application.Current.MainWindow, MainWindow)
|
||||
Friend m_Polishing As Polishing
|
||||
Friend m_CopyTemplate As CopyTemplateUC
|
||||
Friend m_SawTest As SawTestUC
|
||||
|
||||
' Stato di visualizzazione della macchina
|
||||
Friend m_bShowMachine As Boolean = False
|
||||
Friend m_nMachLook As Integer = MCH_LOOK.ALL
|
||||
' Dati generali CN
|
||||
Friend m_CN As CN_generico
|
||||
Private m_bFirst As Boolean = True
|
||||
' Riferimento alla pagina correntemente attiva
|
||||
Friend m_ActiveDirectCutPage As DirectCutPages = DirectCutPages.DirectCut
|
||||
' Variabili che indicano attivazione paginette con bottoni macchina
|
||||
Private m_ControlsBtn_IsActive As Boolean
|
||||
|
||||
Public Shared m_dZSafe As Double = 52
|
||||
|
||||
' Variabile che indica se sono attivi i bottoni macchina nuovi o vecchi
|
||||
Friend m_NewMachineButtonsType As Boolean
|
||||
' Indica che la finestra del talio Singolo deve essere di tipo manuale
|
||||
Friend m_bManulaCut As Boolean = False
|
||||
|
||||
Enum DirectCutPages
|
||||
DirectCut
|
||||
DirectCut1
|
||||
Polishing
|
||||
CopyTemplate
|
||||
SawTest
|
||||
End Enum
|
||||
|
||||
Private Sub ControlsDirectCutUC_Initialized(sender As Object, e As EventArgs) Handles Me.Initialized
|
||||
' leggo la configurazione del programma per i nuovi tagli manuali
|
||||
m_bManulaCut = GetPrivateProfileInt(S_GENERAL, K_MANUAL_CUT, 0, m_MainWindow.GetIniFile()) <> 0
|
||||
|
||||
'Creazione delle Page UserControl
|
||||
m_SawTest = New SawTestUC
|
||||
m_Polishing = New Polishing
|
||||
m_CopyTemplate = New CopyTemplateUC
|
||||
|
||||
'Posizionemento nella griglia delle Page UserControl
|
||||
m_SawTest.SetValue(Grid.RowProperty, 1)
|
||||
m_Polishing.SetValue(Grid.RowProperty, 1)
|
||||
m_CopyTemplate.SetValue(Grid.RowProperty, 1)
|
||||
|
||||
' assegno i nomi ai pulsanti
|
||||
SawTestTxt.Text = EgtMsg(90207)
|
||||
PolishingTxt.Text = EgtMsg(90231)
|
||||
'CopyTemplateBtn.Content = EgtMsg(90209)
|
||||
CopyTemplateTxt.Text = EgtMsg(90209)
|
||||
'SquaringTxt.Text = "Squaring"
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub ControlsDirectCutUC1_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded
|
||||
' Se rientro da simulazione
|
||||
If m_ActiveDirectCutPage = DirectCutPages.SawTest Then
|
||||
LeftButtonGrid.Children.Add(m_SawTest)
|
||||
Return
|
||||
ElseIf m_ActiveDirectCutPage = DirectCutPages.CopyTemplate Then
|
||||
Me.LeftButtonGrid.Children.Add(m_CopyTemplate)
|
||||
Return
|
||||
ElseIf m_ActiveDirectCutPage = DirectCutPages.Polishing Then
|
||||
Me.LeftButtonGrid.Children.Add(m_Polishing)
|
||||
Return
|
||||
End If
|
||||
|
||||
' Caso standard
|
||||
m_ActiveDirectCutPage = DirectCutPages.DirectCut1
|
||||
|
||||
' 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)
|
||||
|
||||
PolishingBtn.IsEnabled = (bRawOk And m_MainWindow.m_CurrentMachine.bPolishing)
|
||||
SawTestBtn.IsEnabled = (bRawOk And bH1Exists)
|
||||
CopyTemplateBtn.IsEnabled = bH1Exists
|
||||
|
||||
' aggiorno la visualizzazione dei parametri
|
||||
ReloadParam()
|
||||
|
||||
' Nascondo i pezzi in parcheggio
|
||||
HideParkedParts()
|
||||
EgtZoom(ZM.ALL)
|
||||
|
||||
End Sub
|
||||
|
||||
' ricarica i dati utensili
|
||||
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
|
||||
If Not bSaw Then
|
||||
EgtOutLog(" WARNING! Impossible to get point from SAW, there isn't SAW or SAWING! It's available only by DRAW")
|
||||
End If
|
||||
'm_SingleCut.SetEnableParam(bSaw)
|
||||
'm_MultipleCut.SetEnableParam(bSaw)
|
||||
'm_GridCut.SetEnableParam(bSaw)
|
||||
End Sub
|
||||
|
||||
#Region "COMMAND CLICK BTN"
|
||||
Private Sub SawTestBtn_Click(sender As Object, e As RoutedEventArgs) Handles SawTestBtn.Click
|
||||
LeftButtonGrid.Children.Add(m_SawTest)
|
||||
m_ActiveDirectCutPage = DirectCutPages.SawTest
|
||||
End Sub
|
||||
|
||||
Private Sub PolishingBtn_Click(sender As Object, e As RoutedEventArgs) Handles PolishingBtn.Click
|
||||
LeftButtonGrid.Children.Add(m_Polishing)
|
||||
m_ActiveDirectCutPage = DirectCutPages.Polishing
|
||||
End Sub
|
||||
|
||||
Private Sub CopyTemplateBtn_Click(sender As Object, e As RoutedEventArgs) Handles CopyTemplateBtn.Click
|
||||
LeftButtonGrid.Children.Add(m_CopyTemplate)
|
||||
m_ActiveDirectCutPage = DirectCutPages.CopyTemplate
|
||||
End Sub
|
||||
|
||||
Private Sub ChangeUC1Btn_Click(sender As Object, e As RoutedEventArgs) Handles ChangeUC1Btn.Click
|
||||
DirectCutPage_Unloaded(Nothing, Nothing)
|
||||
m_ActiveDirectCutPage = DirectCutPages.DirectCut1
|
||||
m_MainWindow.m_DirectCutPageUC.LoadDirectCutUC()
|
||||
End Sub
|
||||
|
||||
#End Region ' Command Click Btn
|
||||
|
||||
Friend Sub DirectCutPage_Unloaded(sender As Object, e As RoutedEventArgs) Handles Me.Unloaded
|
||||
Select Case m_ActiveDirectCutPage
|
||||
Case DirectCutPages.SawTest
|
||||
LeftButtonGrid.Children.Remove(m_SawTest)
|
||||
Case DirectCutPages.Polishing
|
||||
LeftButtonGrid.Children.Remove(m_Polishing)
|
||||
Case DirectCutPages.CopyTemplate
|
||||
LeftButtonGrid.Children.Remove(m_CopyTemplate)
|
||||
End Select
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
@@ -23,6 +23,9 @@ Public Class ControlsMachineButtonUC
|
||||
Friend m_CN As CN_generico
|
||||
Private m_bFirst As Boolean = True
|
||||
|
||||
' visualizzo l'elenco degli elementi della pagina sono al primo avvio
|
||||
Friend Shared m_OutLogTypeButton As Boolean = True
|
||||
|
||||
' Creazione converter da String a ImageSource
|
||||
Dim ImageConverter As New ImageSourceConverter
|
||||
|
||||
@@ -72,10 +75,37 @@ Public Class ControlsMachineButtonUC
|
||||
If Not IsNothing(ButtonToAdd) Then m_ButtonList.Add(ButtonToAdd)
|
||||
End If
|
||||
End While
|
||||
|
||||
For Each MachineButton As MachineButton In m_ButtonList
|
||||
GetTypeButton(MachineButton)
|
||||
Next
|
||||
m_OutLogTypeButton = False
|
||||
|
||||
NotifyPropertyChanged("ButtonList")
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#Region "STATE CHANGED"
|
||||
' ------------------------------------------------------------------------------
|
||||
' i segeunti metodi notificano il cambiamento di stato di specifici bottoni
|
||||
'-------------------------------------------------------------------------------
|
||||
|
||||
Friend Sub GetTypeButton(CurrMachineButton As MachineButton)
|
||||
If Not m_OutLogTypeButton Then Return
|
||||
Dim BtnType As Type = CurrMachineButton.GetType
|
||||
If BtnType Is GetType(NoStateButton) Then
|
||||
EgtOutLog(" ► " & BtnType.ToString.Replace("OmagCUT.", "(0) ") & " , " & CurrMachineButton.StateFlag)
|
||||
ElseIf BtnType Is GetType(TwoStateButton) Then
|
||||
EgtOutLog(" ► " & BtnType.ToString.Replace("OmagCUT.", "(1) ") & " , " & CurrMachineButton.StateFlag)
|
||||
ElseIf BtnType Is GetType(ThreeStateButton) Then
|
||||
EgtOutLog(" ► " & BtnType.ToString.Replace("OmagCUT.", "(2) ") & " , " & CurrMachineButton.StateFlag)
|
||||
ElseIf BtnType Is GetType(DoubleCommandButton) Then
|
||||
EgtOutLog(" ► " & BtnType.ToString.Replace("OmagCUT.", "(3) ") & " , " & CurrMachineButton.StateFlag)
|
||||
ElseIf BtnType Is GetType(PressedCommandButton) Then
|
||||
EgtOutLog(" ► " & BtnType.ToString.Replace("OmagCUT.", "(4) ") & " , " & CurrMachineButton.StateFlag)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Friend Sub SpindleStateChanged(SpindleState As Boolean)
|
||||
Dim SpindleButton As TwoStateButton = Nothing
|
||||
For Each MachineButton As MachineButton In m_ButtonList
|
||||
@@ -255,38 +285,34 @@ Public Class ControlsMachineButtonUC
|
||||
Dim DoorOpenedButton As ThreeStateButton = Nothing
|
||||
For Each MachineButton As MachineButton In m_ButtonList
|
||||
If MachineButton.StateFlag = K_DOORCLOSED Then
|
||||
'If TypeOf MachineButton Is NoStateButton Then
|
||||
' DoorClosedButton = DirectCast(MachineButton, NoStateButton)
|
||||
'ElseIf TypeOf MachineButton Is TwoStateButton Then
|
||||
' DoorClosedButton = DirectCast(MachineButton, TwoStateButton)
|
||||
'ElseIf TypeOf MachineButton Is ThreeStateButton Then
|
||||
' DoorClosedButton = DirectCast(MachineButton, ThreeStateButton)
|
||||
'ElseIf TypeOf MachineButton Is DoubleCommandButton Then
|
||||
' DoorClosedButton = DirectCast(MachineButton, DoubleCommandButton)
|
||||
'ElseIf TypeOf MachineButton Is PressedCommandButton Then
|
||||
' DoorClosedButton = DirectCast(MachineButton, PressedCommandButton)
|
||||
'End If
|
||||
DoorClosedButton = MachineButton
|
||||
End If
|
||||
If MachineButton.StateFlag = "DoorOpened" Then
|
||||
If MachineButton.StateFlag = K_DOOROPENDED Then
|
||||
DoorOpenedButton = MachineButton
|
||||
End If
|
||||
Next
|
||||
' Chiusura porte (gesrtione comando Three/Two state
|
||||
If Not IsNothing(DoorClosedButton) Then
|
||||
Select Case DoorClosedState
|
||||
Case 0
|
||||
' porta aperta
|
||||
DoorClosedButton.Background = Application.Current.FindResource("OmagCut_Red")
|
||||
Case 1, 2
|
||||
' porta in movimento/aperta
|
||||
DoorClosedButton.Background = Application.Current.FindResource("OmagCut_LightGray")
|
||||
End Select
|
||||
End If
|
||||
' Chiusura porte (gesrtione comando Three/Two state
|
||||
If Not IsNothing(DoorOpenedButton) Then
|
||||
Select Case DoorClosedState
|
||||
Case 0
|
||||
' porta aperta
|
||||
DoorOpenedButton.Background = Application.Current.FindResource("OmagCut_LightGray")
|
||||
Case 1
|
||||
' porta in movimento
|
||||
DoorOpenedButton.Background = Application.Current.FindResource("OmagCut_Yellow")
|
||||
Case 2
|
||||
' porta chiusa
|
||||
DoorOpenedButton.Background = Application.Current.FindResource("OmagCut_Green")
|
||||
End Select
|
||||
End If
|
||||
@@ -343,35 +369,64 @@ Public Class ControlsMachineButtonUC
|
||||
End Sub
|
||||
|
||||
Friend Sub ZoneStateChanged(ZoneState As Integer)
|
||||
'Dim sFlag As String = String.Empty
|
||||
'If ZoneState = 1 Then
|
||||
' sFlag = BTN_ENABLE_ZONE_1
|
||||
'ElseIf ZoneState = 2 Then
|
||||
' sFlag = BTN_ENABLE_ZONE_2
|
||||
'End If
|
||||
'Dim EnableZoneButton As TwoStateButton = Nothing
|
||||
'For Each MachineButton As MachineButton In m_ButtonList
|
||||
' If MachineButton.StateFlag = K_ENABLEZONE Then
|
||||
' EnableZoneButton = MachineButton
|
||||
' End If
|
||||
'Next
|
||||
'If Not IsNothing(EnableZoneButton) Then
|
||||
' EnableZoneButton.SetIsChecked(EnableZone)
|
||||
'End If
|
||||
Dim bEnableZone1 As Boolean = False
|
||||
If ZoneState = 1 Then
|
||||
bEnableZone1 = True
|
||||
ElseIf ZoneState = 2 Then
|
||||
bEnableZone1 = False
|
||||
End If
|
||||
' attivo il comando associato
|
||||
Dim EnableZoneButton As TwoStateButton = Nothing
|
||||
For Each MachineButton As MachineButton In m_ButtonList
|
||||
If MachineButton.StateFlag = BTN_ENABLE_ZONE_1 Then
|
||||
EnableZoneButton = MachineButton
|
||||
End If
|
||||
Next
|
||||
If Not IsNothing(EnableZoneButton) Then
|
||||
EnableZoneButton.SetIsChecked(bEnableZone1)
|
||||
End If
|
||||
' disattivo l'altro per esclusione
|
||||
EnableZoneButton = Nothing
|
||||
For Each MachineButton As MachineButton In m_ButtonList
|
||||
If MachineButton.StateFlag = BTN_ENABLE_ZONE_2 Then
|
||||
EnableZoneButton = MachineButton
|
||||
End If
|
||||
Next
|
||||
If Not IsNothing(EnableZoneButton) Then
|
||||
EnableZoneButton.SetIsChecked(Not bEnableZone1)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Friend Sub PcStateChanged(EnablePC As Boolean)
|
||||
'Dim EnablePCButton As TwoStateButton = Nothing
|
||||
'For Each MachineButton As MachineButton In m_ButtonList
|
||||
' If MachineButton.StateFlag = K_ENABLEPC Then
|
||||
' EnablePCButton = MachineButton
|
||||
' End If
|
||||
'Next
|
||||
'If Not IsNothing(EnablePCButton) Then
|
||||
' EnablePCButton.SetIsChecked(EnablePC)
|
||||
'End If
|
||||
Friend Sub PcStateChanged(EnablePC As Integer)
|
||||
Dim bEnablePC1 As Boolean = False
|
||||
If EnablePC = 1 Then
|
||||
bEnablePC1 = True
|
||||
ElseIf EnablePC = 2 Then
|
||||
bEnablePC1 = False
|
||||
End If
|
||||
' attivo/disattivo il comando associato
|
||||
Dim EnablePCButton As TwoStateButton = Nothing
|
||||
For Each MachineButton As MachineButton In m_ButtonList
|
||||
If MachineButton.StateFlag = K_ENABLEPC & "_1" Then
|
||||
EnablePCButton = MachineButton
|
||||
End If
|
||||
Next
|
||||
If Not IsNothing(EnablePCButton) Then
|
||||
EnablePCButton.SetIsChecked(bEnablePC1)
|
||||
End If
|
||||
' disattivo/attivo l'altro per esclusione
|
||||
EnablePCButton = Nothing
|
||||
For Each MachineButton As MachineButton In m_ButtonList
|
||||
If MachineButton.StateFlag = BTN_ENABLE_ZONE_2 Then
|
||||
EnablePCButton = MachineButton
|
||||
End If
|
||||
Next
|
||||
If Not IsNothing(EnablePCButton) Then
|
||||
EnablePCButton.SetIsChecked(Not bEnablePC1)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#End Region ' State Range
|
||||
|
||||
Public Function GetPrivateProfileMachineButtons(
|
||||
ByVal lpAppName As String,
|
||||
@@ -569,13 +624,64 @@ Public MustInherit Class MachineButton
|
||||
EgtOutLog("dopo scrittura seconda variabile")
|
||||
End If
|
||||
Return
|
||||
Case 4
|
||||
' ------------------------------------ FANUC ------------------------------------
|
||||
' eventuale scrittura di linea di comando MDI
|
||||
If Not String.IsNullOrEmpty(CmdString) Then
|
||||
' attivo mpdalità MDI
|
||||
m_CN.DGeneralFunctions_WriteCncMode(2)
|
||||
System.Threading.Thread.Sleep(100)
|
||||
' salvo la stringa di comando ricevuta dal file lua
|
||||
m_CN.sz_ManualDataInput = CmdString
|
||||
' esguo la funzione che ha il compito di scrivere il comando MDI
|
||||
m_CN.MDI_command()
|
||||
End If
|
||||
' attivo modalità AUTO
|
||||
m_CN.DGeneralFunctions_WriteCncMode(7)
|
||||
System.Threading.Thread.Sleep(100)
|
||||
If String.IsNullOrEmpty(EValue) Then
|
||||
' EActive: impulsivo "D#####"
|
||||
m_CN.NC_pulse_bit(ENumber)
|
||||
EgtOutLog("Fanuc_DNumber= " & ENumber)
|
||||
Else
|
||||
' EActive + EValue: scrittura comando invariabile Short oppure Bit
|
||||
If ENumber.Contains(".") Then
|
||||
' D#####.#
|
||||
Dim bEValue As Boolean
|
||||
If EValue.Trim = "1" Then bEValue = True
|
||||
m_CN.NC_write_var_bit(ENumber, CBool(EValue))
|
||||
Else
|
||||
' D#####
|
||||
m_CN.NC_write_var_short(ENumber, CShort(EValue))
|
||||
End If
|
||||
EgtOutLog("Fanuc_DNumber= " & ENumber & " DValue= " & EValue)
|
||||
End If
|
||||
' eventale caricamento seconda variabile
|
||||
If String.IsNullOrEmpty(EValue2) Then
|
||||
' EActive: impulsivo "D#####"
|
||||
m_CN.NC_pulse_bit(ENumber2)
|
||||
EgtOutLog("Fanuc_DNumber= " & ENumber2)
|
||||
Else
|
||||
' EActive + EValue: scrittura comando invariabile Short oppure Bit
|
||||
If ENumber2.Contains(".") Then
|
||||
' D#####.#
|
||||
Dim bEValue2 As Boolean
|
||||
If EValue2.Trim = "1" Then bEValue2 = True
|
||||
m_CN.NC_write_var_bit(ENumber2, CBool(EValue2))
|
||||
Else
|
||||
' D#####
|
||||
m_CN.NC_write_var_short(ENumber2, CShort(EValue2))
|
||||
End If
|
||||
EgtOutLog("Fanuc_DNumber2= " & ENumber2 & " DValue2= " & EValue2)
|
||||
End If
|
||||
Return
|
||||
End Select
|
||||
End If
|
||||
'--------------------------------------------------------- MDI ---------------------------------------------------------
|
||||
Dim nResult As Short
|
||||
' assegno la modalità di funzionamento
|
||||
Select Case m_MainWindow.m_CNCommunication.m_nNCType
|
||||
Case 1, 2
|
||||
Case 1, 2, 4
|
||||
nResult = m_CN.DGeneralFunctions_WriteCncMode(2) ' Modalità MDI per controlli num
|
||||
Case 3
|
||||
'Per il siemens non devo fare nulla
|
||||
@@ -599,7 +705,7 @@ Public MustInherit Class MachineButton
|
||||
m_CN.DGeneralFunctions_CycleStart()
|
||||
End If
|
||||
System.Threading.Thread.Sleep(300)
|
||||
' riprostino la modalità manuale
|
||||
' ripristino la modalità manuale..?? siucuri ??
|
||||
nResult = m_CN.DGeneralFunctions_WriteCncMode(7) ' Modalità manuale
|
||||
End Sub
|
||||
|
||||
@@ -620,6 +726,7 @@ Public MustInherit Class MachineButton
|
||||
EgtTdbGetCurrToolParam(MCH_TP.FEED, dFeed)
|
||||
End If
|
||||
EgtLuaSetGlobNumVar("CMD.F", dFeed)
|
||||
|
||||
Dim dSpeed As Double = 0
|
||||
If Not String.IsNullOrWhiteSpace(m_DirectCutPage.m_ManualAxesMove.SpeedTxBx.Text) Then
|
||||
StringToDouble(m_DirectCutPage.m_ManualAxesMove.SpeedTxBx.Text, dSpeed)
|
||||
@@ -628,6 +735,18 @@ Public MustInherit Class MachineButton
|
||||
EgtTdbGetCurrToolParam(MCH_TP.SPEED, dSpeed)
|
||||
End If
|
||||
EgtLuaSetGlobNumVar("CMD.S", dSpeed)
|
||||
|
||||
' versione 2.5e1
|
||||
EgtTdbSetCurrTool(m_MainWindow.m_CurrentProjectPageUC.ToolTxBx.Text)
|
||||
Dim sToolPos As String = String.Empty
|
||||
If EgtTdbGetCurrToolParam(MCH_TP.TCPOS, sToolPos) Then
|
||||
EgtLuaGetGlobStringVar("CMD.TCPOS", sToolPos)
|
||||
End If
|
||||
Dim dToolDiam As Double = 0
|
||||
If EgtTdbGetCurrToolParam(MCH_TP.DIAM, dToolDiam) Then
|
||||
EgtLuaSetGlobNumVar("CMD.DIAM", dToolDiam * 1000)
|
||||
End If
|
||||
|
||||
Dim dL1, dL2, dL3, dR1, dR2 As Double
|
||||
m_MainWindow.m_CNCommunication.GetAxesPositions(dL1, dL2, dL3, dR1, dR2)
|
||||
EgtLuaSetGlobNumVar("CMD.L1", dL1)
|
||||
@@ -636,8 +755,17 @@ Public MustInherit Class MachineButton
|
||||
EgtLuaSetGlobNumVar("CMD.R1", dR1)
|
||||
EgtLuaSetGlobNumVar("CMD.R2", dR2)
|
||||
EgtLuaSetGlobBoolVar("CMD.INCHES", m_MainWindow.m_CNCommunication.GetMachineInInches())
|
||||
|
||||
' versione 2.6h1
|
||||
Dim sCurrTable As String = String.Empty
|
||||
Dim nCuttTable As Integer = 1
|
||||
EgtGetTableName(sCurrTable)
|
||||
If sCurrTable <> "MainTab" Then nCuttTable = 2
|
||||
EgtLuaSetGlobIntVar("CMD.TABLE", nCuttTable)
|
||||
|
||||
EgtLuaCallFunction("CmdString")
|
||||
' Leggo variabili
|
||||
|
||||
' Leggo variabili da file Lua
|
||||
CmdString = String.Empty
|
||||
EgtLuaGetGlobStringVar("CMD.CMDSTRING", CmdString)
|
||||
b2Start = False
|
||||
@@ -694,11 +822,26 @@ Public Class TwoStateButton
|
||||
Set(value As Boolean)
|
||||
' accendo il comando, anche se dovrei aspettare di leggere lo stato da PLC
|
||||
m_IsChecked = value
|
||||
Dim sLuaScriptFile As String = m_MainWindow.m_CurrentMachine.sMachDir & "\DirectCmd\"
|
||||
If value Then
|
||||
sLuaScriptFile &= TLuaScriptName
|
||||
ExecuteMDICommand(TLuaScriptName)
|
||||
Else
|
||||
sLuaScriptFile &= FLuaScriptName
|
||||
ExecuteMDICommand(FLuaScriptName)
|
||||
End If
|
||||
|
||||
Dim IsPressedShiftKey As Boolean = False
|
||||
If Keyboard.Modifiers And ModifierKeys.Shift And
|
||||
GetPrivateProfileInt(S_GENERAL, K_DEBUG, 0, m_MainWindow.GetIniFile()) > 4 Then IsPressedShiftKey = True
|
||||
' procedo all'apertura del file CadCut1 appena generato (solo se generazione corretta)
|
||||
If IsPressedShiftKey Then
|
||||
Try
|
||||
Process.Start("Notepad.exe", sLuaScriptFile)
|
||||
Catch ex As Exception
|
||||
EgtOutLog(ex.ToString)
|
||||
End Try
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
Friend Sub SetIsChecked(value As Boolean)
|
||||
@@ -789,6 +932,7 @@ Public Class NoStateButton
|
||||
ExecuteMDICommand(TLuaScriptName)
|
||||
End If
|
||||
Else
|
||||
' FANUC, SIEMENS
|
||||
ExecuteMDICommand(TLuaScriptName)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
@@ -5,6 +5,8 @@ Public Class CopyTemplateUC
|
||||
' Riferimenti a pagine
|
||||
Private m_MainWindow As MainWindow = DirectCast(Application.Current.MainWindow, MainWindow)
|
||||
Private WithEvents m_CurrProjPage As CurrentProjectPageUC
|
||||
Private m_refControlDirectCutUC As ControlsDirectCutUC1
|
||||
|
||||
' Flag di pagina attiva
|
||||
Private m_bActive As Boolean = False
|
||||
' Array stringhe modalità di acquisizione dei punti
|
||||
@@ -59,6 +61,7 @@ Public Class CopyTemplateUC
|
||||
|
||||
Private Sub CopyTemplate_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded
|
||||
m_CurrProjPage = m_MainWindow.m_CurrentProjectPageUC
|
||||
m_refControlDirectCutUC = m_MainWindow.m_DirectCutPageUC.m_ControlsDirectCutUC1
|
||||
m_bActive = True
|
||||
SaveBtn.IsEnabled = False
|
||||
LineBtn.IsChecked = True
|
||||
@@ -163,6 +166,15 @@ Public Class CopyTemplateUC
|
||||
Private Sub Point1Btn_Click(sender As Object, e As RoutedEventArgs) Handles Point1Btn.Click
|
||||
' Verifico configurazione tavola e grezzo
|
||||
If Not m_bTabOk Then Return
|
||||
|
||||
' forzo utilizzo testa H1 solo per macchina con 2 teste
|
||||
Dim bIsMultiCut As Boolean = (EgtGetHeadId("H101") <> GDB_ID.NULL)
|
||||
' Ricavo dati lama corrente
|
||||
Dim sSaw As String = m_MainWindow.m_CurrentMachine.sCurrSaw
|
||||
If bIsMultiCut Then
|
||||
EgtSetCalcTool(sSaw, "H1", 1)
|
||||
End If
|
||||
|
||||
' Se acquisizione lama o laser
|
||||
If PointModeCmBx.SelectedIndex = PT_MODE.SAW Or PointModeCmBx.SelectedIndex = PT_MODE.LASER Then
|
||||
' Recupero la posizione macchina
|
||||
@@ -170,14 +182,19 @@ Public Class CopyTemplateUC
|
||||
If Not m_MainWindow.m_CNCommunication.GetAxesPositions(dL1, dL2, dL3, dR1, dR2) Then
|
||||
Return
|
||||
End If
|
||||
' Ricavo dati lama corrente
|
||||
Dim sSaw As String = m_MainWindow.m_CurrentMachine.sCurrSaw
|
||||
' Se macchina multicut il primo asse rotante restituito è quello della tavola
|
||||
Dim vAng() As Double = {dR1, dR2, 0}
|
||||
If bIsMultiCut Then
|
||||
vAng(0) = 0
|
||||
vAng(1) = dR1
|
||||
vAng(2) = dR2
|
||||
End If
|
||||
' Se punto da laser
|
||||
If PointModeCmBx.SelectedIndex = PT_MODE.LASER Then
|
||||
' Imposto come testa corrente il laser (senza utensile ovviamente)
|
||||
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
|
||||
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, vAng, True, m_ptTipP1) Then Return
|
||||
' Ora imposto la lama corrente
|
||||
If Not EgtSetCalcTool(sSaw, "H1", 1) Then Return
|
||||
' Altrimenti da lama
|
||||
@@ -185,7 +202,7 @@ Public Class CopyTemplateUC
|
||||
' Imposto la lama corrente
|
||||
If Not EgtSetCalcTool(sSaw, "H1", 1) Then Return
|
||||
' Trasformo in posizione punta utensile in basso
|
||||
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, dR1, dR2, True, m_ptTipP1) Then Return
|
||||
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, vAng, True, m_ptTipP1) Then Return
|
||||
End If
|
||||
' Porto il tip nell'origine tavola
|
||||
m_ptTipP1.ToLoc(New Frame3d(m_ptTabOri))
|
||||
@@ -193,8 +210,6 @@ Public Class CopyTemplateUC
|
||||
Else
|
||||
' Verifico presenza punto da mouse
|
||||
If Not m_bMouseOk Then Return
|
||||
' 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
|
||||
' Assegno punto selezionato nel disegno a m_ptTipP1
|
||||
@@ -254,8 +269,7 @@ Public Class CopyTemplateUC
|
||||
End Sub
|
||||
|
||||
Private Sub ExitBtn_Click(sender As Object, e As RoutedEventArgs) Handles ExitBtn.Click
|
||||
m_MainWindow.m_DirectCutPageUC.LeftButtonGrid.Children.Remove(Me)
|
||||
m_MainWindow.m_DirectCutPageUC.m_ActiveDirectCutPage = DirectCutPageUC.DirectCutPages.DirectCut
|
||||
m_refControlDirectCutUC.LeftButtonGrid.Children.Remove(Me)
|
||||
End Sub
|
||||
|
||||
Private Function EraseCopyTemplatePart() As Boolean
|
||||
|
||||
@@ -28,10 +28,10 @@
|
||||
<ColumnDefinition Width="7*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Button Name="PhotoBtn" Grid.Column="0" Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}">
|
||||
<Button Name="PhotoBtn" Grid.Column="0" Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}">
|
||||
<Image Source="{DynamicResource PhotoImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="RawPartBtn" Grid.Column="1" Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}">
|
||||
<Button Name="RawPartBtn" Grid.Column="1" Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}">
|
||||
<Image Source="{DynamicResource RawPartImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
|
||||
@@ -42,25 +42,27 @@
|
||||
|
||||
</Grid>
|
||||
|
||||
<!-- Definizione della Grid laterale -->
|
||||
<Grid Name="LeftButtonGrid" Grid.Row="1" >
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="7*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<!-- Definizione della Grid laterale -->
|
||||
<Grid Name="CutTypeGrid" Grid.Row="1" >
|
||||
<!-- Definizione della Grid laterale -->
|
||||
<!--
|
||||
<Grid Name="LeftButtonGrid" Grid.Row="1" >
|
||||
<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*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="7*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
-->
|
||||
<!-- Definizione della Grid laterale -->
|
||||
<!--<Grid Name="CutTypeGrid" Grid.Row="1" >
|
||||
<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*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Button Name="ManualBtn" Grid.Column="2" Grid.Row="0"
|
||||
Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
@@ -140,7 +142,7 @@
|
||||
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</Grid>
|
||||
</Button>
|
||||
|
||||
|
||||
<Button Name="PolishingBtn" Grid.Row="6"
|
||||
Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Grid>
|
||||
@@ -154,36 +156,51 @@
|
||||
</Grid>
|
||||
</Button>
|
||||
|
||||
<Button Name="CopyTemplateBtn" Grid.Row="7"
|
||||
Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="80"/>
|
||||
<ColumnDefinition Width="140"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Image Source="{DynamicResource Copia-dimaImg}" Style="{DynamicResource OmagCut_ButtonIcon}" Grid.Column="0" />
|
||||
<TextBlock Name="CopyTemplateTxt" Grid.Column="1"
|
||||
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</Grid>
|
||||
</Button>
|
||||
|
||||
<Button Name="SawTestBtn" Grid.Row="8"
|
||||
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>
|
||||
-->
|
||||
<!--<Button Name="CopyTemplateBtn" Grid.Row="7"
|
||||
Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="80"/>
|
||||
<ColumnDefinition Width="140"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Image Source="{DynamicResource Copia-dimaImg}" Style="{DynamicResource OmagCut_ButtonIcon}" Grid.Column="0" />
|
||||
<TextBlock Name="CopyTemplateTxt" Grid.Column="1"
|
||||
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</Grid>
|
||||
</Button>-->
|
||||
<!--
|
||||
<Button Name="SquaringBtn" Grid.Row="7"
|
||||
Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="80"/>
|
||||
<ColumnDefinition Width="140"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Image Source="{DynamicResource Copia-dimaImg}" Style="{DynamicResource OmagCut_ButtonIcon}" Grid.Column="0" />
|
||||
<TextBlock Name="SquaringTxt" Grid.Column="1"
|
||||
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</Grid>
|
||||
</Button>
|
||||
|
||||
<Button Name="SawTestBtn" Grid.Row="8"
|
||||
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>-->
|
||||
|
||||
</Grid>
|
||||
|
||||
</Grid>
|
||||
|
||||
<!-- Definizione della Grid laterale per bottoni macchina -->
|
||||
<Grid Name="MachineButtonGrid" Grid.Row="1">
|
||||
<Grid.RowDefinitions>
|
||||
@@ -202,7 +219,10 @@
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="4*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<!--<ColumnDefinition Width="1*"/>-->
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
@@ -216,23 +236,23 @@
|
||||
Style="{DynamicResource OmagCut_GradientYellowIconToggleButton}">
|
||||
<Image Source="{DynamicResource VacuumImg}" Style="{StaticResource OmagCut_ScaleButtonIcon}"/>
|
||||
</ToggleButton>
|
||||
|
||||
<!--Comando asse X-Y-->
|
||||
<ToggleButton Name="XYBtn" Grid.Column="2"
|
||||
|
||||
<!--Comando asse X-Y-->
|
||||
<ToggleButton Name="XYBtn" Grid.Column="2"
|
||||
Style="{DynamicResource OmagCut_GradientYellowIconToggleButton}">
|
||||
<Image Source="{DynamicResource XYJogImg}" Style="{StaticResource OmagCut_ScaleButtonIcon}"/>
|
||||
<Image Source="{DynamicResource XYJogImg}" Style="{StaticResource OmagCut_ScaleButtonIcon}"/>
|
||||
</ToggleButton>
|
||||
|
||||
<!--Comando asse Z-C-->
|
||||
<ToggleButton Name="ZCBtn" Grid.Column="3"
|
||||
|
||||
<!--Comando asse Z-C-->
|
||||
<ToggleButton Name="ZCBtn" Grid.Column="3"
|
||||
Style="{DynamicResource OmagCut_GradientYellowIconToggleButton}">
|
||||
<Image Source="{DynamicResource ZCJogImg}" Style="{StaticResource OmagCut_ScaleButtonIcon}"/>
|
||||
</ToggleButton>
|
||||
<Image Source="{DynamicResource ZCJogImg}" Style="{StaticResource OmagCut_ScaleButtonIcon}"/>
|
||||
</ToggleButton>
|
||||
|
||||
<!--Comando asse Z-B-->
|
||||
<ToggleButton Name="ZBBtn" Grid.Column="4"
|
||||
Style="{DynamicResource OmagCut_GradientYellowIconToggleButton}">
|
||||
<Image Source="{DynamicResource ZBJogImg}" Style="{StaticResource OmagCut_ScaleButtonIcon}"/>
|
||||
<Image Source="{DynamicResource ZBJogImg}" Style="{StaticResource OmagCut_ScaleButtonIcon}"/>
|
||||
</ToggleButton>
|
||||
|
||||
<!--Comando Remote-->
|
||||
@@ -244,13 +264,15 @@
|
||||
<!--Parking-->
|
||||
<ToggleButton Name="ParkingBtn" Grid.Column="6"
|
||||
Style="{DynamicResource OmagCut_GradientYellowIconToggleButton}">
|
||||
<Image Source="{DynamicResource ParkingImg}" Style="{StaticResource OmagCut_ScaleButtonIcon}"/>
|
||||
<Image Source="{DynamicResource ParkingImg}" Style="{StaticResource OmagCut_ScaleButtonIcon}"/>
|
||||
</ToggleButton>
|
||||
|
||||
|
||||
|
||||
<!--Comando Manula/MDI-->
|
||||
<Button Name="ManualModeBtn" Grid.Column="8"
|
||||
<!--Comando Manula/MDI-->
|
||||
<Button Name="ManualModeBtn" Grid.Column="11"
|
||||
Style="{DynamicResource OmagCut_YellowGradientYellowIconButton}">
|
||||
<Image Source="{DynamicResource ManualImg}" Style="{StaticResource OmagCut_ScaleButtonIcon}"/>
|
||||
<Image Source="{DynamicResource ManualImg}" Style="{StaticResource OmagCut_ScaleButtonIcon}"/>
|
||||
</Button>
|
||||
|
||||
</Grid>
|
||||
|
||||
@@ -7,18 +7,20 @@ Public Class DirectCutPageUC
|
||||
Private m_MainWindow As MainWindow = DirectCast(Application.Current.MainWindow, MainWindow)
|
||||
Friend m_MachineButtons As MachineButtonsUC
|
||||
Friend m_ManualAxesMove As ManualAxesMoveUC
|
||||
Friend m_SingleCut As SingleCutUC
|
||||
Friend m_SingleDrill As SingleDrillUC
|
||||
' nuova finestra per i comandi per il taglio manuale nuovo
|
||||
Friend m_SingleCutAuto As SingleCutAuto
|
||||
Friend m_MultipleCut As MultipleCut
|
||||
Friend m_GridCut As GridCut
|
||||
Friend m_FlatteningCut As FlatteningCut
|
||||
Friend m_Polishing As Polishing
|
||||
Friend m_CopyTemplate As CopyTemplateUC
|
||||
Friend m_SawTest As SawTestUC
|
||||
|
||||
Friend m_ControlsMachineButton As ControlsMachineButtonUC
|
||||
Friend m_VacuumMachineButton As VacuumMachineButtonUC
|
||||
Friend m_ControlsDirectCutUC As ControlsDirectCutUC
|
||||
Friend m_ControlsDirectCutUC1 As ControlsDirectCutUC1
|
||||
|
||||
Friend m_ActiveControl As Controls
|
||||
Enum Controls
|
||||
DirectCutUC
|
||||
DirectCutUC1
|
||||
MachineButtonUC
|
||||
VacuumButtonUC
|
||||
End Enum
|
||||
|
||||
|
||||
' Stato di visualizzazione della macchina
|
||||
Friend m_bShowMachine As Boolean = False
|
||||
@@ -26,8 +28,6 @@ Public Class DirectCutPageUC
|
||||
' Dati generali CN
|
||||
Friend m_CN As CN_generico
|
||||
Private m_bFirst As Boolean = True
|
||||
' Riferimento alla pagina correntemente attiva
|
||||
Friend m_ActiveDirectCutPage As DirectCutPages = DirectCutPages.DirectCut
|
||||
' Variabili che indicano attivazione paginette con bottoni macchina
|
||||
Private m_ControlsBtn_IsActive As Boolean
|
||||
|
||||
@@ -41,94 +41,42 @@ Public Class DirectCutPageUC
|
||||
' elenco dei nuovi bottoni
|
||||
Private m_ButtonJogList As New List(Of MachineButton)
|
||||
|
||||
Enum DirectCutPages
|
||||
DirectCut
|
||||
ManualAxesMove
|
||||
SingleCut
|
||||
MultipleCut
|
||||
GridCut
|
||||
FlatteningCut
|
||||
Polishing
|
||||
CopyTemplate
|
||||
SawTest
|
||||
SingleCutAuto
|
||||
SingleDrill
|
||||
End Enum
|
||||
|
||||
Private Sub DirectCutPage_Initialized(sender As Object, e As EventArgs) Handles Me.Initialized
|
||||
' leggo la configurazione del programma per i nuovi tagli manuali
|
||||
m_bManulaCut = GetPrivateProfileInt(S_GENERAL, K_MANUAL_CUT, 0, m_MainWindow.GetIniFile()) <> 0
|
||||
|
||||
'Creazione delle Page UserControl
|
||||
m_MachineButtons = New MachineButtonsUC
|
||||
m_ManualAxesMove = New ManualAxesMoveUC
|
||||
m_SingleCut = New SingleCutUC
|
||||
m_SingleDrill = New SingleDrillUC
|
||||
m_MultipleCut = New MultipleCut
|
||||
m_GridCut = New GridCut
|
||||
m_FlatteningCut = New FlatteningCut
|
||||
m_Polishing = New Polishing
|
||||
m_CopyTemplate = New CopyTemplateUC
|
||||
m_SawTest = New SawTestUC
|
||||
m_ControlsMachineButton = New ControlsMachineButtonUC
|
||||
m_VacuumMachineButton = New VacuumMachineButtonUC
|
||||
' Costruisco la finestra per il nuovo tipo di taglio manuale
|
||||
m_SingleCutAuto = New SingleCutAuto
|
||||
m_ControlsDirectCutUC = New ControlsDirectCutUC
|
||||
m_ControlsDirectCutUC1 = New ControlsDirectCutUC1
|
||||
|
||||
'Posizionemento nella griglia delle Page UserControl
|
||||
m_MachineButtons.SetValue(Grid.RowProperty, 2)
|
||||
m_MachineButtons.SetValue(Grid.ColumnSpanProperty, 7)
|
||||
m_MachineButtons.SetValue(Grid.ColumnSpanProperty, m_MachineButtons.nCountButton)
|
||||
m_ManualAxesMove.SetValue(Grid.RowProperty, 1)
|
||||
If m_bManulaCut Then
|
||||
m_SingleCutAuto.SetValue(Grid.RowProperty, 1)
|
||||
Else
|
||||
m_SingleCut.SetValue(Grid.RowProperty, 1)
|
||||
End If
|
||||
m_SingleDrill.SetValue(Grid.RowProperty, 1)
|
||||
m_MultipleCut.SetValue(Grid.RowProperty, 1)
|
||||
m_GridCut.SetValue(Grid.RowProperty, 1)
|
||||
m_FlatteningCut.SetValue(Grid.RowProperty, 1)
|
||||
m_Polishing.SetValue(Grid.RowProperty, 1)
|
||||
m_CopyTemplate.SetValue(Grid.RowProperty, 1)
|
||||
m_SawTest.SetValue(Grid.RowProperty, 1)
|
||||
|
||||
m_ControlsDirectCutUC.SetValue(Grid.RowProperty, 1)
|
||||
m_ControlsDirectCutUC1.SetValue(Grid.RowProperty, 1)
|
||||
m_ControlsMachineButton.SetValue(Grid.RowProperty, 1)
|
||||
m_VacuumMachineButton.SetValue(Grid.RowProperty, 1)
|
||||
|
||||
' 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())
|
||||
' verifico che sia presente almeno uno dei bottoni della nuova console (SOLO PER MACCHINA CON paragrafo [VacuumMachButtons])
|
||||
Dim bCollapsedVacuumButton As Boolean = Not m_ControlsMachineButton.GetPrivateProfileMachineButtons(S_VACUUMMACHBUTTONS, "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
|
||||
End If
|
||||
|
||||
If GetPrivateProfileInt(S_NUMERICALCONTROL, K_TYPE, 0, m_MainWindow.GetMachIniFile()) = 0 Then
|
||||
ManualBtn.IsEnabled = False
|
||||
ManualModeBtn.Visibility = Windows.Visibility.Hidden
|
||||
' se non sono configurate le ventose allora nascondo il comando
|
||||
If m_NewMachineButtonsType AndAlso bCollapsedVacuumButton Then
|
||||
VacuumMachineBtn.Visibility = Windows.Visibility.Collapsed
|
||||
End If
|
||||
|
||||
' ManualBtn.Content = EgtMsg(90201)
|
||||
ManualTxt.Text = EgtMsg(90201)
|
||||
'SingleCutBtn.Content = EgtMsg(90202)
|
||||
SingleCutTxt.Text = EgtMsg(90202)
|
||||
'SingleDrillBtn.Content = "Foro singolo"
|
||||
SingleDrillTxt.Text = EgtMsg(90258)
|
||||
'MultipleCutBtn.Content = EgtMsg(90203)
|
||||
MultipleCutTxt.Text = EgtMsg(90203)
|
||||
'GridCutBtn.Content = EgtMsg(90204)
|
||||
GridCutTxt.Text = EgtMsg(90204)
|
||||
'FlatteningCutBtn.Content = EgtMsg(90206)
|
||||
FlatteningCutTxt.Text = EgtMsg(90206)
|
||||
'PolishingBtn.Content = EgtMsg(90231)
|
||||
PolishingTxt.Text = EgtMsg(90231)
|
||||
'CopyTemplateBtn.Content = EgtMsg(90209)
|
||||
CopyTemplateTxt.Text = EgtMsg(90209)
|
||||
'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())
|
||||
@@ -176,59 +124,10 @@ Public Class DirectCutPageUC
|
||||
' lo stato di questi comandi vieni carico dalla lettura del PLC (refresh)
|
||||
'----------- FINE NUOVI BOTTONI------------
|
||||
|
||||
' Se rientro da simulazione
|
||||
If m_ActiveDirectCutPage = DirectCutPages.SingleCut Then
|
||||
LeftButtonGrid.Children.Add(m_SingleCut)
|
||||
Return
|
||||
ElseIf m_ActiveDirectCutPage = DirectCutPages.SingleCutAuto Then
|
||||
LeftButtonGrid.Children.Add(m_SingleCutAuto)
|
||||
Return
|
||||
ElseIf m_ActiveDirectCutPage = DirectCutPages.MultipleCut Then
|
||||
LeftButtonGrid.Children.Add(m_MultipleCut)
|
||||
Return
|
||||
ElseIf m_ActiveDirectCutPage = DirectCutPages.GridCut Then
|
||||
LeftButtonGrid.Children.Add(m_GridCut)
|
||||
Return
|
||||
ElseIf m_ActiveDirectCutPage = DirectCutPages.FlatteningCut Then
|
||||
LeftButtonGrid.Children.Add(m_FlatteningCut)
|
||||
Return
|
||||
ElseIf m_ActiveDirectCutPage = DirectCutPages.Polishing Then
|
||||
LeftButtonGrid.Children.Add(m_Polishing)
|
||||
Return
|
||||
ElseIf m_ActiveDirectCutPage = DirectCutPages.SawTest Then
|
||||
LeftButtonGrid.Children.Add(m_SawTest)
|
||||
Return
|
||||
ElseIf m_ActiveDirectCutPage = DirectCutPages.SingleDrill Then
|
||||
LeftButtonGrid.Children.Add(m_SingleDrill)
|
||||
Return
|
||||
End If
|
||||
|
||||
' Caso standard
|
||||
m_ActiveDirectCutPage = DirectCutPages.DirectCut
|
||||
LoadLastDirectCutControls()
|
||||
|
||||
' Se macchina fotografica abilitata
|
||||
PhotoBtn.IsEnabled = m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.MAN_PHOTO)
|
||||
|
||||
' 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
|
||||
Else
|
||||
SingleCutBtn.IsEnabled = bRawOk
|
||||
End If
|
||||
MultipleCutBtn.IsEnabled = bRawOk
|
||||
GridCutBtn.IsEnabled = bRawOk
|
||||
SingleDrillBtn.IsEnabled = (bRawOk And bH1Exists)
|
||||
FlatteningCutBtn.IsEnabled = (bRawOk And bH1Exists)
|
||||
PolishingBtn.IsEnabled = (bRawOk And m_MainWindow.m_CurrentMachine.bPolishing)
|
||||
SawTestBtn.IsEnabled = (bRawOk And bH1Exists)
|
||||
CopyTemplateBtn.IsEnabled = bH1Exists
|
||||
|
||||
' aggiorno la visualizzazione dei parametri
|
||||
ReloadParam()
|
||||
|
||||
@@ -247,9 +146,12 @@ Public Class DirectCutPageUC
|
||||
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)
|
||||
If Not bSaw Then
|
||||
EgtOutLog(" WARNING! Impossible to get point from SAW, there isn't SAW or SAWING! It's available only by DRAW")
|
||||
End If
|
||||
m_ControlsDirectCutUC.m_SingleCut.SetEnableParam(bSaw)
|
||||
m_ControlsDirectCutUC.m_MultipleCut.SetEnableParam(bSaw)
|
||||
m_ControlsDirectCutUC.m_GridCut.SetEnableParam(bSaw)
|
||||
End Sub
|
||||
|
||||
Private Sub SetVisibilityJogButtuns()
|
||||
@@ -310,63 +212,13 @@ Public Class DirectCutPageUC
|
||||
m_MainWindow.m_PrevActivePage = MainWindow.Pages.DirectCut
|
||||
End Sub
|
||||
|
||||
Private Sub ManualBtn_Click(sender As Object, e As RoutedEventArgs) Handles ManualBtn.Click
|
||||
LeftButtonGrid.Children.Add(m_ManualAxesMove)
|
||||
m_ActiveDirectCutPage = DirectCutPages.ManualAxesMove
|
||||
End Sub
|
||||
|
||||
Private Sub SingleCutBtn_Click(sender As Object, e As RoutedEventArgs) Handles SingleCutBtn.Click
|
||||
If m_bManulaCut Then
|
||||
LeftButtonGrid.Children.Add(m_SingleCutAuto)
|
||||
m_ActiveDirectCutPage = DirectCutPages.SingleCutAuto
|
||||
Else
|
||||
LeftButtonGrid.Children.Add(m_SingleCut)
|
||||
m_ActiveDirectCutPage = DirectCutPages.SingleCut
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub MultipleCutBtn_Click(sender As Object, e As RoutedEventArgs) Handles MultipleCutBtn.Click
|
||||
LeftButtonGrid.Children.Add(m_MultipleCut)
|
||||
m_ActiveDirectCutPage = DirectCutPages.MultipleCut
|
||||
End Sub
|
||||
|
||||
Private Sub GridCutBtn_Click(sender As Object, e As RoutedEventArgs) Handles GridCutBtn.Click
|
||||
LeftButtonGrid.Children.Add(m_GridCut)
|
||||
m_ActiveDirectCutPage = DirectCutPages.GridCut
|
||||
End Sub
|
||||
|
||||
Private Sub FlatteningCutBtn_Click(sender As Object, e As RoutedEventArgs) Handles FlatteningCutBtn.Click
|
||||
LeftButtonGrid.Children.Add(m_FlatteningCut)
|
||||
m_ActiveDirectCutPage = DirectCutPages.FlatteningCut
|
||||
End Sub
|
||||
|
||||
Private Sub PolishingBtn_Click(sender As Object, e As RoutedEventArgs) Handles PolishingBtn.Click
|
||||
LeftButtonGrid.Children.Add(m_Polishing)
|
||||
m_ActiveDirectCutPage = DirectCutPages.Polishing
|
||||
End Sub
|
||||
|
||||
Private Sub CopyTemplateBtn_Click(sender As Object, e As RoutedEventArgs) Handles CopyTemplateBtn.Click
|
||||
LeftButtonGrid.Children.Add(m_CopyTemplate)
|
||||
m_ActiveDirectCutPage = DirectCutPages.CopyTemplate
|
||||
End Sub
|
||||
|
||||
Private Sub SawTestBtn_Click(sender As Object, e As RoutedEventArgs) Handles SawTestBtn.Click
|
||||
LeftButtonGrid.Children.Add(m_SawTest)
|
||||
m_ActiveDirectCutPage = DirectCutPages.SawTest
|
||||
End Sub
|
||||
|
||||
Private Sub SingleDrillBtn_Click(sender As Object, e As RoutedEventArgs) Handles SingleDrillBtn.Click
|
||||
LeftButtonGrid.Children.Add(m_SingleDrill)
|
||||
m_ActiveDirectCutPage = DirectCutPages.SingleDrill
|
||||
End Sub
|
||||
|
||||
Private Sub ControlsMachineBtn_Click(sender As Object, e As RoutedEventArgs) Handles ControlsMachineBtn.Click
|
||||
If ControlsMachineBtn.IsChecked Then
|
||||
m_ControlsMachineButton = New ControlsMachineButtonUC
|
||||
m_ControlsMachineButton.SetValue(Grid.RowProperty, 1)
|
||||
m_NewMachineButtonsType = m_ControlsMachineButton.GetPrivateProfileMachineButtons(S_CONTROLMACHBUTTONS, "Button1", Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, m_MainWindow.GetMachIniFile())
|
||||
MachineButtonGrid.Children.Add(m_ControlsMachineButton)
|
||||
m_ActiveControl = Controls.MachineButtonUC
|
||||
If VacuumMachineBtn.IsChecked Then
|
||||
MachineButtonGrid.Children.Remove(m_VacuumMachineButton)
|
||||
VacuumMachineBtn.IsChecked = False
|
||||
@@ -379,6 +231,7 @@ Public Class DirectCutPageUC
|
||||
Private Sub VacuumMachineBtn_Click(sender As Object, e As RoutedEventArgs) Handles VacuumMachineBtn.Click
|
||||
If VacuumMachineBtn.IsChecked Then
|
||||
MachineButtonGrid.Children.Add(m_VacuumMachineButton)
|
||||
m_ActiveControl = Controls.VacuumButtonUC
|
||||
If ControlsMachineBtn.IsChecked Then
|
||||
MachineButtonGrid.Children.Remove(m_ControlsMachineButton)
|
||||
ControlsMachineBtn.IsChecked = False
|
||||
@@ -388,7 +241,21 @@ Public Class DirectCutPageUC
|
||||
End If
|
||||
End Sub
|
||||
|
||||
'------------------NUOVI BOTTONI PER GESTIONE JOYSTICK-------------------------------------------------
|
||||
Friend Sub LoadDirectCutUC()
|
||||
ManageControls()
|
||||
m_ActiveControl = Controls.DirectCutUC
|
||||
MachineButtonGrid.Children.Add(m_ControlsDirectCutUC)
|
||||
End Sub
|
||||
|
||||
Friend Sub LoadDirectCutUC1()
|
||||
ManageControls()
|
||||
m_ActiveControl = Controls.DirectCutUC1
|
||||
MachineButtonGrid.Children.Add(m_ControlsDirectCutUC1)
|
||||
End Sub
|
||||
|
||||
|
||||
#Region "[JogButtons]"
|
||||
|
||||
Private Sub XYBtn_Click(sender As Object, e As RoutedEventArgs) Handles XYBtn.Click
|
||||
' riverco in elenco il bottone XYJog
|
||||
Dim XYJogButton As MachineButton = Nothing
|
||||
@@ -555,17 +422,20 @@ Public Class DirectCutPageUC
|
||||
End If
|
||||
End Sub
|
||||
|
||||
'------------------NUOVI BOTTONI PER GESTIONE JOYSTICK-------------------------------------------------
|
||||
#End Region '[JogButtons]
|
||||
|
||||
Private Sub MachViewModeBtn_Click(sender As Object, e As RoutedEventArgs) Handles MachViewModeBtn.Click
|
||||
If m_bShowMachine Then
|
||||
' aggiorno lo stato
|
||||
Select Case m_nMachLook
|
||||
Case MCH_LOOK.ALL
|
||||
m_nMachLook = MCH_LOOK.TAB_HEAD
|
||||
Case MCH_LOOK.TAB_HEAD
|
||||
m_nMachLook = MCH_LOOK.TAB_TOOL
|
||||
Case Else
|
||||
m_nMachLook = MCH_LOOK.ALL
|
||||
Case MCH_LOOK.ALL
|
||||
m_nMachLook = MCH_LOOK.TAB_HEAD
|
||||
Case MCH_LOOK.TAB_HEAD
|
||||
m_nMachLook = MCH_LOOK.TAB_TOOL
|
||||
Case MCH_LOOK.TAB_TOOL
|
||||
m_nMachLook = MCH_LOOK.TAB
|
||||
Case Else
|
||||
m_nMachLook = MCH_LOOK.ALL
|
||||
End Select
|
||||
' aggiorno lo stato della macchina e la sua visualizzazione
|
||||
EgtSetMachineLook(m_nMachLook)
|
||||
@@ -574,41 +444,45 @@ Public Class DirectCutPageUC
|
||||
End Sub
|
||||
|
||||
Friend Sub DirectCutPage_Unloaded(sender As Object, e As RoutedEventArgs) Handles Me.Unloaded
|
||||
Select Case m_ActiveDirectCutPage
|
||||
Case DirectCutPages.DirectCut Or DirectCutPages.ManualAxesMove
|
||||
' Non è necessario fare alcunché
|
||||
Case DirectCutPages.SingleCut
|
||||
LeftButtonGrid.Children.Remove(m_SingleCut)
|
||||
Case DirectCutPages.SingleCutAuto
|
||||
LeftButtonGrid.Children.Remove(m_SingleCutAuto)
|
||||
Case DirectCutPages.MultipleCut
|
||||
LeftButtonGrid.Children.Remove(m_MultipleCut)
|
||||
Case DirectCutPages.GridCut
|
||||
LeftButtonGrid.Children.Remove(m_GridCut)
|
||||
Case DirectCutPages.FlatteningCut
|
||||
LeftButtonGrid.Children.Remove(m_FlatteningCut)
|
||||
Case DirectCutPages.Polishing
|
||||
LeftButtonGrid.Children.Remove(m_Polishing)
|
||||
Case DirectCutPages.CopyTemplate
|
||||
LeftButtonGrid.Children.Remove(m_CopyTemplate)
|
||||
Case DirectCutPages.SawTest
|
||||
LeftButtonGrid.Children.Remove(m_SawTest)
|
||||
Case DirectCutPages.SingleDrill
|
||||
LeftButtonGrid.Children.Remove(m_SingleDrill)
|
||||
ManageControls()
|
||||
End Sub
|
||||
|
||||
Friend Sub ManageControls()
|
||||
Select Case m_ActiveControl
|
||||
Case Controls.DirectCutUC
|
||||
MachineButtonGrid.Children.Remove(m_ControlsDirectCutUC)
|
||||
m_ControlsDirectCutUC.DirectCutPage_Unloaded(Nothing, Nothing)
|
||||
Case Controls.DirectCutUC1
|
||||
MachineButtonGrid.Children.Remove(m_ControlsDirectCutUC1)
|
||||
m_ControlsDirectCutUC1.DirectCutPage_Unloaded(Nothing, Nothing)
|
||||
Case Controls.MachineButtonUC
|
||||
MachineButtonGrid.Children.Remove(m_ControlsMachineButton)
|
||||
MachineButtonGrid.Children.Remove(m_ControlsDirectCutUC)
|
||||
MachineButtonGrid.Children.Remove(m_ControlsDirectCutUC1)
|
||||
ControlsMachineBtn.IsChecked = False
|
||||
Case Controls.VacuumButtonUC
|
||||
MachineButtonGrid.Children.Remove(m_ControlsMachineButton)
|
||||
MachineButtonGrid.Children.Remove(m_ControlsDirectCutUC)
|
||||
MachineButtonGrid.Children.Remove(m_VacuumMachineButton)
|
||||
VacuumMachineBtn.IsChecked = False
|
||||
End Select
|
||||
End Sub
|
||||
|
||||
Friend Sub LoadLastDirectCutControls()
|
||||
Select Case m_ActiveControl
|
||||
Case Controls.DirectCutUC
|
||||
MachineButtonGrid.Children.Add(m_ControlsDirectCutUC)
|
||||
Case Controls.DirectCutUC1
|
||||
MachineButtonGrid.Children.Add(m_ControlsDirectCutUC1)
|
||||
Case Else
|
||||
m_ActiveControl = Controls.DirectCutUC
|
||||
MachineButtonGrid.Children.Add(m_ControlsDirectCutUC)
|
||||
End Select
|
||||
If ControlsMachineBtn.IsChecked Then
|
||||
MachineButtonGrid.Children.Remove(m_ControlsMachineButton)
|
||||
ControlsMachineBtn.IsChecked = False
|
||||
End If
|
||||
If VacuumMachineBtn.IsChecked Then
|
||||
MachineButtonGrid.Children.Remove(m_VacuumMachineButton)
|
||||
VacuumMachineBtn.IsChecked = False
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub ManualModeBtn_Click(sender As Object, e As RoutedEventArgs) Handles ManualModeBtn.Click
|
||||
' Imposto modalità manuale della macchina
|
||||
Dim nResult As Short = m_CN.DGeneralFunctions_WriteCncMode(7) ' Modalità manuale
|
||||
Dim nResult As Short = m_MainWindow.m_DirectCutPageUC.m_CN.DGeneralFunctions_WriteCncMode(7) ' Modalità manuale
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
+144
-101
@@ -7,142 +7,185 @@
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="597.3" d:DesignWidth="256">
|
||||
|
||||
<!--<Border CornerRadius="{StaticResource Page_CornerRadius}" Background="{DynamicResource OmagCut_LightGray}">-->
|
||||
<Border Style="{DynamicResource OmagCut_DirectCutPageBorder}">
|
||||
<!--<Border CornerRadius="{StaticResource Page_CornerRadius}" Background="{DynamicResource OmagCut_LightGray}">-->
|
||||
<Border Style="{DynamicResource OmagCut_DirectCutPageBorder}">
|
||||
|
||||
<!-- Definizione della Grid FlatteningCut -->
|
||||
<Grid Name="FlatteningCutGrid" >
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
<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*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<!-- Definizione della Grid FlatteningCut -->
|
||||
<Grid Name="FlatteningCutGrid" >
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
<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*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<Grid Grid.Row="0" Grid.ColumnSpan="2">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid Grid.Row="0" Grid.ColumnSpan="2">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<ToggleButton Name="Point1Btn" Grid.Column="0"
|
||||
<ToggleButton Name="Point1Btn" Grid.Column="0"
|
||||
Style="{DynamicResource OmagCut_YellowIconToggleButton}">
|
||||
<Image Source="{DynamicResource Acquisisci-P1Img}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
</ToggleButton>
|
||||
<Image Source="{DynamicResource Acquisisci-P1Img}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
</ToggleButton>
|
||||
|
||||
<ToggleButton Name="Point2Btn" Grid.Column="1"
|
||||
<ToggleButton Name="Point2Btn" Grid.Column="1"
|
||||
Style="{DynamicResource OmagCut_YellowIconToggleButton}">
|
||||
<Image Source="{DynamicResource Acquisisci-P2Img}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
</ToggleButton>
|
||||
<Image Source="{DynamicResource Acquisisci-P2Img}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
</ToggleButton>
|
||||
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
||||
<ComboBox Name="PointModeCmBx" Grid.Row="1" Grid.ColumnSpan="2" Style="{StaticResource OmagCut_ComboBox}" Margin="6,0,6,0">
|
||||
<ComboBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding}" Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</DataTemplate>
|
||||
</ComboBox.ItemTemplate>
|
||||
</ComboBox>
|
||||
|
||||
<TextBlock Name="DepthTxBl" Grid.Column="0" Grid.Row="2"
|
||||
<ScrollViewer VerticalScrollBarVisibility="Visible" Visibility="Visible"
|
||||
Grid.Row="1" Grid.RowSpan="11" Grid.ColumnSpan="2">
|
||||
|
||||
<Grid Name="DatiTaglioGrid" >
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="0.1"/>
|
||||
<RowDefinition Height="40"/>
|
||||
<RowDefinition Height="40"/>
|
||||
<RowDefinition Height="40"/>
|
||||
<RowDefinition Height="40"/>
|
||||
<RowDefinition Height="40"/>
|
||||
<RowDefinition Height="40"/>
|
||||
<RowDefinition Height="40"/>
|
||||
<RowDefinition Height="40"/>
|
||||
<RowDefinition Height="40"/>
|
||||
<RowDefinition Height="40"/>
|
||||
<RowDefinition Height="40"/>
|
||||
<RowDefinition Height="40"/>
|
||||
<RowDefinition Height="40"/>
|
||||
<RowDefinition Height="0.1"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<ComboBox Name="PointModeCmBx" Grid.Row="1" Grid.ColumnSpan="2" Style="{StaticResource OmagCut_ComboBox}" Margin="6,0,6,0">
|
||||
<ComboBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding}" Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</DataTemplate>
|
||||
</ComboBox.ItemTemplate>
|
||||
</ComboBox>
|
||||
|
||||
<TextBlock Name="DepthTxBl" Grid.Column="0" Grid.Row="2"
|
||||
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="DepthTxBx" Grid.Column="1" Grid.Row="2" Margin="0,0,6,0"
|
||||
<EgtWPFLib:EgtTextBox Name="DepthTxBx" Grid.Column="1" Grid.Row="2" Margin="0,0,6,0"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
|
||||
<TextBlock Name="DirectionTxBl" Grid.Column="0" Grid.Row="3"
|
||||
<TextBlock Name="DirectionTxBl" Grid.Column="0" Grid.Row="3"
|
||||
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="DirectionTxBx" Grid.Column="1" Grid.Row="3" Margin="0,0,6,0"
|
||||
<EgtWPFLib:EgtTextBox Name="DirectionTxBx" Grid.Column="1" Grid.Row="3" Margin="0,0,6,0" IsLength="False"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
|
||||
<TextBlock Name="LenghtTxBl" Grid.Column="0" Grid.Row="4"
|
||||
<TextBlock Name="LenghtTxBl" Grid.Column="0" Grid.Row="4"
|
||||
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="LenghtTxBx" Grid.Column="1" Grid.Row="4" Margin="0,0,6,0"
|
||||
<EgtWPFLib:EgtTextBox Name="LenghtTxBx" Grid.Column="1" Grid.Row="4" Margin="0,0,6,0"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
|
||||
<TextBlock Name="WidthTxBl" Grid.Column="0" Grid.Row="5"
|
||||
<TextBlock Name="WidthTxBl" Grid.Column="0" Grid.Row="5"
|
||||
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="WidthTxBx" Grid.Column="1" Grid.Row="5" Margin="0,0,6,0"
|
||||
<EgtWPFLib:EgtTextBox Name="WidthTxBx" Grid.Column="1" Grid.Row="5" Margin="0,0,6,0"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
|
||||
<TextBlock Name="OverlapTxBl" Grid.Column="0" Grid.Row="6"
|
||||
<TextBlock Name="OverlapTxBl" Grid.Column="0" Grid.Row="6"
|
||||
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="OverlapTxBx" Grid.Column="1" Grid.Row="6" Margin="0,0,6,0"
|
||||
<EgtWPFLib:EgtTextBox Name="OverlapTxBx" Grid.Column="1" Grid.Row="6" Margin="0,0,6,0"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
|
||||
<TextBlock Name="ZReleasedTxBl" Grid.Column="0" Grid.Row="7"
|
||||
<TextBlock Name="ZReleasedTxBl" Grid.Column="0" Grid.Row="7"
|
||||
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="ZReleasedTxBx" Grid.Column="1" Grid.Row="7" Margin="0,0,6,0"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="ZReleasedTxBx" Grid.Column="1" Grid.Row="7" Margin="0,0,6,0"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
|
||||
<TextBlock Name="SideTxBl" Grid.Row="8" Grid.ColumnSpan="2"
|
||||
<TextBlock Name="SideTxBl" Grid.Row="8" Grid.ColumnSpan="2"
|
||||
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
|
||||
<CheckBox Name="SideChBx" Grid.Row="8" Grid.ColumnSpan="2" Style="{StaticResource OmagCut_CheckBox_Single}"
|
||||
<CheckBox Name="SideChBx" Grid.Row="8" Grid.ColumnSpan="2" Style="{StaticResource OmagCut_CheckBox_Single}"
|
||||
HorizontalAlignment="Right" Margin="0,0,6,0"/>
|
||||
|
||||
<ComboBox Name="TypeCmBx" Grid.Row="9" Grid.ColumnSpan="2" Style="{StaticResource OmagCut_ComboBox}" Margin="6,0,6,0">
|
||||
<ComboBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding}" Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</DataTemplate>
|
||||
</ComboBox.ItemTemplate>
|
||||
</ComboBox>
|
||||
<ComboBox Name="TypeCmBx" Grid.Row="9" Grid.ColumnSpan="2" Style="{StaticResource OmagCut_ComboBox}" Margin="6,0,6,0">
|
||||
<ComboBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding}" Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</DataTemplate>
|
||||
</ComboBox.ItemTemplate>
|
||||
</ComboBox>
|
||||
|
||||
<TextBlock Name="RotLockTxBl" Grid.Row="10" Grid.ColumnSpan="2"
|
||||
<TextBlock Name="RotLockTxBl" Grid.Row="10" Grid.ColumnSpan="2"
|
||||
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
|
||||
<CheckBox Name="RotLockChBx" Grid.Row="10" Grid.ColumnSpan="2" Style="{StaticResource OmagCut_CheckBox_Single}"
|
||||
<CheckBox Name="RotLockChBx" Grid.Row="10" Grid.ColumnSpan="2" Style="{StaticResource OmagCut_CheckBox_Single}"
|
||||
HorizontalAlignment="Right" Margin="0,0,6,0"/>
|
||||
|
||||
<Grid Grid.Row="11" Grid.ColumnSpan="2">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Name="XcoordTxBl" Grid.Column="0" Text="X"
|
||||
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}" HorizontalAlignment="Center"/>
|
||||
<EgtWPFLib:EgtTextBox Name="XcoordTxBx" Grid.Column="1" Margin="0,0,6,0"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
<TextBlock Name="YcoordTxBl" Grid.Column="2" Text="Y"
|
||||
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}" HorizontalAlignment="Center"/>
|
||||
<EgtWPFLib:EgtTextBox Name="YcoordTxBx" Grid.Column="3" Margin="0,0,6,0"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
</Grid>
|
||||
<TextBlock Name="ChainedPathTxBl" Grid.Row="11" Grid.ColumnSpan="2"
|
||||
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
|
||||
<CheckBox Name="ChainedPathChBx" Grid.Row="11" Grid.ColumnSpan="2" Style="{StaticResource OmagCut_CheckBox_Single}"
|
||||
HorizontalAlignment="Right" Margin="0,0,6,0"/>
|
||||
|
||||
<Grid Grid.Row="12" Grid.ColumnSpan="2">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<ComboBox Name="SelToolCmBx" Grid.Row="12" Grid.ColumnSpan="2" Style="{StaticResource OmagCut_ComboBox}" Margin="6,0,6,0">
|
||||
<ComboBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding}" Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</DataTemplate>
|
||||
</ComboBox.ItemTemplate>
|
||||
</ComboBox>
|
||||
|
||||
<Grid Grid.Row="13" Grid.ColumnSpan="2">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Name="XcoordTxBl" Grid.Column="0" Text="X"
|
||||
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}" HorizontalAlignment="Center"/>
|
||||
<EgtWPFLib:EgtTextBox Name="XcoordTxBx" Grid.Column="1" Margin="0,0,6,0"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
<TextBlock Name="YcoordTxBl" Grid.Column="2" Text="Y"
|
||||
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}" HorizontalAlignment="Center"/>
|
||||
<EgtWPFLib:EgtTextBox Name="YcoordTxBx" Grid.Column="3" Margin="0,0,6,0"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
</Grid>
|
||||
|
||||
</Grid>
|
||||
</ScrollViewer>
|
||||
|
||||
<Grid Grid.Row="12" Grid.ColumnSpan="2">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<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>
|
||||
|
||||
<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>
|
||||
|
||||
</Border>
|
||||
|
||||
</Border>
|
||||
|
||||
</UserControl>
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
Imports EgtUILib
|
||||
Imports System.Reflection
|
||||
Imports EgtUILib
|
||||
Imports EgtUILib.EgtInterface
|
||||
|
||||
Public Class FlatteningCut
|
||||
|
||||
@@ -35,14 +37,18 @@ Public Class FlatteningCut
|
||||
Private m_bHeadSide As Boolean = False
|
||||
Private m_nMachType As Integer = 1
|
||||
Private m_bRotLock As Boolean = False
|
||||
Private m_bChainedPath As Boolean = True
|
||||
Private m_nTool As Integer = 0
|
||||
' Array delle modalità di acquisizione dei punti
|
||||
Private m_PointsModeArray(2) As String
|
||||
' Array delle tipologia di lavorazione della spianatura
|
||||
Private m_TypeArray(1) As String
|
||||
Private m_TypeArray(2) As String
|
||||
' Punto selezionato nel disegno
|
||||
Private m_ptPrev As Point3d
|
||||
' Layer per crocette temporanee
|
||||
Private m_nTempLay As Integer = GDB_ID.NULL
|
||||
' Array degliutensili disponibili (lama e fresa)
|
||||
Private m_ToolsArray(1) As String
|
||||
|
||||
' Costanti
|
||||
Private Const MAX_TAB_DEPTH As Double = 10.0
|
||||
@@ -57,8 +63,9 @@ Public Class FlatteningCut
|
||||
End Enum
|
||||
' Costanti che indicano la tipologia di lavorazione della spianatura
|
||||
Private Enum MACH_TYPE As Integer
|
||||
ONEWAY = 0
|
||||
ZIGZAG = 1
|
||||
ZIGZAG = 0
|
||||
ONEWAY = 1
|
||||
SPIRAL = 2
|
||||
End Enum
|
||||
'Costante che indica il lato in cui posizionare i tagli
|
||||
Private Enum CutSide As Integer
|
||||
@@ -66,6 +73,11 @@ Public Class FlatteningCut
|
||||
Right
|
||||
End Enum
|
||||
|
||||
Private Enum TOOL As Integer
|
||||
SAW = 0
|
||||
MILL = 1
|
||||
End Enum
|
||||
|
||||
' Per abilitare la spianatura con la FRESA deve essere imposatato a TRUE il flag "Usa Fresa" nella pagina MACCHINA (campo INCISIONI)
|
||||
Private Sub FlatteningCut_Initialized(sender As Object, e As EventArgs) Handles Me.Initialized
|
||||
' Creo lista modalità di acquisizione punto
|
||||
@@ -75,8 +87,9 @@ Public Class FlatteningCut
|
||||
' la associo alla combobox
|
||||
PointModeCmBx.ItemsSource = m_PointsModeArray
|
||||
' Creo lista tipo lavorazione
|
||||
m_TypeArray(MACH_TYPE.ONEWAY) = EgtMsg(MSG_COMBOBOXPARAM + 39)
|
||||
m_TypeArray(MACH_TYPE.ZIGZAG) = EgtMsg(MSG_COMBOBOXPARAM + 38)
|
||||
m_TypeArray(MACH_TYPE.ONEWAY) = EgtMsg(MSG_COMBOBOXPARAM + 39)
|
||||
m_TypeArray(MACH_TYPE.SPIRAL) = EgtMsg(MSG_COMBOBOXPARAM + 51)
|
||||
' la associo alla combobox
|
||||
TypeCmBx.ItemsSource = m_TypeArray
|
||||
' assegno messaggi
|
||||
@@ -90,19 +103,26 @@ Public Class FlatteningCut
|
||||
ZReleasedTxBl.Text = "Z Svincolo"
|
||||
SideTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 23)
|
||||
RotLockTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 29)
|
||||
ChainedPathTxBl.Text = "Chained path"
|
||||
SimulBtn.ToolTip = EgtMsg(MSG_CADCUTPAGEUC + 1)
|
||||
OkBtn.ToolTip = EgtMsg(MSG_DIRECTCUTPAGEUC + 30)
|
||||
' tipo di utensile in uso per la lavorazione
|
||||
m_ToolsArray(TOOL.SAW) = EgtMsg(MSG_DIRECTCUTPAGEUC + 24)
|
||||
m_ToolsArray(TOOL.MILL) = "Mill"
|
||||
SelToolCmBx.ItemsSource = m_ToolsArray
|
||||
' Carico i dati dell'ultimo taglio
|
||||
m_dDepth = GetPrivateProfileDouble( S_DIRECTCUTS, K_DC_FLATT_DEPTH, m_dDepth, m_MainWindow.GetIniFile())
|
||||
m_dAngO = GetPrivateProfileDouble( S_DIRECTCUTS, K_DC_FLATT_ANGH, m_dAngO, m_MainWindow.GetIniFile())
|
||||
m_dLen = GetPrivateProfileDouble( S_DIRECTCUTS, K_DC_FLATT_LENGTH, m_dLen, m_MainWindow.GetIniFile())
|
||||
m_dWid = GetPrivateProfileDouble( S_DIRECTCUTS, K_DC_FLATT_WIDTH, m_dWid, m_MainWindow.GetIniFile())
|
||||
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())
|
||||
m_dLen = GetPrivateProfileDouble(S_DIRECTCUTS, K_DC_FLATT_LENGTH, m_dLen, m_MainWindow.GetIniFile())
|
||||
m_dWid = GetPrivateProfileDouble(S_DIRECTCUTS, K_DC_FLATT_WIDTH, m_dWid, m_MainWindow.GetIniFile())
|
||||
m_dOverlap = GetPrivateProfileDouble(S_DIRECTCUTS, K_DC_FLATT_OVERLAP, m_dOverlap, m_MainWindow.GetIniFile())
|
||||
m_dZReleased = GetPrivateProfileDouble(S_DIRECTCUTS, K_DC_FLATT_Z_RELEASED, m_dZReleased, m_MainWindow.GetIniFile())
|
||||
m_bHeadSide = (GetPrivateProfileInt(S_DIRECTCUTS, K_DC_FLATT_HEADSIDE, 0, m_MainWindow.GetIniFile()) <> 0)
|
||||
m_nMachType = GetPrivateProfileInt( S_DIRECTCUTS, K_DC_FLATT_MACHTYPE, m_nMachType, m_MainWindow.GetIniFile())
|
||||
m_bRotLock = ( GetPrivateProfileInt( S_DIRECTCUTS, K_DC_FLATT_ROTLOCK, 0, m_MainWindow.GetIniFile()) <> 0)
|
||||
m_ptTipP1.x = GetPrivateProfileDouble( S_DIRECTCUTS, K_DC_FLATT_POSX, m_ptTipP1.x, m_MainWindow.GetIniFile())
|
||||
m_nMachType = GetPrivateProfileInt(S_DIRECTCUTS, K_DC_FLATT_MACHTYPE, m_nMachType, m_MainWindow.GetIniFile())
|
||||
m_bRotLock = (GetPrivateProfileInt(S_DIRECTCUTS, K_DC_FLATT_ROTLOCK, 0, m_MainWindow.GetIniFile()) <> 0)
|
||||
m_bChainedPath = (GetPrivateProfileInt(S_DIRECTCUTS, K_DC_FLAT_CHAINEDPATH, 0, m_MainWindow.GetIniFile()) <> 0)
|
||||
m_nTool = GetPrivateProfileInt(S_MACH_NEST, K_MACH_ENGRAVING_WITHMILL, 1, m_MainWindow.GetMachIniFile())
|
||||
m_ptTipP1.x = GetPrivateProfileDouble(S_DIRECTCUTS, K_DC_FLATT_POSX, m_ptTipP1.x, m_MainWindow.GetIniFile())
|
||||
m_ptTipP1.y = GetPrivateProfileDouble(S_DIRECTCUTS, K_DC_FLATT_POSY, m_ptTipP1.y, m_MainWindow.GetIniFile())
|
||||
End Sub
|
||||
|
||||
@@ -125,16 +145,16 @@ Public Class FlatteningCut
|
||||
' Disabilito registrazione progetto modificato
|
||||
EgtDisableModified()
|
||||
' Creo layer temporaneo per crocette
|
||||
m_nTempLay = EgtCreateGroup( GDB_ID.ROOT)
|
||||
EgtSetLevel( m_nTempLay, GDB_LV.TEMP)
|
||||
m_nTempLay = EgtCreateGroup(GDB_ID.ROOT)
|
||||
EgtSetLevel(m_nTempLay, GDB_LV.TEMP)
|
||||
' Origine tavola
|
||||
m_bRawOk = True
|
||||
If Not EgtGetTableRef( 1, m_ptTabOri) Then
|
||||
If Not EgtGetTableRef(1, m_ptTabOri) Then
|
||||
m_bRawOk = False
|
||||
EgtOutLog("Error on TableRef1")
|
||||
End If
|
||||
' Dati del grezzo
|
||||
If Not GetRawBox( m_ptRawMin, m_ptRawMax) Then
|
||||
If Not GetRawBox(m_ptRawMin, m_ptRawMax) Then
|
||||
m_bRawOk = False
|
||||
EgtOutLog("Error on RawBox")
|
||||
End If
|
||||
@@ -142,7 +162,7 @@ Public Class FlatteningCut
|
||||
m_bPointP1Ok = False
|
||||
m_bPointP2Ok = False
|
||||
' Inizializzo primo punto acquisito dal disegno
|
||||
m_ptPrev = m_ptTipP1 + ( m_ptTabOri - Point3d.ORIG())
|
||||
m_ptPrev = m_ptTipP1 + (m_ptTabOri - Point3d.ORIG())
|
||||
m_ptPrev.z = m_ptRawMax.z
|
||||
' Disegno crocetta che indica il punto acquisito
|
||||
CreateCross(m_nTempLay, m_ptPrev)
|
||||
@@ -151,10 +171,10 @@ Public Class FlatteningCut
|
||||
SetCoordVisibility(True)
|
||||
ShowCoord()
|
||||
' Assegno parametri di lavorazione già definiti
|
||||
DepthTxBx.Text = LenToString( m_dDepth, 1)
|
||||
DirectionTxBx.Text = DoubleToString( m_dAngO - m_MainWindow.m_CurrentMachine.dDeltaC, 2)
|
||||
LenghtTxBx.Text = LenToString( m_dLen, 1)
|
||||
WidthTxBx.Text = LenToString( m_dWid, 2)
|
||||
DepthTxBx.Text = LenToString(m_dDepth, 1)
|
||||
DirectionTxBx.Text = DoubleToString(m_dAngO - m_MainWindow.m_CurrentMachine.dDeltaC, 2)
|
||||
LenghtTxBx.Text = LenToString(m_dLen, 1)
|
||||
WidthTxBx.Text = LenToString(m_dWid, 2)
|
||||
OverlapTxBx.Text = LenToString(m_dOverlap, 2)
|
||||
ZReleasedTxBx.Text = LenToString(m_dZReleased, 2)
|
||||
' carico la quota di svincolo per la spianatura
|
||||
@@ -163,6 +183,9 @@ Public Class FlatteningCut
|
||||
SideChBx.IsChecked = m_bHeadSide
|
||||
TypeCmBx.SelectedIndex = m_nMachType
|
||||
RotLockChBx.IsChecked = m_bRotLock
|
||||
ChainedPathChBx.IsChecked = m_bChainedPath
|
||||
' Assegno l'utensile in definito in macchina per la fresatura
|
||||
SelToolCmBx.SelectedIndex = m_nTool
|
||||
' Reset taglio e disabilito bottone esecuzione
|
||||
m_bCutOk = False
|
||||
UpdateSimulOkBtn()
|
||||
@@ -176,21 +199,24 @@ Public Class FlatteningCut
|
||||
|
||||
Friend Sub FlatteningCut_Unloaded(sender As Object, e As RoutedEventArgs) Handles Me.Unloaded
|
||||
' Salvo i dati correnti
|
||||
WritePrivateProfileString( S_DIRECTCUTS, K_DC_FLATT_DEPTH, DoubleToString( m_dDepth, 2), m_MainWindow.GetIniFile())
|
||||
WritePrivateProfileString( S_DIRECTCUTS, K_DC_FLATT_ANGH, DoubleToString( m_dAngO, 2), m_MainWindow.GetIniFile())
|
||||
WritePrivateProfileString( S_DIRECTCUTS, K_DC_FLATT_LENGTH, DoubleToString( m_dLen, 2), m_MainWindow.GetIniFile())
|
||||
WritePrivateProfileString( S_DIRECTCUTS, K_DC_FLATT_WIDTH, DoubleToString( m_dWid, 2), m_MainWindow.GetIniFile())
|
||||
WritePrivateProfileString( S_DIRECTCUTS, K_DC_FLATT_OVERLAP, DoubleToString(m_dOverlap, 2), m_MainWindow.GetIniFile())
|
||||
WritePrivateProfileString( S_DIRECTCUTS, K_DC_FLATT_Z_RELEASED, DoubleToString(m_dZReleased, 2), m_MainWindow.GetIniFile())
|
||||
WritePrivateProfileString( S_DIRECTCUTS, K_DC_FLATT_HEADSIDE, If( m_bHeadSide, "1", "0"), m_MainWindow.GetIniFile())
|
||||
WritePrivateProfileString( S_DIRECTCUTS, K_DC_FLATT_MACHTYPE, m_nMachType.ToString(), m_MainWindow.GetIniFile())
|
||||
WritePrivateProfileString( S_DIRECTCUTS, K_DC_FLATT_ROTLOCK, If( m_bRotLock, "1", "0"), m_MainWindow.GetIniFile())
|
||||
WritePrivateProfileString( S_DIRECTCUTS, K_DC_FLATT_POSX, DoubleToString( m_ptTipP1.x, 2), m_MainWindow.GetIniFile())
|
||||
WritePrivateProfileString( S_DIRECTCUTS, K_DC_FLATT_POSY, DoubleToString( m_ptTipP1.y, 2), m_MainWindow.GetIniFile())
|
||||
WritePrivateProfileString(S_DIRECTCUTS, K_DC_FLATT_DEPTH, DoubleToString(m_dDepth, 2), m_MainWindow.GetIniFile())
|
||||
WritePrivateProfileString(S_DIRECTCUTS, K_DC_FLATT_ANGH, DoubleToString(m_dAngO, 2), m_MainWindow.GetIniFile())
|
||||
WritePrivateProfileString(S_DIRECTCUTS, K_DC_FLATT_LENGTH, DoubleToString(m_dLen, 2), m_MainWindow.GetIniFile())
|
||||
WritePrivateProfileString(S_DIRECTCUTS, K_DC_FLATT_WIDTH, DoubleToString(m_dWid, 2), m_MainWindow.GetIniFile())
|
||||
WritePrivateProfileString(S_DIRECTCUTS, K_DC_FLATT_OVERLAP, DoubleToString(m_dOverlap, 2), m_MainWindow.GetIniFile())
|
||||
WritePrivateProfileString(S_DIRECTCUTS, K_DC_FLATT_Z_RELEASED, DoubleToString(m_dZReleased, 2), m_MainWindow.GetIniFile())
|
||||
WritePrivateProfileString(S_DIRECTCUTS, K_DC_FLATT_HEADSIDE, If(m_bHeadSide, "1", "0"), m_MainWindow.GetIniFile())
|
||||
WritePrivateProfileString(S_DIRECTCUTS, K_DC_FLATT_MACHTYPE, m_nMachType.ToString(), m_MainWindow.GetIniFile())
|
||||
WritePrivateProfileString(S_DIRECTCUTS, K_DC_FLATT_ROTLOCK, If(m_bRotLock, "1", "0"), m_MainWindow.GetIniFile())
|
||||
WritePrivateProfileString(S_DIRECTCUTS, K_DC_FLATT_POSX, DoubleToString(m_ptTipP1.x, 2), m_MainWindow.GetIniFile())
|
||||
WritePrivateProfileString(S_DIRECTCUTS, K_DC_FLATT_POSY, DoubleToString(m_ptTipP1.y, 2), m_MainWindow.GetIniFile())
|
||||
' Se non vado in simulazione
|
||||
If Not m_bSimul Then
|
||||
' imposto la Z di sicurezza corretta
|
||||
EgtMdbSetGeneralParam(MCH_GP.SAFEZ, DirectCutPageUC.m_dZSafe)
|
||||
EgtMdbSave()
|
||||
' Dichiaro sottopagina da non riattivare
|
||||
m_MainWindow.m_DirectCutPageUC.m_ActiveDirectCutPage = DirectCutPageUC.DirectCutPages.DirectCut
|
||||
m_MainWindow.m_DirectCutPageUC.m_ControlsDirectCutUC.m_ActiveDirectCutPage = ControlsDirectCutUC.DirectCutPages.DirectCut
|
||||
' Rimuovo layer temporaneo per crocette
|
||||
EgtErase(m_nTempLay)
|
||||
' Rimuovo eventuale pezzo per taglio diretto
|
||||
@@ -265,30 +291,43 @@ Public Class FlatteningCut
|
||||
' Verifico configurazione tavola e grezzo
|
||||
If Not m_bRawOk Then Return
|
||||
|
||||
' forzo utilizzo testa H1 solo per macchina con 2 teste
|
||||
Dim bIsMultiCut As Boolean = (EgtGetHeadId("H101") <> GDB_ID.NULL)
|
||||
' Ricavo dati lama corrente
|
||||
Dim sSaw As String = m_MainWindow.m_CurrentMachine.sCurrSaw
|
||||
If bIsMultiCut Then
|
||||
EgtSetCalcTool(sSaw, "H1", 1)
|
||||
End If
|
||||
|
||||
' Se acquisizone lama o laser
|
||||
If PointModeCmBx.SelectedIndex = PT_MODE.SAW Or PointModeCmBx.SelectedIndex = PT_MODE.LASER Then
|
||||
' Recupero la posizione macchina
|
||||
Dim dL1, dL2, dL3, dR1, dR2 As Double
|
||||
If Not m_MainWindow.m_CNCommunication.GetAxesPositions(dL1, dL2, dL3, dR1, dR2) Then Return
|
||||
' Ricavo dati lama corrente
|
||||
Dim sSaw As String = m_MainWindow.m_CurrentMachine.sCurrSaw
|
||||
' Se macchina multicut il primo asse rotante restituito è quello della tavola
|
||||
Dim vAng() As Double = {dR1, dR2, 0}
|
||||
If bIsMultiCut Then
|
||||
vAng(0) = 0
|
||||
vAng(1) = dR1
|
||||
vAng(2) = dR2
|
||||
End If
|
||||
' Se punto da laser
|
||||
If PointModeCmBx.SelectedIndex = PT_MODE.LASER Then
|
||||
' Imposto come testa corrente il laser (senza utensile ovviamente)
|
||||
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
|
||||
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, vAng, True, m_ptTipP1) Then Return
|
||||
' Ora imposto la lama corrente
|
||||
If Not EgtSetCalcTool(sSaw, "H1", 1) Then Return
|
||||
' Altrimenti da lama
|
||||
' Altrimenti da lama
|
||||
Else
|
||||
' Imposto la lama corrente
|
||||
If Not EgtSetCalcTool(sSaw, "H1", 1) Then Return
|
||||
' Trasformo in posizione punta utensile in basso
|
||||
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, dR1, dR2, True, m_ptTipP1) Then Return
|
||||
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, vAng, True, m_ptTipP1) Then Return
|
||||
End If
|
||||
' Calcolo direzione asse lama
|
||||
If Not EgtGetCalcToolDirFromAngles(dR1, dR2, m_vtToolP1) Then Return
|
||||
If Not EgtGetCalcToolDirFromAngles(vAng, m_vtToolP1) Then Return
|
||||
' Porto il tip nell'origine tavola
|
||||
m_ptTipP1.ToLoc(New Frame3d(m_ptTabOri))
|
||||
m_bPointP1Ok = True
|
||||
@@ -298,15 +337,13 @@ Public Class FlatteningCut
|
||||
m_dAngO = dTAngO + 90
|
||||
DirectionTxBx.Text = DoubleToString(m_dAngO - m_MainWindow.m_CurrentMachine.dDeltaC, 2)
|
||||
|
||||
' Altrimenti da disegno
|
||||
' Altrimenti da disegno
|
||||
Else
|
||||
' Assegno punto selezionato nel disegno a m_ptTipP1
|
||||
m_ptTipP1 = m_ptPrev
|
||||
' 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
|
||||
End If
|
||||
@@ -336,27 +373,41 @@ Public Class FlatteningCut
|
||||
' Verifico configurazione tavola e grezzo
|
||||
If Not m_bRawOk Then Return
|
||||
|
||||
' forzo utilizzo testa H1 solo per macchina con 2 teste
|
||||
Dim bIsMultiCut As Boolean = (EgtGetHeadId("H101") <> GDB_ID.NULL)
|
||||
' Ricavo dati lama corrente
|
||||
Dim sSaw As String = m_MainWindow.m_CurrentMachine.sCurrSaw
|
||||
If bIsMultiCut Then
|
||||
EgtSetCalcTool(sSaw, "H1", 1)
|
||||
End If
|
||||
|
||||
' Se acquisizone lama o laser
|
||||
If PointModeCmBx.SelectedIndex = PT_MODE.SAW Or PointModeCmBx.SelectedIndex = PT_MODE.LASER Then
|
||||
' Recupero la posizione macchina
|
||||
Dim dL1, dL2, dL3, dR1, dR2 As Double
|
||||
If Not m_MainWindow.m_CNCommunication.GetAxesPositions(dL1, dL2, dL3, dR1, dR2) Then Return
|
||||
' Ricavo dati lama corrente
|
||||
Dim sSaw As String = m_MainWindow.m_CurrentMachine.sCurrSaw
|
||||
' Se macchina multicut il primo asse rotante restituito è quello della tavola
|
||||
Dim vAng() As Double = {dR1, dR2, 0}
|
||||
If bIsMultiCut Then
|
||||
vAng(0) = 0
|
||||
vAng(1) = dR1
|
||||
vAng(2) = dR2
|
||||
End If
|
||||
' Se punto da laser
|
||||
If PointModeCmBx.SelectedIndex = PT_MODE.LASER Then
|
||||
' Imposto come testa corrente il laser (senza utensile ovviamente)
|
||||
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
|
||||
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, vAng, True, m_ptTipP2) Then Return
|
||||
' Ora imposto la lama corrente
|
||||
If Not EgtSetCalcTool(sSaw, "H1", 1) Then Return
|
||||
' Altrimenti da lama
|
||||
' Altrimenti da lama
|
||||
Else
|
||||
' Imposto la lama corrente
|
||||
If Not EgtSetCalcTool(sSaw, "H1", 1) Then Return
|
||||
' Trasformo in posizione punta utensile in basso
|
||||
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, dR1, dR2, True, m_ptTipP2) Then Return
|
||||
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, vAng, True, m_ptTipP2) Then Return
|
||||
|
||||
End If
|
||||
' Calcolo direzione asse lama
|
||||
If Not EgtGetCalcToolDirFromAngles(dR1, dR2, m_vtToolP2) Then Return
|
||||
@@ -364,15 +415,13 @@ Public Class FlatteningCut
|
||||
m_ptTipP2.ToLoc(New Frame3d(m_ptTabOri))
|
||||
m_bPointP2Ok = True
|
||||
|
||||
' Altrimenti da disegno
|
||||
' Altrimenti da disegno
|
||||
Else
|
||||
' Assegno punto selezionato nel disegno a m_ptTipP2
|
||||
m_ptTipP2 = m_ptPrev
|
||||
' 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
|
||||
End If
|
||||
@@ -406,7 +455,7 @@ Public Class FlatteningCut
|
||||
|
||||
Private Sub DepthTxBx_EgtClosed(sender As Object, e As EventArgs) Handles DepthTxBx.EgtClosed
|
||||
' Verifico che l'affondamento impostato non sia superiore a quello massimo
|
||||
Dim dMaxDepth = m_ptRawMax.z - m_ptRawMin.z + MAX_TAB_DEPTH
|
||||
Dim dMaxDepth = m_ptRawMax.z - m_ptRawMin.z + m_MainWindow.m_CurrentMachine.MaxTabDepth
|
||||
Dim dDepth As Double = 0
|
||||
StringToLen(DepthTxBx.Text, dDepth)
|
||||
If dDepth < 0 Then
|
||||
@@ -521,6 +570,16 @@ Public Class FlatteningCut
|
||||
EgtDraw()
|
||||
End Sub
|
||||
|
||||
Private Sub SelToolCmBx_SelectionChanged(sender As Object, e As EventArgs) Handles SelToolCmBx.SelectionChanged
|
||||
m_nTool = SelToolCmBx.SelectedIndex
|
||||
' Disabilito il concatenamento
|
||||
ChainedPathChBx.IsEnabled = (m_nTool = TOOL.MILL)
|
||||
' Disegno il taglio
|
||||
CreateFlatteningCut()
|
||||
SetMachineInCurrPos()
|
||||
EgtDraw()
|
||||
End Sub
|
||||
|
||||
Private Sub RotLockChBx_Click(sender As Object, e As EventArgs) Handles RotLockChBx.Click
|
||||
m_bRotLock = RotLockChBx.IsChecked
|
||||
' Disegno il taglio
|
||||
@@ -529,6 +588,14 @@ Public Class FlatteningCut
|
||||
EgtDraw()
|
||||
End Sub
|
||||
|
||||
Private Sub ChainedPathChBx_Click(sender As Object, e As EventArgs) Handles ChainedPathChBx.Click
|
||||
m_bChainedPath = ChainedPathChBx.IsChecked
|
||||
' Disegno il taglio
|
||||
CreateFlatteningCut()
|
||||
SetMachineInCurrPos()
|
||||
EgtDraw()
|
||||
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
|
||||
@@ -568,6 +635,7 @@ Public Class FlatteningCut
|
||||
m_bSimul = True
|
||||
m_CurrProjPage.m_SceneButtons.MeasureBtn.IsChecked = False
|
||||
m_CurrProjPage.CurrProjGrid.Visibility = Windows.Visibility.Hidden
|
||||
m_MainWindow.m_DirectCutPageUC.m_ControlsDirectCutUC.LeftButtonGrid.Children.Remove(Me)
|
||||
m_CurrProjPage.CurrentProjectPageGrid.Children.Remove(m_MainWindow.m_DirectCutPageUC)
|
||||
m_MainWindow.m_PrevActivePage = MainWindow.Pages.DirectCut
|
||||
m_CurrProjPage.CurrentProjectPageGrid.Children.Add(m_MainWindow.m_SimulationPage)
|
||||
@@ -579,9 +647,9 @@ Public Class FlatteningCut
|
||||
m_CurrProjPage.SetWarningMessage("Trial Version")
|
||||
#Else
|
||||
' Verifico non sia versione Ufficio
|
||||
If m_MainWindow.GetKeyOption( MainWindow.KEY_OPT.OFFICE_TYPE) Then
|
||||
m_CurrProjPage.SetWarningMessage( "Office Version")
|
||||
Return
|
||||
If m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.OFFICE_TYPE) Then
|
||||
m_CurrProjPage.SetWarningMessage("Office Version")
|
||||
Return
|
||||
End If
|
||||
' Verifico ci sia un taglio valido
|
||||
If Not m_bCutOk Then Return
|
||||
@@ -596,13 +664,15 @@ Public Class FlatteningCut
|
||||
m_CurrProjPage.SetErrorMessage(EgtMsg(90314)) 'Errore nella generazione del programma CN
|
||||
Return
|
||||
End If
|
||||
Dim sNameProg As Integer = 900
|
||||
sNameProg = GetPrivateProfileInt(S_PARTPROGRAM, "NameProg", sNameProg, m_MainWindow.GetMachIniFile)
|
||||
' Download programma (eventuali errori sono segnalati dalla funzione)
|
||||
If m_MainWindow.m_CNCommunication.SendProgram(sCncPath, 900) Then
|
||||
If m_MainWindow.m_CNCommunication.SendProgram(sCncPath, sNameProg) Then
|
||||
' copio il progetto corrente come progetto in lavorazione
|
||||
Dim sWrkPath As String = m_MainWindow.GetTempDir() & "\" & "WorkProj.nge"
|
||||
My.Computer.FileSystem.CopyFile(sMchPath, sWrkPath, True)
|
||||
' lancio eventuale lua post-trasmissione
|
||||
m_MainWindow.ExecSentProgScript( True)
|
||||
m_MainWindow.ExecSentProgScript(True)
|
||||
End If
|
||||
#End If
|
||||
End Sub
|
||||
@@ -610,20 +680,23 @@ Public Class FlatteningCut
|
||||
Private Sub ExitBtn_Click(sender As Object, e As RoutedEventArgs) Handles ExitBtn.Click
|
||||
EgtMdbSetGeneralParam(MCH_GP.SAFEZ, DirectCutPageUC.m_dZSafe)
|
||||
EgtMdbSave()
|
||||
m_MainWindow.m_DirectCutPageUC.LeftButtonGrid.Children.Remove(Me)
|
||||
m_MainWindow.m_DirectCutPageUC.m_ControlsDirectCutUC.LeftButtonGrid.Children.Remove(Me)
|
||||
End Sub
|
||||
|
||||
' ricavo l'ingombro di lavorazione in funzione dell'utensile selezionato
|
||||
Private Function GetFootPrintTool() As Double
|
||||
' vedere nella pagina Allarm il capito "Incisioni"
|
||||
Dim bForceUseMill As Boolean = (GetPrivateProfileInt(S_MACH_NEST, K_MACH_ENGRAVING_WITHMILL, 1, m_MainWindow.GetMachIniFile()) <> 0)
|
||||
Dim bForceUseMill As Boolean = (m_nTool = TOOL.MILL)
|
||||
Dim dFootPrint As Double = 0
|
||||
' verifico quale lavorazione è attiva
|
||||
If Not String.IsNullOrEmpty(m_MainWindow.m_CurrentMachine.sCurrSawing) AndAlso Not bForceUseMill Then
|
||||
Dim bSetTool As Boolean = EgtTdbSetCurrTool(m_MainWindow.m_CurrentMachine.sCurrSaw)
|
||||
If Not bSetTool Then EgtOutLog("Erro nel settaggio utensile lama " & m_MainWindow.m_CurrentMachine.sCurrSaw)
|
||||
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)
|
||||
'GetDrillFromDrilling(sCurrMill, m_MainWindow.m_CurrentMachine.sCurrMilling)
|
||||
GetMillFromMilling(sCurrMill, m_MainWindow.m_CurrentMachine.sCurrMilling)
|
||||
' recupero informazioni della fresa in uso
|
||||
EgtTdbSetCurrTool(sCurrMill)
|
||||
EgtTdbGetCurrToolParam(MCH_TP.DIAM, dFootPrint)
|
||||
@@ -653,18 +726,39 @@ Public Class FlatteningCut
|
||||
Dim ptStart As Point3d = m_ptTipP1
|
||||
ptStart.z = 0
|
||||
Dim nCutId = EgtCreateLinePDL(nLayerId, ptStart, m_dAngO, m_dLen)
|
||||
|
||||
' -- APPLICO OFFSET AI TAGLI -- And PointModeCmBx.SelectedIndex = PT_MODE.SAW
|
||||
If m_nTool = TOOL.SAW And PointModeCmBx.SelectedIndex = PT_MODE.SAW Then
|
||||
' Applico un offset al taglio:
|
||||
Dim vtOffs As New Vector3d
|
||||
EgtStartVector(nCutId, GDB_RT.GLOB, vtOffs)
|
||||
vtOffs.Rotate(Vector3d.Z_AX, 90)
|
||||
Dim SawThick As Double = GetFootPrintTool()
|
||||
Dim DirOffs As Double = GetPrivateProfileDouble(S_DIRECTCUTS, K_DC_FLATT_SAWTH, 0, m_MainWindow.GetIniFile)
|
||||
Dim vtNormTool As Vector3d = m_vtToolP1
|
||||
vtNormTool.Normalize()
|
||||
EgtOutLog("Offset flattening: " & DirOffs.ToString & "*" & SawThick.ToString)
|
||||
If DirOffs <> 0 Then EgtMove(nCutId, vtOffs * DirOffs * SawThick, GDB_RT.GLOB)
|
||||
End If
|
||||
|
||||
EgtSetInfo(nCutId, INFO_DIRECTCUT, 1)
|
||||
' Imposto affondamento e angolo di fianco sul taglio
|
||||
EgtSetInfo(nCutId, INFO_DEPTH, m_dDepth)
|
||||
If (GetPrivateProfileInt(S_MACH_NEST, K_MACH_ENGRAVING_WITHMILL, 1, m_MainWindow.GetMachIniFile()) <> 0) Then
|
||||
If (m_nTool = TOOL.MILL) Then
|
||||
EgtSetInfo(nCutId, INFO_WIDTH, GetFootPrintTool)
|
||||
End If
|
||||
EgtSetInfo(nCutId, INFO_SIDE_ANGLE, 0)
|
||||
' Imposto prima direzione
|
||||
EgtSetInfo(nCutId, INFO_DIR, 1)
|
||||
' Imposto se iniziare la fresatura dal punto indicato
|
||||
Dim bReducePath As Boolean = Not GetPrivateProfileInt(S_MACH_NEST, K_MACH_STARTCENERTOOLPATH, 0, m_MainWindow.GetMachIniFile()) <> 0
|
||||
If Not bReducePath Then EgtSetInfo(nCutId, INFO_STRICT, 0)
|
||||
|
||||
' Eventuale bloccaggio rotazione asse C tra le passate
|
||||
If RotLockChBx.IsChecked Then
|
||||
EgtSetInfo(nCutId, INFO_ENABLE_INVERT, False)
|
||||
End If
|
||||
EgtSetInfo(nCutId, INFO_STEP_TYPE, m_nMachType)
|
||||
' Funzione che crea i tagli successivi al primo
|
||||
MultiplyCut(nLayerId, nCutId)
|
||||
' Creo layer per crocetta di riferimento
|
||||
@@ -697,10 +791,17 @@ Public Class FlatteningCut
|
||||
End Function
|
||||
|
||||
Private Function MultiplyCut(nLayerId As Integer, nCutId As Integer) As Boolean
|
||||
Dim bEngWithMill As Boolean = (m_nTool = TOOL.MILL)
|
||||
Dim bReducePath As Boolean = Not GetPrivateProfileInt(S_MACH_NEST, K_MACH_STARTCENERTOOLPATH, 0, m_MainWindow.GetMachIniFile()) <> 0
|
||||
|
||||
' Recupero spessore della lama (utensile) correntemente attiva
|
||||
Dim dThick As Double = GetFootPrintTool()
|
||||
If dThick = 0 Then Return False
|
||||
|
||||
' Salvo la prima curva nella lista dei percorsi da concatenare
|
||||
Dim CutsList As New List(Of Integer)
|
||||
CutsList.Add(nCutId)
|
||||
|
||||
' Imposto angolo di rotazione a seconda del lato dei tagli
|
||||
Dim dRotAngO As Double = If(SideChBx.IsChecked(), -90, 90)
|
||||
' Definisco vettore di spostamento
|
||||
@@ -718,6 +819,10 @@ Public Class FlatteningCut
|
||||
If nStepNum > 1 Then
|
||||
dDelta = dWidth / (nStepNum - 1)
|
||||
End If
|
||||
' definisco la larghezza dell'utensile (solo per la fresa)
|
||||
EgtSetInfo(nCutId, INFO_WIDTH, dThick)
|
||||
' definisco il tipo di utensile da utilizzare
|
||||
EgtSetInfo(nCutId, "EngravingWithMill", m_nTool)
|
||||
' Creo vettore delta
|
||||
vtDelta *= dDelta
|
||||
' Creo indice per impostare info che indica tipologia di spianatura
|
||||
@@ -726,6 +831,8 @@ Public Class FlatteningCut
|
||||
Dim vtPerpMove As Vector3d = Index * vtDelta
|
||||
' Creo copie
|
||||
Dim nCut2Id = EgtCopyGlob(nCutId, nLayerId)
|
||||
EgtSetInfo(nCut2Id, INFO_WIDTH, dThick)
|
||||
EgtSetInfo(nCutId, "EngravingWithMill", m_nTool)
|
||||
' Assegno info direzione a seconda del tipo di spianatura
|
||||
If TypeCmBx.SelectedIndex = MACH_TYPE.ZIGZAG Then
|
||||
If nTypeIndex = 1 Then
|
||||
@@ -739,10 +846,77 @@ Public Class FlatteningCut
|
||||
EgtSetInfo(nCut2Id, INFO_DIR, 1)
|
||||
End If
|
||||
EgtMove(nCut2Id, vtPerpMove, GDB_RT.GLOB)
|
||||
|
||||
' ----------------------- CREO SEGMENTI PER CONCATENAMENTO CURVE -----------------------
|
||||
If m_bChainedPath And bEngWithMill Then
|
||||
If bReducePath Then
|
||||
If Index < nStepNum - 1 Then
|
||||
ExtendLenghtMillPath(nCut2Id, -dThick / 2)
|
||||
ElseIf Index = nStepNum - 1 Then
|
||||
If nStepNum Mod 2 = 0 Then
|
||||
ExtendLenghtMillPath(nCut2Id, -dThick / 2, False, True)
|
||||
Else
|
||||
ExtendLenghtMillPath(nCut2Id, -dThick / 2, True, False)
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
CutsList.Add(nCut2Id)
|
||||
End If
|
||||
' ----------------------- CREO SEGMENTI PER CONCATENAMENTO CURVE -----------------------
|
||||
|
||||
Next
|
||||
|
||||
' ----------------------- CREO UN UNICO PERCORSO CONCATENATO -----------------------
|
||||
If m_bChainedPath And bEngWithMill Then
|
||||
' Decidere se accorciare i tagli del valore del raggio utensile!
|
||||
If bReducePath Then
|
||||
ExtendLenghtMillPath(CutsList(0), -dThick / 2, False, True)
|
||||
End If
|
||||
For Index As Integer = 0 To CutsList.Count - 2
|
||||
If Index Mod 2 <> 0 Then
|
||||
' Costruisco la linea di collegamento tra due curve adiacenti
|
||||
Dim PtStart_1 As Point3d
|
||||
EgtStartPoint(CutsList(Index), GDB_RT.GLOB, PtStart_1)
|
||||
Dim PtStart_2 As Point3d
|
||||
EgtStartPoint(CutsList(Index + 1), GDB_RT.GLOB, PtStart_2)
|
||||
CutsList.Add(EgtCreateLine(nLayerId, PtStart_1, PtStart_2))
|
||||
Else
|
||||
' Costruisco la linea di collegamento tra due curve adiacenti
|
||||
Dim PtStart_1 As Point3d
|
||||
EgtEndPoint(CutsList(Index), GDB_RT.GLOB, PtStart_1)
|
||||
Dim PtStart_2 As Point3d
|
||||
EgtEndPoint(CutsList(Index + 1), GDB_RT.GLOB, PtStart_2)
|
||||
CutsList.Add(EgtCreateLine(nLayerId, PtStart_1, PtStart_2))
|
||||
End If
|
||||
Next
|
||||
Dim ptNear As Point3d
|
||||
EgtStartPoint(CutsList(0), ptNear)
|
||||
Dim IdJointCurv As Integer = EgtCreateCurveCompoByChain(nLayerId, CutsList.ToArray, ptNear, True)
|
||||
EgtSetInfo(IdJointCurv, INFO_DIRECTCUT, 1)
|
||||
EgtSetInfo(IdJointCurv, INFO_STEP_TYPE, m_nMachType)
|
||||
EgtSetInfo(IdJointCurv, INFO_WIDTH, dThick)
|
||||
' Se unisco il percorso devo per forza usare la fresa!
|
||||
EgtSetInfo(IdJointCurv, "EngravingWithMill", 1)
|
||||
If Not bReducePath Then EgtSetInfo(IdJointCurv, INFO_STRICT, 0)
|
||||
End If
|
||||
' ----------------------- CREO UN UNICO PERCORSO CONCATENATO -----------------------
|
||||
|
||||
Return True
|
||||
End Function
|
||||
|
||||
Private Sub ExtendLenghtMillPath(ByVal IdCurv As Integer, ByVal ReduceVal As Double,
|
||||
ByVal Optional bStart As Boolean = True, ByVal Optional bEnd As Boolean = True)
|
||||
Dim PtStart As Point3d
|
||||
EgtStartPoint(IdCurv, GDB_RT.GLOB, PtStart)
|
||||
Dim PtEnd As Point3d
|
||||
EgtEndPoint(IdCurv, GDB_RT.GLOB, PtEnd)
|
||||
If bStart Then EgtTrimExtendCurveByLen(IdCurv, ReduceVal, PtStart, GDB_RT.GLOB)
|
||||
If bEnd Then EgtTrimExtendCurveByLen(IdCurv, ReduceVal, PtEnd, GDB_RT.GLOB)
|
||||
Dim dLenLine As Double
|
||||
EgtCurveLength(IdCurv, dLenLine)
|
||||
EgtOutLog("Lunghezza segmento ridotto: " & dLenLine.ToString)
|
||||
End Sub
|
||||
|
||||
Private Function CreateCross(nLayerId As Integer, ptP As Point3d) As Boolean
|
||||
' Aggiungo crocette
|
||||
Dim vtCrossX As New Vector3d(20, 0, 0)
|
||||
|
||||
@@ -61,12 +61,12 @@
|
||||
|
||||
<TextBlock Name="DirectionTxBl" Grid.Column="0" Grid.Row="3"
|
||||
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="DirectionTxBx" Grid.Column="1" Grid.Row="3" Margin="0,0,6,0"
|
||||
<EgtWPFLib:EgtTextBox Name="DirectionTxBx" Grid.Column="1" Grid.Row="3" Margin="0,0,6,0" IsLength="False"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
|
||||
<TextBlock Name="SideAngleTxBl" Grid.Column="0" Grid.Row="4"
|
||||
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="SideAngleTxBx" Grid.Column="1" Grid.Row="4" Margin="0,0,6,0"
|
||||
<EgtWPFLib:EgtTextBox Name="SideAngleTxBx" Grid.Column="1" Grid.Row="4" Margin="0,0,6,0" IsLength="False"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
|
||||
<Grid Grid.Row="5" Grid.ColumnSpan="2">
|
||||
@@ -89,7 +89,7 @@
|
||||
<TextBlock Name="DimPzXTxBl" Grid.Column="2" Grid.Row="0"
|
||||
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
|
||||
|
||||
<EgtWPFLib:EgtTextBox Name="NumPzXTxBx" Grid.Column="0" Grid.Row="1" Width="75"
|
||||
<EgtWPFLib:EgtTextBox Name="NumPzXTxBx" Grid.Column="0" Grid.Row="1" Width="75" IsLength="False"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="DimPzXTxBx" Grid.Column="2" Grid.Row="1" Width="75"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}" />
|
||||
@@ -99,7 +99,7 @@
|
||||
<TextBlock Name="DimPzYTxBl" Grid.Column="2" Grid.Row="2"
|
||||
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
|
||||
|
||||
<EgtWPFLib:EgtTextBox Name="NumPzYTxBx" Grid.Column="0" Grid.Row="3" Width="75"
|
||||
<EgtWPFLib:EgtTextBox Name="NumPzYTxBx" Grid.Column="0" Grid.Row="3" Width="75" IsLength="False"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="DimPzYTxBx" Grid.Column="2" Grid.Row="3" Width="75"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}" />
|
||||
|
||||
+70
-12
@@ -38,6 +38,8 @@ Public Class GridCut
|
||||
Private m_ptPrev As Point3d
|
||||
' Layer per crocette temporanee
|
||||
Private m_nTempLay As Integer = GDB_ID.NULL
|
||||
' Gestione spessore lama
|
||||
Private m_bSawTh As Boolean = False
|
||||
|
||||
' Costanti
|
||||
Private Const MAX_TAB_DEPTH As Double = 10.0
|
||||
@@ -82,7 +84,12 @@ Public Class GridCut
|
||||
m_nNumX = GetPrivateProfileInt( S_DIRECTCUTS, K_DC_GRID_NUMX, m_nNumX, m_MainWindow.GetIniFile())
|
||||
m_dDimX = GetPrivateProfileDouble( S_DIRECTCUTS, K_DC_GRID_DIMX, m_dDimX, m_MainWindow.GetIniFile())
|
||||
m_nNumY = GetPrivateProfileInt( S_DIRECTCUTS, K_DC_GRID_NUMY, m_nNumY, m_MainWindow.GetIniFile())
|
||||
m_dDimY = GetPrivateProfileDouble( S_DIRECTCUTS, K_DC_GRID_DIMY, m_dDimY, m_MainWindow.GetIniFile())
|
||||
m_dDimY = GetPrivateProfileDouble(S_DIRECTCUTS, K_DC_GRID_DIMY, m_dDimY, m_MainWindow.GetIniFile())
|
||||
|
||||
' --- INIZIO GESTIONE SPECIALE --- per macchina sinistrorsa
|
||||
m_bSawTh = (GetPrivateProfileInt(S_DIRECTCUTS, K_DC_SING_SAWTH, 0, m_MainWindow.GetIniFile()) <> 0)
|
||||
' --- FINE GESTIONE SPECIALE --- per macchina sinistrorsa
|
||||
|
||||
m_bHeadSide = ( GetPrivateProfileInt( S_DIRECTCUTS, K_DC_GRID_HEADSIDE, 0, m_MainWindow.GetIniFile()) <> 0)
|
||||
m_ptTipP1.x = GetPrivateProfileDouble( S_DIRECTCUTS, K_DC_GRID_POSX, m_ptTipP1.x, m_MainWindow.GetIniFile())
|
||||
m_ptTipP1.y = GetPrivateProfileDouble( S_DIRECTCUTS, K_DC_GRID_POSY, m_ptTipP1.y, m_MainWindow.GetIniFile())
|
||||
@@ -141,6 +148,11 @@ Public Class GridCut
|
||||
NumPzYTxBx.Text = m_nNumY.ToString()
|
||||
DimPzYTxBx.Text = LenToString( m_dDimY, 1)
|
||||
SideChBx.IsChecked = m_bHeadSide
|
||||
|
||||
' --- INIZIO GESTIONE SPECIALE --- per macchina sinistrorsa
|
||||
m_bSawTh = (GetPrivateProfileInt(S_DIRECTCUTS, K_DC_SING_SAWTH, 0, m_MainWindow.GetIniFile()) <> 0)
|
||||
' --- FINE GESTIONE SPECIALE --- per macchina sinistrorsa
|
||||
|
||||
' Reset taglio e disabilito bottone esecuzione
|
||||
m_bCutOk = False
|
||||
UpdateSimulOkBtn()
|
||||
@@ -168,7 +180,7 @@ Public Class GridCut
|
||||
' Se non vado in simulazione
|
||||
If Not m_bSimul Then
|
||||
' Dichiaro sottopagina da non riattivare
|
||||
m_MainWindow.m_DirectCutPageUC.m_ActiveDirectCutPage = DirectCutPageUC.DirectCutPages.DirectCut
|
||||
m_MainWindow.m_DirectCutPageUC.m_ControlsDirectCutUC.m_ActiveDirectCutPage = ControlsDirectCutUC.DirectCutPages.DirectCut
|
||||
' Rimuovo layer temporaneo per crocette
|
||||
EgtErase(m_nTempLay)
|
||||
' Rimuovo eventuale pezzo per taglio diretto
|
||||
@@ -248,6 +260,12 @@ Public Class GridCut
|
||||
' Verifico configurazione tavola e grezzo
|
||||
If Not m_bRawOk Then Return
|
||||
|
||||
' forzo utilizzo testa H1 solo per macchina con 2 teste
|
||||
Dim bIsMultiCut As Boolean = (EgtGetHeadId("H101") <> GDB_ID.NULL)
|
||||
If bIsMultiCut Then
|
||||
m_MainWindow.m_DirectCutPageUC.ReloadParam()
|
||||
End If
|
||||
|
||||
' Recupero dati utensile e testa corrente
|
||||
Dim sTool As String = ""
|
||||
Dim sHead As String = ""
|
||||
@@ -260,6 +278,13 @@ Public Class GridCut
|
||||
' Recupero la posizione macchina
|
||||
Dim dL1, dL2, dL3, dR1, dR2 As Double
|
||||
If Not m_MainWindow.m_CNCommunication.GetAxesPositions(dL1, dL2, dL3, dR1, dR2) Then Return
|
||||
' Se macchina multicut il primo asse rotante restituito è quello della tavola
|
||||
Dim vAng() As Double = {dR1, dR2, 0}
|
||||
If bIsMultiCut Then
|
||||
vAng(0) = 0
|
||||
vAng(1) = dR1
|
||||
vAng(2) = dR2
|
||||
End If
|
||||
' Ricavo dati lama corrente
|
||||
Dim sSaw As String = m_MainWindow.m_CurrentMachine.sCurrSaw
|
||||
' Se punto da laser
|
||||
@@ -267,7 +292,7 @@ Public Class GridCut
|
||||
' Imposto come testa corrente il laser (senza utensile ovviamente)
|
||||
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
|
||||
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, vAng, True, m_ptTipP1) Then Return
|
||||
' Reimposto eventuale precedente utensile
|
||||
EgtSetCalcTool(sTool, sHead, nExit)
|
||||
' Altrimenti da lama
|
||||
@@ -275,10 +300,10 @@ Public Class GridCut
|
||||
' 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
|
||||
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, vAng, True, m_ptTipP1) Then Return
|
||||
End If
|
||||
' Calcolo direzione asse lama
|
||||
If Not EgtGetCalcToolDirFromAngles(dR1, dR2, m_vtToolP1) Then Return
|
||||
If Not EgtGetCalcToolDirFromAngles(vAng, m_vtToolP1) Then Return
|
||||
' Porto il tip nell'origine tavola
|
||||
m_ptTipP1.ToLoc(New Frame3d(m_ptTabOri))
|
||||
m_bPointP1Ok = True
|
||||
@@ -327,6 +352,12 @@ Public Class GridCut
|
||||
' Verifico configurazione tavola e grezzo
|
||||
If Not m_bRawOk Then Return
|
||||
|
||||
' forzo utilizzo testa H1 solo per macchina con 2 teste
|
||||
Dim bIsMultiCut As Boolean = (EgtGetHeadId("H101") <> GDB_ID.NULL)
|
||||
If bIsMultiCut Then
|
||||
m_MainWindow.m_DirectCutPageUC.ReloadParam()
|
||||
End If
|
||||
|
||||
' Recupero dati utensile e testa corrente
|
||||
Dim sTool As String = ""
|
||||
Dim sHead As String = ""
|
||||
@@ -339,6 +370,13 @@ Public Class GridCut
|
||||
' Recupero la posizione macchina
|
||||
Dim dL1, dL2, dL3, dR1, dR2 As Double
|
||||
If Not m_MainWindow.m_CNCommunication.GetAxesPositions(dL1, dL2, dL3, dR1, dR2) Then Return
|
||||
' Se macchina multicut il primo asse rotante restituito è quello della tavola
|
||||
Dim vAng() As Double = {dR1, dR2, 0}
|
||||
If bIsMultiCut Then
|
||||
vAng(0) = 0
|
||||
vAng(1) = dR1
|
||||
vAng(2) = dR2
|
||||
End If
|
||||
' Ricavo dati lama corrente
|
||||
Dim sSaw As String = m_MainWindow.m_CurrentMachine.sCurrSaw
|
||||
' Se punto da laser
|
||||
@@ -346,7 +384,7 @@ Public Class GridCut
|
||||
' Imposto come testa corrente il laser (senza utensile ovviamente)
|
||||
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
|
||||
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, vAng, True, m_ptTipP2) Then Return
|
||||
' Reimposto eventuale precedente utensile
|
||||
EgtSetCalcTool(sTool, sHead, nExit)
|
||||
' Altrimenti da lama
|
||||
@@ -354,10 +392,10 @@ Public Class GridCut
|
||||
' 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
|
||||
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, vAng, True, m_ptTipP2) Then Return
|
||||
End If
|
||||
' Calcolo direzione asse lama
|
||||
If Not EgtGetCalcToolDirFromAngles(dR1, dR2, m_vtToolP2) Then Return
|
||||
If Not EgtGetCalcToolDirFromAngles(vAng, m_vtToolP2) Then Return
|
||||
' Porto il tip nell'origine tavola
|
||||
m_ptTipP2.ToLoc(New Frame3d(m_ptTabOri))
|
||||
m_bPointP2Ok = True
|
||||
@@ -405,7 +443,7 @@ Public Class GridCut
|
||||
|
||||
Private Sub DepthTxBx_EgtClosed(sender As Object, e As EventArgs) Handles DepthTxBx.EgtClosed
|
||||
' Verifico che l'affondamento impostato non sia superiore a quello massimo
|
||||
Dim dMaxDepth = m_ptRawMax.z - m_ptRawMin.z + MAX_TAB_DEPTH
|
||||
Dim dMaxDepth = m_ptRawMax.z - m_ptRawMin.z + m_MainWindow.m_CurrentMachine.MaxTabDepth
|
||||
Dim dDepth As Double = 0
|
||||
StringToLen(DepthTxBx.Text, dDepth)
|
||||
If dDepth < 0 Then
|
||||
@@ -494,6 +532,7 @@ Public Class GridCut
|
||||
m_bSimul = True
|
||||
m_CurrProjPage.m_SceneButtons.MeasureBtn.IsChecked = False
|
||||
m_CurrProjPage.CurrProjGrid.Visibility = Windows.Visibility.Hidden
|
||||
m_MainWindow.m_DirectCutPageUC.m_ControlsDirectCutUC.LeftButtonGrid.Children.Remove(Me)
|
||||
m_CurrProjPage.CurrentProjectPageGrid.Children.Remove(m_MainWindow.m_DirectCutPageUC)
|
||||
m_MainWindow.m_PrevActivePage = MainWindow.Pages.DirectCut
|
||||
m_CurrProjPage.CurrentProjectPageGrid.Children.Add(m_MainWindow.m_SimulationPage)
|
||||
@@ -522,19 +561,21 @@ Public Class GridCut
|
||||
m_CurrProjPage.SetErrorMessage(EgtMsg(90314)) 'Errore nella generazione del programma CN
|
||||
Return
|
||||
End If
|
||||
Dim sNameProg As Integer = 900
|
||||
sNameProg = GetPrivateProfileInt(S_PARTPROGRAM, "NameProg", sNameProg, m_MainWindow.GetMachIniFile)
|
||||
' Download programma (eventuali errori sono segnalati dalla funzione)
|
||||
If m_MainWindow.m_CNCommunication.SendProgram(sCncPath, 900) Then
|
||||
If m_MainWindow.m_CNCommunication.SendProgram(sCncPath, sNameProg) Then
|
||||
' copio il progetto corrente come progetto in lavorazione
|
||||
Dim sWrkPath As String = m_MainWindow.GetTempDir() & "\" & "WorkProj.nge"
|
||||
My.Computer.FileSystem.CopyFile(sMchPath, sWrkPath, True)
|
||||
' lancio eventuale lua post-trasmissione
|
||||
m_MainWindow.ExecSentProgScript( True)
|
||||
m_MainWindow.ExecSentProgScript(True)
|
||||
End If
|
||||
#End If
|
||||
End Sub
|
||||
|
||||
Private Sub ExitBtn_Click(sender As Object, e As RoutedEventArgs) Handles ExitBtn.Click
|
||||
m_MainWindow.m_DirectCutPageUC.LeftButtonGrid.Children.Remove(Me)
|
||||
m_MainWindow.m_DirectCutPageUC.m_ControlsDirectCutUC.LeftButtonGrid.Children.Remove(Me)
|
||||
End Sub
|
||||
|
||||
Private Function CreateGridCut() As Boolean
|
||||
@@ -615,6 +656,15 @@ Public Class GridCut
|
||||
If dDimPzY <> 0 And nNumPzY > 0 And dDimPzX <> 0 And nNumPzX > 0 Then
|
||||
Dim dLenX As Double = dThick + (dDimPzX + dThick) * nNumPzX
|
||||
Dim nCutParaId = EgtCreateLinePDL(nLayerId, ptStart, m_dAngO, dLenX + 0.1)
|
||||
|
||||
' --- INIZIO GESTIONE SPECIALE --- per macchina sinistrorsa
|
||||
' Recupero spessore lama corrente
|
||||
Dim sSawing As String = m_MainWindow.m_CurrentMachine.sCurrSawing
|
||||
If m_bSawTh And Not String.IsNullOrEmpty(sSawing) Then
|
||||
EgtOffsetCurve(nCutParaId, -dThick, OFF_TYPE.EXTEND)
|
||||
End If
|
||||
' --- FINE GESTIONE SPECIALE --- per macchina sinistrorsa
|
||||
|
||||
' Imposto affondamento e angolo di fianco sul taglio
|
||||
EgtSetInfo(nCutParaId, INFO_DEPTH, m_dDepth)
|
||||
EgtSetInfo(nCutParaId, INFO_SIDE_ANGLE, m_dAngV)
|
||||
@@ -633,6 +683,13 @@ Public Class GridCut
|
||||
' Arretro il punto di partenza di uno spessore lama
|
||||
Dim vtDeltaPos As Vector3d = Vector3d.FromPolar(dThick + 0.1, m_dAngO - 90)
|
||||
Dim nCutPerpId = EgtCreateLinePDL(nLayerId, ptStart + vtDeltaPos, m_dAngO + 90, dLenY + 0.2)
|
||||
|
||||
' --- INIZIO GESTIONE SPECIALE --- per macchina sinistrorsa
|
||||
If m_bSawTh And Not String.IsNullOrEmpty(sSawing) Then
|
||||
EgtOffsetCurve(nCutPerpId, -dThick, OFF_TYPE.EXTEND)
|
||||
End If
|
||||
' --- FINE GESTIONE SPECIALE --- per macchina sinistrorsa
|
||||
|
||||
' Specchio se è attivo il flag che cambia lato di disegno
|
||||
If SideChBx.IsChecked() Then
|
||||
Dim vtRot As Vector3d = Vector3d.FromPolar(1, m_dAngO + 90)
|
||||
@@ -655,6 +712,7 @@ Public Class GridCut
|
||||
End Function
|
||||
|
||||
Private Function CreateCross(nLayerId As Integer, ptP As Point3d) As Boolean
|
||||
ptP += New Vector3d(0, 0, 0.15)
|
||||
' Aggiungo crocette
|
||||
Dim vtCrossX As New Vector3d(20, 0, 0)
|
||||
Dim vtCrossY As New Vector3d(0, 20, 0)
|
||||
|
||||
@@ -7,6 +7,8 @@ Public Class MachineButtonsUC
|
||||
Private m_DirectCutPage As DirectCutPageUC
|
||||
Friend m_CN As CN_generico
|
||||
|
||||
Public nCountButton As Integer = 11
|
||||
|
||||
Private m_bOnlyLaser As Boolean = False
|
||||
Private m_bFirst As Boolean = True
|
||||
|
||||
@@ -33,6 +35,7 @@ Public Class MachineButtonsUC
|
||||
Private Const BTN_STATE_DOOR_OPENED As String = "DoorOpened"
|
||||
Private Const BTN_STATE_DOOR_CLOSED As String = "DoorClosed"
|
||||
Private Const BTN_STATE_PARKING As String = "Parking"
|
||||
Private Const BTN_STATE_HOME As String = "Home"
|
||||
Private Const BTN_ENABLE_ZONE_1 As String = "EnableZone1"
|
||||
Private Const BTN_ENABLE_ZONE_2 As String = "EnableZone2"
|
||||
Private Const BTN_ENABLE_PC As String = "EnablePC"
|
||||
@@ -76,6 +79,9 @@ Public Class MachineButtonsUC
|
||||
GetToggleButton(nIndex + 1).Visibility = Windows.Visibility.Hidden
|
||||
Next
|
||||
|
||||
' notifico nella variabile pubblica il numero di pulsanti inseriti nella barra
|
||||
nCountButton = m_nCount
|
||||
|
||||
' Se variabile di stato "Nothing"/"DoorOpened"/"DoorClosed" imposto immagine fissa
|
||||
For nIndex As Integer = 0 To m_nCount - 1
|
||||
If StateFlagArray(nIndex) = BTN_STATE_NOTHING OrElse
|
||||
@@ -267,9 +273,62 @@ Public Class MachineButtonsUC
|
||||
End If
|
||||
Return
|
||||
End If
|
||||
' CONTROLLO FANUC
|
||||
Case 4
|
||||
' ------------------------------------ FANUC ------------------------------------
|
||||
' eventuale scrittura di linea di comando MDI
|
||||
If Not String.IsNullOrEmpty(CmdString) Then
|
||||
' attivo mpdalità MDI
|
||||
m_CN.DGeneralFunctions_WriteCncMode(2)
|
||||
System.Threading.Thread.Sleep(100)
|
||||
' salvo la stringa di comando ricevuta dal file lua
|
||||
m_CN.sz_ManualDataInput = CmdString
|
||||
' esguo la funzione che ha il compito di scrivere il comando MDI
|
||||
m_CN.MDI_command()
|
||||
End If
|
||||
' attivo modalità AUTO
|
||||
m_CN.DGeneralFunctions_WriteCncMode(7)
|
||||
System.Threading.Thread.Sleep(100)
|
||||
If String.IsNullOrEmpty(EValue) Then
|
||||
' EActive: impulsivo "D#####"
|
||||
m_CN.NC_pulse_bit(ENumber)
|
||||
EgtOutLog("Fanuc_DNumber= " & ENumber)
|
||||
Else
|
||||
' EActive + EValue: scrittura comando invariabile Short oppure Bit
|
||||
If ENumber.Contains(".") Then
|
||||
' D#####.#
|
||||
Dim bEValue As Boolean
|
||||
If EValue.Trim = "1" Then bEValue = True
|
||||
m_CN.NC_write_var_bit(ENumber, CBool(EValue))
|
||||
Else
|
||||
' D#####
|
||||
m_CN.NC_write_var_short(ENumber, CShort(EValue))
|
||||
End If
|
||||
EgtOutLog("Fanuc_DNumber= " & ENumber & " DValue= " & EValue)
|
||||
End If
|
||||
' eventale caricamento seconda variabile
|
||||
If String.IsNullOrEmpty(EValue2) Then
|
||||
' EActive: impulsivo "D#####"
|
||||
m_CN.NC_pulse_bit(ENumber2)
|
||||
EgtOutLog("Fanuc_DNumber= " & ENumber2)
|
||||
Else
|
||||
' EActive + EValue: scrittura comando invariabile Short oppure Bit
|
||||
If ENumber2.Contains(".") Then
|
||||
' D#####.#
|
||||
Dim bEValue2 As Boolean
|
||||
If EValue2.Trim = "1" Then bEValue2 = True
|
||||
m_CN.NC_write_var_bit(ENumber2, CBool(EValue2))
|
||||
Else
|
||||
' D#####
|
||||
m_CN.NC_write_var_short(ENumber2, CShort(EValue2))
|
||||
End If
|
||||
EgtOutLog("Fanuc_DNumber2= " & ENumber2 & " DValue2= " & EValue2)
|
||||
End If
|
||||
Return
|
||||
End Select
|
||||
End If
|
||||
|
||||
|
||||
Dim nResult As Short
|
||||
' Imposto modalità MDI per controlli num
|
||||
Select Case m_MainWindow.m_CNCommunication.m_nNCType
|
||||
@@ -286,6 +345,8 @@ Public Class MachineButtonsUC
|
||||
m_CN.DGeneralFunctions_CycleStart()
|
||||
Case 3
|
||||
'Per il siemens non devo fare nulla
|
||||
Case 4
|
||||
' Nicola: 27/03/2023 attivazione della funzione M# indicata?
|
||||
End Select
|
||||
|
||||
If b2Start Then
|
||||
@@ -320,6 +381,17 @@ Public Class MachineButtonsUC
|
||||
EgtTdbGetCurrToolParam(MCH_TP.SPEED, dSpeed)
|
||||
End If
|
||||
EgtLuaSetGlobNumVar("CMD.S", dSpeed)
|
||||
' versione 2.5e1
|
||||
EgtTdbSetCurrTool(m_MainWindow.m_CurrentProjectPageUC.ToolTxBx.Text)
|
||||
Dim sToolPos As String = String.Empty
|
||||
If EgtTdbGetCurrToolParam(MCH_TP.TCPOS, sToolPos) Then
|
||||
EgtLuaGetGlobStringVar("CMD.TCPOS", sToolPos)
|
||||
End If
|
||||
Dim dToolDiam As Double = 0
|
||||
If EgtTdbGetCurrToolParam(MCH_TP.DIAM, dToolDiam) Then
|
||||
EgtLuaSetGlobNumVar("CMD.DIAM", dToolDiam * 1000)
|
||||
End If
|
||||
|
||||
Dim dL1, dL2, dL3, dR1, dR2 As Double
|
||||
m_MainWindow.m_CNCommunication.GetAxesPositions(dL1, dL2, dL3, dR1, dR2)
|
||||
EgtLuaSetGlobNumVar("CMD.L1", dL1)
|
||||
@@ -640,6 +712,40 @@ Public Class MachineButtonsUC
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Friend Sub HomeStateChanged(HomeState As Boolean)
|
||||
Dim nIndex As Integer = Array.IndexOf(StateFlagArray, BTN_STATE_HOME)
|
||||
If nIndex = -1 Then Return
|
||||
If HomeState Then
|
||||
GetToggleButton(nIndex + 1).IsChecked = True
|
||||
Try
|
||||
Dim s As String
|
||||
If (m_MainWindow.m_OptionsPageUC.ThemesCmBx.SelectedIndex = 0) Then
|
||||
s = m_MainWindow.GetResourcesDir() & "\MachineButtonsImage\" & ImageArrayY(nIndex)
|
||||
Else
|
||||
s = m_MainWindow.GetResourcesDir() & "\MachineButtonsImage\NewIcons\" & ImageArrayY(nIndex)
|
||||
End If
|
||||
Dim sButtonImageSource As ImageSource = ImageConverter.ConvertFromString(s)
|
||||
GetImage(nIndex + 1).Source = sButtonImageSource
|
||||
Catch ex As Exception
|
||||
EgtOutLog("Error loading image " & ImageArrayY(nIndex + 1))
|
||||
End Try
|
||||
Else
|
||||
GetToggleButton(nIndex + 1).IsChecked = False
|
||||
Try
|
||||
Dim s As String
|
||||
If (m_MainWindow.m_OptionsPageUC.ThemesCmBx.SelectedIndex = 0) Then
|
||||
s = m_MainWindow.GetResourcesDir() & "\MachineButtonsImage\" & ImageArrayY(nIndex)
|
||||
Else
|
||||
s = m_MainWindow.GetResourcesDir() & "\MachineButtonsImage\NewIcons\" & ImageArrayY(nIndex)
|
||||
End If
|
||||
Dim sButtonImageSource As ImageSource = ImageConverter.ConvertFromString(s)
|
||||
GetImage(nIndex + 1).Source = sButtonImageSource
|
||||
Catch ex As Exception
|
||||
EgtOutLog("Error loading image " & ImageArrayN(nIndex + 1))
|
||||
End Try
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Friend Sub EnableZoneStateChanged(ZoneState As Integer)
|
||||
Dim sFlag As String = String.Empty
|
||||
If ZoneState = 1 Then
|
||||
|
||||
@@ -69,10 +69,10 @@
|
||||
<EgtWPFLib:EgtTextBox x:Name="L3TxBx" Grid.Column="1" Grid.Row="3" Margin="0,0,6,0"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
<Button x:Name="R1Btn" Grid.Row="4" Height="60" Width="60" Style="{DynamicResource OmagCut_RightGrayGradientYellowTextButton}"/>
|
||||
<EgtWPFLib:EgtTextBox x:Name="R1TxBx" Grid.Column="1" Grid.Row="4" Margin="0,0,6,0"
|
||||
<EgtWPFLib:EgtTextBox x:Name="R1TxBx" Grid.Column="1" Grid.Row="4" Margin="0,0,6,0" IsLength="False"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
<Button x:Name="R2Btn" Grid.Row="5" Height="60" Width="60" Style="{DynamicResource OmagCut_RightGrayGradientYellowTextButton}"/>
|
||||
<EgtWPFLib:EgtTextBox x:Name="R2TxBx" Grid.Column="1" Grid.Row="5" Margin="0,0,6,0"
|
||||
<EgtWPFLib:EgtTextBox x:Name="R2TxBx" Grid.Column="1" Grid.Row="5" Margin="0,0,6,0" IsLength="False"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
|
||||
<Grid Grid.Row="7" Grid.ColumnSpan="2">
|
||||
|
||||
@@ -21,10 +21,12 @@ Public Class ManualAxesMoveUC
|
||||
' Messaggi
|
||||
L1SawThChBx.Content = EgtMsg(90232) ' Spessore lama
|
||||
L2SawThChBx.Content = EgtMsg(90232) ' Spessore lama
|
||||
|
||||
AddHandler m_Timer.Tick, AddressOf Timer_tick
|
||||
End Sub
|
||||
|
||||
Private Sub ManualAxesMove_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded
|
||||
m_CN = m_MainWindow.m_DirectCutPageUC.m_CN
|
||||
' Valori feed e speed da lama corrente
|
||||
Dim dTemp As Double = 0
|
||||
EgtTdbSetCurrTool(m_MainWindow.m_CurrentProjectPageUC.ToolTxBx.Text)
|
||||
@@ -51,14 +53,43 @@ Public Class ManualAxesMoveUC
|
||||
' Imposto check per considerare spessore lama
|
||||
L1SawThChBx.IsChecked = m_MainWindow.m_CurrentMachine.bAddSawThTo5AxMove
|
||||
L2SawThChBx.IsChecked = m_MainWindow.m_CurrentMachine.bAddSawThTo5AxMove
|
||||
|
||||
' Aggiorno visualizzazione
|
||||
SetMachineInCurrPos()
|
||||
EgtDraw()
|
||||
m_MainWindow.m_DirectCutPageUC.m_bShowMachine = True
|
||||
End Sub
|
||||
|
||||
Private Sub ManualAxesMove_UnLoaded(sender As Object, e As RoutedEventArgs) Handles Me.Unloaded
|
||||
m_Timer.Stop()
|
||||
m_MainWindow.m_CurrentMachine.bAddSawThTo5AxMove = (L1SawThChBx.IsEnabled And L1SawThChBx.IsChecked) Or
|
||||
(L2SawThChBx.IsEnabled And L2SawThChBx.IsChecked)
|
||||
' Nascondo la macchina
|
||||
m_MainWindow.m_DirectCutPageUC.m_bShowMachine = False
|
||||
EgtSetMachineLook(MCH_LOOK.TAB)
|
||||
EgtDraw()
|
||||
End Sub
|
||||
|
||||
Private Function SetMachineInCurrPos() As Boolean
|
||||
' Recupero la posizione macchina
|
||||
Dim dL1, dL2, dL3, dR1, dR2 As Double
|
||||
If Not m_MainWindow.m_CNCommunication.GetAxesPositions(dL1, dL2, dL3, dR1, dR2) Then Return False
|
||||
' Recupero il nome degli assi macchina
|
||||
Dim sL1 As String = String.Empty
|
||||
Dim sL2 As String = String.Empty
|
||||
Dim sL3 As String = String.Empty
|
||||
Dim sR1 As String = String.Empty
|
||||
Dim sR2 As String = String.Empty
|
||||
If Not m_MainWindow.m_CNCommunication.GetAxesNames(sL1, sL2, sL3, sR1, sR2) Then Return False
|
||||
' Visualizzo macchina in posizione
|
||||
EgtSetAxisPos(sL1, dL1)
|
||||
EgtSetAxisPos(sL2, dL2)
|
||||
EgtSetAxisPos(sL3, dL3)
|
||||
EgtSetAxisPos(sR1, dR1)
|
||||
EgtSetAxisPos(sR2, dR2)
|
||||
Return True
|
||||
End Function
|
||||
|
||||
Private Sub UpdateAxesNames()
|
||||
Dim sL1 As String = String.Empty
|
||||
Dim sL2 As String = String.Empty
|
||||
@@ -123,11 +154,16 @@ Public Class ManualAxesMoveUC
|
||||
Private Sub Timer_tick()
|
||||
UpdateAxesNames()
|
||||
UpdateUseSawThickness()
|
||||
' Aggiorno posizione macchina in disegno
|
||||
SetMachineInCurrPos()
|
||||
' Aggiorno il disegno
|
||||
EgtDraw()
|
||||
End Sub
|
||||
|
||||
Private m_MoveClicked As Boolean = False
|
||||
Private Sub XXBtn_Click(sender As Object, e As MouseButtonEventArgs) Handles L1Btn.PreviewMouseDown, L2Btn.PreviewMouseDown, L3Btn.PreviewMouseDown, R1Btn.PreviewMouseDown, R2Btn.PreviewMouseDown
|
||||
If e.ClickCount > 1 OrElse m_MoveClicked Then
|
||||
EgtOutLog(" → Hold on! Do not click compulsively.")
|
||||
Return
|
||||
End If
|
||||
m_MoveClicked = True
|
||||
@@ -207,13 +243,14 @@ Public Class ManualAxesMoveUC
|
||||
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_CN.DGeneralFunctions_WriteCncMode(7) ' Modalità manuale
|
||||
m_MoveClicked = False
|
||||
End Sub
|
||||
|
||||
Private Sub SiemensMoveAxis(CurrentBtn As Button)
|
||||
' leggo se stato reset
|
||||
If Not m_CN.bResetState Then
|
||||
EgtOutLog("Reset status is 'False', is denied to execute file '\DirectCmd\AxesMove.lua'.")
|
||||
m_MoveClicked = False
|
||||
Return
|
||||
End If
|
||||
@@ -338,7 +375,7 @@ Public Class ManualAxesMoveUC
|
||||
End Function
|
||||
|
||||
Private Sub BackBtn_Click(sender As Object, e As RoutedEventArgs) Handles BackBtn.Click
|
||||
m_MainWindow.m_DirectCutPageUC.LeftButtonGrid.Children.Remove(Me)
|
||||
m_MainWindow.m_DirectCutPageUC.m_ControlsDirectCutUC.LeftButtonGrid.Children.Remove(Me)
|
||||
End Sub
|
||||
|
||||
Private Sub G0Btn_Checked(sender As Object, e As RoutedEventArgs) Handles G0Btn.Checked
|
||||
|
||||
+12
-12
@@ -68,12 +68,12 @@
|
||||
|
||||
<TextBlock Name="DirectionTxBl" Grid.Column="0" Grid.Row="4"
|
||||
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="DirectionTxBx" Grid.Column="1" Grid.Row="4" Margin="0,0,6,0"
|
||||
<EgtWPFLib:EgtTextBox Name="DirectionTxBx" Grid.Column="1" Grid.Row="4" Margin="0,0,6,0" IsLength="False"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
|
||||
<TextBlock Name="SideAngleTxBl" Grid.Column="0" Grid.Row="5"
|
||||
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="SideAngleTxBx" Grid.Column="1" Grid.Row="5" Margin="0,0,6,0"
|
||||
<EgtWPFLib:EgtTextBox Name="SideAngleTxBx" Grid.Column="1" Grid.Row="5" Margin="0,0,6,0" IsLength="False"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
|
||||
<Grid Grid.Row="6" Grid.ColumnSpan="2" Visibility="Visible">
|
||||
@@ -124,70 +124,70 @@
|
||||
|
||||
<TextBlock Name="Num1TxBl" Grid.Column="0" Grid.Row="0"
|
||||
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}" HorizontalAlignment="Center"/>
|
||||
<EgtWPFLib:EgtTextBox Name="NumPz1TxBx" Grid.Column="1" Grid.Row="0" Width="75"
|
||||
<EgtWPFLib:EgtTextBox Name="NumPz1TxBx" Grid.Column="1" Grid.Row="0" Width="75" IsLength="False"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="DimPz1TxBx" Grid.Column="3" Grid.Row="0" Width="75"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
|
||||
<TextBlock Name="Num2TxBl" Grid.Column="0" Grid.Row="1"
|
||||
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}" HorizontalAlignment="Center"/>
|
||||
<EgtWPFLib:EgtTextBox Name="NumPz2TxBx" Grid.Column="1" Grid.Row="1" Width="75"
|
||||
<EgtWPFLib:EgtTextBox Name="NumPz2TxBx" Grid.Column="1" Grid.Row="1" Width="75" IsLength="False"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="DimPz2TxBx" Grid.Column="3" Grid.Row="1" Width="75"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
|
||||
<TextBlock Name="Num3TxBl" Grid.Column="0" Grid.Row="2"
|
||||
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}" HorizontalAlignment="Center"/>
|
||||
<EgtWPFLib:EgtTextBox Name="NumPz3TxBx" Grid.Column="1" Grid.Row="2" Width="75"
|
||||
<EgtWPFLib:EgtTextBox Name="NumPz3TxBx" Grid.Column="1" Grid.Row="2" Width="75" IsLength="False"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="DimPz3TxBx" Grid.Column="3" Grid.Row="2" Width="75"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
|
||||
<TextBlock Name="Num4TxBl" Grid.Column="0" Grid.Row="3"
|
||||
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}" HorizontalAlignment="Center"/>
|
||||
<EgtWPFLib:EgtTextBox Name="NumPz4TxBx" Grid.Column="1" Grid.Row="3" Width="75"
|
||||
<EgtWPFLib:EgtTextBox Name="NumPz4TxBx" Grid.Column="1" Grid.Row="3" Width="75" IsLength="False"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="DimPz4TxBx" Grid.Column="3" Grid.Row="3" Width="75"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
|
||||
<TextBlock Name="Num5TxBl" Grid.Column="0" Grid.Row="4"
|
||||
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}" HorizontalAlignment="Center"/>
|
||||
<EgtWPFLib:EgtTextBox Name="NumPz5TxBx" Grid.Column="1" Grid.Row="4" Width="75"
|
||||
<EgtWPFLib:EgtTextBox Name="NumPz5TxBx" Grid.Column="1" Grid.Row="4" Width="75" IsLength="False"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="DimPz5TxBx" Grid.Column="3" Grid.Row="4" Width="75"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
|
||||
<TextBlock Name="Num6TxBl" Grid.Column="0" Grid.Row="5"
|
||||
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}" HorizontalAlignment="Center"/>
|
||||
<EgtWPFLib:EgtTextBox Name="NumPz6TxBx" Grid.Column="1" Grid.Row="5" Width="75"
|
||||
<EgtWPFLib:EgtTextBox Name="NumPz6TxBx" Grid.Column="1" Grid.Row="5" Width="75" IsLength="False"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="DimPz6TxBx" Grid.Column="3" Grid.Row="5" Width="75"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
|
||||
<TextBlock Name="Num7TxBl" Grid.Column="0" Grid.Row="6"
|
||||
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}" HorizontalAlignment="Center"/>
|
||||
<EgtWPFLib:EgtTextBox Name="NumPz7TxBx" Grid.Column="1" Grid.Row="6" Width="75"
|
||||
<EgtWPFLib:EgtTextBox Name="NumPz7TxBx" Grid.Column="1" Grid.Row="6" Width="75" IsLength="False"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="DimPz7TxBx" Grid.Column="3" Grid.Row="6" Width="75"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
|
||||
<TextBlock Name="Num8TxBl" Grid.Column="0" Grid.Row="7"
|
||||
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}" HorizontalAlignment="Center"/>
|
||||
<EgtWPFLib:EgtTextBox Name="NumPz8TxBx" Grid.Column="1" Grid.Row="7" Width="75"
|
||||
<EgtWPFLib:EgtTextBox Name="NumPz8TxBx" Grid.Column="1" Grid.Row="7" Width="75" IsLength="False"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="DimPz8TxBx" Grid.Column="3" Grid.Row="7" Width="75"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
|
||||
<TextBlock Name="Num9TxBl" Grid.Column="0" Grid.Row="8"
|
||||
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}" HorizontalAlignment="Center"/>
|
||||
<EgtWPFLib:EgtTextBox Name="NumPz9TxBx" Grid.Column="1" Grid.Row="8" Width="75"
|
||||
<EgtWPFLib:EgtTextBox Name="NumPz9TxBx" Grid.Column="1" Grid.Row="8" Width="75" IsLength="False"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="DimPz9TxBx" Grid.Column="3" Grid.Row="8" Width="75"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
|
||||
<TextBlock Name="Num10TxBl" Grid.Column="0" Grid.Row="9"
|
||||
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}" HorizontalAlignment="Center"/>
|
||||
<EgtWPFLib:EgtTextBox Name="NumPz10TxBx" Grid.Column="1" Grid.Row="9" Width="75"
|
||||
<EgtWPFLib:EgtTextBox Name="NumPz10TxBx" Grid.Column="1" Grid.Row="9" Width="75" IsLength="False"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="DimPz10TxBx" Grid.Column="3" Grid.Row="9" Width="75"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
|
||||
@@ -38,7 +38,8 @@ Public Class MultipleCut
|
||||
Private m_ptPrev As Point3d
|
||||
' Layer per crocette temporanee
|
||||
Private m_nTempLay As Integer = GDB_ID.NULL
|
||||
|
||||
' Gestione spessore lama
|
||||
Private m_bSawTh As Boolean = False
|
||||
' Costanti
|
||||
Private Const MAX_TAB_DEPTH As Double = 10.0
|
||||
Private Const MIN_CUT_LEN As Double = 10.0
|
||||
@@ -90,9 +91,14 @@ Public Class MultipleCut
|
||||
m_dAngO = GetPrivateProfileDouble( S_DIRECTCUTS, K_DC_MULT_ANGH, m_dAngO, m_MainWindow.GetIniFile())
|
||||
m_dAngV = GetPrivateProfileDouble( S_DIRECTCUTS, K_DC_MULT_ANGV, m_dAngV, m_MainWindow.GetIniFile())
|
||||
For nI As Integer = 0 To 9
|
||||
m_nNum( nI) = GetPrivateProfileInt( S_DIRECTCUTS, K_DC_MULT_NUM & (nI+1).ToString(), 0, m_MainWindow.GetIniFile())
|
||||
m_dDim( nI) = GetPrivateProfileDouble( S_DIRECTCUTS, K_DC_MULT_DIM & (nI+1).ToString(), 0, m_MainWindow.GetIniFile())
|
||||
m_nNum(nI) = GetPrivateProfileInt(S_DIRECTCUTS, K_DC_MULT_NUM & (nI + 1).ToString(), 0, m_MainWindow.GetIniFile())
|
||||
m_dDim(nI) = GetPrivateProfileDouble(S_DIRECTCUTS, K_DC_MULT_DIM & (nI + 1).ToString(), 0, m_MainWindow.GetIniFile())
|
||||
Next
|
||||
|
||||
' --- INIZIO GESTIONE SPECIALE --- per macchina sinistrorsa
|
||||
m_bSawTh = (GetPrivateProfileInt(S_DIRECTCUTS, K_DC_SING_SAWTH, 0, m_MainWindow.GetIniFile()) <> 0)
|
||||
' --- FINE GESTIONE SPECIALE --- per macchina sinistrorsa
|
||||
|
||||
m_bHeadSide = ( GetPrivateProfileInt( S_DIRECTCUTS, K_DC_MULT_HEADSIDE, 0, m_MainWindow.GetIniFile()) <> 0)
|
||||
m_ptTipP1.x = GetPrivateProfileDouble( S_DIRECTCUTS, K_DC_MULT_POSX, m_ptTipP1.x, m_MainWindow.GetIniFile())
|
||||
m_ptTipP1.y = GetPrivateProfileDouble( S_DIRECTCUTS, K_DC_MULT_POSY, m_ptTipP1.y, m_MainWindow.GetIniFile())
|
||||
@@ -168,6 +174,11 @@ Public Class MultipleCut
|
||||
NumPz10TxBx.Text = m_nNum(9).ToString()
|
||||
DimPz10TxBx.Text = LenToString( m_dDim(9), 1)
|
||||
SideChBx.IsChecked = m_bHeadSide
|
||||
|
||||
' --- INIZIO GESTIONE SPECIALE --- per macchina sinistrorsa
|
||||
m_bSawTh = (GetPrivateProfileInt(S_DIRECTCUTS, K_DC_SING_SAWTH, 0, m_MainWindow.GetIniFile()) <> 0)
|
||||
' --- FINE GESTIONE SPECIALE --- per macchina sinistrorsa
|
||||
|
||||
' Reset taglio e disabilito bottone esecuzione
|
||||
m_bCutOk = False
|
||||
UpdateSimulOkBtn()
|
||||
@@ -195,7 +206,7 @@ Public Class MultipleCut
|
||||
' Se non vado in simulazione
|
||||
If Not m_bSimul Then
|
||||
' Dichiaro sottopagina da non riattivare
|
||||
m_MainWindow.m_DirectCutPageUC.m_ActiveDirectCutPage = DirectCutPageUC.DirectCutPages.DirectCut
|
||||
m_MainWindow.m_DirectCutPageUC.m_ControlsDirectCutUC.m_ActiveDirectCutPage = ControlsDirectCutUC.DirectCutPages.DirectCut
|
||||
' Rimuovo layer temporaneo per crocette
|
||||
EgtErase(m_nTempLay)
|
||||
' Rimuovo eventuale pezzo per taglio diretto
|
||||
@@ -274,6 +285,12 @@ Public Class MultipleCut
|
||||
' Verifico configurazione tavola e grezzo
|
||||
If Not m_bRawOk Then Return
|
||||
|
||||
' forzo utilizzo testa H1 solo per macchina con 2 teste
|
||||
Dim bIsMultiCut As Boolean = (EgtGetHeadId("H101") <> GDB_ID.NULL)
|
||||
If bIsMultiCut Then
|
||||
m_MainWindow.m_DirectCutPageUC.ReloadParam()
|
||||
End If
|
||||
|
||||
' Recupero dati utensile e testa corrente
|
||||
Dim sTool As String = ""
|
||||
Dim sHead As String = ""
|
||||
@@ -286,6 +303,13 @@ Public Class MultipleCut
|
||||
' Recupero la posizione macchina
|
||||
Dim dL1, dL2, dL3, dR1, dR2 As Double
|
||||
If Not m_MainWindow.m_CNCommunication.GetAxesPositions(dL1, dL2, dL3, dR1, dR2) Then Return
|
||||
' Se macchina multicut il primo asse rotante restituito è quello della tavola
|
||||
Dim vAng() As Double = {dR1, dR2, 0}
|
||||
If bIsMultiCut Then
|
||||
vAng(0) = 0
|
||||
vAng(1) = dR1
|
||||
vAng(2) = dR2
|
||||
End If
|
||||
' Ricavo dati lama corrente
|
||||
Dim sSaw As String = m_MainWindow.m_CurrentMachine.sCurrSaw
|
||||
' Se punto da laser
|
||||
@@ -293,7 +317,7 @@ Public Class MultipleCut
|
||||
' Imposto come testa corrente il laser (senza utensile ovviamente)
|
||||
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
|
||||
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, vAng, True, m_ptTipP1) Then Return
|
||||
' Reimposto eventuale precedente utensile
|
||||
EgtSetCalcTool(sTool, sHead, nExit)
|
||||
|
||||
@@ -303,10 +327,10 @@ Public Class MultipleCut
|
||||
EgtSetCalcTool(sTool, sHead, nExit)
|
||||
|
||||
' Trasformo in posizione punta utensile in basso
|
||||
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, dR1, dR2, True, m_ptTipP1) Then Return
|
||||
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, vAng, True, m_ptTipP1) Then Return
|
||||
End If
|
||||
' Calcolo direzione asse lama
|
||||
If Not EgtGetCalcToolDirFromAngles(dR1, dR2, m_vtToolP1) Then Return
|
||||
If Not EgtGetCalcToolDirFromAngles(vAng, m_vtToolP1) Then Return
|
||||
' Porto il tip nell'origine tavola
|
||||
m_ptTipP1.ToLoc(New Frame3d(m_ptTabOri))
|
||||
m_bPointP1Ok = True
|
||||
@@ -354,6 +378,12 @@ Public Class MultipleCut
|
||||
' Verifico configurazione tavola e grezzo
|
||||
If Not m_bRawOk Then Return
|
||||
|
||||
' forzo utilizzo testa H1 solo per macchina con 2 teste
|
||||
Dim bIsMultiCut As Boolean = (EgtGetHeadId("H101") <> GDB_ID.NULL)
|
||||
If bIsMultiCut Then
|
||||
m_MainWindow.m_DirectCutPageUC.ReloadParam()
|
||||
End If
|
||||
|
||||
' Recupero dati utensile e testa corrente
|
||||
Dim sTool As String = ""
|
||||
Dim sHead As String = ""
|
||||
@@ -366,6 +396,13 @@ Public Class MultipleCut
|
||||
' Recupero la posizione macchina
|
||||
Dim dL1, dL2, dL3, dR1, dR2 As Double
|
||||
If Not m_MainWindow.m_CNCommunication.GetAxesPositions(dL1, dL2, dL3, dR1, dR2) Then Return
|
||||
' Se macchina multicut il primo asse rotante restituito è quello della tavola
|
||||
Dim vAng() As Double = {dR1, dR2, 0}
|
||||
If bIsMultiCut Then
|
||||
vAng(0) = 0
|
||||
vAng(1) = dR1
|
||||
vAng(2) = dR2
|
||||
End If
|
||||
' Ricavo dati lama corrente
|
||||
Dim sSaw As String = m_MainWindow.m_CurrentMachine.sCurrSaw
|
||||
' Se punto da laser
|
||||
@@ -373,7 +410,7 @@ Public Class MultipleCut
|
||||
' Imposto come testa corrente il laser (senza utensile ovviamente)
|
||||
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
|
||||
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, vAng, True, m_ptTipP2) Then Return
|
||||
' Reimposto eventuale precedente utensile
|
||||
EgtSetCalcTool(sTool, sHead, nExit)
|
||||
' Altrimenti da lama
|
||||
@@ -381,10 +418,10 @@ Public Class MultipleCut
|
||||
' 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
|
||||
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, vAng, True, m_ptTipP2) Then Return
|
||||
End If
|
||||
' Calcolo direzione asse lama
|
||||
If Not EgtGetCalcToolDirFromAngles(dR1, dR2, m_vtToolP2) Then Return
|
||||
If Not EgtGetCalcToolDirFromAngles(vAng, m_vtToolP2) Then Return
|
||||
' Porto il tip nell'origine tavola
|
||||
m_ptTipP2.ToLoc(New Frame3d(m_ptTabOri))
|
||||
m_bPointP2Ok = True
|
||||
@@ -435,7 +472,7 @@ Public Class MultipleCut
|
||||
|
||||
Private Sub DepthTxBx_EgtClosed(sender As Object, e As EventArgs) Handles DepthTxBx.EgtClosed
|
||||
' Verifico che l'affondamento impostato non sia superiore a quello massimo
|
||||
Dim dMaxDepth = m_ptRawMax.z - m_ptRawMin.z + MAX_TAB_DEPTH
|
||||
Dim dMaxDepth = m_ptRawMax.z - m_ptRawMin.z + m_MainWindow.m_CurrentMachine.MaxTabDepth
|
||||
Dim dDepth As Double = 0
|
||||
StringToLen(DepthTxBx.Text, dDepth)
|
||||
If dDepth < 0 Then
|
||||
@@ -540,6 +577,7 @@ Public Class MultipleCut
|
||||
m_bSimul = True
|
||||
m_CurrProjPage.m_SceneButtons.MeasureBtn.IsChecked = False
|
||||
m_CurrProjPage.CurrProjGrid.Visibility = Windows.Visibility.Hidden
|
||||
m_MainWindow.m_DirectCutPageUC.m_ControlsDirectCutUC.LeftButtonGrid.Children.Remove(Me)
|
||||
m_CurrProjPage.CurrentProjectPageGrid.Children.Remove(m_MainWindow.m_DirectCutPageUC)
|
||||
m_MainWindow.m_PrevActivePage = MainWindow.Pages.DirectCut
|
||||
m_CurrProjPage.CurrentProjectPageGrid.Children.Add(m_MainWindow.m_SimulationPage)
|
||||
@@ -568,19 +606,21 @@ Public Class MultipleCut
|
||||
m_CurrProjPage.SetErrorMessage(EgtMsg(90314)) 'Errore nella generazione del programma CN
|
||||
Return
|
||||
End If
|
||||
Dim sNameProg As Integer = 900
|
||||
sNameProg = GetPrivateProfileInt(S_PARTPROGRAM, "NameProg", sNameProg, m_MainWindow.GetMachIniFile)
|
||||
' Download programma (eventuali errori sono segnalati dalla funzione)
|
||||
If m_MainWindow.m_CNCommunication.SendProgram(sCncPath, 900) Then
|
||||
If m_MainWindow.m_CNCommunication.SendProgram(sCncPath, sNameProg) Then
|
||||
' copio il progetto corrente come progetto in lavorazione
|
||||
Dim sWrkPath As String = m_MainWindow.GetTempDir() & "\" & "WorkProj.nge"
|
||||
My.Computer.FileSystem.CopyFile(sMchPath, sWrkPath, True)
|
||||
' lancio eventuale lua post-trasmissione
|
||||
m_MainWindow.ExecSentProgScript( True)
|
||||
m_MainWindow.ExecSentProgScript(True)
|
||||
End If
|
||||
#End If
|
||||
End Sub
|
||||
|
||||
Private Sub ExitBtn_Click(sender As Object, e As RoutedEventArgs) Handles ExitBtn.Click
|
||||
m_MainWindow.m_DirectCutPageUC.LeftButtonGrid.Children.Remove(Me)
|
||||
m_MainWindow.m_DirectCutPageUC.m_ControlsDirectCutUC.LeftButtonGrid.Children.Remove(Me)
|
||||
End Sub
|
||||
|
||||
Private Function CreateMultipleCut() As Boolean
|
||||
@@ -605,6 +645,22 @@ Public Class MultipleCut
|
||||
Dim ptStart As Point3d = m_ptTipP1
|
||||
ptStart.z = 0
|
||||
Dim nCutId = EgtCreateLinePDL(nLayerId, ptStart, m_dAngO, m_dLen)
|
||||
|
||||
' --- INIZIO GESTIONE SPECIALE --- per macchina sinistrorsa
|
||||
' 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
|
||||
' Se è impostata una lavorazione di lama
|
||||
If Not String.IsNullOrEmpty(sSawing) Then
|
||||
EgtTdbGetCurrToolParam(MCH_TP.THICK, dThick)
|
||||
End If
|
||||
If m_bSawTh And Not String.IsNullOrEmpty(sSawing) Then
|
||||
EgtOffsetCurve(nCutId, -dThick, OFF_TYPE.EXTEND)
|
||||
End If
|
||||
' --- FINE GESTIONE SPECIALE --- per macchina sinistrorsa
|
||||
|
||||
' Imposto affondamento e angolo di fianco sul taglio
|
||||
EgtSetInfo(nCutId, INFO_DEPTH, m_dDepth)
|
||||
EgtSetInfo(nCutId, INFO_SIDE_ANGLE, m_dAngV)
|
||||
@@ -697,6 +753,7 @@ Public Class MultipleCut
|
||||
End Function
|
||||
|
||||
Private Function CreateCross(nLayerId As Integer, ptP As Point3d) As Boolean
|
||||
ptP += New Vector3d(0, 0, 0.15)
|
||||
' Aggiungo crocette
|
||||
Dim vtCrossX As New Vector3d(20, 0, 0)
|
||||
Dim vtCrossY As New Vector3d(0, 20, 0)
|
||||
|
||||
@@ -6,6 +6,8 @@ Public Class Polishing
|
||||
' Riferimenti a pagine
|
||||
Private m_MainWindow As MainWindow = DirectCast(Application.Current.MainWindow, MainWindow)
|
||||
Private WithEvents m_CurrProjPage As CurrentProjectPageUC
|
||||
Private m_refControlDirectCutUC As ControlsDirectCutUC1
|
||||
|
||||
' Flag di pagina attiva
|
||||
Private m_bActive As Boolean = False
|
||||
' Flag di simulazione in corso
|
||||
@@ -30,6 +32,7 @@ Public Class Polishing
|
||||
Private Sub Polishing_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded
|
||||
' Attivo la pagina
|
||||
m_CurrProjPage = m_MainWindow.m_CurrentProjectPageUC
|
||||
m_refControlDirectCutUC = m_MainWindow.m_DirectCutPageUC.m_ControlsDirectCutUC1
|
||||
m_bActive = True
|
||||
' Se rientro da simulazione
|
||||
If m_bSimul Then
|
||||
@@ -60,7 +63,7 @@ Public Class Polishing
|
||||
If PolishingCmBx.SelectedIndex < 0 Then
|
||||
m_bPoliOk = False
|
||||
UpdateSimulOkBtn()
|
||||
End If
|
||||
End If
|
||||
' Rendo semitrasparente il grezzo
|
||||
Dim nRawSolidId = EgtGetFirstNameInGroup(m_CurrProjPage.m_nRawId, NAME_RAW_SOLID)
|
||||
EgtSetAlpha( nRawSolidId, 60)
|
||||
@@ -72,7 +75,7 @@ Public Class Polishing
|
||||
' Se non vado in simulazione
|
||||
If Not m_bSimul Then
|
||||
' Dichiaro sottopagina da non riattivare
|
||||
m_MainWindow.m_DirectCutPageUC.m_ActiveDirectCutPage = DirectCutPageUC.DirectCutPages.DirectCut
|
||||
m_refControlDirectCutUC.m_ActiveDirectCutPage = ControlsDirectCutUC1.DirectCutPages.DirectCut
|
||||
' Cancello eventuali lucidature
|
||||
RemovePolishings()
|
||||
' Riattivo eventuali lavorazioni presenti
|
||||
@@ -148,6 +151,7 @@ Public Class Polishing
|
||||
m_bSimul = True
|
||||
m_CurrProjPage.m_SceneButtons.MeasureBtn.IsChecked = False
|
||||
m_CurrProjPage.CurrProjGrid.Visibility = Windows.Visibility.Hidden
|
||||
m_refControlDirectCutUC.LeftButtonGrid.Children.Remove(Me)
|
||||
m_CurrProjPage.CurrentProjectPageGrid.Children.Remove(m_MainWindow.m_DirectCutPageUC)
|
||||
m_MainWindow.m_PrevActivePage = MainWindow.Pages.DirectCut
|
||||
m_CurrProjPage.CurrentProjectPageGrid.Children.Add(m_MainWindow.m_SimulationPage)
|
||||
@@ -176,19 +180,21 @@ Public Class Polishing
|
||||
m_CurrProjPage.SetErrorMessage(EgtMsg(90314)) 'Errore nella generazione del programma CN
|
||||
Return
|
||||
End If
|
||||
Dim sNameProg As Integer = 900
|
||||
sNameProg = GetPrivateProfileInt(S_PARTPROGRAM, "NameProg", sNameProg, m_MainWindow.GetMachIniFile)
|
||||
' Download programma (eventuali errori sono segnalati dalla funzione)
|
||||
If m_MainWindow.m_CNCommunication.SendProgram(sCncPath, 900) Then
|
||||
If m_MainWindow.m_CNCommunication.SendProgram(sCncPath, sNameProg) Then
|
||||
' copio il progetto corrente come progetto in lavorazione
|
||||
Dim sWrkPath As String = m_MainWindow.GetTempDir() & "\" & "WorkProj.nge"
|
||||
My.Computer.FileSystem.CopyFile(sMchPath, sWrkPath, True)
|
||||
' lancio eventuale lua post-trasmissione
|
||||
m_MainWindow.ExecSentProgScript( True)
|
||||
m_MainWindow.ExecSentProgScript(True)
|
||||
End If
|
||||
#End If
|
||||
End Sub
|
||||
|
||||
Private Sub ExitBtn_Click(sender As Object, e As RoutedEventArgs) Handles ExitBtn.Click
|
||||
m_MainWindow.m_DirectCutPageUC.LeftButtonGrid.Children.Remove(Me)
|
||||
m_refControlDirectCutUC.LeftButtonGrid.Children.Remove(Me)
|
||||
End Sub
|
||||
|
||||
Private Function CreatePolishing( sKitName As String) As Boolean
|
||||
|
||||
@@ -70,7 +70,7 @@
|
||||
|
||||
<TextBlock Name="DirectionTxBl" Grid.Column="0" Grid.Row="4"
|
||||
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="DirectionTxBx" Grid.Column="1" Grid.Row="4" Margin="0,0,6,0"
|
||||
<EgtWPFLib:EgtTextBox Name="DirectionTxBx" Grid.Column="1" Grid.Row="4" Margin="0,0,6,0" IsLength="False"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
|
||||
<TextBlock Name="OffsetTxBl" Grid.Column="0" Grid.Row="5"
|
||||
|
||||
@@ -5,6 +5,7 @@ Public Class SawTestUC
|
||||
' Riferimenti a pagine
|
||||
Private m_MainWindow As MainWindow = DirectCast(Application.Current.MainWindow, MainWindow)
|
||||
Private WithEvents m_CurrProjPage As CurrentProjectPageUC
|
||||
Private m_refControlDirectCutUC As ControlsDirectCutUC1
|
||||
' Flag di pagina attiva
|
||||
Private m_bActive As Boolean = False
|
||||
' Flag di simulazione in corso
|
||||
@@ -76,6 +77,7 @@ Public Class SawTestUC
|
||||
Private Sub SawTest_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded
|
||||
' Attivo la pagina
|
||||
m_CurrProjPage = m_MainWindow.m_CurrentProjectPageUC
|
||||
m_refControlDirectCutUC = m_MainWindow.m_DirectCutPageUC.m_ControlsDirectCutUC1
|
||||
m_bActive = True
|
||||
' Se rientro da simulazione
|
||||
If m_bSimul Then
|
||||
@@ -139,7 +141,7 @@ Public Class SawTestUC
|
||||
WritePrivateProfileString( S_DIRECTCUTS, K_DC_TEST_OFFSET, DoubleToString( m_dOffset, 2), m_MainWindow.GetIniFile())
|
||||
If Not m_bSimul Then
|
||||
' Dichiaro sottopagina da non riattivare
|
||||
m_MainWindow.m_DirectCutPageUC.m_ActiveDirectCutPage = DirectCutPageUC.DirectCutPages.DirectCut
|
||||
m_refControlDirectCutUC.m_ActiveDirectCutPage = ControlsDirectCutUC1.DirectCutPages.DirectCut1
|
||||
' Rimuovo layer temporaneo per crocette
|
||||
EgtErase(m_nTempLay)
|
||||
' Rimuovo eventuale pezzo per taglio diretto
|
||||
@@ -208,17 +210,30 @@ Public Class SawTestUC
|
||||
' Verifico configurazione tavola e grezzo
|
||||
If Not m_bRawOk Then Return
|
||||
|
||||
' forzo utilizzo testa H1 solo per macchina con 2 teste
|
||||
Dim bIsMultiCut As Boolean = (EgtGetHeadId("H101") <> GDB_ID.NULL)
|
||||
If bIsMultiCut Then
|
||||
EgtSetCalcTool(m_sSaw, "H1", 1)
|
||||
End If
|
||||
|
||||
' Se acquisizone lama o laser
|
||||
If PointModeCmBx.SelectedIndex = PT_MODE.SAW Or PointModeCmBx.SelectedIndex = PT_MODE.LASER Then
|
||||
' Recupero la posizione macchina
|
||||
Dim dL1, dL2, dL3, dR1, dR2 As Double
|
||||
If Not m_MainWindow.m_CNCommunication.GetAxesPositions(dL1, dL2, dL3, dR1, dR2) Then Return
|
||||
' Se macchina multicut il primo asse rotante restituito è quello della tavola
|
||||
Dim vAng() As Double = {dR1, dR2, 0}
|
||||
If bIsMultiCut Then
|
||||
vAng(0) = 0
|
||||
vAng(1) = dR1
|
||||
vAng(2) = dR2
|
||||
End If
|
||||
' Se punto da laser
|
||||
If PointModeCmBx.SelectedIndex = PT_MODE.LASER Then
|
||||
' Imposto come testa corrente il laser (senza utensile ovviamente)
|
||||
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
|
||||
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, vAng, True, m_ptTipP1) Then Return
|
||||
' Ora imposto la lama corrente
|
||||
If Not EgtSetCalcTool(m_sSaw, "H1", 1) Then Return
|
||||
' Altrimenti da lama
|
||||
@@ -226,10 +241,10 @@ Public Class SawTestUC
|
||||
' Imposto la lama corrente
|
||||
If Not EgtSetCalcTool(m_sSaw, "H1", 1) Then Return
|
||||
' Trasformo in posizione punta utensile in basso
|
||||
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, dR1, dR2, True, m_ptTipP1) Then Return
|
||||
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, vAng, True, m_ptTipP1) Then Return
|
||||
End If
|
||||
' Calcolo direzione asse lama
|
||||
If Not EgtGetCalcToolDirFromAngles(dR1, dR2, m_vtToolP1) Then Return
|
||||
If Not EgtGetCalcToolDirFromAngles(vAng, m_vtToolP1) Then Return
|
||||
' Porto il tip nell'origine tavola
|
||||
m_ptTipP1.ToLoc(New Frame3d(m_ptTabOri))
|
||||
m_bPointP1Ok = True
|
||||
@@ -278,17 +293,30 @@ Public Class SawTestUC
|
||||
' Verifico configurazione tavola e grezzo
|
||||
If Not m_bRawOk Then Return
|
||||
|
||||
' forzo utilizzo testa H1 solo per macchina con 2 teste
|
||||
Dim bIsMultiCut As Boolean = (EgtGetHeadId("H101") <> GDB_ID.NULL)
|
||||
If bIsMultiCut Then
|
||||
EgtSetCalcTool(m_sSaw, "H1", 1)
|
||||
End If
|
||||
|
||||
' Se acquisizone lama o laser
|
||||
If PointModeCmBx.SelectedIndex = PT_MODE.SAW Or PointModeCmBx.SelectedIndex = PT_MODE.LASER Then
|
||||
' Recupero la posizione macchina
|
||||
Dim dL1, dL2, dL3, dR1, dR2 As Double
|
||||
If Not m_MainWindow.m_CNCommunication.GetAxesPositions(dL1, dL2, dL3, dR1, dR2) Then Return
|
||||
' Se macchina multicut il primo asse rotante restituito è quello della tavola
|
||||
Dim vAng() As Double = {dR1, dR2, 0}
|
||||
If bIsMultiCut Then
|
||||
vAng(0) = 0
|
||||
vAng(1) = dR1
|
||||
vAng(2) = dR2
|
||||
End If
|
||||
' Se punto da laser
|
||||
If PointModeCmBx.SelectedIndex = PT_MODE.LASER Then
|
||||
' Imposto come testa corrente il laser (senza utensile ovviamente)
|
||||
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
|
||||
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, vAng, True, m_ptTipP2) Then Return
|
||||
' Ora imposto la lama corrente
|
||||
If Not EgtSetCalcTool(m_sSaw, "H1", 1) Then Return
|
||||
' Altrimenti da lama
|
||||
@@ -296,10 +324,10 @@ Public Class SawTestUC
|
||||
' Imposto la lama corrente
|
||||
If Not EgtSetCalcTool(m_sSaw, "H1", 1) Then Return
|
||||
' Trasformo in posizione punta utensile in basso
|
||||
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, dR1, dR2, True, m_ptTipP2) Then Return
|
||||
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, vAng, True, m_ptTipP2) Then Return
|
||||
End If
|
||||
' Calcolo direzione asse lama
|
||||
If Not EgtGetCalcToolDirFromAngles(dR1, dR2, m_vtToolP2) Then Return
|
||||
If Not EgtGetCalcToolDirFromAngles(vAng, m_vtToolP2) Then Return
|
||||
' Porto il tip nell'origine tavola
|
||||
m_ptTipP2.ToLoc(New Frame3d(m_ptTabOri))
|
||||
m_bPointP2Ok = True
|
||||
@@ -349,7 +377,7 @@ Public Class SawTestUC
|
||||
|
||||
Private Sub DepthTxBx_EgtClosed(sender As Object, e As EventArgs) Handles DepthTxBx.EgtClosed
|
||||
' Verifico che l'affondamento impostato non sia superiore a quello massimo
|
||||
Dim dMaxDepth = m_ptRawMax.z - m_ptRawMin.z + MAX_TAB_DEPTH
|
||||
Dim dMaxDepth = m_ptRawMax.z - m_ptRawMin.z + m_MainWindow.m_CurrentMachine.MaxTabDepth
|
||||
Dim dDepth As Double = 0
|
||||
StringToLen(DepthTxBx.Text, dDepth)
|
||||
If dDepth < 0 Then
|
||||
@@ -419,6 +447,7 @@ Public Class SawTestUC
|
||||
m_bSimul = True
|
||||
m_CurrProjPage.m_SceneButtons.MeasureBtn.IsChecked = False
|
||||
m_CurrProjPage.CurrProjGrid.Visibility = Windows.Visibility.Hidden
|
||||
m_refControlDirectCutUC.LeftButtonGrid.Children.Remove(Me)
|
||||
m_CurrProjPage.CurrentProjectPageGrid.Children.Remove(m_MainWindow.m_DirectCutPageUC)
|
||||
m_MainWindow.m_PrevActivePage = MainWindow.Pages.DirectCut
|
||||
m_CurrProjPage.CurrentProjectPageGrid.Children.Add(m_MainWindow.m_SimulationPage)
|
||||
@@ -447,19 +476,21 @@ Public Class SawTestUC
|
||||
m_CurrProjPage.SetErrorMessage(EgtMsg(90314)) 'Errore nella generazione del programma CN
|
||||
Return
|
||||
End If
|
||||
Dim sNameProg As Integer = 900
|
||||
sNameProg = GetPrivateProfileInt(S_PARTPROGRAM, "NameProg", sNameProg, m_MainWindow.GetMachIniFile)
|
||||
' Download programma (eventuali errori sono segnalati dalla funzione)
|
||||
If m_MainWindow.m_CNCommunication.SendProgram(sCncPath, 900) Then
|
||||
If m_MainWindow.m_CNCommunication.SendProgram(sCncPath, sNameProg) Then
|
||||
' copio il progetto corrente come progetto in lavorazione
|
||||
Dim sWrkPath As String = m_MainWindow.GetTempDir() & "\" & "WorkProj.nge"
|
||||
My.Computer.FileSystem.CopyFile(sMchPath, sWrkPath, True)
|
||||
' lancio eventuale lua post-trasmissione
|
||||
m_MainWindow.ExecSentProgScript( True)
|
||||
m_MainWindow.ExecSentProgScript(True)
|
||||
End If
|
||||
#End If
|
||||
End Sub
|
||||
|
||||
Private Sub ExitBtn_Click(sender As Object, e As RoutedEventArgs) Handles ExitBtn.Click
|
||||
m_MainWindow.m_DirectCutPageUC.LeftButtonGrid.Children.Remove(Me)
|
||||
m_refControlDirectCutUC.LeftButtonGrid.Children.Remove(Me)
|
||||
End Sub
|
||||
|
||||
Private Function CreateSingleCut() As Boolean
|
||||
@@ -499,6 +530,10 @@ Public Class SawTestUC
|
||||
ElseIf nWSide = MCH_SAW_WS.LEFT Then
|
||||
vtPerp = vtDir
|
||||
vtPerp.Rotate(Vector3d.Z_AX, +90)
|
||||
Else
|
||||
m_CurrProjPage.ClearMessage()
|
||||
' 91143 = Set machining side: right or left.
|
||||
m_CurrProjPage.SetInfoMessage(EgtMsg(91143))
|
||||
End If
|
||||
Dim ptEnd As Point3d = ptStart + vtDir * m_dLen + vtPerp * dThick
|
||||
Dim dLen2 As Double = m_dLen / 2
|
||||
|
||||
@@ -363,7 +363,7 @@ Public Class SingleCutAuto
|
||||
' Se non vado in simulazione
|
||||
If Not m_bSimul Then
|
||||
' Dichiaro sottopagina da non riattivare
|
||||
m_MainWindow.m_DirectCutPageUC.m_ActiveDirectCutPage = DirectCutPageUC.DirectCutPages.DirectCut
|
||||
m_MainWindow.m_DirectCutPageUC.m_ControlsDirectCutUC.m_ActiveDirectCutPage = ControlsDirectCutUC.DirectCutPages.DirectCut
|
||||
' Rimuovo layer temporaneo per crocette
|
||||
EgtErase(m_nTempLay)
|
||||
' Rimuovo eventuale pezzo per taglio diretto
|
||||
@@ -715,6 +715,7 @@ Public Class SingleCutAuto
|
||||
m_bSimul = True
|
||||
m_CurrProjPage.m_SceneButtons.MeasureBtn.IsChecked = False
|
||||
m_CurrProjPage.CurrProjGrid.Visibility = Windows.Visibility.Hidden
|
||||
m_MainWindow.m_DirectCutPageUC.m_ControlsDirectCutUC.LeftButtonGrid.Children.Remove(Me)
|
||||
m_CurrProjPage.CurrentProjectPageGrid.Children.Remove(m_MainWindow.m_DirectCutPageUC)
|
||||
m_MainWindow.m_PrevActivePage = MainWindow.Pages.DirectCut
|
||||
m_CurrProjPage.CurrentProjectPageGrid.Children.Add(m_MainWindow.m_SimulationPage)
|
||||
@@ -758,7 +759,7 @@ Public Class SingleCutAuto
|
||||
' reimposto il precedetne utensile e lavorazione
|
||||
m_MainWindow.m_CurrentMachine.sCurrSaw = m_PrecSaw
|
||||
m_MainWindow.m_CurrentMachine.sCurrSawing = m_PrecSawing
|
||||
m_MainWindow.m_DirectCutPageUC.LeftButtonGrid.Children.Remove(Me)
|
||||
m_MainWindow.m_DirectCutPageUC.m_ControlsDirectCutUC.LeftButtonGrid.Children.Remove(Me)
|
||||
End Sub
|
||||
|
||||
Private Function CreateSingleCut() As Boolean
|
||||
|
||||
@@ -69,12 +69,12 @@
|
||||
|
||||
<TextBlock Name="DirectionTxBl" Grid.Column="0" Grid.Row="4"
|
||||
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="DirectionTxBx" Grid.Column="1" Grid.Row="4" Margin="0,0,6,0"
|
||||
<EgtWPFLib:EgtTextBox Name="DirectionTxBx" Grid.Column="1" Grid.Row="4" Margin="0,0,6,0" IsLength="False"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
|
||||
<TextBlock Name="SideAngleTxBl" Grid.Column="0" Grid.Row="5"
|
||||
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="SideAngleTxBx" Grid.Column="1" Grid.Row="5" Margin="0,0,6,0"
|
||||
<EgtWPFLib:EgtTextBox Name="SideAngleTxBx" Grid.Column="1" Grid.Row="5" Margin="0,0,6,0" IsLength="False"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
|
||||
<TextBlock Name="OffsetTxBl" Grid.Column="0" Grid.Row="6"
|
||||
|
||||
+106
-38
@@ -1,4 +1,5 @@
|
||||
Imports EgtUILib
|
||||
Imports System.Windows.Threading
|
||||
Imports EgtUILib
|
||||
|
||||
Public Class SingleCutUC
|
||||
|
||||
@@ -39,10 +40,14 @@ Public Class SingleCutUC
|
||||
Private m_nTempLay As Integer = GDB_ID.NULL
|
||||
|
||||
' Costanti
|
||||
Private Const MAX_TAB_DEPTH As Double = 10.0
|
||||
Private Const MAX_TAB_DEPTH As Double = 10.0 ' sostituita da un m_MaxTabDepth letto da file ini macchina
|
||||
Private Const MIN_CUT_LEN As Double = 10.0
|
||||
Private Const MAX_SIDE_ANG As Double = 60.0
|
||||
' Costanti che indicano la modalità di acquisizione dei punti
|
||||
|
||||
' Utilizzato per aggiornare la posizione della macchina
|
||||
Private m_RefreshTimer As New DispatcherTimer
|
||||
|
||||
Private Enum PT_MODE As Integer
|
||||
SAW = 0
|
||||
LASER = 1
|
||||
@@ -68,14 +73,14 @@ Public Class SingleCutUC
|
||||
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())
|
||||
m_dAngO = GetPrivateProfileDouble( S_DIRECTCUTS, K_DC_SING_ANGH, m_dAngO, m_MainWindow.GetIniFile())
|
||||
m_dAngV = GetPrivateProfileDouble( S_DIRECTCUTS, K_DC_SING_ANGV, m_dAngV, m_MainWindow.GetIniFile())
|
||||
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())
|
||||
m_dAngO = GetPrivateProfileDouble(S_DIRECTCUTS, K_DC_SING_ANGH, m_dAngO, m_MainWindow.GetIniFile())
|
||||
m_dAngV = GetPrivateProfileDouble(S_DIRECTCUTS, K_DC_SING_ANGV, m_dAngV, m_MainWindow.GetIniFile())
|
||||
m_dOffset = GetPrivateProfileDouble(S_DIRECTCUTS, K_DC_SING_OFFSET, m_dOffset, m_MainWindow.GetIniFile())
|
||||
m_bSawTh = (GetPrivateProfileInt(S_DIRECTCUTS, K_DC_SING_SAWTH, 0, m_MainWindow.GetIniFile()) <> 0)
|
||||
m_ptTipP1.x = GetPrivateProfileDouble( S_DIRECTCUTS, K_DC_SING_POSX, m_ptTipP1.x, m_MainWindow.GetIniFile())
|
||||
m_ptTipP1.y = GetPrivateProfileDouble( S_DIRECTCUTS, K_DC_SING_POSY, m_ptTipP1.y, m_MainWindow.GetIniFile())
|
||||
m_ptTipP1.x = GetPrivateProfileDouble(S_DIRECTCUTS, K_DC_SING_POSX, m_ptTipP1.x, m_MainWindow.GetIniFile())
|
||||
m_ptTipP1.y = GetPrivateProfileDouble(S_DIRECTCUTS, K_DC_SING_POSY, m_ptTipP1.y, m_MainWindow.GetIniFile())
|
||||
End Sub
|
||||
|
||||
Private Sub SingleCut_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded
|
||||
@@ -92,6 +97,10 @@ Public Class SingleCutUC
|
||||
m_MainWindow.m_DirectCutPageUC.m_bShowMachine = True
|
||||
EgtSetMachineLook(m_MainWindow.m_DirectCutPageUC.m_nMachLook)
|
||||
EgtDraw()
|
||||
' riavvio il timer per visualizzare la poszione della macchina
|
||||
If Not IsNothing(m_RefreshTimer) Then
|
||||
m_RefreshTimer.Start()
|
||||
End If
|
||||
Return
|
||||
End If
|
||||
' Disabilito registrazione progetto modificato
|
||||
@@ -114,7 +123,7 @@ Public Class SingleCutUC
|
||||
m_bPointP1Ok = False
|
||||
m_bPointP2Ok = False
|
||||
' Inizializzo primo punto acquisito dal disegno
|
||||
m_ptPrev = m_ptTipP1 + ( m_ptTabOri - Point3d.ORIG())
|
||||
m_ptPrev = m_ptTipP1 + (m_ptTabOri - Point3d.ORIG())
|
||||
m_ptPrev.z = m_ptRawMax.z
|
||||
' Disegno crocetta che indica il punto acquisito
|
||||
CreateCross(m_nTempLay, m_ptPrev)
|
||||
@@ -138,26 +147,45 @@ Public Class SingleCutUC
|
||||
' Deseleziono bottone primo punto
|
||||
Point1Btn.IsChecked = False
|
||||
|
||||
' la visualizzazione dei comandi è gestira dalla DirectCutPageUC richiamando la funzione ReloadParam
|
||||
' la visualizzazione dei comandi è gestita dalla DirectCutPageUC richiamando la funzione ReloadParam
|
||||
|
||||
' forzo la macchina ad essere visibile fin da subito
|
||||
m_MainWindow.m_DirectCutPageUC.m_bShowMachine = True
|
||||
m_MainWindow.m_DirectCutPageUC.m_nMachLook = MCH_LOOK.TAB
|
||||
' Creo il timer il timer per aggiornare il posizionamento della macchina
|
||||
AddHandler m_RefreshTimer.Tick, AddressOf RefreshTimer_tick
|
||||
m_RefreshTimer.Interval = TimeSpan.FromMilliseconds(1000)
|
||||
|
||||
' Aggiorno visualizzazione
|
||||
EgtDraw()
|
||||
|
||||
' Avvi il timer
|
||||
m_RefreshTimer.Start()
|
||||
End Sub
|
||||
|
||||
Private Sub RefreshTimer_tick()
|
||||
' se è impostata la visualizzazione della sola tavola allora non aggiorno il disegno
|
||||
If m_MainWindow.m_DirectCutPageUC.m_nMachLook = MCH_LOOK.TAB Then Return
|
||||
' Aggiorno visualizzazione
|
||||
SetMachineInCurrPos()
|
||||
' Aggiorno il disegno
|
||||
EgtDraw()
|
||||
End Sub
|
||||
|
||||
Friend Sub SingleCut_Unloaded(sender As Object, e As RoutedEventArgs) Handles Me.Unloaded
|
||||
' Salvo i dati correnti
|
||||
WritePrivateProfileString( S_DIRECTCUTS, K_DC_SING_DEPTH, DoubleToString( m_dDepth, 2), m_MainWindow.GetIniFile())
|
||||
WritePrivateProfileString( S_DIRECTCUTS, K_DC_SING_LENGTH, DoubleToString( m_dLen, 2), m_MainWindow.GetIniFile())
|
||||
WritePrivateProfileString( S_DIRECTCUTS, K_DC_SING_ANGH, DoubleToString( m_dAngO, 2), m_MainWindow.GetIniFile())
|
||||
WritePrivateProfileString( S_DIRECTCUTS, K_DC_SING_ANGV, DoubleToString( m_dAngV, 2), m_MainWindow.GetIniFile())
|
||||
WritePrivateProfileString(S_DIRECTCUTS, K_DC_SING_DEPTH, DoubleToString(m_dDepth, 2), m_MainWindow.GetIniFile())
|
||||
WritePrivateProfileString(S_DIRECTCUTS, K_DC_SING_LENGTH, DoubleToString(m_dLen, 2), m_MainWindow.GetIniFile())
|
||||
WritePrivateProfileString(S_DIRECTCUTS, K_DC_SING_ANGH, DoubleToString(m_dAngO, 2), m_MainWindow.GetIniFile())
|
||||
WritePrivateProfileString(S_DIRECTCUTS, K_DC_SING_ANGV, DoubleToString(m_dAngV, 2), m_MainWindow.GetIniFile())
|
||||
WritePrivateProfileString(S_DIRECTCUTS, K_DC_SING_OFFSET, DoubleToString(m_dOffset, 2), m_MainWindow.GetIniFile())
|
||||
WritePrivateProfileString(S_DIRECTCUTS, K_DC_SING_SAWTH, If(m_bSawTh, "1", "0"), m_MainWindow.GetIniFile())
|
||||
WritePrivateProfileString( S_DIRECTCUTS, K_DC_SING_POSX, DoubleToString( m_ptTipP1.x, 2), m_MainWindow.GetIniFile())
|
||||
WritePrivateProfileString(S_DIRECTCUTS, K_DC_SING_POSX, DoubleToString(m_ptTipP1.x, 2), m_MainWindow.GetIniFile())
|
||||
WritePrivateProfileString(S_DIRECTCUTS, K_DC_SING_POSY, DoubleToString(m_ptTipP1.y, 2), m_MainWindow.GetIniFile())
|
||||
' Se non vado in simulazione
|
||||
If Not m_bSimul Then
|
||||
' Dichiaro sottopagina da non riattivare
|
||||
m_MainWindow.m_DirectCutPageUC.m_ActiveDirectCutPage = DirectCutPageUC.DirectCutPages.DirectCut
|
||||
m_MainWindow.m_DirectCutPageUC.m_ControlsDirectCutUC.m_ActiveDirectCutPage = ControlsDirectCutUC.DirectCutPages.DirectCut
|
||||
' Rimuovo layer temporaneo per crocette
|
||||
EgtErase(m_nTempLay)
|
||||
' Rimuovo eventuale pezzo per taglio diretto
|
||||
@@ -171,6 +199,8 @@ Public Class SingleCutUC
|
||||
EgtSetMachineLook(MCH_LOOK.TAB)
|
||||
EgtDraw()
|
||||
End If
|
||||
' interrompo il Timer per aggiornare la visualizzazione del posizionamento macchina
|
||||
m_RefreshTimer.Stop()
|
||||
' Dichiaro pagina non attiva
|
||||
m_bActive = False
|
||||
End Sub
|
||||
@@ -238,6 +268,12 @@ Public Class SingleCutUC
|
||||
' Verifico configurazione tavola e grezzo
|
||||
If Not m_bRawOk Then Return
|
||||
|
||||
' forzo utilizzo testa H1 solo per macchina con 2 teste
|
||||
Dim bIsMultiCut As Boolean = (EgtGetHeadId("H101") <> GDB_ID.NULL)
|
||||
If bIsMultiCut Then
|
||||
m_MainWindow.m_DirectCutPageUC.ReloadParam()
|
||||
End If
|
||||
|
||||
' Recupero dati utensile e testa corrente
|
||||
Dim sTool As String = ""
|
||||
Dim sHead As String = ""
|
||||
@@ -249,6 +285,13 @@ Public Class SingleCutUC
|
||||
' Recupero la posizione macchina
|
||||
Dim dL1, dL2, dL3, dR1, dR2 As Double
|
||||
If Not m_MainWindow.m_CNCommunication.GetAxesPositions(dL1, dL2, dL3, dR1, dR2) Then Return
|
||||
' Se macchina multicut il primo asse rotante restituito è quello della tavola
|
||||
Dim vAng() As Double = {dR1, dR2, 0}
|
||||
If bIsMultiCut Then
|
||||
vAng(0) = 0
|
||||
vAng(1) = dR1
|
||||
vAng(2) = dR2
|
||||
End If
|
||||
' Ricavo dati lama corrente
|
||||
Dim sSaw As String = m_MainWindow.m_CurrentMachine.sCurrSaw
|
||||
' Se punto da laser
|
||||
@@ -256,7 +299,8 @@ Public Class SingleCutUC
|
||||
' Imposto come testa corrente il laser (senza utensile ovviamente)
|
||||
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
|
||||
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, vAng, True, m_ptTipP1) Then Return
|
||||
EgtOutLog("Coordinate punto 1 da H3: " & m_ptTipP1.x.ToString & " ," & m_ptTipP1.y.ToString)
|
||||
' Reimposto eventuale precedente utensile
|
||||
EgtSetCalcTool(sTool, sHead, nExit)
|
||||
' Altrimenti da lama
|
||||
@@ -264,10 +308,11 @@ Public Class SingleCutUC
|
||||
' 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
|
||||
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, vAng, True, m_ptTipP1) Then Return
|
||||
EgtOutLog("Coordinate punto 1 da H1: " & m_ptTipP1.x.ToString & " ," & m_ptTipP1.y.ToString)
|
||||
End If
|
||||
' Calcolo direzione asse lama
|
||||
If Not EgtGetCalcToolDirFromAngles(dR1, dR2, m_vtToolP1) Then Return
|
||||
If Not EgtGetCalcToolDirFromAngles(vAng, m_vtToolP1) Then Return
|
||||
' Porto il tip nell'origine tavola
|
||||
m_ptTipP1.ToLoc(New Frame3d(m_ptTabOri))
|
||||
m_bPointP1Ok = True
|
||||
@@ -279,7 +324,7 @@ Public Class SingleCutUC
|
||||
DirectionTxBx.Text = DoubleToString(m_dAngO - m_MainWindow.m_CurrentMachine.dDeltaC, 2)
|
||||
SideAngleTxBx.Text = DoubleToString(m_dAngV, 2)
|
||||
|
||||
' Altrimenti punto da click di mouse
|
||||
' Altrimenti punto da click di mouse
|
||||
Else
|
||||
' Assegno punto selezionato nel disegno a m_ptTipP1
|
||||
m_ptTipP1 = m_ptPrev
|
||||
@@ -288,7 +333,6 @@ Public Class SingleCutUC
|
||||
m_bPointP1Ok = True
|
||||
' Reimposto eventuale precedente utensile
|
||||
EgtSetCalcTool(sTool, sHead, nExit)
|
||||
|
||||
End If
|
||||
|
||||
' Disegno il taglio
|
||||
@@ -298,6 +342,7 @@ Public Class SingleCutUC
|
||||
m_MainWindow.m_DirectCutPageUC.m_bShowMachine = True
|
||||
EgtSetMachineLook(m_MainWindow.m_DirectCutPageUC.m_nMachLook)
|
||||
EgtDraw()
|
||||
|
||||
' Seleziono il bottone per indicare che il primo punto è stato acquisito
|
||||
Point1Btn.IsChecked = True
|
||||
' Abilito e deseleziono secondo punto
|
||||
@@ -317,6 +362,12 @@ Public Class SingleCutUC
|
||||
' Verifico configurazione tavola e grezzo
|
||||
If Not m_bRawOk Then Return
|
||||
|
||||
' forzo utilizzo testa H1
|
||||
Dim bIsMultiCut As Boolean = (EgtGetHeadId("H101") <> GDB_ID.NULL)
|
||||
If bIsMultiCut Then
|
||||
m_MainWindow.m_DirectCutPageUC.ReloadParam()
|
||||
End If
|
||||
|
||||
' Recupero dati utensile e testa corrente
|
||||
Dim sTool As String = ""
|
||||
Dim sHead As String = ""
|
||||
@@ -328,6 +379,13 @@ Public Class SingleCutUC
|
||||
' Recupero la posizione macchina
|
||||
Dim dL1, dL2, dL3, dR1, dR2 As Double
|
||||
If Not m_MainWindow.m_CNCommunication.GetAxesPositions(dL1, dL2, dL3, dR1, dR2) Then Return
|
||||
' Se macchina multicut il primo asse rotante restituito è quello della tavola
|
||||
Dim vAng() As Double = {dR1, dR2, 0}
|
||||
If bIsMultiCut Then
|
||||
vAng(0) = 0
|
||||
vAng(1) = dR1
|
||||
vAng(2) = dR2
|
||||
End If
|
||||
' Ricavo dati lama corrente
|
||||
Dim sSaw As String = m_MainWindow.m_CurrentMachine.sCurrSaw
|
||||
' Se punto da laser
|
||||
@@ -335,20 +393,20 @@ Public Class SingleCutUC
|
||||
' Imposto come testa corrente il laser (senza utensile ovviamente)
|
||||
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
|
||||
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, vAng, True, m_ptTipP2) Then Return
|
||||
EgtOutLog("Coordinate punto 2 da H3: " & m_ptTipP2.x.ToString & " ," & m_ptTipP2.y.ToString)
|
||||
' Reimposto eventuale precedente utensile
|
||||
EgtSetCalcTool(sTool, sHead, nExit)
|
||||
|
||||
' Altrimenti da lama
|
||||
Else
|
||||
' 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
|
||||
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, vAng, True, m_ptTipP2) Then Return
|
||||
End If
|
||||
' Calcolo direzione asse lama
|
||||
If Not EgtGetCalcToolDirFromAngles(dR1, dR2, m_vtToolP2) Then Return
|
||||
If Not EgtGetCalcToolDirFromAngles(vAng, m_vtToolP2) Then Return
|
||||
' Porto il tip nell'origine tavola
|
||||
m_ptTipP2.ToLoc(New Frame3d(m_ptTabOri))
|
||||
m_bPointP2Ok = True
|
||||
@@ -358,7 +416,7 @@ Public Class SingleCutUC
|
||||
m_dAngV = 90 - dTAngV
|
||||
SideAngleTxBx.Text = DoubleToString(m_dAngV, 2)
|
||||
|
||||
' Altrimenti punto da click di mouse
|
||||
' Altrimenti punto da click di mouse
|
||||
Else
|
||||
' Assegno punto selezionato nel disegno a m_ptTipP2
|
||||
m_ptTipP2 = m_ptPrev
|
||||
@@ -381,6 +439,7 @@ Public Class SingleCutUC
|
||||
m_dAngO = dAngOrizzDeg
|
||||
LenghtTxBx.Text = LenToString(m_dLen, 1)
|
||||
DirectionTxBx.Text = DoubleToString(m_dAngO - m_MainWindow.m_CurrentMachine.dDeltaC, 2)
|
||||
EgtOutLog("Lunghezza taglio: " & dLen.ToString & "Angolo: " & dAngOrizzDeg.ToString)
|
||||
CreateSingleCut()
|
||||
' Disegno la macchina nella sua posizione reale
|
||||
SetMachineInCurrPos()
|
||||
@@ -398,7 +457,7 @@ Public Class SingleCutUC
|
||||
|
||||
Private Sub DepthTxBx_EgtClosed(sender As Object, e As EventArgs) Handles DepthTxBx.EgtClosed
|
||||
' Verifico che l'affondamento impostato non sia superiore a quello massimo
|
||||
Dim dMaxDepth = m_ptRawMax.z - m_ptRawMin.z + MAX_TAB_DEPTH
|
||||
Dim dMaxDepth = m_ptRawMax.z - m_ptRawMin.z + m_MainWindow.m_CurrentMachine.MaxTabDepth
|
||||
Dim dDepth As Double = 0
|
||||
StringToLen(DepthTxBx.Text, dDepth)
|
||||
If dDepth < 0 Then
|
||||
@@ -476,7 +535,7 @@ Public Class SingleCutUC
|
||||
EgtDraw()
|
||||
End Sub
|
||||
|
||||
Private Sub SawThick_Click( sender As Object, e As RoutedEventArgs) Handles SawThChBx.Click
|
||||
Private Sub SawThick_Click(sender As Object, e As RoutedEventArgs) Handles SawThChBx.Click
|
||||
' Recupero lo stato di check
|
||||
m_bSawTh = SawThChBx.IsChecked()
|
||||
' Disegno il taglio
|
||||
@@ -524,6 +583,7 @@ Public Class SingleCutUC
|
||||
m_bSimul = True
|
||||
m_CurrProjPage.m_SceneButtons.MeasureBtn.IsChecked = False
|
||||
m_CurrProjPage.CurrProjGrid.Visibility = Windows.Visibility.Hidden
|
||||
m_MainWindow.m_DirectCutPageUC.m_ControlsDirectCutUC.LeftButtonGrid.Children.Remove(Me)
|
||||
m_CurrProjPage.CurrentProjectPageGrid.Children.Remove(m_MainWindow.m_DirectCutPageUC)
|
||||
m_MainWindow.m_PrevActivePage = MainWindow.Pages.DirectCut
|
||||
m_CurrProjPage.CurrentProjectPageGrid.Children.Add(m_MainWindow.m_SimulationPage)
|
||||
@@ -535,9 +595,9 @@ Public Class SingleCutUC
|
||||
m_CurrProjPage.SetWarningMessage( "Trial Version")
|
||||
#Else
|
||||
' Verifico non sia versione Ufficio
|
||||
If m_MainWindow.GetKeyOption( MainWindow.KEY_OPT.OFFICE_TYPE) Then
|
||||
m_CurrProjPage.SetWarningMessage( "Office Version")
|
||||
Return
|
||||
If m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.OFFICE_TYPE) Then
|
||||
m_CurrProjPage.SetWarningMessage("Office Version")
|
||||
Return
|
||||
End If
|
||||
' Verifico ci sia un taglio valido
|
||||
If Not m_bCutOk Then Return
|
||||
@@ -552,24 +612,27 @@ Public Class SingleCutUC
|
||||
m_CurrProjPage.SetErrorMessage(EgtMsg(90314)) 'Errore nella generazione del programma CN
|
||||
Return
|
||||
End If
|
||||
Dim sNameProg As Integer = 900
|
||||
sNameProg = GetPrivateProfileInt(S_PARTPROGRAM, "NameProg", sNameProg, m_MainWindow.GetMachIniFile)
|
||||
' Download programma (eventuali errori sono segnalati dalla funzione)
|
||||
If m_MainWindow.m_CNCommunication.SendProgram(sCncPath, 900) Then
|
||||
If m_MainWindow.m_CNCommunication.SendProgram(sCncPath, sNameProg) Then
|
||||
' copio il progetto corrente come progetto in lavorazione
|
||||
Dim sWrkPath As String = m_MainWindow.GetTempDir() & "\" & "WorkProj.nge"
|
||||
My.Computer.FileSystem.CopyFile(sMchPath, sWrkPath, True)
|
||||
' lancio eventuale lua post-trasmissione
|
||||
m_MainWindow.ExecSentProgScript( True)
|
||||
m_MainWindow.ExecSentProgScript(True)
|
||||
End If
|
||||
#End If
|
||||
End Sub
|
||||
|
||||
Private Sub ExitBtn_Click(sender As Object, e As RoutedEventArgs) Handles ExitBtn.Click
|
||||
m_MainWindow.m_DirectCutPageUC.LeftButtonGrid.Children.Remove(Me)
|
||||
m_MainWindow.m_DirectCutPageUC.m_ControlsDirectCutUC.LeftButtonGrid.Children.Remove(Me)
|
||||
End Sub
|
||||
|
||||
Private Function CreateSingleCut() As Boolean
|
||||
' Verifico sia definito il punto iniziale e il grezzo
|
||||
If Not m_bPointP1Ok Or Not m_bRawOk Then
|
||||
EgtOutLog("Primo punto non valido")
|
||||
m_bCutOk = False
|
||||
Return False
|
||||
End If
|
||||
@@ -582,7 +645,7 @@ Public Class SingleCutUC
|
||||
Dim sSawing As String = m_MainWindow.m_CurrentMachine.sCurrSawing
|
||||
EgtTdbSetCurrTool(sSaw)
|
||||
Dim dThick As Double = 0
|
||||
' se è impostata una lavorazione di lama
|
||||
' Se è impostata una lavorazione di lama
|
||||
If Not String.IsNullOrEmpty(sSawing) Then
|
||||
EgtTdbGetCurrToolParam(MCH_TP.THICK, dThick)
|
||||
End If
|
||||
@@ -598,14 +661,19 @@ Public Class SingleCutUC
|
||||
Dim ptStart As Point3d = m_ptTipP1
|
||||
ptStart.z = 0
|
||||
Dim nCutId = EgtCreateLinePDL(nLayerId, ptStart, m_dAngO, m_dLen)
|
||||
If Math.Abs(m_dOffset) > 10 * EPS_SMALL Then
|
||||
Dim dTotOffset = m_dOffset
|
||||
If m_bSawTh Then dTotOffset += If( m_dOffset > 0, dThick, -dThick)
|
||||
' Applico la correzione di spessore lama -> anche se Offset=0! ver_2.5b1
|
||||
Dim dTotOffset = m_dOffset
|
||||
If m_bSawTh Then
|
||||
dTotOffset += If(m_dOffset > 0, dThick, -dThick)
|
||||
EgtOffsetCurve(nCutId, dTotOffset, OFF_TYPE.EXTEND)
|
||||
Else
|
||||
EgtOffsetCurve(nCutId, dTotOffset, OFF_TYPE.EXTEND)
|
||||
End If
|
||||
' Imposto affondamento e angolo di fianco sul taglio
|
||||
EgtSetInfo(nCutId, INFO_DEPTH, m_dDepth)
|
||||
EgtSetInfo(nCutId, INFO_SIDE_ANGLE, m_dAngV)
|
||||
' Imposto se disabilitare l'inversine di direzione del taglio
|
||||
If Not m_MainWindow.m_CurrentMachine.bEnableInvert Then EgtSetInfo(nCutId, INFO_ENABLE_INVERT, 0)
|
||||
' Creo layer per crocetta di riferimento
|
||||
Dim nCrossLayerId = EgtCreateGroup(nPartId)
|
||||
' Aggiungo crocetta/e
|
||||
|
||||
@@ -72,7 +72,10 @@ Public Class SingleDrillUC
|
||||
Private Sub SingleDrill_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded
|
||||
m_sCurrDrill = m_CurrentMachine.sCurrDrill
|
||||
GetDrillFromDrilling(m_sCurrDrill, m_CurrentMachine.sCurrDrilling)
|
||||
|
||||
' rimuovo utensile su uscite 1
|
||||
EgtSetCalcTool("", "H1", 1)
|
||||
' imposto utensile su uscita 2
|
||||
EgtSetCalcTool(m_sCurrDrill, "H1", 2)
|
||||
' recupero informazioni del foretto usato
|
||||
EgtTdbSetCurrTool(m_sCurrDrill)
|
||||
EgtTdbGetCurrToolParam(MCH_TP.DIAM, m_dDiameter)
|
||||
@@ -136,7 +139,7 @@ Public Class SingleDrillUC
|
||||
' Se non vado in simulazione
|
||||
If Not m_bSimul Then
|
||||
' Dichiaro sottopagina da non riattivare
|
||||
m_MainWindow.m_DirectCutPageUC.m_ActiveDirectCutPage = DirectCutPageUC.DirectCutPages.DirectCut
|
||||
m_MainWindow.m_DirectCutPageUC.m_ControlsDirectCutUC.m_ActiveDirectCutPage = ControlsDirectCutUC.DirectCutPages.DirectCut
|
||||
' Rimuovo layer temporaneo per crocette
|
||||
EgtErase(m_nTempLay)
|
||||
' Rimuovo eventuale pezzo per taglio diretto
|
||||
@@ -213,21 +216,33 @@ Public Class SingleDrillUC
|
||||
' Verifico configurazione tavola e grezzo
|
||||
If Not m_bRawOk Then Return
|
||||
|
||||
' forzo utilizzo testa H1 solo per macchina con 2 teste
|
||||
Dim bIsMultiCut As Boolean = (EgtGetHeadId("H101") <> GDB_ID.NULL)
|
||||
' Ricavo dati lama corrente
|
||||
Dim sDrill As String = m_sCurrDrill
|
||||
If bIsMultiCut Then
|
||||
EgtSetCalcTool(sDrill, "H1", 2)
|
||||
End If
|
||||
|
||||
' Se acquisizione lama o laser
|
||||
If PointModeCmBx.SelectedIndex = PT_MODE.DRILL Or PointModeCmBx.SelectedIndex = PT_MODE.LASER Then
|
||||
|
||||
' Recupero la posizione macchina
|
||||
Dim dL1, dL2, dL3, dR1, dR2 As Double
|
||||
If Not m_MainWindow.m_CNCommunication.GetAxesPositions(dL1, dL2, dL3, dR1, dR2) Then Return
|
||||
|
||||
' Ricavo dati Foretto corrente
|
||||
Dim sDrill As String = m_sCurrDrill
|
||||
' Se macchina multicut il primo asse rotante restituito è quello della tavola
|
||||
Dim vAng() As Double = {dR1, dR2, 0}
|
||||
If bIsMultiCut Then
|
||||
vAng(0) = 0
|
||||
vAng(1) = dR1
|
||||
vAng(2) = dR2
|
||||
End If
|
||||
' Se punto da laser
|
||||
If PointModeCmBx.SelectedIndex = PT_MODE.LASER Then
|
||||
' Imposto come testa corrente il laser (senza utensile ovviamente)
|
||||
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
|
||||
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, vAng, True, m_ptTipP1) Then Return
|
||||
' Ora imposto la lama corrente
|
||||
If Not EgtSetCalcTool(sDrill, "H1", 2) Then Return
|
||||
' Altrimenti da lama
|
||||
@@ -235,10 +250,10 @@ Public Class SingleDrillUC
|
||||
' Imposto la lama corrente
|
||||
If Not EgtSetCalcTool(sDrill, "H1", 2) Then Return
|
||||
' Trasformo in posizione punta utensile in basso
|
||||
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, dR1, dR2, True, m_ptTipP1) Then Return
|
||||
If Not EgtGetCalcTipFromPositions(dL1, dL2, dL3, vAng, True, m_ptTipP1) Then Return
|
||||
End If
|
||||
' Calcolo direzione asse lama
|
||||
If Not EgtGetCalcToolDirFromAngles(dR1, dR2, m_vtToolP1) Then Return
|
||||
If Not EgtGetCalcToolDirFromAngles(vAng, m_vtToolP1) Then Return
|
||||
' Porto il tip nell'origine tavola
|
||||
m_ptTipP1.ToLoc(New Frame3d(m_ptTabOri))
|
||||
m_bPointP1Ok = True
|
||||
@@ -250,10 +265,8 @@ Public Class SingleDrillUC
|
||||
' Porto il tip nell'origine tavola
|
||||
m_ptTipP1.ToLoc(New Frame3d(m_ptTabOri))
|
||||
m_bPointP1Ok = True
|
||||
' Ricavo dati lama corrente
|
||||
Dim sDrill As String = m_sCurrDrill
|
||||
' Imposto la lama corrente
|
||||
If Not EgtSetCalcTool(sDrill, "H1", 1) Then Return
|
||||
If Not EgtSetCalcTool(sDrill, "H1", 2) Then Return
|
||||
End If
|
||||
|
||||
' Disegno il taglio
|
||||
@@ -342,6 +355,7 @@ Public Class SingleDrillUC
|
||||
m_bSimul = True
|
||||
m_CurrProjPage.m_SceneButtons.MeasureBtn.IsChecked = False
|
||||
m_CurrProjPage.CurrProjGrid.Visibility = Windows.Visibility.Hidden
|
||||
m_MainWindow.m_DirectCutPageUC.m_ControlsDirectCutUC.LeftButtonGrid.Children.Remove(Me)
|
||||
m_CurrProjPage.CurrentProjectPageGrid.Children.Remove(m_MainWindow.m_DirectCutPageUC)
|
||||
m_MainWindow.m_PrevActivePage = MainWindow.Pages.DirectCut
|
||||
m_CurrProjPage.CurrentProjectPageGrid.Children.Add(m_MainWindow.m_SimulationPage)
|
||||
@@ -370,8 +384,10 @@ Public Class SingleDrillUC
|
||||
m_CurrProjPage.SetErrorMessage(EgtMsg(90314)) 'Errore nella generazione del programma CN
|
||||
Return
|
||||
End If
|
||||
Dim sNameProg As Integer = 900
|
||||
sNameProg = GetPrivateProfileInt(S_PARTPROGRAM, "NameProg", sNameProg, m_MainWindow.GetMachIniFile)
|
||||
' Download programma (eventuali errori sono segnalati dalla funzione)
|
||||
If m_MainWindow.m_CNCommunication.SendProgram(sCncPath, 900) Then
|
||||
If m_MainWindow.m_CNCommunication.SendProgram(sCncPath, sNameProg) Then
|
||||
' copio il progetto corrente come progetto in lavorazione
|
||||
Dim sWrkPath As String = m_MainWindow.GetTempDir() & "\" & "WorkProj.nge"
|
||||
My.Computer.FileSystem.CopyFile(sMchPath, sWrkPath, True)
|
||||
@@ -382,7 +398,7 @@ Public Class SingleDrillUC
|
||||
End Sub
|
||||
|
||||
Private Sub ExitBtn_Click(sender As Object, e As RoutedEventArgs) Handles ExitBtn.Click
|
||||
m_MainWindow.m_DirectCutPageUC.LeftButtonGrid.Children.Remove(Me)
|
||||
m_MainWindow.m_DirectCutPageUC.m_ControlsDirectCutUC.LeftButtonGrid.Children.Remove(Me)
|
||||
End Sub
|
||||
|
||||
Private Function CreateSingleDrill() As Boolean
|
||||
@@ -430,9 +446,9 @@ Public Class SingleDrillUC
|
||||
ptIns.z = dRawHeight
|
||||
' Inserisco il pezzo nel grezzo
|
||||
EgtAddPartToRawPart(nPartId, ptIns, m_MainWindow.m_CurrentProjectPageUC.m_nRawId)
|
||||
EgtSetCurrPhase(1)
|
||||
' Inserisco la lavorazione
|
||||
m_bCutOk = AddMachinings(nPartId) AndAlso UpdateAllMachiningsToolpaths()
|
||||
EgtSetCurrPhase(1)
|
||||
' Eventuale eliminazione Home finale
|
||||
If Not m_MainWindow.m_CurrentMachine.bDirectCutsFinalHome Then
|
||||
RemoveFinalHome()
|
||||
|
||||
@@ -0,0 +1,162 @@
|
||||
<UserControl x:Class="SquaringUC"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="597.3" d:DesignWidth="256">
|
||||
|
||||
<!--<Border CornerRadius="{StaticResource Page_CornerRadius}" Background="{StaticResource OmagCut_LightGray}">-->
|
||||
<Border Style="{DynamicResource OmagCut_DirectCutPageBorder}">
|
||||
|
||||
<!-- Definizione della Grid MultipleCut -->
|
||||
<Grid Name="SingleCutGrid" >
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="2*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<!--<Grid Grid.Row="0" Grid.ColumnSpan="2">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<ToggleButton Name="Point1Btn" Grid.Column="0"
|
||||
Style="{DynamicResource OmagCut_YellowIconToggleButton}">
|
||||
<Image Source="{DynamicResource Acquisisci-P1Img}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
</ToggleButton>
|
||||
|
||||
<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>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding}" Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</DataTemplate>
|
||||
</ComboBox.ItemTemplate>
|
||||
</ComboBox>-->
|
||||
|
||||
<!--<TextBlock Name="DepthTxBl" Grid.Column="0" Grid.Row="2"
|
||||
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="DepthTxBx" Grid.Column="1" Grid.Row="2" Margin="0,0,6,0"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>-->
|
||||
|
||||
<TextBlock Name="OffsetTxBl" Grid.Column="0" Grid.Row="3"
|
||||
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="OffsetTxBx" Grid.Column="1" Grid.Row="3" Margin="0,0,6,0"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
|
||||
<TextBlock Name="ExtraLenTxBl" Grid.Column="0" Grid.Row="4"
|
||||
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="ExtraLenTxBx" Grid.Column="1" Grid.Row="4" Margin="0,0,6,0"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
|
||||
<!--<TextBlock Name="DirectionTxBl" Grid.Column="0" Grid.Row="3"
|
||||
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="DirectionTxBx" Grid.Column="1" Grid.Row="3" Margin="0,0,6,0"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
|
||||
<TextBlock Name="SideAngleTxBl" Grid.Column="0" Grid.Row="4"
|
||||
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="SideAngleTxBx" Grid.Column="1" Grid.Row="4" Margin="0,0,6,0"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>-->
|
||||
|
||||
<!--<Grid Grid.Row="5" Grid.ColumnSpan="2">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1.5*"/>
|
||||
<ColumnDefinition Width="2"/>
|
||||
<ColumnDefinition Width="1.5*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<Border Grid.Column="1" Grid.Row="0" Grid.RowSpan="4" Background="Black" />
|
||||
|
||||
<TextBlock Name="NumPzXTxBl" Grid.Column="0" Grid.Row="0"
|
||||
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
|
||||
<TextBlock Name="DimPzXTxBl" Grid.Column="2" Grid.Row="0"
|
||||
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
|
||||
|
||||
<EgtWPFLib:EgtTextBox Name="NumPzXTxBx" Grid.Column="0" Grid.Row="1" Width="75"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="DimPzXTxBx" Grid.Column="2" Grid.Row="1" Width="75"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}" />
|
||||
|
||||
<TextBlock Name="NumPzYTxBl" Grid.Column="0" Grid.Row="2"
|
||||
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
|
||||
<TextBlock Name="DimPzYTxBl" Grid.Column="2" Grid.Row="2"
|
||||
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
|
||||
|
||||
<EgtWPFLib:EgtTextBox Name="NumPzYTxBx" Grid.Column="0" Grid.Row="3" Width="75"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="DimPzYTxBx" Grid.Column="2" Grid.Row="3" Width="75"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}" />
|
||||
|
||||
</Grid>
|
||||
|
||||
<TextBlock Name="SideTxBl" Grid.Row="6" Grid.ColumnSpan="2"
|
||||
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
|
||||
<CheckBox Name="SideChBx" Grid.Row="6" Grid.ColumnSpan="2" Style="{StaticResource OmagCut_CheckBox_Single}"
|
||||
HorizontalAlignment="Right" Margin="0,0,6,0"/>-->
|
||||
|
||||
<Grid Grid.Row="7" Grid.ColumnSpan="2">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Name="XcoordTxBl" Grid.Column="0" Text="X"
|
||||
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}" HorizontalAlignment="Center"/>
|
||||
<EgtWPFLib:EgtTextBox Name="XcoordTxBx" Grid.Column="1" Margin="0,0,6,0"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
<TextBlock Name="YcoordTxBl" Grid.Column="2" Text="Y"
|
||||
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}" HorizontalAlignment="Center"/>
|
||||
<EgtWPFLib:EgtTextBox Name="YcoordTxBx" Grid.Column="3" Margin="0,0,6,0"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
</Grid>
|
||||
|
||||
<Grid Grid.Row="11" Grid.ColumnSpan="2">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<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>
|
||||
|
||||
</Border>
|
||||
</UserControl>
|
||||
@@ -0,0 +1,448 @@
|
||||
Imports EgtUILib
|
||||
|
||||
Public Class SquaringUC
|
||||
|
||||
' Riferimenti a pagine
|
||||
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
|
||||
' Flag di simulazione in corso
|
||||
Private m_bSimul As Boolean = False
|
||||
|
||||
' Origine tavola e dati grezzo
|
||||
Private m_bRawOk As Boolean = False
|
||||
Private m_ptTabOri As Point3d
|
||||
Private m_ptRawMin As Point3d
|
||||
Private m_ptRawMax As Point3d
|
||||
' Parametri P1 acquisito
|
||||
Private m_ptTipP1 As Point3d
|
||||
Private m_vtToolP1 As Vector3d
|
||||
' Parametri P2 acquisito
|
||||
Private m_ptTipP2 As Point3d
|
||||
Private m_vtToolP2 As Vector3d
|
||||
' Parametri della lavorazione
|
||||
Private m_bCutOk As Boolean = False
|
||||
Private m_dDepth As Double = 0
|
||||
Private m_dOffsetSquaring As Double = 150
|
||||
Private m_dExtraLength As Double = 0
|
||||
Private m_dAngO As Double = 180
|
||||
Private m_dAngV As Double = 0
|
||||
Private m_nNumX As Integer = 0
|
||||
Private m_dDimX As Double = 0
|
||||
Private m_nNumY As Integer = 0
|
||||
Private m_dDimY As Double = 0
|
||||
Private m_bHeadSide As Boolean = False
|
||||
|
||||
' Punto selezionato nel disegno
|
||||
Private m_ptPrev As Point3d
|
||||
' Layer per crocette temporanee
|
||||
Private m_nTempLay As Integer = GDB_ID.NULL
|
||||
|
||||
' Costanti
|
||||
Private Const MAX_TAB_DEPTH As Double = 10.0
|
||||
Private Const MIN_CUT_LEN As Double = 10.0
|
||||
Private Const MAX_SIDE_ANG As Double = 60.0
|
||||
|
||||
'Costante che indica il lato in cui posizionare i tagli
|
||||
Private Enum CutSide As Integer
|
||||
Left
|
||||
Right
|
||||
End Enum
|
||||
|
||||
Private Sub GridCut_Initialized(sender As Object, e As EventArgs) Handles Me.Initialized
|
||||
OffsetTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 28)
|
||||
' 90260=Extra length
|
||||
ExtraLenTxBl.Text = EgtMsg(90260)
|
||||
SimulBtn.ToolTip = EgtMsg(MSG_CADCUTPAGEUC + 1)
|
||||
OkBtn.ToolTip = EgtMsg(MSG_DIRECTCUTPAGEUC + 30)
|
||||
|
||||
' Carico i dati dell'ultimo taglio
|
||||
m_dOffsetSquaring = GetPrivateProfileDouble(S_DIRECTCUTS, K_DC_OFFSET_SQUARING, m_dOffsetSquaring, m_MainWindow.GetIniFile())
|
||||
m_dExtraLength = GetPrivateProfileDouble(S_DIRECTCUTS, K_DC_EXTRA_LEN_SQUARING, m_dExtraLength, m_MainWindow.GetIniFile())
|
||||
m_dDepth = 0
|
||||
m_dAngO = 90
|
||||
m_dAngV = GetPrivateProfileDouble(S_DIRECTCUTS, K_DC_GRID_ANGV, m_dAngV, m_MainWindow.GetIniFile())
|
||||
m_nNumX = 1
|
||||
m_dDimX = GetPrivateProfileDouble(S_DIRECTCUTS, K_DC_GRID_DIMX, m_dDimX, m_MainWindow.GetIniFile())
|
||||
m_nNumY = 1
|
||||
m_dDimY = GetPrivateProfileDouble(S_DIRECTCUTS, K_DC_GRID_DIMY, m_dDimY, m_MainWindow.GetIniFile())
|
||||
m_bHeadSide = False
|
||||
End Sub
|
||||
|
||||
Private Sub Squaring_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded
|
||||
' Attivo la pagina
|
||||
m_CurrProjPage = m_MainWindow.m_CurrentProjectPageUC
|
||||
m_bActive = True
|
||||
' Se rientro da simulazione
|
||||
If m_bSimul Then
|
||||
m_bSimul = False
|
||||
' Disabilito registrazione progetto modificato
|
||||
EgtDisableModified()
|
||||
m_MainWindow.m_DirectCutPageUC.m_bShowMachine = False
|
||||
EgtSetMachineLook(MCH_LOOK.TAB)
|
||||
EgtDraw()
|
||||
Return
|
||||
End If
|
||||
' Disabilito registrazione progetto modificato
|
||||
EgtDisableModified()
|
||||
' Creo layer temporaneo per crocette
|
||||
m_nTempLay = EgtCreateGroup(GDB_ID.ROOT)
|
||||
EgtSetLevel(m_nTempLay, GDB_LV.TEMP)
|
||||
' Origine tavola
|
||||
m_bRawOk = True
|
||||
If Not EgtGetTableRef(1, m_ptTabOri) Then
|
||||
m_bRawOk = False
|
||||
EgtOutLog("Error on TableRef1")
|
||||
End If
|
||||
|
||||
' Dati del grezzo
|
||||
If Not GetRawBox(m_ptRawMin, m_ptRawMax) Then
|
||||
m_bRawOk = False
|
||||
EgtOutLog("Error on RawBox")
|
||||
End If
|
||||
' calcolo lalavorazione di squadratura
|
||||
RefreshSquaring()
|
||||
End Sub
|
||||
|
||||
Private Sub RefreshSquaring()
|
||||
If Not m_bRawOk Then Return
|
||||
|
||||
Dim m_ThickSaw As Double
|
||||
EgtTdbGetCurrToolParam(MCH_TP.THICK, m_ThickSaw)
|
||||
|
||||
m_dDepth = CamAuto.GetRawHeight()
|
||||
m_dDimX = Math.Abs(m_ptRawMax.x - m_ptRawMin.x) - 2 * (m_dOffsetSquaring)
|
||||
m_dDimY = Math.Abs(m_ptRawMax.y - m_ptRawMin.y) - 2 * (m_dOffsetSquaring)
|
||||
|
||||
Dim ptStart As New Point3d(m_ptRawMin.x + m_dOffsetSquaring - m_ThickSaw, m_ptRawMin.y + m_dOffsetSquaring, m_ptRawMin.z)
|
||||
Dim ptEnd As New Point3d(ptStart.x + m_dDimX, ptStart.y, m_ptRawMin.z)
|
||||
|
||||
SetCoordVisibility(True)
|
||||
ShowCoord()
|
||||
|
||||
OffsetTxBx.Text = LenToString(m_dOffsetSquaring, 1)
|
||||
ExtraLenTxBx.Text = LenToString(m_dExtraLength, 1)
|
||||
m_bCutOk = False
|
||||
UpdateSimulOkBtn()
|
||||
|
||||
SquaringPoint(ptStart, ptEnd)
|
||||
m_ptPrev = ptStart
|
||||
End Sub
|
||||
|
||||
Friend Sub Squaring_Unloaded(sender As Object, e As RoutedEventArgs) Handles Me.Unloaded
|
||||
' Salvo i dati correnti
|
||||
' Salvo i dati correnti
|
||||
WritePrivateProfileString(S_DIRECTCUTS, K_DC_OFFSET_SQUARING, DoubleToString(m_dOffsetSquaring, 2), m_MainWindow.GetIniFile())
|
||||
WritePrivateProfileString(S_DIRECTCUTS, K_DC_EXTRA_LEN_SQUARING, DoubleToString(m_dExtraLength, 2), m_MainWindow.GetIniFile())
|
||||
' Se non vado in simulazione
|
||||
If Not m_bSimul Then
|
||||
' Dichiaro sottopagina da non riattivare
|
||||
m_MainWindow.m_DirectCutPageUC.m_ControlsDirectCutUC.m_ActiveDirectCutPage = ControlsDirectCutUC.DirectCutPages.DirectCut
|
||||
' Rimuovo layer temporaneo per crocette
|
||||
EgtErase(m_nTempLay)
|
||||
' Rimuovo eventuale pezzo per taglio diretto
|
||||
EraseDirectCutPart()
|
||||
' Riattivo eventuali lavorazioni presenti
|
||||
ActivateAllMachinings()
|
||||
' Abilito registrazione progetto modificato
|
||||
EgtEnableModified()
|
||||
' Nascondo la macchina
|
||||
m_MainWindow.m_DirectCutPageUC.m_bShowMachine = False
|
||||
EgtSetMachineLook(MCH_LOOK.TAB)
|
||||
EgtDraw()
|
||||
End If
|
||||
' Dichiaro pagina non attiva
|
||||
m_bActive = False
|
||||
End Sub
|
||||
|
||||
Private Sub UpdateSimulOkBtn()
|
||||
If m_bCutOk Then
|
||||
SimulBtn.IsEnabled = True
|
||||
SimulBtn.Foreground = Brushes.Black
|
||||
OkBtn.IsEnabled = True
|
||||
OkBtn.Foreground = Brushes.Black
|
||||
Else
|
||||
SimulBtn.IsEnabled = False
|
||||
SimulBtn.Foreground = Brushes.DarkGray
|
||||
OkBtn.IsEnabled = False
|
||||
OkBtn.Foreground = Brushes.DarkGray
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub SquaringPoint(ptMin As Point3d, ptMax As Point3d)
|
||||
' Rimuovo eventuali crocette create acquisendo i punti nel disegno
|
||||
EgtEmptyGroup(m_nTempLay)
|
||||
' 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)
|
||||
'------------- BOTTOM LEFT -------------------
|
||||
' Assegno punto selezionato nel disegno a m_ptTipP1
|
||||
m_ptTipP1 = ptMin
|
||||
' Porto il tip nell'origine tavola
|
||||
m_ptTipP1.ToLoc(New Frame3d(m_ptTabOri))
|
||||
' Reimposto eventuale precedente utensile
|
||||
EgtSetCalcTool(sTool, sHead, nExit)
|
||||
'------------- TOP RIGHT -------------------
|
||||
' Assegno punto selezionato nel disegno a m_ptTipP2
|
||||
m_ptTipP2 = ptMax
|
||||
' Porto il tip nell'origine tavola
|
||||
m_ptTipP2.ToLoc(New Frame3d(m_ptTabOri))
|
||||
' Reimposto eventuale precedente utensile
|
||||
EgtSetCalcTool(sTool, sHead, nExit)
|
||||
|
||||
' Se il secondo punto non coincide con il primo, disegno il taglio
|
||||
Dim vtDiff As Vector3d = m_ptTipP2 - m_ptTipP1
|
||||
vtDiff.z = 0
|
||||
Dim dLen As Double
|
||||
Dim dAngVertDeg As Double
|
||||
Dim dAngOrizzDeg As Double
|
||||
vtDiff.ToSpherical(dLen, dAngVertDeg, dAngOrizzDeg)
|
||||
If dLen > EPS_SMALL Then
|
||||
m_dAngO = dAngOrizzDeg
|
||||
CreateGridCut()
|
||||
' visuliazzo tavola
|
||||
m_MainWindow.m_DirectCutPageUC.m_bShowMachine = False
|
||||
EgtSetMachineLook(MCH_LOOK.TAB)
|
||||
EgtDraw()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub OffsetTxBx_EgtClosed(sender As Object, e As EventArgs) Handles OffsetTxBx.EgtClosed
|
||||
' Verifico che l'offset impostato non sia superiore a quello massimo
|
||||
Dim dMaxOffset As Double = Math.Min(m_dDimX, m_dDimY) / 2 - 15
|
||||
Dim dOffset As Double = 0
|
||||
StringToLen(OffsetTxBx.Text, dOffset)
|
||||
If dOffset < 0 Then
|
||||
dOffset = 0
|
||||
ElseIf dOffset > dMaxOffset Then
|
||||
dOffset = dMaxOffset
|
||||
End If
|
||||
m_dOffsetSquaring = dOffset
|
||||
OffsetTxBx.Text = LenToString(m_dOffsetSquaring, 2)
|
||||
' Disegno il taglio
|
||||
RefreshSquaring()
|
||||
EgtDraw()
|
||||
End Sub
|
||||
|
||||
Private Sub ExtraLength_EgtClosed(sender As Object, e As EventArgs) Handles ExtraLenTxBx.EgtClosed
|
||||
' Verifico che il valore indicato sia almeno maggiore dell'offset indicato
|
||||
Dim dOffset As Double = 0
|
||||
StringToLen(OffsetTxBx.Text, dOffset)
|
||||
Dim MadExtraLeng As Double = Math.Abs(dOffset)
|
||||
Dim dExtraLen As Double
|
||||
StringToLen(ExtraLenTxBx.Text, dExtraLen)
|
||||
If dExtraLen < 0 AndAlso dExtraLen < -MadExtraLeng Then
|
||||
dExtraLen = 0
|
||||
End If
|
||||
m_dExtraLength = dExtraLen
|
||||
ExtraLenTxBx.Text = LenToString(m_dExtraLength, 2)
|
||||
' Disegno il taglio
|
||||
RefreshSquaring()
|
||||
EgtDraw()
|
||||
End Sub
|
||||
|
||||
Private Sub SimulBtn_Click(sender As Object, e As RoutedEventArgs) Handles SimulBtn.Click
|
||||
' Verifico ci sia un taglio valido
|
||||
If Not m_bCutOk Then Return
|
||||
' Salvo il progetto con le lavorazioni
|
||||
EgtSetCurrentContext(m_CurrProjPage.CurrentProjectScene.GetCtx())
|
||||
Dim sMchPath As String = m_MainWindow.GetTempDir() & "\" & "DirectProj.nge"
|
||||
m_MainWindow.m_CurrentProjectPageUC.SaveFile(sMchPath, False)
|
||||
' Predispongo passaggio a simulazione
|
||||
m_bSimul = True
|
||||
m_CurrProjPage.m_SceneButtons.MeasureBtn.IsChecked = False
|
||||
m_CurrProjPage.CurrProjGrid.Visibility = Windows.Visibility.Hidden
|
||||
m_MainWindow.m_DirectCutPageUC.m_ControlsDirectCutUC.LeftButtonGrid.Children.Remove(Me)
|
||||
m_CurrProjPage.CurrentProjectPageGrid.Children.Remove(m_MainWindow.m_DirectCutPageUC)
|
||||
m_MainWindow.m_PrevActivePage = MainWindow.Pages.DirectCut
|
||||
m_CurrProjPage.CurrentProjectPageGrid.Children.Add(m_MainWindow.m_SimulationPage)
|
||||
m_MainWindow.m_ActivePage = MainWindow.Pages.Simulation
|
||||
End Sub
|
||||
|
||||
Private Sub OkBtn_Click(sender As Object, e As RoutedEventArgs) Handles OkBtn.Click
|
||||
#If TRIAL Then
|
||||
m_CurrProjPage.SetWarningMessage("Trial Version")
|
||||
#Else
|
||||
' Verifico non sia versione Ufficio
|
||||
If m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.OFFICE_TYPE) Then
|
||||
m_CurrProjPage.SetWarningMessage("Office Version")
|
||||
Return
|
||||
End If
|
||||
' Verifico ci sia un taglio valido
|
||||
If Not m_bCutOk Then Return
|
||||
' Salvo il progetto con le lavorazioni
|
||||
Dim sMchPath As String = m_MainWindow.GetTempDir() & "\" & "DirectProj.nge"
|
||||
m_MainWindow.m_CurrentProjectPageUC.SaveFile(sMchPath, False)
|
||||
' Genero file CNC (lancio anche se errore in precedenza)
|
||||
Dim sCncPath As String = m_MainWindow.GetCncDir() & "\DirectCut" & m_MainWindow.m_CurrentMachine.sIsoFileExt
|
||||
Dim bOk As Boolean = EgtGenerate(sCncPath, "OmagCut ver." & m_MainWindow.GetVersion())
|
||||
' Se errore in generazione, segnalo l'errore ed esco
|
||||
If Not bOk Then
|
||||
m_CurrProjPage.SetErrorMessage(EgtMsg(90314)) 'Errore nella generazione del programma CN
|
||||
Return
|
||||
End If
|
||||
Dim sNameProg As Integer = 900
|
||||
sNameProg = GetPrivateProfileInt(S_PARTPROGRAM, "NameProg", sNameProg, m_MainWindow.GetMachIniFile)
|
||||
' Download programma (eventuali errori sono segnalati dalla funzione)
|
||||
If m_MainWindow.m_CNCommunication.SendProgram(sCncPath, sNameProg) Then
|
||||
' copio il progetto corrente come progetto in lavorazione
|
||||
Dim sWrkPath As String = m_MainWindow.GetTempDir() & "\" & "WorkProj.nge"
|
||||
My.Computer.FileSystem.CopyFile(sMchPath, sWrkPath, True)
|
||||
' lancio eventuale lua post-trasmissione
|
||||
m_MainWindow.ExecSentProgScript(True)
|
||||
End If
|
||||
#End If
|
||||
End Sub
|
||||
|
||||
Private Sub ExitBtn_Click(sender As Object, e As RoutedEventArgs) Handles ExitBtn.Click
|
||||
m_MainWindow.m_DirectCutPageUC.m_ControlsDirectCutUC.LeftButtonGrid.Children.Remove(Me)
|
||||
End Sub
|
||||
|
||||
Private Function CreateGridCut() As Boolean
|
||||
' Verifico sia definito il punto iniziale e il grezzo
|
||||
If Not m_bRawOk Then
|
||||
m_bCutOk = False
|
||||
Return False
|
||||
End If
|
||||
' Spessore grezzo
|
||||
Dim dRawHeight As Double = m_ptRawMax.z - m_ptRawMin.z
|
||||
' Rimuovo eventuale vecchio pezzo per taglio diretto
|
||||
EraseDirectCutPart()
|
||||
' Disattivo eventuali lavorazioni presenti
|
||||
DeactivateAllMachinings()
|
||||
' Creo nuovo pezzo per il taglio diretto
|
||||
Dim nPartId = EgtCreateGroup(GDB_ID.ROOT)
|
||||
EgtSetName(nPartId, NAME_DIRECTCUT)
|
||||
Dim nLayerId = EgtCreateGroup(nPartId)
|
||||
EgtSetName(nLayerId, NAME_OUTLOOP)
|
||||
' Creo il taglio parallelo alla lama
|
||||
Dim ptStart As Point3d = m_ptTipP1
|
||||
ptStart.z = 0
|
||||
' Funzione che crea i tagli successivi al primo
|
||||
MultiplyCut(nLayerId)
|
||||
' Calcolo punto di inserimento nel grezzo
|
||||
Dim ptMin, ptMax As Point3d
|
||||
EgtGetBBoxGlob(nPartId, GDB_BB.STANDARD, ptMin, ptMax)
|
||||
Dim ptIns As Point3d = ptMin + (m_ptTabOri - m_ptRawMin)
|
||||
ptIns.z = dRawHeight
|
||||
' Inserisco il pezzo nel grezzo
|
||||
EgtAddPartToRawPart(nPartId, ptIns, m_MainWindow.m_CurrentProjectPageUC.m_nRawId)
|
||||
' Inserisco la lavorazione
|
||||
m_bCutOk = AddMachinings(nPartId) AndAlso UpdateAllMachiningsToolpaths()
|
||||
EgtSetCurrPhase(1)
|
||||
' Eventuale eliminazione Home finale
|
||||
If Not m_MainWindow.m_CurrentMachine.bDirectCutsFinalHome Then
|
||||
RemoveFinalHome()
|
||||
End If
|
||||
UpdateSimulOkBtn()
|
||||
Return m_bCutOk
|
||||
End Function
|
||||
|
||||
Private Function MultiplyCut(nLayerId As Integer) As Boolean
|
||||
' Recupero lo spessore del taglio della lama o del waterjet correntemente attiva
|
||||
Dim nType As Integer = 0
|
||||
EgtTdbGetCurrToolParam(MCH_TP.TYPE, nType)
|
||||
Dim dThick As Double = 0
|
||||
EgtTdbGetCurrToolParam(If(nType = MCH_TY.SAW_STD, MCH_TP.THICK, MCH_TP.DIAM), dThick)
|
||||
EgtOutLog("Curr tool type in use for squaring: " & If(nType = MCH_TY.SAW_STD, "SAW_STD", "NOT 'SAW_STD'"))
|
||||
' Ricalcolo lo spessore in base all'inclinazione
|
||||
dThick = dThick / Math.Cos(m_dAngV * Math.PI / 180)
|
||||
' Imposto angolo di rotazione a seconda del lato dei tagli paralleli
|
||||
Dim dRotAngOX As Double = 90
|
||||
' Recupero dati da interfaccia
|
||||
Dim dDimPzX As Double = m_dDimX
|
||||
Dim nNumPzX As Integer = m_nNumX
|
||||
Dim dDimPzY As Double = m_dDimY
|
||||
Dim nNumPzY As Integer = m_nNumY
|
||||
' Definisco vettore di spostamento
|
||||
Dim vtDelta As Vector3d
|
||||
' Calcolo primo taglio parallelo
|
||||
Dim ptStart As Point3d = m_ptTipP1
|
||||
ptStart.z = 0
|
||||
If dDimPzY <> 0 And nNumPzY > 0 And dDimPzX <> 0 And nNumPzX > 0 Then
|
||||
Dim dLenX As Double = dThick + (dDimPzX + dThick) * nNumPzX
|
||||
Dim nCutParaId = EgtCreateLinePDL(nLayerId, ptStart, m_dAngO, dLenX + 0.1)
|
||||
' Imposto affondamento e angolo di fianco sul taglio (solo se non lama STD)
|
||||
If Not nType = MCH_TY.SAW_STD Then
|
||||
EgtSetInfo(nCutParaId, INFO_DEPTH, m_dDepth)
|
||||
EgtSetInfo(nCutParaId, INFO_SIDE_ANGLE, m_dAngV)
|
||||
EgtOutLog("Curr tool in use is not of type SAW_STD: Depth is limited to raw thickness")
|
||||
End If
|
||||
' Allungo la geometria
|
||||
EgtExtendCurveStartByLen(nCutParaId, m_dOffsetSquaring + m_dExtraLength)
|
||||
EgtExtendCurveEndByLen(nCutParaId, m_dOffsetSquaring + +m_dExtraLength)
|
||||
' Calcolo vettore di spostamento
|
||||
vtDelta = Vector3d.FromPolar((dDimPzY + dThick), m_dAngO)
|
||||
' Ruoto il vettore di traslazione
|
||||
vtDelta.Rotate(Vector3d.Z_AX, dRotAngOX)
|
||||
For Index As Integer = 1 To nNumPzY
|
||||
Dim vtPerpMove As Vector3d = Index * vtDelta
|
||||
' Creo copie
|
||||
Dim nCut2Id = EgtCopyGlob(nCutParaId, nLayerId)
|
||||
EgtMove(nCut2Id, vtPerpMove, GDB_RT.GLOB)
|
||||
Next
|
||||
' Calcolo primo taglio perpendicolare
|
||||
Dim dLenY As Double = dThick + (dDimPzY + dThick) * nNumPzY
|
||||
' Arretro il punto di partenza di uno spessore lama
|
||||
Dim vtDeltaPos As Vector3d = Vector3d.FromPolar(dThick + 0.1, m_dAngO - 90)
|
||||
Dim nCutPerpId = EgtCreateLinePDL(nLayerId, ptStart + vtDeltaPos, m_dAngO + 90, dLenY + 0.2)
|
||||
' Imposto affondamento e angolo di fianco sul taglio
|
||||
EgtSetInfo(nCutPerpId, INFO_DEPTH, m_dDepth)
|
||||
EgtSetInfo(nCutPerpId, INFO_SIDE_ANGLE, m_dAngV)
|
||||
' Allungo la geometria
|
||||
EgtExtendCurveStartByLen(nCutPerpId, m_dOffsetSquaring + m_dExtraLength)
|
||||
EgtExtendCurveEndByLen(nCutPerpId, m_dOffsetSquaring + +m_dExtraLength)
|
||||
' Calcolo secondo vettore di spostamento
|
||||
vtDelta = Vector3d.FromPolar((dDimPzX + dThick), m_dAngO)
|
||||
For Index As Integer = 1 To nNumPzX
|
||||
Dim vtPerpMove As Vector3d = vtDelta * Index
|
||||
' Creo copie
|
||||
Dim nCut3Id = EgtCopyGlob(nCutPerpId, nLayerId)
|
||||
EgtMove(nCut3Id, vtPerpMove, GDB_RT.GLOB)
|
||||
Next
|
||||
End If
|
||||
Return True
|
||||
End Function
|
||||
|
||||
Private Sub SetCoordVisibility(bShow As Boolean)
|
||||
XcoordTxBl.Visibility = If(bShow, Windows.Visibility.Visible, Windows.Visibility.Hidden)
|
||||
XcoordTxBx.Visibility = If(bShow, Windows.Visibility.Visible, Windows.Visibility.Hidden)
|
||||
YcoordTxBl.Visibility = If(bShow, Windows.Visibility.Visible, Windows.Visibility.Hidden)
|
||||
YcoordTxBx.Visibility = If(bShow, Windows.Visibility.Visible, Windows.Visibility.Hidden)
|
||||
End Sub
|
||||
|
||||
Private Sub ShowCoord()
|
||||
Dim ptText As Point3d = m_ptPrev
|
||||
ptText.ToLoc(New Frame3d(m_ptTabOri))
|
||||
XcoordTxBx.Text = LenToString(ptText.x, 2)
|
||||
YcoordTxBx.Text = LenToString(ptText.y, 2)
|
||||
End Sub
|
||||
|
||||
Private Function SetMachineInCurrPos() As Boolean
|
||||
' Recupero la posizione macchina
|
||||
Dim dL1, dL2, dL3, dR1, dR2 As Double
|
||||
If Not m_MainWindow.m_CNCommunication.GetAxesPositions(dL1, dL2, dL3, dR1, dR2) Then Return False
|
||||
' Recupero il nome degli assi macchina
|
||||
Dim sL1 As String = String.Empty
|
||||
Dim sL2 As String = String.Empty
|
||||
Dim sL3 As String = String.Empty
|
||||
Dim sR1 As String = String.Empty
|
||||
Dim sR2 As String = String.Empty
|
||||
If Not m_MainWindow.m_CNCommunication.GetAxesNames(sL1, sL2, sL3, sR1, sR2) Then Return False
|
||||
' Visualizzo macchina in posizione
|
||||
EgtSetAxisPos(sL1, dL1)
|
||||
EgtSetAxisPos(sL2, dL2)
|
||||
EgtSetAxisPos(sL3, dL3)
|
||||
EgtSetAxisPos(sR1, dR1)
|
||||
EgtSetAxisPos(sR2, dR2)
|
||||
Return True
|
||||
End Function
|
||||
|
||||
End Class
|
||||
|
||||
@@ -22,6 +22,9 @@ Public Class VacuumMachineButtonUC
|
||||
Friend m_CN As CN_generico
|
||||
Private m_bFirst As Boolean = True
|
||||
|
||||
' visualizzo l'elenco degli elementi della pagina sono al primo avvio
|
||||
Friend m_OutLogTypeButton As Boolean = True
|
||||
|
||||
' Creazione converter da String a ImageSource
|
||||
Dim ImageConverter As New ImageSourceConverter
|
||||
|
||||
@@ -71,10 +74,37 @@ Public Class VacuumMachineButtonUC
|
||||
If Not IsNothing(ButtonToAdd) Then m_ButtonList.Add(ButtonToAdd)
|
||||
End If
|
||||
End While
|
||||
|
||||
For Each MachineButton As MachineButton In m_ButtonList
|
||||
OutLogTypeButton(MachineButton)
|
||||
Next
|
||||
m_OutLogTypeButton = False
|
||||
|
||||
NotifyPropertyChanged("ButtonList")
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#Region "STATE CHANGED"
|
||||
' ------------------------------------------------------------------------------
|
||||
' i segeunti metodi notificano il cambiamento di stato di specifici bottoni
|
||||
'-------------------------------------------------------------------------------
|
||||
|
||||
Friend Sub OutLogTypeButton(CurrMachineButton As MachineButton)
|
||||
If Not m_OutLogTypeButton Then Return
|
||||
Dim BtnType As Type = CurrMachineButton.GetType
|
||||
If BtnType Is GetType(NoStateButton) Then
|
||||
EgtOutLog(" ► " & BtnType.ToString.Replace("OmagCUT.", "(0) ") & " , " & CurrMachineButton.StateFlag)
|
||||
ElseIf BtnType Is GetType(TwoStateButton) Then
|
||||
EgtOutLog(" ► " & BtnType.ToString.Replace("OmagCUT.", "(1) ") & " , " & CurrMachineButton.StateFlag)
|
||||
ElseIf BtnType Is GetType(ThreeStateButton) Then
|
||||
EgtOutLog(" ► " & BtnType.ToString.Replace("OmagCUT.", "(2) ") & " , " & CurrMachineButton.StateFlag)
|
||||
ElseIf BtnType Is GetType(DoubleCommandButton) Then
|
||||
EgtOutLog(" ► " & BtnType.ToString.Replace("OmagCUT.", "(3) ") & " , " & CurrMachineButton.StateFlag)
|
||||
ElseIf BtnType Is GetType(PressedCommandButton) Then
|
||||
EgtOutLog(" ► " & BtnType.ToString.Replace("OmagCUT.", "(4) ") & " , " & CurrMachineButton.StateFlag)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Friend Sub VacuumUpChanged(VacuumUpState As Boolean)
|
||||
Dim VacuumUpButton As TwoStateButton = Nothing
|
||||
For Each MachineButton As MachineButton In m_ButtonList
|
||||
@@ -371,6 +401,8 @@ Public Class VacuumMachineButtonUC
|
||||
Next
|
||||
End Sub
|
||||
|
||||
#End Region ' State Range
|
||||
|
||||
Public Function GetPrivateProfileMachineButtons(
|
||||
ByVal lpAppName As String,
|
||||
ByVal lpKeyName As String,
|
||||
|
||||
@@ -199,12 +199,12 @@
|
||||
Visibility="Collapsed"
|
||||
Grid.Column="2" Grid.Row="1"
|
||||
HorizontalAlignment="Right"
|
||||
Width="60" Height="30" Margin="0,0,0,0"
|
||||
Width="60" Height="30" Margin="0,0,0,0" IsLength="False"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="Parameter2FTxBx"
|
||||
Grid.Column="3" Grid.Row="1"
|
||||
HorizontalAlignment="Right"
|
||||
Width="60" Height="30" Margin="0,0,0,0"
|
||||
Width="60" Height="30" Margin="0,0,0,0" IsLength="False"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
|
||||
<!-- Spessore aletta -->
|
||||
|
||||
@@ -96,8 +96,14 @@ Public Class AlzFrontUC
|
||||
Dim LabelId As Integer = GDB_ID.NULL
|
||||
|
||||
' definisco i valori delle altezza e degli angoli di spoglia per le alzatine e i frontalini (letti da file ini del programma)
|
||||
GetPrivateProfileString(S_ALZFRONT, K_ALZ_HEIGHT, "0", Parameter1ATxBx.Text, m_MainWindow.GetIniFile)
|
||||
GetPrivateProfileString(S_ALZFRONT, K_FRONT_HEIGHT, "0", Parameter1FTxBx.Text, m_MainWindow.GetIniFile)
|
||||
Dim sVal As String = String.Empty
|
||||
Dim dVal As Double = 0
|
||||
GetPrivateProfileString(S_ALZFRONT, K_ALZ_HEIGHT, "0", sVal, m_MainWindow.GetIniFile)
|
||||
Utility.StringToDouble(sVal, dVal)
|
||||
Parameter1ATxBx.Text = Utility.LenToString(dVal, 4)
|
||||
GetPrivateProfileString(S_ALZFRONT, K_FRONT_HEIGHT, "0", sVal, m_MainWindow.GetIniFile)
|
||||
Utility.StringToDouble(sVal, dVal)
|
||||
Parameter1FTxBx.Text = Utility.LenToString(dVal, 4)
|
||||
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)
|
||||
@@ -607,9 +613,9 @@ Public Class AlzFrontUC
|
||||
Private Sub ParameterA1TxBx_EgtClosed(sender As Object, e As EventArgs) Handles Parameter1ATxBx.EgtClosed
|
||||
' Nuovo angolo di inclinazione
|
||||
Dim dValue As Double
|
||||
StringToDouble(Parameter1ATxBx.Text, dValue)
|
||||
StringToLen(Parameter1ATxBx.Text, dValue)
|
||||
' salvo il valore nel file ini e inserisco il valore nel file lua
|
||||
WritePrivateProfileString("Alz&Front", "A_Height", Parameter1ATxBx.Text, m_MainWindow.GetIniFile())
|
||||
WritePrivateProfileString("Alz&Front", "A_Height", DoubleToString(dValue, 3), m_MainWindow.GetIniFile())
|
||||
' aggiorno il disegno
|
||||
LoadCurrentCompo()
|
||||
End Sub
|
||||
@@ -618,9 +624,9 @@ Public Class AlzFrontUC
|
||||
Private Sub Parameter1FTxBx_EgtClosed(sender As Object, e As EventArgs) Handles Parameter1FTxBx.EgtClosed
|
||||
' Nuovo angolo di inclinazione
|
||||
Dim dValue As Double
|
||||
StringToDouble(Parameter1FTxBx.Text, dValue)
|
||||
StringToLen(Parameter1FTxBx.Text, dValue)
|
||||
' salvo il valore nel file ini e inserisco il valore nel file lua
|
||||
WritePrivateProfileString("Alz&Front", "F_Height", Parameter1FTxBx.Text, m_MainWindow.GetIniFile())
|
||||
WritePrivateProfileString("Alz&Front", "F_Height", DoubleToString(dValue, 3), m_MainWindow.GetIniFile())
|
||||
' aggiorno il disegno
|
||||
LoadCurrentCompo()
|
||||
End Sub
|
||||
|
||||
@@ -37,7 +37,7 @@ Public Class CompoDimensionUC
|
||||
InternComponentBtn.Content = EgtMsg(MSG_COMPONENTPAGEUC + 47) ' Componenti interni
|
||||
If Not String.IsNullOrEmpty(sCompoDir) Then
|
||||
bEnableAlzFront = True
|
||||
AlzFrontBtn.Content = "Alzatine & Frontalini"
|
||||
AlzFrontBtn.Content = EgtMsg(91137)
|
||||
Else
|
||||
AlzFrontBtn.Visibility = Visibility.Collapsed
|
||||
End If
|
||||
@@ -75,6 +75,7 @@ Public Class CompoDimensionUC
|
||||
m_DrawPage.sCompoName.StartsWith("PBagno") Then
|
||||
ShowInternalBtn(True)
|
||||
ShowAlzFrontBtn(bEnableAlzFront)
|
||||
m_DrawPage.MessageGrid.Visibility = Visibility.Hidden
|
||||
Else
|
||||
ShowInternalBtn(False)
|
||||
ShowAlzFrontBtn(False)
|
||||
@@ -106,8 +107,10 @@ Public Class CompoDimensionUC
|
||||
Friend Sub ShowAlzFrontBtn(ByVal value As Boolean)
|
||||
If value Then
|
||||
AlzFrontBtn.Visibility = Visibility.Visible
|
||||
m_MainWindow.m_DrawPageUC.MessageGrid.Visibility = Visibility.Hidden
|
||||
Else
|
||||
AlzFrontBtn.Visibility = Visibility.Hidden
|
||||
m_MainWindow.m_DrawPageUC.MessageGrid.Visibility = Visibility.Visible
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
@@ -124,7 +124,7 @@
|
||||
|
||||
<TextBlock Name="PartNumTxBl" Grid.Column="0" Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"
|
||||
TextAlignment="Right"/>
|
||||
<EgtWPFLib:EgtTextBox Name="PartNumTxBx" Grid.Column="1" Width="60"
|
||||
<EgtWPFLib:EgtTextBox Name="PartNumTxBx" Grid.Column="1" Width="60" IsLength="False"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
|
||||
</Grid>
|
||||
|
||||
+145
-28
@@ -283,6 +283,19 @@ Public Class DrawPageUC
|
||||
m_sCsvOrder = ""
|
||||
m_sCsvList = ""
|
||||
m_sCsvName = ""
|
||||
|
||||
' Visuliazzazione dei bottoni per modifica dei componenti
|
||||
If m_MainWindow.FrameCutBtn.IsChecked Then
|
||||
SideAngleBtn.Visibility = Visibility.Hidden
|
||||
FiloTopBtn.Visibility = Visibility.Hidden
|
||||
EngraveBtn.Visibility = Visibility.Hidden
|
||||
DripCutBtn.Visibility = Visibility.Hidden
|
||||
Else
|
||||
SideAngleBtn.Visibility = Visibility.Visible
|
||||
FiloTopBtn.Visibility = Visibility.Visible
|
||||
EngraveBtn.Visibility = Visibility.Visible
|
||||
DripCutBtn.Visibility = Visibility.Visible
|
||||
End If
|
||||
End Sub
|
||||
|
||||
' recupero il click sulla scena ed assegno il metodo a secondo della pagina aperta
|
||||
@@ -553,6 +566,7 @@ Public Class DrawPageUC
|
||||
OkBtn.IsEnabled = True
|
||||
End Sub
|
||||
|
||||
' Navigazione nelle due pagine per la selezione dei componenti da disegnare
|
||||
Friend Sub BackBtn_Click(sender As Object, e As RoutedEventArgs) Handles BackBtn.Click
|
||||
m_SceneButtons.MeasureBtn.IsChecked = False
|
||||
DrawPage_Unloaded(sender, e)
|
||||
@@ -644,10 +658,17 @@ Public Class DrawPageUC
|
||||
m_CompoDimension.GetNameEdit(j).Text = m_CVars(i - 1).m_sName
|
||||
m_CompoDimension.GetNameEdit(j).Visibility = Windows.Visibility.Visible
|
||||
m_CompoDimension.GetValueEdit(j).Text = m_CVars(i - 1).ToString()
|
||||
'Dim dVal As Double
|
||||
'StringToLen(m_CVars(i - 1).ToString(), dVal)
|
||||
'm_CompoDimension.GetValueEdit(j).Text = LenToString(dVal, 3)
|
||||
m_CompoDimension.GetValueEdit(j).Visibility = Windows.Visibility.Visible
|
||||
If m_CVars(i - 1).m_nType = 5 Then
|
||||
TryCast(m_CompoDimension.GetValueEdit(j), EgtTextBox).Keyboard = EgtTextBox.KeyboardType.Alphanumeric
|
||||
TryCast(m_CompoDimension.GetValueEdit(j), EgtTextBox).KeyboardDimension = 600
|
||||
ElseIf m_CVars(i - 1).m_nType = 4 Then
|
||||
TryCast(m_CompoDimension.GetValueEdit(j), EgtTextBox).Keyboard = EgtTextBox.KeyboardType.Calculator
|
||||
TryCast(m_CompoDimension.GetValueEdit(j), EgtTextBox).IsLength = False
|
||||
TryCast(m_CompoDimension.GetValueEdit(j), EgtTextBox).KeyboardDimension = 300
|
||||
Else
|
||||
TryCast(m_CompoDimension.GetValueEdit(j), EgtTextBox).Keyboard = EgtTextBox.KeyboardType.Calculator
|
||||
TryCast(m_CompoDimension.GetValueEdit(j), EgtTextBox).KeyboardDimension = 300
|
||||
@@ -1117,6 +1138,33 @@ Public Class DrawPageUC
|
||||
Return True
|
||||
End Function
|
||||
|
||||
Private Function MakeSectionFrameInsert(ByVal nNbr As Integer) As Boolean
|
||||
' m_MainWindow.m_ImportPageUC.LoadFrame()
|
||||
' recupero il primo layer del primo pezzo
|
||||
Dim nLayerId As Integer = EgtGetFirstLayer(EgtGetFirstPart())
|
||||
If nLayerId = GDB_ID.NULL Then Return False
|
||||
' percorso in cui salvare tempora
|
||||
Dim sTmpFile As String = m_MainWindow.GetTempDir() & "\Frame.Nge"
|
||||
If Not EgtSaveObjToFile(nLayerId, sTmpFile, NGE.BIN) Then Return False
|
||||
' Passo al contesto principale
|
||||
EgtSetCurrentContext(m_MainWindow.m_CurrentProjectPageUC.CurrentProjectScene.GetCtx())
|
||||
' Inserisco il pezzo
|
||||
If Not My.Computer.FileSystem.FileExists(sTmpFile) Then Return False
|
||||
' eseguo inserimento
|
||||
For i As Integer = 1 To nNbr
|
||||
EgtInsertFile(sTmpFile)
|
||||
' Ne recupero l'Id
|
||||
Dim nPartId As Integer = EgtGetLastPart()
|
||||
' Creo la cornice
|
||||
m_MainWindow.m_FrameCutPageUC.CreateFrame(nPartId)
|
||||
' Ricalcolo lavorazioni
|
||||
AddFrameMachinings(m_MainWindow.m_FrameCutPageUC.m_FrameMachiningUC.m_dStartTrim, m_MainWindow.m_FrameCutPageUC.m_FrameMachiningUC.m_dEndTrim)
|
||||
Next
|
||||
' Cancello il file
|
||||
My.Computer.FileSystem.DeleteFile(sTmpFile)
|
||||
Return True
|
||||
End Function
|
||||
|
||||
Private Sub OkBtn_Click(sender As Object, e As RoutedEventArgs) Handles OkBtn.Click
|
||||
m_bBackFromInternalCompo = False
|
||||
m_bInternalCompo = False
|
||||
@@ -1132,22 +1180,47 @@ Public Class DrawPageUC
|
||||
Dim InsNbr As Integer = Int32.Parse(PartNumTxBx.Text)
|
||||
' Passo al contesto principale
|
||||
'MakeInsert(InsNbr, sPartName)
|
||||
MakeMultipleInsert(InsNbr, sPartName)
|
||||
' Aggiorno ambiente principale
|
||||
EgtZoom(ZM.ALL)
|
||||
' Elimino nome del componente precedente
|
||||
m_sCompoName = String.Empty
|
||||
' Reset inclinazioni
|
||||
m_SideAngleUC.DeleteSideAngle()
|
||||
' Chiudo compo interni nel caso siano aperti
|
||||
LeftButtonGrd.Children.Remove(m_MainComponentPage.m_SecondaryComponentPage)
|
||||
LeftButtonGrd.Children.Remove(m_CompoDimension.m_InternalCompoPage)
|
||||
LeftButtonGrd.Children.Remove(m_CompoDimension.m_AlzFrontPage)
|
||||
' Istruzioni per chiudere ImportPageUC e aprire CadCutPageUC
|
||||
m_MainWindow.MainWindowGrid.Children.Remove(m_MainWindow.m_DrawPageUC)
|
||||
m_MainWindow.MainWindowGrid.Children.Add(m_MainWindow.m_CurrentProjectPageUC)
|
||||
m_MainWindow.m_ActivePage = MainWindow.Pages.CadCut
|
||||
If m_MainWindow.FrameCutBtn.IsChecked Then
|
||||
MakeSectionFrameInsert(InsNbr)
|
||||
Else
|
||||
MakeMultipleInsert(InsNbr, sPartName)
|
||||
End If
|
||||
' Attivo il parcheggio dei pezzi Draw (per il corretto posizionamento nella scena)
|
||||
ActivateParkIndZero()
|
||||
Dim bExitPage As Boolean = GetPrivateProfileInt(S_GENERAL, K_QUITDRAWPAGE, 1, m_MainWindow.GetIniFile) <> 0
|
||||
' Se Shift premuto eseguo il contrario
|
||||
If Keyboard.Modifiers And ModifierKeys.Shift Then
|
||||
bExitPage = Not bExitPage
|
||||
End If
|
||||
If bExitPage Then
|
||||
' Aggiorno ambiente principale
|
||||
EgtZoom(ZM.ALL)
|
||||
' Elimino nome del componente precedente
|
||||
m_sCompoName = String.Empty
|
||||
' Reset inclinazioni
|
||||
m_SideAngleUC.DeleteSideAngle()
|
||||
' Chiudo compo interni nel caso siano aperti
|
||||
LeftButtonGrd.Children.Remove(m_MainComponentPage.m_SecondaryComponentPage)
|
||||
LeftButtonGrd.Children.Remove(m_CompoDimension.m_InternalCompoPage)
|
||||
LeftButtonGrd.Children.Remove(m_CompoDimension.m_AlzFrontPage)
|
||||
' Istruzioni per chiudere ImportPageUC e aprire CadCutPageUC
|
||||
m_MainWindow.MainWindowGrid.Children.Remove(m_MainWindow.m_DrawPageUC)
|
||||
m_MainWindow.MainWindowGrid.Children.Add(m_MainWindow.m_CurrentProjectPageUC)
|
||||
m_MainWindow.m_ActivePage = If(m_MainWindow.FrameCutBtn.IsChecked, MainWindow.Pages.FrameCut, MainWindow.Pages.CadCut)
|
||||
Else
|
||||
m_SceneButtons.MeasureBtn.IsChecked = False
|
||||
DrawPage_Unloaded(sender, e)
|
||||
' Elimino nome del componente precedente
|
||||
m_sCompoName = String.Empty
|
||||
' Reset inclinazioni
|
||||
m_SideAngleUC.DeleteSideAngle()
|
||||
If String.IsNullOrEmpty(m_MainComponentPage.m_SecondaryComponentPage.m_sCurrCompo) Then
|
||||
DrawPage_Loaded(sender, e)
|
||||
Else
|
||||
LoadSecondaryPage()
|
||||
End If
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
' esco dalla pagina corrente
|
||||
@@ -1167,7 +1240,25 @@ Public Class DrawPageUC
|
||||
' Istruzioni per chiudere ImportPageUC e aprire CadCutPageUC
|
||||
m_MainWindow.MainWindowGrid.Children.Remove(m_MainWindow.m_DrawPageUC)
|
||||
m_MainWindow.MainWindowGrid.Children.Add(m_MainWindow.m_CurrentProjectPageUC)
|
||||
m_MainWindow.m_ActivePage = MainWindow.Pages.CadCut
|
||||
m_MainWindow.m_ActivePage = If(m_MainWindow.FrameCutBtn.IsChecked, MainWindow.Pages.FrameCut, MainWindow.Pages.CadCut)
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub ActivateParkIndZero()
|
||||
' Aggiorno la gestione dei parcheggi: spengo tutti i parcheggi tranne quello dei pezzi disegnati "0"
|
||||
Dim ListParkInd As New List(Of ParkInd)
|
||||
SelParkIndWD.LoadParkInd(ListParkInd)
|
||||
For Each ItemParkInd As ParkInd In ListParkInd
|
||||
If ItemParkInd.Ind = 0 Then
|
||||
ItemParkInd.Status = GDB_ST.ON_
|
||||
Else
|
||||
ItemParkInd.Status = GDB_ST.OFF
|
||||
End If
|
||||
Next
|
||||
' Aggiorno lo stato dei pezzi
|
||||
For Each Item As ParkInd In ListParkInd
|
||||
SelParkIndWD.SetStatusPartInParkInd(Item, False)
|
||||
Next
|
||||
End Sub
|
||||
|
||||
Private Sub TrfDataBtn_Click(sender As Object, e As RoutedEventArgs) Handles TrfDataBtn.Click
|
||||
@@ -1439,17 +1530,39 @@ Public Class DrawPageUC
|
||||
' Seleziono la Tab e la Page di apertura
|
||||
Select Case m_ActiveComponentPage
|
||||
Case Pages.MainComponent
|
||||
LeftButtonGrd.Children.Remove( m_MainComponentPage)
|
||||
LeftButtonGrd.Children.Remove(m_MainComponentPage)
|
||||
|
||||
Case Pages.SecondaryComponent
|
||||
LeftButtonGrd.Children.Remove( m_MainComponentPage.m_SecondaryComponentPage)
|
||||
LeftButtonGrd.Children.Remove(m_MainComponentPage.m_SecondaryComponentPage)
|
||||
|
||||
Case Pages.InternalComponent
|
||||
LeftButtonGrd.Children.Remove( m_MainWindow.m_DrawPageUC.m_CompoDimension.m_InternalCompoPage)
|
||||
LeftButtonGrd.Children.Remove(m_MainWindow.m_DrawPageUC.m_CompoDimension.m_InternalCompoPage)
|
||||
|
||||
Case Pages.CompoDimension
|
||||
VariablesGrd.Children.Remove( m_CompoDimension)
|
||||
VariablesGrd.Children.Remove(m_CompoDimension)
|
||||
|
||||
Case Pages.SideAngle
|
||||
VariablesGrd.Children.Remove( m_SideAngleUC)
|
||||
Select Case m_SideAngleUC.m_Mode
|
||||
Case SideAngleUC.ModeOpt.SIDEANGLE
|
||||
SideAngleBtn.IsChecked = False
|
||||
SideAngleBtn_Click(Nothing, Nothing)
|
||||
Case SideAngleUC.ModeOpt.ENGRAVE
|
||||
EngraveBtn.IsChecked = False
|
||||
EngraveBtn_Click(Nothing, Nothing)
|
||||
Case SideAngleUC.ModeOpt.DRIP
|
||||
DripCutBtn.IsChecked = False
|
||||
DripCutBtn_Click(Nothing, Nothing)
|
||||
End Select
|
||||
VariablesGrd.Children.Remove(m_SideAngleUC)
|
||||
|
||||
Case Pages.FiloTop
|
||||
FiloTopBtn.IsChecked = False
|
||||
FiloTopBtn_Click(Nothing, Nothing)
|
||||
VariablesGrd.Children.Remove(m_FiloTopUC)
|
||||
|
||||
Case Pages.AlzFront
|
||||
LeftButtonGrd.Children.Remove(m_CompoDimension.m_AlzFrontPage)
|
||||
|
||||
End Select
|
||||
|
||||
' Pulisco l'ambiente lua
|
||||
@@ -1485,7 +1598,10 @@ Public Class DrawPageUC
|
||||
Case 2 ' intero
|
||||
Return m_nVal.ToString()
|
||||
Case 3 ' lunghezza
|
||||
Return DoubleToString(EgtToUiUnits(m_dVal), 4)
|
||||
'Dim dVal As Double
|
||||
'StringToLen(m_sVal, dVal)
|
||||
Return LenToString(m_dVal, 4)
|
||||
'Return DoubleToString(EgtToUiUnits(m_dVal), 4)
|
||||
Case 4 ' double
|
||||
Return DoubleToString(m_dVal, 4)
|
||||
Case 5 ' stringa
|
||||
@@ -1510,12 +1626,13 @@ Public Class DrawPageUC
|
||||
End If
|
||||
Case 3 ' lunghezza
|
||||
Dim dVal As Double
|
||||
If StringToDouble(sVal, dVal) Then
|
||||
If bConvertUnits Then
|
||||
m_dVal = EgtFromUiUnits(dVal)
|
||||
Else
|
||||
m_dVal = dVal
|
||||
End If
|
||||
If bConvertUnits Then
|
||||
StringToLen(sVal, dVal)
|
||||
m_dVal = dVal
|
||||
Return True
|
||||
Else
|
||||
StringToDouble(sVal, dVal)
|
||||
m_dVal = dVal
|
||||
Return True
|
||||
End If
|
||||
Case 4 ' double
|
||||
|
||||
@@ -38,17 +38,18 @@ Public Class FiloTopUC
|
||||
m_CallingPage = m_MainWindow.m_ActivePage
|
||||
|
||||
' Imposto messaggi
|
||||
ParameterTxBl.Text = EgtMsg( MSG_IMPORTPAGEUC + 10) ' Offset
|
||||
Parameter2TxBl.Text = EgtMsg( MSG_IMPORTPAGEUC + 11) ' Affondamento
|
||||
ParameterTxBl.Text = EgtMsg(MSG_IMPORTPAGEUC + 10) ' Offset
|
||||
Parameter2TxBl.Text = EgtMsg(MSG_IMPORTPAGEUC + 11) ' Affondamento
|
||||
Parameter3TxBl.Text = EgtMsg(91138)
|
||||
|
||||
If m_CallingPage = MainWindow.Pages.Draw Then
|
||||
' Imposto questa come pagina correntemente visualizzata nella drawpage
|
||||
m_MainWindow.m_DrawPageUC.m_ActiveComponentPage = DrawPageUC.Pages.FiloTop
|
||||
' Imposto contesto corrente
|
||||
EgtSetCurrentContext( m_MainWindow.m_DrawPageUC.DrawScene.GetCtx())
|
||||
EgtSetCurrentContext(m_MainWindow.m_DrawPageUC.DrawScene.GetCtx())
|
||||
ElseIf m_CallingPage = MainWindow.Pages.Import Then
|
||||
' Imposto contesto corrente
|
||||
EgtSetCurrentContext( m_MainWindow.m_ImportPageUC.ImportScene.GetCtx())
|
||||
EgtSetCurrentContext(m_MainWindow.m_ImportPageUC.ImportScene.GetCtx())
|
||||
End If
|
||||
|
||||
' Gestisco visualizzazione dei parametri
|
||||
@@ -57,9 +58,9 @@ Public Class FiloTopUC
|
||||
Parameter3TxBl.Visibility = Windows.Visibility.Visible
|
||||
|
||||
' Aggiorno valori
|
||||
m_dFiloTopOffset = GetPrivateProfileDouble( S_SIDES, K_FILOTOPOFFSET, 5, m_MainWindow.GetIniFile())
|
||||
ParameterTxBx.Text = LenToString( m_dFiloTopOffset, 3)
|
||||
m_dFiloTopDepth = GetPrivateProfileDouble( S_SIDES, K_FILOTOPDEPTH, 5, m_MainWindow.GetIniFile())
|
||||
m_dFiloTopOffset = GetPrivateProfileDouble(S_SIDES, K_FILOTOPOFFSET, 5, m_MainWindow.GetIniFile())
|
||||
ParameterTxBx.Text = LenToString(m_dFiloTopOffset, 3)
|
||||
m_dFiloTopDepth = GetPrivateProfileDouble(S_SIDES, K_FILOTOPDEPTH, 5, m_MainWindow.GetIniFile())
|
||||
Parameter2TxBx.Text = LenToString(m_dFiloTopDepth, 3)
|
||||
m_bCornerradius = GetPrivateProfileInt(S_SIDES, K_ROUNDOFF, 0, m_MainWindow.GetIniFile()) <> 0
|
||||
Parameter3ChBx.IsChecked = m_bCornerradius
|
||||
@@ -80,8 +81,8 @@ Public Class FiloTopUC
|
||||
Dim nLayId As Integer = EgtGetFirstLayer(nPartId)
|
||||
While nLayId <> GDB_ID.NULL
|
||||
Dim sLayName As String = ""
|
||||
If EgtGetName( nLayId, sLayName) AndAlso sLayName = NAME_INLOOP AndAlso EgtExistsInfo( nLayId, INFO_FILOTOP) Then
|
||||
EgtSetInfo( nLayId, INFO_OFFSET, m_dFiloTopOffset)
|
||||
If EgtGetName(nLayId, sLayName) AndAlso sLayName = NAME_INLOOP AndAlso EgtExistsInfo(nLayId, INFO_FILOTOP) Then
|
||||
EgtSetInfo(nLayId, INFO_OFFSET, m_dFiloTopOffset)
|
||||
End If
|
||||
nLayId = EgtGetNextLayer(nLayId)
|
||||
End While
|
||||
@@ -101,8 +102,8 @@ Public Class FiloTopUC
|
||||
Dim nLayId As Integer = EgtGetFirstLayer(nPartId)
|
||||
While nLayId <> GDB_ID.NULL
|
||||
Dim sLayName As String = ""
|
||||
If EgtGetName( nLayId, sLayName) AndAlso sLayName = NAME_INLOOP AndAlso EgtExistsInfo( nLayId, INFO_FILOTOP) Then
|
||||
EgtSetInfo( nLayId, INFO_DEPTH, m_dFiloTopDepth)
|
||||
If EgtGetName(nLayId, sLayName) AndAlso sLayName = NAME_INLOOP AndAlso EgtExistsInfo(nLayId, INFO_FILOTOP) Then
|
||||
EgtSetInfo(nLayId, INFO_DEPTH, m_dFiloTopDepth)
|
||||
End If
|
||||
nLayId = EgtGetNextLayer(nLayId)
|
||||
End While
|
||||
@@ -214,10 +215,13 @@ Public Class FiloTopUC
|
||||
EgtErase(nLayFiloTop)
|
||||
EgtRemoveInfo(nLayId, "FiloTopRef")
|
||||
EgtOutLog("Error in generation OffsetPreView in TopEgde ")
|
||||
Else
|
||||
m_MainWindow.m_DrawPageUC.MessageTxBx.Text = ""
|
||||
m_MainWindow.m_DrawPageUC.MessageBrd.Background = Brushes.Transparent
|
||||
End If
|
||||
' ---------------------- Fine GESTIONE PREVIEW percorso -------------------------------
|
||||
End If
|
||||
nLayId = EgtGetNextLayer(nLayId)
|
||||
nLayId = EgtGetNextLayer(nLayId)
|
||||
End While
|
||||
nPartId = EgtGetNextPart(nPartId)
|
||||
End While
|
||||
|
||||
+106
-104
@@ -7,58 +7,60 @@
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="853.3" d:DesignWidth="1280" Initialized="ImportPage_Initialized" Loaded="ImportPage_Loaded" Unloaded="ImportPage_Unloaded">
|
||||
|
||||
<!-- Definizione della ImportPage -->
|
||||
<Border>
|
||||
<Grid Name="ImportPageGrid" >
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="3*"/>
|
||||
<ColumnDefinition Width="12*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="8*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
|
||||
<!-- Definizione della Grid superiore per Button -->
|
||||
<Grid Name="UpperButtonGrid" Grid.Column="1" Grid.Row="0" >
|
||||
<!-- Definizione della ImportPage -->
|
||||
<Border>
|
||||
<Grid Name="ImportPageGrid" >
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="7*"/>
|
||||
<ColumnDefinition Width="3*"/>
|
||||
<ColumnDefinition Width="12*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<ToggleButton Name="SideAngleBtn" Grid.Column="0"
|
||||
Style="{DynamicResource OmagCut_RightGrayYellowTextToggleButton}"/>
|
||||
<ToggleButton Name="FiloTopBtn" Grid.Column="1"
|
||||
Style="{DynamicResource OmagCut_RightGrayYellowTextToggleButton}"/>
|
||||
<ToggleButton Name="DripCutBtn" Grid.Column="2" Padding="0"
|
||||
Style="{DynamicResource OmagCut_RightGrayYellowTextToggleButton}"/>
|
||||
<ToggleButton Name="DripDrillBtn" Grid.Column="3" Padding="0"
|
||||
Style="{DynamicResource OmagCut_RightGrayYellowTextToggleButton}"/>
|
||||
<Button Name="Cad2dBtn" Grid.Column="4" Padding="0"
|
||||
Style="{DynamicResource OmagCut_YellowTextButton}"/>
|
||||
</Grid>
|
||||
|
||||
<!-- Definizione della Grid laterale -->
|
||||
<Grid Name="LeftGrid" Grid.RowSpan="3">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="7.25*"/>
|
||||
<RowDefinition Height="0.75*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="8*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<TextBlock Name="FilePathTxBl" Foreground="White" Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
<ListBox Name="FileListBox" Grid.Row="1" Grid.RowSpan="2" ItemTemplate="{DynamicResource DataTemplateItem}"
|
||||
|
||||
<!-- Definizione della Grid superiore per Button -->
|
||||
<Grid Name="UpperButtonGrid" Grid.Column="1" Grid.Row="0" >
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="7*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<ToggleButton Name="SideAngleBtn" Grid.Column="0"
|
||||
Style="{DynamicResource OmagCut_RightGrayYellowTextToggleButton}"/>
|
||||
<ToggleButton Name="FiloTopBtn" Grid.Column="1"
|
||||
Style="{DynamicResource OmagCut_RightGrayYellowTextToggleButton}"/>
|
||||
<ToggleButton Name="DripCutBtn" Grid.Column="2" Padding="0"
|
||||
Style="{DynamicResource OmagCut_RightGrayYellowTextToggleButton}"/>
|
||||
<ToggleButton Name="EngraveBtn" Grid.Column="2"
|
||||
Style="{DynamicResource OmagCut_RightGrayYellowTextToggleButton}"/>
|
||||
<ToggleButton Name="DripDrillBtn" Grid.Column="3" Padding="0"
|
||||
Style="{DynamicResource OmagCut_RightGrayYellowTextToggleButton}"/>
|
||||
<Button Name="Cad2dBtn" Grid.Column="4" Padding="0"
|
||||
Style="{DynamicResource OmagCut_YellowTextButton}"/>
|
||||
</Grid>
|
||||
|
||||
<!-- Definizione della Grid laterale -->
|
||||
<Grid Name="LeftGrid" Grid.RowSpan="3">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="7.25*"/>
|
||||
<RowDefinition Height="0.75*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<TextBlock Name="FilePathTxBl" Foreground="White" Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
<ListBox Name="FileListBox" Grid.Row="1" Grid.RowSpan="2" ItemTemplate="{DynamicResource DataTemplateItem}"
|
||||
ItemsSource="{Binding ItemList}"/>
|
||||
|
||||
<Grid Grid.Row="3" Margin="0,0,8,0">
|
||||
<Grid Name="FinderGrd" Grid.Row="3" Margin="0,0,8,0">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="4*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
@@ -68,68 +70,68 @@
|
||||
<Button Name="ClearFindBtn" Grid.Column="1" Style="{DynamicResource OmagCut_GradientBlueIconButton}" Margin="0,6,2,6">
|
||||
<Image Source="{DynamicResource XImg}" Style="{StaticResource OmagCut_ButtonIcon}" Width="30" />
|
||||
</Button>
|
||||
</Grid>
|
||||
|
||||
<Border Name="MessageBrd" Grid.Row="5" BorderThickness="0,1,0,0" BorderBrush="Gray">
|
||||
<TextBlock Name="MessageTxBx" TextAlignment="Center"
|
||||
</Grid>
|
||||
|
||||
<Border Name="MessageBrd" Grid.Row="5" BorderThickness="0,1,0,0" BorderBrush="Gray">
|
||||
<TextBlock Name="MessageTxBx" TextAlignment="Center"
|
||||
Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</Border>
|
||||
</Border>
|
||||
|
||||
</Grid>
|
||||
|
||||
<!-- Definizione della Grid inferiore per Button -->
|
||||
<Grid Name="LowerButtonGrid" Grid.Column="1" Grid.Row="3">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Button Name="UseLayerBtn" Grid.Column="0" Style="{DynamicResource OmagCut_YellowTextButton}"/>
|
||||
<Button Name="UseClosedCurveBtn" Grid.Column="1" Style="{DynamicResource OmagCut_YellowTextButton}"/>
|
||||
<Button Name="UseRegionBtn" Grid.Column="2" Style="{DynamicResource OmagCut_YellowTextButton}"/>
|
||||
<Button Name="ResetBtn" Grid.Column="3" Style="{DynamicResource OmagCut_YellowTextButton}"/>
|
||||
|
||||
<RadioButton Name="mmBtn" Grid.Column="4" Style="{DynamicResource OmagCut_YellowToggleButton}"/>
|
||||
<RadioButton Name="inchBtn" Grid.Column="5" Style="{DynamicResource OmagCut_YellowToggleButton}"/>
|
||||
|
||||
<Button Name="OrderListBtn" Grid.Column="6" Style="{DynamicResource OmagCut_YellowTextButton}"/>
|
||||
|
||||
<ToggleButton Name="TopBtn" Grid.Column="7" Style="{DynamicResource OmagCut_YellowToggleButton}"/>
|
||||
|
||||
<Grid Name="PartNumberGrd" Grid.Column="8" Grid.ColumnSpan="2">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<TextBlock Name="PartNumTxBl" Grid.Column="0" Style="{DynamicResource OmagCut_CurrProjSummeryTextBlock}"
|
||||
TextAlignment="Right"/>
|
||||
<EgtWPFLib:EgtTextBox Name="PartNumTxBx" Grid.Column="1" Width="60"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
</Grid>
|
||||
|
||||
<Button Name="OkBtn" Grid.Column="10" Style="{DynamicResource OmagCut_GradientBlueIconButton}">
|
||||
<Image Source="{DynamicResource VImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
<!-- Definizione della Grid inferiore per Button -->
|
||||
<Grid Name="LowerButtonGrid" Grid.Column="1" Grid.Row="3">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Button Name="UseLayerBtn" Grid.Column="0" Style="{DynamicResource OmagCut_YellowTextButton}"/>
|
||||
<Button Name="UseClosedCurveBtn" Grid.Column="1" Style="{DynamicResource OmagCut_YellowTextButton}"/>
|
||||
<Button Name="UseRegionBtn" Grid.Column="2" Style="{DynamicResource OmagCut_YellowTextButton}"/>
|
||||
<Button Name="ResetBtn" Grid.Column="3" Style="{DynamicResource OmagCut_YellowTextButton}"/>
|
||||
|
||||
<RadioButton Name="mmBtn" Grid.Column="4" Style="{DynamicResource OmagCut_YellowToggleButton}"/>
|
||||
<RadioButton Name="inchBtn" Grid.Column="5" Style="{DynamicResource OmagCut_YellowToggleButton}"/>
|
||||
|
||||
<Button Name="OrderListBtn" Grid.Column="6" Style="{DynamicResource OmagCut_YellowTextButton}"/>
|
||||
|
||||
<ToggleButton Name="TopBtn" Grid.Column="7" Style="{DynamicResource OmagCut_YellowToggleButton}"/>
|
||||
|
||||
<Grid Name="PartNumberGrd" Grid.Column="8" Grid.ColumnSpan="2">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<TextBlock Name="PartNumTxBl" Grid.Column="0" Style="{DynamicResource OmagCut_CurrProjSummeryTextBlock}"
|
||||
TextAlignment="Right"/>
|
||||
<EgtWPFLib:EgtTextBox Name="PartNumTxBx" Grid.Column="1" Width="60" IsLength="False"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
</Grid>
|
||||
|
||||
<Button Name="OkBtn" Grid.Column="10" Style="{DynamicResource OmagCut_GradientBlueIconButton}">
|
||||
<Image Source="{DynamicResource VImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
|
||||
<Button Name="ExitBtn" Grid.Column="11" Style="{DynamicResource OmagCut_GradientBlueIconButton}">
|
||||
<Image Source="{DynamicResource XImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
|
||||
</Grid>
|
||||
|
||||
</Grid>
|
||||
|
||||
</Border>
|
||||
|
||||
<Button Name="ExitBtn" Grid.Column="11" Style="{DynamicResource OmagCut_GradientBlueIconButton}">
|
||||
<Image Source="{DynamicResource XImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
|
||||
</Grid>
|
||||
|
||||
</Grid>
|
||||
|
||||
</Border>
|
||||
|
||||
</UserControl>
|
||||
|
||||
+351
-88
@@ -19,6 +19,9 @@ Public Class ImportPageUC
|
||||
Friend WithEvents ImportScene As New Scene
|
||||
Private ImportSceneHost As New System.Windows.Forms.Integration.WindowsFormsHost
|
||||
|
||||
Private m_SelListHole As New List(Of Integer)
|
||||
Private m_DeselectListHole As New List(Of Integer)
|
||||
|
||||
' Properties
|
||||
Private m_sCurrDir As String = String.Empty
|
||||
Private m_sCurrFile As String = String.Empty
|
||||
@@ -35,6 +38,8 @@ Public Class ImportPageUC
|
||||
Private Const FT_TRF As Integer = 51
|
||||
' Costante per formato CUT
|
||||
Private Const FT_CUT As Integer = 52
|
||||
' Indice del parcheggio corrente
|
||||
Private NewParkInd As Integer = 0
|
||||
|
||||
' Indentificativo del pezzo selezionato
|
||||
Private m_nSelectedPart As Integer = GDB_ID.NULL
|
||||
@@ -79,12 +84,13 @@ Public Class ImportPageUC
|
||||
ResetBtn.Content = EgtMsg(MSG_IMPORTPAGEUC + 3) 'Reset
|
||||
mmBtn.Content = EgtMsg(MSG_IMPORTPAGEUC + 4) 'mm
|
||||
inchBtn.Content = EgtMsg(MSG_IMPORTPAGEUC + 5) 'inch
|
||||
OrderListBtn.Content = EgtMsg( 90398) 'Dati Csv
|
||||
TopBtn.Content = EgtMsg( 90384) 'Indica Lato Sopra
|
||||
OrderListBtn.Content = EgtMsg(90398) 'Dati Csv
|
||||
TopBtn.Content = EgtMsg(90384) 'Indica Lato Sopra
|
||||
PartNumTxBl.Text = EgtMsg(MSG_IMPORTPAGEUC + 15) 'Numero
|
||||
SideAngleBtn.Content = EgtMsg(MSG_IMPORTPAGEUC + 7) 'Inclina lati
|
||||
FiloTopBtn.Content = EgtMsg( 90400) 'Filo Top
|
||||
FiloTopBtn.Content = EgtMsg(90400) 'Filo Top
|
||||
DripCutBtn.Content = EgtMsg(MSG_IMPORTPAGEUC + 8) 'Incidi da sotto
|
||||
EngraveBtn.Content = "Engrave"
|
||||
DripDrillBtn.Content = EgtMsg(MSG_IMPORTPAGEUC + 14) 'Foro da sotto
|
||||
Cad2dBtn.Content = "Cad 2d"
|
||||
|
||||
@@ -94,13 +100,14 @@ Public Class ImportPageUC
|
||||
End Sub
|
||||
|
||||
Private Sub ImportPage_Loaded(sender As Object, e As RoutedEventArgs)
|
||||
|
||||
' abilitazione importazione TRF
|
||||
m_bEnableTrf = (m_MainWindow.m_PrevActivePage = MainWindow.Pages.CadCut And
|
||||
m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.TRF_IMPORT))
|
||||
' abilitazione Ordine e Distinta per importazione DXF
|
||||
m_bEnableOrderList = (m_MainWindow.m_PrevActivePage = MainWindow.Pages.CadCut And
|
||||
GetPrivateProfileInt(S_COMPO, K_CSVDATA, 0, m_MainWindow.GetIniFile()) <> 0)
|
||||
' rendo visibilie il pulsante di ricerca file
|
||||
FinderGrd.Visibility = Visibility.Visible
|
||||
|
||||
If m_bFirst Then
|
||||
' imposto colore di default
|
||||
@@ -154,10 +161,14 @@ Public Class ImportPageUC
|
||||
' Verifico esistenza Cad 2d
|
||||
GetPrivateProfileString(S_CAD2D, K_CAD2D_NAME, "", m_sCad2dName, m_MainWindow.GetIniFile())
|
||||
GetPrivateProfileString(S_CAD2D, K_CAD2D_EXEPATH, "", m_sCad2dPath, m_MainWindow.GetIniFile())
|
||||
Cad2dBtn.IsEnabled = My.Computer.FileSystem.FileExists( m_sCad2dPath)
|
||||
Cad2dBtn.IsEnabled = My.Computer.FileSystem.FileExists(m_sCad2dPath)
|
||||
|
||||
' Pulisco tutto
|
||||
ClearView()
|
||||
' Definizione di quale comando deve essere visualizzato
|
||||
DripCutBtn.Visibility = If(String.IsNullOrWhiteSpace(m_MainWindow.m_CurrentMachine.sCurrDripSaw), Visibility.Hidden, Visibility.Visible)
|
||||
EngraveBtn.Visibility = If(DripCutBtn.Visibility <> Visibility.Visible, Visibility.Visible, Visibility.Hidden)
|
||||
|
||||
FileListBox.UnselectAll()
|
||||
' inibisco selezione diretta da Scene
|
||||
ImportScene.SetStatusNull()
|
||||
@@ -169,7 +180,7 @@ Public Class ImportPageUC
|
||||
UseClosedCurveBtn.Visibility = Windows.Visibility.Visible
|
||||
ResetBtn.Visibility = Windows.Visibility.Visible
|
||||
SideAngleBtn.Visibility = Windows.Visibility.Visible
|
||||
OrderListBtn.Visibility = If( m_bEnableOrderList, Windows.Visibility.Visible, Windows.Visibility.Hidden)
|
||||
OrderListBtn.Visibility = If(m_bEnableOrderList, Windows.Visibility.Visible, Windows.Visibility.Hidden)
|
||||
TopBtn.Visibility = Windows.Visibility.Visible
|
||||
PartNumberGrd.Visibility = Windows.Visibility.Visible
|
||||
Else
|
||||
@@ -179,7 +190,7 @@ Public Class ImportPageUC
|
||||
ResetBtn.Visibility = Windows.Visibility.Hidden
|
||||
SideAngleBtn.Visibility = Windows.Visibility.Hidden
|
||||
OrderListBtn.Visibility = Windows.Visibility.Hidden
|
||||
TopBtn.Visibility = Windows.Visibility.Hidden
|
||||
TopBtn.Visibility = Windows.Visibility.Hidden
|
||||
PartNumberGrd.Visibility = Windows.Visibility.Hidden
|
||||
End If
|
||||
mmBtn.IsEnabled = True
|
||||
@@ -196,7 +207,8 @@ Public Class ImportPageUC
|
||||
PartNumTxBx.Text = "1"
|
||||
' disabilito ok
|
||||
OkBtn.IsEnabled = False
|
||||
|
||||
' Azzero l'idice di parcheggio
|
||||
NewParkInd = 0
|
||||
End Sub
|
||||
|
||||
Private Sub LoadGridData()
|
||||
@@ -339,13 +351,18 @@ Public Class ImportPageUC
|
||||
ResetBtn.IsEnabled = False
|
||||
SideAngleBtn.IsEnabled = False
|
||||
FiloTopBtn.IsEnabled = False
|
||||
DripCutBtn.IsEnabled = False
|
||||
' Evito di settare le proprietà di oggeti che sono con visibilità Hidden
|
||||
If DripCutBtn.Visibility = Visibility.Visible Then
|
||||
DripCutBtn.IsEnabled = False
|
||||
Else
|
||||
EngraveBtn.IsEnabled = False
|
||||
End If
|
||||
DripDrillBtn.IsEnabled = False
|
||||
Return True
|
||||
End Function
|
||||
|
||||
Private Function LoadCurrFile() As Boolean
|
||||
' Pulisco il DB geometrico locale
|
||||
' Pulisco il DB geometrico locale
|
||||
Dim bOk As Boolean = EgtNewFile()
|
||||
' Costruisco path completa del file
|
||||
Dim sPath = IO.Path.Combine(m_sCurrDir, m_sCurrFile)
|
||||
@@ -357,6 +374,10 @@ Public Class ImportPageUC
|
||||
Dim dScale As Double = If(m_bMM, ONEMM, ONEINCH)
|
||||
' Importo file DXF
|
||||
bOk = bOk AndAlso EgtImportDxf(sPath, dScale)
|
||||
' riporto al piano tutte le superifici
|
||||
EgtSelectAll()
|
||||
EgtScale(GDB_ID.SEL, Frame3d.GLOB, 1, 1, 0)
|
||||
EgtDeselectAll()
|
||||
ElseIf m_nFileType = FT.NGE Then
|
||||
' Carico Nge
|
||||
bOk = bOk AndAlso EgtOpenFile(sPath)
|
||||
@@ -396,7 +417,11 @@ Public Class ImportPageUC
|
||||
OkBtn.IsEnabled = False
|
||||
SideAngleBtn.IsEnabled = False
|
||||
FiloTopBtn.IsEnabled = False
|
||||
DripCutBtn.IsEnabled = False
|
||||
If DripCutBtn.Visibility = Visibility.Visible Then
|
||||
DripCutBtn.IsEnabled = False
|
||||
Else
|
||||
EngraveBtn.IsEnabled = False
|
||||
End If
|
||||
DripDrillBtn.IsEnabled = False
|
||||
ElseIf m_nFileType = FT_TRF Or m_nFileType = FT_CUT Then
|
||||
' abilito bottone Insert, disabilito bottoni UseLayer, UseClosedCurve, UseRegion e Reset
|
||||
@@ -412,10 +437,14 @@ Public Class ImportPageUC
|
||||
OkBtn.IsEnabled = True
|
||||
SideAngleBtn.IsEnabled = False
|
||||
FiloTopBtn.IsEnabled = False
|
||||
DripCutBtn.IsEnabled = False
|
||||
If DripCutBtn.Visibility = Visibility.Visible Then
|
||||
DripCutBtn.IsEnabled = False
|
||||
Else
|
||||
EngraveBtn.IsEnabled = False
|
||||
End If
|
||||
DripDrillBtn.IsEnabled = False
|
||||
End If
|
||||
' altrimenti import per cornici
|
||||
' altrimenti import per cornici
|
||||
Else
|
||||
mmBtn.IsEnabled = (m_nFileType = FT.DXF)
|
||||
inchBtn.IsEnabled = (m_nFileType = FT.DXF)
|
||||
@@ -425,12 +454,12 @@ Public Class ImportPageUC
|
||||
End Function
|
||||
|
||||
Private Sub OnMouseDownScene(sender As Object, e As System.Windows.Forms.MouseEventArgs) Handles ImportScene.OnMouseDownScene
|
||||
If SideAngleBtn.IsChecked() Or DripCutBtn.IsChecked() Then
|
||||
OnMouseDownSceneSideAngle( e)
|
||||
If SideAngleBtn.IsChecked() Or DripCutBtn.IsChecked() Or EngraveBtn.IsChecked Then
|
||||
OnMouseDownSceneSideAngle(e)
|
||||
ElseIf DripDrillBtn.IsChecked() Then
|
||||
OnMouseDownSceneUnderDrill( e)
|
||||
OnMouseDownSceneUnderDrill(e)
|
||||
ElseIf FiloTopBtn.IsChecked() Then
|
||||
OnMouseDownSceneFiloTop( e)
|
||||
OnMouseDownSceneFiloTop(e)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
@@ -560,31 +589,35 @@ Public Class ImportPageUC
|
||||
EgtDeselectObj(nId)
|
||||
EgtDeselectObj(nLayId)
|
||||
Dim sLayName As String = ""
|
||||
If EgtGetName(nLayId, sLayName) AndAlso sLayName = NAME_INLOOP AndAlso EgtExistsInfo( nLayId, INFO_FILOTOP) Then
|
||||
EgtRemoveInfo( nLayId, INFO_FILOTOP)
|
||||
EgtRemoveInfo( nLayId, INFO_OFFSET)
|
||||
EgtRemoveInfo( nLayId, INFO_DEPTH)
|
||||
Dim nEntId As Integer = EgtGetFirstInGroup( nLayId)
|
||||
If EgtGetName(nLayId, sLayName) AndAlso sLayName = NAME_INLOOP AndAlso EgtExistsInfo(nLayId, INFO_FILOTOP) Then
|
||||
EgtRemoveInfo(nLayId, INFO_FILOTOP)
|
||||
EgtRemoveInfo(nLayId, INFO_OFFSET)
|
||||
EgtRemoveInfo(nLayId, INFO_DEPTH)
|
||||
Dim nEntId As Integer = EgtGetFirstInGroup(nLayId)
|
||||
While nEntId <> GDB_ID.NULL
|
||||
EgtSetColor(nEntId, New Color3d(127, 63, 0))
|
||||
nEntId = EgtGetNext( nEntId)
|
||||
nEntId = EgtGetNext(nEntId)
|
||||
End While
|
||||
m_DeselectListHole.Add(nLayId)
|
||||
m_SelListHole.Remove(nLayId)
|
||||
End If
|
||||
Else
|
||||
Dim nLayId As Integer = GDB_ID.NULL
|
||||
EgtGetInfo(nId, "ID", nLayId)
|
||||
Dim sLayName As String = ""
|
||||
If EgtGetName( nLayId, sLayName) AndAlso sLayName = NAME_INLOOP Then
|
||||
EgtSelectObj( nId)
|
||||
EgtSelectObj( nLayId)
|
||||
EgtSetInfo( nLayId, INFO_FILOTOP, 1)
|
||||
EgtSetInfo( nLayId, INFO_OFFSET, m_FiloTopUC.FiloTopOffset)
|
||||
EgtSetInfo( nLayId, INFO_DEPTH, m_FiloTopUC.FiloTopDepth)
|
||||
Dim nEntId As Integer = EgtGetFirstInGroup( nLayId)
|
||||
If EgtGetName(nLayId, sLayName) AndAlso sLayName = NAME_INLOOP Then
|
||||
EgtSelectObj(nId)
|
||||
EgtSelectObj(nLayId)
|
||||
EgtSetInfo(nLayId, INFO_FILOTOP, 1)
|
||||
EgtSetInfo(nLayId, INFO_OFFSET, m_FiloTopUC.FiloTopOffset)
|
||||
EgtSetInfo(nLayId, INFO_DEPTH, m_FiloTopUC.FiloTopDepth)
|
||||
Dim nEntId As Integer = EgtGetFirstInGroup(nLayId)
|
||||
While nEntId <> GDB_ID.NULL
|
||||
EgtSetColor(nEntId, New Color3d(255, 255, 255))
|
||||
nEntId = EgtGetNext( nEntId)
|
||||
nEntId = EgtGetNext(nEntId)
|
||||
End While
|
||||
m_SelListHole.Add(nLayId)
|
||||
m_DeselectListHole.Remove(nLayId)
|
||||
End If
|
||||
End If
|
||||
EgtDraw()
|
||||
@@ -592,6 +625,12 @@ Public Class ImportPageUC
|
||||
End If
|
||||
nId = EgtGetNextObjInSelWin()
|
||||
End While
|
||||
m_FiloTopUC.CreateFiloTopPreView(m_SelListHole)
|
||||
m_FiloTopUC.EraseFiloTopPreview(m_DeselectListHole)
|
||||
If m_SelListHole.Count > 0 Then
|
||||
MessageTxBx.Text = ""
|
||||
MessageBrd.Background = Brushes.Transparent
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub OnShowDistanceVector(sender As Object, vtDist As Vector3d) Handles ImportScene.OnShowDistanceVector
|
||||
@@ -601,7 +640,7 @@ Public Class ImportPageUC
|
||||
|
||||
Private Sub SelectedPartChanged()
|
||||
' Se sono in modalità inclinazioni o gocciolatoio calcolo lati inclinabili e creo testi
|
||||
If SideAngleBtn.IsChecked() Or DripCutBtn.IsChecked() Then
|
||||
If SideAngleBtn.IsChecked() Or DripCutBtn.IsChecked() Or EngraveBtn.IsChecked() Then
|
||||
m_SideAngleUC.ReLoadSideAnglePage()
|
||||
End If
|
||||
End Sub
|
||||
@@ -624,7 +663,7 @@ Public Class ImportPageUC
|
||||
' Ciclo sulle regioni
|
||||
Dim EntId As Integer = EgtGetFirstInGroup(RegionId)
|
||||
While EntId <> GDB_ID.NULL
|
||||
If EgtGetType( EntId) = GDB_TY.SRF_FRGN Then EgtSetColor(EntId, InsertColor)
|
||||
If EgtGetType(EntId) = GDB_TY.SRF_FRGN Then EgtSetColor(EntId, InsertColor)
|
||||
EntId = EgtGetNext(EntId)
|
||||
End While
|
||||
RegionId = EgtGetNextName(PartId, NAME_REGION)
|
||||
@@ -662,8 +701,12 @@ Public Class ImportPageUC
|
||||
' abilito bottone angoli su lati esterni
|
||||
SideAngleBtn.IsEnabled = m_MainWindow.m_DrawPageUC.bEnableSideAngle
|
||||
FiloTopBtn.IsEnabled = m_MainWindow.m_CurrentMachine.bMilling
|
||||
DripCutBtn.IsEnabled = m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.UNDER_CUT) And
|
||||
If DripCutBtn.Visibility = Visibility.Visible Then
|
||||
DripCutBtn.IsEnabled = m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.UNDER_CUT) And
|
||||
Not String.IsNullOrWhiteSpace(m_MainWindow.m_CurrentMachine.sCurrDripSaw)
|
||||
Else
|
||||
EngraveBtn.IsEnabled = m_MainWindow.m_DrawPageUC.bEnableSideAngle
|
||||
End If
|
||||
DripDrillBtn.IsEnabled = m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.UNDER_CUT) And
|
||||
Not String.IsNullOrWhiteSpace(m_MainWindow.m_CurrentMachine.sCurrDripDrill)
|
||||
End Sub
|
||||
@@ -694,8 +737,12 @@ Public Class ImportPageUC
|
||||
' abilito bottone angoli su lati esterni
|
||||
SideAngleBtn.IsEnabled = m_MainWindow.m_DrawPageUC.bEnableSideAngle
|
||||
FiloTopBtn.IsEnabled = m_MainWindow.m_CurrentMachine.bMilling
|
||||
DripCutBtn.IsEnabled = m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.UNDER_CUT) And
|
||||
If DripCutBtn.Visibility = Visibility.Visible Then
|
||||
DripCutBtn.IsEnabled = m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.UNDER_CUT) And
|
||||
Not String.IsNullOrWhiteSpace(m_MainWindow.m_CurrentMachine.sCurrDripSaw)
|
||||
Else
|
||||
EngraveBtn.IsEnabled = m_MainWindow.m_DrawPageUC.bEnableSideAngle
|
||||
End If
|
||||
DripDrillBtn.IsEnabled = m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.UNDER_CUT) And
|
||||
Not String.IsNullOrWhiteSpace(m_MainWindow.m_CurrentMachine.sCurrDripDrill)
|
||||
End Sub
|
||||
@@ -726,8 +773,12 @@ Public Class ImportPageUC
|
||||
' abilito bottone angoli su lati esterni
|
||||
SideAngleBtn.IsEnabled = m_MainWindow.m_DrawPageUC.bEnableSideAngle
|
||||
FiloTopBtn.IsEnabled = m_MainWindow.m_CurrentMachine.bMilling
|
||||
DripCutBtn.IsEnabled = m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.UNDER_CUT) And
|
||||
If DripCutBtn.Visibility = Visibility.Visible Then
|
||||
DripCutBtn.IsEnabled = m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.UNDER_CUT) And
|
||||
Not String.IsNullOrWhiteSpace(m_MainWindow.m_CurrentMachine.sCurrDripSaw)
|
||||
Else
|
||||
EngraveBtn.IsEnabled = m_MainWindow.m_DrawPageUC.bEnableSideAngle
|
||||
End If
|
||||
DripDrillBtn.IsEnabled = m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.UNDER_CUT) And
|
||||
Not String.IsNullOrWhiteSpace(m_MainWindow.m_CurrentMachine.sCurrDripDrill)
|
||||
End Sub
|
||||
@@ -808,20 +859,38 @@ Public Class ImportPageUC
|
||||
End Sub
|
||||
|
||||
Private Sub OrderListBtn_Click(sender As Object, e As RoutedEventArgs) Handles OrderListBtn.Click
|
||||
Dim DlgOrderList As New CompoCsvData( m_MainWindow)
|
||||
DlgOrderList.SetData( m_sOrder, m_sList)
|
||||
Dim DlgOrderList As New CompoCsvData(m_MainWindow)
|
||||
DlgOrderList.SetData(m_sOrder, m_sList)
|
||||
If DlgOrderList.ShowDialog() Then
|
||||
DlgOrderList.GetData( m_sOrder, m_sList)
|
||||
DlgOrderList.GetData(m_sOrder, m_sList)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub OkBtn_Click(sender As Object, e As RoutedEventArgs) Handles OkBtn.Click
|
||||
m_SceneButtons.MeasureBtn.IsChecked = False
|
||||
' Genero l'immagine solo se è abilitata la modalità
|
||||
If GetPrivateProfileInt(S_GENERAL, K_ENABLEDXFPARK, 0, m_MainWindow.GetIniFile) <> 0 Then Print()
|
||||
' Se import per pezzi piatti
|
||||
If m_MainWindow.m_PrevActivePage = MainWindow.Pages.CadCut Then
|
||||
' Eseguo importazione pezzi piatti
|
||||
LoadFlatParts()
|
||||
' altrimenti import per cornici
|
||||
|
||||
' Aggiorno la gestione dei parcheggi: spengo tutti i parcheggi tranne quello indicato
|
||||
Dim ListParkInd As New List(Of ParkInd)
|
||||
SelParkIndWD.LoadParkInd(ListParkInd)
|
||||
For Each ItemParkInd As ParkInd In ListParkInd
|
||||
If ItemParkInd.Ind = NewParkInd Then
|
||||
ItemParkInd.Status = GDB_ST.ON_
|
||||
Else
|
||||
ItemParkInd.Status = GDB_ST.OFF
|
||||
End If
|
||||
Next
|
||||
' Aggiorno lo stato dei pezzi
|
||||
For Each Item As ParkInd In ListParkInd
|
||||
SelParkIndWD.SetStatusPartInParkInd(Item, False)
|
||||
Next
|
||||
|
||||
' altrimenti import per cornici
|
||||
Else
|
||||
LoadFrame()
|
||||
End If
|
||||
@@ -831,6 +900,80 @@ Public Class ImportPageUC
|
||||
m_MainWindow.m_ActivePage = m_MainWindow.m_PrevActivePage
|
||||
End Sub
|
||||
|
||||
' Creo una immagine del progetto da importare salvato nel percorso di progetto "..\(#ProjInd)_ParkInd_(#ParkInd).png"
|
||||
Public Sub Print()
|
||||
' recupero la lista degli indici di parcheggio
|
||||
NewParkInd = SelParkIndWD.NewParkInd()
|
||||
|
||||
Dim SM_Select As SM = SM.SHADING
|
||||
' SM_Select = SM.HIDDENLINE
|
||||
' SM_Select = SM.WIREFRAME
|
||||
Dim nProj As Integer = m_MainWindow.m_CurrentProjectPageUC.GetCurrentProject()
|
||||
Dim sPath As String = SelParkIndWD.GetPathCurrProj() & NewParkInd.ToString & ".png"
|
||||
' Recupero le dimensioni dell'area di stampa
|
||||
Dim dW As Integer = 120
|
||||
Dim dH As Integer = 120
|
||||
|
||||
If Not MainWindow.m_bShowSVGParkInd Then
|
||||
Try
|
||||
' Prendo l'immagine corrente per la stampa
|
||||
Dim colBackTopColor As Color3d = GetBackTopColor()
|
||||
Dim colBackBottomColor As Color3d = GetBackBottomColor()
|
||||
' Recupero le dimensioni correnti della pagina di disegno
|
||||
Dim nImgW As Integer = m_MainWindow.m_CurrentProjectPageUC.ActualWidth()
|
||||
Dim nImgH As Integer = m_MainWindow.m_CurrentProjectPageUC.ActualHeight()
|
||||
If Not EgtGetImage(SM_Select, colBackTopColor, colBackBottomColor, nImgW, nImgH, sPath) Then
|
||||
' Error in creating the print image
|
||||
EgtOutLog(EgtMsg(50181))
|
||||
EgtSetLineAttribs(1)
|
||||
Return
|
||||
End If
|
||||
EgtSetLineAttribs(1)
|
||||
'Metodo complesso di stampa che permette di rilasciare il file :
|
||||
'carico la bitmap e la metto in uno stream in memoria
|
||||
Dim stream As System.IO.Stream = New System.IO.MemoryStream()
|
||||
Dim bitmap As System.Drawing.Bitmap = New System.Drawing.Bitmap(sPath)
|
||||
bitmap.Save(stream, System.Drawing.Imaging.ImageFormat.Png)
|
||||
bitmap.Dispose()
|
||||
' la sposto in una BitmapImage
|
||||
Dim bitImage As New System.Windows.Media.Imaging.BitmapImage()
|
||||
bitImage.BeginInit()
|
||||
bitImage.StreamSource = stream
|
||||
bitImage.EndInit()
|
||||
' la sposto in un Visual Control
|
||||
Dim tmpImg As New Image
|
||||
tmpImg.BeginInit()
|
||||
tmpImg.Source = bitImage
|
||||
tmpImg.Stretch = Stretch.Uniform
|
||||
tmpImg.EndInit()
|
||||
' eseguo la stampa
|
||||
Catch
|
||||
' Rrror in executing print
|
||||
EgtOutLog(EgtMsg(50182))
|
||||
End Try
|
||||
Else
|
||||
' Assegno dei nomi ai pezzi (Da controllare bene se funzione sempre)...riassegno i nomi dopo?
|
||||
Dim nIdPart As Integer = EgtGetFirstPart()
|
||||
Dim nIndex As Integer = 0
|
||||
While nIdPart <> GDB_ID.NULL
|
||||
' recupero il primo layer del part
|
||||
Dim nIdLay As Integer = EgtGetFirstLayer(nIdPart)
|
||||
While nIdLay <> GDB_ID.NULL
|
||||
Dim nIdEnt As Integer = EgtGetFirstInGroup(nIdLay)
|
||||
While nIdEnt <> GDB_ID.NULL
|
||||
EgtSetName(nIdEnt, nIndex.ToString)
|
||||
nIdEnt = EgtGetNext(nIdEnt)
|
||||
nIndex = nIndex + 1
|
||||
End While
|
||||
nIdLay = EgtGetNextLayer(nIdLay)
|
||||
End While
|
||||
nIdPart = EgtGetNextPart(nIdPart)
|
||||
End While
|
||||
EgtExportSvg(GDB_ID.ROOT, SelParkIndWD.GetPathCurrProj() & NewParkInd.ToString & ".svg")
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub LoadFlatParts()
|
||||
' Cancello regioni di selezione dai pezzi
|
||||
Dim PartId As Integer = EgtGetFirstPart()
|
||||
@@ -903,21 +1046,37 @@ Public Class ImportPageUC
|
||||
If My.Computer.FileSystem.FileExists(sTmpFile) Then
|
||||
My.Computer.FileSystem.DeleteFile(sTmpFile)
|
||||
End If
|
||||
|
||||
' Calcolo l'area dei pezzi inseriti
|
||||
Dim dNewArea As Double = 0
|
||||
Dim nId As Integer = nFirstId
|
||||
While nId <> GDB_ID.NULL
|
||||
' Definisco l'indice di parcheggio asssganto al pezzo
|
||||
If GetPrivateProfileInt(S_GENERAL, K_ENABLEDXFPARK, 0, m_MainWindow.GetIniFile) <> 0 Then
|
||||
EgtSetInfo(nId, INFO_PARKIND, NewParkInd.ToString)
|
||||
' Imposto lo stato
|
||||
EgtSetStatus(nId, GDB_ST.ON_)
|
||||
' Salvo lo stato (per gestire la navigazione)
|
||||
EgtSetInfo(nId, INFO_PARKSTATUS, GDB_ST.ON_)
|
||||
End If
|
||||
dNewArea += GeomCalc.GetPartArea(nId)
|
||||
' Passo al pezzo successivo
|
||||
nId = EgtGetNextPart(nId)
|
||||
End While
|
||||
' Nascondo tutti i pezzi inseriti (per evitare interferenze con pezzi in fase di parcheggio)
|
||||
nId = nFirstId
|
||||
Dim GlobBBox As New BBox3d
|
||||
While nId <> GDB_ID.NULL
|
||||
Dim bboxTemp As New BBox3d
|
||||
EgtGetBBox(nId, 0, bboxTemp)
|
||||
GlobBBox.Add(bboxTemp)
|
||||
EgtSetStatus(nId, GDB_ST.OFF)
|
||||
' Passo al pezzo successivo
|
||||
nId = EgtGetNextPart(nId)
|
||||
End While
|
||||
Dim DimX As Double = GlobBBox.DimX
|
||||
Dim DimY As Double = GlobBBox.DimY
|
||||
Dim BBoxMaxPt As Point3d = GlobBBox.Max
|
||||
|
||||
' Ciclo sui pezzi inseriti
|
||||
nId = nFirstId
|
||||
@@ -954,7 +1113,12 @@ Public Class ImportPageUC
|
||||
' Imposto path di provenienza
|
||||
EgtSetInfo(nId, INFO_SOU_PATH, IO.Path.Combine(m_sCurrDir, m_sCurrFile))
|
||||
' Inserisco in parcheggio
|
||||
m_MainWindow.m_CadCutPageUC.m_NestPage.StoreOnePart(nId, True)
|
||||
If GetPrivateProfileInt(S_GENERAL, K_ENABLEDXFPARK, 0, m_MainWindow.GetIniFile) <> 0 Then
|
||||
' Mantengo la posizione relativa tra i pezzi
|
||||
m_MainWindow.m_CadCutPageUC.m_NestPage.StoreOnePartDXF(nId, DimX, DimY, BBoxMaxPt)
|
||||
Else
|
||||
m_MainWindow.m_CadCutPageUC.m_NestPage.StoreOnePart(nId, True)
|
||||
End If
|
||||
' Recupero Id di pezzo successivo
|
||||
Dim nNextId As Integer = EgtGetNextPart(nId)
|
||||
' Se richiesto posizionamento diretto, lo eseguo
|
||||
@@ -1011,22 +1175,24 @@ Public Class ImportPageUC
|
||||
' Salvo direttorio corrente
|
||||
WritePrivateProfileString(S_FLATPARTS, K_FLPCURRDIR, m_sCurrDir, m_MainWindow.GetIniFile())
|
||||
' Tolgo pagina inclinazioni/gocciolatoi se attiva
|
||||
If SideAngleBtn.IsChecked() Or DripCutBtn.IsChecked() Then
|
||||
If SideAngleBtn.IsChecked() Or DripCutBtn.IsChecked() Or EngraveBtn.IsChecked() Then
|
||||
FilePathTxBl.Visibility = Windows.Visibility.Visible
|
||||
FileListBox.Visibility = Windows.Visibility.Visible
|
||||
LeftGrid.Children.Remove(m_SideAngleUC)
|
||||
If SideAngleBtn.IsChecked() Then
|
||||
SideAngleBtn.IsChecked = False
|
||||
ElseIf EngraveBtn.IsChecked() Then
|
||||
EngraveBtn.IsChecked = False
|
||||
Else
|
||||
DripCutBtn.IsChecked() = False
|
||||
End If
|
||||
' Tolgo pagina fori da sotto se attiva
|
||||
' Tolgo pagina fori da sotto se attiva
|
||||
ElseIf DripDrillBtn.IsChecked() Then
|
||||
FilePathTxBl.Visibility = Windows.Visibility.Visible
|
||||
FileListBox.Visibility = Windows.Visibility.Visible
|
||||
LeftGrid.Children.Remove(m_UnderDrillUC)
|
||||
DripDrillBtn.IsChecked() = False
|
||||
' Tolgo pagina Filo Top se attiva
|
||||
' Tolgo pagina Filo Top se attiva
|
||||
ElseIf FiloTopBtn.IsChecked() Then
|
||||
FilePathTxBl.Visibility = Windows.Visibility.Visible
|
||||
FileListBox.Visibility = Windows.Visibility.Visible
|
||||
@@ -1040,6 +1206,7 @@ Public Class ImportPageUC
|
||||
|
||||
Private Sub SideAngleBtn_Click(sender As Object, e As RoutedEventArgs) Handles SideAngleBtn.Click
|
||||
If SideAngleBtn.IsChecked() Then
|
||||
FinderGrd.Visibility = Visibility.Hidden
|
||||
' Aggiungo regioni per percorsi interni
|
||||
AdjustSelectRegions()
|
||||
' Dichiaro nessuna selezione
|
||||
@@ -1052,7 +1219,11 @@ Public Class ImportPageUC
|
||||
FileListBox.Visibility = Windows.Visibility.Hidden
|
||||
' Disabilito FiloTopBtn, DripCutBtn, DripDrillBtn e unità di misura
|
||||
FiloTopBtn.IsEnabled = False
|
||||
DripCutBtn.IsEnabled = False
|
||||
If DripCutBtn.Visibility = Visibility.Visible Then
|
||||
DripCutBtn.IsEnabled = False
|
||||
Else
|
||||
EngraveBtn.IsEnabled = False
|
||||
End If
|
||||
DripDrillBtn.IsEnabled = False
|
||||
mmBtn.IsEnabled = False
|
||||
inchBtn.IsEnabled = False
|
||||
@@ -1062,6 +1233,7 @@ Public Class ImportPageUC
|
||||
MessageTxBx.Text = EgtMsg(MSG_DRAWPAGEUC + 6) ' Selezionare un contorno
|
||||
MessageBrd.Background = Application.Current.FindResource("OmagCut_Green")
|
||||
Else
|
||||
FinderGrd.Visibility = Visibility.Visible
|
||||
' Rimuovo regioni per percorsi interni
|
||||
RemoveSelectRegions()
|
||||
FilePathTxBl.Visibility = Windows.Visibility.Visible
|
||||
@@ -1073,8 +1245,72 @@ Public Class ImportPageUC
|
||||
EgtDeselectAll()
|
||||
' Riabilito FiloTopBtn, DripCutBtn, DripDrillBtn e unità di misura
|
||||
FiloTopBtn.IsEnabled = m_MainWindow.m_CurrentMachine.bMilling
|
||||
DripCutBtn.IsEnabled = m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.UNDER_CUT) And
|
||||
If DripCutBtn.Visibility = Visibility.Visible Then
|
||||
DripCutBtn.IsEnabled = m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.UNDER_CUT) And
|
||||
Not String.IsNullOrWhiteSpace(m_MainWindow.m_CurrentMachine.sCurrDripSaw)
|
||||
Else
|
||||
EngraveBtn.IsEnabled = m_MainWindow.m_DrawPageUC.bEnableSideAngle
|
||||
End If
|
||||
DripDrillBtn.IsEnabled = m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.UNDER_CUT) And
|
||||
Not String.IsNullOrWhiteSpace(m_MainWindow.m_CurrentMachine.sCurrDripDrill)
|
||||
mmBtn.IsEnabled = True
|
||||
inchBtn.IsEnabled = True
|
||||
' Elimino scritte angoli per input e inserisco quelle definitive
|
||||
SideAngle.WriteSideAngleForNest(ImportScene.GetCtx())
|
||||
' Riabilito bottone reset
|
||||
ResetBtn.IsEnabled = True
|
||||
' Pulisco area messaggi
|
||||
MessageTxBx.Text = ""
|
||||
MessageBrd.Background = Brushes.Transparent
|
||||
End If
|
||||
EgtZoom(ZM.ALL)
|
||||
End Sub
|
||||
|
||||
Private Sub EngraveBtn_Click(sender As Object, e As RoutedEventArgs) Handles EngraveBtn.Click
|
||||
If EngraveBtn.IsChecked() Then
|
||||
FinderGrd.Visibility = Visibility.Hidden
|
||||
' Aggiungo regioni per percorsi interni
|
||||
AdjustSelectRegions()
|
||||
' Dichiaro nessuna selezione
|
||||
m_nSelectedPart = GDB_ID.NULL
|
||||
m_nSelectedLayer = GDB_ID.NULL
|
||||
' Imposto modalità sideangle
|
||||
m_SideAngleUC.m_Mode = SideAngleUC.ModeOpt.ENGRAVE
|
||||
LeftGrid.Children.Add(m_SideAngleUC)
|
||||
FilePathTxBl.Visibility = Windows.Visibility.Hidden
|
||||
FileListBox.Visibility = Windows.Visibility.Hidden
|
||||
' Disabilito FiloTopBtn, DripCutBtn, DripDrillBtn e unità di misura
|
||||
SideAngleBtn.IsEnabled = False
|
||||
FiloTopBtn.IsEnabled = False
|
||||
If DripCutBtn.Visibility = Visibility.Visible Then
|
||||
DripCutBtn.IsEnabled = False
|
||||
End If
|
||||
DripDrillBtn.IsEnabled = False
|
||||
mmBtn.IsEnabled = False
|
||||
inchBtn.IsEnabled = False
|
||||
' Disabilito bottone reset
|
||||
ResetBtn.IsEnabled = False
|
||||
' Messaggio di selezione da effettuare
|
||||
MessageTxBx.Text = EgtMsg(MSG_DRAWPAGEUC + 6) ' Selezionare un contorno
|
||||
MessageBrd.Background = Application.Current.FindResource("OmagCut_Green")
|
||||
Else
|
||||
FinderGrd.Visibility = Visibility.Visible
|
||||
' Rimuovo regioni per percorsi interni
|
||||
RemoveSelectRegions()
|
||||
FilePathTxBl.Visibility = Windows.Visibility.Visible
|
||||
FileListBox.Visibility = Windows.Visibility.Visible
|
||||
LeftGrid.Children.Remove(m_SideAngleUC)
|
||||
' Deseleziono eventuali pezzi rimasti selezionati
|
||||
m_nSelectedPart = GDB_ID.NULL
|
||||
m_nSelectedLayer = GDB_ID.NULL
|
||||
EgtDeselectAll()
|
||||
' Riabilito FiloTopBtn, DripCutBtn, DripDrillBtn e unità di misura
|
||||
FiloTopBtn.IsEnabled = m_MainWindow.m_CurrentMachine.bMilling
|
||||
SideAngleBtn.IsEnabled = m_MainWindow.m_DrawPageUC.bEnableSideAngle
|
||||
If DripCutBtn.Visibility = Visibility.Visible Then
|
||||
DripCutBtn.IsEnabled = m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.UNDER_CUT) And
|
||||
Not String.IsNullOrWhiteSpace(m_MainWindow.m_CurrentMachine.sCurrDripSaw)
|
||||
End If
|
||||
DripDrillBtn.IsEnabled = m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.UNDER_CUT) And
|
||||
Not String.IsNullOrWhiteSpace(m_MainWindow.m_CurrentMachine.sCurrDripDrill)
|
||||
mmBtn.IsEnabled = True
|
||||
@@ -1092,6 +1328,7 @@ Public Class ImportPageUC
|
||||
|
||||
Private Sub DripCutBtn_Click(sender As Object, e As RoutedEventArgs) Handles DripCutBtn.Click
|
||||
If DripCutBtn.IsChecked() Then
|
||||
FinderGrd.Visibility = Visibility.Hidden
|
||||
' Dichiaro nessuna selezione
|
||||
m_nSelectedPart = GDB_ID.NULL
|
||||
m_nSelectedLayer = GDB_ID.NULL
|
||||
@@ -1103,6 +1340,9 @@ Public Class ImportPageUC
|
||||
' Disabilito SideAngleBtn,FiloTop, DripDrillBtn e unità di misura
|
||||
SideAngleBtn.IsEnabled = False
|
||||
FiloTopBtn.IsEnabled = False
|
||||
If DripCutBtn.Visibility <> Visibility.Visible Then
|
||||
EngraveBtn.IsEnabled = False
|
||||
End If
|
||||
DripDrillBtn.IsEnabled = False
|
||||
mmBtn.IsEnabled = False
|
||||
inchBtn.IsEnabled = False
|
||||
@@ -1112,6 +1352,7 @@ Public Class ImportPageUC
|
||||
MessageTxBx.Text = EgtMsg(MSG_DRAWPAGEUC + 6) ' Selezionare un contorno
|
||||
MessageBrd.Background = Application.Current.FindResource("OmagCut_Green")
|
||||
Else
|
||||
FinderGrd.Visibility = Visibility.Visible
|
||||
FilePathTxBl.Visibility = Windows.Visibility.Visible
|
||||
FileListBox.Visibility = Windows.Visibility.Visible
|
||||
LeftGrid.Children.Remove(m_SideAngleUC)
|
||||
@@ -1122,8 +1363,9 @@ Public Class ImportPageUC
|
||||
' Riabilito SideAngleBtn, FiloTop, DripDrillBtn e unità di misura
|
||||
SideAngleBtn.IsEnabled = m_MainWindow.m_DrawPageUC.bEnableSideAngle
|
||||
FiloTopBtn.IsEnabled = m_MainWindow.m_CurrentMachine.bMilling
|
||||
DripDrillBtn.IsEnabled = m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.UNDER_CUT) And
|
||||
Not String.IsNullOrWhiteSpace(m_MainWindow.m_CurrentMachine.sCurrDripDrill)
|
||||
If DripCutBtn.Visibility <> Visibility.Visible Then
|
||||
EngraveBtn.IsEnabled = m_MainWindow.m_DrawPageUC.bEnableSideAngle
|
||||
End If
|
||||
mmBtn.IsEnabled = True
|
||||
inchBtn.IsEnabled = True
|
||||
' Elimino scritte angoli per input e inserisco quelle definitive
|
||||
@@ -1142,6 +1384,7 @@ Public Class ImportPageUC
|
||||
|
||||
Private Sub DripDrillBtn_Click(sender As Object, e As RoutedEventArgs) Handles DripDrillBtn.Click
|
||||
If DripDrillBtn.IsChecked() Then
|
||||
FinderGrd.Visibility = Visibility.Hidden
|
||||
' Aggiungo regioni di selezione per percorsi interni
|
||||
AdjustSelectRegions()
|
||||
' Imposto modalità fori da sotto
|
||||
@@ -1151,7 +1394,11 @@ Public Class ImportPageUC
|
||||
' Disabilito SideAngleBtn, FiloTop, DripCutBtn e unità di misura
|
||||
SideAngleBtn.IsEnabled = False
|
||||
FiloTopBtn.IsEnabled = False
|
||||
DripCutBtn.IsEnabled = False
|
||||
If DripCutBtn.Visibility = Visibility.Visible Then
|
||||
DripCutBtn.IsEnabled = False
|
||||
Else
|
||||
EngraveBtn.IsEnabled = False
|
||||
End If
|
||||
mmBtn.IsEnabled = False
|
||||
inchBtn.IsEnabled = False
|
||||
' Disabilito bottone reset
|
||||
@@ -1160,6 +1407,7 @@ Public Class ImportPageUC
|
||||
MessageTxBx.Text = EgtMsg(MSG_DRAWPAGEUC + 15) ' Selezionare uno o più fori
|
||||
MessageBrd.Background = Application.Current.FindResource("OmagCut_Green")
|
||||
Else
|
||||
FinderGrd.Visibility = Visibility.Visible
|
||||
' Rimuovo regioni per percorsi interni
|
||||
RemoveSelectRegions()
|
||||
FilePathTxBl.Visibility = Windows.Visibility.Visible
|
||||
@@ -1172,8 +1420,12 @@ Public Class ImportPageUC
|
||||
' Riabilito SideAngleBtn, FiloTop, DripCutBtn e unità di misura
|
||||
SideAngleBtn.IsEnabled = m_MainWindow.m_DrawPageUC.bEnableSideAngle
|
||||
FiloTopBtn.IsEnabled = m_MainWindow.m_CurrentMachine.bMilling
|
||||
DripCutBtn.IsEnabled = m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.UNDER_CUT) And
|
||||
If DripCutBtn.Visibility = Visibility.Visible Then
|
||||
DripCutBtn.IsEnabled = m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.UNDER_CUT) And
|
||||
Not String.IsNullOrWhiteSpace(m_MainWindow.m_CurrentMachine.sCurrDripSaw)
|
||||
Else
|
||||
EngraveBtn.IsEnabled = m_MainWindow.m_DrawPageUC.bEnableSideAngle
|
||||
End If
|
||||
mmBtn.IsEnabled = True
|
||||
inchBtn.IsEnabled = True
|
||||
' Riabilito bottone reset
|
||||
@@ -1187,6 +1439,7 @@ Public Class ImportPageUC
|
||||
|
||||
Private Sub FiloTopBtn_Click(sender As Object, e As RoutedEventArgs) Handles FiloTopBtn.Click
|
||||
If FiloTopBtn.IsChecked() Then
|
||||
FinderGrd.Visibility = Visibility.Hidden
|
||||
' Aggiungo regioni per percorsi interni
|
||||
AdjustSelectRegions()
|
||||
' Dichiaro nessuna selezione
|
||||
@@ -1198,7 +1451,11 @@ Public Class ImportPageUC
|
||||
FileListBox.Visibility = Windows.Visibility.Hidden
|
||||
' Disabilito SideAngleBtn, DripCutBtn, DripDrillBtn e unità di misura
|
||||
SideAngleBtn.IsEnabled = False
|
||||
DripCutBtn.IsEnabled = False
|
||||
If DripCutBtn.Visibility = Visibility.Visible Then
|
||||
DripCutBtn.IsEnabled = False
|
||||
Else
|
||||
EngraveBtn.IsEnabled = False
|
||||
End If
|
||||
DripDrillBtn.IsEnabled = False
|
||||
mmBtn.IsEnabled = False
|
||||
inchBtn.IsEnabled = False
|
||||
@@ -1208,6 +1465,7 @@ Public Class ImportPageUC
|
||||
MessageTxBx.Text = EgtMsg(MSG_DRAWPAGEUC + 6) ' Selezionare un contorno interno
|
||||
MessageBrd.Background = Application.Current.FindResource("OmagCut_Green")
|
||||
Else
|
||||
FinderGrd.Visibility = Visibility.Visible
|
||||
' Rimuovo regioni per percorsi interni
|
||||
RemoveSelectRegions()
|
||||
FilePathTxBl.Visibility = Windows.Visibility.Visible
|
||||
@@ -1219,8 +1477,12 @@ Public Class ImportPageUC
|
||||
EgtDeselectAll()
|
||||
' Riabilito SideAngleBtn, DripCutBtn, DripDrillBtn e unità di misura
|
||||
SideAngleBtn.IsEnabled = m_MainWindow.m_DrawPageUC.bEnableSideAngle
|
||||
DripCutBtn.IsEnabled = m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.UNDER_CUT) And
|
||||
If DripCutBtn.Visibility = Visibility.Visible Then
|
||||
DripCutBtn.IsEnabled = m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.UNDER_CUT) And
|
||||
Not String.IsNullOrWhiteSpace(m_MainWindow.m_CurrentMachine.sCurrDripSaw)
|
||||
Else
|
||||
EngraveBtn.IsEnabled = m_MainWindow.m_DrawPageUC.bEnableSideAngle
|
||||
End If
|
||||
DripDrillBtn.IsEnabled = m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.UNDER_CUT) And
|
||||
Not String.IsNullOrWhiteSpace(m_MainWindow.m_CurrentMachine.sCurrDripDrill)
|
||||
mmBtn.IsEnabled = True
|
||||
@@ -1279,8 +1541,9 @@ Public Class ImportPageUC
|
||||
If nType = GDB_TY.CRV_LINE Or nType = GDB_TY.CRV_ARC Or nType = GDB_TY.CRV_COMPO Then
|
||||
vCrvId.Add(nCrvId)
|
||||
End If
|
||||
ElseIf DripDrillBtn.IsChecked
|
||||
if nType = GDB_TY.CRV_ARC
|
||||
ElseIf DripDrillBtn.IsChecked Then
|
||||
|
||||
If nType = GDB_TY.CRV_ARC Then
|
||||
vCrvId.Add(nCrvId)
|
||||
End If
|
||||
End If
|
||||
@@ -1306,11 +1569,11 @@ Public Class ImportPageUC
|
||||
|
||||
Private Sub Cad2dBtn_Click(sender As Object, e As RoutedEventArgs) Handles Cad2dBtn.Click
|
||||
|
||||
Dim ProcsCad2d As Process() = Process.GetProcessesByName( m_sCad2dName)
|
||||
Dim ProcsCad2d As Process() = Process.GetProcessesByName(m_sCad2dName)
|
||||
If ProcsCad2d.Length() > 0 Then
|
||||
ShowWindow( ProcsCad2d(0).MainWindowHandle, 3)
|
||||
ShowWindow(ProcsCad2d(0).MainWindowHandle, 3)
|
||||
Else
|
||||
Process.Start( m_sCad2dPath)
|
||||
Process.Start(m_sCad2dPath)
|
||||
End If
|
||||
|
||||
End Sub
|
||||
@@ -1319,42 +1582,42 @@ End Class
|
||||
|
||||
Public Class IconListBoxItem
|
||||
|
||||
Private m_iPictureID As Integer
|
||||
Private m_sName As String
|
||||
Private m_iPictureID As Integer
|
||||
Private m_sName As String
|
||||
|
||||
Public Property PictureID() As Integer
|
||||
Get
|
||||
Return m_iPictureID
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
m_iPictureID = value
|
||||
End Set
|
||||
End Property
|
||||
Public Property PictureID() As Integer
|
||||
Get
|
||||
Return m_iPictureID
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
m_iPictureID = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property Name() As String
|
||||
Get
|
||||
Return m_sName
|
||||
End Get
|
||||
Set(value As String)
|
||||
m_sName = value
|
||||
End Set
|
||||
End Property
|
||||
Public Property Name() As String
|
||||
Get
|
||||
Return m_sName
|
||||
End Get
|
||||
Set(value As String)
|
||||
m_sName = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property PictureString() As String
|
||||
Get
|
||||
Return "/Resources/ImportPageListBoxImages/" + PictureID.ToString() + ".png"
|
||||
End Get
|
||||
End Property
|
||||
Public ReadOnly Property PictureString() As String
|
||||
Get
|
||||
Return "/Resources/ImportPageListBoxImages/" + PictureID.ToString() + ".png"
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Sub New()
|
||||
Me.Name = String.Empty
|
||||
Me.PictureID = 0
|
||||
End Sub
|
||||
Sub New()
|
||||
Me.Name = String.Empty
|
||||
Me.PictureID = 0
|
||||
End Sub
|
||||
|
||||
Sub New(Name As String, PictureID As Integer)
|
||||
Me.Name = Name
|
||||
Me.PictureID = PictureID
|
||||
End Sub
|
||||
Sub New(Name As String, PictureID As Integer)
|
||||
Me.Name = Name
|
||||
Me.PictureID = PictureID
|
||||
End Sub
|
||||
|
||||
|
||||
End Class
|
||||
@@ -33,14 +33,31 @@ Public Class MainComponentPageUC
|
||||
m_bIsFirstPage = True
|
||||
LoadPage()
|
||||
CurrentBtn = Nothing
|
||||
Compo9.SetValue(Grid.ColumnProperty, 0)
|
||||
Compo9.SetValue(Grid.ColumnSpanProperty, 2)
|
||||
ImageCompo9.Visibility = Windows.Visibility.Hidden
|
||||
LabelCompo9.Visibility = Windows.Visibility.Visible
|
||||
If m_MainWindow.FrameCutBtn.IsChecked Then
|
||||
' se il numero delle componenti è superiore a 8 allora inserisco la seconda pagina
|
||||
If GetPrivateProfileInt(S_FRAMECOMPO, K_CMP_COUNT, 0, m_MainWindow.GetIniFile()) > 8 Then
|
||||
OthersBackGr.Visibility = Visibility.Visible
|
||||
Compo9.SetValue(Grid.ColumnProperty, 0)
|
||||
Compo9.SetValue(Grid.ColumnSpanProperty, 2)
|
||||
ImageCompo9.Visibility = Windows.Visibility.Hidden
|
||||
LabelCompo9.Visibility = Windows.Visibility.Visible
|
||||
Else
|
||||
OthersBackGr.Visibility = Visibility.Hidden
|
||||
End If
|
||||
Else
|
||||
OthersBackGr.Visibility = Visibility.Visible
|
||||
Compo9.SetValue(Grid.ColumnProperty, 0)
|
||||
Compo9.SetValue(Grid.ColumnSpanProperty, 2)
|
||||
ImageCompo9.Visibility = Windows.Visibility.Hidden
|
||||
LabelCompo9.Visibility = Windows.Visibility.Visible
|
||||
End If
|
||||
|
||||
|
||||
m_MainWindow.m_DrawPageUC.SideAngleBtn.IsEnabled = False
|
||||
m_MainWindow.m_DrawPageUC.FiloTopBtn.IsEnabled = False
|
||||
m_MainWindow.m_DrawPageUC.EngraveBtn.IsEnabled = False
|
||||
m_MainWindow.m_DrawPageUC.DripCutBtn.IsEnabled = False
|
||||
m_MainWindow.m_DrawPageUC.m_bBackFromInternalCompo = False
|
||||
End Sub
|
||||
|
||||
Private Function GetButton(ByVal nInd As Integer) As Button
|
||||
@@ -167,7 +184,7 @@ 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 = S_COMPO & GetIndexFromButton(CurrentBtn).ToString
|
||||
Dim CompoName As String = If(m_MainWindow.FrameCutBtn.IsChecked, S_FRAMECOMPO, S_COMPO) & GetIndexFromButton(CurrentBtn).ToString
|
||||
m_sCurrCompoFam = CompoName
|
||||
m_SecondaryComponentPage.m_sCurrCompo = String.Empty
|
||||
Dim nCount As Integer = GetPrivateProfileInt(CompoName, K_CMP_COUNT, 0, m_MainWindow.GetIniFile())
|
||||
@@ -251,13 +268,18 @@ Public Class MainComponentPageUC
|
||||
End Sub
|
||||
|
||||
Private Sub LoadPage()
|
||||
If m_MainWindow.FrameCutBtn.IsChecked Then
|
||||
LoadFramePage()
|
||||
Return
|
||||
End If
|
||||
|
||||
Dim nDeltaSecondPage As Integer = 8
|
||||
' Leggo numero di componenti presenti
|
||||
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)
|
||||
nDeltaSecondPage = 0
|
||||
nDeltaSecondPage = 0
|
||||
Else
|
||||
ClearButton(nCompoNumber)
|
||||
nDeltaSecondPage = 8
|
||||
@@ -325,16 +347,86 @@ Public Class MainComponentPageUC
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub LoadFramePage()
|
||||
Dim nDeltaSecondPage As Integer = 8
|
||||
' Leggo numero di componenti presenti
|
||||
Dim nCompoNumber As Integer = GetPrivateProfileInt(S_FRAMECOMPO, K_CMP_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(S_FRAMECOMPO & index + nDeltaSecondPage, "Name", 0, m_MainWindow.GetIniFile())
|
||||
Dim sCompoImage As String = ""
|
||||
Dim sCompoImageSource As ImageSource
|
||||
|
||||
'verifico presenza immagine e la aggiungo
|
||||
If GetPrivateProfileString(S_FRAMECOMPO & 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
|
||||
|
||||
+12
-12
@@ -56,7 +56,7 @@
|
||||
<TextBlock Name="Entity1" Grid.Row="1" Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||
<CheckBox Name="A1" Grid.Column="1" Grid.Row="1" Height="30" Width="40" HorizontalAlignment="Right"
|
||||
Margin="-20,0,0,0"/>
|
||||
<EgtWPFLib:EgtTextBox Name="A1TxBx" Grid.Column="2" Grid.Row="1" Width="60"
|
||||
<EgtWPFLib:EgtTextBox Name="A1TxBx" Grid.Column="2" Grid.Row="1" Width="60" IsLength="False"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="H1TxBx" Grid.Column="3" Grid.Row="1" Width="60"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
@@ -64,7 +64,7 @@
|
||||
<TextBlock Name="Entity2" Grid.Row="2" Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||
<CheckBox Name="A2" Grid.Column="1" Grid.Row="2" Height="30" Width="40" HorizontalAlignment="Right"
|
||||
Margin="-20,0,0,0"/>
|
||||
<EgtWPFLib:EgtTextBox Name="A2TxBx" Grid.Column="2" Grid.Row="2" Width="60"
|
||||
<EgtWPFLib:EgtTextBox Name="A2TxBx" Grid.Column="2" Grid.Row="2" Width="60" IsLength="False"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="H2TxBx" Grid.Column="3" Grid.Row="2" Width="60"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
@@ -72,7 +72,7 @@
|
||||
<TextBlock Name="Entity3" Grid.Row="3" Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||
<CheckBox Name="A3" Grid.Column="1" Grid.Row="3" Height="30" Width="40" HorizontalAlignment="Right"
|
||||
Margin="-20,0,0,0"/>
|
||||
<EgtWPFLib:EgtTextBox Name="A3TxBx" Grid.Column="2" Grid.Row="3" Width="60"
|
||||
<EgtWPFLib:EgtTextBox Name="A3TxBx" Grid.Column="2" Grid.Row="3" Width="60" IsLength="False"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="H3TxBx" Grid.Column="3" Grid.Row="3" Width="60"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
@@ -80,7 +80,7 @@
|
||||
<TextBlock Name="Entity4" Grid.Row="4" Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||
<CheckBox Name="A4" Grid.Column="1" Grid.Row="4" Height="30" Width="40" HorizontalAlignment="Right"
|
||||
Margin="-20,0,0,0"/>
|
||||
<EgtWPFLib:EgtTextBox Name="A4TxBx" Grid.Column="2" Grid.Row="4" Width="60"
|
||||
<EgtWPFLib:EgtTextBox Name="A4TxBx" Grid.Column="2" Grid.Row="4" Width="60" IsLength="False"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="H4TxBx" Grid.Column="3" Grid.Row="4" Width="60"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
@@ -88,7 +88,7 @@
|
||||
<TextBlock Name="Entity5" Grid.Row="5" Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||
<CheckBox Name="A5" Grid.Column="1" Grid.Row="5" Height="30" Width="40" HorizontalAlignment="Right"
|
||||
Margin="-20,0,0,0"/>
|
||||
<EgtWPFLib:EgtTextBox Name="A5TxBx" Grid.Column="2" Grid.Row="5" Width="60"
|
||||
<EgtWPFLib:EgtTextBox Name="A5TxBx" Grid.Column="2" Grid.Row="5" Width="60" IsLength="False"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="H5TxBx" Grid.Column="3" Grid.Row="5" Width="60"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
@@ -96,7 +96,7 @@
|
||||
<TextBlock Name="Entity6" Grid.Row="6" Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||
<CheckBox Name="A6" Grid.Column="1" Grid.Row="6" Height="30" Width="40" HorizontalAlignment="Right"
|
||||
Margin="-20,0,0,0"/>
|
||||
<EgtWPFLib:EgtTextBox Name="A6TxBx" Grid.Column="2" Grid.Row="6" Width="60"
|
||||
<EgtWPFLib:EgtTextBox Name="A6TxBx" Grid.Column="2" Grid.Row="6" Width="60" IsLength="False"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="H6TxBx" Grid.Column="3" Grid.Row="6" Width="60"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
@@ -104,7 +104,7 @@
|
||||
<TextBlock Name="Entity7" Grid.Row="7" Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||
<CheckBox Name="A7" Grid.Column="1" Grid.Row="7" Height="30" Width="40" HorizontalAlignment="Right"
|
||||
Margin="-20,0,0,0"/>
|
||||
<EgtWPFLib:EgtTextBox Name="A7TxBx" Grid.Column="2" Grid.Row="7" Width="60"
|
||||
<EgtWPFLib:EgtTextBox Name="A7TxBx" Grid.Column="2" Grid.Row="7" Width="60" IsLength="False"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="H7TxBx" Grid.Column="3" Grid.Row="7" Width="60"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
@@ -112,7 +112,7 @@
|
||||
<TextBlock Name="Entity8" Grid.Row="8" Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||
<CheckBox Name="A8" Grid.Column="1" Grid.Row="8" Height="30" Width="40" HorizontalAlignment="Right"
|
||||
Margin="-20,0,0,0"/>
|
||||
<EgtWPFLib:EgtTextBox Name="A8TxBx" Grid.Column="2" Grid.Row="8" Width="60"
|
||||
<EgtWPFLib:EgtTextBox Name="A8TxBx" Grid.Column="2" Grid.Row="8" Width="60" IsLength="False"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="H8TxBx" Grid.Column="3" Grid.Row="8" Width="60"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
@@ -120,7 +120,7 @@
|
||||
<TextBlock Name="Entity9" Grid.Row="9" Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||
<CheckBox Name="A9" Grid.Column="1" Grid.Row="9" Height="30" Width="40" HorizontalAlignment="Right"
|
||||
Margin="-20,0,0,0"/>
|
||||
<EgtWPFLib:EgtTextBox Name="A9TxBx" Grid.Column="2" Grid.Row="9" Width="60"
|
||||
<EgtWPFLib:EgtTextBox Name="A9TxBx" Grid.Column="2" Grid.Row="9" Width="60" IsLength="False"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="H9TxBx" Grid.Column="3" Grid.Row="9" Width="60"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
@@ -128,7 +128,7 @@
|
||||
<TextBlock Name="Entity10" Grid.Row="10" Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||
<CheckBox Name="A10" Grid.Column="1" Grid.Row="10" Height="30" Width="40" HorizontalAlignment="Right"
|
||||
Margin="-20,0,0,0"/>
|
||||
<EgtWPFLib:EgtTextBox Name="A10TxBx" Grid.Column="2" Grid.Row="10" Width="60"
|
||||
<EgtWPFLib:EgtTextBox Name="A10TxBx" Grid.Column="2" Grid.Row="10" Width="60" IsLength="False"
|
||||
Margin="0,0,0,-2"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="H10TxBx" Grid.Column="3" Grid.Row="10" Width="60"
|
||||
@@ -169,7 +169,7 @@
|
||||
<UniformGrid Rows="1" Grid.Column="2" Grid.Row="1" Grid.ColumnSpan="2" Width="90" >
|
||||
<EgtWPFLib:EgtTextBox Name="Parameter2aTxBx"
|
||||
Grid.Column="2" Grid.Row="12"
|
||||
Width="40" Height="30"
|
||||
Width="40" Height="30" IsLength="False"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="Parameter2bTxBx"
|
||||
Grid.Column="3" Grid.Row="12"
|
||||
@@ -204,7 +204,7 @@
|
||||
<EgtWPFLib:EgtTextBox Name="Parameter5TxBx"
|
||||
Grid.Column="2" Grid.ColumnSpan="2" Grid.Row="4"
|
||||
Margin="0,0,0,-2"
|
||||
Width="85" Height="30"
|
||||
Width="85" Height="30" IsLength="False"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
|
||||
</Grid>
|
||||
|
||||
@@ -191,7 +191,7 @@ Public Class SideAngleUC
|
||||
Parameter2bTxBx.Text = LenToString( m_dDripOffset2, 3)
|
||||
Parameter3TxBx.Text = LenToString( m_dDripDepth, 3)
|
||||
Parameter4TxBx.Text = LenToString(m_dEngraveDepth2, 3)
|
||||
Parameter5TxBx.Text = LenToString(m_dEngraveAngle, 3)
|
||||
Parameter5TxBx.Text = DoubleToString(m_dEngraveAngle, 3)
|
||||
End If
|
||||
|
||||
' Aggiorno visualizzazione
|
||||
@@ -1417,7 +1417,7 @@ Public Class SideAngleUC
|
||||
Private Sub Parameter5TxBx_EgtClosed(sender As Object, e As EventArgs) Handles Parameter5TxBx.EgtClosed
|
||||
If m_Mode = ModeOpt.ENGRAVE Then
|
||||
' Recupero il valore
|
||||
StringToLen(Parameter5TxBx.Text, m_dEngraveAngle)
|
||||
StringToDouble(Parameter5TxBx.Text, m_dEngraveAngle)
|
||||
' Creo le geometrie dei gocciolatoi
|
||||
RefreshSideAngleText()
|
||||
End If
|
||||
|
||||
+135
-104
@@ -7,124 +7,155 @@
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="853.3" d:DesignWidth="1280">
|
||||
|
||||
<!-- Definizione della FrameCutPage -->
|
||||
<Grid Name="FrameCutPageGrid" >
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="3*"/>
|
||||
<ColumnDefinition Width="12*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="8*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<!-- Definizione della Grid superiore -->
|
||||
<Grid Grid.Column="1" Grid.Row="0" >
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="4*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Button Name="PhotoBtn" Grid.Column="0" Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}">
|
||||
<Image Source="{DynamicResource PhotoImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="RawPartBtn" Grid.Column="1" Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}">
|
||||
<Image Source="{DynamicResource RawPartImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
<ToggleButton Name="MachiningBtn" Grid.Column="4" Style="{DynamicResource OmagCut_RightGrayYellowIconToggleButton}">
|
||||
<Image Source="{DynamicResource FrameMachiningImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
</ToggleButton>
|
||||
|
||||
</Grid>
|
||||
|
||||
<Grid Name="LeftGrid" Grid.Row="1">
|
||||
<Grid.RowDefinitions>
|
||||
<!-- Definizione della FrameCutPage -->
|
||||
<Grid Name="FrameCutPageGrid" >
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="3*"/>
|
||||
<ColumnDefinition Width="12*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="7*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<Grid Grid.Row="1">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="0.6*"/>
|
||||
<RowDefinition Height="0.8*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.8*"/>
|
||||
<RowDefinition Height="2.5*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<RowDefinition Height="8*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<ComboBox Name="AlongAxCmBx" Grid.Row="0" Grid.ColumnSpan="3" Style="{StaticResource OmagCut_ComboBox}"
|
||||
Width="200" MaxDropDownHeight="300">
|
||||
<ComboBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding}" Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</DataTemplate>
|
||||
</ComboBox.ItemTemplate>
|
||||
</ComboBox>
|
||||
<!-- Definizione della Grid superiore -->
|
||||
<Grid Grid.Column="1" Grid.Row="0" >
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="4*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<UniformGrid Grid.Column="0" Grid.Row="1" Grid.ColumnSpan="3" Columns="2" >
|
||||
<Button Name="SelSectionBtn"
|
||||
Style="{DynamicResource OmagCut_YellowGradientYellowIconButton}">
|
||||
<Button Name="PhotoBtn" Grid.Column="0" Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}">
|
||||
<Image Source="{DynamicResource PhotoImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="RawPartBtn" Grid.Column="1" Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}">
|
||||
<Image Source="{DynamicResource RawPartImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
|
||||
<Button Name="CompoBtn" Grid.Column="2" Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}">
|
||||
<Image Source="{DynamicResource DrawImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
|
||||
<Button Name="SelSectionBtn" Grid.Column="3" Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}">
|
||||
<Image Source="{DynamicResource Sezione-corniceImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
|
||||
<Grid>
|
||||
<Button Name="SelGuideBtn"
|
||||
Style="{DynamicResource OmagCut_YellowTextButton}"/>
|
||||
<UniformGrid Name="ArcGrid" Grid.Column="0" Grid.Row="1" Grid.ColumnSpan="3" Columns="2" >
|
||||
<TextBlock Name="ArcRadTxBl" Grid.Row="2" Grid.ColumnSpan="2"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="ArcRadTxBx" Grid.Column="2" Grid.Row="2" Width="50"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
<TextBlock Name="ArcAngTxBl" Grid.Row="3" Grid.ColumnSpan="2"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="ArcAngTxBx" Grid.Column="2" Grid.Row="3" Width="50"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
</UniformGrid>
|
||||
</Grid>
|
||||
</UniformGrid>
|
||||
|
||||
<TextBlock Name="OffsZTxBl" Grid.Row="2" Grid.ColumnSpan="2"
|
||||
<ToggleButton Name="MachiningBtn" Grid.Column="4" Style="{DynamicResource OmagCut_RightGrayYellowIconToggleButton}">
|
||||
<Image Source="{DynamicResource FrameMachiningImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
</ToggleButton>
|
||||
|
||||
</Grid>
|
||||
|
||||
<Grid Name="LeftGrid" Grid.Row="1">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="7*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<Grid Grid.Row="1">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="0.6*"/>
|
||||
<RowDefinition Height="0.8*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.8*"/>
|
||||
<RowDefinition Height="0.8*"/>
|
||||
<RowDefinition Height="1.7*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<ComboBox Name="AlongAxCmBx" Grid.Row="0" Grid.ColumnSpan="3" Style="{StaticResource OmagCut_ComboBox}"
|
||||
Width="200" MaxDropDownHeight="300">
|
||||
<ComboBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding}" Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</DataTemplate>
|
||||
</ComboBox.ItemTemplate>
|
||||
</ComboBox>
|
||||
|
||||
<UniformGrid Grid.Column="0" Grid.Row="1" Grid.ColumnSpan="3" Columns="2" >
|
||||
<!--<Button Name="SelSectionBtn"
|
||||
Style="{DynamicResource OmagCut_YellowGradientYellowIconButton}">
|
||||
<Image Source="{DynamicResource Sezione-corniceImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||
</Button>-->
|
||||
|
||||
<Grid>
|
||||
<Button Name="SelGuideBtn" Style="{DynamicResource OmagCut_YellowTextButton}"/>
|
||||
<UniformGrid Name="ArcGrid" Grid.Column="0" Grid.Row="1" Grid.ColumnSpan="3" Columns="2" >
|
||||
<TextBlock Name="ArcRadTxBl" Grid.Row="2" Grid.ColumnSpan="2"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="ArcRadTxBx" Grid.Column="2" Grid.Row="2" Width="50"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
<TextBlock Name="ArcAngTxBl" Grid.Row="3" Grid.ColumnSpan="2"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="ArcAngTxBx" Grid.Column="2" Grid.Row="3" Width="50"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
</UniformGrid>
|
||||
</Grid>
|
||||
</UniformGrid>
|
||||
|
||||
<TextBlock Name="OffsZTxBl" Grid.Row="2" Grid.ColumnSpan="2"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="OffsZTxBx" Grid.Column="2" Grid.Row="2" Width="50"
|
||||
<EgtWPFLib:EgtTextBox Name="OffsZTxBx" Grid.Column="2" Grid.Row="2" Width="50"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
|
||||
<TextBlock Name="OffsXyTxBl" Grid.Row="3" Grid.ColumnSpan="2"
|
||||
<TextBlock Name="OffsXyTxBl" Grid.Row="3" Grid.ColumnSpan="2"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="OffsXyTxBx" Grid.Column="2" Grid.Row="3" Width="50"
|
||||
<EgtWPFLib:EgtTextBox Name="OffsXyTxBx" Grid.Column="2" Grid.Row="3" Width="50"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
|
||||
<TextBlock Name="OffsYyTxBl" Grid.Row="4" Grid.ColumnSpan="2"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="OffsYyTxBx" Grid.Column="2" Grid.Row="4" Width="50"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
<TextBlock Name="OffsYyTxBl" Grid.Row="4" Grid.ColumnSpan="2"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="OffsYyTxBx" Grid.Column="2" Grid.Row="4" Width="50"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
|
||||
<UniformGrid Grid.Column="0" Grid.Row="5" Grid.ColumnSpan="3" Columns="2" >
|
||||
<Button Name="MirrorPartBtn"
|
||||
<Grid Grid.Column="0" Grid.Row="5" Grid.ColumnSpan="3">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1.5*"/>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Name="OffsXInteryTxBl" Grid.Column="0"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||
<CheckBox Name="UseInteraxisChBx" Grid.Row="7" Grid.Column="1" Height="30" Width="40" HorizontalAlignment="Right"
|
||||
Margin="-20,0,0,0"/>
|
||||
<EgtWPFLib:EgtTextBox Name="OffsXInteryTxBx" Grid.Column="2" Width="50"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" IsEnabled="{Binding ElementName=UseInteraxisChBx, Path=IsChecked}"/>
|
||||
</Grid>
|
||||
|
||||
<UniformGrid Grid.Column="0" Grid.Row="7" Grid.ColumnSpan="3" Columns="2" >
|
||||
<Button Name="MirrorPartBtn"
|
||||
Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}">
|
||||
<Image Source="{DynamicResource SpecchiaImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="RemovePartBtn"
|
||||
</Button>
|
||||
<Button Name="RemovePartBtn"
|
||||
Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}">
|
||||
<Image Source="{DynamicResource Rimuovi_eliminaImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
</UniformGrid>
|
||||
</Button>
|
||||
</UniformGrid>
|
||||
|
||||
<!--<TextBlock Name="SawRoughingTxBl" Grid.Row="4" Grid.ColumnSpan="3"
|
||||
<!--<UniformGrid Grid.Column="0" Grid.Row="6" Grid.ColumnSpan="3" Columns="2" >
|
||||
<Button Name="CompoBtn"
|
||||
Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}">
|
||||
<Image Source="{DynamicResource DrawImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
</UniformGrid>-->
|
||||
|
||||
<!--<TextBlock Name="SawRoughingTxBl" Grid.Row="4" Grid.ColumnSpan="3"
|
||||
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||
|
||||
<ComboBox Name="SawRoughingCmBx" Grid.Row="5" Grid.ColumnSpan="3" Style="{StaticResource OmagCut_ComboBox}"
|
||||
@@ -182,10 +213,10 @@
|
||||
</ComboBox.ItemTemplate>
|
||||
</ComboBox>-->
|
||||
|
||||
</Grid>
|
||||
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
||||
</Grid>
|
||||
|
||||
</UserControl>
|
||||
|
||||
@@ -52,6 +52,10 @@ Public Class FrameCutPageUC
|
||||
OffsXyTxBx.Text = LenToString(dOffsXY, 3)
|
||||
Dim dOffsYY As Double = GetPrivateProfileDouble(S_FRAME, K_OFFSYY, 5, m_MainWindow.GetIniFile())
|
||||
OffsYyTxBx.Text = LenToString(dOffsYY, 3)
|
||||
Dim dOffsXInterY As Double = GetPrivateProfileDouble(S_FRAME, K_OFFSXINTERY, 5, m_MainWindow.GetIniFile())
|
||||
OffsXInteryTxBx.Text = LenToString(dOffsXInterY, 3)
|
||||
Dim bOffsYInterYSawTh As Boolean = False
|
||||
UseInteraxisChBx.IsChecked = (GetPrivateProfileInt(S_FRAME, K_OFFSXINTERYSAWTH, 0, m_MainWindow.GetIniFile()) <> 1)
|
||||
|
||||
' Imposto i messaggi letti dal file dei messaggi
|
||||
m_AlongAx.Add(EgtMsg(MSG_FRAMECUTPAGEUC + 1)) 'Lungo X
|
||||
@@ -70,6 +74,18 @@ Public Class FrameCutPageUC
|
||||
OffsZTxBl.Text = EgtMsg(MSG_FRAMECUTPAGEUC + 8) 'Distanza sopra
|
||||
OffsXyTxBl.Text = EgtMsg(MSG_FRAMECUTPAGEUC + 9) 'Distanza inizio
|
||||
OffsYyTxBl.Text = EgtMsg(MSG_FRAMECUTPAGEUC + 22) 'Distanza Y
|
||||
OffsXInteryTxBl.Text = EgtMsg(90645) 'Interasse
|
||||
Dim sChBxToolTip As String = EgtMsg(90646) 'Applica valore indicato\n altrienti spessore lama
|
||||
sChBxToolTip = sChBxToolTip.Replace("/n", "£")
|
||||
Dim sItems As String() = sChBxToolTip.Split("£")
|
||||
For Index As Integer = 0 To sItems.Count - 1
|
||||
If Index = 0 Then
|
||||
sChBxToolTip = sItems(Index).Trim
|
||||
Else
|
||||
sChBxToolTip &= vbCrLf & sItems(Index).Trim
|
||||
End If
|
||||
Next
|
||||
UseInteraxisChBx.ToolTip = sChBxToolTip
|
||||
End Sub
|
||||
|
||||
Private Sub FrameCutPage_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded
|
||||
@@ -81,6 +97,12 @@ Public Class FrameCutPageUC
|
||||
m_ProjectMgr.CSVBtn.Visibility = Windows.Visibility.Hidden
|
||||
m_ProjectMgr.VeinMatchingBtn.Visibility = Windows.Visibility.Hidden
|
||||
m_ProjectMgr.RegisterBtn.Visibility = Windows.Visibility.Hidden
|
||||
' Visualizzo il bottone per l'importazione dei compo frame
|
||||
If m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.COMPOFRAME) AndAlso GetPrivateProfileInt(S_FRAMECOMPO, K_CMP_COUNT, 0, m_MainWindow.GetIniFile()) > 0 Then
|
||||
CompoBtn.Visibility = Visibility.Visible
|
||||
Else
|
||||
CompoBtn.Visibility = Visibility.Hidden
|
||||
End If
|
||||
' Recupero dimensioni e kerf del grezzo
|
||||
m_nRawId = EgtGetFirstRawPart()
|
||||
GetRawBox(m_RawBox)
|
||||
@@ -271,7 +293,7 @@ Public Class FrameCutPageUC
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub OffsXXTxBx_EgtClosed(sender As Object, e As EventArgs) Handles OffsZTxBx.EgtClosed, OffsXyTxBx.EgtClosed, OffsYyTxBx.EgtClosed
|
||||
Private Sub OffsXXTxBx_EgtClosed(sender As Object, e As EventArgs) Handles OffsZTxBx.EgtClosed, OffsXyTxBx.EgtClosed, OffsYyTxBx.EgtClosed, OffsXInteryTxBx.EgtClosed, UseInteraxisChBx.Click
|
||||
' Forzo aggiornamento grezzo nella pagina di Nesting
|
||||
m_MainWindow.m_CadCutPageUC.m_NestPage.CalcRawPart()
|
||||
' Parcheggio pezzi presenti nel grezzo
|
||||
@@ -296,9 +318,18 @@ Public Class FrameCutPageUC
|
||||
WritePrivateProfileString(S_FRAME, K_OFFSXY, DoubleToString(dOffsXy, 3), m_MainWindow.GetIniFile())
|
||||
End If
|
||||
Dim dOffsYy As Double = 0
|
||||
If StringToLen(OffsYyTxBx.Text, dOffsYY) Then
|
||||
If StringToLen(OffsYyTxBx.Text, dOffsYy) Then
|
||||
WritePrivateProfileString(S_FRAME, K_OFFSYY, DoubleToString(dOffsYy, 3), m_MainWindow.GetIniFile())
|
||||
End If
|
||||
Dim dOffsXIntery As Double = 0
|
||||
If StringToLen(OffsXInteryTxBx.Text, dOffsXIntery) Then
|
||||
WritePrivateProfileString(S_FRAME, K_OFFSXINTERY, DoubleToString(dOffsXIntery, 3), m_MainWindow.GetIniFile())
|
||||
End If
|
||||
Dim sUseInteraxis As String = "1"
|
||||
If UseInteraxisChBx.IsChecked Then
|
||||
sUseInteraxis = "0"
|
||||
End If
|
||||
WritePrivateProfileString(S_FRAME, K_OFFSXINTERYSAWTH, sUseInteraxis, m_MainWindow.GetIniFile())
|
||||
End Sub
|
||||
|
||||
Private Sub MirrorPartBtn_Click(sender As Object, e As RoutedEventArgs) Handles MirrorPartBtn.Click
|
||||
@@ -436,6 +467,16 @@ Public Class FrameCutPageUC
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub CompoBtn_Click(sender As Object, e As RoutedEventArgs) Handles CompoBtn.Click
|
||||
m_MainWindow.TestOff()
|
||||
m_MainWindow.DragRettangleOff()
|
||||
m_MainWindow.SplitCurvWJOff()
|
||||
m_MainWindow.StartCurvWJOff()
|
||||
m_MainWindow.MainWindowGrid.Children.Remove(m_MainWindow.m_CurrentProjectPageUC)
|
||||
m_MainWindow.MainWindowGrid.Children.Add(m_MainWindow.m_DrawPageUC)
|
||||
m_MainWindow.m_ActivePage = MainWindow.Pages.Draw
|
||||
End Sub
|
||||
|
||||
Friend Function CreateFrame(nPartId As Integer) As Boolean
|
||||
If Not MyCreateFrame( nPartId) Then
|
||||
EgtErase( nPartId)
|
||||
@@ -936,12 +977,29 @@ Public Class FrameCutPageUC
|
||||
' Determino distanza da spessore lama
|
||||
Dim dMinDist As Double = 0
|
||||
Dim dSawThick As Double = 0
|
||||
Dim dOffsXIntery As Double = 0
|
||||
StringToLen(OffsXInteryTxBx.Text, dOffsXIntery)
|
||||
If EgtTdbSetCurrTool(m_MainWindow.m_CurrentMachine.sCurrSaw) AndAlso
|
||||
EgtTdbGetCurrToolParam(MCH_TP.THICK, dSawThick) Then
|
||||
dMinDist = dSawThick + 5 * EPS_SMALL
|
||||
If UseInteraxisChBx.IsChecked Then
|
||||
If dOffsXIntery < 0 Then
|
||||
dMinDist = 5 * EPS_SMALL
|
||||
OffsXInteryTxBx.Text = "0"
|
||||
Else
|
||||
dMinDist = dOffsXIntery + 5 * EPS_SMALL
|
||||
End If
|
||||
Else
|
||||
dMinDist = dSawThick + 5 * EPS_SMALL
|
||||
End If
|
||||
'If dOffsXIntery <= dSawThick Then
|
||||
' dMinDist = dSawThick + 5 * EPS_SMALL
|
||||
' EgtOutLog("WARNINGS: Saw tickness is more width then interaxis")
|
||||
'Else
|
||||
' dMinDist = dOffsXIntery + 5 * EPS_SMALL
|
||||
'End If
|
||||
Else
|
||||
EgtOutLog("Not found current saw for frames mindist")
|
||||
dMinDist = 0
|
||||
dMinDist = dOffsXIntery
|
||||
End If
|
||||
' Inserisco il pezzo nel grezzo
|
||||
Dim ptIns As Point3d
|
||||
|
||||
@@ -0,0 +1,63 @@
|
||||
<Window x:Class="LicenseWindow"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
|
||||
FontFamily="{DynamicResource OmagCut_Font}"
|
||||
Title="OpenFile" Height="587.4" Width="500.6" WindowStyle="None"
|
||||
ResizeMode="NoResize" ShowInTaskbar="False" AllowsTransparency="True"
|
||||
Background="Transparent">
|
||||
<Border Style="{DynamicResource OmagCut_Border}">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="0.2*"/>
|
||||
<ColumnDefinition Width="4*"/>
|
||||
<ColumnDefinition Width="0.2*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="1.5*"/>
|
||||
<RowDefinition Height="5.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="1.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<StackPanel Grid.Column="0" Grid.Row="1" Grid.ColumnSpan="3"
|
||||
Orientation="Horizontal"
|
||||
HorizontalAlignment="Center">
|
||||
<TextBlock Name="IconTxBl" Foreground="White" FontSize="32"
|
||||
VerticalAlignment="Center" HorizontalAlignment="Center"/>
|
||||
<TextBlock Name="LicenseTxBl"
|
||||
Foreground="White" FontSize="20"
|
||||
VerticalAlignment="Center" HorizontalAlignment="Left"
|
||||
TextWrapping="Wrap"/>
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel Grid.Column="1" Grid.Row="2" Orientation="Horizontal"
|
||||
HorizontalAlignment="Center">
|
||||
<ScrollViewer Name="MyScrollViewer" VerticalScrollBarVisibility="Auto">
|
||||
<TextBlock Name="LicenseMsgTxBl" MaxWidth="425"
|
||||
HorizontalAlignment="Center"
|
||||
Foreground="{DynamicResource Omag_White}" FontSize="20" VerticalAlignment="Center"
|
||||
TextWrapping="Wrap"/>
|
||||
</ScrollViewer>
|
||||
</StackPanel>
|
||||
<Grid Grid.Column="1" Grid.Row="4">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Button Name="ExitBtn" Grid.Column="2" Style="{DynamicResource OmagCut_GradientBlueIconButton}" IsCancel="True">
|
||||
<Image Source="{DynamicResource XImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
|
||||
</Grid>
|
||||
|
||||
</Grid>
|
||||
|
||||
</Border>
|
||||
</Window>
|
||||
@@ -0,0 +1,37 @@
|
||||
Public Class LicenseWindow
|
||||
|
||||
Private m_sMessage As String = String.Empty
|
||||
Private m_sTitle As String = String.Empty
|
||||
|
||||
Public Sub New(Owner As Window, sMsg As String, sTitle As String)
|
||||
Me.Owner = Owner
|
||||
m_sMessage = sMsg
|
||||
m_sTitle = sTitle
|
||||
|
||||
' La chiamata è richiesta dalla finestra di progettazione.
|
||||
InitializeComponent()
|
||||
|
||||
' Aggiungere le eventuali istruzioni di inizializzazione dopo la chiamata a InitializeComponent().
|
||||
|
||||
End Sub
|
||||
|
||||
Public Sub Init() Handles Me.Initialized
|
||||
IconTxBl.Text = "⚠️"
|
||||
LicenseTxBl.Text = m_sTitle
|
||||
m_sMessage = m_sMessage.Replace("/n", "£")
|
||||
Dim sItems As String() = m_sMessage.Split("£")
|
||||
For Index As Integer = 0 To sItems.Count - 1
|
||||
If Index = 0 Then
|
||||
m_sMessage = sItems(Index)
|
||||
Else
|
||||
m_sMessage &= vbCrLf & sItems(Index)
|
||||
End If
|
||||
Next
|
||||
LicenseMsgTxBl.Text = m_sMessage
|
||||
End Sub
|
||||
|
||||
Public Sub Exit_Click() Handles ExitBtn.Click
|
||||
Me.Close()
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
+523
-472
File diff suppressed because it is too large
Load Diff
@@ -91,7 +91,16 @@ Public Class AlarmsPageUC
|
||||
TmDepthTxBl.Text = EgtMsg( 91063) ' Profondità
|
||||
TmWidthTxBl.Text = EgtMsg( 91064) ' Larghezza
|
||||
WJsParamGpBx.Header = EgtMsg( 91058) ' Parametri waterjet
|
||||
WjIntCutsTxBl.Text = EgtMsg( 90930) ' Sempre sugli interni
|
||||
WjIntCutsTxBl.Text = EgtMsg(90930) ' Sempre sugli interni
|
||||
'-- INIZIO -- nuovi parametri per preforo lavello
|
||||
HolesDiameterWJTxBl.Text = "Diameter"
|
||||
HolesOffsetWJTxBl.Text = "Offset"
|
||||
MinRadiusWJTxBl.Text = "Min Radius"
|
||||
OneHoleInCornerWJTxBl.Text = EgtMsg(MSG_ALARMSPAGEUC + 26)
|
||||
'-- INIZIO -- nuovi parametro Rettifica tagli sottosquadra WJ
|
||||
REctificationWJParamGpBx.Header = "Rectification"
|
||||
EnableRectificationTxBl.Text = "Enable (on subsquare angle)"
|
||||
'-- FINE -- nuovi parametro Rettifica tagli sottosquadra WJ
|
||||
NestingParamGpBx.Header = EgtMsg(MSG_ALARMSPAGEUC + 31) ' Nesting
|
||||
AlignTxBl.Text = EgtMsg(90932) ' Allineato
|
||||
GhigliottinaTxBl.Text = EgtMsg(91066) ' Ghigliottina
|
||||
@@ -169,6 +178,7 @@ Public Class AlarmsPageUC
|
||||
' Se non previsti tagli waterjet, disabilito relativo box
|
||||
If Not m_CurrentMachine.bWaterJetting Then
|
||||
WjsParamGpBx.Visibility = Visibility.Hidden
|
||||
RectificationWJParamGpBx.Visibility = Visibility.Hidden
|
||||
End If
|
||||
|
||||
' Abilitazione box per contorni grezzo da foto
|
||||
@@ -333,12 +343,24 @@ Public Class AlarmsPageUC
|
||||
EgtMdbSave()
|
||||
' Leggo lavorazione angoli con fresa
|
||||
CornerCutsChBx.IsChecked =
|
||||
(GetPrivateProfileInt(S_MACH_NEST, K_MACH_MILLING_ON_CORNERS, 1, m_MainWindow.GetMachIniFile()) <> 0)
|
||||
(GetPrivateProfileInt(S_MACH_NEST, K_MACH_MILLING_ON_CORNERS, 1, m_MainWindow.GetMachIniFile()) <> 0)
|
||||
' Leggo lavorazione interni con fresa
|
||||
InternalCutsChBx.IsChecked =
|
||||
(GetPrivateProfileInt(S_MACH_NEST, K_MACH_MILLING_ON_SINKS, 0, m_MainWindow.GetMachIniFile()) <> 0)
|
||||
(GetPrivateProfileInt(S_MACH_NEST, K_MACH_MILLING_ON_SINKS, 0, m_MainWindow.GetMachIniFile()) <> 0)
|
||||
WjIntCutsChBx.IsChecked =
|
||||
(GetPrivateProfileInt(S_MACH_NEST, K_MACH_MILLING_ON_SINKS, 0, m_MainWindow.GetMachIniFile()) <> 0)
|
||||
(GetPrivateProfileInt(S_MACH_NEST, K_MACH_MILLING_ON_SINKS, 0, m_MainWindow.GetMachIniFile()) <> 0)
|
||||
' Lavorazione preforo lavello con WaterJet
|
||||
dVal = GetPrivateProfileDouble(S_MACH_NEST, K_HOLES_DIAMITERWJ, 0, m_MainWindow.GetMachIniFile())
|
||||
HolesDiameterWJTxBx.Text = LenToString(dVal, 2)
|
||||
dVal = GetPrivateProfileDouble(S_MACH_NEST, K_HOLES_OFFSETWJ, 0, m_MainWindow.GetMachIniFile())
|
||||
HolesOffsetWJTxBx.Text = LenToString(dVal, 2)
|
||||
dVal = GetPrivateProfileDouble(S_MACH_NEST, K_MIN_RADIUSWJ, 0, m_MainWindow.GetMachIniFile())
|
||||
MinRadiusWJTxBx.Text = LenToString(dVal, 2)
|
||||
OneHoleInCornerWJChBx.IsChecked =
|
||||
(GetPrivateProfileInt(S_MACH_NEST, K_MACH_DRILLINGWJ_ON_CORNERS, 1, m_MainWindow.GetMachIniFile()) <> 0)
|
||||
' leggo se attiva la rettifica degli angoli per WaterJet
|
||||
EnableRectificationChBx.IsChecked =
|
||||
(GetPrivateProfileInt(S_MACH_NEST, K_MACH_RECTIFICATION_ON_SUBSQUARE, 0, m_MainWindow.GetMachIniFile()) <> 0)
|
||||
' Leggo accorciamento angoli con fresa
|
||||
dVal = GetPrivateProfileDouble(S_MACH_NEST, K_MACH_MILLING_SHORTENING, 0, m_MainWindow.GetMachIniFile())
|
||||
ShortTxBx.Text = LenToString(dVal, 2)
|
||||
@@ -391,7 +413,7 @@ Public Class AlarmsPageUC
|
||||
If nWashing = -1 Then
|
||||
WashingGpBx.Visibility = Visibility.Hidden
|
||||
Else
|
||||
WashingChBx.IsChecked = ( nWashing <> 0)
|
||||
WashingChBx.IsChecked = (nWashing <> 0)
|
||||
End If
|
||||
' Leggo parametri per variazione feed in tagli
|
||||
CfrLenTxBx.Text = LenToString(m_CurrentMachine.dFsevLength, 3)
|
||||
@@ -928,6 +950,44 @@ Public Class AlarmsPageUC
|
||||
End If
|
||||
End Sub
|
||||
|
||||
' -- INIZIO -- nuovi parametri per prefori WaterJet
|
||||
Private Sub HolesDiameterWJTxBx_Click(sender As Object, e As EventArgs) Handles HolesDiameterWJTxBx.EgtClosed
|
||||
Dim dVal As Double = 0
|
||||
StringToLen(HolesDiameterWJTxBx.Text, dVal)
|
||||
WritePrivateProfileString(S_MACH_NEST, K_HOLES_DIAMITERWJ, DoubleToString(dVal, 2), m_MainWindow.GetMachIniFile())
|
||||
End Sub
|
||||
|
||||
Private Sub HolesOffsetWJTxBx_Click(sender As Object, e As EventArgs) Handles HolesOffsetWJTxBx.EgtClosed
|
||||
Dim dVal As Double = 0
|
||||
StringToLen(HolesOffsetWJTxBx.Text, dVal)
|
||||
WritePrivateProfileString(S_MACH_NEST, K_HOLES_OFFSETWJ, DoubleToString(dVal, 2), m_MainWindow.GetMachIniFile())
|
||||
End Sub
|
||||
|
||||
Private Sub MinRadiusWJTxBx_Click(sender As Object, e As EventArgs) Handles MinRadiusWJTxBx.EgtClosed
|
||||
Dim dVal As Double = 0
|
||||
StringToLen(MinRadiusWJTxBx.Text, dVal)
|
||||
WritePrivateProfileString(S_MACH_NEST, K_MIN_RADIUSWJ, DoubleToString(dVal, 2), m_MainWindow.GetMachIniFile())
|
||||
End Sub
|
||||
|
||||
Private Sub OneHoleInCornerWJChBx_Click(sender As Object, e As EventArgs) Handles OneHoleInCornerWJChBx.Click
|
||||
If OneHoleInCornerWJChBx.IsChecked() Then
|
||||
WritePrivateProfileString(S_MACH_NEST, K_MACH_DRILLINGWJ_ON_CORNERS, "1", m_MainWindow.GetMachIniFile())
|
||||
Else
|
||||
WritePrivateProfileString(S_MACH_NEST, K_MACH_DRILLINGWJ_ON_CORNERS, "0", m_MainWindow.GetMachIniFile())
|
||||
End If
|
||||
End Sub
|
||||
' -- FINE -- nuovi parametri per prefori WaterJet
|
||||
|
||||
' -- INIZIO -- nuovi parametri per Rettifica angoli in sottosquadra WaterJet
|
||||
Private Sub EnableRectificationChBx_Click(sender As Object, e As EventArgs) Handles EnableRectificationChBx.Click
|
||||
If EnableRectificationChBx.IsChecked() Then
|
||||
WritePrivateProfileString(S_MACH_NEST, K_MACH_RECTIFICATION_ON_SUBSQUARE, "1", m_MainWindow.GetMachIniFile)
|
||||
Else
|
||||
WritePrivateProfileString(S_MACH_NEST, K_MACH_RECTIFICATION_ON_SUBSQUARE, "0", m_MainWindow.GetMachIniFile)
|
||||
End If
|
||||
End Sub
|
||||
' -- FINE -- nuovi parametri per Rettifica angoli in sottosquadra WaterJet
|
||||
|
||||
Private Sub TmEnableChBx_Click(sender As Object, e As RoutedEventArgs) Handles TmEnableChBx.Click
|
||||
If TmEnableChBx.IsChecked() Then
|
||||
WritePrivateProfileString(S_MACH_NEST, K_MACH_ENGRAVING_WITHMILL, "1", m_MainWindow.GetMachIniFile())
|
||||
@@ -1118,6 +1178,10 @@ Public Class AlarmsPageUC
|
||||
Case 3
|
||||
Dim nResult As Short = m_CN.DGeneralFunctions_WriteCncMode(0)
|
||||
EgtOutLog("Impostata modalità automatica: esito " & nResult.ToString)
|
||||
Case 4
|
||||
' FANUC - Manual:7, Edit:1
|
||||
Dim nResult As Short = m_CN.DGeneralFunctions_WriteCncMode(7)
|
||||
EgtOutLog("Impostata modalità manuale: esito " & nResult.ToString)
|
||||
End Select
|
||||
' Recupero file LUA
|
||||
EgtLuaExecFile(m_CurrentMachine.sMachDir() & "\DirectCmd\SawProbing.lua")
|
||||
@@ -1129,6 +1193,7 @@ Public Class AlarmsPageUC
|
||||
Dim dToolDiam As Double = 0
|
||||
Dim dToolThick As Double = 0
|
||||
Dim dToolLen As Double = 0
|
||||
Dim dCore As Double = 0
|
||||
Dim sToolParam As String = String.Empty
|
||||
EgtTdbGetCurrToolParam(MCH_TP.HEAD, sToolParam)
|
||||
EgtLuaSetGlobStringVar("CMD.HEAD", sToolParam)
|
||||
@@ -1140,6 +1205,14 @@ Public Class AlarmsPageUC
|
||||
EgtLuaSetGlobNumVar("CMD.THICK", dToolThick * 1000)
|
||||
EgtTdbGetCurrToolParam(MCH_TP.LEN, dToolLen)
|
||||
EgtLuaSetGlobNumVar("CMD.LENGTH", dToolLen * 1000)
|
||||
EgtTdbGetCurrToolParam(MCH_TP.CORE, dCore)
|
||||
EgtLuaSetGlobNumVar("CMD.CORE", dCore * 1000)
|
||||
' Nuova varibile per gestione tastatura utensili Frankfurt (Polishing)
|
||||
Dim nType As Integer
|
||||
EgtTdbGetCurrToolParam(MCH_TP.TYPE, nType)
|
||||
If m_CurrentMachine.bPolishingWheel AndAlso nType = MCH_TY.MILL_POLISHING Then
|
||||
EgtLuaSetGlobStringVar("CMD.POLISHING", "1")
|
||||
End If
|
||||
EgtLuaSetGlobBoolVar("CMD.INCHES", m_MainWindow.m_CNCommunication.GetMachineInInches())
|
||||
EgtLuaCallFunction("CMD.CmdString")
|
||||
' Leggo variabili
|
||||
@@ -1183,11 +1256,16 @@ Public Class AlarmsPageUC
|
||||
Return
|
||||
End If
|
||||
m_MainWindow.m_CurrentProjectPageUC.ClearMessage()
|
||||
' Se fanuc passo in modalità AUTO e attivo
|
||||
If m_MainWindow.m_CNCommunication.m_nNCType = 4 Then
|
||||
Dim nResult As Short = m_MainWindow.m_CNCommunication.m_CN.DGeneralFunctions_WriteCncMode(0)
|
||||
EgtOutLog("Impostata modalità automatica: esito " & nResult.ToString)
|
||||
End If
|
||||
' Aspetto e lo avvio
|
||||
System.Threading.Thread.Sleep(300)
|
||||
m_MainWindow.m_CNCommunication.m_CN.DGeneralFunctions_CycleStart()
|
||||
' Creo MsgBox di attesa
|
||||
Dim MsgBoxStateInfo As New EgtMsgBox(m_MainWindow, EgtMsg(MSG_DIRECTCUTPAGEUC + 41), EgtMsg(MSG_DIRECTCUTPAGEUC + 42), True, EgtMsgBox.Buttons.CANCEL, EgtMsgBox.Icons.NULL)
|
||||
Dim MsgBoxStateInfo As New EgtMsgBox(m_MainWindow, String.Format(EgtMsg(MSG_DIRECTCUTPAGEUC + 41), ToolForProbing.m_ToolName), EgtMsg(MSG_DIRECTCUTPAGEUC + 42), True, EgtMsgBox.Buttons.CANCEL, EgtMsgBox.Icons.NULL)
|
||||
m_MainWindow.m_CNCommunication.m_CN.n_DReadELS_handle = 0
|
||||
' Definisco flag tastatura
|
||||
Dim bProbingOk As Boolean = False
|
||||
@@ -1232,6 +1310,10 @@ Public Class AlarmsPageUC
|
||||
Dim bRead As Boolean = False
|
||||
Dim SawDiameterNameVar As String = String.Empty
|
||||
GetPrivateProfileString(S_MACH_PROBING, K_SAWDIAMETER, "", SawDiameterNameVar, m_MainWindow.GetMachIniFile())
|
||||
' Se utensile non lama, allora la variabile in cui leggo il dato potrebbe essere differente
|
||||
If Not ToolForProbing.m_IsSaw Then
|
||||
GetPrivateProfileString(S_MACH_PROBING, K_TOOLLENGTH, SawDiameterNameVar, SawDiameterNameVar, m_MainWindow.GetMachIniFile())
|
||||
End If
|
||||
m_MainWindow.m_CNCommunication.m_CN.n_DReadELS_handle = 0
|
||||
For I As Integer = 0 To 20
|
||||
' Devo rileggere la variabile ad ogni ciclo
|
||||
@@ -1240,7 +1322,10 @@ Public Class AlarmsPageUC
|
||||
If m_MainWindow.m_CNCommunication.m_CN.n_DReadELS_handle = 3 Then
|
||||
bRead = True
|
||||
Dim dVal As Double = m_MainWindow.m_CNCommunication.m_CN.d_DReadELS_value
|
||||
dVal = dVal / 1000
|
||||
' Se fanuc il dato è in mm (NON MICRON)
|
||||
If m_MainWindow.m_CNCommunication.m_nNCType <> 4 Then
|
||||
dVal = dVal / 1000
|
||||
End If
|
||||
MsgBoxStateInfo.LoadingPrBr_Value = 100
|
||||
' Tastatura conclusa con successo
|
||||
Dim sOut As String = EgtMsg(MSG_DIRECTCUTPAGEUC + 43) & " : " & DoubleToString(dVal, 1)
|
||||
|
||||
+112
-4
@@ -1,6 +1,7 @@
|
||||
Imports System.Collections.ObjectModel
|
||||
Imports EgtWPFLib5
|
||||
Imports EgtUILib
|
||||
Imports System.IO
|
||||
|
||||
Public Class CurrentMachine
|
||||
|
||||
@@ -51,6 +52,10 @@ Public Class CurrentMachine
|
||||
Private m_sProdLiProbingState2Var As String = ""
|
||||
Private m_sProdLiProbingTcPos2Var As String = ""
|
||||
Private m_sProdLiSawDiameter2Var As String = ""
|
||||
Private m_sClickState As String = "E80028"
|
||||
Private m_sClickDir As String = ""
|
||||
' Gestione speciale per canali CN
|
||||
Private m_sExtFileCN As String = ".0"
|
||||
|
||||
' Numero e tipo di utensili correntemente disponibili sulla macchina
|
||||
Private m_MountedToolConfig As MountedToolConfigs = MountedToolConfigs.SAW
|
||||
@@ -77,6 +82,9 @@ Public Class CurrentMachine
|
||||
Private m_bPolishingWheel As Boolean = False
|
||||
Private m_bWaterJet As Boolean = False
|
||||
|
||||
' Flag che indica se gesire l'inversione del taglio nei tagli singoli
|
||||
Private m_bEnableInvetrt As Boolean = True
|
||||
|
||||
' Abilitazione DB WaterJet
|
||||
Private m_bFromDBWaterJet As Boolean = False
|
||||
|
||||
@@ -131,6 +139,8 @@ Public Class CurrentMachine
|
||||
Private m_dPhotoOffsetY As Double = 0
|
||||
Private m_dTab2PhotoOffsetX As Double = 0
|
||||
Private m_dTab2PhotoOffsetY As Double = 0
|
||||
Private m_dHQPhotoOffsetX As Double = 0
|
||||
Private m_dHQPhotoOffsetY As Double = 0
|
||||
|
||||
' Abilitazione scelta restart
|
||||
Private m_bEnableRestart As Boolean = False
|
||||
@@ -191,8 +201,18 @@ Public Class CurrentMachine
|
||||
' Massimo numero di utensili su Tc manuale
|
||||
Friend MAX_TCMAN_TOOLS As Integer = 60
|
||||
|
||||
' Massima profondità lavorabile nei tagli diretti
|
||||
Private m_MaxTabDepth As Double = 10.0
|
||||
|
||||
' Massima altezza lavorabile con lama grande
|
||||
Private m_dHighPieceZ As Double = 200.0
|
||||
|
||||
#Region "Proprietà che leggono e scrivono i valori anche da o su file ini"
|
||||
Friend ReadOnly Property MaxTabDepth As Double
|
||||
Get
|
||||
Return m_MaxTabDepth
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Friend ReadOnly Property sMachineName As String
|
||||
Get
|
||||
@@ -313,7 +333,7 @@ Public Class CurrentMachine
|
||||
Return m_bAskNewOnResend
|
||||
End Get
|
||||
End Property
|
||||
|
||||
|
||||
|
||||
Friend ReadOnly Property nProdLiSawProbe As Integer
|
||||
Get
|
||||
@@ -321,6 +341,24 @@ Public Class CurrentMachine
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Friend ReadOnly Property sClickState As String
|
||||
Get
|
||||
Return m_sClickState
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Friend ReadOnly Property sClickDir As String
|
||||
Get
|
||||
Return m_sClickDir
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Friend ReadOnly Property sExtFileCN As String
|
||||
Get
|
||||
Return m_sExtFileCN
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Friend Function sProdLiProbingStateVar(nI As Integer) As String
|
||||
If nI = 1 Then Return m_sProdLiProbingStateVar
|
||||
If nI = 2 Then Return m_sProdLiProbingState2Var
|
||||
@@ -731,6 +769,10 @@ Public Class CurrentMachine
|
||||
Set(value As String)
|
||||
If WritePrivateProfileString(S_MACH_MACH, K_CURRWATERJETTING, value, sMachIniFile) Then
|
||||
m_sCurrWaterJetting = value
|
||||
If m_MainWindow.m_CurrentMachine.bWaterJet And EgtGetHeadId("H1") = GDB_ID.NULL Then
|
||||
m_MainWindow.m_CurrentProjectPageUC.MachiningTxBx.Text = value
|
||||
End If
|
||||
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
@@ -752,6 +794,12 @@ Public Class CurrentMachine
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Friend ReadOnly Property bEnableInvert As Boolean
|
||||
Get
|
||||
Return m_bEnableInvetrt
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Friend Property dAdditionalTable As Double
|
||||
Get
|
||||
Select Case GetCurrentTable()
|
||||
@@ -779,7 +827,7 @@ Public Class CurrentMachine
|
||||
EgtSetInfo(EgtGetFirstNameInGroup(GDB_ID.ROOT, NAME_PROJMARK), K_TAB3_ADDITIONALTABLE, value)
|
||||
End If
|
||||
End If
|
||||
Case 2
|
||||
Case 2
|
||||
If Math.Abs(value - m_dTab2AdditionalTable) > EPS_SMALL And
|
||||
WritePrivateProfileString(S_TABLE, K_TAB2_ADDITIONALTABLE, DoubleToString(value, 3), sMachIniFile) Then
|
||||
' Aggiorno il valore corrente
|
||||
@@ -821,6 +869,10 @@ Public Class CurrentMachine
|
||||
Case 2
|
||||
Return New Vector3d(m_dTab2PhotoOffsetX, m_dTab2PhotoOffsetY, 0)
|
||||
Case Else
|
||||
' verifico quale delle due fotocamere è attualmente attiva
|
||||
If GetPrivateProfileInt(S_CAMERAHQ, K_CAMERAHQ_ACTIVATE, 0, m_MainWindow.GetMachIniFile()) = 1 Then
|
||||
Return New Vector3d(m_dHQPhotoOffsetX, m_dHQPhotoOffsetY, 0)
|
||||
End If
|
||||
Return New Vector3d(m_dPhotoOffsetX, m_dPhotoOffsetY, 0)
|
||||
End Select
|
||||
End Get
|
||||
@@ -1100,6 +1152,12 @@ Public Class CurrentMachine
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Friend ReadOnly Property dHighPieceZ As Double
|
||||
Get
|
||||
Return m_dHighPieceZ
|
||||
End Get
|
||||
End Property
|
||||
|
||||
#End Region
|
||||
|
||||
Sub New()
|
||||
@@ -1111,6 +1169,8 @@ Public Class CurrentMachine
|
||||
m_sMachIniFile = m_MainWindow.GetMachinesRootDir & "\" & sMachineName & "\" & sMachineName & ".ini"
|
||||
' Leggo estensione del file programma pezzo
|
||||
GetPrivateProfileString(S_PARTPROGRAM, K_EXTENSION, "xpi", m_sIsoFileExt, sMachIniFile)
|
||||
' per gestione canali separati (macchina NUM con più di 5 Assi) ver. 2.5g1
|
||||
GetPrivateProfileString(S_PARTPROGRAM, K_EXTFILECN, ".0", m_sExtFileCN, sMachIniFile)
|
||||
If m_sIsoFileExt(0) <> "." Then m_sIsoFileExt = "." & m_sIsoFileExt
|
||||
' Leggo flag incremento asse C
|
||||
m_dDeltaC = GetPrivateProfileDouble(S_AXES, K_DELTA_C, 0.0, sMachIniFile)
|
||||
@@ -1144,6 +1204,13 @@ Public Class CurrentMachine
|
||||
GetPrivateProfileString(S_PRODUCTIONLINE, K_PRODLIPROBINGTCPOS2VAR, "0", m_sProdLiProbingTcPos2Var, sMachIniFile)
|
||||
GetPrivateProfileString(S_PRODUCTIONLINE, K_PRODLISAWDIAMETER2VAR, "", m_sProdLiSawDiameter2Var, sMachIniFile)
|
||||
|
||||
GetPrivateProfileString(S_POLISHLINE, K_CLICKSTATE, "", m_sClickState, sMachIniFile)
|
||||
GetPrivateProfileString(S_POLISHLINE, k_CLICKDIR, "", m_sClickDir, sMachIniFile)
|
||||
If Not Directory.Exists(m_sClickDir) Then
|
||||
m_sClickState = ""
|
||||
EgtOutLog("Directory " & m_sClickDir & " does not exist")
|
||||
End If
|
||||
|
||||
' Leggo configurazione degli utensili in macchina
|
||||
m_MountedToolConfig = GetPrivateProfileInt(S_TOOLS, K_MOUNTEDTOOLCONFIG, 0, sMachIniFile)
|
||||
' Leggo flag presenza tipologie utensili
|
||||
@@ -1200,6 +1267,8 @@ Public Class CurrentMachine
|
||||
m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.ENABLE_WJ)
|
||||
' possibilità di definire attacco speciale per materiali ceramici
|
||||
m_bSawingSpecialLeadIn = (GetPrivateProfileInt(S_MACHININGS, K_SAWINGSPECIALLEADIN, 0, sMachIniFile) > 0)
|
||||
' mantengo la direzione del taglio definita nel taglio diretto
|
||||
m_bEnableInvetrt = (GetPrivateProfileInt(S_DIRECTCUTS, K_ENABLEINVERT, 1, sMachIniFile) <> 0)
|
||||
|
||||
' Leggo utensili correnti
|
||||
' lama
|
||||
@@ -1282,6 +1351,8 @@ Public Class CurrentMachine
|
||||
m_dPhotoOffsetY = GetPrivateProfileDouble(S_PHOTO, K_PHOTO_OFFSETY, 0, sMachIniFile)
|
||||
m_dTab2PhotoOffsetX = GetPrivateProfileDouble(S_PHOTO, K_PHOTO_TAB2_OFFSETX, 0, sMachIniFile)
|
||||
m_dTab2PhotoOffsetY = GetPrivateProfileDouble(S_PHOTO, K_PHOTO_TAB2_OFFSETY, 0, sMachIniFile)
|
||||
m_dHQPhotoOffsetX = GetPrivateProfileDouble(S_PHOTO, K_PHOTO_HQ_OFFSETX, 0, sMachIniFile)
|
||||
m_dHQPhotoOffsetY = GetPrivateProfileDouble(S_PHOTO, K_PHOTO_HQ_OFFSETY, 0, sMachIniFile)
|
||||
|
||||
' Leggo abilitazione per restart
|
||||
m_bEnableRestart = (GetPrivateProfileInt(S_MACH_NEST, K_MACH_ENABLERESTART, 0, sMachIniFile) <> 0)
|
||||
@@ -1349,6 +1420,38 @@ Public Class CurrentMachine
|
||||
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)
|
||||
|
||||
' affonadamento massimo oltre la tavola (inidicata in positivo!)
|
||||
m_MaxTabDepth = GetPrivateProfileDouble(S_MACH_NEST, "MaxTabDepth", 10.0, m_MainWindow.GetMachIniFile())
|
||||
If m_MaxTabDepth < 0 Then
|
||||
m_MaxTabDepth = 10.0
|
||||
End If
|
||||
|
||||
' Massimo spessore lavorabile con lama grande
|
||||
m_dHighPieceZ = GetPrivateProfileDouble(S_RAWMOVE, "MaxHeightPiece", 800.0, m_MainWindow.GetMachIniFile())
|
||||
End Sub
|
||||
|
||||
' Per il controllo FANUC al momento dell'inizializzazione del CN devono essere lette alcune variabili
|
||||
Public Sub InitFANUC(CN_Generic As CN_generico)
|
||||
' Leggo ritardo tra reset e send per NUM
|
||||
m_nResetSendDelay = GetPrivateProfileInt(S_NCFANUC, K_RESETSENDDELAY, 1000, sMachIniFile)
|
||||
' Leggo ritardo tra reset e send per NUM
|
||||
m_nThreadSleep = GetPrivateProfileInt(S_NCFANUC, K_THREADSLEEP, 150, sMachIniFile)
|
||||
' Leggo i dati strettamente correlati alla comunicazione NC-PC
|
||||
Dim CN As CN_generico = CN_Generic
|
||||
' Leggo l'indirizzo in cui scrivere lo stato macchina
|
||||
Dim dAddNcMode As String = CN.s_addr_set_nc_mode
|
||||
GetPrivateProfileString(S_NCFANUC, K_SETNCMODE, CN.s_addr_set_nc_mode, CN.s_addr_set_nc_mode, sMachIniFile)
|
||||
' Leggo primo indirizzo libero delle variabili di tipo intero
|
||||
CN.n_Base_addr_int_vars = GetPrivateProfileInt(S_NCFANUC, K_BASEADDRINT, CN.n_Base_addr_int_vars, sMachIniFile)
|
||||
' Leggo primo indirizzo libero delle variabili di tipo bit
|
||||
CN.n_Base_addr_byte_for_bits_vars = GetPrivateProfileInt(S_NCFANUC, K_BASEADDRBIT, CN.n_Base_addr_byte_for_bits_vars, sMachIniFile)
|
||||
' Leggo numero di variabili di tipo intero
|
||||
CN.n_num_var_int_to_read = CShort(GetPrivateProfileInt(S_NCFANUC, K_NUMVARINT, CInt(CN.n_num_var_int_to_read), sMachIniFile))
|
||||
' Leggo numero di varibili di tipo bit
|
||||
CN.n_num_var_byte_for_bits_to_read = CShort(GetPrivateProfileInt(S_NCFANUC, K_NUMVARBIT, CInt(CN.n_num_var_byte_for_bits_to_read), sMachIniFile))
|
||||
' Leggo variabile abilitata alla gestione di FeedHold
|
||||
GetPrivateProfileString(S_NCFANUC, K_SETNCMODE, CN.s_addr_feedhold, CN.s_addr_feedhold, sMachIniFile)
|
||||
End Sub
|
||||
|
||||
Public Sub LoadWJMaterial(Optional bIsStart As Boolean = False)
|
||||
@@ -1414,7 +1517,10 @@ Public Class CurrentMachine
|
||||
If bFound Then Exit For
|
||||
Next
|
||||
End If
|
||||
Return dMaxThick
|
||||
' il valore resituito è già nell'unità corrente del programma -> converto il dato in mm
|
||||
Dim dValmm As Double = 0
|
||||
StringToLen(DoubleToString(dMaxThick, 3), dValmm)
|
||||
Return dValmm
|
||||
End Function
|
||||
|
||||
#Region "USERNOTE"
|
||||
@@ -1568,7 +1674,9 @@ Public Class CurrentMachine
|
||||
Dim dToolDiam As Double = 0
|
||||
EgtTdbGetCurrToolParam(MCH_TP.DIAM, dToolDiam)
|
||||
' Confronto con massimo ammesso
|
||||
Return (dToolDiam <= dMaxSawDiamForProbe)
|
||||
Dim bOk As Boolean = dToolDiam <= dMaxSawDiamForProbe
|
||||
If Not bOk Then EgtOutLog("WARNING: Saw diameter to big for probing")
|
||||
Return bOk
|
||||
End Function
|
||||
|
||||
Friend Function GetPrivateProfileMaterial(
|
||||
|
||||
@@ -7,105 +7,123 @@
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="768" d:DesignWidth="1280">
|
||||
|
||||
<!-- Definizione della ImportPage -->
|
||||
<Border Background="{DynamicResource OmagCut_Gray}" >
|
||||
<!-- Definizione della ImportPage -->
|
||||
<Border Background="{DynamicResource OmagCut_Gray}" >
|
||||
|
||||
<Grid Name="ImportPageGrid">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="7.5*"/>
|
||||
<ColumnDefinition Width="1.5*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="5*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1.5*"/>
|
||||
<RowDefinition Height="1.5*"/>
|
||||
<RowDefinition Height="1.5*"/>
|
||||
<RowDefinition Height="4.5*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid Name="ImportPageGrid">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="7.5*"/>
|
||||
<ColumnDefinition Width="1.5*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="5*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1.5*"/>
|
||||
<RowDefinition Height="1.5*"/>
|
||||
<RowDefinition Height="1.5*"/>
|
||||
<RowDefinition Height="4.5*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<GroupBox Name="CNModeGpBx" Style="{DynamicResource OmagCut_GroupBox}" Grid.ColumnSpan="2" Margin="0,0,4,0">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="1.5*"/>
|
||||
<ColumnDefinition Width="1.5*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<GroupBox Name="CNModeGpBx" Style="{DynamicResource OmagCut_GroupBox}" Grid.ColumnSpan="2" Margin="0,0,4,0">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="1.5*"/>
|
||||
<ColumnDefinition Width="1.5*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Button Name="AutoBtn" Grid.Column="0"
|
||||
Style="{DynamicResource OmagCut_RightGrayGradientYellowTextButton}"/>
|
||||
<Button Name="ManualBtn" Grid.Column="1"
|
||||
Style="{DynamicResource OmagCut_RightGrayGradientYellowTextButton}"/>
|
||||
<Button Name="MDIBtn" Grid.Column="2"
|
||||
Style="{DynamicResource OmagCut_RightGrayGradientYellowTextButton}"/>
|
||||
<Button Name="SingleBtn" Grid.Column="3"
|
||||
Style="{DynamicResource OmagCut_RightGrayGradientYellowTextButton}"/>
|
||||
<Button Name="HomeBtn" Grid.Column="4"
|
||||
Style="{DynamicResource OmagCut_RightGrayGradientYellowTextButton}"/>
|
||||
<ToggleButton Name="AutoBtn" Grid.Column="0"
|
||||
Style="{DynamicResource OmagCut_GradientYellowIconToggleButton}"
|
||||
Foreground="White"/>
|
||||
<ToggleButton Name="ManualBtn" Grid.Column="1"
|
||||
Style="{DynamicResource OmagCut_GradientYellowIconToggleButton}"
|
||||
Foreground="White"/>
|
||||
<ToggleButton Name="MDIBtn" Grid.Column="2"
|
||||
Style="{DynamicResource OmagCut_GradientYellowIconToggleButton}"
|
||||
Foreground="White"/>
|
||||
<ToggleButton Name="SingleBtn" Grid.Column="3"
|
||||
Style="{DynamicResource OmagCut_GradientYellowIconToggleButton}"
|
||||
Foreground="White"/>
|
||||
<ToggleButton Name="HomeBtn" Grid.Column="4"
|
||||
Style="{DynamicResource OmagCut_GradientYellowIconToggleButton}"
|
||||
Foreground="White"/>
|
||||
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
||||
</GroupBox>
|
||||
</GroupBox>
|
||||
|
||||
<GroupBox Name="CommandsGpBx" Style="{DynamicResource OmagCut_GroupBox}" Grid.Column="2" Grid.ColumnSpan="2">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<GroupBox Name="CommandsGpBx" Style="{DynamicResource OmagCut_GroupBox}" Grid.Column="2" Grid.ColumnSpan="2">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Button Name="StartBtn" Style="{DynamicResource OmagCut_RightGrayGradientYellowTextButton}"/>
|
||||
<Button Name="StopBtn" Grid.Column="1"
|
||||
<Button Name="StopBtn" Grid.Column="1"
|
||||
Style="{DynamicResource OmagCut_RightGrayGradientYellowTextButton}"/>
|
||||
<Button Name="ResetBtn" Grid.Column="2"
|
||||
<Button Name="ResetBtn" Grid.Column="2"
|
||||
Style="{DynamicResource OmagCut_RightGrayGradientYellowTextButton}"/>
|
||||
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
||||
</GroupBox>
|
||||
</GroupBox>
|
||||
|
||||
<GroupBox Name="MDICommandGpBx" Style="{DynamicResource OmagCut_GroupBox}" Grid.Row="1">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="6*"/>
|
||||
<ColumnDefinition Width="1.5*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="6*"/>
|
||||
<ColumnDefinition Width="1.5*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<EgtWPFLib:EgtTextBox Name="MDITxBx" Margin="10,0,10,0" Style="{DynamicResource OmagCut_MDIKeyboardTextBox}"/>
|
||||
<Button Name="MDIConfirmBtn" Grid.Column="1"
|
||||
<Button Name="MDIConfirmBtn" Grid.Column="1"
|
||||
Style="{DynamicResource OmagCut_RightGrayGradientYellowTextButton}"/>
|
||||
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
||||
</GroupBox>
|
||||
</GroupBox>
|
||||
|
||||
<GroupBox Name="PartProgTransferGpBx" Style="{DynamicResource OmagCut_GroupBox}" Grid.Row="2"
|
||||
<GroupBox Name="CameraHQ" Style="{DynamicResource OmagCut_GroupBox}" Grid.Row="1" Grid.Column="2" Grid.ColumnSpan="2">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<ToggleButton Name="CameraHQBtn" Grid.Column="2"
|
||||
Style="{DynamicResource OmagCut_GradientYellowIconToggleButton}"
|
||||
Foreground="White"/>
|
||||
</Grid>
|
||||
</GroupBox>
|
||||
|
||||
<GroupBox Name="PartProgTransferGpBx" Style="{DynamicResource OmagCut_GroupBox}" Grid.Row="2"
|
||||
Grid.ColumnSpan="3">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Button Name="DownloadBtn" Grid.Column="0"
|
||||
<Button Name="DownloadBtn" Grid.Column="0"
|
||||
Style="{DynamicResource OmagCut_RightGrayGradientYellowTextButton}"/>
|
||||
<Button Name="UploadBtn" Grid.Column="1"
|
||||
<Button Name="UploadBtn" Grid.Column="1"
|
||||
Style="{DynamicResource OmagCut_RightGrayGradientYellowTextButton}"/>
|
||||
<Button Name="ActivateBtn" Grid.Column="2"
|
||||
<Button Name="ActivateBtn" Grid.Column="2"
|
||||
Style="{DynamicResource OmagCut_RightGrayGradientYellowTextButton}"/>
|
||||
<Button Name="DeleteBtn" Grid.Column="3"
|
||||
<Button Name="DeleteBtn" Grid.Column="3"
|
||||
Style="{DynamicResource OmagCut_RightGrayGradientYellowTextButton}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="DULoadTxBx" Grid.Column="4" Width="100" Text="900.0"
|
||||
<EgtWPFLib:EgtTextBox Name="DULoadTxBx" Grid.Column="4" Width="100" Text="900.0"
|
||||
Style="{DynamicResource OmagCut_KeyboardTextBox}"/>
|
||||
|
||||
</Grid>
|
||||
</GroupBox>
|
||||
</Grid>
|
||||
</GroupBox>
|
||||
|
||||
<GroupBox Name="PowerGpBx" Style="{DynamicResource OmagCut_GroupBox}" Grid.Row="2"
|
||||
Grid.Column="3" Grid.ColumnSpan="3" Margin="5,0,0,0">
|
||||
@@ -126,18 +144,18 @@
|
||||
</GroupBox>
|
||||
|
||||
<GroupBox Name="ErrorLstGpBx" Style="{DynamicResource OmagCut_GroupBox}" Grid.Row="3" Grid.ColumnSpan="4">
|
||||
<ListBox Name="ErrorLstBx">
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding}" Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</DataTemplate>
|
||||
</ListBox.ItemTemplate>
|
||||
</ListBox>
|
||||
<ListBox Name="ErrorLstBx">
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding}" Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</DataTemplate>
|
||||
</ListBox.ItemTemplate>
|
||||
</ListBox>
|
||||
|
||||
</GroupBox>
|
||||
</GroupBox>
|
||||
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
||||
</Border>
|
||||
</Border>
|
||||
|
||||
</UserControl>
|
||||
|
||||
@@ -8,6 +8,8 @@ Public Class MachineCNPageUC
|
||||
Private m_bFirst As Boolean = True
|
||||
Private m_ButtonPower As New List(Of MachineButton)
|
||||
|
||||
Private m_nCurrMode As Integer = 0
|
||||
|
||||
Private Sub TestingPage_Initialized(sender As Object, e As EventArgs) Handles Me.Initialized
|
||||
StartBtn.Content = EgtMsg(MSG_MACHINECNPAGEUC + 1)
|
||||
StopBtn.Content = EgtMsg(MSG_MACHINECNPAGEUC + 2)
|
||||
@@ -27,6 +29,7 @@ Public Class MachineCNPageUC
|
||||
MDICommandGpBx.Header = EgtMsg(MSG_MACHINECNPAGEUC + 16)
|
||||
PartProgTransferGpBx.Header = EgtMsg(MSG_MACHINECNPAGEUC + 17)
|
||||
ErrorLstGpBx.Header = EgtMsg(MSG_ALARMSPAGEUC + 12)
|
||||
|
||||
' Attivo gruppo PartProgTransferGpBx leggendo la variabile nel file ini
|
||||
If GetPrivateProfileInt(S_GENERAL, K_TESTINGPAGE, 0, m_MainWindow.GetIniFile()) = 1 Then
|
||||
PartProgTransferGpBx.Visibility = Windows.Visibility.Visible
|
||||
@@ -42,6 +45,28 @@ Public Class MachineCNPageUC
|
||||
Else
|
||||
PowerGpBx.Visibility = Visibility.Collapsed
|
||||
End If
|
||||
|
||||
' verifico che sia attiva la modalità per l'uso di due fotocamere
|
||||
If GetPrivateProfileInt(S_CAMERAHQ, K_CAMERAHQ_ENABLE, 0, m_MainWindow.GetMachIniFile()) = 1 Then
|
||||
CameraHQ.Visibility = Visibility.Visible
|
||||
CameraHQ.Header = "Photo on table"
|
||||
CameraHQBtn.Content = "HQ"
|
||||
' verifico quale camera è impostata
|
||||
If GetPrivateProfileInt(S_CAMERAHQ, K_CAMERAHQ_ACTIVATE, 0, m_MainWindow.GetMachIniFile()) = 1 Then
|
||||
CameraHQBtn.IsChecked = True
|
||||
If Not IsNothing(m_MainWindow.m_CadCutPageUC.PhotoIMG) Then
|
||||
m_MainWindow.m_CadCutPageUC.PhotoIMG.Source = New System.Windows.Media.Imaging.BitmapImage(New Uri("/Resources/NewIcons/icone-tagli-1HQ.png", UriKind.Relative))
|
||||
End If
|
||||
Else
|
||||
CameraHQBtn.IsChecked = False
|
||||
If Not IsNothing(m_MainWindow.m_CadCutPageUC.PhotoIMG) Then
|
||||
m_MainWindow.m_CadCutPageUC.PhotoIMG.Source = New System.Windows.Media.Imaging.BitmapImage(New Uri("/Resources/NewIcons/icone-tagli-1.png", UriKind.Relative))
|
||||
End If
|
||||
End If
|
||||
Else
|
||||
CameraHQ.Visibility = Visibility.Collapsed
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub TestingPage_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded
|
||||
@@ -51,6 +76,9 @@ Public Class MachineCNPageUC
|
||||
PartProgTransferGpBx.Visibility = Windows.Visibility.Hidden
|
||||
End If
|
||||
|
||||
' gestione visuliazzazione ToggleButton Auto/Sinlge/Mdi/Manula/Home
|
||||
SetCncMode()
|
||||
|
||||
'------ NUOVI BOTTONI ----------
|
||||
' Lettura configurazione bottoni (per impostare l'uso del Joystick) da Ini di macchina
|
||||
m_ButtonPower.Clear()
|
||||
@@ -98,6 +126,53 @@ Public Class MachineCNPageUC
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub SetCncMode()
|
||||
Dim Mode As Integer = m_nCurrMode
|
||||
Select Case Mode
|
||||
Case 0
|
||||
' Auoto
|
||||
MDIConfirmBtn.IsEnabled = False
|
||||
AutoBtn.IsChecked = True
|
||||
SingleBtn.IsChecked = False
|
||||
MDIBtn.IsChecked = False
|
||||
ManualBtn.IsChecked = False
|
||||
HomeBtn.IsChecked = False
|
||||
Case 1
|
||||
' Single
|
||||
MDIConfirmBtn.IsEnabled = False
|
||||
AutoBtn.IsChecked = False
|
||||
SingleBtn.IsChecked = True
|
||||
MDIBtn.IsChecked = False
|
||||
ManualBtn.IsChecked = False
|
||||
HomeBtn.IsChecked = False
|
||||
Case 2
|
||||
' Mdi
|
||||
MDIConfirmBtn.IsEnabled = True
|
||||
AutoBtn.IsChecked = False
|
||||
SingleBtn.IsChecked = False
|
||||
MDIBtn.IsChecked = True
|
||||
ManualBtn.IsChecked = False
|
||||
HomeBtn.IsChecked = False
|
||||
Case 7
|
||||
' Manual
|
||||
MDIConfirmBtn.IsEnabled = False
|
||||
AutoBtn.IsChecked = False
|
||||
SingleBtn.IsChecked = False
|
||||
MDIBtn.IsChecked = False
|
||||
ManualBtn.IsChecked = True
|
||||
HomeBtn.IsChecked = False
|
||||
Case 8
|
||||
' Home
|
||||
MDIConfirmBtn.IsEnabled = False
|
||||
AutoBtn.IsChecked = False
|
||||
SingleBtn.IsChecked = False
|
||||
MDIBtn.IsChecked = False
|
||||
ManualBtn.IsChecked = False
|
||||
HomeBtn.IsChecked = True
|
||||
End Select
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub StartBtn_Click(sender As Object, e As RoutedEventArgs) Handles StartBtn.Click
|
||||
If m_MainWindow.m_CNCommunication.m_nNCType = 3 AndAlso m_MainWindow.m_CNCommunication.m_CN.m_IsSiemensOne Then
|
||||
Dim sDBVarPath As String = ""
|
||||
@@ -151,6 +226,20 @@ Public Class MachineCNPageUC
|
||||
m_CN.DGeneralFunctions_WriteCncMode(8)
|
||||
End Sub
|
||||
|
||||
Private Sub CameraHQBtn_Click(sender As Object, e As RoutedEventArgs) Handles CameraHQBtn.Click
|
||||
Dim sEnableHQ As String = If(CameraHQBtn.IsChecked, "1", "0")
|
||||
WritePrivateProfileString(S_CAMERAHQ, K_CAMERAHQ_ACTIVATE, sEnableHQ, m_MainWindow.GetMachIniFile())
|
||||
If CameraHQBtn.IsChecked Then
|
||||
If Not IsNothing(m_MainWindow.m_CadCutPageUC.PhotoIMG) Then
|
||||
m_MainWindow.m_CadCutPageUC.PhotoIMG.Source = New System.Windows.Media.Imaging.BitmapImage(New Uri("/Resources/NewIcons/icone-tagli-1HQ.png", UriKind.Relative))
|
||||
End If
|
||||
Else
|
||||
If Not IsNothing(m_MainWindow.m_CadCutPageUC.PhotoIMG) Then
|
||||
m_MainWindow.m_CadCutPageUC.PhotoIMG.Source = New System.Windows.Media.Imaging.BitmapImage(New Uri("/Resources/NewIcons/icone-tagli-1.png", UriKind.Relative))
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub MDITxBx_KeyDown(sender As Object, e As KeyEventArgs) Handles MDITxBx.KeyDown
|
||||
If e.Key = Key.Return Then
|
||||
' leggo se stato reset
|
||||
@@ -278,4 +367,9 @@ Public Class MachineCNPageUC
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Friend Sub CncModeChange(nMode As Integer)
|
||||
m_nCurrMode = nMode
|
||||
SetCncMode()
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
@@ -298,6 +298,8 @@ Public Class MachinePageUC
|
||||
WaterJetBtn.IsChecked = False
|
||||
MachinePageGrid.Children.Remove(m_WaterJetPageUC)
|
||||
MachinePageGrid.Children.Add(m_MachiningDbPageUC)
|
||||
' Aggiorno lista materiali
|
||||
m_MainWindow.m_CurrentMachine.LoadWJMaterial()
|
||||
m_ActiveMachinePage = MachinePages.MachiningDb
|
||||
Case MachinePages.MachineCN
|
||||
MachiningDBBtn.IsChecked = True
|
||||
|
||||
@@ -248,16 +248,16 @@ Public Class MachineStatusUC
|
||||
dL3 = ptTip.z
|
||||
End If
|
||||
' Visualizzazione
|
||||
Axis1TxBx.Text = LenToString(dL1, -3)
|
||||
Axis2TxBx.Text = LenToString(dL2, -3)
|
||||
Axis3TxBx.Text = LenToString(dL3, -3)
|
||||
Axis1TxBx.Text = LenToString(dL1, -3, True)
|
||||
Axis2TxBx.Text = LenToString(dL2, -3, True)
|
||||
Axis3TxBx.Text = LenToString(dL3, -3, True)
|
||||
Axis4TxBx.Text = DoubleToString(dR1, -3)
|
||||
Axis5TxBx.Text = DoubleToString(dR2, -3)
|
||||
If m_AxesNumber >= 6 Then Axis6TxBx.Text = DoubleToString(dA6, -3)
|
||||
If m_AxesNumber >= 7 Then Axis7TxBx.Text = LenToString(dA7, -3)
|
||||
If m_AxesNumber >= 8 Then Axis8TxBx.Text = LenToString(dA8, -3)
|
||||
If m_AxesNumber >= 9 Then Axis9TxBx.Text = LenToString(dA9, -3)
|
||||
If m_AxesNumber >= 10 Then Axis10TxBx.Text = LenToString(dA10, -3)
|
||||
If m_AxesNumber >= 7 Then Axis7TxBx.Text = LenToString(dA7, -3, True)
|
||||
If m_AxesNumber >= 8 Then Axis8TxBx.Text = LenToString(dA8, -3, True)
|
||||
If m_AxesNumber >= 9 Then Axis9TxBx.Text = LenToString(dA9, -3, True)
|
||||
If m_AxesNumber >= 10 Then Axis10TxBx.Text = LenToString(dA10, -3, True)
|
||||
End Sub
|
||||
|
||||
Sub DisplayPositionDelta()
|
||||
@@ -265,22 +265,32 @@ Public Class MachineStatusUC
|
||||
Dim dL1, dL2, dL3, dR1, dR2, dA6, dA7, dA8, dA9, dA10 As Double
|
||||
m_MainWindow.m_CNCommunication.GetAxesDeltas(dL1, dL2, dL3, dR1, dR2, dA6, dA7, dA8, dA9, dA10)
|
||||
' Visualizzazione
|
||||
DeltaAxis1TxBx.Text = LenToString(dL1, -3)
|
||||
DeltaAxis2TxBx.Text = LenToString(dL2, -3)
|
||||
DeltaAxis3TxBx.Text = LenToString(dL3, -3)
|
||||
DeltaAxis1TxBx.Text = LenToString(dL1, -3, True)
|
||||
DeltaAxis2TxBx.Text = LenToString(dL2, -3, True)
|
||||
DeltaAxis3TxBx.Text = LenToString(dL3, -3, True)
|
||||
DeltaAxis4TxBx.Text = DoubleToString(dR1, -3)
|
||||
DeltaAxis5TxBx.Text = DoubleToString(dR2, -3)
|
||||
If m_AxesNumber >= 6 Then DeltaAxis6TxBx.Text = DoubleToString(dA6, -3)
|
||||
If m_AxesNumber >= 7 Then DeltaAxis7TxBx.Text = LenToString(dA7, -3)
|
||||
If m_AxesNumber >= 8 Then DeltaAxis8TxBx.Text = LenToString(dA8, -3)
|
||||
If m_AxesNumber >= 9 Then DeltaAxis9TxBx.Text = LenToString(dA9, -3)
|
||||
If m_AxesNumber >= 10 Then DeltaAxis10TxBx.Text = LenToString(dA10, -3)
|
||||
If m_AxesNumber >= 7 Then DeltaAxis7TxBx.Text = LenToString(dA7, -3, True)
|
||||
If m_AxesNumber >= 8 Then DeltaAxis8TxBx.Text = LenToString(dA8, -3, True)
|
||||
If m_AxesNumber >= 9 Then DeltaAxis9TxBx.Text = LenToString(dA9, -3, True)
|
||||
If m_AxesNumber >= 10 Then DeltaAxis10TxBx.Text = LenToString(dA10, -3, True)
|
||||
End Sub
|
||||
|
||||
Sub DisplayFeed()
|
||||
Dim dRealFeed As Double = m_CN.d_DInterpo_Prog_Feed * m_CN.d_DInterpo_Feed_override / 100
|
||||
'' modifica richiesta 26/05/2023 da Rosario per cliente Lanzetta (lettura feed per CN Fanuc)
|
||||
'If m_MainWindow.m_CNCommunication.m_nNCType = 4 Then
|
||||
' dRealFeed = m_CN.d_DInterpo_Prog_Feed
|
||||
'Else
|
||||
' dRealFeed = m_CN.d_DInterpo_Prog_Feed * m_CN.d_DInterpo_Feed_override / 100
|
||||
'End If
|
||||
|
||||
' modifica richiesta 24/03/2025 da Fabio per cliente Frigerio
|
||||
dRealFeed = m_CN.d_DInterpo_Prog_Feed * m_CN.d_DInterpo_Feed_override / 100
|
||||
|
||||
'Feed = DoubleToString(dRealFeed, 0)
|
||||
FeedTxBx.Text = LenToString(dRealFeed, 0)
|
||||
FeedTxBx.Text = LenToString(dRealFeed, 0, True)
|
||||
'FeedOverride = DoubleToString(m_CN.d_DInterpo_Feed_override, 0) & "%"
|
||||
Dim dFeedOverride As Double = m_CN.d_DInterpo_Feed_override
|
||||
FeedOverrideTxBx.Text = DoubleToString(dFeedOverride, 0) & "%"
|
||||
@@ -302,8 +312,18 @@ Public Class MachineStatusUC
|
||||
Dim dSpindleOvr As Double
|
||||
' se attivi nuovi comandi MDI su siemens
|
||||
If m_MainWindow.m_CNCommunication.m_nNCType = 3 AndAlso m_MainWindow.m_CNCommunication.m_CN.m_IsSiemensOne Then
|
||||
dSpindlePower = m_CN.d_data(0)
|
||||
dSpindleOvr = m_CN.d_data(1)
|
||||
|
||||
If m_MainWindow.m_CNCommunication.m_CN.m_IsSiemensOne Then
|
||||
dSpindlePower = m_CN.d_spindle_power
|
||||
'dSpindleOvr = If(m_CN.bPowerOvr > 0, m_CN.d_spindle_power / m_CN.bPowerOvr * 100, 0)
|
||||
dSpindleOvr = m_CN.bPowerOvr
|
||||
Else
|
||||
' questo sistema è deprecabile dalla versione 2.6d2 (nuova gestione dei vettori)
|
||||
dSpindlePower = m_CN.d_data(0)
|
||||
dSpindleOvr = m_CN.d_data(1)
|
||||
End If
|
||||
ElseIf m_MainWindow.m_CNCommunication.m_nNCType = 4 Then
|
||||
dSpindlePower = m_CN.d_spindle_power / 1000
|
||||
Else
|
||||
dSpindlePower = m_CN.d_spindle_power
|
||||
dSpindleOvr = If(m_CN.bPowerOvr > 0, m_CN.d_spindle_power / m_CN.bPowerOvr * 100, 0)
|
||||
|
||||
@@ -246,7 +246,7 @@
|
||||
|
||||
<TextBlock Name="SideAngleTxBl" Grid.Column="2" Grid.Row="3" Grid.RowSpan="3"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="SideAngleTxBx" Grid.Column="3" Grid.Row="3" Grid.RowSpan="3" Margin="0,0,15,0"
|
||||
<EgtWPFLib:EgtTextBox Name="SideAngleTxBx" Grid.Column="3" Grid.Row="3" Grid.RowSpan="3" Margin="0,0,15,0" IsLength="False"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
|
||||
<TextBlock Name="StepTypeTxBl" Grid.Column="0" Grid.Row="6" Grid.RowSpan="3"
|
||||
@@ -576,7 +576,7 @@
|
||||
|
||||
<TextBlock Name="ForwardAngleTxBl" Grid.Column="0" Grid.Row="6" Grid.RowSpan="3"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="ForwardAngleTxBx" Grid.Column="1" Grid.Row="6" Grid.RowSpan="3"
|
||||
<EgtWPFLib:EgtTextBox Name="ForwardAngleTxBx" Grid.Column="1" Grid.Row="6" Grid.RowSpan="3" IsLength="False"
|
||||
Style="{DynamicResource OmagCut_MachLeftCalculatorTextBoxInBorder}" />
|
||||
|
||||
<Border Name="LiHoleBrd" Grid.Column="0" Grid.Row="9" Grid.ColumnSpan="4" Grid.RowSpan="6"
|
||||
@@ -605,12 +605,12 @@
|
||||
|
||||
<TextBlock Name="LpTurnsTxBl" Grid.Column="0" Grid.Row="1" Grid.RowSpan="2"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="LpTurnsTxBx" Grid.Column="1" Grid.Row="1"
|
||||
<EgtWPFLib:EgtTextBox Name="LpTurnsTxBx" Grid.Column="1" Grid.Row="1" IsLength="False"
|
||||
Style="{DynamicResource OmagCut_MachLeftCalculatorTextBoxInBorder}" />
|
||||
|
||||
<TextBlock Name="HpTurnsTxBl" Grid.Column="2" Grid.Row="1"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="HpTurnsTxBx" Grid.Column="3" Grid.Row="1"
|
||||
<EgtWPFLib:EgtTextBox Name="HpTurnsTxBx" Grid.Column="3" Grid.Row="1" IsLength="False"
|
||||
Style="{DynamicResource OmagCut_MachLeftCalculatorTextBoxInBorder}" />
|
||||
|
||||
</Grid>
|
||||
@@ -725,7 +725,7 @@
|
||||
|
||||
<TextBlock Name="SpeedTxBl" Grid.Column="0"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="SpeedTxBx" Grid.Column="1"
|
||||
<EgtWPFLib:EgtTextBox Name="SpeedTxBx" Grid.Column="1" IsLength="False"
|
||||
Style="{DynamicResource OmagCut_MachToolCalculatorTextBox}" />
|
||||
|
||||
</Grid>
|
||||
|
||||
@@ -61,7 +61,7 @@ Public Class MachiningDbPageUC
|
||||
StepType = {EgtMsg(MSG_COMBOBOXPARAM + 38), EgtMsg(MSG_COMBOBOXPARAM + 39), EgtMsg(MSG_COMBOBOXPARAM + 40)}
|
||||
RouFinStepType = {EgtMsg(MSG_COMBOBOXPARAM + 38), EgtMsg(MSG_COMBOBOXPARAM + 39)}
|
||||
ExtCornType = {EgtMsg(MSG_COMBOBOXPARAM + 43), EgtMsg(MSG_COMBOBOXPARAM + 44), EgtMsg(MSG_COMBOBOXPARAM + 45)}
|
||||
IntCornType = {EgtMsg(MSG_COMBOBOXPARAM + 43), EgtMsg(MSG_COMBOBOXPARAM + 44)}
|
||||
IntCornType = {EgtMsg(MSG_COMBOBOXPARAM + 43), EgtMsg(MSG_COMBOBOXPARAM + 44), EgtMsg(90852)}
|
||||
|
||||
' Assegno array a combobox
|
||||
WorkSideCmBx.ItemsSource = WorkSide
|
||||
@@ -208,7 +208,7 @@ Public Class MachiningDbPageUC
|
||||
MillTool.Clear()
|
||||
bFound = EgtTdbGetFirstTool(MCH_TF.MILL, sToolName, nType)
|
||||
While bFound
|
||||
If nType = MCH_TY.MILL_STD Then MillTool.Add( sToolName)
|
||||
If nType = MCH_TY.MILL_STD And sToolName.Trim.ToLower <> "probe" Then MillTool.Add(sToolName)
|
||||
bFound = EgtTdbGetNextTool(MCH_TF.MILL, sToolName, nType)
|
||||
End While
|
||||
PocketTool.Clear()
|
||||
@@ -899,11 +899,11 @@ Public Class MachiningDbPageUC
|
||||
For Each Material As MachiningMaterial In m_MaterialsList
|
||||
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) & ";"
|
||||
sMaterialString += Material.nId.ToString & "." & Material.nSubId.ToString & "," & DoubleToString(Material.dMinThickness, 3) & "," & DoubleToString(Material.dMaxThickness, 3) & ";"
|
||||
End If
|
||||
Else
|
||||
If Material.bIsActive Then
|
||||
sMaterialString += Material.nId.ToString & "," & DoubleToString(Material.dMinThickness, 0) & "," & DoubleToString(Material.dMaxThickness, 0) & ";"
|
||||
sMaterialString += Material.nId.ToString & "," & DoubleToString(Material.dMinThickness, 3) & "," & DoubleToString(Material.dMaxThickness, 3) & ";"
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
|
||||
@@ -61,8 +61,8 @@ Public Class PolishingsPageUC
|
||||
RepeatTxBl.Text = EgtMsg(91093) ' Ripetizioni
|
||||
StepTxBl.Text = EgtMsg(90787) ' Passo
|
||||
OffSetTxBl.Text = EgtMsg(91089) ' Offset
|
||||
RadiusTxBl.Text = "Raggio"
|
||||
DistanceTxBl.Text = "Distanza"
|
||||
RadiusTxBl.Text = EgtMsg(91139) ' Raggio
|
||||
DistanceTxBl.Text = EgtMsg(91140) ' Distanza
|
||||
LiLoGpBx.Header = EgtMsg(91094) ' Attacco/Uscita
|
||||
LiLenTxBl.Text = EgtMsg(91097) ' Lunghezza
|
||||
LiHeightTxBl.Text = EgtMsg(91095) ' Altezza
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
<!-- Definizione del ToolHolderUc -->
|
||||
<Grid>
|
||||
<Image Source="/Resources/ToolChangerPos.png"/>
|
||||
<ToggleButton Name="Tool" Width="50" Height="50" Margin="22,40,26,8" Background="#7FB4B4B4">
|
||||
<ToggleButton Name="Tool" Width="50" Height="50" Margin="62,10,16,10" Background="#7FB4B4B4">
|
||||
<ToggleButton.Template>
|
||||
<ControlTemplate TargetType="{x:Type ToggleButton}">
|
||||
<Grid>
|
||||
@@ -25,7 +25,7 @@
|
||||
|
||||
</ToggleButton.Template>
|
||||
</ToggleButton>
|
||||
<TextBlock Name="PositionNameTxBl" Height="22" Width="68" FontSize="16" Margin="12,16,41,61"/>
|
||||
<TextBlock Name="PositionNameTxBl" Height="22" Width="50" FontSize="16" Margin="20,40,70,53"/>
|
||||
|
||||
</Grid>
|
||||
</UserControl>
|
||||
|
||||
@@ -281,12 +281,12 @@
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<TextBlock Name="SpeedTxBl" Grid.Column="0" Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="SpeedTxBx" Grid.Column="1"
|
||||
<EgtWPFLib:EgtTextBox Name="SpeedTxBx" Grid.Column="1" IsLength="False"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBoxInGroupBox}" />
|
||||
|
||||
<TextBlock Name="MaxSpeedTxBl" Grid.Column="2"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="MaxSpeedTxBx" Grid.Column="3"
|
||||
<EgtWPFLib:EgtTextBox Name="MaxSpeedTxBx" Grid.Column="3" IsLength="False"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBoxInGroupBox}" />
|
||||
|
||||
</Grid>
|
||||
@@ -384,7 +384,7 @@
|
||||
|
||||
<TextBlock Name="MaxAbsorptionTxBl" Grid.Column="0"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}" Grid.ColumnSpan="1" ScrollViewer.VerticalScrollBarVisibility="Disabled" TextWrapping="Wrap"/>
|
||||
<EgtWPFLib:EgtTextBox Name="MaxAbsorptionTxBx" Grid.Column="1"
|
||||
<EgtWPFLib:EgtTextBox Name="MaxAbsorptionTxBx" Grid.Column="1" IsLength="False"
|
||||
Style="{DynamicResource OmagCut_LeftCalculatorTextBoxInBorder}" />
|
||||
|
||||
<TextBlock Name="MinFeedTxBl" Grid.Column="2" Style="{DynamicResource OmagCut_ToolsDBTextBlock}" />
|
||||
|
||||
@@ -695,7 +695,16 @@ Public Class ToolsDbPageUC
|
||||
Dim ToolName As String = String.Empty
|
||||
Dim bFound As Boolean = EgtTdbGetFirstTool(nTType, ToolName, nType)
|
||||
While bFound
|
||||
If nType = nTType Then ToolCathegory.Items.Add(New CustomItem(ToolName, nType))
|
||||
Dim nDebug As Integer = GetPrivateProfileInt(S_GENERAL, K_DEBUG, 0, m_sIniFile)
|
||||
If nType = nTType Then
|
||||
If nTType <> MCH_TY.MILL_STD Then
|
||||
' se utensile diverso da MILL
|
||||
ToolCathegory.Items.Add(New CustomItem(ToolName, nType))
|
||||
ElseIf nTType = MCH_TY.MILL_STD And (ToolName.Trim.ToLower <> "probe" Or nDebug > 4) Then
|
||||
' Se utensile MILL con nome "probe" aggiungo solo se livello debug maggiore di 4
|
||||
ToolCathegory.Items.Add(New CustomItem(ToolName, nType))
|
||||
End If
|
||||
End If
|
||||
bFound = EgtTdbGetNextTool(nTType, ToolName, nType)
|
||||
End While
|
||||
ToolsList.Add(ToolCathegory)
|
||||
|
||||
+163
-153
@@ -8,256 +8,266 @@
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="768" d:DesignWidth="1280" Initialized="WaterJetPage_Initialized">
|
||||
|
||||
<!-- Definizione della PolishingsPage -->
|
||||
<Border Style="{DynamicResource OmagCut_PageBorder}">
|
||||
<!-- Definizione della PolishingsPage -->
|
||||
<Border Style="{DynamicResource OmagCut_PageBorder}">
|
||||
|
||||
<Grid Name="WaterJetPageGrid" >
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="3*"/>
|
||||
<ColumnDefinition Width="8*"/>
|
||||
<ColumnDefinition Width="4*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="8*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid Name="WaterJetPageGrid" >
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="3*"/>
|
||||
<ColumnDefinition Width="8*"/>
|
||||
<ColumnDefinition Width="4*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="8*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<!--Lista dei materiali-->
|
||||
<GroupBox Name="MaterialGpBx" Style="{DynamicResource OmagCut_GroupBox}" Grid.Column="0"
|
||||
<!--Lista dei materiali-->
|
||||
<GroupBox Name="MaterialGpBx" Style="{DynamicResource OmagCut_GroupBox}" Grid.Column="0"
|
||||
Header="{Binding Material_Msg}"
|
||||
Grid.Row="0" BorderThickness="0">
|
||||
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="7*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="7*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<!--Lista dei materiali-->
|
||||
<ListBox Name="MaterialsLstBx"
|
||||
<!--Lista dei materiali-->
|
||||
<ListBox Name="MaterialsLstBx"
|
||||
ItemsSource="{Binding MaterialList}" SelectedItem="{Binding SelMaterial}"
|
||||
Grid.RowSpan="2">
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding Name}" Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</DataTemplate>
|
||||
</ListBox.ItemTemplate>
|
||||
</ListBox>
|
||||
<!--Campo visualizzato solo per aggiungere un nuovo materiale-->
|
||||
<EgtWPFLib:EgtTextBox Name="NewMaterialNameTxBx" Grid.Row="1"
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding Name}" Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</DataTemplate>
|
||||
</ListBox.ItemTemplate>
|
||||
</ListBox>
|
||||
<!--Campo visualizzato solo per aggiungere un nuovo materiale-->
|
||||
<EgtWPFLib:EgtTextBox Name="NewMaterialNameTxBx" Grid.Row="1"
|
||||
Width="220"
|
||||
Text="{Binding sNewMaterial}"
|
||||
Visibility="{Binding NewMaterial_Visibility}"
|
||||
Style="{DynamicResource OmagCut_KeyboardTextBox}"
|
||||
KeyboardPosition="Top"/>
|
||||
<!--Pulsanti per aggiungere/rimuovere/salvare la lista-->
|
||||
<UniformGrid Grid.Row="2" Columns="3">
|
||||
<Button Name="NewMaterialBtn" Grid.Column="0"
|
||||
<!--Pulsanti per aggiungere/rimuovere/salvare la lista-->
|
||||
<UniformGrid Grid.Row="2" Columns="3">
|
||||
<Button Name="NewMaterialBtn" Grid.Column="0"
|
||||
Content="{Binding New_Msg}"
|
||||
Command="{Binding NewMaterialCommand}"
|
||||
Style="{DynamicResource OmagCut_WjDbRightGrayGradientYellowTextButton}"/>
|
||||
<Button Name="DeleteMaterialBtn" Grid.Column="1"
|
||||
<Button Name="DeleteMaterialBtn" Grid.Column="1"
|
||||
Content="{Binding Delete_Msg}"
|
||||
Command="{Binding DeleteMaterialCommand}"
|
||||
Style="{DynamicResource OmagCut_WjDbRightGrayGradientYellowTextButton}"/>
|
||||
<Button Name="ModifyMaterialBtn" Grid.Column="1"
|
||||
<Button Name="ModifyMaterialBtn" Grid.Column="1"
|
||||
Content="{Binding Modify_Msg}"
|
||||
Command="{Binding ModifyMaterialCommand}"
|
||||
Style="{DynamicResource OmagCut_WjDbRightGrayGradientYellowTextButton}"/>
|
||||
</UniformGrid>
|
||||
</UniformGrid>
|
||||
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
||||
</GroupBox>
|
||||
</GroupBox>
|
||||
|
||||
<!--Raggruppo all'interno della stessa cornice le sottocatogorie e i parametri-->
|
||||
<Border Style="{DynamicResource OmagCut_Border}"
|
||||
<!--Raggruppo all'interno della stessa cornice le sottocatogorie e i parametri-->
|
||||
<Border Style="{DynamicResource OmagCut_Border}"
|
||||
Grid.Column="1" Grid.Row="0"
|
||||
Grid.ColumnSpan="2" Grid.RowSpan="1">
|
||||
|
||||
<Grid Name="SubMaterialGrd" Grid.Column="1">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid Name="SubMaterialGrd" Grid.Column="1">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<!--Sottocategoria dei materiali associata alla lista precedente-->
|
||||
<GroupBox Name="SubMaterialGpBx" Style="{DynamicResource OmagCut_GroupBox}"
|
||||
<!--Sottocategoria dei materiali associata alla lista precedente-->
|
||||
<GroupBox Name="SubMaterialGpBx" Style="{DynamicResource OmagCut_GroupBox}"
|
||||
Header="{Binding SubMaterial_Msg}"
|
||||
Grid.Column="0" Grid.Row="0"
|
||||
Grid.ColumnSpan="1" Grid.RowSpan="8" BorderThickness="0">
|
||||
|
||||
<Grid Grid.Column="1">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="7*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid Grid.Column="1">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="7*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<!--Lista dei materiali-->
|
||||
<ListBox Name="SubMaterialsLstBx" ItemsSource="{Binding Path=SelectedItem.SubMaterialList, ElementName=MaterialsLstBx}"
|
||||
<!--Lista dei materiali-->
|
||||
<ListBox Name="SubMaterialsLstBx" ItemsSource="{Binding Path=SelectedItem.SubMaterialList, ElementName=MaterialsLstBx}"
|
||||
SelectedItem="{Binding Path=SelectedItem.SelSubMaterial, ElementName=MaterialsLstBx}"
|
||||
Grid.RowSpan="2">
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding Name}" Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</DataTemplate>
|
||||
</ListBox.ItemTemplate>
|
||||
</ListBox>
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding Name}" Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</DataTemplate>
|
||||
</ListBox.ItemTemplate>
|
||||
</ListBox>
|
||||
|
||||
<!--Campo visualizzato solo per aggiungere un nuovo materiale-->
|
||||
<EgtWPFLib:EgtTextBox Name="NewSubMaterialNameTxBx" Grid.Row="1"
|
||||
<!--Campo visualizzato solo per aggiungere un nuovo materiale-->
|
||||
<EgtWPFLib:EgtTextBox Name="NewSubMaterialNameTxBx" Grid.Row="1"
|
||||
Width="220"
|
||||
Text="{Binding sNewSubMaterial}"
|
||||
Visibility="{Binding NewSubMaterial_Visibility}"
|
||||
Style="{DynamicResource OmagCut_KeyboardTextBox}"
|
||||
KeyboardPosition="Top"/>
|
||||
|
||||
<!--Pulsanti per aggiungere/rimuovere/salvare la lista-->
|
||||
<UniformGrid Grid.Row="2" Columns="3">
|
||||
<Button Name="NewSubMaterialBtn" Grid.Column="0"
|
||||
<!--Pulsanti per aggiungere/rimuovere/salvare la lista-->
|
||||
<UniformGrid Grid.Row="2" Columns="3">
|
||||
<Button Name="NewSubMaterialBtn" Grid.Column="0"
|
||||
Content="{Binding New_Msg}"
|
||||
Command="{Binding NewSubMaterialCommand}"
|
||||
Style="{DynamicResource OmagCut_WjDbRightGrayGradientYellowTextButton}"/>
|
||||
<Button Name="RemoveSubMaterialBtn" Grid.Column="1"
|
||||
<Button Name="RemoveSubMaterialBtn" Grid.Column="1"
|
||||
Content="{Binding Delete_Msg}"
|
||||
Command="{Binding DeleteSubMaterialCommand}"
|
||||
Style="{DynamicResource OmagCut_WjDbRightGrayGradientYellowTextButton}"/>
|
||||
<Button Name="ModifySubMaterialBtn" Grid.Column="1"
|
||||
<Button Name="ModifySubMaterialBtn" Grid.Column="1"
|
||||
Content="{Binding Modify_Msg}"
|
||||
Command="{Binding ModifySubMaterialCommand}"
|
||||
Style="{DynamicResource OmagCut_WjDbRightGrayGradientYellowTextButton}"/>
|
||||
</UniformGrid>
|
||||
</UniformGrid>
|
||||
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
||||
</GroupBox>
|
||||
</GroupBox>
|
||||
|
||||
<!--Lista dei parametri associata alla sottovcategoria dei materiali-->
|
||||
<GroupBox Name="ParamsGpBx"
|
||||
<!--Lista dei parametri associata alla sottovcategoria dei materiali-->
|
||||
<GroupBox Name="ParamsGpBx"
|
||||
Grid.Column="1" Grid.Row="0" Margin="0,0,0,3"
|
||||
Grid.ColumnSpan="3" Grid.RowSpan="8" BorderThickness="0">
|
||||
|
||||
<!--Titolazione delle colonne della tabella-->
|
||||
<GroupBox.Header >
|
||||
<Grid Width="700">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<TextBlock Text="{Binding Thickness_Msg}" Grid.Column="0" HorizontalAlignment="Center"
|
||||
<!--Titolazione delle colonne della tabella-->
|
||||
<GroupBox.Header >
|
||||
<Grid Width="700">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<TextBlock Text="{Binding Thickness_Msg}" Grid.Column="0" HorizontalAlignment="Center"
|
||||
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"
|
||||
FontSize="{DynamicResource FontSize_GroupBoxHeader}"/>
|
||||
<TextBlock Text="{Binding Q1_Msg}" Grid.Column="1" HorizontalAlignment="Center"
|
||||
<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"
|
||||
<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"
|
||||
<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"
|
||||
<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"
|
||||
<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"
|
||||
<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>
|
||||
<TextBlock Text="{Binding AngComp_Msg}" Grid.Column="7" HorizontalAlignment="Center"
|
||||
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"
|
||||
FontSize="{DynamicResource FontSize_GroupBoxHeader}"/>
|
||||
</Grid>
|
||||
|
||||
<ListBox Name="ParamLstBx"
|
||||
</GroupBox.Header>
|
||||
|
||||
<!--Definizione della Grid dei parametri delle lavorazioni-->
|
||||
<Grid Grid.Column="2">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="308*"/>
|
||||
<ColumnDefinition Width="73*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="7*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<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>
|
||||
Grid.RowSpan="2" Grid.ColumnSpan="2">
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Grid Width="700">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<EgtWPFLib:EgtTextBox Text="{Binding Thickness}" Grid.Column="0"
|
||||
<EgtWPFLib:EgtTextBox Text="{Binding Thickness}" Grid.Column="0"
|
||||
Style="{DynamicResource OmagCut_CalculatorParamWjTextBox}" />
|
||||
<EgtWPFLib:EgtTextBox Text="{Binding Q1}" Grid.Column="1"
|
||||
<EgtWPFLib:EgtTextBox Text="{Binding Q1}" Grid.Column="1"
|
||||
Style="{DynamicResource OmagCut_CalculatorParamWjTextBox}" />
|
||||
<EgtWPFLib:EgtTextBox Text="{Binding Q2}" Grid.Column="2"
|
||||
<EgtWPFLib:EgtTextBox Text="{Binding Q2}" Grid.Column="2"
|
||||
Style="{DynamicResource OmagCut_CalculatorParamWjTextBox}" />
|
||||
<EgtWPFLib:EgtTextBox Text="{Binding Q3}" Grid.Column="3"
|
||||
<EgtWPFLib:EgtTextBox Text="{Binding Q3}" Grid.Column="3"
|
||||
Style="{DynamicResource OmagCut_CalculatorParamWjTextBox}" />
|
||||
<EgtWPFLib:EgtTextBox Text="{Binding Q4}" Grid.Column="4"
|
||||
<EgtWPFLib:EgtTextBox Text="{Binding Q4}" Grid.Column="4"
|
||||
Style="{DynamicResource OmagCut_CalculatorParamWjTextBox}" />
|
||||
<EgtWPFLib:EgtTextBox Text="{Binding Q5}" Grid.Column="5"
|
||||
<EgtWPFLib:EgtTextBox Text="{Binding Q5}" Grid.Column="5"
|
||||
Style="{DynamicResource OmagCut_CalculatorParamWjTextBox}" />
|
||||
<EgtWPFLib:EgtTextBox Text="{Binding QExtra}" Grid.Column="6"
|
||||
<EgtWPFLib:EgtTextBox Text="{Binding QExtra}" Grid.Column="6"
|
||||
Style="{DynamicResource OmagCut_CalculatorParamWjTextBox}" />
|
||||
<EgtWPFLib:EgtTextBox Text="{Binding dAngComp}" Grid.Column="7" IsLength="False"
|
||||
Style="{DynamicResource OmagCut_CalculatorParamWjTextBox}" />
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</ListBox.ItemTemplate>
|
||||
</ListBox>
|
||||
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</ListBox.ItemTemplate>
|
||||
</ListBox>
|
||||
|
||||
<UniformGrid Grid.Row="2" Columns="9" Grid.ColumnSpan="3">
|
||||
<Button Name="NewParamBtn" Grid.Column="0"
|
||||
<UniformGrid Grid.Row="2" Columns="9" Grid.ColumnSpan="2">
|
||||
<Button Name="NewParamBtn" Grid.Column="0"
|
||||
Command="{Binding NewWjParamCommand}"
|
||||
Content="{Binding New_Msg}"
|
||||
Style="{DynamicResource OmagCut_WjDbRightGrayGradientYellowTextButton}"/>
|
||||
<Button Name="RemoveParamBtn" Grid.Column="1"
|
||||
<Button Name="RemoveParamBtn" Grid.Column="1"
|
||||
Command="{Binding DeleteWjParamCommand}"
|
||||
Content="{Binding Delete_Msg}"
|
||||
Style="{DynamicResource OmagCut_WjDbRightGrayGradientYellowTextButton}"/>
|
||||
</UniformGrid>
|
||||
</UniformGrid>
|
||||
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
||||
</GroupBox>
|
||||
</GroupBox>
|
||||
|
||||
</Grid>
|
||||
</Border>
|
||||
<Button Name="SaveKitBtn" Grid.Row="2" Grid.Column="2"
|
||||
</Grid>
|
||||
</Border>
|
||||
<Button Name="SaveKitBtn" Grid.Row="2" Grid.Column="2"
|
||||
Command="{Binding SaveCommand}"
|
||||
Content="{Binding Save_Msg}"
|
||||
Style="{DynamicResource OmagCut_RightGrayGradientYellowTextButton}"/>
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
||||
</Border>
|
||||
</Border>
|
||||
|
||||
</UserControl>
|
||||
@@ -14,12 +14,20 @@ Public Class WaterJetPageUC
|
||||
|
||||
Private Sub WaterJetPage_Initialized(sender As Object, e As EventArgs)
|
||||
m_refWaterjetDbWindowVM = New WaterjetDbWindowVM_OmagCUT(m_MainWindow.m_CurrentMachine.sMachDir)
|
||||
'----------------------------------------------------------------------------------------
|
||||
' TEMPORANEO - se dati in INCH e richiesta di frazioni eseguo la conversione in frazione!
|
||||
ConvertParamListValueToFracrion()
|
||||
'----------------------------------------------------------------------------------------
|
||||
Me.DataContext = m_refWaterjetDbWindowVM
|
||||
EgtWPFLib.Utility.MainWindow = m_MainWindow
|
||||
End Sub
|
||||
|
||||
Public Sub WaterJetPage_Reinitialize()
|
||||
m_refWaterjetDbWindowVM = New WaterjetDbWindowVM_OmagCUT(m_MainWindow.m_CurrentMachine.sMachDir)
|
||||
'----------------------------------------------------------------------------------------
|
||||
' TEMPORANEO - se dati in INCH e richiesta di frazioni eseguo la conversione in frazione!
|
||||
ConvertParamListValueToFracrion()
|
||||
'----------------------------------------------------------------------------------------
|
||||
Me.DataContext = m_refWaterjetDbWindowVM
|
||||
End Sub
|
||||
|
||||
@@ -51,5 +59,48 @@ Public Class WaterJetPageUC
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub ConvertParamListValueToFracrion()
|
||||
' TEMPORANEO - se dati in INCH e richiesta di frazioni eseguo la conversione in frazione!
|
||||
Dim Index1 As Integer = 0
|
||||
For Index1 = 0 To m_refWaterjetDbWindowVM.MaterialList.Count - 1
|
||||
Dim Index2 As Integer = 0
|
||||
For Index2 = 0 To m_refWaterjetDbWindowVM.MaterialList(Index1).SubMaterialList.Count - 1
|
||||
Dim Index3 As Integer = 0
|
||||
For Index3 = 0 To m_refWaterjetDbWindowVM.MaterialList(Index1).SubMaterialList(Index2).ParamList.Count - 1
|
||||
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
|
||||
Dim dAngComp As Double
|
||||
StringToLen(m_refWaterjetDbWindowVM.MaterialList(Index1).SubMaterialList(Index2).ParamList(Index3).Thickness, dThickness)
|
||||
Dim sVal As String = LenToString(dThickness, 3)
|
||||
m_refWaterjetDbWindowVM.MaterialList(Index1).SubMaterialList(Index2).ParamList(Index3).SetThickness(sVal)
|
||||
StringToLen(m_refWaterjetDbWindowVM.MaterialList(Index1).SubMaterialList(Index2).ParamList(Index3).Q1, dQ1)
|
||||
sVal = LenToString(dQ1, 3)
|
||||
m_refWaterjetDbWindowVM.MaterialList(Index1).SubMaterialList(Index2).ParamList(Index3).SetQ1(sVal)
|
||||
StringToLen(m_refWaterjetDbWindowVM.MaterialList(Index1).SubMaterialList(Index2).ParamList(Index3).Q2, dQ2)
|
||||
sVal = LenToString(dQ2, 3)
|
||||
m_refWaterjetDbWindowVM.MaterialList(Index1).SubMaterialList(Index2).ParamList(Index3).SetQ2(sVal)
|
||||
StringToLen(m_refWaterjetDbWindowVM.MaterialList(Index1).SubMaterialList(Index2).ParamList(Index3).Q3, dQ3)
|
||||
sVal = LenToString(dQ3, 3)
|
||||
m_refWaterjetDbWindowVM.MaterialList(Index1).SubMaterialList(Index2).ParamList(Index3).SetQ3(sVal)
|
||||
StringToLen(m_refWaterjetDbWindowVM.MaterialList(Index1).SubMaterialList(Index2).ParamList(Index3).Q4, dQ4)
|
||||
sVal = LenToString(dQ4, 3)
|
||||
m_refWaterjetDbWindowVM.MaterialList(Index1).SubMaterialList(Index2).ParamList(Index3).SetQ4(sVal)
|
||||
StringToLen(m_refWaterjetDbWindowVM.MaterialList(Index1).SubMaterialList(Index2).ParamList(Index3).Q5, dQ5)
|
||||
sVal = LenToString(dQ5, 3)
|
||||
m_refWaterjetDbWindowVM.MaterialList(Index1).SubMaterialList(Index2).ParamList(Index3).SetQ5(sVal)
|
||||
StringToLen(m_refWaterjetDbWindowVM.MaterialList(Index1).SubMaterialList(Index2).ParamList(Index3).QExtra, dQExtra)
|
||||
sVal = LenToString(dQExtra, 3)
|
||||
m_refWaterjetDbWindowVM.MaterialList(Index1).SubMaterialList(Index2).ParamList(Index3).SetQExtra(sVal)
|
||||
StringToDouble(m_refWaterjetDbWindowVM.MaterialList(Index1).SubMaterialList(Index2).ParamList(Index3).dAngComp, dAngComp)
|
||||
Next
|
||||
Next
|
||||
Next
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
|
||||
@@ -445,6 +445,12 @@ Public Class WaterjetDbWindowVM
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property AngComp_Msg As String
|
||||
Get
|
||||
Return "Ang"
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property New_Msg As String
|
||||
Get
|
||||
Return "Nuovo"
|
||||
@@ -516,7 +522,14 @@ Public Class WaterjetDbWindowVM
|
||||
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))
|
||||
Dim LocalWjParam As New WjParam(QInd, dThickness, dQ1, dQ2, dQ3, dQ4, dQ5, dQExtra, m_refWaterPageV)
|
||||
QParamList.Add(LocalWjParam)
|
||||
' leggo il nuovo parametro di correzione conicità (di default il parametro è 0)
|
||||
If sParams.Length() >= 8 Then
|
||||
Dim dAngCompo As Double
|
||||
StringToDouble(sParams(7), dAngCompo)
|
||||
LocalWjParam.dAngComp = dAngCompo
|
||||
End If
|
||||
End If
|
||||
QInd += 1
|
||||
End While
|
||||
@@ -868,6 +881,17 @@ Public Class WjParam
|
||||
End Set
|
||||
End Property
|
||||
|
||||
' angolo di compensazione conicità getto: 01/02/2023 ver 2.5b1
|
||||
Private m_dAngComp As Double = 0
|
||||
Public Property dAngComp As Double
|
||||
Get
|
||||
Return m_dAngComp
|
||||
End Get
|
||||
Set(value As Double)
|
||||
m_dAngComp = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property ParamLstBx_Width As Double
|
||||
Get
|
||||
Return m_refWaterPageV.ParamsGpBx.ActualWidth - 20
|
||||
|
||||
+2
-2
@@ -27,7 +27,7 @@
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Border Name="LogoBrd" Background="Transparent">
|
||||
<Image Source="{DynamicResource LogoOmagImg}" Stretch="Uniform" Margin="1"/>
|
||||
<Image Source="../Resources/NewIcons/logo-OmCut.png" Stretch="Uniform" Margin="1"/>
|
||||
</Border>
|
||||
|
||||
<!-- ** Definizione della Grid delle tab ** -->
|
||||
@@ -53,7 +53,7 @@
|
||||
</ToggleButton>
|
||||
</Grid>
|
||||
|
||||
<Button Grid.Column="2" Style="{DynamicResource OmagCut_BlueIconButton}" Click="ExitBtn_Click">
|
||||
<Button Name="ExitBtn" Grid.Column="2" Style="{DynamicResource OmagCut_BlueIconButton}" Click="ExitBtn_Click">
|
||||
<Image Source="{DynamicResource XImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
|
||||
|
||||
+190
-54
@@ -23,6 +23,11 @@ Class MainWindow
|
||||
' Coefficiente di scalatura della finestra rispetto a standard
|
||||
Friend m_dMWinScale As Double = 1
|
||||
|
||||
' Variabile che definisce l'avvio forzato in modalità FRAME
|
||||
Friend m_OnlyFrame As Boolean = False
|
||||
|
||||
Public Shared m_bShowSVGParkInd As Boolean = True
|
||||
|
||||
' Dichiarazione delle Page UserControl
|
||||
Friend m_WorkInProgressPageUC As WorkInProgressPageUC
|
||||
Friend m_CurrentProjectPageUC As CurrentProjectPageUC
|
||||
@@ -38,6 +43,8 @@ Class MainWindow
|
||||
Friend m_MachinePageUC As MachinePageUC
|
||||
Friend m_OptionsPageUC As OptionsPageUC
|
||||
|
||||
Friend m_IsClosingApplication As Integer = 0
|
||||
|
||||
' Dichiarazione variabili direttori
|
||||
Private m_sExeRoot As String = String.Empty
|
||||
Private m_sDataRoot As String = String.Empty
|
||||
@@ -98,6 +105,8 @@ Class MainWindow
|
||||
OFFICE_TYPE = 2 ^ 19 ' 524288
|
||||
REGISTRATION = 2 ^ 20 ' 1048576
|
||||
SIMPLESTATISTICS = 2 ^ 21 ' 2097152
|
||||
COMPOFRAME = 2 ^ 22 ' 4194304
|
||||
CUT_LIGHT = 2 ^ 23 ' 8388608
|
||||
End Enum
|
||||
' Opzione nesting automatico
|
||||
Private m_bAutoNest As Boolean = False
|
||||
@@ -321,15 +330,30 @@ Class MainWindow
|
||||
Dim sNestKey As String = ""
|
||||
EgtUILib.GetPrivateProfileString(S_LICENCE, K_NESTKEY, "", sNestKey, sLicFile)
|
||||
EgtSetNestKey(sNestKey)
|
||||
Dim bNetHwKey As Boolean = ( GetPrivateProfileInt(S_GENERAL, K_NETKEY, 0, m_sIniFile) = 1)
|
||||
EgtSetNetHwKey( bNetHwKey)
|
||||
Dim bNetHwKey As Boolean = (GetPrivateProfileInt(S_GENERAL, K_NETKEY, 0, m_sIniFile) = 1)
|
||||
EgtSetNetHwKey(bNetHwKey)
|
||||
|
||||
' Impostazioni per chiave di rete
|
||||
Dim bNetKey As Boolean = (GetPrivateProfileInt(S_GENERAL, K_NETKEY, 0, m_sIniFile) = 1)
|
||||
EgtSetNetHwKey(bNetKey)
|
||||
Dim sLockId As String = ""
|
||||
EgtUILib.GetPrivateProfileString(S_LICENCE, K_LOCKID, "", sLockId, sLicFile)
|
||||
If Not String.IsNullOrEmpty(sLockId) Then
|
||||
EgtSetLockId(sLockId)
|
||||
End If
|
||||
|
||||
' Verifico abilitazione nesting automatico
|
||||
m_bAutoNest = Not String.IsNullOrWhiteSpace(sNestKey)
|
||||
' Recupero opzioni della chiave
|
||||
Dim bKey As Boolean = EgtGetKeyLevel(9423, 2412, 1, m_nKeyLevel) And
|
||||
EgtGetKeyOptions(9423, 2412, 1, m_nKeyOptions)
|
||||
Dim bKey As Boolean = EgtGetKeyLevel(9423, 2704, 1, m_nKeyLevel) And
|
||||
EgtGetKeyOptions(9423, 2704, 1, m_nKeyOptions)
|
||||
' Verifico abilitazione prodotto
|
||||
Dim bProd As Boolean = GetKeyOption(KEY_OPT.CUT_BASE)
|
||||
' Impostazione per programma OnlyFrame: solo se CUT_BASE non attivo
|
||||
If Not bProd Then
|
||||
m_OnlyFrame = GetKeyOption(KEY_OPT.CUT_LIGHT)
|
||||
End If
|
||||
|
||||
' Inizializzazione generale di EgtInterface
|
||||
m_nDebug = GetPrivateProfileInt(S_GENERAL, K_DEBUG, 0, m_sIniFile)
|
||||
m_sVersion = My.Application.Info.Version.Major.ToString() & "." &
|
||||
@@ -437,8 +461,9 @@ Class MainWindow
|
||||
|
||||
' abilito il bottone per la gestione del comando di Check-Up-Start (posziona lama prelavorazione)
|
||||
If GetPrivateProfileInt(S_GENERAL, "Test", "0", m_sIniFile) = 0 OrElse
|
||||
Not File.Exists( m_CurrentMachine.sMachDir() & "\DirectCmd\TestWork.lua") Then
|
||||
Not File.Exists(m_CurrentMachine.sMachDir() & "\DirectCmd\TestWork.lua") Then
|
||||
m_CadCutPageUC.m_ProjectMgr.TestBtn.Visibility = Visibility.Collapsed
|
||||
EgtOutLog("Warning: Missing file 'TestWork.lua' in folder 'DirectCmd', buttun 'TEST' collapsed!")
|
||||
Else
|
||||
m_CadCutPageUC.m_ProjectMgr.TestBtn.Visibility = Visibility.Visible
|
||||
End If
|
||||
@@ -551,14 +576,14 @@ Class MainWindow
|
||||
|
||||
' è permessa una sola istanza alla volta del programma OmagCUT -> "(1)" : "(" & nIstance.ToString & ")"
|
||||
EgtPHOTOLib.MainData.SetUser(Environment.MachineName & "\" & Environment.UserName & " (1)")
|
||||
Dim sIdKey As String = String.Empty
|
||||
EgtGetKeyInfo(sIdKey)
|
||||
EgtPHOTOLib.MainData.SetKey(sIdKey)
|
||||
End If
|
||||
Dim sIdKey As String = String.Empty
|
||||
EgtGetKeyInfo(sIdKey)
|
||||
EgtPHOTOLib.MainData.SetKey(sIdKey)
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
' --------------------------------- SLAB DB -------------------------------------------------------
|
||||
|
||||
ExitBtn.ToolTip = "Exit" & vbCrLf & "Minimize (Shift)"
|
||||
End Sub
|
||||
|
||||
Private Sub ManageSingleIstance()
|
||||
@@ -631,6 +656,41 @@ Class MainWindow
|
||||
m_IdleTimer.Interval = TimeSpan.FromMilliseconds(100)
|
||||
m_IdleTimer.Start()
|
||||
|
||||
Dim sAssStatus As String = " discontinued"
|
||||
Dim nAssLeftDays As Integer
|
||||
' MESSAGGIO...
|
||||
If EgtGetKeyAssLeftDays(nAssLeftDays) And nAssLeftDays >= 0 Then
|
||||
If nAssLeftDays > 0 Then
|
||||
sAssStatus = "expires within " & nAssLeftDays.ToString() & " days"
|
||||
'sAssStatus = "to be renewed within " & nAssLeftDays.ToString() & " days"
|
||||
Else
|
||||
sAssStatus = "Expired"
|
||||
End If
|
||||
End If
|
||||
|
||||
Dim bShowInfoAssistance As Boolean = True
|
||||
bShowInfoAssistance = (GetPrivateProfileInt(S_GENERAL, K_SHOWEXPIREASSITANCE, "1", GetIniFile) <> 0)
|
||||
' Or nAssLeftDays = 358
|
||||
If bShowInfoAssistance And ((nAssLeftDays <= 7 And nAssLeftDays >= 0) Or nAssLeftDays = 14 Or nAssLeftDays = 21 Or nAssLeftDays = 28) Then
|
||||
' 91145=Avviso importante
|
||||
Dim sMsg_Title As String = EgtMsg(91145)
|
||||
' 91146=Il contratto di aggiornamento della licenza in uso scadrà tra {0} giorni./n
|
||||
Dim sMsg_AssStatus As String = String.Format(EgtMsg(91146), nAssLeftDays.ToString())
|
||||
' 91147=Se desiderate rimanere aggiornati e continuare ad usufruire dei benefici del servizio, vi invitiamo a contattare la nostra assistenza al seguente indirizzo:/n
|
||||
Dim sMsg_RefAssistance As String = EgtMsg(91147)
|
||||
Dim sAssistance As String = String.Empty
|
||||
GetPrivateProfileString(S_GENERAL, "Assistances", "", sAssistance, GetIniFile)
|
||||
Dim sItems As String() = sAssistance.Split(","c)
|
||||
For Each Item As String In sItems
|
||||
sMsg_RefAssistance &= " → " & Item.Trim & " /n"
|
||||
Next
|
||||
' 91148=Grazie per la vostra collaborazione.
|
||||
Dim sMsg_ThankYou As String = EgtMsg(91148)
|
||||
Dim MyLicWn As New LicenseWindow(Me, sMsg_AssStatus & sMsg_RefAssistance & sMsg_ThankYou, sMsg_Title)
|
||||
MyLicWn.WindowStartupLocation = WindowStartupLocation.CenterOwner
|
||||
MyLicWn.Show()
|
||||
End If
|
||||
|
||||
' inizilizzo
|
||||
End Sub
|
||||
|
||||
@@ -694,6 +754,8 @@ Class MainWindow
|
||||
MainWindowGrid.Children.Remove(m_OptionsPageUC)
|
||||
MainWindowGrid.Children.Add(m_WorkInProgressPageUC)
|
||||
m_ActivePage = Pages.WorkInProgress
|
||||
Case Else
|
||||
WorkInProgressBtn.IsChecked = False
|
||||
End Select
|
||||
End Sub
|
||||
|
||||
@@ -752,6 +814,8 @@ Class MainWindow
|
||||
MainWindowGrid.Children.Add(m_CurrentProjectPageUC)
|
||||
m_CurrentProjectPageUC.CurrentProjectPageGrid.Children.Add(m_DirectCutPageUC)
|
||||
m_ActivePage = Pages.DirectCut
|
||||
Case Else
|
||||
WorkInProgressBtn.IsChecked = False
|
||||
End Select
|
||||
End Sub
|
||||
|
||||
@@ -807,6 +871,8 @@ Class MainWindow
|
||||
MainWindowGrid.Children.Add(m_CurrentProjectPageUC)
|
||||
m_CurrentProjectPageUC.CurrentProjectPageGrid.Children.Add(m_CadCutPageUC)
|
||||
m_ActivePage = Pages.CadCut
|
||||
Case Else
|
||||
CadCutBtn.IsChecked = False
|
||||
End Select
|
||||
End Sub
|
||||
|
||||
@@ -863,6 +929,8 @@ Class MainWindow
|
||||
MainWindowGrid.Children.Add(m_CurrentProjectPageUC)
|
||||
m_CurrentProjectPageUC.CurrentProjectPageGrid.Children.Add(m_FrameCutPageUC)
|
||||
m_ActivePage = Pages.FrameCut
|
||||
Case Else
|
||||
If FrameCutBtn.IsEnabled Then FrameCutBtn.IsChecked = False
|
||||
End Select
|
||||
End Sub
|
||||
|
||||
@@ -914,6 +982,8 @@ Class MainWindow
|
||||
MainWindowGrid.Children.Remove(m_OptionsPageUC)
|
||||
MainWindowGrid.Children.Add(m_MachinePageUC)
|
||||
m_ActivePage = Pages.Machine
|
||||
Case Else
|
||||
MachineBtn.IsChecked = False
|
||||
End Select
|
||||
End Sub
|
||||
|
||||
@@ -970,7 +1040,7 @@ Class MainWindow
|
||||
MainWindowGrid.Children.Add(m_OptionsPageUC)
|
||||
m_ActivePage = Pages.Options
|
||||
Case Pages.Options
|
||||
OptionsBtn.IsChecked = True
|
||||
OptionsBtn.IsChecked = False
|
||||
End Select
|
||||
End Sub
|
||||
|
||||
@@ -985,6 +1055,16 @@ Class MainWindow
|
||||
' Se già visualizzato errore, lo nascondo
|
||||
If m_CurrentProjectPageUC.OutMessageBrd.IsMouseOver Then
|
||||
m_CurrentProjectPageUC.ClearMessage()
|
||||
' se è premuto il pulsante Shift allora provvedo ad aprire il file di Log
|
||||
If Keyboard.Modifiers And ModifierKeys.Shift Then
|
||||
' Genero file CNC (lancio anche se errore in precedenza)
|
||||
Dim sTemoDirect As String = GetTempDir() & "\OmagCUTLog.txt"
|
||||
Try
|
||||
Process.Start("Notepad.exe", sTemoDirect)
|
||||
Catch ex As Exception
|
||||
EgtOutLog(ex.ToString)
|
||||
End Try
|
||||
End If
|
||||
End If
|
||||
' Condizioni che impediscono di clickare fuori dalla calcolatrice o tastiera quando una di queste è aperta
|
||||
If EgtWPFLib.EgtCalculator.GetbIsActive Then
|
||||
@@ -1075,6 +1155,19 @@ Class MainWindow
|
||||
m_CurrentProjectPageUC.SaveNamedProject()
|
||||
m_CurrentProjectPageUC.SaveProject()
|
||||
End If
|
||||
' Inizio la chiusura del programma (se NUM_OLD verifico di aver terminato il processo DripFeed)
|
||||
EgtOutLog("Iniziato processo di chiusura programma")
|
||||
m_IsClosingApplication = If(m_CNCommunication.m_nNCType = 1, 1, 2)
|
||||
Dim nCount As Integer = 0
|
||||
While m_IsClosingApplication <> 2
|
||||
If nCount > 5 Then
|
||||
Exit While
|
||||
End If
|
||||
' verifico che il processo DripFeed sia terminato
|
||||
EgtOutLog("Stato chiusura programma: " & m_IsClosingApplication.ToString)
|
||||
Thread.Sleep(100)
|
||||
nCount += 1
|
||||
End While
|
||||
' Uscita
|
||||
MainWindowExit()
|
||||
End Sub
|
||||
@@ -1116,20 +1209,26 @@ Class MainWindow
|
||||
' Se non sono in tagli diretti tutto ok
|
||||
If m_ActivePage <> Pages.DirectCut Then Return True
|
||||
' Concludo le attività in corso
|
||||
Select Case m_DirectCutPageUC.m_ActiveDirectCutPage
|
||||
Case DirectCutPageUC.DirectCutPages.SingleCut
|
||||
m_DirectCutPageUC.m_SingleCut.SingleCut_Unloaded(sender, e)
|
||||
Case DirectCutPageUC.DirectCutPages.MultipleCut
|
||||
m_DirectCutPageUC.m_MultipleCut.MultipleCut_Unloaded(sender, e)
|
||||
Case DirectCutPageUC.DirectCutPages.GridCut
|
||||
m_DirectCutPageUC.m_GridCut.GridCut_Unloaded(sender, e)
|
||||
Case DirectCutPageUC.DirectCutPages.CopyTemplate
|
||||
m_DirectCutPageUC.m_CopyTemplate.CopyTemplate_Unloaded(sender, e)
|
||||
Case DirectCutPageUC.DirectCutPages.FlatteningCut
|
||||
m_DirectCutPageUC.m_FlatteningCut.FlatteningCut_Unloaded(sender, e)
|
||||
Case DirectCutPageUC.DirectCutPages.SawTest
|
||||
m_DirectCutPageUC.m_SawTest.SawTest_Unloaded(sender, e)
|
||||
Select Case m_DirectCutPageUC.m_ControlsDirectCutUC.m_ActiveDirectCutPage
|
||||
Case ControlsDirectCutUC.DirectCutPages.SingleCut
|
||||
m_DirectCutPageUC.m_ControlsDirectCutUC.m_SingleCut.SingleCut_Unloaded(sender, e)
|
||||
Case ControlsDirectCutUC.DirectCutPages.MultipleCut
|
||||
m_DirectCutPageUC.m_ControlsDirectCutUC.m_MultipleCut.MultipleCut_Unloaded(sender, e)
|
||||
Case ControlsDirectCutUC.DirectCutPages.GridCut
|
||||
m_DirectCutPageUC.m_ControlsDirectCutUC.m_GridCut.GridCut_Unloaded(sender, e)
|
||||
Case ControlsDirectCutUC.DirectCutPages.FlatteningCut
|
||||
m_DirectCutPageUC.m_ControlsDirectCutUC.m_FlatteningCut.FlatteningCut_Unloaded(sender, e)
|
||||
End Select
|
||||
|
||||
Select Case m_DirectCutPageUC.m_ControlsDirectCutUC1.m_ActiveDirectCutPage
|
||||
Case ControlsDirectCutUC.DirectCutPages.CopyTemplate
|
||||
m_DirectCutPageUC.m_ControlsDirectCutUC1.m_CopyTemplate.CopyTemplate_Unloaded(sender, e)
|
||||
Case ControlsDirectCutUC.DirectCutPages.Polishing
|
||||
m_DirectCutPageUC.m_ControlsDirectCutUC1.m_Polishing.Polishing_Unloaded(sender, e)
|
||||
Case ControlsDirectCutUC1.DirectCutPages.SawTest
|
||||
m_DirectCutPageUC.m_ControlsDirectCutUC1.m_SawTest.SawTest_Unloaded(sender, e)
|
||||
End Select
|
||||
|
||||
Return True
|
||||
End Function
|
||||
|
||||
@@ -1189,7 +1288,7 @@ Class MainWindow
|
||||
Private Sub MainWindow_ContentRendered(sender As Object, e As EventArgs) Handles Me.ContentRendered
|
||||
' Verifico presenza del collegamento al CN
|
||||
m_bNCLink = (GetPrivateProfileInt(S_GENERAL, K_CNLINK, 0, m_sIniFile) <> 0) And
|
||||
Not GetKeyOption( KEY_OPT.OFFICE_TYPE)
|
||||
Not GetKeyOption(KEY_OPT.OFFICE_TYPE)
|
||||
m_CNCommunication.CNCommunication_Initialization()
|
||||
' Se linea di produzione abilitata e collegata, lancio relativo timer
|
||||
If m_bNCLink And m_CurrentMachine.bProdLine Then
|
||||
@@ -1199,11 +1298,17 @@ Class MainWindow
|
||||
m_ProdLineTimer.Interval = TimeSpan.FromMilliseconds(2000)
|
||||
m_ProdLineTimer.Start()
|
||||
End If
|
||||
|
||||
' di default attivo la pagina CadCut
|
||||
If m_OnlyFrame Then
|
||||
m_ActivePage = MainWindow.Pages.FrameCut
|
||||
Else
|
||||
m_ActivePage = MainWindow.Pages.CadCut
|
||||
End If
|
||||
' seleziono il tipo di avvio
|
||||
m_CurrentProjectPageUC.StartProgram()
|
||||
' aggiorno la grafica
|
||||
EgtZoom(ZM.ALL, True)
|
||||
|
||||
End Sub
|
||||
|
||||
Friend Sub EgtWPFInit()
|
||||
@@ -1235,8 +1340,34 @@ Class MainWindow
|
||||
Dim bHeadH1 As Boolean = (EgtGetHeadId("H1") <> GDB_ID.NULL)
|
||||
EgtSetCurrentContext(nCurrCtx)
|
||||
' Aggiorno interfaccia
|
||||
CadCutBtn.IsEnabled = (nPrjType <> CurrentProjectPageUC.PRJ_TYPE.FRAMES)
|
||||
FrameCutBtn.IsEnabled = (nPrjType <> CurrentProjectPageUC.PRJ_TYPE.FLATS) AndAlso bHeadH1
|
||||
If m_OnlyFrame Then
|
||||
If nPrjType = CurrentProjectPageUC.PRJ_TYPE.FLATS And
|
||||
m_ActivePage <> Pages.RawPart And m_ActivePage <> Pages.DirectCut And m_ActivePage <> Pages.Simulation Then
|
||||
Dim FrameWnd As New EgtMsgBox(Me, EgtMsg(91141), EgtMsg(91142), EgtMsgBox.Buttons.OK, EgtMsgBox.Icons.NULL)
|
||||
'' Gestione stato FastGrid
|
||||
'm_CadCutPageUC.m_FastGridSlabManager.OnPreNewProject()
|
||||
' Cancello progetto salvato con nome da file ini
|
||||
WritePrivateProfileString(S_GENERAL, K_LASTNAMEPROJ, "", GetIniFile())
|
||||
' Scelta tavola della macchina
|
||||
Dim nTabInd As Integer = m_CadCutPageUC.m_ProjectMgr.ChooseTable()
|
||||
' Creo nuovo progetto
|
||||
m_CurrentProjectPageUC.NewProject(nTabInd, False)
|
||||
'' Gestione stato FastGrid
|
||||
'm_CadCutPageUC.m_FastGridSlabManager.OnPostNewProject()
|
||||
FrameCutBtn_Click(Nothing, Nothing)
|
||||
CadCutBtn.IsEnabled = False
|
||||
Else
|
||||
FrameCutBtn.IsEnabled = True
|
||||
CadCutBtn.IsEnabled = False
|
||||
' Attivo il pulsante FRAME
|
||||
'FrameCutBtn.IsChecked = True
|
||||
'CadCutBtn.IsChecked = False
|
||||
End If
|
||||
Else
|
||||
CadCutBtn.IsEnabled = (nPrjType <> CurrentProjectPageUC.PRJ_TYPE.FRAMES)
|
||||
FrameCutBtn.IsEnabled = (nPrjType <> CurrentProjectPageUC.PRJ_TYPE.FLATS) AndAlso bHeadH1
|
||||
End If
|
||||
|
||||
' DirectCutBtn.IsEnabled = bHeadH1
|
||||
End Sub
|
||||
|
||||
@@ -1265,7 +1396,9 @@ Class MainWindow
|
||||
m_CNCommunication.m_CN.ReadEls_Add_Parameter(m_CurrentMachine.sVarProjFinished, 1)
|
||||
Dim nVarFin As Integer = 0
|
||||
For I As Integer = 1 To 4
|
||||
System.Threading.Thread.Sleep(50)
|
||||
If Not m_CurrentMachine.bDemo Then
|
||||
System.Threading.Thread.Sleep(50)
|
||||
End If
|
||||
If m_CNCommunication.m_CN.n_DReadELS_handle = 1 Then
|
||||
nVarFin = CInt(m_CNCommunication.m_CN.d_DReadELS_value)
|
||||
Exit For
|
||||
@@ -1278,11 +1411,11 @@ Class MainWindow
|
||||
' Salvo in INI indice del progetto terminato
|
||||
WritePrivateProfileString(S_GENERAL, K_LASTPROJFINISHED, nVarFin.ToString("D4"), GetIniFile())
|
||||
' Salvo in INI data e ora attuali di termine lavorazione del progetto (solo gli ultimi 10 tramite modulo)
|
||||
Dim sKey As String = K_DATETIMEFINISHED & "." & ( nVarFin Mod 10).ToString()
|
||||
Dim sKey As String = K_DATETIMEFINISHED & "." & (nVarFin Mod 10).ToString()
|
||||
Dim sDateTime As String = My.Computer.Clock.LocalTime.ToString("dd.MM.yyyy HH\:mm\:ss")
|
||||
WritePrivateProfileString(S_GENERAL, sKey, sDateTime, GetIniFile())
|
||||
' Eseguo script
|
||||
ExecFinishedProgScript( nVarFin, sDateTime)
|
||||
ExecFinishedProgScript(nVarFin, sDateTime)
|
||||
End If
|
||||
End If
|
||||
' Se OmagVIEW blocca, esco (riproverò al prossimo giro)
|
||||
@@ -1318,16 +1451,18 @@ Class MainWindow
|
||||
' Se richieste modalità standard o speciali
|
||||
If m_CurrentMachine.nSaveProduced <> 3 Then
|
||||
StandardAndSpecialViewFileManagement()
|
||||
' altrimenti modalità custom
|
||||
' altrimenti modalità custom
|
||||
Else
|
||||
CustomViewFileManagement( nProjInd)
|
||||
CustomViewFileManagement(nProjInd)
|
||||
End If
|
||||
' Leggo variabile con indice progetto da copiare per OmagVIEW (standard E80025)
|
||||
m_CNCommunication.m_CN.n_DReadELS_handle = 0
|
||||
m_CNCommunication.m_CN.ReadEls_Add_Parameter(m_CurrentMachine.sVarProjCopy, 1)
|
||||
Dim nVarCopy As Integer = 0
|
||||
For I As Integer = 1 To 10
|
||||
System.Threading.Thread.Sleep(50)
|
||||
If Not m_CurrentMachine.bDemo Then
|
||||
System.Threading.Thread.Sleep(50)
|
||||
End If
|
||||
If m_CNCommunication.m_CN.n_DReadELS_handle = 1 Then
|
||||
nVarCopy = CInt(m_CNCommunication.m_CN.d_DReadELS_value)
|
||||
Exit For
|
||||
@@ -1528,7 +1663,7 @@ Class MainWindow
|
||||
nNewProjInd -= 1
|
||||
End While
|
||||
End If
|
||||
' se altrimenti richiesto progetto successivo
|
||||
' se altrimenti richiesto progetto successivo
|
||||
ElseIf nMove > 0 Then
|
||||
nNewProjInd = nProjInd + 1
|
||||
If nProjInd > nLastProj Then
|
||||
@@ -1629,7 +1764,7 @@ Class MainWindow
|
||||
Catch ex As Exception
|
||||
EgtOutLog("Error erasing " & sDestEplFile)
|
||||
End Try
|
||||
' altrimenti, ogni commessa ha il suo file dei pezzi rovinati
|
||||
' altrimenti, ogni commessa ha il suo file dei pezzi rovinati
|
||||
Else
|
||||
' Sposto nel direttorio temporaneo
|
||||
Dim sDestEplFile = m_sTempDir & "\" & CURR_PROJ_EPL
|
||||
@@ -1739,7 +1874,7 @@ Class MainWindow
|
||||
Return True
|
||||
End Function
|
||||
|
||||
Private Function CustomViewFileManagement( nProjInd As Integer) As Boolean
|
||||
Private Function CustomViewFileManagement(nProjInd As Integer) As Boolean
|
||||
' Se non esiste file EPL, esco
|
||||
Dim sSouEplFile As String = m_CurrentMachine.sLineDataDir & "\" & CURR_PROJ_EPL
|
||||
If Not My.Computer.FileSystem.FileExists(sSouEplFile) Then Return True
|
||||
@@ -1778,7 +1913,7 @@ Class MainWindow
|
||||
' Verifico progetto restituito da View
|
||||
If nProjInd = 0 Then nProjInd = nLastCopy
|
||||
' Leggo variabile con data termine lavorazione
|
||||
Dim sKey As String = K_DATETIMEFINISHED & "." & ( nProjInd Mod 10).ToString()
|
||||
Dim sKey As String = K_DATETIMEFINISHED & "." & (nProjInd Mod 10).ToString()
|
||||
GetPrivateProfileString(S_GENERAL, sKey, sDateTime, sDateTime, GetIniFile())
|
||||
' Recupero direttorio per pezzi rovinati
|
||||
Dim sRuPartsDir As String = GetRuinedPartsDir()
|
||||
@@ -1805,7 +1940,7 @@ Class MainWindow
|
||||
Return True
|
||||
End Function
|
||||
|
||||
Friend Function ExecSentProgScript( bDirectCut As Boolean, Optional bAlreadySent As Boolean = False) As Boolean
|
||||
Friend Function ExecSentProgScript(bDirectCut As Boolean, Optional bAlreadySent As Boolean = False) As Boolean
|
||||
' Verifico esistenza script
|
||||
Dim sLuaPath As String = m_CurrentMachine.sMachDir() & "\Scripts\SentProg.lua"
|
||||
If Not My.Computer.FileSystem.FileExists(sLuaPath) Then Return True
|
||||
@@ -1824,8 +1959,8 @@ Class MainWindow
|
||||
End If
|
||||
EgtLuaResetGlobVar("SPS")
|
||||
If nErr <> 0 Then
|
||||
EgtOutLog("Error in SentProg : " & nErr.ToString())
|
||||
m_CurrentProjectPageUC.SetErrorMessage(EgtMsg(90325)) 'Errore nel salvataggio delle statistiche
|
||||
EgtOutLog("Error in SentProg : " & nErr.ToString())
|
||||
m_CurrentProjectPageUC.SetErrorMessage(EgtMsg(90325)) 'Errore nel salvataggio delle statistiche
|
||||
End If
|
||||
Return (nErr = 0)
|
||||
End Function
|
||||
@@ -1907,15 +2042,15 @@ Class MainWindow
|
||||
End If
|
||||
' Dichiaro progetto passato da View
|
||||
If nProjInd = m_CurrentProjectPageUC.GetCurrentProject() Then
|
||||
EgtSetInfo( EgtGetFirstNameInGroup(GDB_ID.ROOT, NAME_PROJMARK), INFO_UNLOADSAVED, 1)
|
||||
EgtSetInfo(EgtGetFirstNameInGroup(GDB_ID.ROOT, NAME_PROJMARK), INFO_UNLOADSAVED, 1)
|
||||
Else
|
||||
Dim nTmpCtx As Integer = EgtInitContext()
|
||||
If nTmpCtx <> 0 Then
|
||||
Dim sNgeFile As String = GetSaveDir() & "\" & nProjInd.ToString("D4") & ".nge"
|
||||
EgtOpenFile( sNgeFile)
|
||||
EgtSetInfo( EgtGetFirstNameInGroup(GDB_ID.ROOT, NAME_PROJMARK), INFO_UNLOADSAVED, 1)
|
||||
EgtSaveFile( sNgeFile, NGE.CMPTEXT)
|
||||
EgtDeleteContext( nTmpCtx)
|
||||
EgtOpenFile(sNgeFile)
|
||||
EgtSetInfo(EgtGetFirstNameInGroup(GDB_ID.ROOT, NAME_PROJMARK), INFO_UNLOADSAVED, 1)
|
||||
EgtSaveFile(sNgeFile, NGE.CMPTEXT)
|
||||
EgtDeleteContext(nTmpCtx)
|
||||
EgtSetCurrentContext(m_CurrentProjectPageUC.CurrentProjectScene.GetCtx())
|
||||
End If
|
||||
End If
|
||||
@@ -1949,21 +2084,21 @@ Class MainWindow
|
||||
' Evento che apre AboutBox quando viene clickato il logo
|
||||
Private Sub LogoBrd_MouseDown(sender As Object, e As MouseButtonEventArgs) Handles LogoBrd.MouseDown
|
||||
' Se non premuto Shift -> AboutBox
|
||||
If ( Keyboard.Modifiers And ModifierKeys.Shift) = 0 Then
|
||||
Dim AboutBox As New AboutBoxWD( Me)
|
||||
' Altrimenti lancio cambio macchina (solo uso interno)
|
||||
If (Keyboard.Modifiers And ModifierKeys.Shift) = 0 Then
|
||||
Dim AboutBox As New AboutBoxWD(Me)
|
||||
' Altrimenti lancio cambio macchina (solo uso interno)
|
||||
Else
|
||||
If m_ActivePage = Pages.CadCut Or m_ActivePage = Pages.FrameCut Then
|
||||
' Cambio macchina
|
||||
EgtLuaCreateGlobTable( "CHM")
|
||||
EgtLuaExecFile( GetConfigDir() & "\ChangeMachine.lua")
|
||||
EgtLuaCreateGlobTable("CHM")
|
||||
EgtLuaExecFile(GetConfigDir() & "\ChangeMachine.lua")
|
||||
Dim nRestart As Integer = 0
|
||||
EgtLuaGetGlobIntVar( "CHM.RESTART", nRestart)
|
||||
EgtLuaResetGlobVar( "CHM")
|
||||
EgtLuaGetGlobIntVar("CHM.RESTART", nRestart)
|
||||
EgtLuaResetGlobVar("CHM")
|
||||
' Riavvio
|
||||
If nRestart = 1 Then
|
||||
Close()
|
||||
Process.Start( Application.ResourceAssembly.Location)
|
||||
Process.Start(Application.ResourceAssembly.Location)
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
@@ -1985,6 +2120,7 @@ Class MainWindow
|
||||
EgtDeselectObj(m_CadCutPageUC.m_NestPage.m_CurrSelectedCurv)
|
||||
EgtDeselectObj(m_CadCutPageUC.m_NestPage.m_CurrSelectedSawCurv)
|
||||
EgtResetMark(m_CadCutPageUC.m_NestPage.m_CurrSelectedSawCurv)
|
||||
m_CadCutPageUC.m_NestPage.m_CurrToolFromSelectedSawCurv = String.Empty
|
||||
m_CadCutPageUC.m_ProjectMgr.TestBtn.IsChecked = False
|
||||
Me.m_CadCutPageUC.m_NestPage.m_bSelectCurv = False
|
||||
End Sub
|
||||
|
||||
@@ -20,9 +20,9 @@ Imports System.Windows
|
||||
<Assembly: AssemblyTitle("OmagCUTR32.exe")>
|
||||
<Assembly: AssemblyDescription("OmagCUT 32 bit")>
|
||||
#End If
|
||||
<Assembly: AssemblyCompany("EgalTech s.r.l.")>
|
||||
<Assembly: AssemblyCompany("Egalware s.r.l.")>
|
||||
<Assembly: AssemblyProduct("OmagCUT")>
|
||||
<Assembly: AssemblyCopyright("Copyright © 2015-2022 by EgalTech s.r.l.")>
|
||||
<Assembly: AssemblyCopyright("Copyright © 2015-2025 by Egalware s.r.l.")>
|
||||
<Assembly: AssemblyTrademark("")>
|
||||
<Assembly: ComVisible(False)>
|
||||
|
||||
@@ -62,5 +62,5 @@ Imports System.Windows
|
||||
' by using the '*' as shown below:
|
||||
' <Assembly: AssemblyVersion("1.0.*")>
|
||||
|
||||
<Assembly: AssemblyVersion("2.4.12.1")>
|
||||
<Assembly: AssemblyFileVersion("2.4.12.1")>
|
||||
<Assembly: AssemblyVersion("2.7.4.1")>
|
||||
<Assembly: AssemblyFileVersion("2.7.4.1")>
|
||||
|
||||
+851
-84
File diff suppressed because it is too large
Load Diff
+11
-5
@@ -87,6 +87,7 @@ Public Class CN_Siemens
|
||||
Case 8 ' Modalita Ref Point
|
||||
sDBVarPath &= "REF_POINT"
|
||||
End Select
|
||||
' /plc/"OmagCUT_DB".CTRL.AUTO
|
||||
DVariables_WriteVariables3(sDBVarPath, 1, 1, 0, 0, "")
|
||||
Return 0
|
||||
Else
|
||||
@@ -132,7 +133,7 @@ Public Class CN_Siemens
|
||||
Public Overrides Function read_active_mode() As Short
|
||||
'EgtOutLog("Modo attivo: " & M_MMFiles.SiemensRet.n_param2)
|
||||
If m_IsSiemensOne Or m_IsActiveModeSubscription Then
|
||||
Select Case n_data(3)
|
||||
Select Case n_data(n_index_mode)
|
||||
Case 1
|
||||
Return 0
|
||||
Case 2
|
||||
@@ -144,7 +145,7 @@ Public Class CN_Siemens
|
||||
End Select
|
||||
Else
|
||||
' per verificare che la comunicazione funzioni correttamente
|
||||
EgtOutLog("Modo -read_active_mode-: " & M_MMFiles.SiemensRet.n_param2.ToString)
|
||||
' 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
|
||||
@@ -152,7 +153,12 @@ Public Class CN_Siemens
|
||||
|
||||
Public Overrides Function Is_G24_active() As Boolean
|
||||
|
||||
Return M_MMFiles.SiemensRet.b_interf_G24
|
||||
If m_IsSiemensOne Or m_IsActiveModeSubscription Then
|
||||
Return b_data(n_index_is_G24_active)
|
||||
|
||||
Else
|
||||
Return M_MMFiles.SiemensRet.b_interf_G24
|
||||
End If
|
||||
|
||||
End Function
|
||||
|
||||
@@ -217,12 +223,12 @@ Public Class CN_Siemens
|
||||
Public Overrides Sub DVariables_WriteVariables3(VarAddr As String, ParType As Short, nVarValue As Integer, lVarValue As Long, dVarValue As Double, sVarValue As String)
|
||||
Dim n_ret As Short = Write_var(VarAddr, ParType, nVarValue, lVarValue, dVarValue, sVarValue)
|
||||
'EgtOutLog("CN SIEMENS Dopo scrittura variabile")
|
||||
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub DVariables_Read_Subscription(VarAddr As String, ParType As Short, Index As Integer)
|
||||
' Ricevo il percorso della varibile, il tipo
|
||||
Dim n_ret As Short = Read_subscription(VarAddr, ParType, Index)
|
||||
'EgtOutLog("CN SIEMENS Dopo lettura abbonamento")
|
||||
EgtOutLog(" ABBONAMENTO (Esito: " & n_ret.ToString & ") -> Address: " & VarAddr & ", Type: " & ParType.ToString & ", Index: " & Index.ToString)
|
||||
End Sub
|
||||
|
||||
'
|
||||
|
||||
+74
-4
@@ -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 = 55 ' Numero di dati del CN (Speed,Feed,...)
|
||||
Public Const NUM_DATA = 58 ' Numero di dati del CN (Speed,Feed,...)
|
||||
|
||||
Public m_NewVariable As Boolean = False ' per scrittura delle vairbaili Apllication del PLC
|
||||
|
||||
@@ -70,8 +70,22 @@ Public MustInherit Class CN_generico
|
||||
Parking = 52
|
||||
EnableZone = 53
|
||||
EnablePC = 54
|
||||
|
||||
nAxes = 55
|
||||
|
||||
ResetStatus = 56
|
||||
|
||||
CPos = 57
|
||||
End Enum
|
||||
|
||||
Public Enum Type As Short
|
||||
TBoolean = 0
|
||||
TInteger = 1
|
||||
TLong = 2
|
||||
TDouble = 3
|
||||
TString = 4
|
||||
|
||||
End Enum
|
||||
#End Region
|
||||
|
||||
#Region " Struct"
|
||||
@@ -128,6 +142,9 @@ Public MustInherit Class CN_generico
|
||||
Public d_param1 As Double
|
||||
Public sz_string As String ' ( MAX 200 caratteri )
|
||||
|
||||
' Indice del vettore n_data associato alla lettura nMode
|
||||
Public n_index_mode As Integer = 0
|
||||
Public n_index_is_G24_active As Integer = 0
|
||||
Public b_data(14) As Boolean
|
||||
Public n_data(14) As Int16
|
||||
Public l_data(14) As Long
|
||||
@@ -218,10 +235,31 @@ Public MustInherit Class CN_generico
|
||||
Public bRemote As Boolean
|
||||
' Nuovi di bottoni -------------------------------------------
|
||||
|
||||
' gestione speciale asse C
|
||||
Public bCPos As Boolean = False
|
||||
Public dCPos As Double
|
||||
|
||||
' solo per NumOld
|
||||
Public bIsDripFeed As Boolean = False
|
||||
|
||||
' usato nel FANUC per leggere lo stato macchina se 5 assi attivo
|
||||
Public b5AxesActive As Boolean
|
||||
|
||||
Public nMachineMode As Integer
|
||||
|
||||
Public m_szCnDataVar(NUM_DATA - 1) As String
|
||||
|
||||
'
|
||||
' nuovi dal 29-III-2023 per Fanuc
|
||||
'
|
||||
Public n_Base_addr_int_vars As Integer = 59800
|
||||
Public n_Base_addr_byte_for_bits_vars As Integer = 59820
|
||||
Public n_num_var_int_to_read As Short = 10
|
||||
Public n_num_var_byte_for_bits_to_read As Short = 30
|
||||
Public s_addr_set_nc_mode As String = "D59825"
|
||||
Public s_addr_feedhold As String = "D59850.6"
|
||||
'
|
||||
' Eventi
|
||||
'
|
||||
Public Event NewPositionData(ByVal sender As Object)
|
||||
Public Event NewPosDeltaData(ByVal sender As Object)
|
||||
Public Event NewVarChanged(ByVal sender As Object)
|
||||
@@ -294,8 +332,8 @@ Public MustInherit Class CN_generico
|
||||
|
||||
Public MustOverride Function DTool_set_read_range(n_start As Short, n_stop As Short) As Short
|
||||
|
||||
Public MustOverride Function DTool_write_tool(n_tool_number As Short, Length_X As Double, Radius As Double, TipRadius_Z As Double, _
|
||||
DLength_X As Double, DTipRadius_Z As Double, _
|
||||
Public MustOverride Function DTool_write_tool(n_tool_number As Short, Length_X As Double, Radius As Double, TipRadius_Z As Double,
|
||||
DLength_X As Double, DTipRadius_Z As Double,
|
||||
nDirection As Short, nType As Short, nH As Integer) As Short
|
||||
|
||||
Public Overridable Function SetProgramMainOrSub(bMain As Boolean) As Boolean
|
||||
@@ -341,4 +379,36 @@ Public MustInherit Class CN_generico
|
||||
|
||||
#End Region
|
||||
|
||||
#Region " Nuovi metodi pubblici"
|
||||
|
||||
Public Overridable Function NC_read_var_short(VarAddr As String, ByRef value As Short) As Boolean
|
||||
Return False
|
||||
End Function
|
||||
|
||||
Public Overridable Function NC_read_var_short_range(VarStartAddr As String, VarEndAddr As String, ByRef values() As Short) As Boolean
|
||||
Return False
|
||||
End Function
|
||||
|
||||
Public Overridable Function NC_write_var_short(VarAddr As String, ByRef value As Short) As Boolean
|
||||
Return False
|
||||
End Function
|
||||
|
||||
Public Overridable Function NC_read_var_bit(VarAddr As String, ByRef value As Boolean) As Boolean
|
||||
Return False
|
||||
End Function
|
||||
|
||||
Public Overridable Function NC_write_var_bit(VarAddr As String, ByRef value As Boolean) As Boolean
|
||||
Return False
|
||||
End Function
|
||||
|
||||
Public Overridable Function NC_pulse_bit(VarAddr As String) As Boolean
|
||||
Return False
|
||||
End Function
|
||||
Public Overridable Function Geppo() As Boolean
|
||||
Return False
|
||||
End Function
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
End Class
|
||||
|
||||
+1720
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
+17
-12
@@ -19,8 +19,8 @@ Module M_MMFiles
|
||||
|
||||
#Region " Structures"
|
||||
|
||||
|
||||
<StructLayout(LayoutKind.Sequential)> _
|
||||
' Struttura per spedire un "comando" al Siemens
|
||||
<StructLayout(LayoutKind.Sequential)>
|
||||
Structure SiemensSendStruct
|
||||
|
||||
Public n_Flag As Integer
|
||||
@@ -46,7 +46,7 @@ Module M_MMFiles
|
||||
|
||||
Private SiemensSend As SiemensSendStruct
|
||||
|
||||
|
||||
' Struttura per leggere l'esito di un "comando" al Siemens
|
||||
<StructLayout(LayoutKind.Sequential)> _
|
||||
Structure SiemensRetStruct
|
||||
|
||||
@@ -75,6 +75,7 @@ Module M_MMFiles
|
||||
Public b_is_laser_ON As Boolean
|
||||
Public b_is_spindle_ON As Boolean
|
||||
|
||||
' Vettore assi macchina (file SiemensComm: axes_0_M, axes_0_P)
|
||||
<MarshalAs(UnmanagedType.ByValArray, ArraySubType:=UnmanagedType.R8, SizeConst:=16)> _
|
||||
Public d_interf_axis_position() As Double
|
||||
|
||||
@@ -176,7 +177,7 @@ Module M_MMFiles
|
||||
#End Region
|
||||
|
||||
#Region " Commands constants"
|
||||
|
||||
' Elenco codici comandi per spedire programma a SiemensComm.exe
|
||||
Enum CMD As Short
|
||||
|
||||
CMD_Download_NC_prog = 1
|
||||
@@ -205,6 +206,7 @@ Module M_MMFiles
|
||||
End Enum
|
||||
|
||||
Friend Enum VarType As Short
|
||||
TBoolean = 0
|
||||
TInteger = 1
|
||||
TLong = 2
|
||||
TDouble = 3
|
||||
@@ -343,6 +345,9 @@ Module M_MMFiles
|
||||
Function ActivateProgram(ByVal sz_part_program As String) As Short
|
||||
'EgtOutLog("ActivateProgram start dell'm_mmFiles")
|
||||
|
||||
EgtOutLog("Flag di comando: " & CMD.CMD_ActivateProgram.ToString)
|
||||
EgtOutLog("Stringa di comando: " & sz_part_program.ToString)
|
||||
|
||||
SiemensSend.n_Command = CMD.CMD_ActivateProgram
|
||||
SiemensSend.sz_string = sz_part_program
|
||||
|
||||
@@ -370,7 +375,8 @@ Module M_MMFiles
|
||||
SiemensSend.n_Command = CMD.CMD_CycleStart
|
||||
|
||||
execute_command()
|
||||
'EgtOutLog("CycleStart end dell'm_mmFiles")
|
||||
' Rimango in attesa
|
||||
EgtOutLog(" → CycleStart")
|
||||
Return SiemensRet.n_result
|
||||
|
||||
End Function
|
||||
@@ -597,16 +603,15 @@ Module M_MMFiles
|
||||
'EgtOutLog("Write_Nc_var start dell'm_mmFiles")
|
||||
SiemensSend.n_Command = CMD.CMD_Read_NC_subscription
|
||||
SiemensSend.sz_string_2 = VarAddr ' indirizzo su CN dell' oggetto da scrivere
|
||||
|
||||
EgtOutLog(" → Sottoscrivo lettura di '" & VarAddr & "'")
|
||||
SiemensSend.n_param1 = Index ' tipo di dato da scrivere
|
||||
|
||||
EgtOutLog(" Indice del vettore associato '" & Index & "'")
|
||||
SiemensSend.n_param2 = ParType ' tipo di dato da scrivere
|
||||
|
||||
EgtOutLog(" Indice tipo di variabile '" & ParType & "'")
|
||||
execute_command()
|
||||
m_MainWindow.m_CNCommunication.m_CN.sz_interf_error_message = SiemensRet.sz_interf_error_message
|
||||
|
||||
EgtOutLog("sz_interf_error_message: " & m_MainWindow.m_CNCommunication.m_CN.sz_interf_error_message)
|
||||
EgtOutLog("n_result: " & SiemensRet.n_result)
|
||||
EgtOutLog(" sz_interf_error_message: " & m_MainWindow.m_CNCommunication.m_CN.sz_interf_error_message)
|
||||
EgtOutLog(" n_result: " & SiemensRet.n_result)
|
||||
Return SiemensRet.n_result
|
||||
End Function
|
||||
|
||||
@@ -765,7 +770,7 @@ Module M_MMFiles
|
||||
End If
|
||||
|
||||
' copio variabili in abbonamento
|
||||
For Index As Integer = 0 To 5
|
||||
For Index As Integer = 0 To 14
|
||||
CurrCN.b_data(Index) = SiemensRet.b_data(Index)
|
||||
CurrCN.n_data(Index) = SiemensRet.n_data(Index)
|
||||
CurrCN.l_data(Index) = SiemensRet.l_data(Index)
|
||||
|
||||
+11
-8
@@ -53,14 +53,14 @@ Namespace Num
|
||||
Dim WithEvents objDRunTimeSystem As FXServer.DRunTimeSystem
|
||||
Dim WithEvents objDGroupManager As FXServer.DGroupManager
|
||||
Dim WithEvents objDReadELS As FXServer.DReadELS
|
||||
' questa è classe che serve a scrivere i dati nel PLC
|
||||
' questa � classe che serve a scrivere i dati nel PLC
|
||||
Dim WithEvents objDPlcVariables As FXServer.DPlcVariables
|
||||
' questa è la classe che serve a scrivere i dati nelle variabili E
|
||||
' questa � la classe che serve a scrivere i dati nelle variabili E
|
||||
Dim WithEvents objDVariables As FXServer.DVariables
|
||||
Dim WithEvents objDReadTestExectime As FXServer.DReadTestExectime
|
||||
Dim WithEvents objDPosition As FXServer.DPosition
|
||||
Dim WithEvents objDNCKParameter As FXServer.DNCKParameter
|
||||
' questa è la classe che serve a scrivere i comandi MDI (come ad esempio le funzioni M)
|
||||
' questa � la classe che serve a scrivere i comandi MDI (come ad esempio le funzioni M)
|
||||
Dim WithEvents objDMdiCommand As FXServer.DMdiCommand
|
||||
Dim WithEvents objDMainCncData As FXServer.DMainCncData
|
||||
|
||||
@@ -458,7 +458,7 @@ Namespace Num
|
||||
'sz_var_names.Add("Application.IOCONFIG_GLOBALS.Flexium_NCK.WCNC.Spindle[2].Override") ' segnaposto per la speed override
|
||||
'sz_var_names.Add("Application.GVL_HMI_OMAG.HMI_Vel_prog") ' FEED
|
||||
'sz_var_names.Add("Application.GVL_HMI_OMAG.HMI_LabRPM") ' Speed
|
||||
'sz_var_names.Add("Application.GVL_HMI_OMAG.HMI_LabAmper") ' Ampère = *0.01
|
||||
'sz_var_names.Add("Application.GVL_HMI_OMAG.HMI_LabAmper") ' Amp�re = *0.01
|
||||
|
||||
' Creo lista nomi variabili PLC da leggere
|
||||
m_nCnDataVarNum = 0
|
||||
@@ -823,7 +823,7 @@ Namespace Num
|
||||
|
||||
|
||||
' Only for FX Server >= 3.9.0.0
|
||||
' poi in realtà ritorna sempre tipo = -1 per cui è eguale alle altre.....
|
||||
' poi in realt� ritorna sempre tipo = -1 per cui � eguale alle altre.....
|
||||
Private Sub objDReadELS_ValueChanged3(nHandle As Integer, value As Object, DataType As Short, Writable As Short, nerrorCode As Short) Handles objDReadELS.ValueChanged3
|
||||
|
||||
Dim edata_type As eDatatype
|
||||
@@ -996,7 +996,7 @@ Namespace Num
|
||||
d_spindle_eff(0) = CDbl(values(n))
|
||||
Case CnData.SpeedOvr ' (5) Potenziom. speed = ...
|
||||
n_spindle_override(0) = CShort(Math.Round((CDbl(values(n)) * 50 / 255) + 50))
|
||||
Case CnData.Power ' (6) Ampère = * 0.01
|
||||
Case CnData.Power ' (6) Amp�re = * 0.01
|
||||
d_spindle_power = CDbl(CLng(values(n))) * 0.01
|
||||
b_spindle_power_changed = True
|
||||
Case CnData.Spindle ' (7) Stato rotazione mandrino
|
||||
@@ -1095,6 +1095,9 @@ Namespace Num
|
||||
Case CnData.EnablePC ' (54)
|
||||
nEnablePc = CInt(values(n))
|
||||
|
||||
Case CnData.CPos ' (57)
|
||||
dCPos = CDbl(values(n))
|
||||
|
||||
End Select
|
||||
Next
|
||||
|
||||
@@ -1701,11 +1704,11 @@ Namespace Num
|
||||
nTimeOut += 1
|
||||
End While
|
||||
If Not bSetModeDone Then
|
||||
EgtOutLog("Errore cambio modalità in MDI: " & TIMEOUT)
|
||||
EgtOutLog("Errore cambio modalit� in MDI: " & TIMEOUT)
|
||||
Return TIMEOUT 'Errore di timeout
|
||||
End If
|
||||
If nSetModeResult <> 0 Then
|
||||
EgtOutLog("Errore 2 cambio modalità in MDI: " & nSetModeResult)
|
||||
EgtOutLog("Errore 2 cambio modalit� in MDI: " & nSetModeResult)
|
||||
End If
|
||||
Return nSetModeResult
|
||||
|
||||
|
||||
+945
-788
File diff suppressed because it is too large
Load Diff
+10794
File diff suppressed because it is too large
Load Diff
+120
-7
@@ -115,6 +115,9 @@
|
||||
<Reference Include="AxInterop.FXLib">
|
||||
<HintPath>..\..\EgtProg\OmagCUT\AxInterop.FXLib.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="DotNetZip">
|
||||
<HintPath>..\..\EgtProg\OmagCUT\DotNetZip.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="EgtPHOTOLib">
|
||||
<HintPath>..\..\EgtProg\Dll32\EgtPHOTOLib.dll</HintPath>
|
||||
</Reference>
|
||||
@@ -122,12 +125,13 @@
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\EgtProg\DllD32\EgtUILib.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="EgtWPFLib, Version=2.1.7.1, Culture=neutral, processorArchitecture=MSIL">
|
||||
<Reference Include="EgtWPFLib, Version=2.5.2.2, Culture=neutral, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\EgtProg\Dll32\EgtWPFLib.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="EgtWPFLib5">
|
||||
<HintPath>..\..\EgtProg\OmagCUT\EgtWPFLib5.dll</HintPath>
|
||||
<Reference Include="EgtWPFLib5, Version=2.5.2.2, Culture=neutral, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\EgtProg\Dll32\EgtWPFLib5.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Interop.FXLib">
|
||||
<HintPath>..\..\EgtProg\OmagCUT\Interop.FXLib.dll</HintPath>
|
||||
@@ -141,9 +145,6 @@
|
||||
<HintPath>..\..\EgtProg\OmagCUT\Interop.FXServer.dll</HintPath>
|
||||
<EmbedInteropTypes>True</EmbedInteropTypes>
|
||||
</Reference>
|
||||
<Reference Include="Ionic.Zip">
|
||||
<HintPath>..\..\EgtProg\OmagCUT\Ionic.Zip.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="PresentationFramework.Aero" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Data.SQLite, Version=1.0.112.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=x86">
|
||||
@@ -173,10 +174,22 @@
|
||||
<Compile Include="AboutBox\AboutBoxWD.xaml.vb">
|
||||
<DependentUpon>AboutBoxWD.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="CadCuts\ChooseTestToolWD.xaml.vb">
|
||||
<DependentUpon>ChooseTestToolWD.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="CadCuts\SelectPartFromFamilyWD.xaml.vb">
|
||||
<DependentUpon>SelectPartFromFamilyWD.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="CadCuts\SelParkIndWD.xaml.vb">
|
||||
<DependentUpon>SelParkIndWD.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="CAM\CamPolishing.vb" />
|
||||
<Compile Include="DirectCuts\ControlsDirectCutUC.xaml.vb">
|
||||
<DependentUpon>ControlsDirectCutUC.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="DirectCuts\ControlsDirectCutUC1.xaml.vb">
|
||||
<DependentUpon>ControlsDirectCutUC1.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="DirectCuts\Polishing.xaml.vb">
|
||||
<DependentUpon>Polishing.xaml</DependentUpon>
|
||||
</Compile>
|
||||
@@ -186,6 +199,9 @@
|
||||
<Compile Include="DirectCuts\SingleDrillUC.xaml.vb">
|
||||
<DependentUpon>SingleDrillUC.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="DirectCuts\SquaringUC.xaml.vb">
|
||||
<DependentUpon>SquaringUC.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="DrawImport\AlzFrontUC.xaml.vb">
|
||||
<DependentUpon>AlzFrontUC.xaml</DependentUpon>
|
||||
</Compile>
|
||||
@@ -199,6 +215,9 @@
|
||||
<Compile Include="DrawImport\UnderDrillUC.xaml.vb">
|
||||
<DependentUpon>UnderDrillUC.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="LicenseWindow.xaml.vb">
|
||||
<DependentUpon>LicenseWindow.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Machine\AlarmsPageUC.xaml.vb">
|
||||
<DependentUpon>AlarmsPageUC.xaml</DependentUpon>
|
||||
</Compile>
|
||||
@@ -217,6 +236,9 @@
|
||||
<Compile Include="Machine\WaterJetPageUC.xaml.vb">
|
||||
<DependentUpon>WaterJetPageUC.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="NcComm\fwlib32.vb" />
|
||||
<Compile Include="NcComm\M_Fanuc.vb" />
|
||||
<Compile Include="NcComm\M_Fanuc_hi.vb" />
|
||||
<Compile Include="Project\AddToDataBaseUC.xaml.vb">
|
||||
<DependentUpon>AddToDataBaseUC.xaml</DependentUpon>
|
||||
</Compile>
|
||||
@@ -232,6 +254,9 @@
|
||||
<Compile Include="Project\CicloStartWD.xaml.vb">
|
||||
<DependentUpon>CicloStartWD.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="RawPhoto\OtherRefTabWD.xaml.vb">
|
||||
<DependentUpon>OtherRefTabWD.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="RawPhoto\SlabIdWD.xaml.vb">
|
||||
<DependentUpon>SlabIdWD.xaml</DependentUpon>
|
||||
</Compile>
|
||||
@@ -425,10 +450,26 @@
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="CadCuts\ChooseTestToolWD.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="CadCuts\SelectPartFromFamilyWD.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="CadCuts\SelParkIndWD.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="DirectCuts\ControlsDirectCutUC.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="DirectCuts\ControlsDirectCutUC1.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="DirectCuts\Polishing.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
@@ -441,6 +482,10 @@
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="DirectCuts\SquaringUC.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="DrawImport\AlzFrontUC.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
@@ -457,6 +502,10 @@
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>XamlIntelliSenseFileGenerator</Generator>
|
||||
</Page>
|
||||
<Page Include="LicenseWindow.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="Machine\AlarmsPageUC.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
@@ -494,6 +543,10 @@
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="RawPhoto\OtherRefTabWD.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="RawPhoto\SlabIdWD.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
@@ -876,7 +929,7 @@
|
||||
<Resource Include="Resources\MachineStatusImage\Single.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\ToolChangerPos.png" />
|
||||
<Resource Include="Resources\ToolChangerPos_OLD.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\Manual.png" />
|
||||
@@ -1299,6 +1352,66 @@
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\NewIcons\Parking.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\NewIcons\Quality.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\ToolChangerPos.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\NewIcons\RefTab.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\PhotoHQ.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\NewIcons\icone-tagli-1HQ.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\ImportPageListBoxImages\4.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\ImportPageListBoxImages\5.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\NewIcons\Muovi-grezzo.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\NewIcons\ON_OFF-REG.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\NewIcons\Move-Spot-Reg.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\NewIcons\Logo-Egalware.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\NewIcons\Logo-Egalware %282%29.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\NewIcons\Logo-Egalware %283%29.png" />
|
||||
<Resource Include="Resources\NewIcons\RawHeight.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\NewIcons\LightArrowOff.png" />
|
||||
<Resource Include="Resources\NewIcons\LightArrowOn.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\NewIcons\Park_Busy.png" />
|
||||
<Resource Include="Resources\NewIcons\icoRight-3D.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\NewIcons\icoLeft-3D.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\NewIcons\icoBack-3D.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\NewIcons\icoFront-3D.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\NewIcons\icoBottom-3D.png" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
|
||||
<PropertyGroup>
|
||||
<PostBuildEvent>IF "$(PlatformName)"=="x86" IF "$(ConfigurationName)" == "Release" copy $(TargetPath) c:\EgtProg\OmagCUT\OmagCUTR32.exe
|
||||
|
||||
+609
-598
File diff suppressed because it is too large
Load Diff
+20
-4
@@ -102,6 +102,7 @@
|
||||
<BitmapImage x:Key="AlignPiecesImg" UriSource="Resources/AlignPieces.png"></BitmapImage>
|
||||
<BitmapImage x:Key="BarCodeImg" UriSource="Resources/BarCode.png"></BitmapImage>
|
||||
<BitmapImage x:Key="SlabIdImg" UriSource="Resources/SlabId.png"></BitmapImage>
|
||||
<BitmapImage x:Key="RefTabImg" UriSource="Resources/NewIcons/RefTab.png"></BitmapImage>
|
||||
<BitmapImage x:Key="BottomLeftImg" UriSource="Resources/BottomLeft.png"></BitmapImage>
|
||||
<BitmapImage x:Key="BottomRightImg" UriSource="Resources/BottomRight.png"></BitmapImage>
|
||||
<BitmapImage x:Key="PartRotOnImg" UriSource="Resources/PartRotOn.png"></BitmapImage>
|
||||
@@ -132,6 +133,7 @@
|
||||
<BitmapImage x:Key="PhotoImg" UriSource="Resources/Photo.png"></BitmapImage>
|
||||
<BitmapImage x:Key="RawPartImg" UriSource="Resources/RawPart.png"></BitmapImage>
|
||||
<BitmapImage x:Key="RawProbeImg" UriSource="Resources/RawProbe.png"></BitmapImage>
|
||||
<BitmapImage x:Key="RawHeightImg" UriSource="Resources/NewIcons/RawHeight.png"></BitmapImage>
|
||||
<BitmapImage x:Key="RightArrowImg" UriSource="Resources/RightArrow.png"></BitmapImage>
|
||||
<BitmapImage x:Key="SawProbeImg" UriSource="Resources/SawProbe.png"></BitmapImage>
|
||||
<BitmapImage x:Key="SendImg" UriSource="Resources/Send.png"></BitmapImage>
|
||||
@@ -170,6 +172,7 @@
|
||||
<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="Muovi-grezzoImg" UriSource="Resources/NewIcons/Muovi-grezzo.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>
|
||||
@@ -221,8 +224,10 @@
|
||||
<BitmapImage x:Key="Inizio-Allunga-AccorciaImg" UriSource="Resources/NewIcons/Inizio-allunga-o-accorcia.png"></BitmapImage>
|
||||
<BitmapImage x:Key="PonticelliWJImg" UriSource="Resources/NewIcons/Ponticelli.png"></BitmapImage>
|
||||
<BitmapImage x:Key="PonticelliDeleteWJImg" UriSource="Resources/NewIcons/Ponticelli_delete.png"></BitmapImage>
|
||||
<BitmapImage x:Key="QualityWJImg" UriSource="Resources/NewIcons/Quality.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="ON_OFF-REGImg" UriSource="Resources/NewIcons/ON_OFF-REG.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>
|
||||
@@ -238,6 +243,7 @@
|
||||
<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>
|
||||
<BitmapImage x:Key="Move-Spot-RegImg" UriSource="Resources/NewIcons/Move-Spot-Reg.png"></BitmapImage>
|
||||
|
||||
<FontFamily x:Key="OmagCut_Font">./Resources/Fonts/#Century Gothic</FontFamily>
|
||||
|
||||
@@ -789,7 +795,13 @@
|
||||
<Setter Property="Margin" Value="0,8,6,4"/>
|
||||
</Style>
|
||||
|
||||
<!-- ______________________________________________________________________________________________________________________ -->
|
||||
<!--Style di un immagine in al posto di una text-->
|
||||
<Style x:Key="OmagCut_TextIcon" TargetType="{x:Type Image}" >
|
||||
<Setter Property="Width" Value="30"/>
|
||||
<Setter Property="Height" Value="30"/>
|
||||
</Style>
|
||||
|
||||
<!-- ______________________________________________________________________________________________________________________ -->
|
||||
|
||||
<!-- ScrollBar & it's component (RepeatButton, Thumb) -->
|
||||
|
||||
@@ -1186,7 +1198,7 @@
|
||||
<Setter Property="HorizontalAlignment" Value="Center"/>
|
||||
</Style>
|
||||
|
||||
<!-- ______________________________________________________________________________________________________________________ -->
|
||||
<!-- ______________________________________________________________________________________________________________________ -->
|
||||
|
||||
<!--TextBox-->
|
||||
|
||||
@@ -1209,6 +1221,7 @@
|
||||
|
||||
<Style x:Key="OmagCut_CalculatorTextBox" TargetType="{x:Type EgtWPFLib:EgtTextBox}" BasedOn="{StaticResource OmagCut_TextBox}">
|
||||
<Setter Property="Keyboard" Value="Calculator"/>
|
||||
<Setter Property="IsLength" Value="True"/>
|
||||
<Setter Property="KeyboardDimension" Value="300"/>
|
||||
</Style>
|
||||
|
||||
@@ -1260,11 +1273,14 @@
|
||||
|
||||
<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="Background" Value="White"/>
|
||||
<Setter Property="IsReadOnly" Value="True"/>
|
||||
<Setter Property="IsEnabled" Value="False"/>
|
||||
<Setter Property="TextAlignment" Value="Center"/>
|
||||
<Setter Property="Template" Value="{StaticResource FixedTextBoxTemplate}" />
|
||||
</Style>
|
||||
<Setter Property="ToolTipService.ShowOnDisabled" Value="True"/>
|
||||
<Setter Property="ToolTip" Value="{Binding RelativeSource={RelativeSource Self}, Path=Text}"/>
|
||||
</Style>
|
||||
|
||||
<!-- ______________________________________________________________________________________________________________________ -->
|
||||
|
||||
|
||||
+436
-416
@@ -55,23 +55,43 @@
|
||||
|
||||
</GroupBox>
|
||||
|
||||
<!--UNITA' DI MISURA-->
|
||||
<GroupBox Name="UnitsOfMeasureGpBx"
|
||||
Grid.Column="1"
|
||||
Grid.RowSpan="3"
|
||||
Style="{DynamicResource OmagCut_GroupBox}">
|
||||
<Grid >
|
||||
<Grid Name ="UnitGrid">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
<ColumnDefinition Width="4*"/>
|
||||
<ColumnDefinition Width="3.2*"/>
|
||||
<ColumnDefinition Width="1.8*"/>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="0.25*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.25*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.25*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<ComboBox Name="UnitsOfMeasureCmBx" Grid.Column="1" Grid.Row="1" Style="{StaticResource OmagCut_ComboBox}">
|
||||
<ComboBox Name="UnitsOfMeasureCmBx" Grid.Column="1" Grid.Row="1" Grid.ColumnSpan="2" Style="{StaticResource OmagCut_ComboBox}">
|
||||
<ComboBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding}" Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</DataTemplate>
|
||||
</ComboBox.ItemTemplate>
|
||||
</ComboBox>
|
||||
|
||||
<ComboBox Name="FractionPatternCmBx" Grid.Column="1" Grid.Row="3" Style="{StaticResource OmagCut_ComboBox}">
|
||||
<ComboBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding}" Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</DataTemplate>
|
||||
</ComboBox.ItemTemplate>
|
||||
</ComboBox>
|
||||
|
||||
<ComboBox Name="PrecisionCmBx" Grid.Column="2" Grid.Row="3" Style="{StaticResource OmagCut_ComboBox}">
|
||||
<ComboBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding}" Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
@@ -80,32 +100,32 @@
|
||||
</ComboBox>
|
||||
|
||||
</Grid>
|
||||
</GroupBox>
|
||||
|
||||
|
||||
<GroupBox Name="TextColorGpBx"
|
||||
Grid.Column="2" Grid.RowSpan="3" Grid.ColumnSpan="1"
|
||||
Style="{DynamicResource OmagCut_GroupBox}">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="0.25*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="0.25*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<Button Name="TextColorBtn"
|
||||
Grid.Row="1" Grid.Column="1"
|
||||
Style="{StaticResource OmagCut_Button}" />
|
||||
</Grid>
|
||||
|
||||
</GroupBox>
|
||||
|
||||
<GroupBox Name="TextColorGpBx"
|
||||
Grid.Column="2" Grid.RowSpan="3" Grid.ColumnSpan="1"
|
||||
Style="{DynamicResource OmagCut_GroupBox}">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="0.25*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="0.25*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<Button Name="TextColorBtn"
|
||||
Grid.Row="1" Grid.Column="1"
|
||||
Style="{StaticResource OmagCut_Button}" />
|
||||
</Grid>
|
||||
|
||||
</GroupBox>
|
||||
|
||||
<GroupBox Name="FastGridGpBx"
|
||||
<GroupBox Name="FastGridGpBx"
|
||||
Grid.Column="1" Grid.Row="4" Grid.ColumnSpan="2"
|
||||
Style="{DynamicResource OmagCut_GroupBox}">
|
||||
<Grid>
|
||||
@@ -133,458 +153,458 @@
|
||||
|
||||
</GroupBox>
|
||||
|
||||
|
||||
|
||||
<GroupBox Name="SlabGpBx" Grid.RowSpan="1"
|
||||
|
||||
|
||||
<GroupBox Name="SlabGpBx" Grid.RowSpan="1"
|
||||
Grid.Column="1" Grid.Row="3" Grid.ColumnSpan="2"
|
||||
Style="{DynamicResource OmagCut_GroupBox}">
|
||||
<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*"/>
|
||||
</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*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<TextBlock Name="SlabLayerMsgTxBl" Grid.Column="0" Grid.Row="0"
|
||||
<TextBlock Name="SlabLayerMsgTxBl" Grid.Column="0" Grid.Row="0"
|
||||
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}" />
|
||||
|
||||
<TextBlock Name="PartsLayerMsgTxBl" Grid.Column="0" Grid.Row="1"
|
||||
<TextBlock Name="PartsLayerMsgTxBl" Grid.Column="0" Grid.Row="1"
|
||||
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}" />
|
||||
|
||||
<TextBlock Name="ScrapLayerMsgTxBl" Grid.Column="0" Grid.Row="2"
|
||||
<TextBlock Name="ScrapLayerMsgTxBl" Grid.Column="0" Grid.Row="2"
|
||||
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}" />
|
||||
|
||||
<TextBlock Name="StdThickMsgTxBl" Grid.Column="0" Grid.Row="3"
|
||||
<TextBlock Name="StdThickMsgTxBl" Grid.Column="0" Grid.Row="3"
|
||||
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}" />
|
||||
|
||||
<EgtWPFLib:EgtTextBox Name="SlabLayerMsgTxBx" Grid.Column="1" Grid.Row="0" Margin="10,0,10,0"
|
||||
<EgtWPFLib:EgtTextBox Name="SlabLayerMsgTxBx" Grid.Column="1" Grid.Row="0" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_LeftKeyboardTextBoxNoBorder}" />
|
||||
|
||||
<EgtWPFLib:EgtTextBox Name="PartsLayerMsgTxBx" Grid.Column="1" Grid.Row="1" Margin="10,0,10,0"
|
||||
<EgtWPFLib:EgtTextBox Name="PartsLayerMsgTxBx" Grid.Column="1" Grid.Row="1" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_LeftKeyboardTextBoxNoBorder}" />
|
||||
|
||||
<EgtWPFLib:EgtTextBox Name="ScrapLayerMsgTxBx" Grid.Column="1" Grid.Row="2" Margin="10,0,10,0"
|
||||
<EgtWPFLib:EgtTextBox Name="ScrapLayerMsgTxBx" Grid.Column="1" Grid.Row="2" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_LeftKeyboardTextBoxNoBorder}" />
|
||||
|
||||
<EgtWPFLib:EgtTextBox Name="StdThickMsgTxBx" Grid.Column="1" Grid.Row="3" Margin="10,0,10,0"
|
||||
<EgtWPFLib:EgtTextBox Name="StdThickMsgTxBx" Grid.Column="1" Grid.Row="3" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
||||
</GroupBox>
|
||||
</GroupBox>
|
||||
|
||||
<!--Incilinazione da colore-->
|
||||
<GroupBox Name="ColorToSideAngGpBx" Grid.RowSpan="3"
|
||||
<!--Incilinazione da colore-->
|
||||
<GroupBox Name="ColorToSideAngGpBx" Grid.RowSpan="3"
|
||||
Grid.Column="0" Grid.Row="3"
|
||||
Style="{DynamicResource OmagCut_GroupBox}">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="0*"/>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="0"/>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="0.75*"/>
|
||||
<RowDefinition Height="0.25*"/>
|
||||
<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*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="0*"/>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="0"/>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="0.75*"/>
|
||||
<RowDefinition Height="0.25*"/>
|
||||
<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*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<Grid Grid.Row="0" Grid.ColumnSpan="7">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1.5*"/>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="1.5*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="0.75*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid Grid.Row="0" Grid.ColumnSpan="7">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1.5*"/>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="1.5*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="0.75*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<CheckBox Name="CTSAboxEnableChBx" Grid.Column="0" Grid.Row="0"
|
||||
<CheckBox Name="CTSAboxEnableChBx" Grid.Column="0" Grid.Row="0"
|
||||
Style="{StaticResource OmagCut_CheckBox_Single}" Margin="0,0,10,0"/>
|
||||
<TextBlock Name="CTSAboxEnableMsgTxBl" Grid.Column="1" Grid.Row="0"
|
||||
<TextBlock Name="CTSAboxEnableMsgTxBl" Grid.Column="1" Grid.Row="0"
|
||||
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}" HorizontalAlignment="Left" />
|
||||
|
||||
<TextBlock Name="ToleranceMsgTxBl" Grid.Column="3" Grid.Row="0"
|
||||
<TextBlock Name="ToleranceMsgTxBl" Grid.Column="3" Grid.Row="0"
|
||||
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}" />
|
||||
<EgtWPFLib:EgtTextBox Name="ToleranceMsgTxBx" Grid.Column="4" Grid.Row="0" Margin="10,0,10,0"
|
||||
<EgtWPFLib:EgtTextBox Name="ToleranceMsgTxBx" Grid.Column="4" Grid.Row="0" Margin="10,0,10,0" IsLength="False"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
|
||||
</Grid>
|
||||
|
||||
<TextBlock Name="TalloneMsgTxBl" Grid.Column="5" Grid.Row="1" Grid.ColumnSpan="2"
|
||||
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}" />
|
||||
<TextBlock Name="InclinazioneMsgTxBl" Grid.Column="3" Grid.Row="1"
|
||||
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}" />
|
||||
|
||||
|
||||
<CheckBox Name="CTSA1EnableChBx" Grid.Column="0" Grid.Row="2"
|
||||
Style="{StaticResource OmagCut_CheckBox_Single}" Margin="0,0,10,0"/>
|
||||
<Button Name="CTSA1Btn" Grid.Row="2" Grid.Column="1"
|
||||
Style="{StaticResource OmagCut_Button}" />
|
||||
<EgtWPFLib:EgtTextBox Name="CTSA1TalloneTxBx" Grid.Column="5" Grid.Row="2" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
<EgtWPFLib:EgtTextBox Name="CTSA1InclinazioneTxBx" Grid.Column="3" Grid.Row="2" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
|
||||
<CheckBox Name="CTSA2EnableChBx" Grid.Column="0" Grid.Row="3"
|
||||
Style="{StaticResource OmagCut_CheckBox_Single}" Margin="0,0,10,0"/>
|
||||
<Button Name="CTSA2Btn" Grid.Row="3" Grid.Column="1"
|
||||
Style="{StaticResource OmagCut_Button}" />
|
||||
<EgtWPFLib:EgtTextBox Name="CTSA2TalloneTxBx" Grid.Column="5" Grid.Row="3" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
<EgtWPFLib:EgtTextBox Name="CTSA2InclinazioneTxBx" Grid.Column="3" Grid.Row="3" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
|
||||
<CheckBox Name="CTSA3EnableChBx" Grid.Column="0" Grid.Row="4"
|
||||
Style="{StaticResource OmagCut_CheckBox_Single}" Margin="0,0,10,0"/>
|
||||
<Button Name="CTSA3Btn" Grid.Row="4" Grid.Column="1"
|
||||
Style="{StaticResource OmagCut_Button}" />
|
||||
<EgtWPFLib:EgtTextBox Name="CTSA3TalloneTxBx" Grid.Column="5" Grid.Row="4" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
<EgtWPFLib:EgtTextBox Name="CTSA3InclinazioneTxBx" Grid.Column="3" Grid.Row="4" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
|
||||
<CheckBox Name="CTSA4EnableChBx" Grid.Column="0" Grid.Row="5"
|
||||
Style="{StaticResource OmagCut_CheckBox_Single}" Margin="0,0,10,0"/>
|
||||
<Button Name="CTSA4Btn" Grid.Row="5" Grid.Column="1"
|
||||
Style="{StaticResource OmagCut_Button}" />
|
||||
<TextBlock Name="CTSA4TalloneMsgTxBl" Grid.Column="2" Grid.Row="5"
|
||||
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}" />
|
||||
<EgtWPFLib:EgtTextBox Name="CTSA4TalloneTxBx" Grid.Column="5" Grid.Row="5" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
<TextBlock Name="CTSA4InclinazioneMsgTxBl" Grid.Column="4" Grid.Row="5"
|
||||
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}" />
|
||||
<EgtWPFLib:EgtTextBox Name="CTSA4InclinazioneTxBx" Grid.Column="3" Grid.Row="5" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
|
||||
<CheckBox Name="CTSA5EnableChBx" Grid.Column="0" Grid.Row="6"
|
||||
Style="{StaticResource OmagCut_CheckBox_Single}" Margin="0,0,10,0"/>
|
||||
<Button Name="CTSA5Btn" Grid.Row="6" Grid.Column="1"
|
||||
Style="{StaticResource OmagCut_Button}" />
|
||||
<TextBlock Name="CTSA5TalloneMsgTxBl" Grid.Column="2" Grid.Row="6"
|
||||
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}" />
|
||||
<EgtWPFLib:EgtTextBox Name="CTSA5TalloneTxBx" Grid.Column="5" Grid.Row="6" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
<TextBlock Name="CTSA5InclinazioneMsgTxBl" Grid.Column="4" Grid.Row="6"
|
||||
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}" />
|
||||
<EgtWPFLib:EgtTextBox Name="CTSA5InclinazioneTxBx" Grid.Column="3" Grid.Row="6" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
|
||||
<CheckBox Name="CTSA6EnableChBx" Grid.Column="0" Grid.Row="7"
|
||||
Style="{StaticResource OmagCut_CheckBox_Single}" Margin="0,0,10,0"/>
|
||||
<Button Name="CTSA6Btn" Grid.Row="7" Grid.Column="1"
|
||||
Style="{StaticResource OmagCut_Button}" />
|
||||
<TextBlock Name="CTSA6TalloneMsgTxBl" Grid.Column="2" Grid.Row="7"
|
||||
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}" />
|
||||
<EgtWPFLib:EgtTextBox Name="CTSA6TalloneTxBx" Grid.Column="5" Grid.Row="7" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
<TextBlock Name="CTSA6InclinazioneMsgTxBl" Grid.Column="4" Grid.Row="7"
|
||||
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}" />
|
||||
<EgtWPFLib:EgtTextBox Name="CTSA6InclinazioneTxBx" Grid.Column="3" Grid.Row="7" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
|
||||
<CheckBox Name="CTSA7EnableChBx" Grid.Column="0" Grid.Row="8"
|
||||
Style="{StaticResource OmagCut_CheckBox_Single}" Margin="0,0,10,0"/>
|
||||
<Button Name="CTSA7Btn" Grid.Row="8" Grid.Column="1"
|
||||
Style="{StaticResource OmagCut_Button}" />
|
||||
<TextBlock Name="CTSA7TalloneMsgTxBl" Grid.Column="2" Grid.Row="8"
|
||||
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}" />
|
||||
<EgtWPFLib:EgtTextBox Name="CTSA7TalloneTxBx" Grid.Column="5" Grid.Row="8" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
<TextBlock Name="CTSA7InclinazioneMsgTxBl" Grid.Column="4" Grid.Row="8"
|
||||
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}" />
|
||||
<EgtWPFLib:EgtTextBox Name="CTSA7InclinazioneTxBx" Grid.Column="3" Grid.Row="8" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
|
||||
<CheckBox Name="CTSA8EnableChBx" Grid.Column="0" Grid.Row="9"
|
||||
Style="{StaticResource OmagCut_CheckBox_Single}" Margin="0,0,10,0"/>
|
||||
<Button Name="CTSA8Btn" Grid.Row="9" Grid.Column="1"
|
||||
Style="{StaticResource OmagCut_Button}" />
|
||||
<TextBlock Name="CTSA8TalloneMsgTxBl" Grid.Column="2" Grid.Row="9"
|
||||
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}" />
|
||||
<EgtWPFLib:EgtTextBox Name="CTSA8TalloneTxBx" Grid.Column="5" Grid.Row="9" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
<TextBlock Name="CTSA8InclinazioneMsgTxBl" Grid.Column="4" Grid.Row="9"
|
||||
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}" />
|
||||
<EgtWPFLib:EgtTextBox Name="CTSA8InclinazioneTxBx" Grid.Column="3" Grid.Row="9" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
|
||||
<CheckBox Name="CTSA9EnableChBx" Grid.Column="0" Grid.Row="10"
|
||||
Style="{StaticResource OmagCut_CheckBox_Single}" Margin="0,0,10,0"/>
|
||||
<Button Name="CTSA9Btn" Grid.Row="10" Grid.Column="1"
|
||||
Style="{StaticResource OmagCut_Button}" />
|
||||
<TextBlock Name="CTSA9TalloneMsgTxBl" Grid.Column="2" Grid.Row="10"
|
||||
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}" />
|
||||
<EgtWPFLib:EgtTextBox Name="CTSA9TalloneTxBx" Grid.Column="5" Grid.Row="10" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
<TextBlock Name="CTSA9InclinazioneMsgTxBl" Grid.Column="4" Grid.Row="10"
|
||||
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}" />
|
||||
<EgtWPFLib:EgtTextBox Name="CTSA9InclinazioneTxBx" Grid.Column="3" Grid.Row="10" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
|
||||
<CheckBox Name="CTSA10EnableChBx" Grid.Column="0" Grid.Row="11"
|
||||
Style="{StaticResource OmagCut_CheckBox_Single}" Margin="0,0,10,0"/>
|
||||
<Button Name="CTSA10Btn" Grid.Row="11" Grid.Column="1"
|
||||
Style="{StaticResource OmagCut_Button}" />
|
||||
<TextBlock Name="CTSA10TalloneMsgTxBl" Grid.Column="2" Grid.Row="11"
|
||||
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}" />
|
||||
<EgtWPFLib:EgtTextBox Name="CTSA10TalloneTxBx" Grid.Column="5" Grid.Row="11" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
<TextBlock Name="CTSA10InclinazioneMsgTxBl" Grid.Column="4" Grid.Row="11"
|
||||
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}" />
|
||||
<EgtWPFLib:EgtTextBox Name="CTSA10InclinazioneTxBx" Grid.Column="3" Grid.Row="11" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
</Grid>
|
||||
|
||||
</GroupBox>
|
||||
<TextBlock Name="TalloneMsgTxBl" Grid.Column="5" Grid.Row="1" Grid.ColumnSpan="2"
|
||||
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}" />
|
||||
<TextBlock Name="InclinazioneMsgTxBl" Grid.Column="3" Grid.Row="1"
|
||||
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}" />
|
||||
|
||||
<GroupBox Name="ThemesGpBx"
|
||||
|
||||
<CheckBox Name="CTSA1EnableChBx" Grid.Column="0" Grid.Row="2"
|
||||
Style="{StaticResource OmagCut_CheckBox_Single}" Margin="0,0,10,0"/>
|
||||
<Button Name="CTSA1Btn" Grid.Row="2" Grid.Column="1"
|
||||
Style="{StaticResource OmagCut_Button}" />
|
||||
<EgtWPFLib:EgtTextBox Name="CTSA1TalloneTxBx" Grid.Column="5" Grid.Row="2" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
<EgtWPFLib:EgtTextBox Name="CTSA1InclinazioneTxBx" Grid.Column="3" Grid.Row="2" Margin="10,0,10,0" IsLength="False"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
|
||||
<CheckBox Name="CTSA2EnableChBx" Grid.Column="0" Grid.Row="3"
|
||||
Style="{StaticResource OmagCut_CheckBox_Single}" Margin="0,0,10,0"/>
|
||||
<Button Name="CTSA2Btn" Grid.Row="3" Grid.Column="1"
|
||||
Style="{StaticResource OmagCut_Button}" />
|
||||
<EgtWPFLib:EgtTextBox Name="CTSA2TalloneTxBx" Grid.Column="5" Grid.Row="3" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
<EgtWPFLib:EgtTextBox Name="CTSA2InclinazioneTxBx" Grid.Column="3" Grid.Row="3" Margin="10,0,10,0" IsLength="False"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
|
||||
<CheckBox Name="CTSA3EnableChBx" Grid.Column="0" Grid.Row="4"
|
||||
Style="{StaticResource OmagCut_CheckBox_Single}" Margin="0,0,10,0"/>
|
||||
<Button Name="CTSA3Btn" Grid.Row="4" Grid.Column="1"
|
||||
Style="{StaticResource OmagCut_Button}" />
|
||||
<EgtWPFLib:EgtTextBox Name="CTSA3TalloneTxBx" Grid.Column="5" Grid.Row="4" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
<EgtWPFLib:EgtTextBox Name="CTSA3InclinazioneTxBx" Grid.Column="3" Grid.Row="4" Margin="10,0,10,0" IsLength="False"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
|
||||
<CheckBox Name="CTSA4EnableChBx" Grid.Column="0" Grid.Row="5"
|
||||
Style="{StaticResource OmagCut_CheckBox_Single}" Margin="0,0,10,0"/>
|
||||
<Button Name="CTSA4Btn" Grid.Row="5" Grid.Column="1"
|
||||
Style="{StaticResource OmagCut_Button}" />
|
||||
<TextBlock Name="CTSA4TalloneMsgTxBl" Grid.Column="2" Grid.Row="5"
|
||||
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}" />
|
||||
<EgtWPFLib:EgtTextBox Name="CTSA4TalloneTxBx" Grid.Column="5" Grid.Row="5" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
<TextBlock Name="CTSA4InclinazioneMsgTxBl" Grid.Column="4" Grid.Row="5"
|
||||
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}" />
|
||||
<EgtWPFLib:EgtTextBox Name="CTSA4InclinazioneTxBx" Grid.Column="3" Grid.Row="5" Margin="10,0,10,0" IsLength="False"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
|
||||
<CheckBox Name="CTSA5EnableChBx" Grid.Column="0" Grid.Row="6"
|
||||
Style="{StaticResource OmagCut_CheckBox_Single}" Margin="0,0,10,0"/>
|
||||
<Button Name="CTSA5Btn" Grid.Row="6" Grid.Column="1"
|
||||
Style="{StaticResource OmagCut_Button}" />
|
||||
<TextBlock Name="CTSA5TalloneMsgTxBl" Grid.Column="2" Grid.Row="6"
|
||||
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}" />
|
||||
<EgtWPFLib:EgtTextBox Name="CTSA5TalloneTxBx" Grid.Column="5" Grid.Row="6" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
<TextBlock Name="CTSA5InclinazioneMsgTxBl" Grid.Column="4" Grid.Row="6"
|
||||
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}" />
|
||||
<EgtWPFLib:EgtTextBox Name="CTSA5InclinazioneTxBx" Grid.Column="3" Grid.Row="6" Margin="10,0,10,0" IsLength="False"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
|
||||
<CheckBox Name="CTSA6EnableChBx" Grid.Column="0" Grid.Row="7"
|
||||
Style="{StaticResource OmagCut_CheckBox_Single}" Margin="0,0,10,0"/>
|
||||
<Button Name="CTSA6Btn" Grid.Row="7" Grid.Column="1"
|
||||
Style="{StaticResource OmagCut_Button}" />
|
||||
<TextBlock Name="CTSA6TalloneMsgTxBl" Grid.Column="2" Grid.Row="7"
|
||||
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}" />
|
||||
<EgtWPFLib:EgtTextBox Name="CTSA6TalloneTxBx" Grid.Column="5" Grid.Row="7" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
<TextBlock Name="CTSA6InclinazioneMsgTxBl" Grid.Column="4" Grid.Row="7"
|
||||
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}" />
|
||||
<EgtWPFLib:EgtTextBox Name="CTSA6InclinazioneTxBx" Grid.Column="3" Grid.Row="7" Margin="10,0,10,0" IsLength="False"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
|
||||
<CheckBox Name="CTSA7EnableChBx" Grid.Column="0" Grid.Row="8"
|
||||
Style="{StaticResource OmagCut_CheckBox_Single}" Margin="0,0,10,0"/>
|
||||
<Button Name="CTSA7Btn" Grid.Row="8" Grid.Column="1"
|
||||
Style="{StaticResource OmagCut_Button}" />
|
||||
<TextBlock Name="CTSA7TalloneMsgTxBl" Grid.Column="2" Grid.Row="8"
|
||||
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}" />
|
||||
<EgtWPFLib:EgtTextBox Name="CTSA7TalloneTxBx" Grid.Column="5" Grid.Row="8" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
<TextBlock Name="CTSA7InclinazioneMsgTxBl" Grid.Column="4" Grid.Row="8"
|
||||
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}" />
|
||||
<EgtWPFLib:EgtTextBox Name="CTSA7InclinazioneTxBx" Grid.Column="3" Grid.Row="8" Margin="10,0,10,0" IsLength="False"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
|
||||
<CheckBox Name="CTSA8EnableChBx" Grid.Column="0" Grid.Row="9"
|
||||
Style="{StaticResource OmagCut_CheckBox_Single}" Margin="0,0,10,0"/>
|
||||
<Button Name="CTSA8Btn" Grid.Row="9" Grid.Column="1"
|
||||
Style="{StaticResource OmagCut_Button}" />
|
||||
<TextBlock Name="CTSA8TalloneMsgTxBl" Grid.Column="2" Grid.Row="9"
|
||||
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}" />
|
||||
<EgtWPFLib:EgtTextBox Name="CTSA8TalloneTxBx" Grid.Column="5" Grid.Row="9" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
<TextBlock Name="CTSA8InclinazioneMsgTxBl" Grid.Column="4" Grid.Row="9"
|
||||
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}" />
|
||||
<EgtWPFLib:EgtTextBox Name="CTSA8InclinazioneTxBx" Grid.Column="3" Grid.Row="9" Margin="10,0,10,0" IsLength="False"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
|
||||
<CheckBox Name="CTSA9EnableChBx" Grid.Column="0" Grid.Row="10"
|
||||
Style="{StaticResource OmagCut_CheckBox_Single}" Margin="0,0,10,0"/>
|
||||
<Button Name="CTSA9Btn" Grid.Row="10" Grid.Column="1"
|
||||
Style="{StaticResource OmagCut_Button}" />
|
||||
<TextBlock Name="CTSA9TalloneMsgTxBl" Grid.Column="2" Grid.Row="10"
|
||||
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}" />
|
||||
<EgtWPFLib:EgtTextBox Name="CTSA9TalloneTxBx" Grid.Column="5" Grid.Row="10" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
<TextBlock Name="CTSA9InclinazioneMsgTxBl" Grid.Column="4" Grid.Row="10"
|
||||
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}" />
|
||||
<EgtWPFLib:EgtTextBox Name="CTSA9InclinazioneTxBx" Grid.Column="3" Grid.Row="10" Margin="10,0,10,0" IsLength="False"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
|
||||
<CheckBox Name="CTSA10EnableChBx" Grid.Column="0" Grid.Row="11"
|
||||
Style="{StaticResource OmagCut_CheckBox_Single}" Margin="0,0,10,0"/>
|
||||
<Button Name="CTSA10Btn" Grid.Row="11" Grid.Column="1"
|
||||
Style="{StaticResource OmagCut_Button}" />
|
||||
<TextBlock Name="CTSA10TalloneMsgTxBl" Grid.Column="2" Grid.Row="11"
|
||||
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}" />
|
||||
<EgtWPFLib:EgtTextBox Name="CTSA10TalloneTxBx" Grid.Column="5" Grid.Row="11" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
<TextBlock Name="CTSA10InclinazioneMsgTxBl" Grid.Column="4" Grid.Row="11"
|
||||
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}" />
|
||||
<EgtWPFLib:EgtTextBox Name="CTSA10InclinazioneTxBx" Grid.Column="3" Grid.Row="11" Margin="10,0,10,0" IsLength="False"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
</Grid>
|
||||
|
||||
</GroupBox>
|
||||
|
||||
<GroupBox Name="ThemesGpBx"
|
||||
Grid.Column="1"
|
||||
Grid.Row="5"
|
||||
Grid.ColumnSpan="2"
|
||||
Style="{DynamicResource OmagCut_GroupBox}">
|
||||
<Grid >
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
<ColumnDefinition Width="4*"/>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="0.25*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.25*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid >
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
<ColumnDefinition Width="4*"/>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="0.25*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.25*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<ComboBox Name="ThemesCmBx" Grid.Column="1" Grid.Row="1" Style="{StaticResource OmagCut_ComboBox}">
|
||||
<ComboBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding}" Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</DataTemplate>
|
||||
</ComboBox.ItemTemplate>
|
||||
</ComboBox>
|
||||
<ComboBox Name="ThemesCmBx" Grid.Column="1" Grid.Row="1" Style="{StaticResource OmagCut_ComboBox}">
|
||||
<ComboBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding}" Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</DataTemplate>
|
||||
</ComboBox.ItemTemplate>
|
||||
</ComboBox>
|
||||
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
||||
</GroupBox>
|
||||
</GroupBox>
|
||||
|
||||
<!--Affondamneto da Colore-->
|
||||
<GroupBox Name="ColorToEngraveGpBx" Grid.RowSpan="3"
|
||||
<!--Affondamneto da Colore-->
|
||||
<GroupBox Name="ColorToEngraveGpBx" Grid.RowSpan="3"
|
||||
Grid.Column="3" Grid.ColumnSpan="2" Grid.Row="3"
|
||||
Style="{DynamicResource OmagCut_GroupBox}">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="0*"/>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="0"/>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="0.75*"/>
|
||||
<RowDefinition Height="0.25*"/>
|
||||
<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*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="0*"/>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="0"/>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="0.75*"/>
|
||||
<RowDefinition Height="0.25*"/>
|
||||
<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*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<Grid Grid.Row="0" Grid.ColumnSpan="7">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1.5*"/>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="1.5*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="0.75*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid Grid.Row="0" Grid.ColumnSpan="7">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1.5*"/>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="1.5*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="0.75*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<CheckBox Name="CTEboxEnableChBx" Grid.Column="0" Grid.Row="0"
|
||||
<CheckBox Name="CTEboxEnableChBx" Grid.Column="0" Grid.Row="0"
|
||||
Style="{StaticResource OmagCut_CheckBox_Single}" Margin="0,0,10,0"/>
|
||||
<TextBlock Name="CTEboxEnableMsgTxBl" Grid.Column="1" Grid.Row="0"
|
||||
<TextBlock Name="CTEboxEnableMsgTxBl" Grid.Column="1" Grid.Row="0"
|
||||
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}" HorizontalAlignment="Left" />
|
||||
|
||||
<TextBlock Name="ToleranceEMsgTxBl" Grid.Column="3" Grid.Row="0"
|
||||
<TextBlock Name="ToleranceEMsgTxBl" Grid.Column="3" Grid.Row="0"
|
||||
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}" />
|
||||
<EgtWPFLib:EgtTextBox Name="ToleranceEMsgTxBx" Grid.Column="4" Grid.Row="0" Margin="10,0,10,0"
|
||||
<EgtWPFLib:EgtTextBox Name="ToleranceEMsgTxBx" Grid.Column="4" Grid.Row="0" Margin="10,0,10,0" IsLength="False"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
|
||||
</Grid>
|
||||
|
||||
<TextBlock Name="AffondamentoMsgTxBl" Grid.Column="3" Grid.Row="1" Grid.ColumnSpan="2"
|
||||
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}" />
|
||||
|
||||
<TextBlock Name="LarghezzaMsgTxBl" Grid.Column="5" Grid.Row="1" Grid.ColumnSpan="2"
|
||||
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}" />
|
||||
|
||||
<CheckBox Name="CTE1EnableChBx" Grid.Column="0" Grid.Row="2"
|
||||
Style="{StaticResource OmagCut_CheckBox_Single}" Margin="0,0,10,0"/>
|
||||
<Button Name="CTE1Btn" Grid.Row="2" Grid.Column="1"
|
||||
Style="{StaticResource OmagCut_Button}" />
|
||||
<EgtWPFLib:EgtTextBox Name="CTE1AffondamentoTxBx" Grid.Column="3" Grid.Row="2" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
<EgtWPFLib:EgtTextBox Name="CTE1LarghezzaTxBx" Grid.Column="5" Grid.Row="2" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
|
||||
<CheckBox Name="CTE2EnableChBx" Grid.Column="0" Grid.Row="3"
|
||||
Style="{StaticResource OmagCut_CheckBox_Single}" Margin="0,0,10,0"/>
|
||||
<Button Name="CTE2Btn" Grid.Row="3" Grid.Column="1"
|
||||
Style="{StaticResource OmagCut_Button}" />
|
||||
<EgtWPFLib:EgtTextBox Name="CTE2AffondamentoTxBx" Grid.Column="3" Grid.Row="3" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
<EgtWPFLib:EgtTextBox Name="CTE2LarghezzaTxBx" Grid.Column="5" Grid.Row="3" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
|
||||
<CheckBox Name="CTE3EnableChBx" Grid.Column="0" Grid.Row="4"
|
||||
Style="{StaticResource OmagCut_CheckBox_Single}" Margin="0,0,10,0"/>
|
||||
<Button Name="CTE3Btn" Grid.Row="4" Grid.Column="1"
|
||||
Style="{StaticResource OmagCut_Button}" />
|
||||
<EgtWPFLib:EgtTextBox Name="CTE3AffondamentoTxBx" Grid.Column="3" Grid.Row="4" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
<EgtWPFLib:EgtTextBox Name="CTE3LarghezzaTxBx" Grid.Column="5" Grid.Row="4" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
|
||||
<CheckBox Name="CTE4EnableChBx" Grid.Column="0" Grid.Row="5"
|
||||
Style="{StaticResource OmagCut_CheckBox_Single}" Margin="0,0,10,0"/>
|
||||
<Button Name="CTE4Btn" Grid.Row="5" Grid.Column="1"
|
||||
Style="{StaticResource OmagCut_Button}" />
|
||||
<EgtWPFLib:EgtTextBox Name="CTE4AffondamentoTxBx" Grid.Column="3" Grid.Row="5" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
<EgtWPFLib:EgtTextBox Name="CTE4LarghezzaTxBx" Grid.Column="5" Grid.Row="5" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
|
||||
<CheckBox Name="CTE5EnableChBx" Grid.Column="0" Grid.Row="6"
|
||||
Style="{StaticResource OmagCut_CheckBox_Single}" Margin="0,0,10,0"/>
|
||||
<Button Name="CTE5Btn" Grid.Row="6" Grid.Column="1"
|
||||
Style="{StaticResource OmagCut_Button}" />
|
||||
<EgtWPFLib:EgtTextBox Name="CTE5AffondamentoTxBx" Grid.Column="3" Grid.Row="6" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
<EgtWPFLib:EgtTextBox Name="CTE5LarghezzaTxBx" Grid.Column="5" Grid.Row="6" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
|
||||
<CheckBox Name="CTE6EnableChBx" Grid.Column="0" Grid.Row="7"
|
||||
Style="{StaticResource OmagCut_CheckBox_Single}" Margin="0,0,10,0"/>
|
||||
<Button Name="CTE6Btn" Grid.Row="7" Grid.Column="1"
|
||||
Style="{StaticResource OmagCut_Button}" />
|
||||
<EgtWPFLib:EgtTextBox Name="CTE6AffondamentoTxBx" Grid.Column="3" Grid.Row="7" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
<EgtWPFLib:EgtTextBox Name="CTE6LarghezzaTxBx" Grid.Column="5" Grid.Row="7" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
|
||||
<CheckBox Name="CTE7EnableChBx" Grid.Column="0" Grid.Row="8"
|
||||
Style="{StaticResource OmagCut_CheckBox_Single}" Margin="0,0,10,0"/>
|
||||
<Button Name="CTE7Btn" Grid.Row="8" Grid.Column="1"
|
||||
Style="{StaticResource OmagCut_Button}" />
|
||||
<EgtWPFLib:EgtTextBox Name="CTE7AffondamentoTxBx" Grid.Column="3" Grid.Row="8" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
<EgtWPFLib:EgtTextBox Name="CTE7LarghezzaTxBx" Grid.Column="5" Grid.Row="8" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
|
||||
<CheckBox Name="CTE8EnableChBx" Grid.Column="0" Grid.Row="9"
|
||||
Style="{StaticResource OmagCut_CheckBox_Single}" Margin="0,0,10,0"/>
|
||||
<Button Name="CTE8Btn" Grid.Row="9" Grid.Column="1"
|
||||
Style="{StaticResource OmagCut_Button}" />
|
||||
<EgtWPFLib:EgtTextBox Name="CTE8AffondamentoTxBx" Grid.Column="3" Grid.Row="9" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
<EgtWPFLib:EgtTextBox Name="CTE8LarghezzaTxBx" Grid.Column="5" Grid.Row="9" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
|
||||
<CheckBox Name="CTE9EnableChBx" Grid.Column="0" Grid.Row="10"
|
||||
Style="{StaticResource OmagCut_CheckBox_Single}" Margin="0,0,10,0"/>
|
||||
<Button Name="CTE9Btn" Grid.Row="10" Grid.Column="1"
|
||||
Style="{StaticResource OmagCut_Button}" />
|
||||
<EgtWPFLib:EgtTextBox Name="CTE9AffondamentoTxBx" Grid.Column="3" Grid.Row="10" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
<EgtWPFLib:EgtTextBox Name="CTE9LarghezzaTxBx" Grid.Column="5" Grid.Row="10" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
|
||||
<CheckBox Name="CTE10EnableChBx" Grid.Column="0" Grid.Row="11"
|
||||
Style="{StaticResource OmagCut_CheckBox_Single}" Margin="0,0,10,0"/>
|
||||
<Button Name="CTE10Btn" Grid.Row="11" Grid.Column="1"
|
||||
Style="{StaticResource OmagCut_Button}" />
|
||||
<EgtWPFLib:EgtTextBox Name="CTE10AffondamentoTxBx" Grid.Column="3" Grid.Row="11" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
<EgtWPFLib:EgtTextBox Name="CTE10LarghezzaTxBx" Grid.Column="5" Grid.Row="11" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
|
||||
</Grid>
|
||||
|
||||
</GroupBox>
|
||||
<TextBlock Name="AffondamentoMsgTxBl" Grid.Column="3" Grid.Row="1" Grid.ColumnSpan="2"
|
||||
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}" />
|
||||
|
||||
<!--Selezione il tipo di avvio del programma-->
|
||||
<GroupBox Name="StartLauncherGpBx"
|
||||
<TextBlock Name="LarghezzaMsgTxBl" Grid.Column="5" Grid.Row="1" Grid.ColumnSpan="2"
|
||||
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}" />
|
||||
|
||||
<CheckBox Name="CTE1EnableChBx" Grid.Column="0" Grid.Row="2"
|
||||
Style="{StaticResource OmagCut_CheckBox_Single}" Margin="0,0,10,0"/>
|
||||
<Button Name="CTE1Btn" Grid.Row="2" Grid.Column="1"
|
||||
Style="{StaticResource OmagCut_Button}" />
|
||||
<EgtWPFLib:EgtTextBox Name="CTE1AffondamentoTxBx" Grid.Column="3" Grid.Row="2" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
<EgtWPFLib:EgtTextBox Name="CTE1LarghezzaTxBx" Grid.Column="5" Grid.Row="2" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
|
||||
<CheckBox Name="CTE2EnableChBx" Grid.Column="0" Grid.Row="3"
|
||||
Style="{StaticResource OmagCut_CheckBox_Single}" Margin="0,0,10,0"/>
|
||||
<Button Name="CTE2Btn" Grid.Row="3" Grid.Column="1"
|
||||
Style="{StaticResource OmagCut_Button}" />
|
||||
<EgtWPFLib:EgtTextBox Name="CTE2AffondamentoTxBx" Grid.Column="3" Grid.Row="3" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
<EgtWPFLib:EgtTextBox Name="CTE2LarghezzaTxBx" Grid.Column="5" Grid.Row="3" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
|
||||
<CheckBox Name="CTE3EnableChBx" Grid.Column="0" Grid.Row="4"
|
||||
Style="{StaticResource OmagCut_CheckBox_Single}" Margin="0,0,10,0"/>
|
||||
<Button Name="CTE3Btn" Grid.Row="4" Grid.Column="1"
|
||||
Style="{StaticResource OmagCut_Button}" />
|
||||
<EgtWPFLib:EgtTextBox Name="CTE3AffondamentoTxBx" Grid.Column="3" Grid.Row="4" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
<EgtWPFLib:EgtTextBox Name="CTE3LarghezzaTxBx" Grid.Column="5" Grid.Row="4" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
|
||||
<CheckBox Name="CTE4EnableChBx" Grid.Column="0" Grid.Row="5"
|
||||
Style="{StaticResource OmagCut_CheckBox_Single}" Margin="0,0,10,0"/>
|
||||
<Button Name="CTE4Btn" Grid.Row="5" Grid.Column="1"
|
||||
Style="{StaticResource OmagCut_Button}" />
|
||||
<EgtWPFLib:EgtTextBox Name="CTE4AffondamentoTxBx" Grid.Column="3" Grid.Row="5" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
<EgtWPFLib:EgtTextBox Name="CTE4LarghezzaTxBx" Grid.Column="5" Grid.Row="5" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
|
||||
<CheckBox Name="CTE5EnableChBx" Grid.Column="0" Grid.Row="6"
|
||||
Style="{StaticResource OmagCut_CheckBox_Single}" Margin="0,0,10,0"/>
|
||||
<Button Name="CTE5Btn" Grid.Row="6" Grid.Column="1"
|
||||
Style="{StaticResource OmagCut_Button}" />
|
||||
<EgtWPFLib:EgtTextBox Name="CTE5AffondamentoTxBx" Grid.Column="3" Grid.Row="6" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
<EgtWPFLib:EgtTextBox Name="CTE5LarghezzaTxBx" Grid.Column="5" Grid.Row="6" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
|
||||
<CheckBox Name="CTE6EnableChBx" Grid.Column="0" Grid.Row="7"
|
||||
Style="{StaticResource OmagCut_CheckBox_Single}" Margin="0,0,10,0"/>
|
||||
<Button Name="CTE6Btn" Grid.Row="7" Grid.Column="1"
|
||||
Style="{StaticResource OmagCut_Button}" />
|
||||
<EgtWPFLib:EgtTextBox Name="CTE6AffondamentoTxBx" Grid.Column="3" Grid.Row="7" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
<EgtWPFLib:EgtTextBox Name="CTE6LarghezzaTxBx" Grid.Column="5" Grid.Row="7" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
|
||||
<CheckBox Name="CTE7EnableChBx" Grid.Column="0" Grid.Row="8"
|
||||
Style="{StaticResource OmagCut_CheckBox_Single}" Margin="0,0,10,0"/>
|
||||
<Button Name="CTE7Btn" Grid.Row="8" Grid.Column="1"
|
||||
Style="{StaticResource OmagCut_Button}" />
|
||||
<EgtWPFLib:EgtTextBox Name="CTE7AffondamentoTxBx" Grid.Column="3" Grid.Row="8" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
<EgtWPFLib:EgtTextBox Name="CTE7LarghezzaTxBx" Grid.Column="5" Grid.Row="8" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
|
||||
<CheckBox Name="CTE8EnableChBx" Grid.Column="0" Grid.Row="9"
|
||||
Style="{StaticResource OmagCut_CheckBox_Single}" Margin="0,0,10,0"/>
|
||||
<Button Name="CTE8Btn" Grid.Row="9" Grid.Column="1"
|
||||
Style="{StaticResource OmagCut_Button}" />
|
||||
<EgtWPFLib:EgtTextBox Name="CTE8AffondamentoTxBx" Grid.Column="3" Grid.Row="9" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
<EgtWPFLib:EgtTextBox Name="CTE8LarghezzaTxBx" Grid.Column="5" Grid.Row="9" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
|
||||
<CheckBox Name="CTE9EnableChBx" Grid.Column="0" Grid.Row="10"
|
||||
Style="{StaticResource OmagCut_CheckBox_Single}" Margin="0,0,10,0"/>
|
||||
<Button Name="CTE9Btn" Grid.Row="10" Grid.Column="1"
|
||||
Style="{StaticResource OmagCut_Button}" />
|
||||
<EgtWPFLib:EgtTextBox Name="CTE9AffondamentoTxBx" Grid.Column="3" Grid.Row="10" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
<EgtWPFLib:EgtTextBox Name="CTE9LarghezzaTxBx" Grid.Column="5" Grid.Row="10" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
|
||||
<CheckBox Name="CTE10EnableChBx" Grid.Column="0" Grid.Row="11"
|
||||
Style="{StaticResource OmagCut_CheckBox_Single}" Margin="0,0,10,0"/>
|
||||
<Button Name="CTE10Btn" Grid.Row="11" Grid.Column="1"
|
||||
Style="{StaticResource OmagCut_Button}" />
|
||||
<EgtWPFLib:EgtTextBox Name="CTE10AffondamentoTxBx" Grid.Column="3" Grid.Row="11" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
<EgtWPFLib:EgtTextBox Name="CTE10LarghezzaTxBx" Grid.Column="5" Grid.Row="11" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
|
||||
</Grid>
|
||||
|
||||
</GroupBox>
|
||||
|
||||
<!--Selezione il tipo di avvio del programma-->
|
||||
<GroupBox Name="StartLauncherGpBx"
|
||||
Grid.Column="3" Grid.RowSpan="3" Grid.ColumnSpan="1"
|
||||
Style="{DynamicResource OmagCut_GroupBox}">
|
||||
<Grid >
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
<ColumnDefinition Width="4*"/>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="0.25*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.25*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid >
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
<ColumnDefinition Width="4*"/>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="0.25*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.25*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<ComboBox Name="StartLauncherCmBx" Grid.Column="1" Grid.Row="1" Style="{StaticResource OmagCut_ComboBox}">
|
||||
<ComboBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding}" Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</DataTemplate>
|
||||
</ComboBox.ItemTemplate>
|
||||
</ComboBox>
|
||||
<ComboBox Name="StartLauncherCmBx" Grid.Column="1" Grid.Row="1" Style="{StaticResource OmagCut_ComboBox}">
|
||||
<ComboBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding}" Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</DataTemplate>
|
||||
</ComboBox.ItemTemplate>
|
||||
</ComboBox>
|
||||
|
||||
</Grid>
|
||||
</GroupBox>
|
||||
|
||||
<GroupBox Name="FeedbackGpBx"
|
||||
</Grid>
|
||||
</GroupBox>
|
||||
|
||||
<GroupBox Name="FeedbackGpBx"
|
||||
Grid.Column="4" Grid.RowSpan="3" Grid.ColumnSpan="1"
|
||||
Style="{DynamicResource OmagCut_GroupBox}">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="0.25*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="0.25*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<Button Name="FeedbackBtn"
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="0.25*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="0.25*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<Button Name="FeedbackBtn"
|
||||
Grid.Row="1" Grid.Column="1"
|
||||
Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource SendImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||
</Button>
|
||||
</Grid>
|
||||
<Image Source="{DynamicResource SendImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||
</Button>
|
||||
</Grid>
|
||||
|
||||
</GroupBox>
|
||||
|
||||
|
||||
@@ -7,6 +7,8 @@ Public Class OptionsPageUC
|
||||
Dim m_MainWindow As MainWindow = DirectCast(Application.Current.MainWindow, MainWindow)
|
||||
|
||||
Private UnitsList() As String = {"inch", "mm"}
|
||||
Private FractionPatternList() As String = {"Decimal", "Foot'Inch""", "Only Inch"}
|
||||
Private PrecisionList() As Double = {2, 4, 8, 16, 32, 64, 128}
|
||||
Private ThemesList() As String = {"Classic", "Dark"}
|
||||
|
||||
' "Last Project", "New Project", "Open Folder", "Show Window"
|
||||
@@ -18,6 +20,10 @@ Public Class OptionsPageUC
|
||||
LanguageCmBx.ItemsSource = m_MainWindow.m_LanguagesList
|
||||
' Associazione della lista unità di misura alla combobox
|
||||
UnitsOfMeasureCmBx.ItemsSource = UnitsList
|
||||
' Associazione della lista dei Pattern
|
||||
FractionPatternCmBx.ItemsSource = FractionPatternList
|
||||
' Associazione della lista della precisione
|
||||
PrecisionCmBx.ItemsSource = PrecisionList
|
||||
' Associazione della lista temi alla combobox
|
||||
ThemesCmBx.ItemsSource = ThemesList
|
||||
|
||||
@@ -27,6 +33,16 @@ Public Class OptionsPageUC
|
||||
' Imposto l'unità di misura corrente
|
||||
UnitsOfMeasureCmBx.SelectedIndex = If(EgtUiUnitsAreMM(), 1, 0)
|
||||
|
||||
' Imposto il pattern della per la rappresentazione frazionaria
|
||||
nCurrFractionPattern = GetPrivateProfileInt(S_GENERAL, K_FRACTIONPATTERN, 0, m_MainWindow.GetIniFile())
|
||||
FractionPatternCmBx.SelectedIndex = nCurrFractionPattern
|
||||
EgtWPFLib.FractionStringConverter.SetCurrFractionPattern(nCurrFractionPattern)
|
||||
|
||||
' Imposto la preciosne della rappresentazione frazionaria
|
||||
dPrecision = CDbl(GetPrivateProfileInt(S_GENERAL, K_PRECISION, 64, m_MainWindow.GetIniFile()))
|
||||
Dim Index As Integer = PrecisionCmBx.Items.IndexOf(dPrecision)
|
||||
PrecisionCmBx.SelectedIndex = Index
|
||||
|
||||
' Imposto il tema corrente
|
||||
ThemesCmBx.SelectedIndex = GetPrivateProfileInt(S_GENERAL, K_THEME, 0, m_MainWindow.GetIniFile())
|
||||
Themes_StartUp()
|
||||
@@ -322,9 +338,60 @@ Public Class OptionsPageUC
|
||||
EgtSetUiUnits(bMM)
|
||||
m_MainWindow.m_CurrentProjectPageUC.UpdateHeightTxBx()
|
||||
WritePrivateProfileString(S_GENERAL, K_MMUNITS, If(bMM, "1", "0"), m_MainWindow.GetIniFile())
|
||||
|
||||
If bMM Then
|
||||
' se selezione MILLIMETRI nascondo la combobox che permette di inserie il tipo di pattern per la definizione delle frazioni
|
||||
FractionPatternCmBx.Visibility = Visibility.Hidden
|
||||
PrecisionCmBx.Visibility = Visibility.Hidden
|
||||
Dim RowNum As Integer = UnitGrid.RowDefinitions.Count
|
||||
If RowNum > 3 Then
|
||||
UnitsOfMeasureCmBx.SetValue(Grid.RowSpanProperty, 3)
|
||||
End If
|
||||
Else
|
||||
' se selezione POLLICI mostro la combobox che permette di inserie il tipo di pattern per la definizione delle frazioni
|
||||
FractionPatternCmBx.Visibility = Visibility.Visible
|
||||
PrecisionCmBx.Visibility = Visibility.Visible
|
||||
UnitsOfMeasureCmBx.SetValue(Grid.RowSpanProperty, 1)
|
||||
End If
|
||||
|
||||
' Aggiorno dati nella pagina dipendenti da unità di misura
|
||||
UpdateSlabDxf()
|
||||
UpdateAllCSTA()
|
||||
If m_MainWindow.m_CurrentMachine.bWaterJet And m_MainWindow.m_CurrentMachine.bFromDBWaterJet Then
|
||||
m_MainWindow.m_CurrentMachine.LoadWJMaterial()
|
||||
If Not IsNothing(m_MainWindow.m_MachinePageUC.m_WaterJetPageUC) Then
|
||||
m_MainWindow.m_MachinePageUC.m_WaterJetPageUC.WaterJetPage_Reinitialize()
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub FractionPatternCmBx_SelectionChanged(sender As Object, e As SelectionChangedEventArgs) Handles FractionPatternCmBx.SelectionChanged
|
||||
nCurrFractionPattern = FractionPatternCmBx.SelectedIndex
|
||||
EgtWPFLib.FractionStringConverter.SetCurrFractionPattern(nCurrFractionPattern)
|
||||
WritePrivateProfileString(S_GENERAL, K_FRACTIONPATTERN, nCurrFractionPattern, m_MainWindow.GetIniFile())
|
||||
' Aggiorno dati nella pagina dipendenti da unità di misura
|
||||
UpdateSlabDxf()
|
||||
UpdateAllCSTA()
|
||||
If m_MainWindow.m_CurrentMachine.bWaterJet And m_MainWindow.m_CurrentMachine.bFromDBWaterJet Then
|
||||
m_MainWindow.m_CurrentMachine.LoadWJMaterial()
|
||||
If Not IsNothing(m_MainWindow.m_MachinePageUC.m_WaterJetPageUC) Then
|
||||
m_MainWindow.m_MachinePageUC.m_WaterJetPageUC.WaterJetPage_Reinitialize()
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub PrecisionCmBx_SelectionChanged(sender As Object, e As SelectionChangedEventArgs) Handles PrecisionCmBx.SelectionChanged
|
||||
dPrecision = PrecisionCmBx.SelectedValue
|
||||
WritePrivateProfileString(S_GENERAL, K_PRECISION, dPrecision, m_MainWindow.GetIniFile())
|
||||
' Aggiorno dati nella pagina dipendenti da unità di misura
|
||||
UpdateSlabDxf()
|
||||
UpdateAllCSTA()
|
||||
If m_MainWindow.m_CurrentMachine.bWaterJet And m_MainWindow.m_CurrentMachine.bFromDBWaterJet Then
|
||||
m_MainWindow.m_CurrentMachine.LoadWJMaterial()
|
||||
If Not IsNothing(m_MainWindow.m_MachinePageUC.m_WaterJetPageUC) Then
|
||||
m_MainWindow.m_MachinePageUC.m_WaterJetPageUC.WaterJetPage_Reinitialize()
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub ThemesCmBx_SelectionChanged(sender As Object, e As SelectionChangedEventArgs) Handles ThemesCmBx.SelectionChanged
|
||||
@@ -648,70 +715,70 @@ Public Class OptionsPageUC
|
||||
|
||||
Private Sub CTSA1InclinazioneTxBx_TextChanged(sender As Object, e As TextChangedEventArgs) Handles CTSA1InclinazioneTxBx.TextChanged
|
||||
If CTSA1InclinazioneTxBx.Text <> "-" Then
|
||||
Dim dAng As Double : If Not StringToLen(CTSA1InclinazioneTxBx.Text, dAng) Then CTSA1InclinazioneTxBx.Text = ""
|
||||
Dim dAng As Double : If Not StringToDouble(CTSA1InclinazioneTxBx.Text, dAng) Then CTSA1InclinazioneTxBx.Text = ""
|
||||
End If
|
||||
CTSA1EnableChBx_Click(sender, e)
|
||||
End Sub
|
||||
|
||||
Private Sub CTSA2InclinazioneTxBx_TextChanged(sender As Object, e As TextChangedEventArgs) Handles CTSA2InclinazioneTxBx.TextChanged
|
||||
If CTSA2InclinazioneTxBx.Text <> "-" Then
|
||||
Dim dAng As Double : If Not StringToLen(CTSA2InclinazioneTxBx.Text, dAng) Then CTSA2InclinazioneTxBx.Text = ""
|
||||
Dim dAng As Double : If Not StringToDouble(CTSA2InclinazioneTxBx.Text, dAng) Then CTSA2InclinazioneTxBx.Text = ""
|
||||
End If
|
||||
CTSA2EnableChBx_Click(sender, e)
|
||||
End Sub
|
||||
|
||||
Private Sub CTSA3InclinazioneTxBx_TextChanged(sender As Object, e As TextChangedEventArgs) Handles CTSA3InclinazioneTxBx.TextChanged
|
||||
If CTSA3InclinazioneTxBx.Text <> "-" Then
|
||||
Dim dAng As Double : If Not StringToLen(CTSA3InclinazioneTxBx.Text, dAng) Then CTSA3InclinazioneTxBx.Text = ""
|
||||
Dim dAng As Double : If Not StringToDouble(CTSA3InclinazioneTxBx.Text, dAng) Then CTSA3InclinazioneTxBx.Text = ""
|
||||
End If
|
||||
CTSA3EnableChBx_Click(sender, e)
|
||||
End Sub
|
||||
|
||||
Private Sub CTSA4InclinazioneTxBx_TextChanged(sender As Object, e As TextChangedEventArgs) Handles CTSA4InclinazioneTxBx.TextChanged
|
||||
If CTSA4InclinazioneTxBx.Text <> "-" Then
|
||||
Dim dAng As Double : If Not StringToLen(CTSA4InclinazioneTxBx.Text, dAng) Then CTSA4InclinazioneTxBx.Text = ""
|
||||
Dim dAng As Double : If Not StringToDouble(CTSA4InclinazioneTxBx.Text, dAng) Then CTSA4InclinazioneTxBx.Text = ""
|
||||
End If
|
||||
CTSA4EnableChBx_Click(sender, e)
|
||||
End Sub
|
||||
|
||||
Private Sub CTSA5InclinazioneTxBx_TextChanged(sender As Object, e As TextChangedEventArgs) Handles CTSA5InclinazioneTxBx.TextChanged
|
||||
If CTSA5InclinazioneTxBx.Text <> "-" Then
|
||||
Dim dAng As Double : If Not StringToLen(CTSA5InclinazioneTxBx.Text, dAng) Then CTSA5InclinazioneTxBx.Text = ""
|
||||
Dim dAng As Double : If Not StringToDouble(CTSA5InclinazioneTxBx.Text, dAng) Then CTSA5InclinazioneTxBx.Text = ""
|
||||
End If
|
||||
CTSA5EnableChBx_Click(sender, e)
|
||||
End Sub
|
||||
|
||||
Private Sub CTSA6InclinazioneTxBx_TextChanged(sender As Object, e As TextChangedEventArgs) Handles CTSA6InclinazioneTxBx.TextChanged
|
||||
If CTSA6InclinazioneTxBx.Text <> "-" Then
|
||||
Dim dAng As Double : If Not StringToLen(CTSA6InclinazioneTxBx.Text, dAng) Then CTSA6InclinazioneTxBx.Text = ""
|
||||
Dim dAng As Double : If Not StringToDouble(CTSA6InclinazioneTxBx.Text, dAng) Then CTSA6InclinazioneTxBx.Text = ""
|
||||
End If
|
||||
CTSA6EnableChBx_Click(sender, e)
|
||||
End Sub
|
||||
|
||||
Private Sub CTSA7InclinazioneTxBx_TextChanged(sender As Object, e As TextChangedEventArgs) Handles CTSA7InclinazioneTxBx.TextChanged
|
||||
If CTSA7InclinazioneTxBx.Text <> "-" Then
|
||||
Dim dAng As Double : If Not StringToLen(CTSA7InclinazioneTxBx.Text, dAng) Then CTSA7InclinazioneTxBx.Text = ""
|
||||
Dim dAng As Double : If Not StringToDouble(CTSA7InclinazioneTxBx.Text, dAng) Then CTSA7InclinazioneTxBx.Text = ""
|
||||
End If
|
||||
CTSA7EnableChBx_Click(sender, e)
|
||||
End Sub
|
||||
|
||||
Private Sub CTSA8InclinazioneTxBx_TextChanged(sender As Object, e As TextChangedEventArgs) Handles CTSA8InclinazioneTxBx.TextChanged
|
||||
If CTSA8InclinazioneTxBx.Text <> "-" Then
|
||||
Dim dAng As Double : If Not StringToLen(CTSA8InclinazioneTxBx.Text, dAng) Then CTSA8InclinazioneTxBx.Text = ""
|
||||
Dim dAng As Double : If Not StringToDouble(CTSA8InclinazioneTxBx.Text, dAng) Then CTSA8InclinazioneTxBx.Text = ""
|
||||
End If
|
||||
CTSA8EnableChBx_Click(sender, e)
|
||||
End Sub
|
||||
|
||||
Private Sub CTSA9InclinazioneTxBx_TextChanged(sender As Object, e As TextChangedEventArgs) Handles CTSA9InclinazioneTxBx.TextChanged
|
||||
If CTSA9InclinazioneTxBx.Text <> "-" Then
|
||||
Dim dAng As Double : If Not StringToLen(CTSA9InclinazioneTxBx.Text, dAng) Then CTSA9InclinazioneTxBx.Text = ""
|
||||
Dim dAng As Double : If Not StringToDouble(CTSA9InclinazioneTxBx.Text, dAng) Then CTSA9InclinazioneTxBx.Text = ""
|
||||
End If
|
||||
CTSA9EnableChBx_Click(sender, e)
|
||||
End Sub
|
||||
|
||||
Private Sub CTSA10InclinazioneTxBx_TextChanged(sender As Object, e As TextChangedEventArgs) Handles CTSA10InclinazioneTxBx.TextChanged
|
||||
If CTSA10InclinazioneTxBx.Text <> "-" Then
|
||||
Dim dAng As Double : If Not StringToLen(CTSA10InclinazioneTxBx.Text, dAng) Then CTSA10InclinazioneTxBx.Text = ""
|
||||
Dim dAng As Double : If Not StringToDouble(CTSA10InclinazioneTxBx.Text, dAng) Then CTSA10InclinazioneTxBx.Text = ""
|
||||
End If
|
||||
CTSA10EnableChBx_Click(sender, e)
|
||||
End Sub
|
||||
@@ -1237,6 +1304,8 @@ Public Class OptionsPageUC
|
||||
End If
|
||||
Try
|
||||
Using zip As New Ionic.Zip.ZipFile(sZipToCreate, Console.Out)
|
||||
zip.AlternateEncodingUsage = Ionic.Zip.ZipOption.Always
|
||||
zip.AlternateEncoding = Text.Encoding.UTF8
|
||||
' aggiungo file macchine
|
||||
For Each sMachineName As String In Machines
|
||||
Dim sMachineDir As String = m_MainWindow.GetMachinesRootDir() & "\" & sMachineName
|
||||
|
||||
@@ -7,79 +7,87 @@
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="853.3" d:DesignWidth="1280"
|
||||
Initialized="CurrentProjectPage_Initialized" Loaded="CurrentProjectPage_Loaded">
|
||||
|
||||
<!-- Definizione della CurrentProjectPage -->
|
||||
<Grid Name="CurrentProjectPageGrid" >
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="3*"/>
|
||||
<ColumnDefinition Width="12*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="8*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<!-- Definizione della Grid superiore -->
|
||||
<Grid Name="UpperButtonGrid" Grid.Column="1" Grid.Row="0" >
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="5*"/>
|
||||
<ColumnDefinition Width="7*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
</Grid>
|
||||
|
||||
<!-- Definizione della Grid laterale -->
|
||||
<Grid Grid.RowSpan="3">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="2*"/>
|
||||
<RowDefinition Height="7*"/>
|
||||
<!-- Definizione della CurrentProjectPage -->
|
||||
<Grid Name="CurrentProjectPageGrid" >
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="3*"/>
|
||||
<ColumnDefinition Width="12*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<RowDefinition Height="8*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<!-- Definizione della Grid con le caratteristiche del progetto -->
|
||||
<!-- Definizione della Grid superiore -->
|
||||
<Grid Name="UpperButtonGrid" Grid.Column="1" Grid.Row="0" >
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="5*"/>
|
||||
<ColumnDefinition Width="7*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
</Grid>
|
||||
|
||||
<!-- Definizione della Grid laterale -->
|
||||
<Grid Grid.RowSpan="3">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="2*"/>
|
||||
<RowDefinition Height="7*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<!-- Definizione della Grid con le caratteristiche del progetto -->
|
||||
<Border Name="CurrProjGrid" Style="{DynamicResource OmagCut_MachiningBorder}" Grid.Row="0" >
|
||||
<Grid >
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="0.2*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<TextBlock Name="MaterialTxBl" Grid.Row="0"
|
||||
Style="{DynamicResource OmagCut_CurrProjSummeryTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="MaterialTxBx" Grid.Column="1" Grid.Row="0" Width="100"
|
||||
Style="{DynamicResource OmagCut_FixedTextBox}"/>
|
||||
<TextBlock Name="HeightTxBl" Grid.Row="1"
|
||||
Style="{DynamicResource OmagCut_CurrProjSummeryTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="HeightTxBx" Grid.Column="1" Grid.Row="1" Width="100"
|
||||
<Image Name="MaterialTxBl"
|
||||
Source="{DynamicResource RawPartImg}" Style="{StaticResource OmagCut_TextIcon}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="MaterialTxBx" Grid.Column="1" Grid.Row="0" Margin="0,0,10,0"
|
||||
TextAlignment="Right" Style="{DynamicResource OmagCut_FixedTextBox}"/>
|
||||
<Image Name="HeightTxBl" Grid.Row="1"
|
||||
Source="{DynamicResource RawHeightImg}" Style="{StaticResource OmagCut_TextIcon}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="HeightTxBx" Grid.Column="1" Grid.Row="1" Margin="0,0,10,0"
|
||||
Style="{DynamicResource OmagCut_FixedTextBox}" TextAlignment="Right"/>
|
||||
<Image Name="ToolTxBl" Grid.Row="2"
|
||||
Source="{DynamicResource DB-utensiliImg}" Style="{StaticResource OmagCut_TextIcon}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="ToolTxBx" Grid.Column="1" Grid.Row="2" Margin="0,0,10,0"
|
||||
Style="{DynamicResource OmagCut_FixedTextBox}" TextAlignment="Right"/>
|
||||
<Image Name="MachiningTxBl" Grid.Row="3"
|
||||
Source="{DynamicResource DB-lavorazioniImg}" Style="{StaticResource OmagCut_TextIcon}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="MachiningTxBx" Grid.Column="1" Grid.Row="3" Margin="0,0,10,0"
|
||||
Style="{DynamicResource OmagCut_FixedTextBox}" TextAlignment="Right"/>
|
||||
<TextBlock Name="ToolTxBl" Grid.Row="2" Style="{DynamicResource OmagCut_CurrProjSummeryTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="ToolTxBx" Grid.Column="1" Grid.Row="2" Width="100"
|
||||
Style="{DynamicResource OmagCut_FixedTextBox}"/>
|
||||
<TextBlock Name="MachiningTxBl" Grid.Row="3"
|
||||
Style="{DynamicResource OmagCut_CurrProjSummeryTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="MachiningTxBx" Grid.Column="1" Grid.Row="3" Width="100"
|
||||
Style="{DynamicResource OmagCut_FixedTextBox}"/>
|
||||
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
||||
</Border>
|
||||
</Border>
|
||||
|
||||
<ProgressBar Name="PhotoProgress" Grid.Row="2" Height="50" Margin="10,0,10,0" Minimum="0" Maximum="100"/>
|
||||
|
||||
<ProgressBar Name="PhotoProgress" Grid.Row="2" Height="50" Margin="10,0,10,0" Minimum="0" Maximum="100"/>
|
||||
|
||||
<Border Name="OutMessageBrd" Grid.Row="2" >
|
||||
<TextBlock Name="OutMessageTxBl" TextAlignment="Center"
|
||||
<Border Name="OutMessageBrd" Grid.Row="2" >
|
||||
<TextBlock Name="OutMessageTxBl" TextAlignment="Center"
|
||||
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</Border>
|
||||
</Border>
|
||||
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
||||
</Grid>
|
||||
<Grid Name="SceneHostGrid" Grid.Row="1" Grid.Column="1">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="6*"/>
|
||||
<ColumnDefinition Width="1.2*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
</Grid>
|
||||
|
||||
</Grid>
|
||||
|
||||
</UserControl>
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
Imports System.IO
|
||||
Imports System.Security.Cryptography
|
||||
Imports System.Windows.Interop
|
||||
Imports EgtUILib
|
||||
Imports EgtWPFLib
|
||||
@@ -7,8 +8,10 @@ Imports EgtWPFLib5
|
||||
Public Class CurrentProjectPageUC
|
||||
' Dichiarazione eventi
|
||||
Friend Event OnMouseDownScene(sender As Object, e As System.Windows.Forms.MouseEventArgs)
|
||||
Friend Event OnMouseDownScene_DoubleClick(sender As Object, e As System.Windows.Forms.MouseEventArgs)
|
||||
Friend Event OnMouseMoveScene(sender As Object, e As System.Windows.Forms.MouseEventArgs)
|
||||
Friend Event OnMouseUpScene(sender As Object, e As System.Windows.Forms.MouseEventArgs)
|
||||
Friend Event OnKeyCancelDownScene(sender As Object, e As System.Windows.Forms.KeyEventArgs)
|
||||
' Riferimento alla MainWindow
|
||||
Private m_MainWindow As MainWindow = DirectCast(Application.Current.MainWindow, MainWindow)
|
||||
' Dichiarazione delle Page UserControl
|
||||
@@ -17,7 +20,8 @@ Public Class CurrentProjectPageUC
|
||||
Private m_bFirst As Boolean = True
|
||||
' Dichiarazione Scene
|
||||
Friend WithEvents CurrentProjectScene As New Scene
|
||||
Private CurrentProjectSceneHost As New System.Windows.Forms.Integration.WindowsFormsHost
|
||||
' Nella pagina Nest gestisco la dimensione della scena per visualizzare la lista dei parcheggi
|
||||
Public CurrentProjectSceneHost As New System.Windows.Forms.Integration.WindowsFormsHost
|
||||
' Identificativo progetto corrente
|
||||
Private m_nCurrProj As Integer = 0
|
||||
' Dati del grezzo
|
||||
@@ -53,15 +57,17 @@ Public Class CurrentProjectPageUC
|
||||
|
||||
'Assegnazione scena all'host e posizionamento nella PlacePageGrid
|
||||
CurrentProjectSceneHost.Child = CurrentProjectScene
|
||||
CurrentProjectSceneHost.SetValue(Grid.ColumnProperty, 1)
|
||||
CurrentProjectSceneHost.SetValue(Grid.RowProperty, 1)
|
||||
Me.CurrentProjectPageGrid.Children.Add(CurrentProjectSceneHost)
|
||||
CurrentProjectSceneHost.SetValue(Grid.ColumnProperty, 0)
|
||||
CurrentProjectSceneHost.SetValue(Grid.ColumnSpanProperty, 2)
|
||||
' CurrentProjectSceneHost.SetValue(Grid.RowProperty, 1)
|
||||
'Me.CurrentProjectPageGrid.Children.Add(CurrentProjectSceneHost)
|
||||
Me.SceneHostGrid.Children.Add(CurrentProjectSceneHost)
|
||||
|
||||
'Imposto i messaggi letti dal file dei messaggi
|
||||
MaterialTxBl.Text = EgtMsg(MSG_RAWPARTPAGEUC + 9) 'Material - Materiale
|
||||
HeightTxBl.Text = EgtMsg(MSG_RAWPARTPAGEUC + 5) 'Height - Spessore
|
||||
ToolTxBl.Text = EgtMsg(MSG_CADCUTPAGEUC + 11) 'Tool - Utensile
|
||||
MachiningTxBl.Text = EgtMsg(MSG_CADCUTPAGEUC + 12) 'Machining - Lavorazione
|
||||
'Imposto i messaggi letti dal file dei messaggi
|
||||
MaterialTxBl.ToolTip = EgtMsg(MSG_RAWPARTPAGEUC + 9) 'Material - Materiale
|
||||
HeightTxBl.ToolTip = EgtMsg(MSG_RAWPARTPAGEUC + 5) 'Height - Spessore
|
||||
ToolTxBl.ToolTip = EgtMsg(MSG_CADCUTPAGEUC + 11) 'Tool - Utensile
|
||||
MachiningTxBl.ToolTip = EgtMsg(MSG_CADCUTPAGEUC + 12) 'Machining - Lavorazione
|
||||
|
||||
End Sub
|
||||
|
||||
@@ -107,7 +113,7 @@ Public Class CurrentProjectPageUC
|
||||
Dim nDepthBits As Integer = GetPrivateProfileInt(S_OPENGL, K_DEPTHBITS, 32, m_MainWindow.GetIniFile())
|
||||
CurrentProjectScene.SetViewAttributes(nDriver, b2Buff, nColorBits, nDepthBits)
|
||||
' inizializzo la scena (DB geometrico + visualizzazione) e verifico presenza chiave
|
||||
Dim bProd As Boolean = m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.CUT_BASE)
|
||||
Dim bProd As Boolean = m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.CUT_BASE) Or m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.CUT_LIGHT)
|
||||
If Not CurrentProjectScene.Init() Or Not bProd Then
|
||||
' Rimuovo l'host della scena perchè altrimenti rimarrebbe il buco!!
|
||||
Me.CurrentProjectPageGrid.Children.Remove(CurrentProjectSceneHost)
|
||||
@@ -118,11 +124,25 @@ Public Class CurrentProjectPageUC
|
||||
#Else
|
||||
' Se manca la chiave
|
||||
If m_MainWindow.GetKeyLevel() = -1 Or m_MainWindow.GetKeyLevel() = -2 Then
|
||||
EgtOutLog("Missing Dongle")
|
||||
' Box di avviso chiave mancante : "Chiave non presente. \n Inserirla e riavviare il programma." "Errore"
|
||||
Dim sText As String = EgtMsg(MSG_MISSINGKEYWD + 2) & vbCrLf & EgtMsg(MSG_MISSINGKEYWD + 3)
|
||||
Dim sTitle As String = EgtMsg(MSG_MISSINGKEYWD + 1)
|
||||
Dim MissingKeyWnd As New EgtMsgBox(m_MainWindow, EgtMsg(MSG_MISSINGKEYWD + 1), EgtMsg(MSG_MISSINGKEYWD + 2) & " " & EgtMsg(MSG_MISSINGKEYWD + 3), EgtMsgBox.Buttons.OK, EgtMsgBox.Icons.NULL)
|
||||
If Not EgtGetNetHwKey() Then
|
||||
EgtOutLog("Missing Dongle")
|
||||
' Box di avviso chiave mancante : "Chiave non presente. \n Inserirla e riavviare il programma." "Errore"
|
||||
Dim sText As String = EgtMsg(MSG_MISSINGKEYWD + 2) & vbCrLf & EgtMsg(MSG_MISSINGKEYWD + 3)
|
||||
Dim sTitle As String = EgtMsg(MSG_MISSINGKEYWD + 1)
|
||||
Dim MissingKeyWnd As New EgtMsgBox(m_MainWindow, EgtMsg(MSG_MISSINGKEYWD + 1), EgtMsg(MSG_MISSINGKEYWD + 2) & " " & EgtMsg(MSG_MISSINGKEYWD + 3), EgtMsgBox.Buttons.OK, EgtMsgBox.Icons.NULL)
|
||||
Else
|
||||
EgtOutLog("NetDongle is full")
|
||||
' Box di avviso slot chiave di rete occupato : "Chiave di Rete completamente occupata. \n Uscire dal programma su un altro PC." "Errore"
|
||||
Dim sText As String = EgtMsg(10110) & vbCrLf & EgtMsg(10111)
|
||||
Dim sTitle As String = EgtMsg(10101)
|
||||
Dim MissingKeyWnd As New EgtMsgBox(m_MainWindow, sTitle, sText, EgtMsgBox.Buttons.OK, EgtMsgBox.Icons.NULL)
|
||||
End If
|
||||
ElseIf m_MainWindow.GetKeyLevel() = -9 Then
|
||||
EgtOutLog("Missing Link with Net Dongle")
|
||||
' Box di avviso chiave mancante : "Collegamento con la Chiave di rete non riuscito. \n Verificare la connessione." "Errore"
|
||||
Dim sText As String = EgtMsg(10108) & vbCrLf & EgtMsg(10109)
|
||||
Dim sTitle As String = EgtMsg(10101)
|
||||
Dim MissingKeyWnd As New EgtMsgBox(m_MainWindow, sTitle, sText, EgtMsgBox.Buttons.OK, EgtMsgBox.Icons.NULL)
|
||||
' Altrimenti manca la licenza
|
||||
Else
|
||||
EgtOutLog("Problems with Licence")
|
||||
@@ -176,7 +196,8 @@ Public Class CurrentProjectPageUC
|
||||
' Inizializzo gestore lavorazioni
|
||||
EgtInitMachMgr(m_MainWindow.GetMachinesRootDir(), m_MainWindow.GetToolMakersDir())
|
||||
m_bFirst = False
|
||||
|
||||
Dim bOrtoGraphic As Boolean = (GetPrivateProfileInt(S_SCENE, K_ORTOGRAPHIC, 1, m_MainWindow.GetIniFile()) <> 0)
|
||||
EgtSetCameraType(bOrtoGraphic, True)
|
||||
' creo nuovo progetto
|
||||
m_nCurrProj = GetPrivateProfileInt(S_GENERAL, K_LASTPROJ, 0, m_MainWindow.GetIniFile())
|
||||
'NewProject()
|
||||
@@ -196,9 +217,17 @@ Public Class CurrentProjectPageUC
|
||||
Else
|
||||
MaterialTxBx.Text = "-----"
|
||||
End If
|
||||
' Visualizzo lama e lavorazione correnti
|
||||
ToolTxBx.Text = m_MainWindow.m_CurrentMachine.sCurrSaw
|
||||
MachiningTxBx.Text = m_MainWindow.m_CurrentMachine.sCurrSawing
|
||||
|
||||
' se macchina waterjet e senza una lama corrente impostata allora visualizzo info WJ
|
||||
If m_MainWindow.m_CurrentMachine.bWaterJet And String.IsNullOrEmpty(m_MainWindow.m_CurrentMachine.sCurrSaw) Then
|
||||
ToolTxBx.Text = m_MainWindow.m_CurrentMachine.sCurrWaterJet
|
||||
MachiningTxBx.Text = m_MainWindow.m_CurrentMachine.sCurrWaterJetting
|
||||
'& "-" & m_MainWindow.m_CurrentMachine.sCurrWaterJettingQuality
|
||||
Else
|
||||
ToolTxBx.Text = m_MainWindow.m_CurrentMachine.sCurrSaw
|
||||
MachiningTxBx.Text = m_MainWindow.m_CurrentMachine.sCurrSawing
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Public Sub StartProgram()
|
||||
@@ -276,7 +305,7 @@ Public Class CurrentProjectPageUC
|
||||
' se apro la finestra "OpenFolder" l'assegnazione dei Children è fatta direttamente nella classe ProjectMgrUC
|
||||
If MyStartLancherWD.CurrSelection <> MODE_LAUNCHER.OpenFolder Then
|
||||
' Carico sottopagina opportuna
|
||||
If GetProjectType() <> PRJ_TYPE.FRAMES Then
|
||||
If GetProjectType() <> PRJ_TYPE.FRAMES And Not m_MainWindow.m_OnlyFrame Then
|
||||
CurrentProjectPageGrid.Children.Add(m_MainWindow.m_CadCutPageUC)
|
||||
m_MainWindow.m_ActivePage = MainWindow.Pages.CadCut
|
||||
m_MainWindow.CadCutBtn.IsChecked = True
|
||||
@@ -314,6 +343,10 @@ Public Class CurrentProjectPageUC
|
||||
RaiseEvent OnMouseDownScene(sender, e)
|
||||
End Sub
|
||||
|
||||
Private Sub OnMyMouseDownScene_DoubleClick(sender As Object, e As System.Windows.Forms.MouseEventArgs) Handles CurrentProjectScene.MouseDoubleClick
|
||||
RaiseEvent OnMouseDownScene_DoubleClick(sender, e)
|
||||
End Sub
|
||||
|
||||
Private Sub OnMyMouseMoveScene(sender As Object, e As System.Windows.Forms.MouseEventArgs) Handles CurrentProjectScene.OnMouseMoveScene
|
||||
RaiseEvent OnMouseMoveScene(sender, e)
|
||||
End Sub
|
||||
@@ -326,6 +359,10 @@ Public Class CurrentProjectPageUC
|
||||
SetInfoMessage(DistToString(vtDist))
|
||||
End Sub
|
||||
|
||||
Private Sub OnMyKeyCancelDownScene(sender As Object, e As System.Windows.Forms.KeyEventArgs) Handles CurrentProjectScene.KeyDown
|
||||
RaiseEvent OnKeyCancelDownScene(sender, e)
|
||||
End Sub
|
||||
|
||||
' Gestione progetto
|
||||
|
||||
Friend Sub SetNextProjectIndex()
|
||||
@@ -399,25 +436,44 @@ Public Class CurrentProjectPageUC
|
||||
' prima di parcheggiare svuoto dei pezzi in parcheggio sia vuota
|
||||
m_MainWindow.m_CadCutPageUC.m_NestPage.ResetListOfGruopInPark()
|
||||
' Parcheggio correttamente i pezzi precedentemente salvati
|
||||
Dim nIdList As New List(Of Integer)
|
||||
Dim nStatList As New List(Of Integer)
|
||||
Dim nId2 As Integer = EgtGetFirstPart()
|
||||
While nId2 <> GDB_ID.NULL
|
||||
' Forzo lo stato per avere il giusto calcolo delle posizioni per evitare sovrapposizioni
|
||||
EgtSetStatus(nId2, GDB_ST.ON_)
|
||||
' Inserisco correttamente in parcheggio
|
||||
m_MainWindow.m_CadCutPageUC.m_NestPage.StoreOnePart(nId2, True)
|
||||
' Aggiorno lo stato di visualizzazione
|
||||
Dim nInfoStatus As Integer = 1
|
||||
' Salvo lo stato (per gestire la navigazione)
|
||||
EgtGetInfo(nId2, INFO_PARKSTATUS, nInfoStatus)
|
||||
' Salvo l'Id e lo stato da impostare successivamente al posizionamento
|
||||
nIdList.Add(nId2)
|
||||
nStatList.Add(nInfoStatus)
|
||||
' Notifica a WeinMatching per modifica Id
|
||||
VeinMatching.UpdatePart(nId2)
|
||||
' Passo al pezzo successivo
|
||||
nId2 = EgtGetNextPart(nId2)
|
||||
End While
|
||||
For IndIndex As Integer = 0 To nIdList.Count - 1
|
||||
EgtSetStatus(nIdList(IndIndex), nStatList(IndIndex))
|
||||
Next
|
||||
' Aggiorno Aree totale e da lavorare dei pezzi
|
||||
SetTotalArea(dTotArea)
|
||||
UpdateToProduceArea()
|
||||
ShowAreas()
|
||||
' Salvo info di C home
|
||||
Dim dCHome As Double
|
||||
EgtGetAxisHomePos("C", dCHome)
|
||||
EgtSetInfo(EgtGetFirstNameInGroup(GDB_ID.ROOT, NAME_PROJMARK), INFO_CAXESHOME, DoubleToString(dCHome, 0))
|
||||
EgtZoom(ZM.ALL)
|
||||
' Dichiaro progetto non modificato
|
||||
EgtResetModified()
|
||||
Return True
|
||||
End Function
|
||||
|
||||
Friend Function AdjustAdditionalTable( Optional bForced As Boolean = False) As Boolean
|
||||
Friend Function AdjustAdditionalTable(Optional bForced As Boolean = False) As Boolean
|
||||
' Recupero altezza sottotavola corrente
|
||||
Dim nFixtId As Integer = EgtGetFirstNameInGroup(EgtGetFirstMachGroup(), MACH_FIXT_GROUP)
|
||||
Dim nAddTabId As Integer = EgtGetFirstNameInGroup(nFixtId, MACH_ADD_TABLE)
|
||||
@@ -429,7 +485,10 @@ 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 Or bForced Then
|
||||
Dim bChanged As Boolean = (Math.Abs(dDeltaZ) > EPS_SMALL)
|
||||
If bChanged Or bForced Then
|
||||
Dim bOldEnMod As Boolean = EgtGetEnableModified()
|
||||
If Not bChanged AndAlso bOldEnMod Then EgtDisableModified()
|
||||
AddAdditionalTable()
|
||||
UpdateAllRawsZ(dDeltaZ)
|
||||
If GetPhoto() <> GDB_ID.NULL Then
|
||||
@@ -439,12 +498,13 @@ Public Class CurrentProjectPageUC
|
||||
ShowPhoto(False)
|
||||
Dim nRawGrpId As Integer = EgtGetFirstRawPart()
|
||||
While nRawGrpId <> GDB_ID.NULL
|
||||
Dim nRawSolidId As Integer = EgtGetFirstNameInGroup( nRawGrpId, NAME_RAW_SOLID)
|
||||
If nRawSolidId <> GDB_ID.NULL Then EgtSetTextureName( nRawSolidId, PHOTO_NAME)
|
||||
nRawGrpId = EgtGetNextRawPart( nRawGrpId)
|
||||
Dim nRawSolidId As Integer = EgtGetFirstNameInGroup(nRawGrpId, NAME_RAW_SOLID)
|
||||
If nRawSolidId <> GDB_ID.NULL Then EgtSetTextureName(nRawSolidId, PHOTO_NAME)
|
||||
nRawGrpId = EgtGetNextRawPart(nRawGrpId)
|
||||
End While
|
||||
End If
|
||||
End If
|
||||
If Not bChanged AndAlso bOldEnMod Then EgtEnableModified()
|
||||
End If
|
||||
Return True
|
||||
End Function
|
||||
@@ -464,12 +524,14 @@ Public Class CurrentProjectPageUC
|
||||
' Nuova geometria
|
||||
Dim nAddTabId As Integer = GDB_ID.NULL
|
||||
' Se esiste geometria di riferimento
|
||||
Dim nRefAddTabId = EgtGetFirstNameInGroup( EgtGetFirstNameInGroup( EgtGetTableId( MAIN_TAB), "SOLID"), MACH_ADD_TABLE)
|
||||
Dim sNameTable As String = MAIN_TAB
|
||||
EgtGetTableName(sNameTable)
|
||||
Dim nRefAddTabId = EgtGetFirstNameInGroup(EgtGetFirstNameInGroup(EgtGetTableId(sNameTable), "SOLID"), MACH_ADD_TABLE)
|
||||
If nRefAddTabId <> GDB_ID.NULL Then
|
||||
nAddTabId = EgtCopyGlob( nRefAddTabId, nFixtId)
|
||||
EgtSetStatus( nAddTabId, GDB_ST.ON_)
|
||||
EgtScale( nAddTabId, new Frame3d( ptMin), 1, 1, dAddTable / 10)
|
||||
' altrimenti la creo
|
||||
nAddTabId = EgtCopyGlob(nRefAddTabId, nFixtId)
|
||||
EgtSetStatus(nAddTabId, GDB_ST.ON_)
|
||||
EgtScale(nAddTabId, New Frame3d(ptMin), 1, 1, dAddTable / 10)
|
||||
' altrimenti la creo
|
||||
Else
|
||||
' Aggiungo sovratavola nel gruppo dei bloccaggi
|
||||
ptMax.z -= DELTAZ_ADDTAB
|
||||
@@ -480,7 +542,7 @@ Public Class CurrentProjectPageUC
|
||||
' Sistemazioni finali
|
||||
If nAddTabId = GDB_ID.NULL Then Return False
|
||||
EgtSetName(nAddTabId, MACH_ADD_TABLE)
|
||||
EgtSetColor(nAddTabId, New Color3d(150, 75, 0, 100), True)
|
||||
If nRefAddTabId = GDB_ID.NULL Then EgtSetColor(nAddTabId, New Color3d(150, 75, 0, 100), True)
|
||||
EgtSetInfo(nAddTabId, KEY_ADD_TABLE, dAddTable)
|
||||
Return True
|
||||
End Function
|
||||
@@ -522,7 +584,24 @@ Public Class CurrentProjectPageUC
|
||||
m_MainWindow.m_CurrentMachine.dAdditionalTable = dValue
|
||||
End If
|
||||
' forzo visualizzazione eventuali dati su aree
|
||||
SetAreasStatus( True)
|
||||
SetAreasStatus(True)
|
||||
' Recupero info C Home
|
||||
Dim dCHomeCurrMach As Double
|
||||
Dim dCHomeCurrproj As Double
|
||||
EgtGetAxisHomePos("C", dCHomeCurrMach)
|
||||
' Verifico che esista l'info del progetto
|
||||
If EgtExistsInfo(EgtGetFirstNameInGroup(GDB_ID.ROOT, NAME_PROJMARK), INFO_CAXESHOME) Then
|
||||
EgtGetInfo(EgtGetFirstNameInGroup(GDB_ID.ROOT, NAME_PROJMARK), INFO_CAXESHOME, dCHomeCurrproj)
|
||||
' Se la macchina indicata ha C Home differente allora comunico un errore del progetto
|
||||
If Math.Abs(dCHomeCurrproj - dCHomeCurrMach) > EPS_ANG_SMALL Then
|
||||
EgtOutLog(" WARNING -> C axes home project is different from current machine, delta ang C home:" & DoubleToString(dCHomeCurrproj - dCHomeCurrMach, 2))
|
||||
End If
|
||||
Else
|
||||
EgtSetInfo(EgtGetFirstNameInGroup(GDB_ID.ROOT, NAME_PROJMARK), INFO_CAXESHOME, DoubleToString(dCHomeCurrMach, 0))
|
||||
End If
|
||||
|
||||
'SelParkIndWD.UpdateViewOnParkInd(False)
|
||||
|
||||
' Dichiaro progetto non modificato
|
||||
EgtResetModified()
|
||||
Return True
|
||||
@@ -547,8 +626,8 @@ Public Class CurrentProjectPageUC
|
||||
End If
|
||||
' Se la macchina del file è quella impostata
|
||||
If String.Compare(sFileMachine, m_MainWindow.GetCurrMachine(), True) = 0 Then
|
||||
AdjustAdditionalTable( True)
|
||||
' altrimenti avverto, porto i pezzi in parcheggio e cancello il grezzo
|
||||
AdjustAdditionalTable(True)
|
||||
' altrimenti avverto, porto i pezzi in parcheggio e cancello il grezzo
|
||||
Else
|
||||
' Emetto messaggio
|
||||
Dim sOut As String = EgtMsg(90320) & " (" & sFileMachine & ")" ' Macchina diversa
|
||||
@@ -698,6 +777,17 @@ Public Class CurrentProjectPageUC
|
||||
' Notifico a foto il cambio di path
|
||||
EgtChangePhotoPath(nPhotoId, sNewPhoto)
|
||||
End If
|
||||
|
||||
'--------------------------------------------------------------------------------
|
||||
If GetPrivateProfileInt(S_GENERAL, K_ENABLEDXFPARK, 0, m_MainWindow.GetIniFile) <> 0 Then
|
||||
' Gestione visulizzazione lista pezzi in parcheggio
|
||||
Dim sNewFileName As String = SelParkIndWD.GetPathCurrProj()
|
||||
SelParkIndWD.CopyImgSvg(sPath, Nothing)
|
||||
SelParkIndWD.sActualProj = String.Empty
|
||||
SelParkIndWD.CopyImgSvg(sNewFileName, Nothing)
|
||||
End If
|
||||
'--------------------------------------------------------------------------------
|
||||
|
||||
' Se assente, inserisco contrassegno di progetto OmagCut valido
|
||||
AddProjectMark()
|
||||
' Eseguo
|
||||
@@ -708,18 +798,20 @@ Public Class CurrentProjectPageUC
|
||||
m_MruFiles.Add(sPath)
|
||||
' Dichiaro progetto non modificato
|
||||
EgtResetModified()
|
||||
|
||||
EgtOutLog("PROJECT " & CurrProjName & " SAVED")
|
||||
Return True
|
||||
End Function
|
||||
|
||||
Friend Function ExportProject( sPath As String) As Boolean
|
||||
Friend Function ExportProject(sPath As String) As Boolean
|
||||
' Copio eventuale fotografia
|
||||
Dim nPhotoId As Integer = GetPhoto()
|
||||
If nPhotoId <> GDB_ID.NULL Then
|
||||
' Path originale
|
||||
Dim sPhoto As String = String.Empty
|
||||
EgtGetPhotoPath( nPhotoId, sPhoto)
|
||||
EgtGetPhotoPath(nPhotoId, sPhoto)
|
||||
' Nuova path
|
||||
Dim sNewPhoto As String = Path.ChangeExtension( sPath, Path.GetExtension( sPhoto))
|
||||
Dim sNewPhoto As String = Path.ChangeExtension(sPath, Path.GetExtension(sPhoto))
|
||||
' Se diverse, eseguo copia
|
||||
If Not String.Equals(sPhoto, sNewPhoto, StringComparison.InvariantCultureIgnoreCase) Then
|
||||
Try
|
||||
@@ -734,7 +826,7 @@ Public Class CurrentProjectPageUC
|
||||
' Se assente, inserisco contrassegno di progetto OmagCut valido
|
||||
AddProjectMark()
|
||||
' Eseguo copia
|
||||
Return SaveFile( sPath)
|
||||
Return SaveFile(sPath)
|
||||
End Function
|
||||
|
||||
Friend Function GetCurrentProject() As Integer
|
||||
@@ -821,7 +913,7 @@ Public Class CurrentProjectPageUC
|
||||
EgtSetName(nMarkId, NAME_PROJMARK)
|
||||
EgtSetLevel(nMarkId, GDB_LV.SYSTEM)
|
||||
EgtSetInfo(nMarkId, INFO_REDUCEDCUT, nReducedCut)
|
||||
' altrimenti, aggiorno il flag dei tagli ridotti
|
||||
' altrimenti, aggiorno il flag dei tagli ridotti
|
||||
Else
|
||||
Dim nMarkReducedCut As Integer = 0
|
||||
If Not EgtGetInfo(nMarkId, INFO_REDUCEDCUT, nMarkReducedCut) OrElse nMarkReducedCut <> nReducedCut Then
|
||||
@@ -977,10 +1069,16 @@ Public Class CurrentProjectPageUC
|
||||
End Sub
|
||||
|
||||
Friend Sub UpdateMachiningTxBx()
|
||||
MachiningTxBx.Text = m_MainWindow.m_CurrentMachine.sCurrSawing
|
||||
' se macchina waterjet e senza uscita lama allora visualizzo info WJ
|
||||
If m_MainWindow.m_CurrentMachine.bWaterJet And EgtGetHeadId("H1") = GDB_ID.NULL Then
|
||||
MachiningTxBx.Text = m_MainWindow.m_CurrentMachine.sCurrWaterJetting
|
||||
'& "-" & m_MainWindow.m_CurrentMachine.sCurrWaterJettingQuality
|
||||
Else
|
||||
MachiningTxBx.Text = m_MainWindow.m_CurrentMachine.sCurrSawing
|
||||
End If
|
||||
End Sub
|
||||
|
||||
' Gestione fotografia della lastra (compreso riconoscimento contorno)
|
||||
' Gestione fotografia della lastra (compreso riconoscimento contorno)
|
||||
|
||||
Friend Function LoadPhoto(sPath As String) As Boolean
|
||||
' Verifico esistenza file immagine
|
||||
@@ -1274,23 +1372,23 @@ Public Class CurrentProjectPageUC
|
||||
|
||||
' Gestione area pezzi totale e area pezzi da produrre
|
||||
|
||||
Friend Function SetTotalArea( dTotArea As Double) As Boolean
|
||||
Friend Function SetTotalArea(dTotArea As Double) As Boolean
|
||||
Dim nMarkId As Integer = AddProjectMark()
|
||||
Return EgtSetInfo(nMarkId, INFO_TOTAREA, dTotArea)
|
||||
End Function
|
||||
|
||||
Friend Function UpdateTotalArea( dNewArea As Double) As Boolean
|
||||
Friend Function UpdateTotalArea(dNewArea As Double) As Boolean
|
||||
Dim nMarkId As Integer = AddProjectMark()
|
||||
Dim dTotArea As Double = 0
|
||||
EgtGetInfo( nMarkId, INFO_TOTAREA, dTotArea)
|
||||
dTotArea = Math.Max( dTotArea + dNewArea, 0)
|
||||
EgtGetInfo(nMarkId, INFO_TOTAREA, dTotArea)
|
||||
dTotArea = Math.Max(dTotArea + dNewArea, 0)
|
||||
Return EgtSetInfo(nMarkId, INFO_TOTAREA, dTotArea)
|
||||
End Function
|
||||
|
||||
Friend Function GetTotalArea() As Double
|
||||
Dim nMarkId As Integer = AddProjectMark()
|
||||
Dim dTotArea As Double = 0
|
||||
EgtGetInfo( nMarkId, INFO_TOTAREA, dTotArea)
|
||||
EgtGetInfo(nMarkId, INFO_TOTAREA, dTotArea)
|
||||
Return dTotArea
|
||||
End Function
|
||||
|
||||
@@ -1298,17 +1396,17 @@ Public Class CurrentProjectPageUC
|
||||
Dim dToProdArea As Double = 0
|
||||
' Se programma non ancora inviato al CN, ciclo sui pezzi nella lastra
|
||||
If GetProjectNcProgSent() = 0 Then
|
||||
Dim nPartInRawId As Integer = EgtGetFirstPartInRawPart( CamAuto.GetCurrentRaw())
|
||||
Dim nPartInRawId As Integer = EgtGetFirstPartInRawPart(CamAuto.GetCurrentRaw())
|
||||
While nPartInRawId <> GDB_ID.NULL
|
||||
dToProdArea += GeomCalc.GetPartArea( nPartInRawId)
|
||||
nPartInRawId = EgtGetNextPartInRawPart( nPartInRawId)
|
||||
dToProdArea += GeomCalc.GetPartArea(nPartInRawId)
|
||||
nPartInRawId = EgtGetNextPartInRawPart(nPartInRawId)
|
||||
End While
|
||||
End If
|
||||
' Ciclo sui pezzi in parcheggio
|
||||
Dim nPartId As Integer = EgtGetFirstPart()
|
||||
While nPartId <> GDB_ID.NULL
|
||||
dToProdArea += GeomCalc.GetPartArea( nPartId)
|
||||
nPartId = EgtGetNextPart( nPartId)
|
||||
dToProdArea += GeomCalc.GetPartArea(nPartId)
|
||||
nPartId = EgtGetNextPart(nPartId)
|
||||
End While
|
||||
Dim nMarkId As Integer = AddProjectMark()
|
||||
Return EgtSetInfo(nMarkId, INFO_TOPRODAREA, dToProdArea)
|
||||
@@ -1317,16 +1415,16 @@ Public Class CurrentProjectPageUC
|
||||
Friend Function GetToProduceArea() As Double
|
||||
Dim nMarkId As Integer = AddProjectMark()
|
||||
Dim dToProdArea As Double = 0
|
||||
EgtGetInfo( nMarkId, INFO_TOPRODAREA, dToProdArea)
|
||||
EgtGetInfo(nMarkId, INFO_TOPRODAREA, dToProdArea)
|
||||
Return dToProdArea
|
||||
End Function
|
||||
|
||||
Friend Sub ShowAreas()
|
||||
' Recupero il gruppo di Mark e lo svuoto
|
||||
Dim nMarkId As Integer = AddProjectMark()
|
||||
EgtEmptyGroup( nMarkId)
|
||||
EgtEmptyGroup(nMarkId)
|
||||
' Se non sono da visualizzare esco
|
||||
if GetPrivateProfileInt( S_STATISTICS, K_SHOWAREAS, 0, m_MainWindow.GetMachIniFile()) = 0 Then Return
|
||||
If GetPrivateProfileInt(S_STATISTICS, K_SHOWAREAS, 0, m_MainWindow.GetMachIniFile()) = 0 Then Return
|
||||
' Recupero dati
|
||||
Dim dTotArea As Double = GetTotalArea()
|
||||
Dim dToProdArea As Double = GetToProduceArea()
|
||||
@@ -1338,23 +1436,29 @@ Public Class CurrentProjectPageUC
|
||||
End If
|
||||
' Scritte
|
||||
Const TEXT_DIST As Double = 100
|
||||
Dim ptIns As New Point3d( b3Tab.Center().x, b3Tab.Max().y + TEXT_DIST, b3Tab.Max().z)
|
||||
Dim ptIns As New Point3d(b3Tab.Center().x, b3Tab.Max().y + TEXT_DIST, b3Tab.Max().z)
|
||||
Dim dCoeff As Double = 1.0 / 1000000.0
|
||||
Dim sUnit As String = " m²"
|
||||
If Not EgtUiUnitsAreMM() Then
|
||||
dCoeff = 1.0 / ( 12 * ONEINCH * 12 * ONEINCH)
|
||||
dCoeff = 1.0 / (12 * ONEINCH * 12 * ONEINCH)
|
||||
sUnit = " ft²"
|
||||
End If
|
||||
Dim sText As String = EgtMsg( 90328) & " " & DoubleToString( dTotArea * dCoeff, 3) & sUnit & " " &
|
||||
EgtMsg( 90329) & " " & DoubleToString( dToProdArea * dCoeff, 3) & sUnit
|
||||
Dim nText As Integer = EgtCreateTextAdv( nMarkId, ptIns, 0, sText, "", 500, False, 100, 1, 0, INS_POS.MC)
|
||||
EgtSetColor( nText, New Color3d( 0, 0, 0))
|
||||
Dim sText As String = EgtMsg(90328) & " " & DoubleToString(dTotArea * dCoeff, 3) & sUnit & " " &
|
||||
EgtMsg(90329) & " " & DoubleToString(dToProdArea * dCoeff, 3) & sUnit
|
||||
Dim nText As Integer = EgtCreateTextAdv(nMarkId, ptIns, 0, sText, "", 500, False, 100, 1, 0, INS_POS.MC)
|
||||
EgtSetColor(nText, New Color3d(0, 0, 0))
|
||||
End Sub
|
||||
|
||||
Friend Sub SetAreasStatus( bShow As Boolean)
|
||||
Friend Sub SetAreasStatus(bShow As Boolean)
|
||||
Dim nMarkId As Integer = EgtGetFirstNameInGroup(GDB_ID.ROOT, NAME_PROJMARK)
|
||||
If nMarkId = GDB_ID.NULL Then Return
|
||||
EgtSetStatus( nMarkId, If( bShow, GDB_ST.ON_, GDB_ST.OFF))
|
||||
|
||||
' Disabilito impostazione modificato
|
||||
Dim bOldEnMod As Boolean = EgtGetEnableModified()
|
||||
If bOldEnMod Then EgtDisableModified()
|
||||
' Cambio stato visualizzazione
|
||||
EgtSetStatus(nMarkId, If(bShow, GDB_ST.ON_, GDB_ST.OFF))
|
||||
' Se necessario riabilito impostazione modificato
|
||||
If bOldEnMod Then EgtEnableModified()
|
||||
End Sub
|
||||
|
||||
' Gestione messaggi in interfaccia
|
||||
@@ -1381,7 +1485,8 @@ Public Class CurrentProjectPageUC
|
||||
|
||||
Friend Sub ClearMessage()
|
||||
OutMessageBrd.Background = Brushes.Transparent
|
||||
OutMessageBrd.Visibility = Windows.Visibility.Hidden
|
||||
OutMessageTxBl.Text = ""
|
||||
'OutMessageBrd.Visibility = Windows.Visibility.Hidden
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user