OmagCUT 2.1b2 :
- aggiunta possibilità di allungare tagli in split.
This commit is contained in:
+9
-5
@@ -464,9 +464,12 @@ Friend Module CamAuto
|
||||
' Se attacco cambiato, aggiorno e accorcio della sicurezza sui tagli
|
||||
If nOriLeadIn <> MCH_SAW_LI.STRICT Then
|
||||
EgtSetMachiningParam(MCH_MP.LEADINTYPE, MCH_SAW_LI.STRICT)
|
||||
Dim dUserAddLen As Double = 0
|
||||
EgtGetInfo( nMchId, INFO_MCH_USER_SAL, dUserAddLen)
|
||||
EgtRemoveInfo( nMchId, INFO_MCH_USER_SAL)
|
||||
Dim dAddLen As Double = 0
|
||||
EgtGetMachiningParam(MCH_MP.STARTADDLEN, dAddLen)
|
||||
EgtSetMachiningParam(MCH_MP.STARTADDLEN, dAddLen - dSafeLen)
|
||||
EgtSetMachiningParam(MCH_MP.STARTADDLEN, dAddLen - dUserAddLen - dSafeLen)
|
||||
bModif = True
|
||||
End If
|
||||
End If
|
||||
@@ -481,9 +484,12 @@ Friend Module CamAuto
|
||||
' Se uscita cambiata, aggiorno e accorcio della sicurezza sui tagli
|
||||
If nOriLeadOut <> MCH_SAW_LO.STRICT Then
|
||||
EgtSetMachiningParam(MCH_MP.LEADOUTTYPE, MCH_SAW_LO.STRICT)
|
||||
Dim dUserAddLen As Double = 0
|
||||
EgtGetInfo( nMchId, INFO_MCH_USER_EAL, dUserAddLen)
|
||||
EgtRemoveInfo( nMchId, INFO_MCH_USER_EAL)
|
||||
Dim dAddLen As Double = 0
|
||||
EgtGetMachiningParam(MCH_MP.ENDADDLEN, dAddLen)
|
||||
EgtSetMachiningParam(MCH_MP.ENDADDLEN, dAddLen - dSafeLen)
|
||||
EgtSetMachiningParam(MCH_MP.ENDADDLEN, dAddLen - dUserAddLen - dSafeLen)
|
||||
bModif = True
|
||||
End If
|
||||
End If
|
||||
@@ -559,9 +565,7 @@ Friend Module CamAuto
|
||||
' Ricalcolo il preview
|
||||
EgtPreviewMachining(True)
|
||||
' Se non devo spostarlo nel pezzo, esco
|
||||
If Not bMoveOnPart Then
|
||||
Return True
|
||||
End If
|
||||
If Not bMoveOnPart Then Return True
|
||||
' Indice gruppo di preview nella lavorazione
|
||||
Dim nMchPvId As Integer = EgtGetFirstNameInGroup(nMchId, NAME_PREVIEW)
|
||||
' Indice gruppo di preview nel pezzo
|
||||
|
||||
@@ -194,6 +194,10 @@ Module ConstGen
|
||||
Public Const INFO_MCH_DUPLED As String = "Dupled"
|
||||
' Info lavorazione per pausa alla fine
|
||||
Public Const INFO_MCH_PAUSE As String = "Pause"
|
||||
' Info allungamento iniziale lavorazione imposto dall'utente
|
||||
Public Const INFO_MCH_USER_SAL As String = "Usal"
|
||||
' Info allungamento finale lavorazione imposto dall'utente
|
||||
Public Const INFO_MCH_USER_EAL As String = "Ueal"
|
||||
' Nome contorno taglio
|
||||
Public Const NAME_PV_CUT As String = "CUT"
|
||||
' Nome contorno pre-taglio
|
||||
|
||||
@@ -0,0 +1,56 @@
|
||||
<Window x:Class="EditValueWD"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
|
||||
FontFamily="./Resources/Fonts/#Century Gothic"
|
||||
ResizeMode="NoResize" WindowStyle="None" AllowsTransparency="True" Background="Transparent"
|
||||
Title="EditValueWD" Height="255.9" Width="426.5" ShowInTaskbar="False">
|
||||
|
||||
<!--Definizione della pagina di scelta del nome con cui salvare il progetto-->
|
||||
<Border Style="{StaticResource OmagCut_Border}">
|
||||
<Grid x:Name="SaveNameGrid">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
<ColumnDefinition Width="4*"/>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<TextBlock Name="ValueTxbl" Grid.Column="1" Grid.Row="0"
|
||||
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="ValueTxBx" Grid.Column="1" Grid.Row="1"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
|
||||
<Grid Name="ButtonsGrid" Grid.Column="1" Grid.Row="3" Grid.RowSpan="1">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Button Name="OkBtn" Grid.Column="1"
|
||||
IsDefault="True"
|
||||
Style="{StaticResource OmagCut_GradientBlueIconButton}">
|
||||
<Image Source="Resources/V.png" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
<Button Name="ExitBtn" Grid.Column="3"
|
||||
IsCancel="True"
|
||||
Style="{StaticResource OmagCut_GradientBlueIconButton}">
|
||||
<Image Source="Resources/X.png" Style="{StaticResource OmagCut_ButtonIcon}"/>
|
||||
</Button>
|
||||
|
||||
</Grid>
|
||||
|
||||
</Grid>
|
||||
|
||||
</Border>
|
||||
|
||||
</Window>
|
||||
@@ -0,0 +1,51 @@
|
||||
Imports System.IO
|
||||
Imports EgtUILib
|
||||
Imports EgtWPFLib
|
||||
|
||||
Public Class EditValueWD
|
||||
|
||||
' Riferimento alla MainWindow
|
||||
Private m_MainWindow As MainWindow = DirectCast(Application.Current.MainWindow, MainWindow)
|
||||
Private m_sMsg As String = "Value"
|
||||
Private m_sValue As String = ""
|
||||
|
||||
Sub New(Owner As Window, Optional sMsg As String = "")
|
||||
Me.Owner = Owner
|
||||
m_sMsg = sMsg
|
||||
InitializeComponent()
|
||||
End Sub
|
||||
|
||||
Friend Function SetVal( dVal As Double) As Boolean
|
||||
m_sValue = DoubleToString( dVal, 3)
|
||||
ValueTxBx.Text = m_sValue
|
||||
Return true
|
||||
End Function
|
||||
|
||||
Friend Function GetVal() As Double
|
||||
Dim dVal As Double = 0
|
||||
StringToDouble( m_sValue, dVal)
|
||||
Return dVal
|
||||
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
|
||||
End Sub
|
||||
|
||||
Private Sub EditValueWD_Rendered(sender As Object, e As EventArgs) Handles Me.ContentRendered
|
||||
ValueTxBx.Focus()
|
||||
ValueTxBx.OpenKeyboard(ValueTxBx, ValueTxBx)
|
||||
End Sub
|
||||
|
||||
Private Sub OkBtn_Click(sender As Object, e As RoutedEventArgs) Handles OkBtn.Click
|
||||
m_sValue = ValueTxBx.Text
|
||||
DialogResult = True
|
||||
End Sub
|
||||
|
||||
Private Sub ExitBtn_Click(sender As Object, e As RoutedEventArgs) Handles ExitBtn.Click
|
||||
m_sValue = ""
|
||||
DialogResult = False
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
@@ -62,5 +62,5 @@ Imports System.Windows
|
||||
' by using the '*' as shown below:
|
||||
' <Assembly: AssemblyVersion("1.0.*")>
|
||||
|
||||
<Assembly: AssemblyVersion("2.1.1.6")>
|
||||
<Assembly: AssemblyFileVersion("2.1.1.6")>
|
||||
<Assembly: AssemblyVersion("2.1.2.2")>
|
||||
<Assembly: AssemblyFileVersion("2.1.2.2")>
|
||||
|
||||
@@ -204,6 +204,9 @@
|
||||
<Compile Include="DrawPageUC.xaml.vb">
|
||||
<DependentUpon>DrawPageUC.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="EditValueWD.xaml.vb">
|
||||
<DependentUpon>EditValueWD.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="UnderDrillUC.xaml.vb">
|
||||
<DependentUpon>UnderDrillUC.xaml</DependentUpon>
|
||||
</Compile>
|
||||
@@ -374,6 +377,10 @@
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="EditValueWD.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="UnderDrillUC.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
|
||||
+13
-9
@@ -133,19 +133,23 @@
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="3*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
|
||||
<Button Name="OutCenStartBtn" Grid.Column="0" Style="{StaticResource OmagCut_YellowTextButton}" FontSize="{DynamicResource SplitPageBtn_FontSize}"/>
|
||||
<Button Name="AllOutStartBtn" Grid.Column="1" Style="{StaticResource OmagCut_YellowTextButton}" FontSize="{DynamicResource SplitPageBtn_FontSize}"/>
|
||||
<Button Name="AllCenStartBtn" Grid.Column="2" Style="{StaticResource OmagCut_YellowTextButton}" FontSize="{DynamicResource SplitPageBtn_FontSize}"/>
|
||||
<Button Name="OutCenEndBtn" Grid.Column="3" Style="{StaticResource OmagCut_YellowTextButton}" FontSize="{DynamicResource SplitPageBtn_FontSize}"/>
|
||||
<Button Name="AllOutEndBtn" Grid.Column="4" Style="{StaticResource OmagCut_YellowTextButton}" FontSize="{DynamicResource SplitPageBtn_FontSize}"/>
|
||||
<Button Name="AllCenEndBtn" Grid.Column="5" Style="{StaticResource OmagCut_YellowTextButton}" FontSize="{DynamicResource SplitPageBtn_FontSize}"/>
|
||||
<Button Name="AllExtendBtn" Grid.Column="6" Style="{StaticResource OmagCut_YellowTextButton}" FontSize="{DynamicResource SplitPageBtn_FontSize}"/>
|
||||
<Button Name="AllReduceBtn" Grid.Column="7" Style="{StaticResource OmagCut_YellowTextButton}" FontSize="{DynamicResource SplitPageBtn_FontSize}"/>
|
||||
<Button Name="PauseBtn" Grid.Column="8" Style="{StaticResource OmagCut_YellowTextButton}" FontSize="{DynamicResource SplitPageBtn_FontSize}"/>
|
||||
<Button Name="OutCenEndBtn" Grid.Column="1" Style="{StaticResource OmagCut_YellowTextButton}" FontSize="{DynamicResource SplitPageBtn_FontSize}"/>
|
||||
<Button Name="ModifStartBtn" Grid.Column="2" Style="{StaticResource OmagCut_YellowTextButton}" FontSize="{DynamicResource SplitPageBtn_FontSize}"/>
|
||||
<Button Name="ModifEndBtn" Grid.Column="3" Style="{StaticResource OmagCut_YellowTextButton}" FontSize="{DynamicResource SplitPageBtn_FontSize}"/>
|
||||
<Button Name="PauseBtn" Grid.Column="4" Style="{StaticResource OmagCut_YellowTextButton}" FontSize="{DynamicResource SplitPageBtn_FontSize}"/>
|
||||
<Button Name="AllOutStartBtn" Grid.Column="5" Style="{StaticResource OmagCut_YellowTextButton}" FontSize="{DynamicResource SplitPageBtn_FontSize}"/>
|
||||
<Button Name="AllCenStartBtn" Grid.Column="6" Style="{StaticResource OmagCut_YellowTextButton}" FontSize="{DynamicResource SplitPageBtn_FontSize}"/>
|
||||
<Button Name="AllOutEndBtn" Grid.Column="7" Style="{StaticResource OmagCut_YellowTextButton}" FontSize="{DynamicResource SplitPageBtn_FontSize}"/>
|
||||
<Button Name="AllCenEndBtn" Grid.Column="8" Style="{StaticResource OmagCut_YellowTextButton}" FontSize="{DynamicResource SplitPageBtn_FontSize}"/>
|
||||
<Button Name="AllExtendBtn" Grid.Column="9" Style="{StaticResource OmagCut_YellowTextButton}" FontSize="{DynamicResource SplitPageBtn_FontSize}"/>
|
||||
<Button Name="AllReduceBtn" Grid.Column="10" Style="{StaticResource OmagCut_YellowTextButton}" FontSize="{DynamicResource SplitPageBtn_FontSize}"/>
|
||||
|
||||
</Grid>
|
||||
|
||||
|
||||
+71
-2
@@ -33,9 +33,12 @@ Public Class SplitPageUC
|
||||
CutStartBtn.Content = EgtMsg(MSG_SPLITPAGEUC + 5) ' Inizio Allunga/Accorcia
|
||||
CutEndBtn.Content = EgtMsg(MSG_SPLITPAGEUC + 6) ' Fine Allunga/Accorcia
|
||||
OutCenStartBtn.Content = EgtMsg(MSG_SPLITPAGEUC + 7) ' Inizio Centro/Fuori
|
||||
OutCenEndBtn.Content = EgtMsg(MSG_SPLITPAGEUC + 12) ' Fine Centro/Fuori
|
||||
ModifStartBtn.Content = EgtMsg(MSG_SPLITPAGEUC + 33) ' Inizio Modif.
|
||||
ModifEndBtn.Content = EgtMsg(MSG_SPLITPAGEUC + 34) ' Fine Modif.
|
||||
PauseBtn.Content = EgtMsg(MSG_SPLITPAGEUC + 31) ' Pausa On/Off
|
||||
AllOutStartBtn.Content = EgtMsg(MSG_SPLITPAGEUC + 8) ' Inizi Tutti Fuori
|
||||
AllCenStartBtn.Content = EgtMsg(MSG_SPLITPAGEUC + 9) ' Inizi Tutti Centro
|
||||
OutCenEndBtn.Content = EgtMsg(MSG_SPLITPAGEUC + 12) ' Fine Centro/Fuori
|
||||
AllOutEndBtn.Content = EgtMsg(MSG_SPLITPAGEUC + 13) ' Fine Tutti Fuori
|
||||
AllCenEndBtn.Content = EgtMsg(MSG_SPLITPAGEUC + 14) ' Fine Tutti Centro
|
||||
AllExtendBtn.Content = EgtMsg(MSG_SPLITPAGEUC + 15) ' Allunga Tutti
|
||||
@@ -43,7 +46,6 @@ Public Class SplitPageUC
|
||||
ModifyBtn.Content = EgtMsg(MSG_SPLITPAGEUC + 17) ' Modifica
|
||||
AutoBtn.Content = EgtMsg(MSG_SPLITPAGEUC + 18) ' Auto
|
||||
RestartBtn.Content = EgtMsg(MSG_SPLITPAGEUC + 19) ' Restart
|
||||
PauseBtn.Content = EgtMsg(MSG_SPLITPAGEUC + 31) ' Pausa On/Off
|
||||
End Sub
|
||||
|
||||
Private Sub SplitPageUC_Loaded(sender As Object, e As EventArgs) Handles Me.Loaded
|
||||
@@ -642,6 +644,71 @@ Public Class SplitPageUC
|
||||
EnableButtons()
|
||||
End Sub
|
||||
|
||||
Private Sub ModifStartBtn_Click(sender As Object, e As RoutedEventArgs) Handles ModifStartBtn.Click
|
||||
' Recupero la lavorazione corrente
|
||||
Dim SelItem As NameIdLsBxItem = MachiningLsBx.SelectedItem
|
||||
If IsNothing(SelItem) Then Return
|
||||
Dim nI As Integer = SelItem.Ind
|
||||
Dim nOperId As Integer = m_MachiningList(nI).m_nId
|
||||
Dim dOrigUsal As Double = 0
|
||||
EgtGetInfo( nOperId, INFO_MCH_USER_SAL, dOrigUsal)
|
||||
' Dialogo richiesta valore
|
||||
Dim ValWnd As New EditValueWD(m_MainWindow, EgtMsg(MSG_SPLITPAGEUC + 35)) ' Allungamento
|
||||
ValWnd.SetVal( dOrigUsal)
|
||||
If ValWnd.ShowDialog() Then
|
||||
' Modifica della lavorazione
|
||||
Dim dUsal As Double = ValWnd.GetVal()
|
||||
EgtSetCurrMachining(m_MachiningList(nI).m_nId)
|
||||
Dim dAddLen As Double = 0
|
||||
EgtGetMachiningParam(MCH_MP.STARTADDLEN, dAddLen)
|
||||
If dAddLen - dOrigUsal < - 10 * EPS_SMALL Then
|
||||
return
|
||||
End If
|
||||
EgtSetMachiningParam(MCH_MP.STARTADDLEN, dAddLen + dUsal - dOrigUsal)
|
||||
EgtSetInfo( nOperId, INFO_MCH_USER_SAL, dUsal)
|
||||
UpdateMachiningPreview(m_MachiningList(nI).m_nId, True)
|
||||
' verifico interferenza
|
||||
EgtVerifyMachining(m_MachiningList(nI).m_nId, m_MachiningList(nI).m_nInterf)
|
||||
ColorMachining(m_MachiningList(nI))
|
||||
ColorNumber(nI)
|
||||
EgtDraw()
|
||||
' Imposto flag di modifica
|
||||
m_bModified = True
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub ModifEndBtn_Click(sender As Object, e As RoutedEventArgs) Handles ModifEndBtn.Click
|
||||
Dim SelItem As NameIdLsBxItem = MachiningLsBx.SelectedItem
|
||||
If IsNothing(SelItem) Then Return
|
||||
Dim nI As Integer = SelItem.Ind
|
||||
Dim nOperId As Integer = m_MachiningList(nI).m_nId
|
||||
Dim dOrigUeal As Double = 0
|
||||
EgtGetInfo( nOperId, INFO_MCH_USER_EAL, dOrigUeal)
|
||||
' Dialogo richiesta valore
|
||||
Dim ValWnd As New EditValueWD(m_MainWindow, EgtMsg(MSG_SPLITPAGEUC + 35)) ' Allungamento
|
||||
ValWnd.SetVal( dOrigUeal)
|
||||
If ValWnd.ShowDialog() Then
|
||||
' Modifica della lavorazione
|
||||
Dim dUeal As Double = ValWnd.GetVal()
|
||||
EgtSetCurrMachining(m_MachiningList(nI).m_nId)
|
||||
Dim dAddLen As Double = 0
|
||||
EgtGetMachiningParam(MCH_MP.ENDADDLEN, dAddLen)
|
||||
If dAddLen - dOrigUeal < - 10 * EPS_SMALL Then
|
||||
return
|
||||
End If
|
||||
EgtSetMachiningParam(MCH_MP.ENDADDLEN, dAddLen + dUeal - dOrigUeal)
|
||||
EgtSetInfo( nOperId, INFO_MCH_USER_EAL, dUeal)
|
||||
UpdateMachiningPreview(m_MachiningList(nI).m_nId, True)
|
||||
' verifico interferenza
|
||||
EgtVerifyMachining(m_MachiningList(nI).m_nId, m_MachiningList(nI).m_nInterf)
|
||||
ColorMachining(m_MachiningList(nI))
|
||||
ColorNumber(nI)
|
||||
EgtDraw()
|
||||
' Imposto flag di modifica
|
||||
m_bModified = True
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub PauseBtn_Click(sender As Object, e As RoutedEventArgs) Handles PauseBtn.Click
|
||||
Dim SelItem As NameIdLsBxItem = MachiningLsBx.SelectedItem
|
||||
If IsNothing(SelItem) Then Return
|
||||
@@ -899,6 +966,8 @@ Public Class SplitPageUC
|
||||
AllCenEndBtn.IsEnabled = Not m_bShow
|
||||
AllExtendBtn.IsEnabled = Not m_bShow
|
||||
AllReduceBtn.IsEnabled = Not m_bShow
|
||||
ModifStartBtn.IsEnabled = Not m_bShow
|
||||
ModifEndBtn.IsEnabled = Not m_bShow
|
||||
PauseBtn.IsEnabled = Not m_bShow And m_MainWindow.m_CurrentMachine.bEnablePause
|
||||
End Sub
|
||||
|
||||
|
||||
Reference in New Issue
Block a user