OmagCUT :
- aggiunta gestione mm/inch in interfaccia utente (da fare verso macchina e in generazione CN).
This commit is contained in:
+23
-3
@@ -33,7 +33,10 @@
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="3.5*"/>
|
||||
<RowDefinition Height="3.5*"/>
|
||||
<RowDefinition Height="1.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
@@ -98,9 +101,26 @@
|
||||
|
||||
</Grid>
|
||||
|
||||
<TextBlock Name="SafeZTxBl" Grid.Column="0" Grid.Row="8" FontSize="20"
|
||||
<TextBlock Name="CutExtraLenTxBl" Grid.Column="0" Grid.Row="2"
|
||||
Style="{StaticResource OmagCut_ToolsDBTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="CutExtraLenTxBx" Grid.Column="1" Grid.Row="2" Width="150"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}" />
|
||||
|
||||
<TextBlock Name="AngleCutExtraLenTxBl" Grid.Column="0" Grid.Row="3"
|
||||
Style="{StaticResource OmagCut_ToolsDBTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="AngleCutExtraLenTxBx" Grid.Column="1" Grid.Row="3" Width="150"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}" />
|
||||
|
||||
|
||||
<CheckBox Name="CompleteCutsChBx" Grid.Column="0" Grid.Row="4" Grid.ColumnSpan="2" Height="40" Width="250"
|
||||
HorizontalAlignment="Center">
|
||||
<TextBlock Name="CompleteCutsTxBl" Style="{StaticResource OmagCut_ToolsDBTextBlock}" Margin="10,0,0,0"
|
||||
Text="Rispetta i tagli completi"/>
|
||||
</CheckBox>
|
||||
|
||||
<TextBlock Name="SafeZTxBl" Grid.Column="0" Grid.Row="5" FontSize="20"
|
||||
Style="{StaticResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="SafeZTxBx" Grid.Column="1" Grid.Row="8" Width="150"
|
||||
<EgtWPFLib:EgtTextBox Name="SafeZTxBx" Grid.Column="1" Grid.Row="5" Width="150"
|
||||
Style="{StaticResource OmagCut_CalculatorTextBox}"/>
|
||||
|
||||
</Grid>
|
||||
|
||||
+22
-8
@@ -32,6 +32,8 @@ Public Class AlarmsPageUC
|
||||
CurrDrillTxBl.Text = EgtMsg(MSG_ALARMSPAGEUC + 3)
|
||||
CurrMillTxBl.Text = EgtMsg(MSG_ALARMSPAGEUC + 4)
|
||||
SafeZTxBl.Text = EgtMsg(MSG_ALARMSPAGEUC + 5)
|
||||
CutExtraLenTxBl.Text = EgtMsg(MSG_ALARMSPAGEUC + 6)
|
||||
AngleCutExtraLenTxBl.Text = EgtMsg(MSG_ALARMSPAGEUC + 7)
|
||||
|
||||
End Sub
|
||||
|
||||
@@ -113,8 +115,11 @@ Public Class AlarmsPageUC
|
||||
' Leggo distanza di sicurezza
|
||||
Dim dSafeZ As Double = 0
|
||||
EgtMdbGetSafeZ(dSafeZ)
|
||||
SafeZTxBx.Text = dSafeZ
|
||||
SafeZTxBx.Text = LenToString(dSafeZ, 2)
|
||||
|
||||
' Leggo tagli ridotti per interferenza in nesting
|
||||
CompleteCutsChBx.IsChecked =
|
||||
(GetPrivateProfileInt(S_MACH_NEST, K_MACH_REDUCEDCUT, 0, m_MainWindow.GetMachIniFile()) = 0)
|
||||
End Sub
|
||||
|
||||
Private Sub AuxiliaryToolCmBx_SelectionChanged(sender As Object, e As SelectionChangedEventArgs) Handles AuxiliaryToolCmBx.SelectionChanged
|
||||
@@ -200,6 +205,22 @@ Public Class AlarmsPageUC
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub SafeZTxBx_EgtClosed(sender As Object, e As EventArgs) Handles SafeZTxBx.EgtClosed
|
||||
Dim dSafeZ As Double = 0
|
||||
StringToLen(SafeZTxBx.Text, dSafeZ)
|
||||
EgtMdbSetSafeZ(dSafeZ)
|
||||
EgtMdbSave()
|
||||
End Sub
|
||||
|
||||
Private Sub CompleteCutsChBx_Click(sender As Object, e As RoutedEventArgs) Handles CompleteCutsChBx.Click
|
||||
If CompleteCutsChBx.IsChecked() Then
|
||||
WritePrivateProfileString(S_MACH_NEST, K_MACH_REDUCEDCUT, "0", m_MainWindow.GetMachIniFile())
|
||||
Else
|
||||
WritePrivateProfileString(S_MACH_NEST, K_MACH_REDUCEDCUT, "1", m_MainWindow.GetMachIniFile())
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
Friend Sub NcError()
|
||||
If m_CN.sz_NC_error_messages.Count > 0 Then
|
||||
NCErrorMessages.Text = m_CN.sz_NC_error_messages(0)
|
||||
@@ -231,11 +252,4 @@ Public Class AlarmsPageUC
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub SafeZTxBx_EgtClosed(sender As Object, e As EventArgs) Handles SafeZTxBx.EgtClosed
|
||||
Dim dSafeZ As Double = 0
|
||||
StringToDouble(SafeZTxBx.Text, dSafeZ)
|
||||
EgtMdbSetSafeZ(dSafeZ)
|
||||
EgtMdbSave()
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
+1
-2
@@ -21,6 +21,7 @@ Module ConstIni
|
||||
Public Const K_MESSAGESDIR As String = "MessagesDir"
|
||||
Public Const K_MESSAGES As String = "Messages"
|
||||
Public Const K_WINPLACE As String = "WinPlace"
|
||||
Public Const K_MMUNITS As String = "MmUnits"
|
||||
Public Const K_MAXPROJ As String = "MaxProj"
|
||||
Public Const K_LASTPROJ As String = "LastProj"
|
||||
Public Const K_AUTOLOADLASTPROJ As String = "AutoLoadLastProj"
|
||||
@@ -60,7 +61,6 @@ Module ConstIni
|
||||
Public Const K_SHOWTRIAADV As String = "ShowTriaAdv"
|
||||
Public Const K_ZOOMWIN As String = "ZoomWin"
|
||||
Public Const K_DISTLINE As String = "DistLine"
|
||||
Public Const K_MMUNITS As String = "MmUnits"
|
||||
|
||||
Public Const S_GRID As String = "Grid"
|
||||
Public Const K_SHOWGRID As String = "ShowGrid"
|
||||
@@ -88,7 +88,6 @@ Module ConstIni
|
||||
Public Const K_DIRECT As String = "Direct"
|
||||
Public Const K_STEP As String = "Step"
|
||||
Public Const K_ANGSTEP As String = "AngStep"
|
||||
Public Const K_REDUCEDCUT As String = "ReducedCut"
|
||||
Public Const K_RESTRADIUS As String = "RestRadius"
|
||||
Public Const K_SNAPDIST As String = "SnapDist"
|
||||
|
||||
|
||||
@@ -48,6 +48,9 @@
|
||||
Public Const K_SAWING As String = "Sawing"
|
||||
Public Const K_MILLING As String = "Milling"
|
||||
|
||||
Public Const S_MACH_NEST As String = "Nest"
|
||||
Public Const K_MACH_REDUCEDCUT As String = "ReducedCut"
|
||||
|
||||
Public Const S_MACHBUTTONS As String = "MachButtons"
|
||||
Public Const K_BUTTON As String = "Button"
|
||||
|
||||
|
||||
@@ -201,7 +201,7 @@ Public Class CurrentProjectPageUC
|
||||
m_nRawId = GDB_ID.NULL
|
||||
m_MainWindow.m_CadCutPageUC.m_NestPage.CalcRawPart()
|
||||
m_dRawHeight = 0
|
||||
HeightTxBx.Text = DoubleToString(m_dRawHeight, 2)
|
||||
HeightTxBx.Text = LenToString(m_dRawHeight, 2)
|
||||
' Dichiaro progetto non modificato
|
||||
EgtResetModified()
|
||||
Return True
|
||||
@@ -246,7 +246,7 @@ Public Class CurrentProjectPageUC
|
||||
m_MainWindow.m_CadCutPageUC.m_NestPage.CalcRawPart()
|
||||
' aggiorno spessore grezzo
|
||||
m_dRawHeight = m_MainWindow.m_RawPartPage.GetRawHeight()
|
||||
HeightTxBx.Text = DoubleToString(m_dRawHeight, 2)
|
||||
HeightTxBx.Text = LenToString(m_dRawHeight, 2)
|
||||
' Dichiaro progetto non modificato
|
||||
EgtResetModified()
|
||||
Return True
|
||||
@@ -369,6 +369,10 @@ Public Class CurrentProjectPageUC
|
||||
End If
|
||||
End Function
|
||||
|
||||
Friend Sub UpdateHeightTxBx()
|
||||
HeightTxBx.Text = LenToString(m_dRawHeight, 2)
|
||||
End Sub
|
||||
|
||||
' Gestione fotografia della lastra
|
||||
|
||||
Friend Function LoadPhoto(ByVal sPath As String) As Boolean
|
||||
|
||||
+1
-1
@@ -248,7 +248,7 @@ Public Class DrawPageUC
|
||||
Next
|
||||
For i As Integer = 1 To nShow
|
||||
Dim j As Integer = nHide + i
|
||||
GetNameEdit(j).Text = m_CVars(i - 1).m_sName
|
||||
GetNameEdit(j).Text = m_CVars(i - 1).m_sName
|
||||
GetNameEdit(j).Visibility = Windows.Visibility.Visible
|
||||
GetValueEdit(j).Text = m_CVars(i - 1).ToString()
|
||||
GetValueEdit(j).Visibility = Windows.Visibility.Visible
|
||||
|
||||
+16
-31
@@ -57,7 +57,7 @@ Public Class GridCut
|
||||
' Reset punto acquisito
|
||||
m_bPointP1Ok = False
|
||||
' Assegno parametri di lavorazione già definiti
|
||||
DepthTxBx.Text = DoubleToString(m_dDepth, 1)
|
||||
DepthTxBx.Text = LenToString(m_dDepth, 1)
|
||||
' Origine tavola
|
||||
m_bRawOk = True
|
||||
If Not EgtGetTableRef(1, m_ptTabOri) Then
|
||||
@@ -163,8 +163,8 @@ Public Class GridCut
|
||||
EgtSetAxisPos(sR1, dR1)
|
||||
EgtSetAxisPos(sR2, dR2)
|
||||
' Visualizzo quote
|
||||
Dim sSawTip As String = "X" & DoubleToString(m_ptTipP1.x, 0) & " Y" & DoubleToString(m_ptTipP1.y, 0) &
|
||||
" Z" & DoubleToString(m_ptTipP1.z, 0) & " C" & DoubleToString(dR1, 0) &
|
||||
Dim sSawTip As String = "X" & LenToString(m_ptTipP1.x, 0) & " Y" & LenToString(m_ptTipP1.y, 0) &
|
||||
" Z" & LenToString(m_ptTipP1.z, 0) & " C" & DoubleToString(dR1, 0) &
|
||||
" B" & DoubleToString(dR2, 0)
|
||||
'SawTipTxBl.Text = sSawTip
|
||||
' Assegno angoli
|
||||
@@ -250,8 +250,8 @@ Public Class GridCut
|
||||
EgtSetAxisPos(sR1, dR1)
|
||||
EgtSetAxisPos(sR2, dR2)
|
||||
' Visualizzo quote
|
||||
Dim sSawTip As String = "X" & DoubleToString(m_ptTipP2.x, 0) & " Y" & DoubleToString(m_ptTipP2.y, 0) &
|
||||
" Z" & DoubleToString(m_ptTipP2.z, 0) & " C" & DoubleToString(dR1, 0) &
|
||||
Dim sSawTip As String = "X" & LenToString(m_ptTipP2.x, 0) & " Y" & LenToString(m_ptTipP2.y, 0) &
|
||||
" Z" & LenToString(m_ptTipP2.z, 0) & " C" & DoubleToString(dR1, 0) &
|
||||
" B" & DoubleToString(dR2, 0)
|
||||
'SawTipTxBl.Text = sSawTip
|
||||
' Assegno angolo verticale da direzione utensile
|
||||
@@ -267,7 +267,7 @@ Public Class GridCut
|
||||
Dim dAngOrizzDeg As Double
|
||||
vtDiff.ToSpherical(dLen, dAngVertDeg, dAngOrizzDeg)
|
||||
If dLen > EPS_SMALL Then
|
||||
'LenghtTxBx.Text = DoubleToString(dLen, 1)
|
||||
'LenghtTxBx.Text = LenToString(dLen, 1)
|
||||
m_dAngO = dAngOrizzDeg
|
||||
DirectionTxBx.Text = DoubleToString(dAngOrizzDeg, 2)
|
||||
Create2PointsGridCut()
|
||||
@@ -286,7 +286,7 @@ Public Class GridCut
|
||||
' Verifico che l'affondamento impostato non sia superiore a quello massimo
|
||||
Dim dMaxDepth = m_ptRawMax.z - m_ptRawMin.z + MAX_TAB_DEPTH
|
||||
Dim dDepth As Double = 0
|
||||
StringToDouble(DepthTxBx.Text, dDepth)
|
||||
StringToLen(DepthTxBx.Text, dDepth)
|
||||
If dDepth < 0 Then
|
||||
m_dDepth = 0
|
||||
ElseIf dDepth > dMaxDepth Then
|
||||
@@ -294,27 +294,12 @@ Public Class GridCut
|
||||
Else
|
||||
m_dDepth = dDepth
|
||||
End If
|
||||
DepthTxBx.Text = DoubleToString(m_dDepth, 2)
|
||||
DepthTxBx.Text = LenToString(m_dDepth, 2)
|
||||
' Disegno il taglio
|
||||
CreateGridCut()
|
||||
EgtDraw()
|
||||
End Sub
|
||||
|
||||
'Private Sub LenghtTxBx_EgtClosed(sender As Object, e As EventArgs) Handles LenghtTxBx.EgtClosed
|
||||
' ' Verifico che la lunghezza del taglio impostata non sia inferiore a quella minima
|
||||
' Dim dLenght As Double = 0
|
||||
' StringToDouble(LenghtTxBx.Text, dLenght)
|
||||
' If dLenght < MIN_CUT_LEN Then
|
||||
' m_dLen = MIN_CUT_LEN
|
||||
' Else
|
||||
' m_dLen = dLenght
|
||||
' End If
|
||||
' LenghtTxBx.Text = DoubleToString(m_dLen, 2)
|
||||
' ' Disegno il taglio
|
||||
' CreateGridCut()
|
||||
' EgtDraw()
|
||||
'End Sub
|
||||
|
||||
Private Sub DirectionTxBx_EgtClosed(sender As Object, e As EventArgs) Handles DirectionTxBx.EgtClosed
|
||||
' Assegno il nuovo valore di direzione
|
||||
Dim dDirection As Double = 0
|
||||
@@ -378,7 +363,7 @@ Public Class GridCut
|
||||
Return False
|
||||
End If
|
||||
' Spessore grezzo
|
||||
Dim dRawHeight As Integer = m_ptRawMax.z - m_ptRawMin.z
|
||||
Dim dRawHeight As Double = m_ptRawMax.z - m_ptRawMin.z
|
||||
' Rimuovo eventuale vecchio pezzo per taglio diretto
|
||||
EraseDirectCutPart()
|
||||
' Disattivo eventuali lavorazioni presenti
|
||||
@@ -417,7 +402,7 @@ Public Class GridCut
|
||||
Return False
|
||||
End If
|
||||
' Spessore grezzo
|
||||
Dim dRawHeight As Integer = m_ptRawMax.z - m_ptRawMin.z
|
||||
Dim dRawHeight As Double = m_ptRawMax.z - m_ptRawMin.z
|
||||
' Rimuovo eventuale vecchio pezzo per taglio diretto
|
||||
EraseDirectCutPart()
|
||||
' Disattivo eventuali lavorazioni presenti
|
||||
@@ -464,11 +449,11 @@ Public Class GridCut
|
||||
'Recupero dati da interfaccia
|
||||
Dim dDimPzX As Double
|
||||
Dim nNumPzX As Integer
|
||||
StringToDouble(DimPzXTxBx.Text, dDimPzX)
|
||||
StringToLen(DimPzXTxBx.Text, dDimPzX)
|
||||
StringToDouble(NumPzXTxBx.Text, nNumPzX)
|
||||
Dim dDimPzY As Double
|
||||
Dim nNumPzY As Integer
|
||||
StringToDouble(DimPzYTxBx.Text, dDimPzY)
|
||||
StringToLen(DimPzYTxBx.Text, dDimPzY)
|
||||
StringToDouble(NumPzYTxBx.Text, nNumPzY)
|
||||
' Definisco vettore di spostamento
|
||||
Dim vtDelta As Vector3d
|
||||
@@ -479,8 +464,8 @@ Public Class GridCut
|
||||
Dim dLenX As Double = dThick + (dDimPzX + dThick) * nNumPzX
|
||||
Dim nCutParaId = EgtCreateLinePDL(nLayerId, ptStart, m_dAngO, dLenX)
|
||||
' Imposto affondamento e angolo di fianco sul taglio
|
||||
EgtSetInfo(nCutParaId, "Depth", m_dDepth)
|
||||
EgtSetInfo(nCutParaId, "SideAng", m_dAngV)
|
||||
EgtSetInfo(nCutParaId, "Depth", DoubleToString(m_dDepth, 3))
|
||||
EgtSetInfo(nCutParaId, "SideAng", DoubleToString(m_dAngV, 3))
|
||||
' Calcolo vettore di spostamento
|
||||
vtDelta = Vector3d.FromPolar((dDimPzY + dThick), m_dAngO)
|
||||
' Ruoto il vettore di traslazione
|
||||
@@ -503,8 +488,8 @@ Public Class GridCut
|
||||
EgtInvertCurve(nCutPerpId)
|
||||
End If
|
||||
' Imposto affondamento e angolo di fianco sul taglio
|
||||
EgtSetInfo(nCutPerpId, "Depth", m_dDepth)
|
||||
EgtSetInfo(nCutPerpId, "SideAng", m_dAngV)
|
||||
EgtSetInfo(nCutPerpId, "Depth", DoubleToString(m_dDepth, 3))
|
||||
EgtSetInfo(nCutPerpId, "SideAng", DoubleToString(m_dAngV, 3))
|
||||
' Calcolo secondo vettore di spostamento
|
||||
vtDelta = Vector3d.FromPolar((dDimPzX + dThick), m_dAngO)
|
||||
For Index As Integer = 1 To nNumPzX
|
||||
|
||||
-163
@@ -1,163 +0,0 @@
|
||||
<Window x:Class="Keyboard"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
Title="Keyboard" Height="512" Width="1024" Background="Transparent" ResizeMode="NoResize"
|
||||
ShowInTaskbar="False" AllowsTransparency="True" WindowStyle="None">
|
||||
|
||||
<!-- Chiamata al Dictionary -->
|
||||
<Window.Resources>
|
||||
<ResourceDictionary Source="OmagCutDictionary.xaml"/>
|
||||
</Window.Resources>
|
||||
|
||||
<Grid Background="DarkGray">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<Grid Grid.Row="0" >
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="10*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<TextBlock Name="CurrNameTxBl" FontSize="30" HorizontalAlignment="Center" VerticalAlignment="Center"
|
||||
TextAlignment="Center" Text="Nome"/>
|
||||
<TextBox Name="CurrTextTxBx" Grid.Column="0" Grid.Row="1" FontSize="20" Height="29" Width="600"
|
||||
HorizontalAlignment="Center" VerticalAlignment="Center" IsReadOnly="True" />
|
||||
<Button Name="OkBtn" Grid.Column="1" Grid.RowSpan="2" >
|
||||
<Image Source="Resources/V.png" Width="65" Height="65" HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center" />
|
||||
</Button>
|
||||
<Button Name="ExitBtn" Grid.Column="2" Grid.RowSpan="2" >
|
||||
<Image Source="Resources/X.png" Width="65" Height="65" HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center" />
|
||||
</Button>
|
||||
|
||||
</Grid>
|
||||
|
||||
<Grid Grid.Row="1" >
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="0.8*"/>
|
||||
<ColumnDefinition Width="10*"/>
|
||||
<ColumnDefinition Width="1.6*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Button Name="BackslashBtn" Grid.Column="0" FontSize="22" Content="\"/>
|
||||
|
||||
<UniformGrid Grid.Column="1" Columns="10" >
|
||||
<Button Name="OneBtn" FontSize="22" Content="1"/>
|
||||
<Button Name="TwoBtn" FontSize="22" Content="2"/>
|
||||
<Button Name="ThreeBtn" FontSize="22" Content="3"/>
|
||||
<Button Name="FourBtn" FontSize="22" Content="4"/>
|
||||
<Button Name="FiveBtn" FontSize="22" Content="5"/>
|
||||
<Button Name="SixBtn" FontSize="22" Content="6"/>
|
||||
<Button Name="SevenBtn" FontSize="22" Content="7"/>
|
||||
<Button Name="EightBtn" FontSize="22" Content="8"/>
|
||||
<Button Name="NineBtn" FontSize="22" Content="9"/>
|
||||
<Button Name="ZeroBtn" FontSize="22" Content="0"/>
|
||||
</UniformGrid>
|
||||
|
||||
<Button Name="BackspaceBtn" Grid.Column="4" FontSize="22" Content="Backspace"/>
|
||||
|
||||
</Grid>
|
||||
|
||||
<UniformGrid Grid.Row="2" Columns="12">
|
||||
<Button Name="TabBtn" FontSize="22" Content="Tab"/>
|
||||
<Button Name="qBtn" FontSize="22" Content="q"/>
|
||||
<Button Name="wBtn" FontSize="22" Content="w"/>
|
||||
<Button Name="eBtn" FontSize="22" Content="e"/>
|
||||
<Button Name="rBtn" FontSize="22" Content="r"/>
|
||||
<Button Name="tBtn" FontSize="22" Content="t"/>
|
||||
<Button Name="yBtn" FontSize="22" Content="y"/>
|
||||
<Button Name="uBtn" FontSize="22" Content="u"/>
|
||||
<Button Name="iBtn" FontSize="22" Content="i"/>
|
||||
<Button Name="oBtn" FontSize="22" Content="o"/>
|
||||
<Button Name="pBtn" FontSize="22" Content="p"/>
|
||||
<Button Name="Enter1Btn" FontSize="22" BorderThickness="1,1,1,0" />
|
||||
</UniformGrid>
|
||||
|
||||
<Grid Grid.Row="3" >
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1.2*"/>
|
||||
<ColumnDefinition Width="10*"/>
|
||||
<ColumnDefinition Width="0.8*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<ToggleButton Name="CapsLockBtn" Grid.Column="0" FontSize="22" Content="Caps Lock"/>
|
||||
|
||||
<UniformGrid Grid.Column="1" Columns="10" >
|
||||
<Button Name="aBtn" FontSize="22" Content="a" Click="aBtn_Click"/>
|
||||
<Button Name="sBtn" FontSize="22" Content="s"/>
|
||||
<Button Name="dBtn" FontSize="22" Content="d"/>
|
||||
<Button Name="fBtn" FontSize="22" Content="f"/>
|
||||
<Button Name="gBtn" FontSize="22" Content="g"/>
|
||||
<Button Name="hBtn" FontSize="22" Content="h"/>
|
||||
<Button Name="jBtn" FontSize="22" Content="j"/>
|
||||
<Button Name="kBtn" FontSize="22" Content="k"/>
|
||||
<Button Name="lBtn" FontSize="22" Content="l"/>
|
||||
<Button Name="PlusBtn" FontSize="22" BorderThickness="1,2,1,1" Margin="0,-1,0,0" Content="+"/>
|
||||
</UniformGrid>
|
||||
|
||||
<Button Name="Enter2Btn" Grid.Column="2" FontSize="22" BorderThickness="1,0,1,1"/>
|
||||
|
||||
</Grid>
|
||||
|
||||
<Grid Grid.Row="4" >
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="0.8*"/>
|
||||
<ColumnDefinition Width="9*"/>
|
||||
<ColumnDefinition Width="2.2*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<ToggleButton Name="Shift1Btn" Grid.Column="0" FontSize="22" Content="Shift" />
|
||||
|
||||
<UniformGrid Grid.Column="1" Columns="9" >
|
||||
<Button Name="MinorBtn" FontSize="22" Content="<"/>
|
||||
<Button Name="zBtn" FontSize="22" Content="z"/>
|
||||
<Button Name="xBtn" FontSize="22" Content="x"/>
|
||||
<Button Name="cBtn" FontSize="22" Content="c"/>
|
||||
<Button Name="vBtn" FontSize="22" Content="v"/>
|
||||
<Button Name="bBtn" FontSize="22" Content="b"/>
|
||||
<Button Name="nBtn" FontSize="22" Content="n"/>
|
||||
<Button Name="mBtn" FontSize="22" Content="m"/>
|
||||
<Button Name="MinusBtn" FontSize="22" Content="-"/>
|
||||
</UniformGrid>
|
||||
|
||||
<ToggleButton Name="Shift2Btn" Grid.Column="2" FontSize="22" Content="Shift"/>
|
||||
|
||||
</Grid>
|
||||
|
||||
<Grid Grid.Row="5" >
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="0.6*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="5.4*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
<ColumnDefinition Width="1*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Button Name="DotBtn" Grid.Column="1" FontSize="22" Content="."/>
|
||||
<Button Name="CommaBtn" Grid.Column="2" FontSize="22" Content=","/>
|
||||
<ToggleButton Name="AltBtn" Grid.Column="3" FontSize="22" Content="Alt"/>
|
||||
<Button Name="SpaceBtn" Grid.Column="4" FontSize="22" />
|
||||
<ToggleButton Name="AltGrBtn" Grid.Column="5" FontSize="22" Content="Alt Gr"/>
|
||||
<Button Name="ClearBtn" Grid.Column="6" FontSize="22" Content="Clear"/>
|
||||
|
||||
</Grid>
|
||||
|
||||
</Grid>
|
||||
|
||||
</Window>
|
||||
+34
-42
@@ -263,14 +263,14 @@ Public Class MachiningDbPageUC
|
||||
Dim ToolString As String = String.Empty
|
||||
Dim ToolInt As Integer = 0
|
||||
Dim ToolDouble As Double = 0
|
||||
Dim ToolBool As Boolean
|
||||
Dim ToolBool As Boolean = False
|
||||
EgtMdbGetCurrMachiningParam(MCH_MP.NAME, m_sMachiningName)
|
||||
NameTxBx.Text = m_sMachiningName
|
||||
EgtMdbGetCurrMachiningParam(MCH_MP.DEPTH_STR, ToolString)
|
||||
DepthTxBx.Text = ToolString
|
||||
DepthTxBx.Text = ExprToUIExpr(ToolString)
|
||||
'Parametri Taglio
|
||||
EgtMdbGetCurrMachiningParam(MCH_MP.SIDEANGLE, ToolDouble)
|
||||
SideAngleTxBx.Text = ToolDouble
|
||||
SideAngleTxBx.Text = DoubleToString(ToolDouble, 3)
|
||||
EgtMdbGetCurrMachiningParam(MCH_MP.INVERT, ToolBool)
|
||||
InvertChBx.IsChecked = ToolBool
|
||||
EgtMdbGetCurrMachiningParam(MCH_MP.STEPTYPE, ToolInt)
|
||||
@@ -288,20 +288,20 @@ Public Class MachiningDbPageUC
|
||||
EgtMdbGetCurrMachiningParam(MCH_MP.CURVEUSE, ToolInt)
|
||||
CurveUseCmBx.SelectedIndex = ToolInt
|
||||
EgtMdbGetCurrMachiningParam(MCH_MP.APPROX, ToolDouble)
|
||||
ApproxTxBx.Text = ToolDouble
|
||||
ApproxTxBx.Text = LenToString(ToolDouble, 3)
|
||||
'Parametri Foratura
|
||||
EgtMdbGetCurrMachiningParam(MCH_MP.STARTPOS, ToolDouble)
|
||||
StartPosTxBx.Text = ToolDouble
|
||||
StartPosTxBx.Text = LenToString(ToolDouble, 3)
|
||||
EgtMdbGetCurrMachiningParam(MCH_MP.STARTSLOWLEN, ToolDouble)
|
||||
StartsLowLenTxBx.Text = ToolDouble
|
||||
StartsLowLenTxBx.Text = LenToString(ToolDouble, 3)
|
||||
EgtMdbGetCurrMachiningParam(MCH_MP.ENDSLOWLEN, ToolDouble)
|
||||
EndsLowLenTxBx.Text = ToolDouble
|
||||
EndsLowLenTxBx.Text = LenToString(ToolDouble, 3)
|
||||
EgtMdbGetCurrMachiningParam(MCH_MP.THROUADDLEN, ToolDouble)
|
||||
ThrouAddLenTxBx.Text = ToolDouble
|
||||
ThrouAddLenTxBx.Text = LenToString(ToolDouble, 3)
|
||||
EgtMdbGetCurrMachiningParam(MCH_MP.STEP_, ToolDouble)
|
||||
StepTxBx.Text = ToolDouble
|
||||
StepTxBx.Text = LenToString(ToolDouble, 3)
|
||||
EgtMdbGetCurrMachiningParam(MCH_MP.RETURNPOS, ToolDouble)
|
||||
ReturnPosTxBx.Text = ToolDouble
|
||||
ReturnPosTxBx.Text = LenToString(ToolDouble, 3)
|
||||
'Parametri utensile
|
||||
Dim nMachiningType As Integer
|
||||
EgtMdbGetCurrMachiningParam(MCH_MP.TYPE, nMachiningType)
|
||||
@@ -332,7 +332,7 @@ Public Class MachiningDbPageUC
|
||||
Dim dTemp As Double
|
||||
Dim bTemp As Boolean
|
||||
EgtMdbSetCurrMachiningParam(MCH_MP.NAME, NameTxBx.Text)
|
||||
EgtMdbSetCurrMachiningParam(MCH_MP.DEPTH_STR, DepthTxBx.Text)
|
||||
EgtMdbSetCurrMachiningParam(MCH_MP.DEPTH_STR, UIExprToExpr(DepthTxBx.Text))
|
||||
'Parametri Taglio
|
||||
StringToDouble(SideAngleTxBx.Text, dTemp)
|
||||
EgtMdbSetCurrMachiningParam(MCH_MP.SIDEANGLE, dTemp)
|
||||
@@ -345,20 +345,20 @@ Public Class MachiningDbPageUC
|
||||
EgtMdbSetCurrMachiningParam(MCH_MP.EXTLINKTYPE, ExtLinkTypeCmBx.SelectedIndex)
|
||||
EgtMdbSetCurrMachiningParam(MCH_MP.LEADOUTTYPE, LeadOutTypeCmBx.SelectedIndex)
|
||||
EgtMdbSetCurrMachiningParam(MCH_MP.CURVEUSE, CurveUseCmBx.SelectedIndex)
|
||||
StringToDouble(ApproxTxBx.Text, dTemp)
|
||||
StringToLen(ApproxTxBx.Text, dTemp)
|
||||
EgtMdbSetCurrMachiningParam(MCH_MP.APPROX, dTemp)
|
||||
'Parametri Foratura
|
||||
StringToDouble(StartPosTxBx.Text, dTemp)
|
||||
StringToLen(StartPosTxBx.Text, dTemp)
|
||||
EgtMdbSetCurrMachiningParam(MCH_MP.STARTPOS, dTemp)
|
||||
StringToDouble(StartsLowLenTxBx.Text, dTemp)
|
||||
StringToLen(StartsLowLenTxBx.Text, dTemp)
|
||||
EgtMdbSetCurrMachiningParam(MCH_MP.STARTSLOWLEN, dTemp)
|
||||
StringToDouble(EndsLowLenTxBx.Text, dTemp)
|
||||
StringToLen(EndsLowLenTxBx.Text, dTemp)
|
||||
EgtMdbSetCurrMachiningParam(MCH_MP.ENDSLOWLEN, dTemp)
|
||||
StringToDouble(ThrouAddLenTxBx.Text, dTemp)
|
||||
StringToLen(ThrouAddLenTxBx.Text, dTemp)
|
||||
EgtMdbSetCurrMachiningParam(MCH_MP.THROUADDLEN, dTemp)
|
||||
StringToDouble(StepTxBx.Text, dTemp)
|
||||
StringToLen(StepTxBx.Text, dTemp)
|
||||
EgtMdbSetCurrMachiningParam(MCH_MP.STEP_, dTemp)
|
||||
StringToDouble(ReturnPosTxBx.Text, dTemp)
|
||||
StringToLen(ReturnPosTxBx.Text, dTemp)
|
||||
EgtMdbSetCurrMachiningParam(MCH_MP.RETURNPOS, dTemp)
|
||||
'Parametri utensile
|
||||
If Not IsNothing(ToolCmBx.SelectedItem) Then
|
||||
@@ -531,36 +531,28 @@ Public Class MachiningDbPageUC
|
||||
Return True
|
||||
End Function
|
||||
|
||||
Private Sub NameTxBx_PreviewMouseDown(sender As Object, e As MouseButtonEventArgs) Handles NameTxBx.PreviewMouseDown
|
||||
' Imposto dati tastiera
|
||||
Dim Keyboard As New Keyboard(NameTxBl.Text, NameTxBx.Text)
|
||||
' Visualizzo
|
||||
If Keyboard.ShowDialog() Then
|
||||
' Se cambiato nome
|
||||
If Keyboard.m_StringResult <> m_sMachiningName Then
|
||||
' Imposto contesto macchina
|
||||
EgtSetCurrentContext(m_MainWindow.m_CurrentProjectPageUC.CurrentProjectScene.GetCtx())
|
||||
' Se nome nuovo,lo assegno
|
||||
Dim TempName As String = Keyboard.m_StringResult
|
||||
EgtTdbGetToolNewName(TempName)
|
||||
If TempName = Keyboard.m_StringResult Then
|
||||
NameTxBx.Text = Keyboard.m_StringResult
|
||||
Else
|
||||
MsgBox("Nome già utilizzato")
|
||||
End If
|
||||
Private Sub NameTxBx_EgtClosed(sender As Object, e As EventArgs) Handles NameTxBx.EgtClosed
|
||||
' Se cambiato nome
|
||||
If NameTxBx.Text <> m_sMachiningName Then
|
||||
' Imposto contesto macchina
|
||||
EgtSetCurrentContext(m_MainWindow.m_CurrentProjectPageUC.CurrentProjectScene.GetCtx())
|
||||
' Se nome nuovo,lo assegno
|
||||
Dim TempName As String = NameTxBx.Text
|
||||
EgtMdbGetMachiningNewName(TempName)
|
||||
If TempName = NameTxBx.Text Then
|
||||
NameTxBx.Text = NameTxBx.Text
|
||||
Else
|
||||
' Nome già utilizzato
|
||||
Dim InfoBox As New EgtMsgBox(m_MainWindow, "", EgtMsg(91104), EgtMsgBox.Buttons.OK, EgtMsgBox.Icons.ESCLAMATION)
|
||||
NameTxBx.Text = m_sMachiningName
|
||||
End If
|
||||
Else
|
||||
NameTxBx.Text = m_sMachiningName
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub DepthTxBx_PreviewMouseDown(sender As Object, e As MouseButtonEventArgs) Handles DepthTxBx.PreviewMouseDown
|
||||
' Imposto dati tastiera
|
||||
Dim Keyboard As New Keyboard(DepthTxBl.Text, DepthTxBx.Text)
|
||||
' Visualizzo
|
||||
If Keyboard.ShowDialog() Then
|
||||
DepthTxBx.Text = Keyboard.m_StringResult
|
||||
End If
|
||||
Private Sub DepthTxBx_EgtClosed(sender As Object, e As EventArgs) Handles DepthTxBx.EgtClosed
|
||||
' Non devo fare alcunchè
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
+3
-1
@@ -205,6 +205,9 @@ Class MainWindow
|
||||
Dim sLuaBaseLib As String = String.Empty
|
||||
GetPrivateProfileString(S_LUA, K_BASELIB, "EgtBase", sLuaBaseLib, m_sIniFile)
|
||||
EgtLuaRequire(sLuaBaseLib)
|
||||
' imposto unità di misura per interfaccia utente
|
||||
Dim bMM As Boolean = (GetPrivateProfileInt(S_GENERAL, K_MMUNITS, 1, m_sIniFile) <> 0)
|
||||
EgtSetUiUnits(bMM)
|
||||
' Imposto posizione e dimensioni della MainWindow
|
||||
Dim nFlag As Integer
|
||||
Dim nLeft As Integer
|
||||
@@ -220,7 +223,6 @@ Class MainWindow
|
||||
WindowState = If(nFlag = 1, WindowState.Maximized, WindowState.Normal)
|
||||
' Inizializzazione della libreria EgtWPFLib
|
||||
EgtWPFInit()
|
||||
|
||||
' Crezione della MachineStatusBar
|
||||
m_MachineStatusUC = New MachineStatusUC
|
||||
' Creazione delle Page UserControl
|
||||
|
||||
@@ -71,7 +71,7 @@ Public Class ManualAxesMoveUC
|
||||
Dim dTemp As Double = 0
|
||||
Dim CmdString As String = String.Empty
|
||||
EgtLuaExecFile(m_MainWindow.GetMachinesRootDir() & "\" & m_MainWindow.GetCurrMachine() & "\DirectCmd\AxesMove.lua")
|
||||
StringToDouble(FeedTxBx.Text, dTemp)
|
||||
StringToLen(FeedTxBx.Text, dTemp)
|
||||
EgtLuaSetGlobNumVar("CMD.F", dTemp)
|
||||
StringToDouble(SpeedTxBx.Text, dTemp)
|
||||
EgtLuaSetGlobNumVar("CMD.S", dTemp)
|
||||
@@ -134,11 +134,11 @@ Public Class ManualAxesMoveUC
|
||||
Dim dVal As Double = 0
|
||||
Select Case nBtnName.Name
|
||||
Case L1Btn.Name
|
||||
StringToDouble(L1TxBx.Text, dVal)
|
||||
StringToLen(L1TxBx.Text, dVal)
|
||||
Case L2Btn.Name
|
||||
StringToDouble(L2TxBx.Text, dVal)
|
||||
StringToLen(L2TxBx.Text, dVal)
|
||||
Case L3Btn.Name
|
||||
StringToDouble(L3TxBx.Text, dVal)
|
||||
StringToLen(L3TxBx.Text, dVal)
|
||||
Case R1Btn.Name
|
||||
StringToDouble(R1TxBx.Text, dVal)
|
||||
Case R2Btn.Name
|
||||
|
||||
+20
-20
@@ -59,8 +59,8 @@ Public Class MultipleCut
|
||||
m_bPointP1Ok = False
|
||||
'SawTipTxBl.Text = String.Empty
|
||||
' Assegno parametri di lavorazione già definiti
|
||||
DepthTxBx.Text = DoubleToString(m_dDepth, 1)
|
||||
LenghtTxBx.Text = DoubleToString(m_dLen, 1)
|
||||
DepthTxBx.Text = LenToString(m_dDepth, 1)
|
||||
LenghtTxBx.Text = LenToString(m_dLen, 1)
|
||||
' Origine tavola
|
||||
m_bRawOk = True
|
||||
If Not EgtGetTableRef(1, m_ptTabOri) Then
|
||||
@@ -166,8 +166,8 @@ Public Class MultipleCut
|
||||
EgtSetAxisPos(sR1, dR1)
|
||||
EgtSetAxisPos(sR2, dR2)
|
||||
' Visualizzo quote
|
||||
Dim sSawTip As String = "X" & DoubleToString(m_ptTipP1.x, 0) & " Y" & DoubleToString(m_ptTipP1.y, 0) &
|
||||
" Z" & DoubleToString(m_ptTipP1.z, 0) & " C" & DoubleToString(dR1, 0) &
|
||||
Dim sSawTip As String = "X" & LenToString(m_ptTipP1.x, 0) & " Y" & LenToString(m_ptTipP1.y, 0) &
|
||||
" Z" & LenToString(m_ptTipP1.z, 0) & " C" & DoubleToString(dR1, 0) &
|
||||
" B" & DoubleToString(dR2, 0)
|
||||
'SawTipTxBl.Text = sSawTip
|
||||
' Assegno angoli
|
||||
@@ -253,8 +253,8 @@ Public Class MultipleCut
|
||||
EgtSetAxisPos(sR1, dR1)
|
||||
EgtSetAxisPos(sR2, dR2)
|
||||
' Visualizzo quote
|
||||
Dim sSawTip As String = "X" & DoubleToString(m_ptTipP2.x, 0) & " Y" & DoubleToString(m_ptTipP2.y, 0) &
|
||||
" Z" & DoubleToString(m_ptTipP2.z, 0) & " C" & DoubleToString(dR1, 0) &
|
||||
Dim sSawTip As String = "X" & LenToString(m_ptTipP2.x, 0) & " Y" & LenToString(m_ptTipP2.y, 0) &
|
||||
" Z" & LenToString(m_ptTipP2.z, 0) & " C" & DoubleToString(dR1, 0) &
|
||||
" B" & DoubleToString(dR2, 0)
|
||||
'SawTipTxBl.Text = sSawTip
|
||||
' Assegno angolo verticale da direzione utensile
|
||||
@@ -270,7 +270,7 @@ Public Class MultipleCut
|
||||
Dim dAngOrizzDeg As Double
|
||||
vtDiff.ToSpherical(dLen, dAngVertDeg, dAngOrizzDeg)
|
||||
If dLen > EPS_SMALL Then
|
||||
LenghtTxBx.Text = DoubleToString(dLen, 1)
|
||||
LenghtTxBx.Text = LenToString(dLen, 1)
|
||||
m_dAngO = dAngOrizzDeg
|
||||
DirectionTxBx.Text = DoubleToString(dAngOrizzDeg, 2)
|
||||
Create2PointsMultipleCut()
|
||||
@@ -289,7 +289,7 @@ Public Class MultipleCut
|
||||
' Verifico che l'affondamento impostato non sia superiore a quello massimo
|
||||
Dim dMaxDepth = m_ptRawMax.z - m_ptRawMin.z + MAX_TAB_DEPTH
|
||||
Dim dDepth As Double = 0
|
||||
StringToDouble(DepthTxBx.Text, dDepth)
|
||||
StringToLen(DepthTxBx.Text, dDepth)
|
||||
If dDepth < 0 Then
|
||||
m_dDepth = 0
|
||||
ElseIf dDepth > dMaxDepth Then
|
||||
@@ -297,7 +297,7 @@ Public Class MultipleCut
|
||||
Else
|
||||
m_dDepth = dDepth
|
||||
End If
|
||||
DepthTxBx.Text = DoubleToString(m_dDepth, 2)
|
||||
DepthTxBx.Text = LenToString(m_dDepth, 2)
|
||||
' Disegno il taglio
|
||||
CreateMultipleCut()
|
||||
EgtDraw()
|
||||
@@ -306,13 +306,13 @@ Public Class MultipleCut
|
||||
Private Sub LenghtTxBx_EgtClosed(sender As Object, e As EventArgs) Handles LenghtTxBx.EgtClosed
|
||||
' Verifico che la lunghezza del taglio impostata non sia inferiore a quella minima
|
||||
Dim dLenght As Double = 0
|
||||
StringToDouble(LenghtTxBx.Text, dLenght)
|
||||
StringToLen(LenghtTxBx.Text, dLenght)
|
||||
If dLenght < MIN_CUT_LEN Then
|
||||
m_dLen = MIN_CUT_LEN
|
||||
Else
|
||||
m_dLen = dLenght
|
||||
End If
|
||||
LenghtTxBx.Text = DoubleToString(m_dLen, 2)
|
||||
LenghtTxBx.Text = LenToString(m_dLen, 2)
|
||||
' Disegno il taglio
|
||||
CreateMultipleCut()
|
||||
EgtDraw()
|
||||
@@ -381,7 +381,7 @@ Public Class MultipleCut
|
||||
Return False
|
||||
End If
|
||||
' Spessore grezzo
|
||||
Dim dRawHeight As Integer = m_ptRawMax.z - m_ptRawMin.z
|
||||
Dim dRawHeight As Double = m_ptRawMax.z - m_ptRawMin.z
|
||||
' Rimuovo eventuale vecchio pezzo per taglio diretto
|
||||
EraseDirectCutPart()
|
||||
' Disattivo eventuali lavorazioni presenti
|
||||
@@ -396,8 +396,8 @@ Public Class MultipleCut
|
||||
ptStart.z = 0
|
||||
Dim nCutId = EgtCreateLinePDL(nLayerId, ptStart, m_dAngO, m_dLen)
|
||||
' Imposto affondamento e angolo di fianco sul taglio
|
||||
EgtSetInfo(nCutId, "Depth", m_dDepth)
|
||||
EgtSetInfo(nCutId, "SideAng", m_dAngV)
|
||||
EgtSetInfo(nCutId, "Depth", DoubleToString(m_dDepth, 3))
|
||||
EgtSetInfo(nCutId, "SideAng", DoubleToString(m_dAngV, 3))
|
||||
' Funzione che crea i tagli successivi al primo
|
||||
MultiplyCut(nLayerId, nCutId)
|
||||
' Creo layer per crocetta di riferimento
|
||||
@@ -424,7 +424,7 @@ Public Class MultipleCut
|
||||
Return False
|
||||
End If
|
||||
' Spessore grezzo
|
||||
Dim dRawHeight As Integer = m_ptRawMax.z - m_ptRawMin.z
|
||||
Dim dRawHeight As Double = m_ptRawMax.z - m_ptRawMin.z
|
||||
' Rimuovo eventuale vecchio pezzo per taglio diretto
|
||||
EraseDirectCutPart()
|
||||
' Disattivo eventuali lavorazioni presenti
|
||||
@@ -442,8 +442,8 @@ Public Class MultipleCut
|
||||
ptEnd.z = 0
|
||||
Dim nCutId = EgtCreateLine(nLayerId, ptStart, ptEnd)
|
||||
' Imposto affondamento e angolo di fianco sul taglio
|
||||
EgtSetInfo(nCutId, "Depth", m_dDepth)
|
||||
EgtSetInfo(nCutId, "SideAng", m_dAngV)
|
||||
EgtSetInfo(nCutId, "Depth", DoubleToString(m_dDepth, 3))
|
||||
EgtSetInfo(nCutId, "SideAng", DoubleToString(m_dAngV, 3))
|
||||
' Funzione che crea i tagli successivi al primo
|
||||
MultiplyCut(nLayerId, nCutId)
|
||||
' Creo layer per crocette di riferimento
|
||||
@@ -479,7 +479,7 @@ Public Class MultipleCut
|
||||
' Calcolo primo vettore di spostamento
|
||||
Dim dDimPz1 As Double
|
||||
Dim nNumPz1 As Integer
|
||||
StringToDouble(DimPz1TxBx.Text, dDimPz1)
|
||||
StringToLen(DimPz1TxBx.Text, dDimPz1)
|
||||
StringToDouble(NumPz1TxBx.Text, nNumPz1)
|
||||
If dDimPz1 <> 0 And nNumPz1 > 0 Then
|
||||
vtDelta = Vector3d.FromPolar((dDimPz1 + dThick), m_dAngO)
|
||||
@@ -495,7 +495,7 @@ Public Class MultipleCut
|
||||
' Calcolo secondo vettore di spostamento
|
||||
Dim dDimPz2 As Double
|
||||
Dim nNumPz2 As Integer
|
||||
StringToDouble(DimPz2TxBx.Text, dDimPz2)
|
||||
StringToLen(DimPz2TxBx.Text, dDimPz2)
|
||||
StringToDouble(NumPz2TxBx.Text, nNumPz2)
|
||||
If dDimPz2 <> 0 And nNumPz2 > 0 Then
|
||||
vtDelta = Vector3d.FromPolar((dDimPz2 + dThick), m_dAngO)
|
||||
@@ -511,7 +511,7 @@ Public Class MultipleCut
|
||||
' Calcolo terzo vettore di spostamento
|
||||
Dim dDimPz3 As Double
|
||||
Dim nNumPz3 As Integer
|
||||
StringToDouble(DimPz3TxBx.Text, dDimPz3)
|
||||
StringToLen(DimPz3TxBx.Text, dDimPz3)
|
||||
StringToDouble(NumPz3TxBx.Text, nNumPz3)
|
||||
If dDimPz3 <> 0 And nNumPz3 > 0 Then
|
||||
vtDelta = Vector3d.FromPolar((dDimPz3 + dThick), m_dAngO)
|
||||
|
||||
+11
-11
@@ -65,13 +65,13 @@ Public Class NestPageUC
|
||||
End If
|
||||
' carico e calcolo i parametri di movimento e drag
|
||||
m_dStep = GetPrivateProfileDouble(S_NEST, K_STEP, 10, m_MainWindow.GetIniFile())
|
||||
StepMoveTxBx.Text = DoubleToString(m_dStep, 3)
|
||||
StepMoveTxBx.Text = LenToString(m_dStep, 3)
|
||||
m_dMaxStep = Math.Max(m_ptRawMax.x - m_ptRawMin.x, m_ptRawMax.y - m_ptRawMin.y)
|
||||
m_dAngStep = GetPrivateProfileDouble(S_NEST, K_ANGSTEP, 15, m_MainWindow.GetIniFile())
|
||||
RotationAngleTxBx.Text = DoubleToString(m_dAngStep, 2)
|
||||
m_bReducedCut = GetPrivateProfileInt(S_NEST, K_REDUCEDCUT, 0, m_MainWindow.GetIniFile())
|
||||
m_nRestRadius = GetPrivateProfileInt(S_NEST, K_RESTRADIUS, 3, m_MainWindow.GetIniFile())
|
||||
m_dSnapDist = GetPrivateProfileDouble(S_NEST, K_SNAPDIST, 50, m_MainWindow.GetIniFile())
|
||||
m_bReducedCut = (GetPrivateProfileInt(S_MACH_NEST, K_MACH_REDUCEDCUT, 0, m_MainWindow.GetMachIniFile()) <> 0)
|
||||
End Sub
|
||||
|
||||
Public Sub CalcRawPart()
|
||||
@@ -114,7 +114,7 @@ Public Class NestPageUC
|
||||
Else
|
||||
EgtSelectObj(nPartId)
|
||||
' Set flag posizione selezionati
|
||||
m_nPartPos = IIf(bPartInTable, PART_POS.IN_TABLE, PART_POS.OUT_TABLE)
|
||||
m_nPartPos = If(bPartInTable, PART_POS.IN_TABLE, PART_POS.OUT_TABLE)
|
||||
End If
|
||||
EgtDraw()
|
||||
' Drag possibile
|
||||
@@ -220,7 +220,7 @@ Public Class NestPageUC
|
||||
End Sub
|
||||
|
||||
Private Sub UpBtn_Click(sender As Object, e As RoutedEventArgs) Handles UpBtn.Click
|
||||
Dim dStep As Double = IIf(m_bMaximizeMove, m_dMaxStep, m_dStep)
|
||||
Dim dStep As Double = If(m_bMaximizeMove, m_dMaxStep, m_dStep)
|
||||
EgtMoveSelectedPartCluster(m_bReducedCut, New Vector3d(0, dStep, 0), m_ptRawMin.x + m_dKerf, m_ptRawMin.y + m_dKerf,
|
||||
m_ptRawMax.x - m_dKerf, m_ptRawMax.y - m_dKerf)
|
||||
EgtSaveCollInfo()
|
||||
@@ -241,7 +241,7 @@ Public Class NestPageUC
|
||||
End Sub
|
||||
|
||||
Private Sub DownBtn_Click(sender As Object, e As RoutedEventArgs) Handles DownBtn.Click
|
||||
Dim dStep As Double = IIf(m_bMaximizeMove, m_dMaxStep, m_dStep)
|
||||
Dim dStep As Double = If(m_bMaximizeMove, m_dMaxStep, m_dStep)
|
||||
EgtMoveSelectedPartCluster(m_bReducedCut, New Vector3d(0, -dStep, 0), m_ptRawMin.x + m_dKerf, m_ptRawMin.y + m_dKerf,
|
||||
m_ptRawMax.x - m_dKerf, m_ptRawMax.y - m_dKerf)
|
||||
EgtSaveCollInfo()
|
||||
@@ -262,7 +262,7 @@ Public Class NestPageUC
|
||||
End Sub
|
||||
|
||||
Private Sub RightBtn_Click(sender As Object, e As RoutedEventArgs) Handles RightBtn.Click
|
||||
Dim dStep As Double = IIf(m_bMaximizeMove, m_dMaxStep, m_dStep)
|
||||
Dim dStep As Double = If(m_bMaximizeMove, m_dMaxStep, m_dStep)
|
||||
EgtMoveSelectedPartCluster(m_bReducedCut, New Vector3d(dStep, 0, 0), m_ptRawMin.x + m_dKerf, m_ptRawMin.y + m_dKerf,
|
||||
m_ptRawMax.x - m_dKerf, m_ptRawMax.y - m_dKerf)
|
||||
EgtSaveCollInfo()
|
||||
@@ -283,7 +283,7 @@ Public Class NestPageUC
|
||||
End Sub
|
||||
|
||||
Private Sub LeftBtn_Click(sender As Object, e As RoutedEventArgs) Handles LeftBtn.Click
|
||||
Dim dStep As Double = IIf(m_bMaximizeMove, m_dMaxStep, m_dStep)
|
||||
Dim dStep As Double = If(m_bMaximizeMove, m_dMaxStep, m_dStep)
|
||||
EgtMoveSelectedPartCluster(m_bReducedCut, New Vector3d(-dStep, 0, 0), m_ptRawMin.x + m_dKerf, m_ptRawMin.y + m_dKerf,
|
||||
m_ptRawMax.x - m_dKerf, m_ptRawMax.y - m_dKerf)
|
||||
EgtSaveCollInfo()
|
||||
@@ -354,7 +354,7 @@ Public Class NestPageUC
|
||||
nId = nNextId
|
||||
End While
|
||||
' Aggiorno flag selezionati
|
||||
m_nPartPos = IIf(EgtGetSelectedObjCount() > 0, PART_POS.IN_TABLE, PART_POS.NONE_TABLE)
|
||||
m_nPartPos = If(EgtGetSelectedObjCount() > 0, PART_POS.IN_TABLE, PART_POS.NONE_TABLE)
|
||||
' Aggiorno vista
|
||||
EgtZoom(ZM.ALL)
|
||||
End Sub
|
||||
@@ -389,7 +389,7 @@ Public Class NestPageUC
|
||||
While nPartId <> GDB_ID.NULL
|
||||
' Recupero il layer preview del pezzo e ne imposto lo stato di visualizzazione
|
||||
Dim nPvId As Integer = EgtGetFirstNameInGroup(nPartId, NAME_PREVIEW)
|
||||
EgtSetStatus(nPvId, IIf(bShow, GDB_ST.ON_, GDB_ST.OFF))
|
||||
EgtSetStatus(nPvId, If(bShow, GDB_ST.ON_, GDB_ST.OFF))
|
||||
' Passo al pezzo successivo
|
||||
nPartId = EgtGetNextPartInRawPart(nPartId)
|
||||
End While
|
||||
@@ -467,7 +467,7 @@ Public Class NestPageUC
|
||||
nPartId = EgtGetNextGroup(nPartId)
|
||||
End While
|
||||
' Aggiorno flag
|
||||
m_nPartPos = IIf(EgtGetSelectedObjCount() > 0, PART_POS.IN_TABLE, PART_POS.NONE_TABLE)
|
||||
m_nPartPos = If(EgtGetSelectedObjCount() > 0, PART_POS.IN_TABLE, PART_POS.NONE_TABLE)
|
||||
' Se già selezionati in parcheggio
|
||||
ElseIf m_nPartPos = PART_POS.OUT_TABLE Then
|
||||
' Seleziono tutti i pezzi in parcheggio
|
||||
@@ -492,7 +492,7 @@ Public Class NestPageUC
|
||||
|
||||
Private Sub StepMoveTxBx_EgtClosed(sender As Object, e As EventArgs) Handles StepMoveTxBx.EgtClosed
|
||||
Dim dStep As Double
|
||||
If StringToDouble(StepMoveTxBx.Text, dStep) Then
|
||||
If StringToLen(StepMoveTxBx.Text, dStep) Then
|
||||
m_dStep = Math.Max(dStep, 2 * EPS_SMALL)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
@@ -156,9 +156,6 @@
|
||||
<Compile Include="GridCut.xaml.vb">
|
||||
<DependentUpon>GridCut.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Keyboard.xaml.vb">
|
||||
<DependentUpon>Keyboard.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="MachineButtonsUC.xaml.vb">
|
||||
<DependentUpon>MachineButtonsUC.xaml</DependentUpon>
|
||||
</Compile>
|
||||
@@ -276,10 +273,6 @@
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="Keyboard.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="MachineButtonsUC.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
|
||||
@@ -888,11 +888,6 @@
|
||||
<EventSetter Event="TextChanged" Handler="NumericKeyboard_TextChanged" />
|
||||
</Style>
|
||||
|
||||
<Style TargetType="{x:Type TextBox}" x:Key="Keyboard">
|
||||
<Setter Property="IsReadOnly" Value="True"/>
|
||||
<EventSetter Event="PreviewMouseDown" Handler="Keyboard_PreviewMouseDown"/>
|
||||
</Style>
|
||||
|
||||
<!-- *************************************************************************** -->
|
||||
|
||||
<!-- ** LISTBOX ** -->
|
||||
|
||||
@@ -22,25 +22,6 @@
|
||||
NumericKeyboardWD.ShowDialog()
|
||||
End Sub
|
||||
|
||||
' Evento della TextBox con Style che permette di aprire in automatico la tastiera
|
||||
Friend Sub Keyboard_PreviewMouseDown(sender As Object, e As MouseButtonEventArgs)
|
||||
' Recupero dati da sorgente
|
||||
Dim sTitle As String = String.Empty
|
||||
Dim sText As String = String.Empty
|
||||
Dim TxBx As TextBox = CType(e.Source, TextBox)
|
||||
If Not IsNothing(TxBx) Then
|
||||
sText = TxBx.Text
|
||||
Dim AssocLabel As Label = TxBx.Tag
|
||||
If Not IsNothing(AssocLabel) Then
|
||||
sTitle = AssocLabel.Content
|
||||
End If
|
||||
End If
|
||||
' Creo tastiera
|
||||
Dim Keyboard As New Keyboard(sTitle, sText, e.Source)
|
||||
' La visualizzo
|
||||
Keyboard.ShowDialog()
|
||||
End Sub
|
||||
|
||||
' Evento della TextBox con Style che permette di aggiornare in automatico il componente con il nuovo valore
|
||||
Private Sub NumericKeyboard_TextChanged(sender As Object, e As TextChangedEventArgs)
|
||||
Select Case m_MainWindow.m_ActivePage
|
||||
|
||||
+27
-1
@@ -10,7 +10,8 @@
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="5*"/>
|
||||
<ColumnDefinition Width="10*"/>
|
||||
<ColumnDefinition Width="3*"/>
|
||||
<ColumnDefinition Width="7*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="2.5*"/>
|
||||
@@ -44,6 +45,31 @@
|
||||
|
||||
</GroupBox>
|
||||
|
||||
<GroupBox Name="UnitsOfMeasureGpBx" Grid.Column="1" Style="{StaticResource OmagCut_GroupBox}">
|
||||
<Grid >
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
<ColumnDefinition Width="4*"/>
|
||||
<ColumnDefinition Width="0.5*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="0.5*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<ComboBox Name="UnitsOfMeasureCmBx" Grid.Column="1" Grid.Row="1">
|
||||
<ComboBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Label Content="{Binding}" FontSize="20" />
|
||||
</DataTemplate>
|
||||
</ComboBox.ItemTemplate>
|
||||
</ComboBox>
|
||||
|
||||
</Grid>
|
||||
|
||||
</GroupBox>
|
||||
|
||||
</Grid>
|
||||
|
||||
</UserControl>
|
||||
|
||||
+18
-2
@@ -4,16 +4,25 @@ Public Class OptionsPageUC
|
||||
|
||||
Dim m_MainWindow As MainWindow = Application.Current.MainWindow
|
||||
|
||||
Private UnitsList() As String = {"inch", "mm"}
|
||||
|
||||
Private Sub OptionsPageUC_Initialized(sender As Object, e As EventArgs) Handles Me.Initialized
|
||||
|
||||
'Associazione della lista materiali alla combobox
|
||||
' Associazione della lista linguaggi alla combobox
|
||||
LanguageCmBx.ItemsSource = m_MainWindow.m_LanguagesList
|
||||
' Associazione della lista unità di misura alla combobox
|
||||
UnitsOfMeasureCmBx.ItemsSource = UnitsList
|
||||
|
||||
'Imposto la lingua corrente
|
||||
' Imposto la lingua corrente
|
||||
LanguageCmBx.SelectedItem = m_MainWindow.m_CurrLanguage
|
||||
|
||||
' Imposto l'unità di misura corrente
|
||||
UnitsOfMeasureCmBx.SelectedIndex = If(EgtUiUnitsAreMM(), 1, 0)
|
||||
|
||||
' Messaggi
|
||||
LanguageGpBx.Header = EgtMsg(MSG_OPTIONSPAGEUC + 1)
|
||||
LanguageMsgTxBl.Text = EgtMsg(MSG_OPTIONSPAGEUC + 2)
|
||||
UnitsOfMeasureGpBx.Header = EgtMsg(MSG_OPTIONSPAGEUC + 3)
|
||||
End Sub
|
||||
|
||||
Private Sub LanguageCmBx_SelectionChanged(sender As Object, e As SelectionChangedEventArgs) Handles LanguageCmBx.SelectionChanged
|
||||
@@ -21,4 +30,11 @@ Public Class OptionsPageUC
|
||||
WritePrivateProfileString(S_GENERAL, K_MESSAGES, m_MainWindow.m_CurrLanguage.LanguageName, m_MainWindow.GetIniFile())
|
||||
End Sub
|
||||
|
||||
Private Sub UnitsOfMeasureCmBx_SelectionChanged(sender As Object, e As SelectionChangedEventArgs) Handles UnitsOfMeasureCmBx.SelectionChanged
|
||||
Dim bMM As Boolean = (UnitsOfMeasureCmBx.SelectedIndex <> 0)
|
||||
EgtSetUiUnits(bMM)
|
||||
m_MainWindow.m_CurrentProjectPageUC.UpdateHeightTxBx()
|
||||
WritePrivateProfileString(S_GENERAL, K_MMUNITS, If(bMM, 1, 0), m_MainWindow.GetIniFile())
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
+38
-38
@@ -106,12 +106,12 @@ Public Class RawPartPageUC
|
||||
RectangleBtn.IsChecked = True
|
||||
' Assegno dati grezzo rettangolare ai textbox
|
||||
m_bShowVar = True
|
||||
LengthTxBx.Text = DoubleToString(m_RawLength, 2)
|
||||
WidthTxBx.Text = DoubleToString(m_RawWidth, 2)
|
||||
HeightTxBx.Text = DoubleToString(m_RawHeight, 2)
|
||||
OffsetXTxBx.Text = DoubleToString(m_RawOffsX, 2)
|
||||
OffsetYTxBx.Text = DoubleToString(m_RawOffsY, 2)
|
||||
KerfTxBx.Text = DoubleToString(m_RawKerf, 2)
|
||||
LengthTxBx.Text = LenToString(m_RawLength, 2)
|
||||
WidthTxBx.Text = LenToString(m_RawWidth, 2)
|
||||
HeightTxBx.Text = LenToString(m_RawHeight, 2)
|
||||
OffsetXTxBx.Text = LenToString(m_RawOffsX, 2)
|
||||
OffsetYTxBx.Text = LenToString(m_RawOffsY, 2)
|
||||
KerfTxBx.Text = LenToString(m_RawKerf, 2)
|
||||
m_bShowVar = False
|
||||
' Aggiorno grezzo
|
||||
UpdateRawPart()
|
||||
@@ -178,8 +178,8 @@ Public Class RawPartPageUC
|
||||
m_RawOffsX += vtMove.x
|
||||
m_RawOffsY += vtMove.y
|
||||
m_bShowVar = True
|
||||
OffsetXTxBx.Text = DoubleToString(m_RawOffsX, 2)
|
||||
OffsetYTxBx.Text = DoubleToString(m_RawOffsY, 2)
|
||||
OffsetXTxBx.Text = LenToString(m_RawOffsX, 2)
|
||||
OffsetYTxBx.Text = LenToString(m_RawOffsY, 2)
|
||||
m_bShowVar = False
|
||||
End If
|
||||
' se sposto lato sotto
|
||||
@@ -195,8 +195,8 @@ Public Class RawPartPageUC
|
||||
EgtMoveRawPart(m_CurrProjPage.m_nRawId, vtMove)
|
||||
EgtDraw()
|
||||
m_bShowVar = True
|
||||
WidthTxBx.Text = DoubleToString(m_RawWidth, 2)
|
||||
OffsetYTxBx.Text = DoubleToString(m_RawOffsY, 2)
|
||||
WidthTxBx.Text = LenToString(m_RawWidth, 2)
|
||||
OffsetYTxBx.Text = LenToString(m_RawOffsY, 2)
|
||||
m_bShowVar = False
|
||||
End If
|
||||
' se sposto lato a destra
|
||||
@@ -210,7 +210,7 @@ Public Class RawPartPageUC
|
||||
UpdateRawPartKerf()
|
||||
EgtDraw()
|
||||
m_bShowVar = True
|
||||
LengthTxBx.Text = DoubleToString(m_RawLength, 2)
|
||||
LengthTxBx.Text = LenToString(m_RawLength, 2)
|
||||
m_bShowVar = False
|
||||
End If
|
||||
' se sposto lato sopra
|
||||
@@ -224,7 +224,7 @@ Public Class RawPartPageUC
|
||||
UpdateRawPartKerf()
|
||||
EgtDraw()
|
||||
m_bShowVar = True
|
||||
WidthTxBx.Text = DoubleToString(m_RawWidth, 2)
|
||||
WidthTxBx.Text = LenToString(m_RawWidth, 2)
|
||||
m_bShowVar = False
|
||||
End If
|
||||
' se sposto lato a sinistra
|
||||
@@ -240,8 +240,8 @@ Public Class RawPartPageUC
|
||||
EgtMoveRawPart(m_CurrProjPage.m_nRawId, vtMove)
|
||||
EgtDraw()
|
||||
m_bShowVar = True
|
||||
LengthTxBx.Text = DoubleToString(m_RawLength, 2)
|
||||
OffsetXTxBx.Text = DoubleToString(m_RawOffsX, 2)
|
||||
LengthTxBx.Text = LenToString(m_RawLength, 2)
|
||||
OffsetXTxBx.Text = LenToString(m_RawOffsX, 2)
|
||||
m_bShowVar = False
|
||||
End If
|
||||
End If
|
||||
@@ -273,8 +273,8 @@ Public Class RawPartPageUC
|
||||
ShowParkedParts()
|
||||
' Imposto spessore del grezzo
|
||||
m_CurrProjPage.m_dRawHeight = GetRawHeight()
|
||||
m_CurrProjPage.HeightTxBx.Text = DoubleToString(m_RawHeight, 2)
|
||||
' Salvo nel file Ini le dimensioni del grezzo
|
||||
m_CurrProjPage.UpdateHeightTxBx()
|
||||
' Salvo nel file Ini le dimensioni del grezzo (sempre in mm)
|
||||
WritePrivateProfileString(S_RAWPART, K_RAWLENGTH, DoubleToString(m_RawLength, 2), m_MainWindow.GetIniFile())
|
||||
WritePrivateProfileString(S_RAWPART, K_RAWWIDTH, DoubleToString(m_RawWidth, 2), m_MainWindow.GetIniFile())
|
||||
WritePrivateProfileString(S_RAWPART, K_RAWHEIGHT, DoubleToString(m_RawHeight, 2), m_MainWindow.GetIniFile())
|
||||
@@ -322,7 +322,7 @@ Public Class RawPartPageUC
|
||||
If bHeightModified And m_CurrProjPage.GetPhoto() <> GDB_ID.NULL Then
|
||||
' Aggiorno spessore in progetto corrente
|
||||
m_CurrProjPage.m_dRawHeight = m_RawHeight
|
||||
m_CurrProjPage.HeightTxBx.Text = DoubleToString(m_RawHeight, 2)
|
||||
m_CurrProjPage.UpdateHeightTxBx()
|
||||
' Ricarico fotografia
|
||||
Dim sPath As String = String.Empty
|
||||
EgtGetPhotoPath(m_CurrProjPage.GetPhoto(), sPath)
|
||||
@@ -397,7 +397,7 @@ Public Class RawPartPageUC
|
||||
Dim Col As New Color3d(255, 0, 0, 100)
|
||||
GetPrivateProfileColor(S_RAWPART, K_KERFCOLOR, Col, m_MainWindow.GetIniFile())
|
||||
EgtSetColor(nKerfId, Col)
|
||||
' Salvo il nuovo valore
|
||||
' Salvo il nuovo valore (sempre in mm)
|
||||
EgtSetInfo(m_CurrProjPage.m_nRawId, KEY_KERF, DoubleToString(m_RawKerf, 4))
|
||||
Return True
|
||||
End Function
|
||||
@@ -442,7 +442,7 @@ Public Class RawPartPageUC
|
||||
|
||||
Private Sub LengthTxBx_EgtClosed(sender As Object, e As EventArgs) Handles LengthTxBx.EgtClosed
|
||||
Dim dLength As Double
|
||||
If Not StringToDouble(LengthTxBx.Text, dLength) Or dLength < EPS_SMALL Then
|
||||
If Not StringToLen(LengthTxBx.Text, dLength) Or dLength < EPS_SMALL Then
|
||||
Return
|
||||
End If
|
||||
Dim dMaxLen = m_TableLength - m_RawOffsX - m_RawKerf
|
||||
@@ -451,14 +451,14 @@ Public Class RawPartPageUC
|
||||
m_RawLength = dLength
|
||||
UpdateRawPart()
|
||||
Else
|
||||
LengthTxBx.Text = DoubleToString(m_RawLength, 2)
|
||||
m_CurrProjPage.SetErrorMessage(EgtMsg(MSG_RAWPARTPAGEUC + 16) & " " & DoubleToString(dMaxLen, 2)) 'Massima lunghezza =
|
||||
LengthTxBx.Text = LenToString(m_RawLength, 2)
|
||||
m_CurrProjPage.SetErrorMessage(EgtMsg(MSG_RAWPARTPAGEUC + 16) & " " & LenToString(dMaxLen, 2)) 'Massima lunghezza =
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub WidthTxBx_EgtClosed(sender As Object, e As EventArgs) Handles WidthTxBx.EgtClosed
|
||||
Dim dWidth As Double
|
||||
If Not StringToDouble(WidthTxBx.Text, dWidth) Or dWidth < EPS_SMALL Then
|
||||
If Not StringToLen(WidthTxBx.Text, dWidth) Or dWidth < EPS_SMALL Then
|
||||
Return
|
||||
End If
|
||||
Dim dMaxWidth = m_TableWidth - m_RawOffsY - m_RawKerf
|
||||
@@ -467,14 +467,14 @@ Public Class RawPartPageUC
|
||||
m_RawWidth = dWidth
|
||||
UpdateRawPart()
|
||||
Else
|
||||
WidthTxBx.Text = DoubleToString(m_RawWidth, 2)
|
||||
m_CurrProjPage.SetErrorMessage(EgtMsg(MSG_RAWPARTPAGEUC + 17) & " " & DoubleToString(dMaxWidth, 2)) 'Massima larghezza =
|
||||
WidthTxBx.Text = LenToString(m_RawWidth, 2)
|
||||
m_CurrProjPage.SetErrorMessage(EgtMsg(MSG_RAWPARTPAGEUC + 17) & " " & LenToString(dMaxWidth, 2)) 'Massima larghezza =
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub HeightTxBx_EgtClosed(sender As Object, e As EventArgs) Handles HeightTxBx.EgtClosed
|
||||
Dim dHeight As Double
|
||||
If Not StringToDouble(HeightTxBx.Text, dHeight) Then
|
||||
If Not StringToLen(HeightTxBx.Text, dHeight) Then
|
||||
Return
|
||||
End If
|
||||
If dHeight > -EPS_ZERO Then
|
||||
@@ -484,14 +484,14 @@ Public Class RawPartPageUC
|
||||
UpdateRawPart(True)
|
||||
End If
|
||||
Else
|
||||
HeightTxBx.Text = DoubleToString(m_RawHeight, 2)
|
||||
m_CurrProjPage.SetErrorMessage(EgtMsg(MSG_RAWPARTPAGEUC + 18)) 'Non sono ammesse altezze negative
|
||||
HeightTxBx.Text = LenToString(m_RawHeight, 2)
|
||||
m_CurrProjPage.SetErrorMessage(EgtMsg(MSG_RAWPARTPAGEUC + 18)) 'Non sono ammessi spessori negativi
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub OffsetXTxBx_EgtClosed(sender As Object, e As EventArgs) Handles OffsetXTxBx.EgtClosed
|
||||
Dim dOffsetX As Double
|
||||
If Not StringToDouble(OffsetXTxBx.Text, dOffsetX) Then
|
||||
If Not StringToLen(OffsetXTxBx.Text, dOffsetX) Then
|
||||
Return
|
||||
End If
|
||||
Dim dMinOffsetX = m_RawKerf
|
||||
@@ -499,14 +499,14 @@ Public Class RawPartPageUC
|
||||
m_RawOffsX = dOffsetX
|
||||
UpdateRawPart()
|
||||
Else
|
||||
OffsetXTxBx.Text = DoubleToString(m_RawOffsX, 2)
|
||||
m_CurrProjPage.SetErrorMessage(EgtMsg(MSG_RAWPARTPAGEUC + 19) & " " & DoubleToString(dMinOffsetX, 2)) 'Minimo offset X =
|
||||
OffsetXTxBx.Text = LenToString(m_RawOffsX, 2)
|
||||
m_CurrProjPage.SetErrorMessage(EgtMsg(MSG_RAWPARTPAGEUC + 19) & " " & LenToString(dMinOffsetX, 2)) 'Minimo offset X =
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub OffsetYTxBx_EgtClosed(sender As Object, e As EventArgs) Handles OffsetYTxBx.EgtClosed
|
||||
Dim dOffsetY As Double
|
||||
If Not StringToDouble(OffsetYTxBx.Text, dOffsetY) Then
|
||||
If Not StringToLen(OffsetYTxBx.Text, dOffsetY) Then
|
||||
Return
|
||||
End If
|
||||
Dim dMinOffsetY = m_RawKerf
|
||||
@@ -514,14 +514,14 @@ Public Class RawPartPageUC
|
||||
m_RawOffsY = dOffsetY
|
||||
UpdateRawPart()
|
||||
Else
|
||||
OffsetYTxBx.Text = DoubleToString(m_RawOffsY, 2)
|
||||
m_CurrProjPage.SetErrorMessage(EgtMsg(MSG_RAWPARTPAGEUC + 20) & " " & DoubleToString(dMinOffsetY, 2)) 'Minimo offset Y =
|
||||
OffsetYTxBx.Text = LenToString(m_RawOffsY, 2)
|
||||
m_CurrProjPage.SetErrorMessage(EgtMsg(MSG_RAWPARTPAGEUC + 20) & " " & LenToString(dMinOffsetY, 2)) 'Minimo offset Y =
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub KerfTxBx_EgtClosed(sender As Object, e As EventArgs) Handles KerfTxBx.EgtClosed
|
||||
Dim dKerf As Double
|
||||
If Not StringToDouble(KerfTxBx.Text, dKerf) Then
|
||||
If Not StringToLen(KerfTxBx.Text, dKerf) Then
|
||||
Return
|
||||
End If
|
||||
Dim dMinKerf = 0
|
||||
@@ -531,11 +531,11 @@ Public Class RawPartPageUC
|
||||
m_RawKerf = dKerf
|
||||
UpdateRawPart()
|
||||
ElseIf dKerf < dMinKerf Then
|
||||
KerfTxBx.Text = DoubleToString(m_RawKerf, 2)
|
||||
m_CurrProjPage.SetErrorMessage(EgtMsg(MSG_RAWPARTPAGEUC + 21) & " " & DoubleToString(dMinKerf, 2)) 'Minimo kerf =
|
||||
KerfTxBx.Text = LenToString(m_RawKerf, 2)
|
||||
m_CurrProjPage.SetErrorMessage(EgtMsg(MSG_RAWPARTPAGEUC + 21) & " " & LenToString(dMinKerf, 2)) 'Minimo kerf =
|
||||
Else
|
||||
KerfTxBx.Text = DoubleToString(m_RawKerf, 2)
|
||||
m_CurrProjPage.SetErrorMessage(EgtMsg(MSG_RAWPARTPAGEUC + 22) & " " & DoubleToString(dMaxKerf, 2)) 'Massimo kerf =
|
||||
KerfTxBx.Text = LenToString(m_RawKerf, 2)
|
||||
m_CurrProjPage.SetErrorMessage(EgtMsg(MSG_RAWPARTPAGEUC + 22) & " " & LenToString(dMaxKerf, 2)) 'Massimo kerf =
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
@@ -214,7 +214,7 @@ Public Class SimulationPageUC
|
||||
Dim dVal As Double = 0
|
||||
If EgtSimGetAxisInfoPos(nInd, sInfo, dVal) Then
|
||||
sName = sInfo
|
||||
sVal = DoubleToString(dVal, -3)
|
||||
sVal = If(nInd < 3, LenToString(dVal, -3), DoubleToString(dVal, -3))
|
||||
Return True
|
||||
Else
|
||||
sName = String.Empty
|
||||
@@ -229,7 +229,7 @@ Public Class SimulationPageUC
|
||||
If EgtSimGetMoveInfo(nG, dFeed) Then
|
||||
If nG <> 0 Then
|
||||
GCodeTxBl.Text = "G" & nG.ToString()
|
||||
FValueTxBl.Text = "F" & DoubleToString(dFeed, 0)
|
||||
FValueTxBl.Text = "F" & LenToString(dFeed, 0)
|
||||
Else
|
||||
GCodeTxBl.Text = "G" & nG.ToString()
|
||||
FValueTxBl.Text = ""
|
||||
|
||||
+17
-17
@@ -48,8 +48,8 @@ Public Class SingleCutUC
|
||||
m_bPointP1Ok = False
|
||||
SawTipTxBl.Text = String.Empty
|
||||
' Assegno parametri di lavorazione già definiti
|
||||
DepthTxBx.Text = DoubleToString(m_dDepth, 1)
|
||||
LenghtTxBx.Text = DoubleToString(m_dLen, 1)
|
||||
DepthTxBx.Text = LenToString(m_dDepth, 1)
|
||||
LenghtTxBx.Text = LenToString(m_dLen, 1)
|
||||
' Origine tavola
|
||||
m_bRawOk = True
|
||||
If Not EgtGetTableRef(1, m_ptTabOri) Then
|
||||
@@ -156,8 +156,8 @@ Public Class SingleCutUC
|
||||
EgtSetAxisPos(sR1, dR1)
|
||||
EgtSetAxisPos(sR2, dR2)
|
||||
' Visualizzo quote
|
||||
Dim sSawTip As String = "X" & DoubleToString(m_ptTipP1.x, 0) & " Y" & DoubleToString(m_ptTipP1.y, 0) &
|
||||
" Z" & DoubleToString(m_ptTipP1.z, 0) & " C" & DoubleToString(dR1, 0) &
|
||||
Dim sSawTip As String = "X" & LenToString(m_ptTipP1.x, 0) & " Y" & LenToString(m_ptTipP1.y, 0) &
|
||||
" Z" & LenToString(m_ptTipP1.z, 0) & " C" & DoubleToString(dR1, 0) &
|
||||
" B" & DoubleToString(dR2, 0)
|
||||
SawTipTxBl.Text = sSawTip
|
||||
' Assegno angoli
|
||||
@@ -244,8 +244,8 @@ Public Class SingleCutUC
|
||||
EgtSetAxisPos(sR1, dR1)
|
||||
EgtSetAxisPos(sR2, dR2)
|
||||
' Visualizzo quote
|
||||
Dim sSawTip As String = "X" & DoubleToString(m_ptTipP2.x, 0) & " Y" & DoubleToString(m_ptTipP2.y, 0) &
|
||||
" Z" & DoubleToString(m_ptTipP2.z, 0) & " C" & DoubleToString(dR1, 0) &
|
||||
Dim sSawTip As String = "X" & LenToString(m_ptTipP2.x, 0) & " Y" & LenToString(m_ptTipP2.y, 0) &
|
||||
" Z" & LenToString(m_ptTipP2.z, 0) & " C" & DoubleToString(dR1, 0) &
|
||||
" B" & DoubleToString(dR2, 0)
|
||||
SawTipTxBl.Text = sSawTip
|
||||
' Assegno angoli
|
||||
@@ -263,7 +263,7 @@ Public Class SingleCutUC
|
||||
If dLen > EPS_SMALL Then
|
||||
m_dLen = dLen
|
||||
m_dAngO = dAngOrizzDeg
|
||||
LenghtTxBx.Text = DoubleToString(m_dLen, 1)
|
||||
LenghtTxBx.Text = LenToString(m_dLen, 1)
|
||||
DirectionTxBx.Text = DoubleToString(m_dAngO, 2)
|
||||
Create2PointsCut()
|
||||
EgtShowOnlyTable(False)
|
||||
@@ -281,7 +281,7 @@ Public Class SingleCutUC
|
||||
' Verifico che l'affondamento impostato non sia superiore a quello massimo
|
||||
Dim dMaxDepth = m_ptRawMax.z - m_ptRawMin.z + MAX_TAB_DEPTH
|
||||
Dim dDepth As Double = 0
|
||||
StringToDouble(DepthTxBx.Text, dDepth)
|
||||
StringToLen(DepthTxBx.Text, dDepth)
|
||||
If dDepth < 0 Then
|
||||
m_dDepth = 0
|
||||
ElseIf dDepth > dMaxDepth Then
|
||||
@@ -289,7 +289,7 @@ Public Class SingleCutUC
|
||||
Else
|
||||
m_dDepth = dDepth
|
||||
End If
|
||||
DepthTxBx.Text = DoubleToString(m_dDepth, 2)
|
||||
DepthTxBx.Text = LenToString(m_dDepth, 2)
|
||||
' Disegno il taglio
|
||||
CreateSingleCut()
|
||||
EgtDraw()
|
||||
@@ -298,13 +298,13 @@ Public Class SingleCutUC
|
||||
Private Sub LenghtTxBx_EgtClosed(sender As Object, e As EventArgs) Handles LenghtTxBx.EgtClosed
|
||||
' Verifico che la lunghezza del taglio impostata non sia inferiore a quella minima
|
||||
Dim dLenght As Double = 0
|
||||
StringToDouble(LenghtTxBx.Text, dLenght)
|
||||
StringToLen(LenghtTxBx.Text, dLenght)
|
||||
If dLenght < MIN_CUT_LEN Then
|
||||
m_dLen = MIN_CUT_LEN
|
||||
Else
|
||||
m_dLen = dLenght
|
||||
End If
|
||||
LenghtTxBx.Text = DoubleToString(m_dLen, 2)
|
||||
LenghtTxBx.Text = LenToString(m_dLen, 2)
|
||||
' Disegno il taglio
|
||||
CreateSingleCut()
|
||||
EgtDraw()
|
||||
@@ -373,7 +373,7 @@ Public Class SingleCutUC
|
||||
Return False
|
||||
End If
|
||||
' Spessore grezzo
|
||||
Dim dRawHeight As Integer = m_ptRawMax.z - m_ptRawMin.z
|
||||
Dim dRawHeight As Double = m_ptRawMax.z - m_ptRawMin.z
|
||||
' Rimuovo eventuale vecchio pezzo per taglio diretto
|
||||
EraseDirectCutPart()
|
||||
' Disattivo eventuali lavorazioni presenti
|
||||
@@ -388,8 +388,8 @@ Public Class SingleCutUC
|
||||
ptStart.z = 0
|
||||
Dim nCutId = EgtCreateLinePDL(nLayerId, ptStart, m_dAngO, m_dLen)
|
||||
' Imposto affondamento e angolo di fianco sul taglio
|
||||
EgtSetInfo(nCutId, "Depth", m_dDepth)
|
||||
EgtSetInfo(nCutId, "SideAng", m_dAngV)
|
||||
EgtSetInfo(nCutId, "Depth", DoubleToString(m_dDepth, 3))
|
||||
EgtSetInfo(nCutId, "SideAng", DoubleToString(m_dAngV, 3))
|
||||
' Creo layer per crocetta di riferimento
|
||||
Dim nCrossLayerId = EgtCreateGroup(nPartId)
|
||||
' Aggiungo crocetta
|
||||
@@ -414,7 +414,7 @@ Public Class SingleCutUC
|
||||
Return False
|
||||
End If
|
||||
' Spessore grezzo
|
||||
Dim dRawHeight As Integer = m_ptRawMax.z - m_ptRawMin.z
|
||||
Dim dRawHeight As Double = m_ptRawMax.z - m_ptRawMin.z
|
||||
' Rimuovo eventuale vecchio pezzo per taglio diretto
|
||||
EraseDirectCutPart()
|
||||
' Disattivo eventuali lavorazioni presenti
|
||||
@@ -432,8 +432,8 @@ Public Class SingleCutUC
|
||||
ptEnd.z = 0
|
||||
Dim nCutId = EgtCreateLine(nLayerId, ptStart, ptEnd)
|
||||
' Imposto affondamento e angolo di fianco sul taglio
|
||||
EgtSetInfo(nCutId, "Depth", m_dDepth)
|
||||
EgtSetInfo(nCutId, "SideAng", m_dAngV)
|
||||
EgtSetInfo(nCutId, "Depth", DoubleToString(m_dDepth, 3))
|
||||
EgtSetInfo(nCutId, "SideAng", DoubleToString(m_dAngV, 3))
|
||||
' Creo layer per crocette di riferimento
|
||||
Dim nCrossLayerId = EgtCreateGroup(nPartId)
|
||||
' Aggiungo crocette
|
||||
|
||||
+2
-2
@@ -60,8 +60,8 @@
|
||||
|
||||
<UniformGrid Grid.Column="13" Rows="2">
|
||||
<TextBox Name="MDITxBx" TextWrapping="Wrap" Text="G24+ XYZ P1/0/0 Q0/1/0 R0/0/1"
|
||||
Style="{StaticResource Keyboard}"/>
|
||||
<TextBox Name="DULoadTxBx" Style="{StaticResource Keyboard}" Text="900.0" />
|
||||
/>
|
||||
<TextBox Name="DULoadTxBx" Text="900.0" />
|
||||
</UniformGrid>
|
||||
|
||||
</Grid>
|
||||
|
||||
+25
-23
@@ -351,11 +351,11 @@ Public Class ToolsDbPageUC
|
||||
EgtTdbGetCurrToolParam(MCH_TP.TCPOS, ToolString)
|
||||
TCPosTxBx.Text = ToolString
|
||||
EgtTdbGetCurrToolParam(MCH_TP.MAXMAT, ToolDouble)
|
||||
MaxMatTxBx.Text = ToolDouble
|
||||
MaxMatTxBx.Text = LenToString(ToolDouble, 3)
|
||||
EgtTdbGetCurrToolParam(MCH_TP.LONOFFSET, ToolDouble)
|
||||
LonOffsetTxBx.Text = ToolDouble
|
||||
LonOffsetTxBx.Text = LenToString(ToolDouble, 3)
|
||||
EgtTdbGetCurrToolParam(MCH_TP.RADOFFSET, ToolDouble)
|
||||
RadOffsetTxBx.Text = ToolDouble
|
||||
RadOffsetTxBx.Text = LenToString(ToolDouble, 3)
|
||||
EgtTdbGetCurrToolParam(MCH_TP.COOLANT, ToolInt)
|
||||
Dim ToolType As Integer
|
||||
EgtTdbGetCurrToolParam(MCH_TP.TYPE, ToolType)
|
||||
@@ -373,21 +373,21 @@ Public Class ToolsDbPageUC
|
||||
EgtTdbGetCurrToolParam(MCH_TP.CORR, ToolInt)
|
||||
CorrTxBx.Text = ToolInt
|
||||
EgtTdbGetCurrToolParam(MCH_TP.MAXSPEED, ToolDouble)
|
||||
MaxSpeedTxBx.Text = ToolDouble
|
||||
MaxSpeedTxBx.Text = DoubleToString(ToolDouble, 3)
|
||||
EgtTdbGetCurrToolParam(MCH_TP.SPEED, ToolDouble)
|
||||
SpeedTxBx.Text = ToolDouble
|
||||
SpeedTxBx.Text = DoubleToString(ToolDouble, 3)
|
||||
EgtTdbGetCurrToolParam(MCH_TP.FEED, ToolDouble)
|
||||
FeedTxBx.Text = ToolDouble
|
||||
FeedTxBx.Text = LenToString(ToolDouble, 3)
|
||||
EgtTdbGetCurrToolParam(MCH_TP.TIPFEED, ToolDouble)
|
||||
TipFeedTxBx.Text = ToolDouble
|
||||
TipFeedTxBx.Text = LenToString(ToolDouble, 3)
|
||||
EgtTdbGetCurrToolParam(MCH_TP.STARTFEED, ToolDouble)
|
||||
StartFeedTxBx.Text = ToolDouble
|
||||
StartFeedTxBx.Text = LenToString(ToolDouble, 3)
|
||||
EgtTdbGetCurrToolParam(MCH_TP.ENDFEED, ToolDouble)
|
||||
EndFeedTxBx.Text = ToolDouble
|
||||
EndFeedTxBx.Text = LenToString(ToolDouble, 3)
|
||||
EgtTdbGetCurrToolParam(MCH_TP.MAXABSORPTION, ToolDouble)
|
||||
MaxAbsorptionTxBx.Text = ToolDouble
|
||||
MaxAbsorptionTxBx.Text = DoubleToString(ToolDouble, 3)
|
||||
EgtTdbGetCurrToolParam(MCH_TP.MINFEED, ToolDouble)
|
||||
MinFeedTxBx.Text = ToolDouble
|
||||
MinFeedTxBx.Text = LenToString(ToolDouble, 3)
|
||||
EgtTdbGetCurrToolParam(MCH_TP.HEAD, ToolString)
|
||||
HeadTxBx.Text = ToolString
|
||||
EgtTdbGetCurrToolParam(MCH_TP.EXIT_, ToolInt)
|
||||
@@ -401,12 +401,12 @@ Public Class ToolsDbPageUC
|
||||
EgtTdbSetCurrToolParam(MCH_TP.NAME, NameTxBx.Text)
|
||||
EgtTdbSetCurrToolParam(MCH_TP.TCPOS, TCPosTxBx.Text)
|
||||
If m_nToolType = MCH_TY.SAW_STD Then
|
||||
StringToDouble(MaxMatTxBx.Text, dTemp)
|
||||
StringToLen(MaxMatTxBx.Text, dTemp)
|
||||
EgtTdbSetCurrToolParam(MCH_TP.MAXMAT, dTemp)
|
||||
End If
|
||||
StringToDouble(LonOffsetTxBx.Text, dTemp)
|
||||
StringToLen(LonOffsetTxBx.Text, dTemp)
|
||||
EgtTdbSetCurrToolParam(MCH_TP.LONOFFSET, dTemp)
|
||||
StringToDouble(RadOffsetTxBx.Text, dTemp)
|
||||
StringToLen(RadOffsetTxBx.Text, dTemp)
|
||||
EgtTdbSetCurrToolParam(MCH_TP.RADOFFSET, dTemp)
|
||||
Dim ToolType As Integer
|
||||
EgtTdbGetCurrToolParam(MCH_TP.TYPE, ToolType)
|
||||
@@ -426,17 +426,17 @@ Public Class ToolsDbPageUC
|
||||
EgtTdbSetCurrToolParam(MCH_TP.MAXSPEED, dTemp)
|
||||
StringToDouble(SpeedTxBx.Text, dTemp)
|
||||
EgtTdbSetCurrToolParam(MCH_TP.SPEED, dTemp)
|
||||
StringToDouble(FeedTxBx.Text, dTemp)
|
||||
StringToLen(FeedTxBx.Text, dTemp)
|
||||
EgtTdbSetCurrToolParam(MCH_TP.FEED, dTemp)
|
||||
StringToDouble(TipFeedTxBx.Text, dTemp)
|
||||
StringToLen(TipFeedTxBx.Text, dTemp)
|
||||
EgtTdbSetCurrToolParam(MCH_TP.TIPFEED, dTemp)
|
||||
StringToDouble(StartFeedTxBx.Text, dTemp)
|
||||
StringToLen(StartFeedTxBx.Text, dTemp)
|
||||
EgtTdbSetCurrToolParam(MCH_TP.STARTFEED, dTemp)
|
||||
StringToDouble(EndFeedTxBx.Text, dTemp)
|
||||
StringToLen(EndFeedTxBx.Text, dTemp)
|
||||
EgtTdbSetCurrToolParam(MCH_TP.ENDFEED, dTemp)
|
||||
StringToDouble(MaxAbsorptionTxBx.Text, dTemp)
|
||||
EgtTdbSetCurrToolParam(MCH_TP.MAXABSORPTION, dTemp)
|
||||
StringToDouble(MinFeedTxBx.Text, dTemp)
|
||||
StringToLen(MinFeedTxBx.Text, dTemp)
|
||||
EgtTdbSetCurrToolParam(MCH_TP.MINFEED, dTemp)
|
||||
EgtTdbSetCurrToolParam(MCH_TP.HEAD, HeadTxBx.Text)
|
||||
Int32.TryParse(ExitTxBx.Text, nTemp)
|
||||
@@ -564,11 +564,11 @@ Public Class ToolsDbPageUC
|
||||
Case MCH_TP.MAXMAT
|
||||
nMsg = MSG_TOOLSDBPAGEUC + 24 ' Tagliente
|
||||
End Select
|
||||
' Predispongo calcolatrice
|
||||
Dim EgtCalculator As New EgtCalculatorWD(m_MainWindow, DoubleToString(dVal, 2), 300, WidthType.PIXEL, 0, 0, EgtMsg(nMsg))
|
||||
' Predispongo calcolatrice (converto sempre in UIUnits perchè tutte lunghezze)
|
||||
Dim EgtCalculator As New EgtCalculatorWD(m_MainWindow, EgtToUiUnits(dVal), 300, WidthType.PIXEL, 0, 0, EgtMsg(nMsg))
|
||||
' Se inserito valore valido e confermato
|
||||
If EgtCalculator.DialogResult Then
|
||||
RecreateToolDraw(EgtCalculator.dResult)
|
||||
RecreateToolDraw(EgtFromUiUnits(EgtCalculator.dResult))
|
||||
End If
|
||||
' Aggiorno visualizzazione
|
||||
EgtSetCurrentContext(ToolScene.GetCtx())
|
||||
@@ -884,7 +884,9 @@ Public Class ToolsDbPageUC
|
||||
If TempName = NameTxBx.Text Then
|
||||
NameTxBx.Text = NameTxBx.Text
|
||||
Else
|
||||
MsgBox("Nome già utilizzato")
|
||||
' Nome già utilizzato
|
||||
Dim InfoBox As New EgtMsgBox(m_MainWindow, "", EgtMsg(91104), EgtMsgBox.Buttons.OK, EgtMsgBox.Icons.ESCLAMATION)
|
||||
NameTxBx.Text = m_sToolName
|
||||
End If
|
||||
Else
|
||||
NameTxBx.Text = m_sToolName
|
||||
|
||||
+28
@@ -33,6 +33,34 @@ Module Utility
|
||||
Return EgtLuaEvalNumExpr(sVal, dVal)
|
||||
End Function
|
||||
|
||||
Friend Function LenToString(ByVal dVal As Double, ByVal nNumDec As Integer) As String
|
||||
Return DoubleToString(EgtToUiUnits(dVal), nNumDec)
|
||||
End Function
|
||||
|
||||
Friend Function StringToLen(ByVal sVal As String, ByRef dVal As Double) As Boolean
|
||||
If EgtLuaEvalNumExpr(sVal, dVal) Then
|
||||
dVal = EgtFromUiUnits(dVal)
|
||||
Return True
|
||||
Else
|
||||
Return False
|
||||
End If
|
||||
End Function
|
||||
|
||||
Friend Function UIExprToExpr(ByVal sUIExpr) As String
|
||||
If String.IsNullOrWhiteSpace(sUIExpr) Then
|
||||
Return ""
|
||||
End If
|
||||
Return sUIExpr.Replace("""", "*GEO.ONE_INCH")
|
||||
End Function
|
||||
|
||||
Friend Function ExprToUIExpr(ByVal sExpr) As String
|
||||
If String.IsNullOrWhiteSpace(sExpr) Then
|
||||
Return ""
|
||||
End If
|
||||
Return sExpr.Replace("*GEO.ONE_INCH", """")
|
||||
End Function
|
||||
|
||||
|
||||
Public Class Language
|
||||
|
||||
Private m_sLanguageName As String
|
||||
|
||||
Reference in New Issue
Block a user