Compare commits
441 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 | |||
| 8becdfb219 | |||
| 7c6b18d996 | |||
| 44e9a448fe | |||
| 5740820eed | |||
| 3202993a3e | |||
| b293156a30 | |||
| dfe876638f | |||
| 1c861ee7e3 | |||
| 5da026accb | |||
| 5396796d28 | |||
| ae18c7f027 | |||
| 54122d82e6 | |||
| f85e97a126 | |||
| 06654d923c | |||
| ce1c6fcf02 | |||
| da11ec0a11 | |||
| 52688ed0da | |||
| 60eda04669 | |||
| b95dd8f41d | |||
| 4b2351c20a | |||
| 988743187b | |||
| 2c0afccbe3 | |||
| a5d6d34664 | |||
| 27b13292cf | |||
| 7b9d99a9c6 | |||
| 1e2b4bed27 | |||
| 4ecf7980ce | |||
| 82157d3b6e | |||
| 10cb8f64f5 | |||
| 6dbf4f5ccb | |||
| 4ba0fe2520 | |||
| a55ab4f83d | |||
| 419776c89f | |||
| fd89a6cf3b | |||
| b505b79d9a | |||
| b1313ddb55 | |||
| f3889ede24 | |||
| 5ca010ae4a | |||
| 391d25507e | |||
| c954f364e3 | |||
| 1ab6d2746f | |||
| 41de0516c8 | |||
| dec4c0d312 | |||
| 834f3afe1c | |||
| e6c95323fb | |||
| fa6e5b520f | |||
| aefc037cd9 | |||
| c475f7dc12 | |||
| c5f3d4fcfb | |||
| a04e2cbe62 | |||
| da980a649e | |||
| 4c282d7531 | |||
| a941f963c2 | |||
| eab341d7fe | |||
| 9c7d60d307 | |||
| a7adcdcaca | |||
| acb8ceed4d | |||
| 65d8f58b45 | |||
| 07cf7ced42 | |||
| b1410ca11c | |||
| 1975f46995 | |||
| 6863186e07 | |||
| b434f80030 | |||
| 0151cd8f9e | |||
| 75e3729216 | |||
| ef1aef12ed | |||
| 959fb2e44f | |||
| 59e3ae5841 | |||
| 941e7837be | |||
| 58de5d4077 | |||
| b6beef668d | |||
| 680505af10 | |||
| b0bfa67d2a | |||
| 29d8c1e29b | |||
| e5d4f223f8 | |||
| 3cfc7276c9 | |||
| 0c0233b27e | |||
| 4e8925515d | |||
| 3b552b2f4e | |||
| 3fae33404b | |||
| 0d4d853834 | |||
| 37fcbe8240 | |||
| 4393f282b7 | |||
| 6844a8c77c | |||
| 659405c52f | |||
| efafacf6ca | |||
| 6905a8d6dc | |||
| d8ba23894e | |||
| aba1572f95 | |||
| fdb0ed598b | |||
| 4cb3518346 | |||
| 56b8ee88d3 | |||
| d0439f2b05 | |||
| 07d8145d57 | |||
| 652c396933 | |||
| 997e8c380d | |||
| 8d363b8b06 | |||
| 7ecad4c218 | |||
| d49c231541 | |||
| 8d82058e49 | |||
| d6a9cac6b4 | |||
| 4ce898c25c | |||
| 6f59cddd80 | |||
| c8b018f6df | |||
| 36a1ecb509 | |||
| e287e827c4 | |||
| 68e9a9201d | |||
| 0eaebd5aad | |||
| 8946bf3a00 | |||
| aeb0be0590 | |||
| a15acb6528 | |||
| e7e9d26b75 | |||
| b48d4900ea | |||
| d9de23daca | |||
| ad5c9331ba | |||
| b67330b509 | |||
| ca66108145 | |||
| 379ccc7519 | |||
| b751c27773 | |||
| 14e1c254f0 | |||
| 6f08e5f520 | |||
| 7d8933cc39 | |||
| 2179996bff | |||
| 316bcc89ea | |||
| ce151e5db7 | |||
| b303fe2615 | |||
| 3e0d43c1d8 | |||
| 70b1822446 |
+22
-17
@@ -1,9 +1,9 @@
|
|||||||
<Window x:Class="AboutBoxWD"
|
<Window x:Class="AboutBoxWD"
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
FontFamily="{DynamicResource OmagCut_Font}"
|
FontFamily="{DynamicResource OmagCut_Font}"
|
||||||
Title="AboutBoxWD" Height="469.15" Width="511.8" WindowStyle="None" ResizeMode="NoResize"
|
Title="AboutBoxWD" Height="469.15" Width="511.8" WindowStyle="None" ResizeMode="NoResize"
|
||||||
AllowsTransparency="True" Background="Transparent" ShowInTaskbar="False">
|
AllowsTransparency="True" Background="Transparent" ShowInTaskbar="False">
|
||||||
|
|
||||||
<!-- Definizione dell'AboutBox -->
|
<!-- Definizione dell'AboutBox -->
|
||||||
<Border Style="{DynamicResource OmagCut_WindowBorder}">
|
<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.5*"/>
|
<RowDefinition Height="0.5*"/>
|
||||||
|
<RowDefinition Height="0.5*"/>
|
||||||
<RowDefinition Height="0.25*"/>
|
<RowDefinition Height="0.25*"/>
|
||||||
<RowDefinition Height="0.5*"/>
|
<RowDefinition Height="0.5*"/>
|
||||||
<RowDefinition Height="0.25*"/>
|
<RowDefinition Height="0.25*"/>
|
||||||
@@ -35,23 +36,27 @@
|
|||||||
<ColumnDefinition Width="1*"/>
|
<ColumnDefinition Width="1*"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<Border Name="LogoBrd" Grid.Column="1">
|
<Border Name="LogoBrd" Grid.Column="1">
|
||||||
<Image Source="../Resources/AboutBoxImage.png" Stretch="Uniform"/>
|
<Image Source="../Resources/NewIcons/Logo-Egalware (3).png" Stretch="Uniform"/>
|
||||||
</Border>
|
</Border>
|
||||||
</Grid>
|
</Grid>
|
||||||
<TextBlock Name="DescriptionLbl" Grid.Column="1" Grid.Row="3" HorizontalAlignment="Center"
|
<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"
|
<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"
|
<TextBlock Name="KeyLbl" Grid.Column="1" Grid.Row="5" HorizontalAlignment="Center"
|
||||||
VerticalAlignment="Center" FontSize="18"/>
|
VerticalAlignment="Center" FontSize="18"/>
|
||||||
<TextBlock Name="MachineLbl" Grid.Column="1" Grid.Row="6" HorizontalAlignment="Center"
|
|
||||||
VerticalAlignment="Center" FontSize="18"/>
|
<TextBlock Name="AssStatusLbl" Grid.Column="1" Grid.Row="6" HorizontalAlignment="Center"
|
||||||
<TextBlock Name="ProjectLbl" Grid.Column="1" Grid.Row="7" HorizontalAlignment="Center"
|
VerticalAlignment="Center" FontSize="18"/>
|
||||||
VerticalAlignment="Center" FontSize="18"/>
|
|
||||||
<TextBlock Name="CopyrightLbl" Grid.Column="1" Grid.Row="8" HorizontalAlignment="Center"
|
<TextBlock Name="MachineLbl" Grid.Column="1" Grid.Row="7" HorizontalAlignment="Center"
|
||||||
VerticalAlignment="Center" FontSize="15" />
|
VerticalAlignment="Center" FontSize="18"/>
|
||||||
<Button Name="ExitBtn" Grid.Column="1" Grid.Row="10" IsCancel="True"
|
<TextBlock Name="ProjectLbl" Grid.Column="1" Grid.Row="8" HorizontalAlignment="Center"
|
||||||
Style="{DynamicResource OmagCut_WindowGrayTextButton}" Margin="1,0"/>
|
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>
|
</Grid>
|
||||||
|
|
||||||
|
|||||||
@@ -33,10 +33,23 @@ Public Class AboutBoxWD
|
|||||||
#Else
|
#Else
|
||||||
KeyLbl.Text = sKey & " - " & sOpts
|
KeyLbl.Text = sKey & " - " & sOpts
|
||||||
#End If
|
#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()
|
CopyrightLbl.Text = My.Application.Info.Copyright.ToString()
|
||||||
MachineLbl.Text = "Machine : " & m_MainWindow.m_CurrentMachine.sMachineName
|
MachineLbl.Text = "Machine : " & m_MainWindow.m_CurrentMachine.sMachineName
|
||||||
ProjectLbl.Text = "Project : " & m_MainWindow.m_CurrentProjectPageUC.GetCurrentProjectName()
|
ProjectLbl.Text = "Project : " & m_MainWindow.m_CurrentProjectPageUC.GetCurrentProjectName()
|
||||||
ExitBtn.Content = EgtMsg(MSG_MISSINGKEYWD + 4) 'Ok
|
ExitBtn.Content = EgtMsg(10104) 'Ok
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
+269
-42
@@ -21,15 +21,55 @@ Friend Module CamAuto
|
|||||||
bOk = bOk AndAlso EgtLuaCallFunction("CAM.Add")
|
bOk = bOk AndAlso EgtLuaCallFunction("CAM.Add")
|
||||||
EgtLuaGetGlobIntVar("CAM.ERR", nErr)
|
EgtLuaGetGlobIntVar("CAM.ERR", nErr)
|
||||||
EgtLuaResetGlobVar("CAM")
|
EgtLuaResetGlobVar("CAM")
|
||||||
If nErr <> 0 Then
|
If nErr > 0 Then
|
||||||
bOk = False
|
bOk = False
|
||||||
EgtOutLog("Error in CamAuto : " & nErr.ToString())
|
EgtOutLog("Error in CamAuto : " & nErr.ToString())
|
||||||
|
ElseIf nErr < 0 Then
|
||||||
|
EgtOutLog("Warning in CamAuto : " & nErr.ToString())
|
||||||
|
m_MainWindow.m_CurrentProjectPageUC.SetWarningMessage(EgtMsg(91017))
|
||||||
End If
|
End If
|
||||||
m_MainWindow.m_CurrentProjectPageUC.ResetOrderMachiningFlag()
|
m_MainWindow.m_CurrentProjectPageUC.ResetOrderMachiningFlag()
|
||||||
Return bOk
|
Return bOk
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Friend Function AddWaterJetMachining( nOperId As Integer, ByRef nWarn As Integer) As Boolean
|
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
|
||||||
|
Return bOk
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Friend Function AddWaterJetMachining(nOperId As Integer, ByRef nWarn As Integer) As Boolean
|
||||||
EgtLuaCreateGlobTable("CAM")
|
EgtLuaCreateGlobTable("CAM")
|
||||||
SetLuaStandardCamParams()
|
SetLuaStandardCamParams()
|
||||||
EgtLuaSetGlobIntVar("CAM.OPERID", nOperId)
|
EgtLuaSetGlobIntVar("CAM.OPERID", nOperId)
|
||||||
@@ -39,9 +79,34 @@ Friend Module CamAuto
|
|||||||
bOk = bOk AndAlso EgtLuaCallFunction("CAM.AddWaterJet")
|
bOk = bOk AndAlso EgtLuaCallFunction("CAM.AddWaterJet")
|
||||||
EgtLuaGetGlobIntVar("CAM.ERR", nErr)
|
EgtLuaGetGlobIntVar("CAM.ERR", nErr)
|
||||||
EgtLuaResetGlobVar("CAM")
|
EgtLuaResetGlobVar("CAM")
|
||||||
If nErr <> 0 Then
|
If nErr > 0 Then
|
||||||
bOk = False
|
bOk = False
|
||||||
EgtOutLog("Error in CamAuto : " & nErr.ToString())
|
EgtOutLog("Error in CamAuto : " & nErr.ToString())
|
||||||
|
m_MainWindow.m_CurrentProjectPageUC.ClearMessage()
|
||||||
|
ElseIf nErr < 0 Then
|
||||||
|
EgtOutLog("Warning in CamAuto : " & nErr.ToString())
|
||||||
|
End If
|
||||||
|
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
|
End If
|
||||||
Return bOk
|
Return bOk
|
||||||
End Function
|
End Function
|
||||||
@@ -55,9 +120,11 @@ Friend Module CamAuto
|
|||||||
bOk = bOk AndAlso EgtLuaCallFunction("CAM.Erase")
|
bOk = bOk AndAlso EgtLuaCallFunction("CAM.Erase")
|
||||||
EgtLuaGetGlobIntVar("CAM.ERR", nErr)
|
EgtLuaGetGlobIntVar("CAM.ERR", nErr)
|
||||||
EgtLuaResetGlobVar("CAM")
|
EgtLuaResetGlobVar("CAM")
|
||||||
If nErr <> 0 Then
|
If nErr > 0 Then
|
||||||
bOk = False
|
bOk = False
|
||||||
EgtOutLog("Error in CamAuto : " & nErr.ToString())
|
EgtOutLog("Error in CamAuto : " & nErr.ToString())
|
||||||
|
ElseIf nErr < 0 Then
|
||||||
|
EgtOutLog("Warning in CamAuto : " & nErr.ToString())
|
||||||
End If
|
End If
|
||||||
m_MainWindow.m_CurrentProjectPageUC.ResetOrderMachiningFlag()
|
m_MainWindow.m_CurrentProjectPageUC.ResetOrderMachiningFlag()
|
||||||
m_MainWindow.m_CurrentProjectPageUC.ResetProjectNcRestart()
|
m_MainWindow.m_CurrentProjectPageUC.ResetProjectNcRestart()
|
||||||
@@ -73,9 +140,11 @@ Friend Module CamAuto
|
|||||||
bOk = bOk AndAlso EgtLuaCallFunction("CAM.InvertVerticalCut")
|
bOk = bOk AndAlso EgtLuaCallFunction("CAM.InvertVerticalCut")
|
||||||
EgtLuaGetGlobIntVar("CAM.ERR", nErr)
|
EgtLuaGetGlobIntVar("CAM.ERR", nErr)
|
||||||
EgtLuaResetGlobVar("CAM")
|
EgtLuaResetGlobVar("CAM")
|
||||||
If nErr <> 0 Then
|
If nErr > 0 Then
|
||||||
bOk = False
|
bOk = False
|
||||||
EgtOutLog("Error in CamAuto : " & nErr.ToString())
|
EgtOutLog("Error in CamAuto : " & nErr.ToString())
|
||||||
|
ElseIf nErr < 0 Then
|
||||||
|
EgtOutLog("Warning in CamAuto : " & nErr.ToString())
|
||||||
End If
|
End If
|
||||||
Return bOk
|
Return bOk
|
||||||
End Function
|
End Function
|
||||||
@@ -85,6 +154,7 @@ Friend Module CamAuto
|
|||||||
Return ResetAllMachinings(nWarn)
|
Return ResetAllMachinings(nWarn)
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
' Ricalcola tutte le lavorazioni
|
||||||
Friend Function ResetAllMachinings(ByRef nWarn As Integer) As Boolean
|
Friend Function ResetAllMachinings(ByRef nWarn As Integer) As Boolean
|
||||||
' Cancello tutte le lavorazioni
|
' Cancello tutte le lavorazioni
|
||||||
EraseMachinings(GDB_ID.NULL)
|
EraseMachinings(GDB_ID.NULL)
|
||||||
@@ -101,6 +171,74 @@ Friend Module CamAuto
|
|||||||
Return True
|
Return True
|
||||||
End Function
|
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
|
Friend Function ResetAllSplitCurv() As Boolean
|
||||||
Dim bOk As Boolean = True
|
Dim bOk As Boolean = True
|
||||||
Dim nIdPart As Integer = EgtGetFirstPart()
|
Dim nIdPart As Integer = EgtGetFirstPart()
|
||||||
@@ -163,6 +301,61 @@ Friend Module CamAuto
|
|||||||
Return bOk
|
Return bOk
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
Friend Function ResetAllSplitCut() As Boolean
|
||||||
|
Dim PartList As New List(Of Integer)
|
||||||
|
' Ricerca nei grezzi dei pezzi (devono essere ricercati tra quelli presenti nei grezzi)
|
||||||
|
Dim bOk As Boolean = True
|
||||||
|
' Recupero il numero di fasi presenti nel progetto
|
||||||
|
Dim nPhaseCount As Integer = EgtGetPhaseCount()
|
||||||
|
For nPhase As Integer = 1 To nPhaseCount
|
||||||
|
EgtSetCurrPhase(nPhase)
|
||||||
|
Dim nRawId As Integer = EgtGetFirstRawPart()
|
||||||
|
While nRawId <> GDB_ID.NULL
|
||||||
|
Dim nParId As Integer = EgtGetFirstPartInRawPart(nRawId)
|
||||||
|
If EgtVerifyRawPartPhase(nRawId, nPhase) Then
|
||||||
|
While nParId <> GDB_ID.NULL
|
||||||
|
Dim nNextParId As Integer = EgtGetNextPartInRawPart(nParId)
|
||||||
|
' verifico se il pezzo passato è un taglio di sepatazione (il nome deve contenere "SpliCut")
|
||||||
|
Dim sName As String = String.Empty
|
||||||
|
If EgtGetName(nParId, sName) AndAlso sName.Contains(SPLIT_CUT) Then
|
||||||
|
' Rimuovo il pezzo dal grezzo
|
||||||
|
If EgtRemovePartFromRawPart(nParId) Then
|
||||||
|
' Salvo l'indice del pezzo se non è stato già inserito
|
||||||
|
Dim nIndex As Integer = PartList.FirstOrDefault(Function(nId) nId = nParId)
|
||||||
|
If nIndex = 0 Then PartList.Add(nParId)
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
nParId = nNextParId
|
||||||
|
End While
|
||||||
|
End If
|
||||||
|
nRawId = EgtGetNextRawPart(nRawId)
|
||||||
|
End While
|
||||||
|
Next
|
||||||
|
' Reimposto la prima fase del progetto
|
||||||
|
EgtSetCurrPhase(1)
|
||||||
|
' Procedo ad eliminare il pezzo
|
||||||
|
For Each Item As Integer In PartList
|
||||||
|
bOk = bOk And EgtErase(Item)
|
||||||
|
Next
|
||||||
|
Return bOk
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Friend Function ResetAllRawPart() As Boolean
|
||||||
|
Dim nPhase As Integer = 1
|
||||||
|
Dim nOtherRaw As Integer = EgtGetFirstRawPart()
|
||||||
|
While nOtherRaw <> GDB_ID.NULL
|
||||||
|
' se il pezzo non appartiene alla prima fase allora viene eliminato
|
||||||
|
If Not EgtVerifyRawPartPhase(nOtherRaw, nPhase) Then
|
||||||
|
Dim NextRaw As Integer = EgtGetNextRawPart(nOtherRaw)
|
||||||
|
EgtRemoveRawPart(nOtherRaw)
|
||||||
|
nOtherRaw = NextRaw
|
||||||
|
Else
|
||||||
|
nOtherRaw = EgtGetNextRawPart(nOtherRaw)
|
||||||
|
End If
|
||||||
|
End While
|
||||||
|
Return True
|
||||||
|
End Function
|
||||||
|
|
||||||
' verifico che il contorno passato non sia stato separato
|
' verifico che il contorno passato non sia stato separato
|
||||||
Friend Function VerifyOutLoopIsClosed(nIdLayerOutLoop As Integer)
|
Friend Function VerifyOutLoopIsClosed(nIdLayerOutLoop As Integer)
|
||||||
Dim nIdMy As Integer = EgtGetFirstInGroup(nIdLayerOutLoop)
|
Dim nIdMy As Integer = EgtGetFirstInGroup(nIdLayerOutLoop)
|
||||||
@@ -215,9 +408,11 @@ Friend Module CamAuto
|
|||||||
bOk = bOk AndAlso EgtLuaCallFunction("CAM.UpdateAllTp")
|
bOk = bOk AndAlso EgtLuaCallFunction("CAM.UpdateAllTp")
|
||||||
EgtLuaGetGlobIntVar("CAM.ERR", nErr)
|
EgtLuaGetGlobIntVar("CAM.ERR", nErr)
|
||||||
EgtLuaResetGlobVar("CAM")
|
EgtLuaResetGlobVar("CAM")
|
||||||
If nErr <> 0 Then
|
If nErr > 0 Then
|
||||||
bOk = False
|
bOk = False
|
||||||
EgtOutLog("Error in CamAuto : " & nErr.ToString())
|
EgtOutLog("Error in CamAuto : " & nErr.ToString())
|
||||||
|
ElseIf nErr < 0 Then
|
||||||
|
EgtOutLog("Warning in CamAuto : " & nErr.ToString())
|
||||||
End If
|
End If
|
||||||
Return bOk
|
Return bOk
|
||||||
End Function
|
End Function
|
||||||
@@ -231,9 +426,11 @@ Friend Module CamAuto
|
|||||||
bOk = bOk AndAlso EgtLuaCallFunction("CAM.Sort")
|
bOk = bOk AndAlso EgtLuaCallFunction("CAM.Sort")
|
||||||
EgtLuaGetGlobIntVar("CAM.ERR", nErr)
|
EgtLuaGetGlobIntVar("CAM.ERR", nErr)
|
||||||
EgtLuaResetGlobVar("CAM")
|
EgtLuaResetGlobVar("CAM")
|
||||||
If nErr <> 0 Then
|
If nErr > 0 Then
|
||||||
bOk = False
|
bOk = False
|
||||||
EgtOutLog("Error in CamAuto : " & nErr.ToString())
|
EgtOutLog("Error in CamAuto : " & nErr.ToString())
|
||||||
|
ElseIf nErr < 0 Then
|
||||||
|
EgtOutLog("Warning in CamAuto : " & nErr.ToString())
|
||||||
End If
|
End If
|
||||||
Return bOk
|
Return bOk
|
||||||
End Function
|
End Function
|
||||||
@@ -248,9 +445,11 @@ Friend Module CamAuto
|
|||||||
bOk = bOk AndAlso EgtLuaCallFunction("CAM.SpecApplyDisp")
|
bOk = bOk AndAlso EgtLuaCallFunction("CAM.SpecApplyDisp")
|
||||||
EgtLuaGetGlobIntVar("CAM.ERR", nErr)
|
EgtLuaGetGlobIntVar("CAM.ERR", nErr)
|
||||||
EgtLuaResetGlobVar("CAM")
|
EgtLuaResetGlobVar("CAM")
|
||||||
If nErr <> 0 Then
|
If nErr > 0 Then
|
||||||
bOk = False
|
bOk = False
|
||||||
EgtOutLog("Error in CamAuto : " & nErr.ToString())
|
EgtOutLog("Error in CamAuto : " & nErr.ToString())
|
||||||
|
ElseIf nErr < 0 Then
|
||||||
|
EgtOutLog("Warning in CamAuto : " & nErr.ToString())
|
||||||
End If
|
End If
|
||||||
If ResetOrderMachiningFlag Then
|
If ResetOrderMachiningFlag Then
|
||||||
m_MainWindow.m_CurrentProjectPageUC.ResetOrderMachiningFlag()
|
m_MainWindow.m_CurrentProjectPageUC.ResetOrderMachiningFlag()
|
||||||
@@ -266,7 +465,7 @@ Friend Module CamAuto
|
|||||||
EgtGetGroupObjs(EgtGetFirstNameInGroup(nPartId, NAME_UNDERDRILL)) = 0 Then
|
EgtGetGroupObjs(EgtGetFirstNameInGroup(nPartId, NAME_UNDERDRILL)) = 0 Then
|
||||||
Return True
|
Return True
|
||||||
End If
|
End If
|
||||||
' Se tutti i pezzi
|
' Se tutti i pezzi
|
||||||
Else
|
Else
|
||||||
' Salvo fase attualmente corrente
|
' Salvo fase attualmente corrente
|
||||||
Dim nOriPhase As Integer = EgtGetCurrPhase()
|
Dim nOriPhase As Integer = EgtGetCurrPhase()
|
||||||
@@ -393,6 +592,7 @@ Friend Module CamAuto
|
|||||||
Return EgtRemoveOperationHome(nId)
|
Return EgtRemoveOperationHome(nId)
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
' Verifico che per tutte le lavorazioni sia attrezzato l'utensile
|
||||||
Friend Function VerifySetup(ByRef sMissingTools As String) As Boolean
|
Friend Function VerifySetup(ByRef sMissingTools As String) As Boolean
|
||||||
Dim bOk As Boolean = True
|
Dim bOk As Boolean = True
|
||||||
Dim bIsMultiCut = (EgtGetHeadId("H101") <> GDB_ID.NULL)
|
Dim bIsMultiCut = (EgtGetHeadId("H101") <> GDB_ID.NULL)
|
||||||
@@ -407,9 +607,9 @@ Friend Module CamAuto
|
|||||||
Dim sTool2 As String = String.Empty
|
Dim sTool2 As String = String.Empty
|
||||||
EgtGetMachiningParam(MCH_MP.TUUID, sTuuid)
|
EgtGetMachiningParam(MCH_MP.TUUID, sTuuid)
|
||||||
EgtTdbGetToolFromUUID(sTuuid, sTool)
|
EgtTdbGetToolFromUUID(sTuuid, sTool)
|
||||||
If String.IsNullOrWhiteSpace( sTool) Then
|
If String.IsNullOrWhiteSpace(sTool) Then
|
||||||
Dim sMchTool As String = ""
|
Dim sMchTool As String = ""
|
||||||
EgtGetMachiningParam( MCH_MP.TOOL, sMchTool)
|
EgtGetMachiningParam(MCH_MP.TOOL, sMchTool)
|
||||||
bOk = False
|
bOk = False
|
||||||
If sMissingTools.IndexOf(sMchTool) = -1 Then
|
If sMissingTools.IndexOf(sMchTool) = -1 Then
|
||||||
sMissingTools = sMissingTools & sMchTool & ", "
|
sMissingTools = sMissingTools & sMchTool & ", "
|
||||||
@@ -422,8 +622,24 @@ Friend Module CamAuto
|
|||||||
End If
|
End If
|
||||||
sTool2 = sTool & "-2"
|
sTool2 = sTool & "-2"
|
||||||
End If
|
End If
|
||||||
If String.Compare(sTool, m_MainWindow.m_CurrentMachine.sCurrSaw) <> 0 AndAlso
|
If m_MainWindow.m_CurrentMachine.MountedToolConfig = CurrentMachine.MountedToolConfigs.TOOLCHANGERWITHSAW Then
|
||||||
( String.IsNullOrWhiteSpace( sTool2) OrElse String.Compare(sTool2, m_MainWindow.m_CurrentMachine.sCurrSaw) <> 0) AndAlso
|
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
|
String.Compare(sTool, m_MainWindow.m_CurrentMachine.sCurrDripSaw) <> 0 Then
|
||||||
bOk = False
|
bOk = False
|
||||||
If sMissingTools.IndexOf(sTool) = -1 Then
|
If sMissingTools.IndexOf(sTool) = -1 Then
|
||||||
@@ -461,6 +677,8 @@ Friend Module CamAuto
|
|||||||
End If
|
End If
|
||||||
nId = EgtGetNextOperation(nId)
|
nId = EgtGetNextOperation(nId)
|
||||||
End While
|
End While
|
||||||
|
Dim index As Integer = sMissingTools.LastIndexOf(","c)
|
||||||
|
sMissingTools = If(index >= 0, sMissingTools.Remove(index, 1), sMissingTools)
|
||||||
Return bOk
|
Return bOk
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
@@ -487,9 +705,10 @@ Friend Module CamAuto
|
|||||||
Dim dReducedDepth As Double = GetPrivateProfileDouble(S_MACH_NEST, K_MACH_REDUCEDDEPTH, 1, m_MainWindow.GetMachIniFile())
|
Dim dReducedDepth As Double = GetPrivateProfileDouble(S_MACH_NEST, K_MACH_REDUCEDDEPTH, 1, m_MainWindow.GetMachIniFile())
|
||||||
' Ciclo sulle lavorazioni
|
' Ciclo sulle lavorazioni
|
||||||
Dim nOperId As Integer = EgtGetFirstOperation()
|
Dim nOperId As Integer = EgtGetFirstOperation()
|
||||||
|
Dim LocalListOperId As New List(Of Integer)
|
||||||
While nOperId <> GDB_ID.NULL
|
While nOperId <> GDB_ID.NULL
|
||||||
' verifico sia una lavorazione valida di taglio con lama
|
' 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
|
' verifica interferenza
|
||||||
Dim nFlag As Integer = FMI_TYPE.NONE
|
Dim nFlag As Integer = FMI_TYPE.NONE
|
||||||
If Not VerifyComposedMachining(nOperId, nFlag) Then
|
If Not VerifyComposedMachining(nOperId, nFlag) Then
|
||||||
@@ -501,12 +720,14 @@ Friend Module CamAuto
|
|||||||
' se abilitato e attivo waterjet, lo aggiungo per completare il taglio
|
' se abilitato e attivo waterjet, lo aggiungo per completare il taglio
|
||||||
If m_MainWindow.m_CurrentMachine.WaterJettingActive Then
|
If m_MainWindow.m_CurrentMachine.WaterJettingActive Then
|
||||||
Dim nWarn As Integer = 0
|
Dim nWarn As Integer = 0
|
||||||
AddWaterJetMachining(nOperId, nWarn)
|
LocalListOperId.Add(nOperId)
|
||||||
|
'AddWaterJetMachining(nOperId, nWarn)
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
nOperId = EgtGetNextOperation(nOperId)
|
nOperId = EgtGetNextOperation(nOperId)
|
||||||
End While
|
End While
|
||||||
|
If LocalListOperId.Count > 0 Then AddWaterJetMachining(LocalListOperId, 0)
|
||||||
Return bModified
|
Return bModified
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
@@ -610,8 +831,8 @@ Friend Module CamAuto
|
|||||||
If nOriLeadIn <> MCH_SAW_LI.STRICT Then
|
If nOriLeadIn <> MCH_SAW_LI.STRICT Then
|
||||||
EgtSetMachiningParam(MCH_MP.LEADINTYPE, MCH_SAW_LI.STRICT)
|
EgtSetMachiningParam(MCH_MP.LEADINTYPE, MCH_SAW_LI.STRICT)
|
||||||
Dim dUserAddLen As Double = 0
|
Dim dUserAddLen As Double = 0
|
||||||
EgtGetInfo( nMchId, INFO_MCH_USER_SAL, dUserAddLen)
|
EgtGetInfo(nMchId, INFO_MCH_USER_SAL, dUserAddLen)
|
||||||
EgtRemoveInfo( nMchId, INFO_MCH_USER_SAL)
|
EgtRemoveInfo(nMchId, INFO_MCH_USER_SAL)
|
||||||
Dim dAddLen As Double = 0
|
Dim dAddLen As Double = 0
|
||||||
EgtGetMachiningParam(MCH_MP.STARTADDLEN, dAddLen)
|
EgtGetMachiningParam(MCH_MP.STARTADDLEN, dAddLen)
|
||||||
EgtSetMachiningParam(MCH_MP.STARTADDLEN, dAddLen - dUserAddLen - dSafeLen)
|
EgtSetMachiningParam(MCH_MP.STARTADDLEN, dAddLen - dUserAddLen - dSafeLen)
|
||||||
@@ -630,8 +851,8 @@ Friend Module CamAuto
|
|||||||
If nOriLeadOut <> MCH_SAW_LO.STRICT Then
|
If nOriLeadOut <> MCH_SAW_LO.STRICT Then
|
||||||
EgtSetMachiningParam(MCH_MP.LEADOUTTYPE, MCH_SAW_LO.STRICT)
|
EgtSetMachiningParam(MCH_MP.LEADOUTTYPE, MCH_SAW_LO.STRICT)
|
||||||
Dim dUserAddLen As Double = 0
|
Dim dUserAddLen As Double = 0
|
||||||
EgtGetInfo( nMchId, INFO_MCH_USER_EAL, dUserAddLen)
|
EgtGetInfo(nMchId, INFO_MCH_USER_EAL, dUserAddLen)
|
||||||
EgtRemoveInfo( nMchId, INFO_MCH_USER_EAL)
|
EgtRemoveInfo(nMchId, INFO_MCH_USER_EAL)
|
||||||
Dim dAddLen As Double = 0
|
Dim dAddLen As Double = 0
|
||||||
EgtGetMachiningParam(MCH_MP.ENDADDLEN, dAddLen)
|
EgtGetMachiningParam(MCH_MP.ENDADDLEN, dAddLen)
|
||||||
EgtSetMachiningParam(MCH_MP.ENDADDLEN, dAddLen - dUserAddLen - dSafeLen)
|
EgtSetMachiningParam(MCH_MP.ENDADDLEN, dAddLen - dUserAddLen - dSafeLen)
|
||||||
@@ -788,9 +1009,9 @@ Friend Module CamAuto
|
|||||||
Friend Function RemoveAllExitPreCuts() As Boolean
|
Friend Function RemoveAllExitPreCuts() As Boolean
|
||||||
Dim nOperId As Integer = EgtGetFirstOperation()
|
Dim nOperId As Integer = EgtGetFirstOperation()
|
||||||
While nOperId <> GDB_ID.NULL
|
While nOperId <> GDB_ID.NULL
|
||||||
Dim nNextOperId As Integer = EgtGetNextOperation( nOperId)
|
Dim nNextOperId As Integer = EgtGetNextOperation(nOperId)
|
||||||
If EgtGetType( nOperId) <> MCH_OY.DISP AndAlso EgtExistsInfo(nOperId, INFO_MCH_EPC) Then
|
If EgtGetType(nOperId) <> MCH_OY.DISP AndAlso EgtExistsInfo(nOperId, INFO_MCH_EPC) Then
|
||||||
EgtRemoveOperation( nOperId)
|
EgtRemoveOperation(nOperId)
|
||||||
End If
|
End If
|
||||||
nOperId = nNextOperId
|
nOperId = nNextOperId
|
||||||
End While
|
End While
|
||||||
@@ -800,6 +1021,7 @@ Friend Module CamAuto
|
|||||||
Private Function SetLuaStandardCamParams(Optional bDripOk As Boolean = True) As Boolean
|
Private Function SetLuaStandardCamParams(Optional bDripOk As Boolean = True) As Boolean
|
||||||
Dim sMaterial As String = m_MainWindow.m_CurrentMachine.CurrMat.sName
|
Dim sMaterial As String = m_MainWindow.m_CurrentMachine.CurrMat.sName
|
||||||
Dim sSawMch As String = m_MainWindow.m_CurrentMachine.sCurrSawing
|
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 sMillMch As String = m_MainWindow.m_CurrentMachine.sCurrMilling
|
||||||
Dim sDrillMch As String = m_MainWindow.m_CurrentMachine.sCurrDrilling
|
Dim sDrillMch As String = m_MainWindow.m_CurrentMachine.sCurrDrilling
|
||||||
Dim sWaterJetMch As String = m_MainWindow.m_CurrentMachine.sCurrWaterJetting
|
Dim sWaterJetMch As String = m_MainWindow.m_CurrentMachine.sCurrWaterJetting
|
||||||
@@ -818,6 +1040,7 @@ Friend Module CamAuto
|
|||||||
Dim dMillingShort As Double = GetPrivateProfileDouble(S_MACH_NEST, K_MACH_MILLING_SHORTENING, 0, m_MainWindow.GetMachIniFile())
|
Dim dMillingShort As Double = GetPrivateProfileDouble(S_MACH_NEST, K_MACH_MILLING_SHORTENING, 0, m_MainWindow.GetMachIniFile())
|
||||||
EgtLuaSetGlobStringVar("CAM.MATERIAL", sMaterial)
|
EgtLuaSetGlobStringVar("CAM.MATERIAL", sMaterial)
|
||||||
EgtLuaSetGlobStringVar("CAM.SAWMCH", sSawMch)
|
EgtLuaSetGlobStringVar("CAM.SAWMCH", sSawMch)
|
||||||
|
EgtLuaSetGlobStringVar("CAM.SAWTILTEDMCH", sSawTiltedMch)
|
||||||
EgtLuaSetGlobStringVar("CAM.MILLMCH", sMillMch)
|
EgtLuaSetGlobStringVar("CAM.MILLMCH", sMillMch)
|
||||||
EgtLuaSetGlobStringVar("CAM.DRILLMCH", sDrillMch)
|
EgtLuaSetGlobStringVar("CAM.DRILLMCH", sDrillMch)
|
||||||
EgtLuaSetGlobStringVar("CAM.POCKETMCH", sPocketMch)
|
EgtLuaSetGlobStringVar("CAM.POCKETMCH", sPocketMch)
|
||||||
@@ -843,20 +1066,24 @@ Friend Module CamAuto
|
|||||||
If EgtGetTableId(MAIN_TAB) = GDB_ID.NULL Then Return 0
|
If EgtGetTableId(MAIN_TAB) = GDB_ID.NULL Then Return 0
|
||||||
If EgtGetTableId(SECOND_TAB) = GDB_ID.NULL Then Return 1
|
If EgtGetTableId(SECOND_TAB) = GDB_ID.NULL Then Return 1
|
||||||
If EgtGetTableId(THIRD_TAB) = GDB_ID.NULL Then Return 2
|
If EgtGetTableId(THIRD_TAB) = GDB_ID.NULL Then Return 2
|
||||||
Return 3
|
If EgtGetTableId(FORTH_TAB) = GDB_ID.NULL Then Return 3
|
||||||
|
Return 4
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Friend Function GetTableName(nInd As Integer) As String
|
Friend Function GetTableName(nInd As Integer) As String
|
||||||
If nInd = 1 Then Return MAIN_TAB
|
If nInd = 1 Then Return MAIN_TAB
|
||||||
If nInd = 2 Then Return SECOND_TAB
|
If nInd = 2 Then Return SECOND_TAB
|
||||||
If nInd = 3 Then Return THIRD_TAB
|
If nInd = 3 Then Return THIRD_TAB
|
||||||
|
If nInd = 4 Then Return FORTH_TAB
|
||||||
Return ""
|
Return ""
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Friend Function GetCurrentTable() As Integer
|
Friend Function GetCurrentTable() As Integer
|
||||||
Dim sTabName As String = MAIN_TAB
|
Dim sTabName As String = MAIN_TAB
|
||||||
EgtGetTableName(sTabName)
|
EgtGetTableName(sTabName)
|
||||||
If sTabName = THIRD_TAB Then
|
If sTabName = FORTH_TAB Then
|
||||||
|
Return 4
|
||||||
|
ElseIf sTabName = THIRD_TAB Then
|
||||||
Return 3
|
Return 3
|
||||||
ElseIf sTabName = SECOND_TAB Then
|
ElseIf sTabName = SECOND_TAB Then
|
||||||
Return 2
|
Return 2
|
||||||
@@ -977,13 +1204,13 @@ Friend Module CamAuto
|
|||||||
Dim nRawId As Integer = GetCurrentRaw()
|
Dim nRawId As Integer = GetCurrentRaw()
|
||||||
If nRawId = GDB_ID.NULL Then Return False
|
If nRawId = GDB_ID.NULL Then Return False
|
||||||
' Se non ci sono pezzi, esco
|
' 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
|
If nPart1Id = GDB_ID.NULL Then Return True
|
||||||
' Verifico se cornice curva
|
' Verifico se cornice curva
|
||||||
Dim nDir As Integer = 0
|
Dim nDir As Integer = 0
|
||||||
EgtGetInfo(nPart1Id, INFO_FRAME_DIR, nDir)
|
EgtGetInfo(nPart1Id, INFO_FRAME_DIR, nDir)
|
||||||
Dim bSwap As Boolean = ( nDir = 0)
|
Dim bSwap As Boolean = (nDir = 0)
|
||||||
Dim bCurved As Boolean = ( nDir >= 2)
|
Dim bCurved As Boolean = (nDir >= 2)
|
||||||
' Recupero la lavorazione corrente di sgrossatura con lama
|
' Recupero la lavorazione corrente di sgrossatura con lama
|
||||||
Dim sCurrSawRoughing = m_MainWindow.m_CurrentMachine.sCurrSawRoughing
|
Dim sCurrSawRoughing = m_MainWindow.m_CurrentMachine.sCurrSawRoughing
|
||||||
If String.IsNullOrEmpty(sCurrSawRoughing) Then Return True
|
If String.IsNullOrEmpty(sCurrSawRoughing) Then Return True
|
||||||
@@ -1010,8 +1237,8 @@ Friend Module CamAuto
|
|||||||
' Imposto la geometria
|
' Imposto la geometria
|
||||||
EgtSetMachiningGeometry(vId)
|
EgtSetMachiningGeometry(vId)
|
||||||
' Imposto trim iniziale e finale
|
' Imposto trim iniziale e finale
|
||||||
EgtSetMachiningParam(MCH_MP.STARTADDLEN, If( bSwap, -dTrimEnd, -dTrimStart))
|
EgtSetMachiningParam(MCH_MP.STARTADDLEN, If(bSwap, -dTrimEnd, -dTrimStart))
|
||||||
EgtSetMachiningParam(MCH_MP.ENDADDLEN, If( bSwap, -dTrimStart, -dTrimEnd))
|
EgtSetMachiningParam(MCH_MP.ENDADDLEN, If(bSwap, -dTrimStart, -dTrimEnd))
|
||||||
' Se cornice curva, imposto SCC
|
' Se cornice curva, imposto SCC
|
||||||
If bCurved Then EgtSetMachiningParam(MCH_MP.SOLCHOICETYPE, MCH_SCC.ADIR_NEAR)
|
If bCurved Then EgtSetMachiningParam(MCH_MP.SOLCHOICETYPE, MCH_SCC.ADIR_NEAR)
|
||||||
' Applico la lavorazione
|
' Applico la lavorazione
|
||||||
@@ -1026,13 +1253,13 @@ Friend Module CamAuto
|
|||||||
Dim nRawId As Integer = GetCurrentRaw()
|
Dim nRawId As Integer = GetCurrentRaw()
|
||||||
If nRawId = GDB_ID.NULL Then Return False
|
If nRawId = GDB_ID.NULL Then Return False
|
||||||
' Se non ci sono pezzi, esco
|
' 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
|
If nPart1Id = GDB_ID.NULL Then Return True
|
||||||
' Verifico se cornice curva
|
' Verifico se cornice curva
|
||||||
Dim nDir As Integer = 0
|
Dim nDir As Integer = 0
|
||||||
EgtGetInfo( nPart1Id, INFO_FRAME_DIR, nDir)
|
EgtGetInfo(nPart1Id, INFO_FRAME_DIR, nDir)
|
||||||
Dim bSwap As Boolean = ( nDir = 0)
|
Dim bSwap As Boolean = (nDir = 0)
|
||||||
Dim bCurved As Boolean = ( nDir >= 2)
|
Dim bCurved As Boolean = (nDir >= 2)
|
||||||
' Recupero la lavorazione corrente di finitura con lama
|
' Recupero la lavorazione corrente di finitura con lama
|
||||||
Dim sCurrSawFinishing = m_MainWindow.m_CurrentMachine.sCurrSawFinishing
|
Dim sCurrSawFinishing = m_MainWindow.m_CurrentMachine.sCurrSawFinishing
|
||||||
If String.IsNullOrEmpty(sCurrSawFinishing) Then Return True
|
If String.IsNullOrEmpty(sCurrSawFinishing) Then Return True
|
||||||
@@ -1069,8 +1296,8 @@ Friend Module CamAuto
|
|||||||
' Imposto la geometria
|
' Imposto la geometria
|
||||||
EgtSetMachiningGeometry(vId)
|
EgtSetMachiningGeometry(vId)
|
||||||
' Imposto trim iniziale e finale
|
' Imposto trim iniziale e finale
|
||||||
EgtSetMachiningParam(MCH_MP.STARTADDLEN, If( bSwap, -dTrimEnd, -dTrimStart))
|
EgtSetMachiningParam(MCH_MP.STARTADDLEN, If(bSwap, -dTrimEnd, -dTrimStart))
|
||||||
EgtSetMachiningParam(MCH_MP.ENDADDLEN, If( bSwap, -dTrimStart, -dTrimEnd))
|
EgtSetMachiningParam(MCH_MP.ENDADDLEN, If(bSwap, -dTrimStart, -dTrimEnd))
|
||||||
' Se cornice curva, imposto SCC
|
' Se cornice curva, imposto SCC
|
||||||
If bCurved Then EgtSetMachiningParam(MCH_MP.SOLCHOICETYPE, MCH_SCC.ADIR_NEAR)
|
If bCurved Then EgtSetMachiningParam(MCH_MP.SOLCHOICETYPE, MCH_SCC.ADIR_NEAR)
|
||||||
' Applico la lavorazione
|
' Applico la lavorazione
|
||||||
@@ -1085,13 +1312,13 @@ Friend Module CamAuto
|
|||||||
Dim nRawId As Integer = GetCurrentRaw()
|
Dim nRawId As Integer = GetCurrentRaw()
|
||||||
If nRawId = GDB_ID.NULL Then Return False
|
If nRawId = GDB_ID.NULL Then Return False
|
||||||
' Se non ci sono pezzi, esco
|
' 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
|
If nPart1Id = GDB_ID.NULL Then Return True
|
||||||
' Verifico se cornice curva
|
' Verifico se cornice curva
|
||||||
Dim nDir As Integer = 0
|
Dim nDir As Integer = 0
|
||||||
EgtGetInfo(nPart1Id, INFO_FRAME_DIR, nDir)
|
EgtGetInfo(nPart1Id, INFO_FRAME_DIR, nDir)
|
||||||
Dim bSwap As Boolean = ( nDir = 0)
|
Dim bSwap As Boolean = (nDir = 0)
|
||||||
Dim bCurved As Boolean = ( nDir >= 2)
|
Dim bCurved As Boolean = (nDir >= 2)
|
||||||
' Recupero la lavorazione corrente di spatolatura con lama
|
' Recupero la lavorazione corrente di spatolatura con lama
|
||||||
Dim sCurrSawSideFinishing = m_MainWindow.m_CurrentMachine.sCurrSawSideFinishing
|
Dim sCurrSawSideFinishing = m_MainWindow.m_CurrentMachine.sCurrSawSideFinishing
|
||||||
If String.IsNullOrEmpty(sCurrSawSideFinishing) Then Return True
|
If String.IsNullOrEmpty(sCurrSawSideFinishing) Then Return True
|
||||||
@@ -1112,8 +1339,8 @@ Friend Module CamAuto
|
|||||||
' Imposto la geometria
|
' Imposto la geometria
|
||||||
EgtSetMachiningGeometry(vId)
|
EgtSetMachiningGeometry(vId)
|
||||||
' Imposto trim iniziale e finale
|
' Imposto trim iniziale e finale
|
||||||
EgtSetMachiningParam(MCH_MP.STARTADDLEN, If( bSwap, -dTrimEnd, -dTrimStart))
|
EgtSetMachiningParam(MCH_MP.STARTADDLEN, If(bSwap, -dTrimEnd, -dTrimStart))
|
||||||
EgtSetMachiningParam(MCH_MP.ENDADDLEN, If( bSwap, -dTrimStart, -dTrimEnd))
|
EgtSetMachiningParam(MCH_MP.ENDADDLEN, If(bSwap, -dTrimStart, -dTrimEnd))
|
||||||
' Se cornice curva, imposto SCC
|
' Se cornice curva, imposto SCC
|
||||||
If bCurved Then EgtSetMachiningParam(MCH_MP.SOLCHOICETYPE, MCH_SCC.ADIR_NEAR)
|
If bCurved Then EgtSetMachiningParam(MCH_MP.SOLCHOICETYPE, MCH_SCC.ADIR_NEAR)
|
||||||
' Applico la lavorazione
|
' Applico la lavorazione
|
||||||
@@ -1252,14 +1479,14 @@ Friend Module CamAuto
|
|||||||
dStartDist = dEndDist
|
dStartDist = dEndDist
|
||||||
dEndDist = dTemp
|
dEndDist = dTemp
|
||||||
End If
|
End If
|
||||||
' altrimenti
|
' altrimenti
|
||||||
Else
|
Else
|
||||||
Dim vtSide As Vector3d
|
Dim vtSide As Vector3d
|
||||||
' Se faccia non limitata da altre o sopra la limitante
|
' Se faccia non limitata da altre o sopra la limitante
|
||||||
If bFree Then
|
If bFree Then
|
||||||
EgtSetMachiningParam(MCH_MP.FACEUSE, MCH_MIL_FU.ORTUP_DOWN)
|
EgtSetMachiningParam(MCH_MP.FACEUSE, MCH_MIL_FU.ORTUP_DOWN)
|
||||||
vtSide = Vector3d.Z_AX()
|
vtSide = Vector3d.Z_AX()
|
||||||
' altrimenti è stata trovata una faccia adiacente limitante
|
' altrimenti è stata trovata una faccia adiacente limitante
|
||||||
Else
|
Else
|
||||||
If vtAdjN.x > 10 * EPS_SMALL Then
|
If vtAdjN.x > 10 * EPS_SMALL Then
|
||||||
EgtSetMachiningParam(MCH_MP.FACEUSE, MCH_MIL_FU.ORTUP_LEFT)
|
EgtSetMachiningParam(MCH_MP.FACEUSE, MCH_MIL_FU.ORTUP_LEFT)
|
||||||
|
|||||||
+31
-24
@@ -1,11 +1,11 @@
|
|||||||
<UserControl x:Class="CSVPage"
|
<UserControl x:Class="CSVPage"
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
xmlns:self="clr-namespace:OmagCUT.TreeViewItem"
|
xmlns:self="clr-namespace:OmagCUT.TreeViewItem"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
d:DesignHeight="853.3" d:DesignWidth="1280">
|
d:DesignHeight="853.3" d:DesignWidth="1280">
|
||||||
|
|
||||||
<!-- Definizione della SplitPage -->
|
<!-- Definizione della SplitPage -->
|
||||||
<Grid Name="SplitPageGrid" >
|
<Grid Name="SplitPageGrid" >
|
||||||
@@ -27,7 +27,7 @@
|
|||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
<!--Griglia per oscurare i bottoni della pagina sottostante-->
|
<!--Griglia per oscurare i bottoni della pagina sottostante-->
|
||||||
<Grid Background="{DynamicResource OmagCut_Gray}">
|
<Grid Background="{DynamicResource OmagCut_Gray}">
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="1*"/>
|
<ColumnDefinition Width="1*"/>
|
||||||
<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"/>
|
<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>
|
<TreeView.Resources>
|
||||||
<!--Modifico HierarchicalDataTemplate del CathegoryItem per poter inserire immagine e testo e per -->
|
<!--Modifico HierarchicalDataTemplate del CathegoryItem per poter inserire immagine e testo e per -->
|
||||||
<!--renderlo apribile con un solo click -->
|
<!--renderlo apribile con un solo click -->
|
||||||
@@ -62,7 +62,7 @@
|
|||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
<Image Grid.Column="0" Source="{Binding PictureString}" Height="32" Width="32" Margin="0,8,6,4" />
|
<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>
|
</Grid>
|
||||||
|
|
||||||
@@ -123,7 +123,10 @@
|
|||||||
</Setter>
|
</Setter>
|
||||||
<Style.Triggers>
|
<Style.Triggers>
|
||||||
<DataTrigger Binding="{Binding bIsActive}" Value="False">
|
<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>
|
</DataTrigger>
|
||||||
</Style.Triggers>
|
</Style.Triggers>
|
||||||
</Style>
|
</Style>
|
||||||
@@ -131,18 +134,25 @@
|
|||||||
</HierarchicalDataTemplate>
|
</HierarchicalDataTemplate>
|
||||||
<!--Modifico DataTemplate del ToolItem per poter inserire immagine e testo-->
|
<!--Modifico DataTemplate del ToolItem per poter inserire immagine e testo-->
|
||||||
<DataTemplate DataType="{x:Type self:PartCustomItem}">
|
<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>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="1*"/>
|
<ColumnDefinition Width="1*"/>
|
||||||
<ColumnDefinition Width="60"/>
|
<ColumnDefinition Width="60"/>
|
||||||
<ColumnDefinition Width="1*"/>
|
<ColumnDefinition Width="1*"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
<TextBlock Grid.Column="0" Text="{Binding Name}" Height="18" FontSize="14" HorizontalAlignment="Right"/>
|
<TextBlock x:Name="TbName" 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 x:Name="TbText1" 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="TbText2" Grid.Column="2" Text="{Binding sText2}" Height="18" FontSize="14" HorizontalAlignment="Left"/>
|
||||||
|
|
||||||
</Grid>
|
</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>
|
</DataTemplate>
|
||||||
</TreeView.Resources>
|
</TreeView.Resources>
|
||||||
|
|
||||||
@@ -218,15 +228,15 @@
|
|||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
<Button Name="NewBtn" Grid.Column="0"
|
<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" />
|
<Image Source="{DynamicResource CsvNewImg}" Width="65" Height="65" HorizontalAlignment="Center" VerticalAlignment="Center" />
|
||||||
</Button>
|
</Button>
|
||||||
<Button Name="OpenBtn" Grid.Column="1"
|
<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" />
|
<Image Source="{DynamicResource CsvOpenImg}" Width="65" Height="65" HorizontalAlignment="Center" VerticalAlignment="Center" />
|
||||||
</Button>
|
</Button>
|
||||||
<Button Name="RuinedPartsBtn" Grid.Column="2"
|
<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" />
|
<Image Source="{DynamicResource CsvRuinedPartsImg}" Width="65" Height="65" HorizontalAlignment="Center" VerticalAlignment="Center" />
|
||||||
</Button>
|
</Button>
|
||||||
|
|
||||||
@@ -247,22 +257,19 @@
|
|||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
<ToggleButton Name="PlusBtn" Grid.Column="0"
|
<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" />
|
<Image Source="{DynamicResource CsvPlusImg}" Width="65" Height="65" HorizontalAlignment="Center" VerticalAlignment="Center" />
|
||||||
</ToggleButton>
|
</ToggleButton>
|
||||||
<ToggleButton Name="MinusBtn" Grid.Column="1"
|
<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" />
|
<Image Source="{DynamicResource CsvMinusImg}" Width="65" Height="65" HorizontalAlignment="Center" VerticalAlignment="Center" />
|
||||||
</ToggleButton>
|
</ToggleButton>
|
||||||
<Button Name="InsertBtn" Grid.Column="3" Style="{DynamicResource OmagCut_YellowTextButton}" />
|
<Button Name="InsertBtn" Grid.Column="3" Style="{DynamicResource OmagCut_YellowTextButton}" />
|
||||||
<Button Name="RemoveBtn" Grid.Column="4" Style="{DynamicResource OmagCut_YellowTextButton}" />
|
<Button Name="RemoveBtn" Grid.Column="4" Style="{DynamicResource OmagCut_YellowTextButton}" />
|
||||||
|
|
||||||
<Button Name="OkBtn" Grid.Column="6" Style="{DynamicResource OmagCut_GradientBlueIconButton}">
|
<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>
|
</Button>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|||||||
@@ -36,8 +36,8 @@ Public Class CSVPage
|
|||||||
' Assegno la lista dei pezzi Csv come sorgente del treeview
|
' Assegno la lista dei pezzi Csv come sorgente del treeview
|
||||||
PartsTreeView.ItemsSource = m_ItemsList
|
PartsTreeView.ItemsSource = m_ItemsList
|
||||||
' Messaggi
|
' Messaggi
|
||||||
InsertBtn.Content = EgtMsg(MSG_CSVPAGEUC + 2) ' Inserisci
|
InsertBtn.Content = EgtMsg(91202) ' Inserisci
|
||||||
RemoveBtn.Content = EgtMsg(MSG_CSVPAGEUC + 4) ' Rimuovi
|
RemoveBtn.Content = EgtMsg(91204) ' Rimuovi
|
||||||
' Determino se versione semplificata
|
' Determino se versione semplificata
|
||||||
m_bFull = m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.CSV_AUTO) And
|
m_bFull = m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.CSV_AUTO) And
|
||||||
(GetPrivateProfileInt(S_CSV, K_FULL, 1, m_MainWindow.GetIniFile()) <> 0)
|
(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
|
' Eventuale messaggi di pezzi liberi o da altre liste
|
||||||
If bOther Then
|
If bOther Then
|
||||||
' Pezzi non rimossi perché liberi
|
' 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
|
If Not String.IsNullOrWhiteSpace(sOtherCsv) Then
|
||||||
' o di altre liste Csv
|
' o di altre liste Csv
|
||||||
sOut &= EgtMsg(MSG_EGTMSGBOX + 14) & " (" & sOtherCsv.TrimEnd(", ".ToCharArray()) & ")"
|
sOut &= EgtMsg(91114) & " (" & sOtherCsv.TrimEnd(", ".ToCharArray()) & ")"
|
||||||
End If
|
End If
|
||||||
Dim WarnMsg As New EgtMsgBox(m_MainWindow, "", sOut, EgtMsgBox.Buttons.OK, EgtMsgBox.Icons.NULL, 0, 1)
|
Dim WarnMsg As New EgtMsgBox(m_MainWindow, "", sOut, EgtMsgBox.Buttons.OK, EgtMsgBox.Icons.NULL, 0, 1)
|
||||||
End If
|
End If
|
||||||
|
|||||||
+11
-10
@@ -7,7 +7,7 @@
|
|||||||
d:DesignHeight="853.3" d:DesignWidth="1280" Initialized="CadCutPage_Initialized" Loaded="CadCutPage_Loaded" Unloaded="CadCutPage_Unloaded">
|
d:DesignHeight="853.3" d:DesignWidth="1280" Initialized="CadCutPage_Initialized" Loaded="CadCutPage_Loaded" Unloaded="CadCutPage_Unloaded">
|
||||||
|
|
||||||
<!-- Definizione della CadCutPage -->
|
<!-- Definizione della CadCutPage -->
|
||||||
<Grid Name="CadCutPageGrid" >
|
<Grid Name="CadCutPageGrid" >
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="3*"/>
|
<ColumnDefinition Width="3*"/>
|
||||||
<ColumnDefinition Width="12*"/>
|
<ColumnDefinition Width="12*"/>
|
||||||
@@ -30,24 +30,25 @@
|
|||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
<Button Name="PhotoBtn" Grid.Column="0" Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}">
|
<Button Name="PhotoBtn" Grid.Column="0" Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}">
|
||||||
<Image Source="{DynamicResource PhotoImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
<Image Name="PhotoIMG" Source="{DynamicResource PhotoImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||||
</Button>
|
</Button>
|
||||||
<Button Name="RawPartBtn" Grid.Column="1" Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}">
|
<Button Name="RawPartBtn" Grid.Column="1" Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}">
|
||||||
<Image Source="{DynamicResource RawPartImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
<Image Source="{DynamicResource RawPartImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||||
</Button>
|
</Button>
|
||||||
<Button Name="DrawBtn" Grid.Column="2" Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}">
|
<Button Name="DrawBtn" Grid.Column="2" Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}">
|
||||||
<Image Source="{DynamicResource DrawImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
<Image Source="{DynamicResource DrawImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||||
</Button>
|
</Button>
|
||||||
<Button Name="ImportBtn" Grid.Column="3" Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}">
|
<Button Name="ImportBtn" Grid.Column="3" Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}">
|
||||||
<Image Source="{DynamicResource ImportImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
<Image Source="{DynamicResource ImportImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||||
</Button>
|
</Button>
|
||||||
<Button Name="SplitBtn" Grid.Column="4" Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}">
|
<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>
|
</Button>
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
<!-- Definizione della Grid inferiore --><!--
|
<!-- Definizione della Grid inferiore -->
|
||||||
|
<!--
|
||||||
<Grid Name="LowerButtonGrid" Grid.Column="1" Grid.Row="2" >
|
<Grid Name="LowerButtonGrid" Grid.Column="1" Grid.Row="2" >
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="1*"/>
|
<ColumnDefinition Width="1*"/>
|
||||||
|
|||||||
@@ -2,6 +2,8 @@
|
|||||||
Imports EgtWPFLib
|
Imports EgtWPFLib
|
||||||
Imports System.Reflection
|
Imports System.Reflection
|
||||||
Imports System.Globalization
|
Imports System.Globalization
|
||||||
|
Imports EgtWPFLib5
|
||||||
|
Imports System.Windows.Forms
|
||||||
|
|
||||||
Public Class CadCutPageUC
|
Public Class CadCutPageUC
|
||||||
|
|
||||||
@@ -154,9 +156,9 @@ Public Class CadCutPageUC
|
|||||||
' Se modalità fast grid, elimino tutti i pezzi
|
' Se modalità fast grid, elimino tutti i pezzi
|
||||||
If m_CadCutMode = CadCutModes.FastGrid Then
|
If m_CadCutMode = CadCutModes.FastGrid Then
|
||||||
Dim nRawId As Integer = CamAuto.GetCurrentRaw()
|
Dim nRawId As Integer = CamAuto.GetCurrentRaw()
|
||||||
Dim nPartId As Integer = EgtGetFirstPartInRawPart( nRawId)
|
Dim nPartId As Integer = EgtGetFirstPartInRawPart(nRawId)
|
||||||
While nPartId <> GDB_ID.NULL
|
While nPartId <> GDB_ID.NULL
|
||||||
Dim nNextPartId = EgtGetNextPartInRawPart( nPartId)
|
Dim nNextPartId = EgtGetNextPartInRawPart(nPartId)
|
||||||
' Rimuovo dal grezzo
|
' Rimuovo dal grezzo
|
||||||
EgtRemovePartFromRawPart(nPartId)
|
EgtRemovePartFromRawPart(nPartId)
|
||||||
' Rimuovo le lavorazioni
|
' Rimuovo le lavorazioni
|
||||||
@@ -242,7 +244,7 @@ Public Class CadCutPageUC
|
|||||||
' Reinserisco tutte le lavorazioni
|
' Reinserisco tutte le lavorazioni
|
||||||
Dim nWarn As Integer = 0
|
Dim nWarn As Integer = 0
|
||||||
AddMachinings(GDB_ID.NULL, nWarn)
|
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
|
' Imposto flag di modifica
|
||||||
m_SplitPage.m_bShow = False
|
m_SplitPage.m_bShow = False
|
||||||
End If
|
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"
|
<Window x:Class="EditValueWD"
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
|
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
|
||||||
FontFamily="{DynamicResource OmagCut_Font}"
|
FontFamily="{DynamicResource OmagCut_Font}"
|
||||||
ResizeMode="NoResize" WindowStyle="None" AllowsTransparency="True" Background="Transparent"
|
ResizeMode="NoResize" WindowStyle="None" AllowsTransparency="True" Background="Transparent"
|
||||||
Title="EditValueWD" Height="255.9" Width="426.5" ShowInTaskbar="False">
|
Title="EditValueWD" Height="255.9" Width="426.5" ShowInTaskbar="False">
|
||||||
|
|
||||||
<!--Definizione della pagina di scelta del nome con cui salvare il progetto-->
|
<!--Definizione della pagina di scelta del nome con cui salvare il progetto-->
|
||||||
<Border Style="{DynamicResource OmagCut_Border}">
|
<Border Style="{DynamicResource OmagCut_Border}">
|
||||||
@@ -23,9 +23,9 @@
|
|||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
<TextBlock Name="ValueTxbl" Grid.Column="1" Grid.Row="0"
|
<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"
|
<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 Name="ValueCmBx" Grid.Column="1" Grid.Row="1">
|
||||||
<ComboBox.ItemTemplate>
|
<ComboBox.ItemTemplate>
|
||||||
@@ -47,12 +47,12 @@
|
|||||||
<Button Name="OkBtn" Grid.Column="1"
|
<Button Name="OkBtn" Grid.Column="1"
|
||||||
IsDefault="True"
|
IsDefault="True"
|
||||||
Style="{DynamicResource OmagCut_GradientBlueIconButton}">
|
Style="{DynamicResource OmagCut_GradientBlueIconButton}">
|
||||||
<Image Source="{DynamicResource VImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
<Image Source="{DynamicResource VImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||||
</Button>
|
</Button>
|
||||||
<Button Name="ExitBtn" Grid.Column="3"
|
<Button Name="ExitBtn" Grid.Column="3"
|
||||||
IsCancel="True"
|
IsCancel="True"
|
||||||
Style="{DynamicResource OmagCut_GradientBlueIconButton}">
|
Style="{DynamicResource OmagCut_GradientBlueIconButton}">
|
||||||
<Image Source="{DynamicResource XImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
<Image Source="{DynamicResource XImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||||
</Button>
|
</Button>
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|||||||
@@ -1,7 +1,4 @@
|
|||||||
Imports System.IO
|
Imports System.Collections.ObjectModel
|
||||||
Imports EgtUILib
|
|
||||||
Imports EgtWPFLib
|
|
||||||
Imports System.Collections.ObjectModel
|
|
||||||
|
|
||||||
Public Class EditValueWD
|
Public Class EditValueWD
|
||||||
|
|
||||||
|
|||||||
@@ -7,7 +7,6 @@
|
|||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
d:DesignHeight="853.3" d:DesignWidth="1280">
|
d:DesignHeight="853.3" d:DesignWidth="1280">
|
||||||
|
|
||||||
|
|
||||||
<!-- Definizione della NestPage -->
|
<!-- Definizione della NestPage -->
|
||||||
<Grid Name="FastGridSlabGrid" >
|
<Grid Name="FastGridSlabGrid" >
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
@@ -46,7 +45,7 @@
|
|||||||
Grid.Row="0" Grid.Column="0"
|
Grid.Row="0" Grid.Column="0"
|
||||||
Style="{DynamicResource OmagCut_CurrProjSummeryTextBlock}"/>
|
Style="{DynamicResource OmagCut_CurrProjSummeryTextBlock}"/>
|
||||||
<EgtWPFLib:EgtTextBox Name="OrderTxBx"
|
<EgtWPFLib:EgtTextBox Name="OrderTxBx"
|
||||||
Grid.Row="0" Grid.Column="1"
|
Grid.Row="0" Grid.Column="1"
|
||||||
Margin="13,0,6,0"
|
Margin="13,0,6,0"
|
||||||
Style="{DynamicResource OmagCut_KeyboardTextBox}"/>
|
Style="{DynamicResource OmagCut_KeyboardTextBox}"/>
|
||||||
|
|
||||||
@@ -67,11 +66,11 @@
|
|||||||
|
|
||||||
<UniformGrid Columns="3" >
|
<UniformGrid Columns="3" >
|
||||||
<ToggleButton Name="Type1Btn"
|
<ToggleButton Name="Type1Btn"
|
||||||
Style="{StaticResource OmagCut_DisabledYellowToggleButton}"/>
|
Style="{DynamicResource OmagCut_DisabledYellowToggleButton}"/>
|
||||||
<ToggleButton Name="Type2Btn"
|
<ToggleButton Name="Type2Btn"
|
||||||
Style="{StaticResource OmagCut_DisabledYellowToggleButton}" />
|
Style="{DynamicResource OmagCut_DisabledYellowToggleButton}" />
|
||||||
<ToggleButton Name="Type3Btn"
|
<ToggleButton Name="Type3Btn"
|
||||||
Style="{StaticResource OmagCut_DisabledYellowToggleButton}" />
|
Style="{DynamicResource OmagCut_DisabledYellowToggleButton}" />
|
||||||
</UniformGrid>
|
</UniformGrid>
|
||||||
|
|
||||||
<Grid>
|
<Grid>
|
||||||
@@ -82,11 +81,11 @@
|
|||||||
<ColumnDefinition Width="0.5*"/>
|
<ColumnDefinition Width="0.5*"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<ToggleButton Name="Type4Btn"
|
<ToggleButton Name="Type4Btn"
|
||||||
Grid.Column="1"
|
Grid.Column="1"
|
||||||
Style="{StaticResource OmagCut_DisabledYellowToggleButton}"/>
|
Style="{DynamicResource OmagCut_DisabledYellowToggleButton}"/>
|
||||||
<ToggleButton Name="Type5Btn"
|
<ToggleButton Name="Type5Btn"
|
||||||
Grid.Column="2"
|
Grid.Column="2"
|
||||||
Style="{StaticResource OmagCut_DisabledYellowToggleButton}"/>
|
Style="{DynamicResource OmagCut_DisabledYellowToggleButton}"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
</UniformGrid>
|
</UniformGrid>
|
||||||
@@ -94,13 +93,13 @@
|
|||||||
|
|
||||||
<Button Name="ConfirmOrderBtn"
|
<Button Name="ConfirmOrderBtn"
|
||||||
Grid.Row="3"
|
Grid.Row="3"
|
||||||
Style="{StaticResource OmagCut_YellowTextButton}" />
|
Style="{DynamicResource OmagCut_YellowTextButton}" />
|
||||||
|
|
||||||
<UniformGrid Grid.Row="4" Columns="2" >
|
<UniformGrid Grid.Row="4" Columns="2" >
|
||||||
<Button Name="InsertPiecesBtn"
|
<Button Name="InsertPiecesBtn"
|
||||||
Style="{StaticResource OmagCut_YellowTextButton}" />
|
Style="{DynamicResource OmagCut_YellowTextButton}" />
|
||||||
<ToggleButton Name="LastSlabBtn"
|
<ToggleButton Name="LastSlabBtn"
|
||||||
Style="{StaticResource OmagCut_YellowToggleButton}" />
|
Style="{DynamicResource OmagCut_YellowToggleButton}" />
|
||||||
</UniformGrid>
|
</UniformGrid>
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|||||||
@@ -19,12 +19,12 @@ Public Class FastGridSlabManager
|
|||||||
|
|
||||||
Private Sub FastGridSlabManager_Initialized(sender As Object, e As EventArgs) Handles Me.Initialized
|
Private Sub FastGridSlabManager_Initialized(sender As Object, e As EventArgs) Handles Me.Initialized
|
||||||
' Imposto i messaggi letti dal file dei messaggi
|
' Imposto i messaggi letti dal file dei messaggi
|
||||||
OrderTxBl.Text = EgtMsg(MSG_FASTGRIDPAGEUC) 'Order name - Nome ordine
|
OrderTxBl.Text = EgtMsg(90480) ' Order name - Nome ordine
|
||||||
CurrSlabTxBl.Text = EgtMsg(MSG_FASTGRIDPAGEUC + 1) 'Curr slab - Lastra corrente
|
CurrSlabTxBl.Text = EgtMsg(90481) ' Curr slab - Lastra corrente
|
||||||
PieceTypeGpBx.Header = EgtMsg(MSG_FASTGRIDPAGEUC + 3) 'Piece type - Tipo pezzo
|
PieceTypeGpBx.Header = EgtMsg(90483) ' Piece type - Tipo pezzo
|
||||||
ConfirmOrderBtn.Content = EgtMsg(MSG_FASTGRIDPAGEUC + 5) 'Confirm order - Conferma ordine
|
ConfirmOrderBtn.Content = EgtMsg(90485) ' Confirm order - Conferma ordine
|
||||||
InsertPiecesBtn.Content = EgtMsg(MSG_FASTGRIDPAGEUC + 4) 'Insert pieces - Inserisci pezzi
|
InsertPiecesBtn.Content = EgtMsg(90484) ' Insert pieces - Inserisci pezzi
|
||||||
LastSlabBtn.Content = EgtMsg(MSG_FASTGRIDPAGEUC + 2) 'Last slab - Ultima lastra
|
LastSlabBtn.Content = EgtMsg(90482) ' Last slab - Ultima lastra
|
||||||
' Leggo dati da ini
|
' Leggo dati da ini
|
||||||
GetPrivateProfileString(S_FASTGRID, K_FG_ORDER, "", OrderTxBx.Text, m_MainWindow.GetIniFile())
|
GetPrivateProfileString(S_FASTGRID, K_FG_ORDER, "", OrderTxBx.Text, m_MainWindow.GetIniFile())
|
||||||
m_nCurrSlab = GetPrivateProfileInt(S_FASTGRID, K_FG_CURRSLAB, 0, m_MainWindow.GetIniFile())
|
m_nCurrSlab = GetPrivateProfileInt(S_FASTGRID, K_FG_CURRSLAB, 0, m_MainWindow.GetIniFile())
|
||||||
|
|||||||
@@ -1,100 +1,100 @@
|
|||||||
<Window x:Class="ModifStartEndWD"
|
<Window x:Class="ModifStartEndWD"
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
|
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
|
||||||
FontFamily="{DynamicResource OmagCut_Font}"
|
FontFamily="{DynamicResource OmagCut_Font}"
|
||||||
ResizeMode="NoResize" WindowStyle="None" AllowsTransparency="True" Background="Transparent"
|
ResizeMode="NoResize" WindowStyle="None" AllowsTransparency="True" Background="Transparent"
|
||||||
Title="ModifStartEndWD" Height="405.9" Width="426.5" ShowInTaskbar="False">
|
Title="ModifStartEndWD" Height="405.9" Width="426.5" ShowInTaskbar="False">
|
||||||
|
|
||||||
<!--Definizione della pagina di scelta del nome con cui salvare il progetto-->
|
<!--Definizione della pagina di scelta del nome con cui salvare il progetto-->
|
||||||
<Border Style="{DynamicResource OmagCut_Border}">
|
<Border Style="{DynamicResource OmagCut_Border}">
|
||||||
<Grid x:Name="SaveNameGrid">
|
<Grid x:Name="SaveNameGrid">
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="0.5*"/>
|
<ColumnDefinition Width="0.5*"/>
|
||||||
<ColumnDefinition Width="2*"/>
|
<ColumnDefinition Width="2*"/>
|
||||||
<ColumnDefinition Width="2*"/>
|
<ColumnDefinition Width="2*"/>
|
||||||
<ColumnDefinition Width="0.5*"/>
|
<ColumnDefinition Width="0.5*"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<Grid.RowDefinitions>
|
<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="1*"/>
|
<RowDefinition Height="1*"/>
|
||||||
<RowDefinition Height="0.5*"/>-->
|
<RowDefinition Height="0.5*"/>-->
|
||||||
<RowDefinition Height="0.5*"/>
|
<RowDefinition Height="0.5*"/>
|
||||||
<RowDefinition Height="0.5*"/>
|
<RowDefinition Height="0.5*"/>
|
||||||
<RowDefinition Height="0.5*"/>
|
<RowDefinition Height="0.5*"/>
|
||||||
<RowDefinition Height="0.5*"/>
|
<RowDefinition Height="0.5*"/>
|
||||||
<RowDefinition Height="0.5*"/>
|
<RowDefinition Height="0.5*"/>
|
||||||
<RowDefinition Height="0.5*"/>
|
<RowDefinition Height="0.5*"/>
|
||||||
<RowDefinition Height="0.5*"/>
|
<RowDefinition Height="0.5*"/>
|
||||||
<RowDefinition Height="1*"/>
|
<RowDefinition Height="1*"/>
|
||||||
<RowDefinition Height="0.5*"/>
|
<RowDefinition Height="0.5*"/>
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
<TextBlock Name="TitleTxbl" Grid.Column="1" Grid.ColumnSpan="2" Grid.Row="0"
|
<TextBlock Name="TitleTxbl" Grid.Column="1" Grid.ColumnSpan="2" Grid.Row="0"
|
||||||
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||||
|
|
||||||
<TextBlock Name="HoleTxbl" Grid.Column="1" Grid.Row="1"
|
<TextBlock Name="HoleTxbl" Grid.Column="1" Grid.Row="1"
|
||||||
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||||
<CheckBox Name="HoleChBx" Grid.Column="2" Grid.Row="1" HorizontalAlignment="Center"
|
<CheckBox Name="HoleChBx" Grid.Column="2" Grid.Row="1" HorizontalAlignment="Center"
|
||||||
Style="{DynamicResource OmagCut_CheckBox}"/>
|
Style="{DynamicResource OmagCut_CheckBox}"/>
|
||||||
|
|
||||||
<TextBlock Name="ElongationTxbl" Grid.Column="1" Grid.Row="2"
|
<TextBlock Name="ElongationTxbl" Grid.Column="1" Grid.Row="2"
|
||||||
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||||
<EgtWPFLib:EgtTextBox Name="ElongationTxBx" Grid.Column="2" Grid.Row="2"
|
<EgtWPFLib:EgtTextBox Name="ElongationTxBx" Grid.Column="2" Grid.Row="2"
|
||||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||||
|
|
||||||
<TextBlock Name="LeadInTxbl" Grid.Column="1" Grid.Row="3"
|
<TextBlock Name="LeadInTxbl" Grid.Column="1" Grid.Row="3"
|
||||||
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||||
<ComboBox Name="LeadInCmBx" Grid.Column="2" Grid.Row="3"
|
<ComboBox Name="LeadInCmBx" Grid.Column="2" Grid.Row="3"
|
||||||
Style="{DynamicResource OmagCut_ComboBox}"/>
|
Style="{DynamicResource OmagCut_ComboBox}"/>
|
||||||
|
|
||||||
<TextBlock Name="LeadOutTxbl" Grid.Column="1" Grid.Row="3"
|
<TextBlock Name="LeadOutTxbl" Grid.Column="1" Grid.Row="3"
|
||||||
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||||
<ComboBox Name="LeadOutCmBx" Grid.Column="2" Grid.Row="3"
|
<ComboBox Name="LeadOutCmBx" Grid.Column="2" Grid.Row="3"
|
||||||
Style="{DynamicResource OmagCut_ComboBox}"/>
|
Style="{DynamicResource OmagCut_ComboBox}"/>
|
||||||
|
|
||||||
<TextBlock Name="TangDistTxbl" Grid.Column="1" Grid.Row="4"
|
<TextBlock Name="TangDistTxbl" Grid.Column="1" Grid.Row="4"
|
||||||
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||||
<EgtWPFLib:EgtTextBox Name="LiTangDistTxBx" Grid.Column="2" Grid.Row="4"
|
<EgtWPFLib:EgtTextBox Name="LiTangDistTxBx" Grid.Column="2" Grid.Row="4"
|
||||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||||
|
|
||||||
<TextBlock Name="PerpDistTxbl" Grid.Column="1" Grid.Row="5"
|
<TextBlock Name="PerpDistTxbl" Grid.Column="1" Grid.Row="5"
|
||||||
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||||
<EgtWPFLib:EgtTextBox Name="LiPerpDistTxBx" Grid.Column="2" Grid.Row="5"
|
<EgtWPFLib:EgtTextBox Name="LiPerpDistTxBx" Grid.Column="2" Grid.Row="5"
|
||||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||||
|
|
||||||
<EgtWPFLib:EgtTextBox Name="LoTangDistTxBx" Grid.Column="2" Grid.Row="4"
|
<EgtWPFLib:EgtTextBox Name="LoTangDistTxBx" Grid.Column="2" Grid.Row="4"
|
||||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||||
|
|
||||||
<EgtWPFLib:EgtTextBox Name="LoPerpDistTxBx" Grid.Column="2" Grid.Row="5"
|
<EgtWPFLib:EgtTextBox Name="LoPerpDistTxBx" Grid.Column="2" Grid.Row="5"
|
||||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||||
|
|
||||||
<Grid Name="ButtonsGrid" Grid.Column="1" Grid.ColumnSpan="2" Grid.Row="7" Grid.RowSpan="1">
|
<Grid Name="ButtonsGrid" Grid.Column="1" Grid.ColumnSpan="2" Grid.Row="7" Grid.RowSpan="1">
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="0.5*"/>
|
<ColumnDefinition Width="0.5*"/>
|
||||||
<ColumnDefinition Width="1*"/>
|
<ColumnDefinition Width="1*"/>
|
||||||
<ColumnDefinition Width="1*"/>
|
<ColumnDefinition Width="1*"/>
|
||||||
<ColumnDefinition Width="1*"/>
|
<ColumnDefinition Width="1*"/>
|
||||||
<ColumnDefinition Width="0.5*"/>
|
<ColumnDefinition Width="0.5*"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
<Button Name="OkBtn" Grid.Column="1"
|
<Button Name="OkBtn" Grid.Column="1"
|
||||||
Style="{DynamicResource OmagCut_GradientBlueIconButton}">
|
Style="{DynamicResource OmagCut_GradientBlueIconButton}">
|
||||||
<Image Source="{DynamicResource VImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
<Image Source="{DynamicResource VImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||||
</Button>
|
</Button>
|
||||||
<Button Name="ExitBtn" Grid.Column="3"
|
<Button Name="ExitBtn" Grid.Column="3"
|
||||||
IsCancel="True"
|
IsCancel="True"
|
||||||
Style="{DynamicResource OmagCut_GradientBlueIconButton}">
|
Style="{DynamicResource OmagCut_GradientBlueIconButton}">
|
||||||
<Image Source="{DynamicResource XImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
<Image Source="{DynamicResource XImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||||
</Button>
|
</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 EgtUILib
|
||||||
Imports EgtWPFLib
|
|
||||||
|
|
||||||
Public Class ModifStartEndWD
|
Public Class ModifStartEndWD
|
||||||
|
|
||||||
@@ -47,16 +45,16 @@ Public Class ModifStartEndWD
|
|||||||
Me.Left = Owner.Left + Owner.Width / 2 - Me.Width / 2
|
Me.Left = Owner.Left + Owner.Width / 2 - Me.Width / 2
|
||||||
|
|
||||||
' Imposto i messaggi letti dal file dei messaggi
|
' Imposto i messaggi letti dal file dei messaggi
|
||||||
ElongationTxbl.Text = EgtMsg(MSG_SPLITPAGEUC + 35)
|
ElongationTxbl.Text = EgtMsg(90375) ' Allungamento
|
||||||
HoleTxbl.Text = EgtMsg(90875)
|
HoleTxbl.Text = EgtMsg(90875) ' Foro di attacco
|
||||||
LeadInTxbl.Text = EgtMsg(90769)
|
LeadInTxbl.Text = EgtMsg(90769) ' Attacco
|
||||||
LeadOutTxbl.Text = EgtMsg(90771)
|
LeadOutTxbl.Text = EgtMsg(90771) ' Uscita
|
||||||
TangDistTxbl.Text = EgtMsg(90890)
|
TangDistTxbl.Text = EgtMsg(90890) ' Dist. tang.
|
||||||
PerpDistTxbl.Text = EgtMsg(90891)
|
PerpDistTxbl.Text = EgtMsg(90891) ' Dist. perp.
|
||||||
|
|
||||||
' Mostro/Nascondo elementi in base a Inizio/Fine Modif.
|
' Mostro/Nascondo elementi in base a Inizio/Fine Modif.
|
||||||
If bIsLeadIn Then
|
If bIsLeadIn Then
|
||||||
TitleTxbl.Text = EgtMsg(MSG_SPLITPAGEUC + 33)
|
TitleTxbl.Text = EgtMsg(90373) ' Inizio Modif.
|
||||||
HoleTxbl.Visibility = Windows.Visibility.Visible
|
HoleTxbl.Visibility = Windows.Visibility.Visible
|
||||||
HoleChBx.Visibility = Windows.Visibility.Visible
|
HoleChBx.Visibility = Windows.Visibility.Visible
|
||||||
LeadInTxbl.Visibility = Windows.Visibility.Visible
|
LeadInTxbl.Visibility = Windows.Visibility.Visible
|
||||||
@@ -64,16 +62,16 @@ Public Class ModifStartEndWD
|
|||||||
LeadOutTxbl.Visibility = Windows.Visibility.Hidden
|
LeadOutTxbl.Visibility = Windows.Visibility.Hidden
|
||||||
LeadOutCmBx.Visibility = Windows.Visibility.Hidden
|
LeadOutCmBx.Visibility = Windows.Visibility.Hidden
|
||||||
LeadInType = New ObservableCollection(Of IdNameStruct)(
|
LeadInType = New ObservableCollection(Of IdNameStruct)(
|
||||||
{New IdNameStruct(MCH_MIL_LI.NONE, EgtMsg(MSG_COMBOBOXPARAM + 42)),
|
{New IdNameStruct(MCH_MIL_LI.NONE, EgtMsg(90842)), ' Nessuno
|
||||||
New IdNameStruct(MCH_MIL_LI.LINEAR, EgtMsg(MSG_COMBOBOXPARAM + 46)),
|
New IdNameStruct(MCH_MIL_LI.LINEAR, EgtMsg(90846)), ' Lineare
|
||||||
New IdNameStruct(MCH_MIL_LI.TANGENT, EgtMsg(MSG_COMBOBOXPARAM + 47))})
|
New IdNameStruct(MCH_MIL_LI.TANGENT, EgtMsg(90847))}) ' Tangente
|
||||||
LeadInCmBx.ItemsSource = LeadInType
|
LeadInCmBx.ItemsSource = LeadInType
|
||||||
LiTangDistTxBx.Visibility = Windows.Visibility.Visible
|
LiTangDistTxBx.Visibility = Windows.Visibility.Visible
|
||||||
LiPerpDistTxBx.Visibility = Windows.Visibility.Visible
|
LiPerpDistTxBx.Visibility = Windows.Visibility.Visible
|
||||||
LoTangDistTxBx.Visibility = Windows.Visibility.Hidden
|
LoTangDistTxBx.Visibility = Windows.Visibility.Hidden
|
||||||
LoPerpDistTxBx.Visibility = Windows.Visibility.Hidden
|
LoPerpDistTxBx.Visibility = Windows.Visibility.Hidden
|
||||||
Else
|
Else
|
||||||
TitleTxbl.Text = EgtMsg(MSG_SPLITPAGEUC + 34)
|
TitleTxbl.Text = EgtMsg(90374) ' Fine Modif.
|
||||||
HoleTxbl.Visibility = Windows.Visibility.Hidden
|
HoleTxbl.Visibility = Windows.Visibility.Hidden
|
||||||
HoleChBx.Visibility = Windows.Visibility.Hidden
|
HoleChBx.Visibility = Windows.Visibility.Hidden
|
||||||
LeadInTxbl.Visibility = Windows.Visibility.Hidden
|
LeadInTxbl.Visibility = Windows.Visibility.Hidden
|
||||||
@@ -81,10 +79,10 @@ Public Class ModifStartEndWD
|
|||||||
LeadOutTxbl.Visibility = Windows.Visibility.Visible
|
LeadOutTxbl.Visibility = Windows.Visibility.Visible
|
||||||
LeadOutCmBx.Visibility = Windows.Visibility.Visible
|
LeadOutCmBx.Visibility = Windows.Visibility.Visible
|
||||||
LeadOutType = New ObservableCollection(Of IdNameStruct)(
|
LeadOutType = New ObservableCollection(Of IdNameStruct)(
|
||||||
{New IdNameStruct(MCH_MIL_LO.NONE, EgtMsg(MSG_COMBOBOXPARAM + 42)),
|
{New IdNameStruct(MCH_MIL_LO.NONE, EgtMsg(90842)), ' Nessuno
|
||||||
New IdNameStruct(MCH_MIL_LO.LINEAR, EgtMsg(MSG_COMBOBOXPARAM + 46)),
|
New IdNameStruct(MCH_MIL_LO.LINEAR, EgtMsg(90846)), ' Lineare
|
||||||
New IdNameStruct(MCH_MIL_LO.TANGENT, EgtMsg(MSG_COMBOBOXPARAM + 47)),
|
New IdNameStruct(MCH_MIL_LO.TANGENT, EgtMsg(90847)), ' Tangente
|
||||||
New IdNameStruct(MCH_MIL_LO.AS_LI, EgtMsg(MSG_COMBOBOXPARAM + 50))})
|
New IdNameStruct(MCH_MIL_LO.AS_LI, EgtMsg(90850))}) ' Come attacco
|
||||||
LeadOutCmBx.ItemsSource = LeadOutType
|
LeadOutCmBx.ItemsSource = LeadOutType
|
||||||
LiTangDistTxBx.Visibility = Windows.Visibility.Hidden
|
LiTangDistTxBx.Visibility = Windows.Visibility.Hidden
|
||||||
LiPerpDistTxBx.Visibility = Windows.Visibility.Hidden
|
LiPerpDistTxBx.Visibility = Windows.Visibility.Hidden
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
<UserControl x:Class="MoveRawPartPage"
|
<UserControl x:Class="MoveRawPartPage"
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
|
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
d:DesignHeight="853.3" d:DesignWidth="1280">
|
d:DesignHeight="853.3" d:DesignWidth="1280">
|
||||||
|
|
||||||
<!-- Definizione della SplitPage -->
|
<!-- Definizione della SplitPage -->
|
||||||
<Grid Name="SplitPageGrid" >
|
<Grid Name="SplitPageGrid" >
|
||||||
@@ -36,10 +36,10 @@
|
|||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
<Button Name="PrevBtn" Grid.Column="0" Style="{DynamicResource OmagCut_YellowIconButton}">
|
<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>
|
||||||
<Button Name="NextBtn" Grid.Column="1" Style="{DynamicResource OmagCut_YellowIconButton}">
|
<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>
|
<Image.RenderTransform>
|
||||||
<TransformGroup>
|
<TransformGroup>
|
||||||
<RotateTransform Angle="180"/>
|
<RotateTransform Angle="180"/>
|
||||||
@@ -72,47 +72,47 @@
|
|||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
<Button Name="TopLBtn" Grid.Column="0" Grid.Row="1"
|
<Button Name="TopLBtn" Grid.Column="0" Grid.Row="1"
|
||||||
Style="{DynamicResource OmagCut_TopGrayGradientYellowButton}">
|
Style="{DynamicResource OmagCut_TopGrayGradientYellowButton}">
|
||||||
<Image Source="{DynamicResource TopLeftImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
<Image Source="{DynamicResource TopLeftImg}" Style="{DynamicResource OmagCut_ArrowButtonIcon}"/>
|
||||||
</Button>
|
</Button>
|
||||||
<Button Name="UpBtn" Grid.Column="1" Grid.Row="1"
|
<Button Name="UpBtn" Grid.Column="1" Grid.Row="1"
|
||||||
Style="{DynamicResource OmagCut_TopGrayGradientYellowButton}">
|
Style="{DynamicResource OmagCut_TopGrayGradientYellowButton}">
|
||||||
<Image Source="{DynamicResource UpArrowImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
<Image Source="{DynamicResource UpArrowImg}" Style="{DynamicResource OmagCut_ArrowButtonIcon}"/>
|
||||||
</Button>
|
</Button>
|
||||||
<Button Name="TopRBtn" Grid.Column="2" Grid.Row="1"
|
<Button Name="TopRBtn" Grid.Column="2" Grid.Row="1"
|
||||||
Style="{DynamicResource OmagCut_TopGrayGradientYellowButton}">
|
Style="{DynamicResource OmagCut_TopGrayGradientYellowButton}">
|
||||||
<Image Source="{DynamicResource TopRightImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
<Image Source="{DynamicResource TopRightImg}" Style="{DynamicResource OmagCut_ArrowButtonIcon}"/>
|
||||||
</Button>
|
</Button>
|
||||||
<Button Name="LeftBtn" Grid.Column="0" Grid.Row="2"
|
<Button Name="LeftBtn" Grid.Column="0" Grid.Row="2"
|
||||||
Style="{DynamicResource OmagCut_LeftGrayGradientYellowButton}">
|
Style="{DynamicResource OmagCut_LeftGrayGradientYellowButton}">
|
||||||
<Image Source="{DynamicResource LeftArrowImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
<Image Source="{DynamicResource LeftArrowImg}" Style="{DynamicResource OmagCut_ArrowButtonIcon}"/>
|
||||||
</Button>
|
</Button>
|
||||||
<EgtWPFLib:EgtTextBox Name="StepMoveTxBx" Grid.Column="1" Grid.Row="2" Width="50"
|
<EgtWPFLib:EgtTextBox Name="StepMoveTxBx" Grid.Column="1" Grid.Row="2" Width="50"
|
||||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||||
<Button Name="ResetBtn" Grid.Column="1" Grid.Row="2"
|
<Button Name="ResetBtn" Grid.Column="1" Grid.Row="2"
|
||||||
Style="{DynamicResource OmagCut_YellowTextButton}">
|
Style="{DynamicResource OmagCut_YellowTextButton}">
|
||||||
</Button>
|
</Button>
|
||||||
<Button Name="RightBtn" Grid.Column="2" Grid.Row="2"
|
<Button Name="RightBtn" Grid.Column="2" Grid.Row="2"
|
||||||
Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}">
|
Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}">
|
||||||
<Image Source="{DynamicResource RightArrowImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
<Image Source="{DynamicResource RightArrowImg}" Style="{DynamicResource OmagCut_ArrowButtonIcon}"/>
|
||||||
</Button>
|
</Button>
|
||||||
<Button Name="BottomLBtn" Grid.Column="0" Grid.Row="3"
|
<Button Name="BottomLBtn" Grid.Column="0" Grid.Row="3"
|
||||||
Style="{DynamicResource OmagCut_BottomGrayGradientYellowButton}">
|
Style="{DynamicResource OmagCut_BottomGrayGradientYellowButton}">
|
||||||
<Image Source="{DynamicResource BottomLeftImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
<Image Source="{DynamicResource BottomLeftImg}" Style="{DynamicResource OmagCut_ArrowButtonIcon}"/>
|
||||||
</Button>
|
</Button>
|
||||||
<Button Name="DownBtn" Grid.Column="1" Grid.Row="3"
|
<Button Name="DownBtn" Grid.Column="1" Grid.Row="3"
|
||||||
Style="{DynamicResource OmagCut_BottomGrayGradientYellowButton}">
|
Style="{DynamicResource OmagCut_BottomGrayGradientYellowButton}">
|
||||||
<Image Source="{DynamicResource DownArrowImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
<Image Source="{DynamicResource DownArrowImg}" Style="{DynamicResource OmagCut_ArrowButtonIcon}"/>
|
||||||
</Button>
|
</Button>
|
||||||
<Button Name="BottomRBtn" Grid.Column="2" Grid.Row="3"
|
<Button Name="BottomRBtn" Grid.Column="2" Grid.Row="3"
|
||||||
Style="{DynamicResource OmagCut_BottomGrayGradientYellowButton}">
|
Style="{DynamicResource OmagCut_BottomGrayGradientYellowButton}">
|
||||||
<Image Source="{DynamicResource BottomRightImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
<Image Source="{DynamicResource BottomRightImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||||
</Button>
|
</Button>
|
||||||
|
|
||||||
<Button Name="RotateCounterClockwiseBtn" Grid.Column="0" Grid.Row="4"
|
<Button Name="RotateCounterClockwiseBtn" Grid.Column="0" Grid.Row="4"
|
||||||
Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}">
|
Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}">
|
||||||
<Image Source="{DynamicResource CounterClockwiseRotateImg}" Width="64" Height="65" HorizontalAlignment="Center"
|
<Image Source="{DynamicResource CounterClockwiseRotateImg}" Width="64" Height="65" HorizontalAlignment="Center"
|
||||||
VerticalAlignment="Center" />
|
VerticalAlignment="Center" />
|
||||||
</Button>
|
</Button>
|
||||||
|
|
||||||
<Grid Name="RotationAngle" Grid.Column="1" Grid.Row="4" HorizontalAlignment="Center" VerticalAlignment="Center">
|
<Grid Name="RotationAngle" Grid.Column="1" Grid.Row="4" HorizontalAlignment="Center" VerticalAlignment="Center">
|
||||||
@@ -121,26 +121,29 @@
|
|||||||
<ColumnDefinition Width="Auto"/>
|
<ColumnDefinition Width="Auto"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<EgtWPFLib:EgtTextBox Name="RotationAngleTxBx" Width="50" IsLength="False"
|
<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"
|
<TextBlock Grid.Column="1" FontSize="30" Margin="2,-5,0,0"
|
||||||
Text="°"/>
|
Text="°"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
<Button Name="RotateClockwiseBtn" Grid.Column="2" Grid.Row="4"
|
<Button Name="RotateClockwiseBtn" Grid.Column="2" Grid.Row="4"
|
||||||
Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}">
|
Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}">
|
||||||
<Image Source="{DynamicResource ClockwiseRotateImg}" Width="65" Height="65" HorizontalAlignment="Center"
|
<Image Source="{DynamicResource ClockwiseRotateImg}" Width="65" Height="65" HorizontalAlignment="Center"
|
||||||
VerticalAlignment="Center" />
|
VerticalAlignment="Center" />
|
||||||
</Button>
|
</Button>
|
||||||
|
|
||||||
|
<!--Gestione sfridi-->
|
||||||
<Button Name="RemovePartBtn" Grid.ColumnSpan="2" Grid.Row="6"
|
<Button Name="RemovePartBtn" Grid.ColumnSpan="2" Grid.Row="6"
|
||||||
Style="{DynamicResource OmagCut_YellowTextButton}"/>
|
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}"/>
|
Style="{DynamicResource OmagCut_YellowTextButton}"/>
|
||||||
|
|
||||||
|
<!--Gestione scarico pezzi-->
|
||||||
|
<Button Name="UnloadPartsBtn" Grid.ColumnSpan="2" Grid.Row="7"
|
||||||
|
Style="{DynamicResource OmagCut_YellowTextButton}"/>
|
||||||
|
|
||||||
<Grid Grid.Row="7" Grid.ColumnSpan="3">
|
<Grid Grid.Row="7" Grid.ColumnSpan="3">
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="0.5*"/>
|
<ColumnDefinition Width="0.5*"/>
|
||||||
<ColumnDefinition Width="1*"/>
|
<ColumnDefinition Width="1*"/>
|
||||||
@@ -159,11 +162,11 @@
|
|||||||
<ColumnDefinition Width="1*"/>
|
<ColumnDefinition Width="1*"/>
|
||||||
<ColumnDefinition Width="10*"/>
|
<ColumnDefinition Width="10*"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<!-- Inserimento della pausa durante il movimento sulla tavola di scarico-->
|
<!-- Inserimento della pausa durante il movimento sulla tavola di scarico-->
|
||||||
<Button Name="PauseBtn" Grid.Column="1" Style="{DynamicResource OmagCut_YellowIconButton}">
|
<Button Name="PauseBtn" Grid.Column="1" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||||
<Image Source="{DynamicResource Pausa-ON_OFFImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
<Image Source="{DynamicResource Pausa-ON_OFFImg}" Style="{DynamicResource OmagCut_ArrowButtonIcon}"/>
|
||||||
</Button>
|
</Button>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
|
|||||||
+433
-104
@@ -35,12 +35,16 @@ Public Class MoveRawPartPage
|
|||||||
Private m_ScrapsVisibility As Visibility = Visibility.Visible
|
Private m_ScrapsVisibility As Visibility = Visibility.Visible
|
||||||
Private m_CurrRawOnVacuum As Integer = GDB_ID.NULL
|
Private m_CurrRawOnVacuum As Integer = GDB_ID.NULL
|
||||||
|
|
||||||
|
' definisce se è stata inserito uno scarico
|
||||||
|
Private m_IsCurrPhaseUnloaded As Boolean = False
|
||||||
|
|
||||||
Private Sub MoveRawPartPage_Initialized(sender As Object, e As EventArgs) Handles Me.Initialized
|
Private Sub MoveRawPartPage_Initialized(sender As Object, e As EventArgs) Handles Me.Initialized
|
||||||
' Assegno testi
|
' Assegno testi
|
||||||
RemovePartBtn.Content = EgtMsg(MSG_MOVERAWPAGEUC + 1) 'Rimuovi
|
RemovePartBtn.Content = EgtMsg(90361) ' Rimuovi
|
||||||
ModifyBtn.Content = EgtMsg(MSG_SPLITPAGEUC + 17) 'Modifica
|
ModifyBtn.Content = EgtMsg(90357) ' Modifica
|
||||||
ResetBtn.Content = EgtMsg(MSG_NESTPAGEUC + 6) 'Reset
|
ResetBtn.Content = EgtMsg(90336) ' Reset
|
||||||
ScrapsBtn.Content = "Add Scraps"
|
ScrapsBtn.Content = EgtMsg(90366) ' Add Scraps
|
||||||
|
UnloadPartsBtn.Content = EgtMsg(90367) ' Move part
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub MoveRawPartPage_Loaded(sender As Object, e As EventArgs) Handles Me.Loaded
|
Private Sub MoveRawPartPage_Loaded(sender As Object, e As EventArgs) Handles Me.Loaded
|
||||||
@@ -56,11 +60,16 @@ Public Class MoveRawPartPage
|
|||||||
' Se movimento con ventosa, verifico se lama troppo grande
|
' Se movimento con ventosa, verifico se lama troppo grande
|
||||||
If Not m_bByHand And Not m_MainWindow.m_CurrentMachine.IsVacuumMovePossible() Then
|
If Not m_bByHand And Not m_MainWindow.m_CurrentMachine.IsVacuumMovePossible() Then
|
||||||
m_bByHand = True
|
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
|
End If
|
||||||
' Deseleziono tutto
|
' Deseleziono tutto
|
||||||
EgtDeselectAll()
|
EgtDeselectAll()
|
||||||
' Recupero i tagli allungati prima definiti
|
' resetto variabili di navigazione nelle fasi
|
||||||
|
m_bPrev = False
|
||||||
|
m_bToNext = False
|
||||||
|
|
||||||
|
'---------------------------- CREATE NEW PHASE ----------------------------
|
||||||
|
' Recupero i tagli ABILITATI prima definiti
|
||||||
Dim Cuts(0) As Integer
|
Dim Cuts(0) As Integer
|
||||||
m_SplitPage.GetEnabledCuts(Cuts)
|
m_SplitPage.GetEnabledCuts(Cuts)
|
||||||
' Fase precedente
|
' Fase precedente
|
||||||
@@ -69,11 +78,19 @@ Public Class MoveRawPartPage
|
|||||||
Dim vNewRaws As New List(Of Integer)
|
Dim vNewRaws As New List(Of Integer)
|
||||||
If Not m_SplitPage.m_bShow Then
|
If Not m_SplitPage.m_bShow Then
|
||||||
SplitRawParts(nPrevPhase, Cuts, vNewRaws)
|
SplitRawParts(nPrevPhase, Cuts, vNewRaws)
|
||||||
|
m_IsCurrPhaseUnloaded = False
|
||||||
Else
|
Else
|
||||||
EgtSetCurrPhase(nPrevPhase + 1)
|
nPrevPhase = nPrevPhase + 1
|
||||||
|
EgtSetCurrPhase(nPrevPhase)
|
||||||
HideAllMachinings()
|
HideAllMachinings()
|
||||||
|
' verifico se la fase corrente è di tipo scarico frontale
|
||||||
|
m_nCurrDisposition = EgtGetPhaseDisposition(nPrevPhase)
|
||||||
|
If IsDispUnloadOnAuxTab(m_nCurrDisposition) Then
|
||||||
|
m_SplitPage.m_bOnAuxTab = True
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
m_nCurrPhase = EgtGetCurrPhase()
|
m_nCurrPhase = EgtGetCurrPhase()
|
||||||
|
'---------------------------- CREATE NEW PHASE ----------------------------
|
||||||
|
|
||||||
'---------------------------- SCRAPS ----------------------------
|
'---------------------------- SCRAPS ----------------------------
|
||||||
' gestione visualizzazione del comando "Scraps"
|
' gestione visualizzazione del comando "Scraps"
|
||||||
@@ -101,19 +118,31 @@ Public Class MoveRawPartPage
|
|||||||
End If
|
End If
|
||||||
'---------------------------- SCRAPS ----------------------------
|
'---------------------------- SCRAPS ----------------------------
|
||||||
|
|
||||||
|
'---------------------------- AUX TABLE ----------------------------
|
||||||
' Se movimento pezzi finale, sistemazioni per tavolo ausiliario
|
' Se movimento pezzi finale, sistemazioni per tavolo ausiliario
|
||||||
If m_SplitPage.m_bOnAuxTab Then
|
If m_SplitPage.m_bOnAuxTab And m_SplitPage.m_bEnableOnAuxTab Then
|
||||||
' assegnazione delle info tavola ausiliaria alla dispozione corrente
|
' assegnazione delle info tavola ausiliaria alla dispozione corrente (Spostato nella funzione Refresh)
|
||||||
SetAuxTabInCurrDisposition()
|
SetAuxTabInCurrDisposition()
|
||||||
|
UnloadPartsBtn.Content = EgtMsg(90368) ' Go to MOVE part
|
||||||
' altrimenti, aggiorno visualizzazione
|
' altrimenti, aggiorno visualizzazione
|
||||||
Else
|
ElseIf Not m_SplitPage.m_bOnAuxTab And m_SplitPage.m_bEnableOnAuxTab Then
|
||||||
EgtDraw()
|
UnloadPartsBtn.Content = EgtMsg(90369) ' Go to UNLOAD part
|
||||||
End If
|
End If
|
||||||
|
'---------------------------- AUX TABLE ----------------------------
|
||||||
|
EgtDraw()
|
||||||
' Carico i parametri di movimento
|
' Carico i parametri di movimento
|
||||||
m_dStep = GetPrivateProfileDouble(S_RAWMOVE, K_RAWSTEP, 50, m_MainWindow.GetIniFile())
|
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
|
' Ricavo la lunghezza del baffo di taglio
|
||||||
m_dStep = SplitAuto.MaxCuttingMustache(m_dStep)
|
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())
|
m_dRotation = GetPrivateProfileDouble(S_RAWMOVE, K_RAWROTATION, 30, m_MainWindow.GetIniFile())
|
||||||
RotationAngleTxBx.Text = DoubleToString(m_dRotation, 3)
|
RotationAngleTxBx.Text = DoubleToString(m_dRotation, 3)
|
||||||
' Se movimento manuale perpendicolare
|
' Se movimento manuale perpendicolare
|
||||||
@@ -167,6 +196,30 @@ Public Class MoveRawPartPage
|
|||||||
|
|
||||||
' aggiorno il messaggio del comando per gestire gli sfridi
|
' aggiorno il messaggio del comando per gestire gli sfridi
|
||||||
VerifyIsNewScrap(m_CurrRawOnVacuum)
|
VerifyIsNewScrap(m_CurrRawOnVacuum)
|
||||||
|
' aggiorno la visibilità dei comandi
|
||||||
|
RefreshVisibility()
|
||||||
|
' salvo l'idice della fase corrente
|
||||||
|
m_nCurrDisposition = EgtGetPhaseDisposition(m_nCurrPhase)
|
||||||
|
' Abilitazione bottone modifica
|
||||||
|
ModifyBtn.IsEnabled = m_SplitPage.m_bShow
|
||||||
|
' gestione abilitazione altri bottoni
|
||||||
|
EnableButtons()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
' Gestione di visualizzazione dei comandi per il movimento dei pezzi
|
||||||
|
Private Sub RefreshVisibility()
|
||||||
|
' Aggiorno visulizzazione comando per passare alla pagina di scarico
|
||||||
|
If Not m_SplitPage.m_bEnableOnAuxTab Then
|
||||||
|
UnloadPartsBtn.Visibility = Visibility.Hidden
|
||||||
|
Else
|
||||||
|
UnloadPartsBtn.Visibility = Visibility.Visible
|
||||||
|
If m_SplitPage.m_bOnAuxTab Then
|
||||||
|
UnloadPartsBtn.Content = EgtMsg(90368) ' Go to MOVE part
|
||||||
|
' altrimenti, aggiorno visualizzazione
|
||||||
|
Else
|
||||||
|
UnloadPartsBtn.Content = EgtMsg(90369) ' Go to UNLOAD part
|
||||||
|
End If
|
||||||
|
End If
|
||||||
' Aggiorno interfaccia per taglio perpendicolare
|
' Aggiorno interfaccia per taglio perpendicolare
|
||||||
If m_bByHand Then
|
If m_bByHand Then
|
||||||
UpBtn.Visibility = Windows.Visibility.Visible
|
UpBtn.Visibility = Windows.Visibility.Visible
|
||||||
@@ -222,12 +275,6 @@ Public Class MoveRawPartPage
|
|||||||
ResetBtn.Visibility = Windows.Visibility.Visible
|
ResetBtn.Visibility = Windows.Visibility.Visible
|
||||||
ScrapsBtn.Visibility = Windows.Visibility.Hidden
|
ScrapsBtn.Visibility = Windows.Visibility.Hidden
|
||||||
End If
|
End If
|
||||||
' salvo l'idice della fase corrente
|
|
||||||
m_nCurrDisposition = EgtGetPhaseDisposition(m_nCurrPhase)
|
|
||||||
' Abilitazione bottone modifica
|
|
||||||
ModifyBtn.IsEnabled = m_SplitPage.m_bShow
|
|
||||||
' gestione abilitazione altri bottoni
|
|
||||||
EnableButtons()
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub SetAuxTabInCurrDisposition()
|
Private Sub SetAuxTabInCurrDisposition()
|
||||||
@@ -292,20 +339,28 @@ Public Class MoveRawPartPage
|
|||||||
EgtSetStatus(nId, GDB_ST.ON_)
|
EgtSetStatus(nId, GDB_ST.ON_)
|
||||||
' prima di rilasciare il pezzo verifico che non vada in collisione con altri pezzi sulla tavola (evito il controllo se ultima fase)
|
' prima di rilasciare il pezzo verifico che non vada in collisione con altri pezzi sulla tavola (evito il controllo se ultima fase)
|
||||||
If VerifyCollisionWithOtherRawPart(nId) Then
|
If VerifyCollisionWithOtherRawPart(nId) Then
|
||||||
' mantengo la selezione del pezzo
|
' mantengo la selezione del pezzo
|
||||||
EgtSetStatus(nId, GDB_ST.SEL)
|
EgtSetStatus(nId, GDB_ST.SEL)
|
||||||
m_CurrProjPage.SetErrorMessage("Collisione pezzi")
|
m_CurrProjPage.SetErrorMessage(EgtMsg(91231)) ' Collisione pezzi
|
||||||
Else
|
Else
|
||||||
' Se con ventose, le nascondo
|
' Se con ventose, le nascondo
|
||||||
If Not m_bByHand Then EgtSetStatus(GetVacuumId(), GDB_ST.OFF)
|
If Not m_bByHand Then EgtSetStatus(GetVacuumId(), GDB_ST.OFF)
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
|
|
||||||
' verifico che il pezzo precedente possa essere depositato correttamente
|
' verifico che il pezzo precedente possa essere depositato correttamente
|
||||||
If VerifyCollisionWithOtherRawPart(m_CurrRawOnVacuum) Then
|
If VerifyCollisionWithOtherRawPart(m_CurrRawOnVacuum) Then
|
||||||
' mantengo la selezione del pezzo
|
' mantengo la selezione del pezzo
|
||||||
EgtSetStatus(m_CurrRawOnVacuum, GDB_ST.SEL)
|
EgtSetStatus(m_CurrRawOnVacuum, GDB_ST.SEL)
|
||||||
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()
|
EgtDraw()
|
||||||
' esco dal ciclo, prima devo depositare correttamente il pezzo
|
' esco dal ciclo, prima devo depositare correttamente il pezzo
|
||||||
Exit While
|
Exit While
|
||||||
@@ -329,9 +384,15 @@ Public Class MoveRawPartPage
|
|||||||
VacuumCups.SetWeightInformation(AverageDensity, MaxSinglePlugger, MaxDoublePlugger)
|
VacuumCups.SetWeightInformation(AverageDensity, MaxSinglePlugger, MaxDoublePlugger)
|
||||||
VacuumCups.SetRotationForExtraStrokeY(GetPrivateProfileInt(S_MACH_RAWMOVE, K_MACH_ROTATEVACUUMFOREXTRASTROKEY, 0, m_MainWindow.GetMachIniFile()) <> 0)
|
VacuumCups.SetRotationForExtraStrokeY(GetPrivateProfileInt(S_MACH_RAWMOVE, K_MACH_ROTATEVACUUMFOREXTRASTROKEY, 0, m_MainWindow.GetMachIniFile()) <> 0)
|
||||||
VacuumCups.SetRotationForExtraStrokeX(GetPrivateProfileInt(S_MACH_RAWMOVE, K_MACH_ROTATEVACUUMFOREXTRASTROKEX, 0, m_MainWindow.GetMachIniFile()) <> 0)
|
VacuumCups.SetRotationForExtraStrokeX(GetPrivateProfileInt(S_MACH_RAWMOVE, K_MACH_ROTATEVACUUMFOREXTRASTROKEX, 0, m_MainWindow.GetMachIniFile()) <> 0)
|
||||||
' se su scarico frontale allora devo modificare la scelta delle ventose
|
|
||||||
VacuumCups.bUnloadingOnAuxTab = m_SplitPage.m_bOnAuxTab
|
VacuumCups.ResetHeadName()
|
||||||
If PutVacuumCupsOnRaw(nId, rmData) Then
|
Dim bPutVacuum As Boolean = PutVacuumCupsOnRaw(nId, rmData)
|
||||||
|
If Not bPutVacuum Then
|
||||||
|
Dim bTwoHeadVac As Boolean = (EgtGetHeadId(VACUUM_HEAD_2) <> GDB_ID.NULL)
|
||||||
|
If bTwoHeadVac Then bPutVacuum = PutVacuumCupsOnRaw(nId, rmData)
|
||||||
|
End If
|
||||||
|
|
||||||
|
If bPutVacuum Then
|
||||||
' Visualizzo le ventose
|
' Visualizzo le ventose
|
||||||
EgtSetStatus(GetVacuumId(), GDB_ST.ON_)
|
EgtSetStatus(GetVacuumId(), GDB_ST.ON_)
|
||||||
' Aggiorno i dati
|
' Aggiorno i dati
|
||||||
@@ -345,14 +406,16 @@ Public Class MoveRawPartPage
|
|||||||
' Aggiorno i dati
|
' Aggiorno i dati
|
||||||
m_bRawWithCups = False
|
m_bRawWithCups = False
|
||||||
If VacuumCups.bOverWeight Then
|
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
|
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
|
Else
|
||||||
' Messaggio di avvertimento
|
' 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
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
EgtDraw()
|
EgtDraw()
|
||||||
@@ -372,7 +435,7 @@ Public Class MoveRawPartPage
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
' Veririfica che il grezzo non entri in colliosione con altri pezzi
|
' 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...)
|
' 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 m_SplitPage.m_bOnAuxTab Then Return False
|
||||||
If nIdOnVacumm = GDB_ID.NULL Then Return False
|
If nIdOnVacumm = GDB_ID.NULL Then Return False
|
||||||
@@ -406,23 +469,86 @@ Public Class MoveRawPartPage
|
|||||||
Return False
|
Return False
|
||||||
End Function
|
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
|
Private Function VerifyIsNewScrap(nMyId As Integer) As Boolean
|
||||||
Dim nVal As Integer = 0
|
Dim nVal As Integer = 0
|
||||||
If EgtGetInfo(nMyId, K_ISNEWSCRAPS, nVal) Then
|
If EgtGetInfo(nMyId, K_ISNEWSCRAPS, nVal) Then
|
||||||
If nVal = 1 Or nVal = 2 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
|
' 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
|
ScrapsBtn.IsEnabled = True And Not m_SplitPage.m_bShow
|
||||||
Return True
|
Return True
|
||||||
ElseIf nVal = 3 Then
|
ElseIf nVal = 3 Then
|
||||||
' non è possibile rimuovere il grezzo in questa fase
|
' non è possibile rimuovere il grezzo in questa fase
|
||||||
ScrapsBtn.Content = "Defined as Scrap"
|
ScrapsBtn.Content = EgtMsg(91229) ' Defined as Scrap
|
||||||
ScrapsBtn.IsEnabled = False
|
ScrapsBtn.IsEnabled = False
|
||||||
Return True
|
Return True
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
' non è un nuovo grezzo
|
' non è un nuovo grezzo
|
||||||
ScrapsBtn.Content = "Add Scrap"
|
ScrapsBtn.Content = EgtMsg(91230) ' Add Scrap
|
||||||
ScrapsBtn.IsEnabled = True And Not m_SplitPage.m_bShow
|
ScrapsBtn.IsEnabled = True And Not m_SplitPage.m_bShow
|
||||||
Return False
|
Return False
|
||||||
End Function
|
End Function
|
||||||
@@ -447,7 +573,7 @@ Public Class MoveRawPartPage
|
|||||||
If EgtMoveRawPart(nRawId, dMove * m_vtDir) Then
|
If EgtMoveRawPart(nRawId, dMove * m_vtDir) Then
|
||||||
m_dCurrDist += Math.Abs(dMove)
|
m_dCurrDist += Math.Abs(dMove)
|
||||||
End If
|
End If
|
||||||
' Altrimenti movimento Y +
|
' Altrimenti movimento Y +
|
||||||
Else
|
Else
|
||||||
If m_bRawWithCups Then
|
If m_bRawWithCups Then
|
||||||
Dim vtMove As New Vector3d(0, m_dStep, 0)
|
Dim vtMove As New Vector3d(0, m_dStep, 0)
|
||||||
@@ -462,7 +588,7 @@ Public Class MoveRawPartPage
|
|||||||
VacuumCups.ptStartPointLift.y -= vtMove.y
|
VacuumCups.ptStartPointLift.y -= vtMove.y
|
||||||
End If
|
End If
|
||||||
Else
|
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
|
||||||
End If
|
End If
|
||||||
nRawId = EgtGetNextSelectedObj()
|
nRawId = EgtGetNextSelectedObj()
|
||||||
@@ -490,7 +616,7 @@ Public Class MoveRawPartPage
|
|||||||
If EgtMoveRawPart(nRawId, dMove * m_vtDir) Then
|
If EgtMoveRawPart(nRawId, dMove * m_vtDir) Then
|
||||||
m_dCurrDist -= Math.Abs(dMove)
|
m_dCurrDist -= Math.Abs(dMove)
|
||||||
End If
|
End If
|
||||||
' Altrimenti movimento Y -
|
' Altrimenti movimento Y -
|
||||||
Else
|
Else
|
||||||
If m_bRawWithCups Then
|
If m_bRawWithCups Then
|
||||||
Dim vtMove As New Vector3d(0, -m_dStep, 0)
|
Dim vtMove As New Vector3d(0, -m_dStep, 0)
|
||||||
@@ -505,7 +631,7 @@ Public Class MoveRawPartPage
|
|||||||
VacuumCups.ptStartPointLift.y -= vtMove.y
|
VacuumCups.ptStartPointLift.y -= vtMove.y
|
||||||
End If
|
End If
|
||||||
Else
|
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
|
||||||
End If
|
End If
|
||||||
nRawId = EgtGetNextSelectedObj()
|
nRawId = EgtGetNextSelectedObj()
|
||||||
@@ -531,7 +657,7 @@ Public Class MoveRawPartPage
|
|||||||
VacuumCups.ptStartPointLift.x -= vtMove.x
|
VacuumCups.ptStartPointLift.x -= vtMove.x
|
||||||
End If
|
End If
|
||||||
Else
|
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()
|
nRawId = EgtGetNextSelectedObj()
|
||||||
End While
|
End While
|
||||||
@@ -556,7 +682,7 @@ Public Class MoveRawPartPage
|
|||||||
VacuumCups.ptStartPointLift.x -= vtMove.x
|
VacuumCups.ptStartPointLift.x -= vtMove.x
|
||||||
End If
|
End If
|
||||||
Else
|
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()
|
nRawId = EgtGetNextSelectedObj()
|
||||||
End While
|
End While
|
||||||
@@ -577,7 +703,7 @@ Public Class MoveRawPartPage
|
|||||||
Case 1
|
Case 1
|
||||||
' extra corsa sulla x-: devo ridurre del valore di extra corsa
|
' extra corsa sulla x-: devo ridurre del valore di extra corsa
|
||||||
EgtGetOutstrokeInfo(sInfo)
|
EgtGetOutstrokeInfo(sInfo)
|
||||||
m_CurrProjPage.SetWarningMessage(EgtMsg(MSG_SIMULATIONPAGEUC + 2) & " " & sInfo) 'Extracorsa ...
|
m_CurrProjPage.SetWarningMessage(EgtMsg(90552) & " " & sInfo) ' Extracorsa ...
|
||||||
ptEndPointLift.x -= vtMove.x
|
ptEndPointLift.x -= vtMove.x
|
||||||
Dim dMaxMove As Double = VacuumCups.GetExtraStrokeValue(sInfo)
|
Dim dMaxMove As Double = VacuumCups.GetExtraStrokeValue(sInfo)
|
||||||
If Math.Abs(dMaxMove - vtMove.x) <= EPS_SMALL * 100 Then
|
If Math.Abs(dMaxMove - vtMove.x) <= EPS_SMALL * 100 Then
|
||||||
@@ -590,7 +716,7 @@ Public Class MoveRawPartPage
|
|||||||
Case 2
|
Case 2
|
||||||
' extra corsa sulla x+: devo ridurre del valore di extra corsa
|
' extra corsa sulla x+: devo ridurre del valore di extra corsa
|
||||||
EgtGetOutstrokeInfo(sInfo)
|
EgtGetOutstrokeInfo(sInfo)
|
||||||
m_CurrProjPage.SetWarningMessage(EgtMsg(MSG_SIMULATIONPAGEUC + 2) & " " & sInfo) 'Extracorsa ...
|
m_CurrProjPage.SetWarningMessage(EgtMsg(90552) & " " & sInfo) ' Extracorsa ...
|
||||||
ptEndPointLift.x -= vtMove.x
|
ptEndPointLift.x -= vtMove.x
|
||||||
Dim dMaxMove As Double = VacuumCups.GetExtraStrokeValue(sInfo)
|
Dim dMaxMove As Double = VacuumCups.GetExtraStrokeValue(sInfo)
|
||||||
If Math.Abs(dMaxMove - vtMove.x) <= EPS_SMALL * 100 Then
|
If Math.Abs(dMaxMove - vtMove.x) <= EPS_SMALL * 100 Then
|
||||||
@@ -603,7 +729,7 @@ Public Class MoveRawPartPage
|
|||||||
Case 4
|
Case 4
|
||||||
' extra corsa sulla y-
|
' extra corsa sulla y-
|
||||||
EgtGetOutstrokeInfo(sInfo)
|
EgtGetOutstrokeInfo(sInfo)
|
||||||
m_CurrProjPage.SetWarningMessage(EgtMsg(MSG_SIMULATIONPAGEUC + 2) & " " & sInfo) 'Extracorsa ...
|
m_CurrProjPage.SetWarningMessage(EgtMsg(90552) & " " & sInfo) ' Extracorsa ...
|
||||||
ptEndPointLift.y -= vtMove.y
|
ptEndPointLift.y -= vtMove.y
|
||||||
Dim dMaxMove As Double = VacuumCups.GetExtraStrokeValue(sInfo)
|
Dim dMaxMove As Double = VacuumCups.GetExtraStrokeValue(sInfo)
|
||||||
If Math.Abs(dMaxMove - vtMove.y) <= EPS_SMALL * 100 Then
|
If Math.Abs(dMaxMove - vtMove.y) <= EPS_SMALL * 100 Then
|
||||||
@@ -616,7 +742,7 @@ Public Class MoveRawPartPage
|
|||||||
Case 8
|
Case 8
|
||||||
' extra corsa sulla y+
|
' extra corsa sulla y+
|
||||||
EgtGetOutstrokeInfo(sInfo)
|
EgtGetOutstrokeInfo(sInfo)
|
||||||
m_CurrProjPage.SetWarningMessage(EgtMsg(MSG_SIMULATIONPAGEUC + 2) & " " & sInfo) 'Extracorsa ...
|
m_CurrProjPage.SetWarningMessage(EgtMsg(90552) & " " & sInfo) ' Extracorsa ...
|
||||||
ptEndPointLift.y -= vtMove.y
|
ptEndPointLift.y -= vtMove.y
|
||||||
Dim dMaxMove As Double = VacuumCups.GetExtraStrokeValue(sInfo)
|
Dim dMaxMove As Double = VacuumCups.GetExtraStrokeValue(sInfo)
|
||||||
If Math.Abs(dMaxMove - vtMove.y) <= EPS_SMALL * 100 Then
|
If Math.Abs(dMaxMove - vtMove.y) <= EPS_SMALL * 100 Then
|
||||||
@@ -661,7 +787,7 @@ Public Class MoveRawPartPage
|
|||||||
VacuumCups.dDegRotStartAng -= dAng
|
VacuumCups.dDegRotStartAng -= dAng
|
||||||
End If
|
End If
|
||||||
Else
|
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()
|
nRawId = EgtGetNextSelectedObj()
|
||||||
End While
|
End While
|
||||||
@@ -695,7 +821,7 @@ Public Class MoveRawPartPage
|
|||||||
VacuumCups.dDegRotStartAng -= dAng
|
VacuumCups.dDegRotStartAng -= dAng
|
||||||
End If
|
End If
|
||||||
Else
|
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()
|
nRawId = EgtGetNextSelectedObj()
|
||||||
End While
|
End While
|
||||||
@@ -716,7 +842,7 @@ Public Class MoveRawPartPage
|
|||||||
Case 16
|
Case 16
|
||||||
' extra corsa sulla c-
|
' extra corsa sulla c-
|
||||||
EgtGetOutstrokeInfo(sInfo)
|
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)
|
ptEndPointLift.Rotate(ptCenter, Vector3d.Z_AX(), -dAngDeg)
|
||||||
dDegRotEndAng -= dAngDeg
|
dDegRotEndAng -= dAngDeg
|
||||||
dAngDeg += VacuumCups.GetExtraStrokeValue(sInfo) + EPS_SMALL
|
dAngDeg += VacuumCups.GetExtraStrokeValue(sInfo) + EPS_SMALL
|
||||||
@@ -726,7 +852,7 @@ Public Class MoveRawPartPage
|
|||||||
Case 34
|
Case 34
|
||||||
' extra corsa sulla c+
|
' extra corsa sulla c+
|
||||||
EgtGetOutstrokeInfo(sInfo)
|
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)
|
ptEndPointLift.Rotate(ptCenter, Vector3d.Z_AX(), -dAngDeg)
|
||||||
dDegRotEndAng -= dAngDeg
|
dDegRotEndAng -= dAngDeg
|
||||||
dAngDeg -= VacuumCups.GetExtraStrokeValue(sInfo) + EPS_SMALL
|
dAngDeg -= VacuumCups.GetExtraStrokeValue(sInfo) + EPS_SMALL
|
||||||
@@ -740,6 +866,12 @@ Public Class MoveRawPartPage
|
|||||||
Return bOk
|
Return bOk
|
||||||
End Function
|
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
|
Private Sub RemovePartBtn_Click(sender As Object, e As RoutedEventArgs) Handles RemovePartBtn.Click
|
||||||
Dim nRawId As Integer = EgtGetFirstSelectedObj()
|
Dim nRawId As Integer = EgtGetFirstSelectedObj()
|
||||||
While nRawId <> GDB_ID.NULL
|
While nRawId <> GDB_ID.NULL
|
||||||
@@ -782,6 +914,34 @@ Public Class MoveRawPartPage
|
|||||||
End While
|
End While
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
' Passo dalla pagina di movimento dei pezzi alla pagina di scarico
|
||||||
|
Private Sub UnloadPartBtn_Click() Handles UnloadPartsBtn.Click
|
||||||
|
' forzo lo stato di scarico frontale oppure di movimento
|
||||||
|
m_SplitPage.m_bOnAuxTab = Not m_SplitPage.m_bOnAuxTab
|
||||||
|
|
||||||
|
' se rientro nella fase di spostamenti allora nascondo la tavola di scarico
|
||||||
|
If Not m_SplitPage.m_bOnAuxTab Then
|
||||||
|
' se ci sono pezzi sulla tavola di scarico non posso nasconderla
|
||||||
|
Dim LclLstOfUnldPart As New List(Of Integer)
|
||||||
|
If Not PartOnAuxTab(LclLstOfUnldPart, m_nCurrPhase) Then
|
||||||
|
EgtDisableModified()
|
||||||
|
' nascondo la tavola di scarico
|
||||||
|
EgtSetStatus(m_nAuxTabId, GDB_ST.OFF)
|
||||||
|
' Nascondo eventuali pezzi in parcheggio
|
||||||
|
HideParkedParts()
|
||||||
|
EgtEnableModified()
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
' Assegnazione delle info tavola ausiliaria alla dispozione corrente
|
||||||
|
SetAuxTabInCurrDisposition()
|
||||||
|
End If
|
||||||
|
|
||||||
|
' Mantengo la fase che è stata creata e passo a gestire solo la visualizzazione dei bottoni
|
||||||
|
RefreshVisibility()
|
||||||
|
EgtZoom(ZM.ALL, True)
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
Private Sub StepMoveTxBx_EgtClosed(sender As Object, e As EventArgs) Handles StepMoveTxBx.EgtClosed
|
Private Sub StepMoveTxBx_EgtClosed(sender As Object, e As EventArgs) Handles StepMoveTxBx.EgtClosed
|
||||||
Dim dStep As Double
|
Dim dStep As Double
|
||||||
If StringToLen(StepMoveTxBx.Text, dStep) Then
|
If StringToLen(StepMoveTxBx.Text, dStep) Then
|
||||||
@@ -823,16 +983,16 @@ Public Class MoveRawPartPage
|
|||||||
Dim ptRef As Point3d
|
Dim ptRef As Point3d
|
||||||
If Not EgtGetInfo(nRefId, "Pos", ptRef) Then Return
|
If Not EgtGetInfo(nRefId, "Pos", ptRef) Then Return
|
||||||
Dim sCorn As String = ""
|
Dim sCorn As String = ""
|
||||||
EgtGetInfo( nRefId, "COR", sCorn)
|
EgtGetInfo(nRefId, "COR", sCorn)
|
||||||
Select sCorn
|
Select Case sCorn
|
||||||
Case "TL"
|
Case "TL"
|
||||||
nCorn = MCH_CR.TL
|
nCorn = MCH_CR.TL
|
||||||
Case "TR"
|
Case "TR"
|
||||||
nCorn = MCH_CR.TR
|
nCorn = MCH_CR.TR
|
||||||
Case "BL"
|
Case "BL"
|
||||||
nCorn = MCH_CR.BL
|
nCorn = MCH_CR.BL
|
||||||
Case "BR"
|
Case "BR"
|
||||||
nCorn = MCH_CR.BR
|
nCorn = MCH_CR.BR
|
||||||
End Select
|
End Select
|
||||||
' Recupero il centro del grezzo
|
' Recupero il centro del grezzo
|
||||||
Dim ptRawCen As Point3d
|
Dim ptRawCen As Point3d
|
||||||
@@ -927,7 +1087,7 @@ Public Class MoveRawPartPage
|
|||||||
Else
|
Else
|
||||||
EgtMoveRawPart(nRawId, ptRawCen - ptNewRawCen)
|
EgtMoveRawPart(nRawId, ptRawCen - ptNewRawCen)
|
||||||
EgtRotateRawPart(nRawId, Vector3d.Z_AX(), -dAngRaw)
|
EgtRotateRawPart(nRawId, Vector3d.Z_AX(), -dAngRaw)
|
||||||
m_CurrProjPage.SetWarningMessage(EgtMsg(MSG_MOVERAWPAGEUC + 3)) ' Posizione scelta già occupata
|
m_CurrProjPage.SetWarningMessage(EgtMsg(90363)) ' Posizione scelta già occupata
|
||||||
End If
|
End If
|
||||||
' Disabilito pezzo e nascondo le ventose
|
' Disabilito pezzo e nascondo le ventose
|
||||||
EgtSetStatus(nRawId, GDB_ST.ON_)
|
EgtSetStatus(nRawId, GDB_ST.ON_)
|
||||||
@@ -1009,8 +1169,44 @@ Public Class MoveRawPartPage
|
|||||||
End Function
|
End Function
|
||||||
|
|
||||||
Private Sub PauseBtn_Click(sender As Object, e As RoutedEventArgs) Handles PauseBtn.Click
|
Private Sub PauseBtn_Click(sender As Object, e As RoutedEventArgs) Handles PauseBtn.Click
|
||||||
|
' verifico la presenza di eventuali pezzi sulla tavola di scarico
|
||||||
|
Dim LclLstOfUnldPart As New List(Of Integer)
|
||||||
|
PartOnAuxTab(LclLstOfUnldPart, m_nCurrPhase)
|
||||||
|
If Not InsertPauseInCurrPhase() Then Return
|
||||||
|
AddNewPhase()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
' restituisce la lista dei pezzi che sono sulla tavola di scarico nella fase indicata
|
||||||
|
Private Function PartOnAuxTab(ByRef ListOfUnloadedPatr As List(Of Integer), nPhase As Integer) As Boolean
|
||||||
|
m_IsCurrPhaseUnloaded = False
|
||||||
|
' Area tavolo ausiliario
|
||||||
|
Dim b3AuxTab As New BBox3d
|
||||||
|
EgtGetBBoxGlob(EgtGetFirstNameInGroup(m_nAuxTabId, "A1"), GDB_BB.STANDARD, b3AuxTab)
|
||||||
|
' Area pezzi
|
||||||
|
Dim nOtherRaw As Integer = EgtGetFirstRawPart()
|
||||||
|
While nOtherRaw <> GDB_ID.NULL
|
||||||
|
If EgtVerifyRawPartPhase(nOtherRaw, nPhase) Then
|
||||||
|
Dim b3OtherRaw As New BBox3d
|
||||||
|
' EgtGetRawPartBBox(nOtherRaw, b3OtherRaw)
|
||||||
|
EgtGetBBoxGlob(nOtherRaw, GDB_BB.STANDARD, b3OtherRaw)
|
||||||
|
' se il centro del pezzo è sulla tavola di scarico
|
||||||
|
If b3OtherRaw.Center.y < b3AuxTab.Max().y Then
|
||||||
|
m_IsCurrPhaseUnloaded = True
|
||||||
|
ListOfUnloadedPatr.Add(nOtherRaw)
|
||||||
|
' salvo l'info che indica che il pezzo deve essere scaricato
|
||||||
|
EgtSetInfo(nOtherRaw, "Unloaded", 1)
|
||||||
|
'Exit While
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
nOtherRaw = EgtGetNextRawPart(nOtherRaw)
|
||||||
|
End While
|
||||||
|
Return m_IsCurrPhaseUnloaded
|
||||||
|
End Function
|
||||||
|
|
||||||
|
' inserisce una pausa nella fase corrente
|
||||||
|
Private Function InsertPauseInCurrPhase() As Boolean
|
||||||
' verifico che ci sia almeno un elemto selezionato (dati di aggancio pezzo)
|
' verifico che ci sia almeno un elemto selezionato (dati di aggancio pezzo)
|
||||||
If m_RawMoveDataList.Count = 0 Then Return
|
If m_RawMoveDataList.Count = 0 Then Return False
|
||||||
' verifico che sia stato inseito almeno uno spostamento, altrimenti lo rimuovo
|
' verifico che sia stato inseito almeno uno spostamento, altrimenti lo rimuovo
|
||||||
Dim Index As Integer = 0
|
Dim Index As Integer = 0
|
||||||
For Index = m_RawMoveDataList.Count - 1 To 0 Step -1
|
For Index = m_RawMoveDataList.Count - 1 To 0 Step -1
|
||||||
@@ -1019,8 +1215,9 @@ Public Class MoveRawPartPage
|
|||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
' verifico che la lista non sia vuota
|
' verifico che la lista non sia vuota
|
||||||
If m_RawMoveDataList.Count = 0 Then Return
|
If m_RawMoveDataList.Count = 0 Then
|
||||||
|
Return False
|
||||||
|
End If
|
||||||
' recupero disposizione fase corrente
|
' recupero disposizione fase corrente
|
||||||
Dim nDispId As Integer = EgtGetPhaseDisposition(m_nCurrPhase)
|
Dim nDispId As Integer = EgtGetPhaseDisposition(m_nCurrPhase)
|
||||||
' imposto la pausa nella disposizione corrente
|
' imposto la pausa nella disposizione corrente
|
||||||
@@ -1028,30 +1225,22 @@ Public Class MoveRawPartPage
|
|||||||
' aggiungo al gruppo disposizione dei sottogruppi con i dati di movimento dei grezzi spostati
|
' aggiungo al gruppo disposizione dei sottogruppi con i dati di movimento dei grezzi spostati
|
||||||
SaveMoveInfoInDisposition(nDispId, m_RawMoveDataList)
|
SaveMoveInfoInDisposition(nDispId, m_RawMoveDataList)
|
||||||
' imposto eventuale movimento pezzi su tavola ausiliaria
|
' imposto eventuale movimento pezzi su tavola ausiliaria
|
||||||
SaveMovePartsOnAuxTable(nDispId, m_SplitPage.m_bOnAuxTab)
|
SaveMovePartsOnAuxTable(nDispId, m_IsCurrPhaseUnloaded)
|
||||||
|
' SaveMovePartsOnAuxTable(nDispId, m_SplitPage.m_bOnAuxTab)
|
||||||
'' Eseguo calcolo speciale dei movimenti: per tavola multicut
|
'' Eseguo calcolo speciale dei movimenti: per tavola multicut
|
||||||
'SpecialApplyDisposition(nDispId, True, Not m_SplitPage.m_bOnAuxTab)
|
'SpecialApplyDisposition(nDispId, True, Not m_SplitPage.m_bOnAuxTab)
|
||||||
|
SaveRemoveByHandInDisposition(nDispId, False)
|
||||||
|
Return True
|
||||||
|
End Function
|
||||||
|
|
||||||
|
' crea una nuvoa fase/disposizione, la rende corrente, ricalcolo i grezzi e le lavorazioni della nuova fase
|
||||||
|
Private Function AddNewPhase() As Boolean
|
||||||
' Creo nuova fase
|
' Creo nuova fase
|
||||||
Dim nNewPhase As Integer = EgtAddPhase()
|
Dim nNewPhase As Integer = EgtAddPhase()
|
||||||
|
' Carico i grezzi rimasti sulla tavola nella nuova fase
|
||||||
' Eseguo eventuali spezzature dei grezzi e vi sposto i pezzi (i grezzi devono essere sempre copiati per Registrazione con rotazione)
|
ChangePhaseRawPart(nNewPhase)
|
||||||
Dim nRawId As Integer = EgtGetFirstRawPart()
|
' Sposto le lavorazioni rimaste nella nuova fase
|
||||||
While nRawId <> GDB_ID.NULL
|
ChangeOperationPhase(nNewPhase)
|
||||||
' se il grezzo è presente nella fase precedente e non è quello selezionato allora procedo a creare una copia nella nuova fase
|
|
||||||
If EgtVerifyRawPartPhase(nRawId, nNewPhase - 1) Then
|
|
||||||
Dim bKeepRawPart As Boolean = True
|
|
||||||
For Each RawOnAuxTabData As RawMoveData In m_RawMoveDataList
|
|
||||||
If nRawId = RawOnAuxTabData.m_nId Then
|
|
||||||
bKeepRawPart = False
|
|
||||||
Exit For
|
|
||||||
End If
|
|
||||||
Next
|
|
||||||
If bKeepRawPart Then EgtKeepRawPart(nRawId, nNewPhase - 1)
|
|
||||||
End If
|
|
||||||
' passo al successivo grezzo
|
|
||||||
nRawId = EgtGetNextRawPart(nRawId)
|
|
||||||
End While
|
|
||||||
|
|
||||||
Dim nCurrDisposition As Integer = EgtGetPhaseDisposition(nNewPhase)
|
Dim nCurrDisposition As Integer = EgtGetPhaseDisposition(nNewPhase)
|
||||||
'SetPause(nCurrDisposition)
|
'SetPause(nCurrDisposition)
|
||||||
@@ -1062,8 +1251,43 @@ Public Class MoveRawPartPage
|
|||||||
SetAuxTabInCurrDisposition()
|
SetAuxTabInCurrDisposition()
|
||||||
' ripulisco la lista degli spostamenti
|
' ripulisco la lista degli spostamenti
|
||||||
m_RawMoveDataList.Clear()
|
m_RawMoveDataList.Clear()
|
||||||
|
m_IsCurrPhaseUnloaded = False
|
||||||
' aggiorno la fase corrente
|
' aggiorno la fase corrente
|
||||||
m_nCurrPhase = EgtGetCurrPhase()
|
m_nCurrPhase = EgtGetCurrPhase()
|
||||||
|
Return True
|
||||||
|
End Function
|
||||||
|
|
||||||
|
' Copio i grezzi rimasti sulla tavola nella fase successiva
|
||||||
|
Private Sub ChangePhaseRawPart(ByVal nNewPhase As Integer)
|
||||||
|
' recupero l'elenco dei pezzi che sono stati scaricati sulla tavola
|
||||||
|
Dim LocalLstOfUnldPart As New List(Of Integer)
|
||||||
|
PartOnAuxTab(LocalLstOfUnldPart, nNewPhase - 1)
|
||||||
|
' Eseguo eventuali spezzature dei grezzi e vi sposto i pezzi (i grezzi devono essere sempre copiati per Registrazione con rotazione)
|
||||||
|
Dim nRawId As Integer = EgtGetFirstRawPart()
|
||||||
|
While nRawId <> GDB_ID.NULL
|
||||||
|
' se il grezzo è presente nella fase precedente e non è quello selezionato allora procedo a creare una copia nella nuova fase
|
||||||
|
If EgtVerifyRawPartPhase(nRawId, nNewPhase - 1) Then
|
||||||
|
Dim bKeepRawPart As Boolean = True
|
||||||
|
For Each RawOnAuxTabData As RawMoveData In m_RawMoveDataList
|
||||||
|
If nRawId = RawOnAuxTabData.m_nId Then
|
||||||
|
' se il pezzo è stato scaricato allora non deve essere riportato nella fase successiva
|
||||||
|
For Each UnloadPart As Integer In LocalLstOfUnldPart
|
||||||
|
If nRawId = UnloadPart Then
|
||||||
|
' salvo l'info che indica che il pezzo deve essere scaricato
|
||||||
|
EgtSetInfo(nRawId, "Unloaded", 1)
|
||||||
|
bKeepRawPart = False
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
'bKeepRawPart = False
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
If bKeepRawPart Then EgtKeepRawPart(nRawId, nNewPhase - 1)
|
||||||
|
End If
|
||||||
|
' passo al successivo grezzo
|
||||||
|
nRawId = EgtGetNextRawPart(nRawId)
|
||||||
|
End While
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub ResetBtn_Click(sender As Object, e As RoutedEventArgs) Handles ResetBtn.Click
|
Private Sub ResetBtn_Click(sender As Object, e As RoutedEventArgs) Handles ResetBtn.Click
|
||||||
@@ -1079,6 +1303,8 @@ Public Class MoveRawPartPage
|
|||||||
EgtRotateRawPart(nRawId, Vector3d.Z_AX(), dAngRaw)
|
EgtRotateRawPart(nRawId, Vector3d.Z_AX(), dAngRaw)
|
||||||
AddRawMoveData(nRawId, vtMove, m_RawMoveDataList)
|
AddRawMoveData(nRawId, vtMove, m_RawMoveDataList)
|
||||||
RemoveRawMoveData(nRawId, m_RawMoveDataList)
|
RemoveRawMoveData(nRawId, m_RawMoveDataList)
|
||||||
|
' elimino l'info che indica che il pezzo è scaricato sulla tavola
|
||||||
|
EgtRemoveInfo(nRawId, "Unloaded")
|
||||||
' Disabilito pezzo e nascondo le ventose
|
' Disabilito pezzo e nascondo le ventose
|
||||||
EgtSetStatus(nRawId, GDB_ST.ON_)
|
EgtSetStatus(nRawId, GDB_ST.ON_)
|
||||||
EgtSetStatus(GetVacuumId(), GDB_ST.OFF)
|
EgtSetStatus(GetVacuumId(), GDB_ST.OFF)
|
||||||
@@ -1111,6 +1337,14 @@ Public Class MoveRawPartPage
|
|||||||
m_nCurrPhase -= 1
|
m_nCurrPhase -= 1
|
||||||
m_bPrev = False
|
m_bPrev = False
|
||||||
m_SplitPage.m_bShow = True
|
m_SplitPage.m_bShow = True
|
||||||
|
m_SplitPage.m_bOnAuxTab = True
|
||||||
|
' imposto la visibilità della tavola ausiliaria
|
||||||
|
SetAuxTabInCurrDisposition()
|
||||||
|
' carico le info di disposizione dei pezzi
|
||||||
|
m_RawMoveDataList.Clear()
|
||||||
|
m_bRemovedRaw = GetRemoveByHandInDisposition(m_nCurrDisposition)
|
||||||
|
GetMoveInfoInDisposition(m_nCurrDisposition, m_RawMoveDataList)
|
||||||
|
RefreshVisibility()
|
||||||
EgtDraw()
|
EgtDraw()
|
||||||
Return
|
Return
|
||||||
End If
|
End If
|
||||||
@@ -1141,18 +1375,53 @@ Public Class MoveRawPartPage
|
|||||||
Return
|
Return
|
||||||
End If
|
End If
|
||||||
|
|
||||||
' se la disposizione corrente è sulla tavola ausiliaria allora lo sarà anche quella successiva
|
' ------- VISUALIZZAZIONE (navigazione tra le fasi) -------
|
||||||
If IsDispUnloadOnAuxTab(m_nCurrDisposition) <> 0 Then
|
If m_SplitPage.m_bShow Then
|
||||||
EgtSetCurrPhase(m_nCurrPhase + 1)
|
' verifico se la fase successiva è uno scarico frontale
|
||||||
m_nCurrDisposition = EgtGetNextOperation(m_nCurrDisposition)
|
If NextOperationIsUnloading(m_nCurrDisposition) Then
|
||||||
m_nCurrPhase += 1
|
' imposto la nuova fase (che è stata modificata all'interno della funzione di controllo)
|
||||||
m_bToNext = False
|
EgtSetCurrPhase(m_nCurrPhase)
|
||||||
m_SplitPage.m_bShow = True
|
' carico i dati di movimento dei pezzi nella fase corrente
|
||||||
EgtDraw()
|
m_RawMoveDataList.Clear()
|
||||||
EnableButtons()
|
m_bRemovedRaw = GetRemoveByHandInDisposition(m_nCurrDisposition)
|
||||||
Return
|
GetMoveInfoInDisposition(m_nCurrDisposition, m_RawMoveDataList)
|
||||||
|
EgtDraw()
|
||||||
|
EnableButtons()
|
||||||
|
Return
|
||||||
|
ElseIf IsDispUnloadOnAuxTab(m_nCurrDisposition) <> 0 AndAlso Not NextOperationIsUnloading(m_nCurrDisposition) Then
|
||||||
|
' imposto la nuova fase, al termine della Sub verrà caricata la pagina Split nella fase indicata ora
|
||||||
|
m_bToNext = True
|
||||||
|
m_nCurrPhase += 1
|
||||||
|
EgtSetCurrPhase(m_nCurrPhase)
|
||||||
|
EgtDraw()
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
' ------- MODIFICA -------
|
||||||
|
If Not m_SplitPage.m_bShow Then
|
||||||
|
' se la tavola di scarico presente oppure ci sono pezzi sulla tavola di scarico
|
||||||
|
Dim LclLstOfUnldPart As New List(Of Integer)
|
||||||
|
If m_SplitPage.m_bOnAuxTab Or PartOnAuxTab(LclLstOfUnldPart, m_nCurrPhase) Then
|
||||||
|
' se ci sono pezzi sulla tavola di scarico prima di procedere inserisco una pausa e creo una nuoava fase
|
||||||
|
If m_IsCurrPhaseUnloaded AndAlso InsertPauseInCurrPhase() Then AddNewPhase()
|
||||||
|
' nascondo la tavola di scarico
|
||||||
|
EgtDisableModified()
|
||||||
|
EgtSetStatus(m_nAuxTabId, GDB_ST.OFF)
|
||||||
|
EgtEnableModified()
|
||||||
|
End If
|
||||||
|
m_bToNext = True
|
||||||
|
'' se la disposizione corrente è sulla tavola ausiliaria allora lo sarà anche quella successiva
|
||||||
|
'If IsDispUnloadOnAuxTab(m_nCurrDisposition) <> 0 Then
|
||||||
|
' EgtSetCurrPhase(m_nCurrPhase + 1)
|
||||||
|
' m_nCurrDisposition = EgtGetNextOperation(m_nCurrDisposition)
|
||||||
|
' m_nCurrPhase += 1
|
||||||
|
' m_bToNext = False
|
||||||
|
' m_SplitPage.m_bShow = True
|
||||||
|
' EgtDraw()
|
||||||
|
' EnableButtons()
|
||||||
|
' Return
|
||||||
|
'End If
|
||||||
|
End If
|
||||||
' resetto l'inidice del pezzo da mnovimentare
|
' resetto l'inidice del pezzo da mnovimentare
|
||||||
m_CurrRawOnVacuum = GDB_ID.NULL
|
m_CurrRawOnVacuum = GDB_ID.NULL
|
||||||
' Deseleziono tutto
|
' Deseleziono tutto
|
||||||
@@ -1195,7 +1464,7 @@ Public Class MoveRawPartPage
|
|||||||
' disabilito bottone
|
' disabilito bottone
|
||||||
ModifyBtn.IsEnabled = False
|
ModifyBtn.IsEnabled = False
|
||||||
' gestione abilitazione altri bottoni
|
' gestione abilitazione altri bottoni
|
||||||
EnableButtons()
|
EnableButtons(MachiningList.Count > 0)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
' verifica se la disposizione indicata è uno scarico sulla tavola ausiliaria
|
' verifica se la disposizione indicata è uno scarico sulla tavola ausiliaria
|
||||||
@@ -1206,6 +1475,20 @@ Public Class MoveRawPartPage
|
|||||||
Return bVal
|
Return bVal
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
' restituisce e attiva la successiva disposizione se è uno scarico frontale
|
||||||
|
Public Function NextOperationIsUnloading(nCurrDispId As Integer) As Boolean
|
||||||
|
' recupero la primo operazione successiva
|
||||||
|
Dim nNextIdOperation As Integer = EgtGetNextOperation(nCurrDispId)
|
||||||
|
' a partire da questa cerco la prima disposizione disponibile
|
||||||
|
Dim nNextIdDips As Integer = GetNextDisposition(nNextIdOperation)
|
||||||
|
If nNextIdDips = nNextIdOperation And IsDispUnloadOnAuxTab(nNextIdOperation) Then
|
||||||
|
m_nCurrPhase += 1
|
||||||
|
m_nCurrDisposition = nNextIdOperation
|
||||||
|
Return True
|
||||||
|
End If
|
||||||
|
Return False
|
||||||
|
End Function
|
||||||
|
|
||||||
' recupero la prima disposizione disponibile tra l'elenco delle operazioni presenti
|
' recupero la prima disposizione disponibile tra l'elenco delle operazioni presenti
|
||||||
Public Function GetNextDisposition(nCurrDisposId As Integer) As Integer
|
Public Function GetNextDisposition(nCurrDisposId As Integer) As Integer
|
||||||
Dim nDispId As Integer = nCurrDisposId
|
Dim nDispId As Integer = nCurrDisposId
|
||||||
@@ -1218,7 +1501,7 @@ Public Class MoveRawPartPage
|
|||||||
Return GDB_ID.NULL
|
Return GDB_ID.NULL
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Private Sub EnableButtons()
|
Private Sub EnableButtons(Optional bExistsMachining As Boolean = False)
|
||||||
UpBtn.IsEnabled = Not m_SplitPage.m_bShow
|
UpBtn.IsEnabled = Not m_SplitPage.m_bShow
|
||||||
LeftBtn.IsEnabled = Not m_SplitPage.m_bShow
|
LeftBtn.IsEnabled = Not m_SplitPage.m_bShow
|
||||||
RightBtn.IsEnabled = Not m_SplitPage.m_bShow
|
RightBtn.IsEnabled = Not m_SplitPage.m_bShow
|
||||||
@@ -1234,19 +1517,39 @@ Public Class MoveRawPartPage
|
|||||||
BottomRBtn.IsEnabled = Not m_SplitPage.m_bShow
|
BottomRBtn.IsEnabled = Not m_SplitPage.m_bShow
|
||||||
PauseBtn.IsEnabled = Not m_SplitPage.m_bShow
|
PauseBtn.IsEnabled = Not m_SplitPage.m_bShow
|
||||||
ResetBtn.IsEnabled = Not m_SplitPage.m_bShow
|
ResetBtn.IsEnabled = Not m_SplitPage.m_bShow
|
||||||
|
UnloadPartsBtn.IsEnabled = Not m_SplitPage.m_bShow
|
||||||
If m_SplitPage.m_bShow Then
|
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
|
Else
|
||||||
NextBtn.IsEnabled = Not m_SplitPage.m_bOnAuxTab
|
' Se esistono delle lavorazioni allora abilito il pulsante per procedere
|
||||||
|
If Not bExistsMachining Then
|
||||||
|
NextBtn.IsEnabled = Not m_SplitPage.m_bOnAuxTab
|
||||||
|
Else
|
||||||
|
NextBtn.IsEnabled = True
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
' esco dalla pagina di scarico
|
||||||
Private Sub MoveRawPartPage_Unloaded(sender As Object, e As EventArgs) Handles Me.Unloaded
|
Private Sub MoveRawPartPage_Unloaded(sender As Object, e As EventArgs) Handles Me.Unloaded
|
||||||
' verifico che la fase corrente non sia vuota
|
' verifico che la fase corrente non sia vuota
|
||||||
Dim nLastDispId As Integer = EgtGetPhaseDisposition(m_nCurrPhase)
|
Dim nLastDispId As Integer = EgtGetPhaseDisposition(m_nCurrPhase)
|
||||||
If EgtIsOperationEmpty(nLastDispId) And m_SplitPage.m_bOnAuxTab And m_RawMoveDataList.Count = 0 Then
|
|
||||||
EgtErase(nLastDispId)
|
'' se sono in visualizzazione allora non elimino essuna operazione
|
||||||
End If
|
'If Not m_SplitPage.m_bShow Then
|
||||||
|
' If EgtIsOperationEmpty(nLastDispId) And Not m_SplitPage.m_bOnAuxTab And m_RawMoveDataList.Count = 0 Then
|
||||||
|
' EgtErase(nLastDispId)
|
||||||
|
' ElseIf EgtIsOperationEmpty(nLastDispId) And m_SplitPage.m_bOnAuxTab And m_RawMoveDataList.Count = 0 Then
|
||||||
|
' ' Dichiaro pagina non attiva
|
||||||
|
' m_bActive = False
|
||||||
|
' Return
|
||||||
|
' End If
|
||||||
|
'End If
|
||||||
|
|
||||||
' Se movimento con ventose
|
' Se movimento con ventose
|
||||||
If Not m_bByHand Then
|
If Not m_bByHand Then
|
||||||
@@ -1262,8 +1565,9 @@ Public Class MoveRawPartPage
|
|||||||
SaveMoveInfoInDisposition(nDispId, m_RawMoveDataList)
|
SaveMoveInfoInDisposition(nDispId, m_RawMoveDataList)
|
||||||
' imposto eventuale presenza rimozioni manuali
|
' imposto eventuale presenza rimozioni manuali
|
||||||
SaveRemoveByHandInDisposition(nDispId, m_bRemovedRaw)
|
SaveRemoveByHandInDisposition(nDispId, m_bRemovedRaw)
|
||||||
' imposto eventuale movimento pezzi su tavola ausiliaria
|
' imposto eventuale movimento pezzi su tavola ausiliaria (se è realmente avvenuto)
|
||||||
SaveMovePartsOnAuxTable(nDispId, m_SplitPage.m_bOnAuxTab)
|
'SaveMovePartsOnAuxTable(nDispId, m_SplitPage.m_bOnAuxTab)
|
||||||
|
SaveMovePartsOnAuxTable(nDispId, m_IsCurrPhaseUnloaded)
|
||||||
' Eseguo calcolo speciale dei movimenti
|
' Eseguo calcolo speciale dei movimenti
|
||||||
SpecialApplyDisposition(nDispId, True, Not m_SplitPage.m_bOnAuxTab)
|
SpecialApplyDisposition(nDispId, True, Not m_SplitPage.m_bOnAuxTab)
|
||||||
End If
|
End If
|
||||||
@@ -1279,13 +1583,18 @@ Public Class MoveRawPartPage
|
|||||||
SpecialApplyDisposition(nDispId, True)
|
SpecialApplyDisposition(nDispId, True)
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
' Nascondo eventuale tavola ausiliaria
|
' Nascondo eventuale tavola ausiliaria
|
||||||
If m_SplitPage.m_bOnAuxTab Then
|
If m_SplitPage.m_bOnAuxTab Then
|
||||||
EgtDisableModified()
|
EgtDisableModified()
|
||||||
EgtSetStatus(m_nAuxTabId, GDB_ST.OFF)
|
EgtSetStatus(m_nAuxTabId, GDB_ST.OFF)
|
||||||
EgtEnableModified()
|
EgtEnableModified()
|
||||||
EgtZoom(ZM.ALL, False)
|
' se sto uscendo dalla pagina delle spezzature
|
||||||
If Not m_bPrev Then
|
If Not m_bPrev And Not m_bToNext Then
|
||||||
|
Dim nDispId As Integer = EgtGetPhaseDisposition(m_nCurrPhase)
|
||||||
|
' se sto uscendo dalla pagina split (senza passare dal comando next)
|
||||||
|
Dim lclLstUnlPart As New List(Of Integer)
|
||||||
|
SaveMovePartsOnAuxTable(nDispId, PartOnAuxTab(lclLstUnlPart, m_nCurrPhase))
|
||||||
' Cancello eventuale manipolatore pezzi
|
' Cancello eventuale manipolatore pezzi
|
||||||
EgtDisableModified()
|
EgtDisableModified()
|
||||||
RemoveVacuumCups()
|
RemoveVacuumCups()
|
||||||
@@ -1302,10 +1611,30 @@ Public Class MoveRawPartPage
|
|||||||
m_bPrev = False
|
m_bPrev = False
|
||||||
m_SplitPage.m_bShow = True
|
m_SplitPage.m_bShow = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
Dim Ph As Integer = EgtGetCurrPhase()
|
||||||
|
' aggiorno il disegno
|
||||||
|
EgtZoom(ZM.ALL, False)
|
||||||
' Dichiaro pagina non attiva
|
' Dichiaro pagina non attiva
|
||||||
m_bActive = False
|
m_bActive = False
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
' ----------------- TEST funzione per debug operazioni -----------------
|
||||||
|
Private Sub SaveMyFileTest(sFilename As String)
|
||||||
|
LoadCurrPhaseMachining()
|
||||||
|
' salvo il file corrente per poterlo studiare e capire cosa è successo nella rappresentazione dei grezzi
|
||||||
|
EgtSaveFile("C:\EgtData\OmagCUT\MyProjects\" & sFilename & ".nge", NGE.BIN)
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub LoadCurrPhaseMachining()
|
||||||
|
Dim m_MachiningList As New List(Of SplitMach)
|
||||||
|
'm_SplitPage.ShowMachiningList()
|
||||||
|
'm_SplitPage.SaveOrderMachinig(m_nCurrPhase)
|
||||||
|
' Preparo la lista delle lavorazioni
|
||||||
|
CalculateSplitMachList(m_nCurrPhase, m_MachiningList)
|
||||||
|
Dim b As Boolean = False
|
||||||
|
End Sub
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+85
-58
@@ -1,12 +1,12 @@
|
|||||||
<UserControl x:Class="NestPageUC"
|
<UserControl x:Class="NestPageUC"
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
|
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
d:DesignHeight="853.3" d:DesignWidth="1280" Initialized="NestPage_Initialized" Loaded="NestPage_Loaded" Unloaded="NestPage_Unloaded">
|
d:DesignHeight="853.3" d:DesignWidth="1280" Initialized="NestPage_Initialized" Loaded="NestPage_Loaded" Unloaded="NestPage_Unloaded">
|
||||||
|
|
||||||
<!-- Definizione della NestPage -->
|
<!-- Definizione della NestPage -->
|
||||||
<Grid Name="NestPageGrid">
|
<Grid Name="NestPageGrid">
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
@@ -38,39 +38,39 @@
|
|||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
<Button Name="PartRotOnBtn" Grid.Column="0" Grid.Row="1"
|
<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"
|
<Image Source="{DynamicResource PartRotOnImg}" HorizontalAlignment="Center"
|
||||||
VerticalAlignment="Center" />
|
VerticalAlignment="Center" />
|
||||||
</Button>
|
</Button>
|
||||||
<Button Name="PartRotOffBtn" Grid.Column="2" Grid.Row="1"
|
<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"
|
<Image Source="{DynamicResource PartRotOffImg}" HorizontalAlignment="Center"
|
||||||
VerticalAlignment="Center" />
|
VerticalAlignment="Center" />
|
||||||
</Button>
|
</Button>
|
||||||
|
|
||||||
<Button Name="UpBtn" Grid.Column="1" Grid.Row="1"
|
<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}"/>
|
<Image Source="{DynamicResource UpArrowImg}" Style="{DynamicResource OmagCut_ArrowButtonIcon}"/>
|
||||||
</Button>
|
</Button>
|
||||||
<Button Name="LeftBtn" Grid.Column="0" Grid.Row="2"
|
<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}"/>
|
<Image Source="{DynamicResource LeftArrowImg}" Style="{DynamicResource OmagCut_ArrowButtonIcon}"/>
|
||||||
</Button>
|
</Button>
|
||||||
<ToggleButton Name="MaximizeMoveBtn" Grid.Column="1" Grid.Row="2"
|
<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}"/>
|
<Image Source="../Resources/MaxMove.png" Style="{DynamicResource OmagCut_ScaleButtonIcon}"/>
|
||||||
</ToggleButton>
|
</ToggleButton>
|
||||||
<Button Name="RightBtn" Grid.Column="2" Grid.Row="2"
|
<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}"/>
|
<Image Source="{DynamicResource RightArrowImg}" Style="{DynamicResource OmagCut_ArrowButtonIcon}"/>
|
||||||
</Button>
|
</Button>
|
||||||
|
|
||||||
<EgtWPFLib:EgtTextBox Name="StepMoveTxBx" Grid.Column="0" Grid.Row="3" Width="50"
|
<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"
|
<Button Name="DownBtn" Grid.Column="1" Grid.Row="3"
|
||||||
Style="{DynamicResource OmagCut_BottomGrayGradientYellowButton}">
|
Style="{DynamicResource OmagCut_BottomGrayGradientYellowButton}">
|
||||||
<Image Source="{DynamicResource DownArrowImg}" Style="{DynamicResource OmagCut_ArrowButtonIcon}"/>
|
<Image Source="{DynamicResource DownArrowImg}" Style="{DynamicResource OmagCut_ArrowButtonIcon}"/>
|
||||||
</Button>
|
</Button>
|
||||||
|
|
||||||
<Grid Grid.Column="2" Grid.Row="3" HorizontalAlignment="Center" VerticalAlignment="Center">
|
<Grid Grid.Column="2" Grid.Row="3" HorizontalAlignment="Center" VerticalAlignment="Center">
|
||||||
@@ -79,58 +79,86 @@
|
|||||||
<ColumnDefinition Width="Auto"/>
|
<ColumnDefinition Width="Auto"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<EgtWPFLib:EgtTextBox Name="RotationAngleTxBx" Width="50" IsLength="False"
|
<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"
|
<TextBlock Grid.Column="1" FontSize="30" Margin="2,-5,0,0"
|
||||||
Text="°"/>
|
Text="°"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
<Button Name="RotateCounterClockwiseBtn" Grid.Column="0" Grid.Row="4"
|
<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"
|
<Image Source="{DynamicResource CounterClockwiseRotateImg}" Width="64" Height="65" HorizontalAlignment="Center"
|
||||||
VerticalAlignment="Center" />
|
VerticalAlignment="Center" />
|
||||||
</Button>
|
</Button>
|
||||||
<ToggleButton Name="MagneticPiecesBtn" Grid.Column="1" Grid.Row="4"
|
<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"
|
<Image Source="{DynamicResource AlignPiecesImg}" Width="65" Height="65" HorizontalAlignment="Center"
|
||||||
VerticalAlignment="Center" />
|
VerticalAlignment="Center" />
|
||||||
</ToggleButton>
|
</ToggleButton>
|
||||||
<Button Name="RotateClockwiseBtn" Grid.Column="2" Grid.Row="4"
|
<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"
|
<Image Source="{DynamicResource ClockwiseRotateImg}" Width="65" Height="65" HorizontalAlignment="Center"
|
||||||
VerticalAlignment="Center" />
|
VerticalAlignment="Center" />
|
||||||
</Button>
|
</Button>
|
||||||
|
|
||||||
<UniformGrid Name ="UG0" Grid.Column="0" Grid.Row="5" Grid.ColumnSpan="3" Columns="3" >
|
<!--Comandi attivi solo in madalità REG-->
|
||||||
<Button Name="InsertPartBtn" Style="{DynamicResource OmagCut_YellowIconButton}">
|
<UniformGrid Name ="UG0_Reg" Grid.Column="0" Grid.Row="6" Grid.ColumnSpan="3" Columns="3" Visibility="Hidden">
|
||||||
<Image Source="{DynamicResource Inserisci-pezzoImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
<ToggleButton Name="AddPointRegBtn" Visibility="Hidden"
|
||||||
</Button>
|
Style="{DynamicResource OmagCut_YellowIconToggleButton}">
|
||||||
<Button Name="StorePartBtn" Style="{DynamicResource OmagCut_YellowIconButton}">
|
<Image Source="{DynamicResource RefTabImg}" Style="{DynamicResource OmagCut_ArrowButtonIcon}"/>
|
||||||
<Image Source="{DynamicResource Parcheggia-pezzoImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
</ToggleButton>
|
||||||
</Button>
|
<ToggleButton Name="ModPointRegBtn" Style="{DynamicResource OmagCut_YellowIconToggleButton}">
|
||||||
<ToggleButton Name="StartCurveWJBtn" Style="{DynamicResource OmagCut_YellowIconToggleButton}">
|
<Image Source="{DynamicResource Move-Spot-RegImg}" Style="{DynamicResource OmagCut_ArrowButtonIcon}"/>
|
||||||
<Image Source="{DynamicResource StartWJImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
</ToggleButton>
|
||||||
</ToggleButton>
|
<ToggleButton Name="RemovePointRegBtn" Visibility="Hidden"
|
||||||
</UniformGrid>
|
Style="{DynamicResource OmagCut_YellowIconToggleButton}">
|
||||||
|
<Image Source="{DynamicResource RefTabImg}" Style="{DynamicResource OmagCut_ArrowButtonIcon}"/>
|
||||||
<UniformGrid Name ="UG1" Grid.Column="0" Grid.Row="6" Grid.ColumnSpan="3" Columns="3" >
|
</ToggleButton>
|
||||||
<Button Name="RemovePartBtn" Style="{DynamicResource OmagCut_YellowIconButton}">
|
</UniformGrid>
|
||||||
<Image Source="{DynamicResource Elimina-pezzoImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
|
||||||
</Button>
|
|
||||||
<ToggleButton Name="DragRettanleBtn" Style="{DynamicResource OmagCut_YellowIconToggleButton}">
|
|
||||||
<Image Source="{DynamicResource Drag_RettangleImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
|
||||||
</ToggleButton>
|
|
||||||
<ToggleButton Name="SplitCurveWJBtn" Style="{DynamicResource OmagCut_YellowIconToggleButton}">
|
|
||||||
<Image Source="{DynamicResource SplitWJImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
|
||||||
</ToggleButton>
|
|
||||||
</UniformGrid>
|
|
||||||
|
|
||||||
<UniformGrid Grid.Column="0" Grid.Row="7" Grid.ColumnSpan="3" Columns="2" >
|
<!--Comandi attivi solo in madalità REG-->
|
||||||
<Button Name="SelectAllBtn" Style="{DynamicResource OmagCut_YellowIconButton}">
|
<UniformGrid Name ="UG1_Reg" Grid.Column="0" Grid.Row="5" Grid.ColumnSpan="3" Columns="2" Visibility="Hidden">
|
||||||
<Image Source="{DynamicResource Seleziona-tuttoImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
<Button Name="AdjustPointRegBtn" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||||
</Button>
|
<Image Source="{DynamicResource Muovi-grezzoImg}" Style="{DynamicResource OmagCut_ArrowButtonIcon}"/>
|
||||||
<Button Name="DeselectAllBtn" Style="{DynamicResource OmagCut_YellowIconButton}">
|
</Button>
|
||||||
<Image Source="{DynamicResource Deseleziona-tuttoImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
<ToggleButton Name="ActivatePointRegBtn" Style="{DynamicResource OmagCut_YellowIconToggleButton}">
|
||||||
</Button>
|
<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>
|
</UniformGrid>
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
@@ -146,7 +174,6 @@
|
|||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
</UserControl>
|
</UserControl>
|
||||||
|
|||||||
+1009
-47
File diff suppressed because it is too large
Load Diff
@@ -1,9 +1,9 @@
|
|||||||
<Window x:Class="OpenFileWD"
|
<Window x:Class="OpenFileWD"
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
|
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
|
||||||
FontFamily="{DynamicResource OmagCut_Font}"
|
FontFamily="{DynamicResource OmagCut_Font}"
|
||||||
Title="OpenFile" Height="682.6" Width="426.6" WindowStyle="None" ResizeMode="NoResize" ShowInTaskbar="False" AllowsTransparency="True" Background="Transparent">
|
Title="OpenFile" Height="682.6" Width="426.6" WindowStyle="None" ResizeMode="NoResize" ShowInTaskbar="False" AllowsTransparency="True" Background="Transparent">
|
||||||
|
|
||||||
<Border Style="{DynamicResource OmagCut_Border}">
|
<Border Style="{DynamicResource OmagCut_Border}">
|
||||||
<Grid>
|
<Grid>
|
||||||
@@ -23,7 +23,7 @@
|
|||||||
|
|
||||||
<Label Name="FilePathTxBl" Grid.Column="1" Grid.Row="1" Foreground="White" FontSize="20" VerticalAlignment="Center"/>
|
<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}"
|
<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 Grid.Column="1" Grid.Row="4">
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
@@ -35,10 +35,10 @@
|
|||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
<Button Name="OkBtn" Grid.Column="1" Style="{DynamicResource OmagCut_GradientBlueIconButton}" >
|
<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>
|
||||||
<Button Name="ExitBtn" Grid.Column="3" Style="{DynamicResource OmagCut_GradientBlueIconButton}" IsCancel="True">
|
<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>
|
</Button>
|
||||||
|
|
||||||
</Grid>
|
</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}"
|
FontFamily="{DynamicResource OmagCut_Font}"
|
||||||
ResizeMode="NoResize" WindowStyle="None" AllowsTransparency="True" Background="Transparent"
|
ResizeMode="NoResize" WindowStyle="None" AllowsTransparency="True" Background="Transparent"
|
||||||
Title="SaveNameWD" Height="200" Width="400" ShowInTaskbar="False">
|
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-->
|
</Grid.RowDefinitions>
|
||||||
<TextBlock Name="TitleWDTxbl" Grid.Column="1" Grid.Row="1"
|
|
||||||
|
<!--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}"/>
|
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||||
|
<EgtWPFLib:EgtTextBox Name="NbrOfParts"
|
||||||
|
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||||
|
</UniformGrid>
|
||||||
|
|
||||||
<UniformGrid Grid.Column="1" Grid.Row="3" VerticalAlignment="Center" Columns="2">
|
<Grid Name="ButtonsGrid" Grid.Column="1" Grid.Row="5" Grid.RowSpan="1">
|
||||||
<TextBlock Name="NbrOfPartsMsg"
|
<Grid.ColumnDefinitions>
|
||||||
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">
|
<ColumnDefinition Width="0.5*"/>
|
||||||
<Grid.ColumnDefinitions>
|
<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*"/>
|
</Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="1*"/>
|
|
||||||
<ColumnDefinition Width="0.5*"/>
|
|
||||||
<ColumnDefinition Width="1*"/>
|
|
||||||
<ColumnDefinition Width="0.5*"/>
|
|
||||||
<ColumnDefinition Width="1*"/>
|
|
||||||
<ColumnDefinition Width="0.5*"/>
|
|
||||||
|
|
||||||
</Grid.ColumnDefinitions>
|
<!--ultimo progetto-->
|
||||||
|
<Button Name="ConfirmSelection" Grid.Column="1" Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}"
|
||||||
<!--ultimo progetto-->
|
|
||||||
<Button Name="ConfirmSelection" Grid.Column="1" Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}"
|
|
||||||
ToolTip="Confirm">
|
ToolTip="Confirm">
|
||||||
<Image Source="{DynamicResource VImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
<Image Source="{DynamicResource VImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||||
</Button>
|
</Button>
|
||||||
<!--nuovo progetto-->
|
<!--nuovo progetto-->
|
||||||
<Button Name="SelectAllPart" Grid.Column="2" Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}"
|
<Button Name="SelectAllPart" Grid.Column="2" Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}"
|
||||||
ToolTip="Select all" Visibility="Collapsed">
|
ToolTip="Select all" Visibility="Collapsed">
|
||||||
<Image Source="{DynamicResource NuovoImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
<Image Source="{DynamicResource NuovoImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||||
</Button>
|
</Button>
|
||||||
<!--apri folder progetti-->
|
<!--apri folder progetti-->
|
||||||
<Button Name="CancelSelection" Grid.Column="5" Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}"
|
<Button Name="CancelSelection" Grid.Column="5" Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}"
|
||||||
ToolTip="Cancel">
|
ToolTip="Cancel">
|
||||||
<Image Source="{DynamicResource XImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
<Image Source="{DynamicResource XImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||||
</Button>
|
</Button>
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
</Border>
|
</Border>
|
||||||
</Window>
|
</Window>
|
||||||
|
|||||||
@@ -33,8 +33,8 @@
|
|||||||
Me.Top = Owner.Top + Owner.Height / 2 - Me.Height / 2
|
Me.Top = Owner.Top + Owner.Height / 2 - Me.Height / 2
|
||||||
Me.Left = Owner.Left + Owner.Width / 2 - Me.Width / 2
|
Me.Left = Owner.Left + Owner.Width / 2 - Me.Width / 2
|
||||||
|
|
||||||
TitleWDTxbl.Text = "Selection parts"
|
TitleWDTxbl.Text = EgtUILib.EgtMsg(91232) ' Selection parts
|
||||||
NbrOfPartsMsg.Text = "Number of parts"
|
NbrOfPartsMsg.Text = EgtUILib.EgtMsg(91233) ' Number of parts
|
||||||
NbrOfParts.Text = m_NumberOfParts.ToString
|
NbrOfParts.Text = m_NumberOfParts.ToString
|
||||||
End Sub
|
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
|
||||||
+259
-132
@@ -36,6 +36,10 @@ Public Module SplitAuto
|
|||||||
Public m_dStartFreeLen As Double
|
Public m_dStartFreeLen As Double
|
||||||
Public m_dEndFreeLen As Double
|
Public m_dEndFreeLen As Double
|
||||||
Public m_vtDir As Vector3d
|
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
|
End Class
|
||||||
|
|
||||||
'-----------------------------------------------------------------------------------------------
|
'-----------------------------------------------------------------------------------------------
|
||||||
@@ -47,125 +51,178 @@ Public Module SplitAuto
|
|||||||
While nOperId <> GDB_ID.NULL
|
While nOperId <> GDB_ID.NULL
|
||||||
' verifico sia una lavorazione valida della fase corrente
|
' verifico sia una lavorazione valida della fase corrente
|
||||||
If IsValidMachining(nOperId) And EgtGetOperationPhase(nOperId) = nCurrPhase Then
|
If IsValidMachining(nOperId) And EgtGetOperationPhase(nOperId) = nCurrPhase Then
|
||||||
' se appartiene ad un grezzo attivo la inserisco in lista
|
Dim Mach As New SplitMach
|
||||||
If IsMachiningInActiveRaw(nOperId) Then
|
If CreateMach(Mach, nOperId) Then MachSplitList.Add(Mach)
|
||||||
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
|
|
||||||
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
|
|
||||||
End If
|
End If
|
||||||
nOperId = EgtGetNextOperation(nOperId)
|
nOperId = EgtGetNextOperation(nOperId)
|
||||||
End While
|
End While
|
||||||
Return True
|
Return True
|
||||||
End Function
|
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
|
' 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)
|
Friend Sub CountMachiningType(MachSplit As SplitMach, ByRef nCountSawing As Integer, ByRef nCountWaterjetting As Integer, ByRef nCountOtherMachining As Integer)
|
||||||
@@ -194,7 +251,7 @@ Public Module SplitAuto
|
|||||||
|
|
||||||
Private Sub ColorSingleMachining(nOperId As Integer, sLay As String, dSideAng As Double, bEnabled As Boolean, nInterf As Integer)
|
Private Sub ColorSingleMachining(nOperId As Integer, sLay As String, dSideAng As Double, bEnabled As Boolean, nInterf As Integer)
|
||||||
' Verifico se è un taglio da sopra o da sotto
|
' Verifico se è un taglio da sopra o da sotto
|
||||||
Dim bOnMach As Boolean = (sLay = NAME_ONPATH Or ( sLay = NAME_INLOOP AndAlso EgtExistsInfo( nOperId, INFO_FILOTOP)))
|
Dim bOnMach As Boolean = (sLay = NAME_ONPATH Or (sLay = NAME_INLOOP AndAlso EgtExistsInfo(nOperId, INFO_FILOTOP)))
|
||||||
Dim bDrip As Boolean = (sLay = NAME_DRIPCUT Or sLay = NAME_UNDERDRILL)
|
Dim bDrip As Boolean = (sLay = NAME_DRIPCUT Or sLay = NAME_UNDERDRILL)
|
||||||
' Recupero il preview della lavorazione
|
' Recupero il preview della lavorazione
|
||||||
Dim nPvId As Integer = GDB_ID.NULL
|
Dim nPvId As Integer = GDB_ID.NULL
|
||||||
@@ -219,11 +276,11 @@ Public Module SplitAuto
|
|||||||
Next
|
Next
|
||||||
EgtSetColor(nDwnCutId, COL_MCH_DISABLED)
|
EgtSetColor(nDwnCutId, COL_MCH_DISABLED)
|
||||||
Dim bFreeStart As Boolean = (nInterf And FMI_TYPE.LI) <> FMI_TYPE.LI
|
Dim bFreeStart As Boolean = (nInterf And FMI_TYPE.LI) <> FMI_TYPE.LI
|
||||||
EgtSetColor(nPrcId, If(bFreeStart, COL_MCH_DISABLED, COL_MCH_DIS_INTERF))
|
EgtSetColor(nPrcId, If(bFreeStart, COL_MCH_DISABLED(), COL_MCH_DIS_INTERF()))
|
||||||
EgtSetColor(nDwnPrcId, If(bFreeStart, COL_MCH_DISABLED, COL_MCH_DIS_INTERF))
|
EgtSetColor(nDwnPrcId, If(bFreeStart, COL_MCH_DISABLED(), COL_MCH_DIS_INTERF()))
|
||||||
Dim bFreeEnd As Boolean = (nInterf And FMI_TYPE.LO) <> FMI_TYPE.LO
|
Dim bFreeEnd As Boolean = (nInterf And FMI_TYPE.LO) <> FMI_TYPE.LO
|
||||||
EgtSetColor(nPocId, If(bFreeEnd, COL_MCH_DISABLED, COL_MCH_DIS_INTERF))
|
EgtSetColor(nPocId, If(bFreeEnd, COL_MCH_DISABLED(), COL_MCH_DIS_INTERF()))
|
||||||
EgtSetColor(nDwnPocId, If(bFreeEnd, COL_MCH_DISABLED, COL_MCH_DIS_INTERF))
|
EgtSetColor(nDwnPocId, If(bFreeEnd, COL_MCH_DISABLED(), COL_MCH_DIS_INTERF()))
|
||||||
Else
|
Else
|
||||||
Dim colCut As Color3d
|
Dim colCut As Color3d
|
||||||
If bOnMach Then
|
If bOnMach Then
|
||||||
@@ -233,8 +290,19 @@ Public Module SplitAuto
|
|||||||
ElseIf Math.Abs(dSideAng) > EPS_ANG_SMALL Then
|
ElseIf Math.Abs(dSideAng) > EPS_ANG_SMALL Then
|
||||||
colCut = COL_MCH_CUT_ANG()
|
colCut = COL_MCH_CUT_ANG()
|
||||||
Else
|
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
|
End If
|
||||||
|
|
||||||
For Each nId In vCutId
|
For Each nId In vCutId
|
||||||
EgtSetColor(nId, colCut)
|
EgtSetColor(nId, colCut)
|
||||||
Next
|
Next
|
||||||
@@ -342,6 +410,7 @@ Public Module SplitAuto
|
|||||||
Dim ptOri As Point3d
|
Dim ptOri As Point3d
|
||||||
EgtGetTableRef(1, ptOri)
|
EgtGetTableRef(1, ptOri)
|
||||||
Dim vtOri As New Vector3d(ptOri.x, ptOri.y, ptOri.z)
|
Dim vtOri As New Vector3d(ptOri.x, ptOri.y, ptOri.z)
|
||||||
|
' ---------------------------------- GREZZI ----------------------------------
|
||||||
' Eseguo eventuali spezzature dei grezzi e vi sposto i pezzi (i grezzi devono essere sempre copiati per Registrazione con rotazione)
|
' Eseguo eventuali spezzature dei grezzi e vi sposto i pezzi (i grezzi devono essere sempre copiati per Registrazione con rotazione)
|
||||||
Dim nRawId As Integer = EgtGetFirstRawPart()
|
Dim nRawId As Integer = EgtGetFirstRawPart()
|
||||||
While nRawId <> GDB_ID.NULL
|
While nRawId <> GDB_ID.NULL
|
||||||
@@ -393,10 +462,19 @@ Public Module SplitAuto
|
|||||||
' passo al successivo grezzo
|
' passo al successivo grezzo
|
||||||
nRawId = EgtGetNextRawPart(nRawId)
|
nRawId = EgtGetNextRawPart(nRawId)
|
||||||
End While
|
End While
|
||||||
|
' ---------------------------------- GREZZI ----------------------------------
|
||||||
' Cancello preview dei tagli allungati dalla lavorazione
|
' Cancello preview dei tagli allungati dalla lavorazione
|
||||||
For Each nCut As Integer In vCuts
|
For Each nCut As Integer In vCuts
|
||||||
RemoveMachiningPreview(nCut)
|
RemoveMachiningPreview(nCut)
|
||||||
Next
|
Next
|
||||||
|
' ---------------------------------- LAVORAZIONI ----------------------------------
|
||||||
|
ChangeOperationPhase(nNewPhase)
|
||||||
|
' ---------------------------------- LAVORAZIONI ----------------------------------
|
||||||
|
Return True
|
||||||
|
End Function
|
||||||
|
|
||||||
|
' Sposta le lavorzioni della fase precedente a quella indicata
|
||||||
|
Friend Sub ChangeOperationPhase_ERR(nNewPhase As Integer)
|
||||||
' Sposto tutte le lavorazioni disabilitate e le eventuali inglobate nella nuova fase
|
' Sposto tutte le lavorazioni disabilitate e le eventuali inglobate nella nuova fase
|
||||||
Dim nId = EgtGetFirstOperation()
|
Dim nId = EgtGetFirstOperation()
|
||||||
While nId <> GDB_ID.NULL
|
While nId <> GDB_ID.NULL
|
||||||
@@ -417,9 +495,50 @@ Public Module SplitAuto
|
|||||||
End If
|
End If
|
||||||
nId = nNextId
|
nId = nNextId
|
||||||
End While
|
End While
|
||||||
Return True
|
End Sub
|
||||||
End Function
|
|
||||||
|
|
||||||
|
' Miglioramento della gestione delle lavorazioni
|
||||||
|
Friend Sub ChangeOperationPhase(nNewPhase As Integer)
|
||||||
|
' creo l'elenco delle lavorazioni che devono essere sposate
|
||||||
|
Dim MchList As New List(Of Integer)
|
||||||
|
' Recupero le lavorazioni disabilitate e le eventuali inglobate nella nuova fase
|
||||||
|
Dim nId = EgtGetFirstOperation()
|
||||||
|
While nId <> GDB_ID.NULL
|
||||||
|
Dim nNextId = EgtGetNextOperation(nId)
|
||||||
|
If IsValidMachining(nId) And EgtGetOperationPhase(nId) = nNewPhase - 1 And EgtExistsInfo(nId, INFO_MCH_USER_OFF) Then
|
||||||
|
' Provo ad inserire la lavorazione nell'elenco
|
||||||
|
AddMach(MchList, nId)
|
||||||
|
' sposto le inglobate
|
||||||
|
Dim sInfo As String = String.Empty
|
||||||
|
If EgtGetInfo(nId, INFO_MCH_OTHMID, sInfo) Then
|
||||||
|
Dim sItems() As String = sInfo.Split(",".ToCharArray)
|
||||||
|
For Each sId2 As String In sItems
|
||||||
|
Dim nId2 As Integer = 0
|
||||||
|
StringToInt(sId2, nId2)
|
||||||
|
If nId2 > 0 Then
|
||||||
|
' Provo ad inserire la lavorazione nell'elenco
|
||||||
|
AddMach(MchList, nId2)
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
nId = nNextId
|
||||||
|
End While
|
||||||
|
' Procedo ora a spostare le lavorazioni nella nuova disposizione
|
||||||
|
For Each ItemMchId As Integer In MchList
|
||||||
|
EgtChangeOperationPhase(ItemMchId, nNewPhase)
|
||||||
|
Next
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
' Inserisce gli inidici delle lavorazioni evitando di inserire dei doppioni
|
||||||
|
Private Sub AddMach(MchList As List(Of Integer), IdMch As Integer)
|
||||||
|
For Each Item As Integer In MchList
|
||||||
|
If IdMch = Item Then
|
||||||
|
Return
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
MchList.Add(IdMch)
|
||||||
|
End Sub
|
||||||
'-----------------------------------------------------------------------------------------------
|
'-----------------------------------------------------------------------------------------------
|
||||||
Friend Function CalculateSplitAuto() As Boolean
|
Friend Function CalculateSplitAuto() As Boolean
|
||||||
' Fase iniziale
|
' Fase iniziale
|
||||||
@@ -429,7 +548,7 @@ Public Module SplitAuto
|
|||||||
' Reinserisco tutte le lavorazioni
|
' Reinserisco tutte le lavorazioni
|
||||||
Dim nWarn As Integer = 0
|
Dim nWarn As Integer = 0
|
||||||
AddMachinings(GDB_ID.NULL, nWarn)
|
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
|
' Carico ventose
|
||||||
LoadVacuumCups()
|
LoadVacuumCups()
|
||||||
' Lancio calcolo separazione
|
' Lancio calcolo separazione
|
||||||
@@ -743,28 +862,36 @@ Public Module SplitAuto
|
|||||||
|
|
||||||
Private Function ExecMove(nDispId As Integer, vNewRaws As List(Of Integer),
|
Private Function ExecMove(nDispId As Integer, vNewRaws As List(Of Integer),
|
||||||
vtMove As Vector3d, dMinMove As Double) As Boolean
|
vtMove As Vector3d, dMinMove As Double) As Boolean
|
||||||
Dim vtMove2 As Vector3d = -vtMove
|
Dim bTwoHeadVac As Boolean = (EgtGetHeadId(VACUUM_HEAD_2) <> GDB_ID.NULL)
|
||||||
Dim rmData As New RawMoveData
|
Dim rmData As New RawMoveData
|
||||||
If PutVacuumCupsOnRaw(vNewRaws(1), rmData) AndAlso
|
Dim vtMove2 As Vector3d = -vtMove
|
||||||
SafeMoveRawPart(vNewRaws(1), vtMove, dMinMove) Then
|
|
||||||
|
VacuumCups.ResetHeadName()
|
||||||
|
Dim bPutVacuum As Boolean = PutVacuumCupsOnRaw(vNewRaws(1), rmData)
|
||||||
|
If Not bPutVacuum And bTwoHeadVac Then bPutVacuum = PutVacuumCupsOnRaw(vNewRaws(1), rmData)
|
||||||
|
If bPutVacuum AndAlso SafeMoveRawPart(vNewRaws(1), vtMove, dMinMove) Then
|
||||||
rmData.m_vtRawMove = vtMove
|
rmData.m_vtRawMove = vtMove
|
||||||
SaveOneMoveInfoInDisposition(nDispId, rmData)
|
SaveOneMoveInfoInDisposition(nDispId, rmData)
|
||||||
Return True
|
Return True
|
||||||
ElseIf PutVacuumCupsOnRaw(vNewRaws(0), rmData) AndAlso
|
End If
|
||||||
SafeMoveRawPart(vNewRaws(0), vtMove2, dMinMove) Then
|
|
||||||
|
VacuumCups.ResetHeadName()
|
||||||
|
Dim bPut2Vacuum As Boolean = PutVacuumCupsOnRaw(vNewRaws(0), rmData)
|
||||||
|
If Not bPut2Vacuum And bTwoHeadVac Then bPutVacuum = PutVacuumCupsOnRaw(vNewRaws(0), rmData)
|
||||||
|
If bPut2Vacuum AndAlso SafeMoveRawPart(vNewRaws(0), vtMove2, dMinMove) Then
|
||||||
rmData.m_vtRawMove = vtMove2
|
rmData.m_vtRawMove = vtMove2
|
||||||
SaveOneMoveInfoInDisposition(nDispId, rmData)
|
SaveOneMoveInfoInDisposition(nDispId, rmData)
|
||||||
Return True
|
Return True
|
||||||
Else
|
|
||||||
Return False
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
Return False
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Private Function SafeMoveRawPart(nRawId As Integer, ByRef vtMove As Vector3d, dMindist As Double) As Boolean
|
Private Function SafeMoveRawPart(nRawId As Integer, ByRef vtMove As Vector3d, dMindist As Double) As Boolean
|
||||||
' Spostamento originale
|
' Spostamento originale
|
||||||
Dim vtOriMove As New Vector3d( vtMove)
|
Dim vtOriMove As New Vector3d(vtMove)
|
||||||
' Livello di movimento
|
' 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
|
Dim nMove As Integer = 1
|
||||||
' Se esce dalla tavola, movimento già annullato ed esco con errore
|
' Se esce dalla tavola, movimento già annullato ed esco con errore
|
||||||
If Not EgtMoveRawPart(nRawId, vtOriMove) Then Return False
|
If Not EgtMoveRawPart(nRawId, vtOriMove) Then Return False
|
||||||
@@ -799,7 +926,7 @@ Public Module SplitAuto
|
|||||||
If VerifyRawWithOtherRaws(nRawId, dMindist) Then
|
If VerifyRawWithOtherRaws(nRawId, dMindist) Then
|
||||||
vtMove += 0.5 * vtOriMove
|
vtMove += 0.5 * vtOriMove
|
||||||
nMove += 1
|
nMove += 1
|
||||||
If nMoveLevel = nMove Then return True
|
If nMoveLevel = nMove Then Return True
|
||||||
Else
|
Else
|
||||||
EgtMoveRawPart(nRawId, -0.5 * vtOriMove)
|
EgtMoveRawPart(nRawId, -0.5 * vtOriMove)
|
||||||
End If
|
End If
|
||||||
|
|||||||
+70
-39
@@ -1,10 +1,10 @@
|
|||||||
<UserControl x:Class="SplitPageUC"
|
<UserControl x:Class="SplitPageUC"
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
d:DesignHeight="853.3" d:DesignWidth="1280" Initialized="SplitPageUC_Initialized">
|
d:DesignHeight="853.3" d:DesignWidth="1280" Initialized="SplitPageUC_Initialized">
|
||||||
|
|
||||||
<!-- Definizione della SplitPage -->
|
<!-- Definizione della SplitPage -->
|
||||||
<Grid Name="SplitPageGrid" >
|
<Grid Name="SplitPageGrid" >
|
||||||
@@ -35,10 +35,10 @@
|
|||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
<Button Name="PrevBtn" Grid.Column="0" Style="{DynamicResource OmagCut_YellowIconButton}">
|
<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>
|
||||||
<Button Name="NextBtn" Grid.Column="1" Style="{DynamicResource OmagCut_YellowIconButton}">
|
<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>
|
<Image.RenderTransform>
|
||||||
<TransformGroup>
|
<TransformGroup>
|
||||||
<RotateTransform Angle="180"/>
|
<RotateTransform Angle="180"/>
|
||||||
@@ -64,24 +64,49 @@
|
|||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
<ListBox Name="MachiningLsBx" Grid.Row="1"
|
<ListBox Name="MachiningLsBx" Grid.Row="1"
|
||||||
SelectionMode="Extended">
|
SelectionMode="Extended">
|
||||||
<ListBox.ItemTemplate>
|
<ListBox.ItemTemplate>
|
||||||
<DataTemplate>
|
<DataTemplate>
|
||||||
<TextBlock Text="{Binding Name}">
|
<Grid Width="210">
|
||||||
<TextBlock.Style>
|
<Grid.ColumnDefinitions>
|
||||||
<Style TargetType="TextBlock" BasedOn="{StaticResource OmagCut_CurrProjSummeryTextBlock}">
|
<ColumnDefinition Width="2.8*"/>
|
||||||
<Style.Triggers>
|
<ColumnDefinition Width="1.2*"/>
|
||||||
<DataTrigger Binding="{Binding bIsActive}" Value="False">
|
<ColumnDefinition Width="Auto"/>
|
||||||
<Setter Property="TextDecorations" Value="Strikethrough"/>
|
</Grid.ColumnDefinitions>
|
||||||
<Setter Property="Foreground" Value="{StaticResource OmagCut_White}"/>
|
<TextBlock Text="{Binding Name}">
|
||||||
</DataTrigger>
|
<TextBlock.Style>
|
||||||
<DataTrigger Binding="{Binding bIsActive}" Value="True">
|
<Style TargetType="TextBlock" BasedOn="{StaticResource OmagCut_CurrProjSummeryTextBlock}">
|
||||||
<Setter Property="Foreground" Value="Black"/>
|
<Style.Triggers>
|
||||||
</DataTrigger>
|
<DataTrigger Binding="{Binding bIsActive}" Value="False">
|
||||||
</Style.Triggers>
|
<Setter Property="TextDecorations" Value="Strikethrough"/>
|
||||||
</Style>
|
<Setter Property="Foreground" Value="{StaticResource OmagCut_White}"/>
|
||||||
</TextBlock.Style>
|
</DataTrigger>
|
||||||
</TextBlock>
|
<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>
|
</DataTemplate>
|
||||||
</ListBox.ItemTemplate>
|
</ListBox.ItemTemplate>
|
||||||
</ListBox>
|
</ListBox>
|
||||||
@@ -95,11 +120,17 @@
|
|||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
<Button Name="MoveUpBtn" Grid.Column="1" Style="{DynamicResource OmagCut_YellowIconButton}">
|
<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>
|
||||||
<Button Name="MoveDownBtn" Grid.Column="2" Style="{DynamicResource OmagCut_YellowIconButton}">
|
<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>
|
</Button>
|
||||||
|
<ToggleButton Name="LayNbArrTgBtn" Grid.Column="3" Style="{DynamicResource OmagCut_YellowIconToggleButton}"
|
||||||
|
Height="25" Width="25">
|
||||||
|
<Image Name="LayNbArrImg"
|
||||||
|
HorizontalAlignment="Center"
|
||||||
|
VerticalAlignment="Center" Stretch="Uniform"/>
|
||||||
|
</ToggleButton>
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
@@ -111,13 +142,13 @@
|
|||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
<Button Name="OnOffBtn" Grid.Column="0" Style="{DynamicResource OmagCut_YellowIconButton}">
|
<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>
|
||||||
<Button Name="AllOnBtn" Grid.Column="1" Style="{DynamicResource OmagCut_YellowIconButton}">
|
<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>
|
||||||
<Button Name="AllOffBtn" Grid.Column="2" Style="{DynamicResource OmagCut_YellowIconButton}">
|
<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>
|
</Button>
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
@@ -130,33 +161,33 @@
|
|||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
<Button Name="CutBtn" Grid.Column="0" Style="{DynamicResource OmagCut_YellowIconButton}">
|
<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>
|
||||||
|
|
||||||
<Button Name="CutStartBtn" Grid.Column="1" Style="{DynamicResource OmagCut_YellowIconButton}">
|
<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>
|
||||||
|
|
||||||
<Button Name="CutEndBtn" Grid.Column="2" Style="{DynamicResource OmagCut_YellowIconButton}">
|
<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>
|
</Button>
|
||||||
|
|
||||||
<!-- solo per macchine con lavorazioni Waterjet -->
|
<!-- solo per macchine con lavorazioni Waterjet -->
|
||||||
<ToggleButton Name="BridgesWJBtn" Grid.Column="0" Style="{DynamicResource OmagCut_YellowIconToggleButton}">
|
<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>
|
</ToggleButton>
|
||||||
|
|
||||||
<!--solo per macchine con lavorazioni Waterjet-->
|
<!--solo per macchine con lavorazioni Waterjet-->
|
||||||
<Button Name="QualityWJBtn" Grid.Column="1" Style="{DynamicResource OmagCut_YellowIconButton}">
|
<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>
|
</Button>
|
||||||
|
|
||||||
<!-- solo per macchine con lavorazioni Waterjet -->
|
<!-- solo per macchine con lavorazioni Waterjet -->
|
||||||
<ToggleButton Name="BridgesDeleteWJBtn" Grid.Column="3" Style="{DynamicResource OmagCut_YellowIconToggleButton}">
|
<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>
|
</ToggleButton>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
|
|||||||
+631
-211
File diff suppressed because it is too large
Load Diff
+88
-41
@@ -1,5 +1,4 @@
|
|||||||
Imports EgtUILib
|
Imports EgtUILib
|
||||||
Imports System.Text.RegularExpressions
|
|
||||||
|
|
||||||
Module VacuumCups
|
Module VacuumCups
|
||||||
' Tipo manipolatore con ventosa (0=assente, 1=dietro, 2=laterale)
|
' Tipo manipolatore con ventosa (0=assente, 1=dietro, 2=laterale)
|
||||||
@@ -31,6 +30,19 @@ Module VacuumCups
|
|||||||
' Nome del gruppo temporaneo per le ventose
|
' Nome del gruppo temporaneo per le ventose
|
||||||
Private Const VACTMP_GRP As String = "VacTmp"
|
Private Const VACTMP_GRP As String = "VacTmp"
|
||||||
|
|
||||||
|
Private m_sHeadName As String = VACUUM_HEAD
|
||||||
|
Public Sub ResetHeadName()
|
||||||
|
Dim bReload As Boolean = (m_sHeadName <> VACUUM_HEAD)
|
||||||
|
m_sHeadName = VACUUM_HEAD
|
||||||
|
If bReload Then LoadVacuumCups()
|
||||||
|
End Sub
|
||||||
|
Public Function ChangeHeadName() As Boolean
|
||||||
|
If EgtGetHeadId( VACUUM_HEAD_2) = GDB_ID.NULL Then Return False
|
||||||
|
m_sHeadName = If( m_sHeadName = VACUUM_HEAD, VACUUM_HEAD_2, VACUUM_HEAD)
|
||||||
|
LoadVacuumCups()
|
||||||
|
Return True
|
||||||
|
End Function
|
||||||
|
|
||||||
'-----------------------------------------------------------------------------------------------
|
'-----------------------------------------------------------------------------------------------
|
||||||
Friend Class RawMoveData
|
Friend Class RawMoveData
|
||||||
|
|
||||||
@@ -87,17 +99,17 @@ Module VacuumCups
|
|||||||
Friend Function LoadVacuumCups() As Boolean
|
Friend Function LoadVacuumCups() As Boolean
|
||||||
' Leggo tipo manipolatore con ventosa
|
' Leggo tipo manipolatore con ventosa
|
||||||
m_nVacType = 0
|
m_nVacType = 0
|
||||||
EgtGetInfo(EgtGetHeadId(VACUUM_HEAD), KEY_VAC_TYPE, m_nVacType)
|
EgtGetInfo(EgtGetHeadId(m_sHeadName), KEY_VAC_TYPE, m_nVacType)
|
||||||
' Cancello eventuali vecchie ventose
|
' Cancello eventuali vecchie ventose
|
||||||
RemoveVacuumCups()
|
RemoveVacuumCups()
|
||||||
' Identificativo ventose nella macchina
|
' Identificativo ventose nella macchina
|
||||||
Dim nLayId As Integer = EgtGetFirstNameInGroup(EgtGetHeadId(VACUUM_HEAD), VACUUM_HEAD_LAYOUT)
|
Dim nLayId As Integer = EgtGetFirstNameInGroup(EgtGetHeadId(m_sHeadName), VACUUM_HEAD_LAYOUT)
|
||||||
If nLayId = GDB_ID.NULL Then Return False
|
If nLayId = GDB_ID.NULL Then Return False
|
||||||
' Identificativo riferimento della testa nella macchina
|
' Identificativo riferimento della testa nella macchina
|
||||||
Dim nT1Id As Integer = EgtGetFirstNameInGroup(EgtGetHeadId(VACUUM_HEAD), HEAD_FIRST_EXIT)
|
Dim nT1Id As Integer = EgtGetFirstNameInGroup(EgtGetHeadId(m_sHeadName), HEAD_FIRST_EXIT)
|
||||||
If nT1Id = GDB_ID.NULL Then Return False
|
If nT1Id = GDB_ID.NULL Then Return False
|
||||||
' imposto la l'uscita della ventosa come fosse l'uscita di un utensile
|
' imposto la l'uscita della ventosa come fosse l'uscita di un utensile
|
||||||
EgtSetCalcTool("", "H4", 1)
|
EgtSetCalcTool("", m_sHeadName, 1)
|
||||||
' Creo gruppo temporaneo in cui copiarli
|
' Creo gruppo temporaneo in cui copiarli
|
||||||
m_nTempId = EgtCreateGroup(GDB_ID.ROOT)
|
m_nTempId = EgtCreateGroup(GDB_ID.ROOT)
|
||||||
If m_nTempId = GDB_ID.NULL Then Return False
|
If m_nTempId = GDB_ID.NULL Then Return False
|
||||||
@@ -107,23 +119,23 @@ Module VacuumCups
|
|||||||
m_nVacId = EgtCopyGlob(nLayId, m_nTempId)
|
m_nVacId = EgtCopyGlob(nLayId, m_nTempId)
|
||||||
If m_nVacId = GDB_ID.NULL Then Return False
|
If m_nVacId = GDB_ID.NULL Then Return False
|
||||||
' Angolo di rotazione preferito
|
' Angolo di rotazione preferito
|
||||||
EgtGetInfo( m_nVacId, KEY_VACLAY_PREFROT, m_dPreferredRot)
|
EgtGetInfo(m_nVacId, KEY_VACLAY_PREFROT, m_dPreferredRot)
|
||||||
' Angoli di rotazione preferiti per ventosa in verticale (lungo Y) a sinistra e a destra del centro tavola
|
' Angoli di rotazione preferiti per ventosa in verticale (lungo Y) a sinistra e a destra del centro tavola
|
||||||
EgtGetInfo( m_nVacId, KEY_VACLAY_PREFVROTXMINUS, m_dPrefVertRotXMinus)
|
EgtGetInfo(m_nVacId, KEY_VACLAY_PREFVROTXMINUS, m_dPrefVertRotXMinus)
|
||||||
EgtGetInfo(m_nVacId, KEY_VACLAY_PREFVROTXPLUS, m_dPrefVertRotXPlus)
|
EgtGetInfo(m_nVacId, KEY_VACLAY_PREFVROTXPLUS, m_dPrefVertRotXPlus)
|
||||||
EgtGetInfo(m_nVacId, KEY_VACLAY_PREFVROTYMINUS, m_dPrefVertRotYMinus)
|
EgtGetInfo(m_nVacId, KEY_VACLAY_PREFVROTYMINUS, m_dPrefVertRotYMinus)
|
||||||
EgtGetInfo(m_nVacId, KEY_VACLAY_PREFVROTYPLUS, m_dPrefVertRotYPlus)
|
EgtGetInfo(m_nVacId, KEY_VACLAY_PREFVROTYPLUS, m_dPrefVertRotYPlus)
|
||||||
' Direzione di riferimento per tagli Drip
|
' Direzione di riferimento per tagli Drip
|
||||||
EgtGetInfo( m_nVacId, KEY_VACLAY_DRIPREFDIR, m_dDripRefAng)
|
EgtGetInfo(m_nVacId, KEY_VACLAY_DRIPREFDIR, m_dDripRefAng)
|
||||||
' Nascondo il gruppo ma rendo visibili le curve di contorno delle ventose
|
' Nascondo il gruppo ma rendo visibili le curve di contorno delle ventose
|
||||||
EgtSetStatus(m_nVacId, GDB_ST.OFF)
|
EgtSetStatus(m_nVacId, GDB_ST.OFF)
|
||||||
Dim nId As Integer = EgtGetFirstInGroup(m_nVacId)
|
Dim nId As Integer = EgtGetFirstInGroup(m_nVacId)
|
||||||
While nId <> GDB_ID.NULL
|
While nId <> GDB_ID.NULL
|
||||||
Select Case EgtGetType(nId)
|
Select Case EgtGetType(nId)
|
||||||
Case GDB_TY.CRV_LINE, GDB_TY.CRV_ARC, GDB_TY.CRV_BEZ, GDB_TY.CRV_COMPO
|
Case GDB_TY.CRV_LINE, GDB_TY.CRV_ARC, GDB_TY.CRV_BEZ, GDB_TY.CRV_COMPO
|
||||||
EgtSetStatus(nId, GDB_ST.ON_)
|
EgtSetStatus(nId, GDB_ST.ON_)
|
||||||
Case Else
|
Case Else
|
||||||
EgtSetStatus(nId, GDB_ST.OFF)
|
EgtSetStatus(nId, GDB_ST.OFF)
|
||||||
End Select
|
End Select
|
||||||
nId = EgtGetNext(nId)
|
nId = EgtGetNext(nId)
|
||||||
End While
|
End While
|
||||||
@@ -152,7 +164,7 @@ Module VacuumCups
|
|||||||
Friend Function ResetVacuumCups() As Boolean
|
Friend Function ResetVacuumCups() As Boolean
|
||||||
' Ripristino posizione e rotazione originali
|
' Ripristino posizione e rotazione originali
|
||||||
Dim frOriRef As New Frame3d
|
Dim frOriRef As New Frame3d
|
||||||
EgtFrame(EgtGetFirstNameInGroup(EgtGetHeadId(VACUUM_HEAD), HEAD_FIRST_EXIT), GDB_ID.ROOT, frOriRef)
|
EgtFrame(EgtGetFirstNameInGroup(EgtGetHeadId(m_sHeadName), HEAD_FIRST_EXIT), GDB_ID.ROOT, frOriRef)
|
||||||
Dim frCurrRef As New Frame3d
|
Dim frCurrRef As New Frame3d
|
||||||
EgtFrame(m_nRefId, GDB_ID.ROOT, frCurrRef)
|
EgtFrame(m_nRefId, GDB_ID.ROOT, frCurrRef)
|
||||||
EgtMove(m_nVacId, frOriRef.Orig() - frCurrRef.Orig(), GDB_RT.GLOB)
|
EgtMove(m_nVacId, frOriRef.Orig() - frCurrRef.Orig(), GDB_RT.GLOB)
|
||||||
@@ -164,10 +176,10 @@ Module VacuumCups
|
|||||||
Dim nId As Integer = EgtGetFirstInGroup(m_nVacId)
|
Dim nId As Integer = EgtGetFirstInGroup(m_nVacId)
|
||||||
While nId <> GDB_ID.NULL
|
While nId <> GDB_ID.NULL
|
||||||
Select Case EgtGetType(nId)
|
Select Case EgtGetType(nId)
|
||||||
Case GDB_TY.CRV_LINE, GDB_TY.CRV_ARC, GDB_TY.CRV_BEZ, GDB_TY.CRV_COMPO
|
Case GDB_TY.CRV_LINE, GDB_TY.CRV_ARC, GDB_TY.CRV_BEZ, GDB_TY.CRV_COMPO
|
||||||
EgtSetStatus(nId, GDB_ST.ON_)
|
EgtSetStatus(nId, GDB_ST.ON_)
|
||||||
Case Else
|
Case Else
|
||||||
EgtSetStatus(nId, GDB_ST.OFF)
|
EgtSetStatus(nId, GDB_ST.OFF)
|
||||||
End Select
|
End Select
|
||||||
nId = EgtGetNext(nId)
|
nId = EgtGetNext(nId)
|
||||||
End While
|
End While
|
||||||
@@ -207,14 +219,17 @@ Module VacuumCups
|
|||||||
EgtSurfFrGrossArea(nRKerfId, RawArea)
|
EgtSurfFrGrossArea(nRKerfId, RawArea)
|
||||||
' volume calcolato in mmc
|
' volume calcolato in mmc
|
||||||
Dim RawVolume As Double = RawArea * b3Raw.DimZ()
|
Dim RawVolume As Double = RawArea * b3Raw.DimZ()
|
||||||
' peso calolato in kg
|
' peso calcolato in kg
|
||||||
m_RawWeight = RawVolume * m_RawDensity / Math.Pow(10, 9)
|
m_RawWeight = RawVolume * m_RawDensity / Math.Pow(10, 9)
|
||||||
'-------------------- FINE CALCOLO PESO --------------------
|
'-------------------- FINE CALCOLO PESO --------------------
|
||||||
|
|
||||||
' Eseguo ricerca
|
' Eseguo ricerca
|
||||||
If FindVacuumCupsOnRaw(nRawId, ptRawCen, b3Kerf, ptKerfCen, nKerfId, nRKerfId, rmData) Then
|
If FindVacuumCupsOnRaw(nRawId, ptRawCen, b3Kerf, ptKerfCen, nKerfId, nRKerfId, rmData) Then
|
||||||
Return True
|
Return True
|
||||||
|
Else
|
||||||
|
If ChangeHeadName() Then Return False
|
||||||
End If
|
End If
|
||||||
|
|
||||||
' In caso di fallimento, provo riducendo con offset la regione di kerf
|
' In caso di fallimento, provo riducendo con offset la regione di kerf
|
||||||
' (così si simula la proiezione del centro sul MAT - medial axis transform)
|
' (così si simula la proiezione del centro sul MAT - medial axis transform)
|
||||||
Dim bOkFind As Boolean = False
|
Dim bOkFind As Boolean = False
|
||||||
@@ -241,20 +256,20 @@ Module VacuumCups
|
|||||||
' Verifico sia veramente un pezzo
|
' Verifico sia veramente un pezzo
|
||||||
If EgtGetRawPartFromPart(nPartId) = GDB_ID.NULL Then Return False
|
If EgtGetRawPartFromPart(nPartId) = GDB_ID.NULL Then Return False
|
||||||
' Cerco la direzione del primo taglio attivo da sotto
|
' Cerco la direzione del primo taglio attivo da sotto
|
||||||
Dim nDripLayId As Integer = EgtGetFirstNameInGroup( nPartId, NAME_DRIPCUT)
|
Dim nDripLayId As Integer = EgtGetFirstNameInGroup(nPartId, NAME_DRIPCUT)
|
||||||
Dim nDripLineId As Integer = EgtGetFirstInGroup( nDripLayId)
|
Dim nDripLineId As Integer = EgtGetFirstInGroup(nDripLayId)
|
||||||
While nDripLineId <> GDB_ID.NULL
|
While nDripLineId <> GDB_ID.NULL
|
||||||
Dim nMchId As Integer = EgtGetOperationId( "DripSaw" & nDripLineId.ToString())
|
Dim nMchId As Integer = EgtGetOperationId("DripSaw" & nDripLineId.ToString())
|
||||||
Dim nMode As Integer
|
Dim nMode As Integer
|
||||||
If EgtGetMode( nMchId, nMode) AndAlso nMode = GDB_MD.STD Then Exit While
|
If EgtGetMode(nMchId, nMode) AndAlso nMode = GDB_MD.STD Then Exit While
|
||||||
nDripLineId = EgtGetNext( nDripLineId)
|
nDripLineId = EgtGetNext(nDripLineId)
|
||||||
End While
|
End While
|
||||||
Dim vtDir As New Vector3d
|
Dim vtDir As New Vector3d
|
||||||
if EgtStartVector( nDripLineId, GDB_ID.ROOT, vtDir) Then
|
If EgtStartVector(nDripLineId, GDB_ID.ROOT, vtDir) Then
|
||||||
Dim dLen, dAngV, dAngH As Double
|
Dim dLen, dAngV, dAngH As Double
|
||||||
vtDir.ToSpherical( dLen, dAngV, dAngH)
|
vtDir.ToSpherical(dLen, dAngV, dAngH)
|
||||||
Dim dOffsAng = dAngH - m_dDripRefAng
|
Dim dOffsAng = dAngH - m_dDripRefAng
|
||||||
While dOffsAng - m_dPreferredRot >= 90
|
While dOffsAng - m_dPreferredRot >= 90
|
||||||
dOffsAng -= 180
|
dOffsAng -= 180
|
||||||
End While
|
End While
|
||||||
While dOffsAng - m_dPreferredRot <= -90
|
While dOffsAng - m_dPreferredRot <= -90
|
||||||
@@ -388,7 +403,7 @@ Module VacuumCups
|
|||||||
|
|
||||||
Private Function GetVacRotAxisSteps(ByRef vAngRot As List(Of Double)) As Boolean
|
Private Function GetVacRotAxisSteps(ByRef vAngRot As List(Of Double)) As Boolean
|
||||||
' Recupero l'asse rotante della testa ventosa
|
' Recupero l'asse rotante della testa ventosa
|
||||||
Dim nRotAxId As Integer = EgtGetParent(EgtGetHeadId(VACUUM_HEAD))
|
Dim nRotAxId As Integer = EgtGetParent(EgtGetHeadId(m_sHeadName))
|
||||||
' Verifico se contiene info con STEPS
|
' Verifico se contiene info con STEPS
|
||||||
Dim sSteps As String = ""
|
Dim sSteps As String = ""
|
||||||
If Not EgtGetInfo(nRotAxId, KEY_ROTVAC_STEPS, sSteps) Then Return False
|
If Not EgtGetInfo(nRotAxId, KEY_ROTVAC_STEPS, sSteps) Then Return False
|
||||||
@@ -493,15 +508,15 @@ Module VacuumCups
|
|||||||
' Ordino secondo distanza angolare crescente da direzione di allineamento (modulo 180 deg)
|
' Ordino secondo distanza angolare crescente da direzione di allineamento (modulo 180 deg)
|
||||||
Dim dRotRefDeg As Double = dRotAngDeg
|
Dim dRotRefDeg As Double = dRotAngDeg
|
||||||
vAngRot.Sort(Function(P, Q)
|
vAngRot.Sort(Function(P, Q)
|
||||||
Dim dDiffP = Math.Abs( P - dRotRefDeg)
|
Dim dDiffP = Math.Abs(P - dRotRefDeg)
|
||||||
If Math.Abs( dDiffP - 180) < 10 * EPS_ANG_SMALL Then dDiffP = 1
|
If Math.Abs(dDiffP - 180) < 10 * EPS_ANG_SMALL Then dDiffP = 1
|
||||||
Dim dDiffQ = Math.Abs( Q - dRotRefDeg)
|
Dim dDiffQ = Math.Abs(Q - dRotRefDeg)
|
||||||
If Math.Abs( dDiffQ - 180) < 10 * EPS_ANG_SMALL Then dDiffQ = 1
|
If Math.Abs(dDiffQ - 180) < 10 * EPS_ANG_SMALL Then dDiffQ = 1
|
||||||
Return ( dDiffP - dDiffQ)
|
Return (dDiffP - dDiffQ)
|
||||||
End Function)
|
End Function)
|
||||||
' Annullo la rotazione di allineamento
|
' Annullo la rotazione di allineamento
|
||||||
dRotAngDeg = 0
|
dRotAngDeg = 0
|
||||||
' altrimenti in continuo
|
' altrimenti in continuo
|
||||||
Else
|
Else
|
||||||
' Assegno più valori di ricerca e conservo angolo di allineamento
|
' Assegno più valori di ricerca e conservo angolo di allineamento
|
||||||
vAngRot.AddRange({0, +5, -5, +12.5, -12.5, +25, -25, +45, -45})
|
vAngRot.AddRange({0, +5, -5, +12.5, -12.5, +25, -25, +45, -45})
|
||||||
@@ -546,16 +561,48 @@ Module VacuumCups
|
|||||||
Return True
|
Return True
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
' assegante le posizioni del centro delle ventose e l'angolo di posizionamento orizzontale verifica che la posizione sia raggiungibile
|
' assegnate le posizioni del centro delle ventose e l'angolo di posizionamento orizzontale verifica che la posizione sia raggiungibile
|
||||||
Public Function VerifyOutOfStrokes(ptRef As Point3d, dRotAngDeg As Double) As Integer
|
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
|
||||||
|
If m_sHeadName = VACUUM_HEAD Then
|
||||||
|
sAxisName = "C1"
|
||||||
|
Else
|
||||||
|
sAxisName = "C2"
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
' Posizione Home dell'asse rotante
|
||||||
|
Dim dCHome As Double
|
||||||
|
EgtGetAxisHomePos(sAxisName, dCHome)
|
||||||
|
' Corse dell'asse
|
||||||
|
Dim dCMin As Double
|
||||||
|
EgtGetAxisMin(sAxisName, dCMin)
|
||||||
|
Dim dCMax As Double
|
||||||
|
EgtGetAxisMax(sAxisName, dCMax)
|
||||||
|
' Porto l'angolo nel range
|
||||||
|
Dim dRotAngMachDeg As Double = dRotAngDeg + dCHome
|
||||||
|
AdjustAngleInRange(dRotAngMachDeg, dCMin, dCMax)
|
||||||
|
' Imposto la ventosa come fosse un utensile
|
||||||
|
EgtSetCalcTool("", m_sHeadName, 1)
|
||||||
|
' Calcolo gli assi macchina
|
||||||
Dim dX, dY, dZ As Double
|
Dim dX, dY, dZ As Double
|
||||||
Dim nStat As Integer
|
Dim nStat As Integer
|
||||||
Dim dCHome As Double
|
If EgtGetAxisId("A") <> GDB_ID.NULL Then
|
||||||
EgtGetAxisHomePos("C", dCHome)
|
' Asse tavola rotante (movimenti solo con A0)
|
||||||
' imposto la l'uscita della ventosa come fosse l'uscita di un utensile
|
EgtGetCalcPositions(ptRef, 0, dRotAngMachDeg, nStat, dX, dY, dZ)
|
||||||
EgtSetCalcTool("", "H4", 1)
|
' Verifico le corse
|
||||||
EgtGetCalcPositions(ptRef, dRotAngDeg + dCHome, 0, nStat, dX, dY, dZ)
|
EgtVerifyOutstroke(dX, dY, dZ, 0, dRotAngMachDeg, nStat)
|
||||||
EgtVerifyOutstroke(dX, dY, dZ, dRotAngDeg + dCHome, 0, nStat)
|
Else
|
||||||
|
EgtGetCalcPositions(ptRef, dRotAngMachDeg, 0, nStat, dX, dY, dZ)
|
||||||
|
' Verifico le corse
|
||||||
|
EgtVerifyOutstroke(dX, dY, dZ, dRotAngMachDeg, 0, nStat)
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
Return nStat
|
Return nStat
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
@@ -721,7 +768,7 @@ Module VacuumCups
|
|||||||
rmList.RemoveAt(nInd)
|
rmList.RemoveAt(nInd)
|
||||||
nInd = rmList.Count() - 1
|
nInd = rmList.Count() - 1
|
||||||
End If
|
End If
|
||||||
' Se non trovato, lo accodo
|
' Se non trovato, lo accodo
|
||||||
Else
|
Else
|
||||||
rmList.Add(New RawMoveData(nRawId))
|
rmList.Add(New RawMoveData(nRawId))
|
||||||
nInd = rmList.Count() - 1
|
nInd = rmList.Count() - 1
|
||||||
|
|||||||
@@ -84,6 +84,11 @@ Module ConstGen
|
|||||||
|
|
||||||
' Nome testa con ventose per spostamento pezzi
|
' Nome testa con ventose per spostamento pezzi
|
||||||
Public Const VACUUM_HEAD As String = "H4"
|
Public Const VACUUM_HEAD As String = "H4"
|
||||||
|
Public Const VACUUM_HEAD_2 As String = "H104"
|
||||||
|
' Nome teste laser
|
||||||
|
Public Const LASER_HEAD As String = "H3"
|
||||||
|
Public Const LASER_HEAD_2 As String = "H103"
|
||||||
|
|
||||||
' Info tipo ventosa
|
' Info tipo ventosa
|
||||||
Public Const KEY_VAC_TYPE As String = "VacType"
|
Public Const KEY_VAC_TYPE As String = "VacType"
|
||||||
' Nome gruppo layout in testa con ventose
|
' Nome gruppo layout in testa con ventose
|
||||||
@@ -107,6 +112,7 @@ Module ConstGen
|
|||||||
Public Const MAIN_TAB As String = "MainTab"
|
Public Const MAIN_TAB As String = "MainTab"
|
||||||
Public Const SECOND_TAB As String = "2ndTab"
|
Public Const SECOND_TAB As String = "2ndTab"
|
||||||
Public Const THIRD_TAB As String = "3rdTab"
|
Public Const THIRD_TAB As String = "3rdTab"
|
||||||
|
Public Const FORTH_TAB As String = "4thTab"
|
||||||
' Nome tavola ausiliaria per spostamento finale pezzi
|
' Nome tavola ausiliaria per spostamento finale pezzi
|
||||||
Public Const AUX_TAB As String = "AuxTab"
|
Public Const AUX_TAB As String = "AuxTab"
|
||||||
|
|
||||||
@@ -152,6 +158,8 @@ Module ConstGen
|
|||||||
' Info per identificazione gruppo pezzi
|
' Info per identificazione gruppo pezzi
|
||||||
Public Const INFO_REFGROUP As String = "RefGroup"
|
Public Const INFO_REFGROUP As String = "RefGroup"
|
||||||
Public Const INFO_COUNTERLY As String = "CounterPz"
|
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
|
' Contrassegno di progetto OmagCut
|
||||||
Public Const NAME_PROJMARK As String = "OmagCut"
|
Public Const NAME_PROJMARK As String = "OmagCut"
|
||||||
@@ -189,6 +197,8 @@ Module ConstGen
|
|||||||
Public Const INFO_TOPRODAREA As String = "ToProdArea"
|
Public Const INFO_TOPRODAREA As String = "ToProdArea"
|
||||||
' Info per nome progetti
|
' Info per nome progetti
|
||||||
Public Const INFO_PROJNAME As String = "ProjName"
|
Public Const INFO_PROJNAME As String = "ProjName"
|
||||||
|
' Info per parcheggio asse C
|
||||||
|
Public Const INFO_CAXESHOME As String = "CAxesHome"
|
||||||
|
|
||||||
' Nome layer delle regioni
|
' Nome layer delle regioni
|
||||||
Public Const NAME_REGION As String = "Region"
|
Public Const NAME_REGION As String = "Region"
|
||||||
@@ -216,6 +226,8 @@ Module ConstGen
|
|||||||
Public Const INFO_DEPTH2 As String = "Depth2"
|
Public Const INFO_DEPTH2 As String = "Depth2"
|
||||||
Public Const INFO_AGG2 As String = "Agg2"
|
Public Const INFO_AGG2 As String = "Agg2"
|
||||||
Public Const INFO_ROUNDOFF As String = "RoundOff"
|
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
|
' Info in entità da tagliare per taglio ristretto
|
||||||
Public Const INFO_STRICT As String = "Strict"
|
Public Const INFO_STRICT As String = "Strict"
|
||||||
' Info in entità da tagliare per angolo di lato e tallone
|
' Info in entità da tagliare per angolo di lato e tallone
|
||||||
@@ -311,6 +323,12 @@ Module ConstGen
|
|||||||
Public Const INFO_AUX_SPLIT_WJ As String = "AUX_SPLIT_WJ"
|
Public Const INFO_AUX_SPLIT_WJ As String = "AUX_SPLIT_WJ"
|
||||||
' Info in OutLoop per punto inzio lavorazione WaterJet
|
' Info in OutLoop per punto inzio lavorazione WaterJet
|
||||||
Public Const INFO_START As String = "Start"
|
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
|
' Nome di pezzo che è una cornice
|
||||||
Public Const NAME_FRAME As String = "Frame"
|
Public Const NAME_FRAME As String = "Frame"
|
||||||
|
|||||||
+28
-1
@@ -19,6 +19,7 @@ Module ConstIni
|
|||||||
Public Const K_DEBUG As String = "Debug"
|
Public Const K_DEBUG As String = "Debug"
|
||||||
Public Const K_LICENCE As String = "Licence"
|
Public Const K_LICENCE As String = "Licence"
|
||||||
Public Const K_NETKEY As String = "NetKey"
|
Public Const K_NETKEY As String = "NetKey"
|
||||||
|
Public Const K_LOCKID As String = "LockId"
|
||||||
Public Const K_MESSAGESDIR As String = "MessagesDir"
|
Public Const K_MESSAGESDIR As String = "MessagesDir"
|
||||||
Public Const K_MESSAGES As String = "Messages"
|
Public Const K_MESSAGES As String = "Messages"
|
||||||
Public Const K_SUPPORT As String = "Support"
|
Public Const K_SUPPORT As String = "Support"
|
||||||
@@ -52,7 +53,10 @@ Module ConstIni
|
|||||||
Public Const K_GENERATECN As String = "GenerateCN"
|
Public Const K_GENERATECN As String = "GenerateCN"
|
||||||
Public Const K_FRACTIONPATTERN As String = "FractionPattern"
|
Public Const K_FRACTIONPATTERN As String = "FractionPattern"
|
||||||
Public Const K_PRECISION As String = "Precision"
|
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 S_LANGUAGES As String = "Languages"
|
||||||
Public Const K_LANGUAGE As String = "Language"
|
Public Const K_LANGUAGE As String = "Language"
|
||||||
@@ -86,6 +90,7 @@ Module ConstIni
|
|||||||
Public Const K_TEXMAXLINPIX As String = "TextureMaxLinPixels"
|
Public Const K_TEXMAXLINPIX As String = "TextureMaxLinPixels"
|
||||||
Public Const K_ZOOMWIN As String = "ZoomWin"
|
Public Const K_ZOOMWIN As String = "ZoomWin"
|
||||||
Public Const K_DISTLINE As String = "DistLine"
|
Public Const K_DISTLINE As String = "DistLine"
|
||||||
|
Public Const K_ORTOGRAPHIC As String = "OrtoGraphic"
|
||||||
|
|
||||||
Public Const S_ALZFRONT As String = "Alz&Front"
|
Public Const S_ALZFRONT As String = "Alz&Front"
|
||||||
Public Const K_ALZFRONT As String = "Alz&Front"
|
Public Const K_ALZFRONT As String = "Alz&Front"
|
||||||
@@ -116,6 +121,8 @@ Module ConstIni
|
|||||||
Public Const K_LASTCOLOR As String = "LastColor"
|
Public Const K_LASTCOLOR As String = "LastColor"
|
||||||
Public Const K_COLOR As String = "Color"
|
Public Const K_COLOR As String = "Color"
|
||||||
|
|
||||||
|
Public Const S_FRAMECOMPO As String = "FrameCompo"
|
||||||
|
|
||||||
Public Const S_EXTCOMPO As String = "Compo"
|
Public Const S_EXTCOMPO As String = "Compo"
|
||||||
|
|
||||||
Public Const S_INTCOMPO As String = "InternalCompo"
|
Public Const S_INTCOMPO As String = "InternalCompo"
|
||||||
@@ -204,6 +211,8 @@ Module ConstIni
|
|||||||
Public Const K_OFFSZ As String = "OffsZ"
|
Public Const K_OFFSZ As String = "OffsZ"
|
||||||
Public Const K_OFFSXY As String = "OffsXY"
|
Public Const K_OFFSXY As String = "OffsXY"
|
||||||
Public Const K_OFFSYY As String = "OffsYY"
|
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_STARTTRIM As String = "StartTrim"
|
||||||
Public Const K_ENDTRIM As String = "EndTrim"
|
Public Const K_ENDTRIM As String = "EndTrim"
|
||||||
Public Const K_OTHERSIDE As String = "OtherSide"
|
Public Const K_OTHERSIDE As String = "OtherSide"
|
||||||
@@ -223,9 +232,18 @@ Module ConstIni
|
|||||||
Public Const K_RAWOFFSX As String = "OffsX"
|
Public Const K_RAWOFFSX As String = "OffsX"
|
||||||
Public Const K_RAWOFFSY As String = "OffsY"
|
Public Const K_RAWOFFSY As String = "OffsY"
|
||||||
Public Const K_RAWKERF As String = "Kerf"
|
Public Const K_RAWKERF As String = "Kerf"
|
||||||
|
Public Const K_ENABLEOTHERREFTAB As String = "EnableOtherRefTab"
|
||||||
|
Public Const K_OTHERREFTAB As String = "OtherRefTab"
|
||||||
|
Public Const K_OTHERREFTABX As String = "OtherRefTabX"
|
||||||
|
Public Const K_OTHERREFTABY As String = "OtherRefTabY"
|
||||||
|
Public Const K_OTHERREFTABPOS As String = "OtherRefTabPos"
|
||||||
|
Public Const K_REFTAB As String = "RefTab"
|
||||||
|
Public Const K_CURRENTREFTAB As String = "CurrRefTab"
|
||||||
|
|
||||||
|
|
||||||
Public Const S_RAWMOVE As String = "RawMove"
|
Public Const S_RAWMOVE As String = "RawMove"
|
||||||
Public Const K_RAWSTEP As String = "Step"
|
Public Const K_RAWSTEP As String = "Step"
|
||||||
|
Public Const K_EXTRASTEP As String = "ExtraStep"
|
||||||
Public Const K_RAWROTATION As String = "Rotation"
|
Public Const K_RAWROTATION As String = "Rotation"
|
||||||
Public Const K_PERPENDICULAR As String = "Perpendicular"
|
Public Const K_PERPENDICULAR As String = "Perpendicular"
|
||||||
|
|
||||||
@@ -266,6 +284,8 @@ Module ConstIni
|
|||||||
Public Const K_MACHINESDIR As String = "MachinesDir"
|
Public Const K_MACHINESDIR As String = "MachinesDir"
|
||||||
Public Const K_TOOLMAKERSDIR As String = "ToolMakersDir"
|
Public Const K_TOOLMAKERSDIR As String = "ToolMakersDir"
|
||||||
Public Const K_CURRMACH As String = "CurrMach"
|
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 S_SIMUL As String = "Simul"
|
||||||
Public Const K_SLIDERX As String = "SliderX"
|
Public Const K_SLIDERX As String = "SliderX"
|
||||||
@@ -277,6 +297,8 @@ Module ConstIni
|
|||||||
Public Const S_VEINMATCHING As String = "VeinMatching"
|
Public Const S_VEINMATCHING As String = "VeinMatching"
|
||||||
Public Const K_VEINMA_ENABLE As String = "Enable"
|
Public Const K_VEINMA_ENABLE As String = "Enable"
|
||||||
Public Const K_VEINMA_PLACE As String = "WinPlace"
|
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 S_FASTGRID As String = "FastGrid"
|
||||||
Public Const K_FG_ENABLE As String = "FGEnable"
|
Public Const K_FG_ENABLE As String = "FGEnable"
|
||||||
@@ -323,6 +345,7 @@ Module ConstIni
|
|||||||
Public Const K_DC_FLATT_HEADSIDE As String = "FlattHeadSide"
|
Public Const K_DC_FLATT_HEADSIDE As String = "FlattHeadSide"
|
||||||
Public Const K_DC_FLATT_MACHTYPE As String = "FlattMachType"
|
Public Const K_DC_FLATT_MACHTYPE As String = "FlattMachType"
|
||||||
Public Const K_DC_FLATT_ROTLOCK As String = "FlattRotLock"
|
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_POSX As String = "FlattPosX"
|
||||||
Public Const K_DC_FLATT_POSY As String = "FlattPosY"
|
Public Const K_DC_FLATT_POSY As String = "FlattPosY"
|
||||||
Public Const K_DC_POLISH_NAME As String = "PolishName"
|
Public Const K_DC_POLISH_NAME As String = "PolishName"
|
||||||
@@ -332,6 +355,10 @@ Module ConstIni
|
|||||||
Public Const K_DC_TEST_OFFSET As String = "TestOffset"
|
Public Const K_DC_TEST_OFFSET As String = "TestOffset"
|
||||||
Public Const K_DC_OFFSET_SQUARING As String = "OffsetSquaring"
|
Public Const K_DC_OFFSET_SQUARING As String = "OffsetSquaring"
|
||||||
Public Const K_DC_EXTRA_LEN_SQUARING As String = "ExtraLenSquaring"
|
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 S_STATDATA As String = "StatData"
|
||||||
Public Const K_SD_DAY As String = "Day"
|
Public Const K_SD_DAY As String = "Day"
|
||||||
|
|||||||
@@ -5,32 +5,44 @@
|
|||||||
|
|
||||||
Public Const S_PARTPROGRAM As String = "PartProgram"
|
Public Const S_PARTPROGRAM As String = "PartProgram"
|
||||||
Public Const K_EXTENSION As String = "Extension"
|
Public Const K_EXTENSION As String = "Extension"
|
||||||
|
Public Const K_EXTFILECN As String = "ExtFileCN"
|
||||||
|
|
||||||
Public Const S_AXES As String = "Axes"
|
Public Const S_AXES As String = "Axes"
|
||||||
Public Const K_AXESNUM As String = "AxesNum"
|
Public Const K_AXESNUM As String = "AxesNum"
|
||||||
Public Const K_SIMULATIONAXESNUM As String = "SimulationAxesNum"
|
Public Const K_SIMULATIONAXESNUM As String = "SimulationAxesNum"
|
||||||
Public Const K_L1NAME As String = "L1Name"
|
Public Const K_L1NAME As String = "L1Name"
|
||||||
Public Const K_L1ID As String = "L1Id"
|
Public Const K_L1ID As String = "L1Id"
|
||||||
|
Public Const K_L1TYPE As String = "L1Type"
|
||||||
Public Const K_L2NAME As String = "L2Name"
|
Public Const K_L2NAME As String = "L2Name"
|
||||||
Public Const K_L2ID As String = "L2Id"
|
Public Const K_L2ID As String = "L2Id"
|
||||||
|
Public Const K_L2TYPE As String = "L2Type"
|
||||||
Public Const K_L3NAME As String = "L3Name"
|
Public Const K_L3NAME As String = "L3Name"
|
||||||
Public Const K_L3ID As String = "L3Id"
|
Public Const K_L3ID As String = "L3Id"
|
||||||
|
Public Const K_L3TYPE As String = "L3Type"
|
||||||
Public Const K_R1NAME As String = "R1Name"
|
Public Const K_R1NAME As String = "R1Name"
|
||||||
Public Const K_R1ID As String = "R1Id"
|
Public Const K_R1ID As String = "R1Id"
|
||||||
|
Public Const K_R1TYPE As String = "R1Type"
|
||||||
Public Const K_R2NAME As String = "R2Name"
|
Public Const K_R2NAME As String = "R2Name"
|
||||||
Public Const K_R2ID As String = "R2Id"
|
Public Const K_R2ID As String = "R2Id"
|
||||||
|
Public Const K_R2TYPE As String = "R2Type"
|
||||||
Public Const K_A6NAME As String = "A6Name"
|
Public Const K_A6NAME As String = "A6Name"
|
||||||
Public Const K_A6ID As String = "A6Id"
|
Public Const K_A6ID As String = "A6Id"
|
||||||
|
Public Const K_A6TYPE As String = "A6Type"
|
||||||
Public Const K_A7NAME As String = "A7Name"
|
Public Const K_A7NAME As String = "A7Name"
|
||||||
Public Const K_A7ID As String = "A7Id"
|
Public Const K_A7ID As String = "A7Id"
|
||||||
|
Public Const K_A7TYPE As String = "A7Type"
|
||||||
Public Const K_A8NAME As String = "A8Name"
|
Public Const K_A8NAME As String = "A8Name"
|
||||||
Public Const K_A8ID As String = "A8Id"
|
Public Const K_A8ID As String = "A8Id"
|
||||||
|
Public Const K_A8TYPE As String = "A8Type"
|
||||||
Public Const K_A9NAME As String = "A9Name"
|
Public Const K_A9NAME As String = "A9Name"
|
||||||
Public Const K_A9ID As String = "A9Id"
|
Public Const K_A9ID As String = "A9Id"
|
||||||
|
Public Const K_A9TYPE As String = "A9Type"
|
||||||
Public Const K_A10NAME As String = "A10Name"
|
Public Const K_A10NAME As String = "A10Name"
|
||||||
Public Const K_A10ID As String = "A10Id"
|
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_DELTA_C As String = "DeltaC"
|
||||||
Public Const K_ININCHES As String = "InInches"
|
Public Const K_ININCHES As String = "InInches"
|
||||||
|
Public Const K_CPOS As String = "CPos"
|
||||||
|
|
||||||
Public Const S_NCSIEMENS As String = "NcSiemens"
|
Public Const S_NCSIEMENS As String = "NcSiemens"
|
||||||
Public Const K_COMM_NAME As String = "CommName"
|
Public Const K_COMM_NAME As String = "CommName"
|
||||||
@@ -46,9 +58,20 @@
|
|||||||
Public Const K_THREADSLEEP As String = "ThreadSleep"
|
Public Const K_THREADSLEEP As String = "ThreadSleep"
|
||||||
Public Const K_PHOTODELEY As String = "PhotoDeley"
|
Public Const K_PHOTODELEY As String = "PhotoDeley"
|
||||||
|
|
||||||
|
Public Const S_NCFANUC As String = "NcFanuc"
|
||||||
|
Public Const K_SETNCMODE As String = "SetNcMode"
|
||||||
|
Public Const K_BASEADDRINT As String = "BaseAddrInt"
|
||||||
|
Public Const K_BASEADDRBIT As String = "BaseAddrBit"
|
||||||
|
Public Const K_NUMVARINT As String = "NumVarInt"
|
||||||
|
Public Const K_NUMVARBIT As String = "NumVarBit"
|
||||||
|
|
||||||
Public Const S_EXECLUA As String = "ExecLua"
|
Public Const S_EXECLUA As String = "ExecLua"
|
||||||
Public Const K_FILESCRIPT_LUA As String = "FileScript"
|
Public Const K_FILESCRIPT_LUA As String = "FileScript"
|
||||||
|
|
||||||
|
Public Const S_CAMERAHQ As String = "CameraHQ"
|
||||||
|
Public Const K_CAMERAHQ_ENABLE As String = "EnableHQ"
|
||||||
|
Public Const K_CAMERAHQ_ACTIVATE As String = "ActivateHQ"
|
||||||
|
|
||||||
Public Const S_NCDATA As String = "NcData"
|
Public Const S_NCDATA As String = "NcData"
|
||||||
Public Const K_NEWVARIABLE As String = "NewVariable"
|
Public Const K_NEWVARIABLE As String = "NewVariable"
|
||||||
Public Const K_NEWCONSOLE As String = "NewConsole"
|
Public Const K_NEWCONSOLE As String = "NewConsole"
|
||||||
@@ -78,12 +101,16 @@
|
|||||||
Public Const K_TABLEDOWN As String = "TableDown"
|
Public Const K_TABLEDOWN As String = "TableDown"
|
||||||
Public Const K_MANUAL As String = "Manual"
|
Public Const K_MANUAL As String = "Manual"
|
||||||
Public Const K_DOORCLOSED As String = "DoorClosed"
|
Public Const K_DOORCLOSED As String = "DoorClosed"
|
||||||
|
Public Const K_DOOROPENDED As String = "DoorOpened"
|
||||||
Public Const K_LIMITZ As String = "LimitZ"
|
Public Const K_LIMITZ As String = "LimitZ"
|
||||||
Public Const K_POWEROVR As String = "PowerOvr"
|
Public Const K_POWEROVR As String = "PowerOvr"
|
||||||
Public Const K_PARKING As String = "Parking"
|
Public Const K_PARKING As String = "Parking"
|
||||||
Public Const K_ENABLEZONE As String = "EnableZone"
|
Public Const K_ENABLEZONE As String = "EnableZone"
|
||||||
Public Const K_ENABLEPC As String = "EnablePC"
|
Public Const K_ENABLEPC As String = "EnablePC"
|
||||||
Public Const K_HSM As String = "Hsm"
|
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_VACUUMUP As String = "VacuumUp"
|
||||||
Public Const K_VACUUMDOWN As String = "VacuumDown"
|
Public Const K_VACUUMDOWN As String = "VacuumDown"
|
||||||
Public Const K_VACUUM2UP As String = "Vacuum2Up"
|
Public Const K_VACUUM2UP As String = "Vacuum2Up"
|
||||||
@@ -110,8 +137,11 @@
|
|||||||
Public Const K_VACUUMOFF As String = "VacuumOff"
|
Public Const K_VACUUMOFF As String = "VacuumOff"
|
||||||
Public Const K_BYPASSTATE As String = "BypassState"
|
Public Const K_BYPASSTATE As String = "BypassState"
|
||||||
Public Const K_FEEDHOLD As String = "FeedHold"
|
Public Const K_FEEDHOLD As String = "FeedHold"
|
||||||
|
Public Const K_SPOTLIGHT As String = "SpotLight"
|
||||||
Public Const K_SPOTLIGHT1 As String = "SpotLight1"
|
Public Const K_SPOTLIGHT1 As String = "SpotLight1"
|
||||||
Public Const K_SPOTLIGHT2 As String = "SpotLight2"
|
Public Const K_SPOTLIGHT2 As String = "SpotLight2"
|
||||||
|
Public Const K_NAXES As String = "nAxes"
|
||||||
|
Public Const K_RESETSTATUS As String = "ResetStatus"
|
||||||
' Nuove variabili
|
' Nuove variabili
|
||||||
Public Const K_SPEEDHOLD As String = "SpeedHold"
|
Public Const K_SPEEDHOLD As String = "SpeedHold"
|
||||||
Public Const K_XYJOG As String = "XYJog"
|
Public Const K_XYJOG As String = "XYJog"
|
||||||
@@ -142,6 +172,10 @@
|
|||||||
Public Const K_PRODLIPROBINGTCPOS2VAR As String = "ProbingTcPos2Var"
|
Public Const K_PRODLIPROBINGTCPOS2VAR As String = "ProbingTcPos2Var"
|
||||||
Public Const K_PRODLISAWDIAMETER2VAR As String = "SawDiameter2Var"
|
Public Const K_PRODLISAWDIAMETER2VAR As String = "SawDiameter2Var"
|
||||||
|
|
||||||
|
Public Const S_POLISHLINE As String = "PolishLine"
|
||||||
|
Public Const K_CLICKSTATE As String = "ClickState"
|
||||||
|
Public Const k_CLICKDIR As String = "ClickDir"
|
||||||
|
|
||||||
Public Const S_STATISTICS As String = "Stats"
|
Public Const S_STATISTICS As String = "Stats"
|
||||||
Public Const K_DATADIR As String = "DataDir"
|
Public Const K_DATADIR As String = "DataDir"
|
||||||
Public Const K_SHOWAREAS As String = "ShowAreas"
|
Public Const K_SHOWAREAS As String = "ShowAreas"
|
||||||
@@ -150,14 +184,26 @@
|
|||||||
Public Const K_ADDITIONALTABLE As String = "AdditionalTable"
|
Public Const K_ADDITIONALTABLE As String = "AdditionalTable"
|
||||||
Public Const K_TAB2_ADDITIONALTABLE As String = "Tab2AdditionalTable"
|
Public Const K_TAB2_ADDITIONALTABLE As String = "Tab2AdditionalTable"
|
||||||
Public Const K_TAB3_ADDITIONALTABLE As String = "Tab3AdditionalTable"
|
Public Const K_TAB3_ADDITIONALTABLE As String = "Tab3AdditionalTable"
|
||||||
|
Public Const K_TAB4_ADDITIONALTABLE As String = "Tab4AdditionalTable"
|
||||||
Public Const K_CENTER_RAW_ONX As String = "CenterRawOnX"
|
Public Const K_CENTER_RAW_ONX As String = "CenterRawOnX"
|
||||||
Public Const K_CHANGETABWD As String = "ChangeTabWD"
|
Public Const K_CHANGETABWD As String = "ChangeTabWD"
|
||||||
|
|
||||||
Public Const S_PHOTO As String = "Photo"
|
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_OFFSETX As String = "OffsetX"
|
||||||
Public Const K_PHOTO_OFFSETY As String = "OffsetY"
|
Public Const K_PHOTO_OFFSETY As String = "OffsetY"
|
||||||
Public Const K_PHOTO_TAB2_OFFSETX As String = "Tab2OffsetX"
|
Public Const K_PHOTO_TAB2_OFFSETX As String = "Tab2OffsetX"
|
||||||
Public Const K_PHOTO_TAB2_OFFSETY As String = "Tab2OffsetY"
|
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 S_TOOLS As String = "Tools"
|
||||||
Public Const K_DRILLBIT As String = "Drillbit"
|
Public Const K_DRILLBIT As String = "Drillbit"
|
||||||
@@ -207,6 +253,7 @@
|
|||||||
Public Const K_MACH_MILLING_ON_SINKS As String = "MillingOnSinks"
|
Public Const K_MACH_MILLING_ON_SINKS As String = "MillingOnSinks"
|
||||||
Public Const K_MACH_MILLING_SHORTENING As String = "MillingShortening"
|
Public Const K_MACH_MILLING_SHORTENING As String = "MillingShortening"
|
||||||
Public Const K_MACH_ENGRAVING_WITHMILL As String = "EngravingWithMill"
|
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_DEPTH As String = "EngravingDepth"
|
||||||
Public Const K_MACH_ENGRAVING_WIDTH As String = "EngravingWidth"
|
Public Const K_MACH_ENGRAVING_WIDTH As String = "EngravingWidth"
|
||||||
Public Const K_MACH_NEST_ALIGNED As String = "Aligned"
|
Public Const K_MACH_NEST_ALIGNED As String = "Aligned"
|
||||||
@@ -223,7 +270,8 @@
|
|||||||
Public Const K_HOLES_OFFSETWJ As String = "HolesOffsetWJ"
|
Public Const K_HOLES_OFFSETWJ As String = "HolesOffsetWJ"
|
||||||
Public Const K_MIN_RADIUSWJ As String = "MinRadiusWJ"
|
Public Const K_MIN_RADIUSWJ As String = "MinRadiusWJ"
|
||||||
Public Const K_MACH_DRILLINGWJ_ON_CORNERS As String = "DrillingWJOnCorners"
|
Public Const K_MACH_DRILLINGWJ_ON_CORNERS As String = "DrillingWJOnCorners"
|
||||||
' DrillMillC90
|
Public Const K_MACH_RECTIFICATION_ON_SUBSQUARE As String = "RectificationSubSqWJ"
|
||||||
|
Public Const K_MACH_DRILL_MILL_C90 As String = "DrillMillC90"
|
||||||
' CutLongDxSx
|
' CutLongDxSx
|
||||||
' AngRotMultiCut
|
' AngRotMultiCut
|
||||||
' MinDistHeadsMultiCut
|
' MinDistHeadsMultiCut
|
||||||
@@ -270,6 +318,7 @@
|
|||||||
Public Const S_MACH_PROBING As String = "Probing"
|
Public Const S_MACH_PROBING As String = "Probing"
|
||||||
Public Const K_PROBINGSTATEVAR As String = "ProbingStateVar"
|
Public Const K_PROBINGSTATEVAR As String = "ProbingStateVar"
|
||||||
Public Const K_SAWDIAMETER As String = "SawDiameter"
|
Public Const K_SAWDIAMETER As String = "SawDiameter"
|
||||||
|
Public Const K_TOOLLENGTH As String = "ToolLength"
|
||||||
Public Const K_RAWTHICKNESS As String = "RawThickness"
|
Public Const K_RAWTHICKNESS As String = "RawThickness"
|
||||||
Public Const K_ENABLERAWPROBE As String = "EnableRawProbe"
|
Public Const K_ENABLERAWPROBE As String = "EnableRawProbe"
|
||||||
|
|
||||||
@@ -281,6 +330,7 @@
|
|||||||
|
|
||||||
Public Const S_MACH_MACH As String = "Mach"
|
Public Const S_MACH_MACH As String = "Mach"
|
||||||
Public Const K_CURRSAW As String = "CurrSaw"
|
Public Const K_CURRSAW As String = "CurrSaw"
|
||||||
|
Public Const K_CURRSAWTILTED As String = "CurrSawTilted"
|
||||||
Public Const K_CURRDRILL As String = "CurrDrill"
|
Public Const K_CURRDRILL As String = "CurrDrill"
|
||||||
Public Const K_CURRMILL As String = "CurrMill"
|
Public Const K_CURRMILL As String = "CurrMill"
|
||||||
Public Const K_CURRMILLNOTIP As String = "CurrMillNoTip"
|
Public Const K_CURRMILLNOTIP As String = "CurrMillNoTip"
|
||||||
@@ -288,6 +338,8 @@
|
|||||||
Public Const K_CURRDRIPDRILL As String = "CurrDripDrill"
|
Public Const K_CURRDRIPDRILL As String = "CurrDripDrill"
|
||||||
Public Const K_CURRWATERJET As String = "CurrWaterJet"
|
Public Const K_CURRWATERJET As String = "CurrWaterJet"
|
||||||
Public Const K_CURRSAWING As String = "CurrSawing"
|
Public Const K_CURRSAWING As String = "CurrSawing"
|
||||||
|
Public Const K_CURRSAWINGTILTED As String = "CurrSawingTilted"
|
||||||
|
Public Const K_APPLYSAWINGTILTED As String = "ApplySawingTilted"
|
||||||
Public Const K_CURRDRILLING As String = "CurrDrilling"
|
Public Const K_CURRDRILLING As String = "CurrDrilling"
|
||||||
Public Const K_CURRMILLING As String = "CurrMilling"
|
Public Const K_CURRMILLING As String = "CurrMilling"
|
||||||
Public Const K_CURRPOCKETING As String = "CurrPocketing"
|
Public Const K_CURRPOCKETING As String = "CurrPocketing"
|
||||||
|
|||||||
@@ -29,7 +29,7 @@
|
|||||||
<!--<RowDefinition Height="1*"/>-->
|
<!--<RowDefinition Height="1*"/>-->
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
<Button Name="ManualBtn" Grid.Column="2" Grid.Row="0"
|
<Button Name="ManualBtn" Grid.Column="2" Grid.Row="0"
|
||||||
Style="{DynamicResource OmagCut_YellowIconButton}">
|
Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||||
<Grid>
|
<Grid>
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="80"/>
|
<ColumnDefinition Width="80"/>
|
||||||
@@ -37,12 +37,12 @@
|
|||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<Image Source="{DynamicResource Movimento-manualeImg}" Style="{DynamicResource OmagCut_ButtonIcon}" Grid.Column="0" />
|
<Image Source="{DynamicResource Movimento-manualeImg}" Style="{DynamicResource OmagCut_ButtonIcon}" Grid.Column="0" />
|
||||||
<TextBlock Name="ManualTxt" Grid.Column="1"
|
<TextBlock Name="ManualTxt" Grid.Column="1"
|
||||||
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
</Button>
|
</Button>
|
||||||
|
|
||||||
<Button Name="SingleCutBtn" Grid.Row="1"
|
<Button Name="SingleCutBtn" Grid.Row="1"
|
||||||
Style="{DynamicResource OmagCut_YellowIconButton}">
|
Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||||
<Grid>
|
<Grid>
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="80"/>
|
<ColumnDefinition Width="80"/>
|
||||||
@@ -50,12 +50,12 @@
|
|||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<Image Source="{DynamicResource Taglio-singoloImg}" Style="{DynamicResource OmagCut_ButtonIcon}" Grid.Column="0" />
|
<Image Source="{DynamicResource Taglio-singoloImg}" Style="{DynamicResource OmagCut_ButtonIcon}" Grid.Column="0" />
|
||||||
<TextBlock Name="SingleCutTxt" Grid.Column="1"
|
<TextBlock Name="SingleCutTxt" Grid.Column="1"
|
||||||
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
</Button>
|
</Button>
|
||||||
|
|
||||||
<Button Name="MultipleCutBtn" Grid.Row="2"
|
<Button Name="MultipleCutBtn" Grid.Row="2"
|
||||||
Style="{DynamicResource OmagCut_YellowIconButton}">
|
Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||||
<Grid>
|
<Grid>
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="80"/>
|
<ColumnDefinition Width="80"/>
|
||||||
@@ -63,12 +63,12 @@
|
|||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<Image Source="{DynamicResource Taglio-multiploImg}" Style="{DynamicResource OmagCut_ButtonIcon}" Grid.Column="0" />
|
<Image Source="{DynamicResource Taglio-multiploImg}" Style="{DynamicResource OmagCut_ButtonIcon}" Grid.Column="0" />
|
||||||
<TextBlock Name="MultipleCutTxt" Grid.Column="1"
|
<TextBlock Name="MultipleCutTxt" Grid.Column="1"
|
||||||
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
</Button>
|
</Button>
|
||||||
|
|
||||||
<Button Name="GridCutBtn" Grid.Row="3"
|
<Button Name="GridCutBtn" Grid.Row="3"
|
||||||
Style="{DynamicResource OmagCut_YellowIconButton}">
|
Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||||
<Grid>
|
<Grid>
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="80"/>
|
<ColumnDefinition Width="80"/>
|
||||||
@@ -76,13 +76,13 @@
|
|||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<Image Source="{DynamicResource Taglio-grigliaImg}" Style="{DynamicResource OmagCut_ButtonIcon}" Grid.Column="0" />
|
<Image Source="{DynamicResource Taglio-grigliaImg}" Style="{DynamicResource OmagCut_ButtonIcon}" Grid.Column="0" />
|
||||||
<TextBlock Name="GridCutTxt" Grid.Column="1"
|
<TextBlock Name="GridCutTxt" Grid.Column="1"
|
||||||
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
</Button>
|
</Button>
|
||||||
|
|
||||||
|
|
||||||
<Button Name="SingleDrillBtn" Grid.Row="4"
|
<Button Name="SingleDrillBtn" Grid.Row="4"
|
||||||
Style="{DynamicResource OmagCut_YellowIconButton}">
|
Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||||
<Grid>
|
<Grid>
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="80"/>
|
<ColumnDefinition Width="80"/>
|
||||||
@@ -90,12 +90,12 @@
|
|||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<Image Source="{DynamicResource Foro-singoloImg}" Style="{DynamicResource OmagCut_ButtonIcon}" Grid.Column="0" />
|
<Image Source="{DynamicResource Foro-singoloImg}" Style="{DynamicResource OmagCut_ButtonIcon}" Grid.Column="0" />
|
||||||
<TextBlock Name="SingleDrillTxt" Grid.Column="1"
|
<TextBlock Name="SingleDrillTxt" Grid.Column="1"
|
||||||
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
</Button>
|
</Button>
|
||||||
|
|
||||||
<Button Name="FlatteningCutBtn" Grid.Row="5"
|
<Button Name="FlatteningCutBtn" Grid.Row="5"
|
||||||
Style="{DynamicResource OmagCut_YellowIconButton}">
|
Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||||
<Grid>
|
<Grid>
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="80"/>
|
<ColumnDefinition Width="80"/>
|
||||||
@@ -103,7 +103,7 @@
|
|||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<Image Source="{DynamicResource SpianaturaImg}" Style="{DynamicResource OmagCut_ButtonIcon}" Grid.Column="0" />
|
<Image Source="{DynamicResource SpianaturaImg}" Style="{DynamicResource OmagCut_ButtonIcon}" Grid.Column="0" />
|
||||||
<TextBlock Name="FlatteningCutTxt" Grid.Column="1"
|
<TextBlock Name="FlatteningCutTxt" Grid.Column="1"
|
||||||
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
</Button>
|
</Button>
|
||||||
|
|
||||||
@@ -134,7 +134,7 @@
|
|||||||
</Button>-->
|
</Button>-->
|
||||||
|
|
||||||
<Button Name="SquaringBtn" Grid.Row="6"
|
<Button Name="SquaringBtn" Grid.Row="6"
|
||||||
Style="{DynamicResource OmagCut_YellowIconButton}">
|
Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||||
<Grid>
|
<Grid>
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="80"/>
|
<ColumnDefinition Width="80"/>
|
||||||
@@ -142,7 +142,7 @@
|
|||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<Image Source="{DynamicResource Copia-dimaImg}" Style="{DynamicResource OmagCut_ButtonIcon}" Grid.Column="0" />
|
<Image Source="{DynamicResource Copia-dimaImg}" Style="{DynamicResource OmagCut_ButtonIcon}" Grid.Column="0" />
|
||||||
<TextBlock Name="SquaringTxt" Grid.Column="1"
|
<TextBlock Name="SquaringTxt" Grid.Column="1"
|
||||||
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
</Button>
|
</Button>
|
||||||
|
|
||||||
@@ -167,7 +167,7 @@
|
|||||||
<Button Name="ChangeUCBtn" Grid.ColumnSpan="2" Style="{DynamicResource OmagCut_YellowIconButton}">
|
<Button Name="ChangeUCBtn" Grid.ColumnSpan="2" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||||
<Grid>
|
<Grid>
|
||||||
<!--<Image Name="ImageCompo9" Source="{DynamicResource NumericKeyboardArrowImg}" />-->
|
<!--<Image Name="ImageCompo9" Source="{DynamicResource NumericKeyboardArrowImg}" />-->
|
||||||
<TextBlock Name="ChangeUCTxBl" Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
<TextBlock Name="ChangeUCTxBl" Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
</Button>
|
</Button>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
Imports EgtUILib
|
Imports EgtUILib
|
||||||
|
|
||||||
Public Class ControlsDirectCutUC
|
Public Class ControlsDirectCutUC
|
||||||
|
|
||||||
' Dichiarazione delle Page UserControl
|
' Dichiarazione delle Page UserControl
|
||||||
@@ -53,7 +54,6 @@ Public Class ControlsDirectCutUC
|
|||||||
FlatteningCut
|
FlatteningCut
|
||||||
Polishing
|
Polishing
|
||||||
CopyTemplate
|
CopyTemplate
|
||||||
SawTest
|
|
||||||
SingleCutAuto
|
SingleCutAuto
|
||||||
SingleDrill
|
SingleDrill
|
||||||
Squaring
|
Squaring
|
||||||
@@ -79,6 +79,7 @@ Public Class ControlsDirectCutUC
|
|||||||
' Costruisco la finestra per il nuovo tipo di taglio manuale
|
' Costruisco la finestra per il nuovo tipo di taglio manuale
|
||||||
m_SingleCutAuto = New SingleCutAuto
|
m_SingleCutAuto = New SingleCutAuto
|
||||||
|
|
||||||
|
|
||||||
'Posizionemento nella griglia delle Page UserControl DirectCutPageUC
|
'Posizionemento nella griglia delle Page UserControl DirectCutPageUC
|
||||||
m_MachineButtons.SetValue(Grid.RowProperty, 2)
|
m_MachineButtons.SetValue(Grid.RowProperty, 2)
|
||||||
m_MachineButtons.SetValue(Grid.ColumnSpanProperty, 7)
|
m_MachineButtons.SetValue(Grid.ColumnSpanProperty, 7)
|
||||||
@@ -97,17 +98,17 @@ Public Class ControlsDirectCutUC
|
|||||||
m_VacuumMachineButton.SetValue(Grid.RowProperty, 1)
|
m_VacuumMachineButton.SetValue(Grid.RowProperty, 1)
|
||||||
|
|
||||||
' ManualBtn.Content = EgtMsg(90201)
|
' ManualBtn.Content = EgtMsg(90201)
|
||||||
ManualTxt.Text = EgtMsg(90201)
|
ManualTxt.Text = EgtMsg(90201) ' Movimento manuale
|
||||||
'SingleCutBtn.Content = EgtMsg(90202)
|
'SingleCutBtn.Content = EgtMsg(90202)
|
||||||
SingleCutTxt.Text = EgtMsg(90202)
|
SingleCutTxt.Text = EgtMsg(90202) ' Taglio singolo
|
||||||
'SingleDrillBtn.Content = "Foro singolo"
|
'SingleDrillBtn.Content = "Foro singolo"
|
||||||
SingleDrillTxt.Text = EgtMsg(90258)
|
SingleDrillTxt.Text = EgtMsg(90258) ' Foro singolo
|
||||||
'MultipleCutBtn.Content = EgtMsg(90203)
|
'MultipleCutBtn.Content = EgtMsg(90203)
|
||||||
MultipleCutTxt.Text = EgtMsg(90203)
|
MultipleCutTxt.Text = EgtMsg(90203) ' Taglio multiplo
|
||||||
'GridCutBtn.Content = EgtMsg(90204)
|
'GridCutBtn.Content = EgtMsg(90204)
|
||||||
GridCutTxt.Text = EgtMsg(90204)
|
GridCutTxt.Text = EgtMsg(90204) ' Taglio griglia
|
||||||
'FlatteningCutBtn.Content = EgtMsg(90206)
|
'FlatteningCutBtn.Content = EgtMsg(90206)
|
||||||
FlatteningCutTxt.Text = EgtMsg(90206)
|
FlatteningCutTxt.Text = EgtMsg(90206) ' Spianatura
|
||||||
' 90261=Squaring
|
' 90261=Squaring
|
||||||
SquaringTxt.Text = EgtMsg(90261)
|
SquaringTxt.Text = EgtMsg(90261)
|
||||||
' 90409=Others
|
' 90409=Others
|
||||||
@@ -140,8 +141,11 @@ Public Class ControlsDirectCutUC
|
|||||||
Return
|
Return
|
||||||
End If
|
End If
|
||||||
|
|
||||||
' Caso standard
|
If m_MainWindow.m_DirectCutPageUC.m_ActiveControl <> DirectCutPageUC.Controls.MachineButtonUC Or
|
||||||
m_ActiveDirectCutPage = DirectCutPages.DirectCut
|
m_MainWindow.m_DirectCutPageUC.m_ActiveControl <> DirectCutPageUC.Controls.VacuumButtonUC Then
|
||||||
|
' Caso standard
|
||||||
|
m_ActiveDirectCutPage = DirectCutPages.DirectCut
|
||||||
|
End If
|
||||||
|
|
||||||
' Attivo le lavorazioni solo se esiste il grezzo e se presente testa H1
|
' Attivo le lavorazioni solo se esiste il grezzo e se presente testa H1
|
||||||
Dim bRawOk As Boolean = (GetRawHeight() > EPS_SMALL)
|
Dim bRawOk As Boolean = (GetRawHeight() > EPS_SMALL)
|
||||||
@@ -180,6 +184,9 @@ Public Class ControlsDirectCutUC
|
|||||||
If Not String.IsNullOrEmpty(sCurrSaw) And Not String.IsNullOrEmpty(sCurrSawing) Then
|
If Not String.IsNullOrEmpty(sCurrSaw) And Not String.IsNullOrEmpty(sCurrSawing) Then
|
||||||
bSaw = EgtSetCalcTool(sCurrSaw, "H1", 1)
|
bSaw = EgtSetCalcTool(sCurrSaw, "H1", 1)
|
||||||
End If
|
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_SingleCut.SetEnableParam(bSaw)
|
||||||
m_MultipleCut.SetEnableParam(bSaw)
|
m_MultipleCut.SetEnableParam(bSaw)
|
||||||
m_GridCut.SetEnableParam(bSaw)
|
m_GridCut.SetEnableParam(bSaw)
|
||||||
|
|||||||
@@ -30,7 +30,7 @@
|
|||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
<Button Name="SawTestBtn" Grid.Row="0"
|
<Button Name="SawTestBtn" Grid.Row="0"
|
||||||
Style="{DynamicResource OmagCut_YellowIconButton}">
|
Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||||
<Grid>
|
<Grid>
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="80"/>
|
<ColumnDefinition Width="80"/>
|
||||||
@@ -38,12 +38,12 @@
|
|||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<Image Source="{DynamicResource Test-lamaImg}" Style="{DynamicResource OmagCut_ButtonIcon}" Grid.Column="0" />
|
<Image Source="{DynamicResource Test-lamaImg}" Style="{DynamicResource OmagCut_ButtonIcon}" Grid.Column="0" />
|
||||||
<TextBlock Name="SawTestTxt" Grid.Column="1"
|
<TextBlock Name="SawTestTxt" Grid.Column="1"
|
||||||
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
</Button>
|
</Button>
|
||||||
|
|
||||||
<Button Name="PolishingBtn" Grid.Row="1"
|
<Button Name="PolishingBtn" Grid.Row="1"
|
||||||
Style="{DynamicResource OmagCut_YellowIconButton}">
|
Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||||
<Grid>
|
<Grid>
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="80"/>
|
<ColumnDefinition Width="80"/>
|
||||||
@@ -51,7 +51,7 @@
|
|||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<Image Source="{DynamicResource LucidaturaImg}" Style="{DynamicResource OmagCut_ButtonIcon}" Grid.Column="0" />
|
<Image Source="{DynamicResource LucidaturaImg}" Style="{DynamicResource OmagCut_ButtonIcon}" Grid.Column="0" />
|
||||||
<TextBlock Name="PolishingTxt" Grid.Column="1"
|
<TextBlock Name="PolishingTxt" Grid.Column="1"
|
||||||
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
</Button>
|
</Button>
|
||||||
|
|
||||||
@@ -64,7 +64,7 @@
|
|||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<Image Source="{DynamicResource Copia-dimaImg}" Style="{DynamicResource OmagCut_ButtonIcon}" Grid.Column="0" />
|
<Image Source="{DynamicResource Copia-dimaImg}" Style="{DynamicResource OmagCut_ButtonIcon}" Grid.Column="0" />
|
||||||
<TextBlock Name="CopyTemplateTxt" Grid.Column="1"
|
<TextBlock Name="CopyTemplateTxt" Grid.Column="1"
|
||||||
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
</Button>
|
</Button>
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
Imports EgtUILib
|
Imports EgtUILib
|
||||||
|
|
||||||
Public Class ControlsDirectCutUC1
|
Public Class ControlsDirectCutUC1
|
||||||
|
|
||||||
' Dichiarazione delle Page UserControl
|
' Dichiarazione delle Page UserControl
|
||||||
@@ -99,6 +100,9 @@ Public Class ControlsDirectCutUC1
|
|||||||
If Not String.IsNullOrEmpty(sCurrSaw) And Not String.IsNullOrEmpty(sCurrSawing) Then
|
If Not String.IsNullOrEmpty(sCurrSaw) And Not String.IsNullOrEmpty(sCurrSawing) Then
|
||||||
bSaw = EgtSetCalcTool(sCurrSaw, "H1", 1)
|
bSaw = EgtSetCalcTool(sCurrSaw, "H1", 1)
|
||||||
End If
|
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_SingleCut.SetEnableParam(bSaw)
|
||||||
'm_MultipleCut.SetEnableParam(bSaw)
|
'm_MultipleCut.SetEnableParam(bSaw)
|
||||||
'm_GridCut.SetEnableParam(bSaw)
|
'm_GridCut.SetEnableParam(bSaw)
|
||||||
|
|||||||
@@ -1,13 +1,13 @@
|
|||||||
<UserControl x:Class="ControlsMachineButtonUC"
|
<UserControl x:Class="ControlsMachineButtonUC"
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
DataContext="Self"
|
DataContext="Self"
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
xmlns:OmagCUT="clr-namespace:OmagCUT"
|
xmlns:OmagCUT="clr-namespace:OmagCUT"
|
||||||
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
|
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
d:DesignHeight="597.3" d:DesignWidth="256">
|
d:DesignHeight="597.3" d:DesignWidth="256">
|
||||||
|
|
||||||
<Border Style="{DynamicResource OmagCut_Page2Border}">
|
<Border Style="{DynamicResource OmagCut_Page2Border}">
|
||||||
|
|
||||||
@@ -16,33 +16,33 @@
|
|||||||
<DataTemplate DataType="{x:Type OmagCUT:TwoStateButton}">
|
<DataTemplate DataType="{x:Type OmagCUT:TwoStateButton}">
|
||||||
<ToggleButton IsChecked="{Binding IsChecked}"
|
<ToggleButton IsChecked="{Binding IsChecked}"
|
||||||
Style="{DynamicResource OmagCut_GradientYellowIconToggleButton}">
|
Style="{DynamicResource OmagCut_GradientYellowIconToggleButton}">
|
||||||
<Image Source="{Binding ImageSource}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
<Image Source="{Binding ImageSource}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||||
</ToggleButton>
|
</ToggleButton>
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
<DataTemplate DataType="{x:Type OmagCUT:NoStateButton}">
|
<DataTemplate DataType="{x:Type OmagCUT:NoStateButton}">
|
||||||
<Button Command="{Binding ExecuteCommand}"
|
<Button Command="{Binding ExecuteCommand}"
|
||||||
Style="{DynamicResource OmagCut_YellowGradientYellowIconButton}">
|
Style="{DynamicResource OmagCut_YellowGradientYellowIconButton}">
|
||||||
<Image Source="{Binding ImageSource}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
<Image Source="{Binding ImageSource}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||||
</Button>
|
</Button>
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
<DataTemplate DataType="{x:Type OmagCUT:ThreeStateButton}">
|
<DataTemplate DataType="{x:Type OmagCUT:ThreeStateButton}">
|
||||||
<Button Command="{Binding ExecuteCommand}"
|
<Button Command="{Binding ExecuteCommand}"
|
||||||
Background="{Binding Background}"
|
Background="{Binding Background}"
|
||||||
Style="{DynamicResource OmagCut_MachineCommandsYellowGradientYellowIconButton}">
|
Style="{DynamicResource OmagCut_MachineCommandsYellowGradientYellowIconButton}">
|
||||||
<Image Source="{Binding ImageSource}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
<Image Source="{Binding ImageSource}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||||
</Button>
|
</Button>
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
<DataTemplate DataType="{x:Type OmagCUT:DoubleCommandButton}">
|
<DataTemplate DataType="{x:Type OmagCUT:DoubleCommandButton}">
|
||||||
<ToggleButton IsChecked="{Binding IsChecked}"
|
<ToggleButton IsChecked="{Binding IsChecked}"
|
||||||
Style="{DynamicResource OmagCut_GradientYellowIconToggleButton}">
|
Style="{DynamicResource OmagCut_GradientYellowIconToggleButton}">
|
||||||
<Image Source="{Binding ImageSource}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
<Image Source="{Binding ImageSource}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||||
</ToggleButton>
|
</ToggleButton>
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
<DataTemplate DataType="{x:Type OmagCUT:PressedCommandButton}">
|
<DataTemplate DataType="{x:Type OmagCUT:PressedCommandButton}">
|
||||||
<Button Style="{DynamicResource OmagCut_MachineCommandsYellowGradientYellowIconButton}"
|
<Button Style="{DynamicResource OmagCut_MachineCommandsYellowGradientYellowIconButton}"
|
||||||
PreviewMouseUp="PressedCommandButton_PreviewMouseUp"
|
PreviewMouseUp="PressedCommandButton_PreviewMouseUp"
|
||||||
PreviewMouseDown="PressedCommandButton_PreviewMouseDown">
|
PreviewMouseDown="PressedCommandButton_PreviewMouseDown">
|
||||||
<Image Source="{Binding ImageSource}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
<Image Source="{Binding ImageSource}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||||
</Button>
|
</Button>
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
</ItemsControl.Resources>
|
</ItemsControl.Resources>
|
||||||
@@ -60,7 +60,7 @@
|
|||||||
</ItemsPanelTemplate>
|
</ItemsPanelTemplate>
|
||||||
</ItemsControl.ItemsPanel>
|
</ItemsControl.ItemsPanel>
|
||||||
</ItemsControl>
|
</ItemsControl>
|
||||||
|
|
||||||
</Border>
|
</Border>
|
||||||
|
|
||||||
</UserControl>
|
</UserControl>
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
Imports System.Collections.ObjectModel
|
Imports System.Collections.ObjectModel
|
||||||
Imports System.ComponentModel
|
Imports System.ComponentModel
|
||||||
Imports EgtUILib
|
Imports EgtUILib
|
||||||
Imports EgtWPFLib
|
|
||||||
|
|
||||||
Public Class ControlsMachineButtonUC
|
Public Class ControlsMachineButtonUC
|
||||||
Implements INotifyPropertyChanged
|
Implements INotifyPropertyChanged
|
||||||
@@ -23,6 +22,9 @@ Public Class ControlsMachineButtonUC
|
|||||||
Friend m_CN As CN_generico
|
Friend m_CN As CN_generico
|
||||||
Private m_bFirst As Boolean = True
|
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
|
' Creazione converter da String a ImageSource
|
||||||
Dim ImageConverter As New ImageSourceConverter
|
Dim ImageConverter As New ImageSourceConverter
|
||||||
|
|
||||||
@@ -72,10 +74,37 @@ Public Class ControlsMachineButtonUC
|
|||||||
If Not IsNothing(ButtonToAdd) Then m_ButtonList.Add(ButtonToAdd)
|
If Not IsNothing(ButtonToAdd) Then m_ButtonList.Add(ButtonToAdd)
|
||||||
End If
|
End If
|
||||||
End While
|
End While
|
||||||
|
|
||||||
|
For Each MachineButton As MachineButton In m_ButtonList
|
||||||
|
GetTypeButton(MachineButton)
|
||||||
|
Next
|
||||||
|
m_OutLogTypeButton = False
|
||||||
|
|
||||||
NotifyPropertyChanged("ButtonList")
|
NotifyPropertyChanged("ButtonList")
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
#Region "STATE CHANGED"
|
||||||
|
' ------------------------------------------------------------------------------
|
||||||
|
' i segeunti metodi notificano il cambiamento di stato di specifici bottoni
|
||||||
|
'-------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
Friend Sub GetTypeButton(CurrMachineButton As MachineButton)
|
||||||
|
If Not m_OutLogTypeButton Then Return
|
||||||
|
Dim BtnType As Type = CurrMachineButton.GetType
|
||||||
|
If BtnType Is GetType(NoStateButton) Then
|
||||||
|
EgtOutLog(" ► " & BtnType.ToString.Replace("OmagCUT.", "(0) ") & " , " & CurrMachineButton.StateFlag)
|
||||||
|
ElseIf BtnType Is GetType(TwoStateButton) Then
|
||||||
|
EgtOutLog(" ► " & BtnType.ToString.Replace("OmagCUT.", "(1) ") & " , " & CurrMachineButton.StateFlag)
|
||||||
|
ElseIf BtnType Is GetType(ThreeStateButton) Then
|
||||||
|
EgtOutLog(" ► " & BtnType.ToString.Replace("OmagCUT.", "(2) ") & " , " & CurrMachineButton.StateFlag)
|
||||||
|
ElseIf BtnType Is GetType(DoubleCommandButton) Then
|
||||||
|
EgtOutLog(" ► " & BtnType.ToString.Replace("OmagCUT.", "(3) ") & " , " & CurrMachineButton.StateFlag)
|
||||||
|
ElseIf BtnType Is GetType(PressedCommandButton) Then
|
||||||
|
EgtOutLog(" ► " & BtnType.ToString.Replace("OmagCUT.", "(4) ") & " , " & CurrMachineButton.StateFlag)
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
Friend Sub SpindleStateChanged(SpindleState As Boolean)
|
Friend Sub SpindleStateChanged(SpindleState As Boolean)
|
||||||
Dim SpindleButton As TwoStateButton = Nothing
|
Dim SpindleButton As TwoStateButton = Nothing
|
||||||
For Each MachineButton As MachineButton In m_ButtonList
|
For Each MachineButton As MachineButton In m_ButtonList
|
||||||
@@ -255,38 +284,34 @@ Public Class ControlsMachineButtonUC
|
|||||||
Dim DoorOpenedButton As ThreeStateButton = Nothing
|
Dim DoorOpenedButton As ThreeStateButton = Nothing
|
||||||
For Each MachineButton As MachineButton In m_ButtonList
|
For Each MachineButton As MachineButton In m_ButtonList
|
||||||
If MachineButton.StateFlag = K_DOORCLOSED Then
|
If MachineButton.StateFlag = K_DOORCLOSED Then
|
||||||
'If TypeOf MachineButton Is NoStateButton Then
|
|
||||||
' DoorClosedButton = DirectCast(MachineButton, NoStateButton)
|
|
||||||
'ElseIf TypeOf MachineButton Is TwoStateButton Then
|
|
||||||
' DoorClosedButton = DirectCast(MachineButton, TwoStateButton)
|
|
||||||
'ElseIf TypeOf MachineButton Is ThreeStateButton Then
|
|
||||||
' DoorClosedButton = DirectCast(MachineButton, ThreeStateButton)
|
|
||||||
'ElseIf TypeOf MachineButton Is DoubleCommandButton Then
|
|
||||||
' DoorClosedButton = DirectCast(MachineButton, DoubleCommandButton)
|
|
||||||
'ElseIf TypeOf MachineButton Is PressedCommandButton Then
|
|
||||||
' DoorClosedButton = DirectCast(MachineButton, PressedCommandButton)
|
|
||||||
'End If
|
|
||||||
DoorClosedButton = MachineButton
|
DoorClosedButton = MachineButton
|
||||||
End If
|
End If
|
||||||
If MachineButton.StateFlag = "DoorOpened" Then
|
If MachineButton.StateFlag = K_DOOROPENDED Then
|
||||||
DoorOpenedButton = MachineButton
|
DoorOpenedButton = MachineButton
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
|
' Chiusura porte (gesrtione comando Three/Two state
|
||||||
If Not IsNothing(DoorClosedButton) Then
|
If Not IsNothing(DoorClosedButton) Then
|
||||||
Select Case DoorClosedState
|
Select Case DoorClosedState
|
||||||
Case 0
|
Case 0
|
||||||
|
' porta aperta
|
||||||
DoorClosedButton.Background = Application.Current.FindResource("OmagCut_Red")
|
DoorClosedButton.Background = Application.Current.FindResource("OmagCut_Red")
|
||||||
Case 1, 2
|
Case 1, 2
|
||||||
|
' porta in movimento/aperta
|
||||||
DoorClosedButton.Background = Application.Current.FindResource("OmagCut_LightGray")
|
DoorClosedButton.Background = Application.Current.FindResource("OmagCut_LightGray")
|
||||||
End Select
|
End Select
|
||||||
End If
|
End If
|
||||||
|
' Chiusura porte (gesrtione comando Three/Two state
|
||||||
If Not IsNothing(DoorOpenedButton) Then
|
If Not IsNothing(DoorOpenedButton) Then
|
||||||
Select Case DoorClosedState
|
Select Case DoorClosedState
|
||||||
Case 0
|
Case 0
|
||||||
|
' porta aperta
|
||||||
DoorOpenedButton.Background = Application.Current.FindResource("OmagCut_LightGray")
|
DoorOpenedButton.Background = Application.Current.FindResource("OmagCut_LightGray")
|
||||||
Case 1
|
Case 1
|
||||||
|
' porta in movimento
|
||||||
DoorOpenedButton.Background = Application.Current.FindResource("OmagCut_Yellow")
|
DoorOpenedButton.Background = Application.Current.FindResource("OmagCut_Yellow")
|
||||||
Case 2
|
Case 2
|
||||||
|
' porta chiusa
|
||||||
DoorOpenedButton.Background = Application.Current.FindResource("OmagCut_Green")
|
DoorOpenedButton.Background = Application.Current.FindResource("OmagCut_Green")
|
||||||
End Select
|
End Select
|
||||||
End If
|
End If
|
||||||
@@ -343,35 +368,64 @@ Public Class ControlsMachineButtonUC
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Friend Sub ZoneStateChanged(ZoneState As Integer)
|
Friend Sub ZoneStateChanged(ZoneState As Integer)
|
||||||
'Dim sFlag As String = String.Empty
|
Dim bEnableZone1 As Boolean = False
|
||||||
'If ZoneState = 1 Then
|
If ZoneState = 1 Then
|
||||||
' sFlag = BTN_ENABLE_ZONE_1
|
bEnableZone1 = True
|
||||||
'ElseIf ZoneState = 2 Then
|
ElseIf ZoneState = 2 Then
|
||||||
' sFlag = BTN_ENABLE_ZONE_2
|
bEnableZone1 = False
|
||||||
'End If
|
End If
|
||||||
'Dim EnableZoneButton As TwoStateButton = Nothing
|
' attivo il comando associato
|
||||||
'For Each MachineButton As MachineButton In m_ButtonList
|
Dim EnableZoneButton As TwoStateButton = Nothing
|
||||||
' If MachineButton.StateFlag = K_ENABLEZONE Then
|
For Each MachineButton As MachineButton In m_ButtonList
|
||||||
' EnableZoneButton = MachineButton
|
If MachineButton.StateFlag = BTN_ENABLE_ZONE_1 Then
|
||||||
' End If
|
EnableZoneButton = MachineButton
|
||||||
'Next
|
End If
|
||||||
'If Not IsNothing(EnableZoneButton) Then
|
Next
|
||||||
' EnableZoneButton.SetIsChecked(EnableZone)
|
If Not IsNothing(EnableZoneButton) Then
|
||||||
'End If
|
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
|
End Sub
|
||||||
|
|
||||||
Friend Sub PcStateChanged(EnablePC As Boolean)
|
Friend Sub PcStateChanged(EnablePC As Integer)
|
||||||
'Dim EnablePCButton As TwoStateButton = Nothing
|
Dim bEnablePC1 As Boolean = False
|
||||||
'For Each MachineButton As MachineButton In m_ButtonList
|
If EnablePC = 1 Then
|
||||||
' If MachineButton.StateFlag = K_ENABLEPC Then
|
bEnablePC1 = True
|
||||||
' EnablePCButton = MachineButton
|
ElseIf EnablePC = 2 Then
|
||||||
' End If
|
bEnablePC1 = False
|
||||||
'Next
|
End If
|
||||||
'If Not IsNothing(EnablePCButton) Then
|
' attivo/disattivo il comando associato
|
||||||
' EnablePCButton.SetIsChecked(EnablePC)
|
Dim EnablePCButton As TwoStateButton = Nothing
|
||||||
'End If
|
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 Sub
|
||||||
|
|
||||||
|
#End Region ' State Range
|
||||||
|
|
||||||
Public Function GetPrivateProfileMachineButtons(
|
Public Function GetPrivateProfileMachineButtons(
|
||||||
ByVal lpAppName As String,
|
ByVal lpAppName As String,
|
||||||
@@ -569,13 +623,64 @@ Public MustInherit Class MachineButton
|
|||||||
EgtOutLog("dopo scrittura seconda variabile")
|
EgtOutLog("dopo scrittura seconda variabile")
|
||||||
End If
|
End If
|
||||||
Return
|
Return
|
||||||
|
Case 4
|
||||||
|
' ------------------------------------ FANUC ------------------------------------
|
||||||
|
' eventuale scrittura di linea di comando MDI
|
||||||
|
If Not String.IsNullOrEmpty(CmdString) Then
|
||||||
|
' attivo mpdalità MDI
|
||||||
|
m_CN.DGeneralFunctions_WriteCncMode(2)
|
||||||
|
System.Threading.Thread.Sleep(100)
|
||||||
|
' salvo la stringa di comando ricevuta dal file lua
|
||||||
|
m_CN.sz_ManualDataInput = CmdString
|
||||||
|
' esguo la funzione che ha il compito di scrivere il comando MDI
|
||||||
|
m_CN.MDI_command()
|
||||||
|
End If
|
||||||
|
' attivo modalità AUTO
|
||||||
|
m_CN.DGeneralFunctions_WriteCncMode(7)
|
||||||
|
System.Threading.Thread.Sleep(100)
|
||||||
|
If String.IsNullOrEmpty(EValue) Then
|
||||||
|
' EActive: impulsivo "D#####"
|
||||||
|
m_CN.NC_pulse_bit(ENumber)
|
||||||
|
EgtOutLog("Fanuc_DNumber= " & ENumber)
|
||||||
|
Else
|
||||||
|
' EActive + EValue: scrittura comando invariabile Short oppure Bit
|
||||||
|
If ENumber.Contains(".") Then
|
||||||
|
' D#####.#
|
||||||
|
Dim bEValue As Boolean
|
||||||
|
If EValue.Trim = "1" Then bEValue = True
|
||||||
|
m_CN.NC_write_var_bit(ENumber, CBool(EValue))
|
||||||
|
Else
|
||||||
|
' D#####
|
||||||
|
m_CN.NC_write_var_short(ENumber, CShort(EValue))
|
||||||
|
End If
|
||||||
|
EgtOutLog("Fanuc_DNumber= " & ENumber & " DValue= " & EValue)
|
||||||
|
End If
|
||||||
|
' eventale caricamento seconda variabile
|
||||||
|
If String.IsNullOrEmpty(EValue2) Then
|
||||||
|
' EActive: impulsivo "D#####"
|
||||||
|
m_CN.NC_pulse_bit(ENumber2)
|
||||||
|
EgtOutLog("Fanuc_DNumber= " & ENumber2)
|
||||||
|
Else
|
||||||
|
' EActive + EValue: scrittura comando invariabile Short oppure Bit
|
||||||
|
If ENumber2.Contains(".") Then
|
||||||
|
' D#####.#
|
||||||
|
Dim bEValue2 As Boolean
|
||||||
|
If EValue2.Trim = "1" Then bEValue2 = True
|
||||||
|
m_CN.NC_write_var_bit(ENumber2, CBool(EValue2))
|
||||||
|
Else
|
||||||
|
' D#####
|
||||||
|
m_CN.NC_write_var_short(ENumber2, CShort(EValue2))
|
||||||
|
End If
|
||||||
|
EgtOutLog("Fanuc_DNumber2= " & ENumber2 & " DValue2= " & EValue2)
|
||||||
|
End If
|
||||||
|
Return
|
||||||
End Select
|
End Select
|
||||||
End If
|
End If
|
||||||
'--------------------------------------------------------- MDI ---------------------------------------------------------
|
'--------------------------------------------------------- MDI ---------------------------------------------------------
|
||||||
Dim nResult As Short
|
Dim nResult As Short
|
||||||
' assegno la modalità di funzionamento
|
' assegno la modalità di funzionamento
|
||||||
Select Case m_MainWindow.m_CNCommunication.m_nNCType
|
Select Case m_MainWindow.m_CNCommunication.m_nNCType
|
||||||
Case 1, 2
|
Case 1, 2, 4
|
||||||
nResult = m_CN.DGeneralFunctions_WriteCncMode(2) ' Modalità MDI per controlli num
|
nResult = m_CN.DGeneralFunctions_WriteCncMode(2) ' Modalità MDI per controlli num
|
||||||
Case 3
|
Case 3
|
||||||
'Per il siemens non devo fare nulla
|
'Per il siemens non devo fare nulla
|
||||||
@@ -599,7 +704,7 @@ Public MustInherit Class MachineButton
|
|||||||
m_CN.DGeneralFunctions_CycleStart()
|
m_CN.DGeneralFunctions_CycleStart()
|
||||||
End If
|
End If
|
||||||
System.Threading.Thread.Sleep(300)
|
System.Threading.Thread.Sleep(300)
|
||||||
' riprostino la modalità manuale
|
' ripristino la modalità manuale..?? siucuri ??
|
||||||
nResult = m_CN.DGeneralFunctions_WriteCncMode(7) ' Modalità manuale
|
nResult = m_CN.DGeneralFunctions_WriteCncMode(7) ' Modalità manuale
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -620,6 +725,7 @@ Public MustInherit Class MachineButton
|
|||||||
EgtTdbGetCurrToolParam(MCH_TP.FEED, dFeed)
|
EgtTdbGetCurrToolParam(MCH_TP.FEED, dFeed)
|
||||||
End If
|
End If
|
||||||
EgtLuaSetGlobNumVar("CMD.F", dFeed)
|
EgtLuaSetGlobNumVar("CMD.F", dFeed)
|
||||||
|
|
||||||
Dim dSpeed As Double = 0
|
Dim dSpeed As Double = 0
|
||||||
If Not String.IsNullOrWhiteSpace(m_DirectCutPage.m_ManualAxesMove.SpeedTxBx.Text) Then
|
If Not String.IsNullOrWhiteSpace(m_DirectCutPage.m_ManualAxesMove.SpeedTxBx.Text) Then
|
||||||
StringToDouble(m_DirectCutPage.m_ManualAxesMove.SpeedTxBx.Text, dSpeed)
|
StringToDouble(m_DirectCutPage.m_ManualAxesMove.SpeedTxBx.Text, dSpeed)
|
||||||
@@ -628,6 +734,18 @@ Public MustInherit Class MachineButton
|
|||||||
EgtTdbGetCurrToolParam(MCH_TP.SPEED, dSpeed)
|
EgtTdbGetCurrToolParam(MCH_TP.SPEED, dSpeed)
|
||||||
End If
|
End If
|
||||||
EgtLuaSetGlobNumVar("CMD.S", dSpeed)
|
EgtLuaSetGlobNumVar("CMD.S", dSpeed)
|
||||||
|
|
||||||
|
' versione 2.5e1
|
||||||
|
EgtTdbSetCurrTool(m_MainWindow.m_CurrentProjectPageUC.ToolTxBx.Text)
|
||||||
|
Dim sToolPos As String = String.Empty
|
||||||
|
If EgtTdbGetCurrToolParam(MCH_TP.TCPOS, sToolPos) Then
|
||||||
|
EgtLuaGetGlobStringVar("CMD.TCPOS", sToolPos)
|
||||||
|
End If
|
||||||
|
Dim dToolDiam As Double = 0
|
||||||
|
If EgtTdbGetCurrToolParam(MCH_TP.DIAM, dToolDiam) Then
|
||||||
|
EgtLuaSetGlobNumVar("CMD.DIAM", dToolDiam * 1000)
|
||||||
|
End If
|
||||||
|
|
||||||
Dim dL1, dL2, dL3, dR1, dR2 As Double
|
Dim dL1, dL2, dL3, dR1, dR2 As Double
|
||||||
m_MainWindow.m_CNCommunication.GetAxesPositions(dL1, dL2, dL3, dR1, dR2)
|
m_MainWindow.m_CNCommunication.GetAxesPositions(dL1, dL2, dL3, dR1, dR2)
|
||||||
EgtLuaSetGlobNumVar("CMD.L1", dL1)
|
EgtLuaSetGlobNumVar("CMD.L1", dL1)
|
||||||
@@ -636,8 +754,17 @@ Public MustInherit Class MachineButton
|
|||||||
EgtLuaSetGlobNumVar("CMD.R1", dR1)
|
EgtLuaSetGlobNumVar("CMD.R1", dR1)
|
||||||
EgtLuaSetGlobNumVar("CMD.R2", dR2)
|
EgtLuaSetGlobNumVar("CMD.R2", dR2)
|
||||||
EgtLuaSetGlobBoolVar("CMD.INCHES", m_MainWindow.m_CNCommunication.GetMachineInInches())
|
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")
|
EgtLuaCallFunction("CmdString")
|
||||||
' Leggo variabili
|
|
||||||
|
' Leggo variabili da file Lua
|
||||||
CmdString = String.Empty
|
CmdString = String.Empty
|
||||||
EgtLuaGetGlobStringVar("CMD.CMDSTRING", CmdString)
|
EgtLuaGetGlobStringVar("CMD.CMDSTRING", CmdString)
|
||||||
b2Start = False
|
b2Start = False
|
||||||
@@ -694,11 +821,26 @@ Public Class TwoStateButton
|
|||||||
Set(value As Boolean)
|
Set(value As Boolean)
|
||||||
' accendo il comando, anche se dovrei aspettare di leggere lo stato da PLC
|
' accendo il comando, anche se dovrei aspettare di leggere lo stato da PLC
|
||||||
m_IsChecked = value
|
m_IsChecked = value
|
||||||
|
Dim sLuaScriptFile As String = m_MainWindow.m_CurrentMachine.sMachDir & "\DirectCmd\"
|
||||||
If value Then
|
If value Then
|
||||||
|
sLuaScriptFile &= TLuaScriptName
|
||||||
ExecuteMDICommand(TLuaScriptName)
|
ExecuteMDICommand(TLuaScriptName)
|
||||||
Else
|
Else
|
||||||
|
sLuaScriptFile &= FLuaScriptName
|
||||||
ExecuteMDICommand(FLuaScriptName)
|
ExecuteMDICommand(FLuaScriptName)
|
||||||
End If
|
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 Set
|
||||||
End Property
|
End Property
|
||||||
Friend Sub SetIsChecked(value As Boolean)
|
Friend Sub SetIsChecked(value As Boolean)
|
||||||
@@ -789,6 +931,7 @@ Public Class NoStateButton
|
|||||||
ExecuteMDICommand(TLuaScriptName)
|
ExecuteMDICommand(TLuaScriptName)
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
|
' FANUC, SIEMENS
|
||||||
ExecuteMDICommand(TLuaScriptName)
|
ExecuteMDICommand(TLuaScriptName)
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|||||||
@@ -1,14 +1,14 @@
|
|||||||
<UserControl x:Class="CopyTemplateUC"
|
<UserControl x:Class="CopyTemplateUC"
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
d:DesignHeight="597.3" d:DesignWidth="256">
|
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 -->
|
<!-- Definizione della Grid SingleCut -->
|
||||||
<Grid Name="SingleCutGrid" >
|
<Grid Name="SingleCutGrid" >
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
@@ -35,17 +35,17 @@
|
|||||||
<ColumnDefinition Width="1*"/>
|
<ColumnDefinition Width="1*"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
<Button Name="Point1Btn" Grid.Column="0" Style="{DynamicResource OmagCut_YellowIconButton}">
|
<Button Name="Point1Btn" Grid.Column="0" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||||
<Image Source="{DynamicResource Acquisisci-PImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
<Image Source="{DynamicResource Acquisisci-PImg}" Style="{DynamicResource OmagCut_ArrowButtonIcon}"/>
|
||||||
</Button>
|
</Button>
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
<ComboBox Name="PointModeCmBx" Grid.Row="1" Grid.ColumnSpan="2" Style="{StaticResource OmagCut_ComboBox}"
|
<ComboBox Name="PointModeCmBx" Grid.Row="1" Grid.ColumnSpan="2" Style="{DynamicResource OmagCut_ComboBox}"
|
||||||
Margin="6,0,6,0">
|
Margin="6,0,6,0">
|
||||||
<ComboBox.ItemTemplate>
|
<ComboBox.ItemTemplate>
|
||||||
<DataTemplate>
|
<DataTemplate>
|
||||||
<TextBlock Text="{Binding}" Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
<TextBlock Text="{Binding}" Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
</ComboBox.ItemTemplate>
|
</ComboBox.ItemTemplate>
|
||||||
</ComboBox>
|
</ComboBox>
|
||||||
@@ -56,12 +56,12 @@
|
|||||||
<ColumnDefinition Width="1*"/>
|
<ColumnDefinition Width="1*"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
<ToggleButton Name="LineBtn" Grid.Column="0" Style="{DynamicResource OmagCut_YellowIconToggleButton}">
|
<ToggleButton Name="LineBtn" Grid.Column="0" Style="{DynamicResource OmagCut_YellowIconToggleButton}">
|
||||||
<Image Source="{DynamicResource LineaImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
<Image Source="{DynamicResource LineaImg}" Style="{DynamicResource OmagCut_ArrowButtonIcon}"/>
|
||||||
</ToggleButton>
|
</ToggleButton>
|
||||||
<ToggleButton Name="ArcBtn" Grid.Column="1" Style="{DynamicResource OmagCut_YellowIconToggleButton}">
|
<ToggleButton Name="ArcBtn" Grid.Column="1" Style="{DynamicResource OmagCut_YellowIconToggleButton}">
|
||||||
<Image Source="{DynamicResource ArcoImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
<Image Source="{DynamicResource ArcoImg}" Style="{DynamicResource OmagCut_ArrowButtonIcon}"/>
|
||||||
</ToggleButton>
|
</ToggleButton>
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
@@ -72,21 +72,21 @@
|
|||||||
<ColumnDefinition Width="1*"/>
|
<ColumnDefinition Width="1*"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
<Button Name="RemoveBtn" Grid.Column="0" Grid.Row="3" Grid.RowSpan="2" Style="{DynamicResource OmagCut_GradientBlueIconButton}">
|
<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}"/>
|
<Image Source="{DynamicResource Rimuovi-segmentoImg}" Style="{DynamicResource OmagCut_ArrowButtonIcon}"/>
|
||||||
</Button>
|
</Button>
|
||||||
<Button Name="CloseBtn" Grid.Column="1" Grid.Row="3" Grid.RowSpan="2" Style="{DynamicResource OmagCut_GradientBlueIconButton}">
|
<Button Name="CloseBtn" Grid.Column="1" Grid.Row="3" Grid.RowSpan="2" Style="{DynamicResource OmagCut_GradientBlueIconButton}">
|
||||||
<Image Source="{DynamicResource ChiudiImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
<Image Source="{DynamicResource ChiudiImg}" Style="{DynamicResource 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>
|
</Button>
|
||||||
|
|
||||||
<Button Name="ExitBtn" Grid.Column="2" Grid.Row="10" Style="{DynamicResource OmagCut_YellowIconButton}">
|
</Grid>
|
||||||
<Image Source="{DynamicResource XImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
|
||||||
|
<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>
|
</Button>
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|||||||
@@ -45,18 +45,18 @@ Public Class CopyTemplateUC
|
|||||||
|
|
||||||
Private Sub CopyTemplate_Initialized(sender As Object, e As EventArgs) Handles Me.Initialized
|
Private Sub CopyTemplate_Initialized(sender As Object, e As EventArgs) Handles Me.Initialized
|
||||||
' Creo lista modalità di acquisizione punto
|
' Creo lista modalità di acquisizione punto
|
||||||
m_PointsModeArray(PT_MODE.SAW) = EgtMsg(MSG_DIRECTCUTPAGEUC + 24)
|
m_PointsModeArray(PT_MODE.SAW) = EgtMsg(90224) ' Lama
|
||||||
m_PointsModeArray(PT_MODE.LASER) = EgtMsg(MSG_DIRECTCUTPAGEUC + 12)
|
m_PointsModeArray(PT_MODE.LASER) = EgtMsg(90212) ' Laser
|
||||||
m_PointsModeArray(PT_MODE.DRAW) = EgtMsg(MSG_DIRECTCUTPAGEUC + 25)
|
m_PointsModeArray(PT_MODE.DRAW) = EgtMsg(90225) ' Disegno
|
||||||
' la associo alla combobox
|
' la associo alla combobox
|
||||||
PointModeCmBx.ItemsSource = m_PointsModeArray
|
PointModeCmBx.ItemsSource = m_PointsModeArray
|
||||||
|
|
||||||
Point1Btn.ToolTip = EgtMsg(MSG_DIRECTCUTPAGEUC + 10)
|
Point1Btn.ToolTip = EgtMsg(90210) ' Acquisisci P1
|
||||||
LineBtn.ToolTip = EgtMsg(MSG_DIRECTCUTPAGEUC + 50)
|
LineBtn.ToolTip = EgtMsg(90250) ' Linea
|
||||||
ArcBtn.ToolTip = EgtMsg(MSG_DIRECTCUTPAGEUC + 51)
|
ArcBtn.ToolTip = EgtMsg(90251) ' Arco
|
||||||
RemoveBtn.ToolTip = EgtMsg(MSG_DIRECTCUTPAGEUC + 52)
|
RemoveBtn.ToolTip = EgtMsg(90252) ' Rimuovi
|
||||||
CloseBtn.ToolTip = EgtMsg(MSG_DIRECTCUTPAGEUC + 53)
|
CloseBtn.ToolTip = EgtMsg(90253) ' Chiudi
|
||||||
SaveBtn.ToolTip = EgtMsg(MSG_DIRECTCUTPAGEUC + 54)
|
SaveBtn.ToolTip = EgtMsg(90254) ' Salva
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub CopyTemplate_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded
|
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
|
Private Sub Point1Btn_Click(sender As Object, e As RoutedEventArgs) Handles Point1Btn.Click
|
||||||
' Verifico configurazione tavola e grezzo
|
' Verifico configurazione tavola e grezzo
|
||||||
If Not m_bTabOk Then Return
|
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
|
' Se acquisizione lama o laser
|
||||||
If PointModeCmBx.SelectedIndex = PT_MODE.SAW Or PointModeCmBx.SelectedIndex = PT_MODE.LASER Then
|
If PointModeCmBx.SelectedIndex = PT_MODE.SAW Or PointModeCmBx.SelectedIndex = PT_MODE.LASER Then
|
||||||
' Recupero la posizione macchina
|
' Recupero la posizione macchina
|
||||||
@@ -173,14 +182,19 @@ Public Class CopyTemplateUC
|
|||||||
If Not m_MainWindow.m_CNCommunication.GetAxesPositions(dL1, dL2, dL3, dR1, dR2) Then
|
If Not m_MainWindow.m_CNCommunication.GetAxesPositions(dL1, dL2, dL3, dR1, dR2) Then
|
||||||
Return
|
Return
|
||||||
End If
|
End If
|
||||||
' Ricavo dati lama corrente
|
' Se macchina multicut il primo asse rotante restituito è quello della tavola
|
||||||
Dim sSaw As String = m_MainWindow.m_CurrentMachine.sCurrSaw
|
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
|
' Se punto da laser
|
||||||
If PointModeCmBx.SelectedIndex = PT_MODE.LASER Then
|
If PointModeCmBx.SelectedIndex = PT_MODE.LASER Then
|
||||||
' Imposto come testa corrente il laser (senza utensile ovviamente)
|
' Imposto come testa corrente il laser (senza utensile ovviamente)
|
||||||
If Not EgtSetCalcTool("", "H3", 1) Then Return
|
If Not EgtSetCalcTool("", "H3", 1) Then Return
|
||||||
' Trasformo in posizione punta utensile in basso
|
' 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
|
' Ora imposto la lama corrente
|
||||||
If Not EgtSetCalcTool(sSaw, "H1", 1) Then Return
|
If Not EgtSetCalcTool(sSaw, "H1", 1) Then Return
|
||||||
' Altrimenti da lama
|
' Altrimenti da lama
|
||||||
@@ -188,7 +202,7 @@ Public Class CopyTemplateUC
|
|||||||
' Imposto la lama corrente
|
' Imposto la lama corrente
|
||||||
If Not EgtSetCalcTool(sSaw, "H1", 1) Then Return
|
If Not EgtSetCalcTool(sSaw, "H1", 1) Then Return
|
||||||
' Trasformo in posizione punta utensile in basso
|
' 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
|
End If
|
||||||
' Porto il tip nell'origine tavola
|
' Porto il tip nell'origine tavola
|
||||||
m_ptTipP1.ToLoc(New Frame3d(m_ptTabOri))
|
m_ptTipP1.ToLoc(New Frame3d(m_ptTabOri))
|
||||||
@@ -196,8 +210,6 @@ Public Class CopyTemplateUC
|
|||||||
Else
|
Else
|
||||||
' Verifico presenza punto da mouse
|
' Verifico presenza punto da mouse
|
||||||
If Not m_bMouseOk Then Return
|
If Not m_bMouseOk Then Return
|
||||||
' Ricavo dati lama corrente
|
|
||||||
Dim sSaw As String = m_MainWindow.m_CurrentMachine.sCurrSaw
|
|
||||||
' Imposto la lama corrente
|
' Imposto la lama corrente
|
||||||
If Not EgtSetCalcTool(sSaw, "H1", 1) Then Return
|
If Not EgtSetCalcTool(sSaw, "H1", 1) Then Return
|
||||||
' Assegno punto selezionato nel disegno a m_ptTipP1
|
' 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"
|
<UserControl x:Class="DirectCutPageUC"
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d" d:DesignHeight="853.3" d:DesignWidth="1280">
|
||||||
d:DesignHeight="853.3" d:DesignWidth="1280">
|
|
||||||
|
|
||||||
<!-- Definizione della DirectCutPage -->
|
<!-- Definizione della DirectCutPage -->
|
||||||
<Grid Name="DirectCutPageGrid" >
|
<Grid Name="DirectCutPageGrid" >
|
||||||
@@ -29,15 +28,15 @@
|
|||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
<Button Name="PhotoBtn" Grid.Column="0" Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}">
|
<Button Name="PhotoBtn" Grid.Column="0" Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}">
|
||||||
<Image Source="{DynamicResource PhotoImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
<Image Source="{DynamicResource PhotoImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||||
</Button>
|
</Button>
|
||||||
<Button Name="RawPartBtn" Grid.Column="1" Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}">
|
<Button Name="RawPartBtn" Grid.Column="1" Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}">
|
||||||
<Image Source="{DynamicResource RawPartImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
<Image Source="{DynamicResource RawPartImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||||
</Button>
|
</Button>
|
||||||
|
|
||||||
<Button Name="MachViewModeBtn" Grid.Column="3"
|
<Button Name="MachViewModeBtn" Grid.Column="3"
|
||||||
Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}">
|
Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}">
|
||||||
<Image Source="{DynamicResource MHTImg}" Style="{StaticResource OmagCut_ScaleButtonIcon}"/>
|
<Image Source="{DynamicResource MHTImg}" Style="{DynamicResource OmagCut_ScaleButtonIcon}"/>
|
||||||
</Button>
|
</Button>
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
@@ -219,37 +218,40 @@
|
|||||||
<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*"/>
|
||||||
|
<ColumnDefinition Width="1*"/>
|
||||||
<!--<ColumnDefinition Width="1*"/>-->
|
<!--<ColumnDefinition Width="1*"/>-->
|
||||||
<ColumnDefinition Width="1*"/>
|
<ColumnDefinition Width="1*"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
<ToggleButton Name="ControlsMachineBtn" Grid.Column="0"
|
<ToggleButton Name="ControlsMachineBtn" Grid.Column="0"
|
||||||
Style="{DynamicResource OmagCut_GradientYellowIconToggleButton}">
|
Style="{DynamicResource OmagCut_GradientYellowIconToggleButton}">
|
||||||
<Image Source="{DynamicResource ManualImg}" Style="{StaticResource OmagCut_ScaleButtonIcon}"/>
|
<Image Source="{DynamicResource ManualImg}" Style="{DynamicResource OmagCut_ScaleButtonIcon}"/>
|
||||||
</ToggleButton>
|
</ToggleButton>
|
||||||
|
|
||||||
<ToggleButton Name="VacuumMachineBtn" Grid.Column="1"
|
<ToggleButton Name="VacuumMachineBtn" Grid.Column="1"
|
||||||
Style="{DynamicResource OmagCut_GradientYellowIconToggleButton}">
|
Style="{DynamicResource OmagCut_GradientYellowIconToggleButton}">
|
||||||
<Image Source="{DynamicResource VacuumImg}" Style="{StaticResource OmagCut_ScaleButtonIcon}"/>
|
<Image Source="{DynamicResource VacuumImg}" Style="{DynamicResource OmagCut_ScaleButtonIcon}"/>
|
||||||
</ToggleButton>
|
</ToggleButton>
|
||||||
|
|
||||||
<!--Comando asse X-Y-->
|
<!--Comando asse X-Y-->
|
||||||
<ToggleButton Name="XYBtn" Grid.Column="2"
|
<ToggleButton Name="XYBtn" Grid.Column="2"
|
||||||
Style="{DynamicResource OmagCut_GradientYellowIconToggleButton}">
|
Style="{DynamicResource OmagCut_GradientYellowIconToggleButton}">
|
||||||
<Image Source="{DynamicResource XYJogImg}" Style="{StaticResource OmagCut_ScaleButtonIcon}"/>
|
<Image Source="{DynamicResource XYJogImg}" Style="{DynamicResource OmagCut_ScaleButtonIcon}"/>
|
||||||
</ToggleButton>
|
</ToggleButton>
|
||||||
|
|
||||||
<!--Comando asse Z-C-->
|
<!--Comando asse Z-C-->
|
||||||
<ToggleButton Name="ZCBtn" Grid.Column="3"
|
<ToggleButton Name="ZCBtn" Grid.Column="3"
|
||||||
Style="{DynamicResource OmagCut_GradientYellowIconToggleButton}">
|
Style="{DynamicResource OmagCut_GradientYellowIconToggleButton}">
|
||||||
<Image Source="{DynamicResource ZCJogImg}" Style="{StaticResource OmagCut_ScaleButtonIcon}"/>
|
<Image Source="{DynamicResource ZCJogImg}" Style="{DynamicResource OmagCut_ScaleButtonIcon}"/>
|
||||||
</ToggleButton>
|
</ToggleButton>
|
||||||
|
|
||||||
<!--Comando asse Z-B-->
|
<!--Comando asse Z-B-->
|
||||||
<ToggleButton Name="ZBBtn" Grid.Column="4"
|
<ToggleButton Name="ZBBtn" Grid.Column="4"
|
||||||
Style="{DynamicResource OmagCut_GradientYellowIconToggleButton}">
|
Style="{DynamicResource OmagCut_GradientYellowIconToggleButton}">
|
||||||
<Image Source="{DynamicResource ZBJogImg}" Style="{StaticResource OmagCut_ScaleButtonIcon}"/>
|
<Image Source="{DynamicResource ZBJogImg}" Style="{DynamicResource OmagCut_ScaleButtonIcon}"/>
|
||||||
</ToggleButton>
|
</ToggleButton>
|
||||||
|
|
||||||
<!--Comando Remote-->
|
<!--Comando Remote-->
|
||||||
@@ -261,13 +263,15 @@
|
|||||||
<!--Parking-->
|
<!--Parking-->
|
||||||
<ToggleButton Name="ParkingBtn" Grid.Column="6"
|
<ToggleButton Name="ParkingBtn" Grid.Column="6"
|
||||||
Style="{DynamicResource OmagCut_GradientYellowIconToggleButton}">
|
Style="{DynamicResource OmagCut_GradientYellowIconToggleButton}">
|
||||||
<Image Source="{DynamicResource ParkingImg}" Style="{StaticResource OmagCut_ScaleButtonIcon}"/>
|
<Image Source="{DynamicResource ParkingImg}" Style="{DynamicResource OmagCut_ScaleButtonIcon}"/>
|
||||||
</ToggleButton>
|
</ToggleButton>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!--Comando Manula/MDI-->
|
<!--Comando Manula/MDI-->
|
||||||
<Button Name="ManualModeBtn" Grid.Column="8"
|
<Button Name="ManualModeBtn" Grid.Column="11"
|
||||||
Style="{DynamicResource OmagCut_YellowGradientYellowIconButton}">
|
Style="{DynamicResource OmagCut_YellowGradientYellowIconButton}">
|
||||||
<Image Source="{DynamicResource ManualImg}" Style="{StaticResource OmagCut_ScaleButtonIcon}"/>
|
<Image Source="{DynamicResource ManualImg}" Style="{DynamicResource OmagCut_ScaleButtonIcon}"/>
|
||||||
</Button>
|
</Button>
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
Imports EgtUILib
|
Imports EgtUILib
|
||||||
Imports EgtWPFLib
|
|
||||||
|
|
||||||
Public Class DirectCutPageUC
|
Public Class DirectCutPageUC
|
||||||
|
|
||||||
@@ -53,7 +52,7 @@ Public Class DirectCutPageUC
|
|||||||
|
|
||||||
'Posizionemento nella griglia delle Page UserControl
|
'Posizionemento nella griglia delle Page UserControl
|
||||||
m_MachineButtons.SetValue(Grid.RowProperty, 2)
|
m_MachineButtons.SetValue(Grid.RowProperty, 2)
|
||||||
m_MachineButtons.SetValue(Grid.ColumnSpanProperty, 7)
|
m_MachineButtons.SetValue(Grid.ColumnSpanProperty, m_MachineButtons.nCountButton)
|
||||||
m_ManualAxesMove.SetValue(Grid.RowProperty, 1)
|
m_ManualAxesMove.SetValue(Grid.RowProperty, 1)
|
||||||
|
|
||||||
m_ControlsDirectCutUC.SetValue(Grid.RowProperty, 1)
|
m_ControlsDirectCutUC.SetValue(Grid.RowProperty, 1)
|
||||||
@@ -64,12 +63,18 @@ Public Class DirectCutPageUC
|
|||||||
' verifico che sia presente almeno uno dei bottoni della nuova console (SOLO PER MACCHINA CON paragrafo [ControlMachButtons])
|
' verifico che sia presente almeno uno dei bottoni della nuova console (SOLO PER MACCHINA CON paragrafo [ControlMachButtons])
|
||||||
Dim bCollapsedNewBottonsConsole As Boolean = Not m_ControlsMachineButton.GetPrivateProfileMachineButtons("JogButtons", "Button1", Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, m_MainWindow.GetMachIniFile())
|
Dim bCollapsedNewBottonsConsole As Boolean = Not m_ControlsMachineButton.GetPrivateProfileMachineButtons("JogButtons", "Button1", Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, m_MainWindow.GetMachIniFile())
|
||||||
m_NewMachineButtonsType = m_ControlsMachineButton.GetPrivateProfileMachineButtons(S_CONTROLMACHBUTTONS, "Button1", Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, m_MainWindow.GetMachIniFile())
|
m_NewMachineButtonsType = m_ControlsMachineButton.GetPrivateProfileMachineButtons(S_CONTROLMACHBUTTONS, "Button1", Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, m_MainWindow.GetMachIniFile())
|
||||||
|
' verifico che sia presente almeno uno dei bottoni della nuova console (SOLO PER MACCHINA CON paragrafo [VacuumMachButtons])
|
||||||
|
Dim bCollapsedVacuumButton As Boolean = Not m_ControlsMachineButton.GetPrivateProfileMachineButtons(S_VACUUMMACHBUTTONS, "Button1", Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, m_MainWindow.GetMachIniFile())
|
||||||
If Not m_NewMachineButtonsType Then
|
If Not m_NewMachineButtonsType Then
|
||||||
'Assegno MachineButtons alla pagina
|
'Assegno MachineButtons alla pagina
|
||||||
LowerButtonGrid.Children.Add(m_MachineButtons)
|
LowerButtonGrid.Children.Add(m_MachineButtons)
|
||||||
ControlsMachineBtn.Visibility = Windows.Visibility.Collapsed
|
ControlsMachineBtn.Visibility = Windows.Visibility.Collapsed
|
||||||
VacuumMachineBtn.Visibility = Windows.Visibility.Collapsed
|
VacuumMachineBtn.Visibility = Windows.Visibility.Collapsed
|
||||||
End If
|
End If
|
||||||
|
' se non sono configurate le ventose allora nascondo il comando
|
||||||
|
If m_NewMachineButtonsType AndAlso bCollapsedVacuumButton Then
|
||||||
|
VacuumMachineBtn.Visibility = Windows.Visibility.Collapsed
|
||||||
|
End If
|
||||||
|
|
||||||
' nuovi bottoni 20/05/2021 - modifica specifiche 04/08/2021
|
' nuovi bottoni 20/05/2021 - modifica specifiche 04/08/2021
|
||||||
' leggo il numero di assi attivi nella macchina
|
' leggo il numero di assi attivi nella macchina
|
||||||
@@ -140,6 +145,9 @@ Public Class DirectCutPageUC
|
|||||||
If Not String.IsNullOrEmpty(sCurrSaw) And Not String.IsNullOrEmpty(sCurrSawing) Then
|
If Not String.IsNullOrEmpty(sCurrSaw) And Not String.IsNullOrEmpty(sCurrSawing) Then
|
||||||
bSaw = EgtSetCalcTool(sCurrSaw, "H1", 1)
|
bSaw = EgtSetCalcTool(sCurrSaw, "H1", 1)
|
||||||
End If
|
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_SingleCut.SetEnableParam(bSaw)
|
||||||
m_ControlsDirectCutUC.m_MultipleCut.SetEnableParam(bSaw)
|
m_ControlsDirectCutUC.m_MultipleCut.SetEnableParam(bSaw)
|
||||||
m_ControlsDirectCutUC.m_GridCut.SetEnableParam(bSaw)
|
m_ControlsDirectCutUC.m_GridCut.SetEnableParam(bSaw)
|
||||||
@@ -170,11 +178,11 @@ Public Class DirectCutPageUC
|
|||||||
Case K_REMOTE
|
Case K_REMOTE
|
||||||
RemoteBtn.Visibility = Visibility.Visible
|
RemoteBtn.Visibility = Visibility.Visible
|
||||||
RemoteBtn.Foreground = Brushes.White
|
RemoteBtn.Foreground = Brushes.White
|
||||||
RemoteBtn.Content = "Remote"
|
RemoteBtn.Content = EgtMsg(90262) 'Remote
|
||||||
Case K_PARKING
|
Case K_PARKING
|
||||||
ParkingBtn.Visibility = Visibility.Visible
|
ParkingBtn.Visibility = Visibility.Visible
|
||||||
ParkingBtn.Foreground = Brushes.White
|
ParkingBtn.Foreground = Brushes.White
|
||||||
ParkingBtn.ToolTip = "Parking"
|
ParkingBtn.ToolTip = EgtMsg(90263) 'Parking
|
||||||
End Select
|
End Select
|
||||||
Next
|
Next
|
||||||
End Sub
|
End Sub
|
||||||
@@ -209,6 +217,7 @@ Public Class DirectCutPageUC
|
|||||||
m_ControlsMachineButton.SetValue(Grid.RowProperty, 1)
|
m_ControlsMachineButton.SetValue(Grid.RowProperty, 1)
|
||||||
m_NewMachineButtonsType = m_ControlsMachineButton.GetPrivateProfileMachineButtons(S_CONTROLMACHBUTTONS, "Button1", Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, m_MainWindow.GetMachIniFile())
|
m_NewMachineButtonsType = m_ControlsMachineButton.GetPrivateProfileMachineButtons(S_CONTROLMACHBUTTONS, "Button1", Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, m_MainWindow.GetMachIniFile())
|
||||||
MachineButtonGrid.Children.Add(m_ControlsMachineButton)
|
MachineButtonGrid.Children.Add(m_ControlsMachineButton)
|
||||||
|
m_ActiveControl = Controls.MachineButtonUC
|
||||||
If VacuumMachineBtn.IsChecked Then
|
If VacuumMachineBtn.IsChecked Then
|
||||||
MachineButtonGrid.Children.Remove(m_VacuumMachineButton)
|
MachineButtonGrid.Children.Remove(m_VacuumMachineButton)
|
||||||
VacuumMachineBtn.IsChecked = False
|
VacuumMachineBtn.IsChecked = False
|
||||||
@@ -221,6 +230,7 @@ Public Class DirectCutPageUC
|
|||||||
Private Sub VacuumMachineBtn_Click(sender As Object, e As RoutedEventArgs) Handles VacuumMachineBtn.Click
|
Private Sub VacuumMachineBtn_Click(sender As Object, e As RoutedEventArgs) Handles VacuumMachineBtn.Click
|
||||||
If VacuumMachineBtn.IsChecked Then
|
If VacuumMachineBtn.IsChecked Then
|
||||||
MachineButtonGrid.Children.Add(m_VacuumMachineButton)
|
MachineButtonGrid.Children.Add(m_VacuumMachineButton)
|
||||||
|
m_ActiveControl = Controls.VacuumButtonUC
|
||||||
If ControlsMachineBtn.IsChecked Then
|
If ControlsMachineBtn.IsChecked Then
|
||||||
MachineButtonGrid.Children.Remove(m_ControlsMachineButton)
|
MachineButtonGrid.Children.Remove(m_ControlsMachineButton)
|
||||||
ControlsMachineBtn.IsChecked = False
|
ControlsMachineBtn.IsChecked = False
|
||||||
@@ -417,12 +427,14 @@ Public Class DirectCutPageUC
|
|||||||
If m_bShowMachine Then
|
If m_bShowMachine Then
|
||||||
' aggiorno lo stato
|
' aggiorno lo stato
|
||||||
Select Case m_nMachLook
|
Select Case m_nMachLook
|
||||||
Case MCH_LOOK.ALL
|
Case MCH_LOOK.ALL
|
||||||
m_nMachLook = MCH_LOOK.TAB_HEAD
|
m_nMachLook = MCH_LOOK.TAB_HEAD
|
||||||
Case MCH_LOOK.TAB_HEAD
|
Case MCH_LOOK.TAB_HEAD
|
||||||
m_nMachLook = MCH_LOOK.TAB_TOOL
|
m_nMachLook = MCH_LOOK.TAB_TOOL
|
||||||
Case Else
|
Case MCH_LOOK.TAB_TOOL
|
||||||
m_nMachLook = MCH_LOOK.ALL
|
m_nMachLook = MCH_LOOK.TAB
|
||||||
|
Case Else
|
||||||
|
m_nMachLook = MCH_LOOK.ALL
|
||||||
End Select
|
End Select
|
||||||
' aggiorno lo stato della macchina e la sua visualizzazione
|
' aggiorno lo stato della macchina e la sua visualizzazione
|
||||||
EgtSetMachineLook(m_nMachLook)
|
EgtSetMachineLook(m_nMachLook)
|
||||||
@@ -444,8 +456,12 @@ Public Class DirectCutPageUC
|
|||||||
m_ControlsDirectCutUC1.DirectCutPage_Unloaded(Nothing, Nothing)
|
m_ControlsDirectCutUC1.DirectCutPage_Unloaded(Nothing, Nothing)
|
||||||
Case Controls.MachineButtonUC
|
Case Controls.MachineButtonUC
|
||||||
MachineButtonGrid.Children.Remove(m_ControlsMachineButton)
|
MachineButtonGrid.Children.Remove(m_ControlsMachineButton)
|
||||||
|
MachineButtonGrid.Children.Remove(m_ControlsDirectCutUC)
|
||||||
|
MachineButtonGrid.Children.Remove(m_ControlsDirectCutUC1)
|
||||||
ControlsMachineBtn.IsChecked = False
|
ControlsMachineBtn.IsChecked = False
|
||||||
Case Controls.VacuumButtonUC
|
Case Controls.VacuumButtonUC
|
||||||
|
MachineButtonGrid.Children.Remove(m_ControlsMachineButton)
|
||||||
|
MachineButtonGrid.Children.Remove(m_ControlsDirectCutUC)
|
||||||
MachineButtonGrid.Children.Remove(m_VacuumMachineButton)
|
MachineButtonGrid.Children.Remove(m_VacuumMachineButton)
|
||||||
VacuumMachineBtn.IsChecked = False
|
VacuumMachineBtn.IsChecked = False
|
||||||
End Select
|
End Select
|
||||||
@@ -465,7 +481,7 @@ Public Class DirectCutPageUC
|
|||||||
|
|
||||||
Private Sub ManualModeBtn_Click(sender As Object, e As RoutedEventArgs) Handles ManualModeBtn.Click
|
Private Sub ManualModeBtn_Click(sender As Object, e As RoutedEventArgs) Handles ManualModeBtn.Click
|
||||||
' Imposto modalità manuale della macchina
|
' 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
|
End Sub
|
||||||
|
|
||||||
|
|||||||
+144
-99
@@ -1,11 +1,10 @@
|
|||||||
<UserControl x:Class="FlatteningCut"
|
<UserControl x:Class="FlatteningCut"
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
|
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d" d:DesignHeight="597.3" d:DesignWidth="256">
|
||||||
d:DesignHeight="597.3" d:DesignWidth="256">
|
|
||||||
|
|
||||||
<!--<Border CornerRadius="{StaticResource Page_CornerRadius}" Background="{DynamicResource OmagCut_LightGray}">-->
|
<!--<Border CornerRadius="{StaticResource Page_CornerRadius}" Background="{DynamicResource OmagCut_LightGray}">-->
|
||||||
<Border Style="{DynamicResource OmagCut_DirectCutPageBorder}">
|
<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="0.5*"/>
|
||||||
<RowDefinition Height="0.5*"/>
|
<RowDefinition Height="0.5*"/>
|
||||||
<RowDefinition Height="1*"/>
|
<RowDefinition Height="1*"/>
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
@@ -38,90 +37,136 @@
|
|||||||
<ColumnDefinition Width="1*"/>
|
<ColumnDefinition Width="1*"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
<ToggleButton Name="Point1Btn" Grid.Column="0"
|
<ToggleButton Name="Point1Btn" Grid.Column="0"
|
||||||
Style="{DynamicResource OmagCut_YellowIconToggleButton}">
|
Style="{DynamicResource OmagCut_YellowIconToggleButton}">
|
||||||
<Image Source="{DynamicResource Acquisisci-P1Img}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
<Image Source="{DynamicResource Acquisisci-P1Img}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||||
</ToggleButton>
|
</ToggleButton>
|
||||||
|
|
||||||
<ToggleButton Name="Point2Btn" Grid.Column="1"
|
<ToggleButton Name="Point2Btn" Grid.Column="1"
|
||||||
Style="{DynamicResource OmagCut_YellowIconToggleButton}">
|
Style="{DynamicResource OmagCut_YellowIconToggleButton}">
|
||||||
<Image Source="{DynamicResource Acquisisci-P2Img}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
<Image Source="{DynamicResource Acquisisci-P2Img}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||||
</ToggleButton>
|
</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>
|
</Grid>
|
||||||
|
</ScrollViewer>
|
||||||
<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>
|
|
||||||
|
|
||||||
<Grid Grid.Row="12" Grid.ColumnSpan="2">
|
<Grid Grid.Row="12" Grid.ColumnSpan="2">
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
@@ -130,16 +175,16 @@
|
|||||||
<ColumnDefinition Width="1*"/>
|
<ColumnDefinition Width="1*"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
<Button Name="SimulBtn" Grid.Column="0" Style="{DynamicResource OmagCut_YellowIconButton}">
|
<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>
|
||||||
<Button Name="OkBtn" Grid.Column="1" Style="{DynamicResource OmagCut_YellowIconButton}">
|
<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>
|
||||||
<Button Name="ExitBtn" Grid.Column="2" Style="{DynamicResource OmagCut_YellowIconButton}">
|
<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>
|
</Button>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
Imports EgtUILib
|
Imports EgtUILib
|
||||||
|
Imports EgtUILib.EgtInterface
|
||||||
|
Imports OmagCUT.MainWindow
|
||||||
|
|
||||||
Public Class FlatteningCut
|
Public Class FlatteningCut
|
||||||
|
|
||||||
@@ -9,6 +11,8 @@ Public Class FlatteningCut
|
|||||||
Private m_bActive As Boolean = False
|
Private m_bActive As Boolean = False
|
||||||
' Flag di simulazione in corso
|
' Flag di simulazione in corso
|
||||||
Private m_bSimul As Boolean = False
|
Private m_bSimul As Boolean = False
|
||||||
|
' Definizione del taglio diretto di questa pagina
|
||||||
|
Private Const FLATTENING As String = "Flattening"
|
||||||
|
|
||||||
' Origine tavola e dati grezzo
|
' Origine tavola e dati grezzo
|
||||||
Private m_bRawOk As Boolean = False
|
Private m_bRawOk As Boolean = False
|
||||||
@@ -35,14 +39,18 @@ Public Class FlatteningCut
|
|||||||
Private m_bHeadSide As Boolean = False
|
Private m_bHeadSide As Boolean = False
|
||||||
Private m_nMachType As Integer = 1
|
Private m_nMachType As Integer = 1
|
||||||
Private m_bRotLock As Boolean = False
|
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
|
' Array delle modalità di acquisizione dei punti
|
||||||
Private m_PointsModeArray(2) As String
|
Private m_PointsModeArray(2) As String
|
||||||
' Array delle tipologia di lavorazione della spianatura
|
' Array delle tipologia di lavorazione della spianatura
|
||||||
Private m_TypeArray(1) As String
|
Private m_TypeArray(2) As String
|
||||||
' Punto selezionato nel disegno
|
' Punto selezionato nel disegno
|
||||||
Private m_ptPrev As Point3d
|
Private m_ptPrev As Point3d
|
||||||
' Layer per crocette temporanee
|
' Layer per crocette temporanee
|
||||||
Private m_nTempLay As Integer = GDB_ID.NULL
|
Private m_nTempLay As Integer = GDB_ID.NULL
|
||||||
|
' Array degliutensili disponibili (lama e fresa)
|
||||||
|
Private m_ToolsArray(1) As String
|
||||||
|
|
||||||
' Costanti
|
' Costanti
|
||||||
Private Const MAX_TAB_DEPTH As Double = 10.0
|
Private Const MAX_TAB_DEPTH As Double = 10.0
|
||||||
@@ -57,8 +65,9 @@ Public Class FlatteningCut
|
|||||||
End Enum
|
End Enum
|
||||||
' Costanti che indicano la tipologia di lavorazione della spianatura
|
' Costanti che indicano la tipologia di lavorazione della spianatura
|
||||||
Private Enum MACH_TYPE As Integer
|
Private Enum MACH_TYPE As Integer
|
||||||
ONEWAY = 0
|
ZIGZAG = 0
|
||||||
ZIGZAG = 1
|
ONEWAY = 1
|
||||||
|
SPIRAL = 2
|
||||||
End Enum
|
End Enum
|
||||||
'Costante che indica il lato in cui posizionare i tagli
|
'Costante che indica il lato in cui posizionare i tagli
|
||||||
Private Enum CutSide As Integer
|
Private Enum CutSide As Integer
|
||||||
@@ -66,43 +75,56 @@ Public Class FlatteningCut
|
|||||||
Right
|
Right
|
||||||
End Enum
|
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)
|
' 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
|
Private Sub FlatteningCut_Initialized(sender As Object, e As EventArgs) Handles Me.Initialized
|
||||||
' Creo lista modalità di acquisizione punto
|
' Creo lista modalità di acquisizione punto
|
||||||
m_PointsModeArray(PT_MODE.SAW) = EgtMsg(MSG_DIRECTCUTPAGEUC + 24)
|
m_PointsModeArray(PT_MODE.SAW) = EgtMsg(90224) ' Lama
|
||||||
m_PointsModeArray(PT_MODE.LASER) = EgtMsg(MSG_DIRECTCUTPAGEUC + 12)
|
m_PointsModeArray(PT_MODE.LASER) = EgtMsg(90212) ' Laser
|
||||||
m_PointsModeArray(PT_MODE.DRAW) = EgtMsg(MSG_DIRECTCUTPAGEUC + 25)
|
m_PointsModeArray(PT_MODE.DRAW) = EgtMsg(90225) ' Disegno
|
||||||
' la associo alla combobox
|
' la associo alla combobox
|
||||||
PointModeCmBx.ItemsSource = m_PointsModeArray
|
PointModeCmBx.ItemsSource = m_PointsModeArray
|
||||||
' Creo lista tipo lavorazione
|
' Creo lista tipo lavorazione
|
||||||
m_TypeArray(MACH_TYPE.ONEWAY) = EgtMsg(MSG_COMBOBOXPARAM + 39)
|
m_TypeArray(MACH_TYPE.ZIGZAG) = EgtMsg(90838) ' ZigZag
|
||||||
m_TypeArray(MACH_TYPE.ZIGZAG) = EgtMsg(MSG_COMBOBOXPARAM + 38)
|
m_TypeArray(MACH_TYPE.ONEWAY) = EgtMsg(90839) ' OneWay
|
||||||
|
m_TypeArray(MACH_TYPE.SPIRAL) = EgtMsg(90851) ' Spirale
|
||||||
' la associo alla combobox
|
' la associo alla combobox
|
||||||
TypeCmBx.ItemsSource = m_TypeArray
|
TypeCmBx.ItemsSource = m_TypeArray
|
||||||
' assegno messaggi
|
' assegno messaggi
|
||||||
Point1Btn.ToolTip = EgtMsg(MSG_DIRECTCUTPAGEUC + 10)
|
Point1Btn.ToolTip = EgtMsg(90210) ' Acquisisci P1
|
||||||
Point2Btn.ToolTip = EgtMsg(MSG_DIRECTCUTPAGEUC + 11)
|
Point2Btn.ToolTip = EgtMsg(90211) ' Acquisisci P2
|
||||||
DepthTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 13)
|
DepthTxBl.Text = EgtMsg(90213) ' Affondamento
|
||||||
LenghtTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 14)
|
LenghtTxBl.Text = EgtMsg(90214) ' Lunghezza
|
||||||
DirectionTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 15)
|
DirectionTxBl.Text = EgtMsg(90215) ' Direzione
|
||||||
WidthTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 26)
|
WidthTxBl.Text = EgtMsg(90226) ' Larghezza
|
||||||
OverlapTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 27)
|
OverlapTxBl.Text = EgtMsg(90227) ' Sovrapposizione
|
||||||
ZReleasedTxBl.Text = "Z Svincolo"
|
ZReleasedTxBl.Text = EgtMsg(91235) ' Z Svincolo
|
||||||
SideTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 23)
|
SideTxBl.Text = EgtMsg(90223) ' Tagli lato motore
|
||||||
RotLockTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 29)
|
RotLockTxBl.Text = EgtMsg(90229) ' Blocca Asse C
|
||||||
SimulBtn.ToolTip = EgtMsg(MSG_CADCUTPAGEUC + 1)
|
ChainedPathTxBl.Text = EgtMsg(91236) ' Chained path
|
||||||
OkBtn.ToolTip = EgtMsg(MSG_DIRECTCUTPAGEUC + 30)
|
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
|
' Carico i dati dell'ultimo taglio
|
||||||
m_dDepth = GetPrivateProfileDouble( S_DIRECTCUTS, K_DC_FLATT_DEPTH, m_dDepth, 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_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_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_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_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_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_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_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_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_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())
|
m_ptTipP1.y = GetPrivateProfileDouble(S_DIRECTCUTS, K_DC_FLATT_POSY, m_ptTipP1.y, m_MainWindow.GetIniFile())
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -125,16 +147,16 @@ Public Class FlatteningCut
|
|||||||
' Disabilito registrazione progetto modificato
|
' Disabilito registrazione progetto modificato
|
||||||
EgtDisableModified()
|
EgtDisableModified()
|
||||||
' Creo layer temporaneo per crocette
|
' Creo layer temporaneo per crocette
|
||||||
m_nTempLay = EgtCreateGroup( GDB_ID.ROOT)
|
m_nTempLay = EgtCreateGroup(GDB_ID.ROOT)
|
||||||
EgtSetLevel( m_nTempLay, GDB_LV.TEMP)
|
EgtSetLevel(m_nTempLay, GDB_LV.TEMP)
|
||||||
' Origine tavola
|
' Origine tavola
|
||||||
m_bRawOk = True
|
m_bRawOk = True
|
||||||
If Not EgtGetTableRef( 1, m_ptTabOri) Then
|
If Not EgtGetTableRef(1, m_ptTabOri) Then
|
||||||
m_bRawOk = False
|
m_bRawOk = False
|
||||||
EgtOutLog("Error on TableRef1")
|
EgtOutLog("Error on TableRef1")
|
||||||
End If
|
End If
|
||||||
' Dati del grezzo
|
' Dati del grezzo
|
||||||
If Not GetRawBox( m_ptRawMin, m_ptRawMax) Then
|
If Not GetRawBox(m_ptRawMin, m_ptRawMax) Then
|
||||||
m_bRawOk = False
|
m_bRawOk = False
|
||||||
EgtOutLog("Error on RawBox")
|
EgtOutLog("Error on RawBox")
|
||||||
End If
|
End If
|
||||||
@@ -142,7 +164,7 @@ Public Class FlatteningCut
|
|||||||
m_bPointP1Ok = False
|
m_bPointP1Ok = False
|
||||||
m_bPointP2Ok = False
|
m_bPointP2Ok = False
|
||||||
' Inizializzo primo punto acquisito dal disegno
|
' 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
|
m_ptPrev.z = m_ptRawMax.z
|
||||||
' Disegno crocetta che indica il punto acquisito
|
' Disegno crocetta che indica il punto acquisito
|
||||||
CreateCross(m_nTempLay, m_ptPrev)
|
CreateCross(m_nTempLay, m_ptPrev)
|
||||||
@@ -151,10 +173,10 @@ Public Class FlatteningCut
|
|||||||
SetCoordVisibility(True)
|
SetCoordVisibility(True)
|
||||||
ShowCoord()
|
ShowCoord()
|
||||||
' Assegno parametri di lavorazione già definiti
|
' Assegno parametri di lavorazione già definiti
|
||||||
DepthTxBx.Text = LenToString( m_dDepth, 1)
|
DepthTxBx.Text = LenToString(m_dDepth, 1)
|
||||||
DirectionTxBx.Text = DoubleToString( m_dAngO - m_MainWindow.m_CurrentMachine.dDeltaC, 2)
|
DirectionTxBx.Text = DoubleToString(m_dAngO - m_MainWindow.m_CurrentMachine.dDeltaC, 2)
|
||||||
LenghtTxBx.Text = LenToString( m_dLen, 1)
|
LenghtTxBx.Text = LenToString(m_dLen, 1)
|
||||||
WidthTxBx.Text = LenToString( m_dWid, 2)
|
WidthTxBx.Text = LenToString(m_dWid, 2)
|
||||||
OverlapTxBx.Text = LenToString(m_dOverlap, 2)
|
OverlapTxBx.Text = LenToString(m_dOverlap, 2)
|
||||||
ZReleasedTxBx.Text = LenToString(m_dZReleased, 2)
|
ZReleasedTxBx.Text = LenToString(m_dZReleased, 2)
|
||||||
' carico la quota di svincolo per la spianatura
|
' carico la quota di svincolo per la spianatura
|
||||||
@@ -163,6 +185,9 @@ Public Class FlatteningCut
|
|||||||
SideChBx.IsChecked = m_bHeadSide
|
SideChBx.IsChecked = m_bHeadSide
|
||||||
TypeCmBx.SelectedIndex = m_nMachType
|
TypeCmBx.SelectedIndex = m_nMachType
|
||||||
RotLockChBx.IsChecked = m_bRotLock
|
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
|
' Reset taglio e disabilito bottone esecuzione
|
||||||
m_bCutOk = False
|
m_bCutOk = False
|
||||||
UpdateSimulOkBtn()
|
UpdateSimulOkBtn()
|
||||||
@@ -176,19 +201,22 @@ Public Class FlatteningCut
|
|||||||
|
|
||||||
Friend Sub FlatteningCut_Unloaded(sender As Object, e As RoutedEventArgs) Handles Me.Unloaded
|
Friend Sub FlatteningCut_Unloaded(sender As Object, e As RoutedEventArgs) Handles Me.Unloaded
|
||||||
' Salvo i dati correnti
|
' Salvo i dati correnti
|
||||||
WritePrivateProfileString( S_DIRECTCUTS, K_DC_FLATT_DEPTH, DoubleToString( m_dDepth, 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_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_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_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_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_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_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_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_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_POSX, DoubleToString(m_ptTipP1.x, 2), m_MainWindow.GetIniFile())
|
||||||
WritePrivateProfileString( S_DIRECTCUTS, K_DC_FLATT_POSY, DoubleToString( m_ptTipP1.y, 2), m_MainWindow.GetIniFile())
|
WritePrivateProfileString(S_DIRECTCUTS, K_DC_FLATT_POSY, DoubleToString(m_ptTipP1.y, 2), m_MainWindow.GetIniFile())
|
||||||
' Se non vado in simulazione
|
' Se non vado in simulazione
|
||||||
If Not m_bSimul Then
|
If Not m_bSimul Then
|
||||||
|
' imposto la Z di sicurezza corretta
|
||||||
|
EgtMdbSetGeneralParam(MCH_GP.SAFEZ, DirectCutPageUC.m_dZSafe)
|
||||||
|
EgtMdbSave()
|
||||||
' Dichiaro sottopagina da non riattivare
|
' Dichiaro sottopagina da non riattivare
|
||||||
m_MainWindow.m_DirectCutPageUC.m_ControlsDirectCutUC.m_ActiveDirectCutPage = ControlsDirectCutUC.DirectCutPages.DirectCut
|
m_MainWindow.m_DirectCutPageUC.m_ControlsDirectCutUC.m_ActiveDirectCutPage = ControlsDirectCutUC.DirectCutPages.DirectCut
|
||||||
' Rimuovo layer temporaneo per crocette
|
' Rimuovo layer temporaneo per crocette
|
||||||
@@ -265,30 +293,43 @@ Public Class FlatteningCut
|
|||||||
' Verifico configurazione tavola e grezzo
|
' Verifico configurazione tavola e grezzo
|
||||||
If Not m_bRawOk Then Return
|
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
|
' Se acquisizone lama o laser
|
||||||
If PointModeCmBx.SelectedIndex = PT_MODE.SAW Or PointModeCmBx.SelectedIndex = PT_MODE.LASER Then
|
If PointModeCmBx.SelectedIndex = PT_MODE.SAW Or PointModeCmBx.SelectedIndex = PT_MODE.LASER Then
|
||||||
' Recupero la posizione macchina
|
' Recupero la posizione macchina
|
||||||
Dim dL1, dL2, dL3, dR1, dR2 As Double
|
Dim dL1, dL2, dL3, dR1, dR2 As Double
|
||||||
If Not m_MainWindow.m_CNCommunication.GetAxesPositions(dL1, dL2, dL3, dR1, dR2) Then Return
|
If Not m_MainWindow.m_CNCommunication.GetAxesPositions(dL1, dL2, dL3, dR1, dR2) Then Return
|
||||||
' Ricavo dati lama corrente
|
' Se macchina multicut il primo asse rotante restituito è quello della tavola
|
||||||
Dim sSaw As String = m_MainWindow.m_CurrentMachine.sCurrSaw
|
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
|
' Se punto da laser
|
||||||
If PointModeCmBx.SelectedIndex = PT_MODE.LASER Then
|
If PointModeCmBx.SelectedIndex = PT_MODE.LASER Then
|
||||||
' Imposto come testa corrente il laser (senza utensile ovviamente)
|
' Imposto come testa corrente il laser (senza utensile ovviamente)
|
||||||
If Not EgtSetCalcTool("", "H3", 1) Then Return
|
If Not EgtSetCalcTool("", "H3", 1) Then Return
|
||||||
' Trasformo in posizione punta utensile in basso
|
' 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
|
' Ora imposto la lama corrente
|
||||||
If Not EgtSetCalcTool(sSaw, "H1", 1) Then Return
|
If Not EgtSetCalcTool(sSaw, "H1", 1) Then Return
|
||||||
' Altrimenti da lama
|
' Altrimenti da lama
|
||||||
Else
|
Else
|
||||||
' Imposto la lama corrente
|
' Imposto la lama corrente
|
||||||
If Not EgtSetCalcTool(sSaw, "H1", 1) Then Return
|
If Not EgtSetCalcTool(sSaw, "H1", 1) Then Return
|
||||||
' Trasformo in posizione punta utensile in basso
|
' 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
|
End If
|
||||||
' Calcolo direzione asse lama
|
' 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
|
' Porto il tip nell'origine tavola
|
||||||
m_ptTipP1.ToLoc(New Frame3d(m_ptTabOri))
|
m_ptTipP1.ToLoc(New Frame3d(m_ptTabOri))
|
||||||
m_bPointP1Ok = True
|
m_bPointP1Ok = True
|
||||||
@@ -298,15 +339,13 @@ Public Class FlatteningCut
|
|||||||
m_dAngO = dTAngO + 90
|
m_dAngO = dTAngO + 90
|
||||||
DirectionTxBx.Text = DoubleToString(m_dAngO - m_MainWindow.m_CurrentMachine.dDeltaC, 2)
|
DirectionTxBx.Text = DoubleToString(m_dAngO - m_MainWindow.m_CurrentMachine.dDeltaC, 2)
|
||||||
|
|
||||||
' Altrimenti da disegno
|
' Altrimenti da disegno
|
||||||
Else
|
Else
|
||||||
' Assegno punto selezionato nel disegno a m_ptTipP1
|
' Assegno punto selezionato nel disegno a m_ptTipP1
|
||||||
m_ptTipP1 = m_ptPrev
|
m_ptTipP1 = m_ptPrev
|
||||||
' Porto il tip nell'origine tavola
|
' Porto il tip nell'origine tavola
|
||||||
m_ptTipP1.ToLoc(New Frame3d(m_ptTabOri))
|
m_ptTipP1.ToLoc(New Frame3d(m_ptTabOri))
|
||||||
m_bPointP1Ok = True
|
m_bPointP1Ok = True
|
||||||
' Ricavo dati lama corrente
|
|
||||||
Dim sSaw As String = m_MainWindow.m_CurrentMachine.sCurrSaw
|
|
||||||
' Imposto la lama corrente
|
' Imposto la lama corrente
|
||||||
If Not EgtSetCalcTool(sSaw, "H1", 1) Then Return
|
If Not EgtSetCalcTool(sSaw, "H1", 1) Then Return
|
||||||
End If
|
End If
|
||||||
@@ -336,27 +375,40 @@ Public Class FlatteningCut
|
|||||||
' Verifico configurazione tavola e grezzo
|
' Verifico configurazione tavola e grezzo
|
||||||
If Not m_bRawOk Then Return
|
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
|
' Se acquisizone lama o laser
|
||||||
If PointModeCmBx.SelectedIndex = PT_MODE.SAW Or PointModeCmBx.SelectedIndex = PT_MODE.LASER Then
|
If PointModeCmBx.SelectedIndex = PT_MODE.SAW Or PointModeCmBx.SelectedIndex = PT_MODE.LASER Then
|
||||||
' Recupero la posizione macchina
|
' Recupero la posizione macchina
|
||||||
Dim dL1, dL2, dL3, dR1, dR2 As Double
|
Dim dL1, dL2, dL3, dR1, dR2 As Double
|
||||||
If Not m_MainWindow.m_CNCommunication.GetAxesPositions(dL1, dL2, dL3, dR1, dR2) Then Return
|
If Not m_MainWindow.m_CNCommunication.GetAxesPositions(dL1, dL2, dL3, dR1, dR2) Then Return
|
||||||
' Ricavo dati lama corrente
|
' Se macchina multicut il primo asse rotante restituito è quello della tavola
|
||||||
Dim sSaw As String = m_MainWindow.m_CurrentMachine.sCurrSaw
|
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
|
' Se punto da laser
|
||||||
If PointModeCmBx.SelectedIndex = PT_MODE.LASER Then
|
If PointModeCmBx.SelectedIndex = PT_MODE.LASER Then
|
||||||
' Imposto come testa corrente il laser (senza utensile ovviamente)
|
' Imposto come testa corrente il laser (senza utensile ovviamente)
|
||||||
If Not EgtSetCalcTool("", "H3", 1) Then Return
|
If Not EgtSetCalcTool("", "H3", 1) Then Return
|
||||||
' Trasformo in posizione punta utensile in basso
|
' 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
|
' Ora imposto la lama corrente
|
||||||
If Not EgtSetCalcTool(sSaw, "H1", 1) Then Return
|
If Not EgtSetCalcTool(sSaw, "H1", 1) Then Return
|
||||||
' Altrimenti da lama
|
' Altrimenti da lama
|
||||||
Else
|
Else
|
||||||
' Imposto la lama corrente
|
' Imposto la lama corrente
|
||||||
If Not EgtSetCalcTool(sSaw, "H1", 1) Then Return
|
If Not EgtSetCalcTool(sSaw, "H1", 1) Then Return
|
||||||
' Trasformo in posizione punta utensile in basso
|
' 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
|
End If
|
||||||
' Calcolo direzione asse lama
|
' Calcolo direzione asse lama
|
||||||
If Not EgtGetCalcToolDirFromAngles(dR1, dR2, m_vtToolP2) Then Return
|
If Not EgtGetCalcToolDirFromAngles(dR1, dR2, m_vtToolP2) Then Return
|
||||||
@@ -364,15 +416,13 @@ Public Class FlatteningCut
|
|||||||
m_ptTipP2.ToLoc(New Frame3d(m_ptTabOri))
|
m_ptTipP2.ToLoc(New Frame3d(m_ptTabOri))
|
||||||
m_bPointP2Ok = True
|
m_bPointP2Ok = True
|
||||||
|
|
||||||
' Altrimenti da disegno
|
' Altrimenti da disegno
|
||||||
Else
|
Else
|
||||||
' Assegno punto selezionato nel disegno a m_ptTipP2
|
' Assegno punto selezionato nel disegno a m_ptTipP2
|
||||||
m_ptTipP2 = m_ptPrev
|
m_ptTipP2 = m_ptPrev
|
||||||
' Porto il tip nell'origine tavola
|
' Porto il tip nell'origine tavola
|
||||||
m_ptTipP2.ToLoc(New Frame3d(m_ptTabOri))
|
m_ptTipP2.ToLoc(New Frame3d(m_ptTabOri))
|
||||||
m_bPointP2Ok = True
|
m_bPointP2Ok = True
|
||||||
' Ricavo dati lama corrente
|
|
||||||
Dim sSaw As String = m_MainWindow.m_CurrentMachine.sCurrSaw
|
|
||||||
' Imposto la lama corrente
|
' Imposto la lama corrente
|
||||||
If Not EgtSetCalcTool(sSaw, "H1", 1) Then Return
|
If Not EgtSetCalcTool(sSaw, "H1", 1) Then Return
|
||||||
End If
|
End If
|
||||||
@@ -406,7 +456,7 @@ Public Class FlatteningCut
|
|||||||
|
|
||||||
Private Sub DepthTxBx_EgtClosed(sender As Object, e As EventArgs) Handles DepthTxBx.EgtClosed
|
Private Sub DepthTxBx_EgtClosed(sender As Object, e As EventArgs) Handles DepthTxBx.EgtClosed
|
||||||
' Verifico che l'affondamento impostato non sia superiore a quello massimo
|
' Verifico che l'affondamento impostato non sia superiore a quello massimo
|
||||||
Dim dMaxDepth = m_ptRawMax.z - m_ptRawMin.z + MAX_TAB_DEPTH
|
Dim dMaxDepth = m_ptRawMax.z - m_ptRawMin.z + m_MainWindow.m_CurrentMachine.MaxTabDepth
|
||||||
Dim dDepth As Double = 0
|
Dim dDepth As Double = 0
|
||||||
StringToLen(DepthTxBx.Text, dDepth)
|
StringToLen(DepthTxBx.Text, dDepth)
|
||||||
If dDepth < 0 Then
|
If dDepth < 0 Then
|
||||||
@@ -521,6 +571,16 @@ Public Class FlatteningCut
|
|||||||
EgtDraw()
|
EgtDraw()
|
||||||
End Sub
|
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
|
Private Sub RotLockChBx_Click(sender As Object, e As EventArgs) Handles RotLockChBx.Click
|
||||||
m_bRotLock = RotLockChBx.IsChecked
|
m_bRotLock = RotLockChBx.IsChecked
|
||||||
' Disegno il taglio
|
' Disegno il taglio
|
||||||
@@ -529,6 +589,14 @@ Public Class FlatteningCut
|
|||||||
EgtDraw()
|
EgtDraw()
|
||||||
End Sub
|
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
|
Private Sub XcoordTxBx_EgtClosed(sender As Object, e As EventArgs) Handles XcoordTxBx.EgtClosed
|
||||||
' Recupero il valore della coordinata (in 0 Tab)
|
' Recupero il valore della coordinata (in 0 Tab)
|
||||||
Dim dXcoord As Double = 0
|
Dim dXcoord As Double = 0
|
||||||
@@ -580,9 +648,9 @@ Public Class FlatteningCut
|
|||||||
m_CurrProjPage.SetWarningMessage("Trial Version")
|
m_CurrProjPage.SetWarningMessage("Trial Version")
|
||||||
#Else
|
#Else
|
||||||
' Verifico non sia versione Ufficio
|
' Verifico non sia versione Ufficio
|
||||||
If m_MainWindow.GetKeyOption( MainWindow.KEY_OPT.OFFICE_TYPE) Then
|
If m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.OFFICE_TYPE) Then
|
||||||
m_CurrProjPage.SetWarningMessage( "Office Version")
|
m_CurrProjPage.SetWarningMessage("Office Version")
|
||||||
Return
|
Return
|
||||||
End If
|
End If
|
||||||
' Verifico ci sia un taglio valido
|
' Verifico ci sia un taglio valido
|
||||||
If Not m_bCutOk Then Return
|
If Not m_bCutOk Then Return
|
||||||
@@ -597,13 +665,15 @@ Public Class FlatteningCut
|
|||||||
m_CurrProjPage.SetErrorMessage(EgtMsg(90314)) 'Errore nella generazione del programma CN
|
m_CurrProjPage.SetErrorMessage(EgtMsg(90314)) 'Errore nella generazione del programma CN
|
||||||
Return
|
Return
|
||||||
End If
|
End If
|
||||||
|
Dim sNameProg As Integer = 900
|
||||||
|
sNameProg = GetPrivateProfileInt(S_PARTPROGRAM, "NameProg", sNameProg, m_MainWindow.GetMachIniFile)
|
||||||
' Download programma (eventuali errori sono segnalati dalla funzione)
|
' 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
|
' copio il progetto corrente come progetto in lavorazione
|
||||||
Dim sWrkPath As String = m_MainWindow.GetTempDir() & "\" & "WorkProj.nge"
|
Dim sWrkPath As String = m_MainWindow.GetTempDir() & "\" & "WorkProj.nge"
|
||||||
My.Computer.FileSystem.CopyFile(sMchPath, sWrkPath, True)
|
My.Computer.FileSystem.CopyFile(sMchPath, sWrkPath, True)
|
||||||
' lancio eventuale lua post-trasmissione
|
' lancio eventuale lua post-trasmissione
|
||||||
m_MainWindow.ExecSentProgScript( True)
|
m_MainWindow.ExecSentProgScript(True)
|
||||||
End If
|
End If
|
||||||
#End If
|
#End If
|
||||||
End Sub
|
End Sub
|
||||||
@@ -617,10 +687,12 @@ Public Class FlatteningCut
|
|||||||
' ricavo l'ingombro di lavorazione in funzione dell'utensile selezionato
|
' ricavo l'ingombro di lavorazione in funzione dell'utensile selezionato
|
||||||
Private Function GetFootPrintTool() As Double
|
Private Function GetFootPrintTool() As Double
|
||||||
' vedere nella pagina Allarm il capito "Incisioni"
|
' 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
|
Dim dFootPrint As Double = 0
|
||||||
' verifico quale lavorazione è attiva
|
' verifico quale lavorazione è attiva
|
||||||
If Not String.IsNullOrEmpty(m_MainWindow.m_CurrentMachine.sCurrSawing) AndAlso Not bForceUseMill Then
|
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)
|
EgtTdbGetCurrToolParam(MCH_TP.THICK, dFootPrint)
|
||||||
ElseIf Not String.IsNullOrEmpty(m_MainWindow.m_CurrentMachine.sCurrMilling) Then
|
ElseIf Not String.IsNullOrEmpty(m_MainWindow.m_CurrentMachine.sCurrMilling) Then
|
||||||
Dim sCurrMill = m_MainWindow.m_CurrentMachine.sCurrMill
|
Dim sCurrMill = m_MainWindow.m_CurrentMachine.sCurrMill
|
||||||
@@ -655,18 +727,25 @@ Public Class FlatteningCut
|
|||||||
Dim ptStart As Point3d = m_ptTipP1
|
Dim ptStart As Point3d = m_ptTipP1
|
||||||
ptStart.z = 0
|
ptStart.z = 0
|
||||||
Dim nCutId = EgtCreateLinePDL(nLayerId, ptStart, m_dAngO, m_dLen)
|
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
|
' Imposto affondamento e angolo di fianco sul taglio
|
||||||
EgtSetInfo(nCutId, INFO_DEPTH, m_dDepth)
|
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)
|
EgtSetInfo(nCutId, INFO_WIDTH, GetFootPrintTool)
|
||||||
End If
|
End If
|
||||||
EgtSetInfo(nCutId, INFO_SIDE_ANGLE, 0)
|
EgtSetInfo(nCutId, INFO_SIDE_ANGLE, 0)
|
||||||
' Imposto prima direzione
|
' Imposto prima direzione
|
||||||
EgtSetInfo(nCutId, INFO_DIR, 1)
|
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
|
' Eventuale bloccaggio rotazione asse C tra le passate
|
||||||
If RotLockChBx.IsChecked Then
|
If RotLockChBx.IsChecked Then
|
||||||
EgtSetInfo(nCutId, INFO_ENABLE_INVERT, False)
|
EgtSetInfo(nCutId, INFO_ENABLE_INVERT, False)
|
||||||
End If
|
End If
|
||||||
|
EgtSetInfo(nCutId, INFO_STEP_TYPE, m_nMachType)
|
||||||
' Funzione che crea i tagli successivi al primo
|
' Funzione che crea i tagli successivi al primo
|
||||||
MultiplyCut(nLayerId, nCutId)
|
MultiplyCut(nLayerId, nCutId)
|
||||||
' Creo layer per crocetta di riferimento
|
' Creo layer per crocetta di riferimento
|
||||||
@@ -699,10 +778,17 @@ Public Class FlatteningCut
|
|||||||
End Function
|
End Function
|
||||||
|
|
||||||
Private Function MultiplyCut(nLayerId As Integer, nCutId As Integer) As Boolean
|
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
|
' Recupero spessore della lama (utensile) correntemente attiva
|
||||||
Dim dThick As Double = GetFootPrintTool()
|
Dim dThick As Double = GetFootPrintTool()
|
||||||
If dThick = 0 Then Return False
|
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
|
' Imposto angolo di rotazione a seconda del lato dei tagli
|
||||||
Dim dRotAngO As Double = If(SideChBx.IsChecked(), -90, 90)
|
Dim dRotAngO As Double = If(SideChBx.IsChecked(), -90, 90)
|
||||||
' Definisco vettore di spostamento
|
' Definisco vettore di spostamento
|
||||||
@@ -720,6 +806,10 @@ Public Class FlatteningCut
|
|||||||
If nStepNum > 1 Then
|
If nStepNum > 1 Then
|
||||||
dDelta = dWidth / (nStepNum - 1)
|
dDelta = dWidth / (nStepNum - 1)
|
||||||
End If
|
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
|
' Creo vettore delta
|
||||||
vtDelta *= dDelta
|
vtDelta *= dDelta
|
||||||
' Creo indice per impostare info che indica tipologia di spianatura
|
' Creo indice per impostare info che indica tipologia di spianatura
|
||||||
@@ -728,6 +818,8 @@ Public Class FlatteningCut
|
|||||||
Dim vtPerpMove As Vector3d = Index * vtDelta
|
Dim vtPerpMove As Vector3d = Index * vtDelta
|
||||||
' Creo copie
|
' Creo copie
|
||||||
Dim nCut2Id = EgtCopyGlob(nCutId, nLayerId)
|
Dim nCut2Id = EgtCopyGlob(nCutId, nLayerId)
|
||||||
|
EgtSetInfo(nCut2Id, INFO_WIDTH, dThick)
|
||||||
|
EgtSetInfo(nCutId, "EngravingWithMill", m_nTool)
|
||||||
' Assegno info direzione a seconda del tipo di spianatura
|
' Assegno info direzione a seconda del tipo di spianatura
|
||||||
If TypeCmBx.SelectedIndex = MACH_TYPE.ZIGZAG Then
|
If TypeCmBx.SelectedIndex = MACH_TYPE.ZIGZAG Then
|
||||||
If nTypeIndex = 1 Then
|
If nTypeIndex = 1 Then
|
||||||
@@ -741,10 +833,78 @@ Public Class FlatteningCut
|
|||||||
EgtSetInfo(nCut2Id, INFO_DIR, 1)
|
EgtSetInfo(nCut2Id, INFO_DIR, 1)
|
||||||
End If
|
End If
|
||||||
EgtMove(nCut2Id, vtPerpMove, GDB_RT.GLOB)
|
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
|
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
|
Return True
|
||||||
End Function
|
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
|
Private Function CreateCross(nLayerId As Integer, ptP As Point3d) As Boolean
|
||||||
' Aggiungo crocette
|
' Aggiungo crocette
|
||||||
Dim vtCrossX As New Vector3d(20, 0, 0)
|
Dim vtCrossX As New Vector3d(20, 0, 0)
|
||||||
|
|||||||
+120
-54
@@ -1,11 +1,11 @@
|
|||||||
<UserControl x:Class="GridCut"
|
<UserControl x:Class="GridCut"
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
|
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
d:DesignHeight="597.3" d:DesignWidth="256">
|
d:DesignHeight="597.3" d:DesignWidth="256">
|
||||||
|
|
||||||
<!--<Border CornerRadius="{StaticResource Page_CornerRadius}" Background="{StaticResource OmagCut_LightGray}">-->
|
<!--<Border CornerRadius="{StaticResource Page_CornerRadius}" Background="{StaticResource OmagCut_LightGray}">-->
|
||||||
<Border Style="{DynamicResource OmagCut_DirectCutPageBorder}">
|
<Border Style="{DynamicResource OmagCut_DirectCutPageBorder}">
|
||||||
@@ -34,42 +34,43 @@
|
|||||||
<ColumnDefinition Width="1*"/>
|
<ColumnDefinition Width="1*"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
<ToggleButton Name="Point1Btn" Grid.Column="0"
|
<ToggleButton Name="Point1Btn" Grid.Column="0"
|
||||||
Style="{DynamicResource OmagCut_YellowIconToggleButton}">
|
Style="{DynamicResource OmagCut_YellowIconToggleButton}">
|
||||||
<Image Source="{DynamicResource Acquisisci-P1Img}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
<Image Source="{DynamicResource Acquisisci-P1Img}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||||
</ToggleButton>
|
</ToggleButton>
|
||||||
|
|
||||||
<ToggleButton Name="Point2Btn" Grid.Column="1"
|
<ToggleButton Name="Point2Btn" Grid.Column="1"
|
||||||
Style="{DynamicResource OmagCut_YellowIconToggleButton}">
|
Style="{DynamicResource OmagCut_YellowIconToggleButton}">
|
||||||
<Image Source="{DynamicResource Acquisisci-P2Img}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
<Image Source="{DynamicResource Acquisisci-P2Img}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||||
</ToggleButton>
|
</ToggleButton>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
<ComboBox Name="PointModeCmBx" Grid.Row="1" Grid.ColumnSpan="2" Style="{StaticResource OmagCut_ComboBox}"
|
<ComboBox Name="PointModeCmBx" Grid.Row="1" Grid.ColumnSpan="2" Style="{DynamicResource OmagCut_ComboBox}"
|
||||||
Margin="6,0,6,0">
|
Margin="6,0,6,0">
|
||||||
<ComboBox.ItemTemplate>
|
<ComboBox.ItemTemplate>
|
||||||
<DataTemplate>
|
<DataTemplate>
|
||||||
<TextBlock Text="{Binding}" Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
<TextBlock Text="{Binding}" Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
</ComboBox.ItemTemplate>
|
</ComboBox.ItemTemplate>
|
||||||
</ComboBox>
|
</ComboBox>
|
||||||
|
|
||||||
<TextBlock Name="DepthTxBl" Grid.Column="0" Grid.Row="2"
|
<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"
|
<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"
|
<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"
|
<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"
|
<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"
|
<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>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="1.5*"/>
|
<ColumnDefinition Width="1.5*"/>
|
||||||
<ColumnDefinition Width="2"/>
|
<ColumnDefinition Width="2"/>
|
||||||
@@ -85,31 +86,98 @@
|
|||||||
<Border Grid.Column="1" Grid.Row="0" Grid.RowSpan="4" Background="Black" />
|
<Border Grid.Column="1" Grid.Row="0" Grid.RowSpan="4" Background="Black" />
|
||||||
|
|
||||||
<TextBlock Name="NumPzXTxBl" Grid.Column="0" Grid.Row="0"
|
<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"
|
<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"
|
<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"
|
<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"
|
<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"
|
<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"
|
<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"
|
<EgtWPFLib:EgtTextBox Name="DimPzYTxBx" Grid.Column="2" Grid.Row="3" Width="75"
|
||||||
Style="{StaticResource OmagCut_CalculatorTextBox}" />
|
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||||
|
|
||||||
</Grid>
|
</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"
|
<TextBlock Name="SideTxBl" Grid.Row="6" Grid.ColumnSpan="2"
|
||||||
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
|
Style="{DynamicResource OmagCut_CurrProjSummeryTextBlock}"/>
|
||||||
<CheckBox Name="SideChBx" Grid.Row="6" Grid.ColumnSpan="2" Style="{StaticResource OmagCut_CheckBox_Single}"
|
<CheckBox Name="SideChBx" Grid.Row="6" Grid.ColumnSpan="2" Style="{DynamicResource OmagCut_CheckBox_Single}"
|
||||||
HorizontalAlignment="Right" Margin="0,0,6,0"/>
|
HorizontalAlignment="Right" Margin="0,0,6,0"/>
|
||||||
|
|
||||||
<Grid Grid.Row="7" Grid.ColumnSpan="2">
|
<Grid Grid.Row="7" Grid.ColumnSpan="2">
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
@@ -119,13 +187,13 @@
|
|||||||
<ColumnDefinition Width="1*"/>
|
<ColumnDefinition Width="1*"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<TextBlock Name="XcoordTxBl" Grid.Column="0" Text="X"
|
<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"
|
<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"
|
<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"
|
<EgtWPFLib:EgtTextBox Name="YcoordTxBx" Grid.Column="3" Margin="0,0,6,0"
|
||||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
<Grid Grid.Row="11" Grid.ColumnSpan="2">
|
<Grid Grid.Row="11" Grid.ColumnSpan="2">
|
||||||
@@ -135,19 +203,17 @@
|
|||||||
<ColumnDefinition Width="1*"/>
|
<ColumnDefinition Width="1*"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
<Button Name="SimulBtn" Grid.Column="0" Style="{DynamicResource OmagCut_YellowIconButton}">
|
<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>
|
||||||
<Button Name="OkBtn" Grid.Column="1" Style="{DynamicResource OmagCut_YellowIconButton}">
|
<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>
|
||||||
<Button Name="ExitBtn" Grid.Column="2" Style="{DynamicResource OmagCut_YellowIconButton}">
|
<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>
|
</Button>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
</Border>
|
</Border>
|
||||||
|
|
||||||
</UserControl>
|
</UserControl>
|
||||||
|
|||||||
+428
-62
@@ -1,4 +1,5 @@
|
|||||||
Imports EgtUILib
|
Imports EgtUILib
|
||||||
|
Imports System.Collections.ObjectModel
|
||||||
|
|
||||||
Public Class GridCut
|
Public Class GridCut
|
||||||
' Riferimenti a pagine
|
' Riferimenti a pagine
|
||||||
@@ -38,6 +39,14 @@ Public Class GridCut
|
|||||||
Private m_ptPrev As Point3d
|
Private m_ptPrev As Point3d
|
||||||
' Layer per crocette temporanee
|
' Layer per crocette temporanee
|
||||||
Private m_nTempLay As Integer = GDB_ID.NULL
|
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
|
' Costanti
|
||||||
Private Const MAX_TAB_DEPTH As Double = 10.0
|
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
|
Private Sub GridCut_Initialized(sender As Object, e As EventArgs) Handles Me.Initialized
|
||||||
' Creo lista modalità di acquisizione punto
|
' Creo lista modalità di acquisizione punto
|
||||||
m_PointsModeArray(PT_MODE.SAW) = EgtMsg(MSG_DIRECTCUTPAGEUC + 24)
|
m_PointsModeArray(PT_MODE.SAW) = EgtMsg(90224) ' Lama
|
||||||
m_PointsModeArray(PT_MODE.LASER) = EgtMsg(MSG_DIRECTCUTPAGEUC + 12)
|
m_PointsModeArray(PT_MODE.LASER) = EgtMsg(90212) ' Laser
|
||||||
m_PointsModeArray(PT_MODE.DRAW) = EgtMsg(MSG_DIRECTCUTPAGEUC + 25)
|
m_PointsModeArray(PT_MODE.DRAW) = EgtMsg(90225) ' Disegno
|
||||||
' la associo alla combobox
|
' la associo alla combobox
|
||||||
PointModeCmBx.ItemsSource = m_PointsModeArray
|
PointModeCmBx.ItemsSource = m_PointsModeArray
|
||||||
' assegno messaggi
|
' assegno messaggi
|
||||||
Point1Btn.ToolTip = EgtMsg(MSG_DIRECTCUTPAGEUC + 10)
|
Point1Btn.ToolTip = EgtMsg(90210) ' Acquisisci P1
|
||||||
Point2Btn.ToolTip = EgtMsg(MSG_DIRECTCUTPAGEUC + 11)
|
Point2Btn.ToolTip = EgtMsg(90211) ' Acquisisci P2
|
||||||
DepthTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 13)
|
DepthTxBl.Text = EgtMsg(90213) ' Affondamento
|
||||||
DirectionTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 15)
|
DirectionTxBl.Text = EgtMsg(90215) ' Direzione
|
||||||
SideAngleTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 16)
|
SideAngleTxBl.Text = EgtMsg(90216) ' Inclinazione
|
||||||
NumPzXTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 19)
|
NumPzXTxBl.Text = EgtMsg(90219) ' Numero X
|
||||||
DimPzXTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 20)
|
DimPzXTxBl.Text = EgtMsg(90220) ' Dimensioni X
|
||||||
NumPzYTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 21)
|
NumPzYTxBl.Text = EgtMsg(90221) ' Numero Y
|
||||||
DimPzYTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 22)
|
DimPzYTxBl.Text = EgtMsg(90222) ' Dimensioni Y
|
||||||
SideTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 23)
|
SideTxBl.Text = EgtMsg(90223) ' Taglia lato motore
|
||||||
SimulBtn.ToolTip = EgtMsg(MSG_CADCUTPAGEUC + 1)
|
SimulBtn.ToolTip = EgtMsg(90301) ' Simula
|
||||||
OkBtn.ToolTip = EgtMsg(MSG_DIRECTCUTPAGEUC + 30)
|
OkBtn.ToolTip = EgtMsg(90230) ' Esegui
|
||||||
|
GridCutTxt.Text = EgtMsg(90264) ' Custom Grid
|
||||||
' Carico i dati dell'ultimo taglio
|
' Carico i dati dell'ultimo taglio
|
||||||
m_dDepth = GetPrivateProfileDouble( S_DIRECTCUTS, K_DC_GRID_DEPTH, m_dDepth, 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_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_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_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_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_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_dDepth = GetPrivateProfileDouble(S_DIRECTCUTS, K_DC_GRID_DEPTH, m_dDepth, m_MainWindow.GetIniFile())
|
||||||
m_bHeadSide = ( GetPrivateProfileInt( S_DIRECTCUTS, K_DC_GRID_HEADSIDE, 0, m_MainWindow.GetIniFile()) <> 0)
|
m_dAngO = GetPrivateProfileDouble(S_DIRECTCUTS, K_DC_GRID_ANGH, m_dAngO, m_MainWindow.GetIniFile())
|
||||||
m_ptTipP1.x = GetPrivateProfileDouble( S_DIRECTCUTS, K_DC_GRID_POSX, m_ptTipP1.x, m_MainWindow.GetIniFile())
|
m_dAngV = GetPrivateProfileDouble(S_DIRECTCUTS, K_DC_GRID_ANGV, m_dAngV, m_MainWindow.GetIniFile())
|
||||||
m_ptTipP1.y = GetPrivateProfileDouble( S_DIRECTCUTS, K_DC_GRID_POSY, m_ptTipP1.y, 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
|
End Sub
|
||||||
|
|
||||||
Private Sub GridCut_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded
|
Private Sub GridCut_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded
|
||||||
@@ -124,7 +175,8 @@ Public Class GridCut
|
|||||||
m_bPointP1Ok = False
|
m_bPointP1Ok = False
|
||||||
m_bPointP2Ok = False
|
m_bPointP2Ok = False
|
||||||
' Inizializzo primo punto acquisito dal disegno
|
' 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
|
m_ptPrev.z = m_ptRawMax.z
|
||||||
' Disegno crocetta che indica il punto acquisito
|
' Disegno crocetta che indica il punto acquisito
|
||||||
CreateCross(m_nTempLay, m_ptPrev)
|
CreateCross(m_nTempLay, m_ptPrev)
|
||||||
@@ -133,14 +185,24 @@ Public Class GridCut
|
|||||||
SetCoordVisibility(True)
|
SetCoordVisibility(True)
|
||||||
ShowCoord()
|
ShowCoord()
|
||||||
' Assegno parametri di lavorazione
|
' Assegno parametri di lavorazione
|
||||||
DepthTxBx.Text = LenToString( m_dDepth, 1)
|
DepthTxBx.Text = LenToString(m_dDepth, 1)
|
||||||
DirectionTxBx.Text = DoubleToString( m_dAngO - m_MainWindow.m_CurrentMachine.dDeltaC, 2)
|
DirectionTxBx.Text = DoubleToString(m_dAngO - m_MainWindow.m_CurrentMachine.dDeltaC, 2)
|
||||||
SideAngleTxBx.Text = DoubleToString( m_dAngV, 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()
|
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()
|
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
|
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
|
' Reset taglio e disabilito bottone esecuzione
|
||||||
m_bCutOk = False
|
m_bCutOk = False
|
||||||
UpdateSimulOkBtn()
|
UpdateSimulOkBtn()
|
||||||
@@ -150,21 +212,51 @@ Public Class GridCut
|
|||||||
Point1Btn.IsChecked = False
|
Point1Btn.IsChecked = False
|
||||||
' Aggiorno visualizzazione
|
' Aggiorno visualizzazione
|
||||||
EgtDraw()
|
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
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
Friend Sub GridCut_Unloaded(sender As Object, e As RoutedEventArgs) Handles Me.Unloaded
|
Friend Sub GridCut_Unloaded(sender As Object, e As RoutedEventArgs) Handles Me.Unloaded
|
||||||
' Salvo i dati correnti
|
' Salvo i dati correnti
|
||||||
WritePrivateProfileString( S_DIRECTCUTS, K_DC_GRID_DEPTH, DoubleToString( m_dDepth, 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_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_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_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_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_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_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_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_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_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
|
' Se non vado in simulazione
|
||||||
If Not m_bSimul Then
|
If Not m_bSimul Then
|
||||||
' Dichiaro sottopagina da non riattivare
|
' Dichiaro sottopagina da non riattivare
|
||||||
@@ -248,6 +340,12 @@ Public Class GridCut
|
|||||||
' Verifico configurazione tavola e grezzo
|
' Verifico configurazione tavola e grezzo
|
||||||
If Not m_bRawOk Then Return
|
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
|
' Recupero dati utensile e testa corrente
|
||||||
Dim sTool As String = ""
|
Dim sTool As String = ""
|
||||||
Dim sHead As String = ""
|
Dim sHead As String = ""
|
||||||
@@ -260,6 +358,13 @@ Public Class GridCut
|
|||||||
' Recupero la posizione macchina
|
' Recupero la posizione macchina
|
||||||
Dim dL1, dL2, dL3, dR1, dR2 As Double
|
Dim dL1, dL2, dL3, dR1, dR2 As Double
|
||||||
If Not m_MainWindow.m_CNCommunication.GetAxesPositions(dL1, dL2, dL3, dR1, dR2) Then Return
|
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
|
' Ricavo dati lama corrente
|
||||||
Dim sSaw As String = m_MainWindow.m_CurrentMachine.sCurrSaw
|
Dim sSaw As String = m_MainWindow.m_CurrentMachine.sCurrSaw
|
||||||
' Se punto da laser
|
' Se punto da laser
|
||||||
@@ -267,7 +372,7 @@ Public Class GridCut
|
|||||||
' Imposto come testa corrente il laser (senza utensile ovviamente)
|
' Imposto come testa corrente il laser (senza utensile ovviamente)
|
||||||
If Not EgtSetCalcTool("", "H3", 1) Then Return
|
If Not EgtSetCalcTool("", "H3", 1) Then Return
|
||||||
' Trasformo in posizione punta utensile in basso
|
' 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
|
' Reimposto eventuale precedente utensile
|
||||||
EgtSetCalcTool(sTool, sHead, nExit)
|
EgtSetCalcTool(sTool, sHead, nExit)
|
||||||
' Altrimenti da lama
|
' Altrimenti da lama
|
||||||
@@ -275,10 +380,10 @@ Public Class GridCut
|
|||||||
' Reimposto eventuale precedente utensile
|
' Reimposto eventuale precedente utensile
|
||||||
EgtSetCalcTool(sTool, sHead, nExit)
|
EgtSetCalcTool(sTool, sHead, nExit)
|
||||||
' Trasformo in posizione punta utensile in basso
|
' 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
|
End If
|
||||||
' Calcolo direzione asse lama
|
' 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
|
' Porto il tip nell'origine tavola
|
||||||
m_ptTipP1.ToLoc(New Frame3d(m_ptTabOri))
|
m_ptTipP1.ToLoc(New Frame3d(m_ptTabOri))
|
||||||
m_bPointP1Ok = True
|
m_bPointP1Ok = True
|
||||||
@@ -290,7 +395,7 @@ Public Class GridCut
|
|||||||
DirectionTxBx.Text = DoubleToString(m_dAngO - m_MainWindow.m_CurrentMachine.dDeltaC, 2)
|
DirectionTxBx.Text = DoubleToString(m_dAngO - m_MainWindow.m_CurrentMachine.dDeltaC, 2)
|
||||||
SideAngleTxBx.Text = DoubleToString(m_dAngV, 2)
|
SideAngleTxBx.Text = DoubleToString(m_dAngV, 2)
|
||||||
|
|
||||||
' Altrimenti punto da click di mouse
|
' Altrimenti punto da click di mouse
|
||||||
Else
|
Else
|
||||||
' Assegno punto selezionato nel disegno a m_ptTipP1
|
' Assegno punto selezionato nel disegno a m_ptTipP1
|
||||||
m_ptTipP1 = m_ptPrev
|
m_ptTipP1 = m_ptPrev
|
||||||
@@ -327,6 +432,12 @@ Public Class GridCut
|
|||||||
' Verifico configurazione tavola e grezzo
|
' Verifico configurazione tavola e grezzo
|
||||||
If Not m_bRawOk Then Return
|
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
|
' Recupero dati utensile e testa corrente
|
||||||
Dim sTool As String = ""
|
Dim sTool As String = ""
|
||||||
Dim sHead As String = ""
|
Dim sHead As String = ""
|
||||||
@@ -339,6 +450,13 @@ Public Class GridCut
|
|||||||
' Recupero la posizione macchina
|
' Recupero la posizione macchina
|
||||||
Dim dL1, dL2, dL3, dR1, dR2 As Double
|
Dim dL1, dL2, dL3, dR1, dR2 As Double
|
||||||
If Not m_MainWindow.m_CNCommunication.GetAxesPositions(dL1, dL2, dL3, dR1, dR2) Then Return
|
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
|
' Ricavo dati lama corrente
|
||||||
Dim sSaw As String = m_MainWindow.m_CurrentMachine.sCurrSaw
|
Dim sSaw As String = m_MainWindow.m_CurrentMachine.sCurrSaw
|
||||||
' Se punto da laser
|
' Se punto da laser
|
||||||
@@ -346,7 +464,7 @@ Public Class GridCut
|
|||||||
' Imposto come testa corrente il laser (senza utensile ovviamente)
|
' Imposto come testa corrente il laser (senza utensile ovviamente)
|
||||||
If Not EgtSetCalcTool("", "H3", 1) Then Return
|
If Not EgtSetCalcTool("", "H3", 1) Then Return
|
||||||
' Trasformo in posizione punta utensile in basso
|
' 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
|
' Reimposto eventuale precedente utensile
|
||||||
EgtSetCalcTool(sTool, sHead, nExit)
|
EgtSetCalcTool(sTool, sHead, nExit)
|
||||||
' Altrimenti da lama
|
' Altrimenti da lama
|
||||||
@@ -354,10 +472,10 @@ Public Class GridCut
|
|||||||
' Reimposto eventuale precedente utensile
|
' Reimposto eventuale precedente utensile
|
||||||
EgtSetCalcTool(sTool, sHead, nExit)
|
EgtSetCalcTool(sTool, sHead, nExit)
|
||||||
' Trasformo in posizione punta utensile in basso
|
' 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
|
End If
|
||||||
' Calcolo direzione asse lama
|
' 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
|
' Porto il tip nell'origine tavola
|
||||||
m_ptTipP2.ToLoc(New Frame3d(m_ptTabOri))
|
m_ptTipP2.ToLoc(New Frame3d(m_ptTabOri))
|
||||||
m_bPointP2Ok = True
|
m_bPointP2Ok = True
|
||||||
@@ -367,7 +485,7 @@ Public Class GridCut
|
|||||||
m_dAngV = 90 - dTAngV
|
m_dAngV = 90 - dTAngV
|
||||||
SideAngleTxBx.Text = DoubleToString(m_dAngV, 2)
|
SideAngleTxBx.Text = DoubleToString(m_dAngV, 2)
|
||||||
|
|
||||||
' Altrimenti punto da click di mouse
|
' Altrimenti punto da click di mouse
|
||||||
Else
|
Else
|
||||||
' Assegno punto selezionato nel disegno a m_ptTipP2
|
' Assegno punto selezionato nel disegno a m_ptTipP2
|
||||||
m_ptTipP2 = m_ptPrev
|
m_ptTipP2 = m_ptPrev
|
||||||
@@ -405,7 +523,7 @@ Public Class GridCut
|
|||||||
|
|
||||||
Private Sub DepthTxBx_EgtClosed(sender As Object, e As EventArgs) Handles DepthTxBx.EgtClosed
|
Private Sub DepthTxBx_EgtClosed(sender As Object, e As EventArgs) Handles DepthTxBx.EgtClosed
|
||||||
' Verifico che l'affondamento impostato non sia superiore a quello massimo
|
' Verifico che l'affondamento impostato non sia superiore a quello massimo
|
||||||
Dim dMaxDepth = m_ptRawMax.z - m_ptRawMin.z + MAX_TAB_DEPTH
|
Dim dMaxDepth = m_ptRawMax.z - m_ptRawMin.z + m_MainWindow.m_CurrentMachine.MaxTabDepth
|
||||||
Dim dDepth As Double = 0
|
Dim dDepth As Double = 0
|
||||||
StringToLen(DepthTxBx.Text, dDepth)
|
StringToLen(DepthTxBx.Text, dDepth)
|
||||||
If dDepth < 0 Then
|
If dDepth < 0 Then
|
||||||
@@ -483,6 +601,64 @@ Public Class GridCut
|
|||||||
EgtDraw()
|
EgtDraw()
|
||||||
End Sub
|
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
|
Private Sub SimulBtn_Click(sender As Object, e As RoutedEventArgs) Handles SimulBtn.Click
|
||||||
' Verifico ci sia un taglio valido
|
' Verifico ci sia un taglio valido
|
||||||
If Not m_bCutOk Then Return
|
If Not m_bCutOk Then Return
|
||||||
@@ -506,9 +682,9 @@ Public Class GridCut
|
|||||||
m_CurrProjPage.SetWarningMessage("Trial Version")
|
m_CurrProjPage.SetWarningMessage("Trial Version")
|
||||||
#Else
|
#Else
|
||||||
' Verifico non sia versione Ufficio
|
' Verifico non sia versione Ufficio
|
||||||
If m_MainWindow.GetKeyOption( MainWindow.KEY_OPT.OFFICE_TYPE) Then
|
If m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.OFFICE_TYPE) Then
|
||||||
m_CurrProjPage.SetWarningMessage( "Office Version")
|
m_CurrProjPage.SetWarningMessage("Office Version")
|
||||||
Return
|
Return
|
||||||
End If
|
End If
|
||||||
' Verifico ci sia un taglio valido
|
' Verifico ci sia un taglio valido
|
||||||
If Not m_bCutOk Then Return
|
If Not m_bCutOk Then Return
|
||||||
@@ -523,13 +699,15 @@ Public Class GridCut
|
|||||||
m_CurrProjPage.SetErrorMessage(EgtMsg(90314)) 'Errore nella generazione del programma CN
|
m_CurrProjPage.SetErrorMessage(EgtMsg(90314)) 'Errore nella generazione del programma CN
|
||||||
Return
|
Return
|
||||||
End If
|
End If
|
||||||
|
Dim sNameProg As Integer = 900
|
||||||
|
sNameProg = GetPrivateProfileInt(S_PARTPROGRAM, "NameProg", sNameProg, m_MainWindow.GetMachIniFile)
|
||||||
' Download programma (eventuali errori sono segnalati dalla funzione)
|
' 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
|
' copio il progetto corrente come progetto in lavorazione
|
||||||
Dim sWrkPath As String = m_MainWindow.GetTempDir() & "\" & "WorkProj.nge"
|
Dim sWrkPath As String = m_MainWindow.GetTempDir() & "\" & "WorkProj.nge"
|
||||||
My.Computer.FileSystem.CopyFile(sMchPath, sWrkPath, True)
|
My.Computer.FileSystem.CopyFile(sMchPath, sWrkPath, True)
|
||||||
' lancio eventuale lua post-trasmissione
|
' lancio eventuale lua post-trasmissione
|
||||||
m_MainWindow.ExecSentProgScript( True)
|
m_MainWindow.ExecSentProgScript(True)
|
||||||
End If
|
End If
|
||||||
#End If
|
#End If
|
||||||
End Sub
|
End Sub
|
||||||
@@ -538,7 +716,7 @@ Public Class GridCut
|
|||||||
m_MainWindow.m_DirectCutPageUC.m_ControlsDirectCutUC.LeftButtonGrid.Children.Remove(Me)
|
m_MainWindow.m_DirectCutPageUC.m_ControlsDirectCutUC.LeftButtonGrid.Children.Remove(Me)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Function CreateGridCut() As Boolean
|
Friend Function CreateGridCut() As Boolean
|
||||||
' Verifico sia definito il punto iniziale e il grezzo
|
' Verifico sia definito il punto iniziale e il grezzo
|
||||||
If Not m_bPointP1Ok Or Not m_bRawOk Then
|
If Not m_bPointP1Ok Or Not m_bRawOk Then
|
||||||
m_bCutOk = False
|
m_bCutOk = False
|
||||||
@@ -590,11 +768,18 @@ Public Class GridCut
|
|||||||
End Function
|
End Function
|
||||||
|
|
||||||
Private Function MultiplyCut(nLayerId As Integer) As Boolean
|
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
|
' Recupero lo spessore del taglio della lama o del waterjet correntemente attiva
|
||||||
Dim nType As Integer = 0
|
Dim nType As Integer = 0
|
||||||
EgtTdbGetCurrToolParam( MCH_TP.TYPE, nType)
|
EgtTdbGetCurrToolParam(MCH_TP.TYPE, nType)
|
||||||
Dim dThick As Double = 0
|
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
|
' Ricalcolo lo spessore in base all'inclinazione
|
||||||
dThick = dThick / Math.Cos(m_dAngV * Math.PI / 180)
|
dThick = dThick / Math.Cos(m_dAngV * Math.PI / 180)
|
||||||
' Imposto angolo di rotazione a seconda del lato dei tagli paralleli
|
' 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
|
If dDimPzY <> 0 And nNumPzY > 0 And dDimPzX <> 0 And nNumPzX > 0 Then
|
||||||
Dim dLenX As Double = dThick + (dDimPzX + dThick) * nNumPzX
|
Dim dLenX As Double = dThick + (dDimPzX + dThick) * nNumPzX
|
||||||
Dim nCutParaId = EgtCreateLinePDL(nLayerId, ptStart, m_dAngO, dLenX + 0.1)
|
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
|
' Imposto affondamento e angolo di fianco sul taglio
|
||||||
EgtSetInfo(nCutParaId, INFO_DEPTH, m_dDepth)
|
EgtSetInfo(nCutParaId, INFO_DEPTH, m_dDepth)
|
||||||
EgtSetInfo(nCutParaId, INFO_SIDE_ANGLE, m_dAngV)
|
EgtSetInfo(nCutParaId, INFO_SIDE_ANGLE, m_dAngV)
|
||||||
@@ -634,6 +829,14 @@ Public Class GridCut
|
|||||||
' Arretro il punto di partenza di uno spessore lama
|
' Arretro il punto di partenza di uno spessore lama
|
||||||
Dim vtDeltaPos As Vector3d = Vector3d.FromPolar(dThick + 0.1, m_dAngO - 90)
|
Dim vtDeltaPos As Vector3d = Vector3d.FromPolar(dThick + 0.1, m_dAngO - 90)
|
||||||
Dim nCutPerpId = EgtCreateLinePDL(nLayerId, ptStart + vtDeltaPos, m_dAngO + 90, dLenY + 0.2)
|
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
|
' Specchio se è attivo il flag che cambia lato di disegno
|
||||||
If SideChBx.IsChecked() Then
|
If SideChBx.IsChecked() Then
|
||||||
Dim vtRot As Vector3d = Vector3d.FromPolar(1, m_dAngO + 90)
|
Dim vtRot As Vector3d = Vector3d.FromPolar(1, m_dAngO + 90)
|
||||||
@@ -655,7 +858,118 @@ Public Class GridCut
|
|||||||
Return True
|
Return True
|
||||||
End Function
|
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
|
Private Function CreateCross(nLayerId As Integer, ptP As Point3d) As Boolean
|
||||||
|
ptP += New Vector3d(0, 0, 0.15)
|
||||||
' Aggiungo crocette
|
' Aggiungo crocette
|
||||||
Dim vtCrossX As New Vector3d(20, 0, 0)
|
Dim vtCrossX As New Vector3d(20, 0, 0)
|
||||||
Dim vtCrossY As New Vector3d(0, 20, 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,
|
Private Sub NumPzsTxBx_EgtClosed(sender As Object, e As EventArgs) Handles NumPzXTxBx.EgtClosed, NumPzYTxBx.EgtClosed,
|
||||||
DimPzXTxBx.EgtClosed, DimPzYTxBx.EgtClosed, SideChBx.Click
|
DimPzXTxBx.EgtClosed, DimPzYTxBx.EgtClosed, SideChBx.Click
|
||||||
StringToInt( NumPzXTxBx.Text, m_nNumX)
|
StringToInt(NumPzXTxBx.Text, m_nNumX)
|
||||||
StringToLen( DimPzXTxBx.Text, m_dDimX)
|
StringToLen(DimPzXTxBx.Text, m_dDimX)
|
||||||
StringToInt( NumPzYTxBx.Text, m_nNumY)
|
StringToInt(NumPzYTxBx.Text, m_nNumY)
|
||||||
StringToLen( DimPzYTxBx.Text, m_dDimY)
|
StringToLen(DimPzYTxBx.Text, m_dDimY)
|
||||||
m_bHeadSide = SideChBx.IsChecked
|
m_bHeadSide = SideChBx.IsChecked
|
||||||
' Disegno il taglio
|
' Disegno il taglio
|
||||||
CreateGridCut()
|
CreateGridCut()
|
||||||
@@ -713,4 +1027,56 @@ Public Class GridCut
|
|||||||
Return True
|
Return True
|
||||||
End Function
|
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
|
End Class
|
||||||
@@ -1,10 +1,10 @@
|
|||||||
<UserControl x:Class="MachineButtonsUC"
|
<UserControl x:Class="MachineButtonsUC"
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
d:DesignHeight="85.3" d:DesignWidth="853" Loaded="MachineButtons_Loaded">
|
d:DesignHeight="85.3" d:DesignWidth="853" Loaded="MachineButtons_Loaded">
|
||||||
|
|
||||||
<!-- Definizione del controllo MachineButton -->
|
<!-- Definizione del controllo MachineButton -->
|
||||||
<Grid Name="MachineButtonsGrid">
|
<Grid Name="MachineButtonsGrid">
|
||||||
@@ -20,52 +20,52 @@
|
|||||||
<ColumnDefinition Width="1*"/>
|
<ColumnDefinition Width="1*"/>
|
||||||
<ColumnDefinition Width="1*"/>
|
<ColumnDefinition Width="1*"/>
|
||||||
<ColumnDefinition Width="1*"/>
|
<ColumnDefinition Width="1*"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
<ToggleButton Name="MachineButton1" Grid.Column="0" Style="{DynamicResource OmagCut_ModifiedGradientYellowIconToggleButton}">
|
<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>
|
||||||
|
|
||||||
<ToggleButton Name="MachineButton2" Grid.Column="1" Style="{DynamicResource OmagCut_ModifiedGradientYellowIconToggleButton}">
|
<ToggleButton Name="MachineButton2" Grid.Column="1" Style="{DynamicResource OmagCut_ModifiedGradientYellowIconToggleButton}">
|
||||||
<Image Name="ImageButton2" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
<Image Name="ImageButton2" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||||
</ToggleButton>
|
</ToggleButton>
|
||||||
|
|
||||||
<ToggleButton Name="MachineButton3" Grid.Column="2" Style="{DynamicResource OmagCut_ModifiedGradientYellowIconToggleButton}">
|
<ToggleButton Name="MachineButton3" Grid.Column="2" Style="{DynamicResource OmagCut_ModifiedGradientYellowIconToggleButton}">
|
||||||
<Image Name="ImageButton3" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
<Image Name="ImageButton3" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||||
</ToggleButton>
|
</ToggleButton>
|
||||||
|
|
||||||
<ToggleButton Name="MachineButton4" Grid.Column="3" Style="{DynamicResource OmagCut_ModifiedGradientYellowIconToggleButton}">
|
<ToggleButton Name="MachineButton4" Grid.Column="3" Style="{DynamicResource OmagCut_ModifiedGradientYellowIconToggleButton}">
|
||||||
<Image Name="ImageButton4" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
<Image Name="ImageButton4" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||||
</ToggleButton>
|
</ToggleButton>
|
||||||
|
|
||||||
<ToggleButton Name="MachineButton5" Grid.Column="4" Style="{DynamicResource OmagCut_ModifiedGradientYellowIconToggleButton}">
|
<ToggleButton Name="MachineButton5" Grid.Column="4" Style="{DynamicResource OmagCut_ModifiedGradientYellowIconToggleButton}">
|
||||||
<Image Name="ImageButton5" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
<Image Name="ImageButton5" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||||
</ToggleButton>
|
</ToggleButton>
|
||||||
|
|
||||||
<ToggleButton Name="MachineButton6" Grid.Column="5" Style="{DynamicResource OmagCut_ModifiedGradientYellowIconToggleButton}">
|
<ToggleButton Name="MachineButton6" Grid.Column="5" Style="{DynamicResource OmagCut_ModifiedGradientYellowIconToggleButton}">
|
||||||
<Image Name="ImageButton6" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
<Image Name="ImageButton6" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||||
</ToggleButton>
|
</ToggleButton>
|
||||||
|
|
||||||
<ToggleButton Name="MachineButton7" Grid.Column="6" Style="{DynamicResource OmagCut_ModifiedGradientYellowIconToggleButton}">
|
<ToggleButton Name="MachineButton7" Grid.Column="6" Style="{DynamicResource OmagCut_ModifiedGradientYellowIconToggleButton}">
|
||||||
<Image Name="ImageButton7" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
<Image Name="ImageButton7" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||||
</ToggleButton>
|
</ToggleButton>
|
||||||
|
|
||||||
<ToggleButton Name="MachineButton8" Grid.Column="7" Style="{DynamicResource OmagCut_ModifiedGradientYellowIconToggleButton}">
|
<ToggleButton Name="MachineButton8" Grid.Column="7" Style="{DynamicResource OmagCut_ModifiedGradientYellowIconToggleButton}">
|
||||||
<Image Name="ImageButton8" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
<Image Name="ImageButton8" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||||
</ToggleButton>
|
</ToggleButton>
|
||||||
|
|
||||||
<ToggleButton Name="MachineButton9" Grid.Column="8" Style="{DynamicResource OmagCut_ModifiedGradientYellowIconToggleButton}">
|
<ToggleButton Name="MachineButton9" Grid.Column="8" Style="{DynamicResource OmagCut_ModifiedGradientYellowIconToggleButton}">
|
||||||
<Image Name="ImageButton9" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
<Image Name="ImageButton9" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||||
</ToggleButton>
|
</ToggleButton>
|
||||||
|
|
||||||
<ToggleButton Name="MachineButton10" Grid.Column="9" Style="{DynamicResource OmagCut_ModifiedGradientYellowIconToggleButton}">
|
<ToggleButton Name="MachineButton10" Grid.Column="9" Style="{DynamicResource OmagCut_ModifiedGradientYellowIconToggleButton}">
|
||||||
<Image Name="ImageButton10" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
<Image Name="ImageButton10" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||||
</ToggleButton>
|
</ToggleButton>
|
||||||
|
|
||||||
<ToggleButton Name="MachineButton11" Grid.Column="10" Style="{DynamicResource OmagCut_ModifiedGradientYellowIconToggleButton}">
|
<ToggleButton Name="MachineButton11" Grid.Column="10" Style="{DynamicResource OmagCut_ModifiedGradientYellowIconToggleButton}">
|
||||||
<Image Name="ImageButton11" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
<Image Name="ImageButton11" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||||
</ToggleButton>
|
</ToggleButton>
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
</UserControl>
|
</UserControl>
|
||||||
|
|||||||
@@ -7,6 +7,8 @@ Public Class MachineButtonsUC
|
|||||||
Private m_DirectCutPage As DirectCutPageUC
|
Private m_DirectCutPage As DirectCutPageUC
|
||||||
Friend m_CN As CN_generico
|
Friend m_CN As CN_generico
|
||||||
|
|
||||||
|
Public nCountButton As Integer = 11
|
||||||
|
|
||||||
Private m_bOnlyLaser As Boolean = False
|
Private m_bOnlyLaser As Boolean = False
|
||||||
Private m_bFirst As Boolean = True
|
Private m_bFirst As Boolean = True
|
||||||
|
|
||||||
@@ -33,6 +35,7 @@ Public Class MachineButtonsUC
|
|||||||
Private Const BTN_STATE_DOOR_OPENED As String = "DoorOpened"
|
Private Const BTN_STATE_DOOR_OPENED As String = "DoorOpened"
|
||||||
Private Const BTN_STATE_DOOR_CLOSED As String = "DoorClosed"
|
Private Const BTN_STATE_DOOR_CLOSED As String = "DoorClosed"
|
||||||
Private Const BTN_STATE_PARKING As String = "Parking"
|
Private Const BTN_STATE_PARKING As String = "Parking"
|
||||||
|
Private Const BTN_STATE_HOME As String = "Home"
|
||||||
Private Const BTN_ENABLE_ZONE_1 As String = "EnableZone1"
|
Private Const BTN_ENABLE_ZONE_1 As String = "EnableZone1"
|
||||||
Private Const BTN_ENABLE_ZONE_2 As String = "EnableZone2"
|
Private Const BTN_ENABLE_ZONE_2 As String = "EnableZone2"
|
||||||
Private Const BTN_ENABLE_PC As String = "EnablePC"
|
Private Const BTN_ENABLE_PC As String = "EnablePC"
|
||||||
@@ -76,6 +79,9 @@ Public Class MachineButtonsUC
|
|||||||
GetToggleButton(nIndex + 1).Visibility = Windows.Visibility.Hidden
|
GetToggleButton(nIndex + 1).Visibility = Windows.Visibility.Hidden
|
||||||
Next
|
Next
|
||||||
|
|
||||||
|
' notifico nella variabile pubblica il numero di pulsanti inseriti nella barra
|
||||||
|
nCountButton = m_nCount
|
||||||
|
|
||||||
' Se variabile di stato "Nothing"/"DoorOpened"/"DoorClosed" imposto immagine fissa
|
' Se variabile di stato "Nothing"/"DoorOpened"/"DoorClosed" imposto immagine fissa
|
||||||
For nIndex As Integer = 0 To m_nCount - 1
|
For nIndex As Integer = 0 To m_nCount - 1
|
||||||
If StateFlagArray(nIndex) = BTN_STATE_NOTHING OrElse
|
If StateFlagArray(nIndex) = BTN_STATE_NOTHING OrElse
|
||||||
@@ -130,7 +136,7 @@ Public Class MachineButtonsUC
|
|||||||
ElseIf StateFlagArray(nIndex) = K_ZBJOG Then
|
ElseIf StateFlagArray(nIndex) = K_ZBJOG Then
|
||||||
CurrToggleBtn.Content = "Z - B"
|
CurrToggleBtn.Content = "Z - B"
|
||||||
ElseIf StateFlagArray(nIndex) = K_REMOTE Then
|
ElseIf StateFlagArray(nIndex) = K_REMOTE Then
|
||||||
CurrToggleBtn.Content = "Remote"
|
CurrToggleBtn.Content = EgtMsg(90262) 'Remote
|
||||||
End If
|
End If
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
EgtOutLog("Error loading content " & StateFlagArray(nIndex))
|
EgtOutLog("Error loading content " & StateFlagArray(nIndex))
|
||||||
@@ -267,9 +273,62 @@ Public Class MachineButtonsUC
|
|||||||
End If
|
End If
|
||||||
Return
|
Return
|
||||||
End If
|
End If
|
||||||
|
' CONTROLLO FANUC
|
||||||
|
Case 4
|
||||||
|
' ------------------------------------ FANUC ------------------------------------
|
||||||
|
' eventuale scrittura di linea di comando MDI
|
||||||
|
If Not String.IsNullOrEmpty(CmdString) Then
|
||||||
|
' attivo mpdalità MDI
|
||||||
|
m_CN.DGeneralFunctions_WriteCncMode(2)
|
||||||
|
System.Threading.Thread.Sleep(100)
|
||||||
|
' salvo la stringa di comando ricevuta dal file lua
|
||||||
|
m_CN.sz_ManualDataInput = CmdString
|
||||||
|
' esguo la funzione che ha il compito di scrivere il comando MDI
|
||||||
|
m_CN.MDI_command()
|
||||||
|
End If
|
||||||
|
' attivo modalità AUTO
|
||||||
|
m_CN.DGeneralFunctions_WriteCncMode(7)
|
||||||
|
System.Threading.Thread.Sleep(100)
|
||||||
|
If String.IsNullOrEmpty(EValue) Then
|
||||||
|
' EActive: impulsivo "D#####"
|
||||||
|
m_CN.NC_pulse_bit(ENumber)
|
||||||
|
EgtOutLog("Fanuc_DNumber= " & ENumber)
|
||||||
|
Else
|
||||||
|
' EActive + EValue: scrittura comando invariabile Short oppure Bit
|
||||||
|
If ENumber.Contains(".") Then
|
||||||
|
' D#####.#
|
||||||
|
Dim bEValue As Boolean
|
||||||
|
If EValue.Trim = "1" Then bEValue = True
|
||||||
|
m_CN.NC_write_var_bit(ENumber, CBool(EValue))
|
||||||
|
Else
|
||||||
|
' D#####
|
||||||
|
m_CN.NC_write_var_short(ENumber, CShort(EValue))
|
||||||
|
End If
|
||||||
|
EgtOutLog("Fanuc_DNumber= " & ENumber & " DValue= " & EValue)
|
||||||
|
End If
|
||||||
|
' eventale caricamento seconda variabile
|
||||||
|
If String.IsNullOrEmpty(EValue2) Then
|
||||||
|
' EActive: impulsivo "D#####"
|
||||||
|
m_CN.NC_pulse_bit(ENumber2)
|
||||||
|
EgtOutLog("Fanuc_DNumber= " & ENumber2)
|
||||||
|
Else
|
||||||
|
' EActive + EValue: scrittura comando invariabile Short oppure Bit
|
||||||
|
If ENumber2.Contains(".") Then
|
||||||
|
' D#####.#
|
||||||
|
Dim bEValue2 As Boolean
|
||||||
|
If EValue2.Trim = "1" Then bEValue2 = True
|
||||||
|
m_CN.NC_write_var_bit(ENumber2, CBool(EValue2))
|
||||||
|
Else
|
||||||
|
' D#####
|
||||||
|
m_CN.NC_write_var_short(ENumber2, CShort(EValue2))
|
||||||
|
End If
|
||||||
|
EgtOutLog("Fanuc_DNumber2= " & ENumber2 & " DValue2= " & EValue2)
|
||||||
|
End If
|
||||||
|
Return
|
||||||
End Select
|
End Select
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
Dim nResult As Short
|
Dim nResult As Short
|
||||||
' Imposto modalità MDI per controlli num
|
' Imposto modalità MDI per controlli num
|
||||||
Select Case m_MainWindow.m_CNCommunication.m_nNCType
|
Select Case m_MainWindow.m_CNCommunication.m_nNCType
|
||||||
@@ -286,6 +345,8 @@ Public Class MachineButtonsUC
|
|||||||
m_CN.DGeneralFunctions_CycleStart()
|
m_CN.DGeneralFunctions_CycleStart()
|
||||||
Case 3
|
Case 3
|
||||||
'Per il siemens non devo fare nulla
|
'Per il siemens non devo fare nulla
|
||||||
|
Case 4
|
||||||
|
' Nicola: 27/03/2023 attivazione della funzione M# indicata?
|
||||||
End Select
|
End Select
|
||||||
|
|
||||||
If b2Start Then
|
If b2Start Then
|
||||||
@@ -320,6 +381,17 @@ Public Class MachineButtonsUC
|
|||||||
EgtTdbGetCurrToolParam(MCH_TP.SPEED, dSpeed)
|
EgtTdbGetCurrToolParam(MCH_TP.SPEED, dSpeed)
|
||||||
End If
|
End If
|
||||||
EgtLuaSetGlobNumVar("CMD.S", dSpeed)
|
EgtLuaSetGlobNumVar("CMD.S", dSpeed)
|
||||||
|
' versione 2.5e1
|
||||||
|
EgtTdbSetCurrTool(m_MainWindow.m_CurrentProjectPageUC.ToolTxBx.Text)
|
||||||
|
Dim sToolPos As String = String.Empty
|
||||||
|
If EgtTdbGetCurrToolParam(MCH_TP.TCPOS, sToolPos) Then
|
||||||
|
EgtLuaGetGlobStringVar("CMD.TCPOS", sToolPos)
|
||||||
|
End If
|
||||||
|
Dim dToolDiam As Double = 0
|
||||||
|
If EgtTdbGetCurrToolParam(MCH_TP.DIAM, dToolDiam) Then
|
||||||
|
EgtLuaSetGlobNumVar("CMD.DIAM", dToolDiam * 1000)
|
||||||
|
End If
|
||||||
|
|
||||||
Dim dL1, dL2, dL3, dR1, dR2 As Double
|
Dim dL1, dL2, dL3, dR1, dR2 As Double
|
||||||
m_MainWindow.m_CNCommunication.GetAxesPositions(dL1, dL2, dL3, dR1, dR2)
|
m_MainWindow.m_CNCommunication.GetAxesPositions(dL1, dL2, dL3, dR1, dR2)
|
||||||
EgtLuaSetGlobNumVar("CMD.L1", dL1)
|
EgtLuaSetGlobNumVar("CMD.L1", dL1)
|
||||||
@@ -640,6 +712,40 @@ Public Class MachineButtonsUC
|
|||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Friend Sub HomeStateChanged(HomeState As Boolean)
|
||||||
|
Dim nIndex As Integer = Array.IndexOf(StateFlagArray, BTN_STATE_HOME)
|
||||||
|
If nIndex = -1 Then Return
|
||||||
|
If HomeState Then
|
||||||
|
GetToggleButton(nIndex + 1).IsChecked = True
|
||||||
|
Try
|
||||||
|
Dim s As String
|
||||||
|
If (m_MainWindow.m_OptionsPageUC.ThemesCmBx.SelectedIndex = 0) Then
|
||||||
|
s = m_MainWindow.GetResourcesDir() & "\MachineButtonsImage\" & ImageArrayY(nIndex)
|
||||||
|
Else
|
||||||
|
s = m_MainWindow.GetResourcesDir() & "\MachineButtonsImage\NewIcons\" & ImageArrayY(nIndex)
|
||||||
|
End If
|
||||||
|
Dim sButtonImageSource As ImageSource = ImageConverter.ConvertFromString(s)
|
||||||
|
GetImage(nIndex + 1).Source = sButtonImageSource
|
||||||
|
Catch ex As Exception
|
||||||
|
EgtOutLog("Error loading image " & ImageArrayY(nIndex + 1))
|
||||||
|
End Try
|
||||||
|
Else
|
||||||
|
GetToggleButton(nIndex + 1).IsChecked = False
|
||||||
|
Try
|
||||||
|
Dim s As String
|
||||||
|
If (m_MainWindow.m_OptionsPageUC.ThemesCmBx.SelectedIndex = 0) Then
|
||||||
|
s = m_MainWindow.GetResourcesDir() & "\MachineButtonsImage\" & ImageArrayY(nIndex)
|
||||||
|
Else
|
||||||
|
s = m_MainWindow.GetResourcesDir() & "\MachineButtonsImage\NewIcons\" & ImageArrayY(nIndex)
|
||||||
|
End If
|
||||||
|
Dim sButtonImageSource As ImageSource = ImageConverter.ConvertFromString(s)
|
||||||
|
GetImage(nIndex + 1).Source = sButtonImageSource
|
||||||
|
Catch ex As Exception
|
||||||
|
EgtOutLog("Error loading image " & ImageArrayN(nIndex + 1))
|
||||||
|
End Try
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
Friend Sub EnableZoneStateChanged(ZoneState As Integer)
|
Friend Sub EnableZoneStateChanged(ZoneState As Integer)
|
||||||
Dim sFlag As String = String.Empty
|
Dim sFlag As String = String.Empty
|
||||||
If ZoneState = 1 Then
|
If ZoneState = 1 Then
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
<UserControl x:Class="ManualAxesMoveUC"
|
<UserControl x:Class="ManualAxesMoveUC"
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
|
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
d:DesignHeight="597.3" d:DesignWidth="256">
|
d:DesignHeight="597.3" d:DesignWidth="256">
|
||||||
|
|
||||||
<Border Style="{DynamicResource OmagCut_Page2Border}">
|
<Border Style="{DynamicResource OmagCut_Page2Border}">
|
||||||
|
|
||||||
@@ -26,7 +26,7 @@
|
|||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
<ToggleButton x:Name="G0Btn" Grid.Row="0" Height="60" Width="60"
|
<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"/>
|
<TextBlock Name="G0TxBl" Text="G0" FontSize="29"/>
|
||||||
</ToggleButton>
|
</ToggleButton>
|
||||||
|
|
||||||
@@ -41,52 +41,60 @@
|
|||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
<TextBlock x:Name="FeedTxBl" Grid.Column="0" Grid.Row="0"
|
<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"
|
<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"
|
<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"
|
<EgtWPFLib:EgtTextBox Name="SpeedTxBx" Grid.Column="1" Grid.Row="1" Margin="6,0,6,0"
|
||||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||||
|
|
||||||
</Grid>
|
</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">
|
<UniformGrid Rows="2" Grid.Column="1" Grid.Row="1">
|
||||||
<EgtWPFLib:EgtTextBox Name="L1TxBx" Margin="0,4,6,0"
|
<EgtWPFLib:EgtTextBox Name="L1TxBx" Margin="0,4,6,0"
|
||||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||||
<CheckBox Name="L1SawThChBx" Height="20" Width="142" Style="{StaticResource OmagCut_CheckBox_Single}"
|
<CheckBox Name="L1SawThChBx" Height="20" Width="142"
|
||||||
HorizontalAlignment="Right" Margin="0,0,6,0"/>
|
Style="{DynamicResource OmagCut_CheckBox_Single}"
|
||||||
|
HorizontalAlignment="Right" Margin="0,0,6,0"/>
|
||||||
</UniformGrid>
|
</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">
|
<UniformGrid Rows="2" Grid.Column="1" Grid.Row="2">
|
||||||
<EgtWPFLib:EgtTextBox x:Name="L2TxBx" Margin="0,4,6,0"
|
<EgtWPFLib:EgtTextBox x:Name="L2TxBx" Margin="0,4,6,0"
|
||||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||||
<CheckBox Name="L2SawThChBx" Height="20" Width="142" Style="{StaticResource OmagCut_CheckBox_Single}"
|
<CheckBox Name="L2SawThChBx" Height="20" Width="142"
|
||||||
HorizontalAlignment="Right" Margin="0,0,6,0"/>
|
Style="{DynamicResource OmagCut_CheckBox_Single}"
|
||||||
|
HorizontalAlignment="Right" Margin="0,0,6,0"/>
|
||||||
</UniformGrid>
|
</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"
|
<EgtWPFLib:EgtTextBox x:Name="L3TxBx" Grid.Column="1" Grid.Row="3" Margin="0,0,6,0"
|
||||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||||
<Button x:Name="R1Btn" Grid.Row="4" Height="60" Width="60" Style="{DynamicResource OmagCut_RightGrayGradientYellowTextButton}"/>
|
<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"
|
<EgtWPFLib:EgtTextBox x:Name="R1TxBx" Grid.Column="1" Grid.Row="4" Margin="0,0,6,0" IsLength="False"
|
||||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||||
<Button x:Name="R2Btn" Grid.Row="5" Height="60" Width="60" Style="{DynamicResource OmagCut_RightGrayGradientYellowTextButton}"/>
|
<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"
|
<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 Grid.Row="7" Grid.ColumnSpan="2">
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="1*"/>
|
<ColumnDefinition Width="1*"/>
|
||||||
<ColumnDefinition Width="1*"/>
|
<ColumnDefinition Width="1*"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
<Button Name="BackBtn" Grid.Column="1" Style="{DynamicResource OmagCut_YellowGradientYellowIconButton}">
|
<Button Name="BackBtn" Grid.Column="1"
|
||||||
<Image Source="{DynamicResource NumericKeyboardArrowImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
Style="{DynamicResource OmagCut_YellowGradientYellowIconButton}">
|
||||||
|
<Image Source="{DynamicResource NumericKeyboardArrowImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||||
</Button>
|
</Button>
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
</Border>
|
</Border>
|
||||||
|
|||||||
@@ -53,14 +53,43 @@ Public Class ManualAxesMoveUC
|
|||||||
' Imposto check per considerare spessore lama
|
' Imposto check per considerare spessore lama
|
||||||
L1SawThChBx.IsChecked = m_MainWindow.m_CurrentMachine.bAddSawThTo5AxMove
|
L1SawThChBx.IsChecked = m_MainWindow.m_CurrentMachine.bAddSawThTo5AxMove
|
||||||
L2SawThChBx.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
|
End Sub
|
||||||
|
|
||||||
Private Sub ManualAxesMove_UnLoaded(sender As Object, e As RoutedEventArgs) Handles Me.Unloaded
|
Private Sub ManualAxesMove_UnLoaded(sender As Object, e As RoutedEventArgs) Handles Me.Unloaded
|
||||||
m_Timer.Stop()
|
m_Timer.Stop()
|
||||||
m_MainWindow.m_CurrentMachine.bAddSawThTo5AxMove = (L1SawThChBx.IsEnabled And L1SawThChBx.IsChecked) Or
|
m_MainWindow.m_CurrentMachine.bAddSawThTo5AxMove = (L1SawThChBx.IsEnabled And L1SawThChBx.IsChecked) Or
|
||||||
(L2SawThChBx.IsEnabled And L2SawThChBx.IsChecked)
|
(L2SawThChBx.IsEnabled And L2SawThChBx.IsChecked)
|
||||||
|
' Nascondo la macchina
|
||||||
|
m_MainWindow.m_DirectCutPageUC.m_bShowMachine = False
|
||||||
|
EgtSetMachineLook(MCH_LOOK.TAB)
|
||||||
|
EgtDraw()
|
||||||
End Sub
|
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()
|
Private Sub UpdateAxesNames()
|
||||||
Dim sL1 As String = String.Empty
|
Dim sL1 As String = String.Empty
|
||||||
Dim sL2 As String = String.Empty
|
Dim sL2 As String = String.Empty
|
||||||
@@ -125,11 +154,16 @@ Public Class ManualAxesMoveUC
|
|||||||
Private Sub Timer_tick()
|
Private Sub Timer_tick()
|
||||||
UpdateAxesNames()
|
UpdateAxesNames()
|
||||||
UpdateUseSawThickness()
|
UpdateUseSawThickness()
|
||||||
|
' Aggiorno posizione macchina in disegno
|
||||||
|
SetMachineInCurrPos()
|
||||||
|
' Aggiorno il disegno
|
||||||
|
EgtDraw()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private m_MoveClicked As Boolean = False
|
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
|
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
|
If e.ClickCount > 1 OrElse m_MoveClicked Then
|
||||||
|
EgtOutLog(" → Hold on! Do not click compulsively.")
|
||||||
Return
|
Return
|
||||||
End If
|
End If
|
||||||
m_MoveClicked = True
|
m_MoveClicked = True
|
||||||
@@ -209,13 +243,14 @@ Public Class ManualAxesMoveUC
|
|||||||
System.Threading.Thread.Sleep(150)
|
System.Threading.Thread.Sleep(150)
|
||||||
m_CN.DGeneralFunctions_CycleStart()
|
m_CN.DGeneralFunctions_CycleStart()
|
||||||
System.Threading.Thread.Sleep(m_MainWindow.m_CurrentMachine.nThreadSleep)
|
System.Threading.Thread.Sleep(m_MainWindow.m_CurrentMachine.nThreadSleep)
|
||||||
m_CN.DGeneralFunctions_WriteCncMode(7) ' Modalità manuale
|
' m_CN.DGeneralFunctions_WriteCncMode(7) ' Modalità manuale
|
||||||
m_MoveClicked = False
|
m_MoveClicked = False
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub SiemensMoveAxis(CurrentBtn As Button)
|
Private Sub SiemensMoveAxis(CurrentBtn As Button)
|
||||||
' leggo se stato reset
|
' leggo se stato reset
|
||||||
If Not m_CN.bResetState Then
|
If Not m_CN.bResetState Then
|
||||||
|
EgtOutLog("Reset status is 'False', is denied to execute file '\DirectCmd\AxesMove.lua'.")
|
||||||
m_MoveClicked = False
|
m_MoveClicked = False
|
||||||
Return
|
Return
|
||||||
End If
|
End If
|
||||||
|
|||||||
+136
-136
@@ -1,11 +1,10 @@
|
|||||||
<UserControl x:Class="MultipleCut"
|
<UserControl x:Class="MultipleCut"
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
|
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d" d:DesignHeight="597.3" d:DesignWidth="256">
|
||||||
d:DesignHeight="597.3" d:DesignWidth="256">
|
|
||||||
|
|
||||||
<!--<Border CornerRadius="{StaticResource Page_CornerRadius}" Background="{DynamicResource OmagCut_LightGray}">-->
|
<!--<Border CornerRadius="{StaticResource Page_CornerRadius}" Background="{DynamicResource OmagCut_LightGray}">-->
|
||||||
<Border Style="{DynamicResource OmagCut_DirectCutPageBorder}">
|
<Border Style="{DynamicResource OmagCut_DirectCutPageBorder}">
|
||||||
@@ -35,164 +34,164 @@
|
|||||||
<ColumnDefinition Width="1*"/>
|
<ColumnDefinition Width="1*"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
<ToggleButton Name="Point1Btn" Grid.Column="0"
|
<ToggleButton Name="Point1Btn" Grid.Column="0"
|
||||||
Style="{DynamicResource OmagCut_YellowIconToggleButton}">
|
Style="{DynamicResource OmagCut_YellowIconToggleButton}">
|
||||||
<Image Source="{DynamicResource Acquisisci-P1Img}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
<Image Source="{DynamicResource Acquisisci-P1Img}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||||
</ToggleButton>
|
</ToggleButton>
|
||||||
|
|
||||||
<ToggleButton Name="Point2Btn" Grid.Column="1"
|
<ToggleButton Name="Point2Btn" Grid.Column="1"
|
||||||
Style="{DynamicResource OmagCut_YellowIconToggleButton}">
|
Style="{DynamicResource OmagCut_YellowIconToggleButton}">
|
||||||
<Image Source="{DynamicResource Acquisisci-P2Img}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
<Image Source="{DynamicResource Acquisisci-P2Img}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||||
</ToggleButton>
|
</ToggleButton>
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
<ComboBox Name="PointModeCmBx" Grid.Row="1" Grid.ColumnSpan="2" Style="{StaticResource OmagCut_ComboBox}"
|
<ComboBox Name="PointModeCmBx" Grid.Row="1" Grid.ColumnSpan="2" Style="{DynamicResource OmagCut_ComboBox}"
|
||||||
Margin="6,0,6,0">
|
Margin="6,0,6,0">
|
||||||
<ComboBox.ItemTemplate>
|
<ComboBox.ItemTemplate>
|
||||||
<DataTemplate>
|
<DataTemplate>
|
||||||
<TextBlock Text="{Binding}" Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
<TextBlock Text="{Binding}" Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
</ComboBox.ItemTemplate>
|
</ComboBox.ItemTemplate>
|
||||||
</ComboBox>
|
</ComboBox>
|
||||||
|
|
||||||
<TextBlock Name="DepthTxBl" Grid.Column="0" Grid.Row="2"
|
<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"
|
<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"
|
<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"
|
<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"
|
<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"
|
<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"
|
<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"
|
<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 Grid.Row="6" Grid.ColumnSpan="2" Visibility="Visible">
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="0.5*"/>
|
<ColumnDefinition Width="0.5*"/>
|
||||||
<ColumnDefinition Width="1"/>
|
<ColumnDefinition Width="1"/>
|
||||||
<ColumnDefinition Width="1.5*"/>
|
<ColumnDefinition Width="1.5*"/>
|
||||||
<ColumnDefinition Width="1"/>
|
<ColumnDefinition Width="1"/>
|
||||||
<ColumnDefinition Width="1.5*"/>
|
<ColumnDefinition Width="1.5*"/>
|
||||||
<ColumnDefinition Width="0.2*"/>
|
<ColumnDefinition Width="0.2*"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="0.5*"/>
|
<RowDefinition Height="0.5*"/>
|
||||||
<RowDefinition Height="2*"/>
|
<RowDefinition Height="2*"/>
|
||||||
</Grid.RowDefinitions>
|
</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"
|
<TextBlock Name="NumPzTxBl" Grid.Column="2" Grid.Row="0"
|
||||||
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
|
Style="{DynamicResource OmagCut_CurrProjSummeryTextBlock}"/>
|
||||||
<TextBlock Name="DimPzTxBl" Grid.Column="4" Grid.Row="0"
|
<TextBlock Name="DimPzTxBl" Grid.Column="4" Grid.Row="0"
|
||||||
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
|
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">
|
<ScrollViewer VerticalScrollBarVisibility="Visible" Grid.Row="6" Grid.ColumnSpan="6" Visibility="Visible">
|
||||||
<Grid>
|
<Grid>
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="0.5*"/>
|
<ColumnDefinition Width="0.5*"/>
|
||||||
<ColumnDefinition Width="1.5*"/>
|
<ColumnDefinition Width="1.5*"/>
|
||||||
<ColumnDefinition Width="2"/>
|
<ColumnDefinition Width="2"/>
|
||||||
<ColumnDefinition Width="1.5*"/>
|
<ColumnDefinition Width="1.5*"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<Grid.RowDefinitions>
|
<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"/>
|
||||||
<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>
|
</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"
|
<TextBlock Name="Num1TxBl" Grid.Column="0" Grid.Row="0"
|
||||||
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}" HorizontalAlignment="Center"/>
|
Style="{DynamicResource OmagCut_CurrProjSummeryTextBlock}" HorizontalAlignment="Center"/>
|
||||||
<EgtWPFLib:EgtTextBox Name="NumPz1TxBx" Grid.Column="1" Grid.Row="0" Width="75" IsLength="False"
|
<EgtWPFLib:EgtTextBox Name="NumPz1TxBx" Grid.Column="1" Grid.Row="0" Width="75" IsLength="False"
|
||||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||||
<EgtWPFLib:EgtTextBox Name="DimPz1TxBx" Grid.Column="3" Grid.Row="0" Width="75"
|
<EgtWPFLib:EgtTextBox Name="DimPz1TxBx" Grid.Column="3" Grid.Row="0" Width="75"
|
||||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||||
|
|
||||||
<TextBlock Name="Num2TxBl" Grid.Column="0" Grid.Row="1"
|
<TextBlock Name="Num2TxBl" Grid.Column="0" Grid.Row="1"
|
||||||
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}" HorizontalAlignment="Center"/>
|
Style="{DynamicResource OmagCut_CurrProjSummeryTextBlock}" HorizontalAlignment="Center"/>
|
||||||
<EgtWPFLib:EgtTextBox Name="NumPz2TxBx" Grid.Column="1" Grid.Row="1" Width="75" IsLength="False"
|
<EgtWPFLib:EgtTextBox Name="NumPz2TxBx" Grid.Column="1" Grid.Row="1" Width="75" IsLength="False"
|
||||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||||
<EgtWPFLib:EgtTextBox Name="DimPz2TxBx" Grid.Column="3" Grid.Row="1" Width="75"
|
<EgtWPFLib:EgtTextBox Name="DimPz2TxBx" Grid.Column="3" Grid.Row="1" Width="75"
|
||||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||||
|
|
||||||
<TextBlock Name="Num3TxBl" Grid.Column="0" Grid.Row="2"
|
<TextBlock Name="Num3TxBl" Grid.Column="0" Grid.Row="2"
|
||||||
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}" HorizontalAlignment="Center"/>
|
Style="{DynamicResource OmagCut_CurrProjSummeryTextBlock}" HorizontalAlignment="Center"/>
|
||||||
<EgtWPFLib:EgtTextBox Name="NumPz3TxBx" Grid.Column="1" Grid.Row="2" Width="75" IsLength="False"
|
<EgtWPFLib:EgtTextBox Name="NumPz3TxBx" Grid.Column="1" Grid.Row="2" Width="75" IsLength="False"
|
||||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||||
<EgtWPFLib:EgtTextBox Name="DimPz3TxBx" Grid.Column="3" Grid.Row="2" Width="75"
|
<EgtWPFLib:EgtTextBox Name="DimPz3TxBx" Grid.Column="3" Grid.Row="2" Width="75"
|
||||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||||
|
|
||||||
<TextBlock Name="Num4TxBl" Grid.Column="0" Grid.Row="3"
|
<TextBlock Name="Num4TxBl" Grid.Column="0" Grid.Row="3"
|
||||||
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}" HorizontalAlignment="Center"/>
|
Style="{DynamicResource OmagCut_CurrProjSummeryTextBlock}" HorizontalAlignment="Center"/>
|
||||||
<EgtWPFLib:EgtTextBox Name="NumPz4TxBx" Grid.Column="1" Grid.Row="3" Width="75" IsLength="False"
|
<EgtWPFLib:EgtTextBox Name="NumPz4TxBx" Grid.Column="1" Grid.Row="3" Width="75" IsLength="False"
|
||||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||||
<EgtWPFLib:EgtTextBox Name="DimPz4TxBx" Grid.Column="3" Grid.Row="3" Width="75"
|
<EgtWPFLib:EgtTextBox Name="DimPz4TxBx" Grid.Column="3" Grid.Row="3" Width="75"
|
||||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||||
|
|
||||||
<TextBlock Name="Num5TxBl" Grid.Column="0" Grid.Row="4"
|
<TextBlock Name="Num5TxBl" Grid.Column="0" Grid.Row="4"
|
||||||
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}" HorizontalAlignment="Center"/>
|
Style="{DynamicResource OmagCut_CurrProjSummeryTextBlock}" HorizontalAlignment="Center"/>
|
||||||
<EgtWPFLib:EgtTextBox Name="NumPz5TxBx" Grid.Column="1" Grid.Row="4" Width="75" IsLength="False"
|
<EgtWPFLib:EgtTextBox Name="NumPz5TxBx" Grid.Column="1" Grid.Row="4" Width="75" IsLength="False"
|
||||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||||
<EgtWPFLib:EgtTextBox Name="DimPz5TxBx" Grid.Column="3" Grid.Row="4" Width="75"
|
<EgtWPFLib:EgtTextBox Name="DimPz5TxBx" Grid.Column="3" Grid.Row="4" Width="75"
|
||||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||||
|
|
||||||
<TextBlock Name="Num6TxBl" Grid.Column="0" Grid.Row="5"
|
<TextBlock Name="Num6TxBl" Grid.Column="0" Grid.Row="5"
|
||||||
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}" HorizontalAlignment="Center"/>
|
Style="{DynamicResource OmagCut_CurrProjSummeryTextBlock}" HorizontalAlignment="Center"/>
|
||||||
<EgtWPFLib:EgtTextBox Name="NumPz6TxBx" Grid.Column="1" Grid.Row="5" Width="75" IsLength="False"
|
<EgtWPFLib:EgtTextBox Name="NumPz6TxBx" Grid.Column="1" Grid.Row="5" Width="75" IsLength="False"
|
||||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||||
<EgtWPFLib:EgtTextBox Name="DimPz6TxBx" Grid.Column="3" Grid.Row="5" Width="75"
|
<EgtWPFLib:EgtTextBox Name="DimPz6TxBx" Grid.Column="3" Grid.Row="5" Width="75"
|
||||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||||
|
|
||||||
<TextBlock Name="Num7TxBl" Grid.Column="0" Grid.Row="6"
|
<TextBlock Name="Num7TxBl" Grid.Column="0" Grid.Row="6"
|
||||||
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}" HorizontalAlignment="Center"/>
|
Style="{DynamicResource OmagCut_CurrProjSummeryTextBlock}" HorizontalAlignment="Center"/>
|
||||||
<EgtWPFLib:EgtTextBox Name="NumPz7TxBx" Grid.Column="1" Grid.Row="6" Width="75" IsLength="False"
|
<EgtWPFLib:EgtTextBox Name="NumPz7TxBx" Grid.Column="1" Grid.Row="6" Width="75" IsLength="False"
|
||||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||||
<EgtWPFLib:EgtTextBox Name="DimPz7TxBx" Grid.Column="3" Grid.Row="6" Width="75"
|
<EgtWPFLib:EgtTextBox Name="DimPz7TxBx" Grid.Column="3" Grid.Row="6" Width="75"
|
||||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||||
|
|
||||||
<TextBlock Name="Num8TxBl" Grid.Column="0" Grid.Row="7"
|
<TextBlock Name="Num8TxBl" Grid.Column="0" Grid.Row="7"
|
||||||
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}" HorizontalAlignment="Center"/>
|
Style="{DynamicResource OmagCut_CurrProjSummeryTextBlock}" HorizontalAlignment="Center"/>
|
||||||
<EgtWPFLib:EgtTextBox Name="NumPz8TxBx" Grid.Column="1" Grid.Row="7" Width="75" IsLength="False"
|
<EgtWPFLib:EgtTextBox Name="NumPz8TxBx" Grid.Column="1" Grid.Row="7" Width="75" IsLength="False"
|
||||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||||
<EgtWPFLib:EgtTextBox Name="DimPz8TxBx" Grid.Column="3" Grid.Row="7" Width="75"
|
<EgtWPFLib:EgtTextBox Name="DimPz8TxBx" Grid.Column="3" Grid.Row="7" Width="75"
|
||||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||||
|
|
||||||
<TextBlock Name="Num9TxBl" Grid.Column="0" Grid.Row="8"
|
<TextBlock Name="Num9TxBl" Grid.Column="0" Grid.Row="8"
|
||||||
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}" HorizontalAlignment="Center"/>
|
Style="{DynamicResource OmagCut_CurrProjSummeryTextBlock}" HorizontalAlignment="Center"/>
|
||||||
<EgtWPFLib:EgtTextBox Name="NumPz9TxBx" Grid.Column="1" Grid.Row="8" Width="75" IsLength="False"
|
<EgtWPFLib:EgtTextBox Name="NumPz9TxBx" Grid.Column="1" Grid.Row="8" Width="75" IsLength="False"
|
||||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||||
<EgtWPFLib:EgtTextBox Name="DimPz9TxBx" Grid.Column="3" Grid.Row="8" Width="75"
|
<EgtWPFLib:EgtTextBox Name="DimPz9TxBx" Grid.Column="3" Grid.Row="8" Width="75"
|
||||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||||
|
|
||||||
<TextBlock Name="Num10TxBl" Grid.Column="0" Grid.Row="9"
|
<TextBlock Name="Num10TxBl" Grid.Column="0" Grid.Row="9"
|
||||||
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}" HorizontalAlignment="Center"/>
|
Style="{DynamicResource OmagCut_CurrProjSummeryTextBlock}" HorizontalAlignment="Center"/>
|
||||||
<EgtWPFLib:EgtTextBox Name="NumPz10TxBx" Grid.Column="1" Grid.Row="9" Width="75" IsLength="False"
|
<EgtWPFLib:EgtTextBox Name="NumPz10TxBx" Grid.Column="1" Grid.Row="9" Width="75" IsLength="False"
|
||||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||||
<EgtWPFLib:EgtTextBox Name="DimPz10TxBx" Grid.Column="3" Grid.Row="9" Width="75"
|
<EgtWPFLib:EgtTextBox Name="DimPz10TxBx" Grid.Column="3" Grid.Row="9" Width="75"
|
||||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
</ScrollViewer>
|
</ScrollViewer>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
<!--<Grid Grid.Row="6" Grid.ColumnSpan="2" Visibility="Visible">
|
<!--<Grid Grid.Row="6" Grid.ColumnSpan="2" Visibility="Visible">
|
||||||
@@ -233,9 +232,10 @@
|
|||||||
</Grid>-->
|
</Grid>-->
|
||||||
|
|
||||||
<TextBlock Name="SideTxBl" Grid.Row="7" Grid.ColumnSpan="2"
|
<TextBlock Name="SideTxBl" Grid.Row="7" Grid.ColumnSpan="2"
|
||||||
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
|
Style="{DynamicResource OmagCut_CurrProjSummeryTextBlock}"/>
|
||||||
<CheckBox Name="SideChBx" Grid.Row="7" Grid.ColumnSpan="2" Style="{StaticResource OmagCut_CheckBox_Single}"
|
<CheckBox Name="SideChBx" Grid.Row="7" Grid.ColumnSpan="2"
|
||||||
HorizontalAlignment="Right" Margin="0,0,6,0"/>
|
Style="{DynamicResource OmagCut_CheckBox_Single}"
|
||||||
|
HorizontalAlignment="Right" Margin="0,0,6,0"/>
|
||||||
|
|
||||||
<Grid Grid.Row="8" Grid.ColumnSpan="2">
|
<Grid Grid.Row="8" Grid.ColumnSpan="2">
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
@@ -245,13 +245,13 @@
|
|||||||
<ColumnDefinition Width="1*"/>
|
<ColumnDefinition Width="1*"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<TextBlock Name="XcoordTxBl" Grid.Column="0" Text="X"
|
<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"
|
<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"
|
<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"
|
<EgtWPFLib:EgtTextBox Name="YcoordTxBx" Grid.Column="3" Margin="0,0,6,0"
|
||||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
<Grid Grid.Row="9" Grid.ColumnSpan="2">
|
<Grid Grid.Row="9" Grid.ColumnSpan="2">
|
||||||
@@ -261,16 +261,16 @@
|
|||||||
<ColumnDefinition Width="1*"/>
|
<ColumnDefinition Width="1*"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
<Button Name="SimulBtn" Grid.Column="0" Style="{DynamicResource OmagCut_YellowIconButton}">
|
<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>
|
||||||
<Button Name="OkBtn" Grid.Column="1" Style="{DynamicResource OmagCut_YellowIconButton}">
|
<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>
|
||||||
<Button Name="ExitBtn" Grid.Column="2" Style="{DynamicResource OmagCut_YellowIconButton}">
|
<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>
|
</Button>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
|
|||||||
@@ -38,7 +38,8 @@ Public Class MultipleCut
|
|||||||
Private m_ptPrev As Point3d
|
Private m_ptPrev As Point3d
|
||||||
' Layer per crocette temporanee
|
' Layer per crocette temporanee
|
||||||
Private m_nTempLay As Integer = GDB_ID.NULL
|
Private m_nTempLay As Integer = GDB_ID.NULL
|
||||||
|
' Gestione spessore lama
|
||||||
|
Private m_bSawTh As Boolean = False
|
||||||
' Costanti
|
' Costanti
|
||||||
Private Const MAX_TAB_DEPTH As Double = 10.0
|
Private Const MAX_TAB_DEPTH As Double = 10.0
|
||||||
Private Const MIN_CUT_LEN 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
|
Private Sub MultipleCut_Initialized(sender As Object, e As EventArgs) Handles Me.Initialized
|
||||||
' Creo lista modalità di acquisizione punto
|
' Creo lista modalità di acquisizione punto
|
||||||
m_PointsModeArray(PT_MODE.SAW) = EgtMsg(MSG_DIRECTCUTPAGEUC + 24)
|
m_PointsModeArray(PT_MODE.SAW) = EgtMsg(90224) ' Lama
|
||||||
m_PointsModeArray(PT_MODE.LASER) = EgtMsg(MSG_DIRECTCUTPAGEUC + 12)
|
m_PointsModeArray(PT_MODE.LASER) = EgtMsg(90212) ' Laser
|
||||||
m_PointsModeArray(PT_MODE.DRAW) = EgtMsg(MSG_DIRECTCUTPAGEUC + 25)
|
m_PointsModeArray(PT_MODE.DRAW) = EgtMsg(90225) ' Disegno
|
||||||
' la associo alla combobox
|
' la associo alla combobox
|
||||||
PointModeCmBx.ItemsSource = m_PointsModeArray
|
PointModeCmBx.ItemsSource = m_PointsModeArray
|
||||||
' assegno messaggi
|
' assegno messaggi
|
||||||
Point1Btn.ToolTip = EgtMsg(MSG_DIRECTCUTPAGEUC + 10)
|
Point1Btn.ToolTip = EgtMsg(90210) ' Acquisisci P1
|
||||||
Point2Btn.ToolTip = EgtMsg(MSG_DIRECTCUTPAGEUC + 11)
|
Point2Btn.ToolTip = EgtMsg(90211) ' Acquisisci P2
|
||||||
DepthTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 13)
|
DepthTxBl.Text = EgtMsg(90213) ' Affondamento
|
||||||
LenghtTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 14)
|
LenghtTxBl.Text = EgtMsg(90214) ' Lunghezza
|
||||||
DirectionTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 15)
|
DirectionTxBl.Text = EgtMsg(90215) ' Direzione
|
||||||
SideAngleTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 16)
|
SideAngleTxBl.Text = EgtMsg(90216) ' Inclinazione
|
||||||
NumPzTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 17)
|
NumPzTxBl.Text = EgtMsg(90217) ' Numero
|
||||||
DimPzTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 18)
|
DimPzTxBl.Text = EgtMsg(90218) ' Dimensioni
|
||||||
SideTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 23)
|
SideTxBl.Text = EgtMsg(90223) ' Tagli lato motore
|
||||||
SimulBtn.ToolTip = EgtMsg(MSG_CADCUTPAGEUC + 1)
|
SimulBtn.ToolTip = EgtMsg(90301) ' Simula
|
||||||
OkBtn.ToolTip = EgtMsg(MSG_DIRECTCUTPAGEUC + 30)
|
OkBtn.ToolTip = EgtMsg(90230) ' Esegui
|
||||||
Num1TxBl.Text = "1"
|
Num1TxBl.Text = "1"
|
||||||
Num2TxBl.Text = "2"
|
Num2TxBl.Text = "2"
|
||||||
Num3TxBl.Text = "3"
|
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_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())
|
m_dAngV = GetPrivateProfileDouble( S_DIRECTCUTS, K_DC_MULT_ANGV, m_dAngV, m_MainWindow.GetIniFile())
|
||||||
For nI As Integer = 0 To 9
|
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_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_dDim(nI) = GetPrivateProfileDouble(S_DIRECTCUTS, K_DC_MULT_DIM & (nI + 1).ToString(), 0, m_MainWindow.GetIniFile())
|
||||||
Next
|
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_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.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())
|
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()
|
NumPz10TxBx.Text = m_nNum(9).ToString()
|
||||||
DimPz10TxBx.Text = LenToString( m_dDim(9), 1)
|
DimPz10TxBx.Text = LenToString( m_dDim(9), 1)
|
||||||
SideChBx.IsChecked = m_bHeadSide
|
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
|
' Reset taglio e disabilito bottone esecuzione
|
||||||
m_bCutOk = False
|
m_bCutOk = False
|
||||||
UpdateSimulOkBtn()
|
UpdateSimulOkBtn()
|
||||||
@@ -274,6 +285,12 @@ Public Class MultipleCut
|
|||||||
' Verifico configurazione tavola e grezzo
|
' Verifico configurazione tavola e grezzo
|
||||||
If Not m_bRawOk Then Return
|
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
|
' Recupero dati utensile e testa corrente
|
||||||
Dim sTool As String = ""
|
Dim sTool As String = ""
|
||||||
Dim sHead As String = ""
|
Dim sHead As String = ""
|
||||||
@@ -286,6 +303,13 @@ Public Class MultipleCut
|
|||||||
' Recupero la posizione macchina
|
' Recupero la posizione macchina
|
||||||
Dim dL1, dL2, dL3, dR1, dR2 As Double
|
Dim dL1, dL2, dL3, dR1, dR2 As Double
|
||||||
If Not m_MainWindow.m_CNCommunication.GetAxesPositions(dL1, dL2, dL3, dR1, dR2) Then Return
|
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
|
' Ricavo dati lama corrente
|
||||||
Dim sSaw As String = m_MainWindow.m_CurrentMachine.sCurrSaw
|
Dim sSaw As String = m_MainWindow.m_CurrentMachine.sCurrSaw
|
||||||
' Se punto da laser
|
' Se punto da laser
|
||||||
@@ -293,7 +317,7 @@ Public Class MultipleCut
|
|||||||
' Imposto come testa corrente il laser (senza utensile ovviamente)
|
' Imposto come testa corrente il laser (senza utensile ovviamente)
|
||||||
If Not EgtSetCalcTool("", "H3", 1) Then Return
|
If Not EgtSetCalcTool("", "H3", 1) Then Return
|
||||||
' Trasformo in posizione punta utensile in basso
|
' 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
|
' Reimposto eventuale precedente utensile
|
||||||
EgtSetCalcTool(sTool, sHead, nExit)
|
EgtSetCalcTool(sTool, sHead, nExit)
|
||||||
|
|
||||||
@@ -303,10 +327,10 @@ Public Class MultipleCut
|
|||||||
EgtSetCalcTool(sTool, sHead, nExit)
|
EgtSetCalcTool(sTool, sHead, nExit)
|
||||||
|
|
||||||
' Trasformo in posizione punta utensile in basso
|
' 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
|
End If
|
||||||
' Calcolo direzione asse lama
|
' 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
|
' Porto il tip nell'origine tavola
|
||||||
m_ptTipP1.ToLoc(New Frame3d(m_ptTabOri))
|
m_ptTipP1.ToLoc(New Frame3d(m_ptTabOri))
|
||||||
m_bPointP1Ok = True
|
m_bPointP1Ok = True
|
||||||
@@ -354,6 +378,12 @@ Public Class MultipleCut
|
|||||||
' Verifico configurazione tavola e grezzo
|
' Verifico configurazione tavola e grezzo
|
||||||
If Not m_bRawOk Then Return
|
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
|
' Recupero dati utensile e testa corrente
|
||||||
Dim sTool As String = ""
|
Dim sTool As String = ""
|
||||||
Dim sHead As String = ""
|
Dim sHead As String = ""
|
||||||
@@ -366,6 +396,13 @@ Public Class MultipleCut
|
|||||||
' Recupero la posizione macchina
|
' Recupero la posizione macchina
|
||||||
Dim dL1, dL2, dL3, dR1, dR2 As Double
|
Dim dL1, dL2, dL3, dR1, dR2 As Double
|
||||||
If Not m_MainWindow.m_CNCommunication.GetAxesPositions(dL1, dL2, dL3, dR1, dR2) Then Return
|
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
|
' Ricavo dati lama corrente
|
||||||
Dim sSaw As String = m_MainWindow.m_CurrentMachine.sCurrSaw
|
Dim sSaw As String = m_MainWindow.m_CurrentMachine.sCurrSaw
|
||||||
' Se punto da laser
|
' Se punto da laser
|
||||||
@@ -373,7 +410,7 @@ Public Class MultipleCut
|
|||||||
' Imposto come testa corrente il laser (senza utensile ovviamente)
|
' Imposto come testa corrente il laser (senza utensile ovviamente)
|
||||||
If Not EgtSetCalcTool("", "H3", 1) Then Return
|
If Not EgtSetCalcTool("", "H3", 1) Then Return
|
||||||
' Trasformo in posizione punta utensile in basso
|
' 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
|
' Reimposto eventuale precedente utensile
|
||||||
EgtSetCalcTool(sTool, sHead, nExit)
|
EgtSetCalcTool(sTool, sHead, nExit)
|
||||||
' Altrimenti da lama
|
' Altrimenti da lama
|
||||||
@@ -381,10 +418,10 @@ Public Class MultipleCut
|
|||||||
' Reimposto eventuale precedente utensile
|
' Reimposto eventuale precedente utensile
|
||||||
EgtSetCalcTool(sTool, sHead, nExit)
|
EgtSetCalcTool(sTool, sHead, nExit)
|
||||||
' Trasformo in posizione punta utensile in basso
|
' 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
|
End If
|
||||||
' Calcolo direzione asse lama
|
' 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
|
' Porto il tip nell'origine tavola
|
||||||
m_ptTipP2.ToLoc(New Frame3d(m_ptTabOri))
|
m_ptTipP2.ToLoc(New Frame3d(m_ptTabOri))
|
||||||
m_bPointP2Ok = True
|
m_bPointP2Ok = True
|
||||||
@@ -435,7 +472,7 @@ Public Class MultipleCut
|
|||||||
|
|
||||||
Private Sub DepthTxBx_EgtClosed(sender As Object, e As EventArgs) Handles DepthTxBx.EgtClosed
|
Private Sub DepthTxBx_EgtClosed(sender As Object, e As EventArgs) Handles DepthTxBx.EgtClosed
|
||||||
' Verifico che l'affondamento impostato non sia superiore a quello massimo
|
' Verifico che l'affondamento impostato non sia superiore a quello massimo
|
||||||
Dim dMaxDepth = m_ptRawMax.z - m_ptRawMin.z + MAX_TAB_DEPTH
|
Dim dMaxDepth = m_ptRawMax.z - m_ptRawMin.z + m_MainWindow.m_CurrentMachine.MaxTabDepth
|
||||||
Dim dDepth As Double = 0
|
Dim dDepth As Double = 0
|
||||||
StringToLen(DepthTxBx.Text, dDepth)
|
StringToLen(DepthTxBx.Text, dDepth)
|
||||||
If dDepth < 0 Then
|
If dDepth < 0 Then
|
||||||
@@ -569,13 +606,15 @@ Public Class MultipleCut
|
|||||||
m_CurrProjPage.SetErrorMessage(EgtMsg(90314)) 'Errore nella generazione del programma CN
|
m_CurrProjPage.SetErrorMessage(EgtMsg(90314)) 'Errore nella generazione del programma CN
|
||||||
Return
|
Return
|
||||||
End If
|
End If
|
||||||
|
Dim sNameProg As Integer = 900
|
||||||
|
sNameProg = GetPrivateProfileInt(S_PARTPROGRAM, "NameProg", sNameProg, m_MainWindow.GetMachIniFile)
|
||||||
' Download programma (eventuali errori sono segnalati dalla funzione)
|
' 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
|
' copio il progetto corrente come progetto in lavorazione
|
||||||
Dim sWrkPath As String = m_MainWindow.GetTempDir() & "\" & "WorkProj.nge"
|
Dim sWrkPath As String = m_MainWindow.GetTempDir() & "\" & "WorkProj.nge"
|
||||||
My.Computer.FileSystem.CopyFile(sMchPath, sWrkPath, True)
|
My.Computer.FileSystem.CopyFile(sMchPath, sWrkPath, True)
|
||||||
' lancio eventuale lua post-trasmissione
|
' lancio eventuale lua post-trasmissione
|
||||||
m_MainWindow.ExecSentProgScript( True)
|
m_MainWindow.ExecSentProgScript(True)
|
||||||
End If
|
End If
|
||||||
#End If
|
#End If
|
||||||
End Sub
|
End Sub
|
||||||
@@ -606,6 +645,22 @@ Public Class MultipleCut
|
|||||||
Dim ptStart As Point3d = m_ptTipP1
|
Dim ptStart As Point3d = m_ptTipP1
|
||||||
ptStart.z = 0
|
ptStart.z = 0
|
||||||
Dim nCutId = EgtCreateLinePDL(nLayerId, ptStart, m_dAngO, m_dLen)
|
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
|
' Imposto affondamento e angolo di fianco sul taglio
|
||||||
EgtSetInfo(nCutId, INFO_DEPTH, m_dDepth)
|
EgtSetInfo(nCutId, INFO_DEPTH, m_dDepth)
|
||||||
EgtSetInfo(nCutId, INFO_SIDE_ANGLE, m_dAngV)
|
EgtSetInfo(nCutId, INFO_SIDE_ANGLE, m_dAngV)
|
||||||
@@ -698,6 +753,7 @@ Public Class MultipleCut
|
|||||||
End Function
|
End Function
|
||||||
|
|
||||||
Private Function CreateCross(nLayerId As Integer, ptP As Point3d) As Boolean
|
Private Function CreateCross(nLayerId As Integer, ptP As Point3d) As Boolean
|
||||||
|
ptP += New Vector3d(0, 0, 0.15)
|
||||||
' Aggiungo crocette
|
' Aggiungo crocette
|
||||||
Dim vtCrossX As New Vector3d(20, 0, 0)
|
Dim vtCrossX As New Vector3d(20, 0, 0)
|
||||||
Dim vtCrossY As New Vector3d(0, 20, 0)
|
Dim vtCrossY As New Vector3d(0, 20, 0)
|
||||||
|
|||||||
+18
-20
@@ -1,11 +1,10 @@
|
|||||||
<UserControl x:Class="Polishing"
|
<UserControl x:Class="Polishing"
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
|
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d" d:DesignHeight="597.3" d:DesignWidth="256">
|
||||||
d:DesignHeight="597.3" d:DesignWidth="256">
|
|
||||||
|
|
||||||
<!--<Border CornerRadius="{StaticResource Page_CornerRadius}" Background="{DynamicResource OmagCut_LightGray}">-->
|
<!--<Border CornerRadius="{StaticResource Page_CornerRadius}" Background="{DynamicResource OmagCut_LightGray}">-->
|
||||||
<Border Style="{DynamicResource OmagCut_DirectCutPageBorder}">
|
<Border Style="{DynamicResource OmagCut_DirectCutPageBorder}">
|
||||||
@@ -36,13 +35,12 @@
|
|||||||
<ColumnDefinition Width="1*"/>
|
<ColumnDefinition Width="1*"/>
|
||||||
<ColumnDefinition Width="1*"/>
|
<ColumnDefinition Width="1*"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
</Grid>
|
</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>
|
<ComboBox.ItemTemplate>
|
||||||
<DataTemplate>
|
<DataTemplate>
|
||||||
<TextBlock Text="{Binding}" Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
<TextBlock Text="{Binding}" Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
</ComboBox.ItemTemplate>
|
</ComboBox.ItemTemplate>
|
||||||
</ComboBox>
|
</ComboBox>
|
||||||
@@ -63,16 +61,16 @@
|
|||||||
<ColumnDefinition Width="1*"/>
|
<ColumnDefinition Width="1*"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
<Button Name="SimulBtn" Grid.Column="0" Style="{DynamicResource OmagCut_YellowIconButton}">
|
<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>
|
||||||
<Button Name="OkBtn" Grid.Column="1" Style="{DynamicResource OmagCut_YellowIconButton}">
|
<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>
|
||||||
<Button Name="ExitBtn" Grid.Column="2" Style="{DynamicResource OmagCut_YellowIconButton}">
|
<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>
|
</Button>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
|
|||||||
@@ -25,8 +25,8 @@ Public Class Polishing
|
|||||||
|
|
||||||
Private Sub Polishing_Initialized(sender As Object, e As EventArgs) Handles Me.Initialized
|
Private Sub Polishing_Initialized(sender As Object, e As EventArgs) Handles Me.Initialized
|
||||||
' assegno messaggi
|
' assegno messaggi
|
||||||
SimulBtn.ToolTip = EgtMsg(MSG_CADCUTPAGEUC + 1)
|
SimulBtn.ToolTip = EgtMsg(90301) ' Simula
|
||||||
OkBtn.ToolTip = EgtMsg(MSG_DIRECTCUTPAGEUC + 30)
|
OkBtn.ToolTip = EgtMsg(90230) ' Esegui
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub Polishing_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded
|
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
|
m_CurrProjPage.SetErrorMessage(EgtMsg(90314)) 'Errore nella generazione del programma CN
|
||||||
Return
|
Return
|
||||||
End If
|
End If
|
||||||
|
Dim sNameProg As Integer = 900
|
||||||
|
sNameProg = GetPrivateProfileInt(S_PARTPROGRAM, "NameProg", sNameProg, m_MainWindow.GetMachIniFile)
|
||||||
' Download programma (eventuali errori sono segnalati dalla funzione)
|
' 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
|
' copio il progetto corrente come progetto in lavorazione
|
||||||
Dim sWrkPath As String = m_MainWindow.GetTempDir() & "\" & "WorkProj.nge"
|
Dim sWrkPath As String = m_MainWindow.GetTempDir() & "\" & "WorkProj.nge"
|
||||||
My.Computer.FileSystem.CopyFile(sMchPath, sWrkPath, True)
|
My.Computer.FileSystem.CopyFile(sMchPath, sWrkPath, True)
|
||||||
' lancio eventuale lua post-trasmissione
|
' lancio eventuale lua post-trasmissione
|
||||||
m_MainWindow.ExecSentProgScript( True)
|
m_MainWindow.ExecSentProgScript(True)
|
||||||
End If
|
End If
|
||||||
#End If
|
#End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|||||||
+39
-40
@@ -1,12 +1,11 @@
|
|||||||
<UserControl x:Class="SawTestUC"
|
<UserControl x:Class="SawTestUC"
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
|
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d" d:DesignHeight="597.3" d:DesignWidth="256">
|
||||||
d:DesignHeight="597.3" d:DesignWidth="256">
|
|
||||||
|
|
||||||
<!--<Border CornerRadius="{StaticResource Page_CornerRadius}" Background="{DynamicResource OmagCut_LightGray}">-->
|
<!--<Border CornerRadius="{StaticResource Page_CornerRadius}" Background="{DynamicResource OmagCut_LightGray}">-->
|
||||||
<Border Style="{DynamicResource OmagCut_DirectCutPageBorder}">
|
<Border Style="{DynamicResource OmagCut_DirectCutPageBorder}">
|
||||||
|
|
||||||
@@ -37,46 +36,46 @@
|
|||||||
<ColumnDefinition Width="1*"/>
|
<ColumnDefinition Width="1*"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
<ToggleButton Name="Point1Btn" Grid.Column="0"
|
<ToggleButton Name="Point1Btn" Grid.Column="0"
|
||||||
Style="{DynamicResource OmagCut_YellowIconToggleButton}">
|
Style="{DynamicResource OmagCut_YellowIconToggleButton}">
|
||||||
<Image Source="{DynamicResource Acquisisci-P1Img}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
<Image Source="{DynamicResource Acquisisci-P1Img}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||||
</ToggleButton>
|
</ToggleButton>
|
||||||
|
|
||||||
<ToggleButton Name="Point2Btn" Grid.Column="1"
|
<ToggleButton Name="Point2Btn" Grid.Column="1"
|
||||||
Style="{DynamicResource OmagCut_YellowIconToggleButton}">
|
Style="{DynamicResource OmagCut_YellowIconToggleButton}">
|
||||||
<Image Source="{DynamicResource Acquisisci-P2Img}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
<Image Source="{DynamicResource Acquisisci-P2Img}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||||
</ToggleButton>
|
</ToggleButton>
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
<ComboBox Name="PointModeCmBx" Grid.Row="1" Grid.ColumnSpan="2" Style="{StaticResource OmagCut_ComboBox}"
|
<ComboBox Name="PointModeCmBx" Grid.Row="1" Grid.ColumnSpan="2" Style="{DynamicResource OmagCut_ComboBox}"
|
||||||
Margin="6,0,6,0">
|
Margin="6,0,6,0">
|
||||||
<ComboBox.ItemTemplate>
|
<ComboBox.ItemTemplate>
|
||||||
<DataTemplate>
|
<DataTemplate>
|
||||||
<TextBlock Text="{Binding}" Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
<TextBlock Text="{Binding}" Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
</ComboBox.ItemTemplate>
|
</ComboBox.ItemTemplate>
|
||||||
</ComboBox>
|
</ComboBox>
|
||||||
|
|
||||||
<TextBlock Name="DepthTxBl" Grid.Column="0" Grid.Row="2"
|
<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"
|
<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"
|
<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"
|
<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"
|
<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"
|
<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"
|
<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"
|
<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 Grid.Row="11" Grid.ColumnSpan="2">
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
@@ -85,17 +84,17 @@
|
|||||||
<ColumnDefinition Width="1*"/>
|
<ColumnDefinition Width="1*"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
<Button Name="SimulBtn" Grid.Column="0" Style="{DynamicResource OmagCut_YellowIconButton}">
|
<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>
|
||||||
<Button Name="OkBtn" Grid.Column="1" Style="{DynamicResource OmagCut_YellowIconButton}">
|
<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>
|
||||||
<Button Name="ExitBtn" Grid.Column="2" Style="{DynamicResource OmagCut_YellowIconButton}">
|
<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>
|
</Button>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
</Border>
|
</Border>
|
||||||
|
|||||||
@@ -53,20 +53,20 @@ Public Class SawTestUC
|
|||||||
|
|
||||||
Private Sub SawTest_Initialized(sender As Object, e As EventArgs) Handles Me.Initialized
|
Private Sub SawTest_Initialized(sender As Object, e As EventArgs) Handles Me.Initialized
|
||||||
' Creo lista modalità di acquisizione punto
|
' Creo lista modalità di acquisizione punto
|
||||||
m_PointsModeArray(PT_MODE.SAW) = EgtMsg(MSG_DIRECTCUTPAGEUC + 24)
|
m_PointsModeArray(PT_MODE.SAW) = EgtMsg(90224) ' Lama
|
||||||
m_PointsModeArray(PT_MODE.LASER) = EgtMsg(MSG_DIRECTCUTPAGEUC + 12)
|
m_PointsModeArray(PT_MODE.LASER) = EgtMsg(90212) ' Laser
|
||||||
m_PointsModeArray(PT_MODE.DRAW) = EgtMsg(MSG_DIRECTCUTPAGEUC + 25)
|
m_PointsModeArray(PT_MODE.DRAW) = EgtMsg(90225) ' Disegno
|
||||||
' la associo alla combobox
|
' la associo alla combobox
|
||||||
PointModeCmBx.ItemsSource = m_PointsModeArray
|
PointModeCmBx.ItemsSource = m_PointsModeArray
|
||||||
' assegno messaggi
|
' assegno messaggi
|
||||||
Point1Btn.ToolTip = EgtMsg(MSG_DIRECTCUTPAGEUC + 10)
|
Point1Btn.ToolTip = EgtMsg(90210) ' Acquisci P1
|
||||||
Point2Btn.ToolTip = EgtMsg(MSG_DIRECTCUTPAGEUC + 11)
|
Point2Btn.ToolTip = EgtMsg(90211) ' Acquisici P2
|
||||||
DepthTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 13)
|
DepthTxBl.Text = EgtMsg(90213) ' Affondamento
|
||||||
LenghtTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 14)
|
LenghtTxBl.Text = EgtMsg(90214) ' Lunghezza
|
||||||
DirectionTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 15)
|
DirectionTxBl.Text = EgtMsg(90215) ' Direzione
|
||||||
OffsetTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 28)
|
OffsetTxBl.Text = EgtMsg(90228) ' Offset
|
||||||
SimulBtn.ToolTip = EgtMsg(MSG_CADCUTPAGEUC + 1)
|
SimulBtn.ToolTip = EgtMsg(90301) ' Simula
|
||||||
OkBtn.ToolTip = EgtMsg(MSG_DIRECTCUTPAGEUC + 30)
|
OkBtn.ToolTip = EgtMsg(90230) ' Esegui
|
||||||
' Carico i dati dell'ultimo test
|
' Carico i dati dell'ultimo test
|
||||||
m_dDepth = GetPrivateProfileDouble( S_DIRECTCUTS, K_DC_TEST_DEPTH, m_dDepth, m_MainWindow.GetIniFile())
|
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())
|
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
|
' Verifico configurazione tavola e grezzo
|
||||||
If Not m_bRawOk Then Return
|
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
|
' Se acquisizone lama o laser
|
||||||
If PointModeCmBx.SelectedIndex = PT_MODE.SAW Or PointModeCmBx.SelectedIndex = PT_MODE.LASER Then
|
If PointModeCmBx.SelectedIndex = PT_MODE.SAW Or PointModeCmBx.SelectedIndex = PT_MODE.LASER Then
|
||||||
' Recupero la posizione macchina
|
' Recupero la posizione macchina
|
||||||
Dim dL1, dL2, dL3, dR1, dR2 As Double
|
Dim dL1, dL2, dL3, dR1, dR2 As Double
|
||||||
If Not m_MainWindow.m_CNCommunication.GetAxesPositions(dL1, dL2, dL3, dR1, dR2) Then Return
|
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
|
' Se punto da laser
|
||||||
If PointModeCmBx.SelectedIndex = PT_MODE.LASER Then
|
If PointModeCmBx.SelectedIndex = PT_MODE.LASER Then
|
||||||
' Imposto come testa corrente il laser (senza utensile ovviamente)
|
' Imposto come testa corrente il laser (senza utensile ovviamente)
|
||||||
If Not EgtSetCalcTool("", "H3", 1) Then Return
|
If Not EgtSetCalcTool("", "H3", 1) Then Return
|
||||||
' Trasformo in posizione punta utensile in basso
|
' 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
|
' Ora imposto la lama corrente
|
||||||
If Not EgtSetCalcTool(m_sSaw, "H1", 1) Then Return
|
If Not EgtSetCalcTool(m_sSaw, "H1", 1) Then Return
|
||||||
' Altrimenti da lama
|
' Altrimenti da lama
|
||||||
@@ -228,10 +241,10 @@ Public Class SawTestUC
|
|||||||
' Imposto la lama corrente
|
' Imposto la lama corrente
|
||||||
If Not EgtSetCalcTool(m_sSaw, "H1", 1) Then Return
|
If Not EgtSetCalcTool(m_sSaw, "H1", 1) Then Return
|
||||||
' Trasformo in posizione punta utensile in basso
|
' 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
|
End If
|
||||||
' Calcolo direzione asse lama
|
' 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
|
' Porto il tip nell'origine tavola
|
||||||
m_ptTipP1.ToLoc(New Frame3d(m_ptTabOri))
|
m_ptTipP1.ToLoc(New Frame3d(m_ptTabOri))
|
||||||
m_bPointP1Ok = True
|
m_bPointP1Ok = True
|
||||||
@@ -280,17 +293,30 @@ Public Class SawTestUC
|
|||||||
' Verifico configurazione tavola e grezzo
|
' Verifico configurazione tavola e grezzo
|
||||||
If Not m_bRawOk Then Return
|
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
|
' Se acquisizone lama o laser
|
||||||
If PointModeCmBx.SelectedIndex = PT_MODE.SAW Or PointModeCmBx.SelectedIndex = PT_MODE.LASER Then
|
If PointModeCmBx.SelectedIndex = PT_MODE.SAW Or PointModeCmBx.SelectedIndex = PT_MODE.LASER Then
|
||||||
' Recupero la posizione macchina
|
' Recupero la posizione macchina
|
||||||
Dim dL1, dL2, dL3, dR1, dR2 As Double
|
Dim dL1, dL2, dL3, dR1, dR2 As Double
|
||||||
If Not m_MainWindow.m_CNCommunication.GetAxesPositions(dL1, dL2, dL3, dR1, dR2) Then Return
|
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
|
' Se punto da laser
|
||||||
If PointModeCmBx.SelectedIndex = PT_MODE.LASER Then
|
If PointModeCmBx.SelectedIndex = PT_MODE.LASER Then
|
||||||
' Imposto come testa corrente il laser (senza utensile ovviamente)
|
' Imposto come testa corrente il laser (senza utensile ovviamente)
|
||||||
If Not EgtSetCalcTool("", "H3", 1) Then Return
|
If Not EgtSetCalcTool("", "H3", 1) Then Return
|
||||||
' Trasformo in posizione punta utensile in basso
|
' 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
|
' Ora imposto la lama corrente
|
||||||
If Not EgtSetCalcTool(m_sSaw, "H1", 1) Then Return
|
If Not EgtSetCalcTool(m_sSaw, "H1", 1) Then Return
|
||||||
' Altrimenti da lama
|
' Altrimenti da lama
|
||||||
@@ -298,10 +324,10 @@ Public Class SawTestUC
|
|||||||
' Imposto la lama corrente
|
' Imposto la lama corrente
|
||||||
If Not EgtSetCalcTool(m_sSaw, "H1", 1) Then Return
|
If Not EgtSetCalcTool(m_sSaw, "H1", 1) Then Return
|
||||||
' Trasformo in posizione punta utensile in basso
|
' 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
|
End If
|
||||||
' Calcolo direzione asse lama
|
' 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
|
' Porto il tip nell'origine tavola
|
||||||
m_ptTipP2.ToLoc(New Frame3d(m_ptTabOri))
|
m_ptTipP2.ToLoc(New Frame3d(m_ptTabOri))
|
||||||
m_bPointP2Ok = True
|
m_bPointP2Ok = True
|
||||||
@@ -351,7 +377,7 @@ Public Class SawTestUC
|
|||||||
|
|
||||||
Private Sub DepthTxBx_EgtClosed(sender As Object, e As EventArgs) Handles DepthTxBx.EgtClosed
|
Private Sub DepthTxBx_EgtClosed(sender As Object, e As EventArgs) Handles DepthTxBx.EgtClosed
|
||||||
' Verifico che l'affondamento impostato non sia superiore a quello massimo
|
' Verifico che l'affondamento impostato non sia superiore a quello massimo
|
||||||
Dim dMaxDepth = m_ptRawMax.z - m_ptRawMin.z + MAX_TAB_DEPTH
|
Dim dMaxDepth = m_ptRawMax.z - m_ptRawMin.z + m_MainWindow.m_CurrentMachine.MaxTabDepth
|
||||||
Dim dDepth As Double = 0
|
Dim dDepth As Double = 0
|
||||||
StringToLen(DepthTxBx.Text, dDepth)
|
StringToLen(DepthTxBx.Text, dDepth)
|
||||||
If dDepth < 0 Then
|
If dDepth < 0 Then
|
||||||
@@ -450,13 +476,15 @@ Public Class SawTestUC
|
|||||||
m_CurrProjPage.SetErrorMessage(EgtMsg(90314)) 'Errore nella generazione del programma CN
|
m_CurrProjPage.SetErrorMessage(EgtMsg(90314)) 'Errore nella generazione del programma CN
|
||||||
Return
|
Return
|
||||||
End If
|
End If
|
||||||
|
Dim sNameProg As Integer = 900
|
||||||
|
sNameProg = GetPrivateProfileInt(S_PARTPROGRAM, "NameProg", sNameProg, m_MainWindow.GetMachIniFile)
|
||||||
' Download programma (eventuali errori sono segnalati dalla funzione)
|
' 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
|
' copio il progetto corrente come progetto in lavorazione
|
||||||
Dim sWrkPath As String = m_MainWindow.GetTempDir() & "\" & "WorkProj.nge"
|
Dim sWrkPath As String = m_MainWindow.GetTempDir() & "\" & "WorkProj.nge"
|
||||||
My.Computer.FileSystem.CopyFile(sMchPath, sWrkPath, True)
|
My.Computer.FileSystem.CopyFile(sMchPath, sWrkPath, True)
|
||||||
' lancio eventuale lua post-trasmissione
|
' lancio eventuale lua post-trasmissione
|
||||||
m_MainWindow.ExecSentProgScript( True)
|
m_MainWindow.ExecSentProgScript(True)
|
||||||
End If
|
End If
|
||||||
#End If
|
#End If
|
||||||
End Sub
|
End Sub
|
||||||
@@ -502,6 +530,10 @@ Public Class SawTestUC
|
|||||||
ElseIf nWSide = MCH_SAW_WS.LEFT Then
|
ElseIf nWSide = MCH_SAW_WS.LEFT Then
|
||||||
vtPerp = vtDir
|
vtPerp = vtDir
|
||||||
vtPerp.Rotate(Vector3d.Z_AX, +90)
|
vtPerp.Rotate(Vector3d.Z_AX, +90)
|
||||||
|
Else
|
||||||
|
m_CurrProjPage.ClearMessage()
|
||||||
|
' 91143 = Set machining side: right or left.
|
||||||
|
m_CurrProjPage.SetInfoMessage(EgtMsg(91143))
|
||||||
End If
|
End If
|
||||||
Dim ptEnd As Point3d = ptStart + vtDir * m_dLen + vtPerp * dThick
|
Dim ptEnd As Point3d = ptStart + vtDir * m_dLen + vtPerp * dThick
|
||||||
Dim dLen2 As Double = m_dLen / 2
|
Dim dLen2 As Double = m_dLen / 2
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
Imports EgtUILib
|
Imports EgtUILib
|
||||||
|
|
||||||
Public Class SingleCutAuto
|
Public Class SingleCutAuto
|
||||||
' Riferimenti a pagine
|
' Riferimenti a pagine
|
||||||
Private m_MainWindow As MainWindow = DirectCast(Application.Current.MainWindow, MainWindow)
|
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
|
Private Sub SingleCut_Initialized(sender As Object, e As EventArgs) Handles Me.Initialized
|
||||||
' Creo lista modalità di acquisizione punto
|
' Creo lista modalità di acquisizione punto
|
||||||
m_PointsModeArray(PT_MODE.SAW) = EgtMsg(MSG_DIRECTCUTPAGEUC + 24)
|
m_PointsModeArray(PT_MODE.SAW) = EgtMsg(90224) ' Lama
|
||||||
m_PointsModeArray(PT_MODE.LASER) = EgtMsg(MSG_DIRECTCUTPAGEUC + 12)
|
m_PointsModeArray(PT_MODE.LASER) = EgtMsg(90212) ' Laser
|
||||||
m_PointsModeArray(PT_MODE.DRAW) = EgtMsg(MSG_DIRECTCUTPAGEUC + 25)
|
m_PointsModeArray(PT_MODE.DRAW) = EgtMsg(90225) ' Disegno
|
||||||
' la associo alla combobox
|
' la associo alla combobox
|
||||||
PointModeCmBx.ItemsSource = m_PointsModeArray
|
PointModeCmBx.ItemsSource = m_PointsModeArray
|
||||||
' Assegno messaggi
|
' Assegno messaggi
|
||||||
Point1Btn.Content = EgtMsg(MSG_DIRECTCUTPAGEUC + 10)
|
Point1Btn.Content = EgtMsg(90210) ' Acquisci P1
|
||||||
Point2Btn.Content = EgtMsg(MSG_DIRECTCUTPAGEUC + 11)
|
Point2Btn.Content = EgtMsg(90211) ' Acquisci P2
|
||||||
DiamLamaTxBl.Text = "Diamtero lama"
|
DiamLamaTxBl.Text = EgtMsg(90266) ' Diamtero lama
|
||||||
ThickLamaTxBl.Text = "Spessore lama"
|
ThickLamaTxBl.Text = EgtMsg(90267) ' Spessore lama
|
||||||
ThickMatTxBl.Text = "Spessore materiale"
|
ThickMatTxBl.Text = EgtMsg(90268) ' Spessore materiale
|
||||||
SimulBtn.Content = EgtMsg(MSG_CADCUTPAGEUC + 1)
|
SimulBtn.Content = EgtMsg(90301) ' Simula
|
||||||
OkBtn.Content = EgtMsg(MSG_DIRECTCUTPAGEUC + 30)
|
OkBtn.Content = EgtMsg(90230) ' Esegui
|
||||||
|
|
||||||
m_RawHeight = GetPrivateProfileDouble(S_RAWPART, K_RAWHEIGHT, 30, m_MainWindow.GetIniFile())
|
m_RawHeight = GetPrivateProfileDouble(S_RAWPART, K_RAWHEIGHT, 30, m_MainWindow.GetIniFile())
|
||||||
ThickMatTxBx.Text = LenToString(m_RawHeight, 2)
|
ThickMatTxBx.Text = LenToString(m_RawHeight, 2)
|
||||||
@@ -345,7 +346,7 @@ Public Class SingleCutAuto
|
|||||||
m_CurrProjPage.ClearMessage()
|
m_CurrProjPage.ClearMessage()
|
||||||
Else
|
Else
|
||||||
OkBtn.IsEnabled = False
|
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
|
End If
|
||||||
Return True
|
Return True
|
||||||
End Function
|
End Function
|
||||||
@@ -741,7 +742,7 @@ Public Class SingleCutAuto
|
|||||||
Dim bOk As Boolean = EgtGenerate(sCncPath, "OmagCut ver." & m_MainWindow.GetVersion())
|
Dim bOk As Boolean = EgtGenerate(sCncPath, "OmagCut ver." & m_MainWindow.GetVersion())
|
||||||
' Se errore in generazione, segnalo l'errore ed esco
|
' Se errore in generazione, segnalo l'errore ed esco
|
||||||
If Not bOk Then
|
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
|
Return
|
||||||
End If
|
End If
|
||||||
' Download programma (eventuali errori sono segnalati dalla funzione)
|
' Download programma (eventuali errori sono segnalati dalla funzione)
|
||||||
|
|||||||
+40
-38
@@ -1,14 +1,14 @@
|
|||||||
<UserControl x:Class="SingleCutUC"
|
<UserControl x:Class="SingleCutUC"
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
|
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
d:DesignHeight="597.3" d:DesignWidth="256">
|
d:DesignHeight="597.3" d:DesignWidth="256">
|
||||||
|
|
||||||
<!--<Border CornerRadius="{StaticResource Page_CornerRadius}" Background="{DynamicResource OmagCut_LightGray}">-->
|
<!--<Border CornerRadius="{StaticResource Page_CornerRadius}" Background="{DynamicResource OmagCut_LightGray}">-->
|
||||||
<Border Style="{DynamicResource OmagCut_DirectCutPageBorder}">
|
<Border Style="{DynamicResource OmagCut_DirectCutPageBorder}">
|
||||||
|
|
||||||
<!-- Definizione della Grid SingleCut -->
|
<!-- Definizione della Grid SingleCut -->
|
||||||
<Grid Name="SingleCutGrid" >
|
<Grid Name="SingleCutGrid" >
|
||||||
@@ -38,54 +38,56 @@
|
|||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
<ToggleButton Name="Point1Btn" Grid.Column="0"
|
<ToggleButton Name="Point1Btn" Grid.Column="0"
|
||||||
Style="{DynamicResource OmagCut_YellowIconToggleButton}">
|
Style="{DynamicResource OmagCut_YellowIconToggleButton}">
|
||||||
<Image Source="{DynamicResource Acquisisci-P1Img}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
<Image Source="{DynamicResource Acquisisci-P1Img}"
|
||||||
|
Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||||
</ToggleButton>
|
</ToggleButton>
|
||||||
|
|
||||||
<ToggleButton Name="Point2Btn" Grid.Column="1"
|
<ToggleButton Name="Point2Btn" Grid.Column="1"
|
||||||
Style="{DynamicResource OmagCut_YellowIconToggleButton}">
|
Style="{DynamicResource OmagCut_YellowIconToggleButton}">
|
||||||
<Image Source="{DynamicResource Acquisisci-P2Img}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
<Image Source="{DynamicResource Acquisisci-P2Img}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||||
</ToggleButton>
|
</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>
|
<ComboBox.ItemTemplate>
|
||||||
<DataTemplate>
|
<DataTemplate>
|
||||||
<TextBlock Text="{Binding}" Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
<TextBlock Text="{Binding}" Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
</ComboBox.ItemTemplate>
|
</ComboBox.ItemTemplate>
|
||||||
</ComboBox>
|
</ComboBox>
|
||||||
|
|
||||||
<TextBlock Name="DepthTxBl" Grid.Column="0" Grid.Row="2"
|
<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"
|
<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"
|
<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"
|
<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"
|
<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"
|
<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"
|
<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"
|
<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"
|
<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"
|
<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"
|
<TextBlock Name="SawThChBl" Grid.Row="7" Grid.ColumnSpan="2"
|
||||||
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
|
Style="{DynamicResource OmagCut_CurrProjSummeryTextBlock}"/>
|
||||||
<CheckBox Name="SawThChBx" Grid.Row="7" Grid.ColumnSpan="2" Style="{StaticResource OmagCut_CheckBox_Single}"
|
<CheckBox Name="SawThChBx" Grid.Row="7" Grid.ColumnSpan="2"
|
||||||
HorizontalAlignment="Right" Margin="0,0,6,0"/>
|
Style="{DynamicResource OmagCut_CheckBox_Single}"
|
||||||
|
HorizontalAlignment="Right" Margin="0,0,6,0"/>
|
||||||
|
|
||||||
<Grid Grid.Row="9" Grid.ColumnSpan="2">
|
<Grid Grid.Row="9" Grid.ColumnSpan="2">
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
@@ -95,13 +97,13 @@
|
|||||||
<ColumnDefinition Width="1*"/>
|
<ColumnDefinition Width="1*"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<TextBlock Name="XcoordTxBl" Grid.Column="0" Text="X"
|
<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"
|
<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"
|
<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"
|
<EgtWPFLib:EgtTextBox Name="YcoordTxBx" Grid.Column="3" Margin="0,0,6,0"
|
||||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
<Grid Grid.Row="11" Grid.ColumnSpan="2">
|
<Grid Grid.Row="11" Grid.ColumnSpan="2">
|
||||||
@@ -112,13 +114,13 @@
|
|||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
<Button Name="SimulBtn" Grid.Column="0" Style="{DynamicResource OmagCut_YellowIconButton}">
|
<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>
|
||||||
<Button Name="OkBtn" Grid.Column="1" Style="{DynamicResource OmagCut_YellowIconButton}">
|
<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>
|
||||||
<Button Name="ExitBtn" Grid.Column="2" Style="{DynamicResource OmagCut_YellowIconButton}">
|
<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>
|
</Button>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
|
|||||||
+121
-49
@@ -1,4 +1,6 @@
|
|||||||
Imports EgtUILib
|
Imports System.Windows.Threading
|
||||||
|
Imports EgtUILib
|
||||||
|
Imports OmagCUT.MainWindow
|
||||||
|
|
||||||
Public Class SingleCutUC
|
Public Class SingleCutUC
|
||||||
|
|
||||||
@@ -39,10 +41,14 @@ Public Class SingleCutUC
|
|||||||
Private m_nTempLay As Integer = GDB_ID.NULL
|
Private m_nTempLay As Integer = GDB_ID.NULL
|
||||||
|
|
||||||
' Costanti
|
' Costanti
|
||||||
Private Const MAX_TAB_DEPTH As Double = 10.0
|
Private Const MAX_TAB_DEPTH As Double = 10.0 ' sostituita da un m_MaxTabDepth letto da file ini macchina
|
||||||
Private Const MIN_CUT_LEN As Double = 10.0
|
Private Const MIN_CUT_LEN As Double = 10.0
|
||||||
Private Const MAX_SIDE_ANG As Double = 60.0
|
Private Const MAX_SIDE_ANG As Double = 60.0
|
||||||
' Costanti che indicano la modalità di acquisizione dei punti
|
' Costanti che indicano la modalità di acquisizione dei punti
|
||||||
|
|
||||||
|
' Utilizzato per aggiornare la posizione della macchina
|
||||||
|
Private m_RefreshTimer As New DispatcherTimer
|
||||||
|
|
||||||
Private Enum PT_MODE As Integer
|
Private Enum PT_MODE As Integer
|
||||||
SAW = 0
|
SAW = 0
|
||||||
LASER = 1
|
LASER = 1
|
||||||
@@ -51,31 +57,31 @@ Public Class SingleCutUC
|
|||||||
|
|
||||||
Private Sub SingleCut_Initialized(sender As Object, e As EventArgs) Handles Me.Initialized
|
Private Sub SingleCut_Initialized(sender As Object, e As EventArgs) Handles Me.Initialized
|
||||||
' Creo lista modalità di acquisizione punto
|
' Creo lista modalità di acquisizione punto
|
||||||
m_PointsModeArray(PT_MODE.SAW) = EgtMsg(MSG_DIRECTCUTPAGEUC + 24)
|
m_PointsModeArray(PT_MODE.SAW) = EgtMsg(90224) ' Lama
|
||||||
m_PointsModeArray(PT_MODE.LASER) = EgtMsg(MSG_DIRECTCUTPAGEUC + 12)
|
m_PointsModeArray(PT_MODE.LASER) = EgtMsg(90212) ' Laser
|
||||||
m_PointsModeArray(PT_MODE.DRAW) = EgtMsg(MSG_DIRECTCUTPAGEUC + 25)
|
m_PointsModeArray(PT_MODE.DRAW) = EgtMsg(90225) ' Disegno
|
||||||
' la associo alla combobox
|
' la associo alla combobox
|
||||||
PointModeCmBx.ItemsSource = m_PointsModeArray
|
PointModeCmBx.ItemsSource = m_PointsModeArray
|
||||||
' Assegno messaggi
|
' Assegno messaggi
|
||||||
Point1Btn.ToolTip = EgtMsg(MSG_DIRECTCUTPAGEUC + 10)
|
Point1Btn.ToolTip = EgtMsg(90210) ' Acquisci P1
|
||||||
Point2Btn.ToolTip = EgtMsg(MSG_DIRECTCUTPAGEUC + 11)
|
Point2Btn.ToolTip = EgtMsg(90211) ' Acquisci P2
|
||||||
DepthTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 13)
|
DepthTxBl.Text = EgtMsg(90213) ' Affondamento
|
||||||
LenghtTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 14)
|
LenghtTxBl.Text = EgtMsg(90214) ' Lunghezza
|
||||||
DirectionTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 15)
|
DirectionTxBl.Text = EgtMsg(90215) ' Direzione
|
||||||
SideAngleTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 16)
|
SideAngleTxBl.Text = EgtMsg(90216) ' Inclinazione
|
||||||
OffsetTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 28)
|
OffsetTxBl.Text = EgtMsg(90228) ' Offset
|
||||||
SawThChBl.Text = EgtMsg(90232) ' Spessore lama
|
SawThChBl.Text = EgtMsg(90232) ' Spessore lama
|
||||||
SimulBtn.ToolTip = EgtMsg(MSG_CADCUTPAGEUC + 1)
|
SimulBtn.ToolTip = EgtMsg(90301) ' Simula
|
||||||
OkBtn.ToolTip = EgtMsg(MSG_DIRECTCUTPAGEUC + 30)
|
OkBtn.ToolTip = EgtMsg(90230) ' Esegui
|
||||||
' Carico i dati dell'ultimo taglio
|
' Carico i dati dell'ultimo taglio
|
||||||
m_dDepth = GetPrivateProfileDouble( S_DIRECTCUTS, K_DC_SING_DEPTH, m_dDepth, m_MainWindow.GetIniFile())
|
m_dDepth = GetPrivateProfileDouble(S_DIRECTCUTS, K_DC_SING_DEPTH, m_dDepth, m_MainWindow.GetIniFile())
|
||||||
m_dLen = GetPrivateProfileDouble( S_DIRECTCUTS, K_DC_SING_LENGTH, m_dLen, m_MainWindow.GetIniFile())
|
m_dLen = GetPrivateProfileDouble(S_DIRECTCUTS, K_DC_SING_LENGTH, m_dLen, m_MainWindow.GetIniFile())
|
||||||
m_dAngO = GetPrivateProfileDouble( S_DIRECTCUTS, K_DC_SING_ANGH, m_dAngO, m_MainWindow.GetIniFile())
|
m_dAngO = GetPrivateProfileDouble(S_DIRECTCUTS, K_DC_SING_ANGH, m_dAngO, m_MainWindow.GetIniFile())
|
||||||
m_dAngV = GetPrivateProfileDouble( S_DIRECTCUTS, K_DC_SING_ANGV, m_dAngV, m_MainWindow.GetIniFile())
|
m_dAngV = GetPrivateProfileDouble(S_DIRECTCUTS, K_DC_SING_ANGV, m_dAngV, m_MainWindow.GetIniFile())
|
||||||
m_dOffset = GetPrivateProfileDouble(S_DIRECTCUTS, K_DC_SING_OFFSET, m_dOffset, m_MainWindow.GetIniFile())
|
m_dOffset = GetPrivateProfileDouble(S_DIRECTCUTS, K_DC_SING_OFFSET, m_dOffset, m_MainWindow.GetIniFile())
|
||||||
m_bSawTh = (GetPrivateProfileInt(S_DIRECTCUTS, K_DC_SING_SAWTH, 0, m_MainWindow.GetIniFile()) <> 0)
|
m_bSawTh = (GetPrivateProfileInt(S_DIRECTCUTS, K_DC_SING_SAWTH, 0, m_MainWindow.GetIniFile()) <> 0)
|
||||||
m_ptTipP1.x = GetPrivateProfileDouble( S_DIRECTCUTS, K_DC_SING_POSX, m_ptTipP1.x, m_MainWindow.GetIniFile())
|
m_ptTipP1.x = GetPrivateProfileDouble(S_DIRECTCUTS, K_DC_SING_POSX, m_ptTipP1.x, m_MainWindow.GetIniFile())
|
||||||
m_ptTipP1.y = GetPrivateProfileDouble( S_DIRECTCUTS, K_DC_SING_POSY, m_ptTipP1.y, m_MainWindow.GetIniFile())
|
m_ptTipP1.y = GetPrivateProfileDouble(S_DIRECTCUTS, K_DC_SING_POSY, m_ptTipP1.y, m_MainWindow.GetIniFile())
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub SingleCut_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded
|
Private Sub SingleCut_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded
|
||||||
@@ -92,6 +98,10 @@ Public Class SingleCutUC
|
|||||||
m_MainWindow.m_DirectCutPageUC.m_bShowMachine = True
|
m_MainWindow.m_DirectCutPageUC.m_bShowMachine = True
|
||||||
EgtSetMachineLook(m_MainWindow.m_DirectCutPageUC.m_nMachLook)
|
EgtSetMachineLook(m_MainWindow.m_DirectCutPageUC.m_nMachLook)
|
||||||
EgtDraw()
|
EgtDraw()
|
||||||
|
' riavvio il timer per visualizzare la poszione della macchina
|
||||||
|
If Not IsNothing(m_RefreshTimer) Then
|
||||||
|
m_RefreshTimer.Start()
|
||||||
|
End If
|
||||||
Return
|
Return
|
||||||
End If
|
End If
|
||||||
' Disabilito registrazione progetto modificato
|
' Disabilito registrazione progetto modificato
|
||||||
@@ -114,7 +124,7 @@ Public Class SingleCutUC
|
|||||||
m_bPointP1Ok = False
|
m_bPointP1Ok = False
|
||||||
m_bPointP2Ok = False
|
m_bPointP2Ok = False
|
||||||
' Inizializzo primo punto acquisito dal disegno
|
' 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
|
m_ptPrev.z = m_ptRawMax.z
|
||||||
' Disegno crocetta che indica il punto acquisito
|
' Disegno crocetta che indica il punto acquisito
|
||||||
CreateCross(m_nTempLay, m_ptPrev)
|
CreateCross(m_nTempLay, m_ptPrev)
|
||||||
@@ -138,21 +148,42 @@ Public Class SingleCutUC
|
|||||||
' Deseleziono bottone primo punto
|
' Deseleziono bottone primo punto
|
||||||
Point1Btn.IsChecked = False
|
Point1Btn.IsChecked = False
|
||||||
|
|
||||||
' la visualizzazione dei comandi è gestira dalla DirectCutPageUC richiamando la funzione ReloadParam
|
' 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
|
||||||
|
m_MainWindow.m_DirectCutPageUC.m_bShowMachine = True
|
||||||
|
m_MainWindow.m_DirectCutPageUC.m_nMachLook = MCH_LOOK.TAB
|
||||||
|
' Creo il timer il timer per aggiornare il posizionamento della macchina
|
||||||
|
AddHandler m_RefreshTimer.Tick, AddressOf RefreshTimer_tick
|
||||||
|
m_RefreshTimer.Interval = TimeSpan.FromMilliseconds(1000)
|
||||||
|
|
||||||
' Aggiorno visualizzazione
|
' Aggiorno visualizzazione
|
||||||
EgtDraw()
|
EgtDraw()
|
||||||
|
|
||||||
|
' Avvio il timer
|
||||||
|
m_RefreshTimer.Start()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub RefreshTimer_tick()
|
||||||
|
' se è impostata la visualizzazione della sola tavola allora non aggiorno il disegno
|
||||||
|
If m_MainWindow.m_DirectCutPageUC.m_nMachLook = MCH_LOOK.TAB Then Return
|
||||||
|
' Aggiorno visualizzazione
|
||||||
|
SetMachineInCurrPos()
|
||||||
|
' Aggiorno il disegno
|
||||||
|
EgtDraw()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Friend Sub SingleCut_Unloaded(sender As Object, e As RoutedEventArgs) Handles Me.Unloaded
|
Friend Sub SingleCut_Unloaded(sender As Object, e As RoutedEventArgs) Handles Me.Unloaded
|
||||||
' Salvo i dati correnti
|
' Salvo i dati correnti
|
||||||
WritePrivateProfileString( S_DIRECTCUTS, K_DC_SING_DEPTH, DoubleToString( m_dDepth, 2), m_MainWindow.GetIniFile())
|
WritePrivateProfileString(S_DIRECTCUTS, K_DC_SING_DEPTH, DoubleToString(m_dDepth, 2), m_MainWindow.GetIniFile())
|
||||||
WritePrivateProfileString( S_DIRECTCUTS, K_DC_SING_LENGTH, DoubleToString( m_dLen, 2), m_MainWindow.GetIniFile())
|
WritePrivateProfileString(S_DIRECTCUTS, K_DC_SING_LENGTH, DoubleToString(m_dLen, 2), m_MainWindow.GetIniFile())
|
||||||
WritePrivateProfileString( S_DIRECTCUTS, K_DC_SING_ANGH, DoubleToString( m_dAngO, 2), m_MainWindow.GetIniFile())
|
WritePrivateProfileString(S_DIRECTCUTS, K_DC_SING_ANGH, DoubleToString(m_dAngO, 2), m_MainWindow.GetIniFile())
|
||||||
WritePrivateProfileString( S_DIRECTCUTS, K_DC_SING_ANGV, DoubleToString( m_dAngV, 2), m_MainWindow.GetIniFile())
|
WritePrivateProfileString(S_DIRECTCUTS, K_DC_SING_ANGV, DoubleToString(m_dAngV, 2), m_MainWindow.GetIniFile())
|
||||||
WritePrivateProfileString(S_DIRECTCUTS, K_DC_SING_OFFSET, DoubleToString(m_dOffset, 2), m_MainWindow.GetIniFile())
|
WritePrivateProfileString(S_DIRECTCUTS, K_DC_SING_OFFSET, DoubleToString(m_dOffset, 2), m_MainWindow.GetIniFile())
|
||||||
WritePrivateProfileString(S_DIRECTCUTS, K_DC_SING_SAWTH, If(m_bSawTh, "1", "0"), m_MainWindow.GetIniFile())
|
WritePrivateProfileString(S_DIRECTCUTS, K_DC_SING_SAWTH, If(m_bSawTh, "1", "0"), m_MainWindow.GetIniFile())
|
||||||
WritePrivateProfileString( S_DIRECTCUTS, K_DC_SING_POSX, DoubleToString( m_ptTipP1.x, 2), m_MainWindow.GetIniFile())
|
WritePrivateProfileString(S_DIRECTCUTS, K_DC_SING_POSX, DoubleToString(m_ptTipP1.x, 2), m_MainWindow.GetIniFile())
|
||||||
WritePrivateProfileString(S_DIRECTCUTS, K_DC_SING_POSY, DoubleToString(m_ptTipP1.y, 2), m_MainWindow.GetIniFile())
|
WritePrivateProfileString(S_DIRECTCUTS, K_DC_SING_POSY, DoubleToString(m_ptTipP1.y, 2), m_MainWindow.GetIniFile())
|
||||||
' Se non vado in simulazione
|
' Se non vado in simulazione
|
||||||
If Not m_bSimul Then
|
If Not m_bSimul Then
|
||||||
@@ -171,6 +202,8 @@ Public Class SingleCutUC
|
|||||||
EgtSetMachineLook(MCH_LOOK.TAB)
|
EgtSetMachineLook(MCH_LOOK.TAB)
|
||||||
EgtDraw()
|
EgtDraw()
|
||||||
End If
|
End If
|
||||||
|
' interrompo il Timer per aggiornare la visualizzazione del posizionamento macchina
|
||||||
|
m_RefreshTimer.Stop()
|
||||||
' Dichiaro pagina non attiva
|
' Dichiaro pagina non attiva
|
||||||
m_bActive = False
|
m_bActive = False
|
||||||
End Sub
|
End Sub
|
||||||
@@ -238,6 +271,12 @@ Public Class SingleCutUC
|
|||||||
' Verifico configurazione tavola e grezzo
|
' Verifico configurazione tavola e grezzo
|
||||||
If Not m_bRawOk Then Return
|
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
|
' Recupero dati utensile e testa corrente
|
||||||
Dim sTool As String = ""
|
Dim sTool As String = ""
|
||||||
Dim sHead As String = ""
|
Dim sHead As String = ""
|
||||||
@@ -249,6 +288,13 @@ Public Class SingleCutUC
|
|||||||
' Recupero la posizione macchina
|
' Recupero la posizione macchina
|
||||||
Dim dL1, dL2, dL3, dR1, dR2 As Double
|
Dim dL1, dL2, dL3, dR1, dR2 As Double
|
||||||
If Not m_MainWindow.m_CNCommunication.GetAxesPositions(dL1, dL2, dL3, dR1, dR2) Then Return
|
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
|
' Ricavo dati lama corrente
|
||||||
Dim sSaw As String = m_MainWindow.m_CurrentMachine.sCurrSaw
|
Dim sSaw As String = m_MainWindow.m_CurrentMachine.sCurrSaw
|
||||||
' Se punto da laser
|
' Se punto da laser
|
||||||
@@ -256,7 +302,8 @@ Public Class SingleCutUC
|
|||||||
' Imposto come testa corrente il laser (senza utensile ovviamente)
|
' Imposto come testa corrente il laser (senza utensile ovviamente)
|
||||||
If Not EgtSetCalcTool("", "H3", 1) Then Return
|
If Not EgtSetCalcTool("", "H3", 1) Then Return
|
||||||
' Trasformo in posizione punta utensile in basso
|
' 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
|
' Reimposto eventuale precedente utensile
|
||||||
EgtSetCalcTool(sTool, sHead, nExit)
|
EgtSetCalcTool(sTool, sHead, nExit)
|
||||||
' Altrimenti da lama
|
' Altrimenti da lama
|
||||||
@@ -264,10 +311,11 @@ Public Class SingleCutUC
|
|||||||
' Reimposto eventuale precedente utensile
|
' Reimposto eventuale precedente utensile
|
||||||
EgtSetCalcTool(sTool, sHead, nExit)
|
EgtSetCalcTool(sTool, sHead, nExit)
|
||||||
' Trasformo in posizione punta utensile in basso
|
' 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
|
End If
|
||||||
' Calcolo direzione asse lama
|
' 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
|
' Porto il tip nell'origine tavola
|
||||||
m_ptTipP1.ToLoc(New Frame3d(m_ptTabOri))
|
m_ptTipP1.ToLoc(New Frame3d(m_ptTabOri))
|
||||||
m_bPointP1Ok = True
|
m_bPointP1Ok = True
|
||||||
@@ -279,7 +327,7 @@ Public Class SingleCutUC
|
|||||||
DirectionTxBx.Text = DoubleToString(m_dAngO - m_MainWindow.m_CurrentMachine.dDeltaC, 2)
|
DirectionTxBx.Text = DoubleToString(m_dAngO - m_MainWindow.m_CurrentMachine.dDeltaC, 2)
|
||||||
SideAngleTxBx.Text = DoubleToString(m_dAngV, 2)
|
SideAngleTxBx.Text = DoubleToString(m_dAngV, 2)
|
||||||
|
|
||||||
' Altrimenti punto da click di mouse
|
' Altrimenti punto da click di mouse
|
||||||
Else
|
Else
|
||||||
' Assegno punto selezionato nel disegno a m_ptTipP1
|
' Assegno punto selezionato nel disegno a m_ptTipP1
|
||||||
m_ptTipP1 = m_ptPrev
|
m_ptTipP1 = m_ptPrev
|
||||||
@@ -288,7 +336,6 @@ Public Class SingleCutUC
|
|||||||
m_bPointP1Ok = True
|
m_bPointP1Ok = True
|
||||||
' Reimposto eventuale precedente utensile
|
' Reimposto eventuale precedente utensile
|
||||||
EgtSetCalcTool(sTool, sHead, nExit)
|
EgtSetCalcTool(sTool, sHead, nExit)
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
' Disegno il taglio
|
' Disegno il taglio
|
||||||
@@ -298,6 +345,7 @@ Public Class SingleCutUC
|
|||||||
m_MainWindow.m_DirectCutPageUC.m_bShowMachine = True
|
m_MainWindow.m_DirectCutPageUC.m_bShowMachine = True
|
||||||
EgtSetMachineLook(m_MainWindow.m_DirectCutPageUC.m_nMachLook)
|
EgtSetMachineLook(m_MainWindow.m_DirectCutPageUC.m_nMachLook)
|
||||||
EgtDraw()
|
EgtDraw()
|
||||||
|
|
||||||
' Seleziono il bottone per indicare che il primo punto è stato acquisito
|
' Seleziono il bottone per indicare che il primo punto è stato acquisito
|
||||||
Point1Btn.IsChecked = True
|
Point1Btn.IsChecked = True
|
||||||
' Abilito e deseleziono secondo punto
|
' Abilito e deseleziono secondo punto
|
||||||
@@ -317,6 +365,12 @@ Public Class SingleCutUC
|
|||||||
' Verifico configurazione tavola e grezzo
|
' Verifico configurazione tavola e grezzo
|
||||||
If Not m_bRawOk Then Return
|
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
|
' Recupero dati utensile e testa corrente
|
||||||
Dim sTool As String = ""
|
Dim sTool As String = ""
|
||||||
Dim sHead As String = ""
|
Dim sHead As String = ""
|
||||||
@@ -328,6 +382,13 @@ Public Class SingleCutUC
|
|||||||
' Recupero la posizione macchina
|
' Recupero la posizione macchina
|
||||||
Dim dL1, dL2, dL3, dR1, dR2 As Double
|
Dim dL1, dL2, dL3, dR1, dR2 As Double
|
||||||
If Not m_MainWindow.m_CNCommunication.GetAxesPositions(dL1, dL2, dL3, dR1, dR2) Then Return
|
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
|
' Ricavo dati lama corrente
|
||||||
Dim sSaw As String = m_MainWindow.m_CurrentMachine.sCurrSaw
|
Dim sSaw As String = m_MainWindow.m_CurrentMachine.sCurrSaw
|
||||||
' Se punto da laser
|
' Se punto da laser
|
||||||
@@ -335,20 +396,20 @@ Public Class SingleCutUC
|
|||||||
' Imposto come testa corrente il laser (senza utensile ovviamente)
|
' Imposto come testa corrente il laser (senza utensile ovviamente)
|
||||||
If Not EgtSetCalcTool("", "H3", 1) Then Return
|
If Not EgtSetCalcTool("", "H3", 1) Then Return
|
||||||
' Trasformo in posizione punta utensile in basso
|
' 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
|
' Reimposto eventuale precedente utensile
|
||||||
EgtSetCalcTool(sTool, sHead, nExit)
|
EgtSetCalcTool(sTool, sHead, nExit)
|
||||||
|
|
||||||
' Altrimenti da lama
|
' Altrimenti da lama
|
||||||
Else
|
Else
|
||||||
' Reimposto eventuale precedente utensile
|
' Reimposto eventuale precedente utensile
|
||||||
EgtSetCalcTool(sTool, sHead, nExit)
|
EgtSetCalcTool(sTool, sHead, nExit)
|
||||||
|
|
||||||
' Trasformo in posizione punta utensile in basso
|
' 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
|
End If
|
||||||
' Calcolo direzione asse lama
|
' 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
|
' Porto il tip nell'origine tavola
|
||||||
m_ptTipP2.ToLoc(New Frame3d(m_ptTabOri))
|
m_ptTipP2.ToLoc(New Frame3d(m_ptTabOri))
|
||||||
m_bPointP2Ok = True
|
m_bPointP2Ok = True
|
||||||
@@ -358,7 +419,7 @@ Public Class SingleCutUC
|
|||||||
m_dAngV = 90 - dTAngV
|
m_dAngV = 90 - dTAngV
|
||||||
SideAngleTxBx.Text = DoubleToString(m_dAngV, 2)
|
SideAngleTxBx.Text = DoubleToString(m_dAngV, 2)
|
||||||
|
|
||||||
' Altrimenti punto da click di mouse
|
' Altrimenti punto da click di mouse
|
||||||
Else
|
Else
|
||||||
' Assegno punto selezionato nel disegno a m_ptTipP2
|
' Assegno punto selezionato nel disegno a m_ptTipP2
|
||||||
m_ptTipP2 = m_ptPrev
|
m_ptTipP2 = m_ptPrev
|
||||||
@@ -381,6 +442,7 @@ Public Class SingleCutUC
|
|||||||
m_dAngO = dAngOrizzDeg
|
m_dAngO = dAngOrizzDeg
|
||||||
LenghtTxBx.Text = LenToString(m_dLen, 1)
|
LenghtTxBx.Text = LenToString(m_dLen, 1)
|
||||||
DirectionTxBx.Text = DoubleToString(m_dAngO - m_MainWindow.m_CurrentMachine.dDeltaC, 2)
|
DirectionTxBx.Text = DoubleToString(m_dAngO - m_MainWindow.m_CurrentMachine.dDeltaC, 2)
|
||||||
|
EgtOutLog("Lunghezza taglio: " & dLen.ToString & "Angolo: " & dAngOrizzDeg.ToString)
|
||||||
CreateSingleCut()
|
CreateSingleCut()
|
||||||
' Disegno la macchina nella sua posizione reale
|
' Disegno la macchina nella sua posizione reale
|
||||||
SetMachineInCurrPos()
|
SetMachineInCurrPos()
|
||||||
@@ -398,7 +460,7 @@ Public Class SingleCutUC
|
|||||||
|
|
||||||
Private Sub DepthTxBx_EgtClosed(sender As Object, e As EventArgs) Handles DepthTxBx.EgtClosed
|
Private Sub DepthTxBx_EgtClosed(sender As Object, e As EventArgs) Handles DepthTxBx.EgtClosed
|
||||||
' Verifico che l'affondamento impostato non sia superiore a quello massimo
|
' Verifico che l'affondamento impostato non sia superiore a quello massimo
|
||||||
Dim dMaxDepth = m_ptRawMax.z - m_ptRawMin.z + MAX_TAB_DEPTH
|
Dim dMaxDepth = m_ptRawMax.z - m_ptRawMin.z + m_MainWindow.m_CurrentMachine.MaxTabDepth
|
||||||
Dim dDepth As Double = 0
|
Dim dDepth As Double = 0
|
||||||
StringToLen(DepthTxBx.Text, dDepth)
|
StringToLen(DepthTxBx.Text, dDepth)
|
||||||
If dDepth < 0 Then
|
If dDepth < 0 Then
|
||||||
@@ -476,7 +538,7 @@ Public Class SingleCutUC
|
|||||||
EgtDraw()
|
EgtDraw()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub SawThick_Click( sender As Object, e As RoutedEventArgs) Handles SawThChBx.Click
|
Private Sub SawThick_Click(sender As Object, e As RoutedEventArgs) Handles SawThChBx.Click
|
||||||
' Recupero lo stato di check
|
' Recupero lo stato di check
|
||||||
m_bSawTh = SawThChBx.IsChecked()
|
m_bSawTh = SawThChBx.IsChecked()
|
||||||
' Disegno il taglio
|
' Disegno il taglio
|
||||||
@@ -536,9 +598,9 @@ Public Class SingleCutUC
|
|||||||
m_CurrProjPage.SetWarningMessage( "Trial Version")
|
m_CurrProjPage.SetWarningMessage( "Trial Version")
|
||||||
#Else
|
#Else
|
||||||
' Verifico non sia versione Ufficio
|
' Verifico non sia versione Ufficio
|
||||||
If m_MainWindow.GetKeyOption( MainWindow.KEY_OPT.OFFICE_TYPE) Then
|
If m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.OFFICE_TYPE) Then
|
||||||
m_CurrProjPage.SetWarningMessage( "Office Version")
|
m_CurrProjPage.SetWarningMessage("Office Version")
|
||||||
Return
|
Return
|
||||||
End If
|
End If
|
||||||
' Verifico ci sia un taglio valido
|
' Verifico ci sia un taglio valido
|
||||||
If Not m_bCutOk Then Return
|
If Not m_bCutOk Then Return
|
||||||
@@ -553,13 +615,15 @@ Public Class SingleCutUC
|
|||||||
m_CurrProjPage.SetErrorMessage(EgtMsg(90314)) 'Errore nella generazione del programma CN
|
m_CurrProjPage.SetErrorMessage(EgtMsg(90314)) 'Errore nella generazione del programma CN
|
||||||
Return
|
Return
|
||||||
End If
|
End If
|
||||||
|
Dim sNameProg As Integer = 900
|
||||||
|
sNameProg = GetPrivateProfileInt(S_PARTPROGRAM, "NameProg", sNameProg, m_MainWindow.GetMachIniFile)
|
||||||
' Download programma (eventuali errori sono segnalati dalla funzione)
|
' 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
|
' copio il progetto corrente come progetto in lavorazione
|
||||||
Dim sWrkPath As String = m_MainWindow.GetTempDir() & "\" & "WorkProj.nge"
|
Dim sWrkPath As String = m_MainWindow.GetTempDir() & "\" & "WorkProj.nge"
|
||||||
My.Computer.FileSystem.CopyFile(sMchPath, sWrkPath, True)
|
My.Computer.FileSystem.CopyFile(sMchPath, sWrkPath, True)
|
||||||
' lancio eventuale lua post-trasmissione
|
' lancio eventuale lua post-trasmissione
|
||||||
m_MainWindow.ExecSentProgScript( True)
|
m_MainWindow.ExecSentProgScript(True)
|
||||||
End If
|
End If
|
||||||
#End If
|
#End If
|
||||||
End Sub
|
End Sub
|
||||||
@@ -571,6 +635,7 @@ Public Class SingleCutUC
|
|||||||
Private Function CreateSingleCut() As Boolean
|
Private Function CreateSingleCut() As Boolean
|
||||||
' Verifico sia definito il punto iniziale e il grezzo
|
' Verifico sia definito il punto iniziale e il grezzo
|
||||||
If Not m_bPointP1Ok Or Not m_bRawOk Then
|
If Not m_bPointP1Ok Or Not m_bRawOk Then
|
||||||
|
EgtOutLog("Primo punto non valido")
|
||||||
m_bCutOk = False
|
m_bCutOk = False
|
||||||
Return False
|
Return False
|
||||||
End If
|
End If
|
||||||
@@ -583,7 +648,7 @@ Public Class SingleCutUC
|
|||||||
Dim sSawing As String = m_MainWindow.m_CurrentMachine.sCurrSawing
|
Dim sSawing As String = m_MainWindow.m_CurrentMachine.sCurrSawing
|
||||||
EgtTdbSetCurrTool(sSaw)
|
EgtTdbSetCurrTool(sSaw)
|
||||||
Dim dThick As Double = 0
|
Dim dThick As Double = 0
|
||||||
' se è impostata una lavorazione di lama
|
' Se è impostata una lavorazione di lama
|
||||||
If Not String.IsNullOrEmpty(sSawing) Then
|
If Not String.IsNullOrEmpty(sSawing) Then
|
||||||
EgtTdbGetCurrToolParam(MCH_TP.THICK, dThick)
|
EgtTdbGetCurrToolParam(MCH_TP.THICK, dThick)
|
||||||
End If
|
End If
|
||||||
@@ -599,14 +664,21 @@ Public Class SingleCutUC
|
|||||||
Dim ptStart As Point3d = m_ptTipP1
|
Dim ptStart As Point3d = m_ptTipP1
|
||||||
ptStart.z = 0
|
ptStart.z = 0
|
||||||
Dim nCutId = EgtCreateLinePDL(nLayerId, ptStart, m_dAngO, m_dLen)
|
Dim nCutId = EgtCreateLinePDL(nLayerId, ptStart, m_dAngO, m_dLen)
|
||||||
If Math.Abs(m_dOffset) > 10 * EPS_SMALL Then
|
' Applico la correzione di spessore lama -> anche se Offset=0! ver_2.5b1
|
||||||
Dim dTotOffset = m_dOffset
|
Dim dTotOffset = m_dOffset
|
||||||
If m_bSawTh Then dTotOffset += If( m_dOffset > 0, dThick, -dThick)
|
If m_bSawTh Then
|
||||||
|
dTotOffset += If(m_dOffset > 0, dThick, -dThick)
|
||||||
|
EgtOffsetCurve(nCutId, dTotOffset, OFF_TYPE.EXTEND)
|
||||||
|
Else
|
||||||
EgtOffsetCurve(nCutId, dTotOffset, OFF_TYPE.EXTEND)
|
EgtOffsetCurve(nCutId, dTotOffset, OFF_TYPE.EXTEND)
|
||||||
End If
|
End If
|
||||||
' Imposto affondamento e angolo di fianco sul taglio
|
' Imposto affondamento e angolo di fianco sul taglio
|
||||||
EgtSetInfo(nCutId, INFO_DEPTH, m_dDepth)
|
EgtSetInfo(nCutId, INFO_DEPTH, m_dDepth)
|
||||||
EgtSetInfo(nCutId, INFO_SIDE_ANGLE, m_dAngV)
|
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
|
' Creo layer per crocetta di riferimento
|
||||||
Dim nCrossLayerId = EgtCreateGroup(nPartId)
|
Dim nCrossLayerId = EgtCreateGroup(nPartId)
|
||||||
' Aggiungo crocetta/e
|
' Aggiungo crocetta/e
|
||||||
|
|||||||
@@ -1,97 +1,96 @@
|
|||||||
<UserControl x:Class="SingleDrillUC"
|
<UserControl x:Class="SingleDrillUC"
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
|
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d" d:DesignHeight="597.3" d:DesignWidth="256">
|
||||||
d:DesignHeight="597.3" d:DesignWidth="256">
|
|
||||||
|
|
||||||
<!--<Border CornerRadius="{StaticResource Page_CornerRadius}" Background="{DynamicResource OmagCut_LightGray}">-->
|
<!--<Border CornerRadius="{StaticResource Page_CornerRadius}" Background="{DynamicResource OmagCut_LightGray}">-->
|
||||||
<Border Style="{DynamicResource OmagCut_DirectCutPageBorder}">
|
<Border Style="{DynamicResource OmagCut_DirectCutPageBorder}">
|
||||||
|
|
||||||
<!-- Definizione della Grid SingleCut -->
|
<!-- Definizione della Grid SingleCut -->
|
||||||
<Grid Name="SingleCutGrid" >
|
<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>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="2*"/>
|
<ColumnDefinition Width="1*"/>
|
||||||
<ColumnDefinition Width="1*"/>
|
<ColumnDefinition Width="1*"/>
|
||||||
</Grid.ColumnDefinitions>
|
</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">
|
<ToggleButton Name="Point1Btn" Grid.Column="0"
|
||||||
<Grid.ColumnDefinitions>
|
Style="{DynamicResource OmagCut_YellowIconToggleButton}">
|
||||||
<ColumnDefinition Width="1*"/>
|
<Image Source="{DynamicResource Acquisisci-PImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||||
<ColumnDefinition Width="1*"/>
|
</ToggleButton>
|
||||||
</Grid.ColumnDefinitions>
|
|
||||||
|
|
||||||
<ToggleButton Name="Point1Btn" Grid.Column="0"
|
|
||||||
Style="{DynamicResource OmagCut_YellowIconToggleButton}">
|
|
||||||
<Image Source="{DynamicResource Acquisisci-PImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
|
||||||
</ToggleButton>
|
|
||||||
|
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
<ComboBox Name="PointModeCmBx" Grid.Row="1" Grid.ColumnSpan="2" Style="{StaticResource OmagCut_ComboBox}" Margin="6,0,6,0">
|
<ComboBox Name="PointModeCmBx" Grid.Row="1" Grid.ColumnSpan="2" Style="{DynamicResource OmagCut_ComboBox}" Margin="6,0,6,0">
|
||||||
<ComboBox.ItemTemplate>
|
<ComboBox.ItemTemplate>
|
||||||
<DataTemplate>
|
<DataTemplate>
|
||||||
<TextBlock Text="{Binding}" Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
<TextBlock Text="{Binding}" Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
</ComboBox.ItemTemplate>
|
</ComboBox.ItemTemplate>
|
||||||
</ComboBox>
|
</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 Grid.Row="9" Grid.ColumnSpan="2">
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="1*"/>
|
<ColumnDefinition Width="0.5*"/>
|
||||||
<ColumnDefinition Width="1*"/>
|
<ColumnDefinition Width="1*"/>
|
||||||
<ColumnDefinition Width="1*"/>
|
<ColumnDefinition Width="0.5*"/>
|
||||||
</Grid.ColumnDefinitions>
|
<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}">
|
<Grid Grid.Row="11" Grid.ColumnSpan="2">
|
||||||
<Image Source="{DynamicResource SimulaImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
<Grid.ColumnDefinitions>
|
||||||
</Button>
|
<ColumnDefinition Width="1*"/>
|
||||||
<Button Name="OkBtn" Grid.Column="1" Style="{DynamicResource OmagCut_YellowIconButton}">
|
<ColumnDefinition Width="1*"/>
|
||||||
<Image Source="{DynamicResource EseguiImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
<ColumnDefinition Width="1*"/>
|
||||||
</Button>
|
</Grid.ColumnDefinitions>
|
||||||
<Button Name="ExitBtn" Grid.Column="2" Style="{DynamicResource OmagCut_YellowIconButton}">
|
|
||||||
<Image Source="{DynamicResource XImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
|
||||||
</Button>
|
|
||||||
</Grid>
|
|
||||||
|
|
||||||
</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>
|
</UserControl>
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
Imports EgtUILib
|
Imports EgtUILib
|
||||||
Imports System.Collections.ObjectModel
|
Imports OmagCUT.MainWindow
|
||||||
|
|
||||||
Public Class SingleDrillUC
|
Public Class SingleDrillUC
|
||||||
' Riferimenti a pagine
|
' Riferimenti a pagine
|
||||||
Private m_MainWindow As MainWindow = DirectCast(Application.Current.MainWindow, MainWindow)
|
Private m_MainWindow As MainWindow = DirectCast(Application.Current.MainWindow, MainWindow)
|
||||||
@@ -57,22 +58,25 @@ Public Class SingleDrillUC
|
|||||||
m_CurrentMachine = m_MainWindow.m_CurrentMachine
|
m_CurrentMachine = m_MainWindow.m_CurrentMachine
|
||||||
|
|
||||||
' Creo lista modalità di acquisizione punto
|
' Creo lista modalità di acquisizione punto
|
||||||
m_PointsModeArray(PT_MODE.DRILL) = EgtMsg(90752)
|
m_PointsModeArray(PT_MODE.DRILL) = EgtMsg(90752) ' Foretto
|
||||||
m_PointsModeArray(PT_MODE.LASER) = EgtMsg(MSG_DIRECTCUTPAGEUC + 12)
|
m_PointsModeArray(PT_MODE.LASER) = EgtMsg(90212) ' Laser
|
||||||
m_PointsModeArray(PT_MODE.DRAW) = EgtMsg(MSG_DIRECTCUTPAGEUC + 25)
|
m_PointsModeArray(PT_MODE.DRAW) = EgtMsg(90225) ' Disegno
|
||||||
' la associo alla combobox
|
' la associo alla combobox
|
||||||
PointModeCmBx.ItemsSource = m_PointsModeArray
|
PointModeCmBx.ItemsSource = m_PointsModeArray
|
||||||
|
|
||||||
' Assegno messaggi
|
' Assegno messaggi
|
||||||
Point1Btn.ToolTip = EgtMsg(MSG_DIRECTCUTPAGEUC + 10)
|
Point1Btn.ToolTip = EgtMsg(90210) ' Acquisici P1
|
||||||
SimulBtn.ToolTip = EgtMsg(MSG_CADCUTPAGEUC + 1)
|
SimulBtn.ToolTip = EgtMsg(90301) ' Simula
|
||||||
OkBtn.ToolTip = EgtMsg(MSG_DIRECTCUTPAGEUC + 30)
|
OkBtn.ToolTip = EgtMsg(90230) ' Esegui
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub SingleDrill_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded
|
Private Sub SingleDrill_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded
|
||||||
m_sCurrDrill = m_CurrentMachine.sCurrDrill
|
m_sCurrDrill = m_CurrentMachine.sCurrDrill
|
||||||
GetDrillFromDrilling(m_sCurrDrill, m_CurrentMachine.sCurrDrilling)
|
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
|
' recupero informazioni del foretto usato
|
||||||
EgtTdbSetCurrTool(m_sCurrDrill)
|
EgtTdbSetCurrTool(m_sCurrDrill)
|
||||||
EgtTdbGetCurrToolParam(MCH_TP.DIAM, m_dDiameter)
|
EgtTdbGetCurrToolParam(MCH_TP.DIAM, m_dDiameter)
|
||||||
@@ -213,21 +217,33 @@ Public Class SingleDrillUC
|
|||||||
' Verifico configurazione tavola e grezzo
|
' Verifico configurazione tavola e grezzo
|
||||||
If Not m_bRawOk Then Return
|
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
|
' Se acquisizione lama o laser
|
||||||
If PointModeCmBx.SelectedIndex = PT_MODE.DRILL Or PointModeCmBx.SelectedIndex = PT_MODE.LASER Then
|
If PointModeCmBx.SelectedIndex = PT_MODE.DRILL Or PointModeCmBx.SelectedIndex = PT_MODE.LASER Then
|
||||||
|
|
||||||
' Recupero la posizione macchina
|
' Recupero la posizione macchina
|
||||||
Dim dL1, dL2, dL3, dR1, dR2 As Double
|
Dim dL1, dL2, dL3, dR1, dR2 As Double
|
||||||
If Not m_MainWindow.m_CNCommunication.GetAxesPositions(dL1, dL2, dL3, dR1, dR2) Then Return
|
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
|
||||||
' Ricavo dati Foretto corrente
|
Dim vAng() As Double = {dR1, dR2, 0}
|
||||||
Dim sDrill As String = m_sCurrDrill
|
If bIsMultiCut Then
|
||||||
|
vAng(0) = 0
|
||||||
|
vAng(1) = dR1
|
||||||
|
vAng(2) = dR2
|
||||||
|
End If
|
||||||
' Se punto da laser
|
' Se punto da laser
|
||||||
If PointModeCmBx.SelectedIndex = PT_MODE.LASER Then
|
If PointModeCmBx.SelectedIndex = PT_MODE.LASER Then
|
||||||
' Imposto come testa corrente il laser (senza utensile ovviamente)
|
' Imposto come testa corrente il laser (senza utensile ovviamente)
|
||||||
If Not EgtSetCalcTool("", "H3", 1) Then Return
|
If Not EgtSetCalcTool("", "H3", 1) Then Return
|
||||||
' Trasformo in posizione punta utensile in basso
|
' 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
|
' Ora imposto la lama corrente
|
||||||
If Not EgtSetCalcTool(sDrill, "H1", 2) Then Return
|
If Not EgtSetCalcTool(sDrill, "H1", 2) Then Return
|
||||||
' Altrimenti da lama
|
' Altrimenti da lama
|
||||||
@@ -235,10 +251,10 @@ Public Class SingleDrillUC
|
|||||||
' Imposto la lama corrente
|
' Imposto la lama corrente
|
||||||
If Not EgtSetCalcTool(sDrill, "H1", 2) Then Return
|
If Not EgtSetCalcTool(sDrill, "H1", 2) Then Return
|
||||||
' Trasformo in posizione punta utensile in basso
|
' 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
|
End If
|
||||||
' Calcolo direzione asse lama
|
' 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
|
' Porto il tip nell'origine tavola
|
||||||
m_ptTipP1.ToLoc(New Frame3d(m_ptTabOri))
|
m_ptTipP1.ToLoc(New Frame3d(m_ptTabOri))
|
||||||
m_bPointP1Ok = True
|
m_bPointP1Ok = True
|
||||||
@@ -250,10 +266,8 @@ Public Class SingleDrillUC
|
|||||||
' Porto il tip nell'origine tavola
|
' Porto il tip nell'origine tavola
|
||||||
m_ptTipP1.ToLoc(New Frame3d(m_ptTabOri))
|
m_ptTipP1.ToLoc(New Frame3d(m_ptTabOri))
|
||||||
m_bPointP1Ok = True
|
m_bPointP1Ok = True
|
||||||
' Ricavo dati lama corrente
|
|
||||||
Dim sDrill As String = m_sCurrDrill
|
|
||||||
' Imposto la lama corrente
|
' Imposto la lama corrente
|
||||||
If Not EgtSetCalcTool(sDrill, "H1", 1) Then Return
|
If Not EgtSetCalcTool(sDrill, "H1", 2) Then Return
|
||||||
End If
|
End If
|
||||||
|
|
||||||
' Disegno il taglio
|
' Disegno il taglio
|
||||||
@@ -371,8 +385,10 @@ Public Class SingleDrillUC
|
|||||||
m_CurrProjPage.SetErrorMessage(EgtMsg(90314)) 'Errore nella generazione del programma CN
|
m_CurrProjPage.SetErrorMessage(EgtMsg(90314)) 'Errore nella generazione del programma CN
|
||||||
Return
|
Return
|
||||||
End If
|
End If
|
||||||
|
Dim sNameProg As Integer = 900
|
||||||
|
sNameProg = GetPrivateProfileInt(S_PARTPROGRAM, "NameProg", sNameProg, m_MainWindow.GetMachIniFile)
|
||||||
' Download programma (eventuali errori sono segnalati dalla funzione)
|
' 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
|
' copio il progetto corrente come progetto in lavorazione
|
||||||
Dim sWrkPath As String = m_MainWindow.GetTempDir() & "\" & "WorkProj.nge"
|
Dim sWrkPath As String = m_MainWindow.GetTempDir() & "\" & "WorkProj.nge"
|
||||||
My.Computer.FileSystem.CopyFile(sMchPath, sWrkPath, True)
|
My.Computer.FileSystem.CopyFile(sMchPath, sWrkPath, True)
|
||||||
@@ -423,7 +439,8 @@ Public Class SingleDrillUC
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
Dim nCutId = EgtCreateCircle(nLayerId, ptStart, m_dDiameter / 2)
|
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
|
' Calcolo punto di inserimento nel grezzo
|
||||||
Dim ptMin, ptMax As Point3d
|
Dim ptMin, ptMax As Point3d
|
||||||
EgtGetBBoxGlob(nPartId, GDB_BB.STANDARD, ptMin, ptMax)
|
EgtGetBBoxGlob(nPartId, GDB_BB.STANDARD, ptMin, ptMax)
|
||||||
@@ -431,9 +448,9 @@ Public Class SingleDrillUC
|
|||||||
ptIns.z = dRawHeight
|
ptIns.z = dRawHeight
|
||||||
' Inserisco il pezzo nel grezzo
|
' Inserisco il pezzo nel grezzo
|
||||||
EgtAddPartToRawPart(nPartId, ptIns, m_MainWindow.m_CurrentProjectPageUC.m_nRawId)
|
EgtAddPartToRawPart(nPartId, ptIns, m_MainWindow.m_CurrentProjectPageUC.m_nRawId)
|
||||||
|
EgtSetCurrPhase(1)
|
||||||
' Inserisco la lavorazione
|
' Inserisco la lavorazione
|
||||||
m_bCutOk = AddMachinings(nPartId) AndAlso UpdateAllMachiningsToolpaths()
|
m_bCutOk = AddMachinings(nPartId) AndAlso UpdateAllMachiningsToolpaths()
|
||||||
EgtSetCurrPhase(1)
|
|
||||||
' Eventuale eliminazione Home finale
|
' Eventuale eliminazione Home finale
|
||||||
If Not m_MainWindow.m_CurrentMachine.bDirectCutsFinalHome Then
|
If Not m_MainWindow.m_CurrentMachine.bDirectCutsFinalHome Then
|
||||||
RemoveFinalHome()
|
RemoveFinalHome()
|
||||||
|
|||||||
+17
-18
@@ -1,11 +1,10 @@
|
|||||||
<UserControl x:Class="SquaringUC"
|
<UserControl x:Class="SquaringUC"
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
|
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d" d:DesignHeight="597.3" d:DesignWidth="256">
|
||||||
d:DesignHeight="597.3" d:DesignWidth="256">
|
|
||||||
|
|
||||||
<!--<Border CornerRadius="{StaticResource Page_CornerRadius}" Background="{StaticResource OmagCut_LightGray}">-->
|
<!--<Border CornerRadius="{StaticResource Page_CornerRadius}" Background="{StaticResource OmagCut_LightGray}">-->
|
||||||
<Border Style="{DynamicResource OmagCut_DirectCutPageBorder}">
|
<Border Style="{DynamicResource OmagCut_DirectCutPageBorder}">
|
||||||
@@ -60,14 +59,14 @@
|
|||||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>-->
|
Style="{StaticResource OmagCut_CalculatorTextBox}"/>-->
|
||||||
|
|
||||||
<TextBlock Name="OffsetTxBl" Grid.Column="0" Grid.Row="3"
|
<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"
|
<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"
|
<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"
|
<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"
|
<!--<TextBlock Name="DirectionTxBl" Grid.Column="0" Grid.Row="3"
|
||||||
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
|
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
|
||||||
@@ -129,13 +128,13 @@
|
|||||||
<ColumnDefinition Width="1*"/>
|
<ColumnDefinition Width="1*"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<TextBlock Name="XcoordTxBl" Grid.Column="0" Text="X"
|
<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"
|
<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"
|
<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"
|
<EgtWPFLib:EgtTextBox Name="YcoordTxBx" Grid.Column="3" Margin="0,0,6,0"
|
||||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
<Grid Grid.Row="11" Grid.ColumnSpan="2">
|
<Grid Grid.Row="11" Grid.ColumnSpan="2">
|
||||||
@@ -146,13 +145,13 @@
|
|||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
<Button Name="SimulBtn" Grid.Column="0" Style="{DynamicResource OmagCut_YellowIconButton}">
|
<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>
|
||||||
<Button Name="OkBtn" Grid.Column="1" Style="{DynamicResource OmagCut_YellowIconButton}">
|
<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>
|
||||||
<Button Name="ExitBtn" Grid.Column="2" Style="{DynamicResource OmagCut_YellowIconButton}">
|
<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>
|
</Button>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
Imports EgtUILib
|
Imports EgtUILib
|
||||||
|
Imports OmagCUT.MainWindow
|
||||||
|
|
||||||
Public Class SquaringUC
|
Public Class SquaringUC
|
||||||
|
|
||||||
@@ -51,11 +52,10 @@ Public Class SquaringUC
|
|||||||
End Enum
|
End Enum
|
||||||
|
|
||||||
Private Sub GridCut_Initialized(sender As Object, e As EventArgs) Handles Me.Initialized
|
Private Sub GridCut_Initialized(sender As Object, e As EventArgs) Handles Me.Initialized
|
||||||
OffsetTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 28)
|
OffsetTxBl.Text = EgtMsg(90228) ' Offset
|
||||||
' 90260=Extra length
|
ExtraLenTxBl.Text = EgtMsg(90260) ' Extra length
|
||||||
ExtraLenTxBl.Text = EgtMsg(90260)
|
SimulBtn.ToolTip = EgtMsg(90301) ' Simula
|
||||||
SimulBtn.ToolTip = EgtMsg(MSG_CADCUTPAGEUC + 1)
|
OkBtn.ToolTip = EgtMsg(90230) ' Esegui
|
||||||
OkBtn.ToolTip = EgtMsg(MSG_DIRECTCUTPAGEUC + 30)
|
|
||||||
|
|
||||||
' Carico i dati dell'ultimo taglio
|
' Carico i dati dell'ultimo taglio
|
||||||
m_dOffsetSquaring = GetPrivateProfileDouble(S_DIRECTCUTS, K_DC_OFFSET_SQUARING, m_dOffsetSquaring, m_MainWindow.GetIniFile())
|
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
|
m_CurrProjPage.SetErrorMessage(EgtMsg(90314)) 'Errore nella generazione del programma CN
|
||||||
Return
|
Return
|
||||||
End If
|
End If
|
||||||
|
Dim sNameProg As Integer = 900
|
||||||
|
sNameProg = GetPrivateProfileInt(S_PARTPROGRAM, "NameProg", sNameProg, m_MainWindow.GetMachIniFile)
|
||||||
' Download programma (eventuali errori sono segnalati dalla funzione)
|
' 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
|
' copio il progetto corrente come progetto in lavorazione
|
||||||
Dim sWrkPath As String = m_MainWindow.GetTempDir() & "\" & "WorkProj.nge"
|
Dim sWrkPath As String = m_MainWindow.GetTempDir() & "\" & "WorkProj.nge"
|
||||||
My.Computer.FileSystem.CopyFile(sMchPath, sWrkPath, True)
|
My.Computer.FileSystem.CopyFile(sMchPath, sWrkPath, True)
|
||||||
@@ -348,6 +350,7 @@ Public Class SquaringUC
|
|||||||
EgtTdbGetCurrToolParam(MCH_TP.TYPE, nType)
|
EgtTdbGetCurrToolParam(MCH_TP.TYPE, nType)
|
||||||
Dim dThick As Double = 0
|
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)
|
||||||
|
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
|
' Ricalcolo lo spessore in base all'inclinazione
|
||||||
dThick = dThick / Math.Cos(m_dAngV * Math.PI / 180)
|
dThick = dThick / Math.Cos(m_dAngV * Math.PI / 180)
|
||||||
' Imposto angolo di rotazione a seconda del lato dei tagli paralleli
|
' 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
|
If dDimPzY <> 0 And nNumPzY > 0 And dDimPzX <> 0 And nNumPzX > 0 Then
|
||||||
Dim dLenX As Double = dThick + (dDimPzX + dThick) * nNumPzX
|
Dim dLenX As Double = dThick + (dDimPzX + dThick) * nNumPzX
|
||||||
Dim nCutParaId = EgtCreateLinePDL(nLayerId, ptStart, m_dAngO, dLenX + 0.1)
|
Dim nCutParaId = EgtCreateLinePDL(nLayerId, ptStart, m_dAngO, dLenX + 0.1)
|
||||||
' Imposto affondamento e angolo di fianco sul taglio
|
' Inidico che è un taglio Diretto di tipo Squaring
|
||||||
EgtSetInfo(nCutParaId, INFO_DEPTH, m_dDepth)
|
EgtSetInfo(nCutParaId, INFO_DIRECTCUT, FlagDirectCuts.Squaring)
|
||||||
EgtSetInfo(nCutParaId, INFO_SIDE_ANGLE, m_dAngV)
|
' 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
|
' Allungo la geometria
|
||||||
EgtExtendCurveStartByLen(nCutParaId, m_dOffsetSquaring + m_dExtraLength)
|
EgtExtendCurveStartByLen(nCutParaId, m_dOffsetSquaring + m_dExtraLength)
|
||||||
EgtExtendCurveEndByLen(nCutParaId, m_dOffsetSquaring + +m_dExtraLength)
|
EgtExtendCurveEndByLen(nCutParaId, m_dOffsetSquaring + +m_dExtraLength)
|
||||||
|
|||||||
@@ -1,13 +1,13 @@
|
|||||||
<UserControl x:Class="VacuumMachineButtonUC"
|
<UserControl x:Class="VacuumMachineButtonUC"
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
DataContext="Self"
|
DataContext="Self"
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
xmlns:OmagCUT="clr-namespace:OmagCUT"
|
xmlns:OmagCUT="clr-namespace:OmagCUT"
|
||||||
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
|
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
d:DesignHeight="597.3" d:DesignWidth="256">
|
d:DesignHeight="597.3" d:DesignWidth="256">
|
||||||
|
|
||||||
<Border Style="{DynamicResource OmagCut_Page2Border}">
|
<Border Style="{DynamicResource OmagCut_Page2Border}">
|
||||||
|
|
||||||
@@ -15,28 +15,28 @@
|
|||||||
<ItemsControl.Resources>
|
<ItemsControl.Resources>
|
||||||
<DataTemplate DataType="{x:Type OmagCUT:TwoStateButton}">
|
<DataTemplate DataType="{x:Type OmagCUT:TwoStateButton}">
|
||||||
<ToggleButton IsChecked="{Binding IsChecked}"
|
<ToggleButton IsChecked="{Binding IsChecked}"
|
||||||
Style="{StaticResource OmagCut_GradientYellowIconToggleButton}">
|
Style="{DynamicResource OmagCut_GradientYellowIconToggleButton}">
|
||||||
<Image Source="{Binding ImageSource}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
<Image Source="{Binding ImageSource}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||||
</ToggleButton>
|
</ToggleButton>
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
<DataTemplate DataType="{x:Type OmagCUT:ThreeStateButton}">
|
<DataTemplate DataType="{x:Type OmagCUT:ThreeStateButton}">
|
||||||
<Button Command="{Binding ExecuteCommand}"
|
<Button Command="{Binding ExecuteCommand}"
|
||||||
Background="{Binding Background}"
|
Background="{Binding Background}"
|
||||||
Style="{StaticResource OmagCut_MachineCommandsYellowGradientYellowIconButton}">
|
Style="{DynamicResource OmagCut_MachineCommandsYellowGradientYellowIconButton}">
|
||||||
<Image Source="{Binding ImageSource}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
<Image Source="{Binding ImageSource}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||||
</Button>
|
</Button>
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
<DataTemplate DataType="{x:Type OmagCUT:DoubleCommandButton}">
|
<DataTemplate DataType="{x:Type OmagCUT:DoubleCommandButton}">
|
||||||
<ToggleButton IsChecked="{Binding IsChecked}"
|
<ToggleButton IsChecked="{Binding IsChecked}"
|
||||||
Style="{StaticResource OmagCut_GradientYellowIconToggleButton}">
|
Style="{DynamicResource OmagCut_GradientYellowIconToggleButton}">
|
||||||
<Image Source="{Binding ImageSource}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
<Image Source="{Binding ImageSource}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||||
</ToggleButton>
|
</ToggleButton>
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
<DataTemplate DataType="{x:Type OmagCUT:PressedCommandButton}">
|
<DataTemplate DataType="{x:Type OmagCUT:PressedCommandButton}">
|
||||||
<Button Style="{StaticResource OmagCut_MachineCommandsYellowGradientYellowIconButton}"
|
<Button Style="{DynamicResource OmagCut_MachineCommandsYellowGradientYellowIconButton}"
|
||||||
PreviewMouseUp="PressedCommandButton_PreviewMouseUp"
|
PreviewMouseUp="PressedCommandButton_PreviewMouseUp"
|
||||||
PreviewMouseDown="PressedCommandButton_PreviewMouseDown">
|
PreviewMouseDown="PressedCommandButton_PreviewMouseDown">
|
||||||
<Image Source="{Binding ImageSource}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
<Image Source="{Binding ImageSource}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||||
</Button>
|
</Button>
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
</ItemsControl.Resources>
|
</ItemsControl.Resources>
|
||||||
@@ -54,7 +54,7 @@
|
|||||||
</ItemsPanelTemplate>
|
</ItemsPanelTemplate>
|
||||||
</ItemsControl.ItemsPanel>
|
</ItemsControl.ItemsPanel>
|
||||||
</ItemsControl>
|
</ItemsControl>
|
||||||
|
|
||||||
</Border>
|
</Border>
|
||||||
|
|
||||||
</UserControl>
|
</UserControl>
|
||||||
|
|||||||
@@ -22,6 +22,9 @@ Public Class VacuumMachineButtonUC
|
|||||||
Friend m_CN As CN_generico
|
Friend m_CN As CN_generico
|
||||||
Private m_bFirst As Boolean = True
|
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
|
' Creazione converter da String a ImageSource
|
||||||
Dim ImageConverter As New ImageSourceConverter
|
Dim ImageConverter As New ImageSourceConverter
|
||||||
|
|
||||||
@@ -71,10 +74,37 @@ Public Class VacuumMachineButtonUC
|
|||||||
If Not IsNothing(ButtonToAdd) Then m_ButtonList.Add(ButtonToAdd)
|
If Not IsNothing(ButtonToAdd) Then m_ButtonList.Add(ButtonToAdd)
|
||||||
End If
|
End If
|
||||||
End While
|
End While
|
||||||
|
|
||||||
|
For Each MachineButton As MachineButton In m_ButtonList
|
||||||
|
OutLogTypeButton(MachineButton)
|
||||||
|
Next
|
||||||
|
m_OutLogTypeButton = False
|
||||||
|
|
||||||
NotifyPropertyChanged("ButtonList")
|
NotifyPropertyChanged("ButtonList")
|
||||||
End If
|
End If
|
||||||
End Sub
|
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)
|
Friend Sub VacuumUpChanged(VacuumUpState As Boolean)
|
||||||
Dim VacuumUpButton As TwoStateButton = Nothing
|
Dim VacuumUpButton As TwoStateButton = Nothing
|
||||||
For Each MachineButton As MachineButton In m_ButtonList
|
For Each MachineButton As MachineButton In m_ButtonList
|
||||||
@@ -371,6 +401,8 @@ Public Class VacuumMachineButtonUC
|
|||||||
Next
|
Next
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
#End Region ' State Range
|
||||||
|
|
||||||
Public Function GetPrivateProfileMachineButtons(
|
Public Function GetPrivateProfileMachineButtons(
|
||||||
ByVal lpAppName As String,
|
ByVal lpAppName As String,
|
||||||
ByVal lpKeyName As String,
|
ByVal lpKeyName As String,
|
||||||
|
|||||||
+183
-182
@@ -1,224 +1,225 @@
|
|||||||
<UserControl x:Class="AlzFrontUC"
|
<UserControl x:Class="AlzFrontUC"
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
|
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
d:DesignHeight="768" d:DesignWidth="256">
|
d:DesignHeight="768" d:DesignWidth="256">
|
||||||
<!-- Definizione della Grid Laterale -->
|
|
||||||
<Grid Name="VariablesCompoGrid" Grid.RowSpan="2">
|
<!-- Definizione della Grid Laterale -->
|
||||||
<Grid.ColumnDefinitions>
|
<Grid Name="VariablesCompoGrid" Grid.RowSpan="2">
|
||||||
<ColumnDefinition Width="1*"/>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="0.3*"/>
|
<ColumnDefinition Width="1*"/>
|
||||||
<ColumnDefinition Width="1*"/>
|
<ColumnDefinition Width="0.3*"/>
|
||||||
<ColumnDefinition Width="1*"/>
|
<ColumnDefinition Width="1*"/>
|
||||||
</Grid.ColumnDefinitions>
|
<ColumnDefinition Width="1*"/>
|
||||||
<Grid.RowDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<RowDefinition Height="1*"/>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="1*"/>
|
<RowDefinition Height="1*"/>
|
||||||
<RowDefinition Height="1*"/>
|
<RowDefinition Height="1*"/>
|
||||||
<RowDefinition Height="1*"/>
|
<RowDefinition Height="1*"/>
|
||||||
<RowDefinition Height="1*"/>
|
<RowDefinition Height="1*"/>
|
||||||
<RowDefinition Height="1*"/>
|
<RowDefinition Height="1*"/>
|
||||||
<RowDefinition Height="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="1*"/>
|
||||||
<RowDefinition Height="4*"/>
|
<RowDefinition Height="0.2*"/>
|
||||||
<!--<RowDefinition Height="0.5*"/>
|
<RowDefinition Height="4*"/>
|
||||||
|
<!--<RowDefinition Height="0.5*"/>
|
||||||
<RowDefinition Height="0.5*"/>
|
<RowDefinition Height="0.5*"/>
|
||||||
<RowDefinition Height="0.5*"/>-->
|
<RowDefinition Height="0.5*"/>-->
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
<!--Titolo della colonna della ALZATINE-->
|
<!--Titolo della colonna della ALZATINE-->
|
||||||
<TextBlock Name="SideAngleBl" Grid.Row="0" Grid.Column="2" Text="Alz."
|
<TextBlock Name="SideAngleBl" Grid.Row="0" Grid.Column="2" Text="Alz."
|
||||||
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
|
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
|
||||||
FontSize="{DynamicResource FontSize_LowerCaseCharacter}"/>
|
FontSize="{DynamicResource FontSize_LowerCaseCharacter}"/>
|
||||||
|
|
||||||
<!--Titolo della colonna dei FRONTALINI-->
|
<!--Titolo della colonna dei FRONTALINI-->
|
||||||
<TextBlock Name="HeelBl" Grid.Row="0" Grid.Column="3" Text="Front."
|
<TextBlock Name="HeelBl" Grid.Row="0" Grid.Column="3" Text="Front."
|
||||||
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
|
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
|
||||||
FontSize="{DynamicResource FontSize_LowerCaseCharacter}"/>
|
FontSize="{DynamicResource FontSize_LowerCaseCharacter}"/>
|
||||||
|
|
||||||
<TextBlock Name="Entity1" Grid.Row="1" Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
<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"
|
<CheckBox Name="A1" Grid.Column="2" Grid.Row="1" Height="30" Width="40" HorizontalAlignment="Right"
|
||||||
Margin="-10,0,0,0"/>
|
Margin="-10,0,0,0"/>
|
||||||
<CheckBox Name="F1" Grid.Column="3" Grid.Row="1" Height="30" Width="40" HorizontalAlignment="Right"
|
<CheckBox Name="F1" Grid.Column="3" Grid.Row="1" Height="30" Width="40" HorizontalAlignment="Right"
|
||||||
Margin="-10,0,0,0"/>
|
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}"/>
|
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||||
<EgtWPFLib:EgtTextBox Name="H1TxBx" Grid.Column="3" Grid.Row="1" Width="60"
|
<EgtWPFLib:EgtTextBox Name="H1TxBx" Grid.Column="3" Grid.Row="1" Width="60"
|
||||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>-->
|
Style="{StaticResource 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="2" Grid.Row="2" Height="30" Width="40" HorizontalAlignment="Right"
|
<CheckBox Name="A2" Grid.Column="2" Grid.Row="2" Height="30" Width="40" HorizontalAlignment="Right"
|
||||||
Margin="-20,0,0,0"/>
|
Margin="-20,0,0,0"/>
|
||||||
<CheckBox Name="F2" Grid.Column="3" Grid.Row="2" Height="30" Width="40" HorizontalAlignment="Right"
|
<CheckBox Name="F2" Grid.Column="3" 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"
|
<!--<EgtWPFLib:EgtTextBox Name="A2TxBx" Grid.Column="2" Grid.Row="2" Width="60"
|
||||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||||
<EgtWPFLib:EgtTextBox Name="H2TxBx" Grid.Column="3" Grid.Row="2" Width="60"
|
<EgtWPFLib:EgtTextBox Name="H2TxBx" Grid.Column="3" Grid.Row="2" Width="60"
|
||||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>-->
|
Style="{StaticResource 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="2" Grid.Row="3" Height="30" Width="40" HorizontalAlignment="Right"
|
<CheckBox Name="A3" Grid.Column="2" Grid.Row="3" Height="30" Width="40" HorizontalAlignment="Right"
|
||||||
Margin="-20,0,0,0"/>
|
Margin="-20,0,0,0"/>
|
||||||
<CheckBox Name="F3" Grid.Column="3" Grid.Row="3" Height="30" Width="40" HorizontalAlignment="Right"
|
<CheckBox Name="F3" Grid.Column="3" 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"
|
<!--<EgtWPFLib:EgtTextBox Name="A3TxBx" Grid.Column="2" Grid.Row="3" Width="60"
|
||||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||||
<EgtWPFLib:EgtTextBox Name="H3TxBx" Grid.Column="3" Grid.Row="3" Width="60"
|
<EgtWPFLib:EgtTextBox Name="H3TxBx" Grid.Column="3" Grid.Row="3" Width="60"
|
||||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>-->
|
Style="{StaticResource 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="2" Grid.Row="4" Height="30" Width="40" HorizontalAlignment="Right"
|
<CheckBox Name="A4" Grid.Column="2" Grid.Row="4" Height="30" Width="40" HorizontalAlignment="Right"
|
||||||
Margin="-20,0,0,0"/>
|
Margin="-20,0,0,0"/>
|
||||||
<CheckBox Name="F4" Grid.Column="3" Grid.Row="4" Height="30" Width="40" HorizontalAlignment="Right"
|
<CheckBox Name="F4" Grid.Column="3" 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"
|
<!--<EgtWPFLib:EgtTextBox Name="A4TxBx" Grid.Column="2" Grid.Row="4" Width="60"
|
||||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||||
<EgtWPFLib:EgtTextBox Name="H4TxBx" Grid.Column="3" Grid.Row="4" Width="60"
|
<EgtWPFLib:EgtTextBox Name="H4TxBx" Grid.Column="3" Grid.Row="4" Width="60"
|
||||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>-->
|
Style="{StaticResource 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="2" Grid.Row="5" Height="30" Width="40" HorizontalAlignment="Right"
|
<CheckBox Name="A5" Grid.Column="2" Grid.Row="5" Height="30" Width="40" HorizontalAlignment="Right"
|
||||||
Margin="-20,0,0,0"/>
|
Margin="-20,0,0,0"/>
|
||||||
<CheckBox Name="F5" Grid.Column="3" Grid.Row="5" Height="30" Width="40" HorizontalAlignment="Right"
|
<CheckBox Name="F5" Grid.Column="3" 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"
|
<!--<EgtWPFLib:EgtTextBox Name="A5TxBx" Grid.Column="2" Grid.Row="5" Width="60"
|
||||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||||
<EgtWPFLib:EgtTextBox Name="H5TxBx" Grid.Column="3" Grid.Row="5" Width="60"
|
<EgtWPFLib:EgtTextBox Name="H5TxBx" Grid.Column="3" Grid.Row="5" Width="60"
|
||||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>-->
|
Style="{StaticResource 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="2" Grid.Row="6" Height="30" Width="40" HorizontalAlignment="Right"
|
<CheckBox Name="A6" Grid.Column="2" Grid.Row="6" Height="30" Width="40" HorizontalAlignment="Right"
|
||||||
Margin="-20,0,0,0"/>
|
Margin="-20,0,0,0"/>
|
||||||
<CheckBox Name="F6" Grid.Column="3" Grid.Row="6" Height="30" Width="40" HorizontalAlignment="Right"
|
<CheckBox Name="F6" Grid.Column="3" 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"
|
<!--<EgtWPFLib:EgtTextBox Name="A6TxBx" Grid.Column="2" Grid.Row="6" Width="60"
|
||||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||||
<EgtWPFLib:EgtTextBox Name="H6TxBx" Grid.Column="3" Grid.Row="6" Width="60"
|
<EgtWPFLib:EgtTextBox Name="H6TxBx" Grid.Column="3" Grid.Row="6" Width="60"
|
||||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>-->
|
Style="{StaticResource 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="2" Grid.Row="7" Height="30" Width="40" HorizontalAlignment="Right"
|
<CheckBox Name="A7" Grid.Column="2" Grid.Row="7" Height="30" Width="40" HorizontalAlignment="Right"
|
||||||
Margin="-20,0,0,0"/>
|
Margin="-20,0,0,0"/>
|
||||||
<CheckBox Name="F7" Grid.Column="3" Grid.Row="7" Height="30" Width="40" HorizontalAlignment="Right"
|
<CheckBox Name="F7" Grid.Column="3" 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"
|
<!--<EgtWPFLib:EgtTextBox Name="A7TxBx" Grid.Column="2" Grid.Row="7" Width="60"
|
||||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||||
<EgtWPFLib:EgtTextBox Name="H7TxBx" Grid.Column="3" Grid.Row="7" Width="60"
|
<EgtWPFLib:EgtTextBox Name="H7TxBx" Grid.Column="3" Grid.Row="7" Width="60"
|
||||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>-->
|
Style="{StaticResource 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="2" Grid.Row="8" Height="30" Width="40" HorizontalAlignment="Right"
|
<CheckBox Name="A8" Grid.Column="2" Grid.Row="8" Height="30" Width="40" HorizontalAlignment="Right"
|
||||||
Margin="-20,0,0,0"/>
|
Margin="-20,0,0,0"/>
|
||||||
<CheckBox Name="F8" Grid.Column="3" Grid.Row="8" Height="30" Width="40" HorizontalAlignment="Right"
|
<CheckBox Name="F8" Grid.Column="3" 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"
|
<!--<EgtWPFLib:EgtTextBox Name="A8TxBx" Grid.Column="2" Grid.Row="8" Width="60"
|
||||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||||
<EgtWPFLib:EgtTextBox Name="H8TxBx" Grid.Column="3" Grid.Row="8" Width="60"
|
<EgtWPFLib:EgtTextBox Name="H8TxBx" Grid.Column="3" Grid.Row="8" Width="60"
|
||||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>-->
|
Style="{StaticResource 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="2" Grid.Row="9" Height="30" Width="40" HorizontalAlignment="Right"
|
<CheckBox Name="A9" Grid.Column="2" Grid.Row="9" Height="30" Width="40" HorizontalAlignment="Right"
|
||||||
Margin="-20,0,0,0"/>
|
Margin="-20,0,0,0"/>
|
||||||
<CheckBox Name="F9" Grid.Column="3" Grid.Row="9" Height="30" Width="40" HorizontalAlignment="Right"
|
<CheckBox Name="F9" Grid.Column="3" 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"
|
<!--<EgtWPFLib:EgtTextBox Name="A9TxBx" Grid.Column="2" Grid.Row="9" Width="60"
|
||||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||||
<EgtWPFLib:EgtTextBox Name="H9TxBx" Grid.Column="3" Grid.Row="9" Width="60"
|
<EgtWPFLib:EgtTextBox Name="H9TxBx" Grid.Column="3" Grid.Row="9" Width="60"
|
||||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>-->
|
Style="{StaticResource 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="2" Grid.Row="10" Height="30" Width="40" HorizontalAlignment="Right"
|
<CheckBox Name="A10" Grid.Column="2" Grid.Row="10" Height="30" Width="40" HorizontalAlignment="Right"
|
||||||
Margin="-20,0,0,0"/>
|
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"
|
<!--<EgtWPFLib:EgtTextBox Name="A10TxBx" Grid.Column="2" Grid.Row="10" Width="60"
|
||||||
Margin="-20,0,0,0"/>
|
|
||||||
|
|
||||||
<!--<EgtWPFLib:EgtTextBox Name="A10TxBx" Grid.Column="2" Grid.Row="10" Width="60"
|
|
||||||
Margin="0,0,0,-2"
|
Margin="0,0,0,-2"
|
||||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||||
<EgtWPFLib:EgtTextBox Name="H10TxBx" Grid.Column="3" Grid.Row="10" Width="60"
|
<EgtWPFLib:EgtTextBox Name="H10TxBx" Grid.Column="3" Grid.Row="10" Width="60"
|
||||||
Margin="0,0,0,-2"
|
Margin="0,0,0,-2"
|
||||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>-->
|
Style="{StaticResource OmagCut_CalculatorTextBox}"/>-->
|
||||||
|
|
||||||
<Grid Grid.Column="0" Grid.Row="12" Grid.ColumnSpan="4">
|
<Grid Grid.Column="0" Grid.Row="12" Grid.ColumnSpan="4">
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="1*"/>
|
<ColumnDefinition Width="1*"/>
|
||||||
<ColumnDefinition Width="0.3*"/>
|
<ColumnDefinition Width="0.3*"/>
|
||||||
<ColumnDefinition Width="1*"/>
|
<ColumnDefinition Width="1*"/>
|
||||||
<ColumnDefinition Width="1*"/>
|
<ColumnDefinition Width="1*"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="0.55*"/>
|
<RowDefinition Height="0.55*"/>
|
||||||
<RowDefinition Height="0.55*"/>
|
<RowDefinition Height="0.55*"/>
|
||||||
<RowDefinition Height="0.55*"/>
|
<RowDefinition Height="0.55*"/>
|
||||||
<RowDefinition Height="1*"/>
|
<RowDefinition Height="1*"/>
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
<!-- Altezza delle alette -->
|
<!-- Altezza delle alette -->
|
||||||
<TextBlock Name="Parameter1TxBl" Grid.Row="0" Grid.ColumnSpan="2"
|
<TextBlock Name="Parameter1TxBl" Grid.Row="0" Grid.ColumnSpan="2"
|
||||||
Text="Offset"
|
Text="Offset"
|
||||||
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
|
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
|
||||||
FontSize="{DynamicResource FontSize_LowerCaseCharacter}"/>
|
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}"/>
|
|
||||||
|
|
||||||
<!-- Spessore aletta -->
|
<EgtWPFLib:EgtTextBox Name="Parameter1ATxBx"
|
||||||
<TextBlock Name="Parameter5TxBl" Grid.Row="2" Grid.ColumnSpan="2"
|
Grid.Column="2" Grid.Row="0"
|
||||||
Text="Offset2"
|
HorizontalAlignment="Right"
|
||||||
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
|
Width="60" Height="30" Margin="0,0,0,0"
|
||||||
FontSize="{DynamicResource FontSize_LowerCaseCharacter}"/>
|
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||||
<EgtWPFLib:EgtTextBox Name="Parameter5TxBx"
|
<EgtWPFLib:EgtTextBox Name="Parameter1FTxBx"
|
||||||
Grid.Column="2" Grid.Row="2"
|
Grid.Column="3" Grid.Row="0"
|
||||||
HorizontalAlignment="Right"
|
HorizontalAlignment="Right"
|
||||||
Width="60" Height="30" Margin="0,0,0,0"
|
Width="60" Height="30" Margin="0,0,0,0"
|
||||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
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" >
|
<UniformGrid Rows="1" Grid.Column="2" Grid.Row="1" Grid.ColumnSpan="2" Width="90" >
|
||||||
<EgtWPFLib:EgtTextBox Name="Parameter2aTxBx"
|
<EgtWPFLib:EgtTextBox Name="Parameter2aTxBx"
|
||||||
Grid.Column="2" Grid.Row="12"
|
Grid.Column="2" Grid.Row="12"
|
||||||
@@ -231,7 +232,7 @@
|
|||||||
</UniformGrid>-->
|
</UniformGrid>-->
|
||||||
|
|
||||||
|
|
||||||
<!--<TextBlock Name="Parameter3TxBl" Grid.Row="2" Grid.ColumnSpan="2"
|
<!--<TextBlock Name="Parameter3TxBl" Grid.Row="2" Grid.ColumnSpan="2"
|
||||||
Text="Affondamento"
|
Text="Affondamento"
|
||||||
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
|
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
|
||||||
FontSize="{DynamicResource FontSize_LowerCaseCharacter}"/>
|
FontSize="{DynamicResource FontSize_LowerCaseCharacter}"/>
|
||||||
@@ -241,7 +242,7 @@
|
|||||||
Width="85" Height="30"
|
Width="85" Height="30"
|
||||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>-->
|
Style="{StaticResource OmagCut_CalculatorTextBox}"/>-->
|
||||||
|
|
||||||
<!--<TextBlock Name="Parameter4TxBl" Grid.Row="3" Grid.ColumnSpan="2"
|
<!--<TextBlock Name="Parameter4TxBl" Grid.Row="3" Grid.ColumnSpan="2"
|
||||||
Text="Accorciamento"
|
Text="Accorciamento"
|
||||||
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
|
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
|
||||||
FontSize="{DynamicResource FontSize_LowerCaseCharacter}"/>
|
FontSize="{DynamicResource FontSize_LowerCaseCharacter}"/>
|
||||||
@@ -250,22 +251,22 @@
|
|||||||
Margin="0,0,0,-2"
|
Margin="0,0,0,-2"
|
||||||
Width="85" Height="30"
|
Width="85" Height="30"
|
||||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>-->
|
Style="{StaticResource OmagCut_CalculatorTextBox}"/>-->
|
||||||
|
|
||||||
<UniformGrid Columns="2" Grid.ColumnSpan="4" Grid.Row="3">
|
<UniformGrid Columns="2" Grid.ColumnSpan="4" Grid.Row="3">
|
||||||
<!--questo bottone è stato creato solo per garantire il corretto allinaemento-->
|
<!--questo bottone è stato creato solo per garantire il corretto allinaemento-->
|
||||||
<Button Name="Vuoto" Visibility="Hidden"/>
|
<Button Name="Vuoto" Visibility="Hidden"/>
|
||||||
<!--Bottone per tornare indietro alla selezione di CompoInterni e Alz&Front-->
|
<!--Bottone per tornare indietro alla selezione di CompoInterni e Alz&Front-->
|
||||||
<Button Name="BackBtn"
|
<Button Name="BackBtn"
|
||||||
Style="{DynamicResource OmagCut_YellowIconButton}">
|
Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||||
<Image Source="{DynamicResource NumericKeyboardArrowImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
<Image Source="{DynamicResource NumericKeyboardArrowImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||||
</Button>
|
</Button>
|
||||||
</UniformGrid>
|
</UniformGrid>
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
</UserControl>
|
</UserControl>
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,4 @@
|
|||||||
Imports System.Globalization
|
Imports EgtUILib
|
||||||
Imports EgtUILib
|
|
||||||
Imports EgtWPFLib
|
|
||||||
|
|
||||||
Public Class AlzFrontUC
|
Public Class AlzFrontUC
|
||||||
Private Const NUM_VAR As Integer = 10
|
Private Const NUM_VAR As Integer = 10
|
||||||
@@ -76,9 +74,9 @@ Public Class AlzFrontUC
|
|||||||
m_MainWindow.m_DrawPageUC.DripCutBtn.IsEnabled = False
|
m_MainWindow.m_DrawPageUC.DripCutBtn.IsEnabled = False
|
||||||
|
|
||||||
' nome dei parametri condivisi
|
' nome dei parametri condivisi
|
||||||
Parameter1TxBl.Text = EgtMsg(91134)
|
Parameter1TxBl.Text = EgtMsg(91134) ' Altezza
|
||||||
Parameter2TxBl.Text = EgtMsg(91135)
|
Parameter2TxBl.Text = EgtMsg(91135) ' Delta angolo
|
||||||
Parameter5TxBl.Text = EgtMsg(91136)
|
Parameter5TxBl.Text = EgtMsg(91136) ' Spessore
|
||||||
|
|
||||||
EgtZoom(ZM.ALL)
|
EgtZoom(ZM.ALL)
|
||||||
End Sub
|
End Sub
|
||||||
@@ -195,10 +193,10 @@ Public Class AlzFrontUC
|
|||||||
If LoopId <> GDB_ID.NULL Then
|
If LoopId <> GDB_ID.NULL Then
|
||||||
If m_nCount = 0 Then
|
If m_nCount = 0 Then
|
||||||
If m_CallingPage = MainWindow.Pages.Draw 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")
|
m_MainWindow.m_DrawPageUC.MessageBrd.Background = Application.Current.FindResource("OmagCut_Yellow")
|
||||||
Else
|
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")
|
m_MainWindow.m_ImportPageUC.MessageBrd.Background = Application.Current.FindResource("OmagCut_Yellow")
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
|
|||||||
@@ -1,13 +1,13 @@
|
|||||||
<Window x:Class="CompoCsvData"
|
<Window x:Class="CompoCsvData"
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
|
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
|
||||||
FontFamily="{DynamicResource OmagCut_Font}"
|
FontFamily="{DynamicResource OmagCut_Font}"
|
||||||
ResizeMode="NoResize" WindowStyle="None" AllowsTransparency="True" Background="Transparent"
|
ResizeMode="NoResize" WindowStyle="None" AllowsTransparency="True" Background="Transparent"
|
||||||
Title="ChooseMachining" Height="276.5" Width="426.5">
|
Title="ChooseMachining" Height="276.5" Width="426.5">
|
||||||
|
|
||||||
<!--Definizione della pagina di impostazione dati Trf su componenti-->
|
<!--Definizione della pagina di impostazione dati Trf su componenti-->
|
||||||
<Border Style="{DynamicResource OmagCut_Border}">
|
<Border Style="{DynamicResource OmagCut_Border}">
|
||||||
|
|
||||||
<Grid Name="CompoCsvDataGrid">
|
<Grid Name="CompoCsvDataGrid">
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
@@ -27,19 +27,19 @@
|
|||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
<TextBlock Name="OrderTxBl" Grid.Column="1" Grid.Row="1"
|
<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"
|
<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"
|
<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"
|
<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"
|
<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"
|
<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 Name="ButtonsGrid" Grid.Column="0" Grid.Row="5" Grid.ColumnSpan="4">
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
@@ -50,13 +50,15 @@
|
|||||||
<ColumnDefinition Width="1*"/>
|
<ColumnDefinition Width="1*"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
<Button Name="OkBtn" Grid.Column="1" Style="{DynamicResource OmagCut_GradientBlueIconButton}"
|
<Button Name="OkBtn" Grid.Column="1"
|
||||||
IsCancel="True">
|
Style="{DynamicResource OmagCut_GradientBlueIconButton}"
|
||||||
<Image Source="{DynamicResource VImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
IsCancel="True">
|
||||||
|
<Image Source="{DynamicResource VImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||||
</Button>
|
</Button>
|
||||||
<Button Name="ExitBtn" Grid.Column="3" Style="{DynamicResource OmagCut_GradientBlueIconButton}"
|
<Button Name="ExitBtn" Grid.Column="3"
|
||||||
IsCancel="True">
|
Style="{DynamicResource OmagCut_GradientBlueIconButton}"
|
||||||
<Image Source="{DynamicResource XImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
IsCancel="True">
|
||||||
|
<Image Source="{DynamicResource XImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||||
</Button>
|
</Button>
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
Imports System.Collections.ObjectModel
|
Imports EgtUILib
|
||||||
Imports EgtUILib
|
|
||||||
|
|
||||||
Public Class CompoCsvData
|
Public Class CompoCsvData
|
||||||
|
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
<UserControl x:Class="CompoDimensionUC"
|
<UserControl x:Class="CompoDimensionUC"
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
|
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
d:DesignHeight="597.1" d:DesignWidth="255.9">
|
d:DesignHeight="597.1" d:DesignWidth="255.9">
|
||||||
|
|
||||||
<!-- Definizione della Grid Laterale -->
|
<!-- Definizione della Grid Laterale -->
|
||||||
<Grid Name="VariablesCompoGrid" Grid.RowSpan="2">
|
<Grid Name="VariablesCompoGrid" Grid.RowSpan="2">
|
||||||
@@ -26,54 +26,54 @@
|
|||||||
<RowDefinition Height="0.5*"/>
|
<RowDefinition Height="0.5*"/>
|
||||||
<RowDefinition Height="1*"/>
|
<RowDefinition Height="1*"/>
|
||||||
<RowDefinition Height="1*"/>
|
<RowDefinition Height="1*"/>
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
<TextBlock Name="Label1" Grid.Row="0"
|
<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"
|
<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"
|
<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"
|
<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"
|
<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"
|
<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"
|
<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"
|
<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"
|
<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"
|
<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"
|
<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"
|
<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"
|
<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"
|
<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"
|
<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"
|
<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"
|
<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"
|
<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"
|
<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"
|
<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="AddBtn" Grid.Row="10" Style="{DynamicResource OmagCut_YellowTextButton}"/>
|
||||||
<Button Name="CancelBtn" Grid.Column="1" 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"
|
<Button Name="InternComponentBtn" Grid.Row="10" Grid.ColumnSpan="2"
|
||||||
Style="{DynamicResource OmagCut_YellowTextButton}"/>
|
Style="{DynamicResource OmagCut_YellowTextButton}"/>
|
||||||
|
|
||||||
@@ -81,6 +81,6 @@
|
|||||||
<Button Name="AlzFrontBtn" Grid.Row="11" Grid.ColumnSpan="2"
|
<Button Name="AlzFrontBtn" Grid.Row="11" Grid.ColumnSpan="2"
|
||||||
Style="{DynamicResource OmagCut_YellowTextButton}"/>
|
Style="{DynamicResource OmagCut_YellowTextButton}"/>
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
</UserControl>
|
</UserControl>
|
||||||
|
|||||||
@@ -34,16 +34,16 @@ Public Class CompoDimensionUC
|
|||||||
Dim sCompoDir As String = String.Empty
|
Dim sCompoDir As String = String.Empty
|
||||||
GetPrivateProfileString(S_ALZFRONT, K_COMPODIR, "", sCompoDir, m_MainWindow.GetIniFile())
|
GetPrivateProfileString(S_ALZFRONT, K_COMPODIR, "", sCompoDir, m_MainWindow.GetIniFile())
|
||||||
' definisco il nome dei comandi presenti nella pagine
|
' 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
|
If Not String.IsNullOrEmpty(sCompoDir) Then
|
||||||
bEnableAlzFront = True
|
bEnableAlzFront = True
|
||||||
AlzFrontBtn.Content = "Alzatine & Frontalini"
|
AlzFrontBtn.Content = EgtMsg(91137)
|
||||||
Else
|
Else
|
||||||
AlzFrontBtn.Visibility = Visibility.Collapsed
|
AlzFrontBtn.Visibility = Visibility.Collapsed
|
||||||
End If
|
End If
|
||||||
|
|
||||||
AddBtn.Content = EgtMsg(MSG_COMPONENTPAGEUC + 48) ' Aggiungi
|
AddBtn.Content = EgtMsg(90448) ' Aggiungi
|
||||||
CancelBtn.Content = EgtMsg(MSG_COMPONENTPAGEUC + 49) ' Rimuovi
|
CancelBtn.Content = EgtMsg(90449) ' Rimuovi
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub CompoDimensionUC_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded
|
Private Sub CompoDimensionUC_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded
|
||||||
@@ -107,8 +107,10 @@ Public Class CompoDimensionUC
|
|||||||
Friend Sub ShowAlzFrontBtn(ByVal value As Boolean)
|
Friend Sub ShowAlzFrontBtn(ByVal value As Boolean)
|
||||||
If value Then
|
If value Then
|
||||||
AlzFrontBtn.Visibility = Visibility.Visible
|
AlzFrontBtn.Visibility = Visibility.Visible
|
||||||
|
m_MainWindow.m_DrawPageUC.MessageGrid.Visibility = Visibility.Hidden
|
||||||
Else
|
Else
|
||||||
AlzFrontBtn.Visibility = Visibility.Hidden
|
AlzFrontBtn.Visibility = Visibility.Hidden
|
||||||
|
m_MainWindow.m_DrawPageUC.MessageGrid.Visibility = Visibility.Visible
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|||||||
@@ -1,13 +1,13 @@
|
|||||||
<Window x:Class="CompoTrfData"
|
<Window x:Class="CompoTrfData"
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
|
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
|
||||||
FontFamily="{DynamicResource OmagCut_Font}"
|
FontFamily="{DynamicResource OmagCut_Font}"
|
||||||
ResizeMode="NoResize" WindowStyle="None" AllowsTransparency="True" Background="Transparent"
|
ResizeMode="NoResize" WindowStyle="None" AllowsTransparency="True" Background="Transparent"
|
||||||
Title="ChooseMachining" Height="426.5" Width="426.5">
|
Title="ChooseMachining" Height="426.5" Width="426.5">
|
||||||
|
|
||||||
<!--Definizione della pagina di impostazione dati Trf su componenti-->
|
<!--Definizione della pagina di impostazione dati Trf su componenti-->
|
||||||
<Border Style="{DynamicResource OmagCut_Border}">
|
<Border Style="{DynamicResource OmagCut_Border}">
|
||||||
|
|
||||||
<Grid Name="CompoTrfDataGrid">
|
<Grid Name="CompoTrfDataGrid">
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
@@ -30,34 +30,34 @@
|
|||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
<TextBlock Name="OrdCodeTxBl" Grid.Column="1" Grid.Row="1"
|
<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"
|
<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"
|
<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"
|
<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"
|
<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"
|
<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"
|
<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"
|
<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"
|
<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"
|
<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"
|
<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"
|
<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 Name="ButtonsGrid" Grid.Column="0" Grid.Row="8" Grid.ColumnSpan="4">
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
@@ -68,13 +68,15 @@
|
|||||||
<ColumnDefinition Width="1*"/>
|
<ColumnDefinition Width="1*"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
<Button Name="OkBtn" Grid.Column="1" Style="{DynamicResource OmagCut_GradientBlueIconButton}"
|
<Button Name="OkBtn" Grid.Column="1"
|
||||||
IsCancel="True">
|
Style="{DynamicResource OmagCut_GradientBlueIconButton}"
|
||||||
<Image Source="{DynamicResource VImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
IsCancel="True">
|
||||||
|
<Image Source="{DynamicResource VImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||||
</Button>
|
</Button>
|
||||||
<Button Name="ExitBtn" Grid.Column="3" Style="{DynamicResource OmagCut_GradientBlueIconButton}"
|
<Button Name="ExitBtn" Grid.Column="3"
|
||||||
IsCancel="True">
|
Style="{DynamicResource OmagCut_GradientBlueIconButton}"
|
||||||
<Image Source="{DynamicResource XImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
IsCancel="True">
|
||||||
|
<Image Source="{DynamicResource XImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||||
</Button>
|
</Button>
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
Imports System.Collections.ObjectModel
|
Imports EgtUILib
|
||||||
Imports EgtUILib
|
|
||||||
|
|
||||||
Public Class CompoTrfData
|
Public Class CompoTrfData
|
||||||
|
|
||||||
@@ -14,12 +13,12 @@ Public Class CompoTrfData
|
|||||||
Private Sub CompoTrfData_Initialized(sender As Object, e As EventArgs) Handles Me.Initialized
|
Private Sub CompoTrfData_Initialized(sender As Object, e As EventArgs) Handles Me.Initialized
|
||||||
Me.Top = Owner.Top + Owner.Height / 2 - Me.Height / 2
|
Me.Top = Owner.Top + Owner.Height / 2 - Me.Height / 2
|
||||||
Me.Left = Owner.Left + Owner.Width / 2 - Me.Width / 2
|
Me.Left = Owner.Left + Owner.Width / 2 - Me.Width / 2
|
||||||
OrdCodeTxBl.Text = EgtMsg(MSG_DRAWPAGEUC + 10) 'Order Code
|
OrdCodeTxBl.Text = EgtMsg(90390) ' Order Code
|
||||||
OrdDescTxBl.Text = EgtMsg(MSG_DRAWPAGEUC + 11) 'Order Description
|
OrdDescTxBl.Text = EgtMsg(90391) ' Order Description
|
||||||
PartCodeTxBl.Text = EgtMsg(MSG_DRAWPAGEUC + 16) 'Part Code
|
PartCodeTxBl.Text = EgtMsg(90396) ' Part Code
|
||||||
MatCodeTxBl.Text = EgtMsg(MSG_DRAWPAGEUC + 12) 'Material Code
|
MatCodeTxBl.Text = EgtMsg(90392) ' Material Code
|
||||||
SurfCodeTxBl.Text = EgtMsg(MSG_DRAWPAGEUC + 13) 'Surface Code
|
SurfCodeTxBl.Text = EgtMsg(90393) ' Surface Code
|
||||||
ThicknessTxBl.Text = EgtMsg(MSG_DRAWPAGEUC + 14) 'Thickness
|
ThicknessTxBl.Text = EgtMsg(90394) ' Thickness
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub OkBtn_Click(sender As Object, e As RoutedEventArgs) Handles OkBtn.Click
|
Private Sub OkBtn_Click(sender As Object, e As RoutedEventArgs) Handles OkBtn.Click
|
||||||
|
|||||||
+38
-35
@@ -1,18 +1,18 @@
|
|||||||
<UserControl x:Class="DrawPageUC"
|
<UserControl x:Class="DrawPageUC"
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
|
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
d:DesignHeight="853.3" d:DesignWidth="1280" Initialized="DrawPage_Initialized" Loaded="DrawPage_Loaded" Unloaded="DrawPage_Unloaded">
|
d:DesignHeight="853.3" d:DesignWidth="1280" Initialized="DrawPage_Initialized" Loaded="DrawPage_Loaded" Unloaded="DrawPage_Unloaded">
|
||||||
|
|
||||||
<!-- Definizione della DrawPage -->
|
<!-- Definizione della DrawPage -->
|
||||||
<Border >
|
<Border >
|
||||||
<Grid Name="DrawPageGrd" >
|
<Grid Name="DrawPageGrd" >
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="3*"/>
|
<ColumnDefinition Width="3*"/>
|
||||||
<ColumnDefinition Width="12*"/>
|
<ColumnDefinition Width="12*"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="1*"/>
|
<RowDefinition Height="1*"/>
|
||||||
@@ -32,13 +32,13 @@
|
|||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
<ToggleButton Name="SideAngleBtn" Grid.Column="0"
|
<ToggleButton Name="SideAngleBtn" Grid.Column="0"
|
||||||
Style="{DynamicResource OmagCut_RightGrayYellowTextToggleButton}"/>
|
Style="{DynamicResource OmagCut_RightGrayYellowTextToggleButton}"/>
|
||||||
<ToggleButton Name="FiloTopBtn" Grid.Column="1"
|
<ToggleButton Name="FiloTopBtn" Grid.Column="1"
|
||||||
Style="{DynamicResource OmagCut_RightGrayYellowTextToggleButton}"/>
|
Style="{DynamicResource OmagCut_RightGrayYellowTextToggleButton}"/>
|
||||||
<ToggleButton Name="EngraveBtn" Grid.Column="2"
|
<ToggleButton Name="EngraveBtn" Grid.Column="2"
|
||||||
Style="{DynamicResource OmagCut_RightGrayYellowTextToggleButton}"/>
|
Style="{DynamicResource OmagCut_RightGrayYellowTextToggleButton}"/>
|
||||||
<ToggleButton Name="DripCutBtn" Grid.Column="3" Padding="0"
|
<ToggleButton Name="DripCutBtn" Grid.Column="3" Padding="0"
|
||||||
Style="{DynamicResource OmagCut_RightGrayYellowTextToggleButton}"/>
|
Style="{DynamicResource OmagCut_RightGrayYellowTextToggleButton}"/>
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
@@ -65,21 +65,21 @@
|
|||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
<Grid Name="VariablesGrd" Grid.Row="1" Grid.RowSpan="2" Grid.ColumnSpan="2"/>
|
<Grid Name="VariablesGrd" Grid.Row="1" Grid.RowSpan="2" Grid.ColumnSpan="2"/>
|
||||||
|
|
||||||
<Grid Name="MessageGrid" Grid.Row="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>
|
</Grid>
|
||||||
|
|
||||||
<Button Name="BackBtn" Grid.Column="1" Grid.Row="14"
|
<Button Name="BackBtn" Grid.Column="1" Grid.Row="14"
|
||||||
Style="{DynamicResource OmagCut_YellowIconButton}">
|
Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||||
<Image Source="{DynamicResource NumericKeyboardArrowImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
<Image Source="{DynamicResource NumericKeyboardArrowImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||||
</Button>
|
</Button>
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
<Border Name="MessageBrd" Grid.Row="4" BorderThickness="0,1,0,0" BorderBrush="Gray">
|
<Border Name="MessageBrd" Grid.Row="4" BorderThickness="0,1,0,0" BorderBrush="Gray">
|
||||||
<TextBlock Name="MessageTxBx" TextAlignment="Center"
|
<TextBlock Name="MessageTxBx" TextAlignment="Center"
|
||||||
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||||
</Border>
|
</Border>
|
||||||
|
|
||||||
<!-- Definizione della Grid Inferiore per i Button V e X -->
|
<!-- Definizione della Grid Inferiore per i Button V e X -->
|
||||||
@@ -95,9 +95,10 @@
|
|||||||
<Grid Name="TopGrd">
|
<Grid Name="TopGrd">
|
||||||
|
|
||||||
<TextBlock Name="TopTxBl"
|
<TextBlock Name="TopTxBl"
|
||||||
Style="{StaticResource OmagCut_ToolsDBTextBlock}" />
|
Style="{DynamicResource OmagCut_ToolsDBTextBlock}" />
|
||||||
<CheckBox Name="TopChBx" Style="{StaticResource OmagCut_CheckBox}"
|
<CheckBox Name="TopChBx"
|
||||||
HorizontalAlignment="Right" Margin="6,0,6,0"/>
|
Style="{DynamicResource OmagCut_CheckBox}"
|
||||||
|
HorizontalAlignment="Right" Margin="6,0,6,0"/>
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
@@ -107,12 +108,13 @@
|
|||||||
<ColumnDefinition Width="2*"/>
|
<ColumnDefinition Width="2*"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
<TextBlock Name="PartNameTxBl" Grid.Column="0" Style="{DynamicResource OmagCut_CurrProjSummeryTextBlock}"
|
<TextBlock Name="PartNameTxBl" Grid.Column="0"
|
||||||
TextAlignment="Right"/>
|
Style="{DynamicResource OmagCut_CurrProjSummeryTextBlock}"
|
||||||
|
TextAlignment="Right"/>
|
||||||
<EgtWPFLib:EgtTextBox Name="PartNameTxBx" Grid.Column="1" Width="130"
|
<EgtWPFLib:EgtTextBox Name="PartNameTxBx" Grid.Column="1" Width="130"
|
||||||
Style="{StaticResource OmagCut_KeyboardTextBox}"/>
|
Style="{DynamicResource OmagCut_KeyboardTextBox}"/>
|
||||||
<Button Name="TrfDataBtn" Grid.Column="1"
|
<Button Name="TrfDataBtn" Grid.Column="1"
|
||||||
Style="{DynamicResource OmagCut_YellowTextButton}"/>
|
Style="{DynamicResource OmagCut_YellowTextButton}"/>
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
@@ -122,24 +124,25 @@
|
|||||||
<ColumnDefinition Width="1*"/>
|
<ColumnDefinition Width="1*"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
<TextBlock Name="PartNumTxBl" Grid.Column="0" Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"
|
<TextBlock Name="PartNumTxBl" Grid.Column="0"
|
||||||
TextAlignment="Right"/>
|
Style="{DynamicResource OmagCut_CurrProjSummeryTextBlock}"
|
||||||
<EgtWPFLib:EgtTextBox Name="PartNumTxBx" Grid.Column="1" Width="60" IsLength="False"
|
TextAlignment="Right"/>
|
||||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
<EgtWPFLib:EgtTextBox Name="PartNumTxBx" Grid.Column="1" Width="60" IsLength="False"
|
||||||
|
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
<Button Name="OkBtn" Grid.Column="3" Style="{DynamicResource OmagCut_GradientBlueIconButton}">
|
<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>
|
||||||
<Button Name="ExitBtn" Grid.Column="4" Style="{DynamicResource OmagCut_GradientBlueIconButton}">
|
<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>
|
</Button>
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
</Border>
|
</Border>
|
||||||
|
|
||||||
</UserControl>
|
</UserControl>
|
||||||
|
|||||||
+145
-35
@@ -1,5 +1,4 @@
|
|||||||
Imports System.Globalization
|
Imports EgtUILib
|
||||||
Imports EgtUILib
|
|
||||||
Imports EgtWPFLib
|
Imports EgtWPFLib
|
||||||
|
|
||||||
Public Class DrawPageUC
|
Public Class DrawPageUC
|
||||||
@@ -283,6 +282,19 @@ Public Class DrawPageUC
|
|||||||
m_sCsvOrder = ""
|
m_sCsvOrder = ""
|
||||||
m_sCsvList = ""
|
m_sCsvList = ""
|
||||||
m_sCsvName = ""
|
m_sCsvName = ""
|
||||||
|
|
||||||
|
' Visuliazzazione dei bottoni per modifica dei componenti
|
||||||
|
If m_MainWindow.FrameCutBtn.IsChecked Then
|
||||||
|
SideAngleBtn.Visibility = Visibility.Hidden
|
||||||
|
FiloTopBtn.Visibility = Visibility.Hidden
|
||||||
|
EngraveBtn.Visibility = Visibility.Hidden
|
||||||
|
DripCutBtn.Visibility = Visibility.Hidden
|
||||||
|
Else
|
||||||
|
SideAngleBtn.Visibility = Visibility.Visible
|
||||||
|
FiloTopBtn.Visibility = Visibility.Visible
|
||||||
|
EngraveBtn.Visibility = Visibility.Visible
|
||||||
|
DripCutBtn.Visibility = Visibility.Visible
|
||||||
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
' recupero il click sulla scena ed assegno il metodo a secondo della pagina aperta
|
' recupero il click sulla scena ed assegno il metodo a secondo della pagina aperta
|
||||||
@@ -398,7 +410,7 @@ Public Class DrawPageUC
|
|||||||
m_nSelectedLayer = GDB_ID.NULL
|
m_nSelectedLayer = GDB_ID.NULL
|
||||||
SideAngle.WriteSideAngleForNest(DrawScene.GetCtx())
|
SideAngle.WriteSideAngleForNest(DrawScene.GetCtx())
|
||||||
' Messaggio di selezione da effettuare
|
' 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")
|
MessageBrd.Background = Application.Current.FindResource("OmagCut_Green")
|
||||||
Else
|
Else
|
||||||
Dim nLayId As Integer = EgtGetFirstNameInGroup(nPartId, NAME_OUTLOOP)
|
Dim nLayId As Integer = EgtGetFirstNameInGroup(nPartId, NAME_OUTLOOP)
|
||||||
@@ -553,6 +565,7 @@ Public Class DrawPageUC
|
|||||||
OkBtn.IsEnabled = True
|
OkBtn.IsEnabled = True
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
' Navigazione nelle due pagine per la selezione dei componenti da disegnare
|
||||||
Friend Sub BackBtn_Click(sender As Object, e As RoutedEventArgs) Handles BackBtn.Click
|
Friend Sub BackBtn_Click(sender As Object, e As RoutedEventArgs) Handles BackBtn.Click
|
||||||
m_SceneButtons.MeasureBtn.IsChecked = False
|
m_SceneButtons.MeasureBtn.IsChecked = False
|
||||||
DrawPage_Unloaded(sender, e)
|
DrawPage_Unloaded(sender, e)
|
||||||
@@ -1124,6 +1137,33 @@ Public Class DrawPageUC
|
|||||||
Return True
|
Return True
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
Private Function MakeSectionFrameInsert(ByVal nNbr As Integer) As Boolean
|
||||||
|
' m_MainWindow.m_ImportPageUC.LoadFrame()
|
||||||
|
' recupero il primo layer del primo pezzo
|
||||||
|
Dim nLayerId As Integer = EgtGetFirstLayer(EgtGetFirstPart())
|
||||||
|
If nLayerId = GDB_ID.NULL Then Return False
|
||||||
|
' percorso in cui salvare tempora
|
||||||
|
Dim sTmpFile As String = m_MainWindow.GetTempDir() & "\Frame.Nge"
|
||||||
|
If Not EgtSaveObjToFile(nLayerId, sTmpFile, NGE.BIN) Then Return False
|
||||||
|
' Passo al contesto principale
|
||||||
|
EgtSetCurrentContext(m_MainWindow.m_CurrentProjectPageUC.CurrentProjectScene.GetCtx())
|
||||||
|
' Inserisco il pezzo
|
||||||
|
If Not My.Computer.FileSystem.FileExists(sTmpFile) Then Return False
|
||||||
|
' eseguo inserimento
|
||||||
|
For i As Integer = 1 To nNbr
|
||||||
|
EgtInsertFile(sTmpFile)
|
||||||
|
' Ne recupero l'Id
|
||||||
|
Dim nPartId As Integer = EgtGetLastPart()
|
||||||
|
' Creo la cornice
|
||||||
|
m_MainWindow.m_FrameCutPageUC.CreateFrame(nPartId)
|
||||||
|
' Ricalcolo lavorazioni
|
||||||
|
AddFrameMachinings(m_MainWindow.m_FrameCutPageUC.m_FrameMachiningUC.m_dStartTrim, m_MainWindow.m_FrameCutPageUC.m_FrameMachiningUC.m_dEndTrim)
|
||||||
|
Next
|
||||||
|
' Cancello il file
|
||||||
|
My.Computer.FileSystem.DeleteFile(sTmpFile)
|
||||||
|
Return True
|
||||||
|
End Function
|
||||||
|
|
||||||
Private Sub OkBtn_Click(sender As Object, e As RoutedEventArgs) Handles OkBtn.Click
|
Private Sub OkBtn_Click(sender As Object, e As RoutedEventArgs) Handles OkBtn.Click
|
||||||
m_bBackFromInternalCompo = False
|
m_bBackFromInternalCompo = False
|
||||||
m_bInternalCompo = False
|
m_bInternalCompo = False
|
||||||
@@ -1139,22 +1179,47 @@ Public Class DrawPageUC
|
|||||||
Dim InsNbr As Integer = Int32.Parse(PartNumTxBx.Text)
|
Dim InsNbr As Integer = Int32.Parse(PartNumTxBx.Text)
|
||||||
' Passo al contesto principale
|
' Passo al contesto principale
|
||||||
'MakeInsert(InsNbr, sPartName)
|
'MakeInsert(InsNbr, sPartName)
|
||||||
MakeMultipleInsert(InsNbr, sPartName)
|
If m_MainWindow.FrameCutBtn.IsChecked Then
|
||||||
' Aggiorno ambiente principale
|
MakeSectionFrameInsert(InsNbr)
|
||||||
EgtZoom(ZM.ALL)
|
Else
|
||||||
' Elimino nome del componente precedente
|
MakeMultipleInsert(InsNbr, sPartName)
|
||||||
m_sCompoName = String.Empty
|
End If
|
||||||
' Reset inclinazioni
|
' Attivo il parcheggio dei pezzi Draw (per il corretto posizionamento nella scena)
|
||||||
m_SideAngleUC.DeleteSideAngle()
|
ActivateParkIndZero()
|
||||||
' Chiudo compo interni nel caso siano aperti
|
Dim bExitPage As Boolean = GetPrivateProfileInt(S_GENERAL, K_QUITDRAWPAGE, 1, m_MainWindow.GetIniFile) <> 0
|
||||||
LeftButtonGrd.Children.Remove(m_MainComponentPage.m_SecondaryComponentPage)
|
' Se Shift premuto eseguo il contrario
|
||||||
LeftButtonGrd.Children.Remove(m_CompoDimension.m_InternalCompoPage)
|
If Keyboard.Modifiers And ModifierKeys.Shift Then
|
||||||
LeftButtonGrd.Children.Remove(m_CompoDimension.m_AlzFrontPage)
|
bExitPage = Not bExitPage
|
||||||
' Istruzioni per chiudere ImportPageUC e aprire CadCutPageUC
|
End If
|
||||||
m_MainWindow.MainWindowGrid.Children.Remove(m_MainWindow.m_DrawPageUC)
|
If bExitPage Then
|
||||||
m_MainWindow.MainWindowGrid.Children.Add(m_MainWindow.m_CurrentProjectPageUC)
|
' Aggiorno ambiente principale
|
||||||
m_MainWindow.m_ActivePage = MainWindow.Pages.CadCut
|
EgtZoom(ZM.ALL)
|
||||||
|
' Elimino nome del componente precedente
|
||||||
|
m_sCompoName = String.Empty
|
||||||
|
' Reset inclinazioni
|
||||||
|
m_SideAngleUC.DeleteSideAngle()
|
||||||
|
' Chiudo compo interni nel caso siano aperti
|
||||||
|
LeftButtonGrd.Children.Remove(m_MainComponentPage.m_SecondaryComponentPage)
|
||||||
|
LeftButtonGrd.Children.Remove(m_CompoDimension.m_InternalCompoPage)
|
||||||
|
LeftButtonGrd.Children.Remove(m_CompoDimension.m_AlzFrontPage)
|
||||||
|
' Istruzioni per chiudere ImportPageUC e aprire CadCutPageUC
|
||||||
|
m_MainWindow.MainWindowGrid.Children.Remove(m_MainWindow.m_DrawPageUC)
|
||||||
|
m_MainWindow.MainWindowGrid.Children.Add(m_MainWindow.m_CurrentProjectPageUC)
|
||||||
|
m_MainWindow.m_ActivePage = If(m_MainWindow.FrameCutBtn.IsChecked, MainWindow.Pages.FrameCut, MainWindow.Pages.CadCut)
|
||||||
|
Else
|
||||||
|
m_SceneButtons.MeasureBtn.IsChecked = False
|
||||||
|
DrawPage_Unloaded(sender, e)
|
||||||
|
' Elimino nome del componente precedente
|
||||||
|
m_sCompoName = String.Empty
|
||||||
|
' Reset inclinazioni
|
||||||
|
m_SideAngleUC.DeleteSideAngle()
|
||||||
|
If String.IsNullOrEmpty(m_MainComponentPage.m_SecondaryComponentPage.m_sCurrCompo) Then
|
||||||
|
DrawPage_Loaded(sender, e)
|
||||||
|
Else
|
||||||
|
LoadSecondaryPage()
|
||||||
|
End If
|
||||||
|
|
||||||
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
' esco dalla pagina corrente
|
' esco dalla pagina corrente
|
||||||
@@ -1174,7 +1239,25 @@ Public Class DrawPageUC
|
|||||||
' Istruzioni per chiudere ImportPageUC e aprire CadCutPageUC
|
' Istruzioni per chiudere ImportPageUC e aprire CadCutPageUC
|
||||||
m_MainWindow.MainWindowGrid.Children.Remove(m_MainWindow.m_DrawPageUC)
|
m_MainWindow.MainWindowGrid.Children.Remove(m_MainWindow.m_DrawPageUC)
|
||||||
m_MainWindow.MainWindowGrid.Children.Add(m_MainWindow.m_CurrentProjectPageUC)
|
m_MainWindow.MainWindowGrid.Children.Add(m_MainWindow.m_CurrentProjectPageUC)
|
||||||
m_MainWindow.m_ActivePage = MainWindow.Pages.CadCut
|
m_MainWindow.m_ActivePage = If(m_MainWindow.FrameCutBtn.IsChecked, MainWindow.Pages.FrameCut, MainWindow.Pages.CadCut)
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub ActivateParkIndZero()
|
||||||
|
' Aggiorno la gestione dei parcheggi: spengo tutti i parcheggi tranne quello dei pezzi disegnati "0"
|
||||||
|
Dim ListParkInd As New List(Of ParkInd)
|
||||||
|
SelParkIndWD.LoadParkInd(ListParkInd)
|
||||||
|
For Each ItemParkInd As ParkInd In ListParkInd
|
||||||
|
If ItemParkInd.Ind = 0 Then
|
||||||
|
ItemParkInd.Status = GDB_ST.ON_
|
||||||
|
Else
|
||||||
|
ItemParkInd.Status = GDB_ST.OFF
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
' Aggiorno lo stato dei pezzi
|
||||||
|
For Each Item As ParkInd In ListParkInd
|
||||||
|
SelParkIndWD.SetStatusPartInParkInd(Item, False)
|
||||||
|
Next
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub TrfDataBtn_Click(sender As Object, e As RoutedEventArgs) Handles TrfDataBtn.Click
|
Private Sub TrfDataBtn_Click(sender As Object, e As RoutedEventArgs) Handles TrfDataBtn.Click
|
||||||
@@ -1220,7 +1303,7 @@ Public Class DrawPageUC
|
|||||||
If EgtGetFirstNameInGroup(EgtGetFirstPart(), NAME_INLOOP) = GDB_ID.NULL Then
|
If EgtGetFirstNameInGroup(EgtGetFirstPart(), NAME_INLOOP) = GDB_ID.NULL Then
|
||||||
m_nSelectedLayer = EgtGetFirstNameInGroup(EgtGetFirstPart(), NAME_OUTLOOP)
|
m_nSelectedLayer = EgtGetFirstNameInGroup(EgtGetFirstPart(), NAME_OUTLOOP)
|
||||||
Else
|
Else
|
||||||
MessageTxBx.Text = EgtMsg(MSG_DRAWPAGEUC + 6) ' Selezionare un contorno
|
MessageTxBx.Text = EgtMsg(90386) ' Selezionare un contorno
|
||||||
MessageBrd.Background = Application.Current.FindResource("OmagCut_Green")
|
MessageBrd.Background = Application.Current.FindResource("OmagCut_Green")
|
||||||
' Aggiungo testi su lati già inclinati
|
' Aggiungo testi su lati già inclinati
|
||||||
SideAngle.WriteSideAngleForNest(DrawScene.GetCtx())
|
SideAngle.WriteSideAngleForNest(DrawScene.GetCtx())
|
||||||
@@ -1286,7 +1369,7 @@ Public Class DrawPageUC
|
|||||||
If EgtGetFirstNameInGroup(EgtGetFirstPart(), NAME_INLOOP) = GDB_ID.NULL Then
|
If EgtGetFirstNameInGroup(EgtGetFirstPart(), NAME_INLOOP) = GDB_ID.NULL Then
|
||||||
m_nSelectedLayer = EgtGetFirstNameInGroup(EgtGetFirstPart(), NAME_OUTLOOP)
|
m_nSelectedLayer = EgtGetFirstNameInGroup(EgtGetFirstPart(), NAME_OUTLOOP)
|
||||||
Else
|
Else
|
||||||
MessageTxBx.Text = EgtMsg(MSG_DRAWPAGEUC + 6) ' Selezionare un contorno
|
MessageTxBx.Text = EgtMsg(90386) ' Selezionare un contorno
|
||||||
MessageBrd.Background = Application.Current.FindResource("OmagCut_Green")
|
MessageBrd.Background = Application.Current.FindResource("OmagCut_Green")
|
||||||
End If
|
End If
|
||||||
' In ogni caso, nascondo layer delle misure
|
' In ogni caso, nascondo layer delle misure
|
||||||
@@ -1348,7 +1431,7 @@ Public Class DrawPageUC
|
|||||||
If EgtGetFirstNameInGroup(EgtGetFirstPart(), NAME_INLOOP) = GDB_ID.NULL Then
|
If EgtGetFirstNameInGroup(EgtGetFirstPart(), NAME_INLOOP) = GDB_ID.NULL Then
|
||||||
m_nSelectedLayer = EgtGetFirstNameInGroup(EgtGetFirstPart(), NAME_OUTLOOP)
|
m_nSelectedLayer = EgtGetFirstNameInGroup(EgtGetFirstPart(), NAME_OUTLOOP)
|
||||||
Else
|
Else
|
||||||
MessageTxBx.Text = EgtMsg(MSG_DRAWPAGEUC + 6) ' Selezionare un contorno
|
MessageTxBx.Text = EgtMsg(90386) ' Selezionare un contorno
|
||||||
MessageBrd.Background = Application.Current.FindResource("OmagCut_Green")
|
MessageBrd.Background = Application.Current.FindResource("OmagCut_Green")
|
||||||
End If
|
End If
|
||||||
' In ogni caso, nascondo layer delle misure
|
' In ogni caso, nascondo layer delle misure
|
||||||
@@ -1406,7 +1489,7 @@ Public Class DrawPageUC
|
|||||||
DripCutBtn.IsEnabled = False
|
DripCutBtn.IsEnabled = False
|
||||||
MessageGrid.Visibility = Windows.Visibility.Hidden
|
MessageGrid.Visibility = Windows.Visibility.Hidden
|
||||||
BackBtn.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")
|
MessageBrd.Background = Application.Current.FindResource("OmagCut_Green")
|
||||||
' In ogni caso, nascondo layer delle misure
|
' In ogni caso, nascondo layer delle misure
|
||||||
Dim PartId As Integer = EgtGetFirstInGroup(GDB_ID.ROOT)
|
Dim PartId As Integer = EgtGetFirstInGroup(GDB_ID.ROOT)
|
||||||
@@ -1446,22 +1529,49 @@ Public Class DrawPageUC
|
|||||||
' Seleziono la Tab e la Page di apertura
|
' Seleziono la Tab e la Page di apertura
|
||||||
Select Case m_ActiveComponentPage
|
Select Case m_ActiveComponentPage
|
||||||
Case Pages.MainComponent
|
Case Pages.MainComponent
|
||||||
LeftButtonGrd.Children.Remove( m_MainComponentPage)
|
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
|
|
||||||
|
|
||||||
|
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
|
' Pulisco l'ambiente lua
|
||||||
ResetLuaVariables()
|
ResetLuaVariables()
|
||||||
|
|
||||||
|
Try
|
||||||
|
VariablesGrd.Children.Remove(m_CompoDimension)
|
||||||
|
Catch ex As Exception
|
||||||
|
Dim x As Boolean = True
|
||||||
|
End Try
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Class CompoVar
|
Private Class CompoVar
|
||||||
|
|||||||
+19
-18
@@ -1,11 +1,11 @@
|
|||||||
<UserControl x:Class="FiloTopUC"
|
<UserControl x:Class="FiloTopUC"
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
|
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
d:DesignHeight="597.1" d:DesignWidth="255.9">
|
d:DesignHeight="597.1" d:DesignWidth="255.9">
|
||||||
|
|
||||||
<!-- Definizione della Grid Laterale -->
|
<!-- Definizione della Grid Laterale -->
|
||||||
<Grid Name="VariablesCompoGrid" Grid.RowSpan="2">
|
<Grid Name="VariablesCompoGrid" Grid.RowSpan="2">
|
||||||
@@ -32,20 +32,21 @@
|
|||||||
|
|
||||||
|
|
||||||
<TextBlock Name="ParameterTxBl" Grid.Row="10" Text="Offset"
|
<TextBlock Name="ParameterTxBl" Grid.Row="10" Text="Offset"
|
||||||
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
|
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
|
||||||
FontSize="{DynamicResource FontSize_LowerCaseCharacter}"/>
|
FontSize="{DynamicResource FontSize_LowerCaseCharacter}"/>
|
||||||
<EgtWPFLib:EgtTextBox Name="ParameterTxBx" Grid.Column="1" Grid.Row="10" Width="90"
|
<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"
|
<TextBlock Name="Parameter2TxBl" Grid.Row="11" Text="Affondamento"
|
||||||
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
|
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
|
||||||
FontSize="{DynamicResource FontSize_LowerCaseCharacter}"/>
|
FontSize="{DynamicResource FontSize_LowerCaseCharacter}"/>
|
||||||
<EgtWPFLib:EgtTextBox Name="Parameter2TxBx" Grid.Column="1" Grid.Row="11" Width="90"
|
<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"
|
<TextBlock Name="Parameter3TxBl" Grid.Row="12" Text="Arrotonda"
|
||||||
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
|
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
|
||||||
FontSize="{DynamicResource FontSize_LowerCaseCharacter}"/>
|
FontSize="{DynamicResource FontSize_LowerCaseCharacter}"/>
|
||||||
<CheckBox Name="Parameter3ChBx" Grid.Row="12" Grid.Column="1" Style="{StaticResource OmagCut_CheckBox_Single}"
|
<CheckBox Name="Parameter3ChBx" Grid.Row="12" Grid.Column="1"
|
||||||
HorizontalAlignment="Center" Margin="0,0,6,0"/>
|
Style="{DynamicResource OmagCut_CheckBox_Single}"
|
||||||
</Grid>
|
HorizontalAlignment="Center" Margin="0,0,6,0"/>
|
||||||
|
</Grid>
|
||||||
|
|
||||||
</UserControl>
|
</UserControl>
|
||||||
|
|||||||
@@ -38,17 +38,18 @@ Public Class FiloTopUC
|
|||||||
m_CallingPage = m_MainWindow.m_ActivePage
|
m_CallingPage = m_MainWindow.m_ActivePage
|
||||||
|
|
||||||
' Imposto messaggi
|
' Imposto messaggi
|
||||||
ParameterTxBl.Text = EgtMsg( MSG_IMPORTPAGEUC + 10) ' Offset
|
ParameterTxBl.Text = EgtMsg(90460) ' Offset
|
||||||
Parameter2TxBl.Text = EgtMsg( MSG_IMPORTPAGEUC + 11) ' Affondamento
|
Parameter2TxBl.Text = EgtMsg(90461) ' Affondamento
|
||||||
|
Parameter3TxBl.Text = EgtMsg(91138) ' Arrotonda
|
||||||
|
|
||||||
If m_CallingPage = MainWindow.Pages.Draw Then
|
If m_CallingPage = MainWindow.Pages.Draw Then
|
||||||
' Imposto questa come pagina correntemente visualizzata nella drawpage
|
' Imposto questa come pagina correntemente visualizzata nella drawpage
|
||||||
m_MainWindow.m_DrawPageUC.m_ActiveComponentPage = DrawPageUC.Pages.FiloTop
|
m_MainWindow.m_DrawPageUC.m_ActiveComponentPage = DrawPageUC.Pages.FiloTop
|
||||||
' Imposto contesto corrente
|
' Imposto contesto corrente
|
||||||
EgtSetCurrentContext( m_MainWindow.m_DrawPageUC.DrawScene.GetCtx())
|
EgtSetCurrentContext(m_MainWindow.m_DrawPageUC.DrawScene.GetCtx())
|
||||||
ElseIf m_CallingPage = MainWindow.Pages.Import Then
|
ElseIf m_CallingPage = MainWindow.Pages.Import Then
|
||||||
' Imposto contesto corrente
|
' Imposto contesto corrente
|
||||||
EgtSetCurrentContext( m_MainWindow.m_ImportPageUC.ImportScene.GetCtx())
|
EgtSetCurrentContext(m_MainWindow.m_ImportPageUC.ImportScene.GetCtx())
|
||||||
End If
|
End If
|
||||||
|
|
||||||
' Gestisco visualizzazione dei parametri
|
' Gestisco visualizzazione dei parametri
|
||||||
@@ -57,9 +58,9 @@ Public Class FiloTopUC
|
|||||||
Parameter3TxBl.Visibility = Windows.Visibility.Visible
|
Parameter3TxBl.Visibility = Windows.Visibility.Visible
|
||||||
|
|
||||||
' Aggiorno valori
|
' Aggiorno valori
|
||||||
m_dFiloTopOffset = GetPrivateProfileDouble( S_SIDES, K_FILOTOPOFFSET, 5, m_MainWindow.GetIniFile())
|
m_dFiloTopOffset = GetPrivateProfileDouble(S_SIDES, K_FILOTOPOFFSET, 5, m_MainWindow.GetIniFile())
|
||||||
ParameterTxBx.Text = LenToString( m_dFiloTopOffset, 3)
|
ParameterTxBx.Text = LenToString(m_dFiloTopOffset, 3)
|
||||||
m_dFiloTopDepth = GetPrivateProfileDouble( S_SIDES, K_FILOTOPDEPTH, 5, m_MainWindow.GetIniFile())
|
m_dFiloTopDepth = GetPrivateProfileDouble(S_SIDES, K_FILOTOPDEPTH, 5, m_MainWindow.GetIniFile())
|
||||||
Parameter2TxBx.Text = LenToString(m_dFiloTopDepth, 3)
|
Parameter2TxBx.Text = LenToString(m_dFiloTopDepth, 3)
|
||||||
m_bCornerradius = GetPrivateProfileInt(S_SIDES, K_ROUNDOFF, 0, m_MainWindow.GetIniFile()) <> 0
|
m_bCornerradius = GetPrivateProfileInt(S_SIDES, K_ROUNDOFF, 0, m_MainWindow.GetIniFile()) <> 0
|
||||||
Parameter3ChBx.IsChecked = m_bCornerradius
|
Parameter3ChBx.IsChecked = m_bCornerradius
|
||||||
@@ -80,8 +81,8 @@ Public Class FiloTopUC
|
|||||||
Dim nLayId As Integer = EgtGetFirstLayer(nPartId)
|
Dim nLayId As Integer = EgtGetFirstLayer(nPartId)
|
||||||
While nLayId <> GDB_ID.NULL
|
While nLayId <> GDB_ID.NULL
|
||||||
Dim sLayName As String = ""
|
Dim sLayName As String = ""
|
||||||
If EgtGetName( nLayId, sLayName) AndAlso sLayName = NAME_INLOOP AndAlso EgtExistsInfo( nLayId, INFO_FILOTOP) Then
|
If EgtGetName(nLayId, sLayName) AndAlso sLayName = NAME_INLOOP AndAlso EgtExistsInfo(nLayId, INFO_FILOTOP) Then
|
||||||
EgtSetInfo( nLayId, INFO_OFFSET, m_dFiloTopOffset)
|
EgtSetInfo(nLayId, INFO_OFFSET, m_dFiloTopOffset)
|
||||||
End If
|
End If
|
||||||
nLayId = EgtGetNextLayer(nLayId)
|
nLayId = EgtGetNextLayer(nLayId)
|
||||||
End While
|
End While
|
||||||
@@ -101,8 +102,8 @@ Public Class FiloTopUC
|
|||||||
Dim nLayId As Integer = EgtGetFirstLayer(nPartId)
|
Dim nLayId As Integer = EgtGetFirstLayer(nPartId)
|
||||||
While nLayId <> GDB_ID.NULL
|
While nLayId <> GDB_ID.NULL
|
||||||
Dim sLayName As String = ""
|
Dim sLayName As String = ""
|
||||||
If EgtGetName( nLayId, sLayName) AndAlso sLayName = NAME_INLOOP AndAlso EgtExistsInfo( nLayId, INFO_FILOTOP) Then
|
If EgtGetName(nLayId, sLayName) AndAlso sLayName = NAME_INLOOP AndAlso EgtExistsInfo(nLayId, INFO_FILOTOP) Then
|
||||||
EgtSetInfo( nLayId, INFO_DEPTH, m_dFiloTopDepth)
|
EgtSetInfo(nLayId, INFO_DEPTH, m_dFiloTopDepth)
|
||||||
End If
|
End If
|
||||||
nLayId = EgtGetNextLayer(nLayId)
|
nLayId = EgtGetNextLayer(nLayId)
|
||||||
End While
|
End While
|
||||||
@@ -214,10 +215,13 @@ Public Class FiloTopUC
|
|||||||
EgtErase(nLayFiloTop)
|
EgtErase(nLayFiloTop)
|
||||||
EgtRemoveInfo(nLayId, "FiloTopRef")
|
EgtRemoveInfo(nLayId, "FiloTopRef")
|
||||||
EgtOutLog("Error in generation OffsetPreView in TopEgde ")
|
EgtOutLog("Error in generation OffsetPreView in TopEgde ")
|
||||||
|
Else
|
||||||
|
m_MainWindow.m_DrawPageUC.MessageTxBx.Text = ""
|
||||||
|
m_MainWindow.m_DrawPageUC.MessageBrd.Background = Brushes.Transparent
|
||||||
End If
|
End If
|
||||||
' ---------------------- Fine GESTIONE PREVIEW percorso -------------------------------
|
' ---------------------- Fine GESTIONE PREVIEW percorso -------------------------------
|
||||||
End If
|
End If
|
||||||
nLayId = EgtGetNextLayer(nLayId)
|
nLayId = EgtGetNextLayer(nLayId)
|
||||||
End While
|
End While
|
||||||
nPartId = EgtGetNextPart(nPartId)
|
nPartId = EgtGetNextPart(nPartId)
|
||||||
End While
|
End While
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
<UserControl x:Class="ImportPageUC"
|
<UserControl x:Class="ImportPageUC"
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
|
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
d:DesignHeight="853.3" d:DesignWidth="1280" Initialized="ImportPage_Initialized" Loaded="ImportPage_Loaded" Unloaded="ImportPage_Unloaded">
|
d:DesignHeight="853.3" d:DesignWidth="1280" Initialized="ImportPage_Initialized" Loaded="ImportPage_Loaded" Unloaded="ImportPage_Unloaded">
|
||||||
|
|
||||||
<!-- Definizione della ImportPage -->
|
<!-- Definizione della ImportPage -->
|
||||||
<Border>
|
<Border>
|
||||||
@@ -20,7 +20,7 @@
|
|||||||
<RowDefinition Height="1*"/>
|
<RowDefinition Height="1*"/>
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
|
|
||||||
<!-- Definizione della Grid superiore per Button -->
|
<!-- Definizione della Grid superiore per Button -->
|
||||||
<Grid Name="UpperButtonGrid" Grid.Column="1" Grid.Row="0" >
|
<Grid Name="UpperButtonGrid" Grid.Column="1" Grid.Row="0" >
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
@@ -33,15 +33,17 @@
|
|||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
<ToggleButton Name="SideAngleBtn" Grid.Column="0"
|
<ToggleButton Name="SideAngleBtn" Grid.Column="0"
|
||||||
Style="{DynamicResource OmagCut_RightGrayYellowTextToggleButton}"/>
|
Style="{DynamicResource OmagCut_RightGrayYellowTextToggleButton}"/>
|
||||||
<ToggleButton Name="FiloTopBtn" Grid.Column="1"
|
<ToggleButton Name="FiloTopBtn" Grid.Column="1"
|
||||||
Style="{DynamicResource OmagCut_RightGrayYellowTextToggleButton}"/>
|
Style="{DynamicResource OmagCut_RightGrayYellowTextToggleButton}"/>
|
||||||
<ToggleButton Name="DripCutBtn" Grid.Column="2" Padding="0"
|
<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"
|
<ToggleButton Name="DripDrillBtn" Grid.Column="3" Padding="0"
|
||||||
Style="{DynamicResource OmagCut_RightGrayYellowTextToggleButton}"/>
|
Style="{DynamicResource OmagCut_RightGrayYellowTextToggleButton}"/>
|
||||||
<Button Name="Cad2dBtn" Grid.Column="4" Padding="0"
|
<Button Name="Cad2dBtn" Grid.Column="4" Padding="0"
|
||||||
Style="{DynamicResource OmagCut_YellowTextButton}"/>
|
Style="{DynamicResource OmagCut_YellowTextButton}"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
<!-- Definizione della Grid laterale -->
|
<!-- Definizione della Grid laterale -->
|
||||||
@@ -54,25 +56,26 @@
|
|||||||
<RowDefinition Height="1*"/>
|
<RowDefinition Height="1*"/>
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
<TextBlock Name="FilePathTxBl" Foreground="White" Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
<TextBlock Name="FilePathTxBl" Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||||
<ListBox Name="FileListBox" Grid.Row="1" Grid.RowSpan="2" ItemTemplate="{DynamicResource DataTemplateItem}"
|
<ListBox Name="FileListBox" Grid.Row="1" Grid.RowSpan="2"
|
||||||
|
ItemTemplate="{DynamicResource DataTemplateItem}"
|
||||||
ItemsSource="{Binding ItemList}"/>
|
ItemsSource="{Binding ItemList}"/>
|
||||||
|
|
||||||
<Grid Grid.Row="3" Margin="0,0,8,0">
|
<Grid Name="FinderGrd" Grid.Row="3" Margin="0,0,8,0">
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="4*"/>
|
<ColumnDefinition Width="4*"/>
|
||||||
<ColumnDefinition Width="1*"/>
|
<ColumnDefinition Width="1*"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<EgtWPFLib:EgtTextBox Name="FindTxBx" Grid.Column="0"
|
<EgtWPFLib:EgtTextBox Name="FindTxBx" Grid.Column="0"
|
||||||
Style="{DynamicResource OmagCut_LeftKeyboardTextBoxNoBorder}"/>
|
Style="{DynamicResource OmagCut_LeftKeyboardTextBoxNoBorder}"/>
|
||||||
<Button Name="ClearFindBtn" Grid.Column="1" Style="{DynamicResource OmagCut_GradientBlueIconButton}" Margin="0,6,2,6">
|
<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" />
|
<Image Source="{DynamicResource XImg}" Style="{DynamicResource OmagCut_ButtonIcon}" Width="30" />
|
||||||
</Button>
|
</Button>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
<Border Name="MessageBrd" Grid.Row="5" BorderThickness="0,1,0,0" BorderBrush="Gray">
|
<Border Name="MessageBrd" Grid.Row="5" BorderThickness="0,1,0,0" BorderBrush="Gray">
|
||||||
<TextBlock Name="MessageTxBx" TextAlignment="Center"
|
<TextBlock Name="MessageTxBx" TextAlignment="Center"
|
||||||
Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||||
</Border>
|
</Border>
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
@@ -112,24 +115,25 @@
|
|||||||
<ColumnDefinition Width="1*"/>
|
<ColumnDefinition Width="1*"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
<TextBlock Name="PartNumTxBl" Grid.Column="0" Style="{DynamicResource OmagCut_CurrProjSummeryTextBlock}"
|
<TextBlock Name="PartNumTxBl" Grid.Column="0"
|
||||||
TextAlignment="Right"/>
|
Style="{DynamicResource OmagCut_CurrProjSummeryTextBlock}"
|
||||||
|
TextAlignment="Right"/>
|
||||||
<EgtWPFLib:EgtTextBox Name="PartNumTxBx" Grid.Column="1" Width="60" IsLength="False"
|
<EgtWPFLib:EgtTextBox Name="PartNumTxBx" Grid.Column="1" Width="60" IsLength="False"
|
||||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
<Button Name="OkBtn" Grid.Column="10" Style="{DynamicResource OmagCut_GradientBlueIconButton}">
|
<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>
|
||||||
|
|
||||||
<Button Name="ExitBtn" Grid.Column="11" Style="{DynamicResource OmagCut_GradientBlueIconButton}">
|
<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>
|
</Button>
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
</Border>
|
</Border>
|
||||||
|
|
||||||
</UserControl>
|
</UserControl>
|
||||||
|
|||||||
+362
-101
@@ -1,7 +1,5 @@
|
|||||||
Imports System.Collections.ObjectModel
|
Imports System.IO
|
||||||
Imports System.IO
|
|
||||||
Imports EgtUILib
|
Imports EgtUILib
|
||||||
Imports System.Runtime.InteropServices
|
|
||||||
|
|
||||||
Public Class ImportPageUC
|
Public Class ImportPageUC
|
||||||
|
|
||||||
@@ -19,6 +17,9 @@ Public Class ImportPageUC
|
|||||||
Friend WithEvents ImportScene As New Scene
|
Friend WithEvents ImportScene As New Scene
|
||||||
Private ImportSceneHost As New System.Windows.Forms.Integration.WindowsFormsHost
|
Private ImportSceneHost As New System.Windows.Forms.Integration.WindowsFormsHost
|
||||||
|
|
||||||
|
Private m_SelListHole As New List(Of Integer)
|
||||||
|
Private m_DeselectListHole As New List(Of Integer)
|
||||||
|
|
||||||
' Properties
|
' Properties
|
||||||
Private m_sCurrDir As String = String.Empty
|
Private m_sCurrDir As String = String.Empty
|
||||||
Private m_sCurrFile As String = String.Empty
|
Private m_sCurrFile As String = String.Empty
|
||||||
@@ -35,6 +36,8 @@ Public Class ImportPageUC
|
|||||||
Private Const FT_TRF As Integer = 51
|
Private Const FT_TRF As Integer = 51
|
||||||
' Costante per formato CUT
|
' Costante per formato CUT
|
||||||
Private Const FT_CUT As Integer = 52
|
Private Const FT_CUT As Integer = 52
|
||||||
|
' Indice del parcheggio corrente
|
||||||
|
Private NewParkInd As Integer = 0
|
||||||
|
|
||||||
' Indentificativo del pezzo selezionato
|
' Indentificativo del pezzo selezionato
|
||||||
Private m_nSelectedPart As Integer = GDB_ID.NULL
|
Private m_nSelectedPart As Integer = GDB_ID.NULL
|
||||||
@@ -73,19 +76,20 @@ Public Class ImportPageUC
|
|||||||
Me.ImportPageGrid.Children.Add(ImportSceneHost)
|
Me.ImportPageGrid.Children.Add(ImportSceneHost)
|
||||||
|
|
||||||
'Imposto i messaggi letti dal file dei messaggi
|
'Imposto i messaggi letti dal file dei messaggi
|
||||||
UseLayerBtn.Content = EgtMsg(MSG_IMPORTPAGEUC + 1) 'Usa layer - Use layers
|
UseLayerBtn.Content = EgtMsg(90451) ' Usa layer - Use layers
|
||||||
UseRegionBtn.Content = EgtMsg(MSG_IMPORTPAGEUC + 2) 'Usa regioni - Use regions
|
UseRegionBtn.Content = EgtMsg(90452) ' Usa regioni - Use regions
|
||||||
UseClosedCurveBtn.Content = EgtMsg(MSG_IMPORTPAGEUC + 6) 'Usa curve chiuse - Use closed curves
|
UseClosedCurveBtn.Content = EgtMsg(90456) ' Usa curve chiuse - Use closed curves
|
||||||
ResetBtn.Content = EgtMsg(MSG_IMPORTPAGEUC + 3) 'Reset
|
ResetBtn.Content = EgtMsg(90453) ' Reset
|
||||||
mmBtn.Content = EgtMsg(MSG_IMPORTPAGEUC + 4) 'mm
|
mmBtn.Content = EgtMsg(90454) ' mm
|
||||||
inchBtn.Content = EgtMsg(MSG_IMPORTPAGEUC + 5) 'inch
|
inchBtn.Content = EgtMsg(90455) ' inch
|
||||||
OrderListBtn.Content = EgtMsg( 90398) 'Dati Csv
|
OrderListBtn.Content = EgtMsg(90398) ' Dati Csv
|
||||||
TopBtn.Content = EgtMsg( 90384) 'Indica Lato Sopra
|
TopBtn.Content = EgtMsg(90384) ' Indica Lato Sopra
|
||||||
PartNumTxBl.Text = EgtMsg(MSG_IMPORTPAGEUC + 15) 'Numero
|
PartNumTxBl.Text = EgtMsg(90465) ' Quantità
|
||||||
SideAngleBtn.Content = EgtMsg(MSG_IMPORTPAGEUC + 7) 'Inclina lati
|
SideAngleBtn.Content = EgtMsg(90457) ' Inclina lati
|
||||||
FiloTopBtn.Content = EgtMsg( 90400) 'Filo Top
|
FiloTopBtn.Content = EgtMsg(90400) ' Filo Top
|
||||||
DripCutBtn.Content = EgtMsg(MSG_IMPORTPAGEUC + 8) 'Incidi da sotto
|
DripCutBtn.Content = EgtMsg(90458) ' Incidi da sotto
|
||||||
DripDrillBtn.Content = EgtMsg(MSG_IMPORTPAGEUC + 14) 'Foro da sotto
|
EngraveBtn.Content = EgtMsg(91238) ' Engrave
|
||||||
|
DripDrillBtn.Content = EgtMsg(90464) ' Foro da sotto
|
||||||
Cad2dBtn.Content = "Cad 2d"
|
Cad2dBtn.Content = "Cad 2d"
|
||||||
|
|
||||||
'Definizione del collegamento tra ItemList e ListBox1
|
'Definizione del collegamento tra ItemList e ListBox1
|
||||||
@@ -94,13 +98,14 @@ Public Class ImportPageUC
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub ImportPage_Loaded(sender As Object, e As RoutedEventArgs)
|
Private Sub ImportPage_Loaded(sender As Object, e As RoutedEventArgs)
|
||||||
|
|
||||||
' abilitazione importazione TRF
|
' abilitazione importazione TRF
|
||||||
m_bEnableTrf = (m_MainWindow.m_PrevActivePage = MainWindow.Pages.CadCut And
|
m_bEnableTrf = (m_MainWindow.m_PrevActivePage = MainWindow.Pages.CadCut And
|
||||||
m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.TRF_IMPORT))
|
m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.TRF_IMPORT))
|
||||||
' abilitazione Ordine e Distinta per importazione DXF
|
' abilitazione Ordine e Distinta per importazione DXF
|
||||||
m_bEnableOrderList = (m_MainWindow.m_PrevActivePage = MainWindow.Pages.CadCut And
|
m_bEnableOrderList = (m_MainWindow.m_PrevActivePage = MainWindow.Pages.CadCut And
|
||||||
GetPrivateProfileInt(S_COMPO, K_CSVDATA, 0, m_MainWindow.GetIniFile()) <> 0)
|
GetPrivateProfileInt(S_COMPO, K_CSVDATA, 0, m_MainWindow.GetIniFile()) <> 0)
|
||||||
|
' rendo visibilie il pulsante di ricerca file
|
||||||
|
FinderGrd.Visibility = Visibility.Visible
|
||||||
|
|
||||||
If m_bFirst Then
|
If m_bFirst Then
|
||||||
' imposto colore di default
|
' imposto colore di default
|
||||||
@@ -154,10 +159,14 @@ Public Class ImportPageUC
|
|||||||
' Verifico esistenza Cad 2d
|
' Verifico esistenza Cad 2d
|
||||||
GetPrivateProfileString(S_CAD2D, K_CAD2D_NAME, "", m_sCad2dName, m_MainWindow.GetIniFile())
|
GetPrivateProfileString(S_CAD2D, K_CAD2D_NAME, "", m_sCad2dName, m_MainWindow.GetIniFile())
|
||||||
GetPrivateProfileString(S_CAD2D, K_CAD2D_EXEPATH, "", m_sCad2dPath, 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
|
' Pulisco tutto
|
||||||
ClearView()
|
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()
|
FileListBox.UnselectAll()
|
||||||
' inibisco selezione diretta da Scene
|
' inibisco selezione diretta da Scene
|
||||||
ImportScene.SetStatusNull()
|
ImportScene.SetStatusNull()
|
||||||
@@ -169,7 +178,7 @@ Public Class ImportPageUC
|
|||||||
UseClosedCurveBtn.Visibility = Windows.Visibility.Visible
|
UseClosedCurveBtn.Visibility = Windows.Visibility.Visible
|
||||||
ResetBtn.Visibility = Windows.Visibility.Visible
|
ResetBtn.Visibility = Windows.Visibility.Visible
|
||||||
SideAngleBtn.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
|
TopBtn.Visibility = Windows.Visibility.Visible
|
||||||
PartNumberGrd.Visibility = Windows.Visibility.Visible
|
PartNumberGrd.Visibility = Windows.Visibility.Visible
|
||||||
Else
|
Else
|
||||||
@@ -179,7 +188,7 @@ Public Class ImportPageUC
|
|||||||
ResetBtn.Visibility = Windows.Visibility.Hidden
|
ResetBtn.Visibility = Windows.Visibility.Hidden
|
||||||
SideAngleBtn.Visibility = Windows.Visibility.Hidden
|
SideAngleBtn.Visibility = Windows.Visibility.Hidden
|
||||||
OrderListBtn.Visibility = Windows.Visibility.Hidden
|
OrderListBtn.Visibility = Windows.Visibility.Hidden
|
||||||
TopBtn.Visibility = Windows.Visibility.Hidden
|
TopBtn.Visibility = Windows.Visibility.Hidden
|
||||||
PartNumberGrd.Visibility = Windows.Visibility.Hidden
|
PartNumberGrd.Visibility = Windows.Visibility.Hidden
|
||||||
End If
|
End If
|
||||||
mmBtn.IsEnabled = True
|
mmBtn.IsEnabled = True
|
||||||
@@ -196,7 +205,8 @@ Public Class ImportPageUC
|
|||||||
PartNumTxBx.Text = "1"
|
PartNumTxBx.Text = "1"
|
||||||
' disabilito ok
|
' disabilito ok
|
||||||
OkBtn.IsEnabled = False
|
OkBtn.IsEnabled = False
|
||||||
|
' Azzero l'idice di parcheggio
|
||||||
|
NewParkInd = 0
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub LoadGridData()
|
Private Sub LoadGridData()
|
||||||
@@ -339,13 +349,18 @@ Public Class ImportPageUC
|
|||||||
ResetBtn.IsEnabled = False
|
ResetBtn.IsEnabled = False
|
||||||
SideAngleBtn.IsEnabled = False
|
SideAngleBtn.IsEnabled = False
|
||||||
FiloTopBtn.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
|
DripDrillBtn.IsEnabled = False
|
||||||
Return True
|
Return True
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Private Function LoadCurrFile() As Boolean
|
Private Function LoadCurrFile() As Boolean
|
||||||
' Pulisco il DB geometrico locale
|
' Pulisco il DB geometrico locale
|
||||||
Dim bOk As Boolean = EgtNewFile()
|
Dim bOk As Boolean = EgtNewFile()
|
||||||
' Costruisco path completa del file
|
' Costruisco path completa del file
|
||||||
Dim sPath = IO.Path.Combine(m_sCurrDir, m_sCurrFile)
|
Dim sPath = IO.Path.Combine(m_sCurrDir, m_sCurrFile)
|
||||||
@@ -357,6 +372,10 @@ Public Class ImportPageUC
|
|||||||
Dim dScale As Double = If(m_bMM, ONEMM, ONEINCH)
|
Dim dScale As Double = If(m_bMM, ONEMM, ONEINCH)
|
||||||
' Importo file DXF
|
' Importo file DXF
|
||||||
bOk = bOk AndAlso EgtImportDxf(sPath, dScale)
|
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
|
ElseIf m_nFileType = FT.NGE Then
|
||||||
' Carico Nge
|
' Carico Nge
|
||||||
bOk = bOk AndAlso EgtOpenFile(sPath)
|
bOk = bOk AndAlso EgtOpenFile(sPath)
|
||||||
@@ -396,7 +415,11 @@ Public Class ImportPageUC
|
|||||||
OkBtn.IsEnabled = False
|
OkBtn.IsEnabled = False
|
||||||
SideAngleBtn.IsEnabled = False
|
SideAngleBtn.IsEnabled = False
|
||||||
FiloTopBtn.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
|
DripDrillBtn.IsEnabled = False
|
||||||
ElseIf m_nFileType = FT_TRF Or m_nFileType = FT_CUT Then
|
ElseIf m_nFileType = FT_TRF Or m_nFileType = FT_CUT Then
|
||||||
' abilito bottone Insert, disabilito bottoni UseLayer, UseClosedCurve, UseRegion e Reset
|
' abilito bottone Insert, disabilito bottoni UseLayer, UseClosedCurve, UseRegion e Reset
|
||||||
@@ -412,10 +435,14 @@ Public Class ImportPageUC
|
|||||||
OkBtn.IsEnabled = True
|
OkBtn.IsEnabled = True
|
||||||
SideAngleBtn.IsEnabled = False
|
SideAngleBtn.IsEnabled = False
|
||||||
FiloTopBtn.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
|
DripDrillBtn.IsEnabled = False
|
||||||
End If
|
End If
|
||||||
' altrimenti import per cornici
|
' altrimenti import per cornici
|
||||||
Else
|
Else
|
||||||
mmBtn.IsEnabled = (m_nFileType = FT.DXF)
|
mmBtn.IsEnabled = (m_nFileType = FT.DXF)
|
||||||
inchBtn.IsEnabled = (m_nFileType = FT.DXF)
|
inchBtn.IsEnabled = (m_nFileType = FT.DXF)
|
||||||
@@ -425,12 +452,12 @@ Public Class ImportPageUC
|
|||||||
End Function
|
End Function
|
||||||
|
|
||||||
Private Sub OnMouseDownScene(sender As Object, e As System.Windows.Forms.MouseEventArgs) Handles ImportScene.OnMouseDownScene
|
Private Sub OnMouseDownScene(sender As Object, e As System.Windows.Forms.MouseEventArgs) Handles ImportScene.OnMouseDownScene
|
||||||
If SideAngleBtn.IsChecked() Or DripCutBtn.IsChecked() Then
|
If SideAngleBtn.IsChecked() Or DripCutBtn.IsChecked() Or EngraveBtn.IsChecked Then
|
||||||
OnMouseDownSceneSideAngle( e)
|
OnMouseDownSceneSideAngle(e)
|
||||||
ElseIf DripDrillBtn.IsChecked() Then
|
ElseIf DripDrillBtn.IsChecked() Then
|
||||||
OnMouseDownSceneUnderDrill( e)
|
OnMouseDownSceneUnderDrill(e)
|
||||||
ElseIf FiloTopBtn.IsChecked() Then
|
ElseIf FiloTopBtn.IsChecked() Then
|
||||||
OnMouseDownSceneFiloTop( e)
|
OnMouseDownSceneFiloTop(e)
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -560,31 +587,35 @@ Public Class ImportPageUC
|
|||||||
EgtDeselectObj(nId)
|
EgtDeselectObj(nId)
|
||||||
EgtDeselectObj(nLayId)
|
EgtDeselectObj(nLayId)
|
||||||
Dim sLayName As String = ""
|
Dim sLayName As String = ""
|
||||||
If EgtGetName(nLayId, sLayName) AndAlso sLayName = NAME_INLOOP AndAlso EgtExistsInfo( nLayId, INFO_FILOTOP) Then
|
If EgtGetName(nLayId, sLayName) AndAlso sLayName = NAME_INLOOP AndAlso EgtExistsInfo(nLayId, INFO_FILOTOP) Then
|
||||||
EgtRemoveInfo( nLayId, INFO_FILOTOP)
|
EgtRemoveInfo(nLayId, INFO_FILOTOP)
|
||||||
EgtRemoveInfo( nLayId, INFO_OFFSET)
|
EgtRemoveInfo(nLayId, INFO_OFFSET)
|
||||||
EgtRemoveInfo( nLayId, INFO_DEPTH)
|
EgtRemoveInfo(nLayId, INFO_DEPTH)
|
||||||
Dim nEntId As Integer = EgtGetFirstInGroup( nLayId)
|
Dim nEntId As Integer = EgtGetFirstInGroup(nLayId)
|
||||||
While nEntId <> GDB_ID.NULL
|
While nEntId <> GDB_ID.NULL
|
||||||
EgtSetColor(nEntId, New Color3d(127, 63, 0))
|
EgtSetColor(nEntId, New Color3d(127, 63, 0))
|
||||||
nEntId = EgtGetNext( nEntId)
|
nEntId = EgtGetNext(nEntId)
|
||||||
End While
|
End While
|
||||||
|
m_DeselectListHole.Add(nLayId)
|
||||||
|
m_SelListHole.Remove(nLayId)
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
Dim nLayId As Integer = GDB_ID.NULL
|
Dim nLayId As Integer = GDB_ID.NULL
|
||||||
EgtGetInfo(nId, "ID", nLayId)
|
EgtGetInfo(nId, "ID", nLayId)
|
||||||
Dim sLayName As String = ""
|
Dim sLayName As String = ""
|
||||||
If EgtGetName( nLayId, sLayName) AndAlso sLayName = NAME_INLOOP Then
|
If EgtGetName(nLayId, sLayName) AndAlso sLayName = NAME_INLOOP Then
|
||||||
EgtSelectObj( nId)
|
EgtSelectObj(nId)
|
||||||
EgtSelectObj( nLayId)
|
EgtSelectObj(nLayId)
|
||||||
EgtSetInfo( nLayId, INFO_FILOTOP, 1)
|
EgtSetInfo(nLayId, INFO_FILOTOP, 1)
|
||||||
EgtSetInfo( nLayId, INFO_OFFSET, m_FiloTopUC.FiloTopOffset)
|
EgtSetInfo(nLayId, INFO_OFFSET, m_FiloTopUC.FiloTopOffset)
|
||||||
EgtSetInfo( nLayId, INFO_DEPTH, m_FiloTopUC.FiloTopDepth)
|
EgtSetInfo(nLayId, INFO_DEPTH, m_FiloTopUC.FiloTopDepth)
|
||||||
Dim nEntId As Integer = EgtGetFirstInGroup( nLayId)
|
Dim nEntId As Integer = EgtGetFirstInGroup(nLayId)
|
||||||
While nEntId <> GDB_ID.NULL
|
While nEntId <> GDB_ID.NULL
|
||||||
EgtSetColor(nEntId, New Color3d(255, 255, 255))
|
EgtSetColor(nEntId, New Color3d(255, 255, 255))
|
||||||
nEntId = EgtGetNext( nEntId)
|
nEntId = EgtGetNext(nEntId)
|
||||||
End While
|
End While
|
||||||
|
m_SelListHole.Add(nLayId)
|
||||||
|
m_DeselectListHole.Remove(nLayId)
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
EgtDraw()
|
EgtDraw()
|
||||||
@@ -592,6 +623,12 @@ Public Class ImportPageUC
|
|||||||
End If
|
End If
|
||||||
nId = EgtGetNextObjInSelWin()
|
nId = EgtGetNextObjInSelWin()
|
||||||
End While
|
End While
|
||||||
|
m_FiloTopUC.CreateFiloTopPreView(m_SelListHole)
|
||||||
|
m_FiloTopUC.EraseFiloTopPreview(m_DeselectListHole)
|
||||||
|
If m_SelListHole.Count > 0 Then
|
||||||
|
MessageTxBx.Text = ""
|
||||||
|
MessageBrd.Background = Brushes.Transparent
|
||||||
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub OnShowDistanceVector(sender As Object, vtDist As Vector3d) Handles ImportScene.OnShowDistanceVector
|
Private Sub OnShowDistanceVector(sender As Object, vtDist As Vector3d) Handles ImportScene.OnShowDistanceVector
|
||||||
@@ -601,7 +638,7 @@ Public Class ImportPageUC
|
|||||||
|
|
||||||
Private Sub SelectedPartChanged()
|
Private Sub SelectedPartChanged()
|
||||||
' Se sono in modalità inclinazioni o gocciolatoio calcolo lati inclinabili e creo testi
|
' 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()
|
m_SideAngleUC.ReLoadSideAnglePage()
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
@@ -624,7 +661,7 @@ Public Class ImportPageUC
|
|||||||
' Ciclo sulle regioni
|
' Ciclo sulle regioni
|
||||||
Dim EntId As Integer = EgtGetFirstInGroup(RegionId)
|
Dim EntId As Integer = EgtGetFirstInGroup(RegionId)
|
||||||
While EntId <> GDB_ID.NULL
|
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)
|
EntId = EgtGetNext(EntId)
|
||||||
End While
|
End While
|
||||||
RegionId = EgtGetNextName(PartId, NAME_REGION)
|
RegionId = EgtGetNextName(PartId, NAME_REGION)
|
||||||
@@ -662,8 +699,12 @@ Public Class ImportPageUC
|
|||||||
' abilito bottone angoli su lati esterni
|
' abilito bottone angoli su lati esterni
|
||||||
SideAngleBtn.IsEnabled = m_MainWindow.m_DrawPageUC.bEnableSideAngle
|
SideAngleBtn.IsEnabled = m_MainWindow.m_DrawPageUC.bEnableSideAngle
|
||||||
FiloTopBtn.IsEnabled = m_MainWindow.m_CurrentMachine.bMilling
|
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)
|
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
|
DripDrillBtn.IsEnabled = m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.UNDER_CUT) And
|
||||||
Not String.IsNullOrWhiteSpace(m_MainWindow.m_CurrentMachine.sCurrDripDrill)
|
Not String.IsNullOrWhiteSpace(m_MainWindow.m_CurrentMachine.sCurrDripDrill)
|
||||||
End Sub
|
End Sub
|
||||||
@@ -694,8 +735,12 @@ Public Class ImportPageUC
|
|||||||
' abilito bottone angoli su lati esterni
|
' abilito bottone angoli su lati esterni
|
||||||
SideAngleBtn.IsEnabled = m_MainWindow.m_DrawPageUC.bEnableSideAngle
|
SideAngleBtn.IsEnabled = m_MainWindow.m_DrawPageUC.bEnableSideAngle
|
||||||
FiloTopBtn.IsEnabled = m_MainWindow.m_CurrentMachine.bMilling
|
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)
|
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
|
DripDrillBtn.IsEnabled = m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.UNDER_CUT) And
|
||||||
Not String.IsNullOrWhiteSpace(m_MainWindow.m_CurrentMachine.sCurrDripDrill)
|
Not String.IsNullOrWhiteSpace(m_MainWindow.m_CurrentMachine.sCurrDripDrill)
|
||||||
End Sub
|
End Sub
|
||||||
@@ -726,8 +771,12 @@ Public Class ImportPageUC
|
|||||||
' abilito bottone angoli su lati esterni
|
' abilito bottone angoli su lati esterni
|
||||||
SideAngleBtn.IsEnabled = m_MainWindow.m_DrawPageUC.bEnableSideAngle
|
SideAngleBtn.IsEnabled = m_MainWindow.m_DrawPageUC.bEnableSideAngle
|
||||||
FiloTopBtn.IsEnabled = m_MainWindow.m_CurrentMachine.bMilling
|
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)
|
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
|
DripDrillBtn.IsEnabled = m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.UNDER_CUT) And
|
||||||
Not String.IsNullOrWhiteSpace(m_MainWindow.m_CurrentMachine.sCurrDripDrill)
|
Not String.IsNullOrWhiteSpace(m_MainWindow.m_CurrentMachine.sCurrDripDrill)
|
||||||
End Sub
|
End Sub
|
||||||
@@ -808,20 +857,38 @@ Public Class ImportPageUC
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub OrderListBtn_Click(sender As Object, e As RoutedEventArgs) Handles OrderListBtn.Click
|
Private Sub OrderListBtn_Click(sender As Object, e As RoutedEventArgs) Handles OrderListBtn.Click
|
||||||
Dim DlgOrderList As New CompoCsvData( m_MainWindow)
|
Dim DlgOrderList As New CompoCsvData(m_MainWindow)
|
||||||
DlgOrderList.SetData( m_sOrder, m_sList)
|
DlgOrderList.SetData(m_sOrder, m_sList)
|
||||||
If DlgOrderList.ShowDialog() Then
|
If DlgOrderList.ShowDialog() Then
|
||||||
DlgOrderList.GetData( m_sOrder, m_sList)
|
DlgOrderList.GetData(m_sOrder, m_sList)
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub OkBtn_Click(sender As Object, e As RoutedEventArgs) Handles OkBtn.Click
|
Private Sub OkBtn_Click(sender As Object, e As RoutedEventArgs) Handles OkBtn.Click
|
||||||
m_SceneButtons.MeasureBtn.IsChecked = False
|
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
|
' Se import per pezzi piatti
|
||||||
If m_MainWindow.m_PrevActivePage = MainWindow.Pages.CadCut Then
|
If m_MainWindow.m_PrevActivePage = MainWindow.Pages.CadCut Then
|
||||||
' Eseguo importazione pezzi piatti
|
' Eseguo importazione pezzi piatti
|
||||||
LoadFlatParts()
|
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
|
Else
|
||||||
LoadFrame()
|
LoadFrame()
|
||||||
End If
|
End If
|
||||||
@@ -831,6 +898,80 @@ Public Class ImportPageUC
|
|||||||
m_MainWindow.m_ActivePage = m_MainWindow.m_PrevActivePage
|
m_MainWindow.m_ActivePage = m_MainWindow.m_PrevActivePage
|
||||||
End Sub
|
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()
|
Private Sub LoadFlatParts()
|
||||||
' Cancello regioni di selezione dai pezzi
|
' Cancello regioni di selezione dai pezzi
|
||||||
Dim PartId As Integer = EgtGetFirstPart()
|
Dim PartId As Integer = EgtGetFirstPart()
|
||||||
@@ -903,21 +1044,37 @@ Public Class ImportPageUC
|
|||||||
If My.Computer.FileSystem.FileExists(sTmpFile) Then
|
If My.Computer.FileSystem.FileExists(sTmpFile) Then
|
||||||
My.Computer.FileSystem.DeleteFile(sTmpFile)
|
My.Computer.FileSystem.DeleteFile(sTmpFile)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
' Calcolo l'area dei pezzi inseriti
|
' Calcolo l'area dei pezzi inseriti
|
||||||
Dim dNewArea As Double = 0
|
Dim dNewArea As Double = 0
|
||||||
Dim nId As Integer = nFirstId
|
Dim nId As Integer = nFirstId
|
||||||
While nId <> GDB_ID.NULL
|
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)
|
dNewArea += GeomCalc.GetPartArea(nId)
|
||||||
' Passo al pezzo successivo
|
' Passo al pezzo successivo
|
||||||
nId = EgtGetNextPart(nId)
|
nId = EgtGetNextPart(nId)
|
||||||
End While
|
End While
|
||||||
' Nascondo tutti i pezzi inseriti (per evitare interferenze con pezzi in fase di parcheggio)
|
' Nascondo tutti i pezzi inseriti (per evitare interferenze con pezzi in fase di parcheggio)
|
||||||
nId = nFirstId
|
nId = nFirstId
|
||||||
|
Dim GlobBBox As New BBox3d
|
||||||
While nId <> GDB_ID.NULL
|
While nId <> GDB_ID.NULL
|
||||||
|
Dim bboxTemp As New BBox3d
|
||||||
|
EgtGetBBox(nId, 0, bboxTemp)
|
||||||
|
GlobBBox.Add(bboxTemp)
|
||||||
EgtSetStatus(nId, GDB_ST.OFF)
|
EgtSetStatus(nId, GDB_ST.OFF)
|
||||||
' Passo al pezzo successivo
|
' Passo al pezzo successivo
|
||||||
nId = EgtGetNextPart(nId)
|
nId = EgtGetNextPart(nId)
|
||||||
End While
|
End While
|
||||||
|
Dim DimX As Double = GlobBBox.DimX
|
||||||
|
Dim DimY As Double = GlobBBox.DimY
|
||||||
|
Dim BBoxMaxPt As Point3d = GlobBBox.Max
|
||||||
|
|
||||||
' Ciclo sui pezzi inseriti
|
' Ciclo sui pezzi inseriti
|
||||||
nId = nFirstId
|
nId = nFirstId
|
||||||
@@ -954,7 +1111,12 @@ Public Class ImportPageUC
|
|||||||
' Imposto path di provenienza
|
' Imposto path di provenienza
|
||||||
EgtSetInfo(nId, INFO_SOU_PATH, IO.Path.Combine(m_sCurrDir, m_sCurrFile))
|
EgtSetInfo(nId, INFO_SOU_PATH, IO.Path.Combine(m_sCurrDir, m_sCurrFile))
|
||||||
' Inserisco in parcheggio
|
' 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
|
' Recupero Id di pezzo successivo
|
||||||
Dim nNextId As Integer = EgtGetNextPart(nId)
|
Dim nNextId As Integer = EgtGetNextPart(nId)
|
||||||
' Se richiesto posizionamento diretto, lo eseguo
|
' Se richiesto posizionamento diretto, lo eseguo
|
||||||
@@ -1011,22 +1173,24 @@ Public Class ImportPageUC
|
|||||||
' Salvo direttorio corrente
|
' Salvo direttorio corrente
|
||||||
WritePrivateProfileString(S_FLATPARTS, K_FLPCURRDIR, m_sCurrDir, m_MainWindow.GetIniFile())
|
WritePrivateProfileString(S_FLATPARTS, K_FLPCURRDIR, m_sCurrDir, m_MainWindow.GetIniFile())
|
||||||
' Tolgo pagina inclinazioni/gocciolatoi se attiva
|
' 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
|
FilePathTxBl.Visibility = Windows.Visibility.Visible
|
||||||
FileListBox.Visibility = Windows.Visibility.Visible
|
FileListBox.Visibility = Windows.Visibility.Visible
|
||||||
LeftGrid.Children.Remove(m_SideAngleUC)
|
LeftGrid.Children.Remove(m_SideAngleUC)
|
||||||
If SideAngleBtn.IsChecked() Then
|
If SideAngleBtn.IsChecked() Then
|
||||||
SideAngleBtn.IsChecked = False
|
SideAngleBtn.IsChecked = False
|
||||||
|
ElseIf EngraveBtn.IsChecked() Then
|
||||||
|
EngraveBtn.IsChecked = False
|
||||||
Else
|
Else
|
||||||
DripCutBtn.IsChecked() = False
|
DripCutBtn.IsChecked() = False
|
||||||
End If
|
End If
|
||||||
' Tolgo pagina fori da sotto se attiva
|
' Tolgo pagina fori da sotto se attiva
|
||||||
ElseIf DripDrillBtn.IsChecked() Then
|
ElseIf DripDrillBtn.IsChecked() Then
|
||||||
FilePathTxBl.Visibility = Windows.Visibility.Visible
|
FilePathTxBl.Visibility = Windows.Visibility.Visible
|
||||||
FileListBox.Visibility = Windows.Visibility.Visible
|
FileListBox.Visibility = Windows.Visibility.Visible
|
||||||
LeftGrid.Children.Remove(m_UnderDrillUC)
|
LeftGrid.Children.Remove(m_UnderDrillUC)
|
||||||
DripDrillBtn.IsChecked() = False
|
DripDrillBtn.IsChecked() = False
|
||||||
' Tolgo pagina Filo Top se attiva
|
' Tolgo pagina Filo Top se attiva
|
||||||
ElseIf FiloTopBtn.IsChecked() Then
|
ElseIf FiloTopBtn.IsChecked() Then
|
||||||
FilePathTxBl.Visibility = Windows.Visibility.Visible
|
FilePathTxBl.Visibility = Windows.Visibility.Visible
|
||||||
FileListBox.Visibility = Windows.Visibility.Visible
|
FileListBox.Visibility = Windows.Visibility.Visible
|
||||||
@@ -1040,6 +1204,7 @@ Public Class ImportPageUC
|
|||||||
|
|
||||||
Private Sub SideAngleBtn_Click(sender As Object, e As RoutedEventArgs) Handles SideAngleBtn.Click
|
Private Sub SideAngleBtn_Click(sender As Object, e As RoutedEventArgs) Handles SideAngleBtn.Click
|
||||||
If SideAngleBtn.IsChecked() Then
|
If SideAngleBtn.IsChecked() Then
|
||||||
|
FinderGrd.Visibility = Visibility.Hidden
|
||||||
' Aggiungo regioni per percorsi interni
|
' Aggiungo regioni per percorsi interni
|
||||||
AdjustSelectRegions()
|
AdjustSelectRegions()
|
||||||
' Dichiaro nessuna selezione
|
' Dichiaro nessuna selezione
|
||||||
@@ -1052,7 +1217,11 @@ Public Class ImportPageUC
|
|||||||
FileListBox.Visibility = Windows.Visibility.Hidden
|
FileListBox.Visibility = Windows.Visibility.Hidden
|
||||||
' Disabilito FiloTopBtn, DripCutBtn, DripDrillBtn e unità di misura
|
' Disabilito FiloTopBtn, DripCutBtn, DripDrillBtn e unità di misura
|
||||||
FiloTopBtn.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
|
DripDrillBtn.IsEnabled = False
|
||||||
mmBtn.IsEnabled = False
|
mmBtn.IsEnabled = False
|
||||||
inchBtn.IsEnabled = False
|
inchBtn.IsEnabled = False
|
||||||
@@ -1062,6 +1231,7 @@ Public Class ImportPageUC
|
|||||||
MessageTxBx.Text = EgtMsg(MSG_DRAWPAGEUC + 6) ' Selezionare un contorno
|
MessageTxBx.Text = EgtMsg(MSG_DRAWPAGEUC + 6) ' Selezionare un contorno
|
||||||
MessageBrd.Background = Application.Current.FindResource("OmagCut_Green")
|
MessageBrd.Background = Application.Current.FindResource("OmagCut_Green")
|
||||||
Else
|
Else
|
||||||
|
FinderGrd.Visibility = Visibility.Visible
|
||||||
' Rimuovo regioni per percorsi interni
|
' Rimuovo regioni per percorsi interni
|
||||||
RemoveSelectRegions()
|
RemoveSelectRegions()
|
||||||
FilePathTxBl.Visibility = Windows.Visibility.Visible
|
FilePathTxBl.Visibility = Windows.Visibility.Visible
|
||||||
@@ -1073,8 +1243,72 @@ Public Class ImportPageUC
|
|||||||
EgtDeselectAll()
|
EgtDeselectAll()
|
||||||
' Riabilito FiloTopBtn, DripCutBtn, DripDrillBtn e unità di misura
|
' Riabilito FiloTopBtn, DripCutBtn, DripDrillBtn e unità di misura
|
||||||
FiloTopBtn.IsEnabled = m_MainWindow.m_CurrentMachine.bMilling
|
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)
|
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
|
DripDrillBtn.IsEnabled = m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.UNDER_CUT) And
|
||||||
Not String.IsNullOrWhiteSpace(m_MainWindow.m_CurrentMachine.sCurrDripDrill)
|
Not String.IsNullOrWhiteSpace(m_MainWindow.m_CurrentMachine.sCurrDripDrill)
|
||||||
mmBtn.IsEnabled = True
|
mmBtn.IsEnabled = True
|
||||||
@@ -1092,6 +1326,7 @@ Public Class ImportPageUC
|
|||||||
|
|
||||||
Private Sub DripCutBtn_Click(sender As Object, e As RoutedEventArgs) Handles DripCutBtn.Click
|
Private Sub DripCutBtn_Click(sender As Object, e As RoutedEventArgs) Handles DripCutBtn.Click
|
||||||
If DripCutBtn.IsChecked() Then
|
If DripCutBtn.IsChecked() Then
|
||||||
|
FinderGrd.Visibility = Visibility.Hidden
|
||||||
' Dichiaro nessuna selezione
|
' Dichiaro nessuna selezione
|
||||||
m_nSelectedPart = GDB_ID.NULL
|
m_nSelectedPart = GDB_ID.NULL
|
||||||
m_nSelectedLayer = GDB_ID.NULL
|
m_nSelectedLayer = GDB_ID.NULL
|
||||||
@@ -1103,6 +1338,9 @@ Public Class ImportPageUC
|
|||||||
' Disabilito SideAngleBtn,FiloTop, DripDrillBtn e unità di misura
|
' Disabilito SideAngleBtn,FiloTop, DripDrillBtn e unità di misura
|
||||||
SideAngleBtn.IsEnabled = False
|
SideAngleBtn.IsEnabled = False
|
||||||
FiloTopBtn.IsEnabled = False
|
FiloTopBtn.IsEnabled = False
|
||||||
|
If DripCutBtn.Visibility <> Visibility.Visible Then
|
||||||
|
EngraveBtn.IsEnabled = False
|
||||||
|
End If
|
||||||
DripDrillBtn.IsEnabled = False
|
DripDrillBtn.IsEnabled = False
|
||||||
mmBtn.IsEnabled = False
|
mmBtn.IsEnabled = False
|
||||||
inchBtn.IsEnabled = False
|
inchBtn.IsEnabled = False
|
||||||
@@ -1112,6 +1350,7 @@ Public Class ImportPageUC
|
|||||||
MessageTxBx.Text = EgtMsg(MSG_DRAWPAGEUC + 6) ' Selezionare un contorno
|
MessageTxBx.Text = EgtMsg(MSG_DRAWPAGEUC + 6) ' Selezionare un contorno
|
||||||
MessageBrd.Background = Application.Current.FindResource("OmagCut_Green")
|
MessageBrd.Background = Application.Current.FindResource("OmagCut_Green")
|
||||||
Else
|
Else
|
||||||
|
FinderGrd.Visibility = Visibility.Visible
|
||||||
FilePathTxBl.Visibility = Windows.Visibility.Visible
|
FilePathTxBl.Visibility = Windows.Visibility.Visible
|
||||||
FileListBox.Visibility = Windows.Visibility.Visible
|
FileListBox.Visibility = Windows.Visibility.Visible
|
||||||
LeftGrid.Children.Remove(m_SideAngleUC)
|
LeftGrid.Children.Remove(m_SideAngleUC)
|
||||||
@@ -1122,8 +1361,9 @@ Public Class ImportPageUC
|
|||||||
' Riabilito SideAngleBtn, FiloTop, DripDrillBtn e unità di misura
|
' Riabilito SideAngleBtn, FiloTop, DripDrillBtn e unità di misura
|
||||||
SideAngleBtn.IsEnabled = m_MainWindow.m_DrawPageUC.bEnableSideAngle
|
SideAngleBtn.IsEnabled = m_MainWindow.m_DrawPageUC.bEnableSideAngle
|
||||||
FiloTopBtn.IsEnabled = m_MainWindow.m_CurrentMachine.bMilling
|
FiloTopBtn.IsEnabled = m_MainWindow.m_CurrentMachine.bMilling
|
||||||
DripDrillBtn.IsEnabled = m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.UNDER_CUT) And
|
If DripCutBtn.Visibility <> Visibility.Visible Then
|
||||||
Not String.IsNullOrWhiteSpace(m_MainWindow.m_CurrentMachine.sCurrDripDrill)
|
EngraveBtn.IsEnabled = m_MainWindow.m_DrawPageUC.bEnableSideAngle
|
||||||
|
End If
|
||||||
mmBtn.IsEnabled = True
|
mmBtn.IsEnabled = True
|
||||||
inchBtn.IsEnabled = True
|
inchBtn.IsEnabled = True
|
||||||
' Elimino scritte angoli per input e inserisco quelle definitive
|
' Elimino scritte angoli per input e inserisco quelle definitive
|
||||||
@@ -1142,6 +1382,7 @@ Public Class ImportPageUC
|
|||||||
|
|
||||||
Private Sub DripDrillBtn_Click(sender As Object, e As RoutedEventArgs) Handles DripDrillBtn.Click
|
Private Sub DripDrillBtn_Click(sender As Object, e As RoutedEventArgs) Handles DripDrillBtn.Click
|
||||||
If DripDrillBtn.IsChecked() Then
|
If DripDrillBtn.IsChecked() Then
|
||||||
|
FinderGrd.Visibility = Visibility.Hidden
|
||||||
' Aggiungo regioni di selezione per percorsi interni
|
' Aggiungo regioni di selezione per percorsi interni
|
||||||
AdjustSelectRegions()
|
AdjustSelectRegions()
|
||||||
' Imposto modalità fori da sotto
|
' Imposto modalità fori da sotto
|
||||||
@@ -1151,7 +1392,11 @@ Public Class ImportPageUC
|
|||||||
' Disabilito SideAngleBtn, FiloTop, DripCutBtn e unità di misura
|
' Disabilito SideAngleBtn, FiloTop, DripCutBtn e unità di misura
|
||||||
SideAngleBtn.IsEnabled = False
|
SideAngleBtn.IsEnabled = False
|
||||||
FiloTopBtn.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
|
mmBtn.IsEnabled = False
|
||||||
inchBtn.IsEnabled = False
|
inchBtn.IsEnabled = False
|
||||||
' Disabilito bottone reset
|
' Disabilito bottone reset
|
||||||
@@ -1160,6 +1405,7 @@ Public Class ImportPageUC
|
|||||||
MessageTxBx.Text = EgtMsg(MSG_DRAWPAGEUC + 15) ' Selezionare uno o più fori
|
MessageTxBx.Text = EgtMsg(MSG_DRAWPAGEUC + 15) ' Selezionare uno o più fori
|
||||||
MessageBrd.Background = Application.Current.FindResource("OmagCut_Green")
|
MessageBrd.Background = Application.Current.FindResource("OmagCut_Green")
|
||||||
Else
|
Else
|
||||||
|
FinderGrd.Visibility = Visibility.Visible
|
||||||
' Rimuovo regioni per percorsi interni
|
' Rimuovo regioni per percorsi interni
|
||||||
RemoveSelectRegions()
|
RemoveSelectRegions()
|
||||||
FilePathTxBl.Visibility = Windows.Visibility.Visible
|
FilePathTxBl.Visibility = Windows.Visibility.Visible
|
||||||
@@ -1172,8 +1418,12 @@ Public Class ImportPageUC
|
|||||||
' Riabilito SideAngleBtn, FiloTop, DripCutBtn e unità di misura
|
' Riabilito SideAngleBtn, FiloTop, DripCutBtn e unità di misura
|
||||||
SideAngleBtn.IsEnabled = m_MainWindow.m_DrawPageUC.bEnableSideAngle
|
SideAngleBtn.IsEnabled = m_MainWindow.m_DrawPageUC.bEnableSideAngle
|
||||||
FiloTopBtn.IsEnabled = m_MainWindow.m_CurrentMachine.bMilling
|
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)
|
Not String.IsNullOrWhiteSpace(m_MainWindow.m_CurrentMachine.sCurrDripSaw)
|
||||||
|
Else
|
||||||
|
EngraveBtn.IsEnabled = m_MainWindow.m_DrawPageUC.bEnableSideAngle
|
||||||
|
End If
|
||||||
mmBtn.IsEnabled = True
|
mmBtn.IsEnabled = True
|
||||||
inchBtn.IsEnabled = True
|
inchBtn.IsEnabled = True
|
||||||
' Riabilito bottone reset
|
' Riabilito bottone reset
|
||||||
@@ -1187,6 +1437,7 @@ Public Class ImportPageUC
|
|||||||
|
|
||||||
Private Sub FiloTopBtn_Click(sender As Object, e As RoutedEventArgs) Handles FiloTopBtn.Click
|
Private Sub FiloTopBtn_Click(sender As Object, e As RoutedEventArgs) Handles FiloTopBtn.Click
|
||||||
If FiloTopBtn.IsChecked() Then
|
If FiloTopBtn.IsChecked() Then
|
||||||
|
FinderGrd.Visibility = Visibility.Hidden
|
||||||
' Aggiungo regioni per percorsi interni
|
' Aggiungo regioni per percorsi interni
|
||||||
AdjustSelectRegions()
|
AdjustSelectRegions()
|
||||||
' Dichiaro nessuna selezione
|
' Dichiaro nessuna selezione
|
||||||
@@ -1198,7 +1449,11 @@ Public Class ImportPageUC
|
|||||||
FileListBox.Visibility = Windows.Visibility.Hidden
|
FileListBox.Visibility = Windows.Visibility.Hidden
|
||||||
' Disabilito SideAngleBtn, DripCutBtn, DripDrillBtn e unità di misura
|
' Disabilito SideAngleBtn, DripCutBtn, DripDrillBtn e unità di misura
|
||||||
SideAngleBtn.IsEnabled = False
|
SideAngleBtn.IsEnabled = False
|
||||||
DripCutBtn.IsEnabled = False
|
If DripCutBtn.Visibility = Visibility.Visible Then
|
||||||
|
DripCutBtn.IsEnabled = False
|
||||||
|
Else
|
||||||
|
EngraveBtn.IsEnabled = False
|
||||||
|
End If
|
||||||
DripDrillBtn.IsEnabled = False
|
DripDrillBtn.IsEnabled = False
|
||||||
mmBtn.IsEnabled = False
|
mmBtn.IsEnabled = False
|
||||||
inchBtn.IsEnabled = False
|
inchBtn.IsEnabled = False
|
||||||
@@ -1208,6 +1463,7 @@ Public Class ImportPageUC
|
|||||||
MessageTxBx.Text = EgtMsg(MSG_DRAWPAGEUC + 6) ' Selezionare un contorno interno
|
MessageTxBx.Text = EgtMsg(MSG_DRAWPAGEUC + 6) ' Selezionare un contorno interno
|
||||||
MessageBrd.Background = Application.Current.FindResource("OmagCut_Green")
|
MessageBrd.Background = Application.Current.FindResource("OmagCut_Green")
|
||||||
Else
|
Else
|
||||||
|
FinderGrd.Visibility = Visibility.Visible
|
||||||
' Rimuovo regioni per percorsi interni
|
' Rimuovo regioni per percorsi interni
|
||||||
RemoveSelectRegions()
|
RemoveSelectRegions()
|
||||||
FilePathTxBl.Visibility = Windows.Visibility.Visible
|
FilePathTxBl.Visibility = Windows.Visibility.Visible
|
||||||
@@ -1219,8 +1475,12 @@ Public Class ImportPageUC
|
|||||||
EgtDeselectAll()
|
EgtDeselectAll()
|
||||||
' Riabilito SideAngleBtn, DripCutBtn, DripDrillBtn e unità di misura
|
' Riabilito SideAngleBtn, DripCutBtn, DripDrillBtn e unità di misura
|
||||||
SideAngleBtn.IsEnabled = m_MainWindow.m_DrawPageUC.bEnableSideAngle
|
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)
|
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
|
DripDrillBtn.IsEnabled = m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.UNDER_CUT) And
|
||||||
Not String.IsNullOrWhiteSpace(m_MainWindow.m_CurrentMachine.sCurrDripDrill)
|
Not String.IsNullOrWhiteSpace(m_MainWindow.m_CurrentMachine.sCurrDripDrill)
|
||||||
mmBtn.IsEnabled = True
|
mmBtn.IsEnabled = True
|
||||||
@@ -1279,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
|
If nType = GDB_TY.CRV_LINE Or nType = GDB_TY.CRV_ARC Or nType = GDB_TY.CRV_COMPO Then
|
||||||
vCrvId.Add(nCrvId)
|
vCrvId.Add(nCrvId)
|
||||||
End If
|
End If
|
||||||
ElseIf DripDrillBtn.IsChecked
|
ElseIf DripDrillBtn.IsChecked Then
|
||||||
if nType = GDB_TY.CRV_ARC
|
|
||||||
|
If nType = GDB_TY.CRV_ARC Then
|
||||||
vCrvId.Add(nCrvId)
|
vCrvId.Add(nCrvId)
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
@@ -1306,11 +1567,11 @@ Public Class ImportPageUC
|
|||||||
|
|
||||||
Private Sub Cad2dBtn_Click(sender As Object, e As RoutedEventArgs) Handles Cad2dBtn.Click
|
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
|
If ProcsCad2d.Length() > 0 Then
|
||||||
ShowWindow( ProcsCad2d(0).MainWindowHandle, 3)
|
ShowWindow(ProcsCad2d(0).MainWindowHandle, 3)
|
||||||
Else
|
Else
|
||||||
Process.Start( m_sCad2dPath)
|
Process.Start(m_sCad2dPath)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
@@ -1319,42 +1580,42 @@ End Class
|
|||||||
|
|
||||||
Public Class IconListBoxItem
|
Public Class IconListBoxItem
|
||||||
|
|
||||||
Private m_iPictureID As Integer
|
Private m_iPictureID As Integer
|
||||||
Private m_sName As String
|
Private m_sName As String
|
||||||
|
|
||||||
Public Property PictureID() As Integer
|
Public Property PictureID() As Integer
|
||||||
Get
|
Get
|
||||||
Return m_iPictureID
|
Return m_iPictureID
|
||||||
End Get
|
End Get
|
||||||
Set(value As Integer)
|
Set(value As Integer)
|
||||||
m_iPictureID = value
|
m_iPictureID = value
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
Public Property Name() As String
|
Public Property Name() As String
|
||||||
Get
|
Get
|
||||||
Return m_sName
|
Return m_sName
|
||||||
End Get
|
End Get
|
||||||
Set(value As String)
|
Set(value As String)
|
||||||
m_sName = value
|
m_sName = value
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
Public ReadOnly Property PictureString() As String
|
Public ReadOnly Property PictureString() As String
|
||||||
Get
|
Get
|
||||||
Return "/Resources/ImportPageListBoxImages/" + PictureID.ToString() + ".png"
|
Return "/Resources/ImportPageListBoxImages/" + PictureID.ToString() + ".png"
|
||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
Sub New()
|
Sub New()
|
||||||
Me.Name = String.Empty
|
Me.Name = String.Empty
|
||||||
Me.PictureID = 0
|
Me.PictureID = 0
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Sub New(Name As String, PictureID As Integer)
|
Sub New(Name As String, PictureID As Integer)
|
||||||
Me.Name = Name
|
Me.Name = Name
|
||||||
Me.PictureID = PictureID
|
Me.PictureID = PictureID
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
@@ -1,10 +1,10 @@
|
|||||||
<UserControl x:Class="InternalComponentPageUC"
|
<UserControl x:Class="InternalComponentPageUC"
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
d:DesignHeight="768" d:DesignWidth="256">
|
d:DesignHeight="768" d:DesignWidth="256">
|
||||||
|
|
||||||
<!-- Definizione della MainComponentPage -->
|
<!-- Definizione della MainComponentPage -->
|
||||||
<Grid Name="MainComponentPageGrid" Background="{DynamicResource OmagCut_Gray}">
|
<Grid Name="MainComponentPageGrid" Background="{DynamicResource OmagCut_Gray}">
|
||||||
@@ -30,7 +30,7 @@
|
|||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<Image Name="ImageCompo1" Grid.Column="0" />
|
<Image Name="ImageCompo1" Grid.Column="0" />
|
||||||
<TextBlock Name="LabelCompo1" Grid.Column="1"
|
<TextBlock Name="LabelCompo1" Grid.Column="1"
|
||||||
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
</Button>
|
</Button>
|
||||||
|
|
||||||
@@ -42,11 +42,11 @@
|
|||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<Image Name="ImageCompo2" Grid.Column="0" />
|
<Image Name="ImageCompo2" Grid.Column="0" />
|
||||||
<TextBlock Name="LabelCompo2" Grid.Column="1"
|
<TextBlock Name="LabelCompo2" Grid.Column="1"
|
||||||
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
</Button>
|
</Button>
|
||||||
|
|
||||||
<Button Name="Compo3" Grid.Row="2" Style="{DynamicResource OmagCut_YellowIconButton}">
|
<Button Name="Compo3" Grid.Row="2" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||||
<Grid>
|
<Grid>
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="80"/>
|
<ColumnDefinition Width="80"/>
|
||||||
@@ -54,11 +54,11 @@
|
|||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<Image Name="ImageCompo3" Grid.Column="0" />
|
<Image Name="ImageCompo3" Grid.Column="0" />
|
||||||
<TextBlock Name="LabelCompo3" Grid.Column="1"
|
<TextBlock Name="LabelCompo3" Grid.Column="1"
|
||||||
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
</Button>
|
</Button>
|
||||||
|
|
||||||
<Button Name="Compo4" Grid.Row="3" Style="{DynamicResource OmagCut_YellowIconButton}">
|
<Button Name="Compo4" Grid.Row="3" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||||
<Grid>
|
<Grid>
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="80"/>
|
<ColumnDefinition Width="80"/>
|
||||||
@@ -66,11 +66,11 @@
|
|||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<Image Name="ImageCompo4" Grid.Column="0" />
|
<Image Name="ImageCompo4" Grid.Column="0" />
|
||||||
<TextBlock Name="LabelCompo4" Grid.Column="1"
|
<TextBlock Name="LabelCompo4" Grid.Column="1"
|
||||||
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
</Button>
|
</Button>
|
||||||
|
|
||||||
<Button Name="Compo5" Grid.Row="4" Style="{DynamicResource OmagCut_YellowIconButton}">
|
<Button Name="Compo5" Grid.Row="4" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||||
<Grid>
|
<Grid>
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="80"/>
|
<ColumnDefinition Width="80"/>
|
||||||
@@ -78,11 +78,11 @@
|
|||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<Image Name="ImageCompo5" Grid.Column="0" />
|
<Image Name="ImageCompo5" Grid.Column="0" />
|
||||||
<TextBlock Name="LabelCompo5" Grid.Column="1"
|
<TextBlock Name="LabelCompo5" Grid.Column="1"
|
||||||
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
</Button>
|
</Button>
|
||||||
|
|
||||||
<Button Name="Compo6" Grid.Row="5" Style="{DynamicResource OmagCut_YellowIconButton}">
|
<Button Name="Compo6" Grid.Row="5" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||||
<Grid>
|
<Grid>
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="80"/>
|
<ColumnDefinition Width="80"/>
|
||||||
@@ -90,11 +90,11 @@
|
|||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<Image Name="ImageCompo6" Grid.Column="0" />
|
<Image Name="ImageCompo6" Grid.Column="0" />
|
||||||
<TextBlock Name="LabelCompo6" Grid.Column="1"
|
<TextBlock Name="LabelCompo6" Grid.Column="1"
|
||||||
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
</Button>
|
</Button>
|
||||||
|
|
||||||
<Button Name="Compo7" Grid.Row="6" Style="{DynamicResource OmagCut_YellowIconButton}">
|
<Button Name="Compo7" Grid.Row="6" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||||
<Grid>
|
<Grid>
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="80"/>
|
<ColumnDefinition Width="80"/>
|
||||||
@@ -102,11 +102,11 @@
|
|||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<Image Name="ImageCompo7" Grid.Column="0" />
|
<Image Name="ImageCompo7" Grid.Column="0" />
|
||||||
<TextBlock Name="LabelCompo7" Grid.Column="1"
|
<TextBlock Name="LabelCompo7" Grid.Column="1"
|
||||||
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
</Button>
|
</Button>
|
||||||
|
|
||||||
<Button Name="Compo8" Grid.Row="7" Style="{DynamicResource OmagCut_YellowIconButton}">
|
<Button Name="Compo8" Grid.Row="7" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||||
<Grid>
|
<Grid>
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="80"/>
|
<ColumnDefinition Width="80"/>
|
||||||
@@ -114,29 +114,30 @@
|
|||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<Image Name="ImageCompo8" Grid.Column="0" />
|
<Image Name="ImageCompo8" Grid.Column="0" />
|
||||||
<TextBlock Name="LabelCompo8" Grid.Column="1"
|
<TextBlock Name="LabelCompo8" Grid.Column="1"
|
||||||
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
</Button>
|
</Button>
|
||||||
|
|
||||||
<Button Name="Compo9" Grid.Row="8" Grid.ColumnSpan="2" Style="{DynamicResource OmagCut_YellowIconButton}">
|
<Button Name="Compo9" Grid.Row="8" Grid.ColumnSpan="2" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||||
<Grid>
|
<Grid>
|
||||||
<Image Name="ImageCompo9" Source="{DynamicResource NumericKeyboardArrowImg}" />
|
<Image Name="ImageCompo9" Source="{DynamicResource NumericKeyboardArrowImg}" />
|
||||||
<!--"/Resources/NumericKeyboardArrow.png"/>-->
|
<!--"/Resources/NumericKeyboardArrow.png"/>-->
|
||||||
<TextBlock Name="LabelCompo9" Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
<TextBlock Name="LabelCompo9"
|
||||||
</Grid>
|
Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||||
</Button>
|
</Grid>
|
||||||
|
</Button>
|
||||||
|
|
||||||
<Grid Grid.Row="9">
|
<Grid Grid.Row="9">
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="1*"/>
|
<ColumnDefinition Width="1*"/>
|
||||||
<ColumnDefinition Width="1*"/>
|
<ColumnDefinition Width="1*"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
<Button Name="BackBtn" Grid.Column="1" Style="{DynamicResource OmagCut_YellowIconButton}">
|
<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>
|
</Button>
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ Public Class InternalComponentPageUC
|
|||||||
' bottone per selezionare la seconda pagina di componenti interni
|
' bottone per selezionare la seconda pagina di componenti interni
|
||||||
Compo9.SetValue(Grid.ColumnProperty, 0)
|
Compo9.SetValue(Grid.ColumnProperty, 0)
|
||||||
Compo9.SetValue(Grid.ColumnSpanProperty, 2)
|
Compo9.SetValue(Grid.ColumnSpanProperty, 2)
|
||||||
LabelCompo9.Text = EgtMsg(MSG_COMPONENTPAGEUC + 9) ' Altri
|
LabelCompo9.Text = EgtMsg(90409) ' Altri
|
||||||
ImageCompo9.Visibility = Windows.Visibility.Hidden
|
ImageCompo9.Visibility = Windows.Visibility.Hidden
|
||||||
LabelCompo9.Visibility = Windows.Visibility.Visible
|
LabelCompo9.Visibility = Windows.Visibility.Visible
|
||||||
' Se i componenti interni sono più di 8 viene visualizzato il bottone "Altri" altrimenti no
|
' Se i componenti interni sono più di 8 viene visualizzato il bottone "Altri" altrimenti no
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
<UserControl x:Class="MainComponentPageUC"
|
<UserControl x:Class="MainComponentPageUC"
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
d:DesignHeight="768" d:DesignWidth="256">
|
d:DesignHeight="768" d:DesignWidth="256">
|
||||||
|
|
||||||
<!-- Definizione della MainComponentPage -->
|
<!-- Definizione della MainComponentPage -->
|
||||||
<Grid Name="MainComponentPageGrid">
|
<Grid Name="MainComponentPageGrid">
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
@@ -20,9 +20,9 @@
|
|||||||
<RowDefinition Height="1*"/>
|
<RowDefinition Height="1*"/>
|
||||||
<RowDefinition Height="1*"/>
|
<RowDefinition Height="1*"/>
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
<!-- Attenzione! Questi Button devono avere lo stesso nome dei componenti nel file Ini -->
|
<!-- 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>
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="80"/>
|
<ColumnDefinition Width="80"/>
|
||||||
@@ -30,11 +30,11 @@
|
|||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<Image Name="ImageCompo1" Grid.Column="0" />
|
<Image Name="ImageCompo1" Grid.Column="0" />
|
||||||
<TextBlock Name="LabelCompo1" Grid.Column="1"
|
<TextBlock Name="LabelCompo1" Grid.Column="1"
|
||||||
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
</Button>
|
</Button>
|
||||||
|
|
||||||
<Button Name="Compo2" Grid.Row="1" Style="{DynamicResource OmagCut_YellowIconButton}">
|
<Button Name="Compo2" Grid.Row="1" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||||
<Grid>
|
<Grid>
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="80"/>
|
<ColumnDefinition Width="80"/>
|
||||||
@@ -42,11 +42,11 @@
|
|||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<Image Name="ImageCompo2" Grid.Column="0" />
|
<Image Name="ImageCompo2" Grid.Column="0" />
|
||||||
<TextBlock Name="LabelCompo2" Grid.Column="1"
|
<TextBlock Name="LabelCompo2" Grid.Column="1"
|
||||||
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
</Button>
|
</Button>
|
||||||
|
|
||||||
<Button Name="Compo3" Grid.Row="2" Style="{DynamicResource OmagCut_YellowIconButton}">
|
<Button Name="Compo3" Grid.Row="2" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||||
<Grid>
|
<Grid>
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="80"/>
|
<ColumnDefinition Width="80"/>
|
||||||
@@ -54,23 +54,23 @@
|
|||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<Image Name="ImageCompo3" Grid.Column="0" />
|
<Image Name="ImageCompo3" Grid.Column="0" />
|
||||||
<TextBlock Name="LabelCompo3" Grid.Column="1"
|
<TextBlock Name="LabelCompo3" Grid.Column="1"
|
||||||
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
</Button>
|
</Button>
|
||||||
|
|
||||||
<Button Name="Compo4" Grid.Row="3" Style="{DynamicResource OmagCut_YellowIconButton}">
|
<Button Name="Compo4" Grid.Row="3" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||||
<Grid>
|
<Grid>
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="80"/>
|
<ColumnDefinition Width="80"/>
|
||||||
<ColumnDefinition Width="140"/>
|
<ColumnDefinition Width="140"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<Image Name="ImageCompo4" Grid.Column="0" />
|
<Image Name="ImageCompo4" Grid.Column="0" />
|
||||||
<TextBlock Name="LabelCompo4" Grid.Column="1"
|
<TextBlock Name="LabelCompo4" Grid.Column="1"
|
||||||
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
</Button>
|
</Button>
|
||||||
|
|
||||||
<Button Name="Compo5" Grid.Row="4" Style="{DynamicResource OmagCut_YellowIconButton}">
|
<Button Name="Compo5" Grid.Row="4" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||||
<Grid>
|
<Grid>
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="80"/>
|
<ColumnDefinition Width="80"/>
|
||||||
@@ -78,11 +78,11 @@
|
|||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<Image Name="ImageCompo5" Grid.Column="0" />
|
<Image Name="ImageCompo5" Grid.Column="0" />
|
||||||
<TextBlock Name="LabelCompo5" Grid.Column="1"
|
<TextBlock Name="LabelCompo5" Grid.Column="1"
|
||||||
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
</Button>
|
</Button>
|
||||||
|
|
||||||
<Button Name="Compo6" Grid.Row="5" Style="{DynamicResource OmagCut_YellowIconButton}">
|
<Button Name="Compo6" Grid.Row="5" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||||
<Grid>
|
<Grid>
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="80"/>
|
<ColumnDefinition Width="80"/>
|
||||||
@@ -90,11 +90,11 @@
|
|||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<Image Name="ImageCompo6" Grid.Column="0" />
|
<Image Name="ImageCompo6" Grid.Column="0" />
|
||||||
<TextBlock Name="LabelCompo6" Grid.Column="1"
|
<TextBlock Name="LabelCompo6" Grid.Column="1"
|
||||||
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
</Button>
|
</Button>
|
||||||
|
|
||||||
<Button Name="Compo7" Grid.Row="6" Style="{DynamicResource OmagCut_YellowIconButton}">
|
<Button Name="Compo7" Grid.Row="6" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||||
<Grid>
|
<Grid>
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="80"/>
|
<ColumnDefinition Width="80"/>
|
||||||
@@ -102,11 +102,11 @@
|
|||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<Image Name="ImageCompo7" Grid.Column="0" />
|
<Image Name="ImageCompo7" Grid.Column="0" />
|
||||||
<TextBlock Name="LabelCompo7" Grid.Column="1"
|
<TextBlock Name="LabelCompo7" Grid.Column="1"
|
||||||
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
</Button>
|
</Button>
|
||||||
|
|
||||||
<Button Name="Compo8" Grid.Row="7" Style="{DynamicResource OmagCut_YellowIconButton}">
|
<Button Name="Compo8" Grid.Row="7" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||||
<Grid>
|
<Grid>
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="80"/>
|
<ColumnDefinition Width="80"/>
|
||||||
@@ -114,7 +114,7 @@
|
|||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<Image Name="ImageCompo8" Grid.Column="0" />
|
<Image Name="ImageCompo8" Grid.Column="0" />
|
||||||
<TextBlock Name="LabelCompo8" Grid.Column="1"
|
<TextBlock Name="LabelCompo8" Grid.Column="1"
|
||||||
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
</Button>
|
</Button>
|
||||||
|
|
||||||
@@ -123,15 +123,16 @@
|
|||||||
<ColumnDefinition Width="1*"/>
|
<ColumnDefinition Width="1*"/>
|
||||||
<ColumnDefinition Width="1*"/>
|
<ColumnDefinition Width="1*"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<Button Name="Compo9" Grid.ColumnSpan="2" Style="{DynamicResource OmagCut_YellowIconButton}">
|
<Button Name="Compo9" Grid.ColumnSpan="2" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||||
<Grid>
|
<Grid>
|
||||||
<Image Name="ImageCompo9" Source="{DynamicResource NumericKeyboardArrowImg}" />
|
<Image Name="ImageCompo9" Source="{DynamicResource NumericKeyboardArrowImg}" />
|
||||||
<!--Source="/Resources/NumericKeyboardArrow.png"/>-->
|
<!--Source="/Resources/NumericKeyboardArrow.png"/>-->
|
||||||
<TextBlock Name="LabelCompo9" Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
<TextBlock Name="LabelCompo9"
|
||||||
|
Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
</Button>
|
</Button>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
</UserControl>
|
</UserControl>
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ Public Class MainComponentPageUC
|
|||||||
m_SecondaryComponentPage.SetValue(Grid.RowSpanProperty, 4)
|
m_SecondaryComponentPage.SetValue(Grid.RowSpanProperty, 4)
|
||||||
|
|
||||||
' Leggo messaggi da file ini
|
' Leggo messaggi da file ini
|
||||||
LabelCompo9.Text = EgtMsg(MSG_COMPONENTPAGEUC + 9)
|
LabelCompo9.Text = EgtMsg(90409) ' Altri
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -33,14 +33,31 @@ Public Class MainComponentPageUC
|
|||||||
m_bIsFirstPage = True
|
m_bIsFirstPage = True
|
||||||
LoadPage()
|
LoadPage()
|
||||||
CurrentBtn = Nothing
|
CurrentBtn = Nothing
|
||||||
Compo9.SetValue(Grid.ColumnProperty, 0)
|
If m_MainWindow.FrameCutBtn.IsChecked Then
|
||||||
Compo9.SetValue(Grid.ColumnSpanProperty, 2)
|
' se il numero delle componenti è superiore a 8 allora inserisco la seconda pagina
|
||||||
ImageCompo9.Visibility = Windows.Visibility.Hidden
|
If GetPrivateProfileInt(S_FRAMECOMPO, K_CMP_COUNT, 0, m_MainWindow.GetIniFile()) > 8 Then
|
||||||
LabelCompo9.Visibility = Windows.Visibility.Visible
|
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.SideAngleBtn.IsEnabled = False
|
||||||
m_MainWindow.m_DrawPageUC.FiloTopBtn.IsEnabled = False
|
m_MainWindow.m_DrawPageUC.FiloTopBtn.IsEnabled = False
|
||||||
m_MainWindow.m_DrawPageUC.EngraveBtn.IsEnabled = False
|
m_MainWindow.m_DrawPageUC.EngraveBtn.IsEnabled = False
|
||||||
m_MainWindow.m_DrawPageUC.DripCutBtn.IsEnabled = False
|
m_MainWindow.m_DrawPageUC.DripCutBtn.IsEnabled = False
|
||||||
|
m_MainWindow.m_DrawPageUC.m_bBackFromInternalCompo = False
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Function GetButton(ByVal nInd As Integer) As Button
|
Private Function GetButton(ByVal nInd As Integer) As Button
|
||||||
@@ -167,7 +184,7 @@ Public Class MainComponentPageUC
|
|||||||
|
|
||||||
Private Sub Compo_Click(sender As Object, e As RoutedEventArgs) Handles Compo1.Click, Compo2.Click, Compo3.Click, Compo4.Click, Compo5.Click, Compo6.Click, Compo7.Click, Compo8.Click
|
Private Sub Compo_Click(sender As Object, e As RoutedEventArgs) Handles Compo1.Click, Compo2.Click, Compo3.Click, Compo4.Click, Compo5.Click, Compo6.Click, Compo7.Click, Compo8.Click
|
||||||
CurrentBtn = DirectCast(e.Source, Button)
|
CurrentBtn = DirectCast(e.Source, Button)
|
||||||
Dim CompoName As String = S_COMPO & GetIndexFromButton(CurrentBtn).ToString
|
Dim CompoName As String = If(m_MainWindow.FrameCutBtn.IsChecked, S_FRAMECOMPO, S_COMPO) & GetIndexFromButton(CurrentBtn).ToString
|
||||||
m_sCurrCompoFam = CompoName
|
m_sCurrCompoFam = CompoName
|
||||||
m_SecondaryComponentPage.m_sCurrCompo = String.Empty
|
m_SecondaryComponentPage.m_sCurrCompo = String.Empty
|
||||||
Dim nCount As Integer = GetPrivateProfileInt(CompoName, K_CMP_COUNT, 0, m_MainWindow.GetIniFile())
|
Dim nCount As Integer = GetPrivateProfileInt(CompoName, K_CMP_COUNT, 0, m_MainWindow.GetIniFile())
|
||||||
@@ -251,13 +268,18 @@ Public Class MainComponentPageUC
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub LoadPage()
|
Private Sub LoadPage()
|
||||||
|
If m_MainWindow.FrameCutBtn.IsChecked Then
|
||||||
|
LoadFramePage()
|
||||||
|
Return
|
||||||
|
End If
|
||||||
|
|
||||||
Dim nDeltaSecondPage As Integer = 8
|
Dim nDeltaSecondPage As Integer = 8
|
||||||
' Leggo numero di componenti presenti
|
' Leggo numero di componenti presenti
|
||||||
Dim nCompoNumber As Integer = GetPrivateProfileInt(S_COMPO, K_CMP_COUNT, 0, m_MainWindow.GetIniFile())
|
Dim nCompoNumber As Integer = GetPrivateProfileInt(S_COMPO, K_CMP_COUNT, 0, m_MainWindow.GetIniFile())
|
||||||
' Calcolo indici a seconda della pagina in cui sono
|
' Calcolo indici a seconda della pagina in cui sono
|
||||||
If m_bIsFirstPage Then
|
If m_bIsFirstPage Then
|
||||||
ClearButton(nCompoNumber)
|
ClearButton(nCompoNumber)
|
||||||
nDeltaSecondPage = 0
|
nDeltaSecondPage = 0
|
||||||
Else
|
Else
|
||||||
ClearButton(nCompoNumber)
|
ClearButton(nCompoNumber)
|
||||||
nDeltaSecondPage = 8
|
nDeltaSecondPage = 8
|
||||||
@@ -297,7 +319,82 @@ Public Class MainComponentPageUC
|
|||||||
|
|
||||||
'verifico presenza testo
|
'verifico presenza testo
|
||||||
If nCompoName > 0 Then
|
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
|
||||||
|
If sCompoName.Length > 15 Then
|
||||||
|
sCompoName = sCompoName.Substring(0, 15)
|
||||||
|
End If
|
||||||
|
GetLabel(index).Text = sCompoName
|
||||||
|
'Se ci sono sia testo che immagine imposto un margine di 10
|
||||||
|
CustomThickness.Right = 10
|
||||||
|
GetImage(index).Margin = CustomThickness
|
||||||
|
Else
|
||||||
|
'se l'immagine non c'è e il testo è maggiore di 20 lo taglio
|
||||||
|
If sCompoName.Length > 20 Then
|
||||||
|
sCompoName = sCompoName.Substring(0, 20)
|
||||||
|
End If
|
||||||
|
GetLabel(index).Text = sCompoName
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
'Se non c'è testo azzero la distanza tra testo e immagine
|
||||||
|
CustomThickness.Right = 0
|
||||||
|
GetImage(index).Margin = CustomThickness
|
||||||
|
End If
|
||||||
|
|
||||||
|
Next
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub LoadFramePage()
|
||||||
|
Dim nDeltaSecondPage As Integer = 8
|
||||||
|
' Leggo numero di componenti presenti
|
||||||
|
Dim nCompoNumber As Integer = GetPrivateProfileInt(S_FRAMECOMPO, K_CMP_COUNT, 0, m_MainWindow.GetIniFile())
|
||||||
|
' Calcolo indici a seconda della pagina in cui sono
|
||||||
|
If m_bIsFirstPage Then
|
||||||
|
ClearButton(nCompoNumber)
|
||||||
|
nDeltaSecondPage = 0
|
||||||
|
Else
|
||||||
|
ClearButton(nCompoNumber)
|
||||||
|
nDeltaSecondPage = 8
|
||||||
|
End If
|
||||||
|
|
||||||
|
' Creazione converter da String a ImageSource
|
||||||
|
Dim ImageConverter As New ImageSourceConverter
|
||||||
|
Dim ThicknessConverter As New ThicknessConverter
|
||||||
|
|
||||||
|
'Assegnazione immagine e testo ai Button
|
||||||
|
For index As Integer = 1 To 8
|
||||||
|
Dim CustomThickness As New Thickness(0)
|
||||||
|
Dim nCompoName As Integer = GetPrivateProfileInt(S_FRAMECOMPO & index + nDeltaSecondPage, "Name", 0, m_MainWindow.GetIniFile())
|
||||||
|
Dim sCompoImage As String = ""
|
||||||
|
Dim sCompoImageSource As ImageSource
|
||||||
|
|
||||||
|
'verifico presenza immagine e la aggiungo
|
||||||
|
If GetPrivateProfileString(S_FRAMECOMPO & index + nDeltaSecondPage, "Image", "", sCompoImage, m_MainWindow.GetIniFile()) <> 0 Then
|
||||||
|
Try
|
||||||
|
sCompoImageSource = ImageConverter.ConvertFromString(m_MainWindow.GetResourcesDir() & "\" & sCompoImage)
|
||||||
|
GetImage(index).Height = 65
|
||||||
|
GetImage(index).Width = 65
|
||||||
|
GetImage(index).Source = sCompoImageSource
|
||||||
|
Catch ex As Exception
|
||||||
|
EgtOutLog("Error loading image " & sCompoImage)
|
||||||
|
sCompoImage = String.Empty
|
||||||
|
GetImage(index).Height = 0
|
||||||
|
GetImage(index).Width = 0
|
||||||
|
CustomThickness.Right = 0
|
||||||
|
GetImage(index).Margin = CustomThickness
|
||||||
|
End Try
|
||||||
|
Else
|
||||||
|
'Se non c'è l'immagine azzero la distanza tra testo e immagine
|
||||||
|
CustomThickness.Right = 0
|
||||||
|
GetImage(index).Margin = CustomThickness
|
||||||
|
End If
|
||||||
|
|
||||||
|
'verifico presenza testo
|
||||||
|
If nCompoName > 0 Then
|
||||||
|
Dim sCompoName As String = EgtMsg(90400 + nCompoName)
|
||||||
'verifico presenza immagine
|
'verifico presenza immagine
|
||||||
If sCompoImage.Length > 0 Then
|
If sCompoImage.Length > 0 Then
|
||||||
'se la lunghezza del testo è maggiore di 15 lo taglio
|
'se la lunghezza del testo è maggiore di 15 lo taglio
|
||||||
@@ -330,11 +427,6 @@ Public Class MainComponentPageUC
|
|||||||
If m_bIsFirstPage Then
|
If m_bIsFirstPage Then
|
||||||
m_bIsFirstPage = False
|
m_bIsFirstPage = False
|
||||||
LoadPage()
|
LoadPage()
|
||||||
'Compo9.SetValue(Grid.ColumnProperty, 1)
|
|
||||||
'Compo9.SetValue(Grid.ColumnSpanProperty, 1)
|
|
||||||
'ImageCompo9.Source = New System.Windows.Media.Imaging.BitmapImage(New Uri("/Resources/NumericKeyboardArrow.png", UriKind.Relative))
|
|
||||||
'ImageCompo9.Visibility = Windows.Visibility.Visible
|
|
||||||
'LabelCompo9.Visibility = Windows.Visibility.Hidden
|
|
||||||
Compo9.SetValue(Grid.ColumnProperty, 0)
|
Compo9.SetValue(Grid.ColumnProperty, 0)
|
||||||
Compo9.SetValue(Grid.ColumnSpanProperty, 2)
|
Compo9.SetValue(Grid.ColumnSpanProperty, 2)
|
||||||
ImageCompo9.Visibility = Windows.Visibility.Hidden
|
ImageCompo9.Visibility = Windows.Visibility.Hidden
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
<UserControl x:Class="SecondaryComponentPageUC"
|
<UserControl x:Class="SecondaryComponentPageUC"
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
d:DesignHeight="768" d:DesignWidth="256" Loaded="SecondaryComponentPage_Loaded">
|
d:DesignHeight="768" d:DesignWidth="256" Loaded="SecondaryComponentPage_Loaded">
|
||||||
|
|
||||||
<!-- Definizione della SecondaryComponentPage -->
|
<!-- Definizione della SecondaryComponentPage -->
|
||||||
<Grid Name="SecondaryComponentPageGrid">
|
<Grid Name="SecondaryComponentPageGrid">
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
@@ -20,7 +20,7 @@
|
|||||||
<RowDefinition Height="1*"/>
|
<RowDefinition Height="1*"/>
|
||||||
<RowDefinition Height="1*"/>
|
<RowDefinition Height="1*"/>
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
<!-- Attenzione! Questi Button devono avere lo stesso nome dei componenti nel file Ini -->
|
<!-- 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>
|
||||||
@@ -30,7 +30,7 @@
|
|||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<Image Name="ImageCompo1" Grid.Column="0" />
|
<Image Name="ImageCompo1" Grid.Column="0" />
|
||||||
<TextBlock Name="LabelCompo1" Grid.Column="1"
|
<TextBlock Name="LabelCompo1" Grid.Column="1"
|
||||||
Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
</Button>
|
</Button>
|
||||||
|
|
||||||
@@ -43,7 +43,7 @@
|
|||||||
|
|
||||||
<Image Name="ImageCompo2" Grid.Column="0" />
|
<Image Name="ImageCompo2" Grid.Column="0" />
|
||||||
<TextBlock Name="LabelCompo2" Grid.Column="1"
|
<TextBlock Name="LabelCompo2" Grid.Column="1"
|
||||||
Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
</Button>
|
</Button>
|
||||||
|
|
||||||
@@ -55,7 +55,7 @@
|
|||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<Image Name="ImageCompo3" Grid.Column="0" />
|
<Image Name="ImageCompo3" Grid.Column="0" />
|
||||||
<TextBlock Name="LabelCompo3" Grid.Column="1"
|
<TextBlock Name="LabelCompo3" Grid.Column="1"
|
||||||
Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
</Button>
|
</Button>
|
||||||
|
|
||||||
@@ -67,7 +67,7 @@
|
|||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<Image Name="ImageCompo4" Grid.Column="0" />
|
<Image Name="ImageCompo4" Grid.Column="0" />
|
||||||
<TextBlock Name="LabelCompo4" Grid.Column="1"
|
<TextBlock Name="LabelCompo4" Grid.Column="1"
|
||||||
Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
</Button>
|
</Button>
|
||||||
|
|
||||||
@@ -79,7 +79,7 @@
|
|||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<Image Name="ImageCompo5" Grid.Column="0" />
|
<Image Name="ImageCompo5" Grid.Column="0" />
|
||||||
<TextBlock Name="LabelCompo5" Grid.Column="1"
|
<TextBlock Name="LabelCompo5" Grid.Column="1"
|
||||||
Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
</Button>
|
</Button>
|
||||||
|
|
||||||
@@ -91,7 +91,7 @@
|
|||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<Image Name="ImageCompo6" Grid.Column="0" />
|
<Image Name="ImageCompo6" Grid.Column="0" />
|
||||||
<TextBlock Name="LabelCompo6" Grid.Column="1"
|
<TextBlock Name="LabelCompo6" Grid.Column="1"
|
||||||
Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
</Button>
|
</Button>
|
||||||
|
|
||||||
@@ -103,7 +103,7 @@
|
|||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<Image Name="ImageCompo7" Grid.Column="0" />
|
<Image Name="ImageCompo7" Grid.Column="0" />
|
||||||
<TextBlock Name="LabelCompo7" Grid.Column="1"
|
<TextBlock Name="LabelCompo7" Grid.Column="1"
|
||||||
Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
</Button>
|
</Button>
|
||||||
|
|
||||||
@@ -115,7 +115,7 @@
|
|||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<Image Name="ImageCompo8" Grid.Column="0" />
|
<Image Name="ImageCompo8" Grid.Column="0" />
|
||||||
<TextBlock Name="LabelCompo8" Grid.Column="1"
|
<TextBlock Name="LabelCompo8" Grid.Column="1"
|
||||||
Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
</Button>
|
</Button>
|
||||||
|
|
||||||
@@ -127,10 +127,10 @@
|
|||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<Image Name="ImageCompo9" Grid.Column="0" />
|
<Image Name="ImageCompo9" Grid.Column="0" />
|
||||||
<TextBlock Name="LabelCompo9" Grid.Column="1"
|
<TextBlock Name="LabelCompo9" Grid.Column="1"
|
||||||
Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
</Button>
|
</Button>
|
||||||
|
|
||||||
<Grid Grid.Row="9">
|
<Grid Grid.Row="9">
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="1*"/>
|
<ColumnDefinition Width="1*"/>
|
||||||
@@ -138,11 +138,11 @@
|
|||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
<Button Name="BackBtn" Grid.Column="1" Style="{DynamicResource OmagCut_YellowIconButton}">
|
<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>
|
</Button>
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
</UserControl>
|
</UserControl>
|
||||||
|
|||||||
@@ -68,7 +68,7 @@ Public Class SecondaryComponentPageUC
|
|||||||
|
|
||||||
'verifico presenza testo
|
'verifico presenza testo
|
||||||
If nCompoName > 0 Then
|
If nCompoName > 0 Then
|
||||||
Dim sCompoName As String = EgtMsg(MSG_COMPONENTPAGEUC + nCompoName)
|
Dim sCompoName As String = EgtMsg(90400 + nCompoName)
|
||||||
'verifico presenza immagine
|
'verifico presenza immagine
|
||||||
If sCompoImage.Length > 0 Then
|
If sCompoImage.Length > 0 Then
|
||||||
'se la lunghezza del testo è maggiore di 20 lo taglio
|
'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)
|
m_MainWindow.m_DrawPageUC.LeftButtonGrd.Children.Add(m_MainComponentPage)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
@@ -226,6 +226,10 @@ Module SideAngle
|
|||||||
EgtSetInfo(EntId, INFO_SIDE_ANGLE, dAng)
|
EgtSetInfo(EntId, INFO_SIDE_ANGLE, dAng)
|
||||||
EgtSetInfo(EntId, INFO_ORIG_SIDE_ANGLE, dAng)
|
EgtSetInfo(EntId, INFO_ORIG_SIDE_ANGLE, dAng)
|
||||||
EgtSetInfo(EntId, INFO_HEEL, dHeel)
|
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
|
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"
|
<UserControl x:Class="SideAngleUC"
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
|
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
d:DesignHeight="636.9" d:DesignWidth="255.9">
|
d:DesignHeight="636.9" d:DesignWidth="255.9">
|
||||||
|
|
||||||
<!-- Definizione della Grid Laterale -->
|
<!-- Definizione della Grid Laterale -->
|
||||||
<Grid Name="VariablesCompoGrid" Grid.RowSpan="2">
|
<Grid Name="VariablesCompoGrid" Grid.RowSpan="2">
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="1.2*"/>
|
<ColumnDefinition Width="1.2*"/>
|
||||||
<ColumnDefinition Width="0.3*"/>
|
<ColumnDefinition Width="0.3*"/>
|
||||||
<ColumnDefinition Width="1*"/>
|
<ColumnDefinition Width="1*"/>
|
||||||
<ColumnDefinition Width="1*"/>
|
<ColumnDefinition Width="1*"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
@@ -34,182 +34,191 @@
|
|||||||
<RowDefinition Height="0.5*"/>-->
|
<RowDefinition Height="0.5*"/>-->
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
<Grid>
|
<Grid Name="SideAngleGrid" Grid.ColumnSpan="2">
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="0.4*"/>
|
<!--<ColumnDefinition Width="0.4*"/>-->
|
||||||
<ColumnDefinition Width="0.5*"/>
|
<ColumnDefinition Width="0.8*"/>
|
||||||
<ColumnDefinition Width="0.5*"/>
|
<ColumnDefinition Width="0.8*"/>
|
||||||
<ColumnDefinition Width="0.4*"/>
|
<ColumnDefinition Width="0.8*"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<Button Name="PrevBtn" Grid.Column="1" 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="2" Margin="4,0,4,0" Padding="0" Content=">" Style="{StaticResource 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>
|
</Grid>
|
||||||
|
|
||||||
<TextBlock Name="SideAngleBl" Grid.Row="0" Grid.Column="2" Text="A °"
|
<TextBlock Name="SideAngleBl" Grid.Row="0" Grid.Column="2" Text="A °"
|
||||||
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
|
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
|
||||||
FontSize="{DynamicResource FontSize_LowerCaseCharacter}"/>
|
FontSize="{DynamicResource FontSize_LowerCaseCharacter}"/>
|
||||||
|
|
||||||
<TextBlock Name="HeelBl" Grid.Row="0" Grid.Column="3" Text="T"
|
<TextBlock Name="HeelBl" Grid.Row="0" Grid.Column="3" Text="T"
|
||||||
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
|
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
|
||||||
FontSize="{DynamicResource FontSize_LowerCaseCharacter}"/>
|
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"
|
<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"
|
<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"
|
<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"
|
<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"
|
<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"
|
<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"
|
<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"
|
<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"
|
<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"
|
<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"
|
<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"
|
<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"
|
<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"
|
<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"
|
<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"
|
<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"
|
<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"
|
<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"
|
<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"
|
<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"
|
<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"
|
<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"
|
<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"
|
<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"
|
<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"
|
<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"
|
<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"
|
<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"
|
<EgtWPFLib:EgtTextBox Name="A10TxBx" Grid.Column="2" Grid.Row="10" Width="60" IsLength="False"
|
||||||
Margin="0,0,0,-2"
|
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"
|
<EgtWPFLib:EgtTextBox Name="H10TxBx" Grid.Column="3" Grid.Row="10" Width="60"
|
||||||
Margin="0,0,0,-2"
|
Margin="0,0,0,-2"
|
||||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||||
|
|
||||||
<Grid Grid.Column="0" Grid.Row="12" Grid.ColumnSpan="4" >
|
<Grid Grid.Column="0" Grid.Row="12" Grid.ColumnSpan="4" >
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="1.5*"/>
|
<ColumnDefinition Width="1.5*"/>
|
||||||
<ColumnDefinition Width="0.3*"/>
|
<ColumnDefinition Width="0.3*"/>
|
||||||
<ColumnDefinition Width="0.6*"/>
|
<ColumnDefinition Width="0.6*"/>
|
||||||
<ColumnDefinition Width="0.6*"/>
|
<ColumnDefinition Width="0.6*"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="0.9*"/>
|
<RowDefinition Height="0.9*"/>
|
||||||
<RowDefinition Height="0.9*"/>
|
<RowDefinition Height="0.9*"/>
|
||||||
<RowDefinition Height="0.9*"/>
|
<RowDefinition Height="0.9*"/>
|
||||||
<RowDefinition Height="0.9*"/>
|
<RowDefinition Height="0.9*"/>
|
||||||
<RowDefinition Height="0.9*"/>
|
<RowDefinition Height="0.9*"/>
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
<TextBlock Name="Parameter1TxBl" Grid.Row="0" Grid.ColumnSpan="2"
|
<TextBlock Name="Parameter1TxBl" Grid.Row="0" Grid.ColumnSpan="2"
|
||||||
Text="Offset"
|
Text="Offset"
|
||||||
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
|
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
|
||||||
FontSize="{DynamicResource FontSize_LowerCaseCharacter}"/>
|
FontSize="{DynamicResource FontSize_LowerCaseCharacter}"/>
|
||||||
<EgtWPFLib:EgtTextBox Name="Parameter1TxBx"
|
<EgtWPFLib:EgtTextBox Name="Parameter1TxBx"
|
||||||
Grid.Column="2" Grid.ColumnSpan="2" Grid.Row="0"
|
Grid.Column="2" Grid.ColumnSpan="2" Grid.Row="0"
|
||||||
Width="85" Height="30"
|
Width="85" Height="30"
|
||||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||||
|
|
||||||
<TextBlock Name="Parameter2TxBl" Grid.Row="1" Grid.ColumnSpan="2"
|
<TextBlock Name="Parameter2TxBl" Grid.Row="1" Grid.ColumnSpan="2"
|
||||||
Text="Offset2"
|
Text="Offset2"
|
||||||
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
|
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
|
||||||
FontSize="{DynamicResource FontSize_LowerCaseCharacter}"/>
|
FontSize="{DynamicResource FontSize_LowerCaseCharacter}"/>
|
||||||
<EgtWPFLib:EgtTextBox Name="Parameter2TxBx"
|
<EgtWPFLib:EgtTextBox Name="Parameter2TxBx"
|
||||||
Grid.Column="2" Grid.ColumnSpan="2" Grid.Row="1" Width="85"
|
Grid.Column="2" Grid.ColumnSpan="2" Grid.Row="1" Width="85"
|
||||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||||
<UniformGrid Rows="1" Grid.Column="2" Grid.Row="1" Grid.ColumnSpan="2" Width="90" >
|
<UniformGrid Rows="1" Grid.Column="2" Grid.Row="1" Grid.ColumnSpan="2" Width="90" >
|
||||||
<EgtWPFLib:EgtTextBox Name="Parameter2aTxBx"
|
<EgtWPFLib:EgtTextBox Name="Parameter2aTxBx"
|
||||||
Grid.Column="2" Grid.Row="12"
|
Grid.Column="2" Grid.Row="12"
|
||||||
Width="40" Height="30" IsLength="False"
|
Width="40" Height="30" IsLength="False"
|
||||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||||
<EgtWPFLib:EgtTextBox Name="Parameter2bTxBx"
|
<EgtWPFLib:EgtTextBox Name="Parameter2bTxBx"
|
||||||
Grid.Column="3" Grid.Row="12"
|
Grid.Column="3" Grid.Row="12"
|
||||||
Width="40" Height="30"
|
Width="40" Height="30"
|
||||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||||
</UniformGrid>
|
</UniformGrid>
|
||||||
|
|
||||||
|
|
||||||
<TextBlock Name="Parameter3TxBl" Grid.Row="2" Grid.ColumnSpan="2"
|
<TextBlock Name="Parameter3TxBl" Grid.Row="2" Grid.ColumnSpan="2"
|
||||||
Text="Affondamento"
|
Text="Affondamento"
|
||||||
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
|
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
|
||||||
FontSize="{DynamicResource FontSize_LowerCaseCharacter}"/>
|
FontSize="{DynamicResource FontSize_LowerCaseCharacter}"/>
|
||||||
<EgtWPFLib:EgtTextBox Name="Parameter3TxBx"
|
<EgtWPFLib:EgtTextBox Name="Parameter3TxBx"
|
||||||
Grid.Column="2" Grid.ColumnSpan="2" Grid.Row="2"
|
Grid.Column="2" Grid.ColumnSpan="2" Grid.Row="2"
|
||||||
Margin="0,0,0,-2"
|
Margin="0,0,0,-2"
|
||||||
Width="85" Height="30"
|
Width="85" Height="30"
|
||||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||||
|
|
||||||
<TextBlock Name="Parameter4TxBl" Grid.Row="3" Grid.ColumnSpan="2"
|
<TextBlock Name="Parameter4TxBl" Grid.Row="3" Grid.ColumnSpan="2"
|
||||||
Text="Accorciamento"
|
Text="Accorciamento"
|
||||||
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
|
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
|
||||||
FontSize="{DynamicResource FontSize_LowerCaseCharacter}"/>
|
FontSize="{DynamicResource FontSize_LowerCaseCharacter}"/>
|
||||||
<EgtWPFLib:EgtTextBox Name="Parameter4TxBx"
|
<EgtWPFLib:EgtTextBox Name="Parameter4TxBx"
|
||||||
Grid.Column="2" Grid.ColumnSpan="2" Grid.Row="3"
|
Grid.Column="2" Grid.ColumnSpan="2" Grid.Row="3"
|
||||||
Margin="0,0,0,-2"
|
Margin="0,0,0,-2"
|
||||||
Width="85" Height="30"
|
Width="85" Height="30"
|
||||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||||
<TextBlock Name="Parameter5TxBl" Grid.Row="4" Grid.ColumnSpan="2"
|
<TextBlock Name="Parameter5TxBl" Grid.Row="4" Grid.ColumnSpan="2"
|
||||||
Text="Angolo"
|
Text="Angolo"
|
||||||
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
|
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
|
||||||
FontSize="{DynamicResource FontSize_LowerCaseCharacter}"/>
|
FontSize="{DynamicResource FontSize_LowerCaseCharacter}"/>
|
||||||
<EgtWPFLib:EgtTextBox Name="Parameter5TxBx"
|
<EgtWPFLib:EgtTextBox Name="Parameter5TxBx"
|
||||||
Grid.Column="2" Grid.ColumnSpan="2" Grid.Row="4"
|
Grid.Column="2" Grid.ColumnSpan="2" Grid.Row="4"
|
||||||
Margin="0,0,0,-2"
|
Margin="0,0,0,-2"
|
||||||
Width="85" Height="30" IsLength="False"
|
Width="85" Height="30" IsLength="False"
|
||||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
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}"
|
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
|
||||||
FontSize="{DynamicResource FontSize_LowerCaseCharacter}"/>
|
FontSize="{DynamicResource FontSize_LowerCaseCharacter}"/>
|
||||||
<EgtWPFLib:EgtTextBox Name="Parameter1TxBx" Grid.Column="1" Grid.ColumnSpan="3" Grid.Row="11" Width="90"
|
<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
|
' Imposto messaggi a fondo pagina
|
||||||
If m_Mode <> ModeOpt.SIDEANGLE Then
|
If m_Mode <> ModeOpt.SIDEANGLE Then
|
||||||
Parameter1TxBl.Text = EgtMsg(MSG_IMPORTPAGEUC + 10) ' Offset
|
Parameter1TxBl.Text = EgtMsg(90460) ' Offset
|
||||||
Parameter2TxBl.Text = EgtMsg(MSG_IMPORTPAGEUC + 16) ' Offset2
|
Parameter2TxBl.Text = EgtMsg(90466) ' Offset2
|
||||||
Parameter3TxBl.Text = EgtMsg(MSG_IMPORTPAGEUC + 11) ' Affondamento
|
Parameter3TxBl.Text = EgtMsg(90461) ' Affondamento
|
||||||
Parameter4TxBl.Text = EgtMsg(MSG_IMPORTPAGEUC + 12) ' Accorciamento
|
Parameter4TxBl.Text = EgtMsg(90462) ' Accorciamento
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If m_CallingPage = MainWindow.Pages.Draw Then
|
If m_CallingPage = MainWindow.Pages.Draw Then
|
||||||
@@ -145,7 +145,7 @@ Public Class SideAngleUC
|
|||||||
' Accorciamento
|
' Accorciamento
|
||||||
If m_Mode = ModeOpt.ENGRAVE Then
|
If m_Mode = ModeOpt.ENGRAVE Then
|
||||||
' modifico il nome del messaggio
|
' modifico il nome del messaggio
|
||||||
Parameter4TxBl.Text = EgtMsg(MSG_IMPORTPAGEUC + 11) & "2" ' Affondamento2
|
Parameter4TxBl.Text = EgtMsg(90461) & "2" ' Affondamento2
|
||||||
Parameter4TxBl.Visibility = Windows.Visibility.Visible
|
Parameter4TxBl.Visibility = Windows.Visibility.Visible
|
||||||
Parameter4TxBx.Visibility = Windows.Visibility.Visible
|
Parameter4TxBx.Visibility = Windows.Visibility.Visible
|
||||||
Else
|
Else
|
||||||
@@ -156,7 +156,7 @@ Public Class SideAngleUC
|
|||||||
' Angolo
|
' Angolo
|
||||||
If m_Mode = ModeOpt.ENGRAVE Then
|
If m_Mode = ModeOpt.ENGRAVE Then
|
||||||
' modifico il nome del messaggio
|
' modifico il nome del messaggio
|
||||||
Parameter5TxBl.Text = EgtMsg(MSG_IMPORTPAGEUC + 9) ' Angolo
|
Parameter5TxBl.Text = EgtMsg(90459) ' Angolo
|
||||||
Parameter5TxBl.Visibility = Windows.Visibility.Visible
|
Parameter5TxBl.Visibility = Windows.Visibility.Visible
|
||||||
Parameter5TxBx.Visibility = Windows.Visibility.Visible
|
Parameter5TxBx.Visibility = Windows.Visibility.Visible
|
||||||
Else
|
Else
|
||||||
@@ -167,29 +167,64 @@ Public Class SideAngleUC
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
' Gestisco Checkbox e nomi in base al numero di lati inclinabili
|
' 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
|
' Aggiorno valori
|
||||||
If m_Mode = ModeOpt.DRIP Then
|
If m_Mode = ModeOpt.DRIP Then
|
||||||
m_dDripOffset = GetPrivateProfileDouble( S_SIDES, K_DRIPOFFSET, 20, m_MainWindow.GetIniFile())
|
m_dDripOffset = GetPrivateProfileDouble(S_SIDES, K_DRIPOFFSET, 20, m_MainWindow.GetIniFile())
|
||||||
m_dDripOffset2 = GetPrivateProfileDouble( S_SIDES, K_DRIPOFFSET2, 0, 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_dDripDepth = GetPrivateProfileDouble(S_SIDES, K_DRIPDEPTH, 10, m_MainWindow.GetIniFile())
|
||||||
m_dDripShort = GetPrivateProfileDouble( S_SIDES, K_DRIPSHORT, 0, m_MainWindow.GetIniFile())
|
m_dDripShort = GetPrivateProfileDouble(S_SIDES, K_DRIPSHORT, 0, m_MainWindow.GetIniFile())
|
||||||
Parameter1TxBx.Text = LenToString( m_dDripOffset, 3)
|
Parameter1TxBx.Text = LenToString(m_dDripOffset, 3)
|
||||||
Parameter2TxBx.Text = LenToString( m_dDripOffset2, 3)
|
Parameter2TxBx.Text = LenToString(m_dDripOffset2, 3)
|
||||||
Parameter3TxBx.Text = LenToString( m_dDripDepth, 3)
|
Parameter3TxBx.Text = LenToString(m_dDripDepth, 3)
|
||||||
Parameter4TxBx.Text = LenToString( m_dDripShort, 3)
|
Parameter4TxBx.Text = LenToString(m_dDripShort, 3)
|
||||||
ElseIf m_Mode = ModeOpt.ENGRAVE Then
|
ElseIf m_Mode = ModeOpt.ENGRAVE Then
|
||||||
m_dDripOffset = GetPrivateProfileDouble( S_SIDES, K_ENGRAVEOFFSET, 20, 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_nEngrNbr2 = GetPrivateProfileInt(S_SIDES, K_ENGRAVENUMBER2, 1, m_MainWindow.GetIniFile())
|
||||||
m_dDripOffset2 = GetPrivateProfileDouble( S_SIDES, K_ENGRAVEOFFSET2, 0, 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_dDripDepth = GetPrivateProfileDouble(S_SIDES, K_ENGRAVEDEPTH, 10, m_MainWindow.GetIniFile())
|
||||||
m_dEngraveDepth2 = GetPrivateProfileDouble(S_SIDES, K_ENGRAVEDEPTH2, 0, 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())
|
m_dEngraveAngle = GetPrivateProfileDouble(S_SIDES, K_ENGRAVEANGLE, 0, m_MainWindow.GetIniFile())
|
||||||
Parameter1TxBx.Text = LenToString(m_dDripOffset, 3)
|
Parameter1TxBx.Text = LenToString(m_dDripOffset, 3)
|
||||||
Parameter2aTxBx.Text = m_nEngrNbr2.ToString()
|
Parameter2aTxBx.Text = m_nEngrNbr2.ToString()
|
||||||
Parameter2bTxBx.Text = LenToString( m_dDripOffset2, 3)
|
Parameter2bTxBx.Text = LenToString(m_dDripOffset2, 3)
|
||||||
Parameter3TxBx.Text = LenToString( m_dDripDepth, 3)
|
Parameter3TxBx.Text = LenToString(m_dDripDepth, 3)
|
||||||
Parameter4TxBx.Text = LenToString(m_dEngraveDepth2, 3)
|
Parameter4TxBx.Text = LenToString(m_dEngraveDepth2, 3)
|
||||||
Parameter5TxBx.Text = DoubleToString(m_dEngraveAngle, 3)
|
Parameter5TxBx.Text = DoubleToString(m_dEngraveAngle, 3)
|
||||||
End If
|
End If
|
||||||
@@ -288,10 +323,10 @@ Public Class SideAngleUC
|
|||||||
If LoopId <> GDB_ID.NULL Then
|
If LoopId <> GDB_ID.NULL Then
|
||||||
If m_nCount = 0 Then
|
If m_nCount = 0 Then
|
||||||
If m_CallingPage = MainWindow.Pages.Draw 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")
|
m_MainWindow.m_DrawPageUC.MessageBrd.Background = Application.Current.FindResource("OmagCut_Yellow")
|
||||||
Else
|
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")
|
m_MainWindow.m_ImportPageUC.MessageBrd.Background = Application.Current.FindResource("OmagCut_Yellow")
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
@@ -311,8 +346,14 @@ Public Class SideAngleUC
|
|||||||
' Attualmente il vaore m_nCount è inizializzato ad "1"..
|
' Attualmente il vaore m_nCount è inizializzato ad "1"..
|
||||||
' Bottoni Prev Next
|
' Bottoni Prev Next
|
||||||
If m_nCount <= MAX_LINES Then
|
If m_nCount <= MAX_LINES Then
|
||||||
PrevBtn.Visibility= Windows.Visibility.Hidden
|
PrevBtn.Visibility = Windows.Visibility.Hidden
|
||||||
NextBtn.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
|
Else
|
||||||
Grid.SetRow(PrevBtn, MAX_LINES - m_nShow)
|
Grid.SetRow(PrevBtn, MAX_LINES - m_nShow)
|
||||||
PrevBtn.Visibility = Windows.Visibility.Visible
|
PrevBtn.Visibility = Windows.Visibility.Visible
|
||||||
@@ -320,6 +361,8 @@ Public Class SideAngleUC
|
|||||||
Grid.SetRow(NextBtn, MAX_LINES - m_nShow)
|
Grid.SetRow(NextBtn, MAX_LINES - m_nShow)
|
||||||
NextBtn.Visibility = Windows.Visibility.Visible
|
NextBtn.Visibility = Windows.Visibility.Visible
|
||||||
NextBtn.IsEnabled = (m_nCount > m_nCurrPage * MAX_LINES)
|
NextBtn.IsEnabled = (m_nCount > m_nCurrPage * MAX_LINES)
|
||||||
|
Grid.SetRow(SideAngleGrid, MAX_LINES - m_nShow)
|
||||||
|
SideAngleChBx.Visibility = Windows.Visibility.Visible
|
||||||
End If
|
End If
|
||||||
|
|
||||||
' Intestazione per angoli di lato
|
' Intestazione per angoli di lato
|
||||||
@@ -335,6 +378,8 @@ Public Class SideAngleUC
|
|||||||
Grid.SetRow(HeelBl, MAX_LINES - m_nShow)
|
Grid.SetRow(HeelBl, MAX_LINES - m_nShow)
|
||||||
HeelBl.Text = EgtMsg(91654) ' T
|
HeelBl.Text = EgtMsg(91654) ' T
|
||||||
HeelBl.Visibility = Windows.Visibility.Visible
|
HeelBl.Visibility = Windows.Visibility.Visible
|
||||||
|
Grid.SetRow(SideAngleGrid, MAX_LINES - m_nShow)
|
||||||
|
SideAngleChBx.Visibility = Windows.Visibility.Visible
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
If m_nCount = 0 Then
|
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())
|
GetHeelTxBxFromIndex(Index).Text = GetPrivateProfileDouble(S_SIDES, K_DRIPSHORT & "A" & nI.ToString & "_End", 0, m_MainWindow.GetIniFile())
|
||||||
End If
|
End If
|
||||||
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,
|
GetTxBlFromIndex(Index).Text = If(m_Mode = ModeOpt.SIDEANGLE,
|
||||||
m_SideAngleEntityList(TxBlIndex).sEntityName,
|
m_SideAngleEntityList(TxBlIndex).sEntityName,
|
||||||
m_DripEntityList(TxBlIndex).sEntityName)
|
m_DripEntityList(TxBlIndex).sEntityName)
|
||||||
@@ -391,6 +436,151 @@ Public Class SideAngleUC
|
|||||||
Next
|
Next
|
||||||
End Sub
|
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
|
'-------------> Restituisce gli oggetto della grafica assegnato l'indice
|
||||||
Private Function GetChBxFromIndex(Index As Integer) As CheckBox
|
Private Function GetChBxFromIndex(Index As Integer) As CheckBox
|
||||||
@@ -495,15 +685,15 @@ Public Class SideAngleUC
|
|||||||
'-------------> Restituisce gli oggetto della grafica assegnato l'indice
|
'-------------> Restituisce gli oggetto della grafica assegnato l'indice
|
||||||
|
|
||||||
' quando esco salvo nel file l'ultima configurazione per le incisioni
|
' 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
|
If m_CallingPage = MainWindow.Pages.Draw Then
|
||||||
' Ricavo nome pezzo
|
' 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
|
' Svuoto layer in cui sono presenti i testi con le inclinazioni dei lati
|
||||||
If m_Mode = ModeOpt.SIDEANGLE Then
|
If m_Mode = ModeOpt.SIDEANGLE Then
|
||||||
EgtEmptyGroup( EgtGetFirstNameInGroup( PartId, SIDE_ANGLE_LAYER))
|
EgtEmptyGroup(EgtGetFirstNameInGroup(PartId, SIDE_ANGLE_LAYER))
|
||||||
Else
|
Else
|
||||||
EgtEmptyGroup( EgtGetFirstNameInGroup( PartId, SIDE_ANGLE_LAYER))
|
EgtEmptyGroup(EgtGetFirstNameInGroup(PartId, SIDE_ANGLE_LAYER))
|
||||||
End If
|
End If
|
||||||
ElseIf m_CallingPage = MainWindow.Pages.Import Then
|
ElseIf m_CallingPage = MainWindow.Pages.Import Then
|
||||||
' Nessuna azione necessaria
|
' Nessuna azione necessaria
|
||||||
@@ -516,7 +706,7 @@ Public Class SideAngleUC
|
|||||||
'WritePrivateProfileString( S_SIDES, K_DRIPSHORT, DoubleToString( m_dDripShort, 3), m_MainWindow.GetIniFile())
|
'WritePrivateProfileString( S_SIDES, K_DRIPSHORT, DoubleToString( m_dDripShort, 3), m_MainWindow.GetIniFile())
|
||||||
ElseIf m_Mode = ModeOpt.ENGRAVE Then
|
ElseIf m_Mode = ModeOpt.ENGRAVE Then
|
||||||
WritePrivateProfileString(S_SIDES, K_ENGRAVEOFFSET, LenToString(m_dDripOffset, 3), m_MainWindow.GetIniFile())
|
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_ENGRAVEOFFSET2, LenToString(m_dDripOffset2, 3), m_MainWindow.GetIniFile())
|
||||||
WritePrivateProfileString(S_SIDES, K_ENGRAVEDEPTH, LenToString(m_dDripDepth, 3), m_MainWindow.GetIniFile())
|
WritePrivateProfileString(S_SIDES, K_ENGRAVEDEPTH, LenToString(m_dDripDepth, 3), m_MainWindow.GetIniFile())
|
||||||
WritePrivateProfileString(S_SIDES, K_ENGRAVEDEPTH2, LenToString(m_dEngraveDepth2, 3), m_MainWindow.GetIniFile())
|
WritePrivateProfileString(S_SIDES, K_ENGRAVEDEPTH2, LenToString(m_dEngraveDepth2, 3), m_MainWindow.GetIniFile())
|
||||||
@@ -527,7 +717,6 @@ Public Class SideAngleUC
|
|||||||
EgtDraw()
|
EgtDraw()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
' aggiunge il messaggio nel disegno, se DripGeom creo la geometria
|
' aggiunge il messaggio nel disegno, se DripGeom creo la geometria
|
||||||
Private Sub RefreshSideAngleText()
|
Private Sub RefreshSideAngleText()
|
||||||
Dim PartId As Integer = GDB_ID.NULL
|
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)
|
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
|
' Recupero nome layer con geometria di contorno (esterno o interno) del pezzo
|
||||||
LoopId = m_MainWindow.m_DrawPageUC.SelectedLayer
|
LoopId = m_MainWindow.m_DrawPageUC.SelectedLayer
|
||||||
ElseIf m_CallingPage = MainWindow.Pages.Import Then
|
ElseIf m_CallingPage = MainWindow.Pages.Import Then
|
||||||
' Imposto contesto corrente
|
' Imposto contesto corrente
|
||||||
EgtSetCurrentContext(m_MainWindow.m_ImportPageUC.ImportScene.GetCtx())
|
EgtSetCurrentContext(m_MainWindow.m_ImportPageUC.ImportScene.GetCtx())
|
||||||
' Recupero nome pezzo
|
' Recupero nome pezzo
|
||||||
@@ -600,7 +789,7 @@ Public Class SideAngleUC
|
|||||||
For nIndex As Integer = 1 To m_nCount
|
For nIndex As Integer = 1 To m_nCount
|
||||||
Dim Entity As DripEntity = m_DripEntityList(nIndex - 1)
|
Dim Entity As DripEntity = m_DripEntityList(nIndex - 1)
|
||||||
' Imposto check box (se sono stati definiti il numero corretto di CheckBox
|
' 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
|
Dim nChIndex As Integer = nIndex - (m_nCurrPage - 1) * MAX_LINES + MAX_LINES - m_nShow
|
||||||
' verifico se l'entità ha un gocciolatoio
|
' verifico se l'entità ha un gocciolatoio
|
||||||
GetChBxFromIndex(nChIndex).IsChecked = Entity.bHaveDrip
|
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
|
Private Sub PrevBtn_Click(sender As Object, e As RoutedEventArgs) Handles PrevBtn.Click
|
||||||
If m_nCurrPage = 1 Then Return
|
If m_nCurrPage = 1 Then Return
|
||||||
m_nCurrPage -= 1
|
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()
|
TxBlChBxView()
|
||||||
RefreshCheckAndValue()
|
RefreshCheckAndValue()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub NextBtn_Click(sender As Object, e As RoutedEventArgs) Handles NextBtn.Click
|
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_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()
|
TxBlChBxView()
|
||||||
RefreshCheckAndValue()
|
RefreshCheckAndValue()
|
||||||
End Sub
|
End Sub
|
||||||
@@ -993,7 +1182,7 @@ Public Class SideAngleUC
|
|||||||
Dim bVal As Boolean = CurrCheckBox.IsChecked()
|
Dim bVal As Boolean = CurrCheckBox.IsChecked()
|
||||||
Dim SideIndex As Integer = CInt(CurrCheckBox.Name.Substring(1))
|
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
|
' 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
|
Dim sCurrSide As String = m_DripEntityList(nCurrSide - 1).sEntityName
|
||||||
' aggiorno l'entità con i valori scritti nel campo di testo
|
' aggiorno l'entità con i valori scritti nel campo di testo
|
||||||
Dim CurrEntity As DripEntity = DripEntity.FindEntity(sCurrSide)
|
Dim CurrEntity As DripEntity = DripEntity.FindEntity(sCurrSide)
|
||||||
@@ -1179,6 +1368,19 @@ Public Class SideAngleUC
|
|||||||
End If
|
End If
|
||||||
End Sub
|
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)
|
Private Sub SetSideAngleFromTxBx(SideIndex As Integer, AngleTxBx As EgtWPFLib.EgtTextBox)
|
||||||
' Nuovo angolo di inclinazione
|
' Nuovo angolo di inclinazione
|
||||||
Dim dSideAngle As Double
|
Dim dSideAngle As Double
|
||||||
@@ -1192,7 +1394,7 @@ Public Class SideAngleUC
|
|||||||
AngleTxBx.Text = DoubleToString(dSideAngle, 2)
|
AngleTxBx.Text = DoubleToString(dSideAngle, 2)
|
||||||
End If
|
End If
|
||||||
' Converto nome checkbox in nome elemento tenendo conto della pagina e dello slittamento verso il basso
|
' 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
|
Dim sCurrSide As String = m_SideAngleEntityList(nCurrSide - 1).sEntityName
|
||||||
' Lo modifico nella geometria e nella lista inclinazioni
|
' Lo modifico nella geometria e nella lista inclinazioni
|
||||||
ModifySideAngle(sCurrSide, dSideAngle)
|
ModifySideAngle(sCurrSide, dSideAngle)
|
||||||
@@ -1262,7 +1464,7 @@ Public Class SideAngleUC
|
|||||||
HeelTxBx.Text = "0"
|
HeelTxBx.Text = "0"
|
||||||
End If
|
End If
|
||||||
' Converto nome checkbox in nome elemento tenendo conto della pagina e dello slittamento verso il basso
|
' 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
|
Dim sCurrSide As String = m_SideAngleEntityList(nCurrSide - 1).sEntityName
|
||||||
' Lo modifico nella geometria e nella lista inclinazioni
|
' Lo modifico nella geometria e nella lista inclinazioni
|
||||||
ModifySideHeel(sCurrSide, dSideHeel)
|
ModifySideHeel(sCurrSide, dSideHeel)
|
||||||
@@ -1303,10 +1505,15 @@ Public Class SideAngleUC
|
|||||||
If dSideAngle <> 0 Then
|
If dSideAngle <> 0 Then
|
||||||
EgtSetInfo(CurrEntity.nGeomId, INFO_SIDE_ANGLE, dSideAngle)
|
EgtSetInfo(CurrEntity.nGeomId, INFO_SIDE_ANGLE, dSideAngle)
|
||||||
EgtSetInfo(CurrEntity.nGeomId, INFO_ORIG_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
|
Else
|
||||||
EgtRemoveInfo(CurrEntity.nGeomId, INFO_SIDE_ANGLE)
|
EgtRemoveInfo(CurrEntity.nGeomId, INFO_SIDE_ANGLE)
|
||||||
EgtRemoveInfo(CurrEntity.nGeomId, INFO_ORIG_SIDE_ANGLE)
|
EgtRemoveInfo(CurrEntity.nGeomId, INFO_ORIG_SIDE_ANGLE)
|
||||||
|
EgtRemoveInfo(CurrEntity.nGeomId, DEF_MACHINING_TILTED)
|
||||||
End If
|
End If
|
||||||
' Aggiorno lista entità con nuova inclinazione
|
' Aggiorno lista entità con nuova inclinazione
|
||||||
CurrEntity.dSideAngle = dSideAngle
|
CurrEntity.dSideAngle = dSideAngle
|
||||||
@@ -1324,7 +1531,7 @@ Public Class SideAngleUC
|
|||||||
' Scrivo nuovo tallone nelle info
|
' Scrivo nuovo tallone nelle info
|
||||||
If dSideHeel > 10 * EPS_SMALL Then
|
If dSideHeel > 10 * EPS_SMALL Then
|
||||||
EgtSetInfo(CurrEntity.nGeomId, INFO_HEEL, dSideHeel)
|
EgtSetInfo(CurrEntity.nGeomId, INFO_HEEL, dSideHeel)
|
||||||
' Cancello inclinazione nell'apposito campo info
|
' Cancello inclinazione nell'apposito campo info
|
||||||
Else
|
Else
|
||||||
EgtRemoveInfo(CurrEntity.nGeomId, INFO_HEEL)
|
EgtRemoveInfo(CurrEntity.nGeomId, INFO_HEEL)
|
||||||
End If
|
End If
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
<UserControl x:Class="UnderDrillUC"
|
<UserControl x:Class="UnderDrillUC"
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
|
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
d:DesignHeight="597.1" d:DesignWidth="255.9">
|
d:DesignHeight="597.1" d:DesignWidth="255.9">
|
||||||
|
|
||||||
<!-- Definizione della Grid Laterale -->
|
<!-- Definizione della Grid Laterale -->
|
||||||
<Grid Name="VariablesCompoGrid" Grid.RowSpan="2">
|
<Grid Name="VariablesCompoGrid" Grid.RowSpan="2">
|
||||||
@@ -31,10 +31,10 @@
|
|||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
<TextBlock Name="Parameter2TxBl" Grid.Row="11" Text="Affondamento"
|
<TextBlock Name="Parameter2TxBl" Grid.Row="11" Text="Affondamento"
|
||||||
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
|
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
|
||||||
FontSize="{DynamicResource FontSize_LowerCaseCharacter}"/>
|
FontSize="{DynamicResource FontSize_LowerCaseCharacter}"/>
|
||||||
<EgtWPFLib:EgtTextBox Name="Parameter2TxBx" Grid.Column="1" Grid.Row="11" Width="90"
|
<EgtWPFLib:EgtTextBox Name="Parameter2TxBx" Grid.Column="1" Grid.Row="11" Width="90"
|
||||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ Public Class UnderDrillUC
|
|||||||
m_CallingPage = m_MainWindow.m_ActivePage
|
m_CallingPage = m_MainWindow.m_ActivePage
|
||||||
|
|
||||||
' Imposto messaggi
|
' Imposto messaggi
|
||||||
Parameter2TxBl.Text = EgtMsg(MSG_IMPORTPAGEUC + 11) ' Affondamento
|
Parameter2TxBl.Text = EgtMsg(90461) ' Affondamento
|
||||||
|
|
||||||
' Imposto contesto corrente
|
' Imposto contesto corrente
|
||||||
EgtSetCurrentContext(m_MainWindow.m_ImportPageUC.ImportScene.GetCtx())
|
EgtSetCurrentContext(m_MainWindow.m_ImportPageUC.ImportScene.GetCtx())
|
||||||
|
|||||||
+136
-137
@@ -7,41 +7,41 @@
|
|||||||
xmlns:EgtFloating="clr-namespace:EgtWPFLib5.EgtFloating;assembly=EgtWPFLib5"
|
xmlns:EgtFloating="clr-namespace:EgtWPFLib5.EgtFloating;assembly=EgtWPFLib5"
|
||||||
xmlns:ControlExtensions="clr-namespace:OmagCUT.ControlExtensions">
|
xmlns:ControlExtensions="clr-namespace:OmagCUT.ControlExtensions">
|
||||||
|
|
||||||
<EgtWPFLib5:StatusBarVM x:Key="StatusBarVM"/>
|
<EgtWPFLib5:StatusBarVM x:Key="StatusBarVM"/>
|
||||||
<EgtWPFLib5:ShowPanelVM x:Key="ShowPanelVM"/>
|
<EgtWPFLib5:ShowPanelVM x:Key="ShowPanelVM"/>
|
||||||
<EgtWPFLib5:ViewPanelVM x:Key="ViewPanelVM"/>
|
<EgtWPFLib5:ViewPanelVM x:Key="ViewPanelVM"/>
|
||||||
<EgtWPFLib5:InstrumentPanelVM x:Key="InstrumentPanelVM"/>
|
<EgtWPFLib5:InstrumentPanelVM x:Key="InstrumentPanelVM"/>
|
||||||
|
|
||||||
<EgtPHOTOLib:ProjectSlabVM x:Key="ProjectSlabVM"/>
|
<EgtPHOTOLib:ProjectSlabVM x:Key="ProjectSlabVM"/>
|
||||||
<EgtPHOTOLib:OptionPanelSlabVM x:Key="OptionPanelSlabVM"/>
|
<EgtPHOTOLib:OptionPanelSlabVM x:Key="OptionPanelSlabVM"/>
|
||||||
<EgtPHOTOLib:ListPageSlabVM x:Key="ListPageSlabVM"/>
|
<EgtPHOTOLib:ListPageSlabVM x:Key="ListPageSlabVM"/>
|
||||||
<EgtPHOTOLib:DetailPageSlabVM x:Key="DetailPageSlabVM"/>
|
<EgtPHOTOLib:DetailPageSlabVM x:Key="DetailPageSlabVM"/>
|
||||||
<EgtPHOTOLib:SearchPanelSlabVM x:Key="SearchPanelSlabVM"/>
|
<EgtPHOTOLib:SearchPanelSlabVM x:Key="SearchPanelSlabVM"/>
|
||||||
<EgtPHOTOLib:MyInstrumentPanelSlabVM x:Key="MyInstrumentPanelSlabVM"/>
|
<EgtPHOTOLib:MyInstrumentPanelSlabVM x:Key="MyInstrumentPanelSlabVM"/>
|
||||||
|
|
||||||
<!--Colori predefiniti-->
|
<!--Colori predefiniti-->
|
||||||
<SolidColorBrush x:Key="Omag_Blue" Color="#FF095CA8" />
|
<SolidColorBrush x:Key="Omag_Blue" Color="#FF095CA8" />
|
||||||
<SolidColorBrush x:Key="Omag_Yellow" Color="#FFFFCE5B" />
|
<SolidColorBrush x:Key="Omag_Yellow" Color="#FFFFCE5B" />
|
||||||
<SolidColorBrush x:Key="Omag_Red" Color="Red" />
|
<SolidColorBrush x:Key="Omag_Red" Color="Red" />
|
||||||
<SolidColorBrush x:Key="Omag_Green" Color="LawnGreen" />
|
<SolidColorBrush x:Key="Omag_Green" Color="LawnGreen" />
|
||||||
<SolidColorBrush x:Key="Omag_VeryLightGray" Color="#FFF2F2F2" />
|
<SolidColorBrush x:Key="Omag_VeryLightGray" Color="#FFF2F2F2" />
|
||||||
<SolidColorBrush x:Key="Omag_LightGray" Color="LightGray" />
|
<SolidColorBrush x:Key="Omag_LightGray" Color="LightGray" />
|
||||||
<SolidColorBrush x:Key="Omag_Gray" Color="#FF9E9E9E" />
|
<SolidColorBrush x:Key="Omag_Gray" Color="#FF9E9E9E" />
|
||||||
<SolidColorBrush x:Key="Omag_DarkGray" Color="#FF444444" />
|
<SolidColorBrush x:Key="Omag_DarkGray" Color="#FF444444" />
|
||||||
<SolidColorBrush x:Key="Omag_White" Color="#FFFFFFFF" />
|
<SolidColorBrush x:Key="Omag_White" Color="#FFFFFFFF" />
|
||||||
<SolidColorBrush x:Key="Omag_Black" Color="#FF000000" />
|
<SolidColorBrush x:Key="Omag_Black" Color="#FF000000" />
|
||||||
|
|
||||||
<SolidColorBrush x:Key="EgaltechBlue1" Color="#FF095CA8" />
|
<SolidColorBrush x:Key="EgaltechBlue1" Color="#FF095CA8" />
|
||||||
<SolidColorBrush x:Key="EgaltechWhite" Color="#FFFFFFFF" />
|
<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">
|
<DataTemplate x:Key="Button_DataTemplate_Wrap">
|
||||||
<TextBlock TextWrapping="Wrap" Text="{Binding}"/>
|
<TextBlock TextWrapping="Wrap" Text="{Binding}"/>
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
|
|
||||||
<!-- ______________________________________________________________________________________________________________________________________________ -->
|
<!-- ______________________________________________________________________________________________________________________________________________ -->
|
||||||
|
|
||||||
<!-- Button Style -->
|
<!-- Button Style -->
|
||||||
|
|
||||||
<Style TargetType="{x:Type Button}">
|
<Style TargetType="{x:Type Button}">
|
||||||
<Setter Property="FocusVisualStyle">
|
<Setter Property="FocusVisualStyle">
|
||||||
@@ -69,10 +69,10 @@
|
|||||||
<Setter.Value>
|
<Setter.Value>
|
||||||
<ControlTemplate TargetType="{x:Type Button}" >
|
<ControlTemplate TargetType="{x:Type Button}" >
|
||||||
<Border x:Name="border" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(Project:ButtonExtensions.CornerRadius)}"
|
<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"
|
<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}"
|
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
|
||||||
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
|
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
|
||||||
</Border>
|
</Border>
|
||||||
<ControlTemplate.Triggers>
|
<ControlTemplate.Triggers>
|
||||||
<Trigger Property="IsDefaulted" Value="True">
|
<Trigger Property="IsDefaulted" Value="True">
|
||||||
@@ -103,44 +103,44 @@
|
|||||||
</Setter>
|
</Setter>
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<!--Template che permette di andare a capo-->
|
<!--Template che permette di andare a capo-->
|
||||||
<DataTemplate x:Key="WrapButton_DataTemplate">
|
<DataTemplate x:Key="WrapButton_DataTemplate">
|
||||||
<TextBlock TextWrapping="WrapWithOverflow" Text="{Binding}"/>
|
<TextBlock TextWrapping="WrapWithOverflow" Text="{Binding}"/>
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
|
|
||||||
<Style x:Key="ToolBar_Button" TargetType="{x:Type Button}" BasedOn="{StaticResource {x:Type Button}}">
|
<Style x:Key="ToolBar_Button" TargetType="{x:Type Button}" BasedOn="{StaticResource {x:Type Button}}">
|
||||||
<Setter Property="Height" Value="30"/>
|
<Setter Property="Height" Value="30"/>
|
||||||
<Setter Property="Width" Value="30"/>
|
<Setter Property="Width" Value="30"/>
|
||||||
</Style>
|
</Style>
|
||||||
<Style x:Key="ToolBar_TextButton" TargetType="{x:Type Button}" BasedOn="{StaticResource {x:Type Button}}">
|
<Style x:Key="ToolBar_TextButton" TargetType="{x:Type Button}" BasedOn="{StaticResource {x:Type Button}}">
|
||||||
<Setter Property="Height" Value="30"/>
|
<Setter Property="Height" Value="30"/>
|
||||||
<Setter Property="Width" Value="80"/>
|
<Setter Property="Width" Value="80"/>
|
||||||
</Style>
|
</Style>
|
||||||
<Style x:Key="OptionPanel_Button" TargetType="{x:Type Button}" BasedOn="{StaticResource {x:Type Button}}">
|
<Style x:Key="OptionPanel_Button" TargetType="{x:Type Button}" BasedOn="{StaticResource {x:Type Button}}">
|
||||||
<Setter Property="Height" Value="60"/>
|
<Setter Property="Height" Value="60"/>
|
||||||
<Setter Property="Width" Value="60"/>
|
<Setter Property="Width" Value="60"/>
|
||||||
</Style>
|
</Style>
|
||||||
<Style x:Key="OptionPanel_TextButton" TargetType="{x:Type Button}" BasedOn="{StaticResource {x:Type Button}}">
|
<Style x:Key="OptionPanel_TextButton" TargetType="{x:Type Button}" BasedOn="{StaticResource {x:Type Button}}">
|
||||||
<Setter Property="Height" Value="30"/>
|
<Setter Property="Height" Value="30"/>
|
||||||
</Style>
|
</Style>
|
||||||
<Style x:Key="OptionPanel_TextWrapButton" TargetType="{x:Type Button}" BasedOn="{StaticResource {x:Type Button}}">
|
<Style x:Key="OptionPanel_TextWrapButton" TargetType="{x:Type Button}" BasedOn="{StaticResource {x:Type Button}}">
|
||||||
<Setter Property="ContentTemplate" Value="{StaticResource WrapButton_DataTemplate}" />
|
<Setter Property="ContentTemplate" Value="{StaticResource WrapButton_DataTemplate}" />
|
||||||
<Setter Property="TextBlock.TextAlignment" Value="Center"/>
|
<Setter Property="TextBlock.TextAlignment" Value="Center"/>
|
||||||
<Setter Property="Height" Value="45"/>
|
<Setter Property="Height" Value="45"/>
|
||||||
</Style>
|
</Style>
|
||||||
<Style x:Key="OptionPanel_NestingButton" TargetType="{x:Type Button}" BasedOn="{StaticResource {x:Type Button}}">
|
<Style x:Key="OptionPanel_NestingButton" TargetType="{x:Type Button}" BasedOn="{StaticResource {x:Type Button}}">
|
||||||
<Setter Property="Height" Value="60"/>
|
<Setter Property="Height" Value="60"/>
|
||||||
<Setter Property="Width" Value="60"/>
|
<Setter Property="Width" Value="60"/>
|
||||||
</Style>
|
</Style>
|
||||||
<Style x:Key="CompoWindow_Button" TargetType="{x:Type Button}" BasedOn="{StaticResource {x:Type Button}}">
|
<Style x:Key="CompoWindow_Button" TargetType="{x:Type Button}" BasedOn="{StaticResource {x:Type Button}}">
|
||||||
<Setter Property="Height" Value="40"/>
|
<Setter Property="Height" Value="40"/>
|
||||||
</Style>
|
</Style>
|
||||||
<Style x:Key="EgtWPFLib5_InputButton" TargetType="{x:Type Button}" BasedOn="{StaticResource {x:Type Button}}">
|
<Style x:Key="EgtWPFLib5_InputButton" TargetType="{x:Type Button}" BasedOn="{StaticResource {x:Type Button}}">
|
||||||
<Setter Property="Height" Value="30"/>
|
<Setter Property="Height" Value="30"/>
|
||||||
<Setter Property="Width" Value="60"/>
|
<Setter Property="Width" Value="60"/>
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<!-- ______________________________________________________________________________________________________________________ -->
|
<!-- ______________________________________________________________________________________________________________________ -->
|
||||||
|
|
||||||
<!--Template che permette di andare a capo-->
|
<!--Template che permette di andare a capo-->
|
||||||
<DataTemplate x:Key="CheckBox_DataTemplate_Wrap">
|
<DataTemplate x:Key="CheckBox_DataTemplate_Wrap">
|
||||||
@@ -178,10 +178,10 @@
|
|||||||
<ColumnDefinition Width="*"/>
|
<ColumnDefinition Width="*"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<Border x:Name="checkBoxBorder" Height="{Binding Path=ActualHeight, ElementName=templateRoot}" Width="{Binding Path=ActualHeight, ElementName=templateRoot}" BorderBrush="{TemplateBinding BorderBrush}"
|
<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">
|
<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"
|
<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>
|
<Path.RenderTransform>
|
||||||
<TransformGroup>
|
<TransformGroup>
|
||||||
<ScaleTransform>
|
<ScaleTransform>
|
||||||
@@ -194,7 +194,6 @@
|
|||||||
<ScaleTransform.ScaleY>
|
<ScaleTransform.ScaleY>
|
||||||
<MultiBinding Converter="{StaticResource converter}">
|
<MultiBinding Converter="{StaticResource converter}">
|
||||||
<Binding ElementName="templateRoot" Path="ActualHeight"/>
|
<Binding ElementName="templateRoot" Path="ActualHeight"/>
|
||||||
|
|
||||||
<Binding ElementName="optionMark" Path="ActualHeight"/>
|
<Binding ElementName="optionMark" Path="ActualHeight"/>
|
||||||
</MultiBinding>
|
</MultiBinding>
|
||||||
</ScaleTransform.ScaleY>
|
</ScaleTransform.ScaleY>
|
||||||
@@ -206,7 +205,7 @@
|
|||||||
</Grid>
|
</Grid>
|
||||||
</Border>
|
</Border>
|
||||||
<ContentPresenter x:Name="contentPresenter" ContentTemplate="{TemplateBinding ContentTemplate}" Content="{TemplateBinding Content}" Grid.Column="1" ContentStringFormat="{TemplateBinding ContentStringFormat}" Focusable="False"
|
<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>
|
</Grid>
|
||||||
<ControlTemplate.Triggers>
|
<ControlTemplate.Triggers>
|
||||||
<Trigger Property="HasContent" Value="True">
|
<Trigger Property="HasContent" Value="True">
|
||||||
@@ -412,7 +411,7 @@
|
|||||||
<Setter.Value>
|
<Setter.Value>
|
||||||
<ControlTemplate TargetType="{x:Type ButtonBase}">
|
<ControlTemplate TargetType="{x:Type ButtonBase}">
|
||||||
<Border x:Name="border" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=(ControlExtensions:ToggleButtonExtensions.CornerRadius)}"
|
<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}"/>
|
<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>
|
</Border>
|
||||||
<ControlTemplate.Triggers>
|
<ControlTemplate.Triggers>
|
||||||
@@ -428,7 +427,7 @@
|
|||||||
<Setter Property="Background" TargetName="border" Value="#FFC4E5F6"/>
|
<Setter Property="Background" TargetName="border" Value="#FFC4E5F6"/>
|
||||||
<Setter Property="BorderBrush" TargetName="border" Value="#FF2C628B"/>
|
<Setter Property="BorderBrush" TargetName="border" Value="#FF2C628B"/>
|
||||||
</Trigger>-->
|
</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">
|
<!--<Trigger Property="ToggleButton.IsChecked" Value="True">
|
||||||
<Setter Property="Background" TargetName="border" Value="#FFBCDDEE"/>
|
<Setter Property="Background" TargetName="border" Value="#FFBCDDEE"/>
|
||||||
<Setter Property="BorderBrush" TargetName="border" Value="#FF245A83"/>
|
<Setter Property="BorderBrush" TargetName="border" Value="#FF245A83"/>
|
||||||
@@ -444,59 +443,59 @@
|
|||||||
</Setter>
|
</Setter>
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<Style x:Key="ToolBar_ToggleButton" TargetType="{x:Type ToggleButton}" BasedOn="{StaticResource {x:Type ToggleButton}}">
|
<Style x:Key="ToolBar_ToggleButton" TargetType="{x:Type ToggleButton}" BasedOn="{StaticResource {x:Type ToggleButton}}">
|
||||||
<Setter Property="Height" Value="30"/>
|
<Setter Property="Height" Value="30"/>
|
||||||
<Setter Property="Width" Value="30"/>
|
<Setter Property="Width" Value="30"/>
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<Style x:Key="ToolBar_TextToggleButton" TargetType="{x:Type ToggleButton}" BasedOn="{StaticResource {x:Type ToggleButton}}">
|
<Style x:Key="ToolBar_TextToggleButton" TargetType="{x:Type ToggleButton}" BasedOn="{StaticResource {x:Type ToggleButton}}">
|
||||||
<Setter Property="Height" Value="30"/>
|
<Setter Property="Height" Value="30"/>
|
||||||
<Setter Property="Width" Value="70"/>
|
<Setter Property="Width" Value="70"/>
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<Style x:Key="OptionPanel_ToggleButton" TargetType="{x:Type ToggleButton}" BasedOn="{StaticResource {x:Type ToggleButton}}">
|
<Style x:Key="OptionPanel_ToggleButton" TargetType="{x:Type ToggleButton}" BasedOn="{StaticResource {x:Type ToggleButton}}">
|
||||||
<Setter Property="Height" Value="30"/>
|
<Setter Property="Height" Value="30"/>
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<Style x:Key="OptionPanel_NestingToggleButton" TargetType="{x:Type ToggleButton}" BasedOn="{StaticResource {x:Type ToggleButton}}">
|
<Style x:Key="OptionPanel_NestingToggleButton" TargetType="{x:Type ToggleButton}" BasedOn="{StaticResource {x:Type ToggleButton}}">
|
||||||
<Setter Property="Height" Value="60"/>
|
<Setter Property="Height" Value="60"/>
|
||||||
<Setter Property="Width" Value="60"/>
|
<Setter Property="Width" Value="60"/>
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<Style x:Key="CompoWindow_ToggleButton" TargetType="{x:Type ToggleButton}" BasedOn="{StaticResource {x:Type ToggleButton}}">
|
<Style x:Key="CompoWindow_ToggleButton" TargetType="{x:Type ToggleButton}" BasedOn="{StaticResource {x:Type ToggleButton}}">
|
||||||
<Setter Property="Height" Value="40"/>
|
<Setter Property="Height" Value="40"/>
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<Style x:Key="CompoWindow_WrapToggleButton" TargetType="{x:Type ToggleButton}" BasedOn="{StaticResource {x:Type ToggleButton}}">
|
<Style x:Key="CompoWindow_WrapToggleButton" TargetType="{x:Type ToggleButton}" BasedOn="{StaticResource {x:Type ToggleButton}}">
|
||||||
<Setter Property="ContentTemplate" Value="{StaticResource WrapButton_DataTemplate}" />
|
<Setter Property="ContentTemplate" Value="{StaticResource WrapButton_DataTemplate}" />
|
||||||
<Setter Property="TextBlock.TextAlignment" Value="Center" />
|
<Setter Property="TextBlock.TextAlignment" Value="Center" />
|
||||||
<Setter Property="Height" Value="40"/>
|
<Setter Property="Height" Value="40"/>
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<Style x:Key="Option_ColorButton" TargetType="{x:Type Button}" BasedOn="{StaticResource {x:Type Button}}">
|
<Style x:Key="Option_ColorButton" TargetType="{x:Type Button}" BasedOn="{StaticResource {x:Type Button}}">
|
||||||
<Setter Property="Padding" Value="5"/>
|
<Setter Property="Padding" Value="5"/>
|
||||||
<Setter Property="HorizontalContentAlignment" Value="Center"/>
|
<Setter Property="HorizontalContentAlignment" Value="Center"/>
|
||||||
<Setter Property="VerticalContentAlignment" Value="Center"/>
|
<Setter Property="VerticalContentAlignment" Value="Center"/>
|
||||||
<Setter Property="TextBlock.TextAlignment" Value="Center"/>
|
<Setter Property="TextBlock.TextAlignment" Value="Center"/>
|
||||||
<Style.Triggers>
|
<Style.Triggers>
|
||||||
<Trigger Property="IsMouseOver" Value="True">
|
<Trigger Property="IsMouseOver" Value="True">
|
||||||
<Setter Property="Background" Value="#FFB8C3CD"/>
|
<Setter Property="Background" Value="#FFB8C3CD"/>
|
||||||
</Trigger>
|
</Trigger>
|
||||||
<Trigger Property="IsPressed" Value="True">
|
<Trigger Property="IsPressed" Value="True">
|
||||||
<Setter Property="OpacityMask" Value="#33FF0000"/>
|
<Setter Property="OpacityMask" Value="#33FF0000"/>
|
||||||
</Trigger>
|
</Trigger>
|
||||||
<Trigger Property="ToggleButton.IsChecked" Value="True">
|
<Trigger Property="ToggleButton.IsChecked" Value="True">
|
||||||
<Setter Property="Background" Value="Transparent"/>
|
<Setter Property="Background" Value="Transparent"/>
|
||||||
</Trigger>
|
</Trigger>
|
||||||
<Trigger Property="IsEnabled" Value="False">
|
<Trigger Property="IsEnabled" Value="False">
|
||||||
<Setter Property="Background" Value="#FFF4F4F4"/>
|
<Setter Property="Background" Value="#FFF4F4F4"/>
|
||||||
<Setter Property="BorderBrush" Value="#FFADB2B5"/>
|
<Setter Property="BorderBrush" Value="#FFADB2B5"/>
|
||||||
<Setter Property="TextElement.Foreground" Value="#FF838383"/>
|
<Setter Property="TextElement.Foreground" Value="#FF838383"/>
|
||||||
</Trigger>
|
</Trigger>
|
||||||
</Style.Triggers>
|
</Style.Triggers>
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<!-- ______________________________________________________________________________________________________________________ -->
|
<!-- ______________________________________________________________________________________________________________________ -->
|
||||||
|
|
||||||
<!--TreeViewBase-->
|
<!--TreeViewBase-->
|
||||||
<!--Style e colori della freccia di espansione, necessari per modificare il ContainerItemStyle perchè contiene riferimenti ad essi-->
|
<!--Style e colori della freccia di espansione, necessari per modificare il ContainerItemStyle perchè contiene riferimenti ad essi-->
|
||||||
@@ -552,32 +551,32 @@
|
|||||||
</Setter>
|
</Setter>
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<!-- ______________________________________________________________________________________________________________________________________________ -->
|
<!-- ______________________________________________________________________________________________________________________________________________ -->
|
||||||
|
|
||||||
<!-- EgtCustomWindow -->
|
<!-- EgtCustomWindow -->
|
||||||
|
|
||||||
<Style TargetType="{x:Type EgtWPFLib5:EgtCustomWindow}" BasedOn="{StaticResource {x:Type EgtWPFLib5:EgtCustomWindow}}">
|
<Style TargetType="{x:Type EgtWPFLib5:EgtCustomWindow}" BasedOn="{StaticResource {x:Type EgtWPFLib5:EgtCustomWindow}}">
|
||||||
<Setter Property="TitleBarHeight" Value="32"/>
|
<Setter Property="TitleBarHeight" Value="32"/>
|
||||||
<Setter Property="TitleBarBrush" Value="{StaticResource Omag_LightGray}"/>
|
<Setter Property="TitleBarBrush" Value="{StaticResource Omag_LightGray}"/>
|
||||||
<Setter Property="BorderBrush" Value="{StaticResource Omag_Gray}"/>
|
<Setter Property="BorderBrush" Value="{StaticResource Omag_Gray}"/>
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<!-- ______________________________________________________________________________________________________________________________________________ -->
|
<!-- ______________________________________________________________________________________________________________________________________________ -->
|
||||||
|
|
||||||
<!-- EgtFloatingPanel -->
|
<!-- EgtFloatingPanel -->
|
||||||
|
|
||||||
<Style x:Key="ToolBar_EgtFloatingPanel" TargetType="{x:Type EgtFloating:EgtFloatingPanel}" BasedOn="{StaticResource {x:Type EgtFloating: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="Background" Value="{StaticResource Omag_Gray}"/>
|
||||||
<Setter Property="BorderBrush" Value="{StaticResource Omag_Gray}"/>
|
<Setter Property="BorderBrush" Value="{StaticResource Omag_Gray}"/>
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<Style x:Key="Option_EgtFloatingPanel" TargetType="{x:Type EgtFloating:EgtFloatingPanel}" BasedOn="{StaticResource {x:Type EgtFloating:EgtFloatingPanel}}">
|
<Style x:Key="Option_EgtFloatingPanel" TargetType="{x:Type EgtFloating:EgtFloatingPanel}" BasedOn="{StaticResource {x:Type EgtFloating:EgtFloatingPanel}}">
|
||||||
<Setter Property="IsToolBar" Value="False"/>
|
<Setter Property="IsToolBar" Value="False"/>
|
||||||
<Setter Property="TitleBarOrientation" Value="Vertical"/>
|
<Setter Property="TitleBarOrientation" Value="Vertical"/>
|
||||||
<Setter Property="Background" Value="{StaticResource Omag_Gray}"/>
|
<Setter Property="Background" Value="{StaticResource Omag_Gray}"/>
|
||||||
<Setter Property="BorderBrush" Value="{StaticResource Omag_Gray}"/>
|
<Setter Property="BorderBrush" Value="{StaticResource Omag_Gray}"/>
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<!-- ______________________________________________________________________________________________________________________ -->
|
<!-- ______________________________________________________________________________________________________________________ -->
|
||||||
|
|
||||||
</ResourceDictionary>
|
</ResourceDictionary>
|
||||||
|
|||||||
+111
-80
@@ -1,11 +1,11 @@
|
|||||||
<UserControl x:Class="FrameCutPageUC"
|
<UserControl x:Class="FrameCutPageUC"
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
|
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
d:DesignHeight="853.3" d:DesignWidth="1280">
|
d:DesignHeight="853.3" d:DesignWidth="1280">
|
||||||
|
|
||||||
<!-- Definizione della FrameCutPage -->
|
<!-- Definizione della FrameCutPage -->
|
||||||
<Grid Name="FrameCutPageGrid" >
|
<Grid Name="FrameCutPageGrid" >
|
||||||
@@ -18,7 +18,7 @@
|
|||||||
<RowDefinition Height="8*"/>
|
<RowDefinition Height="8*"/>
|
||||||
<RowDefinition Height="1*"/>
|
<RowDefinition Height="1*"/>
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
<!-- Definizione della Grid superiore -->
|
<!-- Definizione della Grid superiore -->
|
||||||
<Grid Grid.Column="1" Grid.Row="0" >
|
<Grid Grid.Column="1" Grid.Row="0" >
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
@@ -32,15 +32,24 @@
|
|||||||
<ColumnDefinition Width="1*"/>
|
<ColumnDefinition Width="1*"/>
|
||||||
<ColumnDefinition Width="4*"/>
|
<ColumnDefinition Width="4*"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
<Button Name="PhotoBtn" Grid.Column="0" Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}">
|
<Button Name="PhotoBtn" Grid.Column="0" Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}">
|
||||||
<Image Source="{DynamicResource PhotoImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
<Image Source="{DynamicResource PhotoImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||||
</Button>
|
</Button>
|
||||||
<Button Name="RawPartBtn" Grid.Column="1" Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}">
|
<Button Name="RawPartBtn" Grid.Column="1" Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}">
|
||||||
<Image Source="{DynamicResource RawPartImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
<Image Source="{DynamicResource RawPartImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||||
</Button>
|
</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}">
|
<ToggleButton Name="MachiningBtn" Grid.Column="4" Style="{DynamicResource OmagCut_RightGrayYellowIconToggleButton}">
|
||||||
<Image Source="{DynamicResource FrameMachiningImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
<Image Source="{DynamicResource FrameMachiningImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||||
</ToggleButton>
|
</ToggleButton>
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
@@ -50,81 +59,103 @@
|
|||||||
<RowDefinition Height="1*"/>
|
<RowDefinition Height="1*"/>
|
||||||
<RowDefinition Height="7*"/>
|
<RowDefinition Height="7*"/>
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
<Grid Grid.Row="1">
|
|
||||||
<Grid.ColumnDefinitions>
|
|
||||||
<ColumnDefinition Width="1*"/>
|
|
||||||
<ColumnDefinition Width="1*"/>
|
|
||||||
<ColumnDefinition Width="1*"/>
|
|
||||||
</Grid.ColumnDefinitions>
|
|
||||||
<Grid.RowDefinitions>
|
|
||||||
<RowDefinition Height="0.6*"/>
|
|
||||||
<RowDefinition Height="0.8*"/>
|
|
||||||
<RowDefinition Height="0.5*"/>
|
|
||||||
<RowDefinition Height="0.5*"/>
|
|
||||||
<RowDefinition Height="0.5*"/>
|
|
||||||
<RowDefinition Height="0.8*"/>
|
|
||||||
<RowDefinition Height="2.5*"/>
|
|
||||||
</Grid.RowDefinitions>
|
|
||||||
|
|
||||||
<ComboBox Name="AlongAxCmBx" Grid.Row="0" Grid.ColumnSpan="3" Style="{StaticResource OmagCut_ComboBox}"
|
<Grid Grid.Row="1">
|
||||||
Width="200" MaxDropDownHeight="300">
|
<Grid.ColumnDefinitions>
|
||||||
<ComboBox.ItemTemplate>
|
<ColumnDefinition Width="1*"/>
|
||||||
<DataTemplate>
|
<ColumnDefinition Width="1*"/>
|
||||||
<TextBlock Text="{Binding}" Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
<ColumnDefinition Width="1*"/>
|
||||||
</DataTemplate>
|
</Grid.ColumnDefinitions>
|
||||||
</ComboBox.ItemTemplate>
|
<Grid.RowDefinitions>
|
||||||
</ComboBox>
|
<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>
|
||||||
|
|
||||||
<UniformGrid Grid.Column="0" Grid.Row="1" Grid.ColumnSpan="3" Columns="2" >
|
<ComboBox Name="AlongAxCmBx" Grid.Row="0" Grid.ColumnSpan="3" Style="{DynamicResource OmagCut_ComboBox}"
|
||||||
<Button Name="SelSectionBtn"
|
Width="200" MaxDropDownHeight="300">
|
||||||
|
<ComboBox.ItemTemplate>
|
||||||
|
<DataTemplate>
|
||||||
|
<TextBlock Text="{Binding}" Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||||
|
</DataTemplate>
|
||||||
|
</ComboBox.ItemTemplate>
|
||||||
|
</ComboBox>
|
||||||
|
|
||||||
|
<UniformGrid Grid.Column="0" Grid.Row="1" Grid.ColumnSpan="3" Columns="2" >
|
||||||
|
<!--<Button Name="SelSectionBtn"
|
||||||
Style="{DynamicResource OmagCut_YellowGradientYellowIconButton}">
|
Style="{DynamicResource OmagCut_YellowGradientYellowIconButton}">
|
||||||
<Image Source="{DynamicResource Sezione-corniceImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
<Image Source="{DynamicResource Sezione-corniceImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||||
</Button>
|
</Button>-->
|
||||||
|
|
||||||
<Grid>
|
|
||||||
<Button Name="SelGuideBtn"
|
|
||||||
Style="{DynamicResource OmagCut_YellowTextButton}"/>
|
|
||||||
<UniformGrid Name="ArcGrid" Grid.Column="0" Grid.Row="1" Grid.ColumnSpan="3" Columns="2" >
|
|
||||||
<TextBlock Name="ArcRadTxBl" Grid.Row="2" Grid.ColumnSpan="2"
|
|
||||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
|
||||||
<EgtWPFLib:EgtTextBox Name="ArcRadTxBx" Grid.Column="2" Grid.Row="2" Width="50"
|
|
||||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
|
||||||
<TextBlock Name="ArcAngTxBl" Grid.Row="3" Grid.ColumnSpan="2"
|
|
||||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
|
||||||
<EgtWPFLib:EgtTextBox Name="ArcAngTxBx" Grid.Column="2" Grid.Row="3" Width="50"
|
|
||||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
|
||||||
</UniformGrid>
|
|
||||||
</Grid>
|
|
||||||
</UniformGrid>
|
|
||||||
|
|
||||||
<TextBlock Name="OffsZTxBl" Grid.Row="2" Grid.ColumnSpan="2"
|
<Grid>
|
||||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
<Button Name="SelGuideBtn" Style="{DynamicResource OmagCut_YellowTextButton}"/>
|
||||||
<EgtWPFLib:EgtTextBox Name="OffsZTxBx" Grid.Column="2" Grid.Row="2" Width="50"
|
<UniformGrid Name="ArcGrid" Grid.Column="0" Grid.Row="1" Grid.ColumnSpan="3" Columns="2" >
|
||||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
<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="OffsXyTxBl" Grid.Row="3" Grid.ColumnSpan="2"
|
<TextBlock Name="OffsZTxBl" Grid.Row="2" Grid.ColumnSpan="2"
|
||||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||||
<EgtWPFLib:EgtTextBox Name="OffsXyTxBx" Grid.Column="2" Grid.Row="3" Width="50"
|
<EgtWPFLib:EgtTextBox Name="OffsZTxBx" Grid.Column="2" Grid.Row="2" Width="50"
|
||||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||||
|
|
||||||
<TextBlock Name="OffsYyTxBl" Grid.Row="4" Grid.ColumnSpan="2"
|
<TextBlock Name="OffsXyTxBl" Grid.Row="3" Grid.ColumnSpan="2"
|
||||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||||
<EgtWPFLib:EgtTextBox Name="OffsYyTxBx" Grid.Column="2" Grid.Row="4" Width="50"
|
<EgtWPFLib:EgtTextBox Name="OffsXyTxBx" Grid.Column="2" Grid.Row="3" Width="50"
|
||||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||||
|
|
||||||
<UniformGrid Grid.Column="0" Grid.Row="5" Grid.ColumnSpan="3" Columns="2" >
|
<TextBlock Name="OffsYyTxBl" Grid.Row="4" Grid.ColumnSpan="2"
|
||||||
<Button Name="MirrorPartBtn"
|
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||||
|
<EgtWPFLib:EgtTextBox Name="OffsYyTxBx" Grid.Column="2" Grid.Row="4" 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="6" Grid.ColumnSpan="3" Columns="2" >
|
||||||
|
<Button Name="CompoBtn"
|
||||||
Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}">
|
Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}">
|
||||||
<Image Source="{DynamicResource SpecchiaImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
<Image Source="{DynamicResource DrawImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||||
</Button>
|
</Button>
|
||||||
<Button Name="RemovePartBtn"
|
</UniformGrid>-->
|
||||||
Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}">
|
|
||||||
<Image Source="{DynamicResource Rimuovi_eliminaImg}" 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}"/>
|
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||||
|
|
||||||
<ComboBox Name="SawRoughingCmBx" Grid.Row="5" Grid.ColumnSpan="3" Style="{StaticResource OmagCut_ComboBox}"
|
<ComboBox Name="SawRoughingCmBx" Grid.Row="5" Grid.ColumnSpan="3" Style="{StaticResource OmagCut_ComboBox}"
|
||||||
@@ -182,8 +213,8 @@
|
|||||||
</ComboBox.ItemTemplate>
|
</ComboBox.ItemTemplate>
|
||||||
</ComboBox>-->
|
</ComboBox>-->
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
Imports System.Collections.ObjectModel
|
Imports EgtUILib
|
||||||
Imports EgtUILib
|
|
||||||
|
|
||||||
Public Class FrameCutPageUC
|
Public Class FrameCutPageUC
|
||||||
|
|
||||||
@@ -52,24 +51,40 @@ Public Class FrameCutPageUC
|
|||||||
OffsXyTxBx.Text = LenToString(dOffsXY, 3)
|
OffsXyTxBx.Text = LenToString(dOffsXY, 3)
|
||||||
Dim dOffsYY As Double = GetPrivateProfileDouble(S_FRAME, K_OFFSYY, 5, m_MainWindow.GetIniFile())
|
Dim dOffsYY As Double = GetPrivateProfileDouble(S_FRAME, K_OFFSYY, 5, m_MainWindow.GetIniFile())
|
||||||
OffsYyTxBx.Text = LenToString(dOffsYY, 3)
|
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
|
' Imposto i messaggi letti dal file dei messaggi
|
||||||
m_AlongAx.Add(EgtMsg(MSG_FRAMECUTPAGEUC + 1)) 'Lungo X
|
m_AlongAx.Add(EgtMsg(90601)) ' Lungo X
|
||||||
m_AlongAx.Add(EgtMsg(MSG_FRAMECUTPAGEUC + 2)) 'Lungo Y
|
m_AlongAx.Add(EgtMsg(90602)) ' Lungo Y
|
||||||
If GetPrivateProfileInt(S_FRAME, K_ARC_ENABLE, 0, m_MainWindow.GetIniFile()) <> 0 And
|
If GetPrivateProfileInt(S_FRAME, K_ARC_ENABLE, 0, m_MainWindow.GetIniFile()) <> 0 And
|
||||||
m_MainWindow.GetKeyOption( MainWindow.KEY_OPT.CURVED_FRAME) Then
|
m_MainWindow.GetKeyOption( MainWindow.KEY_OPT.CURVED_FRAME) Then
|
||||||
m_AlongAx.Add(EgtMsg(MSG_FRAMECUTPAGEUC + 13)) 'Arco
|
m_AlongAx.Add(EgtMsg(90613)) ' Arco
|
||||||
m_AlongAx.Add(EgtMsg(MSG_FRAMECUTPAGEUC + 14)) 'Guida
|
m_AlongAx.Add(EgtMsg(90614)) ' Guida
|
||||||
End If
|
End If
|
||||||
SelSectionBtn.ToolTip = EgtMsg(MSG_FRAMECUTPAGEUC + 15) 'Sezione
|
SelSectionBtn.ToolTip = EgtMsg(90615) ' Sezione
|
||||||
SelGuideBtn.Content = EgtMsg(MSG_FRAMECUTPAGEUC + 16) 'Guida
|
SelGuideBtn.Content = EgtMsg(906116) ' Guida
|
||||||
ArcRadTxBl.Text = EgtMsg(MSG_FRAMECUTPAGEUC + 17) 'Rad
|
ArcRadTxBl.Text = EgtMsg(90617) ' Rad
|
||||||
ArcAngTxBl.Text = EgtMsg(MSG_FRAMECUTPAGEUC + 18) 'Ang
|
ArcAngTxBl.Text = EgtMsg(90618) ' Ang
|
||||||
MirrorPartBtn.ToolTip = EgtMsg(MSG_FRAMECUTPAGEUC + 7) 'Mirror cornice
|
MirrorPartBtn.ToolTip = EgtMsg(90607) ' Mirror cornice
|
||||||
RemovePartBtn.ToolTip = EgtMsg(MSG_FRAMECUTPAGEUC + 3) 'Rimuovi cornice
|
RemovePartBtn.ToolTip = EgtMsg(90603) ' Rimuovi cornice
|
||||||
OffsZTxBl.Text = EgtMsg(MSG_FRAMECUTPAGEUC + 8) 'Distanza sopra
|
OffsZTxBl.Text = EgtMsg(90608) ' Distanza sopra
|
||||||
OffsXyTxBl.Text = EgtMsg(MSG_FRAMECUTPAGEUC + 9) 'Distanza inizio
|
OffsXyTxBl.Text = EgtMsg(90609) ' Distanza inizio
|
||||||
OffsYyTxBl.Text = EgtMsg(MSG_FRAMECUTPAGEUC + 22) 'Distanza Y
|
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
|
End Sub
|
||||||
|
|
||||||
Private Sub FrameCutPage_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded
|
Private Sub FrameCutPage_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded
|
||||||
@@ -81,6 +96,12 @@ Public Class FrameCutPageUC
|
|||||||
m_ProjectMgr.CSVBtn.Visibility = Windows.Visibility.Hidden
|
m_ProjectMgr.CSVBtn.Visibility = Windows.Visibility.Hidden
|
||||||
m_ProjectMgr.VeinMatchingBtn.Visibility = Windows.Visibility.Hidden
|
m_ProjectMgr.VeinMatchingBtn.Visibility = Windows.Visibility.Hidden
|
||||||
m_ProjectMgr.RegisterBtn.Visibility = Windows.Visibility.Hidden
|
m_ProjectMgr.RegisterBtn.Visibility = Windows.Visibility.Hidden
|
||||||
|
' Visualizzo il bottone per l'importazione dei compo frame
|
||||||
|
If m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.COMPOFRAME) AndAlso GetPrivateProfileInt(S_FRAMECOMPO, K_CMP_COUNT, 0, m_MainWindow.GetIniFile()) > 0 Then
|
||||||
|
CompoBtn.Visibility = Visibility.Visible
|
||||||
|
Else
|
||||||
|
CompoBtn.Visibility = Visibility.Hidden
|
||||||
|
End If
|
||||||
' Recupero dimensioni e kerf del grezzo
|
' Recupero dimensioni e kerf del grezzo
|
||||||
m_nRawId = EgtGetFirstRawPart()
|
m_nRawId = EgtGetFirstRawPart()
|
||||||
GetRawBox(m_RawBox)
|
GetRawBox(m_RawBox)
|
||||||
@@ -146,14 +167,14 @@ Public Class FrameCutPageUC
|
|||||||
ArcGrid.Visibility = Windows.Visibility.Collapsed
|
ArcGrid.Visibility = Windows.Visibility.Collapsed
|
||||||
OffsYyTxBl.Visibility = Windows.Visibility.Collapsed
|
OffsYyTxBl.Visibility = Windows.Visibility.Collapsed
|
||||||
OffsYyTxBx.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
|
Case 2 'Arco
|
||||||
SelSectionBtn.Visibility = Windows.Visibility.Visible
|
SelSectionBtn.Visibility = Windows.Visibility.Visible
|
||||||
SelGuideBtn.Visibility = Windows.Visibility.Collapsed
|
SelGuideBtn.Visibility = Windows.Visibility.Collapsed
|
||||||
ArcGrid.Visibility = Windows.Visibility.Visible
|
ArcGrid.Visibility = Windows.Visibility.Visible
|
||||||
OffsYyTxBl.Visibility = Windows.Visibility.Visible
|
OffsYyTxBl.Visibility = Windows.Visibility.Visible
|
||||||
OffsYyTxBx.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
|
Case 3 'Guida
|
||||||
SelSectionBtn.Visibility = Windows.Visibility.Visible
|
SelSectionBtn.Visibility = Windows.Visibility.Visible
|
||||||
SelGuideBtn.Visibility = Windows.Visibility.Visible
|
SelGuideBtn.Visibility = Windows.Visibility.Visible
|
||||||
@@ -161,7 +182,7 @@ Public Class FrameCutPageUC
|
|||||||
ArcGrid.Visibility = Windows.Visibility.Collapsed
|
ArcGrid.Visibility = Windows.Visibility.Collapsed
|
||||||
OffsYyTxBl.Visibility = Windows.Visibility.Visible
|
OffsYyTxBl.Visibility = Windows.Visibility.Visible
|
||||||
OffsYyTxBx.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 Select
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -271,7 +292,7 @@ Public Class FrameCutPageUC
|
|||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub OffsXXTxBx_EgtClosed(sender As Object, e As EventArgs) Handles OffsZTxBx.EgtClosed, OffsXyTxBx.EgtClosed, OffsYyTxBx.EgtClosed
|
Private Sub OffsXXTxBx_EgtClosed(sender As Object, e As EventArgs) Handles OffsZTxBx.EgtClosed, OffsXyTxBx.EgtClosed, OffsYyTxBx.EgtClosed, OffsXInteryTxBx.EgtClosed, UseInteraxisChBx.Click
|
||||||
' Forzo aggiornamento grezzo nella pagina di Nesting
|
' Forzo aggiornamento grezzo nella pagina di Nesting
|
||||||
m_MainWindow.m_CadCutPageUC.m_NestPage.CalcRawPart()
|
m_MainWindow.m_CadCutPageUC.m_NestPage.CalcRawPart()
|
||||||
' Parcheggio pezzi presenti nel grezzo
|
' Parcheggio pezzi presenti nel grezzo
|
||||||
@@ -296,9 +317,18 @@ Public Class FrameCutPageUC
|
|||||||
WritePrivateProfileString(S_FRAME, K_OFFSXY, DoubleToString(dOffsXy, 3), m_MainWindow.GetIniFile())
|
WritePrivateProfileString(S_FRAME, K_OFFSXY, DoubleToString(dOffsXy, 3), m_MainWindow.GetIniFile())
|
||||||
End If
|
End If
|
||||||
Dim dOffsYy As Double = 0
|
Dim dOffsYy As Double = 0
|
||||||
If StringToLen(OffsYyTxBx.Text, dOffsYY) Then
|
If StringToLen(OffsYyTxBx.Text, dOffsYy) Then
|
||||||
WritePrivateProfileString(S_FRAME, K_OFFSYY, DoubleToString(dOffsYy, 3), m_MainWindow.GetIniFile())
|
WritePrivateProfileString(S_FRAME, K_OFFSYY, DoubleToString(dOffsYy, 3), m_MainWindow.GetIniFile())
|
||||||
End If
|
End If
|
||||||
|
Dim dOffsXIntery As Double = 0
|
||||||
|
If StringToLen(OffsXInteryTxBx.Text, dOffsXIntery) Then
|
||||||
|
WritePrivateProfileString(S_FRAME, K_OFFSXINTERY, DoubleToString(dOffsXIntery, 3), m_MainWindow.GetIniFile())
|
||||||
|
End If
|
||||||
|
Dim sUseInteraxis As String = "1"
|
||||||
|
If UseInteraxisChBx.IsChecked Then
|
||||||
|
sUseInteraxis = "0"
|
||||||
|
End If
|
||||||
|
WritePrivateProfileString(S_FRAME, K_OFFSXINTERYSAWTH, sUseInteraxis, m_MainWindow.GetIniFile())
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub MirrorPartBtn_Click(sender As Object, e As RoutedEventArgs) Handles MirrorPartBtn.Click
|
Private Sub MirrorPartBtn_Click(sender As Object, e As RoutedEventArgs) Handles MirrorPartBtn.Click
|
||||||
@@ -436,15 +466,25 @@ Public Class FrameCutPageUC
|
|||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Private Sub CompoBtn_Click(sender As Object, e As RoutedEventArgs) Handles CompoBtn.Click
|
||||||
|
m_MainWindow.TestOff()
|
||||||
|
m_MainWindow.DragRettangleOff()
|
||||||
|
m_MainWindow.SplitCurvWJOff()
|
||||||
|
m_MainWindow.StartCurvWJOff()
|
||||||
|
m_MainWindow.MainWindowGrid.Children.Remove(m_MainWindow.m_CurrentProjectPageUC)
|
||||||
|
m_MainWindow.MainWindowGrid.Children.Add(m_MainWindow.m_DrawPageUC)
|
||||||
|
m_MainWindow.m_ActivePage = MainWindow.Pages.Draw
|
||||||
|
End Sub
|
||||||
|
|
||||||
Friend Function CreateFrame(nPartId As Integer) As Boolean
|
Friend Function CreateFrame(nPartId As Integer) As Boolean
|
||||||
If Not MyCreateFrame( nPartId) Then
|
If Not MyCreateFrame( nPartId) Then
|
||||||
EgtErase( nPartId)
|
EgtErase( nPartId)
|
||||||
If m_CurrAx <> 2 Then
|
If m_CurrAx <> 2 Then
|
||||||
' Errore : creazione cornice non riuscita
|
' Errore : creazione cornice non riuscita
|
||||||
m_CurrProjPage.SetErrorMessage( EgtMsg(MSG_FRAMECUTPAGEUC + 20))
|
m_CurrProjPage.SetErrorMessage(EgtMsg(90620))
|
||||||
Else
|
Else
|
||||||
' Errore : raggio più piccolo della larghezza della sezione
|
' Errore : raggio più piccolo della larghezza della sezione
|
||||||
m_CurrProjPage.SetErrorMessage( EgtMsg(MSG_FRAMECUTPAGEUC + 19))
|
m_CurrProjPage.SetErrorMessage(EgtMsg(90619))
|
||||||
End If
|
End If
|
||||||
Return False
|
Return False
|
||||||
End If
|
End If
|
||||||
@@ -936,12 +976,29 @@ Public Class FrameCutPageUC
|
|||||||
' Determino distanza da spessore lama
|
' Determino distanza da spessore lama
|
||||||
Dim dMinDist As Double = 0
|
Dim dMinDist As Double = 0
|
||||||
Dim dSawThick As Double = 0
|
Dim dSawThick As Double = 0
|
||||||
|
Dim dOffsXIntery As Double = 0
|
||||||
|
StringToLen(OffsXInteryTxBx.Text, dOffsXIntery)
|
||||||
If EgtTdbSetCurrTool(m_MainWindow.m_CurrentMachine.sCurrSaw) AndAlso
|
If EgtTdbSetCurrTool(m_MainWindow.m_CurrentMachine.sCurrSaw) AndAlso
|
||||||
EgtTdbGetCurrToolParam(MCH_TP.THICK, dSawThick) Then
|
EgtTdbGetCurrToolParam(MCH_TP.THICK, dSawThick) Then
|
||||||
dMinDist = dSawThick + 5 * EPS_SMALL
|
If UseInteraxisChBx.IsChecked Then
|
||||||
|
If dOffsXIntery < 0 Then
|
||||||
|
dMinDist = 5 * EPS_SMALL
|
||||||
|
OffsXInteryTxBx.Text = "0"
|
||||||
|
Else
|
||||||
|
dMinDist = dOffsXIntery + 5 * EPS_SMALL
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
dMinDist = dSawThick + 5 * EPS_SMALL
|
||||||
|
End If
|
||||||
|
'If dOffsXIntery <= dSawThick Then
|
||||||
|
' dMinDist = dSawThick + 5 * EPS_SMALL
|
||||||
|
' EgtOutLog("WARNINGS: Saw tickness is more width then interaxis")
|
||||||
|
'Else
|
||||||
|
' dMinDist = dOffsXIntery + 5 * EPS_SMALL
|
||||||
|
'End If
|
||||||
Else
|
Else
|
||||||
EgtOutLog("Not found current saw for frames mindist")
|
EgtOutLog("Not found current saw for frames mindist")
|
||||||
dMinDist = 0
|
dMinDist = dOffsXIntery
|
||||||
End If
|
End If
|
||||||
' Inserisco il pezzo nel grezzo
|
' Inserisco il pezzo nel grezzo
|
||||||
Dim ptIns As Point3d
|
Dim ptIns As Point3d
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user