Files
EgtDOORCreator/CompoPanel/CompoBtn.vb
T
Dario Sassi ee575750da EgtDOORCreator :
- primo salvataggio.
2017-01-11 14:42:25 +00:00

66 lines
1.5 KiB
VB.net

Public Class CompoBtn
Private m_AddNewDoor As Action(Of String)
Private m_Name As String
Public ReadOnly Property Name As String
Get
Return m_Name
End Get
End Property
Private m_IniCompoName As String
Public ReadOnly Property IniCompoName As String
Get
Return m_IniCompoName
End Get
End Property
Private m_DDFCompoName As String
Public ReadOnly Property DDFCompoName As String
Get
Return m_DDFCompoName
End Get
End Property
Sub New(sName As String, sIniCompoName As String, sDDFCompoName As String, ByRef AddNewDoor As Action(Of String))
m_AddNewDoor = AddNewDoor
m_Name = sName
m_IniCompoName = sIniCompoName
m_DDFCompoName = sDDFCompoName
End Sub
' Definizione comando
Private m_CmdCompoBtn As ICommand
#Region "COMMANDS"
#Region "CompoBtnCommand"
''' <summary>
''' Returns a command that do Exec.
''' </summary>
Public ReadOnly Property CompoBtnCommand As ICommand
Get
If m_CmdCompoBtn Is Nothing Then
m_CmdCompoBtn = New Command(AddressOf CompoBtn)
End If
Return m_CmdCompoBtn
End Get
End Property
''' <summary>
''' Execute the Exec. This method is invoked by the ExecCommand.
''' </summary>
Public Sub CompoBtn()
m_AddNewDoor(m_IniCompoName)
End Sub
#End Region ' CompoBtnCommand
#End Region 'Commands
End Class