69 lines
1.9 KiB
VB.net
69 lines
1.9 KiB
VB.net
Public Class SelectPartVM
|
|
|
|
Private m_Title As String = "Selection of door"
|
|
Public ReadOnly Property Title As String
|
|
Get
|
|
Return m_Title
|
|
End Get
|
|
End Property
|
|
|
|
Private m_SaveMsg As String = "Ok"
|
|
Public ReadOnly Property SaveMsg As String
|
|
Get
|
|
Return m_SaveMsg
|
|
End Get
|
|
End Property
|
|
|
|
Private m_PartDoorMsg As String = "Select part"
|
|
Public ReadOnly Property PartDoorMsg As String
|
|
Get
|
|
Return m_PartDoorMsg
|
|
End Get
|
|
End Property
|
|
|
|
Private m_PartDoorList As New List(Of String)
|
|
Public Property PartDoorList As List(Of String)
|
|
Get
|
|
Return m_PartDoorList
|
|
End Get
|
|
Set(value As List(Of String))
|
|
m_ListPartDoor = value
|
|
End Set
|
|
End Property
|
|
|
|
Private m_Selection As String = ""
|
|
Public Property Selection As String
|
|
Get
|
|
Return m_Selection
|
|
End Get
|
|
Set(value As String)
|
|
m_Selection = value
|
|
m_nSelectedIndex = m_PartDoorList.IndexOf(m_Selection)
|
|
End Set
|
|
End Property
|
|
|
|
Private m_nSelectedIndex As Integer = 0
|
|
Public ReadOnly Property nSelectedIndex As Integer
|
|
Get
|
|
Return m_nSelectedIndex
|
|
End Get
|
|
End Property
|
|
|
|
|
|
Sub New(TitleWd As String, MsgWd As String, nParts As Integer, nIndex As Integer)
|
|
m_Title = TitleWd
|
|
m_PartDoorMsg = MsgWd
|
|
For Each ItemDoor As PartDoor In Map.refAssemblyManagerVM.CurrProject.SelAssemblyName.SelAssembly.ListPartDoor
|
|
m_PartDoorList.Add(ItemDoor.Type)
|
|
Next
|
|
If Not IsNothing(Map.refPartPageVM) AndAlso Not IsNothing(Map.refPartPageVM.CurrPart) AndAlso
|
|
Not IsNothing(Map.refPartPageVM.CurrPart.TypePart) Then
|
|
m_nSelectedIndex = m_PartDoorList.IndexOf(Map.refPartPageVM.CurrPart.TypePart)
|
|
Else
|
|
m_nSelectedIndex = 0
|
|
End If
|
|
m_Selection = m_PartDoorList(m_nSelectedIndex)
|
|
End Sub
|
|
|
|
End Class
|