48 lines
1.9 KiB
VB.net
48 lines
1.9 KiB
VB.net
Public Class AssemblyManagerV
|
|
|
|
Private Sub Door_MouseLeftButtonUp(sender As Object, e As MouseButtonEventArgs)
|
|
Dim Item As ListBoxItem = DirectCast(sender, ListBoxItem)
|
|
If IsNothing(Map.refAssemblyManagerVM.CurrProject.SelAssemblyName) Then
|
|
e.Handled = True
|
|
Return
|
|
End If
|
|
' Gestisco porta corrente modificata
|
|
If Map.refAssemblyManagerVM.CurrProject.SelAssemblyName.IsModified Then
|
|
If Not Map.refAssemblyManagerVM.ManageModified() Then
|
|
Return
|
|
End If
|
|
Item.IsSelected = Not Map.refAssemblyManagerVM.CurrProject.IsBlockedSelAssemblyName(DirectCast(Item.DataContext, AssemblyName))
|
|
Return
|
|
End If
|
|
' verifico se il progetto cliccato è quello già selezionato
|
|
'If Map.refAssemblyManagerVM.CurrProject.SelAssemblyName Is DirectCast(Item.DataContext, AssemblyName) Then
|
|
' ricarico la porta
|
|
e.Handled = Map.refAssemblyManagerVM.CurrProject.IsBlockedSelAssemblyName(DirectCast(Item.DataContext, AssemblyName))
|
|
'End If
|
|
'If IsModified Then
|
|
' Map.refAssemblyManagerVM.CurrProject.SelAssemblyName = DirectCast(Item.DataContext, AssemblyName)
|
|
'End If
|
|
End Sub
|
|
|
|
Private Sub ListBox_PreviewMouseWheel(sender As Object, e As MouseWheelEventArgs)
|
|
Dim MyList As ListBox = DirectCast(sender, ListBox)
|
|
Dim Index As Integer = 0
|
|
Dim nCountChildren As Integer = VisualTreeHelper.GetChildrenCount(MyList) - 1
|
|
Dim MyScroll As ScrollViewer
|
|
For Index = 0 To nCountChildren
|
|
If TypeOf VisualTreeHelper.GetChild(MyList, Index) Is ScrollViewer Then
|
|
MyScroll = DirectCast(VisualTreeHelper.GetChild(MyList, Index), ScrollViewer)
|
|
If e.Delta > 0 Then
|
|
MyScroll.LineLeft()
|
|
Else
|
|
MyScroll.LineRight()
|
|
End If
|
|
e.Handled = True
|
|
Exit For
|
|
End If
|
|
Next
|
|
|
|
End Sub
|
|
|
|
End Class
|