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:
Emmanuele Sassi
2016-09-18 18:11:12 +00:00
parent 0cda7e7d33
commit 3f5f7c9adc
12 changed files with 2067 additions and 86 deletions
+58 -1
View File
@@ -57,6 +57,7 @@ Namespace EgtCAM5
Private m_cmdNew As ICommand
Private m_cmdSave As ICommand
Private m_cmdRemove As ICommand
Private m_cmdCloseToolsDb As ICommand
#Region "MESSAGES"
@@ -391,7 +392,6 @@ Namespace EgtCAM5
ToolCopied.IsSelected = False
ToolCopied.NotifyPropertyChanged("IsSelected")
NewToolItem.IsSelected = True
'NewToolItem.NotifyPropertyChanged("IsSelected")
Exit For
End If
Next
@@ -540,6 +540,63 @@ Namespace EgtCAM5
#End Region ' RemoveCommand
#Region "CloseToolDbCommand"
''' <summary>
''' Returns a command that remove the current selected machining.
''' </summary>
Public ReadOnly Property CloseToolsDbCommand() As ICommand
Get
If m_cmdCloseToolsDb Is Nothing Then
m_cmdCloseToolsDb = New RelayCommand(AddressOf CloseToolsDb)
End If
Return m_cmdCloseToolsDb
End Get
End Property
''' <summary>
''' Manage the MachiningDb closing. This method is invoked by the CloseMachiningDbCommand.
''' </summary>
Public Sub CloseToolsDb(param As Object)
' Verifico se sia selezionata una famiglia
If TypeOf param Is FamilyToolTreeViewItem Then
Return
' Verifico se sia selezionata una lavorazione
ElseIf TypeOf param Is ToolTreeViewItem Then
Dim CurrTool As ToolTreeViewItem = DirectCast(param, ToolTreeViewItem)
If CurrTool.IsValid Then
CurrTool.WriteToolParam()
If EgtTdbIsCurrToolModified() Or CurrTool.m_IsModifiedName Or CurrTool.NewTool Then
Select Case MsgBox(EgtMsg(MSG_TOOLSERRORS), MsgBoxStyle.YesNo, EgtMsg(MSG_TOOLSERRORS + 1))
Case MsgBoxResult.Yes
CurrTool.NewTool = False
CurrTool.m_Name = CurrTool.m_Name.Trim()
CurrTool.WriteToolName()
EgtTdbSaveCurrTool()
Case MsgBoxResult.No
If CurrTool.NewTool Then
Application.Msn.NotifyColleagues(Application.REMOVETOOL, Me)
ElseIf CurrTool.m_IsModifiedName Then
Dim DbName As String = String.Empty
EgtTdbGetCurrToolParam(MCH_TP.NAME, DbName)
CurrTool.NamePar = DbName
End If
End Select
End If
EgtTdbSave()
For Each Window In Application.Current.Windows
If TypeOf Window Is ToolsDbView Then
Dim ToolsDbWindow As ToolsDbView = DirectCast(Window, ToolsDbView)
ToolsDbWindow.Close()
End If
Next
End If
End If
End Sub
#End Region ' CloseToolsDbCommand
End Class
End Namespace