OmagCUT :
- riordinato direttorio con cartelle - sistemazioni varie per lucidature e svuotature.
This commit is contained in:
@@ -13,5 +13,6 @@
|
||||
Public Const K_STEPY As String = "StepY"
|
||||
Public Const K_LILEN As String = "LiLen"
|
||||
Public Const K_LIHEIGHT As String = "LiHeight"
|
||||
Public Const K_LILOAD As String = "LiLoad"
|
||||
|
||||
End Module
|
||||
@@ -131,7 +131,8 @@
|
||||
Public Const K_DRILLBIT As String = "Drillbit"
|
||||
Public Const K_SAWBLADE As String = "Sawblade"
|
||||
Public Const K_MILL As String = "Mill"
|
||||
Public Const K_MILLNOTIP As String = "MillNoTip"
|
||||
Public Const K_CUPWHEEL As String = "CupWheel"
|
||||
Public Const K_POLISHINGWHEEL As String = "PolishingWheel"
|
||||
Public Const K_WATERJET As String = "WaterJet"
|
||||
Public Const K_SHOWTOOLCHANGER As String = "ShowToolChanger"
|
||||
Public Const K_SHOWHEADEXIT As String = "ShowHeadExit"
|
||||
@@ -152,6 +153,7 @@
|
||||
Public Const K_DRILLING As String = "Drilling"
|
||||
Public Const K_MILLING As String = "Milling"
|
||||
Public Const K_POCKETING As String = "Pocketing"
|
||||
Public Const K_POLISHING As String = "Polishing"
|
||||
Public Const K_SAWROUGHING As String = "SawRoughing"
|
||||
Public Const K_SAWFINISHING As String = "SawFinishing"
|
||||
Public Const K_WATERJETTING As String = "WaterJetting"
|
||||
@@ -64,7 +64,8 @@ Public Class CurrentMachine
|
||||
Private m_bSaw As Boolean = False
|
||||
Private m_bDrill As Boolean = False
|
||||
Private m_bMill As Boolean = False
|
||||
Private m_bMillNoTip As Boolean = False
|
||||
Private m_bCupWheel As Boolean = False
|
||||
Private m_bPolishingWheel As Boolean = False
|
||||
Private m_bWaterJet As Boolean = False
|
||||
|
||||
' Flag per visualizzazione TcPos, Testa/uscita e Note utente
|
||||
@@ -78,6 +79,7 @@ Public Class CurrentMachine
|
||||
Private m_bDrilling As Boolean = False
|
||||
Private m_bMilling As Boolean = False
|
||||
Private m_bPocketing As Boolean = False
|
||||
Private m_bPolishing As Boolean = False
|
||||
Private m_bSawRoughing As Boolean = False
|
||||
Private m_bSawFinishing As Boolean = False
|
||||
Private m_bWaterJetting As Boolean = False
|
||||
@@ -375,9 +377,15 @@ Public Class CurrentMachine
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Friend ReadOnly Property bMillNoTip As Boolean
|
||||
Friend ReadOnly Property bCupWheel As Boolean
|
||||
Get
|
||||
Return m_bMillNoTip
|
||||
Return m_bCupWheel
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Friend ReadOnly Property bPolishingWheel As Boolean
|
||||
Get
|
||||
Return m_bPolishingWheel
|
||||
End Get
|
||||
End Property
|
||||
|
||||
@@ -435,6 +443,12 @@ Public Class CurrentMachine
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Friend ReadOnly Property bPolishing As Boolean
|
||||
Get
|
||||
Return m_bPolishing
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Friend ReadOnly Property bSawRoughing As Boolean
|
||||
Get
|
||||
Return m_bSawRoughing
|
||||
@@ -1000,9 +1014,12 @@ Public Class CurrentMachine
|
||||
' fresa
|
||||
m_bMill = (GetPrivateProfileInt(S_TOOLS, K_MILL, 0, sMachIniFile) > 0) And
|
||||
m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.ENABLE_MILL)
|
||||
' mola
|
||||
m_bMillNoTip = (GetPrivateProfileInt(S_TOOLS, K_MILLNOTIP, 0, sMachIniFile) > 0) And
|
||||
m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.ENABLE_MILL)
|
||||
' mola da scasso
|
||||
m_bCupWheel = (GetPrivateProfileInt(S_TOOLS, K_CUPWHEEL, 0, sMachIniFile) > 0) And
|
||||
m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.ENABLE_MILL)
|
||||
' lucidante
|
||||
m_bPolishingWheel = (GetPrivateProfileInt(S_TOOLS, K_POLISHINGWHEEL, 0, sMachIniFile) > 0) And
|
||||
m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.ENABLE_POLISHING)
|
||||
' waterjet
|
||||
m_bWaterJet = (GetPrivateProfileInt(S_TOOLS, K_WATERJET, 0, sMachIniFile) > 0) And
|
||||
m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.ENABLE_WJ)
|
||||
@@ -1019,20 +1036,24 @@ Public Class CurrentMachine
|
||||
' Leggo flag abilitazione spostamento pezzi alla fine delle lavorazioni
|
||||
m_bRawFinalMove = (GetPrivateProfileInt(S_MACH_RAWMOVE, K_MACH_RM_FINALMOVE, 0, sMachIniFile) <> 0)
|
||||
' Leggo flag presenza tipologie lavorazioni
|
||||
' lama
|
||||
' taglio con lama
|
||||
m_bSawing = (GetPrivateProfileInt(S_MACHININGS, K_SAWING, 0, sMachIniFile) > 0)
|
||||
' foretto
|
||||
' foratura
|
||||
m_bDrilling = (GetPrivateProfileInt(S_MACHININGS, K_DRILLING, 0, sMachIniFile) > 0)
|
||||
' fresa
|
||||
' fresatura
|
||||
m_bMilling = (GetPrivateProfileInt(S_MACHININGS, K_MILLING, 0, sMachIniFile) > 0) And
|
||||
m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.ENABLE_MILL)
|
||||
' mola
|
||||
m_bPocketing = (GetPrivateProfileInt(S_MACHININGS, K_POCKETING, 0, sMachIniFile) > 0)
|
||||
' svuotatura
|
||||
m_bPocketing = (GetPrivateProfileInt(S_MACHININGS, K_POCKETING, 0, sMachIniFile) > 0) And
|
||||
m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.ENABLE_MILL)
|
||||
' lucidatura
|
||||
m_bPolishing = (GetPrivateProfileInt(S_MACHININGS, K_POLISHING, 0, sMachIniFile) > 0) And
|
||||
m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.ENABLE_POLISHING)
|
||||
' sgrossatura con lama
|
||||
m_bSawRoughing = (GetPrivateProfileInt(S_MACHININGS, K_SAWROUGHING, 0, sMachIniFile) > 0)
|
||||
' finitura con lama
|
||||
m_bSawFinishing = (GetPrivateProfileInt(S_MACHININGS, K_SAWFINISHING, 0, sMachIniFile) > 0)
|
||||
' waterjetting
|
||||
' taglio waterjet
|
||||
m_bWaterJetting = (GetPrivateProfileInt(S_MACHININGS, K_WATERJETTING, 0, sMachIniFile) > 0) And
|
||||
m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.ENABLE_WJ)
|
||||
|
||||
@@ -55,7 +55,7 @@ Public Class MachinePageUC
|
||||
m_ActiveMachinePage = MachinePages.Alarms
|
||||
|
||||
' Se lucidature non abilitate, disattivo la pagina DB lucidature
|
||||
If Not m_MainWindow.GetKeyOption(MainWindow.KEY_OPT.ENABLE_POLISHING) Then
|
||||
If Not m_MainWindow.m_CurrentMachine.bPolishing Then
|
||||
PolishingsBtn.IsEnabled = False
|
||||
End If
|
||||
|
||||
@@ -36,6 +36,7 @@ Public Class MachiningDbPageUC
|
||||
Dim SawTool As New ObservableCollection(Of String)
|
||||
Dim DrillTool As New ObservableCollection(Of String)
|
||||
Dim MillTool As New ObservableCollection(Of String)
|
||||
Dim PocketTool As New ObservableCollection(Of String)
|
||||
Dim WaterJetTool As New ObservableCollection(Of String)
|
||||
|
||||
'Variabile che conserva la lavorazione precedentemente selezionata, usata nel caso si selezioni annulla quando si cambia lavorazione selezionata
|
||||
@@ -180,6 +181,7 @@ Public Class MachiningDbPageUC
|
||||
Private Sub InitializeToolLists()
|
||||
Dim sToolName As String = String.Empty
|
||||
Dim nType As Integer = MCH_TY.NONE
|
||||
Dim bFound As Boolean = False
|
||||
SawTool.Clear()
|
||||
If EgtTdbGetFirstTool(MCH_TF.SAWBLADE, sToolName, nType) Then
|
||||
SawTool.Add(sToolName)
|
||||
@@ -195,12 +197,17 @@ Public Class MachiningDbPageUC
|
||||
End While
|
||||
End If
|
||||
MillTool.Clear()
|
||||
If EgtTdbGetFirstTool(MCH_TF.MILL, sToolName, nType) Then
|
||||
MillTool.Add(sToolName)
|
||||
While EgtTdbGetNextTool(MCH_TF.MILL, sToolName, nType)
|
||||
MillTool.Add(sToolName)
|
||||
End While
|
||||
End If
|
||||
bFound = EgtTdbGetFirstTool(MCH_TF.MILL, sToolName, nType)
|
||||
While bFound
|
||||
If nType = MCH_TY.MILL_STD Then MillTool.Add( sToolName)
|
||||
bFound = EgtTdbGetNextTool(MCH_TF.MILL, sToolName, nType)
|
||||
End While
|
||||
PocketTool.Clear()
|
||||
bFound = EgtTdbGetFirstTool(MCH_TF.MILL, sToolName, nType)
|
||||
While bFound
|
||||
If nType = MCH_TY.MILL_NOTIP Then PocketTool.Add( sToolName)
|
||||
bFound = EgtTdbGetNextTool(MCH_TF.MILL, sToolName, nType)
|
||||
End While
|
||||
WaterJetTool.Clear()
|
||||
If EgtTdbGetFirstTool(MCH_TF.WATERJET, sToolName, nType) Then
|
||||
WaterJetTool.Add(sToolName)
|
||||
@@ -236,10 +243,10 @@ Public Class MachiningDbPageUC
|
||||
Dim SelectedCathegory As CathegoryItem = MachiningTreeView.SelectedItem
|
||||
Dim NewName As String = SelectedCathegory.Name
|
||||
EgtMdbGetMachiningNewName(NewName)
|
||||
If EgtMdbAddMachining(NewName, SelectedCathegory.nFType) Then
|
||||
If EgtMdbAddMachining(NewName, SelectedCathegory.nTType) Then
|
||||
For Each MachiningFamily In MachiningsList
|
||||
If MachiningFamily.nFType = SelectedCathegory.nFType Then
|
||||
Dim NewMachiningItem As New CustomItem(NewName, SelectedCathegory.nFType)
|
||||
If MachiningFamily.nTType = SelectedCathegory.nTType Then
|
||||
Dim NewMachiningItem As New CustomItem(NewName, SelectedCathegory.nTType)
|
||||
MachiningFamily.Items.Add(NewMachiningItem)
|
||||
NewMachiningItem.IsSelected = True
|
||||
MachiningFamily.IsExpanded = True
|
||||
@@ -258,7 +265,7 @@ Public Class MachiningDbPageUC
|
||||
Dim CurrType As Integer
|
||||
EgtMdbGetCurrMachiningParam(MCH_MP.TYPE, CurrType)
|
||||
For Each MachiningFamily In MachiningsList
|
||||
If MachiningFamily.nFType = CurrType Then
|
||||
If MachiningFamily.nTType = CurrType Then
|
||||
Dim NewMachiningItem As New CustomItem(NewName, CurrType)
|
||||
MachiningFamily.Items.Add(NewMachiningItem)
|
||||
NewMachiningItem.IsSelected = True
|
||||
@@ -291,7 +298,7 @@ Public Class MachiningDbPageUC
|
||||
EgtMdbRemoveMachining(SelectedItem.Name)
|
||||
' Rimuovo dall'albero
|
||||
For Each MachiningFamily In MachiningsList
|
||||
If (MachiningFamily.nFType And SelectedItem.nType) <> 0 Then
|
||||
If (MachiningFamily.nTType And SelectedItem.nType) <> 0 Then
|
||||
MachiningFamily.Items.Remove(SelectedItem)
|
||||
If MachiningFamily.Items.Count = 0 Then
|
||||
MachiningFamily.IsSelected = True
|
||||
@@ -197,13 +197,19 @@
|
||||
<ColumnDefinition Width="2*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="2*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
<RowDefinition Height="2*"/>
|
||||
<RowDefinition Height="1*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<TextBlock Name="LiLenTxBl" Grid.Row="0" Grid.Column="0" Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="LiLenTxBx" Grid.Row="0" Grid.Column="1" Style="{DynamicResource OmagCut_CalculatorTextBox}" Margin="30,0"/>
|
||||
<TextBlock Name="LiHeightTxBl" Grid.Row="0" Grid.Column="2" Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="LiHeightTxBx" Grid.Row="0" Grid.Column="3" Style="{DynamicResource OmagCut_CalculatorTextBox}" Margin="30,0"/>
|
||||
<TextBlock Name="LiLenTxBl" Grid.Row="1" Grid.Column="0" Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="LiLenTxBx" Grid.Row="1" Grid.Column="1" Style="{DynamicResource OmagCut_CalculatorTextBox}" Margin="30,0"/>
|
||||
<TextBlock Name="LiHeightTxBl" Grid.Row="1" Grid.Column="2" Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="LiHeightTxBx" Grid.Row="1" Grid.Column="3" Style="{DynamicResource OmagCut_CalculatorTextBox}" Margin="30,0"/>
|
||||
<TextBlock Name="LiLoadTxBl" Grid.Row="3" Grid.Column="0" Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
|
||||
<EgtWPFLib:EgtTextBox Name="LiLoadTxBx" Grid.Row="3" Grid.Column="1" Style="{DynamicResource OmagCut_CalculatorTextBox}" Margin="30,0"/>
|
||||
|
||||
</Grid>
|
||||
</GroupBox>
|
||||
@@ -57,12 +57,13 @@ Public Class PolishingsPageUC
|
||||
|
||||
KitsGpBx.Header = EgtMsg(91091) ' Lucidature
|
||||
KitMachsGpBx.Header = EgtMsg(91096) ' Lista utensili
|
||||
MotionTxBl.Text = EgtMsg(91092)
|
||||
RepeatTxBl.Text = EgtMsg(91093)
|
||||
StepTxBl.Text = EgtMsg(90787)
|
||||
LiLoGpBx.Header = EgtMsg(91094)
|
||||
LiLenTxBl.Text = EgtMsg(90947)
|
||||
LiHeightTxBl.Text = EgtMsg(91095)
|
||||
MotionTxBl.Text = EgtMsg(91092) ' Movimento
|
||||
RepeatTxBl.Text = EgtMsg(91093) ' Ripetizioni
|
||||
StepTxBl.Text = EgtMsg(90787) ' Passo
|
||||
LiLoGpBx.Header = EgtMsg(91094) ' Attacco/Uscita
|
||||
LiLenTxBl.Text = EgtMsg(91097) ' Lunghezza
|
||||
LiHeightTxBl.Text = EgtMsg(91095) ' Altezza
|
||||
LiLoadTxBl.Text = EgtMsg(91100) ' Precarico
|
||||
|
||||
End Sub
|
||||
|
||||
@@ -81,12 +82,14 @@ Public Class PolishingsPageUC
|
||||
Dim nType As Integer = MCH_TY.NONE
|
||||
Dim bOk As Boolean = EgtTdbGetFirstTool( MCH_TF.MILL, sToolName, nType)
|
||||
While bOk
|
||||
m_ToolList.Add( sToolName)
|
||||
' Recupero l'UUID dell' utensile
|
||||
EgtTdbSetCurrTool( sToolName)
|
||||
Dim sToolUuid As String = String.Empty
|
||||
EgtTdbGetCurrToolParam( MCH_TP.UUID, sToolUuid)
|
||||
ToolUuidList.Add( sToolUuid)
|
||||
If nType = MCH_TY.MILL_POLISHING Then
|
||||
m_ToolList.Add( sToolName)
|
||||
' Recupero l'UUID dell' utensile
|
||||
EgtTdbSetCurrTool( sToolName)
|
||||
Dim sToolUuid As String = String.Empty
|
||||
EgtTdbGetCurrToolParam( MCH_TP.UUID, sToolUuid)
|
||||
ToolUuidList.Add( sToolUuid)
|
||||
End If
|
||||
' Passo al successivo
|
||||
bOk = EgtTdbGetNextTool( MCH_TF.MILL, sToolName, nType)
|
||||
End While
|
||||
@@ -145,14 +148,8 @@ Public Class PolishingsPageUC
|
||||
kitMachIndex = 0
|
||||
End If
|
||||
KitMachsLstBx.SelectedItem = m_KitMachList(kitMachIndex)
|
||||
' carico i parametri relativi al KitMach selezionato
|
||||
ContourTxBx.Text = m_KitMachList(kitMachIndex).nContour.ToString()
|
||||
ZigZagXTxBx.Text = m_KitMachList(kitMachIndex).nZigZagX.ToString()
|
||||
StepXTxBx.Text = LenToString(m_KitMachList(kitMachIndex).dStepX, 3)
|
||||
ZigZagYTxBx.Text = m_KitMachList(kitMachIndex).nZigZagY.ToString()
|
||||
StepYTxBx.Text = LenToString(m_KitMachList(kitMachIndex).dStepY, 3)
|
||||
LiLenTxBx.Text = LenToString(m_KitMachList(kitMachIndex).dLiLen, 3)
|
||||
LiHeightTxBx.Text = LenToString(m_KitMachList(kitMachIndex).dLiHeight, 3)
|
||||
' visualizzo i parametri relativi al KitMach selezionato
|
||||
ShowKitMach( m_KitMachList( kitMachIndex))
|
||||
End If
|
||||
|
||||
If KitMachsLstBx.Items.Count = 0 Then RemoveKitMachBtn.IsEnabled = False
|
||||
@@ -176,7 +173,7 @@ Public Class PolishingsPageUC
|
||||
|
||||
Private Sub KitNameTxBx_EgtClosed(sender As Object, e As EventArgs) Handles KitNameTxBx.EgtClosed
|
||||
' Verifico che il nome non sia vuoto
|
||||
If Not String.IsNullOrWhiteSpace(KitNameTxBx.Text) Then
|
||||
If Not String.IsNullOrWhiteSpace( KitNameTxBx.Text) Then
|
||||
' Verifico che il nome non sia già utilizzato
|
||||
Dim bNameExist As Boolean = False
|
||||
For Each Kit In m_KitList
|
||||
@@ -187,7 +184,7 @@ Public Class PolishingsPageUC
|
||||
Next
|
||||
If Not bNameExist Then
|
||||
' Aggiungo un Kit con Id uguale al numero di Kit già presenti + 1 e nome appena immesso
|
||||
AddKit( KitNameTxBx.Text)
|
||||
AddKit( KitNameTxBx.Text, m_PreviousSelectedKitIndex)
|
||||
End If
|
||||
End If
|
||||
|
||||
@@ -341,15 +338,24 @@ Public Class PolishingsPageUC
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub AddKit( sNewKitName As String)
|
||||
' Creo il Kit e aggiungo un KitMach
|
||||
Dim kitNew As Kit = New Kit( m_KitList.Count + 1, sNewKitName)
|
||||
kitNew.KitMachList.Add( New KitMach( 1))
|
||||
Private Sub AddKit( sNewKitName As String, nCurrKitIndex As Integer)
|
||||
Dim kitNew As Kit = Nothing
|
||||
If nCurrKitIndex >= 0 And nCurrKitIndex < m_KitList.Count() Then
|
||||
' Creo il Kit come copia di quello corrente
|
||||
kitNew = New Kit( m_KitList.Count + 1, sNewKitName, m_KitList( nCurrKitIndex))
|
||||
Else
|
||||
' Creo il Kit e aggiungo un KitMach vuoto
|
||||
kitNew = New Kit( m_KitList.Count + 1, sNewKitName)
|
||||
kitNew.KitMachList.Add( New KitMach( 1))
|
||||
End If
|
||||
' Inserisco in lista
|
||||
m_KitList.Add( kitNew)
|
||||
' Eseguo il salvataggio
|
||||
WriteKitName( kitNew.nId, kitNew.sName)
|
||||
WriteKitMach( kitNew.nId, 1, kitNew.KitMachList( 0))
|
||||
For Each kmCurr As KitMach In kitNew.KitMachList
|
||||
WriteKitMach( kitNew.nId, kmCurr.nId, kmCurr)
|
||||
Next
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub RemoveKit( nKitIndex As Integer)
|
||||
@@ -408,14 +414,8 @@ Public Class PolishingsPageUC
|
||||
Next
|
||||
' seleziono il primo elemento della lista dei Kit
|
||||
KitMachsLstBx.SelectedItem = m_KitMachList( 0)
|
||||
' carico i parametri relativi al KitMach selezionato
|
||||
ContourTxBx.Text = m_KitMachList(0).nContour.ToString()
|
||||
ZigZagXTxBx.Text = m_KitMachList( 0).nZigZagX.ToString()
|
||||
StepXTxBx.Text = LenToString( m_KitMachList( 0).dStepX, 3)
|
||||
ZigZagYTxBx.Text = m_KitMachList( 0).nZigZagY.ToString()
|
||||
StepYTxBx.Text = LenToString( m_KitMachList(0).dStepY, 3)
|
||||
LiLenTxBx.Text = LenToString( m_KitMachList( 0).dLiLen, 3)
|
||||
LiHeightTxBx.Text = LenToString( m_KitMachList( 0).dLiHeight, 3)
|
||||
' visualizzo i parametri relativi al KitMach selezionato
|
||||
ShowKitMach( m_KitMachList( 0))
|
||||
|
||||
m_OldItem = KitsLstBx.SelectedItem
|
||||
|
||||
@@ -451,7 +451,7 @@ Public Class PolishingsPageUC
|
||||
If KitMachItem.m_IsModifiedId OrElse KitMachItem.m_IsModifiedToolUUID OrElse KitMachItem.m_IsModifiedToolName OrElse KitMachItem.m_IsModifiedSelTool OrElse
|
||||
KitMachItem.m_IsModifiedActive OrElse KitMachItem.m_IsModifiedContour OrElse KitMachItem.m_IsModifiedZigZagX OrElse
|
||||
KitMachItem.m_IsModifiedZigZagY OrElse KitMachItem.m_IsModifiedStepX OrElse KitMachItem.m_IsModifiedStepY OrElse
|
||||
KitMachItem.m_IsModifiedLiLen OrElse KitMachItem.m_IsModifiedLiHeight Then
|
||||
KitMachItem.m_IsModifiedLiLen OrElse KitMachItem.m_IsModifiedLiHeight OrElse KitMachItem.m_IsModifiedLiLoad Then
|
||||
Return True
|
||||
End If
|
||||
Next
|
||||
@@ -478,21 +478,28 @@ Public Class PolishingsPageUC
|
||||
KitMachItem.m_IsModifiedStepY = False
|
||||
KitMachItem.m_IsModifiedLiLen = False
|
||||
KitMachItem.m_IsModifiedLiHeight = False
|
||||
KitMachItem.m_IsModifiedLiLoad = False
|
||||
Next
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub ShowKitMach( kmShow As KitMach)
|
||||
' visualizzo i parametri del KitMach
|
||||
ContourTxBx.Text = kmShow.nContour.ToString()
|
||||
ZigZagXTxBx.Text = kmShow.nZigZagX.ToString()
|
||||
StepXTxBx.Text = LenToString( kmShow.dStepX, 3)
|
||||
ZigZagYTxBx.Text = kmShow.nZigZagY.ToString()
|
||||
StepYTxBx.Text = LenToString( kmShow.dStepY, 3)
|
||||
LiLenTxBx.Text = LenToString( kmShow.dLiLen, 3)
|
||||
LiHeightTxBx.Text = LenToString( kmShow.dLiHeight, 3)
|
||||
LiLoadTxBx.Text = LenToString( kmShow.dLiLoad, 3)
|
||||
End Sub
|
||||
|
||||
Private Sub KitMachsLstBx_SelectionChanged(sender As Object, e As SelectionChangedEventArgs) Handles KitMachsLstBx.SelectionChanged
|
||||
Dim SelectedKitMach As KitMach = KitMachsLstBx.SelectedItem
|
||||
If Not IsNothing(SelectedKitMach) Then
|
||||
' carico i parametri relativi al KitMach selezionato
|
||||
ContourTxBx.Text = SelectedKitMach.nContour.ToString()
|
||||
ZigZagXTxBx.Text = SelectedKitMach.nZigZagX.ToString()
|
||||
StepXTxBx.Text = LenToString(SelectedKitMach.dStepX, 3)
|
||||
ZigZagYTxBx.Text = SelectedKitMach.nZigZagY.ToString()
|
||||
StepYTxBx.Text = LenToString(SelectedKitMach.dStepY, 3)
|
||||
LiLenTxBx.Text = LenToString(SelectedKitMach.dLiLen, 3)
|
||||
LiHeightTxBx.Text = LenToString(SelectedKitMach.dLiHeight, 3)
|
||||
' visualizzo i parametri relativi al KitMach selezionato
|
||||
ShowKitMach( SelectedKitMach)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
@@ -559,6 +566,15 @@ Public Class PolishingsPageUC
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub LiLoadTxBx_EgtClosed(sender As Object, e As EventArgs) Handles LiLoadTxBx.EgtClosed
|
||||
Dim dTemp As Double = 0
|
||||
If Not IsNothing(KitMachsLstBx.SelectedItem) Then
|
||||
StringToLen(LiLoadTxBx.Text, dTemp)
|
||||
KitMachsLstBx.SelectedItem.dLiLoad = dTemp
|
||||
m_OldItem.KitMachList(KitMachsLstBx.SelectedItem.nId - 1).dLiLoad = dTemp
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub CheckBox_Click(sender As Object, e As RoutedEventArgs)
|
||||
If Not IsNothing(KitMachsLstBx.SelectedItem) Then
|
||||
m_OldItem.KitMachList(KitMachsLstBx.SelectedItem.nId - 1).bActive = KitMachsLstBx.SelectedItem.bActive
|
||||
@@ -629,6 +645,7 @@ Public Class PolishingsPageUC
|
||||
kmItem.dStepY = GetPrivateProfileDouble( sSect, sKeyInd & K_STEPY, 0, m_sKitFile)
|
||||
kmItem.dLiLen = GetPrivateProfileDouble( sSect, sKeyInd & K_LILEN, 0, m_sKitFile)
|
||||
kmItem.dLiHeight = GetPrivateProfileDouble( sSect, sKeyInd & K_LIHEIGHT, 0, m_sKitFile)
|
||||
kmItem.dLiLoad = GetPrivateProfileDouble( sSect, sKeyInd & K_LILOAD, 0, m_sKitFile)
|
||||
Return True
|
||||
End Function
|
||||
|
||||
@@ -657,6 +674,7 @@ Public Class PolishingsPageUC
|
||||
WritePrivateProfileString( sSect, sKeyInd & K_STEPY, DoubleToString( kmItem.dStepY, 3), m_sKitFile)
|
||||
WritePrivateProfileString( sSect, sKeyInd & K_LILEN, DoubleToString( kmItem.dLiLen, 3), m_sKitFile)
|
||||
WritePrivateProfileString( sSect, sKeyInd & K_LIHEIGHT, DoubleToString( kmItem.dLiHeight, 3), m_sKitFile)
|
||||
WritePrivateProfileString( sSect, sKeyInd & K_LILOAD, DoubleToString( kmItem.dLiLoad, 3), m_sKitFile)
|
||||
Else
|
||||
WritePrivateProfileString( sSect, sKeyInd & K_TOOL, Nothing, m_sKitFile)
|
||||
WritePrivateProfileString( sSect, sKeyInd & K_TOOLNAME, Nothing, m_sKitFile)
|
||||
@@ -668,6 +686,7 @@ Public Class PolishingsPageUC
|
||||
WritePrivateProfileString( sSect, sKeyInd & K_STEPY, Nothing, m_sKitFile)
|
||||
WritePrivateProfileString( sSect, sKeyInd & K_LILEN, Nothing, m_sKitFile)
|
||||
WritePrivateProfileString( sSect, sKeyInd & K_LIHEIGHT, Nothing, m_sKitFile)
|
||||
WritePrivateProfileString( sSect, sKeyInd & K_LILOAD, Nothing, m_sKitFile)
|
||||
End If
|
||||
Return True
|
||||
End Function
|
||||
@@ -762,15 +781,7 @@ Class Kit
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Sub New(nId As Integer, sName As String, lKitMachList As List(Of KitMach))
|
||||
m_nId = nId
|
||||
m_sName = sName
|
||||
|
||||
m_KitMachList = lKitMachList
|
||||
|
||||
End Sub
|
||||
|
||||
Sub New(nId As Integer, sName As String)
|
||||
Sub New( nId As Integer, sName As String)
|
||||
m_nId = nId
|
||||
m_sName = sName
|
||||
|
||||
@@ -778,7 +789,21 @@ Class Kit
|
||||
|
||||
End Sub
|
||||
|
||||
Sub AddKitMach(kitMachItem As KitMach)
|
||||
Sub New( nId As Integer, sName As String, kitSou As Kit)
|
||||
m_nId = nId
|
||||
m_sName = sName
|
||||
|
||||
m_KitMachList = New List(Of KitMach)
|
||||
|
||||
If IsNothing( kitSou) Then Return
|
||||
|
||||
For Each kmItem As KitMach In kitSou.m_KitMachList
|
||||
AddKitMach( kmItem)
|
||||
Next
|
||||
|
||||
End Sub
|
||||
|
||||
Sub AddKitMach( kitMachItem As KitMach)
|
||||
m_KitMachList.Add(kitMachItem)
|
||||
End Sub
|
||||
|
||||
@@ -802,6 +827,7 @@ Class KitMach
|
||||
Private m_dStepY As Double
|
||||
Private m_dLiLen As Double
|
||||
Private m_dLiHeight As Double
|
||||
Private m_dLiLoad As Double
|
||||
|
||||
Public m_IsModifiedId As Boolean = False
|
||||
Public Property nId As Integer
|
||||
@@ -990,6 +1016,19 @@ Class KitMach
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public m_IsModifiedLiLoad As Boolean = False
|
||||
Public Property dLiLoad As Double
|
||||
Get
|
||||
Return m_dLiLoad
|
||||
End Get
|
||||
Set(value As Double)
|
||||
If value <> m_dLiLoad Then
|
||||
m_dLiLoad = value
|
||||
m_IsModifiedLiLoad = True
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Sub New()
|
||||
m_nId = 0
|
||||
m_SelTool = 0
|
||||
@@ -1003,6 +1042,7 @@ Class KitMach
|
||||
m_dStepY = 0
|
||||
m_dLiLen = 0
|
||||
m_dLiHeight = 0
|
||||
m_dLiLoad = 0
|
||||
End Sub
|
||||
|
||||
Sub New( nId As Integer)
|
||||
@@ -1018,6 +1058,7 @@ Class KitMach
|
||||
m_dStepY = 0
|
||||
m_dLiLen = 0
|
||||
m_dLiHeight = 0
|
||||
m_dLiLoad = 0
|
||||
End Sub
|
||||
|
||||
Sub New( kmSou As KitMach)
|
||||
@@ -1033,6 +1074,7 @@ Class KitMach
|
||||
m_dStepY = kmSou.dStepY
|
||||
m_dLiLen = kmSou.dLiLen
|
||||
m_dLiHeight = kmSou.dLiHeight
|
||||
m_dLiLoad = kmSou.m_dLiLoad
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
@@ -160,11 +160,12 @@ Public Class ToolsDbPageUC
|
||||
ToolScene.SetStatusNull()
|
||||
' Inizializzo le famiglie di utensili nell'albero
|
||||
EgtSetCurrentContext(m_MainWindow.m_CurrentProjectPageUC.CurrentProjectScene.GetCtx())
|
||||
InitializeToolFamily(m_CurrMachine.bSaw, MCH_TF.SAWBLADE, EgtMsg(MSG_TOOLSDBPAGEUC + 31))
|
||||
InitializeToolFamily(m_CurrMachine.bDrill, MCH_TF.DRILLBIT, EgtMsg(MSG_TOOLSDBPAGEUC + 32))
|
||||
InitializeToolFamily(m_CurrMachine.bMill, MCH_TF.MILL, EgtMsg(MSG_TOOLSDBPAGEUC + 33))
|
||||
InitializeToolFamily(m_CurrMachine.bMillNoTip, MCH_TF.MILL, EgtMsg(MSG_TOOLSDBPAGEUC + 34))
|
||||
InitializeToolFamily(m_CurrMachine.bWaterJet, MCH_TF.WATERJET, EgtMsg(MSG_TOOLSDBPAGEUC + 35))
|
||||
InitializeToolGroup(m_CurrMachine.bSaw, MCH_TY.SAW_STD, EgtMsg( 90751))
|
||||
InitializeToolGroup(m_CurrMachine.bDrill, MCH_TY.DRILL_STD, EgtMsg( 90752))
|
||||
InitializeToolGroup(m_CurrMachine.bMill, MCH_TY.MILL_STD, EgtMsg( 90753))
|
||||
InitializeToolGroup(m_CurrMachine.bCupWheel, MCH_TY.MILL_NOTIP, EgtMsg( 90754))
|
||||
InitializeToolGroup(m_CurrMachine.bPolishingWheel, MCH_TY.MILL_POLISHING, EgtMsg( 90756))
|
||||
InitializeToolGroup(m_CurrMachine.bWaterJet, MCH_TY.WATERJET, EgtMsg( 90755))
|
||||
' Sposto tutti i parametri in su di una riga se testa e uscita sono disattivati
|
||||
If Not m_CurrMachine.bShowHeadExit Then
|
||||
MoveParam()
|
||||
@@ -225,10 +226,10 @@ Public Class ToolsDbPageUC
|
||||
Dim SelectedCathegory As CathegoryItem = ToolTreeView.SelectedItem
|
||||
Dim NewName As String = SelectedCathegory.Name
|
||||
EgtTdbGetToolNewName(NewName)
|
||||
If EgtTdbAddTool(NewName, SelectedCathegory.nFType) Then
|
||||
If EgtTdbAddTool(NewName, SelectedCathegory.nTType) Then
|
||||
For Each ToolFamily In ToolsList
|
||||
If ToolFamily.nFType = SelectedCathegory.nFType Then
|
||||
Dim NewToolItem As New CustomItem(NewName, SelectedCathegory.nFType)
|
||||
If ToolFamily.nTType = SelectedCathegory.nTType Then
|
||||
Dim NewToolItem As New CustomItem(NewName, SelectedCathegory.nTType)
|
||||
ToolFamily.Items.Add(NewToolItem)
|
||||
NewToolItem.IsSelected = True
|
||||
ToolFamily.IsExpanded = True
|
||||
@@ -255,26 +256,38 @@ Public Class ToolsDbPageUC
|
||||
EgtTdbSetCurrToolParam(MCH_TP.TCPOS, "")
|
||||
End If
|
||||
' Imposto dimensioni standard
|
||||
If (nType And MCH_TF.DRILLBIT) <> 0 Then
|
||||
EgtTdbSetCurrToolParam(MCH_TP.LEN, 80.0)
|
||||
EgtTdbSetCurrToolParam(MCH_TP.TOTLEN, 80.0)
|
||||
If nType = MCH_TY.DRILL_STD Then
|
||||
EgtTdbSetCurrToolParam(MCH_TP.LEN, 120.0)
|
||||
EgtTdbSetCurrToolParam(MCH_TP.TOTLEN, 120.0)
|
||||
EgtTdbSetCurrToolParam(MCH_TP.DIAM, 20.0)
|
||||
EgtTdbSetCurrToolParam(MCH_TP.TOTDIAM, 20.0)
|
||||
EgtTdbSetCurrToolParam(MCH_TP.MAXMAT, 40.0)
|
||||
ElseIf (nType And MCH_TF.SAWBLADE) <> 0 Then
|
||||
ElseIf nType = MCH_TY.SAW_STD Then
|
||||
EgtTdbSetCurrToolParam(MCH_TP.LEN, 80.0)
|
||||
EgtTdbSetCurrToolParam(MCH_TP.TOTLEN, 80.0)
|
||||
EgtTdbSetCurrToolParam(MCH_TP.DIAM, 600.0)
|
||||
EgtTdbSetCurrToolParam(MCH_TP.TOTDIAM, 600.0)
|
||||
EgtTdbSetCurrToolParam(MCH_TP.THICK, 5.0)
|
||||
EgtTdbSetCurrToolParam(MCH_TP.MAXMAT, 40.0)
|
||||
ElseIf (nType And MCH_TF.MILL) <> 0 Then
|
||||
EgtTdbSetCurrToolParam(MCH_TP.LEN, 80.0)
|
||||
EgtTdbSetCurrToolParam(MCH_TP.TOTLEN, 80.0)
|
||||
ElseIf nType = MCH_TY.MILL_STD Then
|
||||
EgtTdbSetCurrToolParam(MCH_TP.LEN, 120.0)
|
||||
EgtTdbSetCurrToolParam(MCH_TP.TOTLEN, 120.0)
|
||||
EgtTdbSetCurrToolParam(MCH_TP.DIAM, 20.0)
|
||||
EgtTdbSetCurrToolParam(MCH_TP.TOTDIAM, 20.0)
|
||||
EgtTdbSetCurrToolParam(MCH_TP.MAXMAT, 40.0)
|
||||
ElseIf (nType And MCH_TF.WATERJET) <> 0 Then
|
||||
ElseIf nType = MCH_TY.MILL_NOTIP Then
|
||||
EgtTdbSetCurrToolParam(MCH_TP.LEN, 120.0)
|
||||
EgtTdbSetCurrToolParam(MCH_TP.TOTLEN, 120.0)
|
||||
EgtTdbSetCurrToolParam(MCH_TP.DIAM, 90.0)
|
||||
EgtTdbSetCurrToolParam(MCH_TP.TOTDIAM, 90.0)
|
||||
EgtTdbSetCurrToolParam(MCH_TP.MAXMAT, 10.0)
|
||||
ElseIf nType = MCH_TY.MILL_POLISHING Then
|
||||
EgtTdbSetCurrToolParam(MCH_TP.LEN, 120.0)
|
||||
EgtTdbSetCurrToolParam(MCH_TP.TOTLEN, 120.0)
|
||||
EgtTdbSetCurrToolParam(MCH_TP.DIAM, 100.0)
|
||||
EgtTdbSetCurrToolParam(MCH_TP.TOTDIAM, 100.0)
|
||||
EgtTdbSetCurrToolParam(MCH_TP.MAXMAT, 10.0)
|
||||
ElseIf nType = MCH_TY.WATERJET Then
|
||||
EgtTdbSetCurrToolParam(MCH_TP.LEN, 5.0)
|
||||
EgtTdbSetCurrToolParam(MCH_TP.TOTLEN, 5.0)
|
||||
EgtTdbSetCurrToolParam(MCH_TP.DIAM, 1.0)
|
||||
@@ -303,9 +316,9 @@ Public Class ToolsDbPageUC
|
||||
Dim CurrType As Integer
|
||||
EgtTdbGetCurrToolParam(MCH_TP.TYPE, CurrType)
|
||||
For Each ToolFamily In ToolsList
|
||||
If (ToolFamily.nFType And CurrType) <> 0 Then
|
||||
Dim NewToolItem As New CustomItem(NewName, CurrType)
|
||||
ToolFamily.Items.Add(NewToolItem)
|
||||
If ToolFamily.nTType = CurrType Then
|
||||
Dim NewToolItem As New CustomItem( NewName, CurrType)
|
||||
ToolFamily.Items.Add( NewToolItem)
|
||||
NewToolItem.IsSelected = True
|
||||
GetToolParams()
|
||||
m_OldItem = ToolTreeView.SelectedItem
|
||||
@@ -447,7 +460,7 @@ Public Class ToolsDbPageUC
|
||||
EgtTdbRemoveTool(SelectedItem.Name)
|
||||
' Rimuovo il nome dell'albero
|
||||
For Each ToolFamily In ToolsList
|
||||
If (ToolFamily.nFType And SelectedItem.nType) <> 0 Then
|
||||
If (ToolFamily.nTType And SelectedItem.nType) <> 0 Then
|
||||
ToolFamily.Items.Remove(SelectedItem)
|
||||
If ToolFamily.Items.Count = 0 Then
|
||||
ToolFamily.IsSelected = True
|
||||
@@ -466,19 +479,18 @@ Public Class ToolsDbPageUC
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Friend Sub InitializeToolFamily(bEnabled As Boolean, nFType As Integer, sFName As String)
|
||||
Friend Sub InitializeToolGroup(bEnabled As Boolean, nTType As Integer, sFName As String)
|
||||
If Not bEnabled Then Return
|
||||
' Inserisco categoria ed eventuali elementi
|
||||
Dim ToolCathegory As New CathegoryItem(sFName, nFType)
|
||||
Dim ToolCathegory As New CathegoryItem( sFName, nTType)
|
||||
Dim nType As Integer = 0
|
||||
Dim ToolName As String = String.Empty
|
||||
If EgtTdbGetFirstTool(nFType, ToolName, nType) Then
|
||||
ToolCathegory.Items.Add(New CustomItem(ToolName, nType))
|
||||
While EgtTdbGetNextTool(nFType, ToolName, nType)
|
||||
ToolCathegory.Items.Add(New CustomItem(ToolName, nType))
|
||||
End While
|
||||
End If
|
||||
ToolsList.Add(ToolCathegory)
|
||||
Dim bFound As Boolean = EgtTdbGetFirstTool( nTType, ToolName, nType)
|
||||
While bFound
|
||||
If nType = nTType Then ToolCathegory.Items.Add( New CustomItem( ToolName, nType))
|
||||
bFound = EgtTdbGetNextTool( nTType, ToolName, nType)
|
||||
End While
|
||||
ToolsList.Add( ToolCathegory)
|
||||
End Sub
|
||||
|
||||
Private Sub GetToolParams()
|
||||
@@ -797,14 +809,9 @@ Public Class ToolsDbPageUC
|
||||
Case MCH_TP.DIAM
|
||||
EgtTdbSetCurrToolParam(MCH_TP.TOTDIAM, dVal)
|
||||
End Select
|
||||
ElseIf m_nToolType = MCH_TY.MILL_STD Then
|
||||
Select Case nType
|
||||
Case MCH_TP.LEN
|
||||
EgtTdbSetCurrToolParam(MCH_TP.TOTLEN, dVal)
|
||||
Case MCH_TP.DIAM
|
||||
EgtTdbSetCurrToolParam(MCH_TP.TOTDIAM, dVal)
|
||||
End Select
|
||||
ElseIf m_nToolType = MCH_TY.MILL_NOTIP Then
|
||||
ElseIf m_nToolType = MCH_TY.MILL_STD Or
|
||||
m_nToolType = MCH_TY.MILL_NOTIP Or
|
||||
m_nToolType = MCH_TY.MILL_POLISHING Then
|
||||
Select Case nType
|
||||
Case MCH_TP.LEN
|
||||
EgtTdbSetCurrToolParam(MCH_TP.TOTLEN, dVal)
|
||||
@@ -932,7 +939,7 @@ Public Class ToolsDbPageUC
|
||||
' passo all'ambiente di disegno dell'utensile
|
||||
EgtSetCurrentContext(ToolScene.GetCtx())
|
||||
Return True
|
||||
Case MCH_TY.MILL_NOTIP
|
||||
Case MCH_TY.MILL_NOTIP, MCH_TY.MILL_POLISHING
|
||||
' assegno parametri geometrici
|
||||
EgtSetCurrentContext(m_MainWindow.m_CurrentProjectPageUC.CurrentProjectScene.GetCtx())
|
||||
Dim dToolLen As Double
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user