EgtCAM5 :

- Migliorie varie.
This commit is contained in:
Emmanuele Sassi
2016-09-03 15:24:25 +00:00
parent 256ff11cf4
commit 2d665a396a
27 changed files with 625 additions and 335 deletions
+13 -12
View File
@@ -46,9 +46,10 @@ Public Class FamilyToolTreeViewItem
End Get
End Property
Sub New(Name As String)
Sub New(Name As String, ToolFamily As MCH_TF)
MyBase.New(Name)
Me.PictureString = "/Resources/TreeView/Folder.png"
Me.m_ToolType = ToolFamily
End Sub
End Class
@@ -102,18 +103,20 @@ Public Class ToolTreeViewItem
NotifyPropertyChanged("Type")
Else
WriteToolParam()
If EgtTdbIsCurrToolModified() Then ' And Me.IsValid) Or Me.NewTool Then
If EgtTdbIsCurrToolModified() Or Me.NewTool Then
Select Case MsgBox(EgtMsg(MSG_TOOLSERRORS), MsgBoxStyle.YesNo, EgtMsg(MSG_TOOLSERRORS + 1))
Case MsgBoxResult.Yes
'm_NewTool = False
m_NewTool = False
If IsUUID(Path.GetFileNameWithoutExtension(m_Draw)) Then
SaveToolDraw()
End If
EgtTdbSaveCurrTool()
'SaveToolDraw()
EgtTdbSave()
Case MsgBoxResult.No
'If m_NewTool Then
' Application.Msn.NotifyColleagues(Application.REMOVETOOL, Me)
'End If
If m_NewTool Then
Application.Msn.NotifyColleagues(Application.REMOVETOOL, Me)
End If
End Select
End If
@@ -638,7 +641,7 @@ Public Class ToolTreeViewItem
End Property
Private m_IsModifiedDraw As Boolean = False
Private m_Draw As String
Friend m_Draw As String
''' <summary>
''' Property that read and write to the tool's database the Draw
''' </summary>
@@ -1061,9 +1064,8 @@ Public Class ToolTreeViewItem
Return (nErr = 0)
End Function
Private Function SaveToolDraw() As Boolean
Friend Function SaveToolDraw() As Boolean
If m_Type = MCH_TY.DRILL_STD Or m_Type = MCH_TY.SAW_STD Or m_Type = MCH_TY.MILL_STD Then
Dim x = EgtGetCurrentContext()
' nome e direttorio del file da salvare
EgtSetCurrentContext(IniFile.m_ProjectSceneContext)
Dim sDrawName As String = Uuid
@@ -1072,8 +1074,7 @@ Public Class ToolTreeViewItem
EgtTdbGetToolDir(sPath)
sPath = sPath & "\" & sDrawName
' passo all'ambiente di disegno dell'utensile
Dim r = EgtSetCurrentContext(IniFile.m_ToolsDbSceneContext)
Dim y = EgtGetCurrentContext()
EgtSetCurrentContext(IniFile.m_ToolsDbSceneContext)
' nascondo layer ausiliario
Dim nAuxId As Integer = GDB_ID.NULL
nAuxId = EgtGetFirstNameInGroup(EgtGetFirstGroupInGroup(GDB_ID.ROOT), "AUX")