diff --git a/Application.xaml.vb b/Application.xaml.vb
index 06936fa..120e357 100644
--- a/Application.xaml.vb
+++ b/Application.xaml.vb
@@ -48,10 +48,14 @@ Class Application
Friend Const LOADGRIDDATA As String = "LoadGridData"
Friend Const MMUNITSCHANGED As String = "MmUnitsChanged"
- ' GridViewPanel messages
+ ' ShowPanel messages
Friend Const WIREFRAME As String = "Wireframe"
Friend Const HIDDENLINE As String = "HiddenLine"
Friend Const SHADING As String = "Shading"
+ Friend Const SHOWMODESTATE As String = "ShowModeState"
+ Friend Const SHOWCURVEDIR As String = "ShowCurveDir"
+
+ ' GridViewPanel messages
Friend Const ZOOMALL As String = "ZoomAll"
Friend Const ZOOMIN As String = "ZoomIn"
Friend Const ZOOMOUT As String = "ZoomOut"
diff --git a/Constants/ConstMsg.vb b/Constants/ConstMsg.vb
index b962750..d495e5c 100644
--- a/Constants/ConstMsg.vb
+++ b/Constants/ConstMsg.vb
@@ -13,7 +13,9 @@
Public Const MSG_TOOLSDBPAGE As Integer = MSG_EGTCAM5 + 1000
Public Const MSG_TOOLSERRORS As Integer = MSG_EGTCAM5 + 1100
Public Const MSG_MACHININGSDBPAGE As Integer = MSG_EGTCAM5 + 1200
- Public Const MSG_MACHININGSERRORS As Integer = MSG_EGTCAM5 + 1320
+ Public Const MSG_MACHININGSERRORS As Integer = MSG_EGTCAM5 + 1350
+ Public Const MSG_DOORS As Integer = MSG_EGTCAM5 + 3000
+ Public Const MSG_DOORSERRORS As Integer = MSG_EGTCAM5 + 3100
Public Const MSG_MISSINGKEYWD As Integer = 10100
End Module
diff --git a/EgtCAM5Resources.xaml b/EgtCAM5Resources.xaml
index dee9431..a193936 100644
--- a/EgtCAM5Resources.xaml
+++ b/EgtCAM5Resources.xaml
@@ -450,10 +450,11 @@
+
+
-
-
@@ -109,17 +116,8 @@
-
-
-
-
-
-
+
@@ -128,22 +126,12 @@
-
+
-
-
-
-
-
-
@@ -198,15 +186,16 @@
ConverterParameter={StaticResource NamePar}}"/>
-
+ UpdateSourceTrigger=PropertyChanged}"/>
diff --git a/MachiningsDbWindow/MachiningsDbViewModel.vb b/MachiningsDbWindow/MachiningsDbViewModel.vb
index 3b398a1..f27ebc9 100644
--- a/MachiningsDbWindow/MachiningsDbViewModel.vb
+++ b/MachiningsDbWindow/MachiningsDbViewModel.vb
@@ -594,7 +594,9 @@ Namespace EgtCAM5
' Salvo il tipo di lavorazione per poterla cancellare
Dim MachiningType As Integer = MachiningToRemove.Type
' Cancello la lavorazione
- EgtMdbRemoveMachining(MachiningToRemove.Name)
+ Dim CurrMachiningOriginalName As String = String.Empty
+ EgtMdbGetMachiningFromUUID(MachiningToRemove.Uuid, CurrMachiningOriginalName)
+ EgtMdbRemoveMachining(CurrMachiningOriginalName)
' Rimuovo il nome dell'albero
For Each MachiningFamily In MachiningsList
If (MachiningFamily.MachiningType And MachiningType) <> 0 Then
diff --git a/ProjectPage/InstrumentPanel/InstrumentPanelView.xaml b/ProjectPage/InstrumentPanel/InstrumentPanelView.xaml
index 36cf4e9..b5f3fb0 100644
--- a/ProjectPage/InstrumentPanel/InstrumentPanelView.xaml
+++ b/ProjectPage/InstrumentPanel/InstrumentPanelView.xaml
@@ -3,7 +3,7 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
-
+
diff --git a/ProjectPage/InstrumentPanel/InstrumentPanelViewModel.vb b/ProjectPage/InstrumentPanel/InstrumentPanelViewModel.vb
index 4f14615..5609356 100644
--- a/ProjectPage/InstrumentPanel/InstrumentPanelViewModel.vb
+++ b/ProjectPage/InstrumentPanel/InstrumentPanelViewModel.vb
@@ -42,6 +42,20 @@ Namespace EgtCAM5
End Set
End Property
+ Private m_AnalyzeIsEnabled As Boolean
+ Public Property AnalyzeIsEnabled As Boolean
+ Get
+ Return m_AnalyzeIsEnabled
+ End Get
+ Set(value As Boolean)
+ If value <> m_AnalyzeIsEnabled Then
+ m_AnalyzeIsEnabled = value
+ OnPropertyChanged("AnalyzeIsEnabled")
+ End If
+ End Set
+ End Property
+
+
Private m_GetDistIsChecked As Boolean
Public Property GetDistIsChecked As Boolean
Get
@@ -64,6 +78,20 @@ Namespace EgtCAM5
#End Region ' FIELDS & PROPERTIES
+#Region "CONSTRUCTOR"
+
+ Sub New()
+ Application.Msn.Register(Application.MACHININGMODE_ISCHECKED, Sub()
+ AnalyzeIsChecked = False
+ AnalyzeIsEnabled = False
+ End Sub)
+ Application.Msn.Register(Application.DRAWMODE_ISCHECKED, Sub()
+ AnalyzeIsEnabled = True
+ End Sub)
+ End Sub
+
+#End Region ' CONSTRUCTOR
+
End Class
End Namespace
\ No newline at end of file
diff --git a/ProjectPage/OptionPanel/DrawOptionPanel/InfoExpander/InfoExpanderView.xaml b/ProjectPage/OptionPanel/DrawOptionPanel/InfoExpander/InfoExpanderView.xaml
index 4fe3df8..e428588 100644
--- a/ProjectPage/OptionPanel/DrawOptionPanel/InfoExpander/InfoExpanderView.xaml
+++ b/ProjectPage/OptionPanel/DrawOptionPanel/InfoExpander/InfoExpanderView.xaml
@@ -5,7 +5,7 @@
-
+
diff --git a/ProjectPage/OptionPanel/DrawOptionPanel/ManageLayerExpander/ManageLayerExpanderView.xaml b/ProjectPage/OptionPanel/DrawOptionPanel/ManageLayerExpander/ManageLayerExpanderView.xaml
index 62a4bac..2dcb646 100644
--- a/ProjectPage/OptionPanel/DrawOptionPanel/ManageLayerExpander/ManageLayerExpanderView.xaml
+++ b/ProjectPage/OptionPanel/DrawOptionPanel/ManageLayerExpander/ManageLayerExpanderView.xaml
@@ -20,7 +20,7 @@
-
diff --git a/ProjectPage/OptionPanel/MachiningOptionPanel/OperationExpander/OperationExpanderViewModel.vb b/ProjectPage/OptionPanel/MachiningOptionPanel/OperationExpander/OperationExpanderViewModel.vb
index 267ae7c..fcef0e3 100644
--- a/ProjectPage/OptionPanel/MachiningOptionPanel/OperationExpander/OperationExpanderViewModel.vb
+++ b/ProjectPage/OptionPanel/MachiningOptionPanel/OperationExpander/OperationExpanderViewModel.vb
@@ -414,6 +414,7 @@ Namespace EgtCAM5
Application.Msn.Register(Application.LOADOPERATIONLIST, Sub(nSelectedOperation As Integer)
LoadOperationList()
SelectOperation(nSelectedOperation)
+ ListIsExpanded = True
End Sub)
Application.Msn.Register(Application.REMOVEMARKFROMLASTOPERATION, Sub()
EgtResetMark(m_LastMarkedOperationId)
diff --git a/ProjectPage/ProjectView.xaml.vb b/ProjectPage/ProjectView.xaml.vb
index 1c5c21b..e8c4d0a 100644
--- a/ProjectPage/ProjectView.xaml.vb
+++ b/ProjectPage/ProjectView.xaml.vb
@@ -41,6 +41,8 @@ Public Class ProjectView
ViewPanel.Visibility = Visibility.Visible
InstrumentPanel.Visibility = Visibility.Visible
GridPanel.Visibility = Visibility.Visible
+ DbPanel.Visibility = Visibility.Visible
+ ExecutePanel.Visibility = Visibility.Visible
DoorsPanel.Visibility = Visibility.Visible
DrawPanel.Visibility = Visibility.Visible
OptionPanel.Visibility = Visibility.Visible
@@ -50,7 +52,9 @@ Public Class ProjectView
ViewPanel.Visibility = Visibility.Visible
InstrumentPanel.Visibility = Visibility.Visible
GridPanel.Visibility = Visibility.Visible
- DoorsPanel.Visibility = Visibility.Visible
+ DbPanel.Visibility = Visibility.Visible
+ ExecutePanel.Visibility = Visibility.Collapsed
+ DoorsPanel.Visibility = Visibility.Collapsed
DrawPanel.Visibility = Visibility.Collapsed
OptionPanel.Visibility = Visibility.Visible
End Sub)
diff --git a/ProjectPage/ProjectViewModel.vb b/ProjectPage/ProjectViewModel.vb
index a52f2d1..f7a848a 100644
--- a/ProjectPage/ProjectViewModel.vb
+++ b/ProjectPage/ProjectViewModel.vb
@@ -202,16 +202,10 @@ Namespace EgtCAM5
m_ProjectScene.SetGridCursorPos(m_bCPlaneTypePos)
' modo di visualizzazione
Dim nShowMode As Integer = GetPrivateProfileInt(S_SCENE, K_SHOWMODE, SM.SHADING)
- 'If nShowMode = SM.WIREFRAME Then
- ' btnWireFrame.Checked = True
- 'ElseIf nShowMode = SM.HIDDENLINE Then
- ' btnHiddenLine.Checked = True
- 'Else
- ' btnShading.Checked = True
- 'End If
- '' visualizzazione direzione curve
- 'Dim nShowCurveDir As Integer = GetPrivateProfileInt(S_SCENE, K_CURVEDIR, 0, m_sIniFile)
- 'chkCurveDir.Checked = (nShowCurveDir <> 0)
+ Application.Msn.NotifyColleagues(Application.SHOWMODESTATE, nShowMode)
+ ' visualizzazione direzione curve
+ Dim nShowCurveDir As Integer = GetPrivateProfileInt(S_SCENE, K_CURVEDIR, 0)
+ Application.Msn.NotifyColleagues(Application.SHOWCURVEDIR, nShowCurveDir)
' visualizzazione avanzata dei triangoli costituenti le superfici
Dim bShowTriaAdv As Boolean = (GetPrivateProfileInt(S_SCENE, K_SHOWTRIAADV, 1) <> 0)
EgtSetShowTriaAdv(bShowTriaAdv)
@@ -617,26 +611,48 @@ Namespace EgtCAM5
m_Controller.ExportProject(Path.ChangeExtension(m_Controller.GetCurrFile(), "dxf"))
End Sub)
Application.Msn.Register(Application.EXECSCRIPT, Sub()
- 'If (ModifierKeys And Keys.Shift) <> Keys.Shift Then
- Dim sDir As String = String.Empty
- GetPrivateProfileString(S_GENERAL, K_LASTLUADIR, "", sDir)
- m_Controller.Exec(sDir)
- Application.Msn.NotifyColleagues(Application.SELECTIDINOBJTREE, EgtGetCurrLayer())
- 'Else
- ' ShowMenuMruScripts(btnExec, New Point(0, btnExec.Height))
- 'End If
- End Sub)
+ 'If (ModifierKeys And Keys.Shift) <> Keys.Shift Then
+ Dim sDir As String = String.Empty
+ GetPrivateProfileString(S_GENERAL, K_LASTLUADIR, "", sDir)
+ m_Controller.Exec(sDir)
+ Application.Msn.NotifyColleagues(Application.SELECTIDINOBJTREE, EgtGetCurrLayer())
+ If EgtGetCurrMachGroup() <> GDB_ID.NULL Then
+ Application.Msn.NotifyColleagues(Application.SETMACHININGMODE)
+ End If
+ 'Else
+ ' ShowMenuMruScripts(btnExec, New Point(0, btnExec.Height))
+ 'End If
+ End Sub)
Application.Msn.Register(Application.DOORSSCRIPT, Sub()
- Dim bOk As Boolean = ExecDoors(m_ProjectScene)
- OnUpdateUI(Nothing, True)
- Application.Msn.NotifyColleagues(Application.SELECTIDINOBJTREE, EgtGetCurrLayer())
- If Not bOk Then Application.Msn.NotifyColleagues(Application.NOTIFYSTATUSOUTPUT, "Error running Ddf file")
- End Sub)
+ Dim bOk As Boolean = ExecDoors(m_ProjectScene)
+ EgtResetCurrPartLayer()
+ OnUpdateUI(Nothing, True)
+ Application.Msn.NotifyColleagues(Application.SELECTIDINOBJTREE, EgtGetCurrLayer())
+ If Not bOk Then
+ Application.Msn.NotifyColleagues(Application.NOTIFYSTATUSOUTPUT, EgtMsg(MSG_DOORSERRORS + 1))
+ IniFile.m_DDFFilePath = Path.ChangeExtension(IniFile.m_DDFFilePath, ".txt")
+ Dim fileReader As String
+ Try
+ fileReader = My.Computer.FileSystem.ReadAllText(IniFile.m_DDFFilePath)
+ Dim Lines() As String = fileReader.Split(ControlChars.CrLf.ToCharArray(), StringSplitOptions.RemoveEmptyEntries)
+ Dim values() As String = Lines(0).Split(CChar("=")).ToArray
+ Lines(0) = EgtMsg(MSG_DOORSERRORS) & " " & Convert.ToInt32(values(1))
+ fileReader = String.Empty
+ For Index = 1 To Lines.Count - 1
+ fileReader &= (Lines(Index) + ControlChars.CrLf.ToCharArray())
+ Next
+ MessageBox.Show(fileReader, Lines(0).ToUpper, MessageBoxButton.OK, MessageBoxImage.Error)
+ Catch ex As Exception
+ MessageBox.Show("Unknown error")
+ End Try
+ IniFile.m_DDFFilePath = String.Empty
+ End If
+ End Sub)
Application.Msn.Register(Application.DMACHSCRIPT, Sub()
- Dim bOk As Boolean = ExecDoorsMachining(m_ProjectScene)
- OnUpdateUI(Nothing, True)
- If Not bOk Then Application.Msn.NotifyColleagues(Application.NOTIFYSTATUSOUTPUT, "Error running Ddf file")
- End Sub)
+ Dim bOk As Boolean = ExecDoorsMachining(m_ProjectScene)
+ OnUpdateUI(Nothing, True)
+ If Not bOk Then Application.Msn.NotifyColleagues(Application.NOTIFYSTATUSOUTPUT, EgtMsg(MSG_DOORSERRORS + 1))
+ End Sub)
End Sub
diff --git a/ProjectPage/ShowPanel/ShowPanelView.xaml b/ProjectPage/ShowPanel/ShowPanelView.xaml
index 47007b5..425f96a 100644
--- a/ProjectPage/ShowPanel/ShowPanelView.xaml
+++ b/ProjectPage/ShowPanel/ShowPanelView.xaml
@@ -3,13 +3,13 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
-
+
-
+
-
+
diff --git a/ProjectPage/ShowPanel/ShowPanelViewModel.vb b/ProjectPage/ShowPanel/ShowPanelViewModel.vb
index f2c815f..e2e9fc2 100644
--- a/ProjectPage/ShowPanel/ShowPanelViewModel.vb
+++ b/ProjectPage/ShowPanel/ShowPanelViewModel.vb
@@ -39,6 +39,54 @@ Namespace EgtCAM5
#End Region
+ Private m_WireframeIsChecked As Boolean
+ Public Property WireframeIsChecked As Boolean
+ Get
+ Return m_WireframeIsChecked
+ End Get
+ Set(value As Boolean)
+ If value <> m_WireframeIsChecked Then
+ m_WireframeIsChecked = value
+ If value Then
+ Application.Msn.NotifyColleagues(Application.WIREFRAME)
+ OnPropertyChanged("WireframeIsChecked")
+ End If
+ End If
+ End Set
+ End Property
+
+ Private m_HiddenLineIsChecked As Boolean
+ Public Property HiddenLineIsChecked As Boolean
+ Get
+ Return m_HiddenLineIsChecked
+ End Get
+ Set(value As Boolean)
+ If value <> m_HiddenLineIsChecked Then
+ m_HiddenLineIsChecked = value
+ If value Then
+ Application.Msn.NotifyColleagues(Application.HIDDENLINE)
+ OnPropertyChanged("HiddenLineIsChecked")
+ End If
+ End If
+ End Set
+ End Property
+
+ Private m_ShadingIsChecked As Boolean
+ Public Property ShadingIsChecked As Boolean
+ Get
+ Return m_ShadingIsChecked
+ End Get
+ Set(value As Boolean)
+ If value <> m_ShadingIsChecked Then
+ m_ShadingIsChecked = value
+ If value Then
+ Application.Msn.NotifyColleagues(Application.SHADING)
+ OnPropertyChanged("ShadingIsChecked")
+ End If
+ End If
+ End Set
+ End Property
+
Private m_CurveDirIsChecked As Boolean
Public Property CurveDirIsChecked As Boolean
Get
@@ -55,93 +103,25 @@ Namespace EgtCAM5
#End Region ' FIELDS & PROPERTIES
-#Region "COMMANDS"
+#Region "CONSTRUCTOR"
-#Region "WireframeCommand"
+ Sub New()
+ Application.Msn.Register(Application.SHOWMODESTATE, Sub(nShowModeState As Integer)
+ If nShowModeState = SM.WIREFRAME Then
+ WireframeIsChecked = True
+ ElseIf nShowModeState = SM.HIDDENLINE Then
+ HiddenLineIsChecked = True
+ Else
+ ShadingIsChecked = True
+ End If
- '''
- ''' Returns a command that manage the MainWindow_ContentRendered command
- '''
- Public ReadOnly Property WireframeCommand() As ICommand
- Get
- If m_cmdWireframe Is Nothing Then
- m_cmdWireframe = New RelayCommand(AddressOf Wireframe)
- End If
- Return m_cmdWireframe
- End Get
- End Property
-
- '''
- ''' Manage the MainWindow_ContentRendered event. This method is invoked by the cmdMainWindow_ContentRendered.
- '''
- Public Sub Wireframe(ByVal param As Object)
- ' Notify the ContentRendered event
- Application.Msn.NotifyColleagues(Application.WIREFRAME)
+ End Sub)
+ Application.Msn.Register(Application.SHOWCURVEDIR, Sub(nShowCurveDir As Integer)
+ CurveDirIsChecked = (nShowCurveDir <> 0)
+ End Sub)
End Sub
-#End Region ' WireframeCommand
-
-#Region "HiddenLineCommand"
-
- '''
- ''' Returns a command that swith the view mode to HiddenLine.
- '''
- Public ReadOnly Property HiddenLineCommand As ICommand
- Get
- If m_cmdHiddenLine Is Nothing Then
- m_cmdHiddenLine = New RelayCommand(AddressOf HiddenLine, AddressOf CanHiddenLine)
- End If
- Return m_cmdHiddenLine
- End Get
- End Property
-
- '''
- ''' Swith the view mode to HiddenLine. This method is invoked by the HiddenLineCommand.
- '''
- Public Sub HiddenLine(ByVal param As Object)
- Application.Msn.NotifyColleagues(Application.HIDDENLINE)
- End Sub
-
- '''
- ''' Returns always true.
- '''
- Private Function CanHiddenLine(ByVal param As Object) As Boolean
- Return True
- End Function
-
-#End Region ' HiddenLineCommand
-
-#Region "ShadingCommand"
-
- '''
- ''' Returns a command that swith the view mode to Shading.
- '''
- Public ReadOnly Property ShadingCommand As ICommand
- Get
- If m_cmdShading Is Nothing Then
- m_cmdShading = New RelayCommand(AddressOf Shading, AddressOf CanShading)
- End If
- Return m_cmdShading
- End Get
- End Property
-
- '''
- ''' Swith the view mode to Shading. This method is invoked by the ShadingCommand.
- '''
- Public Sub Shading(ByVal param As Object)
- Application.Msn.NotifyColleagues(Application.SHADING)
- End Sub
-
- '''
- ''' Returns always true.
- '''
- Private Function CanShading(ByVal param As Object) As Boolean
- Return True
- End Function
-
-#End Region ' ShadingCommand
-
-#End Region ' COMMANDS
+#End Region ' CONSTRUCTOR
End Class
diff --git a/Special/Doors.vb b/Special/Doors.vb
index 53e870e..3bd4db2 100644
--- a/Special/Doors.vb
+++ b/Special/Doors.vb
@@ -38,6 +38,8 @@ Public Module Doors
scene.Cursor = System.Windows.Forms.Cursors.WaitCursor
' Creazione porta
Dim bOk As Boolean = CreateDoors(sFile, False, False)
+ ' Scrivo il nome del file aperto in una variabile globale per averlo in caso di errore
+ IniFile.m_DDFFilePath = sFile
' Aggiorno la visualizzazione
EgtZoom(ZM.ALL)
' Cursore standard
diff --git a/ToolsDbWindow/ToolTreeView.vb b/ToolsDbWindow/ToolTreeView.vb
index 5ac6c1a..f0c4bc7 100644
--- a/ToolsDbWindow/ToolTreeView.vb
+++ b/ToolsDbWindow/ToolTreeView.vb
@@ -375,6 +375,14 @@ Public Class ToolTreeViewItem
StringToLen(value, dValue)
m_IsModifiedTipFeed = Math.Abs(dValue - DbTipFeed) > 10 * EPS_SMALL
NotifyPropertyChanged("TipFeed")
+ ' Se fresa e 0 non può lavorare di testa
+ If (Type And MCH_TF.MILL) <> 0 Then
+ If dValue > EPS_SMALL Then
+ Type = MCH_TY.MILL_STD
+ Else
+ Type = MCH_TY.MILL_NOTIP
+ End If
+ End If
End If
End Set
End Property
@@ -401,6 +409,16 @@ Public Class ToolTreeViewItem
UpdateSceneToolDraw(DrawUpdateSource.LEN)
End If
NotifyPropertyChanged("Len")
+ ' Se lama e len e totlen coincidono tipo piatto
+ If (Type And MCH_TF.SAWBLADE) <> 0 Then
+ Dim CurrTotLen As Double = 0
+ StringToLen(TotLen, CurrTotLen)
+ If (CurrTotLen - dValue) > 10 * EPS_SMALL Then
+ Type = MCH_TY.SAW_STD
+ Else
+ Type = MCH_TY.SAW_FLAT
+ End If
+ End If
End If
End Set
End Property
@@ -427,6 +445,16 @@ Public Class ToolTreeViewItem
UpdateSceneToolDraw(DrawUpdateSource.TOTLEN)
End If
NotifyPropertyChanged("TotLen")
+ ' Se lama e len e totlen coincidono tipo piatto
+ If (Type And MCH_TF.SAWBLADE) <> 0 Then
+ Dim CurrLen As Double = 0
+ StringToLen(Len, CurrLen)
+ If (dValue - CurrLen) > 10 * EPS_SMALL Then
+ Type = MCH_TY.SAW_STD
+ Else
+ Type = MCH_TY.SAW_FLAT
+ End If
+ End If
End If
End Set
End Property
diff --git a/ToolsDbWindow/ToolsDbViewModel.vb b/ToolsDbWindow/ToolsDbViewModel.vb
index a5fdb39..44c2a3f 100644
--- a/ToolsDbWindow/ToolsDbViewModel.vb
+++ b/ToolsDbWindow/ToolsDbViewModel.vb
@@ -458,7 +458,8 @@ Namespace EgtCAM5
If TypeOf param Is ToolTreeViewItem Then
Dim Tool As ToolTreeViewItem = DirectCast(param, ToolTreeViewItem)
' Verifico che i parametri dell'utensile siano validi
- Return (Tool.IsValid And (Tool.IsModified Or Tool.NewTool))
+ Dim x As Boolean = (Tool.IsValid And (Tool.IsModified Or Tool.NewTool))
+ Return x
Else
Return False
End If
@@ -491,8 +492,9 @@ Namespace EgtCAM5
' Salvo il tipo di utensile per poterlo cancellare
Dim ToolType As Integer = ToolToRemove.Type
' Cancello l'utensile
- EgtTdbRemoveTool(ToolToRemove.Name)
- EgtTdbSave()
+ Dim CurrToolOriginalName As String = String.Empty
+ EgtTdbGetToolFromUUID(ToolToRemove.Uuid, CurrToolOriginalName)
+ EgtTdbRemoveTool(CurrToolOriginalName)
' Rimuovo il nome dell'albero
For Each ToolFamily In ToolsList
If (ToolFamily.ToolType And ToolType) <> 0 Then
@@ -581,6 +583,7 @@ Namespace EgtCAM5
End Select
End If
Else
+ MessageBox.Show("Utensile non valido, correggerlo o cancellarlo prima di uscire.", "ERRORE")
Return
End If
End If
diff --git a/TopCommandBar/TopCommandBarViewModel.vb b/TopCommandBar/TopCommandBarViewModel.vb
index 2d367e0..fd4ad88 100644
--- a/TopCommandBar/TopCommandBarViewModel.vb
+++ b/TopCommandBar/TopCommandBarViewModel.vb
@@ -150,7 +150,7 @@ Namespace EgtCAM5
''' Returns always true.
'''
Private Function CanNew(ByVal param As Object) As Boolean
- Return True
+ Return m_DrawIsChecked
End Function
#End Region ' NewCommand
@@ -180,7 +180,7 @@ Namespace EgtCAM5
''' Returns always true.
'''
Private Function CanOpen(ByVal param As Object) As Boolean
- Return True
+ Return m_DrawIsChecked
End Function
#End Region ' OpenCommand
@@ -193,7 +193,7 @@ Namespace EgtCAM5
Public ReadOnly Property SaveCommand As ICommand
Get
If m_cmdSave Is Nothing Then
- m_cmdSave = New RelayCommand(AddressOf Save, AddressOf CanSave)
+ m_cmdSave = New RelayCommand(AddressOf Save)
End If
Return m_cmdSave
End Get
@@ -206,13 +206,6 @@ Namespace EgtCAM5
Application.Msn.NotifyColleagues(Application.SAVEPROJECT)
End Sub
- '''
- ''' Returns always true.
- '''
- Private Function CanSave(ByVal param As Object) As Boolean
- Return True
- End Function
-
#End Region ' SaveCommand
#Region "SaveAsCommand"
@@ -223,7 +216,7 @@ Namespace EgtCAM5
Public ReadOnly Property SaveAsCommand As ICommand
Get
If m_cmdSaveAs Is Nothing Then
- m_cmdSaveAs = New RelayCommand(AddressOf SaveAs, AddressOf CanSaveAs)
+ m_cmdSaveAs = New RelayCommand(AddressOf SaveAs)
End If
Return m_cmdSaveAs
End Get
@@ -236,13 +229,6 @@ Namespace EgtCAM5
Application.Msn.NotifyColleagues(Application.SAVEASPROJECT)
End Sub
- '''
- ''' Returns always true.
- '''
- Private Function CanSaveAs(ByVal param As Object) As Boolean
- Return True
- End Function
-
#End Region ' SaveAsCommand
#Region "InsertCommand"
@@ -270,7 +256,7 @@ Namespace EgtCAM5
''' Returns always true.
'''
Private Function CanInsert(ByVal param As Object) As Boolean
- Return True
+ Return m_DrawIsChecked
End Function
#End Region ' InsertCommand
@@ -300,7 +286,7 @@ Namespace EgtCAM5
''' Returns always true.
'''
Private Function CanImport(ByVal param As Object) As Boolean
- Return True
+ Return m_DrawIsChecked
End Function
#End Region ' ImportCommand
@@ -330,7 +316,7 @@ Namespace EgtCAM5
''' Returns always true.
'''
Private Function CanExport(ByVal param As Object) As Boolean
- Return True
+ Return m_DrawIsChecked
End Function
#End Region ' ExportCommand