Files
egtstone3d/ProjManager/ProjManagerVM.vb
T
Demetrio Cassarino 72a6c5e7c4 -piccola modifica ad import
-rimosso update title
2025-02-11 10:26:55 +01:00

172 lines
3.6 KiB
VB.net

Imports EgtWPFLib5
Imports EgtUILib
Public Class ProjManagerVM
Inherits VMBase
#Region "FIELDS & PROPERTIES"
#Region "Messages"
Public ReadOnly Property HomeTab_Msg
Get
Return EgtMsg(110010).ToUpper() ' Home
End Get
End Property
Public ReadOnly Property Parametrico_Msg
Get
Return EgtMsg(110011).ToUpper() ' Parametrico
End Get
End Property
Public ReadOnly Property NewFile_Msg
Get
Return EgtMsg(110012) ' Nuovo File
End Get
End Property
Public ReadOnly Property OpenFile_Msg
Get
Return EgtMsg(110015) ' Apri
End Get
End Property
Public ReadOnly Property Save_Msg
Get
Return EgtMsg(110013) ' Salva
End Get
End Property
#End Region ' Messages
' Definizione Comandi
Private m_HomeCmd As ICommand
Private m_ParametricoCmd As ICommand
Private m_NewFileCmd As ICommand
Private m_OpenFileCmd As ICommand
Private m_SaveFileCmd As ICommand
#End Region ' Fields & Properties
#Region "CONSTRUCTOR"
Sub New()
Map.SetRefProjManagerVM(Me)
End Sub
#End Region ' Constructor
#Region "METHODS"
Public Sub Save()
Map.refSceneHostVM.SaveProject()
End Sub
''' <summary>
''' Funzione che aggiorna i messaggi del Manager
''' </summary>
Friend Sub UpdateMessageProjManager()
NotifyPropertyChanged(NameOf(HomeTab_Msg))
NotifyPropertyChanged(NameOf(Parametrico_Msg))
NotifyPropertyChanged(NameOf(NewFile_Msg))
NotifyPropertyChanged(NameOf(OpenFile_Msg))
NotifyPropertyChanged(NameOf(Save_Msg))
End Sub
#End Region ' Methods
#Region "COMMANDS"
#Region "HomeCmd"
Public ReadOnly Property HomeCmd As ICommand
Get
If IsNothing(m_HomeCmd) Then
m_HomeCmd = New Command(AddressOf Home)
End If
Return m_HomeCmd
End Get
End Property
Private Sub Home()
Map.refTopPanelVM.SetSelTopOption(TopPanelVM.TopOption.OPTIONS)
End Sub
#End Region ' HomeCmd
#Region "ParametricoCmd"
Public ReadOnly Property ParametricoCmd As ICommand
Get
If IsNothing(m_ParametricoCmd) Then
m_ParametricoCmd = New Command(AddressOf Parametrico)
End If
Return m_ParametricoCmd
End Get
End Property
Private Sub Parametrico()
Map.refTopPanelVM.SetSelTopOption(TopPanelVM.TopOption.PARAMETRICO)
End Sub
#End Region ' ParametricoCmd
#Region "NewFileCmd"
Public ReadOnly Property NewFileCmd As ICommand
Get
If IsNothing(m_NewFileCmd) Then
m_NewFileCmd = New Command(AddressOf NewFile)
End If
Return m_NewFileCmd
End Get
End Property
Friend Sub NewFile()
Map.refTopPanelVM.NewProject(True)
SolidManagerM.CreatePartSolid()
End Sub
#End Region ' NewFileCmd
#Region "OpenFileCmd"
Public ReadOnly Property OpenFileCmd As ICommand
Get
If IsNothing(m_OpenFileCmd) Then
m_OpenFileCmd = New Command(AddressOf OpenFile)
End If
Return m_OpenFileCmd
End Get
End Property
Friend Sub OpenFile()
Map.refTopPanelVM.OpenProject("")
SolidManagerM.CreatePartSolid()
EgtDraw()
End Sub
#End Region ' OpenFileCmd
#Region "SaveFileCmd"
Public ReadOnly Property SaveFileCmd As ICommand
Get
If IsNothing(m_SaveFileCmd) Then
m_SaveFileCmd = New Command(AddressOf SaveFile)
End If
Return m_SaveFileCmd
End Get
End Property
Private Sub SaveFile()
Save()
End Sub
#End Region ' SaveFileCmd
#End Region ' Commands
End Class