Compare commits
271 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 7b9d99a9c6 | |||
| 1e2b4bed27 | |||
| 4ecf7980ce | |||
| 82157d3b6e | |||
| 6dbf4f5ccb | |||
| a55ab4f83d | |||
| fd89a6cf3b | |||
| b505b79d9a | |||
| b1313ddb55 | |||
| f3889ede24 | |||
| 5ca010ae4a | |||
| 391d25507e | |||
| c954f364e3 | |||
| 1ab6d2746f | |||
| 41de0516c8 | |||
| dec4c0d312 | |||
| 834f3afe1c | |||
| e6c95323fb | |||
| fa6e5b520f | |||
| aefc037cd9 | |||
| c475f7dc12 | |||
| c5f3d4fcfb | |||
| a04e2cbe62 | |||
| da980a649e | |||
| 4c282d7531 | |||
| a941f963c2 | |||
| eab341d7fe | |||
| 9c7d60d307 | |||
| a7adcdcaca | |||
| acb8ceed4d | |||
| 65d8f58b45 | |||
| 07cf7ced42 | |||
| b1410ca11c | |||
| 1975f46995 | |||
| 6863186e07 | |||
| b434f80030 | |||
| 0151cd8f9e | |||
| 75e3729216 | |||
| ef1aef12ed | |||
| 959fb2e44f | |||
| 59e3ae5841 | |||
| 941e7837be | |||
| 58de5d4077 | |||
| b6beef668d | |||
| 680505af10 | |||
| b0bfa67d2a | |||
| 29d8c1e29b | |||
| e5d4f223f8 | |||
| 3cfc7276c9 | |||
| 0c0233b27e | |||
| 4e8925515d | |||
| 3b552b2f4e | |||
| 3fae33404b | |||
| 0d4d853834 | |||
| 37fcbe8240 | |||
| 4393f282b7 | |||
| 6844a8c77c | |||
| 659405c52f | |||
| efafacf6ca | |||
| 6905a8d6dc | |||
| d8ba23894e | |||
| aba1572f95 | |||
| fdb0ed598b | |||
| 4cb3518346 | |||
| 56b8ee88d3 | |||
| d0439f2b05 | |||
| 07d8145d57 | |||
| 652c396933 | |||
| 997e8c380d | |||
| 8d363b8b06 | |||
| 7ecad4c218 | |||
| d49c231541 | |||
| 8d82058e49 | |||
| d6a9cac6b4 | |||
| 4ce898c25c | |||
| 6f59cddd80 | |||
| c8b018f6df | |||
| 36a1ecb509 | |||
| e287e827c4 | |||
| 68e9a9201d | |||
| 0eaebd5aad | |||
| 8946bf3a00 | |||
| aeb0be0590 | |||
| a15acb6528 | |||
| e7e9d26b75 | |||
| b48d4900ea | |||
| d9de23daca | |||
| ad5c9331ba | |||
| b67330b509 | |||
| ca66108145 | |||
| 379ccc7519 | |||
| b751c27773 | |||
| 14e1c254f0 | |||
| 6f08e5f520 | |||
| 7d8933cc39 | |||
| 2179996bff | |||
| 316bcc89ea | |||
| 17f41f1563 | |||
| 6a17b88283 | |||
| ce151e5db7 | |||
| b303fe2615 | |||
| 6f248ec645 | |||
| 3e0d43c1d8 | |||
| 70b1822446 | |||
| 17d6ced974 | |||
| db145af965 | |||
| 037fdb41b6 | |||
| f89fe7fefd | |||
| 6ecbd7f545 | |||
| 734f480f67 | |||
| 87fa5cc6dd | |||
| 5b00409abe | |||
| 0f3b91e847 | |||
| 3befbecd3c | |||
| b6d2cc434c | |||
| 800a589285 | |||
| 2618d3f14c | |||
| bb32a4e500 | |||
| 6d266819db | |||
| 3ce8965206 | |||
| d924f4c107 | |||
| b141bda34d | |||
| ecb599c5c1 | |||
| 957a012de5 | |||
| 12277387b6 | |||
| ac92d1b4df | |||
| 5fe84aa6fd | |||
| b3ec57fb79 | |||
| c5f8e1f3fd | |||
| 202a63329b | |||
| 8cdc527943 | |||
| 61bb35fda2 | |||
| ee70e8f4c2 | |||
| 4d0e700d50 | |||
| 4432893794 | |||
| 9fa98d78a5 | |||
| e1d166375a | |||
| 4e669bc577 | |||
| 73a1caf1d0 | |||
| 322497121d | |||
| 468270cbab | |||
| 71ce283bad | |||
| 576d547a85 | |||
| a79316f290 | |||
| 51ee7a0c92 | |||
| 237eeb8871 | |||
| abe1b3a430 | |||
| 7e205a6424 | |||
| a7d7c66e2b | |||
| 7bb35e4694 | |||
| 65e72391d8 | |||
| 32e4d6d76b | |||
| 59b9354551 | |||
| 7315166ca7 | |||
| b9875ba243 | |||
| f7bcdff766 | |||
| 47b98c6392 | |||
| a0f5585391 | |||
| a6457ece76 | |||
| e93c4e41a3 | |||
| abaf1ac3a8 | |||
| ed4fc25c5d | |||
| d1d48bf8a4 | |||
| 4e0d362b36 | |||
| 1afdc8551f | |||
| d17cd8d2d8 | |||
| cc11ab463f | |||
| d322dc192d | |||
| 24ab2e0ba8 | |||
| 8aec6c87b0 | |||
| 24fa5e089a | |||
| 29eae5517a | |||
| 1ce036a0f6 | |||
| dd5dd7c93c | |||
| 393559d41a | |||
| 45f6639dcd | |||
| de989f5762 | |||
| c33d6c1e77 | |||
| a1b2158404 | |||
| 05e94943e0 | |||
| 6bba5143f9 | |||
| 3957f66ec1 | |||
| 46f7e78efc | |||
| 02a8e3a274 | |||
| 00bbe3ad70 | |||
| f81970accc | |||
| 165ed71234 | |||
| 01b04e6a9d | |||
| 8a8ff33110 | |||
| 4ca3b4ee47 | |||
| 6b6031379b | |||
| 7e96fb2385 | |||
| 7ee4a2e552 | |||
| 105a12c497 | |||
| e0f380ed1d | |||
| a568c614fb | |||
| 6dc5fe5a12 | |||
| a1db5945df | |||
| fba8b377f9 | |||
| 401b171c4e | |||
| 3285d72817 | |||
| 17229ab9bc | |||
| c3abca3cee | |||
| 2e0f2eab1b | |||
| 9c60ef020f | |||
| 58c62ebd5c | |||
| ab525c7431 | |||
| 613b9fa725 | |||
| e4e20b9f91 | |||
| ca6a468cda | |||
| 24ddd7d245 | |||
| f9fd0f0168 | |||
| eac7b0999a | |||
| a464e0dc3b | |||
| 401af44bb5 | |||
| 1599515d58 | |||
| 0be1695246 | |||
| a79725783f | |||
| f13a51e8a1 | |||
| b77ed406ae | |||
| bb650afe9c | |||
| 1d87ac5c47 | |||
| fc3053df66 | |||
| 588ef08b17 | |||
| ebdaeece85 | |||
| 1605f81090 | |||
| a10703fe94 | |||
| a0575cbbac | |||
| 8180ffaeaa | |||
| 848783078c | |||
| 45f0245f9f | |||
| a81a7f8d9e | |||
| ca0210cf09 | |||
| 622912dec3 | |||
| 8ed35a5c46 | |||
| a2bbcfed95 | |||
| 0667da3692 | |||
| 5ff39c9d1c | |||
| 60a666c1c1 | |||
| df47692e8e | |||
| 5f2d03cbcb | |||
| 5255fad7fc | |||
| 41903872b1 | |||
| beb3ce841b | |||
| 4a2da4ac41 | |||
| 869b459c3b | |||
| aa84b2c8ab | |||
| 555d2d029f | |||
| 749fb2d949 | |||
| 5b3e73290c | |||
| 854519b706 | |||
| d8179b47ee | |||
| f68e141449 | |||
| 011c94cc6b | |||
| 64da46c0a4 | |||
| aab81c6af7 | |||
| 46be644285 | |||
| 5fe75b78e5 | |||
| eafe6184eb | |||
| 1bf42ebbc1 | |||
| 0e35e41c4a | |||
| 64e3fd83de | |||
| e5e74a6afd | |||
| 28deac8501 | |||
| 367a8c9fc3 | |||
| 0717546ad0 | |||
| 3bf1a87688 | |||
| 6d82b6efee | |||
| 94102172dd | |||
| c83b3e6bea | |||
| a45613ff39 |
+28
-3
@@ -1,4 +1,5 @@
|
||||
Imports EgtUILib
|
||||
Imports System.Windows.Forms.Integration
|
||||
Imports EgtUILib
|
||||
|
||||
Friend Module CamAuto
|
||||
|
||||
@@ -29,7 +30,7 @@ Friend Module CamAuto
|
||||
Return bOk
|
||||
End Function
|
||||
|
||||
Friend Function AddWaterJetMachining( nOperId As Integer, ByRef nWarn As Integer) As Boolean
|
||||
Friend Function AddWaterJetMachining(nOperId As Integer, ByRef nWarn As Integer) As Boolean
|
||||
EgtLuaCreateGlobTable("CAM")
|
||||
SetLuaStandardCamParams()
|
||||
EgtLuaSetGlobIntVar("CAM.OPERID", nOperId)
|
||||
@@ -93,7 +94,7 @@ Friend Module CamAuto
|
||||
If nPrjType = CurrentProjectPageUC.PRJ_TYPE.FLATS Then
|
||||
' Reinserisco tutte le lavorazioni piane
|
||||
AddMachinings(GDB_ID.NULL, nWarn)
|
||||
' Se altrimenti progetto con cornici
|
||||
' Se altrimenti progetto con cornici
|
||||
ElseIf nPrjType = CurrentProjectPageUC.PRJ_TYPE.FRAMES Then
|
||||
' Reinserisco tutte le lavorazioni delle cornici
|
||||
AddFrameMachinings(m_MainWindow.m_FrameCutPageUC.m_FrameMachiningUC.m_dStartTrim, m_MainWindow.m_FrameCutPageUC.m_FrameMachiningUC.m_dEndTrim)
|
||||
@@ -155,6 +156,30 @@ Friend Module CamAuto
|
||||
Return bOk
|
||||
End Function
|
||||
|
||||
Friend Function ResetAllBRidges() As Boolean
|
||||
Dim bOk As Boolean = True
|
||||
Dim nMachGroup As Integer = EgtGetCurrMachGroup()
|
||||
Dim nBridgesGroup As Integer = EgtGetFirstNameInGroup(nMachGroup, "Bridges")
|
||||
bOk = EgtErase(nBridgesGroup)
|
||||
Return bOk
|
||||
End Function
|
||||
|
||||
Friend Function ResetAllRawPart() As Boolean
|
||||
Dim nPhase As Integer = 1
|
||||
Dim nOtherRaw As Integer = EgtGetFirstRawPart()
|
||||
While nOtherRaw <> GDB_ID.NULL
|
||||
' se il pezzo non appartiene alla prima fase allora viene eliminato
|
||||
If Not EgtVerifyRawPartPhase(nOtherRaw, nPhase) Then
|
||||
Dim NextRaw As Integer = EgtGetNextRawPart(nOtherRaw)
|
||||
EgtRemoveRawPart(nOtherRaw)
|
||||
nOtherRaw = NextRaw
|
||||
Else
|
||||
nOtherRaw = EgtGetNextRawPart(nOtherRaw)
|
||||
End If
|
||||
End While
|
||||
Return True
|
||||
End Function
|
||||
|
||||
' verifico che il contorno passato non sia stato separato
|
||||
Friend Function VerifyOutLoopIsClosed(nIdLayerOutLoop As Integer)
|
||||
Dim nIdMy As Integer = EgtGetFirstInGroup(nIdLayerOutLoop)
|
||||
|
||||
@@ -27,6 +27,14 @@
|
||||
<EgtWPFLib:EgtTextBox Name="ValueTxBx" Grid.Column="1" Grid.Row="1"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
|
||||
<ComboBox Name="ValueCmBx" Grid.Column="1" Grid.Row="1">
|
||||
<ComboBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding}" FontSize="20" />
|
||||
</DataTemplate>
|
||||
</ComboBox.ItemTemplate>
|
||||
</ComboBox>
|
||||
|
||||
<Grid Name="ButtonsGrid" Grid.Column="1" Grid.Row="3" Grid.RowSpan="1">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
Imports System.IO
|
||||
Imports EgtUILib
|
||||
Imports EgtWPFLib
|
||||
Imports System.Collections.ObjectModel
|
||||
|
||||
Public Class EditValueWD
|
||||
|
||||
@@ -8,29 +9,77 @@ Public Class EditValueWD
|
||||
Private m_MainWindow As MainWindow = DirectCast(Application.Current.MainWindow, MainWindow)
|
||||
Private m_sMsg As String = "Value"
|
||||
Private m_sValue As String = ""
|
||||
Private m_sList As ObservableCollection(Of String)
|
||||
Private m_IsText As Boolean = True
|
||||
|
||||
' avvia la visualizzazione della textbox
|
||||
Sub New(Owner As Window, Optional sMsg As String = "")
|
||||
Me.Owner = Owner
|
||||
m_sMsg = sMsg
|
||||
m_IsText = True
|
||||
InitializeComponent()
|
||||
End Sub
|
||||
|
||||
Friend Function SetVal( dVal As Double) As Boolean
|
||||
m_sValue = DoubleToString( dVal, 3)
|
||||
Friend Function SetVal(dVal As Double, Optional ByVal bLen As Boolean = False) As Boolean
|
||||
If bLen Then
|
||||
m_sValue = LenToString(dVal, 3)
|
||||
Else
|
||||
m_sValue = DoubleToString(dVal, 3)
|
||||
End If
|
||||
ValueTxBx.Text = m_sValue
|
||||
Return true
|
||||
Return True
|
||||
End Function
|
||||
|
||||
Friend Function GetVal() As Double
|
||||
' avvia la visualizzazione della combobox
|
||||
Sub New(Owner As Window, sList As ObservableCollection(Of String), Optional sMsg As String = "")
|
||||
Me.Owner = Owner
|
||||
m_sMsg = sMsg
|
||||
m_IsText = False
|
||||
InitializeComponent()
|
||||
m_sList = sList
|
||||
SetComboBox(m_sList)
|
||||
End Sub
|
||||
|
||||
Friend Function GetVal(Optional ByVal bLen As Boolean = False) As Double
|
||||
Dim dVal As Double = 0
|
||||
StringToDouble( m_sValue, dVal)
|
||||
If bLen Then
|
||||
StringToLen(m_sValue, dVal)
|
||||
Else
|
||||
StringToDouble(m_sValue, dVal)
|
||||
End If
|
||||
Return dVal
|
||||
End Function
|
||||
|
||||
Friend Function SetComboBox(sList As ObservableCollection(Of String)) As Boolean
|
||||
ValueCmBx.ItemsSource = sList
|
||||
Return True
|
||||
End Function
|
||||
|
||||
Friend Function SetItemComboBox(sItem As String) As Boolean
|
||||
For Each MyItem As String In ValueCmBx.ItemsSource
|
||||
If MyItem = sItem Then
|
||||
ValueCmBx.SelectedItem = MyItem
|
||||
End If
|
||||
Next
|
||||
Return True
|
||||
End Function
|
||||
|
||||
Friend Function GetItemComboBox() As String
|
||||
Dim sVal As String = ValueCmBx.SelectedItem
|
||||
Return sVal
|
||||
End Function
|
||||
|
||||
Private Sub EditValueWD_Initialized(sender As Object, e As EventArgs) Handles Me.Initialized
|
||||
Me.Top = Owner.Top + Owner.Height / 2 - Me.Height / 2
|
||||
Me.Left = Owner.Left + Owner.Width / 2 - Me.Width / 2
|
||||
ValueTxbl.Text = m_sMsg
|
||||
If m_IsText Then
|
||||
ValueCmBx.Visibility = Visibility.Collapsed
|
||||
ValueTxBx.Visibility = Visibility.Visible
|
||||
Else
|
||||
ValueCmBx.Visibility = Visibility.Visible
|
||||
ValueTxBx.Visibility = Visibility.Collapsed
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub EditValueWD_Rendered(sender As Object, e As EventArgs) Handles Me.ContentRendered
|
||||
|
||||
+132
-123
@@ -7,158 +7,167 @@
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="853.3" d:DesignWidth="1280">
|
||||
|
||||
<!-- Definizione della SplitPage -->
|
||||
<Grid Name="SplitPageGrid" >
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="3*"/>
|
||||
<ColumnDefinition Width="12*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="8*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<!-- Definizione della SplitPage -->
|
||||
<Grid Name="SplitPageGrid" >
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="3*"/>
|
||||
<ColumnDefinition Width="12*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="8*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<!--Upper button grid-->
|
||||
<Grid Grid.Column="1">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="4*"/>
|
||||
<ColumnDefinition Width="8*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<!--Griglia per oscurare i bottoni della pagina sottostante-->
|
||||
<Grid Background="{DynamicResource OmagCut_Gray}">
|
||||
<!--Upper button grid-->
|
||||
<Grid Grid.Column="1">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="4*"/>
|
||||
<ColumnDefinition Width="8*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Button Name="PrevBtn" Grid.Column="0" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource NumericKeyboardArrowImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
<!--Griglia per oscurare i bottoni della pagina sottostante-->
|
||||
<Grid Background="{DynamicResource OmagCut_Gray}">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Button Name="PrevBtn" Grid.Column="0" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource NumericKeyboardArrowImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="NextBtn" Grid.Column="1" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource NumericKeyboardArrowImg}" Style="{StaticResource OmagCut_ButtonIcon}" RenderTransformOrigin="0.5,0.5">
|
||||
<Image.RenderTransform>
|
||||
<TransformGroup>
|
||||
<RotateTransform Angle="180"/>
|
||||
</TransformGroup>
|
||||
</Image.RenderTransform>
|
||||
</Image>
|
||||
</Button>
|
||||
<Button Name="ModifyBtn" Grid.Column="2" Style="{DynamicResource OmagCut_YellowTextButton}"/>
|
||||
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
||||
<!--Left Button Grid-->
|
||||
<Grid Grid.RowSpan="3">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="2*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<Button Name="TopLBtn" Grid.Column="0" Grid.Row="1"
|
||||
Style="{DynamicResource OmagCut_TopGrayGradientYellowButton}">
|
||||
<Image Source="{DynamicResource TopLeftImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="NextBtn" Grid.Column="1" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource NumericKeyboardArrowImg}" Style="{StaticResource OmagCut_ButtonIcon}" RenderTransformOrigin="0.5,0.5">
|
||||
<Image.RenderTransform>
|
||||
<TransformGroup>
|
||||
<RotateTransform Angle="180"/>
|
||||
</TransformGroup>
|
||||
</Image.RenderTransform>
|
||||
</Image>
|
||||
<Button Name="UpBtn" Grid.Column="1" Grid.Row="1"
|
||||
Style="{DynamicResource OmagCut_TopGrayGradientYellowButton}">
|
||||
<Image Source="{DynamicResource UpArrowImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="ModifyBtn" Grid.Column="2" Style="{DynamicResource OmagCut_YellowTextButton}"/>
|
||||
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
||||
<!--Left Button Grid-->
|
||||
<Grid Grid.RowSpan="3">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="2*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<Button Name="TopLBtn" Grid.Column="0" Grid.Row="1"
|
||||
<Button Name="TopRBtn" Grid.Column="2" Grid.Row="1"
|
||||
Style="{DynamicResource OmagCut_TopGrayGradientYellowButton}">
|
||||
<Image Source="{DynamicResource TopLeftImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="UpBtn" Grid.Column="1" Grid.Row="1"
|
||||
Style="{DynamicResource OmagCut_TopGrayGradientYellowButton}">
|
||||
<Image Source="{DynamicResource UpArrowImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="TopRBtn" Grid.Column="2" Grid.Row="1"
|
||||
Style="{DynamicResource OmagCut_TopGrayGradientYellowButton}">
|
||||
<Image Source="{DynamicResource TopRightImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="LeftBtn" Grid.Column="0" Grid.Row="2"
|
||||
<Image Source="{DynamicResource TopRightImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="LeftBtn" Grid.Column="0" Grid.Row="2"
|
||||
Style="{DynamicResource OmagCut_LeftGrayGradientYellowButton}">
|
||||
<Image Source="{DynamicResource LeftArrowImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||
</Button>
|
||||
<EgtWPFLib:EgtTextBox Name="StepMoveTxBx" Grid.Column="1" Grid.Row="2" Width="50"
|
||||
<Image Source="{DynamicResource LeftArrowImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||
</Button>
|
||||
<EgtWPFLib:EgtTextBox Name="StepMoveTxBx" Grid.Column="1" Grid.Row="2" Width="50"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
<Button Name="ResetBtn" Grid.Column="1" Grid.Row="2"
|
||||
<Button Name="ResetBtn" Grid.Column="1" Grid.Row="2"
|
||||
Style="{DynamicResource OmagCut_YellowTextButton}">
|
||||
</Button>
|
||||
<Button Name="RightBtn" Grid.Column="2" Grid.Row="2"
|
||||
</Button>
|
||||
<Button Name="RightBtn" Grid.Column="2" Grid.Row="2"
|
||||
Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}">
|
||||
<Image Source="{DynamicResource RightArrowImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="BottomLBtn" Grid.Column="0" Grid.Row="3"
|
||||
<Image Source="{DynamicResource RightArrowImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="BottomLBtn" Grid.Column="0" Grid.Row="3"
|
||||
Style="{DynamicResource OmagCut_BottomGrayGradientYellowButton}">
|
||||
<Image Source="{DynamicResource BottomLeftImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="DownBtn" Grid.Column="1" Grid.Row="3"
|
||||
<Image Source="{DynamicResource BottomLeftImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="DownBtn" Grid.Column="1" Grid.Row="3"
|
||||
Style="{DynamicResource OmagCut_BottomGrayGradientYellowButton}">
|
||||
<Image Source="{DynamicResource DownArrowImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="BottomRBtn" Grid.Column="2" Grid.Row="3"
|
||||
<Image Source="{DynamicResource DownArrowImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="BottomRBtn" Grid.Column="2" Grid.Row="3"
|
||||
Style="{DynamicResource OmagCut_BottomGrayGradientYellowButton}">
|
||||
<Image Source="{DynamicResource BottomRightImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||
</Button>
|
||||
<Image Source="{DynamicResource BottomRightImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||
</Button>
|
||||
|
||||
<Button Name="RotateCounterClockwiseBtn" Grid.Column="0" Grid.Row="4"
|
||||
<Button Name="RotateCounterClockwiseBtn" Grid.Column="0" Grid.Row="4"
|
||||
Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}">
|
||||
<Image Source="{DynamicResource CounterClockwiseRotateImg}" Width="64" Height="65" HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center" />
|
||||
</Button>
|
||||
</Button>
|
||||
|
||||
<Grid Name="RotationAngle" Grid.Column="1" Grid.Row="4" HorizontalAlignment="Center" VerticalAlignment="Center">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<EgtWPFLib:EgtTextBox Name="RotationAngleTxBx" Width="50"
|
||||
<Grid Name="RotationAngle" Grid.Column="1" Grid.Row="4" HorizontalAlignment="Center" VerticalAlignment="Center">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<EgtWPFLib:EgtTextBox Name="RotationAngleTxBx" Width="50" IsLength="False"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
<TextBlock Grid.Column="1" FontSize="30" Margin="2,-5,0,0"
|
||||
<TextBlock Grid.Column="1" FontSize="30" Margin="2,-5,0,0"
|
||||
Text="°"/>
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
||||
<Button Name="RotateClockwiseBtn" Grid.Column="2" Grid.Row="4"
|
||||
<Button Name="RotateClockwiseBtn" Grid.Column="2" Grid.Row="4"
|
||||
Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}">
|
||||
<Image Source="{DynamicResource ClockwiseRotateImg}" Width="65" Height="65" HorizontalAlignment="Center"
|
||||
<Image Source="{DynamicResource ClockwiseRotateImg}" Width="65" Height="65" HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center" />
|
||||
</Button>
|
||||
</Button>
|
||||
|
||||
<!--Gestione sfridi-->
|
||||
<Button Name="RemovePartBtn" Grid.ColumnSpan="2" Grid.Row="6"
|
||||
Style="{DynamicResource OmagCut_YellowTextButton}"/>
|
||||
|
||||
<Button Name="RemovePartBtn" Grid.ColumnSpan="3" Grid.Row="6"
|
||||
Style="{DynamicResource OmagCut_YellowTextButton}"/>
|
||||
<Button Name="ScrapsBtn" Grid.Column="3" Grid.Row="6"
|
||||
Style="{DynamicResource OmagCut_YellowTextButton}"/>
|
||||
|
||||
<Grid Grid.Row="7" Grid.ColumnSpan="3">
|
||||
<!--Gestione scarico pezzi-->
|
||||
<Button Name="UnloadPartsBtn" Grid.ColumnSpan="2" Grid.Row="7"
|
||||
Style="{DynamicResource OmagCut_YellowTextButton}"/>
|
||||
|
||||
<Grid Grid.Row="7" Grid.ColumnSpan="3">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
</Grid>
|
||||
|
||||
</Grid>
|
||||
|
||||
<!--Lower button grid, sfondo grigio per coprire i bottoni della pagina sottostante-->
|
||||
<Grid Grid.Column="1" Grid.Row="2" Background="{DynamicResource OmagCut_Gray}">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="10*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<!-- Inserimento della pausa durante il movimento sulla tavola di scarico-->
|
||||
<Button Name="PauseBtn" Grid.Column="1" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource Pausa-ON_OFFImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||
</Button>
|
||||
</Grid>
|
||||
|
||||
</Grid>
|
||||
|
||||
</Grid>
|
||||
|
||||
<!--Lower button grid, sfondo grigio per coprire i bottoni della pagina sottostante-->
|
||||
<Grid Grid.Column="1" Grid.Row="2" Background="{DynamicResource OmagCut_Gray}">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="10*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
|
||||
</Grid>
|
||||
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
||||
</UserControl>
|
||||
|
||||
+557
-70
@@ -1,4 +1,5 @@
|
||||
Imports EgtUILib
|
||||
Imports System.Windows.Forms.Integration
|
||||
Imports EgtUILib
|
||||
|
||||
Public Class MoveRawPartPage
|
||||
' Riferimento alla MainWindow
|
||||
@@ -11,8 +12,12 @@ Public Class MoveRawPartPage
|
||||
Private m_nAuxTabId As Integer = GDB_ID.NULL
|
||||
' Fase corrente
|
||||
Private m_nCurrPhase As Integer = 0
|
||||
' Disposizione corrente
|
||||
Private m_nCurrDisposition As Integer = GDB_ID.NULL
|
||||
' Premuto Prev
|
||||
Private m_bPrev As Boolean = False
|
||||
' Pemuto Next
|
||||
Private m_bToNext As Boolean = False
|
||||
' Dati movimento
|
||||
Private m_dStep As Double = 0
|
||||
Private m_dRotation As Double = 0
|
||||
@@ -27,20 +32,28 @@ Public Class MoveRawPartPage
|
||||
Private m_bRemovedRaw As Boolean = False ' flag per rimozione manuale pezzi
|
||||
Private m_RawMoveDataList As New List(Of RawMoveData) ' dati di movimento
|
||||
Private m_bRawWithCups As Boolean = False ' flag per pezzo corrente con ventose
|
||||
|
||||
' Visibilità comando Scrap
|
||||
Private m_ScrapsVisibility As Visibility = Visibility.Visible
|
||||
Private m_CurrRawOnVacuum As Integer = GDB_ID.NULL
|
||||
|
||||
' definisce se è stata inserito uno scarico
|
||||
Private m_IsCurrPhaseUnloaded As Boolean = False
|
||||
|
||||
Private Sub MoveRawPartPage_Initialized(sender As Object, e As EventArgs) Handles Me.Initialized
|
||||
' Assegno testi
|
||||
RemovePartBtn.Content = EgtMsg(MSG_MOVERAWPAGEUC + 1) 'Rimuovi
|
||||
ModifyBtn.Content = EgtMsg(MSG_SPLITPAGEUC + 17) 'Modifica
|
||||
ResetBtn.Content = EgtMsg(MSG_NESTPAGEUC + 6) 'Reset
|
||||
ScrapsBtn.Content = "Add Scraps"
|
||||
UnloadPartsBtn.Content = "Move part"
|
||||
End Sub
|
||||
|
||||
Private Sub MoveRawPartPage_Loaded(sender As Object, e As EventArgs) Handles Me.Loaded
|
||||
m_CurrProjPage = m_MainWindow.m_CurrentProjectPageUC
|
||||
m_SplitPage = m_MainWindow.m_CadCutPageUC.m_SplitPage
|
||||
m_bActive = True
|
||||
' resetto l'inidice del pezzo da mnovimentare
|
||||
m_CurrRawOnVacuum = GDB_ID.NULL
|
||||
' Leggo tipo movimento grezzi
|
||||
m_bByHand = (GetVacuumType() = 0 Or
|
||||
Not m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.AUTO_MANIP) Or
|
||||
@@ -52,48 +65,73 @@ Public Class MoveRawPartPage
|
||||
End If
|
||||
' Deseleziono tutto
|
||||
EgtDeselectAll()
|
||||
' Recupero i tagli allungati prima definiti
|
||||
' resetto variabili di navigazione nelle fasi
|
||||
m_bPrev = False
|
||||
m_bToNext = False
|
||||
|
||||
'---------------------------- CREATE NEW PHASE ----------------------------
|
||||
' Recupero i tagli ABILITATI prima definiti
|
||||
Dim Cuts(0) As Integer
|
||||
m_SplitPage.GetEnabledCuts(Cuts)
|
||||
' Fase precedente
|
||||
Dim nPrevPhase As Integer = EgtGetCurrPhase()
|
||||
' Creo nuova fase, eseguo spezzatura grezzi e vi sposto le lavorazioni
|
||||
Dim vNewRaws As New List(Of Integer)
|
||||
If Not m_SplitPage.m_bShow Then
|
||||
' Creo nuova fase, eseguo spezzatura grezzi e vi sposto le lavorazioni
|
||||
Dim vNewRaws As New List(Of Integer)
|
||||
SplitRawParts(nPrevPhase, Cuts, vNewRaws)
|
||||
m_IsCurrPhaseUnloaded = False
|
||||
Else
|
||||
EgtSetCurrPhase(nPrevPhase + 1)
|
||||
nPrevPhase = nPrevPhase + 1
|
||||
EgtSetCurrPhase(nPrevPhase)
|
||||
HideAllMachinings()
|
||||
' verifico se la fase corrente è di tipo scarico frontale
|
||||
m_nCurrDisposition = EgtGetPhaseDisposition(nPrevPhase)
|
||||
If IsDispUnloadOnAuxTab(m_nCurrDisposition) Then
|
||||
m_SplitPage.m_bOnAuxTab = True
|
||||
End If
|
||||
End If
|
||||
m_nCurrPhase = EgtGetCurrPhase()
|
||||
' Se movimento pezzi finale, sistemazioni per tavolo ausiliario
|
||||
If m_SplitPage.m_bOnAuxTab Then
|
||||
m_nAuxTabId = EgtGetTableId(AUX_TAB)
|
||||
' Visualizzo tavolo ausiliario
|
||||
Dim bOldEnMod As Boolean = EgtGetEnableModified()
|
||||
If bOldEnMod Then EgtDisableModified()
|
||||
EgtSetStatus(m_nAuxTabId, GDB_ST.ON_)
|
||||
If bOldEnMod Then EgtEnableModified()
|
||||
' Se definizione movimenti
|
||||
If Not m_SplitPage.m_bShow Then
|
||||
' Area tavolo ausiliario
|
||||
Dim b3AuxTab As New BBox3d
|
||||
EgtGetBBoxGlob(EgtGetFirstNameInGroup(m_nAuxTabId, "A1"), GDB_BB.STANDARD, b3AuxTab)
|
||||
' Area tavolo principale
|
||||
Dim b3Tab As New BBox3d
|
||||
EgtGetTableArea(1, b3Tab)
|
||||
' Imposto offset su tavolo principale per includere anche il secondario
|
||||
Dim dOffsXP As Double = Math.Max(b3AuxTab.Max().x - b3Tab.Max().x, 0)
|
||||
Dim dOffsYP As Double = Math.Max(b3AuxTab.Max().y - b3Tab.Max().y, 0)
|
||||
Dim dOffsXM As Double = Math.Max(b3Tab.Min().x - b3AuxTab.Min().x, 0)
|
||||
Dim dOffsYM As Double = Math.Max(b3Tab.Min().y - b3AuxTab.Min().y, 0)
|
||||
EgtSetTableAreaOffset(dOffsXP, dOffsYP, dOffsXM, dOffsYM)
|
||||
'---------------------------- CREATE NEW PHASE ----------------------------
|
||||
|
||||
'---------------------------- SCRAPS ----------------------------
|
||||
' gestione visualizzazione del comando "Scraps"
|
||||
Dim ScrapsVisibility As Visibility = Visibility.Collapsed
|
||||
' verifico se licenza abilitat: m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.SCRAPS)
|
||||
If GetPrivateProfileInt(S_SCRAPS, K_ENABLESCRAPS, 0, m_MainWindow.GetIniFile()) <> 0 Then
|
||||
' leggo il direttorio in cui cercare il database delle lastre
|
||||
Dim PhotDir As String = String.Empty
|
||||
GetPrivateProfileString(S_SCRAPS, K_PHOTODIR, "", PhotDir, m_MainWindow.GetIniFile())
|
||||
' verifico che esista il file "OmagPHOTOVb.sqlite" nel direttorio inidicato
|
||||
If System.IO.File.Exists(PhotDir.Trim & "\OmagPHOTODb.sqlite") Then
|
||||
ScrapsVisibility = Visibility.Visible
|
||||
End If
|
||||
EgtZoom(ZM.ALL)
|
||||
' altrimenti, aggiorno visualizzazione
|
||||
Else
|
||||
EgtDraw()
|
||||
End If
|
||||
' verifico che siano stati generati dei nuovi grezzi
|
||||
If vNewRaws.Count = 0 Then
|
||||
ScrapsVisibility = Visibility.Collapsed
|
||||
End If
|
||||
' aggiorno la grafica
|
||||
m_ScrapsVisibility = ScrapsVisibility
|
||||
If m_ScrapsVisibility <> Visibility.Visible Then
|
||||
Grid.SetColumnSpan(RemovePartBtn, 3)
|
||||
Else
|
||||
Grid.SetColumnSpan(RemovePartBtn, 2)
|
||||
End If
|
||||
'---------------------------- SCRAPS ----------------------------
|
||||
|
||||
'---------------------------- AUX TABLE ----------------------------
|
||||
' Se movimento pezzi finale, sistemazioni per tavolo ausiliario
|
||||
If m_SplitPage.m_bOnAuxTab And m_SplitPage.m_bEnableOnAuxTab Then
|
||||
' assegnazione delle info tavola ausiliaria alla dispozione corrente (Spostato nella funzione Refresh)
|
||||
SetAuxTabInCurrDisposition()
|
||||
UnloadPartsBtn.Content = "Go to MOVE part"
|
||||
' altrimenti, aggiorno visualizzazione
|
||||
ElseIf Not m_SplitPage.m_bOnAuxTab And m_SplitPage.m_bEnableOnAuxTab Then
|
||||
EgtDraw()
|
||||
UnloadPartsBtn.Content = "Go to UNLOAD part"
|
||||
End If
|
||||
'---------------------------- AUX TABLE ----------------------------
|
||||
|
||||
' Carico i parametri di movimento
|
||||
m_dStep = GetPrivateProfileDouble(S_RAWMOVE, K_RAWSTEP, 50, m_MainWindow.GetIniFile())
|
||||
' Ricavo la lunghezza del baffo di taglio
|
||||
@@ -128,14 +166,14 @@ Public Class MoveRawPartPage
|
||||
' Distanza iniziale
|
||||
m_dCurrDist = 0
|
||||
End If
|
||||
' Non dovrebbe mai accadere, ma inizializzo con default
|
||||
' Non dovrebbe mai accadere, ma inizializzo con default
|
||||
Else
|
||||
m_vtDir = Vector3d.Y_AX()
|
||||
m_ptMid = Point3d.ORIG()
|
||||
m_dOrigDist = 0
|
||||
m_dCurrDist = 0
|
||||
End If
|
||||
' Altrimenti movimento con ventose
|
||||
' Altrimenti movimento con ventose
|
||||
Else
|
||||
m_bRemovedRaw = False
|
||||
m_bRawWithCups = False
|
||||
@@ -149,6 +187,33 @@ Public Class MoveRawPartPage
|
||||
GetMoveInfoInDisposition(nDispId, m_RawMoveDataList)
|
||||
End If
|
||||
End If
|
||||
|
||||
' aggiorno il messaggio del comando per gestire gli sfridi
|
||||
VerifyIsNewScrap(m_CurrRawOnVacuum)
|
||||
' aggiorno la visibilità dei comandi
|
||||
RefreshVisibility()
|
||||
' salvo l'idice della fase corrente
|
||||
m_nCurrDisposition = EgtGetPhaseDisposition(m_nCurrPhase)
|
||||
' Abilitazione bottone modifica
|
||||
ModifyBtn.IsEnabled = m_SplitPage.m_bShow
|
||||
' gestione abilitazione altri bottoni
|
||||
EnableButtons()
|
||||
End Sub
|
||||
|
||||
' Gestione di visualizzazione dei comandi per il movimento dei pezzi
|
||||
Private Sub RefreshVisibility()
|
||||
' Aggiorno visulizzazione comando per passare alla pagina di scarico
|
||||
If Not m_SplitPage.m_bEnableOnAuxTab Then
|
||||
UnloadPartsBtn.Visibility = Visibility.Hidden
|
||||
Else
|
||||
UnloadPartsBtn.Visibility = Visibility.Visible
|
||||
If m_SplitPage.m_bOnAuxTab Then
|
||||
UnloadPartsBtn.Content = "Go to MOVE part"
|
||||
' altrimenti, aggiorno visualizzazione
|
||||
Else
|
||||
UnloadPartsBtn.Content = "Go to UNLOAD part"
|
||||
End If
|
||||
End If
|
||||
' Aggiorno interfaccia per taglio perpendicolare
|
||||
If m_bByHand Then
|
||||
UpBtn.Visibility = Windows.Visibility.Visible
|
||||
@@ -164,8 +229,10 @@ Public Class MoveRawPartPage
|
||||
TopRBtn.Visibility = Windows.Visibility.Hidden
|
||||
BottomLBtn.Visibility = Windows.Visibility.Hidden
|
||||
BottomRBtn.Visibility = Windows.Visibility.Hidden
|
||||
PauseBtn.Visibility = Windows.Visibility.Hidden
|
||||
ResetBtn.Visibility = Windows.Visibility.Hidden
|
||||
' altrimenti per movimento con ventose
|
||||
ScrapsBtn.Visibility = m_ScrapsVisibility
|
||||
' altrimenti per movimento con ventose
|
||||
ElseIf Not m_SplitPage.m_bOnAuxTab Then
|
||||
UpBtn.Visibility = Windows.Visibility.Visible
|
||||
LeftBtn.Visibility = Windows.Visibility.Visible
|
||||
@@ -180,8 +247,10 @@ Public Class MoveRawPartPage
|
||||
TopRBtn.Visibility = Windows.Visibility.Hidden
|
||||
BottomLBtn.Visibility = Windows.Visibility.Hidden
|
||||
BottomRBtn.Visibility = Windows.Visibility.Hidden
|
||||
PauseBtn.Visibility = Windows.Visibility.Hidden
|
||||
ResetBtn.Visibility = Windows.Visibility.Hidden
|
||||
' altrimenti per movimento finale dei pezzi
|
||||
ScrapsBtn.Visibility = m_ScrapsVisibility
|
||||
' altrimenti per movimento finale dei pezzi
|
||||
Else
|
||||
UpBtn.Visibility = Windows.Visibility.Hidden
|
||||
LeftBtn.Visibility = Windows.Visibility.Hidden
|
||||
@@ -196,12 +265,37 @@ Public Class MoveRawPartPage
|
||||
TopRBtn.Visibility = Windows.Visibility.Visible
|
||||
BottomLBtn.Visibility = Windows.Visibility.Visible
|
||||
BottomRBtn.Visibility = Windows.Visibility.Visible
|
||||
PauseBtn.Visibility = Windows.Visibility.Visible
|
||||
ResetBtn.Visibility = Windows.Visibility.Visible
|
||||
ScrapsBtn.Visibility = Windows.Visibility.Hidden
|
||||
End If
|
||||
' Abilitazione bottone modifica
|
||||
ModifyBtn.IsEnabled = m_SplitPage.m_bShow
|
||||
' gestione abilitazione altri bottoni
|
||||
EnableButtons()
|
||||
End Sub
|
||||
|
||||
Private Sub SetAuxTabInCurrDisposition()
|
||||
' Se movimento pezzi finale, sistemazioni per tavolo ausiliario
|
||||
m_nAuxTabId = EgtGetTableId(AUX_TAB)
|
||||
' Visualizzo tavolo ausiliario
|
||||
Dim bOldEnMod As Boolean = EgtGetEnableModified()
|
||||
If bOldEnMod Then EgtDisableModified()
|
||||
EgtSetStatus(m_nAuxTabId, GDB_ST.ON_)
|
||||
If bOldEnMod Then EgtEnableModified()
|
||||
' Se definizione movimenti
|
||||
If Not m_SplitPage.m_bShow Then
|
||||
' Area tavolo ausiliario
|
||||
Dim b3AuxTab As New BBox3d
|
||||
EgtGetBBoxGlob(EgtGetFirstNameInGroup(m_nAuxTabId, "A1"), GDB_BB.STANDARD, b3AuxTab)
|
||||
' Area tavolo principale
|
||||
Dim b3Tab As New BBox3d
|
||||
EgtGetTableArea(1, b3Tab)
|
||||
' Imposto offset su tavolo principale per includere anche il secondario
|
||||
Dim dOffsXP As Double = Math.Max(b3AuxTab.Max().x - b3Tab.Max().x, 0)
|
||||
Dim dOffsYP As Double = Math.Max(b3AuxTab.Max().y - b3Tab.Max().y, 0)
|
||||
Dim dOffsXM As Double = Math.Max(b3Tab.Min().x - b3AuxTab.Min().x, 0)
|
||||
Dim dOffsYM As Double = Math.Max(b3Tab.Min().y - b3AuxTab.Min().y, 0)
|
||||
EgtSetTableAreaOffset(dOffsXP, dOffsYP, dOffsXM, dOffsYM)
|
||||
End If
|
||||
EgtZoom(ZM.ALL)
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub OnMyMouseDownScene(sender As Object, e As System.Windows.Forms.MouseEventArgs) Handles m_CurrProjPage.OnMouseDownScene
|
||||
@@ -232,10 +326,12 @@ Public Class MoveRawPartPage
|
||||
If nParentId = nRawGroupId Then
|
||||
Dim nStat As Integer = GDB_ST.ON_
|
||||
EgtGetStatus(nId, nStat)
|
||||
' aggiorno il messaggio del bottone "Scrap" a seconda che il grezzo sia già uno scrap
|
||||
VerifyIsNewScrap(nId)
|
||||
' Se il pezzo corrente è selezionato allora lo disattivo -> deposito del pezzo
|
||||
If nStat = GDB_ST.SEL Then
|
||||
EgtSetStatus(nId, GDB_ST.ON_)
|
||||
' prima di rilasciare il pezzo verifico che non vada in collisione con altri pezzi sulla tavola
|
||||
' prima di rilasciare il pezzo verifico che non vada in collisione con altri pezzi sulla tavola (evito il controllo se ultima fase)
|
||||
If VerifyCollisionWithOtherRawPart(nId) Then
|
||||
' mantengo la selezione del pezzo
|
||||
EgtSetStatus(nId, GDB_ST.SEL)
|
||||
@@ -271,9 +367,9 @@ Public Class MoveRawPartPage
|
||||
MaxDoublePlugger = GetPrivateProfileDouble(S_MACH_RAWMOVE, K_MACH_WEIGHT_DOUBLEPLUGGER, MaxDoublePlugger, m_MainWindow.GetMachIniFile())
|
||||
Dim AverageDensity As Double = 2700
|
||||
AverageDensity = GetPrivateProfileDouble(S_MATERIALS, K_AVERAGEDENSITY, AverageDensity, m_MainWindow.GetMachIniFile())
|
||||
VacuumCups.GetWeightInformation(AverageDensity, MaxSinglePlugger, MaxDoublePlugger)
|
||||
VacuumCups.GetRotationForExtraStrokeY(GetPrivateProfileInt(S_MACH_RAWMOVE, K_MACH_ROTATEVACUUMFOREXTRASTROKEY, 0, m_MainWindow.GetMachIniFile()) <> 0)
|
||||
VacuumCups.GetRotationForExtraStrokeX(GetPrivateProfileInt(S_MACH_RAWMOVE, K_MACH_ROTATEVACUUMFOREXTRASTROKEX, 0, m_MainWindow.GetMachIniFile()) <> 0)
|
||||
VacuumCups.SetWeightInformation(AverageDensity, MaxSinglePlugger, MaxDoublePlugger)
|
||||
VacuumCups.SetRotationForExtraStrokeY(GetPrivateProfileInt(S_MACH_RAWMOVE, K_MACH_ROTATEVACUUMFOREXTRASTROKEY, 0, m_MainWindow.GetMachIniFile()) <> 0)
|
||||
VacuumCups.SetRotationForExtraStrokeX(GetPrivateProfileInt(S_MACH_RAWMOVE, K_MACH_ROTATEVACUUMFOREXTRASTROKEX, 0, m_MainWindow.GetMachIniFile()) <> 0)
|
||||
If PutVacuumCupsOnRaw(nId, rmData) Then
|
||||
' Visualizzo le ventose
|
||||
EgtSetStatus(GetVacuumId(), GDB_ST.ON_)
|
||||
@@ -316,6 +412,8 @@ Public Class MoveRawPartPage
|
||||
|
||||
' Veririfica che il grezzo non entri in colliosione con altri pezzi
|
||||
Private Function VerifyCollisionWithOtherRawPart(nIdOnVacumm As Integer) As Boolean
|
||||
' se movimento su tavola di scarico non eseguo il controllo (evito di segnalre errori per pezzi ricavati interni al grezzo...)
|
||||
If m_SplitPage.m_bOnAuxTab Then Return False
|
||||
If nIdOnVacumm = GDB_ID.NULL Then Return False
|
||||
' Creo gruppo temporaneo in cui generare le superfici per la veririfica di collisione
|
||||
Dim m_nTempId As Integer = EgtCreateGroup(GDB_ID.ROOT)
|
||||
@@ -347,6 +445,27 @@ Public Class MoveRawPartPage
|
||||
Return False
|
||||
End Function
|
||||
|
||||
Private Function VerifyIsNewScrap(nMyId As Integer) As Boolean
|
||||
Dim nVal As Integer = 0
|
||||
If EgtGetInfo(nMyId, K_ISNEWSCRAPS, nVal) Then
|
||||
If nVal = 1 Or nVal = 2 Then
|
||||
' 1 → è stato definito come nuovo grezzo oppure, 2 → è stato definito come nuovo grezzo ed è stato inserito nel DB delle lastre
|
||||
ScrapsBtn.Content = "Remove Scrap"
|
||||
ScrapsBtn.IsEnabled = True And Not m_SplitPage.m_bShow
|
||||
Return True
|
||||
ElseIf nVal = 3 Then
|
||||
' non è possibile rimuovere il grezzo in questa fase
|
||||
ScrapsBtn.Content = "Defined as Scrap"
|
||||
ScrapsBtn.IsEnabled = False
|
||||
Return True
|
||||
End If
|
||||
End If
|
||||
' non è un nuovo grezzo
|
||||
ScrapsBtn.Content = "Add Scrap"
|
||||
ScrapsBtn.IsEnabled = True And Not m_SplitPage.m_bShow
|
||||
Return False
|
||||
End Function
|
||||
|
||||
#Region "Move Up/Down/Left/Right"
|
||||
|
||||
Private Sub UpBtn_Click(sender As Object, e As RoutedEventArgs) Handles UpBtn.Click
|
||||
@@ -367,7 +486,7 @@ Public Class MoveRawPartPage
|
||||
If EgtMoveRawPart(nRawId, dMove * m_vtDir) Then
|
||||
m_dCurrDist += Math.Abs(dMove)
|
||||
End If
|
||||
' Altrimenti movimento Y +
|
||||
' Altrimenti movimento Y +
|
||||
Else
|
||||
If m_bRawWithCups Then
|
||||
Dim vtMove As New Vector3d(0, m_dStep, 0)
|
||||
@@ -410,7 +529,7 @@ Public Class MoveRawPartPage
|
||||
If EgtMoveRawPart(nRawId, dMove * m_vtDir) Then
|
||||
m_dCurrDist -= Math.Abs(dMove)
|
||||
End If
|
||||
' Altrimenti movimento Y -
|
||||
' Altrimenti movimento Y -
|
||||
Else
|
||||
If m_bRawWithCups Then
|
||||
Dim vtMove As New Vector3d(0, -m_dStep, 0)
|
||||
@@ -679,6 +798,56 @@ Public Class MoveRawPartPage
|
||||
EgtDraw()
|
||||
End Sub
|
||||
|
||||
Private Sub ScrapsBtn_Click(Sender As Object, e As RoutedEventArgs) Handles ScrapsBtn.Click
|
||||
Dim nRawId As Integer = EgtGetFirstSelectedObj()
|
||||
While nRawId <> GDB_ID.NULL
|
||||
' verifico che il grezzo non contenga dei pezzi (altrimenti non risulta selezionabile)
|
||||
Dim nPartInRaw As Integer = EgtGetFirstPartInRawPart(nRawId)
|
||||
If nPartInRaw = GDB_ID.NULL Then
|
||||
If Not VerifyIsNewScrap(nRawId) Then
|
||||
EgtSetInfo(nRawId, K_ISNEWSCRAPS, "1")
|
||||
Else
|
||||
EgtRemoveInfo(nRawId, K_ISNEWSCRAPS)
|
||||
End If
|
||||
' aggiorno il contenuto del bottone
|
||||
VerifyIsNewScrap(nRawId)
|
||||
Else
|
||||
' coumico che il grezzo contiene un pezzo e quindi non può essere definito come grezzo
|
||||
m_CurrProjPage.ClearMessage()
|
||||
m_CurrProjPage.SetErrorMessage("Part inside raw!")
|
||||
End If
|
||||
' passo al grezzo succesivo (NON dovrebbero esserci altri grezzi selezionabili contemporaneamente!)
|
||||
nRawId = EgtGetNextSelectedObj()
|
||||
End While
|
||||
End Sub
|
||||
|
||||
' Passo dalla pagina di movimento dei pezzi alla pagina di scarico
|
||||
Private Sub UnloadPartBtn_Click() Handles UnloadPartsBtn.Click
|
||||
' forzo lo stato di scarico frontale oppure di movimento
|
||||
m_SplitPage.m_bOnAuxTab = Not m_SplitPage.m_bOnAuxTab
|
||||
|
||||
' se rientro nella fase di spostamenti allora nascondo la tavola di scarico
|
||||
If Not m_SplitPage.m_bOnAuxTab Then
|
||||
' se ci sono pezzi sulla tavola di scarico non posso nasconderla
|
||||
Dim LclLstOfUnldPart As New List(Of Integer)
|
||||
If Not PartOnAuxTab(LclLstOfUnldPart, m_nCurrPhase) Then
|
||||
EgtDisableModified()
|
||||
' nascondo la tavola di scarico
|
||||
EgtSetStatus(m_nAuxTabId, GDB_ST.OFF)
|
||||
' Nascondo eventuali pezzi in parcheggio
|
||||
HideParkedParts()
|
||||
EgtEnableModified()
|
||||
End If
|
||||
Else
|
||||
' Assegnazione delle info tavola ausiliaria alla dispozione corrente
|
||||
SetAuxTabInCurrDisposition()
|
||||
End If
|
||||
|
||||
' Mantengo la fase che è stata creata e passo a gestire solo la visualizzazione dei bottoni
|
||||
RefreshVisibility()
|
||||
EgtZoom(ZM.ALL, True)
|
||||
End Sub
|
||||
|
||||
Private Sub StepMoveTxBx_EgtClosed(sender As Object, e As EventArgs) Handles StepMoveTxBx.EgtClosed
|
||||
Dim dStep As Double
|
||||
If StringToLen(StepMoveTxBx.Text, dStep) Then
|
||||
@@ -720,30 +889,34 @@ Public Class MoveRawPartPage
|
||||
Dim ptRef As Point3d
|
||||
If Not EgtGetInfo(nRefId, "Pos", ptRef) Then Return
|
||||
Dim sCorn As String = ""
|
||||
EgtGetInfo( nRefId, "COR", sCorn)
|
||||
Select sCorn
|
||||
Case "TL"
|
||||
nCorn = MCH_CR.TL
|
||||
Case "TR"
|
||||
nCorn = MCH_CR.TR
|
||||
Case "BL"
|
||||
nCorn = MCH_CR.BL
|
||||
Case "BR"
|
||||
nCorn = MCH_CR.BR
|
||||
EgtGetInfo(nRefId, "COR", sCorn)
|
||||
Select Case sCorn
|
||||
Case "TL"
|
||||
nCorn = MCH_CR.TL
|
||||
Case "TR"
|
||||
nCorn = MCH_CR.TR
|
||||
Case "BL"
|
||||
nCorn = MCH_CR.BL
|
||||
Case "BR"
|
||||
nCorn = MCH_CR.BR
|
||||
End Select
|
||||
' Recupero il centro del grezzo
|
||||
Dim ptRawCen As Point3d
|
||||
EgtGetRawPartCenter(nRawId, ptRawCen)
|
||||
' Sposto il grezzo in battuta sul corner
|
||||
Dim dAngRaw As Double = 0
|
||||
Dim dNewAngRot As Double = 0
|
||||
|
||||
Dim AngRotList As New List(Of Double)
|
||||
|
||||
' ricavo l'angolo di posizionamento del grezzo/pezzo sulla tavola
|
||||
If Not DispositionRawOnTable(nRawId, dAngRaw, AngRotList) Then Return
|
||||
Dim bb3dRaw As New BBox3d
|
||||
EgtGetRawPartBBox(nRawId, bb3dRaw)
|
||||
Dim ForceToRotate As Boolean = bb3dRaw.DimX < bb3dRaw.DimY
|
||||
|
||||
' provo a verificare di poter depositare il pezzo (senza applicare delle rotazioni)
|
||||
If Not EgtMoveToCornerRawPart(nRawId, ptRef, nCorn) Then
|
||||
If Not EgtMoveToCornerRawPart(nRawId, ptRef, nCorn) Or ForceToRotate Then
|
||||
' se sono impostati degli step di rotazione
|
||||
If AngRotList.Count > 0 Then
|
||||
Dim bOkRotate As Boolean = False
|
||||
@@ -763,12 +936,26 @@ Public Class MoveRawPartPage
|
||||
Next
|
||||
If Not bOkRotate Then Return
|
||||
Else
|
||||
If EgtRotateRawPart(nRawId, Vector3d.Z_AX(), -dAngRaw) Then
|
||||
' sposto il pezzo in centro tavola → perchè tutti i movimenti sono fatti ruotando il pezzo in centro tavola!
|
||||
Dim b3Area As New BBox3d
|
||||
EgtGetTableArea(1, b3Area)
|
||||
Dim b3RawTemp As New BBox3d
|
||||
EgtGetRawPartBBox(nRawId, b3RawTemp)
|
||||
' ricavo il riferimento dell'angolo in basso a sinstra del grezzo rispetto alla tavola
|
||||
Dim ptCorner As Point3d = New Point3d(b3Area.DimX / 2, b3Area.DimY / 2, 0) - New Vector3d(b3RawTemp.DimX / 2, b3RawTemp.DimY / 2, 0)
|
||||
' sposto il pezzo in questa posizione
|
||||
EgtMoveToCornerRawPart(nRawId, ptCorner, MCH_CR.BL)
|
||||
' riprovo il movimento
|
||||
dNewAngRot = GetPrefRotAng(dAngRaw)
|
||||
'dNewAngRot = DeltaAngC
|
||||
If EgtRotateRawPart(nRawId, Vector3d.Z_AX(), dNewAngRot) Then
|
||||
If Not EgtMoveToCornerRawPart(nRawId, ptRef, nCorn) Then
|
||||
' riposiziono il pezzo come era prima
|
||||
EgtRotateRawPart(nRawId, Vector3d.Z_AX(), dAngRaw)
|
||||
EgtRotateRawPart(nRawId, Vector3d.Z_AX(), -dAngRaw)
|
||||
EgtDraw()
|
||||
Return
|
||||
End If
|
||||
dAngRaw = dNewAngRot
|
||||
Else
|
||||
Return
|
||||
End If
|
||||
@@ -794,17 +981,18 @@ Public Class MoveRawPartPage
|
||||
End If
|
||||
nOtherRaw = EgtGetNextRawPart(nOtherRaw)
|
||||
End While
|
||||
|
||||
' Determino il movimento effettuato
|
||||
Dim ptNewRawCen As Point3d
|
||||
EgtGetRawPartCenter(nRawId, ptNewRawCen)
|
||||
' Se tutto bene, aggiorno lista movimenti
|
||||
If bRawOk Then
|
||||
AddRawMoveData(nRawId, ptNewRawCen - ptRawCen, m_RawMoveDataList)
|
||||
If dAngRaw <> 0 Then AddRawMoveData(nRawId, -dAngRaw, m_RawMoveDataList)
|
||||
If dAngRaw <> 0 Then AddRawMoveData(nRawId, dAngRaw, m_RawMoveDataList)
|
||||
' altrimenti annullo il movimento
|
||||
Else
|
||||
EgtMoveRawPart(nRawId, ptRawCen - ptNewRawCen)
|
||||
EgtRotateRawPart(nRawId, Vector3d.Z_AX(), dAngRaw)
|
||||
EgtRotateRawPart(nRawId, Vector3d.Z_AX(), -dAngRaw)
|
||||
m_CurrProjPage.SetWarningMessage(EgtMsg(MSG_MOVERAWPAGEUC + 3)) ' Posizione scelta già occupata
|
||||
End If
|
||||
' Disabilito pezzo e nascondo le ventose
|
||||
@@ -877,6 +1065,137 @@ Public Class MoveRawPartPage
|
||||
Return True
|
||||
End Function
|
||||
|
||||
' determino la migliore rotazione per portare il pezzo in orizzontale
|
||||
Private Function GetPrefRotAng(ByVal dAngDeg As Double) As Double
|
||||
Dim dNewAngDeg As Double = -dAngDeg
|
||||
If dAngDeg > 90 And dAngDeg < 270 Then
|
||||
dNewAngDeg = 180 - dAngDeg
|
||||
End If
|
||||
Return dNewAngDeg
|
||||
End Function
|
||||
|
||||
Private Sub PauseBtn_Click(sender As Object, e As RoutedEventArgs) Handles PauseBtn.Click
|
||||
' verifico la presenza di eventuali pezzi sulla tavola di scarico
|
||||
Dim LclLstOfUnldPart As New List(Of Integer)
|
||||
PartOnAuxTab(LclLstOfUnldPart, m_nCurrPhase)
|
||||
If Not InsertPauseInCurrPhase() Then Return
|
||||
AddNewPhase()
|
||||
End Sub
|
||||
|
||||
' restituisce la lista dei pezzi che sono sulla tavola di scarico nella fase indicata
|
||||
Private Function PartOnAuxTab(ByRef ListOfUnloadedPatr As List(Of Integer), nPhase As Integer) As Boolean
|
||||
m_IsCurrPhaseUnloaded = False
|
||||
' Area tavolo ausiliario
|
||||
Dim b3AuxTab As New BBox3d
|
||||
EgtGetBBoxGlob(EgtGetFirstNameInGroup(m_nAuxTabId, "A1"), GDB_BB.STANDARD, b3AuxTab)
|
||||
' Area pezzi
|
||||
Dim nOtherRaw As Integer = EgtGetFirstRawPart()
|
||||
While nOtherRaw <> GDB_ID.NULL
|
||||
If EgtVerifyRawPartPhase(nOtherRaw, nPhase) Then
|
||||
Dim b3OtherRaw As New BBox3d
|
||||
' EgtGetRawPartBBox(nOtherRaw, b3OtherRaw)
|
||||
EgtGetBBoxGlob(nOtherRaw, GDB_BB.STANDARD, b3OtherRaw)
|
||||
' se il centro del pezzo è sulla tavola di scarico
|
||||
If b3OtherRaw.Center.y < b3AuxTab.Max().y Then
|
||||
m_IsCurrPhaseUnloaded = True
|
||||
ListOfUnloadedPatr.Add(nOtherRaw)
|
||||
' salvo l'info che indica che il pezzo deve essere scaricato
|
||||
EgtSetInfo(nOtherRaw, "Unloaded", 1)
|
||||
'Exit While
|
||||
End If
|
||||
End If
|
||||
nOtherRaw = EgtGetNextRawPart(nOtherRaw)
|
||||
End While
|
||||
Return m_IsCurrPhaseUnloaded
|
||||
End Function
|
||||
|
||||
' inserisce una pausa nella fase corrente
|
||||
Private Function InsertPauseInCurrPhase() As Boolean
|
||||
' verifico che ci sia almeno un elemto selezionato (dati di aggancio pezzo)
|
||||
If m_RawMoveDataList.Count = 0 Then Return False
|
||||
' verifico che sia stato inseito almeno uno spostamento, altrimenti lo rimuovo
|
||||
Dim Index As Integer = 0
|
||||
For Index = m_RawMoveDataList.Count - 1 To 0 Step -1
|
||||
If Math.Abs(m_RawMoveDataList(Index).m_vtRawMove.x) < EPS_SMALL AndAlso Math.Abs(m_RawMoveDataList(Index).m_vtRawMove.y) < EPS_SMALL Then
|
||||
m_RawMoveDataList.RemoveAt(Index)
|
||||
End If
|
||||
Next
|
||||
' verifico che la lista non sia vuota
|
||||
If m_RawMoveDataList.Count = 0 Then
|
||||
Return False
|
||||
End If
|
||||
' recupero disposizione fase corrente
|
||||
Dim nDispId As Integer = EgtGetPhaseDisposition(m_nCurrPhase)
|
||||
' imposto la pausa nella disposizione corrente
|
||||
SetPause(nDispId)
|
||||
' aggiungo al gruppo disposizione dei sottogruppi con i dati di movimento dei grezzi spostati
|
||||
SaveMoveInfoInDisposition(nDispId, m_RawMoveDataList)
|
||||
' imposto eventuale movimento pezzi su tavola ausiliaria
|
||||
SaveMovePartsOnAuxTable(nDispId, m_IsCurrPhaseUnloaded)
|
||||
' SaveMovePartsOnAuxTable(nDispId, m_SplitPage.m_bOnAuxTab)
|
||||
'' Eseguo calcolo speciale dei movimenti: per tavola multicut
|
||||
'SpecialApplyDisposition(nDispId, True, Not m_SplitPage.m_bOnAuxTab)
|
||||
SaveRemoveByHandInDisposition(nDispId, False)
|
||||
Return True
|
||||
End Function
|
||||
|
||||
' crea una nuvoa fase/disposizione, la rende corrente, ricalcolo i grezzi e le lavorazioni della nuova fase
|
||||
Private Function AddNewPhase() As Boolean
|
||||
' Creo nuova fase
|
||||
Dim nNewPhase As Integer = EgtAddPhase()
|
||||
' Carico i grezzi rimasti sulla tavola nella nuova fase
|
||||
ChangePhaseRawPart(nNewPhase)
|
||||
' Sposto le lavorazioni rimaste nella nuova fase
|
||||
ChangeOperationPhase(nNewPhase)
|
||||
|
||||
Dim nCurrDisposition As Integer = EgtGetPhaseDisposition(nNewPhase)
|
||||
'SetPause(nCurrDisposition)
|
||||
m_nCurrDisposition = nCurrDisposition
|
||||
' EgtSetStatus(nRawIdSlected, GDB_ST.OFF)
|
||||
EgtSetStatus(GetVacuumId(), GDB_ST.OFF)
|
||||
EgtSetCurrPhase(nNewPhase)
|
||||
SetAuxTabInCurrDisposition()
|
||||
' ripulisco la lista degli spostamenti
|
||||
m_RawMoveDataList.Clear()
|
||||
m_IsCurrPhaseUnloaded = False
|
||||
' aggiorno la fase corrente
|
||||
m_nCurrPhase = EgtGetCurrPhase()
|
||||
Return True
|
||||
End Function
|
||||
|
||||
' Copio i grezzi rimasti sulla tavola nella fase successiva
|
||||
Private Sub ChangePhaseRawPart(ByVal nNewPhase As Integer)
|
||||
' recupero l'elenco dei pezzi che sono stati scaricati sulla tavola
|
||||
Dim LocalLstOfUnldPart As New List(Of Integer)
|
||||
PartOnAuxTab(LocalLstOfUnldPart, nNewPhase - 1)
|
||||
' Eseguo eventuali spezzature dei grezzi e vi sposto i pezzi (i grezzi devono essere sempre copiati per Registrazione con rotazione)
|
||||
Dim nRawId As Integer = EgtGetFirstRawPart()
|
||||
While nRawId <> GDB_ID.NULL
|
||||
' se il grezzo è presente nella fase precedente e non è quello selezionato allora procedo a creare una copia nella nuova fase
|
||||
If EgtVerifyRawPartPhase(nRawId, nNewPhase - 1) Then
|
||||
Dim bKeepRawPart As Boolean = True
|
||||
For Each RawOnAuxTabData As RawMoveData In m_RawMoveDataList
|
||||
If nRawId = RawOnAuxTabData.m_nId Then
|
||||
' se il pezzo è stato scaricato allora non deve essere riportato nella fase successiva
|
||||
For Each UnloadPart As Integer In LocalLstOfUnldPart
|
||||
If nRawId = UnloadPart Then
|
||||
' salvo l'info che indica che il pezzo deve essere scaricato
|
||||
EgtSetInfo(nRawId, "Unloaded", 1)
|
||||
bKeepRawPart = False
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
'bKeepRawPart = False
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
If bKeepRawPart Then EgtKeepRawPart(nRawId, nNewPhase - 1)
|
||||
End If
|
||||
' passo al successivo grezzo
|
||||
nRawId = EgtGetNextRawPart(nRawId)
|
||||
End While
|
||||
End Sub
|
||||
|
||||
Private Sub ResetBtn_Click(sender As Object, e As RoutedEventArgs) Handles ResetBtn.Click
|
||||
' Recupero il primo grezzo selezionato
|
||||
Dim nRawId As Integer = EgtGetFirstSelectedObj()
|
||||
@@ -890,6 +1209,8 @@ Public Class MoveRawPartPage
|
||||
EgtRotateRawPart(nRawId, Vector3d.Z_AX(), dAngRaw)
|
||||
AddRawMoveData(nRawId, vtMove, m_RawMoveDataList)
|
||||
RemoveRawMoveData(nRawId, m_RawMoveDataList)
|
||||
' elimino l'info che indica che il pezzo è scaricato sulla tavola
|
||||
EgtRemoveInfo(nRawId, "Unloaded")
|
||||
' Disabilito pezzo e nascondo le ventose
|
||||
EgtSetStatus(nRawId, GDB_ST.ON_)
|
||||
EgtSetStatus(GetVacuumId(), GDB_ST.OFF)
|
||||
@@ -912,7 +1233,38 @@ Public Class MoveRawPartPage
|
||||
EgtDeselectAll()
|
||||
' Torno alla fase precedente
|
||||
m_bPrev = True
|
||||
' Passo alla pagina delle spezzature
|
||||
' Passo alla pagina delle spezzature solo se non esiste prima una fased di deposito sulla tavola di scarico
|
||||
|
||||
Dim nPrevDispId As Integer = EgtGetPrevOperation(m_nCurrDisposition)
|
||||
' verifico se la fasa precedente è di tipo scarico
|
||||
If IsDispUnloadOnAuxTab(nPrevDispId) <> 0 Then
|
||||
EgtSetCurrPhase(m_nCurrPhase - 1)
|
||||
m_nCurrDisposition = nPrevDispId
|
||||
m_nCurrPhase -= 1
|
||||
m_bPrev = False
|
||||
m_SplitPage.m_bShow = True
|
||||
m_SplitPage.m_bOnAuxTab = True
|
||||
' imposto la visibilità della tavola ausiliaria
|
||||
SetAuxTabInCurrDisposition()
|
||||
' carico le info di disposizione dei pezzi
|
||||
m_RawMoveDataList.Clear()
|
||||
m_bRemovedRaw = GetRemoveByHandInDisposition(m_nCurrDisposition)
|
||||
GetMoveInfoInDisposition(m_nCurrDisposition, m_RawMoveDataList)
|
||||
RefreshVisibility()
|
||||
EgtDraw()
|
||||
Return
|
||||
End If
|
||||
|
||||
'If EgtGetOperationType(EgtGetPrevOperation(m_nCurrDisposition)) = MCH_OY.DISP AndAlso m_SplitPage.m_bOnAuxTab Then
|
||||
' EgtSetCurrPhase(m_nCurrPhase - 1)
|
||||
' m_nCurrDisposition = EgtGetPrevOperation(m_nCurrDisposition)
|
||||
' m_nCurrPhase -= 1
|
||||
' m_bPrev = False
|
||||
' m_SplitPage.m_bShow = True
|
||||
' EgtDraw()
|
||||
' Return
|
||||
'End If
|
||||
|
||||
m_MainWindow.m_CadCutPageUC.CadCutPageGrid.Children.Remove(Me)
|
||||
m_MainWindow.m_CadCutPageUC.CadCutPageGrid.Children.Add(m_SplitPage)
|
||||
m_MainWindow.m_CadCutPageUC.m_CadCutMode = CadCutPageUC.CadCutModes.Split
|
||||
@@ -928,6 +1280,54 @@ Public Class MoveRawPartPage
|
||||
' non cambio pagina
|
||||
Return
|
||||
End If
|
||||
|
||||
' ------- VISUALIZZAZIONE -------
|
||||
If m_SplitPage.m_bShow Then
|
||||
' verifico se la fase successiva è uno scarico frontale
|
||||
If NextOperationIsUnloading(m_nCurrDisposition) Then
|
||||
' imposto la nuova fase (che è stata modificata all'interno della funzione di controllo)
|
||||
EgtSetCurrPhase(m_nCurrPhase)
|
||||
' carico i dati di movimento dei pezzi nella fase corrente
|
||||
m_RawMoveDataList.Clear()
|
||||
m_bRemovedRaw = GetRemoveByHandInDisposition(m_nCurrDisposition)
|
||||
GetMoveInfoInDisposition(m_nCurrDisposition, m_RawMoveDataList)
|
||||
EgtDraw()
|
||||
EnableButtons()
|
||||
Return
|
||||
ElseIf IsDispUnloadOnAuxTab(m_nCurrDisposition) <> 0 AndAlso Not NextOperationIsUnloading(m_nCurrDisposition) Then
|
||||
' imposto la nuova fase, al termine della Sub verrà caricata la pagina Split nella fase indicata ora
|
||||
m_bToNext = True
|
||||
m_nCurrPhase += 1
|
||||
EgtSetCurrPhase(m_nCurrPhase)
|
||||
EgtDraw()
|
||||
End If
|
||||
End If
|
||||
|
||||
' ------- MODIFICA -------
|
||||
If Not m_SplitPage.m_bShow Then
|
||||
' se la tavola di scarico presente oppure ci sono pezzi sulla tavola di scarico
|
||||
Dim LclLstOfUnldPart As New List(Of Integer)
|
||||
If m_SplitPage.m_bOnAuxTab Or PartOnAuxTab(LclLstOfUnldPart, m_nCurrPhase) Then
|
||||
' se ci sono pezzi sulla tavola di scarico prima di procedere inserisco una pausa e creo una nuoava fase
|
||||
If m_IsCurrPhaseUnloaded AndAlso InsertPauseInCurrPhase() Then AddNewPhase()
|
||||
' nascondo la tavola di scarico
|
||||
EgtDisableModified()
|
||||
EgtSetStatus(m_nAuxTabId, GDB_ST.OFF)
|
||||
EgtEnableModified()
|
||||
End If
|
||||
m_bToNext = True
|
||||
'' se la disposizione corrente è sulla tavola ausiliaria allora lo sarà anche quella successiva
|
||||
'If IsDispUnloadOnAuxTab(m_nCurrDisposition) <> 0 Then
|
||||
' EgtSetCurrPhase(m_nCurrPhase + 1)
|
||||
' m_nCurrDisposition = EgtGetNextOperation(m_nCurrDisposition)
|
||||
' m_nCurrPhase += 1
|
||||
' m_bToNext = False
|
||||
' m_SplitPage.m_bShow = True
|
||||
' EgtDraw()
|
||||
' EnableButtons()
|
||||
' Return
|
||||
'End If
|
||||
End If
|
||||
' resetto l'inidice del pezzo da mnovimentare
|
||||
m_CurrRawOnVacuum = GDB_ID.NULL
|
||||
' Deseleziono tutto
|
||||
@@ -970,10 +1370,44 @@ Public Class MoveRawPartPage
|
||||
' disabilito bottone
|
||||
ModifyBtn.IsEnabled = False
|
||||
' gestione abilitazione altri bottoni
|
||||
EnableButtons()
|
||||
EnableButtons(MachiningList.Count > 0)
|
||||
End Sub
|
||||
|
||||
Private Sub EnableButtons()
|
||||
' verifica se la disposizione indicata è uno scarico sulla tavola ausiliaria
|
||||
Public Function IsDispUnloadOnAuxTab(nCurrDispId As Integer) As Integer
|
||||
' verifico se la fase precedente è uno scarico su tavola ausiliaria
|
||||
Dim bVal As Integer = 0
|
||||
EgtGetInfo(nCurrDispId, "Pat", bVal)
|
||||
Return bVal
|
||||
End Function
|
||||
|
||||
' restituisce e attiva la successiva disposizione se è uno scarico frontale
|
||||
Public Function NextOperationIsUnloading(nCurrDispId As Integer) As Boolean
|
||||
' recupero la primo operazione successiva
|
||||
Dim nNextIdOperation As Integer = EgtGetNextOperation(nCurrDispId)
|
||||
' a partire da questa cerco la prima disposizione disponibile
|
||||
Dim nNextIdDips As Integer = GetNextDisposition(nNextIdOperation)
|
||||
If nNextIdDips = nNextIdOperation And IsDispUnloadOnAuxTab(nNextIdOperation) Then
|
||||
m_nCurrPhase += 1
|
||||
m_nCurrDisposition = nNextIdOperation
|
||||
Return True
|
||||
End If
|
||||
Return False
|
||||
End Function
|
||||
|
||||
' recupero la prima disposizione disponibile tra l'elenco delle operazioni presenti
|
||||
Public Function GetNextDisposition(nCurrDisposId As Integer) As Integer
|
||||
Dim nDispId As Integer = nCurrDisposId
|
||||
While nDispId <> GDB_ID.NULL
|
||||
If EgtGetOperationType(nDispId) = MCH_OY.DISP Then
|
||||
Return nDispId
|
||||
End If
|
||||
nDispId = EgtGetNextOperation(nDispId)
|
||||
End While
|
||||
Return GDB_ID.NULL
|
||||
End Function
|
||||
|
||||
Private Sub EnableButtons(Optional bExistsMachining As Boolean = False)
|
||||
UpBtn.IsEnabled = Not m_SplitPage.m_bShow
|
||||
LeftBtn.IsEnabled = Not m_SplitPage.m_bShow
|
||||
RightBtn.IsEnabled = Not m_SplitPage.m_bShow
|
||||
@@ -987,11 +1421,38 @@ Public Class MoveRawPartPage
|
||||
TopRBtn.IsEnabled = Not m_SplitPage.m_bShow
|
||||
BottomLBtn.IsEnabled = Not m_SplitPage.m_bShow
|
||||
BottomRBtn.IsEnabled = Not m_SplitPage.m_bShow
|
||||
PauseBtn.IsEnabled = Not m_SplitPage.m_bShow
|
||||
ResetBtn.IsEnabled = Not m_SplitPage.m_bShow
|
||||
NextBtn.IsEnabled = Not m_SplitPage.m_bOnAuxTab
|
||||
UnloadPartsBtn.IsEnabled = Not m_SplitPage.m_bShow
|
||||
If m_SplitPage.m_bShow Then
|
||||
NextBtn.IsEnabled = (m_nCurrPhase < EgtGetPhaseCount())
|
||||
Else
|
||||
' Se esistono delle lavorazioni allora abilito il pulsante per procedere
|
||||
If Not bExistsMachining Then
|
||||
NextBtn.IsEnabled = Not m_SplitPage.m_bOnAuxTab
|
||||
Else
|
||||
NextBtn.IsEnabled = True
|
||||
End If
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
' esco dalla pagina di scarico
|
||||
Private Sub MoveRawPartPage_Unloaded(sender As Object, e As EventArgs) Handles Me.Unloaded
|
||||
' verifico che la fase corrente non sia vuota
|
||||
Dim nLastDispId As Integer = EgtGetPhaseDisposition(m_nCurrPhase)
|
||||
|
||||
'' se sono in visualizzazione allora non elimino essuna operazione
|
||||
'If Not m_SplitPage.m_bShow Then
|
||||
' If EgtIsOperationEmpty(nLastDispId) And Not m_SplitPage.m_bOnAuxTab And m_RawMoveDataList.Count = 0 Then
|
||||
' EgtErase(nLastDispId)
|
||||
' ElseIf EgtIsOperationEmpty(nLastDispId) And m_SplitPage.m_bOnAuxTab And m_RawMoveDataList.Count = 0 Then
|
||||
' ' Dichiaro pagina non attiva
|
||||
' m_bActive = False
|
||||
' Return
|
||||
' End If
|
||||
'End If
|
||||
|
||||
' Se movimento con ventose
|
||||
If Not m_bByHand Then
|
||||
' nascondo le ventose
|
||||
@@ -1006,12 +1467,13 @@ Public Class MoveRawPartPage
|
||||
SaveMoveInfoInDisposition(nDispId, m_RawMoveDataList)
|
||||
' imposto eventuale presenza rimozioni manuali
|
||||
SaveRemoveByHandInDisposition(nDispId, m_bRemovedRaw)
|
||||
' imposto eventuale movimento pezzi su tavola ausiliaria
|
||||
SaveMovePartsOnAuxTable( nDispId, m_SplitPage.m_bOnAuxTab)
|
||||
' imposto eventuale movimento pezzi su tavola ausiliaria (se è realmente avvenuto)
|
||||
'SaveMovePartsOnAuxTable(nDispId, m_SplitPage.m_bOnAuxTab)
|
||||
SaveMovePartsOnAuxTable(nDispId, m_IsCurrPhaseUnloaded)
|
||||
' Eseguo calcolo speciale dei movimenti
|
||||
SpecialApplyDisposition(nDispId, True, Not m_SplitPage.m_bOnAuxTab)
|
||||
End If
|
||||
' se altrimenti movimento senza ventose perchè lama troppo grande
|
||||
' se altrimenti movimento senza ventose perchè lama troppo grande
|
||||
ElseIf GetVacuumType() > 0 Then
|
||||
' se non solo visualizzazione
|
||||
If Not m_SplitPage.m_bShow Then
|
||||
@@ -1023,13 +1485,18 @@ Public Class MoveRawPartPage
|
||||
SpecialApplyDisposition(nDispId, True)
|
||||
End If
|
||||
End If
|
||||
|
||||
' Nascondo eventuale tavola ausiliaria
|
||||
If m_SplitPage.m_bOnAuxTab Then
|
||||
EgtDisableModified()
|
||||
EgtSetStatus(m_nAuxTabId, GDB_ST.OFF)
|
||||
EgtEnableModified()
|
||||
EgtZoom(ZM.ALL, False)
|
||||
If Not m_bPrev Then
|
||||
' se sto uscendo dalla pagina delle spezzature
|
||||
If Not m_bPrev And Not m_bToNext Then
|
||||
Dim nDispId As Integer = EgtGetPhaseDisposition(m_nCurrPhase)
|
||||
' se sto uscendo dalla pagina split (senza passare dal comando next)
|
||||
Dim lclLstUnlPart As New List(Of Integer)
|
||||
SaveMovePartsOnAuxTable(nDispId, PartOnAuxTab(lclLstUnlPart, m_nCurrPhase))
|
||||
' Cancello eventuale manipolatore pezzi
|
||||
EgtDisableModified()
|
||||
RemoveVacuumCups()
|
||||
@@ -1046,10 +1513,30 @@ Public Class MoveRawPartPage
|
||||
m_bPrev = False
|
||||
m_SplitPage.m_bShow = True
|
||||
End If
|
||||
|
||||
Dim Ph As Integer = EgtGetCurrPhase()
|
||||
' aggiorno il disegno
|
||||
EgtZoom(ZM.ALL, False)
|
||||
' Dichiaro pagina non attiva
|
||||
m_bActive = False
|
||||
End Sub
|
||||
|
||||
' ----------------- TEST funzione per debug operazioni -----------------
|
||||
Private Sub SaveMyFileTest(sFilename As String)
|
||||
LoadCurrPhaseMachining()
|
||||
' salvo il file corrente per poterlo studiare e capire cosa è successo nella rappresentazione dei grezzi
|
||||
EgtSaveFile("C:\EgtData\OmagCUT\MyProjects\" & sFilename & ".nge", NGE.BIN)
|
||||
End Sub
|
||||
|
||||
Private Sub LoadCurrPhaseMachining()
|
||||
Dim m_MachiningList As New List(Of SplitMach)
|
||||
'm_SplitPage.ShowMachiningList()
|
||||
'm_SplitPage.SaveOrderMachinig(m_nCurrPhase)
|
||||
' Preparo la lista delle lavorazioni
|
||||
CalculateSplitMachList(m_nCurrPhase, m_MachiningList)
|
||||
Dim b As Boolean = False
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
d:DesignHeight="853.3" d:DesignWidth="1280" Initialized="NestPage_Initialized" Loaded="NestPage_Loaded" Unloaded="NestPage_Unloaded">
|
||||
|
||||
<!-- Definizione della NestPage -->
|
||||
<Grid Name="NestPageGrid" >
|
||||
<Grid Name="NestPageGrid">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="3*"/>
|
||||
<ColumnDefinition Width="12*"/>
|
||||
@@ -78,7 +78,7 @@
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<EgtWPFLib:EgtTextBox Name="RotationAngleTxBx" Width="50"
|
||||
<EgtWPFLib:EgtTextBox Name="RotationAngleTxBx" Width="50" IsLength="False"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
<TextBlock Grid.Column="1" FontSize="30" Margin="2,-5,0,0"
|
||||
Text="°"/>
|
||||
|
||||
+281
-99
@@ -62,6 +62,14 @@ Public Class NestPageUC
|
||||
Private m_bMaximizeMove As Boolean = False
|
||||
Private m_dAngStep As Double = 0
|
||||
Private m_bReducedCut As Boolean = False
|
||||
|
||||
Private m_bKeyCtrlPressed As Boolean = False
|
||||
Private m_bKeyLeftShiftPressed As Boolean = False
|
||||
Private m_dAngTotal As Double = 0
|
||||
Private m_dStartAng As Double = 0
|
||||
Private m_bStartRot As Boolean = False
|
||||
Private m_bStartMove As Boolean = False
|
||||
|
||||
' Dati per tolleranza spessore Trf
|
||||
Private m_dTrfThickTolerance As Double = 0
|
||||
' Dati movimento registrazione grezzo
|
||||
@@ -94,6 +102,7 @@ Public Class NestPageUC
|
||||
RemovePartBtn.ToolTip = EgtMsg(MSG_NESTPAGEUC + 3) 'Remove part - Elimina pezzo
|
||||
SelectAllBtn.ToolTip = EgtMsg(MSG_NESTPAGEUC + 4) 'Select All - Seleziona Tutto
|
||||
DeselectAllBtn.ToolTip = EgtMsg(MSG_NESTPAGEUC + 5) 'Deselect All - Deseleziona Tutto
|
||||
DragRettanleBtn.ToolTip = "Strech"
|
||||
|
||||
Dim nColumsIn_UG1 As Integer = 2
|
||||
' gestisco la visualizzazione del comando PAN (per il drag dei rettangoli)
|
||||
@@ -1053,7 +1062,9 @@ Public Class NestPageUC
|
||||
m_locPrev = e.Location
|
||||
m_bDrag = m_bDrag AndAlso EgtUnProjectPoint(e.Location, m_ptPrev)
|
||||
m_bDragToStart = m_bDrag
|
||||
' attivo la modalità di traslazione e rotazione senza cltrollo collisioni (solo in fase di Drag)
|
||||
m_bVerify = m_bDrag AndAlso (Keyboard.Modifiers And ModifierKeys.Shift) > 0
|
||||
m_bKeyLeftShiftPressed = m_bVerify
|
||||
m_vtTotMove = Vector3d.NULL()
|
||||
End Sub
|
||||
|
||||
@@ -1116,51 +1127,114 @@ Public Class NestPageUC
|
||||
m_bVerify = True
|
||||
m_bFromParking = True
|
||||
End If
|
||||
|
||||
' Inizio esecuzione di drag
|
||||
m_bDragging = True
|
||||
' Ricavo il punto corrente in coordinate mondo
|
||||
Dim ptCurr As Point3d
|
||||
EgtUnProjectPoint(e.Location, ptCurr)
|
||||
' Ricavo il vettore di movimento
|
||||
Dim vtMove As Vector3d = ptCurr - m_ptPrev
|
||||
' Muovo i pezzi selezionati di quanto possibile
|
||||
If vtMove.SqLen() > EPS_SMALL * EPS_SMALL Then
|
||||
' Se movimento con sola verifica finale
|
||||
If m_bVerify Then
|
||||
EgtMove(nMoveId, vtMove)
|
||||
m_vtTotMove += vtMove
|
||||
' altrimenti caso con verifica durante il movimento
|
||||
Else
|
||||
' Aggiorno regioni per nesting
|
||||
UpdateNestRegions()
|
||||
EnableReferenceRegion(False)
|
||||
' muovo il pezzo
|
||||
EgtMovePart(nMoveId, m_bReducedCut, vtMove)
|
||||
EgtSaveCollInfo()
|
||||
' se movimento risultante nullo, provo con movimento tangente
|
||||
Dim bTgMoved As Boolean = False
|
||||
If vtMove.IsSmall() Then
|
||||
' riprovo con movimento tangente
|
||||
Dim vtTgMove As Vector3d = ptCurr - m_ptPrev
|
||||
EgtTgMovePartOnCollision(nMoveId, m_bReducedCut, vtTgMove)
|
||||
bTgMoved = (Not vtTgMove.IsSmall())
|
||||
End If
|
||||
' se abilitato magnetico (allineamento + snap), lo provo
|
||||
Dim bAlignMoved As Boolean = False
|
||||
Dim bSnapMoved As Boolean = False
|
||||
If m_bMagnetic Then
|
||||
If Not GetLockOnRotation(nMoveId) Then
|
||||
EgtAlignPartOnCollision(nMoveId, m_bReducedCut, bAlignMoved)
|
||||
End If
|
||||
If m_dSnapDist > EPS_SMALL Then
|
||||
EgtRestoreCollInfo()
|
||||
EgtMovePartToSnapPointOnCollision(nMoveId, m_bReducedCut, m_dSnapDist, bSnapMoved)
|
||||
End If
|
||||
End If
|
||||
m_CurrProjPage.ResetOrderMachiningFlag()
|
||||
|
||||
' la rotazione è attivabile solo se premuto il tasto Ctrl (e non sono in parheggio)
|
||||
m_bKeyCtrlPressed = m_bDrag AndAlso (Keyboard.Modifiers And ModifierKeys.Control) > 0
|
||||
|
||||
'-------------Inizio ROTAZIONE ----------------
|
||||
If m_bKeyCtrlPressed AndAlso (Not m_bFromParking OrElse m_bKeyLeftShiftPressed) Then
|
||||
' Calcolo il centro di rotazione come centro del cluster
|
||||
Dim ptCen As Point3d
|
||||
If Not EgtGetPartPartClusterCenterGlob(nMoveId, ptCen) Then Return
|
||||
' definisco il vettore dal centro del pezzo alla posizione del cursore
|
||||
Dim vtCurr As Vector3d = ptCurr - ptCen
|
||||
Dim dLen, dHAng, dVAng As Double
|
||||
' recupero l'angolo orizzontale del vettore
|
||||
vtCurr.ToSpherical(dLen, dHAng, dVAng)
|
||||
If Not m_bStartRot Then
|
||||
m_dAngTotal = 0
|
||||
' notifico una rotazione
|
||||
m_bStartRot = True
|
||||
m_dStartAng = dVAng
|
||||
End If
|
||||
EgtDraw()
|
||||
' Eventuale notifica al VeinMatching
|
||||
Dim dDeltaAng As Double = dVAng - m_dStartAng
|
||||
' gestione del passaggio da 0° → 360° evitando mantenendo la visualizzazione fluida
|
||||
If Math.Abs(dDeltaAng) > 90 Then
|
||||
If m_dStartAng < 180 And dVAng > 180 Then
|
||||
dDeltaAng = dVAng - 360 - m_dStartAng
|
||||
ElseIf m_dStartAng > 180 And dVAng < 180 Then
|
||||
dDeltaAng = dVAng - m_dStartAng + 360
|
||||
End If
|
||||
End If
|
||||
' Rotazione del pezzo attorno al suo centro
|
||||
If Math.Abs(dDeltaAng) > EPS_ANG_SMALL Then
|
||||
' se il tasto Shift è premuto (disabilitato il controllo collisioni durante il Drag)
|
||||
If m_bKeyLeftShiftPressed Then
|
||||
EgtRotate(nMoveId, ptCen, Vector3d.Z_AX(), dDeltaAng, GDB_RT.GLOB)
|
||||
m_dAngTotal += dDeltaAng
|
||||
Else
|
||||
' esegue la rotazione fino ad incontrare un altro pezzo
|
||||
RotatePartInsideBond(dDeltaAng, nMoveId)
|
||||
m_CurrProjPage.ResetOrderMachiningFlag()
|
||||
' Eventuale notifica al VeinMatching
|
||||
Dim nId As Integer = EgtGetFirstSelectedObj()
|
||||
While nId <> GDB_ID.NULL
|
||||
VeinMatching.OnMovePartInRaw(nId)
|
||||
nId = EgtGetNextSelectedObj()
|
||||
End While
|
||||
End If
|
||||
m_dStartAng = dVAng
|
||||
End If
|
||||
'-------------Fine ROTAZIONE ----------------
|
||||
|
||||
Else
|
||||
' -------------Inizio TRASLAZIONE ---------------
|
||||
' Ricavo il vettore di movimento
|
||||
Dim vtMove As Vector3d = ptCurr - m_ptPrev
|
||||
' Muovo i pezzi selezionati di quanto possibile
|
||||
If vtMove.SqLen() > EPS_SMALL * EPS_SMALL Then
|
||||
' notifico una traslazione
|
||||
If Not m_bStartMove Then
|
||||
m_bStartMove = True
|
||||
End If
|
||||
|
||||
' Se movimento con sola verifica finale (disabilitato il controllo collisioni durante il Drag)
|
||||
If m_bVerify Then
|
||||
EgtMove(nMoveId, vtMove)
|
||||
m_vtTotMove += vtMove
|
||||
' altrimenti caso con verifica durante il movimento
|
||||
Else
|
||||
' Aggiorno regioni per nesting
|
||||
UpdateNestRegions()
|
||||
EnableReferenceRegion(False)
|
||||
' muovo il pezzo
|
||||
EgtMovePart(nMoveId, m_bReducedCut, vtMove)
|
||||
EgtSaveCollInfo()
|
||||
' se movimento risultante nullo, provo con movimento tangente
|
||||
Dim bTgMoved As Boolean = False
|
||||
If vtMove.IsSmall() Then
|
||||
' riprovo con movimento tangente
|
||||
Dim vtTgMove As Vector3d = ptCurr - m_ptPrev
|
||||
EgtTgMovePartOnCollision(nMoveId, m_bReducedCut, vtTgMove)
|
||||
bTgMoved = (Not vtTgMove.IsSmall())
|
||||
End If
|
||||
' se abilitato magnetico (allineamento + snap), lo provo
|
||||
Dim bAlignMoved As Boolean = False
|
||||
Dim bSnapMoved As Boolean = False
|
||||
If m_bMagnetic Then
|
||||
If Not GetLockOnRotation(nMoveId) Then
|
||||
EgtAlignPartOnCollision(nMoveId, m_bReducedCut, bAlignMoved)
|
||||
End If
|
||||
If m_dSnapDist > EPS_SMALL Then
|
||||
EgtRestoreCollInfo()
|
||||
EgtMovePartToSnapPointOnCollision(nMoveId, m_bReducedCut, m_dSnapDist, bSnapMoved)
|
||||
End If
|
||||
End If
|
||||
m_CurrProjPage.ResetOrderMachiningFlag()
|
||||
End If
|
||||
' -------------Fine TRASLAZIONE ---------------
|
||||
End If
|
||||
End If
|
||||
|
||||
EgtDraw()
|
||||
' Eventuale notifica al VeinMatching
|
||||
If m_bStartMove OrElse m_bStartRot Then
|
||||
If nMoveId = GDB_ID.SEL Then
|
||||
Dim nId As Integer = EgtGetFirstSelectedObj()
|
||||
While nId <> GDB_ID.NULL
|
||||
@@ -1171,10 +1245,15 @@ Public Class NestPageUC
|
||||
VeinMatching.OnMovePartInRaw(nMoveId)
|
||||
End If
|
||||
End If
|
||||
|
||||
' Aggiorno il punto precedente
|
||||
m_ptPrev = ptCurr
|
||||
' Terminata esecuzione di drag
|
||||
m_bDragging = False
|
||||
'' elimino il ponticello associato: nella vilualizzazione il percorso di lavorazioni non si muove! in attesa di gestione
|
||||
'DeleteBridgeAssociated(nMoveId)
|
||||
' Resetto i ponticelli (per ora non sono in grado di muoverli assieme ai pezzi)
|
||||
ResetAllBRidges()
|
||||
End Sub
|
||||
|
||||
Private Sub OnMyMouseUpScene(sender As Object, e As System.Windows.Forms.MouseEventArgs) Handles m_CurrProjPage.OnMouseUpScene
|
||||
@@ -1198,47 +1277,31 @@ Public Class NestPageUC
|
||||
|
||||
' Se eseguito drag
|
||||
If Not m_bDragToStart Then
|
||||
' Se movimento con sola verifica finale
|
||||
If m_bVerify Then
|
||||
' Determino cosa verificare
|
||||
Dim nMoveId = If(m_nIdToSel <> GDB_ID.NULL, m_nIdToSel, GDB_ID.SEL)
|
||||
' Aggiorno regioni per nesting
|
||||
UpdateNestRegions()
|
||||
EnableReferenceRegion(False)
|
||||
' Eseguo verifica
|
||||
If VerifyTrfData(nMoveId) And EgtVerifyPart(nMoveId, m_bReducedCut) Then
|
||||
m_CurrProjPage.ResetOrderMachiningFlag()
|
||||
' Non superata riporto alla posizione iniziale
|
||||
' Se movimento con sola verifica finale ----- TRASLAZIONE
|
||||
If Not m_bStartRot And m_bStartMove Then
|
||||
VerifyMove()
|
||||
' Se movimento con sola verifica finale ----- TRASLAZIONE + ROTAZIONE
|
||||
ElseIf m_bStartRot And m_bStartMove Then
|
||||
If Not m_bFromParking Then
|
||||
VerifyRot()
|
||||
Else
|
||||
If m_bFromParking Then
|
||||
m_CurrProjPage.ClearMessage()
|
||||
PreRemoveOnePart(nMoveId)
|
||||
VeinMatching.OnRemovePartFromRaw(nMoveId)
|
||||
Else
|
||||
EgtMove(nMoveId, -m_vtTotMove)
|
||||
' Eventuale notifica al VeinMatching
|
||||
If nMoveId = GDB_ID.SEL Then
|
||||
Dim nId As Integer = EgtGetFirstSelectedObj()
|
||||
While nId <> GDB_ID.NULL
|
||||
VeinMatching.OnMovePartInRaw(nId)
|
||||
nId = EgtGetNextSelectedObj()
|
||||
End While
|
||||
Else
|
||||
VeinMatching.OnMovePartInRaw(nMoveId)
|
||||
End If
|
||||
End If
|
||||
'---------------------- COUNTER PART ----------------------
|
||||
Dim sRefGroup As String = String.Empty
|
||||
If EgtGetInfo(nMoveId, INFO_REFGROUP, sRefGroup) Then
|
||||
' accendo il layer che contiene il contatore (spento in fase di Drag)
|
||||
Dim nCounterLayer As Integer = EgtGetFirstNameInGroup(nMoveId, INFO_COUNTERLY)
|
||||
EgtSetStatus(nCounterLayer, GDB_ST.ON_)
|
||||
' aggiorno il layer che indica il numero di pezzi in parcheggio
|
||||
CountPartInFamily(sRefGroup)
|
||||
End If
|
||||
'---------------------- COUNTER PART ----------------------
|
||||
' forzo il reset delle info di rotazione
|
||||
m_dStartAng = 0
|
||||
m_dAngTotal = 0
|
||||
m_bStartRot = False
|
||||
End If
|
||||
VerifyMove()
|
||||
' verifico se la posizione finale della rotazione è corretta ----- ROTAZIONE
|
||||
ElseIf m_bStartRot And Not m_bStartMove Then
|
||||
If m_bFromParking Then
|
||||
VerifyMove()
|
||||
' forzo il reset delle info di rotazione
|
||||
m_dStartAng = 0
|
||||
m_dAngTotal = 0
|
||||
m_bStartRot = False
|
||||
Else
|
||||
VerifyRot()
|
||||
End If
|
||||
m_bFromParking = False
|
||||
' altrimenti caso con verifica durante il movimento
|
||||
Else
|
||||
' Basta reset alla fine
|
||||
@@ -1290,8 +1353,8 @@ Public Class NestPageUC
|
||||
VeinMatching.OnDeselectPart(m_nIdToDesel)
|
||||
End If
|
||||
|
||||
|
||||
' Reset
|
||||
GetFamilyGroupInPark()
|
||||
m_bDrag = False
|
||||
m_nIdToSel = GDB_ID.NULL
|
||||
m_nIdToDesel = GDB_ID.NULL
|
||||
@@ -1302,6 +1365,70 @@ Public Class NestPageUC
|
||||
EgtDraw()
|
||||
End Sub
|
||||
|
||||
Private Sub VerifyMove()
|
||||
If m_bVerify Then
|
||||
' Determino cosa verificare
|
||||
Dim nMoveId = If(m_nIdToSel <> GDB_ID.NULL, m_nIdToSel, GDB_ID.SEL)
|
||||
' Aggiorno regioni per nesting
|
||||
UpdateNestRegions()
|
||||
EnableReferenceRegion(False)
|
||||
' Eseguo verifica
|
||||
If VerifyTrfData(nMoveId) And EgtVerifyPart(nMoveId, m_bReducedCut) Then
|
||||
m_CurrProjPage.ResetOrderMachiningFlag()
|
||||
' Non superata riporto alla posizione iniziale
|
||||
Else
|
||||
If m_bFromParking Then
|
||||
m_CurrProjPage.ClearMessage()
|
||||
PreRemoveOnePart(nMoveId)
|
||||
VeinMatching.OnRemovePartFromRaw(nMoveId)
|
||||
Else
|
||||
EgtMove(nMoveId, -m_vtTotMove)
|
||||
' Eventuale notifica al VeinMatching
|
||||
If nMoveId = GDB_ID.SEL Then
|
||||
Dim nId As Integer = EgtGetFirstSelectedObj()
|
||||
While nId <> GDB_ID.NULL
|
||||
VeinMatching.OnMovePartInRaw(nId)
|
||||
nId = EgtGetNextSelectedObj()
|
||||
End While
|
||||
Else
|
||||
VeinMatching.OnMovePartInRaw(nMoveId)
|
||||
End If
|
||||
End If
|
||||
'---------------------- COUNTER PART ----------------------
|
||||
' solo se pezzo disposto in tavola
|
||||
If m_bFromParking Then
|
||||
Dim sRefGroup As String = String.Empty
|
||||
If EgtGetInfo(nMoveId, INFO_REFGROUP, sRefGroup) Then
|
||||
' accendo il layer che contiene il contatore (spento in fase di Drag)
|
||||
Dim nCounterLayer As Integer = EgtGetFirstNameInGroup(nMoveId, INFO_COUNTERLY)
|
||||
EgtSetStatus(nCounterLayer, GDB_ST.ON_)
|
||||
' aggiorno il layer che indica il numero di pezzi in parcheggio
|
||||
CountPartInFamily(sRefGroup)
|
||||
End If
|
||||
End If
|
||||
'---------------------- COUNTER PART ----------------------
|
||||
End If
|
||||
m_bFromParking = False
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub VerifyRot()
|
||||
' se comando Shift è stato attivato
|
||||
If m_bKeyLeftShiftPressed Then
|
||||
' Determino cosa verificare
|
||||
Dim nMoveId = If(m_nIdToSel <> GDB_ID.NULL, m_nIdToSel, GDB_ID.SEL)
|
||||
If Not EgtVerifyPart(nMoveId, m_bReducedCut) Then
|
||||
Dim ptCen As Point3d
|
||||
If Not EgtGetPartPartClusterCenterGlob(nMoveId, ptCen) Then Return
|
||||
EgtRotate(nMoveId, ptCen, Vector3d.Z_AX(), -m_dAngTotal, GDB_RT.GLOB)
|
||||
End If
|
||||
End If
|
||||
' resetto i valori
|
||||
m_dStartAng = 0
|
||||
m_dAngTotal = 0
|
||||
m_bStartRot = False
|
||||
End Sub
|
||||
|
||||
Friend Function SelectPart(nPartId As Integer, bNotifyVM As Boolean) As Boolean
|
||||
EgtSetCurrentContext(m_CurrProjPage.CurrentProjectScene.GetCtx())
|
||||
' Determino se pezzo in tavola o in parcheggio
|
||||
@@ -1573,7 +1700,7 @@ Public Class NestPageUC
|
||||
If m_nPartPos <> PART_POS.IN_TABLE Then
|
||||
Dim nId As Integer = EgtGetFirstSelectedObj()
|
||||
While nId <> GDB_ID.NULL
|
||||
' Se pezzo con rotazione libera
|
||||
' Se pezzo con rotazione libera (in parcheggio)
|
||||
If Not EgtExistsInfo(nId, INFO_PARTROT) Then
|
||||
' Calcolo il centro di rotazione come centro del pezzo
|
||||
Dim ptCen As Point3d
|
||||
@@ -1609,25 +1736,30 @@ Public Class NestPageUC
|
||||
Return True
|
||||
' Altrimenti li ruoto tenendo conto delle collisioni
|
||||
Else
|
||||
' Verifico se ci sono dei pezzi bloccati in rotazione
|
||||
Dim bLockedRot As Boolean = GetLockOnRotation(GDB_ID.SEL)
|
||||
' Se tutti i pezzi possono ruotare
|
||||
If Not bLockedRot Then
|
||||
' Calcolo il centro di rotazione come centro del cluster
|
||||
Dim ptCen As Point3d
|
||||
If Not EgtGetPartPartClusterCenterGlob(GDB_ID.SEL, ptCen) Then Return False
|
||||
' Aggiorno regioni per nesting
|
||||
UpdateNestRegions()
|
||||
EnableReferenceRegion(False)
|
||||
' Verifico rotazione complessiva
|
||||
EgtRotate(GDB_ID.SEL, ptCen, Vector3d.Z_AX(), dAngRotDeg, GDB_RT.GLOB)
|
||||
If EgtVerifyPart(GDB_ID.SEL, m_bReducedCut) Then Return True
|
||||
' Provo rotazione parziale (dopo aver annullato la complessiva)
|
||||
EgtRotate(GDB_ID.SEL, ptCen, Vector3d.Z_AX(), -dAngRotDeg, GDB_RT.GLOB)
|
||||
Return EgtRotatePart(GDB_ID.SEL, m_bReducedCut, ptCen, dAngRotDeg)
|
||||
Else
|
||||
Return False
|
||||
End If
|
||||
Return RotatePartInsideBond(dAngRotDeg, GDB_ID.SEL)
|
||||
End If
|
||||
End Function
|
||||
|
||||
' verifica che la rotazione sia ammessa
|
||||
Private Function RotatePartInsideBond(dAngRotDeg As Double, nIdMove As Integer) As Boolean
|
||||
' Verifico se ci sono dei pezzi bloccati in rotazione
|
||||
Dim bLockedRot As Boolean = GetLockOnRotation(nIdMove)
|
||||
' Se tutti i pezzi possono ruotare
|
||||
If Not bLockedRot Then
|
||||
' Calcolo il centro di rotazione come centro del cluster
|
||||
Dim ptCen As Point3d
|
||||
If Not EgtGetPartPartClusterCenterGlob(nIdMove, ptCen) Then Return False
|
||||
' Aggiorno regioni per nesting
|
||||
UpdateNestRegions()
|
||||
EnableReferenceRegion(False)
|
||||
' Verifico rotazione complessiva
|
||||
EgtRotate(nIdMove, ptCen, Vector3d.Z_AX(), dAngRotDeg, GDB_RT.GLOB)
|
||||
If EgtVerifyPart(nIdMove, m_bReducedCut) Then Return True
|
||||
' Provo rotazione parziale (dopo aver annullato la complessiva)
|
||||
EgtRotate(nIdMove, ptCen, Vector3d.Z_AX(), -dAngRotDeg, GDB_RT.GLOB)
|
||||
Return EgtRotatePart(nIdMove, m_bReducedCut, ptCen, dAngRotDeg)
|
||||
Else
|
||||
Return False
|
||||
End If
|
||||
End Function
|
||||
|
||||
@@ -2310,6 +2442,11 @@ Public Class NestPageUC
|
||||
EgtZoom(ZM.ALL)
|
||||
End Sub
|
||||
|
||||
' ripulisco la lista dei pezzi in parcheggio
|
||||
Friend Sub ResetListOfGruopInPark()
|
||||
m_ListOfGroupInPark.Clear()
|
||||
End Sub
|
||||
|
||||
Friend Function StoreOnePart(nId As Integer, Optional ByVal bForced As Boolean = False) As Boolean
|
||||
' Se pezzo in grezzo, metto in parcheggio (sempre possibile)
|
||||
If bForced OrElse
|
||||
@@ -2387,6 +2524,10 @@ Public Class NestPageUC
|
||||
Dim dEraseArea As Double = 0
|
||||
nId = EgtGetFirstSelectedObj()
|
||||
While nId <> GDB_ID.NULL
|
||||
'' elimino eventuali ponticelli associati al pezzo: nella vilualizzazione il percorso di lavorazioni non si muove! in attesa di gestione
|
||||
'DeleteBridgeAssociated(nId)
|
||||
' Resetto i ponticelli (per ora non sono in grado di muoverli assieme ai pezzi)
|
||||
ResetAllBRidges()
|
||||
' Recupero indice del successivo
|
||||
Dim nNextId = EgtGetNextSelectedObj()
|
||||
' Se abilitata cancellazione in ogni caso o pezzo non da Csv
|
||||
@@ -2432,6 +2573,47 @@ Public Class NestPageUC
|
||||
EgtZoom(ZM.ALL)
|
||||
End Sub
|
||||
|
||||
Private Sub DeleteBridgeAssociated(nMyId As Integer)
|
||||
' verifico se esistono dei ponticelli associati al pezzo indicato
|
||||
' recuoero il gruppo di lavorazione corrente
|
||||
Dim nIdCurrMachGroup As Integer = EgtGetCurrMachGroup()
|
||||
' creo il gruppo per i ponticelli
|
||||
Dim sNameGroup As String = BRIDGES
|
||||
Dim nIdBridgesGroup As Integer = EgtGetFirstNameInGroup(nIdCurrMachGroup, sNameGroup)
|
||||
If nIdBridgesGroup <> GDB_ID.NULL Then
|
||||
' carico la prima entità del gruppo BRIDGES
|
||||
Dim nIdBridgeLine As Integer = GDB_ID.NULL
|
||||
nIdBridgeLine = EgtGetFirstNameInGroup(nIdBridgesGroup, BRIDGELINE)
|
||||
' ciclo su tutte le entità
|
||||
While nIdBridgeLine <> GDB_ID.NULL
|
||||
Dim nNextBridgeLine As Integer = GDB_ID.NULL
|
||||
Dim nIdPart As Integer = GDB_ID.NULL
|
||||
If EgtGetInfo(nIdBridgeLine, "PartStart", nIdPart) Then
|
||||
If nIdPart = nMyId Then
|
||||
nNextBridgeLine = EgtGetNext(nIdBridgeLine)
|
||||
' il ponticello deve essere eliminato
|
||||
EgtErase(nIdBridgeLine)
|
||||
nIdBridgeLine = nNextBridgeLine
|
||||
' riparto dall'inizio del ciclo
|
||||
Continue While
|
||||
End If
|
||||
End If
|
||||
If EgtGetInfo(nIdBridgeLine, "PartEnd", nIdPart) Then
|
||||
If nIdPart = nMyId Then
|
||||
nNextBridgeLine = EgtGetNext(nIdBridgeLine)
|
||||
' il ponticello deve essere eliminato
|
||||
EgtErase(nIdBridgeLine)
|
||||
nIdBridgeLine = nNextBridgeLine
|
||||
' riparto dall'inizio del ciclo
|
||||
Continue While
|
||||
End If
|
||||
End If
|
||||
' il BridgeLine corrente non contiene riferimeti al pezzo da eliminare
|
||||
nIdBridgeLine = EgtGetNext(nIdBridgeLine)
|
||||
End While
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub SelectAllBtn_Click(sender As Object, e As RoutedEventArgs) Handles SelectAllBtn.Click
|
||||
EgtSetCurrentContext(m_CurrProjPage.CurrentProjectScene.GetCtx())
|
||||
' Numero dei pezzi in tavola
|
||||
|
||||
+79
-19
@@ -1,4 +1,5 @@
|
||||
Imports EgtUILib
|
||||
Imports System.Windows.Forms.Integration
|
||||
Imports EgtUILib
|
||||
|
||||
Public Module SplitAuto
|
||||
|
||||
@@ -98,14 +99,15 @@ Public Module SplitAuto
|
||||
Mach.m_dStartFreeLen = FREELEN_INF + 1
|
||||
Mach.m_dEndFreeLen = FREELEN_INF + 1
|
||||
Dim nEntId, nSub As Integer
|
||||
If EgtGetMachiningGeometry( 0, nEntId, nSub) Then
|
||||
If EgtGetType( nEntId) = GDB_TY.CRV_ARC OrElse EgtGetType( nEntId) = GDB_TY.CRV_COMPO Then Mach.m_bIsLine = False
|
||||
EgtGetInfo( nEntId, If( Not Mach.m_bInvert, INFO_PREVANG, INFO_NEXTANG), Mach.m_dPrevAng)
|
||||
EgtGetInfo( nEntId, If( Not Mach.m_bInvert, INFO_NEXTANG, INFO_PREVANG), Mach.m_dNextAng)
|
||||
EgtGetInfo( nEntId, If( Not Mach.m_bInvert, INFO_START_FREELEN, INFO_END_FREELEN), Mach.m_dStartFreeLen)
|
||||
EgtGetInfo( nEntId, If( Not Mach.m_bInvert, INFO_END_FREELEN, INFO_START_FREELEN), Mach.m_dEndFreeLen)
|
||||
Mach.m_bEnableInvert = GetEnableInvert( nEntId)
|
||||
EgtMidVector( nEntId, GDB_ID.ROOT, Mach.m_vtDir)
|
||||
If EgtGetMachiningGeometry(0, nEntId, nSub) Then
|
||||
' EgtGetType( nEntId) = GDB_TY.CRV_ARC OrElse
|
||||
If EgtGetType(nEntId) = GDB_TY.CRV_COMPO Then Mach.m_bIsLine = False
|
||||
EgtGetInfo(nEntId, If(Not Mach.m_bInvert, INFO_PREVANG, INFO_NEXTANG), Mach.m_dPrevAng)
|
||||
EgtGetInfo(nEntId, If(Not Mach.m_bInvert, INFO_NEXTANG, INFO_PREVANG), Mach.m_dNextAng)
|
||||
EgtGetInfo(nEntId, If(Not Mach.m_bInvert, INFO_START_FREELEN, INFO_END_FREELEN), Mach.m_dStartFreeLen)
|
||||
EgtGetInfo(nEntId, If(Not Mach.m_bInvert, INFO_END_FREELEN, INFO_START_FREELEN), Mach.m_dEndFreeLen)
|
||||
Mach.m_bEnableInvert = GetEnableInvert(nEntId)
|
||||
EgtMidVector(nEntId, GDB_ID.ROOT, Mach.m_vtDir)
|
||||
If Mach.m_bInvert Then Mach.m_vtDir = -Mach.m_vtDir
|
||||
Mach.m_nEntId = nEntId
|
||||
End If
|
||||
@@ -131,7 +133,7 @@ Public Module SplitAuto
|
||||
Mach.m_bStartAll = False
|
||||
Mach.m_bEndAll = False
|
||||
End If
|
||||
' Waterjet
|
||||
' Waterjet
|
||||
ElseIf Mach.m_nType = MCH_OY.WATERJETTING Then
|
||||
Mach.m_nInterf = FMI_TYPE.NONE
|
||||
' recupero l'angolo di fianco
|
||||
@@ -140,7 +142,7 @@ Public Module SplitAuto
|
||||
Mach.m_bCanEndAll = False
|
||||
Mach.m_bStartAll = False
|
||||
Mach.m_bEndAll = False
|
||||
' Forature e fresature
|
||||
' Forature e fresature
|
||||
Else
|
||||
Mach.m_nInterf = FMI_TYPE.NONE
|
||||
Mach.m_dSideAng = 0
|
||||
@@ -155,7 +157,7 @@ Public Module SplitAuto
|
||||
Mach.m_bPause = GetPause(nOperId)
|
||||
' inserisco in lista
|
||||
MachSplitList.Add(Mach)
|
||||
' altrimenti la disattivo
|
||||
' altrimenti la disattivo
|
||||
Else
|
||||
EgtSetOperationMode(nOperId, False)
|
||||
End If
|
||||
@@ -193,7 +195,7 @@ Public Module SplitAuto
|
||||
|
||||
Private Sub ColorSingleMachining(nOperId As Integer, sLay As String, dSideAng As Double, bEnabled As Boolean, nInterf As Integer)
|
||||
' Verifico se è un taglio da sopra o da sotto
|
||||
Dim bOnMach As Boolean = (sLay = NAME_ONPATH Or ( sLay = NAME_INLOOP AndAlso EgtExistsInfo( nOperId, INFO_FILOTOP)))
|
||||
Dim bOnMach As Boolean = (sLay = NAME_ONPATH Or (sLay = NAME_INLOOP AndAlso EgtExistsInfo(nOperId, INFO_FILOTOP)))
|
||||
Dim bDrip As Boolean = (sLay = NAME_DRIPCUT Or sLay = NAME_UNDERDRILL)
|
||||
' Recupero il preview della lavorazione
|
||||
Dim nPvId As Integer = GDB_ID.NULL
|
||||
@@ -218,11 +220,11 @@ Public Module SplitAuto
|
||||
Next
|
||||
EgtSetColor(nDwnCutId, COL_MCH_DISABLED)
|
||||
Dim bFreeStart As Boolean = (nInterf And FMI_TYPE.LI) <> FMI_TYPE.LI
|
||||
EgtSetColor(nPrcId, If(bFreeStart, COL_MCH_DISABLED, COL_MCH_DIS_INTERF))
|
||||
EgtSetColor(nDwnPrcId, If(bFreeStart, COL_MCH_DISABLED, COL_MCH_DIS_INTERF))
|
||||
EgtSetColor(nPrcId, If(bFreeStart, COL_MCH_DISABLED(), COL_MCH_DIS_INTERF()))
|
||||
EgtSetColor(nDwnPrcId, If(bFreeStart, COL_MCH_DISABLED(), COL_MCH_DIS_INTERF()))
|
||||
Dim bFreeEnd As Boolean = (nInterf And FMI_TYPE.LO) <> FMI_TYPE.LO
|
||||
EgtSetColor(nPocId, If(bFreeEnd, COL_MCH_DISABLED, COL_MCH_DIS_INTERF))
|
||||
EgtSetColor(nDwnPocId, If(bFreeEnd, COL_MCH_DISABLED, COL_MCH_DIS_INTERF))
|
||||
EgtSetColor(nPocId, If(bFreeEnd, COL_MCH_DISABLED(), COL_MCH_DIS_INTERF()))
|
||||
EgtSetColor(nDwnPocId, If(bFreeEnd, COL_MCH_DISABLED(), COL_MCH_DIS_INTERF()))
|
||||
Else
|
||||
Dim colCut As Color3d
|
||||
If bOnMach Then
|
||||
@@ -341,6 +343,7 @@ Public Module SplitAuto
|
||||
Dim ptOri As Point3d
|
||||
EgtGetTableRef(1, ptOri)
|
||||
Dim vtOri As New Vector3d(ptOri.x, ptOri.y, ptOri.z)
|
||||
' ---------------------------------- GREZZI ----------------------------------
|
||||
' Eseguo eventuali spezzature dei grezzi e vi sposto i pezzi (i grezzi devono essere sempre copiati per Registrazione con rotazione)
|
||||
Dim nRawId As Integer = EgtGetFirstRawPart()
|
||||
While nRawId <> GDB_ID.NULL
|
||||
@@ -363,6 +366,13 @@ Public Module SplitAuto
|
||||
vNewRaws.Add(nNewRawId)
|
||||
nNewRawId = EgtGetNextRawPart(nNewRawId)
|
||||
End While
|
||||
Else
|
||||
' verifico che nella fase precedente è stato definito come sfrido, allora lo riassegno
|
||||
Dim nVal As Integer = 0
|
||||
EgtGetInfo(nRawId, K_ISNEWSCRAPS, nVal)
|
||||
If nVal = 1 Or nVal = 2 Or nVal = 3 Then
|
||||
EgtSetInfo(nRaw1Id, K_ISNEWSCRAPS, "3")
|
||||
End If
|
||||
End If
|
||||
' Assegno ai nuovi grezzi eventuale texture del grezzo originale
|
||||
Dim nSolidId = EgtGetFirstNameInGroup(nRawId, NAME_RAW_SOLID)
|
||||
@@ -385,10 +395,19 @@ Public Module SplitAuto
|
||||
' passo al successivo grezzo
|
||||
nRawId = EgtGetNextRawPart(nRawId)
|
||||
End While
|
||||
' ---------------------------------- GREZZI ----------------------------------
|
||||
' Cancello preview dei tagli allungati dalla lavorazione
|
||||
For Each nCut As Integer In vCuts
|
||||
RemoveMachiningPreview(nCut)
|
||||
Next
|
||||
' ---------------------------------- LAVORAZIONI ----------------------------------
|
||||
ChangeOperationPhase(nNewPhase)
|
||||
' ---------------------------------- LAVORAZIONI ----------------------------------
|
||||
Return True
|
||||
End Function
|
||||
|
||||
' Sposta le lavorzioni della fase precedente a quella indicata
|
||||
Friend Sub ChangeOperationPhase_ERR(nNewPhase As Integer)
|
||||
' Sposto tutte le lavorazioni disabilitate e le eventuali inglobate nella nuova fase
|
||||
Dim nId = EgtGetFirstOperation()
|
||||
While nId <> GDB_ID.NULL
|
||||
@@ -409,9 +428,50 @@ Public Module SplitAuto
|
||||
End If
|
||||
nId = nNextId
|
||||
End While
|
||||
Return True
|
||||
End Function
|
||||
End Sub
|
||||
|
||||
' Miglioramento della gestione delle lavorazioni
|
||||
Friend Sub ChangeOperationPhase(nNewPhase As Integer)
|
||||
' creo l'elenco delle lavorazioni che devono essere sposate
|
||||
Dim MchList As New List(Of Integer)
|
||||
' Recupero le lavorazioni disabilitate e le eventuali inglobate nella nuova fase
|
||||
Dim nId = EgtGetFirstOperation()
|
||||
While nId <> GDB_ID.NULL
|
||||
Dim nNextId = EgtGetNextOperation(nId)
|
||||
If IsValidMachining(nId) And EgtGetOperationPhase(nId) = nNewPhase - 1 And EgtExistsInfo(nId, INFO_MCH_USER_OFF) Then
|
||||
' Provo ad inserire la lavorazione nell'elenco
|
||||
AddMach(MchList, nId)
|
||||
' sposto le inglobate
|
||||
Dim sInfo As String = String.Empty
|
||||
If EgtGetInfo(nId, INFO_MCH_OTHMID, sInfo) Then
|
||||
Dim sItems() As String = sInfo.Split(",".ToCharArray)
|
||||
For Each sId2 As String In sItems
|
||||
Dim nId2 As Integer = 0
|
||||
StringToInt(sId2, nId2)
|
||||
If nId2 > 0 Then
|
||||
' Provo ad inserire la lavorazione nell'elenco
|
||||
AddMach(MchList, nId2)
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
End If
|
||||
nId = nNextId
|
||||
End While
|
||||
' Procedo ora a spostare le lavorazioni nella nuova disposizione
|
||||
For Each ItemMchId As Integer In MchList
|
||||
EgtChangeOperationPhase(ItemMchId, nNewPhase)
|
||||
Next
|
||||
End Sub
|
||||
|
||||
' Inserisce gli inidici delle lavorazioni evitando di inserire dei doppioni
|
||||
Private Sub AddMach(MchList As List(Of Integer), IdMch As Integer)
|
||||
For Each Item As Integer In MchList
|
||||
If IdMch = Item Then
|
||||
Return
|
||||
End If
|
||||
Next
|
||||
MchList.Add(IdMch)
|
||||
End Sub
|
||||
'-----------------------------------------------------------------------------------------------
|
||||
Friend Function CalculateSplitAuto() As Boolean
|
||||
' Fase iniziale
|
||||
|
||||
+87
-58
@@ -38,7 +38,7 @@
|
||||
<Image Source="{DynamicResource NumericKeyboardArrowImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="NextBtn" Grid.Column="1" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource NumericKeyboardArrowImg}" Style="{StaticResource OmagCut_ButtonIcon}" RenderTransformOrigin="0.5,0.5">
|
||||
<Image Source="{DynamicResource NumericKeyboardArrowImg}" Style="{StaticResource OmagCut_ButtonIcon}" RenderTransformOrigin="0.5,0.5">
|
||||
<Image.RenderTransform>
|
||||
<TransformGroup>
|
||||
<RotateTransform Angle="180"/>
|
||||
@@ -63,17 +63,27 @@
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<ListBox Name="MachiningLsBx" Grid.Row="1" ItemTemplate="{DynamicResource NameIdLsBxItem}"
|
||||
<ListBox Name="MachiningLsBx" Grid.Row="1"
|
||||
SelectionMode="Extended">
|
||||
<ListBox.ItemContainerStyle>
|
||||
<Style TargetType="ListBoxItem">
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding bIsActive}" Value="False">
|
||||
<Setter Property="Foreground" Value="{StaticResource OmagCut_White}"/>
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</ListBox.ItemContainerStyle>
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding Name}">
|
||||
<TextBlock.Style>
|
||||
<Style TargetType="TextBlock" BasedOn="{StaticResource OmagCut_CurrProjSummeryTextBlock}">
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding bIsActive}" Value="False">
|
||||
<Setter Property="TextDecorations" Value="Strikethrough"/>
|
||||
<Setter Property="Foreground" Value="{StaticResource OmagCut_White}"/>
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding bIsActive}" Value="True">
|
||||
<Setter Property="Foreground" Value="Black"/>
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</TextBlock.Style>
|
||||
</TextBlock>
|
||||
</DataTemplate>
|
||||
</ListBox.ItemTemplate>
|
||||
</ListBox>
|
||||
|
||||
<Grid Grid.Row="2">
|
||||
@@ -101,13 +111,13 @@
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Button Name="OnOffBtn" Grid.Column="0" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource ON_OFF-singolo-taglioImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||
<Image Source="{DynamicResource ON_OFF-singolo-taglioImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="AllOnBtn" Grid.Column="1" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource Tutti-ONImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||
<Image Source="{DynamicResource Tutti-ONImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="AllOffBtn" Grid.Column="2" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource Tutti-OFFImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||
<Image Source="{DynamicResource Tutti-OFFImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||
</Button>
|
||||
|
||||
</Grid>
|
||||
@@ -119,17 +129,36 @@
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Button Name="CutBtn" Grid.Column="0" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource Allunga-AccorciaImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="CutStartBtn" Grid.Column="1" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource Inizio-Allunga-AccorciaImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="CutEndBtn" Grid.Column="2" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource Fine-Allunga-AccorciaImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="CutBtn" Grid.Column="0" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource Allunga-AccorciaImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||
</Button>
|
||||
|
||||
<Button Name="CutStartBtn" Grid.Column="1" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource Inizio-Allunga-AccorciaImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||
</Button>
|
||||
|
||||
</Grid>
|
||||
<Button Name="CutEndBtn" Grid.Column="2" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource Fine-Allunga-AccorciaImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||
</Button>
|
||||
|
||||
<!-- solo per macchine con lavorazioni Waterjet -->
|
||||
<ToggleButton Name="BridgesWJBtn" Grid.Column="0" Style="{DynamicResource OmagCut_YellowIconToggleButton}">
|
||||
<Image Source="{DynamicResource PonticelliWJImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||
</ToggleButton>
|
||||
|
||||
<!--solo per macchine con lavorazioni Waterjet-->
|
||||
<Button Name="QualityWJBtn" Grid.Column="1" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource QualityWJImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||
</Button>
|
||||
|
||||
<!-- solo per macchine con lavorazioni Waterjet -->
|
||||
<ToggleButton Name="BridgesDeleteWJBtn" Grid.Column="3" Style="{DynamicResource OmagCut_YellowIconToggleButton}">
|
||||
<Image Source="{DynamicResource PonticelliDeleteWJImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||
</ToggleButton>
|
||||
|
||||
|
||||
|
||||
</Grid>
|
||||
|
||||
</Grid>
|
||||
|
||||
@@ -152,41 +181,41 @@
|
||||
|
||||
|
||||
<Button Name="OutCenStartBtn" Grid.Column="0" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource Inizio-Centro-FuoriImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||
<Image Source="{DynamicResource Inizio-Centro-FuoriImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="OutCenEndBtn" Grid.Column="1" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource Fine-Centro-FuoriImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="ModifStartBtn" Grid.Column="2" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource Modifica-InizioImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="ModifEndBtn" Grid.Column="3" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource Modifica-FineImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="InvertBtn" Grid.Column="4" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource InvertiImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="PauseBtn" Grid.Column="5" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource Pausa-ON_OFFImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="AllOutStartBtn" Grid.Column="6" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource Inizio-tutti-fuoriImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="AllCenStartBtn" Grid.Column="7" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource Inizio-tutti-centroImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="AllOutEndBtn" Grid.Column="8" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource Fine-tutti-fuoriImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="AllCenEndBtn" Grid.Column="9" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource Fine-tutti-centroImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="AllExtendBtn" Grid.Column="10" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource Tutti-allungaImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="AllReduceBtn" Grid.Column="11" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource Tutti-accorciaImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="OutCenEndBtn" Grid.Column="1" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource Fine-Centro-FuoriImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="ModifStartBtn" Grid.Column="2" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource Modifica-InizioImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="ModifEndBtn" Grid.Column="3" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource Modifica-FineImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="InvertBtn" Grid.Column="4" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource InvertiImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="PauseBtn" Grid.Column="5" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource Pausa-ON_OFFImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="AllOutStartBtn" Grid.Column="6" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource Inizio-tutti-fuoriImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="AllCenStartBtn" Grid.Column="7" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource Inizio-tutti-centroImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="AllOutEndBtn" Grid.Column="8" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource Fine-tutti-fuoriImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="AllCenEndBtn" Grid.Column="9" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource Fine-tutti-centroImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="AllExtendBtn" Grid.Column="10" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource Tutti-allungaImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="AllReduceBtn" Grid.Column="11" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource Tutti-accorciaImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||
</Button>
|
||||
|
||||
</Grid>
|
||||
|
||||
|
||||
+583
-153
File diff suppressed because it is too large
Load Diff
+31
-13
@@ -67,17 +67,17 @@ Module VacuumCups
|
||||
End Function
|
||||
|
||||
' carico i dati macchina relativi al peso massimo movimentabile
|
||||
Friend Sub GetWeightInformation(Density As Double, MaxSingle As Double, MaxDouble As Double)
|
||||
Friend Sub SetWeightInformation(Density As Double, MaxSingle As Double, MaxDouble As Double)
|
||||
m_RawDensity = Density
|
||||
m_MaxWeightSinglePlugger = MaxSingle
|
||||
m_MaxWeightDoublePlugger = MaxDouble
|
||||
End Sub
|
||||
|
||||
Friend Sub GetRotationForExtraStrokeY(Rotate As Boolean)
|
||||
Friend Sub SetRotationForExtraStrokeY(Rotate As Boolean)
|
||||
bRotateVacuumNearExtraStrokeY = Rotate
|
||||
End Sub
|
||||
|
||||
Friend Sub GetRotationForExtraStrokeX(Rotate As Boolean)
|
||||
Friend Sub SetRotationForExtraStrokeX(Rotate As Boolean)
|
||||
bRotateVacuumNearExtraStrokeX = Rotate
|
||||
End Sub
|
||||
Friend Function GetVacuumId() As Integer
|
||||
@@ -451,14 +451,14 @@ Module VacuumCups
|
||||
Dim dPreferredRot As Double = m_dPreferredRot
|
||||
' -------------------- INIZIO GESTIONE ROTAZIONE ASSE C PER NON ANDARE IN EXTRA-CORSA --------------------
|
||||
' verifico l'orientamento del pezzo
|
||||
If bRotateVacuumNearExtraStrokeX And (Math.Abs(dRotAngDeg - 90) < 45 Or Math.Abs(dRotAngDeg - 270) < 45) Then
|
||||
If bRotateVacuumNearExtraStrokeX And Not IsHorizontal(dAngOrizzDeg) Then
|
||||
' se l'orientamento è verticale
|
||||
If frMinRect.Orig().x < b3Tab.Center().x Then
|
||||
dPreferredRot = m_dPrefVertRotXMinus
|
||||
Else
|
||||
dPreferredRot = m_dPrefVertRotXPlus
|
||||
End If
|
||||
ElseIf bRotateVacuumNearExtraStrokeY And (Math.Abs(dRotAngDeg - 90) > 45 Or Math.Abs(dRotAngDeg - 270) > 45) Then
|
||||
ElseIf bRotateVacuumNearExtraStrokeY And IsHorizontal(dAngOrizzDeg) Then
|
||||
' se l'orientemanto è orizzontale e la macchina è stata abilitata
|
||||
If frMinRect.Orig().y < b3Tab.Center().y Then
|
||||
dPreferredRot = m_dPrefVertRotYPlus
|
||||
@@ -467,8 +467,8 @@ Module VacuumCups
|
||||
End If
|
||||
End If
|
||||
' -------------------- FINE GESTIONE ROTAZIONE ASSE C PER NON ANDARE IN EXTRA-CORSA --------------------
|
||||
Dim dAngDelta As Double = If( Math.Abs( b3Vac.DimY() - b3Vac.DimX()) < 10 * EPS_SMALL, 90, 180)
|
||||
While dRotAngDeg - dPreferredRot >= dAngDelta / 2
|
||||
Dim dAngDelta As Double = If(Math.Abs(b3Vac.DimY() - b3Vac.DimX()) < 10 * EPS_SMALL, 90, 180)
|
||||
While dRotAngDeg - dPreferredRot >= dAngDelta / 2
|
||||
dRotAngDeg -= dAngDelta
|
||||
End While
|
||||
While dRotAngDeg - dPreferredRot <= -dAngDelta / 2
|
||||
@@ -539,16 +539,34 @@ Module VacuumCups
|
||||
Return dDist
|
||||
End Function
|
||||
|
||||
' assegante le posizioni del centro delle ventose e l'angolo di posizionamento orizzontale verifica che la posizione sia raggiungibile
|
||||
Private Function IsHorizontal(dDegAng As Double) As Boolean
|
||||
If (Math.Abs(dDegAng) > 45 And Math.Abs(dDegAng) < 135) Or (Math.Abs(dDegAng) > 225 And Math.Abs(dDegAng) < 315) Then
|
||||
Return False
|
||||
End If
|
||||
Return True
|
||||
End Function
|
||||
|
||||
' assegnate le posizioni del centro delle ventose e l'angolo di posizionamento orizzontale verifica che la posizione sia raggiungibile
|
||||
Public Function VerifyOutOfStrokes(ptRef As Point3d, dRotAngDeg As Double) As Integer
|
||||
Dim dX, dY, dZ As Double
|
||||
Dim nStat As Integer
|
||||
' Posizione Home dell'asse rotante
|
||||
Dim dCHome As Double
|
||||
EgtGetAxisHomePos("C", dCHome)
|
||||
' imposto la l'uscita della ventosa come fosse l'uscita di un utensile
|
||||
' Corse dell'asse
|
||||
Dim dCMin As Double
|
||||
EgtGetAxisMin("C", dCMin)
|
||||
Dim dCMax As Double
|
||||
EgtGetAxisMax("C", dCMax)
|
||||
' Porto l'angolo nel range
|
||||
Dim dRotAngMachDeg As Double = dRotAngDeg + dCHome
|
||||
AdjustAngleInRange(dRotAngMachDeg, dCMin, dCMax)
|
||||
' Imposto la ventosa come fosse un utensile
|
||||
EgtSetCalcTool("", "H4", 1)
|
||||
EgtGetCalcPositions(ptRef, dRotAngDeg + dCHome, 0, nStat, dX, dY, dZ)
|
||||
EgtVerifyOutstroke(dX, dY, dZ, dRotAngDeg + dCHome, 0, nStat)
|
||||
' Calcolo gli assi macchina
|
||||
Dim dX, dY, dZ As Double
|
||||
Dim nStat As Integer
|
||||
EgtGetCalcPositions(ptRef, dRotAngMachDeg, 0, nStat, dX, dY, dZ)
|
||||
' Verifico le corse
|
||||
EgtVerifyOutstroke(dX, dY, dZ, dRotAngMachDeg, 0, nStat)
|
||||
Return nStat
|
||||
End Function
|
||||
|
||||
|
||||
@@ -189,6 +189,8 @@ Module ConstGen
|
||||
Public Const INFO_TOPRODAREA As String = "ToProdArea"
|
||||
' Info per nome progetti
|
||||
Public Const INFO_PROJNAME As String = "ProjName"
|
||||
' Info per parcheggio asse C
|
||||
Public Const INFO_CAXESHOME As String = "CAxesHome"
|
||||
|
||||
' Nome layer delle regioni
|
||||
Public Const NAME_REGION As String = "Region"
|
||||
@@ -343,6 +345,11 @@ Module ConstGen
|
||||
' Info in pezzo per facet di ultima superficie selezionata
|
||||
Public Const INFO_FRAME_FACET As String = "Facet"
|
||||
|
||||
' Nome del groppo dei ponticelli per lavorazioni Water
|
||||
Public Const BRIDGES As String = "Bridges"
|
||||
' Nome dell'entità ponticello contenuta nel gruppo BRIDGES
|
||||
Public Const BRIDGELINE As String = "BridgeLine"
|
||||
|
||||
' utensile per le lavorazioni manuali
|
||||
Public Const DUMMY_SAW As String = "DummySAW"
|
||||
' lavorazione manuale
|
||||
@@ -386,6 +393,9 @@ Module ConstGen
|
||||
Public Function COL_MCH_DRIPCUT() As Color3d
|
||||
Return New Color3d(255, 0, 165)
|
||||
End Function
|
||||
Public Function COL_MCH_ONENGRAVE_ANG() As Color3d
|
||||
Return New Color3d(255, 255, 100)
|
||||
End Function
|
||||
Public Function COL_MCH_DRIPFREE() As Color3d
|
||||
Return New Color3d(192, 0, 128)
|
||||
End Function
|
||||
|
||||
@@ -18,6 +18,7 @@ Module ConstIni
|
||||
Public Const S_GENERAL As String = "General"
|
||||
Public Const K_DEBUG As String = "Debug"
|
||||
Public Const K_LICENCE As String = "Licence"
|
||||
Public Const K_NETKEY As String = "NetKey"
|
||||
Public Const K_MESSAGESDIR As String = "MessagesDir"
|
||||
Public Const K_MESSAGES As String = "Messages"
|
||||
Public Const K_SUPPORT As String = "Support"
|
||||
@@ -49,6 +50,8 @@ Module ConstIni
|
||||
Public Const K_SMARTMACHININGPAGE As String = "SmartMachiningPage"
|
||||
Public Const K_STARTPROGRAM As String = "StartProgram"
|
||||
Public Const K_GENERATECN As String = "GenerateCN"
|
||||
Public Const K_FRACTIONPATTERN As String = "FractionPattern"
|
||||
Public Const K_PRECISION As String = "Precision"
|
||||
|
||||
|
||||
Public Const S_LANGUAGES As String = "Languages"
|
||||
@@ -113,6 +116,8 @@ Module ConstIni
|
||||
Public Const K_LASTCOLOR As String = "LastColor"
|
||||
Public Const K_COLOR As String = "Color"
|
||||
|
||||
Public Const S_FRAMECOMPO As String = "FrameCompo"
|
||||
|
||||
Public Const S_EXTCOMPO As String = "Compo"
|
||||
|
||||
Public Const S_INTCOMPO As String = "InternalCompo"
|
||||
@@ -135,6 +140,7 @@ Module ConstIni
|
||||
Public Const K_ENGRAVEDEPTH As String = "EngraveDepth"
|
||||
Public Const K_ENGRAVEDEPTH2 As String = "EngraveDepth2"
|
||||
Public Const K_ENGRAVESHORT As String = "EngraveShort"
|
||||
Public Const K_ENGRAVEANGLE As String = "EngraveAngle"
|
||||
Public Const K_DRIPOFFSET As String = "DripOffset"
|
||||
Public Const K_DRIPOFFSET2 As String = "DripOffset2"
|
||||
Public Const K_DRIPDEPTH As String = "DripDepth"
|
||||
@@ -155,6 +161,7 @@ Module ConstIni
|
||||
Public Const K_AUTOMATICOPTIMIZE As String = "AutomaticOptimize"
|
||||
Public Const K_AUTOMATICMAXTIME As String = "AutomaticMaxTime"
|
||||
Public Const K_DRAG_RETTANGLE As String = "DragRectangle"
|
||||
Public Const K_STARTENDMODIFYONINTCORNER As String = "StartEndModifyOnIntCorner"
|
||||
|
||||
Public Const S_SPLIT As String = "Split"
|
||||
Public Const K_MOVE_LEV As String = "MoveLevel"
|
||||
@@ -170,6 +177,14 @@ Module ConstIni
|
||||
Public Const K_CSVCURRDIR As String = "CurrDir"
|
||||
Public Const K_CSVLASTFILE As String = "LastFile"
|
||||
|
||||
Public Const S_TRF As String = "TRF"
|
||||
Public Const K_ORDCODE As String = "OrdCode"
|
||||
Public Const K_ORDDESC As String = "OrdDesc"
|
||||
Public Const K_PARTCODE As String = "PartCode"
|
||||
Public Const K_MATCODE As String = "MatCode"
|
||||
Public Const K_SURFCODE As String = "SurfCode"
|
||||
Public Const K_TRFTHICKNESS As String = "TrfThickness"
|
||||
|
||||
Public Const S_SLABDXF As String = "SlabDxf"
|
||||
Public Const K_IMPORTSLABDXF As String = "ImportSlabDxf"
|
||||
Public Const K_SLABLAYER As String = "SlabLayer"
|
||||
@@ -191,6 +206,7 @@ Module ConstIni
|
||||
Public Const K_OFFSZ As String = "OffsZ"
|
||||
Public Const K_OFFSXY As String = "OffsXY"
|
||||
Public Const K_OFFSYY As String = "OffsYY"
|
||||
Public Const K_OFFSXINTERY As String = "OffsYInterY"
|
||||
Public Const K_STARTTRIM As String = "StartTrim"
|
||||
Public Const K_ENDTRIM As String = "EndTrim"
|
||||
Public Const K_OTHERSIDE As String = "OtherSide"
|
||||
@@ -210,12 +226,27 @@ Module ConstIni
|
||||
Public Const K_RAWOFFSX As String = "OffsX"
|
||||
Public Const K_RAWOFFSY As String = "OffsY"
|
||||
Public Const K_RAWKERF As String = "Kerf"
|
||||
Public Const K_ENABLEOTHERREFTAB As String = "EnableOtherRefTab"
|
||||
Public Const K_OTHERREFTAB As String = "OtherRefTab"
|
||||
Public Const K_OTHERREFTABX As String = "OtherRefTabX"
|
||||
Public Const K_OTHERREFTABY As String = "OtherRefTabY"
|
||||
Public Const K_OTHERREFTABPOS As String = "OtherRefTabPos"
|
||||
|
||||
|
||||
Public Const S_RAWMOVE As String = "RawMove"
|
||||
Public Const K_RAWSTEP As String = "Step"
|
||||
Public Const K_RAWROTATION As String = "Rotation"
|
||||
Public Const K_PERPENDICULAR As String = "Perpendicular"
|
||||
|
||||
Public Const S_SCRAPS As String = "Scraps"
|
||||
Public Const K_ENABLESCRAPS As String = "EnableScraps"
|
||||
Public Const K_PHOTODIR As String = "PhotoDir"
|
||||
Public Const K_LASTBLOCK As String = "LastBlock"
|
||||
Public Const K_TEMPLATE As String = "Template"
|
||||
Public Const K_DAT As String = "Dat"
|
||||
Public Const K_ZEBRAUTILITIES As String = "ZebraUtilities"
|
||||
Public Const K_ENABLE_PRINTER As String = "EnablePrinter"
|
||||
|
||||
Public Const S_REG As String = "Reg"
|
||||
Public Const K_REGSTEP As String = "Step"
|
||||
Public Const K_REGANGSTEP As String = "AngStep"
|
||||
@@ -308,6 +339,9 @@ Module ConstIni
|
||||
Public Const K_DC_TEST_LENGTH As String = "TestLength"
|
||||
Public Const K_DC_TEST_ANGH As String = "TestAngH"
|
||||
Public Const K_DC_TEST_OFFSET As String = "TestOffset"
|
||||
Public Const K_DC_OFFSET_SQUARING As String = "OffsetSquaring"
|
||||
Public Const K_DC_EXTRA_LEN_SQUARING As String = "ExtraLenSquaring"
|
||||
Public Const K_ENABLEINVERT As String = "EnableInvert"
|
||||
|
||||
Public Const S_STATDATA As String = "StatData"
|
||||
Public Const K_SD_DAY As String = "Day"
|
||||
|
||||
@@ -46,6 +46,16 @@
|
||||
Public Const K_THREADSLEEP As String = "ThreadSleep"
|
||||
Public Const K_PHOTODELEY As String = "PhotoDeley"
|
||||
|
||||
Public Const S_NCFANUC As String = "NcFanuc"
|
||||
Public Const K_SETNCMODE As String = "SetNcMode"
|
||||
Public Const K_BASEADDRINT As String = "BaseAddrInt"
|
||||
Public Const K_BASEADDRBIT As String = "BaseAddrBit"
|
||||
Public Const K_NUMVARINT As String = "NumVarInt"
|
||||
Public Const K_NUMVARBIT As String = "NumVarBit"
|
||||
|
||||
Public Const S_EXECLUA As String = "ExecLua"
|
||||
Public Const K_FILESCRIPT_LUA As String = "FileScript"
|
||||
|
||||
Public Const S_NCDATA As String = "NcData"
|
||||
Public Const K_NEWVARIABLE As String = "NewVariable"
|
||||
Public Const K_NEWCONSOLE As String = "NewConsole"
|
||||
@@ -75,6 +85,7 @@
|
||||
Public Const K_TABLEDOWN As String = "TableDown"
|
||||
Public Const K_MANUAL As String = "Manual"
|
||||
Public Const K_DOORCLOSED As String = "DoorClosed"
|
||||
Public Const K_DOOROPENDED As String = "DoorOpened"
|
||||
Public Const K_LIMITZ As String = "LimitZ"
|
||||
Public Const K_POWEROVR As String = "PowerOvr"
|
||||
Public Const K_PARKING As String = "Parking"
|
||||
@@ -109,6 +120,7 @@
|
||||
Public Const K_FEEDHOLD As String = "FeedHold"
|
||||
Public Const K_SPOTLIGHT1 As String = "SpotLight1"
|
||||
Public Const K_SPOTLIGHT2 As String = "SpotLight2"
|
||||
Public Const K_NAXES As String = "nAxes"
|
||||
' Nuove variabili
|
||||
Public Const K_SPEEDHOLD As String = "SpeedHold"
|
||||
Public Const K_XYJOG As String = "XYJog"
|
||||
@@ -216,6 +228,11 @@
|
||||
Public Const K_MACH_CUTFSEVLEN As String = "CutFsevLen"
|
||||
Public Const K_MACH_CUTFSEVPERC As String = "CutFsevPerc"
|
||||
Public Const K_USELASERORIGIN As String = "UseLaserOrigin"
|
||||
Public Const K_HOLES_DIAMITERWJ As String = "HolesDiameterWJ"
|
||||
Public Const K_HOLES_OFFSETWJ As String = "HolesOffsetWJ"
|
||||
Public Const K_MIN_RADIUSWJ As String = "MinRadiusWJ"
|
||||
Public Const K_MACH_DRILLINGWJ_ON_CORNERS As String = "DrillingWJOnCorners"
|
||||
Public Const K_MACH_RECTIFICATION_ON_SUBSQUARE As String = "RectificationSubSqWJ"
|
||||
' DrillMillC90
|
||||
' CutLongDxSx
|
||||
' AngRotMultiCut
|
||||
@@ -233,6 +250,9 @@
|
||||
Public Const K_MACH_ROTATEVACUUMFOREXTRASTROKEY As String = "RotateVacuumForExtraStrokeY"
|
||||
Public Const K_MACH_ROTATEVACUUMFOREXTRASTROKEX As String = "RotateVacuumForExtraStrokeX"
|
||||
|
||||
Public Const K_ISNEWSCRAPS As String = "IsNewScraps"
|
||||
Public Const K_DATABASEID As String = "DatabaseID"
|
||||
|
||||
Public Const S_MACH_REG As String = "Reg"
|
||||
Public Const K_MACH_MAX_ROT_ANG As String = "MaxRotAng"
|
||||
|
||||
@@ -260,6 +280,7 @@
|
||||
Public Const S_MACH_PROBING As String = "Probing"
|
||||
Public Const K_PROBINGSTATEVAR As String = "ProbingStateVar"
|
||||
Public Const K_SAWDIAMETER As String = "SawDiameter"
|
||||
Public Const K_TOOLLENGTH As String = "ToolLength"
|
||||
Public Const K_RAWTHICKNESS As String = "RawThickness"
|
||||
Public Const K_ENABLERAWPROBE As String = "EnableRawProbe"
|
||||
|
||||
|
||||
@@ -0,0 +1,177 @@
|
||||
<UserControl x:Class="ControlsDirectCutUC"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
DataContext="Self"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:OmagCUT="clr-namespace:OmagCUT"
|
||||
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="597.3" d:DesignWidth="256">
|
||||
|
||||
<Grid Name="LeftButtonGrid" Grid.Row="1" >
|
||||
<Grid.RowDefinitions>
|
||||
<!--<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="7*"/>-->
|
||||
<RowDefinition Height="9*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<!-- Definizione della Grid laterale -->
|
||||
<Grid Name="CutTypeGrid" Grid.Row="1" >
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<!--<RowDefinition Height="1*"/>-->
|
||||
</Grid.RowDefinitions>
|
||||
<Button Name="ManualBtn" Grid.Column="2" Grid.Row="0"
|
||||
Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="80"/>
|
||||
<ColumnDefinition Width="140"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Image Source="{DynamicResource Movimento-manualeImg}" Style="{DynamicResource OmagCut_ButtonIcon}" Grid.Column="0" />
|
||||
<TextBlock Name="ManualTxt" Grid.Column="1"
|
||||
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</Grid>
|
||||
</Button>
|
||||
|
||||
<Button Name="SingleCutBtn" Grid.Row="1"
|
||||
Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="80"/>
|
||||
<ColumnDefinition Width="140"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Image Source="{DynamicResource Taglio-singoloImg}" Style="{DynamicResource OmagCut_ButtonIcon}" Grid.Column="0" />
|
||||
<TextBlock Name="SingleCutTxt" Grid.Column="1"
|
||||
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</Grid>
|
||||
</Button>
|
||||
|
||||
<Button Name="MultipleCutBtn" Grid.Row="2"
|
||||
Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="80"/>
|
||||
<ColumnDefinition Width="140"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Image Source="{DynamicResource Taglio-multiploImg}" Style="{DynamicResource OmagCut_ButtonIcon}" Grid.Column="0" />
|
||||
<TextBlock Name="MultipleCutTxt" Grid.Column="1"
|
||||
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</Grid>
|
||||
</Button>
|
||||
|
||||
<Button Name="GridCutBtn" Grid.Row="3"
|
||||
Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="80"/>
|
||||
<ColumnDefinition Width="140"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Image Source="{DynamicResource Taglio-grigliaImg}" Style="{DynamicResource OmagCut_ButtonIcon}" Grid.Column="0" />
|
||||
<TextBlock Name="GridCutTxt" Grid.Column="1"
|
||||
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</Grid>
|
||||
</Button>
|
||||
|
||||
|
||||
<Button Name="SingleDrillBtn" Grid.Row="4"
|
||||
Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="80"/>
|
||||
<ColumnDefinition Width="140"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Image Source="{DynamicResource Foro-singoloImg}" Style="{DynamicResource OmagCut_ButtonIcon}" Grid.Column="0" />
|
||||
<TextBlock Name="SingleDrillTxt" Grid.Column="1"
|
||||
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</Grid>
|
||||
</Button>
|
||||
|
||||
<Button Name="FlatteningCutBtn" Grid.Row="5"
|
||||
Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="80"/>
|
||||
<ColumnDefinition Width="140"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Image Source="{DynamicResource SpianaturaImg}" Style="{DynamicResource OmagCut_ButtonIcon}" Grid.Column="0" />
|
||||
<TextBlock Name="FlatteningCutTxt" Grid.Column="1"
|
||||
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</Grid>
|
||||
</Button>
|
||||
|
||||
<!--<Button Name="PolishingBtn" Grid.Row="6"
|
||||
Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="80"/>
|
||||
<ColumnDefinition Width="140"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Image Source="{DynamicResource LucidaturaImg}" Style="{DynamicResource OmagCut_ButtonIcon}" Grid.Column="0" />
|
||||
<TextBlock Name="PolishingTxt" Grid.Column="1"
|
||||
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</Grid>
|
||||
</Button>-->
|
||||
|
||||
<!--<Button Name="CopyTemplateBtn" Grid.Row="7"
|
||||
Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="80"/>
|
||||
<ColumnDefinition Width="140"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Image Source="{DynamicResource Copia-dimaImg}" Style="{DynamicResource OmagCut_ButtonIcon}" Grid.Column="0" />
|
||||
<TextBlock Name="CopyTemplateTxt" Grid.Column="1"
|
||||
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</Grid>
|
||||
</Button>-->
|
||||
|
||||
<Button Name="SquaringBtn" Grid.Row="6"
|
||||
Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="80"/>
|
||||
<ColumnDefinition Width="140"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Image Source="{DynamicResource Copia-dimaImg}" Style="{DynamicResource OmagCut_ButtonIcon}" Grid.Column="0" />
|
||||
<TextBlock Name="SquaringTxt" Grid.Column="1"
|
||||
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</Grid>
|
||||
</Button>
|
||||
|
||||
<!--<Button Name="SawTestBtn" Grid.Row="6"
|
||||
Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="80"/>
|
||||
<ColumnDefinition Width="140"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Image Source="{DynamicResource Test-lamaImg}" Style="{DynamicResource OmagCut_ButtonIcon}" Grid.Column="0" />
|
||||
<TextBlock Name="SawTestTxt" Grid.Column="1"
|
||||
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</Grid>
|
||||
</Button>-->
|
||||
|
||||
<Grid Name="ChangeUCGrid" Grid.Row="7">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Button Name="ChangeUCBtn" Grid.ColumnSpan="2" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Grid>
|
||||
<!--<Image Name="ImageCompo9" Source="{DynamicResource NumericKeyboardArrowImg}" />-->
|
||||
<TextBlock Name="ChangeUCTxBl" Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</Grid>
|
||||
</Button>
|
||||
</Grid>
|
||||
|
||||
</Grid>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
@@ -0,0 +1,265 @@
|
||||
Imports EgtUILib
|
||||
Public Class ControlsDirectCutUC
|
||||
|
||||
' Dichiarazione delle Page UserControl
|
||||
Private m_MainWindow As MainWindow = DirectCast(Application.Current.MainWindow, MainWindow)
|
||||
' ---- MAI USATA ---- nuova finestra per i comandi per il taglio manuale nuovo
|
||||
Friend m_SingleCutAuto As SingleCutAuto
|
||||
' ---- MAI USATA ----
|
||||
Friend m_MachineButtons As MachineButtonsUC
|
||||
Friend m_ManualAxesMove As ManualAxesMoveUC
|
||||
Friend m_SingleCut As SingleCutUC
|
||||
Friend m_SingleDrill As SingleDrillUC
|
||||
Friend m_MultipleCut As MultipleCut
|
||||
Friend m_GridCut As GridCut
|
||||
Friend m_FlatteningCut As FlatteningCut
|
||||
Friend m_Squaring As SquaringUC
|
||||
Friend m_ControlsMachineButton As ControlsMachineButtonUC
|
||||
Friend m_VacuumMachineButton As VacuumMachineButtonUC
|
||||
|
||||
Friend m_ControlDirectCutPage1 As ControlsDirectCutUC1
|
||||
|
||||
' Stato di visualizzazione della macchina
|
||||
Friend m_bShowMachine As Boolean = False
|
||||
Friend m_nMachLook As Integer = MCH_LOOK.ALL
|
||||
' Dati generali CN
|
||||
Friend m_CN As CN_generico
|
||||
Private m_bFirst As Boolean = True
|
||||
' Riferimento alla pagina correntemente attiva
|
||||
Friend m_ActiveDirectCutPage As DirectCutPages = DirectCutPages.DirectCut
|
||||
' Variabili che indicano attivazione paginette con bottoni macchina
|
||||
Private m_ControlsBtn_IsActive As Boolean
|
||||
|
||||
Public Shared m_dZSafe As Double = 52
|
||||
|
||||
' Variabile che indica se sono attivi i bottoni macchina nuovi o vecchi
|
||||
Friend m_NewMachineButtonsType As Boolean
|
||||
' Indica che la finestra del talio Singolo deve essere di tipo manuale
|
||||
Friend m_bManulaCut As Boolean = False
|
||||
|
||||
' elenco dei nuovi bottoni
|
||||
Private m_ButtonJogList As New List(Of MachineButton)
|
||||
|
||||
Enum DirectCutPages
|
||||
' pagina principale di tagli diretti
|
||||
DirectCut
|
||||
' nuova pagina di tagli diretti
|
||||
DirectCut1
|
||||
' elenco dei comandi associati
|
||||
ManualAxesMove
|
||||
SingleCut
|
||||
MultipleCut
|
||||
GridCut
|
||||
FlatteningCut
|
||||
Polishing
|
||||
CopyTemplate
|
||||
SawTest
|
||||
SingleCutAuto
|
||||
SingleDrill
|
||||
Squaring
|
||||
End Enum
|
||||
|
||||
Private Sub ControlsDirectCutUC_Initialized(sender As Object, e As EventArgs) Handles Me.Initialized
|
||||
' leggo la configurazione del programma per i nuovi tagli manuali
|
||||
m_bManulaCut = GetPrivateProfileInt(S_GENERAL, K_MANUAL_CUT, 0, m_MainWindow.GetIniFile()) <> 0
|
||||
|
||||
'Creazione delle Page UserControl
|
||||
m_MachineButtons = New MachineButtonsUC
|
||||
m_ManualAxesMove = New ManualAxesMoveUC
|
||||
m_SingleCut = New SingleCutUC
|
||||
m_SingleDrill = New SingleDrillUC
|
||||
m_MultipleCut = New MultipleCut
|
||||
m_GridCut = New GridCut
|
||||
m_FlatteningCut = New FlatteningCut
|
||||
m_Squaring = New SquaringUC
|
||||
m_ControlsMachineButton = New ControlsMachineButtonUC
|
||||
m_VacuumMachineButton = New VacuumMachineButtonUC
|
||||
' reiferimento alla pagina succesiva
|
||||
m_ControlDirectCutPage1 = New ControlsDirectCutUC1
|
||||
' Costruisco la finestra per il nuovo tipo di taglio manuale
|
||||
m_SingleCutAuto = New SingleCutAuto
|
||||
|
||||
'Posizionemento nella griglia delle Page UserControl DirectCutPageUC
|
||||
m_MachineButtons.SetValue(Grid.RowProperty, 2)
|
||||
m_MachineButtons.SetValue(Grid.ColumnSpanProperty, 7)
|
||||
m_ManualAxesMove.SetValue(Grid.RowProperty, 1)
|
||||
If m_bManulaCut Then
|
||||
m_SingleCutAuto.SetValue(Grid.RowProperty, 1)
|
||||
Else
|
||||
m_SingleCut.SetValue(Grid.RowProperty, 1)
|
||||
End If
|
||||
m_SingleDrill.SetValue(Grid.RowProperty, 1)
|
||||
m_MultipleCut.SetValue(Grid.RowProperty, 1)
|
||||
m_GridCut.SetValue(Grid.RowProperty, 1)
|
||||
m_FlatteningCut.SetValue(Grid.RowProperty, 1)
|
||||
m_Squaring.SetValue(Grid.RowProperty, 1)
|
||||
m_ControlsMachineButton.SetValue(Grid.RowProperty, 1)
|
||||
m_VacuumMachineButton.SetValue(Grid.RowProperty, 1)
|
||||
|
||||
' ManualBtn.Content = EgtMsg(90201)
|
||||
ManualTxt.Text = EgtMsg(90201)
|
||||
'SingleCutBtn.Content = EgtMsg(90202)
|
||||
SingleCutTxt.Text = EgtMsg(90202)
|
||||
'SingleDrillBtn.Content = "Foro singolo"
|
||||
SingleDrillTxt.Text = EgtMsg(90258)
|
||||
'MultipleCutBtn.Content = EgtMsg(90203)
|
||||
MultipleCutTxt.Text = EgtMsg(90203)
|
||||
'GridCutBtn.Content = EgtMsg(90204)
|
||||
GridCutTxt.Text = EgtMsg(90204)
|
||||
'FlatteningCutBtn.Content = EgtMsg(90206)
|
||||
FlatteningCutTxt.Text = EgtMsg(90206)
|
||||
' 90261=Squaring
|
||||
SquaringTxt.Text = EgtMsg(90261)
|
||||
' 90409=Others
|
||||
ChangeUCTxBl.Text = EgtMsg(90409)
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub ControlsDirectCutUC_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded
|
||||
' Se rientro da simulazione
|
||||
If m_ActiveDirectCutPage = DirectCutPages.SingleCut Then
|
||||
LeftButtonGrid.Children.Add(m_SingleCut)
|
||||
Return
|
||||
ElseIf m_ActiveDirectCutPage = DirectCutPages.SingleCutAuto Then
|
||||
LeftButtonGrid.Children.Add(m_SingleCutAuto)
|
||||
Return
|
||||
ElseIf m_ActiveDirectCutPage = DirectCutPages.MultipleCut Then
|
||||
LeftButtonGrid.Children.Add(m_MultipleCut)
|
||||
Return
|
||||
ElseIf m_ActiveDirectCutPage = DirectCutPages.GridCut Then
|
||||
LeftButtonGrid.Children.Add(m_GridCut)
|
||||
Return
|
||||
ElseIf m_ActiveDirectCutPage = DirectCutPages.FlatteningCut Then
|
||||
LeftButtonGrid.Children.Add(m_FlatteningCut)
|
||||
Return
|
||||
ElseIf m_ActiveDirectCutPage = DirectCutPages.SingleDrill Then
|
||||
LeftButtonGrid.Children.Add(m_SingleDrill)
|
||||
Return
|
||||
ElseIf m_ActiveDirectCutPage = DirectCutPages.Squaring Then
|
||||
LeftButtonGrid.Children.Add(m_Squaring)
|
||||
Return
|
||||
End If
|
||||
|
||||
If m_MainWindow.m_DirectCutPageUC.m_ActiveControl <> DirectCutPageUC.Controls.MachineButtonUC Or
|
||||
m_MainWindow.m_DirectCutPageUC.m_ActiveControl <> DirectCutPageUC.Controls.VacuumButtonUC Then
|
||||
' Caso standard
|
||||
m_ActiveDirectCutPage = DirectCutPages.DirectCut
|
||||
End If
|
||||
|
||||
' Attivo le lavorazioni solo se esiste il grezzo e se presente testa H1
|
||||
Dim bRawOk As Boolean = (GetRawHeight() > EPS_SMALL)
|
||||
Dim bH1Exists As Boolean = (EgtGetHeadId("H1") <> GDB_ID.NULL)
|
||||
|
||||
ManualBtn.IsEnabled = bH1Exists
|
||||
' sviluppo rimasto in sospeso
|
||||
If m_bManulaCut Then
|
||||
' anche se non è presente un grezzo mantengo abilitato il bottone
|
||||
SingleCutBtn.IsEnabled = True
|
||||
Else
|
||||
SingleCutBtn.IsEnabled = bRawOk
|
||||
End If
|
||||
MultipleCutBtn.IsEnabled = bRawOk
|
||||
GridCutBtn.IsEnabled = bRawOk
|
||||
SingleDrillBtn.IsEnabled = (bRawOk And bH1Exists)
|
||||
FlatteningCutBtn.IsEnabled = (bRawOk And bH1Exists)
|
||||
SquaringBtn.IsEnabled = bRawOk
|
||||
|
||||
' aggiorno la visualizzazione dei parametri
|
||||
ReloadParam()
|
||||
|
||||
' Nascondo i pezzi in parcheggio
|
||||
HideParkedParts()
|
||||
EgtZoom(ZM.ALL)
|
||||
|
||||
End Sub
|
||||
|
||||
' ricarico i parametri utensili per definizione
|
||||
Public Sub ReloadParam()
|
||||
Dim sCurrSawing As String = m_MainWindow.m_CurrentMachine.sCurrSawing
|
||||
Dim sCurrSaw As String = m_MainWindow.m_CurrentMachine.sCurrSaw
|
||||
Dim bSaw As Boolean = False
|
||||
|
||||
' se esiste una lavorazione di lama corrente vuol dire che deve essere preferita
|
||||
If Not String.IsNullOrEmpty(sCurrSaw) And Not String.IsNullOrEmpty(sCurrSawing) Then
|
||||
bSaw = EgtSetCalcTool(sCurrSaw, "H1", 1)
|
||||
End If
|
||||
m_SingleCut.SetEnableParam(bSaw)
|
||||
m_MultipleCut.SetEnableParam(bSaw)
|
||||
m_GridCut.SetEnableParam(bSaw)
|
||||
End Sub
|
||||
|
||||
#Region "COMMAND CLICK BTN"
|
||||
|
||||
Private Sub ManualBtn_Click(sender As Object, e As RoutedEventArgs) Handles ManualBtn.Click
|
||||
LeftButtonGrid.Children.Add(m_ManualAxesMove)
|
||||
m_ActiveDirectCutPage = DirectCutPages.ManualAxesMove
|
||||
End Sub
|
||||
|
||||
Private Sub SingleCutBtn_Click(sender As Object, e As RoutedEventArgs) Handles SingleCutBtn.Click
|
||||
If m_bManulaCut Then
|
||||
LeftButtonGrid.Children.Add(m_SingleCutAuto)
|
||||
m_ActiveDirectCutPage = DirectCutPages.SingleCutAuto
|
||||
Else
|
||||
LeftButtonGrid.Children.Add(m_SingleCut)
|
||||
m_ActiveDirectCutPage = DirectCutPages.SingleCut
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub MultipleCutBtn_Click(sender As Object, e As RoutedEventArgs) Handles MultipleCutBtn.Click
|
||||
LeftButtonGrid.Children.Add(m_MultipleCut)
|
||||
m_ActiveDirectCutPage = DirectCutPages.MultipleCut
|
||||
End Sub
|
||||
|
||||
Private Sub GridCutBtn_Click(sender As Object, e As RoutedEventArgs) Handles GridCutBtn.Click
|
||||
LeftButtonGrid.Children.Add(m_GridCut)
|
||||
m_ActiveDirectCutPage = DirectCutPages.GridCut
|
||||
End Sub
|
||||
|
||||
Private Sub FlatteningCutBtn_Click(sender As Object, e As RoutedEventArgs) Handles FlatteningCutBtn.Click
|
||||
LeftButtonGrid.Children.Add(m_FlatteningCut)
|
||||
m_ActiveDirectCutPage = DirectCutPages.FlatteningCut
|
||||
End Sub
|
||||
|
||||
Private Sub SquaringBtn_Click(sender As Object, e As RoutedEventArgs) Handles SquaringBtn.Click
|
||||
LeftButtonGrid.Children.Add(m_Squaring)
|
||||
m_ActiveDirectCutPage = DirectCutPages.Squaring
|
||||
End Sub
|
||||
|
||||
Private Sub SingleDrillBtn_Click(sender As Object, e As RoutedEventArgs) Handles SingleDrillBtn.Click
|
||||
LeftButtonGrid.Children.Add(m_SingleDrill)
|
||||
m_ActiveDirectCutPage = DirectCutPages.SingleDrill
|
||||
End Sub
|
||||
|
||||
' cambio pagina
|
||||
Private Sub ChangeUCBtn_Click(sender As Object, e As RoutedEventArgs) Handles ChangeUCBtn.Click
|
||||
DirectCutPage_Unloaded(Nothing, Nothing)
|
||||
m_ActiveDirectCutPage = DirectCutPages.DirectCut
|
||||
m_MainWindow.m_DirectCutPageUC.LoadDirectCutUC1()
|
||||
End Sub
|
||||
|
||||
#End Region ' Command Click Btn
|
||||
|
||||
|
||||
Friend Sub DirectCutPage_Unloaded(sender As Object, e As RoutedEventArgs) Handles Me.Unloaded
|
||||
Select Case m_ActiveDirectCutPage
|
||||
Case DirectCutPages.DirectCut Or DirectCutPages.ManualAxesMove
|
||||
' Non è necessario fare alcunché
|
||||
Case DirectCutPages.SingleCut
|
||||
LeftButtonGrid.Children.Remove(m_SingleCut)
|
||||
Case DirectCutPages.SingleCutAuto
|
||||
LeftButtonGrid.Children.Remove(m_SingleCutAuto)
|
||||
Case DirectCutPages.MultipleCut
|
||||
LeftButtonGrid.Children.Remove(m_MultipleCut)
|
||||
Case DirectCutPages.GridCut
|
||||
LeftButtonGrid.Children.Remove(m_GridCut)
|
||||
Case DirectCutPages.FlatteningCut
|
||||
LeftButtonGrid.Children.Remove(m_FlatteningCut)
|
||||
Case DirectCutPages.SingleDrill
|
||||
LeftButtonGrid.Children.Remove(m_SingleDrill)
|
||||
Case DirectCutPages.Squaring
|
||||
LeftButtonGrid.Children.Remove(m_Squaring)
|
||||
End Select
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,86 @@
|
||||
<UserControl x:Class="ControlsDirectCutUC1"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
DataContext="Self"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:OmagCUT="clr-namespace:OmagCUT"
|
||||
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="597.3" d:DesignWidth="256">
|
||||
|
||||
<Grid Name="LeftButtonGrid" Grid.Row="1" >
|
||||
<Grid.RowDefinitions>
|
||||
<!--<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="7*"/>-->
|
||||
<RowDefinition Height="9*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<!-- Definizione della Grid laterale -->
|
||||
<Grid Name="CutTypeGrid" Grid.Row="1" >
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<!--<RowDefinition Height="1*"/>-->
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<Button Name="SawTestBtn" Grid.Row="0"
|
||||
Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="80"/>
|
||||
<ColumnDefinition Width="140"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Image Source="{DynamicResource Test-lamaImg}" Style="{DynamicResource OmagCut_ButtonIcon}" Grid.Column="0" />
|
||||
<TextBlock Name="SawTestTxt" Grid.Column="1"
|
||||
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</Grid>
|
||||
</Button>
|
||||
|
||||
<Button Name="PolishingBtn" Grid.Row="1"
|
||||
Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="80"/>
|
||||
<ColumnDefinition Width="140"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Image Source="{DynamicResource LucidaturaImg}" Style="{DynamicResource OmagCut_ButtonIcon}" Grid.Column="0" />
|
||||
<TextBlock Name="PolishingTxt" Grid.Column="1"
|
||||
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</Grid>
|
||||
</Button>
|
||||
|
||||
<Button Name="CopyTemplateBtn" Grid.Row="2"
|
||||
Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="80"/>
|
||||
<ColumnDefinition Width="140"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Image Source="{DynamicResource Copia-dimaImg}" Style="{DynamicResource OmagCut_ButtonIcon}" Grid.Column="0" />
|
||||
<TextBlock Name="CopyTemplateTxt" Grid.Column="1"
|
||||
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</Grid>
|
||||
</Button>
|
||||
|
||||
<Grid Name="ChangeUC1Grid" Grid.Row="7">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Button Name="ChangeUC1Btn" Grid.ColumnSpan="2" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Grid>
|
||||
<Image Name="ImageCompo9" Source="{DynamicResource NumericKeyboardArrowImg}" />
|
||||
<!--<TextBlock Name="LabelCompo9" Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>-->
|
||||
</Grid>
|
||||
</Button>
|
||||
</Grid>
|
||||
|
||||
</Grid>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
@@ -0,0 +1,142 @@
|
||||
Imports EgtUILib
|
||||
Public Class ControlsDirectCutUC1
|
||||
|
||||
' Dichiarazione delle Page UserControl
|
||||
Private m_MainWindow As MainWindow = DirectCast(Application.Current.MainWindow, MainWindow)
|
||||
Friend m_Polishing As Polishing
|
||||
Friend m_CopyTemplate As CopyTemplateUC
|
||||
Friend m_SawTest As SawTestUC
|
||||
|
||||
' Stato di visualizzazione della macchina
|
||||
Friend m_bShowMachine As Boolean = False
|
||||
Friend m_nMachLook As Integer = MCH_LOOK.ALL
|
||||
' Dati generali CN
|
||||
Friend m_CN As CN_generico
|
||||
Private m_bFirst As Boolean = True
|
||||
' Riferimento alla pagina correntemente attiva
|
||||
Friend m_ActiveDirectCutPage As DirectCutPages = DirectCutPages.DirectCut
|
||||
' Variabili che indicano attivazione paginette con bottoni macchina
|
||||
Private m_ControlsBtn_IsActive As Boolean
|
||||
|
||||
Public Shared m_dZSafe As Double = 52
|
||||
|
||||
' Variabile che indica se sono attivi i bottoni macchina nuovi o vecchi
|
||||
Friend m_NewMachineButtonsType As Boolean
|
||||
' Indica che la finestra del talio Singolo deve essere di tipo manuale
|
||||
Friend m_bManulaCut As Boolean = False
|
||||
|
||||
Enum DirectCutPages
|
||||
DirectCut
|
||||
DirectCut1
|
||||
Polishing
|
||||
CopyTemplate
|
||||
SawTest
|
||||
End Enum
|
||||
|
||||
Private Sub ControlsDirectCutUC_Initialized(sender As Object, e As EventArgs) Handles Me.Initialized
|
||||
' leggo la configurazione del programma per i nuovi tagli manuali
|
||||
m_bManulaCut = GetPrivateProfileInt(S_GENERAL, K_MANUAL_CUT, 0, m_MainWindow.GetIniFile()) <> 0
|
||||
|
||||
'Creazione delle Page UserControl
|
||||
m_SawTest = New SawTestUC
|
||||
m_Polishing = New Polishing
|
||||
m_CopyTemplate = New CopyTemplateUC
|
||||
|
||||
'Posizionemento nella griglia delle Page UserControl
|
||||
m_SawTest.SetValue(Grid.RowProperty, 1)
|
||||
m_Polishing.SetValue(Grid.RowProperty, 1)
|
||||
m_CopyTemplate.SetValue(Grid.RowProperty, 1)
|
||||
|
||||
' assegno i nomi ai pulsanti
|
||||
SawTestTxt.Text = EgtMsg(90207)
|
||||
PolishingTxt.Text = EgtMsg(90231)
|
||||
'CopyTemplateBtn.Content = EgtMsg(90209)
|
||||
CopyTemplateTxt.Text = EgtMsg(90209)
|
||||
'SquaringTxt.Text = "Squaring"
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub ControlsDirectCutUC1_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded
|
||||
' Se rientro da simulazione
|
||||
If m_ActiveDirectCutPage = DirectCutPages.SawTest Then
|
||||
LeftButtonGrid.Children.Add(m_SawTest)
|
||||
Return
|
||||
ElseIf m_ActiveDirectCutPage = DirectCutPages.CopyTemplate Then
|
||||
Me.LeftButtonGrid.Children.Add(m_CopyTemplate)
|
||||
Return
|
||||
ElseIf m_ActiveDirectCutPage = DirectCutPages.Polishing Then
|
||||
Me.LeftButtonGrid.Children.Add(m_Polishing)
|
||||
Return
|
||||
End If
|
||||
|
||||
' Caso standard
|
||||
m_ActiveDirectCutPage = DirectCutPages.DirectCut1
|
||||
|
||||
' Attivo le lavorazioni solo se esiste il grezzo e se presente testa H1
|
||||
Dim bRawOk As Boolean = (GetRawHeight() > EPS_SMALL)
|
||||
Dim bH1Exists As Boolean = (EgtGetHeadId("H1") <> GDB_ID.NULL)
|
||||
|
||||
PolishingBtn.IsEnabled = (bRawOk And m_MainWindow.m_CurrentMachine.bPolishing)
|
||||
SawTestBtn.IsEnabled = (bRawOk And bH1Exists)
|
||||
CopyTemplateBtn.IsEnabled = bH1Exists
|
||||
|
||||
' aggiorno la visualizzazione dei parametri
|
||||
ReloadParam()
|
||||
|
||||
' Nascondo i pezzi in parcheggio
|
||||
HideParkedParts()
|
||||
EgtZoom(ZM.ALL)
|
||||
|
||||
End Sub
|
||||
|
||||
' ricarica i dati utensili
|
||||
Public Sub ReloadParam()
|
||||
Dim sCurrSawing As String = m_MainWindow.m_CurrentMachine.sCurrSawing
|
||||
Dim sCurrSaw As String = m_MainWindow.m_CurrentMachine.sCurrSaw
|
||||
Dim bSaw As Boolean = False
|
||||
|
||||
' se esiste una lavorazione di lama corrente vuol dire che deve essere preferita
|
||||
If Not String.IsNullOrEmpty(sCurrSaw) And Not String.IsNullOrEmpty(sCurrSawing) Then
|
||||
bSaw = EgtSetCalcTool(sCurrSaw, "H1", 1)
|
||||
End If
|
||||
'm_SingleCut.SetEnableParam(bSaw)
|
||||
'm_MultipleCut.SetEnableParam(bSaw)
|
||||
'm_GridCut.SetEnableParam(bSaw)
|
||||
End Sub
|
||||
|
||||
#Region "COMMAND CLICK BTN"
|
||||
Private Sub SawTestBtn_Click(sender As Object, e As RoutedEventArgs) Handles SawTestBtn.Click
|
||||
LeftButtonGrid.Children.Add(m_SawTest)
|
||||
m_ActiveDirectCutPage = DirectCutPages.SawTest
|
||||
End Sub
|
||||
|
||||
Private Sub PolishingBtn_Click(sender As Object, e As RoutedEventArgs) Handles PolishingBtn.Click
|
||||
LeftButtonGrid.Children.Add(m_Polishing)
|
||||
m_ActiveDirectCutPage = DirectCutPages.Polishing
|
||||
End Sub
|
||||
|
||||
Private Sub CopyTemplateBtn_Click(sender As Object, e As RoutedEventArgs) Handles CopyTemplateBtn.Click
|
||||
LeftButtonGrid.Children.Add(m_CopyTemplate)
|
||||
m_ActiveDirectCutPage = DirectCutPages.CopyTemplate
|
||||
End Sub
|
||||
|
||||
Private Sub ChangeUC1Btn_Click(sender As Object, e As RoutedEventArgs) Handles ChangeUC1Btn.Click
|
||||
DirectCutPage_Unloaded(Nothing, Nothing)
|
||||
m_ActiveDirectCutPage = DirectCutPages.DirectCut1
|
||||
m_MainWindow.m_DirectCutPageUC.LoadDirectCutUC()
|
||||
End Sub
|
||||
|
||||
#End Region ' Command Click Btn
|
||||
|
||||
Friend Sub DirectCutPage_Unloaded(sender As Object, e As RoutedEventArgs) Handles Me.Unloaded
|
||||
Select Case m_ActiveDirectCutPage
|
||||
Case DirectCutPages.SawTest
|
||||
LeftButtonGrid.Children.Remove(m_SawTest)
|
||||
Case DirectCutPages.Polishing
|
||||
LeftButtonGrid.Children.Remove(m_Polishing)
|
||||
Case DirectCutPages.CopyTemplate
|
||||
LeftButtonGrid.Children.Remove(m_CopyTemplate)
|
||||
End Select
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
@@ -76,6 +76,11 @@ Public Class ControlsMachineButtonUC
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#Region "STATE CHANGED"
|
||||
' ------------------------------------------------------------------------------
|
||||
' i segeunti metodi notificano il cambiamento di stato di specifici bottoni
|
||||
'-------------------------------------------------------------------------------
|
||||
|
||||
Friend Sub SpindleStateChanged(SpindleState As Boolean)
|
||||
Dim SpindleButton As TwoStateButton = Nothing
|
||||
For Each MachineButton As MachineButton In m_ButtonList
|
||||
@@ -255,38 +260,34 @@ Public Class ControlsMachineButtonUC
|
||||
Dim DoorOpenedButton As ThreeStateButton = Nothing
|
||||
For Each MachineButton As MachineButton In m_ButtonList
|
||||
If MachineButton.StateFlag = K_DOORCLOSED Then
|
||||
'If TypeOf MachineButton Is NoStateButton Then
|
||||
' DoorClosedButton = DirectCast(MachineButton, NoStateButton)
|
||||
'ElseIf TypeOf MachineButton Is TwoStateButton Then
|
||||
' DoorClosedButton = DirectCast(MachineButton, TwoStateButton)
|
||||
'ElseIf TypeOf MachineButton Is ThreeStateButton Then
|
||||
' DoorClosedButton = DirectCast(MachineButton, ThreeStateButton)
|
||||
'ElseIf TypeOf MachineButton Is DoubleCommandButton Then
|
||||
' DoorClosedButton = DirectCast(MachineButton, DoubleCommandButton)
|
||||
'ElseIf TypeOf MachineButton Is PressedCommandButton Then
|
||||
' DoorClosedButton = DirectCast(MachineButton, PressedCommandButton)
|
||||
'End If
|
||||
DoorClosedButton = MachineButton
|
||||
End If
|
||||
If MachineButton.StateFlag = "DoorOpened" Then
|
||||
If MachineButton.StateFlag = K_DOOROPENDED Then
|
||||
DoorOpenedButton = MachineButton
|
||||
End If
|
||||
Next
|
||||
' Chiusura porte (gesrtione comando Three/Two state
|
||||
If Not IsNothing(DoorClosedButton) Then
|
||||
Select Case DoorClosedState
|
||||
Case 0
|
||||
' porta aperta
|
||||
DoorClosedButton.Background = Application.Current.FindResource("OmagCut_Red")
|
||||
Case 1, 2
|
||||
' porta in movimento/aperta
|
||||
DoorClosedButton.Background = Application.Current.FindResource("OmagCut_LightGray")
|
||||
End Select
|
||||
End If
|
||||
' Chiusura porte (gesrtione comando Three/Two state
|
||||
If Not IsNothing(DoorOpenedButton) Then
|
||||
Select Case DoorClosedState
|
||||
Case 0
|
||||
' porta aperta
|
||||
DoorOpenedButton.Background = Application.Current.FindResource("OmagCut_LightGray")
|
||||
Case 1
|
||||
' porta in movimento
|
||||
DoorOpenedButton.Background = Application.Current.FindResource("OmagCut_Yellow")
|
||||
Case 2
|
||||
' porta chiusa
|
||||
DoorOpenedButton.Background = Application.Current.FindResource("OmagCut_Green")
|
||||
End Select
|
||||
End If
|
||||
@@ -372,6 +373,7 @@ Public Class ControlsMachineButtonUC
|
||||
'End If
|
||||
End Sub
|
||||
|
||||
#End Region ' State Range
|
||||
|
||||
Public Function GetPrivateProfileMachineButtons(
|
||||
ByVal lpAppName As String,
|
||||
@@ -569,13 +571,64 @@ Public MustInherit Class MachineButton
|
||||
EgtOutLog("dopo scrittura seconda variabile")
|
||||
End If
|
||||
Return
|
||||
Case 4
|
||||
' ------------------------------------ FANUC ------------------------------------
|
||||
' eventuale scrittura di linea di comando MDI
|
||||
If Not String.IsNullOrEmpty(CmdString) Then
|
||||
' attivo mpdalità MDI
|
||||
m_CN.DGeneralFunctions_WriteCncMode(2)
|
||||
System.Threading.Thread.Sleep(100)
|
||||
' salvo la stringa di comando ricevuta dal file lua
|
||||
m_CN.sz_ManualDataInput = CmdString
|
||||
' esguo la funzione che ha il compito di scrivere il comando MDI
|
||||
m_CN.MDI_command()
|
||||
End If
|
||||
' attivo modalità AUTO
|
||||
m_CN.DGeneralFunctions_WriteCncMode(7)
|
||||
System.Threading.Thread.Sleep(100)
|
||||
If String.IsNullOrEmpty(EValue) Then
|
||||
' EActive: impulsivo "D#####"
|
||||
m_CN.NC_pulse_bit(ENumber)
|
||||
EgtOutLog("Fanuc_DNumber= " & ENumber)
|
||||
Else
|
||||
' EActive + EValue: scrittura comando invariabile Short oppure Bit
|
||||
If ENumber.Contains(".") Then
|
||||
' D#####.#
|
||||
Dim bEValue As Boolean
|
||||
If EValue.Trim = "1" Then bEValue = True
|
||||
m_CN.NC_write_var_bit(ENumber, CBool(EValue))
|
||||
Else
|
||||
' D#####
|
||||
m_CN.NC_write_var_short(ENumber, CShort(EValue))
|
||||
End If
|
||||
EgtOutLog("Fanuc_DNumber= " & ENumber & " DValue= " & EValue)
|
||||
End If
|
||||
' eventale caricamento seconda variabile
|
||||
If String.IsNullOrEmpty(EValue2) Then
|
||||
' EActive: impulsivo "D#####"
|
||||
m_CN.NC_pulse_bit(ENumber2)
|
||||
EgtOutLog("Fanuc_DNumber= " & ENumber2)
|
||||
Else
|
||||
' EActive + EValue: scrittura comando invariabile Short oppure Bit
|
||||
If ENumber2.Contains(".") Then
|
||||
' D#####.#
|
||||
Dim bEValue2 As Boolean
|
||||
If EValue2.Trim = "1" Then bEValue2 = True
|
||||
m_CN.NC_write_var_bit(ENumber2, CBool(EValue2))
|
||||
Else
|
||||
' D#####
|
||||
m_CN.NC_write_var_short(ENumber2, CShort(EValue2))
|
||||
End If
|
||||
EgtOutLog("Fanuc_DNumber2= " & ENumber2 & " DValue2= " & EValue2)
|
||||
End If
|
||||
Return
|
||||
End Select
|
||||
End If
|
||||
'--------------------------------------------------------- MDI ---------------------------------------------------------
|
||||
Dim nResult As Short
|
||||
' assegno la modalità di funzionamento
|
||||
Select Case m_MainWindow.m_CNCommunication.m_nNCType
|
||||
Case 1, 2
|
||||
Case 1, 2, 4
|
||||
nResult = m_CN.DGeneralFunctions_WriteCncMode(2) ' Modalità MDI per controlli num
|
||||
Case 3
|
||||
'Per il siemens non devo fare nulla
|
||||
@@ -599,7 +652,7 @@ Public MustInherit Class MachineButton
|
||||
m_CN.DGeneralFunctions_CycleStart()
|
||||
End If
|
||||
System.Threading.Thread.Sleep(300)
|
||||
' riprostino la modalità manuale
|
||||
' ripristino la modalità manuale..?? siucuri ??
|
||||
nResult = m_CN.DGeneralFunctions_WriteCncMode(7) ' Modalità manuale
|
||||
End Sub
|
||||
|
||||
@@ -620,6 +673,7 @@ Public MustInherit Class MachineButton
|
||||
EgtTdbGetCurrToolParam(MCH_TP.FEED, dFeed)
|
||||
End If
|
||||
EgtLuaSetGlobNumVar("CMD.F", dFeed)
|
||||
|
||||
Dim dSpeed As Double = 0
|
||||
If Not String.IsNullOrWhiteSpace(m_DirectCutPage.m_ManualAxesMove.SpeedTxBx.Text) Then
|
||||
StringToDouble(m_DirectCutPage.m_ManualAxesMove.SpeedTxBx.Text, dSpeed)
|
||||
@@ -628,6 +682,18 @@ Public MustInherit Class MachineButton
|
||||
EgtTdbGetCurrToolParam(MCH_TP.SPEED, dSpeed)
|
||||
End If
|
||||
EgtLuaSetGlobNumVar("CMD.S", dSpeed)
|
||||
|
||||
' versione 2.5e1
|
||||
EgtTdbSetCurrTool(m_MainWindow.m_CurrentProjectPageUC.ToolTxBx.Text)
|
||||
Dim sToolPos As String = String.Empty
|
||||
If EgtTdbGetCurrToolParam(MCH_TP.TCPOS, sToolPos) Then
|
||||
EgtLuaGetGlobStringVar("CMD.TCPOS", sToolPos)
|
||||
End If
|
||||
Dim dToolDiam As Double = 0
|
||||
If EgtTdbGetCurrToolParam(MCH_TP.DIAM, dToolDiam) Then
|
||||
EgtLuaSetGlobNumVar("CMD.DIAM", dToolDiam * 1000)
|
||||
End If
|
||||
|
||||
Dim dL1, dL2, dL3, dR1, dR2 As Double
|
||||
m_MainWindow.m_CNCommunication.GetAxesPositions(dL1, dL2, dL3, dR1, dR2)
|
||||
EgtLuaSetGlobNumVar("CMD.L1", dL1)
|
||||
@@ -789,6 +855,7 @@ Public Class NoStateButton
|
||||
ExecuteMDICommand(TLuaScriptName)
|
||||
End If
|
||||
Else
|
||||
' FANUC, SIEMENS
|
||||
ExecuteMDICommand(TLuaScriptName)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
@@ -5,6 +5,8 @@ Public Class CopyTemplateUC
|
||||
' Riferimenti a pagine
|
||||
Private m_MainWindow As MainWindow = DirectCast(Application.Current.MainWindow, MainWindow)
|
||||
Private WithEvents m_CurrProjPage As CurrentProjectPageUC
|
||||
Private m_refControlDirectCutUC As ControlsDirectCutUC1
|
||||
|
||||
' Flag di pagina attiva
|
||||
Private m_bActive As Boolean = False
|
||||
' Array stringhe modalità di acquisizione dei punti
|
||||
@@ -59,6 +61,7 @@ Public Class CopyTemplateUC
|
||||
|
||||
Private Sub CopyTemplate_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded
|
||||
m_CurrProjPage = m_MainWindow.m_CurrentProjectPageUC
|
||||
m_refControlDirectCutUC = m_MainWindow.m_DirectCutPageUC.m_ControlsDirectCutUC1
|
||||
m_bActive = True
|
||||
SaveBtn.IsEnabled = False
|
||||
LineBtn.IsChecked = True
|
||||
@@ -254,8 +257,7 @@ Public Class CopyTemplateUC
|
||||
End Sub
|
||||
|
||||
Private Sub ExitBtn_Click(sender As Object, e As RoutedEventArgs) Handles ExitBtn.Click
|
||||
m_MainWindow.m_DirectCutPageUC.LeftButtonGrid.Children.Remove(Me)
|
||||
m_MainWindow.m_DirectCutPageUC.m_ActiveDirectCutPage = DirectCutPageUC.DirectCutPages.DirectCut
|
||||
m_refControlDirectCutUC.LeftButtonGrid.Children.Remove(Me)
|
||||
End Sub
|
||||
|
||||
Private Function EraseCopyTemplatePart() As Boolean
|
||||
|
||||
@@ -28,10 +28,10 @@
|
||||
<ColumnDefinition Width="7*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Button Name="PhotoBtn" Grid.Column="0" Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}">
|
||||
<Button Name="PhotoBtn" Grid.Column="0" Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}">
|
||||
<Image Source="{DynamicResource PhotoImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="RawPartBtn" Grid.Column="1" Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}">
|
||||
<Button Name="RawPartBtn" Grid.Column="1" Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}">
|
||||
<Image Source="{DynamicResource RawPartImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
|
||||
@@ -42,25 +42,27 @@
|
||||
|
||||
</Grid>
|
||||
|
||||
<!-- Definizione della Grid laterale -->
|
||||
<Grid Name="LeftButtonGrid" Grid.Row="1" >
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="7*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<!-- Definizione della Grid laterale -->
|
||||
<Grid Name="CutTypeGrid" Grid.Row="1" >
|
||||
<!-- Definizione della Grid laterale -->
|
||||
<!--
|
||||
<Grid Name="LeftButtonGrid" Grid.Row="1" >
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="7*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
-->
|
||||
<!-- Definizione della Grid laterale -->
|
||||
<!--<Grid Name="CutTypeGrid" Grid.Row="1" >
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Button Name="ManualBtn" Grid.Column="2" Grid.Row="0"
|
||||
Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
@@ -140,7 +142,7 @@
|
||||
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</Grid>
|
||||
</Button>
|
||||
|
||||
|
||||
<Button Name="PolishingBtn" Grid.Row="6"
|
||||
Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Grid>
|
||||
@@ -154,36 +156,51 @@
|
||||
</Grid>
|
||||
</Button>
|
||||
|
||||
<Button Name="CopyTemplateBtn" Grid.Row="7"
|
||||
Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="80"/>
|
||||
<ColumnDefinition Width="140"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Image Source="{DynamicResource Copia-dimaImg}" Style="{DynamicResource OmagCut_ButtonIcon}" Grid.Column="0" />
|
||||
<TextBlock Name="CopyTemplateTxt" Grid.Column="1"
|
||||
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</Grid>
|
||||
</Button>
|
||||
|
||||
<Button Name="SawTestBtn" Grid.Row="8"
|
||||
Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="80"/>
|
||||
<ColumnDefinition Width="140"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Image Source="{DynamicResource Test-lamaImg}" Style="{DynamicResource OmagCut_ButtonIcon}" Grid.Column="0" />
|
||||
<TextBlock Name="SawTestTxt" Grid.Column="1"
|
||||
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</Grid>
|
||||
</Button>
|
||||
-->
|
||||
<!--<Button Name="CopyTemplateBtn" Grid.Row="7"
|
||||
Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="80"/>
|
||||
<ColumnDefinition Width="140"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Image Source="{DynamicResource Copia-dimaImg}" Style="{DynamicResource OmagCut_ButtonIcon}" Grid.Column="0" />
|
||||
<TextBlock Name="CopyTemplateTxt" Grid.Column="1"
|
||||
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</Grid>
|
||||
</Button>-->
|
||||
<!--
|
||||
<Button Name="SquaringBtn" Grid.Row="7"
|
||||
Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="80"/>
|
||||
<ColumnDefinition Width="140"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Image Source="{DynamicResource Copia-dimaImg}" Style="{DynamicResource OmagCut_ButtonIcon}" Grid.Column="0" />
|
||||
<TextBlock Name="SquaringTxt" Grid.Column="1"
|
||||
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</Grid>
|
||||
</Button>
|
||||
|
||||
<Button Name="SawTestBtn" Grid.Row="8"
|
||||
Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="80"/>
|
||||
<ColumnDefinition Width="140"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Image Source="{DynamicResource Test-lamaImg}" Style="{DynamicResource OmagCut_ButtonIcon}" Grid.Column="0" />
|
||||
<TextBlock Name="SawTestTxt" Grid.Column="1"
|
||||
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</Grid>
|
||||
</Button>
|
||||
|
||||
</Grid>-->
|
||||
<!--
|
||||
|
||||
</Grid>-->
|
||||
|
||||
</Grid>
|
||||
|
||||
</Grid>
|
||||
|
||||
<!-- Definizione della Grid laterale per bottoni macchina -->
|
||||
<Grid Name="MachineButtonGrid" Grid.Row="1">
|
||||
<Grid.RowDefinitions>
|
||||
@@ -201,7 +218,11 @@
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="5*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<!--<ColumnDefinition Width="1*"/>-->
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
@@ -215,23 +236,23 @@
|
||||
Style="{DynamicResource OmagCut_GradientYellowIconToggleButton}">
|
||||
<Image Source="{DynamicResource VacuumImg}" Style="{StaticResource OmagCut_ScaleButtonIcon}"/>
|
||||
</ToggleButton>
|
||||
|
||||
<!--Comando asse X-Y-->
|
||||
<ToggleButton Name="XYBtn" Grid.Column="2"
|
||||
|
||||
<!--Comando asse X-Y-->
|
||||
<ToggleButton Name="XYBtn" Grid.Column="2"
|
||||
Style="{DynamicResource OmagCut_GradientYellowIconToggleButton}">
|
||||
<Image Source="{DynamicResource XYJogImg}" Style="{StaticResource OmagCut_ScaleButtonIcon}"/>
|
||||
<Image Source="{DynamicResource XYJogImg}" Style="{StaticResource OmagCut_ScaleButtonIcon}"/>
|
||||
</ToggleButton>
|
||||
|
||||
<!--Comando asse Z-C-->
|
||||
<ToggleButton Name="ZCBtn" Grid.Column="3"
|
||||
|
||||
<!--Comando asse Z-C-->
|
||||
<ToggleButton Name="ZCBtn" Grid.Column="3"
|
||||
Style="{DynamicResource OmagCut_GradientYellowIconToggleButton}">
|
||||
<Image Source="{DynamicResource ZCJogImg}" Style="{StaticResource OmagCut_ScaleButtonIcon}"/>
|
||||
</ToggleButton>
|
||||
<Image Source="{DynamicResource ZCJogImg}" Style="{StaticResource OmagCut_ScaleButtonIcon}"/>
|
||||
</ToggleButton>
|
||||
|
||||
<!--Comando asse Z-B-->
|
||||
<ToggleButton Name="ZBBtn" Grid.Column="4"
|
||||
Style="{DynamicResource OmagCut_GradientYellowIconToggleButton}">
|
||||
<Image Source="{DynamicResource ZBJogImg}" Style="{StaticResource OmagCut_ScaleButtonIcon}"/>
|
||||
<Image Source="{DynamicResource ZBJogImg}" Style="{StaticResource OmagCut_ScaleButtonIcon}"/>
|
||||
</ToggleButton>
|
||||
|
||||
<!--Comando Remote-->
|
||||
@@ -240,10 +261,18 @@
|
||||
<!--<Image Source="{DynamicResource VacuumImg}" Style="{StaticResource OmagCut_ScaleButtonIcon}"/>-->
|
||||
</ToggleButton>
|
||||
|
||||
<!--Parking-->
|
||||
<ToggleButton Name="ParkingBtn" Grid.Column="6"
|
||||
Style="{DynamicResource OmagCut_GradientYellowIconToggleButton}">
|
||||
<Image Source="{DynamicResource ParkingImg}" Style="{StaticResource OmagCut_ScaleButtonIcon}"/>
|
||||
</ToggleButton>
|
||||
|
||||
|
||||
|
||||
<!--Comando Manula/MDI-->
|
||||
<Button Name="ManualModeBtn" Grid.Column="7"
|
||||
<Button Name="ManualModeBtn" Grid.Column="11"
|
||||
Style="{DynamicResource OmagCut_YellowGradientYellowIconButton}">
|
||||
<Image Source="{DynamicResource ManualImg}" Style="{StaticResource OmagCut_ScaleButtonIcon}"/>
|
||||
<Image Source="{DynamicResource ManualImg}" Style="{StaticResource OmagCut_ScaleButtonIcon}"/>
|
||||
</Button>
|
||||
|
||||
</Grid>
|
||||
|
||||
+129
-216
@@ -7,18 +7,20 @@ Public Class DirectCutPageUC
|
||||
Private m_MainWindow As MainWindow = DirectCast(Application.Current.MainWindow, MainWindow)
|
||||
Friend m_MachineButtons As MachineButtonsUC
|
||||
Friend m_ManualAxesMove As ManualAxesMoveUC
|
||||
Friend m_SingleCut As SingleCutUC
|
||||
Friend m_SingleDrill As SingleDrillUC
|
||||
' nuova finestra per i comandi per il taglio manuale nuovo
|
||||
Friend m_SingleCutAuto As SingleCutAuto
|
||||
Friend m_MultipleCut As MultipleCut
|
||||
Friend m_GridCut As GridCut
|
||||
Friend m_FlatteningCut As FlatteningCut
|
||||
Friend m_Polishing As Polishing
|
||||
Friend m_CopyTemplate As CopyTemplateUC
|
||||
Friend m_SawTest As SawTestUC
|
||||
|
||||
Friend m_ControlsMachineButton As ControlsMachineButtonUC
|
||||
Friend m_VacuumMachineButton As VacuumMachineButtonUC
|
||||
Friend m_ControlsDirectCutUC As ControlsDirectCutUC
|
||||
Friend m_ControlsDirectCutUC1 As ControlsDirectCutUC1
|
||||
|
||||
Friend m_ActiveControl As Controls
|
||||
Enum Controls
|
||||
DirectCutUC
|
||||
DirectCutUC1
|
||||
MachineButtonUC
|
||||
VacuumButtonUC
|
||||
End Enum
|
||||
|
||||
|
||||
' Stato di visualizzazione della macchina
|
||||
Friend m_bShowMachine As Boolean = False
|
||||
@@ -26,8 +28,6 @@ Public Class DirectCutPageUC
|
||||
' Dati generali CN
|
||||
Friend m_CN As CN_generico
|
||||
Private m_bFirst As Boolean = True
|
||||
' Riferimento alla pagina correntemente attiva
|
||||
Friend m_ActiveDirectCutPage As DirectCutPages = DirectCutPages.DirectCut
|
||||
' Variabili che indicano attivazione paginette con bottoni macchina
|
||||
Private m_ControlsBtn_IsActive As Boolean
|
||||
|
||||
@@ -41,94 +41,42 @@ Public Class DirectCutPageUC
|
||||
' elenco dei nuovi bottoni
|
||||
Private m_ButtonJogList As New List(Of MachineButton)
|
||||
|
||||
Enum DirectCutPages
|
||||
DirectCut
|
||||
ManualAxesMove
|
||||
SingleCut
|
||||
MultipleCut
|
||||
GridCut
|
||||
FlatteningCut
|
||||
Polishing
|
||||
CopyTemplate
|
||||
SawTest
|
||||
SingleCutAuto
|
||||
SingleDrill
|
||||
End Enum
|
||||
|
||||
Private Sub DirectCutPage_Initialized(sender As Object, e As EventArgs) Handles Me.Initialized
|
||||
' leggo la configurazione del programma per i nuovi tagli manuali
|
||||
m_bManulaCut = GetPrivateProfileInt(S_GENERAL, K_MANUAL_CUT, 0, m_MainWindow.GetIniFile()) <> 0
|
||||
|
||||
'Creazione delle Page UserControl
|
||||
m_MachineButtons = New MachineButtonsUC
|
||||
m_ManualAxesMove = New ManualAxesMoveUC
|
||||
m_SingleCut = New SingleCutUC
|
||||
m_SingleDrill = New SingleDrillUC
|
||||
m_MultipleCut = New MultipleCut
|
||||
m_GridCut = New GridCut
|
||||
m_FlatteningCut = New FlatteningCut
|
||||
m_Polishing = New Polishing
|
||||
m_CopyTemplate = New CopyTemplateUC
|
||||
m_SawTest = New SawTestUC
|
||||
m_ControlsMachineButton = New ControlsMachineButtonUC
|
||||
m_VacuumMachineButton = New VacuumMachineButtonUC
|
||||
' Costruisco la finestra per il nuovo tipo di taglio manuale
|
||||
m_SingleCutAuto = New SingleCutAuto
|
||||
m_ControlsDirectCutUC = New ControlsDirectCutUC
|
||||
m_ControlsDirectCutUC1 = New ControlsDirectCutUC1
|
||||
|
||||
'Posizionemento nella griglia delle Page UserControl
|
||||
m_MachineButtons.SetValue(Grid.RowProperty, 2)
|
||||
m_MachineButtons.SetValue(Grid.ColumnSpanProperty, 7)
|
||||
m_MachineButtons.SetValue(Grid.ColumnSpanProperty, m_MachineButtons.nCountButton)
|
||||
m_ManualAxesMove.SetValue(Grid.RowProperty, 1)
|
||||
If m_bManulaCut Then
|
||||
m_SingleCutAuto.SetValue(Grid.RowProperty, 1)
|
||||
Else
|
||||
m_SingleCut.SetValue(Grid.RowProperty, 1)
|
||||
End If
|
||||
m_SingleDrill.SetValue(Grid.RowProperty, 1)
|
||||
m_MultipleCut.SetValue(Grid.RowProperty, 1)
|
||||
m_GridCut.SetValue(Grid.RowProperty, 1)
|
||||
m_FlatteningCut.SetValue(Grid.RowProperty, 1)
|
||||
m_Polishing.SetValue(Grid.RowProperty, 1)
|
||||
m_CopyTemplate.SetValue(Grid.RowProperty, 1)
|
||||
m_SawTest.SetValue(Grid.RowProperty, 1)
|
||||
|
||||
m_ControlsDirectCutUC.SetValue(Grid.RowProperty, 1)
|
||||
m_ControlsDirectCutUC1.SetValue(Grid.RowProperty, 1)
|
||||
m_ControlsMachineButton.SetValue(Grid.RowProperty, 1)
|
||||
m_VacuumMachineButton.SetValue(Grid.RowProperty, 1)
|
||||
|
||||
' verifico che sia presente almeno uno dei bottoni della nuova console (SOLO PER MACCHINA CON paragrafo [ControlMachButtons])
|
||||
Dim bCollapsedNewBottonsConsole As Boolean = Not m_ControlsMachineButton.GetPrivateProfileMachineButtons("JogButtons", "Button1", Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, m_MainWindow.GetMachIniFile())
|
||||
m_NewMachineButtonsType = m_ControlsMachineButton.GetPrivateProfileMachineButtons(S_CONTROLMACHBUTTONS, "Button1", Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, m_MainWindow.GetMachIniFile())
|
||||
' verifico che sia presente almeno uno dei bottoni della nuova console (SOLO PER MACCHINA CON paragrafo [VacuumMachButtons])
|
||||
Dim bCollapsedVacuumButton As Boolean = Not m_ControlsMachineButton.GetPrivateProfileMachineButtons(S_VACUUMMACHBUTTONS, "Button1", Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, m_MainWindow.GetMachIniFile())
|
||||
If Not m_NewMachineButtonsType Then
|
||||
'Assegno MachineButtons alla pagina
|
||||
LowerButtonGrid.Children.Add(m_MachineButtons)
|
||||
ControlsMachineBtn.Visibility = Windows.Visibility.Collapsed
|
||||
VacuumMachineBtn.Visibility = Windows.Visibility.Collapsed
|
||||
End If
|
||||
|
||||
If GetPrivateProfileInt(S_NUMERICALCONTROL, K_TYPE, 0, m_MainWindow.GetMachIniFile()) = 0 Then
|
||||
ManualBtn.IsEnabled = False
|
||||
ManualModeBtn.Visibility = Windows.Visibility.Hidden
|
||||
' se non sono configurate le ventose allora nascondo il comando
|
||||
If m_NewMachineButtonsType AndAlso bCollapsedVacuumButton Then
|
||||
VacuumMachineBtn.Visibility = Windows.Visibility.Collapsed
|
||||
End If
|
||||
|
||||
' ManualBtn.Content = EgtMsg(90201)
|
||||
ManualTxt.Text = EgtMsg(90201)
|
||||
'SingleCutBtn.Content = EgtMsg(90202)
|
||||
SingleCutTxt.Text = EgtMsg(90202)
|
||||
'SingleDrillBtn.Content = "Foro singolo"
|
||||
SingleDrillTxt.Text = EgtMsg(90258)
|
||||
'MultipleCutBtn.Content = EgtMsg(90203)
|
||||
MultipleCutTxt.Text = EgtMsg(90203)
|
||||
'GridCutBtn.Content = EgtMsg(90204)
|
||||
GridCutTxt.Text = EgtMsg(90204)
|
||||
'FlatteningCutBtn.Content = EgtMsg(90206)
|
||||
FlatteningCutTxt.Text = EgtMsg(90206)
|
||||
'PolishingBtn.Content = EgtMsg(90231)
|
||||
PolishingTxt.Text = EgtMsg(90231)
|
||||
'CopyTemplateBtn.Content = EgtMsg(90209)
|
||||
CopyTemplateTxt.Text = EgtMsg(90209)
|
||||
'SawTestBtn.Content = EgtMsg(90207)
|
||||
SawTestTxt.text = EgtMsg(90207)
|
||||
|
||||
|
||||
' nuovi bottoni 20/05/2021 - modifica specifiche 04/08/2021
|
||||
' leggo il numero di assi attivi nella macchina
|
||||
Dim AxesNumber = GetPrivateProfileInt(S_AXES, K_AXESNUM, 5, m_MainWindow.GetMachIniFile())
|
||||
@@ -176,59 +124,10 @@ Public Class DirectCutPageUC
|
||||
' lo stato di questi comandi vieni carico dalla lettura del PLC (refresh)
|
||||
'----------- FINE NUOVI BOTTONI------------
|
||||
|
||||
' Se rientro da simulazione
|
||||
If m_ActiveDirectCutPage = DirectCutPages.SingleCut Then
|
||||
LeftButtonGrid.Children.Add(m_SingleCut)
|
||||
Return
|
||||
ElseIf m_ActiveDirectCutPage = DirectCutPages.SingleCutAuto Then
|
||||
LeftButtonGrid.Children.Add(m_SingleCutAuto)
|
||||
Return
|
||||
ElseIf m_ActiveDirectCutPage = DirectCutPages.MultipleCut Then
|
||||
LeftButtonGrid.Children.Add(m_MultipleCut)
|
||||
Return
|
||||
ElseIf m_ActiveDirectCutPage = DirectCutPages.GridCut Then
|
||||
LeftButtonGrid.Children.Add(m_GridCut)
|
||||
Return
|
||||
ElseIf m_ActiveDirectCutPage = DirectCutPages.FlatteningCut Then
|
||||
LeftButtonGrid.Children.Add(m_FlatteningCut)
|
||||
Return
|
||||
ElseIf m_ActiveDirectCutPage = DirectCutPages.Polishing Then
|
||||
LeftButtonGrid.Children.Add(m_Polishing)
|
||||
Return
|
||||
ElseIf m_ActiveDirectCutPage = DirectCutPages.SawTest Then
|
||||
LeftButtonGrid.Children.Add(m_SawTest)
|
||||
Return
|
||||
ElseIf m_ActiveDirectCutPage = DirectCutPages.SingleDrill Then
|
||||
LeftButtonGrid.Children.Add(m_SingleDrill)
|
||||
Return
|
||||
End If
|
||||
|
||||
' Caso standard
|
||||
m_ActiveDirectCutPage = DirectCutPages.DirectCut
|
||||
LoadLastDirectCutControls()
|
||||
|
||||
' Se macchina fotografica abilitata
|
||||
PhotoBtn.IsEnabled = m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.MAN_PHOTO)
|
||||
|
||||
' Attivo le lavorazioni solo se esiste il grezzo e se presente testa H1
|
||||
Dim bRawOk As Boolean = (GetRawHeight() > EPS_SMALL)
|
||||
Dim bH1Exists As Boolean = (EgtGetHeadId("H1") <> GDB_ID.NULL)
|
||||
|
||||
ManualBtn.IsEnabled = bH1Exists
|
||||
' sviluppo rimasto in sospeso
|
||||
If m_bManulaCut Then
|
||||
' anche se non è presente un grezzo mantengo abilitato il bottone
|
||||
SingleCutBtn.IsEnabled = True
|
||||
Else
|
||||
SingleCutBtn.IsEnabled = bRawOk
|
||||
End If
|
||||
MultipleCutBtn.IsEnabled = bRawOk
|
||||
GridCutBtn.IsEnabled = bRawOk
|
||||
SingleDrillBtn.IsEnabled = (bRawOk And bH1Exists)
|
||||
FlatteningCutBtn.IsEnabled = (bRawOk And bH1Exists)
|
||||
PolishingBtn.IsEnabled = (bRawOk And m_MainWindow.m_CurrentMachine.bPolishing)
|
||||
SawTestBtn.IsEnabled = (bRawOk And bH1Exists)
|
||||
CopyTemplateBtn.IsEnabled = bH1Exists
|
||||
|
||||
' aggiorno la visualizzazione dei parametri
|
||||
ReloadParam()
|
||||
|
||||
@@ -247,9 +146,9 @@ Public Class DirectCutPageUC
|
||||
If Not String.IsNullOrEmpty(sCurrSaw) And Not String.IsNullOrEmpty(sCurrSawing) Then
|
||||
bSaw = EgtSetCalcTool(sCurrSaw, "H1", 1)
|
||||
End If
|
||||
m_SingleCut.SetEnableParam(bSaw)
|
||||
m_MultipleCut.SetEnableParam(bSaw)
|
||||
m_GridCut.SetEnableParam(bSaw)
|
||||
m_ControlsDirectCutUC.m_SingleCut.SetEnableParam(bSaw)
|
||||
m_ControlsDirectCutUC.m_MultipleCut.SetEnableParam(bSaw)
|
||||
m_ControlsDirectCutUC.m_GridCut.SetEnableParam(bSaw)
|
||||
End Sub
|
||||
|
||||
Private Sub SetVisibilityJogButtuns()
|
||||
@@ -257,6 +156,7 @@ Public Class DirectCutPageUC
|
||||
ZCBtn.Visibility = Visibility.Collapsed
|
||||
ZBBtn.Visibility = Visibility.Collapsed
|
||||
RemoteBtn.Visibility = Visibility.Collapsed
|
||||
ParkingBtn.Visibility = Visibility.Collapsed
|
||||
|
||||
Dim Item As MachineButton = Nothing
|
||||
For Each Item In m_ButtonJogList
|
||||
@@ -277,6 +177,10 @@ Public Class DirectCutPageUC
|
||||
RemoteBtn.Visibility = Visibility.Visible
|
||||
RemoteBtn.Foreground = Brushes.White
|
||||
RemoteBtn.Content = "Remote"
|
||||
Case K_PARKING
|
||||
ParkingBtn.Visibility = Visibility.Visible
|
||||
ParkingBtn.Foreground = Brushes.White
|
||||
ParkingBtn.ToolTip = "Parking"
|
||||
End Select
|
||||
Next
|
||||
End Sub
|
||||
@@ -305,63 +209,13 @@ Public Class DirectCutPageUC
|
||||
m_MainWindow.m_PrevActivePage = MainWindow.Pages.DirectCut
|
||||
End Sub
|
||||
|
||||
Private Sub ManualBtn_Click(sender As Object, e As RoutedEventArgs) Handles ManualBtn.Click
|
||||
LeftButtonGrid.Children.Add(m_ManualAxesMove)
|
||||
m_ActiveDirectCutPage = DirectCutPages.ManualAxesMove
|
||||
End Sub
|
||||
|
||||
Private Sub SingleCutBtn_Click(sender As Object, e As RoutedEventArgs) Handles SingleCutBtn.Click
|
||||
If m_bManulaCut Then
|
||||
LeftButtonGrid.Children.Add(m_SingleCutAuto)
|
||||
m_ActiveDirectCutPage = DirectCutPages.SingleCutAuto
|
||||
Else
|
||||
LeftButtonGrid.Children.Add(m_SingleCut)
|
||||
m_ActiveDirectCutPage = DirectCutPages.SingleCut
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub MultipleCutBtn_Click(sender As Object, e As RoutedEventArgs) Handles MultipleCutBtn.Click
|
||||
LeftButtonGrid.Children.Add(m_MultipleCut)
|
||||
m_ActiveDirectCutPage = DirectCutPages.MultipleCut
|
||||
End Sub
|
||||
|
||||
Private Sub GridCutBtn_Click(sender As Object, e As RoutedEventArgs) Handles GridCutBtn.Click
|
||||
LeftButtonGrid.Children.Add(m_GridCut)
|
||||
m_ActiveDirectCutPage = DirectCutPages.GridCut
|
||||
End Sub
|
||||
|
||||
Private Sub FlatteningCutBtn_Click(sender As Object, e As RoutedEventArgs) Handles FlatteningCutBtn.Click
|
||||
LeftButtonGrid.Children.Add(m_FlatteningCut)
|
||||
m_ActiveDirectCutPage = DirectCutPages.FlatteningCut
|
||||
End Sub
|
||||
|
||||
Private Sub PolishingBtn_Click(sender As Object, e As RoutedEventArgs) Handles PolishingBtn.Click
|
||||
LeftButtonGrid.Children.Add(m_Polishing)
|
||||
m_ActiveDirectCutPage = DirectCutPages.Polishing
|
||||
End Sub
|
||||
|
||||
Private Sub CopyTemplateBtn_Click(sender As Object, e As RoutedEventArgs) Handles CopyTemplateBtn.Click
|
||||
LeftButtonGrid.Children.Add(m_CopyTemplate)
|
||||
m_ActiveDirectCutPage = DirectCutPages.CopyTemplate
|
||||
End Sub
|
||||
|
||||
Private Sub SawTestBtn_Click(sender As Object, e As RoutedEventArgs) Handles SawTestBtn.Click
|
||||
LeftButtonGrid.Children.Add(m_SawTest)
|
||||
m_ActiveDirectCutPage = DirectCutPages.SawTest
|
||||
End Sub
|
||||
|
||||
Private Sub SingleDrillBtn_Click(sender As Object, e As RoutedEventArgs) Handles SingleDrillBtn.Click
|
||||
LeftButtonGrid.Children.Add(m_SingleDrill)
|
||||
m_ActiveDirectCutPage = DirectCutPages.SingleDrill
|
||||
End Sub
|
||||
|
||||
Private Sub ControlsMachineBtn_Click(sender As Object, e As RoutedEventArgs) Handles ControlsMachineBtn.Click
|
||||
If ControlsMachineBtn.IsChecked Then
|
||||
m_ControlsMachineButton = New ControlsMachineButtonUC
|
||||
m_ControlsMachineButton.SetValue(Grid.RowProperty, 1)
|
||||
m_NewMachineButtonsType = m_ControlsMachineButton.GetPrivateProfileMachineButtons(S_CONTROLMACHBUTTONS, "Button1", Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, m_MainWindow.GetMachIniFile())
|
||||
MachineButtonGrid.Children.Add(m_ControlsMachineButton)
|
||||
m_ActiveControl = Controls.MachineButtonUC
|
||||
If VacuumMachineBtn.IsChecked Then
|
||||
MachineButtonGrid.Children.Remove(m_VacuumMachineButton)
|
||||
VacuumMachineBtn.IsChecked = False
|
||||
@@ -374,6 +228,7 @@ Public Class DirectCutPageUC
|
||||
Private Sub VacuumMachineBtn_Click(sender As Object, e As RoutedEventArgs) Handles VacuumMachineBtn.Click
|
||||
If VacuumMachineBtn.IsChecked Then
|
||||
MachineButtonGrid.Children.Add(m_VacuumMachineButton)
|
||||
m_ActiveControl = Controls.VacuumButtonUC
|
||||
If ControlsMachineBtn.IsChecked Then
|
||||
MachineButtonGrid.Children.Remove(m_ControlsMachineButton)
|
||||
ControlsMachineBtn.IsChecked = False
|
||||
@@ -383,7 +238,21 @@ Public Class DirectCutPageUC
|
||||
End If
|
||||
End Sub
|
||||
|
||||
'------------------NUOVI BOTTONI PER GESTIONE JOYSTICK-------------------------------------------------
|
||||
Friend Sub LoadDirectCutUC()
|
||||
ManageControls()
|
||||
m_ActiveControl = Controls.DirectCutUC
|
||||
MachineButtonGrid.Children.Add(m_ControlsDirectCutUC)
|
||||
End Sub
|
||||
|
||||
Friend Sub LoadDirectCutUC1()
|
||||
ManageControls()
|
||||
m_ActiveControl = Controls.DirectCutUC1
|
||||
MachineButtonGrid.Children.Add(m_ControlsDirectCutUC1)
|
||||
End Sub
|
||||
|
||||
|
||||
#Region "[JogButtons]"
|
||||
|
||||
Private Sub XYBtn_Click(sender As Object, e As RoutedEventArgs) Handles XYBtn.Click
|
||||
' riverco in elenco il bottone XYJog
|
||||
Dim XYJogButton As MachineButton = Nothing
|
||||
@@ -513,17 +382,57 @@ Public Class DirectCutPageUC
|
||||
End If
|
||||
End Sub
|
||||
|
||||
'------------------NUOVI BOTTONI PER GESTIONE JOYSTICK-------------------------------------------------
|
||||
Private Sub ParkingBtn_Click(sender As Object, e As RoutedEventArgs) Handles ParkingBtn.Click
|
||||
Dim ParkingButton As MachineButton = Nothing
|
||||
Dim ItemButton As MachineButton = Nothing
|
||||
For Each ItemButton In m_ButtonJogList
|
||||
If ItemButton.StateFlag = K_PARKING Then
|
||||
ParkingButton = ItemButton
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
If IsNothing(ParkingButton) Then Return
|
||||
' eseguo lo script lua associato
|
||||
Dim CurrentBtn As Primitives.ToggleButton = e.Source
|
||||
Dim sLuaFileName As String = String.Empty
|
||||
' verifico lo stato del bottone per avviare il giusto script
|
||||
If CurrentBtn.IsChecked() Then
|
||||
sLuaFileName = ParkingButton.TLuaScriptName
|
||||
Else
|
||||
sLuaFileName = ParkingButton.FLuaScriptName
|
||||
End If
|
||||
ParkingButton.ExecuteMDICommand(sLuaFileName)
|
||||
End Sub
|
||||
|
||||
Friend Sub ParkingStateChanged(bParkingState As Boolean)
|
||||
' devo decodificare il tipo di pulsante, quindi eseguire la conversione...
|
||||
Dim ParkingButton As TwoStateButton = Nothing
|
||||
For Each MachineButton As MachineButton In m_ButtonJogList
|
||||
If MachineButton.StateFlag.Trim = K_PARKING Then
|
||||
ParkingButton = MachineButton
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
If Not IsNothing(ParkingButton) Then
|
||||
ParkingButton.SetIsChecked(bParkingState)
|
||||
ParkingButton.IsChecked = bParkingState
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#End Region '[JogButtons]
|
||||
|
||||
Private Sub MachViewModeBtn_Click(sender As Object, e As RoutedEventArgs) Handles MachViewModeBtn.Click
|
||||
If m_bShowMachine Then
|
||||
' aggiorno lo stato
|
||||
Select Case m_nMachLook
|
||||
Case MCH_LOOK.ALL
|
||||
m_nMachLook = MCH_LOOK.TAB_HEAD
|
||||
Case MCH_LOOK.TAB_HEAD
|
||||
m_nMachLook = MCH_LOOK.TAB_TOOL
|
||||
Case Else
|
||||
m_nMachLook = MCH_LOOK.ALL
|
||||
Case MCH_LOOK.ALL
|
||||
m_nMachLook = MCH_LOOK.TAB_HEAD
|
||||
Case MCH_LOOK.TAB_HEAD
|
||||
m_nMachLook = MCH_LOOK.TAB_TOOL
|
||||
Case MCH_LOOK.TAB_TOOL
|
||||
m_nMachLook = MCH_LOOK.TAB
|
||||
Case Else
|
||||
m_nMachLook = MCH_LOOK.ALL
|
||||
End Select
|
||||
' aggiorno lo stato della macchina e la sua visualizzazione
|
||||
EgtSetMachineLook(m_nMachLook)
|
||||
@@ -532,36 +441,40 @@ Public Class DirectCutPageUC
|
||||
End Sub
|
||||
|
||||
Friend Sub DirectCutPage_Unloaded(sender As Object, e As RoutedEventArgs) Handles Me.Unloaded
|
||||
Select Case m_ActiveDirectCutPage
|
||||
Case DirectCutPages.DirectCut Or DirectCutPages.ManualAxesMove
|
||||
' Non è necessario fare alcunché
|
||||
Case DirectCutPages.SingleCut
|
||||
LeftButtonGrid.Children.Remove(m_SingleCut)
|
||||
Case DirectCutPages.SingleCutAuto
|
||||
LeftButtonGrid.Children.Remove(m_SingleCutAuto)
|
||||
Case DirectCutPages.MultipleCut
|
||||
LeftButtonGrid.Children.Remove(m_MultipleCut)
|
||||
Case DirectCutPages.GridCut
|
||||
LeftButtonGrid.Children.Remove(m_GridCut)
|
||||
Case DirectCutPages.FlatteningCut
|
||||
LeftButtonGrid.Children.Remove(m_FlatteningCut)
|
||||
Case DirectCutPages.Polishing
|
||||
LeftButtonGrid.Children.Remove(m_Polishing)
|
||||
Case DirectCutPages.CopyTemplate
|
||||
LeftButtonGrid.Children.Remove(m_CopyTemplate)
|
||||
Case DirectCutPages.SawTest
|
||||
LeftButtonGrid.Children.Remove(m_SawTest)
|
||||
Case DirectCutPages.SingleDrill
|
||||
LeftButtonGrid.Children.Remove(m_SingleDrill)
|
||||
ManageControls()
|
||||
End Sub
|
||||
|
||||
Friend Sub ManageControls()
|
||||
Select Case m_ActiveControl
|
||||
Case Controls.DirectCutUC
|
||||
MachineButtonGrid.Children.Remove(m_ControlsDirectCutUC)
|
||||
m_ControlsDirectCutUC.DirectCutPage_Unloaded(Nothing, Nothing)
|
||||
Case Controls.DirectCutUC1
|
||||
MachineButtonGrid.Children.Remove(m_ControlsDirectCutUC1)
|
||||
m_ControlsDirectCutUC1.DirectCutPage_Unloaded(Nothing, Nothing)
|
||||
Case Controls.MachineButtonUC
|
||||
MachineButtonGrid.Children.Remove(m_ControlsMachineButton)
|
||||
MachineButtonGrid.Children.Remove(m_ControlsDirectCutUC)
|
||||
MachineButtonGrid.Children.Remove(m_ControlsDirectCutUC1)
|
||||
ControlsMachineBtn.IsChecked = False
|
||||
Case Controls.VacuumButtonUC
|
||||
MachineButtonGrid.Children.Remove(m_ControlsMachineButton)
|
||||
MachineButtonGrid.Children.Remove(m_ControlsDirectCutUC)
|
||||
MachineButtonGrid.Children.Remove(m_VacuumMachineButton)
|
||||
VacuumMachineBtn.IsChecked = False
|
||||
End Select
|
||||
End Sub
|
||||
|
||||
Friend Sub LoadLastDirectCutControls()
|
||||
Select Case m_ActiveControl
|
||||
Case Controls.DirectCutUC
|
||||
MachineButtonGrid.Children.Add(m_ControlsDirectCutUC)
|
||||
Case Controls.DirectCutUC1
|
||||
MachineButtonGrid.Children.Add(m_ControlsDirectCutUC1)
|
||||
Case Else
|
||||
m_ActiveControl = Controls.DirectCutUC
|
||||
MachineButtonGrid.Children.Add(m_ControlsDirectCutUC)
|
||||
End Select
|
||||
If ControlsMachineBtn.IsChecked Then
|
||||
MachineButtonGrid.Children.Remove(m_ControlsMachineButton)
|
||||
ControlsMachineBtn.IsChecked = False
|
||||
End If
|
||||
If VacuumMachineBtn.IsChecked Then
|
||||
MachineButtonGrid.Children.Remove(m_VacuumMachineButton)
|
||||
VacuumMachineBtn.IsChecked = False
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub ManualModeBtn_Click(sender As Object, e As RoutedEventArgs) Handles ManualModeBtn.Click
|
||||
|
||||
@@ -65,7 +65,7 @@
|
||||
|
||||
<TextBlock Name="DirectionTxBl" Grid.Column="0" Grid.Row="3"
|
||||
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="DirectionTxBx" Grid.Column="1" Grid.Row="3" Margin="0,0,6,0"
|
||||
<EgtWPFLib:EgtTextBox Name="DirectionTxBx" Grid.Column="1" Grid.Row="3" Margin="0,0,6,0" IsLength="False"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
|
||||
<TextBlock Name="LenghtTxBl" Grid.Column="0" Grid.Row="4"
|
||||
|
||||
@@ -186,11 +186,14 @@ Public Class FlatteningCut
|
||||
WritePrivateProfileString( S_DIRECTCUTS, K_DC_FLATT_MACHTYPE, m_nMachType.ToString(), m_MainWindow.GetIniFile())
|
||||
WritePrivateProfileString( S_DIRECTCUTS, K_DC_FLATT_ROTLOCK, If( m_bRotLock, "1", "0"), m_MainWindow.GetIniFile())
|
||||
WritePrivateProfileString( S_DIRECTCUTS, K_DC_FLATT_POSX, DoubleToString( m_ptTipP1.x, 2), m_MainWindow.GetIniFile())
|
||||
WritePrivateProfileString( S_DIRECTCUTS, K_DC_FLATT_POSY, DoubleToString( m_ptTipP1.y, 2), m_MainWindow.GetIniFile())
|
||||
WritePrivateProfileString(S_DIRECTCUTS, K_DC_FLATT_POSY, DoubleToString(m_ptTipP1.y, 2), m_MainWindow.GetIniFile())
|
||||
' imposto la Z di sicurezza corretta
|
||||
EgtMdbSetGeneralParam(MCH_GP.SAFEZ, DirectCutPageUC.m_dZSafe)
|
||||
EgtMdbSave()
|
||||
' Se non vado in simulazione
|
||||
If Not m_bSimul Then
|
||||
' Dichiaro sottopagina da non riattivare
|
||||
m_MainWindow.m_DirectCutPageUC.m_ActiveDirectCutPage = DirectCutPageUC.DirectCutPages.DirectCut
|
||||
m_MainWindow.m_DirectCutPageUC.m_ControlsDirectCutUC.m_ActiveDirectCutPage = ControlsDirectCutUC.DirectCutPages.DirectCut
|
||||
' Rimuovo layer temporaneo per crocette
|
||||
EgtErase(m_nTempLay)
|
||||
' Rimuovo eventuale pezzo per taglio diretto
|
||||
@@ -568,6 +571,7 @@ Public Class FlatteningCut
|
||||
m_bSimul = True
|
||||
m_CurrProjPage.m_SceneButtons.MeasureBtn.IsChecked = False
|
||||
m_CurrProjPage.CurrProjGrid.Visibility = Windows.Visibility.Hidden
|
||||
m_MainWindow.m_DirectCutPageUC.m_ControlsDirectCutUC.LeftButtonGrid.Children.Remove(Me)
|
||||
m_CurrProjPage.CurrentProjectPageGrid.Children.Remove(m_MainWindow.m_DirectCutPageUC)
|
||||
m_MainWindow.m_PrevActivePage = MainWindow.Pages.DirectCut
|
||||
m_CurrProjPage.CurrentProjectPageGrid.Children.Add(m_MainWindow.m_SimulationPage)
|
||||
@@ -610,18 +614,21 @@ Public Class FlatteningCut
|
||||
Private Sub ExitBtn_Click(sender As Object, e As RoutedEventArgs) Handles ExitBtn.Click
|
||||
EgtMdbSetGeneralParam(MCH_GP.SAFEZ, DirectCutPageUC.m_dZSafe)
|
||||
EgtMdbSave()
|
||||
m_MainWindow.m_DirectCutPageUC.LeftButtonGrid.Children.Remove(Me)
|
||||
m_MainWindow.m_DirectCutPageUC.m_ControlsDirectCutUC.LeftButtonGrid.Children.Remove(Me)
|
||||
End Sub
|
||||
|
||||
' ricavo l'ingombro di lavorazione in funzione dell'utensile selezionato
|
||||
Private Function GetFootPrintTool() As Double
|
||||
' vedere nella pagina Allarm il capito "Incisioni"
|
||||
Dim bForceUseMill As Boolean = (GetPrivateProfileInt(S_MACH_NEST, K_MACH_ENGRAVING_WITHMILL, 1, m_MainWindow.GetMachIniFile()) <> 0)
|
||||
Dim dFootPrint As Double = 0
|
||||
' verifico quale lavorazione è attiva
|
||||
If Not String.IsNullOrEmpty(m_MainWindow.m_CurrentMachine.sCurrSawing) Then
|
||||
If Not String.IsNullOrEmpty(m_MainWindow.m_CurrentMachine.sCurrSawing) AndAlso Not bForceUseMill Then
|
||||
EgtTdbGetCurrToolParam(MCH_TP.THICK, dFootPrint)
|
||||
ElseIf Not String.IsNullOrEmpty(m_MainWindow.m_CurrentMachine.sCurrMilling) Then
|
||||
Dim sCurrMill = m_MainWindow.m_CurrentMachine.sCurrMill
|
||||
GetDrillFromDrilling(sCurrMill, m_MainWindow.m_CurrentMachine.sCurrMilling)
|
||||
'GetDrillFromDrilling(sCurrMill, m_MainWindow.m_CurrentMachine.sCurrMilling)
|
||||
GetMillFromMilling(sCurrMill, m_MainWindow.m_CurrentMachine.sCurrMilling)
|
||||
' recupero informazioni della fresa in uso
|
||||
EgtTdbSetCurrTool(sCurrMill)
|
||||
EgtTdbGetCurrToolParam(MCH_TP.DIAM, dFootPrint)
|
||||
@@ -653,6 +660,9 @@ Public Class FlatteningCut
|
||||
Dim nCutId = EgtCreateLinePDL(nLayerId, ptStart, m_dAngO, m_dLen)
|
||||
' Imposto affondamento e angolo di fianco sul taglio
|
||||
EgtSetInfo(nCutId, INFO_DEPTH, m_dDepth)
|
||||
If (GetPrivateProfileInt(S_MACH_NEST, K_MACH_ENGRAVING_WITHMILL, 1, m_MainWindow.GetMachIniFile()) <> 0) Then
|
||||
EgtSetInfo(nCutId, INFO_WIDTH, GetFootPrintTool)
|
||||
End If
|
||||
EgtSetInfo(nCutId, INFO_SIDE_ANGLE, 0)
|
||||
' Imposto prima direzione
|
||||
EgtSetInfo(nCutId, INFO_DIR, 1)
|
||||
|
||||
@@ -61,12 +61,12 @@
|
||||
|
||||
<TextBlock Name="DirectionTxBl" Grid.Column="0" Grid.Row="3"
|
||||
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="DirectionTxBx" Grid.Column="1" Grid.Row="3" Margin="0,0,6,0"
|
||||
<EgtWPFLib:EgtTextBox Name="DirectionTxBx" Grid.Column="1" Grid.Row="3" Margin="0,0,6,0" IsLength="False"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
|
||||
<TextBlock Name="SideAngleTxBl" Grid.Column="0" Grid.Row="4"
|
||||
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="SideAngleTxBx" Grid.Column="1" Grid.Row="4" Margin="0,0,6,0"
|
||||
<EgtWPFLib:EgtTextBox Name="SideAngleTxBx" Grid.Column="1" Grid.Row="4" Margin="0,0,6,0" IsLength="False"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
|
||||
<Grid Grid.Row="5" Grid.ColumnSpan="2">
|
||||
@@ -89,7 +89,7 @@
|
||||
<TextBlock Name="DimPzXTxBl" Grid.Column="2" Grid.Row="0"
|
||||
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
|
||||
|
||||
<EgtWPFLib:EgtTextBox Name="NumPzXTxBx" Grid.Column="0" Grid.Row="1" Width="75"
|
||||
<EgtWPFLib:EgtTextBox Name="NumPzXTxBx" Grid.Column="0" Grid.Row="1" Width="75" IsLength="False"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="DimPzXTxBx" Grid.Column="2" Grid.Row="1" Width="75"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}" />
|
||||
@@ -99,7 +99,7 @@
|
||||
<TextBlock Name="DimPzYTxBl" Grid.Column="2" Grid.Row="2"
|
||||
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
|
||||
|
||||
<EgtWPFLib:EgtTextBox Name="NumPzYTxBx" Grid.Column="0" Grid.Row="3" Width="75"
|
||||
<EgtWPFLib:EgtTextBox Name="NumPzYTxBx" Grid.Column="0" Grid.Row="3" Width="75" IsLength="False"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="DimPzYTxBx" Grid.Column="2" Grid.Row="3" Width="75"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}" />
|
||||
|
||||
@@ -168,7 +168,7 @@ Public Class GridCut
|
||||
' Se non vado in simulazione
|
||||
If Not m_bSimul Then
|
||||
' Dichiaro sottopagina da non riattivare
|
||||
m_MainWindow.m_DirectCutPageUC.m_ActiveDirectCutPage = DirectCutPageUC.DirectCutPages.DirectCut
|
||||
m_MainWindow.m_DirectCutPageUC.m_ControlsDirectCutUC.m_ActiveDirectCutPage = ControlsDirectCutUC.DirectCutPages.DirectCut
|
||||
' Rimuovo layer temporaneo per crocette
|
||||
EgtErase(m_nTempLay)
|
||||
' Rimuovo eventuale pezzo per taglio diretto
|
||||
@@ -494,6 +494,7 @@ Public Class GridCut
|
||||
m_bSimul = True
|
||||
m_CurrProjPage.m_SceneButtons.MeasureBtn.IsChecked = False
|
||||
m_CurrProjPage.CurrProjGrid.Visibility = Windows.Visibility.Hidden
|
||||
m_MainWindow.m_DirectCutPageUC.m_ControlsDirectCutUC.LeftButtonGrid.Children.Remove(Me)
|
||||
m_CurrProjPage.CurrentProjectPageGrid.Children.Remove(m_MainWindow.m_DirectCutPageUC)
|
||||
m_MainWindow.m_PrevActivePage = MainWindow.Pages.DirectCut
|
||||
m_CurrProjPage.CurrentProjectPageGrid.Children.Add(m_MainWindow.m_SimulationPage)
|
||||
@@ -534,7 +535,7 @@ Public Class GridCut
|
||||
End Sub
|
||||
|
||||
Private Sub ExitBtn_Click(sender As Object, e As RoutedEventArgs) Handles ExitBtn.Click
|
||||
m_MainWindow.m_DirectCutPageUC.LeftButtonGrid.Children.Remove(Me)
|
||||
m_MainWindow.m_DirectCutPageUC.m_ControlsDirectCutUC.LeftButtonGrid.Children.Remove(Me)
|
||||
End Sub
|
||||
|
||||
Private Function CreateGridCut() As Boolean
|
||||
|
||||
@@ -7,6 +7,8 @@ Public Class MachineButtonsUC
|
||||
Private m_DirectCutPage As DirectCutPageUC
|
||||
Friend m_CN As CN_generico
|
||||
|
||||
Public nCountButton As Integer = 11
|
||||
|
||||
Private m_bOnlyLaser As Boolean = False
|
||||
Private m_bFirst As Boolean = True
|
||||
|
||||
@@ -33,6 +35,7 @@ Public Class MachineButtonsUC
|
||||
Private Const BTN_STATE_DOOR_OPENED As String = "DoorOpened"
|
||||
Private Const BTN_STATE_DOOR_CLOSED As String = "DoorClosed"
|
||||
Private Const BTN_STATE_PARKING As String = "Parking"
|
||||
Private Const BTN_STATE_HOME As String = "Home"
|
||||
Private Const BTN_ENABLE_ZONE_1 As String = "EnableZone1"
|
||||
Private Const BTN_ENABLE_ZONE_2 As String = "EnableZone2"
|
||||
Private Const BTN_ENABLE_PC As String = "EnablePC"
|
||||
@@ -76,6 +79,9 @@ Public Class MachineButtonsUC
|
||||
GetToggleButton(nIndex + 1).Visibility = Windows.Visibility.Hidden
|
||||
Next
|
||||
|
||||
' notifico nella variabile pubblica il numero di pulsanti inseriti nella barra
|
||||
nCountButton = m_nCount
|
||||
|
||||
' Se variabile di stato "Nothing"/"DoorOpened"/"DoorClosed" imposto immagine fissa
|
||||
For nIndex As Integer = 0 To m_nCount - 1
|
||||
If StateFlagArray(nIndex) = BTN_STATE_NOTHING OrElse
|
||||
@@ -267,9 +273,62 @@ Public Class MachineButtonsUC
|
||||
End If
|
||||
Return
|
||||
End If
|
||||
' CONTROLLO FANUC
|
||||
Case 4
|
||||
' ------------------------------------ FANUC ------------------------------------
|
||||
' eventuale scrittura di linea di comando MDI
|
||||
If Not String.IsNullOrEmpty(CmdString) Then
|
||||
' attivo mpdalità MDI
|
||||
m_CN.DGeneralFunctions_WriteCncMode(2)
|
||||
System.Threading.Thread.Sleep(100)
|
||||
' salvo la stringa di comando ricevuta dal file lua
|
||||
m_CN.sz_ManualDataInput = CmdString
|
||||
' esguo la funzione che ha il compito di scrivere il comando MDI
|
||||
m_CN.MDI_command()
|
||||
End If
|
||||
' attivo modalità AUTO
|
||||
m_CN.DGeneralFunctions_WriteCncMode(7)
|
||||
System.Threading.Thread.Sleep(100)
|
||||
If String.IsNullOrEmpty(EValue) Then
|
||||
' EActive: impulsivo "D#####"
|
||||
m_CN.NC_pulse_bit(ENumber)
|
||||
EgtOutLog("Fanuc_DNumber= " & ENumber)
|
||||
Else
|
||||
' EActive + EValue: scrittura comando invariabile Short oppure Bit
|
||||
If ENumber.Contains(".") Then
|
||||
' D#####.#
|
||||
Dim bEValue As Boolean
|
||||
If EValue.Trim = "1" Then bEValue = True
|
||||
m_CN.NC_write_var_bit(ENumber, CBool(EValue))
|
||||
Else
|
||||
' D#####
|
||||
m_CN.NC_write_var_short(ENumber, CShort(EValue))
|
||||
End If
|
||||
EgtOutLog("Fanuc_DNumber= " & ENumber & " DValue= " & EValue)
|
||||
End If
|
||||
' eventale caricamento seconda variabile
|
||||
If String.IsNullOrEmpty(EValue2) Then
|
||||
' EActive: impulsivo "D#####"
|
||||
m_CN.NC_pulse_bit(ENumber2)
|
||||
EgtOutLog("Fanuc_DNumber= " & ENumber2)
|
||||
Else
|
||||
' EActive + EValue: scrittura comando invariabile Short oppure Bit
|
||||
If ENumber2.Contains(".") Then
|
||||
' D#####.#
|
||||
Dim bEValue2 As Boolean
|
||||
If EValue2.Trim = "1" Then bEValue2 = True
|
||||
m_CN.NC_write_var_bit(ENumber2, CBool(EValue2))
|
||||
Else
|
||||
' D#####
|
||||
m_CN.NC_write_var_short(ENumber2, CShort(EValue2))
|
||||
End If
|
||||
EgtOutLog("Fanuc_DNumber2= " & ENumber2 & " DValue2= " & EValue2)
|
||||
End If
|
||||
Return
|
||||
End Select
|
||||
End If
|
||||
|
||||
|
||||
Dim nResult As Short
|
||||
' Imposto modalità MDI per controlli num
|
||||
Select Case m_MainWindow.m_CNCommunication.m_nNCType
|
||||
@@ -286,6 +345,8 @@ Public Class MachineButtonsUC
|
||||
m_CN.DGeneralFunctions_CycleStart()
|
||||
Case 3
|
||||
'Per il siemens non devo fare nulla
|
||||
Case 4
|
||||
' Nicola: 27/03/2023 attivazione della funzione M# indicata?
|
||||
End Select
|
||||
|
||||
If b2Start Then
|
||||
@@ -320,6 +381,17 @@ Public Class MachineButtonsUC
|
||||
EgtTdbGetCurrToolParam(MCH_TP.SPEED, dSpeed)
|
||||
End If
|
||||
EgtLuaSetGlobNumVar("CMD.S", dSpeed)
|
||||
' versione 2.5e1
|
||||
EgtTdbSetCurrTool(m_MainWindow.m_CurrentProjectPageUC.ToolTxBx.Text)
|
||||
Dim sToolPos As String = String.Empty
|
||||
If EgtTdbGetCurrToolParam(MCH_TP.TCPOS, sToolPos) Then
|
||||
EgtLuaGetGlobStringVar("CMD.TCPOS", sToolPos)
|
||||
End If
|
||||
Dim dToolDiam As Double = 0
|
||||
If EgtTdbGetCurrToolParam(MCH_TP.DIAM, dToolDiam) Then
|
||||
EgtLuaSetGlobNumVar("CMD.DIAM", dToolDiam * 1000)
|
||||
End If
|
||||
|
||||
Dim dL1, dL2, dL3, dR1, dR2 As Double
|
||||
m_MainWindow.m_CNCommunication.GetAxesPositions(dL1, dL2, dL3, dR1, dR2)
|
||||
EgtLuaSetGlobNumVar("CMD.L1", dL1)
|
||||
@@ -640,6 +712,40 @@ Public Class MachineButtonsUC
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Friend Sub HomeStateChanged(HomeState As Boolean)
|
||||
Dim nIndex As Integer = Array.IndexOf(StateFlagArray, BTN_STATE_HOME)
|
||||
If nIndex = -1 Then Return
|
||||
If HomeState Then
|
||||
GetToggleButton(nIndex + 1).IsChecked = True
|
||||
Try
|
||||
Dim s As String
|
||||
If (m_MainWindow.m_OptionsPageUC.ThemesCmBx.SelectedIndex = 0) Then
|
||||
s = m_MainWindow.GetResourcesDir() & "\MachineButtonsImage\" & ImageArrayY(nIndex)
|
||||
Else
|
||||
s = m_MainWindow.GetResourcesDir() & "\MachineButtonsImage\NewIcons\" & ImageArrayY(nIndex)
|
||||
End If
|
||||
Dim sButtonImageSource As ImageSource = ImageConverter.ConvertFromString(s)
|
||||
GetImage(nIndex + 1).Source = sButtonImageSource
|
||||
Catch ex As Exception
|
||||
EgtOutLog("Error loading image " & ImageArrayY(nIndex + 1))
|
||||
End Try
|
||||
Else
|
||||
GetToggleButton(nIndex + 1).IsChecked = False
|
||||
Try
|
||||
Dim s As String
|
||||
If (m_MainWindow.m_OptionsPageUC.ThemesCmBx.SelectedIndex = 0) Then
|
||||
s = m_MainWindow.GetResourcesDir() & "\MachineButtonsImage\" & ImageArrayY(nIndex)
|
||||
Else
|
||||
s = m_MainWindow.GetResourcesDir() & "\MachineButtonsImage\NewIcons\" & ImageArrayY(nIndex)
|
||||
End If
|
||||
Dim sButtonImageSource As ImageSource = ImageConverter.ConvertFromString(s)
|
||||
GetImage(nIndex + 1).Source = sButtonImageSource
|
||||
Catch ex As Exception
|
||||
EgtOutLog("Error loading image " & ImageArrayN(nIndex + 1))
|
||||
End Try
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Friend Sub EnableZoneStateChanged(ZoneState As Integer)
|
||||
Dim sFlag As String = String.Empty
|
||||
If ZoneState = 1 Then
|
||||
|
||||
@@ -69,10 +69,10 @@
|
||||
<EgtWPFLib:EgtTextBox x:Name="L3TxBx" Grid.Column="1" Grid.Row="3" Margin="0,0,6,0"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
<Button x:Name="R1Btn" Grid.Row="4" Height="60" Width="60" Style="{DynamicResource OmagCut_RightGrayGradientYellowTextButton}"/>
|
||||
<EgtWPFLib:EgtTextBox x:Name="R1TxBx" Grid.Column="1" Grid.Row="4" Margin="0,0,6,0"
|
||||
<EgtWPFLib:EgtTextBox x:Name="R1TxBx" Grid.Column="1" Grid.Row="4" Margin="0,0,6,0" IsLength="False"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
<Button x:Name="R2Btn" Grid.Row="5" Height="60" Width="60" Style="{DynamicResource OmagCut_RightGrayGradientYellowTextButton}"/>
|
||||
<EgtWPFLib:EgtTextBox x:Name="R2TxBx" Grid.Column="1" Grid.Row="5" Margin="0,0,6,0"
|
||||
<EgtWPFLib:EgtTextBox x:Name="R2TxBx" Grid.Column="1" Grid.Row="5" Margin="0,0,6,0" IsLength="False"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
|
||||
<Grid Grid.Row="7" Grid.ColumnSpan="2">
|
||||
|
||||
@@ -21,10 +21,12 @@ Public Class ManualAxesMoveUC
|
||||
' Messaggi
|
||||
L1SawThChBx.Content = EgtMsg(90232) ' Spessore lama
|
||||
L2SawThChBx.Content = EgtMsg(90232) ' Spessore lama
|
||||
|
||||
AddHandler m_Timer.Tick, AddressOf Timer_tick
|
||||
End Sub
|
||||
|
||||
Private Sub ManualAxesMove_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded
|
||||
m_CN = m_MainWindow.m_DirectCutPageUC.m_CN
|
||||
' Valori feed e speed da lama corrente
|
||||
Dim dTemp As Double = 0
|
||||
EgtTdbSetCurrTool(m_MainWindow.m_CurrentProjectPageUC.ToolTxBx.Text)
|
||||
@@ -207,7 +209,7 @@ Public Class ManualAxesMoveUC
|
||||
System.Threading.Thread.Sleep(150)
|
||||
m_CN.DGeneralFunctions_CycleStart()
|
||||
System.Threading.Thread.Sleep(m_MainWindow.m_CurrentMachine.nThreadSleep)
|
||||
m_CN.DGeneralFunctions_WriteCncMode(7) ' Modalità manuale
|
||||
' m_CN.DGeneralFunctions_WriteCncMode(7) ' Modalità manuale
|
||||
m_MoveClicked = False
|
||||
End Sub
|
||||
|
||||
@@ -338,7 +340,7 @@ Public Class ManualAxesMoveUC
|
||||
End Function
|
||||
|
||||
Private Sub BackBtn_Click(sender As Object, e As RoutedEventArgs) Handles BackBtn.Click
|
||||
m_MainWindow.m_DirectCutPageUC.LeftButtonGrid.Children.Remove(Me)
|
||||
m_MainWindow.m_DirectCutPageUC.m_ControlsDirectCutUC.LeftButtonGrid.Children.Remove(Me)
|
||||
End Sub
|
||||
|
||||
Private Sub G0Btn_Checked(sender As Object, e As RoutedEventArgs) Handles G0Btn.Checked
|
||||
|
||||
+12
-12
@@ -68,12 +68,12 @@
|
||||
|
||||
<TextBlock Name="DirectionTxBl" Grid.Column="0" Grid.Row="4"
|
||||
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="DirectionTxBx" Grid.Column="1" Grid.Row="4" Margin="0,0,6,0"
|
||||
<EgtWPFLib:EgtTextBox Name="DirectionTxBx" Grid.Column="1" Grid.Row="4" Margin="0,0,6,0" IsLength="False"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
|
||||
<TextBlock Name="SideAngleTxBl" Grid.Column="0" Grid.Row="5"
|
||||
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="SideAngleTxBx" Grid.Column="1" Grid.Row="5" Margin="0,0,6,0"
|
||||
<EgtWPFLib:EgtTextBox Name="SideAngleTxBx" Grid.Column="1" Grid.Row="5" Margin="0,0,6,0" IsLength="False"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
|
||||
<Grid Grid.Row="6" Grid.ColumnSpan="2" Visibility="Visible">
|
||||
@@ -124,70 +124,70 @@
|
||||
|
||||
<TextBlock Name="Num1TxBl" Grid.Column="0" Grid.Row="0"
|
||||
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}" HorizontalAlignment="Center"/>
|
||||
<EgtWPFLib:EgtTextBox Name="NumPz1TxBx" Grid.Column="1" Grid.Row="0" Width="75"
|
||||
<EgtWPFLib:EgtTextBox Name="NumPz1TxBx" Grid.Column="1" Grid.Row="0" Width="75" IsLength="False"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="DimPz1TxBx" Grid.Column="3" Grid.Row="0" Width="75"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
|
||||
<TextBlock Name="Num2TxBl" Grid.Column="0" Grid.Row="1"
|
||||
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}" HorizontalAlignment="Center"/>
|
||||
<EgtWPFLib:EgtTextBox Name="NumPz2TxBx" Grid.Column="1" Grid.Row="1" Width="75"
|
||||
<EgtWPFLib:EgtTextBox Name="NumPz2TxBx" Grid.Column="1" Grid.Row="1" Width="75" IsLength="False"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="DimPz2TxBx" Grid.Column="3" Grid.Row="1" Width="75"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
|
||||
<TextBlock Name="Num3TxBl" Grid.Column="0" Grid.Row="2"
|
||||
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}" HorizontalAlignment="Center"/>
|
||||
<EgtWPFLib:EgtTextBox Name="NumPz3TxBx" Grid.Column="1" Grid.Row="2" Width="75"
|
||||
<EgtWPFLib:EgtTextBox Name="NumPz3TxBx" Grid.Column="1" Grid.Row="2" Width="75" IsLength="False"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="DimPz3TxBx" Grid.Column="3" Grid.Row="2" Width="75"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
|
||||
<TextBlock Name="Num4TxBl" Grid.Column="0" Grid.Row="3"
|
||||
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}" HorizontalAlignment="Center"/>
|
||||
<EgtWPFLib:EgtTextBox Name="NumPz4TxBx" Grid.Column="1" Grid.Row="3" Width="75"
|
||||
<EgtWPFLib:EgtTextBox Name="NumPz4TxBx" Grid.Column="1" Grid.Row="3" Width="75" IsLength="False"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="DimPz4TxBx" Grid.Column="3" Grid.Row="3" Width="75"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
|
||||
<TextBlock Name="Num5TxBl" Grid.Column="0" Grid.Row="4"
|
||||
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}" HorizontalAlignment="Center"/>
|
||||
<EgtWPFLib:EgtTextBox Name="NumPz5TxBx" Grid.Column="1" Grid.Row="4" Width="75"
|
||||
<EgtWPFLib:EgtTextBox Name="NumPz5TxBx" Grid.Column="1" Grid.Row="4" Width="75" IsLength="False"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="DimPz5TxBx" Grid.Column="3" Grid.Row="4" Width="75"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
|
||||
<TextBlock Name="Num6TxBl" Grid.Column="0" Grid.Row="5"
|
||||
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}" HorizontalAlignment="Center"/>
|
||||
<EgtWPFLib:EgtTextBox Name="NumPz6TxBx" Grid.Column="1" Grid.Row="5" Width="75"
|
||||
<EgtWPFLib:EgtTextBox Name="NumPz6TxBx" Grid.Column="1" Grid.Row="5" Width="75" IsLength="False"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="DimPz6TxBx" Grid.Column="3" Grid.Row="5" Width="75"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
|
||||
<TextBlock Name="Num7TxBl" Grid.Column="0" Grid.Row="6"
|
||||
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}" HorizontalAlignment="Center"/>
|
||||
<EgtWPFLib:EgtTextBox Name="NumPz7TxBx" Grid.Column="1" Grid.Row="6" Width="75"
|
||||
<EgtWPFLib:EgtTextBox Name="NumPz7TxBx" Grid.Column="1" Grid.Row="6" Width="75" IsLength="False"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="DimPz7TxBx" Grid.Column="3" Grid.Row="6" Width="75"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
|
||||
<TextBlock Name="Num8TxBl" Grid.Column="0" Grid.Row="7"
|
||||
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}" HorizontalAlignment="Center"/>
|
||||
<EgtWPFLib:EgtTextBox Name="NumPz8TxBx" Grid.Column="1" Grid.Row="7" Width="75"
|
||||
<EgtWPFLib:EgtTextBox Name="NumPz8TxBx" Grid.Column="1" Grid.Row="7" Width="75" IsLength="False"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="DimPz8TxBx" Grid.Column="3" Grid.Row="7" Width="75"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
|
||||
<TextBlock Name="Num9TxBl" Grid.Column="0" Grid.Row="8"
|
||||
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}" HorizontalAlignment="Center"/>
|
||||
<EgtWPFLib:EgtTextBox Name="NumPz9TxBx" Grid.Column="1" Grid.Row="8" Width="75"
|
||||
<EgtWPFLib:EgtTextBox Name="NumPz9TxBx" Grid.Column="1" Grid.Row="8" Width="75" IsLength="False"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="DimPz9TxBx" Grid.Column="3" Grid.Row="8" Width="75"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
|
||||
<TextBlock Name="Num10TxBl" Grid.Column="0" Grid.Row="9"
|
||||
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}" HorizontalAlignment="Center"/>
|
||||
<EgtWPFLib:EgtTextBox Name="NumPz10TxBx" Grid.Column="1" Grid.Row="9" Width="75"
|
||||
<EgtWPFLib:EgtTextBox Name="NumPz10TxBx" Grid.Column="1" Grid.Row="9" Width="75" IsLength="False"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="DimPz10TxBx" Grid.Column="3" Grid.Row="9" Width="75"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
|
||||
@@ -195,7 +195,7 @@ Public Class MultipleCut
|
||||
' Se non vado in simulazione
|
||||
If Not m_bSimul Then
|
||||
' Dichiaro sottopagina da non riattivare
|
||||
m_MainWindow.m_DirectCutPageUC.m_ActiveDirectCutPage = DirectCutPageUC.DirectCutPages.DirectCut
|
||||
m_MainWindow.m_DirectCutPageUC.m_ControlsDirectCutUC.m_ActiveDirectCutPage = ControlsDirectCutUC.DirectCutPages.DirectCut
|
||||
' Rimuovo layer temporaneo per crocette
|
||||
EgtErase(m_nTempLay)
|
||||
' Rimuovo eventuale pezzo per taglio diretto
|
||||
@@ -540,6 +540,7 @@ Public Class MultipleCut
|
||||
m_bSimul = True
|
||||
m_CurrProjPage.m_SceneButtons.MeasureBtn.IsChecked = False
|
||||
m_CurrProjPage.CurrProjGrid.Visibility = Windows.Visibility.Hidden
|
||||
m_MainWindow.m_DirectCutPageUC.m_ControlsDirectCutUC.LeftButtonGrid.Children.Remove(Me)
|
||||
m_CurrProjPage.CurrentProjectPageGrid.Children.Remove(m_MainWindow.m_DirectCutPageUC)
|
||||
m_MainWindow.m_PrevActivePage = MainWindow.Pages.DirectCut
|
||||
m_CurrProjPage.CurrentProjectPageGrid.Children.Add(m_MainWindow.m_SimulationPage)
|
||||
@@ -580,7 +581,7 @@ Public Class MultipleCut
|
||||
End Sub
|
||||
|
||||
Private Sub ExitBtn_Click(sender As Object, e As RoutedEventArgs) Handles ExitBtn.Click
|
||||
m_MainWindow.m_DirectCutPageUC.LeftButtonGrid.Children.Remove(Me)
|
||||
m_MainWindow.m_DirectCutPageUC.m_ControlsDirectCutUC.LeftButtonGrid.Children.Remove(Me)
|
||||
End Sub
|
||||
|
||||
Private Function CreateMultipleCut() As Boolean
|
||||
|
||||
@@ -6,6 +6,8 @@ Public Class Polishing
|
||||
' Riferimenti a pagine
|
||||
Private m_MainWindow As MainWindow = DirectCast(Application.Current.MainWindow, MainWindow)
|
||||
Private WithEvents m_CurrProjPage As CurrentProjectPageUC
|
||||
Private m_refControlDirectCutUC As ControlsDirectCutUC1
|
||||
|
||||
' Flag di pagina attiva
|
||||
Private m_bActive As Boolean = False
|
||||
' Flag di simulazione in corso
|
||||
@@ -30,6 +32,7 @@ Public Class Polishing
|
||||
Private Sub Polishing_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded
|
||||
' Attivo la pagina
|
||||
m_CurrProjPage = m_MainWindow.m_CurrentProjectPageUC
|
||||
m_refControlDirectCutUC = m_MainWindow.m_DirectCutPageUC.m_ControlsDirectCutUC1
|
||||
m_bActive = True
|
||||
' Se rientro da simulazione
|
||||
If m_bSimul Then
|
||||
@@ -60,7 +63,7 @@ Public Class Polishing
|
||||
If PolishingCmBx.SelectedIndex < 0 Then
|
||||
m_bPoliOk = False
|
||||
UpdateSimulOkBtn()
|
||||
End If
|
||||
End If
|
||||
' Rendo semitrasparente il grezzo
|
||||
Dim nRawSolidId = EgtGetFirstNameInGroup(m_CurrProjPage.m_nRawId, NAME_RAW_SOLID)
|
||||
EgtSetAlpha( nRawSolidId, 60)
|
||||
@@ -72,7 +75,7 @@ Public Class Polishing
|
||||
' Se non vado in simulazione
|
||||
If Not m_bSimul Then
|
||||
' Dichiaro sottopagina da non riattivare
|
||||
m_MainWindow.m_DirectCutPageUC.m_ActiveDirectCutPage = DirectCutPageUC.DirectCutPages.DirectCut
|
||||
m_refControlDirectCutUC.m_ActiveDirectCutPage = ControlsDirectCutUC1.DirectCutPages.DirectCut
|
||||
' Cancello eventuali lucidature
|
||||
RemovePolishings()
|
||||
' Riattivo eventuali lavorazioni presenti
|
||||
@@ -148,6 +151,7 @@ Public Class Polishing
|
||||
m_bSimul = True
|
||||
m_CurrProjPage.m_SceneButtons.MeasureBtn.IsChecked = False
|
||||
m_CurrProjPage.CurrProjGrid.Visibility = Windows.Visibility.Hidden
|
||||
m_refControlDirectCutUC.LeftButtonGrid.Children.Remove(Me)
|
||||
m_CurrProjPage.CurrentProjectPageGrid.Children.Remove(m_MainWindow.m_DirectCutPageUC)
|
||||
m_MainWindow.m_PrevActivePage = MainWindow.Pages.DirectCut
|
||||
m_CurrProjPage.CurrentProjectPageGrid.Children.Add(m_MainWindow.m_SimulationPage)
|
||||
@@ -188,7 +192,7 @@ Public Class Polishing
|
||||
End Sub
|
||||
|
||||
Private Sub ExitBtn_Click(sender As Object, e As RoutedEventArgs) Handles ExitBtn.Click
|
||||
m_MainWindow.m_DirectCutPageUC.LeftButtonGrid.Children.Remove(Me)
|
||||
m_refControlDirectCutUC.LeftButtonGrid.Children.Remove(Me)
|
||||
End Sub
|
||||
|
||||
Private Function CreatePolishing( sKitName As String) As Boolean
|
||||
|
||||
@@ -70,7 +70,7 @@
|
||||
|
||||
<TextBlock Name="DirectionTxBl" Grid.Column="0" Grid.Row="4"
|
||||
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="DirectionTxBx" Grid.Column="1" Grid.Row="4" Margin="0,0,6,0"
|
||||
<EgtWPFLib:EgtTextBox Name="DirectionTxBx" Grid.Column="1" Grid.Row="4" Margin="0,0,6,0" IsLength="False"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
|
||||
<TextBlock Name="OffsetTxBl" Grid.Column="0" Grid.Row="5"
|
||||
|
||||
@@ -5,6 +5,7 @@ Public Class SawTestUC
|
||||
' Riferimenti a pagine
|
||||
Private m_MainWindow As MainWindow = DirectCast(Application.Current.MainWindow, MainWindow)
|
||||
Private WithEvents m_CurrProjPage As CurrentProjectPageUC
|
||||
Private m_refControlDirectCutUC As ControlsDirectCutUC1
|
||||
' Flag di pagina attiva
|
||||
Private m_bActive As Boolean = False
|
||||
' Flag di simulazione in corso
|
||||
@@ -76,6 +77,7 @@ Public Class SawTestUC
|
||||
Private Sub SawTest_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded
|
||||
' Attivo la pagina
|
||||
m_CurrProjPage = m_MainWindow.m_CurrentProjectPageUC
|
||||
m_refControlDirectCutUC = m_MainWindow.m_DirectCutPageUC.m_ControlsDirectCutUC1
|
||||
m_bActive = True
|
||||
' Se rientro da simulazione
|
||||
If m_bSimul Then
|
||||
@@ -139,7 +141,7 @@ Public Class SawTestUC
|
||||
WritePrivateProfileString( S_DIRECTCUTS, K_DC_TEST_OFFSET, DoubleToString( m_dOffset, 2), m_MainWindow.GetIniFile())
|
||||
If Not m_bSimul Then
|
||||
' Dichiaro sottopagina da non riattivare
|
||||
m_MainWindow.m_DirectCutPageUC.m_ActiveDirectCutPage = DirectCutPageUC.DirectCutPages.DirectCut
|
||||
m_refControlDirectCutUC.m_ActiveDirectCutPage = ControlsDirectCutUC1.DirectCutPages.DirectCut1
|
||||
' Rimuovo layer temporaneo per crocette
|
||||
EgtErase(m_nTempLay)
|
||||
' Rimuovo eventuale pezzo per taglio diretto
|
||||
@@ -419,6 +421,7 @@ Public Class SawTestUC
|
||||
m_bSimul = True
|
||||
m_CurrProjPage.m_SceneButtons.MeasureBtn.IsChecked = False
|
||||
m_CurrProjPage.CurrProjGrid.Visibility = Windows.Visibility.Hidden
|
||||
m_refControlDirectCutUC.LeftButtonGrid.Children.Remove(Me)
|
||||
m_CurrProjPage.CurrentProjectPageGrid.Children.Remove(m_MainWindow.m_DirectCutPageUC)
|
||||
m_MainWindow.m_PrevActivePage = MainWindow.Pages.DirectCut
|
||||
m_CurrProjPage.CurrentProjectPageGrid.Children.Add(m_MainWindow.m_SimulationPage)
|
||||
@@ -459,7 +462,7 @@ Public Class SawTestUC
|
||||
End Sub
|
||||
|
||||
Private Sub ExitBtn_Click(sender As Object, e As RoutedEventArgs) Handles ExitBtn.Click
|
||||
m_MainWindow.m_DirectCutPageUC.LeftButtonGrid.Children.Remove(Me)
|
||||
m_refControlDirectCutUC.LeftButtonGrid.Children.Remove(Me)
|
||||
End Sub
|
||||
|
||||
Private Function CreateSingleCut() As Boolean
|
||||
|
||||
@@ -363,7 +363,7 @@ Public Class SingleCutAuto
|
||||
' Se non vado in simulazione
|
||||
If Not m_bSimul Then
|
||||
' Dichiaro sottopagina da non riattivare
|
||||
m_MainWindow.m_DirectCutPageUC.m_ActiveDirectCutPage = DirectCutPageUC.DirectCutPages.DirectCut
|
||||
m_MainWindow.m_DirectCutPageUC.m_ControlsDirectCutUC.m_ActiveDirectCutPage = ControlsDirectCutUC.DirectCutPages.DirectCut
|
||||
' Rimuovo layer temporaneo per crocette
|
||||
EgtErase(m_nTempLay)
|
||||
' Rimuovo eventuale pezzo per taglio diretto
|
||||
@@ -715,6 +715,7 @@ Public Class SingleCutAuto
|
||||
m_bSimul = True
|
||||
m_CurrProjPage.m_SceneButtons.MeasureBtn.IsChecked = False
|
||||
m_CurrProjPage.CurrProjGrid.Visibility = Windows.Visibility.Hidden
|
||||
m_MainWindow.m_DirectCutPageUC.m_ControlsDirectCutUC.LeftButtonGrid.Children.Remove(Me)
|
||||
m_CurrProjPage.CurrentProjectPageGrid.Children.Remove(m_MainWindow.m_DirectCutPageUC)
|
||||
m_MainWindow.m_PrevActivePage = MainWindow.Pages.DirectCut
|
||||
m_CurrProjPage.CurrentProjectPageGrid.Children.Add(m_MainWindow.m_SimulationPage)
|
||||
@@ -758,7 +759,7 @@ Public Class SingleCutAuto
|
||||
' reimposto il precedetne utensile e lavorazione
|
||||
m_MainWindow.m_CurrentMachine.sCurrSaw = m_PrecSaw
|
||||
m_MainWindow.m_CurrentMachine.sCurrSawing = m_PrecSawing
|
||||
m_MainWindow.m_DirectCutPageUC.LeftButtonGrid.Children.Remove(Me)
|
||||
m_MainWindow.m_DirectCutPageUC.m_ControlsDirectCutUC.LeftButtonGrid.Children.Remove(Me)
|
||||
End Sub
|
||||
|
||||
Private Function CreateSingleCut() As Boolean
|
||||
|
||||
@@ -69,12 +69,12 @@
|
||||
|
||||
<TextBlock Name="DirectionTxBl" Grid.Column="0" Grid.Row="4"
|
||||
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="DirectionTxBx" Grid.Column="1" Grid.Row="4" Margin="0,0,6,0"
|
||||
<EgtWPFLib:EgtTextBox Name="DirectionTxBx" Grid.Column="1" Grid.Row="4" Margin="0,0,6,0" IsLength="False"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
|
||||
<TextBlock Name="SideAngleTxBl" Grid.Column="0" Grid.Row="5"
|
||||
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="SideAngleTxBx" Grid.Column="1" Grid.Row="5" Margin="0,0,6,0"
|
||||
<EgtWPFLib:EgtTextBox Name="SideAngleTxBx" Grid.Column="1" Grid.Row="5" Margin="0,0,6,0" IsLength="False"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
|
||||
<TextBlock Name="OffsetTxBl" Grid.Column="0" Grid.Row="6"
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
Imports EgtUILib
|
||||
Imports System.Windows.Threading
|
||||
Imports EgtUILib
|
||||
|
||||
Public Class SingleCutUC
|
||||
|
||||
@@ -43,6 +44,10 @@ Public Class SingleCutUC
|
||||
Private Const MIN_CUT_LEN As Double = 10.0
|
||||
Private Const MAX_SIDE_ANG As Double = 60.0
|
||||
' Costanti che indicano la modalità di acquisizione dei punti
|
||||
|
||||
' Utilizzato per aggiornare la posizione della macchina
|
||||
Private m_RefreshTimer As New DispatcherTimer
|
||||
|
||||
Private Enum PT_MODE As Integer
|
||||
SAW = 0
|
||||
LASER = 1
|
||||
@@ -68,14 +73,14 @@ Public Class SingleCutUC
|
||||
SimulBtn.ToolTip = EgtMsg(MSG_CADCUTPAGEUC + 1)
|
||||
OkBtn.ToolTip = EgtMsg(MSG_DIRECTCUTPAGEUC + 30)
|
||||
' Carico i dati dell'ultimo taglio
|
||||
m_dDepth = GetPrivateProfileDouble( S_DIRECTCUTS, K_DC_SING_DEPTH, m_dDepth, m_MainWindow.GetIniFile())
|
||||
m_dLen = GetPrivateProfileDouble( S_DIRECTCUTS, K_DC_SING_LENGTH, m_dLen, m_MainWindow.GetIniFile())
|
||||
m_dAngO = GetPrivateProfileDouble( S_DIRECTCUTS, K_DC_SING_ANGH, m_dAngO, m_MainWindow.GetIniFile())
|
||||
m_dAngV = GetPrivateProfileDouble( S_DIRECTCUTS, K_DC_SING_ANGV, m_dAngV, m_MainWindow.GetIniFile())
|
||||
m_dDepth = GetPrivateProfileDouble(S_DIRECTCUTS, K_DC_SING_DEPTH, m_dDepth, m_MainWindow.GetIniFile())
|
||||
m_dLen = GetPrivateProfileDouble(S_DIRECTCUTS, K_DC_SING_LENGTH, m_dLen, m_MainWindow.GetIniFile())
|
||||
m_dAngO = GetPrivateProfileDouble(S_DIRECTCUTS, K_DC_SING_ANGH, m_dAngO, m_MainWindow.GetIniFile())
|
||||
m_dAngV = GetPrivateProfileDouble(S_DIRECTCUTS, K_DC_SING_ANGV, m_dAngV, m_MainWindow.GetIniFile())
|
||||
m_dOffset = GetPrivateProfileDouble(S_DIRECTCUTS, K_DC_SING_OFFSET, m_dOffset, m_MainWindow.GetIniFile())
|
||||
m_bSawTh = (GetPrivateProfileInt(S_DIRECTCUTS, K_DC_SING_SAWTH, 0, m_MainWindow.GetIniFile()) <> 0)
|
||||
m_ptTipP1.x = GetPrivateProfileDouble( S_DIRECTCUTS, K_DC_SING_POSX, m_ptTipP1.x, m_MainWindow.GetIniFile())
|
||||
m_ptTipP1.y = GetPrivateProfileDouble( S_DIRECTCUTS, K_DC_SING_POSY, m_ptTipP1.y, m_MainWindow.GetIniFile())
|
||||
m_ptTipP1.x = GetPrivateProfileDouble(S_DIRECTCUTS, K_DC_SING_POSX, m_ptTipP1.x, m_MainWindow.GetIniFile())
|
||||
m_ptTipP1.y = GetPrivateProfileDouble(S_DIRECTCUTS, K_DC_SING_POSY, m_ptTipP1.y, m_MainWindow.GetIniFile())
|
||||
End Sub
|
||||
|
||||
Private Sub SingleCut_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded
|
||||
@@ -92,6 +97,10 @@ Public Class SingleCutUC
|
||||
m_MainWindow.m_DirectCutPageUC.m_bShowMachine = True
|
||||
EgtSetMachineLook(m_MainWindow.m_DirectCutPageUC.m_nMachLook)
|
||||
EgtDraw()
|
||||
' riavvio il timer per visualizzare la poszione della macchina
|
||||
If Not IsNothing(m_RefreshTimer) Then
|
||||
m_RefreshTimer.Start()
|
||||
End If
|
||||
Return
|
||||
End If
|
||||
' Disabilito registrazione progetto modificato
|
||||
@@ -114,7 +123,7 @@ Public Class SingleCutUC
|
||||
m_bPointP1Ok = False
|
||||
m_bPointP2Ok = False
|
||||
' Inizializzo primo punto acquisito dal disegno
|
||||
m_ptPrev = m_ptTipP1 + ( m_ptTabOri - Point3d.ORIG())
|
||||
m_ptPrev = m_ptTipP1 + (m_ptTabOri - Point3d.ORIG())
|
||||
m_ptPrev.z = m_ptRawMax.z
|
||||
' Disegno crocetta che indica il punto acquisito
|
||||
CreateCross(m_nTempLay, m_ptPrev)
|
||||
@@ -138,26 +147,45 @@ Public Class SingleCutUC
|
||||
' Deseleziono bottone primo punto
|
||||
Point1Btn.IsChecked = False
|
||||
|
||||
' la visualizzazione dei comandi è gestira dalla DirectCutPageUC richiamando la funzione ReloadParam
|
||||
' la visualizzazione dei comandi è gestita dalla DirectCutPageUC richiamando la funzione ReloadParam
|
||||
|
||||
' forzo la macchina ad essere visibile fin da subito
|
||||
m_MainWindow.m_DirectCutPageUC.m_bShowMachine = True
|
||||
m_MainWindow.m_DirectCutPageUC.m_nMachLook = MCH_LOOK.TAB
|
||||
' Creo il timer il timer per aggiornare il posizionamento della macchina
|
||||
AddHandler m_RefreshTimer.Tick, AddressOf RefreshTimer_tick
|
||||
m_RefreshTimer.Interval = TimeSpan.FromMilliseconds(1000)
|
||||
|
||||
' Aggiorno visualizzazione
|
||||
EgtDraw()
|
||||
|
||||
' Avvi il timer
|
||||
m_RefreshTimer.Start()
|
||||
End Sub
|
||||
|
||||
Private Sub RefreshTimer_tick()
|
||||
' se è impostata la visualizzazione della sola tavola allora non aggiorno il disegno
|
||||
If m_MainWindow.m_DirectCutPageUC.m_nMachLook = MCH_LOOK.TAB Then Return
|
||||
' Aggiorno visualizzazione
|
||||
SetMachineInCurrPos()
|
||||
' Aggiorno il disegno
|
||||
EgtDraw()
|
||||
End Sub
|
||||
|
||||
Friend Sub SingleCut_Unloaded(sender As Object, e As RoutedEventArgs) Handles Me.Unloaded
|
||||
' Salvo i dati correnti
|
||||
WritePrivateProfileString( S_DIRECTCUTS, K_DC_SING_DEPTH, DoubleToString( m_dDepth, 2), m_MainWindow.GetIniFile())
|
||||
WritePrivateProfileString( S_DIRECTCUTS, K_DC_SING_LENGTH, DoubleToString( m_dLen, 2), m_MainWindow.GetIniFile())
|
||||
WritePrivateProfileString( S_DIRECTCUTS, K_DC_SING_ANGH, DoubleToString( m_dAngO, 2), m_MainWindow.GetIniFile())
|
||||
WritePrivateProfileString( S_DIRECTCUTS, K_DC_SING_ANGV, DoubleToString( m_dAngV, 2), m_MainWindow.GetIniFile())
|
||||
WritePrivateProfileString(S_DIRECTCUTS, K_DC_SING_DEPTH, DoubleToString(m_dDepth, 2), m_MainWindow.GetIniFile())
|
||||
WritePrivateProfileString(S_DIRECTCUTS, K_DC_SING_LENGTH, DoubleToString(m_dLen, 2), m_MainWindow.GetIniFile())
|
||||
WritePrivateProfileString(S_DIRECTCUTS, K_DC_SING_ANGH, DoubleToString(m_dAngO, 2), m_MainWindow.GetIniFile())
|
||||
WritePrivateProfileString(S_DIRECTCUTS, K_DC_SING_ANGV, DoubleToString(m_dAngV, 2), m_MainWindow.GetIniFile())
|
||||
WritePrivateProfileString(S_DIRECTCUTS, K_DC_SING_OFFSET, DoubleToString(m_dOffset, 2), m_MainWindow.GetIniFile())
|
||||
WritePrivateProfileString(S_DIRECTCUTS, K_DC_SING_SAWTH, If(m_bSawTh, "1", "0"), m_MainWindow.GetIniFile())
|
||||
WritePrivateProfileString( S_DIRECTCUTS, K_DC_SING_POSX, DoubleToString( m_ptTipP1.x, 2), m_MainWindow.GetIniFile())
|
||||
WritePrivateProfileString(S_DIRECTCUTS, K_DC_SING_POSX, DoubleToString(m_ptTipP1.x, 2), m_MainWindow.GetIniFile())
|
||||
WritePrivateProfileString(S_DIRECTCUTS, K_DC_SING_POSY, DoubleToString(m_ptTipP1.y, 2), m_MainWindow.GetIniFile())
|
||||
' Se non vado in simulazione
|
||||
If Not m_bSimul Then
|
||||
' Dichiaro sottopagina da non riattivare
|
||||
m_MainWindow.m_DirectCutPageUC.m_ActiveDirectCutPage = DirectCutPageUC.DirectCutPages.DirectCut
|
||||
m_MainWindow.m_DirectCutPageUC.m_ControlsDirectCutUC.m_ActiveDirectCutPage = ControlsDirectCutUC.DirectCutPages.DirectCut
|
||||
' Rimuovo layer temporaneo per crocette
|
||||
EgtErase(m_nTempLay)
|
||||
' Rimuovo eventuale pezzo per taglio diretto
|
||||
@@ -171,6 +199,8 @@ Public Class SingleCutUC
|
||||
EgtSetMachineLook(MCH_LOOK.TAB)
|
||||
EgtDraw()
|
||||
End If
|
||||
' interrompo il Timer per aggiornare la visualizzazione del posizionamento macchina
|
||||
m_RefreshTimer.Stop()
|
||||
' Dichiaro pagina non attiva
|
||||
m_bActive = False
|
||||
End Sub
|
||||
@@ -279,7 +309,7 @@ Public Class SingleCutUC
|
||||
DirectionTxBx.Text = DoubleToString(m_dAngO - m_MainWindow.m_CurrentMachine.dDeltaC, 2)
|
||||
SideAngleTxBx.Text = DoubleToString(m_dAngV, 2)
|
||||
|
||||
' Altrimenti punto da click di mouse
|
||||
' Altrimenti punto da click di mouse
|
||||
Else
|
||||
' Assegno punto selezionato nel disegno a m_ptTipP1
|
||||
m_ptTipP1 = m_ptPrev
|
||||
@@ -298,6 +328,7 @@ Public Class SingleCutUC
|
||||
m_MainWindow.m_DirectCutPageUC.m_bShowMachine = True
|
||||
EgtSetMachineLook(m_MainWindow.m_DirectCutPageUC.m_nMachLook)
|
||||
EgtDraw()
|
||||
|
||||
' Seleziono il bottone per indicare che il primo punto è stato acquisito
|
||||
Point1Btn.IsChecked = True
|
||||
' Abilito e deseleziono secondo punto
|
||||
@@ -358,7 +389,7 @@ Public Class SingleCutUC
|
||||
m_dAngV = 90 - dTAngV
|
||||
SideAngleTxBx.Text = DoubleToString(m_dAngV, 2)
|
||||
|
||||
' Altrimenti punto da click di mouse
|
||||
' Altrimenti punto da click di mouse
|
||||
Else
|
||||
' Assegno punto selezionato nel disegno a m_ptTipP2
|
||||
m_ptTipP2 = m_ptPrev
|
||||
@@ -476,7 +507,7 @@ Public Class SingleCutUC
|
||||
EgtDraw()
|
||||
End Sub
|
||||
|
||||
Private Sub SawThick_Click( sender As Object, e As RoutedEventArgs) Handles SawThChBx.Click
|
||||
Private Sub SawThick_Click(sender As Object, e As RoutedEventArgs) Handles SawThChBx.Click
|
||||
' Recupero lo stato di check
|
||||
m_bSawTh = SawThChBx.IsChecked()
|
||||
' Disegno il taglio
|
||||
@@ -524,6 +555,7 @@ Public Class SingleCutUC
|
||||
m_bSimul = True
|
||||
m_CurrProjPage.m_SceneButtons.MeasureBtn.IsChecked = False
|
||||
m_CurrProjPage.CurrProjGrid.Visibility = Windows.Visibility.Hidden
|
||||
m_MainWindow.m_DirectCutPageUC.m_ControlsDirectCutUC.LeftButtonGrid.Children.Remove(Me)
|
||||
m_CurrProjPage.CurrentProjectPageGrid.Children.Remove(m_MainWindow.m_DirectCutPageUC)
|
||||
m_MainWindow.m_PrevActivePage = MainWindow.Pages.DirectCut
|
||||
m_CurrProjPage.CurrentProjectPageGrid.Children.Add(m_MainWindow.m_SimulationPage)
|
||||
@@ -535,9 +567,9 @@ Public Class SingleCutUC
|
||||
m_CurrProjPage.SetWarningMessage( "Trial Version")
|
||||
#Else
|
||||
' Verifico non sia versione Ufficio
|
||||
If m_MainWindow.GetKeyOption( MainWindow.KEY_OPT.OFFICE_TYPE) Then
|
||||
m_CurrProjPage.SetWarningMessage( "Office Version")
|
||||
Return
|
||||
If m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.OFFICE_TYPE) Then
|
||||
m_CurrProjPage.SetWarningMessage("Office Version")
|
||||
Return
|
||||
End If
|
||||
' Verifico ci sia un taglio valido
|
||||
If Not m_bCutOk Then Return
|
||||
@@ -564,7 +596,7 @@ Public Class SingleCutUC
|
||||
End Sub
|
||||
|
||||
Private Sub ExitBtn_Click(sender As Object, e As RoutedEventArgs) Handles ExitBtn.Click
|
||||
m_MainWindow.m_DirectCutPageUC.LeftButtonGrid.Children.Remove(Me)
|
||||
m_MainWindow.m_DirectCutPageUC.m_ControlsDirectCutUC.LeftButtonGrid.Children.Remove(Me)
|
||||
End Sub
|
||||
|
||||
Private Function CreateSingleCut() As Boolean
|
||||
@@ -582,7 +614,7 @@ Public Class SingleCutUC
|
||||
Dim sSawing As String = m_MainWindow.m_CurrentMachine.sCurrSawing
|
||||
EgtTdbSetCurrTool(sSaw)
|
||||
Dim dThick As Double = 0
|
||||
' se è impostata una lavorazione di lama
|
||||
' Se è impostata una lavorazione di lama
|
||||
If Not String.IsNullOrEmpty(sSawing) Then
|
||||
EgtTdbGetCurrToolParam(MCH_TP.THICK, dThick)
|
||||
End If
|
||||
@@ -598,14 +630,19 @@ Public Class SingleCutUC
|
||||
Dim ptStart As Point3d = m_ptTipP1
|
||||
ptStart.z = 0
|
||||
Dim nCutId = EgtCreateLinePDL(nLayerId, ptStart, m_dAngO, m_dLen)
|
||||
If Math.Abs(m_dOffset) > 10 * EPS_SMALL Then
|
||||
Dim dTotOffset = m_dOffset
|
||||
If m_bSawTh Then dTotOffset += If( m_dOffset > 0, dThick, -dThick)
|
||||
' Applico la correzione di spessore lama -> anche se Offset=0! ver_2.5b1
|
||||
Dim dTotOffset = m_dOffset
|
||||
If m_bSawTh Then
|
||||
dTotOffset += If(m_dOffset > 0, dThick, -dThick)
|
||||
EgtOffsetCurve(nCutId, dTotOffset, OFF_TYPE.EXTEND)
|
||||
Else
|
||||
EgtOffsetCurve(nCutId, dTotOffset, OFF_TYPE.EXTEND)
|
||||
End If
|
||||
' Imposto affondamento e angolo di fianco sul taglio
|
||||
EgtSetInfo(nCutId, INFO_DEPTH, m_dDepth)
|
||||
EgtSetInfo(nCutId, INFO_SIDE_ANGLE, m_dAngV)
|
||||
' Imposto se disabilitare l'inversine di direzione del taglio
|
||||
If Not m_MainWindow.m_CurrentMachine.bEnableInvert Then EgtSetInfo(nCutId, INFO_ENABLE_INVERT, 0)
|
||||
' Creo layer per crocetta di riferimento
|
||||
Dim nCrossLayerId = EgtCreateGroup(nPartId)
|
||||
' Aggiungo crocetta/e
|
||||
|
||||
@@ -136,7 +136,7 @@ Public Class SingleDrillUC
|
||||
' Se non vado in simulazione
|
||||
If Not m_bSimul Then
|
||||
' Dichiaro sottopagina da non riattivare
|
||||
m_MainWindow.m_DirectCutPageUC.m_ActiveDirectCutPage = DirectCutPageUC.DirectCutPages.DirectCut
|
||||
m_MainWindow.m_DirectCutPageUC.m_ControlsDirectCutUC.m_ActiveDirectCutPage = ControlsDirectCutUC.DirectCutPages.DirectCut
|
||||
' Rimuovo layer temporaneo per crocette
|
||||
EgtErase(m_nTempLay)
|
||||
' Rimuovo eventuale pezzo per taglio diretto
|
||||
@@ -342,6 +342,7 @@ Public Class SingleDrillUC
|
||||
m_bSimul = True
|
||||
m_CurrProjPage.m_SceneButtons.MeasureBtn.IsChecked = False
|
||||
m_CurrProjPage.CurrProjGrid.Visibility = Windows.Visibility.Hidden
|
||||
m_MainWindow.m_DirectCutPageUC.m_ControlsDirectCutUC.LeftButtonGrid.Children.Remove(Me)
|
||||
m_CurrProjPage.CurrentProjectPageGrid.Children.Remove(m_MainWindow.m_DirectCutPageUC)
|
||||
m_MainWindow.m_PrevActivePage = MainWindow.Pages.DirectCut
|
||||
m_CurrProjPage.CurrentProjectPageGrid.Children.Add(m_MainWindow.m_SimulationPage)
|
||||
@@ -382,7 +383,7 @@ Public Class SingleDrillUC
|
||||
End Sub
|
||||
|
||||
Private Sub ExitBtn_Click(sender As Object, e As RoutedEventArgs) Handles ExitBtn.Click
|
||||
m_MainWindow.m_DirectCutPageUC.LeftButtonGrid.Children.Remove(Me)
|
||||
m_MainWindow.m_DirectCutPageUC.m_ControlsDirectCutUC.LeftButtonGrid.Children.Remove(Me)
|
||||
End Sub
|
||||
|
||||
Private Function CreateSingleDrill() As Boolean
|
||||
|
||||
@@ -0,0 +1,162 @@
|
||||
<UserControl x:Class="SquaringUC"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="597.3" d:DesignWidth="256">
|
||||
|
||||
<!--<Border CornerRadius="{StaticResource Page_CornerRadius}" Background="{StaticResource OmagCut_LightGray}">-->
|
||||
<Border Style="{DynamicResource OmagCut_DirectCutPageBorder}">
|
||||
|
||||
<!-- Definizione della Grid MultipleCut -->
|
||||
<Grid Name="SingleCutGrid" >
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="2*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<!--<Grid Grid.Row="0" Grid.ColumnSpan="2">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<ToggleButton Name="Point1Btn" Grid.Column="0"
|
||||
Style="{DynamicResource OmagCut_YellowIconToggleButton}">
|
||||
<Image Source="{DynamicResource Acquisisci-P1Img}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
</ToggleButton>
|
||||
|
||||
<ToggleButton Name="Point2Btn" Grid.Column="1"
|
||||
Style="{DynamicResource OmagCut_YellowIconToggleButton}">
|
||||
<Image Source="{DynamicResource Acquisisci-P2Img}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
</ToggleButton>
|
||||
</Grid>-->
|
||||
|
||||
<!--<ComboBox Name="PointModeCmBx" Grid.Row="1" Grid.ColumnSpan="2" Style="{StaticResource OmagCut_ComboBox}"
|
||||
Margin="6,0,6,0">
|
||||
<ComboBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding}" Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</DataTemplate>
|
||||
</ComboBox.ItemTemplate>
|
||||
</ComboBox>-->
|
||||
|
||||
<!--<TextBlock Name="DepthTxBl" Grid.Column="0" Grid.Row="2"
|
||||
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="DepthTxBx" Grid.Column="1" Grid.Row="2" Margin="0,0,6,0"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>-->
|
||||
|
||||
<TextBlock Name="OffsetTxBl" Grid.Column="0" Grid.Row="3"
|
||||
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="OffsetTxBx" Grid.Column="1" Grid.Row="3" Margin="0,0,6,0"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
|
||||
<TextBlock Name="ExtraLenTxBl" Grid.Column="0" Grid.Row="4"
|
||||
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="ExtraLenTxBx" Grid.Column="1" Grid.Row="4" Margin="0,0,6,0"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
|
||||
<!--<TextBlock Name="DirectionTxBl" Grid.Column="0" Grid.Row="3"
|
||||
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="DirectionTxBx" Grid.Column="1" Grid.Row="3" Margin="0,0,6,0"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
|
||||
<TextBlock Name="SideAngleTxBl" Grid.Column="0" Grid.Row="4"
|
||||
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="SideAngleTxBx" Grid.Column="1" Grid.Row="4" Margin="0,0,6,0"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>-->
|
||||
|
||||
<!--<Grid Grid.Row="5" Grid.ColumnSpan="2">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1.5*"/>
|
||||
<ColumnDefinition Width="2"/>
|
||||
<ColumnDefinition Width="1.5*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<Border Grid.Column="1" Grid.Row="0" Grid.RowSpan="4" Background="Black" />
|
||||
|
||||
<TextBlock Name="NumPzXTxBl" Grid.Column="0" Grid.Row="0"
|
||||
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
|
||||
<TextBlock Name="DimPzXTxBl" Grid.Column="2" Grid.Row="0"
|
||||
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
|
||||
|
||||
<EgtWPFLib:EgtTextBox Name="NumPzXTxBx" Grid.Column="0" Grid.Row="1" Width="75"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="DimPzXTxBx" Grid.Column="2" Grid.Row="1" Width="75"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}" />
|
||||
|
||||
<TextBlock Name="NumPzYTxBl" Grid.Column="0" Grid.Row="2"
|
||||
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
|
||||
<TextBlock Name="DimPzYTxBl" Grid.Column="2" Grid.Row="2"
|
||||
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
|
||||
|
||||
<EgtWPFLib:EgtTextBox Name="NumPzYTxBx" Grid.Column="0" Grid.Row="3" Width="75"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="DimPzYTxBx" Grid.Column="2" Grid.Row="3" Width="75"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}" />
|
||||
|
||||
</Grid>
|
||||
|
||||
<TextBlock Name="SideTxBl" Grid.Row="6" Grid.ColumnSpan="2"
|
||||
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
|
||||
<CheckBox Name="SideChBx" Grid.Row="6" Grid.ColumnSpan="2" Style="{StaticResource OmagCut_CheckBox_Single}"
|
||||
HorizontalAlignment="Right" Margin="0,0,6,0"/>-->
|
||||
|
||||
<Grid Grid.Row="7" Grid.ColumnSpan="2">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Name="XcoordTxBl" Grid.Column="0" Text="X"
|
||||
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}" HorizontalAlignment="Center"/>
|
||||
<EgtWPFLib:EgtTextBox Name="XcoordTxBx" Grid.Column="1" Margin="0,0,6,0"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
<TextBlock Name="YcoordTxBl" Grid.Column="2" Text="Y"
|
||||
Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}" HorizontalAlignment="Center"/>
|
||||
<EgtWPFLib:EgtTextBox Name="YcoordTxBx" Grid.Column="3" Margin="0,0,6,0"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
</Grid>
|
||||
|
||||
<Grid Grid.Row="11" Grid.ColumnSpan="2">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Button Name="SimulBtn" Grid.Column="0" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource SimulaImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="OkBtn" Grid.Column="1" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource EseguiImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="ExitBtn" Grid.Column="2" Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource XImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
</Grid>
|
||||
|
||||
</Grid>
|
||||
|
||||
</Border>
|
||||
</UserControl>
|
||||
@@ -0,0 +1,442 @@
|
||||
Imports EgtUILib
|
||||
|
||||
Public Class SquaringUC
|
||||
|
||||
' Riferimenti a pagine
|
||||
Private m_MainWindow As MainWindow = DirectCast(Application.Current.MainWindow, MainWindow)
|
||||
Private WithEvents m_CurrProjPage As CurrentProjectPageUC
|
||||
' Flag di pagina attiva
|
||||
Private m_bActive As Boolean = False
|
||||
' Flag di simulazione in corso
|
||||
Private m_bSimul As Boolean = False
|
||||
|
||||
' Origine tavola e dati grezzo
|
||||
Private m_bRawOk As Boolean = False
|
||||
Private m_ptTabOri As Point3d
|
||||
Private m_ptRawMin As Point3d
|
||||
Private m_ptRawMax As Point3d
|
||||
' Parametri P1 acquisito
|
||||
Private m_ptTipP1 As Point3d
|
||||
Private m_vtToolP1 As Vector3d
|
||||
' Parametri P2 acquisito
|
||||
Private m_ptTipP2 As Point3d
|
||||
Private m_vtToolP2 As Vector3d
|
||||
' Parametri della lavorazione
|
||||
Private m_bCutOk As Boolean = False
|
||||
Private m_dDepth As Double = 0
|
||||
Private m_dOffsetSquaring As Double = 150
|
||||
Private m_dExtraLength As Double = 0
|
||||
Private m_dAngO As Double = 180
|
||||
Private m_dAngV As Double = 0
|
||||
Private m_nNumX As Integer = 0
|
||||
Private m_dDimX As Double = 0
|
||||
Private m_nNumY As Integer = 0
|
||||
Private m_dDimY As Double = 0
|
||||
Private m_bHeadSide As Boolean = False
|
||||
|
||||
' Punto selezionato nel disegno
|
||||
Private m_ptPrev As Point3d
|
||||
' Layer per crocette temporanee
|
||||
Private m_nTempLay As Integer = GDB_ID.NULL
|
||||
|
||||
' Costanti
|
||||
Private Const MAX_TAB_DEPTH As Double = 10.0
|
||||
Private Const MIN_CUT_LEN As Double = 10.0
|
||||
Private Const MAX_SIDE_ANG As Double = 60.0
|
||||
|
||||
'Costante che indica il lato in cui posizionare i tagli
|
||||
Private Enum CutSide As Integer
|
||||
Left
|
||||
Right
|
||||
End Enum
|
||||
|
||||
Private Sub GridCut_Initialized(sender As Object, e As EventArgs) Handles Me.Initialized
|
||||
OffsetTxBl.Text = EgtMsg(MSG_DIRECTCUTPAGEUC + 28)
|
||||
' 90260=Extra length
|
||||
ExtraLenTxBl.Text = EgtMsg(90260)
|
||||
SimulBtn.ToolTip = EgtMsg(MSG_CADCUTPAGEUC + 1)
|
||||
OkBtn.ToolTip = EgtMsg(MSG_DIRECTCUTPAGEUC + 30)
|
||||
|
||||
' Carico i dati dell'ultimo taglio
|
||||
m_dOffsetSquaring = GetPrivateProfileDouble(S_DIRECTCUTS, K_DC_OFFSET_SQUARING, m_dOffsetSquaring, m_MainWindow.GetIniFile())
|
||||
m_dExtraLength = GetPrivateProfileDouble(S_DIRECTCUTS, K_DC_EXTRA_LEN_SQUARING, m_dExtraLength, m_MainWindow.GetIniFile())
|
||||
m_dDepth = 0
|
||||
m_dAngO = 90
|
||||
m_dAngV = GetPrivateProfileDouble(S_DIRECTCUTS, K_DC_GRID_ANGV, m_dAngV, m_MainWindow.GetIniFile())
|
||||
m_nNumX = 1
|
||||
m_dDimX = GetPrivateProfileDouble(S_DIRECTCUTS, K_DC_GRID_DIMX, m_dDimX, m_MainWindow.GetIniFile())
|
||||
m_nNumY = 1
|
||||
m_dDimY = GetPrivateProfileDouble(S_DIRECTCUTS, K_DC_GRID_DIMY, m_dDimY, m_MainWindow.GetIniFile())
|
||||
m_bHeadSide = False
|
||||
End Sub
|
||||
|
||||
Private Sub Squaring_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded
|
||||
' Attivo la pagina
|
||||
m_CurrProjPage = m_MainWindow.m_CurrentProjectPageUC
|
||||
m_bActive = True
|
||||
' Se rientro da simulazione
|
||||
If m_bSimul Then
|
||||
m_bSimul = False
|
||||
' Disabilito registrazione progetto modificato
|
||||
EgtDisableModified()
|
||||
m_MainWindow.m_DirectCutPageUC.m_bShowMachine = False
|
||||
EgtSetMachineLook(MCH_LOOK.TAB)
|
||||
EgtDraw()
|
||||
Return
|
||||
End If
|
||||
' Disabilito registrazione progetto modificato
|
||||
EgtDisableModified()
|
||||
' Creo layer temporaneo per crocette
|
||||
m_nTempLay = EgtCreateGroup(GDB_ID.ROOT)
|
||||
EgtSetLevel(m_nTempLay, GDB_LV.TEMP)
|
||||
' Origine tavola
|
||||
m_bRawOk = True
|
||||
If Not EgtGetTableRef(1, m_ptTabOri) Then
|
||||
m_bRawOk = False
|
||||
EgtOutLog("Error on TableRef1")
|
||||
End If
|
||||
|
||||
' Dati del grezzo
|
||||
If Not GetRawBox(m_ptRawMin, m_ptRawMax) Then
|
||||
m_bRawOk = False
|
||||
EgtOutLog("Error on RawBox")
|
||||
End If
|
||||
' calcolo lalavorazione di squadratura
|
||||
RefreshSquaring()
|
||||
End Sub
|
||||
|
||||
Private Sub RefreshSquaring()
|
||||
If Not m_bRawOk Then Return
|
||||
|
||||
Dim m_ThickSaw As Double
|
||||
EgtTdbGetCurrToolParam(MCH_TP.THICK, m_ThickSaw)
|
||||
|
||||
m_dDepth = CamAuto.GetRawHeight()
|
||||
m_dDimX = Math.Abs(m_ptRawMax.x - m_ptRawMin.x) - 2 * (m_dOffsetSquaring)
|
||||
m_dDimY = Math.Abs(m_ptRawMax.y - m_ptRawMin.y) - 2 * (m_dOffsetSquaring)
|
||||
|
||||
Dim ptStart As New Point3d(m_ptRawMin.x + m_dOffsetSquaring - m_ThickSaw, m_ptRawMin.y + m_dOffsetSquaring, m_ptRawMin.z)
|
||||
Dim ptEnd As New Point3d(ptStart.x + m_dDimX, ptStart.y, m_ptRawMin.z)
|
||||
|
||||
SetCoordVisibility(True)
|
||||
ShowCoord()
|
||||
|
||||
OffsetTxBx.Text = LenToString(m_dOffsetSquaring, 1)
|
||||
ExtraLenTxBx.Text = LenToString(m_dExtraLength, 1)
|
||||
m_bCutOk = False
|
||||
UpdateSimulOkBtn()
|
||||
|
||||
SquaringPoint(ptStart, ptEnd)
|
||||
m_ptPrev = ptStart
|
||||
End Sub
|
||||
|
||||
Friend Sub Squaring_Unloaded(sender As Object, e As RoutedEventArgs) Handles Me.Unloaded
|
||||
' Salvo i dati correnti
|
||||
' Salvo i dati correnti
|
||||
WritePrivateProfileString(S_DIRECTCUTS, K_DC_OFFSET_SQUARING, DoubleToString(m_dOffsetSquaring, 2), m_MainWindow.GetIniFile())
|
||||
WritePrivateProfileString(S_DIRECTCUTS, K_DC_EXTRA_LEN_SQUARING, DoubleToString(m_dExtraLength, 2), m_MainWindow.GetIniFile())
|
||||
' Se non vado in simulazione
|
||||
If Not m_bSimul Then
|
||||
' Dichiaro sottopagina da non riattivare
|
||||
m_MainWindow.m_DirectCutPageUC.m_ControlsDirectCutUC.m_ActiveDirectCutPage = ControlsDirectCutUC.DirectCutPages.DirectCut
|
||||
' Rimuovo layer temporaneo per crocette
|
||||
EgtErase(m_nTempLay)
|
||||
' Rimuovo eventuale pezzo per taglio diretto
|
||||
EraseDirectCutPart()
|
||||
' Riattivo eventuali lavorazioni presenti
|
||||
ActivateAllMachinings()
|
||||
' Abilito registrazione progetto modificato
|
||||
EgtEnableModified()
|
||||
' Nascondo la macchina
|
||||
m_MainWindow.m_DirectCutPageUC.m_bShowMachine = False
|
||||
EgtSetMachineLook(MCH_LOOK.TAB)
|
||||
EgtDraw()
|
||||
End If
|
||||
' Dichiaro pagina non attiva
|
||||
m_bActive = False
|
||||
End Sub
|
||||
|
||||
Private Sub UpdateSimulOkBtn()
|
||||
If m_bCutOk Then
|
||||
SimulBtn.IsEnabled = True
|
||||
SimulBtn.Foreground = Brushes.Black
|
||||
OkBtn.IsEnabled = True
|
||||
OkBtn.Foreground = Brushes.Black
|
||||
Else
|
||||
SimulBtn.IsEnabled = False
|
||||
SimulBtn.Foreground = Brushes.DarkGray
|
||||
OkBtn.IsEnabled = False
|
||||
OkBtn.Foreground = Brushes.DarkGray
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub SquaringPoint(ptMin As Point3d, ptMax As Point3d)
|
||||
' Rimuovo eventuali crocette create acquisendo i punti nel disegno
|
||||
EgtEmptyGroup(m_nTempLay)
|
||||
' Verifico configurazione tavola e grezzo
|
||||
If Not m_bRawOk Then Return
|
||||
|
||||
' Recupero dati utensile e testa corrente
|
||||
Dim sTool As String = ""
|
||||
Dim sHead As String = ""
|
||||
Dim nExit As Integer = 0
|
||||
EgtGetCalcTool(sTool, sHead, nExit)
|
||||
'------------- BOTTOM LEFT -------------------
|
||||
' Assegno punto selezionato nel disegno a m_ptTipP1
|
||||
m_ptTipP1 = ptMin
|
||||
' Porto il tip nell'origine tavola
|
||||
m_ptTipP1.ToLoc(New Frame3d(m_ptTabOri))
|
||||
' Reimposto eventuale precedente utensile
|
||||
EgtSetCalcTool(sTool, sHead, nExit)
|
||||
'------------- TOP RIGHT -------------------
|
||||
' Assegno punto selezionato nel disegno a m_ptTipP2
|
||||
m_ptTipP2 = ptMax
|
||||
' Porto il tip nell'origine tavola
|
||||
m_ptTipP2.ToLoc(New Frame3d(m_ptTabOri))
|
||||
' Reimposto eventuale precedente utensile
|
||||
EgtSetCalcTool(sTool, sHead, nExit)
|
||||
|
||||
' Se il secondo punto non coincide con il primo, disegno il taglio
|
||||
Dim vtDiff As Vector3d = m_ptTipP2 - m_ptTipP1
|
||||
vtDiff.z = 0
|
||||
Dim dLen As Double
|
||||
Dim dAngVertDeg As Double
|
||||
Dim dAngOrizzDeg As Double
|
||||
vtDiff.ToSpherical(dLen, dAngVertDeg, dAngOrizzDeg)
|
||||
If dLen > EPS_SMALL Then
|
||||
m_dAngO = dAngOrizzDeg
|
||||
CreateGridCut()
|
||||
' visuliazzo tavola
|
||||
m_MainWindow.m_DirectCutPageUC.m_bShowMachine = False
|
||||
EgtSetMachineLook(MCH_LOOK.TAB)
|
||||
EgtDraw()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub OffsetTxBx_EgtClosed(sender As Object, e As EventArgs) Handles OffsetTxBx.EgtClosed
|
||||
' Verifico che l'offset impostato non sia superiore a quello massimo
|
||||
Dim dMaxOffset As Double = Math.Min(m_dDimX, m_dDimY) / 2 - 15
|
||||
Dim dOffset As Double = 0
|
||||
StringToLen(OffsetTxBx.Text, dOffset)
|
||||
If dOffset < 0 Then
|
||||
dOffset = 0
|
||||
ElseIf dOffset > dMaxOffset Then
|
||||
dOffset = dMaxOffset
|
||||
End If
|
||||
m_dOffsetSquaring = dOffset
|
||||
OffsetTxBx.Text = LenToString(m_dOffsetSquaring, 2)
|
||||
' Disegno il taglio
|
||||
RefreshSquaring()
|
||||
EgtDraw()
|
||||
End Sub
|
||||
|
||||
Private Sub ExtraLength_EgtClosed(sender As Object, e As EventArgs) Handles ExtraLenTxBx.EgtClosed
|
||||
' Verifico che il valore indicato sia almeno maggiore dell'offset indicato
|
||||
Dim dOffset As Double = 0
|
||||
StringToLen(OffsetTxBx.Text, dOffset)
|
||||
Dim MadExtraLeng As Double = Math.Abs(dOffset)
|
||||
Dim dExtraLen As Double
|
||||
StringToLen(ExtraLenTxBx.Text, dExtraLen)
|
||||
If dExtraLen < 0 AndAlso dExtraLen < -MadExtraLeng Then
|
||||
dExtraLen = 0
|
||||
End If
|
||||
m_dExtraLength = dExtraLen
|
||||
ExtraLenTxBx.Text = LenToString(m_dExtraLength, 2)
|
||||
' Disegno il taglio
|
||||
RefreshSquaring()
|
||||
EgtDraw()
|
||||
End Sub
|
||||
|
||||
Private Sub SimulBtn_Click(sender As Object, e As RoutedEventArgs) Handles SimulBtn.Click
|
||||
' Verifico ci sia un taglio valido
|
||||
If Not m_bCutOk Then Return
|
||||
' Salvo il progetto con le lavorazioni
|
||||
EgtSetCurrentContext(m_CurrProjPage.CurrentProjectScene.GetCtx())
|
||||
Dim sMchPath As String = m_MainWindow.GetTempDir() & "\" & "DirectProj.nge"
|
||||
m_MainWindow.m_CurrentProjectPageUC.SaveFile(sMchPath, False)
|
||||
' Predispongo passaggio a simulazione
|
||||
m_bSimul = True
|
||||
m_CurrProjPage.m_SceneButtons.MeasureBtn.IsChecked = False
|
||||
m_CurrProjPage.CurrProjGrid.Visibility = Windows.Visibility.Hidden
|
||||
m_MainWindow.m_DirectCutPageUC.m_ControlsDirectCutUC.LeftButtonGrid.Children.Remove(Me)
|
||||
m_CurrProjPage.CurrentProjectPageGrid.Children.Remove(m_MainWindow.m_DirectCutPageUC)
|
||||
m_MainWindow.m_PrevActivePage = MainWindow.Pages.DirectCut
|
||||
m_CurrProjPage.CurrentProjectPageGrid.Children.Add(m_MainWindow.m_SimulationPage)
|
||||
m_MainWindow.m_ActivePage = MainWindow.Pages.Simulation
|
||||
End Sub
|
||||
|
||||
Private Sub OkBtn_Click(sender As Object, e As RoutedEventArgs) Handles OkBtn.Click
|
||||
#If TRIAL Then
|
||||
m_CurrProjPage.SetWarningMessage("Trial Version")
|
||||
#Else
|
||||
' Verifico non sia versione Ufficio
|
||||
If m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.OFFICE_TYPE) Then
|
||||
m_CurrProjPage.SetWarningMessage("Office Version")
|
||||
Return
|
||||
End If
|
||||
' Verifico ci sia un taglio valido
|
||||
If Not m_bCutOk Then Return
|
||||
' Salvo il progetto con le lavorazioni
|
||||
Dim sMchPath As String = m_MainWindow.GetTempDir() & "\" & "DirectProj.nge"
|
||||
m_MainWindow.m_CurrentProjectPageUC.SaveFile(sMchPath, False)
|
||||
' Genero file CNC (lancio anche se errore in precedenza)
|
||||
Dim sCncPath As String = m_MainWindow.GetCncDir() & "\DirectCut" & m_MainWindow.m_CurrentMachine.sIsoFileExt
|
||||
Dim bOk As Boolean = EgtGenerate(sCncPath, "OmagCut ver." & m_MainWindow.GetVersion())
|
||||
' Se errore in generazione, segnalo l'errore ed esco
|
||||
If Not bOk Then
|
||||
m_CurrProjPage.SetErrorMessage(EgtMsg(90314)) 'Errore nella generazione del programma CN
|
||||
Return
|
||||
End If
|
||||
' Download programma (eventuali errori sono segnalati dalla funzione)
|
||||
If m_MainWindow.m_CNCommunication.SendProgram(sCncPath, 900) Then
|
||||
' copio il progetto corrente come progetto in lavorazione
|
||||
Dim sWrkPath As String = m_MainWindow.GetTempDir() & "\" & "WorkProj.nge"
|
||||
My.Computer.FileSystem.CopyFile(sMchPath, sWrkPath, True)
|
||||
' lancio eventuale lua post-trasmissione
|
||||
m_MainWindow.ExecSentProgScript(True)
|
||||
End If
|
||||
#End If
|
||||
End Sub
|
||||
|
||||
Private Sub ExitBtn_Click(sender As Object, e As RoutedEventArgs) Handles ExitBtn.Click
|
||||
m_MainWindow.m_DirectCutPageUC.m_ControlsDirectCutUC.LeftButtonGrid.Children.Remove(Me)
|
||||
End Sub
|
||||
|
||||
Private Function CreateGridCut() As Boolean
|
||||
' Verifico sia definito il punto iniziale e il grezzo
|
||||
If Not m_bRawOk Then
|
||||
m_bCutOk = False
|
||||
Return False
|
||||
End If
|
||||
' Spessore grezzo
|
||||
Dim dRawHeight As Double = m_ptRawMax.z - m_ptRawMin.z
|
||||
' Rimuovo eventuale vecchio pezzo per taglio diretto
|
||||
EraseDirectCutPart()
|
||||
' Disattivo eventuali lavorazioni presenti
|
||||
DeactivateAllMachinings()
|
||||
' Creo nuovo pezzo per il taglio diretto
|
||||
Dim nPartId = EgtCreateGroup(GDB_ID.ROOT)
|
||||
EgtSetName(nPartId, NAME_DIRECTCUT)
|
||||
Dim nLayerId = EgtCreateGroup(nPartId)
|
||||
EgtSetName(nLayerId, NAME_OUTLOOP)
|
||||
' Creo il taglio parallelo alla lama
|
||||
Dim ptStart As Point3d = m_ptTipP1
|
||||
ptStart.z = 0
|
||||
' Funzione che crea i tagli successivi al primo
|
||||
MultiplyCut(nLayerId)
|
||||
' Calcolo punto di inserimento nel grezzo
|
||||
Dim ptMin, ptMax As Point3d
|
||||
EgtGetBBoxGlob(nPartId, GDB_BB.STANDARD, ptMin, ptMax)
|
||||
Dim ptIns As Point3d = ptMin + (m_ptTabOri - m_ptRawMin)
|
||||
ptIns.z = dRawHeight
|
||||
' Inserisco il pezzo nel grezzo
|
||||
EgtAddPartToRawPart(nPartId, ptIns, m_MainWindow.m_CurrentProjectPageUC.m_nRawId)
|
||||
' Inserisco la lavorazione
|
||||
m_bCutOk = AddMachinings(nPartId) AndAlso UpdateAllMachiningsToolpaths()
|
||||
EgtSetCurrPhase(1)
|
||||
' Eventuale eliminazione Home finale
|
||||
If Not m_MainWindow.m_CurrentMachine.bDirectCutsFinalHome Then
|
||||
RemoveFinalHome()
|
||||
End If
|
||||
UpdateSimulOkBtn()
|
||||
Return m_bCutOk
|
||||
End Function
|
||||
|
||||
Private Function MultiplyCut(nLayerId As Integer) As Boolean
|
||||
' Recupero lo spessore del taglio della lama o del waterjet correntemente attiva
|
||||
Dim nType As Integer = 0
|
||||
EgtTdbGetCurrToolParam(MCH_TP.TYPE, nType)
|
||||
Dim dThick As Double = 0
|
||||
EgtTdbGetCurrToolParam(If(nType = MCH_TY.SAW_STD, MCH_TP.THICK, MCH_TP.DIAM), dThick)
|
||||
' Ricalcolo lo spessore in base all'inclinazione
|
||||
dThick = dThick / Math.Cos(m_dAngV * Math.PI / 180)
|
||||
' Imposto angolo di rotazione a seconda del lato dei tagli paralleli
|
||||
Dim dRotAngOX As Double = 90
|
||||
' Recupero dati da interfaccia
|
||||
Dim dDimPzX As Double = m_dDimX
|
||||
Dim nNumPzX As Integer = m_nNumX
|
||||
Dim dDimPzY As Double = m_dDimY
|
||||
Dim nNumPzY As Integer = m_nNumY
|
||||
' Definisco vettore di spostamento
|
||||
Dim vtDelta As Vector3d
|
||||
' Calcolo primo taglio parallelo
|
||||
Dim ptStart As Point3d = m_ptTipP1
|
||||
ptStart.z = 0
|
||||
If dDimPzY <> 0 And nNumPzY > 0 And dDimPzX <> 0 And nNumPzX > 0 Then
|
||||
Dim dLenX As Double = dThick + (dDimPzX + dThick) * nNumPzX
|
||||
Dim nCutParaId = EgtCreateLinePDL(nLayerId, ptStart, m_dAngO, dLenX + 0.1)
|
||||
' Imposto affondamento e angolo di fianco sul taglio
|
||||
EgtSetInfo(nCutParaId, INFO_DEPTH, m_dDepth)
|
||||
EgtSetInfo(nCutParaId, INFO_SIDE_ANGLE, m_dAngV)
|
||||
' Allungo la geometria
|
||||
EgtExtendCurveStartByLen(nCutParaId, m_dOffsetSquaring + m_dExtraLength)
|
||||
EgtExtendCurveEndByLen(nCutParaId, m_dOffsetSquaring + +m_dExtraLength)
|
||||
' Calcolo vettore di spostamento
|
||||
vtDelta = Vector3d.FromPolar((dDimPzY + dThick), m_dAngO)
|
||||
' Ruoto il vettore di traslazione
|
||||
vtDelta.Rotate(Vector3d.Z_AX, dRotAngOX)
|
||||
For Index As Integer = 1 To nNumPzY
|
||||
Dim vtPerpMove As Vector3d = Index * vtDelta
|
||||
' Creo copie
|
||||
Dim nCut2Id = EgtCopyGlob(nCutParaId, nLayerId)
|
||||
EgtMove(nCut2Id, vtPerpMove, GDB_RT.GLOB)
|
||||
Next
|
||||
' Calcolo primo taglio perpendicolare
|
||||
Dim dLenY As Double = dThick + (dDimPzY + dThick) * nNumPzY
|
||||
' Arretro il punto di partenza di uno spessore lama
|
||||
Dim vtDeltaPos As Vector3d = Vector3d.FromPolar(dThick + 0.1, m_dAngO - 90)
|
||||
Dim nCutPerpId = EgtCreateLinePDL(nLayerId, ptStart + vtDeltaPos, m_dAngO + 90, dLenY + 0.2)
|
||||
' Imposto affondamento e angolo di fianco sul taglio
|
||||
EgtSetInfo(nCutPerpId, INFO_DEPTH, m_dDepth)
|
||||
EgtSetInfo(nCutPerpId, INFO_SIDE_ANGLE, m_dAngV)
|
||||
' Allungo la geometria
|
||||
EgtExtendCurveStartByLen(nCutPerpId, m_dOffsetSquaring + m_dExtraLength)
|
||||
EgtExtendCurveEndByLen(nCutPerpId, m_dOffsetSquaring + +m_dExtraLength)
|
||||
' Calcolo secondo vettore di spostamento
|
||||
vtDelta = Vector3d.FromPolar((dDimPzX + dThick), m_dAngO)
|
||||
For Index As Integer = 1 To nNumPzX
|
||||
Dim vtPerpMove As Vector3d = vtDelta * Index
|
||||
' Creo copie
|
||||
Dim nCut3Id = EgtCopyGlob(nCutPerpId, nLayerId)
|
||||
EgtMove(nCut3Id, vtPerpMove, GDB_RT.GLOB)
|
||||
Next
|
||||
End If
|
||||
Return True
|
||||
End Function
|
||||
|
||||
Private Sub SetCoordVisibility(bShow As Boolean)
|
||||
XcoordTxBl.Visibility = If(bShow, Windows.Visibility.Visible, Windows.Visibility.Hidden)
|
||||
XcoordTxBx.Visibility = If(bShow, Windows.Visibility.Visible, Windows.Visibility.Hidden)
|
||||
YcoordTxBl.Visibility = If(bShow, Windows.Visibility.Visible, Windows.Visibility.Hidden)
|
||||
YcoordTxBx.Visibility = If(bShow, Windows.Visibility.Visible, Windows.Visibility.Hidden)
|
||||
End Sub
|
||||
|
||||
Private Sub ShowCoord()
|
||||
Dim ptText As Point3d = m_ptPrev
|
||||
ptText.ToLoc(New Frame3d(m_ptTabOri))
|
||||
XcoordTxBx.Text = LenToString(ptText.x, 2)
|
||||
YcoordTxBx.Text = LenToString(ptText.y, 2)
|
||||
End Sub
|
||||
|
||||
Private Function SetMachineInCurrPos() As Boolean
|
||||
' Recupero la posizione macchina
|
||||
Dim dL1, dL2, dL3, dR1, dR2 As Double
|
||||
If Not m_MainWindow.m_CNCommunication.GetAxesPositions(dL1, dL2, dL3, dR1, dR2) Then Return False
|
||||
' Recupero il nome degli assi macchina
|
||||
Dim sL1 As String = String.Empty
|
||||
Dim sL2 As String = String.Empty
|
||||
Dim sL3 As String = String.Empty
|
||||
Dim sR1 As String = String.Empty
|
||||
Dim sR2 As String = String.Empty
|
||||
If Not m_MainWindow.m_CNCommunication.GetAxesNames(sL1, sL2, sL3, sR1, sR2) Then Return False
|
||||
' Visualizzo macchina in posizione
|
||||
EgtSetAxisPos(sL1, dL1)
|
||||
EgtSetAxisPos(sL2, dL2)
|
||||
EgtSetAxisPos(sL3, dL3)
|
||||
EgtSetAxisPos(sR1, dR1)
|
||||
EgtSetAxisPos(sR2, dR2)
|
||||
Return True
|
||||
End Function
|
||||
|
||||
End Class
|
||||
|
||||
@@ -199,12 +199,12 @@
|
||||
Visibility="Collapsed"
|
||||
Grid.Column="2" Grid.Row="1"
|
||||
HorizontalAlignment="Right"
|
||||
Width="60" Height="30" Margin="0,0,0,0"
|
||||
Width="60" Height="30" Margin="0,0,0,0" IsLength="False"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="Parameter2FTxBx"
|
||||
Grid.Column="3" Grid.Row="1"
|
||||
HorizontalAlignment="Right"
|
||||
Width="60" Height="30" Margin="0,0,0,0"
|
||||
Width="60" Height="30" Margin="0,0,0,0" IsLength="False"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
|
||||
<!-- Spessore aletta -->
|
||||
|
||||
@@ -96,8 +96,14 @@ Public Class AlzFrontUC
|
||||
Dim LabelId As Integer = GDB_ID.NULL
|
||||
|
||||
' definisco i valori delle altezza e degli angoli di spoglia per le alzatine e i frontalini (letti da file ini del programma)
|
||||
GetPrivateProfileString(S_ALZFRONT, K_ALZ_HEIGHT, "0", Parameter1ATxBx.Text, m_MainWindow.GetIniFile)
|
||||
GetPrivateProfileString(S_ALZFRONT, K_FRONT_HEIGHT, "0", Parameter1FTxBx.Text, m_MainWindow.GetIniFile)
|
||||
Dim sVal As String = String.Empty
|
||||
Dim dVal As Double = 0
|
||||
GetPrivateProfileString(S_ALZFRONT, K_ALZ_HEIGHT, "0", sVal, m_MainWindow.GetIniFile)
|
||||
Utility.StringToDouble(sVal, dVal)
|
||||
Parameter1ATxBx.Text = Utility.LenToString(dVal, 4)
|
||||
GetPrivateProfileString(S_ALZFRONT, K_FRONT_HEIGHT, "0", sVal, m_MainWindow.GetIniFile)
|
||||
Utility.StringToDouble(sVal, dVal)
|
||||
Parameter1FTxBx.Text = Utility.LenToString(dVal, 4)
|
||||
GetPrivateProfileString(S_ALZFRONT, K_ALZ_DELTA_ANG, "0", Parameter2ATxBx.Text, m_MainWindow.GetIniFile)
|
||||
GetPrivateProfileString(S_ALZFRONT, K_FRONT_DELTA_ANG, "0", Parameter2FTxBx.Text, m_MainWindow.GetIniFile)
|
||||
Parameter5TxBx.Text = Utility.LenToString(m_MainWindow.m_CurrentProjectPageUC.m_dRawHeight, 2)
|
||||
@@ -607,9 +613,9 @@ Public Class AlzFrontUC
|
||||
Private Sub ParameterA1TxBx_EgtClosed(sender As Object, e As EventArgs) Handles Parameter1ATxBx.EgtClosed
|
||||
' Nuovo angolo di inclinazione
|
||||
Dim dValue As Double
|
||||
StringToDouble(Parameter1ATxBx.Text, dValue)
|
||||
StringToLen(Parameter1ATxBx.Text, dValue)
|
||||
' salvo il valore nel file ini e inserisco il valore nel file lua
|
||||
WritePrivateProfileString("Alz&Front", "A_Height", Parameter1ATxBx.Text, m_MainWindow.GetIniFile())
|
||||
WritePrivateProfileString("Alz&Front", "A_Height", DoubleToString(dValue, 3), m_MainWindow.GetIniFile())
|
||||
' aggiorno il disegno
|
||||
LoadCurrentCompo()
|
||||
End Sub
|
||||
@@ -618,9 +624,9 @@ Public Class AlzFrontUC
|
||||
Private Sub Parameter1FTxBx_EgtClosed(sender As Object, e As EventArgs) Handles Parameter1FTxBx.EgtClosed
|
||||
' Nuovo angolo di inclinazione
|
||||
Dim dValue As Double
|
||||
StringToDouble(Parameter1FTxBx.Text, dValue)
|
||||
StringToLen(Parameter1FTxBx.Text, dValue)
|
||||
' salvo il valore nel file ini e inserisco il valore nel file lua
|
||||
WritePrivateProfileString("Alz&Front", "F_Height", Parameter1FTxBx.Text, m_MainWindow.GetIniFile())
|
||||
WritePrivateProfileString("Alz&Front", "F_Height", DoubleToString(dValue, 3), m_MainWindow.GetIniFile())
|
||||
' aggiorno il disegno
|
||||
LoadCurrentCompo()
|
||||
End Sub
|
||||
|
||||
@@ -37,7 +37,7 @@ Public Class CompoDimensionUC
|
||||
InternComponentBtn.Content = EgtMsg(MSG_COMPONENTPAGEUC + 47) ' Componenti interni
|
||||
If Not String.IsNullOrEmpty(sCompoDir) Then
|
||||
bEnableAlzFront = True
|
||||
AlzFrontBtn.Content = "Alzatine & Frontalini"
|
||||
AlzFrontBtn.Content = EgtMsg(91137)
|
||||
Else
|
||||
AlzFrontBtn.Visibility = Visibility.Collapsed
|
||||
End If
|
||||
@@ -75,6 +75,7 @@ Public Class CompoDimensionUC
|
||||
m_DrawPage.sCompoName.StartsWith("PBagno") Then
|
||||
ShowInternalBtn(True)
|
||||
ShowAlzFrontBtn(bEnableAlzFront)
|
||||
m_DrawPage.MessageGrid.Visibility = Visibility.Hidden
|
||||
Else
|
||||
ShowInternalBtn(False)
|
||||
ShowAlzFrontBtn(False)
|
||||
@@ -106,8 +107,10 @@ Public Class CompoDimensionUC
|
||||
Friend Sub ShowAlzFrontBtn(ByVal value As Boolean)
|
||||
If value Then
|
||||
AlzFrontBtn.Visibility = Visibility.Visible
|
||||
m_MainWindow.m_DrawPageUC.MessageGrid.Visibility = Visibility.Hidden
|
||||
Else
|
||||
AlzFrontBtn.Visibility = Visibility.Hidden
|
||||
m_MainWindow.m_DrawPageUC.MessageGrid.Visibility = Visibility.Visible
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
@@ -24,6 +24,7 @@ Public Class CompoTrfData
|
||||
|
||||
Private Sub OkBtn_Click(sender As Object, e As RoutedEventArgs) Handles OkBtn.Click
|
||||
DialogResult = True
|
||||
SaveData()
|
||||
Close()
|
||||
End Sub
|
||||
|
||||
@@ -32,7 +33,30 @@ Public Class CompoTrfData
|
||||
Close()
|
||||
End Sub
|
||||
|
||||
Private Sub SaveData()
|
||||
WritePrivateProfileString(S_TRF, K_ORDCODE, OrdCodeTxBx.Text, m_MainWindow.GetIniFile())
|
||||
WritePrivateProfileString(S_TRF, K_ORDDESC, OrdDescTxBx.Text, m_MainWindow.GetIniFile())
|
||||
WritePrivateProfileString(S_TRF, K_PARTCODE, PartCodeTxBx.Text, m_MainWindow.GetIniFile())
|
||||
WritePrivateProfileString(S_TRF, K_MATCODE, MatCodeTxBx.Text, m_MainWindow.GetIniFile())
|
||||
WritePrivateProfileString(S_TRF, K_SURFCODE, SurfCodeTxBx.Text, m_MainWindow.GetIniFile())
|
||||
' prima di salvare lo spessore converto in mm e poi di nuovo in stringa
|
||||
Dim dVal As Double = 0
|
||||
StringToLen(ThicknessTxBx.Text, dVal)
|
||||
WritePrivateProfileString(S_TRF, K_TRFTHICKNESS, DoubleToString(dVal, 4), m_MainWindow.GetIniFile())
|
||||
End Sub
|
||||
|
||||
Friend Sub SetData(sOrdCode As String, sOrdDesc As String, sPartCode As String, sMatCode As String, sSurfCode As String, dTh As Double)
|
||||
' se verifico che non sono stati iniziliazzti i campi allora provvedo a leggere il file ini del programma
|
||||
If sOrdCode = "" And sOrdDesc = "" And sPartCode = "" And sMatCode = "" And sSurfCode = "" Then
|
||||
GetPrivateProfileString(S_TRF, K_ORDCODE, sOrdCode, sOrdCode, m_MainWindow.GetIniFile())
|
||||
GetPrivateProfileString(S_TRF, K_ORDDESC, sOrdDesc, sOrdDesc, m_MainWindow.GetIniFile())
|
||||
GetPrivateProfileString(S_TRF, K_PARTCODE, sPartCode, sPartCode, m_MainWindow.GetIniFile())
|
||||
GetPrivateProfileString(S_TRF, K_MATCODE, sMatCode, sMatCode, m_MainWindow.GetIniFile())
|
||||
GetPrivateProfileString(S_TRF, K_SURFCODE, sSurfCode, sSurfCode, m_MainWindow.GetIniFile())
|
||||
' recupero il dato dello spessore che deve essere in mm
|
||||
dTh = GetPrivateProfileDouble(S_TRF, K_TRFTHICKNESS, dTh, m_MainWindow.GetIniFile())
|
||||
End If
|
||||
' inizializzo i campi della finestra
|
||||
OrdCodeTxBx.Text = sOrdCode
|
||||
OrdDescTxBx.Text = sOrdDesc
|
||||
PartCodeTxBx.Text = sPartCode
|
||||
|
||||
@@ -64,7 +64,7 @@
|
||||
<ToggleButton Name="DimensionBtn" Grid.Column="0" Style="{DynamicResource OmagCut_YellowToggleButton}" Visibility="Collapsed"/>
|
||||
</Grid>
|
||||
|
||||
<Grid Name="VariablesGrd" Grid.Row="1" Grid.ColumnSpan="2"/>
|
||||
<Grid Name="VariablesGrd" Grid.Row="1" Grid.RowSpan="2" Grid.ColumnSpan="2"/>
|
||||
|
||||
<Grid Name="MessageGrid" Grid.Row="2" Grid.ColumnSpan="2">
|
||||
<TextBlock Name="MessageTxBl" Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||
@@ -124,7 +124,7 @@
|
||||
|
||||
<TextBlock Name="PartNumTxBl" Grid.Column="0" Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"
|
||||
TextAlignment="Right"/>
|
||||
<EgtWPFLib:EgtTextBox Name="PartNumTxBx" Grid.Column="1" Width="60"
|
||||
<EgtWPFLib:EgtTextBox Name="PartNumTxBx" Grid.Column="1" Width="60" IsLength="False"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
|
||||
</Grid>
|
||||
|
||||
@@ -283,6 +283,19 @@ Public Class DrawPageUC
|
||||
m_sCsvOrder = ""
|
||||
m_sCsvList = ""
|
||||
m_sCsvName = ""
|
||||
|
||||
' Visuliazzazione dei bottoni per modifica dei componenti
|
||||
If m_MainWindow.FrameCutBtn.IsChecked Then
|
||||
SideAngleBtn.Visibility = Visibility.Hidden
|
||||
FiloTopBtn.Visibility = Visibility.Hidden
|
||||
EngraveBtn.Visibility = Visibility.Hidden
|
||||
DripCutBtn.Visibility = Visibility.Hidden
|
||||
Else
|
||||
SideAngleBtn.Visibility = Visibility.Visible
|
||||
FiloTopBtn.Visibility = Visibility.Visible
|
||||
EngraveBtn.Visibility = Visibility.Visible
|
||||
DripCutBtn.Visibility = Visibility.Visible
|
||||
End If
|
||||
End Sub
|
||||
|
||||
' recupero il click sulla scena ed assegno il metodo a secondo della pagina aperta
|
||||
@@ -553,6 +566,7 @@ Public Class DrawPageUC
|
||||
OkBtn.IsEnabled = True
|
||||
End Sub
|
||||
|
||||
' Navigazione nelle due pagine per la selezione dei componenti da disegnare
|
||||
Friend Sub BackBtn_Click(sender As Object, e As RoutedEventArgs) Handles BackBtn.Click
|
||||
m_SceneButtons.MeasureBtn.IsChecked = False
|
||||
DrawPage_Unloaded(sender, e)
|
||||
@@ -644,10 +658,17 @@ Public Class DrawPageUC
|
||||
m_CompoDimension.GetNameEdit(j).Text = m_CVars(i - 1).m_sName
|
||||
m_CompoDimension.GetNameEdit(j).Visibility = Windows.Visibility.Visible
|
||||
m_CompoDimension.GetValueEdit(j).Text = m_CVars(i - 1).ToString()
|
||||
'Dim dVal As Double
|
||||
'StringToLen(m_CVars(i - 1).ToString(), dVal)
|
||||
'm_CompoDimension.GetValueEdit(j).Text = LenToString(dVal, 3)
|
||||
m_CompoDimension.GetValueEdit(j).Visibility = Windows.Visibility.Visible
|
||||
If m_CVars(i - 1).m_nType = 5 Then
|
||||
TryCast(m_CompoDimension.GetValueEdit(j), EgtTextBox).Keyboard = EgtTextBox.KeyboardType.Alphanumeric
|
||||
TryCast(m_CompoDimension.GetValueEdit(j), EgtTextBox).KeyboardDimension = 600
|
||||
ElseIf m_CVars(i - 1).m_nType = 4 Then
|
||||
TryCast(m_CompoDimension.GetValueEdit(j), EgtTextBox).Keyboard = EgtTextBox.KeyboardType.Calculator
|
||||
TryCast(m_CompoDimension.GetValueEdit(j), EgtTextBox).IsLength = False
|
||||
TryCast(m_CompoDimension.GetValueEdit(j), EgtTextBox).KeyboardDimension = 300
|
||||
Else
|
||||
TryCast(m_CompoDimension.GetValueEdit(j), EgtTextBox).Keyboard = EgtTextBox.KeyboardType.Calculator
|
||||
TryCast(m_CompoDimension.GetValueEdit(j), EgtTextBox).KeyboardDimension = 300
|
||||
@@ -1117,6 +1138,33 @@ Public Class DrawPageUC
|
||||
Return True
|
||||
End Function
|
||||
|
||||
Private Function MakeSectionFrameInsert(ByVal nNbr As Integer) As Boolean
|
||||
' m_MainWindow.m_ImportPageUC.LoadFrame()
|
||||
' recupero il primo layer del primo pezzo
|
||||
Dim nLayerId As Integer = EgtGetFirstLayer(EgtGetFirstPart())
|
||||
If nLayerId = GDB_ID.NULL Then Return False
|
||||
' percorso in cui salvare tempora
|
||||
Dim sTmpFile As String = m_MainWindow.GetTempDir() & "\Frame.Nge"
|
||||
If Not EgtSaveObjToFile(nLayerId, sTmpFile, NGE.BIN) Then Return False
|
||||
' Passo al contesto principale
|
||||
EgtSetCurrentContext(m_MainWindow.m_CurrentProjectPageUC.CurrentProjectScene.GetCtx())
|
||||
' Inserisco il pezzo
|
||||
If Not My.Computer.FileSystem.FileExists(sTmpFile) Then Return False
|
||||
' eseguo inserimento
|
||||
For i As Integer = 1 To nNbr
|
||||
EgtInsertFile(sTmpFile)
|
||||
' Ne recupero l'Id
|
||||
Dim nPartId As Integer = EgtGetLastPart()
|
||||
' Creo la cornice
|
||||
m_MainWindow.m_FrameCutPageUC.CreateFrame(nPartId)
|
||||
' Ricalcolo lavorazioni
|
||||
AddFrameMachinings(m_MainWindow.m_FrameCutPageUC.m_FrameMachiningUC.m_dStartTrim, m_MainWindow.m_FrameCutPageUC.m_FrameMachiningUC.m_dEndTrim)
|
||||
Next
|
||||
' Cancello il file
|
||||
My.Computer.FileSystem.DeleteFile(sTmpFile)
|
||||
Return True
|
||||
End Function
|
||||
|
||||
Private Sub OkBtn_Click(sender As Object, e As RoutedEventArgs) Handles OkBtn.Click
|
||||
m_bBackFromInternalCompo = False
|
||||
m_bInternalCompo = False
|
||||
@@ -1132,7 +1180,12 @@ Public Class DrawPageUC
|
||||
Dim InsNbr As Integer = Int32.Parse(PartNumTxBx.Text)
|
||||
' Passo al contesto principale
|
||||
'MakeInsert(InsNbr, sPartName)
|
||||
MakeMultipleInsert(InsNbr, sPartName)
|
||||
If m_MainWindow.FrameCutBtn.IsChecked Then
|
||||
MakeSectionFrameInsert(InsNbr)
|
||||
Else
|
||||
MakeMultipleInsert(InsNbr, sPartName)
|
||||
End If
|
||||
|
||||
' Aggiorno ambiente principale
|
||||
EgtZoom(ZM.ALL)
|
||||
' Elimino nome del componente precedente
|
||||
@@ -1146,7 +1199,7 @@ Public Class DrawPageUC
|
||||
' Istruzioni per chiudere ImportPageUC e aprire CadCutPageUC
|
||||
m_MainWindow.MainWindowGrid.Children.Remove(m_MainWindow.m_DrawPageUC)
|
||||
m_MainWindow.MainWindowGrid.Children.Add(m_MainWindow.m_CurrentProjectPageUC)
|
||||
m_MainWindow.m_ActivePage = MainWindow.Pages.CadCut
|
||||
m_MainWindow.m_ActivePage = If(m_MainWindow.FrameCutBtn.IsChecked, MainWindow.Pages.FrameCut, MainWindow.Pages.CadCut)
|
||||
|
||||
End Sub
|
||||
|
||||
@@ -1167,14 +1220,16 @@ Public Class DrawPageUC
|
||||
' Istruzioni per chiudere ImportPageUC e aprire CadCutPageUC
|
||||
m_MainWindow.MainWindowGrid.Children.Remove(m_MainWindow.m_DrawPageUC)
|
||||
m_MainWindow.MainWindowGrid.Children.Add(m_MainWindow.m_CurrentProjectPageUC)
|
||||
m_MainWindow.m_ActivePage = MainWindow.Pages.CadCut
|
||||
m_MainWindow.m_ActivePage = If(m_MainWindow.FrameCutBtn.IsChecked, MainWindow.Pages.FrameCut, MainWindow.Pages.CadCut)
|
||||
End Sub
|
||||
|
||||
Private Sub TrfDataBtn_Click(sender As Object, e As RoutedEventArgs) Handles TrfDataBtn.Click
|
||||
If m_bTrfData Then
|
||||
Dim DlgTrfData As New CompoTrfData(m_MainWindow)
|
||||
' carico i dati appena salvati nella pagina
|
||||
DlgTrfData.SetData(m_TrfOrderCode, m_TrfOrderDesc, m_TrfPartCode, m_TrfMatCode, m_TrfSurfCode, m_TrfThickness)
|
||||
If DlgTrfData.ShowDialog() Then
|
||||
' recupero i dati salvati nella pagina
|
||||
DlgTrfData.GetData(m_TrfOrderCode, m_TrfOrderDesc, m_TrfPartCode, m_TrfMatCode, m_TrfSurfCode, m_TrfThickness)
|
||||
End If
|
||||
ElseIf m_bCsvData Then
|
||||
@@ -1253,6 +1308,8 @@ Public Class DrawPageUC
|
||||
Private Sub EngraveBtn_Click(sender As Object, e As RoutedEventArgs) Handles EngraveBtn.Click
|
||||
m_SceneButtons.MeasureBtn.IsChecked = False
|
||||
If EngraveBtn.IsChecked Then
|
||||
' Aumento lo spazio disponibile per inserirei i parametri (tolgo spazio ad eventuali messaggi)
|
||||
Grid.SetRowSpan(VariablesGrd, 2)
|
||||
' Imposto modalità
|
||||
m_SideAngleUC.m_Mode = SideAngleUC.ModeOpt.ENGRAVE
|
||||
If m_ActiveComponentPage = Pages.CompoDimension Then
|
||||
@@ -1284,6 +1341,7 @@ Public Class DrawPageUC
|
||||
EgtSetStatus(EgtGetFirstNameInGroup(PartId, COMPO_LAYER_QUOTATURE), GDB_ST.OFF)
|
||||
EgtSetStatus(EgtGetFirstNameInGroup(PartId, COMPO_LAYER_ETICHETTE), GDB_ST.OFF)
|
||||
Else
|
||||
Grid.SetRowSpan(VariablesGrd, 2)
|
||||
VariablesGrd.Children.Remove(m_SideAngleUC)
|
||||
If m_PrevSideAnglePage = Pages.CompoDimension Then
|
||||
VariablesGrd.Children.Add(m_CompoDimension)
|
||||
@@ -1480,7 +1538,10 @@ Public Class DrawPageUC
|
||||
Case 2 ' intero
|
||||
Return m_nVal.ToString()
|
||||
Case 3 ' lunghezza
|
||||
Return DoubleToString(EgtToUiUnits(m_dVal), 4)
|
||||
'Dim dVal As Double
|
||||
'StringToLen(m_sVal, dVal)
|
||||
Return LenToString(m_dVal, 4)
|
||||
'Return DoubleToString(EgtToUiUnits(m_dVal), 4)
|
||||
Case 4 ' double
|
||||
Return DoubleToString(m_dVal, 4)
|
||||
Case 5 ' stringa
|
||||
@@ -1505,12 +1566,13 @@ Public Class DrawPageUC
|
||||
End If
|
||||
Case 3 ' lunghezza
|
||||
Dim dVal As Double
|
||||
If StringToDouble(sVal, dVal) Then
|
||||
If bConvertUnits Then
|
||||
m_dVal = EgtFromUiUnits(dVal)
|
||||
Else
|
||||
m_dVal = dVal
|
||||
End If
|
||||
If bConvertUnits Then
|
||||
StringToLen(sVal, dVal)
|
||||
m_dVal = dVal
|
||||
Return True
|
||||
Else
|
||||
StringToDouble(sVal, dVal)
|
||||
m_dVal = dVal
|
||||
Return True
|
||||
End If
|
||||
Case 4 ' double
|
||||
|
||||
@@ -39,7 +39,8 @@ Public Class FiloTopUC
|
||||
|
||||
' Imposto messaggi
|
||||
ParameterTxBl.Text = EgtMsg( MSG_IMPORTPAGEUC + 10) ' Offset
|
||||
Parameter2TxBl.Text = EgtMsg( MSG_IMPORTPAGEUC + 11) ' Affondamento
|
||||
Parameter2TxBl.Text = EgtMsg(MSG_IMPORTPAGEUC + 11) ' Affondamento
|
||||
Parameter3TxBl.Text = EgtMsg(91138)
|
||||
|
||||
If m_CallingPage = MainWindow.Pages.Draw Then
|
||||
' Imposto questa come pagina correntemente visualizzata nella drawpage
|
||||
|
||||
@@ -49,15 +49,28 @@
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="8*"/>
|
||||
<RowDefinition Height="7.25*"/>
|
||||
<RowDefinition Height="0.75*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<TextBlock Name="FilePathTxBl" Foreground="White" Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
<ListBox Name="FileListBox" Grid.Row="1" Grid.RowSpan="2" ItemTemplate="{DynamicResource DataTemplateItem}"
|
||||
ItemsSource="{Binding ItemList}"/>
|
||||
ItemsSource="{Binding ItemList}"/>
|
||||
|
||||
<Border Name="MessageBrd" Grid.Row="4" BorderThickness="0,1,0,0" BorderBrush="Gray">
|
||||
<Grid Name="FinderGrd" Grid.Row="3" Margin="0,0,8,0">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="4*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<EgtWPFLib:EgtTextBox Name="FindTxBx" Grid.Column="0"
|
||||
Style="{DynamicResource OmagCut_LeftKeyboardTextBoxNoBorder}"/>
|
||||
<Button Name="ClearFindBtn" Grid.Column="1" Style="{DynamicResource OmagCut_GradientBlueIconButton}" Margin="0,6,2,6">
|
||||
<Image Source="{DynamicResource XImg}" Style="{StaticResource OmagCut_ButtonIcon}" Width="30" />
|
||||
</Button>
|
||||
</Grid>
|
||||
|
||||
<Border Name="MessageBrd" Grid.Row="5" BorderThickness="0,1,0,0" BorderBrush="Gray">
|
||||
<TextBlock Name="MessageTxBx" TextAlignment="Center"
|
||||
Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</Border>
|
||||
@@ -101,7 +114,7 @@
|
||||
|
||||
<TextBlock Name="PartNumTxBl" Grid.Column="0" Style="{DynamicResource OmagCut_CurrProjSummeryTextBlock}"
|
||||
TextAlignment="Right"/>
|
||||
<EgtWPFLib:EgtTextBox Name="PartNumTxBx" Grid.Column="1" Width="60"
|
||||
<EgtWPFLib:EgtTextBox Name="PartNumTxBx" Grid.Column="1" Width="60" IsLength="False"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
</Grid>
|
||||
|
||||
|
||||
@@ -19,6 +19,9 @@ Public Class ImportPageUC
|
||||
Friend WithEvents ImportScene As New Scene
|
||||
Private ImportSceneHost As New System.Windows.Forms.Integration.WindowsFormsHost
|
||||
|
||||
Private m_SelListHole As New List(Of Integer)
|
||||
Private m_DeselectListHole As New List(Of Integer)
|
||||
|
||||
' Properties
|
||||
Private m_sCurrDir As String = String.Empty
|
||||
Private m_sCurrFile As String = String.Empty
|
||||
@@ -101,6 +104,8 @@ Public Class ImportPageUC
|
||||
' abilitazione Ordine e Distinta per importazione DXF
|
||||
m_bEnableOrderList = (m_MainWindow.m_PrevActivePage = MainWindow.Pages.CadCut And
|
||||
GetPrivateProfileInt(S_COMPO, K_CSVDATA, 0, m_MainWindow.GetIniFile()) <> 0)
|
||||
' rendo visibilie il pulsante di ricerca file
|
||||
FinderGrd.Visibility = Visibility.Visible
|
||||
|
||||
If m_bFirst Then
|
||||
' imposto colore di default
|
||||
@@ -196,7 +201,6 @@ Public Class ImportPageUC
|
||||
PartNumTxBx.Text = "1"
|
||||
' disabilito ok
|
||||
OkBtn.IsEnabled = False
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub LoadGridData()
|
||||
@@ -297,6 +301,36 @@ Public Class ImportPageUC
|
||||
End Select
|
||||
End Sub
|
||||
|
||||
Private Sub FindTxBx_EgtClosed(sender As Object, e As EventArgs) Handles FindTxBx.EgtClosed
|
||||
' Elimino spazi iniziali e finali
|
||||
FindTxBx.Text = FindTxBx.Text.Trim()
|
||||
' ricarico la lista dei file
|
||||
LoadCurrDir()
|
||||
Dim UpdateListFile As New List(Of IconListBoxItem)
|
||||
' Se esiste un nome
|
||||
If Not String.IsNullOrWhiteSpace(FindTxBx.Text) Then
|
||||
For Each Item As IconListBoxItem In FileListBox.ItemsSource
|
||||
If Item.Name.ToLower.Contains(FindTxBx.Text.ToLower) Then
|
||||
UpdateListFile.Add(Item)
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
If UpdateListFile.Count > 0 Then
|
||||
FileListBox.ItemsSource = UpdateListFile
|
||||
Else
|
||||
FileListBox.ItemsSource = m_MainWindow.m_ImportItemList
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub ClearFindBtn_Click() Handles ClearFindBtn.Click
|
||||
' svuoto la text
|
||||
FindTxBx.Text = ""
|
||||
' ricarico la lista dei file
|
||||
LoadCurrDir()
|
||||
' e aggiorno la lista dei file
|
||||
FileListBox.ItemsSource = m_MainWindow.m_ImportItemList
|
||||
End Sub
|
||||
|
||||
Private Function ClearView() As Boolean
|
||||
' Pulisco il DB geometrico locale
|
||||
EgtNewFile()
|
||||
@@ -315,7 +349,7 @@ Public Class ImportPageUC
|
||||
End Function
|
||||
|
||||
Private Function LoadCurrFile() As Boolean
|
||||
' Pulisco il DB geometrico locale
|
||||
' Pulisco il DB geometrico locale
|
||||
Dim bOk As Boolean = EgtNewFile()
|
||||
' Costruisco path completa del file
|
||||
Dim sPath = IO.Path.Combine(m_sCurrDir, m_sCurrFile)
|
||||
@@ -385,7 +419,7 @@ Public Class ImportPageUC
|
||||
DripCutBtn.IsEnabled = False
|
||||
DripDrillBtn.IsEnabled = False
|
||||
End If
|
||||
' altrimenti import per cornici
|
||||
' altrimenti import per cornici
|
||||
Else
|
||||
mmBtn.IsEnabled = (m_nFileType = FT.DXF)
|
||||
inchBtn.IsEnabled = (m_nFileType = FT.DXF)
|
||||
@@ -539,6 +573,8 @@ Public Class ImportPageUC
|
||||
EgtSetColor(nEntId, New Color3d(127, 63, 0))
|
||||
nEntId = EgtGetNext( nEntId)
|
||||
End While
|
||||
m_DeselectListHole.Add(nLayId)
|
||||
m_SelListHole.Remove(nLayId)
|
||||
End If
|
||||
Else
|
||||
Dim nLayId As Integer = GDB_ID.NULL
|
||||
@@ -555,6 +591,8 @@ Public Class ImportPageUC
|
||||
EgtSetColor(nEntId, New Color3d(255, 255, 255))
|
||||
nEntId = EgtGetNext( nEntId)
|
||||
End While
|
||||
m_SelListHole.Add(nLayId)
|
||||
m_DeselectListHole.Remove(nLayId)
|
||||
End If
|
||||
End If
|
||||
EgtDraw()
|
||||
@@ -562,6 +600,12 @@ Public Class ImportPageUC
|
||||
End If
|
||||
nId = EgtGetNextObjInSelWin()
|
||||
End While
|
||||
m_FiloTopUC.CreateFiloTopPreView(m_SelListHole)
|
||||
m_FiloTopUC.EraseFiloTopPreview(m_DeselectListHole)
|
||||
If m_SelListHole.Count > 0 Then
|
||||
MessageTxBx.Text = ""
|
||||
MessageBrd.Background = Brushes.Transparent
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub OnShowDistanceVector(sender As Object, vtDist As Vector3d) Handles ImportScene.OnShowDistanceVector
|
||||
@@ -809,7 +853,7 @@ Public Class ImportPageUC
|
||||
PartId = EgtGetNextPart(PartId)
|
||||
End While
|
||||
|
||||
' identificativo univoico del gruppo di pezzi, se più di un pezzo
|
||||
' identificativo univoico del gruppo di pezzi, se più di un "Repeat"
|
||||
Dim sGUICode As New List(Of String)
|
||||
|
||||
' Scrivo testi per nesting
|
||||
@@ -851,6 +895,7 @@ Public Class ImportPageUC
|
||||
EgtInsertFile(sTmpFile)
|
||||
|
||||
Dim FirstOfImport As Integer = EgtGetNextPart(nFirst2Id)
|
||||
If FirstOfImport = GDB_ID.NULL Then FirstOfImport = EgtGetFirstPart()
|
||||
Dim Index As Integer = 1
|
||||
While FirstOfImport <> GDB_ID.NULL And Index <= sGUICode.Count
|
||||
If Not String.IsNullOrEmpty(sGUICode(Index - 1)) Then
|
||||
@@ -887,6 +932,7 @@ Public Class ImportPageUC
|
||||
' Passo al pezzo successivo
|
||||
nId = EgtGetNextPart(nId)
|
||||
End While
|
||||
|
||||
' Ciclo sui pezzi inseriti
|
||||
nId = nFirstId
|
||||
While nId <> GDB_ID.NULL
|
||||
@@ -1008,6 +1054,7 @@ Public Class ImportPageUC
|
||||
|
||||
Private Sub SideAngleBtn_Click(sender As Object, e As RoutedEventArgs) Handles SideAngleBtn.Click
|
||||
If SideAngleBtn.IsChecked() Then
|
||||
FinderGrd.Visibility = Visibility.Hidden
|
||||
' Aggiungo regioni per percorsi interni
|
||||
AdjustSelectRegions()
|
||||
' Dichiaro nessuna selezione
|
||||
@@ -1030,6 +1077,7 @@ Public Class ImportPageUC
|
||||
MessageTxBx.Text = EgtMsg(MSG_DRAWPAGEUC + 6) ' Selezionare un contorno
|
||||
MessageBrd.Background = Application.Current.FindResource("OmagCut_Green")
|
||||
Else
|
||||
FinderGrd.Visibility = Visibility.Visible
|
||||
' Rimuovo regioni per percorsi interni
|
||||
RemoveSelectRegions()
|
||||
FilePathTxBl.Visibility = Windows.Visibility.Visible
|
||||
@@ -1060,6 +1108,7 @@ Public Class ImportPageUC
|
||||
|
||||
Private Sub DripCutBtn_Click(sender As Object, e As RoutedEventArgs) Handles DripCutBtn.Click
|
||||
If DripCutBtn.IsChecked() Then
|
||||
FinderGrd.Visibility = Visibility.Hidden
|
||||
' Dichiaro nessuna selezione
|
||||
m_nSelectedPart = GDB_ID.NULL
|
||||
m_nSelectedLayer = GDB_ID.NULL
|
||||
@@ -1080,6 +1129,7 @@ Public Class ImportPageUC
|
||||
MessageTxBx.Text = EgtMsg(MSG_DRAWPAGEUC + 6) ' Selezionare un contorno
|
||||
MessageBrd.Background = Application.Current.FindResource("OmagCut_Green")
|
||||
Else
|
||||
FinderGrd.Visibility = Visibility.Visible
|
||||
FilePathTxBl.Visibility = Windows.Visibility.Visible
|
||||
FileListBox.Visibility = Windows.Visibility.Visible
|
||||
LeftGrid.Children.Remove(m_SideAngleUC)
|
||||
@@ -1110,6 +1160,7 @@ Public Class ImportPageUC
|
||||
|
||||
Private Sub DripDrillBtn_Click(sender As Object, e As RoutedEventArgs) Handles DripDrillBtn.Click
|
||||
If DripDrillBtn.IsChecked() Then
|
||||
FinderGrd.Visibility = Visibility.Hidden
|
||||
' Aggiungo regioni di selezione per percorsi interni
|
||||
AdjustSelectRegions()
|
||||
' Imposto modalità fori da sotto
|
||||
@@ -1128,6 +1179,7 @@ Public Class ImportPageUC
|
||||
MessageTxBx.Text = EgtMsg(MSG_DRAWPAGEUC + 15) ' Selezionare uno o più fori
|
||||
MessageBrd.Background = Application.Current.FindResource("OmagCut_Green")
|
||||
Else
|
||||
FinderGrd.Visibility = Visibility.Visible
|
||||
' Rimuovo regioni per percorsi interni
|
||||
RemoveSelectRegions()
|
||||
FilePathTxBl.Visibility = Windows.Visibility.Visible
|
||||
@@ -1155,6 +1207,7 @@ Public Class ImportPageUC
|
||||
|
||||
Private Sub FiloTopBtn_Click(sender As Object, e As RoutedEventArgs) Handles FiloTopBtn.Click
|
||||
If FiloTopBtn.IsChecked() Then
|
||||
FinderGrd.Visibility = Visibility.Hidden
|
||||
' Aggiungo regioni per percorsi interni
|
||||
AdjustSelectRegions()
|
||||
' Dichiaro nessuna selezione
|
||||
@@ -1176,6 +1229,7 @@ Public Class ImportPageUC
|
||||
MessageTxBx.Text = EgtMsg(MSG_DRAWPAGEUC + 6) ' Selezionare un contorno interno
|
||||
MessageBrd.Background = Application.Current.FindResource("OmagCut_Green")
|
||||
Else
|
||||
FinderGrd.Visibility = Visibility.Visible
|
||||
' Rimuovo regioni per percorsi interni
|
||||
RemoveSelectRegions()
|
||||
FilePathTxBl.Visibility = Windows.Visibility.Visible
|
||||
|
||||
@@ -41,6 +41,7 @@ Public Class MainComponentPageUC
|
||||
m_MainWindow.m_DrawPageUC.FiloTopBtn.IsEnabled = False
|
||||
m_MainWindow.m_DrawPageUC.EngraveBtn.IsEnabled = False
|
||||
m_MainWindow.m_DrawPageUC.DripCutBtn.IsEnabled = False
|
||||
m_MainWindow.m_DrawPageUC.m_bBackFromInternalCompo = False
|
||||
End Sub
|
||||
|
||||
Private Function GetButton(ByVal nInd As Integer) As Button
|
||||
@@ -167,7 +168,7 @@ Public Class MainComponentPageUC
|
||||
|
||||
Private Sub Compo_Click(sender As Object, e As RoutedEventArgs) Handles Compo1.Click, Compo2.Click, Compo3.Click, Compo4.Click, Compo5.Click, Compo6.Click, Compo7.Click, Compo8.Click
|
||||
CurrentBtn = DirectCast(e.Source, Button)
|
||||
Dim CompoName As String = S_COMPO & GetIndexFromButton(CurrentBtn).ToString
|
||||
Dim CompoName As String = If(m_MainWindow.FrameCutBtn.IsChecked, S_FRAMECOMPO, S_COMPO) & GetIndexFromButton(CurrentBtn).ToString
|
||||
m_sCurrCompoFam = CompoName
|
||||
m_SecondaryComponentPage.m_sCurrCompo = String.Empty
|
||||
Dim nCount As Integer = GetPrivateProfileInt(CompoName, K_CMP_COUNT, 0, m_MainWindow.GetIniFile())
|
||||
@@ -251,13 +252,18 @@ Public Class MainComponentPageUC
|
||||
End Sub
|
||||
|
||||
Private Sub LoadPage()
|
||||
If m_MainWindow.FrameCutBtn.IsChecked Then
|
||||
LoadFramePage()
|
||||
Return
|
||||
End If
|
||||
|
||||
Dim nDeltaSecondPage As Integer = 8
|
||||
' Leggo numero di componenti presenti
|
||||
Dim nCompoNumber As Integer = GetPrivateProfileInt(S_COMPO, K_CMP_COUNT, 0, m_MainWindow.GetIniFile())
|
||||
' Calcolo indici a seconda della pagina in cui sono
|
||||
If m_bIsFirstPage Then
|
||||
ClearButton(nCompoNumber)
|
||||
nDeltaSecondPage = 0
|
||||
nDeltaSecondPage = 0
|
||||
Else
|
||||
ClearButton(nCompoNumber)
|
||||
nDeltaSecondPage = 8
|
||||
@@ -325,16 +331,86 @@ Public Class MainComponentPageUC
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub LoadFramePage()
|
||||
Dim nDeltaSecondPage As Integer = 8
|
||||
' Leggo numero di componenti presenti
|
||||
Dim nCompoNumber As Integer = GetPrivateProfileInt(S_FRAMECOMPO, K_CMP_COUNT, 0, m_MainWindow.GetIniFile())
|
||||
' Calcolo indici a seconda della pagina in cui sono
|
||||
If m_bIsFirstPage Then
|
||||
ClearButton(nCompoNumber)
|
||||
nDeltaSecondPage = 0
|
||||
Else
|
||||
ClearButton(nCompoNumber)
|
||||
nDeltaSecondPage = 8
|
||||
End If
|
||||
|
||||
' Creazione converter da String a ImageSource
|
||||
Dim ImageConverter As New ImageSourceConverter
|
||||
Dim ThicknessConverter As New ThicknessConverter
|
||||
|
||||
'Assegnazione immagine e testo ai Button
|
||||
For index As Integer = 1 To 8
|
||||
Dim CustomThickness As New Thickness(0)
|
||||
Dim nCompoName As Integer = GetPrivateProfileInt(S_FRAMECOMPO & index + nDeltaSecondPage, "Name", 0, m_MainWindow.GetIniFile())
|
||||
Dim sCompoImage As String = ""
|
||||
Dim sCompoImageSource As ImageSource
|
||||
|
||||
'verifico presenza immagine e la aggiungo
|
||||
If GetPrivateProfileString(S_FRAMECOMPO & index + nDeltaSecondPage, "Image", "", sCompoImage, m_MainWindow.GetIniFile()) <> 0 Then
|
||||
Try
|
||||
sCompoImageSource = ImageConverter.ConvertFromString(m_MainWindow.GetResourcesDir() & "\" & sCompoImage)
|
||||
GetImage(index).Height = 65
|
||||
GetImage(index).Width = 65
|
||||
GetImage(index).Source = sCompoImageSource
|
||||
Catch ex As Exception
|
||||
EgtOutLog("Error loading image " & sCompoImage)
|
||||
sCompoImage = String.Empty
|
||||
GetImage(index).Height = 0
|
||||
GetImage(index).Width = 0
|
||||
CustomThickness.Right = 0
|
||||
GetImage(index).Margin = CustomThickness
|
||||
End Try
|
||||
Else
|
||||
'Se non c'è l'immagine azzero la distanza tra testo e immagine
|
||||
CustomThickness.Right = 0
|
||||
GetImage(index).Margin = CustomThickness
|
||||
End If
|
||||
|
||||
'verifico presenza testo
|
||||
If nCompoName > 0 Then
|
||||
Dim sCompoName As String = EgtMsg(MSG_COMPONENTPAGEUC + nCompoName)
|
||||
'verifico presenza immagine
|
||||
If sCompoImage.Length > 0 Then
|
||||
'se la lunghezza del testo è maggiore di 15 lo taglio
|
||||
If sCompoName.Length > 15 Then
|
||||
sCompoName = sCompoName.Substring(0, 15)
|
||||
End If
|
||||
GetLabel(index).Text = sCompoName
|
||||
'Se ci sono sia testo che immagine imposto un margine di 10
|
||||
CustomThickness.Right = 10
|
||||
GetImage(index).Margin = CustomThickness
|
||||
Else
|
||||
'se l'immagine non c'è e il testo è maggiore di 20 lo taglio
|
||||
If sCompoName.Length > 20 Then
|
||||
sCompoName = sCompoName.Substring(0, 20)
|
||||
End If
|
||||
GetLabel(index).Text = sCompoName
|
||||
End If
|
||||
Else
|
||||
'Se non c'è testo azzero la distanza tra testo e immagine
|
||||
CustomThickness.Right = 0
|
||||
GetImage(index).Margin = CustomThickness
|
||||
End If
|
||||
|
||||
Next
|
||||
|
||||
End Sub
|
||||
|
||||
' Gestione bottone altri componenti
|
||||
Private Sub Compo9_Click(sender As Object, e As RoutedEventArgs) Handles Compo9.Click
|
||||
If m_bIsFirstPage Then
|
||||
m_bIsFirstPage = False
|
||||
LoadPage()
|
||||
'Compo9.SetValue(Grid.ColumnProperty, 1)
|
||||
'Compo9.SetValue(Grid.ColumnSpanProperty, 1)
|
||||
'ImageCompo9.Source = New System.Windows.Media.Imaging.BitmapImage(New Uri("/Resources/NumericKeyboardArrow.png", UriKind.Relative))
|
||||
'ImageCompo9.Visibility = Windows.Visibility.Visible
|
||||
'LabelCompo9.Visibility = Windows.Visibility.Hidden
|
||||
Compo9.SetValue(Grid.ColumnProperty, 0)
|
||||
Compo9.SetValue(Grid.ColumnSpanProperty, 2)
|
||||
ImageCompo9.Visibility = Windows.Visibility.Hidden
|
||||
|
||||
+29
-18
@@ -5,7 +5,7 @@
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="597.1" d:DesignWidth="255.9">
|
||||
d:DesignHeight="636.9" d:DesignWidth="255.9">
|
||||
|
||||
<!-- Definizione della Grid Laterale -->
|
||||
<Grid Name="VariablesCompoGrid" Grid.RowSpan="2">
|
||||
@@ -28,7 +28,7 @@
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="0.2*"/>
|
||||
<RowDefinition Height="4*"/>
|
||||
<RowDefinition Height="5*"/>
|
||||
<!--<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>-->
|
||||
@@ -56,7 +56,7 @@
|
||||
<TextBlock Name="Entity1" Grid.Row="1" Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||
<CheckBox Name="A1" Grid.Column="1" Grid.Row="1" Height="30" Width="40" HorizontalAlignment="Right"
|
||||
Margin="-20,0,0,0"/>
|
||||
<EgtWPFLib:EgtTextBox Name="A1TxBx" Grid.Column="2" Grid.Row="1" Width="60"
|
||||
<EgtWPFLib:EgtTextBox Name="A1TxBx" Grid.Column="2" Grid.Row="1" Width="60" IsLength="False"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="H1TxBx" Grid.Column="3" Grid.Row="1" Width="60"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
@@ -64,7 +64,7 @@
|
||||
<TextBlock Name="Entity2" Grid.Row="2" Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||
<CheckBox Name="A2" Grid.Column="1" Grid.Row="2" Height="30" Width="40" HorizontalAlignment="Right"
|
||||
Margin="-20,0,0,0"/>
|
||||
<EgtWPFLib:EgtTextBox Name="A2TxBx" Grid.Column="2" Grid.Row="2" Width="60"
|
||||
<EgtWPFLib:EgtTextBox Name="A2TxBx" Grid.Column="2" Grid.Row="2" Width="60" IsLength="False"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="H2TxBx" Grid.Column="3" Grid.Row="2" Width="60"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
@@ -72,7 +72,7 @@
|
||||
<TextBlock Name="Entity3" Grid.Row="3" Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||
<CheckBox Name="A3" Grid.Column="1" Grid.Row="3" Height="30" Width="40" HorizontalAlignment="Right"
|
||||
Margin="-20,0,0,0"/>
|
||||
<EgtWPFLib:EgtTextBox Name="A3TxBx" Grid.Column="2" Grid.Row="3" Width="60"
|
||||
<EgtWPFLib:EgtTextBox Name="A3TxBx" Grid.Column="2" Grid.Row="3" Width="60" IsLength="False"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="H3TxBx" Grid.Column="3" Grid.Row="3" Width="60"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
@@ -80,7 +80,7 @@
|
||||
<TextBlock Name="Entity4" Grid.Row="4" Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||
<CheckBox Name="A4" Grid.Column="1" Grid.Row="4" Height="30" Width="40" HorizontalAlignment="Right"
|
||||
Margin="-20,0,0,0"/>
|
||||
<EgtWPFLib:EgtTextBox Name="A4TxBx" Grid.Column="2" Grid.Row="4" Width="60"
|
||||
<EgtWPFLib:EgtTextBox Name="A4TxBx" Grid.Column="2" Grid.Row="4" Width="60" IsLength="False"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="H4TxBx" Grid.Column="3" Grid.Row="4" Width="60"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
@@ -88,7 +88,7 @@
|
||||
<TextBlock Name="Entity5" Grid.Row="5" Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||
<CheckBox Name="A5" Grid.Column="1" Grid.Row="5" Height="30" Width="40" HorizontalAlignment="Right"
|
||||
Margin="-20,0,0,0"/>
|
||||
<EgtWPFLib:EgtTextBox Name="A5TxBx" Grid.Column="2" Grid.Row="5" Width="60"
|
||||
<EgtWPFLib:EgtTextBox Name="A5TxBx" Grid.Column="2" Grid.Row="5" Width="60" IsLength="False"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="H5TxBx" Grid.Column="3" Grid.Row="5" Width="60"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
@@ -96,7 +96,7 @@
|
||||
<TextBlock Name="Entity6" Grid.Row="6" Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||
<CheckBox Name="A6" Grid.Column="1" Grid.Row="6" Height="30" Width="40" HorizontalAlignment="Right"
|
||||
Margin="-20,0,0,0"/>
|
||||
<EgtWPFLib:EgtTextBox Name="A6TxBx" Grid.Column="2" Grid.Row="6" Width="60"
|
||||
<EgtWPFLib:EgtTextBox Name="A6TxBx" Grid.Column="2" Grid.Row="6" Width="60" IsLength="False"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="H6TxBx" Grid.Column="3" Grid.Row="6" Width="60"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
@@ -104,7 +104,7 @@
|
||||
<TextBlock Name="Entity7" Grid.Row="7" Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||
<CheckBox Name="A7" Grid.Column="1" Grid.Row="7" Height="30" Width="40" HorizontalAlignment="Right"
|
||||
Margin="-20,0,0,0"/>
|
||||
<EgtWPFLib:EgtTextBox Name="A7TxBx" Grid.Column="2" Grid.Row="7" Width="60"
|
||||
<EgtWPFLib:EgtTextBox Name="A7TxBx" Grid.Column="2" Grid.Row="7" Width="60" IsLength="False"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="H7TxBx" Grid.Column="3" Grid.Row="7" Width="60"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
@@ -112,7 +112,7 @@
|
||||
<TextBlock Name="Entity8" Grid.Row="8" Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||
<CheckBox Name="A8" Grid.Column="1" Grid.Row="8" Height="30" Width="40" HorizontalAlignment="Right"
|
||||
Margin="-20,0,0,0"/>
|
||||
<EgtWPFLib:EgtTextBox Name="A8TxBx" Grid.Column="2" Grid.Row="8" Width="60"
|
||||
<EgtWPFLib:EgtTextBox Name="A8TxBx" Grid.Column="2" Grid.Row="8" Width="60" IsLength="False"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="H8TxBx" Grid.Column="3" Grid.Row="8" Width="60"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
@@ -120,7 +120,7 @@
|
||||
<TextBlock Name="Entity9" Grid.Row="9" Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||
<CheckBox Name="A9" Grid.Column="1" Grid.Row="9" Height="30" Width="40" HorizontalAlignment="Right"
|
||||
Margin="-20,0,0,0"/>
|
||||
<EgtWPFLib:EgtTextBox Name="A9TxBx" Grid.Column="2" Grid.Row="9" Width="60"
|
||||
<EgtWPFLib:EgtTextBox Name="A9TxBx" Grid.Column="2" Grid.Row="9" Width="60" IsLength="False"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="H9TxBx" Grid.Column="3" Grid.Row="9" Width="60"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
@@ -128,14 +128,14 @@
|
||||
<TextBlock Name="Entity10" Grid.Row="10" Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||
<CheckBox Name="A10" Grid.Column="1" Grid.Row="10" Height="30" Width="40" HorizontalAlignment="Right"
|
||||
Margin="-20,0,0,0"/>
|
||||
<EgtWPFLib:EgtTextBox Name="A10TxBx" Grid.Column="2" Grid.Row="10" Width="60"
|
||||
<EgtWPFLib:EgtTextBox Name="A10TxBx" Grid.Column="2" Grid.Row="10" Width="60" IsLength="False"
|
||||
Margin="0,0,0,-2"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="H10TxBx" Grid.Column="3" Grid.Row="10" Width="60"
|
||||
Margin="0,0,0,-2"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
|
||||
<Grid Grid.Column="0" Grid.Row="12" Grid.ColumnSpan="4">
|
||||
<Grid Grid.Column="0" Grid.Row="12" Grid.ColumnSpan="4" >
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1.5*"/>
|
||||
<ColumnDefinition Width="0.3*"/>
|
||||
@@ -143,10 +143,11 @@
|
||||
<ColumnDefinition Width="0.6*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="0.9*"/>
|
||||
<RowDefinition Height="0.9*"/>
|
||||
<RowDefinition Height="0.9*"/>
|
||||
<RowDefinition Height="0.9*"/>
|
||||
<RowDefinition Height="0.9*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<TextBlock Name="Parameter1TxBl" Grid.Row="0" Grid.ColumnSpan="2"
|
||||
@@ -168,7 +169,7 @@
|
||||
<UniformGrid Rows="1" Grid.Column="2" Grid.Row="1" Grid.ColumnSpan="2" Width="90" >
|
||||
<EgtWPFLib:EgtTextBox Name="Parameter2aTxBx"
|
||||
Grid.Column="2" Grid.Row="12"
|
||||
Width="40" Height="30"
|
||||
Width="40" Height="30" IsLength="False"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="Parameter2bTxBx"
|
||||
Grid.Column="3" Grid.Row="12"
|
||||
@@ -196,6 +197,16 @@
|
||||
Margin="0,0,0,-2"
|
||||
Width="85" Height="30"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
<TextBlock Name="Parameter5TxBl" Grid.Row="4" Grid.ColumnSpan="2"
|
||||
Text="Angolo"
|
||||
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
|
||||
FontSize="{DynamicResource FontSize_LowerCaseCharacter}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="Parameter5TxBx"
|
||||
Grid.Column="2" Grid.ColumnSpan="2" Grid.Row="4"
|
||||
Margin="0,0,0,-2"
|
||||
Width="85" Height="30" IsLength="False"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
|
||||
</Grid>
|
||||
|
||||
<!--<TextBlock Name="Parameter1TxBl" Grid.Row="11" Text="Offset"
|
||||
|
||||
@@ -36,6 +36,7 @@ Public Class SideAngleUC
|
||||
Friend m_dDripDepth As Double = 10
|
||||
Friend m_dEngraveDepth2 As Double = 15
|
||||
Friend m_dDripShort As Double = 0
|
||||
Friend m_dEngraveAngle As Double = 0
|
||||
|
||||
Private CurrEntityDrip As DripEntity
|
||||
|
||||
@@ -106,6 +107,9 @@ Public Class SideAngleUC
|
||||
' Accorciamento
|
||||
Parameter4TxBl.Visibility = Windows.Visibility.Hidden
|
||||
Parameter4TxBx.Visibility = Windows.Visibility.Hidden
|
||||
' Angolo
|
||||
Parameter5TxBl.Visibility = Windows.Visibility.Hidden
|
||||
Parameter5TxBx.Visibility = Windows.Visibility.Hidden
|
||||
Else
|
||||
' se aggiungo gli ENGRAVE e i DRIP
|
||||
|
||||
@@ -117,10 +121,12 @@ Public Class SideAngleUC
|
||||
GetAngleTxBxFromIndex(Index).Visibility = Windows.Visibility.Visible
|
||||
GetHeelTxBxFromIndex(Index).Visibility = Windows.Visibility.Visible
|
||||
Next
|
||||
|
||||
' Offset
|
||||
Parameter1TxBl.Visibility = Windows.Visibility.Visible
|
||||
Parameter1TxBx.Visibility = Windows.Visibility.Visible
|
||||
Parameter2TxBl.Visibility = Windows.Visibility.Visible
|
||||
|
||||
' Offset2
|
||||
If m_Mode <> ModeOpt.ENGRAVE Then
|
||||
Parameter2TxBx.Visibility = Windows.Visibility.Visible
|
||||
@@ -131,6 +137,7 @@ Public Class SideAngleUC
|
||||
Parameter2aTxBx.Visibility = Windows.Visibility.Visible
|
||||
Parameter2bTxBx.Visibility = Windows.Visibility.Visible
|
||||
End If
|
||||
|
||||
' Affondamento
|
||||
Parameter3TxBl.Visibility = Windows.Visibility.Visible
|
||||
Parameter3TxBx.Visibility = Windows.Visibility.Visible
|
||||
@@ -146,6 +153,17 @@ Public Class SideAngleUC
|
||||
Parameter4TxBx.Visibility = Windows.Visibility.Hidden
|
||||
End If
|
||||
|
||||
' Angolo
|
||||
If m_Mode = ModeOpt.ENGRAVE Then
|
||||
' modifico il nome del messaggio
|
||||
Parameter5TxBl.Text = EgtMsg(MSG_IMPORTPAGEUC + 9) ' Angolo
|
||||
Parameter5TxBl.Visibility = Windows.Visibility.Visible
|
||||
Parameter5TxBx.Visibility = Windows.Visibility.Visible
|
||||
Else
|
||||
Parameter5TxBl.Visibility = Windows.Visibility.Hidden
|
||||
Parameter5TxBx.Visibility = Windows.Visibility.Hidden
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
' Gestisco Checkbox e nomi in base al numero di lati inclinabili
|
||||
@@ -167,11 +185,13 @@ Public Class SideAngleUC
|
||||
m_dDripOffset2 = GetPrivateProfileDouble( S_SIDES, K_ENGRAVEOFFSET2, 0, m_MainWindow.GetIniFile())
|
||||
m_dDripDepth = GetPrivateProfileDouble( S_SIDES, K_ENGRAVEDEPTH, 10, m_MainWindow.GetIniFile())
|
||||
m_dEngraveDepth2 = GetPrivateProfileDouble(S_SIDES, K_ENGRAVEDEPTH2, 0, m_MainWindow.GetIniFile())
|
||||
Parameter1TxBx.Text = LenToString( m_dDripOffset, 3)
|
||||
m_dEngraveAngle = GetPrivateProfileDouble(S_SIDES, K_ENGRAVEANGLE, 0, m_MainWindow.GetIniFile())
|
||||
Parameter1TxBx.Text = LenToString(m_dDripOffset, 3)
|
||||
Parameter2aTxBx.Text = m_nEngrNbr2.ToString()
|
||||
Parameter2bTxBx.Text = LenToString( m_dDripOffset2, 3)
|
||||
Parameter3TxBx.Text = LenToString( m_dDripDepth, 3)
|
||||
Parameter4TxBx.Text = LenToString(m_dEngraveDepth2, 3)
|
||||
Parameter5TxBx.Text = DoubleToString(m_dEngraveAngle, 3)
|
||||
End If
|
||||
|
||||
' Aggiorno visualizzazione
|
||||
@@ -501,6 +521,7 @@ Public Class SideAngleUC
|
||||
WritePrivateProfileString(S_SIDES, K_ENGRAVEDEPTH, LenToString(m_dDripDepth, 3), m_MainWindow.GetIniFile())
|
||||
WritePrivateProfileString(S_SIDES, K_ENGRAVEDEPTH2, LenToString(m_dEngraveDepth2, 3), m_MainWindow.GetIniFile())
|
||||
'WritePrivateProfileString( S_SIDES, K_ENGRAVESHORT, DoubleToString( m_dDripShort, 3), m_MainWindow.GetIniFile())
|
||||
WritePrivateProfileString(S_SIDES, K_ENGRAVEANGLE, LenToString(m_dEngraveAngle, 3), m_MainWindow.GetIniFile())
|
||||
End If
|
||||
|
||||
EgtDraw()
|
||||
@@ -862,6 +883,8 @@ Public Class SideAngleUC
|
||||
End While
|
||||
End If
|
||||
|
||||
Dim ListEngraveSideAng As New List(Of Integer)
|
||||
|
||||
If m_Mode = ModeOpt.DRIP Then
|
||||
' Esplodo nelle curve componenti
|
||||
nCrvId = EgtGetFirstInGroup(DripLayer)
|
||||
@@ -881,15 +904,70 @@ Public Class SideAngleUC
|
||||
End While
|
||||
Else
|
||||
' Assegno colore e attributi
|
||||
Dim nInd As Integer = 0
|
||||
nCrvId = EgtGetFirstInGroup(DripLayer)
|
||||
While nCrvId <> GDB_ID.NULL
|
||||
EgtSetColor(nCrvId, COL_MCH_DRIPCUT())
|
||||
'EgtSetInfo(nCrvId, INFO_DEPTH, m_dDripDepth)
|
||||
EgtSetInfo(nCrvId, INFO_STRICT, If(m_dDripShort > EPS_SMALL, "3", "0"))
|
||||
If nInd = 0 Then
|
||||
' solo se m_dEngraveAngle > 0
|
||||
If Math.Abs(m_dEngraveAngle) > EPS_ANG_SMALL Then
|
||||
' salvo l'Id della curva che deve essere manipolato separatamente
|
||||
ListEngraveSideAng.Add(nCrvId)
|
||||
Else
|
||||
EgtRemoveInfo(nCrvId, INFO_SIDE_ANGLE)
|
||||
EgtModifyCurveThickness(nCrvId, -m_dEngraveDepth2)
|
||||
End If
|
||||
Else
|
||||
If nInd = m_nEngrNbr2 Then
|
||||
nInd = -1
|
||||
End If
|
||||
EgtModifyCurveThickness(nCrvId, -m_dEngraveDepth2)
|
||||
End If
|
||||
nInd = nInd + 1
|
||||
If nInd > m_nEngrNbr2 Then nInd = 0
|
||||
nCrvId = EgtGetNext(nCrvId)
|
||||
End While
|
||||
End If
|
||||
SplitJointedSideEngrave(ListEngraveSideAng)
|
||||
End Sub
|
||||
|
||||
Private Sub SplitJointedSideEngrave(ListEngraveSideAngId As List(Of Integer))
|
||||
For Each nCrvId As Integer In ListEngraveSideAngId
|
||||
' eventualmente separo il taglio inclinato
|
||||
Dim dUs, dUe As Double
|
||||
EgtCurveDomain(nCrvId, dUs, dUe)
|
||||
Dim dU As Double = dUs
|
||||
While dU < dUe ' + EPS_ZERO
|
||||
Dim ptCurr As Point3d
|
||||
EgtAtParamPoint(nCrvId, dU + 1, nCrvId, ptCurr)
|
||||
' separa la curva in questo punto
|
||||
Dim nNewCurvId As Integer = GDB_ID.NULL
|
||||
If dUe > 1 Then
|
||||
nNewCurvId = EgtSplitCurveAtPoint(nCrvId, ptCurr, GDB_RT.LOC)
|
||||
Else
|
||||
nNewCurvId = nCrvId
|
||||
End If
|
||||
EgtSetColor(nCrvId, COL_MCH_ONENGRAVE_ANG())
|
||||
EgtSetInfo(nCrvId, INFO_SIDE_ANGLE, m_dEngraveAngle)
|
||||
' recupero il vettore di estrusione della curva e la direzione della curva
|
||||
Dim vtAux As Vector3d
|
||||
EgtStartVector(nCrvId, vtAux)
|
||||
Dim vtExtrusion As Vector3d
|
||||
EgtCurveExtrusion(nCrvId, vtExtrusion)
|
||||
' ruoto il vetottore nella nuova direzione
|
||||
vtExtrusion.Rotate(vtAux, -m_dEngraveAngle)
|
||||
' assegno il vettore di estrusione nella nuova direzione indicata (segno negativo perchè dentro il pezzo)
|
||||
EgtModifyCurveExtrusion(nCrvId, vtExtrusion)
|
||||
Dim ExtendFactor As Double = New Vector3d(0, 0, 1) * vtExtrusion
|
||||
EgtModifyCurveThickness(nCrvId, -m_dDripDepth / ExtendFactor)
|
||||
If dUe = 1 Then Exit While
|
||||
nCrvId = nNewCurvId
|
||||
' aggiorno i valori del dominio della curva che rimane
|
||||
EgtCurveDomain(nCrvId, dUs, dUe)
|
||||
End While
|
||||
Next
|
||||
End Sub
|
||||
|
||||
Private Sub PrevBtn_Click(sender As Object, e As RoutedEventArgs) Handles PrevBtn.Click
|
||||
@@ -1336,6 +1414,15 @@ Public Class SideAngleUC
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub Parameter5TxBx_EgtClosed(sender As Object, e As EventArgs) Handles Parameter5TxBx.EgtClosed
|
||||
If m_Mode = ModeOpt.ENGRAVE Then
|
||||
' Recupero il valore
|
||||
StringToDouble(Parameter5TxBx.Text, m_dEngraveAngle)
|
||||
' Creo le geometrie dei gocciolatoi
|
||||
RefreshSideAngleText()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Friend Sub ReLoadSideAnglePage()
|
||||
SideAngleUC_Loaded(Me, New RoutedEventArgs)
|
||||
End Sub
|
||||
|
||||
+158
-11
@@ -1,16 +1,48 @@
|
||||
<ResourceDictionary
|
||||
x:Class="EgtDictionary"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:Project="clr-namespace:OmagCUT"
|
||||
xmlns:ControlExtensions="clr-namespace:OmagCUT.ControlExtensions">
|
||||
<ResourceDictionary x:Class="EgtDictionary"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:Project="clr-namespace:OmagCUT"
|
||||
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
|
||||
xmlns:EgtPHOTOLib="clr-namespace:EgtPHOTOLib;assembly=EgtPHOTOLib"
|
||||
xmlns:EgtFloating="clr-namespace:EgtWPFLib5.EgtFloating;assembly=EgtWPFLib5"
|
||||
xmlns:ControlExtensions="clr-namespace:OmagCUT.ControlExtensions">
|
||||
|
||||
<!--Template che permette di andare a capo-->
|
||||
<EgtWPFLib5:StatusBarVM x:Key="StatusBarVM"/>
|
||||
<EgtWPFLib5:ShowPanelVM x:Key="ShowPanelVM"/>
|
||||
<EgtWPFLib5:ViewPanelVM x:Key="ViewPanelVM"/>
|
||||
<EgtWPFLib5:InstrumentPanelVM x:Key="InstrumentPanelVM"/>
|
||||
|
||||
<EgtPHOTOLib:ProjectSlabVM x:Key="ProjectSlabVM"/>
|
||||
<EgtPHOTOLib:OptionPanelSlabVM x:Key="OptionPanelSlabVM"/>
|
||||
<EgtPHOTOLib:ListPageSlabVM x:Key="ListPageSlabVM"/>
|
||||
<EgtPHOTOLib:DetailPageSlabVM x:Key="DetailPageSlabVM"/>
|
||||
<EgtPHOTOLib:SearchPanelSlabVM x:Key="SearchPanelSlabVM"/>
|
||||
<EgtPHOTOLib:MyInstrumentPanelSlabVM x:Key="MyInstrumentPanelSlabVM"/>
|
||||
|
||||
<!--Colori predefiniti-->
|
||||
<SolidColorBrush x:Key="Omag_Blue" Color="#FF095CA8" />
|
||||
<SolidColorBrush x:Key="Omag_Yellow" Color="#FFFFCE5B" />
|
||||
<SolidColorBrush x:Key="Omag_Red" Color="Red" />
|
||||
<SolidColorBrush x:Key="Omag_Green" Color="LawnGreen" />
|
||||
<SolidColorBrush x:Key="Omag_VeryLightGray" Color="#FFF2F2F2" />
|
||||
<SolidColorBrush x:Key="Omag_LightGray" Color="LightGray" />
|
||||
<SolidColorBrush x:Key="Omag_Gray" Color="#FF9E9E9E" />
|
||||
<SolidColorBrush x:Key="Omag_DarkGray" Color="#FF444444" />
|
||||
<SolidColorBrush x:Key="Omag_White" Color="#FFFFFFFF" />
|
||||
<SolidColorBrush x:Key="Omag_Black" Color="#FF000000" />
|
||||
|
||||
<SolidColorBrush x:Key="EgaltechBlue1" Color="#FF095CA8" />
|
||||
<SolidColorBrush x:Key="EgaltechWhite" Color="#FFFFFFFF" />
|
||||
|
||||
<!--Template che permette di andare a capo-->
|
||||
<DataTemplate x:Key="Button_DataTemplate_Wrap">
|
||||
<TextBlock TextWrapping="Wrap" Text="{Binding}"/>
|
||||
</DataTemplate>
|
||||
|
||||
<!--ButtonBase-->
|
||||
<!-- ______________________________________________________________________________________________________________________________________________ -->
|
||||
|
||||
<!-- Button Style -->
|
||||
|
||||
<Style TargetType="{x:Type Button}">
|
||||
<Setter Property="FocusVisualStyle">
|
||||
<Setter.Value>
|
||||
@@ -71,7 +103,44 @@
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<!-- ______________________________________________________________________________________________________________________ -->
|
||||
<!--Template che permette di andare a capo-->
|
||||
<DataTemplate x:Key="WrapButton_DataTemplate">
|
||||
<TextBlock TextWrapping="WrapWithOverflow" Text="{Binding}"/>
|
||||
</DataTemplate>
|
||||
|
||||
<Style x:Key="ToolBar_Button" TargetType="{x:Type Button}" BasedOn="{StaticResource {x:Type Button}}">
|
||||
<Setter Property="Height" Value="30"/>
|
||||
<Setter Property="Width" Value="30"/>
|
||||
</Style>
|
||||
<Style x:Key="ToolBar_TextButton" TargetType="{x:Type Button}" BasedOn="{StaticResource {x:Type Button}}">
|
||||
<Setter Property="Height" Value="30"/>
|
||||
<Setter Property="Width" Value="80"/>
|
||||
</Style>
|
||||
<Style x:Key="OptionPanel_Button" TargetType="{x:Type Button}" BasedOn="{StaticResource {x:Type Button}}">
|
||||
<Setter Property="Height" Value="60"/>
|
||||
<Setter Property="Width" Value="60"/>
|
||||
</Style>
|
||||
<Style x:Key="OptionPanel_TextButton" TargetType="{x:Type Button}" BasedOn="{StaticResource {x:Type Button}}">
|
||||
<Setter Property="Height" Value="30"/>
|
||||
</Style>
|
||||
<Style x:Key="OptionPanel_TextWrapButton" TargetType="{x:Type Button}" BasedOn="{StaticResource {x:Type Button}}">
|
||||
<Setter Property="ContentTemplate" Value="{StaticResource WrapButton_DataTemplate}" />
|
||||
<Setter Property="TextBlock.TextAlignment" Value="Center"/>
|
||||
<Setter Property="Height" Value="45"/>
|
||||
</Style>
|
||||
<Style x:Key="OptionPanel_NestingButton" TargetType="{x:Type Button}" BasedOn="{StaticResource {x:Type Button}}">
|
||||
<Setter Property="Height" Value="60"/>
|
||||
<Setter Property="Width" Value="60"/>
|
||||
</Style>
|
||||
<Style x:Key="CompoWindow_Button" TargetType="{x:Type Button}" BasedOn="{StaticResource {x:Type Button}}">
|
||||
<Setter Property="Height" Value="40"/>
|
||||
</Style>
|
||||
<Style x:Key="EgtWPFLib5_InputButton" TargetType="{x:Type Button}" BasedOn="{StaticResource {x:Type Button}}">
|
||||
<Setter Property="Height" Value="30"/>
|
||||
<Setter Property="Width" Value="60"/>
|
||||
</Style>
|
||||
|
||||
<!-- ______________________________________________________________________________________________________________________ -->
|
||||
|
||||
<!--Template che permette di andare a capo-->
|
||||
<DataTemplate x:Key="CheckBox_DataTemplate_Wrap">
|
||||
@@ -375,7 +444,59 @@
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<!-- ______________________________________________________________________________________________________________________ -->
|
||||
<Style x:Key="ToolBar_ToggleButton" TargetType="{x:Type ToggleButton}" BasedOn="{StaticResource {x:Type ToggleButton}}">
|
||||
<Setter Property="Height" Value="30"/>
|
||||
<Setter Property="Width" Value="30"/>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="ToolBar_TextToggleButton" TargetType="{x:Type ToggleButton}" BasedOn="{StaticResource {x:Type ToggleButton}}">
|
||||
<Setter Property="Height" Value="30"/>
|
||||
<Setter Property="Width" Value="70"/>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="OptionPanel_ToggleButton" TargetType="{x:Type ToggleButton}" BasedOn="{StaticResource {x:Type ToggleButton}}">
|
||||
<Setter Property="Height" Value="30"/>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="OptionPanel_NestingToggleButton" TargetType="{x:Type ToggleButton}" BasedOn="{StaticResource {x:Type ToggleButton}}">
|
||||
<Setter Property="Height" Value="60"/>
|
||||
<Setter Property="Width" Value="60"/>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="CompoWindow_ToggleButton" TargetType="{x:Type ToggleButton}" BasedOn="{StaticResource {x:Type ToggleButton}}">
|
||||
<Setter Property="Height" Value="40"/>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="CompoWindow_WrapToggleButton" TargetType="{x:Type ToggleButton}" BasedOn="{StaticResource {x:Type ToggleButton}}">
|
||||
<Setter Property="ContentTemplate" Value="{StaticResource WrapButton_DataTemplate}" />
|
||||
<Setter Property="TextBlock.TextAlignment" Value="Center" />
|
||||
<Setter Property="Height" Value="40"/>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="Option_ColorButton" TargetType="{x:Type Button}" BasedOn="{StaticResource {x:Type Button}}">
|
||||
<Setter Property="Padding" Value="5"/>
|
||||
<Setter Property="HorizontalContentAlignment" Value="Center"/>
|
||||
<Setter Property="VerticalContentAlignment" Value="Center"/>
|
||||
<Setter Property="TextBlock.TextAlignment" Value="Center"/>
|
||||
<Style.Triggers>
|
||||
<Trigger Property="IsMouseOver" Value="True">
|
||||
<Setter Property="Background" Value="#FFB8C3CD"/>
|
||||
</Trigger>
|
||||
<Trigger Property="IsPressed" Value="True">
|
||||
<Setter Property="OpacityMask" Value="#33FF0000"/>
|
||||
</Trigger>
|
||||
<Trigger Property="ToggleButton.IsChecked" Value="True">
|
||||
<Setter Property="Background" Value="Transparent"/>
|
||||
</Trigger>
|
||||
<Trigger Property="IsEnabled" Value="False">
|
||||
<Setter Property="Background" Value="#FFF4F4F4"/>
|
||||
<Setter Property="BorderBrush" Value="#FFADB2B5"/>
|
||||
<Setter Property="TextElement.Foreground" Value="#FF838383"/>
|
||||
</Trigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
|
||||
<!-- ______________________________________________________________________________________________________________________ -->
|
||||
|
||||
<!--TreeViewBase-->
|
||||
<!--Style e colori della freccia di espansione, necessari per modificare il ContainerItemStyle perchè contiene riferimenti ad essi-->
|
||||
@@ -431,6 +552,32 @@
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<!-- ______________________________________________________________________________________________________________________ -->
|
||||
<!-- ______________________________________________________________________________________________________________________________________________ -->
|
||||
|
||||
<!-- EgtCustomWindow -->
|
||||
|
||||
<Style TargetType="{x:Type EgtWPFLib5:EgtCustomWindow}" BasedOn="{StaticResource {x:Type EgtWPFLib5:EgtCustomWindow}}">
|
||||
<Setter Property="TitleBarHeight" Value="32"/>
|
||||
<Setter Property="TitleBarBrush" Value="{StaticResource Omag_LightGray}"/>
|
||||
<Setter Property="BorderBrush" Value="{StaticResource Omag_Gray}"/>
|
||||
</Style>
|
||||
|
||||
<!-- ______________________________________________________________________________________________________________________________________________ -->
|
||||
|
||||
<!-- EgtFloatingPanel -->
|
||||
|
||||
<Style x:Key="ToolBar_EgtFloatingPanel" TargetType="{x:Type EgtFloating:EgtFloatingPanel}" BasedOn="{StaticResource {x:Type EgtFloating:EgtFloatingPanel}}">
|
||||
<Setter Property="Background" Value="{StaticResource Omag_Gray}"/>
|
||||
<Setter Property="BorderBrush" Value="{StaticResource Omag_Gray}"/>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="Option_EgtFloatingPanel" TargetType="{x:Type EgtFloating:EgtFloatingPanel}" BasedOn="{StaticResource {x:Type EgtFloating:EgtFloatingPanel}}">
|
||||
<Setter Property="IsToolBar" Value="False"/>
|
||||
<Setter Property="TitleBarOrientation" Value="Vertical"/>
|
||||
<Setter Property="Background" Value="{StaticResource Omag_Gray}"/>
|
||||
<Setter Property="BorderBrush" Value="{StaticResource Omag_Gray}"/>
|
||||
</Style>
|
||||
|
||||
<!-- ______________________________________________________________________________________________________________________ -->
|
||||
|
||||
</ResourceDictionary>
|
||||
|
||||
+126
-104
@@ -7,124 +7,146 @@
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="853.3" d:DesignWidth="1280">
|
||||
|
||||
<!-- Definizione della FrameCutPage -->
|
||||
<Grid Name="FrameCutPageGrid" >
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="3*"/>
|
||||
<ColumnDefinition Width="12*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="8*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<!-- Definizione della Grid superiore -->
|
||||
<Grid Grid.Column="1" Grid.Row="0" >
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="4*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Button Name="PhotoBtn" Grid.Column="0" Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}">
|
||||
<Image Source="{DynamicResource PhotoImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="RawPartBtn" Grid.Column="1" Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}">
|
||||
<Image Source="{DynamicResource RawPartImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
<ToggleButton Name="MachiningBtn" Grid.Column="4" Style="{DynamicResource OmagCut_RightGrayYellowIconToggleButton}">
|
||||
<Image Source="{DynamicResource FrameMachiningImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
</ToggleButton>
|
||||
|
||||
</Grid>
|
||||
|
||||
<Grid Name="LeftGrid" Grid.Row="1">
|
||||
<Grid.RowDefinitions>
|
||||
<!-- Definizione della FrameCutPage -->
|
||||
<Grid Name="FrameCutPageGrid" >
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="3*"/>
|
||||
<ColumnDefinition Width="12*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="7*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<Grid Grid.Row="1">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="0.6*"/>
|
||||
<RowDefinition Height="0.8*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.8*"/>
|
||||
<RowDefinition Height="2.5*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<RowDefinition Height="8*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<ComboBox Name="AlongAxCmBx" Grid.Row="0" Grid.ColumnSpan="3" Style="{StaticResource OmagCut_ComboBox}"
|
||||
Width="200" MaxDropDownHeight="300">
|
||||
<ComboBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding}" Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</DataTemplate>
|
||||
</ComboBox.ItemTemplate>
|
||||
</ComboBox>
|
||||
<!-- Definizione della Grid superiore -->
|
||||
<Grid Grid.Column="1" Grid.Row="0" >
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="4*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<UniformGrid Grid.Column="0" Grid.Row="1" Grid.ColumnSpan="3" Columns="2" >
|
||||
<Button Name="SelSectionBtn"
|
||||
Style="{DynamicResource OmagCut_YellowGradientYellowIconButton}">
|
||||
<Button Name="PhotoBtn" Grid.Column="0" Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}">
|
||||
<Image Source="{DynamicResource PhotoImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="RawPartBtn" Grid.Column="1" Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}">
|
||||
<Image Source="{DynamicResource RawPartImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
|
||||
<Button Name="CompoBtn" Grid.Column="2" Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}">
|
||||
<Image Source="{DynamicResource DrawImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
|
||||
<Button Name="SelSectionBtn" Grid.Column="3" Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}">
|
||||
<Image Source="{DynamicResource Sezione-corniceImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
|
||||
<Grid>
|
||||
<Button Name="SelGuideBtn"
|
||||
Style="{DynamicResource OmagCut_YellowTextButton}"/>
|
||||
<UniformGrid Name="ArcGrid" Grid.Column="0" Grid.Row="1" Grid.ColumnSpan="3" Columns="2" >
|
||||
<TextBlock Name="ArcRadTxBl" Grid.Row="2" Grid.ColumnSpan="2"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="ArcRadTxBx" Grid.Column="2" Grid.Row="2" Width="50"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
<TextBlock Name="ArcAngTxBl" Grid.Row="3" Grid.ColumnSpan="2"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="ArcAngTxBx" Grid.Column="2" Grid.Row="3" Width="50"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
</UniformGrid>
|
||||
</Grid>
|
||||
</UniformGrid>
|
||||
|
||||
<TextBlock Name="OffsZTxBl" Grid.Row="2" Grid.ColumnSpan="2"
|
||||
<ToggleButton Name="MachiningBtn" Grid.Column="4" Style="{DynamicResource OmagCut_RightGrayYellowIconToggleButton}">
|
||||
<Image Source="{DynamicResource FrameMachiningImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
</ToggleButton>
|
||||
|
||||
</Grid>
|
||||
|
||||
<Grid Name="LeftGrid" Grid.Row="1">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="7*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<Grid Grid.Row="1">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="0.6*"/>
|
||||
<RowDefinition Height="0.8*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.8*"/>
|
||||
<RowDefinition Height="0.8*"/>
|
||||
<RowDefinition Height="1.7*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<ComboBox Name="AlongAxCmBx" Grid.Row="0" Grid.ColumnSpan="3" Style="{StaticResource OmagCut_ComboBox}"
|
||||
Width="200" MaxDropDownHeight="300">
|
||||
<ComboBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding}" Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</DataTemplate>
|
||||
</ComboBox.ItemTemplate>
|
||||
</ComboBox>
|
||||
|
||||
<UniformGrid Grid.Column="0" Grid.Row="1" Grid.ColumnSpan="3" Columns="2" >
|
||||
<!--<Button Name="SelSectionBtn"
|
||||
Style="{DynamicResource OmagCut_YellowGradientYellowIconButton}">
|
||||
<Image Source="{DynamicResource Sezione-corniceImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||
</Button>-->
|
||||
|
||||
<Grid>
|
||||
<Button Name="SelGuideBtn" Style="{DynamicResource OmagCut_YellowTextButton}"/>
|
||||
<UniformGrid Name="ArcGrid" Grid.Column="0" Grid.Row="1" Grid.ColumnSpan="3" Columns="2" >
|
||||
<TextBlock Name="ArcRadTxBl" Grid.Row="2" Grid.ColumnSpan="2"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="ArcRadTxBx" Grid.Column="2" Grid.Row="2" Width="50"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
<TextBlock Name="ArcAngTxBl" Grid.Row="3" Grid.ColumnSpan="2"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="ArcAngTxBx" Grid.Column="2" Grid.Row="3" Width="50"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
</UniformGrid>
|
||||
</Grid>
|
||||
</UniformGrid>
|
||||
|
||||
<TextBlock Name="OffsZTxBl" Grid.Row="2" Grid.ColumnSpan="2"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="OffsZTxBx" Grid.Column="2" Grid.Row="2" Width="50"
|
||||
<EgtWPFLib:EgtTextBox Name="OffsZTxBx" Grid.Column="2" Grid.Row="2" Width="50"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
|
||||
<TextBlock Name="OffsXyTxBl" Grid.Row="3" Grid.ColumnSpan="2"
|
||||
<TextBlock Name="OffsXyTxBl" Grid.Row="3" Grid.ColumnSpan="2"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="OffsXyTxBx" Grid.Column="2" Grid.Row="3" Width="50"
|
||||
<EgtWPFLib:EgtTextBox Name="OffsXyTxBx" Grid.Column="2" Grid.Row="3" Width="50"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
|
||||
<TextBlock Name="OffsYyTxBl" Grid.Row="4" Grid.ColumnSpan="2"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="OffsYyTxBx" Grid.Column="2" Grid.Row="4" Width="50"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
<TextBlock Name="OffsYyTxBl" Grid.Row="4" Grid.ColumnSpan="2"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="OffsYyTxBx" Grid.Column="2" Grid.Row="4" Width="50"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
|
||||
<UniformGrid Grid.Column="0" Grid.Row="5" Grid.ColumnSpan="3" Columns="2" >
|
||||
<Button Name="MirrorPartBtn"
|
||||
<TextBlock Name="OffsXInteryTxBl" Grid.Row="5" Grid.ColumnSpan="2"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="OffsXInteryTxBx" Grid.Column="2" Grid.Row="5" Width="50"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
|
||||
<UniformGrid Grid.Column="0" Grid.Row="7" Grid.ColumnSpan="3" Columns="2" >
|
||||
<Button Name="MirrorPartBtn"
|
||||
Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}">
|
||||
<Image Source="{DynamicResource SpecchiaImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="RemovePartBtn"
|
||||
</Button>
|
||||
<Button Name="RemovePartBtn"
|
||||
Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}">
|
||||
<Image Source="{DynamicResource Rimuovi_eliminaImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
</UniformGrid>
|
||||
</Button>
|
||||
</UniformGrid>
|
||||
|
||||
<!--<TextBlock Name="SawRoughingTxBl" Grid.Row="4" Grid.ColumnSpan="3"
|
||||
<!--<UniformGrid Grid.Column="0" Grid.Row="6" Grid.ColumnSpan="3" Columns="2" >
|
||||
<Button Name="CompoBtn"
|
||||
Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}">
|
||||
<Image Source="{DynamicResource DrawImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
</UniformGrid>-->
|
||||
|
||||
<!--<TextBlock Name="SawRoughingTxBl" Grid.Row="4" Grid.ColumnSpan="3"
|
||||
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||
|
||||
<ComboBox Name="SawRoughingCmBx" Grid.Row="5" Grid.ColumnSpan="3" Style="{StaticResource OmagCut_ComboBox}"
|
||||
@@ -182,10 +204,10 @@
|
||||
</ComboBox.ItemTemplate>
|
||||
</ComboBox>-->
|
||||
|
||||
</Grid>
|
||||
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
||||
</Grid>
|
||||
|
||||
</UserControl>
|
||||
|
||||
@@ -52,6 +52,8 @@ Public Class FrameCutPageUC
|
||||
OffsXyTxBx.Text = LenToString(dOffsXY, 3)
|
||||
Dim dOffsYY As Double = GetPrivateProfileDouble(S_FRAME, K_OFFSYY, 5, m_MainWindow.GetIniFile())
|
||||
OffsYyTxBx.Text = LenToString(dOffsYY, 3)
|
||||
Dim dOffsXInterY As Double = GetPrivateProfileDouble(S_FRAME, K_OFFSXINTERY, 5, m_MainWindow.GetIniFile())
|
||||
OffsXInteryTxBx.Text = LenToString(dOffsXInterY, 3)
|
||||
|
||||
' Imposto i messaggi letti dal file dei messaggi
|
||||
m_AlongAx.Add(EgtMsg(MSG_FRAMECUTPAGEUC + 1)) 'Lungo X
|
||||
@@ -70,6 +72,7 @@ Public Class FrameCutPageUC
|
||||
OffsZTxBl.Text = EgtMsg(MSG_FRAMECUTPAGEUC + 8) 'Distanza sopra
|
||||
OffsXyTxBl.Text = EgtMsg(MSG_FRAMECUTPAGEUC + 9) 'Distanza inizio
|
||||
OffsYyTxBl.Text = EgtMsg(MSG_FRAMECUTPAGEUC + 22) 'Distanza Y
|
||||
OffsXInteryTxBl.Text = EgtMsg(90645) 'Interasse
|
||||
End Sub
|
||||
|
||||
Private Sub FrameCutPage_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded
|
||||
@@ -81,6 +84,12 @@ Public Class FrameCutPageUC
|
||||
m_ProjectMgr.CSVBtn.Visibility = Windows.Visibility.Hidden
|
||||
m_ProjectMgr.VeinMatchingBtn.Visibility = Windows.Visibility.Hidden
|
||||
m_ProjectMgr.RegisterBtn.Visibility = Windows.Visibility.Hidden
|
||||
' Visualizzo il bottone per l'importazione dei compo frame
|
||||
If m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.COMPOFRAME) AndAlso GetPrivateProfileInt(S_FRAMECOMPO, K_CMP_COUNT, 0, m_MainWindow.GetIniFile()) > 0 Then
|
||||
CompoBtn.Visibility = Visibility.Visible
|
||||
Else
|
||||
CompoBtn.Visibility = Visibility.Hidden
|
||||
End If
|
||||
' Recupero dimensioni e kerf del grezzo
|
||||
m_nRawId = EgtGetFirstRawPart()
|
||||
GetRawBox(m_RawBox)
|
||||
@@ -271,7 +280,7 @@ Public Class FrameCutPageUC
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub OffsXXTxBx_EgtClosed(sender As Object, e As EventArgs) Handles OffsZTxBx.EgtClosed, OffsXyTxBx.EgtClosed, OffsYyTxBx.EgtClosed
|
||||
Private Sub OffsXXTxBx_EgtClosed(sender As Object, e As EventArgs) Handles OffsZTxBx.EgtClosed, OffsXyTxBx.EgtClosed, OffsYyTxBx.EgtClosed, OffsXInteryTxBx.EgtClosed
|
||||
' Forzo aggiornamento grezzo nella pagina di Nesting
|
||||
m_MainWindow.m_CadCutPageUC.m_NestPage.CalcRawPart()
|
||||
' Parcheggio pezzi presenti nel grezzo
|
||||
@@ -296,9 +305,13 @@ Public Class FrameCutPageUC
|
||||
WritePrivateProfileString(S_FRAME, K_OFFSXY, DoubleToString(dOffsXy, 3), m_MainWindow.GetIniFile())
|
||||
End If
|
||||
Dim dOffsYy As Double = 0
|
||||
If StringToLen(OffsYyTxBx.Text, dOffsYY) Then
|
||||
If StringToLen(OffsYyTxBx.Text, dOffsYy) Then
|
||||
WritePrivateProfileString(S_FRAME, K_OFFSYY, DoubleToString(dOffsYy, 3), m_MainWindow.GetIniFile())
|
||||
End If
|
||||
Dim dOffsXIntery As Double = 0
|
||||
If StringToLen(OffsXInteryTxBx.Text, dOffsXIntery) Then
|
||||
WritePrivateProfileString(S_FRAME, K_OFFSXINTERY, DoubleToString(dOffsXIntery, 3), m_MainWindow.GetIniFile())
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub MirrorPartBtn_Click(sender As Object, e As RoutedEventArgs) Handles MirrorPartBtn.Click
|
||||
@@ -436,6 +449,16 @@ Public Class FrameCutPageUC
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub CompoBtn_Click(sender As Object, e As RoutedEventArgs) Handles CompoBtn.Click
|
||||
m_MainWindow.TestOff()
|
||||
m_MainWindow.DragRettangleOff()
|
||||
m_MainWindow.SplitCurvWJOff()
|
||||
m_MainWindow.StartCurvWJOff()
|
||||
m_MainWindow.MainWindowGrid.Children.Remove(m_MainWindow.m_CurrentProjectPageUC)
|
||||
m_MainWindow.MainWindowGrid.Children.Add(m_MainWindow.m_DrawPageUC)
|
||||
m_MainWindow.m_ActivePage = MainWindow.Pages.Draw
|
||||
End Sub
|
||||
|
||||
Friend Function CreateFrame(nPartId As Integer) As Boolean
|
||||
If Not MyCreateFrame( nPartId) Then
|
||||
EgtErase( nPartId)
|
||||
@@ -936,12 +959,18 @@ Public Class FrameCutPageUC
|
||||
' Determino distanza da spessore lama
|
||||
Dim dMinDist As Double = 0
|
||||
Dim dSawThick As Double = 0
|
||||
Dim dOffsXIntery As Double = 0
|
||||
StringToLen(OffsXInteryTxBx.Text, dOffsXIntery)
|
||||
If EgtTdbSetCurrTool(m_MainWindow.m_CurrentMachine.sCurrSaw) AndAlso
|
||||
EgtTdbGetCurrToolParam(MCH_TP.THICK, dSawThick) Then
|
||||
dMinDist = dSawThick + 5 * EPS_SMALL
|
||||
If dOffsXIntery <= dSawThick Then
|
||||
dMinDist = dSawThick + 5 * EPS_SMALL
|
||||
Else
|
||||
dMinDist = dOffsXIntery + 5 * EPS_SMALL
|
||||
End If
|
||||
Else
|
||||
EgtOutLog("Not found current saw for frames mindist")
|
||||
dMinDist = 0
|
||||
dMinDist = dOffsXIntery
|
||||
End If
|
||||
' Inserisco il pezzo nel grezzo
|
||||
Dim ptIns As Point3d
|
||||
|
||||
+547
-492
File diff suppressed because it is too large
Load Diff
+171
-22
@@ -29,7 +29,7 @@ Public Class AlarmsPageUC
|
||||
|
||||
Private Sub AlarmsPage_Initialized(sender As Object, e As EventArgs) Handles Me.Initialized
|
||||
|
||||
'Assegno liste a combobox
|
||||
' Assegno liste a combobox
|
||||
CurrSawCmBx.ItemsSource = m_SawList
|
||||
CurrDrillCmBx.ItemsSource = m_DrillList
|
||||
CurrMillCmBx.ItemsSource = m_MillList
|
||||
@@ -37,14 +37,24 @@ Public Class AlarmsPageUC
|
||||
CurrWJetCmBx.ItemsSource = m_WaterJetList
|
||||
AuxiliaryToolCmBx.ItemsSource = m_AuxToolTypeList
|
||||
|
||||
' Variabile che accorcia il riferimento alla macchina corrente
|
||||
m_CurrentMachine = m_MainWindow.m_CurrentMachine
|
||||
|
||||
' Assegno lista ad elenco materiali
|
||||
MaterialsLstBx.ItemsSource = m_MainWindow.m_CurrentMachine.Materials
|
||||
MaterialsLstBx.ItemsSource = m_CurrentMachine.Materials
|
||||
|
||||
' Se non è impostato il controllo numerico, nascondo il bottone di tastatura lama
|
||||
If GetPrivateProfileInt(S_NUMERICALCONTROL, K_TYPE, 0, m_MainWindow.GetMachIniFile()) = 0 Then
|
||||
SawProbingBtn.Visibility = Windows.Visibility.Hidden
|
||||
End If
|
||||
|
||||
' Se esiste un file lua valido allora mostro il pulsante per l'esecuzione dello script
|
||||
If Not String.IsNullOrEmpty(GetExecLuaFile()) And
|
||||
ExecLuaBtn.Visibility = Visibility.Visible Then
|
||||
Else
|
||||
ExecLuaBtn.Visibility = Visibility.Hidden
|
||||
End If
|
||||
|
||||
' Imposto i messaggi letti dal file dei messaggi
|
||||
CurrSawTxBl.Text = EgtMsg(MSG_ALARMSPAGEUC + 1)
|
||||
AuxiliaryToolTxBl.Text = EgtMsg(MSG_ALARMSPAGEUC + 2)
|
||||
@@ -81,7 +91,16 @@ Public Class AlarmsPageUC
|
||||
TmDepthTxBl.Text = EgtMsg( 91063) ' Profondità
|
||||
TmWidthTxBl.Text = EgtMsg( 91064) ' Larghezza
|
||||
WJsParamGpBx.Header = EgtMsg( 91058) ' Parametri waterjet
|
||||
WjIntCutsTxBl.Text = EgtMsg( 90930) ' Sempre sugli interni
|
||||
WjIntCutsTxBl.Text = EgtMsg(90930) ' Sempre sugli interni
|
||||
'-- INIZIO -- nuovi parametri per preforo lavello
|
||||
HolesDiameterWJTxBl.Text = "Diameter"
|
||||
HolesOffsetWJTxBl.Text = "Offset"
|
||||
MinRadiusWJTxBl.Text = "Min Radius"
|
||||
OneHoleInCornerWJTxBl.Text = EgtMsg(MSG_ALARMSPAGEUC + 26)
|
||||
'-- INIZIO -- nuovi parametro Rettifica tagli sottosquadra WJ
|
||||
REctificationWJParamGpBx.Header = "Rectification"
|
||||
EnableRectificationTxBl.Text = "Enable (on subsquare angle)"
|
||||
'-- FINE -- nuovi parametro Rettifica tagli sottosquadra WJ
|
||||
NestingParamGpBx.Header = EgtMsg(MSG_ALARMSPAGEUC + 31) ' Nesting
|
||||
AlignTxBl.Text = EgtMsg(90932) ' Allineato
|
||||
GhigliottinaTxBl.Text = EgtMsg(91066) ' Ghigliottina
|
||||
@@ -116,8 +135,6 @@ Public Class AlarmsPageUC
|
||||
Private Sub AlarmsPage_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded
|
||||
|
||||
If m_bFirst Then
|
||||
' Variabile che accorcia il riferimento alla macchina corrente
|
||||
m_CurrentMachine = m_MainWindow.m_CurrentMachine
|
||||
|
||||
' in assenza dell'uscita H1 nascondo i parametri lama
|
||||
If EgtGetHeadId("H1") = GDB_ID.NULL Then
|
||||
@@ -161,6 +178,7 @@ Public Class AlarmsPageUC
|
||||
' Se non previsti tagli waterjet, disabilito relativo box
|
||||
If Not m_CurrentMachine.bWaterJetting Then
|
||||
WjsParamGpBx.Visibility = Visibility.Hidden
|
||||
RectificationWJParamGpBx.Visibility = Visibility.Hidden
|
||||
End If
|
||||
|
||||
' Abilitazione box per contorni grezzo da foto
|
||||
@@ -188,8 +206,8 @@ Public Class AlarmsPageUC
|
||||
m_bFirst = False
|
||||
End If
|
||||
|
||||
' Aggiorno lista delle lame per pagina macchina in cui scegliere quella corrente
|
||||
CreateToolList(MCH_TF.SAWBLADE, m_SawList)
|
||||
' Aggiorno lista delle lame per pagina macchina in cui scegliere quella corrente
|
||||
CreateToolList(MCH_TF.SAWBLADE, m_SawList)
|
||||
' Seleziono lama corrente
|
||||
CurrSawCmBx.SelectedItem = m_CurrentMachine.sCurrSaw
|
||||
|
||||
@@ -325,12 +343,24 @@ Public Class AlarmsPageUC
|
||||
EgtMdbSave()
|
||||
' Leggo lavorazione angoli con fresa
|
||||
CornerCutsChBx.IsChecked =
|
||||
(GetPrivateProfileInt(S_MACH_NEST, K_MACH_MILLING_ON_CORNERS, 1, m_MainWindow.GetMachIniFile()) <> 0)
|
||||
(GetPrivateProfileInt(S_MACH_NEST, K_MACH_MILLING_ON_CORNERS, 1, m_MainWindow.GetMachIniFile()) <> 0)
|
||||
' Leggo lavorazione interni con fresa
|
||||
InternalCutsChBx.IsChecked =
|
||||
(GetPrivateProfileInt(S_MACH_NEST, K_MACH_MILLING_ON_SINKS, 0, m_MainWindow.GetMachIniFile()) <> 0)
|
||||
(GetPrivateProfileInt(S_MACH_NEST, K_MACH_MILLING_ON_SINKS, 0, m_MainWindow.GetMachIniFile()) <> 0)
|
||||
WjIntCutsChBx.IsChecked =
|
||||
(GetPrivateProfileInt(S_MACH_NEST, K_MACH_MILLING_ON_SINKS, 0, m_MainWindow.GetMachIniFile()) <> 0)
|
||||
(GetPrivateProfileInt(S_MACH_NEST, K_MACH_MILLING_ON_SINKS, 0, m_MainWindow.GetMachIniFile()) <> 0)
|
||||
' Lavorazione preforo lavello con WaterJet
|
||||
dVal = GetPrivateProfileDouble(S_MACH_NEST, K_HOLES_DIAMITERWJ, 0, m_MainWindow.GetMachIniFile())
|
||||
HolesDiameterWJTxBx.Text = LenToString(dVal, 2)
|
||||
dVal = GetPrivateProfileDouble(S_MACH_NEST, K_HOLES_OFFSETWJ, 0, m_MainWindow.GetMachIniFile())
|
||||
HolesOffsetWJTxBx.Text = LenToString(dVal, 2)
|
||||
dVal = GetPrivateProfileDouble(S_MACH_NEST, K_MIN_RADIUSWJ, 0, m_MainWindow.GetMachIniFile())
|
||||
MinRadiusWJTxBx.Text = LenToString(dVal, 2)
|
||||
OneHoleInCornerWJChBx.IsChecked =
|
||||
(GetPrivateProfileInt(S_MACH_NEST, K_MACH_DRILLINGWJ_ON_CORNERS, 1, m_MainWindow.GetMachIniFile()) <> 0)
|
||||
' leggo se attiva la rettifica degli angoli per WaterJet
|
||||
EnableRectificationChBx.IsChecked =
|
||||
(GetPrivateProfileInt(S_MACH_NEST, K_MACH_RECTIFICATION_ON_SUBSQUARE, 0, m_MainWindow.GetMachIniFile()) <> 0)
|
||||
' Leggo accorciamento angoli con fresa
|
||||
dVal = GetPrivateProfileDouble(S_MACH_NEST, K_MACH_MILLING_SHORTENING, 0, m_MainWindow.GetMachIniFile())
|
||||
ShortTxBx.Text = LenToString(dVal, 2)
|
||||
@@ -343,7 +373,7 @@ Public Class AlarmsPageUC
|
||||
dVal = GetPrivateProfileDouble(S_MACH_NEST, K_MACH_ENGRAVING_WIDTH, 0, m_MainWindow.GetMachIniFile())
|
||||
TmWidthTxBx.Text = LenToString(dVal, 2)
|
||||
' Flag per movimento in home alla fine dei tagli diretti
|
||||
FinalHomeChBx.IsChecked = m_MainWindow.m_CurrentMachine.bDirectCutsFinalHome
|
||||
FinalHomeChBx.IsChecked = m_CurrentMachine.bDirectCutsFinalHome
|
||||
' Leggo tagli ridotti per interferenza in nesting
|
||||
CompleteCutsChBx.IsChecked =
|
||||
(GetPrivateProfileInt(S_MACH_NEST, K_MACH_REDUCEDCUT, 0, m_MainWindow.GetMachIniFile()) = 0)
|
||||
@@ -365,7 +395,7 @@ Public Class AlarmsPageUC
|
||||
AdditionalTableTxBl.Text = EgtMsg(MSG_ALARMSPAGEUC + 36) & " " & GetCurrentTable().ToString()
|
||||
End If
|
||||
' Leggo altezza sovratavola
|
||||
dVal = m_MainWindow.m_CurrentMachine.dAdditionalTable
|
||||
dVal = m_CurrentMachine.dAdditionalTable
|
||||
AdditionalTableTxBx.Text = LenToString(dVal, 2)
|
||||
' Leggo soglia e tolleranza per contorno grezzo da foto
|
||||
ThresholdTxBx.Text = m_MainWindow.m_Camera.Threshold.ToString()
|
||||
@@ -383,7 +413,7 @@ Public Class AlarmsPageUC
|
||||
If nWashing = -1 Then
|
||||
WashingGpBx.Visibility = Visibility.Hidden
|
||||
Else
|
||||
WashingChBx.IsChecked = ( nWashing <> 0)
|
||||
WashingChBx.IsChecked = (nWashing <> 0)
|
||||
End If
|
||||
' Leggo parametri per variazione feed in tagli
|
||||
CfrLenTxBx.Text = LenToString(m_CurrentMachine.dFsevLength, 3)
|
||||
@@ -439,7 +469,7 @@ Public Class AlarmsPageUC
|
||||
CurrWaterJettingTxBx.Text = m_CurrentMachine.sCurrWaterJetting
|
||||
CurrWaterJettingTxBl.Visibility = Windows.Visibility.Visible
|
||||
CurrWaterJettingTxBx.Visibility = Windows.Visibility.Visible
|
||||
If m_MainWindow.m_CurrentMachine.bFromDBWaterJet Then
|
||||
If m_CurrentMachine.bFromDBWaterJet Then
|
||||
CurrWaterJettingTxBx.SetValue(Grid.ColumnSpanProperty, 1)
|
||||
CurrWaterJettingTxBx.SetValue(MarginProperty, New Thickness(CurrWaterJettingTxBx.Margin.Left,
|
||||
CurrWaterJettingTxBx.Margin.Top,
|
||||
@@ -578,6 +608,33 @@ Public Class AlarmsPageUC
|
||||
String.Compare(sMchTool, m_CurrentMachine.sCurrSaw, True) <> 0 Then
|
||||
m_CurrentMachine.sCurrSawing = String.Empty
|
||||
End If
|
||||
|
||||
'Dim sVal As String = String.Empty
|
||||
'Dim dVal As Double = 0
|
||||
'If m_CurrentMachine.GetUserNote("FsevLength", sVal, m_CurrentMachine.sCurrSawing, false) Then
|
||||
' StringToDouble(sVal, dVal)
|
||||
' m_CurrentMachine.SetFsevLength(dVal)
|
||||
'End If
|
||||
'If m_CurrentMachine.GetUserNote("FsevPerc", sVal, m_CurrentMachine.sCurrSawing, false) Then
|
||||
' StringToDouble(sVal, dVal)
|
||||
' m_CurrentMachine.SetFsevPerc(dVal)
|
||||
'End If
|
||||
|
||||
Dim sVal As String = String.Empty
|
||||
Dim dVal As Double = 0
|
||||
If m_CurrentMachine.GetUserNote("FsevLength", sVal, m_CurrentMachine.sCurrSaw) Then
|
||||
StringToDouble(sVal, dVal)
|
||||
m_CurrentMachine.SetFsevLength(dVal)
|
||||
End If
|
||||
If m_CurrentMachine.GetUserNote("FsevPerc", sVal, m_CurrentMachine.sCurrSaw) Then
|
||||
StringToDouble(sVal, dVal)
|
||||
m_CurrentMachine.SetFsevPerc(dVal)
|
||||
End If
|
||||
|
||||
' Leggo parametri per variazione feed in tagli aggiornati in funzione della lama
|
||||
CfrLenTxBx.Text = LenToString(m_CurrentMachine.dFsevLength, 3)
|
||||
CfrPercTxBx.Text = DoubleToString(m_CurrentMachine.dFsevPerc, 0)
|
||||
|
||||
' Aggiorno utensili per lavoro in corso
|
||||
m_MainWindow.m_WorkInProgressPageUC.UpdateTools()
|
||||
' aggiorno la lista delle lavorazioni
|
||||
@@ -893,6 +950,44 @@ Public Class AlarmsPageUC
|
||||
End If
|
||||
End Sub
|
||||
|
||||
' -- INIZIO -- nuovi parametri per prefori WaterJet
|
||||
Private Sub HolesDiameterWJTxBx_Click(sender As Object, e As EventArgs) Handles HolesDiameterWJTxBx.EgtClosed
|
||||
Dim dVal As Double = 0
|
||||
StringToLen(HolesDiameterWJTxBx.Text, dVal)
|
||||
WritePrivateProfileString(S_MACH_NEST, K_HOLES_DIAMITERWJ, DoubleToString(dVal, 2), m_MainWindow.GetMachIniFile())
|
||||
End Sub
|
||||
|
||||
Private Sub HolesOffsetWJTxBx_Click(sender As Object, e As EventArgs) Handles HolesOffsetWJTxBx.EgtClosed
|
||||
Dim dVal As Double = 0
|
||||
StringToLen(HolesOffsetWJTxBx.Text, dVal)
|
||||
WritePrivateProfileString(S_MACH_NEST, K_HOLES_OFFSETWJ, DoubleToString(dVal, 2), m_MainWindow.GetMachIniFile())
|
||||
End Sub
|
||||
|
||||
Private Sub MinRadiusWJTxBx_Click(sender As Object, e As EventArgs) Handles MinRadiusWJTxBx.EgtClosed
|
||||
Dim dVal As Double = 0
|
||||
StringToLen(MinRadiusWJTxBx.Text, dVal)
|
||||
WritePrivateProfileString(S_MACH_NEST, K_MIN_RADIUSWJ, DoubleToString(dVal, 2), m_MainWindow.GetMachIniFile())
|
||||
End Sub
|
||||
|
||||
Private Sub OneHoleInCornerWJChBx_Click(sender As Object, e As EventArgs) Handles OneHoleInCornerWJChBx.Click
|
||||
If OneHoleInCornerWJChBx.IsChecked() Then
|
||||
WritePrivateProfileString(S_MACH_NEST, K_MACH_DRILLINGWJ_ON_CORNERS, "1", m_MainWindow.GetMachIniFile())
|
||||
Else
|
||||
WritePrivateProfileString(S_MACH_NEST, K_MACH_DRILLINGWJ_ON_CORNERS, "0", m_MainWindow.GetMachIniFile())
|
||||
End If
|
||||
End Sub
|
||||
' -- FINE -- nuovi parametri per prefori WaterJet
|
||||
|
||||
' -- INIZIO -- nuovi parametri per Rettifica angoli in sottosquadra WaterJet
|
||||
Private Sub EnableRectificationChBx_Click(sender As Object, e As EventArgs) Handles EnableRectificationChBx.Click
|
||||
If EnableRectificationChBx.IsChecked() Then
|
||||
WritePrivateProfileString(S_MACH_NEST, K_MACH_RECTIFICATION_ON_SUBSQUARE, "1", m_MainWindow.GetMachIniFile)
|
||||
Else
|
||||
WritePrivateProfileString(S_MACH_NEST, K_MACH_RECTIFICATION_ON_SUBSQUARE, "0", m_MainWindow.GetMachIniFile)
|
||||
End If
|
||||
End Sub
|
||||
' -- FINE -- nuovi parametri per Rettifica angoli in sottosquadra WaterJet
|
||||
|
||||
Private Sub TmEnableChBx_Click(sender As Object, e As RoutedEventArgs) Handles TmEnableChBx.Click
|
||||
If TmEnableChBx.IsChecked() Then
|
||||
WritePrivateProfileString(S_MACH_NEST, K_MACH_ENGRAVING_WITHMILL, "1", m_MainWindow.GetMachIniFile())
|
||||
@@ -915,9 +1010,9 @@ Public Class AlarmsPageUC
|
||||
|
||||
Private Sub FinalHomeChBx_Click(sender As Object, e As RoutedEventArgs) Handles FinalHomeChBx.Click
|
||||
If FinalHomeChBx.IsChecked() Then
|
||||
m_MainWindow.m_CurrentMachine.bDirectCutsFinalHome = True
|
||||
m_CurrentMachine.bDirectCutsFinalHome = True
|
||||
Else
|
||||
m_MainWindow.m_CurrentMachine.bDirectCutsFinalHome = False
|
||||
m_CurrentMachine.bDirectCutsFinalHome = False
|
||||
End If
|
||||
End Sub
|
||||
|
||||
@@ -959,7 +1054,7 @@ Public Class AlarmsPageUC
|
||||
Private Sub AdditionalTableTxBx_EgtClosed(sender As Object, e As EventArgs) Handles AdditionalTableTxBx.EgtClosed
|
||||
Dim dVal As Double = 0
|
||||
StringToLen(AdditionalTableTxBx.Text, dVal)
|
||||
m_MainWindow.m_CurrentMachine.dAdditionalTable = dVal
|
||||
m_CurrentMachine.dAdditionalTable = dVal
|
||||
End Sub
|
||||
|
||||
Private Sub NewMatBtn_Click(sender As Object, e As RoutedEventArgs) Handles NewMatBtn.Click
|
||||
@@ -1083,9 +1178,13 @@ Public Class AlarmsPageUC
|
||||
Case 3
|
||||
Dim nResult As Short = m_CN.DGeneralFunctions_WriteCncMode(0)
|
||||
EgtOutLog("Impostata modalità automatica: esito " & nResult.ToString)
|
||||
Case 4
|
||||
' FANUC - Manual:7, Edit:1
|
||||
Dim nResult As Short = m_CN.DGeneralFunctions_WriteCncMode(7)
|
||||
EgtOutLog("Impostata modalità manuale: esito " & nResult.ToString)
|
||||
End Select
|
||||
' Recupero file LUA
|
||||
EgtLuaExecFile(m_MainWindow.m_CurrentMachine.sMachDir() & "\DirectCmd\SawProbing.lua")
|
||||
EgtLuaExecFile(m_CurrentMachine.sMachDir() & "\DirectCmd\SawProbing.lua")
|
||||
' Recupero utensile da tastare
|
||||
Dim ToolForProbing As ToolPos = ChooseToolForProbing()
|
||||
If IsNothing(ToolForProbing) OrElse String.IsNullOrWhiteSpace(ToolForProbing.m_ToolName) Then Return
|
||||
@@ -1105,6 +1204,12 @@ Public Class AlarmsPageUC
|
||||
EgtLuaSetGlobNumVar("CMD.THICK", dToolThick * 1000)
|
||||
EgtTdbGetCurrToolParam(MCH_TP.LEN, dToolLen)
|
||||
EgtLuaSetGlobNumVar("CMD.LENGTH", dToolLen * 1000)
|
||||
' Nuova varibile per gestione tastatura utensili Frankfurt (Polishing)
|
||||
Dim nType As Integer
|
||||
EgtTdbGetCurrToolParam(MCH_TP.TYPE, nType)
|
||||
If m_CurrentMachine.bPolishingWheel AndAlso nType = MCH_TY.MILL_POLISHING Then
|
||||
EgtLuaSetGlobStringVar("CMD.POLISHING", "1")
|
||||
End If
|
||||
EgtLuaSetGlobBoolVar("CMD.INCHES", m_MainWindow.m_CNCommunication.GetMachineInInches())
|
||||
EgtLuaCallFunction("CMD.CmdString")
|
||||
' Leggo variabili
|
||||
@@ -1124,7 +1229,7 @@ Public Class AlarmsPageUC
|
||||
' Modifico stringa per inserire i newline
|
||||
CmdString = CmdString.Replace("<br/>", Environment.NewLine)
|
||||
' Creo file...
|
||||
Dim FilePath As String = m_MainWindow.GetCncDir() & "\SawProbing" & m_MainWindow.m_CurrentMachine.sIsoFileExt
|
||||
Dim FilePath As String = m_MainWindow.GetCncDir() & "\SawProbing" & m_CurrentMachine.sIsoFileExt
|
||||
' ...e ci scrivo
|
||||
Dim Writer As New IO.StreamWriter(FilePath, False)
|
||||
Writer.Write(CmdString)
|
||||
@@ -1148,6 +1253,11 @@ Public Class AlarmsPageUC
|
||||
Return
|
||||
End If
|
||||
m_MainWindow.m_CurrentProjectPageUC.ClearMessage()
|
||||
' Se fanuc passo in modalità AUTO e attivo
|
||||
If m_MainWindow.m_CNCommunication.m_nNCType = 4 Then
|
||||
Dim nResult As Short = m_MainWindow.m_CNCommunication.m_CN.DGeneralFunctions_WriteCncMode(0)
|
||||
EgtOutLog("Impostata modalità automatica: esito " & nResult.ToString)
|
||||
End If
|
||||
' Aspetto e lo avvio
|
||||
System.Threading.Thread.Sleep(300)
|
||||
m_MainWindow.m_CNCommunication.m_CN.DGeneralFunctions_CycleStart()
|
||||
@@ -1197,6 +1307,10 @@ Public Class AlarmsPageUC
|
||||
Dim bRead As Boolean = False
|
||||
Dim SawDiameterNameVar As String = String.Empty
|
||||
GetPrivateProfileString(S_MACH_PROBING, K_SAWDIAMETER, "", SawDiameterNameVar, m_MainWindow.GetMachIniFile())
|
||||
' Se utensile non lama, allora la variabile in cui leggo il dato potrebbe essere differente
|
||||
If Not ToolForProbing.m_IsSaw Then
|
||||
GetPrivateProfileString(S_MACH_PROBING, K_TOOLLENGTH, SawDiameterNameVar, SawDiameterNameVar, m_MainWindow.GetMachIniFile())
|
||||
End If
|
||||
m_MainWindow.m_CNCommunication.m_CN.n_DReadELS_handle = 0
|
||||
For I As Integer = 0 To 20
|
||||
' Devo rileggere la variabile ad ogni ciclo
|
||||
@@ -1205,7 +1319,10 @@ Public Class AlarmsPageUC
|
||||
If m_MainWindow.m_CNCommunication.m_CN.n_DReadELS_handle = 3 Then
|
||||
bRead = True
|
||||
Dim dVal As Double = m_MainWindow.m_CNCommunication.m_CN.d_DReadELS_value
|
||||
dVal = dVal / 1000
|
||||
' Se fanuc il dato è in mm (NON MICRON)
|
||||
If m_MainWindow.m_CNCommunication.m_nNCType <> 4 Then
|
||||
dVal = dVal / 1000
|
||||
End If
|
||||
MsgBoxStateInfo.LoadingPrBr_Value = 100
|
||||
' Tastatura conclusa con successo
|
||||
Dim sOut As String = EgtMsg(MSG_DIRECTCUTPAGEUC + 43) & " : " & DoubleToString(dVal, 1)
|
||||
@@ -1252,9 +1369,9 @@ Public Class AlarmsPageUC
|
||||
End Sub
|
||||
|
||||
Private Function ChooseToolForProbing() As ToolPos
|
||||
Select Case m_MainWindow.m_CurrentMachine.MountedToolConfig
|
||||
Select Case m_CurrentMachine.MountedToolConfig
|
||||
Case CurrentMachine.MountedToolConfigs.SAW
|
||||
Return New ToolPos(m_MainWindow.m_CurrentMachine.sCurrSaw, "T100", True)
|
||||
Return New ToolPos(m_CurrentMachine.sCurrSaw, "T100", True)
|
||||
Case CurrentMachine.MountedToolConfigs.SAWANDAUXTOOL, CurrentMachine.MountedToolConfigs.MANUALTOOLCHANGER, CurrentMachine.MountedToolConfigs.TOOLCHANGER
|
||||
Dim ChooseTool As New ChooseToolWD(m_MainWindow)
|
||||
If ChooseTool.ShowDialog Then
|
||||
@@ -1300,4 +1417,36 @@ Public Class AlarmsPageUC
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub ExecLuaBtn_Click(sender As Object, e As RoutedEventArgs) Handles ExecLuaBtn.Click
|
||||
Dim sExecFile As String = GetExecLuaFile()
|
||||
' Eseguo file LUA e recupero risultato
|
||||
Dim nErr As Integer = 999
|
||||
EgtLuaExecFile(sExecFile)
|
||||
EgtLuaGetGlobIntVar("ELS.ERR", nErr)
|
||||
' Reset lua
|
||||
EgtLuaResetGlobVar("ELS")
|
||||
' Verifico condizioni di errore
|
||||
If nErr Then
|
||||
' Errore...
|
||||
EgtOutLog("Error executing file: " & sExecFile & ", ELS.ERR=" & nErr.ToString)
|
||||
' Error executing script
|
||||
Dim MsgBoxError As New EgtMsgBox(m_MainWindow, "", EgtMsg(90259), EgtMsgBox.Buttons.OK, EgtMsgBox.Icons.NULL)
|
||||
Return
|
||||
End If
|
||||
End Sub
|
||||
|
||||
' Recupero il percorso del file lua da eseguire
|
||||
Private Function GetExecLuaFile() As String
|
||||
Dim sFile As String = String.Empty
|
||||
If GetPrivateProfileString(S_EXECLUA, K_FILESCRIPT_LUA, "", sFile, m_MainWindow.GetMachIniFile()) <> 0 Then
|
||||
' Sistemo nome file
|
||||
sFile = sFile.Trim()
|
||||
If Not sFile.EndsWith(".lua") Then sFile = sFile & ".lua"
|
||||
' Creo path
|
||||
Dim sPath As String = m_CurrentMachine.sMachDir() & "\Scripts\" & sFile
|
||||
If File.Exists(sPath) Then Return sPath
|
||||
End If
|
||||
Return String.Empty
|
||||
End Function
|
||||
|
||||
End Class
|
||||
|
||||
+207
-3
@@ -77,6 +77,9 @@ Public Class CurrentMachine
|
||||
Private m_bPolishingWheel As Boolean = False
|
||||
Private m_bWaterJet As Boolean = False
|
||||
|
||||
' Flag che indica se gesire l'inversione del taglio nei tagli singoli
|
||||
Private m_bEnableInvetrt As Boolean = True
|
||||
|
||||
' Abilitazione DB WaterJet
|
||||
Private m_bFromDBWaterJet As Boolean = False
|
||||
|
||||
@@ -609,6 +612,18 @@ Public Class CurrentMachine
|
||||
If WritePrivateProfileString(S_MACH_MACH, K_CURRSAWING, value, sMachIniFile) Then
|
||||
m_sCurrSawing = value
|
||||
m_MainWindow.m_CurrentProjectPageUC.MachiningTxBx.Text = value
|
||||
'' aggiorno il file ini della macchina con i valori correnti della lavorazione
|
||||
'Dim sVal As String = String.Empty
|
||||
'Dim dVal As Double = m_dFsevLength
|
||||
'If GetUserNote("FsevLength", sVal, m_sCurrSawing, False) Then
|
||||
' StringToDouble(sVal, dVal)
|
||||
' SetFsevLength(dVal)
|
||||
'End If
|
||||
'dVal = m_dFsevPerc
|
||||
'If GetUserNote("FsevPerc", sVal, m_sCurrSawing, False) Then
|
||||
' StringToDouble(sVal, m_dFsevPerc)
|
||||
' SetFsevPerc(dVal)
|
||||
'End If
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
@@ -740,6 +755,12 @@ Public Class CurrentMachine
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Friend ReadOnly Property bEnableInvert As Boolean
|
||||
Get
|
||||
Return m_bEnableInvetrt
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Friend Property dAdditionalTable As Double
|
||||
Get
|
||||
Select Case GetCurrentTable()
|
||||
@@ -861,9 +882,18 @@ Public Class CurrentMachine
|
||||
Set(value As Double)
|
||||
If WritePrivateProfileString(S_NEST, K_MACH_CUTFSEVLEN, DoubleToString(value, 3), sMachIniFile) Then
|
||||
m_dFsevLength = value
|
||||
' salvo il dato nelle UserNote della lavorazione
|
||||
'MdbSetCurrMachiningUserNote("FsevLength", m_dFsevLength.ToString, sCurrSawing, false)
|
||||
' salvo il dato nelle UserNote dell'utensile
|
||||
TdbSetCurrToolUserNote("FsevLength", m_dFsevLength.ToString, sCurrSaw)
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
Friend Sub SetFsevLength(value As Double)
|
||||
If WritePrivateProfileString(S_NEST, K_MACH_CUTFSEVLEN, DoubleToString(value, 3), sMachIniFile) Then
|
||||
m_dFsevLength = value
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Friend Property dFsevPerc As Double
|
||||
Get
|
||||
@@ -872,9 +902,18 @@ Public Class CurrentMachine
|
||||
Set(value As Double)
|
||||
If WritePrivateProfileString(S_NEST, K_MACH_CUTFSEVPERC, DoubleToString(value, 3), sMachIniFile) Then
|
||||
m_dFsevPerc = value
|
||||
'' salvo il dato nelle UserNote della lavorazione
|
||||
'MdbSetCurrMachiningUserNote("FsevPerc", m_dFsevPerc.ToString, sCurrSawing)
|
||||
' salvo il dato nelle UserNote dell'utensile
|
||||
TdbSetCurrToolUserNote("FsevPerc", m_dFsevPerc.ToString, sCurrSaw)
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
Friend Sub SetFsevPerc(value As Double)
|
||||
If WritePrivateProfileString(S_NEST, K_MACH_CUTFSEVPERC, DoubleToString(value, 3), sMachIniFile) Then
|
||||
m_dFsevPerc = value
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Friend ReadOnly Property ToolChangerNbr As Integer
|
||||
Get
|
||||
@@ -1170,6 +1209,8 @@ Public Class CurrentMachine
|
||||
m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.ENABLE_WJ)
|
||||
' possibilità di definire attacco speciale per materiali ceramici
|
||||
m_bSawingSpecialLeadIn = (GetPrivateProfileInt(S_MACHININGS, K_SAWINGSPECIALLEADIN, 0, sMachIniFile) > 0)
|
||||
' mantengo la direzione del taglio definita nel taglio diretto
|
||||
m_bEnableInvetrt = (GetPrivateProfileInt(S_DIRECTCUTS, K_ENABLEINVERT, 1, sMachIniFile) <> 0)
|
||||
|
||||
' Leggo utensili correnti
|
||||
' lama
|
||||
@@ -1265,6 +1306,7 @@ Public Class CurrentMachine
|
||||
|
||||
' Leggo dati per feed ridotta all'inizio/fine dei tagli
|
||||
m_bFsevEnable = (GetPrivateProfileInt(S_NEST, K_MACH_CUTFSEVENABLE, 0, sMachIniFile) <> 0)
|
||||
' sposto la lettura nel DB delle lavorazioni della lama corrente!
|
||||
m_dFsevLength = GetPrivateProfileDouble(S_NEST, K_MACH_CUTFSEVLEN, 0, sMachIniFile)
|
||||
m_dFsevPerc = GetPrivateProfileDouble(S_NEST, K_MACH_CUTFSEVPERC, 0, sMachIniFile)
|
||||
|
||||
@@ -1320,6 +1362,29 @@ Public Class CurrentMachine
|
||||
m_nEnableBarCodeReader = GetPrivateProfileInt(S_MACH_BARCODEREADER, K_ENABLEBCR, 0, sMachIniFile)
|
||||
End Sub
|
||||
|
||||
' Per il controllo FANUC al momento dell'inizializzazione del CN devono essere lette alcune variabili
|
||||
Public Sub InitFANUC(CN_Generic As CN_generico)
|
||||
' Leggo ritardo tra reset e send per NUM
|
||||
m_nResetSendDelay = GetPrivateProfileInt(S_NCFANUC, K_RESETSENDDELAY, 1000, sMachIniFile)
|
||||
' Leggo ritardo tra reset e send per NUM
|
||||
m_nThreadSleep = GetPrivateProfileInt(S_NCFANUC, K_THREADSLEEP, 150, sMachIniFile)
|
||||
' Leggo i dati strettamente correlati alla comunicazione NC-PC
|
||||
Dim CN As CN_generico = CN_Generic
|
||||
' Leggo l'indirizzo in cui scrivere lo stato macchina
|
||||
Dim dAddNcMode As String = CN.s_addr_set_nc_mode
|
||||
GetPrivateProfileString(S_NCFANUC, K_SETNCMODE, CN.s_addr_set_nc_mode, CN.s_addr_set_nc_mode, sMachIniFile)
|
||||
' Leggo primo indirizzo libero delle variabili di tipo intero
|
||||
CN.n_Base_addr_int_vars = GetPrivateProfileInt(S_NCFANUC, K_BASEADDRINT, CN.n_Base_addr_int_vars, sMachIniFile)
|
||||
' Leggo primo indirizzo libero delle variabili di tipo bit
|
||||
CN.n_Base_addr_byte_for_bits_vars = GetPrivateProfileInt(S_NCFANUC, K_BASEADDRBIT, CN.n_Base_addr_byte_for_bits_vars, sMachIniFile)
|
||||
' Leggo numero di variabili di tipo intero
|
||||
CN.n_num_var_int_to_read = CShort(GetPrivateProfileInt(S_NCFANUC, K_NUMVARINT, CInt(CN.n_num_var_int_to_read), sMachIniFile))
|
||||
' Leggo numero di varibili di tipo bit
|
||||
CN.n_num_var_byte_for_bits_to_read = CShort(GetPrivateProfileInt(S_NCFANUC, K_NUMVARBIT, CInt(CN.n_num_var_byte_for_bits_to_read), sMachIniFile))
|
||||
' Leggo variabile abilitata alla gestione di FeedHold
|
||||
GetPrivateProfileString(S_NCFANUC, K_SETNCMODE, CN.s_addr_feedhold, CN.s_addr_feedhold, sMachIniFile)
|
||||
End Sub
|
||||
|
||||
Public Sub LoadWJMaterial(Optional bIsStart As Boolean = False)
|
||||
Dim TempCurrMat As Material = CurrMat
|
||||
' Svuoto l'attuale lista di materiali
|
||||
@@ -1327,7 +1392,7 @@ Public Class CurrentMachine
|
||||
' Leggo valori da file Data e li carico nelle proprietà
|
||||
Dim sFilePath As String = sMachDir & "\" & MACHININGS_DIR & "\" & WATERJETDB_FILE
|
||||
Dim Local_MaterialList = New ObservableCollection(Of EgtWPFLib5.WjMaterial)
|
||||
Local_MaterialList = EgtWPFLib5.WaterjetDbWindowVM.LoadWjMaterials(sFilePath)
|
||||
Local_MaterialList = WaterjetDbWindowVM_OmagCUT.LoadWjMaterials(sFilePath)
|
||||
' definisco la lista delle qualità (solo se è vuota)
|
||||
If m_Qualities.Count < 1 Then
|
||||
m_Qualities.Add("Q1")
|
||||
@@ -1358,7 +1423,7 @@ Public Class CurrentMachine
|
||||
' Leggo valori da file Data e li carico nelle proprietà
|
||||
Dim sFilePath As String = sMachDir & "\" & MACHININGS_DIR & "\" & WATERJETDB_FILE
|
||||
Dim Local_MaterialList = New ObservableCollection(Of EgtWPFLib5.WjMaterial)
|
||||
Local_MaterialList = EgtWPFLib5.WaterjetDbWindowVM.LoadWjMaterials(sFilePath)
|
||||
Local_MaterialList = WaterjetDbWindowVM_OmagCUT.LoadWjMaterials(sFilePath)
|
||||
Dim sItems() As String = sCurMat.Split("."c)
|
||||
If sItems.Count > 1 Then
|
||||
Dim sMat As String = sItems(0)
|
||||
@@ -1383,9 +1448,148 @@ Public Class CurrentMachine
|
||||
If bFound Then Exit For
|
||||
Next
|
||||
End If
|
||||
Return dMaxThick
|
||||
' il valore resituito è già nell'unità corrente del programma -> converto il dato in mm
|
||||
Dim dValmm As Double = 0
|
||||
StringToLen(DoubleToString(dMaxThick, 3), dValmm)
|
||||
Return dValmm
|
||||
End Function
|
||||
|
||||
#Region "USERNOTE"
|
||||
|
||||
' recupero le note UserNote associate alla LAVORAZIONE Machining
|
||||
Friend Function MdbGetCurrMachiningUserNote(Machining As String) As String
|
||||
Dim UserNotes As String = String.Empty
|
||||
' lavorazione corrente
|
||||
Dim CurrMach As String = String.Empty
|
||||
EgtMdbGetCurrMachiningParam(MCH_MP.NAME, CurrMach)
|
||||
' Imposto utensile lama corrente
|
||||
If Not String.IsNullOrWhiteSpace(Machining) AndAlso EgtMdbSetCurrMachining(Machining) Then
|
||||
' leggo nel db corrente della lavorazione questa info
|
||||
EgtMdbGetCurrMachiningParam(MCH_MP.USERNOTES, UserNotes)
|
||||
' reimposto lavorazione corrente
|
||||
EgtMdbSetCurrMachining(CurrMach)
|
||||
End If
|
||||
Return UserNotes
|
||||
End Function
|
||||
|
||||
' recupero le note UserNote associate all'UTENSILE Tool
|
||||
Friend Function TdbGetCurrToolUserNote(Tool As String) As String
|
||||
Dim UserNotes As String = String.Empty
|
||||
' lavorazione corrente
|
||||
Dim CurrTool As String = String.Empty
|
||||
EgtTdbGetCurrToolParam(MCH_TP.NAME, CurrTool)
|
||||
' Imposto utensile lama corrente
|
||||
If Not String.IsNullOrWhiteSpace(Tool) AndAlso EgtTdbSetCurrTool(Tool) Then
|
||||
' leggo nel db corrente della lavorazione questa info
|
||||
EgtTdbGetCurrToolParam(MCH_TP.USERNOTES, UserNotes)
|
||||
' reimposto lavorazione corrente
|
||||
EgtTdbSetCurrTool(CurrTool)
|
||||
End If
|
||||
Return UserNotes
|
||||
End Function
|
||||
|
||||
' imposta il nuovo valore in UserNote della LAVORAZIONE Machining
|
||||
Friend Sub MdbSetCurrMachiningUserNote(sKeyUserNote As String, sValUserNote As String, Machining As String)
|
||||
' lavorazione corrente
|
||||
Dim CurrMach As String = String.Empty
|
||||
EgtMdbGetCurrMachiningParam(MCH_MP.NAME, CurrMach)
|
||||
' Imposto utensile lama corrente
|
||||
If Not String.IsNullOrWhiteSpace(Machining) AndAlso EgtMdbSetCurrMachining(Machining) Then
|
||||
Dim UserNotes As String = String.Empty
|
||||
' salvo nel db corrente della lavorazione questa info → devo gestire l'inserimento: sovrascrivo NON ESEGUE un APPEND delle info
|
||||
EgtMdbSetCurrMachiningParam(MCH_MP.USERNOTES, AssembUserNote(sKeyUserNote, sValUserNote, Machining))
|
||||
EgtMdbSaveCurrMachining()
|
||||
EgtMdbSave()
|
||||
' reimposto lavorazione corrente
|
||||
EgtMdbSetCurrMachining(CurrMach)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
' imposta il nuovo valore in UserNote dell'UTENSILE Tool
|
||||
Friend Sub TdbSetCurrToolUserNote(sKeyUserNote As String, sValUserNote As String, Tool As String)
|
||||
' lavorazione corrente
|
||||
Dim CurrTool As String = String.Empty
|
||||
EgtTdbGetCurrToolParam(MCH_TP.NAME, CurrTool)
|
||||
' Imposto utensile lama corrente
|
||||
If Not String.IsNullOrWhiteSpace(Tool) AndAlso EgtTdbSetCurrTool(Tool) Then
|
||||
Dim UserNotes As String = String.Empty
|
||||
' salvo nel db corrente della lavorazione questa info → devo gestire l'inserimento: sovrascrivo NON ESEGUE un APPEND delle info
|
||||
EgtTdbSetCurrToolParam(MCH_TP.USERNOTES, AssembUserNote(sKeyUserNote, sValUserNote, Tool))
|
||||
EgtTdbSaveCurrTool()
|
||||
EgtTdbSave()
|
||||
' reimposto lavorazione corrente
|
||||
EgtTdbSetCurrTool(Tool)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
' separa la le note UserNote della LAVORAZIONE
|
||||
Private Function SplitUserNoteMachinig(Machining As String) As String()
|
||||
Dim sUserNotes As String = MdbGetCurrMachiningUserNote(Machining)
|
||||
If String.IsNullOrEmpty(sUserNotes) Then Return Nothing
|
||||
Dim sItems As String() = sUserNotes.Split(";"c)
|
||||
Return sItems
|
||||
End Function
|
||||
|
||||
' separa la le note UserNote della LAVORAZIONE
|
||||
Private Function SplitUserNoteTool(Tool As String) As String()
|
||||
Dim sUserNotes As String = TdbGetCurrToolUserNote(Tool)
|
||||
If String.IsNullOrEmpty(sUserNotes) Then Return Nothing
|
||||
Dim sItems As String() = sUserNotes.Split(";"c)
|
||||
Return sItems
|
||||
End Function
|
||||
|
||||
' recupera il valore della associato alla chiave per la lavorazione oppure utensile (bIsToolNote)
|
||||
Friend Function GetUserNote(sKeyUserNote As String, ByRef sValUserNote As String, sName As String, Optional bIsToolNote As Boolean = True) As Boolean
|
||||
Dim sUserNotesList As String() = Nothing
|
||||
If bIsToolNote Then
|
||||
sUserNotesList = SplitUserNoteTool(sName)
|
||||
Else
|
||||
sUserNotesList = SplitUserNoteMachinig(sName)
|
||||
End If
|
||||
If IsNothing(sUserNotesList) Then Return False
|
||||
For Index As Integer = 0 To sUserNotesList.Count - 1
|
||||
Dim sNote As String() = sUserNotesList(Index).Split("="c)
|
||||
If sNote.Count = 2 AndAlso sNote(0).Trim = sKeyUserNote Then
|
||||
sValUserNote = sNote(1).Trim
|
||||
End If
|
||||
Next
|
||||
Return True
|
||||
End Function
|
||||
|
||||
' ricostruisce la stringa UserNote da salvare
|
||||
Friend Function AssembUserNote(sKeyUserNote As String, sValUserNote As String, sName As String, Optional bIsToolNote As Boolean = True) As String
|
||||
Dim sUserNotes As String = String.Empty
|
||||
Dim sUserNotesList As String() = Nothing
|
||||
If bIsToolNote Then
|
||||
sUserNotesList = SplitUserNoteTool(sName)
|
||||
Else
|
||||
sUserNotesList = SplitUserNoteMachinig(sName)
|
||||
End If
|
||||
Dim bExists As Boolean = False
|
||||
If Not IsNothing(sUserNotesList) Then
|
||||
For Index As Integer = 0 To sUserNotesList.Count - 1
|
||||
Dim sNote As String() = sUserNotesList(Index).Split("="c)
|
||||
If sNote.Count = 2 AndAlso sNote(0).Trim = sKeyUserNote Then
|
||||
sUserNotesList(Index) = sKeyUserNote & "=" & sValUserNote
|
||||
bExists = True
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
' riassemblo la stringa
|
||||
For Each Item As String In sUserNotesList
|
||||
If Not String.IsNullOrWhiteSpace(Item) Then
|
||||
sUserNotes &= Item & ";"
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
If Not bExists Then
|
||||
sUserNotes &= sKeyUserNote & "=" & sValUserNote & ";"
|
||||
End If
|
||||
Return sUserNotes
|
||||
End Function
|
||||
|
||||
#End Region ' USERNOTE
|
||||
|
||||
Friend Function IsVacuumMovePossible() As Boolean
|
||||
' Recupero diametro lama corrente
|
||||
EgtTdbSetCurrTool(sCurrSaw)
|
||||
|
||||
@@ -34,16 +34,21 @@
|
||||
<ColumnDefinition Width="1.5*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Button Name="AutoBtn" Grid.Column="0"
|
||||
Style="{DynamicResource OmagCut_RightGrayGradientYellowTextButton}"/>
|
||||
<Button Name="ManualBtn" Grid.Column="1"
|
||||
Style="{DynamicResource OmagCut_RightGrayGradientYellowTextButton}"/>
|
||||
<Button Name="MDIBtn" Grid.Column="2"
|
||||
Style="{DynamicResource OmagCut_RightGrayGradientYellowTextButton}"/>
|
||||
<Button Name="SingleBtn" Grid.Column="3"
|
||||
Style="{DynamicResource OmagCut_RightGrayGradientYellowTextButton}"/>
|
||||
<Button Name="HomeBtn" Grid.Column="4"
|
||||
Style="{DynamicResource OmagCut_RightGrayGradientYellowTextButton}"/>
|
||||
<ToggleButton Name="AutoBtn" Grid.Column="0"
|
||||
Style="{DynamicResource OmagCut_GradientYellowIconToggleButton}"
|
||||
Foreground="White"/>
|
||||
<ToggleButton Name="ManualBtn" Grid.Column="1"
|
||||
Style="{DynamicResource OmagCut_GradientYellowIconToggleButton}"
|
||||
Foreground="White"/>
|
||||
<ToggleButton Name="MDIBtn" Grid.Column="2"
|
||||
Style="{DynamicResource OmagCut_GradientYellowIconToggleButton}"
|
||||
Foreground="White"/>
|
||||
<ToggleButton Name="SingleBtn" Grid.Column="3"
|
||||
Style="{DynamicResource OmagCut_GradientYellowIconToggleButton}"
|
||||
Foreground="White"/>
|
||||
<ToggleButton Name="HomeBtn" Grid.Column="4"
|
||||
Style="{DynamicResource OmagCut_GradientYellowIconToggleButton}"
|
||||
Foreground="White"/>
|
||||
|
||||
</Grid>
|
||||
|
||||
@@ -57,7 +62,7 @@
|
||||
<ColumnDefinition Width="2*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Button Name="StartBtn" Style="{DynamicResource OmagCut_RightGrayGradientYellowTextButton}"/>
|
||||
<Button Name="StartBtn" Style="{DynamicResource OmagCut_RightGrayGradientYellowTextButton}"/>
|
||||
<Button Name="StopBtn" Grid.Column="1"
|
||||
Style="{DynamicResource OmagCut_RightGrayGradientYellowTextButton}"/>
|
||||
<Button Name="ResetBtn" Grid.Column="2"
|
||||
|
||||
@@ -8,6 +8,8 @@ Public Class MachineCNPageUC
|
||||
Private m_bFirst As Boolean = True
|
||||
Private m_ButtonPower As New List(Of MachineButton)
|
||||
|
||||
Private m_nCurrMode As Integer = 0
|
||||
|
||||
Private Sub TestingPage_Initialized(sender As Object, e As EventArgs) Handles Me.Initialized
|
||||
StartBtn.Content = EgtMsg(MSG_MACHINECNPAGEUC + 1)
|
||||
StopBtn.Content = EgtMsg(MSG_MACHINECNPAGEUC + 2)
|
||||
@@ -51,6 +53,9 @@ Public Class MachineCNPageUC
|
||||
PartProgTransferGpBx.Visibility = Windows.Visibility.Hidden
|
||||
End If
|
||||
|
||||
' gestione visuliazzazione ToggleButton Auto/Sinlge/Mdi/Manula/Home
|
||||
SetCncMode()
|
||||
|
||||
'------ NUOVI BOTTONI ----------
|
||||
' Lettura configurazione bottoni (per impostare l'uso del Joystick) da Ini di macchina
|
||||
m_ButtonPower.Clear()
|
||||
@@ -98,6 +103,53 @@ Public Class MachineCNPageUC
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub SetCncMode()
|
||||
Dim Mode As Integer = m_nCurrMode
|
||||
Select Case Mode
|
||||
Case 0
|
||||
' Auoto
|
||||
MDIConfirmBtn.IsEnabled = False
|
||||
AutoBtn.IsChecked = True
|
||||
SingleBtn.IsChecked = False
|
||||
MDIBtn.IsChecked = False
|
||||
ManualBtn.IsChecked = False
|
||||
HomeBtn.IsChecked = False
|
||||
Case 1
|
||||
' Single
|
||||
MDIConfirmBtn.IsEnabled = False
|
||||
AutoBtn.IsChecked = False
|
||||
SingleBtn.IsChecked = True
|
||||
MDIBtn.IsChecked = False
|
||||
ManualBtn.IsChecked = False
|
||||
HomeBtn.IsChecked = False
|
||||
Case 2
|
||||
' Mdi
|
||||
MDIConfirmBtn.IsEnabled = True
|
||||
AutoBtn.IsChecked = False
|
||||
SingleBtn.IsChecked = False
|
||||
MDIBtn.IsChecked = True
|
||||
ManualBtn.IsChecked = False
|
||||
HomeBtn.IsChecked = False
|
||||
Case 7
|
||||
' Manual
|
||||
MDIConfirmBtn.IsEnabled = False
|
||||
AutoBtn.IsChecked = False
|
||||
SingleBtn.IsChecked = False
|
||||
MDIBtn.IsChecked = False
|
||||
ManualBtn.IsChecked = True
|
||||
HomeBtn.IsChecked = False
|
||||
Case 8
|
||||
' Home
|
||||
MDIConfirmBtn.IsEnabled = False
|
||||
AutoBtn.IsChecked = False
|
||||
SingleBtn.IsChecked = False
|
||||
MDIBtn.IsChecked = False
|
||||
ManualBtn.IsChecked = False
|
||||
HomeBtn.IsChecked = True
|
||||
End Select
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub StartBtn_Click(sender As Object, e As RoutedEventArgs) Handles StartBtn.Click
|
||||
If m_MainWindow.m_CNCommunication.m_nNCType = 3 AndAlso m_MainWindow.m_CNCommunication.m_CN.m_IsSiemensOne Then
|
||||
Dim sDBVarPath As String = ""
|
||||
@@ -278,4 +330,9 @@ Public Class MachineCNPageUC
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Friend Sub CncModeChange(nMode As Integer)
|
||||
m_nCurrMode = nMode
|
||||
SetCncMode()
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
@@ -145,12 +145,12 @@ Public Class MachinePageUC
|
||||
m_ActiveMachinePage = MachinePages.Alarms
|
||||
Case MachinePages.WaterJet
|
||||
' Verifica ed eventuale salvataggio Db Waterjet
|
||||
Dim nPressedBtn As Integer = DirectCast(m_WaterJetPageUC.DataContext, EgtWPFLib5.WaterjetDbWindowVM).CloseWaterjetDb_OmagCut(m_MainWindow)
|
||||
If nPressedBtn = EgtWPFLib5.WaterjetDbWindowVM.SaveWndBtnEnum.CANCEL Then
|
||||
Dim nPressedBtn As Integer = DirectCast(m_WaterJetPageUC.DataContext, WaterjetDbWindowVM_OmagCUT).CloseWaterjetDb_OmagCut(m_MainWindow)
|
||||
If nPressedBtn = WaterjetDbWindowVM_OmagCUT.SaveWndBtnEnum.CANCEL Then
|
||||
AlarmsBtn.IsChecked = False
|
||||
WaterJetBtn.IsChecked = True
|
||||
Return
|
||||
ElseIf nPressedBtn = EgtWPFLib5.WaterjetDbWindowVM.SaveWndBtnEnum.NO Then
|
||||
ElseIf nPressedBtn = WaterjetDbWindowVM_OmagCUT.SaveWndBtnEnum.NO Then
|
||||
m_WaterJetPageUC.WaterJetPage_Reinitialize()
|
||||
End If
|
||||
' passo alla pagina Dati Macchina
|
||||
@@ -215,12 +215,12 @@ Public Class MachinePageUC
|
||||
m_ActiveMachinePage = MachinePages.ToolsDb
|
||||
Case MachinePages.WaterJet
|
||||
'Verifica ed eventuale salvataggio Db Waterjet
|
||||
Dim nPressedBtn As Integer = DirectCast(m_WaterJetPageUC.DataContext, EgtWPFLib5.WaterjetDbWindowVM).CloseWaterjetDb_OmagCut(m_MainWindow)
|
||||
If nPressedBtn = EgtWPFLib5.WaterjetDbWindowVM.SaveWndBtnEnum.CANCEL Then
|
||||
Dim nPressedBtn As Integer = DirectCast(m_WaterJetPageUC.DataContext, WaterjetDbWindowVM_OmagCUT).CloseWaterjetDb_OmagCut(m_MainWindow)
|
||||
If nPressedBtn = WaterjetDbWindowVM_OmagCUT.SaveWndBtnEnum.CANCEL Then
|
||||
ToolsDBBtn.IsChecked = False
|
||||
WaterJetBtn.IsChecked = True
|
||||
Return
|
||||
ElseIf nPressedBtn = EgtWPFLib5.WaterjetDbWindowVM.SaveWndBtnEnum.NO Then
|
||||
ElseIf nPressedBtn = WaterjetDbWindowVM_OmagCUT.SaveWndBtnEnum.NO Then
|
||||
m_WaterJetPageUC.WaterJetPage_Reinitialize()
|
||||
End If
|
||||
' passo alla pagina Dati Macchina
|
||||
@@ -285,12 +285,12 @@ Public Class MachinePageUC
|
||||
m_ActiveMachinePage = MachinePages.MachiningDb
|
||||
Case MachinePages.WaterJet
|
||||
' Verifica ed eventuale salvataggio Db Waterjet
|
||||
Dim nPressedBtn As Integer = DirectCast(m_WaterJetPageUC.DataContext, EgtWPFLib5.WaterjetDbWindowVM).CloseWaterjetDb_OmagCut(m_MainWindow)
|
||||
If nPressedBtn = EgtWPFLib5.WaterjetDbWindowVM.SaveWndBtnEnum.CANCEL Then
|
||||
Dim nPressedBtn As Integer = DirectCast(m_WaterJetPageUC.DataContext, WaterjetDbWindowVM_OmagCUT).CloseWaterjetDb_OmagCut(m_MainWindow)
|
||||
If nPressedBtn = WaterjetDbWindowVM_OmagCUT.SaveWndBtnEnum.CANCEL Then
|
||||
MachiningDBBtn.IsChecked = False
|
||||
WaterJetBtn.IsChecked = True
|
||||
Return
|
||||
ElseIf nPressedBtn = EgtWPFLib5.WaterjetDbWindowVM.SaveWndBtnEnum.NO Then
|
||||
ElseIf nPressedBtn = WaterjetDbWindowVM_OmagCUT.SaveWndBtnEnum.NO Then
|
||||
m_WaterJetPageUC.WaterJetPage_Reinitialize()
|
||||
End If
|
||||
' passo alla pagina Dati Macchina
|
||||
@@ -358,12 +358,12 @@ Public Class MachinePageUC
|
||||
PolishingsBtn.IsChecked = True
|
||||
Case MachinePages.WaterJet
|
||||
' Verifica ed eventuale salvataggio Db Waterjet
|
||||
Dim nPressedBtn As Integer = DirectCast(m_WaterJetPageUC.DataContext, EgtWPFLib5.WaterjetDbWindowVM).CloseWaterjetDb_OmagCut(m_MainWindow)
|
||||
If nPressedBtn = EgtWPFLib5.WaterjetDbWindowVM.SaveWndBtnEnum.CANCEL Then
|
||||
Dim nPressedBtn As Integer = DirectCast(m_WaterJetPageUC.DataContext, WaterjetDbWindowVM_OmagCUT).CloseWaterjetDb_OmagCut(m_MainWindow)
|
||||
If nPressedBtn = WaterjetDbWindowVM_OmagCUT.SaveWndBtnEnum.CANCEL Then
|
||||
PolishingsBtn.IsChecked = False
|
||||
WaterJetBtn.IsChecked = True
|
||||
Return
|
||||
ElseIf nPressedBtn = EgtWPFLib5.WaterjetDbWindowVM.SaveWndBtnEnum.NO Then
|
||||
ElseIf nPressedBtn = WaterjetDbWindowVM_OmagCUT.SaveWndBtnEnum.NO Then
|
||||
m_WaterJetPageUC.WaterJetPage_Reinitialize()
|
||||
End If
|
||||
' passo alla pagina Dati Macchina
|
||||
@@ -513,12 +513,12 @@ Public Class MachinePageUC
|
||||
m_ActiveMachinePage = MachinePages.MachineCN
|
||||
Case MachinePages.WaterJet
|
||||
' Verifica ed eventuale salvataggio Db Waterjet
|
||||
Dim nPressedBtn As Integer = DirectCast(m_WaterJetPageUC.DataContext, EgtWPFLib5.WaterjetDbWindowVM).CloseWaterjetDb_OmagCut(m_MainWindow)
|
||||
If nPressedBtn = EgtWPFLib5.WaterjetDbWindowVM.SaveWndBtnEnum.CANCEL Then
|
||||
Dim nPressedBtn As Integer = DirectCast(m_WaterJetPageUC.DataContext, WaterjetDbWindowVM_OmagCUT).CloseWaterjetDb_OmagCut(m_MainWindow)
|
||||
If nPressedBtn = WaterjetDbWindowVM_OmagCUT.SaveWndBtnEnum.CANCEL Then
|
||||
TestingPageBtn.IsChecked = False
|
||||
WaterJetBtn.IsChecked = True
|
||||
Return
|
||||
ElseIf nPressedBtn = EgtWPFLib5.WaterjetDbWindowVM.SaveWndBtnEnum.NO Then
|
||||
ElseIf nPressedBtn = WaterjetDbWindowVM_OmagCUT.SaveWndBtnEnum.NO Then
|
||||
m_WaterJetPageUC.WaterJetPage_Reinitialize()
|
||||
End If
|
||||
' passo alla pagina Dati Macchina
|
||||
@@ -593,12 +593,12 @@ Public Class MachinePageUC
|
||||
m_ActiveMachinePage = MachinePages.Statistics
|
||||
Case MachinePages.WaterJet
|
||||
' Verifica ed eventuale salvataggio Db Waterjet
|
||||
Dim nPressedBtn As Integer = DirectCast(m_WaterJetPageUC.DataContext, EgtWPFLib5.WaterjetDbWindowVM).CloseWaterjetDb_OmagCut(m_MainWindow)
|
||||
If nPressedBtn = EgtWPFLib5.WaterjetDbWindowVM.SaveWndBtnEnum.CANCEL Then
|
||||
Dim nPressedBtn As Integer = DirectCast(m_WaterJetPageUC.DataContext, WaterjetDbWindowVM_OmagCUT).CloseWaterjetDb_OmagCut(m_MainWindow)
|
||||
If nPressedBtn = WaterjetDbWindowVM_OmagCUT.SaveWndBtnEnum.CANCEL Then
|
||||
StatisticsBtn.IsChecked = False
|
||||
WaterJetBtn.IsChecked = True
|
||||
Return
|
||||
ElseIf nPressedBtn = EgtWPFLib5.WaterjetDbWindowVM.SaveWndBtnEnum.NO Then
|
||||
ElseIf nPressedBtn = WaterjetDbWindowVM_OmagCUT.SaveWndBtnEnum.NO Then
|
||||
m_WaterJetPageUC.WaterJetPage_Reinitialize()
|
||||
End If
|
||||
' passo alla pagina Dati Macchina
|
||||
|
||||
@@ -248,16 +248,16 @@ Public Class MachineStatusUC
|
||||
dL3 = ptTip.z
|
||||
End If
|
||||
' Visualizzazione
|
||||
Axis1TxBx.Text = LenToString(dL1, -3)
|
||||
Axis2TxBx.Text = LenToString(dL2, -3)
|
||||
Axis3TxBx.Text = LenToString(dL3, -3)
|
||||
Axis1TxBx.Text = LenToString(dL1, -3, True)
|
||||
Axis2TxBx.Text = LenToString(dL2, -3, True)
|
||||
Axis3TxBx.Text = LenToString(dL3, -3, True)
|
||||
Axis4TxBx.Text = DoubleToString(dR1, -3)
|
||||
Axis5TxBx.Text = DoubleToString(dR2, -3)
|
||||
If m_AxesNumber >= 6 Then Axis6TxBx.Text = DoubleToString(dA6, -3)
|
||||
If m_AxesNumber >= 7 Then Axis7TxBx.Text = LenToString(dA7, -3)
|
||||
If m_AxesNumber >= 8 Then Axis8TxBx.Text = LenToString(dA8, -3)
|
||||
If m_AxesNumber >= 9 Then Axis9TxBx.Text = LenToString(dA9, -3)
|
||||
If m_AxesNumber >= 10 Then Axis10TxBx.Text = LenToString(dA10, -3)
|
||||
If m_AxesNumber >= 7 Then Axis7TxBx.Text = LenToString(dA7, -3, True)
|
||||
If m_AxesNumber >= 8 Then Axis8TxBx.Text = LenToString(dA8, -3, True)
|
||||
If m_AxesNumber >= 9 Then Axis9TxBx.Text = LenToString(dA9, -3, True)
|
||||
If m_AxesNumber >= 10 Then Axis10TxBx.Text = LenToString(dA10, -3, True)
|
||||
End Sub
|
||||
|
||||
Sub DisplayPositionDelta()
|
||||
@@ -265,22 +265,28 @@ Public Class MachineStatusUC
|
||||
Dim dL1, dL2, dL3, dR1, dR2, dA6, dA7, dA8, dA9, dA10 As Double
|
||||
m_MainWindow.m_CNCommunication.GetAxesDeltas(dL1, dL2, dL3, dR1, dR2, dA6, dA7, dA8, dA9, dA10)
|
||||
' Visualizzazione
|
||||
DeltaAxis1TxBx.Text = LenToString(dL1, -3)
|
||||
DeltaAxis2TxBx.Text = LenToString(dL2, -3)
|
||||
DeltaAxis3TxBx.Text = LenToString(dL3, -3)
|
||||
DeltaAxis1TxBx.Text = LenToString(dL1, -3, True)
|
||||
DeltaAxis2TxBx.Text = LenToString(dL2, -3, True)
|
||||
DeltaAxis3TxBx.Text = LenToString(dL3, -3, True)
|
||||
DeltaAxis4TxBx.Text = DoubleToString(dR1, -3)
|
||||
DeltaAxis5TxBx.Text = DoubleToString(dR2, -3)
|
||||
If m_AxesNumber >= 6 Then DeltaAxis6TxBx.Text = DoubleToString(dA6, -3)
|
||||
If m_AxesNumber >= 7 Then DeltaAxis7TxBx.Text = LenToString(dA7, -3)
|
||||
If m_AxesNumber >= 8 Then DeltaAxis8TxBx.Text = LenToString(dA8, -3)
|
||||
If m_AxesNumber >= 9 Then DeltaAxis9TxBx.Text = LenToString(dA9, -3)
|
||||
If m_AxesNumber >= 10 Then DeltaAxis10TxBx.Text = LenToString(dA10, -3)
|
||||
If m_AxesNumber >= 7 Then DeltaAxis7TxBx.Text = LenToString(dA7, -3, True)
|
||||
If m_AxesNumber >= 8 Then DeltaAxis8TxBx.Text = LenToString(dA8, -3, True)
|
||||
If m_AxesNumber >= 9 Then DeltaAxis9TxBx.Text = LenToString(dA9, -3, True)
|
||||
If m_AxesNumber >= 10 Then DeltaAxis10TxBx.Text = LenToString(dA10, -3, True)
|
||||
End Sub
|
||||
|
||||
Sub DisplayFeed()
|
||||
Dim dRealFeed As Double = m_CN.d_DInterpo_Prog_Feed * m_CN.d_DInterpo_Feed_override / 100
|
||||
' modifica richiesta 26/05/2023 da Rosario per cliente Lanzetta
|
||||
If m_MainWindow.m_CNCommunication.m_nNCType = 4 Then
|
||||
dRealFeed = m_CN.d_DInterpo_Prog_Feed
|
||||
Else
|
||||
dRealFeed = m_CN.d_DInterpo_Prog_Feed * m_CN.d_DInterpo_Feed_override / 100
|
||||
End If
|
||||
'Feed = DoubleToString(dRealFeed, 0)
|
||||
FeedTxBx.Text = LenToString(dRealFeed, 0)
|
||||
FeedTxBx.Text = LenToString(dRealFeed, 0, True)
|
||||
'FeedOverride = DoubleToString(m_CN.d_DInterpo_Feed_override, 0) & "%"
|
||||
Dim dFeedOverride As Double = m_CN.d_DInterpo_Feed_override
|
||||
FeedOverrideTxBx.Text = DoubleToString(dFeedOverride, 0) & "%"
|
||||
@@ -304,6 +310,8 @@ Public Class MachineStatusUC
|
||||
If m_MainWindow.m_CNCommunication.m_nNCType = 3 AndAlso m_MainWindow.m_CNCommunication.m_CN.m_IsSiemensOne Then
|
||||
dSpindlePower = m_CN.d_data(0)
|
||||
dSpindleOvr = m_CN.d_data(1)
|
||||
ElseIf m_MainWindow.m_CNCommunication.m_nNCType = 4 Then
|
||||
dSpindlePower = m_CN.d_spindle_power / 1000
|
||||
Else
|
||||
dSpindlePower = m_CN.d_spindle_power
|
||||
dSpindleOvr = If(m_CN.bPowerOvr > 0, m_CN.d_spindle_power / m_CN.bPowerOvr * 100, 0)
|
||||
|
||||
@@ -246,7 +246,7 @@
|
||||
|
||||
<TextBlock Name="SideAngleTxBl" Grid.Column="2" Grid.Row="3" Grid.RowSpan="3"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="SideAngleTxBx" Grid.Column="3" Grid.Row="3" Grid.RowSpan="3" Margin="0,0,15,0"
|
||||
<EgtWPFLib:EgtTextBox Name="SideAngleTxBx" Grid.Column="3" Grid.Row="3" Grid.RowSpan="3" Margin="0,0,15,0" IsLength="False"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
|
||||
<TextBlock Name="StepTypeTxBl" Grid.Column="0" Grid.Row="6" Grid.RowSpan="3"
|
||||
@@ -576,7 +576,7 @@
|
||||
|
||||
<TextBlock Name="ForwardAngleTxBl" Grid.Column="0" Grid.Row="6" Grid.RowSpan="3"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="ForwardAngleTxBx" Grid.Column="1" Grid.Row="6" Grid.RowSpan="3"
|
||||
<EgtWPFLib:EgtTextBox Name="ForwardAngleTxBx" Grid.Column="1" Grid.Row="6" Grid.RowSpan="3" IsLength="False"
|
||||
Style="{DynamicResource OmagCut_MachLeftCalculatorTextBoxInBorder}" />
|
||||
|
||||
<Border Name="LiHoleBrd" Grid.Column="0" Grid.Row="9" Grid.ColumnSpan="4" Grid.RowSpan="6"
|
||||
@@ -605,12 +605,12 @@
|
||||
|
||||
<TextBlock Name="LpTurnsTxBl" Grid.Column="0" Grid.Row="1" Grid.RowSpan="2"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="LpTurnsTxBx" Grid.Column="1" Grid.Row="1"
|
||||
<EgtWPFLib:EgtTextBox Name="LpTurnsTxBx" Grid.Column="1" Grid.Row="1" IsLength="False"
|
||||
Style="{DynamicResource OmagCut_MachLeftCalculatorTextBoxInBorder}" />
|
||||
|
||||
<TextBlock Name="HpTurnsTxBl" Grid.Column="2" Grid.Row="1"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="HpTurnsTxBx" Grid.Column="3" Grid.Row="1"
|
||||
<EgtWPFLib:EgtTextBox Name="HpTurnsTxBx" Grid.Column="3" Grid.Row="1" IsLength="False"
|
||||
Style="{DynamicResource OmagCut_MachLeftCalculatorTextBoxInBorder}" />
|
||||
|
||||
</Grid>
|
||||
@@ -725,7 +725,7 @@
|
||||
|
||||
<TextBlock Name="SpeedTxBl" Grid.Column="0"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="SpeedTxBx" Grid.Column="1"
|
||||
<EgtWPFLib:EgtTextBox Name="SpeedTxBx" Grid.Column="1" IsLength="False"
|
||||
Style="{DynamicResource OmagCut_MachToolCalculatorTextBox}" />
|
||||
|
||||
</Grid>
|
||||
|
||||
@@ -899,11 +899,11 @@ Public Class MachiningDbPageUC
|
||||
For Each Material As MachiningMaterial In m_MaterialsList
|
||||
If m_MainWindow.m_CurrentMachine.bWaterJet And m_MainWindow.m_CurrentMachine.bFromDBWaterJet Then
|
||||
If Material.bIsActive Then
|
||||
sMaterialString += Material.nId.ToString & "." & Material.nSubId.ToString & "," & DoubleToString(Material.dMinThickness, 0) & "," & DoubleToString(Material.dMaxThickness, 0) & ";"
|
||||
sMaterialString += Material.nId.ToString & "." & Material.nSubId.ToString & "," & DoubleToString(Material.dMinThickness, 3) & "," & DoubleToString(Material.dMaxThickness, 3) & ";"
|
||||
End If
|
||||
Else
|
||||
If Material.bIsActive Then
|
||||
sMaterialString += Material.nId.ToString & "," & DoubleToString(Material.dMinThickness, 0) & "," & DoubleToString(Material.dMaxThickness, 0) & ";"
|
||||
sMaterialString += Material.nId.ToString & "," & DoubleToString(Material.dMinThickness, 3) & "," & DoubleToString(Material.dMaxThickness, 3) & ";"
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
|
||||
@@ -61,8 +61,8 @@ Public Class PolishingsPageUC
|
||||
RepeatTxBl.Text = EgtMsg(91093) ' Ripetizioni
|
||||
StepTxBl.Text = EgtMsg(90787) ' Passo
|
||||
OffSetTxBl.Text = EgtMsg(91089) ' Offset
|
||||
RadiusTxBl.Text = "Raggio"
|
||||
DistanceTxBl.Text = "Distanza"
|
||||
RadiusTxBl.Text = EgtMsg(91139) ' Raggio
|
||||
DistanceTxBl.Text = EgtMsg(91140) ' Distanza
|
||||
LiLoGpBx.Header = EgtMsg(91094) ' Attacco/Uscita
|
||||
LiLenTxBl.Text = EgtMsg(91097) ' Lunghezza
|
||||
LiHeightTxBl.Text = EgtMsg(91095) ' Altezza
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
<!-- Definizione del ToolHolderUc -->
|
||||
<Grid>
|
||||
<Image Source="/Resources/ToolChangerPos.png"/>
|
||||
<ToggleButton Name="Tool" Width="50" Height="50" Margin="22,40,26,8" Background="#7FB4B4B4">
|
||||
<ToggleButton Name="Tool" Width="50" Height="50" Margin="62,10,16,10" Background="#7FB4B4B4">
|
||||
<ToggleButton.Template>
|
||||
<ControlTemplate TargetType="{x:Type ToggleButton}">
|
||||
<Grid>
|
||||
@@ -25,7 +25,7 @@
|
||||
|
||||
</ToggleButton.Template>
|
||||
</ToggleButton>
|
||||
<TextBlock Name="PositionNameTxBl" Height="22" Width="68" FontSize="16" Margin="12,16,41,61"/>
|
||||
<TextBlock Name="PositionNameTxBl" Height="22" Width="50" FontSize="16" Margin="20,40,70,53"/>
|
||||
|
||||
</Grid>
|
||||
</UserControl>
|
||||
|
||||
@@ -281,12 +281,12 @@
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<TextBlock Name="SpeedTxBl" Grid.Column="0" Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="SpeedTxBx" Grid.Column="1"
|
||||
<EgtWPFLib:EgtTextBox Name="SpeedTxBx" Grid.Column="1" IsLength="False"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBoxInGroupBox}" />
|
||||
|
||||
<TextBlock Name="MaxSpeedTxBl" Grid.Column="2"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="MaxSpeedTxBx" Grid.Column="3"
|
||||
<EgtWPFLib:EgtTextBox Name="MaxSpeedTxBx" Grid.Column="3" IsLength="False"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBoxInGroupBox}" />
|
||||
|
||||
</Grid>
|
||||
@@ -384,7 +384,7 @@
|
||||
|
||||
<TextBlock Name="MaxAbsorptionTxBl" Grid.Column="0"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}" Grid.ColumnSpan="1" ScrollViewer.VerticalScrollBarVisibility="Disabled" TextWrapping="Wrap"/>
|
||||
<EgtWPFLib:EgtTextBox Name="MaxAbsorptionTxBx" Grid.Column="1"
|
||||
<EgtWPFLib:EgtTextBox Name="MaxAbsorptionTxBx" Grid.Column="1" IsLength="False"
|
||||
Style="{DynamicResource OmagCut_LeftCalculatorTextBoxInBorder}" />
|
||||
|
||||
<TextBlock Name="MinFeedTxBl" Grid.Column="2" Style="{DynamicResource OmagCut_ToolsDBTextBlock}" />
|
||||
|
||||
+163
-153
@@ -8,256 +8,266 @@
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="768" d:DesignWidth="1280" Initialized="WaterJetPage_Initialized">
|
||||
|
||||
<!-- Definizione della PolishingsPage -->
|
||||
<Border Style="{DynamicResource OmagCut_PageBorder}">
|
||||
<!-- Definizione della PolishingsPage -->
|
||||
<Border Style="{DynamicResource OmagCut_PageBorder}">
|
||||
|
||||
<Grid Name="WaterJetPageGrid" >
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="3*"/>
|
||||
<ColumnDefinition Width="8*"/>
|
||||
<ColumnDefinition Width="4*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="8*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid Name="WaterJetPageGrid" >
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="3*"/>
|
||||
<ColumnDefinition Width="8*"/>
|
||||
<ColumnDefinition Width="4*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="8*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<!--Lista dei materiali-->
|
||||
<GroupBox Name="MaterialGpBx" Style="{DynamicResource OmagCut_GroupBox}" Grid.Column="0"
|
||||
<!--Lista dei materiali-->
|
||||
<GroupBox Name="MaterialGpBx" Style="{DynamicResource OmagCut_GroupBox}" Grid.Column="0"
|
||||
Header="{Binding Material_Msg}"
|
||||
Grid.Row="0" BorderThickness="0">
|
||||
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="7*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="7*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<!--Lista dei materiali-->
|
||||
<ListBox Name="MaterialsLstBx"
|
||||
<!--Lista dei materiali-->
|
||||
<ListBox Name="MaterialsLstBx"
|
||||
ItemsSource="{Binding MaterialList}" SelectedItem="{Binding SelMaterial}"
|
||||
Grid.RowSpan="2">
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding Name}" Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</DataTemplate>
|
||||
</ListBox.ItemTemplate>
|
||||
</ListBox>
|
||||
<!--Campo visualizzato solo per aggiungere un nuovo materiale-->
|
||||
<EgtWPFLib:EgtTextBox Name="NewMaterialNameTxBx" Grid.Row="1"
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding Name}" Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</DataTemplate>
|
||||
</ListBox.ItemTemplate>
|
||||
</ListBox>
|
||||
<!--Campo visualizzato solo per aggiungere un nuovo materiale-->
|
||||
<EgtWPFLib:EgtTextBox Name="NewMaterialNameTxBx" Grid.Row="1"
|
||||
Width="220"
|
||||
Text="{Binding sNewMaterial}"
|
||||
Visibility="{Binding NewMaterial_Visibility}"
|
||||
Style="{DynamicResource OmagCut_KeyboardTextBox}"
|
||||
KeyboardPosition="Top"/>
|
||||
<!--Pulsanti per aggiungere/rimuovere/salvare la lista-->
|
||||
<UniformGrid Grid.Row="2" Columns="3">
|
||||
<Button Name="NewMaterialBtn" Grid.Column="0"
|
||||
<!--Pulsanti per aggiungere/rimuovere/salvare la lista-->
|
||||
<UniformGrid Grid.Row="2" Columns="3">
|
||||
<Button Name="NewMaterialBtn" Grid.Column="0"
|
||||
Content="{Binding New_Msg}"
|
||||
Command="{Binding NewMaterialCommand}"
|
||||
Style="{DynamicResource OmagCut_WjDbRightGrayGradientYellowTextButton}"/>
|
||||
<Button Name="DeleteMaterialBtn" Grid.Column="1"
|
||||
<Button Name="DeleteMaterialBtn" Grid.Column="1"
|
||||
Content="{Binding Delete_Msg}"
|
||||
Command="{Binding DeleteMaterialCommand}"
|
||||
Style="{DynamicResource OmagCut_WjDbRightGrayGradientYellowTextButton}"/>
|
||||
<Button Name="ModifyMaterialBtn" Grid.Column="1"
|
||||
<Button Name="ModifyMaterialBtn" Grid.Column="1"
|
||||
Content="{Binding Modify_Msg}"
|
||||
Command="{Binding ModifyMaterialCommand}"
|
||||
Style="{DynamicResource OmagCut_WjDbRightGrayGradientYellowTextButton}"/>
|
||||
</UniformGrid>
|
||||
</UniformGrid>
|
||||
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
||||
</GroupBox>
|
||||
</GroupBox>
|
||||
|
||||
<!--Raggruppo all'interno della stessa cornice le sottocatogorie e i parametri-->
|
||||
<Border Style="{DynamicResource OmagCut_Border}"
|
||||
<!--Raggruppo all'interno della stessa cornice le sottocatogorie e i parametri-->
|
||||
<Border Style="{DynamicResource OmagCut_Border}"
|
||||
Grid.Column="1" Grid.Row="0"
|
||||
Grid.ColumnSpan="2" Grid.RowSpan="1">
|
||||
|
||||
<Grid Name="SubMaterialGrd" Grid.Column="1">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid Name="SubMaterialGrd" Grid.Column="1">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<!--Sottocategoria dei materiali associata alla lista precedente-->
|
||||
<GroupBox Name="SubMaterialGpBx" Style="{DynamicResource OmagCut_GroupBox}"
|
||||
<!--Sottocategoria dei materiali associata alla lista precedente-->
|
||||
<GroupBox Name="SubMaterialGpBx" Style="{DynamicResource OmagCut_GroupBox}"
|
||||
Header="{Binding SubMaterial_Msg}"
|
||||
Grid.Column="0" Grid.Row="0"
|
||||
Grid.ColumnSpan="1" Grid.RowSpan="8" BorderThickness="0">
|
||||
|
||||
<Grid Grid.Column="1">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="7*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid Grid.Column="1">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="7*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<!--Lista dei materiali-->
|
||||
<ListBox Name="SubMaterialsLstBx" ItemsSource="{Binding Path=SelectedItem.SubMaterialList, ElementName=MaterialsLstBx}"
|
||||
<!--Lista dei materiali-->
|
||||
<ListBox Name="SubMaterialsLstBx" ItemsSource="{Binding Path=SelectedItem.SubMaterialList, ElementName=MaterialsLstBx}"
|
||||
SelectedItem="{Binding Path=SelectedItem.SelSubMaterial, ElementName=MaterialsLstBx}"
|
||||
Grid.RowSpan="2">
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding Name}" Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</DataTemplate>
|
||||
</ListBox.ItemTemplate>
|
||||
</ListBox>
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding Name}" Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</DataTemplate>
|
||||
</ListBox.ItemTemplate>
|
||||
</ListBox>
|
||||
|
||||
<!--Campo visualizzato solo per aggiungere un nuovo materiale-->
|
||||
<EgtWPFLib:EgtTextBox Name="NewSubMaterialNameTxBx" Grid.Row="1"
|
||||
<!--Campo visualizzato solo per aggiungere un nuovo materiale-->
|
||||
<EgtWPFLib:EgtTextBox Name="NewSubMaterialNameTxBx" Grid.Row="1"
|
||||
Width="220"
|
||||
Text="{Binding sNewSubMaterial}"
|
||||
Visibility="{Binding NewSubMaterial_Visibility}"
|
||||
Style="{DynamicResource OmagCut_KeyboardTextBox}"
|
||||
KeyboardPosition="Top"/>
|
||||
|
||||
<!--Pulsanti per aggiungere/rimuovere/salvare la lista-->
|
||||
<UniformGrid Grid.Row="2" Columns="3">
|
||||
<Button Name="NewSubMaterialBtn" Grid.Column="0"
|
||||
<!--Pulsanti per aggiungere/rimuovere/salvare la lista-->
|
||||
<UniformGrid Grid.Row="2" Columns="3">
|
||||
<Button Name="NewSubMaterialBtn" Grid.Column="0"
|
||||
Content="{Binding New_Msg}"
|
||||
Command="{Binding NewSubMaterialCommand}"
|
||||
Style="{DynamicResource OmagCut_WjDbRightGrayGradientYellowTextButton}"/>
|
||||
<Button Name="RemoveSubMaterialBtn" Grid.Column="1"
|
||||
<Button Name="RemoveSubMaterialBtn" Grid.Column="1"
|
||||
Content="{Binding Delete_Msg}"
|
||||
Command="{Binding DeleteSubMaterialCommand}"
|
||||
Style="{DynamicResource OmagCut_WjDbRightGrayGradientYellowTextButton}"/>
|
||||
<Button Name="ModifySubMaterialBtn" Grid.Column="1"
|
||||
<Button Name="ModifySubMaterialBtn" Grid.Column="1"
|
||||
Content="{Binding Modify_Msg}"
|
||||
Command="{Binding ModifySubMaterialCommand}"
|
||||
Style="{DynamicResource OmagCut_WjDbRightGrayGradientYellowTextButton}"/>
|
||||
</UniformGrid>
|
||||
</UniformGrid>
|
||||
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
||||
</GroupBox>
|
||||
</GroupBox>
|
||||
|
||||
<!--Lista dei parametri associata alla sottovcategoria dei materiali-->
|
||||
<GroupBox Name="ParamsGpBx"
|
||||
<!--Lista dei parametri associata alla sottovcategoria dei materiali-->
|
||||
<GroupBox Name="ParamsGpBx"
|
||||
Grid.Column="1" Grid.Row="0" Margin="0,0,0,3"
|
||||
Grid.ColumnSpan="3" Grid.RowSpan="8" BorderThickness="0">
|
||||
|
||||
<!--Titolazione delle colonne della tabella-->
|
||||
<GroupBox.Header >
|
||||
<Grid Width="700">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<TextBlock Text="{Binding Thickness_Msg}" Grid.Column="0" HorizontalAlignment="Center"
|
||||
<!--Titolazione delle colonne della tabella-->
|
||||
<GroupBox.Header >
|
||||
<Grid Width="700">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<TextBlock Text="{Binding Thickness_Msg}" Grid.Column="0" HorizontalAlignment="Center"
|
||||
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"
|
||||
FontSize="{DynamicResource FontSize_GroupBoxHeader}"/>
|
||||
<TextBlock Text="{Binding Q1_Msg}" Grid.Column="1" HorizontalAlignment="Center"
|
||||
<TextBlock Text="{Binding Q1_Msg}" Grid.Column="1" HorizontalAlignment="Center"
|
||||
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"
|
||||
FontSize="{DynamicResource FontSize_GroupBoxHeader}"/>
|
||||
<TextBlock Text="{Binding Q2_Msg}" Grid.Column="2" HorizontalAlignment="Center"
|
||||
<TextBlock Text="{Binding Q2_Msg}" Grid.Column="2" HorizontalAlignment="Center"
|
||||
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"
|
||||
FontSize="{DynamicResource FontSize_GroupBoxHeader}"/>
|
||||
<TextBlock Text="{Binding Q3_Msg}" Grid.Column="3" HorizontalAlignment="Center"
|
||||
<TextBlock Text="{Binding Q3_Msg}" Grid.Column="3" HorizontalAlignment="Center"
|
||||
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"
|
||||
FontSize="{DynamicResource FontSize_GroupBoxHeader}"/>
|
||||
<TextBlock Text="{Binding Q4_Msg}" Grid.Column="4" HorizontalAlignment="Center"
|
||||
<TextBlock Text="{Binding Q4_Msg}" Grid.Column="4" HorizontalAlignment="Center"
|
||||
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"
|
||||
FontSize="{DynamicResource FontSize_GroupBoxHeader}"/>
|
||||
<TextBlock Text="{Binding Q5_Msg}" Grid.Column="5" HorizontalAlignment="Center"
|
||||
<TextBlock Text="{Binding Q5_Msg}" Grid.Column="5" HorizontalAlignment="Center"
|
||||
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"
|
||||
FontSize="{DynamicResource FontSize_GroupBoxHeader}"/>
|
||||
<TextBlock Text="{Binding QExtra_Msg}" Grid.Column="6" HorizontalAlignment="Center"
|
||||
<TextBlock Text="{Binding QExtra_Msg}" Grid.Column="6" HorizontalAlignment="Center"
|
||||
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"
|
||||
FontSize="{DynamicResource FontSize_GroupBoxHeader}"/>
|
||||
</Grid>
|
||||
|
||||
</GroupBox.Header>
|
||||
|
||||
<!--Definizione della Grid dei parametri delle lavorazioni-->
|
||||
<Grid Grid.Column="2">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="7*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<TextBlock Text="{Binding AngComp_Msg}" Grid.Column="7" HorizontalAlignment="Center"
|
||||
Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"
|
||||
FontSize="{DynamicResource FontSize_GroupBoxHeader}"/>
|
||||
</Grid>
|
||||
|
||||
<ListBox Name="ParamLstBx"
|
||||
</GroupBox.Header>
|
||||
|
||||
<!--Definizione della Grid dei parametri delle lavorazioni-->
|
||||
<Grid Grid.Column="2">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="308*"/>
|
||||
<ColumnDefinition Width="73*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="7*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<ListBox Name="ParamLstBx"
|
||||
ItemsSource="{Binding Path=SelectedItem.ParamList , ElementName=SubMaterialsLstBx}"
|
||||
SelectedItem="{Binding Path=SelectedItem.SelWjParam , ElementName=SubMaterialsLstBx}"
|
||||
Margin="0,0,0,0"
|
||||
Grid.RowSpan="2">
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Grid Width="700">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
Grid.RowSpan="2" Grid.ColumnSpan="2">
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Grid Width="700">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<EgtWPFLib:EgtTextBox Text="{Binding Thickness}" Grid.Column="0"
|
||||
<EgtWPFLib:EgtTextBox Text="{Binding Thickness}" Grid.Column="0"
|
||||
Style="{DynamicResource OmagCut_CalculatorParamWjTextBox}" />
|
||||
<EgtWPFLib:EgtTextBox Text="{Binding Q1}" Grid.Column="1"
|
||||
<EgtWPFLib:EgtTextBox Text="{Binding Q1}" Grid.Column="1"
|
||||
Style="{DynamicResource OmagCut_CalculatorParamWjTextBox}" />
|
||||
<EgtWPFLib:EgtTextBox Text="{Binding Q2}" Grid.Column="2"
|
||||
<EgtWPFLib:EgtTextBox Text="{Binding Q2}" Grid.Column="2"
|
||||
Style="{DynamicResource OmagCut_CalculatorParamWjTextBox}" />
|
||||
<EgtWPFLib:EgtTextBox Text="{Binding Q3}" Grid.Column="3"
|
||||
<EgtWPFLib:EgtTextBox Text="{Binding Q3}" Grid.Column="3"
|
||||
Style="{DynamicResource OmagCut_CalculatorParamWjTextBox}" />
|
||||
<EgtWPFLib:EgtTextBox Text="{Binding Q4}" Grid.Column="4"
|
||||
<EgtWPFLib:EgtTextBox Text="{Binding Q4}" Grid.Column="4"
|
||||
Style="{DynamicResource OmagCut_CalculatorParamWjTextBox}" />
|
||||
<EgtWPFLib:EgtTextBox Text="{Binding Q5}" Grid.Column="5"
|
||||
<EgtWPFLib:EgtTextBox Text="{Binding Q5}" Grid.Column="5"
|
||||
Style="{DynamicResource OmagCut_CalculatorParamWjTextBox}" />
|
||||
<EgtWPFLib:EgtTextBox Text="{Binding QExtra}" Grid.Column="6"
|
||||
<EgtWPFLib:EgtTextBox Text="{Binding QExtra}" Grid.Column="6"
|
||||
Style="{DynamicResource OmagCut_CalculatorParamWjTextBox}" />
|
||||
<EgtWPFLib:EgtTextBox Text="{Binding dAngComp}" Grid.Column="7" IsLength="False"
|
||||
Style="{DynamicResource OmagCut_CalculatorParamWjTextBox}" />
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</ListBox.ItemTemplate>
|
||||
</ListBox>
|
||||
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</ListBox.ItemTemplate>
|
||||
</ListBox>
|
||||
|
||||
<UniformGrid Grid.Row="2" Columns="9" Grid.ColumnSpan="3">
|
||||
<Button Name="NewParamBtn" Grid.Column="0"
|
||||
<UniformGrid Grid.Row="2" Columns="9" Grid.ColumnSpan="2">
|
||||
<Button Name="NewParamBtn" Grid.Column="0"
|
||||
Command="{Binding NewWjParamCommand}"
|
||||
Content="{Binding New_Msg}"
|
||||
Style="{DynamicResource OmagCut_WjDbRightGrayGradientYellowTextButton}"/>
|
||||
<Button Name="RemoveParamBtn" Grid.Column="1"
|
||||
<Button Name="RemoveParamBtn" Grid.Column="1"
|
||||
Command="{Binding DeleteWjParamCommand}"
|
||||
Content="{Binding Delete_Msg}"
|
||||
Style="{DynamicResource OmagCut_WjDbRightGrayGradientYellowTextButton}"/>
|
||||
</UniformGrid>
|
||||
</UniformGrid>
|
||||
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
||||
</GroupBox>
|
||||
</GroupBox>
|
||||
|
||||
</Grid>
|
||||
</Border>
|
||||
<Button Name="SaveKitBtn" Grid.Row="2" Grid.Column="2"
|
||||
</Grid>
|
||||
</Border>
|
||||
<Button Name="SaveKitBtn" Grid.Row="2" Grid.Column="2"
|
||||
Command="{Binding SaveCommand}"
|
||||
Content="{Binding Save_Msg}"
|
||||
Style="{DynamicResource OmagCut_RightGrayGradientYellowTextButton}"/>
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
||||
</Border>
|
||||
</Border>
|
||||
|
||||
</UserControl>
|
||||
@@ -8,18 +8,26 @@ Public Class WaterJetPageUC
|
||||
|
||||
' Riferimento alla MainWindow
|
||||
Private m_MainWindow As MainWindow = DirectCast(Application.Current.MainWindow, MainWindow)
|
||||
Private m_refWaterjetDbWindowVM As EgtWPFLib5.WaterjetDbWindowVM
|
||||
Private m_refWaterjetDbWindowVM As WaterjetDbWindowVM_OmagCUT
|
||||
Private m_sOrigNewMaterial As String = String.Empty
|
||||
Private m_sOrigNewSubMaterial As String = String.Empty
|
||||
|
||||
Private Sub WaterJetPage_Initialized(sender As Object, e As EventArgs)
|
||||
m_refWaterjetDbWindowVM = New EgtWPFLib5.WaterjetDbWindowVM(m_MainWindow.m_CurrentMachine.sMachDir)
|
||||
m_refWaterjetDbWindowVM = New WaterjetDbWindowVM_OmagCUT(m_MainWindow.m_CurrentMachine.sMachDir)
|
||||
'----------------------------------------------------------------------------------------
|
||||
' TEMPORANEO - se dati in INCH e richiesta di frazioni eseguo la conversione in frazione!
|
||||
ConvertParamListValueToFracrion()
|
||||
'----------------------------------------------------------------------------------------
|
||||
Me.DataContext = m_refWaterjetDbWindowVM
|
||||
EgtWPFLib.Utility.MainWindow = m_MainWindow
|
||||
End Sub
|
||||
|
||||
Public Sub WaterJetPage_Reinitialize()
|
||||
m_refWaterjetDbWindowVM = New EgtWPFLib5.WaterjetDbWindowVM(m_MainWindow.m_CurrentMachine.sMachDir)
|
||||
m_refWaterjetDbWindowVM = New WaterjetDbWindowVM_OmagCUT(m_MainWindow.m_CurrentMachine.sMachDir)
|
||||
'----------------------------------------------------------------------------------------
|
||||
' TEMPORANEO - se dati in INCH e richiesta di frazioni eseguo la conversione in frazione!
|
||||
ConvertParamListValueToFracrion()
|
||||
'----------------------------------------------------------------------------------------
|
||||
Me.DataContext = m_refWaterjetDbWindowVM
|
||||
End Sub
|
||||
|
||||
@@ -51,5 +59,48 @@ Public Class WaterJetPageUC
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub ConvertParamListValueToFracrion()
|
||||
' TEMPORANEO - se dati in INCH e richiesta di frazioni eseguo la conversione in frazione!
|
||||
Dim Index1 As Integer = 0
|
||||
For Index1 = 0 To m_refWaterjetDbWindowVM.MaterialList.Count - 1
|
||||
Dim Index2 As Integer = 0
|
||||
For Index2 = 0 To m_refWaterjetDbWindowVM.MaterialList(Index1).SubMaterialList.Count - 1
|
||||
Dim Index3 As Integer = 0
|
||||
For Index3 = 0 To m_refWaterjetDbWindowVM.MaterialList(Index1).SubMaterialList(Index2).ParamList.Count - 1
|
||||
Dim dThickness As Double
|
||||
Dim dQ1 As Double
|
||||
Dim dQ2 As Double
|
||||
Dim dQ3 As Double
|
||||
Dim dQ4 As Double
|
||||
Dim dQ5 As Double
|
||||
Dim dQExtra As Double
|
||||
Dim dAngComp As Double
|
||||
StringToLen(m_refWaterjetDbWindowVM.MaterialList(Index1).SubMaterialList(Index2).ParamList(Index3).Thickness, dThickness)
|
||||
Dim sVal As String = LenToString(dThickness, 3)
|
||||
m_refWaterjetDbWindowVM.MaterialList(Index1).SubMaterialList(Index2).ParamList(Index3).SetThickness(sVal)
|
||||
StringToLen(m_refWaterjetDbWindowVM.MaterialList(Index1).SubMaterialList(Index2).ParamList(Index3).Q1, dQ1)
|
||||
sVal = LenToString(dQ1, 3)
|
||||
m_refWaterjetDbWindowVM.MaterialList(Index1).SubMaterialList(Index2).ParamList(Index3).SetQ1(sVal)
|
||||
StringToLen(m_refWaterjetDbWindowVM.MaterialList(Index1).SubMaterialList(Index2).ParamList(Index3).Q2, dQ2)
|
||||
sVal = LenToString(dQ2, 3)
|
||||
m_refWaterjetDbWindowVM.MaterialList(Index1).SubMaterialList(Index2).ParamList(Index3).SetQ2(sVal)
|
||||
StringToLen(m_refWaterjetDbWindowVM.MaterialList(Index1).SubMaterialList(Index2).ParamList(Index3).Q3, dQ3)
|
||||
sVal = LenToString(dQ3, 3)
|
||||
m_refWaterjetDbWindowVM.MaterialList(Index1).SubMaterialList(Index2).ParamList(Index3).SetQ3(sVal)
|
||||
StringToLen(m_refWaterjetDbWindowVM.MaterialList(Index1).SubMaterialList(Index2).ParamList(Index3).Q4, dQ4)
|
||||
sVal = LenToString(dQ4, 3)
|
||||
m_refWaterjetDbWindowVM.MaterialList(Index1).SubMaterialList(Index2).ParamList(Index3).SetQ4(sVal)
|
||||
StringToLen(m_refWaterjetDbWindowVM.MaterialList(Index1).SubMaterialList(Index2).ParamList(Index3).Q5, dQ5)
|
||||
sVal = LenToString(dQ5, 3)
|
||||
m_refWaterjetDbWindowVM.MaterialList(Index1).SubMaterialList(Index2).ParamList(Index3).SetQ5(sVal)
|
||||
StringToLen(m_refWaterjetDbWindowVM.MaterialList(Index1).SubMaterialList(Index2).ParamList(Index3).QExtra, dQExtra)
|
||||
sVal = LenToString(dQExtra, 3)
|
||||
m_refWaterjetDbWindowVM.MaterialList(Index1).SubMaterialList(Index2).ParamList(Index3).SetQExtra(sVal)
|
||||
StringToDouble(m_refWaterjetDbWindowVM.MaterialList(Index1).SubMaterialList(Index2).ParamList(Index3).dAngComp, dAngComp)
|
||||
Next
|
||||
Next
|
||||
Next
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
|
||||
@@ -445,6 +445,12 @@ Public Class WaterjetDbWindowVM
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property AngComp_Msg As String
|
||||
Get
|
||||
Return "Ang"
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property New_Msg As String
|
||||
Get
|
||||
Return "Nuovo"
|
||||
@@ -516,7 +522,14 @@ Public Class WaterjetDbWindowVM
|
||||
StringToDouble(sParams(4), dQ4)
|
||||
StringToDouble(sParams(5), dQ5)
|
||||
StringToDouble(sParams(6), dQExtra)
|
||||
QParamList.Add(New WjParam(QInd, dThickness, dQ1, dQ2, dQ3, dQ4, dQ5, dQExtra, m_refWaterPageV))
|
||||
Dim LocalWjParam As New WjParam(QInd, dThickness, dQ1, dQ2, dQ3, dQ4, dQ5, dQExtra, m_refWaterPageV)
|
||||
QParamList.Add(LocalWjParam)
|
||||
' leggo il nuovo parametro di correzione conicità (di default il parametro è 0)
|
||||
If sParams.Length() >= 8 Then
|
||||
Dim dAngCompo As Double
|
||||
StringToDouble(sParams(7), dAngCompo)
|
||||
LocalWjParam.dAngComp = dAngCompo
|
||||
End If
|
||||
End If
|
||||
QInd += 1
|
||||
End While
|
||||
@@ -868,6 +881,17 @@ Public Class WjParam
|
||||
End Set
|
||||
End Property
|
||||
|
||||
' angolo di compensazione conicità getto: 01/02/2023 ver 2.5b1
|
||||
Private m_dAngComp As Double = 0
|
||||
Public Property dAngComp As Double
|
||||
Get
|
||||
Return m_dAngComp
|
||||
End Get
|
||||
Set(value As Double)
|
||||
m_dAngComp = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property ParamLstBx_Width As Double
|
||||
Get
|
||||
Return m_refWaterPageV.ParamsGpBx.ActualWidth - 20
|
||||
|
||||
@@ -0,0 +1,61 @@
|
||||
Imports System.Collections.ObjectModel
|
||||
Imports System.IO
|
||||
Imports EgtUILib
|
||||
Imports EgtWPFLib5
|
||||
Imports EgtWPFLib
|
||||
|
||||
' nuova libreria EgtWPFLib5 ver 2.4g1
|
||||
Public Class WaterjetDbWindowVM_OmagCUT
|
||||
Inherits EgtWPFLib5.WaterjetDbWindowVM
|
||||
|
||||
Public Function CloseWaterjetDb_OmagCut(MainWindow As Window) As SaveWndBtnEnum
|
||||
If bIsModified Then
|
||||
Dim SaveWjDbWnd As New EgtMsgBox(MainWindow, "", EgtMsg(31759), EgtMsgBox.Buttons.YES_NO_CANCEL, EgtMsgBox.Icons.NULL)
|
||||
Select Case SaveWjDbWnd.m_nPressedBtn
|
||||
Case 1 ' Yes
|
||||
WriteWaterjetDb()
|
||||
bIsModified = False
|
||||
Return SaveWndBtnEnum.YES
|
||||
Case 2 ' No
|
||||
Return SaveWndBtnEnum.NO
|
||||
Case Else ' Cancel
|
||||
Return SaveWndBtnEnum.CANCEL
|
||||
End Select
|
||||
Else
|
||||
Dim bExitFor As Boolean = False
|
||||
For Each Material As EgtWPFLib5.WjMaterial In MaterialList
|
||||
If Not IsNothing(Material.SubMaterialList) Then
|
||||
For Each SubMaterial As EgtWPFLib5.WjSubMaterial In Material.SubMaterialList
|
||||
If Not IsNothing(SubMaterial.ParamList) Then
|
||||
For Each QParam As EgtWPFLib5.WjParam In SubMaterial.ParamList
|
||||
bExitFor = QParam.IsModified()
|
||||
If bExitFor Then Exit For
|
||||
Next
|
||||
End If
|
||||
If bExitFor Then Exit For
|
||||
Next
|
||||
End If
|
||||
If bExitFor Then Exit For
|
||||
Next
|
||||
If bExitFor Then
|
||||
Dim SaveWjDbWnd As New EgtMsgBox(MainWindow, "", EgtMsg(31759), EgtMsgBox.Buttons.YES_NO_CANCEL, EgtMsgBox.Icons.NULL)
|
||||
Select Case SaveWjDbWnd.m_nPressedBtn
|
||||
Case 1 ' Yes
|
||||
WriteWaterjetDb()
|
||||
bIsModified = False
|
||||
Return SaveWndBtnEnum.YES
|
||||
Case 2 ' No
|
||||
Return SaveWndBtnEnum.NO
|
||||
Case Else ' Cancel
|
||||
Return SaveWndBtnEnum.CANCEL
|
||||
End Select
|
||||
End If
|
||||
End If
|
||||
Return SaveWndBtnEnum.YES
|
||||
End Function
|
||||
|
||||
Sub New(sMachDir As String)
|
||||
MyBase.New(sMachDir)
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
+1
-1
@@ -53,7 +53,7 @@
|
||||
</ToggleButton>
|
||||
</Grid>
|
||||
|
||||
<Button Grid.Column="2" Style="{DynamicResource OmagCut_BlueIconButton}" Click="ExitBtn_Click">
|
||||
<Button Name="ExitBtn" Grid.Column="2" Style="{DynamicResource OmagCut_BlueIconButton}" Click="ExitBtn_Click">
|
||||
<Image Source="{DynamicResource XImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
|
||||
|
||||
+121
-21
@@ -2,6 +2,7 @@
|
||||
Imports System.Collections.ObjectModel
|
||||
Imports EgtUILib
|
||||
Imports EgtWPFLib
|
||||
Imports EgtPHOTOLib
|
||||
Imports System.ComponentModel
|
||||
Imports System.Threading
|
||||
Imports System.Windows.Threading
|
||||
@@ -37,6 +38,8 @@ Class MainWindow
|
||||
Friend m_MachinePageUC As MachinePageUC
|
||||
Friend m_OptionsPageUC As OptionsPageUC
|
||||
|
||||
Friend m_IsClosingApplication As Integer = 0
|
||||
|
||||
' Dichiarazione variabili direttori
|
||||
Private m_sExeRoot As String = String.Empty
|
||||
Private m_sDataRoot As String = String.Empty
|
||||
@@ -97,6 +100,7 @@ Class MainWindow
|
||||
OFFICE_TYPE = 2 ^ 19 ' 524288
|
||||
REGISTRATION = 2 ^ 20 ' 1048576
|
||||
SIMPLESTATISTICS = 2 ^ 21 ' 2097152
|
||||
COMPOFRAME = 2 ^ 22 ' 4194304
|
||||
End Enum
|
||||
' Opzione nesting automatico
|
||||
Private m_bAutoNest As Boolean = False
|
||||
@@ -302,7 +306,7 @@ Class MainWindow
|
||||
GetPrivateProfileString(S_MACH, K_CURRMACH, "", m_sCurrMachine, m_sIniFile)
|
||||
' Impostazione path MachIni file
|
||||
m_sMachIniFile = m_sMachinesRoot & "\" & m_sCurrMachine & "\" & m_sCurrMachine & ".ini"
|
||||
' Impostazione path KitIni file
|
||||
' Impostazione path Kit file
|
||||
m_sKitsFile = m_sMachinesRoot & "\" & m_sCurrMachine & "\" & MACHININGS_DIR & "\" & KITS_FILE
|
||||
' Imposto tipo di chiave
|
||||
#If TRIAL Then
|
||||
@@ -320,11 +324,13 @@ Class MainWindow
|
||||
Dim sNestKey As String = ""
|
||||
EgtUILib.GetPrivateProfileString(S_LICENCE, K_NESTKEY, "", sNestKey, sLicFile)
|
||||
EgtSetNestKey(sNestKey)
|
||||
Dim bNetHwKey As Boolean = ( GetPrivateProfileInt(S_GENERAL, K_NETKEY, 0, m_sIniFile) = 1)
|
||||
EgtSetNetHwKey( bNetHwKey)
|
||||
' Verifico abilitazione nesting automatico
|
||||
m_bAutoNest = Not String.IsNullOrWhiteSpace(sNestKey)
|
||||
' Recupero opzioni della chiave
|
||||
Dim bKey As Boolean = EgtGetKeyLevel(9423, 2406, 1, m_nKeyLevel) And
|
||||
EgtGetKeyOptions(9423, 2406, 1, m_nKeyOptions)
|
||||
Dim bKey As Boolean = EgtGetKeyLevel(9423, 2506, 1, m_nKeyLevel) And
|
||||
EgtGetKeyOptions(9423, 2506, 1, m_nKeyOptions)
|
||||
' Verifico abilitazione prodotto
|
||||
Dim bProd As Boolean = GetKeyOption(KEY_OPT.CUT_BASE)
|
||||
' Inizializzazione generale di EgtInterface
|
||||
@@ -498,6 +504,64 @@ Class MainWindow
|
||||
AddHandler m_ProdLineTimer.Tick, AddressOf OnProdLine
|
||||
' Imposto riferimento a funzione delle textbox che disattiva scene in libreria
|
||||
EgtWPFLib.EgtTextBox.m_refScenesIsEnabled = AddressOf IsEnabledScenes
|
||||
|
||||
' --------------------------------- SLAB DB -------------------------------------------------------
|
||||
If GetPrivateProfileInt(S_SCRAPS, K_ENABLESCRAPS, 0, GetIniFile()) <> 0 Then
|
||||
' leggo il direttorio in cui cercare il database delle lastre
|
||||
Dim PhotDir As String = String.Empty
|
||||
GetPrivateProfileString(S_SCRAPS, K_PHOTODIR, "", PhotDir, GetIniFile())
|
||||
' verifico che esista il file "OmagPHOTOVb.sqlite" nel direttorio inidicato
|
||||
If System.IO.File.Exists(PhotDir.Trim & "\" & DB_FILENAME) Then
|
||||
|
||||
If Not ManageDb.ConnectToDb(PhotDir.Trim & "\" & DB_FILENAME) Then
|
||||
EgtOutLog("Error connecting to DB: " & PhotDir.Trim & "\" & DB_FILENAME)
|
||||
' coumico che il grezzo contiene un pezzo e quindi non può essere definito come grezzo
|
||||
m_CurrentProjectPageUC.ClearMessage()
|
||||
m_CurrentProjectPageUC.SetErrorMessage("Denied connection SlabDB")
|
||||
Else
|
||||
' Impostazione direttorio per backup
|
||||
Dim BackUpDir As String = m_sDataRoot & "\BackUp"
|
||||
Directory.CreateDirectory(BackUpDir)
|
||||
EgtPHOTOLib.MainData.SetConfigDir(m_sConfigDir)
|
||||
EgtPHOTOLib.MainData.SetKeyLevel(m_nKeyLevel)
|
||||
EgtPHOTOLib.MainData.SetKeyOptions(CInt(m_nKeyOptions))
|
||||
EgtPHOTOLib.MainData.SetPhotoDir(PhotDir)
|
||||
EgtPHOTOLib.MainData.SetBackUpDir(BackUpDir)
|
||||
EgtPHOTOLib.MainData.SetIsOMagCUT(True)
|
||||
Dim sLastBlock As String = String.Empty
|
||||
GetPrivateProfileString(S_SCRAPS, K_LASTBLOCK, "", sLastBlock, GetIniFile())
|
||||
If Not String.IsNullOrEmpty(sLastBlock) Then
|
||||
EgtPHOTOLib.MainData.SetLastBlock(sLastBlock)
|
||||
End If
|
||||
|
||||
If GetPrivateProfileInt(S_SCRAPS, K_ENABLE_PRINTER, 0, GetIniFile()) = 1 Then
|
||||
' leggo nome file prn (per stampante zebra)
|
||||
Dim m_TemplateFilePrinter As String = String.Empty
|
||||
GetPrivateProfileString(S_SCRAPS, K_TEMPLATE, m_sDataRoot & "\Label\Default.prn", m_TemplateFilePrinter, GetIniFile())
|
||||
' leggo nome del direttorio in cui scrivere il file ini (per stampante zebra) -- solo se si desidera scrivere il file in un direttorio diverso
|
||||
Dim m_DatFilePrinter As String = String.Empty
|
||||
GetPrivateProfileString(S_SCRAPS, K_DAT, m_sDataRoot & "\Temp", m_DatFilePrinter, GetIniFile())
|
||||
' leggo nome file exe (per stampante zebra)
|
||||
Dim m_ZebraUtilitiesExe As String = String.Empty
|
||||
GetPrivateProfileString(S_SCRAPS, K_ZEBRAUTILITIES, System.AppDomain.CurrentDomain.BaseDirectory & "ZebraPrinterUtilitiesR32.exe", m_ZebraUtilitiesExe, GetIniFile())
|
||||
EgtPHOTOLib.MainData.SetTemplateFilePrinter(m_TemplateFilePrinter)
|
||||
EgtPHOTOLib.MainData.SetDataFilePrinter(m_DatFilePrinter)
|
||||
EgtPHOTOLib.MainData.SetZebraPrinterExe(m_ZebraUtilitiesExe)
|
||||
EgtPHOTOLib.MainData.SetPrinterVisibility(True)
|
||||
Else
|
||||
EgtPHOTOLib.MainData.SetPrinterVisibility(False)
|
||||
End If
|
||||
|
||||
' è permessa una sola istanza alla volta del programma OmagCUT -> "(1)" : "(" & nIstance.ToString & ")"
|
||||
EgtPHOTOLib.MainData.SetUser(Environment.MachineName & "\" & Environment.UserName & " (1)")
|
||||
Dim sIdKey As String = String.Empty
|
||||
EgtGetKeyInfo(sIdKey)
|
||||
EgtPHOTOLib.MainData.SetKey(sIdKey)
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
' --------------------------------- SLAB DB -------------------------------------------------------
|
||||
ExitBtn.ToolTip = "Exit" & vbCrLf & "Minimize (Shift)"
|
||||
End Sub
|
||||
|
||||
Private Sub ManageSingleIstance()
|
||||
@@ -546,6 +610,16 @@ Class MainWindow
|
||||
m_WorkInProgressPageUC.Prepare()
|
||||
m_WorkInProgressPageUC.UpdateTools()
|
||||
|
||||
Dim sVal As String = String.Empty
|
||||
If m_CurrentMachine.GetUserNote("FsevLength", sVal, m_CurrentMachine.sCurrSaw) Then
|
||||
StringToDouble(sVal, m_CurrentMachine.dFsevLength)
|
||||
m_CurrentMachine.SetFsevLength(m_CurrentMachine.dFsevLength)
|
||||
End If
|
||||
If m_CurrentMachine.GetUserNote("FsevPerc", sVal, m_CurrentMachine.sCurrSaw) Then
|
||||
StringToDouble(sVal, m_CurrentMachine.dFsevPerc)
|
||||
m_CurrentMachine.SetFsevPerc(m_CurrentMachine.dFsevPerc)
|
||||
End If
|
||||
|
||||
' Se macchina fotografica abilitata, ne inizializzo il gestore
|
||||
#If Not TRIAL Then
|
||||
If GetKeyOption(MainWindow.KEY_OPT.MAN_PHOTO) Then
|
||||
@@ -623,6 +697,8 @@ Class MainWindow
|
||||
MainWindowGrid.Children.Remove(m_OptionsPageUC)
|
||||
MainWindowGrid.Children.Add(m_WorkInProgressPageUC)
|
||||
m_ActivePage = Pages.WorkInProgress
|
||||
Case Else
|
||||
WorkInProgressBtn.IsChecked = False
|
||||
End Select
|
||||
End Sub
|
||||
|
||||
@@ -681,6 +757,8 @@ Class MainWindow
|
||||
MainWindowGrid.Children.Add(m_CurrentProjectPageUC)
|
||||
m_CurrentProjectPageUC.CurrentProjectPageGrid.Children.Add(m_DirectCutPageUC)
|
||||
m_ActivePage = Pages.DirectCut
|
||||
Case Else
|
||||
WorkInProgressBtn.IsChecked = False
|
||||
End Select
|
||||
End Sub
|
||||
|
||||
@@ -736,6 +814,8 @@ Class MainWindow
|
||||
MainWindowGrid.Children.Add(m_CurrentProjectPageUC)
|
||||
m_CurrentProjectPageUC.CurrentProjectPageGrid.Children.Add(m_CadCutPageUC)
|
||||
m_ActivePage = Pages.CadCut
|
||||
Case Else
|
||||
CadCutBtn.IsChecked = False
|
||||
End Select
|
||||
End Sub
|
||||
|
||||
@@ -792,6 +872,8 @@ Class MainWindow
|
||||
MainWindowGrid.Children.Add(m_CurrentProjectPageUC)
|
||||
m_CurrentProjectPageUC.CurrentProjectPageGrid.Children.Add(m_FrameCutPageUC)
|
||||
m_ActivePage = Pages.FrameCut
|
||||
Case Else
|
||||
If FrameCutBtn.IsEnabled Then FrameCutBtn.IsChecked = False
|
||||
End Select
|
||||
End Sub
|
||||
|
||||
@@ -843,6 +925,8 @@ Class MainWindow
|
||||
MainWindowGrid.Children.Remove(m_OptionsPageUC)
|
||||
MainWindowGrid.Children.Add(m_MachinePageUC)
|
||||
m_ActivePage = Pages.Machine
|
||||
Case Else
|
||||
MachineBtn.IsChecked = False
|
||||
End Select
|
||||
End Sub
|
||||
|
||||
@@ -899,7 +983,7 @@ Class MainWindow
|
||||
MainWindowGrid.Children.Add(m_OptionsPageUC)
|
||||
m_ActivePage = Pages.Options
|
||||
Case Pages.Options
|
||||
OptionsBtn.IsChecked = True
|
||||
OptionsBtn.IsChecked = False
|
||||
End Select
|
||||
End Sub
|
||||
|
||||
@@ -1004,6 +1088,19 @@ Class MainWindow
|
||||
m_CurrentProjectPageUC.SaveNamedProject()
|
||||
m_CurrentProjectPageUC.SaveProject()
|
||||
End If
|
||||
' Inizio la chiusura del programma (verifico di aver terminato il processo DripFeed)
|
||||
EgtOutLog("Iniziato processo di chiusura programma")
|
||||
m_IsClosingApplication = 1
|
||||
Dim nCount As Integer = 0
|
||||
While m_IsClosingApplication <> 2
|
||||
If nCount > 5 Then
|
||||
Exit While
|
||||
End If
|
||||
' verifico che il processo DripFeed sia terminato
|
||||
EgtOutLog("Stato chiusura programma: " & m_IsClosingApplication.ToString)
|
||||
Thread.Sleep(100)
|
||||
nCount += 1
|
||||
End While
|
||||
' Uscita
|
||||
MainWindowExit()
|
||||
End Sub
|
||||
@@ -1045,19 +1142,21 @@ Class MainWindow
|
||||
' Se non sono in tagli diretti tutto ok
|
||||
If m_ActivePage <> Pages.DirectCut Then Return True
|
||||
' Concludo le attività in corso
|
||||
Select Case m_DirectCutPageUC.m_ActiveDirectCutPage
|
||||
Case DirectCutPageUC.DirectCutPages.SingleCut
|
||||
m_DirectCutPageUC.m_SingleCut.SingleCut_Unloaded(sender, e)
|
||||
Case DirectCutPageUC.DirectCutPages.MultipleCut
|
||||
m_DirectCutPageUC.m_MultipleCut.MultipleCut_Unloaded(sender, e)
|
||||
Case DirectCutPageUC.DirectCutPages.GridCut
|
||||
m_DirectCutPageUC.m_GridCut.GridCut_Unloaded(sender, e)
|
||||
Case DirectCutPageUC.DirectCutPages.CopyTemplate
|
||||
m_DirectCutPageUC.m_CopyTemplate.CopyTemplate_Unloaded(sender, e)
|
||||
Case DirectCutPageUC.DirectCutPages.FlatteningCut
|
||||
m_DirectCutPageUC.m_FlatteningCut.FlatteningCut_Unloaded(sender, e)
|
||||
Case DirectCutPageUC.DirectCutPages.SawTest
|
||||
m_DirectCutPageUC.m_SawTest.SawTest_Unloaded(sender, e)
|
||||
Select Case m_DirectCutPageUC.m_ControlsDirectCutUC.m_ActiveDirectCutPage
|
||||
Case ControlsDirectCutUC.DirectCutPages.SingleCut
|
||||
m_DirectCutPageUC.m_ControlsDirectCutUC.m_SingleCut.SingleCut_Unloaded(sender, e)
|
||||
Case ControlsDirectCutUC.DirectCutPages.MultipleCut
|
||||
m_DirectCutPageUC.m_ControlsDirectCutUC.m_MultipleCut.MultipleCut_Unloaded(sender, e)
|
||||
Case ControlsDirectCutUC.DirectCutPages.GridCut
|
||||
m_DirectCutPageUC.m_ControlsDirectCutUC.m_GridCut.GridCut_Unloaded(sender, e)
|
||||
Case ControlsDirectCutUC.DirectCutPages.FlatteningCut
|
||||
m_DirectCutPageUC.m_ControlsDirectCutUC.m_FlatteningCut.FlatteningCut_Unloaded(sender, e)
|
||||
Case ControlsDirectCutUC.DirectCutPages.CopyTemplate
|
||||
m_DirectCutPageUC.m_ControlsDirectCutUC1.m_CopyTemplate.CopyTemplate_Unloaded(sender, e)
|
||||
Case ControlsDirectCutUC.DirectCutPages.Polishing
|
||||
m_DirectCutPageUC.m_ControlsDirectCutUC1.m_Polishing.Polishing_Unloaded(sender, e)
|
||||
Case ControlsDirectCutUC.DirectCutPages.SawTest
|
||||
m_DirectCutPageUC.m_ControlsDirectCutUC1.m_SawTest.SawTest_Unloaded(sender, e)
|
||||
End Select
|
||||
Return True
|
||||
End Function
|
||||
@@ -1092,10 +1191,10 @@ Class MainWindow
|
||||
Case MachinePageUC.MachinePages.WaterJet
|
||||
' Verifica ed eventuale salvataggio Db Waterjet
|
||||
Dim m_MainWindow As MainWindow = DirectCast(Application.Current.MainWindow, MainWindow)
|
||||
Dim nPressedBtn As Integer = DirectCast(m_MachinePageUC.m_WaterJetPageUC.DataContext, EgtWPFLib5.WaterjetDbWindowVM).CloseWaterjetDb_OmagCut(m_MainWindow)
|
||||
If nPressedBtn = EgtWPFLib5.WaterjetDbWindowVM.SaveWndBtnEnum.CANCEL Then
|
||||
Dim nPressedBtn As Integer = DirectCast(m_MachinePageUC.m_WaterJetPageUC.DataContext, WaterjetDbWindowVM_OmagCUT).CloseWaterjetDb_OmagCut(m_MainWindow)
|
||||
If nPressedBtn = WaterjetDbWindowVM_OmagCUT.SaveWndBtnEnum.CANCEL Then
|
||||
Return False
|
||||
ElseIf nPressedBtn = EgtWPFLib5.WaterjetDbWindowVM.SaveWndBtnEnum.NO Then
|
||||
ElseIf nPressedBtn = WaterjetDbWindowVM_OmagCUT.SaveWndBtnEnum.NO Then
|
||||
m_MachinePageUC.m_WaterJetPageUC.WaterJetPage_Reinitialize()
|
||||
End If
|
||||
End Select
|
||||
@@ -1128,7 +1227,8 @@ Class MainWindow
|
||||
m_ProdLineTimer.Interval = TimeSpan.FromMilliseconds(2000)
|
||||
m_ProdLineTimer.Start()
|
||||
End If
|
||||
|
||||
' di default attivo la pagina CadCut
|
||||
m_ActivePage = MainWindow.Pages.CadCut
|
||||
' seleziono il tipo di avvio
|
||||
m_CurrentProjectPageUC.StartProgram()
|
||||
' aggiorno la grafica
|
||||
|
||||
@@ -20,9 +20,9 @@ Imports System.Windows
|
||||
<Assembly: AssemblyTitle("OmagCUTR32.exe")>
|
||||
<Assembly: AssemblyDescription("OmagCUT 32 bit")>
|
||||
#End If
|
||||
<Assembly: AssemblyCompany("EgalTech s.r.l.")>
|
||||
<Assembly: AssemblyCompany("Egalware s.r.l.")>
|
||||
<Assembly: AssemblyProduct("OmagCUT")>
|
||||
<Assembly: AssemblyCopyright("Copyright © 2015-2022 by EgalTech s.r.l.")>
|
||||
<Assembly: AssemblyCopyright("Copyright © 2015-2023 by Egalware s.r.l.")>
|
||||
<Assembly: AssemblyTrademark("")>
|
||||
<Assembly: ComVisible(False)>
|
||||
|
||||
@@ -62,5 +62,5 @@ Imports System.Windows
|
||||
' by using the '*' as shown below:
|
||||
' <Assembly: AssemblyVersion("1.0.*")>
|
||||
|
||||
<Assembly: AssemblyVersion("2.4.6.1")>
|
||||
<Assembly: AssemblyFileVersion("2.4.6.1")>
|
||||
<Assembly: AssemblyVersion("2.5.6.2")>
|
||||
<Assembly: AssemblyFileVersion("2.5.6.2")>
|
||||
|
||||
+303
-9
@@ -2,6 +2,8 @@
|
||||
Imports System.Globalization
|
||||
Imports System.Collections.ObjectModel
|
||||
Imports EgtUILib
|
||||
Imports System.IO
|
||||
Imports System.Text
|
||||
|
||||
Public Class CNCommunication
|
||||
|
||||
@@ -31,6 +33,7 @@ Public Class CNCommunication
|
||||
Private m_bNewDeltaData As Boolean = True
|
||||
Private m_bNewVarData As Boolean = False
|
||||
Private m_bTimerBusy As Boolean = False
|
||||
Private m_bTimerAxesBusy As Boolean = False
|
||||
|
||||
Private m_IsNewConsole As Boolean = False
|
||||
|
||||
@@ -39,6 +42,7 @@ Public Class CNCommunication
|
||||
|
||||
' Timer
|
||||
Private m_RefreshTimer As New DispatcherTimer
|
||||
Private m_RefreshAxesFanuc As New DispatcherTimer
|
||||
|
||||
' Nomi e indici degli assi macchina
|
||||
Private m_bAxesOk As Boolean = False
|
||||
@@ -101,6 +105,12 @@ Public Class CNCommunication
|
||||
m_RefreshTimer.Interval = TimeSpan.FromMilliseconds(100)
|
||||
m_RefreshTimer.Start()
|
||||
End If
|
||||
' solo per controllo FANUC creo un timer apposito solo per la lettura degli assi
|
||||
If m_nNCType = 4 Then
|
||||
AddHandler m_RefreshAxesFanuc.Tick, AddressOf RefreshAxesFanucTimer_tick
|
||||
m_RefreshAxesFanuc.Interval = TimeSpan.FromMilliseconds(50)
|
||||
m_RefreshAxesFanuc.Start()
|
||||
End If
|
||||
|
||||
' Leggo dati sugli assi della macchina
|
||||
ReadAxesData()
|
||||
@@ -117,6 +127,8 @@ Public Class CNCommunication
|
||||
|
||||
If m_nNCType = 3 Then
|
||||
RefreshNoEvents()
|
||||
ElseIf m_nNCType = 4 Then
|
||||
RefreshFANUC()
|
||||
Else
|
||||
Refresh()
|
||||
End If
|
||||
@@ -129,8 +141,22 @@ Public Class CNCommunication
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub RefreshAxesFanucTimer_tick()
|
||||
If Not m_bTimerAxesBusy Then
|
||||
m_bTimerAxesBusy = True
|
||||
m_RefreshAxesFanuc.Stop()
|
||||
|
||||
RefreshAxesFANUC()
|
||||
|
||||
m_bTimerAxesBusy = False
|
||||
m_RefreshAxesFanuc.Start()
|
||||
Else
|
||||
Dim nDummy As Integer = 10
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub ReadAxesData()
|
||||
' Nomi e indici degli assi macchina
|
||||
' Nomi e indici degli assi macchina: definisco il nome degli assi da satampare nella pagina MachineStatusUC
|
||||
m_bAxesOk = True
|
||||
GetPrivateProfileString(S_AXES, K_L1NAME, "X", m_sA1, m_MainWindow.GetMachIniFile())
|
||||
m_nA1 = GetPrivateProfileInt(S_AXES, K_L1ID, 0, m_MainWindow.GetMachIniFile())
|
||||
@@ -222,6 +248,11 @@ Public Class CNCommunication
|
||||
m_CN = New Num.NumNC
|
||||
Case 3
|
||||
m_CN = New CN_Siemens
|
||||
Case 4
|
||||
' Fanuc
|
||||
m_CN = New Fanuc.Fanuc
|
||||
' proveddo a sovrscrivere i datti di comunicazione PC-NC settati di default nella classe CN_Generico
|
||||
m_MainWindow.m_CurrentMachine.InitFANUC(m_CN)
|
||||
End Select
|
||||
' Recupero la stringa di inizializzazione della comunicazione
|
||||
|
||||
@@ -354,8 +385,13 @@ Public Class CNCommunication
|
||||
If Not String.IsNullOrEmpty(sVal) Then m_CN.SetCnDataVar(CN_generico.CnData.Remote, sVal)
|
||||
End If
|
||||
|
||||
' Inizializzo la comunicazione
|
||||
m_CN.Init()
|
||||
' Solo per controllo FANUNC
|
||||
GetPrivateProfileString(S_NCDATA, K_NAXES, "", sVal, m_MainWindow.GetMachIniFile())
|
||||
m_CN.SetCnDataVar(CN_generico.CnData.nAxes, sVal)
|
||||
|
||||
|
||||
' Inizializzo la comunicazione
|
||||
m_CN.Init()
|
||||
|
||||
Catch ex As Exception
|
||||
' set status to statusbar
|
||||
@@ -418,6 +454,17 @@ Public Class CNCommunication
|
||||
m_MachineStatus.MachineStatusGrid.Background = Application.Current.FindResource("OmagCut_Red")
|
||||
End Try
|
||||
End If
|
||||
Case 4
|
||||
If IsNothing(m_CN) OrElse m_CN.n_state < 2 Then
|
||||
' Per evitare crash con azioni verso il controllo, avvio quello di debug
|
||||
m_nNCType = 0
|
||||
Me.m_CN = New CN_Debug
|
||||
m_MachineStatus.MachineStatusGrid.Background = Application.Current.FindResource("OmagCut_Red")
|
||||
Else
|
||||
' ATTENZIONE: durante l'inizializzazione della classe il vettore che contiene tutti gli indirizzi di memoria non è caricato
|
||||
m_CN.b_axis_events_enable = True
|
||||
m_MachineStatus.MachineStatusGrid.Background = Application.Current.FindResource("OmagCut_DarkGray")
|
||||
End If
|
||||
End Select
|
||||
|
||||
' Assegno riferimento al CN alle diverse pagine
|
||||
@@ -464,6 +511,7 @@ Public Class CNCommunication
|
||||
m_MachineStatus.DisplayPositionDelta()
|
||||
End If
|
||||
|
||||
' ----- INIZIO: lettura diretta di specifiche vaiabili -----
|
||||
If m_CN.b_feed_changed Then
|
||||
m_CN.b_feed_changed = False
|
||||
m_MachineStatus.DisplayFeed()
|
||||
@@ -490,12 +538,14 @@ Public Class CNCommunication
|
||||
'FrmMain.LblToolRad.Text = cn.Tools(0).radius.ToString
|
||||
'FrmMain.LblToolComp.Text = cn.Tools(0).comp_num.ToString
|
||||
End If
|
||||
' ----- FINE : lettura diretta di specifiche vaiabili -----
|
||||
|
||||
Select Case m_nNCType
|
||||
Case 1
|
||||
If m_CN.read_active_mode() <> m_nCurrMode Then
|
||||
m_nCurrMode = m_CN.read_active_mode()
|
||||
m_MachineStatus.DisplayActiveMode(m_nCurrMode)
|
||||
m_CN.nMachineMode = m_nCurrMode
|
||||
End If
|
||||
Case 2
|
||||
If m_CN.nMachineMode <> m_nCurrMode Then
|
||||
@@ -530,6 +580,7 @@ Public Class CNCommunication
|
||||
'End If
|
||||
End If
|
||||
|
||||
' QUESTE VARIABILI NON SONO LETTE IN QUANTO NON SONO STATE CARICATE → vedere come esempio il NUM che assegna queste variabili
|
||||
' Flag e variabili per bottoni macchina, che verifico solo nelle pagine in cui ci sono
|
||||
If m_MainWindow.m_ActivePage = MainWindow.Pages.DirectCut Then
|
||||
If m_MainWindow.m_DirectCutPageUC.m_NewMachineButtonsType Then
|
||||
@@ -568,8 +619,14 @@ Public Class CNCommunication
|
||||
m_MainWindow.m_DirectCutPageUC.m_VacuumMachineButton.CloseAllChanged(m_CN.bCloseAllState)
|
||||
m_MainWindow.m_DirectCutPageUC.m_VacuumMachineButton.Open123Changed(m_CN.bOpen123State)
|
||||
m_MainWindow.m_DirectCutPageUC.m_VacuumMachineButton.Open456Changed(m_CN.bOpen456State)
|
||||
m_MainWindow.m_DirectCutPageUC.m_VacuumMachineButton.Close123Changed(m_CN.bClose123State)
|
||||
m_MainWindow.m_DirectCutPageUC.m_VacuumMachineButton.Close456Changed(m_CN.bClose456State)
|
||||
' in assenza della configurazione delle variabili Close123 e Close456
|
||||
If Not String.IsNullOrEmpty(m_CN.m_szCnDataVar(CN_generico.CnData.Close123State)) Then
|
||||
m_MainWindow.m_DirectCutPageUC.m_VacuumMachineButton.Close123Changed(m_CN.bClose123State)
|
||||
m_MainWindow.m_DirectCutPageUC.m_VacuumMachineButton.Close456Changed(m_CN.bClose456State)
|
||||
Else
|
||||
m_MainWindow.m_DirectCutPageUC.m_VacuumMachineButton.Close123Changed(Not m_CN.bOpen123State)
|
||||
m_MainWindow.m_DirectCutPageUC.m_VacuumMachineButton.Close456Changed(Not m_CN.bOpen456State)
|
||||
End If
|
||||
m_MainWindow.m_DirectCutPageUC.m_VacuumMachineButton.BlowChanged(m_CN.bBlowState)
|
||||
m_MainWindow.m_DirectCutPageUC.m_VacuumMachineButton.VacuumOnChanged(m_CN.bVacuumOn)
|
||||
m_MainWindow.m_DirectCutPageUC.m_VacuumMachineButton.VacuumOffChanged(m_CN.bVacuumOff)
|
||||
@@ -581,6 +638,180 @@ Public Class CNCommunication
|
||||
m_MainWindow.m_DirectCutPageUC.ZCJogChanged(m_CN.bZCJog)
|
||||
m_MainWindow.m_DirectCutPageUC.ZBJogChanged(m_CN.bZBCJog)
|
||||
m_MainWindow.m_DirectCutPageUC.RemoteChanged(m_CN.bRemote)
|
||||
m_MainWindow.m_DirectCutPageUC.ParkingStateChanged(m_CN.bParkingState)
|
||||
End If
|
||||
Else
|
||||
m_MainWindow.m_DirectCutPageUC.m_MachineButtons.SpindleStateChanged(m_CN.bSpindleState)
|
||||
m_MainWindow.m_DirectCutPageUC.m_MachineButtons.CoolantStateChanged(m_CN.bCoolantState OrElse m_CN.bInternalCoolantState OrElse m_CN.bExternCoolantState)
|
||||
m_MainWindow.m_DirectCutPageUC.m_MachineButtons.LaserStateChanged(m_CN.bLaserState)
|
||||
m_MainWindow.m_DirectCutPageUC.m_MachineButtons.LaserTracStateChanged(m_CN.bLaserTracState)
|
||||
If m_CN.Is_G24_active() Then
|
||||
m_MainWindow.m_DirectCutPageUC.m_MachineButtons.ThreeAxisStateChanged(False)
|
||||
m_MainWindow.m_DirectCutPageUC.m_MachineButtons.FiveAxisStateChanged(True)
|
||||
Else
|
||||
m_MainWindow.m_DirectCutPageUC.m_MachineButtons.ThreeAxisStateChanged(True)
|
||||
m_MainWindow.m_DirectCutPageUC.m_MachineButtons.FiveAxisStateChanged(False)
|
||||
End If
|
||||
m_MainWindow.m_DirectCutPageUC.m_MachineButtons.DoorStateChanged(m_CN.nDoorClosedState)
|
||||
m_MainWindow.m_DirectCutPageUC.m_MachineButtons.ParkingStateChanged(m_CN.bParkingState)
|
||||
m_MainWindow.m_DirectCutPageUC.m_MachineButtons.HomeStateChanged(m_CN.bHomeState)
|
||||
m_MainWindow.m_DirectCutPageUC.m_MachineButtons.EnableZoneStateChanged(m_CN.nEnableZone)
|
||||
m_MainWindow.m_DirectCutPageUC.m_MachineButtons.EnablePcStateChanged(m_CN.nEnablePc)
|
||||
m_MainWindow.m_DirectCutPageUC.m_MachineButtons.TableUpChanged(m_CN.bTableUpState)
|
||||
m_MainWindow.m_DirectCutPageUC.m_MachineButtons.TableDownChanged(m_CN.bTableDownState)
|
||||
|
||||
' Nuovi bottoni (uso joystick) per Area4
|
||||
If m_IsNewConsole Then
|
||||
m_MainWindow.m_DirectCutPageUC.m_MachineButtons.XYJogChanged(m_CN.bXYJog)
|
||||
m_MainWindow.m_DirectCutPageUC.m_MachineButtons.ZJogChanged(m_CN.bZCJog)
|
||||
m_MainWindow.m_DirectCutPageUC.m_MachineButtons.BCJogChanged(m_CN.bZBCJog)
|
||||
m_MainWindow.m_DirectCutPageUC.m_MachineButtons.RemoteChanged(m_CN.bRemote)
|
||||
m_MainWindow.m_DirectCutPageUC.ParkingStateChanged(m_CN.bParkingState)
|
||||
End If
|
||||
|
||||
End If
|
||||
End If
|
||||
|
||||
If m_MainWindow.m_ActivePage = MainWindow.Pages.RawPart Then
|
||||
m_MainWindow.m_RawPartPage.m_MachineButtons.LaserStateChanged(m_CN.bLaserState)
|
||||
End If
|
||||
|
||||
' Nuove bottoni (Power Macchina)
|
||||
If m_MainWindow.m_ActivePage = MainWindow.Pages.Machine Then
|
||||
If m_IsNewConsole Then
|
||||
m_MainWindow.m_MachinePageUC.m_MachineCNPageUC.PowerONChanged(m_CN.bPowerON)
|
||||
m_MainWindow.m_MachinePageUC.m_MachineCNPageUC.PowerOFFChanged(Not m_CN.bPowerON)
|
||||
m_MainWindow.m_MachinePageUC.m_MachineCNPageUC.CncModeChange(m_CN.nMachineMode)
|
||||
End If
|
||||
m_MainWindow.m_MachinePageUC.m_MachineCNPageUC.CncModeChange(m_CN.nMachineMode)
|
||||
End If
|
||||
|
||||
|
||||
|
||||
If m_MainWindow.m_ActivePage = MainWindow.Pages.WorkInProgress Then
|
||||
m_MainWindow.m_WorkInProgressPageUC.m_MachineButtons.SpindleStateChanged(m_CN.bSpindleState)
|
||||
m_MainWindow.m_WorkInProgressPageUC.m_MachineButtons.CoolantStateChanged(m_CN.bCoolantState OrElse m_CN.bInternalCoolantState OrElse m_CN.bExternCoolantState)
|
||||
m_MainWindow.m_WorkInProgressPageUC.m_MachineButtons.LaserStateChanged(m_CN.bLaserState)
|
||||
m_MainWindow.m_WorkInProgressPageUC.m_MachineButtons.LaserTracStateChanged(m_CN.bLaserTracState)
|
||||
If m_CN.Is_G24_active() Then
|
||||
m_MainWindow.m_WorkInProgressPageUC.m_MachineButtons.ThreeAxisStateChanged(False)
|
||||
m_MainWindow.m_WorkInProgressPageUC.m_MachineButtons.FiveAxisStateChanged(True)
|
||||
Else
|
||||
m_MainWindow.m_WorkInProgressPageUC.m_MachineButtons.ThreeAxisStateChanged(True)
|
||||
m_MainWindow.m_WorkInProgressPageUC.m_MachineButtons.FiveAxisStateChanged(False)
|
||||
End If
|
||||
m_MainWindow.m_WorkInProgressPageUC.m_MachineButtons.DoorStateChanged(m_CN.nDoorClosedState)
|
||||
m_MainWindow.m_WorkInProgressPageUC.m_MachineButtons.ParkingStateChanged(m_CN.bParkingState)
|
||||
m_MainWindow.m_WorkInProgressPageUC.m_MachineButtons.EnableZoneStateChanged(m_CN.nEnableZone)
|
||||
m_MainWindow.m_WorkInProgressPageUC.m_MachineButtons.EnablePcStateChanged(m_CN.nEnablePc)
|
||||
m_MainWindow.m_WorkInProgressPageUC.m_MachineButtons.TableUpChanged(m_CN.bTableUpState)
|
||||
m_MainWindow.m_WorkInProgressPageUC.m_MachineButtons.TableDownChanged(m_CN.bTableDownState)
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub RefreshAxesFANUC()
|
||||
' ----- INIZIO: lettura diretta di specifiche vaiabili -----
|
||||
' avvio lettura variabili da CN
|
||||
m_CN.Geppo()
|
||||
' notifico valori all'interfaccia
|
||||
m_MachineStatus.DisplayPosition()
|
||||
m_MachineStatus.DisplayPositionDelta()
|
||||
m_MachineStatus.DisplayFeed()
|
||||
m_MachineStatus.DisplaySpeed()
|
||||
m_MachineStatus.DisplayPower()
|
||||
End Sub
|
||||
|
||||
Private Sub RefreshFANUC()
|
||||
' Copia della funzione Refresh
|
||||
|
||||
' ----- INIZIO: lettura diretta di specifiche vaiabili -----
|
||||
'' avvio lettura variabili da CN
|
||||
'm_CN.Geppo()
|
||||
'' notifico valori all'interfaccia
|
||||
'm_MachineStatus.DisplayPosition()
|
||||
'm_MachineStatus.DisplayPositionDelta()
|
||||
'm_MachineStatus.DisplayFeed()
|
||||
'm_MachineStatus.DisplaySpeed()
|
||||
'm_MachineStatus.DisplayPower()
|
||||
' eventualmente carico messaggi di errore
|
||||
ErrorList.Clear()
|
||||
If m_CN.b_NC_error Then
|
||||
ErrorList.Clear()
|
||||
SyncLock m_CN
|
||||
For Each Item As String In m_CN.sz_NC_error_messages
|
||||
ErrorList.Add(Item)
|
||||
Next
|
||||
End SyncLock
|
||||
End If
|
||||
m_AlarmsPage.NcError()
|
||||
' ----- FINE : lettura diretta di specifiche vaiabili -----
|
||||
|
||||
If m_CN.read_active_mode() <> CShort(m_nCurrMode) Then
|
||||
m_nCurrMode = CInt(m_CN.read_active_mode())
|
||||
m_MachineStatus.DisplayActiveMode(m_nCurrMode)
|
||||
m_CN.nMachineMode = m_nCurrMode
|
||||
End If
|
||||
|
||||
' QUESTE VARIABILI NON SONO LETTE IN QUANTO NON SONO STATE CARICATE → vedere come esempio il NUM che assegna queste variabili
|
||||
' Flag e variabili per bottoni macchina, che verifico solo nelle pagine in cui ci sono
|
||||
If m_MainWindow.m_ActivePage = MainWindow.Pages.DirectCut Then
|
||||
If m_MainWindow.m_DirectCutPageUC.m_NewMachineButtonsType Then
|
||||
m_MainWindow.m_DirectCutPageUC.m_ControlsMachineButton.SpindleStateChanged(m_CN.bSpindleState)
|
||||
m_MainWindow.m_DirectCutPageUC.m_ControlsMachineButton.LaserStateChanged(m_CN.bLaserState)
|
||||
m_MainWindow.m_DirectCutPageUC.m_ControlsMachineButton.LaserTracStateChanged(m_CN.bLaserTracState)
|
||||
m_MainWindow.m_DirectCutPageUC.m_ControlsMachineButton.CoolantStateChanged(m_CN.bCoolantState)
|
||||
m_MainWindow.m_DirectCutPageUC.m_ControlsMachineButton.InternalCoolantStateChanged(m_CN.bInternalCoolantState)
|
||||
m_MainWindow.m_DirectCutPageUC.m_ControlsMachineButton.ExternCoolantStateChanged(m_CN.bExternCoolantState)
|
||||
m_MainWindow.m_DirectCutPageUC.m_ControlsMachineButton.CBAxesStateChanged(m_CN.bCBAxesState)
|
||||
m_MainWindow.m_DirectCutPageUC.m_ControlsMachineButton.AirBlowStateChanged(m_CN.bAirBlowState)
|
||||
m_MainWindow.m_DirectCutPageUC.m_ControlsMachineButton.HomeStateChanged(m_CN.bHomeState)
|
||||
m_MainWindow.m_DirectCutPageUC.m_ControlsMachineButton.TableUpChanged(m_CN.bTableUpState)
|
||||
m_MainWindow.m_DirectCutPageUC.m_ControlsMachineButton.TableDownChanged(m_CN.bTableDownState)
|
||||
m_MainWindow.m_DirectCutPageUC.m_ControlsMachineButton.DoorClosedChanged(m_CN.nDoorClosedState)
|
||||
m_MainWindow.m_DirectCutPageUC.m_ControlsMachineButton.LimitZChanged(m_CN.bLimitZState)
|
||||
m_MainWindow.m_DirectCutPageUC.m_ControlsMachineButton.FiveAxisStateChanged(m_CN.Is_G24_active())
|
||||
m_MainWindow.m_DirectCutPageUC.m_ControlsMachineButton.ParkingStateChanged(m_CN.bParkingState)
|
||||
'm_MainWindow.m_DirectCutPageUC.m_ControlsMachineButton.ZoneStateChanged(m_CN.nEnableZone)
|
||||
'm_MainWindow.m_DirectCutPageUC.m_ControlsMachineButton.PcStateChanged(m_CN.nEnablePc)
|
||||
m_MainWindow.m_DirectCutPageUC.m_VacuumMachineButton.VacuumUpChanged(m_CN.bVacuumUp)
|
||||
m_MainWindow.m_DirectCutPageUC.m_VacuumMachineButton.VacuumDownChanged(m_CN.bVacuumDown)
|
||||
m_MainWindow.m_DirectCutPageUC.m_VacuumMachineButton.Vacuum2UpChanged(m_CN.bVacuum2Up)
|
||||
m_MainWindow.m_DirectCutPageUC.m_VacuumMachineButton.Vacuum2DownChanged(m_CN.bVacuum2Down)
|
||||
m_MainWindow.m_DirectCutPageUC.m_VacuumMachineButton.Vacuum0Changed(m_CN.bVacuum0)
|
||||
m_MainWindow.m_DirectCutPageUC.m_VacuumMachineButton.Vacuum90Changed(m_CN.bVacuum90)
|
||||
m_MainWindow.m_DirectCutPageUC.m_VacuumMachineButton.Vacuum1Changed(m_CN.bVacuum1State)
|
||||
m_MainWindow.m_DirectCutPageUC.m_VacuumMachineButton.Vacuum2Changed(m_CN.bVacuum2State)
|
||||
m_MainWindow.m_DirectCutPageUC.m_VacuumMachineButton.Vacuum3Changed(m_CN.bVacuum3State)
|
||||
m_MainWindow.m_DirectCutPageUC.m_VacuumMachineButton.Vacuum4Changed(m_CN.bVacuum4State)
|
||||
m_MainWindow.m_DirectCutPageUC.m_VacuumMachineButton.Vacuum5Changed(m_CN.bVacuum5State)
|
||||
m_MainWindow.m_DirectCutPageUC.m_VacuumMachineButton.Vacuum6Changed(m_CN.bVacuum6State)
|
||||
m_MainWindow.m_DirectCutPageUC.m_VacuumMachineButton.Vacuum135Changed(m_CN.bVacuum135State)
|
||||
m_MainWindow.m_DirectCutPageUC.m_VacuumMachineButton.Vacuum246Changed(m_CN.bVacuum246State)
|
||||
m_MainWindow.m_DirectCutPageUC.m_VacuumMachineButton.OpenAllChanged(m_CN.bOpenAllState)
|
||||
m_MainWindow.m_DirectCutPageUC.m_VacuumMachineButton.CloseAllChanged(m_CN.bCloseAllState)
|
||||
m_MainWindow.m_DirectCutPageUC.m_VacuumMachineButton.Open123Changed(m_CN.bOpen123State)
|
||||
m_MainWindow.m_DirectCutPageUC.m_VacuumMachineButton.Open456Changed(m_CN.bOpen456State)
|
||||
' in assenza della configurazione delle variabili Close123 e Close456
|
||||
If Not String.IsNullOrEmpty(m_CN.m_szCnDataVar(CN_generico.CnData.Close123State)) Then
|
||||
m_MainWindow.m_DirectCutPageUC.m_VacuumMachineButton.Close123Changed(m_CN.bClose123State)
|
||||
m_MainWindow.m_DirectCutPageUC.m_VacuumMachineButton.Close456Changed(m_CN.bClose456State)
|
||||
Else
|
||||
m_MainWindow.m_DirectCutPageUC.m_VacuumMachineButton.Close123Changed(Not m_CN.bOpen123State)
|
||||
m_MainWindow.m_DirectCutPageUC.m_VacuumMachineButton.Close456Changed(Not m_CN.bOpen456State)
|
||||
End If
|
||||
m_MainWindow.m_DirectCutPageUC.m_VacuumMachineButton.BlowChanged(m_CN.bBlowState)
|
||||
m_MainWindow.m_DirectCutPageUC.m_VacuumMachineButton.VacuumOnChanged(m_CN.bVacuumOn)
|
||||
m_MainWindow.m_DirectCutPageUC.m_VacuumMachineButton.VacuumOffChanged(m_CN.bVacuumOff)
|
||||
m_MainWindow.m_DirectCutPageUC.m_VacuumMachineButton.BypassChanged(m_CN.bBypassState)
|
||||
|
||||
' Nuovi bottoni (uso joystick)
|
||||
If m_IsNewConsole Then
|
||||
m_MainWindow.m_DirectCutPageUC.XYJogChanged(m_CN.bXYJog)
|
||||
m_MainWindow.m_DirectCutPageUC.ZCJogChanged(m_CN.bZCJog)
|
||||
m_MainWindow.m_DirectCutPageUC.ZBJogChanged(m_CN.bZBCJog)
|
||||
m_MainWindow.m_DirectCutPageUC.RemoteChanged(m_CN.bRemote)
|
||||
m_MainWindow.m_DirectCutPageUC.ParkingStateChanged(m_CN.bParkingState)
|
||||
End If
|
||||
Else
|
||||
m_MainWindow.m_DirectCutPageUC.m_MachineButtons.SpindleStateChanged(m_CN.bSpindleState)
|
||||
@@ -607,6 +838,7 @@ Public Class CNCommunication
|
||||
m_MainWindow.m_DirectCutPageUC.m_MachineButtons.ZJogChanged(m_CN.bZCJog)
|
||||
m_MainWindow.m_DirectCutPageUC.m_MachineButtons.BCJogChanged(m_CN.bZBCJog)
|
||||
m_MainWindow.m_DirectCutPageUC.m_MachineButtons.RemoteChanged(m_CN.bRemote)
|
||||
m_MainWindow.m_DirectCutPageUC.ParkingStateChanged(m_CN.bParkingState)
|
||||
End If
|
||||
|
||||
End If
|
||||
@@ -617,11 +849,17 @@ Public Class CNCommunication
|
||||
End If
|
||||
|
||||
' Nuove bottoni (Power Macchina)
|
||||
If m_IsNewConsole AndAlso m_MainWindow.m_ActivePage = MainWindow.Pages.Machine Then
|
||||
m_MainWindow.m_MachinePageUC.m_MachineCNPageUC.PowerONChanged(m_CN.bPowerON)
|
||||
m_MainWindow.m_MachinePageUC.m_MachineCNPageUC.PowerOFFChanged(Not m_CN.bPowerON)
|
||||
If m_MainWindow.m_ActivePage = MainWindow.Pages.Machine Then
|
||||
If m_IsNewConsole Then
|
||||
m_MainWindow.m_MachinePageUC.m_MachineCNPageUC.PowerONChanged(m_CN.bPowerON)
|
||||
m_MainWindow.m_MachinePageUC.m_MachineCNPageUC.PowerOFFChanged(Not m_CN.bPowerON)
|
||||
m_MainWindow.m_MachinePageUC.m_MachineCNPageUC.CncModeChange(m_CN.nMachineMode)
|
||||
End If
|
||||
m_MainWindow.m_MachinePageUC.m_MachineCNPageUC.CncModeChange(m_CN.nMachineMode)
|
||||
End If
|
||||
|
||||
|
||||
|
||||
If m_MainWindow.m_ActivePage = MainWindow.Pages.WorkInProgress Then
|
||||
m_MainWindow.m_WorkInProgressPageUC.m_MachineButtons.SpindleStateChanged(m_CN.bSpindleState)
|
||||
m_MainWindow.m_WorkInProgressPageUC.m_MachineButtons.CoolantStateChanged(m_CN.bCoolantState OrElse m_CN.bInternalCoolantState OrElse m_CN.bExternCoolantState)
|
||||
@@ -904,28 +1142,84 @@ Public Class CNCommunication
|
||||
End If
|
||||
' Se richiesta successiva attivazione, faccio reset
|
||||
If bActivate Then
|
||||
EgtOutLog("Call function: DGeneralFunctions_Reset")
|
||||
TimeSpanInit()
|
||||
m_CN.DGeneralFunctions_Reset()
|
||||
EgtOutLog(TimeSpanEnd())
|
||||
End If
|
||||
' Attesa opportuna
|
||||
System.Threading.Thread.Sleep(m_MainWindow.m_CurrentMachine.nResetSendDelay)
|
||||
If m_nNCType = 1 Then
|
||||
' Cancellazione eventuale file già presente con lo stesso nome (ignoro eventuale errore)
|
||||
EgtOutLog("Delete_NC_prog(sNumProg)")
|
||||
TimeSpanInit()
|
||||
m_CN.Delete_NC_prog(sNumProg)
|
||||
EgtOutLog(TimeSpanEnd())
|
||||
' Attesa opportuna
|
||||
System.Threading.Thread.Sleep(100)
|
||||
ElseIf m_nNCType = 4 Then
|
||||
' FANUC: imposto modalità EDIT
|
||||
bOk = bOk AndAlso (m_CN.DGeneralFunctions_WriteCncMode(1) = 0)
|
||||
' Attesa opportuna
|
||||
System.Threading.Thread.Sleep(m_MainWindow.m_CurrentMachine.nThreadSleep)
|
||||
End If
|
||||
EgtOutLog("Download_NC_prog(sCncPath, sNumProg)")
|
||||
' -------------- START DOWNLOAD --------------
|
||||
TimeSpanInit()
|
||||
bOk = bOk AndAlso (m_CN.Download_NC_prog(sCncPath, sNumProg) = 0)
|
||||
' Attesa opportuna
|
||||
System.Threading.Thread.Sleep(100)
|
||||
' FANUC: genero un file 901 vuoto da aspedire, attivare; poi rispedisco il file 900
|
||||
If m_nNCType = 4 And Not bOk Then
|
||||
bOk = True
|
||||
Dim sCncPath1 As String = m_MainWindow.GetCncDir() & "\PlaceHolder" & m_MainWindow.m_CurrentMachine.sIsoFileExt
|
||||
Dim fs As FileStream = File.Create(sCncPath1)
|
||||
' Add text to the file.
|
||||
Dim info As Byte() = New UTF8Encoding(True).GetBytes(vbLf & "(PlaceHolder)")
|
||||
fs.Write(info, 0, info.Length)
|
||||
fs.Close()
|
||||
bOk = bOk AndAlso (m_CN.Download_NC_prog(sCncPath1, "901") = 0)
|
||||
' Attesa opportuna
|
||||
System.Threading.Thread.Sleep(m_MainWindow.m_CurrentMachine.nThreadSleep)
|
||||
If bActivate Then
|
||||
bOk = bOk AndAlso (m_CN.ActivateProgram("901") = 0)
|
||||
' Attesa opportuna
|
||||
System.Threading.Thread.Sleep(m_MainWindow.m_CurrentMachine.nThreadSleep)
|
||||
End If
|
||||
' riprovo ad eseguire il programma 900
|
||||
bOk = True
|
||||
bOk = bOk AndAlso (m_CN.Download_NC_prog(sCncPath, sNumProg) = 0)
|
||||
' Attesa opportuna
|
||||
System.Threading.Thread.Sleep(m_MainWindow.m_CurrentMachine.nThreadSleep)
|
||||
End If
|
||||
EgtOutLog("Nc Type : " & m_nNCType.ToString)
|
||||
' AXIUM (NUM OLD): se DripFeed non esegluo attivazione programma)
|
||||
If m_nNCType = 1 AndAlso m_CN.bIsDripFeed Then
|
||||
' eventauli cambi di stato sono trattati all'interno della funzione DownLoad_NC_prog
|
||||
Return True
|
||||
End If
|
||||
EgtOutLog(TimeSpanEnd())
|
||||
' -------------- END DOWNLOAD --------------
|
||||
' -------------- START ACTIVATE --------------
|
||||
' Se richiesta attivazione
|
||||
If bActivate Then
|
||||
' Attivazione programma
|
||||
EgtOutLog("ActivateProgram(nNumProg)")
|
||||
TimeSpanInit()
|
||||
bOk = bOk AndAlso (m_CN.ActivateProgram(nNumProg) = 0)
|
||||
EgtOutLog(TimeSpanEnd())
|
||||
' Attesa opportuna
|
||||
System.Threading.Thread.Sleep(100)
|
||||
' Attivo la modalità AUTO prima per preparar il cyclo start
|
||||
bOk = bOk AndAlso (m_CN.DGeneralFunctions_WriteCncMode(0) = 0)
|
||||
' Attesa opportuna
|
||||
System.Threading.Thread.Sleep(100)
|
||||
' Modalità automatica
|
||||
bOk = bOk AndAlso (m_CN.DGeneralFunctions_WriteCncMode(0) = 0)
|
||||
EgtOutLog("DGeneralFunctions_WriteCncMode(0)")
|
||||
TimeSpanInit()
|
||||
EgtOutLog(TimeSpanEnd())
|
||||
End If
|
||||
' -------------- END ACTIVATE --------------
|
||||
' Messaggio con risultato
|
||||
If bOk Then
|
||||
m_CurrProjPage.SetInfoMessage(EgtMsg(90317)) 'Programma CN trasmesso con successo
|
||||
|
||||
+63
-4
@@ -8,7 +8,7 @@ Public MustInherit Class CN_generico
|
||||
Public Const MAX_VAR As Short = 100
|
||||
Public Const MAX_VALUES As Short = 9 ' Max. index to read the data from the FXServer array
|
||||
Public Const MAX_TOOLS As Short = 100
|
||||
Public Const NUM_DATA = 55 ' Numero di dati del CN (Speed,Feed,...)
|
||||
Public Const NUM_DATA = 56 ' Numero di dati del CN (Speed,Feed,...)
|
||||
|
||||
Public m_NewVariable As Boolean = False ' per scrittura delle vairbaili Apllication del PLC
|
||||
|
||||
@@ -70,8 +70,18 @@ Public MustInherit Class CN_generico
|
||||
Parking = 52
|
||||
EnableZone = 53
|
||||
EnablePC = 54
|
||||
|
||||
nAxes = 55
|
||||
End Enum
|
||||
|
||||
Public Enum Type As Short
|
||||
TBoolean = 0
|
||||
TInteger = 1
|
||||
TLong = 2
|
||||
TDouble = 3
|
||||
TString = 4
|
||||
|
||||
End Enum
|
||||
#End Region
|
||||
|
||||
#Region " Struct"
|
||||
@@ -218,10 +228,27 @@ Public MustInherit Class CN_generico
|
||||
Public bRemote As Boolean
|
||||
' Nuovi di bottoni -------------------------------------------
|
||||
|
||||
' solo per NumOld
|
||||
Public bIsDripFeed As Boolean = False
|
||||
|
||||
' usato nel FANUC per leggere lo stato macchina se 5 assi attivo
|
||||
Public b5AxesActive As Boolean
|
||||
|
||||
Public nMachineMode As Integer
|
||||
|
||||
Public m_szCnDataVar(NUM_DATA - 1) As String
|
||||
|
||||
'
|
||||
' nuovi dal 29-III-2023 per Fanuc
|
||||
'
|
||||
Public n_Base_addr_int_vars As Integer = 59800
|
||||
Public n_Base_addr_byte_for_bits_vars As Integer = 59820
|
||||
Public n_num_var_int_to_read As Short = 10
|
||||
Public n_num_var_byte_for_bits_to_read As Short = 30
|
||||
Public s_addr_set_nc_mode As String = "D59825"
|
||||
Public s_addr_feedhold As String = "D59850.6"
|
||||
'
|
||||
' Eventi
|
||||
'
|
||||
Public Event NewPositionData(ByVal sender As Object)
|
||||
Public Event NewPosDeltaData(ByVal sender As Object)
|
||||
Public Event NewVarChanged(ByVal sender As Object)
|
||||
@@ -294,8 +321,8 @@ Public MustInherit Class CN_generico
|
||||
|
||||
Public MustOverride Function DTool_set_read_range(n_start As Short, n_stop As Short) As Short
|
||||
|
||||
Public MustOverride Function DTool_write_tool(n_tool_number As Short, Length_X As Double, Radius As Double, TipRadius_Z As Double, _
|
||||
DLength_X As Double, DTipRadius_Z As Double, _
|
||||
Public MustOverride Function DTool_write_tool(n_tool_number As Short, Length_X As Double, Radius As Double, TipRadius_Z As Double,
|
||||
DLength_X As Double, DTipRadius_Z As Double,
|
||||
nDirection As Short, nType As Short, nH As Integer) As Short
|
||||
|
||||
Public Overridable Function SetProgramMainOrSub(bMain As Boolean) As Boolean
|
||||
@@ -341,4 +368,36 @@ Public MustInherit Class CN_generico
|
||||
|
||||
#End Region
|
||||
|
||||
#Region " Nuovi metodi pubblici"
|
||||
|
||||
Public Overridable Function NC_read_var_short(VarAddr As String, ByRef value As Short) As Boolean
|
||||
Return False
|
||||
End Function
|
||||
|
||||
Public Overridable Function NC_read_var_short_range(VarStartAddr As String, VarEndAddr As String, ByRef values() As Short) As Boolean
|
||||
Return False
|
||||
End Function
|
||||
|
||||
Public Overridable Function NC_write_var_short(VarAddr As String, ByRef value As Short) As Boolean
|
||||
Return False
|
||||
End Function
|
||||
|
||||
Public Overridable Function NC_read_var_bit(VarAddr As String, ByRef value As Boolean) As Boolean
|
||||
Return False
|
||||
End Function
|
||||
|
||||
Public Overridable Function NC_write_var_bit(VarAddr As String, ByRef value As Boolean) As Boolean
|
||||
Return False
|
||||
End Function
|
||||
|
||||
Public Overridable Function NC_pulse_bit(VarAddr As String) As Boolean
|
||||
Return False
|
||||
End Function
|
||||
Public Overridable Function Geppo() As Boolean
|
||||
Return False
|
||||
End Function
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
End Class
|
||||
|
||||
+1711
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
+1
-1
@@ -92,7 +92,7 @@ Namespace Num
|
||||
Private Const TIMEOUT As Short = 99
|
||||
Private Const SHORTSLEEPTIME As Short = 10
|
||||
Private Const LONGSLEEPTIME As Short = 40
|
||||
Private Const SHORTSLEEPCOUNT As Short = 20
|
||||
Private Const SHORTSLEEPCOUNT As Short = 100
|
||||
Private Const LONGSLEEPCOUNT As Short = 200
|
||||
|
||||
#End Region
|
||||
|
||||
+943
-786
File diff suppressed because it is too large
Load Diff
+10794
File diff suppressed because it is too large
Load Diff
+83
-4
@@ -115,16 +115,20 @@
|
||||
<Reference Include="AxInterop.FXLib">
|
||||
<HintPath>..\..\EgtProg\OmagCUT\AxInterop.FXLib.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="EgtPHOTOLib">
|
||||
<HintPath>..\..\EgtProg\Dll32\EgtPHOTOLib.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="EgtUILib, Version=2.3.4.5, Culture=neutral, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\EgtProg\DllD32\EgtUILib.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="EgtWPFLib, Version=2.1.7.1, Culture=neutral, processorArchitecture=MSIL">
|
||||
<Reference Include="EgtWPFLib, Version=2.5.2.2, Culture=neutral, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\EgtProg\Dll32\EgtWPFLib.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="EgtWPFLib5">
|
||||
<HintPath>..\..\EgtProg\OmagCUT\EgtWPFLib5.dll</HintPath>
|
||||
<Reference Include="EgtWPFLib5, Version=2.5.2.2, Culture=neutral, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\EgtProg\Dll32\EgtWPFLib5.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Interop.FXLib">
|
||||
<HintPath>..\..\EgtProg\OmagCUT\Interop.FXLib.dll</HintPath>
|
||||
@@ -143,6 +147,10 @@
|
||||
</Reference>
|
||||
<Reference Include="PresentationFramework.Aero" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Data.SQLite, Version=1.0.112.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=x86">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\EgtProg\Dll32\System.Data.SQLite.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
@@ -170,6 +178,12 @@
|
||||
<DependentUpon>SelectPartFromFamilyWD.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="CAM\CamPolishing.vb" />
|
||||
<Compile Include="DirectCuts\ControlsDirectCutUC.xaml.vb">
|
||||
<DependentUpon>ControlsDirectCutUC.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="DirectCuts\ControlsDirectCutUC1.xaml.vb">
|
||||
<DependentUpon>ControlsDirectCutUC1.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="DirectCuts\Polishing.xaml.vb">
|
||||
<DependentUpon>Polishing.xaml</DependentUpon>
|
||||
</Compile>
|
||||
@@ -179,6 +193,9 @@
|
||||
<Compile Include="DirectCuts\SingleDrillUC.xaml.vb">
|
||||
<DependentUpon>SingleDrillUC.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="DirectCuts\SquaringUC.xaml.vb">
|
||||
<DependentUpon>SquaringUC.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="DrawImport\AlzFrontUC.xaml.vb">
|
||||
<DependentUpon>AlzFrontUC.xaml</DependentUpon>
|
||||
</Compile>
|
||||
@@ -205,16 +222,32 @@
|
||||
<Compile Include="Machine\ImportExportToolWD.xaml.vb">
|
||||
<DependentUpon>ImportExportToolWD.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Machine\WaterjetDbWindowVM.vb" />
|
||||
<Compile Include="Machine\WaterJetPageVM.vb" />
|
||||
<Compile Include="Machine\WaterJetPageUC.xaml.vb">
|
||||
<DependentUpon>WaterJetPageUC.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="NcComm\fwlib32.vb" />
|
||||
<Compile Include="NcComm\M_Fanuc.vb" />
|
||||
<Compile Include="NcComm\M_Fanuc_hi.vb" />
|
||||
<Compile Include="Project\AddToDataBaseUC.xaml.vb">
|
||||
<DependentUpon>AddToDataBaseUC.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Project\OmagPhotoWD.xaml.vb">
|
||||
<DependentUpon>OmagPhotoWD.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Project\ScrapsWD.xaml.vb">
|
||||
<DependentUpon>ScrapsWD.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Project\StartLauncheWD.xaml.vb">
|
||||
<DependentUpon>StartLauncheWD.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Project\CicloStartWD.xaml.vb">
|
||||
<DependentUpon>CicloStartWD.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="RawPhoto\OtherRefTabWD.xaml.vb">
|
||||
<DependentUpon>OtherRefTabWD.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="RawPhoto\SlabIdWD.xaml.vb">
|
||||
<DependentUpon>SlabIdWD.xaml</DependentUpon>
|
||||
</Compile>
|
||||
@@ -412,6 +445,14 @@
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="DirectCuts\ControlsDirectCutUC.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="DirectCuts\ControlsDirectCutUC1.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="DirectCuts\Polishing.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
@@ -424,6 +465,10 @@
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="DirectCuts\SquaringUC.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="DrawImport\AlzFrontUC.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
@@ -459,12 +504,28 @@
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="Project\AddToDataBaseUC.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="Project\OmagPhotoWD.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="Project\ScrapsWD.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="Project\StartLauncheWD.xaml">
|
||||
</Page>
|
||||
<Page Include="Project\CicloStartWD.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="RawPhoto\OtherRefTabWD.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="RawPhoto\SlabIdWD.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
@@ -847,7 +908,7 @@
|
||||
<Resource Include="Resources\MachineStatusImage\Single.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\ToolChangerPos.png" />
|
||||
<Resource Include="Resources\ToolChangerPos_OLD.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\Manual.png" />
|
||||
@@ -1261,6 +1322,24 @@
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\NewIcons\START-WJ.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\NewIcons\Ponticelli.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\NewIcons\Ponticelli_delete.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\NewIcons\Parking.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\NewIcons\Quality.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\ToolChangerPos.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\NewIcons\RefTab.png" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
|
||||
<PropertyGroup>
|
||||
<PostBuildEvent>IF "$(PlatformName)"=="x86" IF "$(ConfigurationName)" == "Release" copy $(TargetPath) c:\EgtProg\OmagCUT\OmagCUTR32.exe
|
||||
|
||||
@@ -32,6 +32,7 @@
|
||||
<BitmapImage x:Key="AlignPiecesImg" UriSource="Resources/NewIcons/ruota-oggetto-inclinato.png"></BitmapImage>
|
||||
<BitmapImage x:Key="BarCodeImg" UriSource="Resources/NewIcons/BarCode.png"></BitmapImage>
|
||||
<BitmapImage x:Key="SlabIdImg" UriSource="Resources/NewIcons/SlabId.png"></BitmapImage>
|
||||
<BitmapImage x:Key="RefTabImg" UriSource="Resources/NewIcons/RefTab.png"></BitmapImage>
|
||||
<BitmapImage x:Key="BottomLeftImg" UriSource="Resources/NewIcons/1-BottomLeft.png"></BitmapImage>
|
||||
<BitmapImage x:Key="BottomRightImg" UriSource="Resources/NewIcons/2-BottomRight.png"></BitmapImage>
|
||||
<BitmapImage x:Key="PartRotOnImg" UriSource="Resources/NewIcons/PartRotOn.png"></BitmapImage>
|
||||
|
||||
@@ -102,6 +102,7 @@
|
||||
<BitmapImage x:Key="AlignPiecesImg" UriSource="Resources/AlignPieces.png"></BitmapImage>
|
||||
<BitmapImage x:Key="BarCodeImg" UriSource="Resources/BarCode.png"></BitmapImage>
|
||||
<BitmapImage x:Key="SlabIdImg" UriSource="Resources/SlabId.png"></BitmapImage>
|
||||
<BitmapImage x:Key="RefTabImg" UriSource="Resources/NewIcons/RefTab.png"></BitmapImage>
|
||||
<BitmapImage x:Key="BottomLeftImg" UriSource="Resources/BottomLeft.png"></BitmapImage>
|
||||
<BitmapImage x:Key="BottomRightImg" UriSource="Resources/BottomRight.png"></BitmapImage>
|
||||
<BitmapImage x:Key="PartRotOnImg" UriSource="Resources/PartRotOn.png"></BitmapImage>
|
||||
@@ -208,6 +209,7 @@
|
||||
<BitmapImage x:Key="XYJogImg" UriSource="Resources/NewIcons/XYJog.png"></BitmapImage>
|
||||
<BitmapImage x:Key="ZCJogImg" UriSource="Resources/NewIcons/ZCJog.png"></BitmapImage>
|
||||
<BitmapImage x:Key="ZBJogImg" UriSource="Resources/NewIcons/ZBJog.png"></BitmapImage>
|
||||
<BitmapImage x:Key="ParkingImg" UriSource="Resources/NewIcons/Parking.png"></BitmapImage>
|
||||
|
||||
|
||||
<!--Frame-->
|
||||
@@ -218,6 +220,9 @@
|
||||
<!--Machinig-->
|
||||
<BitmapImage x:Key="Allunga-AccorciaImg" UriSource="Resources/NewIcons/Allunga-o-accorcia.png"></BitmapImage>
|
||||
<BitmapImage x:Key="Inizio-Allunga-AccorciaImg" UriSource="Resources/NewIcons/Inizio-allunga-o-accorcia.png"></BitmapImage>
|
||||
<BitmapImage x:Key="PonticelliWJImg" UriSource="Resources/NewIcons/Ponticelli.png"></BitmapImage>
|
||||
<BitmapImage x:Key="PonticelliDeleteWJImg" UriSource="Resources/NewIcons/Ponticelli_delete.png"></BitmapImage>
|
||||
<BitmapImage x:Key="QualityWJImg" UriSource="Resources/NewIcons/Quality.png"></BitmapImage>
|
||||
<BitmapImage x:Key="Fine-Allunga-AccorciaImg" UriSource="Resources/NewIcons/Fine-allunga-o-accorcia.png"></BitmapImage>
|
||||
<BitmapImage x:Key="ON_OFF-singolo-taglioImg" UriSource="Resources/NewIcons/ON_OFF-singolo-taglio.png"></BitmapImage>
|
||||
<BitmapImage x:Key="Tutti-ONImg" UriSource="Resources/NewIcons/Tutti-ON.png"></BitmapImage>
|
||||
@@ -1206,6 +1211,7 @@
|
||||
|
||||
<Style x:Key="OmagCut_CalculatorTextBox" TargetType="{x:Type EgtWPFLib:EgtTextBox}" BasedOn="{StaticResource OmagCut_TextBox}">
|
||||
<Setter Property="Keyboard" Value="Calculator"/>
|
||||
<Setter Property="IsLength" Value="True"/>
|
||||
<Setter Property="KeyboardDimension" Value="300"/>
|
||||
</Style>
|
||||
|
||||
|
||||
+436
-416
@@ -55,23 +55,43 @@
|
||||
|
||||
</GroupBox>
|
||||
|
||||
<!--UNITA' DI MISURA-->
|
||||
<GroupBox Name="UnitsOfMeasureGpBx"
|
||||
Grid.Column="1"
|
||||
Grid.RowSpan="3"
|
||||
Style="{DynamicResource OmagCut_GroupBox}">
|
||||
<Grid >
|
||||
<Grid Name ="UnitGrid">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
<ColumnDefinition Width="4*"/>
|
||||
<ColumnDefinition Width="3.2*"/>
|
||||
<ColumnDefinition Width="1.8*"/>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="0.25*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.25*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.25*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<ComboBox Name="UnitsOfMeasureCmBx" Grid.Column="1" Grid.Row="1" Style="{StaticResource OmagCut_ComboBox}">
|
||||
<ComboBox Name="UnitsOfMeasureCmBx" Grid.Column="1" Grid.Row="1" Grid.ColumnSpan="2" Style="{StaticResource OmagCut_ComboBox}">
|
||||
<ComboBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding}" Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</DataTemplate>
|
||||
</ComboBox.ItemTemplate>
|
||||
</ComboBox>
|
||||
|
||||
<ComboBox Name="FractionPatternCmBx" Grid.Column="1" Grid.Row="3" Style="{StaticResource OmagCut_ComboBox}">
|
||||
<ComboBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding}" Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</DataTemplate>
|
||||
</ComboBox.ItemTemplate>
|
||||
</ComboBox>
|
||||
|
||||
<ComboBox Name="PrecisionCmBx" Grid.Column="2" Grid.Row="3" Style="{StaticResource OmagCut_ComboBox}">
|
||||
<ComboBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding}" Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
@@ -80,32 +100,32 @@
|
||||
</ComboBox>
|
||||
|
||||
</Grid>
|
||||
</GroupBox>
|
||||
|
||||
|
||||
<GroupBox Name="TextColorGpBx"
|
||||
Grid.Column="2" Grid.RowSpan="3" Grid.ColumnSpan="1"
|
||||
Style="{DynamicResource OmagCut_GroupBox}">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="0.25*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="0.25*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<Button Name="TextColorBtn"
|
||||
Grid.Row="1" Grid.Column="1"
|
||||
Style="{StaticResource OmagCut_Button}" />
|
||||
</Grid>
|
||||
|
||||
</GroupBox>
|
||||
|
||||
<GroupBox Name="TextColorGpBx"
|
||||
Grid.Column="2" Grid.RowSpan="3" Grid.ColumnSpan="1"
|
||||
Style="{DynamicResource OmagCut_GroupBox}">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="0.25*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="0.25*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<Button Name="TextColorBtn"
|
||||
Grid.Row="1" Grid.Column="1"
|
||||
Style="{StaticResource OmagCut_Button}" />
|
||||
</Grid>
|
||||
|
||||
</GroupBox>
|
||||
|
||||
<GroupBox Name="FastGridGpBx"
|
||||
<GroupBox Name="FastGridGpBx"
|
||||
Grid.Column="1" Grid.Row="4" Grid.ColumnSpan="2"
|
||||
Style="{DynamicResource OmagCut_GroupBox}">
|
||||
<Grid>
|
||||
@@ -133,458 +153,458 @@
|
||||
|
||||
</GroupBox>
|
||||
|
||||
|
||||
|
||||
<GroupBox Name="SlabGpBx" Grid.RowSpan="1"
|
||||
|
||||
|
||||
<GroupBox Name="SlabGpBx" Grid.RowSpan="1"
|
||||
Grid.Column="1" Grid.Row="3" Grid.ColumnSpan="2"
|
||||
Style="{DynamicResource OmagCut_GroupBox}">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<TextBlock Name="SlabLayerMsgTxBl" Grid.Column="0" Grid.Row="0"
|
||||
<TextBlock Name="SlabLayerMsgTxBl" Grid.Column="0" Grid.Row="0"
|
||||
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}" />
|
||||
|
||||
<TextBlock Name="PartsLayerMsgTxBl" Grid.Column="0" Grid.Row="1"
|
||||
<TextBlock Name="PartsLayerMsgTxBl" Grid.Column="0" Grid.Row="1"
|
||||
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}" />
|
||||
|
||||
<TextBlock Name="ScrapLayerMsgTxBl" Grid.Column="0" Grid.Row="2"
|
||||
<TextBlock Name="ScrapLayerMsgTxBl" Grid.Column="0" Grid.Row="2"
|
||||
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}" />
|
||||
|
||||
<TextBlock Name="StdThickMsgTxBl" Grid.Column="0" Grid.Row="3"
|
||||
<TextBlock Name="StdThickMsgTxBl" Grid.Column="0" Grid.Row="3"
|
||||
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}" />
|
||||
|
||||
<EgtWPFLib:EgtTextBox Name="SlabLayerMsgTxBx" Grid.Column="1" Grid.Row="0" Margin="10,0,10,0"
|
||||
<EgtWPFLib:EgtTextBox Name="SlabLayerMsgTxBx" Grid.Column="1" Grid.Row="0" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_LeftKeyboardTextBoxNoBorder}" />
|
||||
|
||||
<EgtWPFLib:EgtTextBox Name="PartsLayerMsgTxBx" Grid.Column="1" Grid.Row="1" Margin="10,0,10,0"
|
||||
<EgtWPFLib:EgtTextBox Name="PartsLayerMsgTxBx" Grid.Column="1" Grid.Row="1" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_LeftKeyboardTextBoxNoBorder}" />
|
||||
|
||||
<EgtWPFLib:EgtTextBox Name="ScrapLayerMsgTxBx" Grid.Column="1" Grid.Row="2" Margin="10,0,10,0"
|
||||
<EgtWPFLib:EgtTextBox Name="ScrapLayerMsgTxBx" Grid.Column="1" Grid.Row="2" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_LeftKeyboardTextBoxNoBorder}" />
|
||||
|
||||
<EgtWPFLib:EgtTextBox Name="StdThickMsgTxBx" Grid.Column="1" Grid.Row="3" Margin="10,0,10,0"
|
||||
<EgtWPFLib:EgtTextBox Name="StdThickMsgTxBx" Grid.Column="1" Grid.Row="3" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
||||
</GroupBox>
|
||||
</GroupBox>
|
||||
|
||||
<!--Incilinazione da colore-->
|
||||
<GroupBox Name="ColorToSideAngGpBx" Grid.RowSpan="3"
|
||||
<!--Incilinazione da colore-->
|
||||
<GroupBox Name="ColorToSideAngGpBx" Grid.RowSpan="3"
|
||||
Grid.Column="0" Grid.Row="3"
|
||||
Style="{DynamicResource OmagCut_GroupBox}">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="0*"/>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="0"/>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="0.75*"/>
|
||||
<RowDefinition Height="0.25*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="0*"/>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="0"/>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="0.75*"/>
|
||||
<RowDefinition Height="0.25*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<Grid Grid.Row="0" Grid.ColumnSpan="7">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1.5*"/>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="1.5*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="0.75*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid Grid.Row="0" Grid.ColumnSpan="7">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1.5*"/>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="1.5*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="0.75*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<CheckBox Name="CTSAboxEnableChBx" Grid.Column="0" Grid.Row="0"
|
||||
<CheckBox Name="CTSAboxEnableChBx" Grid.Column="0" Grid.Row="0"
|
||||
Style="{StaticResource OmagCut_CheckBox_Single}" Margin="0,0,10,0"/>
|
||||
<TextBlock Name="CTSAboxEnableMsgTxBl" Grid.Column="1" Grid.Row="0"
|
||||
<TextBlock Name="CTSAboxEnableMsgTxBl" Grid.Column="1" Grid.Row="0"
|
||||
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}" HorizontalAlignment="Left" />
|
||||
|
||||
<TextBlock Name="ToleranceMsgTxBl" Grid.Column="3" Grid.Row="0"
|
||||
<TextBlock Name="ToleranceMsgTxBl" Grid.Column="3" Grid.Row="0"
|
||||
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}" />
|
||||
<EgtWPFLib:EgtTextBox Name="ToleranceMsgTxBx" Grid.Column="4" Grid.Row="0" Margin="10,0,10,0"
|
||||
<EgtWPFLib:EgtTextBox Name="ToleranceMsgTxBx" Grid.Column="4" Grid.Row="0" Margin="10,0,10,0" IsLength="False"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
|
||||
</Grid>
|
||||
|
||||
<TextBlock Name="TalloneMsgTxBl" Grid.Column="5" Grid.Row="1" Grid.ColumnSpan="2"
|
||||
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}" />
|
||||
<TextBlock Name="InclinazioneMsgTxBl" Grid.Column="3" Grid.Row="1"
|
||||
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}" />
|
||||
|
||||
|
||||
<CheckBox Name="CTSA1EnableChBx" Grid.Column="0" Grid.Row="2"
|
||||
Style="{StaticResource OmagCut_CheckBox_Single}" Margin="0,0,10,0"/>
|
||||
<Button Name="CTSA1Btn" Grid.Row="2" Grid.Column="1"
|
||||
Style="{StaticResource OmagCut_Button}" />
|
||||
<EgtWPFLib:EgtTextBox Name="CTSA1TalloneTxBx" Grid.Column="5" Grid.Row="2" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
<EgtWPFLib:EgtTextBox Name="CTSA1InclinazioneTxBx" Grid.Column="3" Grid.Row="2" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
|
||||
<CheckBox Name="CTSA2EnableChBx" Grid.Column="0" Grid.Row="3"
|
||||
Style="{StaticResource OmagCut_CheckBox_Single}" Margin="0,0,10,0"/>
|
||||
<Button Name="CTSA2Btn" Grid.Row="3" Grid.Column="1"
|
||||
Style="{StaticResource OmagCut_Button}" />
|
||||
<EgtWPFLib:EgtTextBox Name="CTSA2TalloneTxBx" Grid.Column="5" Grid.Row="3" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
<EgtWPFLib:EgtTextBox Name="CTSA2InclinazioneTxBx" Grid.Column="3" Grid.Row="3" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
|
||||
<CheckBox Name="CTSA3EnableChBx" Grid.Column="0" Grid.Row="4"
|
||||
Style="{StaticResource OmagCut_CheckBox_Single}" Margin="0,0,10,0"/>
|
||||
<Button Name="CTSA3Btn" Grid.Row="4" Grid.Column="1"
|
||||
Style="{StaticResource OmagCut_Button}" />
|
||||
<EgtWPFLib:EgtTextBox Name="CTSA3TalloneTxBx" Grid.Column="5" Grid.Row="4" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
<EgtWPFLib:EgtTextBox Name="CTSA3InclinazioneTxBx" Grid.Column="3" Grid.Row="4" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
|
||||
<CheckBox Name="CTSA4EnableChBx" Grid.Column="0" Grid.Row="5"
|
||||
Style="{StaticResource OmagCut_CheckBox_Single}" Margin="0,0,10,0"/>
|
||||
<Button Name="CTSA4Btn" Grid.Row="5" Grid.Column="1"
|
||||
Style="{StaticResource OmagCut_Button}" />
|
||||
<TextBlock Name="CTSA4TalloneMsgTxBl" Grid.Column="2" Grid.Row="5"
|
||||
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}" />
|
||||
<EgtWPFLib:EgtTextBox Name="CTSA4TalloneTxBx" Grid.Column="5" Grid.Row="5" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
<TextBlock Name="CTSA4InclinazioneMsgTxBl" Grid.Column="4" Grid.Row="5"
|
||||
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}" />
|
||||
<EgtWPFLib:EgtTextBox Name="CTSA4InclinazioneTxBx" Grid.Column="3" Grid.Row="5" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
|
||||
<CheckBox Name="CTSA5EnableChBx" Grid.Column="0" Grid.Row="6"
|
||||
Style="{StaticResource OmagCut_CheckBox_Single}" Margin="0,0,10,0"/>
|
||||
<Button Name="CTSA5Btn" Grid.Row="6" Grid.Column="1"
|
||||
Style="{StaticResource OmagCut_Button}" />
|
||||
<TextBlock Name="CTSA5TalloneMsgTxBl" Grid.Column="2" Grid.Row="6"
|
||||
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}" />
|
||||
<EgtWPFLib:EgtTextBox Name="CTSA5TalloneTxBx" Grid.Column="5" Grid.Row="6" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
<TextBlock Name="CTSA5InclinazioneMsgTxBl" Grid.Column="4" Grid.Row="6"
|
||||
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}" />
|
||||
<EgtWPFLib:EgtTextBox Name="CTSA5InclinazioneTxBx" Grid.Column="3" Grid.Row="6" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
|
||||
<CheckBox Name="CTSA6EnableChBx" Grid.Column="0" Grid.Row="7"
|
||||
Style="{StaticResource OmagCut_CheckBox_Single}" Margin="0,0,10,0"/>
|
||||
<Button Name="CTSA6Btn" Grid.Row="7" Grid.Column="1"
|
||||
Style="{StaticResource OmagCut_Button}" />
|
||||
<TextBlock Name="CTSA6TalloneMsgTxBl" Grid.Column="2" Grid.Row="7"
|
||||
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}" />
|
||||
<EgtWPFLib:EgtTextBox Name="CTSA6TalloneTxBx" Grid.Column="5" Grid.Row="7" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
<TextBlock Name="CTSA6InclinazioneMsgTxBl" Grid.Column="4" Grid.Row="7"
|
||||
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}" />
|
||||
<EgtWPFLib:EgtTextBox Name="CTSA6InclinazioneTxBx" Grid.Column="3" Grid.Row="7" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
|
||||
<CheckBox Name="CTSA7EnableChBx" Grid.Column="0" Grid.Row="8"
|
||||
Style="{StaticResource OmagCut_CheckBox_Single}" Margin="0,0,10,0"/>
|
||||
<Button Name="CTSA7Btn" Grid.Row="8" Grid.Column="1"
|
||||
Style="{StaticResource OmagCut_Button}" />
|
||||
<TextBlock Name="CTSA7TalloneMsgTxBl" Grid.Column="2" Grid.Row="8"
|
||||
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}" />
|
||||
<EgtWPFLib:EgtTextBox Name="CTSA7TalloneTxBx" Grid.Column="5" Grid.Row="8" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
<TextBlock Name="CTSA7InclinazioneMsgTxBl" Grid.Column="4" Grid.Row="8"
|
||||
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}" />
|
||||
<EgtWPFLib:EgtTextBox Name="CTSA7InclinazioneTxBx" Grid.Column="3" Grid.Row="8" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
|
||||
<CheckBox Name="CTSA8EnableChBx" Grid.Column="0" Grid.Row="9"
|
||||
Style="{StaticResource OmagCut_CheckBox_Single}" Margin="0,0,10,0"/>
|
||||
<Button Name="CTSA8Btn" Grid.Row="9" Grid.Column="1"
|
||||
Style="{StaticResource OmagCut_Button}" />
|
||||
<TextBlock Name="CTSA8TalloneMsgTxBl" Grid.Column="2" Grid.Row="9"
|
||||
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}" />
|
||||
<EgtWPFLib:EgtTextBox Name="CTSA8TalloneTxBx" Grid.Column="5" Grid.Row="9" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
<TextBlock Name="CTSA8InclinazioneMsgTxBl" Grid.Column="4" Grid.Row="9"
|
||||
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}" />
|
||||
<EgtWPFLib:EgtTextBox Name="CTSA8InclinazioneTxBx" Grid.Column="3" Grid.Row="9" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
|
||||
<CheckBox Name="CTSA9EnableChBx" Grid.Column="0" Grid.Row="10"
|
||||
Style="{StaticResource OmagCut_CheckBox_Single}" Margin="0,0,10,0"/>
|
||||
<Button Name="CTSA9Btn" Grid.Row="10" Grid.Column="1"
|
||||
Style="{StaticResource OmagCut_Button}" />
|
||||
<TextBlock Name="CTSA9TalloneMsgTxBl" Grid.Column="2" Grid.Row="10"
|
||||
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}" />
|
||||
<EgtWPFLib:EgtTextBox Name="CTSA9TalloneTxBx" Grid.Column="5" Grid.Row="10" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
<TextBlock Name="CTSA9InclinazioneMsgTxBl" Grid.Column="4" Grid.Row="10"
|
||||
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}" />
|
||||
<EgtWPFLib:EgtTextBox Name="CTSA9InclinazioneTxBx" Grid.Column="3" Grid.Row="10" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
|
||||
<CheckBox Name="CTSA10EnableChBx" Grid.Column="0" Grid.Row="11"
|
||||
Style="{StaticResource OmagCut_CheckBox_Single}" Margin="0,0,10,0"/>
|
||||
<Button Name="CTSA10Btn" Grid.Row="11" Grid.Column="1"
|
||||
Style="{StaticResource OmagCut_Button}" />
|
||||
<TextBlock Name="CTSA10TalloneMsgTxBl" Grid.Column="2" Grid.Row="11"
|
||||
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}" />
|
||||
<EgtWPFLib:EgtTextBox Name="CTSA10TalloneTxBx" Grid.Column="5" Grid.Row="11" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
<TextBlock Name="CTSA10InclinazioneMsgTxBl" Grid.Column="4" Grid.Row="11"
|
||||
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}" />
|
||||
<EgtWPFLib:EgtTextBox Name="CTSA10InclinazioneTxBx" Grid.Column="3" Grid.Row="11" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
</Grid>
|
||||
|
||||
</GroupBox>
|
||||
<TextBlock Name="TalloneMsgTxBl" Grid.Column="5" Grid.Row="1" Grid.ColumnSpan="2"
|
||||
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}" />
|
||||
<TextBlock Name="InclinazioneMsgTxBl" Grid.Column="3" Grid.Row="1"
|
||||
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}" />
|
||||
|
||||
<GroupBox Name="ThemesGpBx"
|
||||
|
||||
<CheckBox Name="CTSA1EnableChBx" Grid.Column="0" Grid.Row="2"
|
||||
Style="{StaticResource OmagCut_CheckBox_Single}" Margin="0,0,10,0"/>
|
||||
<Button Name="CTSA1Btn" Grid.Row="2" Grid.Column="1"
|
||||
Style="{StaticResource OmagCut_Button}" />
|
||||
<EgtWPFLib:EgtTextBox Name="CTSA1TalloneTxBx" Grid.Column="5" Grid.Row="2" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
<EgtWPFLib:EgtTextBox Name="CTSA1InclinazioneTxBx" Grid.Column="3" Grid.Row="2" Margin="10,0,10,0" IsLength="False"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
|
||||
<CheckBox Name="CTSA2EnableChBx" Grid.Column="0" Grid.Row="3"
|
||||
Style="{StaticResource OmagCut_CheckBox_Single}" Margin="0,0,10,0"/>
|
||||
<Button Name="CTSA2Btn" Grid.Row="3" Grid.Column="1"
|
||||
Style="{StaticResource OmagCut_Button}" />
|
||||
<EgtWPFLib:EgtTextBox Name="CTSA2TalloneTxBx" Grid.Column="5" Grid.Row="3" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
<EgtWPFLib:EgtTextBox Name="CTSA2InclinazioneTxBx" Grid.Column="3" Grid.Row="3" Margin="10,0,10,0" IsLength="False"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
|
||||
<CheckBox Name="CTSA3EnableChBx" Grid.Column="0" Grid.Row="4"
|
||||
Style="{StaticResource OmagCut_CheckBox_Single}" Margin="0,0,10,0"/>
|
||||
<Button Name="CTSA3Btn" Grid.Row="4" Grid.Column="1"
|
||||
Style="{StaticResource OmagCut_Button}" />
|
||||
<EgtWPFLib:EgtTextBox Name="CTSA3TalloneTxBx" Grid.Column="5" Grid.Row="4" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
<EgtWPFLib:EgtTextBox Name="CTSA3InclinazioneTxBx" Grid.Column="3" Grid.Row="4" Margin="10,0,10,0" IsLength="False"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
|
||||
<CheckBox Name="CTSA4EnableChBx" Grid.Column="0" Grid.Row="5"
|
||||
Style="{StaticResource OmagCut_CheckBox_Single}" Margin="0,0,10,0"/>
|
||||
<Button Name="CTSA4Btn" Grid.Row="5" Grid.Column="1"
|
||||
Style="{StaticResource OmagCut_Button}" />
|
||||
<TextBlock Name="CTSA4TalloneMsgTxBl" Grid.Column="2" Grid.Row="5"
|
||||
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}" />
|
||||
<EgtWPFLib:EgtTextBox Name="CTSA4TalloneTxBx" Grid.Column="5" Grid.Row="5" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
<TextBlock Name="CTSA4InclinazioneMsgTxBl" Grid.Column="4" Grid.Row="5"
|
||||
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}" />
|
||||
<EgtWPFLib:EgtTextBox Name="CTSA4InclinazioneTxBx" Grid.Column="3" Grid.Row="5" Margin="10,0,10,0" IsLength="False"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
|
||||
<CheckBox Name="CTSA5EnableChBx" Grid.Column="0" Grid.Row="6"
|
||||
Style="{StaticResource OmagCut_CheckBox_Single}" Margin="0,0,10,0"/>
|
||||
<Button Name="CTSA5Btn" Grid.Row="6" Grid.Column="1"
|
||||
Style="{StaticResource OmagCut_Button}" />
|
||||
<TextBlock Name="CTSA5TalloneMsgTxBl" Grid.Column="2" Grid.Row="6"
|
||||
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}" />
|
||||
<EgtWPFLib:EgtTextBox Name="CTSA5TalloneTxBx" Grid.Column="5" Grid.Row="6" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
<TextBlock Name="CTSA5InclinazioneMsgTxBl" Grid.Column="4" Grid.Row="6"
|
||||
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}" />
|
||||
<EgtWPFLib:EgtTextBox Name="CTSA5InclinazioneTxBx" Grid.Column="3" Grid.Row="6" Margin="10,0,10,0" IsLength="False"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
|
||||
<CheckBox Name="CTSA6EnableChBx" Grid.Column="0" Grid.Row="7"
|
||||
Style="{StaticResource OmagCut_CheckBox_Single}" Margin="0,0,10,0"/>
|
||||
<Button Name="CTSA6Btn" Grid.Row="7" Grid.Column="1"
|
||||
Style="{StaticResource OmagCut_Button}" />
|
||||
<TextBlock Name="CTSA6TalloneMsgTxBl" Grid.Column="2" Grid.Row="7"
|
||||
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}" />
|
||||
<EgtWPFLib:EgtTextBox Name="CTSA6TalloneTxBx" Grid.Column="5" Grid.Row="7" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
<TextBlock Name="CTSA6InclinazioneMsgTxBl" Grid.Column="4" Grid.Row="7"
|
||||
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}" />
|
||||
<EgtWPFLib:EgtTextBox Name="CTSA6InclinazioneTxBx" Grid.Column="3" Grid.Row="7" Margin="10,0,10,0" IsLength="False"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
|
||||
<CheckBox Name="CTSA7EnableChBx" Grid.Column="0" Grid.Row="8"
|
||||
Style="{StaticResource OmagCut_CheckBox_Single}" Margin="0,0,10,0"/>
|
||||
<Button Name="CTSA7Btn" Grid.Row="8" Grid.Column="1"
|
||||
Style="{StaticResource OmagCut_Button}" />
|
||||
<TextBlock Name="CTSA7TalloneMsgTxBl" Grid.Column="2" Grid.Row="8"
|
||||
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}" />
|
||||
<EgtWPFLib:EgtTextBox Name="CTSA7TalloneTxBx" Grid.Column="5" Grid.Row="8" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
<TextBlock Name="CTSA7InclinazioneMsgTxBl" Grid.Column="4" Grid.Row="8"
|
||||
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}" />
|
||||
<EgtWPFLib:EgtTextBox Name="CTSA7InclinazioneTxBx" Grid.Column="3" Grid.Row="8" Margin="10,0,10,0" IsLength="False"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
|
||||
<CheckBox Name="CTSA8EnableChBx" Grid.Column="0" Grid.Row="9"
|
||||
Style="{StaticResource OmagCut_CheckBox_Single}" Margin="0,0,10,0"/>
|
||||
<Button Name="CTSA8Btn" Grid.Row="9" Grid.Column="1"
|
||||
Style="{StaticResource OmagCut_Button}" />
|
||||
<TextBlock Name="CTSA8TalloneMsgTxBl" Grid.Column="2" Grid.Row="9"
|
||||
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}" />
|
||||
<EgtWPFLib:EgtTextBox Name="CTSA8TalloneTxBx" Grid.Column="5" Grid.Row="9" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
<TextBlock Name="CTSA8InclinazioneMsgTxBl" Grid.Column="4" Grid.Row="9"
|
||||
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}" />
|
||||
<EgtWPFLib:EgtTextBox Name="CTSA8InclinazioneTxBx" Grid.Column="3" Grid.Row="9" Margin="10,0,10,0" IsLength="False"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
|
||||
<CheckBox Name="CTSA9EnableChBx" Grid.Column="0" Grid.Row="10"
|
||||
Style="{StaticResource OmagCut_CheckBox_Single}" Margin="0,0,10,0"/>
|
||||
<Button Name="CTSA9Btn" Grid.Row="10" Grid.Column="1"
|
||||
Style="{StaticResource OmagCut_Button}" />
|
||||
<TextBlock Name="CTSA9TalloneMsgTxBl" Grid.Column="2" Grid.Row="10"
|
||||
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}" />
|
||||
<EgtWPFLib:EgtTextBox Name="CTSA9TalloneTxBx" Grid.Column="5" Grid.Row="10" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
<TextBlock Name="CTSA9InclinazioneMsgTxBl" Grid.Column="4" Grid.Row="10"
|
||||
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}" />
|
||||
<EgtWPFLib:EgtTextBox Name="CTSA9InclinazioneTxBx" Grid.Column="3" Grid.Row="10" Margin="10,0,10,0" IsLength="False"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
|
||||
<CheckBox Name="CTSA10EnableChBx" Grid.Column="0" Grid.Row="11"
|
||||
Style="{StaticResource OmagCut_CheckBox_Single}" Margin="0,0,10,0"/>
|
||||
<Button Name="CTSA10Btn" Grid.Row="11" Grid.Column="1"
|
||||
Style="{StaticResource OmagCut_Button}" />
|
||||
<TextBlock Name="CTSA10TalloneMsgTxBl" Grid.Column="2" Grid.Row="11"
|
||||
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}" />
|
||||
<EgtWPFLib:EgtTextBox Name="CTSA10TalloneTxBx" Grid.Column="5" Grid.Row="11" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
<TextBlock Name="CTSA10InclinazioneMsgTxBl" Grid.Column="4" Grid.Row="11"
|
||||
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}" />
|
||||
<EgtWPFLib:EgtTextBox Name="CTSA10InclinazioneTxBx" Grid.Column="3" Grid.Row="11" Margin="10,0,10,0" IsLength="False"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
</Grid>
|
||||
|
||||
</GroupBox>
|
||||
|
||||
<GroupBox Name="ThemesGpBx"
|
||||
Grid.Column="1"
|
||||
Grid.Row="5"
|
||||
Grid.ColumnSpan="2"
|
||||
Style="{DynamicResource OmagCut_GroupBox}">
|
||||
<Grid >
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
<ColumnDefinition Width="4*"/>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="0.25*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.25*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid >
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
<ColumnDefinition Width="4*"/>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="0.25*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.25*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<ComboBox Name="ThemesCmBx" Grid.Column="1" Grid.Row="1" Style="{StaticResource OmagCut_ComboBox}">
|
||||
<ComboBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding}" Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</DataTemplate>
|
||||
</ComboBox.ItemTemplate>
|
||||
</ComboBox>
|
||||
<ComboBox Name="ThemesCmBx" Grid.Column="1" Grid.Row="1" Style="{StaticResource OmagCut_ComboBox}">
|
||||
<ComboBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding}" Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</DataTemplate>
|
||||
</ComboBox.ItemTemplate>
|
||||
</ComboBox>
|
||||
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
||||
</GroupBox>
|
||||
</GroupBox>
|
||||
|
||||
<!--Affondamneto da Colore-->
|
||||
<GroupBox Name="ColorToEngraveGpBx" Grid.RowSpan="3"
|
||||
<!--Affondamneto da Colore-->
|
||||
<GroupBox Name="ColorToEngraveGpBx" Grid.RowSpan="3"
|
||||
Grid.Column="3" Grid.ColumnSpan="2" Grid.Row="3"
|
||||
Style="{DynamicResource OmagCut_GroupBox}">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="0*"/>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="0"/>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="0.75*"/>
|
||||
<RowDefinition Height="0.25*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="0*"/>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="0"/>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="0.75*"/>
|
||||
<RowDefinition Height="0.25*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<Grid Grid.Row="0" Grid.ColumnSpan="7">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1.5*"/>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="1.5*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="0.75*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid Grid.Row="0" Grid.ColumnSpan="7">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1.5*"/>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="1.5*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="0.75*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<CheckBox Name="CTEboxEnableChBx" Grid.Column="0" Grid.Row="0"
|
||||
<CheckBox Name="CTEboxEnableChBx" Grid.Column="0" Grid.Row="0"
|
||||
Style="{StaticResource OmagCut_CheckBox_Single}" Margin="0,0,10,0"/>
|
||||
<TextBlock Name="CTEboxEnableMsgTxBl" Grid.Column="1" Grid.Row="0"
|
||||
<TextBlock Name="CTEboxEnableMsgTxBl" Grid.Column="1" Grid.Row="0"
|
||||
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}" HorizontalAlignment="Left" />
|
||||
|
||||
<TextBlock Name="ToleranceEMsgTxBl" Grid.Column="3" Grid.Row="0"
|
||||
<TextBlock Name="ToleranceEMsgTxBl" Grid.Column="3" Grid.Row="0"
|
||||
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}" />
|
||||
<EgtWPFLib:EgtTextBox Name="ToleranceEMsgTxBx" Grid.Column="4" Grid.Row="0" Margin="10,0,10,0"
|
||||
<EgtWPFLib:EgtTextBox Name="ToleranceEMsgTxBx" Grid.Column="4" Grid.Row="0" Margin="10,0,10,0" IsLength="False"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
|
||||
</Grid>
|
||||
|
||||
<TextBlock Name="AffondamentoMsgTxBl" Grid.Column="3" Grid.Row="1" Grid.ColumnSpan="2"
|
||||
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}" />
|
||||
|
||||
<TextBlock Name="LarghezzaMsgTxBl" Grid.Column="5" Grid.Row="1" Grid.ColumnSpan="2"
|
||||
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}" />
|
||||
|
||||
<CheckBox Name="CTE1EnableChBx" Grid.Column="0" Grid.Row="2"
|
||||
Style="{StaticResource OmagCut_CheckBox_Single}" Margin="0,0,10,0"/>
|
||||
<Button Name="CTE1Btn" Grid.Row="2" Grid.Column="1"
|
||||
Style="{StaticResource OmagCut_Button}" />
|
||||
<EgtWPFLib:EgtTextBox Name="CTE1AffondamentoTxBx" Grid.Column="3" Grid.Row="2" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
<EgtWPFLib:EgtTextBox Name="CTE1LarghezzaTxBx" Grid.Column="5" Grid.Row="2" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
|
||||
<CheckBox Name="CTE2EnableChBx" Grid.Column="0" Grid.Row="3"
|
||||
Style="{StaticResource OmagCut_CheckBox_Single}" Margin="0,0,10,0"/>
|
||||
<Button Name="CTE2Btn" Grid.Row="3" Grid.Column="1"
|
||||
Style="{StaticResource OmagCut_Button}" />
|
||||
<EgtWPFLib:EgtTextBox Name="CTE2AffondamentoTxBx" Grid.Column="3" Grid.Row="3" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
<EgtWPFLib:EgtTextBox Name="CTE2LarghezzaTxBx" Grid.Column="5" Grid.Row="3" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
|
||||
<CheckBox Name="CTE3EnableChBx" Grid.Column="0" Grid.Row="4"
|
||||
Style="{StaticResource OmagCut_CheckBox_Single}" Margin="0,0,10,0"/>
|
||||
<Button Name="CTE3Btn" Grid.Row="4" Grid.Column="1"
|
||||
Style="{StaticResource OmagCut_Button}" />
|
||||
<EgtWPFLib:EgtTextBox Name="CTE3AffondamentoTxBx" Grid.Column="3" Grid.Row="4" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
<EgtWPFLib:EgtTextBox Name="CTE3LarghezzaTxBx" Grid.Column="5" Grid.Row="4" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
|
||||
<CheckBox Name="CTE4EnableChBx" Grid.Column="0" Grid.Row="5"
|
||||
Style="{StaticResource OmagCut_CheckBox_Single}" Margin="0,0,10,0"/>
|
||||
<Button Name="CTE4Btn" Grid.Row="5" Grid.Column="1"
|
||||
Style="{StaticResource OmagCut_Button}" />
|
||||
<EgtWPFLib:EgtTextBox Name="CTE4AffondamentoTxBx" Grid.Column="3" Grid.Row="5" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
<EgtWPFLib:EgtTextBox Name="CTE4LarghezzaTxBx" Grid.Column="5" Grid.Row="5" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
|
||||
<CheckBox Name="CTE5EnableChBx" Grid.Column="0" Grid.Row="6"
|
||||
Style="{StaticResource OmagCut_CheckBox_Single}" Margin="0,0,10,0"/>
|
||||
<Button Name="CTE5Btn" Grid.Row="6" Grid.Column="1"
|
||||
Style="{StaticResource OmagCut_Button}" />
|
||||
<EgtWPFLib:EgtTextBox Name="CTE5AffondamentoTxBx" Grid.Column="3" Grid.Row="6" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
<EgtWPFLib:EgtTextBox Name="CTE5LarghezzaTxBx" Grid.Column="5" Grid.Row="6" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
|
||||
<CheckBox Name="CTE6EnableChBx" Grid.Column="0" Grid.Row="7"
|
||||
Style="{StaticResource OmagCut_CheckBox_Single}" Margin="0,0,10,0"/>
|
||||
<Button Name="CTE6Btn" Grid.Row="7" Grid.Column="1"
|
||||
Style="{StaticResource OmagCut_Button}" />
|
||||
<EgtWPFLib:EgtTextBox Name="CTE6AffondamentoTxBx" Grid.Column="3" Grid.Row="7" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
<EgtWPFLib:EgtTextBox Name="CTE6LarghezzaTxBx" Grid.Column="5" Grid.Row="7" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
|
||||
<CheckBox Name="CTE7EnableChBx" Grid.Column="0" Grid.Row="8"
|
||||
Style="{StaticResource OmagCut_CheckBox_Single}" Margin="0,0,10,0"/>
|
||||
<Button Name="CTE7Btn" Grid.Row="8" Grid.Column="1"
|
||||
Style="{StaticResource OmagCut_Button}" />
|
||||
<EgtWPFLib:EgtTextBox Name="CTE7AffondamentoTxBx" Grid.Column="3" Grid.Row="8" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
<EgtWPFLib:EgtTextBox Name="CTE7LarghezzaTxBx" Grid.Column="5" Grid.Row="8" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
|
||||
<CheckBox Name="CTE8EnableChBx" Grid.Column="0" Grid.Row="9"
|
||||
Style="{StaticResource OmagCut_CheckBox_Single}" Margin="0,0,10,0"/>
|
||||
<Button Name="CTE8Btn" Grid.Row="9" Grid.Column="1"
|
||||
Style="{StaticResource OmagCut_Button}" />
|
||||
<EgtWPFLib:EgtTextBox Name="CTE8AffondamentoTxBx" Grid.Column="3" Grid.Row="9" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
<EgtWPFLib:EgtTextBox Name="CTE8LarghezzaTxBx" Grid.Column="5" Grid.Row="9" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
|
||||
<CheckBox Name="CTE9EnableChBx" Grid.Column="0" Grid.Row="10"
|
||||
Style="{StaticResource OmagCut_CheckBox_Single}" Margin="0,0,10,0"/>
|
||||
<Button Name="CTE9Btn" Grid.Row="10" Grid.Column="1"
|
||||
Style="{StaticResource OmagCut_Button}" />
|
||||
<EgtWPFLib:EgtTextBox Name="CTE9AffondamentoTxBx" Grid.Column="3" Grid.Row="10" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
<EgtWPFLib:EgtTextBox Name="CTE9LarghezzaTxBx" Grid.Column="5" Grid.Row="10" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
|
||||
<CheckBox Name="CTE10EnableChBx" Grid.Column="0" Grid.Row="11"
|
||||
Style="{StaticResource OmagCut_CheckBox_Single}" Margin="0,0,10,0"/>
|
||||
<Button Name="CTE10Btn" Grid.Row="11" Grid.Column="1"
|
||||
Style="{StaticResource OmagCut_Button}" />
|
||||
<EgtWPFLib:EgtTextBox Name="CTE10AffondamentoTxBx" Grid.Column="3" Grid.Row="11" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
<EgtWPFLib:EgtTextBox Name="CTE10LarghezzaTxBx" Grid.Column="5" Grid.Row="11" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
|
||||
</Grid>
|
||||
|
||||
</GroupBox>
|
||||
<TextBlock Name="AffondamentoMsgTxBl" Grid.Column="3" Grid.Row="1" Grid.ColumnSpan="2"
|
||||
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}" />
|
||||
|
||||
<!--Selezione il tipo di avvio del programma-->
|
||||
<GroupBox Name="StartLauncherGpBx"
|
||||
<TextBlock Name="LarghezzaMsgTxBl" Grid.Column="5" Grid.Row="1" Grid.ColumnSpan="2"
|
||||
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}" />
|
||||
|
||||
<CheckBox Name="CTE1EnableChBx" Grid.Column="0" Grid.Row="2"
|
||||
Style="{StaticResource OmagCut_CheckBox_Single}" Margin="0,0,10,0"/>
|
||||
<Button Name="CTE1Btn" Grid.Row="2" Grid.Column="1"
|
||||
Style="{StaticResource OmagCut_Button}" />
|
||||
<EgtWPFLib:EgtTextBox Name="CTE1AffondamentoTxBx" Grid.Column="3" Grid.Row="2" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
<EgtWPFLib:EgtTextBox Name="CTE1LarghezzaTxBx" Grid.Column="5" Grid.Row="2" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
|
||||
<CheckBox Name="CTE2EnableChBx" Grid.Column="0" Grid.Row="3"
|
||||
Style="{StaticResource OmagCut_CheckBox_Single}" Margin="0,0,10,0"/>
|
||||
<Button Name="CTE2Btn" Grid.Row="3" Grid.Column="1"
|
||||
Style="{StaticResource OmagCut_Button}" />
|
||||
<EgtWPFLib:EgtTextBox Name="CTE2AffondamentoTxBx" Grid.Column="3" Grid.Row="3" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
<EgtWPFLib:EgtTextBox Name="CTE2LarghezzaTxBx" Grid.Column="5" Grid.Row="3" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
|
||||
<CheckBox Name="CTE3EnableChBx" Grid.Column="0" Grid.Row="4"
|
||||
Style="{StaticResource OmagCut_CheckBox_Single}" Margin="0,0,10,0"/>
|
||||
<Button Name="CTE3Btn" Grid.Row="4" Grid.Column="1"
|
||||
Style="{StaticResource OmagCut_Button}" />
|
||||
<EgtWPFLib:EgtTextBox Name="CTE3AffondamentoTxBx" Grid.Column="3" Grid.Row="4" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
<EgtWPFLib:EgtTextBox Name="CTE3LarghezzaTxBx" Grid.Column="5" Grid.Row="4" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
|
||||
<CheckBox Name="CTE4EnableChBx" Grid.Column="0" Grid.Row="5"
|
||||
Style="{StaticResource OmagCut_CheckBox_Single}" Margin="0,0,10,0"/>
|
||||
<Button Name="CTE4Btn" Grid.Row="5" Grid.Column="1"
|
||||
Style="{StaticResource OmagCut_Button}" />
|
||||
<EgtWPFLib:EgtTextBox Name="CTE4AffondamentoTxBx" Grid.Column="3" Grid.Row="5" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
<EgtWPFLib:EgtTextBox Name="CTE4LarghezzaTxBx" Grid.Column="5" Grid.Row="5" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
|
||||
<CheckBox Name="CTE5EnableChBx" Grid.Column="0" Grid.Row="6"
|
||||
Style="{StaticResource OmagCut_CheckBox_Single}" Margin="0,0,10,0"/>
|
||||
<Button Name="CTE5Btn" Grid.Row="6" Grid.Column="1"
|
||||
Style="{StaticResource OmagCut_Button}" />
|
||||
<EgtWPFLib:EgtTextBox Name="CTE5AffondamentoTxBx" Grid.Column="3" Grid.Row="6" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
<EgtWPFLib:EgtTextBox Name="CTE5LarghezzaTxBx" Grid.Column="5" Grid.Row="6" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
|
||||
<CheckBox Name="CTE6EnableChBx" Grid.Column="0" Grid.Row="7"
|
||||
Style="{StaticResource OmagCut_CheckBox_Single}" Margin="0,0,10,0"/>
|
||||
<Button Name="CTE6Btn" Grid.Row="7" Grid.Column="1"
|
||||
Style="{StaticResource OmagCut_Button}" />
|
||||
<EgtWPFLib:EgtTextBox Name="CTE6AffondamentoTxBx" Grid.Column="3" Grid.Row="7" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
<EgtWPFLib:EgtTextBox Name="CTE6LarghezzaTxBx" Grid.Column="5" Grid.Row="7" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
|
||||
<CheckBox Name="CTE7EnableChBx" Grid.Column="0" Grid.Row="8"
|
||||
Style="{StaticResource OmagCut_CheckBox_Single}" Margin="0,0,10,0"/>
|
||||
<Button Name="CTE7Btn" Grid.Row="8" Grid.Column="1"
|
||||
Style="{StaticResource OmagCut_Button}" />
|
||||
<EgtWPFLib:EgtTextBox Name="CTE7AffondamentoTxBx" Grid.Column="3" Grid.Row="8" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
<EgtWPFLib:EgtTextBox Name="CTE7LarghezzaTxBx" Grid.Column="5" Grid.Row="8" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
|
||||
<CheckBox Name="CTE8EnableChBx" Grid.Column="0" Grid.Row="9"
|
||||
Style="{StaticResource OmagCut_CheckBox_Single}" Margin="0,0,10,0"/>
|
||||
<Button Name="CTE8Btn" Grid.Row="9" Grid.Column="1"
|
||||
Style="{StaticResource OmagCut_Button}" />
|
||||
<EgtWPFLib:EgtTextBox Name="CTE8AffondamentoTxBx" Grid.Column="3" Grid.Row="9" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
<EgtWPFLib:EgtTextBox Name="CTE8LarghezzaTxBx" Grid.Column="5" Grid.Row="9" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
|
||||
<CheckBox Name="CTE9EnableChBx" Grid.Column="0" Grid.Row="10"
|
||||
Style="{StaticResource OmagCut_CheckBox_Single}" Margin="0,0,10,0"/>
|
||||
<Button Name="CTE9Btn" Grid.Row="10" Grid.Column="1"
|
||||
Style="{StaticResource OmagCut_Button}" />
|
||||
<EgtWPFLib:EgtTextBox Name="CTE9AffondamentoTxBx" Grid.Column="3" Grid.Row="10" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
<EgtWPFLib:EgtTextBox Name="CTE9LarghezzaTxBx" Grid.Column="5" Grid.Row="10" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
|
||||
<CheckBox Name="CTE10EnableChBx" Grid.Column="0" Grid.Row="11"
|
||||
Style="{StaticResource OmagCut_CheckBox_Single}" Margin="0,0,10,0"/>
|
||||
<Button Name="CTE10Btn" Grid.Row="11" Grid.Column="1"
|
||||
Style="{StaticResource OmagCut_Button}" />
|
||||
<EgtWPFLib:EgtTextBox Name="CTE10AffondamentoTxBx" Grid.Column="3" Grid.Row="11" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
<EgtWPFLib:EgtTextBox Name="CTE10LarghezzaTxBx" Grid.Column="5" Grid.Row="11" Margin="10,0,10,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}" />
|
||||
|
||||
</Grid>
|
||||
|
||||
</GroupBox>
|
||||
|
||||
<!--Selezione il tipo di avvio del programma-->
|
||||
<GroupBox Name="StartLauncherGpBx"
|
||||
Grid.Column="3" Grid.RowSpan="3" Grid.ColumnSpan="1"
|
||||
Style="{DynamicResource OmagCut_GroupBox}">
|
||||
<Grid >
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
<ColumnDefinition Width="4*"/>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="0.25*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.25*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid >
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
<ColumnDefinition Width="4*"/>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="0.25*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.25*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<ComboBox Name="StartLauncherCmBx" Grid.Column="1" Grid.Row="1" Style="{StaticResource OmagCut_ComboBox}">
|
||||
<ComboBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding}" Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</DataTemplate>
|
||||
</ComboBox.ItemTemplate>
|
||||
</ComboBox>
|
||||
<ComboBox Name="StartLauncherCmBx" Grid.Column="1" Grid.Row="1" Style="{StaticResource OmagCut_ComboBox}">
|
||||
<ComboBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding}" Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</DataTemplate>
|
||||
</ComboBox.ItemTemplate>
|
||||
</ComboBox>
|
||||
|
||||
</Grid>
|
||||
</GroupBox>
|
||||
|
||||
<GroupBox Name="FeedbackGpBx"
|
||||
</Grid>
|
||||
</GroupBox>
|
||||
|
||||
<GroupBox Name="FeedbackGpBx"
|
||||
Grid.Column="4" Grid.RowSpan="3" Grid.ColumnSpan="1"
|
||||
Style="{DynamicResource OmagCut_GroupBox}">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="0.25*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="0.25*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<Button Name="FeedbackBtn"
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="0.25*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="0.25*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<Button Name="FeedbackBtn"
|
||||
Grid.Row="1" Grid.Column="1"
|
||||
Style="{DynamicResource OmagCut_YellowIconButton}">
|
||||
<Image Source="{DynamicResource SendImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||
</Button>
|
||||
</Grid>
|
||||
<Image Source="{DynamicResource SendImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
|
||||
</Button>
|
||||
</Grid>
|
||||
|
||||
</GroupBox>
|
||||
|
||||
|
||||
@@ -7,6 +7,8 @@ Public Class OptionsPageUC
|
||||
Dim m_MainWindow As MainWindow = DirectCast(Application.Current.MainWindow, MainWindow)
|
||||
|
||||
Private UnitsList() As String = {"inch", "mm"}
|
||||
Private FractionPatternList() As String = {"Decimal", "Foot'Inch""", "Only Inch"}
|
||||
Private PrecisionList() As Double = {2, 4, 8, 16, 32, 64, 128}
|
||||
Private ThemesList() As String = {"Classic", "Dark"}
|
||||
|
||||
' "Last Project", "New Project", "Open Folder", "Show Window"
|
||||
@@ -18,6 +20,10 @@ Public Class OptionsPageUC
|
||||
LanguageCmBx.ItemsSource = m_MainWindow.m_LanguagesList
|
||||
' Associazione della lista unità di misura alla combobox
|
||||
UnitsOfMeasureCmBx.ItemsSource = UnitsList
|
||||
' Associazione della lista dei Pattern
|
||||
FractionPatternCmBx.ItemsSource = FractionPatternList
|
||||
' Associazione della lista della precisione
|
||||
PrecisionCmBx.ItemsSource = PrecisionList
|
||||
' Associazione della lista temi alla combobox
|
||||
ThemesCmBx.ItemsSource = ThemesList
|
||||
|
||||
@@ -27,6 +33,16 @@ Public Class OptionsPageUC
|
||||
' Imposto l'unità di misura corrente
|
||||
UnitsOfMeasureCmBx.SelectedIndex = If(EgtUiUnitsAreMM(), 1, 0)
|
||||
|
||||
' Imposto il pattern della per la rappresentazione frazionaria
|
||||
nCurrFractionPattern = GetPrivateProfileInt(S_GENERAL, K_FRACTIONPATTERN, 0, m_MainWindow.GetIniFile())
|
||||
FractionPatternCmBx.SelectedIndex = nCurrFractionPattern
|
||||
EgtWPFLib.FractionStringConverter.SetCurrFractionPattern(nCurrFractionPattern)
|
||||
|
||||
' Imposto la preciosne della rappresentazione frazionaria
|
||||
dPrecision = CDbl(GetPrivateProfileInt(S_GENERAL, K_PRECISION, 64, m_MainWindow.GetIniFile()))
|
||||
Dim Index As Integer = PrecisionCmBx.Items.IndexOf(dPrecision)
|
||||
PrecisionCmBx.SelectedIndex = Index
|
||||
|
||||
' Imposto il tema corrente
|
||||
ThemesCmBx.SelectedIndex = GetPrivateProfileInt(S_GENERAL, K_THEME, 0, m_MainWindow.GetIniFile())
|
||||
Themes_StartUp()
|
||||
@@ -322,9 +338,60 @@ Public Class OptionsPageUC
|
||||
EgtSetUiUnits(bMM)
|
||||
m_MainWindow.m_CurrentProjectPageUC.UpdateHeightTxBx()
|
||||
WritePrivateProfileString(S_GENERAL, K_MMUNITS, If(bMM, "1", "0"), m_MainWindow.GetIniFile())
|
||||
|
||||
If bMM Then
|
||||
' se selezione MILLIMETRI nascondo la combobox che permette di inserie il tipo di pattern per la definizione delle frazioni
|
||||
FractionPatternCmBx.Visibility = Visibility.Hidden
|
||||
PrecisionCmBx.Visibility = Visibility.Hidden
|
||||
Dim RowNum As Integer = UnitGrid.RowDefinitions.Count
|
||||
If RowNum > 3 Then
|
||||
UnitsOfMeasureCmBx.SetValue(Grid.RowSpanProperty, 3)
|
||||
End If
|
||||
Else
|
||||
' se selezione POLLICI mostro la combobox che permette di inserie il tipo di pattern per la definizione delle frazioni
|
||||
FractionPatternCmBx.Visibility = Visibility.Visible
|
||||
PrecisionCmBx.Visibility = Visibility.Visible
|
||||
UnitsOfMeasureCmBx.SetValue(Grid.RowSpanProperty, 1)
|
||||
End If
|
||||
|
||||
' Aggiorno dati nella pagina dipendenti da unità di misura
|
||||
UpdateSlabDxf()
|
||||
UpdateAllCSTA()
|
||||
If m_MainWindow.m_CurrentMachine.bWaterJet And m_MainWindow.m_CurrentMachine.bFromDBWaterJet Then
|
||||
m_MainWindow.m_CurrentMachine.LoadWJMaterial()
|
||||
If Not IsNothing(m_MainWindow.m_MachinePageUC.m_WaterJetPageUC) Then
|
||||
m_MainWindow.m_MachinePageUC.m_WaterJetPageUC.WaterJetPage_Reinitialize()
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub FractionPatternCmBx_SelectionChanged(sender As Object, e As SelectionChangedEventArgs) Handles FractionPatternCmBx.SelectionChanged
|
||||
nCurrFractionPattern = FractionPatternCmBx.SelectedIndex
|
||||
EgtWPFLib.FractionStringConverter.SetCurrFractionPattern(nCurrFractionPattern)
|
||||
WritePrivateProfileString(S_GENERAL, K_FRACTIONPATTERN, nCurrFractionPattern, m_MainWindow.GetIniFile())
|
||||
' Aggiorno dati nella pagina dipendenti da unità di misura
|
||||
UpdateSlabDxf()
|
||||
UpdateAllCSTA()
|
||||
If m_MainWindow.m_CurrentMachine.bWaterJet And m_MainWindow.m_CurrentMachine.bFromDBWaterJet Then
|
||||
m_MainWindow.m_CurrentMachine.LoadWJMaterial()
|
||||
If Not IsNothing(m_MainWindow.m_MachinePageUC.m_WaterJetPageUC) Then
|
||||
m_MainWindow.m_MachinePageUC.m_WaterJetPageUC.WaterJetPage_Reinitialize()
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub PrecisionCmBx_SelectionChanged(sender As Object, e As SelectionChangedEventArgs) Handles PrecisionCmBx.SelectionChanged
|
||||
dPrecision = PrecisionCmBx.SelectedValue
|
||||
WritePrivateProfileString(S_GENERAL, K_PRECISION, dPrecision, m_MainWindow.GetIniFile())
|
||||
' Aggiorno dati nella pagina dipendenti da unità di misura
|
||||
UpdateSlabDxf()
|
||||
UpdateAllCSTA()
|
||||
If m_MainWindow.m_CurrentMachine.bWaterJet And m_MainWindow.m_CurrentMachine.bFromDBWaterJet Then
|
||||
m_MainWindow.m_CurrentMachine.LoadWJMaterial()
|
||||
If Not IsNothing(m_MainWindow.m_MachinePageUC.m_WaterJetPageUC) Then
|
||||
m_MainWindow.m_MachinePageUC.m_WaterJetPageUC.WaterJetPage_Reinitialize()
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub ThemesCmBx_SelectionChanged(sender As Object, e As SelectionChangedEventArgs) Handles ThemesCmBx.SelectionChanged
|
||||
@@ -648,70 +715,70 @@ Public Class OptionsPageUC
|
||||
|
||||
Private Sub CTSA1InclinazioneTxBx_TextChanged(sender As Object, e As TextChangedEventArgs) Handles CTSA1InclinazioneTxBx.TextChanged
|
||||
If CTSA1InclinazioneTxBx.Text <> "-" Then
|
||||
Dim dAng As Double : If Not StringToLen(CTSA1InclinazioneTxBx.Text, dAng) Then CTSA1InclinazioneTxBx.Text = ""
|
||||
Dim dAng As Double : If Not StringToDouble(CTSA1InclinazioneTxBx.Text, dAng) Then CTSA1InclinazioneTxBx.Text = ""
|
||||
End If
|
||||
CTSA1EnableChBx_Click(sender, e)
|
||||
End Sub
|
||||
|
||||
Private Sub CTSA2InclinazioneTxBx_TextChanged(sender As Object, e As TextChangedEventArgs) Handles CTSA2InclinazioneTxBx.TextChanged
|
||||
If CTSA2InclinazioneTxBx.Text <> "-" Then
|
||||
Dim dAng As Double : If Not StringToLen(CTSA2InclinazioneTxBx.Text, dAng) Then CTSA2InclinazioneTxBx.Text = ""
|
||||
Dim dAng As Double : If Not StringToDouble(CTSA2InclinazioneTxBx.Text, dAng) Then CTSA2InclinazioneTxBx.Text = ""
|
||||
End If
|
||||
CTSA2EnableChBx_Click(sender, e)
|
||||
End Sub
|
||||
|
||||
Private Sub CTSA3InclinazioneTxBx_TextChanged(sender As Object, e As TextChangedEventArgs) Handles CTSA3InclinazioneTxBx.TextChanged
|
||||
If CTSA3InclinazioneTxBx.Text <> "-" Then
|
||||
Dim dAng As Double : If Not StringToLen(CTSA3InclinazioneTxBx.Text, dAng) Then CTSA3InclinazioneTxBx.Text = ""
|
||||
Dim dAng As Double : If Not StringToDouble(CTSA3InclinazioneTxBx.Text, dAng) Then CTSA3InclinazioneTxBx.Text = ""
|
||||
End If
|
||||
CTSA3EnableChBx_Click(sender, e)
|
||||
End Sub
|
||||
|
||||
Private Sub CTSA4InclinazioneTxBx_TextChanged(sender As Object, e As TextChangedEventArgs) Handles CTSA4InclinazioneTxBx.TextChanged
|
||||
If CTSA4InclinazioneTxBx.Text <> "-" Then
|
||||
Dim dAng As Double : If Not StringToLen(CTSA4InclinazioneTxBx.Text, dAng) Then CTSA4InclinazioneTxBx.Text = ""
|
||||
Dim dAng As Double : If Not StringToDouble(CTSA4InclinazioneTxBx.Text, dAng) Then CTSA4InclinazioneTxBx.Text = ""
|
||||
End If
|
||||
CTSA4EnableChBx_Click(sender, e)
|
||||
End Sub
|
||||
|
||||
Private Sub CTSA5InclinazioneTxBx_TextChanged(sender As Object, e As TextChangedEventArgs) Handles CTSA5InclinazioneTxBx.TextChanged
|
||||
If CTSA5InclinazioneTxBx.Text <> "-" Then
|
||||
Dim dAng As Double : If Not StringToLen(CTSA5InclinazioneTxBx.Text, dAng) Then CTSA5InclinazioneTxBx.Text = ""
|
||||
Dim dAng As Double : If Not StringToDouble(CTSA5InclinazioneTxBx.Text, dAng) Then CTSA5InclinazioneTxBx.Text = ""
|
||||
End If
|
||||
CTSA5EnableChBx_Click(sender, e)
|
||||
End Sub
|
||||
|
||||
Private Sub CTSA6InclinazioneTxBx_TextChanged(sender As Object, e As TextChangedEventArgs) Handles CTSA6InclinazioneTxBx.TextChanged
|
||||
If CTSA6InclinazioneTxBx.Text <> "-" Then
|
||||
Dim dAng As Double : If Not StringToLen(CTSA6InclinazioneTxBx.Text, dAng) Then CTSA6InclinazioneTxBx.Text = ""
|
||||
Dim dAng As Double : If Not StringToDouble(CTSA6InclinazioneTxBx.Text, dAng) Then CTSA6InclinazioneTxBx.Text = ""
|
||||
End If
|
||||
CTSA6EnableChBx_Click(sender, e)
|
||||
End Sub
|
||||
|
||||
Private Sub CTSA7InclinazioneTxBx_TextChanged(sender As Object, e As TextChangedEventArgs) Handles CTSA7InclinazioneTxBx.TextChanged
|
||||
If CTSA7InclinazioneTxBx.Text <> "-" Then
|
||||
Dim dAng As Double : If Not StringToLen(CTSA7InclinazioneTxBx.Text, dAng) Then CTSA7InclinazioneTxBx.Text = ""
|
||||
Dim dAng As Double : If Not StringToDouble(CTSA7InclinazioneTxBx.Text, dAng) Then CTSA7InclinazioneTxBx.Text = ""
|
||||
End If
|
||||
CTSA7EnableChBx_Click(sender, e)
|
||||
End Sub
|
||||
|
||||
Private Sub CTSA8InclinazioneTxBx_TextChanged(sender As Object, e As TextChangedEventArgs) Handles CTSA8InclinazioneTxBx.TextChanged
|
||||
If CTSA8InclinazioneTxBx.Text <> "-" Then
|
||||
Dim dAng As Double : If Not StringToLen(CTSA8InclinazioneTxBx.Text, dAng) Then CTSA8InclinazioneTxBx.Text = ""
|
||||
Dim dAng As Double : If Not StringToDouble(CTSA8InclinazioneTxBx.Text, dAng) Then CTSA8InclinazioneTxBx.Text = ""
|
||||
End If
|
||||
CTSA8EnableChBx_Click(sender, e)
|
||||
End Sub
|
||||
|
||||
Private Sub CTSA9InclinazioneTxBx_TextChanged(sender As Object, e As TextChangedEventArgs) Handles CTSA9InclinazioneTxBx.TextChanged
|
||||
If CTSA9InclinazioneTxBx.Text <> "-" Then
|
||||
Dim dAng As Double : If Not StringToLen(CTSA9InclinazioneTxBx.Text, dAng) Then CTSA9InclinazioneTxBx.Text = ""
|
||||
Dim dAng As Double : If Not StringToDouble(CTSA9InclinazioneTxBx.Text, dAng) Then CTSA9InclinazioneTxBx.Text = ""
|
||||
End If
|
||||
CTSA9EnableChBx_Click(sender, e)
|
||||
End Sub
|
||||
|
||||
Private Sub CTSA10InclinazioneTxBx_TextChanged(sender As Object, e As TextChangedEventArgs) Handles CTSA10InclinazioneTxBx.TextChanged
|
||||
If CTSA10InclinazioneTxBx.Text <> "-" Then
|
||||
Dim dAng As Double : If Not StringToLen(CTSA10InclinazioneTxBx.Text, dAng) Then CTSA10InclinazioneTxBx.Text = ""
|
||||
Dim dAng As Double : If Not StringToDouble(CTSA10InclinazioneTxBx.Text, dAng) Then CTSA10InclinazioneTxBx.Text = ""
|
||||
End If
|
||||
CTSA10EnableChBx_Click(sender, e)
|
||||
End Sub
|
||||
|
||||
@@ -0,0 +1,95 @@
|
||||
<UserControl x:Class="AddToDataBaseUC"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="853.3" d:DesignWidth="1280">
|
||||
|
||||
<Border Style="{DynamicResource OmagCut_Border}">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
<ColumnDefinition Width="2.5*"/>
|
||||
<ColumnDefinition Width="0.25*"/>
|
||||
<ColumnDefinition Width="4*"/>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<!--Nome BLOCCO-->
|
||||
<TextBlock Name="BlockTxBl" Grid.Column="1" Grid.Row="1" Text="Name block"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="BlockTxBx" Grid.Column="3" Grid.Row="1"
|
||||
Style="{DynamicResource OmagCut_KeyboardTextBox}"/>
|
||||
<!--Numero ID-->
|
||||
<TextBlock Name="NbrIdTxBl" Grid.Column="1" Grid.Row="3" Text="ID"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="NbrIdTxBx" Grid.Column="3" Grid.Row="3"
|
||||
Style="{DynamicResource OmagCut_KeyboardTextBox}"/>
|
||||
<!--STATE-->
|
||||
<TextBlock Name="StateTxBl" Grid.Column="1" Grid.Row="5" Text="State"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||
<ComboBox Name="StateCmBx" Grid.Column="3" Grid.Row="5" Style="{StaticResource OmagCut_LeftComboBoxInBorder}">
|
||||
<ComboBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding}" Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</DataTemplate>
|
||||
</ComboBox.ItemTemplate>
|
||||
</ComboBox>
|
||||
<!--PROJECT-->
|
||||
<TextBlock Name="ProjectNameTxBl" Grid.Column="1" Grid.Row="7" Text="Project"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="ProjectTxBx" Grid.Column="3" Grid.Row="7"
|
||||
Style="{DynamicResource OmagCut_KeyboardTextBox}"/>
|
||||
<!--MATERIAL-->
|
||||
<TextBlock Name="MatTxBl" Grid.Column="1" Grid.Row="9" Text="Mat"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="MatTxBx" Grid.Column="3" Grid.Row="9"
|
||||
Style="{DynamicResource OmagCut_KeyboardTextBox}" IsEnabled="False"/>
|
||||
<!--THICKNESS-->
|
||||
<TextBlock Name="ThicknessTxBl" Grid.Column="1" Grid.Row="11" Text="Thickness"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="ThicknessTxBx" Grid.Column="3" Grid.Row="11"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
<!--WAREHOUSE-->
|
||||
<TextBlock Name="WarehouseTxBl" Grid.Column="1" Grid.Row="13" Text="Warehouse position"
|
||||
Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="WarehouseTxBx" Grid.Column="3" Grid.Row="13"
|
||||
Style="{DynamicResource OmagCut_KeyboardTextBox}"/>
|
||||
|
||||
<!--CANCEL-->
|
||||
<Button Name="CacelBtn" Grid.Column="1" Grid.Row="15" Content="Delete"
|
||||
Style="{DynamicResource OmagCut_YellowTextButton}"/>
|
||||
<!--ADD-->
|
||||
<Button Name="AddBtn" Grid.Column="3" Grid.Row="15" Content="Add"
|
||||
Style="{DynamicResource OmagCut_YellowTextButton}"/>
|
||||
<!--PRINT-->
|
||||
<Button Name="PrintBtn" Grid.Column="1" Grid.Row="17" Content="Print"
|
||||
Style="{DynamicResource OmagCut_YellowTextButton}"/>
|
||||
|
||||
</Grid>
|
||||
|
||||
</Border>
|
||||
|
||||
</UserControl>
|
||||
@@ -0,0 +1,121 @@
|
||||
Imports EgtUILib
|
||||
Imports EgtPHOTOLib
|
||||
Imports System.IO
|
||||
|
||||
Public Class AddToDataBaseUC
|
||||
|
||||
Private m_OmagPhotoWD As OmagPhotoWD
|
||||
|
||||
#Region "PROPERTY"
|
||||
Private Sub BlockTxBx_EgtClosed(sender As Object, e As EventArgs) Handles BlockTxBx.EgtClosed
|
||||
' assegno il dato alla classe inizializzata nella libreria
|
||||
EgtPHOTOLib.PhotoMap.refOptionPanelVM.SelSlab.sNameBlock = BlockTxBx.Text
|
||||
' devo riasseganre il valore dell'indice
|
||||
NbrIdTxBx.Text = EgtPHOTOLib.PhotoMap.refOptionPanelVM.SelSlab.sNbrID
|
||||
EnableButtons()
|
||||
End Sub
|
||||
|
||||
Private Sub NbrIdTxBx_EgtClosed(sender As Object, e As EventArgs) Handles NbrIdTxBx.EgtClosed
|
||||
' assegno il dato alla classe inizializzata nella libreria
|
||||
EgtPHOTOLib.PhotoMap.refOptionPanelVM.SelSlab.sNbrID = NbrIdTxBx.Text
|
||||
EnableButtons()
|
||||
End Sub
|
||||
|
||||
Private Sub StateCmBx_Changed() Handles StateCmBx.SelectionChanged
|
||||
EgtPHOTOLib.PhotoMap.refOptionPanelVM.SelSlab.State = StateCmBx.SelectedIndex
|
||||
EnableButtons()
|
||||
End Sub
|
||||
|
||||
Private Sub ProjectTxBx_EgtClosed(sender As Object, e As EventArgs) Handles ProjectTxBx.EgtClosed
|
||||
EgtPHOTOLib.PhotoMap.refOptionPanelVM.SelSlab.ProjectAssignedTo = ProjectTxBx.Text
|
||||
EnableButtons()
|
||||
End Sub
|
||||
|
||||
Private Sub ThicknessTxBx_EgtClosed(sender As Object, e As EventArgs) Handles ThicknessTxBx.EgtClosed
|
||||
EgtPHOTOLib.PhotoMap.refOptionPanelVM.SelSlab.Thickness = ThicknessTxBx.Text
|
||||
EnableButtons()
|
||||
End Sub
|
||||
|
||||
Private Sub WarehouseTxBx_EgtClosed(sender As Object, e As EventArgs) Handles WarehouseTxBx.EgtClosed
|
||||
EgtPHOTOLib.PhotoMap.refOptionPanelVM.SelSlab.WarehousePosition = WarehouseTxBl.Text
|
||||
EnableButtons()
|
||||
End Sub
|
||||
#End Region ' Property
|
||||
|
||||
Sub New(LocalOmagPhotoWD As OmagPhotoWD)
|
||||
|
||||
' La chiamata è richiesta dalla finestra di progettazione.
|
||||
InitializeComponent()
|
||||
|
||||
' Aggiungere le eventuali istruzioni di inizializzazione dopo la chiamata a InitializeComponent().
|
||||
m_OmagPhotoWD = LocalOmagPhotoWD
|
||||
End Sub
|
||||
|
||||
' dopo la crezione della pagina imposto lo stato dei pulsanti
|
||||
Private Sub PostLoaded() Handles Me.Loaded
|
||||
If EgtPHOTOLib.MainData.bEnableTextId Then
|
||||
BlockTxBx.Visibility = Visibility.Collapsed
|
||||
BlockTxBl.Visibility = Visibility.Collapsed
|
||||
Else
|
||||
NbrIdTxBx.IsEnabled = False
|
||||
End If
|
||||
PrintBtn.IsEnabled = EgtPHOTOLib.MainData.bEnablePrinter
|
||||
EnableButtons()
|
||||
End Sub
|
||||
|
||||
#Region "COMMAND"
|
||||
Private Sub CancelBtn_Click() Handles CacelBtn.Click
|
||||
' se è stata inserita nel DB allora devo rimuoverla ed esco dalla pagina
|
||||
EgtPHOTOLib.refOptionPanelVM.Delete()
|
||||
' notifico che il grezzo è stato rimosso
|
||||
OmagPhotoWD.m_IsDeleted = True
|
||||
' notifico che il grezzo non è stato aggiunto al DB delle lastre
|
||||
OmagPhotoWD.m_IsAdded = False
|
||||
' elimino l'identificativo usato nel database del grezzo appena inserito
|
||||
OmagPhotoWD.m_sDtBsId = ""
|
||||
' esco dalla pagina
|
||||
m_OmagPhotoWD.Close()
|
||||
End Sub
|
||||
|
||||
Private Sub AddBtn_Click() Handles AddBtn.Click
|
||||
' se non sono validi i campi allora attendo
|
||||
If Not EgtPHOTOLib.PhotoMap.refOptionPanelVM.Ok_IsEnabled Then Return
|
||||
' modalità di funzionamento della libreria: ProjectSlabVM.ProjectModeOpt.NEWSLAB
|
||||
EgtPHOTOLib.PhotoMap.refOptionPanelVM.Save()
|
||||
' notifico che il grezzo è stato aggiunto al DB delle lastre
|
||||
OmagPhotoWD.m_IsAdded = True
|
||||
' salvo l'identificativo usato nel database del grezzo appena inserito
|
||||
OmagPhotoWD.m_sDtBsId = EgtPHOTOLib.PhotoMap.refOptionPanelVM.SelSlab.Id
|
||||
' salvo il nome del blocco che è stato utilizzato
|
||||
If Not EgtPHOTOLib.MainData.bEnableTextId Then
|
||||
WritePrivateProfileString(S_SCRAPS, K_LASTBLOCK, EgtPHOTOLib.PhotoMap.refOptionPanelVM.SelSlab.sNameBlock, m_OmagPhotoWD.m_MainWindow.GetIniFile())
|
||||
End If
|
||||
' aggiorno il testo del messaggio "Add" → "Save"
|
||||
AddBtn.Content = "Save"
|
||||
|
||||
' notifico che da ora la lastra inserita è in modalità di modifica (non salvo la lastra come nuova, ma la sovrascrivo come in modifica)
|
||||
EgtPHOTOLib.PhotoMap.refProjectVM.SetSelProjectMode(ProjectSlabVM.ProjectModeOpt.DETAIL)
|
||||
EgtPHOTOLib.PhotoMap.refProjectVM.SelSlab.SetOrigValues()
|
||||
|
||||
' notifico che la lastra è in modifica da questo programma
|
||||
EgtPHOTOLib.PhotoMap.refProjectVM.SelSlab.IsSelected = EgtPHOTOLib.MainData.nKey
|
||||
EgtPHOTOLib.PhotoMap.refOptionPanelVM.IsSelected()
|
||||
End Sub
|
||||
|
||||
Private Sub PrintBtn_Click() Handles PrintBtn.Click
|
||||
EgtPHOTOLib.PhotoMap.refOptionPanelVM.PrintLabel()
|
||||
End Sub
|
||||
#End Region ' Command
|
||||
|
||||
#Region "METHODS"
|
||||
Private Sub EnableButtons()
|
||||
AddBtn.IsEnabled = EgtPHOTOLib.PhotoMap.refOptionPanelVM.Ok_IsEnabled
|
||||
' se la stampante non è abilitata allora non permetto assolutamente di abilitare il comando
|
||||
If EgtPHOTOLib.MainData.bEnablePrinter Then
|
||||
PrintBtn.IsEnabled = EgtPHOTOLib.PhotoMap.refOptionPanelVM.Ok_IsEnabled
|
||||
End If
|
||||
|
||||
End Sub
|
||||
#End Region ' Methods
|
||||
|
||||
End Class
|
||||
@@ -107,7 +107,8 @@ Public Class CurrentProjectPageUC
|
||||
Dim nDepthBits As Integer = GetPrivateProfileInt(S_OPENGL, K_DEPTHBITS, 32, m_MainWindow.GetIniFile())
|
||||
CurrentProjectScene.SetViewAttributes(nDriver, b2Buff, nColorBits, nDepthBits)
|
||||
' inizializzo la scena (DB geometrico + visualizzazione) e verifico presenza chiave
|
||||
If Not CurrentProjectScene.Init() Then
|
||||
Dim bProd As Boolean = m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.CUT_BASE)
|
||||
If Not CurrentProjectScene.Init() Or Not bProd Then
|
||||
' Rimuovo l'host della scena perchè altrimenti rimarrebbe il buco!!
|
||||
Me.CurrentProjectPageGrid.Children.Remove(CurrentProjectSceneHost)
|
||||
' Flag per riavvio programma
|
||||
@@ -158,6 +159,7 @@ Public Class CurrentProjectPageUC
|
||||
#End If
|
||||
m_MainWindow.Close()
|
||||
If bRestart Then Process.Start(Application.ResourceAssembly.Location)
|
||||
Return
|
||||
End If
|
||||
' visualizzazione avanzata dei triangoli costituenti le superfici
|
||||
Dim bShowTriaAdv As Boolean = (GetPrivateProfileInt(S_SCENE, K_SHOWTRIAADV, 1, m_MainWindow.GetIniFile()) <> 0)
|
||||
@@ -168,11 +170,6 @@ Public Class CurrentProjectPageUC
|
||||
' dimensione lineare max in pixel delle textures
|
||||
Dim nTxrMaxLinPix As Integer = GetPrivateProfileInt(S_SCENE, K_TEXMAXLINPIX, 4096, m_MainWindow.GetIniFile())
|
||||
EgtSetTextureMaxLinPixels(nTxrMaxLinPix)
|
||||
' Verifico abilitazione prodotto
|
||||
If Not m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.CUT_BASE) Then
|
||||
Dim MissingKeyWnd As New EgtMsgBox(m_MainWindow, EgtMsg(MSG_MISSINGKEYWD + 1), EgtMsg(MSG_MISSINGKEYWD + 5), EgtMsgBox.Buttons.OK, EgtMsgBox.Icons.NULL, 1)
|
||||
m_MainWindow.Close()
|
||||
End If
|
||||
' Recupero e imposto handle finestra principale
|
||||
Dim hMainWnd As IntPtr = New WindowInteropHelper(Application.Current.MainWindow).Handle
|
||||
EgtSetMainWindowHandle(hMainWnd)
|
||||
@@ -399,6 +396,8 @@ Public Class CurrentProjectPageUC
|
||||
m_MainWindow.m_CadCutPageUC.m_NestPage.CalcRawPart()
|
||||
m_dRawHeight = 0
|
||||
UpdateHeightTxBx()
|
||||
' prima di parcheggiare svuoto dei pezzi in parcheggio sia vuota
|
||||
m_MainWindow.m_CadCutPageUC.m_NestPage.ResetListOfGruopInPark()
|
||||
' Parcheggio correttamente i pezzi precedentemente salvati
|
||||
Dim nId2 As Integer = EgtGetFirstPart()
|
||||
While nId2 <> GDB_ID.NULL
|
||||
@@ -410,9 +409,14 @@ Public Class CurrentProjectPageUC
|
||||
nId2 = EgtGetNextPart(nId2)
|
||||
End While
|
||||
' Aggiorno Aree totale e da lavorare dei pezzi
|
||||
SetTotalArea( dTotArea)
|
||||
SetTotalArea(dTotArea)
|
||||
UpdateToProduceArea()
|
||||
ShowAreas()
|
||||
' Salvo info di C home
|
||||
Dim dCHome As Double
|
||||
EgtGetAxisHomePos("C", dCHome)
|
||||
EgtSetInfo(EgtGetFirstNameInGroup(GDB_ID.ROOT, NAME_PROJMARK), INFO_CAXESHOME, DoubleToString(dCHome, 0))
|
||||
EgtZoom(ZM.ALL)
|
||||
' Dichiaro progetto non modificato
|
||||
EgtResetModified()
|
||||
Return True
|
||||
@@ -523,7 +527,21 @@ Public Class CurrentProjectPageUC
|
||||
m_MainWindow.m_CurrentMachine.dAdditionalTable = dValue
|
||||
End If
|
||||
' forzo visualizzazione eventuali dati su aree
|
||||
SetAreasStatus( True)
|
||||
SetAreasStatus(True)
|
||||
' Recupero info C Home
|
||||
Dim dCHomeCurrMach As Double
|
||||
Dim dCHomeCurrproj As Double
|
||||
EgtGetAxisHomePos("C", dCHomeCurrMach)
|
||||
' Verifico che esista l'info del progetto
|
||||
If EgtExistsInfo(EgtGetFirstNameInGroup(GDB_ID.ROOT, NAME_PROJMARK), INFO_CAXESHOME) Then
|
||||
EgtGetInfo(EgtGetFirstNameInGroup(GDB_ID.ROOT, NAME_PROJMARK), INFO_CAXESHOME, dCHomeCurrproj)
|
||||
' Se la macchina indicata ha C Home differente allora comunico un errore del progetto
|
||||
If Math.Abs(dCHomeCurrproj - dCHomeCurrMach) > EPS_ANG_SMALL Then
|
||||
EgtOutLog(" WARNING -> C axes home project is different from current machine, delta ang C home:" & DoubleToString(dCHomeCurrproj - dCHomeCurrMach, 2))
|
||||
End If
|
||||
Else
|
||||
EgtSetInfo(EgtGetFirstNameInGroup(GDB_ID.ROOT, NAME_PROJMARK), INFO_CAXESHOME, DoubleToString(dCHomeCurrMach, 0))
|
||||
End If
|
||||
' Dichiaro progetto non modificato
|
||||
EgtResetModified()
|
||||
Return True
|
||||
@@ -870,7 +888,7 @@ Public Class CurrentProjectPageUC
|
||||
|
||||
Friend Function UpdateSideAngCutProbeFlag() As Boolean
|
||||
Dim bCurrSacProbe As Boolean =
|
||||
(GetPrivateProfileInt(S_MACH_NEST, K_MACH_SACPROBE, 0, m_MainWindow.GetMachIniFile()) <> 0)
|
||||
(GetPrivateProfileInt(S_MACH_NEST, K_MACH_SACPROBE, 0, m_MainWindow.GetMachIniFile()) <> 0) AndAlso m_MainWindow.m_CurrentMachine.IsRawProbingPossible()
|
||||
Dim bProjSacProbe As Boolean = GetSideAngCutProbeFlag()
|
||||
If bCurrSacProbe <> bProjSacProbe Then Return SetSideAngCutProbeFlag(bCurrSacProbe)
|
||||
Return True
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
<Window x:Class="OmagPhotoWD"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:OmagCUT="clr-namespace:OmagCUT"
|
||||
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
|
||||
xmlns:EgtPHOTOLib="clr-namespace:EgtPHOTOLib;assembly=EgtPHOTOLib"
|
||||
FontFamily="{DynamicResource OmagCut_Font}"
|
||||
Title="OmagPHOTO" Height="700" Width="1250" WindowStyle="None" ResizeMode="NoResize" ShowInTaskbar="False" >
|
||||
<Border Style="{DynamicResource OmagCut_Border}">
|
||||
<Grid Name="OptionSLabGrid">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="4*"/>
|
||||
<ColumnDefinition Width="10*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="0.25*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="0.25*"/>
|
||||
<RowDefinition Height="10*"/>
|
||||
<RowDefinition Height="0.25*"/>
|
||||
<RowDefinition Height="1.5*"/>
|
||||
<RowDefinition Height="0.25*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<!-- nel codice mi occupo di riempire la griglia con gli UserControl -->
|
||||
|
||||
<Button Name="ExitBtn" Grid.Column="2" Grid.Row="3"
|
||||
Style="{DynamicResource OmagCut_GradientBlueIconButton}" IsCancel="True">
|
||||
<Image Source="{DynamicResource XImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
|
||||
<DockPanel Grid.Column="1" Grid.Row="1" Visibility="Hidden">
|
||||
<!--StatusBar-->
|
||||
<EgtWPFLib5:StatusBarV DataContext="{StaticResource StatusBarVM}" DockPanel.Dock="Bottom"/>
|
||||
</DockPanel>
|
||||
</Grid>
|
||||
</Border>
|
||||
</Window>
|
||||
@@ -0,0 +1,172 @@
|
||||
Imports EgtUILib
|
||||
Imports EgtWPFLib5
|
||||
Imports EgtPHOTOLib
|
||||
Imports System.IO
|
||||
|
||||
Public Class OmagPhotoWD
|
||||
' Riferimento alla MainWindow
|
||||
Friend m_MainWindow As MainWindow
|
||||
|
||||
Private m_AddToDataBaseUC As AddToDataBaseUC
|
||||
Private m_StateList As New List(Of EgtWPFLib5.IdNameStruct)
|
||||
|
||||
' il contorno dell sfrido è definito a partire dai punti che rappresentano i vertici dello stesso
|
||||
Private m_ContornScrap As New List(Of Point3d)
|
||||
' se lo stato della lastra è "2" significa che è già stata inserita nel DB (non devo generare una nuova foto!)
|
||||
Private m_nState As Integer = 1
|
||||
' salvo il nome del file *.jpg
|
||||
Private m_sFileImage As String = String.Empty
|
||||
|
||||
' definsce se il slavataggio è andato a buon fine (questa variabile deve esistere anche dopo la chiusura della finestra!)
|
||||
Public Shared m_IsAdded As Boolean = False
|
||||
Public Shared m_sDtBsId As String = ""
|
||||
Public Shared m_bSlabIsSelected As Boolean = False
|
||||
|
||||
' definisce se il grezzo è stato eliminato dal DB
|
||||
Public Shared m_IsDeleted As Boolean = False
|
||||
|
||||
Public Sub New(sImage As String, ContornScrap As List(Of Point3d), MnWindow As MainWindow, nState As Integer, DatabaseID As String)
|
||||
|
||||
InitializeComponent()
|
||||
|
||||
' salvo il riferimento della finestra principale
|
||||
m_MainWindow = MnWindow
|
||||
' leggo lo stato dello sfrido per decidere quale modalità di apertuta usare
|
||||
m_nState = nState
|
||||
|
||||
'--------------- CARCICO lastra esistente ---------------
|
||||
If m_nState = 2 Then
|
||||
m_bSlabIsSelected = False
|
||||
' ricerco l'elemento già inserito nel DB
|
||||
For Each Item As Slab In EgtPHOTOLib.refProjectVM.SlabList
|
||||
Dim CurrId As String = Item.GetCurrentID.Trim
|
||||
If Item.GetCurrentID.Trim = DatabaseID.Trim Then
|
||||
EgtPHOTOLib.refProjectVM.SelSlab = Item
|
||||
m_bSlabIsSelected = True
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
' se non trovo nessun elemento nel db allora esco
|
||||
If IsNothing(EgtPHOTOLib.refProjectVM.SelSlab) Then
|
||||
EgtOutLog("ID is not found in database: " & DatabaseID)
|
||||
m_bSlabIsSelected = False
|
||||
Return
|
||||
End If
|
||||
' procedo alla visualizzazione della pagina
|
||||
EgtPHOTOLib.PhotoMap.refProjectVM.SelProjectMode = ProjectSlabVM.ProjectModeOpt.DETAIL
|
||||
' carico la lista degli stati letta dalla libreria
|
||||
For Each Item As EgtWPFLib5.IdNameStruct In EgtPHOTOLib.PhotoMap.refOptionPanelVM.StateList
|
||||
m_StateList.Add(Item)
|
||||
Next
|
||||
|
||||
' notifico che la lastra è in modifica da questo programma
|
||||
EgtPHOTOLib.PhotoMap.refProjectVM.SelSlab.IsSelected = EgtPHOTOLib.MainData.nKey
|
||||
EgtPHOTOLib.PhotoMap.refOptionPanelVM.IsSelected()
|
||||
|
||||
' posiziono la finestra
|
||||
Me.Top = 15
|
||||
Me.Left = 15
|
||||
Return
|
||||
End If
|
||||
|
||||
'--------------- DEFINSCO nuova lastra esistente ---------------
|
||||
' imposto come prima pagina sempre la lista (per inizializzare gli elementi della libreria) → ACCELERARE il processo di creazione di questo oggetto!
|
||||
EgtPHOTOLib.PhotoMap.refProjectVM.SelProjectMode = ProjectSlabVM.ProjectModeOpt.NEWSLAB
|
||||
' imposto il percoso della foto appena generato
|
||||
EgtPHOTOLib.PhotoMap.refOptionPanelVM.SelSlab.ImagePath = sImage
|
||||
' carico la foto come texture
|
||||
EgtPHOTOLib.PhotoMap.refOptionPanelVM.PostPhoto(sImage, "")
|
||||
' carico l'elenco dei materiali (non serve...)
|
||||
EgtPHOTOLib.PhotoMap.refOptionPanelVM.SetMaterialFromDB()
|
||||
' definisco la lista degli stati
|
||||
For Each Item As EgtWPFLib5.IdNameStruct In EgtPHOTOLib.PhotoMap.refOptionPanelVM.StateList
|
||||
m_StateList.Add(Item)
|
||||
Next
|
||||
|
||||
' imposto i dati lastra
|
||||
EgtPHOTOLib.PhotoMap.refOptionPanelVM.SelSlab.Thickness = m_MainWindow.m_CurrentProjectPageUC.m_dRawHeight
|
||||
' carico la lista degli stati letta dalla libreria
|
||||
EgtPHOTOLib.PhotoMap.refOptionPanelVM.SelState = EgtPHOTOLib.PhotoMap.refOptionPanelVM.StateList(0)
|
||||
' ricorco il materiale corrente nell'elenco dei materiali presenti nel DB (se non presente nell'elenco?)
|
||||
For Each MaterialItem As String In EgtPHOTOLib.PhotoMap.refOptionPanelVM.MaterialList
|
||||
If MaterialItem.ToLower = m_MainWindow.m_CurrentMachine.CurrMat.sName.ToLower Then
|
||||
EgtPHOTOLib.PhotoMap.refOptionPanelVM.SelSlab.Material = MaterialItem
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
|
||||
' salvo in locale i punti che arrivano dal progetto
|
||||
m_ContornScrap = ContornScrap
|
||||
' avvio la finestra di modifica
|
||||
Dim m_refImagePrevieV As New EgtPHOTOLib.ImagePreviewV()
|
||||
' modifico l'immagine e salvo
|
||||
m_refImagePrevieV.SetContourScraps(m_ContornScrap)
|
||||
m_refImagePrevieV.Hide()
|
||||
m_refImagePrevieV.Show()
|
||||
m_refImagePrevieV.SaveImage()
|
||||
m_refImagePrevieV.Close()
|
||||
m_bSlabIsSelected = True
|
||||
|
||||
' posiziono la finestra
|
||||
Me.Top = 15
|
||||
Me.Left = 15
|
||||
End Sub
|
||||
|
||||
' posizionamento degli UserControl all'interno della griglia
|
||||
Private Sub OmagPhotoWD_Initialized(sender As Object, e As EventArgs) Handles Me.Initialized
|
||||
' definisco nella pagina la posizione dello UserControl e inizializzo le liste
|
||||
m_AddToDataBaseUC = New AddToDataBaseUC(Me)
|
||||
m_AddToDataBaseUC.SetValue(Grid.ColumnProperty, 0)
|
||||
m_AddToDataBaseUC.SetValue(Grid.RowProperty, 1)
|
||||
m_AddToDataBaseUC.SetValue(Grid.RowSpanProperty, 2)
|
||||
Me.OptionSLabGrid.Children.Add(m_AddToDataBaseUC)
|
||||
m_AddToDataBaseUC.StateCmBx.ItemsSource = m_StateList
|
||||
' recupero la scena dalla libreria e la carico nel finestra
|
||||
Dim MyScene As New EgtPHOTOLib.SceneHostSlabV(EgtPHOTOLib.PhotoMap.refSceneHostVM)
|
||||
MyScene.SetValue(Grid.ColumnProperty, 1)
|
||||
MyScene.SetValue(Grid.ColumnSpanProperty, 2)
|
||||
MyScene.SetValue(Grid.RowProperty, 1)
|
||||
Me.OptionSLabGrid.Children.Add(MyScene)
|
||||
End Sub
|
||||
|
||||
' carcio i dati della lastra
|
||||
Private Sub PostLoaded() Handles Me.Loaded
|
||||
If Not m_bSlabIsSelected Then
|
||||
Return
|
||||
End If
|
||||
' carico i campi con i dati letti da database
|
||||
If m_nState = 2 Then
|
||||
' provo ad eseguire la separazione dei campi
|
||||
m_sDtBsId = EgtPHOTOLib.PhotoMap.refOptionPanelVM.SelSlab.Id
|
||||
m_AddToDataBaseUC.BlockTxBx.Text = EgtPHOTOLib.PhotoMap.refOptionPanelVM.SelSlab.sNameBlock
|
||||
m_AddToDataBaseUC.NbrIdTxBx.Text = EgtPHOTOLib.PhotoMap.refOptionPanelVM.SelSlab.sNbrID
|
||||
m_AddToDataBaseUC.StateCmBx.SelectedIndex = EgtPHOTOLib.PhotoMap.refOptionPanelVM.SelSlab.State
|
||||
m_AddToDataBaseUC.MatTxBx.Text = EgtPHOTOLib.PhotoMap.refOptionPanelVM.SelSlab.Material
|
||||
m_AddToDataBaseUC.ThicknessTxBx.Text = EgtPHOTOLib.PhotoMap.refOptionPanelVM.SelSlab.Thickness
|
||||
m_AddToDataBaseUC.ProjectTxBx.Text = EgtPHOTOLib.PhotoMap.refOptionPanelVM.SelSlab.ProjectAssignedTo
|
||||
' aggiorno il testo del messaggio "Add" → "Save"
|
||||
m_AddToDataBaseUC.AddBtn.Content = "Save"
|
||||
Return
|
||||
End If
|
||||
' inizializzo i campi
|
||||
'm_AddToDataBaseUC.IdTxBx.Text = EgtPHOTOLib.PhotoMap.refOptionPanelVM.SelSlab.Id
|
||||
m_AddToDataBaseUC.BlockTxBx.Text = EgtPHOTOLib.PhotoMap.refOptionPanelVM.SelSlab.sNameBlock
|
||||
m_AddToDataBaseUC.NbrIdTxBx.Text = EgtPHOTOLib.PhotoMap.refOptionPanelVM.SelSlab.sNbrID
|
||||
m_AddToDataBaseUC.StateCmBx.SelectedIndex = 0
|
||||
m_AddToDataBaseUC.MatTxBx.Text = m_MainWindow.m_CurrentMachine.CurrMat.sName
|
||||
m_AddToDataBaseUC.ThicknessTxBx.Text = LenToString(m_MainWindow.m_CurrentProjectPageUC.m_dRawHeight, 4)
|
||||
m_AddToDataBaseUC.ProjectTxBx.Text = m_MainWindow.m_CurrentProjectPageUC.GetCurrentProjectName()
|
||||
' rendo in primo piano la finestra
|
||||
Me.Activate()
|
||||
End Sub
|
||||
|
||||
Private Sub ExitBtn_Click() Handles ExitBtn.Click
|
||||
' se esista una lastra corrente, notifico che deve essere deselezionata
|
||||
If Not IsNothing(EgtPHOTOLib.PhotoMap.refOptionPanelVM.SelSlab) Then
|
||||
EgtPHOTOLib.PhotoMap.refOptionPanelVM.SelSlab.IsSelected = 0
|
||||
EgtPHOTOLib.PhotoMap.refOptionPanelVM.IsSelected()
|
||||
End If
|
||||
Me.Close()
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
+30
-9
@@ -2,7 +2,8 @@
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="853.3" d:DesignWidth="1280" Initialized="OpenPage_Initialized" Loaded="OpenPage_Loaded" Unloaded="OpenPage_Unloaded">
|
||||
|
||||
@@ -17,22 +18,42 @@
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="8*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<!-- Definizione della Grid Inferiore per i Button V e X -->
|
||||
<!-- Definizione della Grid Superiore -->
|
||||
<Grid Name="UpperButtonsGrid" Grid.Column="1" Grid.RowSpan="2">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="5*"/>
|
||||
<ColumnDefinition Width="7*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
|
||||
</Grid>
|
||||
|
||||
<TextBlock Name="FilePathTxBl" Foreground="White" Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
<ListBox Name="FileListBox" Grid.Row="1" Grid.RowSpan="2" ItemTemplate="{DynamicResource DataTemplateItem}"
|
||||
ItemsSource="{Binding ItemList}"/>
|
||||
|
||||
<TextBlock Name="FilePathTxBl" Grid.Row="0" Foreground="White" Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
|
||||
<Grid Grid.Row="1" Grid.RowSpan="2">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="6.5*"/>
|
||||
<RowDefinition Height="0.65*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<ListBox Name="FileListBox" ItemTemplate="{DynamicResource DataTemplateItem}"
|
||||
ItemsSource="{Binding ItemList}"/>
|
||||
|
||||
<Grid Grid.Row="1" Margin="0,0,8,0">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="4*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<EgtWPFLib:EgtTextBox Name="FindTxBx" Grid.Column="0"
|
||||
Style="{DynamicResource OmagCut_LeftKeyboardTextBoxNoBorder}"/>
|
||||
<Button Name="ClearFindBtn" Grid.Column="1" Style="{DynamicResource OmagCut_GradientBlueIconButton}" Margin="0,6,2,6">
|
||||
<Image Source="{DynamicResource XImg}" Style="{StaticResource OmagCut_ButtonIcon}" Width="30" />
|
||||
</Button>
|
||||
</Grid>
|
||||
|
||||
</Grid>
|
||||
|
||||
<Border Name="MessageBrd" Grid.Row="3" BorderThickness="0,1,0,0" BorderBrush="Gray">
|
||||
<TextBlock Name="MessageTxBx" TextAlignment="Center"
|
||||
Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
|
||||
@@ -38,6 +38,7 @@ Public Class OpenPageUC
|
||||
OpenSceneHost.SetValue(Grid.ColumnProperty, 1)
|
||||
OpenSceneHost.SetValue(Grid.RowProperty, 2)
|
||||
' OpenSceneHost.SetValue(Grid.RowSpanProperty, 1)
|
||||
OpenSceneHost.SetValue(Grid.ColumnSpanProperty, 2)
|
||||
Me.OpenPageGrid.Children.Add(OpenSceneHost)
|
||||
|
||||
' Definizione del collegamento tra ItemList e ListBox1
|
||||
@@ -203,6 +204,36 @@ Public Class OpenPageUC
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub FindTxBx_EgtClosed(sender As Object, e As EventArgs) Handles FindTxBx.EgtClosed
|
||||
' Elimino spazi iniziali e finali
|
||||
FindTxBx.Text = FindTxBx.Text.Trim()
|
||||
' ricarico la lista dei file
|
||||
LoadCurrDir()
|
||||
Dim UpdateListFile As New List(Of IconListBoxItem)
|
||||
' Se esiste un nome
|
||||
If Not String.IsNullOrWhiteSpace(FindTxBx.Text) Then
|
||||
For Each Item As IconListBoxItem In FileListBox.ItemsSource
|
||||
If Item.Name.ToLower.Contains(FindTxBx.Text.ToLower) Then
|
||||
UpdateListFile.Add(Item)
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
If UpdateListFile.Count > 0 Then
|
||||
FileListBox.ItemsSource = UpdateListFile
|
||||
Else
|
||||
FileListBox.ItemsSource = m_MainWindow.m_OpenItemList
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub ClearFindBtn_Click() Handles ClearFindBtn.Click
|
||||
' svuoto la text
|
||||
FindTxBx.Text = ""
|
||||
' ricarico la lista dei file
|
||||
LoadCurrDir()
|
||||
' e aggiorno la lista dei file
|
||||
FileListBox.ItemsSource = m_MainWindow.m_OpenItemList
|
||||
End Sub
|
||||
|
||||
Private Function ClearView() As Boolean
|
||||
' Pulisco il DB geometrico locale
|
||||
EgtNewFile()
|
||||
@@ -460,7 +491,19 @@ Public Class OpenPageUC
|
||||
m_SceneButtons.MeasureBtn.IsChecked = False
|
||||
' Istruzioni per chiudere OpenPageUC e aprire currentproject e cadcut page
|
||||
m_MainWindow.MainWindowGrid.Children.Remove(m_MainWindow.m_OpenPage)
|
||||
m_MainWindow.MainWindowGrid.Children.Add(m_MainWindow.m_CurrentProjectPageUC)
|
||||
If m_MainWindow.m_PrevActivePage = MainWindow.Pages.CadCut Then
|
||||
m_MainWindow.MainWindowGrid.Children.Add(m_MainWindow.m_CurrentProjectPageUC)
|
||||
If Not m_MainWindow.CadCutBtn.IsChecked Then
|
||||
m_MainWindow.m_CurrentProjectPageUC.CurrentProjectPageGrid.Children.Add(m_MainWindow.m_CadCutPageUC)
|
||||
m_MainWindow.CadCutBtn.IsChecked = True
|
||||
End If
|
||||
ElseIf m_MainWindow.m_PrevActivePage = MainWindow.Pages.FrameCut Then
|
||||
m_MainWindow.MainWindowGrid.Children.Add(m_MainWindow.m_CurrentProjectPageUC)
|
||||
If Not m_MainWindow.FrameCutBtn.IsChecked Then
|
||||
m_MainWindow.m_CurrentProjectPageUC.CurrentProjectPageGrid.Children.Add(m_MainWindow.m_FrameCutPageUC)
|
||||
m_MainWindow.FrameCutBtn.IsChecked = True
|
||||
End If
|
||||
End If
|
||||
' Non modifico progetto corrente
|
||||
m_MainWindow.m_ActivePage = m_MainWindow.m_PrevActivePage
|
||||
End Sub
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
Imports System.IO
|
||||
Imports System.ComponentModel
|
||||
Imports System.Drawing
|
||||
Imports System.IO
|
||||
Imports System.Windows.Forms.Integration
|
||||
Imports EgtUILib
|
||||
Imports EgtWPFLib
|
||||
|
||||
@@ -30,6 +33,7 @@ Public Class ProjectMgrUC
|
||||
WorkBtn.ToolTip = EgtMsg(MSG_CADCUTPAGEUC + 2) 'Work - Lavora
|
||||
End If
|
||||
TestBtn.ToolTip = EgtMsg(90255) 'Test
|
||||
ResetCutBtn.ToolTip = "Reset Cuts" & vbCrLf & "Reset Feed (Shift)"
|
||||
End Sub
|
||||
|
||||
Private Sub ProjectMgrUC_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded
|
||||
@@ -99,7 +103,6 @@ Public Class ProjectMgrUC
|
||||
m_CurrProjPage.NewProject(nTabInd, bRetainParkedParts)
|
||||
' Gestione stato FastGrid
|
||||
m_MainWindow.m_CadCutPageUC.m_FastGridSlabManager.OnPostNewProject()
|
||||
EgtZoom(ZM.ALL)
|
||||
End Sub
|
||||
|
||||
Friend Function ChooseTable() As Integer
|
||||
@@ -249,6 +252,11 @@ Public Class ProjectMgrUC
|
||||
End Sub
|
||||
|
||||
Private Sub ResetCutBtn_Click(sender As Object, e As RoutedEventArgs) Handles ResetCutBtn.Click
|
||||
If (Keyboard.Modifiers And ModifierKeys.Shift) Then
|
||||
' eseguo il ricalcolo delle sole FEED di lavorazione
|
||||
UpdateFeedAllMachining()
|
||||
Return
|
||||
End If
|
||||
EgtSetCurrentContext(m_CurrProjPage.CurrentProjectScene.GetCtx())
|
||||
' Cancello eventuali messaggi
|
||||
m_CurrProjPage.ClearMessage()
|
||||
@@ -256,10 +264,18 @@ Public Class ProjectMgrUC
|
||||
ResetAllSplitCurv()
|
||||
' cancello tutti i punti di inizio (Waterjet)
|
||||
ResetAllStartCurv()
|
||||
' cancello tutti i ponticelli disegnati
|
||||
ResetAllBRidges()
|
||||
' Ricalcolo tutte le lavorazioni
|
||||
Dim nWarn As Integer = 0
|
||||
ResetAllMachinings(nWarn)
|
||||
If nWarn = 1 Then m_CurrProjPage.SetWarningMessage(EgtMsg(MSG_SPLITPAGEUC + 11)) ' Lama troppo grande per utilizzo ventosa
|
||||
' Se eistono elimino i grezzi delle fasi che non contengono lavorazioni
|
||||
ResetAllRawPart()
|
||||
' Aggiorno Info C Home
|
||||
Dim dCHome As Double
|
||||
EgtGetAxisHomePos("C", dCHome)
|
||||
EgtSetInfo(EgtGetFirstNameInGroup(GDB_ID.ROOT, NAME_PROJMARK), INFO_CAXESHOME, DoubleToString(dCHome, 0))
|
||||
' Aggiorno visualizzazione
|
||||
EgtDraw()
|
||||
End Sub
|
||||
@@ -476,7 +492,6 @@ Public Class ProjectMgrUC
|
||||
If Not (m_CurrMachine.bProdLine Or m_CurrMachine.bDemo) Then
|
||||
' Download programma (eventuali errori sono segnalati dalla funzione)
|
||||
If m_CurrNcComm.SendProgram(sCncPath, 900) Then
|
||||
' copio il progetto corrente come progetto in lavorazione
|
||||
Dim sWrkPath As String = m_MainWindow.GetTempDir() & "\" & "WorkProj.nge"
|
||||
My.Computer.FileSystem.CopyFile(sMchPath, sWrkPath, True)
|
||||
' se abilitato e non è restart, lancio eventuale lua post-trasmissione
|
||||
@@ -492,6 +507,20 @@ Public Class ProjectMgrUC
|
||||
End If
|
||||
'------------------- FINE Avvio il Ciclo-Start-------------------------
|
||||
|
||||
' ------------------ INIZIO gestione SCRAPS ---------------------------
|
||||
Dim NewScrapsList As New List(Of Scrap)
|
||||
' procedo all'aggiornamento della lista degli sfridi
|
||||
UpDateScrapList(NewScrapsList)
|
||||
|
||||
' se esiste almeno uno sfrido da inserire come nuovo grezzo
|
||||
If NewScrapsList.Count > 0 Then
|
||||
' apro la finestra con l'elenco degli sfridi
|
||||
Dim MyScrapsWD As New ScrapsWD(m_MainWindow, Me, NewScrapsList)
|
||||
MyScrapsWD.ShowDialog()
|
||||
|
||||
End If
|
||||
' ------------------ FINE gestione SCRAPS -----------------------------
|
||||
|
||||
' Altrimenti linea di produzione
|
||||
Else
|
||||
' Verifico non sia già stato trasmesso
|
||||
@@ -663,6 +692,138 @@ Public Class ProjectMgrUC
|
||||
#End If
|
||||
End Sub
|
||||
|
||||
' aggiorno la lista dei grezzi/sfridi
|
||||
Public Sub UpDateScrapList(ByRef NewScrapsList As List(Of Scrap))
|
||||
If IsNothing(NewScrapsList) Then
|
||||
NewScrapsList = New List(Of Scrap)
|
||||
Else
|
||||
NewScrapsList.Clear()
|
||||
End If
|
||||
' procedo all'aggiornamento della lista degli sfridi
|
||||
Dim CurrRawId As Integer = EgtGetFirstRawPart()
|
||||
Dim IsNewScraps As Integer = 0
|
||||
Dim nCountScrap As Integer = 1
|
||||
While CurrRawId <> GDB_ID.NULL
|
||||
If EgtGetInfo(CurrRawId, K_ISNEWSCRAPS, IsNewScraps) Then
|
||||
If IsNewScraps = 1 Or IsNewScraps = 2 Then
|
||||
' deve essere aggiunto nel DB delle lastre come nuovo grezzo (l'indice è utilizzato per definire il nome della lastra)
|
||||
NewScrapsList.Add(New Scrap(CurrRawId, "Scrap_" & nCountScrap.ToString, IsNewScraps))
|
||||
nCountScrap += 1
|
||||
' è già stato aggiunto al DB delle lastre come nuovo grezzo
|
||||
Else
|
||||
' non è stato definito come nuovo grezzo
|
||||
End If
|
||||
End If
|
||||
CurrRawId = EgtGetNextRawPart(CurrRawId)
|
||||
End While
|
||||
End Sub
|
||||
|
||||
Public Sub UpdateFeedAllMachining()
|
||||
' recupero il valore di Feed della lavorazione corrente
|
||||
Dim sMachiningName As String = String.Empty
|
||||
If Not EgtMdbGetCurrMachiningParam(MCH_MP.NAME, sMachiningName) Then
|
||||
' errore: lavorazione non trovata
|
||||
EgtOutLog(" - Prima di 'Reset Feed' accedere alla pagina MACCHINA!")
|
||||
'm_MainWindow.m_CurrentProjectPageUC.SetErrorMessage("Salvare la lavorazione corrente")
|
||||
Return
|
||||
End If
|
||||
Dim dFeed As Double = 0
|
||||
EgtMdbGetCurrMachiningParam(MCH_MP.FEED, dFeed)
|
||||
Dim dFeedStarted As Double = 0
|
||||
EgtMdbGetCurrMachiningParam(MCH_MP.STARTFEED, dFeedStarted)
|
||||
Dim dFeedEnded As Double = 0
|
||||
EgtMdbGetCurrMachiningParam(MCH_MP.ENDFEED, dFeedEnded)
|
||||
Dim dFeedTipped As Double = 0
|
||||
EgtMdbGetCurrMachiningParam(MCH_MP.TIPFEED, dFeedTipped)
|
||||
Dim dFeedBack As Double = 0
|
||||
EgtMdbGetCurrMachiningParam(MCH_MP.BACKFEED, dFeedBack)
|
||||
Dim dFeedSideAng As Double = 0
|
||||
EgtMdbGetCurrMachiningParam(MCH_MP.SIDEANGFEED, dFeedSideAng)
|
||||
Dim MachiningList As New List(Of SplitMach)
|
||||
|
||||
' Recupero l'indice della fase corrente
|
||||
Dim nCurrPhase As Integer = 1
|
||||
' recupero in numero di fasi presenti nel progetto
|
||||
Dim nCountPhase As Integer = EgtGetPhaseCount()
|
||||
' ciclo su tutte le fasi di lavorazione
|
||||
Dim nMach As Integer = 0
|
||||
Dim nMachUpdated As Integer = 0
|
||||
For IndexPhase As Integer = 1 To nCountPhase
|
||||
' imposto la fase corrente
|
||||
nCurrPhase = IndexPhase
|
||||
' Preparo la lista delle lavorazioni
|
||||
CalculateSplitMachList(nCurrPhase, MachiningList)
|
||||
' per ogni lavorazione corrente procedo ad aggiornare la feed
|
||||
For IndexMachining As Integer = 0 To MachiningList.Count - 1
|
||||
nMach += 1
|
||||
Dim nOperId As Integer = MachiningList(IndexMachining).m_nId
|
||||
' setto la lavorazione come corrente
|
||||
If EgtSetCurrMachining(nOperId) Then
|
||||
Dim bUpdate As Boolean = False
|
||||
' STANDARD
|
||||
Dim dOrigFeed As Double
|
||||
EgtGetMachiningParam(MCH_MP.FEED, dOrigFeed)
|
||||
' imposto il valore di Feed solo se differente da quello nuovo
|
||||
If Math.Abs(dOrigFeed - dFeed) > 0.1 Then
|
||||
bUpdate = bUpdate Or EgtSetMachiningParam(MCH_MP.FEED, dFeed)
|
||||
' aggiorno la lavorazione (senza il ricalcolo dell'intera lavorazione)
|
||||
EgtApplyMachining(True)
|
||||
End If
|
||||
' STARTED
|
||||
Dim dOrigFeedStarted As Double
|
||||
EgtGetMachiningParam(MCH_MP.STARTFEED, dOrigFeedStarted)
|
||||
' imposto il valore di Feed solo se differente da quello nuovo
|
||||
If Math.Abs(dOrigFeedStarted - dFeedStarted) > 0.1 Then
|
||||
bUpdate = bUpdate Or EgtSetMachiningParam(MCH_MP.STARTFEED, dFeedStarted)
|
||||
' aggiorno la lavorazione (senza il ricalcolo dell'intera lavorazione)
|
||||
EgtApplyMachining(True)
|
||||
End If
|
||||
' ENDED
|
||||
Dim dOrigFeedEnded As Double
|
||||
EgtGetMachiningParam(MCH_MP.ENDFEED, dOrigFeedEnded)
|
||||
' imposto il valore di Feed solo se differente da quello nuovo
|
||||
If Math.Abs(dOrigFeedEnded - dFeedEnded) > 0.1 Then
|
||||
bUpdate = bUpdate Or EgtSetMachiningParam(MCH_MP.ENDFEED, dFeedEnded)
|
||||
' aggiorno la lavorazione (senza il ricalcolo dell'intera lavorazione)
|
||||
EgtApplyMachining(True)
|
||||
End If
|
||||
' TIPPED
|
||||
Dim dOrigFeedTipped As Double
|
||||
EgtGetMachiningParam(MCH_MP.TIPFEED, dOrigFeedTipped)
|
||||
' imposto il valore di Feed solo se differente da quello nuovo
|
||||
If Math.Abs(dOrigFeedTipped - dFeedTipped) > 0.1 Then
|
||||
bUpdate = bUpdate Or EgtSetMachiningParam(MCH_MP.TIPFEED, dFeedTipped)
|
||||
' aggiorno la lavorazione (senza il ricalcolo dell'intera lavorazione)
|
||||
EgtApplyMachining(True)
|
||||
End If
|
||||
' BACK
|
||||
Dim dOrigFeedBack As Double
|
||||
EgtGetMachiningParam(MCH_MP.BACKFEED, dOrigFeedBack)
|
||||
' imposto il valore di Feed solo se differente da quello nuovo
|
||||
If Math.Abs(dOrigFeedBack - dFeedBack) > 0.1 Then
|
||||
bUpdate = bUpdate Or EgtSetMachiningParam(MCH_MP.BACKFEED, dFeedBack)
|
||||
' aggiorno la lavorazione (senza il ricalcolo dell'intera lavorazione)
|
||||
EgtApplyMachining(True)
|
||||
End If
|
||||
' SIDEANG
|
||||
Dim dOrigFeedSideAng As Double
|
||||
EgtMdbGetCurrMachiningParam(MCH_MP.SIDEANGFEED, dOrigFeedSideAng)
|
||||
' imposto il valore di Feed solo se differente da quello nuovo
|
||||
If Math.Abs(dOrigFeedBack - dFeedSideAng) > 0.1 Then
|
||||
bUpdate = bUpdate Or EgtSetMachiningParam(MCH_MP.SIDEANGFEED, dFeedSideAng)
|
||||
' aggiorno la lavorazione (senza il ricalcolo dell'intera lavorazione)
|
||||
EgtApplyMachining(True)
|
||||
End If
|
||||
' conto il numero di lavorazioni aggiornate
|
||||
If bUpdate Then
|
||||
nMachUpdated += 1
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
Next
|
||||
m_MainWindow.m_CurrentProjectPageUC.SetInfoMessage("Lavorazione aggiornate: " & nMachUpdated & "/ " & nMach)
|
||||
End Sub
|
||||
|
||||
' ------------------------------------------------ GENERA COMANDI CNC MOVIMENTO ------------------------------------------------
|
||||
Private Sub ExecuteCommandCNC(ptMid As Point3d, dAngC As Double, dAngB As Double)
|
||||
|
||||
@@ -936,3 +1097,60 @@ Public Class ProjectMgrUC
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
Public Class Scrap
|
||||
|
||||
Private m_iPictureID As Integer
|
||||
Private m_sName As String
|
||||
Private m_IdRaw As Integer
|
||||
Private m_nState As Integer
|
||||
|
||||
Public Property PictureID() As Integer
|
||||
Get
|
||||
Return m_iPictureID
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
m_iPictureID = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property Name() As String
|
||||
Get
|
||||
Return m_sName
|
||||
End Get
|
||||
Set(value As String)
|
||||
m_sName = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property IdRaw() As Integer
|
||||
Get
|
||||
Return m_IdRaw
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property nState As Integer
|
||||
Get
|
||||
Return m_nState
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property PictureString() As String
|
||||
Get
|
||||
Return "/Resources/ImportPageListBoxImages/" + PictureID.ToString() + ".png"
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Sub New(IdScrap As Integer, NameScrap As String, State As Integer)
|
||||
m_IdRaw = IdScrap
|
||||
m_sName = NameScrap
|
||||
m_nState = State
|
||||
' immagine del grezzo
|
||||
If m_nState = 2 Then
|
||||
m_iPictureID = 5
|
||||
Else
|
||||
m_iPictureID = 4
|
||||
End If
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
@@ -0,0 +1,50 @@
|
||||
<Window x:Class="ScrapsWD"
|
||||
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="Scraps" Height="482.6" Width="226.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="3*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<Label Name="TitleTxBl" Grid.Column="1" Grid.Row="1" Foreground="White" FontSize="20" VerticalAlignment="Center"/>
|
||||
<ListBox Name="ScrapsListBox" Grid.Column="1" Grid.Row="2" ItemTemplate="{DynamicResource DataTemplateItem}"
|
||||
ItemsSource="{Binding ItemList, NotifyOnSourceUpdated=True}"/>
|
||||
|
||||
<Grid Grid.Column="1" Grid.Row="4">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="0.1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="0.1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="0.1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Button Name="OkBtn" Grid.Column="1" Style="{DynamicResource OmagCut_GradientBlueIconButton}" >
|
||||
<Image Source="{DynamicResource VImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="ExitBtn" Grid.Column="3" Style="{DynamicResource OmagCut_GradientBlueIconButton}" IsCancel="True">
|
||||
<Image Source="{DynamicResource XImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
|
||||
</Grid>
|
||||
|
||||
</Grid>
|
||||
|
||||
</Border>
|
||||
|
||||
</Window>
|
||||
@@ -0,0 +1,186 @@
|
||||
Imports EgtUILib
|
||||
Imports EgtPHOTOLib
|
||||
Imports System.IO
|
||||
|
||||
Public Class ScrapsWD
|
||||
' Riferimento alla MainWindow
|
||||
Private m_MainWindow As MainWindow = DirectCast(Application.Current.MainWindow, MainWindow)
|
||||
Private m_refProjectMgrUC As ProjectMgrUC
|
||||
|
||||
Private m_ScrapList As New List(Of Scrap)
|
||||
Private m_CurrScrapId As Integer = GDB_ID.NULL
|
||||
Private m_CurrScrapState As Integer = 2
|
||||
Private m_sDatabaseId As String = ""
|
||||
|
||||
Private Sub Initalized()
|
||||
' resetto eventuali errori mostrati nella pagina
|
||||
m_MainWindow.m_CurrentProjectPageUC.ClearMessage()
|
||||
|
||||
' inserisco il titolo della pagina aperta
|
||||
TitleTxBl.Content = "Scraps List"
|
||||
ScrapsListBox.ItemsSource = m_ScrapList
|
||||
' definzione posizione finetra
|
||||
Me.Left = 25
|
||||
Me.Top = 25
|
||||
End Sub
|
||||
|
||||
Public Sub New(Owner As Window, LocalProjectMgrUC As ProjectMgrUC, MyScrapList As List(Of Scrap))
|
||||
Me.Owner = Owner
|
||||
InitializeComponent()
|
||||
m_ScrapList = MyScrapList
|
||||
m_refProjectMgrUC = LocalProjectMgrUC
|
||||
Initalized()
|
||||
End Sub
|
||||
|
||||
|
||||
' visualizzo la fase del pezzo selezionato
|
||||
Private Sub ScrapListBox_PreviewMouseUp(sender As Object, e As MouseButtonEventArgs) Handles ScrapsListBox.PreviewMouseUp
|
||||
Dim vItems As Scrap = ScrapsListBox.SelectedItems(0)
|
||||
' elimino l'utimo selzione
|
||||
EgtResetMark(m_CurrScrapId)
|
||||
EgtDeselectObj(m_CurrScrapId)
|
||||
' ricerco il grezzo associato a questo Id
|
||||
Dim nRawId As Integer = EgtGetFirstRawPart()
|
||||
While nRawId <> GDB_ID.NULL
|
||||
If nRawId = vItems.IdRaw Then
|
||||
m_CurrScrapId = nRawId
|
||||
m_CurrScrapState = vItems.nState
|
||||
If m_CurrScrapState = 2 Then
|
||||
EgtGetInfo(nRawId, K_DATABASEID, m_sDatabaseId)
|
||||
Else
|
||||
m_sDatabaseId = String.Empty
|
||||
End If
|
||||
Dim nCurrRawPhase As Integer = 0
|
||||
' recupero la fase del grezzo corrente
|
||||
EgtGetInfo(nRawId, "Ph", nCurrRawPhase)
|
||||
If nCurrRawPhase <> 0 Then
|
||||
' evidenzio lo sfrido selezionato all'interno della fase
|
||||
EgtSetCurrPhase(nCurrRawPhase)
|
||||
EgtSetMark(m_CurrScrapId)
|
||||
EgtSelectObj(m_CurrScrapId)
|
||||
EgtDraw()
|
||||
Return
|
||||
End If
|
||||
End If
|
||||
nRawId = EgtGetNextRawPart(nRawId)
|
||||
End While
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub OkBtn_Click() Handles OkBtn.Click
|
||||
If m_CurrScrapId = GDB_ID.NULL Then Return
|
||||
' creo una copia dell'immagine attuale (fotocamera 1)
|
||||
Dim sImage As String = String.Empty
|
||||
Dim sInfo As String = String.Empty
|
||||
GetPrivateProfileString(S_CAMERA, K_CAM_IMAGE, "", sImage, m_MainWindow.GetIniFile())
|
||||
GetPrivateProfileString(S_CAMERA, K_CAM_INFO, "", sInfo, m_MainWindow.GetIniFile())
|
||||
' recupero dalla libreria il percoso del database
|
||||
Dim sPhotoDir As String = String.Empty
|
||||
EgtPHOTOLib.GetPhotoDir(sPhotoDir)
|
||||
' recupero l'ora corrente
|
||||
Dim sDate As String = Date.Now.ToString
|
||||
sDate = sDate.Replace("/", "_")
|
||||
sDate = sDate.Replace(" ", "_")
|
||||
sDate = sDate.Replace(":", "_")
|
||||
Dim sNewPath As String = sPhotoDir & "\Scrap_" & sDate
|
||||
Try
|
||||
File.Copy(sImage, sNewPath & ".jpg", False)
|
||||
File.Copy(sInfo, sNewPath & ".txt", False)
|
||||
Catch ex As Exception
|
||||
EgtOutLog(ex.Message.ToString)
|
||||
End Try
|
||||
|
||||
' se non esiste la classe StatusBar allora provo ad inizializzarla...
|
||||
If IsNothing(EgtWPFLib5.LibMap.refStatusBarVM) Then
|
||||
Dim objStatusBarVM As New EgtWPFLib5.StatusBarVM
|
||||
End If
|
||||
' salvo il contesto corrente del programma
|
||||
Dim nCurrentContetxt As Integer = EgtGetCurrentContext()
|
||||
' costruisco l'elenco ordinato dei punti che reppresentano il contorno del grezzo da salvare
|
||||
Dim ContornScrapList As New List(Of Point3d)
|
||||
|
||||
Dim RefId As New Frame3d
|
||||
Dim nRawSolidId As Integer = EgtGetFirstNameInGroup(m_CurrScrapId, "RawSolid")
|
||||
EgtGetTextureFrame(nRawSolidId, nRawSolidId, RefId)
|
||||
Dim nCurveCompoId As Integer = EgtGetFirstNameInGroup(m_CurrScrapId, "RawOutline")
|
||||
Dim dStart As Double = 0
|
||||
Dim dEnd As Double = 0
|
||||
EgtCurveDomain(nCurveCompoId, dStart, dEnd)
|
||||
Dim ptCurrPoint As Point3d
|
||||
For dU As Integer = dStart To dEnd - 1
|
||||
EgtAtParamPoint(nCurveCompoId, dU, m_CurrScrapId, ptCurrPoint)
|
||||
ptCurrPoint.z = 0
|
||||
ptCurrPoint.ToLoc(RefId)
|
||||
ContornScrapList.Add(ptCurrPoint)
|
||||
Next
|
||||
|
||||
MainData.SetPreviousContext(nCurrentContetxt)
|
||||
|
||||
'If Not IsNothing(MainData.ContextSTONELib) Or MainData.ContextSTONELib <> 0 Then
|
||||
'If MainData.ContextSTONELib <> 0 Then
|
||||
' EgtSetCurrentContext(MainData.ContextSTONELib)
|
||||
'End If
|
||||
|
||||
' inizializzo PojectSlabV pechè si occupa di inizializzare le pagine Detail e Option
|
||||
Dim MyProjectSlab As New EgtPHOTOLib.ProjectSlabV
|
||||
' ACCELERARE il processo di creazione di questo oggetto!
|
||||
MyProjectSlab.DataContext = New EgtPHOTOLib.ProjectSlabVM
|
||||
' per ogni creazione della nuova pagina viene creata una nuova scena, ma non viene eliminata
|
||||
Dim refProjectVMSceneContext As Integer = EgtGetCurrentContext()
|
||||
|
||||
' apro la finestra OmagPHOTO (passo il nome del file come copia dell'originale)
|
||||
If ContornScrapList.Count > 2 Then
|
||||
Dim MyOmagPhotoWD As New OmagPhotoWD(sNewPath & ".jpg", ContornScrapList, m_MainWindow, m_CurrScrapState, m_sDatabaseId)
|
||||
OmagPhotoWD.m_IsAdded = False
|
||||
OmagPhotoWD.m_sDtBsId = String.Empty
|
||||
OmagPhotoWD.m_IsDeleted = False
|
||||
MyOmagPhotoWD.ShowDialog()
|
||||
Else
|
||||
m_MainWindow.m_CurrentProjectPageUC.ClearMessage()
|
||||
m_MainWindow.m_CurrentProjectPageUC.SetErrorMessage("Error loading contour scrap")
|
||||
End If
|
||||
|
||||
' ripristino il contesto corrente dell'immagine
|
||||
EgtSetCurrentContext(EgtPHOTOLib.MainData.PreviousContext)
|
||||
' se l'inserimento è andatoa buon fine allora procedo a notificarlo
|
||||
If OmagPhotoWD.m_IsAdded AndAlso Not String.IsNullOrEmpty(OmagPhotoWD.m_sDtBsId) Then
|
||||
EgtSetInfo(m_CurrScrapId, K_ISNEWSCRAPS, 2)
|
||||
EgtSetInfo(m_CurrScrapId, K_DATABASEID, OmagPhotoWD.m_sDtBsId)
|
||||
Else
|
||||
' se è stato eliminato dal DB allora aggiorno la lista dei grezzi
|
||||
If OmagPhotoWD.m_IsDeleted Then
|
||||
EgtSetInfo(m_CurrScrapId, K_ISNEWSCRAPS, 1)
|
||||
EgtRemoveInfo(m_CurrScrapId, K_DATABASEID)
|
||||
End If
|
||||
Try
|
||||
File.Delete(sNewPath & ".jpg")
|
||||
File.Delete(sNewPath & ".txt")
|
||||
Catch ex As Exception
|
||||
EgtOutLog(ex.Message.ToString)
|
||||
End Try
|
||||
End If
|
||||
|
||||
'----------------INIZIO ELIMINAZIONE contesti generati da OmagPHOTOLib per la visualizzazione delle Texture
|
||||
EgtDeleteContext(EgtPHOTOLib.MainData.ContextSTONELib)
|
||||
EgtDeleteContext(refProjectVMSceneContext)
|
||||
'---------------- FINE ELIMINAZIONE contesti
|
||||
|
||||
' aggiorno la lista degli scrap
|
||||
m_refProjectMgrUC.UpDateScrapList(m_ScrapList)
|
||||
ScrapsListBox.ItemsSource = m_ScrapList
|
||||
ScrapsListBox.Items.Refresh()
|
||||
End Sub
|
||||
|
||||
Private Sub ExitBtn_Click() Handles ExitBtn.Click
|
||||
' resetto eventuali errori mostrati nella pagina
|
||||
m_MainWindow.m_CurrentProjectPageUC.ClearMessage()
|
||||
' deseleziono l'oggetto corrente
|
||||
EgtResetMark(m_CurrScrapId)
|
||||
EgtDeselectObj(m_CurrScrapId)
|
||||
' reimposto la fase iniziale
|
||||
EgtSetCurrPhase(1)
|
||||
EgtDraw()
|
||||
Me.Close()
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,82 @@
|
||||
<Window x:Class="OtherRefTabWD"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
|
||||
FontFamily="{DynamicResource OmagCut_Font}"
|
||||
ResizeMode="NoResize" WindowStyle="None" AllowsTransparency="True" Background="Transparent"
|
||||
Title="ModifStartEndWD" Height="250" Width="320" 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.2*"/>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
<ColumnDefinition Width="0.2*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<!--<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="0.5*"/>-->
|
||||
<RowDefinition Height="0.2*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="0.2*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="0.2*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="0.2*"/>
|
||||
<RowDefinition Height="1.5*"/>
|
||||
<RowDefinition Height="0.2*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<TextBlock Name="RefRawTxbl" Grid.Column="1" Grid.Row="1"
|
||||
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||
|
||||
<ComboBox Name="RefTabModeCmBx" Grid.Column="2" Grid.Row="1" Style="{StaticResource OmagCut_ComboBox}"
|
||||
MaxDropDownHeight="300" Margin="0,0,0,0">
|
||||
<ComboBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding}" Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</DataTemplate>
|
||||
</ComboBox.ItemTemplate>
|
||||
</ComboBox>
|
||||
|
||||
<TextBlock Name="RefTabXTxbl" Grid.Column="1" Grid.Row="3"
|
||||
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="RefTabXTxBx" Grid.Column="2" Grid.Row="3"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
|
||||
<TextBlock Name="RefTabYTxbl" Grid.Column="1" Grid.Row="5"
|
||||
Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="RefTabYTxBx" Grid.Column="2" Grid.Row="5"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
|
||||
<Grid Name="ButtonsGrid" Grid.Column="1" Grid.ColumnSpan="2" Grid.Row="7" Grid.RowSpan="1">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Button Name="OkBtn" Grid.Column="1"
|
||||
Style="{DynamicResource OmagCut_GradientBlueIconButton}">
|
||||
<Image Source="{DynamicResource VImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="ExitBtn" Grid.Column="3"
|
||||
IsCancel="True"
|
||||
Style="{DynamicResource OmagCut_GradientBlueIconButton}">
|
||||
<Image Source="{DynamicResource XImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
|
||||
</Grid>
|
||||
|
||||
</Grid>
|
||||
|
||||
</Border>
|
||||
|
||||
</Window>
|
||||
@@ -0,0 +1,108 @@
|
||||
Imports System.IO
|
||||
Imports EgtUILib
|
||||
Imports EgtWPFLib
|
||||
|
||||
Public Class OtherRefTabWD
|
||||
Dim m_MainWindow As MainWindow = DirectCast(Application.Current.MainWindow, MainWindow)
|
||||
Dim m_RawPartPage As RawPartPageUC
|
||||
|
||||
Private m_sPosX As String = "0"
|
||||
Private m_sPosY As String = "0"
|
||||
|
||||
Private m_dPrevOffsetX As Double = 0
|
||||
Private m_dPrevOffsetY As Double = 0
|
||||
|
||||
Private m_SelIndex As Integer = 0
|
||||
|
||||
Sub New(Owner As Window, PosX As String, PosY As String, OffsetX As Double, OffsetY As Double, OtherRefMode As Integer)
|
||||
Me.Owner = Owner
|
||||
' La chiamata è richiesta dalla finestra di progettazione.
|
||||
InitializeComponent()
|
||||
|
||||
' Aggiungere le eventuali istruzioni di inizializzazione dopo la chiamata a InitializeComponent().
|
||||
m_sPosX = PosX
|
||||
m_sPosY = PosY
|
||||
m_dPrevOffsetX = OffsetX
|
||||
m_dPrevOffsetY = OffsetY
|
||||
m_SelIndex = OtherRefMode
|
||||
End Sub
|
||||
|
||||
Private Sub OtherRrefTabWD_Initialized(sender As Object, e As EventArgs) Handles Me.Initialized
|
||||
' costruisco il riferimento alla pagina Raw
|
||||
m_RawPartPage = m_MainWindow.m_RawPartPage
|
||||
' posiziono la finestra
|
||||
Me.Top = Owner.Top + Owner.Height / 4 - Me.Height / 2
|
||||
Me.Left = Owner.Left + Owner.Width / 6 - Me.Width / 2
|
||||
RefRawTxbl.Text = "Raw reference"
|
||||
RefTabXTxbl.Text = "Position X"
|
||||
RefTabYTxbl.Text = "Position Y"
|
||||
RefTabModeCmBx.ItemsSource = m_RawPartPage.m_OtherRefTabList
|
||||
RefTabModeCmBx.SelectedIndex = m_RawPartPage.m_OtherRefTabPos
|
||||
End Sub
|
||||
|
||||
Private Sub OtherRrefTabWD_Load(sender As Object, e As EventArgs) Handles Me.Loaded
|
||||
RefTabXTxBx.Text = m_sPosX
|
||||
RefTabYTxBx.Text = m_sPosY
|
||||
End Sub
|
||||
|
||||
Private Sub RefTabModeCmBx_SelectionChanged(sender As Object, e As SelectionChangedEventArgs) Handles RefTabModeCmBx.SelectionChanged
|
||||
m_RawPartPage.m_OtherRefTabPos = RefTabModeCmBx.SelectedIndex
|
||||
WritePrivateProfileString(S_RAWPART, K_OTHERREFTABPOS, m_RawPartPage.m_OtherRefTabPos.ToString, m_MainWindow.GetIniFile())
|
||||
m_RawPartPage.RefTabModeChange()
|
||||
End Sub
|
||||
|
||||
Private Sub RefTabXTxBx_EgtClosed(sender As Object, e As EventArgs) Handles RefTabXTxBx.EgtClosed
|
||||
Dim ptMin, ptMax As Point3d
|
||||
If EgtGetTableArea(1, ptMin, ptMax) Then
|
||||
Dim dX As Double = 0
|
||||
StringToLen(RefTabXTxBx.Text, dX)
|
||||
If Not (dX > 0 And dX < ptMax.x - ptMin.x) Then
|
||||
If dX > 0 Then
|
||||
dX = ptMax.x - ptMin.x
|
||||
Else
|
||||
dX = 0
|
||||
End If
|
||||
RefTabXTxBx.Text = LenToString(dX, 2)
|
||||
' errore, posizione fuori dalla tavola
|
||||
End If
|
||||
m_RawPartPage.m_OtherRefTabX = dX
|
||||
m_RawPartPage.RefTabModeChange()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub RefTabYTxBx_EgtClosed(sender As Object, e As EventArgs) Handles RefTabYTxBx.EgtClosed
|
||||
Dim ptMin, ptMax As Point3d
|
||||
If EgtGetTableArea(1, ptMin, ptMax) Then
|
||||
Dim dY As Double = 0
|
||||
StringToLen(RefTabYTxBx.Text, dY)
|
||||
If Not (dY > 0 And dY < ptMax.y - ptMin.y) Then
|
||||
If dY > 0 Then
|
||||
dY = ptMax.y - ptMin.y
|
||||
Else
|
||||
dY = 0
|
||||
End If
|
||||
RefTabYTxBx.Text = LenToString(dY, 2)
|
||||
' errore, posizione fuori dalla tavola
|
||||
End If
|
||||
m_RawPartPage.m_OtherRefTabY = dY
|
||||
m_RawPartPage.RefTabModeChange()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub OkBtn_Click() Handles OkBtn.Click
|
||||
WritePrivateProfileString(S_RAWPART, K_OTHERREFTABX, DoubleToString(RefTabXTxBx.Text, 2), m_MainWindow.GetIniFile())
|
||||
WritePrivateProfileString(S_RAWPART, K_OTHERREFTABY, DoubleToString(RefTabYTxBx.Text, 2), m_MainWindow.GetIniFile())
|
||||
WritePrivateProfileString(S_RAWPART, K_OTHERREFTABPOS, m_RawPartPage.m_OtherRefTabPos.ToString, m_MainWindow.GetIniFile())
|
||||
Me.Close()
|
||||
End Sub
|
||||
|
||||
Private Sub ExitBtn_Click() Handles ExitBtn.Click
|
||||
' riposiziono l'origine
|
||||
m_RawPartPage.m_OtherRefTabX = m_sPosX
|
||||
m_RawPartPage.m_OtherRefTabY = m_sPosY
|
||||
' ripristino il valore della combobox
|
||||
m_RawPartPage.m_OtherRefTabPos = m_SelIndex
|
||||
m_RawPartPage.RefTabModeChange()
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
+153
-144
@@ -6,76 +6,76 @@
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="853.3" d:DesignWidth="1280" Loaded="RawPartPage_Loaded" Initialized="RawPartPage_Initialized" Unloaded="RawPartPage_Unloaded">
|
||||
|
||||
<!-- Definizione della RowPartPage -->
|
||||
<Grid Name="RowPartPageGrid" >
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="3*"/>
|
||||
<ColumnDefinition Width="12*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="8*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<!-- Definizione della Grid superiore -->
|
||||
<Grid Name="UpperButtonGrid" Grid.Column="1" Grid.Row="0" >
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="5*"/>
|
||||
<ColumnDefinition Width="7*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
</Grid>
|
||||
|
||||
<!-- Definizione della Grid Laterale -->
|
||||
<Grid Name="LeftButtonGrid" Grid.RowSpan="3">
|
||||
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1.5*"/>
|
||||
<ColumnDefinition Width="1.5*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="4*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1.5*"/>
|
||||
<RowDefinition Height="1.*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<RadioButton Name="OutlineBtn" Style="{DynamicResource OmagCut_YellowToggleButton}"
|
||||
GroupName="DefinitionMethod_GrezzoUC"/>
|
||||
<RadioButton Name="DamagedBtn" Style="{DynamicResource OmagCut_YellowToggleButton}"
|
||||
Grid.Column="1" GroupName="DefinitionMethod_GrezzoUC"/>
|
||||
<!-- Definizione della RowPartPage -->
|
||||
<Grid Name="RowPartPageGrid" >
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="3*"/>
|
||||
<ColumnDefinition Width="12*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="8*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<!-- Definizione della Grid per definizione grezzo -->
|
||||
<Grid Name="RawMeasureGrd" Grid.Row="1" Grid.ColumnSpan="2">
|
||||
<!-- Definizione della Grid superiore -->
|
||||
<Grid Name="UpperButtonGrid" Grid.Column="1" Grid.Row="0" >
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="5*"/>
|
||||
<ColumnDefinition Width="7*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
</Grid>
|
||||
|
||||
<!-- Definizione della Grid Laterale -->
|
||||
<Grid Name="LeftButtonGrid" Grid.RowSpan="3">
|
||||
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1.5*"/>
|
||||
<ColumnDefinition Width="1.5*"/>
|
||||
</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="1*"/>
|
||||
<RowDefinition Height="4*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1.5*"/>
|
||||
<RowDefinition Height="1.*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<ComboBox Name="RawModeCmBx" Grid.Row="0" Grid.ColumnSpan="2" Style="{StaticResource OmagCut_ComboBox}"
|
||||
MaxDropDownHeight="300" Margin="6,0,6,0">
|
||||
<ComboBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding}" Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</DataTemplate>
|
||||
</ComboBox.ItemTemplate>
|
||||
</ComboBox>
|
||||
<RadioButton Name="OutlineBtn" Style="{DynamicResource OmagCut_YellowToggleButton}"
|
||||
GroupName="DefinitionMethod_GrezzoUC"/>
|
||||
<RadioButton Name="DamagedBtn" Style="{DynamicResource OmagCut_YellowToggleButton}"
|
||||
Grid.Column="1" GroupName="DefinitionMethod_GrezzoUC"/>
|
||||
|
||||
<ComboBox Name="RawModeDamagedCmBx" Grid.Row="0" Grid.ColumnSpan="2" Style="{StaticResource OmagCut_ComboBox}"
|
||||
<!-- Definizione della Grid per definizione grezzo -->
|
||||
<Grid Name="RawMeasureGrd" Grid.Row="1" Grid.ColumnSpan="2">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<ComboBox Name="RawModeCmBx" Grid.Row="0" Grid.ColumnSpan="2" Style="{StaticResource OmagCut_ComboBox}"
|
||||
MaxDropDownHeight="300" Margin="6,0,6,0">
|
||||
<ComboBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding}" Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</DataTemplate>
|
||||
</ComboBox.ItemTemplate>
|
||||
</ComboBox>
|
||||
|
||||
<ComboBox Name="RawModeDamagedCmBx" Grid.Row="0" Grid.ColumnSpan="2" Style="{StaticResource OmagCut_ComboBox}"
|
||||
MaxDropDownHeight="300" Margin="6,0,6,0">
|
||||
<ComboBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
@@ -85,114 +85,123 @@
|
||||
</ComboBox>
|
||||
|
||||
<TextBlock Name="LengthTxBl" Grid.Row="1" Style="{DynamicResource OmagCut_CurrProjSummeryTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="LengthTxBx" Grid.Column="1" Grid.Row="1" Margin="13,0,6,0"
|
||||
<EgtWPFLib:EgtTextBox Name="LengthTxBx" Grid.Column="1" Grid.Row="1" Margin="13,0,6,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
<TextBlock Name="WidthTxBl" Grid.Row="2" Style="{DynamicResource OmagCut_CurrProjSummeryTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="WidthTxBx" Grid.Column="1" Grid.Row="2" Margin="13,0,6,0"
|
||||
<TextBlock Name="WidthTxBl" Grid.Row="2" Style="{DynamicResource OmagCut_CurrProjSummeryTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="WidthTxBx" Grid.Column="1" Grid.Row="2" Margin="13,0,6,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
<TextBlock Name="HeightTxBl" Grid.Row="3" Style="{DynamicResource OmagCut_CurrProjSummeryTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="HeightTxBx" Grid.Column="1" Grid.Row="3" Margin="13,0,6,0"
|
||||
<TextBlock Name="HeightTxBl" Grid.Row="3" Style="{DynamicResource OmagCut_CurrProjSummeryTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="HeightTxBx" Grid.Column="1" Grid.Row="3" Margin="13,0,6,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
<TextBlock Name="OffsetXTxBl" Grid.Row="4" Style="{DynamicResource OmagCut_CurrProjSummeryTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="OffsetXTxBx" Grid.Column="1" Grid.Row="4" Margin="13,0,6,0"
|
||||
<TextBlock Name="OffsetXTxBl" Grid.Row="4" Style="{DynamicResource OmagCut_CurrProjSummeryTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="OffsetXTxBx" Grid.Column="1" Grid.Row="4" Margin="13,0,6,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
<TextBlock Name="OffsetYTxBl" Grid.Row="5" Style="{DynamicResource OmagCut_CurrProjSummeryTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="OffsetYTxBx" Grid.Column="1" Grid.Row="5" Margin="13,0,6,0"
|
||||
<TextBlock Name="OffsetYTxBl" Grid.Row="5" Style="{DynamicResource OmagCut_CurrProjSummeryTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="OffsetYTxBx" Grid.Column="1" Grid.Row="5" Margin="13,0,6,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
<TextBlock Name="KerfTxBl" Grid.Row="6" Style="{DynamicResource OmagCut_CurrProjSummeryTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="KerfTxBx" Grid.Column="1" Grid.Row="6" Margin="13,0,6,0"
|
||||
<TextBlock Name="KerfTxBl" Grid.Row="6" Style="{DynamicResource OmagCut_CurrProjSummeryTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="KerfTxBx" Grid.Column="1" Grid.Row="6" Margin="13,0,6,0"
|
||||
Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
|
||||
|
||||
</Grid>
|
||||
|
||||
<!-- Definizione della Grid per il materiale -->
|
||||
<GroupBox Name="MaterialGpBx" Grid.Row="2" Grid.ColumnSpan="2" Style="{DynamicResource OmagCut_GroupBox}">
|
||||
</Grid>
|
||||
|
||||
<ComboBox Name="MaterialsCmbx" Style="{StaticResource OmagCut_ComboBox}"
|
||||
<!-- Definizione della Grid per il materiale -->
|
||||
<GroupBox Name="MaterialGpBx" Grid.Row="2" Grid.ColumnSpan="2" Style="{DynamicResource OmagCut_GroupBox}">
|
||||
|
||||
<ComboBox Name="MaterialsCmbx" Style="{StaticResource OmagCut_ComboBox}"
|
||||
MaxDropDownHeight="600">
|
||||
<ComboBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding sName}" Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</DataTemplate>
|
||||
</ComboBox.ItemTemplate>
|
||||
</ComboBox>
|
||||
<ComboBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding sName}" Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
|
||||
</DataTemplate>
|
||||
</ComboBox.ItemTemplate>
|
||||
</ComboBox>
|
||||
|
||||
</GroupBox>
|
||||
</GroupBox>
|
||||
|
||||
<!-- Definizione della Grid per Punti -->
|
||||
<GroupBox Name="PointsGpBx" Grid.Row="3" Grid.ColumnSpan="2" Style="{DynamicResource OmagCut_GroupBox}" >
|
||||
<!-- Definizione della Grid per Punti -->
|
||||
<GroupBox Name="PointsGpBx" Grid.Row="3" Grid.ColumnSpan="2" Style="{DynamicResource OmagCut_GroupBox}" >
|
||||
|
||||
<Grid >
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1.5*"/>
|
||||
<ColumnDefinition Width="1.5*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid >
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1.5*"/>
|
||||
<ColumnDefinition Width="1.5*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<ToggleButton Name="AddBtn"
|
||||
<ToggleButton Name="AddBtn"
|
||||
Style="{DynamicResource OmagCut_YellowToggleButton}"/>
|
||||
<ToggleButton Name="RemoveBtn" Grid.Column="1"
|
||||
<ToggleButton Name="RemoveBtn" Grid.Column="1"
|
||||
Style="{DynamicResource OmagCut_YellowToggleButton}"/>
|
||||
<Button Name="CloseBtn" Grid.Row="1" Grid.ColumnSpan="2"
|
||||
<Button Name="CloseBtn" Grid.Row="1" Grid.ColumnSpan="2"
|
||||
Style="{DynamicResource OmagCut_YellowTextButton}"/>
|
||||
</Grid>
|
||||
|
||||
</GroupBox>
|
||||
</Grid>
|
||||
|
||||
<!-- Definizione della Grid per Zona rovinata -->
|
||||
<GroupBox Name="DamagedAreaGpBx" Grid.Row="4" Grid.ColumnSpan="2" Grid.RowSpan="2" Style="{DynamicResource OmagCut_GroupBox}">
|
||||
</GroupBox>
|
||||
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<!-- Definizione della Grid per Zona rovinata -->
|
||||
<GroupBox Name="DamagedAreaGpBx" Grid.Row="4" Grid.ColumnSpan="2" Grid.RowSpan="2" Style="{DynamicResource OmagCut_GroupBox}">
|
||||
|
||||
<ToggleButton Name="NewBtn" Style="{DynamicResource OmagCut_YellowToggleButton}"/>
|
||||
<ToggleButton Name="DeleteBtn" Grid.Column="1" Style="{DynamicResource OmagCut_YellowToggleButton}"/>
|
||||
</Grid>
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
</GroupBox>
|
||||
<ToggleButton Name="NewBtn" Style="{DynamicResource OmagCut_YellowToggleButton}"/>
|
||||
<ToggleButton Name="DeleteBtn" Grid.Column="1" Style="{DynamicResource OmagCut_YellowToggleButton}"/>
|
||||
</Grid>
|
||||
|
||||
<Button Name="ConfirmPhotoBtn" Grid.Row="4" Grid.ColumnSpan="2" Visibility="Hidden"
|
||||
</GroupBox>
|
||||
|
||||
<TextBlock Name="OtherRefTabTxBl" Grid.Row="5" Grid.ColumnSpan="2" Style="{DynamicResource OmagCut_CurrProjSummeryTextBlock}"/>
|
||||
<CheckBox Name="OtherRefTabChBx" Grid.Row="5" Grid.Column="1" Style="{StaticResource OmagCut_CheckBox}"
|
||||
HorizontalAlignment="Right" Margin="0,0,6,0"/>
|
||||
|
||||
<Button Name="ConfirmPhotoBtn" Grid.Row="4" Grid.ColumnSpan="2" Visibility="Hidden"
|
||||
Style="{DynamicResource OmagCut_YellowTextButton}"/>
|
||||
|
||||
</Grid>
|
||||
|
||||
<!-- Definizione della Grid Inferiore per i Button V e X -->
|
||||
<Grid Name="LowerButtonGrid" Grid.Column="1" Grid.Row="3">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="6*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
</Grid>
|
||||
|
||||
<Button Name="RawProbingBtn" Style="{DynamicResource OmagCut_YellowGradientYellowIconButton}">
|
||||
<Image Source="{DynamicResource RawProbeImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
<!-- Definizione della Grid Inferiore per i Button V e X -->
|
||||
<Grid Name="LowerButtonGrid" Grid.Column="1" Grid.Row="3">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="5*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Button Name="BarCodeBtn" Grid.Column="2" Style="{DynamicResource OmagCut_YellowGradientYellowIconButton}">
|
||||
<Image Source="{DynamicResource BarCodeImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="RawProbingBtn" Style="{DynamicResource OmagCut_YellowGradientYellowIconButton}">
|
||||
<Image Source="{DynamicResource RawProbeImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
|
||||
<Button Name="SlabIdBtn" Grid.Column="3" Style="{DynamicResource OmagCut_YellowGradientYellowIconButton}">
|
||||
<Image Source="{DynamicResource SlabIdImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="BarCodeBtn" Grid.Column="2" Style="{DynamicResource OmagCut_YellowGradientYellowIconButton}">
|
||||
<Image Source="{DynamicResource BarCodeImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
|
||||
<Button Name="OkBtn" Grid.Column="5" Style="{DynamicResource OmagCut_GradientBlueIconButton}">
|
||||
<Image Source="{DynamicResource VImg}" Width="65" Height="65" HorizontalAlignment="Center"
|
||||
<Button Name="SlabIdBtn" Grid.Column="3" Style="{DynamicResource OmagCut_YellowGradientYellowIconButton}">
|
||||
<Image Source="{DynamicResource SlabIdImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
|
||||
<Button Name="OtherRefTabBtn" Grid.Column="4" Style="{DynamicResource OmagCut_YellowGradientYellowIconButton}">
|
||||
<Image Source="{DynamicResource RefTabImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
|
||||
<Button Name="OkBtn" Grid.Column="6" Style="{DynamicResource OmagCut_GradientBlueIconButton}">
|
||||
<Image Source="{DynamicResource VImg}" Width="65" Height="65" HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center" />
|
||||
</Button>
|
||||
|
||||
</Grid>
|
||||
|
||||
</Grid>
|
||||
|
||||
</Button>
|
||||
|
||||
</Grid>
|
||||
|
||||
</Grid>
|
||||
|
||||
</UserControl>
|
||||
|
||||
+687
-12
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user