EgtCAM5 :
-Miglioramenti vari.
This commit is contained in:
+4
@@ -2,6 +2,7 @@
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:sys="clr-namespace:System;assembly=mscorlib"
|
||||
xmlns:Interactivity="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
|
||||
xmlns:local="clr-namespace:EgtCAM5"
|
||||
xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5">
|
||||
|
||||
@@ -37,6 +38,9 @@
|
||||
</UniformGrid>
|
||||
<ListBox IsSynchronizedWithCurrentItem="True" ItemsSource="{Binding OperationList}" SelectedItem="{Binding SelectedOperation}"
|
||||
Height="200" x:Name="OperationList" IsEnabled="{Binding IsEnabledOperationList}">
|
||||
<Interactivity:Interaction.Behaviors>
|
||||
<local:ScrollIntoViewForListBox/>
|
||||
</Interactivity:Interaction.Behaviors>
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Grid>
|
||||
|
||||
+21
-2
@@ -366,8 +366,9 @@ Namespace EgtCAM5
|
||||
|
||||
Sub New()
|
||||
Me.ListIsExpanded = True
|
||||
Application.Msn.Register(Application.LOADOPERATIONLIST, Sub()
|
||||
Application.Msn.Register(Application.LOADOPERATIONLIST, Sub(nSelectedOperation As Integer)
|
||||
LoadOperationList()
|
||||
SelectOperation(nSelectedOperation)
|
||||
End Sub)
|
||||
Application.Msn.Register(Application.REMOVEMARKFROMLASTOPERATION, Sub()
|
||||
EgtResetMark(m_LastMarkedOperationId)
|
||||
@@ -474,7 +475,7 @@ Namespace EgtCAM5
|
||||
' Rimuovo l'operazione selezionata
|
||||
EgtRemoveOperation(SelectedOperation.Id)
|
||||
' Ricarico la lista delle operazioni
|
||||
Application.Msn.NotifyColleagues(Application.LOADOPERATIONLIST)
|
||||
Application.Msn.NotifyColleagues(Application.LOADOPERATIONLIST, -1)
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
@@ -684,6 +685,24 @@ Namespace EgtCAM5
|
||||
End While
|
||||
End Sub
|
||||
|
||||
Private Sub SelectOperation(nSelectedOperation As Integer)
|
||||
If nSelectedOperation < 0 Then
|
||||
SelectedOperation = OperationList(0)
|
||||
Else
|
||||
Dim OperationFound = False
|
||||
For Each Operation In OperationList
|
||||
If Operation.Id = nSelectedOperation Then
|
||||
OperationFound = True
|
||||
SelectedOperation = Operation
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
If Not OperationFound Then
|
||||
SelectedOperation = OperationList(0)
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#End Region ' Methods
|
||||
|
||||
End Class
|
||||
|
||||
Reference in New Issue
Block a user