Files
Demetrio Cassarino a12ab8f531 -pulizia codice
2024-06-13 17:36:10 +02:00

166 lines
4.6 KiB
VB.net

Imports System.Collections.ObjectModel
Imports EgtBEAMWALL.Core
Imports EgtUILib
Public Class PartInRawPartListVM
Private m_colPartInRawPart_Offset As EgtDataGridColumn
Public ReadOnly Property colPartInRawPart_Offset As EgtDataGridColumn
Get
Return m_colPartInRawPart_Offset
End Get
End Property
Private m_colPartInRawPart_Rot As EgtDataGridColumn
Public ReadOnly Property colPartInRawPart_Rot As EgtDataGridColumn
Get
Return m_colPartInRawPart_Rot
End Get
End Property
Private m_colPartInRawPart_Flip As EgtDataGridColumn
Public ReadOnly Property colPartInRawPart_Flip As EgtDataGridColumn
Get
Return m_colPartInRawPart_Flip
End Get
End Property
Private m_colPartInRawPart_PosX As EgtDataGridColumn
Public ReadOnly Property colPartInRawPart_PosX As EgtDataGridColumn
Get
Return m_colPartInRawPart_PosX
End Get
End Property
Private m_colPartInRawPart_PosY As EgtDataGridColumn
Public ReadOnly Property colPartInRawPart_PosY As EgtDataGridColumn
Get
Return m_colPartInRawPart_PosY
End Get
End Property
Private m_PartInRawPartColumns As New ObservableCollection(Of EgtDataGridColumn)
Public Property PartInRawPartColumns As ObservableCollection(Of EgtDataGridColumn)
Get
Return m_PartInRawPartColumns
End Get
Set(value As ObservableCollection(Of EgtDataGridColumn))
m_PartInRawPartColumns = value
End Set
End Property
#Region "Messages"
Public ReadOnly Property PDN_Msg As String
Get
Return EgtMsg(61809)
End Get
End Property
Public ReadOnly Property W_Msg As String
Get
Return EgtMsg(61605)
End Get
End Property
Public ReadOnly Property H_Msg As String
Get
Return EgtMsg(61606)
End Get
End Property
Public ReadOnly Property L_Msg As String
Get
Return EgtMsg(61604)
End Get
End Property
Public ReadOnly Property NAM_Msg As String
Get
Return EgtMsg(61603)
End Get
End Property
Public ReadOnly Property PosX_Msg As String
Get
Return EgtMsg(61811)
End Get
End Property
Public ReadOnly Property PosY_Msg As String
Get
Return EgtMsg(61812)
End Get
End Property
Public ReadOnly Property Offset_Msg As String
Get
Return EgtMsg(61755)
End Get
End Property
Public ReadOnly Property MAT_Msg As String
Get
Return EgtMsg(61607)
End Get
End Property
Public ReadOnly Property GRP_Msg As String
Get
Return EgtMsg(61624)
End Get
End Property
Public ReadOnly Property STOREY_Msg As String
Get
Return EgtMsg(61623)
End Get
End Property
Public ReadOnly Property ROTATION_Msg As String
Get
Return EgtMsg(61737)
End Get
End Property
Public ReadOnly Property INVERSION_Msg As String
Get
Return EgtMsg(61738)
End Get
End Property
#End Region ' Messages
#Region "CONSTRUCTOR"
Sub New()
' aggiungo riferimento a map
Map.SetRefPartInRawPartListVM(Me)
End Sub
#End Region ' CONSTRUCTOR
Friend Sub UpdateColumns(nMachType As MachineType)
If nMachType = MachineType.BEAM Then
PartInRawPartColumns.Clear()
GetPrivateProfileColumns(S_PARTINRAWPARTLIST_BEAM, PartInRawPartColumns)
ElseIf nMachType = MachineType.WALL Then
PartInRawPartColumns.Clear()
GetPrivateProfileColumns(S_PARTINRAWPARTLIST_WALL, PartInRawPartColumns)
End If
' recupero riferimento a colonne Offset, Rot, Flip, PosX, PosY
m_colPartInRawPart_Offset = m_PartInRawPartColumns.FirstOrDefault(Function(x) x.Name = COL_OFFSET)
m_colPartInRawPart_Rot = m_PartInRawPartColumns.FirstOrDefault(Function(x) x.Name = COL_ROT)
m_colPartInRawPart_Flip = m_PartInRawPartColumns.FirstOrDefault(Function(x) x.Name = COL_FLIP)
m_colPartInRawPart_PosX = m_PartInRawPartColumns.FirstOrDefault(Function(x) x.Name = COL_POSX)
m_colPartInRawPart_PosY = m_PartInRawPartColumns.FirstOrDefault(Function(x) x.Name = COL_POSY)
' aggiorno la visibilità delle colonne
For Each col In PartInRawPartColumns
If Not bOnlyProd AndAlso nMachType = MachineType.BEAM AndAlso (col.Name.Equals(COL_ROT) OrElse col.Name.Equals(COL_FLIP) OrElse col.Name.Equals(COL_POSX)) Then
col.Visible = False
Else
col.Visible = True
End If
col.ColumnVisibility = If(col.Visible, Visibility.Visible, Visibility.Collapsed)
Next
End Sub
End Class