Imports System.Collections.ObjectModel Imports EgtBEAMWALL.Core Imports EgtUILib Imports System.IO Public Class PartInRawPartListVM Private m_colPartInRawPart_Offset As EgwWPFBaseLib.ColumnLayout Public ReadOnly Property colPartInRawPart_Offset As EgwWPFBaseLib.ColumnLayout Get Return m_colPartInRawPart_Offset End Get End Property Private m_colPartInRawPart_Rot As EgwWPFBaseLib.ColumnLayout Public ReadOnly Property colPartInRawPart_Rot As EgwWPFBaseLib.ColumnLayout Get Return m_colPartInRawPart_Rot End Get End Property Private m_colPartInRawPart_Flip As EgwWPFBaseLib.ColumnLayout Public ReadOnly Property colPartInRawPart_Flip As EgwWPFBaseLib.ColumnLayout Get Return m_colPartInRawPart_Flip End Get End Property Private m_colPartInRawPart_PosX As EgwWPFBaseLib.ColumnLayout Public ReadOnly Property colPartInRawPart_PosX As EgwWPFBaseLib.ColumnLayout Get Return m_colPartInRawPart_PosX End Get End Property Private m_colPartInRawPart_PosY As EgwWPFBaseLib.ColumnLayout Public ReadOnly Property colPartInRawPart_PosY As EgwWPFBaseLib.ColumnLayout Get Return m_colPartInRawPart_PosY End Get End Property Private m_colPartInRawPart_Redo As EgwWPFBaseLib.ColumnLayout Public ReadOnly Property colPartInRawPart_Redo As EgwWPFBaseLib.ColumnLayout Get Return m_colPartInRawPart_Redo End Get End Property Private m_PartInRawPartColumns As New ObservableCollection(Of EgwWPFBaseLib.ColumnLayout) Public Property PartInRawPartColumns As ObservableCollection(Of EgwWPFBaseLib.ColumnLayout) Get Return m_PartInRawPartColumns End Get Set(value As ObservableCollection(Of EgwWPFBaseLib.ColumnLayout)) 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 EgwWPFBaseLib.EgwDataGrid.ReadColumnLayout(DataGridColumnsIniFile.m_sDataGridColumnsIniFile, S_PARTINRAWPARTLIST_SUPERVISOR, PartInRawPartColumns) ' recupero riferimento a colonna Redo m_colPartInRawPart_Redo = PartInRawPartColumns.FirstOrDefault(Function(x) x.Key = COL_REDO) ' recupero riferimento a colonne Offset, Rot, Flip, PosX, PosY m_colPartInRawPart_Offset = m_PartInRawPartColumns.FirstOrDefault(Function(x) x.Key = COL_OFFSET) m_colPartInRawPart_Rot = m_PartInRawPartColumns.FirstOrDefault(Function(x) x.Key = COL_ROT) m_colPartInRawPart_Flip = m_PartInRawPartColumns.FirstOrDefault(Function(x) x.Key = COL_FLIP) m_colPartInRawPart_PosX = m_PartInRawPartColumns.FirstOrDefault(Function(x) x.Key = COL_POSX) m_colPartInRawPart_PosY = m_PartInRawPartColumns.FirstOrDefault(Function(x) x.Key = COL_POSY) ' aggiorno la visibilità delle colonne For Each col In PartInRawPartColumns col.IsVisible = If(col.IsVisible, True, False) Next ' nascondo colonna redo If Not IsNothing(colPartInRawPart_Redo) Then colPartInRawPart_Redo.IsVisible = False End If End Sub #End Region ' CONSTRUCTOR Friend Sub UpdateColumns(nMachType As MachineType) If nMachType = MachineType.BEAM Then If Not IsNothing(m_colPartInRawPart_Offset) Then m_colPartInRawPart_Offset.IsVisible = True End If ' aggiorno la visibilità delle colonne For Each col In PartInRawPartColumns col.IsVisible = If(col.IsVisible, True, False) Next If Not IsNothing(colPartInRawPart_Redo) Then colPartInRawPart_Redo.IsVisible = False End If If Not IsNothing(m_colPartInRawPart_Rot) Then m_colPartInRawPart_Rot.IsVisible = False End If If Not IsNothing(m_colPartInRawPart_Flip) Then m_colPartInRawPart_Flip.IsVisible = False End If If Not IsNothing(m_colPartInRawPart_PosX) Then m_colPartInRawPart_PosX.IsVisible = False End If If Not IsNothing(m_colPartInRawPart_PosY) Then m_colPartInRawPart_PosY.IsVisible = False End If ElseIf nMachType = MachineType.WALL Then If Not IsNothing(m_colPartInRawPart_Rot) Then m_colPartInRawPart_Rot.IsVisible = True End If If Not IsNothing(m_colPartInRawPart_Flip) Then m_colPartInRawPart_Flip.IsVisible = True End If If Not IsNothing(m_colPartInRawPart_PosX) Then m_colPartInRawPart_PosX.IsVisible = True End If If Not IsNothing(m_colPartInRawPart_PosY) Then m_colPartInRawPart_PosY.IsVisible = True End If ' aggiorno la visibilità delle colonne For Each col In PartInRawPartColumns col.IsVisible = If(col.IsVisible, True, False) Next If Not IsNothing(colPartInRawPart_Redo) Then colPartInRawPart_Redo.IsVisible = False End If If Not IsNothing(m_colPartInRawPart_Offset) Then m_colPartInRawPart_Offset.IsVisible = False End If End If End Sub End Class