EgtCAM5 :
- Migliorati Db utensili e lavorazioni. - Corretto errore che non permetteva di scrivere le s nell'inputbox. - Introdotta chiusura automatica degli expander nell'OptionPanel in modalità lavora.
This commit is contained in:
@@ -58,6 +58,8 @@ Public Class ToolTreeViewItem
|
||||
Inherits InheritableTreeViewItem
|
||||
Implements IDataErrorInfo
|
||||
|
||||
#Region "Machining Property"
|
||||
|
||||
' Variabile che indica quando non lanciare l'update del disegno utensile
|
||||
' (utile per evitare di rifare il disegno più volte quando vengono caricati i parametri alla selezione di un utensile)
|
||||
Private m_SuspendToolDrawUpdate As Boolean = False
|
||||
@@ -89,6 +91,9 @@ Public Class ToolTreeViewItem
|
||||
End Set
|
||||
End Property
|
||||
|
||||
''' <summary>
|
||||
''' Property that determines if the Tool is selected or not
|
||||
''' </summary>
|
||||
Public Overrides Property IsSelected As Boolean
|
||||
Get
|
||||
Return m_IsSelected
|
||||
@@ -132,11 +137,6 @@ Public Class ToolTreeViewItem
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Sub New(Name As String)
|
||||
MyBase.New(Name)
|
||||
Me.PictureString = "/Resources/TreeView/Folder.png"
|
||||
End Sub
|
||||
|
||||
Private m_IsModifiedCorr As Boolean = False
|
||||
Private m_Corr As Integer
|
||||
''' <summary>
|
||||
@@ -232,7 +232,7 @@ Public Class ToolTreeViewItem
|
||||
EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
|
||||
EgtTdbGetCurrToolParam(MCH_TP.CORNRAD, DbCornRad)
|
||||
StringToLen(value, dValue)
|
||||
m_IsModifiedCornRad = If(dValue <> DbCornRad, True, False)
|
||||
m_IsModifiedCornRad = Math.Abs(dValue - DbCornRad) > 10 * EPS_ANG_SMALL
|
||||
NotifyPropertyChanged("CornRad")
|
||||
End If
|
||||
End Set
|
||||
@@ -255,7 +255,7 @@ Public Class ToolTreeViewItem
|
||||
EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
|
||||
EgtTdbGetCurrToolParam(MCH_TP.DIAM, DbDiam)
|
||||
StringToLen(value, dValue)
|
||||
m_IsModifiedDiam = If(dValue <> DbDiam, True, False)
|
||||
m_IsModifiedDiam = Math.Abs(dValue - DbDiam) > 10 * EPS_ANG_SMALL
|
||||
If Not m_SuspendToolDrawUpdate Then
|
||||
UpdateSceneToolDraw(DrawUpdateSource.DIAM)
|
||||
End If
|
||||
@@ -281,7 +281,7 @@ Public Class ToolTreeViewItem
|
||||
EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
|
||||
EgtTdbGetCurrToolParam(MCH_TP.TOTDIAM, DbTotDiam)
|
||||
StringToLen(value, dValue)
|
||||
m_IsModifiedTotDiam = If(dValue <> DbTotDiam, True, False)
|
||||
m_IsModifiedTotDiam = Math.Abs(dValue - DbTotDiam) > 10 * EPS_SMALL
|
||||
NotifyPropertyChanged("TotDiam")
|
||||
End If
|
||||
End Set
|
||||
@@ -304,7 +304,7 @@ Public Class ToolTreeViewItem
|
||||
EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
|
||||
EgtTdbGetCurrToolParam(MCH_TP.FEED, DbFeed)
|
||||
StringToLen(value, dValue)
|
||||
m_IsModifiedFeed = If(dValue <> DbFeed, True, False)
|
||||
m_IsModifiedFeed = Math.Abs(dValue - DbFeed) > 10 * EPS_SMALL
|
||||
NotifyPropertyChanged("Feed")
|
||||
End If
|
||||
End Set
|
||||
@@ -327,7 +327,7 @@ Public Class ToolTreeViewItem
|
||||
EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
|
||||
EgtTdbGetCurrToolParam(MCH_TP.ENDFEED, DbEndFeed)
|
||||
StringToLen(value, dValue)
|
||||
m_IsModifiedEndFeed = If(dValue <> DbEndFeed, True, False)
|
||||
m_IsModifiedEndFeed = Math.Abs(dValue - DbEndFeed) > 10 * EPS_SMALL
|
||||
NotifyPropertyChanged("EndFeed")
|
||||
End If
|
||||
End Set
|
||||
@@ -350,7 +350,7 @@ Public Class ToolTreeViewItem
|
||||
EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
|
||||
EgtTdbGetCurrToolParam(MCH_TP.STARTFEED, DbStartFeed)
|
||||
StringToLen(value, dValue)
|
||||
m_IsModifiedStartFeed = If(dValue <> DbStartFeed, True, False)
|
||||
m_IsModifiedStartFeed = Math.Abs(dValue - DbStartFeed) > 10 * EPS_SMALL
|
||||
NotifyPropertyChanged("StartFeed")
|
||||
End If
|
||||
End Set
|
||||
@@ -373,7 +373,7 @@ Public Class ToolTreeViewItem
|
||||
EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
|
||||
EgtTdbGetCurrToolParam(MCH_TP.TIPFEED, DbTipFeed)
|
||||
StringToLen(value, dValue)
|
||||
m_IsModifiedTipFeed = If(dValue <> DbTipFeed, True, False)
|
||||
m_IsModifiedTipFeed = Math.Abs(dValue - DbTipFeed) > 10 * EPS_SMALL
|
||||
NotifyPropertyChanged("TipFeed")
|
||||
End If
|
||||
End Set
|
||||
@@ -396,7 +396,7 @@ Public Class ToolTreeViewItem
|
||||
EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
|
||||
EgtTdbGetCurrToolParam(MCH_TP.LEN, DbLen)
|
||||
StringToLen(value, dValue)
|
||||
m_IsModifiedLen = If(dValue <> DbLen, True, False)
|
||||
m_IsModifiedLen = Math.Abs(dValue - DbLen) > 10 * EPS_SMALL
|
||||
If Not m_SuspendToolDrawUpdate Then
|
||||
UpdateSceneToolDraw(DrawUpdateSource.LEN)
|
||||
End If
|
||||
@@ -422,7 +422,7 @@ Public Class ToolTreeViewItem
|
||||
EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
|
||||
EgtTdbGetCurrToolParam(MCH_TP.TOTLEN, DbTotLen)
|
||||
StringToLen(value, dValue)
|
||||
m_IsModifiedTotLen = If(dValue <> DbTotLen, True, False)
|
||||
m_IsModifiedTotLen = Math.Abs(dValue - DbTotLen) > 10 * EPS_SMALL
|
||||
If Not m_SuspendToolDrawUpdate Then
|
||||
UpdateSceneToolDraw(DrawUpdateSource.TOTLEN)
|
||||
End If
|
||||
@@ -448,7 +448,7 @@ Public Class ToolTreeViewItem
|
||||
EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
|
||||
EgtTdbGetCurrToolParam(MCH_TP.MAXMAT, DbMaxMat)
|
||||
StringToLen(value, dValue)
|
||||
m_IsModifiedMaxMat = If(dValue <> DbMaxMat, True, False)
|
||||
m_IsModifiedMaxMat = Math.Abs(dValue - DbMaxMat) > 10 * EPS_SMALL
|
||||
If Not m_SuspendToolDrawUpdate Then
|
||||
UpdateSceneToolDraw(DrawUpdateSource.MAXMAT)
|
||||
End If
|
||||
@@ -474,7 +474,7 @@ Public Class ToolTreeViewItem
|
||||
EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
|
||||
EgtTdbGetCurrToolParam(MCH_TP.LONOFFSET, DbLonOffset)
|
||||
StringToLen(value, dValue)
|
||||
m_IsModifiedLonOffset = If(dValue <> DbLonOffset, True, False)
|
||||
m_IsModifiedLonOffset = Math.Abs(dValue - DbLonOffset) > 10 * EPS_SMALL
|
||||
NotifyPropertyChanged("LonOffset")
|
||||
End If
|
||||
End Set
|
||||
@@ -497,7 +497,7 @@ Public Class ToolTreeViewItem
|
||||
EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
|
||||
EgtTdbGetCurrToolParam(MCH_TP.RADOFFSET, DbRadOffset)
|
||||
StringToLen(value, dValue)
|
||||
m_IsModifiedRadOffset = If(dValue <> DbRadOffset, True, False)
|
||||
m_IsModifiedRadOffset = Math.Abs(dValue - DbRadOffset) > 10 * EPS_SMALL
|
||||
NotifyPropertyChanged("RadOffset")
|
||||
End If
|
||||
End Set
|
||||
@@ -519,8 +519,8 @@ Public Class ToolTreeViewItem
|
||||
Dim dValue As Double = 0
|
||||
EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
|
||||
EgtTdbGetCurrToolParam(MCH_TP.SPEED, DbSpeed)
|
||||
StringToLen(value, dValue)
|
||||
m_IsModifiedSpeed = If(dValue <> DbSpeed, True, False)
|
||||
StringToDouble(value, dValue)
|
||||
m_IsModifiedSpeed = Math.Abs(dValue - DbSpeed) > 10 * EPS_ANG_SMALL
|
||||
NotifyPropertyChanged("Speed")
|
||||
NotifyPropertyChanged("MaxSpeed")
|
||||
End If
|
||||
@@ -544,7 +544,7 @@ Public Class ToolTreeViewItem
|
||||
EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
|
||||
EgtTdbGetCurrToolParam(MCH_TP.SIDEANG, DbSideAng)
|
||||
StringToLen(value, dValue)
|
||||
m_IsModifiedSideAng = If(dValue <> DbSideAng, True, False)
|
||||
m_IsModifiedSideAng = Math.Abs(dValue - DbSideAng) > 10 * EPS_ANG_SMALL
|
||||
NotifyPropertyChanged("SideAng")
|
||||
End If
|
||||
End Set
|
||||
@@ -567,7 +567,7 @@ Public Class ToolTreeViewItem
|
||||
EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
|
||||
EgtTdbGetCurrToolParam(MCH_TP.MAXSPEED, DbMaxSpeed)
|
||||
StringToLen(value, dValue)
|
||||
m_IsModifiedMaxSpeed = If(dValue <> DbMaxSpeed, True, False)
|
||||
m_IsModifiedMaxSpeed = Math.Abs(dValue - DbMaxSpeed) > 10 * EPS_ANG_SMALL
|
||||
NotifyPropertyChanged("Speed")
|
||||
NotifyPropertyChanged("MaxSpeed")
|
||||
End If
|
||||
@@ -591,7 +591,7 @@ Public Class ToolTreeViewItem
|
||||
EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
|
||||
EgtTdbGetCurrToolParam(MCH_TP.THICK, DbThick)
|
||||
StringToLen(value, dValue)
|
||||
m_IsModifiedThick = If(dValue <> DbThick, True, False)
|
||||
m_IsModifiedThick = Math.Abs(dValue - DbThick) > 10 * EPS_SMALL
|
||||
If Not m_SuspendToolDrawUpdate Then
|
||||
UpdateSceneToolDraw(DrawUpdateSource.THICK)
|
||||
End If
|
||||
@@ -617,7 +617,7 @@ Public Class ToolTreeViewItem
|
||||
EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
|
||||
EgtTdbGetCurrToolParam(MCH_TP.MAXABSORPTION, DbMaxAbsorption)
|
||||
StringToLen(value, dValue)
|
||||
m_IsModifiedMaxAbsorption = If(dValue <> DbMaxAbsorption, True, False)
|
||||
m_IsModifiedMaxAbsorption = Math.Abs(dValue - DbMaxAbsorption) > 10 * EPS_SMALL
|
||||
NotifyPropertyChanged("MaxAbsorption")
|
||||
End If
|
||||
End Set
|
||||
@@ -640,7 +640,7 @@ Public Class ToolTreeViewItem
|
||||
EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
|
||||
EgtTdbGetCurrToolParam(MCH_TP.MINFEED, DbMinFeed)
|
||||
StringToLen(value, dValue)
|
||||
m_IsModifiedMinFeed = If(dValue <> DbMinFeed, True, False)
|
||||
m_IsModifiedMinFeed = Math.Abs(dValue - DbMinFeed) > 10 * EPS_SMALL
|
||||
NotifyPropertyChanged("MinFeed")
|
||||
End If
|
||||
End Set
|
||||
@@ -699,7 +699,7 @@ Public Class ToolTreeViewItem
|
||||
|
||||
' Variabile che indica se c'è un errore nel nome dell'utensile (ad esempio nome già utilizzato)
|
||||
Dim bErrorToolName As Boolean = False
|
||||
Private m_IsModifiedName As Boolean = False
|
||||
Friend m_IsModifiedName As Boolean = False
|
||||
''' <summary>
|
||||
''' Property that read and write to the tool's database the Name
|
||||
''' </summary>
|
||||
@@ -780,6 +780,18 @@ Public Class ToolTreeViewItem
|
||||
End Get
|
||||
End Property
|
||||
|
||||
#End Region ' Machining Property
|
||||
|
||||
#Region "Constructors"
|
||||
|
||||
Sub New(Name As String)
|
||||
MyBase.New(Name)
|
||||
End Sub
|
||||
|
||||
#End Region ' Constructors
|
||||
|
||||
#Region "METHODS"
|
||||
|
||||
Friend Sub ReadToolParam()
|
||||
EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
|
||||
' sospendo l'aggiornamento del disegno per evitare di rifarlo al cambio di ogni parametro inerente
|
||||
@@ -907,6 +919,8 @@ Public Class ToolTreeViewItem
|
||||
EgtTdbSetCurrToolParam(MCH_TP.NAME, NamePar)
|
||||
End Sub
|
||||
|
||||
#End Region ' Methods
|
||||
|
||||
#Region "ToolSceneUpdate"
|
||||
|
||||
' Enum che indica le proprietà di disegno dell'utensile
|
||||
@@ -1185,7 +1199,6 @@ Public Class ToolTreeViewItem
|
||||
m_IsModifiedTcPos = False
|
||||
End Sub
|
||||
|
||||
|
||||
Private Shared ReadOnly ValidatedProperties() As String = {"Draw", "MaxMat", "Thick", "Diam", "Len", "TotLen", "Speed", "NamePar"}
|
||||
|
||||
Private Function GetValidationError(ByVal propertyName As String) As String
|
||||
@@ -1366,7 +1379,6 @@ Public Class ToolTreeViewItem
|
||||
If Math.Abs(dSpeed) > dMaxSpeed + EPS_ZERO Then
|
||||
Return EgtMsg(MSG_TOOLSERRORS + 11)
|
||||
End If
|
||||
|
||||
End If
|
||||
Return Nothing
|
||||
End Function
|
||||
|
||||
Reference in New Issue
Block a user