30 lines
969 B
VB.net
30 lines
969 B
VB.net
Imports EgtWPFLib5
|
|
|
|
Public Class MySetUpWindowV
|
|
|
|
Private WithEvents m_SetUpWindowVM As SetUpWindowVM
|
|
|
|
Sub New(Owner As Window, SetUpWindowVM As SetUpWindowVM)
|
|
MyBase.New(Owner)
|
|
' This call is required by the designer.
|
|
InitializeComponent()
|
|
Me.DataContext = SetUpWindowVM
|
|
' Assegno al riferimento locale al VM il VM preso dal DataContext
|
|
m_SetUpWindowVM = SetUpWindowVM
|
|
End Sub
|
|
|
|
Private Sub Tool_DoubleClick(sender As Object, e As MouseButtonEventArgs)
|
|
Dim TreeViewItem As TreeViewItem = DirectCast(sender, TreeViewItem)
|
|
If TypeOf TreeViewItem.DataContext Is ToolItem Then
|
|
Dim SelTool As ToolItem = DirectCast(TreeViewItem.DataContext, ToolItem)
|
|
m_SetUpWindowVM.ToolDoubleClick(SelTool)
|
|
e.Handled = True
|
|
End If
|
|
End Sub
|
|
|
|
Private Sub CloseWindow(bDialogResult As Boolean) Handles m_SetUpWindowVM.m_CloseWindow
|
|
Me.DialogResult = bDialogResult
|
|
End Sub
|
|
|
|
End Class
|