262 lines
7.5 KiB
VB.net
262 lines
7.5 KiB
VB.net
Imports System.Collections.ObjectModel
|
|
Imports EgtBEAMWALL.Core
|
|
Imports EgtUILib
|
|
Imports EgtWPFLib5
|
|
|
|
Public Class RawPartListVM
|
|
Inherits VMBase
|
|
|
|
#Region "FIELDS & PROPERTIES"
|
|
|
|
Friend refSaveBTLPartGridControlLayout As Action
|
|
|
|
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_W As EgwWPFBaseLib.ColumnLayout
|
|
Public ReadOnly Property colRawPart_W As EgwWPFBaseLib.ColumnLayout
|
|
Get
|
|
Return m_colRawPart_W
|
|
End Get
|
|
End Property
|
|
|
|
Private m_colRawPart_L As EgwWPFBaseLib.ColumnLayout
|
|
Public ReadOnly Property colRawPart_L As EgwWPFBaseLib.ColumnLayout
|
|
Get
|
|
Return m_colRawPart_L
|
|
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
|
|
|
|
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_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"
|
|
|
|
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
|
|
|
|
Public ReadOnly Property PDN_Msg As String
|
|
Get
|
|
Return EgtMsg(61809)
|
|
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
|
|
|
|
#End Region ' FIELDS & PROPERTIES
|
|
|
|
#Region "CONSTRUCTOR"
|
|
|
|
Sub New()
|
|
' Aggiungo riferimento a Map
|
|
Map.SetRefRawPartListVM(Me)
|
|
NotifyPropertyChanged(NameOf(RawPartColumns))
|
|
NotifyPropertyChanged(NameOf(PartInRawPartColumns))
|
|
End Sub
|
|
|
|
#End Region ' CONSTRUCTOR
|
|
|
|
#Region "METHODS"
|
|
|
|
Friend Sub UpdateColumns(nProjectType As BWType)
|
|
If nProjectType = BWType.BEAM Then
|
|
' carico le colonne della datagrid
|
|
EgwWPFBaseLib.EgwDataGrid.ReadColumnLayout(DataGridColumnsIniFile.m_sDataGridColumnsIniFile, S_RAWPARTLIST_BEAM, RawPartColumns)
|
|
' carico le colonne della datagrid
|
|
EgwWPFBaseLib.EgwDataGrid.ReadColumnLayout(DataGridColumnsIniFile.m_sDataGridColumnsIniFile, S_PARTINRAWPARTLIST_BEAM, PartInRawPartColumns)
|
|
ElseIf nProjectType = BWType.WALL Then
|
|
' carico le colonne della datagrid
|
|
EgwWPFBaseLib.EgwDataGrid.ReadColumnLayout(DataGridColumnsIniFile.m_sDataGridColumnsIniFile, S_RAWPARTLIST_WALL, RawPartColumns)
|
|
' carico le colonne della datagrid
|
|
EgwWPFBaseLib.EgwDataGrid.ReadColumnLayout(DataGridColumnsIniFile.m_sDataGridColumnsIniFile, S_PARTINRAWPARTLIST_WALL, PartInRawPartColumns)
|
|
End If
|
|
NotifyPropertyChanged(NameOf(RawPartColumns))
|
|
NotifyPropertyChanged(NameOf(PartInRawPartColumns))
|
|
' recupero riferimento a colonna StartCut
|
|
m_colRawPart_StartCut = RawPartColumns.FirstOrDefault(Function(x) x.Key = COL_STARTCUT)
|
|
m_colRawPart_W = RawPartColumns.FirstOrDefault(Function(x) x.Key = COL_W)
|
|
m_colRawPart_L = RawPartColumns.FirstOrDefault(Function(x) x.Key = COL_L)
|
|
m_colRawPart_PosZ = RawPartColumns.FirstOrDefault(Function(x) x.Key = COL_POSZ)
|
|
' recupero riferimento a colonne Offset, Rot, Flip, PosX, PosY
|
|
m_colPartInRawPart_Offset = PartInRawPartColumns.FirstOrDefault(Function(x) x.Key = COL_OFFSET)
|
|
m_colPartInRawPart_Rot = PartInRawPartColumns.FirstOrDefault(Function(x) x.Key = COL_ROT)
|
|
m_colPartInRawPart_Flip = PartInRawPartColumns.FirstOrDefault(Function(x) x.Key = COL_FLIP)
|
|
m_colPartInRawPart_PosX = PartInRawPartColumns.FirstOrDefault(Function(x) x.Key = COL_POSX)
|
|
m_colPartInRawPart_PosY = PartInRawPartColumns.FirstOrDefault(Function(x) x.Key = COL_POSY)
|
|
End Sub
|
|
|
|
Friend Sub Close()
|
|
If Not IsNothing(refSaveBTLPartGridControlLayout) Then
|
|
refSaveBTLPartGridControlLayout()
|
|
End If
|
|
End Sub
|
|
|
|
#End Region ' Methods
|
|
|
|
End Class
|