Files
omagoffice/MainWindow/MainWindowV.xaml.vb
Emmanuele Sassi 982c120d56 OmagOFFICE :
- Aggiunta grafica per CurrMachWindow.
- Introdotta gestione posizione della finestra Csv.
2017-05-08 11:38:24 +00:00

43 lines
1.4 KiB
VB.net

Imports EgtWPFLib5
Class MainWindowV
Private m_MainWindowVM As MainWindowVM
#Region "CONSTRUCTOR"
Sub New()
' Funzione che interpreta l'xaml
InitializeComponent()
' Assegno al riferimento locale al VM il VM preso dal DataContext
m_MainWindowVM = DirectCast(Me.DataContext, MainWindowVM)
End Sub
#End Region ' CONSTRUCTOR
#Region "EVENTS"
Private Sub MainWindowV_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded
' Carico e imposto posizione finestra
WinPosFromIniToWindow(S_GENERAL, K_WINPLACE, Me)
End Sub
Private Sub MainWindowV_ContentRendered(sender As Object, e As EventArgs) Handles Me.ContentRendered
m_MainWindowVM.ContentRendered()
End Sub
Private Sub MainWindowV_Unloaded(sender As Object, e As System.ComponentModel.CancelEventArgs) Handles Me.Closing
' Salvo posizione finestra Csv (se aperta)
If OmagOFFICEMap.refNestingTabVM.CsvImport_IsChecked And OmagOFFICEMap.refOptionPanelVM.SelItem = OptionPanelVM.Tabs.NESTING Then
WinPosFromWindowToIni(OmagOFFICEMap.refNestingTabVM.CsvImportWindow, S_GENERAL, K_CSVWINPLACE)
End If
' Salvo posizione finestra (se non minimizzata)
If WindowState <> WindowState.Minimized Then
WinPosFromWindowToIni(Me, S_GENERAL, K_WINPLACE)
End If
End Sub
#End Region ' EVENTS
End Class