118 lines
3.1 KiB
VB.net
118 lines
3.1 KiB
VB.net
Imports System.Collections.ObjectModel
|
|
Imports EgtBEAMWALL.Core
|
|
Imports EgtUILib
|
|
|
|
Public Class RawPartListVM
|
|
|
|
#Region "FIELDS & PROPERTIES"
|
|
|
|
Private m_colRawPart_StartCut As EgtDataGridColumn
|
|
Public ReadOnly Property colRawPart_StartCut As EgtDataGridColumn
|
|
Get
|
|
Return m_colRawPart_StartCut
|
|
End Get
|
|
End Property
|
|
|
|
Private m_RawPartColumns As New ObservableCollection(Of EgtDataGridColumn)
|
|
Public Property RawPartColumns As ObservableCollection(Of EgtDataGridColumn)
|
|
Get
|
|
Return m_RawPartColumns
|
|
End Get
|
|
Set(value As ObservableCollection(Of EgtDataGridColumn))
|
|
m_RawPartColumns = value
|
|
End Set
|
|
End Property
|
|
|
|
#Region "Messages"
|
|
|
|
Public ReadOnly Property ID_Msg As String
|
|
Get
|
|
Return EgtMsg(61815)
|
|
End Get
|
|
End Property
|
|
|
|
Public ReadOnly Property StartOffset_Msg As String
|
|
Get
|
|
Return EgtMsg(61816)
|
|
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 Material_Msg As String
|
|
Get
|
|
Return EgtMsg(61607)
|
|
End Get
|
|
End Property
|
|
|
|
Public ReadOnly Property Used_Msg As String
|
|
Get
|
|
Return EgtMsg(61817)
|
|
End Get
|
|
End Property
|
|
|
|
Public ReadOnly Property Waste_Msg As String
|
|
Get
|
|
Return EgtMsg(61818)
|
|
End Get
|
|
End Property
|
|
|
|
#End Region ' Messages
|
|
|
|
#End Region ' FIELDS & PROPERTIES
|
|
|
|
#Region "CONSTRUCTOR"
|
|
|
|
Sub New()
|
|
' Aggiungo riferimento a Map
|
|
Map.SetRefRawPartListVM(Me)
|
|
' carico le colonne della datagrid
|
|
GetPrivateProfileColumns(S_RAWPARTLIST_SUPERVISOR, RawPartColumns)
|
|
' recupero riferimento a colonna StartCut
|
|
m_colRawPart_StartCut = m_RawPartColumns.FirstOrDefault(Function(x) x.Name = COL_STARTCUT)
|
|
End Sub
|
|
|
|
#End Region ' CONSTRUCTOR
|
|
|
|
Friend Sub UpdateColumns(nMachType As MachineType)
|
|
If nMachType = MachineType.BEAM Then
|
|
If Not IsNothing(m_colRawPart_StartCut) Then
|
|
m_colRawPart_StartCut.ColumnVisibility = Visibility.Visible
|
|
End If
|
|
'RawPartColumns.Clear()
|
|
'GetPrivateProfileColumns(S_RAWPARTLIST_BEAM, RawPartColumns)
|
|
' aggiorno la visibilità delle colonne
|
|
For Each col In RawPartColumns
|
|
col.ColumnVisibility = If(col.Visible, Visibility.Visible, Visibility.Collapsed)
|
|
Next
|
|
ElseIf nMachType = MachineType.WALL Then
|
|
' aggiorno la visibilità delle colonne
|
|
For Each col In RawPartColumns
|
|
col.ColumnVisibility = If(col.Visible, Visibility.Visible, Visibility.Collapsed)
|
|
Next
|
|
If Not IsNothing(m_colRawPart_StartCut) Then
|
|
m_colRawPart_StartCut.ColumnVisibility = Visibility.Collapsed
|
|
End If
|
|
'RawPartColumns.Clear()
|
|
'GetPrivateProfileColumns(S_RAWPARTLIST_WALL, RawPartColumns)
|
|
End If
|
|
End Sub
|
|
|
|
End Class
|