diff --git a/My Project/AssemblyInfo.vb b/My Project/AssemblyInfo.vb index 6868c06..7c5c038 100644 --- a/My Project/AssemblyInfo.vb +++ b/My Project/AssemblyInfo.vb @@ -70,5 +70,5 @@ Imports System.Windows ' by using the '*' as shown below: ' - - + + diff --git a/SetUp/SetUpVM.vb b/SetUp/SetUpVM.vb index b6912cd..d0c8a90 100644 --- a/SetUp/SetUpVM.vb +++ b/SetUp/SetUpVM.vb @@ -231,7 +231,7 @@ Public Class SetUpVM ''' ''' Funzione che carica la lista di utensili ed evidenzia quelli usati nel gruppo di lavorazione corrente ma non attrezzati ''' - Private Sub LoadMachineTools() + Friend Sub LoadMachineTools() ' Creo lista utensili utilizzati dal gruppo di lavorazione corrente Dim UsedToolList As New List(Of String) Dim Machining As Integer = EgtGetFirstOperation() @@ -522,6 +522,18 @@ Public Class SetUpVM Return False End Function + Friend Function ResetModifiedSetUp() As Boolean + For GroupIndex = 0 To PositionGroupList.Count - 1 + For PositionIndex = 0 To PositionGroupList(GroupIndex).PositionList.Count - 1 + For ExitIndex = 0 To PositionGroupList(GroupIndex).PositionList(PositionIndex).ExitToolAssociationList.Count - 1 + Dim CurrExitToolAss As ExitToolAssociation = PositionGroupList(GroupIndex).PositionList(PositionIndex).ExitToolAssociationList(ExitIndex) + CurrExitToolAss.m_IsModifiedTool= False + Next + Next + Next + Return False + End Function + ''' ''' Funzione che verifica se ci sono state modifiche all'attrezzaggio corrente e permette di attivare e disattivare il bottone applica ''' diff --git a/SetUpDb/SetUpDbVM.vb b/SetUpDb/SetUpDbVM.vb index 3bff536..8019855 100644 --- a/SetUpDb/SetUpDbVM.vb +++ b/SetUpDb/SetUpDbVM.vb @@ -35,6 +35,7 @@ Public Class SetUpDbVM End Select End If m_SelSetUp = value + m_IsNew = False m_SetUpVM.LoadSetupFromFile(m_SelSetUp, True) NotifyPropertyChanged("SelSetUp") End Set @@ -42,6 +43,7 @@ Public Class SetUpDbVM Private Sub SetSelSetup(SetupName As String) m_SelSetUp = SetupName m_SetUpVM.LoadSetupFromFile(m_SelSetUp, True) + NotifyPropertyChanged("SelSetUp") End Sub Private m_SetUpVM As New SetUpVM @@ -126,6 +128,9 @@ Public Class SetUpDbVM If Not m_SetUpVM.Save(m_SetUpDir_FilePath & "\" & m_SelSetUp & SETUP_FILEEXTENSION) Then EgtOutLog("Error in setup saving: can't find the directory") MessageBox.Show("Error in saving Setup.", "Error", MessageBoxButton.OK, MessageBoxImage.Error) + Else + m_IsNew = False + m_SetUpVM.ResetModifiedSetUp() End If End Sub @@ -178,6 +183,7 @@ Public Class SetUpDbVM m_SelSetUp = NewSetupName ' resetto tutte le posizioni e lista utensili m_SetUpVM.InitSetUp() + m_SetUpVM.LoadMachineTools() NotifyPropertyChanged("SelSetUp") End Sub diff --git a/SetUpWindow/SetUpV.xaml b/SetUpWindow/SetUpV.xaml deleted file mode 100644 index 60a5620..0000000 --- a/SetUpWindow/SetUpV.xaml +++ /dev/null @@ -1,179 +0,0 @@ - - - - - - - - - - - - - - - -