EgtCAM5 :
- Migliorie SetUp. - Migliorie simulazione.
This commit is contained in:
@@ -1,12 +1,10 @@
|
||||
Imports EgtUILib
|
||||
Imports System.IO
|
||||
Imports EgtUILib
|
||||
|
||||
Namespace EgtCAM5
|
||||
|
||||
Public Class MachOptionsViewModel
|
||||
|
||||
' Definizione comandi
|
||||
Private m_cmdCloseMachOptions As ICommand
|
||||
|
||||
Private m_dSafeZ As String
|
||||
Public Property SafeZ As String
|
||||
Get
|
||||
@@ -40,6 +38,36 @@ Namespace EgtCAM5
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property IsActiveDefaultSetUp As Boolean
|
||||
Get
|
||||
Return MachOptionModule.m_bIsActiveDefaultSetUp
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
MachOptionModule.m_bIsActiveDefaultSetUp = value
|
||||
EgtUILib.WritePrivateProfileString(S_SETUP, K_ACTIVEDEFAULT, If(value, 1, 0).ToString, IniFile.m_sCurrMachIniFilePath)
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_ArchivedSetUpList As New List(Of String)
|
||||
Public Property ArchivedSetUpList As List(Of String)
|
||||
Get
|
||||
Return m_ArchivedSetUpList
|
||||
End Get
|
||||
Set(value As List(Of String))
|
||||
m_ArchivedSetUpList = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property SelectedDefaultSetUp As String
|
||||
Get
|
||||
Return MachOptionModule.m_sSelectedDefaultSetUp
|
||||
End Get
|
||||
Set(value As String)
|
||||
MachOptionModule.m_sSelectedDefaultSetUp = value
|
||||
EgtUILib.WritePrivateProfileString(S_SETUP, K_DEFAULT, If(Not IsNothing(value), value & ".stu", String.Empty), IniFile.m_sCurrMachIniFilePath)
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#Region "Messages"
|
||||
|
||||
Public ReadOnly Property SafeZMsg As String
|
||||
@@ -52,9 +80,22 @@ Namespace EgtCAM5
|
||||
Return EgtMsg(MSG_MACHININGOPTIONPAGE + 2)
|
||||
End Get
|
||||
End Property
|
||||
Public ReadOnly Property ActivateDefaultSetUpMsg As String
|
||||
Get
|
||||
Return EgtMsg(MSG_MACHININGOPTIONPAGE + 7)
|
||||
End Get
|
||||
End Property
|
||||
Public ReadOnly Property DefaultSetUpMsg As String
|
||||
Get
|
||||
Return EgtMsg(MSG_MACHININGOPTIONPAGE + 8)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
#End Region
|
||||
|
||||
' Definizione comandi
|
||||
Private m_cmdCloseMachOptions As ICommand
|
||||
|
||||
Sub New()
|
||||
' Leggo distanza di sicurezza
|
||||
Dim dVal As Double = 0
|
||||
@@ -64,6 +105,19 @@ Namespace EgtCAM5
|
||||
Dim nVal As Integer = 0
|
||||
EgtMdbGetGeneralParam(MCH_GP.SPLITARCS, nVal)
|
||||
m_SelectedSplitArcs = DirectCast(nVal, MCH_SA)
|
||||
' Riempio lista attrezzaggi salvati
|
||||
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
|
||||
' Leggo se attivo attrezzaggio predefinito
|
||||
m_bIsActiveDefaultSetUp = EgtUILib.GetPrivateProfileInt(S_SETUP, K_ACTIVEDEFAULT, 0, IniFile.m_sCurrMachIniFilePath) <> 0
|
||||
' Leggo attrezzaggio predefinito
|
||||
If EgtUILib.GetPrivateProfileString(S_SETUP, K_DEFAULT, "", m_sSelectedDefaultSetUp, IniFile.m_sCurrMachIniFilePath) <= 0 Then
|
||||
m_sSelectedDefaultSetUp = Nothing
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#Region "COMMANDS"
|
||||
|
||||
Reference in New Issue
Block a user