diff --git a/My Project/AssemblyInfo.vb b/My Project/AssemblyInfo.vb index fe5409a..279e54e 100644 --- a/My Project/AssemblyInfo.vb +++ b/My Project/AssemblyInfo.vb @@ -62,5 +62,5 @@ Imports System.Windows ' by using the '*' as shown below: ' - - \ No newline at end of file + + \ No newline at end of file diff --git a/ToolDbWindow/ToolTreeView.vb b/ToolDbWindow/ToolTreeView.vb index bc40e13..9cc7c67 100644 --- a/ToolDbWindow/ToolTreeView.vb +++ b/ToolDbWindow/ToolTreeView.vb @@ -199,7 +199,7 @@ Public Class ToolTreeViewItem End Get Set(value As Integer) If value <> m_SelectedExit Then - If Not IsNothing(ExitList) Then + If Not IsNothing( ExitList) AndAlso ExitList.Count() > 0 Then m_SelectedExit = value If SelectedExit <> -1 Then Dim DbExit As Integer = 0 @@ -999,21 +999,6 @@ Public Class ToolTreeViewItem ' ricalcolo la lista uscite Dim nErr As Integer = 0 Dim bIsValid As Boolean = False - 'm_ExitList.Clear() - 'For ExitIndex = 1 To nExitNum - ' EgtLuaSetGlobStringVar("STU.HEAD", m_SelectedHead.HName) - ' EgtLuaSetGlobIntVar("STU.TYPE", m_Type) - ' If EgtLuaCallFunction("STU.IsValidExit") Then - ' ' Leggo variabili - ' EgtLuaGetGlobBoolVar("STU.ISVALID", bIsValid) - ' If Not EgtLuaGetGlobIntVar("STU.ERR", nErr) Then nErr = 999 - ' If nErr = 0 AndAlso bIsValid Then - ' m_ExitList.Add(New IdNameStruct(ExitIndex, (ExitIndex).ToString)) - ' End If - ' Else - ' m_ExitList.Add(New IdNameStruct(ExitIndex, (ExitIndex).ToString)) - ' End If - 'Next If nExitNum > m_ExitList.Count Then For ExitIndex = m_ExitList.Count To nExitNum - 1 @@ -1037,7 +1022,7 @@ Public Class ToolTreeViewItem Next End If ' verifico se l'uscita selezionata รจ nella lista - If Not m_ExitList.Count > m_SelectedExit AndAlso m_ExitList.Count > 0 Then ' If Not m_ExitList.Contains(m_SelectedExit) AndAlso m_ExitList.Count > 0 Then + If Not m_ExitList.Count > m_SelectedExit AndAlso m_ExitList.Count > 0 Then SelectedExit = 0 ' m_ExitList(0) End If ' ricalcolo la lista di posizioni valide @@ -2209,14 +2194,7 @@ Public Class ToolTreeViewItem Next ValidateProperty("SelectedHead") EgtTdbGetCurrToolParam(MCH_TP.EXIT_, nValue) - SelectedExit = If(IsNothing(ExitList), nValue, IdNameStruct.IndFromId(nValue, ExitList)) - 'EgtTdbGetCurrToolParam(MCH_TP.EXIT_, nValue) - 'For ExitIndex = 0 To m_ExitList.Count - 1 - ' If m_ExitList(ExitIndex).Id = nValue Then - ' m_SelectedExit = m_ExitList(ExitIndex) - ' Exit For - ' End If - 'Next + SelectedExit = If( IsNothing( ExitList), nValue, IdNameStruct.IndFromId(nValue, ExitList)) m_IsModifiedSelectedExit = False ValidateProperty("SelectedExit") EgtTdbGetCurrToolParam(MCH_TP.USERNOTES, sValue) @@ -2236,13 +2214,6 @@ Public Class ToolTreeViewItem m_SelectedTcPos = -1 EgtTdbSetCurrToolParam(MCH_TP.TCPOS, String.Empty) End If - 'If m_TcPosList.Contains(sValue) Then - ' m_SelectedTcPos = sValue - ' m_IsModifiedSelectedTcPos = False - 'Else - ' m_SelectedTcPos = Nothing - ' EgtTdbSetCurrToolParam(MCH_TP.TCPOS, String.Empty) - 'End If NotifyPropertyChanged("SelectedTcPos") EgtTdbGetCurrToolParam(MCH_TP.UUID, sValue) m_Uuid = sValue