e6d051c9a2
- Primo rilascio
149 lines
4.6 KiB
VB.net
149 lines
4.6 KiB
VB.net
Imports System.Collections.ObjectModel
|
|
Imports EgtWPFLib5
|
|
|
|
Public Class UnloadingAreaVM
|
|
Inherits VMBase
|
|
|
|
Private m_WarehouseList As New ObservableCollection(Of WarehouseVM)
|
|
Public ReadOnly Property WarehouseList As ObservableCollection(Of WarehouseVM)
|
|
Get
|
|
Return m_WarehouseList
|
|
End Get
|
|
End Property
|
|
|
|
Private m_ActiveWarehouse As Warehouses
|
|
Public ReadOnly Property ActiveWarehouse As Warehouses
|
|
Get
|
|
Return m_ActiveWarehouse
|
|
End Get
|
|
End Property
|
|
|
|
Private m_Table1CurrRow As Integer
|
|
Private m_Table1NRow As Integer
|
|
Public ReadOnly Property Table1Percentage As String
|
|
Get
|
|
Return DoubleToString(m_Table1CurrRow / m_Table1NRow * 100, 0) & "%"
|
|
End Get
|
|
End Property
|
|
|
|
Private m_TileType As Integer
|
|
Public ReadOnly Property TileType As String
|
|
Get
|
|
Return m_TileType.ToString
|
|
End Get
|
|
End Property
|
|
Private m_Table1Counter As Integer
|
|
Public ReadOnly Property Table1Counter As String
|
|
Get
|
|
Return m_Table1Counter.ToString
|
|
End Get
|
|
End Property
|
|
Private m_Table2Counter As Integer
|
|
Public ReadOnly Property Table2Counter As String
|
|
Get
|
|
Return m_Table2Counter.ToString
|
|
End Get
|
|
End Property
|
|
Private m_TileThickness As Double
|
|
Public ReadOnly Property TileThickness As String
|
|
Get
|
|
Return LenToString(m_TileThickness, 1)
|
|
End Get
|
|
End Property
|
|
Private m_LastSlab As Boolean
|
|
Public ReadOnly Property LastSlab As Boolean
|
|
Get
|
|
Return m_LastSlab
|
|
End Get
|
|
End Property
|
|
|
|
#Region "CONSTRUCTOR"
|
|
|
|
Sub New()
|
|
' Creo riferimento a questa classe in CompoWindowMap
|
|
Map.SetRefUnloadingAreaVM(Me)
|
|
m_WarehouseList.Add(New WarehouseVM(Warehouses.A))
|
|
m_WarehouseList.Add(New WarehouseVM(Warehouses.B))
|
|
End Sub
|
|
|
|
#End Region ' CONSTRUCTOR
|
|
|
|
#Region "METHODS"
|
|
|
|
Friend Sub SetActiveWarehouse(ActiveWarehouse As Warehouses)
|
|
m_ActiveWarehouse = ActiveWarehouse
|
|
If ActiveWarehouse = Warehouses.A Then
|
|
m_WarehouseList(0).SetIsActive(True)
|
|
m_WarehouseList(1).SetIsActive(False)
|
|
ElseIf ActiveWarehouse = Warehouses.B Then
|
|
m_WarehouseList(0).SetIsActive(False)
|
|
m_WarehouseList(1).SetIsActive(True)
|
|
End If
|
|
'If ActiveWarehouse <> m_ActiveWarehouse Then
|
|
' m_ActiveWarehouse = ActiveWarehouse
|
|
' For Each Warehouse In m_WarehouseList
|
|
' Warehouse.SetState(If(Warehouse.Id = ActiveWarehouse, States.ACTIVE, States.FULL))
|
|
' Next
|
|
' m_WarehouseList(ActiveWarehouse - 1).SetState(States.ACTIVE)
|
|
'End If
|
|
End Sub
|
|
|
|
Friend Sub SetWarehouse_IsPallet(Warehouse As Warehouses, IsPallet As Boolean)
|
|
m_WarehouseList(Warehouse - 1).SetIsPallet(IsPallet)
|
|
End Sub
|
|
|
|
Friend Sub SetBoxIsActive(BoxId As Integer)
|
|
If Not m_ActiveWarehouse > 0 AndAlso m_ActiveWarehouse <= 2 Then
|
|
m_WarehouseList(Warehouses.A).SetBoxIsActive(0)
|
|
m_WarehouseList(Warehouses.A).SetBoxIsActive(0)
|
|
End If
|
|
m_WarehouseList(m_ActiveWarehouse - 1).SetBoxIsActive(BoxId)
|
|
End Sub
|
|
|
|
Friend Sub SetBoxState(Warehouse As Warehouses, Id As Integer, State As States)
|
|
m_WarehouseList(Warehouse - 1).SetBoxState(Id, State)
|
|
End Sub
|
|
|
|
Friend Sub FillActiveBox(Livello As Integer, Riga As Integer)
|
|
m_WarehouseList(m_ActiveWarehouse - 1).FillActiveBox(Livello, Riga)
|
|
End Sub
|
|
|
|
Friend Sub MaxFillActiveBox(MaxLivello As Integer, MaxRiga As Integer)
|
|
m_WarehouseList(m_ActiveWarehouse - 1).MaxFillActiveBox(MaxLivello, MaxRiga)
|
|
End Sub
|
|
|
|
Friend Sub SetTable1Counter(Table1Counter As Integer)
|
|
m_Table1Counter = Table1Counter
|
|
NotifyPropertyChanged("Table1Counter")
|
|
End Sub
|
|
|
|
Friend Sub SetTable2Counter(Table2Counter As Integer)
|
|
m_Table2Counter = Table2Counter
|
|
NotifyPropertyChanged("Table2Counter")
|
|
End Sub
|
|
|
|
Friend Sub SetTable1Percentage(Table1CurrRow As Integer, Table1NRow As Integer)
|
|
m_Table1CurrRow = Table1CurrRow
|
|
m_Table1NRow = Table1NRow
|
|
NotifyPropertyChanged("Table1Percentage")
|
|
End Sub
|
|
|
|
Friend Sub SetTileType(TyleType As Integer)
|
|
m_TileType = TyleType
|
|
NotifyPropertyChanged("TileType")
|
|
End Sub
|
|
|
|
Friend Sub SetTileThickness(TileThickness As Double)
|
|
m_TileThickness = TileThickness
|
|
NotifyPropertyChanged("TileThickness")
|
|
End Sub
|
|
|
|
Friend Sub SetLastSlab(LastSlab As Boolean)
|
|
m_LastSlab = LastSlab
|
|
NotifyPropertyChanged("LastSlab")
|
|
End Sub
|
|
|
|
#End Region ' METHODS
|
|
|
|
End Class
|