78cb995cec
-rimosso cambio estensione file colonne datagrid
151 lines
4.1 KiB
VB.net
151 lines
4.1 KiB
VB.net
Imports System.Collections.ObjectModel
|
|
Imports EgtBEAMWALL.Core
|
|
Imports EgtUILib
|
|
Imports System.IO
|
|
Imports EgtWPFLib5
|
|
|
|
Public Class RawPartListVM
|
|
Inherits VMBase
|
|
|
|
#Region "FIELDS & PROPERTIES"
|
|
|
|
Private m_bRawPartListSorted As Boolean
|
|
Public ReadOnly Property bRawPartListSorted As Boolean
|
|
Get
|
|
Return m_bRawPartListSorted
|
|
End Get
|
|
End Property
|
|
Friend Sub SetRawPartListSorted(value As Boolean)
|
|
m_bRawPartListSorted = value
|
|
Map.refLeftPanelVM.NotifyPropertyChanged(NameOf(Map.refLeftPanelVM.MoveRawPart_IsEnabled))
|
|
End Sub
|
|
|
|
Private m_colRawPart_StartCut As EgwWPFBaseLib.ColumnLayout
|
|
Public ReadOnly Property colRawPart_StartCut As EgwWPFBaseLib.ColumnLayout
|
|
Get
|
|
Return m_colRawPart_StartCut
|
|
End Get
|
|
End Property
|
|
|
|
Private m_colRawPart_PosZ As EgwWPFBaseLib.ColumnLayout
|
|
Public ReadOnly Property colRawPart_PosZ As EgwWPFBaseLib.ColumnLayout
|
|
Get
|
|
Return m_colRawPart_PosZ
|
|
End Get
|
|
End Property
|
|
|
|
Private m_RawPartColumns As New ObservableCollection(Of EgwWPFBaseLib.ColumnLayout)
|
|
Public Property RawPartColumns As ObservableCollection(Of EgwWPFBaseLib.ColumnLayout)
|
|
Get
|
|
Return m_RawPartColumns
|
|
End Get
|
|
Set(value As ObservableCollection(Of EgwWPFBaseLib.ColumnLayout))
|
|
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 PosZ_Msg As String
|
|
Get
|
|
Return EgtMsg(61728)
|
|
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
|
|
EgwWPFBaseLib.EgwDataGrid.ReadColumnLayout(DataGridColumnsIniFile.m_sDataGridColumnsIniFile, S_RAWPARTLIST_SUPERVISOR, RawPartColumns)
|
|
' recupero riferimento a colonna StartCut e PosZ
|
|
m_colRawPart_StartCut = m_RawPartColumns.FirstOrDefault(Function(x) x.Key = COL_STARTCUT)
|
|
m_colRawPart_PosZ = m_RawPartColumns.FirstOrDefault(Function(x) x.Key = COL_POSZ)
|
|
End Sub
|
|
|
|
#End Region ' CONSTRUCTOR
|
|
|
|
Friend Sub UpdateColumns(nMachType As MachineType)
|
|
If nMachType = MachineType.BEAM Then
|
|
' aggiorno la visibilità delle colonne
|
|
For Each col In RawPartColumns
|
|
col.IsVisible = If(col.IsVisible, True, False)
|
|
Next
|
|
If Not IsNothing(m_colRawPart_StartCut) Then
|
|
m_colRawPart_StartCut.IsVisible = False
|
|
End If
|
|
If Not IsNothing(m_colRawPart_PosZ) Then
|
|
m_colRawPart_PosZ.IsVisible = True
|
|
End If
|
|
ElseIf nMachType = MachineType.WALL Then
|
|
' aggiorno la visibilità delle colonne
|
|
For Each col In RawPartColumns
|
|
col.IsVisible = If(col.IsVisible, True, False)
|
|
Next
|
|
If Not IsNothing(m_colRawPart_StartCut) Then
|
|
m_colRawPart_StartCut.IsVisible = True
|
|
End If
|
|
If Not IsNothing(m_colRawPart_PosZ) Then
|
|
m_colRawPart_PosZ.IsVisible = False
|
|
End If
|
|
End If
|
|
NotifyPropertyChanged(NameOf(colRawPart_StartCut))
|
|
NotifyPropertyChanged(NameOf(colRawPart_PosZ))
|
|
NotifyPropertyChanged(NameOf(RawPartColumns))
|
|
End Sub
|
|
|
|
End Class
|