53c8d6d934
- Aggiunta lista lastre che scorre e gestisce migliaia di lastre. - Miglioramenti e correzioni varie.
62 lines
1.6 KiB
VB.net
62 lines
1.6 KiB
VB.net
Imports System.Collections.ObjectModel
|
|
Imports EgtWPFLib5
|
|
|
|
Public Class ListPageVM
|
|
Inherits VMBase
|
|
|
|
#Region "FIELDS & PROPERTIES"
|
|
|
|
Public ReadOnly Property SlabList As ObservableCollection(Of Slab)
|
|
Get
|
|
If IsNothing(Map.refProjectVM) Then Return Nothing
|
|
Return Map.refProjectVM.SlabList
|
|
End Get
|
|
End Property
|
|
|
|
' definizione comandi
|
|
Private m_cmdSlabBtn As ICommand
|
|
|
|
#End Region ' FIELDS & PROPERTIES
|
|
|
|
#Region "CONSTRUCTOR"
|
|
|
|
Sub New()
|
|
' Creo riferimento a questa classe in Map
|
|
Map.SetRefListPageVM(Me)
|
|
End Sub
|
|
|
|
#End Region ' CONSTRUCTOR
|
|
|
|
#Region "METHODS"
|
|
|
|
Friend Sub InitListPage()
|
|
Map.refProjectVM.SlabList = New ObservableCollection(Of Slab)(ManageDb.ExecuteSlabReaderQuery("SELECT * FROM " & Slab.DB_SLABS & " ORDER BY " & Slab.DB_MATERIAL & ", " & Slab.DB_STATE))
|
|
End Sub
|
|
|
|
#End Region ' METHODS
|
|
|
|
#Region "COMMANDS"
|
|
|
|
#Region "SlabBtn"
|
|
|
|
' Returns a command that manage the MainWindow_Unloaded command
|
|
Public ReadOnly Property SlabBtn_Command() As ICommand
|
|
Get
|
|
If m_cmdSlabBtn Is Nothing Then
|
|
m_cmdSlabBtn = New Command(AddressOf SlabBtn)
|
|
End If
|
|
Return m_cmdSlabBtn
|
|
End Get
|
|
End Property
|
|
|
|
' Manage the MainWindow_Unloaded event. This method is invoked by the cmdMainWindow_Unloaded.
|
|
Public Sub SlabBtn(ByVal param As Object)
|
|
Map.refProjectVM.SelSlab = param
|
|
Map.refProjectVM.SelProjectMode = ProjectVM.ProjectModeOpt.DETAIL
|
|
End Sub
|
|
|
|
#End Region ' SlabBtn
|
|
|
|
#End Region ' COMMANDS
|
|
|
|
End Class |