EgtCAM5 1.9c1 :

- in config. macchina aggiunta tolleranza fori
- corretto avvio finestra config. macchina quando manca direttorio per attrezzaggio.
This commit is contained in:
Dario Sassi
2018-02-24 11:40:43 +00:00
parent 44fe2cc8d2
commit 0dfbcd86a0
3 changed files with 64 additions and 29 deletions
+49 -20
View File
@@ -5,31 +5,48 @@ Namespace EgtCAM5
Public Class MachOptionsViewModel
Private m_dSafeZ As String
Private m_sSafeZ As String
Public Property SafeZ As String
Get
Return m_dSafeZ
Return m_sSafeZ
End Get
Set(value As String)
Dim dSafeZ As Double = 0
StringToLen(value, dSafeZ)
EgtMdbSetGeneralParam(MCH_GP.SAFEZ, dSafeZ)
EgtMdbSave()
m_dSafeZ = value
If StringToLen(value, dSafeZ) Then
EgtMdbSetGeneralParam(MCH_GP.SAFEZ, dSafeZ)
EgtMdbSave()
m_sSafeZ = value
End If
End Set
End Property
Private m_dSafeAggrBottZ As String
Private m_sSafeAggrBottZ As String
Public Property SafeAggrBottZ As String
Get
Return m_dSafeAggrBottZ
Return m_sSafeAggrBottZ
End Get
Set(value As String)
Dim dSafeAggrBottZ As Double = 0
StringToLen(value, dSafeAggrBottZ)
EgtMdbSetGeneralParam(MCH_GP.SAFEAGGRBOTTZ, dSafeAggrBottZ)
EgtMdbSave()
m_dSafeAggrBottZ = value
If StringToLen(value, dSafeAggrBottZ) Then
EgtMdbSetGeneralParam(MCH_GP.SAFEAGGRBOTTZ, dSafeAggrBottZ)
EgtMdbSave()
m_sSafeAggrBottZ = value
End If
End Set
End Property
Private m_sHolesTolerance As String
Public Property HolesTolerance As String
Get
Return m_sHolesTolerance
End Get
Set(value As String)
Dim dHolesTolerance As Double = 0
If StringToLen(value, dHolesTolerance) Then
EgtMdbSetGeneralParam(MCH_GP.HOLEDIAMTOLER, dHolesTolerance)
EgtMdbSave()
m_sHolesTolerance = value
End If
End Set
End Property
@@ -86,6 +103,12 @@ Namespace EgtCAM5
End Get
End Property
Public ReadOnly Property HolesToleranceMsg As String
Get
Return EgtMsg(MSG_MACHININGOPTIONPAGE + 9)
End Get
End Property
Public ReadOnly Property SplitArcsMsg As String
Get
Return EgtMsg(MSG_MACHININGOPTIONPAGE + 2)
@@ -107,23 +130,29 @@ Namespace EgtCAM5
' Leggo distanza di sicurezza
Dim dVal As Double = 0
EgtMdbGetGeneralParam(MCH_GP.SAFEZ, dVal)
m_dSafeZ = LenToString(dVal, 2)
m_sSafeZ = LenToString(dVal, 2)
' Leggo distanza di sicurezza per rinvii da sotto
dVal = 0
EgtMdbGetGeneralParam(MCH_GP.SAFEAGGRBOTTZ, dVal)
m_dSafeAggrBottZ = LenToString(dVal, 2)
m_sSafeAggrBottZ = LenToString(dVal, 2)
' Leggo tolleranza tra diametro punta e diametro foro
dVal = 0
EgtMdbGetGeneralParam(MCH_GP.HOLEDIAMTOLER, dVal)
m_sHolesTolerance = LenToString(dVal, 2)
' Leggo tipo di spezzatura archi
Dim nVal As Integer = 0
EgtMdbGetGeneralParam(MCH_GP.SPLITARCS, nVal)
m_SelectedSplitArcs = DirectCast(nVal, MCH_SA)
' Riempio lista attrezzaggi salvati
m_ArchivedSetUpList.Add(String.Empty)
Dim SetUpFileNames() As String = Directory.GetFiles(IniFile.m_sCurrMachSetUpDirPath)
For FileIndex = 0 To SetUpFileNames.Count - 1
If Path.GetExtension(SetUpFileNames(FileIndex)).ToLower = ".stu" Then
m_ArchivedSetUpList.Add(Path.GetFileNameWithoutExtension(SetUpFileNames(FileIndex)))
End If
Next
If Directory.Exists(IniFile.m_sCurrMachSetUpDirPath) Then
Dim SetUpFileNames() As String = Directory.GetFiles(IniFile.m_sCurrMachSetUpDirPath)
For FileIndex = 0 To SetUpFileNames.Count - 1
If Path.GetExtension(SetUpFileNames(FileIndex)).ToLower = ".stu" Then
m_ArchivedSetUpList.Add(Path.GetFileNameWithoutExtension(SetUpFileNames(FileIndex)))
End If
Next
End If
' Leggo attrezzaggio predefinito
If EgtUILib.GetPrivateProfileString(S_SETUP, K_DEFAULT, "", MachOptionModule.m_sSelectedDefaultSetUp, IniFile.m_sCurrMachIniFilePath) <= 0 Then
SelectedDefaultSetUp = Nothing