diff --git a/Constants/ConstMachIni.vb b/Constants/ConstMachIni.vb
index afa59fe..9905784 100644
--- a/Constants/ConstMachIni.vb
+++ b/Constants/ConstMachIni.vb
@@ -46,7 +46,6 @@
Public Const S_FIXTURES As String = "Fixtures"
Public Const S_SETUP As String = "SetUp"
- Public Const K_ACTIVEDEFAULT As String = "ActiveDefault"
Public Const K_DEFAULT As String = "Default"
End Module
diff --git a/MachOptionsWindow/MachOptionModule.vb b/MachOptionsWindow/MachOptionModule.vb
index 5adf658..ca56773 100644
--- a/MachOptionsWindow/MachOptionModule.vb
+++ b/MachOptionsWindow/MachOptionModule.vb
@@ -1,7 +1,5 @@
Module MachOptionModule
- ' Parametro che indica se è attivo l'attrezzaggio di default
- Friend m_bIsActiveDefaultSetUp As Boolean
' Parametro che indica quale è l'attrezzaggio di default correntemente selezionato
Friend m_sSelectedDefaultSetUp As String
diff --git a/MachOptionsWindow/MachOptionsView.xaml b/MachOptionsWindow/MachOptionsView.xaml
index aa29d57..786651b 100644
--- a/MachOptionsWindow/MachOptionsView.xaml
+++ b/MachOptionsWindow/MachOptionsView.xaml
@@ -25,8 +25,6 @@
-
-
@@ -46,16 +44,7 @@
-
-
-
-
-
-
-
-
-
-
+
diff --git a/MachOptionsWindow/MachOptionsViewModel.vb b/MachOptionsWindow/MachOptionsViewModel.vb
index ea1586c..c2df512 100644
--- a/MachOptionsWindow/MachOptionsViewModel.vb
+++ b/MachOptionsWindow/MachOptionsViewModel.vb
@@ -38,16 +38,6 @@ 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
@@ -64,7 +54,7 @@ Namespace EgtCAM5
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)
+ EgtUILib.WritePrivateProfileString(S_SETUP, K_DEFAULT, If(Not IsNothing(value), value, String.Empty), IniFile.m_sCurrMachIniFilePath)
End Set
End Property
@@ -80,14 +70,9 @@ 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)
+ Return EgtMsg(MSG_MACHININGOPTIONPAGE + 7)
End Get
End Property
@@ -106,14 +91,13 @@ Namespace EgtCAM5
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
- ' 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
diff --git a/ProjectPage/MachGroupPanel/MachGroupPanelViewModel.vb b/ProjectPage/MachGroupPanel/MachGroupPanelViewModel.vb
index 2de9699..32dc6ca 100644
--- a/ProjectPage/MachGroupPanel/MachGroupPanelViewModel.vb
+++ b/ProjectPage/MachGroupPanel/MachGroupPanelViewModel.vb
@@ -86,7 +86,7 @@ Namespace EgtCAM5
' leggo nome script di disposizione automatica
EgtUILib.GetPrivateProfileString(S_DISPOSITION, K_INITSCRIPT, "", sInitScriptPath, IniFile.m_sCurrMachIniFilePath)
' leggo nome attrezzaggio di default
- EgtUILib.GetPrivateProfileString(S_DISPOSITION, K_ACTIVEDEFAULT, "", sDefaultSetUpPath, IniFile.m_sCurrMachIniFilePath)
+ EgtUILib.GetPrivateProfileString(S_SETUP, K_DEFAULT, "", sDefaultSetUpPath, IniFile.m_sCurrMachIniFilePath)
' se è attivo, uso lo script di disposizione
If bOk AndAlso OptionModule.m_bUseDispositionScript And Not String.IsNullOrEmpty(sInitScriptPath) Then
sInitScriptPath = IniFile.m_sCurrMachScriptsDirPath & "\" & sInitScriptPath
@@ -96,8 +96,8 @@ Namespace EgtCAM5
End If
End If
' se è attiva l'opzione, rendo corrente l'attrezzaggio di default
- If bOk AndAlso MachOptionModule.m_bIsActiveDefaultSetUp And Not String.IsNullOrEmpty(sInitScriptPath) Then
- sDefaultSetUpPath = IniFile.m_sCurrMachScriptsDirPath & "\" & sDefaultSetUpPath
+ If bOk And Not String.IsNullOrEmpty(sDefaultSetUpPath) Then
+ sDefaultSetUpPath = IniFile.m_sCurrMachSetUpDirPath & "\" & sDefaultSetUpPath
'If Not File.Exists(sDefaultSetUpPath) AndAlso Not EgtLuaExecFile(sInitScriptPath) Then
' EgtOutLog("Error executing disposition init script " & sInitScriptPath)
' MessageBox.Show(EgtMsg(MSG_DISPOSITIONERRORS + 1), EgtMsg(MSG_DISPOSITIONERRORS + 2) & " " & sInitScriptPath, MessageBoxButton.OK, MessageBoxImage.Exclamation)