Files
omagoffice/CurrMachWindow/CurrMachWindowV.xaml.vb
2023-08-24 17:32:14 +02:00

25 lines
808 B
VB.net

Public Class CurrMachWindowV
Private m_CurrMachWindowVM As CurrMachWindowVM
Sub New(Owner As Window, CurrMachWindowVM As CurrMachWindowVM)
MyBase.New(Owner)
' This call is required by the designer.
InitializeComponent()
Me.DataContext = CurrMachWindowVM
' Assegno al riferimento locale al VM il VM preso dal DataContext
m_CurrMachWindowVM = CurrMachWindowVM
End Sub
Private Sub Me_Initialized(sender As Object, e As EventArgs) Handles Me.Initialized
Me.Top = Owner.Top + Owner.Height / 2 - Me.ActualHeight / 2
Me.Left = Owner.Left + Owner.Width / 2 - Me.ActualWidth / 2
End Sub
Private Sub OkBtn_Click(sender As Object, e As RoutedEventArgs) Handles OkBtn.Click
DialogResult = True
End Sub
End Class