Files
egtbeamwall/EgtBEAMWALL.Supervisor/MainWindow/MainWindowVM.vb
T
2021-04-16 00:04:28 +02:00

79 lines
2.3 KiB
VB.net

Imports EgtBEAMWALL.Core
Public Class MainWindowVM
Inherits VMBase
' Riferimento al Model della MainWindow
Private m_MainWindowM As MainWindowM
Friend ReadOnly Property MainWindowM As MainWindowM
Get
Return m_MainWindowM
End Get
End Property
' Titolo
Private m_Title As String
Public ReadOnly Property Title As String
Get
Return m_Title
End Get
End Property
#Region "CONSTRUCTOR"
Sub New()
' Avvio l'inizializzazione della mappa passandogli il riferimento al MainWindowVM
Map.BeginInit(Me)
'' Creo Model della MainWindow
m_MainWindowM = New MainWindowM
End Sub
#End Region ' CONSTRUCTOR
#Region "METHODS"
Friend Sub SetTitle(sTitle As String)
m_Title = sTitle
NotifyPropertyChanged(NameOf(Title))
End Sub
Public Sub UpdateTitle()
m_Title = Map.refSupervisorManagerVM.CurrProd.nProdId.ToString("0000") & " - EgtBEAMWALL"
NotifyPropertyChanged(NameOf(Title))
End Sub
'Friend Sub ContentRendered()
' Verifico che l'inizializzazione di tutte le parti del programma sia andata a buon fine
' If Map.EndInit() Then
' m_bInitStatus = True
' altrimenti chiudo il programma
' Else
' m_bInitStatus = False
' End If
' Aggiorno visualizzazione unità di misura
' Map.refStatusBarVM.SetMeasureUnit(If(EgtUiUnitsAreMM(), MeasureUnitOpt.MM, MeasureUnitOpt.INCH))
' Se istanza oltre la prima, chiedo cosa aprire
' If Not m_MainWindowM.bFirstInstance Then
' Map.refProjectManagerVM.Open()
' ' altrimenti verifico se richiesto ultimo progetto
' ElseIf GetMainPrivateProfileInt(S_GENERAL, K_AUTOLOADLASTPROJ, 0) = 1 Then
' Dim sLastProjectPath As String = String.Empty
' GetMainPrivateProfileString(S_GENERAL, K_LASTPROJ, String.Empty, sLastProjectPath)
' If Not String.IsNullOrWhiteSpace(sLastProjectPath) AndAlso File.Exists(sLastProjectPath) Then
' Map.refProjectManagerVM.OpenProject(sLastProjectPath)
' Else
' Map.refProjectManagerVM.NewCmd()
' End If
' ' altrimenti nuovo progetto
' Else
' Map.refProjectManagerVM.NewCmd()
' End If
' apro in modalita' VIEW
' Map.refMainMenuVM.SelPage = Pages.VIEW
'End Sub
#End Region ' METHODS
End Class