diff --git a/Application.xaml.vb b/Application.xaml.vb
index 86b98a4..6b49f76 100644
--- a/Application.xaml.vb
+++ b/Application.xaml.vb
@@ -175,6 +175,7 @@ Class Application
Friend Const SIMULATIONEXPANDER_GET_ISEXPANDED As String = "Get_SimulationExpander_IsExpanded"
Friend Const SIMULATIONEXPANDER_SET_ISEXPANDED As String = "Set_SimulationExpander_IsExpanded"
Friend Const CANCELOPERATIONCOMMAND As String = "CancelOperationCommand"
+ Friend Const UPDATEOPERATIONMACHININGLIST As String = "UpdateOperationMachiningList"
' StatusBar messages
Friend Const STATUSGRIDCOMMAND As String = "StatusGridCommand"
diff --git a/EgtCAM5.vbproj b/EgtCAM5.vbproj
index a5dddc1..e15ec6c 100644
--- a/EgtCAM5.vbproj
+++ b/EgtCAM5.vbproj
@@ -176,6 +176,9 @@
MachGroupPanelView.xaml
+
+ MachiningTreeExpanderView.xaml
+
PopUpGridPanelView.xaml
@@ -552,6 +555,9 @@
+
+
+
IF "$(PlatformName)"=="x86" IF "$(ConfigurationName)" == "Release" copy $(TargetPath) c:\EgtProg\EgtCAM5\EgtCAM5R32.exe
diff --git a/MachiningsDbWindow/MachiningTreeView.vb b/MachiningsDbWindow/MachiningTreeView.vb
index 3ab15fe..d5c423f 100644
--- a/MachiningsDbWindow/MachiningTreeView.vb
+++ b/MachiningsDbWindow/MachiningTreeView.vb
@@ -1367,8 +1367,8 @@ Public Class MachiningTreeViewItem
EgtTdbGetCurrToolParam(MCH_TP.RADOFFSET, dVal)
OffSl = LenToString(dVal, 4)
End If
- NotifyPropertyChanged("SelectedTool")
End If
+ NotifyPropertyChanged("SelectedTool")
End If
End Set
End Property
diff --git a/MachiningsDbWindow/MachiningsDbViewModel.vb b/MachiningsDbWindow/MachiningsDbViewModel.vb
index afa6978..2c61c19 100644
--- a/MachiningsDbWindow/MachiningsDbViewModel.vb
+++ b/MachiningsDbWindow/MachiningsDbViewModel.vb
@@ -666,6 +666,7 @@ Namespace EgtCAM5
End If
' Salvataggio DB lavorazioni
EgtMdbSave()
+ Application.Msn.NotifyColleagues(Application.UPDATEOPERATIONMACHININGLIST)
' Chiusura finestra
For Each Window In Application.Current.Windows
If TypeOf Window Is MachiningsDbView Then
diff --git a/My Project/AssemblyInfo.vb b/My Project/AssemblyInfo.vb
index 0aa5b5b..adb9bf3 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/ProjectPage/OptionPanel/DrawOptionPanel/ManageLayerExpander/ManageLayerExpanderViewModel.vb b/ProjectPage/OptionPanel/DrawOptionPanel/ManageLayerExpander/ManageLayerExpanderViewModel.vb
index 887b53d..531c39a 100644
--- a/ProjectPage/OptionPanel/DrawOptionPanel/ManageLayerExpander/ManageLayerExpanderViewModel.vb
+++ b/ProjectPage/OptionPanel/DrawOptionPanel/ManageLayerExpander/ManageLayerExpanderViewModel.vb
@@ -743,7 +743,7 @@ Namespace EgtCAM5
Case GDB_TY.SRF_MESH
Return "/Resources/TreeView/STriMesh.ico"
Case GDB_TY.SRF_FRGN
- Return "/Resources/TreeView/Folder.png"
+ Return "/Resources/TreeView/SFlatRegion.ico"
Case GDB_TY.EXT_TEXT
Return "/Resources/TreeView/Text.ico"
End Select
diff --git a/ProjectPage/OptionPanel/MachiningOptionPanel/MachiningsTreeViewExpander/MachiningTreeExpanderView.xaml.vb b/ProjectPage/OptionPanel/MachiningOptionPanel/MachiningsTreeViewExpander/MachiningTreeExpanderView.xaml.vb
new file mode 100644
index 0000000..a52cae9
--- /dev/null
+++ b/ProjectPage/OptionPanel/MachiningOptionPanel/MachiningsTreeViewExpander/MachiningTreeExpanderView.xaml.vb
@@ -0,0 +1,13 @@
+Public Class MachiningTreeExpanderView
+
+ ' Evento necessario per impedire che venga creata la lavorazione quando si fa doppio click sulla ScrollBar
+ Private Sub MachiningsTreeView_MouseDoubleClick(sender As Object, e As System.Windows.Input.MouseButtonEventArgs) Handles MachiningsTreeView.MouseDoubleClick
+ Dim src As DependencyObject = VisualTreeHelper.GetParent(DirectCast(e.OriginalSource, DependencyObject))
+
+ ' Your logic here
+ If TypeOf src Is Control AndAlso src.[GetType]() <> GetType(Grid) Then
+ e.Handled = True
+ End If
+ End Sub
+
+End Class
diff --git a/ProjectPage/OptionPanel/MachiningOptionPanel/MachiningsTreeViewExpander/MachiningTreeExpanderViewModel.vb b/ProjectPage/OptionPanel/MachiningOptionPanel/MachiningsTreeViewExpander/MachiningTreeExpanderViewModel.vb
index f80fc2b..47386d2 100644
--- a/ProjectPage/OptionPanel/MachiningOptionPanel/MachiningsTreeViewExpander/MachiningTreeExpanderViewModel.vb
+++ b/ProjectPage/OptionPanel/MachiningOptionPanel/MachiningsTreeViewExpander/MachiningTreeExpanderViewModel.vb
@@ -49,7 +49,7 @@ Namespace EgtCAM5
' Per caricare l'albero la prima volta che viene aperto
IsEnabled = False
LoadSelectedMachineMachinings()
- Application.Msn.Register(Application.MACHININGMODE_ISCHECKED, Sub()
+ Application.Msn.Register(Application.UPDATEOPERATIONMACHININGLIST, Sub()
m_MachiningsList.Clear()
LoadSelectedMachineMachinings()
End Sub)
diff --git a/ProjectPage/OptionPanel/MachiningOptionPanel/OperationExpander/OperationExpanderViewModel.vb b/ProjectPage/OptionPanel/MachiningOptionPanel/OperationExpander/OperationExpanderViewModel.vb
index 7695dbb..c7756a5 100644
--- a/ProjectPage/OptionPanel/MachiningOptionPanel/OperationExpander/OperationExpanderViewModel.vb
+++ b/ProjectPage/OptionPanel/MachiningOptionPanel/OperationExpander/OperationExpanderViewModel.vb
@@ -198,12 +198,15 @@ Namespace EgtCAM5
EgtResetMark(m_LastMarkedOperationId)
' Ne deseleziono la geometria
EgtDeselectAll()
- EgtDraw()
+ End If
+ ' Imposto la fase di lavorazione corrente
+ Dim nPhase As Integer = EgtGetOperationPhase(value.Id)
+ If nPhase <> 0 Then
+ EgtSetCurrPhase(nPhase)
End If
' Verifico se l'operazione è una disposizione
If EgtGetOperationType(value.Id) = MCH_OY.DISP Then
-
- ' L'operazione è una lavorazione
+ ' L'operazione è una lavorazione
Else
' Imposto come corrente la lavorazione(operazione) selezionata
EgtSetCurrMachining(value.Id)
@@ -219,12 +222,13 @@ Namespace EgtCAM5
End If
CountIndex += 1
End While
- EgtDraw()
' La salvo come ultima operazione selezionata
m_LastMarkedOperationId = value.Id
' Notifico l'operazione selezionata all'expander dei parametri operazione
Application.Msn.NotifyColleagues(Application.SELECTEDOPERATION, value)
End If
+ ' Aggiorno visualizzazione
+ EgtDraw()
End If
m_SelectedOperation = value
End If
@@ -691,6 +695,8 @@ Namespace EgtCAM5
ListIsExpanded = True
Else
If Not IsNothing(SelectedOperation) Then
+ ' Salvo indice operazione selezionata
+ Dim nPrevOperId As Integer = EgtGetPrevOperation(SelectedOperation.Id)
' Smarco e deseleziono la geometria selezionata
EgtResetMark(m_LastMarkedOperationId)
EgtDeselectAll()
@@ -698,7 +704,7 @@ Namespace EgtCAM5
' Rimuovo l'operazione selezionata
EgtRemoveOperation(SelectedOperation.Id)
' Ricarico la lista delle operazioni
- Application.Msn.NotifyColleagues(Application.LOADOPERATIONLIST, -1)
+ Application.Msn.NotifyColleagues(Application.LOADOPERATIONLIST, nPrevOperId)
End If
End If
End Sub
@@ -871,7 +877,7 @@ Namespace EgtCAM5
#Region "ReloadMachiningCommand"
'''
- ''' Returns a command that do Point.
+ ''' Restituisce funzione per ricalcolo lavorazione.
'''
Public ReadOnly Property ReloadMachiningCommand As ICommand
Get
@@ -883,14 +889,11 @@ Namespace EgtCAM5
End Property
'''
- ''' Execute the Point. This method is invoked by the PointCommand.
+ ''' Ricalcola una lavorazione.
'''
Public Sub ReloadMachining(ByVal param As Object)
' Aggiorno valore depth
SelectedOperation.NotifyPropertyChanged("Depth")
- ' Verifico se la geometria è cambiata
- ' Parametro che indica se ci sono state modifiche
- Dim ModifiedGeometry As Boolean = False
' Carico tutta la geometria selezionata in una lista
Dim SelectedGeometry As New List(Of Integer)
Dim EntityIndex As Integer = EgtGetFirstSelectedObj()
@@ -898,16 +901,20 @@ Namespace EgtCAM5
SelectedGeometry.Add(EntityIndex)
EntityIndex = EgtGetNextSelectedObj()
End While
- ' Carico un elemento della geometria di lavorazione
- Dim CountIndex = 0
+ ' Verifico se la geometria è cambiata, confrontando selezione attuale con geometria di lavorazione
+ Dim ModifiedGeometry As Boolean = False
+ Dim CountIndex As Integer = 0
EntityIndex = 0
- Dim SubEntityIndex As Integer = 0 ' Nell'interfaccia non si usa ma devo comunque definirla perchè la funzione la restituisce obbligatoriamente
+ Dim SubEntityIndex As Integer = 0 ' Sottocomponente, per ora non usato ma necessario
While EgtGetMachiningGeometry(CountIndex, EntityIndex, SubEntityIndex)
- If SubEntityIndex = GDB_ID.NULL Then
- If SelectedGeometry.IndexOf(EntityIndex) < 0 Then
+ If SubEntityIndex = GDB_ID.NULL And CountIndex < SelectedGeometry.Count() Then
+ If SelectedGeometry(CountIndex) <> EntityIndex Then
ModifiedGeometry = True
Exit While
End If
+ Else
+ ModifiedGeometry = True
+ Exit While
End If
CountIndex += 1
End While
@@ -916,8 +923,6 @@ Namespace EgtCAM5
End If
' Imposto geometria selezionata come geometria di lavorazione
If ModifiedGeometry Then EgtSetMachiningGeometry(SelectedGeometry.ToArray)
- ' Verifico se i parametri sono cambiati
-
' Se necessario ricalcolo la lavorazione
EgtApplyMachining(ModifiedGeometry)
EgtDraw()
diff --git a/ProjectPage/OptionPanel/MachiningOptionPanel/OperationExpander/OperationListBox.vb b/ProjectPage/OptionPanel/MachiningOptionPanel/OperationExpander/OperationListBox.vb
index 0dd5e29..b95e891 100644
--- a/ProjectPage/OptionPanel/MachiningOptionPanel/OperationExpander/OperationListBox.vb
+++ b/ProjectPage/OptionPanel/MachiningOptionPanel/OperationExpander/OperationListBox.vb
@@ -162,13 +162,13 @@ Public Class OperationListBoxItem
Public Property OverLap As String
Get
Dim dOverLap As Double = 0
- EgtGetMachiningParam(MCH_MP.OVERLAP, dOverLap)
+ EgtGetMachiningParam(MCH_MP.OVERL, dOverLap)
Return LenToString(dOverLap, 4)
End Get
Set(value As String)
Dim dOverLap As Double = 0
StringToLen(value, dOverLap)
- EgtSetMachiningParam(MCH_MP.OVERLAP, dOverLap)
+ EgtSetMachiningParam(MCH_MP.OVERL, dOverLap)
End Set
End Property
diff --git a/ProjectPage/OptionPanel/OptionPanelViewModel.vb b/ProjectPage/OptionPanel/OptionPanelViewModel.vb
index 267db17..6d2923f 100644
--- a/ProjectPage/OptionPanel/OptionPanelViewModel.vb
+++ b/ProjectPage/OptionPanel/OptionPanelViewModel.vb
@@ -75,6 +75,7 @@ Namespace EgtCAM5
Application.Msn.Register(Application.MACHININGMODE_ISCHECKED, Sub()
m_DrawIsChecked = False
m_MachiningIsChecked = True
+ EgtZoom(ZM.ALL, False)
OnPropertyChanged("ManageLayerExpander")
OnPropertyChanged("InfoExpander")
OnPropertyChanged("InputExpander")
diff --git a/Resources/TreeView/SFlatRegion.ico b/Resources/TreeView/SFlatRegion.ico
new file mode 100644
index 0000000..70b78d5
Binary files /dev/null and b/Resources/TreeView/SFlatRegion.ico differ
diff --git a/StatusBar/StatusBarViewModel.vb b/StatusBar/StatusBarViewModel.vb
index 2482d95..452cc17 100644
--- a/StatusBar/StatusBarViewModel.vb
+++ b/StatusBar/StatusBarViewModel.vb
@@ -195,7 +195,6 @@ Namespace EgtCAM5
End Sub)
Application.Msn.Register(Application.UPDATESTATUSGRID, Sub(UpdateStatusGridParam As UpdateStatusGridParam)
UpdateStatusGrid(UpdateStatusGridParam.m_bShowGrid, UpdateStatusGridParam.m_bShowGridFrame)
- EgtDraw()
End Sub)
Application.Msn.Register(Application.STATUSCURRPOSTYPETEXT, Sub(sString As String)
CurrPosTypeText = sString
@@ -352,6 +351,7 @@ Namespace EgtCAM5
bGridState = m_bMachiningShowGrid
End If
Application.Msn.NotifyColleagues(Application.UPDATESTATUSGRID, New UpdateStatusGridParam(bGridState, IniFile.m_bShowGridFrame))
+ EgtDraw()
End Sub
'''
diff --git a/TopCommandBar/TopCommandBarViewModel.vb b/TopCommandBar/TopCommandBarViewModel.vb
index 42afb0a..ba69b79 100644
--- a/TopCommandBar/TopCommandBarViewModel.vb
+++ b/TopCommandBar/TopCommandBarViewModel.vb
@@ -123,9 +123,10 @@ Namespace EgtCAM5
End Sub)
Application.Msn.Register(Application.MACHGROUPSRESULT, Sub(bOk As Boolean)
If bOk Then
+ 'EgtZoom(ZM.ALL)
Application.Msn.NotifyColleagues(Application.UPDATECURRENTMACHINE)
Application.Msn.NotifyColleagues(Application.MACHININGMODE_ISCHECKED)
- EgtZoom(ZM.ALL)
+ Application.Msn.NotifyColleagues(Application.UPDATEOPERATIONMACHININGLIST)
IniFile.m_ProjectMode = ProjectModeOpt.MACHINING
Else
m_MachiningIsChecked = False