211 lines
6.8 KiB
VB.net
211 lines
6.8 KiB
VB.net
Imports System.Collections.ObjectModel
|
|
Imports EgtBEAMWALL.Core
|
|
Imports EgtUILib
|
|
Imports EgtWPFLib5
|
|
|
|
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_colPartInRawPart_Redo As EgtDataGridColumn
|
|
Public ReadOnly Property colPartInRawPart_Redo As EgtDataGridColumn
|
|
Get
|
|
Return m_colPartInRawPart_Redo
|
|
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"
|
|
|
|
'SN
|
|
'Rotazione
|
|
|
|
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
|
|
|
|
#End Region ' Messages
|
|
|
|
#Region "CONSTRUCTOR"
|
|
|
|
Sub New()
|
|
'' aggiungo riferimento a map
|
|
Map.SetRefPartInRawPartListVM(Me)
|
|
' carico le colonne della datagrid
|
|
Core.GetPrivateProfileColumns(S_PARTINRAWPARTLIST_SUPERVISOR, PartInRawPartColumns)
|
|
' recupero riferimento a colonna Redo
|
|
m_colPartInRawPart_Redo = PartInRawPartColumns.FirstOrDefault(Function(x) x.Name = COL_REDO)
|
|
' 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)
|
|
' nascondo colonna redo
|
|
If Not IsNothing(colPartInRawPart_Redo) Then
|
|
colPartInRawPart_Redo.ColumnVisibility = Visibility.Collapsed
|
|
End If
|
|
End Sub
|
|
|
|
#End Region ' CONSTRUCTOR
|
|
|
|
Friend Sub UpdateColumns(nMachType As MachineType)
|
|
' aggiorno la visibilità delle colonne
|
|
For Each col In PartInRawPartColumns
|
|
If col.Name = COL_MATERIAL Then
|
|
col.Visible = GetMainPrivateProfileInt(S_WAREHOUSE, K_SHOWWAREHOUSEMATERIAL, 0) = 0
|
|
ElseIf col.Name = COL_WAREHOUSEMATERIAL Then
|
|
col.Visible = GetMainPrivateProfileInt(S_WAREHOUSE, K_SHOWWAREHOUSEMATERIAL, 0) > 0
|
|
Else
|
|
col.ColumnVisibility = If(col.Visible, Visibility.Visible, Visibility.Collapsed)
|
|
End If
|
|
Next
|
|
If nMachType = MachineType.BEAM Then
|
|
If Not IsNothing(m_colPartInRawPart_Offset) Then
|
|
m_colPartInRawPart_Offset.ColumnVisibility = Visibility.Visible
|
|
End If
|
|
If Not IsNothing(colPartInRawPart_Redo) Then
|
|
colPartInRawPart_Redo.ColumnVisibility = Visibility.Collapsed
|
|
End If
|
|
If Not IsNothing(m_colPartInRawPart_Rot) Then
|
|
m_colPartInRawPart_Rot.ColumnVisibility = Visibility.Collapsed
|
|
End If
|
|
If Not IsNothing(m_colPartInRawPart_Flip) Then
|
|
m_colPartInRawPart_Flip.ColumnVisibility = Visibility.Collapsed
|
|
End If
|
|
If Not IsNothing(m_colPartInRawPart_PosX) Then
|
|
m_colPartInRawPart_PosX.ColumnVisibility = Visibility.Collapsed
|
|
End If
|
|
If Not IsNothing(m_colPartInRawPart_PosY) Then
|
|
m_colPartInRawPart_PosY.ColumnVisibility = Visibility.Collapsed
|
|
End If
|
|
'PartInRawPartColumns.Clear()
|
|
'GetPrivateProfileColumns(S_PARTINRAWPARTLIST_BEAM, PartInRawPartColumns)
|
|
ElseIf nMachType = MachineType.WALL Then
|
|
If Not IsNothing(m_colPartInRawPart_Rot) Then
|
|
m_colPartInRawPart_Rot.ColumnVisibility = Visibility.Visible
|
|
End If
|
|
If Not IsNothing(m_colPartInRawPart_Flip) Then
|
|
m_colPartInRawPart_Flip.ColumnVisibility = Visibility.Visible
|
|
End If
|
|
If Not IsNothing(m_colPartInRawPart_PosX) Then
|
|
m_colPartInRawPart_PosX.ColumnVisibility = Visibility.Visible
|
|
End If
|
|
If Not IsNothing(m_colPartInRawPart_PosY) Then
|
|
m_colPartInRawPart_PosY.ColumnVisibility = Visibility.Visible
|
|
End If
|
|
If Not IsNothing(colPartInRawPart_Redo) Then
|
|
colPartInRawPart_Redo.ColumnVisibility = Visibility.Collapsed
|
|
End If
|
|
If Not IsNothing(m_colPartInRawPart_Offset) Then
|
|
m_colPartInRawPart_Offset.ColumnVisibility = Visibility.Collapsed
|
|
End If
|
|
' PartInRawPartColumns.Clear()
|
|
'GetPrivateProfileColumns(S_PARTINRAWPARTLIST_WALL, PartInRawPartColumns)
|
|
End If
|
|
End Sub
|
|
|
|
End Class
|