33 lines
1.2 KiB
VB.net
33 lines
1.2 KiB
VB.net
Imports EgtUILib
|
|
|
|
Public Class MyToolDbWindowV
|
|
|
|
Private WithEvents m_ToolDbWindowVM As EgtWPFLib5.ToolDbWindowVM
|
|
|
|
Sub New(Owner As Window, ToolDbWindowVM As EgtWPFLib5.ToolDbWindowVM)
|
|
MyBase.New(Owner)
|
|
' This call is required by the designer.
|
|
InitializeComponent()
|
|
Me.DataContext = ToolDbWindowVM
|
|
' Assegno al riferimento locale al VM il VM preso dal DataContext
|
|
m_ToolDbWindowVM = ToolDbWindowVM
|
|
End Sub
|
|
|
|
Private Sub ToolsDbView_Closed(bDialogResult As Boolean) Handles m_ToolDbWindowVM.m_CloseWindow
|
|
' Imposto contesto generale
|
|
EgtSetCurrentContext(EgtWPFLib5.ToolDbWindowVM.ProjectSceneContext)
|
|
' Cancello contesto di visualizzazione utensile
|
|
EgtDeleteContext(EgtWPFLib5.ToolDbWindowVM.ToolDbSceneContext)
|
|
'ToolDbWindowVM.m_ToolDbSceneContext = 0
|
|
Me.Close()
|
|
End Sub
|
|
|
|
Private Sub ToolsDbView_Closing(sender As Object, e As ComponentModel.CancelEventArgs) Handles Me.Closing
|
|
If (Keyboard.Modifiers And ModifierKeys.Alt) = ModifierKeys.Alt OrElse Keyboard.IsKeyDown(Key.F4) Then
|
|
e.Cancel = True
|
|
Return
|
|
End If
|
|
End Sub
|
|
|
|
End Class
|