diff --git a/My Project/AssemblyInfo.vb b/My Project/AssemblyInfo.vb index 0895599..3fb58c2 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/ToolsDbWindow/ToolTreeView.vb b/ToolsDbWindow/ToolTreeView.vb index 4430b75..abced9a 100644 --- a/ToolsDbWindow/ToolTreeView.vb +++ b/ToolsDbWindow/ToolTreeView.vb @@ -1773,21 +1773,15 @@ Public Class ToolTreeViewItem Private Function ValidateMaxMat() As Boolean m_MaxMatError = String.Empty - If Not IsNothing(m_MaxMat) Then + If Not IsNothing( m_MaxMat) Then Dim dMaxMat As Double = 0 StringToLen(m_MaxMat, dMaxMat) + ' Non ammesso valore negativo If dMaxMat < EPS_SMALL Then m_MaxMatError = EgtMsg(MSG_TOOLSERRORS + 6) End If - If (Type And MCH_TF.SAWBLADE) = 0 Then - If Not IsNothing(m_Len) Then - Dim dLen As Double = 0 - StringToLen(m_Len, dLen) - If dMaxMat > dLen + EPS_SMALL Then - m_MaxMatError = EgtMsg(MSG_TOOLSERRORS + 7) - End If - End If - Else + ' Per lame + If ( Type And MCH_TF.SAWBLADE) <> 0 Then If Not IsNothing(m_Diam) Then Dim dDiam As Double = 0 StringToLen(m_Diam, dDiam) @@ -1795,14 +1789,22 @@ Public Class ToolTreeViewItem m_MaxMatError = EgtMsg(MSG_TOOLSERRORS + 17) End If End If + ' Per getto d'acqua + ElseIf ( Type And MCH_TF.WATERJET) <> 0 Then + ' Non devo fare controlli + ' Per tutti gli altri + Else + If Not IsNothing(m_Len) Then + Dim dLen As Double = 0 + StringToLen(m_Len, dLen) + If dMaxMat > dLen + EPS_SMALL Then + m_MaxMatError = EgtMsg(MSG_TOOLSERRORS + 7) + End If + End If End If End If - NotifyPropertyChanged("MaxMatErrorMsg") - If String.IsNullOrEmpty(m_MaxMatError) Then - Return True - Else - Return False - End If + NotifyPropertyChanged( "MaxMatErrorMsg") + Return String.IsNullOrEmpty( m_MaxMatError) End Function Private Function ValidateThick() As Boolean