Compare commits
313 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 3075c2f4af | |||
| 045e7cba61 | |||
| 57d4a29b74 | |||
| b045f0ce7b | |||
| 41767f4f3a | |||
| 85f05f280f | |||
| b4338ef88e | |||
| 9d6236b767 | |||
| d946c39a9d | |||
| 55bd41ca4c | |||
| 5e6208a9c4 | |||
| 29ecd7c780 | |||
| 6ca56d3a12 | |||
| 92196b99e6 | |||
| a3d40c5bc1 | |||
| e25bbc9216 | |||
| b4ef388603 | |||
| aebfb05b94 | |||
| a2b561e944 | |||
| 04a7c05e99 | |||
| 8cc0d88600 | |||
| 5bc49d30b9 | |||
| c30ecc0574 | |||
| f7e9401e15 | |||
| 9a48c3beb3 | |||
| 5032ba4b0b | |||
| 8724afe392 | |||
| 4fc97ddf4f | |||
| 8443739a70 | |||
| 5145accc39 | |||
| 88c674df06 | |||
| fb4cb7d26b | |||
| 083d278283 | |||
| bcfe9f3258 | |||
| 5cdf63a1a3 | |||
| 1c9601c1e6 | |||
| 18c50aa482 | |||
| 85bd57b7ff | |||
| 60570863a3 | |||
| 74013dbd94 | |||
| 9c8971f52b | |||
| 8d020eeea8 | |||
| d0672157a8 | |||
| 340276e11c | |||
| 87a24adaa3 | |||
| 0195d19884 | |||
| c24bb386fc | |||
| 02a9f450fb | |||
| 7caca4f961 | |||
| a23b18e5cb | |||
| ba0987ba3e | |||
| ac809502ed | |||
| eb1f776ed7 | |||
| 69b3db94f5 | |||
| 67da8aa6ed | |||
| 451dbed3b3 | |||
| 697807dd79 | |||
| 90676d05ea | |||
| 8f8f781dee | |||
| 01ced18fad | |||
| 3057c511ed | |||
| 6fef662ce9 | |||
| 5ab9204cda | |||
| c577ad9272 | |||
| 07abfa9b8b | |||
| fd6018c2e6 | |||
| 62475adcc1 | |||
| e08c196c54 | |||
| 0081855b8c | |||
| f7ee580d1f | |||
| a74e6a0f8b | |||
| 7e3b85f7a2 | |||
| 8b9c462814 | |||
| ab8051275b | |||
| 18edeb5ee0 | |||
| 471ba49732 | |||
| fd6e15be1e | |||
| a2bb9e250c | |||
| 2673d51008 | |||
| 1d5cce387f | |||
| 07e5756793 | |||
| e5e80e9a55 | |||
| 233a63b95b | |||
| cd0388b970 | |||
| 135be5f104 | |||
| 2f116ba3fe | |||
| 96ee5b5172 | |||
| b1367d543f | |||
| 484f7eb410 | |||
| c1eb839fe8 | |||
| f3b1d80de7 | |||
| 14b4897575 | |||
| 213a66d916 | |||
| c9c7aeafae | |||
| 07d54499b7 | |||
| 9f266f1c56 | |||
| 0362f77f23 | |||
| fd28e2f971 | |||
| 31264a20a0 | |||
| bee2c44ba7 | |||
| 65652f468c | |||
| 2236eb12c7 | |||
| e48837836b | |||
| d05fe9c6b2 | |||
| 8c8a26b692 | |||
| 0b1a39704c | |||
| 8d1b1adaa9 | |||
| eb881155d9 | |||
| 8c0d5a651d | |||
| 10655893e4 | |||
| ec1af67d5b | |||
| e103aa753f | |||
| ecacf89e93 | |||
| 7e5b813df1 | |||
| 108048b559 | |||
| 0086345f64 | |||
| a5cc976810 | |||
| 5bdc4c46bc | |||
| 6e8154d29a | |||
| c8614fe52d | |||
| f420926e3e | |||
| 794c5da9e6 | |||
| 9d58cec30e | |||
| e54c5f006e | |||
| 4a0a398e9f | |||
| 778219da1e | |||
| 4ac506fbf0 | |||
| 9616e211e5 | |||
| 61b16af746 | |||
| 7d010be835 | |||
| 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 |
+22
-17
@@ -1,9 +1,9 @@
|
||||
<Window x:Class="AboutBoxWD"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
FontFamily="{DynamicResource OmagCut_Font}"
|
||||
Title="AboutBoxWD" Height="469.15" Width="511.8" WindowStyle="None" ResizeMode="NoResize"
|
||||
AllowsTransparency="True" Background="Transparent" ShowInTaskbar="False">
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
FontFamily="{DynamicResource OmagCut_Font}"
|
||||
Title="AboutBoxWD" Height="469.15" Width="511.8" WindowStyle="None" ResizeMode="NoResize"
|
||||
AllowsTransparency="True" Background="Transparent" ShowInTaskbar="False">
|
||||
|
||||
<!-- Definizione dell'AboutBox -->
|
||||
<Border Style="{DynamicResource OmagCut_WindowBorder}">
|
||||
@@ -23,6 +23,7 @@
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.25*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.25*"/>
|
||||
@@ -35,23 +36,27 @@
|
||||
<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"
|
||||
VerticalAlignment="Center" FontSize="18" />
|
||||
VerticalAlignment="Center" FontSize="18" />
|
||||
<TextBlock Name="VersionLbl" Grid.Column="1" Grid.Row="4" HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center" FontSize="18"/>
|
||||
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"
|
||||
VerticalAlignment="Center" FontSize="18"/>
|
||||
<TextBlock Name="ProjectLbl" Grid.Column="1" Grid.Row="7" HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center" FontSize="18"/>
|
||||
<TextBlock Name="CopyrightLbl" Grid.Column="1" Grid.Row="8" HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center" FontSize="15" />
|
||||
<Button Name="ExitBtn" Grid.Column="1" Grid.Row="10" IsCancel="True"
|
||||
Style="{DynamicResource OmagCut_WindowGrayTextButton}" Margin="1,0"/>
|
||||
VerticalAlignment="Center" FontSize="18"/>
|
||||
|
||||
<TextBlock Name="AssStatusLbl" Grid.Column="1" Grid.Row="6" HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center" FontSize="18"/>
|
||||
|
||||
<TextBlock Name="MachineLbl" Grid.Column="1" Grid.Row="7" HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center" FontSize="18"/>
|
||||
<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="11" IsCancel="True"
|
||||
Style="{DynamicResource OmagCut_WindowGrayTextButton}" Margin="1,0"/>
|
||||
|
||||
</Grid>
|
||||
|
||||
|
||||
@@ -33,10 +33,23 @@ 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()
|
||||
ExitBtn.Content = EgtMsg(MSG_MISSINGKEYWD + 4) 'Ok
|
||||
ExitBtn.Content = EgtMsg(10104) 'Ok
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
+253
-43
@@ -1,5 +1,4 @@
|
||||
Imports System.Windows.Forms.Integration
|
||||
Imports EgtUILib
|
||||
Imports EgtUILib
|
||||
|
||||
Friend Module CamAuto
|
||||
|
||||
@@ -22,11 +21,51 @@ Friend Module CamAuto
|
||||
bOk = bOk AndAlso EgtLuaCallFunction("CAM.Add")
|
||||
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())
|
||||
m_MainWindow.m_CurrentProjectPageUC.SetWarningMessage(EgtMsg(91017))
|
||||
End If
|
||||
m_MainWindow.m_CurrentProjectPageUC.ResetOrderMachiningFlag()
|
||||
Return bOk
|
||||
End Function
|
||||
|
||||
Friend Function AddSawMachining(nOperId As Integer, ByRef nNewOperation As Integer) As Boolean
|
||||
EgtLuaCreateGlobTable("CAM")
|
||||
SetLuaStandardCamParams()
|
||||
EgtLuaSetGlobIntVar("CAM.OPERID", nOperId)
|
||||
Dim nErr As Integer = 999
|
||||
Dim bOk As Boolean = EgtLuaExecFile(m_MainWindow.GetCamAutoDir() & "\CamAuto.lua")
|
||||
bOk = bOk AndAlso EgtLuaGetGlobIntVar("CAM.ERR", nErr) AndAlso nErr = 0
|
||||
bOk = bOk AndAlso EgtLuaCallFunction("CAM.UpdateSawing")
|
||||
EgtLuaGetGlobIntVar("CAM.ERR", nErr)
|
||||
EgtLuaGetGlobIntVar("CAM.NEW_OPERATION", nNewOperation)
|
||||
EgtLuaResetGlobVar("CAM")
|
||||
If nErr <> 0 Then
|
||||
bOk = False
|
||||
EgtOutLog("Error in CamAuto : " & nErr.ToString())
|
||||
m_MainWindow.m_CurrentProjectPageUC.ClearMessage()
|
||||
End If
|
||||
Return bOk
|
||||
End Function
|
||||
|
||||
Friend Function ChangePvColor(nOperId As Integer, colCut As Color3d)
|
||||
EgtLuaCreateGlobTable("CAM")
|
||||
SetLuaStandardCamParams()
|
||||
EgtLuaSetGlobIntVar("CAM.OPERID", nOperId)
|
||||
Dim nErr As Integer = 999
|
||||
Dim bOk As Boolean = EgtLuaExecFile(m_MainWindow.GetCamAutoDir() & "\CamAuto.lua")
|
||||
bOk = bOk AndAlso EgtLuaGetGlobIntVar("CAM.ERR", nErr) AndAlso nErr = 0
|
||||
bOk = bOk AndAlso EgtLuaExecLine("CAM.ChangePvColor( " & nOperId.ToString & ",Color3d(" & colCut.R.ToString & "," & colCut.G.ToString & "," & colCut.B.ToString & "))")
|
||||
EgtLuaGetGlobIntVar("CAM.ERR", nErr)
|
||||
EgtLuaResetGlobVar("CAM")
|
||||
If nErr <> 0 Then
|
||||
bOk = False
|
||||
EgtOutLog("Error in CamAuto : " & nErr.ToString())
|
||||
m_MainWindow.m_CurrentProjectPageUC.ClearMessage()
|
||||
End If
|
||||
m_MainWindow.m_CurrentProjectPageUC.ResetOrderMachiningFlag()
|
||||
Return bOk
|
||||
End Function
|
||||
|
||||
@@ -40,9 +79,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
|
||||
@@ -56,9 +120,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()
|
||||
@@ -74,9 +140,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
|
||||
@@ -86,6 +154,7 @@ Friend Module CamAuto
|
||||
Return ResetAllMachinings(nWarn)
|
||||
End Function
|
||||
|
||||
' Ricalcola tutte le lavorazioni
|
||||
Friend Function ResetAllMachinings(ByRef nWarn As Integer) As Boolean
|
||||
' Cancello tutte le lavorazioni
|
||||
EraseMachinings(GDB_ID.NULL)
|
||||
@@ -102,6 +171,74 @@ Friend Module CamAuto
|
||||
Return True
|
||||
End Function
|
||||
|
||||
' Elimina da ogni entità il nome della lavorazione asseganta
|
||||
Friend Function RestoreDef_Machinig(Optional bOnlySideAng As Boolean = True)
|
||||
Dim sSawingTilted As String = m_MainWindow.m_CurrentMachine.sCurrSawingTilted
|
||||
Dim bApplySawingTilted As Boolean = m_MainWindow.m_CurrentMachine.bApplySawingTilted
|
||||
Dim bOk As Boolean = True
|
||||
Dim nIdPart As Integer = EgtGetFirstPart()
|
||||
While nIdPart <> GDB_ID.NULL
|
||||
' accedo al Layer OutLoop dei pezzi nel grezzo
|
||||
Dim nIdLayerOutLoop As Integer = EgtGetFirstNameInGroup(nIdPart, NAME_OUTLOOP)
|
||||
Dim nEntId As Integer = EgtGetFirstInGroup(nIdLayerOutLoop)
|
||||
SetResetDef_Machining(nEntId, sSawingTilted, bApplySawingTilted, bOnlySideAng)
|
||||
'nIdLayerOutLoop = EgtGetFirstNameInGroup(nIdPart, NAME_OUTLOOP & ".orig")
|
||||
'If nIdLayerOutLoop <> GDB_ID.NULL Then
|
||||
' nEntId = EgtGetFirstInGroup(nIdLayerOutLoop)
|
||||
' SetResetDef_Machining(nEntId, sSawingTilted, bApplySawingTilted, bOnlySideAng)
|
||||
'End If
|
||||
nIdPart = EgtGetNextPart(nIdPart)
|
||||
End While
|
||||
Dim nRawId As Integer = CamAuto.GetCurrentRaw()
|
||||
nIdPart = EgtGetFirstPartInRawPart(nRawId)
|
||||
While nIdPart <> GDB_ID.NULL
|
||||
' accedo al Layer OutLoop dei pezzi in parcheggio
|
||||
Dim nIdLayerOutLoop As Integer = EgtGetFirstNameInGroup(nIdPart, NAME_OUTLOOP)
|
||||
Dim nEntId As Integer = EgtGetFirstInGroup(nIdLayerOutLoop)
|
||||
SetResetDef_Machining(nEntId, sSawingTilted, bApplySawingTilted, bOnlySideAng)
|
||||
nIdLayerOutLoop = EgtGetFirstNameInGroup(nIdPart, NAME_OUTLOOP & ".orig")
|
||||
If nIdLayerOutLoop <> GDB_ID.NULL Then
|
||||
nEntId = EgtGetFirstInGroup(nIdLayerOutLoop)
|
||||
SetResetDef_Machining(nEntId, sSawingTilted, bApplySawingTilted, bOnlySideAng)
|
||||
End If
|
||||
nIdPart = EgtGetNextPartInRawPart(nIdPart)
|
||||
End While
|
||||
Return bOk
|
||||
End Function
|
||||
|
||||
' ripristina la lavorazone indicata di default per i tagli inclinati
|
||||
Private Sub SetResetDef_Machining(nEntId As Integer, sSawingTilted As String, bApplySawingTilted As Boolean, bOnlySideAng As Boolean)
|
||||
While nEntId <> GDB_ID.NULL
|
||||
Dim sInfoOrigSideAng As String = String.Empty
|
||||
EgtGetInfo(nEntId, INFO_ORIG_SIDE_ANGLE, sInfoOrigSideAng)
|
||||
' Se è un'entità associata ad una lavorazione inclinata
|
||||
If Not String.IsNullOrEmpty(sInfoOrigSideAng) AndAlso sInfoOrigSideAng <> "0" Then
|
||||
If bApplySawingTilted Then
|
||||
' forzo la lavorazione inclinata
|
||||
If String.IsNullOrEmpty(sSawingTilted) Then
|
||||
' ma se non esiste nessuna lavorezione specifica applico qualla standard
|
||||
EgtRemoveInfo(nEntId, DEF_MACHINING_TILTED)
|
||||
Else
|
||||
' Applico quella specificata
|
||||
EgtSetInfo(nEntId, DEF_MACHINING_TILTED, sSawingTilted)
|
||||
End If
|
||||
Else
|
||||
' Rimuovo la lavorazione e applico quella standard
|
||||
EgtRemoveInfo(nEntId, DEF_MACHINING_TILTED)
|
||||
End If
|
||||
|
||||
ElseIf Not bOnlySideAng Then
|
||||
Dim sInfo As String = String.Empty
|
||||
EgtGetInfo(nEntId, DEF_MACHINING, sInfo)
|
||||
If Not String.IsNullOrEmpty(sInfo) Then
|
||||
' se esiste una lavorazione specificata allora la rimuovo
|
||||
EgtRemoveInfo(nEntId, DEF_MACHINING)
|
||||
End If
|
||||
End If
|
||||
nEntId = EgtGetNext(nEntId)
|
||||
End While
|
||||
End Sub
|
||||
|
||||
Friend Function ResetAllSplitCurv() As Boolean
|
||||
Dim bOk As Boolean = True
|
||||
Dim nIdPart As Integer = EgtGetFirstPart()
|
||||
@@ -164,6 +301,45 @@ 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()
|
||||
@@ -232,9 +408,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
|
||||
@@ -248,9 +426,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
|
||||
@@ -265,9 +445,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()
|
||||
@@ -283,7 +465,7 @@ Friend Module CamAuto
|
||||
EgtGetGroupObjs(EgtGetFirstNameInGroup(nPartId, NAME_UNDERDRILL)) = 0 Then
|
||||
Return True
|
||||
End If
|
||||
' Se tutti i pezzi
|
||||
' Se tutti i pezzi
|
||||
Else
|
||||
' Salvo fase attualmente corrente
|
||||
Dim nOriPhase As Integer = EgtGetCurrPhase()
|
||||
@@ -410,6 +592,7 @@ Friend Module CamAuto
|
||||
Return EgtRemoveOperationHome(nId)
|
||||
End Function
|
||||
|
||||
' Verifico che per tutte le lavorazioni sia attrezzato l'utensile
|
||||
Friend Function VerifySetup(ByRef sMissingTools As String) As Boolean
|
||||
Dim bOk As Boolean = True
|
||||
Dim bIsMultiCut = (EgtGetHeadId("H101") <> GDB_ID.NULL)
|
||||
@@ -424,9 +607,9 @@ Friend Module CamAuto
|
||||
Dim sTool2 As String = String.Empty
|
||||
EgtGetMachiningParam(MCH_MP.TUUID, sTuuid)
|
||||
EgtTdbGetToolFromUUID(sTuuid, sTool)
|
||||
If String.IsNullOrWhiteSpace( sTool) Then
|
||||
If String.IsNullOrWhiteSpace(sTool) Then
|
||||
Dim sMchTool As String = ""
|
||||
EgtGetMachiningParam( MCH_MP.TOOL, sMchTool)
|
||||
EgtGetMachiningParam(MCH_MP.TOOL, sMchTool)
|
||||
bOk = False
|
||||
If sMissingTools.IndexOf(sMchTool) = -1 Then
|
||||
sMissingTools = sMissingTools & sMchTool & ", "
|
||||
@@ -439,8 +622,24 @@ Friend Module CamAuto
|
||||
End If
|
||||
sTool2 = sTool & "-2"
|
||||
End If
|
||||
If String.Compare(sTool, m_MainWindow.m_CurrentMachine.sCurrSaw) <> 0 AndAlso
|
||||
( String.IsNullOrWhiteSpace( sTool2) OrElse String.Compare(sTool2, m_MainWindow.m_CurrentMachine.sCurrSaw) <> 0) AndAlso
|
||||
If m_MainWindow.m_CurrentMachine.MountedToolConfig = CurrentMachine.MountedToolConfigs.TOOLCHANGERWITHSAW Then
|
||||
Dim bOnHolder As Boolean = False
|
||||
For Each ToolPosition As ToolChangerPos In m_MainWindow.m_CurrentMachine.ToolChanger
|
||||
If ToolPosition.sTool <> String.Empty Then
|
||||
If sTool = ToolPosition.sTool Then
|
||||
bOnHolder = True
|
||||
Exit For
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
If Not bOnHolder Then
|
||||
bOk = False
|
||||
If sMissingTools.IndexOf(sTool) = -1 Then
|
||||
sMissingTools = sMissingTools & sTool & ", "
|
||||
End If
|
||||
End If
|
||||
ElseIf String.Compare(sTool, m_MainWindow.m_CurrentMachine.sCurrSaw) <> 0 AndAlso
|
||||
(String.IsNullOrWhiteSpace(sTool2) OrElse String.Compare(sTool2, m_MainWindow.m_CurrentMachine.sCurrSaw) <> 0) AndAlso
|
||||
String.Compare(sTool, m_MainWindow.m_CurrentMachine.sCurrDripSaw) <> 0 Then
|
||||
bOk = False
|
||||
If sMissingTools.IndexOf(sTool) = -1 Then
|
||||
@@ -478,6 +677,8 @@ Friend Module CamAuto
|
||||
End If
|
||||
nId = EgtGetNextOperation(nId)
|
||||
End While
|
||||
Dim index As Integer = sMissingTools.LastIndexOf(","c)
|
||||
sMissingTools = If(index >= 0, sMissingTools.Remove(index, 1), sMissingTools)
|
||||
Return bOk
|
||||
End Function
|
||||
|
||||
@@ -504,9 +705,10 @@ Friend Module CamAuto
|
||||
Dim dReducedDepth As Double = GetPrivateProfileDouble(S_MACH_NEST, K_MACH_REDUCEDDEPTH, 1, m_MainWindow.GetMachIniFile())
|
||||
' Ciclo sulle lavorazioni
|
||||
Dim nOperId As Integer = EgtGetFirstOperation()
|
||||
Dim LocalListOperId As New List(Of Integer)
|
||||
While nOperId <> GDB_ID.NULL
|
||||
' verifico sia una lavorazione valida di taglio con lama
|
||||
If IsValidMachining( nOperId) And EgtGetOperationType( nOperId) = MCH_OY.SAWING Then
|
||||
If IsValidMachining(nOperId) And EgtGetOperationType(nOperId) = MCH_OY.SAWING Then
|
||||
' verifica interferenza
|
||||
Dim nFlag As Integer = FMI_TYPE.NONE
|
||||
If Not VerifyComposedMachining(nOperId, nFlag) Then
|
||||
@@ -518,12 +720,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
|
||||
nOperId = EgtGetNextOperation(nOperId)
|
||||
End While
|
||||
If LocalListOperId.Count > 0 Then AddWaterJetMachining(LocalListOperId, 0)
|
||||
Return bModified
|
||||
End Function
|
||||
|
||||
@@ -627,8 +831,8 @@ Friend Module CamAuto
|
||||
If nOriLeadIn <> MCH_SAW_LI.STRICT Then
|
||||
EgtSetMachiningParam(MCH_MP.LEADINTYPE, MCH_SAW_LI.STRICT)
|
||||
Dim dUserAddLen As Double = 0
|
||||
EgtGetInfo( nMchId, INFO_MCH_USER_SAL, dUserAddLen)
|
||||
EgtRemoveInfo( nMchId, INFO_MCH_USER_SAL)
|
||||
EgtGetInfo(nMchId, INFO_MCH_USER_SAL, dUserAddLen)
|
||||
EgtRemoveInfo(nMchId, INFO_MCH_USER_SAL)
|
||||
Dim dAddLen As Double = 0
|
||||
EgtGetMachiningParam(MCH_MP.STARTADDLEN, dAddLen)
|
||||
EgtSetMachiningParam(MCH_MP.STARTADDLEN, dAddLen - dUserAddLen - dSafeLen)
|
||||
@@ -647,8 +851,8 @@ Friend Module CamAuto
|
||||
If nOriLeadOut <> MCH_SAW_LO.STRICT Then
|
||||
EgtSetMachiningParam(MCH_MP.LEADOUTTYPE, MCH_SAW_LO.STRICT)
|
||||
Dim dUserAddLen As Double = 0
|
||||
EgtGetInfo( nMchId, INFO_MCH_USER_EAL, dUserAddLen)
|
||||
EgtRemoveInfo( nMchId, INFO_MCH_USER_EAL)
|
||||
EgtGetInfo(nMchId, INFO_MCH_USER_EAL, dUserAddLen)
|
||||
EgtRemoveInfo(nMchId, INFO_MCH_USER_EAL)
|
||||
Dim dAddLen As Double = 0
|
||||
EgtGetMachiningParam(MCH_MP.ENDADDLEN, dAddLen)
|
||||
EgtSetMachiningParam(MCH_MP.ENDADDLEN, dAddLen - dUserAddLen - dSafeLen)
|
||||
@@ -805,9 +1009,9 @@ Friend Module CamAuto
|
||||
Friend Function RemoveAllExitPreCuts() As Boolean
|
||||
Dim nOperId As Integer = EgtGetFirstOperation()
|
||||
While nOperId <> GDB_ID.NULL
|
||||
Dim nNextOperId As Integer = EgtGetNextOperation( nOperId)
|
||||
If EgtGetType( nOperId) <> MCH_OY.DISP AndAlso EgtExistsInfo(nOperId, INFO_MCH_EPC) Then
|
||||
EgtRemoveOperation( nOperId)
|
||||
Dim nNextOperId As Integer = EgtGetNextOperation(nOperId)
|
||||
If EgtGetType(nOperId) <> MCH_OY.DISP AndAlso EgtExistsInfo(nOperId, INFO_MCH_EPC) Then
|
||||
EgtRemoveOperation(nOperId)
|
||||
End If
|
||||
nOperId = nNextOperId
|
||||
End While
|
||||
@@ -817,6 +1021,7 @@ Friend Module CamAuto
|
||||
Private Function SetLuaStandardCamParams(Optional bDripOk As Boolean = True) As Boolean
|
||||
Dim sMaterial As String = m_MainWindow.m_CurrentMachine.CurrMat.sName
|
||||
Dim sSawMch As String = m_MainWindow.m_CurrentMachine.sCurrSawing
|
||||
Dim sSawTiltedMch As String = m_MainWindow.m_CurrentMachine.sCurrSawingTilted
|
||||
Dim sMillMch As String = m_MainWindow.m_CurrentMachine.sCurrMilling
|
||||
Dim sDrillMch As String = m_MainWindow.m_CurrentMachine.sCurrDrilling
|
||||
Dim sWaterJetMch As String = m_MainWindow.m_CurrentMachine.sCurrWaterJetting
|
||||
@@ -835,6 +1040,7 @@ Friend Module CamAuto
|
||||
Dim dMillingShort As Double = GetPrivateProfileDouble(S_MACH_NEST, K_MACH_MILLING_SHORTENING, 0, m_MainWindow.GetMachIniFile())
|
||||
EgtLuaSetGlobStringVar("CAM.MATERIAL", sMaterial)
|
||||
EgtLuaSetGlobStringVar("CAM.SAWMCH", sSawMch)
|
||||
EgtLuaSetGlobStringVar("CAM.SAWTILTEDMCH", sSawTiltedMch)
|
||||
EgtLuaSetGlobStringVar("CAM.MILLMCH", sMillMch)
|
||||
EgtLuaSetGlobStringVar("CAM.DRILLMCH", sDrillMch)
|
||||
EgtLuaSetGlobStringVar("CAM.POCKETMCH", sPocketMch)
|
||||
@@ -860,20 +1066,24 @@ Friend Module CamAuto
|
||||
If EgtGetTableId(MAIN_TAB) = GDB_ID.NULL Then Return 0
|
||||
If EgtGetTableId(SECOND_TAB) = GDB_ID.NULL Then Return 1
|
||||
If EgtGetTableId(THIRD_TAB) = GDB_ID.NULL Then Return 2
|
||||
Return 3
|
||||
If EgtGetTableId(FORTH_TAB) = GDB_ID.NULL Then Return 3
|
||||
Return 4
|
||||
End Function
|
||||
|
||||
Friend Function GetTableName(nInd As Integer) As String
|
||||
If nInd = 1 Then Return MAIN_TAB
|
||||
If nInd = 2 Then Return SECOND_TAB
|
||||
If nInd = 3 Then Return THIRD_TAB
|
||||
If nInd = 4 Then Return FORTH_TAB
|
||||
Return ""
|
||||
End Function
|
||||
|
||||
Friend Function GetCurrentTable() As Integer
|
||||
Dim sTabName As String = MAIN_TAB
|
||||
EgtGetTableName(sTabName)
|
||||
If sTabName = THIRD_TAB Then
|
||||
If sTabName = FORTH_TAB Then
|
||||
Return 4
|
||||
ElseIf sTabName = THIRD_TAB Then
|
||||
Return 3
|
||||
ElseIf sTabName = SECOND_TAB Then
|
||||
Return 2
|
||||
@@ -994,13 +1204,13 @@ Friend Module CamAuto
|
||||
Dim nRawId As Integer = GetCurrentRaw()
|
||||
If nRawId = GDB_ID.NULL Then Return False
|
||||
' Se non ci sono pezzi, esco
|
||||
Dim nPart1Id As Integer = EgtGetFirstPartInRawPart( nRawId)
|
||||
Dim nPart1Id As Integer = EgtGetFirstPartInRawPart(nRawId)
|
||||
If nPart1Id = GDB_ID.NULL Then Return True
|
||||
' Verifico se cornice curva
|
||||
Dim nDir As Integer = 0
|
||||
EgtGetInfo(nPart1Id, INFO_FRAME_DIR, nDir)
|
||||
Dim bSwap As Boolean = ( nDir = 0)
|
||||
Dim bCurved As Boolean = ( nDir >= 2)
|
||||
Dim bSwap As Boolean = (nDir = 0)
|
||||
Dim bCurved As Boolean = (nDir >= 2)
|
||||
' Recupero la lavorazione corrente di sgrossatura con lama
|
||||
Dim sCurrSawRoughing = m_MainWindow.m_CurrentMachine.sCurrSawRoughing
|
||||
If String.IsNullOrEmpty(sCurrSawRoughing) Then Return True
|
||||
@@ -1027,8 +1237,8 @@ Friend Module CamAuto
|
||||
' Imposto la geometria
|
||||
EgtSetMachiningGeometry(vId)
|
||||
' Imposto trim iniziale e finale
|
||||
EgtSetMachiningParam(MCH_MP.STARTADDLEN, If( bSwap, -dTrimEnd, -dTrimStart))
|
||||
EgtSetMachiningParam(MCH_MP.ENDADDLEN, If( bSwap, -dTrimStart, -dTrimEnd))
|
||||
EgtSetMachiningParam(MCH_MP.STARTADDLEN, If(bSwap, -dTrimEnd, -dTrimStart))
|
||||
EgtSetMachiningParam(MCH_MP.ENDADDLEN, If(bSwap, -dTrimStart, -dTrimEnd))
|
||||
' Se cornice curva, imposto SCC
|
||||
If bCurved Then EgtSetMachiningParam(MCH_MP.SOLCHOICETYPE, MCH_SCC.ADIR_NEAR)
|
||||
' Applico la lavorazione
|
||||
@@ -1043,13 +1253,13 @@ Friend Module CamAuto
|
||||
Dim nRawId As Integer = GetCurrentRaw()
|
||||
If nRawId = GDB_ID.NULL Then Return False
|
||||
' Se non ci sono pezzi, esco
|
||||
Dim nPart1Id As Integer = EgtGetFirstPartInRawPart( nRawId)
|
||||
Dim nPart1Id As Integer = EgtGetFirstPartInRawPart(nRawId)
|
||||
If nPart1Id = GDB_ID.NULL Then Return True
|
||||
' Verifico se cornice curva
|
||||
Dim nDir As Integer = 0
|
||||
EgtGetInfo( nPart1Id, INFO_FRAME_DIR, nDir)
|
||||
Dim bSwap As Boolean = ( nDir = 0)
|
||||
Dim bCurved As Boolean = ( nDir >= 2)
|
||||
EgtGetInfo(nPart1Id, INFO_FRAME_DIR, nDir)
|
||||
Dim bSwap As Boolean = (nDir = 0)
|
||||
Dim bCurved As Boolean = (nDir >= 2)
|
||||
' Recupero la lavorazione corrente di finitura con lama
|
||||
Dim sCurrSawFinishing = m_MainWindow.m_CurrentMachine.sCurrSawFinishing
|
||||
If String.IsNullOrEmpty(sCurrSawFinishing) Then Return True
|
||||
@@ -1086,8 +1296,8 @@ Friend Module CamAuto
|
||||
' Imposto la geometria
|
||||
EgtSetMachiningGeometry(vId)
|
||||
' Imposto trim iniziale e finale
|
||||
EgtSetMachiningParam(MCH_MP.STARTADDLEN, If( bSwap, -dTrimEnd, -dTrimStart))
|
||||
EgtSetMachiningParam(MCH_MP.ENDADDLEN, If( bSwap, -dTrimStart, -dTrimEnd))
|
||||
EgtSetMachiningParam(MCH_MP.STARTADDLEN, If(bSwap, -dTrimEnd, -dTrimStart))
|
||||
EgtSetMachiningParam(MCH_MP.ENDADDLEN, If(bSwap, -dTrimStart, -dTrimEnd))
|
||||
' Se cornice curva, imposto SCC
|
||||
If bCurved Then EgtSetMachiningParam(MCH_MP.SOLCHOICETYPE, MCH_SCC.ADIR_NEAR)
|
||||
' Applico la lavorazione
|
||||
@@ -1102,13 +1312,13 @@ Friend Module CamAuto
|
||||
Dim nRawId As Integer = GetCurrentRaw()
|
||||
If nRawId = GDB_ID.NULL Then Return False
|
||||
' Se non ci sono pezzi, esco
|
||||
Dim nPart1Id As Integer = EgtGetFirstPartInRawPart( nRawId)
|
||||
Dim nPart1Id As Integer = EgtGetFirstPartInRawPart(nRawId)
|
||||
If nPart1Id = GDB_ID.NULL Then Return True
|
||||
' Verifico se cornice curva
|
||||
Dim nDir As Integer = 0
|
||||
EgtGetInfo(nPart1Id, INFO_FRAME_DIR, nDir)
|
||||
Dim bSwap As Boolean = ( nDir = 0)
|
||||
Dim bCurved As Boolean = ( nDir >= 2)
|
||||
Dim bSwap As Boolean = (nDir = 0)
|
||||
Dim bCurved As Boolean = (nDir >= 2)
|
||||
' Recupero la lavorazione corrente di spatolatura con lama
|
||||
Dim sCurrSawSideFinishing = m_MainWindow.m_CurrentMachine.sCurrSawSideFinishing
|
||||
If String.IsNullOrEmpty(sCurrSawSideFinishing) Then Return True
|
||||
@@ -1129,8 +1339,8 @@ Friend Module CamAuto
|
||||
' Imposto la geometria
|
||||
EgtSetMachiningGeometry(vId)
|
||||
' Imposto trim iniziale e finale
|
||||
EgtSetMachiningParam(MCH_MP.STARTADDLEN, If( bSwap, -dTrimEnd, -dTrimStart))
|
||||
EgtSetMachiningParam(MCH_MP.ENDADDLEN, If( bSwap, -dTrimStart, -dTrimEnd))
|
||||
EgtSetMachiningParam(MCH_MP.STARTADDLEN, If(bSwap, -dTrimEnd, -dTrimStart))
|
||||
EgtSetMachiningParam(MCH_MP.ENDADDLEN, If(bSwap, -dTrimStart, -dTrimEnd))
|
||||
' Se cornice curva, imposto SCC
|
||||
If bCurved Then EgtSetMachiningParam(MCH_MP.SOLCHOICETYPE, MCH_SCC.ADIR_NEAR)
|
||||
' Applico la lavorazione
|
||||
@@ -1269,14 +1479,14 @@ Friend Module CamAuto
|
||||
dStartDist = dEndDist
|
||||
dEndDist = dTemp
|
||||
End If
|
||||
' altrimenti
|
||||
' altrimenti
|
||||
Else
|
||||
Dim vtSide As Vector3d
|
||||
' Se faccia non limitata da altre o sopra la limitante
|
||||
If bFree Then
|
||||
EgtSetMachiningParam(MCH_MP.FACEUSE, MCH_MIL_FU.ORTUP_DOWN)
|
||||
vtSide = Vector3d.Z_AX()
|
||||
' altrimenti è stata trovata una faccia adiacente limitante
|
||||
' altrimenti è stata trovata una faccia adiacente limitante
|
||||
Else
|
||||
If vtAdjN.x > 10 * EPS_SMALL Then
|
||||
EgtSetMachiningParam(MCH_MP.FACEUSE, MCH_MIL_FU.ORTUP_LEFT)
|
||||
|
||||
+31
-24
@@ -1,11 +1,11 @@
|
||||
<UserControl x:Class="CSVPage"
|
||||
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:self="clr-namespace:OmagCUT.TreeViewItem"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="853.3" d:DesignWidth="1280">
|
||||
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:self="clr-namespace:OmagCUT.TreeViewItem"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="853.3" d:DesignWidth="1280">
|
||||
|
||||
<!-- Definizione della SplitPage -->
|
||||
<Grid Name="SplitPageGrid" >
|
||||
@@ -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>
|
||||
|
||||
@@ -218,15 +228,15 @@
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Button Name="NewBtn" Grid.Column="0"
|
||||
Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource CsvNewImg}" Width="65" Height="65" HorizontalAlignment="Center" VerticalAlignment="Center" />
|
||||
</Button>
|
||||
<Button Name="OpenBtn" Grid.Column="1"
|
||||
Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource CsvOpenImg}" Width="65" Height="65" HorizontalAlignment="Center" VerticalAlignment="Center" />
|
||||
</Button>
|
||||
<Button Name="RuinedPartsBtn" Grid.Column="2"
|
||||
Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource CsvRuinedPartsImg}" Width="65" Height="65" HorizontalAlignment="Center" VerticalAlignment="Center" />
|
||||
</Button>
|
||||
|
||||
@@ -247,22 +257,19 @@
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<ToggleButton Name="PlusBtn" Grid.Column="0"
|
||||
Style="{DynamicResource OmagCut_YellowIconToggleButton}">
|
||||
Style="{DynamicResource OmagCut_YellowIconToggleButton}">
|
||||
<Image Source="{DynamicResource CsvPlusImg}" Width="65" Height="65" HorizontalAlignment="Center" VerticalAlignment="Center" />
|
||||
</ToggleButton>
|
||||
<ToggleButton Name="MinusBtn" Grid.Column="1"
|
||||
Style="{DynamicResource OmagCut_YellowIconToggleButton}">
|
||||
Style="{DynamicResource OmagCut_YellowIconToggleButton}">
|
||||
<Image Source="{DynamicResource CsvMinusImg}" Width="65" Height="65" HorizontalAlignment="Center" VerticalAlignment="Center" />
|
||||
</ToggleButton>
|
||||
<Button Name="InsertBtn" Grid.Column="3" Style="{DynamicResource OmagCut_YellowTextButton}" />
|
||||
<Button Name="RemoveBtn" Grid.Column="4" Style="{DynamicResource OmagCut_YellowTextButton}" />
|
||||
|
||||
<Button Name="OkBtn" Grid.Column="6" Style="{DynamicResource OmagCut_GradientBlueIconButton}">
|
||||
<Image Source="{DynamicResource VImg}" Style="{StaticResource OmagCut_ButtonIcon}" />
|
||||
<Image Source="{DynamicResource VImg}" Style="{DynamicResource OmagCut_ButtonIcon}" />
|
||||
</Button>
|
||||
|
||||
|
||||
|
||||
</Grid>
|
||||
|
||||
</Grid>
|
||||
|
||||
@@ -36,8 +36,8 @@ Public Class CSVPage
|
||||
' Assegno la lista dei pezzi Csv come sorgente del treeview
|
||||
PartsTreeView.ItemsSource = m_ItemsList
|
||||
' Messaggi
|
||||
InsertBtn.Content = EgtMsg(MSG_CSVPAGEUC + 2) ' Inserisci
|
||||
RemoveBtn.Content = EgtMsg(MSG_CSVPAGEUC + 4) ' Rimuovi
|
||||
InsertBtn.Content = EgtMsg(91202) ' Inserisci
|
||||
RemoveBtn.Content = EgtMsg(91204) ' Rimuovi
|
||||
' Determino se versione semplificata
|
||||
m_bFull = m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.CSV_AUTO) And
|
||||
(GetPrivateProfileInt(S_CSV, K_FULL, 1, m_MainWindow.GetIniFile()) <> 0)
|
||||
@@ -748,10 +748,10 @@ Public Class CSVPage
|
||||
' Eventuale messaggi di pezzi liberi o da altre liste
|
||||
If bOther Then
|
||||
' Pezzi non rimossi perché liberi
|
||||
Dim sOut As String = EgtMsg(MSG_EGTMSGBOX + 13)
|
||||
Dim sOut As String = EgtMsg(91113)
|
||||
If Not String.IsNullOrWhiteSpace(sOtherCsv) Then
|
||||
' o di altre liste Csv
|
||||
sOut &= EgtMsg(MSG_EGTMSGBOX + 14) & " (" & sOtherCsv.TrimEnd(", ".ToCharArray()) & ")"
|
||||
sOut &= EgtMsg(91114) & " (" & sOtherCsv.TrimEnd(", ".ToCharArray()) & ")"
|
||||
End If
|
||||
Dim WarnMsg As New EgtMsgBox(m_MainWindow, "", sOut, EgtMsgBox.Buttons.OK, EgtMsgBox.Icons.NULL, 0, 1)
|
||||
End If
|
||||
|
||||
+11
-10
@@ -7,7 +7,7 @@
|
||||
d:DesignHeight="853.3" d:DesignWidth="1280" Initialized="CadCutPage_Initialized" Loaded="CadCutPage_Loaded" Unloaded="CadCutPage_Unloaded">
|
||||
|
||||
<!-- Definizione della CadCutPage -->
|
||||
<Grid Name="CadCutPageGrid" >
|
||||
<Grid Name="CadCutPageGrid" >
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="3*"/>
|
||||
<ColumnDefinition Width="12*"/>
|
||||
@@ -30,24 +30,25 @@
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Button Name="PhotoBtn" Grid.Column="0" Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}">
|
||||
<Image Name="PhotoIMG" Source="{DynamicResource PhotoImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
<Image Name="PhotoIMG" Source="{DynamicResource PhotoImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="RawPartBtn" Grid.Column="1" Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}">
|
||||
<Image Source="{DynamicResource RawPartImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
<Button Name="RawPartBtn" Grid.Column="1" Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}">
|
||||
<Image Source="{DynamicResource RawPartImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="DrawBtn" Grid.Column="2" Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}">
|
||||
<Image Source="{DynamicResource DrawImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
<Button Name="DrawBtn" Grid.Column="2" Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}">
|
||||
<Image Source="{DynamicResource DrawImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="ImportBtn" Grid.Column="3" Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}">
|
||||
<Image Source="{DynamicResource ImportImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
<Button Name="ImportBtn" Grid.Column="3" Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}">
|
||||
<Image Source="{DynamicResource ImportImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="SplitBtn" Grid.Column="4" Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}">
|
||||
<Image Name="SplitImage" Width="65" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
<Image Name="SplitImage" Width="65" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
|
||||
</Grid>
|
||||
|
||||
<!-- Definizione della Grid inferiore --><!--
|
||||
<!-- Definizione della Grid inferiore -->
|
||||
<!--
|
||||
<Grid Name="LowerButtonGrid" Grid.Column="1" Grid.Row="2" >
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
Imports EgtWPFLib
|
||||
Imports System.Reflection
|
||||
Imports System.Globalization
|
||||
Imports EgtWPFLib5
|
||||
Imports System.Windows.Forms
|
||||
|
||||
Public Class CadCutPageUC
|
||||
|
||||
@@ -154,9 +156,9 @@ Public Class CadCutPageUC
|
||||
' Se modalità fast grid, elimino tutti i pezzi
|
||||
If m_CadCutMode = CadCutModes.FastGrid Then
|
||||
Dim nRawId As Integer = CamAuto.GetCurrentRaw()
|
||||
Dim nPartId As Integer = EgtGetFirstPartInRawPart( nRawId)
|
||||
Dim nPartId As Integer = EgtGetFirstPartInRawPart(nRawId)
|
||||
While nPartId <> GDB_ID.NULL
|
||||
Dim nNextPartId = EgtGetNextPartInRawPart( nPartId)
|
||||
Dim nNextPartId = EgtGetNextPartInRawPart(nPartId)
|
||||
' Rimuovo dal grezzo
|
||||
EgtRemovePartFromRawPart(nPartId)
|
||||
' Rimuovo le lavorazioni
|
||||
@@ -242,7 +244,7 @@ Public Class CadCutPageUC
|
||||
' Reinserisco tutte le lavorazioni
|
||||
Dim nWarn As Integer = 0
|
||||
AddMachinings(GDB_ID.NULL, nWarn)
|
||||
If nWarn = 1 Then m_CurrProjPage.SetWarningMessage(EgtMsg(MSG_SPLITPAGEUC + 11)) ' Lama troppo grande per utilizzo ventosa
|
||||
If nWarn = 1 Then m_CurrProjPage.SetWarningMessage(EgtMsg(90351)) ' Lama troppo grande per utilizzo ventosa
|
||||
' Imposto flag di modifica
|
||||
m_SplitPage.m_bShow = False
|
||||
End If
|
||||
|
||||
@@ -0,0 +1,92 @@
|
||||
<Window x:Class="ChangeToolWD"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
|
||||
FontFamily="{DynamicResource OmagCut_Font}"
|
||||
Title="ChooseTool" Height="382.6" Width="426.6" WindowStyle="None"
|
||||
ResizeMode="NoResize" ShowInTaskbar="False" AllowsTransparency="True"
|
||||
Background="Transparent">
|
||||
|
||||
<Border Style="{DynamicResource OmagCut_Border}">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
<ColumnDefinition Width="4*"/>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="1.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<TextBlock Name="FilePathTxBl" Grid.Column="1" Grid.Row="0" Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}" />
|
||||
<!--TextAlignment="Center"
|
||||
FontSize="20"
|
||||
VerticalAlignment="Center"-->
|
||||
|
||||
<Grid Grid.Column="1" Grid.Row="1">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="0.8*"/>
|
||||
<ColumnDefinition Width="0.7*"/>
|
||||
<ColumnDefinition Width="0.7*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Grid.Column="0" Text="MACHINING" Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}" />
|
||||
<TextBlock Grid.Column="1" Text="TOOL" Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}" />
|
||||
<TextBlock Grid.Column="2" Text="TC" Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}" Margin="10,0,0,0"/>
|
||||
</Grid>
|
||||
|
||||
<ListBox Name="SetUpToolListBox" Grid.Column="1" Grid.Row="2"
|
||||
ItemsSource="{Binding ItemList}">
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Grid Width="{Binding ActualWidth, ElementName=SetUpToolListBox}" Margin="0,0,-40,0">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="0.8*"/>
|
||||
<ColumnDefinition Width="0.7*"/>
|
||||
<ColumnDefinition Width="0.4*"/>
|
||||
<ColumnDefinition Width="0.0*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Grid.Column="0" Text="{Binding Machining}" Style="{DynamicResource OmagCut_ListBoxTextBlock}"/>
|
||||
<TextBlock Grid.Column="1" Text="{Binding ToolName}" Style="{DynamicResource OmagCut_ListBoxTextBlock}"/>
|
||||
<TextBlock Grid.Column="2" Text="{Binding ToolPos}" Style="{DynamicResource OmagCut_ListBoxTextBlock}"/>
|
||||
<Rectangle Grid.Column="2" Style="{DynamicResource Rect_SplitPage}" Margin="15,0,0,0"/>
|
||||
<Grid.ToolTip>
|
||||
<StackPanel>
|
||||
<TextBlock Text="{Binding Machining}" Style="{DynamicResource OmagCut_ListBoxTextBlock}"/>
|
||||
<TextBlock Text="{Binding ToolName}" Style="{DynamicResource OmagCut_ListBoxTextBlock}" />
|
||||
<TextBlock Text="{Binding ToolPos}" Style="{DynamicResource OmagCut_ListBoxTextBlock}"/>
|
||||
</StackPanel>
|
||||
</Grid.ToolTip>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</ListBox.ItemTemplate>
|
||||
</ListBox>
|
||||
|
||||
<TextBlock Name="ErrorTxBl" Grid.Column="1" Grid.Row="3"
|
||||
Style="{DynamicResource OmagCut_ErrorTextBlock}"/>
|
||||
|
||||
<Grid Grid.Column="1" Grid.Row="5">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Button Name="OkBtn" Grid.Column="1" Style="{DynamicResource OmagCut_GradientBlueIconButton}" >
|
||||
<Image Source="{DynamicResource VImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="ExitBtn" Grid.Column="3" Style="{DynamicResource OmagCut_GradientBlueIconButton}" IsCancel="True">
|
||||
<Image Source="{DynamicResource XImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
</Grid>
|
||||
|
||||
</Grid>
|
||||
|
||||
</Border>
|
||||
</Window>
|
||||
@@ -0,0 +1,381 @@
|
||||
Imports System.Collections.ObjectModel
|
||||
Imports EgtUILib
|
||||
|
||||
Public Class ChangeToolWD
|
||||
Private m_MainWindow As MainWindow = DirectCast(Application.Current.MainWindow, MainWindow)
|
||||
|
||||
Private m_SetUpMachiningList As New ObservableCollection(Of ItemMachining)
|
||||
|
||||
Sub New(Owner As Window)
|
||||
Me.Owner = Owner
|
||||
InitializeComponent()
|
||||
End Sub
|
||||
|
||||
' Parametri della lama impostata correntemente in macchina
|
||||
Private m_DefaultSaw_Name As String = String.Empty
|
||||
Private m_DefaultSaw_Diam As Double = 0
|
||||
Private m_DefaultSaw_Thick As Double = 0
|
||||
Private m_DefaultSaw_Exists As Boolean = False
|
||||
|
||||
' Il nome della lavorazione restituito dalla selezione
|
||||
Private m_NewSawing As String = String.Empty
|
||||
Public ReadOnly Property NewSawing As String
|
||||
Get
|
||||
Return m_NewSawing
|
||||
End Get
|
||||
End Property
|
||||
|
||||
' Il colore della lavorazione
|
||||
Private m_EgtColor As New Color3d
|
||||
Public ReadOnly Property EgtColor As Color3d
|
||||
Get
|
||||
Return m_EgtColor
|
||||
End Get
|
||||
End Property
|
||||
|
||||
' Il nome della posizione sulla rulliera
|
||||
Private m_TCPos As String = String.Empty
|
||||
Public ReadOnly Property TCPos As String
|
||||
Get
|
||||
Return m_TCPos
|
||||
End Get
|
||||
End Property
|
||||
|
||||
' Nome della lavorazione corrente
|
||||
Private m_CurrSawing As String = String.Empty
|
||||
Public Property CurrSawing As String
|
||||
Get
|
||||
Return m_CurrSawing
|
||||
End Get
|
||||
Set(value As String)
|
||||
m_CurrSawing = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Sub GetDiamAndThickDefaultSaw()
|
||||
m_DefaultSaw_Name = m_MainWindow.m_CurrentMachine.sCurrSaw
|
||||
' Dalla lavorazione corrente recupero il nome della lama
|
||||
If EgtMdbSetCurrMachining(m_CurrSawing) Then
|
||||
Dim sNameTool As String = String.Empty
|
||||
If EgtMdbGetCurrMachiningParam(MCH_MP.TOOL, sNameTool) Then m_DefaultSaw_Name = sNameTool
|
||||
End If
|
||||
If EgtTdbSetCurrTool(m_DefaultSaw_Name) Then
|
||||
' Diametro lama lavorazione
|
||||
EgtTdbGetCurrToolParam(MCH_TP.DIAM, m_DefaultSaw_Diam)
|
||||
' Spessore lama corrente
|
||||
EgtTdbGetCurrToolParam(MCH_TP.THICK, m_DefaultSaw_Thick)
|
||||
m_DefaultSaw_Exists = True
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub OpenFile_Initialized(sender As Object, e As EventArgs) Handles Me.Initialized
|
||||
' Posizione finestra
|
||||
Me.Top = Owner.Top + Owner.Height / 2 - Me.Height / 2
|
||||
Me.Left = Owner.Left + Owner.Width / 2 - Me.Width / 2
|
||||
' Definizione del collegamento tra ItemList e ListBox1
|
||||
SetUpToolListBox.ItemsSource = m_SetUpMachiningList
|
||||
' 90378=Seleziona lavorazione
|
||||
FilePathTxBl.Text = EgtMsg(90378)
|
||||
End Sub
|
||||
|
||||
Private Sub OpenFile_Loaded(sender As Object, e As EventArgs) Handles Me.Loaded
|
||||
If String.IsNullOrEmpty(m_CurrSawing) Then
|
||||
m_CurrSawing = m_MainWindow.m_CurrentMachine.sCurrSawing
|
||||
End If
|
||||
' carico elenco degli utensili impostati attualmente in macchina (anche il laser!)
|
||||
LoadSetUpMachining()
|
||||
' ricerco la lavorazione corrente
|
||||
Dim Item As ItemMachining = m_SetUpMachiningList.FirstOrDefault(Function(x) x.Machining = m_CurrSawing)
|
||||
Dim Index As Integer = m_SetUpMachiningList.IndexOf(Item)
|
||||
If Index < 0 Then
|
||||
' Imposto lavorazione di default
|
||||
EgtMdbSetCurrMachining(m_CurrSawing)
|
||||
Dim sTool As String = String.Empty
|
||||
EgtMdbGetCurrMachiningParam(MCH_MP.TOOL, sTool)
|
||||
' ⚠️ Utensile {0} non attrezzato
|
||||
ErrorTxBl.Text = String.Format(EgtMsg(90377), sTool)
|
||||
Index = 0
|
||||
End If
|
||||
' se presente seleziono il primo elemento
|
||||
If m_SetUpMachiningList.Count > 0 Then
|
||||
SetUpToolListBox.SelectedItem = m_SetUpMachiningList(Index)
|
||||
OkBtn.IsEnabled = True
|
||||
Else
|
||||
OkBtn.IsEnabled = False
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#Region "SET UP MACHINING"
|
||||
|
||||
' Creo le liste da mostrare nella lista
|
||||
Private Function LoadSetUpMachining() As Boolean
|
||||
Dim sNameTool As String = String.Empty
|
||||
Dim nType As Integer = 0
|
||||
Dim sHeadTool As String = String.Empty
|
||||
Dim nExitTool As Integer = 0
|
||||
' Imposto il contesto corrente
|
||||
EgtSetCurrentContext(m_MainWindow.m_CurrentProjectPageUC.CurrentProjectScene.GetCtx())
|
||||
' Recupero la lista di tutte le lavorazioni di lama
|
||||
Dim local_Sawing As TreeViewItem.CathegoryItem = GetAllSwaing()
|
||||
' Se non ci sono lavorazioni di lama allora esco
|
||||
If IsNothing(local_Sawing) Then Return False
|
||||
|
||||
' Ripulisco la lista degli utensili
|
||||
m_SetUpMachiningList.Clear()
|
||||
CreateSawingList(local_Sawing)
|
||||
|
||||
Return True
|
||||
End Function
|
||||
|
||||
' Creo la lista delle delle lavorazioni di lama da proporre
|
||||
Private Sub CreateSawingList(SawingFam As TreeViewItem.CathegoryItem)
|
||||
' Recupero le info della lama montata di default
|
||||
GetDiamAndThickDefaultSaw()
|
||||
' recupero la prima lavorazione
|
||||
For Each Item As TreeViewItem.CustomItem In SawingFam.Items
|
||||
Dim sNameTool As String = String.Empty
|
||||
' Imposto la lavorazione corrente
|
||||
EgtMdbSetCurrMachining(Item.Name)
|
||||
' Recupero il nome dell'utensile della lavorazione
|
||||
EgtMdbGetCurrMachiningParam(MCH_MP.TOOL, sNameTool)
|
||||
If Not String.IsNullOrEmpty(sNameTool) And VerifyCurrSawTollerance(sNameTool) Then
|
||||
' Verifico che sia montata su un portautensile
|
||||
EgtTdbSetCurrTool(sNameTool)
|
||||
Dim sTCPos As String = String.Empty
|
||||
EgtTdbGetCurrToolParam(MCH_TP.TCPOS, sTCPos)
|
||||
If Not String.IsNullOrEmpty(sTCPos) Then
|
||||
' Cerco nel porta utensili automaitico
|
||||
For Each ToolPosition As ToolChangerPos In m_MainWindow.m_CurrentMachine.ToolChanger
|
||||
If ToolPosition.sTool <> String.Empty Then
|
||||
If sNameTool = ToolPosition.sTool Then
|
||||
' Verifico che il materiale e lo spessore
|
||||
If VerifyCurrMachiningMaterial() Then
|
||||
m_SetUpMachiningList.Add(New ItemMachining(Item.Name, sNameTool, sTCPos, Utility.GetColorPV()))
|
||||
End If
|
||||
Exit For
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
' reimposto la lavorazione di lama e la lama impostate in macchina
|
||||
EgtTdbSetCurrTool(m_MainWindow.m_CurrentMachine.sCurrSaw)
|
||||
EgtMdbSetCurrMachining(m_MainWindow.m_CurrentMachine.sCurrSawing)
|
||||
End Sub
|
||||
|
||||
' verifico l'utensile corrente (impostato nella funzione chiamante) se può lavorare il grezzo corrente
|
||||
Private Function VerifyCurrMachiningMaterial() As Boolean
|
||||
Dim m_MaterialsList As New ObservableCollection(Of MachiningMaterial)
|
||||
For Each Material As Material In m_MainWindow.m_CurrentMachine.Materials
|
||||
If m_MainWindow.m_CurrentMachine.bWaterJet And m_MainWindow.m_CurrentMachine.bFromDBWaterJet Then
|
||||
m_MaterialsList.Add(New MachiningMaterial(Material.nId, Material.sName, Material.SubId))
|
||||
Else
|
||||
m_MaterialsList.Add(New MachiningMaterial(Material.nId, Material.sName))
|
||||
End If
|
||||
Next
|
||||
|
||||
Dim ToolString As String = String.Empty
|
||||
EgtMdbGetCurrMachiningParam(MCH_MP.SYSNOTES, ToolString)
|
||||
If ToolString <> String.Empty Then
|
||||
Dim sItems() = ToolString.Split(";".ToCharArray)
|
||||
Dim Index As Integer = 0
|
||||
For Each Material As MachiningMaterial In m_MaterialsList
|
||||
Dim Param() As String = sItems(Index).Split(",".ToCharArray)
|
||||
Dim SubParam() As String = Param(0).Split(".".ToCharArray)
|
||||
Dim nParId As Integer = 0
|
||||
Dim nSubParId As Integer = 0
|
||||
If m_MainWindow.m_CurrentMachine.bWaterJet And m_MainWindow.m_CurrentMachine.bFromDBWaterJet Then
|
||||
If StringToInt(SubParam(0), nParId) AndAlso nParId = m_MainWindow.m_CurrentMachine.CurrMat.nId AndAlso SubParam.Count > 1 AndAlso
|
||||
StringToInt(SubParam(1), nSubParId) AndAlso nSubParId = Material.nSubId Then
|
||||
StringToDouble(Param(1), Material.dMinThickness)
|
||||
StringToDouble(Param(2), Material.dMaxThickness)
|
||||
Material.VerifyIfActive()
|
||||
Else
|
||||
Material.VerifyIfActive()
|
||||
End If
|
||||
Else
|
||||
If StringToInt(Param(0), nParId) AndAlso nParId = m_MainWindow.m_CurrentMachine.CurrMat.nId Then
|
||||
StringToDouble(Param(1), Material.dMinThickness)
|
||||
StringToDouble(Param(2), Material.dMaxThickness)
|
||||
Material.VerifyIfActive()
|
||||
If m_MainWindow.m_CurrentProjectPageUC.m_dRawHeight > Material.dMinThickness And m_MainWindow.m_CurrentProjectPageUC.m_dRawHeight < Material.dMaxThickness Then
|
||||
Return True
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
Index += 1
|
||||
Next
|
||||
End If
|
||||
Return False
|
||||
End Function
|
||||
|
||||
' verifico l'utensile corrente (impostato nella funzione chiamante) se ha le stesse dimensioni della lama di default
|
||||
Private Function VerifyCurrSawTollerance(sNameTool As String) As Boolean
|
||||
If m_DefaultSaw_Exists Then
|
||||
If EgtTdbSetCurrTool(sNameTool) Then
|
||||
' Diametro nuova lama
|
||||
Dim NewDiam As Double = 0
|
||||
EgtTdbGetCurrToolParam(MCH_TP.DIAM, NewDiam)
|
||||
' Spessore lama
|
||||
Dim NewThick As Double = 0
|
||||
EgtTdbGetCurrToolParam(MCH_TP.THICK, NewThick)
|
||||
' Verifico che la nuova lama possa essere applicata: diametro minore, uguale spessore
|
||||
Dim Delta_Diam As Double = NewDiam - m_DefaultSaw_Diam
|
||||
Dim Delta_Thick As Double = Math.Abs(NewThick - m_DefaultSaw_Thick)
|
||||
If Delta_Diam < EPS_SMALL And Delta_Thick < EPS_SMALL Then
|
||||
Return True
|
||||
Else
|
||||
EgtOutLog(String.Format("New saw {0} can not repalce the current {1}; Delta_Diam={2}, |Delta_Thick|={3} ", sNameTool, m_DefaultSaw_Name, Delta_Diam, Delta_Thick))
|
||||
End If
|
||||
Else
|
||||
EgtOutLog("Impossible to find in tooldb SAW: " & sNameTool)
|
||||
End If
|
||||
Else
|
||||
If String.IsNullOrEmpty(m_DefaultSaw_Name) Then
|
||||
EgtOutLog("There is no currsaw setted in machine!")
|
||||
Else
|
||||
EgtOutLog("Impossible to find in tooldb currsaw setted in machine: " & m_DefaultSaw_Name)
|
||||
End If
|
||||
End If
|
||||
Return False
|
||||
End Function
|
||||
|
||||
' Restituisce tutto l'elenco delle lavorazioni disponibili in macchina
|
||||
Private Function GetAllSwaing() As TreeViewItem.CathegoryItem
|
||||
Dim sFName As String = EgtMsg(90771) ' Uscita
|
||||
Dim nFType As Integer = MCH_MY.SAWING
|
||||
If Not m_MainWindow.m_CurrentMachine.bSawing Then Return Nothing
|
||||
' Inserisco categoria ed eventuali elementi
|
||||
Dim MachiningCathegory As New TreeViewItem.CathegoryItem(sFName, nFType)
|
||||
Dim MachiningName As String = String.Empty
|
||||
If EgtMdbGetFirstMachining(nFType, MachiningName) Then
|
||||
MachiningCathegory.Items.Add(New TreeViewItem.CustomItem(MachiningName, nFType))
|
||||
While EgtMdbGetNextMachining(nFType, MachiningName)
|
||||
MachiningCathegory.Items.Add(New TreeViewItem.CustomItem(MachiningName, nFType))
|
||||
End While
|
||||
End If
|
||||
Return MachiningCathegory
|
||||
End Function
|
||||
|
||||
#End Region ' Set up machinining
|
||||
|
||||
Private Sub SetUpToolListBox_PreviewMouseUp(sender As Object, e As MouseButtonEventArgs) Handles SetUpToolListBox.PreviewMouseUp
|
||||
' Disabilito Ok
|
||||
OkBtn.IsEnabled = False
|
||||
' Recupero item selezionato
|
||||
If SetUpToolListBox.SelectedItems.Count() = 0 Then
|
||||
Return
|
||||
End If
|
||||
m_NewSawing = m_SetUpMachiningList(SetUpToolListBox.SelectedIndex).Machining
|
||||
m_EgtColor = m_SetUpMachiningList(SetUpToolListBox.SelectedIndex).PrintFootToolColor
|
||||
m_TCPos = m_SetUpMachiningList(SetUpToolListBox.SelectedIndex).ToolPos
|
||||
' A seconda del tipo
|
||||
OkBtn.IsEnabled = True
|
||||
End Sub
|
||||
|
||||
Private Sub SetUpToolListBox_SelectionChanged(sender As Object, e As SelectionChangedEventArgs) Handles SetUpToolListBox.SelectionChanged
|
||||
' Disabilito Ok
|
||||
OkBtn.IsEnabled = False
|
||||
' Recupero item selezionato
|
||||
If SetUpToolListBox.SelectedItems.Count() = 0 Then
|
||||
Return
|
||||
Else
|
||||
m_NewSawing = m_SetUpMachiningList(SetUpToolListBox.SelectedIndex).Machining
|
||||
m_EgtColor = m_SetUpMachiningList(SetUpToolListBox.SelectedIndex).PrintFootToolColor
|
||||
m_TCPos = m_SetUpMachiningList(SetUpToolListBox.SelectedIndex).ToolPos
|
||||
OkBtn.IsEnabled = True
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub OkBtn_Click(sender As Object, e As RoutedEventArgs) Handles OkBtn.Click
|
||||
DialogResult = True
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
Public Class ItemMachining
|
||||
|
||||
Private m_ToolPos As String = String.Empty
|
||||
Private m_ToolName As String = String.Empty
|
||||
Private m_Machining As String = String.Empty
|
||||
Private m_ToolExit As Integer = 1
|
||||
Private m_ToolType As Integer = -1
|
||||
Private m_PrintFootToolColor As New Color3d(0, 255, 0, 100)
|
||||
Private m_cSawColor As SolidColorBrush
|
||||
|
||||
' Posizione porta utensile
|
||||
Public Property ToolPos As String
|
||||
Get
|
||||
Return m_ToolPos
|
||||
End Get
|
||||
Set(value As String)
|
||||
m_ToolPos = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
' Nome utensile
|
||||
Public Property ToolName As String
|
||||
Get
|
||||
Return m_ToolName
|
||||
End Get
|
||||
Set(value As String)
|
||||
m_ToolName = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
' Nome della lavorazione
|
||||
Public Property Machining As String
|
||||
Get
|
||||
Return m_Machining
|
||||
End Get
|
||||
Set(value As String)
|
||||
m_Machining = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property ToolExit As Integer
|
||||
Get
|
||||
Return m_ToolExit
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
m_ToolExit = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property ToolType As Integer
|
||||
Get
|
||||
Return m_ToolType
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
m_ToolType = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property PrintFootToolColor As Color3d
|
||||
Get
|
||||
Return m_PrintFootToolColor
|
||||
End Get
|
||||
Set(value As Color3d)
|
||||
m_PrintFootToolColor = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property SawColor As SolidColorBrush
|
||||
Get
|
||||
Return m_cSawColor
|
||||
End Get
|
||||
Set(value As SolidColorBrush)
|
||||
m_cSawColor = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Sub New(sMachining As String, sToolName As String, sToolPos As String, cColor As Color3d)
|
||||
m_Machining = sMachining
|
||||
m_ToolPos = sToolPos
|
||||
m_ToolName = sToolName
|
||||
m_PrintFootToolColor = cColor
|
||||
m_cSawColor = New SolidColorBrush(Color.FromRgb(m_PrintFootToolColor.R, m_PrintFootToolColor.G, m_PrintFootToolColor.B))
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
@@ -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="{DynamicResource 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="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="ExitBtn" Grid.Column="3" Style="{DynamicResource OmagCut_GradientBlueIconButton}" IsCancel="True">
|
||||
<Image Source="{DynamicResource XImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
|
||||
</Grid>
|
||||
|
||||
</Grid>
|
||||
|
||||
</Border>
|
||||
|
||||
</Window>
|
||||
@@ -0,0 +1,310 @@
|
||||
Imports System.Collections.ObjectModel
|
||||
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(90945) ' 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 CurrentMachine.MountedToolConfigs.TOOLCHANGERWITHSAW
|
||||
For Each ToolChangerPos As ToolChangerPos In m_MainWindow.m_CurrentMachine.ToolChanger
|
||||
If Not String.IsNullOrWhiteSpace(ToolChangerPos.sTool) Then
|
||||
'm_SetUpToolList.Add(New ToolPos(ToolChangerPos.sTool, ToolChangerPos.sName, False))
|
||||
sNameTool = ToolChangerPos.sTool
|
||||
If Not String.IsNullOrEmpty(sNameTool) Then
|
||||
' Imposto la lama
|
||||
m_SetUpToolList.Add(New TestTool(sNameTool, sNameTool))
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
For Each ToolChangerPos As ToolChangerPos In m_MainWindow.m_CurrentMachine.ManualToolChanger
|
||||
If Not String.IsNullOrWhiteSpace(ToolChangerPos.sTool) Then
|
||||
'm_SetUpToolList.Add(New ToolPos(ToolChangerPos.sTool, ToolChangerPos.sName, False))
|
||||
sNameTool = ToolChangerPos.sTool
|
||||
If Not String.IsNullOrEmpty(sNameTool) Then
|
||||
' Imposto la lama
|
||||
m_SetUpToolList.Add(New TestTool(sNameTool, sNameTool))
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
Return True
|
||||
|
||||
Case Else
|
||||
Return False
|
||||
End Select
|
||||
|
||||
|
||||
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
|
||||
+10
-10
@@ -1,10 +1,10 @@
|
||||
<Window x:Class="EditValueWD"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
|
||||
FontFamily="{DynamicResource OmagCut_Font}"
|
||||
ResizeMode="NoResize" WindowStyle="None" AllowsTransparency="True" Background="Transparent"
|
||||
Title="EditValueWD" Height="255.9" Width="426.5" ShowInTaskbar="False">
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
|
||||
FontFamily="{DynamicResource OmagCut_Font}"
|
||||
ResizeMode="NoResize" WindowStyle="None" AllowsTransparency="True" Background="Transparent"
|
||||
Title="EditValueWD" Height="255.9" Width="426.5" ShowInTaskbar="False">
|
||||
|
||||
<!--Definizione della pagina di scelta del nome con cui salvare il progetto-->
|
||||
<Border Style="{DynamicResource OmagCut_Border}">
|
||||
@@ -23,9 +23,9 @@
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<TextBlock Name="ValueTxbl" Grid.Column="1" Grid.Row="0"
|
||||
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="ValueTxBx" Grid.Column="1" Grid.Row="1"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
|
||||
<ComboBox Name="ValueCmBx" Grid.Column="1" Grid.Row="1">
|
||||
<ComboBox.ItemTemplate>
|
||||
@@ -47,12 +47,12 @@
|
||||
<Button Name="OkBtn" Grid.Column="1"
|
||||
IsDefault="True"
|
||||
Style="{DynamicResource OmagCut_GradientBlueIconButton}">
|
||||
<Image Source="{DynamicResource VImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
<Image Source="{DynamicResource VImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="ExitBtn" Grid.Column="3"
|
||||
IsCancel="True"
|
||||
Style="{DynamicResource OmagCut_GradientBlueIconButton}">
|
||||
<Image Source="{DynamicResource XImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
<Image Source="{DynamicResource XImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
|
||||
</Grid>
|
||||
|
||||
@@ -1,7 +1,4 @@
|
||||
Imports System.IO
|
||||
Imports EgtUILib
|
||||
Imports EgtWPFLib
|
||||
Imports System.Collections.ObjectModel
|
||||
Imports System.Collections.ObjectModel
|
||||
|
||||
Public Class EditValueWD
|
||||
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="853.3" d:DesignWidth="1280">
|
||||
|
||||
|
||||
<!-- Definizione della NestPage -->
|
||||
<Grid Name="FastGridSlabGrid" >
|
||||
<Grid.ColumnDefinitions>
|
||||
@@ -46,7 +45,7 @@
|
||||
Grid.Row="0" Grid.Column="0"
|
||||
Style="{DynamicResource OmagCut_CurrProjSummeryTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="OrderTxBx"
|
||||
Grid.Row="0" Grid.Column="1"
|
||||
Grid.Row="0" Grid.Column="1"
|
||||
Margin="13,0,6,0"
|
||||
Style="{DynamicResource OmagCut_KeyboardTextBox}"/>
|
||||
|
||||
@@ -67,11 +66,11 @@
|
||||
|
||||
<UniformGrid Columns="3" >
|
||||
<ToggleButton Name="Type1Btn"
|
||||
Style="{StaticResource OmagCut_DisabledYellowToggleButton}"/>
|
||||
Style="{DynamicResource OmagCut_DisabledYellowToggleButton}"/>
|
||||
<ToggleButton Name="Type2Btn"
|
||||
Style="{StaticResource OmagCut_DisabledYellowToggleButton}" />
|
||||
Style="{DynamicResource OmagCut_DisabledYellowToggleButton}" />
|
||||
<ToggleButton Name="Type3Btn"
|
||||
Style="{StaticResource OmagCut_DisabledYellowToggleButton}" />
|
||||
Style="{DynamicResource OmagCut_DisabledYellowToggleButton}" />
|
||||
</UniformGrid>
|
||||
|
||||
<Grid>
|
||||
@@ -82,11 +81,11 @@
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<ToggleButton Name="Type4Btn"
|
||||
Grid.Column="1"
|
||||
Style="{StaticResource OmagCut_DisabledYellowToggleButton}"/>
|
||||
Grid.Column="1"
|
||||
Style="{DynamicResource OmagCut_DisabledYellowToggleButton}"/>
|
||||
<ToggleButton Name="Type5Btn"
|
||||
Grid.Column="2"
|
||||
Style="{StaticResource OmagCut_DisabledYellowToggleButton}"/>
|
||||
Grid.Column="2"
|
||||
Style="{DynamicResource OmagCut_DisabledYellowToggleButton}"/>
|
||||
</Grid>
|
||||
|
||||
</UniformGrid>
|
||||
@@ -94,13 +93,13 @@
|
||||
|
||||
<Button Name="ConfirmOrderBtn"
|
||||
Grid.Row="3"
|
||||
Style="{StaticResource OmagCut_YellowTextButton}" />
|
||||
Style="{DynamicResource OmagCut_YellowTextButton}" />
|
||||
|
||||
<UniformGrid Grid.Row="4" Columns="2" >
|
||||
<Button Name="InsertPiecesBtn"
|
||||
Style="{StaticResource OmagCut_YellowTextButton}" />
|
||||
Style="{DynamicResource OmagCut_YellowTextButton}" />
|
||||
<ToggleButton Name="LastSlabBtn"
|
||||
Style="{StaticResource OmagCut_YellowToggleButton}" />
|
||||
Style="{DynamicResource OmagCut_YellowToggleButton}" />
|
||||
</UniformGrid>
|
||||
|
||||
</Grid>
|
||||
|
||||
@@ -19,12 +19,12 @@ Public Class FastGridSlabManager
|
||||
|
||||
Private Sub FastGridSlabManager_Initialized(sender As Object, e As EventArgs) Handles Me.Initialized
|
||||
' Imposto i messaggi letti dal file dei messaggi
|
||||
OrderTxBl.Text = EgtMsg(MSG_FASTGRIDPAGEUC) 'Order name - Nome ordine
|
||||
CurrSlabTxBl.Text = EgtMsg(MSG_FASTGRIDPAGEUC + 1) 'Curr slab - Lastra corrente
|
||||
PieceTypeGpBx.Header = EgtMsg(MSG_FASTGRIDPAGEUC + 3) 'Piece type - Tipo pezzo
|
||||
ConfirmOrderBtn.Content = EgtMsg(MSG_FASTGRIDPAGEUC + 5) 'Confirm order - Conferma ordine
|
||||
InsertPiecesBtn.Content = EgtMsg(MSG_FASTGRIDPAGEUC + 4) 'Insert pieces - Inserisci pezzi
|
||||
LastSlabBtn.Content = EgtMsg(MSG_FASTGRIDPAGEUC + 2) 'Last slab - Ultima lastra
|
||||
OrderTxBl.Text = EgtMsg(90480) ' Order name - Nome ordine
|
||||
CurrSlabTxBl.Text = EgtMsg(90481) ' Curr slab - Lastra corrente
|
||||
PieceTypeGpBx.Header = EgtMsg(90483) ' Piece type - Tipo pezzo
|
||||
ConfirmOrderBtn.Content = EgtMsg(90485) ' Confirm order - Conferma ordine
|
||||
InsertPiecesBtn.Content = EgtMsg(90484) ' Insert pieces - Inserisci pezzi
|
||||
LastSlabBtn.Content = EgtMsg(90482) ' Last slab - Ultima lastra
|
||||
' Leggo dati da ini
|
||||
GetPrivateProfileString(S_FASTGRID, K_FG_ORDER, "", OrderTxBx.Text, m_MainWindow.GetIniFile())
|
||||
m_nCurrSlab = GetPrivateProfileInt(S_FASTGRID, K_FG_CURRSLAB, 0, m_MainWindow.GetIniFile())
|
||||
|
||||
@@ -1,100 +1,100 @@
|
||||
<Window x:Class="ModifStartEndWD"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
|
||||
FontFamily="{DynamicResource OmagCut_Font}"
|
||||
ResizeMode="NoResize" WindowStyle="None" AllowsTransparency="True" Background="Transparent"
|
||||
Title="ModifStartEndWD" Height="405.9" Width="426.5" ShowInTaskbar="False">
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
|
||||
FontFamily="{DynamicResource OmagCut_Font}"
|
||||
ResizeMode="NoResize" WindowStyle="None" AllowsTransparency="True" Background="Transparent"
|
||||
Title="ModifStartEndWD" Height="405.9" Width="426.5" ShowInTaskbar="False">
|
||||
|
||||
<!--Definizione della pagina di scelta del nome con cui salvare il progetto-->
|
||||
<Border Style="{DynamicResource OmagCut_Border}">
|
||||
<Grid x:Name="SaveNameGrid">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<!--<RowDefinition Height="0.5*"/>
|
||||
<!--Definizione della pagina di scelta del nome con cui salvare il progetto-->
|
||||
<Border Style="{DynamicResource OmagCut_Border}">
|
||||
<Grid x:Name="SaveNameGrid">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<!--<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<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="1*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<TextBlock Name="TitleTxbl" Grid.Column="1" Grid.ColumnSpan="2" Grid.Row="0"
|
||||
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||
<TextBlock Name="TitleTxbl" Grid.Column="1" Grid.ColumnSpan="2" Grid.Row="0"
|
||||
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||
|
||||
<TextBlock Name="HoleTxbl" Grid.Column="1" Grid.Row="1"
|
||||
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||
<CheckBox Name="HoleChBx" Grid.Column="2" Grid.Row="1" HorizontalAlignment="Center"
|
||||
Style="{DynamicResource OmagCut_CheckBox}"/>
|
||||
<TextBlock Name="HoleTxbl" Grid.Column="1" Grid.Row="1"
|
||||
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||
<CheckBox Name="HoleChBx" Grid.Column="2" Grid.Row="1" HorizontalAlignment="Center"
|
||||
Style="{DynamicResource OmagCut_CheckBox}"/>
|
||||
|
||||
<TextBlock Name="ElongationTxbl" Grid.Column="1" Grid.Row="2"
|
||||
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="ElongationTxBx" Grid.Column="2" Grid.Row="2"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
<TextBlock Name="ElongationTxbl" Grid.Column="1" Grid.Row="2"
|
||||
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="ElongationTxBx" Grid.Column="2" Grid.Row="2"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
|
||||
<TextBlock Name="LeadInTxbl" Grid.Column="1" Grid.Row="3"
|
||||
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||
<ComboBox Name="LeadInCmBx" Grid.Column="2" Grid.Row="3"
|
||||
Style="{DynamicResource OmagCut_ComboBox}"/>
|
||||
<TextBlock Name="LeadInTxbl" Grid.Column="1" Grid.Row="3"
|
||||
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||
<ComboBox Name="LeadInCmBx" Grid.Column="2" Grid.Row="3"
|
||||
Style="{DynamicResource OmagCut_ComboBox}"/>
|
||||
|
||||
<TextBlock Name="LeadOutTxbl" Grid.Column="1" Grid.Row="3"
|
||||
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||
<ComboBox Name="LeadOutCmBx" Grid.Column="2" Grid.Row="3"
|
||||
Style="{DynamicResource OmagCut_ComboBox}"/>
|
||||
<TextBlock Name="LeadOutTxbl" Grid.Column="1" Grid.Row="3"
|
||||
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||
<ComboBox Name="LeadOutCmBx" Grid.Column="2" Grid.Row="3"
|
||||
Style="{DynamicResource OmagCut_ComboBox}"/>
|
||||
|
||||
<TextBlock Name="TangDistTxbl" Grid.Column="1" Grid.Row="4"
|
||||
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="LiTangDistTxBx" Grid.Column="2" Grid.Row="4"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
<TextBlock Name="TangDistTxbl" Grid.Column="1" Grid.Row="4"
|
||||
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="LiTangDistTxBx" Grid.Column="2" Grid.Row="4"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
|
||||
<TextBlock Name="PerpDistTxbl" Grid.Column="1" Grid.Row="5"
|
||||
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="LiPerpDistTxBx" Grid.Column="2" Grid.Row="5"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
<TextBlock Name="PerpDistTxbl" Grid.Column="1" Grid.Row="5"
|
||||
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="LiPerpDistTxBx" Grid.Column="2" Grid.Row="5"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
|
||||
<EgtWPFLib:EgtTextBox Name="LoTangDistTxBx" Grid.Column="2" Grid.Row="4"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="LoTangDistTxBx" Grid.Column="2" Grid.Row="4"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
|
||||
<EgtWPFLib:EgtTextBox Name="LoPerpDistTxBx" Grid.Column="2" Grid.Row="5"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="LoPerpDistTxBx" Grid.Column="2" Grid.Row="5"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
|
||||
<Grid Name="ButtonsGrid" Grid.Column="1" Grid.ColumnSpan="2" Grid.Row="7" Grid.RowSpan="1">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid Name="ButtonsGrid" Grid.Column="1" Grid.ColumnSpan="2" Grid.Row="7" Grid.RowSpan="1">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Button Name="OkBtn" Grid.Column="1"
|
||||
<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"
|
||||
<Image Source="{DynamicResource VImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="ExitBtn" Grid.Column="3"
|
||||
IsCancel="True"
|
||||
Style="{DynamicResource OmagCut_GradientBlueIconButton}">
|
||||
<Image Source="{DynamicResource XImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
<Image Source="{DynamicResource XImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
||||
</Border>
|
||||
</Border>
|
||||
|
||||
</Window>
|
||||
</Window>
|
||||
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
Imports System.IO
|
||||
Imports System.Collections.ObjectModel
|
||||
Imports System.Collections.ObjectModel
|
||||
Imports EgtUILib
|
||||
Imports EgtWPFLib
|
||||
|
||||
Public Class ModifStartEndWD
|
||||
|
||||
@@ -47,16 +45,16 @@ Public Class ModifStartEndWD
|
||||
Me.Left = Owner.Left + Owner.Width / 2 - Me.Width / 2
|
||||
|
||||
' Imposto i messaggi letti dal file dei messaggi
|
||||
ElongationTxbl.Text = EgtMsg(MSG_SPLITPAGEUC + 35)
|
||||
HoleTxbl.Text = EgtMsg(90875)
|
||||
LeadInTxbl.Text = EgtMsg(90769)
|
||||
LeadOutTxbl.Text = EgtMsg(90771)
|
||||
TangDistTxbl.Text = EgtMsg(90890)
|
||||
PerpDistTxbl.Text = EgtMsg(90891)
|
||||
ElongationTxbl.Text = EgtMsg(90375) ' Allungamento
|
||||
HoleTxbl.Text = EgtMsg(90875) ' Foro di attacco
|
||||
LeadInTxbl.Text = EgtMsg(90769) ' Attacco
|
||||
LeadOutTxbl.Text = EgtMsg(90771) ' Uscita
|
||||
TangDistTxbl.Text = EgtMsg(90890) ' Dist. tang.
|
||||
PerpDistTxbl.Text = EgtMsg(90891) ' Dist. perp.
|
||||
|
||||
' Mostro/Nascondo elementi in base a Inizio/Fine Modif.
|
||||
If bIsLeadIn Then
|
||||
TitleTxbl.Text = EgtMsg(MSG_SPLITPAGEUC + 33)
|
||||
TitleTxbl.Text = EgtMsg(90373) ' Inizio Modif.
|
||||
HoleTxbl.Visibility = Windows.Visibility.Visible
|
||||
HoleChBx.Visibility = Windows.Visibility.Visible
|
||||
LeadInTxbl.Visibility = Windows.Visibility.Visible
|
||||
@@ -64,16 +62,16 @@ Public Class ModifStartEndWD
|
||||
LeadOutTxbl.Visibility = Windows.Visibility.Hidden
|
||||
LeadOutCmBx.Visibility = Windows.Visibility.Hidden
|
||||
LeadInType = New ObservableCollection(Of IdNameStruct)(
|
||||
{New IdNameStruct(MCH_MIL_LI.NONE, EgtMsg(MSG_COMBOBOXPARAM + 42)),
|
||||
New IdNameStruct(MCH_MIL_LI.LINEAR, EgtMsg(MSG_COMBOBOXPARAM + 46)),
|
||||
New IdNameStruct(MCH_MIL_LI.TANGENT, EgtMsg(MSG_COMBOBOXPARAM + 47))})
|
||||
{New IdNameStruct(MCH_MIL_LI.NONE, EgtMsg(90842)), ' Nessuno
|
||||
New IdNameStruct(MCH_MIL_LI.LINEAR, EgtMsg(90846)), ' Lineare
|
||||
New IdNameStruct(MCH_MIL_LI.TANGENT, EgtMsg(90847))}) ' Tangente
|
||||
LeadInCmBx.ItemsSource = LeadInType
|
||||
LiTangDistTxBx.Visibility = Windows.Visibility.Visible
|
||||
LiPerpDistTxBx.Visibility = Windows.Visibility.Visible
|
||||
LoTangDistTxBx.Visibility = Windows.Visibility.Hidden
|
||||
LoPerpDistTxBx.Visibility = Windows.Visibility.Hidden
|
||||
Else
|
||||
TitleTxbl.Text = EgtMsg(MSG_SPLITPAGEUC + 34)
|
||||
TitleTxbl.Text = EgtMsg(90374) ' Fine Modif.
|
||||
HoleTxbl.Visibility = Windows.Visibility.Hidden
|
||||
HoleChBx.Visibility = Windows.Visibility.Hidden
|
||||
LeadInTxbl.Visibility = Windows.Visibility.Hidden
|
||||
@@ -81,10 +79,10 @@ Public Class ModifStartEndWD
|
||||
LeadOutTxbl.Visibility = Windows.Visibility.Visible
|
||||
LeadOutCmBx.Visibility = Windows.Visibility.Visible
|
||||
LeadOutType = New ObservableCollection(Of IdNameStruct)(
|
||||
{New IdNameStruct(MCH_MIL_LO.NONE, EgtMsg(MSG_COMBOBOXPARAM + 42)),
|
||||
New IdNameStruct(MCH_MIL_LO.LINEAR, EgtMsg(MSG_COMBOBOXPARAM + 46)),
|
||||
New IdNameStruct(MCH_MIL_LO.TANGENT, EgtMsg(MSG_COMBOBOXPARAM + 47)),
|
||||
New IdNameStruct(MCH_MIL_LO.AS_LI, EgtMsg(MSG_COMBOBOXPARAM + 50))})
|
||||
{New IdNameStruct(MCH_MIL_LO.NONE, EgtMsg(90842)), ' Nessuno
|
||||
New IdNameStruct(MCH_MIL_LO.LINEAR, EgtMsg(90846)), ' Lineare
|
||||
New IdNameStruct(MCH_MIL_LO.TANGENT, EgtMsg(90847)), ' Tangente
|
||||
New IdNameStruct(MCH_MIL_LO.AS_LI, EgtMsg(90850))}) ' Come attacco
|
||||
LeadOutCmBx.ItemsSource = LeadOutType
|
||||
LiTangDistTxBx.Visibility = Windows.Visibility.Hidden
|
||||
LiPerpDistTxBx.Visibility = Windows.Visibility.Hidden
|
||||
|
||||
+153
-153
@@ -1,173 +1,173 @@
|
||||
<UserControl x:Class="MoveRawPartPage"
|
||||
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:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="853.3" d:DesignWidth="1280">
|
||||
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:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
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>
|
||||
<!-- 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}">
|
||||
<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="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="NextBtn" Grid.Column="1" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource NumericKeyboardArrowImg}" Style="{DynamicResource 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="8*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<!--Upper button grid-->
|
||||
<Grid Grid.Column="1">
|
||||
<Button Name="TopLBtn" Grid.Column="0" Grid.Row="1"
|
||||
Style="{DynamicResource OmagCut_TopGrayGradientYellowButton}">
|
||||
<Image Source="{DynamicResource TopLeftImg}" Style="{DynamicResource OmagCut_ArrowButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="UpBtn" Grid.Column="1" Grid.Row="1"
|
||||
Style="{DynamicResource OmagCut_TopGrayGradientYellowButton}">
|
||||
<Image Source="{DynamicResource UpArrowImg}" Style="{DynamicResource OmagCut_ArrowButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="TopRBtn" Grid.Column="2" Grid.Row="1"
|
||||
Style="{DynamicResource OmagCut_TopGrayGradientYellowButton}">
|
||||
<Image Source="{DynamicResource TopRightImg}" Style="{DynamicResource OmagCut_ArrowButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="LeftBtn" Grid.Column="0" Grid.Row="2"
|
||||
Style="{DynamicResource OmagCut_LeftGrayGradientYellowButton}">
|
||||
<Image Source="{DynamicResource LeftArrowImg}" Style="{DynamicResource 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"
|
||||
Style="{DynamicResource OmagCut_YellowTextButton}">
|
||||
</Button>
|
||||
<Button Name="RightBtn" Grid.Column="2" Grid.Row="2"
|
||||
Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}">
|
||||
<Image Source="{DynamicResource RightArrowImg}" Style="{DynamicResource OmagCut_ArrowButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="BottomLBtn" Grid.Column="0" Grid.Row="3"
|
||||
Style="{DynamicResource OmagCut_BottomGrayGradientYellowButton}">
|
||||
<Image Source="{DynamicResource BottomLeftImg}" Style="{DynamicResource OmagCut_ArrowButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="DownBtn" Grid.Column="1" Grid.Row="3"
|
||||
Style="{DynamicResource OmagCut_BottomGrayGradientYellowButton}">
|
||||
<Image Source="{DynamicResource DownArrowImg}" Style="{DynamicResource 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>
|
||||
|
||||
<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>
|
||||
|
||||
<Grid Name="RotationAngle" Grid.Column="1" Grid.Row="4" HorizontalAlignment="Center" VerticalAlignment="Center">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="4*"/>
|
||||
<ColumnDefinition Width="8*"/>
|
||||
<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"
|
||||
Text="°"/>
|
||||
</Grid>
|
||||
|
||||
<!--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="RotateClockwiseBtn" Grid.Column="2" Grid.Row="4"
|
||||
Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}">
|
||||
<Image Source="{DynamicResource ClockwiseRotateImg}" Width="65" Height="65" HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center" />
|
||||
</Button>
|
||||
|
||||
<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="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"
|
||||
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"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
<Button Name="ResetBtn" Grid.Column="1" Grid.Row="2"
|
||||
Style="{DynamicResource OmagCut_YellowTextButton}">
|
||||
</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"
|
||||
Style="{DynamicResource OmagCut_BottomGrayGradientYellowButton}">
|
||||
<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"
|
||||
Style="{DynamicResource OmagCut_BottomGrayGradientYellowButton}">
|
||||
<Image Source="{DynamicResource BottomRightImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||
</Button>
|
||||
|
||||
<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>
|
||||
|
||||
<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"
|
||||
Text="°"/>
|
||||
</Grid>
|
||||
|
||||
<Button Name="RotateClockwiseBtn" Grid.Column="2" Grid.Row="4"
|
||||
Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}">
|
||||
<Image Source="{DynamicResource ClockwiseRotateImg}" Width="65" Height="65" HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center" />
|
||||
</Button>
|
||||
|
||||
<!--Gestione sfridi-->
|
||||
<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"
|
||||
<!--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 Grid.Row="7" Grid.ColumnSpan="3">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="10*"/>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
</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>
|
||||
|
||||
</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="{DynamicResource OmagCut_ArrowButtonIcon}"/>
|
||||
</Button>
|
||||
</Grid>
|
||||
|
||||
</Grid>
|
||||
|
||||
</UserControl>
|
||||
|
||||
+130
-42
@@ -1,5 +1,4 @@
|
||||
Imports System.Windows.Forms.Integration
|
||||
Imports EgtUILib
|
||||
Imports EgtUILib
|
||||
|
||||
Public Class MoveRawPartPage
|
||||
' Riferimento alla MainWindow
|
||||
@@ -41,11 +40,11 @@ Public Class MoveRawPartPage
|
||||
|
||||
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"
|
||||
RemovePartBtn.Content = EgtMsg(90361) ' Rimuovi
|
||||
ModifyBtn.Content = EgtMsg(90357) ' Modifica
|
||||
ResetBtn.Content = EgtMsg(90336) ' Reset
|
||||
ScrapsBtn.Content = EgtMsg(90366) ' Add Scraps
|
||||
UnloadPartsBtn.Content = EgtMsg(90367) ' Move part
|
||||
End Sub
|
||||
|
||||
Private Sub MoveRawPartPage_Loaded(sender As Object, e As EventArgs) Handles Me.Loaded
|
||||
@@ -61,7 +60,7 @@ Public Class MoveRawPartPage
|
||||
' Se movimento con ventosa, verifico se lama troppo grande
|
||||
If Not m_bByHand And Not m_MainWindow.m_CurrentMachine.IsVacuumMovePossible() Then
|
||||
m_bByHand = True
|
||||
m_CurrProjPage.SetWarningMessage(EgtMsg(MSG_SPLITPAGEUC + 11)) ' Lama troppo grande per utilizzo ventosa
|
||||
m_CurrProjPage.SetWarningMessage(EgtMsg(90351)) ' Lama troppo grande per utilizzo ventosa
|
||||
End If
|
||||
' Deseleziono tutto
|
||||
EgtDeselectAll()
|
||||
@@ -124,19 +123,26 @@ Public Class MoveRawPartPage
|
||||
If m_SplitPage.m_bOnAuxTab And m_SplitPage.m_bEnableOnAuxTab Then
|
||||
' assegnazione delle info tavola ausiliaria alla dispozione corrente (Spostato nella funzione Refresh)
|
||||
SetAuxTabInCurrDisposition()
|
||||
UnloadPartsBtn.Content = "Go to MOVE part"
|
||||
UnloadPartsBtn.Content = EgtMsg(90368) ' Go to MOVE part
|
||||
' altrimenti, aggiorno visualizzazione
|
||||
ElseIf Not m_SplitPage.m_bOnAuxTab And m_SplitPage.m_bEnableOnAuxTab Then
|
||||
EgtDraw()
|
||||
UnloadPartsBtn.Content = "Go to UNLOAD part"
|
||||
UnloadPartsBtn.Content = EgtMsg(90369) ' 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
|
||||
@@ -208,10 +214,10 @@ Public Class MoveRawPartPage
|
||||
Else
|
||||
UnloadPartsBtn.Visibility = Visibility.Visible
|
||||
If m_SplitPage.m_bOnAuxTab Then
|
||||
UnloadPartsBtn.Content = "Go to MOVE part"
|
||||
UnloadPartsBtn.Content = EgtMsg(90368) ' Go to MOVE part
|
||||
' altrimenti, aggiorno visualizzazione
|
||||
Else
|
||||
UnloadPartsBtn.Content = "Go to UNLOAD part"
|
||||
UnloadPartsBtn.Content = EgtMsg(90369) ' Go to UNLOAD part
|
||||
End If
|
||||
End If
|
||||
' Aggiorno interfaccia per taglio perpendicolare
|
||||
@@ -335,18 +341,26 @@ Public Class MoveRawPartPage
|
||||
If VerifyCollisionWithOtherRawPart(nId) Then
|
||||
' mantengo la selezione del pezzo
|
||||
EgtSetStatus(nId, GDB_ST.SEL)
|
||||
m_CurrProjPage.SetErrorMessage("Collisione pezzi")
|
||||
m_CurrProjPage.SetErrorMessage(EgtMsg(91231)) ' Collisione pezzi
|
||||
Else
|
||||
' Se con ventose, le nascondo
|
||||
If Not m_bByHand Then EgtSetStatus(GetVacuumId(), GDB_ST.OFF)
|
||||
End If
|
||||
Else
|
||||
|
||||
' verifico che il pezzo precedente possa essere depositato correttamente
|
||||
If VerifyCollisionWithOtherRawPart(m_CurrRawOnVacuum) Then
|
||||
' mantengo la selezione del pezzo
|
||||
EgtSetStatus(m_CurrRawOnVacuum, GDB_ST.SEL)
|
||||
m_CurrProjPage.SetErrorMessage("Collisione pezzi")
|
||||
m_CurrProjPage.SetErrorMessage(EgtMsg(91231)) ' Collisione pezzi
|
||||
EgtDraw()
|
||||
' 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(EgtMsg(91231)) ' Collisione pezzi
|
||||
EgtDraw()
|
||||
' esco dal ciclo, prima devo depositare correttamente il pezzo
|
||||
Exit While
|
||||
@@ -374,7 +388,7 @@ Public Class MoveRawPartPage
|
||||
VacuumCups.ResetHeadName()
|
||||
Dim bPutVacuum As Boolean = PutVacuumCupsOnRaw(nId, rmData)
|
||||
If Not bPutVacuum Then
|
||||
Dim bTwoHeadVac As Boolean = ( EgtGetHeadId( VACUUM_HEAD_2) <> GDB_ID.NULL)
|
||||
Dim bTwoHeadVac As Boolean = (EgtGetHeadId(VACUUM_HEAD_2) <> GDB_ID.NULL)
|
||||
If bTwoHeadVac Then bPutVacuum = PutVacuumCupsOnRaw(nId, rmData)
|
||||
End If
|
||||
|
||||
@@ -392,12 +406,12 @@ Public Class MoveRawPartPage
|
||||
' Aggiorno i dati
|
||||
m_bRawWithCups = False
|
||||
If VacuumCups.bOverWeight Then
|
||||
m_CurrProjPage.SetWarningMessage(EgtMsg(MSG_MOVERAWPAGEUC + 4)) 'Pezzo troppo pesante : non si può muovere
|
||||
m_CurrProjPage.SetWarningMessage(EgtMsg(90364)) ' Pezzo troppo pesante : non si può muovere
|
||||
ElseIf VacuumCups.bExtraStroke Then
|
||||
m_CurrProjPage.SetWarningMessage(EgtMsg(MSG_MOVERAWPAGEUC + 5)) 'Pezzo oltre le corse : non si può muovere
|
||||
m_CurrProjPage.SetWarningMessage(EgtMsg(90365)) ' Pezzo oltre le corse : non si può muovere
|
||||
Else
|
||||
' Messaggio di avvertimento
|
||||
m_CurrProjPage.SetWarningMessage(EgtMsg(MSG_MOVERAWPAGEUC + 2)) 'Pezzo troppo piccolo : non si può muovere
|
||||
m_CurrProjPage.SetWarningMessage(EgtMsg(90362)) ' Pezzo troppo piccolo : non si può muovere
|
||||
End If
|
||||
End If
|
||||
|
||||
@@ -421,7 +435,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
|
||||
@@ -455,23 +469,86 @@ 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
|
||||
If nVal = 1 Or nVal = 2 Then
|
||||
' 1 → è stato definito come nuovo grezzo oppure, 2 → è stato definito come nuovo grezzo ed è stato inserito nel DB delle lastre
|
||||
ScrapsBtn.Content = "Remove Scrap"
|
||||
ScrapsBtn.Content = EgtMsg(91228) ' Remove Scrap
|
||||
ScrapsBtn.IsEnabled = True And Not m_SplitPage.m_bShow
|
||||
Return True
|
||||
ElseIf nVal = 3 Then
|
||||
' non è possibile rimuovere il grezzo in questa fase
|
||||
ScrapsBtn.Content = "Defined as Scrap"
|
||||
ScrapsBtn.Content = EgtMsg(91229) ' Defined as Scrap
|
||||
ScrapsBtn.IsEnabled = False
|
||||
Return True
|
||||
End If
|
||||
End If
|
||||
' non è un nuovo grezzo
|
||||
ScrapsBtn.Content = "Add Scrap"
|
||||
ScrapsBtn.Content = EgtMsg(91230) ' Add Scrap
|
||||
ScrapsBtn.IsEnabled = True And Not m_SplitPage.m_bShow
|
||||
Return False
|
||||
End Function
|
||||
@@ -511,7 +588,7 @@ Public Class MoveRawPartPage
|
||||
VacuumCups.ptStartPointLift.y -= vtMove.y
|
||||
End If
|
||||
Else
|
||||
m_CurrProjPage.SetWarningMessage(EgtMsg(MSG_MOVERAWPAGEUC + 2)) 'Pezzo troppo piccolo : non si può muovere
|
||||
m_CurrProjPage.SetWarningMessage(EgtMsg(90362)) 'Pezzo troppo piccolo : non si può muovere
|
||||
End If
|
||||
End If
|
||||
nRawId = EgtGetNextSelectedObj()
|
||||
@@ -554,7 +631,7 @@ Public Class MoveRawPartPage
|
||||
VacuumCups.ptStartPointLift.y -= vtMove.y
|
||||
End If
|
||||
Else
|
||||
m_CurrProjPage.SetWarningMessage(EgtMsg(MSG_MOVERAWPAGEUC + 2)) 'Pezzo troppo piccolo : non si può muovere
|
||||
m_CurrProjPage.SetWarningMessage(EgtMsg(90362)) 'Pezzo troppo piccolo : non si può muovere
|
||||
End If
|
||||
End If
|
||||
nRawId = EgtGetNextSelectedObj()
|
||||
@@ -580,7 +657,7 @@ Public Class MoveRawPartPage
|
||||
VacuumCups.ptStartPointLift.x -= vtMove.x
|
||||
End If
|
||||
Else
|
||||
m_CurrProjPage.SetWarningMessage(EgtMsg(MSG_MOVERAWPAGEUC + 2)) 'Pezzo troppo piccolo : non si può muovere
|
||||
m_CurrProjPage.SetWarningMessage(EgtMsg(90362)) 'Pezzo troppo piccolo : non si può muovere
|
||||
End If
|
||||
nRawId = EgtGetNextSelectedObj()
|
||||
End While
|
||||
@@ -605,7 +682,7 @@ Public Class MoveRawPartPage
|
||||
VacuumCups.ptStartPointLift.x -= vtMove.x
|
||||
End If
|
||||
Else
|
||||
m_CurrProjPage.SetWarningMessage(EgtMsg(MSG_MOVERAWPAGEUC + 2)) 'Pezzo troppo piccolo : non si può muovere
|
||||
m_CurrProjPage.SetWarningMessage(EgtMsg(90362)) ' Pezzo troppo piccolo : non si può muovere
|
||||
End If
|
||||
nRawId = EgtGetNextSelectedObj()
|
||||
End While
|
||||
@@ -626,7 +703,7 @@ Public Class MoveRawPartPage
|
||||
Case 1
|
||||
' extra corsa sulla x-: devo ridurre del valore di extra corsa
|
||||
EgtGetOutstrokeInfo(sInfo)
|
||||
m_CurrProjPage.SetWarningMessage(EgtMsg(MSG_SIMULATIONPAGEUC + 2) & " " & sInfo) 'Extracorsa ...
|
||||
m_CurrProjPage.SetWarningMessage(EgtMsg(90552) & " " & sInfo) ' Extracorsa ...
|
||||
ptEndPointLift.x -= vtMove.x
|
||||
Dim dMaxMove As Double = VacuumCups.GetExtraStrokeValue(sInfo)
|
||||
If Math.Abs(dMaxMove - vtMove.x) <= EPS_SMALL * 100 Then
|
||||
@@ -639,7 +716,7 @@ Public Class MoveRawPartPage
|
||||
Case 2
|
||||
' extra corsa sulla x+: devo ridurre del valore di extra corsa
|
||||
EgtGetOutstrokeInfo(sInfo)
|
||||
m_CurrProjPage.SetWarningMessage(EgtMsg(MSG_SIMULATIONPAGEUC + 2) & " " & sInfo) 'Extracorsa ...
|
||||
m_CurrProjPage.SetWarningMessage(EgtMsg(90552) & " " & sInfo) ' Extracorsa ...
|
||||
ptEndPointLift.x -= vtMove.x
|
||||
Dim dMaxMove As Double = VacuumCups.GetExtraStrokeValue(sInfo)
|
||||
If Math.Abs(dMaxMove - vtMove.x) <= EPS_SMALL * 100 Then
|
||||
@@ -652,7 +729,7 @@ Public Class MoveRawPartPage
|
||||
Case 4
|
||||
' extra corsa sulla y-
|
||||
EgtGetOutstrokeInfo(sInfo)
|
||||
m_CurrProjPage.SetWarningMessage(EgtMsg(MSG_SIMULATIONPAGEUC + 2) & " " & sInfo) 'Extracorsa ...
|
||||
m_CurrProjPage.SetWarningMessage(EgtMsg(90552) & " " & sInfo) ' Extracorsa ...
|
||||
ptEndPointLift.y -= vtMove.y
|
||||
Dim dMaxMove As Double = VacuumCups.GetExtraStrokeValue(sInfo)
|
||||
If Math.Abs(dMaxMove - vtMove.y) <= EPS_SMALL * 100 Then
|
||||
@@ -665,7 +742,7 @@ Public Class MoveRawPartPage
|
||||
Case 8
|
||||
' extra corsa sulla y+
|
||||
EgtGetOutstrokeInfo(sInfo)
|
||||
m_CurrProjPage.SetWarningMessage(EgtMsg(MSG_SIMULATIONPAGEUC + 2) & " " & sInfo) 'Extracorsa ...
|
||||
m_CurrProjPage.SetWarningMessage(EgtMsg(90552) & " " & sInfo) ' Extracorsa ...
|
||||
ptEndPointLift.y -= vtMove.y
|
||||
Dim dMaxMove As Double = VacuumCups.GetExtraStrokeValue(sInfo)
|
||||
If Math.Abs(dMaxMove - vtMove.y) <= EPS_SMALL * 100 Then
|
||||
@@ -710,7 +787,7 @@ Public Class MoveRawPartPage
|
||||
VacuumCups.dDegRotStartAng -= dAng
|
||||
End If
|
||||
Else
|
||||
m_CurrProjPage.SetWarningMessage(EgtMsg(MSG_MOVERAWPAGEUC + 2)) 'Pezzo troppo piccolo : non si può muovere
|
||||
m_CurrProjPage.SetWarningMessage(EgtMsg(90362)) ' Pezzo troppo piccolo : non si può muovere
|
||||
End If
|
||||
nRawId = EgtGetNextSelectedObj()
|
||||
End While
|
||||
@@ -744,7 +821,7 @@ Public Class MoveRawPartPage
|
||||
VacuumCups.dDegRotStartAng -= dAng
|
||||
End If
|
||||
Else
|
||||
m_CurrProjPage.SetWarningMessage(EgtMsg(MSG_MOVERAWPAGEUC + 2)) 'Pezzo troppo piccolo : non si può muovere
|
||||
m_CurrProjPage.SetWarningMessage(EgtMsg(90362)) ' Pezzo troppo piccolo : non si può muovere
|
||||
End If
|
||||
nRawId = EgtGetNextSelectedObj()
|
||||
End While
|
||||
@@ -765,7 +842,7 @@ Public Class MoveRawPartPage
|
||||
Case 16
|
||||
' extra corsa sulla c-
|
||||
EgtGetOutstrokeInfo(sInfo)
|
||||
m_CurrProjPage.SetWarningMessage(EgtMsg(MSG_SIMULATIONPAGEUC + 2) & " " & sInfo) 'Extracorsa ...
|
||||
m_CurrProjPage.SetWarningMessage(EgtMsg(90552) & " " & sInfo) ' Extracorsa ...
|
||||
ptEndPointLift.Rotate(ptCenter, Vector3d.Z_AX(), -dAngDeg)
|
||||
dDegRotEndAng -= dAngDeg
|
||||
dAngDeg += VacuumCups.GetExtraStrokeValue(sInfo) + EPS_SMALL
|
||||
@@ -775,7 +852,7 @@ Public Class MoveRawPartPage
|
||||
Case 34
|
||||
' extra corsa sulla c+
|
||||
EgtGetOutstrokeInfo(sInfo)
|
||||
m_CurrProjPage.SetWarningMessage(EgtMsg(MSG_SIMULATIONPAGEUC + 2) & " " & sInfo) 'Extracorsa ...
|
||||
m_CurrProjPage.SetWarningMessage(EgtMsg(90552) & " " & sInfo) ' Extracorsa ...
|
||||
ptEndPointLift.Rotate(ptCenter, Vector3d.Z_AX(), -dAngDeg)
|
||||
dDegRotEndAng -= dAngDeg
|
||||
dAngDeg -= VacuumCups.GetExtraStrokeValue(sInfo) + EPS_SMALL
|
||||
@@ -789,6 +866,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
|
||||
@@ -856,6 +939,7 @@ Public Class MoveRawPartPage
|
||||
' Mantengo la fase che è stata creata e passo a gestire solo la visualizzazione dei bottoni
|
||||
RefreshVisibility()
|
||||
EgtZoom(ZM.ALL, True)
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub StepMoveTxBx_EgtClosed(sender As Object, e As EventArgs) Handles StepMoveTxBx.EgtClosed
|
||||
@@ -1003,7 +1087,7 @@ Public Class MoveRawPartPage
|
||||
Else
|
||||
EgtMoveRawPart(nRawId, ptRawCen - ptNewRawCen)
|
||||
EgtRotateRawPart(nRawId, Vector3d.Z_AX(), -dAngRaw)
|
||||
m_CurrProjPage.SetWarningMessage(EgtMsg(MSG_MOVERAWPAGEUC + 3)) ' Posizione scelta già occupata
|
||||
m_CurrProjPage.SetWarningMessage(EgtMsg(90363)) ' Posizione scelta già occupata
|
||||
End If
|
||||
' Disabilito pezzo e nascondo le ventose
|
||||
EgtSetStatus(nRawId, GDB_ST.ON_)
|
||||
@@ -1291,7 +1375,7 @@ Public Class MoveRawPartPage
|
||||
Return
|
||||
End If
|
||||
|
||||
' ------- VISUALIZZAZIONE -------
|
||||
' ------- VISUALIZZAZIONE (navigazione tra le fasi) -------
|
||||
If m_SplitPage.m_bShow Then
|
||||
' verifico se la fase successiva è uno scarico frontale
|
||||
If NextOperationIsUnloading(m_nCurrDisposition) Then
|
||||
@@ -1435,7 +1519,12 @@ Public Class MoveRawPartPage
|
||||
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
|
||||
' Se esistono delle lavorazioni allora abilito il pulsante per procedere
|
||||
If Not bExistsMachining Then
|
||||
@@ -1443,7 +1532,6 @@ Public Class MoveRawPartPage
|
||||
Else
|
||||
NextBtn.IsEnabled = True
|
||||
End If
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
+85
-58
@@ -1,12 +1,12 @@
|
||||
<UserControl x:Class="NestPageUC"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="853.3" d:DesignWidth="1280" Initialized="NestPage_Initialized" Loaded="NestPage_Loaded" Unloaded="NestPage_Unloaded">
|
||||
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="853.3" d:DesignWidth="1280" Initialized="NestPage_Initialized" Loaded="NestPage_Loaded" Unloaded="NestPage_Unloaded">
|
||||
|
||||
<!-- Definizione della NestPage -->
|
||||
<Grid Name="NestPageGrid">
|
||||
<Grid.ColumnDefinitions>
|
||||
@@ -38,39 +38,39 @@
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<Button Name="PartRotOnBtn" Grid.Column="0" Grid.Row="1"
|
||||
Style="{DynamicResource OmagCut_YellowIconButton}" Width="48" Height="48">
|
||||
Style="{DynamicResource OmagCut_YellowIconButton}" Width="48" Height="48">
|
||||
<Image Source="{DynamicResource PartRotOnImg}" HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center" />
|
||||
</Button>
|
||||
<Button Name="PartRotOffBtn" Grid.Column="2" Grid.Row="1"
|
||||
Style="{DynamicResource OmagCut_YellowIconButton}" Width="48" Height="48">
|
||||
Style="{DynamicResource OmagCut_YellowIconButton}" Width="48" Height="48">
|
||||
<Image Source="{DynamicResource PartRotOffImg}" HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center" />
|
||||
VerticalAlignment="Center" />
|
||||
</Button>
|
||||
|
||||
<Button Name="UpBtn" Grid.Column="1" Grid.Row="1"
|
||||
Style="{DynamicResource OmagCut_TopGrayGradientYellowButton}">
|
||||
Style="{DynamicResource OmagCut_TopGrayGradientYellowButton}">
|
||||
<Image Source="{DynamicResource UpArrowImg}" Style="{DynamicResource OmagCut_ArrowButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="LeftBtn" Grid.Column="0" Grid.Row="2"
|
||||
Style="{DynamicResource OmagCut_LeftGrayGradientYellowButton}">
|
||||
Style="{DynamicResource OmagCut_LeftGrayGradientYellowButton}">
|
||||
<Image Source="{DynamicResource LeftArrowImg}" Style="{DynamicResource OmagCut_ArrowButtonIcon}"/>
|
||||
</Button>
|
||||
<ToggleButton Name="MaximizeMoveBtn" Grid.Column="1" Grid.Row="2"
|
||||
Style="{DynamicResource OmagCut_YellowIconToggleButton}">
|
||||
Style="{DynamicResource OmagCut_YellowIconToggleButton}">
|
||||
<Image Source="../Resources/MaxMove.png" Style="{DynamicResource OmagCut_ScaleButtonIcon}"/>
|
||||
</ToggleButton>
|
||||
<Button Name="RightBtn" Grid.Column="2" Grid.Row="2"
|
||||
Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}">
|
||||
Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}">
|
||||
<Image Source="{DynamicResource RightArrowImg}" Style="{DynamicResource OmagCut_ArrowButtonIcon}"/>
|
||||
</Button>
|
||||
|
||||
<EgtWPFLib:EgtTextBox Name="StepMoveTxBx" Grid.Column="0" Grid.Row="3" Width="50"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
|
||||
<Button Name="DownBtn" Grid.Column="1" Grid.Row="3"
|
||||
Style="{DynamicResource OmagCut_BottomGrayGradientYellowButton}">
|
||||
<Image Source="{DynamicResource DownArrowImg}" Style="{DynamicResource OmagCut_ArrowButtonIcon}"/>
|
||||
Style="{DynamicResource OmagCut_BottomGrayGradientYellowButton}">
|
||||
<Image Source="{DynamicResource DownArrowImg}" Style="{DynamicResource OmagCut_ArrowButtonIcon}"/>
|
||||
</Button>
|
||||
|
||||
<Grid Grid.Column="2" Grid.Row="3" HorizontalAlignment="Center" VerticalAlignment="Center">
|
||||
@@ -79,58 +79,86 @@
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<EgtWPFLib:EgtTextBox Name="RotationAngleTxBx" Width="50" IsLength="False"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
<TextBlock Grid.Column="1" FontSize="30" Margin="2,-5,0,0"
|
||||
Text="°"/>
|
||||
Text="°"/>
|
||||
</Grid>
|
||||
|
||||
<Button Name="RotateCounterClockwiseBtn" Grid.Column="0" Grid.Row="4"
|
||||
Style="{DynamicResource OmagCut_LeftGrayGradientYellowButton}">
|
||||
Style="{DynamicResource OmagCut_LeftGrayGradientYellowButton}">
|
||||
<Image Source="{DynamicResource CounterClockwiseRotateImg}" Width="64" Height="65" HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center" />
|
||||
VerticalAlignment="Center" />
|
||||
</Button>
|
||||
<ToggleButton Name="MagneticPiecesBtn" Grid.Column="1" Grid.Row="4"
|
||||
Style="{DynamicResource OmagCut_YellowIconToggleButton}">
|
||||
Style="{DynamicResource OmagCut_YellowIconToggleButton}">
|
||||
<Image Source="{DynamicResource AlignPiecesImg}" Width="65" Height="65" HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center" />
|
||||
VerticalAlignment="Center" />
|
||||
</ToggleButton>
|
||||
<Button Name="RotateClockwiseBtn" Grid.Column="2" Grid.Row="4"
|
||||
Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}">
|
||||
Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}">
|
||||
<Image Source="{DynamicResource ClockwiseRotateImg}" Width="65" Height="65" HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center" />
|
||||
VerticalAlignment="Center" />
|
||||
</Button>
|
||||
|
||||
<UniformGrid Name ="UG0" Grid.Column="0" Grid.Row="5" Grid.ColumnSpan="3" Columns="3" >
|
||||
<Button Name="InsertPartBtn" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource Inserisci-pezzoImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="StorePartBtn" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource Parcheggia-pezzoImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||
</Button>
|
||||
<ToggleButton Name="StartCurveWJBtn" Style="{DynamicResource OmagCut_YellowIconToggleButton}">
|
||||
<Image Source="{DynamicResource StartWJImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||
</ToggleButton>
|
||||
</UniformGrid>
|
||||
|
||||
<UniformGrid Name ="UG1" Grid.Column="0" Grid.Row="6" Grid.ColumnSpan="3" Columns="3" >
|
||||
<Button Name="RemovePartBtn" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource Elimina-pezzoImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||
</Button>
|
||||
<ToggleButton Name="DragRettanleBtn" Style="{DynamicResource OmagCut_YellowIconToggleButton}">
|
||||
<Image Source="{DynamicResource Drag_RettangleImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||
</ToggleButton>
|
||||
<ToggleButton Name="SplitCurveWJBtn" Style="{DynamicResource OmagCut_YellowIconToggleButton}">
|
||||
<Image Source="{DynamicResource SplitWJImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||
</ToggleButton>
|
||||
</UniformGrid>
|
||||
<!--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="{DynamicResource OmagCut_ArrowButtonIcon}"/>
|
||||
</ToggleButton>
|
||||
<ToggleButton Name="ModPointRegBtn" Style="{DynamicResource OmagCut_YellowIconToggleButton}">
|
||||
<Image Source="{DynamicResource Move-Spot-RegImg}" Style="{DynamicResource OmagCut_ArrowButtonIcon}"/>
|
||||
</ToggleButton>
|
||||
<ToggleButton Name="RemovePointRegBtn" Visibility="Hidden"
|
||||
Style="{DynamicResource OmagCut_YellowIconToggleButton}">
|
||||
<Image Source="{DynamicResource RefTabImg}" Style="{DynamicResource OmagCut_ArrowButtonIcon}"/>
|
||||
</ToggleButton>
|
||||
</UniformGrid>
|
||||
|
||||
<UniformGrid Grid.Column="0" Grid.Row="7" Grid.ColumnSpan="3" Columns="2" >
|
||||
<Button Name="SelectAllBtn" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource Seleziona-tuttoImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="DeselectAllBtn" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource Deseleziona-tuttoImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||
</Button>
|
||||
<!--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="{DynamicResource OmagCut_ArrowButtonIcon}"/>
|
||||
</Button>
|
||||
<ToggleButton Name="ActivatePointRegBtn" Style="{DynamicResource OmagCut_YellowIconToggleButton}">
|
||||
<Image Source="{DynamicResource ON_OFF-REGImg}" Style="{DynamicResource 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="{DynamicResource OmagCut_ArrowButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="StorePartBtn" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource Parcheggia-pezzoImg}" Style="{DynamicResource OmagCut_ArrowButtonIcon}"/>
|
||||
</Button>
|
||||
<ToggleButton Name="StartCurveWJBtn" Style="{DynamicResource OmagCut_YellowIconToggleButton}">
|
||||
<Image Source="{DynamicResource StartWJImg}" Style="{DynamicResource OmagCut_ArrowButtonIcon}"/>
|
||||
</ToggleButton>
|
||||
</UniformGrid>
|
||||
|
||||
<UniformGrid Name ="UG1" Grid.Column="0" Grid.Row="6" Grid.ColumnSpan="3" Columns="3" >
|
||||
<Button Name="RemovePartBtn" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource Elimina-pezzoImg}" Style="{DynamicResource OmagCut_ArrowButtonIcon}"/>
|
||||
</Button>
|
||||
<ToggleButton Name="DragRettanleBtn" Style="{DynamicResource OmagCut_YellowIconToggleButton}">
|
||||
<Image Source="{DynamicResource Drag_RettangleImg}" Style="{DynamicResource OmagCut_ArrowButtonIcon}"/>
|
||||
</ToggleButton>
|
||||
<ToggleButton Name="SplitCurveWJBtn" Style="{DynamicResource OmagCut_YellowIconToggleButton}">
|
||||
<Image Source="{DynamicResource SplitWJImg}" Style="{DynamicResource OmagCut_ArrowButtonIcon}"/>
|
||||
</ToggleButton>
|
||||
</UniformGrid>
|
||||
|
||||
<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="{DynamicResource OmagCut_ArrowButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="DeselectAllBtn" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource Deseleziona-tuttoImg}" Style="{DynamicResource OmagCut_ArrowButtonIcon}"/>
|
||||
</Button>
|
||||
<ToggleButton Name="ParkIndBtn" Style="{DynamicResource OmagCut_YellowIconToggleButton}">
|
||||
<Image Name="ParkIndImg" Source="{DynamicResource ParkingImg}" Style="{DynamicResource OmagCut_ArrowButtonIcon}"/>
|
||||
</ToggleButton>
|
||||
</UniformGrid>
|
||||
|
||||
</Grid>
|
||||
@@ -146,7 +174,6 @@
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
</Grid>
|
||||
|
||||
</Grid>
|
||||
|
||||
|
||||
</UserControl>
|
||||
|
||||
+1003
-44
File diff suppressed because it is too large
Load Diff
@@ -1,9 +1,9 @@
|
||||
<Window x:Class="OpenFileWD"
|
||||
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="682.6" Width="426.6" WindowStyle="None" ResizeMode="NoResize" ShowInTaskbar="False" AllowsTransparency="True" Background="Transparent">
|
||||
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="682.6" Width="426.6" WindowStyle="None" ResizeMode="NoResize" ShowInTaskbar="False" AllowsTransparency="True" Background="Transparent">
|
||||
|
||||
<Border Style="{DynamicResource OmagCut_Border}">
|
||||
<Grid>
|
||||
@@ -23,7 +23,7 @@
|
||||
|
||||
<Label Name="FilePathTxBl" Grid.Column="1" Grid.Row="1" Foreground="White" FontSize="20" VerticalAlignment="Center"/>
|
||||
<ListBox Name="FileListBox" Grid.Column="1" Grid.Row="2" ItemTemplate="{DynamicResource DataTemplateItem}"
|
||||
ItemsSource="{Binding ItemList}"/>
|
||||
ItemsSource="{Binding ItemList}"/>
|
||||
|
||||
<Grid Grid.Column="1" Grid.Row="4">
|
||||
<Grid.ColumnDefinitions>
|
||||
@@ -35,10 +35,10 @@
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Button Name="OkBtn" Grid.Column="1" Style="{DynamicResource OmagCut_GradientBlueIconButton}" >
|
||||
<Image Source="{DynamicResource VImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
<Image Source="{DynamicResource VImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="ExitBtn" Grid.Column="3" Style="{DynamicResource OmagCut_GradientBlueIconButton}" IsCancel="True">
|
||||
<Image Source="{DynamicResource XImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
<Image Source="{DynamicResource XImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
|
||||
</Grid>
|
||||
|
||||
@@ -0,0 +1,95 @@
|
||||
<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="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
</Grid>
|
||||
|
||||
</Grid>
|
||||
|
||||
</Border>
|
||||
</UserControl>
|
||||
@@ -0,0 +1,919 @@
|
||||
Imports System.ComponentModel
|
||||
Imports System.Globalization
|
||||
Imports System.Xml
|
||||
Imports EgtUILib
|
||||
Imports OmagCUT.NestPageUC
|
||||
|
||||
Public Class SelParkIndWD
|
||||
|
||||
Private Shared m_MainWindow As MainWindow = DirectCast(Application.Current.MainWindow, MainWindow)
|
||||
Private m_nCtx As Integer = -1
|
||||
Public Const nIndAllOff As Integer = 999
|
||||
|
||||
Public Shared sActualProj As String = String.Empty
|
||||
|
||||
Private m_ParkIndList As New List(Of ParkInd)
|
||||
Public Property ParkIndList As List(Of ParkInd)
|
||||
Get
|
||||
Return m_ParkIndList
|
||||
End Get
|
||||
Set(value As List(Of ParkInd))
|
||||
m_ParkIndList = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Sub New(Owner As Window, Optional nCtx As Integer = -1)
|
||||
'Me.Owner = Owner
|
||||
InitializeComponent()
|
||||
If nCtx > -1 Then m_nCtx = nCtx
|
||||
End Sub
|
||||
|
||||
Public Sub Me_Laoded() Handles Me.Loaded
|
||||
' Aggiorno la lista
|
||||
UpdateList()
|
||||
' Imposto la selezione del primo parcheggio disponibile
|
||||
UpdateDefaultSelection()
|
||||
End Sub
|
||||
|
||||
Public Sub UpdateList()
|
||||
' Carico lista dei pezzi
|
||||
LoadParkInd(m_ParkIndList, m_nCtx)
|
||||
ParkIndListBox.ItemsSource = m_ParkIndList
|
||||
UpdateDefaultSelection()
|
||||
' Forzo l'aggiornamento della grafica
|
||||
ParkIndListBox.Items.Refresh()
|
||||
End Sub
|
||||
|
||||
Public Sub UpdateDefaultSelection()
|
||||
' Procedo a selezionare il primo (E FORSE ANCHE L'UNICO?) parcheggio attivo
|
||||
Dim bFound As Boolean = False
|
||||
For Each ItemPark As ParkInd In m_ParkIndList
|
||||
If ItemPark.IsStatusON Then
|
||||
ParkIndListBox.SelectedItem = ItemPark
|
||||
bFound = True
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
If Not bFound And m_ParkIndList.Count > 0 Then
|
||||
m_ParkIndList(0).Status = GDB_ST.ON_
|
||||
ParkIndListBox.SelectedItem = m_ParkIndList(0)
|
||||
End If
|
||||
'' Provedo a spegnere tutti gli altri parcheggi
|
||||
'For Each ItemParkInd As ParkInd In m_ParkIndList
|
||||
' If ParkIndListBox.SelectedItem.Ind <> ItemParkInd.Ind Then
|
||||
' ItemParkInd.Status = GDB_ST.OFF
|
||||
' SetStatusPartInParkInd(ItemParkInd)
|
||||
' End If
|
||||
'Next
|
||||
End Sub
|
||||
|
||||
Private Sub ParkIndListBox_SelectionChanged() Handles ParkIndListBox.MouseLeftButtonUp
|
||||
' Non so se il click sta accendeno o spegnendo quinid faccio una verifica dello stato attuale del parcheggio
|
||||
Dim localParkInd As ParkInd = ParkIndListBox.SelectedItem
|
||||
' Se l'elemento selezionato è attivo allora esco (perchè altrimenti lo spegnerei)
|
||||
If localParkInd.IsStatusON Then Return
|
||||
Dim bFound As Boolean = False
|
||||
If localParkInd.Ind = nIndAllOff Then
|
||||
localParkInd.Status = GDB_ST.ON_
|
||||
bFound = True
|
||||
End If
|
||||
Dim nPartId As Integer = EgtGetFirstPart()
|
||||
' Cerco il primo pezzo del parcheggio indicato
|
||||
While nPartId <> GDB_ID.NULL And Not bFound
|
||||
Dim sInfoParkInd As String = String.Empty
|
||||
' Se i pezzi non hanno un indice di parcheggio di default vale "0"
|
||||
If Not EgtGetInfo(nPartId, INFO_PARKIND, sInfoParkInd) Then sInfoParkInd = "0"
|
||||
If localParkInd.Ind.ToString = sInfoParkInd Then
|
||||
' Determino lo stato da assegnare al parcheggio (prendo il primo pezzo del parcheggio come riferimento)
|
||||
Dim OppositStat As Integer = If(localParkInd.Status = GDB_ST.ON_, GDB_ST.OFF, GDB_ST.ON_)
|
||||
localParkInd.Status = OppositStat
|
||||
bFound = True
|
||||
' termino la ricerca
|
||||
Exit While
|
||||
End If
|
||||
nPartId = EgtGetNextPart(nPartId)
|
||||
End While
|
||||
' Assegno lo stato del parcheggio a tutti i pezzi i parcheggio
|
||||
If bFound Then
|
||||
SetStatusPartInParkInd(localParkInd, True, m_nCtx)
|
||||
Else
|
||||
' Significa che i pezzi sono tutti in macchina: quindi i pezzi sono (SICURAMENTE?) accesi
|
||||
Dim OppositStat As Integer = If(localParkInd.Status = GDB_ST.ON_, GDB_ST.OFF, GDB_ST.ON_)
|
||||
localParkInd.Status = OppositStat
|
||||
SetStatusPartInParkInd(localParkInd, True, m_nCtx)
|
||||
End If
|
||||
' Se accendo un parcheggio procedo a spegnere tutto gli atri
|
||||
If localParkInd.Status = GDB_ST.ON_ Then
|
||||
For Each ItemParkInd As ParkInd In m_ParkIndList
|
||||
If localParkInd.Ind <> ItemParkInd.Ind Then
|
||||
ItemParkInd.Status = GDB_ST.OFF
|
||||
SetStatusPartInParkInd(ItemParkInd, True, m_nCtx)
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
EgtZoom(ZM.ALL)
|
||||
End Sub
|
||||
|
||||
#Region "METODI SHARED per gestione della lista parcheggi"
|
||||
|
||||
' Restituisce il primo indice di parcheggio libero
|
||||
Public Shared Function NewParkInd(Optional nCtx As Integer = -1) As Integer
|
||||
' recupero il contesto corrente
|
||||
Dim CurrCtx As Integer = EgtGetCurrentContext()
|
||||
' recupero il contesto del progetto
|
||||
Dim ProjCtx As Integer = m_MainWindow.m_CurrentProjectPageUC.CurrentProjectScene.GetCtx()
|
||||
If nCtx > -1 Then ProjCtx = nCtx
|
||||
EgtSetCurrentContext(ProjCtx)
|
||||
Dim LastParkInd As Integer = 0
|
||||
Dim nRawId As Integer = GetCurrentRaw()
|
||||
' Leggo l'indice di parcheggio dei pezzi in tavola
|
||||
Dim nPartId As Integer = EgtGetFirstGroupInGroup(nRawId)
|
||||
While nPartId <> GDB_ID.NULL
|
||||
' Se i pezzi non hanno un indice di parcheggio
|
||||
Dim sInfoParkInd As String = String.Empty
|
||||
If EgtGetInfo(nPartId, INFO_PARKIND, sInfoParkInd) Then
|
||||
If IsNumeric(sInfoParkInd) Then
|
||||
Dim nInfoParkIndn As Integer = CInt(sInfoParkInd)
|
||||
LastParkInd = Math.Max(LastParkInd, nInfoParkIndn)
|
||||
End If
|
||||
End If
|
||||
nPartId = EgtGetNextGroup(nPartId)
|
||||
End While
|
||||
' Leggo l'indice di parcheggio dei pezzi in parcheggio
|
||||
nPartId = EgtGetFirstPart()
|
||||
While nPartId <> GDB_ID.NULL
|
||||
' Se i pezzi non hanno un indice di parcheggio (COPIA della funzione sopra)
|
||||
Dim sInfoParkInd As String = String.Empty
|
||||
If EgtGetInfo(nPartId, INFO_PARKIND, sInfoParkInd) Then
|
||||
If IsNumeric(sInfoParkInd) Then
|
||||
Dim nInfoParkIndn As Integer = CInt(sInfoParkInd)
|
||||
LastParkInd = Math.Max(LastParkInd, nInfoParkIndn)
|
||||
End If
|
||||
End If
|
||||
nPartId = EgtGetNextPart(nPartId)
|
||||
End While
|
||||
' Ripristino il contesto corrente
|
||||
EgtSetCurrentContext(CurrCtx)
|
||||
Return LastParkInd + 1
|
||||
End Function
|
||||
|
||||
' Gestisce lo stato dei pezzi associati al parcheggio indicato
|
||||
Public Shared Sub SetStatusPartInParkInd(localParkInd As ParkInd, Optional bDraw As Boolean = True, Optional nCtx As Integer = -1)
|
||||
If IsNothing(localParkInd) Then Return
|
||||
' recupero il contesto corrente
|
||||
Dim CurrCtx As Integer = EgtGetCurrentContext()
|
||||
' recupero il contesto del progetto
|
||||
Dim ProjCtx As Integer = m_MainWindow.m_CurrentProjectPageUC.CurrentProjectScene.GetCtx()
|
||||
If nCtx > -1 Then ProjCtx = nCtx
|
||||
EgtSetCurrentContext(ProjCtx)
|
||||
Dim nRawId As Integer = GetCurrentRaw()
|
||||
' Pezzi in tavola
|
||||
Dim nPartId As Integer = EgtGetFirstGroupInGroup(nRawId)
|
||||
While nPartId <> GDB_ID.NULL
|
||||
Dim sInfoParkInd As String = String.Empty
|
||||
If Not EgtGetInfo(nPartId, INFO_PARKIND, sInfoParkInd) Then sInfoParkInd = "0"
|
||||
If localParkInd.Ind.ToString = sInfoParkInd Then
|
||||
' Salvo lo stato del parcheggio (per gestire la navigazione) ANCHE SE I PEZZI SONO ACCESI
|
||||
EgtSetInfo(nPartId, INFO_PARKSTATUS, localParkInd.Status)
|
||||
End If
|
||||
nPartId = EgtGetNextGroup(nPartId)
|
||||
End While
|
||||
' Pezzi in parcheggio
|
||||
nPartId = EgtGetFirstPart()
|
||||
While nPartId <> GDB_ID.NULL
|
||||
Dim sInfoParkInd As String = String.Empty
|
||||
If Not EgtGetInfo(nPartId, INFO_PARKIND, sInfoParkInd) Then sInfoParkInd = "0"
|
||||
If localParkInd.Ind.ToString = sInfoParkInd Then
|
||||
' Setto lo stato
|
||||
EgtSetStatus(nPartId, localParkInd.Status)
|
||||
' Salvo lo stato (per gestire la navigazione)
|
||||
EgtSetInfo(nPartId, INFO_PARKSTATUS, localParkInd.Status)
|
||||
End If
|
||||
nPartId = EgtGetNextPart(nPartId)
|
||||
End While
|
||||
If bDraw Then EgtDraw()
|
||||
' Ripristino il contesto corrente
|
||||
EgtSetCurrentContext(CurrCtx)
|
||||
End Sub
|
||||
|
||||
' Restituuisce la lista dei parcheggi del progetto corrente
|
||||
Public Shared Sub LoadParkInd(P_List As List(Of ParkInd), Optional nCtx As Integer = -1)
|
||||
If IsNothing(P_List) Then Return
|
||||
P_List.Clear()
|
||||
P_List.Add(New ParkInd(nIndAllOff, "All off", 0))
|
||||
' recupero il contesto corrente
|
||||
Dim CurrCtx As Integer = EgtGetCurrentContext()
|
||||
' recupero il contesto del progetto
|
||||
Dim ProjCtx As Integer = m_MainWindow.m_CurrentProjectPageUC.CurrentProjectScene.GetCtx()
|
||||
If nCtx > -1 Then ProjCtx = nCtx
|
||||
EgtSetCurrentContext(ProjCtx)
|
||||
Dim nRawId As Integer = GetCurrentRaw()
|
||||
' Pezzi in tavola
|
||||
Dim nPartId As Integer = EgtGetFirstGroupInGroup(nRawId)
|
||||
While nPartId <> GDB_ID.NULL
|
||||
Dim sInfoParkInd As String = String.Empty
|
||||
Dim nInfoParkInd As Integer = -1
|
||||
' Recupero l'indice del parcheggio
|
||||
If EgtGetInfo(nPartId, INFO_PARKIND, sInfoParkInd) Then
|
||||
nInfoParkInd = If(IsNumeric(sInfoParkInd), CInt(sInfoParkInd), -1)
|
||||
Else
|
||||
nInfoParkInd = 0
|
||||
End If
|
||||
' Se l'indice di parcheggio restituito è valido (Maggiore di -1)
|
||||
If nInfoParkInd > -1 Then
|
||||
' Verifico se nella lista dei parcheggi è già presente l'indice indicato
|
||||
Dim localParkInd As ParkInd = P_List.Find(Function(x) x.Ind = nInfoParkInd)
|
||||
' Se non trovo nessun parcheggio con questo indice allora lo aggiungo
|
||||
If IsNothing(localParkInd) Then
|
||||
Dim nStatus As Integer
|
||||
If Not EgtGetInfo(nPartId, INFO_PARKSTATUS, nStatus) Then nStatus = GDB_ST.ON_
|
||||
' EgtGetStatus(nPartId, nStatus)
|
||||
P_List.Add(New ParkInd(nInfoParkInd, "Park_" & nInfoParkInd.ToString, nStatus))
|
||||
End If
|
||||
End If
|
||||
nPartId = EgtGetNextGroup(nPartId)
|
||||
End While
|
||||
' Pezzi in parcheggio
|
||||
nPartId = EgtGetFirstPart()
|
||||
While nPartId <> GDB_ID.NULL
|
||||
Dim sInfoParkInd As String = String.Empty
|
||||
Dim nInfoParkInd As Integer = -1
|
||||
' Recupero l'indice del parcheggio
|
||||
If EgtGetInfo(nPartId, INFO_PARKIND, sInfoParkInd) Then
|
||||
nInfoParkInd = If(IsNumeric(sInfoParkInd), CInt(sInfoParkInd), -1)
|
||||
Else
|
||||
nInfoParkInd = 0
|
||||
End If
|
||||
' Se l'indice di parcheggio restituito è valido (Maggiore di -1)
|
||||
If nInfoParkInd > -1 Then
|
||||
' Verifico se nella lista dei parcheggi è già presente l'indice indicato
|
||||
Dim localParkInd As ParkInd = P_List.Find(Function(x) x.Ind = nInfoParkInd)
|
||||
' Se non trovo nessun parcheggio con questo indice allora lo aggiungo
|
||||
If IsNothing(localParkInd) Then
|
||||
Dim nStatus As Integer
|
||||
If Not EgtGetInfo(nPartId, INFO_PARKSTATUS, nStatus) Then nStatus = GDB_ST.ON_
|
||||
' EgtGetStatus(nPartId, nStatus)
|
||||
P_List.Add(New ParkInd(nInfoParkInd, "Park_" & nInfoParkInd.ToString, nStatus))
|
||||
End If
|
||||
End If
|
||||
nPartId = EgtGetNextPart(nPartId)
|
||||
End While
|
||||
EgtSetCurrentContext(CurrCtx)
|
||||
End Sub
|
||||
|
||||
' Aggiorna la lista dei parcheggi, se "bDraw=true" aggiorno la scena
|
||||
Public Shared Sub UpdateViewOnParkInd(Optional bDraw As Boolean = True)
|
||||
' Ricarico la lista dei parcheggi
|
||||
Dim ListParkInd As New List(Of ParkInd)
|
||||
SelParkIndWD.LoadParkInd(ListParkInd)
|
||||
' Aggiorna la vista dei parcheggi
|
||||
For Each Item As ParkInd In ListParkInd
|
||||
SelParkIndWD.SetStatusPartInParkInd(Item, bDraw)
|
||||
Next
|
||||
End Sub
|
||||
|
||||
' Restituisce il primo parcheggio attivo (
|
||||
Public Shared Function GetCurrentParkIndSelected() As ParkInd
|
||||
Dim ListParkInd As New List(Of ParkInd)
|
||||
SelParkIndWD.LoadParkInd(ListParkInd)
|
||||
' Procedo a selezionare il primo (E ANCHE UNICO?..a volte no..) parcheggio attivo -> guarda funzione UpdateList <-
|
||||
For Each ItemPark As ParkInd In ListParkInd
|
||||
If ItemPark.IsStatusON Then
|
||||
Return ItemPark
|
||||
End If
|
||||
Next
|
||||
Return Nothing
|
||||
End Function
|
||||
|
||||
' Restitusice il nome del file immagine del parcheggio (manance solo dell'Indice di parcheggio e dell'esetensione png)
|
||||
Public Shared Function GetPathCurrProj() As String
|
||||
Dim nProj As Integer = m_MainWindow.m_CurrentProjectPageUC.GetCurrentProject()
|
||||
Dim sParkPath As String = m_MainWindow.GetSaveDir() & "\" & Math.Abs(nProj).ToString("D4") & "_ParkInd_"
|
||||
If Not String.IsNullOrEmpty(sActualProj) Then
|
||||
Dim sDir As String = System.IO.Path.GetDirectoryName(sActualProj)
|
||||
Dim sFile As String = System.IO.Path.GetFileNameWithoutExtension(sActualProj)
|
||||
sParkPath = sDir & "\" & sFile & "_ParkInd_"
|
||||
End If
|
||||
Return sParkPath
|
||||
End Function
|
||||
|
||||
Public Shared Sub CopyImgSvg(sNewFileName As String, Optional nCtx As Integer = -1)
|
||||
If sNewFileName.EndsWith(".nge") Then
|
||||
sNewFileName = sNewFileName.Remove(sNewFileName.Length - 4, 4) & "_ParkInd_"
|
||||
End If
|
||||
Dim Extension As String = ".svg"
|
||||
If Not MainWindow.m_bShowSVGParkInd Then Extension = ".png"
|
||||
Dim ListParkInd As New List(Of ParkInd)
|
||||
' ricarico la lista
|
||||
SelParkIndWD.LoadParkInd(ListParkInd, nCtx)
|
||||
'SelParkIndWD.sActualProj = Path.GetFileNameWithoutExtension(sPath)
|
||||
For Each ItemParkInd As ParkInd In ListParkInd
|
||||
If ItemParkInd.Ind <> 0 And ItemParkInd.Ind <> 999 And ItemParkInd.nPartInPark > 0 Then
|
||||
Try
|
||||
Dim sNewFile As String = sNewFileName & ItemParkInd.Ind.ToString & Extension
|
||||
If MainWindow.m_bShowSVGParkInd Then
|
||||
WriteMyXML(sNewFile, ItemParkInd.LocalMyCanvas)
|
||||
Else
|
||||
If System.IO.File.Exists(sNewFile) Then
|
||||
System.IO.File.Delete(sNewFile)
|
||||
End If
|
||||
System.IO.File.Copy(If(Extension = ".svg", ItemParkInd.Svg, ItemParkInd.Img), sNewFile)
|
||||
End If
|
||||
Catch ex As Exception
|
||||
EgtOutLog("Copia immagine " & If(Extension = ".svg", ItemParkInd.Svg, ItemParkInd.Img) & " di ParkInd non roiscita")
|
||||
End Try
|
||||
End If
|
||||
Next
|
||||
End Sub
|
||||
|
||||
#End Region ' Metodi Shared
|
||||
|
||||
End Class
|
||||
|
||||
Public Class ParkInd
|
||||
Implements INotifyPropertyChanged
|
||||
|
||||
Private m_VisbilityAllOff As Visibility = Visibility.Hidden
|
||||
|
||||
Private m_Ind As Integer
|
||||
Public Property Ind As Integer
|
||||
Get
|
||||
Return m_Ind
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
m_Ind = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_Name As String
|
||||
Public Property Name As String
|
||||
Get
|
||||
Return m_Name
|
||||
End Get
|
||||
Set(value As String)
|
||||
m_Name = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_Img As String = String.Empty
|
||||
Public Property Img As String
|
||||
Get
|
||||
Return m_Img
|
||||
End Get
|
||||
Set(value As String)
|
||||
m_Img = value
|
||||
NotifyPropertyChanged("MyVisibilityImg")
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_Svg As String = String.Empty
|
||||
Public Property Svg As String
|
||||
Get
|
||||
Return m_Svg
|
||||
End Get
|
||||
Set(value As String)
|
||||
m_Svg = value
|
||||
NotifyPropertyChanged("MyVisibilitySvg")
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_nPartInTable As Integer = 0
|
||||
Public Property nPartInTable As Integer
|
||||
Get
|
||||
Return m_nPartInTable
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
m_nPartInTable = value
|
||||
NotifyPropertyChanged(NameOf(nPartInTable))
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_nPartInPark As Integer = GDB_ST.ON_
|
||||
Public Property nPartInPark As Integer
|
||||
Get
|
||||
Return m_nPartInPark
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
m_nPartInPark = value
|
||||
NotifyPropertyChanged(NameOf(nPartInPark))
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property CountInTab As String
|
||||
Get
|
||||
Return m_nPartInTable.ToString
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property ImgTab As String
|
||||
Get
|
||||
Return DirectCast(Application.Current.MainWindow, MainWindow).GetResourcesDir() & "\MachineButtonsImage\NewIcons\table.png"
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property CountInPark As String
|
||||
Get
|
||||
Return m_nPartInPark.ToString
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property ImgPark As String
|
||||
Get
|
||||
Return DirectCast(Application.Current.MainWindow, MainWindow).GetResourcesDir() & "\MachineButtonsImage\NewIcons\Park.png"
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_Status As Integer
|
||||
|
||||
Public Property Status As Integer
|
||||
Get
|
||||
Return m_Status
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
m_Status = value
|
||||
NotifyPropertyChanged(NameOf(IsStatusON))
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property IsStatusON As Boolean
|
||||
Get
|
||||
Return (m_Status = GDB_ST.ON_)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property MyVisibilityTmg As Visibility
|
||||
Get
|
||||
Return If(Not System.IO.File.Exists(m_Img), Visibility.Collapsed, Visibility.Visible)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property MyVisibilitySvg As Visibility
|
||||
Get
|
||||
Return If(Not System.IO.File.Exists(m_Svg), Visibility.Collapsed, Visibility.Visible)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property TitleVisibility As Visibility
|
||||
Get
|
||||
Return If(m_Ind = 999, m_VisbilityAllOff, Visibility.Visible)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_LocalMyCanvas As MyCanvas
|
||||
Public ReadOnly Property LocalMyCanvas As MyCanvas
|
||||
Get
|
||||
Return m_LocalMyCanvas
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Sub New(Ind As Integer, Name As String, Stat As Integer)
|
||||
m_Ind = Ind
|
||||
m_Name = Name
|
||||
m_Status = Stat
|
||||
' Costruisco il percorso immagine
|
||||
If m_Ind = 0 Then
|
||||
' Se Ind=0 allora applico il default: C:\EgtData\OmagCUT\Resources\MachineButtonsImage\NewIcons
|
||||
m_Img = DirectCast(Application.Current.MainWindow, MainWindow).GetResourcesDir() & "\MachineButtonsImage\NewIcons\Park_On.png"
|
||||
m_Svg = DirectCast(Application.Current.MainWindow, MainWindow).GetResourcesDir() & "\MachineButtonsImage\NewIcons\Park_On.svg"
|
||||
ElseIf m_Ind = 999 Then
|
||||
' Se Ind=0 allora applico il default: C:\EgtData\OmagCUT\Resources\MachineButtonsImage\NewIcons
|
||||
m_Img = DirectCast(Application.Current.MainWindow, MainWindow).GetResourcesDir() & "\MachineButtonsImage\NewIcons\Park_Off.png"
|
||||
m_Svg = DirectCast(Application.Current.MainWindow, MainWindow).GetResourcesDir() & "\MachineButtonsImage\NewIcons\Park_Off.svg"
|
||||
Else
|
||||
m_Img = SelParkIndWD.GetPathCurrProj() & m_Ind.ToString & ".png"
|
||||
m_Svg = SelParkIndWD.GetPathCurrProj() & m_Ind.ToString & ".svg"
|
||||
End If
|
||||
|
||||
If MainWindow.m_bShowSVGParkInd Then
|
||||
Dim CanvWidth As Integer = 145
|
||||
Dim CanvHeight As Integer = CInt(CanvWidth / 1.4)
|
||||
m_LocalMyCanvas = New MyCanvas(CanvWidth, CanvHeight)
|
||||
If System.IO.File.Exists(m_Svg) Then
|
||||
ReadMyXML(m_Svg, m_LocalMyCanvas)
|
||||
m_Img = ""
|
||||
End If
|
||||
Else
|
||||
m_Svg = ""
|
||||
End If
|
||||
|
||||
' Conto il numero di pezzi in Tavola
|
||||
CountPartInTable()
|
||||
' Conto il numero di pezzi in parcheggio
|
||||
CountPartInPark()
|
||||
|
||||
End Sub
|
||||
|
||||
' Conta in numero di pezzi di questo parcheggio in Tavola
|
||||
Private Sub CountPartInTable()
|
||||
Dim nCount As Integer = 0
|
||||
Dim nRawId As Integer = GetCurrentRaw()
|
||||
' Leggo l'indice di parcheggio dei pezzi in tavola
|
||||
Dim nPartId As Integer = EgtGetFirstGroupInGroup(nRawId)
|
||||
While nPartId <> GDB_ID.NULL
|
||||
' Aggiorno il valore del contatore
|
||||
If IncreaseCounterPart(nPartId, nCount) Then
|
||||
UpdateEntInCanvas(nPartId, 0.2)
|
||||
End If
|
||||
nPartId = EgtGetNextGroup(nPartId)
|
||||
End While
|
||||
m_nPartInTable = nCount
|
||||
End Sub
|
||||
|
||||
' Conta il numero di pezzi di questo parcheggio in Parcheggio
|
||||
Private Sub CountPartInPark()
|
||||
Dim nCount As Integer = 0
|
||||
Dim nPartId As Integer = EgtGetFirstPart()
|
||||
While nPartId <> GDB_ID.NULL
|
||||
' Aggiorno il valore del contatore
|
||||
If IncreaseCounterPart(nPartId, nCount) Then
|
||||
UpdateEntInCanvas(nPartId, 1)
|
||||
End If
|
||||
nPartId = EgtGetNextPart(nPartId)
|
||||
End While
|
||||
m_nPartInPark = nCount
|
||||
End Sub
|
||||
|
||||
Private Sub UpdateEntInCanvas(nPartId, dOpacity)
|
||||
If Not IsNothing(m_LocalMyCanvas) Then
|
||||
' modifico il colore del pezzo nel SVG
|
||||
Dim nIdRegion As Integer = EgtGetFirstNameInGroup(nPartId, "Region")
|
||||
If nIdRegion <> GDB_ID.NULL Then
|
||||
Dim nIdEnt As Integer = EgtGetFirstInGroup(nIdRegion)
|
||||
While nIdEnt <> GDB_ID.NULL
|
||||
If EgtGetType(nIdEnt) = GDB_TY.SRF_FRGN Then
|
||||
Exit While
|
||||
End If
|
||||
End While
|
||||
If nIdEnt <> GDB_ID.NULL Then
|
||||
Dim sName As String = ""
|
||||
EgtGetName(nIdEnt, sName)
|
||||
Dim Idpath As MyPath = m_LocalMyCanvas.ListPath.Find(Function(x) x.id = sName)
|
||||
If Not IsNothing(Idpath) Then
|
||||
Idpath.fill_opacity = dOpacity
|
||||
m_LocalMyCanvas.UpdateMyPath(Idpath)
|
||||
Idpath.LoadPath()
|
||||
NotifyPropertyChanged(NameOf(LocalMyCanvas))
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
' Verifica se il pezzo passato (da parcheggio o tavola) appartiene al ParkInd corrente e quindi aggiorna il valore di nCount+=1
|
||||
Private Function IncreaseCounterPart(nPartId As Integer, ByRef nCount As Integer) As Boolean
|
||||
Dim bOk As Boolean = False
|
||||
' Se i pezzi non hanno un indice di parcheggio
|
||||
Dim sInfoParkInd As String = String.Empty
|
||||
Dim nInfoParkInd As Integer = -1
|
||||
' Recupero l'indice del parcheggio
|
||||
If EgtGetInfo(nPartId, INFO_PARKIND, sInfoParkInd) Then
|
||||
nInfoParkInd = If(IsNumeric(sInfoParkInd), CInt(sInfoParkInd), -1)
|
||||
Else
|
||||
nInfoParkInd = 0
|
||||
End If
|
||||
' Se l'indice di parcheggio restituito è valido (Maggiore di -1)
|
||||
If nInfoParkInd > -1 Then
|
||||
' e uguale a quallo del parcheggio correntemente selezionato
|
||||
If nInfoParkInd = m_Ind Then
|
||||
nCount = nCount + 1
|
||||
bOk = True
|
||||
End If
|
||||
End If
|
||||
|
||||
Return bOk
|
||||
End Function
|
||||
|
||||
Public Event PropertyChanged As PropertyChangedEventHandler Implements INotifyPropertyChanged.PropertyChanged
|
||||
|
||||
Public Sub NotifyPropertyChanged(propName As String)
|
||||
RaiseEvent PropertyChanged(Me, New PropertyChangedEventArgs(propName))
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
#Region "ELEMENTI PER LA GESTIONE SVG"
|
||||
|
||||
Public Class MyCanvas
|
||||
|
||||
Private m_CurrCanvas As New Canvas
|
||||
Public Property CurrCanvas As Canvas
|
||||
Get
|
||||
Return m_CurrCanvas
|
||||
End Get
|
||||
Set(value As Canvas)
|
||||
m_CurrCanvas = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_ListPath As New List(Of MyPath)
|
||||
Public Property ListPath As List(Of MyPath)
|
||||
Get
|
||||
Return m_ListPath
|
||||
End Get
|
||||
Set(value As List(Of MyPath))
|
||||
m_ListPath = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_ViewBoxDim As String
|
||||
Public Property ViewBoxDim As String
|
||||
Get
|
||||
Return m_ViewBoxDim
|
||||
End Get
|
||||
Set(value As String)
|
||||
m_ViewBoxDim = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Sub New(Width As Integer, Height As Integer)
|
||||
m_CurrCanvas.Width = Width
|
||||
m_CurrCanvas.Height = Height
|
||||
m_CurrCanvas.ClipToBounds = True
|
||||
End Sub
|
||||
|
||||
Public Sub LoadCanvas()
|
||||
For Each ItemPath As MyPath In m_ListPath
|
||||
m_CurrCanvas.Children.Add(ItemPath.CurrPath)
|
||||
Next
|
||||
End Sub
|
||||
|
||||
Public Sub UpdateMyPath(CurrPath As MyPath)
|
||||
m_CurrCanvas.Children.Remove(CurrPath.CurrPath)
|
||||
m_CurrCanvas.Children.Add(CurrPath.CurrPath)
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
Public Class MyPath
|
||||
|
||||
Private m_CurrPath As New System.Windows.Shapes.Path
|
||||
Public Property CurrPath As System.Windows.Shapes.Path
|
||||
Get
|
||||
Return m_CurrPath
|
||||
End Get
|
||||
Set(value As System.Windows.Shapes.Path)
|
||||
m_CurrPath = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_CanvX As Double
|
||||
Public ReadOnly Property CanvX As Double
|
||||
Get
|
||||
Return m_CanvX
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_CanvY As Double
|
||||
Public ReadOnly Property CanvY As Double
|
||||
Get
|
||||
Return m_CanvY
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_DimX As Double
|
||||
Public ReadOnly Property DimX As Double
|
||||
Get
|
||||
Return m_DimX
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_DimY As Double
|
||||
Public ReadOnly Property DimY As Double
|
||||
Get
|
||||
Return m_DimY
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_id As String
|
||||
Public ReadOnly Property id As String
|
||||
Get
|
||||
Return m_id
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_d As String
|
||||
Public ReadOnly Property d As String
|
||||
Get
|
||||
Return m_d
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_fill As String
|
||||
Public Property fill As String
|
||||
Get
|
||||
Return m_fill
|
||||
End Get
|
||||
Set(value As String)
|
||||
m_fill = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_fill_opacity As Double
|
||||
Public Property fill_opacity As Double
|
||||
Get
|
||||
Return m_fill_opacity
|
||||
End Get
|
||||
Set(value As Double)
|
||||
m_fill_opacity = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_stroke As String
|
||||
Public Property stroke As String
|
||||
Get
|
||||
Return m_stroke
|
||||
End Get
|
||||
Set(value As String)
|
||||
m_stroke = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_stroke_opacity As Double
|
||||
Public Property stroke_opacity As Double
|
||||
Get
|
||||
Return m_stroke_opacity
|
||||
End Get
|
||||
Set(value As Double)
|
||||
m_stroke_opacity = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_stroke_width As Double
|
||||
Public Property stroke_width As Double
|
||||
Get
|
||||
Return m_stroke_width
|
||||
End Get
|
||||
Set(value As Double)
|
||||
m_stroke_width = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Sub New(Id As String, D As String, CanvX As Double, CanvY As Double, DimX As Double, DimY As Double, Fill As String, FillOpacity As Double, Stroke As String, StrokeOpacity As Double)
|
||||
m_id = Id
|
||||
m_d = D
|
||||
m_CanvX = CanvX
|
||||
m_CanvY = CanvY
|
||||
m_DimX = DimX
|
||||
m_DimY = DimY
|
||||
m_fill = Fill
|
||||
m_fill_opacity = FillOpacity
|
||||
m_stroke = Stroke
|
||||
m_stroke_opacity = StrokeOpacity
|
||||
LoadPath()
|
||||
End Sub
|
||||
|
||||
Public Sub LoadPath()
|
||||
' Carico la geometria
|
||||
m_CurrPath.Data = Geometry.Parse(d)
|
||||
' Carico il colore di sfondo
|
||||
SetBrushFromRGBString(m_fill, m_CurrPath.Fill)
|
||||
' Applico l'opacità della superificie
|
||||
m_CurrPath.Opacity = m_fill_opacity
|
||||
' Calcolo e applico la traslazione e la scalatura
|
||||
Dim myTransformGroup As New TransformGroup()
|
||||
Dim ScaleX As Double = m_CanvX / DimX
|
||||
Dim ScaleY As Double = m_CanvY / DimY
|
||||
Dim OffX As Double = (m_CanvX - Math.Min(ScaleX, ScaleY) * DimX) / 2
|
||||
Dim OffY As Double = (m_CanvY - Math.Min(ScaleX, ScaleY) * DimY) / 2
|
||||
myTransformGroup.Children.Add(New ScaleTransform(Math.Min(ScaleX, ScaleY), Math.Min(ScaleX, ScaleY)))
|
||||
myTransformGroup.Children.Add(New TranslateTransform(OffX, OffY))
|
||||
m_CurrPath.RenderTransform = myTransformGroup
|
||||
End Sub
|
||||
|
||||
Private Sub SetBrushFromRGBString(sFill As String, ByRef brFill As Brush)
|
||||
If String.IsNullOrEmpty(sFill) Then
|
||||
brFill = Brushes.DarkRed
|
||||
Return
|
||||
End If
|
||||
Dim s1 As String = sFill
|
||||
If s1.Contains("rgb") Then
|
||||
s1 = s1.Replace("rgb(", "")
|
||||
s1 = s1.Replace(")", "")
|
||||
Dim s2 As String = ""
|
||||
For Each s As String In s1.Split(",")
|
||||
s2 &= CInt(s).ToString("x2")
|
||||
Next
|
||||
brFill = New BrushConverter().ConvertFrom("#" & s2)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
Public Module XMLReader
|
||||
|
||||
Public Sub ReadMyXML(FilePath As String, Canv As MyCanvas)
|
||||
'Create the XML Reader
|
||||
Dim m_xmlr As XmlTextReader = New XmlTextReader(FilePath)
|
||||
'Disable whitespace so that you don't have to read over whitespaces
|
||||
m_xmlr.WhitespaceHandling = WhitespaceHandling.None
|
||||
' Leggo la prima riga: '?xml' tag
|
||||
m_xmlr.Read()
|
||||
' Passo a leggere la successiva: 'svg' tag
|
||||
m_xmlr.Read()
|
||||
' Leggo gli attributi di questo tag (dimensioni)
|
||||
Dim ViewBoxDim = m_xmlr.GetAttribute("viewBox")
|
||||
Canv.ViewBoxDim = ViewBoxDim
|
||||
' Elaboro i dati per avere la scalatura del disegno
|
||||
Dim DimViewBox As String() = ViewBoxDim.ToString.Split(" ")
|
||||
Dim DimX As Integer = Math.Abs(CInt(DimViewBox(2))) + Math.Abs(CInt(DimViewBox(0)))
|
||||
Dim DimY As Integer = Math.Abs(CInt(DimViewBox(3))) + Math.Abs(CInt(DimViewBox(1)))
|
||||
|
||||
' Leggo in loop i tag: 'path'
|
||||
While Not m_xmlr.EOF
|
||||
m_xmlr.Read()
|
||||
If Not m_xmlr.IsStartElement() Then
|
||||
Continue While
|
||||
End If
|
||||
' recupero il valore dell'attributo 'id'
|
||||
Dim idAttribute = m_xmlr.GetAttribute("id")
|
||||
' recupero il valore dell'attributo 'd'
|
||||
Dim dAttribute = m_xmlr.GetAttribute("d")
|
||||
' recupero il valore dell'attributo 'fill'
|
||||
Dim fillAttribute = m_xmlr.GetAttribute("fill")
|
||||
' recupero il valore dell'attributo 'fill-opacity'
|
||||
Dim fillOpacityAttribute = m_xmlr.GetAttribute("fill-opacity")
|
||||
' recupero il valore dell'attributo 'stroke'
|
||||
Dim strokeAttribute = m_xmlr.GetAttribute("stroke")
|
||||
' recupero il valore dell'attributo 'stroke-opacity'
|
||||
Dim strokeOpacityAttribute = m_xmlr.GetAttribute("stroke-opacity")
|
||||
' recupero il valore dell'attributo 'stroke - Width'
|
||||
Dim strokeWidthAttribute = m_xmlr.GetAttribute("stroke-width")
|
||||
' carico l'elemento in lista solo se esiste un'immagine
|
||||
If Not String.IsNullOrEmpty(idAttribute) And Not String.IsNullOrEmpty(dAttribute) Then
|
||||
Dim fillOpacity As Double = 1 ' CDbl(fillOpacityAttribute)
|
||||
StringToDouble(fillOpacityAttribute, fillOpacity)
|
||||
Dim strokeOpacity As Double = 1 ' CDbl(strokeOpacityAttribute)
|
||||
StringToDouble(strokeOpacityAttribute, strokeOpacity)
|
||||
Canv.ListPath.Add(New MyPath(idAttribute, dAttribute, Canv.CurrCanvas.Width, Canv.CurrCanvas.Height, DimX, DimY, fillAttribute, fillOpacity, strokeAttribute, strokeOpacity))
|
||||
End If
|
||||
|
||||
End While
|
||||
' Libero il file dalla lettura
|
||||
m_xmlr.Close()
|
||||
' popolo la canvas con le Ptah che ho caricato
|
||||
Canv.LoadCanvas()
|
||||
End Sub
|
||||
|
||||
Public Sub WriteMyXML(FilePath As String, Canv As MyCanvas)
|
||||
|
||||
Dim _namespaceDefault As String = "http://www.w3.org/2000/svg"
|
||||
|
||||
Dim doc As New Xml.XmlDocument
|
||||
|
||||
Dim elm As System.Xml.XmlNode
|
||||
Dim elmSub As System.Xml.XmlNode
|
||||
Dim elmMain As Xml.XmlNode
|
||||
|
||||
doc = New Xml.XmlDocument
|
||||
|
||||
elmMain = doc.CreateElement("svg")
|
||||
elmSub = elmMain.Attributes.Append(doc.CreateAttribute("viewBox"))
|
||||
elmSub.Value = Canv.ViewBoxDim
|
||||
elmSub = elmMain.Attributes.Append(doc.CreateAttribute("xmlns"))
|
||||
elmSub.Value = _namespaceDefault
|
||||
|
||||
For Each itemPath As MyPath In Canv.ListPath
|
||||
elm = elmMain.AppendChild(doc.CreateElement("path"))
|
||||
|
||||
elmSub = elm.Attributes.Append(doc.CreateAttribute("id"))
|
||||
elmSub.Value = itemPath.id
|
||||
|
||||
elmSub = elm.Attributes.Append(doc.CreateAttribute("d"))
|
||||
elmSub.Value = itemPath.d
|
||||
|
||||
If Not String.IsNullOrEmpty(itemPath.fill) Then
|
||||
elmSub = elm.Attributes.Append(doc.CreateAttribute("fill"))
|
||||
elmSub.Value = itemPath.fill
|
||||
End If
|
||||
|
||||
If Not String.IsNullOrEmpty(itemPath.fill_opacity) Then
|
||||
elmSub = elm.Attributes.Append(doc.CreateAttribute("fill-opacity"))
|
||||
elmSub.Value = itemPath.fill_opacity.ToString(CultureInfo.InvariantCulture)
|
||||
End If
|
||||
|
||||
If Not String.IsNullOrEmpty(itemPath.stroke) Then
|
||||
elmSub = elm.Attributes.Append(doc.CreateAttribute("stroke"))
|
||||
elmSub.Value = itemPath.stroke
|
||||
End If
|
||||
|
||||
If Not String.IsNullOrEmpty(itemPath.stroke_opacity) Then
|
||||
elmSub = elm.Attributes.Append(doc.CreateAttribute("stroke-opacity"))
|
||||
elmSub.Value = itemPath.stroke_opacity.ToString(CultureInfo.InvariantCulture)
|
||||
End If
|
||||
|
||||
If Not String.IsNullOrEmpty(itemPath.stroke_width) Then
|
||||
elmSub = elm.Attributes.Append(doc.CreateAttribute("stroke-width"))
|
||||
elmSub.Value = itemPath.stroke_width.ToString(CultureInfo.InvariantCulture)
|
||||
End If
|
||||
|
||||
Next
|
||||
|
||||
doc.AppendChild(doc.CreateXmlDeclaration("1.0", "UTF-8", ""))
|
||||
doc.AppendChild(elmMain)
|
||||
doc.Save(FilePath)
|
||||
|
||||
End Sub
|
||||
|
||||
End Module
|
||||
|
||||
#End Region ' Elementi per la gestione SVG
|
||||
@@ -5,68 +5,69 @@
|
||||
FontFamily="{DynamicResource OmagCut_Font}"
|
||||
ResizeMode="NoResize" WindowStyle="None" AllowsTransparency="True" Background="Transparent"
|
||||
Title="SaveNameWD" Height="200" Width="400" ShowInTaskbar="False">
|
||||
<!--Definizione della pagina di scelta del nome con cui salvare il progetto-->
|
||||
<Border Style="{DynamicResource OmagCut_Border}">
|
||||
<Grid x:Name="SaveNameGrid">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
<ColumnDefinition Width="4*"/>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="0.1*"/>
|
||||
<RowDefinition Height="0.3*"/>
|
||||
<RowDefinition Height="0.2*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="0.2*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="0.2*"/>
|
||||
|
||||
</Grid.RowDefinitions>
|
||||
<!--Definizione della pagina di scelta del nome con cui salvare il progetto-->
|
||||
<Border Style="{DynamicResource OmagCut_Border}">
|
||||
<Grid x:Name="SaveNameGrid">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
<ColumnDefinition Width="4*"/>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="0.1*"/>
|
||||
<RowDefinition Height="0.3*"/>
|
||||
<RowDefinition Height="0.2*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="0.2*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="0.2*"/>
|
||||
|
||||
<!--Messaggio: Seleziona il numero di pezzi-->
|
||||
<TextBlock Name="TitleWDTxbl" Grid.Column="1" Grid.Row="1"
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<!--Messaggio: Seleziona il numero di pezzi-->
|
||||
<TextBlock Name="TitleWDTxbl" Grid.Column="1" Grid.Row="1"
|
||||
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||
|
||||
<UniformGrid Grid.Column="1" Grid.Row="3" VerticalAlignment="Center" Columns="2">
|
||||
<TextBlock Name="NbrOfPartsMsg"
|
||||
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="NbrOfParts"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
</UniformGrid>
|
||||
|
||||
<UniformGrid Grid.Column="1" Grid.Row="3" VerticalAlignment="Center" Columns="2">
|
||||
<TextBlock Name="NbrOfPartsMsg"
|
||||
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="NbrOfParts"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
</UniformGrid>
|
||||
<Grid Name="ButtonsGrid" Grid.Column="1" Grid.Row="5" Grid.RowSpan="1">
|
||||
<Grid.ColumnDefinitions>
|
||||
|
||||
<Grid Name="ButtonsGrid" Grid.Column="1" Grid.Row="5" Grid.RowSpan="1">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<!--ultimo progetto-->
|
||||
<Button Name="ConfirmSelection" Grid.Column="1" Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}"
|
||||
<!--ultimo progetto-->
|
||||
<Button Name="ConfirmSelection" Grid.Column="1" Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}"
|
||||
ToolTip="Confirm">
|
||||
<Image Source="{DynamicResource VImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
<!--nuovo progetto-->
|
||||
<Button Name="SelectAllPart" Grid.Column="2" Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}"
|
||||
ToolTip="Select all" Visibility="Collapsed">
|
||||
<Image Source="{DynamicResource NuovoImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
<!--apri folder progetti-->
|
||||
<Button Name="CancelSelection" Grid.Column="5" Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}"
|
||||
ToolTip="Cancel">
|
||||
<Image Source="{DynamicResource XImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
<Image Source="{DynamicResource VImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
<!--nuovo progetto-->
|
||||
<Button Name="SelectAllPart" Grid.Column="2" Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}"
|
||||
ToolTip="Select all" Visibility="Collapsed">
|
||||
<Image Source="{DynamicResource NuovoImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
<!--apri folder progetti-->
|
||||
<Button Name="CancelSelection" Grid.Column="5" Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}"
|
||||
ToolTip="Cancel">
|
||||
<Image Source="{DynamicResource XImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
||||
</Border>
|
||||
</Border>
|
||||
</Window>
|
||||
|
||||
@@ -33,8 +33,8 @@
|
||||
Me.Top = Owner.Top + Owner.Height / 2 - Me.Height / 2
|
||||
Me.Left = Owner.Left + Owner.Width / 2 - Me.Width / 2
|
||||
|
||||
TitleWDTxbl.Text = "Selection parts"
|
||||
NbrOfPartsMsg.Text = "Number of parts"
|
||||
TitleWDTxbl.Text = EgtUILib.EgtMsg(91232) ' Selection parts
|
||||
NbrOfPartsMsg.Text = EgtUILib.EgtMsg(91233) ' Number of parts
|
||||
NbrOfParts.Text = m_NumberOfParts.ToString
|
||||
End Sub
|
||||
|
||||
|
||||
@@ -0,0 +1,82 @@
|
||||
<Window x:Class="SelectTableWD"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
|
||||
FontFamily="{DynamicResource OmagCut_Font}"
|
||||
Title="ChooseTool" Height="282.6" Width="326.6" WindowStyle="None"
|
||||
ResizeMode="NoResize" ShowInTaskbar="False" AllowsTransparency="True"
|
||||
Background="Transparent">
|
||||
|
||||
<Border Style="{DynamicResource OmagCut_Border}">
|
||||
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
<ColumnDefinition Width="4*"/>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="1.5*"/>
|
||||
<RowDefinition Height="0.1*"/>
|
||||
<RowDefinition Height="1.0*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<TextBlock Name="Title" Grid.Row="1" Grid.Column="1"
|
||||
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||
|
||||
<ItemsControl Name="TableList"
|
||||
Grid.Row="2" Grid.Column="1">
|
||||
<ItemsControl.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<StackPanel Orientation="Horizontal"
|
||||
HorizontalAlignment="Center"/>
|
||||
</ItemsPanelTemplate>
|
||||
</ItemsControl.ItemsPanel>
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<RadioButton GroupName="TabGrp"
|
||||
IsChecked="{Binding IsActive}"
|
||||
Width="60" Height="60">
|
||||
|
||||
<RadioButton.Style>
|
||||
<Style TargetType="ToggleButton" BasedOn="{StaticResource OmagCut_ToggleButton}">
|
||||
<Style.Triggers>
|
||||
<Trigger Property="IsChecked" Value="True">
|
||||
<Setter Property="Foreground" Value="white"/>
|
||||
<Setter Property="Background" Value="{StaticResource OmagCut_Blue}"/>
|
||||
</Trigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</RadioButton.Style>
|
||||
<Grid>
|
||||
<TextBlock Text="{Binding sName}" Background="Transparent"/>
|
||||
<Image Source="{Binding ImgTab}" Margin="0,10,0,0"
|
||||
Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||
</Grid>
|
||||
|
||||
</RadioButton>
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
</ItemsControl>
|
||||
|
||||
<Grid Grid.Column="1" Grid.Row="4">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Button Name="OkBtn" Grid.Column="1" Style="{DynamicResource OmagCut_GradientBlueIconButton}" >
|
||||
<Image Source="{DynamicResource VImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="ExitBtn" Grid.Column="3" Style="{DynamicResource OmagCut_GradientBlueIconButton}" IsCancel="True">
|
||||
<Image Source="{DynamicResource XImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Border>
|
||||
</Window>
|
||||
@@ -0,0 +1,96 @@
|
||||
Imports System.ComponentModel
|
||||
|
||||
Public Class SelectTableWD
|
||||
Private m_MainWindow As MainWindow = DirectCast(Application.Current.MainWindow, MainWindow)
|
||||
|
||||
Private m_nSelectedTable As Integer = 0
|
||||
Public ReadOnly Property nSelectedTable As Integer
|
||||
Get
|
||||
Return m_nSelectedTable
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Sub New(Owner As Window)
|
||||
Me.Owner = Owner
|
||||
Me.WindowStartupLocation = WindowStartupLocation.CenterOwner
|
||||
InitializeComponent()
|
||||
End Sub
|
||||
|
||||
Public CurrTableList As New List(Of TableToChange)
|
||||
|
||||
Private Sub ChangeTable_Initialized() Handles Me.Initialized
|
||||
|
||||
Title.Text = EgtUILib.EgtMsg(91234) ' Seleziona la tavola da usare
|
||||
' recuepero l'inidce della tavola corrente
|
||||
Dim nIndeXCurrTab As Integer = GetCurrentTable()
|
||||
' creo la lista delle tavole disponibili (attivo il bottone della tavola attualmente in uso)
|
||||
For nInd As Integer = 0 To GetTableCount() - 1
|
||||
CurrTableList.Add(New TableToChange("Tab", (nInd + 1).ToString, ((nInd + 1) = nIndeXCurrTab)))
|
||||
Next
|
||||
End Sub
|
||||
|
||||
Private Sub ChangeTable_Loaded() Handles Me.Loaded
|
||||
TableList.ItemsSource = CurrTableList
|
||||
End Sub
|
||||
|
||||
Private Sub OkBtn_Click(sender As Object, e As RoutedEventArgs) Handles OkBtn.Click
|
||||
' recupero l'indice della tavola impostata
|
||||
For Each ItemTab As TableToChange In CurrTableList
|
||||
If ItemTab.IsActive Then
|
||||
m_nSelectedTable = ItemTab.nIndex
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
DialogResult = True
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
Public Class TableToChange
|
||||
Implements INotifyPropertyChanged
|
||||
|
||||
Private Property m_sName As String = "Tab"
|
||||
Public ReadOnly Property sName As String
|
||||
Get
|
||||
Return m_sName
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property ImgTab As String
|
||||
Get
|
||||
Return DirectCast(Application.Current.MainWindow, MainWindow).GetResourcesDir() & "\MachineButtonsImage\table.png"
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private Property m_nIndex As Integer = 3
|
||||
Public ReadOnly Property nIndex As Integer
|
||||
Get
|
||||
Return m_nIndex
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_bIsActive As Boolean = False
|
||||
Public Property IsActive As Boolean
|
||||
Get
|
||||
Return m_bIsActive
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
m_bIsActive = value
|
||||
NotifyPropertyChanged("IsActive")
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Sub New(Name As String, Ind As Integer, IsCurrent As Boolean)
|
||||
m_sName = Name & " " & Ind.ToString
|
||||
m_nIndex = Ind
|
||||
m_bIsActive = IsCurrent
|
||||
NotifyPropertyChanged("IsActive")
|
||||
End Sub
|
||||
|
||||
Public Event PropertyChanged(sender As Object, e As PropertyChangedEventArgs) Implements INotifyPropertyChanged.PropertyChanged
|
||||
|
||||
Public Sub NotifyPropertyChanged(propName As String)
|
||||
RaiseEvent PropertyChanged(Me, New PropertyChangedEventArgs(propName))
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
+189
-126
@@ -1,6 +1,4 @@
|
||||
Imports System.Net
|
||||
Imports System.Windows.Forms.Integration
|
||||
Imports EgtUILib
|
||||
Imports EgtUILib
|
||||
|
||||
Public Module SplitAuto
|
||||
|
||||
@@ -38,6 +36,10 @@ 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
|
||||
' ver 2.7e1: tagli finali
|
||||
Public m_bFinalCut As Boolean
|
||||
End Class
|
||||
|
||||
'-----------------------------------------------------------------------------------------------
|
||||
@@ -49,128 +51,178 @@ Public Module SplitAuto
|
||||
While nOperId <> GDB_ID.NULL
|
||||
' verifico sia una lavorazione valida della fase corrente
|
||||
If IsValidMachining(nOperId) And EgtGetOperationPhase(nOperId) = nCurrPhase Then
|
||||
' se appartiene ad un grezzo attivo la inserisco in lista
|
||||
If IsMachiningInActiveRaw(nOperId) Then
|
||||
Dim Mach As New SplitMach
|
||||
Mach.m_nEntId = GDB_ID.NULL
|
||||
' identificativo
|
||||
Mach.m_nId = nOperId
|
||||
' eventuali lavorazioni inglobate
|
||||
Dim sInfo As String = String.Empty
|
||||
If EgtGetInfo(nOperId, INFO_MCH_OTHMID, sInfo) Then
|
||||
Dim sItems() As String = sInfo.Split(",".ToCharArray)
|
||||
For Each sId As String In sItems
|
||||
Dim nId As Integer = 0
|
||||
StringToInt(sId, nId)
|
||||
If nId > 0 Then Mach.m_vOthId.Add(nId)
|
||||
Next
|
||||
End If
|
||||
' tipo
|
||||
Mach.m_nType = EgtGetOperationType(nOperId)
|
||||
' layer di origine
|
||||
EgtGetInfo(nOperId, INFO_MCH_LAYER, Mach.m_sLay)
|
||||
' se taglio con lama
|
||||
If Mach.m_nType = MCH_OY.SAWING Then
|
||||
' verifica interferenza
|
||||
If Mach.m_sLay = NAME_OUTLOOP Then
|
||||
EgtVerifyMachining(nOperId, Mach.m_nInterf)
|
||||
For Each nId As Integer In Mach.m_vOthId
|
||||
Dim nRes As Integer = FMI_TYPE.LI Or FMI_TYPE.RM Or FMI_TYPE.LO
|
||||
EgtVerifyMachining(nId, nRes)
|
||||
Mach.m_nInterf = Mach.m_nInterf Or nRes
|
||||
Next
|
||||
Else
|
||||
Mach.m_nInterf = FMI_TYPE.NONE
|
||||
End If
|
||||
' la imposto come lavorazione corrente
|
||||
EgtSetCurrMachining(nOperId)
|
||||
' inversione
|
||||
EgtGetMachiningParam(MCH_MP.INVERT, Mach.m_bInvert)
|
||||
' recupero l'angolo di fianco
|
||||
EgtGetMachiningParam(MCH_MP.SIDEANGLE, Mach.m_dSideAng)
|
||||
' recupero allungamento iniziale e finale (negativi vicino ad angoli interni)
|
||||
Dim dStartAddLen As Double = -10
|
||||
EgtGetMachiningParam(MCH_MP.STARTADDLEN, dStartAddLen)
|
||||
Dim dEndAddLen As Double = -10
|
||||
EgtGetMachiningParam(MCH_MP.ENDADDLEN, dEndAddLen)
|
||||
' recupero tipo entità, angolo con entità precedente e successiva, lunghezze libere iniziale e finale
|
||||
Mach.m_bIsLine = True
|
||||
Mach.m_dPrevAng = 0
|
||||
Mach.m_dNextAng = 0
|
||||
Mach.m_dStartFreeLen = FREELEN_INF + 1
|
||||
Mach.m_dEndFreeLen = FREELEN_INF + 1
|
||||
Dim nEntId, nSub As Integer
|
||||
If EgtGetMachiningGeometry(0, nEntId, nSub) Then
|
||||
' EgtGetType( nEntId) = GDB_TY.CRV_ARC OrElse
|
||||
If EgtGetType(nEntId) = GDB_TY.CRV_COMPO Then Mach.m_bIsLine = False
|
||||
EgtGetInfo(nEntId, If(Not Mach.m_bInvert, INFO_PREVANG, INFO_NEXTANG), Mach.m_dPrevAng)
|
||||
EgtGetInfo(nEntId, If(Not Mach.m_bInvert, INFO_NEXTANG, INFO_PREVANG), Mach.m_dNextAng)
|
||||
EgtGetInfo(nEntId, If(Not Mach.m_bInvert, INFO_START_FREELEN, INFO_END_FREELEN), Mach.m_dStartFreeLen)
|
||||
EgtGetInfo(nEntId, If(Not Mach.m_bInvert, INFO_END_FREELEN, INFO_START_FREELEN), Mach.m_dEndFreeLen)
|
||||
Mach.m_bEnableInvert = GetEnableInvert(nEntId)
|
||||
EgtMidVector(nEntId, GDB_ID.ROOT, Mach.m_vtDir)
|
||||
If Mach.m_bInvert Then Mach.m_vtDir = -Mach.m_vtDir
|
||||
Mach.m_nEntId = nEntId
|
||||
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
|
||||
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
|
||||
If nRes = 0 Then
|
||||
EgtOutLog("Operation ID " & nOperId.ToString & " isn't split cut! verify depth machining.")
|
||||
End If
|
||||
End If
|
||||
' se trasformabile in taglio di separazione, verifico se lo è
|
||||
If Mach.m_bCanStartAll Or Mach.m_bCanEndAll Then
|
||||
EgtSetCurrMachining(nOperId)
|
||||
Dim nLiType As Integer
|
||||
EgtGetMachiningParam(MCH_MP.LEADINTYPE, nLiType)
|
||||
Dim nLoType As Integer
|
||||
EgtGetMachiningParam(MCH_MP.LEADOUTTYPE, nLoType)
|
||||
Mach.m_bStartAll = (nLiType = MCH_SAW_LI.EXT_CENT Or nLiType = MCH_SAW_LI.EXT_OUT)
|
||||
Mach.m_bEndAll = (nLoType = MCH_SAW_LO.EXT_CENT Or nLoType = MCH_SAW_LO.EXT_OUT)
|
||||
Else
|
||||
Mach.m_bStartAll = False
|
||||
Mach.m_bEndAll = False
|
||||
End If
|
||||
' Waterjet
|
||||
ElseIf Mach.m_nType = MCH_OY.WATERJETTING Then
|
||||
Mach.m_nInterf = FMI_TYPE.NONE
|
||||
' recupero l'angolo di fianco
|
||||
EgtGetMachiningParam(MCH_MP.SIDEANGLE, Mach.m_dSideAng)
|
||||
Mach.m_bCanStartAll = False
|
||||
Mach.m_bCanEndAll = False
|
||||
Mach.m_bStartAll = False
|
||||
Mach.m_bEndAll = False
|
||||
' Forature e fresature
|
||||
Else
|
||||
Mach.m_nInterf = FMI_TYPE.NONE
|
||||
Mach.m_dSideAng = 0
|
||||
Mach.m_bCanStartAll = False
|
||||
Mach.m_bCanEndAll = False
|
||||
Mach.m_bStartAll = False
|
||||
Mach.m_bEndAll = False
|
||||
End If
|
||||
' abilitazione
|
||||
Mach.m_bEnabled = Not EgtExistsInfo(nOperId, INFO_MCH_USER_OFF)
|
||||
' pausa
|
||||
Mach.m_bPause = GetPause(nOperId)
|
||||
' inserisco in lista
|
||||
MachSplitList.Add(Mach)
|
||||
' altrimenti la disattivo
|
||||
Else
|
||||
EgtSetOperationMode(nOperId, False)
|
||||
End If
|
||||
Dim Mach As New SplitMach
|
||||
If CreateMach(Mach, nOperId) Then MachSplitList.Add(Mach)
|
||||
End If
|
||||
nOperId = EgtGetNextOperation(nOperId)
|
||||
End While
|
||||
Return True
|
||||
End Function
|
||||
|
||||
Friend Function CreateMach(ByRef Mach As SplitMach, nOperId As Integer) As Boolean
|
||||
Dim bOk As Boolean = True
|
||||
' se appartiene ad un grezzo attivo la inserisco in lista
|
||||
If IsMachiningInActiveRaw(nOperId) Then
|
||||
Mach.m_nEntId = GDB_ID.NULL
|
||||
' identificativo
|
||||
Mach.m_nId = nOperId
|
||||
' eventuali lavorazioni inglobate
|
||||
Dim sInfo As String = String.Empty
|
||||
If EgtGetInfo(nOperId, INFO_MCH_OTHMID, sInfo) Then
|
||||
Dim sItems() As String = sInfo.Split(",".ToCharArray)
|
||||
For Each sId As String In sItems
|
||||
Dim nId As Integer = 0
|
||||
StringToInt(sId, nId)
|
||||
If nId > 0 Then Mach.m_vOthId.Add(nId)
|
||||
Next
|
||||
End If
|
||||
' tipo
|
||||
Mach.m_nType = EgtGetOperationType(nOperId)
|
||||
' layer di origine
|
||||
EgtGetInfo(nOperId, INFO_MCH_LAYER, Mach.m_sLay)
|
||||
' se taglio con lama
|
||||
If Mach.m_nType = MCH_OY.SAWING Then
|
||||
' verifica interferenza
|
||||
If Mach.m_sLay = NAME_OUTLOOP Then
|
||||
EgtVerifyMachining(nOperId, Mach.m_nInterf)
|
||||
For Each nId As Integer In Mach.m_vOthId
|
||||
Dim nRes As Integer = FMI_TYPE.LI Or FMI_TYPE.RM Or FMI_TYPE.LO
|
||||
EgtVerifyMachining(nId, nRes)
|
||||
Mach.m_nInterf = Mach.m_nInterf Or nRes
|
||||
Next
|
||||
Else
|
||||
Mach.m_nInterf = FMI_TYPE.NONE
|
||||
End If
|
||||
' la imposto come lavorazione corrente
|
||||
EgtSetCurrMachining(nOperId)
|
||||
' inversione
|
||||
EgtGetMachiningParam(MCH_MP.INVERT, Mach.m_bInvert)
|
||||
' recupero l'angolo di fianco
|
||||
EgtGetMachiningParam(MCH_MP.SIDEANGLE, Mach.m_dSideAng)
|
||||
' recupero allungamento iniziale e finale (negativi vicino ad angoli interni)
|
||||
Dim dStartAddLen As Double = -10
|
||||
EgtGetMachiningParam(MCH_MP.STARTADDLEN, dStartAddLen)
|
||||
Dim dEndAddLen As Double = -10
|
||||
EgtGetMachiningParam(MCH_MP.ENDADDLEN, dEndAddLen)
|
||||
' recupero tipo entità, angolo con entità precedente e successiva, lunghezze libere iniziale e finale
|
||||
Mach.m_bIsLine = True
|
||||
Mach.m_dPrevAng = 0
|
||||
Mach.m_dNextAng = 0
|
||||
Mach.m_dStartFreeLen = FREELEN_INF + 1
|
||||
Mach.m_dEndFreeLen = FREELEN_INF + 1
|
||||
Dim nEntId, nSub As Integer
|
||||
If EgtGetMachiningGeometry(0, nEntId, nSub) Then
|
||||
' EgtGetType( nEntId) = GDB_TY.CRV_ARC OrElse
|
||||
If EgtGetType(nEntId) = GDB_TY.CRV_COMPO Then Mach.m_bIsLine = False
|
||||
EgtGetInfo(nEntId, If(Not Mach.m_bInvert, INFO_PREVANG, INFO_NEXTANG), Mach.m_dPrevAng)
|
||||
EgtGetInfo(nEntId, If(Not Mach.m_bInvert, INFO_NEXTANG, INFO_PREVANG), Mach.m_dNextAng)
|
||||
EgtGetInfo(nEntId, If(Not Mach.m_bInvert, INFO_START_FREELEN, INFO_END_FREELEN), Mach.m_dStartFreeLen)
|
||||
EgtGetInfo(nEntId, If(Not Mach.m_bInvert, INFO_END_FREELEN, INFO_START_FREELEN), Mach.m_dEndFreeLen)
|
||||
Mach.m_bEnableInvert = GetEnableInvert(nEntId)
|
||||
EgtMidVector(nEntId, GDB_ID.ROOT, Mach.m_vtDir)
|
||||
If Mach.m_bInvert Then Mach.m_vtDir = -Mach.m_vtDir
|
||||
Mach.m_nEntId = nEntId
|
||||
EgtGetInfo(nOperId, "ManageLeadInOnIntCorner", Mach.m_bMngLeadInOnIntCorner)
|
||||
End If
|
||||
Mach.m_bFinalCut = False
|
||||
EgtGetInfo(nOperId, "FinalCut", Mach.m_bFinalCut)
|
||||
' verifico se trasformabile in un taglio di separazione (almeno da un lato)
|
||||
If (dStartAddLen > -EPS_SMALL Or dEndAddLen > -EPS_SMALL Or Mach.m_bMngLeadInOnIntCorner) And
|
||||
Mach.m_sLay = NAME_OUTLOOP And (Mach.m_nInterf And FMI_TYPE.RM) = 0 Then
|
||||
Dim nRes As Integer = EgtVerifyCutAsSplitting(nOperId)
|
||||
Dim bIn As Boolean = False
|
||||
Dim bOut As Boolean = False
|
||||
CanExtendSides(Mach, bIn, bOut)
|
||||
Mach.m_bCanStartAll = ((dStartAddLen > -EPS_SMALL Or Mach.m_bMngLeadInOnIntCorner) And (nRes And CAR_RES.LI_OK) <> 0) And
|
||||
Mach.m_dStartFreeLen > FREELEN_INF And Mach.m_bIsLine And bIn
|
||||
Mach.m_bCanEndAll = ((dEndAddLen > -EPS_SMALL Or Mach.m_bMngLeadInOnIntCorner) And (nRes And CAR_RES.LO_OK) <> 0) And
|
||||
Mach.m_dEndFreeLen > FREELEN_INF And Mach.m_bIsLine And bOut
|
||||
If nRes = 0 Then
|
||||
EgtOutLog("Operation ID " & nOperId.ToString & " isn't split cut! verify depth machining.")
|
||||
End If
|
||||
|
||||
ElseIf (dStartAddLen > -EPS_SMALL Or dEndAddLen > -EPS_SMALL Or Mach.m_bMngLeadInOnIntCorner) And
|
||||
Mach.m_sLay = NAME_OUTLOOP And
|
||||
(Mach.m_nInterf = FMI_TYPE.LI Or Mach.m_nInterf = FMI_TYPE.LO Or Mach.m_nInterf = FMI_TYPE.RM) Then
|
||||
Dim nRes As Integer = EgtVerifyCutAsSplitting(nOperId)
|
||||
Dim bIn As Boolean = False
|
||||
Dim bOut As Boolean = False
|
||||
CanExtendSides(Mach, bIn, bOut)
|
||||
' And (nRes And CAR_RES.LI_OK) <> 0 : da aggiungere
|
||||
Mach.m_bCanStartAll = (dStartAddLen > -EPS_SMALL Or Mach.m_bMngLeadInOnIntCorner) And
|
||||
Mach.m_dStartFreeLen > FREELEN_INF And Mach.m_bIsLine And bIn And
|
||||
Mach.m_nInterf <> FMI_TYPE.LI
|
||||
' And (nRes And CAR_RES.LO_OK) <> 0 : da aggiungere come sopra
|
||||
Mach.m_bCanEndAll = (dEndAddLen > -EPS_SMALL Or Mach.m_bMngLeadInOnIntCorner) And
|
||||
Mach.m_dEndFreeLen > FREELEN_INF And Mach.m_bIsLine And bOut And
|
||||
Mach.m_nInterf <> FMI_TYPE.LO
|
||||
If nRes = 0 Then
|
||||
EgtOutLog("Operation ID " & nOperId.ToString & " isn't split cut! verify depth machining.")
|
||||
End If
|
||||
End If
|
||||
' se trasformabile in taglio di separazione, verifico se lo è
|
||||
If Mach.m_bCanStartAll Or Mach.m_bCanEndAll Then
|
||||
EgtSetCurrMachining(nOperId)
|
||||
Dim nLiType As Integer
|
||||
EgtGetMachiningParam(MCH_MP.LEADINTYPE, nLiType)
|
||||
Dim nLoType As Integer
|
||||
EgtGetMachiningParam(MCH_MP.LEADOUTTYPE, nLoType)
|
||||
Mach.m_bStartAll = (nLiType = MCH_SAW_LI.EXT_CENT Or nLiType = MCH_SAW_LI.EXT_OUT)
|
||||
Mach.m_bEndAll = (nLoType = MCH_SAW_LO.EXT_CENT Or nLoType = MCH_SAW_LO.EXT_OUT)
|
||||
Else
|
||||
Mach.m_bStartAll = False
|
||||
Mach.m_bEndAll = False
|
||||
End If
|
||||
' Waterjet
|
||||
ElseIf Mach.m_nType = MCH_OY.WATERJETTING Then
|
||||
Mach.m_nInterf = FMI_TYPE.NONE
|
||||
' recupero l'angolo di fianco
|
||||
EgtGetMachiningParam(MCH_MP.SIDEANGLE, Mach.m_dSideAng)
|
||||
Mach.m_bCanStartAll = False
|
||||
Mach.m_bCanEndAll = False
|
||||
Mach.m_bStartAll = False
|
||||
Mach.m_bEndAll = False
|
||||
' Forature e fresature
|
||||
Else
|
||||
Mach.m_nInterf = FMI_TYPE.NONE
|
||||
Mach.m_dSideAng = 0
|
||||
Mach.m_bCanStartAll = False
|
||||
Mach.m_bCanEndAll = False
|
||||
Mach.m_bStartAll = False
|
||||
Mach.m_bEndAll = False
|
||||
End If
|
||||
' abilitazione
|
||||
Mach.m_bEnabled = Not EgtExistsInfo(nOperId, INFO_MCH_USER_OFF)
|
||||
' pausa
|
||||
Mach.m_bPause = GetPause(nOperId)
|
||||
Else
|
||||
' altrimenti la disattivo
|
||||
EgtSetOperationMode(nOperId, False)
|
||||
bOk = False
|
||||
End If
|
||||
Return bOk
|
||||
End Function
|
||||
|
||||
Private Function CanExtendSides(CurrMach As SplitMach, ByRef bIn As Boolean, ByRef bOut As Boolean) As Boolean
|
||||
If CurrMach.m_dPrevAng < -EPS_ANG_SMALL And CurrMach.m_dNextAng > EPS_ANG_SMALL Then
|
||||
' Posso estendere SOLO l'uscita
|
||||
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)
|
||||
@@ -238,8 +290,19 @@ Public Module SplitAuto
|
||||
ElseIf Math.Abs(dSideAng) > EPS_ANG_SMALL Then
|
||||
colCut = COL_MCH_CUT_ANG()
|
||||
Else
|
||||
colCut = COL_MCH_CUT()
|
||||
' Se macchina con cambio utensile di lama
|
||||
If m_MainWindow.m_CurrentMachine.MountedToolConfig = CurrentMachine.MountedToolConfigs.TOOLCHANGERWITHSAW Then
|
||||
Dim sSawing As String = String.Empty, sSaw As String = String.Empty
|
||||
m_MainWindow.m_CadCutPageUC.m_SplitPage.GetCurrSawingAndSaw(nOperId, sSawing, sSaw)
|
||||
' Setto l'utensile corrente
|
||||
EgtTdbSetCurrTool(sSaw)
|
||||
' recupero il colore della lavorazione direttamente dall'utensile
|
||||
colCut = Utility.GetColorPV()
|
||||
Else
|
||||
colCut = COL_MCH_CUT()
|
||||
End If
|
||||
End If
|
||||
|
||||
For Each nId In vCutId
|
||||
EgtSetColor(nId, colCut)
|
||||
Next
|
||||
@@ -485,7 +548,7 @@ Public Module SplitAuto
|
||||
' Reinserisco tutte le lavorazioni
|
||||
Dim nWarn As Integer = 0
|
||||
AddMachinings(GDB_ID.NULL, nWarn)
|
||||
If nWarn = 1 Then m_MainWindow.m_CurrentProjectPageUC.SetWarningMessage(EgtMsg(MSG_SPLITPAGEUC + 11)) ' Lama troppo grande per utilizzo ventosa
|
||||
If nWarn = 1 Then m_MainWindow.m_CurrentProjectPageUC.SetWarningMessage(EgtMsg(90351)) ' Lama troppo grande per utilizzo ventosa
|
||||
' Carico ventose
|
||||
LoadVacuumCups()
|
||||
' Lancio calcolo separazione
|
||||
@@ -799,13 +862,13 @@ Public Module SplitAuto
|
||||
|
||||
Private Function ExecMove(nDispId As Integer, vNewRaws As List(Of Integer),
|
||||
vtMove As Vector3d, dMinMove As Double) As Boolean
|
||||
Dim bTwoHeadVac As Boolean = ( EgtGetHeadId( VACUUM_HEAD_2) <> GDB_ID.NULL)
|
||||
Dim bTwoHeadVac As Boolean = (EgtGetHeadId(VACUUM_HEAD_2) <> GDB_ID.NULL)
|
||||
Dim rmData As New RawMoveData
|
||||
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 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)
|
||||
@@ -826,9 +889,9 @@ Public Module SplitAuto
|
||||
|
||||
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
|
||||
@@ -863,7 +926,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
|
||||
|
||||
+70
-39
@@ -1,10 +1,10 @@
|
||||
<UserControl x:Class="SplitPageUC"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="853.3" d:DesignWidth="1280" Initialized="SplitPageUC_Initialized">
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="853.3" d:DesignWidth="1280" Initialized="SplitPageUC_Initialized">
|
||||
|
||||
<!-- Definizione della SplitPage -->
|
||||
<Grid Name="SplitPageGrid" >
|
||||
@@ -35,10 +35,10 @@
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Button Name="PrevBtn" Grid.Column="0" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource NumericKeyboardArrowImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
<Image Source="{DynamicResource NumericKeyboardArrowImg}" Style="{DynamicResource 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="{DynamicResource OmagCut_ButtonIcon}" RenderTransformOrigin="0.5,0.5">
|
||||
<Image.RenderTransform>
|
||||
<TransformGroup>
|
||||
<RotateTransform Angle="180"/>
|
||||
@@ -64,24 +64,49 @@
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<ListBox Name="MachiningLsBx" Grid.Row="1"
|
||||
SelectionMode="Extended">
|
||||
SelectionMode="Extended">
|
||||
<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>
|
||||
<Grid Width="210">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="2.8*"/>
|
||||
<ColumnDefinition Width="1.2*"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Text="{Binding Name}">
|
||||
<TextBlock.Style>
|
||||
<Style TargetType="TextBlock" BasedOn="{StaticResource OmagCut_CurrProjSummeryTextBlock}">
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding bIsActive}" Value="False">
|
||||
<Setter Property="TextDecorations" Value="Strikethrough"/>
|
||||
<Setter Property="Foreground" Value="{StaticResource OmagCut_White}"/>
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding bIsActive}" Value="True">
|
||||
<Setter Property="Foreground" Value="Black"/>
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</TextBlock.Style>
|
||||
</TextBlock>
|
||||
<TextBlock Grid.Column="1" Text="{Binding TCPos}">
|
||||
<TextBlock.Style>
|
||||
<Style TargetType="TextBlock" BasedOn="{StaticResource OmagCut_CurrProjSummeryTextBlock}">
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding bIsActive}" Value="False">
|
||||
<Setter Property="TextDecorations" Value="Strikethrough"/>
|
||||
<Setter Property="Foreground" Value="{StaticResource OmagCut_White}"/>
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding bIsActive}" Value="True">
|
||||
<Setter Property="Foreground" Value="Black"/>
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</TextBlock.Style>
|
||||
</TextBlock>
|
||||
<Rectangle Grid.Column="2"
|
||||
Visibility="{Binding MachiningTCPosVisibility}"
|
||||
Style="{DynamicResource Rect_SplitPage}"/>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</ListBox.ItemTemplate>
|
||||
</ListBox>
|
||||
@@ -95,11 +120,17 @@
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Button Name="MoveUpBtn" Grid.Column="1" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource UpArrowImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||
<Image Source="{DynamicResource UpArrowImg}" Style="{DynamicResource OmagCut_ArrowButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="MoveDownBtn" Grid.Column="2" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource DownArrowImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||
<Image Source="{DynamicResource DownArrowImg}" Style="{DynamicResource 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>
|
||||
|
||||
@@ -111,13 +142,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="{DynamicResource 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="{DynamicResource 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="{DynamicResource OmagCut_ArrowButtonIcon}"/>
|
||||
</Button>
|
||||
|
||||
</Grid>
|
||||
@@ -130,33 +161,33 @@
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Button Name="CutBtn" Grid.Column="0" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource Allunga-AccorciaImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||
<Image Source="{DynamicResource Allunga-AccorciaImg}" Style="{DynamicResource OmagCut_ArrowButtonIcon}"/>
|
||||
</Button>
|
||||
|
||||
|
||||
<Button Name="CutStartBtn" Grid.Column="1" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource Inizio-Allunga-AccorciaImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||
<Image Source="{DynamicResource Inizio-Allunga-AccorciaImg}" Style="{DynamicResource OmagCut_ArrowButtonIcon}"/>
|
||||
</Button>
|
||||
|
||||
<Button Name="CutEndBtn" Grid.Column="2" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource Fine-Allunga-AccorciaImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||
<Image Source="{DynamicResource Fine-Allunga-AccorciaImg}" Style="{DynamicResource 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}"/>
|
||||
<Image Source="{DynamicResource PonticelliWJImg}" Style="{DynamicResource OmagCut_ArrowButtonIcon}"/>
|
||||
</ToggleButton>
|
||||
|
||||
<!--solo per macchine con lavorazioni Waterjet-->
|
||||
<!--solo per macchine con lavorazioni Waterjet-->
|
||||
<Button Name="QualityWJBtn" Grid.Column="1" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource QualityWJImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||
<Image Source="{DynamicResource QualityWJImg}" Style="{DynamicResource 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}"/>
|
||||
<Image Source="{DynamicResource PonticelliDeleteWJImg}" Style="{DynamicResource OmagCut_ArrowButtonIcon}"/>
|
||||
</ToggleButton>
|
||||
|
||||
|
||||
|
||||
|
||||
</Grid>
|
||||
|
||||
|
||||
+583
-164
File diff suppressed because it is too large
Load Diff
@@ -1,6 +1,4 @@
|
||||
Imports EgtUILib
|
||||
Imports System.Text.RegularExpressions
|
||||
Imports System.Threading
|
||||
|
||||
Module VacuumCups
|
||||
' Tipo manipolatore con ventosa (0=assente, 1=dietro, 2=laterale)
|
||||
@@ -565,6 +563,9 @@ Module VacuumCups
|
||||
|
||||
' 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
|
||||
' Se macchina con ventosa dietro (VacType=1) non eseguo nessun controllo
|
||||
If GetVacuumType() = 1 Then Return 0
|
||||
' Verifico se usare l'asse W per la gestione delle ventose
|
||||
Dim sAxisName As String = "C"
|
||||
' verifico che il nome dell'asse impostato sia corretto
|
||||
If EgtGetAxisId(sAxisName) = GDB_ID.NULL Then
|
||||
|
||||
@@ -112,6 +112,7 @@ Module ConstGen
|
||||
Public Const MAIN_TAB As String = "MainTab"
|
||||
Public Const SECOND_TAB As String = "2ndTab"
|
||||
Public Const THIRD_TAB As String = "3rdTab"
|
||||
Public Const FORTH_TAB As String = "4thTab"
|
||||
' Nome tavola ausiliaria per spostamento finale pezzi
|
||||
Public Const AUX_TAB As String = "AuxTab"
|
||||
|
||||
@@ -157,6 +158,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"
|
||||
@@ -223,6 +226,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
|
||||
@@ -318,6 +323,12 @@ 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"
|
||||
' Forzo specifica lavorazione
|
||||
Public Const DEF_MACHINING As String = "Def_Machining"
|
||||
' Forzo specifica lavorazione solo per tagli con inclinazione
|
||||
Public Const DEF_MACHINING_TILTED As String = "Def_Machining_Tilted"
|
||||
|
||||
' Nome di pezzo che è una cornice
|
||||
Public Const NAME_FRAME As String = "Frame"
|
||||
|
||||
+18
-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"
|
||||
@@ -52,7 +53,10 @@ Module ConstIni
|
||||
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"
|
||||
@@ -86,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"
|
||||
@@ -207,6 +212,7 @@ Module ConstIni
|
||||
Public Const K_OFFSXY As String = "OffsXY"
|
||||
Public Const K_OFFSYY As String = "OffsYY"
|
||||
Public Const K_OFFSXINTERY As String = "OffsYInterY"
|
||||
Public Const K_OFFSXINTERYSAWTH As String = "OffsYInterYSawTh"
|
||||
Public Const K_STARTTRIM As String = "StartTrim"
|
||||
Public Const K_ENDTRIM As String = "EndTrim"
|
||||
Public Const K_OTHERSIDE As String = "OtherSide"
|
||||
@@ -231,10 +237,13 @@ Module ConstIni
|
||||
Public Const K_OTHERREFTABX As String = "OtherRefTabX"
|
||||
Public Const K_OTHERREFTABY As String = "OtherRefTabY"
|
||||
Public Const K_OTHERREFTABPOS As String = "OtherRefTabPos"
|
||||
Public Const K_REFTAB As String = "RefTab"
|
||||
Public Const K_CURRENTREFTAB As String = "CurrRefTab"
|
||||
|
||||
|
||||
Public Const S_RAWMOVE As String = "RawMove"
|
||||
Public Const K_RAWSTEP As String = "Step"
|
||||
Public Const K_EXTRASTEP As String = "ExtraStep"
|
||||
Public Const K_RAWROTATION As String = "Rotation"
|
||||
Public Const K_PERPENDICULAR As String = "Perpendicular"
|
||||
|
||||
@@ -275,6 +284,8 @@ Module ConstIni
|
||||
Public Const K_MACHINESDIR As String = "MachinesDir"
|
||||
Public Const K_TOOLMAKERSDIR As String = "ToolMakersDir"
|
||||
Public Const K_CURRMACH As String = "CurrMach"
|
||||
Public Const K_ENABLEFINALSAWCUT As String = "EnableFinalSawCut"
|
||||
Public Const K_FINALDEPTH As String = "FinalDepth"
|
||||
|
||||
Public Const S_SIMUL As String = "Simul"
|
||||
Public Const K_SLIDERX As String = "SliderX"
|
||||
@@ -286,6 +297,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"
|
||||
@@ -332,6 +345,7 @@ 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_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"
|
||||
@@ -342,6 +356,9 @@ Module ConstIni
|
||||
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 K_ENABLECUSTOMGRID As String = "EnableCustomGrid"
|
||||
Public Const K_GRIDNUMDIMXCUSTOM As String = "GridNumDimXCustom"
|
||||
Public Const K_GRIDNUMDIMYCUSTOM As String = "GridNumDimYCustom"
|
||||
|
||||
Public Const S_STATDATA As String = "StatData"
|
||||
Public Const K_SD_DAY As String = "Day"
|
||||
|
||||
@@ -12,26 +12,37 @@
|
||||
Public Const K_SIMULATIONAXESNUM As String = "SimulationAxesNum"
|
||||
Public Const K_L1NAME As String = "L1Name"
|
||||
Public Const K_L1ID As String = "L1Id"
|
||||
Public Const K_L1TYPE As String = "L1Type"
|
||||
Public Const K_L2NAME As String = "L2Name"
|
||||
Public Const K_L2ID As String = "L2Id"
|
||||
Public Const K_L2TYPE As String = "L2Type"
|
||||
Public Const K_L3NAME As String = "L3Name"
|
||||
Public Const K_L3ID As String = "L3Id"
|
||||
Public Const K_L3TYPE As String = "L3Type"
|
||||
Public Const K_R1NAME As String = "R1Name"
|
||||
Public Const K_R1ID As String = "R1Id"
|
||||
Public Const K_R1TYPE As String = "R1Type"
|
||||
Public Const K_R2NAME As String = "R2Name"
|
||||
Public Const K_R2ID As String = "R2Id"
|
||||
Public Const K_R2TYPE As String = "R2Type"
|
||||
Public Const K_A6NAME As String = "A6Name"
|
||||
Public Const K_A6ID As String = "A6Id"
|
||||
Public Const K_A6TYPE As String = "A6Type"
|
||||
Public Const K_A7NAME As String = "A7Name"
|
||||
Public Const K_A7ID As String = "A7Id"
|
||||
Public Const K_A7TYPE As String = "A7Type"
|
||||
Public Const K_A8NAME As String = "A8Name"
|
||||
Public Const K_A8ID As String = "A8Id"
|
||||
Public Const K_A8TYPE As String = "A8Type"
|
||||
Public Const K_A9NAME As String = "A9Name"
|
||||
Public Const K_A9ID As String = "A9Id"
|
||||
Public Const K_A9TYPE As String = "A9Type"
|
||||
Public Const K_A10NAME As String = "A10Name"
|
||||
Public Const K_A10ID As String = "A10Id"
|
||||
Public Const K_A10TYPE As String = "A10Type"
|
||||
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"
|
||||
@@ -97,6 +108,9 @@
|
||||
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"
|
||||
@@ -123,9 +137,11 @@
|
||||
Public Const K_VACUUMOFF As String = "VacuumOff"
|
||||
Public Const K_BYPASSTATE As String = "BypassState"
|
||||
Public Const K_FEEDHOLD As String = "FeedHold"
|
||||
Public Const K_SPOTLIGHT As String = "SpotLight"
|
||||
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"
|
||||
@@ -168,14 +184,26 @@
|
||||
Public Const K_ADDITIONALTABLE As String = "AdditionalTable"
|
||||
Public Const K_TAB2_ADDITIONALTABLE As String = "Tab2AdditionalTable"
|
||||
Public Const K_TAB3_ADDITIONALTABLE As String = "Tab3AdditionalTable"
|
||||
Public Const K_TAB4_ADDITIONALTABLE As String = "Tab4AdditionalTable"
|
||||
Public Const K_CENTER_RAW_ONX As String = "CenterRawOnX"
|
||||
Public Const K_CHANGETABWD As String = "ChangeTabWD"
|
||||
|
||||
Public Const S_PHOTO As String = "Photo"
|
||||
Public Const K_PHOTO_CAMERACOUNTER As String = "CameraCounter"
|
||||
Public Const K_PHOTO_OFFSETX As String = "OffsetX"
|
||||
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_TAB3_OFFSETX As String = "Tab3OffsetX"
|
||||
Public Const K_PHOTO_TAB3_OFFSETY As String = "Tab3OffsetY"
|
||||
Public Const K_PHOTO_TAB4_OFFSETX As String = "Tab4OffsetX"
|
||||
Public Const K_PHOTO_TAB4_OFFSETY As String = "Tab4OffsetY"
|
||||
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"
|
||||
@@ -225,6 +253,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"
|
||||
@@ -242,7 +271,7 @@
|
||||
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"
|
||||
' DrillMillC90
|
||||
Public Const K_MACH_DRILL_MILL_C90 As String = "DrillMillC90"
|
||||
' CutLongDxSx
|
||||
' AngRotMultiCut
|
||||
' MinDistHeadsMultiCut
|
||||
@@ -301,6 +330,7 @@
|
||||
|
||||
Public Const S_MACH_MACH As String = "Mach"
|
||||
Public Const K_CURRSAW As String = "CurrSaw"
|
||||
Public Const K_CURRSAWTILTED As String = "CurrSawTilted"
|
||||
Public Const K_CURRDRILL As String = "CurrDrill"
|
||||
Public Const K_CURRMILL As String = "CurrMill"
|
||||
Public Const K_CURRMILLNOTIP As String = "CurrMillNoTip"
|
||||
@@ -308,6 +338,8 @@
|
||||
Public Const K_CURRDRIPDRILL As String = "CurrDripDrill"
|
||||
Public Const K_CURRWATERJET As String = "CurrWaterJet"
|
||||
Public Const K_CURRSAWING As String = "CurrSawing"
|
||||
Public Const K_CURRSAWINGTILTED As String = "CurrSawingTilted"
|
||||
Public Const K_APPLYSAWINGTILTED As String = "ApplySawingTilted"
|
||||
Public Const K_CURRDRILLING As String = "CurrDrilling"
|
||||
Public Const K_CURRMILLING As String = "CurrMilling"
|
||||
Public Const K_CURRPOCKETING As String = "CurrPocketing"
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
<!--<RowDefinition Height="1*"/>-->
|
||||
</Grid.RowDefinitions>
|
||||
<Button Name="ManualBtn" Grid.Column="2" Grid.Row="0"
|
||||
Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="80"/>
|
||||
@@ -37,12 +37,12 @@
|
||||
</Grid.ColumnDefinitions>
|
||||
<Image Source="{DynamicResource Movimento-manualeImg}" Style="{DynamicResource OmagCut_ButtonIcon}" Grid.Column="0" />
|
||||
<TextBlock Name="ManualTxt" Grid.Column="1"
|
||||
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</Grid>
|
||||
</Button>
|
||||
|
||||
<Button Name="SingleCutBtn" Grid.Row="1"
|
||||
Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="80"/>
|
||||
@@ -50,12 +50,12 @@
|
||||
</Grid.ColumnDefinitions>
|
||||
<Image Source="{DynamicResource Taglio-singoloImg}" Style="{DynamicResource OmagCut_ButtonIcon}" Grid.Column="0" />
|
||||
<TextBlock Name="SingleCutTxt" Grid.Column="1"
|
||||
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</Grid>
|
||||
</Button>
|
||||
|
||||
<Button Name="MultipleCutBtn" Grid.Row="2"
|
||||
Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="80"/>
|
||||
@@ -63,12 +63,12 @@
|
||||
</Grid.ColumnDefinitions>
|
||||
<Image Source="{DynamicResource Taglio-multiploImg}" Style="{DynamicResource OmagCut_ButtonIcon}" Grid.Column="0" />
|
||||
<TextBlock Name="MultipleCutTxt" Grid.Column="1"
|
||||
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</Grid>
|
||||
</Button>
|
||||
|
||||
<Button Name="GridCutBtn" Grid.Row="3"
|
||||
Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="80"/>
|
||||
@@ -76,13 +76,13 @@
|
||||
</Grid.ColumnDefinitions>
|
||||
<Image Source="{DynamicResource Taglio-grigliaImg}" Style="{DynamicResource OmagCut_ButtonIcon}" Grid.Column="0" />
|
||||
<TextBlock Name="GridCutTxt" Grid.Column="1"
|
||||
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</Grid>
|
||||
</Button>
|
||||
|
||||
|
||||
<Button Name="SingleDrillBtn" Grid.Row="4"
|
||||
Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="80"/>
|
||||
@@ -90,12 +90,12 @@
|
||||
</Grid.ColumnDefinitions>
|
||||
<Image Source="{DynamicResource Foro-singoloImg}" Style="{DynamicResource OmagCut_ButtonIcon}" Grid.Column="0" />
|
||||
<TextBlock Name="SingleDrillTxt" Grid.Column="1"
|
||||
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</Grid>
|
||||
</Button>
|
||||
|
||||
<Button Name="FlatteningCutBtn" Grid.Row="5"
|
||||
Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="80"/>
|
||||
@@ -103,7 +103,7 @@
|
||||
</Grid.ColumnDefinitions>
|
||||
<Image Source="{DynamicResource SpianaturaImg}" Style="{DynamicResource OmagCut_ButtonIcon}" Grid.Column="0" />
|
||||
<TextBlock Name="FlatteningCutTxt" Grid.Column="1"
|
||||
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</Grid>
|
||||
</Button>
|
||||
|
||||
@@ -134,7 +134,7 @@
|
||||
</Button>-->
|
||||
|
||||
<Button Name="SquaringBtn" Grid.Row="6"
|
||||
Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="80"/>
|
||||
@@ -142,7 +142,7 @@
|
||||
</Grid.ColumnDefinitions>
|
||||
<Image Source="{DynamicResource Copia-dimaImg}" Style="{DynamicResource OmagCut_ButtonIcon}" Grid.Column="0" />
|
||||
<TextBlock Name="SquaringTxt" Grid.Column="1"
|
||||
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</Grid>
|
||||
</Button>
|
||||
|
||||
@@ -167,7 +167,7 @@
|
||||
<Button Name="ChangeUCBtn" Grid.ColumnSpan="2" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Grid>
|
||||
<!--<Image Name="ImageCompo9" Source="{DynamicResource NumericKeyboardArrowImg}" />-->
|
||||
<TextBlock Name="ChangeUCTxBl" Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
<TextBlock Name="ChangeUCTxBl" Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</Grid>
|
||||
</Button>
|
||||
</Grid>
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
Imports EgtUILib
|
||||
|
||||
Public Class ControlsDirectCutUC
|
||||
|
||||
' Dichiarazione delle Page UserControl
|
||||
@@ -53,7 +54,6 @@ Public Class ControlsDirectCutUC
|
||||
FlatteningCut
|
||||
Polishing
|
||||
CopyTemplate
|
||||
SawTest
|
||||
SingleCutAuto
|
||||
SingleDrill
|
||||
Squaring
|
||||
@@ -79,6 +79,7 @@ Public Class ControlsDirectCutUC
|
||||
' 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)
|
||||
@@ -97,17 +98,17 @@ Public Class ControlsDirectCutUC
|
||||
m_VacuumMachineButton.SetValue(Grid.RowProperty, 1)
|
||||
|
||||
' ManualBtn.Content = EgtMsg(90201)
|
||||
ManualTxt.Text = EgtMsg(90201)
|
||||
ManualTxt.Text = EgtMsg(90201) ' Movimento manuale
|
||||
'SingleCutBtn.Content = EgtMsg(90202)
|
||||
SingleCutTxt.Text = EgtMsg(90202)
|
||||
SingleCutTxt.Text = EgtMsg(90202) ' Taglio singolo
|
||||
'SingleDrillBtn.Content = "Foro singolo"
|
||||
SingleDrillTxt.Text = EgtMsg(90258)
|
||||
SingleDrillTxt.Text = EgtMsg(90258) ' Foro singolo
|
||||
'MultipleCutBtn.Content = EgtMsg(90203)
|
||||
MultipleCutTxt.Text = EgtMsg(90203)
|
||||
MultipleCutTxt.Text = EgtMsg(90203) ' Taglio multiplo
|
||||
'GridCutBtn.Content = EgtMsg(90204)
|
||||
GridCutTxt.Text = EgtMsg(90204)
|
||||
GridCutTxt.Text = EgtMsg(90204) ' Taglio griglia
|
||||
'FlatteningCutBtn.Content = EgtMsg(90206)
|
||||
FlatteningCutTxt.Text = EgtMsg(90206)
|
||||
FlatteningCutTxt.Text = EgtMsg(90206) ' Spianatura
|
||||
' 90261=Squaring
|
||||
SquaringTxt.Text = EgtMsg(90261)
|
||||
' 90409=Others
|
||||
@@ -183,6 +184,9 @@ Public Class ControlsDirectCutUC
|
||||
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)
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<Button Name="SawTestBtn" Grid.Row="0"
|
||||
Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="80"/>
|
||||
@@ -38,12 +38,12 @@
|
||||
</Grid.ColumnDefinitions>
|
||||
<Image Source="{DynamicResource Test-lamaImg}" Style="{DynamicResource OmagCut_ButtonIcon}" Grid.Column="0" />
|
||||
<TextBlock Name="SawTestTxt" Grid.Column="1"
|
||||
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</Grid>
|
||||
</Button>
|
||||
|
||||
<Button Name="PolishingBtn" Grid.Row="1"
|
||||
Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="80"/>
|
||||
@@ -51,7 +51,7 @@
|
||||
</Grid.ColumnDefinitions>
|
||||
<Image Source="{DynamicResource LucidaturaImg}" Style="{DynamicResource OmagCut_ButtonIcon}" Grid.Column="0" />
|
||||
<TextBlock Name="PolishingTxt" Grid.Column="1"
|
||||
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</Grid>
|
||||
</Button>
|
||||
|
||||
@@ -64,7 +64,7 @@
|
||||
</Grid.ColumnDefinitions>
|
||||
<Image Source="{DynamicResource Copia-dimaImg}" Style="{DynamicResource OmagCut_ButtonIcon}" Grid.Column="0" />
|
||||
<TextBlock Name="CopyTemplateTxt" Grid.Column="1"
|
||||
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</Grid>
|
||||
</Button>
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
Imports EgtUILib
|
||||
|
||||
Public Class ControlsDirectCutUC1
|
||||
|
||||
' Dichiarazione delle Page UserControl
|
||||
@@ -99,6 +100,9 @@ Public Class ControlsDirectCutUC1
|
||||
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)
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
<UserControl x:Class="ControlsMachineButtonUC"
|
||||
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">
|
||||
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">
|
||||
|
||||
<Border Style="{DynamicResource OmagCut_Page2Border}">
|
||||
|
||||
@@ -16,33 +16,33 @@
|
||||
<DataTemplate DataType="{x:Type OmagCUT:TwoStateButton}">
|
||||
<ToggleButton IsChecked="{Binding IsChecked}"
|
||||
Style="{DynamicResource OmagCut_GradientYellowIconToggleButton}">
|
||||
<Image Source="{Binding ImageSource}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
<Image Source="{Binding ImageSource}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||
</ToggleButton>
|
||||
</DataTemplate>
|
||||
<DataTemplate DataType="{x:Type OmagCUT:NoStateButton}">
|
||||
<Button Command="{Binding ExecuteCommand}"
|
||||
Style="{DynamicResource OmagCut_YellowGradientYellowIconButton}">
|
||||
<Image Source="{Binding ImageSource}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
<Image Source="{Binding ImageSource}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
</DataTemplate>
|
||||
<DataTemplate DataType="{x:Type OmagCUT:ThreeStateButton}">
|
||||
<Button Command="{Binding ExecuteCommand}"
|
||||
Background="{Binding Background}"
|
||||
Style="{DynamicResource OmagCut_MachineCommandsYellowGradientYellowIconButton}">
|
||||
<Image Source="{Binding ImageSource}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
<Image Source="{Binding ImageSource}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
</DataTemplate>
|
||||
<DataTemplate DataType="{x:Type OmagCUT:DoubleCommandButton}">
|
||||
<ToggleButton IsChecked="{Binding IsChecked}"
|
||||
Style="{DynamicResource OmagCut_GradientYellowIconToggleButton}">
|
||||
<Image Source="{Binding ImageSource}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
<Image Source="{Binding ImageSource}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||
</ToggleButton>
|
||||
</DataTemplate>
|
||||
<DataTemplate DataType="{x:Type OmagCUT:PressedCommandButton}">
|
||||
<Button Style="{DynamicResource OmagCut_MachineCommandsYellowGradientYellowIconButton}"
|
||||
PreviewMouseUp="PressedCommandButton_PreviewMouseUp"
|
||||
PreviewMouseDown="PressedCommandButton_PreviewMouseDown">
|
||||
<Image Source="{Binding ImageSource}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
<Image Source="{Binding ImageSource}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
</DataTemplate>
|
||||
</ItemsControl.Resources>
|
||||
@@ -60,7 +60,7 @@
|
||||
</ItemsPanelTemplate>
|
||||
</ItemsControl.ItemsPanel>
|
||||
</ItemsControl>
|
||||
|
||||
|
||||
</Border>
|
||||
|
||||
</UserControl>
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
Imports System.Collections.ObjectModel
|
||||
Imports System.ComponentModel
|
||||
Imports EgtUILib
|
||||
Imports EgtWPFLib
|
||||
|
||||
Public Class ControlsMachineButtonUC
|
||||
Implements INotifyPropertyChanged
|
||||
@@ -23,6 +22,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,6 +74,12 @@ 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
|
||||
@@ -81,6 +89,22 @@ Public Class ControlsMachineButtonUC
|
||||
' 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
|
||||
@@ -344,33 +368,61 @@ 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
|
||||
@@ -702,8 +754,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
|
||||
@@ -760,11 +821,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)
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
<UserControl x:Class="CopyTemplateUC"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="597.3" d:DesignWidth="256">
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="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 SingleCut -->
|
||||
<Grid Name="SingleCutGrid" >
|
||||
<Grid.ColumnDefinitions>
|
||||
@@ -35,17 +35,17 @@
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Button Name="Point1Btn" Grid.Column="0" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource Acquisisci-PImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="Point1Btn" Grid.Column="0" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource Acquisisci-PImg}" Style="{DynamicResource OmagCut_ArrowButtonIcon}"/>
|
||||
</Button>
|
||||
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
||||
<ComboBox Name="PointModeCmBx" Grid.Row="1" Grid.ColumnSpan="2" Style="{StaticResource OmagCut_ComboBox}"
|
||||
Margin="6,0,6,0">
|
||||
<ComboBox Name="PointModeCmBx" Grid.Row="1" Grid.ColumnSpan="2" Style="{DynamicResource OmagCut_ComboBox}"
|
||||
Margin="6,0,6,0">
|
||||
<ComboBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding}" Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
<TextBlock Text="{Binding}" Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</DataTemplate>
|
||||
</ComboBox.ItemTemplate>
|
||||
</ComboBox>
|
||||
@@ -56,12 +56,12 @@
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<ToggleButton Name="LineBtn" Grid.Column="0" Style="{DynamicResource OmagCut_YellowIconToggleButton}">
|
||||
<Image Source="{DynamicResource LineaImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||
</ToggleButton>
|
||||
<ToggleButton Name="ArcBtn" Grid.Column="1" Style="{DynamicResource OmagCut_YellowIconToggleButton}">
|
||||
<Image Source="{DynamicResource ArcoImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||
</ToggleButton>
|
||||
<ToggleButton Name="LineBtn" Grid.Column="0" Style="{DynamicResource OmagCut_YellowIconToggleButton}">
|
||||
<Image Source="{DynamicResource LineaImg}" Style="{DynamicResource OmagCut_ArrowButtonIcon}"/>
|
||||
</ToggleButton>
|
||||
<ToggleButton Name="ArcBtn" Grid.Column="1" Style="{DynamicResource OmagCut_YellowIconToggleButton}">
|
||||
<Image Source="{DynamicResource ArcoImg}" Style="{DynamicResource OmagCut_ArrowButtonIcon}"/>
|
||||
</ToggleButton>
|
||||
|
||||
</Grid>
|
||||
|
||||
@@ -72,21 +72,21 @@
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Button Name="RemoveBtn" Grid.Column="0" Grid.Row="3" Grid.RowSpan="2" Style="{DynamicResource OmagCut_GradientBlueIconButton}">
|
||||
<Image Source="{DynamicResource Rimuovi-segmentoImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="CloseBtn" Grid.Column="1" Grid.Row="3" Grid.RowSpan="2" Style="{DynamicResource OmagCut_GradientBlueIconButton}">
|
||||
<Image Source="{DynamicResource ChiudiImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||
</Button>
|
||||
|
||||
</Grid>
|
||||
|
||||
<Button Name="SaveBtn" Grid.Column="0" Grid.Row="10" Style="{DynamicResource OmagCut_GradientBlueIconButton}">
|
||||
<Image Source="{DynamicResource Salva-taglioImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||
<Button Name="RemoveBtn" Grid.Column="0" Grid.Row="3" Grid.RowSpan="2" Style="{DynamicResource OmagCut_GradientBlueIconButton}">
|
||||
<Image Source="{DynamicResource Rimuovi-segmentoImg}" Style="{DynamicResource OmagCut_ArrowButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="CloseBtn" Grid.Column="1" Grid.Row="3" Grid.RowSpan="2" Style="{DynamicResource OmagCut_GradientBlueIconButton}">
|
||||
<Image Source="{DynamicResource ChiudiImg}" Style="{DynamicResource OmagCut_ArrowButtonIcon}"/>
|
||||
</Button>
|
||||
|
||||
<Button Name="ExitBtn" Grid.Column="2" Grid.Row="10" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource XImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
</Grid>
|
||||
|
||||
<Button Name="SaveBtn" Grid.Column="0" Grid.Row="10" Style="{DynamicResource OmagCut_GradientBlueIconButton}">
|
||||
<Image Source="{DynamicResource Salva-taglioImg}" Style="{DynamicResource OmagCut_ArrowButtonIcon}"/>
|
||||
</Button>
|
||||
|
||||
<Button Name="ExitBtn" Grid.Column="2" Grid.Row="10" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource XImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
|
||||
</Grid>
|
||||
|
||||
@@ -45,18 +45,18 @@ Public Class CopyTemplateUC
|
||||
|
||||
Private Sub CopyTemplate_Initialized(sender As Object, e As EventArgs) Handles Me.Initialized
|
||||
' Creo lista modalità di acquisizione punto
|
||||
m_PointsModeArray(PT_MODE.SAW) = EgtMsg(MSG_DIRECTCUTPAGEUC + 24)
|
||||
m_PointsModeArray(PT_MODE.LASER) = EgtMsg(MSG_DIRECTCUTPAGEUC + 12)
|
||||
m_PointsModeArray(PT_MODE.DRAW) = EgtMsg(MSG_DIRECTCUTPAGEUC + 25)
|
||||
m_PointsModeArray(PT_MODE.SAW) = EgtMsg(90224) ' Lama
|
||||
m_PointsModeArray(PT_MODE.LASER) = EgtMsg(90212) ' Laser
|
||||
m_PointsModeArray(PT_MODE.DRAW) = EgtMsg(90225) ' Disegno
|
||||
' la associo alla combobox
|
||||
PointModeCmBx.ItemsSource = m_PointsModeArray
|
||||
|
||||
Point1Btn.ToolTip = EgtMsg(MSG_DIRECTCUTPAGEUC + 10)
|
||||
LineBtn.ToolTip = EgtMsg(MSG_DIRECTCUTPAGEUC + 50)
|
||||
ArcBtn.ToolTip = EgtMsg(MSG_DIRECTCUTPAGEUC + 51)
|
||||
RemoveBtn.ToolTip = EgtMsg(MSG_DIRECTCUTPAGEUC + 52)
|
||||
CloseBtn.ToolTip = EgtMsg(MSG_DIRECTCUTPAGEUC + 53)
|
||||
SaveBtn.ToolTip = EgtMsg(MSG_DIRECTCUTPAGEUC + 54)
|
||||
Point1Btn.ToolTip = EgtMsg(90210) ' Acquisisci P1
|
||||
LineBtn.ToolTip = EgtMsg(90250) ' Linea
|
||||
ArcBtn.ToolTip = EgtMsg(90251) ' Arco
|
||||
RemoveBtn.ToolTip = EgtMsg(90252) ' Rimuovi
|
||||
CloseBtn.ToolTip = EgtMsg(90253) ' Chiudi
|
||||
SaveBtn.ToolTip = EgtMsg(90254) ' Salva
|
||||
End Sub
|
||||
|
||||
Private Sub CopyTemplate_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded
|
||||
@@ -166,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
|
||||
@@ -173,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
|
||||
@@ -188,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))
|
||||
@@ -196,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
|
||||
|
||||
@@ -0,0 +1,80 @@
|
||||
<UserControl x:Class="CustomGridUC"
|
||||
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="#636974">
|
||||
|
||||
<Grid Name ="CustomGrid" Grid.Row="5" Grid.ColumnSpan="2">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="2.5*"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<UniformGrid Grid.Row="0"
|
||||
Grid.ColumnSpan="2"
|
||||
Columns="4"
|
||||
Margin="2,2,0,2">
|
||||
<Button Name="AddCutBtn" Content="+"
|
||||
Style="{DynamicResource OmagCut_YellowTextButton}"
|
||||
Width="40" Height="40" HorizontalAlignment="Left" Margin="2,0,0,0"/>
|
||||
<Button Name="RemoveCutBtn" Content="-"
|
||||
Style="{DynamicResource OmagCut_YellowTextButton}"
|
||||
Width="40" Height="40" HorizontalAlignment="Left" Margin="2,0,0,0"/>
|
||||
<ToggleButton Name="Cut_XTgBtn" Content="X"
|
||||
Style="{DynamicResource OmagCut_YellowToggleButton}"
|
||||
Width="40" Height="40" HorizontalAlignment="Left" Margin="2,0,0,0"/>
|
||||
<ToggleButton Name="Cut_YTgBtn" Content="Y"
|
||||
Style="{DynamicResource OmagCut_YellowToggleButton}"
|
||||
Width="40" Height="40" HorizontalAlignment="Left" Margin="2,0,0,0"/>
|
||||
</UniformGrid>
|
||||
|
||||
<TextBlock Name="NumPzXTxBl" Grid.Column="0" Grid.Row="1" HorizontalAlignment="Center"
|
||||
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
|
||||
<TextBlock Name="DimPzXTxBl" Grid.Column="1" Grid.Row="1" HorizontalAlignment="Center"
|
||||
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
|
||||
|
||||
<ScrollViewer Background="Transparent" Grid.Row="2"
|
||||
Grid.ColumnSpan="2"
|
||||
VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Hidden">
|
||||
<ListBox Name="CustomGridLstBx" ScrollViewer.CanContentScroll="False">
|
||||
<ItemsControl.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<StackPanel Orientation="Vertical"/>
|
||||
</ItemsPanelTemplate>
|
||||
</ItemsControl.ItemsPanel>
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Grid Width="210">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="5*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="5*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<EgtWPFLib:EgtTextBox Text="{Binding sNumber}" Grid.Column="0"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
<EgtWPFLib:EgtTextBox Text="{Binding sInteraxis}" Grid.Column="2"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
</ListBox>
|
||||
</ScrollViewer>
|
||||
<UniformGrid Grid.Row="3"
|
||||
Grid.ColumnSpan="2"
|
||||
Columns="2"
|
||||
Margin="0,2,0,2">
|
||||
<Button Name="UpdateBtn"
|
||||
Style="{DynamicResource OmagCut_YellowTextButton}"/>
|
||||
<Button Name="ExitBtn" Grid.Row="2" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource XImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
</UniformGrid>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
@@ -0,0 +1,81 @@
|
||||
Imports EgtUILib
|
||||
|
||||
Public Class CustomGridUC
|
||||
|
||||
#Region "FIELDS & PROPERTIES"
|
||||
|
||||
' Riferimento a GridCut
|
||||
Private m_refGridCut As GridCut
|
||||
|
||||
#End Region ' Fields & Properties
|
||||
|
||||
#Region "CONSTRUCTOR"
|
||||
|
||||
Sub New(GC As GridCut)
|
||||
InitializeComponent()
|
||||
m_refGridCut = GC
|
||||
CustomGridLstBx.ItemsSource = m_refGridCut.m_ListOfCut_X
|
||||
Cut_XTgBtn.IsChecked = True
|
||||
NumPzXTxBl.Text = EgtMsg(90217) ' Numero
|
||||
DimPzXTxBl.Text = EgtMsg(90218) ' Dimensione
|
||||
UpdateBtn.Content = EgtMsg(90265) ' Aggiorna
|
||||
End Sub
|
||||
|
||||
#End Region ' Constructor
|
||||
|
||||
#Region "EVENTS"
|
||||
|
||||
Private Sub CutX_Selected() Handles Cut_XTgBtn.Click
|
||||
If Cut_XTgBtn.IsChecked Then
|
||||
Cut_YTgBtn.IsChecked = False
|
||||
CustomGridLstBx.ItemsSource = m_refGridCut.m_ListOfCut_X
|
||||
CustomGridLstBx.UpdateLayout()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub CutY_Selected() Handles Cut_YTgBtn.Click
|
||||
If Cut_YTgBtn.IsChecked Then
|
||||
Cut_XTgBtn.IsChecked = False
|
||||
CustomGridLstBx.ItemsSource = m_refGridCut.m_ListOfCut_Y
|
||||
CustomGridLstBx.UpdateLayout()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub AddCut_Click(sender As Object, e As EventArgs) Handles AddCutBtn.Click
|
||||
If Cut_XTgBtn.IsChecked Then
|
||||
m_refGridCut.m_ListOfCut_X.Add(New Cut_Axis(0, 0))
|
||||
ElseIf Cut_YTgBtn.IsChecked Then
|
||||
m_refGridCut.m_ListOfCut_Y.Add(New Cut_Axis(0, 0))
|
||||
End If
|
||||
CustomGridLstBx.UpdateLayout()
|
||||
End Sub
|
||||
|
||||
Private Sub RemoveCut_Click(sender As Object, e As EventArgs) Handles RemoveCutBtn.Click
|
||||
Dim CurrIndexListSelected As Integer = -1
|
||||
CurrIndexListSelected = CustomGridLstBx.SelectedIndex
|
||||
If Cut_XTgBtn.IsChecked Then
|
||||
If CurrIndexListSelected < 0 Or CurrIndexListSelected > m_refGridCut.m_ListOfCut_X.Count - 1 Then
|
||||
CurrIndexListSelected = m_refGridCut.m_ListOfCut_X.Count - 1
|
||||
End If
|
||||
m_refGridCut.m_ListOfCut_X.RemoveAt(CurrIndexListSelected)
|
||||
ElseIf Cut_YTgBtn.IsChecked Then
|
||||
If CurrIndexListSelected < 0 Or CurrIndexListSelected > m_refGridCut.m_ListOfCut_Y.Count - 1 Then
|
||||
CurrIndexListSelected = m_refGridCut.m_ListOfCut_Y.Count - 1
|
||||
End If
|
||||
m_refGridCut.m_ListOfCut_Y.RemoveAt(CurrIndexListSelected)
|
||||
End If
|
||||
CustomGridLstBx.UpdateLayout()
|
||||
End Sub
|
||||
|
||||
Public Sub Update_Click() Handles UpdateBtn.Click
|
||||
m_refGridCut.CreateGridCut()
|
||||
EgtDraw()
|
||||
End Sub
|
||||
|
||||
Private Sub ExitBtn_Click(sender As Object, e As RoutedEventArgs) Handles ExitBtn.Click
|
||||
m_refGridCut.SingleCutGrid.Children.Remove(Me)
|
||||
End Sub
|
||||
|
||||
#End Region ' Events
|
||||
|
||||
End Class
|
||||
@@ -1,10 +1,9 @@
|
||||
<UserControl x:Class="DirectCutPageUC"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="853.3" d:DesignWidth="1280">
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
mc:Ignorable="d" d:DesignHeight="853.3" d:DesignWidth="1280">
|
||||
|
||||
<!-- Definizione della DirectCutPage -->
|
||||
<Grid Name="DirectCutPageGrid" >
|
||||
@@ -29,15 +28,15 @@
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Button Name="PhotoBtn" Grid.Column="0" Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}">
|
||||
<Image Source="{DynamicResource PhotoImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
<Image Source="{DynamicResource PhotoImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="RawPartBtn" Grid.Column="1" Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}">
|
||||
<Image Source="{DynamicResource RawPartImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
<Image Source="{DynamicResource RawPartImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
|
||||
<Button Name="MachViewModeBtn" Grid.Column="3"
|
||||
Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}">
|
||||
<Image Source="{DynamicResource MHTImg}" Style="{StaticResource OmagCut_ScaleButtonIcon}"/>
|
||||
<Image Source="{DynamicResource MHTImg}" Style="{DynamicResource OmagCut_ScaleButtonIcon}"/>
|
||||
</Button>
|
||||
|
||||
</Grid>
|
||||
@@ -229,30 +228,30 @@
|
||||
|
||||
<ToggleButton Name="ControlsMachineBtn" Grid.Column="0"
|
||||
Style="{DynamicResource OmagCut_GradientYellowIconToggleButton}">
|
||||
<Image Source="{DynamicResource ManualImg}" Style="{StaticResource OmagCut_ScaleButtonIcon}"/>
|
||||
<Image Source="{DynamicResource ManualImg}" Style="{DynamicResource OmagCut_ScaleButtonIcon}"/>
|
||||
</ToggleButton>
|
||||
|
||||
<ToggleButton Name="VacuumMachineBtn" Grid.Column="1"
|
||||
Style="{DynamicResource OmagCut_GradientYellowIconToggleButton}">
|
||||
<Image Source="{DynamicResource VacuumImg}" Style="{StaticResource OmagCut_ScaleButtonIcon}"/>
|
||||
<Image Source="{DynamicResource VacuumImg}" Style="{DynamicResource OmagCut_ScaleButtonIcon}"/>
|
||||
</ToggleButton>
|
||||
|
||||
<!--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="{DynamicResource OmagCut_ScaleButtonIcon}"/>
|
||||
</ToggleButton>
|
||||
|
||||
<!--Comando asse Z-C-->
|
||||
<ToggleButton Name="ZCBtn" Grid.Column="3"
|
||||
Style="{DynamicResource OmagCut_GradientYellowIconToggleButton}">
|
||||
<Image Source="{DynamicResource ZCJogImg}" Style="{StaticResource OmagCut_ScaleButtonIcon}"/>
|
||||
<Image Source="{DynamicResource ZCJogImg}" Style="{DynamicResource 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="{DynamicResource OmagCut_ScaleButtonIcon}"/>
|
||||
</ToggleButton>
|
||||
|
||||
<!--Comando Remote-->
|
||||
@@ -264,15 +263,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="{DynamicResource OmagCut_ScaleButtonIcon}"/>
|
||||
</ToggleButton>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!--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="{DynamicResource OmagCut_ScaleButtonIcon}"/>
|
||||
</Button>
|
||||
|
||||
</Grid>
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
Imports EgtUILib
|
||||
Imports EgtWPFLib
|
||||
|
||||
Public Class DirectCutPageUC
|
||||
|
||||
@@ -146,6 +145,9 @@ Public Class DirectCutPageUC
|
||||
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_ControlsDirectCutUC.m_SingleCut.SetEnableParam(bSaw)
|
||||
m_ControlsDirectCutUC.m_MultipleCut.SetEnableParam(bSaw)
|
||||
m_ControlsDirectCutUC.m_GridCut.SetEnableParam(bSaw)
|
||||
@@ -176,11 +178,11 @@ Public Class DirectCutPageUC
|
||||
Case K_REMOTE
|
||||
RemoteBtn.Visibility = Visibility.Visible
|
||||
RemoteBtn.Foreground = Brushes.White
|
||||
RemoteBtn.Content = "Remote"
|
||||
RemoteBtn.Content = EgtMsg(90262) 'Remote
|
||||
Case K_PARKING
|
||||
ParkingBtn.Visibility = Visibility.Visible
|
||||
ParkingBtn.Foreground = Brushes.White
|
||||
ParkingBtn.ToolTip = "Parking"
|
||||
ParkingBtn.ToolTip = EgtMsg(90263) 'Parking
|
||||
End Select
|
||||
Next
|
||||
End Sub
|
||||
@@ -479,7 +481,7 @@ Public Class DirectCutPageUC
|
||||
|
||||
Private Sub ManualModeBtn_Click(sender As Object, e As RoutedEventArgs) Handles ManualModeBtn.Click
|
||||
' Imposto modalità manuale della macchina
|
||||
Dim nResult As Short = m_CN.DGeneralFunctions_WriteCncMode(7) ' Modalità manuale
|
||||
Dim nResult As Short = m_MainWindow.m_DirectCutPageUC.m_CN.DGeneralFunctions_WriteCncMode(7) ' Modalità manuale
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
+144
-99
@@ -1,11 +1,10 @@
|
||||
<UserControl x:Class="FlatteningCut"
|
||||
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">
|
||||
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="{DynamicResource OmagCut_LightGray}">-->
|
||||
<Border Style="{DynamicResource OmagCut_DirectCutPageBorder}">
|
||||
@@ -28,7 +27,7 @@
|
||||
<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>
|
||||
|
||||
@@ -38,90 +37,136 @@
|
||||
<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="Point1Btn" Grid.Column="0"
|
||||
Style="{DynamicResource OmagCut_YellowIconToggleButton}">
|
||||
<Image Source="{DynamicResource Acquisisci-P1Img}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||
</ToggleButton>
|
||||
|
||||
<ToggleButton Name="Point2Btn" Grid.Column="1"
|
||||
Style="{DynamicResource OmagCut_YellowIconToggleButton}">
|
||||
<Image Source="{DynamicResource Acquisisci-P2Img}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
</ToggleButton>
|
||||
<ToggleButton Name="Point2Btn" Grid.Column="1"
|
||||
Style="{DynamicResource OmagCut_YellowIconToggleButton}">
|
||||
<Image Source="{DynamicResource Acquisisci-P2Img}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||
</ToggleButton>
|
||||
|
||||
</Grid>
|
||||
|
||||
|
||||
<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="{DynamicResource OmagCut_ComboBox}" Margin="6,0,6,0">
|
||||
<ComboBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding}" Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</DataTemplate>
|
||||
</ComboBox.ItemTemplate>
|
||||
</ComboBox>
|
||||
|
||||
<TextBlock Name="DepthTxBl" Grid.Column="0" Grid.Row="2"
|
||||
Style="{DynamicResource OmagCut_CurrProjSummeryTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="DepthTxBx" Grid.Column="1" Grid.Row="2" Margin="0,0,6,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
|
||||
<TextBlock Name="DirectionTxBl" Grid.Column="0" Grid.Row="3"
|
||||
Style="{DynamicResource OmagCut_CurrProjSummeryTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="DirectionTxBx" Grid.Column="1" Grid.Row="3" Margin="0,0,6,0" IsLength="False"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
|
||||
<TextBlock Name="LenghtTxBl" Grid.Column="0" Grid.Row="4"
|
||||
Style="{DynamicResource OmagCut_CurrProjSummeryTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="LenghtTxBx" Grid.Column="1" Grid.Row="4" Margin="0,0,6,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
|
||||
<TextBlock Name="WidthTxBl" Grid.Column="0" Grid.Row="5"
|
||||
Style="{DynamicResource OmagCut_CurrProjSummeryTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="WidthTxBx" Grid.Column="1" Grid.Row="5" Margin="0,0,6,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
|
||||
<TextBlock Name="OverlapTxBl" Grid.Column="0" Grid.Row="6"
|
||||
Style="{DynamicResource OmagCut_CurrProjSummeryTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="OverlapTxBx" Grid.Column="1" Grid.Row="6" Margin="0,0,6,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
|
||||
<TextBlock Name="ZReleasedTxBl" Grid.Column="0" Grid.Row="7"
|
||||
Style="{DynamicResource OmagCut_CurrProjSummeryTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="ZReleasedTxBx" Grid.Column="1" Grid.Row="7" Margin="0,0,6,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
|
||||
<TextBlock Name="SideTxBl" Grid.Row="8" Grid.ColumnSpan="2"
|
||||
Style="{DynamicResource OmagCut_CurrProjSummeryTextBlock}"/>
|
||||
<CheckBox Name="SideChBx" Grid.Row="8" Grid.ColumnSpan="2"
|
||||
Style="{DynamicResource OmagCut_CheckBox_Single}"
|
||||
HorizontalAlignment="Right" Margin="0,0,6,0"/>
|
||||
|
||||
<ComboBox Name="TypeCmBx" Grid.Row="9" Grid.ColumnSpan="2" Style="{DynamicResource OmagCut_ComboBox}" Margin="6,0,6,0">
|
||||
<ComboBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding}" Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</DataTemplate>
|
||||
</ComboBox.ItemTemplate>
|
||||
</ComboBox>
|
||||
|
||||
<TextBlock Name="RotLockTxBl" Grid.Row="10" Grid.ColumnSpan="2"
|
||||
Style="{DynamicResource OmagCut_CurrProjSummeryTextBlock}"/>
|
||||
<CheckBox Name="RotLockChBx" Grid.Row="10" Grid.ColumnSpan="2"
|
||||
Style="{DynamicResource OmagCut_CheckBox_Single}"
|
||||
HorizontalAlignment="Right" Margin="0,0,6,0"/>
|
||||
|
||||
<TextBlock Name="ChainedPathTxBl" Grid.Row="11" Grid.ColumnSpan="2"
|
||||
Style="{DynamicResource OmagCut_CurrProjSummeryTextBlock}"/>
|
||||
<CheckBox Name="ChainedPathChBx" Grid.Row="11" Grid.ColumnSpan="2"
|
||||
Style="{DynamicResource OmagCut_CheckBox_Single}"
|
||||
HorizontalAlignment="Right" Margin="0,0,6,0"/>
|
||||
|
||||
<ComboBox Name="SelToolCmBx" Grid.Row="12" Grid.ColumnSpan="2" Style="{DynamicResource OmagCut_ComboBox}" Margin="6,0,6,0">
|
||||
<ComboBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding}" Style="{DynamicResource 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="{DynamicResource OmagCut_CurrProjSummeryTextBlock}" HorizontalAlignment="Center"/>
|
||||
<EgtWPFLib:EgtTextBox Name="XcoordTxBx" Grid.Column="1" Margin="0,0,6,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
<TextBlock Name="YcoordTxBl" Grid.Column="2" Text="Y"
|
||||
Style="{DynamicResource OmagCut_CurrProjSummeryTextBlock}" HorizontalAlignment="Center"/>
|
||||
<EgtWPFLib:EgtTextBox Name="YcoordTxBx" Grid.Column="3" Margin="0,0,6,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
</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"
|
||||
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="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" IsLength="False"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
|
||||
<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"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
|
||||
<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"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
|
||||
<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"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
|
||||
<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}"/>
|
||||
|
||||
<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}"
|
||||
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>
|
||||
|
||||
<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}"
|
||||
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>
|
||||
</ScrollViewer>
|
||||
|
||||
<Grid Grid.Row="12" Grid.ColumnSpan="2">
|
||||
<Grid.ColumnDefinitions>
|
||||
@@ -130,16 +175,16 @@
|
||||
<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="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="OkBtn" Grid.Column="1" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource EseguiImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="ExitBtn" Grid.Column="2" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource XImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
</Grid>
|
||||
|
||||
</Grid>
|
||||
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
Imports EgtUILib
|
||||
Imports EgtUILib.EgtInterface
|
||||
Imports OmagCUT.MainWindow
|
||||
|
||||
Public Class FlatteningCut
|
||||
|
||||
@@ -9,6 +11,8 @@ Public Class FlatteningCut
|
||||
Private m_bActive As Boolean = False
|
||||
' Flag di simulazione in corso
|
||||
Private m_bSimul As Boolean = False
|
||||
' Definizione del taglio diretto di questa pagina
|
||||
Private Const FLATTENING As String = "Flattening"
|
||||
|
||||
' Origine tavola e dati grezzo
|
||||
Private m_bRawOk As Boolean = False
|
||||
@@ -35,14 +39,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 +65,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,43 +75,56 @@ 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
|
||||
m_PointsModeArray(PT_MODE.SAW) = EgtMsg(MSG_DIRECTCUTPAGEUC + 24)
|
||||
m_PointsModeArray(PT_MODE.LASER) = EgtMsg(MSG_DIRECTCUTPAGEUC + 12)
|
||||
m_PointsModeArray(PT_MODE.DRAW) = EgtMsg(MSG_DIRECTCUTPAGEUC + 25)
|
||||
m_PointsModeArray(PT_MODE.SAW) = EgtMsg(90224) ' Lama
|
||||
m_PointsModeArray(PT_MODE.LASER) = EgtMsg(90212) ' Laser
|
||||
m_PointsModeArray(PT_MODE.DRAW) = EgtMsg(90225) ' Disegno
|
||||
' 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.ZIGZAG) = EgtMsg(90838) ' ZigZag
|
||||
m_TypeArray(MACH_TYPE.ONEWAY) = EgtMsg(90839) ' OneWay
|
||||
m_TypeArray(MACH_TYPE.SPIRAL) = EgtMsg(90851) ' Spirale
|
||||
' la associo alla combobox
|
||||
TypeCmBx.ItemsSource = m_TypeArray
|
||||
' assegno messaggi
|
||||
Point1Btn.ToolTip = EgtMsg(MSG_DIRECTCUTPAGEUC + 10)
|
||||
Point2Btn.ToolTip = EgtMsg(MSG_DIRECTCUTPAGEUC + 11)
|
||||
DepthTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 13)
|
||||
LenghtTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 14)
|
||||
DirectionTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 15)
|
||||
WidthTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 26)
|
||||
OverlapTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 27)
|
||||
ZReleasedTxBl.Text = "Z Svincolo"
|
||||
SideTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 23)
|
||||
RotLockTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 29)
|
||||
SimulBtn.ToolTip = EgtMsg(MSG_CADCUTPAGEUC + 1)
|
||||
OkBtn.ToolTip = EgtMsg(MSG_DIRECTCUTPAGEUC + 30)
|
||||
Point1Btn.ToolTip = EgtMsg(90210) ' Acquisisci P1
|
||||
Point2Btn.ToolTip = EgtMsg(90211) ' Acquisisci P2
|
||||
DepthTxBl.Text = EgtMsg(90213) ' Affondamento
|
||||
LenghtTxBl.Text = EgtMsg(90214) ' Lunghezza
|
||||
DirectionTxBl.Text = EgtMsg(90215) ' Direzione
|
||||
WidthTxBl.Text = EgtMsg(90226) ' Larghezza
|
||||
OverlapTxBl.Text = EgtMsg(90227) ' Sovrapposizione
|
||||
ZReleasedTxBl.Text = EgtMsg(91235) ' Z Svincolo
|
||||
SideTxBl.Text = EgtMsg(90223) ' Tagli lato motore
|
||||
RotLockTxBl.Text = EgtMsg(90229) ' Blocca Asse C
|
||||
ChainedPathTxBl.Text = EgtMsg(91236) ' Chained path
|
||||
SimulBtn.ToolTip = EgtMsg(90301) ' Simula
|
||||
OkBtn.ToolTip = EgtMsg(90230) ' Esegui
|
||||
' tipo di utensile in uso per la lavorazione
|
||||
m_ToolsArray(TOOL.SAW) = EgtMsg(90224) ' Lama
|
||||
m_ToolsArray(TOOL.MILL) = EgtMsg(91237) ' 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 +147,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 +164,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 +173,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 +185,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,22 +201,22 @@ 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_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())
|
||||
' imposto la Z di sicurezza corretta
|
||||
EgtMdbSetGeneralParam(MCH_GP.SAFEZ, DirectCutPageUC.m_dZSafe)
|
||||
EgtMdbSave()
|
||||
' 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_ControlsDirectCutUC.m_ActiveDirectCutPage = ControlsDirectCutUC.DirectCutPages.DirectCut
|
||||
' Rimuovo layer temporaneo per crocette
|
||||
@@ -268,30 +293,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
|
||||
@@ -301,15 +339,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
|
||||
@@ -339,27 +375,40 @@ 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
|
||||
@@ -367,15 +416,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
|
||||
@@ -524,6 +571,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
|
||||
@@ -532,6 +589,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
|
||||
@@ -583,9 +648,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
|
||||
@@ -600,13 +665,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
|
||||
@@ -620,10 +687,12 @@ Public Class FlatteningCut
|
||||
' 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
|
||||
@@ -658,18 +727,25 @@ Public Class FlatteningCut
|
||||
Dim ptStart As Point3d = m_ptTipP1
|
||||
ptStart.z = 0
|
||||
Dim nCutId = EgtCreateLinePDL(nLayerId, ptStart, m_dAngO, m_dLen)
|
||||
' Inidico che è un taglio Diretto di tipo Flattening
|
||||
EgtSetInfo(nCutId, INFO_DIRECTCUT, FlagDirectCuts.Flattening)
|
||||
' 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
|
||||
@@ -702,10 +778,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
|
||||
@@ -723,6 +806,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
|
||||
@@ -731,6 +818,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
|
||||
@@ -744,10 +833,78 @@ 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)
|
||||
' Inidico che è un taglio Diretto di tipo Flattening
|
||||
EgtSetInfo(IdJointCurv, INFO_DIRECTCUT, FlagDirectCuts.Flattening)
|
||||
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)
|
||||
|
||||
+120
-54
@@ -1,11 +1,11 @@
|
||||
<UserControl x:Class="GridCut"
|
||||
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">
|
||||
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}">
|
||||
@@ -34,42 +34,43 @@
|
||||
<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="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>
|
||||
<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 Name="PointModeCmBx" Grid.Row="1" Grid.ColumnSpan="2" Style="{DynamicResource OmagCut_ComboBox}"
|
||||
Margin="6,0,6,0">
|
||||
<ComboBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding}" Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
<TextBlock Text="{Binding}" Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</DataTemplate>
|
||||
</ComboBox.ItemTemplate>
|
||||
</ComboBox>
|
||||
|
||||
<TextBlock Name="DepthTxBl" Grid.Column="0" Grid.Row="2"
|
||||
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
|
||||
Style="{DynamicResource OmagCut_CurrProjSummeryTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="DepthTxBx" Grid.Column="1" Grid.Row="2" Margin="0,0,6,0"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
|
||||
<TextBlock Name="DirectionTxBl" Grid.Column="0" Grid.Row="3"
|
||||
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
|
||||
Style="{DynamicResource OmagCut_CurrProjSummeryTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="DirectionTxBx" Grid.Column="1" Grid.Row="3" Margin="0,0,6,0" IsLength="False"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
|
||||
<TextBlock Name="SideAngleTxBl" Grid.Column="0" Grid.Row="4"
|
||||
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
|
||||
Style="{DynamicResource OmagCut_CurrProjSummeryTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="SideAngleTxBx" Grid.Column="1" Grid.Row="4" Margin="0,0,6,0" IsLength="False"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
|
||||
<Grid Grid.Row="5" Grid.ColumnSpan="2">
|
||||
<!-- STANDARD -->
|
||||
<Grid Name ="StandardGrid" Grid.Row="5" Grid.ColumnSpan="2">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1.5*"/>
|
||||
<ColumnDefinition Width="2"/>
|
||||
@@ -85,31 +86,98 @@
|
||||
<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}"/>
|
||||
Style="{DynamicResource OmagCut_CurrProjSummeryTextBlock}"/>
|
||||
<TextBlock Name="DimPzXTxBl" Grid.Column="2" Grid.Row="0"
|
||||
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
|
||||
Style="{DynamicResource OmagCut_CurrProjSummeryTextBlock}"/>
|
||||
|
||||
<EgtWPFLib:EgtTextBox Name="NumPzXTxBx" Grid.Column="0" Grid.Row="1" Width="75" IsLength="False"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="DimPzXTxBx" Grid.Column="2" Grid.Row="1" Width="75"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}" />
|
||||
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
|
||||
<TextBlock Name="NumPzYTxBl" Grid.Column="0" Grid.Row="2"
|
||||
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
|
||||
Style="{DynamicResource OmagCut_CurrProjSummeryTextBlock}"/>
|
||||
<TextBlock Name="DimPzYTxBl" Grid.Column="2" Grid.Row="2"
|
||||
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
|
||||
Style="{DynamicResource OmagCut_CurrProjSummeryTextBlock}"/>
|
||||
|
||||
<EgtWPFLib:EgtTextBox Name="NumPzYTxBx" Grid.Column="0" Grid.Row="3" Width="75" IsLength="False"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="DimPzYTxBx" Grid.Column="2" Grid.Row="3" Width="75"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}" />
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
|
||||
</Grid>
|
||||
|
||||
<Button Name="CustomGridBtn" Grid.Row="5" Grid.ColumnSpan="2" Style="{DynamicResource OmagCut_YellowIconButton}"
|
||||
Margin="10,30,10,30">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="80"/>
|
||||
<ColumnDefinition Width="140"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Image Source="{DynamicResource Taglio-grigliaImg}" Style="{DynamicResource OmagCut_ButtonIcon}" Grid.Column="0" Height="90" Width="90" />
|
||||
<TextBlock Name="GridCutTxt" Grid.Column="1"
|
||||
HorizontalAlignment="Left"
|
||||
Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</Grid>
|
||||
</Button>
|
||||
|
||||
<!-- SPECIALE -->
|
||||
<!--<Grid Name ="CustomGrid" Grid.Row="5" Grid.ColumnSpan="2">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="2.5*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<StackPanel Orientation="Horizontal" Grid.Row="0">
|
||||
<Button Name="AddCutBtn" Content="+"
|
||||
Style="{DynamicResource OmagCut_YellowTextButton}"
|
||||
Width="35" Height="35" HorizontalAlignment="Left"/>
|
||||
<Button Name="RemoveCutBtn" Content="-"
|
||||
Style="{DynamicResource OmagCut_YellowTextButton}"
|
||||
Width="35" Height="35" HorizontalAlignment="Left" Margin="2,0,0,0"/>
|
||||
<ToggleButton Name="Cut_XTgBtn" Content="X"
|
||||
Style="{DynamicResource OmagCut_YellowToggleButton}"
|
||||
Width="35" Height="35" HorizontalAlignment="Left" Margin="2,0,0,0"/>
|
||||
<ToggleButton Name="Cut_YTgBtn" Content="Y"
|
||||
Style="{DynamicResource OmagCut_YellowToggleButton}"
|
||||
Width="35" Height="35" HorizontalAlignment="Left" Margin="2,0,0,0"/>
|
||||
<Button Name="UpdateBtn" Content="Update"
|
||||
Style="{DynamicResource OmagCut_YellowTextButton}"
|
||||
Width="85" Height="35" HorizontalAlignment="Left" Margin="2,0,0,0"/>
|
||||
</StackPanel>
|
||||
|
||||
<ScrollViewer Background="Transparent" Grid.Row="1"
|
||||
Margin="0,5,0,0"
|
||||
VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Hidden">
|
||||
<ListBox Name="CustomGridLstBx" ScrollViewer.CanContentScroll="False">
|
||||
<ItemsControl.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<StackPanel Orientation="Vertical"/>
|
||||
</ItemsPanelTemplate>
|
||||
</ItemsControl.ItemsPanel>
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Grid Width="210">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="5*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="5*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<EgtWPFLib:EgtTextBox Text="{Binding sNumber}" Grid.Column="0"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
<EgtWPFLib:EgtTextBox Text="{Binding sInteraxis}" Grid.Column="2"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
</ListBox>
|
||||
</ScrollViewer>
|
||||
</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"/>
|
||||
Style="{DynamicResource OmagCut_CurrProjSummeryTextBlock}"/>
|
||||
<CheckBox Name="SideChBx" Grid.Row="6" Grid.ColumnSpan="2" Style="{DynamicResource OmagCut_CheckBox_Single}"
|
||||
HorizontalAlignment="Right" Margin="0,0,6,0"/>
|
||||
|
||||
<Grid Grid.Row="7" Grid.ColumnSpan="2">
|
||||
<Grid.ColumnDefinitions>
|
||||
@@ -119,13 +187,13 @@
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Name="XcoordTxBl" Grid.Column="0" Text="X"
|
||||
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}" HorizontalAlignment="Center"/>
|
||||
Style="{DynamicResource OmagCut_CurrProjSummeryTextBlock}" HorizontalAlignment="Center"/>
|
||||
<EgtWPFLib:EgtTextBox Name="XcoordTxBx" Grid.Column="1" Margin="0,0,6,0"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
<TextBlock Name="YcoordTxBl" Grid.Column="2" Text="Y"
|
||||
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}" HorizontalAlignment="Center"/>
|
||||
Style="{DynamicResource OmagCut_CurrProjSummeryTextBlock}" HorizontalAlignment="Center"/>
|
||||
<EgtWPFLib:EgtTextBox Name="YcoordTxBx" Grid.Column="3" Margin="0,0,6,0"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
</Grid>
|
||||
|
||||
<Grid Grid.Row="11" Grid.ColumnSpan="2">
|
||||
@@ -135,19 +203,17 @@
|
||||
<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="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="OkBtn" Grid.Column="1" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource EseguiImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="ExitBtn" Grid.Column="2" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource XImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
</Grid>
|
||||
|
||||
</Grid>
|
||||
|
||||
</Border>
|
||||
|
||||
</UserControl>
|
||||
|
||||
+427
-61
@@ -1,4 +1,5 @@
|
||||
Imports EgtUILib
|
||||
Imports System.Collections.ObjectModel
|
||||
|
||||
Public Class GridCut
|
||||
' Riferimenti a pagine
|
||||
@@ -38,6 +39,14 @@ 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
|
||||
|
||||
' Gestione griglia Custom
|
||||
Dim m_bCustomGrid As Boolean = False
|
||||
Public m_ListOfCut_X As New ObservableCollection(Of Cut_Axis)
|
||||
Public m_ListOfCut_Y As New ObservableCollection(Of Cut_Axis)
|
||||
Friend m_CustomGrid As CustomGridUC
|
||||
|
||||
' Costanti
|
||||
Private Const MAX_TAB_DEPTH As Double = 10.0
|
||||
@@ -57,35 +66,77 @@ Public Class GridCut
|
||||
|
||||
Private Sub GridCut_Initialized(sender As Object, e As EventArgs) Handles Me.Initialized
|
||||
' Creo lista modalità di acquisizione punto
|
||||
m_PointsModeArray(PT_MODE.SAW) = EgtMsg(MSG_DIRECTCUTPAGEUC + 24)
|
||||
m_PointsModeArray(PT_MODE.LASER) = EgtMsg(MSG_DIRECTCUTPAGEUC + 12)
|
||||
m_PointsModeArray(PT_MODE.DRAW) = EgtMsg(MSG_DIRECTCUTPAGEUC + 25)
|
||||
m_PointsModeArray(PT_MODE.SAW) = EgtMsg(90224) ' Lama
|
||||
m_PointsModeArray(PT_MODE.LASER) = EgtMsg(90212) ' Laser
|
||||
m_PointsModeArray(PT_MODE.DRAW) = EgtMsg(90225) ' Disegno
|
||||
' la associo alla combobox
|
||||
PointModeCmBx.ItemsSource = m_PointsModeArray
|
||||
' assegno messaggi
|
||||
Point1Btn.ToolTip = EgtMsg(MSG_DIRECTCUTPAGEUC + 10)
|
||||
Point2Btn.ToolTip = EgtMsg(MSG_DIRECTCUTPAGEUC + 11)
|
||||
DepthTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 13)
|
||||
DirectionTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 15)
|
||||
SideAngleTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 16)
|
||||
NumPzXTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 19)
|
||||
DimPzXTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 20)
|
||||
NumPzYTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 21)
|
||||
DimPzYTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 22)
|
||||
SideTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 23)
|
||||
SimulBtn.ToolTip = EgtMsg(MSG_CADCUTPAGEUC + 1)
|
||||
OkBtn.ToolTip = EgtMsg(MSG_DIRECTCUTPAGEUC + 30)
|
||||
Point1Btn.ToolTip = EgtMsg(90210) ' Acquisisci P1
|
||||
Point2Btn.ToolTip = EgtMsg(90211) ' Acquisisci P2
|
||||
DepthTxBl.Text = EgtMsg(90213) ' Affondamento
|
||||
DirectionTxBl.Text = EgtMsg(90215) ' Direzione
|
||||
SideAngleTxBl.Text = EgtMsg(90216) ' Inclinazione
|
||||
NumPzXTxBl.Text = EgtMsg(90219) ' Numero X
|
||||
DimPzXTxBl.Text = EgtMsg(90220) ' Dimensioni X
|
||||
NumPzYTxBl.Text = EgtMsg(90221) ' Numero Y
|
||||
DimPzYTxBl.Text = EgtMsg(90222) ' Dimensioni Y
|
||||
SideTxBl.Text = EgtMsg(90223) ' Taglia lato motore
|
||||
SimulBtn.ToolTip = EgtMsg(90301) ' Simula
|
||||
OkBtn.ToolTip = EgtMsg(90230) ' Esegui
|
||||
GridCutTxt.Text = EgtMsg(90264) ' Custom Grid
|
||||
' Carico i dati dell'ultimo taglio
|
||||
m_dDepth = GetPrivateProfileDouble( S_DIRECTCUTS, K_DC_GRID_DEPTH, m_dDepth, m_MainWindow.GetIniFile())
|
||||
m_dAngO = GetPrivateProfileDouble( S_DIRECTCUTS, K_DC_GRID_ANGH, m_dAngO, m_MainWindow.GetIniFile())
|
||||
m_dAngV = GetPrivateProfileDouble( S_DIRECTCUTS, K_DC_GRID_ANGV, m_dAngV, m_MainWindow.GetIniFile())
|
||||
m_nNumX = GetPrivateProfileInt( S_DIRECTCUTS, K_DC_GRID_NUMX, m_nNumX, m_MainWindow.GetIniFile())
|
||||
m_dDimX = GetPrivateProfileDouble( S_DIRECTCUTS, K_DC_GRID_DIMX, m_dDimX, m_MainWindow.GetIniFile())
|
||||
m_nNumY = GetPrivateProfileInt( S_DIRECTCUTS, K_DC_GRID_NUMY, m_nNumY, m_MainWindow.GetIniFile())
|
||||
m_dDimY = GetPrivateProfileDouble( S_DIRECTCUTS, K_DC_GRID_DIMY, m_dDimY, m_MainWindow.GetIniFile())
|
||||
m_bHeadSide = ( GetPrivateProfileInt( S_DIRECTCUTS, K_DC_GRID_HEADSIDE, 0, m_MainWindow.GetIniFile()) <> 0)
|
||||
m_ptTipP1.x = GetPrivateProfileDouble( S_DIRECTCUTS, K_DC_GRID_POSX, m_ptTipP1.x, m_MainWindow.GetIniFile())
|
||||
m_ptTipP1.y = GetPrivateProfileDouble( S_DIRECTCUTS, K_DC_GRID_POSY, m_ptTipP1.y, m_MainWindow.GetIniFile())
|
||||
m_dDepth = GetPrivateProfileDouble(S_DIRECTCUTS, K_DC_GRID_DEPTH, m_dDepth, m_MainWindow.GetIniFile())
|
||||
m_dAngO = GetPrivateProfileDouble(S_DIRECTCUTS, K_DC_GRID_ANGH, m_dAngO, m_MainWindow.GetIniFile())
|
||||
m_dAngV = GetPrivateProfileDouble(S_DIRECTCUTS, K_DC_GRID_ANGV, m_dAngV, m_MainWindow.GetIniFile())
|
||||
m_nNumX = GetPrivateProfileInt(S_DIRECTCUTS, K_DC_GRID_NUMX, m_nNumX, m_MainWindow.GetIniFile())
|
||||
m_dDimX = GetPrivateProfileDouble(S_DIRECTCUTS, K_DC_GRID_DIMX, m_dDimX, m_MainWindow.GetIniFile())
|
||||
m_nNumY = GetPrivateProfileInt(S_DIRECTCUTS, K_DC_GRID_NUMY, m_nNumY, m_MainWindow.GetIniFile())
|
||||
m_dDepth = GetPrivateProfileDouble(S_DIRECTCUTS, K_DC_GRID_DEPTH, m_dDepth, m_MainWindow.GetIniFile())
|
||||
m_dAngO = GetPrivateProfileDouble(S_DIRECTCUTS, K_DC_GRID_ANGH, m_dAngO, m_MainWindow.GetIniFile())
|
||||
m_dAngV = GetPrivateProfileDouble(S_DIRECTCUTS, K_DC_GRID_ANGV, m_dAngV, m_MainWindow.GetIniFile())
|
||||
m_nNumX = GetPrivateProfileInt(S_DIRECTCUTS, K_DC_GRID_NUMX, m_nNumX, m_MainWindow.GetIniFile())
|
||||
m_dDimX = GetPrivateProfileDouble(S_DIRECTCUTS, K_DC_GRID_DIMX, m_dDimX, m_MainWindow.GetIniFile())
|
||||
m_nNumY = GetPrivateProfileInt(S_DIRECTCUTS, K_DC_GRID_NUMY, m_nNumY, m_MainWindow.GetIniFile())
|
||||
m_dDimY = GetPrivateProfileDouble(S_DIRECTCUTS, K_DC_GRID_DIMY, m_dDimY, m_MainWindow.GetIniFile())
|
||||
|
||||
' Carico i dati per i tagli di griglia Custom
|
||||
m_bCustomGrid = (GetPrivateProfileInt(S_DIRECTCUTS, K_ENABLECUSTOMGRID, 0, m_MainWindow.GetIniFile()) <> 0)
|
||||
If m_bCustomGrid Then
|
||||
LoadCustomData(K_GRIDNUMDIMXCUSTOM, m_ListOfCut_X)
|
||||
LoadCustomData(K_GRIDNUMDIMYCUSTOM, m_ListOfCut_Y)
|
||||
End If
|
||||
|
||||
' --- 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())
|
||||
|
||||
End Sub
|
||||
|
||||
' Lettura dei dati della griglia Custom
|
||||
Private Sub LoadCustomData(sIpKeyName As String, LocalList As ObservableCollection(Of Cut_Axis))
|
||||
Dim dVal As Double = 0
|
||||
Dim nVal As Integer = 0
|
||||
Dim sVal As String = String.Empty
|
||||
GetPrivateProfileString(S_DIRECTCUTS, sIpKeyName, sVal, sVal, m_MainWindow.GetIniFile())
|
||||
Dim sItems As String() = sVal.Split(";"c)
|
||||
If sItems.Count > 0 Then
|
||||
For Each Item As String In sItems
|
||||
Dim sSubItems As String() = Item.Split(",")
|
||||
If sSubItems.Count = 2 Then
|
||||
If IsNumeric(sSubItems(0)) And IsNumeric(sSubItems(1)) Then
|
||||
nVal = CInt(sSubItems(0))
|
||||
StringToDouble(sSubItems(1), dVal)
|
||||
LocalList.Add(New Cut_Axis(nVal, dVal))
|
||||
End If
|
||||
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub GridCut_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded
|
||||
@@ -124,7 +175,8 @@ Public Class GridCut
|
||||
m_bPointP1Ok = False
|
||||
m_bPointP2Ok = False
|
||||
' Inizializzo primo punto acquisito dal disegno
|
||||
m_ptPrev = m_ptTipP1 + ( m_ptTabOri - Point3d.ORIG())
|
||||
m_ptPrev = m_ptTipP1 + (m_ptTabOri - Point3d.ORIG())
|
||||
m_ptPrev = m_ptTipP1 + (m_ptTabOri - Point3d.ORIG())
|
||||
m_ptPrev.z = m_ptRawMax.z
|
||||
' Disegno crocetta che indica il punto acquisito
|
||||
CreateCross(m_nTempLay, m_ptPrev)
|
||||
@@ -133,14 +185,24 @@ Public Class GridCut
|
||||
SetCoordVisibility(True)
|
||||
ShowCoord()
|
||||
' Assegno parametri di lavorazione
|
||||
DepthTxBx.Text = LenToString( m_dDepth, 1)
|
||||
DirectionTxBx.Text = DoubleToString( m_dAngO - m_MainWindow.m_CurrentMachine.dDeltaC, 2)
|
||||
SideAngleTxBx.Text = DoubleToString( m_dAngV, 2)
|
||||
DepthTxBx.Text = LenToString(m_dDepth, 1)
|
||||
DirectionTxBx.Text = DoubleToString(m_dAngO - m_MainWindow.m_CurrentMachine.dDeltaC, 2)
|
||||
SideAngleTxBx.Text = DoubleToString(m_dAngV, 2)
|
||||
DepthTxBx.Text = LenToString(m_dDepth, 1)
|
||||
DirectionTxBx.Text = DoubleToString(m_dAngO - m_MainWindow.m_CurrentMachine.dDeltaC, 2)
|
||||
SideAngleTxBx.Text = DoubleToString(m_dAngV, 2)
|
||||
NumPzXTxBx.Text = m_nNumX.ToString()
|
||||
DimPzXTxBx.Text = LenToString( m_dDimX, 1)
|
||||
DimPzXTxBx.Text = LenToString(m_dDimX, 1)
|
||||
DimPzXTxBx.Text = LenToString(m_dDimX, 1)
|
||||
NumPzYTxBx.Text = m_nNumY.ToString()
|
||||
DimPzYTxBx.Text = LenToString( m_dDimY, 1)
|
||||
DimPzYTxBx.Text = LenToString(m_dDimY, 1)
|
||||
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()
|
||||
@@ -150,21 +212,51 @@ Public Class GridCut
|
||||
Point1Btn.IsChecked = False
|
||||
' Aggiorno visualizzazione
|
||||
EgtDraw()
|
||||
|
||||
If m_bCustomGrid Then
|
||||
StandardGrid.Visibility = Visibility.Hidden
|
||||
CustomGridBtn.Visibility = Visibility.Visible
|
||||
m_CustomGrid = New CustomGridUC(Me)
|
||||
'CustomGrid.Visibility = Visibility.Visible
|
||||
'Cut_XTgBtn.IsChecked = True
|
||||
'CustomGridLstBx.ItemsSource = m_ListOfCut_X
|
||||
Else
|
||||
StandardGrid.Visibility = Visibility.Visible
|
||||
CustomGridBtn.Visibility = Visibility.Hidden
|
||||
'CustomGrid.Visibility = Visibility.Hidden
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
Friend Sub GridCut_Unloaded(sender As Object, e As RoutedEventArgs) Handles Me.Unloaded
|
||||
' Salvo i dati correnti
|
||||
WritePrivateProfileString( S_DIRECTCUTS, K_DC_GRID_DEPTH, DoubleToString( m_dDepth, 2), m_MainWindow.GetIniFile())
|
||||
WritePrivateProfileString( S_DIRECTCUTS, K_DC_GRID_ANGH, DoubleToString( m_dAngO, 2), m_MainWindow.GetIniFile())
|
||||
WritePrivateProfileString( S_DIRECTCUTS, K_DC_GRID_ANGV, DoubleToString( m_dAngV, 2), m_MainWindow.GetIniFile())
|
||||
WritePrivateProfileString( S_DIRECTCUTS, K_DC_GRID_NUMX, m_nNumX.ToString(), m_MainWindow.GetIniFile())
|
||||
WritePrivateProfileString( S_DIRECTCUTS, K_DC_GRID_DIMX, DoubleToString( m_dDimX, 2), m_MainWindow.GetIniFile())
|
||||
WritePrivateProfileString( S_DIRECTCUTS, K_DC_GRID_NUMY, m_nNumY.ToString(), m_MainWindow.GetIniFile())
|
||||
WritePrivateProfileString( S_DIRECTCUTS, K_DC_GRID_DIMY, DoubleToString( m_dDimY, 2), m_MainWindow.GetIniFile())
|
||||
WritePrivateProfileString( S_DIRECTCUTS, K_DC_GRID_HEADSIDE, If( m_bHeadSide, "1", "0"), m_MainWindow.GetIniFile())
|
||||
WritePrivateProfileString( S_DIRECTCUTS, K_DC_GRID_POSX, DoubleToString( m_ptTipP1.x, 2), m_MainWindow.GetIniFile())
|
||||
WritePrivateProfileString( S_DIRECTCUTS, K_DC_GRID_POSY, DoubleToString( m_ptTipP1.y, 2), m_MainWindow.GetIniFile())
|
||||
WritePrivateProfileString(S_DIRECTCUTS, K_DC_GRID_DEPTH, DoubleToString(m_dDepth, 2), m_MainWindow.GetIniFile())
|
||||
WritePrivateProfileString(S_DIRECTCUTS, K_DC_GRID_ANGH, DoubleToString(m_dAngO, 2), m_MainWindow.GetIniFile())
|
||||
WritePrivateProfileString(S_DIRECTCUTS, K_DC_GRID_ANGV, DoubleToString(m_dAngV, 2), m_MainWindow.GetIniFile())
|
||||
WritePrivateProfileString(S_DIRECTCUTS, K_DC_GRID_NUMX, m_nNumX.ToString(), m_MainWindow.GetIniFile())
|
||||
WritePrivateProfileString(S_DIRECTCUTS, K_DC_GRID_DIMX, DoubleToString(m_dDimX, 2), m_MainWindow.GetIniFile())
|
||||
WritePrivateProfileString(S_DIRECTCUTS, K_DC_GRID_NUMY, m_nNumY.ToString(), m_MainWindow.GetIniFile())
|
||||
WritePrivateProfileString(S_DIRECTCUTS, K_DC_GRID_DIMY, DoubleToString(m_dDimY, 2), m_MainWindow.GetIniFile())
|
||||
WritePrivateProfileString(S_DIRECTCUTS, K_DC_GRID_HEADSIDE, If(m_bHeadSide, "1", "0"), m_MainWindow.GetIniFile())
|
||||
WritePrivateProfileString(S_DIRECTCUTS, K_DC_GRID_POSX, DoubleToString(m_ptTipP1.x, 2), m_MainWindow.GetIniFile())
|
||||
WritePrivateProfileString(S_DIRECTCUTS, K_DC_GRID_POSY, DoubleToString(m_ptTipP1.y, 2), m_MainWindow.GetIniFile())
|
||||
|
||||
If m_bCustomGrid Then
|
||||
Dim sGridNumDimXCustom As String = ""
|
||||
For Index_X As Integer = 0 To m_ListOfCut_X.Count - 1
|
||||
sGridNumDimXCustom &= m_ListOfCut_X(Index_X).sNumber & "," & DoubleToString(m_ListOfCut_X(Index_X).dInteraxis, 2) & ";"
|
||||
Next
|
||||
If sGridNumDimXCustom <> "" Then sGridNumDimXCustom = sGridNumDimXCustom.Remove(sGridNumDimXCustom.Count - 1)
|
||||
WritePrivateProfileString(S_DIRECTCUTS, "GridNumDimXCustom", sGridNumDimXCustom, m_MainWindow.GetIniFile())
|
||||
Dim sGridNumDimYCustom As String = ""
|
||||
For Index_Y As Integer = 0 To m_ListOfCut_Y.Count - 1
|
||||
sGridNumDimYCustom &= m_ListOfCut_Y(Index_Y).sNumber & "," & DoubleToString(m_ListOfCut_Y(Index_Y).dInteraxis, 2) & ";"
|
||||
Next
|
||||
If sGridNumDimYCustom <> "" Then sGridNumDimYCustom = sGridNumDimYCustom.Remove(sGridNumDimYCustom.Count - 1)
|
||||
WritePrivateProfileString(S_DIRECTCUTS, "GridNumDimYCustom", sGridNumDimYCustom, m_MainWindow.GetIniFile())
|
||||
End If
|
||||
|
||||
' Se non vado in simulazione
|
||||
If Not m_bSimul Then
|
||||
' Dichiaro sottopagina da non riattivare
|
||||
@@ -248,6 +340,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 +358,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 +372,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 +380,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
|
||||
@@ -290,7 +395,7 @@ Public Class GridCut
|
||||
DirectionTxBx.Text = DoubleToString(m_dAngO - m_MainWindow.m_CurrentMachine.dDeltaC, 2)
|
||||
SideAngleTxBx.Text = DoubleToString(m_dAngV, 2)
|
||||
|
||||
' Altrimenti punto da click di mouse
|
||||
' Altrimenti punto da click di mouse
|
||||
Else
|
||||
' Assegno punto selezionato nel disegno a m_ptTipP1
|
||||
m_ptTipP1 = m_ptPrev
|
||||
@@ -327,6 +432,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 +450,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 +464,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 +472,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
|
||||
@@ -367,7 +485,7 @@ Public Class GridCut
|
||||
m_dAngV = 90 - dTAngV
|
||||
SideAngleTxBx.Text = DoubleToString(m_dAngV, 2)
|
||||
|
||||
' Altrimenti punto da click di mouse
|
||||
' Altrimenti punto da click di mouse
|
||||
Else
|
||||
' Assegno punto selezionato nel disegno a m_ptTipP2
|
||||
m_ptTipP2 = m_ptPrev
|
||||
@@ -483,6 +601,64 @@ Public Class GridCut
|
||||
EgtDraw()
|
||||
End Sub
|
||||
|
||||
Private Sub CustomGridBtn_Click(sender As Object, e As RoutedEventArgs) Handles CustomGridBtn.Click
|
||||
m_CustomGrid.SetValue(Grid.RowProperty, 1)
|
||||
m_CustomGrid.SetValue(Grid.RowSpanProperty, 6)
|
||||
m_CustomGrid.SetValue(Grid.ColumnSpanProperty, 2)
|
||||
SingleCutGrid.Children.Add(m_CustomGrid)
|
||||
End Sub
|
||||
|
||||
'#Region "CUSTOM LIST GRID"
|
||||
|
||||
' Private Sub CutX_Selected() Handles Cut_XTgBtn.Click
|
||||
' If Cut_XTgBtn.IsChecked Then
|
||||
' Cut_YTgBtn.IsChecked = False
|
||||
' CustomGridLstBx.ItemsSource = m_ListOfCut_X
|
||||
' CustomGridLstBx.UpdateLayout()
|
||||
' End If
|
||||
' End Sub
|
||||
|
||||
' Private Sub CutY_Selected() Handles Cut_YTgBtn.Click
|
||||
' If Cut_YTgBtn.IsChecked Then
|
||||
' Cut_XTgBtn.IsChecked = False
|
||||
' CustomGridLstBx.ItemsSource = m_ListOfCut_Y
|
||||
' CustomGridLstBx.UpdateLayout()
|
||||
' End If
|
||||
' End Sub
|
||||
|
||||
' Private Sub AddCut_Click(sender As Object, e As EventArgs) Handles AddCutBtn.Click
|
||||
' If Cut_XTgBtn.IsChecked Then
|
||||
' m_ListOfCut_X.Add(New Cut_Axis(0, 0))
|
||||
' ElseIf Cut_YTgBtn.IsChecked Then
|
||||
' m_ListOfCut_Y.Add(New Cut_Axis(0, 0))
|
||||
' End If
|
||||
' CustomGridLstBx.UpdateLayout()
|
||||
' End Sub
|
||||
|
||||
' Private Sub RemoveCut_Click(sender As Object, e As EventArgs) Handles RemoveCutBtn.Click
|
||||
' Dim CurrIndexListSelected As Integer = -1
|
||||
' CurrIndexListSelected = CustomGridLstBx.SelectedIndex
|
||||
' If Cut_XTgBtn.IsChecked Then
|
||||
' If CurrIndexListSelected < 0 Or CurrIndexListSelected > m_ListOfCut_X.Count - 1 Then
|
||||
' CurrIndexListSelected = m_ListOfCut_X.Count - 1
|
||||
' End If
|
||||
' m_ListOfCut_X.RemoveAt(CurrIndexListSelected)
|
||||
' ElseIf Cut_YTgBtn.IsChecked Then
|
||||
' If CurrIndexListSelected < 0 Or CurrIndexListSelected > m_ListOfCut_Y.Count - 1 Then
|
||||
' CurrIndexListSelected = m_ListOfCut_Y.Count - 1
|
||||
' End If
|
||||
' m_ListOfCut_Y.RemoveAt(CurrIndexListSelected)
|
||||
' End If
|
||||
' CustomGridLstBx.UpdateLayout()
|
||||
' End Sub
|
||||
|
||||
' Public Sub Update_Click() Handles UpdateBtn.Click
|
||||
' CreateGridCut()
|
||||
' EgtDraw()
|
||||
' End Sub
|
||||
|
||||
'#End Region ' Custom Grid
|
||||
|
||||
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
|
||||
@@ -506,9 +682,9 @@ Public Class GridCut
|
||||
m_CurrProjPage.SetWarningMessage("Trial Version")
|
||||
#Else
|
||||
' Verifico non sia versione Ufficio
|
||||
If m_MainWindow.GetKeyOption( MainWindow.KEY_OPT.OFFICE_TYPE) Then
|
||||
m_CurrProjPage.SetWarningMessage( "Office Version")
|
||||
Return
|
||||
If m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.OFFICE_TYPE) Then
|
||||
m_CurrProjPage.SetWarningMessage("Office Version")
|
||||
Return
|
||||
End If
|
||||
' Verifico ci sia un taglio valido
|
||||
If Not m_bCutOk Then Return
|
||||
@@ -523,13 +699,15 @@ 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
|
||||
@@ -538,7 +716,7 @@ Public Class GridCut
|
||||
m_MainWindow.m_DirectCutPageUC.m_ControlsDirectCutUC.LeftButtonGrid.Children.Remove(Me)
|
||||
End Sub
|
||||
|
||||
Private Function CreateGridCut() As Boolean
|
||||
Friend Function CreateGridCut() As Boolean
|
||||
' Verifico sia definito il punto iniziale e il grezzo
|
||||
If Not m_bPointP1Ok Or Not m_bRawOk Then
|
||||
m_bCutOk = False
|
||||
@@ -590,11 +768,18 @@ Public Class GridCut
|
||||
End Function
|
||||
|
||||
Private Function MultiplyCut(nLayerId As Integer) As Boolean
|
||||
If m_bCustomGrid Then
|
||||
Return MultiplyCut_1(nLayerId)
|
||||
End If
|
||||
Return MultiplyCut_0(nLayerId)
|
||||
End Function
|
||||
|
||||
Private Function MultiplyCut_0(nLayerId As Integer) As Boolean
|
||||
' Recupero lo spessore del taglio della lama o del waterjet correntemente attiva
|
||||
Dim nType As Integer = 0
|
||||
EgtTdbGetCurrToolParam( MCH_TP.TYPE, nType)
|
||||
EgtTdbGetCurrToolParam(MCH_TP.TYPE, nType)
|
||||
Dim dThick As Double = 0
|
||||
EgtTdbGetCurrToolParam( If( nType = MCH_TY.SAW_STD, MCH_TP.THICK, MCH_TP.DIAM), dThick)
|
||||
EgtTdbGetCurrToolParam(If(nType = MCH_TY.SAW_STD, MCH_TP.THICK, MCH_TP.DIAM), dThick)
|
||||
' Ricalcolo lo spessore in base all'inclinazione
|
||||
dThick = dThick / Math.Cos(m_dAngV * Math.PI / 180)
|
||||
' Imposto angolo di rotazione a seconda del lato dei tagli paralleli
|
||||
@@ -616,6 +801,16 @@ Public Class GridCut
|
||||
If dDimPzY <> 0 And nNumPzY > 0 And dDimPzX <> 0 And nNumPzX > 0 Then
|
||||
Dim dLenX As Double = dThick + (dDimPzX + dThick) * nNumPzX
|
||||
Dim nCutParaId = EgtCreateLinePDL(nLayerId, ptStart, m_dAngO, dLenX + 0.1)
|
||||
' Inidico che è un taglio Diretto di tipo GridCut
|
||||
EgtSetInfo(nCutParaId, INFO_DIRECTCUT, MainWindow.FlagDirectCuts.GridCut)
|
||||
' --- 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)
|
||||
@@ -634,6 +829,14 @@ Public Class GridCut
|
||||
' Arretro il punto di partenza di uno spessore lama
|
||||
Dim vtDeltaPos As Vector3d = Vector3d.FromPolar(dThick + 0.1, m_dAngO - 90)
|
||||
Dim nCutPerpId = EgtCreateLinePDL(nLayerId, ptStart + vtDeltaPos, m_dAngO + 90, dLenY + 0.2)
|
||||
' Inidico che è un taglio Diretto di tipo GridCut
|
||||
EgtSetInfo(nCutPerpId, INFO_DIRECTCUT, MainWindow.FlagDirectCuts.GridCut)
|
||||
' --- 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,7 +858,118 @@ Public Class GridCut
|
||||
Return True
|
||||
End Function
|
||||
|
||||
Private Function MultiplyCut_1(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)
|
||||
' 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 = If(SideChBx.IsChecked(), -90, 90)
|
||||
|
||||
' Recupero dati da interfaccia
|
||||
Dim dDimPzX As Double = If(m_ListOfCut_X.Count = 0, 0.0, m_ListOfCut_X(0).dInteraxis)
|
||||
Dim nNumPzX As Integer = If(m_ListOfCut_X.Count = 0, 0, m_ListOfCut_X(0).nNumber)
|
||||
|
||||
Dim dDimPzY As Double = If(m_ListOfCut_Y.Count = 0, 0.0, m_ListOfCut_Y(0).dInteraxis)
|
||||
Dim nNumPzY As Integer = If(m_ListOfCut_Y.Count = 0, 0, m_ListOfCut_Y(0).nNumber)
|
||||
|
||||
Dim TotLenX As Double = 0
|
||||
For Ind_X As Integer = 0 To m_ListOfCut_X.Count - 1
|
||||
TotLenX = TotLenX + (m_ListOfCut_X(Ind_X).dInteraxis + dThick) * m_ListOfCut_X(Ind_X).nNumber
|
||||
Next
|
||||
|
||||
Dim TotLenY As Double = 0
|
||||
For Ind_Y As Integer = 0 To m_ListOfCut_Y.Count - 1
|
||||
TotLenY = TotLenY + (m_ListOfCut_Y(Ind_Y).dInteraxis + dThick) * m_ListOfCut_Y(Ind_Y).nNumber
|
||||
Next
|
||||
|
||||
' 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
|
||||
' -------------- TAGLI PARALLELI ASSE Y --------------
|
||||
Dim dLenX As Double = dThick + TotLenX
|
||||
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)
|
||||
|
||||
For IndexList_Y As Integer = 0 To m_ListOfCut_Y.Count - 1
|
||||
Dim nCut2Id As Integer = GDB_ID.NULL
|
||||
dDimPzY = m_ListOfCut_Y(IndexList_Y).dInteraxis
|
||||
nNumPzY = m_ListOfCut_Y(IndexList_Y).nNumber
|
||||
' 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
|
||||
nCut2Id = EgtCopyGlob(nCutParaId, nLayerId)
|
||||
EgtMove(nCut2Id, vtPerpMove, GDB_RT.GLOB)
|
||||
Next
|
||||
nCutParaId = nCut2Id
|
||||
Next
|
||||
|
||||
' -------------- TAGLI PARALLELI ASSE X --------------
|
||||
' Calcolo primo taglio perpendicolare
|
||||
Dim dLenY As Double = dThick + TotLenY
|
||||
' 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)
|
||||
EgtMirror(nCutPerpId, ptStart + Vector3d.FromPolar(dThick / 2, m_dAngO - 90), vtRot, GDB_RT.GLOB)
|
||||
EgtInvertCurve(nCutPerpId)
|
||||
End If
|
||||
|
||||
' Imposto affondamento e angolo di fianco sul taglio
|
||||
EgtSetInfo(nCutPerpId, INFO_DEPTH, m_dDepth)
|
||||
EgtSetInfo(nCutPerpId, INFO_SIDE_ANGLE, m_dAngV)
|
||||
|
||||
For IndexList_X As Integer = 0 To m_ListOfCut_X.Count - 1
|
||||
Dim nCut3Id As Integer = GDB_ID.NULL
|
||||
dDimPzX = m_ListOfCut_X(IndexList_X).dInteraxis
|
||||
nNumPzX = m_ListOfCut_X(IndexList_X).nNumber
|
||||
' 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
|
||||
nCut3Id = EgtCopyGlob(nCutPerpId, nLayerId)
|
||||
EgtMove(nCut3Id, vtPerpMove, GDB_RT.GLOB)
|
||||
Next
|
||||
nCutPerpId = nCut3Id
|
||||
Next
|
||||
|
||||
End If
|
||||
Return True
|
||||
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)
|
||||
@@ -668,10 +982,10 @@ Public Class GridCut
|
||||
|
||||
Private Sub NumPzsTxBx_EgtClosed(sender As Object, e As EventArgs) Handles NumPzXTxBx.EgtClosed, NumPzYTxBx.EgtClosed,
|
||||
DimPzXTxBx.EgtClosed, DimPzYTxBx.EgtClosed, SideChBx.Click
|
||||
StringToInt( NumPzXTxBx.Text, m_nNumX)
|
||||
StringToLen( DimPzXTxBx.Text, m_dDimX)
|
||||
StringToInt( NumPzYTxBx.Text, m_nNumY)
|
||||
StringToLen( DimPzYTxBx.Text, m_dDimY)
|
||||
StringToInt(NumPzXTxBx.Text, m_nNumX)
|
||||
StringToLen(DimPzXTxBx.Text, m_dDimX)
|
||||
StringToInt(NumPzYTxBx.Text, m_nNumY)
|
||||
StringToLen(DimPzYTxBx.Text, m_dDimY)
|
||||
m_bHeadSide = SideChBx.IsChecked
|
||||
' Disegno il taglio
|
||||
CreateGridCut()
|
||||
@@ -713,4 +1027,56 @@ Public Class GridCut
|
||||
Return True
|
||||
End Function
|
||||
|
||||
End Class
|
||||
|
||||
Public Class Cut_Axis
|
||||
Private m_MainWindow As MainWindow = DirectCast(Application.Current.MainWindow, MainWindow)
|
||||
|
||||
' Numero di tagli con questo interasse
|
||||
Private m_nNumber As Integer = 0
|
||||
Public Property sNumber As String
|
||||
Get
|
||||
Return m_nNumber.ToString
|
||||
End Get
|
||||
Set(value As String)
|
||||
If IsNumeric(value) Then
|
||||
m_nNumber = CInt(value)
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
Public ReadOnly Property nNumber As Double
|
||||
Get
|
||||
Return m_nNumber
|
||||
End Get
|
||||
End Property
|
||||
|
||||
' Distanza dal taglio precedente
|
||||
Private m_dInteraxis As Double = 0.0
|
||||
Public Property sInteraxis As String
|
||||
Get
|
||||
Return LenToString(m_dInteraxis, 2)
|
||||
End Get
|
||||
Set(value As String)
|
||||
Dim PrevValue As Double = m_dInteraxis
|
||||
If Not StringToLen(value, m_dInteraxis) Then m_dInteraxis = PrevValue
|
||||
End Set
|
||||
End Property
|
||||
Public ReadOnly Property dInteraxis As Double
|
||||
Get
|
||||
Return m_dInteraxis
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'Public ReadOnly Property UpdateSub As Boolean
|
||||
' Get
|
||||
' m_MainWindow.m_DirectCutPageUC.m_ControlsDirectCutUC.m_CustomGrid.Update_Click()
|
||||
' Return True
|
||||
' End Get
|
||||
'End Property
|
||||
|
||||
Sub New(nNumb As Integer, dInter As Double)
|
||||
m_nNumber = nNumb
|
||||
m_dInteraxis = dInter
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
@@ -1,10 +1,10 @@
|
||||
<UserControl x:Class="MachineButtonsUC"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="85.3" d:DesignWidth="853" Loaded="MachineButtons_Loaded">
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="85.3" d:DesignWidth="853" Loaded="MachineButtons_Loaded">
|
||||
|
||||
<!-- Definizione del controllo MachineButton -->
|
||||
<Grid Name="MachineButtonsGrid">
|
||||
@@ -20,52 +20,52 @@
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<ToggleButton Name="MachineButton1" Grid.Column="0" Style="{DynamicResource OmagCut_ModifiedGradientYellowIconToggleButton}">
|
||||
<Image Name="ImageButton1" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
<Image Name="ImageButton1" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||
</ToggleButton>
|
||||
|
||||
<ToggleButton Name="MachineButton2" Grid.Column="1" Style="{DynamicResource OmagCut_ModifiedGradientYellowIconToggleButton}">
|
||||
<Image Name="ImageButton2" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
<ToggleButton Name="MachineButton2" Grid.Column="1" Style="{DynamicResource OmagCut_ModifiedGradientYellowIconToggleButton}">
|
||||
<Image Name="ImageButton2" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||
</ToggleButton>
|
||||
|
||||
<ToggleButton Name="MachineButton3" Grid.Column="2" Style="{DynamicResource OmagCut_ModifiedGradientYellowIconToggleButton}">
|
||||
<Image Name="ImageButton3" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
<ToggleButton Name="MachineButton3" Grid.Column="2" Style="{DynamicResource OmagCut_ModifiedGradientYellowIconToggleButton}">
|
||||
<Image Name="ImageButton3" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||
</ToggleButton>
|
||||
|
||||
<ToggleButton Name="MachineButton4" Grid.Column="3" Style="{DynamicResource OmagCut_ModifiedGradientYellowIconToggleButton}">
|
||||
<Image Name="ImageButton4" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
<ToggleButton Name="MachineButton4" Grid.Column="3" Style="{DynamicResource OmagCut_ModifiedGradientYellowIconToggleButton}">
|
||||
<Image Name="ImageButton4" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||
</ToggleButton>
|
||||
|
||||
<ToggleButton Name="MachineButton5" Grid.Column="4" Style="{DynamicResource OmagCut_ModifiedGradientYellowIconToggleButton}">
|
||||
<Image Name="ImageButton5" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
<ToggleButton Name="MachineButton5" Grid.Column="4" Style="{DynamicResource OmagCut_ModifiedGradientYellowIconToggleButton}">
|
||||
<Image Name="ImageButton5" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||
</ToggleButton>
|
||||
|
||||
<ToggleButton Name="MachineButton6" Grid.Column="5" Style="{DynamicResource OmagCut_ModifiedGradientYellowIconToggleButton}">
|
||||
<Image Name="ImageButton6" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
<ToggleButton Name="MachineButton6" Grid.Column="5" Style="{DynamicResource OmagCut_ModifiedGradientYellowIconToggleButton}">
|
||||
<Image Name="ImageButton6" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||
</ToggleButton>
|
||||
|
||||
<ToggleButton Name="MachineButton7" Grid.Column="6" Style="{DynamicResource OmagCut_ModifiedGradientYellowIconToggleButton}">
|
||||
<Image Name="ImageButton7" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
<ToggleButton Name="MachineButton7" Grid.Column="6" Style="{DynamicResource OmagCut_ModifiedGradientYellowIconToggleButton}">
|
||||
<Image Name="ImageButton7" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||
</ToggleButton>
|
||||
|
||||
<ToggleButton Name="MachineButton8" Grid.Column="7" Style="{DynamicResource OmagCut_ModifiedGradientYellowIconToggleButton}">
|
||||
<Image Name="ImageButton8" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
<ToggleButton Name="MachineButton8" Grid.Column="7" Style="{DynamicResource OmagCut_ModifiedGradientYellowIconToggleButton}">
|
||||
<Image Name="ImageButton8" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||
</ToggleButton>
|
||||
|
||||
<ToggleButton Name="MachineButton9" Grid.Column="8" Style="{DynamicResource OmagCut_ModifiedGradientYellowIconToggleButton}">
|
||||
<Image Name="ImageButton9" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
<ToggleButton Name="MachineButton9" Grid.Column="8" Style="{DynamicResource OmagCut_ModifiedGradientYellowIconToggleButton}">
|
||||
<Image Name="ImageButton9" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||
</ToggleButton>
|
||||
|
||||
<ToggleButton Name="MachineButton10" Grid.Column="9" Style="{DynamicResource OmagCut_ModifiedGradientYellowIconToggleButton}">
|
||||
<Image Name="ImageButton10" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
<ToggleButton Name="MachineButton10" Grid.Column="9" Style="{DynamicResource OmagCut_ModifiedGradientYellowIconToggleButton}">
|
||||
<Image Name="ImageButton10" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||
</ToggleButton>
|
||||
|
||||
<ToggleButton Name="MachineButton11" Grid.Column="10" Style="{DynamicResource OmagCut_ModifiedGradientYellowIconToggleButton}">
|
||||
<Image Name="ImageButton11" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
</ToggleButton>
|
||||
<ToggleButton Name="MachineButton11" Grid.Column="10" Style="{DynamicResource OmagCut_ModifiedGradientYellowIconToggleButton}">
|
||||
<Image Name="ImageButton11" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||
</ToggleButton>
|
||||
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
||||
</UserControl>
|
||||
|
||||
@@ -136,7 +136,7 @@ Public Class MachineButtonsUC
|
||||
ElseIf StateFlagArray(nIndex) = K_ZBJOG Then
|
||||
CurrToggleBtn.Content = "Z - B"
|
||||
ElseIf StateFlagArray(nIndex) = K_REMOTE Then
|
||||
CurrToggleBtn.Content = "Remote"
|
||||
CurrToggleBtn.Content = EgtMsg(90262) 'Remote
|
||||
End If
|
||||
Catch ex As Exception
|
||||
EgtOutLog("Error loading content " & StateFlagArray(nIndex))
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
<UserControl x:Class="ManualAxesMoveUC"
|
||||
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">
|
||||
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 Style="{DynamicResource OmagCut_Page2Border}">
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<ToggleButton x:Name="G0Btn" Grid.Row="0" Height="60" Width="60"
|
||||
Style="{StaticResource OmagCut_BlueIconToggleButton}">
|
||||
Style="{DynamicResource OmagCut_BlueIconToggleButton}">
|
||||
<TextBlock Name="G0TxBl" Text="G0" FontSize="29"/>
|
||||
</ToggleButton>
|
||||
|
||||
@@ -41,52 +41,60 @@
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<TextBlock x:Name="FeedTxBl" Grid.Column="0" Grid.Row="0"
|
||||
Style="{StaticResource OmagCut_SingleUpperCaseCharacterTextBlock}" />
|
||||
Style="{DynamicResource OmagCut_SingleUpperCaseCharacterTextBlock}" />
|
||||
<EgtWPFLib:EgtTextBox Name="FeedTxBx" Grid.Column="1" Margin="6,0,6,0"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
<TextBlock x:Name="SpeedTxBl" Grid.Column="0" Grid.Row="1"
|
||||
Style="{StaticResource OmagCut_SingleUpperCaseCharacterTextBlock}" />
|
||||
Style="{DynamicResource OmagCut_SingleUpperCaseCharacterTextBlock}" />
|
||||
<EgtWPFLib:EgtTextBox Name="SpeedTxBx" Grid.Column="1" Grid.Row="1" Margin="6,0,6,0"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
|
||||
</Grid>
|
||||
|
||||
<Button x:Name="L1Btn" Grid.Row="1" Height="60" Width="60" Style="{DynamicResource OmagCut_RightGrayGradientYellowTextButton}"/>
|
||||
<Button x:Name="L1Btn" Grid.Row="1" Height="60" Width="60"
|
||||
Style="{DynamicResource OmagCut_RightGrayGradientYellowTextButton}"/>
|
||||
<UniformGrid Rows="2" Grid.Column="1" Grid.Row="1">
|
||||
<EgtWPFLib:EgtTextBox Name="L1TxBx" Margin="0,4,6,0"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
<CheckBox Name="L1SawThChBx" Height="20" Width="142" Style="{StaticResource OmagCut_CheckBox_Single}"
|
||||
HorizontalAlignment="Right" Margin="0,0,6,0"/>
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
<CheckBox Name="L1SawThChBx" Height="20" Width="142"
|
||||
Style="{DynamicResource OmagCut_CheckBox_Single}"
|
||||
HorizontalAlignment="Right" Margin="0,0,6,0"/>
|
||||
</UniformGrid>
|
||||
<Button x:Name="L2Btn" Grid.Row="2" Height="60" Width="60" Style="{DynamicResource OmagCut_RightGrayGradientYellowTextButton}"/>
|
||||
<Button x:Name="L2Btn" Grid.Row="2" Height="60" Width="60"
|
||||
Style="{DynamicResource OmagCut_RightGrayGradientYellowTextButton}"/>
|
||||
<UniformGrid Rows="2" Grid.Column="1" Grid.Row="2">
|
||||
<EgtWPFLib:EgtTextBox x:Name="L2TxBx" Margin="0,4,6,0"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
<CheckBox Name="L2SawThChBx" Height="20" Width="142" Style="{StaticResource OmagCut_CheckBox_Single}"
|
||||
HorizontalAlignment="Right" Margin="0,0,6,0"/>
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
<CheckBox Name="L2SawThChBx" Height="20" Width="142"
|
||||
Style="{DynamicResource OmagCut_CheckBox_Single}"
|
||||
HorizontalAlignment="Right" Margin="0,0,6,0"/>
|
||||
</UniformGrid>
|
||||
<Button x:Name="L3Btn" Grid.Row="3" Height="60" Width="60" Style="{DynamicResource OmagCut_RightGrayGradientYellowTextButton}"/>
|
||||
<Button x:Name="L3Btn" Grid.Row="3" Height="60" Width="60"
|
||||
Style="{DynamicResource OmagCut_RightGrayGradientYellowTextButton}"/>
|
||||
<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}"/>
|
||||
Style="{DynamicResource 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" IsLength="False"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
<Button x:Name="R2Btn" Grid.Row="5" Height="60" Width="60" Style="{DynamicResource OmagCut_RightGrayGradientYellowTextButton}"/>
|
||||
Style="{DynamicResource 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" IsLength="False"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
|
||||
<Grid Grid.Row="7" Grid.ColumnSpan="2">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Button Name="BackBtn" Grid.Column="1" Style="{DynamicResource OmagCut_YellowGradientYellowIconButton}">
|
||||
<Image Source="{DynamicResource NumericKeyboardArrowImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
|
||||
<Button Name="BackBtn" Grid.Column="1"
|
||||
Style="{DynamicResource OmagCut_YellowGradientYellowIconButton}">
|
||||
<Image Source="{DynamicResource NumericKeyboardArrowImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
|
||||
|
||||
</Grid>
|
||||
|
||||
|
||||
</Grid>
|
||||
|
||||
</Border>
|
||||
|
||||
@@ -53,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
|
||||
@@ -125,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
|
||||
@@ -216,6 +250,7 @@ Public Class ManualAxesMoveUC
|
||||
Private Sub SiemensMoveAxis(CurrentBtn As Button)
|
||||
' leggo se stato reset
|
||||
If Not m_CN.bResetState Then
|
||||
EgtOutLog("Reset status is 'False', is denied to execute file '\DirectCmd\AxesMove.lua'.")
|
||||
m_MoveClicked = False
|
||||
Return
|
||||
End If
|
||||
|
||||
+136
-136
@@ -1,11 +1,10 @@
|
||||
<UserControl x:Class="MultipleCut"
|
||||
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">
|
||||
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="{DynamicResource OmagCut_LightGray}">-->
|
||||
<Border Style="{DynamicResource OmagCut_DirectCutPageBorder}">
|
||||
@@ -35,164 +34,164 @@
|
||||
<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="Point1Btn" Grid.Column="0"
|
||||
Style="{DynamicResource OmagCut_YellowIconToggleButton}">
|
||||
<Image Source="{DynamicResource Acquisisci-P1Img}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||
</ToggleButton>
|
||||
|
||||
<ToggleButton Name="Point2Btn" Grid.Column="1"
|
||||
Style="{DynamicResource OmagCut_YellowIconToggleButton}">
|
||||
<Image Source="{DynamicResource Acquisisci-P2Img}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
</ToggleButton>
|
||||
<ToggleButton Name="Point2Btn" Grid.Column="1"
|
||||
Style="{DynamicResource OmagCut_YellowIconToggleButton}">
|
||||
<Image Source="{DynamicResource Acquisisci-P2Img}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||
</ToggleButton>
|
||||
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
||||
<ComboBox Name="PointModeCmBx" Grid.Row="1" Grid.ColumnSpan="2" Style="{StaticResource OmagCut_ComboBox}"
|
||||
Margin="6,0,6,0">
|
||||
<ComboBox Name="PointModeCmBx" Grid.Row="1" Grid.ColumnSpan="2" Style="{DynamicResource OmagCut_ComboBox}"
|
||||
Margin="6,0,6,0">
|
||||
<ComboBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding}" Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
<TextBlock Text="{Binding}" Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</DataTemplate>
|
||||
</ComboBox.ItemTemplate>
|
||||
</ComboBox>
|
||||
|
||||
<TextBlock Name="DepthTxBl" Grid.Column="0" Grid.Row="2"
|
||||
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
|
||||
Style="{DynamicResource OmagCut_CurrProjSummeryTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="DepthTxBx" Grid.Column="1" Grid.Row="2" Margin="0,0,6,0"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
|
||||
<TextBlock Name="LenghtTxBl" Grid.Column="0" Grid.Row="3"
|
||||
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
|
||||
Style="{DynamicResource OmagCut_CurrProjSummeryTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="LenghtTxBx" Grid.Column="1" Grid.Row="3" Margin="0,0,6,0"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
|
||||
<TextBlock Name="DirectionTxBl" Grid.Column="0" Grid.Row="4"
|
||||
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
|
||||
Style="{DynamicResource OmagCut_CurrProjSummeryTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="DirectionTxBx" Grid.Column="1" Grid.Row="4" Margin="0,0,6,0" IsLength="False"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
|
||||
<TextBlock Name="SideAngleTxBl" Grid.Column="0" Grid.Row="5"
|
||||
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
|
||||
Style="{DynamicResource OmagCut_CurrProjSummeryTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="SideAngleTxBx" Grid.Column="1" Grid.Row="5" Margin="0,0,6,0" IsLength="False"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
|
||||
<Grid Grid.Row="6" Grid.ColumnSpan="2" Visibility="Visible">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
<ColumnDefinition Width="1"/>
|
||||
<ColumnDefinition Width="1.5*"/>
|
||||
<ColumnDefinition Width="1"/>
|
||||
<ColumnDefinition Width="1.5*"/>
|
||||
<ColumnDefinition Width="0.2*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="2*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
<ColumnDefinition Width="1"/>
|
||||
<ColumnDefinition Width="1.5*"/>
|
||||
<ColumnDefinition Width="1"/>
|
||||
<ColumnDefinition Width="1.5*"/>
|
||||
<ColumnDefinition Width="0.2*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="2*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<Border Grid.Column="1" Grid.Row="0" Grid.RowSpan="10" Background="Black" />
|
||||
<Border Grid.Column="1" Grid.Row="0" Grid.RowSpan="10" Background="Black" />
|
||||
|
||||
<TextBlock Name="NumPzTxBl" Grid.Column="2" Grid.Row="0"
|
||||
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
|
||||
<TextBlock Name="DimPzTxBl" Grid.Column="4" Grid.Row="0"
|
||||
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
|
||||
<TextBlock Name="NumPzTxBl" Grid.Column="2" Grid.Row="0"
|
||||
Style="{DynamicResource OmagCut_CurrProjSummeryTextBlock}"/>
|
||||
<TextBlock Name="DimPzTxBl" Grid.Column="4" Grid.Row="0"
|
||||
Style="{DynamicResource OmagCut_CurrProjSummeryTextBlock}"/>
|
||||
|
||||
<Border Grid.Column="3" Grid.Row="0" Grid.RowSpan="10" Background="Black" />
|
||||
<Border Grid.Column="3" Grid.Row="0" Grid.RowSpan="10" Background="Black" />
|
||||
|
||||
<ScrollViewer VerticalScrollBarVisibility="Visible" Grid.Row="6" Grid.ColumnSpan="6" Visibility="Visible">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
<ColumnDefinition Width="1.5*"/>
|
||||
<ColumnDefinition Width="2"/>
|
||||
<ColumnDefinition Width="1.5*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="35"/>
|
||||
<RowDefinition Height="35"/>
|
||||
<RowDefinition Height="35"/>
|
||||
<RowDefinition Height="35"/>
|
||||
<RowDefinition Height="35"/>
|
||||
<RowDefinition Height="35"/>
|
||||
<RowDefinition Height="35"/>
|
||||
<RowDefinition Height="35"/>
|
||||
<RowDefinition Height="35"/>
|
||||
<RowDefinition Height="35"/>
|
||||
</Grid.RowDefinitions>
|
||||
<ScrollViewer VerticalScrollBarVisibility="Visible" Grid.Row="6" Grid.ColumnSpan="6" Visibility="Visible">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
<ColumnDefinition Width="1.5*"/>
|
||||
<ColumnDefinition Width="2"/>
|
||||
<ColumnDefinition Width="1.5*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="35"/>
|
||||
<RowDefinition Height="35"/>
|
||||
<RowDefinition Height="35"/>
|
||||
<RowDefinition Height="35"/>
|
||||
<RowDefinition Height="35"/>
|
||||
<RowDefinition Height="35"/>
|
||||
<RowDefinition Height="35"/>
|
||||
<RowDefinition Height="35"/>
|
||||
<RowDefinition Height="35"/>
|
||||
<RowDefinition Height="35"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<Border Grid.Column="2" Grid.Row="0" Grid.RowSpan="10" Background="Black" Visibility="Hidden"/>
|
||||
<Border Grid.Column="2" Grid.Row="0" Grid.RowSpan="10" Background="Black" Visibility="Hidden"/>
|
||||
|
||||
<TextBlock Name="Num1TxBl" Grid.Column="0" Grid.Row="0"
|
||||
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}" HorizontalAlignment="Center"/>
|
||||
<TextBlock Name="Num1TxBl" Grid.Column="0" Grid.Row="0"
|
||||
Style="{DynamicResource OmagCut_CurrProjSummeryTextBlock}" HorizontalAlignment="Center"/>
|
||||
<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}"/>
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="DimPz1TxBx" Grid.Column="3" Grid.Row="0" Width="75"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
|
||||
<TextBlock Name="Num2TxBl" Grid.Column="0" Grid.Row="1"
|
||||
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}" HorizontalAlignment="Center"/>
|
||||
<TextBlock Name="Num2TxBl" Grid.Column="0" Grid.Row="1"
|
||||
Style="{DynamicResource OmagCut_CurrProjSummeryTextBlock}" HorizontalAlignment="Center"/>
|
||||
<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}"/>
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="DimPz2TxBx" Grid.Column="3" Grid.Row="1" Width="75"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
|
||||
<TextBlock Name="Num3TxBl" Grid.Column="0" Grid.Row="2"
|
||||
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}" HorizontalAlignment="Center"/>
|
||||
<TextBlock Name="Num3TxBl" Grid.Column="0" Grid.Row="2"
|
||||
Style="{DynamicResource OmagCut_CurrProjSummeryTextBlock}" HorizontalAlignment="Center"/>
|
||||
<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}"/>
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="DimPz3TxBx" Grid.Column="3" Grid.Row="2" Width="75"
|
||||
Style="{DynamicResource 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" IsLength="False"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="DimPz4TxBx" Grid.Column="3" Grid.Row="3" Width="75"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
<TextBlock Name="Num4TxBl" Grid.Column="0" Grid.Row="3"
|
||||
Style="{DynamicResource OmagCut_CurrProjSummeryTextBlock}" HorizontalAlignment="Center"/>
|
||||
<EgtWPFLib:EgtTextBox Name="NumPz4TxBx" Grid.Column="1" Grid.Row="3" Width="75" IsLength="False"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="DimPz4TxBx" Grid.Column="3" Grid.Row="3" Width="75"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
|
||||
<TextBlock Name="Num5TxBl" Grid.Column="0" Grid.Row="4"
|
||||
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}" HorizontalAlignment="Center"/>
|
||||
<TextBlock Name="Num5TxBl" Grid.Column="0" Grid.Row="4"
|
||||
Style="{DynamicResource OmagCut_CurrProjSummeryTextBlock}" HorizontalAlignment="Center"/>
|
||||
<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}"/>
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="DimPz5TxBx" Grid.Column="3" Grid.Row="4" Width="75"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
|
||||
<TextBlock Name="Num6TxBl" Grid.Column="0" Grid.Row="5"
|
||||
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}" HorizontalAlignment="Center"/>
|
||||
<TextBlock Name="Num6TxBl" Grid.Column="0" Grid.Row="5"
|
||||
Style="{DynamicResource OmagCut_CurrProjSummeryTextBlock}" HorizontalAlignment="Center"/>
|
||||
<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}"/>
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="DimPz6TxBx" Grid.Column="3" Grid.Row="5" Width="75"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
|
||||
<TextBlock Name="Num7TxBl" Grid.Column="0" Grid.Row="6"
|
||||
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}" HorizontalAlignment="Center"/>
|
||||
<TextBlock Name="Num7TxBl" Grid.Column="0" Grid.Row="6"
|
||||
Style="{DynamicResource OmagCut_CurrProjSummeryTextBlock}" HorizontalAlignment="Center"/>
|
||||
<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}"/>
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="DimPz7TxBx" Grid.Column="3" Grid.Row="6" Width="75"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
|
||||
<TextBlock Name="Num8TxBl" Grid.Column="0" Grid.Row="7"
|
||||
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}" HorizontalAlignment="Center"/>
|
||||
<TextBlock Name="Num8TxBl" Grid.Column="0" Grid.Row="7"
|
||||
Style="{DynamicResource OmagCut_CurrProjSummeryTextBlock}" HorizontalAlignment="Center"/>
|
||||
<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}"/>
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="DimPz8TxBx" Grid.Column="3" Grid.Row="7" Width="75"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
|
||||
<TextBlock Name="Num9TxBl" Grid.Column="0" Grid.Row="8"
|
||||
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}" HorizontalAlignment="Center"/>
|
||||
<TextBlock Name="Num9TxBl" Grid.Column="0" Grid.Row="8"
|
||||
Style="{DynamicResource OmagCut_CurrProjSummeryTextBlock}" HorizontalAlignment="Center"/>
|
||||
<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}"/>
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="DimPz9TxBx" Grid.Column="3" Grid.Row="8" Width="75"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
|
||||
<TextBlock Name="Num10TxBl" Grid.Column="0" Grid.Row="9"
|
||||
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}" HorizontalAlignment="Center"/>
|
||||
<TextBlock Name="Num10TxBl" Grid.Column="0" Grid.Row="9"
|
||||
Style="{DynamicResource OmagCut_CurrProjSummeryTextBlock}" HorizontalAlignment="Center"/>
|
||||
<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}"/>
|
||||
</Grid>
|
||||
</ScrollViewer>
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="DimPz10TxBx" Grid.Column="3" Grid.Row="9" Width="75"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
</Grid>
|
||||
</ScrollViewer>
|
||||
</Grid>
|
||||
|
||||
<!--<Grid Grid.Row="6" Grid.ColumnSpan="2" Visibility="Visible">
|
||||
@@ -233,9 +232,10 @@
|
||||
</Grid>-->
|
||||
|
||||
<TextBlock Name="SideTxBl" Grid.Row="7" Grid.ColumnSpan="2"
|
||||
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
|
||||
<CheckBox Name="SideChBx" Grid.Row="7" Grid.ColumnSpan="2" Style="{StaticResource OmagCut_CheckBox_Single}"
|
||||
HorizontalAlignment="Right" Margin="0,0,6,0"/>
|
||||
Style="{DynamicResource OmagCut_CurrProjSummeryTextBlock}"/>
|
||||
<CheckBox Name="SideChBx" Grid.Row="7" Grid.ColumnSpan="2"
|
||||
Style="{DynamicResource OmagCut_CheckBox_Single}"
|
||||
HorizontalAlignment="Right" Margin="0,0,6,0"/>
|
||||
|
||||
<Grid Grid.Row="8" Grid.ColumnSpan="2">
|
||||
<Grid.ColumnDefinitions>
|
||||
@@ -245,13 +245,13 @@
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Name="XcoordTxBl" Grid.Column="0" Text="X"
|
||||
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}" HorizontalAlignment="Center"/>
|
||||
Style="{DynamicResource OmagCut_CurrProjSummeryTextBlock}" HorizontalAlignment="Center"/>
|
||||
<EgtWPFLib:EgtTextBox Name="XcoordTxBx" Grid.Column="1" Margin="0,0,6,0"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
<TextBlock Name="YcoordTxBl" Grid.Column="2" Text="Y"
|
||||
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}" HorizontalAlignment="Center"/>
|
||||
Style="{DynamicResource OmagCut_CurrProjSummeryTextBlock}" HorizontalAlignment="Center"/>
|
||||
<EgtWPFLib:EgtTextBox Name="YcoordTxBx" Grid.Column="3" Margin="0,0,6,0"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
</Grid>
|
||||
|
||||
<Grid Grid.Row="9" Grid.ColumnSpan="2">
|
||||
@@ -261,16 +261,16 @@
|
||||
<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="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="OkBtn" Grid.Column="1" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource EseguiImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="ExitBtn" Grid.Column="2" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource XImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
</Grid>
|
||||
|
||||
</Grid>
|
||||
|
||||
|
||||
@@ -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
|
||||
@@ -57,23 +58,23 @@ Public Class MultipleCut
|
||||
|
||||
Private Sub MultipleCut_Initialized(sender As Object, e As EventArgs) Handles Me.Initialized
|
||||
' Creo lista modalità di acquisizione punto
|
||||
m_PointsModeArray(PT_MODE.SAW) = EgtMsg(MSG_DIRECTCUTPAGEUC + 24)
|
||||
m_PointsModeArray(PT_MODE.LASER) = EgtMsg(MSG_DIRECTCUTPAGEUC + 12)
|
||||
m_PointsModeArray(PT_MODE.DRAW) = EgtMsg(MSG_DIRECTCUTPAGEUC + 25)
|
||||
m_PointsModeArray(PT_MODE.SAW) = EgtMsg(90224) ' Lama
|
||||
m_PointsModeArray(PT_MODE.LASER) = EgtMsg(90212) ' Laser
|
||||
m_PointsModeArray(PT_MODE.DRAW) = EgtMsg(90225) ' Disegno
|
||||
' la associo alla combobox
|
||||
PointModeCmBx.ItemsSource = m_PointsModeArray
|
||||
' assegno messaggi
|
||||
Point1Btn.ToolTip = EgtMsg(MSG_DIRECTCUTPAGEUC + 10)
|
||||
Point2Btn.ToolTip = EgtMsg(MSG_DIRECTCUTPAGEUC + 11)
|
||||
DepthTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 13)
|
||||
LenghtTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 14)
|
||||
DirectionTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 15)
|
||||
SideAngleTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 16)
|
||||
NumPzTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 17)
|
||||
DimPzTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 18)
|
||||
SideTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 23)
|
||||
SimulBtn.ToolTip = EgtMsg(MSG_CADCUTPAGEUC + 1)
|
||||
OkBtn.ToolTip = EgtMsg(MSG_DIRECTCUTPAGEUC + 30)
|
||||
Point1Btn.ToolTip = EgtMsg(90210) ' Acquisisci P1
|
||||
Point2Btn.ToolTip = EgtMsg(90211) ' Acquisisci P2
|
||||
DepthTxBl.Text = EgtMsg(90213) ' Affondamento
|
||||
LenghtTxBl.Text = EgtMsg(90214) ' Lunghezza
|
||||
DirectionTxBl.Text = EgtMsg(90215) ' Direzione
|
||||
SideAngleTxBl.Text = EgtMsg(90216) ' Inclinazione
|
||||
NumPzTxBl.Text = EgtMsg(90217) ' Numero
|
||||
DimPzTxBl.Text = EgtMsg(90218) ' Dimensioni
|
||||
SideTxBl.Text = EgtMsg(90223) ' Tagli lato motore
|
||||
SimulBtn.ToolTip = EgtMsg(90301) ' Simula
|
||||
OkBtn.ToolTip = EgtMsg(90230) ' Esegui
|
||||
Num1TxBl.Text = "1"
|
||||
Num2TxBl.Text = "2"
|
||||
Num3TxBl.Text = "3"
|
||||
@@ -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()
|
||||
@@ -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
|
||||
@@ -569,13 +606,15 @@ 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
|
||||
@@ -606,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)
|
||||
@@ -698,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)
|
||||
|
||||
+18
-20
@@ -1,11 +1,10 @@
|
||||
<UserControl x:Class="Polishing"
|
||||
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">
|
||||
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="{DynamicResource OmagCut_LightGray}">-->
|
||||
<Border Style="{DynamicResource OmagCut_DirectCutPageBorder}">
|
||||
@@ -36,13 +35,12 @@
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
</Grid>
|
||||
|
||||
<ComboBox Name="PolishingCmBx" Grid.Row="1" Grid.ColumnSpan="2" Style="{StaticResource OmagCut_ComboBox}" Margin="6,0,6,0">
|
||||
<ComboBox Name="PolishingCmBx" Grid.Row="1" Grid.ColumnSpan="2" Style="{DynamicResource OmagCut_ComboBox}" Margin="6,0,6,0">
|
||||
<ComboBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding}" Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
<TextBlock Text="{Binding}" Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</DataTemplate>
|
||||
</ComboBox.ItemTemplate>
|
||||
</ComboBox>
|
||||
@@ -63,16 +61,16 @@
|
||||
<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="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="OkBtn" Grid.Column="1" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource EseguiImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="ExitBtn" Grid.Column="2" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource XImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
</Grid>
|
||||
|
||||
</Grid>
|
||||
|
||||
|
||||
@@ -25,8 +25,8 @@ Public Class Polishing
|
||||
|
||||
Private Sub Polishing_Initialized(sender As Object, e As EventArgs) Handles Me.Initialized
|
||||
' assegno messaggi
|
||||
SimulBtn.ToolTip = EgtMsg(MSG_CADCUTPAGEUC + 1)
|
||||
OkBtn.ToolTip = EgtMsg(MSG_DIRECTCUTPAGEUC + 30)
|
||||
SimulBtn.ToolTip = EgtMsg(90301) ' Simula
|
||||
OkBtn.ToolTip = EgtMsg(90230) ' Esegui
|
||||
End Sub
|
||||
|
||||
Private Sub Polishing_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded
|
||||
@@ -180,13 +180,15 @@ 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
|
||||
|
||||
+39
-40
@@ -1,12 +1,11 @@
|
||||
<UserControl x:Class="SawTestUC"
|
||||
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">
|
||||
|
||||
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="{DynamicResource OmagCut_LightGray}">-->
|
||||
<Border Style="{DynamicResource OmagCut_DirectCutPageBorder}">
|
||||
|
||||
@@ -37,46 +36,46 @@
|
||||
<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="Point1Btn" Grid.Column="0"
|
||||
Style="{DynamicResource OmagCut_YellowIconToggleButton}">
|
||||
<Image Source="{DynamicResource Acquisisci-P1Img}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||
</ToggleButton>
|
||||
|
||||
<ToggleButton Name="Point2Btn" Grid.Column="1"
|
||||
Style="{DynamicResource OmagCut_YellowIconToggleButton}">
|
||||
<Image Source="{DynamicResource Acquisisci-P2Img}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
</ToggleButton>
|
||||
<ToggleButton Name="Point2Btn" Grid.Column="1"
|
||||
Style="{DynamicResource OmagCut_YellowIconToggleButton}">
|
||||
<Image Source="{DynamicResource Acquisisci-P2Img}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||
</ToggleButton>
|
||||
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
||||
<ComboBox Name="PointModeCmBx" Grid.Row="1" Grid.ColumnSpan="2" Style="{StaticResource OmagCut_ComboBox}"
|
||||
Margin="6,0,6,0">
|
||||
<ComboBox Name="PointModeCmBx" Grid.Row="1" Grid.ColumnSpan="2" Style="{DynamicResource OmagCut_ComboBox}"
|
||||
Margin="6,0,6,0">
|
||||
<ComboBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding}" Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
<TextBlock Text="{Binding}" Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</DataTemplate>
|
||||
</ComboBox.ItemTemplate>
|
||||
</ComboBox>
|
||||
|
||||
<TextBlock Name="DepthTxBl" Grid.Column="0" Grid.Row="2"
|
||||
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
|
||||
Style="{DynamicResource OmagCut_CurrProjSummeryTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="DepthTxBx" Grid.Column="1" Grid.Row="2" Margin="0,0,6,0"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
|
||||
<TextBlock Name="LenghtTxBl" Grid.Column="0" Grid.Row="3"
|
||||
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
|
||||
Style="{DynamicResource OmagCut_CurrProjSummeryTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="LenghtTxBx" Grid.Column="1" Grid.Row="3" Margin="0,0,6,0"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
|
||||
<TextBlock Name="DirectionTxBl" Grid.Column="0" Grid.Row="4"
|
||||
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
|
||||
Style="{DynamicResource OmagCut_CurrProjSummeryTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="DirectionTxBx" Grid.Column="1" Grid.Row="4" Margin="0,0,6,0" IsLength="False"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
|
||||
<TextBlock Name="OffsetTxBl" Grid.Column="0" Grid.Row="5"
|
||||
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
|
||||
Style="{DynamicResource OmagCut_CurrProjSummeryTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="OffsetTxBx" Grid.Column="1" Grid.Row="5" Margin="0,0,6,0"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
|
||||
<Grid Grid.Row="11" Grid.ColumnSpan="2">
|
||||
<Grid.ColumnDefinitions>
|
||||
@@ -85,17 +84,17 @@
|
||||
<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="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="OkBtn" Grid.Column="1" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource EseguiImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="ExitBtn" Grid.Column="2" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource XImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
</Grid>
|
||||
|
||||
</Grid>
|
||||
|
||||
</Border>
|
||||
|
||||
@@ -53,20 +53,20 @@ Public Class SawTestUC
|
||||
|
||||
Private Sub SawTest_Initialized(sender As Object, e As EventArgs) Handles Me.Initialized
|
||||
' Creo lista modalità di acquisizione punto
|
||||
m_PointsModeArray(PT_MODE.SAW) = EgtMsg(MSG_DIRECTCUTPAGEUC + 24)
|
||||
m_PointsModeArray(PT_MODE.LASER) = EgtMsg(MSG_DIRECTCUTPAGEUC + 12)
|
||||
m_PointsModeArray(PT_MODE.DRAW) = EgtMsg(MSG_DIRECTCUTPAGEUC + 25)
|
||||
m_PointsModeArray(PT_MODE.SAW) = EgtMsg(90224) ' Lama
|
||||
m_PointsModeArray(PT_MODE.LASER) = EgtMsg(90212) ' Laser
|
||||
m_PointsModeArray(PT_MODE.DRAW) = EgtMsg(90225) ' Disegno
|
||||
' la associo alla combobox
|
||||
PointModeCmBx.ItemsSource = m_PointsModeArray
|
||||
' assegno messaggi
|
||||
Point1Btn.ToolTip = EgtMsg(MSG_DIRECTCUTPAGEUC + 10)
|
||||
Point2Btn.ToolTip = EgtMsg(MSG_DIRECTCUTPAGEUC + 11)
|
||||
DepthTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 13)
|
||||
LenghtTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 14)
|
||||
DirectionTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 15)
|
||||
OffsetTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 28)
|
||||
SimulBtn.ToolTip = EgtMsg(MSG_CADCUTPAGEUC + 1)
|
||||
OkBtn.ToolTip = EgtMsg(MSG_DIRECTCUTPAGEUC + 30)
|
||||
Point1Btn.ToolTip = EgtMsg(90210) ' Acquisci P1
|
||||
Point2Btn.ToolTip = EgtMsg(90211) ' Acquisici P2
|
||||
DepthTxBl.Text = EgtMsg(90213) ' Affondamento
|
||||
LenghtTxBl.Text = EgtMsg(90214) ' Lunghezza
|
||||
DirectionTxBl.Text = EgtMsg(90215) ' Direzione
|
||||
OffsetTxBl.Text = EgtMsg(90228) ' Offset
|
||||
SimulBtn.ToolTip = EgtMsg(90301) ' Simula
|
||||
OkBtn.ToolTip = EgtMsg(90230) ' Esegui
|
||||
' Carico i dati dell'ultimo test
|
||||
m_dDepth = GetPrivateProfileDouble( S_DIRECTCUTS, K_DC_TEST_DEPTH, m_dDepth, m_MainWindow.GetIniFile())
|
||||
m_dLen = GetPrivateProfileDouble( S_DIRECTCUTS, K_DC_TEST_LENGTH, m_dLen, m_MainWindow.GetIniFile())
|
||||
@@ -210,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
|
||||
@@ -228,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
|
||||
@@ -280,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
|
||||
@@ -298,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
|
||||
@@ -450,13 +476,15 @@ 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
|
||||
@@ -502,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
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
Imports EgtUILib
|
||||
|
||||
Public Class SingleCutAuto
|
||||
' Riferimenti a pagine
|
||||
Private m_MainWindow As MainWindow = DirectCast(Application.Current.MainWindow, MainWindow)
|
||||
@@ -86,19 +87,19 @@ Public Class SingleCutAuto
|
||||
|
||||
Private Sub SingleCut_Initialized(sender As Object, e As EventArgs) Handles Me.Initialized
|
||||
' Creo lista modalità di acquisizione punto
|
||||
m_PointsModeArray(PT_MODE.SAW) = EgtMsg(MSG_DIRECTCUTPAGEUC + 24)
|
||||
m_PointsModeArray(PT_MODE.LASER) = EgtMsg(MSG_DIRECTCUTPAGEUC + 12)
|
||||
m_PointsModeArray(PT_MODE.DRAW) = EgtMsg(MSG_DIRECTCUTPAGEUC + 25)
|
||||
m_PointsModeArray(PT_MODE.SAW) = EgtMsg(90224) ' Lama
|
||||
m_PointsModeArray(PT_MODE.LASER) = EgtMsg(90212) ' Laser
|
||||
m_PointsModeArray(PT_MODE.DRAW) = EgtMsg(90225) ' Disegno
|
||||
' la associo alla combobox
|
||||
PointModeCmBx.ItemsSource = m_PointsModeArray
|
||||
' Assegno messaggi
|
||||
Point1Btn.Content = EgtMsg(MSG_DIRECTCUTPAGEUC + 10)
|
||||
Point2Btn.Content = EgtMsg(MSG_DIRECTCUTPAGEUC + 11)
|
||||
DiamLamaTxBl.Text = "Diamtero lama"
|
||||
ThickLamaTxBl.Text = "Spessore lama"
|
||||
ThickMatTxBl.Text = "Spessore materiale"
|
||||
SimulBtn.Content = EgtMsg(MSG_CADCUTPAGEUC + 1)
|
||||
OkBtn.Content = EgtMsg(MSG_DIRECTCUTPAGEUC + 30)
|
||||
Point1Btn.Content = EgtMsg(90210) ' Acquisci P1
|
||||
Point2Btn.Content = EgtMsg(90211) ' Acquisci P2
|
||||
DiamLamaTxBl.Text = EgtMsg(90266) ' Diamtero lama
|
||||
ThickLamaTxBl.Text = EgtMsg(90267) ' Spessore lama
|
||||
ThickMatTxBl.Text = EgtMsg(90268) ' Spessore materiale
|
||||
SimulBtn.Content = EgtMsg(90301) ' Simula
|
||||
OkBtn.Content = EgtMsg(90230) ' Esegui
|
||||
|
||||
m_RawHeight = GetPrivateProfileDouble(S_RAWPART, K_RAWHEIGHT, 30, m_MainWindow.GetIniFile())
|
||||
ThickMatTxBx.Text = LenToString(m_RawHeight, 2)
|
||||
@@ -345,7 +346,7 @@ Public Class SingleCutAuto
|
||||
m_CurrProjPage.ClearMessage()
|
||||
Else
|
||||
OkBtn.IsEnabled = False
|
||||
m_CurrProjPage.SetErrorMessage(EgtMsg(MSG_RAWPARTPAGEUC + 47)) ' Errore nella posizione o dimensione del grezzo
|
||||
m_CurrProjPage.SetErrorMessage(EgtMsg(90547)) ' Errore nella posizione o dimensione del grezzo
|
||||
End If
|
||||
Return True
|
||||
End Function
|
||||
@@ -741,7 +742,7 @@ Public Class SingleCutAuto
|
||||
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
|
||||
m_CurrProjPage.SetErrorMessage(EgtMsg(90314)) ' Errore nella generazione del programma CN
|
||||
Return
|
||||
End If
|
||||
' Download programma (eventuali errori sono segnalati dalla funzione)
|
||||
|
||||
+40
-38
@@ -1,14 +1,14 @@
|
||||
<UserControl x:Class="SingleCutUC"
|
||||
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">
|
||||
|
||||
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="{DynamicResource OmagCut_LightGray}">-->
|
||||
<Border Style="{DynamicResource OmagCut_DirectCutPageBorder}">
|
||||
<Border Style="{DynamicResource OmagCut_DirectCutPageBorder}">
|
||||
|
||||
<!-- Definizione della Grid SingleCut -->
|
||||
<Grid Name="SingleCutGrid" >
|
||||
@@ -38,54 +38,56 @@
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<ToggleButton Name="Point1Btn" Grid.Column="0"
|
||||
Style="{DynamicResource OmagCut_YellowIconToggleButton}">
|
||||
<Image Source="{DynamicResource Acquisisci-P1Img}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
Style="{DynamicResource OmagCut_YellowIconToggleButton}">
|
||||
<Image Source="{DynamicResource Acquisisci-P1Img}"
|
||||
Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||
</ToggleButton>
|
||||
|
||||
<ToggleButton Name="Point2Btn" Grid.Column="1"
|
||||
Style="{DynamicResource OmagCut_YellowIconToggleButton}">
|
||||
<Image Source="{DynamicResource Acquisisci-P2Img}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
<Image Source="{DynamicResource Acquisisci-P2Img}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||
</ToggleButton>
|
||||
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
||||
<ComboBox Name="PointModeCmBx" Grid.Row="1" Grid.ColumnSpan="2" Style="{StaticResource OmagCut_ComboBox}" Margin="6,0,6,0">
|
||||
<ComboBox Name="PointModeCmBx" Grid.Row="1" Grid.ColumnSpan="2" Style="{DynamicResource OmagCut_ComboBox}" Margin="6,0,6,0">
|
||||
<ComboBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding}" Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
<TextBlock Text="{Binding}" Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</DataTemplate>
|
||||
</ComboBox.ItemTemplate>
|
||||
</ComboBox>
|
||||
|
||||
<TextBlock Name="DepthTxBl" Grid.Column="0" Grid.Row="2"
|
||||
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
|
||||
Style="{DynamicResource OmagCut_CurrProjSummeryTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="DepthTxBx" Grid.Column="1" Grid.Row="2" Margin="0,0,6,0"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
|
||||
<TextBlock Name="LenghtTxBl" Grid.Column="0" Grid.Row="3"
|
||||
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
|
||||
Style="{DynamicResource OmagCut_CurrProjSummeryTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="LenghtTxBx" Grid.Column="1" Grid.Row="3" Margin="0,0,6,0"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
|
||||
<TextBlock Name="DirectionTxBl" Grid.Column="0" Grid.Row="4"
|
||||
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
|
||||
Style="{DynamicResource OmagCut_CurrProjSummeryTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="DirectionTxBx" Grid.Column="1" Grid.Row="4" Margin="0,0,6,0" IsLength="False"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
|
||||
<TextBlock Name="SideAngleTxBl" Grid.Column="0" Grid.Row="5"
|
||||
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
|
||||
Style="{DynamicResource OmagCut_CurrProjSummeryTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="SideAngleTxBx" Grid.Column="1" Grid.Row="5" Margin="0,0,6,0" IsLength="False"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
|
||||
<TextBlock Name="OffsetTxBl" Grid.Column="0" Grid.Row="6"
|
||||
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
|
||||
Style="{DynamicResource OmagCut_CurrProjSummeryTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="OffsetTxBx" Grid.Column="1" Grid.Row="6" Margin="0,0,6,0"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
|
||||
<TextBlock Name="SawThChBl" Grid.Row="7" Grid.ColumnSpan="2"
|
||||
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
|
||||
<CheckBox Name="SawThChBx" Grid.Row="7" Grid.ColumnSpan="2" Style="{StaticResource OmagCut_CheckBox_Single}"
|
||||
HorizontalAlignment="Right" Margin="0,0,6,0"/>
|
||||
Style="{DynamicResource OmagCut_CurrProjSummeryTextBlock}"/>
|
||||
<CheckBox Name="SawThChBx" Grid.Row="7" Grid.ColumnSpan="2"
|
||||
Style="{DynamicResource OmagCut_CheckBox_Single}"
|
||||
HorizontalAlignment="Right" Margin="0,0,6,0"/>
|
||||
|
||||
<Grid Grid.Row="9" Grid.ColumnSpan="2">
|
||||
<Grid.ColumnDefinitions>
|
||||
@@ -95,13 +97,13 @@
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Name="XcoordTxBl" Grid.Column="0" Text="X"
|
||||
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}" HorizontalAlignment="Center"/>
|
||||
Style="{DynamicResource OmagCut_CurrProjSummeryTextBlock}" HorizontalAlignment="Center"/>
|
||||
<EgtWPFLib:EgtTextBox Name="XcoordTxBx" Grid.Column="1" Margin="0,0,6,0"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
<TextBlock Name="YcoordTxBl" Grid.Column="2" Text="Y"
|
||||
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}" HorizontalAlignment="Center"/>
|
||||
Style="{DynamicResource OmagCut_CurrProjSummeryTextBlock}" HorizontalAlignment="Center"/>
|
||||
<EgtWPFLib:EgtTextBox Name="YcoordTxBx" Grid.Column="3" Margin="0,0,6,0"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
</Grid>
|
||||
|
||||
<Grid Grid.Row="11" Grid.ColumnSpan="2">
|
||||
@@ -112,13 +114,13 @@
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Button Name="SimulBtn" Grid.Column="0" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource SimulaImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
<Image Source="{DynamicResource SimulaImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="OkBtn" Grid.Column="1" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource EseguiImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
<Image Source="{DynamicResource EseguiImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="ExitBtn" Grid.Column="2" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource XImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
<Image Source="{DynamicResource XImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
</Grid>
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
Imports System.Windows.Threading
|
||||
Imports EgtUILib
|
||||
Imports OmagCUT.MainWindow
|
||||
|
||||
Public Class SingleCutUC
|
||||
|
||||
@@ -56,22 +57,22 @@ Public Class SingleCutUC
|
||||
|
||||
Private Sub SingleCut_Initialized(sender As Object, e As EventArgs) Handles Me.Initialized
|
||||
' Creo lista modalità di acquisizione punto
|
||||
m_PointsModeArray(PT_MODE.SAW) = EgtMsg(MSG_DIRECTCUTPAGEUC + 24)
|
||||
m_PointsModeArray(PT_MODE.LASER) = EgtMsg(MSG_DIRECTCUTPAGEUC + 12)
|
||||
m_PointsModeArray(PT_MODE.DRAW) = EgtMsg(MSG_DIRECTCUTPAGEUC + 25)
|
||||
m_PointsModeArray(PT_MODE.SAW) = EgtMsg(90224) ' Lama
|
||||
m_PointsModeArray(PT_MODE.LASER) = EgtMsg(90212) ' Laser
|
||||
m_PointsModeArray(PT_MODE.DRAW) = EgtMsg(90225) ' Disegno
|
||||
' la associo alla combobox
|
||||
PointModeCmBx.ItemsSource = m_PointsModeArray
|
||||
' Assegno messaggi
|
||||
Point1Btn.ToolTip = EgtMsg(MSG_DIRECTCUTPAGEUC + 10)
|
||||
Point2Btn.ToolTip = EgtMsg(MSG_DIRECTCUTPAGEUC + 11)
|
||||
DepthTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 13)
|
||||
LenghtTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 14)
|
||||
DirectionTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 15)
|
||||
SideAngleTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 16)
|
||||
OffsetTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 28)
|
||||
SawThChBl.Text = EgtMsg(90232) ' Spessore lama
|
||||
SimulBtn.ToolTip = EgtMsg(MSG_CADCUTPAGEUC + 1)
|
||||
OkBtn.ToolTip = EgtMsg(MSG_DIRECTCUTPAGEUC + 30)
|
||||
Point1Btn.ToolTip = EgtMsg(90210) ' Acquisci P1
|
||||
Point2Btn.ToolTip = EgtMsg(90211) ' Acquisci P2
|
||||
DepthTxBl.Text = EgtMsg(90213) ' Affondamento
|
||||
LenghtTxBl.Text = EgtMsg(90214) ' Lunghezza
|
||||
DirectionTxBl.Text = EgtMsg(90215) ' Direzione
|
||||
SideAngleTxBl.Text = EgtMsg(90216) ' Inclinazione
|
||||
OffsetTxBl.Text = EgtMsg(90228) ' Offset
|
||||
SawThChBl.Text = EgtMsg(90232) ' Spessore lama
|
||||
SimulBtn.ToolTip = EgtMsg(90301) ' Simula
|
||||
OkBtn.ToolTip = EgtMsg(90230) ' Esegui
|
||||
' 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())
|
||||
@@ -147,6 +148,8 @@ Public Class SingleCutUC
|
||||
' Deseleziono bottone primo punto
|
||||
Point1Btn.IsChecked = False
|
||||
|
||||
' forzo la verifica dell'affondamento in relazione allo spessore del pezzo
|
||||
DepthTxBx_EgtClosed(Nothing, Nothing)
|
||||
' la visualizzazione dei comandi è gestita dalla DirectCutPageUC richiamando la funzione ReloadParam
|
||||
|
||||
' forzo la macchina ad essere visibile fin da subito
|
||||
@@ -159,7 +162,7 @@ Public Class SingleCutUC
|
||||
' Aggiorno visualizzazione
|
||||
EgtDraw()
|
||||
|
||||
' Avvi il timer
|
||||
' Avvio il timer
|
||||
m_RefreshTimer.Start()
|
||||
End Sub
|
||||
|
||||
@@ -268,6 +271,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 = ""
|
||||
@@ -279,6 +288,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
|
||||
@@ -286,7 +302,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
|
||||
@@ -294,10 +311,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
|
||||
@@ -318,7 +336,6 @@ Public Class SingleCutUC
|
||||
m_bPointP1Ok = True
|
||||
' Reimposto eventuale precedente utensile
|
||||
EgtSetCalcTool(sTool, sHead, nExit)
|
||||
|
||||
End If
|
||||
|
||||
' Disegno il taglio
|
||||
@@ -348,6 +365,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 = ""
|
||||
@@ -359,6 +382,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
|
||||
@@ -366,20 +396,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
|
||||
@@ -412,6 +442,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()
|
||||
@@ -584,13 +615,15 @@ 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
|
||||
@@ -602,6 +635,7 @@ Public Class SingleCutUC
|
||||
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
|
||||
@@ -641,6 +675,8 @@ Public Class SingleCutUC
|
||||
' Imposto affondamento e angolo di fianco sul taglio
|
||||
EgtSetInfo(nCutId, INFO_DEPTH, m_dDepth)
|
||||
EgtSetInfo(nCutId, INFO_SIDE_ANGLE, m_dAngV)
|
||||
' Inidico che è un taglio Diretto di tipo SingleCut
|
||||
EgtSetInfo(nCutId, INFO_DIRECTCUT, FlagDirectCuts.SingleCut)
|
||||
' Imposto se disabilitare l'inversine di direzione del taglio
|
||||
If Not m_MainWindow.m_CurrentMachine.bEnableInvert Then EgtSetInfo(nCutId, INFO_ENABLE_INVERT, 0)
|
||||
' Creo layer per crocetta di riferimento
|
||||
|
||||
@@ -1,97 +1,96 @@
|
||||
<UserControl x:Class="SingleDrillUC"
|
||||
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">
|
||||
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="{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 SingleCut -->
|
||||
<Grid Name="SingleCutGrid" >
|
||||
<!-- Definizione della Grid SingleCut -->
|
||||
<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="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="2*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<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="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-PImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
</ToggleButton>
|
||||
<ToggleButton Name="Point1Btn" Grid.Column="0"
|
||||
Style="{DynamicResource OmagCut_YellowIconToggleButton}">
|
||||
<Image Source="{DynamicResource Acquisisci-PImg}" Style="{DynamicResource 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>
|
||||
<ComboBox Name="PointModeCmBx" Grid.Row="1" Grid.ColumnSpan="2" Style="{DynamicResource OmagCut_ComboBox}" Margin="6,0,6,0">
|
||||
<ComboBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding}" Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</DataTemplate>
|
||||
</ComboBox.ItemTemplate>
|
||||
</ComboBox>
|
||||
|
||||
|
||||
|
||||
<Grid Grid.Row="9" 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>
|
||||
<Grid Grid.Row="9" 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="{DynamicResource OmagCut_CurrProjSummeryTextBlock}" HorizontalAlignment="Center"/>
|
||||
<EgtWPFLib:EgtTextBox Name="XcoordTxBx" Grid.Column="1" Margin="0,0,6,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
<TextBlock Name="YcoordTxBl" Grid.Column="2" Text="Y"
|
||||
Style="{DynamicResource OmagCut_CurrProjSummeryTextBlock}" HorizontalAlignment="Center"/>
|
||||
<EgtWPFLib:EgtTextBox Name="YcoordTxBx" Grid.Column="3" Margin="0,0,6,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
</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 Grid.Row="11" Grid.ColumnSpan="2">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
</Grid>
|
||||
<Button Name="SimulBtn" Grid.Column="0" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource SimulaImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="OkBtn" Grid.Column="1" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource EseguiImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="ExitBtn" Grid.Column="2" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource XImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
</Grid>
|
||||
|
||||
</Border>
|
||||
</Grid>
|
||||
|
||||
</Border>
|
||||
|
||||
</UserControl>
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
Imports EgtUILib
|
||||
Imports System.Collections.ObjectModel
|
||||
Imports OmagCUT.MainWindow
|
||||
|
||||
Public Class SingleDrillUC
|
||||
' Riferimenti a pagine
|
||||
Private m_MainWindow As MainWindow = DirectCast(Application.Current.MainWindow, MainWindow)
|
||||
@@ -57,22 +58,25 @@ Public Class SingleDrillUC
|
||||
m_CurrentMachine = m_MainWindow.m_CurrentMachine
|
||||
|
||||
' Creo lista modalità di acquisizione punto
|
||||
m_PointsModeArray(PT_MODE.DRILL) = EgtMsg(90752)
|
||||
m_PointsModeArray(PT_MODE.LASER) = EgtMsg(MSG_DIRECTCUTPAGEUC + 12)
|
||||
m_PointsModeArray(PT_MODE.DRAW) = EgtMsg(MSG_DIRECTCUTPAGEUC + 25)
|
||||
m_PointsModeArray(PT_MODE.DRILL) = EgtMsg(90752) ' Foretto
|
||||
m_PointsModeArray(PT_MODE.LASER) = EgtMsg(90212) ' Laser
|
||||
m_PointsModeArray(PT_MODE.DRAW) = EgtMsg(90225) ' Disegno
|
||||
' la associo alla combobox
|
||||
PointModeCmBx.ItemsSource = m_PointsModeArray
|
||||
|
||||
' Assegno messaggi
|
||||
Point1Btn.ToolTip = EgtMsg(MSG_DIRECTCUTPAGEUC + 10)
|
||||
SimulBtn.ToolTip = EgtMsg(MSG_CADCUTPAGEUC + 1)
|
||||
OkBtn.ToolTip = EgtMsg(MSG_DIRECTCUTPAGEUC + 30)
|
||||
Point1Btn.ToolTip = EgtMsg(90210) ' Acquisici P1
|
||||
SimulBtn.ToolTip = EgtMsg(90301) ' Simula
|
||||
OkBtn.ToolTip = EgtMsg(90230) ' Esegui
|
||||
End Sub
|
||||
|
||||
Private Sub SingleDrill_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded
|
||||
m_sCurrDrill = m_CurrentMachine.sCurrDrill
|
||||
GetDrillFromDrilling(m_sCurrDrill, m_CurrentMachine.sCurrDrilling)
|
||||
|
||||
' 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)
|
||||
@@ -213,21 +217,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 +251,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 +266,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
|
||||
@@ -371,8 +385,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)
|
||||
@@ -423,7 +439,8 @@ Public Class SingleDrillUC
|
||||
End If
|
||||
|
||||
Dim nCutId = EgtCreateCircle(nLayerId, ptStart, m_dDiameter / 2)
|
||||
|
||||
' Inidico che è un taglio Diretto di tipo SingleDrill
|
||||
EgtSetInfo(nCutId, INFO_DIRECTCUT, FlagDirectCuts.SingleDrill)
|
||||
' Calcolo punto di inserimento nel grezzo
|
||||
Dim ptMin, ptMax As Point3d
|
||||
EgtGetBBoxGlob(nPartId, GDB_BB.STANDARD, ptMin, ptMax)
|
||||
@@ -431,9 +448,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()
|
||||
|
||||
+17
-18
@@ -1,11 +1,10 @@
|
||||
<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">
|
||||
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}">
|
||||
@@ -60,14 +59,14 @@
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>-->
|
||||
|
||||
<TextBlock Name="OffsetTxBl" Grid.Column="0" Grid.Row="3"
|
||||
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
|
||||
Style="{DynamicResource OmagCut_CurrProjSummeryTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="OffsetTxBx" Grid.Column="1" Grid.Row="3" Margin="0,0,6,0"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
|
||||
<TextBlock Name="ExtraLenTxBl" Grid.Column="0" Grid.Row="4"
|
||||
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
|
||||
Style="{DynamicResource OmagCut_CurrProjSummeryTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="ExtraLenTxBx" Grid.Column="1" Grid.Row="4" Margin="0,0,6,0"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
|
||||
<!--<TextBlock Name="DirectionTxBl" Grid.Column="0" Grid.Row="3"
|
||||
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
|
||||
@@ -129,13 +128,13 @@
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Name="XcoordTxBl" Grid.Column="0" Text="X"
|
||||
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}" HorizontalAlignment="Center"/>
|
||||
Style="{DynamicResource OmagCut_CurrProjSummeryTextBlock}" HorizontalAlignment="Center"/>
|
||||
<EgtWPFLib:EgtTextBox Name="XcoordTxBx" Grid.Column="1" Margin="0,0,6,0"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
<TextBlock Name="YcoordTxBl" Grid.Column="2" Text="Y"
|
||||
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}" HorizontalAlignment="Center"/>
|
||||
Style="{DynamicResource OmagCut_CurrProjSummeryTextBlock}" HorizontalAlignment="Center"/>
|
||||
<EgtWPFLib:EgtTextBox Name="YcoordTxBx" Grid.Column="3" Margin="0,0,6,0"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
</Grid>
|
||||
|
||||
<Grid Grid.Row="11" Grid.ColumnSpan="2">
|
||||
@@ -146,13 +145,13 @@
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Button Name="SimulBtn" Grid.Column="0" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource SimulaImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
<Image Source="{DynamicResource SimulaImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="OkBtn" Grid.Column="1" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource EseguiImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
<Image Source="{DynamicResource EseguiImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="ExitBtn" Grid.Column="2" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource XImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
<Image Source="{DynamicResource XImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
</Grid>
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
Imports EgtUILib
|
||||
Imports OmagCUT.MainWindow
|
||||
|
||||
Public Class SquaringUC
|
||||
|
||||
@@ -51,11 +52,10 @@ Public Class SquaringUC
|
||||
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)
|
||||
OffsetTxBl.Text = EgtMsg(90228) ' Offset
|
||||
ExtraLenTxBl.Text = EgtMsg(90260) ' Extra length
|
||||
SimulBtn.ToolTip = EgtMsg(90301) ' Simula
|
||||
OkBtn.ToolTip = EgtMsg(90230) ' Esegui
|
||||
|
||||
' Carico i dati dell'ultimo taglio
|
||||
m_dOffsetSquaring = GetPrivateProfileDouble(S_DIRECTCUTS, K_DC_OFFSET_SQUARING, m_dOffsetSquaring, m_MainWindow.GetIniFile())
|
||||
@@ -287,8 +287,10 @@ Public Class SquaringUC
|
||||
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)
|
||||
@@ -348,6 +350,7 @@ Public Class SquaringUC
|
||||
EgtTdbGetCurrToolParam(MCH_TP.TYPE, nType)
|
||||
Dim dThick As Double = 0
|
||||
EgtTdbGetCurrToolParam(If(nType = MCH_TY.SAW_STD, MCH_TP.THICK, MCH_TP.DIAM), dThick)
|
||||
EgtOutLog("Curr tool type in use for squaring: " & If(nType = MCH_TY.SAW_STD, "SAW_STD", "NOT 'SAW_STD'"))
|
||||
' Ricalcolo lo spessore in base all'inclinazione
|
||||
dThick = dThick / Math.Cos(m_dAngV * Math.PI / 180)
|
||||
' Imposto angolo di rotazione a seconda del lato dei tagli paralleli
|
||||
@@ -365,9 +368,14 @@ Public Class SquaringUC
|
||||
If dDimPzY <> 0 And nNumPzY > 0 And dDimPzX <> 0 And nNumPzX > 0 Then
|
||||
Dim dLenX As Double = dThick + (dDimPzX + dThick) * nNumPzX
|
||||
Dim nCutParaId = EgtCreateLinePDL(nLayerId, ptStart, m_dAngO, dLenX + 0.1)
|
||||
' Imposto affondamento e angolo di fianco sul taglio
|
||||
EgtSetInfo(nCutParaId, INFO_DEPTH, m_dDepth)
|
||||
EgtSetInfo(nCutParaId, INFO_SIDE_ANGLE, m_dAngV)
|
||||
' Inidico che è un taglio Diretto di tipo Squaring
|
||||
EgtSetInfo(nCutParaId, INFO_DIRECTCUT, FlagDirectCuts.Squaring)
|
||||
' Imposto affondamento e angolo di fianco sul taglio (solo se non lama STD)
|
||||
If Not nType = MCH_TY.SAW_STD Then
|
||||
EgtSetInfo(nCutParaId, INFO_DEPTH, m_dDepth)
|
||||
EgtSetInfo(nCutParaId, INFO_SIDE_ANGLE, m_dAngV)
|
||||
EgtOutLog("Curr tool in use is not of type SAW_STD: Depth is limited to raw thickness")
|
||||
End If
|
||||
' Allungo la geometria
|
||||
EgtExtendCurveStartByLen(nCutParaId, m_dOffsetSquaring + m_dExtraLength)
|
||||
EgtExtendCurveEndByLen(nCutParaId, m_dOffsetSquaring + +m_dExtraLength)
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
<UserControl x:Class="VacuumMachineButtonUC"
|
||||
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">
|
||||
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">
|
||||
|
||||
<Border Style="{DynamicResource OmagCut_Page2Border}">
|
||||
|
||||
@@ -15,28 +15,28 @@
|
||||
<ItemsControl.Resources>
|
||||
<DataTemplate DataType="{x:Type OmagCUT:TwoStateButton}">
|
||||
<ToggleButton IsChecked="{Binding IsChecked}"
|
||||
Style="{StaticResource OmagCut_GradientYellowIconToggleButton}">
|
||||
<Image Source="{Binding ImageSource}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
Style="{DynamicResource OmagCut_GradientYellowIconToggleButton}">
|
||||
<Image Source="{Binding ImageSource}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||
</ToggleButton>
|
||||
</DataTemplate>
|
||||
<DataTemplate DataType="{x:Type OmagCUT:ThreeStateButton}">
|
||||
<Button Command="{Binding ExecuteCommand}"
|
||||
Background="{Binding Background}"
|
||||
Style="{StaticResource OmagCut_MachineCommandsYellowGradientYellowIconButton}">
|
||||
<Image Source="{Binding ImageSource}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
Style="{DynamicResource OmagCut_MachineCommandsYellowGradientYellowIconButton}">
|
||||
<Image Source="{Binding ImageSource}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
</DataTemplate>
|
||||
<DataTemplate DataType="{x:Type OmagCUT:DoubleCommandButton}">
|
||||
<ToggleButton IsChecked="{Binding IsChecked}"
|
||||
Style="{StaticResource OmagCut_GradientYellowIconToggleButton}">
|
||||
<Image Source="{Binding ImageSource}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
Style="{DynamicResource OmagCut_GradientYellowIconToggleButton}">
|
||||
<Image Source="{Binding ImageSource}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||
</ToggleButton>
|
||||
</DataTemplate>
|
||||
<DataTemplate DataType="{x:Type OmagCUT:PressedCommandButton}">
|
||||
<Button Style="{StaticResource OmagCut_MachineCommandsYellowGradientYellowIconButton}"
|
||||
<Button Style="{DynamicResource OmagCut_MachineCommandsYellowGradientYellowIconButton}"
|
||||
PreviewMouseUp="PressedCommandButton_PreviewMouseUp"
|
||||
PreviewMouseDown="PressedCommandButton_PreviewMouseDown">
|
||||
<Image Source="{Binding ImageSource}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
<Image Source="{Binding ImageSource}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
</DataTemplate>
|
||||
</ItemsControl.Resources>
|
||||
@@ -54,7 +54,7 @@
|
||||
</ItemsPanelTemplate>
|
||||
</ItemsControl.ItemsPanel>
|
||||
</ItemsControl>
|
||||
|
||||
|
||||
</Border>
|
||||
|
||||
</UserControl>
|
||||
|
||||
@@ -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,
|
||||
|
||||
+183
-182
@@ -1,224 +1,225 @@
|
||||
<UserControl x:Class="AlzFrontUC"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="768" d:DesignWidth="256">
|
||||
<!-- Definizione della Grid Laterale -->
|
||||
<Grid Name="VariablesCompoGrid" Grid.RowSpan="2">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="0.3*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</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*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="0.2*"/>
|
||||
<RowDefinition Height="4*"/>
|
||||
<!--<RowDefinition Height="0.5*"/>
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="768" d:DesignWidth="256">
|
||||
|
||||
<!-- Definizione della Grid Laterale -->
|
||||
<Grid Name="VariablesCompoGrid" Grid.RowSpan="2">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="0.3*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</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*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="0.2*"/>
|
||||
<RowDefinition Height="4*"/>
|
||||
<!--<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>-->
|
||||
</Grid.RowDefinitions>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<!--Titolo della colonna della ALZATINE-->
|
||||
<TextBlock Name="SideAngleBl" Grid.Row="0" Grid.Column="2" Text="Alz."
|
||||
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
|
||||
FontSize="{DynamicResource FontSize_LowerCaseCharacter}"/>
|
||||
<!--Titolo della colonna della ALZATINE-->
|
||||
<TextBlock Name="SideAngleBl" Grid.Row="0" Grid.Column="2" Text="Alz."
|
||||
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
|
||||
FontSize="{DynamicResource FontSize_LowerCaseCharacter}"/>
|
||||
|
||||
<!--Titolo della colonna dei FRONTALINI-->
|
||||
<TextBlock Name="HeelBl" Grid.Row="0" Grid.Column="3" Text="Front."
|
||||
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
|
||||
FontSize="{DynamicResource FontSize_LowerCaseCharacter}"/>
|
||||
<!--Titolo della colonna dei FRONTALINI-->
|
||||
<TextBlock Name="HeelBl" Grid.Row="0" Grid.Column="3" Text="Front."
|
||||
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
|
||||
FontSize="{DynamicResource FontSize_LowerCaseCharacter}"/>
|
||||
|
||||
<TextBlock Name="Entity1" Grid.Row="1" Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||
<CheckBox Name="A1" Grid.Column="2" Grid.Row="1" Height="30" Width="40" HorizontalAlignment="Right"
|
||||
Margin="-10,0,0,0"/>
|
||||
<CheckBox Name="F1" Grid.Column="3" Grid.Row="1" Height="30" Width="40" HorizontalAlignment="Right"
|
||||
Margin="-10,0,0,0"/>
|
||||
<TextBlock Name="Entity1" Grid.Row="1" Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||
<CheckBox Name="A1" Grid.Column="2" Grid.Row="1" Height="30" Width="40" HorizontalAlignment="Right"
|
||||
Margin="-10,0,0,0"/>
|
||||
<CheckBox Name="F1" Grid.Column="3" Grid.Row="1" Height="30" Width="40" HorizontalAlignment="Right"
|
||||
Margin="-10,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"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="H1TxBx" Grid.Column="3" Grid.Row="1" Width="60"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>-->
|
||||
|
||||
<TextBlock Name="Entity2" Grid.Row="2" Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||
<CheckBox Name="A2" Grid.Column="2" Grid.Row="2" Height="30" Width="40" HorizontalAlignment="Right"
|
||||
Margin="-20,0,0,0"/>
|
||||
<CheckBox Name="F2" Grid.Column="3" 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"
|
||||
<TextBlock Name="Entity2" Grid.Row="2" Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||
<CheckBox Name="A2" Grid.Column="2" Grid.Row="2" Height="30" Width="40" HorizontalAlignment="Right"
|
||||
Margin="-20,0,0,0"/>
|
||||
<CheckBox Name="F2" Grid.Column="3" 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"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="H2TxBx" Grid.Column="3" Grid.Row="2" Width="60"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>-->
|
||||
|
||||
<TextBlock Name="Entity3" Grid.Row="3" Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||
<CheckBox Name="A3" Grid.Column="2" Grid.Row="3" Height="30" Width="40" HorizontalAlignment="Right"
|
||||
Margin="-20,0,0,0"/>
|
||||
<CheckBox Name="F3" Grid.Column="3" 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"
|
||||
<TextBlock Name="Entity3" Grid.Row="3" Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||
<CheckBox Name="A3" Grid.Column="2" Grid.Row="3" Height="30" Width="40" HorizontalAlignment="Right"
|
||||
Margin="-20,0,0,0"/>
|
||||
<CheckBox Name="F3" Grid.Column="3" 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"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="H3TxBx" Grid.Column="3" Grid.Row="3" Width="60"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>-->
|
||||
|
||||
<TextBlock Name="Entity4" Grid.Row="4" Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||
<CheckBox Name="A4" Grid.Column="2" Grid.Row="4" Height="30" Width="40" HorizontalAlignment="Right"
|
||||
Margin="-20,0,0,0"/>
|
||||
<CheckBox Name="F4" Grid.Column="3" 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"
|
||||
<TextBlock Name="Entity4" Grid.Row="4" Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||
<CheckBox Name="A4" Grid.Column="2" Grid.Row="4" Height="30" Width="40" HorizontalAlignment="Right"
|
||||
Margin="-20,0,0,0"/>
|
||||
<CheckBox Name="F4" Grid.Column="3" 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"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="H4TxBx" Grid.Column="3" Grid.Row="4" Width="60"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>-->
|
||||
|
||||
<TextBlock Name="Entity5" Grid.Row="5" Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||
<CheckBox Name="A5" Grid.Column="2" Grid.Row="5" Height="30" Width="40" HorizontalAlignment="Right"
|
||||
Margin="-20,0,0,0"/>
|
||||
<CheckBox Name="F5" Grid.Column="3" 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"
|
||||
<TextBlock Name="Entity5" Grid.Row="5" Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||
<CheckBox Name="A5" Grid.Column="2" Grid.Row="5" Height="30" Width="40" HorizontalAlignment="Right"
|
||||
Margin="-20,0,0,0"/>
|
||||
<CheckBox Name="F5" Grid.Column="3" 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"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="H5TxBx" Grid.Column="3" Grid.Row="5" Width="60"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>-->
|
||||
|
||||
<TextBlock Name="Entity6" Grid.Row="6" Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||
<CheckBox Name="A6" Grid.Column="2" Grid.Row="6" Height="30" Width="40" HorizontalAlignment="Right"
|
||||
Margin="-20,0,0,0"/>
|
||||
<CheckBox Name="F6" Grid.Column="3" 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"
|
||||
<TextBlock Name="Entity6" Grid.Row="6" Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||
<CheckBox Name="A6" Grid.Column="2" Grid.Row="6" Height="30" Width="40" HorizontalAlignment="Right"
|
||||
Margin="-20,0,0,0"/>
|
||||
<CheckBox Name="F6" Grid.Column="3" 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"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="H6TxBx" Grid.Column="3" Grid.Row="6" Width="60"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>-->
|
||||
|
||||
<TextBlock Name="Entity7" Grid.Row="7" Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||
<CheckBox Name="A7" Grid.Column="2" Grid.Row="7" Height="30" Width="40" HorizontalAlignment="Right"
|
||||
Margin="-20,0,0,0"/>
|
||||
<CheckBox Name="F7" Grid.Column="3" 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"
|
||||
<TextBlock Name="Entity7" Grid.Row="7" Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||
<CheckBox Name="A7" Grid.Column="2" Grid.Row="7" Height="30" Width="40" HorizontalAlignment="Right"
|
||||
Margin="-20,0,0,0"/>
|
||||
<CheckBox Name="F7" Grid.Column="3" 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"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="H7TxBx" Grid.Column="3" Grid.Row="7" Width="60"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>-->
|
||||
|
||||
<TextBlock Name="Entity8" Grid.Row="8" Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||
<CheckBox Name="A8" Grid.Column="2" Grid.Row="8" Height="30" Width="40" HorizontalAlignment="Right"
|
||||
Margin="-20,0,0,0"/>
|
||||
<CheckBox Name="F8" Grid.Column="3" 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"
|
||||
<TextBlock Name="Entity8" Grid.Row="8" Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||
<CheckBox Name="A8" Grid.Column="2" Grid.Row="8" Height="30" Width="40" HorizontalAlignment="Right"
|
||||
Margin="-20,0,0,0"/>
|
||||
<CheckBox Name="F8" Grid.Column="3" 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"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="H8TxBx" Grid.Column="3" Grid.Row="8" Width="60"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>-->
|
||||
|
||||
<TextBlock Name="Entity9" Grid.Row="9" Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||
<CheckBox Name="A9" Grid.Column="2" Grid.Row="9" Height="30" Width="40" HorizontalAlignment="Right"
|
||||
Margin="-20,0,0,0"/>
|
||||
<CheckBox Name="F9" Grid.Column="3" 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"
|
||||
<TextBlock Name="Entity9" Grid.Row="9" Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||
<CheckBox Name="A9" Grid.Column="2" Grid.Row="9" Height="30" Width="40" HorizontalAlignment="Right"
|
||||
Margin="-20,0,0,0"/>
|
||||
<CheckBox Name="F9" Grid.Column="3" 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"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="H9TxBx" Grid.Column="3" Grid.Row="9" Width="60"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>-->
|
||||
|
||||
<TextBlock Name="Entity10" Grid.Row="10" Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||
<CheckBox Name="A10" Grid.Column="2" Grid.Row="10" Height="30" Width="40" HorizontalAlignment="Right"
|
||||
Margin="-20,0,0,0"/>
|
||||
<TextBlock Name="Entity10" Grid.Row="10" Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||
<CheckBox Name="A10" Grid.Column="2" Grid.Row="10" Height="30" Width="40" HorizontalAlignment="Right"
|
||||
Margin="-20,0,0,0"/>
|
||||
<CheckBox Name="F10" Grid.Column="3" Grid.Row="10" Height="30" Width="40" HorizontalAlignment="Right"
|
||||
Margin="-20,0,0,0"/>
|
||||
|
||||
<CheckBox Name="F10" Grid.Column="3" 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"
|
||||
Margin="0,0,0,-2"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="H10TxBx" Grid.Column="3" Grid.Row="10" Width="60"
|
||||
Margin="0,0,0,-2"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>-->
|
||||
|
||||
<Grid Grid.Column="0" Grid.Row="12" Grid.ColumnSpan="4">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="0.3*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="0.55*"/>
|
||||
<RowDefinition Height="0.55*"/>
|
||||
<RowDefinition Height="0.55*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid Grid.Column="0" Grid.Row="12" Grid.ColumnSpan="4">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="0.3*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="0.55*"/>
|
||||
<RowDefinition Height="0.55*"/>
|
||||
<RowDefinition Height="0.55*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<!-- Altezza delle alette -->
|
||||
<TextBlock Name="Parameter1TxBl" Grid.Row="0" Grid.ColumnSpan="2"
|
||||
Text="Offset"
|
||||
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
|
||||
FontSize="{DynamicResource FontSize_LowerCaseCharacter}"/>
|
||||
|
||||
<EgtWPFLib:EgtTextBox Name="Parameter1ATxBx"
|
||||
Grid.Column="2" Grid.Row="0"
|
||||
HorizontalAlignment="Right"
|
||||
Width="60" Height="30" Margin="0,0,0,0"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="Parameter1FTxBx"
|
||||
Grid.Column="3" Grid.Row="0"
|
||||
HorizontalAlignment="Right"
|
||||
Width="60" Height="30" Margin="0,0,0,0"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
|
||||
<!-- Delta angolo (abilitato solo per i frontalini) -->
|
||||
<TextBlock Name="Parameter2TxBl" Grid.Row="1" Grid.ColumnSpan="2"
|
||||
Text="Offset2"
|
||||
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
|
||||
FontSize="{DynamicResource FontSize_LowerCaseCharacter}"/>
|
||||
<!-- temporaneamente disabilito la definizione delta angolo per alzatine -->
|
||||
<EgtWPFLib:EgtTextBox Name="Parameter2ATxBx"
|
||||
IsEnabled="False"
|
||||
Visibility="Collapsed"
|
||||
Grid.Column="2" Grid.Row="1"
|
||||
HorizontalAlignment="Right"
|
||||
Width="60" Height="30" Margin="0,0,0,0" 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" IsLength="False"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
<!-- Altezza delle alette -->
|
||||
<TextBlock Name="Parameter1TxBl" Grid.Row="0" Grid.ColumnSpan="2"
|
||||
Text="Offset"
|
||||
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
|
||||
FontSize="{DynamicResource FontSize_LowerCaseCharacter}"/>
|
||||
|
||||
<!-- Spessore aletta -->
|
||||
<TextBlock Name="Parameter5TxBl" Grid.Row="2" Grid.ColumnSpan="2"
|
||||
Text="Offset2"
|
||||
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
|
||||
FontSize="{DynamicResource FontSize_LowerCaseCharacter}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="Parameter5TxBx"
|
||||
Grid.Column="2" Grid.Row="2"
|
||||
HorizontalAlignment="Right"
|
||||
Width="60" Height="30" Margin="0,0,0,0"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="Parameter1ATxBx"
|
||||
Grid.Column="2" Grid.Row="0"
|
||||
HorizontalAlignment="Right"
|
||||
Width="60" Height="30" Margin="0,0,0,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="Parameter1FTxBx"
|
||||
Grid.Column="3" Grid.Row="0"
|
||||
HorizontalAlignment="Right"
|
||||
Width="60" Height="30" Margin="0,0,0,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
|
||||
<!--Gestisco nello spazio di una TextBox due TextBoxs--><!--
|
||||
<!-- Delta angolo (abilitato solo per i frontalini) -->
|
||||
<TextBlock Name="Parameter2TxBl" Grid.Row="1" Grid.ColumnSpan="2"
|
||||
Text="Offset2"
|
||||
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
|
||||
FontSize="{DynamicResource FontSize_LowerCaseCharacter}"/>
|
||||
<!-- temporaneamente disabilito la definizione delta angolo per alzatine -->
|
||||
<EgtWPFLib:EgtTextBox Name="Parameter2ATxBx"
|
||||
IsEnabled="False"
|
||||
Visibility="Collapsed"
|
||||
Grid.Column="2" Grid.Row="1"
|
||||
HorizontalAlignment="Right"
|
||||
Width="60" Height="30" Margin="0,0,0,0" IsLength="False"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="Parameter2FTxBx"
|
||||
Grid.Column="3" Grid.Row="1"
|
||||
HorizontalAlignment="Right"
|
||||
Width="60" Height="30" Margin="0,0,0,0" IsLength="False"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
|
||||
<!-- Spessore aletta -->
|
||||
<TextBlock Name="Parameter5TxBl" Grid.Row="2" Grid.ColumnSpan="2"
|
||||
Text="Offset2"
|
||||
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
|
||||
FontSize="{DynamicResource FontSize_LowerCaseCharacter}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="Parameter5TxBx"
|
||||
Grid.Column="2" Grid.Row="2"
|
||||
HorizontalAlignment="Right"
|
||||
Width="60" Height="30" Margin="0,0,0,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
|
||||
<!--Gestisco nello spazio di una TextBox due TextBoxs-->
|
||||
<!--
|
||||
<UniformGrid Rows="1" Grid.Column="2" Grid.Row="1" Grid.ColumnSpan="2" Width="90" >
|
||||
<EgtWPFLib:EgtTextBox Name="Parameter2aTxBx"
|
||||
Grid.Column="2" Grid.Row="12"
|
||||
@@ -231,7 +232,7 @@
|
||||
</UniformGrid>-->
|
||||
|
||||
|
||||
<!--<TextBlock Name="Parameter3TxBl" Grid.Row="2" Grid.ColumnSpan="2"
|
||||
<!--<TextBlock Name="Parameter3TxBl" Grid.Row="2" Grid.ColumnSpan="2"
|
||||
Text="Affondamento"
|
||||
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
|
||||
FontSize="{DynamicResource FontSize_LowerCaseCharacter}"/>
|
||||
@@ -241,7 +242,7 @@
|
||||
Width="85" Height="30"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>-->
|
||||
|
||||
<!--<TextBlock Name="Parameter4TxBl" Grid.Row="3" Grid.ColumnSpan="2"
|
||||
<!--<TextBlock Name="Parameter4TxBl" Grid.Row="3" Grid.ColumnSpan="2"
|
||||
Text="Accorciamento"
|
||||
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
|
||||
FontSize="{DynamicResource FontSize_LowerCaseCharacter}"/>
|
||||
@@ -250,22 +251,22 @@
|
||||
Margin="0,0,0,-2"
|
||||
Width="85" Height="30"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>-->
|
||||
|
||||
<UniformGrid Columns="2" Grid.ColumnSpan="4" Grid.Row="3">
|
||||
<!--questo bottone è stato creato solo per garantire il corretto allinaemento-->
|
||||
<Button Name="Vuoto" Visibility="Hidden"/>
|
||||
<!--Bottone per tornare indietro alla selezione di CompoInterni e Alz&Front-->
|
||||
<Button Name="BackBtn"
|
||||
|
||||
<UniformGrid Columns="2" Grid.ColumnSpan="4" Grid.Row="3">
|
||||
<!--questo bottone è stato creato solo per garantire il corretto allinaemento-->
|
||||
<Button Name="Vuoto" Visibility="Hidden"/>
|
||||
<!--Bottone per tornare indietro alla selezione di CompoInterni e Alz&Front-->
|
||||
<Button Name="BackBtn"
|
||||
Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource NumericKeyboardArrowImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
</UniformGrid>
|
||||
|
||||
</Grid>
|
||||
<Image Source="{DynamicResource NumericKeyboardArrowImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
</UniformGrid>
|
||||
|
||||
</Grid>
|
||||
|
||||
|
||||
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
||||
</UserControl>
|
||||
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
Imports System.Globalization
|
||||
Imports EgtUILib
|
||||
Imports EgtWPFLib
|
||||
Imports EgtUILib
|
||||
|
||||
Public Class AlzFrontUC
|
||||
Private Const NUM_VAR As Integer = 10
|
||||
@@ -76,9 +74,9 @@ Public Class AlzFrontUC
|
||||
m_MainWindow.m_DrawPageUC.DripCutBtn.IsEnabled = False
|
||||
|
||||
' nome dei parametri condivisi
|
||||
Parameter1TxBl.Text = EgtMsg(91134)
|
||||
Parameter2TxBl.Text = EgtMsg(91135)
|
||||
Parameter5TxBl.Text = EgtMsg(91136)
|
||||
Parameter1TxBl.Text = EgtMsg(91134) ' Altezza
|
||||
Parameter2TxBl.Text = EgtMsg(91135) ' Delta angolo
|
||||
Parameter5TxBl.Text = EgtMsg(91136) ' Spessore
|
||||
|
||||
EgtZoom(ZM.ALL)
|
||||
End Sub
|
||||
@@ -195,10 +193,10 @@ Public Class AlzFrontUC
|
||||
If LoopId <> GDB_ID.NULL Then
|
||||
If m_nCount = 0 Then
|
||||
If m_CallingPage = MainWindow.Pages.Draw Then
|
||||
m_MainWindow.m_DrawPageUC.MessageTxBx.Text = EgtMsg(MSG_DRAWPAGEUC + 7) ' Non ci sono lati modificabili
|
||||
m_MainWindow.m_DrawPageUC.MessageTxBx.Text = EgtMsg(90387) ' Non ci sono lati modificabili
|
||||
m_MainWindow.m_DrawPageUC.MessageBrd.Background = Application.Current.FindResource("OmagCut_Yellow")
|
||||
Else
|
||||
m_MainWindow.m_ImportPageUC.MessageTxBx.Text = EgtMsg(MSG_DRAWPAGEUC + 7) ' Non ci sono lati modificabili
|
||||
m_MainWindow.m_ImportPageUC.MessageTxBx.Text = EgtMsg(90387) ' Non ci sono lati modificabili
|
||||
m_MainWindow.m_ImportPageUC.MessageBrd.Background = Application.Current.FindResource("OmagCut_Yellow")
|
||||
End If
|
||||
Else
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
<Window x:Class="CompoCsvData"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
|
||||
FontFamily="{DynamicResource OmagCut_Font}"
|
||||
ResizeMode="NoResize" WindowStyle="None" AllowsTransparency="True" Background="Transparent"
|
||||
Title="ChooseMachining" Height="276.5" Width="426.5">
|
||||
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
|
||||
FontFamily="{DynamicResource OmagCut_Font}"
|
||||
ResizeMode="NoResize" WindowStyle="None" AllowsTransparency="True" Background="Transparent"
|
||||
Title="ChooseMachining" Height="276.5" Width="426.5">
|
||||
|
||||
<!--Definizione della pagina di impostazione dati Trf su componenti-->
|
||||
<Border Style="{DynamicResource OmagCut_Border}">
|
||||
<Border Style="{DynamicResource OmagCut_Border}">
|
||||
|
||||
<Grid Name="CompoCsvDataGrid">
|
||||
<Grid.ColumnDefinitions>
|
||||
@@ -27,19 +27,19 @@
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<TextBlock Name="OrderTxBl" Grid.Column="1" Grid.Row="1"
|
||||
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}" HorizontalAlignment="Left"/>
|
||||
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}" HorizontalAlignment="Left"/>
|
||||
<EgtWPFLib:EgtTextBox Name="OrderTxBx" Grid.Column="2" Grid.Row="1"
|
||||
Style="{StaticResource OmagCut_KeyboardTextBox}"/>
|
||||
Style="{DynamicResource OmagCut_KeyboardTextBox}"/>
|
||||
|
||||
<TextBlock Name="ListTxBl" Grid.Column="1" Grid.Row="2"
|
||||
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}" HorizontalAlignment="Left"/>
|
||||
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}" HorizontalAlignment="Left"/>
|
||||
<EgtWPFLib:EgtTextBox Name="ListTxBx" Grid.Column="2" Grid.Row="2"
|
||||
Style="{StaticResource OmagCut_KeyboardTextBox}"/>
|
||||
Style="{DynamicResource OmagCut_KeyboardTextBox}"/>
|
||||
|
||||
<TextBlock Name="NameTxBl" Grid.Column="1" Grid.Row="3"
|
||||
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}" HorizontalAlignment="Left"/>
|
||||
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}" HorizontalAlignment="Left"/>
|
||||
<EgtWPFLib:EgtTextBox Name="NameTxBx" Grid.Column="2" Grid.Row="3"
|
||||
Style="{StaticResource OmagCut_KeyboardTextBox}"/>
|
||||
Style="{DynamicResource OmagCut_KeyboardTextBox}"/>
|
||||
|
||||
<Grid Name="ButtonsGrid" Grid.Column="0" Grid.Row="5" Grid.ColumnSpan="4">
|
||||
<Grid.ColumnDefinitions>
|
||||
@@ -50,13 +50,15 @@
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Button Name="OkBtn" Grid.Column="1" Style="{DynamicResource OmagCut_GradientBlueIconButton}"
|
||||
IsCancel="True">
|
||||
<Image Source="{DynamicResource VImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
<Button Name="OkBtn" Grid.Column="1"
|
||||
Style="{DynamicResource OmagCut_GradientBlueIconButton}"
|
||||
IsCancel="True">
|
||||
<Image Source="{DynamicResource VImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="ExitBtn" Grid.Column="3" Style="{DynamicResource OmagCut_GradientBlueIconButton}"
|
||||
IsCancel="True">
|
||||
<Image Source="{DynamicResource XImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
<Button Name="ExitBtn" Grid.Column="3"
|
||||
Style="{DynamicResource OmagCut_GradientBlueIconButton}"
|
||||
IsCancel="True">
|
||||
<Image Source="{DynamicResource XImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
|
||||
</Grid>
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
Imports System.Collections.ObjectModel
|
||||
Imports EgtUILib
|
||||
Imports EgtUILib
|
||||
|
||||
Public Class CompoCsvData
|
||||
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
<UserControl x:Class="CompoDimensionUC"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="597.1" d:DesignWidth="255.9">
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="597.1" d:DesignWidth="255.9">
|
||||
|
||||
<!-- Definizione della Grid Laterale -->
|
||||
<Grid Name="VariablesCompoGrid" Grid.RowSpan="2">
|
||||
@@ -26,54 +26,54 @@
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<TextBlock Name="Label1" Grid.Row="0"
|
||||
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="TextBox1" Grid.Column="1" Grid.Row="0" Width="90"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
<TextBlock Name="Label2" Grid.Row="1"
|
||||
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="TextBox2" Grid.Column="1" Grid.Row="1" Width="90"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
<TextBlock Name="Label3" Grid.Row="2"
|
||||
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="TextBox3" Grid.Column="1" Grid.Row="2" Width="90"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
<TextBlock Name="Label4" Grid.Row="3"
|
||||
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="TextBox4" Grid.Column="1" Grid.Row="3" Width="90"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
<TextBlock Name="Label5" Grid.Row="4"
|
||||
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="TextBox5" Grid.Column="1" Grid.Row="4" Width="90"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
<TextBlock Name="Label6" Grid.Row="5"
|
||||
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="TextBox6" Grid.Column="1" Grid.Row="5" Width="90"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
<TextBlock Name="Label7" Grid.Row="6"
|
||||
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="TextBox7" Grid.Column="1" Grid.Row="6" Width="90"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
<TextBlock Name="Label8" Grid.Row="7"
|
||||
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="TextBox8" Grid.Column="1" Grid.Row="7" Width="90"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
<TextBlock Name="Label9" Grid.Row="8"
|
||||
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="TextBox9" Grid.Column="1" Grid.Row="8" Width="90"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
<TextBlock Name="Label10" Grid.Row="9"
|
||||
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="TextBox10" Grid.Column="1" Grid.Row="9" Width="90"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
|
||||
<!--Per confermare l'inserimento CompoInterno-->
|
||||
<!--Per confermare l'inserimento CompoInterno-->
|
||||
<Button Name="AddBtn" Grid.Row="10" Style="{DynamicResource OmagCut_YellowTextButton}"/>
|
||||
<Button Name="CancelBtn" Grid.Column="1" Grid.Row="10" Style="{DynamicResource OmagCut_YellowTextButton}"/>
|
||||
|
||||
<!--Selezione delle componenti interne-->
|
||||
<!--Selezione delle componenti interne-->
|
||||
<Button Name="InternComponentBtn" Grid.Row="10" Grid.ColumnSpan="2"
|
||||
Style="{DynamicResource OmagCut_YellowTextButton}"/>
|
||||
|
||||
@@ -81,6 +81,6 @@
|
||||
<Button Name="AlzFrontBtn" Grid.Row="11" Grid.ColumnSpan="2"
|
||||
Style="{DynamicResource OmagCut_YellowTextButton}"/>
|
||||
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
||||
</UserControl>
|
||||
|
||||
@@ -34,7 +34,7 @@ Public Class CompoDimensionUC
|
||||
Dim sCompoDir As String = String.Empty
|
||||
GetPrivateProfileString(S_ALZFRONT, K_COMPODIR, "", sCompoDir, m_MainWindow.GetIniFile())
|
||||
' definisco il nome dei comandi presenti nella pagine
|
||||
InternComponentBtn.Content = EgtMsg(MSG_COMPONENTPAGEUC + 47) ' Componenti interni
|
||||
InternComponentBtn.Content = EgtMsg(90447) ' Componenti interni
|
||||
If Not String.IsNullOrEmpty(sCompoDir) Then
|
||||
bEnableAlzFront = True
|
||||
AlzFrontBtn.Content = EgtMsg(91137)
|
||||
@@ -42,8 +42,8 @@ Public Class CompoDimensionUC
|
||||
AlzFrontBtn.Visibility = Visibility.Collapsed
|
||||
End If
|
||||
|
||||
AddBtn.Content = EgtMsg(MSG_COMPONENTPAGEUC + 48) ' Aggiungi
|
||||
CancelBtn.Content = EgtMsg(MSG_COMPONENTPAGEUC + 49) ' Rimuovi
|
||||
AddBtn.Content = EgtMsg(90448) ' Aggiungi
|
||||
CancelBtn.Content = EgtMsg(90449) ' Rimuovi
|
||||
End Sub
|
||||
|
||||
Private Sub CompoDimensionUC_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
<Window x:Class="CompoTrfData"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
|
||||
FontFamily="{DynamicResource OmagCut_Font}"
|
||||
ResizeMode="NoResize" WindowStyle="None" AllowsTransparency="True" Background="Transparent"
|
||||
Title="ChooseMachining" Height="426.5" Width="426.5">
|
||||
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
|
||||
FontFamily="{DynamicResource OmagCut_Font}"
|
||||
ResizeMode="NoResize" WindowStyle="None" AllowsTransparency="True" Background="Transparent"
|
||||
Title="ChooseMachining" Height="426.5" Width="426.5">
|
||||
|
||||
<!--Definizione della pagina di impostazione dati Trf su componenti-->
|
||||
<Border Style="{DynamicResource OmagCut_Border}">
|
||||
<Border Style="{DynamicResource OmagCut_Border}">
|
||||
|
||||
<Grid Name="CompoTrfDataGrid">
|
||||
<Grid.ColumnDefinitions>
|
||||
@@ -30,34 +30,34 @@
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<TextBlock Name="OrdCodeTxBl" Grid.Column="1" Grid.Row="1"
|
||||
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}" HorizontalAlignment="Left"/>
|
||||
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}" HorizontalAlignment="Left"/>
|
||||
<EgtWPFLib:EgtTextBox Name="OrdCodeTxBx" Grid.Column="2" Grid.Row="1"
|
||||
Style="{StaticResource OmagCut_KeyboardTextBox}"/>
|
||||
Style="{DynamicResource OmagCut_KeyboardTextBox}"/>
|
||||
|
||||
<TextBlock Name="OrdDescTxBl" Grid.Column="1" Grid.Row="2"
|
||||
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}" HorizontalAlignment="Left"/>
|
||||
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}" HorizontalAlignment="Left"/>
|
||||
<EgtWPFLib:EgtTextBox Name="OrdDescTxBx" Grid.Column="2" Grid.Row="2"
|
||||
Style="{StaticResource OmagCut_KeyboardTextBox}"/>
|
||||
Style="{DynamicResource OmagCut_KeyboardTextBox}"/>
|
||||
|
||||
<TextBlock Name="PartCodeTxBl" Grid.Column="1" Grid.Row="3"
|
||||
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}" HorizontalAlignment="Left"/>
|
||||
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}" HorizontalAlignment="Left"/>
|
||||
<EgtWPFLib:EgtTextBox Name="PartCodeTxBx" Grid.Column="2" Grid.Row="3"
|
||||
Style="{StaticResource OmagCut_KeyboardTextBox}"/>
|
||||
Style="{DynamicResource OmagCut_KeyboardTextBox}"/>
|
||||
|
||||
<TextBlock Name="MatCodeTxBl" Grid.Column="1" Grid.Row="4"
|
||||
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}" HorizontalAlignment="Left"/>
|
||||
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}" HorizontalAlignment="Left"/>
|
||||
<EgtWPFLib:EgtTextBox Name="MatCodeTxBx" Grid.Column="2" Grid.Row="4"
|
||||
Style="{StaticResource OmagCut_KeyboardTextBox}"/>
|
||||
Style="{DynamicResource OmagCut_KeyboardTextBox}"/>
|
||||
|
||||
<TextBlock Name="SurfCodeTxBl" Grid.Column="1" Grid.Row="5"
|
||||
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}" HorizontalAlignment="Left"/>
|
||||
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}" HorizontalAlignment="Left"/>
|
||||
<EgtWPFLib:EgtTextBox Name="SurfCodeTxBx" Grid.Column="2" Grid.Row="5"
|
||||
Style="{StaticResource OmagCut_KeyboardTextBox}"/>
|
||||
Style="{DynamicResource OmagCut_KeyboardTextBox}"/>
|
||||
|
||||
<TextBlock Name="ThicknessTxBl" Grid.Column="1" Grid.Row="6"
|
||||
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}" HorizontalAlignment="Left"/>
|
||||
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}" HorizontalAlignment="Left"/>
|
||||
<EgtWPFLib:EgtTextBox Name="ThicknessTxBx" Grid.Column="2" Grid.Row="6"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
|
||||
<Grid Name="ButtonsGrid" Grid.Column="0" Grid.Row="8" Grid.ColumnSpan="4">
|
||||
<Grid.ColumnDefinitions>
|
||||
@@ -68,13 +68,15 @@
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Button Name="OkBtn" Grid.Column="1" Style="{DynamicResource OmagCut_GradientBlueIconButton}"
|
||||
IsCancel="True">
|
||||
<Image Source="{DynamicResource VImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
<Button Name="OkBtn" Grid.Column="1"
|
||||
Style="{DynamicResource OmagCut_GradientBlueIconButton}"
|
||||
IsCancel="True">
|
||||
<Image Source="{DynamicResource VImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="ExitBtn" Grid.Column="3" Style="{DynamicResource OmagCut_GradientBlueIconButton}"
|
||||
IsCancel="True">
|
||||
<Image Source="{DynamicResource XImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
<Button Name="ExitBtn" Grid.Column="3"
|
||||
Style="{DynamicResource OmagCut_GradientBlueIconButton}"
|
||||
IsCancel="True">
|
||||
<Image Source="{DynamicResource XImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
|
||||
</Grid>
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
Imports System.Collections.ObjectModel
|
||||
Imports EgtUILib
|
||||
Imports EgtUILib
|
||||
|
||||
Public Class CompoTrfData
|
||||
|
||||
@@ -14,12 +13,12 @@ Public Class CompoTrfData
|
||||
Private Sub CompoTrfData_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
|
||||
OrdCodeTxBl.Text = EgtMsg(MSG_DRAWPAGEUC + 10) 'Order Code
|
||||
OrdDescTxBl.Text = EgtMsg(MSG_DRAWPAGEUC + 11) 'Order Description
|
||||
PartCodeTxBl.Text = EgtMsg(MSG_DRAWPAGEUC + 16) 'Part Code
|
||||
MatCodeTxBl.Text = EgtMsg(MSG_DRAWPAGEUC + 12) 'Material Code
|
||||
SurfCodeTxBl.Text = EgtMsg(MSG_DRAWPAGEUC + 13) 'Surface Code
|
||||
ThicknessTxBl.Text = EgtMsg(MSG_DRAWPAGEUC + 14) 'Thickness
|
||||
OrdCodeTxBl.Text = EgtMsg(90390) ' Order Code
|
||||
OrdDescTxBl.Text = EgtMsg(90391) ' Order Description
|
||||
PartCodeTxBl.Text = EgtMsg(90396) ' Part Code
|
||||
MatCodeTxBl.Text = EgtMsg(90392) ' Material Code
|
||||
SurfCodeTxBl.Text = EgtMsg(90393) ' Surface Code
|
||||
ThicknessTxBl.Text = EgtMsg(90394) ' Thickness
|
||||
End Sub
|
||||
|
||||
Private Sub OkBtn_Click(sender As Object, e As RoutedEventArgs) Handles OkBtn.Click
|
||||
|
||||
+38
-35
@@ -1,18 +1,18 @@
|
||||
<UserControl x:Class="DrawPageUC"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="853.3" d:DesignWidth="1280" Initialized="DrawPage_Initialized" Loaded="DrawPage_Loaded" Unloaded="DrawPage_Unloaded">
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="853.3" d:DesignWidth="1280" Initialized="DrawPage_Initialized" Loaded="DrawPage_Loaded" Unloaded="DrawPage_Unloaded">
|
||||
|
||||
<!-- Definizione della DrawPage -->
|
||||
<Border >
|
||||
<Grid Name="DrawPageGrd" >
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="3*"/>
|
||||
<ColumnDefinition Width="12*"/>
|
||||
<ColumnDefinition Width="3*"/>
|
||||
<ColumnDefinition Width="12*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
@@ -32,13 +32,13 @@
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<ToggleButton Name="SideAngleBtn" Grid.Column="0"
|
||||
Style="{DynamicResource OmagCut_RightGrayYellowTextToggleButton}"/>
|
||||
Style="{DynamicResource OmagCut_RightGrayYellowTextToggleButton}"/>
|
||||
<ToggleButton Name="FiloTopBtn" Grid.Column="1"
|
||||
Style="{DynamicResource OmagCut_RightGrayYellowTextToggleButton}"/>
|
||||
Style="{DynamicResource OmagCut_RightGrayYellowTextToggleButton}"/>
|
||||
<ToggleButton Name="EngraveBtn" Grid.Column="2"
|
||||
Style="{DynamicResource OmagCut_RightGrayYellowTextToggleButton}"/>
|
||||
Style="{DynamicResource OmagCut_RightGrayYellowTextToggleButton}"/>
|
||||
<ToggleButton Name="DripCutBtn" Grid.Column="3" Padding="0"
|
||||
Style="{DynamicResource OmagCut_RightGrayYellowTextToggleButton}"/>
|
||||
Style="{DynamicResource OmagCut_RightGrayYellowTextToggleButton}"/>
|
||||
|
||||
</Grid>
|
||||
|
||||
@@ -65,21 +65,21 @@
|
||||
</Grid>
|
||||
|
||||
<Grid Name="VariablesGrd" Grid.Row="1" Grid.RowSpan="2" Grid.ColumnSpan="2"/>
|
||||
|
||||
|
||||
<Grid Name="MessageGrid" Grid.Row="2" Grid.ColumnSpan="2">
|
||||
<TextBlock Name="MessageTxBl" Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||
<TextBlock Name="MessageTxBl" Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||
</Grid>
|
||||
|
||||
<Button Name="BackBtn" Grid.Column="1" Grid.Row="14"
|
||||
Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource NumericKeyboardArrowImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource NumericKeyboardArrowImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
|
||||
|
||||
</Grid>
|
||||
|
||||
<Border Name="MessageBrd" Grid.Row="4" BorderThickness="0,1,0,0" BorderBrush="Gray">
|
||||
<TextBlock Name="MessageTxBx" TextAlignment="Center"
|
||||
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</Border>
|
||||
|
||||
<!-- Definizione della Grid Inferiore per i Button V e X -->
|
||||
@@ -95,9 +95,10 @@
|
||||
<Grid Name="TopGrd">
|
||||
|
||||
<TextBlock Name="TopTxBl"
|
||||
Style="{StaticResource OmagCut_ToolsDBTextBlock}" />
|
||||
<CheckBox Name="TopChBx" Style="{StaticResource OmagCut_CheckBox}"
|
||||
HorizontalAlignment="Right" Margin="6,0,6,0"/>
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}" />
|
||||
<CheckBox Name="TopChBx"
|
||||
Style="{DynamicResource OmagCut_CheckBox}"
|
||||
HorizontalAlignment="Right" Margin="6,0,6,0"/>
|
||||
|
||||
</Grid>
|
||||
|
||||
@@ -107,12 +108,13 @@
|
||||
<ColumnDefinition Width="2*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<TextBlock Name="PartNameTxBl" Grid.Column="0" Style="{DynamicResource OmagCut_CurrProjSummeryTextBlock}"
|
||||
TextAlignment="Right"/>
|
||||
<TextBlock Name="PartNameTxBl" Grid.Column="0"
|
||||
Style="{DynamicResource OmagCut_CurrProjSummeryTextBlock}"
|
||||
TextAlignment="Right"/>
|
||||
<EgtWPFLib:EgtTextBox Name="PartNameTxBx" Grid.Column="1" Width="130"
|
||||
Style="{StaticResource OmagCut_KeyboardTextBox}"/>
|
||||
Style="{DynamicResource OmagCut_KeyboardTextBox}"/>
|
||||
<Button Name="TrfDataBtn" Grid.Column="1"
|
||||
Style="{DynamicResource OmagCut_YellowTextButton}"/>
|
||||
Style="{DynamicResource OmagCut_YellowTextButton}"/>
|
||||
|
||||
</Grid>
|
||||
|
||||
@@ -122,24 +124,25 @@
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<TextBlock Name="PartNumTxBl" Grid.Column="0" Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"
|
||||
TextAlignment="Right"/>
|
||||
<EgtWPFLib:EgtTextBox Name="PartNumTxBx" Grid.Column="1" Width="60" IsLength="False"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
<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="3" Style="{DynamicResource OmagCut_GradientBlueIconButton}">
|
||||
<Image Source="{DynamicResource VImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
<Image Source="{DynamicResource VImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="ExitBtn" Grid.Column="4" Style="{DynamicResource OmagCut_GradientBlueIconButton}">
|
||||
<Image Source="{DynamicResource XImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
<Image Source="{DynamicResource XImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
|
||||
|
||||
</Grid>
|
||||
|
||||
|
||||
</Grid>
|
||||
|
||||
|
||||
</Border>
|
||||
|
||||
</UserControl>
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
Imports System.Globalization
|
||||
Imports EgtUILib
|
||||
Imports EgtUILib
|
||||
Imports EgtWPFLib
|
||||
|
||||
Public Class DrawPageUC
|
||||
@@ -411,7 +410,7 @@ Public Class DrawPageUC
|
||||
m_nSelectedLayer = GDB_ID.NULL
|
||||
SideAngle.WriteSideAngleForNest(DrawScene.GetCtx())
|
||||
' Messaggio di selezione da effettuare
|
||||
MessageTxBx.Text = EgtMsg(MSG_DRAWPAGEUC + 6) ' Selezionare un contorno
|
||||
MessageTxBx.Text = EgtMsg(90386) ' Selezionare un contorno
|
||||
MessageBrd.Background = Application.Current.FindResource("OmagCut_Green")
|
||||
Else
|
||||
Dim nLayId As Integer = EgtGetFirstNameInGroup(nPartId, NAME_OUTLOOP)
|
||||
@@ -1185,22 +1184,42 @@ Public Class DrawPageUC
|
||||
Else
|
||||
MakeMultipleInsert(InsNbr, sPartName)
|
||||
End If
|
||||
' Attivo il parcheggio dei pezzi Draw (per il corretto posizionamento nella scena)
|
||||
ActivateParkIndZero()
|
||||
Dim bExitPage As Boolean = GetPrivateProfileInt(S_GENERAL, K_QUITDRAWPAGE, 1, m_MainWindow.GetIniFile) <> 0
|
||||
' Se Shift premuto eseguo il contrario
|
||||
If Keyboard.Modifiers And ModifierKeys.Shift Then
|
||||
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
|
||||
|
||||
' 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)
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
' esco dalla pagina corrente
|
||||
@@ -1221,6 +1240,24 @@ Public Class DrawPageUC
|
||||
m_MainWindow.MainWindowGrid.Children.Remove(m_MainWindow.m_DrawPageUC)
|
||||
m_MainWindow.MainWindowGrid.Children.Add(m_MainWindow.m_CurrentProjectPageUC)
|
||||
m_MainWindow.m_ActivePage = If(m_MainWindow.FrameCutBtn.IsChecked, MainWindow.Pages.FrameCut, MainWindow.Pages.CadCut)
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub ActivateParkIndZero()
|
||||
' Aggiorno la gestione dei parcheggi: spengo tutti i parcheggi tranne quello dei pezzi disegnati "0"
|
||||
Dim ListParkInd As New List(Of ParkInd)
|
||||
SelParkIndWD.LoadParkInd(ListParkInd)
|
||||
For Each ItemParkInd As ParkInd In ListParkInd
|
||||
If ItemParkInd.Ind = 0 Then
|
||||
ItemParkInd.Status = GDB_ST.ON_
|
||||
Else
|
||||
ItemParkInd.Status = GDB_ST.OFF
|
||||
End If
|
||||
Next
|
||||
' Aggiorno lo stato dei pezzi
|
||||
For Each Item As ParkInd In ListParkInd
|
||||
SelParkIndWD.SetStatusPartInParkInd(Item, False)
|
||||
Next
|
||||
End Sub
|
||||
|
||||
Private Sub TrfDataBtn_Click(sender As Object, e As RoutedEventArgs) Handles TrfDataBtn.Click
|
||||
@@ -1266,7 +1303,7 @@ Public Class DrawPageUC
|
||||
If EgtGetFirstNameInGroup(EgtGetFirstPart(), NAME_INLOOP) = GDB_ID.NULL Then
|
||||
m_nSelectedLayer = EgtGetFirstNameInGroup(EgtGetFirstPart(), NAME_OUTLOOP)
|
||||
Else
|
||||
MessageTxBx.Text = EgtMsg(MSG_DRAWPAGEUC + 6) ' Selezionare un contorno
|
||||
MessageTxBx.Text = EgtMsg(90386) ' Selezionare un contorno
|
||||
MessageBrd.Background = Application.Current.FindResource("OmagCut_Green")
|
||||
' Aggiungo testi su lati già inclinati
|
||||
SideAngle.WriteSideAngleForNest(DrawScene.GetCtx())
|
||||
@@ -1332,7 +1369,7 @@ Public Class DrawPageUC
|
||||
If EgtGetFirstNameInGroup(EgtGetFirstPart(), NAME_INLOOP) = GDB_ID.NULL Then
|
||||
m_nSelectedLayer = EgtGetFirstNameInGroup(EgtGetFirstPart(), NAME_OUTLOOP)
|
||||
Else
|
||||
MessageTxBx.Text = EgtMsg(MSG_DRAWPAGEUC + 6) ' Selezionare un contorno
|
||||
MessageTxBx.Text = EgtMsg(90386) ' Selezionare un contorno
|
||||
MessageBrd.Background = Application.Current.FindResource("OmagCut_Green")
|
||||
End If
|
||||
' In ogni caso, nascondo layer delle misure
|
||||
@@ -1394,7 +1431,7 @@ Public Class DrawPageUC
|
||||
If EgtGetFirstNameInGroup(EgtGetFirstPart(), NAME_INLOOP) = GDB_ID.NULL Then
|
||||
m_nSelectedLayer = EgtGetFirstNameInGroup(EgtGetFirstPart(), NAME_OUTLOOP)
|
||||
Else
|
||||
MessageTxBx.Text = EgtMsg(MSG_DRAWPAGEUC + 6) ' Selezionare un contorno
|
||||
MessageTxBx.Text = EgtMsg(90386) ' Selezionare un contorno
|
||||
MessageBrd.Background = Application.Current.FindResource("OmagCut_Green")
|
||||
End If
|
||||
' In ogni caso, nascondo layer delle misure
|
||||
@@ -1452,7 +1489,7 @@ Public Class DrawPageUC
|
||||
DripCutBtn.IsEnabled = False
|
||||
MessageGrid.Visibility = Windows.Visibility.Hidden
|
||||
BackBtn.Visibility = Windows.Visibility.Hidden
|
||||
MessageTxBx.Text = EgtMsg(MSG_DRAWPAGEUC + 6) ' Selezionare un contorno
|
||||
MessageTxBx.Text = EgtMsg(90386) ' Selezionare un contorno
|
||||
MessageBrd.Background = Application.Current.FindResource("OmagCut_Green")
|
||||
' In ogni caso, nascondo layer delle misure
|
||||
Dim PartId As Integer = EgtGetFirstInGroup(GDB_ID.ROOT)
|
||||
@@ -1492,22 +1529,49 @@ Public Class DrawPageUC
|
||||
' Seleziono la Tab e la Page di apertura
|
||||
Select Case m_ActiveComponentPage
|
||||
Case Pages.MainComponent
|
||||
LeftButtonGrd.Children.Remove( m_MainComponentPage)
|
||||
Case Pages.SecondaryComponent
|
||||
LeftButtonGrd.Children.Remove( m_MainComponentPage.m_SecondaryComponentPage)
|
||||
Case Pages.InternalComponent
|
||||
LeftButtonGrd.Children.Remove( m_MainWindow.m_DrawPageUC.m_CompoDimension.m_InternalCompoPage)
|
||||
Case Pages.CompoDimension
|
||||
VariablesGrd.Children.Remove( m_CompoDimension)
|
||||
Case Pages.SideAngle
|
||||
VariablesGrd.Children.Remove( m_SideAngleUC)
|
||||
Case Pages.FiloTop
|
||||
VariablesGrd.Children.Remove(m_FiloTopUC)
|
||||
End Select
|
||||
LeftButtonGrd.Children.Remove(m_MainComponentPage)
|
||||
|
||||
Case Pages.SecondaryComponent
|
||||
LeftButtonGrd.Children.Remove(m_MainComponentPage.m_SecondaryComponentPage)
|
||||
|
||||
Case Pages.InternalComponent
|
||||
LeftButtonGrd.Children.Remove(m_MainWindow.m_DrawPageUC.m_CompoDimension.m_InternalCompoPage)
|
||||
|
||||
Case Pages.CompoDimension
|
||||
VariablesGrd.Children.Remove(m_CompoDimension)
|
||||
|
||||
Case Pages.SideAngle
|
||||
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
|
||||
ResetLuaVariables()
|
||||
|
||||
Try
|
||||
VariablesGrd.Children.Remove(m_CompoDimension)
|
||||
Catch ex As Exception
|
||||
Dim x As Boolean = True
|
||||
End Try
|
||||
|
||||
End Sub
|
||||
|
||||
Private Class CompoVar
|
||||
|
||||
+19
-18
@@ -1,11 +1,11 @@
|
||||
<UserControl x:Class="FiloTopUC"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="597.1" d:DesignWidth="255.9">
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="597.1" d:DesignWidth="255.9">
|
||||
|
||||
<!-- Definizione della Grid Laterale -->
|
||||
<Grid Name="VariablesCompoGrid" Grid.RowSpan="2">
|
||||
@@ -32,20 +32,21 @@
|
||||
|
||||
|
||||
<TextBlock Name="ParameterTxBl" Grid.Row="10" Text="Offset"
|
||||
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
|
||||
FontSize="{DynamicResource FontSize_LowerCaseCharacter}"/>
|
||||
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
|
||||
FontSize="{DynamicResource FontSize_LowerCaseCharacter}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="ParameterTxBx" Grid.Column="1" Grid.Row="10" Width="90"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
<TextBlock Name="Parameter2TxBl" Grid.Row="11" Text="Affondamento"
|
||||
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
|
||||
FontSize="{DynamicResource FontSize_LowerCaseCharacter}"/>
|
||||
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
|
||||
FontSize="{DynamicResource FontSize_LowerCaseCharacter}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="Parameter2TxBx" Grid.Column="1" Grid.Row="11" Width="90"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
<TextBlock Name="Parameter3TxBl" Grid.Row="12" Text="Arrotonda"
|
||||
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
|
||||
FontSize="{DynamicResource FontSize_LowerCaseCharacter}"/>
|
||||
<CheckBox Name="Parameter3ChBx" Grid.Row="12" Grid.Column="1" Style="{StaticResource OmagCut_CheckBox_Single}"
|
||||
HorizontalAlignment="Center" Margin="0,0,6,0"/>
|
||||
</Grid>
|
||||
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
|
||||
FontSize="{DynamicResource FontSize_LowerCaseCharacter}"/>
|
||||
<CheckBox Name="Parameter3ChBx" Grid.Row="12" Grid.Column="1"
|
||||
Style="{DynamicResource OmagCut_CheckBox_Single}"
|
||||
HorizontalAlignment="Center" Margin="0,0,6,0"/>
|
||||
</Grid>
|
||||
|
||||
</UserControl>
|
||||
|
||||
@@ -38,18 +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
|
||||
Parameter3TxBl.Text = EgtMsg(91138)
|
||||
ParameterTxBl.Text = EgtMsg(90460) ' Offset
|
||||
Parameter2TxBl.Text = EgtMsg(90461) ' Affondamento
|
||||
Parameter3TxBl.Text = EgtMsg(91138) ' Arrotonda
|
||||
|
||||
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
|
||||
@@ -58,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
|
||||
@@ -81,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
|
||||
@@ -102,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
|
||||
@@ -215,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
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
<UserControl x:Class="ImportPageUC"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="853.3" d:DesignWidth="1280" Initialized="ImportPage_Initialized" Loaded="ImportPage_Loaded" Unloaded="ImportPage_Unloaded">
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="853.3" d:DesignWidth="1280" Initialized="ImportPage_Initialized" Loaded="ImportPage_Loaded" Unloaded="ImportPage_Unloaded">
|
||||
|
||||
<!-- Definizione della ImportPage -->
|
||||
<Border>
|
||||
@@ -20,7 +20,7 @@
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
|
||||
|
||||
<!-- Definizione della Grid superiore per Button -->
|
||||
<Grid Name="UpperButtonGrid" Grid.Column="1" Grid.Row="0" >
|
||||
<Grid.ColumnDefinitions>
|
||||
@@ -33,15 +33,17 @@
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<ToggleButton Name="SideAngleBtn" Grid.Column="0"
|
||||
Style="{DynamicResource OmagCut_RightGrayYellowTextToggleButton}"/>
|
||||
Style="{DynamicResource OmagCut_RightGrayYellowTextToggleButton}"/>
|
||||
<ToggleButton Name="FiloTopBtn" Grid.Column="1"
|
||||
Style="{DynamicResource OmagCut_RightGrayYellowTextToggleButton}"/>
|
||||
Style="{DynamicResource OmagCut_RightGrayYellowTextToggleButton}"/>
|
||||
<ToggleButton Name="DripCutBtn" Grid.Column="2" Padding="0"
|
||||
Style="{DynamicResource OmagCut_RightGrayYellowTextToggleButton}"/>
|
||||
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}"/>
|
||||
Style="{DynamicResource OmagCut_RightGrayYellowTextToggleButton}"/>
|
||||
<Button Name="Cad2dBtn" Grid.Column="4" Padding="0"
|
||||
Style="{DynamicResource OmagCut_YellowTextButton}"/>
|
||||
Style="{DynamicResource OmagCut_YellowTextButton}"/>
|
||||
</Grid>
|
||||
|
||||
<!-- Definizione della Grid laterale -->
|
||||
@@ -54,25 +56,26 @@
|
||||
<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}"
|
||||
<TextBlock Name="FilePathTxBl" Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
<ListBox Name="FileListBox" Grid.Row="1" Grid.RowSpan="2"
|
||||
ItemTemplate="{DynamicResource DataTemplateItem}"
|
||||
ItemsSource="{Binding ItemList}"/>
|
||||
|
||||
<Grid Name="FinderGrd" Grid.Row="3" Margin="0,0,8,0">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="4*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<EgtWPFLib:EgtTextBox Name="FindTxBx" Grid.Column="0"
|
||||
Style="{DynamicResource OmagCut_LeftKeyboardTextBoxNoBorder}"/>
|
||||
<Button Name="ClearFindBtn" Grid.Column="1" Style="{DynamicResource OmagCut_GradientBlueIconButton}" Margin="0,6,2,6">
|
||||
<Image Source="{DynamicResource XImg}" Style="{StaticResource OmagCut_ButtonIcon}" Width="30" />
|
||||
</Button>
|
||||
</Grid>
|
||||
|
||||
<Grid Name="FinderGrd" Grid.Row="3" Margin="0,0,8,0">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="4*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<EgtWPFLib:EgtTextBox Name="FindTxBx" Grid.Column="0"
|
||||
Style="{DynamicResource OmagCut_LeftKeyboardTextBoxNoBorder}"/>
|
||||
<Button Name="ClearFindBtn" Grid.Column="1" Style="{DynamicResource OmagCut_GradientBlueIconButton}" Margin="0,6,2,6">
|
||||
<Image Source="{DynamicResource XImg}" Style="{DynamicResource OmagCut_ButtonIcon}" Width="30" />
|
||||
</Button>
|
||||
</Grid>
|
||||
|
||||
<Border Name="MessageBrd" Grid.Row="5" BorderThickness="0,1,0,0" BorderBrush="Gray">
|
||||
<TextBlock Name="MessageTxBx" TextAlignment="Center"
|
||||
Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</Border>
|
||||
|
||||
</Grid>
|
||||
@@ -112,24 +115,25 @@
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<TextBlock Name="PartNumTxBl" Grid.Column="0" Style="{DynamicResource OmagCut_CurrProjSummeryTextBlock}"
|
||||
TextAlignment="Right"/>
|
||||
<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}"/>
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
</Grid>
|
||||
|
||||
<Button Name="OkBtn" Grid.Column="10" Style="{DynamicResource OmagCut_GradientBlueIconButton}">
|
||||
<Image Source="{DynamicResource VImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
<Image Source="{DynamicResource VImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
|
||||
<Button Name="ExitBtn" Grid.Column="11" Style="{DynamicResource OmagCut_GradientBlueIconButton}">
|
||||
<Image Source="{DynamicResource XImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
<Image Source="{DynamicResource XImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
|
||||
|
||||
</Grid>
|
||||
|
||||
|
||||
</Grid>
|
||||
|
||||
|
||||
</Border>
|
||||
|
||||
|
||||
</UserControl>
|
||||
|
||||
+337
-98
@@ -1,7 +1,5 @@
|
||||
Imports System.Collections.ObjectModel
|
||||
Imports System.IO
|
||||
Imports System.IO
|
||||
Imports EgtUILib
|
||||
Imports System.Runtime.InteropServices
|
||||
|
||||
Public Class ImportPageUC
|
||||
|
||||
@@ -38,6 +36,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
|
||||
@@ -76,19 +76,20 @@ Public Class ImportPageUC
|
||||
Me.ImportPageGrid.Children.Add(ImportSceneHost)
|
||||
|
||||
'Imposto i messaggi letti dal file dei messaggi
|
||||
UseLayerBtn.Content = EgtMsg(MSG_IMPORTPAGEUC + 1) 'Usa layer - Use layers
|
||||
UseRegionBtn.Content = EgtMsg(MSG_IMPORTPAGEUC + 2) 'Usa regioni - Use regions
|
||||
UseClosedCurveBtn.Content = EgtMsg(MSG_IMPORTPAGEUC + 6) 'Usa curve chiuse - Use closed curves
|
||||
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
|
||||
PartNumTxBl.Text = EgtMsg(MSG_IMPORTPAGEUC + 15) 'Numero
|
||||
SideAngleBtn.Content = EgtMsg(MSG_IMPORTPAGEUC + 7) 'Inclina lati
|
||||
FiloTopBtn.Content = EgtMsg( 90400) 'Filo Top
|
||||
DripCutBtn.Content = EgtMsg(MSG_IMPORTPAGEUC + 8) 'Incidi da sotto
|
||||
DripDrillBtn.Content = EgtMsg(MSG_IMPORTPAGEUC + 14) 'Foro da sotto
|
||||
UseLayerBtn.Content = EgtMsg(90451) ' Usa layer - Use layers
|
||||
UseRegionBtn.Content = EgtMsg(90452) ' Usa regioni - Use regions
|
||||
UseClosedCurveBtn.Content = EgtMsg(90456) ' Usa curve chiuse - Use closed curves
|
||||
ResetBtn.Content = EgtMsg(90453) ' Reset
|
||||
mmBtn.Content = EgtMsg(90454) ' mm
|
||||
inchBtn.Content = EgtMsg(90455) ' inch
|
||||
OrderListBtn.Content = EgtMsg(90398) ' Dati Csv
|
||||
TopBtn.Content = EgtMsg(90384) ' Indica Lato Sopra
|
||||
PartNumTxBl.Text = EgtMsg(90465) ' Quantità
|
||||
SideAngleBtn.Content = EgtMsg(90457) ' Inclina lati
|
||||
FiloTopBtn.Content = EgtMsg(90400) ' Filo Top
|
||||
DripCutBtn.Content = EgtMsg(90458) ' Incidi da sotto
|
||||
EngraveBtn.Content = EgtMsg(91238) ' Engrave
|
||||
DripDrillBtn.Content = EgtMsg(90464) ' Foro da sotto
|
||||
Cad2dBtn.Content = "Cad 2d"
|
||||
|
||||
'Definizione del collegamento tra ItemList e ListBox1
|
||||
@@ -97,7 +98,6 @@ 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))
|
||||
@@ -159,10 +159,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()
|
||||
@@ -174,7 +178,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
|
||||
@@ -184,7 +188,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
|
||||
@@ -201,6 +205,8 @@ Public Class ImportPageUC
|
||||
PartNumTxBx.Text = "1"
|
||||
' disabilito ok
|
||||
OkBtn.IsEnabled = False
|
||||
' Azzero l'idice di parcheggio
|
||||
NewParkInd = 0
|
||||
End Sub
|
||||
|
||||
Private Sub LoadGridData()
|
||||
@@ -343,7 +349,12 @@ 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
|
||||
@@ -361,6 +372,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)
|
||||
@@ -400,7 +415,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
|
||||
@@ -416,7 +435,11 @@ 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
|
||||
@@ -429,12 +452,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
|
||||
|
||||
@@ -564,14 +587,14 @@ Public Class ImportPageUC
|
||||
EgtDeselectObj(nId)
|
||||
EgtDeselectObj(nLayId)
|
||||
Dim sLayName As String = ""
|
||||
If EgtGetName(nLayId, sLayName) AndAlso sLayName = NAME_INLOOP AndAlso EgtExistsInfo( nLayId, INFO_FILOTOP) Then
|
||||
EgtRemoveInfo( nLayId, INFO_FILOTOP)
|
||||
EgtRemoveInfo( nLayId, INFO_OFFSET)
|
||||
EgtRemoveInfo( nLayId, INFO_DEPTH)
|
||||
Dim nEntId As Integer = EgtGetFirstInGroup( nLayId)
|
||||
If EgtGetName(nLayId, sLayName) AndAlso sLayName = NAME_INLOOP AndAlso EgtExistsInfo(nLayId, INFO_FILOTOP) Then
|
||||
EgtRemoveInfo(nLayId, INFO_FILOTOP)
|
||||
EgtRemoveInfo(nLayId, INFO_OFFSET)
|
||||
EgtRemoveInfo(nLayId, INFO_DEPTH)
|
||||
Dim nEntId As Integer = EgtGetFirstInGroup(nLayId)
|
||||
While nEntId <> GDB_ID.NULL
|
||||
EgtSetColor(nEntId, New Color3d(127, 63, 0))
|
||||
nEntId = EgtGetNext( nEntId)
|
||||
nEntId = EgtGetNext(nEntId)
|
||||
End While
|
||||
m_DeselectListHole.Add(nLayId)
|
||||
m_SelListHole.Remove(nLayId)
|
||||
@@ -580,16 +603,16 @@ Public Class ImportPageUC
|
||||
Dim nLayId As Integer = GDB_ID.NULL
|
||||
EgtGetInfo(nId, "ID", nLayId)
|
||||
Dim sLayName As String = ""
|
||||
If EgtGetName( nLayId, sLayName) AndAlso sLayName = NAME_INLOOP Then
|
||||
EgtSelectObj( nId)
|
||||
EgtSelectObj( nLayId)
|
||||
EgtSetInfo( nLayId, INFO_FILOTOP, 1)
|
||||
EgtSetInfo( nLayId, INFO_OFFSET, m_FiloTopUC.FiloTopOffset)
|
||||
EgtSetInfo( nLayId, INFO_DEPTH, m_FiloTopUC.FiloTopDepth)
|
||||
Dim nEntId As Integer = EgtGetFirstInGroup( nLayId)
|
||||
If EgtGetName(nLayId, sLayName) AndAlso sLayName = NAME_INLOOP Then
|
||||
EgtSelectObj(nId)
|
||||
EgtSelectObj(nLayId)
|
||||
EgtSetInfo(nLayId, INFO_FILOTOP, 1)
|
||||
EgtSetInfo(nLayId, INFO_OFFSET, m_FiloTopUC.FiloTopOffset)
|
||||
EgtSetInfo(nLayId, INFO_DEPTH, m_FiloTopUC.FiloTopDepth)
|
||||
Dim nEntId As Integer = EgtGetFirstInGroup(nLayId)
|
||||
While nEntId <> GDB_ID.NULL
|
||||
EgtSetColor(nEntId, New Color3d(255, 255, 255))
|
||||
nEntId = EgtGetNext( nEntId)
|
||||
nEntId = EgtGetNext(nEntId)
|
||||
End While
|
||||
m_SelListHole.Add(nLayId)
|
||||
m_DeselectListHole.Remove(nLayId)
|
||||
@@ -615,7 +638,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
|
||||
@@ -638,7 +661,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)
|
||||
@@ -676,8 +699,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
|
||||
@@ -708,8 +735,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
|
||||
@@ -740,8 +771,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
|
||||
@@ -822,20 +857,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
|
||||
@@ -845,6 +898,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()
|
||||
@@ -917,21 +1044,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
|
||||
@@ -968,7 +1111,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
|
||||
@@ -1025,22 +1173,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
|
||||
@@ -1067,7 +1217,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
|
||||
@@ -1089,8 +1243,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
|
||||
@@ -1120,6 +1338,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
|
||||
@@ -1140,8 +1361,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
|
||||
@@ -1170,7 +1392,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
|
||||
@@ -1192,8 +1418,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
|
||||
@@ -1219,7 +1449,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
|
||||
@@ -1241,8 +1475,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
|
||||
@@ -1301,8 +1539,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
|
||||
@@ -1328,11 +1567,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
|
||||
@@ -1341,42 +1580,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
|
||||
@@ -1,10 +1,10 @@
|
||||
<UserControl x:Class="InternalComponentPageUC"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="768" d:DesignWidth="256">
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="768" d:DesignWidth="256">
|
||||
|
||||
<!-- Definizione della MainComponentPage -->
|
||||
<Grid Name="MainComponentPageGrid" Background="{DynamicResource OmagCut_Gray}">
|
||||
@@ -30,7 +30,7 @@
|
||||
</Grid.ColumnDefinitions>
|
||||
<Image Name="ImageCompo1" Grid.Column="0" />
|
||||
<TextBlock Name="LabelCompo1" Grid.Column="1"
|
||||
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</Grid>
|
||||
</Button>
|
||||
|
||||
@@ -42,11 +42,11 @@
|
||||
</Grid.ColumnDefinitions>
|
||||
<Image Name="ImageCompo2" Grid.Column="0" />
|
||||
<TextBlock Name="LabelCompo2" Grid.Column="1"
|
||||
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</Grid>
|
||||
</Button>
|
||||
|
||||
<Button Name="Compo3" Grid.Row="2" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Button Name="Compo3" Grid.Row="2" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="80"/>
|
||||
@@ -54,11 +54,11 @@
|
||||
</Grid.ColumnDefinitions>
|
||||
<Image Name="ImageCompo3" Grid.Column="0" />
|
||||
<TextBlock Name="LabelCompo3" Grid.Column="1"
|
||||
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</Grid>
|
||||
</Button>
|
||||
|
||||
<Button Name="Compo4" Grid.Row="3" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Button Name="Compo4" Grid.Row="3" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="80"/>
|
||||
@@ -66,11 +66,11 @@
|
||||
</Grid.ColumnDefinitions>
|
||||
<Image Name="ImageCompo4" Grid.Column="0" />
|
||||
<TextBlock Name="LabelCompo4" Grid.Column="1"
|
||||
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</Grid>
|
||||
</Button>
|
||||
|
||||
<Button Name="Compo5" Grid.Row="4" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Button Name="Compo5" Grid.Row="4" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="80"/>
|
||||
@@ -78,11 +78,11 @@
|
||||
</Grid.ColumnDefinitions>
|
||||
<Image Name="ImageCompo5" Grid.Column="0" />
|
||||
<TextBlock Name="LabelCompo5" Grid.Column="1"
|
||||
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</Grid>
|
||||
</Button>
|
||||
|
||||
<Button Name="Compo6" Grid.Row="5" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Button Name="Compo6" Grid.Row="5" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="80"/>
|
||||
@@ -90,11 +90,11 @@
|
||||
</Grid.ColumnDefinitions>
|
||||
<Image Name="ImageCompo6" Grid.Column="0" />
|
||||
<TextBlock Name="LabelCompo6" Grid.Column="1"
|
||||
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</Grid>
|
||||
</Button>
|
||||
|
||||
<Button Name="Compo7" Grid.Row="6" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Button Name="Compo7" Grid.Row="6" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="80"/>
|
||||
@@ -102,11 +102,11 @@
|
||||
</Grid.ColumnDefinitions>
|
||||
<Image Name="ImageCompo7" Grid.Column="0" />
|
||||
<TextBlock Name="LabelCompo7" Grid.Column="1"
|
||||
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</Grid>
|
||||
</Button>
|
||||
|
||||
<Button Name="Compo8" Grid.Row="7" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Button Name="Compo8" Grid.Row="7" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="80"/>
|
||||
@@ -114,29 +114,30 @@
|
||||
</Grid.ColumnDefinitions>
|
||||
<Image Name="ImageCompo8" Grid.Column="0" />
|
||||
<TextBlock Name="LabelCompo8" Grid.Column="1"
|
||||
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</Grid>
|
||||
</Button>
|
||||
|
||||
<Button Name="Compo9" Grid.Row="8" Grid.ColumnSpan="2" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Grid>
|
||||
<Image Name="ImageCompo9" Source="{DynamicResource NumericKeyboardArrowImg}" />
|
||||
<!--"/Resources/NumericKeyboardArrow.png"/>-->
|
||||
<TextBlock Name="LabelCompo9" Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</Grid>
|
||||
</Button>
|
||||
<Button Name="Compo9" Grid.Row="8" Grid.ColumnSpan="2" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Grid>
|
||||
<Image Name="ImageCompo9" Source="{DynamicResource NumericKeyboardArrowImg}" />
|
||||
<!--"/Resources/NumericKeyboardArrow.png"/>-->
|
||||
<TextBlock Name="LabelCompo9"
|
||||
Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</Grid>
|
||||
</Button>
|
||||
|
||||
<Grid Grid.Row="9">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid Grid.Row="9">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Button Name="BackBtn" Grid.Column="1" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource NumericKeyboardArrowImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
|
||||
</Grid>
|
||||
<Button Name="BackBtn" Grid.Column="1" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource NumericKeyboardArrowImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
|
||||
</Grid>
|
||||
|
||||
</Grid>
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ Public Class InternalComponentPageUC
|
||||
' bottone per selezionare la seconda pagina di componenti interni
|
||||
Compo9.SetValue(Grid.ColumnProperty, 0)
|
||||
Compo9.SetValue(Grid.ColumnSpanProperty, 2)
|
||||
LabelCompo9.Text = EgtMsg(MSG_COMPONENTPAGEUC + 9) ' Altri
|
||||
LabelCompo9.Text = EgtMsg(90409) ' Altri
|
||||
ImageCompo9.Visibility = Windows.Visibility.Hidden
|
||||
LabelCompo9.Visibility = Windows.Visibility.Visible
|
||||
' Se i componenti interni sono più di 8 viene visualizzato il bottone "Altri" altrimenti no
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
<UserControl x:Class="MainComponentPageUC"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="768" d:DesignWidth="256">
|
||||
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="768" d:DesignWidth="256">
|
||||
|
||||
<!-- Definizione della MainComponentPage -->
|
||||
<Grid Name="MainComponentPageGrid">
|
||||
<Grid.RowDefinitions>
|
||||
@@ -20,9 +20,9 @@
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
|
||||
<!-- Attenzione! Questi Button devono avere lo stesso nome dei componenti nel file Ini -->
|
||||
<Button Name="Compo1" Grid.Row="0" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Button Name="Compo1" Grid.Row="0" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="80"/>
|
||||
@@ -30,11 +30,11 @@
|
||||
</Grid.ColumnDefinitions>
|
||||
<Image Name="ImageCompo1" Grid.Column="0" />
|
||||
<TextBlock Name="LabelCompo1" Grid.Column="1"
|
||||
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</Grid>
|
||||
</Button>
|
||||
|
||||
<Button Name="Compo2" Grid.Row="1" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Button Name="Compo2" Grid.Row="1" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="80"/>
|
||||
@@ -42,11 +42,11 @@
|
||||
</Grid.ColumnDefinitions>
|
||||
<Image Name="ImageCompo2" Grid.Column="0" />
|
||||
<TextBlock Name="LabelCompo2" Grid.Column="1"
|
||||
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</Grid>
|
||||
</Button>
|
||||
|
||||
<Button Name="Compo3" Grid.Row="2" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Button Name="Compo3" Grid.Row="2" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="80"/>
|
||||
@@ -54,23 +54,23 @@
|
||||
</Grid.ColumnDefinitions>
|
||||
<Image Name="ImageCompo3" Grid.Column="0" />
|
||||
<TextBlock Name="LabelCompo3" Grid.Column="1"
|
||||
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</Grid>
|
||||
</Button>
|
||||
|
||||
<Button Name="Compo4" Grid.Row="3" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Button Name="Compo4" Grid.Row="3" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="80"/>
|
||||
<ColumnDefinition Width="140"/>
|
||||
<ColumnDefinition Width="80"/>
|
||||
<ColumnDefinition Width="140"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Image Name="ImageCompo4" Grid.Column="0" />
|
||||
<TextBlock Name="LabelCompo4" Grid.Column="1"
|
||||
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</Grid>
|
||||
</Button>
|
||||
|
||||
<Button Name="Compo5" Grid.Row="4" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Button Name="Compo5" Grid.Row="4" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="80"/>
|
||||
@@ -78,11 +78,11 @@
|
||||
</Grid.ColumnDefinitions>
|
||||
<Image Name="ImageCompo5" Grid.Column="0" />
|
||||
<TextBlock Name="LabelCompo5" Grid.Column="1"
|
||||
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</Grid>
|
||||
</Button>
|
||||
|
||||
<Button Name="Compo6" Grid.Row="5" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Button Name="Compo6" Grid.Row="5" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="80"/>
|
||||
@@ -90,11 +90,11 @@
|
||||
</Grid.ColumnDefinitions>
|
||||
<Image Name="ImageCompo6" Grid.Column="0" />
|
||||
<TextBlock Name="LabelCompo6" Grid.Column="1"
|
||||
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</Grid>
|
||||
</Button>
|
||||
|
||||
<Button Name="Compo7" Grid.Row="6" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Button Name="Compo7" Grid.Row="6" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="80"/>
|
||||
@@ -102,11 +102,11 @@
|
||||
</Grid.ColumnDefinitions>
|
||||
<Image Name="ImageCompo7" Grid.Column="0" />
|
||||
<TextBlock Name="LabelCompo7" Grid.Column="1"
|
||||
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</Grid>
|
||||
</Button>
|
||||
|
||||
<Button Name="Compo8" Grid.Row="7" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Button Name="Compo8" Grid.Row="7" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="80"/>
|
||||
@@ -114,7 +114,7 @@
|
||||
</Grid.ColumnDefinitions>
|
||||
<Image Name="ImageCompo8" Grid.Column="0" />
|
||||
<TextBlock Name="LabelCompo8" Grid.Column="1"
|
||||
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</Grid>
|
||||
</Button>
|
||||
|
||||
@@ -123,15 +123,16 @@
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Button Name="Compo9" Grid.ColumnSpan="2" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Button Name="Compo9" Grid.ColumnSpan="2" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Grid>
|
||||
<Image Name="ImageCompo9" Source="{DynamicResource NumericKeyboardArrowImg}" />
|
||||
<!--Source="/Resources/NumericKeyboardArrow.png"/>-->
|
||||
<TextBlock Name="LabelCompo9" Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
<Image Name="ImageCompo9" Source="{DynamicResource NumericKeyboardArrowImg}" />
|
||||
<!--Source="/Resources/NumericKeyboardArrow.png"/>-->
|
||||
<TextBlock Name="LabelCompo9"
|
||||
Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</Grid>
|
||||
</Button>
|
||||
</Grid>
|
||||
|
||||
|
||||
</Grid>
|
||||
|
||||
|
||||
</UserControl>
|
||||
|
||||
@@ -25,7 +25,7 @@ Public Class MainComponentPageUC
|
||||
m_SecondaryComponentPage.SetValue(Grid.RowSpanProperty, 4)
|
||||
|
||||
' Leggo messaggi da file ini
|
||||
LabelCompo9.Text = EgtMsg(MSG_COMPONENTPAGEUC + 9)
|
||||
LabelCompo9.Text = EgtMsg(90409) ' Altri
|
||||
|
||||
End Sub
|
||||
|
||||
@@ -33,10 +33,26 @@ 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
|
||||
@@ -303,7 +319,7 @@ Public Class MainComponentPageUC
|
||||
|
||||
'verifico presenza testo
|
||||
If nCompoName > 0 Then
|
||||
Dim sCompoName As String = EgtMsg(MSG_COMPONENTPAGEUC + nCompoName)
|
||||
Dim sCompoName As String = EgtMsg(90400 + nCompoName)
|
||||
'verifico presenza immagine
|
||||
If sCompoImage.Length > 0 Then
|
||||
'se la lunghezza del testo è maggiore di 15 lo taglio
|
||||
@@ -378,7 +394,7 @@ Public Class MainComponentPageUC
|
||||
|
||||
'verifico presenza testo
|
||||
If nCompoName > 0 Then
|
||||
Dim sCompoName As String = EgtMsg(MSG_COMPONENTPAGEUC + nCompoName)
|
||||
Dim sCompoName As String = EgtMsg(90400 + nCompoName)
|
||||
'verifico presenza immagine
|
||||
If sCompoImage.Length > 0 Then
|
||||
'se la lunghezza del testo è maggiore di 15 lo taglio
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
<UserControl x:Class="SecondaryComponentPageUC"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="768" d:DesignWidth="256" Loaded="SecondaryComponentPage_Loaded">
|
||||
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="768" d:DesignWidth="256" Loaded="SecondaryComponentPage_Loaded">
|
||||
|
||||
<!-- Definizione della SecondaryComponentPage -->
|
||||
<Grid Name="SecondaryComponentPageGrid">
|
||||
<Grid.RowDefinitions>
|
||||
@@ -20,7 +20,7 @@
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
|
||||
<!-- Attenzione! Questi Button devono avere lo stesso nome dei componenti nel file Ini -->
|
||||
<Button Name="Compo1" Grid.Row="0" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Grid>
|
||||
@@ -30,7 +30,7 @@
|
||||
</Grid.ColumnDefinitions>
|
||||
<Image Name="ImageCompo1" Grid.Column="0" />
|
||||
<TextBlock Name="LabelCompo1" Grid.Column="1"
|
||||
Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</Grid>
|
||||
</Button>
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
|
||||
<Image Name="ImageCompo2" Grid.Column="0" />
|
||||
<TextBlock Name="LabelCompo2" Grid.Column="1"
|
||||
Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</Grid>
|
||||
</Button>
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
</Grid.ColumnDefinitions>
|
||||
<Image Name="ImageCompo3" Grid.Column="0" />
|
||||
<TextBlock Name="LabelCompo3" Grid.Column="1"
|
||||
Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</Grid>
|
||||
</Button>
|
||||
|
||||
@@ -67,7 +67,7 @@
|
||||
</Grid.ColumnDefinitions>
|
||||
<Image Name="ImageCompo4" Grid.Column="0" />
|
||||
<TextBlock Name="LabelCompo4" Grid.Column="1"
|
||||
Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</Grid>
|
||||
</Button>
|
||||
|
||||
@@ -79,7 +79,7 @@
|
||||
</Grid.ColumnDefinitions>
|
||||
<Image Name="ImageCompo5" Grid.Column="0" />
|
||||
<TextBlock Name="LabelCompo5" Grid.Column="1"
|
||||
Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</Grid>
|
||||
</Button>
|
||||
|
||||
@@ -91,7 +91,7 @@
|
||||
</Grid.ColumnDefinitions>
|
||||
<Image Name="ImageCompo6" Grid.Column="0" />
|
||||
<TextBlock Name="LabelCompo6" Grid.Column="1"
|
||||
Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</Grid>
|
||||
</Button>
|
||||
|
||||
@@ -103,7 +103,7 @@
|
||||
</Grid.ColumnDefinitions>
|
||||
<Image Name="ImageCompo7" Grid.Column="0" />
|
||||
<TextBlock Name="LabelCompo7" Grid.Column="1"
|
||||
Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</Grid>
|
||||
</Button>
|
||||
|
||||
@@ -115,7 +115,7 @@
|
||||
</Grid.ColumnDefinitions>
|
||||
<Image Name="ImageCompo8" Grid.Column="0" />
|
||||
<TextBlock Name="LabelCompo8" Grid.Column="1"
|
||||
Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</Grid>
|
||||
</Button>
|
||||
|
||||
@@ -127,10 +127,10 @@
|
||||
</Grid.ColumnDefinitions>
|
||||
<Image Name="ImageCompo9" Grid.Column="0" />
|
||||
<TextBlock Name="LabelCompo9" Grid.Column="1"
|
||||
Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</Grid>
|
||||
</Button>
|
||||
|
||||
|
||||
<Grid Grid.Row="9">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
@@ -138,11 +138,11 @@
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Button Name="BackBtn" Grid.Column="1" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource NumericKeyboardArrowImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
<Image Source="{DynamicResource NumericKeyboardArrowImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
|
||||
|
||||
</Grid>
|
||||
|
||||
|
||||
</Grid>
|
||||
|
||||
|
||||
</UserControl>
|
||||
|
||||
@@ -68,7 +68,7 @@ Public Class SecondaryComponentPageUC
|
||||
|
||||
'verifico presenza testo
|
||||
If nCompoName > 0 Then
|
||||
Dim sCompoName As String = EgtMsg(MSG_COMPONENTPAGEUC + nCompoName)
|
||||
Dim sCompoName As String = EgtMsg(90400 + nCompoName)
|
||||
'verifico presenza immagine
|
||||
If sCompoImage.Length > 0 Then
|
||||
'se la lunghezza del testo è maggiore di 20 lo taglio
|
||||
@@ -248,5 +248,5 @@ Public Class SecondaryComponentPageUC
|
||||
m_MainWindow.m_DrawPageUC.LeftButtonGrd.Children.Add(m_MainComponentPage)
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
End Class
|
||||
|
||||
@@ -226,6 +226,10 @@ Module SideAngle
|
||||
EgtSetInfo(EntId, INFO_SIDE_ANGLE, dAng)
|
||||
EgtSetInfo(EntId, INFO_ORIG_SIDE_ANGLE, dAng)
|
||||
EgtSetInfo(EntId, INFO_HEEL, dHeel)
|
||||
Dim sSawingTilted As String = m_MainWindow.m_CurrentMachine.sCurrSawingTilted
|
||||
If Not String.IsNullOrEmpty(sSawingTilted) Then
|
||||
EgtSetInfo(EntId, DEF_MACHINING_TILTED, sSawingTilted)
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
@@ -0,0 +1,83 @@
|
||||
<Window x:Class="SideAngleOneForAllWindow"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
|
||||
FontFamily="{DynamicResource OmagCut_Font}"
|
||||
Title="ChooseTool" Height="255.9" Width="426.6" WindowStyle="None"
|
||||
ResizeMode="NoResize" ShowInTaskbar="False" AllowsTransparency="True"
|
||||
Background="Transparent">
|
||||
|
||||
<Border Style="{DynamicResource OmagCut_Border}">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
<ColumnDefinition Width="4*"/>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.7*"/>
|
||||
<RowDefinition Height="0.3*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<TextBlock Name="TitleTxBl"
|
||||
Grid.ColumnSpan="3"
|
||||
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||
<Grid Grid.Row="1"
|
||||
Grid.Column="1">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Text="A °"
|
||||
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
|
||||
FontSize="{DynamicResource FontSize_LowerCaseCharacter}"/>
|
||||
<TextBlock Grid.Column="1"
|
||||
Text="T"
|
||||
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
|
||||
FontSize="{DynamicResource FontSize_LowerCaseCharacter}"/>
|
||||
<ComboBox Grid.Row="1"
|
||||
Name="SideAngleOneForAllCBx"
|
||||
Margin="10,0,10,0">
|
||||
<ComboBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding}" FontSize="20"/>
|
||||
</DataTemplate>
|
||||
</ComboBox.ItemTemplate>
|
||||
</ComboBox>
|
||||
<ComboBox Grid.Row="1"
|
||||
Grid.Column="1"
|
||||
Name="SideHeelOneForAllCBx"
|
||||
Margin="10,0,10,0">
|
||||
<ComboBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding}" FontSize="20"/>
|
||||
</DataTemplate>
|
||||
</ComboBox.ItemTemplate>
|
||||
</ComboBox>
|
||||
</Grid>
|
||||
|
||||
<Grid Name="ButtonsGrid" Grid.Column="1" Grid.Row="3" Grid.RowSpan="1">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Button Name="OkBtn" Grid.Column="1" Style="{DynamicResource OmagCut_GradientBlueIconButton}">
|
||||
<Image Source="{DynamicResource VImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="ExitBtn" Grid.Column="3" Style="{DynamicResource OmagCut_GradientBlueIconButton}"
|
||||
IsCancel="True">
|
||||
<Image Source="{DynamicResource XImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Border>
|
||||
</Window>
|
||||
@@ -0,0 +1,20 @@
|
||||
Public Class SideAngleOneForAllWindow
|
||||
|
||||
Sub New()
|
||||
|
||||
' La chiamata è richiesta dalla finestra di progettazione.
|
||||
InitializeComponent()
|
||||
|
||||
' Aggiungere le eventuali istruzioni di inizializzazione dopo la chiamata a InitializeComponent().
|
||||
TitleTxBl.Text = EgtUILib.EgtMsg(91253) ' Seleziona Angolo e Tallone
|
||||
End Sub
|
||||
|
||||
Private Sub OkBtn_Click(sender As Object, e As RoutedEventArgs) Handles OkBtn.Click
|
||||
DialogResult = True
|
||||
End Sub
|
||||
|
||||
Private Sub ExitBtn_Click(sender As Object, e As RoutedEventArgs) Handles ExitBtn.Click
|
||||
DialogResult = False
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
+135
-126
@@ -1,17 +1,17 @@
|
||||
<UserControl x:Class="SideAngleUC"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="636.9" d:DesignWidth="255.9">
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="636.9" d:DesignWidth="255.9">
|
||||
|
||||
<!-- Definizione della Grid Laterale -->
|
||||
<Grid Name="VariablesCompoGrid" Grid.RowSpan="2">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1.2*"/>
|
||||
<ColumnDefinition Width="0.3*"/>
|
||||
<ColumnDefinition Width="0.3*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
@@ -34,182 +34,191 @@
|
||||
<RowDefinition Height="0.5*"/>-->
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<Grid>
|
||||
<Grid Name="SideAngleGrid" Grid.ColumnSpan="2">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="0.4*"/>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
<ColumnDefinition Width="0.4*"/>
|
||||
<!--<ColumnDefinition Width="0.4*"/>-->
|
||||
<ColumnDefinition Width="0.8*"/>
|
||||
<ColumnDefinition Width="0.8*"/>
|
||||
<ColumnDefinition Width="0.8*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Button Name="PrevBtn" Grid.Column="1" Margin="4,0,4,0" Padding="0" Content="<" Style="{StaticResource OmagCut_YellowTextButton}"/>
|
||||
<Button Name="NextBtn" Grid.Column="2" Margin="4,0,4,0" Padding="0" Content=">" Style="{StaticResource OmagCut_YellowTextButton}"/>
|
||||
<Button Name="PrevBtn" Grid.Column="0" Margin="2,0,2,0" Padding="0" Content="<" Style="{DynamicResource OmagCut_YellowTextButton}"/>
|
||||
<Button Name="NextBtn" Grid.Column="1" Margin="2,0,2,0" Padding="0" Content=">" Style="{DynamicResource OmagCut_YellowTextButton}"/>
|
||||
<CheckBox Name="SideAngleChBx" Grid.Column="2" Margin="2,0,0,0" Padding="0"/>
|
||||
</Grid>
|
||||
|
||||
<TextBlock Name="SideAngleBl" Grid.Row="0" Grid.Column="2" Text="A °"
|
||||
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
|
||||
FontSize="{DynamicResource FontSize_LowerCaseCharacter}"/>
|
||||
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
|
||||
FontSize="{DynamicResource FontSize_LowerCaseCharacter}"/>
|
||||
|
||||
<TextBlock Name="HeelBl" Grid.Row="0" Grid.Column="3" Text="T"
|
||||
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
|
||||
FontSize="{DynamicResource FontSize_LowerCaseCharacter}"/>
|
||||
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
|
||||
FontSize="{DynamicResource FontSize_LowerCaseCharacter}"/>
|
||||
|
||||
<TextBlock Name="Entity1" Grid.Row="1" Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||
<TextBlock Name="NewEntity" Grid.Row="1" Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||
<CheckBox Name="NewA1" Grid.Column="1" Grid.Row="1" Height="30" Width="40" HorizontalAlignment="Right"
|
||||
Margin="-20,0,0,0"/>
|
||||
<EgtWPFLib:EgtTextBox Name="NewA1TxBx" Grid.Column="2" Grid.Row="1" Width="60" IsLength="False"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="NewH1TxBx" Grid.Column="3" Grid.Row="1" Width="60"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
|
||||
<TextBlock Name="Entity1" Grid.Row="1" Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||
<CheckBox Name="A1" Grid.Column="1" Grid.Row="1" Height="30" Width="40" HorizontalAlignment="Right"
|
||||
Margin="-20,0,0,0"/>
|
||||
Margin="-20,0,0,0"/>
|
||||
<EgtWPFLib:EgtTextBox Name="A1TxBx" Grid.Column="2" Grid.Row="1" Width="60" IsLength="False"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="H1TxBx" Grid.Column="3" Grid.Row="1" Width="60"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
|
||||
<TextBlock Name="Entity2" Grid.Row="2" Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||
<TextBlock Name="Entity2" Grid.Row="2" Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||
<CheckBox Name="A2" Grid.Column="1" Grid.Row="2" Height="30" Width="40" HorizontalAlignment="Right"
|
||||
Margin="-20,0,0,0"/>
|
||||
Margin="-20,0,0,0"/>
|
||||
<EgtWPFLib:EgtTextBox Name="A2TxBx" Grid.Column="2" Grid.Row="2" Width="60" IsLength="False"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="H2TxBx" Grid.Column="3" Grid.Row="2" Width="60"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
|
||||
<TextBlock Name="Entity3" Grid.Row="3" Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||
<TextBlock Name="Entity3" Grid.Row="3" Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||
<CheckBox Name="A3" Grid.Column="1" Grid.Row="3" Height="30" Width="40" HorizontalAlignment="Right"
|
||||
Margin="-20,0,0,0"/>
|
||||
Margin="-20,0,0,0"/>
|
||||
<EgtWPFLib:EgtTextBox Name="A3TxBx" Grid.Column="2" Grid.Row="3" Width="60" IsLength="False"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="H3TxBx" Grid.Column="3" Grid.Row="3" Width="60"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
|
||||
<TextBlock Name="Entity4" Grid.Row="4" Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||
<TextBlock Name="Entity4" Grid.Row="4" Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||
<CheckBox Name="A4" Grid.Column="1" Grid.Row="4" Height="30" Width="40" HorizontalAlignment="Right"
|
||||
Margin="-20,0,0,0"/>
|
||||
Margin="-20,0,0,0"/>
|
||||
<EgtWPFLib:EgtTextBox Name="A4TxBx" Grid.Column="2" Grid.Row="4" Width="60" IsLength="False"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="H4TxBx" Grid.Column="3" Grid.Row="4" Width="60"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
|
||||
<TextBlock Name="Entity5" Grid.Row="5" Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||
<TextBlock Name="Entity5" Grid.Row="5" Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||
<CheckBox Name="A5" Grid.Column="1" Grid.Row="5" Height="30" Width="40" HorizontalAlignment="Right"
|
||||
Margin="-20,0,0,0"/>
|
||||
Margin="-20,0,0,0"/>
|
||||
<EgtWPFLib:EgtTextBox Name="A5TxBx" Grid.Column="2" Grid.Row="5" Width="60" IsLength="False"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="H5TxBx" Grid.Column="3" Grid.Row="5" Width="60"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
|
||||
<TextBlock Name="Entity6" Grid.Row="6" Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||
<TextBlock Name="Entity6" Grid.Row="6" Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||
<CheckBox Name="A6" Grid.Column="1" Grid.Row="6" Height="30" Width="40" HorizontalAlignment="Right"
|
||||
Margin="-20,0,0,0"/>
|
||||
Margin="-20,0,0,0"/>
|
||||
<EgtWPFLib:EgtTextBox Name="A6TxBx" Grid.Column="2" Grid.Row="6" Width="60" IsLength="False"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="H6TxBx" Grid.Column="3" Grid.Row="6" Width="60"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
|
||||
<TextBlock Name="Entity7" Grid.Row="7" Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||
<TextBlock Name="Entity7" Grid.Row="7" Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||
<CheckBox Name="A7" Grid.Column="1" Grid.Row="7" Height="30" Width="40" HorizontalAlignment="Right"
|
||||
Margin="-20,0,0,0"/>
|
||||
Margin="-20,0,0,0"/>
|
||||
<EgtWPFLib:EgtTextBox Name="A7TxBx" Grid.Column="2" Grid.Row="7" Width="60" IsLength="False"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="H7TxBx" Grid.Column="3" Grid.Row="7" Width="60"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
|
||||
<TextBlock Name="Entity8" Grid.Row="8" Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||
<TextBlock Name="Entity8" Grid.Row="8" Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||
<CheckBox Name="A8" Grid.Column="1" Grid.Row="8" Height="30" Width="40" HorizontalAlignment="Right"
|
||||
Margin="-20,0,0,0"/>
|
||||
Margin="-20,0,0,0"/>
|
||||
<EgtWPFLib:EgtTextBox Name="A8TxBx" Grid.Column="2" Grid.Row="8" Width="60" IsLength="False"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="H8TxBx" Grid.Column="3" Grid.Row="8" Width="60"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
|
||||
<TextBlock Name="Entity9" Grid.Row="9" Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||
<TextBlock Name="Entity9" Grid.Row="9" Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||
<CheckBox Name="A9" Grid.Column="1" Grid.Row="9" Height="30" Width="40" HorizontalAlignment="Right"
|
||||
Margin="-20,0,0,0"/>
|
||||
Margin="-20,0,0,0"/>
|
||||
<EgtWPFLib:EgtTextBox Name="A9TxBx" Grid.Column="2" Grid.Row="9" Width="60" IsLength="False"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="H9TxBx" Grid.Column="3" Grid.Row="9" Width="60"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
|
||||
<TextBlock Name="Entity10" Grid.Row="10" Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||
<TextBlock Name="Entity10" Grid.Row="10" Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||
<CheckBox Name="A10" Grid.Column="1" Grid.Row="10" Height="30" Width="40" HorizontalAlignment="Right"
|
||||
Margin="-20,0,0,0"/>
|
||||
Margin="-20,0,0,0"/>
|
||||
<EgtWPFLib:EgtTextBox Name="A10TxBx" Grid.Column="2" Grid.Row="10" Width="60" IsLength="False"
|
||||
Margin="0,0,0,-2"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="H10TxBx" Grid.Column="3" Grid.Row="10" Width="60"
|
||||
Margin="0,0,0,-2"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
|
||||
<Grid Grid.Column="0" Grid.Row="12" Grid.ColumnSpan="4" >
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1.5*"/>
|
||||
<ColumnDefinition Width="0.3*"/>
|
||||
<ColumnDefinition Width="0.6*"/>
|
||||
<ColumnDefinition Width="0.6*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="0.9*"/>
|
||||
<RowDefinition Height="0.9*"/>
|
||||
<RowDefinition Height="0.9*"/>
|
||||
<RowDefinition Height="0.9*"/>
|
||||
<RowDefinition Height="0.9*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1.5*"/>
|
||||
<ColumnDefinition Width="0.3*"/>
|
||||
<ColumnDefinition Width="0.6*"/>
|
||||
<ColumnDefinition Width="0.6*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="0.9*"/>
|
||||
<RowDefinition Height="0.9*"/>
|
||||
<RowDefinition Height="0.9*"/>
|
||||
<RowDefinition Height="0.9*"/>
|
||||
<RowDefinition Height="0.9*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<TextBlock Name="Parameter1TxBl" Grid.Row="0" Grid.ColumnSpan="2"
|
||||
Text="Offset"
|
||||
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
|
||||
FontSize="{DynamicResource FontSize_LowerCaseCharacter}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="Parameter1TxBx"
|
||||
Grid.Column="2" Grid.ColumnSpan="2" Grid.Row="0"
|
||||
Width="85" Height="30"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
<TextBlock Name="Parameter1TxBl" Grid.Row="0" Grid.ColumnSpan="2"
|
||||
Text="Offset"
|
||||
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
|
||||
FontSize="{DynamicResource FontSize_LowerCaseCharacter}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="Parameter1TxBx"
|
||||
Grid.Column="2" Grid.ColumnSpan="2" Grid.Row="0"
|
||||
Width="85" Height="30"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
|
||||
<TextBlock Name="Parameter2TxBl" Grid.Row="1" Grid.ColumnSpan="2"
|
||||
Text="Offset2"
|
||||
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
|
||||
FontSize="{DynamicResource FontSize_LowerCaseCharacter}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="Parameter2TxBx"
|
||||
Grid.Column="2" Grid.ColumnSpan="2" Grid.Row="1" Width="85"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
<UniformGrid Rows="1" Grid.Column="2" Grid.Row="1" Grid.ColumnSpan="2" Width="90" >
|
||||
<EgtWPFLib:EgtTextBox Name="Parameter2aTxBx"
|
||||
Grid.Column="2" Grid.Row="12"
|
||||
Width="40" Height="30" IsLength="False"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="Parameter2bTxBx"
|
||||
Grid.Column="3" Grid.Row="12"
|
||||
Width="40" Height="30"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
</UniformGrid>
|
||||
<TextBlock Name="Parameter2TxBl" Grid.Row="1" Grid.ColumnSpan="2"
|
||||
Text="Offset2"
|
||||
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
|
||||
FontSize="{DynamicResource FontSize_LowerCaseCharacter}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="Parameter2TxBx"
|
||||
Grid.Column="2" Grid.ColumnSpan="2" Grid.Row="1" Width="85"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
<UniformGrid Rows="1" Grid.Column="2" Grid.Row="1" Grid.ColumnSpan="2" Width="90" >
|
||||
<EgtWPFLib:EgtTextBox Name="Parameter2aTxBx"
|
||||
Grid.Column="2" Grid.Row="12"
|
||||
Width="40" Height="30" IsLength="False"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="Parameter2bTxBx"
|
||||
Grid.Column="3" Grid.Row="12"
|
||||
Width="40" Height="30"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
</UniformGrid>
|
||||
|
||||
|
||||
<TextBlock Name="Parameter3TxBl" Grid.Row="2" Grid.ColumnSpan="2"
|
||||
Text="Affondamento"
|
||||
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
|
||||
FontSize="{DynamicResource FontSize_LowerCaseCharacter}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="Parameter3TxBx"
|
||||
Grid.Column="2" Grid.ColumnSpan="2" Grid.Row="2"
|
||||
Margin="0,0,0,-2"
|
||||
Width="85" Height="30"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
<TextBlock Name="Parameter3TxBl" Grid.Row="2" Grid.ColumnSpan="2"
|
||||
Text="Affondamento"
|
||||
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
|
||||
FontSize="{DynamicResource FontSize_LowerCaseCharacter}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="Parameter3TxBx"
|
||||
Grid.Column="2" Grid.ColumnSpan="2" Grid.Row="2"
|
||||
Margin="0,0,0,-2"
|
||||
Width="85" Height="30"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
|
||||
<TextBlock Name="Parameter4TxBl" Grid.Row="3" Grid.ColumnSpan="2"
|
||||
Text="Accorciamento"
|
||||
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
|
||||
FontSize="{DynamicResource FontSize_LowerCaseCharacter}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="Parameter4TxBx"
|
||||
Grid.Column="2" Grid.ColumnSpan="2" Grid.Row="3"
|
||||
Margin="0,0,0,-2"
|
||||
Width="85" Height="30"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
<TextBlock Name="Parameter5TxBl" Grid.Row="4" Grid.ColumnSpan="2"
|
||||
Text="Angolo"
|
||||
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
|
||||
FontSize="{DynamicResource FontSize_LowerCaseCharacter}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="Parameter5TxBx"
|
||||
Grid.Column="2" Grid.ColumnSpan="2" Grid.Row="4"
|
||||
Margin="0,0,0,-2"
|
||||
Width="85" Height="30" IsLength="False"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
<TextBlock Name="Parameter4TxBl" Grid.Row="3" Grid.ColumnSpan="2"
|
||||
Text="Accorciamento"
|
||||
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
|
||||
FontSize="{DynamicResource FontSize_LowerCaseCharacter}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="Parameter4TxBx"
|
||||
Grid.Column="2" Grid.ColumnSpan="2" Grid.Row="3"
|
||||
Margin="0,0,0,-2"
|
||||
Width="85" Height="30"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
<TextBlock Name="Parameter5TxBl" Grid.Row="4" Grid.ColumnSpan="2"
|
||||
Text="Angolo"
|
||||
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
|
||||
FontSize="{DynamicResource FontSize_LowerCaseCharacter}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="Parameter5TxBx"
|
||||
Grid.Column="2" Grid.ColumnSpan="2" Grid.Row="4"
|
||||
Margin="0,0,0,-2"
|
||||
Width="85" Height="30" IsLength="False"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
||||
<!--<TextBlock Name="Parameter1TxBl" Grid.Row="11" Text="Offset"
|
||||
<!--<TextBlock Name="Parameter1TxBl" Grid.Row="11" Text="Offset"
|
||||
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
|
||||
FontSize="{DynamicResource FontSize_LowerCaseCharacter}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="Parameter1TxBx" Grid.Column="1" Grid.ColumnSpan="3" Grid.Row="11" Width="90"
|
||||
|
||||
+249
-42
@@ -51,10 +51,10 @@ Public Class SideAngleUC
|
||||
|
||||
' Imposto messaggi a fondo pagina
|
||||
If m_Mode <> ModeOpt.SIDEANGLE Then
|
||||
Parameter1TxBl.Text = EgtMsg(MSG_IMPORTPAGEUC + 10) ' Offset
|
||||
Parameter2TxBl.Text = EgtMsg(MSG_IMPORTPAGEUC + 16) ' Offset2
|
||||
Parameter3TxBl.Text = EgtMsg(MSG_IMPORTPAGEUC + 11) ' Affondamento
|
||||
Parameter4TxBl.Text = EgtMsg(MSG_IMPORTPAGEUC + 12) ' Accorciamento
|
||||
Parameter1TxBl.Text = EgtMsg(90460) ' Offset
|
||||
Parameter2TxBl.Text = EgtMsg(90466) ' Offset2
|
||||
Parameter3TxBl.Text = EgtMsg(90461) ' Affondamento
|
||||
Parameter4TxBl.Text = EgtMsg(90462) ' Accorciamento
|
||||
End If
|
||||
|
||||
If m_CallingPage = MainWindow.Pages.Draw Then
|
||||
@@ -145,7 +145,7 @@ Public Class SideAngleUC
|
||||
' Accorciamento
|
||||
If m_Mode = ModeOpt.ENGRAVE Then
|
||||
' modifico il nome del messaggio
|
||||
Parameter4TxBl.Text = EgtMsg(MSG_IMPORTPAGEUC + 11) & "2" ' Affondamento2
|
||||
Parameter4TxBl.Text = EgtMsg(90461) & "2" ' Affondamento2
|
||||
Parameter4TxBl.Visibility = Windows.Visibility.Visible
|
||||
Parameter4TxBx.Visibility = Windows.Visibility.Visible
|
||||
Else
|
||||
@@ -156,7 +156,7 @@ Public Class SideAngleUC
|
||||
' Angolo
|
||||
If m_Mode = ModeOpt.ENGRAVE Then
|
||||
' modifico il nome del messaggio
|
||||
Parameter5TxBl.Text = EgtMsg(MSG_IMPORTPAGEUC + 9) ' Angolo
|
||||
Parameter5TxBl.Text = EgtMsg(90459) ' Angolo
|
||||
Parameter5TxBl.Visibility = Windows.Visibility.Visible
|
||||
Parameter5TxBx.Visibility = Windows.Visibility.Visible
|
||||
Else
|
||||
@@ -167,29 +167,64 @@ Public Class SideAngleUC
|
||||
End If
|
||||
|
||||
' Gestisco Checkbox e nomi in base al numero di lati inclinabili
|
||||
TxBlChBxView()
|
||||
' Controllo se la checkbox SideAngle è attiva
|
||||
If SideAngleChBx.IsChecked Then
|
||||
Dim dSideAngle As Double = 0
|
||||
Dim dHell As Double = 0
|
||||
' Controllo se l'angolo della nuova entità non è nullo
|
||||
If Not String.IsNullOrEmpty(NewA1TxBx.Text) Then
|
||||
StringToDouble(NewA1TxBx.Text, dSideAngle)
|
||||
' Controllo se l'angolo è diverso da 0
|
||||
If dSideAngle <> 0 Then
|
||||
' Aggiorno l'angolo delle entità
|
||||
UpdateSideAngleAllEntities()
|
||||
End If
|
||||
End If
|
||||
' Controllo se il tallone della nuova entità non è nullo
|
||||
If Not String.IsNullOrEmpty(NewH1TxBx.Text) Then
|
||||
StringToDouble(NewH1TxBx.Text, dHell)
|
||||
' Controllo se il tallone è maggiore di 0
|
||||
If dHell > 0 Then
|
||||
' Aggiorno il tallone delle entità
|
||||
UpdateHeelAllEntities()
|
||||
End If
|
||||
End If
|
||||
' Elimino le righe per riposizionarle
|
||||
Grid.SetRow(NewEntity, MAX_LINES - m_nShow + 1)
|
||||
Grid.SetRow(NewA1TxBx, MAX_LINES - m_nShow + 1)
|
||||
Grid.SetRow(NewH1TxBx, MAX_LINES - m_nShow + 1)
|
||||
|
||||
Grid.SetRow(SideAngleBl, MAX_LINES - m_nShow)
|
||||
Grid.SetRow(HeelBl, MAX_LINES - m_nShow)
|
||||
Grid.SetRow(SideAngleGrid, MAX_LINES - m_nShow)
|
||||
' Rendo visibile solo la nuova entità
|
||||
CollapsedCheckAllTextSideAng()
|
||||
Else
|
||||
' Altrimenti eseguo impaginazione classica
|
||||
TxBlChBxView()
|
||||
End If
|
||||
|
||||
' Aggiorno valori
|
||||
If m_Mode = ModeOpt.DRIP Then
|
||||
m_dDripOffset = GetPrivateProfileDouble( S_SIDES, K_DRIPOFFSET, 20, m_MainWindow.GetIniFile())
|
||||
m_dDripOffset2 = GetPrivateProfileDouble( S_SIDES, K_DRIPOFFSET2, 0, m_MainWindow.GetIniFile())
|
||||
m_dDripDepth = GetPrivateProfileDouble( S_SIDES, K_DRIPDEPTH, 10, m_MainWindow.GetIniFile())
|
||||
m_dDripShort = GetPrivateProfileDouble( S_SIDES, K_DRIPSHORT, 0, m_MainWindow.GetIniFile())
|
||||
Parameter1TxBx.Text = LenToString( m_dDripOffset, 3)
|
||||
Parameter2TxBx.Text = LenToString( m_dDripOffset2, 3)
|
||||
Parameter3TxBx.Text = LenToString( m_dDripDepth, 3)
|
||||
Parameter4TxBx.Text = LenToString( m_dDripShort, 3)
|
||||
m_dDripOffset = GetPrivateProfileDouble(S_SIDES, K_DRIPOFFSET, 20, m_MainWindow.GetIniFile())
|
||||
m_dDripOffset2 = GetPrivateProfileDouble(S_SIDES, K_DRIPOFFSET2, 0, m_MainWindow.GetIniFile())
|
||||
m_dDripDepth = GetPrivateProfileDouble(S_SIDES, K_DRIPDEPTH, 10, m_MainWindow.GetIniFile())
|
||||
m_dDripShort = GetPrivateProfileDouble(S_SIDES, K_DRIPSHORT, 0, m_MainWindow.GetIniFile())
|
||||
Parameter1TxBx.Text = LenToString(m_dDripOffset, 3)
|
||||
Parameter2TxBx.Text = LenToString(m_dDripOffset2, 3)
|
||||
Parameter3TxBx.Text = LenToString(m_dDripDepth, 3)
|
||||
Parameter4TxBx.Text = LenToString(m_dDripShort, 3)
|
||||
ElseIf m_Mode = ModeOpt.ENGRAVE Then
|
||||
m_dDripOffset = GetPrivateProfileDouble( S_SIDES, K_ENGRAVEOFFSET, 20, m_MainWindow.GetIniFile())
|
||||
m_nEngrNbr2 = GetPrivateProfileInt( S_SIDES, K_ENGRAVENUMBER2, 1, m_MainWindow.GetIniFile())
|
||||
m_dDripOffset2 = GetPrivateProfileDouble( S_SIDES, K_ENGRAVEOFFSET2, 0, m_MainWindow.GetIniFile())
|
||||
m_dDripDepth = GetPrivateProfileDouble( S_SIDES, K_ENGRAVEDEPTH, 10, m_MainWindow.GetIniFile())
|
||||
m_dDripOffset = GetPrivateProfileDouble(S_SIDES, K_ENGRAVEOFFSET, 20, m_MainWindow.GetIniFile())
|
||||
m_nEngrNbr2 = GetPrivateProfileInt(S_SIDES, K_ENGRAVENUMBER2, 1, m_MainWindow.GetIniFile())
|
||||
m_dDripOffset2 = GetPrivateProfileDouble(S_SIDES, K_ENGRAVEOFFSET2, 0, m_MainWindow.GetIniFile())
|
||||
m_dDripDepth = GetPrivateProfileDouble(S_SIDES, K_ENGRAVEDEPTH, 10, m_MainWindow.GetIniFile())
|
||||
m_dEngraveDepth2 = GetPrivateProfileDouble(S_SIDES, K_ENGRAVEDEPTH2, 0, m_MainWindow.GetIniFile())
|
||||
m_dEngraveAngle = GetPrivateProfileDouble(S_SIDES, K_ENGRAVEANGLE, 0, m_MainWindow.GetIniFile())
|
||||
Parameter1TxBx.Text = LenToString(m_dDripOffset, 3)
|
||||
Parameter2aTxBx.Text = m_nEngrNbr2.ToString()
|
||||
Parameter2bTxBx.Text = LenToString( m_dDripOffset2, 3)
|
||||
Parameter3TxBx.Text = LenToString( m_dDripDepth, 3)
|
||||
Parameter2bTxBx.Text = LenToString(m_dDripOffset2, 3)
|
||||
Parameter3TxBx.Text = LenToString(m_dDripDepth, 3)
|
||||
Parameter4TxBx.Text = LenToString(m_dEngraveDepth2, 3)
|
||||
Parameter5TxBx.Text = DoubleToString(m_dEngraveAngle, 3)
|
||||
End If
|
||||
@@ -288,10 +323,10 @@ Public Class SideAngleUC
|
||||
If LoopId <> GDB_ID.NULL Then
|
||||
If m_nCount = 0 Then
|
||||
If m_CallingPage = MainWindow.Pages.Draw Then
|
||||
m_MainWindow.m_DrawPageUC.MessageTxBx.Text = EgtMsg(MSG_DRAWPAGEUC + 7) ' Non ci sono lati modificabili
|
||||
m_MainWindow.m_DrawPageUC.MessageTxBx.Text = EgtMsg(90387) ' Non ci sono lati modificabili
|
||||
m_MainWindow.m_DrawPageUC.MessageBrd.Background = Application.Current.FindResource("OmagCut_Yellow")
|
||||
Else
|
||||
m_MainWindow.m_ImportPageUC.MessageTxBx.Text = EgtMsg(MSG_DRAWPAGEUC + 7) ' Non ci sono lati modificabili
|
||||
m_MainWindow.m_ImportPageUC.MessageTxBx.Text = EgtMsg(90387) ' Non ci sono lati modificabili
|
||||
m_MainWindow.m_ImportPageUC.MessageBrd.Background = Application.Current.FindResource("OmagCut_Yellow")
|
||||
End If
|
||||
Else
|
||||
@@ -311,8 +346,14 @@ Public Class SideAngleUC
|
||||
' Attualmente il vaore m_nCount è inizializzato ad "1"..
|
||||
' Bottoni Prev Next
|
||||
If m_nCount <= MAX_LINES Then
|
||||
PrevBtn.Visibility= Windows.Visibility.Hidden
|
||||
NextBtn.Visibility= Windows.Visibility.Hidden
|
||||
PrevBtn.Visibility = Windows.Visibility.Hidden
|
||||
NextBtn.Visibility = Windows.Visibility.Hidden
|
||||
SideAngleChBx.Visibility = Windows.Visibility.Hidden
|
||||
|
||||
NewEntity.Visibility = Windows.Visibility.Hidden
|
||||
NewA1.Visibility = Windows.Visibility.Hidden
|
||||
NewA1TxBx.Visibility = Windows.Visibility.Hidden
|
||||
NewH1TxBx.Visibility = Windows.Visibility.Hidden
|
||||
Else
|
||||
Grid.SetRow(PrevBtn, MAX_LINES - m_nShow)
|
||||
PrevBtn.Visibility = Windows.Visibility.Visible
|
||||
@@ -320,6 +361,8 @@ Public Class SideAngleUC
|
||||
Grid.SetRow(NextBtn, MAX_LINES - m_nShow)
|
||||
NextBtn.Visibility = Windows.Visibility.Visible
|
||||
NextBtn.IsEnabled = (m_nCount > m_nCurrPage * MAX_LINES)
|
||||
Grid.SetRow(SideAngleGrid, MAX_LINES - m_nShow)
|
||||
SideAngleChBx.Visibility = Windows.Visibility.Visible
|
||||
End If
|
||||
|
||||
' Intestazione per angoli di lato
|
||||
@@ -335,6 +378,8 @@ Public Class SideAngleUC
|
||||
Grid.SetRow(HeelBl, MAX_LINES - m_nShow)
|
||||
HeelBl.Text = EgtMsg(91654) ' T
|
||||
HeelBl.Visibility = Windows.Visibility.Visible
|
||||
Grid.SetRow(SideAngleGrid, MAX_LINES - m_nShow)
|
||||
SideAngleChBx.Visibility = Windows.Visibility.Visible
|
||||
End If
|
||||
Else
|
||||
If m_nCount = 0 Then
|
||||
@@ -371,7 +416,7 @@ Public Class SideAngleUC
|
||||
GetHeelTxBxFromIndex(Index).Text = GetPrivateProfileDouble(S_SIDES, K_DRIPSHORT & "A" & nI.ToString & "_End", 0, m_MainWindow.GetIniFile())
|
||||
End If
|
||||
End If
|
||||
Dim TxBlIndex As Integer = (m_nCurrPage - 1) * MAX_LINES + nI - 1
|
||||
Dim TxBlIndex As Integer = (m_nCurrPage - 1) * MAX_LINES + nI - 1
|
||||
GetTxBlFromIndex(Index).Text = If(m_Mode = ModeOpt.SIDEANGLE,
|
||||
m_SideAngleEntityList(TxBlIndex).sEntityName,
|
||||
m_DripEntityList(TxBlIndex).sEntityName)
|
||||
@@ -391,6 +436,151 @@ Public Class SideAngleUC
|
||||
Next
|
||||
End Sub
|
||||
|
||||
Private Sub CheckedSideAngle() Handles SideAngleChBx.Checked
|
||||
Grid.SetRow(NewEntity, MAX_LINES - m_nShow + 1)
|
||||
Grid.SetRow(NewA1TxBx, MAX_LINES - m_nShow + 1)
|
||||
Grid.SetRow(NewH1TxBx, MAX_LINES - m_nShow + 1)
|
||||
|
||||
' Se interrompo la creazione di un unico SideAng
|
||||
If Not GetSideAngleFromAllEntities() Then Return
|
||||
|
||||
CollapsedCheckAllTextSideAng()
|
||||
End Sub
|
||||
|
||||
' Rende visibile NewEntity quando si attiva la spunta sulla checkbox
|
||||
Private Sub CollapsedCheckAllTextSideAng()
|
||||
NewEntity.Text = "A#"
|
||||
|
||||
PrevBtn.Visibility = Visibility.Collapsed
|
||||
NextBtn.Visibility = Visibility.Collapsed
|
||||
|
||||
NewEntity.Visibility = Visibility.Visible
|
||||
NewA1TxBx.Visibility = Visibility.Visible
|
||||
NewH1TxBx.Visibility = Visibility.Visible
|
||||
|
||||
Entity1.Visibility = Visibility.Collapsed
|
||||
A1TxBx.Visibility = Visibility.Collapsed
|
||||
H1TxBx.Visibility = Visibility.Collapsed
|
||||
|
||||
Entity2.Visibility = Visibility.Collapsed
|
||||
A2TxBx.Visibility = Visibility.Collapsed
|
||||
H2TxBx.Visibility = Visibility.Collapsed
|
||||
|
||||
Entity3.Visibility = Visibility.Collapsed
|
||||
A3TxBx.Visibility = Visibility.Collapsed
|
||||
H3TxBx.Visibility = Visibility.Collapsed
|
||||
|
||||
Entity4.Visibility = Visibility.Collapsed
|
||||
A4TxBx.Visibility = Visibility.Collapsed
|
||||
H4TxBx.Visibility = Visibility.Collapsed
|
||||
|
||||
Entity5.Visibility = Visibility.Collapsed
|
||||
A5TxBx.Visibility = Visibility.Collapsed
|
||||
H5TxBx.Visibility = Visibility.Collapsed
|
||||
|
||||
Entity6.Visibility = Visibility.Collapsed
|
||||
A6TxBx.Visibility = Visibility.Collapsed
|
||||
H6TxBx.Visibility = Visibility.Collapsed
|
||||
|
||||
Entity7.Visibility = Visibility.Collapsed
|
||||
A7TxBx.Visibility = Visibility.Collapsed
|
||||
H7TxBx.Visibility = Visibility.Collapsed
|
||||
|
||||
Entity8.Visibility = Visibility.Collapsed
|
||||
A8TxBx.Visibility = Visibility.Collapsed
|
||||
H8TxBx.Visibility = Visibility.Collapsed
|
||||
|
||||
Entity9.Visibility = Visibility.Collapsed
|
||||
A9TxBx.Visibility = Visibility.Collapsed
|
||||
H9TxBx.Visibility = Visibility.Collapsed
|
||||
|
||||
Entity10.Visibility = Visibility.Collapsed
|
||||
A10TxBx.Visibility = Visibility.Collapsed
|
||||
H10TxBx.Visibility = Visibility.Collapsed
|
||||
End Sub
|
||||
|
||||
Private Sub UnCheckSideAngle() Handles SideAngleChBx.Unchecked
|
||||
NewEntity.Visibility = Visibility.Collapsed
|
||||
NewA1TxBx.Visibility = Visibility.Collapsed
|
||||
NewH1TxBx.Visibility = Visibility.Collapsed
|
||||
|
||||
TxBlChBxView()
|
||||
RefreshCheckAndValue()
|
||||
End Sub
|
||||
|
||||
Private Function GetSideAngleFromAllEntities() As Boolean
|
||||
Dim tmpSideAngleList As New List(Of Double)
|
||||
tmpSideAngleList.Clear()
|
||||
Dim tmpSideHeelList As New List(Of Double)
|
||||
tmpSideHeelList.Clear()
|
||||
Dim m_SideAngleOneForAllWindow As New SideAngleOneForAllWindow
|
||||
|
||||
For i As Integer = 0 To m_SideAngleEntityList.Count - 1
|
||||
If Not tmpSideAngleList.Contains(m_SideAngleEntityList(i).dSideAngle) Then
|
||||
tmpSideAngleList.Add(m_SideAngleEntityList(i).dSideAngle)
|
||||
End If
|
||||
If Not tmpSideHeelList.Contains(m_SideAngleEntityList(i).dSideHeel) Then
|
||||
tmpSideHeelList.Add(m_SideAngleEntityList(i).dSideHeel)
|
||||
End If
|
||||
Next
|
||||
NewA1TxBx.Text = DoubleToString(tmpSideAngleList(0), 2)
|
||||
NewH1TxBx.Text = LenToString(tmpSideHeelList(0), 2)
|
||||
|
||||
If tmpSideAngleList.Count > 1 Or tmpSideHeelList.Count > 1 Then
|
||||
m_SideAngleOneForAllWindow.SideAngleOneForAllCBx.ItemsSource = tmpSideAngleList
|
||||
m_SideAngleOneForAllWindow.SideAngleOneForAllCBx.SelectedIndex = 0
|
||||
m_SideAngleOneForAllWindow.SideHeelOneForAllCBx.ItemsSource = tmpSideHeelList
|
||||
m_SideAngleOneForAllWindow.SideHeelOneForAllCBx.SelectedIndex = 0
|
||||
m_SideAngleOneForAllWindow.ShowDialog()
|
||||
If m_SideAngleOneForAllWindow.DialogResult Then
|
||||
NewA1TxBx.Text = DoubleToString(m_SideAngleOneForAllWindow.SideAngleOneForAllCBx.SelectedItem, 2)
|
||||
NewH1TxBx.Text = LenToString(m_SideAngleOneForAllWindow.SideHeelOneForAllCBx.SelectedItem, 2)
|
||||
UpdateSideAngleAllEntities()
|
||||
UpdateHeelAllEntities()
|
||||
Else
|
||||
SideAngleChBx.IsChecked = False
|
||||
Return False
|
||||
End If
|
||||
End If
|
||||
Return True
|
||||
End Function
|
||||
|
||||
Private Sub UpdateHeelAllEntities()
|
||||
' Nuovo tallone
|
||||
Dim dSideHeel As Double
|
||||
StringToLen(NewH1TxBx.Text, dSideHeel)
|
||||
' Verifico stia nei limiti
|
||||
If dSideHeel < 0 Then
|
||||
dSideHeel = 0
|
||||
NewH1TxBx.Text = "0"
|
||||
End If
|
||||
For Each Entity As SideAngleEntity In m_SideAngleEntityList
|
||||
' Lo modifico nella geometria e nella lista inclinazioni
|
||||
ModifySideHeel(Entity.sEntityName, dSideHeel)
|
||||
' Aggiorno tutti i testi
|
||||
RefreshSideAngleText()
|
||||
Next
|
||||
End Sub
|
||||
|
||||
Private Sub UpdateSideAngleAllEntities()
|
||||
' Nuovo angolo di inclinazione
|
||||
Dim dSideAngle As Double
|
||||
StringToDouble(NewA1TxBx.Text, dSideAngle)
|
||||
' Verifico stia nei limiti
|
||||
If dSideAngle < -m_dMaxSideAng Then
|
||||
dSideAngle = -m_dMaxSideAng
|
||||
NewA1TxBx.Text = DoubleToString(dSideAngle, 2)
|
||||
ElseIf dSideAngle > m_dMaxSideAng Then
|
||||
dSideAngle = m_dMaxSideAng
|
||||
NewA1TxBx.Text = DoubleToString(dSideAngle, 2)
|
||||
End If
|
||||
For Each Entity As SideAngleEntity In m_SideAngleEntityList
|
||||
' Lo modifico nella geometria e nella lista inclinazioni
|
||||
ModifySideAngle(Entity.sEntityName, dSideAngle)
|
||||
' Aggiorno tutti i testi
|
||||
RefreshSideAngleText()
|
||||
Next
|
||||
End Sub
|
||||
|
||||
'-------------> Restituisce gli oggetto della grafica assegnato l'indice
|
||||
Private Function GetChBxFromIndex(Index As Integer) As CheckBox
|
||||
@@ -495,15 +685,15 @@ Public Class SideAngleUC
|
||||
'-------------> Restituisce gli oggetto della grafica assegnato l'indice
|
||||
|
||||
' quando esco salvo nel file l'ultima configurazione per le incisioni
|
||||
Private Sub SideAngleUC_Unloaded( sender As Object, e As RoutedEventArgs) Handles Me.Unloaded
|
||||
Private Sub SideAngleUC_Unloaded(sender As Object, e As RoutedEventArgs) Handles Me.Unloaded
|
||||
If m_CallingPage = MainWindow.Pages.Draw Then
|
||||
' Ricavo nome pezzo
|
||||
Dim PartId As Integer = EgtGetFirstInGroup( GDB_ID.ROOT)
|
||||
Dim PartId As Integer = EgtGetFirstInGroup(GDB_ID.ROOT)
|
||||
' Svuoto layer in cui sono presenti i testi con le inclinazioni dei lati
|
||||
If m_Mode = ModeOpt.SIDEANGLE Then
|
||||
EgtEmptyGroup( EgtGetFirstNameInGroup( PartId, SIDE_ANGLE_LAYER))
|
||||
EgtEmptyGroup(EgtGetFirstNameInGroup(PartId, SIDE_ANGLE_LAYER))
|
||||
Else
|
||||
EgtEmptyGroup( EgtGetFirstNameInGroup( PartId, SIDE_ANGLE_LAYER))
|
||||
EgtEmptyGroup(EgtGetFirstNameInGroup(PartId, SIDE_ANGLE_LAYER))
|
||||
End If
|
||||
ElseIf m_CallingPage = MainWindow.Pages.Import Then
|
||||
' Nessuna azione necessaria
|
||||
@@ -516,7 +706,7 @@ Public Class SideAngleUC
|
||||
'WritePrivateProfileString( S_SIDES, K_DRIPSHORT, DoubleToString( m_dDripShort, 3), m_MainWindow.GetIniFile())
|
||||
ElseIf m_Mode = ModeOpt.ENGRAVE Then
|
||||
WritePrivateProfileString(S_SIDES, K_ENGRAVEOFFSET, LenToString(m_dDripOffset, 3), m_MainWindow.GetIniFile())
|
||||
WritePrivateProfileString( S_SIDES, K_ENGRAVENUMBER2, m_nEngrNbr2.ToString(), m_MainWindow.GetIniFile())
|
||||
WritePrivateProfileString(S_SIDES, K_ENGRAVENUMBER2, m_nEngrNbr2.ToString(), m_MainWindow.GetIniFile())
|
||||
WritePrivateProfileString(S_SIDES, K_ENGRAVEOFFSET2, LenToString(m_dDripOffset2, 3), m_MainWindow.GetIniFile())
|
||||
WritePrivateProfileString(S_SIDES, K_ENGRAVEDEPTH, LenToString(m_dDripDepth, 3), m_MainWindow.GetIniFile())
|
||||
WritePrivateProfileString(S_SIDES, K_ENGRAVEDEPTH2, LenToString(m_dEngraveDepth2, 3), m_MainWindow.GetIniFile())
|
||||
@@ -527,7 +717,6 @@ Public Class SideAngleUC
|
||||
EgtDraw()
|
||||
End Sub
|
||||
|
||||
|
||||
' aggiunge il messaggio nel disegno, se DripGeom creo la geometria
|
||||
Private Sub RefreshSideAngleText()
|
||||
Dim PartId As Integer = GDB_ID.NULL
|
||||
@@ -538,7 +727,7 @@ Public Class SideAngleUC
|
||||
PartId = If(m_MainWindow.m_DrawPageUC.SelectedLayer <> GDB_ID.NULL, EgtGetFirstPart(), GDB_ID.NULL)
|
||||
' Recupero nome layer con geometria di contorno (esterno o interno) del pezzo
|
||||
LoopId = m_MainWindow.m_DrawPageUC.SelectedLayer
|
||||
ElseIf m_CallingPage = MainWindow.Pages.Import Then
|
||||
ElseIf m_CallingPage = MainWindow.Pages.Import Then
|
||||
' Imposto contesto corrente
|
||||
EgtSetCurrentContext(m_MainWindow.m_ImportPageUC.ImportScene.GetCtx())
|
||||
' Recupero nome pezzo
|
||||
@@ -600,7 +789,7 @@ Public Class SideAngleUC
|
||||
For nIndex As Integer = 1 To m_nCount
|
||||
Dim Entity As DripEntity = m_DripEntityList(nIndex - 1)
|
||||
' Imposto check box (se sono stati definiti il numero corretto di CheckBox
|
||||
If nIndex < ( m_nCurrPage - 1) * MAX_LINES Or nIndex > m_nCurrPage * MAX_LINES Then Continue For
|
||||
If nIndex < (m_nCurrPage - 1) * MAX_LINES Or nIndex > m_nCurrPage * MAX_LINES Then Continue For
|
||||
Dim nChIndex As Integer = nIndex - (m_nCurrPage - 1) * MAX_LINES + MAX_LINES - m_nShow
|
||||
' verifico se l'entità ha un gocciolatoio
|
||||
GetChBxFromIndex(nChIndex).IsChecked = Entity.bHaveDrip
|
||||
@@ -973,15 +1162,15 @@ Public Class SideAngleUC
|
||||
Private Sub PrevBtn_Click(sender As Object, e As RoutedEventArgs) Handles PrevBtn.Click
|
||||
If m_nCurrPage = 1 Then Return
|
||||
m_nCurrPage -= 1
|
||||
m_nShow = Math.Min( m_nCount - ( m_nCurrPage - 1) * MAX_LINES, MAX_LINES)
|
||||
m_nShow = Math.Min(m_nCount - (m_nCurrPage - 1) * MAX_LINES, MAX_LINES)
|
||||
TxBlChBxView()
|
||||
RefreshCheckAndValue()
|
||||
End Sub
|
||||
|
||||
Private Sub NextBtn_Click(sender As Object, e As RoutedEventArgs) Handles NextBtn.Click
|
||||
If m_nCount <= ( m_nCurrPage - 1) * MAX_LINES Then Return
|
||||
If m_nCount <= (m_nCurrPage - 1) * MAX_LINES Then Return
|
||||
m_nCurrPage += 1
|
||||
m_nShow = Math.Min( m_nCount - ( m_nCurrPage - 1) * MAX_LINES, MAX_LINES)
|
||||
m_nShow = Math.Min(m_nCount - (m_nCurrPage - 1) * MAX_LINES, MAX_LINES)
|
||||
TxBlChBxView()
|
||||
RefreshCheckAndValue()
|
||||
End Sub
|
||||
@@ -993,7 +1182,7 @@ Public Class SideAngleUC
|
||||
Dim bVal As Boolean = CurrCheckBox.IsChecked()
|
||||
Dim SideIndex As Integer = CInt(CurrCheckBox.Name.Substring(1))
|
||||
' Converto nome checkbox in nome elemento tenendo conto della pagina e dello slittamento verso il basso
|
||||
Dim nCurrSide As Integer = ( m_nCurrPage - 1) * MAX_LINES + SideIndex - ( MAX_LINES - m_nShow)
|
||||
Dim nCurrSide As Integer = (m_nCurrPage - 1) * MAX_LINES + SideIndex - (MAX_LINES - m_nShow)
|
||||
Dim sCurrSide As String = m_DripEntityList(nCurrSide - 1).sEntityName
|
||||
' aggiorno l'entità con i valori scritti nel campo di testo
|
||||
Dim CurrEntity As DripEntity = DripEntity.FindEntity(sCurrSide)
|
||||
@@ -1179,6 +1368,19 @@ Public Class SideAngleUC
|
||||
End If
|
||||
End Sub
|
||||
|
||||
'-------> riga nuova
|
||||
Private Sub NewA1TxBx_EgtClosed(sender As Object, e As EventArgs) Handles NewA1TxBx.EgtClosed
|
||||
If m_Mode = ModeOpt.SIDEANGLE Then
|
||||
UpdateSideAngleAllEntities()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub NewH1TxBx_EgtClosed(sender As Object, e As EventArgs) Handles NewH1TxBx.EgtClosed
|
||||
If m_Mode = ModeOpt.SIDEANGLE Then
|
||||
UpdateHeelAllEntities()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub SetSideAngleFromTxBx(SideIndex As Integer, AngleTxBx As EgtWPFLib.EgtTextBox)
|
||||
' Nuovo angolo di inclinazione
|
||||
Dim dSideAngle As Double
|
||||
@@ -1192,7 +1394,7 @@ Public Class SideAngleUC
|
||||
AngleTxBx.Text = DoubleToString(dSideAngle, 2)
|
||||
End If
|
||||
' Converto nome checkbox in nome elemento tenendo conto della pagina e dello slittamento verso il basso
|
||||
Dim nCurrSide As Integer = ( m_nCurrPage - 1) * MAX_LINES + SideIndex - ( MAX_LINES - m_nShow)
|
||||
Dim nCurrSide As Integer = (m_nCurrPage - 1) * MAX_LINES + SideIndex - (MAX_LINES - m_nShow)
|
||||
Dim sCurrSide As String = m_SideAngleEntityList(nCurrSide - 1).sEntityName
|
||||
' Lo modifico nella geometria e nella lista inclinazioni
|
||||
ModifySideAngle(sCurrSide, dSideAngle)
|
||||
@@ -1262,7 +1464,7 @@ Public Class SideAngleUC
|
||||
HeelTxBx.Text = "0"
|
||||
End If
|
||||
' Converto nome checkbox in nome elemento tenendo conto della pagina e dello slittamento verso il basso
|
||||
Dim nCurrSide As Integer = ( m_nCurrPage - 1) * MAX_LINES + SideIndex - ( MAX_LINES - m_nShow)
|
||||
Dim nCurrSide As Integer = (m_nCurrPage - 1) * MAX_LINES + SideIndex - (MAX_LINES - m_nShow)
|
||||
Dim sCurrSide As String = m_SideAngleEntityList(nCurrSide - 1).sEntityName
|
||||
' Lo modifico nella geometria e nella lista inclinazioni
|
||||
ModifySideHeel(sCurrSide, dSideHeel)
|
||||
@@ -1303,10 +1505,15 @@ Public Class SideAngleUC
|
||||
If dSideAngle <> 0 Then
|
||||
EgtSetInfo(CurrEntity.nGeomId, INFO_SIDE_ANGLE, dSideAngle)
|
||||
EgtSetInfo(CurrEntity.nGeomId, INFO_ORIG_SIDE_ANGLE, dSideAngle)
|
||||
' Cancello inclinazione nell'apposito campo info
|
||||
Dim sSawingTilted As String = m_MainWindow.m_CurrentMachine.sCurrSawingTilted
|
||||
If Not String.IsNullOrEmpty(sSawingTilted) And m_MainWindow.m_CurrentMachine.bApplySawingTilted Then
|
||||
EgtSetInfo(CurrEntity.nGeomId, DEF_MACHINING_TILTED, sSawingTilted)
|
||||
End If
|
||||
' Cancello inclinazione nell'apposito campo info
|
||||
Else
|
||||
EgtRemoveInfo(CurrEntity.nGeomId, INFO_SIDE_ANGLE)
|
||||
EgtRemoveInfo(CurrEntity.nGeomId, INFO_ORIG_SIDE_ANGLE)
|
||||
EgtRemoveInfo(CurrEntity.nGeomId, DEF_MACHINING_TILTED)
|
||||
End If
|
||||
' Aggiorno lista entità con nuova inclinazione
|
||||
CurrEntity.dSideAngle = dSideAngle
|
||||
@@ -1324,7 +1531,7 @@ Public Class SideAngleUC
|
||||
' Scrivo nuovo tallone nelle info
|
||||
If dSideHeel > 10 * EPS_SMALL Then
|
||||
EgtSetInfo(CurrEntity.nGeomId, INFO_HEEL, dSideHeel)
|
||||
' Cancello inclinazione nell'apposito campo info
|
||||
' Cancello inclinazione nell'apposito campo info
|
||||
Else
|
||||
EgtRemoveInfo(CurrEntity.nGeomId, INFO_HEEL)
|
||||
End If
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
<UserControl x:Class="UnderDrillUC"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="597.1" d:DesignWidth="255.9">
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="597.1" d:DesignWidth="255.9">
|
||||
|
||||
<!-- Definizione della Grid Laterale -->
|
||||
<Grid Name="VariablesCompoGrid" Grid.RowSpan="2">
|
||||
@@ -31,10 +31,10 @@
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<TextBlock Name="Parameter2TxBl" Grid.Row="11" Text="Affondamento"
|
||||
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
|
||||
FontSize="{DynamicResource FontSize_LowerCaseCharacter}"/>
|
||||
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
|
||||
FontSize="{DynamicResource FontSize_LowerCaseCharacter}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="Parameter2TxBx" Grid.Column="1" Grid.Row="11" Width="90"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
|
||||
</Grid>
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ Public Class UnderDrillUC
|
||||
m_CallingPage = m_MainWindow.m_ActivePage
|
||||
|
||||
' Imposto messaggi
|
||||
Parameter2TxBl.Text = EgtMsg(MSG_IMPORTPAGEUC + 11) ' Affondamento
|
||||
Parameter2TxBl.Text = EgtMsg(90461) ' Affondamento
|
||||
|
||||
' Imposto contesto corrente
|
||||
EgtSetCurrentContext(m_MainWindow.m_ImportPageUC.ImportScene.GetCtx())
|
||||
|
||||
+136
-137
@@ -7,41 +7,41 @@
|
||||
xmlns:EgtFloating="clr-namespace:EgtWPFLib5.EgtFloating;assembly=EgtWPFLib5"
|
||||
xmlns:ControlExtensions="clr-namespace:OmagCUT.ControlExtensions">
|
||||
|
||||
<EgtWPFLib5:StatusBarVM x:Key="StatusBarVM"/>
|
||||
<EgtWPFLib5:ShowPanelVM x:Key="ShowPanelVM"/>
|
||||
<EgtWPFLib5:ViewPanelVM x:Key="ViewPanelVM"/>
|
||||
<EgtWPFLib5:InstrumentPanelVM x:Key="InstrumentPanelVM"/>
|
||||
<EgtWPFLib5:StatusBarVM x:Key="StatusBarVM"/>
|
||||
<EgtWPFLib5:ShowPanelVM x:Key="ShowPanelVM"/>
|
||||
<EgtWPFLib5:ViewPanelVM x:Key="ViewPanelVM"/>
|
||||
<EgtWPFLib5:InstrumentPanelVM x:Key="InstrumentPanelVM"/>
|
||||
|
||||
<EgtPHOTOLib:ProjectSlabVM x:Key="ProjectSlabVM"/>
|
||||
<EgtPHOTOLib:OptionPanelSlabVM x:Key="OptionPanelSlabVM"/>
|
||||
<EgtPHOTOLib:ListPageSlabVM x:Key="ListPageSlabVM"/>
|
||||
<EgtPHOTOLib:DetailPageSlabVM x:Key="DetailPageSlabVM"/>
|
||||
<EgtPHOTOLib:SearchPanelSlabVM x:Key="SearchPanelSlabVM"/>
|
||||
<EgtPHOTOLib:MyInstrumentPanelSlabVM x:Key="MyInstrumentPanelSlabVM"/>
|
||||
<EgtPHOTOLib:ProjectSlabVM x:Key="ProjectSlabVM"/>
|
||||
<EgtPHOTOLib:OptionPanelSlabVM x:Key="OptionPanelSlabVM"/>
|
||||
<EgtPHOTOLib:ListPageSlabVM x:Key="ListPageSlabVM"/>
|
||||
<EgtPHOTOLib:DetailPageSlabVM x:Key="DetailPageSlabVM"/>
|
||||
<EgtPHOTOLib:SearchPanelSlabVM x:Key="SearchPanelSlabVM"/>
|
||||
<EgtPHOTOLib:MyInstrumentPanelSlabVM x:Key="MyInstrumentPanelSlabVM"/>
|
||||
|
||||
<!--Colori predefiniti-->
|
||||
<SolidColorBrush x:Key="Omag_Blue" Color="#FF095CA8" />
|
||||
<SolidColorBrush x:Key="Omag_Yellow" Color="#FFFFCE5B" />
|
||||
<SolidColorBrush x:Key="Omag_Red" Color="Red" />
|
||||
<SolidColorBrush x:Key="Omag_Green" Color="LawnGreen" />
|
||||
<SolidColorBrush x:Key="Omag_VeryLightGray" Color="#FFF2F2F2" />
|
||||
<SolidColorBrush x:Key="Omag_LightGray" Color="LightGray" />
|
||||
<SolidColorBrush x:Key="Omag_Gray" Color="#FF9E9E9E" />
|
||||
<SolidColorBrush x:Key="Omag_DarkGray" Color="#FF444444" />
|
||||
<SolidColorBrush x:Key="Omag_White" Color="#FFFFFFFF" />
|
||||
<SolidColorBrush x:Key="Omag_Black" Color="#FF000000" />
|
||||
<!--Colori predefiniti-->
|
||||
<SolidColorBrush x:Key="Omag_Blue" Color="#FF095CA8" />
|
||||
<SolidColorBrush x:Key="Omag_Yellow" Color="#FFFFCE5B" />
|
||||
<SolidColorBrush x:Key="Omag_Red" Color="Red" />
|
||||
<SolidColorBrush x:Key="Omag_Green" Color="LawnGreen" />
|
||||
<SolidColorBrush x:Key="Omag_VeryLightGray" Color="#FFF2F2F2" />
|
||||
<SolidColorBrush x:Key="Omag_LightGray" Color="LightGray" />
|
||||
<SolidColorBrush x:Key="Omag_Gray" Color="#FF9E9E9E" />
|
||||
<SolidColorBrush x:Key="Omag_DarkGray" Color="#FF444444" />
|
||||
<SolidColorBrush x:Key="Omag_White" Color="#FFFFFFFF" />
|
||||
<SolidColorBrush x:Key="Omag_Black" Color="#FF000000" />
|
||||
|
||||
<SolidColorBrush x:Key="EgaltechBlue1" Color="#FF095CA8" />
|
||||
<SolidColorBrush x:Key="EgaltechWhite" Color="#FFFFFFFF" />
|
||||
<SolidColorBrush x:Key="EgaltechBlue1" Color="#FF095CA8" />
|
||||
<SolidColorBrush x:Key="EgaltechWhite" Color="#FFFFFFFF" />
|
||||
|
||||
<!--Template che permette di andare a capo-->
|
||||
<!--Template che permette di andare a capo-->
|
||||
<DataTemplate x:Key="Button_DataTemplate_Wrap">
|
||||
<TextBlock TextWrapping="Wrap" Text="{Binding}"/>
|
||||
</DataTemplate>
|
||||
|
||||
<!-- ______________________________________________________________________________________________________________________________________________ -->
|
||||
<!-- ______________________________________________________________________________________________________________________________________________ -->
|
||||
|
||||
<!-- Button Style -->
|
||||
<!-- Button Style -->
|
||||
|
||||
<Style TargetType="{x:Type Button}">
|
||||
<Setter Property="FocusVisualStyle">
|
||||
@@ -69,10 +69,10 @@
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type Button}" >
|
||||
<Border x:Name="border" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(Project:ButtonExtensions.CornerRadius)}"
|
||||
Background="{TemplateBinding Background}" SnapsToDevicePixels="True">
|
||||
Background="{TemplateBinding Background}" SnapsToDevicePixels="True">
|
||||
<ContentPresenter x:Name="contentPresenter" ContentTemplate="{TemplateBinding ContentTemplate}" Content="{TemplateBinding Content}" ContentStringFormat="{TemplateBinding ContentStringFormat}" Focusable="False"
|
||||
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
|
||||
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
|
||||
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
|
||||
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
|
||||
</Border>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="IsDefaulted" Value="True">
|
||||
@@ -103,44 +103,44 @@
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<!--Template che permette di andare a capo-->
|
||||
<DataTemplate x:Key="WrapButton_DataTemplate">
|
||||
<TextBlock TextWrapping="WrapWithOverflow" Text="{Binding}"/>
|
||||
</DataTemplate>
|
||||
<!--Template che permette di andare a capo-->
|
||||
<DataTemplate x:Key="WrapButton_DataTemplate">
|
||||
<TextBlock TextWrapping="WrapWithOverflow" Text="{Binding}"/>
|
||||
</DataTemplate>
|
||||
|
||||
<Style x:Key="ToolBar_Button" TargetType="{x:Type Button}" BasedOn="{StaticResource {x:Type Button}}">
|
||||
<Setter Property="Height" Value="30"/>
|
||||
<Setter Property="Width" Value="30"/>
|
||||
</Style>
|
||||
<Style x:Key="ToolBar_TextButton" TargetType="{x:Type Button}" BasedOn="{StaticResource {x:Type Button}}">
|
||||
<Setter Property="Height" Value="30"/>
|
||||
<Setter Property="Width" Value="80"/>
|
||||
</Style>
|
||||
<Style x:Key="OptionPanel_Button" TargetType="{x:Type Button}" BasedOn="{StaticResource {x:Type Button}}">
|
||||
<Setter Property="Height" Value="60"/>
|
||||
<Setter Property="Width" Value="60"/>
|
||||
</Style>
|
||||
<Style x:Key="OptionPanel_TextButton" TargetType="{x:Type Button}" BasedOn="{StaticResource {x:Type Button}}">
|
||||
<Setter Property="Height" Value="30"/>
|
||||
</Style>
|
||||
<Style x:Key="OptionPanel_TextWrapButton" TargetType="{x:Type Button}" BasedOn="{StaticResource {x:Type Button}}">
|
||||
<Setter Property="ContentTemplate" Value="{StaticResource WrapButton_DataTemplate}" />
|
||||
<Setter Property="TextBlock.TextAlignment" Value="Center"/>
|
||||
<Setter Property="Height" Value="45"/>
|
||||
</Style>
|
||||
<Style x:Key="OptionPanel_NestingButton" TargetType="{x:Type Button}" BasedOn="{StaticResource {x:Type Button}}">
|
||||
<Setter Property="Height" Value="60"/>
|
||||
<Setter Property="Width" Value="60"/>
|
||||
</Style>
|
||||
<Style x:Key="CompoWindow_Button" TargetType="{x:Type Button}" BasedOn="{StaticResource {x:Type Button}}">
|
||||
<Setter Property="Height" Value="40"/>
|
||||
</Style>
|
||||
<Style x:Key="EgtWPFLib5_InputButton" TargetType="{x:Type Button}" BasedOn="{StaticResource {x:Type Button}}">
|
||||
<Setter Property="Height" Value="30"/>
|
||||
<Setter Property="Width" Value="60"/>
|
||||
</Style>
|
||||
<Style x:Key="ToolBar_Button" TargetType="{x:Type Button}" BasedOn="{StaticResource {x:Type Button}}">
|
||||
<Setter Property="Height" Value="30"/>
|
||||
<Setter Property="Width" Value="30"/>
|
||||
</Style>
|
||||
<Style x:Key="ToolBar_TextButton" TargetType="{x:Type Button}" BasedOn="{StaticResource {x:Type Button}}">
|
||||
<Setter Property="Height" Value="30"/>
|
||||
<Setter Property="Width" Value="80"/>
|
||||
</Style>
|
||||
<Style x:Key="OptionPanel_Button" TargetType="{x:Type Button}" BasedOn="{StaticResource {x:Type Button}}">
|
||||
<Setter Property="Height" Value="60"/>
|
||||
<Setter Property="Width" Value="60"/>
|
||||
</Style>
|
||||
<Style x:Key="OptionPanel_TextButton" TargetType="{x:Type Button}" BasedOn="{StaticResource {x:Type Button}}">
|
||||
<Setter Property="Height" Value="30"/>
|
||||
</Style>
|
||||
<Style x:Key="OptionPanel_TextWrapButton" TargetType="{x:Type Button}" BasedOn="{StaticResource {x:Type Button}}">
|
||||
<Setter Property="ContentTemplate" Value="{StaticResource WrapButton_DataTemplate}" />
|
||||
<Setter Property="TextBlock.TextAlignment" Value="Center"/>
|
||||
<Setter Property="Height" Value="45"/>
|
||||
</Style>
|
||||
<Style x:Key="OptionPanel_NestingButton" TargetType="{x:Type Button}" BasedOn="{StaticResource {x:Type Button}}">
|
||||
<Setter Property="Height" Value="60"/>
|
||||
<Setter Property="Width" Value="60"/>
|
||||
</Style>
|
||||
<Style x:Key="CompoWindow_Button" TargetType="{x:Type Button}" BasedOn="{StaticResource {x:Type Button}}">
|
||||
<Setter Property="Height" Value="40"/>
|
||||
</Style>
|
||||
<Style x:Key="EgtWPFLib5_InputButton" TargetType="{x:Type Button}" BasedOn="{StaticResource {x:Type Button}}">
|
||||
<Setter Property="Height" Value="30"/>
|
||||
<Setter Property="Width" Value="60"/>
|
||||
</Style>
|
||||
|
||||
<!-- ______________________________________________________________________________________________________________________ -->
|
||||
<!-- ______________________________________________________________________________________________________________________ -->
|
||||
|
||||
<!--Template che permette di andare a capo-->
|
||||
<DataTemplate x:Key="CheckBox_DataTemplate_Wrap">
|
||||
@@ -178,10 +178,10 @@
|
||||
<ColumnDefinition Width="*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Border x:Name="checkBoxBorder" Height="{Binding Path=ActualHeight, ElementName=templateRoot}" Width="{Binding Path=ActualHeight, ElementName=templateRoot}" BorderBrush="{TemplateBinding BorderBrush}"
|
||||
BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="0" VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
|
||||
BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="0" VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
|
||||
<Grid x:Name="markGrid">
|
||||
<Path x:Name="optionMark" Data="F1M9.97498,1.22334L4.6983,9.09834 4.52164,9.09834 0,5.19331 1.27664,3.52165 4.255,6.08833 8.33331,1.52588E-05 9.97498,1.22334z" Fill="#FF212121" Margin="1" Opacity="0" Stretch="None"
|
||||
RenderTransformOrigin="0.5,0.5" HorizontalAlignment="Center" VerticalAlignment="Center">
|
||||
RenderTransformOrigin="0.5,0.5" HorizontalAlignment="Center" VerticalAlignment="Center">
|
||||
<Path.RenderTransform>
|
||||
<TransformGroup>
|
||||
<ScaleTransform>
|
||||
@@ -194,7 +194,6 @@
|
||||
<ScaleTransform.ScaleY>
|
||||
<MultiBinding Converter="{StaticResource converter}">
|
||||
<Binding ElementName="templateRoot" Path="ActualHeight"/>
|
||||
|
||||
<Binding ElementName="optionMark" Path="ActualHeight"/>
|
||||
</MultiBinding>
|
||||
</ScaleTransform.ScaleY>
|
||||
@@ -206,7 +205,7 @@
|
||||
</Grid>
|
||||
</Border>
|
||||
<ContentPresenter x:Name="contentPresenter" ContentTemplate="{TemplateBinding ContentTemplate}" Content="{TemplateBinding Content}" Grid.Column="1" ContentStringFormat="{TemplateBinding ContentStringFormat}" Focusable="False"
|
||||
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="Center" />
|
||||
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="Center" />
|
||||
</Grid>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="HasContent" Value="True">
|
||||
@@ -412,7 +411,7 @@
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type ButtonBase}">
|
||||
<Border x:Name="border" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(ControlExtensions:ToggleButtonExtensions.CornerRadius)}"
|
||||
Background="{TemplateBinding Background}" SnapsToDevicePixels="True">
|
||||
Background="{TemplateBinding Background}" SnapsToDevicePixels="True">
|
||||
<ContentPresenter x:Name="contentPresenter" ContentTemplate="{TemplateBinding ContentTemplate}" Content="{TemplateBinding Content}" ContentStringFormat="{TemplateBinding ContentStringFormat}" Focusable="False" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
|
||||
</Border>
|
||||
<ControlTemplate.Triggers>
|
||||
@@ -428,7 +427,7 @@
|
||||
<Setter Property="Background" TargetName="border" Value="#FFC4E5F6"/>
|
||||
<Setter Property="BorderBrush" TargetName="border" Value="#FF2C628B"/>
|
||||
</Trigger>-->
|
||||
<!--Commentato per poter gestire il colore di evidenziazione direttamente nello Style del ToggleButton-->
|
||||
<!--Commentato per poter gestire il colore di evidenziazione direttamente nello Style del ToggleButton-->
|
||||
<!--<Trigger Property="ToggleButton.IsChecked" Value="True">
|
||||
<Setter Property="Background" TargetName="border" Value="#FFBCDDEE"/>
|
||||
<Setter Property="BorderBrush" TargetName="border" Value="#FF245A83"/>
|
||||
@@ -444,59 +443,59 @@
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="ToolBar_ToggleButton" TargetType="{x:Type ToggleButton}" BasedOn="{StaticResource {x:Type ToggleButton}}">
|
||||
<Setter Property="Height" Value="30"/>
|
||||
<Setter Property="Width" Value="30"/>
|
||||
</Style>
|
||||
<Style x:Key="ToolBar_ToggleButton" TargetType="{x:Type ToggleButton}" BasedOn="{StaticResource {x:Type ToggleButton}}">
|
||||
<Setter Property="Height" Value="30"/>
|
||||
<Setter Property="Width" Value="30"/>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="ToolBar_TextToggleButton" TargetType="{x:Type ToggleButton}" BasedOn="{StaticResource {x:Type ToggleButton}}">
|
||||
<Setter Property="Height" Value="30"/>
|
||||
<Setter Property="Width" Value="70"/>
|
||||
</Style>
|
||||
<Style x:Key="ToolBar_TextToggleButton" TargetType="{x:Type ToggleButton}" BasedOn="{StaticResource {x:Type ToggleButton}}">
|
||||
<Setter Property="Height" Value="30"/>
|
||||
<Setter Property="Width" Value="70"/>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="OptionPanel_ToggleButton" TargetType="{x:Type ToggleButton}" BasedOn="{StaticResource {x:Type ToggleButton}}">
|
||||
<Setter Property="Height" Value="30"/>
|
||||
</Style>
|
||||
<Style x:Key="OptionPanel_ToggleButton" TargetType="{x:Type ToggleButton}" BasedOn="{StaticResource {x:Type ToggleButton}}">
|
||||
<Setter Property="Height" Value="30"/>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="OptionPanel_NestingToggleButton" TargetType="{x:Type ToggleButton}" BasedOn="{StaticResource {x:Type ToggleButton}}">
|
||||
<Setter Property="Height" Value="60"/>
|
||||
<Setter Property="Width" Value="60"/>
|
||||
</Style>
|
||||
<Style x:Key="OptionPanel_NestingToggleButton" TargetType="{x:Type ToggleButton}" BasedOn="{StaticResource {x:Type ToggleButton}}">
|
||||
<Setter Property="Height" Value="60"/>
|
||||
<Setter Property="Width" Value="60"/>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="CompoWindow_ToggleButton" TargetType="{x:Type ToggleButton}" BasedOn="{StaticResource {x:Type ToggleButton}}">
|
||||
<Setter Property="Height" Value="40"/>
|
||||
</Style>
|
||||
<Style x:Key="CompoWindow_ToggleButton" TargetType="{x:Type ToggleButton}" BasedOn="{StaticResource {x:Type ToggleButton}}">
|
||||
<Setter Property="Height" Value="40"/>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="CompoWindow_WrapToggleButton" TargetType="{x:Type ToggleButton}" BasedOn="{StaticResource {x:Type ToggleButton}}">
|
||||
<Setter Property="ContentTemplate" Value="{StaticResource WrapButton_DataTemplate}" />
|
||||
<Setter Property="TextBlock.TextAlignment" Value="Center" />
|
||||
<Setter Property="Height" Value="40"/>
|
||||
</Style>
|
||||
<Style x:Key="CompoWindow_WrapToggleButton" TargetType="{x:Type ToggleButton}" BasedOn="{StaticResource {x:Type ToggleButton}}">
|
||||
<Setter Property="ContentTemplate" Value="{StaticResource WrapButton_DataTemplate}" />
|
||||
<Setter Property="TextBlock.TextAlignment" Value="Center" />
|
||||
<Setter Property="Height" Value="40"/>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="Option_ColorButton" TargetType="{x:Type Button}" BasedOn="{StaticResource {x:Type Button}}">
|
||||
<Setter Property="Padding" Value="5"/>
|
||||
<Setter Property="HorizontalContentAlignment" Value="Center"/>
|
||||
<Setter Property="VerticalContentAlignment" Value="Center"/>
|
||||
<Setter Property="TextBlock.TextAlignment" Value="Center"/>
|
||||
<Style.Triggers>
|
||||
<Trigger Property="IsMouseOver" Value="True">
|
||||
<Setter Property="Background" Value="#FFB8C3CD"/>
|
||||
</Trigger>
|
||||
<Trigger Property="IsPressed" Value="True">
|
||||
<Setter Property="OpacityMask" Value="#33FF0000"/>
|
||||
</Trigger>
|
||||
<Trigger Property="ToggleButton.IsChecked" Value="True">
|
||||
<Setter Property="Background" Value="Transparent"/>
|
||||
</Trigger>
|
||||
<Trigger Property="IsEnabled" Value="False">
|
||||
<Setter Property="Background" Value="#FFF4F4F4"/>
|
||||
<Setter Property="BorderBrush" Value="#FFADB2B5"/>
|
||||
<Setter Property="TextElement.Foreground" Value="#FF838383"/>
|
||||
</Trigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
<Style x:Key="Option_ColorButton" TargetType="{x:Type Button}" BasedOn="{StaticResource {x:Type Button}}">
|
||||
<Setter Property="Padding" Value="5"/>
|
||||
<Setter Property="HorizontalContentAlignment" Value="Center"/>
|
||||
<Setter Property="VerticalContentAlignment" Value="Center"/>
|
||||
<Setter Property="TextBlock.TextAlignment" Value="Center"/>
|
||||
<Style.Triggers>
|
||||
<Trigger Property="IsMouseOver" Value="True">
|
||||
<Setter Property="Background" Value="#FFB8C3CD"/>
|
||||
</Trigger>
|
||||
<Trigger Property="IsPressed" Value="True">
|
||||
<Setter Property="OpacityMask" Value="#33FF0000"/>
|
||||
</Trigger>
|
||||
<Trigger Property="ToggleButton.IsChecked" Value="True">
|
||||
<Setter Property="Background" Value="Transparent"/>
|
||||
</Trigger>
|
||||
<Trigger Property="IsEnabled" Value="False">
|
||||
<Setter Property="Background" Value="#FFF4F4F4"/>
|
||||
<Setter Property="BorderBrush" Value="#FFADB2B5"/>
|
||||
<Setter Property="TextElement.Foreground" Value="#FF838383"/>
|
||||
</Trigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
|
||||
<!-- ______________________________________________________________________________________________________________________ -->
|
||||
<!-- ______________________________________________________________________________________________________________________ -->
|
||||
|
||||
<!--TreeViewBase-->
|
||||
<!--Style e colori della freccia di espansione, necessari per modificare il ContainerItemStyle perchè contiene riferimenti ad essi-->
|
||||
@@ -552,32 +551,32 @@
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<!-- ______________________________________________________________________________________________________________________________________________ -->
|
||||
<!-- ______________________________________________________________________________________________________________________________________________ -->
|
||||
|
||||
<!-- EgtCustomWindow -->
|
||||
<!-- EgtCustomWindow -->
|
||||
|
||||
<Style TargetType="{x:Type EgtWPFLib5:EgtCustomWindow}" BasedOn="{StaticResource {x:Type EgtWPFLib5:EgtCustomWindow}}">
|
||||
<Setter Property="TitleBarHeight" Value="32"/>
|
||||
<Setter Property="TitleBarBrush" Value="{StaticResource Omag_LightGray}"/>
|
||||
<Setter Property="BorderBrush" Value="{StaticResource Omag_Gray}"/>
|
||||
</Style>
|
||||
<Style TargetType="{x:Type EgtWPFLib5:EgtCustomWindow}" BasedOn="{StaticResource {x:Type EgtWPFLib5:EgtCustomWindow}}">
|
||||
<Setter Property="TitleBarHeight" Value="32"/>
|
||||
<Setter Property="TitleBarBrush" Value="{StaticResource Omag_LightGray}"/>
|
||||
<Setter Property="BorderBrush" Value="{StaticResource Omag_Gray}"/>
|
||||
</Style>
|
||||
|
||||
<!-- ______________________________________________________________________________________________________________________________________________ -->
|
||||
<!-- ______________________________________________________________________________________________________________________________________________ -->
|
||||
|
||||
<!-- EgtFloatingPanel -->
|
||||
<!-- EgtFloatingPanel -->
|
||||
|
||||
<Style x:Key="ToolBar_EgtFloatingPanel" TargetType="{x:Type EgtFloating:EgtFloatingPanel}" BasedOn="{StaticResource {x:Type EgtFloating:EgtFloatingPanel}}">
|
||||
<Setter Property="Background" Value="{StaticResource Omag_Gray}"/>
|
||||
<Setter Property="BorderBrush" Value="{StaticResource Omag_Gray}"/>
|
||||
</Style>
|
||||
<Style x:Key="ToolBar_EgtFloatingPanel" TargetType="{x:Type EgtFloating:EgtFloatingPanel}" BasedOn="{StaticResource {x:Type EgtFloating:EgtFloatingPanel}}">
|
||||
<Setter Property="Background" Value="{StaticResource Omag_Gray}"/>
|
||||
<Setter Property="BorderBrush" Value="{StaticResource Omag_Gray}"/>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="Option_EgtFloatingPanel" TargetType="{x:Type EgtFloating:EgtFloatingPanel}" BasedOn="{StaticResource {x:Type EgtFloating:EgtFloatingPanel}}">
|
||||
<Setter Property="IsToolBar" Value="False"/>
|
||||
<Setter Property="TitleBarOrientation" Value="Vertical"/>
|
||||
<Setter Property="Background" Value="{StaticResource Omag_Gray}"/>
|
||||
<Setter Property="BorderBrush" Value="{StaticResource Omag_Gray}"/>
|
||||
</Style>
|
||||
<Style x:Key="Option_EgtFloatingPanel" TargetType="{x:Type EgtFloating:EgtFloatingPanel}" BasedOn="{StaticResource {x:Type EgtFloating:EgtFloatingPanel}}">
|
||||
<Setter Property="IsToolBar" Value="False"/>
|
||||
<Setter Property="TitleBarOrientation" Value="Vertical"/>
|
||||
<Setter Property="Background" Value="{StaticResource Omag_Gray}"/>
|
||||
<Setter Property="BorderBrush" Value="{StaticResource Omag_Gray}"/>
|
||||
</Style>
|
||||
|
||||
<!-- ______________________________________________________________________________________________________________________ -->
|
||||
<!-- ______________________________________________________________________________________________________________________ -->
|
||||
|
||||
</ResourceDictionary>
|
||||
|
||||
+136
-127
@@ -1,152 +1,161 @@
|
||||
<UserControl x:Class="FrameCutPageUC"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="853.3" d:DesignWidth="1280">
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="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 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" >
|
||||
<!-- 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="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="RawPartBtn" Grid.Column="1" Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}">
|
||||
<Image Source="{DynamicResource RawPartImg}" Style="{DynamicResource 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>
|
||||
|
||||
<ToggleButton Name="MachiningBtn" Grid.Column="4" Style="{DynamicResource OmagCut_RightGrayYellowIconToggleButton}">
|
||||
<Image Source="{DynamicResource FrameMachiningImg}" Style="{DynamicResource 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*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="4*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</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>
|
||||
|
||||
<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>
|
||||
|
||||
<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*"/>
|
||||
<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>
|
||||
|
||||
<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="{DynamicResource OmagCut_ComboBox}"
|
||||
Width="200" MaxDropDownHeight="300">
|
||||
<ComboBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding}" Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</DataTemplate>
|
||||
</ComboBox.ItemTemplate>
|
||||
</ComboBox>
|
||||
|
||||
<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"
|
||||
<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>
|
||||
<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"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
<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"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
|
||||
<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"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
<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"
|
||||
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}"/>
|
||||
|
||||
<TextBlock Name="OffsXInteryTxBl" Grid.Row="5" Grid.ColumnSpan="2"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="OffsXInteryTxBx" Grid.Column="2" Grid.Row="5" Width="50"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
<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"
|
||||
Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}">
|
||||
<Image Source="{DynamicResource Rimuovi_eliminaImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
</UniformGrid>
|
||||
<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"
|
||||
Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}">
|
||||
<Image Source="{DynamicResource Rimuovi_eliminaImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
</UniformGrid>
|
||||
|
||||
<!--<UniformGrid Grid.Column="0" Grid.Row="6" Grid.ColumnSpan="3" Columns="2" >
|
||||
<!--<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"
|
||||
<!--<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}"
|
||||
@@ -204,10 +213,10 @@
|
||||
</ComboBox.ItemTemplate>
|
||||
</ComboBox>-->
|
||||
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
||||
</UserControl>
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
Imports System.Collections.ObjectModel
|
||||
Imports EgtUILib
|
||||
Imports EgtUILib
|
||||
|
||||
Public Class FrameCutPageUC
|
||||
|
||||
@@ -54,25 +53,38 @@ Public Class FrameCutPageUC
|
||||
OffsYyTxBx.Text = LenToString(dOffsYY, 3)
|
||||
Dim dOffsXInterY As Double = GetPrivateProfileDouble(S_FRAME, K_OFFSXINTERY, 5, m_MainWindow.GetIniFile())
|
||||
OffsXInteryTxBx.Text = LenToString(dOffsXInterY, 3)
|
||||
Dim bOffsYInterYSawTh As Boolean = False
|
||||
UseInteraxisChBx.IsChecked = (GetPrivateProfileInt(S_FRAME, K_OFFSXINTERYSAWTH, 0, m_MainWindow.GetIniFile()) <> 1)
|
||||
|
||||
' Imposto i messaggi letti dal file dei messaggi
|
||||
m_AlongAx.Add(EgtMsg(MSG_FRAMECUTPAGEUC + 1)) 'Lungo X
|
||||
m_AlongAx.Add(EgtMsg(MSG_FRAMECUTPAGEUC + 2)) 'Lungo Y
|
||||
m_AlongAx.Add(EgtMsg(90601)) ' Lungo X
|
||||
m_AlongAx.Add(EgtMsg(90602)) ' Lungo Y
|
||||
If GetPrivateProfileInt(S_FRAME, K_ARC_ENABLE, 0, m_MainWindow.GetIniFile()) <> 0 And
|
||||
m_MainWindow.GetKeyOption( MainWindow.KEY_OPT.CURVED_FRAME) Then
|
||||
m_AlongAx.Add(EgtMsg(MSG_FRAMECUTPAGEUC + 13)) 'Arco
|
||||
m_AlongAx.Add(EgtMsg(MSG_FRAMECUTPAGEUC + 14)) 'Guida
|
||||
m_AlongAx.Add(EgtMsg(90613)) ' Arco
|
||||
m_AlongAx.Add(EgtMsg(90614)) ' Guida
|
||||
End If
|
||||
SelSectionBtn.ToolTip = EgtMsg(MSG_FRAMECUTPAGEUC + 15) 'Sezione
|
||||
SelGuideBtn.Content = EgtMsg(MSG_FRAMECUTPAGEUC + 16) 'Guida
|
||||
ArcRadTxBl.Text = EgtMsg(MSG_FRAMECUTPAGEUC + 17) 'Rad
|
||||
ArcAngTxBl.Text = EgtMsg(MSG_FRAMECUTPAGEUC + 18) 'Ang
|
||||
MirrorPartBtn.ToolTip = EgtMsg(MSG_FRAMECUTPAGEUC + 7) 'Mirror cornice
|
||||
RemovePartBtn.ToolTip = EgtMsg(MSG_FRAMECUTPAGEUC + 3) 'Rimuovi cornice
|
||||
OffsZTxBl.Text = EgtMsg(MSG_FRAMECUTPAGEUC + 8) 'Distanza sopra
|
||||
OffsXyTxBl.Text = EgtMsg(MSG_FRAMECUTPAGEUC + 9) 'Distanza inizio
|
||||
OffsYyTxBl.Text = EgtMsg(MSG_FRAMECUTPAGEUC + 22) 'Distanza Y
|
||||
OffsXInteryTxBl.Text = EgtMsg(90645) 'Interasse
|
||||
SelSectionBtn.ToolTip = EgtMsg(90615) ' Sezione
|
||||
SelGuideBtn.Content = EgtMsg(906116) ' Guida
|
||||
ArcRadTxBl.Text = EgtMsg(90617) ' Rad
|
||||
ArcAngTxBl.Text = EgtMsg(90618) ' Ang
|
||||
MirrorPartBtn.ToolTip = EgtMsg(90607) ' Mirror cornice
|
||||
RemovePartBtn.ToolTip = EgtMsg(90603) ' Rimuovi cornice
|
||||
OffsZTxBl.Text = EgtMsg(90608) ' Distanza sopra
|
||||
OffsXyTxBl.Text = EgtMsg(90609) ' Distanza inizio
|
||||
OffsYyTxBl.Text = EgtMsg(90622) ' 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
|
||||
@@ -155,14 +167,14 @@ Public Class FrameCutPageUC
|
||||
ArcGrid.Visibility = Windows.Visibility.Collapsed
|
||||
OffsYyTxBl.Visibility = Windows.Visibility.Collapsed
|
||||
OffsYyTxBx.Visibility = Windows.Visibility.Collapsed
|
||||
OffsXyTxBl.Text = EgtMsg(MSG_FRAMECUTPAGEUC + 9) 'Distanza inizio
|
||||
OffsXyTxBl.Text = EgtMsg(90609) ' Distanza inizio
|
||||
Case 2 'Arco
|
||||
SelSectionBtn.Visibility = Windows.Visibility.Visible
|
||||
SelGuideBtn.Visibility = Windows.Visibility.Collapsed
|
||||
ArcGrid.Visibility = Windows.Visibility.Visible
|
||||
OffsYyTxBl.Visibility = Windows.Visibility.Visible
|
||||
OffsYyTxBx.Visibility = Windows.Visibility.Visible
|
||||
OffsXyTxBl.Text = EgtMsg(MSG_FRAMECUTPAGEUC + 21) 'Distanza X
|
||||
OffsXyTxBl.Text = EgtMsg(90621) ' Distanza X
|
||||
Case 3 'Guida
|
||||
SelSectionBtn.Visibility = Windows.Visibility.Visible
|
||||
SelGuideBtn.Visibility = Windows.Visibility.Visible
|
||||
@@ -170,7 +182,7 @@ Public Class FrameCutPageUC
|
||||
ArcGrid.Visibility = Windows.Visibility.Collapsed
|
||||
OffsYyTxBl.Visibility = Windows.Visibility.Visible
|
||||
OffsYyTxBx.Visibility = Windows.Visibility.Visible
|
||||
OffsXyTxBl.Text = EgtMsg(MSG_FRAMECUTPAGEUC + 21) 'Distanza X
|
||||
OffsXyTxBl.Text = EgtMsg(90621) ' Distanza X
|
||||
End Select
|
||||
End Sub
|
||||
|
||||
@@ -280,7 +292,7 @@ Public Class FrameCutPageUC
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub OffsXXTxBx_EgtClosed(sender As Object, e As EventArgs) Handles OffsZTxBx.EgtClosed, OffsXyTxBx.EgtClosed, OffsYyTxBx.EgtClosed, OffsXInteryTxBx.EgtClosed
|
||||
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
|
||||
@@ -312,6 +324,11 @@ Public Class FrameCutPageUC
|
||||
If StringToLen(OffsXInteryTxBx.Text, dOffsXIntery) Then
|
||||
WritePrivateProfileString(S_FRAME, K_OFFSXINTERY, DoubleToString(dOffsXIntery, 3), m_MainWindow.GetIniFile())
|
||||
End If
|
||||
Dim sUseInteraxis As String = "1"
|
||||
If UseInteraxisChBx.IsChecked Then
|
||||
sUseInteraxis = "0"
|
||||
End If
|
||||
WritePrivateProfileString(S_FRAME, K_OFFSXINTERYSAWTH, sUseInteraxis, m_MainWindow.GetIniFile())
|
||||
End Sub
|
||||
|
||||
Private Sub MirrorPartBtn_Click(sender As Object, e As RoutedEventArgs) Handles MirrorPartBtn.Click
|
||||
@@ -464,10 +481,10 @@ Public Class FrameCutPageUC
|
||||
EgtErase( nPartId)
|
||||
If m_CurrAx <> 2 Then
|
||||
' Errore : creazione cornice non riuscita
|
||||
m_CurrProjPage.SetErrorMessage( EgtMsg(MSG_FRAMECUTPAGEUC + 20))
|
||||
m_CurrProjPage.SetErrorMessage(EgtMsg(90620))
|
||||
Else
|
||||
' Errore : raggio più piccolo della larghezza della sezione
|
||||
m_CurrProjPage.SetErrorMessage( EgtMsg(MSG_FRAMECUTPAGEUC + 19))
|
||||
m_CurrProjPage.SetErrorMessage(EgtMsg(90619))
|
||||
End If
|
||||
Return False
|
||||
End If
|
||||
@@ -963,11 +980,22 @@ Public Class FrameCutPageUC
|
||||
StringToLen(OffsXInteryTxBx.Text, dOffsXIntery)
|
||||
If EgtTdbSetCurrTool(m_MainWindow.m_CurrentMachine.sCurrSaw) AndAlso
|
||||
EgtTdbGetCurrToolParam(MCH_TP.THICK, dSawThick) Then
|
||||
If dOffsXIntery <= 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 = dOffsXIntery + 5 * EPS_SMALL
|
||||
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 = dOffsXIntery
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user