Files
egtbeamwall/EgtBEAMWALL.Supervisor/MainWindow/MainWindowV.xaml.vb
T
Demetrio Cassarino 76a3fa6b78 Optmizer 2.7.11.10
-aggiornato tabelle supervisore con egedatagrid
2025-11-20 08:56:31 +01:00

54 lines
1.7 KiB
VB.net

Imports EgtWPFLib5
Imports EgtBEAMWALL.Core
Public Class MainWindowV
Private m_MainWindowVM As MainWindowVM
#Region "CONSTRUCTOR"
Sub New()
m_MainWindowVM = New MainWindowVM
' Funzione che interpreta l'xaml
InitializeComponent()
' Assegno al riferimento locale al VM il VM preso dal DataContext
Me.DataContext = m_MainWindowVM
'm_MainWindowVM = DirectCast(Me.DataContext, MainWindowVM)
'AddHandler Me.Loaded, AddressOf MainWindowV_Loaded
AddHandler Me.ContentRendered, AddressOf MainWindowV_ContentRendered
AddHandler Me.Closing, AddressOf MainWindowV_Closing
AddHandler Me.KeyDown, AddressOf MainWindowV_KeyDown
Me.SetPlacementAppName(S_GENERAL)
Me.SetPlacementKeyName(K_WINPLACE)
Me.SetPlacementFileName(IniFile.m_sIniFile)
End Sub
#End Region ' CONSTRUCTOR
#Region "EVENTS"
Private Sub MainWindowV_Loaded(sender As Object, e As RoutedEventArgs)
' Carico e imposto posizione finestra
WinPosFromIniToWindow(S_GENERAL, K_SUPERVISORWINPLACE, Me)
End Sub
Private Sub MainWindowV_ContentRendered(sender As Object, e As EventArgs)
m_MainWindowVM.ContentRendered()
End Sub
Private Sub MainWindowV_Closing(sender As Object, e As System.ComponentModel.CancelEventArgs)
m_MainWindowVM.CloseApplication()
' Salvo posizione finestra (se non minimizzata)
If WindowState <> WindowState.Minimized Then
WinPosFromWindowToIni(Me, S_GENERAL, K_SUPERVISORWINPLACE)
End If
End Sub
Private Sub MainWindowV_KeyDown(sender As Object, e As KeyEventArgs)
m_MainWindowVM.KeyDown(e.Key)
End Sub
#End Region ' EVENTS
End Class