EgtCAM5 :

- Aggiunta possibilità di getire progressbar e output message presenti nella StatusBar da LUA.
- Inizio scrittura della struttura per MTables.
- Aggiunta la possibilità di aggiungere nuovi gruppi di lavorazione.
- Gestita uscita da NewMachiningCmd(in OperationList) con Esc.
This commit is contained in:
Emmanuele Sassi
2016-10-07 10:14:14 +00:00
parent 80e92223c6
commit a312eef399
16 changed files with 276 additions and 63 deletions
@@ -14,6 +14,9 @@
<interactivity:InvokeCommandAction Command="{Binding TreeViewDoubleClickCommand}" CommandParameter="{Binding ElementName=MachiningsTreeView,Path=SelectedItem}"/>
</interactivity:EventTrigger>
</interactivity:Interaction.Triggers>
<TreeView.InputBindings>
<KeyBinding Key="Escape" Command="{Binding CancelNewCommand}" CommandParameter="Escape"/>
</TreeView.InputBindings>
<TreeView.Resources>
<!--Modifico HierarchicalDataTemplate del CathegoryItem per poter inserire immagine e testo e per -->
<!--renderlo apribile con un solo click -->
@@ -39,6 +39,7 @@ Namespace EgtCAM5
' Definizione comandi
Private m_cmdTreeViewDoubleClick As ICommand
Private m_cmdCancelNew As ICommand
#End Region
@@ -135,6 +136,29 @@ Namespace EgtCAM5
#End Region ' TreeViewDoubleClickCommand
#Region "CancelNewCommand"
''' <summary>
''' Returns a command that do TreeViewDoubleClick.
''' </summary>
Public ReadOnly Property CancelNewCommand As ICommand
Get
If m_cmdCancelNew Is Nothing Then
m_cmdCancelNew = New RelayCommand(AddressOf CancelNew)
End If
Return m_cmdCancelNew
End Get
End Property
''' <summary>
''' Execute the TreeViewDoubleClick. This method is invoked by the TreeViewDoubleClickCommand.
''' </summary>
Public Sub CancelNew(ByVal param As Object)
Application.Msn.NotifyColleagues(Application.CANCELOPERATIONCOMMAND)
End Sub
#End Region ' CancelNewCommand
#End Region ' Commands
#Region "METHODS"
@@ -65,6 +65,9 @@
<Expander Header="{Binding OperationListHeader}" IsExpanded="{Binding ListIsExpanded}" Name="OperationsListExpander"
Style="{StaticResource ExpanderStyle}">
<Expander.InputBindings>
<KeyBinding Key="Escape" Command="{Binding CancelOperationCommand}" CommandParameter="Escape"/>
</Expander.InputBindings>
<StackPanel>
@@ -31,10 +31,10 @@ Namespace EgtCAM5
EgtDraw()
' Blocco la lista operazioni
IsEnabledOperationList = False
' Abilito ed apro l'expander con l'albero delle lavorazioni
Application.Msn.NotifyColleagues(Application.MACHININGTREEVIEWEXPANDERISENABLED, True)
' Abilito la selezione di curve e superfici del pezzo
Application.Msn.NotifyColleagues(Application.SETSCENESELMODE, SceneSelModeOpt.PARTCURVESANDSURFACES)
' Abilito ed apro l'expander con l'albero delle lavorazioni
Application.Msn.NotifyColleagues(Application.MACHININGTREEVIEWEXPANDERISENABLED, True)
Else
' Deseleziono eventuali geometrie selezionate
EgtDeselectAll()
@@ -600,7 +600,9 @@ Namespace EgtCAM5
Application.Msn.Register(Application.DRAWMODE_ISCHECKED, Sub()
If NewMachining Then NewMachining = False
End Sub)
Application.Msn.Register(Application.CANCELOPERATIONCOMMAND, Sub()
CancelOperation(String.Empty)
End Sub)
End Sub
#Region "COMMANDS"
@@ -669,6 +671,15 @@ Namespace EgtCAM5
''' Execute the Point. This method is invoked by the PointCommand.
''' </summary>
Public Sub CancelOperation(ByVal param As Object)
' se viene premuto il tasto Esc
If DirectCast(param, String) = "Escape" Then
If m_NewMachining Then
NewMachining = False
ListIsExpanded = True
End If
Return
End If
' in tutti gli altri casi
If m_NewMachining Then
NewMachining = False
ListIsExpanded = True